@luigi-project/container 1.7.5-dev.202512181003 → 1.7.5-dev.202512181048
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle.js.map +1 -1
- package/package.json +1 -1
package/bundle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.js","sources":["../node_modules/svelte/src/runtime/internal/utils.js","../node_modules/svelte/src/runtime/internal/lifecycle.js","../node_modules/svelte/src/runtime/internal/dom.js","../node_modules/svelte/src/runtime/internal/scheduler.js","../node_modules/svelte/src/runtime/internal/transitions.js","../node_modules/svelte/src/runtime/internal/Component.js","../src/constants/internal-communication.ts","../node_modules/svelte/src/runtime/internal/disclose-version/index.js","../node_modules/svelte/src/shared/version.js","../src/constants/communication.ts","../src/services/container.service.ts","../src/api/container-api.ts","../src/services/iframe-helpers.ts","../src/services/web-component-helpers.ts","../src/services/webcomponents.service.ts","../src/utilities/helpers.ts","../src/LuigiContainer.svelte","../src/LuigiCompoundContainer.svelte","../src/main.ts"],"sourcesContent":["/** @returns {void} */\nexport function noop() {}\n\nexport const identity = (x) => x;\n\n/**\n * @template T\n * @template S\n * @param {T} tar\n * @param {S} src\n * @returns {T & S}\n */\nexport function assign(tar, src) {\n\t// @ts-ignore\n\tfor (const k in src) tar[k] = src[k];\n\treturn /** @type {T & S} */ (tar);\n}\n\n// Adapted from https://github.com/then/is-promise/blob/master/index.js\n// Distributed under MIT License https://github.com/then/is-promise/blob/master/LICENSE\n/**\n * @param {any} value\n * @returns {value is PromiseLike<any>}\n */\nexport function is_promise(value) {\n\treturn (\n\t\t!!value &&\n\t\t(typeof value === 'object' || typeof value === 'function') &&\n\t\ttypeof (/** @type {any} */ (value).then) === 'function'\n\t);\n}\n\n/** @returns {void} */\nexport function add_location(element, file, line, column, char) {\n\telement.__svelte_meta = {\n\t\tloc: { file, line, column, char }\n\t};\n}\n\nexport function run(fn) {\n\treturn fn();\n}\n\nexport function blank_object() {\n\treturn Object.create(null);\n}\n\n/**\n * @param {Function[]} fns\n * @returns {void}\n */\nexport function run_all(fns) {\n\tfns.forEach(run);\n}\n\n/**\n * @param {any} thing\n * @returns {thing is Function}\n */\nexport function is_function(thing) {\n\treturn typeof thing === 'function';\n}\n\n/** @returns {boolean} */\nexport function safe_not_equal(a, b) {\n\treturn a != a ? b == b : a !== b || (a && typeof a === 'object') || typeof a === 'function';\n}\n\nlet src_url_equal_anchor;\n\n/**\n * @param {string} element_src\n * @param {string} url\n * @returns {boolean}\n */\nexport function src_url_equal(element_src, url) {\n\tif (element_src === url) return true;\n\tif (!src_url_equal_anchor) {\n\t\tsrc_url_equal_anchor = document.createElement('a');\n\t}\n\t// This is actually faster than doing URL(..).href\n\tsrc_url_equal_anchor.href = url;\n\treturn element_src === src_url_equal_anchor.href;\n}\n\n/** @param {string} srcset */\nfunction split_srcset(srcset) {\n\treturn srcset.split(',').map((src) => src.trim().split(' ').filter(Boolean));\n}\n\n/**\n * @param {HTMLSourceElement | HTMLImageElement} element_srcset\n * @param {string | undefined | null} srcset\n * @returns {boolean}\n */\nexport function srcset_url_equal(element_srcset, srcset) {\n\tconst element_urls = split_srcset(element_srcset.srcset);\n\tconst urls = split_srcset(srcset || '');\n\n\treturn (\n\t\turls.length === element_urls.length &&\n\t\turls.every(\n\t\t\t([url, width], i) =>\n\t\t\t\twidth === element_urls[i][1] &&\n\t\t\t\t// We need to test both ways because Vite will create an a full URL with\n\t\t\t\t// `new URL(asset, import.meta.url).href` for the client when `base: './'`, and the\n\t\t\t\t// relative URLs inside srcset are not automatically resolved to absolute URLs by\n\t\t\t\t// browsers (in contrast to img.src). This means both SSR and DOM code could\n\t\t\t\t// contain relative or absolute URLs.\n\t\t\t\t(src_url_equal(element_urls[i][0], url) || src_url_equal(url, element_urls[i][0]))\n\t\t)\n\t);\n}\n\n/** @returns {boolean} */\nexport function not_equal(a, b) {\n\treturn a != a ? b == b : a !== b;\n}\n\n/** @returns {boolean} */\nexport function is_empty(obj) {\n\treturn Object.keys(obj).length === 0;\n}\n\n/** @returns {void} */\nexport function validate_store(store, name) {\n\tif (store != null && typeof store.subscribe !== 'function') {\n\t\tthrow new Error(`'${name}' is not a store with a 'subscribe' method`);\n\t}\n}\n\nexport function subscribe(store, ...callbacks) {\n\tif (store == null) {\n\t\tfor (const callback of callbacks) {\n\t\t\tcallback(undefined);\n\t\t}\n\t\treturn noop;\n\t}\n\tconst unsub = store.subscribe(...callbacks);\n\treturn unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\n\n/**\n * Get the current value from a store by subscribing and immediately unsubscribing.\n *\n * https://svelte.dev/docs/svelte-store#get\n * @template T\n * @param {import('../store/public.js').Readable<T>} store\n * @returns {T}\n */\nexport function get_store_value(store) {\n\tlet value;\n\tsubscribe(store, (_) => (value = _))();\n\treturn value;\n}\n\n/** @returns {void} */\nexport function component_subscribe(component, store, callback) {\n\tcomponent.$$.on_destroy.push(subscribe(store, callback));\n}\n\nexport function create_slot(definition, ctx, $$scope, fn) {\n\tif (definition) {\n\t\tconst slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n\t\treturn definition[0](slot_ctx);\n\t}\n}\n\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n\treturn definition[1] && fn ? assign($$scope.ctx.slice(), definition[1](fn(ctx))) : $$scope.ctx;\n}\n\nexport function get_slot_changes(definition, $$scope, dirty, fn) {\n\tif (definition[2] && fn) {\n\t\tconst lets = definition[2](fn(dirty));\n\t\tif ($$scope.dirty === undefined) {\n\t\t\treturn lets;\n\t\t}\n\t\tif (typeof lets === 'object') {\n\t\t\tconst merged = [];\n\t\t\tconst len = Math.max($$scope.dirty.length, lets.length);\n\t\t\tfor (let i = 0; i < len; i += 1) {\n\t\t\t\tmerged[i] = $$scope.dirty[i] | lets[i];\n\t\t\t}\n\t\t\treturn merged;\n\t\t}\n\t\treturn $$scope.dirty | lets;\n\t}\n\treturn $$scope.dirty;\n}\n\n/** @returns {void} */\nexport function update_slot_base(\n\tslot,\n\tslot_definition,\n\tctx,\n\t$$scope,\n\tslot_changes,\n\tget_slot_context_fn\n) {\n\tif (slot_changes) {\n\t\tconst slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n\t\tslot.p(slot_context, slot_changes);\n\t}\n}\n\n/** @returns {void} */\nexport function update_slot(\n\tslot,\n\tslot_definition,\n\tctx,\n\t$$scope,\n\tdirty,\n\tget_slot_changes_fn,\n\tget_slot_context_fn\n) {\n\tconst slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n\tupdate_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\n\n/** @returns {any[] | -1} */\nexport function get_all_dirty_from_scope($$scope) {\n\tif ($$scope.ctx.length > 32) {\n\t\tconst dirty = [];\n\t\tconst length = $$scope.ctx.length / 32;\n\t\tfor (let i = 0; i < length; i++) {\n\t\t\tdirty[i] = -1;\n\t\t}\n\t\treturn dirty;\n\t}\n\treturn -1;\n}\n\n/** @returns {{}} */\nexport function exclude_internal_props(props) {\n\tconst result = {};\n\tfor (const k in props) if (k[0] !== '$') result[k] = props[k];\n\treturn result;\n}\n\n/** @returns {{}} */\nexport function compute_rest_props(props, keys) {\n\tconst rest = {};\n\tkeys = new Set(keys);\n\tfor (const k in props) if (!keys.has(k) && k[0] !== '$') rest[k] = props[k];\n\treturn rest;\n}\n\n/** @returns {{}} */\nexport function compute_slots(slots) {\n\tconst result = {};\n\tfor (const key in slots) {\n\t\tresult[key] = true;\n\t}\n\treturn result;\n}\n\n/** @returns {(this: any, ...args: any[]) => void} */\nexport function once(fn) {\n\tlet ran = false;\n\treturn function (...args) {\n\t\tif (ran) return;\n\t\tran = true;\n\t\tfn.call(this, ...args);\n\t};\n}\n\nexport function null_to_empty(value) {\n\treturn value == null ? '' : value;\n}\n\nexport function set_store_value(store, ret, value) {\n\tstore.set(value);\n\treturn ret;\n}\n\nexport const has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\n\nexport function action_destroyer(action_result) {\n\treturn action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\n/** @param {number | string} value\n * @returns {[number, string]}\n */\nexport function split_css_unit(value) {\n\tconst split = typeof value === 'string' && value.match(/^\\s*(-?[\\d.]+)([^\\s]*)\\s*$/);\n\treturn split ? [parseFloat(split[1]), split[2] || 'px'] : [/** @type {number} */ (value), 'px'];\n}\n\nexport const contenteditable_truthy_values = ['', true, 1, 'true', 'contenteditable'];\n","import { custom_event } from './dom.js';\n\nexport let current_component;\n\n/** @returns {void} */\nexport function set_current_component(component) {\n\tcurrent_component = component;\n}\n\nexport function get_current_component() {\n\tif (!current_component) throw new Error('Function called outside component initialization');\n\treturn current_component;\n}\n\n/**\n * Schedules a callback to run immediately before the component is updated after any state change.\n *\n * The first time the callback runs will be before the initial `onMount`\n *\n * https://svelte.dev/docs/svelte#beforeupdate\n * @param {() => any} fn\n * @returns {void}\n */\nexport function beforeUpdate(fn) {\n\tget_current_component().$$.before_update.push(fn);\n}\n\n/**\n * The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.\n * It must be called during the component's initialisation (but doesn't need to live *inside* the component;\n * it can be called from an external module).\n *\n * If a function is returned _synchronously_ from `onMount`, it will be called when the component is unmounted.\n *\n * `onMount` does not run inside a [server-side component](https://svelte.dev/docs#run-time-server-side-component-api).\n *\n * https://svelte.dev/docs/svelte#onmount\n * @template T\n * @param {() => import('./private.js').NotFunction<T> | Promise<import('./private.js').NotFunction<T>> | (() => any)} fn\n * @returns {void}\n */\nexport function onMount(fn) {\n\tget_current_component().$$.on_mount.push(fn);\n}\n\n/**\n * Schedules a callback to run immediately after the component has been updated.\n *\n * The first time the callback runs will be after the initial `onMount`\n *\n * https://svelte.dev/docs/svelte#afterupdate\n * @param {() => any} fn\n * @returns {void}\n */\nexport function afterUpdate(fn) {\n\tget_current_component().$$.after_update.push(fn);\n}\n\n/**\n * Schedules a callback to run immediately before the component is unmounted.\n *\n * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the\n * only one that runs inside a server-side component.\n *\n * https://svelte.dev/docs/svelte#ondestroy\n * @param {() => any} fn\n * @returns {void}\n */\nexport function onDestroy(fn) {\n\tget_current_component().$$.on_destroy.push(fn);\n}\n\n/**\n * Creates an event dispatcher that can be used to dispatch [component events](https://svelte.dev/docs#template-syntax-component-directives-on-eventname).\n * Event dispatchers are functions that can take two arguments: `name` and `detail`.\n *\n * Component events created with `createEventDispatcher` create a\n * [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent).\n * These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture).\n * The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail)\n * property and can contain any type of data.\n *\n * The event dispatcher can be typed to narrow the allowed event names and the type of the `detail` argument:\n * ```ts\n * const dispatch = createEventDispatcher<{\n * loaded: never; // does not take a detail argument\n * change: string; // takes a detail argument of type string, which is required\n * optional: number | null; // takes an optional detail argument of type number\n * }>();\n * ```\n *\n * https://svelte.dev/docs/svelte#createeventdispatcher\n * @template {Record<string, any>} [EventMap=any]\n * @returns {import('./public.js').EventDispatcher<EventMap>}\n */\nexport function createEventDispatcher() {\n\tconst component = get_current_component();\n\treturn (type, detail, { cancelable = false } = {}) => {\n\t\tconst callbacks = component.$$.callbacks[type];\n\t\tif (callbacks) {\n\t\t\t// TODO are there situations where events could be dispatched\n\t\t\t// in a server (non-DOM) environment?\n\t\t\tconst event = custom_event(/** @type {string} */ (type), detail, { cancelable });\n\t\t\tcallbacks.slice().forEach((fn) => {\n\t\t\t\tfn.call(component, event);\n\t\t\t});\n\t\t\treturn !event.defaultPrevented;\n\t\t}\n\t\treturn true;\n\t};\n}\n\n/**\n * Associates an arbitrary `context` object with the current component and the specified `key`\n * and returns that object. The context is then available to children of the component\n * (including slotted content) with `getContext`.\n *\n * Like lifecycle functions, this must be called during component initialisation.\n *\n * https://svelte.dev/docs/svelte#setcontext\n * @template T\n * @param {any} key\n * @param {T} context\n * @returns {T}\n */\nexport function setContext(key, context) {\n\tget_current_component().$$.context.set(key, context);\n\treturn context;\n}\n\n/**\n * Retrieves the context that belongs to the closest parent component with the specified `key`.\n * Must be called during component initialisation.\n *\n * https://svelte.dev/docs/svelte#getcontext\n * @template T\n * @param {any} key\n * @returns {T}\n */\nexport function getContext(key) {\n\treturn get_current_component().$$.context.get(key);\n}\n\n/**\n * Retrieves the whole context map that belongs to the closest parent component.\n * Must be called during component initialisation. Useful, for example, if you\n * programmatically create a component and want to pass the existing context to it.\n *\n * https://svelte.dev/docs/svelte#getallcontexts\n * @template {Map<any, any>} [T=Map<any, any>]\n * @returns {T}\n */\nexport function getAllContexts() {\n\treturn get_current_component().$$.context;\n}\n\n/**\n * Checks whether a given `key` has been set in the context of a parent component.\n * Must be called during component initialisation.\n *\n * https://svelte.dev/docs/svelte#hascontext\n * @param {any} key\n * @returns {boolean}\n */\nexport function hasContext(key) {\n\treturn get_current_component().$$.context.has(key);\n}\n\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\n/**\n * @param component\n * @param event\n * @returns {void}\n */\nexport function bubble(component, event) {\n\tconst callbacks = component.$$.callbacks[event.type];\n\tif (callbacks) {\n\t\t// @ts-ignore\n\t\tcallbacks.slice().forEach((fn) => fn.call(this, event));\n\t}\n}\n","import { contenteditable_truthy_values, has_prop } from './utils.js';\n\nimport { ResizeObserverSingleton } from './ResizeObserverSingleton.js';\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\n\n/**\n * @returns {void}\n */\nexport function start_hydrating() {\n\tis_hydrating = true;\n}\n\n/**\n * @returns {void}\n */\nexport function end_hydrating() {\n\tis_hydrating = false;\n}\n\n/**\n * @param {number} low\n * @param {number} high\n * @param {(index: number) => number} key\n * @param {number} value\n * @returns {number}\n */\nfunction upper_bound(low, high, key, value) {\n\t// Return first index of value larger than input value in the range [low, high)\n\twhile (low < high) {\n\t\tconst mid = low + ((high - low) >> 1);\n\t\tif (key(mid) <= value) {\n\t\t\tlow = mid + 1;\n\t\t} else {\n\t\t\thigh = mid;\n\t\t}\n\t}\n\treturn low;\n}\n\n/**\n * @param {NodeEx} target\n * @returns {void}\n */\nfunction init_hydrate(target) {\n\tif (target.hydrate_init) return;\n\ttarget.hydrate_init = true;\n\t// We know that all children have claim_order values since the unclaimed have been detached if target is not <head>\n\n\tlet children = /** @type {ArrayLike<NodeEx2>} */ (target.childNodes);\n\t// If target is <head>, there may be children without claim_order\n\tif (target.nodeName === 'HEAD') {\n\t\tconst my_children = [];\n\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\tconst node = children[i];\n\t\t\tif (node.claim_order !== undefined) {\n\t\t\t\tmy_children.push(node);\n\t\t\t}\n\t\t}\n\t\tchildren = my_children;\n\t}\n\t/*\n\t * Reorder claimed children optimally.\n\t * We can reorder claimed children optimally by finding the longest subsequence of\n\t * nodes that are already claimed in order and only moving the rest. The longest\n\t * subsequence of nodes that are claimed in order can be found by\n\t * computing the longest increasing subsequence of .claim_order values.\n\t *\n\t * This algorithm is optimal in generating the least amount of reorder operations\n\t * possible.\n\t *\n\t * Proof:\n\t * We know that, given a set of reordering operations, the nodes that do not move\n\t * always form an increasing subsequence, since they do not move among each other\n\t * meaning that they must be already ordered among each other. Thus, the maximal\n\t * set of nodes that do not move form a longest increasing subsequence.\n\t */\n\t// Compute longest increasing subsequence\n\t// m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n\tconst m = new Int32Array(children.length + 1);\n\t// Predecessor indices + 1\n\tconst p = new Int32Array(children.length);\n\tm[0] = -1;\n\tlet longest = 0;\n\tfor (let i = 0; i < children.length; i++) {\n\t\tconst current = children[i].claim_order;\n\t\t// Find the largest subsequence length such that it ends in a value less than our current value\n\t\t// upper_bound returns first greater value, so we subtract one\n\t\t// with fast path for when we are on the current longest subsequence\n\t\tconst seq_len =\n\t\t\t(longest > 0 && children[m[longest]].claim_order <= current\n\t\t\t\t? longest + 1\n\t\t\t\t: upper_bound(1, longest, (idx) => children[m[idx]].claim_order, current)) - 1;\n\t\tp[i] = m[seq_len] + 1;\n\t\tconst new_len = seq_len + 1;\n\t\t// We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n\t\tm[new_len] = i;\n\t\tlongest = Math.max(new_len, longest);\n\t}\n\t// The longest increasing subsequence of nodes (initially reversed)\n\n\t/**\n\t * @type {NodeEx2[]}\n\t */\n\tconst lis = [];\n\t// The rest of the nodes, nodes that will be moved\n\n\t/**\n\t * @type {NodeEx2[]}\n\t */\n\tconst to_move = [];\n\tlet last = children.length - 1;\n\tfor (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n\t\tlis.push(children[cur - 1]);\n\t\tfor (; last >= cur; last--) {\n\t\t\tto_move.push(children[last]);\n\t\t}\n\t\tlast--;\n\t}\n\tfor (; last >= 0; last--) {\n\t\tto_move.push(children[last]);\n\t}\n\tlis.reverse();\n\t// We sort the nodes being moved to guarantee that their insertion order matches the claim order\n\tto_move.sort((a, b) => a.claim_order - b.claim_order);\n\t// Finally, we move the nodes\n\tfor (let i = 0, j = 0; i < to_move.length; i++) {\n\t\twhile (j < lis.length && to_move[i].claim_order >= lis[j].claim_order) {\n\t\t\tj++;\n\t\t}\n\t\tconst anchor = j < lis.length ? lis[j] : null;\n\t\ttarget.insertBefore(to_move[i], anchor);\n\t}\n}\n\n/**\n * @param {Node} target\n * @param {Node} node\n * @returns {void}\n */\nexport function append(target, node) {\n\ttarget.appendChild(node);\n}\n\n/**\n * @param {Node} target\n * @param {string} style_sheet_id\n * @param {string} styles\n * @returns {void}\n */\nexport function append_styles(target, style_sheet_id, styles) {\n\tconst append_styles_to = get_root_for_style(target);\n\tif (!append_styles_to.getElementById(style_sheet_id)) {\n\t\tconst style = element('style');\n\t\tstyle.id = style_sheet_id;\n\t\tstyle.textContent = styles;\n\t\tappend_stylesheet(append_styles_to, style);\n\t}\n}\n\n/**\n * @param {Node} node\n * @returns {ShadowRoot | Document}\n */\nexport function get_root_for_style(node) {\n\tif (!node) return document;\n\tconst root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n\tif (root && /** @type {ShadowRoot} */ (root).host) {\n\t\treturn /** @type {ShadowRoot} */ (root);\n\t}\n\treturn node.ownerDocument;\n}\n\n/**\n * @param {Node} node\n * @returns {CSSStyleSheet}\n */\nexport function append_empty_stylesheet(node) {\n\tconst style_element = element('style');\n\t// For transitions to work without 'style-src: unsafe-inline' Content Security Policy,\n\t// these empty tags need to be allowed with a hash as a workaround until we move to the Web Animations API.\n\t// Using the hash for the empty string (for an empty tag) works in all browsers except Safari.\n\t// So as a workaround for the workaround, when we append empty style tags we set their content to /* empty */.\n\t// The hash 'sha256-9OlNO0DNEeaVzHL4RZwCLsBHA8WBQ8toBp/4F5XV2nc=' will then work even in Safari.\n\tstyle_element.textContent = '/* empty */';\n\tappend_stylesheet(get_root_for_style(node), style_element);\n\treturn style_element.sheet;\n}\n\n/**\n * @param {ShadowRoot | Document} node\n * @param {HTMLStyleElement} style\n * @returns {CSSStyleSheet}\n */\nfunction append_stylesheet(node, style) {\n\tappend(/** @type {Document} */ (node).head || node, style);\n\treturn style.sheet;\n}\n\n/**\n * @param {NodeEx} target\n * @param {NodeEx} node\n * @returns {void}\n */\nexport function append_hydration(target, node) {\n\tif (is_hydrating) {\n\t\tinit_hydrate(target);\n\t\tif (\n\t\t\ttarget.actual_end_child === undefined ||\n\t\t\t(target.actual_end_child !== null && target.actual_end_child.parentNode !== target)\n\t\t) {\n\t\t\ttarget.actual_end_child = target.firstChild;\n\t\t}\n\t\t// Skip nodes of undefined ordering\n\t\twhile (target.actual_end_child !== null && target.actual_end_child.claim_order === undefined) {\n\t\t\ttarget.actual_end_child = target.actual_end_child.nextSibling;\n\t\t}\n\t\tif (node !== target.actual_end_child) {\n\t\t\t// We only insert if the ordering of this node should be modified or the parent node is not target\n\t\t\tif (node.claim_order !== undefined || node.parentNode !== target) {\n\t\t\t\ttarget.insertBefore(node, target.actual_end_child);\n\t\t\t}\n\t\t} else {\n\t\t\ttarget.actual_end_child = node.nextSibling;\n\t\t}\n\t} else if (node.parentNode !== target || node.nextSibling !== null) {\n\t\ttarget.appendChild(node);\n\t}\n}\n\n/**\n * @param {Node} target\n * @param {Node} node\n * @param {Node} [anchor]\n * @returns {void}\n */\nexport function insert(target, node, anchor) {\n\ttarget.insertBefore(node, anchor || null);\n}\n\n/**\n * @param {NodeEx} target\n * @param {NodeEx} node\n * @param {NodeEx} [anchor]\n * @returns {void}\n */\nexport function insert_hydration(target, node, anchor) {\n\tif (is_hydrating && !anchor) {\n\t\tappend_hydration(target, node);\n\t} else if (node.parentNode !== target || node.nextSibling != anchor) {\n\t\ttarget.insertBefore(node, anchor || null);\n\t}\n}\n\n/**\n * @param {Node} node\n * @returns {void}\n */\nexport function detach(node) {\n\tif (node.parentNode) {\n\t\tnode.parentNode.removeChild(node);\n\t}\n}\n\n/**\n * @returns {void} */\nexport function destroy_each(iterations, detaching) {\n\tfor (let i = 0; i < iterations.length; i += 1) {\n\t\tif (iterations[i]) iterations[i].d(detaching);\n\t}\n}\n\n/**\n * @template {keyof HTMLElementTagNameMap} K\n * @param {K} name\n * @returns {HTMLElementTagNameMap[K]}\n */\nexport function element(name) {\n\treturn document.createElement(name);\n}\n\n/**\n * @template {keyof HTMLElementTagNameMap} K\n * @param {K} name\n * @param {string} is\n * @returns {HTMLElementTagNameMap[K]}\n */\nexport function element_is(name, is) {\n\treturn document.createElement(name, { is });\n}\n\n/**\n * @template T\n * @template {keyof T} K\n * @param {T} obj\n * @param {K[]} exclude\n * @returns {Pick<T, Exclude<keyof T, K>>}\n */\nexport function object_without_properties(obj, exclude) {\n\tconst target = /** @type {Pick<T, Exclude<keyof T, K>>} */ ({});\n\tfor (const k in obj) {\n\t\tif (\n\t\t\thas_prop(obj, k) &&\n\t\t\t// @ts-ignore\n\t\t\texclude.indexOf(k) === -1\n\t\t) {\n\t\t\t// @ts-ignore\n\t\t\ttarget[k] = obj[k];\n\t\t}\n\t}\n\treturn target;\n}\n\n/**\n * @template {keyof SVGElementTagNameMap} K\n * @param {K} name\n * @returns {SVGElement}\n */\nexport function svg_element(name) {\n\treturn document.createElementNS('http://www.w3.org/2000/svg', name);\n}\n\n/**\n * @param {string} data\n * @returns {Text}\n */\nexport function text(data) {\n\treturn document.createTextNode(data);\n}\n\n/**\n * @returns {Text} */\nexport function space() {\n\treturn text(' ');\n}\n\n/**\n * @returns {Text} */\nexport function empty() {\n\treturn text('');\n}\n\n/**\n * @param {string} content\n * @returns {Comment}\n */\nexport function comment(content) {\n\treturn document.createComment(content);\n}\n\n/**\n * @param {EventTarget} node\n * @param {string} event\n * @param {EventListenerOrEventListenerObject} handler\n * @param {boolean | AddEventListenerOptions | EventListenerOptions} [options]\n * @returns {() => void}\n */\nexport function listen(node, event, handler, options) {\n\tnode.addEventListener(event, handler, options);\n\treturn () => node.removeEventListener(event, handler, options);\n}\n\n/**\n * @returns {(event: any) => any} */\nexport function prevent_default(fn) {\n\treturn function (event) {\n\t\tevent.preventDefault();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => any} */\nexport function stop_propagation(fn) {\n\treturn function (event) {\n\t\tevent.stopPropagation();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => any} */\nexport function stop_immediate_propagation(fn) {\n\treturn function (event) {\n\t\tevent.stopImmediatePropagation();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => void} */\nexport function self(fn) {\n\treturn function (event) {\n\t\t// @ts-ignore\n\t\tif (event.target === this) fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => void} */\nexport function trusted(fn) {\n\treturn function (event) {\n\t\t// @ts-ignore\n\t\tif (event.isTrusted) fn.call(this, event);\n\t};\n}\n\n/**\n * @param {Element} node\n * @param {string} attribute\n * @param {string} [value]\n * @returns {void}\n */\nexport function attr(node, attribute, value) {\n\tif (value == null) node.removeAttribute(attribute);\n\telse if (node.getAttribute(attribute) !== value) node.setAttribute(attribute, value);\n}\n/**\n * List of attributes that should always be set through the attr method,\n * because updating them through the property setter doesn't work reliably.\n * In the example of `width`/`height`, the problem is that the setter only\n * accepts numeric values, but the attribute can also be set to a string like `50%`.\n * If this list becomes too big, rethink this approach.\n */\nconst always_set_through_set_attribute = ['width', 'height'];\n\n/**\n * @param {Element & ElementCSSInlineStyle} node\n * @param {{ [x: string]: string }} attributes\n * @returns {void}\n */\nexport function set_attributes(node, attributes) {\n\t// @ts-ignore\n\tconst descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n\tfor (const key in attributes) {\n\t\tif (attributes[key] == null) {\n\t\t\tnode.removeAttribute(key);\n\t\t} else if (key === 'style') {\n\t\t\tnode.style.cssText = attributes[key];\n\t\t} else if (key === '__value') {\n\t\t\t/** @type {any} */ (node).value = node[key] = attributes[key];\n\t\t} else if (\n\t\t\tdescriptors[key] &&\n\t\t\tdescriptors[key].set &&\n\t\t\talways_set_through_set_attribute.indexOf(key) === -1\n\t\t) {\n\t\t\tnode[key] = attributes[key];\n\t\t} else {\n\t\t\tattr(node, key, attributes[key]);\n\t\t}\n\t}\n}\n\n/**\n * @param {Element & ElementCSSInlineStyle} node\n * @param {{ [x: string]: string }} attributes\n * @returns {void}\n */\nexport function set_svg_attributes(node, attributes) {\n\tfor (const key in attributes) {\n\t\tattr(node, key, attributes[key]);\n\t}\n}\n\n/**\n * @param {Record<string, unknown>} data_map\n * @returns {void}\n */\nexport function set_custom_element_data_map(node, data_map) {\n\tObject.keys(data_map).forEach((key) => {\n\t\tset_custom_element_data(node, key, data_map[key]);\n\t});\n}\n\n/**\n * @returns {void} */\nexport function set_custom_element_data(node, prop, value) {\n\tconst lower = prop.toLowerCase(); // for backwards compatibility with existing behavior we do lowercase first\n\tif (lower in node) {\n\t\tnode[lower] = typeof node[lower] === 'boolean' && value === '' ? true : value;\n\t} else if (prop in node) {\n\t\tnode[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n\t} else {\n\t\tattr(node, prop, value);\n\t}\n}\n\n/**\n * @param {string} tag\n */\nexport function set_dynamic_element_data(tag) {\n\treturn /-/.test(tag) ? set_custom_element_data_map : set_attributes;\n}\n\n/**\n * @returns {void}\n */\nexport function xlink_attr(node, attribute, value) {\n\tnode.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\n\n/**\n * @param {HTMLElement} node\n * @returns {string}\n */\nexport function get_svelte_dataset(node) {\n\treturn node.dataset.svelteH;\n}\n\n/**\n * @returns {unknown[]} */\nexport function get_binding_group_value(group, __value, checked) {\n\tconst value = new Set();\n\tfor (let i = 0; i < group.length; i += 1) {\n\t\tif (group[i].checked) value.add(group[i].__value);\n\t}\n\tif (!checked) {\n\t\tvalue.delete(__value);\n\t}\n\treturn Array.from(value);\n}\n\n/**\n * @param {HTMLInputElement[]} group\n * @returns {{ p(...inputs: HTMLInputElement[]): void; r(): void; }}\n */\nexport function init_binding_group(group) {\n\t/**\n\t * @type {HTMLInputElement[]} */\n\tlet _inputs;\n\treturn {\n\t\t/* push */ p(...inputs) {\n\t\t\t_inputs = inputs;\n\t\t\t_inputs.forEach((input) => group.push(input));\n\t\t},\n\t\t/* remove */ r() {\n\t\t\t_inputs.forEach((input) => group.splice(group.indexOf(input), 1));\n\t\t}\n\t};\n}\n\n/**\n * @param {number[]} indexes\n * @returns {{ u(new_indexes: number[]): void; p(...inputs: HTMLInputElement[]): void; r: () => void; }}\n */\nexport function init_binding_group_dynamic(group, indexes) {\n\t/**\n\t * @type {HTMLInputElement[]} */\n\tlet _group = get_binding_group(group);\n\n\t/**\n\t * @type {HTMLInputElement[]} */\n\tlet _inputs;\n\n\tfunction get_binding_group(group) {\n\t\tfor (let i = 0; i < indexes.length; i++) {\n\t\t\tgroup = group[indexes[i]] = group[indexes[i]] || [];\n\t\t}\n\t\treturn group;\n\t}\n\n\t/**\n\t * @returns {void} */\n\tfunction push() {\n\t\t_inputs.forEach((input) => _group.push(input));\n\t}\n\n\t/**\n\t * @returns {void} */\n\tfunction remove() {\n\t\t_inputs.forEach((input) => _group.splice(_group.indexOf(input), 1));\n\t}\n\treturn {\n\t\t/* update */ u(new_indexes) {\n\t\t\tindexes = new_indexes;\n\t\t\tconst new_group = get_binding_group(group);\n\t\t\tif (new_group !== _group) {\n\t\t\t\tremove();\n\t\t\t\t_group = new_group;\n\t\t\t\tpush();\n\t\t\t}\n\t\t},\n\t\t/* push */ p(...inputs) {\n\t\t\t_inputs = inputs;\n\t\t\tpush();\n\t\t},\n\t\t/* remove */ r: remove\n\t};\n}\n\n/** @returns {number} */\nexport function to_number(value) {\n\treturn value === '' ? null : +value;\n}\n\n/** @returns {any[]} */\nexport function time_ranges_to_array(ranges) {\n\tconst array = [];\n\tfor (let i = 0; i < ranges.length; i += 1) {\n\t\tarray.push({ start: ranges.start(i), end: ranges.end(i) });\n\t}\n\treturn array;\n}\n\n/**\n * @param {Element} element\n * @returns {ChildNode[]}\n */\nexport function children(element) {\n\treturn Array.from(element.childNodes);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @returns {void}\n */\nfunction init_claim_info(nodes) {\n\tif (nodes.claim_info === undefined) {\n\t\tnodes.claim_info = { last_index: 0, total_claimed: 0 };\n\t}\n}\n\n/**\n * @template {ChildNodeEx} R\n * @param {ChildNodeArray} nodes\n * @param {(node: ChildNodeEx) => node is R} predicate\n * @param {(node: ChildNodeEx) => ChildNodeEx | undefined} process_node\n * @param {() => R} create_node\n * @param {boolean} dont_update_last_index\n * @returns {R}\n */\nfunction claim_node(nodes, predicate, process_node, create_node, dont_update_last_index = false) {\n\t// Try to find nodes in an order such that we lengthen the longest increasing subsequence\n\tinit_claim_info(nodes);\n\tconst result_node = (() => {\n\t\t// We first try to find an element after the previous one\n\t\tfor (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n\t\t\tconst node = nodes[i];\n\t\t\tif (predicate(node)) {\n\t\t\t\tconst replacement = process_node(node);\n\t\t\t\tif (replacement === undefined) {\n\t\t\t\t\tnodes.splice(i, 1);\n\t\t\t\t} else {\n\t\t\t\t\tnodes[i] = replacement;\n\t\t\t\t}\n\t\t\t\tif (!dont_update_last_index) {\n\t\t\t\t\tnodes.claim_info.last_index = i;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\t// Otherwise, we try to find one before\n\t\t// We iterate in reverse so that we don't go too far back\n\t\tfor (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n\t\t\tconst node = nodes[i];\n\t\t\tif (predicate(node)) {\n\t\t\t\tconst replacement = process_node(node);\n\t\t\t\tif (replacement === undefined) {\n\t\t\t\t\tnodes.splice(i, 1);\n\t\t\t\t} else {\n\t\t\t\t\tnodes[i] = replacement;\n\t\t\t\t}\n\t\t\t\tif (!dont_update_last_index) {\n\t\t\t\t\tnodes.claim_info.last_index = i;\n\t\t\t\t} else if (replacement === undefined) {\n\t\t\t\t\t// Since we spliced before the last_index, we decrease it\n\t\t\t\t\tnodes.claim_info.last_index--;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\t// If we can't find any matching node, we create a new one\n\t\treturn create_node();\n\t})();\n\tresult_node.claim_order = nodes.claim_info.total_claimed;\n\tnodes.claim_info.total_claimed += 1;\n\treturn result_node;\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @param {string} name\n * @param {{ [key: string]: boolean }} attributes\n * @param {(name: string) => Element | SVGElement} create_element\n * @returns {Element | SVGElement}\n */\nfunction claim_element_base(nodes, name, attributes, create_element) {\n\treturn claim_node(\n\t\tnodes,\n\t\t/** @returns {node is Element | SVGElement} */\n\t\t(node) => node.nodeName === name,\n\t\t/** @param {Element} node */\n\t\t(node) => {\n\t\t\tconst remove = [];\n\t\t\tfor (let j = 0; j < node.attributes.length; j++) {\n\t\t\t\tconst attribute = node.attributes[j];\n\t\t\t\tif (!attributes[attribute.name]) {\n\t\t\t\t\tremove.push(attribute.name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tremove.forEach((v) => node.removeAttribute(v));\n\t\t\treturn undefined;\n\t\t},\n\t\t() => create_element(name)\n\t);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @param {string} name\n * @param {{ [key: string]: boolean }} attributes\n * @returns {Element | SVGElement}\n */\nexport function claim_element(nodes, name, attributes) {\n\treturn claim_element_base(nodes, name, attributes, element);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @param {string} name\n * @param {{ [key: string]: boolean }} attributes\n * @returns {Element | SVGElement}\n */\nexport function claim_svg_element(nodes, name, attributes) {\n\treturn claim_element_base(nodes, name, attributes, svg_element);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @returns {Text}\n */\nexport function claim_text(nodes, data) {\n\treturn claim_node(\n\t\tnodes,\n\t\t/** @returns {node is Text} */\n\t\t(node) => node.nodeType === 3,\n\t\t/** @param {Text} node */\n\t\t(node) => {\n\t\t\tconst data_str = '' + data;\n\t\t\tif (node.data.startsWith(data_str)) {\n\t\t\t\tif (node.data.length !== data_str.length) {\n\t\t\t\t\treturn node.splitText(data_str.length);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnode.data = data_str;\n\t\t\t}\n\t\t},\n\t\t() => text(data),\n\t\ttrue // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n\t);\n}\n\n/**\n * @returns {Text} */\nexport function claim_space(nodes) {\n\treturn claim_text(nodes, ' ');\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @returns {Comment}\n */\nexport function claim_comment(nodes, data) {\n\treturn claim_node(\n\t\tnodes,\n\t\t/** @returns {node is Comment} */\n\t\t(node) => node.nodeType === 8,\n\t\t/** @param {Comment} node */\n\t\t(node) => {\n\t\t\tnode.data = '' + data;\n\t\t\treturn undefined;\n\t\t},\n\t\t() => comment(data),\n\t\ttrue\n\t);\n}\n\nfunction get_comment_idx(nodes, text, start) {\n\tfor (let i = start; i < nodes.length; i += 1) {\n\t\tconst node = nodes[i];\n\t\tif (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n}\n\n/**\n * @param {boolean} is_svg\n * @returns {HtmlTagHydration}\n */\nexport function claim_html_tag(nodes, is_svg) {\n\t// find html opening tag\n\tconst start_index = get_comment_idx(nodes, 'HTML_TAG_START', 0);\n\tconst end_index = get_comment_idx(nodes, 'HTML_TAG_END', start_index + 1);\n\tif (start_index === -1 || end_index === -1) {\n\t\treturn new HtmlTagHydration(is_svg);\n\t}\n\n\tinit_claim_info(nodes);\n\tconst html_tag_nodes = nodes.splice(start_index, end_index - start_index + 1);\n\tdetach(html_tag_nodes[0]);\n\tdetach(html_tag_nodes[html_tag_nodes.length - 1]);\n\tconst claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n\tif (claimed_nodes.length === 0) {\n\t\treturn new HtmlTagHydration(is_svg);\n\t}\n\tfor (const n of claimed_nodes) {\n\t\tn.claim_order = nodes.claim_info.total_claimed;\n\t\tnodes.claim_info.total_claimed += 1;\n\t}\n\treturn new HtmlTagHydration(is_svg, claimed_nodes);\n}\n\n/**\n * @param {Text} text\n * @param {unknown} data\n * @returns {void}\n */\nexport function set_data(text, data) {\n\tdata = '' + data;\n\tif (text.data === data) return;\n\ttext.data = /** @type {string} */ (data);\n}\n\n/**\n * @param {Text} text\n * @param {unknown} data\n * @returns {void}\n */\nexport function set_data_contenteditable(text, data) {\n\tdata = '' + data;\n\tif (text.wholeText === data) return;\n\ttext.data = /** @type {string} */ (data);\n}\n\n/**\n * @param {Text} text\n * @param {unknown} data\n * @param {string} attr_value\n * @returns {void}\n */\nexport function set_data_maybe_contenteditable(text, data, attr_value) {\n\tif (~contenteditable_truthy_values.indexOf(attr_value)) {\n\t\tset_data_contenteditable(text, data);\n\t} else {\n\t\tset_data(text, data);\n\t}\n}\n\n/**\n * @returns {void} */\nexport function set_input_value(input, value) {\n\tinput.value = value == null ? '' : value;\n}\n\n/**\n * @returns {void} */\nexport function set_input_type(input, type) {\n\ttry {\n\t\tinput.type = type;\n\t} catch (e) {\n\t\t// do nothing\n\t}\n}\n\n/**\n * @returns {void} */\nexport function set_style(node, key, value, important) {\n\tif (value == null) {\n\t\tnode.style.removeProperty(key);\n\t} else {\n\t\tnode.style.setProperty(key, value, important ? 'important' : '');\n\t}\n}\n\n/**\n * @returns {void} */\nexport function select_option(select, value, mounting) {\n\tfor (let i = 0; i < select.options.length; i += 1) {\n\t\tconst option = select.options[i];\n\t\tif (option.__value === value) {\n\t\t\toption.selected = true;\n\t\t\treturn;\n\t\t}\n\t}\n\tif (!mounting || value !== undefined) {\n\t\tselect.selectedIndex = -1; // no option should be selected\n\t}\n}\n\n/**\n * @returns {void} */\nexport function select_options(select, value) {\n\tfor (let i = 0; i < select.options.length; i += 1) {\n\t\tconst option = select.options[i];\n\t\toption.selected = ~value.indexOf(option.__value);\n\t}\n}\n\nexport function select_value(select) {\n\tconst selected_option = select.querySelector(':checked');\n\treturn selected_option && selected_option.__value;\n}\n\nexport function select_multiple_value(select) {\n\treturn [].map.call(select.querySelectorAll(':checked'), (option) => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\n\n/**\n * @type {boolean} */\nlet crossorigin;\n\n/**\n * @returns {boolean} */\nexport function is_crossorigin() {\n\tif (crossorigin === undefined) {\n\t\tcrossorigin = false;\n\t\ttry {\n\t\t\tif (typeof window !== 'undefined' && window.parent) {\n\t\t\t\tvoid window.parent.document;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tcrossorigin = true;\n\t\t}\n\t}\n\treturn crossorigin;\n}\n\n/**\n * @param {HTMLElement} node\n * @param {() => void} fn\n * @returns {() => void}\n */\nexport function add_iframe_resize_listener(node, fn) {\n\tconst computed_style = getComputedStyle(node);\n\tif (computed_style.position === 'static') {\n\t\tnode.style.position = 'relative';\n\t}\n\tconst iframe = element('iframe');\n\tiframe.setAttribute(\n\t\t'style',\n\t\t'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n\t\t\t'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;'\n\t);\n\tiframe.setAttribute('aria-hidden', 'true');\n\tiframe.tabIndex = -1;\n\tconst crossorigin = is_crossorigin();\n\n\t/**\n\t * @type {() => void}\n\t */\n\tlet unsubscribe;\n\tif (crossorigin) {\n\t\tiframe.src = \"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}</script>\";\n\t\tunsubscribe = listen(\n\t\t\twindow,\n\t\t\t'message',\n\t\t\t/** @param {MessageEvent} event */ (event) => {\n\t\t\t\tif (event.source === iframe.contentWindow) fn();\n\t\t\t}\n\t\t);\n\t} else {\n\t\tiframe.src = 'about:blank';\n\t\tiframe.onload = () => {\n\t\t\tunsubscribe = listen(iframe.contentWindow, 'resize', fn);\n\t\t\t// make sure an initial resize event is fired _after_ the iframe is loaded (which is asynchronous)\n\t\t\t// see https://github.com/sveltejs/svelte/issues/4233\n\t\t\tfn();\n\t\t};\n\t}\n\tappend(node, iframe);\n\treturn () => {\n\t\tif (crossorigin) {\n\t\t\tunsubscribe();\n\t\t} else if (unsubscribe && iframe.contentWindow) {\n\t\t\tunsubscribe();\n\t\t}\n\t\tdetach(iframe);\n\t};\n}\nexport const resize_observer_content_box = /* @__PURE__ */ new ResizeObserverSingleton({\n\tbox: 'content-box'\n});\nexport const resize_observer_border_box = /* @__PURE__ */ new ResizeObserverSingleton({\n\tbox: 'border-box'\n});\nexport const resize_observer_device_pixel_content_box = /* @__PURE__ */ new ResizeObserverSingleton(\n\t{ box: 'device-pixel-content-box' }\n);\nexport { ResizeObserverSingleton };\n\n/**\n * @returns {void} */\nexport function toggle_class(element, name, toggle) {\n\t// The `!!` is required because an `undefined` flag means flipping the current state.\n\telement.classList.toggle(name, !!toggle);\n}\n\n/**\n * @template T\n * @param {string} type\n * @param {T} [detail]\n * @param {{ bubbles?: boolean, cancelable?: boolean }} [options]\n * @returns {CustomEvent<T>}\n */\nexport function custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {\n\treturn new CustomEvent(type, { detail, bubbles, cancelable });\n}\n\n/**\n * @param {string} selector\n * @param {HTMLElement} parent\n * @returns {ChildNodeArray}\n */\nexport function query_selector_all(selector, parent = document.body) {\n\treturn Array.from(parent.querySelectorAll(selector));\n}\n\n/**\n * @param {string} nodeId\n * @param {HTMLElement} head\n * @returns {any[]}\n */\nexport function head_selector(nodeId, head) {\n\tconst result = [];\n\tlet started = 0;\n\tfor (const node of head.childNodes) {\n\t\tif (node.nodeType === 8 /* comment node */) {\n\t\t\tconst comment = node.textContent.trim();\n\t\t\tif (comment === `HEAD_${nodeId}_END`) {\n\t\t\t\tstarted -= 1;\n\t\t\t\tresult.push(node);\n\t\t\t} else if (comment === `HEAD_${nodeId}_START`) {\n\t\t\t\tstarted += 1;\n\t\t\t\tresult.push(node);\n\t\t\t}\n\t\t} else if (started > 0) {\n\t\t\tresult.push(node);\n\t\t}\n\t}\n\treturn result;\n}\n/** */\nexport class HtmlTag {\n\t/**\n\t * @private\n\t * @default false\n\t */\n\tis_svg = false;\n\t/** parent for creating node */\n\te = undefined;\n\t/** html tag nodes */\n\tn = undefined;\n\t/** target */\n\tt = undefined;\n\t/** anchor */\n\ta = undefined;\n\tconstructor(is_svg = false) {\n\t\tthis.is_svg = is_svg;\n\t\tthis.e = this.n = null;\n\t}\n\n\t/**\n\t * @param {string} html\n\t * @returns {void}\n\t */\n\tc(html) {\n\t\tthis.h(html);\n\t}\n\n\t/**\n\t * @param {string} html\n\t * @param {HTMLElement | SVGElement} target\n\t * @param {HTMLElement | SVGElement} anchor\n\t * @returns {void}\n\t */\n\tm(html, target, anchor = null) {\n\t\tif (!this.e) {\n\t\t\tif (this.is_svg)\n\t\t\t\tthis.e = svg_element(/** @type {keyof SVGElementTagNameMap} */ (target.nodeName));\n\t\t\t/** #7364 target for <template> may be provided as #document-fragment(11) */ else\n\t\t\t\tthis.e = element(\n\t\t\t\t\t/** @type {keyof HTMLElementTagNameMap} */ (\n\t\t\t\t\t\ttarget.nodeType === 11 ? 'TEMPLATE' : target.nodeName\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tthis.t =\n\t\t\t\ttarget.tagName !== 'TEMPLATE'\n\t\t\t\t\t? target\n\t\t\t\t\t: /** @type {HTMLTemplateElement} */ (target).content;\n\t\t\tthis.c(html);\n\t\t}\n\t\tthis.i(anchor);\n\t}\n\n\t/**\n\t * @param {string} html\n\t * @returns {void}\n\t */\n\th(html) {\n\t\tthis.e.innerHTML = html;\n\t\tthis.n = Array.from(\n\t\t\tthis.e.nodeName === 'TEMPLATE' ? this.e.content.childNodes : this.e.childNodes\n\t\t);\n\t}\n\n\t/**\n\t * @returns {void} */\n\ti(anchor) {\n\t\tfor (let i = 0; i < this.n.length; i += 1) {\n\t\t\tinsert(this.t, this.n[i], anchor);\n\t\t}\n\t}\n\n\t/**\n\t * @param {string} html\n\t * @returns {void}\n\t */\n\tp(html) {\n\t\tthis.d();\n\t\tthis.h(html);\n\t\tthis.i(this.a);\n\t}\n\n\t/**\n\t * @returns {void} */\n\td() {\n\t\tthis.n.forEach(detach);\n\t}\n}\n\nexport class HtmlTagHydration extends HtmlTag {\n\t/** @type {Element[]} hydration claimed nodes */\n\tl = undefined;\n\n\tconstructor(is_svg = false, claimed_nodes) {\n\t\tsuper(is_svg);\n\t\tthis.e = this.n = null;\n\t\tthis.l = claimed_nodes;\n\t}\n\n\t/**\n\t * @param {string} html\n\t * @returns {void}\n\t */\n\tc(html) {\n\t\tif (this.l) {\n\t\t\tthis.n = this.l;\n\t\t} else {\n\t\t\tsuper.c(html);\n\t\t}\n\t}\n\n\t/**\n\t * @returns {void} */\n\ti(anchor) {\n\t\tfor (let i = 0; i < this.n.length; i += 1) {\n\t\t\tinsert_hydration(this.t, this.n[i], anchor);\n\t\t}\n\t}\n}\n\n/**\n * @param {NamedNodeMap} attributes\n * @returns {{}}\n */\nexport function attribute_to_object(attributes) {\n\tconst result = {};\n\tfor (const attribute of attributes) {\n\t\tresult[attribute.name] = attribute.value;\n\t}\n\treturn result;\n}\n\nconst escaped = {\n\t'\"': '"',\n\t'&': '&',\n\t'<': '<'\n};\n\nconst regex_attribute_characters_to_escape = /[\"&<]/g;\n\n/**\n * Note that the attribute itself should be surrounded in double quotes\n * @param {any} attribute\n */\nfunction escape_attribute(attribute) {\n\treturn String(attribute).replace(regex_attribute_characters_to_escape, (match) => escaped[match]);\n}\n\n/**\n * @param {Record<string, string>} attributes\n */\nexport function stringify_spread(attributes) {\n\tlet str = ' ';\n\tfor (const key in attributes) {\n\t\tif (attributes[key] != null) {\n\t\t\tstr += `${key}=\"${escape_attribute(attributes[key])}\" `;\n\t\t}\n\t}\n\n\treturn str;\n}\n\n/**\n * @param {HTMLElement} element\n * @returns {{}}\n */\nexport function get_custom_elements_slots(element) {\n\tconst result = {};\n\telement.childNodes.forEach(\n\t\t/** @param {Element} node */ (node) => {\n\t\t\tresult[node.slot || 'default'] = true;\n\t\t}\n\t);\n\treturn result;\n}\n\nexport function construct_svelte_component(component, props) {\n\treturn new component(props);\n}\n\n/**\n * @typedef {Node & {\n * \tclaim_order?: number;\n * \thydrate_init?: true;\n * \tactual_end_child?: NodeEx;\n * \tchildNodes: NodeListOf<NodeEx>;\n * }} NodeEx\n */\n\n/** @typedef {ChildNode & NodeEx} ChildNodeEx */\n\n/** @typedef {NodeEx & { claim_order: number }} NodeEx2 */\n\n/**\n * @typedef {ChildNodeEx[] & {\n * \tclaim_info?: {\n * \t\tlast_index: number;\n * \t\ttotal_claimed: number;\n * \t};\n * }} ChildNodeArray\n */\n","import { run_all } from './utils.js';\nimport { current_component, set_current_component } from './lifecycle.js';\n\nexport const dirty_components = [];\nexport const intros = { enabled: false };\nexport const binding_callbacks = [];\n\nlet render_callbacks = [];\n\nconst flush_callbacks = [];\n\nconst resolved_promise = /* @__PURE__ */ Promise.resolve();\n\nlet update_scheduled = false;\n\n/** @returns {void} */\nexport function schedule_update() {\n\tif (!update_scheduled) {\n\t\tupdate_scheduled = true;\n\t\tresolved_promise.then(flush);\n\t}\n}\n\n/** @returns {Promise<void>} */\nexport function tick() {\n\tschedule_update();\n\treturn resolved_promise;\n}\n\n/** @returns {void} */\nexport function add_render_callback(fn) {\n\trender_callbacks.push(fn);\n}\n\n/** @returns {void} */\nexport function add_flush_callback(fn) {\n\tflush_callbacks.push(fn);\n}\n\n// flush() calls callbacks in this order:\n// 1. All beforeUpdate callbacks, in order: parents before children\n// 2. All bind:this callbacks, in reverse order: children before parents.\n// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT\n// for afterUpdates called during the initial onMount, which are called in\n// reverse order: children before parents.\n// Since callbacks might update component values, which could trigger another\n// call to flush(), the following steps guard against this:\n// 1. During beforeUpdate, any updated components will be added to the\n// dirty_components array and will cause a reentrant call to flush(). Because\n// the flush index is kept outside the function, the reentrant call will pick\n// up where the earlier call left off and go through all dirty components. The\n// current_component value is saved and restored so that the reentrant call will\n// not interfere with the \"parent\" flush() call.\n// 2. bind:this callbacks cannot trigger new flush() calls.\n// 3. During afterUpdate, any updated components will NOT have their afterUpdate\n// callback called a second time; the seen_callbacks set, outside the flush()\n// function, guarantees this behavior.\nconst seen_callbacks = new Set();\n\nlet flushidx = 0; // Do *not* move this inside the flush() function\n\n/** @returns {void} */\nexport function flush() {\n\t// Do not reenter flush while dirty components are updated, as this can\n\t// result in an infinite loop. Instead, let the inner flush handle it.\n\t// Reentrancy is ok afterwards for bindings etc.\n\tif (flushidx !== 0) {\n\t\treturn;\n\t}\n\tconst saved_component = current_component;\n\tdo {\n\t\t// first, call beforeUpdate functions\n\t\t// and update components\n\t\ttry {\n\t\t\twhile (flushidx < dirty_components.length) {\n\t\t\t\tconst component = dirty_components[flushidx];\n\t\t\t\tflushidx++;\n\t\t\t\tset_current_component(component);\n\t\t\t\tupdate(component.$$);\n\t\t\t}\n\t\t} catch (e) {\n\t\t\t// reset dirty state to not end up in a deadlocked state and then rethrow\n\t\t\tdirty_components.length = 0;\n\t\t\tflushidx = 0;\n\t\t\tthrow e;\n\t\t}\n\t\tset_current_component(null);\n\t\tdirty_components.length = 0;\n\t\tflushidx = 0;\n\t\twhile (binding_callbacks.length) binding_callbacks.pop()();\n\t\t// then, once components are updated, call\n\t\t// afterUpdate functions. This may cause\n\t\t// subsequent updates...\n\t\tfor (let i = 0; i < render_callbacks.length; i += 1) {\n\t\t\tconst callback = render_callbacks[i];\n\t\t\tif (!seen_callbacks.has(callback)) {\n\t\t\t\t// ...so guard against infinite loops\n\t\t\t\tseen_callbacks.add(callback);\n\t\t\t\tcallback();\n\t\t\t}\n\t\t}\n\t\trender_callbacks.length = 0;\n\t} while (dirty_components.length);\n\twhile (flush_callbacks.length) {\n\t\tflush_callbacks.pop()();\n\t}\n\tupdate_scheduled = false;\n\tseen_callbacks.clear();\n\tset_current_component(saved_component);\n}\n\n/** @returns {void} */\nfunction update($$) {\n\tif ($$.fragment !== null) {\n\t\t$$.update();\n\t\trun_all($$.before_update);\n\t\tconst dirty = $$.dirty;\n\t\t$$.dirty = [-1];\n\t\t$$.fragment && $$.fragment.p($$.ctx, dirty);\n\t\t$$.after_update.forEach(add_render_callback);\n\t}\n}\n\n/**\n * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.\n * @param {Function[]} fns\n * @returns {void}\n */\nexport function flush_render_callbacks(fns) {\n\tconst filtered = [];\n\tconst targets = [];\n\trender_callbacks.forEach((c) => (fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c)));\n\ttargets.forEach((c) => c());\n\trender_callbacks = filtered;\n}\n","import { identity as linear, is_function, noop, run_all } from './utils.js';\nimport { now } from './environment.js';\nimport { loop } from './loop.js';\nimport { create_rule, delete_rule } from './style_manager.js';\nimport { custom_event } from './dom.js';\nimport { add_render_callback } from './scheduler.js';\n\n/**\n * @type {Promise<void> | null}\n */\nlet promise;\n\n/**\n * @returns {Promise<void>}\n */\nfunction wait() {\n\tif (!promise) {\n\t\tpromise = Promise.resolve();\n\t\tpromise.then(() => {\n\t\t\tpromise = null;\n\t\t});\n\t}\n\treturn promise;\n}\n\n/**\n * @param {Element} node\n * @param {INTRO | OUTRO | boolean} direction\n * @param {'start' | 'end'} kind\n * @returns {void}\n */\nfunction dispatch(node, direction, kind) {\n\tnode.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\n\nconst outroing = new Set();\n\n/**\n * @type {Outro}\n */\nlet outros;\n\n/**\n * @returns {void} */\nexport function group_outros() {\n\toutros = {\n\t\tr: 0,\n\t\tc: [],\n\t\tp: outros // parent group\n\t};\n}\n\n/**\n * @returns {void} */\nexport function check_outros() {\n\tif (!outros.r) {\n\t\trun_all(outros.c);\n\t}\n\toutros = outros.p;\n}\n\n/**\n * @param {import('./private.js').Fragment} block\n * @param {0 | 1} [local]\n * @returns {void}\n */\nexport function transition_in(block, local) {\n\tif (block && block.i) {\n\t\toutroing.delete(block);\n\t\tblock.i(local);\n\t}\n}\n\n/**\n * @param {import('./private.js').Fragment} block\n * @param {0 | 1} local\n * @param {0 | 1} [detach]\n * @param {() => void} [callback]\n * @returns {void}\n */\nexport function transition_out(block, local, detach, callback) {\n\tif (block && block.o) {\n\t\tif (outroing.has(block)) return;\n\t\toutroing.add(block);\n\t\toutros.c.push(() => {\n\t\t\toutroing.delete(block);\n\t\t\tif (callback) {\n\t\t\t\tif (detach) block.d(1);\n\t\t\t\tcallback();\n\t\t\t}\n\t\t});\n\t\tblock.o(local);\n\t} else if (callback) {\n\t\tcallback();\n\t}\n}\n\n/**\n * @type {import('../transition/public.js').TransitionConfig}\n */\nconst null_transition = { duration: 0 };\n\n/**\n * @param {Element & ElementCSSInlineStyle} node\n * @param {TransitionFn} fn\n * @param {any} params\n * @returns {{ start(): void; invalidate(): void; end(): void; }}\n */\nexport function create_in_transition(node, fn, params) {\n\t/**\n\t * @type {TransitionOptions} */\n\tconst options = { direction: 'in' };\n\tlet config = fn(node, params, options);\n\tlet running = false;\n\tlet animation_name;\n\tlet task;\n\tlet uid = 0;\n\n\t/**\n\t * @returns {void} */\n\tfunction cleanup() {\n\t\tif (animation_name) delete_rule(node, animation_name);\n\t}\n\n\t/**\n\t * @returns {void} */\n\tfunction go() {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = 300,\n\t\t\teasing = linear,\n\t\t\ttick = noop,\n\t\t\tcss\n\t\t} = config || null_transition;\n\t\tif (css) animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n\t\ttick(0, 1);\n\t\tconst start_time = now() + delay;\n\t\tconst end_time = start_time + duration;\n\t\tif (task) task.abort();\n\t\trunning = true;\n\t\tadd_render_callback(() => dispatch(node, true, 'start'));\n\t\ttask = loop((now) => {\n\t\t\tif (running) {\n\t\t\t\tif (now >= end_time) {\n\t\t\t\t\ttick(1, 0);\n\t\t\t\t\tdispatch(node, true, 'end');\n\t\t\t\t\tcleanup();\n\t\t\t\t\treturn (running = false);\n\t\t\t\t}\n\t\t\t\tif (now >= start_time) {\n\t\t\t\t\tconst t = easing((now - start_time) / duration);\n\t\t\t\t\ttick(t, 1 - t);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn running;\n\t\t});\n\t}\n\tlet started = false;\n\treturn {\n\t\tstart() {\n\t\t\tif (started) return;\n\t\t\tstarted = true;\n\t\t\tdelete_rule(node);\n\t\t\tif (is_function(config)) {\n\t\t\t\tconfig = config(options);\n\t\t\t\twait().then(go);\n\t\t\t} else {\n\t\t\t\tgo();\n\t\t\t}\n\t\t},\n\t\tinvalidate() {\n\t\t\tstarted = false;\n\t\t},\n\t\tend() {\n\t\t\tif (running) {\n\t\t\t\tcleanup();\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * @param {Element & ElementCSSInlineStyle} node\n * @param {TransitionFn} fn\n * @param {any} params\n * @returns {{ end(reset: any): void; }}\n */\nexport function create_out_transition(node, fn, params) {\n\t/** @type {TransitionOptions} */\n\tconst options = { direction: 'out' };\n\tlet config = fn(node, params, options);\n\tlet running = true;\n\tlet animation_name;\n\tconst group = outros;\n\tgroup.r += 1;\n\t/** @type {boolean} */\n\tlet original_inert_value;\n\n\t/**\n\t * @returns {void} */\n\tfunction go() {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = 300,\n\t\t\teasing = linear,\n\t\t\ttick = noop,\n\t\t\tcss\n\t\t} = config || null_transition;\n\n\t\tif (css) animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n\n\t\tconst start_time = now() + delay;\n\t\tconst end_time = start_time + duration;\n\t\tadd_render_callback(() => dispatch(node, false, 'start'));\n\n\t\tif ('inert' in node) {\n\t\t\toriginal_inert_value = /** @type {HTMLElement} */ (node).inert;\n\t\t\tnode.inert = true;\n\t\t}\n\n\t\tloop((now) => {\n\t\t\tif (running) {\n\t\t\t\tif (now >= end_time) {\n\t\t\t\t\ttick(0, 1);\n\t\t\t\t\tdispatch(node, false, 'end');\n\t\t\t\t\tif (!--group.r) {\n\t\t\t\t\t\t// this will result in `end()` being called,\n\t\t\t\t\t\t// so we don't need to clean up here\n\t\t\t\t\t\trun_all(group.c);\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (now >= start_time) {\n\t\t\t\t\tconst t = easing((now - start_time) / duration);\n\t\t\t\t\ttick(1 - t, t);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn running;\n\t\t});\n\t}\n\n\tif (is_function(config)) {\n\t\twait().then(() => {\n\t\t\t// @ts-ignore\n\t\t\tconfig = config(options);\n\t\t\tgo();\n\t\t});\n\t} else {\n\t\tgo();\n\t}\n\n\treturn {\n\t\tend(reset) {\n\t\t\tif (reset && 'inert' in node) {\n\t\t\t\tnode.inert = original_inert_value;\n\t\t\t}\n\t\t\tif (reset && config.tick) {\n\t\t\t\tconfig.tick(1, 0);\n\t\t\t}\n\t\t\tif (running) {\n\t\t\t\tif (animation_name) delete_rule(node, animation_name);\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * @param {Element & ElementCSSInlineStyle} node\n * @param {TransitionFn} fn\n * @param {any} params\n * @param {boolean} intro\n * @returns {{ run(b: 0 | 1): void; end(): void; }}\n */\nexport function create_bidirectional_transition(node, fn, params, intro) {\n\t/**\n\t * @type {TransitionOptions} */\n\tconst options = { direction: 'both' };\n\tlet config = fn(node, params, options);\n\tlet t = intro ? 0 : 1;\n\n\t/**\n\t * @type {Program | null} */\n\tlet running_program = null;\n\n\t/**\n\t * @type {PendingProgram | null} */\n\tlet pending_program = null;\n\tlet animation_name = null;\n\n\t/** @type {boolean} */\n\tlet original_inert_value;\n\n\t/**\n\t * @returns {void} */\n\tfunction clear_animation() {\n\t\tif (animation_name) delete_rule(node, animation_name);\n\t}\n\n\t/**\n\t * @param {PendingProgram} program\n\t * @param {number} duration\n\t * @returns {Program}\n\t */\n\tfunction init(program, duration) {\n\t\tconst d = /** @type {Program['d']} */ (program.b - t);\n\t\tduration *= Math.abs(d);\n\t\treturn {\n\t\t\ta: t,\n\t\t\tb: program.b,\n\t\t\td,\n\t\t\tduration,\n\t\t\tstart: program.start,\n\t\t\tend: program.start + duration,\n\t\t\tgroup: program.group\n\t\t};\n\t}\n\n\t/**\n\t * @param {INTRO | OUTRO} b\n\t * @returns {void}\n\t */\n\tfunction go(b) {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = 300,\n\t\t\teasing = linear,\n\t\t\ttick = noop,\n\t\t\tcss\n\t\t} = config || null_transition;\n\n\t\t/**\n\t\t * @type {PendingProgram} */\n\t\tconst program = {\n\t\t\tstart: now() + delay,\n\t\t\tb\n\t\t};\n\n\t\tif (!b) {\n\t\t\t// @ts-ignore todo: improve typings\n\t\t\tprogram.group = outros;\n\t\t\toutros.r += 1;\n\t\t}\n\n\t\tif ('inert' in node) {\n\t\t\tif (b) {\n\t\t\t\tif (original_inert_value !== undefined) {\n\t\t\t\t\t// aborted/reversed outro — restore previous inert value\n\t\t\t\t\tnode.inert = original_inert_value;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toriginal_inert_value = /** @type {HTMLElement} */ (node).inert;\n\t\t\t\tnode.inert = true;\n\t\t\t}\n\t\t}\n\n\t\tif (running_program || pending_program) {\n\t\t\tpending_program = program;\n\t\t} else {\n\t\t\t// if this is an intro, and there's a delay, we need to do\n\t\t\t// an initial tick and/or apply CSS animation immediately\n\t\t\tif (css) {\n\t\t\t\tclear_animation();\n\t\t\t\tanimation_name = create_rule(node, t, b, duration, delay, easing, css);\n\t\t\t}\n\t\t\tif (b) tick(0, 1);\n\t\t\trunning_program = init(program, duration);\n\t\t\tadd_render_callback(() => dispatch(node, b, 'start'));\n\t\t\tloop((now) => {\n\t\t\t\tif (pending_program && now > pending_program.start) {\n\t\t\t\t\trunning_program = init(pending_program, duration);\n\t\t\t\t\tpending_program = null;\n\t\t\t\t\tdispatch(node, running_program.b, 'start');\n\t\t\t\t\tif (css) {\n\t\t\t\t\t\tclear_animation();\n\t\t\t\t\t\tanimation_name = create_rule(\n\t\t\t\t\t\t\tnode,\n\t\t\t\t\t\t\tt,\n\t\t\t\t\t\t\trunning_program.b,\n\t\t\t\t\t\t\trunning_program.duration,\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\teasing,\n\t\t\t\t\t\t\tconfig.css\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (running_program) {\n\t\t\t\t\tif (now >= running_program.end) {\n\t\t\t\t\t\ttick((t = running_program.b), 1 - t);\n\t\t\t\t\t\tdispatch(node, running_program.b, 'end');\n\t\t\t\t\t\tif (!pending_program) {\n\t\t\t\t\t\t\t// we're done\n\t\t\t\t\t\t\tif (running_program.b) {\n\t\t\t\t\t\t\t\t// intro — we can tidy up immediately\n\t\t\t\t\t\t\t\tclear_animation();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// outro — needs to be coordinated\n\t\t\t\t\t\t\t\tif (!--running_program.group.r) run_all(running_program.group.c);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\trunning_program = null;\n\t\t\t\t\t} else if (now >= running_program.start) {\n\t\t\t\t\t\tconst p = now - running_program.start;\n\t\t\t\t\t\tt = running_program.a + running_program.d * easing(p / running_program.duration);\n\t\t\t\t\t\ttick(t, 1 - t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn !!(running_program || pending_program);\n\t\t\t});\n\t\t}\n\t}\n\treturn {\n\t\trun(b) {\n\t\t\tif (is_function(config)) {\n\t\t\t\twait().then(() => {\n\t\t\t\t\tconst opts = { direction: b ? 'in' : 'out' };\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tconfig = config(opts);\n\t\t\t\t\tgo(b);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tgo(b);\n\t\t\t}\n\t\t},\n\t\tend() {\n\t\t\tclear_animation();\n\t\t\trunning_program = pending_program = null;\n\t\t}\n\t};\n}\n\n/** @typedef {1} INTRO */\n/** @typedef {0} OUTRO */\n/** @typedef {{ direction: 'in' | 'out' | 'both' }} TransitionOptions */\n/** @typedef {(node: Element, params: any, options: TransitionOptions) => import('../transition/public.js').TransitionConfig} TransitionFn */\n\n/**\n * @typedef {Object} Outro\n * @property {number} r\n * @property {Function[]} c\n * @property {Object} p\n */\n\n/**\n * @typedef {Object} PendingProgram\n * @property {number} start\n * @property {INTRO|OUTRO} b\n * @property {Outro} [group]\n */\n\n/**\n * @typedef {Object} Program\n * @property {number} a\n * @property {INTRO|OUTRO} b\n * @property {1|-1} d\n * @property {number} duration\n * @property {number} start\n * @property {number} end\n * @property {Outro} [group]\n */\n","import {\n\tadd_render_callback,\n\tflush,\n\tflush_render_callbacks,\n\tschedule_update,\n\tdirty_components\n} from './scheduler.js';\nimport { current_component, set_current_component } from './lifecycle.js';\nimport { blank_object, is_empty, is_function, run, run_all, noop } from './utils.js';\nimport {\n\tchildren,\n\tdetach,\n\tstart_hydrating,\n\tend_hydrating,\n\tget_custom_elements_slots,\n\tinsert,\n\telement,\n\tattr\n} from './dom.js';\nimport { transition_in } from './transitions.js';\n\n/** @returns {void} */\nexport function bind(component, name, callback) {\n\tconst index = component.$$.props[name];\n\tif (index !== undefined) {\n\t\tcomponent.$$.bound[index] = callback;\n\t\tcallback(component.$$.ctx[index]);\n\t}\n}\n\n/** @returns {void} */\nexport function create_component(block) {\n\tblock && block.c();\n}\n\n/** @returns {void} */\nexport function claim_component(block, parent_nodes) {\n\tblock && block.l(parent_nodes);\n}\n\n/** @returns {void} */\nexport function mount_component(component, target, anchor) {\n\tconst { fragment, after_update } = component.$$;\n\tfragment && fragment.m(target, anchor);\n\t// onMount happens before the initial afterUpdate\n\tadd_render_callback(() => {\n\t\tconst new_on_destroy = component.$$.on_mount.map(run).filter(is_function);\n\t\t// if the component was destroyed immediately\n\t\t// it will update the `$$.on_destroy` reference to `null`.\n\t\t// the destructured on_destroy may still reference to the old array\n\t\tif (component.$$.on_destroy) {\n\t\t\tcomponent.$$.on_destroy.push(...new_on_destroy);\n\t\t} else {\n\t\t\t// Edge case - component was destroyed immediately,\n\t\t\t// most likely as a result of a binding initialising\n\t\t\trun_all(new_on_destroy);\n\t\t}\n\t\tcomponent.$$.on_mount = [];\n\t});\n\tafter_update.forEach(add_render_callback);\n}\n\n/** @returns {void} */\nexport function destroy_component(component, detaching) {\n\tconst $$ = component.$$;\n\tif ($$.fragment !== null) {\n\t\tflush_render_callbacks($$.after_update);\n\t\trun_all($$.on_destroy);\n\t\t$$.fragment && $$.fragment.d(detaching);\n\t\t// TODO null out other refs, including component.$$ (but need to\n\t\t// preserve final state?)\n\t\t$$.on_destroy = $$.fragment = null;\n\t\t$$.ctx = [];\n\t}\n}\n\n/** @returns {void} */\nfunction make_dirty(component, i) {\n\tif (component.$$.dirty[0] === -1) {\n\t\tdirty_components.push(component);\n\t\tschedule_update();\n\t\tcomponent.$$.dirty.fill(0);\n\t}\n\tcomponent.$$.dirty[(i / 31) | 0] |= 1 << i % 31;\n}\n\n// TODO: Document the other params\n/**\n * @param {SvelteComponent} component\n * @param {import('./public.js').ComponentConstructorOptions} options\n *\n * @param {import('./utils.js')['not_equal']} not_equal Used to compare props and state values.\n * @param {(target: Element | ShadowRoot) => void} [append_styles] Function that appends styles to the DOM when the component is first initialised.\n * This will be the `add_css` function from the compiled component.\n *\n * @returns {void}\n */\nexport function init(\n\tcomponent,\n\toptions,\n\tinstance,\n\tcreate_fragment,\n\tnot_equal,\n\tprops,\n\tappend_styles = null,\n\tdirty = [-1]\n) {\n\tconst parent_component = current_component;\n\tset_current_component(component);\n\t/** @type {import('./private.js').T$$} */\n\tconst $$ = (component.$$ = {\n\t\tfragment: null,\n\t\tctx: [],\n\t\t// state\n\t\tprops,\n\t\tupdate: noop,\n\t\tnot_equal,\n\t\tbound: blank_object(),\n\t\t// lifecycle\n\t\ton_mount: [],\n\t\ton_destroy: [],\n\t\ton_disconnect: [],\n\t\tbefore_update: [],\n\t\tafter_update: [],\n\t\tcontext: new Map(options.context || (parent_component ? parent_component.$$.context : [])),\n\t\t// everything else\n\t\tcallbacks: blank_object(),\n\t\tdirty,\n\t\tskip_bound: false,\n\t\troot: options.target || parent_component.$$.root\n\t});\n\tappend_styles && append_styles($$.root);\n\tlet ready = false;\n\t$$.ctx = instance\n\t\t? instance(component, options.props || {}, (i, ret, ...rest) => {\n\t\t\t\tconst value = rest.length ? rest[0] : ret;\n\t\t\t\tif ($$.ctx && not_equal($$.ctx[i], ($$.ctx[i] = value))) {\n\t\t\t\t\tif (!$$.skip_bound && $$.bound[i]) $$.bound[i](value);\n\t\t\t\t\tif (ready) make_dirty(component, i);\n\t\t\t\t}\n\t\t\t\treturn ret;\n\t\t })\n\t\t: [];\n\t$$.update();\n\tready = true;\n\trun_all($$.before_update);\n\t// `false` as a special case of no DOM component\n\t$$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n\tif (options.target) {\n\t\tif (options.hydrate) {\n\t\t\tstart_hydrating();\n\t\t\t// TODO: what is the correct type here?\n\t\t\t// @ts-expect-error\n\t\t\tconst nodes = children(options.target);\n\t\t\t$$.fragment && $$.fragment.l(nodes);\n\t\t\tnodes.forEach(detach);\n\t\t} else {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t$$.fragment && $$.fragment.c();\n\t\t}\n\t\tif (options.intro) transition_in(component.$$.fragment);\n\t\tmount_component(component, options.target, options.anchor);\n\t\tend_hydrating();\n\t\tflush();\n\t}\n\tset_current_component(parent_component);\n}\n\nexport let SvelteElement;\n\nif (typeof HTMLElement === 'function') {\n\tSvelteElement = class extends HTMLElement {\n\t\t/** The Svelte component constructor */\n\t\t$$ctor;\n\t\t/** Slots */\n\t\t$$s;\n\t\t/** The Svelte component instance */\n\t\t$$c;\n\t\t/** Whether or not the custom element is connected */\n\t\t$$cn = false;\n\t\t/** Component props data */\n\t\t$$d = {};\n\t\t/** `true` if currently in the process of reflecting component props back to attributes */\n\t\t$$r = false;\n\t\t/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */\n\t\t$$p_d = {};\n\t\t/** @type {Record<string, Function[]>} Event listeners */\n\t\t$$l = {};\n\t\t/** @type {Map<Function, Function>} Event listener unsubscribe functions */\n\t\t$$l_u = new Map();\n\n\t\tconstructor($$componentCtor, $$slots, use_shadow_dom) {\n\t\t\tsuper();\n\t\t\tthis.$$ctor = $$componentCtor;\n\t\t\tthis.$$s = $$slots;\n\t\t\tif (use_shadow_dom) {\n\t\t\t\tthis.attachShadow({ mode: 'open' });\n\t\t\t}\n\t\t}\n\n\t\taddEventListener(type, listener, options) {\n\t\t\t// We can't determine upfront if the event is a custom event or not, so we have to\n\t\t\t// listen to both. If someone uses a custom event with the same name as a regular\n\t\t\t// browser event, this fires twice - we can't avoid that.\n\t\t\tthis.$$l[type] = this.$$l[type] || [];\n\t\t\tthis.$$l[type].push(listener);\n\t\t\tif (this.$$c) {\n\t\t\t\tconst unsub = this.$$c.$on(type, listener);\n\t\t\t\tthis.$$l_u.set(listener, unsub);\n\t\t\t}\n\t\t\tsuper.addEventListener(type, listener, options);\n\t\t}\n\n\t\tremoveEventListener(type, listener, options) {\n\t\t\tsuper.removeEventListener(type, listener, options);\n\t\t\tif (this.$$c) {\n\t\t\t\tconst unsub = this.$$l_u.get(listener);\n\t\t\t\tif (unsub) {\n\t\t\t\t\tunsub();\n\t\t\t\t\tthis.$$l_u.delete(listener);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync connectedCallback() {\n\t\t\tthis.$$cn = true;\n\t\t\tif (!this.$$c) {\n\t\t\t\t// We wait one tick to let possible child slot elements be created/mounted\n\t\t\t\tawait Promise.resolve();\n\t\t\t\tif (!this.$$cn || this.$$c) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tfunction create_slot(name) {\n\t\t\t\t\treturn () => {\n\t\t\t\t\t\tlet node;\n\t\t\t\t\t\tconst obj = {\n\t\t\t\t\t\t\tc: function create() {\n\t\t\t\t\t\t\t\tnode = element('slot');\n\t\t\t\t\t\t\t\tif (name !== 'default') {\n\t\t\t\t\t\t\t\t\tattr(node, 'name', name);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * @param {HTMLElement} target\n\t\t\t\t\t\t\t * @param {HTMLElement} [anchor]\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tm: function mount(target, anchor) {\n\t\t\t\t\t\t\t\tinsert(target, node, anchor);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\td: function destroy(detaching) {\n\t\t\t\t\t\t\t\tif (detaching) {\n\t\t\t\t\t\t\t\t\tdetach(node);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t\treturn obj;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tconst $$slots = {};\n\t\t\t\tconst existing_slots = get_custom_elements_slots(this);\n\t\t\t\tfor (const name of this.$$s) {\n\t\t\t\t\tif (name in existing_slots) {\n\t\t\t\t\t\t$$slots[name] = [create_slot(name)];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (const attribute of this.attributes) {\n\t\t\t\t\t// this.$$data takes precedence over this.attributes\n\t\t\t\t\tconst name = this.$$g_p(attribute.name);\n\t\t\t\t\tif (!(name in this.$$d)) {\n\t\t\t\t\t\tthis.$$d[name] = get_custom_element_value(name, attribute.value, this.$$p_d, 'toProp');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Port over props that were set programmatically before ce was initialized\n\t\t\t\tfor (const key in this.$$p_d) {\n\t\t\t\t\tif (!(key in this.$$d) && this[key] !== undefined) {\n\t\t\t\t\t\tthis.$$d[key] = this[key]; // don't transform, these were set through JavaScript\n\t\t\t\t\t\tdelete this[key]; // remove the property that shadows the getter/setter\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.$$c = new this.$$ctor({\n\t\t\t\t\ttarget: this.shadowRoot || this,\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t...this.$$d,\n\t\t\t\t\t\t$$slots,\n\t\t\t\t\t\t$$scope: {\n\t\t\t\t\t\t\tctx: []\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Reflect component props as attributes\n\t\t\t\tconst reflect_attributes = () => {\n\t\t\t\t\tthis.$$r = true;\n\t\t\t\t\tfor (const key in this.$$p_d) {\n\t\t\t\t\t\tthis.$$d[key] = this.$$c.$$.ctx[this.$$c.$$.props[key]];\n\t\t\t\t\t\tif (this.$$p_d[key].reflect) {\n\t\t\t\t\t\t\tconst attribute_value = get_custom_element_value(\n\t\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\t\tthis.$$d[key],\n\t\t\t\t\t\t\t\tthis.$$p_d,\n\t\t\t\t\t\t\t\t'toAttribute'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif (attribute_value == null) {\n\t\t\t\t\t\t\t\tthis.removeAttribute(this.$$p_d[key].attribute || key);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.setAttribute(this.$$p_d[key].attribute || key, attribute_value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.$$r = false;\n\t\t\t\t};\n\t\t\t\tthis.$$c.$$.after_update.push(reflect_attributes);\n\t\t\t\treflect_attributes(); // once initially because after_update is added too late for first render\n\n\t\t\t\tfor (const type in this.$$l) {\n\t\t\t\t\tfor (const listener of this.$$l[type]) {\n\t\t\t\t\t\tconst unsub = this.$$c.$on(type, listener);\n\t\t\t\t\t\tthis.$$l_u.set(listener, unsub);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.$$l = {};\n\t\t\t}\n\t\t}\n\n\t\t// We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte\n\t\t// and setting attributes through setAttribute etc, this is helpful\n\t\tattributeChangedCallback(attr, _oldValue, newValue) {\n\t\t\tif (this.$$r) return;\n\t\t\tattr = this.$$g_p(attr);\n\t\t\tthis.$$d[attr] = get_custom_element_value(attr, newValue, this.$$p_d, 'toProp');\n\t\t\tthis.$$c?.$set({ [attr]: this.$$d[attr] });\n\t\t}\n\n\t\tdisconnectedCallback() {\n\t\t\tthis.$$cn = false;\n\t\t\t// In a microtask, because this could be a move within the DOM\n\t\t\tPromise.resolve().then(() => {\n\t\t\t\tif (!this.$$cn && this.$$c) {\n\t\t\t\t\tthis.$$c.$destroy();\n\t\t\t\t\tthis.$$c = undefined;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t$$g_p(attribute_name) {\n\t\t\treturn (\n\t\t\t\tObject.keys(this.$$p_d).find(\n\t\t\t\t\t(key) =>\n\t\t\t\t\t\tthis.$$p_d[key].attribute === attribute_name ||\n\t\t\t\t\t\t(!this.$$p_d[key].attribute && key.toLowerCase() === attribute_name)\n\t\t\t\t) || attribute_name\n\t\t\t);\n\t\t}\n\t};\n}\n\n/**\n * @param {string} prop\n * @param {any} value\n * @param {Record<string, CustomElementPropDefinition>} props_definition\n * @param {'toAttribute' | 'toProp'} [transform]\n */\nfunction get_custom_element_value(prop, value, props_definition, transform) {\n\tconst type = props_definition[prop]?.type;\n\tvalue = type === 'Boolean' && typeof value !== 'boolean' ? value != null : value;\n\tif (!transform || !props_definition[prop]) {\n\t\treturn value;\n\t} else if (transform === 'toAttribute') {\n\t\tswitch (type) {\n\t\t\tcase 'Object':\n\t\t\tcase 'Array':\n\t\t\t\treturn value == null ? null : JSON.stringify(value);\n\t\t\tcase 'Boolean':\n\t\t\t\treturn value ? '' : null;\n\t\t\tcase 'Number':\n\t\t\t\treturn value == null ? null : value;\n\t\t\tdefault:\n\t\t\t\treturn value;\n\t\t}\n\t} else {\n\t\tswitch (type) {\n\t\t\tcase 'Object':\n\t\t\tcase 'Array':\n\t\t\t\treturn value && JSON.parse(value);\n\t\t\tcase 'Boolean':\n\t\t\t\treturn value; // conversion already handled above\n\t\t\tcase 'Number':\n\t\t\t\treturn value != null ? +value : value;\n\t\t\tdefault:\n\t\t\t\treturn value;\n\t\t}\n\t}\n}\n\n/**\n * @internal\n *\n * Turn a Svelte component into a custom element.\n * @param {import('./public.js').ComponentType} Component A Svelte component constructor\n * @param {Record<string, CustomElementPropDefinition>} props_definition The props to observe\n * @param {string[]} slots The slots to create\n * @param {string[]} accessors Other accessors besides the ones for props the component has\n * @param {boolean} use_shadow_dom Whether to use shadow DOM\n * @param {(ce: new () => HTMLElement) => new () => HTMLElement} [extend]\n */\nexport function create_custom_element(\n\tComponent,\n\tprops_definition,\n\tslots,\n\taccessors,\n\tuse_shadow_dom,\n\textend\n) {\n\tlet Class = class extends SvelteElement {\n\t\tconstructor() {\n\t\t\tsuper(Component, slots, use_shadow_dom);\n\t\t\tthis.$$p_d = props_definition;\n\t\t}\n\t\tstatic get observedAttributes() {\n\t\t\treturn Object.keys(props_definition).map((key) =>\n\t\t\t\t(props_definition[key].attribute || key).toLowerCase()\n\t\t\t);\n\t\t}\n\t};\n\tObject.keys(props_definition).forEach((prop) => {\n\t\tObject.defineProperty(Class.prototype, prop, {\n\t\t\tget() {\n\t\t\t\treturn this.$$c && prop in this.$$c ? this.$$c[prop] : this.$$d[prop];\n\t\t\t},\n\t\t\tset(value) {\n\t\t\t\tvalue = get_custom_element_value(prop, value, props_definition);\n\t\t\t\tthis.$$d[prop] = value;\n\t\t\t\tthis.$$c?.$set({ [prop]: value });\n\t\t\t}\n\t\t});\n\t});\n\taccessors.forEach((accessor) => {\n\t\tObject.defineProperty(Class.prototype, accessor, {\n\t\t\tget() {\n\t\t\t\treturn this.$$c?.[accessor];\n\t\t\t}\n\t\t});\n\t});\n\tif (extend) {\n\t\t// @ts-expect-error - assigning here is fine\n\t\tClass = extend(Class);\n\t}\n\tComponent.element = /** @type {any} */ (Class);\n\treturn Class;\n}\n\n/**\n * Base class for Svelte components. Used when dev=false.\n *\n * @template {Record<string, any>} [Props=any]\n * @template {Record<string, any>} [Events=any]\n */\nexport class SvelteComponent {\n\t/**\n\t * ### PRIVATE API\n\t *\n\t * Do not use, may change at any time\n\t *\n\t * @type {any}\n\t */\n\t$$ = undefined;\n\t/**\n\t * ### PRIVATE API\n\t *\n\t * Do not use, may change at any time\n\t *\n\t * @type {any}\n\t */\n\t$$set = undefined;\n\n\t/** @returns {void} */\n\t$destroy() {\n\t\tdestroy_component(this, 1);\n\t\tthis.$destroy = noop;\n\t}\n\n\t/**\n\t * @template {Extract<keyof Events, string>} K\n\t * @param {K} type\n\t * @param {((e: Events[K]) => void) | null | undefined} callback\n\t * @returns {() => void}\n\t */\n\t$on(type, callback) {\n\t\tif (!is_function(callback)) {\n\t\t\treturn noop;\n\t\t}\n\t\tconst callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []);\n\t\tcallbacks.push(callback);\n\t\treturn () => {\n\t\t\tconst index = callbacks.indexOf(callback);\n\t\t\tif (index !== -1) callbacks.splice(index, 1);\n\t\t};\n\t}\n\n\t/**\n\t * @param {Partial<Props>} props\n\t * @returns {void}\n\t */\n\t$set(props) {\n\t\tif (this.$$set && !is_empty(props)) {\n\t\t\tthis.$$.skip_bound = true;\n\t\t\tthis.$$set(props);\n\t\t\tthis.$$.skip_bound = false;\n\t\t}\n\t}\n}\n\n/**\n * @typedef {Object} CustomElementPropDefinition\n * @property {string} [attribute]\n * @property {boolean} [reflect]\n * @property {'String'|'Boolean'|'Number'|'Array'|'Object'} [type]\n */\n","export namespace LuigiInternalMessageID {\n /**\n * A message emmitted from the Microfrontend when a custom message is sent\n */\n export const CUSTOM_MESSAGE = 'custom';\n /**\n * A message emmitted from the Microfrontend when the context data is sent\n */\n export const GET_CONTEXT = 'luigi.get-context';\n /**\n * A message sent to the microfrontend from parent with the context upon init\n */\n export const SEND_CONTEXT_HANDSHAKE = 'luigi.init';\n\n /**\n * A message sent from the Microfrontend when the context data has been received properly\n */\n export const CONTEXT_RECEIVED = 'luigi.init.ok';\n /**\n * A message emmitted from the Microfrontend when a navigation request is sent\n */\n export const NAVIGATION_REQUEST = 'luigi.navigation.open';\n /**\n * A message emmitted from the Microfrontend when a request to show an alert is sent\n */\n export const ALERT_REQUEST = 'luigi.ux.alert.show';\n /**\n * A message sent to the microfrontend to notify closing of a particular alert\n */\n export const ALERT_CLOSED = 'luigi.ux.alert.hide';\n /**\n * A message emmitted from the Microfrontend when it is first initialized\n */\n export const INITIALIZED = 'luigi.init.ok';\n /**\n * A message emmitted from the Microfrontend to request adding search parameters to the URL\n */\n export const ADD_SEARCH_PARAMS_REQUEST = 'luigi.addSearchParams';\n /**\n * A message emmitted from the Microfrontend to request adding node parameters to the URL\n */\n export const ADD_NODE_PARAMS_REQUEST = 'luigi.addNodeParams';\n /**\n * A message emmitted from the Microfrontend when a request to show an confirmation modal is sent\n */\n export const SHOW_CONFIRMATION_MODAL_REQUEST = 'luigi.ux.confirmationModal.show';\n /**\n * A message sent to the microfrontend to notify closing of a particular confirmation modal\n */\n export const CONFIRMATION_MODAL_CLOSED = 'luigi.ux.confirmationModal.hide';\n /**\n * A message emmitted from the Microfrontend when a request to show loading indicator is sent\n */\n export const SHOW_LOADING_INDICATOR_REQUEST = 'luigi.show-loading-indicator';\n /**\n * A message emmitted from the Microfrontend when a request to hide the loading indicator is sent\n */\n export const HIDE_LOADING_INDICATOR_REQUEST = 'luigi.hide-loading-indicator';\n\n /**\n * A message emmitted from the Microfrontend when a request to set the current locale is sent\n */\n export const SET_CURRENT_LOCALE_REQUEST = 'luigi.ux.set-current-locale';\n\n /**\n * A message emmitted from the Microfrontend when a request to modify the local storage is sent\n */\n export const LOCAL_STORAGE_SET_REQUEST = 'storage';\n\n /**\n * A message emmitted from the Microfrontend when a request to handle an error that happened during the runtime on the microfrontend is sent\n */\n export const RUNTIME_ERROR_HANDLING_REQUEST = 'luigi-runtime-error-handling';\n\n /**\n * A message emmitted from the Microfrontend when a request to set the anchor of the URL is sent\n */\n export const SET_ANCHOR_LINK_REQUEST = 'luigi.setAnchor';\n\n /**\n * A message emmitted from the Microfrontend when a request to set third party cookies is sent\n */\n export const SET_THIRD_PARTY_COOKIES_REQUEST = 'luigi.third-party-cookie';\n\n /**\n * A message emmitted from the Microfrontend when a request to navigate back is sent\n */\n export const BACK_NAVIGATION_REQUEST = 'luigi.navigation.back';\n\n /**\n * A message emmitted from the Microfrontend when a request to receive the current app route is sent\n */\n export const GET_CURRENT_ROUTE_REQUEST = 'luigi.navigation.currentRoute';\n\n /**\n * A message sent to the microfrontend from parent with the current app route\n */\n export const SEND_CURRENT_ROUTE_ANSWER = 'luigi.navigation.currentRoute.answer';\n\n /**\n * A message sent to the Microfrontend with the payload being the context being sent\n */\n export const SEND_CONTEXT_OBJECT = 'luigi.navigate';\n\n /**\n * A message emmitted from the Microfrontend to report that the navigation is completed is sent\n */\n export const NAVIGATION_COMPLETED_REPORT = 'luigi.navigate.ok';\n\n /**\n * A message sent to the microfronted from parent that the modal has been closed\n */\n export const CLOSE_MODAL_ANSWER = 'luigi.navigation.modal.close';\n\n /**\n * A message emmitted from the Microfrontend when a request to update the modal path parameters is sent\n */\n export const UPDATE_MODAL_PATH_DATA_REQUEST = 'luigi.navigation.updateModalDataPath';\n\n /**\n * A message emmitted from the Microfrontend when a request to update the modal settings is sent\n */\n export const UPDATE_MODAL_SETTINGS = 'luigi.navigation.updateModalSettings';\n\n /**\n * A message emmitted from the Microfrontend when a request to check on the validity of a path is sent\n */\n export const CHECK_PATH_EXISTS_REQUEST = 'luigi.navigation.pathExists';\n\n /**\n * A message sent to the microfrontend from parent with the result of checking validity of a path\n */\n export const SEND_PATH_EXISTS_ANSWER = 'luigi.navigation.pathExists.answer';\n\n /**\n * A message emmitted from the Microfrontend when a request to set the 'dirty status' (ex: avoid closing if usaved changes) is sent\n */\n export const SET_DIRTY_STATUS_REQUEST = 'luigi.set-page-dirty';\n\n /**\n * A message emmitted from the Microfrontend when a request to set the 'token auth' is sent\n */\n export const AUTH_SET_TOKEN = 'luigi.auth.tokenIssued';\n\n /**\n * A message emmitted from the Microfrontend when a request to set backdrop is sent\n */\n export const ADD_BACKDROP_REQUEST = 'luigi.add-backdrop';\n\n /**\n * A message emmitted from the Microfrontend when a request to remove backdrop is sent\n */\n export const REMOVE_BACKDROP_REQUEST = 'luigi.remove-backdrop';\n\n /**\n * A message emmitted from the Microfrontend when a request to set the viewgroup data is sent\n */\n export const SET_VIEW_GROUP_DATA_REQUEST = 'luigi.setVGData';\n\n /**\n * A message emmitted from the Microfrontend when a request to close the current modal is sent\n */\n export const CLOSE_CURRENT_MODAL_REQUEST = 'luigi.close-modal';\n}\n","import { PUBLIC_VERSION } from '../../../shared/version.js';\n\nif (typeof window !== 'undefined')\n\t// @ts-ignore\n\t(window.__svelte || (window.__svelte = { v: new Set() })).v.add(PUBLIC_VERSION);\n","// generated during release, do not modify\n\n/**\n * The current version, as set in package.json.\n *\n * https://svelte.dev/docs/svelte-compiler#svelte-version\n * @type {string}\n */\nexport const VERSION = '4.2.19';\nexport const PUBLIC_VERSION = '4';\n","/* eslint-disable @typescript-eslint/triple-slash-reference */\n/// <reference path=\"../../typings/constants/event-payloads.ts\" />\nimport type {\n AlertRequestPayload,\n ConfirmationModalRequestPayload,\n CurrentRouteRequestPayload,\n ModalPathDataRequestPayload,\n ModalSettingsRequestPayload,\n NavigationRequestPayload,\n ParamsRequestPayload\n} from 'EventPayloads';\n\n/**\n * @namespace Events\n * @description Namespace for Luigi events.\n */\n\n/**\n * Event fired when the micro frontend sends a custom message. <br><br>\n * Payload: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\n * @type {Object}\n * @memberof Events\n * @property {object} data - event data\n * @property {string} id - event ID\n * @example\n * {\n * data: {},\n * id: 'some-id'\n * }\n */\nexport const CUSTOM_MESSAGE = 'custom-message';\n\n/**\n * Event left due to historical reasons - do not use.\n * @deprecated\n * @ignore\n */\nexport const GET_CONTEXT_REQUEST = 'get-context-request';\n\n/**\n * Event fired when a navigation has been requested by the micro frontend. <br><br>\n * Payload: [NavigationRequestPayload](https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts)\n * @type {NavigationRequestPayload}\n * @memberof Events\n * @example\n * {\n * fromClosestContext: false,\n * fromContext: null,\n * fromParent: true,\n * fromVirtualTreeRoot: false,\n * link: '/test/route',\n * nodeParams: {}\n * }\n */\nexport const NAVIGATION_REQUEST = 'navigation-request';\n\n/**\n * Event fired when the micro frontend requests to show an alert. <br>\n * Read more about `showAlert` params [here](https://docs.luigi-project.io/docs/luigi-core-api?section=showalert). <br><br>\n * Payload: [AlertRequestPayload](https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts)\n * @type {AlertRequestPayload}\n * @memberof Events\n * @example\n * {\n * text: 'Custom alert message',\n * type: 'info',\n * links: {\n * goToHome: { text: 'Homepage', url: '/overview' },\n * goToOtherProject: { text: 'Other project', url: '/projects/pr2' },\n * relativePath: { text: 'Hide side nav', url: 'hideSideNav' },\n * neverShowItAgain: { text: 'Never show it again', dismissKey: 'neverShowItAgain' }\n * },\n * closeAfter: 3000\n * }\n */\nexport const ALERT_REQUEST = 'show-alert-request';\n\n/**\n * Event left due to historical reasons - do not use.\n * @deprecated\n * @ignore\n */\nexport const ALERT_CLOSED = 'close-alert-request';\n\n/**\n * Event fired when the micro frontend has been initialized.\n * @type {unspecified} (type is not relevant in this case)\n * @memberof Events\n */\nexport const INITIALIZED = 'initialized';\n\n/**\n * Event fired when the micro frontend requests the addition of search parameters to the URL. <br><br>\n * Payload: [ParamsRequestPayload](https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts)\n * @type {ParamsRequestPayload}\n * @memberof Events\n * @example\n * {\n * data: {},\n * keepBrowserHistory: false\n * }\n */\nexport const ADD_SEARCH_PARAMS_REQUEST = 'add-search-params-request';\n\n/**\n * Event fired when the micro frontend requests the addition of node parameters to the URL. <br><br>\n * Payload: [ParamsRequestPayload](https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts)\n * @type {ParamsRequestPayload}\n * @memberof Events\n * @example\n * {\n * data: {},\n * keepBrowserHistory: false\n * }\n */\nexport const ADD_NODE_PARAMS_REQUEST = 'add-node-params-request';\n\n/**\n * Event fired when the micro frontend requests to show a confirmation modal. <br>\n * Read more about `showConfirmationModal` params [here](https://docs.luigi-project.io/docs/luigi-core-api?section=showconfirmationmodal). <br><br>\n * Payload: [ConfirmationModalRequestPayload](https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts)\n * @type {ConfirmationModalRequestPayload}\n * @memberof Events\n * @example\n * {\n * header: 'Confirmation',\n * body: 'Are you sure you want to do this?',\n * buttonConfirm: 'Yes',\n * buttonDismiss: 'No'\n * }\n */\nexport const SHOW_CONFIRMATION_MODAL_REQUEST = 'show-confirmation-modal-request';\n\n/**\n * Event fired when the micro frontend requests to show a loading indicator.\n * @type {unspecified} (type is not relevant in this case)\n * @memberof Events\n */\nexport const SHOW_LOADING_INDICATOR_REQUEST = 'show-loading-indicator-request';\n\n/**\n * Event fired when the micro frontend requests to hide the loading indicator.\n * @type {unspecified} (type is not relevant in this case)\n * @memberof Events\n */\nexport const HIDE_LOADING_INDICATOR_REQUEST = 'hide-loading-indicator-request';\n\n/**\n * Event fired when the micro frontend requests to set the current locale. <br><br>\n * Payload: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\n * @type {Object.<string, string>}\n * @memberof Events\n * @example\n * {\n * currentLocale: 'en'\n * }\n */\nexport const SET_CURRENT_LOCALE_REQUEST = 'set-current-locale-request';\n\n/**\n * Event fired when the micro frontend requests to modify the local storage. <br><br>\n * Payload: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\n * @type {Object.<string, string>}\n * @memberof Events\n * @example\n * {\n * key: 'luigi-version',\n * value: '2.21.0'\n * }\n */\nexport const LOCAL_STORAGE_SET_REQUEST = 'set-storage-request';\n\n/**\n * Event fired when the micro frontend requests to handle errors that might happen during the runtime of the micro frontend.\n * @type {unspecified} (type is not relevant in this case)\n * @memberof Events\n */\nexport const RUNTIME_ERROR_HANDLING_REQUEST = 'runtime-error-handling-request';\n\n/**\n * Event fired when the micro frontend requests to set the anchor of the URL. <br><br>\n * Payload: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)\n * @type {String}\n * @memberof Events\n * @example 'some-anchor'\n */\nexport const SET_ANCHOR_LINK_REQUEST = 'set-anchor-request';\n\n/**\n * Event fired when the micro frontend requests to set third-party cookies.\n * @type {unspecified} (type is not relevant in this case)\n * @memberof Events\n */\nexport const SET_THIRD_PARTY_COOKIES_REQUEST = 'set-third-party-cookies-request';\n\n/**\n * Event left due to historical reasons - use 'GO_BACK_REQUEST' instead.\n * @deprecated\n * @ignore\n */\nexport const BACK_NAVIGATION_REQUEST = 'navigate-back-request';\n\n/**\n * Event fired when the micro frontend requests the current app route. <br><br>\n * Payload: [CurrentRouteRequestPayload](https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts)\n * @type {CurrentRouteRequestPayload}\n * @memberof Events\n * @example\n * {\n * fromClosestContext: false,\n * fromContext: null,\n * fromParent: true,\n * fromVirtualTreeRoot: false,\n * nodeParams: {}\n * }\n */\nexport const GET_CURRENT_ROUTE_REQUEST = 'get-current-route-request';\n\n/**\n * Event fired to report that the micro frontend's navigation has completed.\n * @type {unspecified} (type is not relevant in this case)\n * @memberof Events\n */\nexport const NAVIGATION_COMPLETED_REPORT = 'report-navigation-completed-request';\n\n/**\n * Event fired when the micro frontend requests to update the modal path parameters. <br><br>\n * Payload: [ModalPathDataRequestPayload](https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts)\n * @type {ModalPathDataRequestPayload}\n * @memberof Events\n * @example\n * {\n * fromClosestContext: false,\n * fromContext: null,\n * fromParent: true,\n * fromVirtualTreeRoot: false,\n * history: true,\n * link: '/test/route',\n * modal: { title: 'Some modal' },\n * nodeParams: {}\n * }\n */\nexport const UPDATE_MODAL_PATH_DATA_REQUEST = 'update-modal-path-data-request';\n\n/**\n * Event fired when the micro frontend requests to update the modal settings. <br>\n * Read more about `updateModalSettings` params [here](https://docs.luigi-project.io/docs/luigi-client-api?section=updatemodalsettings). <br><br>\n * Payload: [ModalSettingsRequestPayload](https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts)\n * @type {ModalSettingsRequestPayload}\n * @memberof Events\n * @example\n * {\n * addHistoryEntry: true,\n * updatedModalSettings: {}\n * }\n */\nexport const UPDATE_MODAL_SETTINGS_REQUEST = 'update-modal-settings-request';\n\n/**\n * Event fired when the micro frontend requests to check the validity of a path. <br><br>\n * Payload: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\n * @type {Object.<string, string>}\n * @memberof Events\n * @example\n * {\n * link: '/test/route'\n * }\n */\nexport const CHECK_PATH_EXISTS_REQUEST = 'check-path-exists-request';\n\n/**\n * Event fired when the micro frontend requests to set the 'dirty status' which, for example, avoids closing when there are any unsaved changes. <br><br>\n * Payload: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\n * @type {Object.<string, boolean>}\n * @memberof Events\n * @example\n * {\n * dirty: true\n * }\n */\nexport const SET_DIRTY_STATUS_REQUEST = 'set-dirty-status-request';\n\n/**\n * Event fired when the micro frontend requests to set the view group data. <br><br>\n * Payload: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\n * @type {Object.<string, unknown>}\n * @memberof Events\n * @example\n * {\n * vg: 'some data'\n * }\n */\nexport const SET_VIEW_GROUP_DATA_REQUEST = 'set-viewgroup-data-request';\n\n/**\n * Event left due to historical reasons - do not use.\n * @deprecated\n * @ignore\n */\nexport const SET_DOCUMENT_TITLE_REQUEST = 'set-document-title-request';\n\n/**\n * Event left due to historical reasons - do not use.\n * @deprecated\n * @ignore\n */\nexport const OPEN_USER_SETTINGS_REQUEST = 'open-user-settings-request';\n\n/**\n * Event left due to historical reasons - do not use.\n * @deprecated\n * @ignore\n */\nexport const CLOSE_USER_SETTINGS_REQUEST = 'close-user-settings-request';\n\n/**\n * Event left due to historical reasons - do not use.\n * @deprecated\n * @ignore\n */\nexport const COLLAPSE_LEFT_NAV_REQUEST = 'collapse-leftnav-request';\n\n/**\n * Event left due to historical reasons - do not use.\n * @deprecated\n * @ignore\n */\nexport const UPDATE_TOP_NAVIGATION_REQUEST = 'update-top-navigation-request';\n\n/**\n * Event left due to historical reasons - use 'CHECK_PATH_EXISTS_REQUEST' instead.\n * @deprecated\n * @ignore\n */\nexport const PATH_EXISTS_REQUEST = 'path-exists-request';\n\n/**\n * Event fired when the micro frontend requests to navigate back. <br><br>\n * Payload: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\n * @type {Object.<string, unknown>}\n * @memberof Events\n * @example\n * {\n * ctx: 'some context'\n * }\n */\nexport const GO_BACK_REQUEST = 'go-back-request';\n\n/**\n * Event left due to historical reasons - do not use.\n * @deprecated\n * @ignore\n */\nexport const HAS_BACK_REQUEST = 'has-back-request';\n\n/**\n * Event fired when the micro frontend requests to display the backdrop.\n * @type {unspecified} (type is not relevant in this case)\n * @memberof Events\n */\nexport const ADD_BACKDROP_REQUEST = 'add-backdrop-request';\n\n/**\n * Event fired when the micro frontend requests to remove the backdrop.\n * @type {unspecified} (type is not relevant in this case)\n * @memberof Events\n */\nexport const REMOVE_BACKDROP_REQUEST = 'remove-backdrop-request';\n\n/**\n * Event fired when the micro frontend requests to close the current modal.\n * @type {unspecified} (type is not relevant in this case)\n * @memberof Events\n */\nexport const CLOSE_CURRENT_MODAL_REQUEST = 'close-current-modal-request';\n\n/* eslint-disable @typescript-eslint/no-unsafe-function-type */\nexport class LuigiEvent extends Event {\n payload?: unknown;\n detail: unknown;\n private callbackFn: Function | undefined;\n\n constructor(type: string, data: unknown, payload?: unknown, callback?: Function) {\n super(type);\n this.detail = data;\n this.payload = payload || data || {};\n this.callbackFn = callback;\n }\n\n callback(data: unknown): void {\n if (this.callbackFn) {\n // @ts-ignore\n this.callbackFn(data);\n }\n }\n}\n\n/**\n * @exports Events\n */\n// @ts-ignore\nexport const Events = {\n ADD_BACKDROP_REQUEST,\n ADD_NODE_PARAMS_REQUEST,\n ADD_SEARCH_PARAMS_REQUEST,\n ALERT_CLOSED,\n ALERT_REQUEST,\n BACK_NAVIGATION_REQUEST,\n CHECK_PATH_EXISTS_REQUEST,\n CLOSE_CURRENT_MODAL_REQUEST,\n CLOSE_USER_SETTINGS_REQUEST,\n COLLAPSE_LEFT_NAV_REQUEST,\n CUSTOM_MESSAGE,\n GET_CONTEXT_REQUEST,\n GET_CURRENT_ROUTE_REQUEST,\n GO_BACK_REQUEST,\n HAS_BACK_REQUEST,\n HIDE_LOADING_INDICATOR_REQUEST,\n INITIALIZED,\n LOCAL_STORAGE_SET_REQUEST,\n NAVIGATION_COMPLETED_REPORT,\n NAVIGATION_REQUEST,\n OPEN_USER_SETTINGS_REQUEST,\n PATH_EXISTS_REQUEST,\n REMOVE_BACKDROP_REQUEST,\n RUNTIME_ERROR_HANDLING_REQUEST,\n SET_ANCHOR_LINK_REQUEST,\n SET_CURRENT_LOCALE_REQUEST,\n SET_DIRTY_STATUS_REQUEST,\n SET_DOCUMENT_TITLE_REQUEST,\n SET_THIRD_PARTY_COOKIES_REQUEST,\n SET_VIEW_GROUP_DATA_REQUEST,\n SHOW_CONFIRMATION_MODAL_REQUEST,\n SHOW_LOADING_INDICATOR_REQUEST,\n UPDATE_MODAL_PATH_DATA_REQUEST,\n UPDATE_MODAL_SETTINGS_REQUEST,\n UPDATE_TOP_NAVIGATION_REQUEST\n};\n\nexport { Events as LuigiEvents };\n","/* eslint-disable @typescript-eslint/triple-slash-reference */\n/// <reference path=\"../../typings/constants/event-payloads.ts\" />\nimport type {\n AlertRequestPayload,\n CheckPathPostMessageData,\n ConfirmationModalRequestPayload,\n CurrentRoutePostMessageData,\n CurrentRouteRequestPayload,\n ModalPathDataRequestPayload,\n ModalSettingsRequestPayload,\n NavigationRequestPayload,\n ParamsRequestPayload\n} from 'EventPayloads';\nimport { Events, LuigiEvent } from '../constants/communication';\nimport type { ContainerElement, IframeHandle } from '../constants/container.model';\nimport { LuigiInternalMessageID } from '../constants/internal-communication';\n\nexport class ContainerService {\n /**\n * Checks if the given HTML element is visible in the DOM by considering both\n * its width/height and any client rectangles it may have.\n *\n * @param {HTMLElement} component - the HTML element to check for visibility\n * @returns {boolean} `true` if the element is visible, otherwise `false`\n */\n isVisible(component: HTMLElement): boolean {\n return !!(component.offsetWidth || component.offsetHeight || component.getClientRects().length);\n }\n\n /**\n * Sends a message to the iframe either with the custom keyword or any other message name\n * @param iframeHandle the iframe to send the message to\n * @param msg the message to be sent\n * @param msgName the optional message name\n */\n sendCustomMessageToIframe(iframeHandle: IframeHandle, msg: object, msgName?: string) {\n const messageName = msgName || 'custom';\n\n if (iframeHandle?.iframe?.contentWindow) {\n const iframeUrl = new URL(iframeHandle.iframe.src);\n if (messageName === 'custom') {\n iframeHandle.iframe.contentWindow.postMessage({ msg: messageName, data: msg }, iframeUrl.origin);\n } else {\n iframeHandle.iframe.contentWindow.postMessage({ msg: messageName, ...msg }, iframeUrl.origin);\n }\n } else {\n console.error('Message target could not be resolved');\n }\n }\n\n /**\n * Dispatch an event to the given target container with additional payload\n * @param {string} msg - the event message\n * @param {ContainerElement} targetCnt - the targeted HTML element onto which the event is dispatched\n * @param {Object} data - custom data added to the event to be dispatched\n * @param {Object | string} payload - additional data added to the event for internal objectives\n * @param {Function} callback - optional callback function\n */\n dispatchWithPayload(\n msg: string,\n targetCnt: ContainerElement,\n data: object,\n payload: object,\n callback?: (arg?) => void\n ): void {\n this.dispatch(msg, targetCnt, data, callback, payload);\n }\n\n /**\n * Dispatch an event to the given target container\n * @param {string} msg - the event message\n * @param {ContainerElement} targetCnt - the targeted HTML element onto which the event is dispatched\n * @param {Object} data - custom data added to the event to be dispatched\n * @param {Function} callback - optional callback function\n */\n dispatch(msg: string, targetCnt: ContainerElement, data: object, callback?: (arg?) => void, payload?: object): void {\n const customEvent = new LuigiEvent(msg, data, payload, callback);\n targetCnt.dispatchEvent(customEvent);\n }\n\n /**\n * Retrieves the target container based on the event source.\n *\n * @param event The event object representing the source of the container.\n * @returns {ContainerElement | undefined} the target container object or undefined if not found\n */\n getTargetContainer(event): ContainerElement | undefined {\n let cnt;\n\n globalThis.__luigi_container_manager.container.forEach((element) => {\n if (element.iframeHandle?.iframe && element.iframeHandle.iframe.contentWindow === event.source) {\n cnt = element;\n }\n });\n\n return cnt;\n }\n\n /**\n * Initializes the Luigi Container Manager responsible for managing communication\n * between microfrontends and dispatching events accordingly. Also adds 'message' listener to the window object with\n * the defined messageListener list\n * @returns __luigi_container_manager which has the added container array and message listeners\n */\n getContainerManager() {\n if (!globalThis.__luigi_container_manager) {\n globalThis.__luigi_container_manager = {\n container: [],\n messageListener: (event) => {\n // Handle incoming messages and dispatch events based on the message type\n // (Custom messages, navigation requests, alert requests, etc.)\n const targetCnt = this.getTargetContainer(event);\n const target = targetCnt?.iframeHandle?.iframe?.contentWindow;\n if (target && target === event.source) {\n // messages emitted from microfrontends\n const msg = event.data.msg;\n\n // dispatch an event depending on message\n switch (msg) {\n case LuigiInternalMessageID.CUSTOM_MESSAGE:\n {\n const evData = event.data.data;\n const id = evData.id;\n delete evData.id;\n this.dispatch(Events.CUSTOM_MESSAGE, targetCnt, {\n id: id,\n _metaData: {},\n data: evData\n });\n }\n break;\n case LuigiInternalMessageID.GET_CONTEXT:\n // Automatically send a luigi.init message to complete the initial handshake with the microfrontend\n target.postMessage(\n {\n msg: LuigiInternalMessageID.SEND_CONTEXT_HANDSHAKE,\n context: targetCnt.context || {},\n internal: {\n thirdPartyCookieCheck: {\n disabled: targetCnt.skipCookieCheck === 'true'\n },\n currentTheme: targetCnt.theme,\n currentLocale: targetCnt.locale,\n activeFeatureToggleList: targetCnt.activeFeatureToggleList || [],\n cssVariables: targetCnt.cssVariables || {},\n anchor: targetCnt.anchor || '',\n userSettings: targetCnt.userSettings || null,\n drawer: targetCnt.drawer || false,\n modal: targetCnt.modal || false,\n viewStackSize: targetCnt.viewStackSize || 0,\n isNavigateBack: targetCnt.isNavigateBack || false\n },\n authData: targetCnt.authData || {},\n nodeParams: targetCnt.nodeParams || {},\n searchParams: targetCnt.searchParams || {},\n pathParams: targetCnt.pathParams || {}\n },\n event.origin\n );\n break;\n case LuigiInternalMessageID.NAVIGATION_REQUEST: {\n this.dispatch(\n Events.NAVIGATION_REQUEST,\n targetCnt,\n event.data.params as NavigationRequestPayload,\n (val: any) => {\n target.postMessage(\n {\n msg: LuigiInternalMessageID.CLOSE_MODAL_ANSWER,\n data: val\n },\n event.origin\n );\n }\n );\n break;\n }\n case LuigiInternalMessageID.ALERT_REQUEST:\n this.dispatchWithPayload(\n Events.ALERT_REQUEST,\n targetCnt,\n event,\n event.data?.data?.settings as AlertRequestPayload,\n (dismissKey?: boolean | string) => {\n targetCnt.notifyAlertClosed(event.data?.data?.settings?.id, dismissKey);\n }\n );\n break;\n case LuigiInternalMessageID.INITIALIZED:\n this.dispatch(Events.INITIALIZED, targetCnt, event.data?.params || {});\n break;\n case LuigiInternalMessageID.ADD_SEARCH_PARAMS_REQUEST:\n this.dispatch(Events.ADD_SEARCH_PARAMS_REQUEST, targetCnt, {\n data: event.data.data,\n keepBrowserHistory: event.data.keepBrowserHistory\n } as ParamsRequestPayload);\n break;\n case LuigiInternalMessageID.ADD_NODE_PARAMS_REQUEST:\n this.dispatch(Events.ADD_NODE_PARAMS_REQUEST, targetCnt, {\n data: event.data.data,\n keepBrowserHistory: event.data.keepBrowserHistory\n } as ParamsRequestPayload);\n break;\n case LuigiInternalMessageID.SHOW_CONFIRMATION_MODAL_REQUEST:\n this.dispatchWithPayload(\n Events.SHOW_CONFIRMATION_MODAL_REQUEST,\n targetCnt,\n event.data.data,\n event.data.data?.settings as ConfirmationModalRequestPayload,\n (modalResult: boolean) => {\n targetCnt.notifyConfirmationModalClosed(modalResult);\n }\n );\n break;\n case LuigiInternalMessageID.SHOW_LOADING_INDICATOR_REQUEST:\n this.dispatch(Events.SHOW_LOADING_INDICATOR_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.HIDE_LOADING_INDICATOR_REQUEST:\n this.dispatch(Events.HIDE_LOADING_INDICATOR_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.SET_CURRENT_LOCALE_REQUEST:\n this.dispatchWithPayload(Events.SET_CURRENT_LOCALE_REQUEST, targetCnt, event, event.data.data);\n break;\n case LuigiInternalMessageID.LOCAL_STORAGE_SET_REQUEST:\n this.dispatchWithPayload(Events.LOCAL_STORAGE_SET_REQUEST, targetCnt, event, event.data.data?.params);\n break;\n case LuigiInternalMessageID.RUNTIME_ERROR_HANDLING_REQUEST:\n this.dispatch(Events.RUNTIME_ERROR_HANDLING_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.SET_ANCHOR_LINK_REQUEST:\n this.dispatchWithPayload(Events.SET_ANCHOR_LINK_REQUEST, targetCnt, event, event.data.anchor);\n break;\n case LuigiInternalMessageID.SET_THIRD_PARTY_COOKIES_REQUEST:\n this.dispatch(Events.SET_THIRD_PARTY_COOKIES_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.BACK_NAVIGATION_REQUEST:\n {\n let gbctx = event.data?.goBackContext || {};\n if (typeof gbctx === 'string') {\n try {\n gbctx = JSON.parse(gbctx);\n } catch (e) {\n console.warn(e);\n }\n }\n this.dispatch(Events.GO_BACK_REQUEST, targetCnt, gbctx);\n this.dispatch(Events.BACK_NAVIGATION_REQUEST, targetCnt, event); // for BW compatibility\n }\n break;\n case LuigiInternalMessageID.GET_CURRENT_ROUTE_REQUEST:\n this.dispatchWithPayload(\n Events.GET_CURRENT_ROUTE_REQUEST,\n targetCnt,\n event,\n event.data.data as CurrentRouteRequestPayload,\n (route: string) => {\n target.postMessage(\n {\n msg: LuigiInternalMessageID.SEND_CURRENT_ROUTE_ANSWER,\n data: {\n correlationId: event.data?.data?.id,\n route\n } as CurrentRoutePostMessageData\n },\n event.origin\n );\n }\n );\n break;\n case LuigiInternalMessageID.NAVIGATION_COMPLETED_REPORT:\n this.dispatch(Events.NAVIGATION_COMPLETED_REPORT, targetCnt, event);\n break;\n case LuigiInternalMessageID.UPDATE_MODAL_PATH_DATA_REQUEST:\n this.dispatchWithPayload(\n Events.UPDATE_MODAL_PATH_DATA_REQUEST,\n targetCnt,\n event,\n event.data.params as ModalPathDataRequestPayload\n );\n break;\n case LuigiInternalMessageID.UPDATE_MODAL_SETTINGS:\n this.dispatchWithPayload(Events.UPDATE_MODAL_SETTINGS_REQUEST, targetCnt, event, {\n addHistoryEntry: event.data.addHistoryEntry,\n updatedModalSettings: event.data.updatedModalSettings\n } as ModalSettingsRequestPayload);\n break;\n case LuigiInternalMessageID.CHECK_PATH_EXISTS_REQUEST:\n this.dispatchWithPayload(\n Events.CHECK_PATH_EXISTS_REQUEST,\n targetCnt,\n event,\n event.data.data,\n (pathExists: boolean) => {\n target.postMessage(\n {\n msg: LuigiInternalMessageID.SEND_PATH_EXISTS_ANSWER,\n data: {\n correlationId: event.data?.data?.id,\n pathExists\n } as CheckPathPostMessageData\n },\n event.origin\n );\n }\n );\n break;\n case LuigiInternalMessageID.SET_DIRTY_STATUS_REQUEST:\n this.dispatchWithPayload(Events.SET_DIRTY_STATUS_REQUEST, targetCnt, event, {\n dirty: event.data.dirty\n });\n break;\n case LuigiInternalMessageID.SET_VIEW_GROUP_DATA_REQUEST:\n this.dispatch(Events.SET_VIEW_GROUP_DATA_REQUEST, targetCnt, event.data.data);\n break;\n case LuigiInternalMessageID.ADD_BACKDROP_REQUEST:\n this.dispatch(Events.ADD_BACKDROP_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.REMOVE_BACKDROP_REQUEST:\n this.dispatch(Events.REMOVE_BACKDROP_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.CLOSE_CURRENT_MODAL_REQUEST:\n this.dispatch(Events.CLOSE_CURRENT_MODAL_REQUEST, targetCnt, event);\n break;\n }\n }\n }\n };\n window.addEventListener('message', globalThis.__luigi_container_manager.messageListener);\n }\n\n return globalThis.__luigi_container_manager;\n }\n\n /**\n * Adds thisComponent's object reference the the __luigi_container_manager container list\n *\n * @param {HTMLElement} thisComponent - HTML element that represents the current rendered container (`thisComponent`)\n */\n registerContainer(thisComponent: HTMLElement): void {\n this.getContainerManager().container.push(thisComponent);\n }\n}\n\nexport const containerService = new ContainerService();\n","import type { IframeHandle, ContainerElement } from '../constants/container.model';\nimport { LuigiInternalMessageID } from '../constants/internal-communication';\nimport { containerService } from '../services/container.service';\n\nexport class ContainerAPIFunctions {\n /**\n * Updates the context of the microfrontend by sending a message to the iframe that sets the context of the microfrontend\n * @param contextObj The context data\n * @param internal internal luigi legacy data\n * @param iframeHandle a reference to the iframe that is needed to send a message to it internally\n * @param nodeParams node parameters to be sent to the microfrontend\n * @param pathParams path parameters to be sent to the microfrontend\n * @param searchParams search parameters to be sent to the microfrontend\n */\n updateContext = (\n contextObj: object,\n internal?: object,\n iframeHandle?: IframeHandle,\n nodeParams?: object,\n pathParams?: object,\n searchParams?: object\n ) => {\n if (iframeHandle) {\n const internalParameter = internal || {};\n containerService.sendCustomMessageToIframe(\n iframeHandle,\n {\n context: contextObj,\n nodeParams: nodeParams || {},\n pathParams: pathParams || {},\n searchParams: searchParams || {},\n internal: internalParameter,\n // set withoutSync to true for the container case to avoid browser history changes from luigi client\n withoutSync: true\n },\n LuigiInternalMessageID.SEND_CONTEXT_OBJECT\n );\n } else {\n console.warn('Attempting to update context on inexisting iframe');\n }\n };\n\n /**\n * Updates route of the microfrontend by sending a message to the iframe that sets new view URL\n * @param viewUrl new view URL\n * @param context context data\n * @param internal internal luigi legacy data\n * @param iframeHandle a reference to the iframe that is needed to send a message to it internally\n */\n updateViewUrl = (viewUrl: string, context: object, internal?: object, iframeHandle?: IframeHandle) => {\n if (iframeHandle) {\n const internalParameter = internal || {};\n containerService.sendCustomMessageToIframe(\n iframeHandle,\n {\n context,\n internal: internalParameter,\n withoutSync: false,\n viewUrl\n },\n LuigiInternalMessageID.SEND_CONTEXT_OBJECT\n );\n } else {\n console.warn('Attempting to update route on inexisting iframe');\n }\n };\n\n /**\n * Updates the auth data of the microfrontend by sending a message to the iframe that sets the authData of the microfrontend\n * @param iframeHandle a reference to the iframe that is needed to send a message to it internally\n * @param authData the authData object being sent to the microfrontend\n */\n updateAuthData = (iframeHandle: IframeHandle, authData: object) => {\n if (iframeHandle && authData) {\n containerService.sendCustomMessageToIframe(iframeHandle, { authData }, LuigiInternalMessageID.AUTH_SET_TOKEN);\n } else {\n console.warn('Attempting to update auth data on inexisting iframe or authData');\n }\n };\n\n /**\n * Send a custom message to the referenced iframe or web component\n * @param id a string containing the message id\n * @param mainComponent a reference to the web component to be affected\n * @param isWebcomponent predicate showing if currently referencing a web component or not\n * @param iframeHandle a reference to the iframe to be affected\n * @param data data to be sent alongside the custom message\n */\n sendCustomMessage = (\n id: string,\n mainComponent: ContainerElement,\n isWebcomponent: boolean,\n iframeHandle: IframeHandle,\n data?: object\n ) => {\n if (isWebcomponent && mainComponent._luigi_mfe_webcomponent) {\n containerService.dispatch(id, mainComponent._luigi_mfe_webcomponent, data);\n } else {\n const msg = { ...data };\n if (msg['id']) {\n console.warn('Property \"id\" is reserved and can not be used in custom message data');\n }\n msg['id'] = id;\n containerService.sendCustomMessageToIframe(iframeHandle, msg);\n }\n };\n\n /**\n * Send a message to the microfrontend notifying the alert has been closed\n * @param id the id of the alert being closed\n * @param dismissKey the dismiss key being sent if any (optional)\n * @param iframeHandle the handle of the iframe to send the message to (optional)\n */\n notifyAlertClosed(id: string, dismissKey?: string, iframeHandle?: IframeHandle) {\n const message = dismissKey ? { id, dismissKey } : { id };\n containerService.sendCustomMessageToIframe(iframeHandle, message, LuigiInternalMessageID.ALERT_CLOSED);\n }\n\n /**\n * Send a message to the microfrontend notifying the modal has been closed\n * @param modalResult the result of the modal being closed\n * @param iframeHandle the handle of the iframe to send the message to (optional)\n */\n notifyConfirmationModalClosed = (modalResult: boolean, iframeHandle?: IframeHandle) => {\n const message = { data: { confirmed: modalResult } };\n containerService.sendCustomMessageToIframe(iframeHandle, message, LuigiInternalMessageID.CONFIRMATION_MODAL_CLOSED);\n };\n}\n\nexport const ContainerAPI = new ContainerAPIFunctions();\n","/**\n * Retrieves the allow rules for iframes and modifies them according to w3c standard conditions.\n * @param {string[]} allowRules - qn array of allow rules\n * @returns {string|undefined} the modified allow rules joined as a single string, or undefined if allowRules is falsy\n */\nexport const getAllowRules = (allowRules: string[]) => {\n if (!allowRules) return undefined;\n const rules = allowRules;\n rules.forEach((rule, index) => {\n rules[index] = rule + (rule.indexOf(';') != -1 ? '' : ';');\n rules[index] = allowRules[index].replaceAll('\"', \"'\");\n });\n return rules.join(' ');\n};\n","import type {\n LayoutConfig,\n RendererConfig,\n RendererLayout,\n RendererObject,\n RendererUseProps\n} from '../constants/container.model';\n\n/**\n * Default compound renderer.\n */\nexport class DefaultCompoundRenderer {\n rendererObject: RendererObject;\n config: RendererConfig;\n\n constructor(rendererObj?: RendererObject) {\n if (rendererObj) {\n this.rendererObject = rendererObj;\n this.config = rendererObj.config || {};\n } else {\n this.config = {};\n }\n }\n\n createCompoundContainer(): HTMLDivElement {\n return document.createElement('div');\n }\n\n createCompoundItemContainer(layoutConfig?: object): HTMLDivElement {\n return document.createElement('div');\n }\n\n attachCompoundItem(compoundCnt: HTMLElement, compoundItemCnt: HTMLElement): void {\n compoundCnt.appendChild(compoundItemCnt);\n }\n}\n\n/**\n * Compound Renderer for custom rendering as defined in luigi config.\n */\nexport class CustomCompoundRenderer extends DefaultCompoundRenderer {\n superRenderer: DefaultCompoundRenderer;\n\n constructor(rendererObj: RendererObject) {\n super(rendererObj || { use: {} });\n if (rendererObj && rendererObj.use && (rendererObj.use as RendererUseProps).extends) {\n this.superRenderer = resolveRenderer({\n use: (rendererObj.use as RendererUseProps).extends,\n config: rendererObj.config\n });\n }\n }\n\n createCompoundContainer(): HTMLDivElement {\n if ((this.rendererObject.use as RendererUseProps).createCompoundContainer) {\n return (this.rendererObject.use as RendererUseProps).createCompoundContainer(this.config, this.superRenderer);\n } else if (this.superRenderer) {\n return this.superRenderer.createCompoundContainer();\n }\n return super.createCompoundContainer();\n }\n\n createCompoundItemContainer(layoutConfig): HTMLDivElement {\n if ((this.rendererObject.use as RendererUseProps).createCompoundItemContainer) {\n return (this.rendererObject.use as RendererUseProps).createCompoundItemContainer(\n layoutConfig,\n this.config,\n this.superRenderer\n );\n } else if (this.superRenderer) {\n return this.superRenderer.createCompoundItemContainer(layoutConfig);\n }\n return super.createCompoundItemContainer(layoutConfig);\n }\n\n attachCompoundItem(compoundCnt, compoundItemCnt): void {\n if ((this.rendererObject.use as RendererUseProps).attachCompoundItem) {\n (this.rendererObject.use as RendererUseProps).attachCompoundItem(\n compoundCnt,\n compoundItemCnt,\n this.superRenderer\n );\n } else if (this.superRenderer) {\n this.superRenderer.attachCompoundItem(compoundCnt, compoundItemCnt);\n } else {\n super.attachCompoundItem(compoundCnt, compoundItemCnt);\n }\n }\n}\n\n/**\n * Compound Renderer for a css grid compound view.\n */\nexport class GridCompoundRenderer extends DefaultCompoundRenderer {\n createCompoundContainer(): HTMLDivElement {\n const containerClass = '__lui_compound_' + new Date().getTime();\n const compoundCnt = document.createElement('div');\n compoundCnt.classList.add(containerClass);\n let mediaQueries = '';\n\n if (this.config.layouts) {\n this.config.layouts.forEach((el: RendererLayout) => {\n if (el.minWidth || el.maxWidth) {\n let mq = '@media only screen ';\n if (el.minWidth != null) {\n mq += `and (min-width: ${el.minWidth}px) `;\n }\n if (el.maxWidth != null) {\n mq += `and (max-width: ${el.maxWidth}px) `;\n }\n\n mq += `{\n .${containerClass} {\n grid-template-columns: ${el.columns || 'auto'};\n grid-template-rows: ${el.rows || 'auto'};\n grid-gap: ${el.gap || '0'};\n }\n }\n `;\n mediaQueries += mq;\n }\n });\n }\n\n compoundCnt.innerHTML = /* html */ `\n <style scoped>\n .${containerClass} {\n display: grid;\n grid-template-columns: ${this.config.columns || 'auto'};\n grid-template-rows: ${this.config.rows || 'auto'};\n grid-gap: ${this.config.gap || '0'};\n min-height: ${this.config.minHeight || 'auto'};\n }\n ${mediaQueries}\n </style>\n `;\n return compoundCnt;\n }\n\n createCompoundItemContainer(layoutConfig: LayoutConfig): HTMLDivElement {\n const config = layoutConfig || {};\n const compoundItemCnt = document.createElement('div');\n compoundItemCnt.setAttribute('style', `grid-row: ${config.row || 'auto'}; grid-column: ${config.column || 'auto'}`);\n compoundItemCnt.classList.add('lui-compoundItemCnt');\n return compoundItemCnt;\n }\n}\n\n/**\n * Returns the compound renderer class for a given config.\n * If no specific one is found, {DefaultCompoundRenderer} is returned.\n *\n * @param {*} rendererConfig - the renderer config object defined in luigi config\n */\nexport const resolveRenderer = (rendererConfig: RendererObject) => {\n const rendererDef: RendererUseProps | string = rendererConfig.use;\n if (!rendererDef) {\n return new DefaultCompoundRenderer(rendererConfig);\n } else if (rendererDef === 'grid') {\n return new GridCompoundRenderer(rendererConfig);\n } else if (\n (rendererDef as RendererUseProps).createCompoundContainer ||\n (rendererDef as RendererUseProps).createCompoundItemContainer ||\n (rendererDef as RendererUseProps).attachCompoundItem\n ) {\n return new CustomCompoundRenderer(rendererConfig);\n }\n return new DefaultCompoundRenderer(rendererConfig);\n};\n\n/**\n * Registers event listeners defined at the navNode.\n *\n * @param {*} eventbusListeners - a map of event listener arrays with event id as key\n * @param {*} navNode - the web component node configuration object\n * @param {*} nodeId - the web component node id\n * @param {*} wcElement - the web component element - optional\n */\nexport const registerEventListeners = (eventbusListeners, navNode, nodeId: string, wcElement?) => {\n if (navNode?.eventListeners) {\n navNode.eventListeners.forEach((el) => {\n const evID = el.source + '.' + el.name;\n const listenerList = eventbusListeners[evID];\n const listenerInfo = {\n wcElementId: nodeId,\n wcElement: wcElement,\n action: el.action,\n converter: el.dataConverter\n };\n\n if (listenerList) {\n listenerList.push(listenerInfo);\n } else {\n eventbusListeners[evID] = [listenerInfo];\n }\n });\n }\n};\n\n/**\n * Desanitization of an object\n * @param {Object} paramsMap\n * @returns\n */\nexport const deSanitizeParamsMap = (paramsMap) => {\n return Object.entries(paramsMap).reduce((sanitizedMap, paramPair) => {\n sanitizedMap[deSanitizeParam(paramPair[0])] = deSanitizeParam(paramPair[1]);\n return sanitizedMap;\n }, {});\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction deSanitizeParam(value: any): string {\n const desani = String(value)\n .replaceAll('<', '<')\n .replaceAll('>', '>')\n .replaceAll('"', '\"')\n .replaceAll(''', \"'\")\n .replaceAll('/', '/');\n return desani;\n}\n","/* eslint no-prototype-builtins: 0 */\nimport {\n DefaultCompoundRenderer,\n resolveRenderer,\n registerEventListeners,\n deSanitizeParamsMap\n} from './web-component-helpers';\nimport { ContainerService } from './container.service';\nimport { Events } from '../constants/communication';\nimport type {\n ContainerElement,\n LayoutConfig,\n WebComponentNode,\n WebComponentRenderer\n} from '../constants/container.model';\n\n/** Methods for dealing with web components based micro frontend handling */\nexport class WebComponentService {\n containerService: ContainerService;\n thisComponent: ContainerElement;\n alertResolvers: Record<string, (value: unknown) => void> = {};\n alertIndex = 0;\n modalResolver: { resolve: () => void; reject: () => void };\n\n constructor() {\n this.containerService = new ContainerService();\n }\n\n dynamicImport(viewUrl: string) {\n // Object.freeze() used as potential marker for bundlers other than webpack\n return Object.freeze(import(/* webpackIgnore: true */ viewUrl));\n }\n\n processViewUrl(viewUrl: string, data?: object): string {\n return viewUrl;\n }\n\n /**\n * Attaches a web component with tagname wc_id and adds it to wcItemContainer,\n * if attached to wc_container\n *\n * @param wc_id a tagname that is used when creating the web component element\n * @param wcItemPlaceholder placeholder for web component container\n * @param wc_container web component container element\n * @param ctx context to be passed to the web component\n * @param viewUrl url to render content from\n * @param nodeId refers to an attribute of the web component to be identified from the rest\n * @param isCompoundChild defines if rendered mf is a compound child or not\n */\n attachWC(\n wc_id: string,\n wcItemPlaceholder: HTMLDivElement,\n wc_container: ContainerElement,\n ctx: object,\n viewUrl: string,\n nodeId: string,\n isCompoundChild?: boolean\n ) {\n if (wc_container && wc_container.contains(wcItemPlaceholder)) {\n const wc = document.createElement(wc_id);\n if (nodeId) {\n wc.setAttribute('nodeId', nodeId);\n }\n wc.setAttribute('lui_web_component', 'true');\n\n this.initWC(wc, wc_id, wc_container, viewUrl, ctx, nodeId, isCompoundChild);\n wc_container.replaceChild(wc, wcItemPlaceholder);\n if (wc_container._luigi_node) {\n wc_container._luigi_mfe_webcomponent = wc;\n }\n wc_container.dispatchEvent(new Event('wc_ready'));\n }\n }\n\n /**\n * Function that uses the current instance of the containerService to dispatch a Luigi event to the current instance of the container\n * that is 'thisComponent'\n * @param msg the message to be delivered\n * @param data the data to be sent\n * @param callback the callback function to be called\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n dispatchLuigiEvent(msg: string, data: object, callback?: (arg?: any) => void) {\n this.containerService.dispatch(msg, this.thisComponent, data, callback);\n }\n\n /**\n * This function is used to create the Luigi Client API for the web-component-based micro frontend.\n * As the function expands with more functionality, it might be moved to a separate class.\n *\n * The client API here should be a reflection of the Core WC Client api from core/src/services/web-components.js\n *\n * @param eventBusElement the event bus to be used for cross web component communication, i.e.: for compound micro frontends container scenario\n * @param nodeId refers to an attribute of the web component to be identified from the rest\n * @param wc_id a tagname that is used when creating the web component element\n * @param component\n * @param isCompoundChild defines if rendered mf is a compound child or not\n * @returns an object with the Luigi Client API\n */\n createClientAPI(\n eventBusElement: ContainerElement,\n nodeId: string,\n wc_id: string,\n component: HTMLElement,\n isCompoundChild?: boolean\n ) {\n return {\n linkManager: () => {\n let fromContext = null;\n let fromClosestContext = false;\n let fromVirtualTreeRoot = false;\n let fromParent = false;\n let nodeParams = {};\n\n const linkManagerInstance = {\n navigate: (route, settings = {}) => {\n const options = {\n fromContext,\n fromClosestContext,\n fromVirtualTreeRoot,\n fromParent,\n nodeParams,\n ...settings\n };\n this.dispatchLuigiEvent(Events.NAVIGATION_REQUEST, {\n link: route,\n ...options\n });\n },\n navigateToIntent: (semanticSlug: string, params = {}): void => {\n let newPath = '#?intent=';\n\n newPath += semanticSlug;\n\n if (params && Object.keys(params)?.length) {\n const paramList = Object.entries(params);\n\n // append parameters to the path if any\n if (paramList.length > 0) {\n newPath += '?';\n\n for (const [key, value] of paramList) {\n newPath += key + '=' + value + '&';\n }\n\n // trim potential excessive ampersand & at the end\n newPath = newPath.slice(0, -1);\n }\n }\n\n linkManagerInstance.navigate(newPath);\n },\n fromClosestContext: () => {\n fromClosestContext = true;\n return linkManagerInstance;\n },\n fromContext: (navigationContext) => {\n fromContext = navigationContext;\n return linkManagerInstance;\n },\n fromVirtualTreeRoot: () => {\n fromVirtualTreeRoot = true;\n return linkManagerInstance;\n },\n fromParent: () => {\n fromParent = true;\n return linkManagerInstance;\n },\n getCurrentRoute: () => {\n const options = {\n fromContext,\n fromClosestContext,\n fromVirtualTreeRoot,\n fromParent,\n nodeParams\n };\n return new Promise((resolve, reject) => {\n this.containerService.dispatch(\n Events.GET_CURRENT_ROUTE_REQUEST,\n this.thisComponent,\n { ...options },\n (route) => {\n if (route) {\n resolve(route);\n } else {\n reject('No current route received.');\n }\n }\n );\n });\n },\n withParams: (params) => {\n nodeParams = params;\n return linkManagerInstance;\n },\n updateModalPathInternalNavigation: (path: string, modalSettings = {}, addHistoryEntry = false): void => {\n if (!path) {\n console.warn('Updating path of the modal upon internal navigation prevented. No path specified.');\n return;\n }\n\n const options = {\n fromClosestContext,\n fromContext,\n fromParent,\n fromVirtualTreeRoot,\n nodeParams\n };\n\n this.dispatchLuigiEvent(\n Events.UPDATE_MODAL_PATH_DATA_REQUEST,\n Object.assign(options, {\n history: addHistoryEntry,\n link: path,\n modal: modalSettings\n })\n );\n },\n updateTopNavigation: (): void => {\n this.dispatchLuigiEvent(Events.UPDATE_TOP_NAVIGATION_REQUEST, {});\n },\n pathExists: (link: string) => {\n const options = {\n fromContext,\n fromClosestContext,\n fromVirtualTreeRoot,\n fromParent,\n nodeParams\n };\n return new Promise((resolve, reject) => {\n this.containerService.dispatch(\n Events.CHECK_PATH_EXISTS_REQUEST,\n this.thisComponent,\n { ...options, link },\n (exists) => {\n if (exists) {\n resolve(true);\n } else {\n reject(false);\n }\n }\n );\n // For BW compatibility\n this.containerService.dispatch(\n Events.PATH_EXISTS_REQUEST,\n this.thisComponent,\n { ...options, link },\n (exists) => {\n if (exists) {\n resolve(true);\n } else {\n reject(false);\n }\n }\n );\n });\n },\n openAsDrawer: (route, drawerSettings = {}) => {\n linkManagerInstance.navigate(route, { drawer: drawerSettings });\n },\n openAsModal: (route, modalSettings = {}) => {\n linkManagerInstance.navigate(route, { modal: modalSettings });\n },\n openAsSplitView: (route, splitViewSettings = {}) => {\n linkManagerInstance.navigate(route, {\n splitView: splitViewSettings\n });\n },\n goBack: (goBackContext) => {\n this.dispatchLuigiEvent(Events.GO_BACK_REQUEST, goBackContext);\n },\n hasBack: () => {\n return false;\n },\n updateModalSettings: (modalSettings = {}, addHistoryEntry = false) => {\n this.dispatchLuigiEvent(Events.UPDATE_MODAL_SETTINGS_REQUEST, {\n updatedModalSettings: modalSettings,\n addHistoryEntry\n });\n }\n };\n return linkManagerInstance;\n },\n uxManager: () => {\n return {\n showAlert: (alertSettings) => {\n alertSettings.id = this.alertIndex++;\n return new Promise((resolve) => {\n this.alertResolvers[alertSettings.id] = resolve;\n this.dispatchLuigiEvent(Events.ALERT_REQUEST, alertSettings, (dismissKey?: boolean | string) => {\n this.resolveAlert(alertSettings.id, dismissKey);\n });\n });\n },\n showConfirmationModal: (settings) => {\n return new Promise<void>((resolve, reject) => {\n this.modalResolver = { resolve, reject };\n this.containerService.dispatch(\n Events.SHOW_CONFIRMATION_MODAL_REQUEST,\n this.thisComponent,\n settings,\n (confirmed) => {\n if (confirmed) {\n resolve();\n } else {\n reject();\n }\n }\n );\n });\n },\n getCurrentTheme: (): string | undefined => {\n return this.thisComponent.theme;\n },\n closeUserSettings: () => {\n this.dispatchLuigiEvent(Events.CLOSE_USER_SETTINGS_REQUEST, this.thisComponent.userSettings);\n },\n openUserSettings: () => {\n this.dispatchLuigiEvent(Events.OPEN_USER_SETTINGS_REQUEST, this.thisComponent.userSettings);\n },\n collapseLeftSideNav: () => {\n this.dispatchLuigiEvent(Events.COLLAPSE_LEFT_NAV_REQUEST, {});\n },\n getDirtyStatus: () => {\n return this.thisComponent.dirtyStatus || false;\n },\n getDocumentTitle: () => {\n return this.thisComponent.documentTitle;\n },\n setDocumentTitle: (title) => {\n this.dispatchLuigiEvent(Events.SET_DOCUMENT_TITLE_REQUEST, title);\n },\n setDirtyStatus: (isDirty: boolean) => {\n this.dispatchLuigiEvent(Events.SET_DIRTY_STATUS_REQUEST, { dirty: isDirty });\n },\n setCurrentLocale: (locale: string) => {\n if (locale) {\n this.dispatchLuigiEvent(Events.SET_CURRENT_LOCALE_REQUEST, { currentLocale: locale });\n }\n },\n removeBackdrop: () => {\n this.dispatchLuigiEvent(Events.REMOVE_BACKDROP_REQUEST, {});\n },\n addBackdrop: () => {\n this.dispatchLuigiEvent(Events.ADD_BACKDROP_REQUEST, {});\n },\n showLoadingIndicator: () => {\n this.dispatchLuigiEvent(Events.SHOW_LOADING_INDICATOR_REQUEST, {});\n },\n hideLoadingIndicator: () => {\n this.dispatchLuigiEvent(Events.HIDE_LOADING_INDICATOR_REQUEST, {});\n },\n hideAppLoadingIndicator: () => {\n this.dispatchLuigiEvent(Events.HIDE_LOADING_INDICATOR_REQUEST, {});\n },\n closeCurrentModal: () => {\n this.dispatchLuigiEvent(Events.CLOSE_CURRENT_MODAL_REQUEST, {});\n }\n };\n },\n getCurrentLocale: (): string | undefined => {\n return this.thisComponent.locale;\n },\n getActiveFeatureToggles: (): string[] => {\n return this.thisComponent.activeFeatureToggleList || [];\n },\n publishEvent: (ev) => {\n if (eventBusElement && eventBusElement.eventBus) {\n // compound component use case only\n eventBusElement.eventBus.onPublishEvent(ev, nodeId, wc_id);\n }\n const payload = {\n id: ev.type,\n _metaData: {\n nodeId,\n wc_id,\n src: component\n },\n data: ev.detail\n };\n this.dispatchLuigiEvent(Events.CUSTOM_MESSAGE, payload);\n },\n luigiClientInit: () => {\n this.dispatchLuigiEvent(Events.INITIALIZED, {});\n },\n addNodeParams: (params, keepBrowserHistory) => {\n if (isCompoundChild) {\n return;\n }\n this.dispatchLuigiEvent(Events.ADD_NODE_PARAMS_REQUEST, {\n params,\n data: params,\n keepBrowserHistory\n });\n },\n getNodeParams: (shouldDesanitise: boolean): object => {\n if (isCompoundChild) {\n return {};\n }\n if (shouldDesanitise) {\n return deSanitizeParamsMap(this.thisComponent.nodeParams);\n }\n return this.thisComponent.nodeParams || {};\n },\n setAnchor: (anchor) => {\n if (isCompoundChild) {\n return;\n }\n this.dispatchLuigiEvent(Events.SET_ANCHOR_LINK_REQUEST, anchor);\n },\n getAnchor: (): string => {\n return this.thisComponent.anchor || '';\n },\n getCoreSearchParams: (): object => {\n return this.thisComponent.searchParams || {};\n },\n getPathParams: (): object => {\n return this.thisComponent.pathParams || {};\n },\n getClientPermissions: (): object => {\n return this.thisComponent.clientPermissions || {};\n },\n addCoreSearchParams: (searchParams = {}, keepBrowserHistory = true) => {\n this.dispatchLuigiEvent(Events.ADD_SEARCH_PARAMS_REQUEST, { data: searchParams, keepBrowserHistory });\n },\n getUserSettings: (): object => {\n return this.thisComponent.userSettings || {};\n },\n setViewGroupData: (data) => {\n this.dispatchLuigiEvent(Events.SET_VIEW_GROUP_DATA_REQUEST, data);\n }\n };\n }\n\n /**\n * Attaches Client Api to web component\n * if __postProcess defined allow for custom setting of clientApi when developers want to decide how to add it to their mf\n * otherwise just attach it to the wc webcomponent alongside the context directly.\n *\n * @param wc web component to attach to\n * @param wc_id a tagname that is used when creating the web component element\n * @param eventBusElement the event bus to be used for cross web component communication, i.e.: for compound micro frontends container scenario\n * @param viewUrl url to render content from\n * @param ctx context to be passed to the web component\n * @param nodeId refers to an attribute of the web component to be identified from the rest\n * @param isCompoundChild defines if rendered mf is a compound child or not\n */\n initWC(\n wc: HTMLElement | any, // eslint-disable-line @typescript-eslint/no-explicit-any\n wc_id: string,\n eventBusElement: ContainerElement,\n viewUrl: string,\n ctx: object,\n nodeId: string,\n isCompoundChild?: boolean\n ) {\n const clientAPI = this.createClientAPI(eventBusElement, nodeId, wc_id, wc, isCompoundChild);\n\n if (wc.__postProcess) {\n const url =\n new URL(document.baseURI).origin === new URL(viewUrl, document.baseURI).origin\n ? new URL('./', new URL(viewUrl, document.baseURI))\n : new URL('./', viewUrl);\n wc.__postProcess(ctx, clientAPI, url.origin + url.pathname);\n } else {\n wc.context = ctx;\n wc.LuigiClient = clientAPI;\n }\n }\n\n /**\n * Generates a unique web component id (tagname) based on the viewUrl\n * returns a string that can be used as part of a tagname, only alphanumeric\n * characters and no whitespaces.\n */\n generateWCId(viewUrl: string): string {\n let charRep = '';\n const normalizedViewUrl = new URL(viewUrl, encodeURI(location.href)).href;\n for (let i = 0; i < normalizedViewUrl.length; i++) {\n charRep += normalizedViewUrl.charCodeAt(i).toString(16);\n }\n return 'luigi-wc-' + charRep;\n }\n\n /**\n * Does a module import from viewUrl and defines a new web component\n * with the default export of the module or the first export extending HTMLElement if no default is\n * specified.\n * @param viewUrl url to render content from\n * @param wc_id a tagname that is used when creating the web component element\n * @returns a promise that gets resolved after successfull import\n */\n registerWCFromUrl(viewUrl: string, wc_id: string): Promise<unknown> {\n const i18nViewUrl = this.processViewUrl(viewUrl);\n return new Promise((resolve, reject) => {\n if (this.checkWCUrl(i18nViewUrl)) {\n this.dynamicImport(i18nViewUrl)\n .then((module) => {\n try {\n if (!window.customElements.get(wc_id)) {\n let cmpClazz = module.default;\n if (!HTMLElement.isPrototypeOf(cmpClazz)) {\n const props = Object.keys(module);\n for (let i = 0; i < props.length; i++) {\n cmpClazz = module[props[i]];\n if (HTMLElement.isPrototypeOf(cmpClazz)) {\n break;\n }\n }\n }\n window.customElements.define(wc_id, cmpClazz);\n }\n resolve(1);\n } catch (err) {\n reject(err);\n }\n })\n .catch((err) => {\n reject(err);\n });\n } else {\n const message = `Error: View URL '${i18nViewUrl}' not allowed to be included`;\n reject(message);\n }\n });\n }\n\n /**\n * Handles the import of self registered web component bundles, i.e. the web component\n * is added to the customElements registry by the bundle code rather than by luigi.\n *\n * @param {*} node - the corresponding navigation node\n * @param {*} viewUrl - the source of the wc bundle\n * @param {*} onload - callback function executed after script attached and loaded\n */\n includeSelfRegisteredWCFromUrl(node: WebComponentNode, viewUrl: string, onload: () => void) {\n if (this.checkWCUrl(viewUrl)) {\n /** Append reg function to luigi object if not present */\n if (!this.containerService.getContainerManager()._registerWebcomponent) {\n this.containerService.getContainerManager()._registerWebcomponent = (srcString, el) => {\n window.customElements.define(this.generateWCId(srcString), el);\n };\n }\n // @ts-ignore\n if (!window['Luigi']) {\n // @ts-ignore\n window.Luigi = {};\n // @ts-ignore\n if (!window['Luigi']['_registerWebcomponent']) {\n // @ts-ignore\n window.Luigi._registerWebcomponent = (src, element) => {\n this.containerService.getContainerManager()._registerWebcomponent(src, element);\n };\n }\n }\n const scriptTag = document.createElement('script');\n scriptTag.setAttribute('src', viewUrl);\n if (node.webcomponent.type === 'module') {\n scriptTag.setAttribute('type', 'module');\n }\n scriptTag.setAttribute('defer', 'true');\n scriptTag.addEventListener('load', () => {\n onload();\n });\n document.body.appendChild(scriptTag);\n } else {\n console.warn(`View URL '${viewUrl}' not allowed to be included`);\n }\n }\n\n /**\n * Checks if a url is allowed to be included, based on 'navigation.validWebcomponentUrls' in luigi config.\n * Returns true, if allowed.\n *\n * @param {*} url - the url string to check\n */\n checkWCUrl(url: string): boolean {\n // if (url.indexOf('://') > 0 || url.trim().indexOf('//') === 0) {\n // const ur = new URL(url);\n // if (ur.host === window.location.host) {\n // return true; // same host is okay\n // }\n\n // const valids = LuigiConfig.getConfigValue('navigation.validWebcomponentUrls');\n // if (valids && valids.length > 0) {\n // for (let el of valids) {\n // try {\n // if (new RegExp(el).test(url)) {\n // return true;\n // }\n // } catch (e) {\n // console.error(e);\n // }\n // }\n // }\n // return false;\n // }\n // relative URL is okay\n // if (url === 'test.js') {\n // return false;\n // }\n return true;\n }\n\n /**\n * Adds a web component defined by viewUrl to the wc_container and sets the node context.\n * If the web component is not defined yet, it gets imported.\n *\n * @param viewUrl url to render content from\n * @param wc_container web component container element\n * @param context luigi context\n * @param node node to operate on\n * @param nodeId id identifying the node\n * @param isCompoundChild defines if rendered mf is a compound child or not\n */\n renderWebComponent(\n viewUrl: string,\n wc_container: HTMLElement | any, // eslint-disable-line @typescript-eslint/no-explicit-any\n context: object,\n node: WebComponentNode,\n nodeId?: string,\n isCompoundChild?: boolean\n ) {\n const i18nViewUrl = this.processViewUrl(viewUrl, { context });\n const wc_id = node?.webcomponent?.tagName || this.generateWCId(i18nViewUrl);\n const wcItemPlaceholder = document.createElement('div');\n wc_container.appendChild(wcItemPlaceholder);\n wc_container._luigi_node = node;\n\n if (window.customElements.get(wc_id)) {\n this.attachWC(wc_id, wcItemPlaceholder, wc_container, context, i18nViewUrl, nodeId, isCompoundChild);\n } else {\n /** Custom import function, if defined */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if ((window as any).luigiWCFn) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (window as any).luigiWCFn(i18nViewUrl, wc_id, wcItemPlaceholder, () => {\n this.attachWC(wc_id, wcItemPlaceholder, wc_container, context, i18nViewUrl, nodeId, isCompoundChild);\n });\n } else if (node?.webcomponent?.selfRegistered) {\n this.includeSelfRegisteredWCFromUrl(node, i18nViewUrl, () => {\n this.attachWC(wc_id, wcItemPlaceholder, wc_container, context, i18nViewUrl, nodeId, isCompoundChild);\n });\n } else {\n this.registerWCFromUrl(i18nViewUrl, wc_id)\n .then(() => {\n this.attachWC(wc_id, wcItemPlaceholder, wc_container, context, i18nViewUrl, nodeId, isCompoundChild);\n })\n .catch((error) => {\n console.warn('ERROR =>', error);\n // dispatch an error event to be handled core side\n this.containerService.dispatch(Events.RUNTIME_ERROR_HANDLING_REQUEST, this.thisComponent, error);\n });\n }\n }\n }\n\n /**\n * Creates a compound container according to the given renderer.\n * Returns a promise that gets resolved with the created container DOM element.\n *\n * @param {DefaultCompoundRenderer} renderer\n */\n createCompoundContainerAsync(\n renderer: WebComponentRenderer,\n ctx: object,\n navNode: WebComponentNode\n ): Promise<HTMLElement> {\n return new Promise((resolve, reject) => {\n if (renderer.viewUrl) {\n try {\n const wc_id = navNode?.webcomponent?.tagName || this.generateWCId(renderer.viewUrl);\n if (navNode?.webcomponent?.selfRegistered) {\n this.includeSelfRegisteredWCFromUrl(navNode, renderer.viewUrl, () => {\n const wc = document.createElement(wc_id);\n wc.setAttribute('lui_web_component', 'true');\n this.initWC(wc, wc_id, wc, renderer.viewUrl, ctx, '_root');\n resolve(wc);\n });\n } else {\n this.registerWCFromUrl(renderer.viewUrl, wc_id)\n .then(() => {\n const wc = document.createElement(wc_id);\n wc.setAttribute('lui_web_component', 'true');\n this.initWC(wc, wc_id, wc, renderer.viewUrl, ctx, '_root');\n resolve(wc);\n })\n .catch((error) => {\n console.warn('Error: ', error);\n // dispatch an error event to be handled core side\n this.containerService.dispatch(Events.RUNTIME_ERROR_HANDLING_REQUEST, this.thisComponent, error);\n });\n }\n } catch (error) {\n reject(error);\n }\n } else {\n resolve(renderer.createCompoundContainer());\n }\n });\n }\n\n /**\n * Responsible for rendering web component compounds based on a renderer or a nesting\n * micro frontend.\n *\n * @param {*} navNode - the navigation node defining the compound\n * @param {ContainerElement} wc_container - the web component container dom element\n * @param {*} context - the luigi node context\n */\n renderWebComponentCompound(\n navNode: WebComponentNode,\n wc_container: ContainerElement,\n context: object\n ): Promise<ContainerElement> {\n let renderer;\n if (navNode.webcomponent && navNode.viewUrl) {\n renderer = new DefaultCompoundRenderer();\n renderer.viewUrl = this.processViewUrl(navNode.viewUrl, { context });\n renderer.createCompoundItemContainer = (layoutConfig: LayoutConfig) => {\n const cnt = document.createElement('div');\n if (layoutConfig?.slot) {\n cnt.setAttribute('slot', layoutConfig.slot);\n }\n return cnt;\n };\n } else if (navNode.compound?.renderer) {\n renderer = resolveRenderer(navNode.compound.renderer);\n }\n\n renderer = renderer || new DefaultCompoundRenderer();\n return new Promise((resolve) => {\n this.createCompoundContainerAsync(renderer, context, navNode)\n .then((compoundCnt: ContainerElement) => {\n wc_container._luigi_mfe_webcomponent = compoundCnt;\n wc_container._luigi_node = navNode;\n const ebListeners = {};\n compoundCnt.eventBus = {\n listeners: ebListeners,\n onPublishEvent: (event, srcNodeId, wcId) => {\n const listeners = ebListeners[srcNodeId + '.' + event.type] || [];\n listeners.push(...(ebListeners['*.' + event.type] || []));\n\n listeners.forEach((listenerInfo) => {\n const target =\n listenerInfo.wcElement || compoundCnt.querySelector('[nodeId=' + listenerInfo.wcElementId + ']');\n if (target) {\n target.dispatchEvent(\n new CustomEvent(listenerInfo.action, {\n detail: listenerInfo.converter ? listenerInfo.converter(event.detail) : event.detail\n })\n );\n } else {\n console.debug('Could not find event target', listenerInfo);\n }\n });\n }\n };\n navNode.compound?.children?.forEach((wc, index) => {\n const ctx = { ...context, ...wc.context };\n const compoundItemCnt = renderer.createCompoundItemContainer(wc.layoutConfig);\n\n compoundItemCnt.eventBus = compoundCnt.eventBus;\n renderer.attachCompoundItem(compoundCnt, compoundItemCnt);\n\n const nodeId = wc.id || 'gen_' + index;\n this.renderWebComponent(wc.viewUrl, compoundItemCnt, ctx, wc, nodeId, true);\n registerEventListeners(ebListeners, wc, nodeId);\n });\n wc_container.appendChild(compoundCnt);\n // listener for nesting wc\n registerEventListeners(ebListeners, navNode.compound, '_root', compoundCnt);\n resolve(compoundCnt);\n })\n .catch((error) => {\n // dispatch an error event to be handled core sid\n console.warn('Error: ', error);\n this.containerService.dispatch(Events.RUNTIME_ERROR_HANDLING_REQUEST, this.thisComponent, error);\n });\n });\n }\n\n /**\n * Resolves an alert by invoking the corresponding resolver function for the given alert ID.\n * This method attempts to resolve an alert associated with the specified `id` by calling its resolver function,\n * if one exists in the `alertResolvers` object. If the resolver exists, it is invoked with `dismissKey` as its argument,\n * and then the resolver is removed from the `alertResolvers` object to avoid future invocations. If no resolver is found\n * for the provided `id`, a message is logged to the console indicating that no matching promise is in the list.\n * @param {string} id - the unique identifier for the alert to resolve\n * @param {boolean|string} dismissKey - an optional key or value passed to the resolver; defaults to `true` if not provided\n *\n * @returns {void}\n *\n */\n resolveAlert(id: string, dismissKey?: boolean | string) {\n if (this.alertResolvers[id]) {\n this.alertResolvers[id](dismissKey === undefined ? true : dismissKey);\n this.alertResolvers[id] = undefined;\n } else {\n console.log('Promise is not in the list.');\n }\n }\n\n /**\n * Resolves a confirmation modal by invoking the corresponding resolver function.\n *\n * @param {boolean} confirmed - the result of the modal being closed\n *\n */\n notifyConfirmationModalClosed(confirmed: boolean) {\n if (this.modalResolver) {\n if (confirmed) {\n this.modalResolver.resolve();\n } else {\n this.modalResolver.reject();\n }\n this.modalResolver = undefined;\n } else {\n console.log('Modal promise is not listed.');\n }\n }\n}\n","export class GenericHelpersClass {\n /**\n * DUPLICATE: Duplicate of 'core/src/utilities/helpers/generic-helpers.js > isFunction'\n * Keep one in the end\n *\n * Checks if input is a function.\n * @param {Function} functionToCheck - function to be checked\n * @returns {boolean}\n */\n isFunction(functionToCheck: (arg) => void): boolean {\n return functionToCheck && {}.toString.call(functionToCheck) === '[object Function]';\n }\n\n /**\n * Checks if input is an object.\n * @param {Object} objectToCheck - mixed\n * @returns {boolean}\n */\n isObject(objectToCheck: object): boolean {\n return !!(objectToCheck && typeof objectToCheck === 'object' && !Array.isArray(objectToCheck));\n }\n\n /**\n * Checks whether web component is an attribute or property. In case of attribute, it returns the parsed value.\n * @param {Object | boolean | string} webcomponent - value can either be an object, boolean or a stringified object, e.g webcomponent='{\"selfregistered\":\"true\"}'\n * @returns {Object | boolean} webcomponent returns the parsed webcomponent value\n */\n checkWebcomponentValue(webcomponent: object | boolean | string): object | boolean {\n if (typeof webcomponent === 'string') {\n return JSON.parse(webcomponent);\n } else if (typeof webcomponent === 'boolean' || typeof webcomponent === 'object') {\n return webcomponent;\n } else {\n console.warn('Webcomponent value has a wrong type.');\n }\n }\n\n /**\n * Resolves the context to an object. If the context is a string, it attempts to parse\n * it as JSON. If parsing fails JSON parse error will be thrown.\n * @param {Object | string} context - he context to be resolved\n * @returns {Object} the resolved context as an object\n */\n resolveContext(context: object | string): object {\n return context ? (typeof context === 'string' ? JSON.parse(context) : context) : {};\n }\n}\n\nexport const GenericHelperFunctions = new GenericHelpersClass();\n","<svelte:options\n customElement={{\n tag: null,\n shadow: 'none',\n props: {\n activeFeatureToggleList: { type: 'Array', reflect: false, attribute: 'active-feature-toggle-list' },\n allowRules: { type: 'Array', reflect: false, attribute: 'allow-rules' },\n anchor: { type: 'String', reflect: false, attribute: 'anchor' },\n authData: { type: 'Object', reflect: false, attribute: 'auth-data' },\n clientPermissions: { type: 'Object', reflect: false, attribute: 'client-permissions' },\n context: { type: 'String', reflect: false, attribute: 'context' },\n deferInit: { type: 'Boolean', attribute: 'defer-init' },\n dirtyStatus: { type: 'Boolean', reflect: false, attribute: 'dirty-status' },\n documentTitle: { type: 'String', reflect: false, attribute: 'document-title' },\n hasBack: { type: 'Boolean', reflect: false, attribute: 'has-back' },\n label: { type: 'String', reflect: false, attribute: 'label' },\n locale: { type: 'String', reflect: false, attribute: 'locale' },\n noShadow: { type: 'Boolean', attribute: 'no-shadow' },\n nodeParams: { type: 'Object', reflect: false, attribute: 'node-params' },\n pathParams: { type: 'Object', reflect: false, attribute: 'path-params' },\n sandboxRules: { type: 'Array', reflect: false, attribute: 'sandbox-rules' },\n searchParams: { type: 'Object', reflect: false, attribute: 'search-params' },\n skipCookieCheck: { type: 'String', reflect: false, attribute: 'skip-cookie-check' },\n skipInitCheck: { type: 'Boolean', reflect: false, attribute: 'skip-init-check' },\n theme: { type: 'String', reflect: false, attribute: 'theme' },\n userSettings: { type: 'Object', reflect: false, attribute: 'user-settings' },\n viewurl: { type: 'String', reflect: false, attribute: 'viewurl' },\n webcomponent: { type: 'String', reflect: false, attribute: 'webcomponent' }\n },\n extend: (customElementConstructor) => {\n let notInitFn = (name) => {\n return () =>\n console.warn(name + \" can't be called on luigi-container before its micro frontend is attached to the DOM.\");\n };\n\n return class extends customElementConstructor {\n sendCustomMessage = notInitFn('sendCustomMessage');\n updateContext = notInitFn('updateContext');\n updateViewUrl = notInitFn('updateViewUrl');\n closeAlert = notInitFn('closeAlert');\n notifyAlertClosed = notInitFn('notifyAlertClosed');\n notifyConfirmationModalClosed = notInitFn('notifyConfirmationModalClosed');\n attributeChangedCallback(name, oldValue, newValue) {\n try {\n super.attributeChangedCallback(name, oldValue, newValue);\n } catch (e) {\n console.error('Error in super.attributeChangedCallback', e);\n }\n if (this.containerInitialized) {\n if (name === 'context') {\n this.updateContext(JSON.parse(newValue));\n }\n if (name === 'auth-data') {\n ContainerAPI.updateAuthData(this.iframeHandle, JSON.parse(newValue));\n }\n }\n }\n\n getNoShadow() {\n return this.hasAttribute('no-shadow') || this.noShadow;\n }\n };\n }\n }}\n/>\n\n<script lang=\"ts\">\n import { onMount, onDestroy } from 'svelte';\n import { ContainerAPI } from './api/container-api';\n import { Events } from './constants/communication';\n import type { IframeHandle, ContainerElement } from './constants/container.model';\n import { containerService } from './services/container.service';\n import { getAllowRules } from './services/iframe-helpers';\n import { WebComponentService } from './services/webcomponents.service';\n import { GenericHelperFunctions } from './utilities/helpers';\n\n /* eslint-disable */\n export let activeFeatureToggleList: string[];\n export let allowRules: string[];\n export let anchor: string;\n export let authData: any;\n export let clientPermissions: any;\n export let context: string;\n export let deferInit: boolean;\n export let dirtyStatus: boolean;\n export let documentTitle: string;\n export let hasBack: boolean;\n export let label: string;\n export let locale: string;\n export let noShadow: boolean;\n export let nodeParams: any;\n export let pathParams: any;\n export let sandboxRules: string[];\n export let searchParams: any;\n export let skipCookieCheck: 'false' | 'true';\n export let skipInitCheck: boolean;\n export let theme: string;\n export let userSettings: any;\n export let viewurl: string;\n export let webcomponent: any;\n /* eslint-enable */\n\n const iframeHandle: IframeHandle = {};\n let mainComponent: ContainerElement;\n let containerInitialized = false;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let thisComponent: any;\n\n const webcomponentService = new WebComponentService();\n\n // Only needed for get rid of \"unused export property\" svelte compiler warnings\n export const unwarn = () => {\n return (\n activeFeatureToggleList &&\n allowRules &&\n anchor &&\n authData &&\n clientPermissions &&\n dirtyStatus &&\n documentTitle &&\n hasBack &&\n locale &&\n noShadow &&\n nodeParams &&\n pathParams &&\n sandboxRules &&\n searchParams &&\n skipCookieCheck &&\n skipInitCheck &&\n theme &&\n userSettings\n );\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const initialize = (thisComponent: any) => {\n if (!containerInitialized) {\n thisComponent.sendCustomMessage = (id: string, data?: object) => {\n ContainerAPI.sendCustomMessage(\n id,\n thisComponent.getNoShadow() ? thisComponent : mainComponent,\n !!webcomponent,\n iframeHandle,\n data\n );\n };\n\n thisComponent.updateContext = (contextObj: object, internal?: object) => {\n context = contextObj;\n if (webcomponent) {\n (thisComponent.getNoShadow() ? thisComponent : mainComponent)._luigi_mfe_webcomponent.context = contextObj;\n } else {\n const internalObj = {\n ...internal || {}, ...{\n activeFeatureToggleList: thisComponent.activeFeatureToggleList || [],\n currentLocale: thisComponent.locale,\n currentTheme: thisComponent.theme,\n userSettings: thisComponent.userSettings || null,\n cssVariables: thisComponent.cssVariables || {},\n anchor: thisComponent.anchor || \"\",\n drawer: thisComponent.drawer || false,\n modal: thisComponent.modal || false,\n viewStackSize: thisComponent.viewStackSize || 0,\n isNavigateBack: thisComponent.isNavigateBack || false\n }\n };\n ContainerAPI.updateContext(contextObj, internalObj, iframeHandle, nodeParams, pathParams, searchParams);\n }\n };\n\n thisComponent.closeAlert = (id: string, dismissKey?: string) => {\n thisComponent.notifyAlertClosed(id, dismissKey);\n };\n\n thisComponent.notifyAlertClosed = (id: string, dismissKey?: string) => {\n // check if thisComponent is in dom\n if (thisComponent.isConnected) {\n if (webcomponent) {\n webcomponentService.resolveAlert(id, dismissKey);\n } else {\n ContainerAPI.notifyAlertClosed(id, dismissKey, iframeHandle);\n }\n }\n }\n\n thisComponent.notifyConfirmationModalClosed = (result) => {\n // check if thisComponent is in dom\n if (thisComponent.isConnected) {\n if (webcomponent) {\n webcomponentService.notifyConfirmationModalClosed(!!result);\n } else {\n ContainerAPI.notifyConfirmationModalClosed(!!result, iframeHandle);\n }\n }\n }\n\n containerService.registerContainer(thisComponent);\n webcomponentService.thisComponent = thisComponent;\n\n const ctx = GenericHelperFunctions.resolveContext(context);\n\n thisComponent.updateViewUrl = (viewUrl: string, internal?: object) => {\n if (viewUrl?.length) {\n ContainerAPI.updateViewUrl(viewUrl, GenericHelperFunctions.resolveContext(context), internal, iframeHandle);\n }\n };\n\n if (webcomponent && webcomponent != 'false') {\n if (!thisComponent.getNoShadow()) {\n mainComponent.innerHTML = '';\n const shadow = thisComponent.attachShadow({ mode: 'open' });\n shadow.append(mainComponent);\n } else {\n // removing mainComponent\n thisComponent.innerHTML = '';\n }\n const webComponentValue = GenericHelperFunctions.checkWebcomponentValue(webcomponent);\n webcomponentService.renderWebComponent(\n viewurl,\n thisComponent.getNoShadow() ? thisComponent : mainComponent,\n ctx,\n typeof webComponentValue === 'object' ? { webcomponent: webComponentValue } : {}\n );\n } else {\n if (!thisComponent.getNoShadow()) {\n // removeing mainComponent\n thisComponent.innerHTML = '';\n const shadow = thisComponent.attachShadow({ mode: 'open' });\n shadow.append(mainComponent);\n }\n }\n if (skipInitCheck) {\n thisComponent.initialized = true;\n setTimeout(() => {\n webcomponentService.dispatchLuigiEvent(Events.INITIALIZED, {});\n });\n } else if (webcomponent) {\n (thisComponent.getNoShadow() ? thisComponent : mainComponent).addEventListener('wc_ready', () => {\n if (\n !(thisComponent.getNoShadow() ? thisComponent : mainComponent)._luigi_mfe_webcomponent?.deferLuigiClientWCInit\n ) {\n thisComponent.initialized = true;\n webcomponentService.dispatchLuigiEvent(Events.INITIALIZED, {});\n }\n });\n }\n containerInitialized = true;\n thisComponent.containerInitialized = true;\n }\n };\n\n onMount(async () => {\n thisComponent = mainComponent.parentNode;\n thisComponent.iframeHandle = iframeHandle;\n thisComponent.init = () => {\n initialize(thisComponent);\n };\n if (!deferInit && viewurl) {\n initialize(thisComponent);\n }\n });\n\n $: {\n if (!containerInitialized && viewurl && !deferInit && thisComponent) {\n initialize(thisComponent);\n }\n }\n onDestroy(async () => {});\n</script>\n\n<main bind:this={mainComponent} class={webcomponent ? undefined : 'lui-isolated'}>\n {#if containerInitialized}\n {#if !webcomponent || webcomponent === 'false'}\n <style>\n main.lui-isolated,\n .lui-isolated iframe {\n width: 100%;\n height: 100%;\n border: none;\n }\n\n main.lui-isolated {\n line-height: 0;\n }\n </style>\n <iframe\n bind:this={iframeHandle.iframe}\n src={viewurl}\n title={label}\n allow={getAllowRules(allowRules)}\n sandbox={sandboxRules ? sandboxRules.join(' ') : undefined}\n />\n {/if}\n {/if}\n</main>\n","<svelte:options\n customElement={{\n tag: null,\n shadow: 'none',\n props: {\n activeFeatureToggleList: { type: 'Array', reflect: false, attribute: 'active-feature-toggle-list' },\n anchor: { type: 'String', reflect: false, attribute: 'anchor' },\n clientPermissions: {\n type: 'Object',\n reflect: false,\n attribute: 'client-permissions'\n },\n compoundConfig: {\n type: 'Object',\n reflect: false,\n attribute: 'compound-config'\n },\n context: { type: 'String', reflect: false, attribute: 'context' },\n deferInit: { type: 'Boolean', attribute: 'defer-init' },\n dirtyStatus: { type: 'Boolean', reflect: false, attribute: 'dirty-status' },\n documentTitle: { type: 'String', reflect: false, attribute: 'document-title' },\n hasBack: { type: 'Boolean', reflect: false, attribute: 'has-back' },\n locale: { type: 'String', reflect: false, attribute: 'locale' },\n noShadow: { type: 'Boolean', attribute: 'no-shadow', reflect: false },\n nodeParams: { type: 'Object', reflect: false, attribute: 'node-params' },\n pathParams: { type: 'Object', reflect: false, attribute: 'path-params' },\n searchParams: {\n type: 'Object',\n reflect: false,\n attribute: 'search-params'\n },\n skipInitCheck: { type: 'Boolean', reflect: false, attribute: 'skip-init-check' },\n theme: { type: 'String', reflect: false, attribute: 'theme' },\n userSettings: {\n type: 'Object',\n reflect: false,\n attribute: 'user-settings'\n },\n viewurl: { type: 'String', reflect: false, attribute: 'viewurl' },\n webcomponent: { type: 'String', reflect: false, attribute: 'webcomponent' }\n },\n extend: (customElementConstructor) => {\n let notInitFn = (name) => {\n return () =>\n console.warn(name + \" can't be called on luigi-container before its micro frontend is attached to the DOM.\");\n };\n return class extends customElementConstructor {\n updateContext = notInitFn('updateContext');\n notifyAlertClosed = notInitFn('notifyAlertClosed');\n notifyConfirmationModalClosed = notInitFn('notifyConfirmationModalClosed');\n attributeChangedCallback(name, oldValue, newValue) {\n try {\n super.attributeChangedCallback(name, oldValue, newValue);\n } catch (e) {\n console.warn('Error in attributeChangedCallback', e);\n }\n if (this.containerInitialized && name === 'context') {\n this.updateContext(JSON.parse(newValue));\n }\n }\n\n getNoShadow() {\n return this.hasAttribute('no-shadow') || this.noShadow;\n }\n };\n }\n }}\n/>\n\n<script lang=\"ts\">\n import { onMount } from 'svelte';\n import { Events } from './constants/communication';\n import type { ContainerElement } from './constants/container.model';\n import { ContainerService } from './services/container.service';\n import { WebComponentService } from './services/webcomponents.service';\n import { GenericHelperFunctions } from './utilities/helpers';\n\n /* eslint-disable */\n export let activeFeatureToggleList: string[];\n export let anchor: string;\n export let clientPermissions: any;\n export let compoundConfig: any;\n export let context: string;\n export let deferInit: boolean;\n export let dirtyStatus: boolean;\n export let documentTitle: string;\n export let hasBack: boolean;\n export let locale: string;\n export let noShadow: boolean;\n export let nodeParams: any;\n export let pathParams: any;\n export let searchParams: any;\n export let skipInitCheck: boolean;\n export let theme: string;\n export let userSettings: any;\n export let viewurl: string;\n export let webcomponent: any;\n /* eslint-enable */\n\n let containerInitialized = false;\n let mainComponent: ContainerElement;\n let eventBusElement: ContainerElement;\n\n const containerService = new ContainerService();\n const webcomponentService = new WebComponentService();\n\n // Only needed for get rid of \"unused export property\" svelte compiler warnings\n export const unwarn = () => {\n return (\n activeFeatureToggleList &&\n anchor &&\n clientPermissions &&\n dirtyStatus &&\n documentTitle &&\n hasBack &&\n locale &&\n noShadow &&\n nodeParams &&\n pathParams &&\n searchParams &&\n skipInitCheck &&\n theme &&\n userSettings\n );\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const initialize = (thisComponent: any) => {\n if (!compoundConfig || containerInitialized) {\n return;\n }\n thisComponent.updateContext = (contextObj: object, internal?: object) => {\n const rootElement = thisComponent.getNoShadow() ? thisComponent : mainComponent;\n rootElement._luigi_mfe_webcomponent.context = contextObj;\n context = contextObj;\n\n const compoundChildrenQueryElement = rootElement._luigi_mfe_webcomponent;\n if (compoundChildrenQueryElement) {\n const compoundChildren = compoundChildrenQueryElement.querySelectorAll('[lui_web_component]');\n compoundChildren?.forEach((item) => {\n const ctx = item.context || {};\n item.context = Object.assign(ctx, contextObj);\n });\n }\n };\n const ctx = GenericHelperFunctions.resolveContext(context);\n deferInit = false;\n\n thisComponent.notifyAlertClosed = (id: string, dismissKey?: string) => {\n // check if thisComponent is in dom\n if (thisComponent.isConnected) {\n webcomponentService.resolveAlert(id, dismissKey);\n }\n }\n\n thisComponent.notifyConfirmationModalClosed = (result) => {\n // check if thisComponent is in dom\n if (thisComponent.isConnected) {\n webcomponentService.notifyConfirmationModalClosed(!!result);\n }\n }\n\n const node = {\n compound: compoundConfig,\n viewUrl: viewurl,\n webcomponent: GenericHelperFunctions.checkWebcomponentValue(webcomponent) || true\n };\n if (!thisComponent.getNoShadow()) {\n mainComponent.innerHTML = '';\n const shadow = thisComponent.attachShadow({ mode: 'open' });\n shadow.append(mainComponent);\n } else {\n // removing mainComponent\n thisComponent.innerHTML = '';\n }\n webcomponentService\n .renderWebComponentCompound(node, thisComponent.getNoShadow() ? thisComponent : mainComponent, ctx)\n .then((compCnt: ContainerElement) => {\n eventBusElement = compCnt;\n if (skipInitCheck || !node.viewUrl) {\n thisComponent.initialized = true;\n setTimeout(() => {\n webcomponentService.dispatchLuigiEvent(Events.INITIALIZED, {});\n });\n } else if (eventBusElement.LuigiClient && !eventBusElement.deferLuigiClientWCInit) {\n thisComponent.initialized = true;\n webcomponentService.dispatchLuigiEvent(Events.INITIALIZED, {});\n }\n });\n containerInitialized = true;\n thisComponent.containerInitialized = true;\n };\n\n onMount(async () => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const thisComponent: any =\n mainComponent.getRootNode() === document\n ? mainComponent.parentNode\n : (mainComponent.getRootNode() as ShadowRoot).host;\n\n thisComponent.init = () => {\n initialize(thisComponent);\n };\n if (!deferInit) {\n initialize(thisComponent);\n }\n\n containerService.registerContainer(thisComponent);\n webcomponentService.thisComponent = thisComponent;\n });\n</script>\n\n<main bind:this={mainComponent} />\n\n<style>\n main {\n width: 100%;\n height: 100%;\n border: none;\n }\n</style>\n","import type { ComponentType } from 'svelte';\nimport LuigiContainer from './LuigiContainer.svelte';\nimport LuigiCompoundContainer from './LuigiCompoundContainer.svelte';\nimport { Events } from './constants/communication';\nexport { default as LuigiContainer } from './LuigiContainer.svelte';\nexport { default as LuigiCompoundContainer } from './LuigiCompoundContainer.svelte';\nexport type { PathExistsEvent } from './constants/event-type';\nexport { Events as LuigiEvents } from './constants/communication';\nexport default Events;\n\nif (!customElements.get('luigi-container')) {\n customElements.define('luigi-container', (LuigiContainer as unknown as ComponentType).element);\n}\n\nif (!customElements.get('luigi-compound-container')) {\n customElements.define('luigi-compound-container', (LuigiCompoundContainer as unknown as ComponentType).element);\n}\n"],"names":["noop","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","src_url_equal_anchor","current_component","src_url_equal","element_src","url","document","createElement","href","append_styles","target","style_sheet_id","styles","append_styles_to","node","root","getRootNode","ownerDocument","host","get_root_for_style","getElementById","style","element","id","textContent","appendChild","append","head","sheet","append_stylesheet","insert","anchor","insertBefore","detach","parentNode","removeChild","name","text","data","createTextNode","attr","attribute","value","removeAttribute","getAttribute","setAttribute","set_current_component","component","get_current_component","Error","onMount","$$","on_mount","push","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","seen_callbacks","Set","flushidx","flush","saved_component","length","update","e","pop","i","callback","has","add","clear","fragment","before_update","dirty","p","ctx","after_update","outroing","destroy_component","detaching","filtered","targets","c","indexOf","flush_render_callbacks","on_destroy","d","make_dirty","then","fill","init","options","instance","create_fragment","not_equal","props","parent_component","bound","on_disconnect","context","Map","callbacks","skip_bound","ready","ret","rest","hydrate","nodes","Array","from","childNodes","children","l","intro","block","delete","local","m","new_on_destroy","map","filter","mount_component","SvelteElement","get_custom_element_value","prop","props_definition","transform","type","JSON","stringify","parse","create_custom_element","Component","slots","accessors","use_shadow_dom","extend","Class","constructor","super","this","$$p_d","observedAttributes","keys","key","toLowerCase","defineProperty","prototype","get","$$c","$$d","set","$set","accessor","HTMLElement","$$ctor","$$s","$$cn","$$r","$$l","$$l_u","$$componentCtor","$$slots","attachShadow","mode","addEventListener","listener","unsub","$on","removeEventListener","connectedCallback","create_slot","existing_slots","result","slot","get_custom_elements_slots","attributes","$$g_p","undefined","shadowRoot","$$scope","reflect_attributes","reflect","attribute_value","attributeChangedCallback","_oldValue","newValue","disconnectedCallback","$destroy","attribute_name","find","SvelteComponent","$$set","index","splice","obj","LuigiInternalMessageID","window","__svelte","v","CUSTOM_MESSAGE","GET_CONTEXT","SEND_CONTEXT_HANDSHAKE","CONTEXT_RECEIVED","NAVIGATION_REQUEST","ALERT_REQUEST","ALERT_CLOSED","INITIALIZED","ADD_SEARCH_PARAMS_REQUEST","ADD_NODE_PARAMS_REQUEST","SHOW_CONFIRMATION_MODAL_REQUEST","CONFIRMATION_MODAL_CLOSED","SHOW_LOADING_INDICATOR_REQUEST","HIDE_LOADING_INDICATOR_REQUEST","SET_CURRENT_LOCALE_REQUEST","LOCAL_STORAGE_SET_REQUEST","RUNTIME_ERROR_HANDLING_REQUEST","SET_ANCHOR_LINK_REQUEST","SET_THIRD_PARTY_COOKIES_REQUEST","BACK_NAVIGATION_REQUEST","GET_CURRENT_ROUTE_REQUEST","SEND_CURRENT_ROUTE_ANSWER","SEND_CONTEXT_OBJECT","NAVIGATION_COMPLETED_REPORT","CLOSE_MODAL_ANSWER","UPDATE_MODAL_PATH_DATA_REQUEST","UPDATE_MODAL_SETTINGS","CHECK_PATH_EXISTS_REQUEST","SEND_PATH_EXISTS_ANSWER","SET_DIRTY_STATUS_REQUEST","AUTH_SET_TOKEN","ADD_BACKDROP_REQUEST","REMOVE_BACKDROP_REQUEST","SET_VIEW_GROUP_DATA_REQUEST","CLOSE_CURRENT_MODAL_REQUEST","LuigiEvent","Event","payload","detail","callbackFn","Events","CLOSE_USER_SETTINGS_REQUEST","COLLAPSE_LEFT_NAV_REQUEST","GET_CONTEXT_REQUEST","GO_BACK_REQUEST","HAS_BACK_REQUEST","OPEN_USER_SETTINGS_REQUEST","PATH_EXISTS_REQUEST","SET_DOCUMENT_TITLE_REQUEST","UPDATE_MODAL_SETTINGS_REQUEST","UPDATE_TOP_NAVIGATION_REQUEST","ContainerService","isVisible","offsetWidth","offsetHeight","getClientRects","sendCustomMessageToIframe","iframeHandle","msg","msgName","messageName","iframe","contentWindow","iframeUrl","URL","src","postMessage","origin","console","error","dispatchWithPayload","targetCnt","dispatch","customEvent","dispatchEvent","getTargetContainer","event","cnt","globalThis","__luigi_container_manager","container","source","getContainerManager","messageListener","evData","_metaData","internal","thirdPartyCookieCheck","disabled","skipCookieCheck","currentTheme","theme","currentLocale","locale","activeFeatureToggleList","cssVariables","userSettings","drawer","modal","viewStackSize","isNavigateBack","authData","nodeParams","searchParams","pathParams","params","val","settings","dismissKey","notifyAlertClosed","keepBrowserHistory","modalResult","notifyConfirmationModalClosed","gbctx","goBackContext","warn","route","correlationId","addHistoryEntry","updatedModalSettings","pathExists","registerContainer","thisComponent","containerService","ContainerAPI","updateContext","contextObj","internalParameter","withoutSync","updateViewUrl","viewUrl","updateAuthData","sendCustomMessage","mainComponent","isWebcomponent","_luigi_mfe_webcomponent","message","confirmed","getAllowRules","allowRules","rules","rule","replaceAll","join","DefaultCompoundRenderer","rendererObj","rendererObject","config","createCompoundContainer","createCompoundItemContainer","layoutConfig","attachCompoundItem","compoundCnt","compoundItemCnt","CustomCompoundRenderer","use","extends","superRenderer","resolveRenderer","GridCompoundRenderer","containerClass","Date","getTime","classList","mediaQueries","layouts","el","minWidth","maxWidth","mq","columns","rows","gap","innerHTML","minHeight","row","column","rendererConfig","rendererDef","registerEventListeners","eventbusListeners","navNode","nodeId","wcElement","eventListeners","evID","listenerList","listenerInfo","wcElementId","action","converter","dataConverter","deSanitizeParam","String","WebComponentService","alertResolvers","alertIndex","dynamicImport","freeze","import","processViewUrl","attachWC","wc_id","wcItemPlaceholder","wc_container","isCompoundChild","contains","wc","initWC","replaceChild","_luigi_node","dispatchLuigiEvent","createClientAPI","eventBusElement","linkManager","fromContext","fromClosestContext","fromVirtualTreeRoot","fromParent","linkManagerInstance","navigate","link","navigateToIntent","semanticSlug","newPath","paramList","entries","slice","navigationContext","getCurrentRoute","reject","withParams","updateModalPathInternalNavigation","path","modalSettings","assign","history","updateTopNavigation","exists","openAsDrawer","drawerSettings","openAsModal","openAsSplitView","splitViewSettings","splitView","goBack","hasBack","updateModalSettings","uxManager","showAlert","alertSettings","resolveAlert","showConfirmationModal","modalResolver","getCurrentTheme","closeUserSettings","openUserSettings","collapseLeftSideNav","getDirtyStatus","dirtyStatus","getDocumentTitle","documentTitle","setDocumentTitle","title","setDirtyStatus","isDirty","setCurrentLocale","removeBackdrop","addBackdrop","showLoadingIndicator","hideLoadingIndicator","hideAppLoadingIndicator","closeCurrentModal","getCurrentLocale","getActiveFeatureToggles","publishEvent","ev","eventBus","onPublishEvent","luigiClientInit","addNodeParams","getNodeParams","shouldDesanitise","paramsMap","reduce","sanitizedMap","paramPair","setAnchor","getAnchor","getCoreSearchParams","getPathParams","getClientPermissions","clientPermissions","addCoreSearchParams","getUserSettings","setViewGroupData","clientAPI","__postProcess","baseURI","pathname","LuigiClient","generateWCId","charRep","normalizedViewUrl","encodeURI","location","charCodeAt","toString","registerWCFromUrl","i18nViewUrl","checkWCUrl","module","customElements","cmpClazz","default","isPrototypeOf","define","err","catch","includeSelfRegisteredWCFromUrl","onload","_registerWebcomponent","srcString","Luigi","scriptTag","webcomponent","body","renderWebComponent","tagName","luigiWCFn","selfRegistered","createCompoundContainerAsync","renderer","renderWebComponentCompound","compound","ebListeners","listeners","srcNodeId","wcId","querySelector","CustomEvent","debug","log","GenericHelperFunctions","isFunction","functionToCheck","call","isObject","objectToCheck","isArray","checkWebcomponentValue","resolveContext","create_if_block_1","iframe_src_value","iframe_allow_value","create_if_block","main","$$props","deferInit","label","noShadow","sandboxRules","skipInitCheck","viewurl","containerInitialized","webcomponentService","initialize","getNoShadow","$$invalidate","internalObj","closeAlert","isConnected","webComponentValue","initialized","setTimeout","deferLuigiClientWCInit","async","$$value","compoundConfig","rootElement","compoundChildrenQueryElement","compoundChildren","querySelectorAll","item","compCnt","customElementConstructor","notInitFn","oldValue","hasAttribute","LuigiContainer","LuigiCompoundContainer"],"mappings":"AACO,SAASA,IAAS,CAsClB,SAASC,EAAIC,GACnB,OAAOA,GACR,CAEO,SAASC,IACf,OAAOC,OAAOC,OAAO,KACtB,CAMO,SAASC,EAAQC,GACvBA,EAAIC,QAAQP,EACb,CAMO,SAASQ,EAAYC,GAC3B,MAAwB,mBAAVA,CACf,CAGO,SAASC,EAAeC,EAAGC,GACjC,OAAOD,GAAKA,EAAIC,GAAKA,EAAID,IAAMC,GAAMD,GAAkB,iBAANA,GAAgC,mBAANA,CAC5E,CAEA,IAAIE,EClEOC,EDyEJ,SAASC,EAAcC,EAAaC,GAC1C,OAAID,IAAgBC,IACfJ,IACJA,EAAuBK,SAASC,cAAc,MAG/CN,EAAqBO,KAAOH,EACrBD,IAAgBH,EAAqBO,KAC7C,CEqEO,SAASC,EAAcC,EAAQC,EAAgBC,GACrD,MAAMC,EAaA,SAA4BC,GAClC,IAAKA,EAAM,OAAOR,SAClB,MAAMS,EAAOD,EAAKE,YAAcF,EAAKE,cAAgBF,EAAKG,cAC1D,GAAIF,GAAkC,EAAOG,KAC5C,OAAA,EAED,OAAOJ,EAAKG,aACb,CApB0BE,CAAmBT,GAC5C,IAAKG,EAAiBO,eAAeT,GAAiB,CACrD,MAAMU,EAAQC,EAAQ,SACtBD,EAAME,GAAKZ,EACXU,EAAMG,YAAcZ,EAuCtB,SAA2BE,EAAMO,IAtD1B,SAAgBX,EAAQI,GAC9BJ,EAAOe,YAAYX,EACpB,EAqDCY,CAA+B,EAAOC,MAAQb,EAAMO,GAC7CA,EAAMO,KACd,CAzCEC,CAAkBhB,EAAkBQ,EACpC,CACF,CA8EO,SAASS,EAAOpB,EAAQI,EAAMiB,GACpCrB,EAAOsB,aAAalB,EAAM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eI,OAAO,2BAA6B0E,GAAoD9jB"}
|
|
1
|
+
{"version":3,"file":"bundle.js","sources":["../node_modules/svelte/src/runtime/internal/utils.js","../node_modules/svelte/src/runtime/internal/lifecycle.js","../node_modules/svelte/src/runtime/internal/dom.js","../node_modules/svelte/src/runtime/internal/scheduler.js","../node_modules/svelte/src/runtime/internal/transitions.js","../node_modules/svelte/src/runtime/internal/Component.js","../src/constants/internal-communication.ts","../node_modules/svelte/src/runtime/internal/disclose-version/index.js","../node_modules/svelte/src/shared/version.js","../src/constants/communication.ts","../src/services/container.service.ts","../src/api/container-api.ts","../src/services/iframe-helpers.ts","../src/services/web-component-helpers.ts","../src/services/webcomponents.service.ts","../src/utilities/helpers.ts","../src/LuigiContainer.svelte","../src/LuigiCompoundContainer.svelte","../src/main.ts"],"sourcesContent":["/** @returns {void} */\nexport function noop() {}\n\nexport const identity = (x) => x;\n\n/**\n * @template T\n * @template S\n * @param {T} tar\n * @param {S} src\n * @returns {T & S}\n */\nexport function assign(tar, src) {\n\t// @ts-ignore\n\tfor (const k in src) tar[k] = src[k];\n\treturn /** @type {T & S} */ (tar);\n}\n\n// Adapted from https://github.com/then/is-promise/blob/master/index.js\n// Distributed under MIT License https://github.com/then/is-promise/blob/master/LICENSE\n/**\n * @param {any} value\n * @returns {value is PromiseLike<any>}\n */\nexport function is_promise(value) {\n\treturn (\n\t\t!!value &&\n\t\t(typeof value === 'object' || typeof value === 'function') &&\n\t\ttypeof (/** @type {any} */ (value).then) === 'function'\n\t);\n}\n\n/** @returns {void} */\nexport function add_location(element, file, line, column, char) {\n\telement.__svelte_meta = {\n\t\tloc: { file, line, column, char }\n\t};\n}\n\nexport function run(fn) {\n\treturn fn();\n}\n\nexport function blank_object() {\n\treturn Object.create(null);\n}\n\n/**\n * @param {Function[]} fns\n * @returns {void}\n */\nexport function run_all(fns) {\n\tfns.forEach(run);\n}\n\n/**\n * @param {any} thing\n * @returns {thing is Function}\n */\nexport function is_function(thing) {\n\treturn typeof thing === 'function';\n}\n\n/** @returns {boolean} */\nexport function safe_not_equal(a, b) {\n\treturn a != a ? b == b : a !== b || (a && typeof a === 'object') || typeof a === 'function';\n}\n\nlet src_url_equal_anchor;\n\n/**\n * @param {string} element_src\n * @param {string} url\n * @returns {boolean}\n */\nexport function src_url_equal(element_src, url) {\n\tif (element_src === url) return true;\n\tif (!src_url_equal_anchor) {\n\t\tsrc_url_equal_anchor = document.createElement('a');\n\t}\n\t// This is actually faster than doing URL(..).href\n\tsrc_url_equal_anchor.href = url;\n\treturn element_src === src_url_equal_anchor.href;\n}\n\n/** @param {string} srcset */\nfunction split_srcset(srcset) {\n\treturn srcset.split(',').map((src) => src.trim().split(' ').filter(Boolean));\n}\n\n/**\n * @param {HTMLSourceElement | HTMLImageElement} element_srcset\n * @param {string | undefined | null} srcset\n * @returns {boolean}\n */\nexport function srcset_url_equal(element_srcset, srcset) {\n\tconst element_urls = split_srcset(element_srcset.srcset);\n\tconst urls = split_srcset(srcset || '');\n\n\treturn (\n\t\turls.length === element_urls.length &&\n\t\turls.every(\n\t\t\t([url, width], i) =>\n\t\t\t\twidth === element_urls[i][1] &&\n\t\t\t\t// We need to test both ways because Vite will create an a full URL with\n\t\t\t\t// `new URL(asset, import.meta.url).href` for the client when `base: './'`, and the\n\t\t\t\t// relative URLs inside srcset are not automatically resolved to absolute URLs by\n\t\t\t\t// browsers (in contrast to img.src). This means both SSR and DOM code could\n\t\t\t\t// contain relative or absolute URLs.\n\t\t\t\t(src_url_equal(element_urls[i][0], url) || src_url_equal(url, element_urls[i][0]))\n\t\t)\n\t);\n}\n\n/** @returns {boolean} */\nexport function not_equal(a, b) {\n\treturn a != a ? b == b : a !== b;\n}\n\n/** @returns {boolean} */\nexport function is_empty(obj) {\n\treturn Object.keys(obj).length === 0;\n}\n\n/** @returns {void} */\nexport function validate_store(store, name) {\n\tif (store != null && typeof store.subscribe !== 'function') {\n\t\tthrow new Error(`'${name}' is not a store with a 'subscribe' method`);\n\t}\n}\n\nexport function subscribe(store, ...callbacks) {\n\tif (store == null) {\n\t\tfor (const callback of callbacks) {\n\t\t\tcallback(undefined);\n\t\t}\n\t\treturn noop;\n\t}\n\tconst unsub = store.subscribe(...callbacks);\n\treturn unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\n\n/**\n * Get the current value from a store by subscribing and immediately unsubscribing.\n *\n * https://svelte.dev/docs/svelte-store#get\n * @template T\n * @param {import('../store/public.js').Readable<T>} store\n * @returns {T}\n */\nexport function get_store_value(store) {\n\tlet value;\n\tsubscribe(store, (_) => (value = _))();\n\treturn value;\n}\n\n/** @returns {void} */\nexport function component_subscribe(component, store, callback) {\n\tcomponent.$$.on_destroy.push(subscribe(store, callback));\n}\n\nexport function create_slot(definition, ctx, $$scope, fn) {\n\tif (definition) {\n\t\tconst slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n\t\treturn definition[0](slot_ctx);\n\t}\n}\n\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n\treturn definition[1] && fn ? assign($$scope.ctx.slice(), definition[1](fn(ctx))) : $$scope.ctx;\n}\n\nexport function get_slot_changes(definition, $$scope, dirty, fn) {\n\tif (definition[2] && fn) {\n\t\tconst lets = definition[2](fn(dirty));\n\t\tif ($$scope.dirty === undefined) {\n\t\t\treturn lets;\n\t\t}\n\t\tif (typeof lets === 'object') {\n\t\t\tconst merged = [];\n\t\t\tconst len = Math.max($$scope.dirty.length, lets.length);\n\t\t\tfor (let i = 0; i < len; i += 1) {\n\t\t\t\tmerged[i] = $$scope.dirty[i] | lets[i];\n\t\t\t}\n\t\t\treturn merged;\n\t\t}\n\t\treturn $$scope.dirty | lets;\n\t}\n\treturn $$scope.dirty;\n}\n\n/** @returns {void} */\nexport function update_slot_base(\n\tslot,\n\tslot_definition,\n\tctx,\n\t$$scope,\n\tslot_changes,\n\tget_slot_context_fn\n) {\n\tif (slot_changes) {\n\t\tconst slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n\t\tslot.p(slot_context, slot_changes);\n\t}\n}\n\n/** @returns {void} */\nexport function update_slot(\n\tslot,\n\tslot_definition,\n\tctx,\n\t$$scope,\n\tdirty,\n\tget_slot_changes_fn,\n\tget_slot_context_fn\n) {\n\tconst slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n\tupdate_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\n\n/** @returns {any[] | -1} */\nexport function get_all_dirty_from_scope($$scope) {\n\tif ($$scope.ctx.length > 32) {\n\t\tconst dirty = [];\n\t\tconst length = $$scope.ctx.length / 32;\n\t\tfor (let i = 0; i < length; i++) {\n\t\t\tdirty[i] = -1;\n\t\t}\n\t\treturn dirty;\n\t}\n\treturn -1;\n}\n\n/** @returns {{}} */\nexport function exclude_internal_props(props) {\n\tconst result = {};\n\tfor (const k in props) if (k[0] !== '$') result[k] = props[k];\n\treturn result;\n}\n\n/** @returns {{}} */\nexport function compute_rest_props(props, keys) {\n\tconst rest = {};\n\tkeys = new Set(keys);\n\tfor (const k in props) if (!keys.has(k) && k[0] !== '$') rest[k] = props[k];\n\treturn rest;\n}\n\n/** @returns {{}} */\nexport function compute_slots(slots) {\n\tconst result = {};\n\tfor (const key in slots) {\n\t\tresult[key] = true;\n\t}\n\treturn result;\n}\n\n/** @returns {(this: any, ...args: any[]) => void} */\nexport function once(fn) {\n\tlet ran = false;\n\treturn function (...args) {\n\t\tif (ran) return;\n\t\tran = true;\n\t\tfn.call(this, ...args);\n\t};\n}\n\nexport function null_to_empty(value) {\n\treturn value == null ? '' : value;\n}\n\nexport function set_store_value(store, ret, value) {\n\tstore.set(value);\n\treturn ret;\n}\n\nexport const has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\n\nexport function action_destroyer(action_result) {\n\treturn action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\n/** @param {number | string} value\n * @returns {[number, string]}\n */\nexport function split_css_unit(value) {\n\tconst split = typeof value === 'string' && value.match(/^\\s*(-?[\\d.]+)([^\\s]*)\\s*$/);\n\treturn split ? [parseFloat(split[1]), split[2] || 'px'] : [/** @type {number} */ (value), 'px'];\n}\n\nexport const contenteditable_truthy_values = ['', true, 1, 'true', 'contenteditable'];\n","import { custom_event } from './dom.js';\n\nexport let current_component;\n\n/** @returns {void} */\nexport function set_current_component(component) {\n\tcurrent_component = component;\n}\n\nexport function get_current_component() {\n\tif (!current_component) throw new Error('Function called outside component initialization');\n\treturn current_component;\n}\n\n/**\n * Schedules a callback to run immediately before the component is updated after any state change.\n *\n * The first time the callback runs will be before the initial `onMount`\n *\n * https://svelte.dev/docs/svelte#beforeupdate\n * @param {() => any} fn\n * @returns {void}\n */\nexport function beforeUpdate(fn) {\n\tget_current_component().$$.before_update.push(fn);\n}\n\n/**\n * The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.\n * It must be called during the component's initialisation (but doesn't need to live *inside* the component;\n * it can be called from an external module).\n *\n * If a function is returned _synchronously_ from `onMount`, it will be called when the component is unmounted.\n *\n * `onMount` does not run inside a [server-side component](https://svelte.dev/docs#run-time-server-side-component-api).\n *\n * https://svelte.dev/docs/svelte#onmount\n * @template T\n * @param {() => import('./private.js').NotFunction<T> | Promise<import('./private.js').NotFunction<T>> | (() => any)} fn\n * @returns {void}\n */\nexport function onMount(fn) {\n\tget_current_component().$$.on_mount.push(fn);\n}\n\n/**\n * Schedules a callback to run immediately after the component has been updated.\n *\n * The first time the callback runs will be after the initial `onMount`\n *\n * https://svelte.dev/docs/svelte#afterupdate\n * @param {() => any} fn\n * @returns {void}\n */\nexport function afterUpdate(fn) {\n\tget_current_component().$$.after_update.push(fn);\n}\n\n/**\n * Schedules a callback to run immediately before the component is unmounted.\n *\n * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the\n * only one that runs inside a server-side component.\n *\n * https://svelte.dev/docs/svelte#ondestroy\n * @param {() => any} fn\n * @returns {void}\n */\nexport function onDestroy(fn) {\n\tget_current_component().$$.on_destroy.push(fn);\n}\n\n/**\n * Creates an event dispatcher that can be used to dispatch [component events](https://svelte.dev/docs#template-syntax-component-directives-on-eventname).\n * Event dispatchers are functions that can take two arguments: `name` and `detail`.\n *\n * Component events created with `createEventDispatcher` create a\n * [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent).\n * These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture).\n * The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail)\n * property and can contain any type of data.\n *\n * The event dispatcher can be typed to narrow the allowed event names and the type of the `detail` argument:\n * ```ts\n * const dispatch = createEventDispatcher<{\n * loaded: never; // does not take a detail argument\n * change: string; // takes a detail argument of type string, which is required\n * optional: number | null; // takes an optional detail argument of type number\n * }>();\n * ```\n *\n * https://svelte.dev/docs/svelte#createeventdispatcher\n * @template {Record<string, any>} [EventMap=any]\n * @returns {import('./public.js').EventDispatcher<EventMap>}\n */\nexport function createEventDispatcher() {\n\tconst component = get_current_component();\n\treturn (type, detail, { cancelable = false } = {}) => {\n\t\tconst callbacks = component.$$.callbacks[type];\n\t\tif (callbacks) {\n\t\t\t// TODO are there situations where events could be dispatched\n\t\t\t// in a server (non-DOM) environment?\n\t\t\tconst event = custom_event(/** @type {string} */ (type), detail, { cancelable });\n\t\t\tcallbacks.slice().forEach((fn) => {\n\t\t\t\tfn.call(component, event);\n\t\t\t});\n\t\t\treturn !event.defaultPrevented;\n\t\t}\n\t\treturn true;\n\t};\n}\n\n/**\n * Associates an arbitrary `context` object with the current component and the specified `key`\n * and returns that object. The context is then available to children of the component\n * (including slotted content) with `getContext`.\n *\n * Like lifecycle functions, this must be called during component initialisation.\n *\n * https://svelte.dev/docs/svelte#setcontext\n * @template T\n * @param {any} key\n * @param {T} context\n * @returns {T}\n */\nexport function setContext(key, context) {\n\tget_current_component().$$.context.set(key, context);\n\treturn context;\n}\n\n/**\n * Retrieves the context that belongs to the closest parent component with the specified `key`.\n * Must be called during component initialisation.\n *\n * https://svelte.dev/docs/svelte#getcontext\n * @template T\n * @param {any} key\n * @returns {T}\n */\nexport function getContext(key) {\n\treturn get_current_component().$$.context.get(key);\n}\n\n/**\n * Retrieves the whole context map that belongs to the closest parent component.\n * Must be called during component initialisation. Useful, for example, if you\n * programmatically create a component and want to pass the existing context to it.\n *\n * https://svelte.dev/docs/svelte#getallcontexts\n * @template {Map<any, any>} [T=Map<any, any>]\n * @returns {T}\n */\nexport function getAllContexts() {\n\treturn get_current_component().$$.context;\n}\n\n/**\n * Checks whether a given `key` has been set in the context of a parent component.\n * Must be called during component initialisation.\n *\n * https://svelte.dev/docs/svelte#hascontext\n * @param {any} key\n * @returns {boolean}\n */\nexport function hasContext(key) {\n\treturn get_current_component().$$.context.has(key);\n}\n\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\n/**\n * @param component\n * @param event\n * @returns {void}\n */\nexport function bubble(component, event) {\n\tconst callbacks = component.$$.callbacks[event.type];\n\tif (callbacks) {\n\t\t// @ts-ignore\n\t\tcallbacks.slice().forEach((fn) => fn.call(this, event));\n\t}\n}\n","import { contenteditable_truthy_values, has_prop } from './utils.js';\n\nimport { ResizeObserverSingleton } from './ResizeObserverSingleton.js';\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\n\n/**\n * @returns {void}\n */\nexport function start_hydrating() {\n\tis_hydrating = true;\n}\n\n/**\n * @returns {void}\n */\nexport function end_hydrating() {\n\tis_hydrating = false;\n}\n\n/**\n * @param {number} low\n * @param {number} high\n * @param {(index: number) => number} key\n * @param {number} value\n * @returns {number}\n */\nfunction upper_bound(low, high, key, value) {\n\t// Return first index of value larger than input value in the range [low, high)\n\twhile (low < high) {\n\t\tconst mid = low + ((high - low) >> 1);\n\t\tif (key(mid) <= value) {\n\t\t\tlow = mid + 1;\n\t\t} else {\n\t\t\thigh = mid;\n\t\t}\n\t}\n\treturn low;\n}\n\n/**\n * @param {NodeEx} target\n * @returns {void}\n */\nfunction init_hydrate(target) {\n\tif (target.hydrate_init) return;\n\ttarget.hydrate_init = true;\n\t// We know that all children have claim_order values since the unclaimed have been detached if target is not <head>\n\n\tlet children = /** @type {ArrayLike<NodeEx2>} */ (target.childNodes);\n\t// If target is <head>, there may be children without claim_order\n\tif (target.nodeName === 'HEAD') {\n\t\tconst my_children = [];\n\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\tconst node = children[i];\n\t\t\tif (node.claim_order !== undefined) {\n\t\t\t\tmy_children.push(node);\n\t\t\t}\n\t\t}\n\t\tchildren = my_children;\n\t}\n\t/*\n\t * Reorder claimed children optimally.\n\t * We can reorder claimed children optimally by finding the longest subsequence of\n\t * nodes that are already claimed in order and only moving the rest. The longest\n\t * subsequence of nodes that are claimed in order can be found by\n\t * computing the longest increasing subsequence of .claim_order values.\n\t *\n\t * This algorithm is optimal in generating the least amount of reorder operations\n\t * possible.\n\t *\n\t * Proof:\n\t * We know that, given a set of reordering operations, the nodes that do not move\n\t * always form an increasing subsequence, since they do not move among each other\n\t * meaning that they must be already ordered among each other. Thus, the maximal\n\t * set of nodes that do not move form a longest increasing subsequence.\n\t */\n\t// Compute longest increasing subsequence\n\t// m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n\tconst m = new Int32Array(children.length + 1);\n\t// Predecessor indices + 1\n\tconst p = new Int32Array(children.length);\n\tm[0] = -1;\n\tlet longest = 0;\n\tfor (let i = 0; i < children.length; i++) {\n\t\tconst current = children[i].claim_order;\n\t\t// Find the largest subsequence length such that it ends in a value less than our current value\n\t\t// upper_bound returns first greater value, so we subtract one\n\t\t// with fast path for when we are on the current longest subsequence\n\t\tconst seq_len =\n\t\t\t(longest > 0 && children[m[longest]].claim_order <= current\n\t\t\t\t? longest + 1\n\t\t\t\t: upper_bound(1, longest, (idx) => children[m[idx]].claim_order, current)) - 1;\n\t\tp[i] = m[seq_len] + 1;\n\t\tconst new_len = seq_len + 1;\n\t\t// We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n\t\tm[new_len] = i;\n\t\tlongest = Math.max(new_len, longest);\n\t}\n\t// The longest increasing subsequence of nodes (initially reversed)\n\n\t/**\n\t * @type {NodeEx2[]}\n\t */\n\tconst lis = [];\n\t// The rest of the nodes, nodes that will be moved\n\n\t/**\n\t * @type {NodeEx2[]}\n\t */\n\tconst to_move = [];\n\tlet last = children.length - 1;\n\tfor (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n\t\tlis.push(children[cur - 1]);\n\t\tfor (; last >= cur; last--) {\n\t\t\tto_move.push(children[last]);\n\t\t}\n\t\tlast--;\n\t}\n\tfor (; last >= 0; last--) {\n\t\tto_move.push(children[last]);\n\t}\n\tlis.reverse();\n\t// We sort the nodes being moved to guarantee that their insertion order matches the claim order\n\tto_move.sort((a, b) => a.claim_order - b.claim_order);\n\t// Finally, we move the nodes\n\tfor (let i = 0, j = 0; i < to_move.length; i++) {\n\t\twhile (j < lis.length && to_move[i].claim_order >= lis[j].claim_order) {\n\t\t\tj++;\n\t\t}\n\t\tconst anchor = j < lis.length ? lis[j] : null;\n\t\ttarget.insertBefore(to_move[i], anchor);\n\t}\n}\n\n/**\n * @param {Node} target\n * @param {Node} node\n * @returns {void}\n */\nexport function append(target, node) {\n\ttarget.appendChild(node);\n}\n\n/**\n * @param {Node} target\n * @param {string} style_sheet_id\n * @param {string} styles\n * @returns {void}\n */\nexport function append_styles(target, style_sheet_id, styles) {\n\tconst append_styles_to = get_root_for_style(target);\n\tif (!append_styles_to.getElementById(style_sheet_id)) {\n\t\tconst style = element('style');\n\t\tstyle.id = style_sheet_id;\n\t\tstyle.textContent = styles;\n\t\tappend_stylesheet(append_styles_to, style);\n\t}\n}\n\n/**\n * @param {Node} node\n * @returns {ShadowRoot | Document}\n */\nexport function get_root_for_style(node) {\n\tif (!node) return document;\n\tconst root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n\tif (root && /** @type {ShadowRoot} */ (root).host) {\n\t\treturn /** @type {ShadowRoot} */ (root);\n\t}\n\treturn node.ownerDocument;\n}\n\n/**\n * @param {Node} node\n * @returns {CSSStyleSheet}\n */\nexport function append_empty_stylesheet(node) {\n\tconst style_element = element('style');\n\t// For transitions to work without 'style-src: unsafe-inline' Content Security Policy,\n\t// these empty tags need to be allowed with a hash as a workaround until we move to the Web Animations API.\n\t// Using the hash for the empty string (for an empty tag) works in all browsers except Safari.\n\t// So as a workaround for the workaround, when we append empty style tags we set their content to /* empty */.\n\t// The hash 'sha256-9OlNO0DNEeaVzHL4RZwCLsBHA8WBQ8toBp/4F5XV2nc=' will then work even in Safari.\n\tstyle_element.textContent = '/* empty */';\n\tappend_stylesheet(get_root_for_style(node), style_element);\n\treturn style_element.sheet;\n}\n\n/**\n * @param {ShadowRoot | Document} node\n * @param {HTMLStyleElement} style\n * @returns {CSSStyleSheet}\n */\nfunction append_stylesheet(node, style) {\n\tappend(/** @type {Document} */ (node).head || node, style);\n\treturn style.sheet;\n}\n\n/**\n * @param {NodeEx} target\n * @param {NodeEx} node\n * @returns {void}\n */\nexport function append_hydration(target, node) {\n\tif (is_hydrating) {\n\t\tinit_hydrate(target);\n\t\tif (\n\t\t\ttarget.actual_end_child === undefined ||\n\t\t\t(target.actual_end_child !== null && target.actual_end_child.parentNode !== target)\n\t\t) {\n\t\t\ttarget.actual_end_child = target.firstChild;\n\t\t}\n\t\t// Skip nodes of undefined ordering\n\t\twhile (target.actual_end_child !== null && target.actual_end_child.claim_order === undefined) {\n\t\t\ttarget.actual_end_child = target.actual_end_child.nextSibling;\n\t\t}\n\t\tif (node !== target.actual_end_child) {\n\t\t\t// We only insert if the ordering of this node should be modified or the parent node is not target\n\t\t\tif (node.claim_order !== undefined || node.parentNode !== target) {\n\t\t\t\ttarget.insertBefore(node, target.actual_end_child);\n\t\t\t}\n\t\t} else {\n\t\t\ttarget.actual_end_child = node.nextSibling;\n\t\t}\n\t} else if (node.parentNode !== target || node.nextSibling !== null) {\n\t\ttarget.appendChild(node);\n\t}\n}\n\n/**\n * @param {Node} target\n * @param {Node} node\n * @param {Node} [anchor]\n * @returns {void}\n */\nexport function insert(target, node, anchor) {\n\ttarget.insertBefore(node, anchor || null);\n}\n\n/**\n * @param {NodeEx} target\n * @param {NodeEx} node\n * @param {NodeEx} [anchor]\n * @returns {void}\n */\nexport function insert_hydration(target, node, anchor) {\n\tif (is_hydrating && !anchor) {\n\t\tappend_hydration(target, node);\n\t} else if (node.parentNode !== target || node.nextSibling != anchor) {\n\t\ttarget.insertBefore(node, anchor || null);\n\t}\n}\n\n/**\n * @param {Node} node\n * @returns {void}\n */\nexport function detach(node) {\n\tif (node.parentNode) {\n\t\tnode.parentNode.removeChild(node);\n\t}\n}\n\n/**\n * @returns {void} */\nexport function destroy_each(iterations, detaching) {\n\tfor (let i = 0; i < iterations.length; i += 1) {\n\t\tif (iterations[i]) iterations[i].d(detaching);\n\t}\n}\n\n/**\n * @template {keyof HTMLElementTagNameMap} K\n * @param {K} name\n * @returns {HTMLElementTagNameMap[K]}\n */\nexport function element(name) {\n\treturn document.createElement(name);\n}\n\n/**\n * @template {keyof HTMLElementTagNameMap} K\n * @param {K} name\n * @param {string} is\n * @returns {HTMLElementTagNameMap[K]}\n */\nexport function element_is(name, is) {\n\treturn document.createElement(name, { is });\n}\n\n/**\n * @template T\n * @template {keyof T} K\n * @param {T} obj\n * @param {K[]} exclude\n * @returns {Pick<T, Exclude<keyof T, K>>}\n */\nexport function object_without_properties(obj, exclude) {\n\tconst target = /** @type {Pick<T, Exclude<keyof T, K>>} */ ({});\n\tfor (const k in obj) {\n\t\tif (\n\t\t\thas_prop(obj, k) &&\n\t\t\t// @ts-ignore\n\t\t\texclude.indexOf(k) === -1\n\t\t) {\n\t\t\t// @ts-ignore\n\t\t\ttarget[k] = obj[k];\n\t\t}\n\t}\n\treturn target;\n}\n\n/**\n * @template {keyof SVGElementTagNameMap} K\n * @param {K} name\n * @returns {SVGElement}\n */\nexport function svg_element(name) {\n\treturn document.createElementNS('http://www.w3.org/2000/svg', name);\n}\n\n/**\n * @param {string} data\n * @returns {Text}\n */\nexport function text(data) {\n\treturn document.createTextNode(data);\n}\n\n/**\n * @returns {Text} */\nexport function space() {\n\treturn text(' ');\n}\n\n/**\n * @returns {Text} */\nexport function empty() {\n\treturn text('');\n}\n\n/**\n * @param {string} content\n * @returns {Comment}\n */\nexport function comment(content) {\n\treturn document.createComment(content);\n}\n\n/**\n * @param {EventTarget} node\n * @param {string} event\n * @param {EventListenerOrEventListenerObject} handler\n * @param {boolean | AddEventListenerOptions | EventListenerOptions} [options]\n * @returns {() => void}\n */\nexport function listen(node, event, handler, options) {\n\tnode.addEventListener(event, handler, options);\n\treturn () => node.removeEventListener(event, handler, options);\n}\n\n/**\n * @returns {(event: any) => any} */\nexport function prevent_default(fn) {\n\treturn function (event) {\n\t\tevent.preventDefault();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => any} */\nexport function stop_propagation(fn) {\n\treturn function (event) {\n\t\tevent.stopPropagation();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => any} */\nexport function stop_immediate_propagation(fn) {\n\treturn function (event) {\n\t\tevent.stopImmediatePropagation();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => void} */\nexport function self(fn) {\n\treturn function (event) {\n\t\t// @ts-ignore\n\t\tif (event.target === this) fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => void} */\nexport function trusted(fn) {\n\treturn function (event) {\n\t\t// @ts-ignore\n\t\tif (event.isTrusted) fn.call(this, event);\n\t};\n}\n\n/**\n * @param {Element} node\n * @param {string} attribute\n * @param {string} [value]\n * @returns {void}\n */\nexport function attr(node, attribute, value) {\n\tif (value == null) node.removeAttribute(attribute);\n\telse if (node.getAttribute(attribute) !== value) node.setAttribute(attribute, value);\n}\n/**\n * List of attributes that should always be set through the attr method,\n * because updating them through the property setter doesn't work reliably.\n * In the example of `width`/`height`, the problem is that the setter only\n * accepts numeric values, but the attribute can also be set to a string like `50%`.\n * If this list becomes too big, rethink this approach.\n */\nconst always_set_through_set_attribute = ['width', 'height'];\n\n/**\n * @param {Element & ElementCSSInlineStyle} node\n * @param {{ [x: string]: string }} attributes\n * @returns {void}\n */\nexport function set_attributes(node, attributes) {\n\t// @ts-ignore\n\tconst descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n\tfor (const key in attributes) {\n\t\tif (attributes[key] == null) {\n\t\t\tnode.removeAttribute(key);\n\t\t} else if (key === 'style') {\n\t\t\tnode.style.cssText = attributes[key];\n\t\t} else if (key === '__value') {\n\t\t\t/** @type {any} */ (node).value = node[key] = attributes[key];\n\t\t} else if (\n\t\t\tdescriptors[key] &&\n\t\t\tdescriptors[key].set &&\n\t\t\talways_set_through_set_attribute.indexOf(key) === -1\n\t\t) {\n\t\t\tnode[key] = attributes[key];\n\t\t} else {\n\t\t\tattr(node, key, attributes[key]);\n\t\t}\n\t}\n}\n\n/**\n * @param {Element & ElementCSSInlineStyle} node\n * @param {{ [x: string]: string }} attributes\n * @returns {void}\n */\nexport function set_svg_attributes(node, attributes) {\n\tfor (const key in attributes) {\n\t\tattr(node, key, attributes[key]);\n\t}\n}\n\n/**\n * @param {Record<string, unknown>} data_map\n * @returns {void}\n */\nexport function set_custom_element_data_map(node, data_map) {\n\tObject.keys(data_map).forEach((key) => {\n\t\tset_custom_element_data(node, key, data_map[key]);\n\t});\n}\n\n/**\n * @returns {void} */\nexport function set_custom_element_data(node, prop, value) {\n\tconst lower = prop.toLowerCase(); // for backwards compatibility with existing behavior we do lowercase first\n\tif (lower in node) {\n\t\tnode[lower] = typeof node[lower] === 'boolean' && value === '' ? true : value;\n\t} else if (prop in node) {\n\t\tnode[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n\t} else {\n\t\tattr(node, prop, value);\n\t}\n}\n\n/**\n * @param {string} tag\n */\nexport function set_dynamic_element_data(tag) {\n\treturn /-/.test(tag) ? set_custom_element_data_map : set_attributes;\n}\n\n/**\n * @returns {void}\n */\nexport function xlink_attr(node, attribute, value) {\n\tnode.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\n\n/**\n * @param {HTMLElement} node\n * @returns {string}\n */\nexport function get_svelte_dataset(node) {\n\treturn node.dataset.svelteH;\n}\n\n/**\n * @returns {unknown[]} */\nexport function get_binding_group_value(group, __value, checked) {\n\tconst value = new Set();\n\tfor (let i = 0; i < group.length; i += 1) {\n\t\tif (group[i].checked) value.add(group[i].__value);\n\t}\n\tif (!checked) {\n\t\tvalue.delete(__value);\n\t}\n\treturn Array.from(value);\n}\n\n/**\n * @param {HTMLInputElement[]} group\n * @returns {{ p(...inputs: HTMLInputElement[]): void; r(): void; }}\n */\nexport function init_binding_group(group) {\n\t/**\n\t * @type {HTMLInputElement[]} */\n\tlet _inputs;\n\treturn {\n\t\t/* push */ p(...inputs) {\n\t\t\t_inputs = inputs;\n\t\t\t_inputs.forEach((input) => group.push(input));\n\t\t},\n\t\t/* remove */ r() {\n\t\t\t_inputs.forEach((input) => group.splice(group.indexOf(input), 1));\n\t\t}\n\t};\n}\n\n/**\n * @param {number[]} indexes\n * @returns {{ u(new_indexes: number[]): void; p(...inputs: HTMLInputElement[]): void; r: () => void; }}\n */\nexport function init_binding_group_dynamic(group, indexes) {\n\t/**\n\t * @type {HTMLInputElement[]} */\n\tlet _group = get_binding_group(group);\n\n\t/**\n\t * @type {HTMLInputElement[]} */\n\tlet _inputs;\n\n\tfunction get_binding_group(group) {\n\t\tfor (let i = 0; i < indexes.length; i++) {\n\t\t\tgroup = group[indexes[i]] = group[indexes[i]] || [];\n\t\t}\n\t\treturn group;\n\t}\n\n\t/**\n\t * @returns {void} */\n\tfunction push() {\n\t\t_inputs.forEach((input) => _group.push(input));\n\t}\n\n\t/**\n\t * @returns {void} */\n\tfunction remove() {\n\t\t_inputs.forEach((input) => _group.splice(_group.indexOf(input), 1));\n\t}\n\treturn {\n\t\t/* update */ u(new_indexes) {\n\t\t\tindexes = new_indexes;\n\t\t\tconst new_group = get_binding_group(group);\n\t\t\tif (new_group !== _group) {\n\t\t\t\tremove();\n\t\t\t\t_group = new_group;\n\t\t\t\tpush();\n\t\t\t}\n\t\t},\n\t\t/* push */ p(...inputs) {\n\t\t\t_inputs = inputs;\n\t\t\tpush();\n\t\t},\n\t\t/* remove */ r: remove\n\t};\n}\n\n/** @returns {number} */\nexport function to_number(value) {\n\treturn value === '' ? null : +value;\n}\n\n/** @returns {any[]} */\nexport function time_ranges_to_array(ranges) {\n\tconst array = [];\n\tfor (let i = 0; i < ranges.length; i += 1) {\n\t\tarray.push({ start: ranges.start(i), end: ranges.end(i) });\n\t}\n\treturn array;\n}\n\n/**\n * @param {Element} element\n * @returns {ChildNode[]}\n */\nexport function children(element) {\n\treturn Array.from(element.childNodes);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @returns {void}\n */\nfunction init_claim_info(nodes) {\n\tif (nodes.claim_info === undefined) {\n\t\tnodes.claim_info = { last_index: 0, total_claimed: 0 };\n\t}\n}\n\n/**\n * @template {ChildNodeEx} R\n * @param {ChildNodeArray} nodes\n * @param {(node: ChildNodeEx) => node is R} predicate\n * @param {(node: ChildNodeEx) => ChildNodeEx | undefined} process_node\n * @param {() => R} create_node\n * @param {boolean} dont_update_last_index\n * @returns {R}\n */\nfunction claim_node(nodes, predicate, process_node, create_node, dont_update_last_index = false) {\n\t// Try to find nodes in an order such that we lengthen the longest increasing subsequence\n\tinit_claim_info(nodes);\n\tconst result_node = (() => {\n\t\t// We first try to find an element after the previous one\n\t\tfor (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n\t\t\tconst node = nodes[i];\n\t\t\tif (predicate(node)) {\n\t\t\t\tconst replacement = process_node(node);\n\t\t\t\tif (replacement === undefined) {\n\t\t\t\t\tnodes.splice(i, 1);\n\t\t\t\t} else {\n\t\t\t\t\tnodes[i] = replacement;\n\t\t\t\t}\n\t\t\t\tif (!dont_update_last_index) {\n\t\t\t\t\tnodes.claim_info.last_index = i;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\t// Otherwise, we try to find one before\n\t\t// We iterate in reverse so that we don't go too far back\n\t\tfor (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n\t\t\tconst node = nodes[i];\n\t\t\tif (predicate(node)) {\n\t\t\t\tconst replacement = process_node(node);\n\t\t\t\tif (replacement === undefined) {\n\t\t\t\t\tnodes.splice(i, 1);\n\t\t\t\t} else {\n\t\t\t\t\tnodes[i] = replacement;\n\t\t\t\t}\n\t\t\t\tif (!dont_update_last_index) {\n\t\t\t\t\tnodes.claim_info.last_index = i;\n\t\t\t\t} else if (replacement === undefined) {\n\t\t\t\t\t// Since we spliced before the last_index, we decrease it\n\t\t\t\t\tnodes.claim_info.last_index--;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\t// If we can't find any matching node, we create a new one\n\t\treturn create_node();\n\t})();\n\tresult_node.claim_order = nodes.claim_info.total_claimed;\n\tnodes.claim_info.total_claimed += 1;\n\treturn result_node;\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @param {string} name\n * @param {{ [key: string]: boolean }} attributes\n * @param {(name: string) => Element | SVGElement} create_element\n * @returns {Element | SVGElement}\n */\nfunction claim_element_base(nodes, name, attributes, create_element) {\n\treturn claim_node(\n\t\tnodes,\n\t\t/** @returns {node is Element | SVGElement} */\n\t\t(node) => node.nodeName === name,\n\t\t/** @param {Element} node */\n\t\t(node) => {\n\t\t\tconst remove = [];\n\t\t\tfor (let j = 0; j < node.attributes.length; j++) {\n\t\t\t\tconst attribute = node.attributes[j];\n\t\t\t\tif (!attributes[attribute.name]) {\n\t\t\t\t\tremove.push(attribute.name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tremove.forEach((v) => node.removeAttribute(v));\n\t\t\treturn undefined;\n\t\t},\n\t\t() => create_element(name)\n\t);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @param {string} name\n * @param {{ [key: string]: boolean }} attributes\n * @returns {Element | SVGElement}\n */\nexport function claim_element(nodes, name, attributes) {\n\treturn claim_element_base(nodes, name, attributes, element);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @param {string} name\n * @param {{ [key: string]: boolean }} attributes\n * @returns {Element | SVGElement}\n */\nexport function claim_svg_element(nodes, name, attributes) {\n\treturn claim_element_base(nodes, name, attributes, svg_element);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @returns {Text}\n */\nexport function claim_text(nodes, data) {\n\treturn claim_node(\n\t\tnodes,\n\t\t/** @returns {node is Text} */\n\t\t(node) => node.nodeType === 3,\n\t\t/** @param {Text} node */\n\t\t(node) => {\n\t\t\tconst data_str = '' + data;\n\t\t\tif (node.data.startsWith(data_str)) {\n\t\t\t\tif (node.data.length !== data_str.length) {\n\t\t\t\t\treturn node.splitText(data_str.length);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnode.data = data_str;\n\t\t\t}\n\t\t},\n\t\t() => text(data),\n\t\ttrue // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n\t);\n}\n\n/**\n * @returns {Text} */\nexport function claim_space(nodes) {\n\treturn claim_text(nodes, ' ');\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @returns {Comment}\n */\nexport function claim_comment(nodes, data) {\n\treturn claim_node(\n\t\tnodes,\n\t\t/** @returns {node is Comment} */\n\t\t(node) => node.nodeType === 8,\n\t\t/** @param {Comment} node */\n\t\t(node) => {\n\t\t\tnode.data = '' + data;\n\t\t\treturn undefined;\n\t\t},\n\t\t() => comment(data),\n\t\ttrue\n\t);\n}\n\nfunction get_comment_idx(nodes, text, start) {\n\tfor (let i = start; i < nodes.length; i += 1) {\n\t\tconst node = nodes[i];\n\t\tif (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n}\n\n/**\n * @param {boolean} is_svg\n * @returns {HtmlTagHydration}\n */\nexport function claim_html_tag(nodes, is_svg) {\n\t// find html opening tag\n\tconst start_index = get_comment_idx(nodes, 'HTML_TAG_START', 0);\n\tconst end_index = get_comment_idx(nodes, 'HTML_TAG_END', start_index + 1);\n\tif (start_index === -1 || end_index === -1) {\n\t\treturn new HtmlTagHydration(is_svg);\n\t}\n\n\tinit_claim_info(nodes);\n\tconst html_tag_nodes = nodes.splice(start_index, end_index - start_index + 1);\n\tdetach(html_tag_nodes[0]);\n\tdetach(html_tag_nodes[html_tag_nodes.length - 1]);\n\tconst claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n\tif (claimed_nodes.length === 0) {\n\t\treturn new HtmlTagHydration(is_svg);\n\t}\n\tfor (const n of claimed_nodes) {\n\t\tn.claim_order = nodes.claim_info.total_claimed;\n\t\tnodes.claim_info.total_claimed += 1;\n\t}\n\treturn new HtmlTagHydration(is_svg, claimed_nodes);\n}\n\n/**\n * @param {Text} text\n * @param {unknown} data\n * @returns {void}\n */\nexport function set_data(text, data) {\n\tdata = '' + data;\n\tif (text.data === data) return;\n\ttext.data = /** @type {string} */ (data);\n}\n\n/**\n * @param {Text} text\n * @param {unknown} data\n * @returns {void}\n */\nexport function set_data_contenteditable(text, data) {\n\tdata = '' + data;\n\tif (text.wholeText === data) return;\n\ttext.data = /** @type {string} */ (data);\n}\n\n/**\n * @param {Text} text\n * @param {unknown} data\n * @param {string} attr_value\n * @returns {void}\n */\nexport function set_data_maybe_contenteditable(text, data, attr_value) {\n\tif (~contenteditable_truthy_values.indexOf(attr_value)) {\n\t\tset_data_contenteditable(text, data);\n\t} else {\n\t\tset_data(text, data);\n\t}\n}\n\n/**\n * @returns {void} */\nexport function set_input_value(input, value) {\n\tinput.value = value == null ? '' : value;\n}\n\n/**\n * @returns {void} */\nexport function set_input_type(input, type) {\n\ttry {\n\t\tinput.type = type;\n\t} catch (e) {\n\t\t// do nothing\n\t}\n}\n\n/**\n * @returns {void} */\nexport function set_style(node, key, value, important) {\n\tif (value == null) {\n\t\tnode.style.removeProperty(key);\n\t} else {\n\t\tnode.style.setProperty(key, value, important ? 'important' : '');\n\t}\n}\n\n/**\n * @returns {void} */\nexport function select_option(select, value, mounting) {\n\tfor (let i = 0; i < select.options.length; i += 1) {\n\t\tconst option = select.options[i];\n\t\tif (option.__value === value) {\n\t\t\toption.selected = true;\n\t\t\treturn;\n\t\t}\n\t}\n\tif (!mounting || value !== undefined) {\n\t\tselect.selectedIndex = -1; // no option should be selected\n\t}\n}\n\n/**\n * @returns {void} */\nexport function select_options(select, value) {\n\tfor (let i = 0; i < select.options.length; i += 1) {\n\t\tconst option = select.options[i];\n\t\toption.selected = ~value.indexOf(option.__value);\n\t}\n}\n\nexport function select_value(select) {\n\tconst selected_option = select.querySelector(':checked');\n\treturn selected_option && selected_option.__value;\n}\n\nexport function select_multiple_value(select) {\n\treturn [].map.call(select.querySelectorAll(':checked'), (option) => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\n\n/**\n * @type {boolean} */\nlet crossorigin;\n\n/**\n * @returns {boolean} */\nexport function is_crossorigin() {\n\tif (crossorigin === undefined) {\n\t\tcrossorigin = false;\n\t\ttry {\n\t\t\tif (typeof window !== 'undefined' && window.parent) {\n\t\t\t\tvoid window.parent.document;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tcrossorigin = true;\n\t\t}\n\t}\n\treturn crossorigin;\n}\n\n/**\n * @param {HTMLElement} node\n * @param {() => void} fn\n * @returns {() => void}\n */\nexport function add_iframe_resize_listener(node, fn) {\n\tconst computed_style = getComputedStyle(node);\n\tif (computed_style.position === 'static') {\n\t\tnode.style.position = 'relative';\n\t}\n\tconst iframe = element('iframe');\n\tiframe.setAttribute(\n\t\t'style',\n\t\t'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n\t\t\t'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;'\n\t);\n\tiframe.setAttribute('aria-hidden', 'true');\n\tiframe.tabIndex = -1;\n\tconst crossorigin = is_crossorigin();\n\n\t/**\n\t * @type {() => void}\n\t */\n\tlet unsubscribe;\n\tif (crossorigin) {\n\t\tiframe.src = \"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}</script>\";\n\t\tunsubscribe = listen(\n\t\t\twindow,\n\t\t\t'message',\n\t\t\t/** @param {MessageEvent} event */ (event) => {\n\t\t\t\tif (event.source === iframe.contentWindow) fn();\n\t\t\t}\n\t\t);\n\t} else {\n\t\tiframe.src = 'about:blank';\n\t\tiframe.onload = () => {\n\t\t\tunsubscribe = listen(iframe.contentWindow, 'resize', fn);\n\t\t\t// make sure an initial resize event is fired _after_ the iframe is loaded (which is asynchronous)\n\t\t\t// see https://github.com/sveltejs/svelte/issues/4233\n\t\t\tfn();\n\t\t};\n\t}\n\tappend(node, iframe);\n\treturn () => {\n\t\tif (crossorigin) {\n\t\t\tunsubscribe();\n\t\t} else if (unsubscribe && iframe.contentWindow) {\n\t\t\tunsubscribe();\n\t\t}\n\t\tdetach(iframe);\n\t};\n}\nexport const resize_observer_content_box = /* @__PURE__ */ new ResizeObserverSingleton({\n\tbox: 'content-box'\n});\nexport const resize_observer_border_box = /* @__PURE__ */ new ResizeObserverSingleton({\n\tbox: 'border-box'\n});\nexport const resize_observer_device_pixel_content_box = /* @__PURE__ */ new ResizeObserverSingleton(\n\t{ box: 'device-pixel-content-box' }\n);\nexport { ResizeObserverSingleton };\n\n/**\n * @returns {void} */\nexport function toggle_class(element, name, toggle) {\n\t// The `!!` is required because an `undefined` flag means flipping the current state.\n\telement.classList.toggle(name, !!toggle);\n}\n\n/**\n * @template T\n * @param {string} type\n * @param {T} [detail]\n * @param {{ bubbles?: boolean, cancelable?: boolean }} [options]\n * @returns {CustomEvent<T>}\n */\nexport function custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {\n\treturn new CustomEvent(type, { detail, bubbles, cancelable });\n}\n\n/**\n * @param {string} selector\n * @param {HTMLElement} parent\n * @returns {ChildNodeArray}\n */\nexport function query_selector_all(selector, parent = document.body) {\n\treturn Array.from(parent.querySelectorAll(selector));\n}\n\n/**\n * @param {string} nodeId\n * @param {HTMLElement} head\n * @returns {any[]}\n */\nexport function head_selector(nodeId, head) {\n\tconst result = [];\n\tlet started = 0;\n\tfor (const node of head.childNodes) {\n\t\tif (node.nodeType === 8 /* comment node */) {\n\t\t\tconst comment = node.textContent.trim();\n\t\t\tif (comment === `HEAD_${nodeId}_END`) {\n\t\t\t\tstarted -= 1;\n\t\t\t\tresult.push(node);\n\t\t\t} else if (comment === `HEAD_${nodeId}_START`) {\n\t\t\t\tstarted += 1;\n\t\t\t\tresult.push(node);\n\t\t\t}\n\t\t} else if (started > 0) {\n\t\t\tresult.push(node);\n\t\t}\n\t}\n\treturn result;\n}\n/** */\nexport class HtmlTag {\n\t/**\n\t * @private\n\t * @default false\n\t */\n\tis_svg = false;\n\t/** parent for creating node */\n\te = undefined;\n\t/** html tag nodes */\n\tn = undefined;\n\t/** target */\n\tt = undefined;\n\t/** anchor */\n\ta = undefined;\n\tconstructor(is_svg = false) {\n\t\tthis.is_svg = is_svg;\n\t\tthis.e = this.n = null;\n\t}\n\n\t/**\n\t * @param {string} html\n\t * @returns {void}\n\t */\n\tc(html) {\n\t\tthis.h(html);\n\t}\n\n\t/**\n\t * @param {string} html\n\t * @param {HTMLElement | SVGElement} target\n\t * @param {HTMLElement | SVGElement} anchor\n\t * @returns {void}\n\t */\n\tm(html, target, anchor = null) {\n\t\tif (!this.e) {\n\t\t\tif (this.is_svg)\n\t\t\t\tthis.e = svg_element(/** @type {keyof SVGElementTagNameMap} */ (target.nodeName));\n\t\t\t/** #7364 target for <template> may be provided as #document-fragment(11) */ else\n\t\t\t\tthis.e = element(\n\t\t\t\t\t/** @type {keyof HTMLElementTagNameMap} */ (\n\t\t\t\t\t\ttarget.nodeType === 11 ? 'TEMPLATE' : target.nodeName\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tthis.t =\n\t\t\t\ttarget.tagName !== 'TEMPLATE'\n\t\t\t\t\t? target\n\t\t\t\t\t: /** @type {HTMLTemplateElement} */ (target).content;\n\t\t\tthis.c(html);\n\t\t}\n\t\tthis.i(anchor);\n\t}\n\n\t/**\n\t * @param {string} html\n\t * @returns {void}\n\t */\n\th(html) {\n\t\tthis.e.innerHTML = html;\n\t\tthis.n = Array.from(\n\t\t\tthis.e.nodeName === 'TEMPLATE' ? this.e.content.childNodes : this.e.childNodes\n\t\t);\n\t}\n\n\t/**\n\t * @returns {void} */\n\ti(anchor) {\n\t\tfor (let i = 0; i < this.n.length; i += 1) {\n\t\t\tinsert(this.t, this.n[i], anchor);\n\t\t}\n\t}\n\n\t/**\n\t * @param {string} html\n\t * @returns {void}\n\t */\n\tp(html) {\n\t\tthis.d();\n\t\tthis.h(html);\n\t\tthis.i(this.a);\n\t}\n\n\t/**\n\t * @returns {void} */\n\td() {\n\t\tthis.n.forEach(detach);\n\t}\n}\n\nexport class HtmlTagHydration extends HtmlTag {\n\t/** @type {Element[]} hydration claimed nodes */\n\tl = undefined;\n\n\tconstructor(is_svg = false, claimed_nodes) {\n\t\tsuper(is_svg);\n\t\tthis.e = this.n = null;\n\t\tthis.l = claimed_nodes;\n\t}\n\n\t/**\n\t * @param {string} html\n\t * @returns {void}\n\t */\n\tc(html) {\n\t\tif (this.l) {\n\t\t\tthis.n = this.l;\n\t\t} else {\n\t\t\tsuper.c(html);\n\t\t}\n\t}\n\n\t/**\n\t * @returns {void} */\n\ti(anchor) {\n\t\tfor (let i = 0; i < this.n.length; i += 1) {\n\t\t\tinsert_hydration(this.t, this.n[i], anchor);\n\t\t}\n\t}\n}\n\n/**\n * @param {NamedNodeMap} attributes\n * @returns {{}}\n */\nexport function attribute_to_object(attributes) {\n\tconst result = {};\n\tfor (const attribute of attributes) {\n\t\tresult[attribute.name] = attribute.value;\n\t}\n\treturn result;\n}\n\nconst escaped = {\n\t'\"': '"',\n\t'&': '&',\n\t'<': '<'\n};\n\nconst regex_attribute_characters_to_escape = /[\"&<]/g;\n\n/**\n * Note that the attribute itself should be surrounded in double quotes\n * @param {any} attribute\n */\nfunction escape_attribute(attribute) {\n\treturn String(attribute).replace(regex_attribute_characters_to_escape, (match) => escaped[match]);\n}\n\n/**\n * @param {Record<string, string>} attributes\n */\nexport function stringify_spread(attributes) {\n\tlet str = ' ';\n\tfor (const key in attributes) {\n\t\tif (attributes[key] != null) {\n\t\t\tstr += `${key}=\"${escape_attribute(attributes[key])}\" `;\n\t\t}\n\t}\n\n\treturn str;\n}\n\n/**\n * @param {HTMLElement} element\n * @returns {{}}\n */\nexport function get_custom_elements_slots(element) {\n\tconst result = {};\n\telement.childNodes.forEach(\n\t\t/** @param {Element} node */ (node) => {\n\t\t\tresult[node.slot || 'default'] = true;\n\t\t}\n\t);\n\treturn result;\n}\n\nexport function construct_svelte_component(component, props) {\n\treturn new component(props);\n}\n\n/**\n * @typedef {Node & {\n * \tclaim_order?: number;\n * \thydrate_init?: true;\n * \tactual_end_child?: NodeEx;\n * \tchildNodes: NodeListOf<NodeEx>;\n * }} NodeEx\n */\n\n/** @typedef {ChildNode & NodeEx} ChildNodeEx */\n\n/** @typedef {NodeEx & { claim_order: number }} NodeEx2 */\n\n/**\n * @typedef {ChildNodeEx[] & {\n * \tclaim_info?: {\n * \t\tlast_index: number;\n * \t\ttotal_claimed: number;\n * \t};\n * }} ChildNodeArray\n */\n","import { run_all } from './utils.js';\nimport { current_component, set_current_component } from './lifecycle.js';\n\nexport const dirty_components = [];\nexport const intros = { enabled: false };\nexport const binding_callbacks = [];\n\nlet render_callbacks = [];\n\nconst flush_callbacks = [];\n\nconst resolved_promise = /* @__PURE__ */ Promise.resolve();\n\nlet update_scheduled = false;\n\n/** @returns {void} */\nexport function schedule_update() {\n\tif (!update_scheduled) {\n\t\tupdate_scheduled = true;\n\t\tresolved_promise.then(flush);\n\t}\n}\n\n/** @returns {Promise<void>} */\nexport function tick() {\n\tschedule_update();\n\treturn resolved_promise;\n}\n\n/** @returns {void} */\nexport function add_render_callback(fn) {\n\trender_callbacks.push(fn);\n}\n\n/** @returns {void} */\nexport function add_flush_callback(fn) {\n\tflush_callbacks.push(fn);\n}\n\n// flush() calls callbacks in this order:\n// 1. All beforeUpdate callbacks, in order: parents before children\n// 2. All bind:this callbacks, in reverse order: children before parents.\n// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT\n// for afterUpdates called during the initial onMount, which are called in\n// reverse order: children before parents.\n// Since callbacks might update component values, which could trigger another\n// call to flush(), the following steps guard against this:\n// 1. During beforeUpdate, any updated components will be added to the\n// dirty_components array and will cause a reentrant call to flush(). Because\n// the flush index is kept outside the function, the reentrant call will pick\n// up where the earlier call left off and go through all dirty components. The\n// current_component value is saved and restored so that the reentrant call will\n// not interfere with the \"parent\" flush() call.\n// 2. bind:this callbacks cannot trigger new flush() calls.\n// 3. During afterUpdate, any updated components will NOT have their afterUpdate\n// callback called a second time; the seen_callbacks set, outside the flush()\n// function, guarantees this behavior.\nconst seen_callbacks = new Set();\n\nlet flushidx = 0; // Do *not* move this inside the flush() function\n\n/** @returns {void} */\nexport function flush() {\n\t// Do not reenter flush while dirty components are updated, as this can\n\t// result in an infinite loop. Instead, let the inner flush handle it.\n\t// Reentrancy is ok afterwards for bindings etc.\n\tif (flushidx !== 0) {\n\t\treturn;\n\t}\n\tconst saved_component = current_component;\n\tdo {\n\t\t// first, call beforeUpdate functions\n\t\t// and update components\n\t\ttry {\n\t\t\twhile (flushidx < dirty_components.length) {\n\t\t\t\tconst component = dirty_components[flushidx];\n\t\t\t\tflushidx++;\n\t\t\t\tset_current_component(component);\n\t\t\t\tupdate(component.$$);\n\t\t\t}\n\t\t} catch (e) {\n\t\t\t// reset dirty state to not end up in a deadlocked state and then rethrow\n\t\t\tdirty_components.length = 0;\n\t\t\tflushidx = 0;\n\t\t\tthrow e;\n\t\t}\n\t\tset_current_component(null);\n\t\tdirty_components.length = 0;\n\t\tflushidx = 0;\n\t\twhile (binding_callbacks.length) binding_callbacks.pop()();\n\t\t// then, once components are updated, call\n\t\t// afterUpdate functions. This may cause\n\t\t// subsequent updates...\n\t\tfor (let i = 0; i < render_callbacks.length; i += 1) {\n\t\t\tconst callback = render_callbacks[i];\n\t\t\tif (!seen_callbacks.has(callback)) {\n\t\t\t\t// ...so guard against infinite loops\n\t\t\t\tseen_callbacks.add(callback);\n\t\t\t\tcallback();\n\t\t\t}\n\t\t}\n\t\trender_callbacks.length = 0;\n\t} while (dirty_components.length);\n\twhile (flush_callbacks.length) {\n\t\tflush_callbacks.pop()();\n\t}\n\tupdate_scheduled = false;\n\tseen_callbacks.clear();\n\tset_current_component(saved_component);\n}\n\n/** @returns {void} */\nfunction update($$) {\n\tif ($$.fragment !== null) {\n\t\t$$.update();\n\t\trun_all($$.before_update);\n\t\tconst dirty = $$.dirty;\n\t\t$$.dirty = [-1];\n\t\t$$.fragment && $$.fragment.p($$.ctx, dirty);\n\t\t$$.after_update.forEach(add_render_callback);\n\t}\n}\n\n/**\n * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.\n * @param {Function[]} fns\n * @returns {void}\n */\nexport function flush_render_callbacks(fns) {\n\tconst filtered = [];\n\tconst targets = [];\n\trender_callbacks.forEach((c) => (fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c)));\n\ttargets.forEach((c) => c());\n\trender_callbacks = filtered;\n}\n","import { identity as linear, is_function, noop, run_all } from './utils.js';\nimport { now } from './environment.js';\nimport { loop } from './loop.js';\nimport { create_rule, delete_rule } from './style_manager.js';\nimport { custom_event } from './dom.js';\nimport { add_render_callback } from './scheduler.js';\n\n/**\n * @type {Promise<void> | null}\n */\nlet promise;\n\n/**\n * @returns {Promise<void>}\n */\nfunction wait() {\n\tif (!promise) {\n\t\tpromise = Promise.resolve();\n\t\tpromise.then(() => {\n\t\t\tpromise = null;\n\t\t});\n\t}\n\treturn promise;\n}\n\n/**\n * @param {Element} node\n * @param {INTRO | OUTRO | boolean} direction\n * @param {'start' | 'end'} kind\n * @returns {void}\n */\nfunction dispatch(node, direction, kind) {\n\tnode.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\n\nconst outroing = new Set();\n\n/**\n * @type {Outro}\n */\nlet outros;\n\n/**\n * @returns {void} */\nexport function group_outros() {\n\toutros = {\n\t\tr: 0,\n\t\tc: [],\n\t\tp: outros // parent group\n\t};\n}\n\n/**\n * @returns {void} */\nexport function check_outros() {\n\tif (!outros.r) {\n\t\trun_all(outros.c);\n\t}\n\toutros = outros.p;\n}\n\n/**\n * @param {import('./private.js').Fragment} block\n * @param {0 | 1} [local]\n * @returns {void}\n */\nexport function transition_in(block, local) {\n\tif (block && block.i) {\n\t\toutroing.delete(block);\n\t\tblock.i(local);\n\t}\n}\n\n/**\n * @param {import('./private.js').Fragment} block\n * @param {0 | 1} local\n * @param {0 | 1} [detach]\n * @param {() => void} [callback]\n * @returns {void}\n */\nexport function transition_out(block, local, detach, callback) {\n\tif (block && block.o) {\n\t\tif (outroing.has(block)) return;\n\t\toutroing.add(block);\n\t\toutros.c.push(() => {\n\t\t\toutroing.delete(block);\n\t\t\tif (callback) {\n\t\t\t\tif (detach) block.d(1);\n\t\t\t\tcallback();\n\t\t\t}\n\t\t});\n\t\tblock.o(local);\n\t} else if (callback) {\n\t\tcallback();\n\t}\n}\n\n/**\n * @type {import('../transition/public.js').TransitionConfig}\n */\nconst null_transition = { duration: 0 };\n\n/**\n * @param {Element & ElementCSSInlineStyle} node\n * @param {TransitionFn} fn\n * @param {any} params\n * @returns {{ start(): void; invalidate(): void; end(): void; }}\n */\nexport function create_in_transition(node, fn, params) {\n\t/**\n\t * @type {TransitionOptions} */\n\tconst options = { direction: 'in' };\n\tlet config = fn(node, params, options);\n\tlet running = false;\n\tlet animation_name;\n\tlet task;\n\tlet uid = 0;\n\n\t/**\n\t * @returns {void} */\n\tfunction cleanup() {\n\t\tif (animation_name) delete_rule(node, animation_name);\n\t}\n\n\t/**\n\t * @returns {void} */\n\tfunction go() {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = 300,\n\t\t\teasing = linear,\n\t\t\ttick = noop,\n\t\t\tcss\n\t\t} = config || null_transition;\n\t\tif (css) animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n\t\ttick(0, 1);\n\t\tconst start_time = now() + delay;\n\t\tconst end_time = start_time + duration;\n\t\tif (task) task.abort();\n\t\trunning = true;\n\t\tadd_render_callback(() => dispatch(node, true, 'start'));\n\t\ttask = loop((now) => {\n\t\t\tif (running) {\n\t\t\t\tif (now >= end_time) {\n\t\t\t\t\ttick(1, 0);\n\t\t\t\t\tdispatch(node, true, 'end');\n\t\t\t\t\tcleanup();\n\t\t\t\t\treturn (running = false);\n\t\t\t\t}\n\t\t\t\tif (now >= start_time) {\n\t\t\t\t\tconst t = easing((now - start_time) / duration);\n\t\t\t\t\ttick(t, 1 - t);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn running;\n\t\t});\n\t}\n\tlet started = false;\n\treturn {\n\t\tstart() {\n\t\t\tif (started) return;\n\t\t\tstarted = true;\n\t\t\tdelete_rule(node);\n\t\t\tif (is_function(config)) {\n\t\t\t\tconfig = config(options);\n\t\t\t\twait().then(go);\n\t\t\t} else {\n\t\t\t\tgo();\n\t\t\t}\n\t\t},\n\t\tinvalidate() {\n\t\t\tstarted = false;\n\t\t},\n\t\tend() {\n\t\t\tif (running) {\n\t\t\t\tcleanup();\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * @param {Element & ElementCSSInlineStyle} node\n * @param {TransitionFn} fn\n * @param {any} params\n * @returns {{ end(reset: any): void; }}\n */\nexport function create_out_transition(node, fn, params) {\n\t/** @type {TransitionOptions} */\n\tconst options = { direction: 'out' };\n\tlet config = fn(node, params, options);\n\tlet running = true;\n\tlet animation_name;\n\tconst group = outros;\n\tgroup.r += 1;\n\t/** @type {boolean} */\n\tlet original_inert_value;\n\n\t/**\n\t * @returns {void} */\n\tfunction go() {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = 300,\n\t\t\teasing = linear,\n\t\t\ttick = noop,\n\t\t\tcss\n\t\t} = config || null_transition;\n\n\t\tif (css) animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n\n\t\tconst start_time = now() + delay;\n\t\tconst end_time = start_time + duration;\n\t\tadd_render_callback(() => dispatch(node, false, 'start'));\n\n\t\tif ('inert' in node) {\n\t\t\toriginal_inert_value = /** @type {HTMLElement} */ (node).inert;\n\t\t\tnode.inert = true;\n\t\t}\n\n\t\tloop((now) => {\n\t\t\tif (running) {\n\t\t\t\tif (now >= end_time) {\n\t\t\t\t\ttick(0, 1);\n\t\t\t\t\tdispatch(node, false, 'end');\n\t\t\t\t\tif (!--group.r) {\n\t\t\t\t\t\t// this will result in `end()` being called,\n\t\t\t\t\t\t// so we don't need to clean up here\n\t\t\t\t\t\trun_all(group.c);\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (now >= start_time) {\n\t\t\t\t\tconst t = easing((now - start_time) / duration);\n\t\t\t\t\ttick(1 - t, t);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn running;\n\t\t});\n\t}\n\n\tif (is_function(config)) {\n\t\twait().then(() => {\n\t\t\t// @ts-ignore\n\t\t\tconfig = config(options);\n\t\t\tgo();\n\t\t});\n\t} else {\n\t\tgo();\n\t}\n\n\treturn {\n\t\tend(reset) {\n\t\t\tif (reset && 'inert' in node) {\n\t\t\t\tnode.inert = original_inert_value;\n\t\t\t}\n\t\t\tif (reset && config.tick) {\n\t\t\t\tconfig.tick(1, 0);\n\t\t\t}\n\t\t\tif (running) {\n\t\t\t\tif (animation_name) delete_rule(node, animation_name);\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * @param {Element & ElementCSSInlineStyle} node\n * @param {TransitionFn} fn\n * @param {any} params\n * @param {boolean} intro\n * @returns {{ run(b: 0 | 1): void; end(): void; }}\n */\nexport function create_bidirectional_transition(node, fn, params, intro) {\n\t/**\n\t * @type {TransitionOptions} */\n\tconst options = { direction: 'both' };\n\tlet config = fn(node, params, options);\n\tlet t = intro ? 0 : 1;\n\n\t/**\n\t * @type {Program | null} */\n\tlet running_program = null;\n\n\t/**\n\t * @type {PendingProgram | null} */\n\tlet pending_program = null;\n\tlet animation_name = null;\n\n\t/** @type {boolean} */\n\tlet original_inert_value;\n\n\t/**\n\t * @returns {void} */\n\tfunction clear_animation() {\n\t\tif (animation_name) delete_rule(node, animation_name);\n\t}\n\n\t/**\n\t * @param {PendingProgram} program\n\t * @param {number} duration\n\t * @returns {Program}\n\t */\n\tfunction init(program, duration) {\n\t\tconst d = /** @type {Program['d']} */ (program.b - t);\n\t\tduration *= Math.abs(d);\n\t\treturn {\n\t\t\ta: t,\n\t\t\tb: program.b,\n\t\t\td,\n\t\t\tduration,\n\t\t\tstart: program.start,\n\t\t\tend: program.start + duration,\n\t\t\tgroup: program.group\n\t\t};\n\t}\n\n\t/**\n\t * @param {INTRO | OUTRO} b\n\t * @returns {void}\n\t */\n\tfunction go(b) {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = 300,\n\t\t\teasing = linear,\n\t\t\ttick = noop,\n\t\t\tcss\n\t\t} = config || null_transition;\n\n\t\t/**\n\t\t * @type {PendingProgram} */\n\t\tconst program = {\n\t\t\tstart: now() + delay,\n\t\t\tb\n\t\t};\n\n\t\tif (!b) {\n\t\t\t// @ts-ignore todo: improve typings\n\t\t\tprogram.group = outros;\n\t\t\toutros.r += 1;\n\t\t}\n\n\t\tif ('inert' in node) {\n\t\t\tif (b) {\n\t\t\t\tif (original_inert_value !== undefined) {\n\t\t\t\t\t// aborted/reversed outro — restore previous inert value\n\t\t\t\t\tnode.inert = original_inert_value;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toriginal_inert_value = /** @type {HTMLElement} */ (node).inert;\n\t\t\t\tnode.inert = true;\n\t\t\t}\n\t\t}\n\n\t\tif (running_program || pending_program) {\n\t\t\tpending_program = program;\n\t\t} else {\n\t\t\t// if this is an intro, and there's a delay, we need to do\n\t\t\t// an initial tick and/or apply CSS animation immediately\n\t\t\tif (css) {\n\t\t\t\tclear_animation();\n\t\t\t\tanimation_name = create_rule(node, t, b, duration, delay, easing, css);\n\t\t\t}\n\t\t\tif (b) tick(0, 1);\n\t\t\trunning_program = init(program, duration);\n\t\t\tadd_render_callback(() => dispatch(node, b, 'start'));\n\t\t\tloop((now) => {\n\t\t\t\tif (pending_program && now > pending_program.start) {\n\t\t\t\t\trunning_program = init(pending_program, duration);\n\t\t\t\t\tpending_program = null;\n\t\t\t\t\tdispatch(node, running_program.b, 'start');\n\t\t\t\t\tif (css) {\n\t\t\t\t\t\tclear_animation();\n\t\t\t\t\t\tanimation_name = create_rule(\n\t\t\t\t\t\t\tnode,\n\t\t\t\t\t\t\tt,\n\t\t\t\t\t\t\trunning_program.b,\n\t\t\t\t\t\t\trunning_program.duration,\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\teasing,\n\t\t\t\t\t\t\tconfig.css\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (running_program) {\n\t\t\t\t\tif (now >= running_program.end) {\n\t\t\t\t\t\ttick((t = running_program.b), 1 - t);\n\t\t\t\t\t\tdispatch(node, running_program.b, 'end');\n\t\t\t\t\t\tif (!pending_program) {\n\t\t\t\t\t\t\t// we're done\n\t\t\t\t\t\t\tif (running_program.b) {\n\t\t\t\t\t\t\t\t// intro — we can tidy up immediately\n\t\t\t\t\t\t\t\tclear_animation();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// outro — needs to be coordinated\n\t\t\t\t\t\t\t\tif (!--running_program.group.r) run_all(running_program.group.c);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\trunning_program = null;\n\t\t\t\t\t} else if (now >= running_program.start) {\n\t\t\t\t\t\tconst p = now - running_program.start;\n\t\t\t\t\t\tt = running_program.a + running_program.d * easing(p / running_program.duration);\n\t\t\t\t\t\ttick(t, 1 - t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn !!(running_program || pending_program);\n\t\t\t});\n\t\t}\n\t}\n\treturn {\n\t\trun(b) {\n\t\t\tif (is_function(config)) {\n\t\t\t\twait().then(() => {\n\t\t\t\t\tconst opts = { direction: b ? 'in' : 'out' };\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tconfig = config(opts);\n\t\t\t\t\tgo(b);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tgo(b);\n\t\t\t}\n\t\t},\n\t\tend() {\n\t\t\tclear_animation();\n\t\t\trunning_program = pending_program = null;\n\t\t}\n\t};\n}\n\n/** @typedef {1} INTRO */\n/** @typedef {0} OUTRO */\n/** @typedef {{ direction: 'in' | 'out' | 'both' }} TransitionOptions */\n/** @typedef {(node: Element, params: any, options: TransitionOptions) => import('../transition/public.js').TransitionConfig} TransitionFn */\n\n/**\n * @typedef {Object} Outro\n * @property {number} r\n * @property {Function[]} c\n * @property {Object} p\n */\n\n/**\n * @typedef {Object} PendingProgram\n * @property {number} start\n * @property {INTRO|OUTRO} b\n * @property {Outro} [group]\n */\n\n/**\n * @typedef {Object} Program\n * @property {number} a\n * @property {INTRO|OUTRO} b\n * @property {1|-1} d\n * @property {number} duration\n * @property {number} start\n * @property {number} end\n * @property {Outro} [group]\n */\n","import {\n\tadd_render_callback,\n\tflush,\n\tflush_render_callbacks,\n\tschedule_update,\n\tdirty_components\n} from './scheduler.js';\nimport { current_component, set_current_component } from './lifecycle.js';\nimport { blank_object, is_empty, is_function, run, run_all, noop } from './utils.js';\nimport {\n\tchildren,\n\tdetach,\n\tstart_hydrating,\n\tend_hydrating,\n\tget_custom_elements_slots,\n\tinsert,\n\telement,\n\tattr\n} from './dom.js';\nimport { transition_in } from './transitions.js';\n\n/** @returns {void} */\nexport function bind(component, name, callback) {\n\tconst index = component.$$.props[name];\n\tif (index !== undefined) {\n\t\tcomponent.$$.bound[index] = callback;\n\t\tcallback(component.$$.ctx[index]);\n\t}\n}\n\n/** @returns {void} */\nexport function create_component(block) {\n\tblock && block.c();\n}\n\n/** @returns {void} */\nexport function claim_component(block, parent_nodes) {\n\tblock && block.l(parent_nodes);\n}\n\n/** @returns {void} */\nexport function mount_component(component, target, anchor) {\n\tconst { fragment, after_update } = component.$$;\n\tfragment && fragment.m(target, anchor);\n\t// onMount happens before the initial afterUpdate\n\tadd_render_callback(() => {\n\t\tconst new_on_destroy = component.$$.on_mount.map(run).filter(is_function);\n\t\t// if the component was destroyed immediately\n\t\t// it will update the `$$.on_destroy` reference to `null`.\n\t\t// the destructured on_destroy may still reference to the old array\n\t\tif (component.$$.on_destroy) {\n\t\t\tcomponent.$$.on_destroy.push(...new_on_destroy);\n\t\t} else {\n\t\t\t// Edge case - component was destroyed immediately,\n\t\t\t// most likely as a result of a binding initialising\n\t\t\trun_all(new_on_destroy);\n\t\t}\n\t\tcomponent.$$.on_mount = [];\n\t});\n\tafter_update.forEach(add_render_callback);\n}\n\n/** @returns {void} */\nexport function destroy_component(component, detaching) {\n\tconst $$ = component.$$;\n\tif ($$.fragment !== null) {\n\t\tflush_render_callbacks($$.after_update);\n\t\trun_all($$.on_destroy);\n\t\t$$.fragment && $$.fragment.d(detaching);\n\t\t// TODO null out other refs, including component.$$ (but need to\n\t\t// preserve final state?)\n\t\t$$.on_destroy = $$.fragment = null;\n\t\t$$.ctx = [];\n\t}\n}\n\n/** @returns {void} */\nfunction make_dirty(component, i) {\n\tif (component.$$.dirty[0] === -1) {\n\t\tdirty_components.push(component);\n\t\tschedule_update();\n\t\tcomponent.$$.dirty.fill(0);\n\t}\n\tcomponent.$$.dirty[(i / 31) | 0] |= 1 << i % 31;\n}\n\n// TODO: Document the other params\n/**\n * @param {SvelteComponent} component\n * @param {import('./public.js').ComponentConstructorOptions} options\n *\n * @param {import('./utils.js')['not_equal']} not_equal Used to compare props and state values.\n * @param {(target: Element | ShadowRoot) => void} [append_styles] Function that appends styles to the DOM when the component is first initialised.\n * This will be the `add_css` function from the compiled component.\n *\n * @returns {void}\n */\nexport function init(\n\tcomponent,\n\toptions,\n\tinstance,\n\tcreate_fragment,\n\tnot_equal,\n\tprops,\n\tappend_styles = null,\n\tdirty = [-1]\n) {\n\tconst parent_component = current_component;\n\tset_current_component(component);\n\t/** @type {import('./private.js').T$$} */\n\tconst $$ = (component.$$ = {\n\t\tfragment: null,\n\t\tctx: [],\n\t\t// state\n\t\tprops,\n\t\tupdate: noop,\n\t\tnot_equal,\n\t\tbound: blank_object(),\n\t\t// lifecycle\n\t\ton_mount: [],\n\t\ton_destroy: [],\n\t\ton_disconnect: [],\n\t\tbefore_update: [],\n\t\tafter_update: [],\n\t\tcontext: new Map(options.context || (parent_component ? parent_component.$$.context : [])),\n\t\t// everything else\n\t\tcallbacks: blank_object(),\n\t\tdirty,\n\t\tskip_bound: false,\n\t\troot: options.target || parent_component.$$.root\n\t});\n\tappend_styles && append_styles($$.root);\n\tlet ready = false;\n\t$$.ctx = instance\n\t\t? instance(component, options.props || {}, (i, ret, ...rest) => {\n\t\t\t\tconst value = rest.length ? rest[0] : ret;\n\t\t\t\tif ($$.ctx && not_equal($$.ctx[i], ($$.ctx[i] = value))) {\n\t\t\t\t\tif (!$$.skip_bound && $$.bound[i]) $$.bound[i](value);\n\t\t\t\t\tif (ready) make_dirty(component, i);\n\t\t\t\t}\n\t\t\t\treturn ret;\n\t\t })\n\t\t: [];\n\t$$.update();\n\tready = true;\n\trun_all($$.before_update);\n\t// `false` as a special case of no DOM component\n\t$$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n\tif (options.target) {\n\t\tif (options.hydrate) {\n\t\t\tstart_hydrating();\n\t\t\t// TODO: what is the correct type here?\n\t\t\t// @ts-expect-error\n\t\t\tconst nodes = children(options.target);\n\t\t\t$$.fragment && $$.fragment.l(nodes);\n\t\t\tnodes.forEach(detach);\n\t\t} else {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t$$.fragment && $$.fragment.c();\n\t\t}\n\t\tif (options.intro) transition_in(component.$$.fragment);\n\t\tmount_component(component, options.target, options.anchor);\n\t\tend_hydrating();\n\t\tflush();\n\t}\n\tset_current_component(parent_component);\n}\n\nexport let SvelteElement;\n\nif (typeof HTMLElement === 'function') {\n\tSvelteElement = class extends HTMLElement {\n\t\t/** The Svelte component constructor */\n\t\t$$ctor;\n\t\t/** Slots */\n\t\t$$s;\n\t\t/** The Svelte component instance */\n\t\t$$c;\n\t\t/** Whether or not the custom element is connected */\n\t\t$$cn = false;\n\t\t/** Component props data */\n\t\t$$d = {};\n\t\t/** `true` if currently in the process of reflecting component props back to attributes */\n\t\t$$r = false;\n\t\t/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */\n\t\t$$p_d = {};\n\t\t/** @type {Record<string, Function[]>} Event listeners */\n\t\t$$l = {};\n\t\t/** @type {Map<Function, Function>} Event listener unsubscribe functions */\n\t\t$$l_u = new Map();\n\n\t\tconstructor($$componentCtor, $$slots, use_shadow_dom) {\n\t\t\tsuper();\n\t\t\tthis.$$ctor = $$componentCtor;\n\t\t\tthis.$$s = $$slots;\n\t\t\tif (use_shadow_dom) {\n\t\t\t\tthis.attachShadow({ mode: 'open' });\n\t\t\t}\n\t\t}\n\n\t\taddEventListener(type, listener, options) {\n\t\t\t// We can't determine upfront if the event is a custom event or not, so we have to\n\t\t\t// listen to both. If someone uses a custom event with the same name as a regular\n\t\t\t// browser event, this fires twice - we can't avoid that.\n\t\t\tthis.$$l[type] = this.$$l[type] || [];\n\t\t\tthis.$$l[type].push(listener);\n\t\t\tif (this.$$c) {\n\t\t\t\tconst unsub = this.$$c.$on(type, listener);\n\t\t\t\tthis.$$l_u.set(listener, unsub);\n\t\t\t}\n\t\t\tsuper.addEventListener(type, listener, options);\n\t\t}\n\n\t\tremoveEventListener(type, listener, options) {\n\t\t\tsuper.removeEventListener(type, listener, options);\n\t\t\tif (this.$$c) {\n\t\t\t\tconst unsub = this.$$l_u.get(listener);\n\t\t\t\tif (unsub) {\n\t\t\t\t\tunsub();\n\t\t\t\t\tthis.$$l_u.delete(listener);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync connectedCallback() {\n\t\t\tthis.$$cn = true;\n\t\t\tif (!this.$$c) {\n\t\t\t\t// We wait one tick to let possible child slot elements be created/mounted\n\t\t\t\tawait Promise.resolve();\n\t\t\t\tif (!this.$$cn || this.$$c) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tfunction create_slot(name) {\n\t\t\t\t\treturn () => {\n\t\t\t\t\t\tlet node;\n\t\t\t\t\t\tconst obj = {\n\t\t\t\t\t\t\tc: function create() {\n\t\t\t\t\t\t\t\tnode = element('slot');\n\t\t\t\t\t\t\t\tif (name !== 'default') {\n\t\t\t\t\t\t\t\t\tattr(node, 'name', name);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * @param {HTMLElement} target\n\t\t\t\t\t\t\t * @param {HTMLElement} [anchor]\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tm: function mount(target, anchor) {\n\t\t\t\t\t\t\t\tinsert(target, node, anchor);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\td: function destroy(detaching) {\n\t\t\t\t\t\t\t\tif (detaching) {\n\t\t\t\t\t\t\t\t\tdetach(node);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t\treturn obj;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tconst $$slots = {};\n\t\t\t\tconst existing_slots = get_custom_elements_slots(this);\n\t\t\t\tfor (const name of this.$$s) {\n\t\t\t\t\tif (name in existing_slots) {\n\t\t\t\t\t\t$$slots[name] = [create_slot(name)];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (const attribute of this.attributes) {\n\t\t\t\t\t// this.$$data takes precedence over this.attributes\n\t\t\t\t\tconst name = this.$$g_p(attribute.name);\n\t\t\t\t\tif (!(name in this.$$d)) {\n\t\t\t\t\t\tthis.$$d[name] = get_custom_element_value(name, attribute.value, this.$$p_d, 'toProp');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Port over props that were set programmatically before ce was initialized\n\t\t\t\tfor (const key in this.$$p_d) {\n\t\t\t\t\tif (!(key in this.$$d) && this[key] !== undefined) {\n\t\t\t\t\t\tthis.$$d[key] = this[key]; // don't transform, these were set through JavaScript\n\t\t\t\t\t\tdelete this[key]; // remove the property that shadows the getter/setter\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.$$c = new this.$$ctor({\n\t\t\t\t\ttarget: this.shadowRoot || this,\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t...this.$$d,\n\t\t\t\t\t\t$$slots,\n\t\t\t\t\t\t$$scope: {\n\t\t\t\t\t\t\tctx: []\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Reflect component props as attributes\n\t\t\t\tconst reflect_attributes = () => {\n\t\t\t\t\tthis.$$r = true;\n\t\t\t\t\tfor (const key in this.$$p_d) {\n\t\t\t\t\t\tthis.$$d[key] = this.$$c.$$.ctx[this.$$c.$$.props[key]];\n\t\t\t\t\t\tif (this.$$p_d[key].reflect) {\n\t\t\t\t\t\t\tconst attribute_value = get_custom_element_value(\n\t\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\t\tthis.$$d[key],\n\t\t\t\t\t\t\t\tthis.$$p_d,\n\t\t\t\t\t\t\t\t'toAttribute'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif (attribute_value == null) {\n\t\t\t\t\t\t\t\tthis.removeAttribute(this.$$p_d[key].attribute || key);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.setAttribute(this.$$p_d[key].attribute || key, attribute_value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.$$r = false;\n\t\t\t\t};\n\t\t\t\tthis.$$c.$$.after_update.push(reflect_attributes);\n\t\t\t\treflect_attributes(); // once initially because after_update is added too late for first render\n\n\t\t\t\tfor (const type in this.$$l) {\n\t\t\t\t\tfor (const listener of this.$$l[type]) {\n\t\t\t\t\t\tconst unsub = this.$$c.$on(type, listener);\n\t\t\t\t\t\tthis.$$l_u.set(listener, unsub);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.$$l = {};\n\t\t\t}\n\t\t}\n\n\t\t// We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte\n\t\t// and setting attributes through setAttribute etc, this is helpful\n\t\tattributeChangedCallback(attr, _oldValue, newValue) {\n\t\t\tif (this.$$r) return;\n\t\t\tattr = this.$$g_p(attr);\n\t\t\tthis.$$d[attr] = get_custom_element_value(attr, newValue, this.$$p_d, 'toProp');\n\t\t\tthis.$$c?.$set({ [attr]: this.$$d[attr] });\n\t\t}\n\n\t\tdisconnectedCallback() {\n\t\t\tthis.$$cn = false;\n\t\t\t// In a microtask, because this could be a move within the DOM\n\t\t\tPromise.resolve().then(() => {\n\t\t\t\tif (!this.$$cn && this.$$c) {\n\t\t\t\t\tthis.$$c.$destroy();\n\t\t\t\t\tthis.$$c = undefined;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t$$g_p(attribute_name) {\n\t\t\treturn (\n\t\t\t\tObject.keys(this.$$p_d).find(\n\t\t\t\t\t(key) =>\n\t\t\t\t\t\tthis.$$p_d[key].attribute === attribute_name ||\n\t\t\t\t\t\t(!this.$$p_d[key].attribute && key.toLowerCase() === attribute_name)\n\t\t\t\t) || attribute_name\n\t\t\t);\n\t\t}\n\t};\n}\n\n/**\n * @param {string} prop\n * @param {any} value\n * @param {Record<string, CustomElementPropDefinition>} props_definition\n * @param {'toAttribute' | 'toProp'} [transform]\n */\nfunction get_custom_element_value(prop, value, props_definition, transform) {\n\tconst type = props_definition[prop]?.type;\n\tvalue = type === 'Boolean' && typeof value !== 'boolean' ? value != null : value;\n\tif (!transform || !props_definition[prop]) {\n\t\treturn value;\n\t} else if (transform === 'toAttribute') {\n\t\tswitch (type) {\n\t\t\tcase 'Object':\n\t\t\tcase 'Array':\n\t\t\t\treturn value == null ? null : JSON.stringify(value);\n\t\t\tcase 'Boolean':\n\t\t\t\treturn value ? '' : null;\n\t\t\tcase 'Number':\n\t\t\t\treturn value == null ? null : value;\n\t\t\tdefault:\n\t\t\t\treturn value;\n\t\t}\n\t} else {\n\t\tswitch (type) {\n\t\t\tcase 'Object':\n\t\t\tcase 'Array':\n\t\t\t\treturn value && JSON.parse(value);\n\t\t\tcase 'Boolean':\n\t\t\t\treturn value; // conversion already handled above\n\t\t\tcase 'Number':\n\t\t\t\treturn value != null ? +value : value;\n\t\t\tdefault:\n\t\t\t\treturn value;\n\t\t}\n\t}\n}\n\n/**\n * @internal\n *\n * Turn a Svelte component into a custom element.\n * @param {import('./public.js').ComponentType} Component A Svelte component constructor\n * @param {Record<string, CustomElementPropDefinition>} props_definition The props to observe\n * @param {string[]} slots The slots to create\n * @param {string[]} accessors Other accessors besides the ones for props the component has\n * @param {boolean} use_shadow_dom Whether to use shadow DOM\n * @param {(ce: new () => HTMLElement) => new () => HTMLElement} [extend]\n */\nexport function create_custom_element(\n\tComponent,\n\tprops_definition,\n\tslots,\n\taccessors,\n\tuse_shadow_dom,\n\textend\n) {\n\tlet Class = class extends SvelteElement {\n\t\tconstructor() {\n\t\t\tsuper(Component, slots, use_shadow_dom);\n\t\t\tthis.$$p_d = props_definition;\n\t\t}\n\t\tstatic get observedAttributes() {\n\t\t\treturn Object.keys(props_definition).map((key) =>\n\t\t\t\t(props_definition[key].attribute || key).toLowerCase()\n\t\t\t);\n\t\t}\n\t};\n\tObject.keys(props_definition).forEach((prop) => {\n\t\tObject.defineProperty(Class.prototype, prop, {\n\t\t\tget() {\n\t\t\t\treturn this.$$c && prop in this.$$c ? this.$$c[prop] : this.$$d[prop];\n\t\t\t},\n\t\t\tset(value) {\n\t\t\t\tvalue = get_custom_element_value(prop, value, props_definition);\n\t\t\t\tthis.$$d[prop] = value;\n\t\t\t\tthis.$$c?.$set({ [prop]: value });\n\t\t\t}\n\t\t});\n\t});\n\taccessors.forEach((accessor) => {\n\t\tObject.defineProperty(Class.prototype, accessor, {\n\t\t\tget() {\n\t\t\t\treturn this.$$c?.[accessor];\n\t\t\t}\n\t\t});\n\t});\n\tif (extend) {\n\t\t// @ts-expect-error - assigning here is fine\n\t\tClass = extend(Class);\n\t}\n\tComponent.element = /** @type {any} */ (Class);\n\treturn Class;\n}\n\n/**\n * Base class for Svelte components. Used when dev=false.\n *\n * @template {Record<string, any>} [Props=any]\n * @template {Record<string, any>} [Events=any]\n */\nexport class SvelteComponent {\n\t/**\n\t * ### PRIVATE API\n\t *\n\t * Do not use, may change at any time\n\t *\n\t * @type {any}\n\t */\n\t$$ = undefined;\n\t/**\n\t * ### PRIVATE API\n\t *\n\t * Do not use, may change at any time\n\t *\n\t * @type {any}\n\t */\n\t$$set = undefined;\n\n\t/** @returns {void} */\n\t$destroy() {\n\t\tdestroy_component(this, 1);\n\t\tthis.$destroy = noop;\n\t}\n\n\t/**\n\t * @template {Extract<keyof Events, string>} K\n\t * @param {K} type\n\t * @param {((e: Events[K]) => void) | null | undefined} callback\n\t * @returns {() => void}\n\t */\n\t$on(type, callback) {\n\t\tif (!is_function(callback)) {\n\t\t\treturn noop;\n\t\t}\n\t\tconst callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []);\n\t\tcallbacks.push(callback);\n\t\treturn () => {\n\t\t\tconst index = callbacks.indexOf(callback);\n\t\t\tif (index !== -1) callbacks.splice(index, 1);\n\t\t};\n\t}\n\n\t/**\n\t * @param {Partial<Props>} props\n\t * @returns {void}\n\t */\n\t$set(props) {\n\t\tif (this.$$set && !is_empty(props)) {\n\t\t\tthis.$$.skip_bound = true;\n\t\t\tthis.$$set(props);\n\t\t\tthis.$$.skip_bound = false;\n\t\t}\n\t}\n}\n\n/**\n * @typedef {Object} CustomElementPropDefinition\n * @property {string} [attribute]\n * @property {boolean} [reflect]\n * @property {'String'|'Boolean'|'Number'|'Array'|'Object'} [type]\n */\n","export namespace LuigiInternalMessageID {\n /**\n * A message emmitted from the Microfrontend when a custom message is sent\n */\n export const CUSTOM_MESSAGE = 'custom';\n /**\n * A message emmitted from the Microfrontend when the context data is sent\n */\n export const GET_CONTEXT = 'luigi.get-context';\n /**\n * A message sent to the microfrontend from parent with the context upon init\n */\n export const SEND_CONTEXT_HANDSHAKE = 'luigi.init';\n\n /**\n * A message sent from the Microfrontend when the context data has been received properly\n */\n export const CONTEXT_RECEIVED = 'luigi.init.ok';\n /**\n * A message emmitted from the Microfrontend when a navigation request is sent\n */\n export const NAVIGATION_REQUEST = 'luigi.navigation.open';\n /**\n * A message emmitted from the Microfrontend when a request to show an alert is sent\n */\n export const ALERT_REQUEST = 'luigi.ux.alert.show';\n /**\n * A message sent to the microfrontend to notify closing of a particular alert\n */\n export const ALERT_CLOSED = 'luigi.ux.alert.hide';\n /**\n * A message emmitted from the Microfrontend when it is first initialized\n */\n export const INITIALIZED = 'luigi.init.ok';\n /**\n * A message emmitted from the Microfrontend to request adding search parameters to the URL\n */\n export const ADD_SEARCH_PARAMS_REQUEST = 'luigi.addSearchParams';\n /**\n * A message emmitted from the Microfrontend to request adding node parameters to the URL\n */\n export const ADD_NODE_PARAMS_REQUEST = 'luigi.addNodeParams';\n /**\n * A message emmitted from the Microfrontend when a request to show an confirmation modal is sent\n */\n export const SHOW_CONFIRMATION_MODAL_REQUEST = 'luigi.ux.confirmationModal.show';\n /**\n * A message sent to the microfrontend to notify closing of a particular confirmation modal\n */\n export const CONFIRMATION_MODAL_CLOSED = 'luigi.ux.confirmationModal.hide';\n /**\n * A message emmitted from the Microfrontend when a request to show loading indicator is sent\n */\n export const SHOW_LOADING_INDICATOR_REQUEST = 'luigi.show-loading-indicator';\n /**\n * A message emmitted from the Microfrontend when a request to hide the loading indicator is sent\n */\n export const HIDE_LOADING_INDICATOR_REQUEST = 'luigi.hide-loading-indicator';\n\n /**\n * A message emmitted from the Microfrontend when a request to set the current locale is sent\n */\n export const SET_CURRENT_LOCALE_REQUEST = 'luigi.ux.set-current-locale';\n\n /**\n * A message emmitted from the Microfrontend when a request to modify the local storage is sent\n */\n export const LOCAL_STORAGE_SET_REQUEST = 'storage';\n\n /**\n * A message emmitted from the Microfrontend when a request to handle an error that happened during the runtime on the microfrontend is sent\n */\n export const RUNTIME_ERROR_HANDLING_REQUEST = 'luigi-runtime-error-handling';\n\n /**\n * A message emmitted from the Microfrontend when a request to set the anchor of the URL is sent\n */\n export const SET_ANCHOR_LINK_REQUEST = 'luigi.setAnchor';\n\n /**\n * A message emmitted from the Microfrontend when a request to set third party cookies is sent\n */\n export const SET_THIRD_PARTY_COOKIES_REQUEST = 'luigi.third-party-cookie';\n\n /**\n * A message emmitted from the Microfrontend when a request to navigate back is sent\n */\n export const BACK_NAVIGATION_REQUEST = 'luigi.navigation.back';\n\n /**\n * A message emmitted from the Microfrontend when a request to receive the current app route is sent\n */\n export const GET_CURRENT_ROUTE_REQUEST = 'luigi.navigation.currentRoute';\n\n /**\n * A message sent to the microfrontend from parent with the current app route\n */\n export const SEND_CURRENT_ROUTE_ANSWER = 'luigi.navigation.currentRoute.answer';\n\n /**\n * A message sent to the Microfrontend with the payload being the context being sent\n */\n export const SEND_CONTEXT_OBJECT = 'luigi.navigate';\n\n /**\n * A message emmitted from the Microfrontend to report that the navigation is completed is sent\n */\n export const NAVIGATION_COMPLETED_REPORT = 'luigi.navigate.ok';\n\n /**\n * A message sent to the microfronted from parent that the modal has been closed\n */\n export const CLOSE_MODAL_ANSWER = 'luigi.navigation.modal.close';\n\n /**\n * A message emmitted from the Microfrontend when a request to update the modal path parameters is sent\n */\n export const UPDATE_MODAL_PATH_DATA_REQUEST = 'luigi.navigation.updateModalDataPath';\n\n /**\n * A message emmitted from the Microfrontend when a request to update the modal settings is sent\n */\n export const UPDATE_MODAL_SETTINGS = 'luigi.navigation.updateModalSettings';\n\n /**\n * A message emmitted from the Microfrontend when a request to check on the validity of a path is sent\n */\n export const CHECK_PATH_EXISTS_REQUEST = 'luigi.navigation.pathExists';\n\n /**\n * A message sent to the microfrontend from parent with the result of checking validity of a path\n */\n export const SEND_PATH_EXISTS_ANSWER = 'luigi.navigation.pathExists.answer';\n\n /**\n * A message emmitted from the Microfrontend when a request to set the 'dirty status' (ex: avoid closing if usaved changes) is sent\n */\n export const SET_DIRTY_STATUS_REQUEST = 'luigi.set-page-dirty';\n\n /**\n * A message emmitted from the Microfrontend when a request to set the 'token auth' is sent\n */\n export const AUTH_SET_TOKEN = 'luigi.auth.tokenIssued';\n\n /**\n * A message emmitted from the Microfrontend when a request to set backdrop is sent\n */\n export const ADD_BACKDROP_REQUEST = 'luigi.add-backdrop';\n\n /**\n * A message emmitted from the Microfrontend when a request to remove backdrop is sent\n */\n export const REMOVE_BACKDROP_REQUEST = 'luigi.remove-backdrop';\n\n /**\n * A message emmitted from the Microfrontend when a request to set the viewgroup data is sent\n */\n export const SET_VIEW_GROUP_DATA_REQUEST = 'luigi.setVGData';\n\n /**\n * A message emmitted from the Microfrontend when a request to close the current modal is sent\n */\n export const CLOSE_CURRENT_MODAL_REQUEST = 'luigi.close-modal';\n}\n","import { PUBLIC_VERSION } from '../../../shared/version.js';\n\nif (typeof window !== 'undefined')\n\t// @ts-ignore\n\t(window.__svelte || (window.__svelte = { v: new Set() })).v.add(PUBLIC_VERSION);\n","// generated during release, do not modify\n\n/**\n * The current version, as set in package.json.\n *\n * https://svelte.dev/docs/svelte-compiler#svelte-version\n * @type {string}\n */\nexport const VERSION = '4.2.19';\nexport const PUBLIC_VERSION = '4';\n","/* eslint-disable @typescript-eslint/triple-slash-reference */\n/// <reference path=\"../../typings/constants/event-payloads.ts\" />\nimport type {\n AlertRequestPayload,\n ConfirmationModalRequestPayload,\n CurrentRouteRequestPayload,\n ModalPathDataRequestPayload,\n ModalSettingsRequestPayload,\n NavigationRequestPayload,\n ParamsRequestPayload\n} from 'EventPayloads';\n\n/**\n * @namespace Events\n * @description Namespace for Luigi events.\n */\n\n/**\n * Event fired when the micro frontend sends a custom message. <br><br>\n * Payload: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\n * @type {Object}\n * @memberof Events\n * @property {object} data - event data\n * @property {string} id - event ID\n * @example\n * {\n * data: {},\n * id: 'some-id'\n * }\n */\nexport const CUSTOM_MESSAGE = 'custom-message';\n\n/**\n * Event left due to historical reasons - do not use.\n * @deprecated\n * @ignore\n */\nexport const GET_CONTEXT_REQUEST = 'get-context-request';\n\n/**\n * Event fired when a navigation has been requested by the micro frontend. <br><br>\n * Payload: [NavigationRequestPayload](https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts)\n * @type {NavigationRequestPayload}\n * @memberof Events\n * @example\n * {\n * fromClosestContext: false,\n * fromContext: null,\n * fromParent: true,\n * fromVirtualTreeRoot: false,\n * link: '/test/route',\n * nodeParams: {}\n * }\n */\nexport const NAVIGATION_REQUEST = 'navigation-request';\n\n/**\n * Event fired when the micro frontend requests to show an alert. <br>\n * Read more about `showAlert` params [here](https://docs.luigi-project.io/docs/luigi-core-api?section=showalert). <br><br>\n * Payload: [AlertRequestPayload](https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts)\n * @type {AlertRequestPayload}\n * @memberof Events\n * @example\n * {\n * text: 'Custom alert message',\n * type: 'info',\n * links: {\n * goToHome: { text: 'Homepage', url: '/overview' },\n * goToOtherProject: { text: 'Other project', url: '/projects/pr2' },\n * relativePath: { text: 'Hide side nav', url: 'hideSideNav' },\n * neverShowItAgain: { text: 'Never show it again', dismissKey: 'neverShowItAgain' }\n * },\n * closeAfter: 3000\n * }\n */\nexport const ALERT_REQUEST = 'show-alert-request';\n\n/**\n * Event left due to historical reasons - do not use.\n * @deprecated\n * @ignore\n */\nexport const ALERT_CLOSED = 'close-alert-request';\n\n/**\n * Event fired when the micro frontend has been initialized.\n * @type {unspecified} (type is not relevant in this case)\n * @memberof Events\n */\nexport const INITIALIZED = 'initialized';\n\n/**\n * Event fired when the micro frontend requests the addition of search parameters to the URL. <br><br>\n * Payload: [ParamsRequestPayload](https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts)\n * @type {ParamsRequestPayload}\n * @memberof Events\n * @example\n * {\n * data: {},\n * keepBrowserHistory: false\n * }\n */\nexport const ADD_SEARCH_PARAMS_REQUEST = 'add-search-params-request';\n\n/**\n * Event fired when the micro frontend requests the addition of node parameters to the URL. <br><br>\n * Payload: [ParamsRequestPayload](https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts)\n * @type {ParamsRequestPayload}\n * @memberof Events\n * @example\n * {\n * data: {},\n * keepBrowserHistory: false\n * }\n */\nexport const ADD_NODE_PARAMS_REQUEST = 'add-node-params-request';\n\n/**\n * Event fired when the micro frontend requests to show a confirmation modal. <br>\n * Read more about `showConfirmationModal` params [here](https://docs.luigi-project.io/docs/luigi-core-api?section=showconfirmationmodal). <br><br>\n * Payload: [ConfirmationModalRequestPayload](https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts)\n * @type {ConfirmationModalRequestPayload}\n * @memberof Events\n * @example\n * {\n * header: 'Confirmation',\n * body: 'Are you sure you want to do this?',\n * buttonConfirm: 'Yes',\n * buttonDismiss: 'No'\n * }\n */\nexport const SHOW_CONFIRMATION_MODAL_REQUEST = 'show-confirmation-modal-request';\n\n/**\n * Event fired when the micro frontend requests to show a loading indicator.\n * @type {unspecified} (type is not relevant in this case)\n * @memberof Events\n */\nexport const SHOW_LOADING_INDICATOR_REQUEST = 'show-loading-indicator-request';\n\n/**\n * Event fired when the micro frontend requests to hide the loading indicator.\n * @type {unspecified} (type is not relevant in this case)\n * @memberof Events\n */\nexport const HIDE_LOADING_INDICATOR_REQUEST = 'hide-loading-indicator-request';\n\n/**\n * Event fired when the micro frontend requests to set the current locale. <br><br>\n * Payload: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\n * @type {Object.<string, string>}\n * @memberof Events\n * @example\n * {\n * currentLocale: 'en'\n * }\n */\nexport const SET_CURRENT_LOCALE_REQUEST = 'set-current-locale-request';\n\n/**\n * Event fired when the micro frontend requests to modify the local storage. <br><br>\n * Payload: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\n * @type {Object.<string, string>}\n * @memberof Events\n * @example\n * {\n * key: 'luigi-version',\n * value: '2.21.0'\n * }\n */\nexport const LOCAL_STORAGE_SET_REQUEST = 'set-storage-request';\n\n/**\n * Event fired when the micro frontend requests to handle errors that might happen during the runtime of the micro frontend.\n * @type {unspecified} (type is not relevant in this case)\n * @memberof Events\n */\nexport const RUNTIME_ERROR_HANDLING_REQUEST = 'runtime-error-handling-request';\n\n/**\n * Event fired when the micro frontend requests to set the anchor of the URL. <br><br>\n * Payload: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)\n * @type {String}\n * @memberof Events\n * @example 'some-anchor'\n */\nexport const SET_ANCHOR_LINK_REQUEST = 'set-anchor-request';\n\n/**\n * Event fired when the micro frontend requests to set third-party cookies.\n * @type {unspecified} (type is not relevant in this case)\n * @memberof Events\n */\nexport const SET_THIRD_PARTY_COOKIES_REQUEST = 'set-third-party-cookies-request';\n\n/**\n * Event left due to historical reasons - use 'GO_BACK_REQUEST' instead.\n * @deprecated\n * @ignore\n */\nexport const BACK_NAVIGATION_REQUEST = 'navigate-back-request';\n\n/**\n * Event fired when the micro frontend requests the current app route. <br><br>\n * Payload: [CurrentRouteRequestPayload](https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts)\n * @type {CurrentRouteRequestPayload}\n * @memberof Events\n * @example\n * {\n * fromClosestContext: false,\n * fromContext: null,\n * fromParent: true,\n * fromVirtualTreeRoot: false,\n * nodeParams: {}\n * }\n */\nexport const GET_CURRENT_ROUTE_REQUEST = 'get-current-route-request';\n\n/**\n * Event fired to report that the micro frontend's navigation has completed.\n * @type {unspecified} (type is not relevant in this case)\n * @memberof Events\n */\nexport const NAVIGATION_COMPLETED_REPORT = 'report-navigation-completed-request';\n\n/**\n * Event fired when the micro frontend requests to update the modal path parameters. <br><br>\n * Payload: [ModalPathDataRequestPayload](https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts)\n * @type {ModalPathDataRequestPayload}\n * @memberof Events\n * @example\n * {\n * fromClosestContext: false,\n * fromContext: null,\n * fromParent: true,\n * fromVirtualTreeRoot: false,\n * history: true,\n * link: '/test/route',\n * modal: { title: 'Some modal' },\n * nodeParams: {}\n * }\n */\nexport const UPDATE_MODAL_PATH_DATA_REQUEST = 'update-modal-path-data-request';\n\n/**\n * Event fired when the micro frontend requests to update the modal settings. <br>\n * Read more about `updateModalSettings` params [here](https://docs.luigi-project.io/docs/luigi-client-api?section=updatemodalsettings). <br><br>\n * Payload: [ModalSettingsRequestPayload](https://github.com/luigi-project/luigi/blob/main/container/typings/constants/event-payloads.ts)\n * @type {ModalSettingsRequestPayload}\n * @memberof Events\n * @example\n * {\n * addHistoryEntry: true,\n * updatedModalSettings: {}\n * }\n */\nexport const UPDATE_MODAL_SETTINGS_REQUEST = 'update-modal-settings-request';\n\n/**\n * Event fired when the micro frontend requests to check the validity of a path. <br><br>\n * Payload: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\n * @type {Object.<string, string>}\n * @memberof Events\n * @example\n * {\n * link: '/test/route'\n * }\n */\nexport const CHECK_PATH_EXISTS_REQUEST = 'check-path-exists-request';\n\n/**\n * Event fired when the micro frontend requests to set the 'dirty status' which, for example, avoids closing when there are any unsaved changes. <br><br>\n * Payload: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\n * @type {Object.<string, boolean>}\n * @memberof Events\n * @example\n * {\n * dirty: true\n * }\n */\nexport const SET_DIRTY_STATUS_REQUEST = 'set-dirty-status-request';\n\n/**\n * Event fired when the micro frontend requests to set the view group data. <br><br>\n * Payload: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\n * @type {Object.<string, unknown>}\n * @memberof Events\n * @example\n * {\n * vg: 'some data'\n * }\n */\nexport const SET_VIEW_GROUP_DATA_REQUEST = 'set-viewgroup-data-request';\n\n/**\n * Event left due to historical reasons - do not use.\n * @deprecated\n * @ignore\n */\nexport const SET_DOCUMENT_TITLE_REQUEST = 'set-document-title-request';\n\n/**\n * Event left due to historical reasons - do not use.\n * @deprecated\n * @ignore\n */\nexport const OPEN_USER_SETTINGS_REQUEST = 'open-user-settings-request';\n\n/**\n * Event left due to historical reasons - do not use.\n * @deprecated\n * @ignore\n */\nexport const CLOSE_USER_SETTINGS_REQUEST = 'close-user-settings-request';\n\n/**\n * Event left due to historical reasons - do not use.\n * @deprecated\n * @ignore\n */\nexport const COLLAPSE_LEFT_NAV_REQUEST = 'collapse-leftnav-request';\n\n/**\n * Event left due to historical reasons - do not use.\n * @deprecated\n * @ignore\n */\nexport const UPDATE_TOP_NAVIGATION_REQUEST = 'update-top-navigation-request';\n\n/**\n * Event left due to historical reasons - use 'CHECK_PATH_EXISTS_REQUEST' instead.\n * @deprecated\n * @ignore\n */\nexport const PATH_EXISTS_REQUEST = 'path-exists-request';\n\n/**\n * Event fired when the micro frontend requests to navigate back. <br><br>\n * Payload: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\n * @type {Object.<string, unknown>}\n * @memberof Events\n * @example\n * {\n * ctx: 'some context'\n * }\n */\nexport const GO_BACK_REQUEST = 'go-back-request';\n\n/**\n * Event left due to historical reasons - do not use.\n * @deprecated\n * @ignore\n */\nexport const HAS_BACK_REQUEST = 'has-back-request';\n\n/**\n * Event fired when the micro frontend requests to display the backdrop.\n * @type {unspecified} (type is not relevant in this case)\n * @memberof Events\n */\nexport const ADD_BACKDROP_REQUEST = 'add-backdrop-request';\n\n/**\n * Event fired when the micro frontend requests to remove the backdrop.\n * @type {unspecified} (type is not relevant in this case)\n * @memberof Events\n */\nexport const REMOVE_BACKDROP_REQUEST = 'remove-backdrop-request';\n\n/**\n * Event fired when the micro frontend requests to close the current modal.\n * @type {unspecified} (type is not relevant in this case)\n * @memberof Events\n */\nexport const CLOSE_CURRENT_MODAL_REQUEST = 'close-current-modal-request';\n\n/* eslint-disable @typescript-eslint/no-unsafe-function-type */\nexport class LuigiEvent extends Event {\n payload?: unknown;\n detail: unknown;\n private callbackFn: Function | undefined;\n\n constructor(type: string, data: unknown, payload?: unknown, callback?: Function) {\n super(type);\n this.detail = data;\n this.payload = payload || data || {};\n this.callbackFn = callback;\n }\n\n callback(data: unknown): void {\n if (this.callbackFn) {\n // @ts-ignore\n this.callbackFn(data);\n }\n }\n}\n\n/**\n * @exports Events\n */\n// @ts-ignore\nexport const Events = {\n ADD_BACKDROP_REQUEST,\n ADD_NODE_PARAMS_REQUEST,\n ADD_SEARCH_PARAMS_REQUEST,\n ALERT_CLOSED,\n ALERT_REQUEST,\n BACK_NAVIGATION_REQUEST,\n CHECK_PATH_EXISTS_REQUEST,\n CLOSE_CURRENT_MODAL_REQUEST,\n CLOSE_USER_SETTINGS_REQUEST,\n COLLAPSE_LEFT_NAV_REQUEST,\n CUSTOM_MESSAGE,\n GET_CONTEXT_REQUEST,\n GET_CURRENT_ROUTE_REQUEST,\n GO_BACK_REQUEST,\n HAS_BACK_REQUEST,\n HIDE_LOADING_INDICATOR_REQUEST,\n INITIALIZED,\n LOCAL_STORAGE_SET_REQUEST,\n NAVIGATION_COMPLETED_REPORT,\n NAVIGATION_REQUEST,\n OPEN_USER_SETTINGS_REQUEST,\n PATH_EXISTS_REQUEST,\n REMOVE_BACKDROP_REQUEST,\n RUNTIME_ERROR_HANDLING_REQUEST,\n SET_ANCHOR_LINK_REQUEST,\n SET_CURRENT_LOCALE_REQUEST,\n SET_DIRTY_STATUS_REQUEST,\n SET_DOCUMENT_TITLE_REQUEST,\n SET_THIRD_PARTY_COOKIES_REQUEST,\n SET_VIEW_GROUP_DATA_REQUEST,\n SHOW_CONFIRMATION_MODAL_REQUEST,\n SHOW_LOADING_INDICATOR_REQUEST,\n UPDATE_MODAL_PATH_DATA_REQUEST,\n UPDATE_MODAL_SETTINGS_REQUEST,\n UPDATE_TOP_NAVIGATION_REQUEST\n};\n\nexport { Events as LuigiEvents };\n","/* eslint-disable @typescript-eslint/triple-slash-reference */\n/// <reference path=\"../../typings/constants/event-payloads.ts\" />\nimport type {\n AlertRequestPayload,\n CheckPathPostMessageData,\n ConfirmationModalRequestPayload,\n CurrentRoutePostMessageData,\n CurrentRouteRequestPayload,\n ModalPathDataRequestPayload,\n ModalSettingsRequestPayload,\n NavigationRequestPayload,\n ParamsRequestPayload\n} from 'EventPayloads';\nimport { Events, LuigiEvent } from '../constants/communication';\nimport type { ContainerElement, IframeHandle } from '../constants/container.model';\nimport { LuigiInternalMessageID } from '../constants/internal-communication';\n\nexport class ContainerService {\n /**\n * Checks if the given HTML element is visible in the DOM by considering both\n * its width/height and any client rectangles it may have.\n *\n * @param {HTMLElement} component - the HTML element to check for visibility\n * @returns {boolean} `true` if the element is visible, otherwise `false`\n */\n isVisible(component: HTMLElement): boolean {\n return !!(component.offsetWidth || component.offsetHeight || component.getClientRects().length);\n }\n\n /**\n * Sends a message to the iframe either with the custom keyword or any other message name\n * @param iframeHandle the iframe to send the message to\n * @param msg the message to be sent\n * @param msgName the optional message name\n */\n sendCustomMessageToIframe(iframeHandle: IframeHandle, msg: object, msgName?: string) {\n const messageName = msgName || 'custom';\n\n if (iframeHandle?.iframe?.contentWindow) {\n const iframeUrl = new URL(iframeHandle.iframe.src);\n if (messageName === 'custom') {\n iframeHandle.iframe.contentWindow.postMessage({ msg: messageName, data: msg }, iframeUrl.origin);\n } else {\n iframeHandle.iframe.contentWindow.postMessage({ msg: messageName, ...msg }, iframeUrl.origin);\n }\n } else {\n console.error('Message target could not be resolved');\n }\n }\n\n /**\n * Dispatch an event to the given target container with additional payload\n * @param {string} msg - the event message\n * @param {ContainerElement} targetCnt - the targeted HTML element onto which the event is dispatched\n * @param {Object} data - custom data added to the event to be dispatched\n * @param {Object | string} payload - additional data added to the event for internal objectives\n * @param {Function} callback - optional callback function\n */\n dispatchWithPayload(\n msg: string,\n targetCnt: ContainerElement,\n data: object,\n payload: object,\n callback?: (arg?) => void\n ): void {\n this.dispatch(msg, targetCnt, data, callback, payload);\n }\n\n /**\n * Dispatch an event to the given target container\n * @param {string} msg - the event message\n * @param {ContainerElement} targetCnt - the targeted HTML element onto which the event is dispatched\n * @param {Object} data - custom data added to the event to be dispatched\n * @param {Function} callback - optional callback function\n */\n dispatch(msg: string, targetCnt: ContainerElement, data: object, callback?: (arg?) => void, payload?: object): void {\n const customEvent = new LuigiEvent(msg, data, payload, callback);\n targetCnt.dispatchEvent(customEvent);\n }\n\n /**\n * Retrieves the target container based on the event source.\n *\n * @param event The event object representing the source of the container.\n * @returns {ContainerElement | undefined} the target container object or undefined if not found\n */\n getTargetContainer(event): ContainerElement | undefined {\n let cnt;\n\n globalThis.__luigi_container_manager.container.forEach((element) => {\n if (element.iframeHandle?.iframe && element.iframeHandle.iframe.contentWindow === event.source) {\n cnt = element;\n }\n });\n\n return cnt;\n }\n\n /**\n * Initializes the Luigi Container Manager responsible for managing communication\n * between microfrontends and dispatching events accordingly. Also adds 'message' listener to the window object with\n * the defined messageListener list\n * @returns __luigi_container_manager which has the added container array and message listeners\n */\n getContainerManager() {\n if (!globalThis.__luigi_container_manager) {\n globalThis.__luigi_container_manager = {\n container: [],\n messageListener: (event) => {\n // Handle incoming messages and dispatch events based on the message type\n // (Custom messages, navigation requests, alert requests, etc.)\n const targetCnt = this.getTargetContainer(event);\n const target = targetCnt?.iframeHandle?.iframe?.contentWindow;\n if (target && target === event.source) {\n // messages emitted from microfrontends\n const msg = event.data.msg;\n\n // dispatch an event depending on message\n switch (msg) {\n case LuigiInternalMessageID.CUSTOM_MESSAGE:\n {\n const evData = event.data.data;\n const id = evData.id;\n delete evData.id;\n this.dispatch(Events.CUSTOM_MESSAGE, targetCnt, {\n id: id,\n _metaData: {},\n data: evData\n });\n }\n break;\n case LuigiInternalMessageID.GET_CONTEXT:\n // Automatically send a luigi.init message to complete the initial handshake with the microfrontend\n target.postMessage(\n {\n msg: LuigiInternalMessageID.SEND_CONTEXT_HANDSHAKE,\n context: targetCnt.context || {},\n internal: {\n thirdPartyCookieCheck: {\n disabled: targetCnt.skipCookieCheck === 'true'\n },\n currentTheme: targetCnt.theme,\n currentLocale: targetCnt.locale,\n activeFeatureToggleList: targetCnt.activeFeatureToggleList || [],\n cssVariables: targetCnt.cssVariables || {},\n anchor: targetCnt.anchor || '',\n userSettings: targetCnt.userSettings || null,\n drawer: targetCnt.drawer || false,\n modal: targetCnt.modal || false,\n viewStackSize: targetCnt.viewStackSize || 0,\n isNavigateBack: targetCnt.isNavigateBack || false\n },\n authData: targetCnt.authData || {},\n nodeParams: targetCnt.nodeParams || {},\n searchParams: targetCnt.searchParams || {},\n pathParams: targetCnt.pathParams || {}\n },\n event.origin\n );\n break;\n case LuigiInternalMessageID.NAVIGATION_REQUEST:\n this.dispatch(\n Events.NAVIGATION_REQUEST,\n targetCnt,\n event.data.params as NavigationRequestPayload,\n (val: unknown) => {\n target.postMessage(\n {\n msg: LuigiInternalMessageID.CLOSE_MODAL_ANSWER,\n data: val\n },\n event.origin\n );\n }\n );\n break;\n case LuigiInternalMessageID.ALERT_REQUEST:\n this.dispatchWithPayload(\n Events.ALERT_REQUEST,\n targetCnt,\n event,\n event.data?.data?.settings as AlertRequestPayload,\n (dismissKey?: boolean | string) => {\n targetCnt.notifyAlertClosed(event.data?.data?.settings?.id, dismissKey);\n }\n );\n break;\n case LuigiInternalMessageID.INITIALIZED:\n this.dispatch(Events.INITIALIZED, targetCnt, event.data?.params || {});\n break;\n case LuigiInternalMessageID.ADD_SEARCH_PARAMS_REQUEST:\n this.dispatch(Events.ADD_SEARCH_PARAMS_REQUEST, targetCnt, {\n data: event.data.data,\n keepBrowserHistory: event.data.keepBrowserHistory\n } as ParamsRequestPayload);\n break;\n case LuigiInternalMessageID.ADD_NODE_PARAMS_REQUEST:\n this.dispatch(Events.ADD_NODE_PARAMS_REQUEST, targetCnt, {\n data: event.data.data,\n keepBrowserHistory: event.data.keepBrowserHistory\n } as ParamsRequestPayload);\n break;\n case LuigiInternalMessageID.SHOW_CONFIRMATION_MODAL_REQUEST:\n this.dispatchWithPayload(\n Events.SHOW_CONFIRMATION_MODAL_REQUEST,\n targetCnt,\n event.data.data,\n event.data.data?.settings as ConfirmationModalRequestPayload,\n (modalResult: boolean) => {\n targetCnt.notifyConfirmationModalClosed(modalResult);\n }\n );\n break;\n case LuigiInternalMessageID.SHOW_LOADING_INDICATOR_REQUEST:\n this.dispatch(Events.SHOW_LOADING_INDICATOR_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.HIDE_LOADING_INDICATOR_REQUEST:\n this.dispatch(Events.HIDE_LOADING_INDICATOR_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.SET_CURRENT_LOCALE_REQUEST:\n this.dispatchWithPayload(Events.SET_CURRENT_LOCALE_REQUEST, targetCnt, event, event.data.data);\n break;\n case LuigiInternalMessageID.LOCAL_STORAGE_SET_REQUEST:\n this.dispatchWithPayload(Events.LOCAL_STORAGE_SET_REQUEST, targetCnt, event, event.data.data?.params);\n break;\n case LuigiInternalMessageID.RUNTIME_ERROR_HANDLING_REQUEST:\n this.dispatch(Events.RUNTIME_ERROR_HANDLING_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.SET_ANCHOR_LINK_REQUEST:\n this.dispatchWithPayload(Events.SET_ANCHOR_LINK_REQUEST, targetCnt, event, event.data.anchor);\n break;\n case LuigiInternalMessageID.SET_THIRD_PARTY_COOKIES_REQUEST:\n this.dispatch(Events.SET_THIRD_PARTY_COOKIES_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.BACK_NAVIGATION_REQUEST:\n {\n let gbctx = event.data?.goBackContext || {};\n if (typeof gbctx === 'string') {\n try {\n gbctx = JSON.parse(gbctx);\n } catch (e) {\n console.warn(e);\n }\n }\n this.dispatch(Events.GO_BACK_REQUEST, targetCnt, gbctx);\n this.dispatch(Events.BACK_NAVIGATION_REQUEST, targetCnt, event); // for BW compatibility\n }\n break;\n case LuigiInternalMessageID.GET_CURRENT_ROUTE_REQUEST:\n this.dispatchWithPayload(\n Events.GET_CURRENT_ROUTE_REQUEST,\n targetCnt,\n event,\n event.data.data as CurrentRouteRequestPayload,\n (route: string) => {\n target.postMessage(\n {\n msg: LuigiInternalMessageID.SEND_CURRENT_ROUTE_ANSWER,\n data: {\n correlationId: event.data?.data?.id,\n route\n } as CurrentRoutePostMessageData\n },\n event.origin\n );\n }\n );\n break;\n case LuigiInternalMessageID.NAVIGATION_COMPLETED_REPORT:\n this.dispatch(Events.NAVIGATION_COMPLETED_REPORT, targetCnt, event);\n break;\n case LuigiInternalMessageID.UPDATE_MODAL_PATH_DATA_REQUEST:\n this.dispatchWithPayload(\n Events.UPDATE_MODAL_PATH_DATA_REQUEST,\n targetCnt,\n event,\n event.data.params as ModalPathDataRequestPayload\n );\n break;\n case LuigiInternalMessageID.UPDATE_MODAL_SETTINGS:\n this.dispatchWithPayload(Events.UPDATE_MODAL_SETTINGS_REQUEST, targetCnt, event, {\n addHistoryEntry: event.data.addHistoryEntry,\n updatedModalSettings: event.data.updatedModalSettings\n } as ModalSettingsRequestPayload);\n break;\n case LuigiInternalMessageID.CHECK_PATH_EXISTS_REQUEST:\n this.dispatchWithPayload(\n Events.CHECK_PATH_EXISTS_REQUEST,\n targetCnt,\n event,\n event.data.data,\n (pathExists: boolean) => {\n target.postMessage(\n {\n msg: LuigiInternalMessageID.SEND_PATH_EXISTS_ANSWER,\n data: {\n correlationId: event.data?.data?.id,\n pathExists\n } as CheckPathPostMessageData\n },\n event.origin\n );\n }\n );\n break;\n case LuigiInternalMessageID.SET_DIRTY_STATUS_REQUEST:\n this.dispatchWithPayload(Events.SET_DIRTY_STATUS_REQUEST, targetCnt, event, {\n dirty: event.data.dirty\n });\n break;\n case LuigiInternalMessageID.SET_VIEW_GROUP_DATA_REQUEST:\n this.dispatch(Events.SET_VIEW_GROUP_DATA_REQUEST, targetCnt, event.data.data);\n break;\n case LuigiInternalMessageID.ADD_BACKDROP_REQUEST:\n this.dispatch(Events.ADD_BACKDROP_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.REMOVE_BACKDROP_REQUEST:\n this.dispatch(Events.REMOVE_BACKDROP_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.CLOSE_CURRENT_MODAL_REQUEST:\n this.dispatch(Events.CLOSE_CURRENT_MODAL_REQUEST, targetCnt, event);\n break;\n }\n }\n }\n };\n window.addEventListener('message', globalThis.__luigi_container_manager.messageListener);\n }\n\n return globalThis.__luigi_container_manager;\n }\n\n /**\n * Adds thisComponent's object reference the the __luigi_container_manager container list\n *\n * @param {HTMLElement} thisComponent - HTML element that represents the current rendered container (`thisComponent`)\n */\n registerContainer(thisComponent: HTMLElement): void {\n this.getContainerManager().container.push(thisComponent);\n }\n}\n\nexport const containerService = new ContainerService();\n","import type { IframeHandle, ContainerElement } from '../constants/container.model';\nimport { LuigiInternalMessageID } from '../constants/internal-communication';\nimport { containerService } from '../services/container.service';\n\nexport class ContainerAPIFunctions {\n /**\n * Updates the context of the microfrontend by sending a message to the iframe that sets the context of the microfrontend\n * @param contextObj The context data\n * @param internal internal luigi legacy data\n * @param iframeHandle a reference to the iframe that is needed to send a message to it internally\n * @param nodeParams node parameters to be sent to the microfrontend\n * @param pathParams path parameters to be sent to the microfrontend\n * @param searchParams search parameters to be sent to the microfrontend\n */\n updateContext = (\n contextObj: object,\n internal?: object,\n iframeHandle?: IframeHandle,\n nodeParams?: object,\n pathParams?: object,\n searchParams?: object\n ) => {\n if (iframeHandle) {\n const internalParameter = internal || {};\n containerService.sendCustomMessageToIframe(\n iframeHandle,\n {\n context: contextObj,\n nodeParams: nodeParams || {},\n pathParams: pathParams || {},\n searchParams: searchParams || {},\n internal: internalParameter,\n // set withoutSync to true for the container case to avoid browser history changes from luigi client\n withoutSync: true\n },\n LuigiInternalMessageID.SEND_CONTEXT_OBJECT\n );\n } else {\n console.warn('Attempting to update context on inexisting iframe');\n }\n };\n\n /**\n * Updates route of the microfrontend by sending a message to the iframe that sets new view URL\n * @param viewUrl new view URL\n * @param context context data\n * @param internal internal luigi legacy data\n * @param iframeHandle a reference to the iframe that is needed to send a message to it internally\n */\n updateViewUrl = (viewUrl: string, context: object, internal?: object, iframeHandle?: IframeHandle) => {\n if (iframeHandle) {\n const internalParameter = internal || {};\n containerService.sendCustomMessageToIframe(\n iframeHandle,\n {\n context,\n internal: internalParameter,\n withoutSync: false,\n viewUrl\n },\n LuigiInternalMessageID.SEND_CONTEXT_OBJECT\n );\n } else {\n console.warn('Attempting to update route on inexisting iframe');\n }\n };\n\n /**\n * Updates the auth data of the microfrontend by sending a message to the iframe that sets the authData of the microfrontend\n * @param iframeHandle a reference to the iframe that is needed to send a message to it internally\n * @param authData the authData object being sent to the microfrontend\n */\n updateAuthData = (iframeHandle: IframeHandle, authData: object) => {\n if (iframeHandle && authData) {\n containerService.sendCustomMessageToIframe(iframeHandle, { authData }, LuigiInternalMessageID.AUTH_SET_TOKEN);\n } else {\n console.warn('Attempting to update auth data on inexisting iframe or authData');\n }\n };\n\n /**\n * Send a custom message to the referenced iframe or web component\n * @param id a string containing the message id\n * @param mainComponent a reference to the web component to be affected\n * @param isWebcomponent predicate showing if currently referencing a web component or not\n * @param iframeHandle a reference to the iframe to be affected\n * @param data data to be sent alongside the custom message\n */\n sendCustomMessage = (\n id: string,\n mainComponent: ContainerElement,\n isWebcomponent: boolean,\n iframeHandle: IframeHandle,\n data?: object\n ) => {\n if (isWebcomponent && mainComponent._luigi_mfe_webcomponent) {\n containerService.dispatch(id, mainComponent._luigi_mfe_webcomponent, data);\n } else {\n const msg = { ...data };\n if (msg['id']) {\n console.warn('Property \"id\" is reserved and can not be used in custom message data');\n }\n msg['id'] = id;\n containerService.sendCustomMessageToIframe(iframeHandle, msg);\n }\n };\n\n /**\n * Send a message to the microfrontend notifying the alert has been closed\n * @param id the id of the alert being closed\n * @param dismissKey the dismiss key being sent if any (optional)\n * @param iframeHandle the handle of the iframe to send the message to (optional)\n */\n notifyAlertClosed(id: string, dismissKey?: string, iframeHandle?: IframeHandle) {\n const message = dismissKey ? { id, dismissKey } : { id };\n containerService.sendCustomMessageToIframe(iframeHandle, message, LuigiInternalMessageID.ALERT_CLOSED);\n }\n\n /**\n * Send a message to the microfrontend notifying the modal has been closed\n * @param modalResult the result of the modal being closed\n * @param iframeHandle the handle of the iframe to send the message to (optional)\n */\n notifyConfirmationModalClosed = (modalResult: boolean, iframeHandle?: IframeHandle) => {\n const message = { data: { confirmed: modalResult } };\n containerService.sendCustomMessageToIframe(iframeHandle, message, LuigiInternalMessageID.CONFIRMATION_MODAL_CLOSED);\n };\n}\n\nexport const ContainerAPI = new ContainerAPIFunctions();\n","/**\n * Retrieves the allow rules for iframes and modifies them according to w3c standard conditions.\n * @param {string[]} allowRules - qn array of allow rules\n * @returns {string|undefined} the modified allow rules joined as a single string, or undefined if allowRules is falsy\n */\nexport const getAllowRules = (allowRules: string[]) => {\n if (!allowRules) return undefined;\n const rules = allowRules;\n rules.forEach((rule, index) => {\n rules[index] = rule + (rule.indexOf(';') != -1 ? '' : ';');\n rules[index] = allowRules[index].replaceAll('\"', \"'\");\n });\n return rules.join(' ');\n};\n","import type {\n LayoutConfig,\n RendererConfig,\n RendererLayout,\n RendererObject,\n RendererUseProps\n} from '../constants/container.model';\n\n/**\n * Default compound renderer.\n */\nexport class DefaultCompoundRenderer {\n rendererObject: RendererObject;\n config: RendererConfig;\n\n constructor(rendererObj?: RendererObject) {\n if (rendererObj) {\n this.rendererObject = rendererObj;\n this.config = rendererObj.config || {};\n } else {\n this.config = {};\n }\n }\n\n createCompoundContainer(): HTMLDivElement {\n return document.createElement('div');\n }\n\n createCompoundItemContainer(layoutConfig?: object): HTMLDivElement {\n return document.createElement('div');\n }\n\n attachCompoundItem(compoundCnt: HTMLElement, compoundItemCnt: HTMLElement): void {\n compoundCnt.appendChild(compoundItemCnt);\n }\n}\n\n/**\n * Compound Renderer for custom rendering as defined in luigi config.\n */\nexport class CustomCompoundRenderer extends DefaultCompoundRenderer {\n superRenderer: DefaultCompoundRenderer;\n\n constructor(rendererObj: RendererObject) {\n super(rendererObj || { use: {} });\n if (rendererObj && rendererObj.use && (rendererObj.use as RendererUseProps).extends) {\n this.superRenderer = resolveRenderer({\n use: (rendererObj.use as RendererUseProps).extends,\n config: rendererObj.config\n });\n }\n }\n\n createCompoundContainer(): HTMLDivElement {\n if ((this.rendererObject.use as RendererUseProps).createCompoundContainer) {\n return (this.rendererObject.use as RendererUseProps).createCompoundContainer(this.config, this.superRenderer);\n } else if (this.superRenderer) {\n return this.superRenderer.createCompoundContainer();\n }\n return super.createCompoundContainer();\n }\n\n createCompoundItemContainer(layoutConfig): HTMLDivElement {\n if ((this.rendererObject.use as RendererUseProps).createCompoundItemContainer) {\n return (this.rendererObject.use as RendererUseProps).createCompoundItemContainer(\n layoutConfig,\n this.config,\n this.superRenderer\n );\n } else if (this.superRenderer) {\n return this.superRenderer.createCompoundItemContainer(layoutConfig);\n }\n return super.createCompoundItemContainer(layoutConfig);\n }\n\n attachCompoundItem(compoundCnt, compoundItemCnt): void {\n if ((this.rendererObject.use as RendererUseProps).attachCompoundItem) {\n (this.rendererObject.use as RendererUseProps).attachCompoundItem(\n compoundCnt,\n compoundItemCnt,\n this.superRenderer\n );\n } else if (this.superRenderer) {\n this.superRenderer.attachCompoundItem(compoundCnt, compoundItemCnt);\n } else {\n super.attachCompoundItem(compoundCnt, compoundItemCnt);\n }\n }\n}\n\n/**\n * Compound Renderer for a css grid compound view.\n */\nexport class GridCompoundRenderer extends DefaultCompoundRenderer {\n createCompoundContainer(): HTMLDivElement {\n const containerClass = '__lui_compound_' + new Date().getTime();\n const compoundCnt = document.createElement('div');\n compoundCnt.classList.add(containerClass);\n let mediaQueries = '';\n\n if (this.config.layouts) {\n this.config.layouts.forEach((el: RendererLayout) => {\n if (el.minWidth || el.maxWidth) {\n let mq = '@media only screen ';\n if (el.minWidth != null) {\n mq += `and (min-width: ${el.minWidth}px) `;\n }\n if (el.maxWidth != null) {\n mq += `and (max-width: ${el.maxWidth}px) `;\n }\n\n mq += `{\n .${containerClass} {\n grid-template-columns: ${el.columns || 'auto'};\n grid-template-rows: ${el.rows || 'auto'};\n grid-gap: ${el.gap || '0'};\n }\n }\n `;\n mediaQueries += mq;\n }\n });\n }\n\n compoundCnt.innerHTML = /* html */ `\n <style scoped>\n .${containerClass} {\n display: grid;\n grid-template-columns: ${this.config.columns || 'auto'};\n grid-template-rows: ${this.config.rows || 'auto'};\n grid-gap: ${this.config.gap || '0'};\n min-height: ${this.config.minHeight || 'auto'};\n }\n ${mediaQueries}\n </style>\n `;\n return compoundCnt;\n }\n\n createCompoundItemContainer(layoutConfig: LayoutConfig): HTMLDivElement {\n const config = layoutConfig || {};\n const compoundItemCnt = document.createElement('div');\n compoundItemCnt.setAttribute('style', `grid-row: ${config.row || 'auto'}; grid-column: ${config.column || 'auto'}`);\n compoundItemCnt.classList.add('lui-compoundItemCnt');\n return compoundItemCnt;\n }\n}\n\n/**\n * Returns the compound renderer class for a given config.\n * If no specific one is found, {DefaultCompoundRenderer} is returned.\n *\n * @param {*} rendererConfig - the renderer config object defined in luigi config\n */\nexport const resolveRenderer = (rendererConfig: RendererObject) => {\n const rendererDef: RendererUseProps | string = rendererConfig.use;\n if (!rendererDef) {\n return new DefaultCompoundRenderer(rendererConfig);\n } else if (rendererDef === 'grid') {\n return new GridCompoundRenderer(rendererConfig);\n } else if (\n (rendererDef as RendererUseProps).createCompoundContainer ||\n (rendererDef as RendererUseProps).createCompoundItemContainer ||\n (rendererDef as RendererUseProps).attachCompoundItem\n ) {\n return new CustomCompoundRenderer(rendererConfig);\n }\n return new DefaultCompoundRenderer(rendererConfig);\n};\n\n/**\n * Registers event listeners defined at the navNode.\n *\n * @param {*} eventbusListeners - a map of event listener arrays with event id as key\n * @param {*} navNode - the web component node configuration object\n * @param {*} nodeId - the web component node id\n * @param {*} wcElement - the web component element - optional\n */\nexport const registerEventListeners = (eventbusListeners, navNode, nodeId: string, wcElement?) => {\n if (navNode?.eventListeners) {\n navNode.eventListeners.forEach((el) => {\n const evID = el.source + '.' + el.name;\n const listenerList = eventbusListeners[evID];\n const listenerInfo = {\n wcElementId: nodeId,\n wcElement: wcElement,\n action: el.action,\n converter: el.dataConverter\n };\n\n if (listenerList) {\n listenerList.push(listenerInfo);\n } else {\n eventbusListeners[evID] = [listenerInfo];\n }\n });\n }\n};\n\n/**\n * Desanitization of an object\n * @param {Object} paramsMap\n * @returns\n */\nexport const deSanitizeParamsMap = (paramsMap) => {\n return Object.entries(paramsMap).reduce((sanitizedMap, paramPair) => {\n sanitizedMap[deSanitizeParam(paramPair[0])] = deSanitizeParam(paramPair[1]);\n return sanitizedMap;\n }, {});\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction deSanitizeParam(value: any): string {\n const desani = String(value)\n .replaceAll('<', '<')\n .replaceAll('>', '>')\n .replaceAll('"', '\"')\n .replaceAll(''', \"'\")\n .replaceAll('/', '/');\n return desani;\n}\n","/* eslint no-prototype-builtins: 0 */\nimport {\n DefaultCompoundRenderer,\n resolveRenderer,\n registerEventListeners,\n deSanitizeParamsMap\n} from './web-component-helpers';\nimport { ContainerService } from './container.service';\nimport { Events } from '../constants/communication';\nimport type {\n ContainerElement,\n LayoutConfig,\n WebComponentNode,\n WebComponentRenderer\n} from '../constants/container.model';\n\n/** Methods for dealing with web components based micro frontend handling */\nexport class WebComponentService {\n containerService: ContainerService;\n thisComponent: ContainerElement;\n alertResolvers: Record<string, (value: unknown) => void> = {};\n alertIndex = 0;\n modalResolver: { resolve: () => void; reject: () => void };\n\n constructor() {\n this.containerService = new ContainerService();\n }\n\n dynamicImport(viewUrl: string) {\n // Object.freeze() used as potential marker for bundlers other than webpack\n return Object.freeze(import(/* webpackIgnore: true */ viewUrl));\n }\n\n processViewUrl(viewUrl: string, data?: object): string {\n return viewUrl;\n }\n\n /**\n * Attaches a web component with tagname wc_id and adds it to wcItemContainer,\n * if attached to wc_container\n *\n * @param wc_id a tagname that is used when creating the web component element\n * @param wcItemPlaceholder placeholder for web component container\n * @param wc_container web component container element\n * @param ctx context to be passed to the web component\n * @param viewUrl url to render content from\n * @param nodeId refers to an attribute of the web component to be identified from the rest\n * @param isCompoundChild defines if rendered mf is a compound child or not\n */\n attachWC(\n wc_id: string,\n wcItemPlaceholder: HTMLDivElement,\n wc_container: ContainerElement,\n ctx: object,\n viewUrl: string,\n nodeId: string,\n isCompoundChild?: boolean\n ) {\n if (wc_container && wc_container.contains(wcItemPlaceholder)) {\n const wc = document.createElement(wc_id);\n if (nodeId) {\n wc.setAttribute('nodeId', nodeId);\n }\n wc.setAttribute('lui_web_component', 'true');\n\n this.initWC(wc, wc_id, wc_container, viewUrl, ctx, nodeId, isCompoundChild);\n wc_container.replaceChild(wc, wcItemPlaceholder);\n if (wc_container._luigi_node) {\n wc_container._luigi_mfe_webcomponent = wc;\n }\n wc_container.dispatchEvent(new Event('wc_ready'));\n }\n }\n\n /**\n * Function that uses the current instance of the containerService to dispatch a Luigi event to the current instance of the container\n * that is 'thisComponent'\n * @param msg the message to be delivered\n * @param data the data to be sent\n * @param callback the callback function to be called\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n dispatchLuigiEvent(msg: string, data: object, callback?: (arg?: any) => void) {\n this.containerService.dispatch(msg, this.thisComponent, data, callback);\n }\n\n /**\n * This function is used to create the Luigi Client API for the web-component-based micro frontend.\n * As the function expands with more functionality, it might be moved to a separate class.\n *\n * The client API here should be a reflection of the Core WC Client api from core/src/services/web-components.js\n *\n * @param eventBusElement the event bus to be used for cross web component communication, i.e.: for compound micro frontends container scenario\n * @param nodeId refers to an attribute of the web component to be identified from the rest\n * @param wc_id a tagname that is used when creating the web component element\n * @param component\n * @param isCompoundChild defines if rendered mf is a compound child or not\n * @returns an object with the Luigi Client API\n */\n createClientAPI(\n eventBusElement: ContainerElement,\n nodeId: string,\n wc_id: string,\n component: HTMLElement,\n isCompoundChild?: boolean\n ) {\n return {\n linkManager: () => {\n let fromContext = null;\n let fromClosestContext = false;\n let fromVirtualTreeRoot = false;\n let fromParent = false;\n let nodeParams = {};\n\n const linkManagerInstance = {\n navigate: (route, settings = {}) => {\n const options = {\n fromContext,\n fromClosestContext,\n fromVirtualTreeRoot,\n fromParent,\n nodeParams,\n ...settings\n };\n this.dispatchLuigiEvent(Events.NAVIGATION_REQUEST, {\n link: route,\n ...options\n });\n },\n navigateToIntent: (semanticSlug: string, params = {}): void => {\n let newPath = '#?intent=';\n\n newPath += semanticSlug;\n\n if (params && Object.keys(params)?.length) {\n const paramList = Object.entries(params);\n\n // append parameters to the path if any\n if (paramList.length > 0) {\n newPath += '?';\n\n for (const [key, value] of paramList) {\n newPath += key + '=' + value + '&';\n }\n\n // trim potential excessive ampersand & at the end\n newPath = newPath.slice(0, -1);\n }\n }\n\n linkManagerInstance.navigate(newPath);\n },\n fromClosestContext: () => {\n fromClosestContext = true;\n return linkManagerInstance;\n },\n fromContext: (navigationContext) => {\n fromContext = navigationContext;\n return linkManagerInstance;\n },\n fromVirtualTreeRoot: () => {\n fromVirtualTreeRoot = true;\n return linkManagerInstance;\n },\n fromParent: () => {\n fromParent = true;\n return linkManagerInstance;\n },\n getCurrentRoute: () => {\n const options = {\n fromContext,\n fromClosestContext,\n fromVirtualTreeRoot,\n fromParent,\n nodeParams\n };\n return new Promise((resolve, reject) => {\n this.containerService.dispatch(\n Events.GET_CURRENT_ROUTE_REQUEST,\n this.thisComponent,\n { ...options },\n (route) => {\n if (route) {\n resolve(route);\n } else {\n reject('No current route received.');\n }\n }\n );\n });\n },\n withParams: (params) => {\n nodeParams = params;\n return linkManagerInstance;\n },\n updateModalPathInternalNavigation: (path: string, modalSettings = {}, addHistoryEntry = false): void => {\n if (!path) {\n console.warn('Updating path of the modal upon internal navigation prevented. No path specified.');\n return;\n }\n\n const options = {\n fromClosestContext,\n fromContext,\n fromParent,\n fromVirtualTreeRoot,\n nodeParams\n };\n\n this.dispatchLuigiEvent(\n Events.UPDATE_MODAL_PATH_DATA_REQUEST,\n Object.assign(options, {\n history: addHistoryEntry,\n link: path,\n modal: modalSettings\n })\n );\n },\n updateTopNavigation: (): void => {\n this.dispatchLuigiEvent(Events.UPDATE_TOP_NAVIGATION_REQUEST, {});\n },\n pathExists: (link: string) => {\n const options = {\n fromContext,\n fromClosestContext,\n fromVirtualTreeRoot,\n fromParent,\n nodeParams\n };\n return new Promise((resolve, reject) => {\n this.containerService.dispatch(\n Events.CHECK_PATH_EXISTS_REQUEST,\n this.thisComponent,\n { ...options, link },\n (exists) => {\n if (exists) {\n resolve(true);\n } else {\n reject(false);\n }\n }\n );\n // For BW compatibility\n this.containerService.dispatch(\n Events.PATH_EXISTS_REQUEST,\n this.thisComponent,\n { ...options, link },\n (exists) => {\n if (exists) {\n resolve(true);\n } else {\n reject(false);\n }\n }\n );\n });\n },\n openAsDrawer: (route, drawerSettings = {}) => {\n linkManagerInstance.navigate(route, { drawer: drawerSettings });\n },\n openAsModal: (route, modalSettings = {}) => {\n linkManagerInstance.navigate(route, { modal: modalSettings });\n },\n openAsSplitView: (route, splitViewSettings = {}) => {\n linkManagerInstance.navigate(route, {\n splitView: splitViewSettings\n });\n },\n goBack: (goBackContext) => {\n this.dispatchLuigiEvent(Events.GO_BACK_REQUEST, goBackContext);\n },\n hasBack: () => {\n return false;\n },\n updateModalSettings: (modalSettings = {}, addHistoryEntry = false) => {\n this.dispatchLuigiEvent(Events.UPDATE_MODAL_SETTINGS_REQUEST, {\n updatedModalSettings: modalSettings,\n addHistoryEntry\n });\n }\n };\n return linkManagerInstance;\n },\n uxManager: () => {\n return {\n showAlert: (alertSettings) => {\n alertSettings.id = this.alertIndex++;\n return new Promise((resolve) => {\n this.alertResolvers[alertSettings.id] = resolve;\n this.dispatchLuigiEvent(Events.ALERT_REQUEST, alertSettings, (dismissKey?: boolean | string) => {\n this.resolveAlert(alertSettings.id, dismissKey);\n });\n });\n },\n showConfirmationModal: (settings) => {\n return new Promise<void>((resolve, reject) => {\n this.modalResolver = { resolve, reject };\n this.containerService.dispatch(\n Events.SHOW_CONFIRMATION_MODAL_REQUEST,\n this.thisComponent,\n settings,\n (confirmed) => {\n if (confirmed) {\n resolve();\n } else {\n reject();\n }\n }\n );\n });\n },\n getCurrentTheme: (): string | undefined => {\n return this.thisComponent.theme;\n },\n closeUserSettings: () => {\n this.dispatchLuigiEvent(Events.CLOSE_USER_SETTINGS_REQUEST, this.thisComponent.userSettings);\n },\n openUserSettings: () => {\n this.dispatchLuigiEvent(Events.OPEN_USER_SETTINGS_REQUEST, this.thisComponent.userSettings);\n },\n collapseLeftSideNav: () => {\n this.dispatchLuigiEvent(Events.COLLAPSE_LEFT_NAV_REQUEST, {});\n },\n getDirtyStatus: () => {\n return this.thisComponent.dirtyStatus || false;\n },\n getDocumentTitle: () => {\n return this.thisComponent.documentTitle;\n },\n setDocumentTitle: (title) => {\n this.dispatchLuigiEvent(Events.SET_DOCUMENT_TITLE_REQUEST, title);\n },\n setDirtyStatus: (isDirty: boolean) => {\n this.dispatchLuigiEvent(Events.SET_DIRTY_STATUS_REQUEST, { dirty: isDirty });\n },\n setCurrentLocale: (locale: string) => {\n if (locale) {\n this.dispatchLuigiEvent(Events.SET_CURRENT_LOCALE_REQUEST, { currentLocale: locale });\n }\n },\n removeBackdrop: () => {\n this.dispatchLuigiEvent(Events.REMOVE_BACKDROP_REQUEST, {});\n },\n addBackdrop: () => {\n this.dispatchLuigiEvent(Events.ADD_BACKDROP_REQUEST, {});\n },\n showLoadingIndicator: () => {\n this.dispatchLuigiEvent(Events.SHOW_LOADING_INDICATOR_REQUEST, {});\n },\n hideLoadingIndicator: () => {\n this.dispatchLuigiEvent(Events.HIDE_LOADING_INDICATOR_REQUEST, {});\n },\n hideAppLoadingIndicator: () => {\n this.dispatchLuigiEvent(Events.HIDE_LOADING_INDICATOR_REQUEST, {});\n },\n closeCurrentModal: () => {\n this.dispatchLuigiEvent(Events.CLOSE_CURRENT_MODAL_REQUEST, {});\n }\n };\n },\n getCurrentLocale: (): string | undefined => {\n return this.thisComponent.locale;\n },\n getActiveFeatureToggles: (): string[] => {\n return this.thisComponent.activeFeatureToggleList || [];\n },\n publishEvent: (ev) => {\n if (eventBusElement && eventBusElement.eventBus) {\n // compound component use case only\n eventBusElement.eventBus.onPublishEvent(ev, nodeId, wc_id);\n }\n const payload = {\n id: ev.type,\n _metaData: {\n nodeId,\n wc_id,\n src: component\n },\n data: ev.detail\n };\n this.dispatchLuigiEvent(Events.CUSTOM_MESSAGE, payload);\n },\n luigiClientInit: () => {\n this.dispatchLuigiEvent(Events.INITIALIZED, {});\n },\n addNodeParams: (params, keepBrowserHistory) => {\n if (isCompoundChild) {\n return;\n }\n this.dispatchLuigiEvent(Events.ADD_NODE_PARAMS_REQUEST, {\n params,\n data: params,\n keepBrowserHistory\n });\n },\n getNodeParams: (shouldDesanitise: boolean): object => {\n if (isCompoundChild) {\n return {};\n }\n if (shouldDesanitise) {\n return deSanitizeParamsMap(this.thisComponent.nodeParams);\n }\n return this.thisComponent.nodeParams || {};\n },\n setAnchor: (anchor) => {\n if (isCompoundChild) {\n return;\n }\n this.dispatchLuigiEvent(Events.SET_ANCHOR_LINK_REQUEST, anchor);\n },\n getAnchor: (): string => {\n return this.thisComponent.anchor || '';\n },\n getCoreSearchParams: (): object => {\n return this.thisComponent.searchParams || {};\n },\n getPathParams: (): object => {\n return this.thisComponent.pathParams || {};\n },\n getClientPermissions: (): object => {\n return this.thisComponent.clientPermissions || {};\n },\n addCoreSearchParams: (searchParams = {}, keepBrowserHistory = true) => {\n this.dispatchLuigiEvent(Events.ADD_SEARCH_PARAMS_REQUEST, { data: searchParams, keepBrowserHistory });\n },\n getUserSettings: (): object => {\n return this.thisComponent.userSettings || {};\n },\n setViewGroupData: (data) => {\n this.dispatchLuigiEvent(Events.SET_VIEW_GROUP_DATA_REQUEST, data);\n }\n };\n }\n\n /**\n * Attaches Client Api to web component\n * if __postProcess defined allow for custom setting of clientApi when developers want to decide how to add it to their mf\n * otherwise just attach it to the wc webcomponent alongside the context directly.\n *\n * @param wc web component to attach to\n * @param wc_id a tagname that is used when creating the web component element\n * @param eventBusElement the event bus to be used for cross web component communication, i.e.: for compound micro frontends container scenario\n * @param viewUrl url to render content from\n * @param ctx context to be passed to the web component\n * @param nodeId refers to an attribute of the web component to be identified from the rest\n * @param isCompoundChild defines if rendered mf is a compound child or not\n */\n initWC(\n wc: HTMLElement | any, // eslint-disable-line @typescript-eslint/no-explicit-any\n wc_id: string,\n eventBusElement: ContainerElement,\n viewUrl: string,\n ctx: object,\n nodeId: string,\n isCompoundChild?: boolean\n ) {\n const clientAPI = this.createClientAPI(eventBusElement, nodeId, wc_id, wc, isCompoundChild);\n\n if (wc.__postProcess) {\n const url =\n new URL(document.baseURI).origin === new URL(viewUrl, document.baseURI).origin\n ? new URL('./', new URL(viewUrl, document.baseURI))\n : new URL('./', viewUrl);\n wc.__postProcess(ctx, clientAPI, url.origin + url.pathname);\n } else {\n wc.context = ctx;\n wc.LuigiClient = clientAPI;\n }\n }\n\n /**\n * Generates a unique web component id (tagname) based on the viewUrl\n * returns a string that can be used as part of a tagname, only alphanumeric\n * characters and no whitespaces.\n */\n generateWCId(viewUrl: string): string {\n let charRep = '';\n const normalizedViewUrl = new URL(viewUrl, encodeURI(location.href)).href;\n for (let i = 0; i < normalizedViewUrl.length; i++) {\n charRep += normalizedViewUrl.charCodeAt(i).toString(16);\n }\n return 'luigi-wc-' + charRep;\n }\n\n /**\n * Does a module import from viewUrl and defines a new web component\n * with the default export of the module or the first export extending HTMLElement if no default is\n * specified.\n * @param viewUrl url to render content from\n * @param wc_id a tagname that is used when creating the web component element\n * @returns a promise that gets resolved after successfull import\n */\n registerWCFromUrl(viewUrl: string, wc_id: string): Promise<unknown> {\n const i18nViewUrl = this.processViewUrl(viewUrl);\n return new Promise((resolve, reject) => {\n if (this.checkWCUrl(i18nViewUrl)) {\n this.dynamicImport(i18nViewUrl)\n .then((module) => {\n try {\n if (!window.customElements.get(wc_id)) {\n let cmpClazz = module.default;\n if (!HTMLElement.isPrototypeOf(cmpClazz)) {\n const props = Object.keys(module);\n for (let i = 0; i < props.length; i++) {\n cmpClazz = module[props[i]];\n if (HTMLElement.isPrototypeOf(cmpClazz)) {\n break;\n }\n }\n }\n window.customElements.define(wc_id, cmpClazz);\n }\n resolve(1);\n } catch (err) {\n reject(err);\n }\n })\n .catch((err) => {\n reject(err);\n });\n } else {\n const message = `Error: View URL '${i18nViewUrl}' not allowed to be included`;\n reject(message);\n }\n });\n }\n\n /**\n * Handles the import of self registered web component bundles, i.e. the web component\n * is added to the customElements registry by the bundle code rather than by luigi.\n *\n * @param {*} node - the corresponding navigation node\n * @param {*} viewUrl - the source of the wc bundle\n * @param {*} onload - callback function executed after script attached and loaded\n */\n includeSelfRegisteredWCFromUrl(node: WebComponentNode, viewUrl: string, onload: () => void) {\n if (this.checkWCUrl(viewUrl)) {\n /** Append reg function to luigi object if not present */\n if (!this.containerService.getContainerManager()._registerWebcomponent) {\n this.containerService.getContainerManager()._registerWebcomponent = (srcString, el) => {\n window.customElements.define(this.generateWCId(srcString), el);\n };\n }\n // @ts-ignore\n if (!window['Luigi']) {\n // @ts-ignore\n window.Luigi = {};\n // @ts-ignore\n if (!window['Luigi']['_registerWebcomponent']) {\n // @ts-ignore\n window.Luigi._registerWebcomponent = (src, element) => {\n this.containerService.getContainerManager()._registerWebcomponent(src, element);\n };\n }\n }\n const scriptTag = document.createElement('script');\n scriptTag.setAttribute('src', viewUrl);\n if (node.webcomponent.type === 'module') {\n scriptTag.setAttribute('type', 'module');\n }\n scriptTag.setAttribute('defer', 'true');\n scriptTag.addEventListener('load', () => {\n onload();\n });\n document.body.appendChild(scriptTag);\n } else {\n console.warn(`View URL '${viewUrl}' not allowed to be included`);\n }\n }\n\n /**\n * Checks if a url is allowed to be included, based on 'navigation.validWebcomponentUrls' in luigi config.\n * Returns true, if allowed.\n *\n * @param {*} url - the url string to check\n */\n checkWCUrl(url: string): boolean {\n // if (url.indexOf('://') > 0 || url.trim().indexOf('//') === 0) {\n // const ur = new URL(url);\n // if (ur.host === window.location.host) {\n // return true; // same host is okay\n // }\n\n // const valids = LuigiConfig.getConfigValue('navigation.validWebcomponentUrls');\n // if (valids && valids.length > 0) {\n // for (let el of valids) {\n // try {\n // if (new RegExp(el).test(url)) {\n // return true;\n // }\n // } catch (e) {\n // console.error(e);\n // }\n // }\n // }\n // return false;\n // }\n // relative URL is okay\n // if (url === 'test.js') {\n // return false;\n // }\n return true;\n }\n\n /**\n * Adds a web component defined by viewUrl to the wc_container and sets the node context.\n * If the web component is not defined yet, it gets imported.\n *\n * @param viewUrl url to render content from\n * @param wc_container web component container element\n * @param context luigi context\n * @param node node to operate on\n * @param nodeId id identifying the node\n * @param isCompoundChild defines if rendered mf is a compound child or not\n */\n renderWebComponent(\n viewUrl: string,\n wc_container: HTMLElement | any, // eslint-disable-line @typescript-eslint/no-explicit-any\n context: object,\n node: WebComponentNode,\n nodeId?: string,\n isCompoundChild?: boolean\n ) {\n const i18nViewUrl = this.processViewUrl(viewUrl, { context });\n const wc_id = node?.webcomponent?.tagName || this.generateWCId(i18nViewUrl);\n const wcItemPlaceholder = document.createElement('div');\n wc_container.appendChild(wcItemPlaceholder);\n wc_container._luigi_node = node;\n\n if (window.customElements.get(wc_id)) {\n this.attachWC(wc_id, wcItemPlaceholder, wc_container, context, i18nViewUrl, nodeId, isCompoundChild);\n } else {\n /** Custom import function, if defined */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if ((window as any).luigiWCFn) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (window as any).luigiWCFn(i18nViewUrl, wc_id, wcItemPlaceholder, () => {\n this.attachWC(wc_id, wcItemPlaceholder, wc_container, context, i18nViewUrl, nodeId, isCompoundChild);\n });\n } else if (node?.webcomponent?.selfRegistered) {\n this.includeSelfRegisteredWCFromUrl(node, i18nViewUrl, () => {\n this.attachWC(wc_id, wcItemPlaceholder, wc_container, context, i18nViewUrl, nodeId, isCompoundChild);\n });\n } else {\n this.registerWCFromUrl(i18nViewUrl, wc_id)\n .then(() => {\n this.attachWC(wc_id, wcItemPlaceholder, wc_container, context, i18nViewUrl, nodeId, isCompoundChild);\n })\n .catch((error) => {\n console.warn('ERROR =>', error);\n // dispatch an error event to be handled core side\n this.containerService.dispatch(Events.RUNTIME_ERROR_HANDLING_REQUEST, this.thisComponent, error);\n });\n }\n }\n }\n\n /**\n * Creates a compound container according to the given renderer.\n * Returns a promise that gets resolved with the created container DOM element.\n *\n * @param {DefaultCompoundRenderer} renderer\n */\n createCompoundContainerAsync(\n renderer: WebComponentRenderer,\n ctx: object,\n navNode: WebComponentNode\n ): Promise<HTMLElement> {\n return new Promise((resolve, reject) => {\n if (renderer.viewUrl) {\n try {\n const wc_id = navNode?.webcomponent?.tagName || this.generateWCId(renderer.viewUrl);\n if (navNode?.webcomponent?.selfRegistered) {\n this.includeSelfRegisteredWCFromUrl(navNode, renderer.viewUrl, () => {\n const wc = document.createElement(wc_id);\n wc.setAttribute('lui_web_component', 'true');\n this.initWC(wc, wc_id, wc, renderer.viewUrl, ctx, '_root');\n resolve(wc);\n });\n } else {\n this.registerWCFromUrl(renderer.viewUrl, wc_id)\n .then(() => {\n const wc = document.createElement(wc_id);\n wc.setAttribute('lui_web_component', 'true');\n this.initWC(wc, wc_id, wc, renderer.viewUrl, ctx, '_root');\n resolve(wc);\n })\n .catch((error) => {\n console.warn('Error: ', error);\n // dispatch an error event to be handled core side\n this.containerService.dispatch(Events.RUNTIME_ERROR_HANDLING_REQUEST, this.thisComponent, error);\n });\n }\n } catch (error) {\n reject(error);\n }\n } else {\n resolve(renderer.createCompoundContainer());\n }\n });\n }\n\n /**\n * Responsible for rendering web component compounds based on a renderer or a nesting\n * micro frontend.\n *\n * @param {*} navNode - the navigation node defining the compound\n * @param {ContainerElement} wc_container - the web component container dom element\n * @param {*} context - the luigi node context\n */\n renderWebComponentCompound(\n navNode: WebComponentNode,\n wc_container: ContainerElement,\n context: object\n ): Promise<ContainerElement> {\n let renderer;\n if (navNode.webcomponent && navNode.viewUrl) {\n renderer = new DefaultCompoundRenderer();\n renderer.viewUrl = this.processViewUrl(navNode.viewUrl, { context });\n renderer.createCompoundItemContainer = (layoutConfig: LayoutConfig) => {\n const cnt = document.createElement('div');\n if (layoutConfig?.slot) {\n cnt.setAttribute('slot', layoutConfig.slot);\n }\n return cnt;\n };\n } else if (navNode.compound?.renderer) {\n renderer = resolveRenderer(navNode.compound.renderer);\n }\n\n renderer = renderer || new DefaultCompoundRenderer();\n return new Promise((resolve) => {\n this.createCompoundContainerAsync(renderer, context, navNode)\n .then((compoundCnt: ContainerElement) => {\n wc_container._luigi_mfe_webcomponent = compoundCnt;\n wc_container._luigi_node = navNode;\n const ebListeners = {};\n compoundCnt.eventBus = {\n listeners: ebListeners,\n onPublishEvent: (event, srcNodeId, wcId) => {\n const listeners = ebListeners[srcNodeId + '.' + event.type] || [];\n listeners.push(...(ebListeners['*.' + event.type] || []));\n\n listeners.forEach((listenerInfo) => {\n const target =\n listenerInfo.wcElement || compoundCnt.querySelector('[nodeId=' + listenerInfo.wcElementId + ']');\n if (target) {\n target.dispatchEvent(\n new CustomEvent(listenerInfo.action, {\n detail: listenerInfo.converter ? listenerInfo.converter(event.detail) : event.detail\n })\n );\n } else {\n console.debug('Could not find event target', listenerInfo);\n }\n });\n }\n };\n navNode.compound?.children?.forEach((wc, index) => {\n const ctx = { ...context, ...wc.context };\n const compoundItemCnt = renderer.createCompoundItemContainer(wc.layoutConfig);\n\n compoundItemCnt.eventBus = compoundCnt.eventBus;\n renderer.attachCompoundItem(compoundCnt, compoundItemCnt);\n\n const nodeId = wc.id || 'gen_' + index;\n this.renderWebComponent(wc.viewUrl, compoundItemCnt, ctx, wc, nodeId, true);\n registerEventListeners(ebListeners, wc, nodeId);\n });\n wc_container.appendChild(compoundCnt);\n // listener for nesting wc\n registerEventListeners(ebListeners, navNode.compound, '_root', compoundCnt);\n resolve(compoundCnt);\n })\n .catch((error) => {\n // dispatch an error event to be handled core sid\n console.warn('Error: ', error);\n this.containerService.dispatch(Events.RUNTIME_ERROR_HANDLING_REQUEST, this.thisComponent, error);\n });\n });\n }\n\n /**\n * Resolves an alert by invoking the corresponding resolver function for the given alert ID.\n * This method attempts to resolve an alert associated with the specified `id` by calling its resolver function,\n * if one exists in the `alertResolvers` object. If the resolver exists, it is invoked with `dismissKey` as its argument,\n * and then the resolver is removed from the `alertResolvers` object to avoid future invocations. If no resolver is found\n * for the provided `id`, a message is logged to the console indicating that no matching promise is in the list.\n * @param {string} id - the unique identifier for the alert to resolve\n * @param {boolean|string} dismissKey - an optional key or value passed to the resolver; defaults to `true` if not provided\n *\n * @returns {void}\n *\n */\n resolveAlert(id: string, dismissKey?: boolean | string) {\n if (this.alertResolvers[id]) {\n this.alertResolvers[id](dismissKey === undefined ? true : dismissKey);\n this.alertResolvers[id] = undefined;\n } else {\n console.log('Promise is not in the list.');\n }\n }\n\n /**\n * Resolves a confirmation modal by invoking the corresponding resolver function.\n *\n * @param {boolean} confirmed - the result of the modal being closed\n *\n */\n notifyConfirmationModalClosed(confirmed: boolean) {\n if (this.modalResolver) {\n if (confirmed) {\n this.modalResolver.resolve();\n } else {\n this.modalResolver.reject();\n }\n this.modalResolver = undefined;\n } else {\n console.log('Modal promise is not listed.');\n }\n }\n}\n","export class GenericHelpersClass {\n /**\n * DUPLICATE: Duplicate of 'core/src/utilities/helpers/generic-helpers.js > isFunction'\n * Keep one in the end\n *\n * Checks if input is a function.\n * @param {Function} functionToCheck - function to be checked\n * @returns {boolean}\n */\n isFunction(functionToCheck: (arg) => void): boolean {\n return functionToCheck && {}.toString.call(functionToCheck) === '[object Function]';\n }\n\n /**\n * Checks if input is an object.\n * @param {Object} objectToCheck - mixed\n * @returns {boolean}\n */\n isObject(objectToCheck: object): boolean {\n return !!(objectToCheck && typeof objectToCheck === 'object' && !Array.isArray(objectToCheck));\n }\n\n /**\n * Checks whether web component is an attribute or property. In case of attribute, it returns the parsed value.\n * @param {Object | boolean | string} webcomponent - value can either be an object, boolean or a stringified object, e.g webcomponent='{\"selfregistered\":\"true\"}'\n * @returns {Object | boolean} webcomponent returns the parsed webcomponent value\n */\n checkWebcomponentValue(webcomponent: object | boolean | string): object | boolean {\n if (typeof webcomponent === 'string') {\n return JSON.parse(webcomponent);\n } else if (typeof webcomponent === 'boolean' || typeof webcomponent === 'object') {\n return webcomponent;\n } else {\n console.warn('Webcomponent value has a wrong type.');\n }\n }\n\n /**\n * Resolves the context to an object. If the context is a string, it attempts to parse\n * it as JSON. If parsing fails JSON parse error will be thrown.\n * @param {Object | string} context - he context to be resolved\n * @returns {Object} the resolved context as an object\n */\n resolveContext(context: object | string): object {\n return context ? (typeof context === 'string' ? JSON.parse(context) : context) : {};\n }\n}\n\nexport const GenericHelperFunctions = new GenericHelpersClass();\n","<svelte:options\n customElement={{\n tag: null,\n shadow: 'none',\n props: {\n activeFeatureToggleList: { type: 'Array', reflect: false, attribute: 'active-feature-toggle-list' },\n allowRules: { type: 'Array', reflect: false, attribute: 'allow-rules' },\n anchor: { type: 'String', reflect: false, attribute: 'anchor' },\n authData: { type: 'Object', reflect: false, attribute: 'auth-data' },\n clientPermissions: { type: 'Object', reflect: false, attribute: 'client-permissions' },\n context: { type: 'String', reflect: false, attribute: 'context' },\n deferInit: { type: 'Boolean', attribute: 'defer-init' },\n dirtyStatus: { type: 'Boolean', reflect: false, attribute: 'dirty-status' },\n documentTitle: { type: 'String', reflect: false, attribute: 'document-title' },\n hasBack: { type: 'Boolean', reflect: false, attribute: 'has-back' },\n label: { type: 'String', reflect: false, attribute: 'label' },\n locale: { type: 'String', reflect: false, attribute: 'locale' },\n noShadow: { type: 'Boolean', attribute: 'no-shadow' },\n nodeParams: { type: 'Object', reflect: false, attribute: 'node-params' },\n pathParams: { type: 'Object', reflect: false, attribute: 'path-params' },\n sandboxRules: { type: 'Array', reflect: false, attribute: 'sandbox-rules' },\n searchParams: { type: 'Object', reflect: false, attribute: 'search-params' },\n skipCookieCheck: { type: 'String', reflect: false, attribute: 'skip-cookie-check' },\n skipInitCheck: { type: 'Boolean', reflect: false, attribute: 'skip-init-check' },\n theme: { type: 'String', reflect: false, attribute: 'theme' },\n userSettings: { type: 'Object', reflect: false, attribute: 'user-settings' },\n viewurl: { type: 'String', reflect: false, attribute: 'viewurl' },\n webcomponent: { type: 'String', reflect: false, attribute: 'webcomponent' }\n },\n extend: (customElementConstructor) => {\n let notInitFn = (name) => {\n return () =>\n console.warn(name + \" can't be called on luigi-container before its micro frontend is attached to the DOM.\");\n };\n\n return class extends customElementConstructor {\n sendCustomMessage = notInitFn('sendCustomMessage');\n updateContext = notInitFn('updateContext');\n updateViewUrl = notInitFn('updateViewUrl');\n closeAlert = notInitFn('closeAlert');\n notifyAlertClosed = notInitFn('notifyAlertClosed');\n notifyConfirmationModalClosed = notInitFn('notifyConfirmationModalClosed');\n attributeChangedCallback(name, oldValue, newValue) {\n try {\n super.attributeChangedCallback(name, oldValue, newValue);\n } catch (e) {\n console.error('Error in super.attributeChangedCallback', e);\n }\n if (this.containerInitialized) {\n if (name === 'context') {\n this.updateContext(JSON.parse(newValue));\n }\n if (name === 'auth-data') {\n ContainerAPI.updateAuthData(this.iframeHandle, JSON.parse(newValue));\n }\n }\n }\n\n getNoShadow() {\n return this.hasAttribute('no-shadow') || this.noShadow;\n }\n };\n }\n }}\n/>\n\n<script lang=\"ts\">\n import { onMount, onDestroy } from 'svelte';\n import { ContainerAPI } from './api/container-api';\n import { Events } from './constants/communication';\n import type { IframeHandle, ContainerElement } from './constants/container.model';\n import { containerService } from './services/container.service';\n import { getAllowRules } from './services/iframe-helpers';\n import { WebComponentService } from './services/webcomponents.service';\n import { GenericHelperFunctions } from './utilities/helpers';\n\n /* eslint-disable */\n export let activeFeatureToggleList: string[];\n export let allowRules: string[];\n export let anchor: string;\n export let authData: any;\n export let clientPermissions: any;\n export let context: string;\n export let deferInit: boolean;\n export let dirtyStatus: boolean;\n export let documentTitle: string;\n export let hasBack: boolean;\n export let label: string;\n export let locale: string;\n export let noShadow: boolean;\n export let nodeParams: any;\n export let pathParams: any;\n export let sandboxRules: string[];\n export let searchParams: any;\n export let skipCookieCheck: 'false' | 'true';\n export let skipInitCheck: boolean;\n export let theme: string;\n export let userSettings: any;\n export let viewurl: string;\n export let webcomponent: any;\n /* eslint-enable */\n\n const iframeHandle: IframeHandle = {};\n let mainComponent: ContainerElement;\n let containerInitialized = false;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let thisComponent: any;\n\n const webcomponentService = new WebComponentService();\n\n // Only needed for get rid of \"unused export property\" svelte compiler warnings\n export const unwarn = () => {\n return (\n activeFeatureToggleList &&\n allowRules &&\n anchor &&\n authData &&\n clientPermissions &&\n dirtyStatus &&\n documentTitle &&\n hasBack &&\n locale &&\n noShadow &&\n nodeParams &&\n pathParams &&\n sandboxRules &&\n searchParams &&\n skipCookieCheck &&\n skipInitCheck &&\n theme &&\n userSettings\n );\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const initialize = (thisComponent: any) => {\n if (!containerInitialized) {\n thisComponent.sendCustomMessage = (id: string, data?: object) => {\n ContainerAPI.sendCustomMessage(\n id,\n thisComponent.getNoShadow() ? thisComponent : mainComponent,\n !!webcomponent,\n iframeHandle,\n data\n );\n };\n\n thisComponent.updateContext = (contextObj: object, internal?: object) => {\n context = contextObj;\n if (webcomponent) {\n (thisComponent.getNoShadow() ? thisComponent : mainComponent)._luigi_mfe_webcomponent.context = contextObj;\n } else {\n const internalObj = {\n ...internal || {}, ...{\n activeFeatureToggleList: thisComponent.activeFeatureToggleList || [],\n currentLocale: thisComponent.locale,\n currentTheme: thisComponent.theme,\n userSettings: thisComponent.userSettings || null,\n cssVariables: thisComponent.cssVariables || {},\n anchor: thisComponent.anchor || \"\",\n drawer: thisComponent.drawer || false,\n modal: thisComponent.modal || false,\n viewStackSize: thisComponent.viewStackSize || 0,\n isNavigateBack: thisComponent.isNavigateBack || false\n }\n };\n ContainerAPI.updateContext(contextObj, internalObj, iframeHandle, nodeParams, pathParams, searchParams);\n }\n };\n\n thisComponent.closeAlert = (id: string, dismissKey?: string) => {\n thisComponent.notifyAlertClosed(id, dismissKey);\n };\n\n thisComponent.notifyAlertClosed = (id: string, dismissKey?: string) => {\n // check if thisComponent is in dom\n if (thisComponent.isConnected) {\n if (webcomponent) {\n webcomponentService.resolveAlert(id, dismissKey);\n } else {\n ContainerAPI.notifyAlertClosed(id, dismissKey, iframeHandle);\n }\n }\n }\n\n thisComponent.notifyConfirmationModalClosed = (result) => {\n // check if thisComponent is in dom\n if (thisComponent.isConnected) {\n if (webcomponent) {\n webcomponentService.notifyConfirmationModalClosed(!!result);\n } else {\n ContainerAPI.notifyConfirmationModalClosed(!!result, iframeHandle);\n }\n }\n }\n\n containerService.registerContainer(thisComponent);\n webcomponentService.thisComponent = thisComponent;\n\n const ctx = GenericHelperFunctions.resolveContext(context);\n\n thisComponent.updateViewUrl = (viewUrl: string, internal?: object) => {\n if (viewUrl?.length) {\n ContainerAPI.updateViewUrl(viewUrl, GenericHelperFunctions.resolveContext(context), internal, iframeHandle);\n }\n };\n\n if (webcomponent && webcomponent != 'false') {\n if (!thisComponent.getNoShadow()) {\n mainComponent.innerHTML = '';\n const shadow = thisComponent.attachShadow({ mode: 'open' });\n shadow.append(mainComponent);\n } else {\n // removing mainComponent\n thisComponent.innerHTML = '';\n }\n const webComponentValue = GenericHelperFunctions.checkWebcomponentValue(webcomponent);\n webcomponentService.renderWebComponent(\n viewurl,\n thisComponent.getNoShadow() ? thisComponent : mainComponent,\n ctx,\n typeof webComponentValue === 'object' ? { webcomponent: webComponentValue } : {}\n );\n } else {\n if (!thisComponent.getNoShadow()) {\n // removeing mainComponent\n thisComponent.innerHTML = '';\n const shadow = thisComponent.attachShadow({ mode: 'open' });\n shadow.append(mainComponent);\n }\n }\n if (skipInitCheck) {\n thisComponent.initialized = true;\n setTimeout(() => {\n webcomponentService.dispatchLuigiEvent(Events.INITIALIZED, {});\n });\n } else if (webcomponent) {\n (thisComponent.getNoShadow() ? thisComponent : mainComponent).addEventListener('wc_ready', () => {\n if (\n !(thisComponent.getNoShadow() ? thisComponent : mainComponent)._luigi_mfe_webcomponent?.deferLuigiClientWCInit\n ) {\n thisComponent.initialized = true;\n webcomponentService.dispatchLuigiEvent(Events.INITIALIZED, {});\n }\n });\n }\n containerInitialized = true;\n thisComponent.containerInitialized = true;\n }\n };\n\n onMount(async () => {\n thisComponent = mainComponent.parentNode;\n thisComponent.iframeHandle = iframeHandle;\n thisComponent.init = () => {\n initialize(thisComponent);\n };\n if (!deferInit && viewurl) {\n initialize(thisComponent);\n }\n });\n\n $: {\n if (!containerInitialized && viewurl && !deferInit && thisComponent) {\n initialize(thisComponent);\n }\n }\n onDestroy(async () => {});\n</script>\n\n<main bind:this={mainComponent} class={webcomponent ? undefined : 'lui-isolated'}>\n {#if containerInitialized}\n {#if !webcomponent || webcomponent === 'false'}\n <style>\n main.lui-isolated,\n .lui-isolated iframe {\n width: 100%;\n height: 100%;\n border: none;\n }\n\n main.lui-isolated {\n line-height: 0;\n }\n </style>\n <iframe\n bind:this={iframeHandle.iframe}\n src={viewurl}\n title={label}\n allow={getAllowRules(allowRules)}\n sandbox={sandboxRules ? sandboxRules.join(' ') : undefined}\n />\n {/if}\n {/if}\n</main>\n","<svelte:options\n customElement={{\n tag: null,\n shadow: 'none',\n props: {\n activeFeatureToggleList: { type: 'Array', reflect: false, attribute: 'active-feature-toggle-list' },\n anchor: { type: 'String', reflect: false, attribute: 'anchor' },\n clientPermissions: {\n type: 'Object',\n reflect: false,\n attribute: 'client-permissions'\n },\n compoundConfig: {\n type: 'Object',\n reflect: false,\n attribute: 'compound-config'\n },\n context: { type: 'String', reflect: false, attribute: 'context' },\n deferInit: { type: 'Boolean', attribute: 'defer-init' },\n dirtyStatus: { type: 'Boolean', reflect: false, attribute: 'dirty-status' },\n documentTitle: { type: 'String', reflect: false, attribute: 'document-title' },\n hasBack: { type: 'Boolean', reflect: false, attribute: 'has-back' },\n locale: { type: 'String', reflect: false, attribute: 'locale' },\n noShadow: { type: 'Boolean', attribute: 'no-shadow', reflect: false },\n nodeParams: { type: 'Object', reflect: false, attribute: 'node-params' },\n pathParams: { type: 'Object', reflect: false, attribute: 'path-params' },\n searchParams: {\n type: 'Object',\n reflect: false,\n attribute: 'search-params'\n },\n skipInitCheck: { type: 'Boolean', reflect: false, attribute: 'skip-init-check' },\n theme: { type: 'String', reflect: false, attribute: 'theme' },\n userSettings: {\n type: 'Object',\n reflect: false,\n attribute: 'user-settings'\n },\n viewurl: { type: 'String', reflect: false, attribute: 'viewurl' },\n webcomponent: { type: 'String', reflect: false, attribute: 'webcomponent' }\n },\n extend: (customElementConstructor) => {\n let notInitFn = (name) => {\n return () =>\n console.warn(name + \" can't be called on luigi-container before its micro frontend is attached to the DOM.\");\n };\n return class extends customElementConstructor {\n updateContext = notInitFn('updateContext');\n notifyAlertClosed = notInitFn('notifyAlertClosed');\n notifyConfirmationModalClosed = notInitFn('notifyConfirmationModalClosed');\n attributeChangedCallback(name, oldValue, newValue) {\n try {\n super.attributeChangedCallback(name, oldValue, newValue);\n } catch (e) {\n console.warn('Error in attributeChangedCallback', e);\n }\n if (this.containerInitialized && name === 'context') {\n this.updateContext(JSON.parse(newValue));\n }\n }\n\n getNoShadow() {\n return this.hasAttribute('no-shadow') || this.noShadow;\n }\n };\n }\n }}\n/>\n\n<script lang=\"ts\">\n import { onMount } from 'svelte';\n import { Events } from './constants/communication';\n import type { ContainerElement } from './constants/container.model';\n import { ContainerService } from './services/container.service';\n import { WebComponentService } from './services/webcomponents.service';\n import { GenericHelperFunctions } from './utilities/helpers';\n\n /* eslint-disable */\n export let activeFeatureToggleList: string[];\n export let anchor: string;\n export let clientPermissions: any;\n export let compoundConfig: any;\n export let context: string;\n export let deferInit: boolean;\n export let dirtyStatus: boolean;\n export let documentTitle: string;\n export let hasBack: boolean;\n export let locale: string;\n export let noShadow: boolean;\n export let nodeParams: any;\n export let pathParams: any;\n export let searchParams: any;\n export let skipInitCheck: boolean;\n export let theme: string;\n export let userSettings: any;\n export let viewurl: string;\n export let webcomponent: any;\n /* eslint-enable */\n\n let containerInitialized = false;\n let mainComponent: ContainerElement;\n let eventBusElement: ContainerElement;\n\n const containerService = new ContainerService();\n const webcomponentService = new WebComponentService();\n\n // Only needed for get rid of \"unused export property\" svelte compiler warnings\n export const unwarn = () => {\n return (\n activeFeatureToggleList &&\n anchor &&\n clientPermissions &&\n dirtyStatus &&\n documentTitle &&\n hasBack &&\n locale &&\n noShadow &&\n nodeParams &&\n pathParams &&\n searchParams &&\n skipInitCheck &&\n theme &&\n userSettings\n );\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const initialize = (thisComponent: any) => {\n if (!compoundConfig || containerInitialized) {\n return;\n }\n thisComponent.updateContext = (contextObj: object, internal?: object) => {\n const rootElement = thisComponent.getNoShadow() ? thisComponent : mainComponent;\n rootElement._luigi_mfe_webcomponent.context = contextObj;\n context = contextObj;\n\n const compoundChildrenQueryElement = rootElement._luigi_mfe_webcomponent;\n if (compoundChildrenQueryElement) {\n const compoundChildren = compoundChildrenQueryElement.querySelectorAll('[lui_web_component]');\n compoundChildren?.forEach((item) => {\n const ctx = item.context || {};\n item.context = Object.assign(ctx, contextObj);\n });\n }\n };\n const ctx = GenericHelperFunctions.resolveContext(context);\n deferInit = false;\n\n thisComponent.notifyAlertClosed = (id: string, dismissKey?: string) => {\n // check if thisComponent is in dom\n if (thisComponent.isConnected) {\n webcomponentService.resolveAlert(id, dismissKey);\n }\n }\n\n thisComponent.notifyConfirmationModalClosed = (result) => {\n // check if thisComponent is in dom\n if (thisComponent.isConnected) {\n webcomponentService.notifyConfirmationModalClosed(!!result);\n }\n }\n\n const node = {\n compound: compoundConfig,\n viewUrl: viewurl,\n webcomponent: GenericHelperFunctions.checkWebcomponentValue(webcomponent) || true\n };\n if (!thisComponent.getNoShadow()) {\n mainComponent.innerHTML = '';\n const shadow = thisComponent.attachShadow({ mode: 'open' });\n shadow.append(mainComponent);\n } else {\n // removing mainComponent\n thisComponent.innerHTML = '';\n }\n webcomponentService\n .renderWebComponentCompound(node, thisComponent.getNoShadow() ? thisComponent : mainComponent, ctx)\n .then((compCnt: ContainerElement) => {\n eventBusElement = compCnt;\n if (skipInitCheck || !node.viewUrl) {\n thisComponent.initialized = true;\n setTimeout(() => {\n webcomponentService.dispatchLuigiEvent(Events.INITIALIZED, {});\n });\n } else if (eventBusElement.LuigiClient && !eventBusElement.deferLuigiClientWCInit) {\n thisComponent.initialized = true;\n webcomponentService.dispatchLuigiEvent(Events.INITIALIZED, {});\n }\n });\n containerInitialized = true;\n thisComponent.containerInitialized = true;\n };\n\n onMount(async () => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const thisComponent: any =\n mainComponent.getRootNode() === document\n ? mainComponent.parentNode\n : (mainComponent.getRootNode() as ShadowRoot).host;\n\n thisComponent.init = () => {\n initialize(thisComponent);\n };\n if (!deferInit) {\n initialize(thisComponent);\n }\n\n containerService.registerContainer(thisComponent);\n webcomponentService.thisComponent = thisComponent;\n });\n</script>\n\n<main bind:this={mainComponent} />\n\n<style>\n main {\n width: 100%;\n height: 100%;\n border: none;\n }\n</style>\n","import type { ComponentType } from 'svelte';\nimport LuigiContainer from './LuigiContainer.svelte';\nimport LuigiCompoundContainer from './LuigiCompoundContainer.svelte';\nimport { Events } from './constants/communication';\nexport { default as LuigiContainer } from './LuigiContainer.svelte';\nexport { default as LuigiCompoundContainer } from './LuigiCompoundContainer.svelte';\nexport type { PathExistsEvent } from './constants/event-type';\nexport { Events as LuigiEvents } from './constants/communication';\nexport default Events;\n\nif (!customElements.get('luigi-container')) {\n customElements.define('luigi-container', (LuigiContainer as unknown as ComponentType).element);\n}\n\nif (!customElements.get('luigi-compound-container')) {\n customElements.define('luigi-compound-container', (LuigiCompoundContainer as unknown as ComponentType).element);\n}\n"],"names":["noop","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","src_url_equal_anchor","current_component","src_url_equal","element_src","url","document","createElement","href","append_styles","target","style_sheet_id","styles","append_styles_to","node","root","getRootNode","ownerDocument","host","get_root_for_style","getElementById","style","element","id","textContent","appendChild","append","head","sheet","append_stylesheet","insert","anchor","insertBefore","detach","parentNode","removeChild","name","text","data","createTextNode","attr","attribute","value","removeAttribute","getAttribute","setAttribute","set_current_component","component","get_current_component","Error","onMount","$$","on_mount","push","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","seen_callbacks","Set","flushidx","flush","saved_component","length","update","e","pop","i","callback","has","add","clear","fragment","before_update","dirty","p","ctx","after_update","outroing","destroy_component","detaching","filtered","targets","c","indexOf","flush_render_callbacks","on_destroy","d","make_dirty","then","fill","init","options","instance","create_fragment","not_equal","props","parent_component","bound","on_disconnect","context","Map","callbacks","skip_bound","ready","ret","rest","hydrate","nodes","Array","from","childNodes","children","l","intro","block","delete","local","m","new_on_destroy","map","filter","mount_component","SvelteElement","get_custom_element_value","prop","props_definition","transform","type","JSON","stringify","parse","create_custom_element","Component","slots","accessors","use_shadow_dom","extend","Class","constructor","super","this","$$p_d","observedAttributes","keys","key","toLowerCase","defineProperty","prototype","get","$$c","$$d","set","$set","accessor","HTMLElement","$$ctor","$$s","$$cn","$$r","$$l","$$l_u","$$componentCtor","$$slots","attachShadow","mode","addEventListener","listener","unsub","$on","removeEventListener","connectedCallback","create_slot","existing_slots","result","slot","get_custom_elements_slots","attributes","$$g_p","undefined","shadowRoot","$$scope","reflect_attributes","reflect","attribute_value","attributeChangedCallback","_oldValue","newValue","disconnectedCallback","$destroy","attribute_name","find","SvelteComponent","$$set","index","splice","obj","LuigiInternalMessageID","window","__svelte","v","CUSTOM_MESSAGE","GET_CONTEXT","SEND_CONTEXT_HANDSHAKE","CONTEXT_RECEIVED","NAVIGATION_REQUEST","ALERT_REQUEST","ALERT_CLOSED","INITIALIZED","ADD_SEARCH_PARAMS_REQUEST","ADD_NODE_PARAMS_REQUEST","SHOW_CONFIRMATION_MODAL_REQUEST","CONFIRMATION_MODAL_CLOSED","SHOW_LOADING_INDICATOR_REQUEST","HIDE_LOADING_INDICATOR_REQUEST","SET_CURRENT_LOCALE_REQUEST","LOCAL_STORAGE_SET_REQUEST","RUNTIME_ERROR_HANDLING_REQUEST","SET_ANCHOR_LINK_REQUEST","SET_THIRD_PARTY_COOKIES_REQUEST","BACK_NAVIGATION_REQUEST","GET_CURRENT_ROUTE_REQUEST","SEND_CURRENT_ROUTE_ANSWER","SEND_CONTEXT_OBJECT","NAVIGATION_COMPLETED_REPORT","CLOSE_MODAL_ANSWER","UPDATE_MODAL_PATH_DATA_REQUEST","UPDATE_MODAL_SETTINGS","CHECK_PATH_EXISTS_REQUEST","SEND_PATH_EXISTS_ANSWER","SET_DIRTY_STATUS_REQUEST","AUTH_SET_TOKEN","ADD_BACKDROP_REQUEST","REMOVE_BACKDROP_REQUEST","SET_VIEW_GROUP_DATA_REQUEST","CLOSE_CURRENT_MODAL_REQUEST","LuigiEvent","Event","payload","detail","callbackFn","Events","CLOSE_USER_SETTINGS_REQUEST","COLLAPSE_LEFT_NAV_REQUEST","GET_CONTEXT_REQUEST","GO_BACK_REQUEST","HAS_BACK_REQUEST","OPEN_USER_SETTINGS_REQUEST","PATH_EXISTS_REQUEST","SET_DOCUMENT_TITLE_REQUEST","UPDATE_MODAL_SETTINGS_REQUEST","UPDATE_TOP_NAVIGATION_REQUEST","ContainerService","isVisible","offsetWidth","offsetHeight","getClientRects","sendCustomMessageToIframe","iframeHandle","msg","msgName","messageName","iframe","contentWindow","iframeUrl","URL","src","postMessage","origin","console","error","dispatchWithPayload","targetCnt","dispatch","customEvent","dispatchEvent","getTargetContainer","event","cnt","globalThis","__luigi_container_manager","container","source","getContainerManager","messageListener","evData","_metaData","internal","thirdPartyCookieCheck","disabled","skipCookieCheck","currentTheme","theme","currentLocale","locale","activeFeatureToggleList","cssVariables","userSettings","drawer","modal","viewStackSize","isNavigateBack","authData","nodeParams","searchParams","pathParams","params","val","settings","dismissKey","notifyAlertClosed","keepBrowserHistory","modalResult","notifyConfirmationModalClosed","gbctx","goBackContext","warn","route","correlationId","addHistoryEntry","updatedModalSettings","pathExists","registerContainer","thisComponent","containerService","ContainerAPI","updateContext","contextObj","internalParameter","withoutSync","updateViewUrl","viewUrl","updateAuthData","sendCustomMessage","mainComponent","isWebcomponent","_luigi_mfe_webcomponent","message","confirmed","getAllowRules","allowRules","rules","rule","replaceAll","join","DefaultCompoundRenderer","rendererObj","rendererObject","config","createCompoundContainer","createCompoundItemContainer","layoutConfig","attachCompoundItem","compoundCnt","compoundItemCnt","CustomCompoundRenderer","use","extends","superRenderer","resolveRenderer","GridCompoundRenderer","containerClass","Date","getTime","classList","mediaQueries","layouts","el","minWidth","maxWidth","mq","columns","rows","gap","innerHTML","minHeight","row","column","rendererConfig","rendererDef","registerEventListeners","eventbusListeners","navNode","nodeId","wcElement","eventListeners","evID","listenerList","listenerInfo","wcElementId","action","converter","dataConverter","deSanitizeParam","String","WebComponentService","alertResolvers","alertIndex","dynamicImport","freeze","import","processViewUrl","attachWC","wc_id","wcItemPlaceholder","wc_container","isCompoundChild","contains","wc","initWC","replaceChild","_luigi_node","dispatchLuigiEvent","createClientAPI","eventBusElement","linkManager","fromContext","fromClosestContext","fromVirtualTreeRoot","fromParent","linkManagerInstance","navigate","link","navigateToIntent","semanticSlug","newPath","paramList","entries","slice","navigationContext","getCurrentRoute","reject","withParams","updateModalPathInternalNavigation","path","modalSettings","assign","history","updateTopNavigation","exists","openAsDrawer","drawerSettings","openAsModal","openAsSplitView","splitViewSettings","splitView","goBack","hasBack","updateModalSettings","uxManager","showAlert","alertSettings","resolveAlert","showConfirmationModal","modalResolver","getCurrentTheme","closeUserSettings","openUserSettings","collapseLeftSideNav","getDirtyStatus","dirtyStatus","getDocumentTitle","documentTitle","setDocumentTitle","title","setDirtyStatus","isDirty","setCurrentLocale","removeBackdrop","addBackdrop","showLoadingIndicator","hideLoadingIndicator","hideAppLoadingIndicator","closeCurrentModal","getCurrentLocale","getActiveFeatureToggles","publishEvent","ev","eventBus","onPublishEvent","luigiClientInit","addNodeParams","getNodeParams","shouldDesanitise","paramsMap","reduce","sanitizedMap","paramPair","setAnchor","getAnchor","getCoreSearchParams","getPathParams","getClientPermissions","clientPermissions","addCoreSearchParams","getUserSettings","setViewGroupData","clientAPI","__postProcess","baseURI","pathname","LuigiClient","generateWCId","charRep","normalizedViewUrl","encodeURI","location","charCodeAt","toString","registerWCFromUrl","i18nViewUrl","checkWCUrl","module","customElements","cmpClazz","default","isPrototypeOf","define","err","catch","includeSelfRegisteredWCFromUrl","onload","_registerWebcomponent","srcString","Luigi","scriptTag","webcomponent","body","renderWebComponent","tagName","luigiWCFn","selfRegistered","createCompoundContainerAsync","renderer","renderWebComponentCompound","compound","ebListeners","listeners","srcNodeId","wcId","querySelector","CustomEvent","debug","log","GenericHelperFunctions","isFunction","functionToCheck","call","isObject","objectToCheck","isArray","checkWebcomponentValue","resolveContext","create_if_block_1","iframe_src_value","iframe_allow_value","create_if_block","main","$$props","deferInit","label","noShadow","sandboxRules","skipInitCheck","viewurl","containerInitialized","webcomponentService","initialize","getNoShadow","$$invalidate","internalObj","closeAlert","isConnected","webComponentValue","initialized","setTimeout","deferLuigiClientWCInit","async","$$value","compoundConfig","rootElement","compoundChildrenQueryElement","compoundChildren","querySelectorAll","item","compCnt","customElementConstructor","notInitFn","oldValue","hasAttribute","LuigiContainer","LuigiCompoundContainer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