@luigi-project/container 1.0.0-rc4 → 1.0.0-rc6
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/LuigiCompoundContainer.svelte.d.ts +5 -0
- package/LuigiContainer.svelte.d.ts +58 -1
- package/bundle.js +1 -1
- package/bundle.js.map +1 -1
- package/constants/events.d.ts +97 -0
- package/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,6 +1,63 @@
|
|
|
1
|
+
export declare interface NodeParams {
|
|
2
|
+
[key: string]: string;
|
|
3
|
+
}
|
|
1
4
|
export default class LuigiContainer extends HTMLElement {
|
|
5
|
+
/**
|
|
6
|
+
* The URL of the microfrontend to be rendered
|
|
7
|
+
*/
|
|
2
8
|
viewurl: string;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The context to be passed to the microfrontend
|
|
12
|
+
*/
|
|
3
13
|
context: any;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Label information for the microfrontend
|
|
17
|
+
*/
|
|
4
18
|
label: string;
|
|
5
|
-
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Predicate that sets whether the microfrontend is to be rendered in a web component or not
|
|
22
|
+
*/
|
|
23
|
+
webcomponent: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The locale to be passed to the web-component-based micro frontend
|
|
27
|
+
*/
|
|
28
|
+
locale: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The theme to be passed to the web-component-based micro frontend
|
|
32
|
+
*/
|
|
33
|
+
theme: string;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The list of active feature toggles to be passed to the web-component-based micro frontend
|
|
37
|
+
*/
|
|
38
|
+
activeFeatureToggleList: string[];
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The parameters to be passed to the web-component-based micro frontend. Will not be passed to the compound children.
|
|
42
|
+
*/
|
|
43
|
+
nodeParams: NodeParams;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Updates the context of the microfrontend
|
|
47
|
+
* @param contextObj The context object to be updated
|
|
48
|
+
* @param internal internal microfrotend data
|
|
49
|
+
*/
|
|
50
|
+
updateContext(contextObj: any, internal?: any): Function;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Notifies the microfrontend that the opened alert has been closed
|
|
54
|
+
* @param id the id of the opened alert
|
|
55
|
+
* @param dismissKey the key specifying which dismiss link was clicked on the alert message
|
|
56
|
+
*/
|
|
57
|
+
closeAlert(id: any, dismissKey: any): Function;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Manually triggers the micro frontend rendering process when using defer-init attribute
|
|
61
|
+
*/
|
|
62
|
+
init(): Function;
|
|
6
63
|
}
|
package/bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function e(){}function t(e){return e()}function n(){return Object.create(null)}function o(e){e.forEach(t)}function i(e){return"function"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}let s,a;function c(e,t){return s||(s=document.createElement("a")),s.href=t,e===s.href}function u(e,t,n){e.insertBefore(t,n||null)}function d(e){e.parentNode&&e.parentNode.removeChild(e)}function l(e){return document.createElement(e)}function E(){return e="",document.createTextNode(e);var e}function _(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function h(e){const t={};for(const n of e)t[n.name]=n.value;return t}function m(e){a=e}function T(){if(!a)throw new Error("Function called outside component initialization");return a}function p(e){T().$$.on_mount.push(e)}const g=[],R=[],C=[],f=[],A=Promise.resolve();let S=!1;function I(e){C.push(e)}const w=new Set;let O=0;function U(){const e=a;do{for(;O<g.length;){const e=g[O];O++,m(e),b(e.$$)}for(m(null),g.length=0,O=0;R.length;)R.pop()();for(let e=0;e<C.length;e+=1){const t=C[e];w.has(t)||(w.add(t),t())}C.length=0}while(g.length);for(;f.length;)f.pop()();S=!1,w.clear(),m(e)}function b(e){if(null!==e.fragment){e.update(),o(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(I)}}const N=new Set;function $(e,t){-1===e.$$.dirty[0]&&(g.push(e),S||(S=!0,A.then(U)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function v(r,s,c,u,l,E,_,h=[-1]){const T=a;m(r);const p=r.$$={fragment:null,ctx:[],props:E,update:e,not_equal:l,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(T?T.$$.context:[])),callbacks:n(),dirty:h,skip_bound:!1,root:s.target||T.$$.root};_&&_(p.root);let g=!1;if(p.ctx=c?c(r,s.props||{},((e,t,...n)=>{const o=n.length?n[0]:t;return p.ctx&&l(p.ctx[e],p.ctx[e]=o)&&(!p.skip_bound&&p.bound[e]&&p.bound[e](o),g&&$(r,e)),t})):[],p.update(),g=!0,o(p.before_update),p.fragment=!!u&&u(p.ctx),s.target){if(s.hydrate){const e=function(e){return Array.from(e.childNodes)}(s.target);p.fragment&&p.fragment.l(e),e.forEach(d)}else p.fragment&&p.fragment.c();s.intro&&((R=r.$$.fragment)&&R.i&&(N.delete(R),R.i(C))),function(e,n,r,s){const{fragment:a,after_update:c}=e.$$;a&&a.m(n,r),s||I((()=>{const n=e.$$.on_mount.map(t).filter(i);e.$$.on_destroy?e.$$.on_destroy.push(...n):o(n),e.$$.on_mount=[]})),c.forEach(I)}(r,s.target,s.anchor,s.customElement),U()}var R,C;m(T)}let D;var L,Q;"function"==typeof HTMLElement&&(D=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(t).filter(i);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,n){this[e]=n}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){!function(e,t){const n=e.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=e}$on(t,n){if(!i(n))return e;const o=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return o.push(n),()=>{const e=o.indexOf(n);-1!==e&&o.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}),function(e){e.CUSTOM_MESSAGE="custom-message",e.GET_CONTEXT_REQUEST="get-context-request",e.NAVIGATION_REQUEST="navigation-request",e.ALERT_REQUEST="show-alert-request",e.INITIALIZED="initialized",e.ADD_SEARCH_PARAMS_REQUEST="add-search-params-request",e.ADD_NODE_PARAMS_REQUEST="add-node-params-request",e.SHOW_CONFIRMATION_MODAL_REQUEST="show-confirmation-modal-request",e.SHOW_LOADING_INDICATOR_REQUEST="show-loading-indicator-request",e.HIDE_LOADING_INDICATOR_REQUEST="hide-loading-indicator-request",e.SET_CURRENT_LOCALE_REQUEST="set-current-locale-request",e.LOCAL_STORAGE_SET_REQUEST="set-storage-request",e.RUNTIME_ERROR_HANDLING_REQUEST="runtime-error-handling-request",e.SET_ANCHOR_LINK_REQUEST="set-anchor-request",e.SET_THIRD_PARTY_COOKIES_REQUEST="set-third-party-cookies-request",e.BACK_NAVIGATION_REQUEST="navigate-back-request",e.GET_CURRENT_ROUTE_REQUEST="get-current-route-request",e.NAVIGATION_COMPLETED_REPORT="report-navigation-completed-request",e.UPDATE_MODAL_PATH_DATA_REQUEST="update-modal-path-data-requesst",e.CHECK_PATH_EXISTS_REQUEST="check-path-exists-request",e.SET_DIRTY_STATUS_REQUEST="set-dirty-status-request"}(L||(L={})),function(e){e.CUSTOM_MESSAGE="custom",e.GET_CONTEXT="luigi.get-context",e.SEND_CONTEXT="luigi.init",e.CONTEXT_RECEIVED="luigi.init.ok",e.NAVIGATION_REQUEST="luigi.navigation.open",e.ALERT_REQUEST="luigi.ux.alert.show",e.INITIALIZED="luigi.init.ok",e.ADD_SEARCH_PARAMS_REQUEST="luigi.addSearchParams",e.ADD_NODE_PARAMS_REQUEST="luigi.addNodeParams",e.SHOW_CONFIRMATION_MODAL_REQUEST="luigi.ux.confirmationModal.show",e.SHOW_LOADING_INDICATOR_REQUEST="luigi.show-loading-indicator",e.HIDE_LOADING_INDICATOR_REQUEST="luigi.hide-loading-indicator",e.SET_CURRENT_LOCALE_REQUEST="luigi.ux.set-current-locale",e.LOCAL_STORAGE_SET_REQUEST="storage",e.RUNTIME_ERROR_HANDLING_REQUEST="luigi-runtime-error-handling",e.SET_ANCHOR_LINK_REQUEST="luigi.setAnchor",e.SET_THIRD_PARTY_COOKIES_REQUEST="luigi.third-party-cookie",e.BACK_NAVIGATION_REQUEST="luigi.navigation.back",e.GET_CURRENT_ROUTE_REQUEST="luigi.navigation.currentRoute",e.REPORT_TOKEN_ISSUED_REQUEST="luigi.auth.tokenIssued",e.NAVIGATION_COMPLETED_REPORT="luigi.navigate.ok",e.UPDATE_MODAL_PATH_DATA_REQUEST="luigi.navigation.updateModalDataPath",e.CHECK_PATH_EXISTS_REQUEST="luigi.navigation.pathExists",e.SET_DIRTY_STATUS_REQUEST="luigi.set-page-dirty"}(Q||(Q={}));const M=new class{isFunction(e){return e&&"[object Function]"==={}.toString.call(e)}};var y;!function(e){e.SEND_CONTEXT_TO_MICROFRONTEND="sendContextToMicrofrontend"}(y||(y={}));class x{constructor(){}isVisible(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}sendCustomMessageToIframe(e,t){if(e.iframe.contentWindow){const n=new URL(e.iframe.src);e.iframe.contentWindow.postMessage({msg:"custom",data:t},n.origin)}else console.error("Message target could not be resolved")}dispatch(e,t,n,o,i){let r=new CustomEvent(e,{detail:n});o&&M.isFunction(o)&&i&&(r[i]=e=>{o(e)}),t.dispatchEvent(r)}getTargetContainer(e){let t;return globalThis.__luigi_container_manager.container.forEach((n=>{var o;(null===(o=n.iframeHandle)||void 0===o?void 0:o.iframe)&&n.iframeHandle.iframe.contentWindow===e.source&&(t=n)})),t}getContainerManager(){return globalThis.__luigi_container_manager||(globalThis.__luigi_container_manager={container:[],messageListener:e=>{var t,n;const o=this.getTargetContainer(e),i=null===(n=null===(t=null==o?void 0:o.iframeHandle)||void 0===t?void 0:t.iframe)||void 0===n?void 0:n.contentWindow;if(i===e.source){const t=e.data.msg;switch(t){case Q.CUSTOM_MESSAGE:this.dispatch(L.CUSTOM_MESSAGE,o,e.data.data);break;case Q.GET_CONTEXT:this.dispatch(L.GET_CONTEXT_REQUEST,o,e.data,(e=>{console.log("Callback called: Received data from Core sending inside MF",e),i.postMessage({msg:Q.SEND_CONTEXT,context:e},"*")}),y.SEND_CONTEXT_TO_MICROFRONTEND);break;case Q.NAVIGATION_REQUEST:this.dispatch(L.NAVIGATION_REQUEST,o,e.data.params);break;case Q.ALERT_REQUEST:this.dispatch(L.ALERT_REQUEST,o,e.data.params);break;case Q.INITIALIZED:this.dispatch(L.INITIALIZED,o,e.data.params);break;case Q.ADD_SEARCH_PARAMS_REQUEST:this.dispatch(L.ADD_SEARCH_PARAMS_REQUEST,o,{data:e.data.data,keepBrowserHistory:e.data.keepBrowserHistory});break;case Q.ADD_NODE_PARAMS_REQUEST:this.dispatch(L.ADD_NODE_PARAMS_REQUEST,o,{data:e.data.data,keepBrowserHistory:e.data.keepBrowserHistory});break;case Q.SHOW_CONFIRMATION_MODAL_REQUEST:this.dispatch(L.SHOW_CONFIRMATION_MODAL_REQUEST,o,e.data.data);break;case Q.SHOW_LOADING_INDICATOR_REQUEST:this.dispatch(L.SHOW_LOADING_INDICATOR_REQUEST,o,e);break;case Q.HIDE_LOADING_INDICATOR_REQUEST:this.dispatch(L.HIDE_LOADING_INDICATOR_REQUEST,o,e);break;case Q.SET_CURRENT_LOCALE_REQUEST:this.dispatch(L.SET_CURRENT_LOCALE_REQUEST,o,e);break;case Q.LOCAL_STORAGE_SET_REQUEST:this.dispatch(L.LOCAL_STORAGE_SET_REQUEST,o,e);break;case Q.RUNTIME_ERROR_HANDLING_REQUEST:this.dispatch(L.RUNTIME_ERROR_HANDLING_REQUEST,o,e);break;case Q.SET_ANCHOR_LINK_REQUEST:this.dispatch(L.SET_ANCHOR_LINK_REQUEST,o,e);break;case Q.SET_THIRD_PARTY_COOKIES_REQUEST:this.dispatch(L.SET_THIRD_PARTY_COOKIES_REQUEST,o,e);break;case Q.BACK_NAVIGATION_REQUEST:this.dispatch(L.BACK_NAVIGATION_REQUEST,o,e);break;case Q.GET_CURRENT_ROUTE_REQUEST:this.dispatch(L.GET_CURRENT_ROUTE_REQUEST,o,e);break;case Q.NAVIGATION_COMPLETED_REPORT:this.dispatch(L.NAVIGATION_COMPLETED_REPORT,o,e);break;case Q.UPDATE_MODAL_PATH_DATA_REQUEST:this.dispatch(L.UPDATE_MODAL_PATH_DATA_REQUEST,o,e);break;case Q.CHECK_PATH_EXISTS_REQUEST:this.dispatch(L.CHECK_PATH_EXISTS_REQUEST,o,e);break;case Q.SET_DIRTY_STATUS_REQUEST:this.dispatch(L.SET_DIRTY_STATUS_REQUEST,o,e);break;case"luigi.third-party-cookie":break;default:console.warn("Functionality not yet implemented: ",t)}}}},window.addEventListener("message",globalThis.__luigi_container_manager.messageListener)),globalThis.__luigi_container_manager}registerContainer(e){this.getContainerManager().container.push(e)}}class H{constructor(e){e?(this.rendererObject=e,this.config=e.config||{}):this.config={}}createCompoundContainer(){return document.createElement("div")}createCompoundItemContainer(e){return document.createElement("div")}attachCompoundItem(e,t){e.appendChild(t)}}class k extends H{constructor(e){super(e||{use:{}}),e&&e.use&&e.use.extends&&(this.superRenderer=W({use:e.use.extends,config:e.config}))}createCompoundContainer(){return this.rendererObject.use.createCompoundContainer?this.rendererObject.use.createCompoundContainer(this.config,this.superRenderer):this.superRenderer?this.superRenderer.createCompoundContainer():super.createCompoundContainer()}createCompoundItemContainer(e){return this.rendererObject.use.createCompoundItemContainer?this.rendererObject.use.createCompoundItemContainer(e,this.config,this.superRenderer):this.superRenderer?this.superRenderer.createCompoundItemContainer(e):super.createCompoundItemContainer(e)}attachCompoundItem(e,t){this.rendererObject.use.attachCompoundItem?this.rendererObject.use.attachCompoundItem(e,t,this.superRenderer):this.superRenderer?this.superRenderer.attachCompoundItem(e,t):super.attachCompoundItem(e,t)}}class P extends H{createCompoundContainer(){const e="__lui_compound_"+(new Date).getTime(),t=document.createElement("div");t.classList.add(e);let n="";return this.config.layouts&&this.config.layouts.forEach((t=>{if(t.minWidth||t.maxWidth){let o="@media only screen ";null!=t.minWidth&&(o+=`and (min-width: ${t.minWidth}px) `),null!=t.maxWidth&&(o+=`and (max-width: ${t.maxWidth}px) `),o+=`{\n .${e} {\n grid-template-columns: ${t.columns||"auto"};\n grid-template-rows: ${t.rows||"auto"};\n grid-gap: ${t.gap||"0"};\n }\n }\n `,n+=o}})),t.innerHTML=`\n <style scoped>\n .${e} {\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 ${n}\n </style>\n `,t}createCompoundItemContainer(e){const t=e||{},n=document.createElement("div");return n.setAttribute("style",`grid-row: ${t.row||"auto"}; grid-column: ${t.column||"auto"}`),n}}const W=e=>{const t=e.use;return t?"grid"===t?new P(e):t.createCompoundContainer||t.createCompoundItemContainer||t.attachCompoundItem?new k(e):new H(e):new H(e)},G=(e,t,n,o)=>{(null==t?void 0:t.eventListeners)&&t.eventListeners.forEach((t=>{const i=t.source+"."+t.name,r=e[i],s={wcElementId:n,wcElement:o,action:t.action,converter:t.dataConverter};r?r.push(s):e[i]=[s]}))};class q{constructor(){this.containerService=new x}dynamicImport(e){return import( /* webpackIgnore: true */e)}processViewUrl(e,t){return e}attachWC(e,t,n,o,i,r){if(n&&n.contains(t)){const s=document.createElement(e);r&&s.setAttribute("nodeId",r),this.initWC(s,e,n,i,o,r),n.replaceChild(s,t),n._luigi_node&&(n._luigi_mfe_webcomponent=s)}}createClientAPI(e,t,n){return{linkManager:()=>{},uxManager:()=>({showAlert:e=>{},showConfirmationModal:async e=>new Promise(((e,t)=>{e(!0)}))}),getCurrentLocale:()=>{},publishEvent:e=>{}}}initWC(e,t,n,o,i,r){const s=this.createClientAPI(n,r,t);if(e.__postProcess){const t=new URL(document.baseURI).origin===new URL(o,document.baseURI).origin?new URL("./",new URL(o,document.baseURI)):new URL("./",o);e.__postProcess(i,s,t.origin+t.pathname)}else e.context=i,e.LuigiClient=s}generateWCId(e){let t="";for(let n=0;n<e.length;n++)t+=e.charCodeAt(n).toString(16);return"luigi-wc-"+t}registerWCFromUrl(e,t){const n=this.processViewUrl(e);return new Promise(((e,o)=>{this.checkWCUrl(n)?this.dynamicImport(n).then((n=>{try{if(!window.customElements.get(t)){let e=n.default;if(!HTMLElement.isPrototypeOf(e)){let t=Object.keys(n);for(let o=0;o<t.length&&(e=n[t[o]],!HTMLElement.isPrototypeOf(e));o++);}window.customElements.define(t,e)}e(1)}catch(e){o(e)}})).catch((e=>o(e))):(console.warn(`View URL '${n}' not allowed to be included`),o(`View URL '${n}' not allowed`))}))}includeSelfRegisteredWCFromUrl(e,t,n){if(this.checkWCUrl(t)){this.containerService.getContainerManager()._registerWebcomponent||(this.containerService.getContainerManager()._registerWebcomponent=(e,t)=>{window.customElements.define(this.generateWCId(e),t)});let o=document.createElement("script");o.setAttribute("src",t),"module"===e.webcomponent.type&&o.setAttribute("type","module"),o.setAttribute("defer","true"),o.addEventListener("load",(()=>{n()})),document.body.appendChild(o)}else console.warn(`View URL '${t}' not allowed to be included`)}checkWCUrl(e){return!0}renderWebComponent(e,t,n,o,i){const r=this.processViewUrl(e,{context:n}),s=o.webcomponent&&o.webcomponent.tagName?o.webcomponent.tagName:this.generateWCId(r),a=document.createElement("div");t.appendChild(a),t._luigi_node=o,window.customElements.get(s)?this.attachWC(s,a,t,n,r,i):window.luigiWCFn?window.luigiWCFn(r,s,a,(()=>{this.attachWC(s,a,t,n,r,i)})):o.webcomponent&&o.webcomponent.selfRegistered?this.includeSelfRegisteredWCFromUrl(o,r,(()=>{this.attachWC(s,a,t,n,r,i)})):this.registerWCFromUrl(r,s).then((()=>{this.attachWC(s,a,t,n,r,i)}))}createCompoundContainerAsync(e,t){return new Promise(((n,o)=>{if(e.viewUrl)try{const o=this.generateWCId(e.viewUrl);this.registerWCFromUrl(e.viewUrl,o).then((()=>{const i=document.createElement(o);this.initWC(i,o,i,e.viewUrl,t,"_root"),n(i)}))}catch(e){o(e)}else n(e.createCompoundContainer())}))}renderWebComponentCompound(e,t,n){var o;let i;return e.webcomponent&&e.viewUrl?(i=new H,i.viewUrl=this.processViewUrl(e.viewUrl,{context:n}),i.createCompoundItemContainer=e=>{var t=document.createElement("div");return e&&e.slot&&t.setAttribute("slot",e.slot),t}):(null===(o=e.compound)||void 0===o?void 0:o.renderer)&&(i=W(e.compound.renderer)),i=i||new H,new Promise((o=>{this.createCompoundContainerAsync(i,n).then((r=>{var s;const a={};r.eventBus={listeners:a,onPublishEvent:(e,t,n)=>{const o=a[t+"."+e.type]||[];o.push(...a["*."+e.type]||[]),o.forEach((t=>{const n=t.wcElement||r.querySelector("[nodeId="+t.wcElementId+"]");n?n.dispatchEvent(new CustomEvent(t.action,{detail:t.converter?t.converter(e.detail):e.detail})):console.debug("Could not find event target",t)}))}},null===(s=e.compound)||void 0===s||s.children.forEach(((e,t)=>{const o=Object.assign(Object.assign({},n),e.context),s=i.createCompoundItemContainer(e.layoutConfig);s.eventBus=r.eventBus,i.attachCompoundItem(r,s);const c=e.id||"gen_"+t;this.renderWebComponent(e.viewUrl,s,o,e,c),G(a,e,c)})),t.appendChild(r),G(a,e.compound,"_root",r),o(r)}))}))}}function V(e){let t,n=!e[5](),o=n&&function(e){let t,n;return{c(){t=l("iframe"),c(t.src,n=e[0])||_(t,"src",n),_(t,"title",e[1])},m(n,o){u(n,t,o),e[8](t)},p(e,o){1&o&&!c(t.src,n=e[0])&&_(t,"src",n),2&o&&_(t,"title",e[1])},d(n){n&&d(t),e[8](null)}}}(e);return{c(){o&&o.c(),t=E()},m(e,n){o&&o.m(e,n),u(e,t,n)},p(e,t){n&&o.p(e,t)},d(e){o&&o.d(e),e&&d(t)}}}function F(t){let n,o=!t[4]&&V(t);return{c(){n=l("main"),o&&o.c(),this.c=e,_(n,"class",t[5]()?void 0:"lui-isolated")},m(e,i){u(e,n,i),o&&o.m(n,null),t[9](n)},p(e,[t]){e[4]?o&&(o.d(1),o=null):o?o.p(e,t):(o=V(e),o.c(),o.m(n,null))},i:e,o:e,d(e){e&&d(n),o&&o.d(),t[9](null)}}}function K(e,t,n){let o,{viewurl:i}=t,{context:r}=t,{label:s}=t,{webcomponent:a}=t,c={};const u=new x,d=new q;d.createClientAPI=(e,t,n)=>({linkManager:()=>({navigate:e=>{_("navigation-request",{link:e})}}),uxManager:()=>({showAlert:e=>{_("alert-request",e)},showConfirmationModal:async e=>new Promise(((t,n)=>{_("confirmation-request",e,(e=>{e?t(e):n()}))}))}),getCurrentLocale:()=>{},publishEvent:e=>{}});const l=T();l.iframeHandle=c;let E=!!l.attributes["defer-init"];function _(e,t,n){u.dispatch(e,l,t,n)}function h(){return!!a}var m;return l.init=()=>{n(4,E=!1)},l.sendCustomMessage=(e,t)=>{if(h()&&o._luigi_mfe_webcomponent)u.dispatch(e,o._luigi_mfe_webcomponent,t);else{const n=Object.assign({},t);n.id&&console.warn('Property "id" is reserved and can not be used in custom message data'),n.id=e,u.sendCustomMessageToIframe(c,n)}},u.registerContainer(l),p((async()=>{const e=r?JSON.parse(r):{};h()&&(n(3,o.innerHTML="",o),d.renderWebComponent(i,o,e,{}))})),m=async()=>{},T().$$.on_destroy.push(m),e.$$set=e=>{"viewurl"in e&&n(0,i=e.viewurl),"context"in e&&n(6,r=e.context),"label"in e&&n(1,s=e.label),"webcomponent"in e&&n(7,a=e.webcomponent)},[i,s,c,o,E,h,r,a,function(e){R[e?"unshift":"push"]((()=>{c.iframe=e,n(2,c)}))},function(e){R[e?"unshift":"push"]((()=>{o=e,n(3,o)}))}]}class j extends D{constructor(e){super(),this.shadowRoot.innerHTML="<style>main,iframe{width:100%;height:100%;border:none}main.lui-isolated{line-height:0}</style>",v(this,{target:this.shadowRoot,props:h(this.attributes),customElement:!0},K,F,r,{viewurl:0,context:6,label:1,webcomponent:7},null),e&&(e.target&&u(e.target,this,e.anchor),e.props&&(this.$set(e.props),U()))}static get observedAttributes(){return["viewurl","context","label","webcomponent"]}get viewurl(){return this.$$.ctx[0]}set viewurl(e){this.$$set({viewurl:e}),U()}get context(){return this.$$.ctx[6]}set context(e){this.$$set({context:e}),U()}get label(){return this.$$.ctx[1]}set label(e){this.$$set({label:e}),U()}get webcomponent(){return this.$$.ctx[7]}set webcomponent(e){this.$$set({webcomponent:e}),U()}}function B(t){let n;return{c(){n=l("main"),this.c=e},m(e,o){u(e,n,o),t[2](n)},p:e,i:e,o:e,d(e){e&&d(n),t[2](null)}}}function X(e,t,n){let o,{context:i}=t,r=!1;const s=new x,a=new q;a.createClientAPI=(e,t,n)=>({linkManager:()=>{},uxManager:()=>({showAlert:e=>{u("alert-request",e,{})},showConfirmationModal:async e=>new Promise(((t,n)=>{u("confirmation-request",e,(e=>{e?t(e):n()}))}))}),getCurrentLocale:()=>{},publishEvent:o=>{e&&e.eventBus&&e.eventBus.onPublishEvent(o,t,n)}});const c=T();function u(e,t,n){s.dispatch(e,c,t,n)}return c.attributes["defer-init"],c.init=()=>{if(!c.compoundConfig||r)return;const e={compound:c.compoundConfig};a.renderWebComponentCompound(e,o,i).then((e=>{})),r=!0},s.registerContainer(c),p((async()=>{!i||JSON.parse(i)})),e.$$set=e=>{"context"in e&&n(1,i=e.context)},[o,i,function(e){R[e?"unshift":"push"]((()=>{o=e,n(0,o)}))}]}class Y extends D{constructor(e){super(),this.shadowRoot.innerHTML="<style>main{width:100%;height:100%;border:none}</style>",v(this,{target:this.shadowRoot,props:h(this.attributes),customElement:!0},X,B,r,{context:1},null),e&&(e.target&&u(e.target,this,e.anchor),e.props&&(this.$set(e.props),U()))}static get observedAttributes(){return["context"]}get context(){return this.$$.ctx[1]}set context(e){this.$$set({context:e}),U()}}var Z=L;customElements.get("luigi-container")||customElements.define("luigi-container",j),customElements.get("luigi-compound-container")||customElements.define("luigi-compound-container",Y);export{Y as LuigiCompoundContainer,j as LuigiContainer,Z as default};
|
|
1
|
+
function e(){}function t(e){return e()}function n(){return Object.create(null)}function i(e){e.forEach(t)}function r(e){return"function"==typeof e}function o(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}let s,a;function c(e,t){return e===t||(s||(s=document.createElement("a")),s.href=t,e===s.href)}function u(e){return null==e?"":e}function l(e,t,n){const i=function(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;if(t&&t.host)return t;return e.ownerDocument}(e);if(!i.getElementById(t)){const e=E("style");e.id=t,e.textContent=n,function(e,t){(function(e,t){e.appendChild(t)})(e.head||e,t),t.sheet}(i,e)}}function d(e,t,n){e.insertBefore(t,n||null)}function h(e){e.parentNode&&e.parentNode.removeChild(e)}function E(e){return document.createElement(e)}function m(){return e="",document.createTextNode(e);var e}function p(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function _(e){a=e}function g(){if(!a)throw new Error("Function called outside component initialization");return a}function $(e){g().$$.on_mount.push(e)}const T=[],f=[];let C=[];const R=[],A=Promise.resolve();let I=!1;function S(e){C.push(e)}const w=new Set;let b=0;function v(){if(0!==b)return;const e=a;do{try{for(;b<T.length;){const e=T[b];b++,_(e),O(e.$$)}}catch(e){throw T.length=0,b=0,e}for(_(null),T.length=0,b=0;f.length;)f.pop()();for(let e=0;e<C.length;e+=1){const t=C[e];w.has(t)||(w.add(t),t())}C.length=0}while(T.length);for(;R.length;)R.pop()();I=!1,w.clear(),_(e)}function O(e){if(null!==e.fragment){e.update(),i(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(S)}}const N=new Set;function U(e,t){const n=e.$$;null!==n.fragment&&(!function(e){const t=[],n=[];C.forEach((i=>-1===e.indexOf(i)?t.push(i):n.push(i))),n.forEach((e=>e())),C=t}(n.after_update),i(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function L(e,t){-1===e.$$.dirty[0]&&(T.push(e),I||(I=!0,A.then(v)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function D(o,s,c,u,l,d,E,m=[-1]){const p=a;_(o);const g=o.$$={fragment:null,ctx:[],props:d,update:e,not_equal:l,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(p?p.$$.context:[])),callbacks:n(),dirty:m,skip_bound:!1,root:s.target||p.$$.root};E&&E(g.root);let $=!1;if(g.ctx=c?c(o,s.props||{},((e,t,...n)=>{const i=n.length?n[0]:t;return g.ctx&&l(g.ctx[e],g.ctx[e]=i)&&(!g.skip_bound&&g.bound[e]&&g.bound[e](i),$&&L(o,e)),t})):[],g.update(),$=!0,i(g.before_update),g.fragment=!!u&&u(g.ctx),s.target){if(s.hydrate){const e=function(e){return Array.from(e.childNodes)}(s.target);g.fragment&&g.fragment.l(e),e.forEach(h)}else g.fragment&&g.fragment.c();s.intro&&((T=o.$$.fragment)&&T.i&&(N.delete(T),T.i(f))),function(e,n,o){const{fragment:s,after_update:a}=e.$$;s&&s.m(n,o),S((()=>{const n=e.$$.on_mount.map(t).filter(r);e.$$.on_destroy?e.$$.on_destroy.push(...n):i(n),e.$$.on_mount=[]})),a.forEach(S)}(o,s.target,s.anchor),v()}var T,f;_(p)}let y;function x(e,t,n,i){const r=n[e]?.type;if(t="Boolean"===r&&"boolean"!=typeof t?null!=t:t,!i||!n[e])return t;if("toAttribute"===i)switch(r){case"Object":case"Array":return null==t?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return null==t?null:t;default:return t}else switch(r){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":default:return t;case"Number":return null!=t?+t:t}}function k(e,t,n,i,r,o){let s=class extends y{constructor(){super(e,n,r),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map((e=>(t[e].attribute||e).toLowerCase()))}};return Object.keys(t).forEach((e=>{Object.defineProperty(s.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=x(e,n,t),this.$$d[e]=n,this.$$c?.$set({[e]:n})}})})),i.forEach((e=>{Object.defineProperty(s.prototype,e,{get(){return this.$$c?.[e]}})})),o&&(s=o(s)),e.element=s,s}"function"==typeof HTMLElement&&(y=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&this.attachShadow({mode:"open"})}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const e=this.$$l_u.get(t);e&&(e(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn)return;function e(e){return()=>{let t;return{c:function(){t=E("slot"),"default"!==e&&p(t,"name",e)},m:function(e,n){d(e,t,n)},d:function(e){e&&h(t)}}}}const t={},n=function(e){const t={};return e.childNodes.forEach((e=>{t[e.slot||"default"]=!0})),t}(this);for(const r of this.$$s)r in n&&(t[r]=[e(r)]);for(const o of this.attributes){const s=this.$$g_p(o.name);s in this.$$d||(this.$$d[s]=x(s,o.value,this.$$p_d,"toProp"))}this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$scope:{ctx:[]}}});const i=()=>{this.$$r=!0;for(const e in this.$$p_d)if(this.$$d[e]=this.$$c.$$.ctx[this.$$c.$$.props[e]],this.$$p_d[e].reflect){const t=x(e,this.$$d[e],this.$$p_d,"toAttribute");null==t?this.removeAttribute(e):this.setAttribute(this.$$p_d[e].attribute||e,t)}this.$$r=!1};this.$$c.$$.after_update.push(i),i();for(const a in this.$$l)for(const c of this.$$l[a]){const u=this.$$c.$on(a,c);this.$$l_u.set(c,u)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=x(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(e){return Object.keys(this.$$p_d).find((t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e))||e}});class M{$$=void 0;$$set=void 0;$destroy(){U(this,1),this.$destroy=e}$on(t,n){if(!r(n))return e;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const e=i.indexOf(n);-1!==e&&i.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}var Q,P;"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4"),function(e){e.CUSTOM_MESSAGE="custom-message",e.GET_CONTEXT_REQUEST="get-context-request",e.NAVIGATION_REQUEST="navigation-request",e.ALERT_REQUEST="show-alert-request",e.ALERT_CLOSED="close-alert-request",e.INITIALIZED="initialized",e.ADD_SEARCH_PARAMS_REQUEST="add-search-params-request",e.ADD_NODE_PARAMS_REQUEST="add-node-params-request",e.SHOW_CONFIRMATION_MODAL_REQUEST="show-confirmation-modal-request",e.SHOW_LOADING_INDICATOR_REQUEST="show-loading-indicator-request",e.HIDE_LOADING_INDICATOR_REQUEST="hide-loading-indicator-request",e.SET_CURRENT_LOCALE_REQUEST="set-current-locale-request",e.LOCAL_STORAGE_SET_REQUEST="set-storage-request",e.RUNTIME_ERROR_HANDLING_REQUEST="runtime-error-handling-request",e.SET_ANCHOR_LINK_REQUEST="set-anchor-request",e.SET_THIRD_PARTY_COOKIES_REQUEST="set-third-party-cookies-request",e.BACK_NAVIGATION_REQUEST="navigate-back-request",e.GET_CURRENT_ROUTE_REQUEST="get-current-route-request",e.NAVIGATION_COMPLETED_REPORT="report-navigation-completed-request",e.UPDATE_MODAL_PATH_DATA_REQUEST="update-modal-path-data-request",e.CHECK_PATH_EXISTS_REQUEST="check-path-exists-request",e.SET_DIRTY_STATUS_REQUEST="set-dirty-status-request"}(Q||(Q={})),function(e){e.CUSTOM_MESSAGE="custom",e.GET_CONTEXT="luigi.get-context",e.SEND_CONTEXT_HANDSHAKE="luigi.init",e.CONTEXT_RECEIVED="luigi.init.ok",e.NAVIGATION_REQUEST="luigi.navigation.open",e.ALERT_REQUEST="luigi.ux.alert.show",e.ALERT_CLOSED="luigi.ux.alert.hide",e.INITIALIZED="luigi.init.ok",e.ADD_SEARCH_PARAMS_REQUEST="luigi.addSearchParams",e.ADD_NODE_PARAMS_REQUEST="luigi.addNodeParams",e.SHOW_CONFIRMATION_MODAL_REQUEST="luigi.ux.confirmationModal.show",e.SHOW_LOADING_INDICATOR_REQUEST="luigi.show-loading-indicator",e.HIDE_LOADING_INDICATOR_REQUEST="luigi.hide-loading-indicator",e.SET_CURRENT_LOCALE_REQUEST="luigi.ux.set-current-locale",e.LOCAL_STORAGE_SET_REQUEST="storage",e.RUNTIME_ERROR_HANDLING_REQUEST="luigi-runtime-error-handling",e.SET_ANCHOR_LINK_REQUEST="luigi.setAnchor",e.SET_THIRD_PARTY_COOKIES_REQUEST="luigi.third-party-cookie",e.BACK_NAVIGATION_REQUEST="luigi.navigation.back",e.GET_CURRENT_ROUTE_REQUEST="luigi.navigation.currentRoute",e.SEND_CONTEXT_OBJECT="luigi.navigate",e.NAVIGATION_COMPLETED_REPORT="luigi.navigate.ok",e.UPDATE_MODAL_PATH_DATA_REQUEST="luigi.navigation.updateModalDataPath",e.CHECK_PATH_EXISTS_REQUEST="luigi.navigation.pathExists",e.SET_DIRTY_STATUS_REQUEST="luigi.set-page-dirty"}(P||(P={}));const H=new class{isFunction(e){return e&&"[object Function]"==={}.toString.call(e)}};var W;!function(e){e.SEND_CONTEXT_TO_MICROFRONTEND="sendContextToMicrofrontend"}(W||(W={}));class G{constructor(){}isVisible(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}sendCustomMessageToIframe(e,t,n){const i=n||"custom";if(e.iframe.contentWindow){const n=new URL(e.iframe.src);"custom"===i?e.iframe.contentWindow.postMessage({msg:i,data:t},n.origin):e.iframe.contentWindow.postMessage(Object.assign({msg:i},t),n.origin)}else console.error("Message target could not be resolved")}dispatch(e,t,n,i,r){let o=new CustomEvent(e,{detail:n});i&&H.isFunction(i)&&r&&(o[r]=e=>{i(e)}),t.dispatchEvent(o)}getTargetContainer(e){let t;return globalThis.__luigi_container_manager.container.forEach((n=>{var i;(null===(i=n.iframeHandle)||void 0===i?void 0:i.iframe)&&n.iframeHandle.iframe.contentWindow===e.source&&(t=n)})),t}getContainerManager(){return globalThis.__luigi_container_manager||(globalThis.__luigi_container_manager={container:[],messageListener:e=>{var t,n;const i=this.getTargetContainer(e),r=null===(n=null===(t=null==i?void 0:i.iframeHandle)||void 0===t?void 0:t.iframe)||void 0===n?void 0:n.contentWindow;if(r&&r===e.source){const t=e.data.msg;switch(t){case P.CUSTOM_MESSAGE:const n=e.data.data,o=n.id;delete n.id,this.dispatch(Q.CUSTOM_MESSAGE,i,{id:o,_metaData:{},data:n});break;case P.GET_CONTEXT:r.postMessage({msg:P.SEND_CONTEXT_HANDSHAKE,context:i.context||{},internal:{}},"*");break;case P.NAVIGATION_REQUEST:this.dispatch(Q.NAVIGATION_REQUEST,i,e.data.params);break;case P.ALERT_REQUEST:this.dispatch(Q.ALERT_REQUEST,i,e);break;case P.INITIALIZED:this.dispatch(Q.INITIALIZED,i,e.data.params);break;case P.ADD_SEARCH_PARAMS_REQUEST:this.dispatch(Q.ADD_SEARCH_PARAMS_REQUEST,i,{data:e.data.data,keepBrowserHistory:e.data.keepBrowserHistory});break;case P.ADD_NODE_PARAMS_REQUEST:this.dispatch(Q.ADD_NODE_PARAMS_REQUEST,i,{data:e.data.data,keepBrowserHistory:e.data.keepBrowserHistory});break;case P.SHOW_CONFIRMATION_MODAL_REQUEST:this.dispatch(Q.SHOW_CONFIRMATION_MODAL_REQUEST,i,e.data.data);break;case P.SHOW_LOADING_INDICATOR_REQUEST:this.dispatch(Q.SHOW_LOADING_INDICATOR_REQUEST,i,e);break;case P.HIDE_LOADING_INDICATOR_REQUEST:this.dispatch(Q.HIDE_LOADING_INDICATOR_REQUEST,i,e);break;case P.SET_CURRENT_LOCALE_REQUEST:this.dispatch(Q.SET_CURRENT_LOCALE_REQUEST,i,e);break;case P.LOCAL_STORAGE_SET_REQUEST:this.dispatch(Q.LOCAL_STORAGE_SET_REQUEST,i,e);break;case P.RUNTIME_ERROR_HANDLING_REQUEST:this.dispatch(Q.RUNTIME_ERROR_HANDLING_REQUEST,i,e);break;case P.SET_ANCHOR_LINK_REQUEST:this.dispatch(Q.SET_ANCHOR_LINK_REQUEST,i,e);break;case P.SET_THIRD_PARTY_COOKIES_REQUEST:this.dispatch(Q.SET_THIRD_PARTY_COOKIES_REQUEST,i,e);break;case P.BACK_NAVIGATION_REQUEST:this.dispatch(Q.BACK_NAVIGATION_REQUEST,i,e);break;case P.GET_CURRENT_ROUTE_REQUEST:this.dispatch(Q.GET_CURRENT_ROUTE_REQUEST,i,e);break;case P.NAVIGATION_COMPLETED_REPORT:this.dispatch(Q.NAVIGATION_COMPLETED_REPORT,i,e);break;case P.UPDATE_MODAL_PATH_DATA_REQUEST:this.dispatch(Q.UPDATE_MODAL_PATH_DATA_REQUEST,i,e);break;case P.CHECK_PATH_EXISTS_REQUEST:this.dispatch(Q.CHECK_PATH_EXISTS_REQUEST,i,e);break;case P.SET_DIRTY_STATUS_REQUEST:this.dispatch(Q.SET_DIRTY_STATUS_REQUEST,i,e);break;case"luigi.third-party-cookie":break;default:console.warn("Functionality not yet implemented: ",t)}}}},window.addEventListener("message",globalThis.__luigi_container_manager.messageListener)),globalThis.__luigi_container_manager}registerContainer(e){this.getContainerManager().container.push(e)}}const j=new G;class F{constructor(e){e?(this.rendererObject=e,this.config=e.config||{}):this.config={}}createCompoundContainer(){return document.createElement("div")}createCompoundItemContainer(e){return document.createElement("div")}attachCompoundItem(e,t){e.appendChild(t)}}class B extends F{constructor(e){super(e||{use:{}}),e&&e.use&&e.use.extends&&(this.superRenderer=V({use:e.use.extends,config:e.config}))}createCompoundContainer(){return this.rendererObject.use.createCompoundContainer?this.rendererObject.use.createCompoundContainer(this.config,this.superRenderer):this.superRenderer?this.superRenderer.createCompoundContainer():super.createCompoundContainer()}createCompoundItemContainer(e){return this.rendererObject.use.createCompoundItemContainer?this.rendererObject.use.createCompoundItemContainer(e,this.config,this.superRenderer):this.superRenderer?this.superRenderer.createCompoundItemContainer(e):super.createCompoundItemContainer(e)}attachCompoundItem(e,t){this.rendererObject.use.attachCompoundItem?this.rendererObject.use.attachCompoundItem(e,t,this.superRenderer):this.superRenderer?this.superRenderer.attachCompoundItem(e,t):super.attachCompoundItem(e,t)}}class q extends F{createCompoundContainer(){const e="__lui_compound_"+(new Date).getTime(),t=document.createElement("div");t.classList.add(e);let n="";return this.config.layouts&&this.config.layouts.forEach((t=>{if(t.minWidth||t.maxWidth){let i="@media only screen ";null!=t.minWidth&&(i+=`and (min-width: ${t.minWidth}px) `),null!=t.maxWidth&&(i+=`and (max-width: ${t.maxWidth}px) `),i+=`{\n .${e} {\n grid-template-columns: ${t.columns||"auto"};\n grid-template-rows: ${t.rows||"auto"};\n grid-gap: ${t.gap||"0"};\n }\n }\n `,n+=i}})),t.innerHTML=`\n <style scoped>\n .${e} {\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 ${n}\n </style>\n `,t}createCompoundItemContainer(e){const t=e||{},n=document.createElement("div");return n.setAttribute("style",`grid-row: ${t.row||"auto"}; grid-column: ${t.column||"auto"}`),n}}const V=e=>{const t=e.use;return t?"grid"===t?new q(e):t.createCompoundContainer||t.createCompoundItemContainer||t.attachCompoundItem?new B(e):new F(e):new F(e)},K=(e,t,n,i)=>{(null==t?void 0:t.eventListeners)&&t.eventListeners.forEach((t=>{const r=t.source+"."+t.name,o=e[r],s={wcElementId:n,wcElement:i,action:t.action,converter:t.dataConverter};o?o.push(s):e[r]=[s]}))};function X(e){return String(e).replaceAll("<","<").replaceAll(">",">").replaceAll(""",'"').replaceAll("'","'").replaceAll("/","/")}class Z{constructor(){this.containerService=new G}dynamicImport(e){return Object.freeze(import(/* webpackIgnore: true */e))}processViewUrl(e,t){return e}attachWC(e,t,n,i,r,o,s){if(n&&n.contains(t)){const a=document.createElement(e);o&&a.setAttribute("nodeId",o),this.initWC(a,e,n,r,i,o,s),n.replaceChild(a,t),n._luigi_node&&(n._luigi_mfe_webcomponent=a),n.dispatchEvent(new Event("wc_ready"))}}dispatchLuigiEvent(e,t,n){this.containerService.dispatch(e,this.thisComponent,t,n)}createClientAPI(e,t,n,i,r){return{linkManager:()=>({navigate:e=>{this.dispatchLuigiEvent(Q.NAVIGATION_REQUEST,{link:e})}}),uxManager:()=>({showAlert:e=>{this.dispatchLuigiEvent(Q.ALERT_REQUEST,e)},showConfirmationModal:async e=>new Promise(((t,n)=>{this.dispatchLuigiEvent(Q.SHOW_CONFIRMATION_MODAL_REQUEST,e,(e=>{e?t(e):n()}))})),getCurrentTheme:()=>this.thisComponent.getAttribute("theme")}),getCurrentLocale:()=>this.thisComponent.getAttribute("locale"),getActiveFeatureToggles:()=>this.thisComponent.getAttribute("active-feature-toggle-list"),publishEvent:r=>{e&&e.eventBus&&e.eventBus.onPublishEvent(r,t,n);const o={id:r.type,_metaData:{nodeId:t,wc_id:n,src:i},data:r.detail};this.dispatchLuigiEvent(Q.CUSTOM_MESSAGE,o)},luigiClientInit:()=>{this.dispatchLuigiEvent(Q.INITIALIZED,{})},addNodeParams:(e,t)=>{r||this.dispatchLuigiEvent(Q.ADD_NODE_PARAMS_REQUEST,{params:e,keepBrowserHistory:t})},getNodeParams:e=>{if(r)return{};let t=this.thisComponent.getAttribute("node-params")||{};return t=JSON.parse(t),e?(n=t,Object.entries(n).reduce(((e,t)=>(e[X(t[0])]=X(t[1]),e)),{})):t;var n},setAnchor:e=>{r||this.dispatchLuigiEvent(Q.SET_ANCHOR_LINK_REQUEST,e)}}}initWC(e,t,n,i,r,o,s){const a=this.createClientAPI(n,o,t,e,s);if(e.__postProcess){const t=new URL(document.baseURI).origin===new URL(i,document.baseURI).origin?new URL("./",new URL(i,document.baseURI)):new URL("./",i);e.__postProcess(r,a,t.origin+t.pathname)}else e.context=r,e.LuigiClient=a}generateWCId(e){let t="",n=new URL(e,location.href).href;for(let e=0;e<n.length;e++)t+=n.charCodeAt(e).toString(16);return"luigi-wc-"+t}registerWCFromUrl(e,t){const n=this.processViewUrl(e);return new Promise(((e,i)=>{if(this.checkWCUrl(n))this.dynamicImport(n).then((n=>{try{if(!window.customElements.get(t)){let e=n.default;if(!HTMLElement.isPrototypeOf(e)){let t=Object.keys(n);for(let i=0;i<t.length&&(e=n[t[i]],!HTMLElement.isPrototypeOf(e));i++);}window.customElements.define(t,e)}e(1)}catch(e){i(e)}})).catch((e=>{i(e)}));else{i(`Error: View URL '${n}' not allowed to be included`)}}))}includeSelfRegisteredWCFromUrl(e,t,n){if(this.checkWCUrl(t)){this.containerService.getContainerManager()._registerWebcomponent||(this.containerService.getContainerManager()._registerWebcomponent=(e,t)=>{window.customElements.define(this.generateWCId(e),t)});let i=document.createElement("script");i.setAttribute("src",t),"module"===e.webcomponent.type&&i.setAttribute("type","module"),i.setAttribute("defer","true"),i.addEventListener("load",(()=>{n()})),document.body.appendChild(i)}else console.warn(`View URL '${t}' not allowed to be included`)}checkWCUrl(e){return!0}renderWebComponent(e,t,n,i,r,o){const s=this.processViewUrl(e,{context:n}),a=i.webcomponent&&i.webcomponent.tagName?i.webcomponent.tagName:this.generateWCId(s),c=document.createElement("div");t.appendChild(c),t._luigi_node=i,window.customElements.get(a)?this.attachWC(a,c,t,n,s,r,o):window.luigiWCFn?window.luigiWCFn(s,a,c,(()=>{this.attachWC(a,c,t,n,s,r,o)})):i.webcomponent&&i.webcomponent.selfRegistered?this.includeSelfRegisteredWCFromUrl(i,s,(()=>{this.attachWC(a,c,t,n,s,r,o)})):this.registerWCFromUrl(s,a).then((()=>{this.attachWC(a,c,t,n,s,r,o)})).catch((e=>{console.warn("ERROR =>",e),this.containerService.dispatch(Q.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,e)}))}createCompoundContainerAsync(e,t){return new Promise(((n,i)=>{if(e.viewUrl)try{const i=this.generateWCId(e.viewUrl);this.registerWCFromUrl(e.viewUrl,i).then((()=>{const r=document.createElement(i);this.initWC(r,i,r,e.viewUrl,t,"_root"),n(r)})).catch((e=>{console.warn("Error: ",e),this.containerService.dispatch(Q.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,e)}))}catch(e){i(e)}else n(e.createCompoundContainer())}))}renderWebComponentCompound(e,t,n){var i;let r;return e.webcomponent&&e.viewUrl?(r=new F,r.viewUrl=this.processViewUrl(e.viewUrl,{context:n}),r.createCompoundItemContainer=e=>{var t=document.createElement("div");return e&&e.slot&&t.setAttribute("slot",e.slot),t}):(null===(i=e.compound)||void 0===i?void 0:i.renderer)&&(r=V(e.compound.renderer)),r=r||new F,new Promise((i=>{this.createCompoundContainerAsync(r,n).then((o=>{var s;const a={};o.eventBus={listeners:a,onPublishEvent:(e,t,n)=>{const i=a[t+"."+e.type]||[];i.push(...a["*."+e.type]||[]),i.forEach((t=>{const n=t.wcElement||o.querySelector("[nodeId="+t.wcElementId+"]");n?n.dispatchEvent(new CustomEvent(t.action,{detail:t.converter?t.converter(e.detail):e.detail})):console.debug("Could not find event target",t)}))}},null===(s=e.compound)||void 0===s||s.children.forEach(((e,t)=>{const i=Object.assign(Object.assign({},n),e.context),s=r.createCompoundItemContainer(e.layoutConfig);s.eventBus=o.eventBus,r.attachCompoundItem(o,s);const c=e.id||"gen_"+t;this.renderWebComponent(e.viewUrl,s,i,e,c,!0),K(a,e,c)})),t.appendChild(o),K(a,e.compound,"_root",o),i(o)})).catch((e=>{console.warn("Error: ",e),this.containerService.dispatch(Q.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,e)}))}))}}const Y=new class{constructor(){this.updateContext=(e,t,n)=>{if(n){const i=t||{};j.sendCustomMessageToIframe(n,{context:e,internal:i},P.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update context on inexisting iframe")},this.sendCustomMessage=(e,t,n,i,r)=>{if(n&&t._luigi_mfe_webcomponent)j.dispatch(e,t._luigi_mfe_webcomponent,r);else{const t=Object.assign({},r);t.id&&console.warn('Property "id" is reserved and can not be used in custom message data'),t.id=e,j.sendCustomMessageToIframe(i,t)}}}closeAlert(e,t,n){j.sendCustomMessageToIframe(n,{id:e,dismissKey:t},P.ALERT_CLOSED)}};function z(e){l(e,"svelte-1s382vm","main.svelte-1s382vm,iframe.svelte-1s382vm{width:100%;height:100%;border:none}main.lui-isolated.svelte-1s382vm{line-height:0}")}function J(e){let t,n=!e[2]&&ee(e);return{c(){n&&n.c(),t=m()},m(e,i){n&&n.m(e,i),d(e,t,i)},p(e,i){e[2]?n&&(n.d(1),n=null):n?n.p(e,i):(n=ee(e),n.c(),n.m(t.parentNode,t))},d(e){e&&h(t),n&&n.d(e)}}}function ee(e){let t,n;return{c(){t=E("iframe"),c(t.src,n=e[0])||p(t,"src",n),p(t,"title",e[1]),p(t,"class","svelte-1s382vm")},m(n,i){d(n,t,i),e[14](t)},p(e,i){1&i&&!c(t.src,n=e[0])&&p(t,"src",n),2&i&&p(t,"title",e[1])},d(n){n&&h(t),e[14](null)}}}function te(t){let n,i,r=t[5]&&J(t);return{c(){n=E("main"),r&&r.c(),p(n,"class",i=u(t[2]?void 0:"lui-isolated")+" svelte-1s382vm")},m(e,i){d(e,n,i),r&&r.m(n,null),t[15](n)},p(e,[t]){e[5]?r?r.p(e,t):(r=J(e),r.c(),r.m(n,null)):r&&(r.d(1),r=null),4&t&&i!==(i=u(e[2]?void 0:"lui-isolated")+" svelte-1s382vm")&&p(n,"class",i)},i:e,o:e,d(e){e&&h(n),r&&r.d(),t[15](null)}}}function ne(e,t,n){let i,{viewurl:r}=t,{context:o}=t,{label:s}=t,{webcomponent:a}=t,{deferInit:c}=t,{locale:u}=t,{theme:l}=t,{activeFeatureToggleList:d}=t,{skipInitCheck:h}=t,{nodeParams:E}=t,m={},p=!1;const _=new Z,T=e=>{if(!p){e.sendCustomMessage=(e,t)=>{Y.sendCustomMessage(e,i,!!a,m,t)},e.updateContext=(e,t)=>{Y.updateContext(e,t,m)},e.closeAlert=(e,t)=>{Y.closeAlert(e,t,m)},j.registerContainer(e),_.thisComponent=e;const t=o?JSON.parse(o):{};a&&(n(4,i.innerHTML="",i),_.renderWebComponent(r,i,t,{})),h?(e.initialized=!0,setTimeout((()=>{_.dispatchLuigiEvent(Q.INITIALIZED,{})}))):a&&i.addEventListener("wc_ready",(()=>{var t;(null===(t=i._luigi_mfe_webcomponent)||void 0===t?void 0:t.deferLuigiClientWCInit)||(e.initialized=!0,_.dispatchLuigiEvent(Q.INITIALIZED,{}))})),n(5,p=!0)}};var C;return $((async()=>{const e=i.getRootNode().host;e.iframeHandle=m,e.init=()=>{T(e)},c||T(e)})),C=async()=>{},g().$$.on_destroy.push(C),e.$$set=e=>{"viewurl"in e&&n(0,r=e.viewurl),"context"in e&&n(6,o=e.context),"label"in e&&n(1,s=e.label),"webcomponent"in e&&n(2,a=e.webcomponent),"deferInit"in e&&n(7,c=e.deferInit),"locale"in e&&n(8,u=e.locale),"theme"in e&&n(9,l=e.theme),"activeFeatureToggleList"in e&&n(10,d=e.activeFeatureToggleList),"skipInitCheck"in e&&n(11,h=e.skipInitCheck),"nodeParams"in e&&n(12,E=e.nodeParams)},[r,s,a,m,i,p,o,c,u,l,d,h,E,()=>u&&l&&d&&E,function(e){f[e?"unshift":"push"]((()=>{m.iframe=e,n(3,m)}))},function(e){f[e?"unshift":"push"]((()=>{i=e,n(4,i)}))}]}class ie extends M{constructor(e){super(),D(this,e,ne,te,o,{viewurl:0,context:6,label:1,webcomponent:2,deferInit:7,locale:8,theme:9,activeFeatureToggleList:10,skipInitCheck:11,nodeParams:12,unwarn:13},z)}get viewurl(){return this.$$.ctx[0]}set viewurl(e){this.$$set({viewurl:e}),v()}get context(){return this.$$.ctx[6]}set context(e){this.$$set({context:e}),v()}get label(){return this.$$.ctx[1]}set label(e){this.$$set({label:e}),v()}get webcomponent(){return this.$$.ctx[2]}set webcomponent(e){this.$$set({webcomponent:e}),v()}get deferInit(){return this.$$.ctx[7]}set deferInit(e){this.$$set({deferInit:e}),v()}get locale(){return this.$$.ctx[8]}set locale(e){this.$$set({locale:e}),v()}get theme(){return this.$$.ctx[9]}set theme(e){this.$$set({theme:e}),v()}get activeFeatureToggleList(){return this.$$.ctx[10]}set activeFeatureToggleList(e){this.$$set({activeFeatureToggleList:e}),v()}get skipInitCheck(){return this.$$.ctx[11]}set skipInitCheck(e){this.$$set({skipInitCheck:e}),v()}get nodeParams(){return this.$$.ctx[12]}set nodeParams(e){this.$$set({nodeParams:e}),v()}get unwarn(){return this.$$.ctx[13]}}function re(e){l(e,"svelte-7j5yk6","main.svelte-7j5yk6{width:100%;height:100%;border:none}")}function oe(t){let n;return{c(){n=E("main"),p(n,"class","svelte-7j5yk6")},m(e,i){d(e,n,i),t[7](n)},p:e,i:e,o:e,d(e){e&&h(n),t[7](null)}}}function se(e,t,n){let i,r,{viewurl:o}=t,{context:s}=t,{deferInit:a}=t,{compoundConfig:c}=t,{nodeParams:u}=t,l=!1;const d=new G,h=new Z,E=e=>{if(!c||l)return;const t=s?JSON.parse(s):{};n(1,a=!1);const u={compound:c,viewUrl:o||void 0,webcomponent:!0};h.renderWebComponentCompound(u,i,t).then((t=>{r=t,e.hasAttribute("skip-init-check")||!u.viewUrl?(e.initialized=!0,setTimeout((()=>{h.dispatchLuigiEvent(Q.INITIALIZED,{})}))):r.LuigiClient&&!r.deferLuigiClientWCInit&&(e.initialized=!0,h.dispatchLuigiEvent(Q.INITIALIZED,{}))})),l=!0};return $((async()=>{const e=i.getRootNode().host;e.init=()=>{E(e)},a||E(e),d.registerContainer(e),h.thisComponent=e})),e.$$set=e=>{"viewurl"in e&&n(2,o=e.viewurl),"context"in e&&n(3,s=e.context),"deferInit"in e&&n(1,a=e.deferInit),"compoundConfig"in e&&n(4,c=e.compoundConfig),"nodeParams"in e&&n(5,u=e.nodeParams)},[i,a,o,s,c,u,()=>u,function(e){f[e?"unshift":"push"]((()=>{i=e,n(0,i)}))}]}k(ie,{viewurl:{type:"String",reflect:!1,attribute:"viewurl"},context:{type:"String",reflect:!1,attribute:"context"},label:{type:"String",reflect:!1,attribute:"label"},webcomponent:{type:"String",reflect:!1,attribute:"webcomponent"},deferInit:{type:"Boolean",attribute:"defer-init"},locale:{type:"String",reflect:!1,attribute:"locale"},theme:{type:"String",reflect:!1,attribute:"theme"},activeFeatureToggleList:{type:"Array",reflect:!1,attribute:"active-feature-toggle-list"},skipInitCheck:{type:"Boolean",reflect:!1,attribute:"skip-init-check"},nodeParams:{type:"Object",reflect:!1,attribute:"node-params"}},[],["unwarn"],!0,(e=>{let t=e=>()=>console.warn(e+" can't be called on luigi-container before its micro frontend is attached to the DOM.");return class extends e{sendCustomMessage=t("sendCustomMessage");updateContext=t("updateContext");closeAlert=t("closeAlert");constructor(){super()}}}));class ae extends M{constructor(e){super(),D(this,e,se,oe,o,{viewurl:2,context:3,deferInit:1,compoundConfig:4,nodeParams:5,unwarn:6},re)}get viewurl(){return this.$$.ctx[2]}set viewurl(e){this.$$set({viewurl:e}),v()}get context(){return this.$$.ctx[3]}set context(e){this.$$set({context:e}),v()}get deferInit(){return this.$$.ctx[1]}set deferInit(e){this.$$set({deferInit:e}),v()}get compoundConfig(){return this.$$.ctx[4]}set compoundConfig(e){this.$$set({compoundConfig:e}),v()}get nodeParams(){return this.$$.ctx[5]}set nodeParams(e){this.$$set({nodeParams:e}),v()}get unwarn(){return this.$$.ctx[6]}}k(ae,{viewurl:{type:"String",reflect:!1,attribute:"viewurl"},context:{type:"String",reflect:!1,attribute:"context"},deferInit:{type:"Boolean",attribute:"defer-init"},compoundConfig:{type:"Object",reflect:!1,attribute:"compound-config"},nodeParams:{type:"Object",reflect:!1,attribute:"node-params"}},[],["unwarn"],!0);var ce=Q;customElements.get("luigi-container")||customElements.define("luigi-container",ie.element),customElements.get("luigi-compound-container")||customElements.define("luigi-compound-container",ae.element);export{ae as LuigiCompoundContainer,ie as LuigiContainer,ce as default};
|
|
2
2
|
//# sourceMappingURL=bundle.js.map
|
package/bundle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.js","sources":["../node_modules/svelte/internal/index.mjs","../src/constants/communication.ts","../src/constants/internal-communication.ts","../src/utilities/helpers.ts","../src/constants/core-api.ts","../src/services/container.service.ts","../src/services/web-component-helpers.ts","../src/services/webcomponents.service.ts","../src/LuigiContainer.svelte","../src/LuigiCompoundContainer.svelte","../src/main.js"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nlet src_url_equal_anchor;\nfunction src_url_equal(element_src, url) {\n if (!src_url_equal_anchor) {\n src_url_equal_anchor = document.createElement('a');\n }\n src_url_equal_anchor.href = url;\n return element_src === src_url_equal_anchor.href;\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn) {\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\nfunction get_all_dirty_from_scope($$scope) {\n if ($$scope.ctx.length > 32) {\n const dirty = [];\n const length = $$scope.ctx.length / 32;\n for (let i = 0; i < length; i++) {\n dirty[i] = -1;\n }\n return dirty;\n }\n return -1;\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\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;\nfunction start_hydrating() {\n is_hydrating = true;\n}\nfunction end_hydrating() {\n is_hydrating = false;\n}\nfunction upper_bound(low, high, key, value) {\n // Return first index of value larger than input value in the range [low, high)\n while (low < high) {\n const mid = low + ((high - low) >> 1);\n if (key(mid) <= value) {\n low = mid + 1;\n }\n else {\n high = mid;\n }\n }\n return low;\n}\nfunction init_hydrate(target) {\n if (target.hydrate_init)\n return;\n target.hydrate_init = true;\n // We know that all children have claim_order values since the unclaimed have been detached if target is not <head>\n let children = target.childNodes;\n // If target is <head>, there may be children without claim_order\n if (target.nodeName === 'HEAD') {\n const myChildren = [];\n for (let i = 0; i < children.length; i++) {\n const node = children[i];\n if (node.claim_order !== undefined) {\n myChildren.push(node);\n }\n }\n children = myChildren;\n }\n /*\n * Reorder claimed children optimally.\n * We can reorder claimed children optimally by finding the longest subsequence of\n * nodes that are already claimed in order and only moving the rest. The longest\n * subsequence of nodes that are claimed in order can be found by\n * computing the longest increasing subsequence of .claim_order values.\n *\n * This algorithm is optimal in generating the least amount of reorder operations\n * possible.\n *\n * Proof:\n * We know that, given a set of reordering operations, the nodes that do not move\n * always form an increasing subsequence, since they do not move among each other\n * meaning that they must be already ordered among each other. Thus, the maximal\n * set of nodes that do not move form a longest increasing subsequence.\n */\n // Compute longest increasing subsequence\n // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n const m = new Int32Array(children.length + 1);\n // Predecessor indices + 1\n const p = new Int32Array(children.length);\n m[0] = -1;\n let longest = 0;\n for (let i = 0; i < children.length; i++) {\n const current = children[i].claim_order;\n // Find the largest subsequence length such that it ends in a value less than our current value\n // upper_bound returns first greater value, so we subtract one\n // with fast path for when we are on the current longest subsequence\n const seqLen = ((longest > 0 && children[m[longest]].claim_order <= current) ? longest + 1 : upper_bound(1, longest, idx => children[m[idx]].claim_order, current)) - 1;\n p[i] = m[seqLen] + 1;\n const newLen = seqLen + 1;\n // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n m[newLen] = i;\n longest = Math.max(newLen, longest);\n }\n // The longest increasing subsequence of nodes (initially reversed)\n const lis = [];\n // The rest of the nodes, nodes that will be moved\n const toMove = [];\n let last = children.length - 1;\n for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n lis.push(children[cur - 1]);\n for (; last >= cur; last--) {\n toMove.push(children[last]);\n }\n last--;\n }\n for (; last >= 0; last--) {\n toMove.push(children[last]);\n }\n lis.reverse();\n // We sort the nodes being moved to guarantee that their insertion order matches the claim order\n toMove.sort((a, b) => a.claim_order - b.claim_order);\n // Finally, we move the nodes\n for (let i = 0, j = 0; i < toMove.length; i++) {\n while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {\n j++;\n }\n const anchor = j < lis.length ? lis[j] : null;\n target.insertBefore(toMove[i], anchor);\n }\n}\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction append_styles(target, style_sheet_id, styles) {\n const append_styles_to = get_root_for_style(target);\n if (!append_styles_to.getElementById(style_sheet_id)) {\n const style = element('style');\n style.id = style_sheet_id;\n style.textContent = styles;\n append_stylesheet(append_styles_to, style);\n }\n}\nfunction get_root_for_style(node) {\n if (!node)\n return document;\n const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n if (root && root.host) {\n return root;\n }\n return node.ownerDocument;\n}\nfunction append_empty_stylesheet(node) {\n const style_element = element('style');\n append_stylesheet(get_root_for_style(node), style_element);\n return style_element.sheet;\n}\nfunction append_stylesheet(node, style) {\n append(node.head || node, style);\n return style.sheet;\n}\nfunction append_hydration(target, node) {\n if (is_hydrating) {\n init_hydrate(target);\n if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentNode !== target))) {\n target.actual_end_child = target.firstChild;\n }\n // Skip nodes of undefined ordering\n while ((target.actual_end_child !== null) && (target.actual_end_child.claim_order === undefined)) {\n target.actual_end_child = target.actual_end_child.nextSibling;\n }\n if (node !== target.actual_end_child) {\n // We only insert if the ordering of this node should be modified or the parent node is not target\n if (node.claim_order !== undefined || node.parentNode !== target) {\n target.insertBefore(node, target.actual_end_child);\n }\n }\n else {\n target.actual_end_child = node.nextSibling;\n }\n }\n else if (node.parentNode !== target || node.nextSibling !== null) {\n target.appendChild(node);\n }\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction insert_hydration(target, node, anchor) {\n if (is_hydrating && !anchor) {\n append_hydration(target, node);\n }\n else if (node.parentNode !== target || node.nextSibling != anchor) {\n target.insertBefore(node, anchor || null);\n }\n}\nfunction detach(node) {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction trusted(fn) {\n return function (event) {\n // @ts-ignore\n if (event.isTrusted)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data_map(node, data_map) {\n Object.keys(data_map).forEach((key) => {\n set_custom_element_data(node, key, data_map[key]);\n });\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction init_claim_info(nodes) {\n if (nodes.claim_info === undefined) {\n nodes.claim_info = { last_index: 0, total_claimed: 0 };\n }\n}\nfunction claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {\n // Try to find nodes in an order such that we lengthen the longest increasing subsequence\n init_claim_info(nodes);\n const resultNode = (() => {\n // We first try to find an element after the previous one\n for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n return node;\n }\n }\n // Otherwise, we try to find one before\n // We iterate in reverse so that we don't go too far back\n for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n else if (replacement === undefined) {\n // Since we spliced before the last_index, we decrease it\n nodes.claim_info.last_index--;\n }\n return node;\n }\n }\n // If we can't find any matching node, we create a new one\n return createNode();\n })();\n resultNode.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n return resultNode;\n}\nfunction claim_element_base(nodes, name, attributes, create_element) {\n return claim_node(nodes, (node) => node.nodeName === name, (node) => {\n const remove = [];\n for (let j = 0; j < node.attributes.length; j++) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n remove.forEach(v => node.removeAttribute(v));\n return undefined;\n }, () => create_element(name));\n}\nfunction claim_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, element);\n}\nfunction claim_svg_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, svg_element);\n}\nfunction claim_text(nodes, data) {\n return claim_node(nodes, (node) => node.nodeType === 3, (node) => {\n const dataStr = '' + data;\n if (node.data.startsWith(dataStr)) {\n if (node.data.length !== dataStr.length) {\n return node.splitText(dataStr.length);\n }\n }\n else {\n node.data = dataStr;\n }\n }, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n );\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction find_comment(nodes, text, start) {\n for (let i = start; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n return i;\n }\n }\n return nodes.length;\n}\nfunction claim_html_tag(nodes, is_svg) {\n // find html opening tag\n const start_index = find_comment(nodes, 'HTML_TAG_START', 0);\n const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);\n if (start_index === end_index) {\n return new HtmlTagHydration(undefined, is_svg);\n }\n init_claim_info(nodes);\n const html_tag_nodes = nodes.splice(start_index, end_index - start_index + 1);\n detach(html_tag_nodes[0]);\n detach(html_tag_nodes[html_tag_nodes.length - 1]);\n const claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n for (const n of claimed_nodes) {\n n.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n }\n return new HtmlTagHydration(claimed_nodes, is_svg);\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n if (value === null) {\n node.style.removeProperty(key);\n }\n else {\n node.style.setProperty(key, value, important ? 'important' : '');\n }\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n select.selectedIndex = -1; // no option should be selected\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].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\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}</script>\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, bubbles, cancelable, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nfunction head_selector(nodeId, head) {\n const result = [];\n let started = 0;\n for (const node of head.childNodes) {\n if (node.nodeType === 8 /* comment node */) {\n const comment = node.textContent.trim();\n if (comment === `HEAD_${nodeId}_END`) {\n started -= 1;\n result.push(node);\n }\n else if (comment === `HEAD_${nodeId}_START`) {\n started += 1;\n result.push(node);\n }\n }\n else if (started > 0) {\n result.push(node);\n }\n }\n return result;\n}\nclass HtmlTag {\n constructor(is_svg = false) {\n this.is_svg = false;\n this.is_svg = is_svg;\n this.e = this.n = null;\n }\n c(html) {\n this.h(html);\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n if (this.is_svg)\n this.e = svg_element(target.nodeName);\n else\n this.e = element(target.nodeName);\n this.t = target;\n this.c(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nclass HtmlTagHydration extends HtmlTag {\n constructor(claimed_nodes, is_svg = false) {\n super(is_svg);\n this.e = this.n = null;\n this.l = claimed_nodes;\n }\n c(html) {\n if (this.l) {\n this.n = this.l;\n }\n else {\n super.c(html);\n }\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert_hydration(this.t, this.n[i], anchor);\n }\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\nfunction construct_svelte_component(component, props) {\n return new component(props);\n}\n\n// we need to store the information for multiple documents because a Svelte application could also contain iframes\n// https://github.com/sveltejs/svelte/issues/3624\nconst managed_styles = new Map();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_style_information(doc, node) {\n const info = { stylesheet: append_empty_stylesheet(node), rules: {} };\n managed_styles.set(doc, info);\n return info;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = get_root_for_style(node);\n const { stylesheet, rules } = managed_styles.get(doc) || create_style_information(doc, node);\n if (!rules[name]) {\n rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n managed_styles.forEach(info => {\n const { ownerNode } = info.stylesheet;\n // there is no ownerNode if it runs on jsdom.\n if (ownerNode)\n detach(ownerNode);\n });\n managed_styles.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\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#run-time-svelte-beforeupdate\n */\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\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 * `onMount` does not run inside a [server-side component](/docs#run-time-server-side-component-api).\n *\n * https://svelte.dev/docs#run-time-svelte-onmount\n */\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\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 */\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\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#run-time-svelte-ondestroy\n */\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\n/**\n * Creates an event dispatcher that can be used to dispatch [component events](/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 * https://svelte.dev/docs#run-time-svelte-createeventdispatcher\n */\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail, { cancelable = false } = {}) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail, { cancelable });\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n return !event.defaultPrevented;\n }\n return true;\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#run-time-svelte-setcontext\n */\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n return context;\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#run-time-svelte-getcontext\n */\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\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#run-time-svelte-getallcontexts\n */\nfunction getAllContexts() {\n return get_current_component().$$.context;\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#run-time-svelte-hascontext\n */\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\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\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n // @ts-ignore\n callbacks.slice().forEach(fn => fn.call(this, event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\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();\nlet flushidx = 0; // Do *not* move this inside the flush() function\nfunction flush() {\n const saved_component = current_component;\n do {\n // first, call beforeUpdate functions\n // and update components\n while (flushidx < dirty_components.length) {\n const component = dirty_components[flushidx];\n flushidx++;\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n flushidx = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n seen_callbacks.clear();\n set_current_component(saved_component);\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n else if (callback) {\n callback();\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n const options = { direction: 'in' };\n let config = fn(node, params, options);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n started = true;\n delete_rule(node);\n if (is_function(config)) {\n config = config(options);\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n const options = { direction: 'out' };\n let config = fn(node, params, options);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config(options);\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n const options = { direction: 'both' };\n let config = fn(node, params, options);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = (program.b - t);\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config(options);\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\nfunction update_await_block_branch(info, ctx, dirty) {\n const child_ctx = ctx.slice();\n const { resolved } = info;\n if (info.current === info.then) {\n child_ctx[info.value] = resolved;\n }\n if (info.current === info.catch) {\n child_ctx[info.error] = resolved;\n }\n info.block.p(child_ctx, dirty);\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'inert',\n 'ismap',\n 'itemscope',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\n/** regex of all html void element names */\nconst void_element_names = /^(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/;\nfunction is_void(name) {\n return void_element_names.test(name) || name.toLowerCase() === '!doctype';\n}\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, attrs_to_add) {\n const attributes = Object.assign({}, ...args);\n if (attrs_to_add) {\n const classes_to_add = attrs_to_add.classes;\n const styles_to_add = attrs_to_add.styles;\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n if (styles_to_add) {\n if (attributes.style == null) {\n attributes.style = style_object_to_string(styles_to_add);\n }\n else {\n attributes.style = style_object_to_string(merge_ssr_styles(attributes.style, styles_to_add));\n }\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${value}\"`;\n }\n });\n return str;\n}\nfunction merge_ssr_styles(style_attribute, style_directive) {\n const style_object = {};\n for (const individual_style of style_attribute.split(';')) {\n const colon_index = individual_style.indexOf(':');\n const name = individual_style.slice(0, colon_index).trim();\n const value = individual_style.slice(colon_index + 1).trim();\n if (!name)\n continue;\n style_object[name] = value;\n }\n for (const name in style_directive) {\n const value = style_directive[name];\n if (value) {\n style_object[name] = value;\n }\n else {\n delete style_object[name];\n }\n }\n return style_object;\n}\nconst ATTR_REGEX = /[&\"]/g;\nconst CONTENT_REGEX = /[&<]/g;\n/**\n * Note: this method is performance sensitive and has been optimized\n * https://github.com/sveltejs/svelte/pull/5701\n */\nfunction escape(value, is_attr = false) {\n const str = String(value);\n const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX;\n pattern.lastIndex = 0;\n let escaped = '';\n let last = 0;\n while (pattern.test(str)) {\n const i = pattern.lastIndex - 1;\n const ch = str[i];\n escaped += str.substring(last, i) + (ch === '&' ? '&' : (ch === '\"' ? '"' : '<'));\n last = i + 1;\n }\n return escaped + str.substring(last);\n}\nfunction escape_attribute_value(value) {\n // keep booleans, null, and undefined for the sake of `spread`\n const should_escape = typeof value === 'string' || (value && typeof value === 'object');\n return should_escape ? escape(value, true) : value;\n}\nfunction escape_object(obj) {\n const result = {};\n for (const key in obj) {\n result[key] = escape_attribute_value(obj[key]);\n }\n return result;\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules. Otherwise you may need to fix a <${name}>.`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(context || (parent_component ? parent_component.$$.context : [])),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n const assignment = (boolean && value === true) ? '' : `=\"${escape(value, true)}\"`;\n return ` ${name}${assignment}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\nfunction style_object_to_string(style_object) {\n return Object.keys(style_object)\n .filter(key => style_object[key])\n .map(key => `${key}: ${escape_attribute_value(style_object[key])};`)\n .join(' ');\n}\nfunction add_styles(style_object) {\n const styles = style_object_to_string(style_object);\n return styles ? ` style=\"${styles}\"` : '';\n}\n\nfunction bind(component, name, callback, value) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n if (value === undefined) {\n callback(component.$$.ctx[index]);\n }\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = component.$$.on_mount.map(run).filter(is_function);\n // if the component was destroyed immediately\n // it will update the `$$.on_destroy` reference to `null`.\n // the destructured on_destroy may still reference to the old array\n if (component.$$.on_destroy) {\n component.$$.on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: [],\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false,\n root: options.target || parent_component.$$.root\n };\n append_styles && append_styles($$.root);\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n start_hydrating();\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n end_hydrating();\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n if (!is_function(callback)) {\n return noop;\n }\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n if (!is_function(callback)) {\n return noop;\n }\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.55.0' }, detail), { bubbles: true }));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction append_hydration_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append_hydration(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction insert_hydration_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert_hydration(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\nfunction validate_dynamic_element(tag) {\n const is_string = typeof tag === 'string';\n if (tag && !is_string) {\n throw new Error('<svelte:element> expects \"this\" attribute to be a string.');\n }\n}\nfunction validate_void_dynamic_element(tag) {\n if (tag && is_void(tag)) {\n console.warn(`<svelte:element this=\"${tag}\"> is self-closing and cannot have content.`);\n }\n}\nfunction construct_svelte_component_dev(component, props) {\n const error_message = 'this={...} of <svelte:component> should specify a Svelte component.';\n try {\n const instance = new component(props);\n if (!instance.$$ || !instance.$set || !instance.$on || !instance.$destroy) {\n throw new Error(error_message);\n }\n return instance;\n }\n catch (err) {\n const { message } = err;\n if (typeof message === 'string' && message.indexOf('is not a constructor') !== -1) {\n throw new Error(error_message);\n }\n else {\n throw err;\n }\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * <script lang=\"ts\">\n * \timport { MyComponent } from \"component-library\";\n * </script>\n * <MyComponent foo={'bar'} />\n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to separate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, HtmlTagHydration, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_styles, add_transform, afterUpdate, append, append_dev, append_empty_stylesheet, append_hydration, append_hydration_dev, append_styles, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_html_tag, claim_space, claim_svg_element, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, construct_svelte_component, construct_svelte_component_dev, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, end_hydrating, escape, escape_attribute_value, escape_object, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getAllContexts, getContext, get_all_dirty_from_scope, get_binding_group_value, get_current_component, get_custom_elements_slots, get_root_for_style, get_slot_changes, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, head_selector, identity, init, insert, insert_dev, insert_hydration, insert_hydration_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, is_void, listen, listen_dev, loop, loop_guard, merge_ssr_styles, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_custom_element_data_map, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, src_url_equal, start_hydrating, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, trusted, update_await_block_branch, update_keyed_each, update_slot, update_slot_base, validate_component, validate_dynamic_element, validate_each_argument, validate_each_keys, validate_slots, validate_store, validate_void_dynamic_element, xlink_attr };\n",null,null,null,null,null,null,null,"<svelte:options tag={null} />\n\n<script lang=\"ts\">\n export let viewurl;\n export let context;\n export let label;\n export let webcomponent;\n\n let iframeHandle:\n | {\n iframe: HTMLIFrameElement;\n }\n | any = {};\n let mainComponent: HTMLElement;\n\n import { onMount, onDestroy } from 'svelte';\n import { get_current_component } from 'svelte/internal';\n import { ContainerService } from './services/container.service';\n import { WebComponentService } from './services/webcomponents.service';\n\n const containerService = new ContainerService();\n const webcomponentService = new WebComponentService();\n webcomponentService.createClientAPI = (eventBusElement, nodeId, wc_id) => {\n return {\n linkManager: () => {\n return {\n navigate: (route) => {\n dispatchLuigiEvent('navigation-request', { link: route });\n },\n };\n },\n uxManager: () => {\n return {\n showAlert: (alertSettings) => {\n dispatchLuigiEvent('alert-request', alertSettings);\n },\n showConfirmationModal: async (settings) => {\n return new Promise((resolve, reject) => {\n dispatchLuigiEvent('confirmation-request', settings, (data) => {\n if (data) {\n resolve(data);\n } else {\n reject();\n }\n });\n });\n },\n };\n }, //window.Luigi.ux,\n getCurrentLocale: () => {}, //() => window.Luigi.i18n().getCurrentLocale(),\n publishEvent: (ev) => {\n // if (eventBusElement.eventBus) {\n // eventBusElement.eventBus.onPublishEvent(ev, nodeId, wc_id);\n // }\n },\n };\n };\n\n const thisComponent: any = get_current_component();\n\n thisComponent.iframeHandle = iframeHandle;\n let deferInit: boolean = !!thisComponent.attributes['defer-init'];\n\n thisComponent.init = () => {\n deferInit = false;\n };\n\n thisComponent.sendCustomMessage = (id: string, data?: any) => {\n if (isWebComponent() && (mainComponent as any)._luigi_mfe_webcomponent) {\n containerService.dispatch(\n id,\n (mainComponent as any)._luigi_mfe_webcomponent,\n data\n );\n } else {\n const msg = { ...data };\n if (msg.id) {\n console.warn(\n 'Property \"id\" is reserved and can not be used in custom message data'\n );\n }\n msg.id = id;\n containerService.sendCustomMessageToIframe(iframeHandle, msg);\n }\n };\n\n containerService.registerContainer(thisComponent);\n\n function dispatchLuigiEvent(msg: string, data: any, callback?: Function) {\n containerService.dispatch(msg, thisComponent, data, callback);\n }\n\n function isWebComponent(): boolean {\n return !!webcomponent;\n }\n\n onMount(async () => {\n const ctx = context ? JSON.parse(context) : {};\n if (isWebComponent()) {\n mainComponent.innerHTML = '';\n webcomponentService.renderWebComponent(viewurl, mainComponent, ctx, {});\n }\n // deferInit = true;\n });\n\n onDestroy(async () => {});\n</script>\n\n<main\n bind:this={mainComponent}\n class={isWebComponent() ? undefined : 'lui-isolated'}\n>\n {#if !deferInit}\n {#if !isWebComponent()}\n <iframe bind:this={iframeHandle.iframe} src={viewurl} title={label} />\n {/if}\n {/if}\n</main>\n\n<style>\n main,\n iframe {\n width: 100%;\n height: 100%;\n border: none;\n }\n\n main.lui-isolated {\n line-height: 0;\n }\n</style>\n","<svelte:options tag={null} accessors={true} />\n\n<script lang=\"ts\">\n // export let viewurl;\n export let context;\n // export let label;\n let compoundConfig;\n\n let initialized = false;\n let mainComponent;\n let eventBusElement;\n\n import { onMount } from 'svelte';\n import { get_current_component } from 'svelte/internal';\n import { ContainerService } from './services/container.service';\n import { WebComponentService } from './services/webcomponents.service';\n\n const containerService = new ContainerService();\n const webcomponentService = new WebComponentService();\n webcomponentService.createClientAPI = (eventBusElement, nodeId, wc_id) => {\n return {\n linkManager: () => {}, //window.Luigi.navigation,\n uxManager: () => {\n return {\n showAlert: (alertSettings) => {\n dispatchLuigiEvent('alert-request', alertSettings, {});\n },\n showConfirmationModal: async (settings) => {\n return new Promise((resolve, reject) => {\n dispatchLuigiEvent('confirmation-request', settings, (data) => {\n if (data) {\n resolve(data);\n } else {\n reject();\n }\n });\n });\n },\n };\n }, //window.Luigi.ux,\n getCurrentLocale: () => {}, //() => window.Luigi.i18n().getCurrentLocale(),\n publishEvent: (ev) => {\n if (eventBusElement && eventBusElement.eventBus) {\n eventBusElement.eventBus.onPublishEvent(ev, nodeId, wc_id);\n }\n },\n };\n };\n\n const thisComponent = get_current_component();\n let deferInit = !!thisComponent.attributes['defer-init'];\n\n thisComponent.init = () => {\n if (!thisComponent.compoundConfig || initialized) return;\n deferInit = false;\n const node = {\n compound: thisComponent.compoundConfig,\n }; // TODO: fill with sth\n webcomponentService\n .renderWebComponentCompound(node, mainComponent, context)\n .then((compCnt) => {\n eventBusElement = compCnt;\n });\n\n initialized = true;\n };\n\n containerService.registerContainer(thisComponent);\n\n function dispatchLuigiEvent(msg, data, callback) {\n containerService.dispatch(msg, thisComponent, data, callback);\n }\n\n onMount(async () => {\n const ctx = context ? JSON.parse(context) : {};\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 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 default Events;\n\nif (!customElements.get('luigi-container')) {\n customElements.define('luigi-container', LuigiContainer);\n}\n\nif (!customElements.get('luigi-compound-container')) {\n customElements.define('luigi-compound-container', LuigiCompoundContainer);\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","insert","target","node","anchor","insertBefore","detach","parentNode","removeChild","element","name","empty","data","createTextNode","attr","attribute","value","removeAttribute","getAttribute","setAttribute","attribute_to_object","attributes","result","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","pop","i","callback","has","add","clear","fragment","before_update","dirty","p","ctx","after_update","outroing","make_dirty","then","fill","init","options","instance","create_fragment","not_equal","props","append_styles","parent_component","bound","on_destroy","on_disconnect","context","Map","callbacks","skip_bound","root","ready","ret","rest","hydrate","nodes","Array","from","childNodes","children","l","c","intro","block","delete","local","customElement","m","new_on_destroy","map","filter","mount_component","SvelteElement","Events","LuigiMessageID","HTMLElement","constructor","super","this","attachShadow","mode","connectedCallback","key","slotted","appendChild","attributeChangedCallback","_oldValue","newValue","disconnectedCallback","$destroy","detaching","d","destroy_component","$on","type","index","indexOf","splice","$set","$$props","obj","$$set","keys","GenericHelperFunctions","isFunction","functionToCheck","toString","call","LuigiCoreApi","ContainerService","isVisible","offsetWidth","offsetHeight","getClientRects","sendCustomMessageToIframe","iframeHandle","msg","iframe","contentWindow","iframeUrl","URL","src","postMessage","origin","console","error","dispatch","targetCnt","callbackName","customEvent","CustomEvent","detail","dispatchEvent","getTargetContainer","event","cnt","globalThis","__luigi_container_manager","container","source","getContainerManager","messageListener","CUSTOM_MESSAGE","GET_CONTEXT","GET_CONTEXT_REQUEST","log","SEND_CONTEXT","SEND_CONTEXT_TO_MICROFRONTEND","NAVIGATION_REQUEST","params","ALERT_REQUEST","INITIALIZED","ADD_SEARCH_PARAMS_REQUEST","keepBrowserHistory","ADD_NODE_PARAMS_REQUEST","SHOW_CONFIRMATION_MODAL_REQUEST","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","NAVIGATION_COMPLETED_REPORT","UPDATE_MODAL_PATH_DATA_REQUEST","CHECK_PATH_EXISTS_REQUEST","SET_DIRTY_STATUS_REQUEST","warn","window","addEventListener","registerContainer","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","WebComponentService","containerService","dynamicImport","viewUrl","__luigi_dyn_import","processViewUrl","attachWC","wc_id","wcItemPlaceholder","wc_container","contains","wc","initWC","replaceChild","_luigi_node","_luigi_mfe_webcomponent","createClientAPI","eventBusElement","linkManager","uxManager","showAlert","alertSettings","showConfirmationModal","async","settings","reject","getCurrentLocale","publishEvent","ev","clientAPI","__postProcess","baseURI","pathname","LuigiClient","generateWCId","charRep","charCodeAt","registerWCFromUrl","i18nViewUrl","checkWCUrl","module","customElements","get","cmpClazz","default","isPrototypeOf","define","e","catch","err","includeSelfRegisteredWCFromUrl","onload","_registerWebcomponent","srcString","scriptTag","webcomponent","body","renderWebComponent","tagName","luigiWCFn","selfRegistered","createCompoundContainerAsync","renderer","renderWebComponentCompound","slot","compound","ebListeners","eventBus","listeners","onPublishEvent","srcNodeId","wcId","querySelector","debug","id","undefined","mainComponent","viewurl","label","webcomponentService","navigate","route","dispatchLuigiEvent","link","thisComponent","deferInit","isWebComponent","sendCustomMessage","assign","JSON","parse","initialized","compoundConfig","compCnt","LuigiContainer","LuigiCompoundContainer"],"mappings":"AAAA,SAASA,KAgBT,SAASC,EAAIC,GACT,OAAOA,GACX,CACA,SAASC,IACL,OAAOC,OAAOC,OAAO,KACzB,CACA,SAASC,EAAQC,GACbA,EAAIC,QAAQP,EAChB,CACA,SAASQ,EAAYC,GACjB,MAAwB,mBAAVA,CAClB,CACA,SAASC,EAAeC,EAAGC,GACvB,OAAOD,GAAKA,EAAIC,GAAKA,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ACa3O,UAASC,EAAS6O,KAC3ByD,EAAmB,uBAAwB1D,GAAWrQ,IAChDA,EACFyB,EAAQzB,GAERsQ,YAOZC,wBACAC,aAAeC,IACTX,GAAmBA,EAAgBkD,UACrClD,EAAgBkD,SAASE,eAAezC,EAAItC,EAAQiB,YAMtD6E,EAAgBpT,aAoBbkT,EAAmB3L,EAAKpI,EAAMqC,GACrCyM,EAAiBhG,SAASV,EAAK6L,EAAejU,EAAMqC,UApBpC4R,EAAcxT,WAAW,cAE3CwT,EAAc9Q,cACP8Q,EAAcQ,gBAAkBD,eAE/BjV,GACJuT,SAAUmB,EAAcQ,gBAE1Bb,EACGhB,2BAA2BrT,EAAMkU,EAAe3P,GAChDb,MAAMyR,QAITF,GAAc,CAAI,EAGpB1F,EAAiBlD,kBAAkBqI,GAMnClT,cACc+C,GAAUwQ,KAAKC,MAAMzQ,gGAIpB2P,4bCzEjB,MAAehO,EAEV6L,eAAeC,IAAI,oBACtBD,eAAeK,OAAO,kBAAmBgD,GAGtCrD,eAAeC,IAAI,6BACtBD,eAAeK,OAAO,2BAA4BiD"}
|
|
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/communication.ts","../src/constants/internal-communication.ts","../node_modules/svelte/src/runtime/internal/disclose-version/index.js","../node_modules/svelte/src/shared/version.js","../src/utilities/helpers.ts","../src/constants/core-api.ts","../src/services/container.service.ts","../src/services/web-component-helpers.ts","../src/services/webcomponents.service.ts","../src/api/container-api.ts","../src/LuigiContainer.svelte","../src/LuigiCompoundContainer.svelte","../src/main.js"],"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](/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](/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 { ResizeObserverSingleton } from './ResizeObserverSingleton.js';\nimport { contenteditable_truthy_values, has_prop } from './utils.js';\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 myChildren = [];\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\tmyChildren.push(node);\n\t\t\t}\n\t\t}\n\t\tchildren = myChildren;\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 seqLen =\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[seqLen] + 1;\n\t\tconst newLen = seqLen + 1;\n\t\t// We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n\t\tm[newLen] = i;\n\t\tlongest = Math.max(newLen, 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 toMove = [];\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\ttoMove.push(children[last]);\n\t\t}\n\t\tlast--;\n\t}\n\tfor (; last >= 0; last--) {\n\t\ttoMove.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\ttoMove.sort((a, b) => a.claim_order - b.claim_order);\n\t// Finally, we move the nodes\n\tfor (let i = 0, j = 0; i < toMove.length; i++) {\n\t\twhile (j < lis.length && toMove[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(toMove[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\tif (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} processNode\n * @param {() => R} createNode\n * @param {boolean} dontUpdateLastIndex\n * @returns {R}\n */\nfunction claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = 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 resultNode = (() => {\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 = processNode(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 (!dontUpdateLastIndex) {\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 = processNode(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 (!dontUpdateLastIndex) {\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 createNode();\n\t})();\n\tresultNode.claim_order = nodes.claim_info.total_claimed;\n\tnodes.claim_info.total_claimed += 1;\n\treturn resultNode;\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 dataStr = '' + data;\n\t\t\tif (node.data.startsWith(dataStr)) {\n\t\t\t\tif (node.data.length !== dataStr.length) {\n\t\t\t\t\treturn node.splitText(dataStr.length);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnode.data = dataStr;\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\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\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/** @returns {void} */\nexport function init(\n\tcomponent,\n\toptions,\n\tinstance,\n\tcreate_fragment,\n\tnot_equal,\n\tprops,\n\tappend_styles,\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\tconst nodes = children(options.target);\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\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) {\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\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(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) {\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 Events {\n /**\n * A message emitted from the micro frontend when a custom message is sent\n */\n export const CUSTOM_MESSAGE = 'custom-message';\n /**\n * A message emitted from the micro frontend when the context data is sent\n */\n export const GET_CONTEXT_REQUEST = 'get-context-request';\n /**\n * A message emitted from the micro frontend when a navigation request is sent\n */\n export const NAVIGATION_REQUEST = 'navigation-request';\n /**\n * A message emitted from the micro frontend when a request to show an alert is sent\n */\n export const ALERT_REQUEST = 'show-alert-request';\n /**\n * A message emitted from the micro frontend when a request to show an alert is sent\n */\n export const ALERT_CLOSED = 'close-alert-request';\n /**\n * A message emitted from the micro frontend when it is first initialized\n */\n export const INITIALIZED = 'initialized';\n /**\n * A message emitted from the micro frontend to request adding search parameters to the URL\n */\n export const ADD_SEARCH_PARAMS_REQUEST = 'add-search-params-request';\n /**\n * A message emitted from the micro frontend to request adding node parameters to the URL\n */\n export const ADD_NODE_PARAMS_REQUEST = 'add-node-params-request';\n /**\n * A message emitted from the micro frontend when a request to show a confirmation modal is sent\n */\n export const SHOW_CONFIRMATION_MODAL_REQUEST = 'show-confirmation-modal-request';\n /**\n * A message emitted from the micro frontend when a request to show a loading indicator is sent\n */\n export const SHOW_LOADING_INDICATOR_REQUEST = 'show-loading-indicator-request';\n /**\n * A message emitted from the micro frontend when a request to hide the loading indicator is sent\n */\n export const HIDE_LOADING_INDICATOR_REQUEST = 'hide-loading-indicator-request';\n\n /**\n * A message emitted from the micro frontend when a request to set the current locale is sent\n */\n export const SET_CURRENT_LOCALE_REQUEST = 'set-current-locale-request';\n\n /**\n * A message emitted from the micro frontend when a request to modify the local storage is sent\n */\n export const LOCAL_STORAGE_SET_REQUEST = 'set-storage-request';\n\n /**\n * A message emitted from the micro frontend when a request to handle an error that happened during the runtime of the micro frontend is sent\n */\n export const RUNTIME_ERROR_HANDLING_REQUEST = 'runtime-error-handling-request';\n\n /**\n * A message emitted from the micro frontend when a request to set the anchor of the URL is sent\n */\n export const SET_ANCHOR_LINK_REQUEST = 'set-anchor-request';\n\n /**\n * A message emitted from the micro frontend when a request to set third-party cookies is sent\n */\n export const SET_THIRD_PARTY_COOKIES_REQUEST = 'set-third-party-cookies-request';\n\n /**\n * A message emitted from the micro frontend when a request to navigate back is sent\n */\n export const BACK_NAVIGATION_REQUEST = 'navigate-back-request';\n\n /**\n * A message emitted from the micro frontend when a request to receive the current app route is sent\n */\n export const GET_CURRENT_ROUTE_REQUEST = 'get-current-route-request';\n\n /**\n * A message emitted from the micro frontend to report that the navigation is completed is sent\n */\n export const NAVIGATION_COMPLETED_REPORT = 'report-navigation-completed-request';\n\n /**\n * A message emitted from the micro frontend when a request to update the modal path parameters is sent\n */\n export const UPDATE_MODAL_PATH_DATA_REQUEST = 'update-modal-path-data-request';\n\n /**\n * A message emitted from the micro frontend when a request to check on the validity of a path is sent\n */\n export const CHECK_PATH_EXISTS_REQUEST = 'check-path-exists-request';\n\n /**\n * A message emitted from the micro frontend when a request to set the 'dirty status' (eg: avoid closing if unsaved changes) is sent\n */\n export const SET_DIRTY_STATUS_REQUEST = 'set-dirty-status-request';\n\n // TODO: ignore auth\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 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 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 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 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 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}","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.0';\nexport const PUBLIC_VERSION = '4';\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 {any} functionToCheck function to check\n * @returns {boolean}\n */\n isFunction(functionToCheck: any): boolean {\n return functionToCheck && {}.toString.call(functionToCheck) === '[object Function]';\n }\n}\n\nexport const GenericHelperFunctions = new GenericHelpersClass();","export namespace LuigiCoreApi {\n /**\n * A message emmitted from the Microfrontend when a custom message is sent\n */\n export const SEND_CONTEXT_TO_MICROFRONTEND = 'sendContextToMicrofrontend';\n\n}","import { Events } from '../constants/communication';\r\nimport { LuigiInternalMessageID } from '../constants/internal-communication';\r\nimport { GenericHelperFunctions } from '../utilities/helpers';\r\nimport { LuigiCoreApi } from '../constants/core-api';\r\n\r\nexport class ContainerService {\r\n constructor() {}\r\n\r\n isVisible(component: HTMLElement) {\r\n return !!(component.offsetWidth || component.offsetHeight || component.getClientRects().length);\r\n }\r\n\r\n /**\r\n * Sends a message to the iframe either with the custom keyword or any other message name\r\n * @param iframeHandle the iframe to send the message to\r\n * @param msg the message to be sent\r\n * @param msgName the optional message name\r\n */\r\n sendCustomMessageToIframe(iframeHandle: any, msg: any, msgName?: string) {\r\n const messageName = msgName ? msgName : 'custom';\r\n if (iframeHandle.iframe.contentWindow) {\r\n const iframeUrl = new URL(iframeHandle.iframe.src);\r\n messageName === 'custom'\r\n ? iframeHandle.iframe.contentWindow.postMessage({ msg: messageName, data: msg }, iframeUrl.origin)\r\n : iframeHandle.iframe.contentWindow.postMessage({ msg: messageName, ...msg }, iframeUrl.origin);\r\n } else {\r\n console.error('Message target could not be resolved');\r\n }\r\n }\r\n\r\n /**\r\n * Dispatch an event to the given target container\r\n * @param {string} msg the event message\r\n * @param {HTMLElement} targetCnt the targeted HTML element onto which the event is dispatched\r\n * @param {any} data custom data added to the event to be dispatched\r\n * @param {Function} callback\r\n * @param {string} callbackName\r\n */\r\n dispatch(msg: string, targetCnt: HTMLElement, data: any, callback?: Function, callbackName?: string): void {\r\n let customEvent = new CustomEvent(msg, { detail: data });\r\n if (callback && GenericHelperFunctions.isFunction(callback) && callbackName) {\r\n (customEvent as any)[callbackName] = data => {\r\n callback(data);\r\n };\r\n }\r\n targetCnt.dispatchEvent(customEvent);\r\n }\r\n\r\n getTargetContainer(event) {\r\n let cnt;\r\n globalThis.__luigi_container_manager.container.forEach(element => {\r\n if (element.iframeHandle?.iframe && element.iframeHandle.iframe.contentWindow === event.source) {\r\n cnt = element;\r\n }\r\n });\r\n\r\n return cnt;\r\n }\r\n\r\n getContainerManager() {\r\n if (!globalThis.__luigi_container_manager) {\r\n globalThis.__luigi_container_manager = {\r\n container: [],\r\n messageListener: event => {\r\n const targetCnt = this.getTargetContainer(event);\r\n const target = targetCnt?.iframeHandle?.iframe?.contentWindow;\r\n if (target && target === event.source) {\r\n // messages emitted from microfrontends\r\n const msg = event.data.msg;\r\n\r\n // dispatch an event depending on message\r\n switch (msg) {\r\n case LuigiInternalMessageID.CUSTOM_MESSAGE:\r\n const evData = event.data.data;\r\n const id = evData.id;\r\n delete evData.id;\r\n this.dispatch(Events.CUSTOM_MESSAGE, targetCnt, {\r\n id: id,\r\n _metaData: {},\r\n data: evData\r\n });\r\n break;\r\n case LuigiInternalMessageID.GET_CONTEXT:\r\n // Automatically send a luigi.init message to complete the initial handshake with the microfrontend\r\n target.postMessage(\r\n {\r\n msg: LuigiInternalMessageID.SEND_CONTEXT_HANDSHAKE,\r\n context: targetCnt.context || {},\r\n internal: {}\r\n },\r\n '*'\r\n );\r\n break;\r\n case LuigiInternalMessageID.NAVIGATION_REQUEST:\r\n this.dispatch(Events.NAVIGATION_REQUEST, targetCnt, event.data.params);\r\n break;\r\n // TODO 1: handle alerts with ids on next iteration\r\n case LuigiInternalMessageID.ALERT_REQUEST:\r\n this.dispatch(Events.ALERT_REQUEST, targetCnt, event);\r\n break;\r\n case LuigiInternalMessageID.INITIALIZED:\r\n this.dispatch(Events.INITIALIZED, targetCnt, event.data.params);\r\n break;\r\n case LuigiInternalMessageID.ADD_SEARCH_PARAMS_REQUEST:\r\n this.dispatch(Events.ADD_SEARCH_PARAMS_REQUEST, targetCnt, {\r\n data: event.data.data,\r\n keepBrowserHistory: event.data.keepBrowserHistory\r\n });\r\n break;\r\n case LuigiInternalMessageID.ADD_NODE_PARAMS_REQUEST:\r\n this.dispatch(Events.ADD_NODE_PARAMS_REQUEST, targetCnt, {\r\n data: event.data.data,\r\n keepBrowserHistory: event.data.keepBrowserHistory\r\n });\r\n break;\r\n case LuigiInternalMessageID.SHOW_CONFIRMATION_MODAL_REQUEST:\r\n this.dispatch(Events.SHOW_CONFIRMATION_MODAL_REQUEST, targetCnt, event.data.data);\r\n break;\r\n case LuigiInternalMessageID.SHOW_LOADING_INDICATOR_REQUEST:\r\n this.dispatch(Events.SHOW_LOADING_INDICATOR_REQUEST, targetCnt, event);\r\n break;\r\n case LuigiInternalMessageID.HIDE_LOADING_INDICATOR_REQUEST:\r\n this.dispatch(Events.HIDE_LOADING_INDICATOR_REQUEST, targetCnt, event);\r\n break;\r\n case LuigiInternalMessageID.SET_CURRENT_LOCALE_REQUEST:\r\n this.dispatch(Events.SET_CURRENT_LOCALE_REQUEST, targetCnt, event);\r\n break;\r\n case LuigiInternalMessageID.LOCAL_STORAGE_SET_REQUEST:\r\n this.dispatch(Events.LOCAL_STORAGE_SET_REQUEST, targetCnt, event);\r\n break;\r\n case LuigiInternalMessageID.RUNTIME_ERROR_HANDLING_REQUEST:\r\n this.dispatch(Events.RUNTIME_ERROR_HANDLING_REQUEST, targetCnt, event);\r\n break;\r\n case LuigiInternalMessageID.SET_ANCHOR_LINK_REQUEST:\r\n this.dispatch(Events.SET_ANCHOR_LINK_REQUEST, targetCnt, event);\r\n break;\r\n case LuigiInternalMessageID.SET_THIRD_PARTY_COOKIES_REQUEST:\r\n this.dispatch(Events.SET_THIRD_PARTY_COOKIES_REQUEST, targetCnt, event);\r\n break;\r\n case LuigiInternalMessageID.BACK_NAVIGATION_REQUEST:\r\n this.dispatch(Events.BACK_NAVIGATION_REQUEST, targetCnt, event);\r\n break;\r\n case LuigiInternalMessageID.GET_CURRENT_ROUTE_REQUEST:\r\n this.dispatch(Events.GET_CURRENT_ROUTE_REQUEST, targetCnt, event);\r\n break;\r\n // TODO: discuss if actually needed as the only scenario is when microfrontend initially starts\r\n case LuigiInternalMessageID.NAVIGATION_COMPLETED_REPORT:\r\n this.dispatch(Events.NAVIGATION_COMPLETED_REPORT, targetCnt, event);\r\n break;\r\n case LuigiInternalMessageID.UPDATE_MODAL_PATH_DATA_REQUEST:\r\n this.dispatch(Events.UPDATE_MODAL_PATH_DATA_REQUEST, targetCnt, event);\r\n break;\r\n case LuigiInternalMessageID.CHECK_PATH_EXISTS_REQUEST:\r\n this.dispatch(Events.CHECK_PATH_EXISTS_REQUEST, targetCnt, event);\r\n break;\r\n case LuigiInternalMessageID.SET_DIRTY_STATUS_REQUEST:\r\n this.dispatch(Events.SET_DIRTY_STATUS_REQUEST, targetCnt, event);\r\n break;\r\n case 'luigi.third-party-cookie':\r\n // TODO: check if needed\r\n break;\r\n default:\r\n console.warn('Functionality not yet implemented: ', msg);\r\n break;\r\n }\r\n }\r\n }\r\n };\r\n window.addEventListener('message', globalThis.__luigi_container_manager.messageListener);\r\n }\r\n return globalThis.__luigi_container_manager;\r\n }\r\n\r\n registerContainer(container: HTMLElement): void {\r\n this.getContainerManager().container.push(container);\r\n }\r\n}\r\n\r\nexport const containerService = new ContainerService();\r\n","/**\r\n * Default compound renderer.\r\n */\r\nexport class DefaultCompoundRenderer {\r\n rendererObject: any;\r\n config: any;\r\n\r\n constructor(rendererObj?: any) {\r\n if (rendererObj) {\r\n this.rendererObject = rendererObj;\r\n this.config = rendererObj.config || {};\r\n } else {\r\n this.config = {};\r\n }\r\n }\r\n\r\n createCompoundContainer() {\r\n return document.createElement('div');\r\n }\r\n\r\n createCompoundItemContainer(layoutConfig?: any): HTMLDivElement {\r\n return document.createElement('div');\r\n }\r\n\r\n attachCompoundItem(compoundCnt, compoundItemCnt): void {\r\n compoundCnt.appendChild(compoundItemCnt);\r\n }\r\n}\r\n\r\n/**\r\n * Compound Renderer for custom rendering as defined in luigi config.\r\n */\r\nexport class CustomCompoundRenderer extends DefaultCompoundRenderer {\r\n superRenderer: DefaultCompoundRenderer | CustomCompoundRenderer | GridCompoundRenderer;\r\n\r\n constructor(rendererObj) {\r\n super(rendererObj || { use: {} });\r\n if (rendererObj && rendererObj.use && rendererObj.use.extends) {\r\n this.superRenderer = resolveRenderer({\r\n use: rendererObj.use.extends,\r\n config: rendererObj.config\r\n });\r\n }\r\n }\r\n\r\n createCompoundContainer(): HTMLDivElement {\r\n if (this.rendererObject.use.createCompoundContainer) {\r\n return this.rendererObject.use.createCompoundContainer(this.config, this.superRenderer);\r\n } else if (this.superRenderer) {\r\n return this.superRenderer.createCompoundContainer();\r\n }\r\n return super.createCompoundContainer();\r\n }\r\n\r\n createCompoundItemContainer(layoutConfig): HTMLDivElement {\r\n if (this.rendererObject.use.createCompoundItemContainer) {\r\n return this.rendererObject.use.createCompoundItemContainer(layoutConfig, this.config, this.superRenderer);\r\n } else if (this.superRenderer) {\r\n return this.superRenderer.createCompoundItemContainer(layoutConfig);\r\n }\r\n return super.createCompoundItemContainer(layoutConfig);\r\n }\r\n\r\n attachCompoundItem(compoundCnt, compoundItemCnt): void {\r\n if (this.rendererObject.use.attachCompoundItem) {\r\n this.rendererObject.use.attachCompoundItem(compoundCnt, compoundItemCnt, this.superRenderer);\r\n } else if (this.superRenderer) {\r\n this.superRenderer.attachCompoundItem(compoundCnt, compoundItemCnt);\r\n } else {\r\n super.attachCompoundItem(compoundCnt, compoundItemCnt);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Compound Renderer for a css grid compound view.\r\n */\r\nexport class GridCompoundRenderer extends DefaultCompoundRenderer {\r\n createCompoundContainer() {\r\n const containerClass = '__lui_compound_' + new Date().getTime();\r\n const compoundCnt = document.createElement('div');\r\n compoundCnt.classList.add(containerClass);\r\n let mediaQueries = '';\r\n\r\n if (this.config.layouts) {\r\n this.config.layouts.forEach(el => {\r\n if (el.minWidth || el.maxWidth) {\r\n let mq = '@media only screen ';\r\n if (el.minWidth != null) {\r\n mq += `and (min-width: ${el.minWidth}px) `;\r\n }\r\n if (el.maxWidth != null) {\r\n mq += `and (max-width: ${el.maxWidth}px) `;\r\n }\r\n\r\n mq += `{\r\n .${containerClass} {\r\n grid-template-columns: ${el.columns || 'auto'};\r\n grid-template-rows: ${el.rows || 'auto'};\r\n grid-gap: ${el.gap || '0'};\r\n }\r\n }\r\n `;\r\n mediaQueries += mq;\r\n }\r\n });\r\n }\r\n\r\n compoundCnt.innerHTML = /*html*/ `\r\n <style scoped>\r\n .${containerClass} {\r\n display: grid;\r\n grid-template-columns: ${this.config.columns || 'auto'};\r\n grid-template-rows: ${this.config.rows || 'auto'};\r\n grid-gap: ${this.config.gap || '0'};\r\n min-height: ${this.config.minHeight || 'auto'};\r\n }\r\n ${mediaQueries}\r\n </style>\r\n `;\r\n return compoundCnt;\r\n }\r\n\r\n createCompoundItemContainer(layoutConfig): HTMLDivElement {\r\n const config = layoutConfig || {};\r\n const compoundItemCnt = document.createElement('div');\r\n compoundItemCnt.setAttribute('style', `grid-row: ${config.row || 'auto'}; grid-column: ${config.column || 'auto'}`);\r\n return compoundItemCnt;\r\n }\r\n}\r\n\r\n/**\r\n * Returns the compound renderer class for a given config.\r\n * If no specific one is found, {DefaultCompoundRenderer} is returned.\r\n *\r\n * @param {*} rendererConfig the renderer config object defined in luigi config\r\n */\r\nexport const resolveRenderer = rendererConfig => {\r\n const rendererDef = rendererConfig.use;\r\n if (!rendererDef) {\r\n return new DefaultCompoundRenderer(rendererConfig);\r\n } else if (rendererDef === 'grid') {\r\n return new GridCompoundRenderer(rendererConfig);\r\n } else if (\r\n rendererDef.createCompoundContainer ||\r\n rendererDef.createCompoundItemContainer ||\r\n rendererDef.attachCompoundItem\r\n ) {\r\n return new CustomCompoundRenderer(rendererConfig);\r\n }\r\n return new DefaultCompoundRenderer(rendererConfig);\r\n};\r\n\r\n/**\r\n * Registers event listeners defined at the navNode.\r\n *\r\n * @param {*} eventbusListeners a map of event listener arrays with event id as key\r\n * @param {*} navNode the web component node configuration object\r\n * @param {*} nodeId the web component node id\r\n * @param {*} wcElement the web component element - optional\r\n */\r\nexport const registerEventListeners = (eventbusListeners, navNode, nodeId: string, wcElement?) => {\r\n if (navNode?.eventListeners) {\r\n navNode.eventListeners.forEach(el => {\r\n const evID = el.source + '.' + el.name;\r\n const listenerList = eventbusListeners[evID];\r\n const listenerInfo = {\r\n wcElementId: nodeId,\r\n wcElement: wcElement,\r\n action: el.action,\r\n converter: el.dataConverter\r\n };\r\n\r\n if (listenerList) {\r\n listenerList.push(listenerInfo);\r\n } else {\r\n eventbusListeners[evID] = [listenerInfo];\r\n }\r\n });\r\n }\r\n};\r\n\r\n/**\r\n * Desanitization of an object\r\n * @param {Object} paramsMap\r\n * @returns\r\n */\r\nexport const deSanitizeParamsMap = paramsMap => {\r\n return Object.entries(paramsMap).reduce((sanitizedMap, paramPair) => {\r\n sanitizedMap[deSanitizeParam(paramPair[0])] = deSanitizeParam(paramPair[1]);\r\n return sanitizedMap;\r\n }, {});\r\n};\r\n\r\nfunction deSanitizeParam(param: any) {\r\n let desani = (String as any)(param)\r\n .replaceAll('<', '<')\r\n .replaceAll('>', '>')\r\n .replaceAll('"', '\"')\r\n .replaceAll(''', \"'\")\r\n .replaceAll('/', '/');\r\n return desani;\r\n}\r\n","import {\r\n DefaultCompoundRenderer,\r\n resolveRenderer,\r\n registerEventListeners,\r\n deSanitizeParamsMap\r\n} from './web-component-helpers';\r\nimport { ContainerService } from './container.service';\r\nimport { Events } from '../constants/communication';\r\n\r\n/** Methods for dealing with web components based micro frontend handling */\r\nexport class WebComponentService {\r\n containerService: ContainerService;\r\n thisComponent: any;\r\n\r\n constructor() {\r\n this.containerService = new ContainerService();\r\n }\r\n\r\n dynamicImport(viewUrl: string) {\r\n // Object.freeze() used as potential marker for bundlers other than webpack\r\n return Object.freeze(import(/* webpackIgnore: true */ viewUrl));\r\n }\r\n\r\n processViewUrl(viewUrl: string, data?: any): string {\r\n return viewUrl;\r\n }\r\n\r\n /** Creates a web component with tagname wc_id and adds it to wcItemContainer,\r\n * if attached to wc_container\r\n */\r\n attachWC(\r\n wc_id: string,\r\n wcItemPlaceholder: HTMLDivElement,\r\n wc_container,\r\n ctx,\r\n viewUrl: string,\r\n nodeId: string,\r\n isSpecialMf?: boolean\r\n ) {\r\n if (wc_container && wc_container.contains(wcItemPlaceholder)) {\r\n const wc = document.createElement(wc_id);\r\n if (nodeId) {\r\n wc.setAttribute('nodeId', nodeId);\r\n }\r\n\r\n this.initWC(wc, wc_id, wc_container, viewUrl, ctx, nodeId, isSpecialMf);\r\n wc_container.replaceChild(wc, wcItemPlaceholder);\r\n if (wc_container._luigi_node) {\r\n wc_container._luigi_mfe_webcomponent = wc;\r\n }\r\n wc_container.dispatchEvent(new Event('wc_ready'));\r\n }\r\n }\r\n\r\n /**\r\n * Function that uses the current instance of the containerService to dispatch a Luigi event to the current instance of the container\r\n * that is 'thisComponent'\r\n * @param msg the message to be delivered\r\n * @param data the data to be sent\r\n * @param callback the callback function to be called\r\n */\r\n dispatchLuigiEvent(msg: string, data: any, callback?: Function) {\r\n this.containerService.dispatch(msg, this.thisComponent, data, callback);\r\n }\r\n\r\n /**\r\n * This function is used to create the Luigi Client API for the web-component-based micro frontend.\r\n * As the function expands with more functionality, it might be moved to a separate class.\r\n * @param eventBusElement the event bus to be used for cross web component communication, i.e.: for compound micro frontends container scenario\r\n * @param nodeId refers to an attribute of the web component to be identified from the rest\r\n * @param wc_id a tagname that is used when creating the web component element\r\n * @returns an object with the Luigi Client API\r\n */\r\n createClientAPI(eventBusElement, nodeId: string, wc_id: string, component: HTMLElement, isSpecialMf?: boolean) {\r\n return {\r\n linkManager: () => {\r\n return {\r\n navigate: route => {\r\n this.dispatchLuigiEvent(Events.NAVIGATION_REQUEST, { link: route });\r\n }\r\n };\r\n },\r\n uxManager: () => {\r\n return {\r\n showAlert: alertSettings => {\r\n this.dispatchLuigiEvent(Events.ALERT_REQUEST, alertSettings);\r\n },\r\n showConfirmationModal: async settings => {\r\n return new Promise((resolve, reject) => {\r\n this.dispatchLuigiEvent(Events.SHOW_CONFIRMATION_MODAL_REQUEST, settings, data => {\r\n if (data) {\r\n resolve(data);\r\n } else {\r\n reject();\r\n }\r\n });\r\n });\r\n },\r\n getCurrentTheme: () => {\r\n return this.thisComponent.getAttribute('theme');\r\n }\r\n };\r\n },\r\n getCurrentLocale: () => {\r\n return this.thisComponent.getAttribute('locale');\r\n },\r\n getActiveFeatureToggles: () => {\r\n return this.thisComponent.getAttribute('active-feature-toggle-list');\r\n },\r\n publishEvent: ev => {\r\n if (eventBusElement && eventBusElement.eventBus) {\r\n eventBusElement.eventBus.onPublishEvent(ev, nodeId, wc_id);\r\n }\r\n const payload = {\r\n id: ev.type,\r\n _metaData: {\r\n nodeId,\r\n wc_id,\r\n src: component\r\n },\r\n data: ev.detail\r\n };\r\n this.dispatchLuigiEvent(Events.CUSTOM_MESSAGE, payload);\r\n },\r\n luigiClientInit: () => {\r\n this.dispatchLuigiEvent(Events.INITIALIZED, {});\r\n },\r\n addNodeParams: (params, keepBrowserHistory) => {\r\n if (isSpecialMf) {\r\n return;\r\n }\r\n this.dispatchLuigiEvent(Events.ADD_NODE_PARAMS_REQUEST, { params, keepBrowserHistory });\r\n },\r\n getNodeParams: shouldDesanitise => {\r\n if (isSpecialMf) {\r\n return {};\r\n }\r\n let result = this.thisComponent.getAttribute('node-params') || {};\r\n result = JSON.parse(result);\r\n if (shouldDesanitise) {\r\n return deSanitizeParamsMap(result);\r\n }\r\n return result;\r\n },\r\n setAnchor: anchor => {\r\n if (isSpecialMf) {\r\n return;\r\n }\r\n this.dispatchLuigiEvent(Events.SET_ANCHOR_LINK_REQUEST, anchor);\r\n }\r\n };\r\n }\r\n\r\n initWC(wc: HTMLElement | any, wc_id, eventBusElement, viewUrl: string, ctx, nodeId: string, isSpecialMf?: boolean) {\r\n const clientAPI = this.createClientAPI(eventBusElement, nodeId, wc_id, wc, isSpecialMf);\r\n\r\n if (wc.__postProcess) {\r\n const url =\r\n new URL(document.baseURI).origin === new URL(viewUrl, document.baseURI).origin // TODO: check if needed\r\n ? new URL('./', new URL(viewUrl, document.baseURI))\r\n : new URL('./', viewUrl);\r\n wc.__postProcess(ctx, clientAPI, url.origin + url.pathname);\r\n } else {\r\n wc.context = ctx;\r\n wc.LuigiClient = clientAPI;\r\n }\r\n }\r\n\r\n /** Generates a unique web component id (tagname) based on the viewUrl\r\n * returns a string that can be used as part of a tagname, only alphanumeric\r\n * characters and no whitespaces.\r\n */\r\n generateWCId(viewUrl: string) {\r\n let charRep = '';\r\n let normalizedViewUrl = new URL(viewUrl, location.href).href;\r\n for (let i = 0; i < normalizedViewUrl.length; i++) {\r\n charRep += normalizedViewUrl.charCodeAt(i).toString(16);\r\n }\r\n return 'luigi-wc-' + charRep;\r\n }\r\n\r\n /** Does a module import from viewUrl and defines a new web component\r\n * with the default export of the module or the first export extending HTMLElement if no default is\r\n * specified.\r\n * @returns a promise that gets resolved after successfull import */\r\n registerWCFromUrl(viewUrl: string, wc_id: string) {\r\n const i18nViewUrl = this.processViewUrl(viewUrl);\r\n return new Promise((resolve, reject) => {\r\n if (this.checkWCUrl(i18nViewUrl)) {\r\n this.dynamicImport(i18nViewUrl)\r\n .then(module => {\r\n try {\r\n if (!window.customElements.get(wc_id)) {\r\n let cmpClazz = module.default;\r\n if (!HTMLElement.isPrototypeOf(cmpClazz)) {\r\n let props = Object.keys(module);\r\n for (let i = 0; i < props.length; i++) {\r\n cmpClazz = module[props[i]];\r\n if (HTMLElement.isPrototypeOf(cmpClazz)) {\r\n break;\r\n }\r\n }\r\n }\r\n window.customElements.define(wc_id, cmpClazz);\r\n }\r\n resolve(1);\r\n } catch (err) {\r\n reject(err);\r\n }\r\n })\r\n .catch(err => {\r\n reject(err);\r\n });\r\n } else {\r\n const message = `Error: View URL '${i18nViewUrl}' not allowed to be included`;\r\n reject(message);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Handles the import of self registered web component bundles, i.e. the web component\r\n * is added to the customElements registry by the bundle code rather than by luigi.\r\n *\r\n * @param {*} node the corresponding navigation node\r\n * @param {*} viewUrl the source of the wc bundle\r\n * @param {*} onload callback function executed after script attached and loaded\r\n */\r\n includeSelfRegisteredWCFromUrl(node, viewUrl, onload) {\r\n if (this.checkWCUrl(viewUrl)) {\r\n /** Append reg function to luigi object if not present */\r\n if (!this.containerService.getContainerManager()._registerWebcomponent) {\r\n this.containerService.getContainerManager()._registerWebcomponent = (srcString, el) => {\r\n window.customElements.define(this.generateWCId(srcString), el);\r\n };\r\n }\r\n\r\n let scriptTag = document.createElement('script');\r\n scriptTag.setAttribute('src', viewUrl);\r\n if (node.webcomponent.type === 'module') {\r\n scriptTag.setAttribute('type', 'module');\r\n }\r\n scriptTag.setAttribute('defer', 'true');\r\n scriptTag.addEventListener('load', () => {\r\n onload();\r\n });\r\n document.body.appendChild(scriptTag);\r\n } else {\r\n console.warn(`View URL '${viewUrl}' not allowed to be included`);\r\n }\r\n }\r\n\r\n /**\r\n * Checks if a url is allowed to be included, based on 'navigation.validWebcomponentUrls' in luigi config.\r\n * Returns true, if allowed.\r\n *\r\n * @param {*} url the url string to check\r\n */\r\n checkWCUrl(url: string) {\r\n // if (url.indexOf('://') > 0 || url.trim().indexOf('//') === 0) {\r\n // const ur = new URL(url);\r\n // if (ur.host === window.location.host) {\r\n // return true; // same host is okay\r\n // }\r\n\r\n // const valids = LuigiConfig.getConfigValue('navigation.validWebcomponentUrls');\r\n // if (valids && valids.length > 0) {\r\n // for (let el of valids) {\r\n // try {\r\n // if (new RegExp(el).test(url)) {\r\n // return true;\r\n // }\r\n // } catch (e) {\r\n // console.error(e);\r\n // }\r\n // }\r\n // }\r\n // return false;\r\n // }\r\n // relative URL is okay\r\n // if (url === 'test.js') {\r\n // return false;\r\n // }\r\n return true;\r\n }\r\n\r\n /** Adds a web component defined by viewUrl to the wc_container and sets the node context.\r\n * If the web component is not defined yet, it gets imported.\r\n */\r\n renderWebComponent(\r\n viewUrl: string,\r\n wc_container: HTMLElement | any,\r\n context: any,\r\n node: any,\r\n nodeId?: any,\r\n isSpecialMf?: boolean\r\n ) {\r\n const i18nViewUrl = this.processViewUrl(viewUrl, { context });\r\n const wc_id =\r\n node.webcomponent && node.webcomponent.tagName ? node.webcomponent.tagName : this.generateWCId(i18nViewUrl);\r\n const wcItemPlaceholder = document.createElement('div');\r\n wc_container.appendChild(wcItemPlaceholder);\r\n wc_container._luigi_node = node;\r\n\r\n if (window.customElements.get(wc_id)) {\r\n this.attachWC(wc_id, wcItemPlaceholder, wc_container, context, i18nViewUrl, nodeId, isSpecialMf);\r\n } else {\r\n /** Custom import function, if defined */\r\n if ((window as any).luigiWCFn) {\r\n (window as any).luigiWCFn(i18nViewUrl, wc_id, wcItemPlaceholder, () => {\r\n this.attachWC(wc_id, wcItemPlaceholder, wc_container, context, i18nViewUrl, nodeId, isSpecialMf);\r\n });\r\n } else if (node.webcomponent && node.webcomponent.selfRegistered) {\r\n this.includeSelfRegisteredWCFromUrl(node, i18nViewUrl, () => {\r\n this.attachWC(wc_id, wcItemPlaceholder, wc_container, context, i18nViewUrl, nodeId, isSpecialMf);\r\n });\r\n } else {\r\n this.registerWCFromUrl(i18nViewUrl, wc_id)\r\n .then(() => {\r\n this.attachWC(wc_id, wcItemPlaceholder, wc_container, context, i18nViewUrl, nodeId, isSpecialMf);\r\n })\r\n .catch(error => {\r\n console.warn('ERROR =>', error);\r\n // dispatch an error event to be handled core side\r\n this.containerService.dispatch(Events.RUNTIME_ERROR_HANDLING_REQUEST, this.thisComponent, error);\r\n });\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Creates a compound container according to the given renderer.\r\n * Returns a promise that gets resolved with the created container DOM element.\r\n *\r\n * @param {DefaultCompoundRenderer} renderer\r\n */\r\n createCompoundContainerAsync(renderer: any, ctx: any): Promise<HTMLElement> {\r\n return new Promise((resolve, reject) => {\r\n // remove after review\r\n // if (1) {\r\n // reject({ test: 'error' });\r\n // }\r\n if (renderer.viewUrl) {\r\n try {\r\n const wc_id = this.generateWCId(renderer.viewUrl);\r\n this.registerWCFromUrl(renderer.viewUrl, wc_id)\r\n .then(() => {\r\n const wc = document.createElement(wc_id);\r\n this.initWC(wc, wc_id, wc, renderer.viewUrl, ctx, '_root');\r\n resolve(wc);\r\n })\r\n .catch(error => {\r\n console.warn('Error: ', error);\r\n // dispatch an error event to be handled core side\r\n this.containerService.dispatch(Events.RUNTIME_ERROR_HANDLING_REQUEST, this.thisComponent, error);\r\n });\r\n } catch (error) {\r\n reject(error);\r\n }\r\n } else {\r\n resolve(renderer.createCompoundContainer());\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Responsible for rendering web component compounds based on a renderer or a nesting\r\n * micro frontend.\r\n *\r\n * @param {*} navNode the navigation node defining the compound\r\n * @param {HTMLElement} wc_container the web component container dom element\r\n * @param {*} context the luigi node context\r\n */\r\n renderWebComponentCompound(navNode, wc_container: HTMLElement, context) {\r\n let renderer;\r\n if (navNode.webcomponent && navNode.viewUrl) {\r\n renderer = new DefaultCompoundRenderer();\r\n renderer.viewUrl = this.processViewUrl(navNode.viewUrl, { context });\r\n renderer.createCompoundItemContainer = layoutConfig => {\r\n var cnt = document.createElement('div');\r\n if (layoutConfig && layoutConfig.slot) {\r\n cnt.setAttribute('slot', layoutConfig.slot);\r\n }\r\n return cnt;\r\n };\r\n } else if (navNode.compound?.renderer) {\r\n renderer = resolveRenderer(navNode.compound.renderer);\r\n }\r\n\r\n renderer = renderer || new DefaultCompoundRenderer();\r\n return new Promise(resolve => {\r\n this.createCompoundContainerAsync(renderer, context)\r\n .then((compoundCnt: HTMLElement) => {\r\n const ebListeners = {};\r\n (compoundCnt as any).eventBus = {\r\n listeners: ebListeners,\r\n onPublishEvent: (event, srcNodeId, wcId) => {\r\n const listeners = ebListeners[srcNodeId + '.' + event.type] || [];\r\n listeners.push(...(ebListeners['*.' + event.type] || []));\r\n\r\n listeners.forEach(listenerInfo => {\r\n const target =\r\n listenerInfo.wcElement || compoundCnt.querySelector('[nodeId=' + listenerInfo.wcElementId + ']');\r\n if (target) {\r\n target.dispatchEvent(\r\n new CustomEvent(listenerInfo.action, {\r\n detail: listenerInfo.converter ? listenerInfo.converter(event.detail) : event.detail\r\n })\r\n );\r\n } else {\r\n console.debug('Could not find event target', listenerInfo);\r\n }\r\n });\r\n }\r\n };\r\n navNode.compound?.children.forEach((wc, index) => {\r\n const ctx = { ...context, ...wc.context };\r\n const compoundItemCnt = renderer.createCompoundItemContainer(wc.layoutConfig);\r\n\r\n compoundItemCnt.eventBus = (compoundCnt as any).eventBus;\r\n renderer.attachCompoundItem(compoundCnt, compoundItemCnt);\r\n\r\n const nodeId = wc.id || 'gen_' + index;\r\n this.renderWebComponent(wc.viewUrl, compoundItemCnt, ctx, wc, nodeId, true);\r\n registerEventListeners(ebListeners, wc, nodeId);\r\n });\r\n wc_container.appendChild(compoundCnt);\r\n // listener for nesting wc\r\n registerEventListeners(ebListeners, navNode.compound, '_root', compoundCnt);\r\n resolve(compoundCnt);\r\n })\r\n .catch(error => {\r\n // dispatch an error event to be handled core sid\r\n console.warn('Error: ', error);\r\n this.containerService.dispatch(Events.RUNTIME_ERROR_HANDLING_REQUEST, this.thisComponent, error);\r\n });\r\n });\r\n }\r\n}\r\n","import { 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 */\n updateContext = (contextObj: any, internal?: any, iframeHandle?: any) => {\n if (iframeHandle) {\n const internalParameter = internal ? internal : {};\n containerService.sendCustomMessageToIframe(\n iframeHandle,\n {\n context: contextObj,\n internal: internalParameter,\n },\n LuigiInternalMessageID.SEND_CONTEXT_OBJECT\n );\n } else {\n console.warn('Attempting to update context on inexisting iframe');\n }\n }\n\n /**\n * Send a custom message to the referenced iframe or web component\n * @param id the id of the web component\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 = (id: string, mainComponent: any, isWebcomponent: boolean, iframeHandle: any, data?: any) => {\n if (isWebcomponent && (mainComponent as any)._luigi_mfe_webcomponent) {\n containerService.dispatch(\n id,\n (mainComponent as any)._luigi_mfe_webcomponent,\n data\n );\n } else {\n const msg = { ...data };\n if (msg.id) {\n console.warn(\n 'Property \"id\" is reserved and can not be used in custom message data'\n );\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\n * @param iframeHandle the handle of the iframe to send the message to \n */\n closeAlert(id: any, dismissKey: any, iframeHandle: any) {\n containerService.sendCustomMessageToIframe(iframeHandle, { id, dismissKey }, LuigiInternalMessageID.ALERT_CLOSED);\n }\n}\n\nexport const ContainerAPI = new ContainerAPIFunctions();","<svelte:options customElement={{\n tag: null,\n props: {\n viewurl: { type: 'String', reflect: false, attribute: 'viewurl' },\n deferInit: { type: 'Boolean', attribute: 'defer-init' },\n context: { type: 'String', reflect: false, attribute: 'context' },\n label: { type: 'String', reflect: false, attribute: 'label' },\n webcomponent: { type: 'String', reflect: false, attribute: 'webcomponent' }, \n locale: { type: 'String', reflect: false, attribute: 'locale' },\n theme: { type: 'String', reflect: false, attribute: 'theme' },\n activeFeatureToggleList: { type: 'Array', reflect: false, attribute: 'active-feature-toggle-list' },\n skipInitCheck: { type: 'Boolean', reflect: false, attribute: 'skip-init-check' },\n nodeParams: { type: 'Object', reflect: false, attribute: 'node-params' }\n },\n extend: (customElementConstructor) => {\n let notInitFn = (name) => {\n return () => 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 sendCustomMessage = notInitFn('sendCustomMessage');\n updateContext = notInitFn('updateContext');\n closeAlert = notInitFn('closeAlert');\n\n constructor() {\n super();\n }\n };\n }\n}} />\n\n\n<script lang=\"ts\">\n import { onMount, onDestroy } from 'svelte';\n import { containerService } from './services/container.service';\n import { WebComponentService } from './services/webcomponents.service';\n import { ContainerAPI } from './api/container-api';\n import { Events } from './constants/communication';\n\n export let viewurl: string;\n export let context: string;\n export let label: string;\n export let webcomponent: string;\n export let deferInit: boolean; \n export let locale: string;\n export let theme: string;\n export let activeFeatureToggleList: string[];\n export let skipInitCheck: boolean;\n export let nodeParams: any;\n\n let iframeHandle:\n | {\n iframe: HTMLIFrameElement;\n }\n | any = {};\n let mainComponent: HTMLElement;\n\n let containerInitialized = false;\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 locale && theme && activeFeatureToggleList && nodeParams;\n }\n\n const initialize = (thisComponent: any) => { \n if (!containerInitialized) {\n thisComponent.sendCustomMessage = (id: string, data?: any) => {\n ContainerAPI.sendCustomMessage(\n id,\n mainComponent,\n !!webcomponent,\n iframeHandle,\n data\n );\n };\n\n thisComponent.updateContext = (contextObj: any, internal?: any) => {\n ContainerAPI.updateContext(contextObj, internal, iframeHandle);\n };\n\n thisComponent.closeAlert = (id: any, dismissKey: any) => {\n ContainerAPI.closeAlert(id, dismissKey, iframeHandle);\n };\n\n containerService.registerContainer(thisComponent);\n webcomponentService.thisComponent = thisComponent;\n\n const ctx = context ? JSON.parse(context) : {};\n if (webcomponent) {\n mainComponent.innerHTML = '';\n webcomponentService.renderWebComponent(viewurl, mainComponent, ctx, {});\n }\n if (skipInitCheck) {\n thisComponent.initialized = true;\n setTimeout(() => {\n webcomponentService.dispatchLuigiEvent(Events.INITIALIZED, {});\n });\n } else if (webcomponent) {\n mainComponent.addEventListener('wc_ready', () => {\n if (\n !(mainComponent as any)._luigi_mfe_webcomponent\n ?.deferLuigiClientWCInit\n ) {\n thisComponent.initialized = true;\n webcomponentService.dispatchLuigiEvent(Events.INITIALIZED, {});\n }\n });\n }\n containerInitialized = true;\n }\n };\n\n onMount(async () => {\n const thisComponent: any = (mainComponent.getRootNode() as ShadowRoot).host;\n thisComponent.iframeHandle = iframeHandle;\n thisComponent.init = () => {\n initialize(thisComponent);\n };\n if (!deferInit) {\n initialize(thisComponent);\n }\n });\n\n onDestroy(async () => {});\n</script>\n\n<main\n bind:this={mainComponent}\n class={webcomponent ? undefined : 'lui-isolated'}\n>\n {#if containerInitialized}\n {#if !webcomponent}\n <iframe bind:this={iframeHandle.iframe} src={viewurl} title={label} />\n {/if}\n {/if}\n</main>\n\n<style>\n main,\n iframe {\n width: 100%;\n height: 100%;\n border: none;\n }\n\n main.lui-isolated {\n line-height: 0;\n }\n</style>\n","<svelte:options customElement={{\n tag: null,\n props: {\n viewurl: { type: 'String', reflect: false, attribute: 'viewurl' },\n deferInit: { type: 'Boolean', attribute: 'defer-init' },\n context: { type: 'String', reflect: false, attribute: 'context' },\n compoundConfig: { type: 'Object', reflect: false, attribute: 'compound-config' },\n nodeParams: { type: 'Object', reflect: false, attribute: 'node-params' }\n }\n}} />\n\n<script lang=\"ts\"> \n import { onMount } from 'svelte';\n import { ContainerService } from './services/container.service';\n import { WebComponentService } from './services/webcomponents.service';\n import { Events } from './constants/communication';\n\n export let viewurl: string;\n export let context: string;\n export let deferInit: boolean; \n export let compoundConfig: any;\n export let nodeParams: any;\n\n let containerInitialized = false;\n let mainComponent: HTMLElement;\n let eventBusElement: HTMLElement;\n\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 nodeParams;\n }\n\n const initialize = (thisComponent: any) => { \n if (!compoundConfig || containerInitialized) {\n return;\n }\n const ctx = context ? JSON.parse(context) : {};\n deferInit = false;\n const node = {\n compound: compoundConfig,\n viewUrl: viewurl ? viewurl : undefined,\n webcomponent: true\n }; // TODO: fill with sth\n webcomponentService\n .renderWebComponentCompound(node, mainComponent, ctx)\n .then(compCnt => {\n eventBusElement = compCnt as HTMLElement;\n if (thisComponent.hasAttribute('skip-init-check') || !node.viewUrl) {\n thisComponent.initialized = true;\n setTimeout(() => {\n webcomponentService.dispatchLuigiEvent(Events.INITIALIZED, {});\n });\n } else if (\n (eventBusElement as any).LuigiClient &&\n !(eventBusElement as any).deferLuigiClientWCInit\n ) {\n thisComponent.initialized = true;\n webcomponentService.dispatchLuigiEvent(Events.INITIALIZED, {});\n }\n });\n containerInitialized = true;\n }\n\n onMount(async () => {\n const thisComponent: any = (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 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 default Events;\n\nif (!customElements.get('luigi-container')) {\n customElements.define('luigi-container', LuigiContainer.element);\n}\n\nif (!customElements.get('luigi-compound-container')) {\n customElements.define('luigi-compound-container', LuigiCompoundContainer.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","null_to_empty","value","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","empty","data","createTextNode","attr","attribute","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","async","create_slot","existing_slots","result","slot","get_custom_elements_slots","attributes","$$g_p","shadowRoot","$$scope","reflect_attributes","reflect","attribute_value","attributeChangedCallback","_oldValue","newValue","disconnectedCallback","$destroy","undefined","attribute_name","find","SvelteComponent","$$set","index","splice","obj","Events","LuigiInternalMessageID","window","__svelte","v","CUSTOM_MESSAGE","GET_CONTEXT_REQUEST","NAVIGATION_REQUEST","ALERT_REQUEST","ALERT_CLOSED","INITIALIZED","ADD_SEARCH_PARAMS_REQUEST","ADD_NODE_PARAMS_REQUEST","SHOW_CONFIRMATION_MODAL_REQUEST","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","NAVIGATION_COMPLETED_REPORT","UPDATE_MODAL_PATH_DATA_REQUEST","CHECK_PATH_EXISTS_REQUEST","SET_DIRTY_STATUS_REQUEST","GET_CONTEXT","SEND_CONTEXT_HANDSHAKE","CONTEXT_RECEIVED","SEND_CONTEXT_OBJECT","GenericHelperFunctions","isFunction","functionToCheck","toString","call","LuigiCoreApi","SEND_CONTEXT_TO_MICROFRONTEND","ContainerService","isVisible","offsetWidth","offsetHeight","getClientRects","sendCustomMessageToIframe","iframeHandle","msg","msgName","messageName","iframe","contentWindow","iframeUrl","URL","src","postMessage","origin","assign","console","error","dispatch","targetCnt","callbackName","customEvent","CustomEvent","detail","dispatchEvent","getTargetContainer","event","cnt","globalThis","__luigi_container_manager","container","_a","source","getContainerManager","messageListener","_b","evData","_metaData","internal","params","keepBrowserHistory","warn","registerContainer","containerService","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","param","String","replaceAll","WebComponentService","dynamicImport","viewUrl","freeze","import","processViewUrl","attachWC","wc_id","wcItemPlaceholder","wc_container","isSpecialMf","contains","wc","initWC","replaceChild","_luigi_node","_luigi_mfe_webcomponent","Event","dispatchLuigiEvent","thisComponent","createClientAPI","eventBusElement","linkManager","navigate","route","link","uxManager","showAlert","alertSettings","showConfirmationModal","settings","reject","getCurrentTheme","getCurrentLocale","getActiveFeatureToggles","publishEvent","ev","eventBus","onPublishEvent","payload","luigiClientInit","addNodeParams","getNodeParams","shouldDesanitise","paramsMap","entries","reduce","sanitizedMap","paramPair","setAnchor","clientAPI","__postProcess","baseURI","pathname","LuigiClient","generateWCId","charRep","normalizedViewUrl","location","charCodeAt","registerWCFromUrl","i18nViewUrl","checkWCUrl","module","customElements","cmpClazz","default","isPrototypeOf","define","err","catch","includeSelfRegisteredWCFromUrl","onload","_registerWebcomponent","srcString","scriptTag","webcomponent","body","renderWebComponent","tagName","luigiWCFn","selfRegistered","createCompoundContainerAsync","renderer","renderWebComponentCompound","compound","ebListeners","listeners","srcNodeId","wcId","querySelector","debug","ContainerAPI","updateContext","contextObj","internalParameter","sendCustomMessage","mainComponent","isWebcomponent","closeAlert","dismissKey","create_if_block_1","iframe_src_value","create_if_block","main","viewurl","$$props","label","deferInit","locale","theme","activeFeatureToggleList","skipInitCheck","nodeParams","containerInitialized","webcomponentService","initialize","initialized","setTimeout","deferLuigiClientWCInit","$$invalidate","$$value","compoundConfig","compCnt","hasAttribute","customElementConstructor","notInitFn","LuigiContainer","LuigiCompoundContainer"],"mappings":"AACO,S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VxH,QAASuG,QAAoBzP,EAC7B4N,cAAc,GAEhBuC,EACG/B,2BAA2BvZ,EAAMoa,EAAelW,GAChDa,MAAK+W,IACJtG,EAAkBsG,EACdxG,EAAcyG,aAAa,qBAAuB/b,EAAKqU,SACzDiB,EAAckG,aAAc,EAC5BC,YAAU,KACRH,EAAoBjG,mBAAmB1J,EAAOU,YAAW,CAAA,EAAA,KAG1DmJ,EAAwBiC,cACvBjC,EAAwBkG,yBAE1BpG,EAAckG,aAAc,EAC5BF,EAAoBjG,mBAAmB1J,EAAOU,YAAW,CAAA,OAG/DgP,GAAuB,CAAI,SAG7BlZ,GAAO8H,UACC,MAAAqL,EAAsB8E,EAAcla,cAA6BE,KAEvEkV,EAAcrQ,KAAI,KAChBsW,EAAWjG,EAAa,EAErByF,GACHQ,EAAWjG,GAGbxE,EAAiBD,kBAAkByE,GACnCgG,EAAoBhG,cAAgBA,CAAa,sNA9ChC,IACV8F,0CAiDMhB,EAAawB,goBDpEnBI,IACD,IAAAC,EAAa3a,GACA,IAAA6N,QAAQyB,KAAKtP,EAAO,8GAEhB0a,EACnB7B,kBAAoB8B,EAAU,qBAC9BjC,cAAgBiC,EAAU,iBAC1B3B,WAAa2B,EAAU,cAEvBhU,cACEC,q6BEnBV,IAAAyD,GAAeA,EAEVwM,eAAexP,IAAI,oBACtBwP,eAAeI,OAAO,kBAAmB2D,GAAe1b,SAGrD2X,eAAexP,IAAI,6BACtBwP,eAAeI,OAAO,2BAA4B4D,GAAuB3b"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export namespace Events {
|
|
2
|
+
/**
|
|
3
|
+
* A message emmitted from the Microfrontend when a custom message is sent
|
|
4
|
+
*/
|
|
5
|
+
export const CUSTOM_MESSAGE = 'custom-message';
|
|
6
|
+
/**
|
|
7
|
+
* A message emmitted from the Microfrontend when the context data is sent
|
|
8
|
+
*/
|
|
9
|
+
export const GET_CONTEXT_REQUEST = 'get-context-request';
|
|
10
|
+
/**
|
|
11
|
+
* A message emmitted from the Microfrontend when a navigation request is sent
|
|
12
|
+
*/
|
|
13
|
+
export const NAVIGATION_REQUEST = 'navigation-request';
|
|
14
|
+
/**
|
|
15
|
+
* A message emmitted from the Microfrontend when a request to show an alert is sent
|
|
16
|
+
*/
|
|
17
|
+
export const ALERT_REQUEST = 'show-alert-request';
|
|
18
|
+
/**
|
|
19
|
+
* A message emmitted from the Microfrontend when it is first initialized
|
|
20
|
+
*/
|
|
21
|
+
export const INITIALIZED = 'initialized';
|
|
22
|
+
/**
|
|
23
|
+
* A message emmitted from the Microfrontend to request adding search parameters to the URL
|
|
24
|
+
*/
|
|
25
|
+
export const ADD_SEARCH_PARAMS_REQUEST = 'add-search-params-request';
|
|
26
|
+
/**
|
|
27
|
+
* A message emmitted from the Microfrontend to request adding node parameters to the URL
|
|
28
|
+
*/
|
|
29
|
+
export const ADD_NODE_PARAMS_REQUEST = 'add-node-params-request';
|
|
30
|
+
/**
|
|
31
|
+
* A message emmitted from the Microfrontend when a request to show an confirmation modal is sent
|
|
32
|
+
*/
|
|
33
|
+
export const SHOW_CONFIRMATION_MODAL_REQUEST = 'show-confirmation-modal-request';
|
|
34
|
+
/**
|
|
35
|
+
* A message emmitted from the Microfrontend when a request to show loading indicator is sent
|
|
36
|
+
*/
|
|
37
|
+
export const SHOW_LOADING_INDICATOR_REQUEST = 'show-loading-indicator-request';
|
|
38
|
+
/**
|
|
39
|
+
* A message emmitted from the Microfrontend when a request to hide the loading indicator is sent
|
|
40
|
+
*/
|
|
41
|
+
export const HIDE_LOADING_INDICATOR_REQUEST = 'hide-loading-indicator-request';
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* A message emmitted from the Microfrontend when a request to set the current locale is sent
|
|
45
|
+
*/
|
|
46
|
+
export const SET_CURRENT_LOCALE_REQUEST = 'set-current-locale-request';
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* A message emmitted from the Microfrontend when a request to modify the local storage is sent
|
|
50
|
+
*/
|
|
51
|
+
export const LOCAL_STORAGE_SET_REQUEST = 'set-storage-request';
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* A message emmitted from the Microfrontend when a request to handle an error that happened during the runtime on the microfrontend is sent
|
|
55
|
+
*/
|
|
56
|
+
export const RUNTIME_ERROR_HANDLING_REQUEST = 'runtime-error-handling-request';
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* A message emmitted from the Microfrontend when a request to set the anchor of the URL is sent
|
|
60
|
+
*/
|
|
61
|
+
export const SET_ANCHOR_LINK_REQUEST = 'set-anchor-request';
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* A message emmitted from the Microfrontend when a request to set third party cookies is sent
|
|
65
|
+
*/
|
|
66
|
+
export const SET_THIRD_PARTY_COOKIES_REQUEST = 'set-third-party-cookies-request';
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* A message emmitted from the Microfrontend when a request to navigate back is sent
|
|
70
|
+
*/
|
|
71
|
+
export const BACK_NAVIGATION_REQUEST = 'navigate-back-request';
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* A message emmitted from the Microfrontend when a request to receive the current app route is sent
|
|
75
|
+
*/
|
|
76
|
+
export const GET_CURRENT_ROUTE_REQUEST = 'get-current-route-request';
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* A message emmitted from the Microfrontend to report that the navigation is completed is sent
|
|
80
|
+
*/
|
|
81
|
+
export const NAVIGATION_COMPLETED_REPORT = 'report-navigation-completed-request';
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* A message emmitted from the Microfrontend when a request to update the modal path parameters is sent
|
|
85
|
+
*/
|
|
86
|
+
export const UPDATE_MODAL_PATH_DATA_REQUEST = 'update-modal-path-data-request';
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* A message emmitted from the Microfrontend when a request to check on the validity of a path is sent
|
|
90
|
+
*/
|
|
91
|
+
export const CHECK_PATH_EXISTS_REQUEST = 'check-path-exists-request';
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* A message emmitted from the Microfrontend when a request to set the 'dirty status' (ex: avoid closing if usaved changes) is sent
|
|
95
|
+
*/
|
|
96
|
+
export const SET_DIRTY_STATUS_REQUEST = 'set-dirty-status-request';
|
|
97
|
+
}
|
package/index.d.ts
CHANGED
package/package.json
CHANGED