@luigi-project/core-modular 0.0.1-dev.20260181313 → 0.0.1-dev.20260210053

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/luigi.js CHANGED
@@ -1,27 +1,53 @@
1
- var pi=Object.defineProperty;var vt=i=>{throw TypeError(i)};var mi=(i,e,t)=>e in i?pi(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var A=(i,e,t)=>mi(i,typeof e!="symbol"?e+"":e,t),Ct=(i,e,t)=>e.has(i)||vt("Cannot "+t);var H=(i,e,t)=>(Ct(i,e,"read from private field"),t?t.call(i):e.get(i)),et=(i,e,t)=>e.has(i)?vt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),tt=(i,e,t,n)=>(Ct(i,e,"write to private field"),n?n.call(i,t):e.set(i,t),t);const _i={luigi:{button:{confirm:"Yes",dismiss:"No"},confirmationModal:{body:"Are you sure you want to do this?",header:"Confirmation"},navigation:{up:"Up"},notExactTargetNode:"Could not map the exact target node for the requested route {route}.",requestedRouteNotFound:"Could not find the requested route {route}.",unsavedChangesAlert:{body:"Unsaved changes will be lost. Do you want to continue?",header:"Unsaved changes detected"}}},Si=_i,Be={sanitizeHtml(i=""){return i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/javascript:/g,"")},restoreSanitizedBrs(i=""){return i.replace(/&lt;br\/&gt;/g,"<br>").replace(/&lt;br \/&gt;/g,"<br>").replace(/&lt;br&gt;/g,"<br>").replace(/&lt;br &gt;/g,"<br>")},restoreSanitizedElements(i=""){let e=i;const t=["i","b","br","mark","strong","em","small","del","ins","sub","sup"];for(let n=0;n<t.length;n++){const r=new RegExp(`&lt;${t[n]}/&gt;`,"g"),s=new RegExp(`&lt;${t[n]} /&gt;`,"g"),a=new RegExp(`&lt;${t[n]}&gt;`,"g"),o=new RegExp(`&lt;${t[n]} &gt;`,"g"),l=new RegExp(`&lt;/${t[n]}[/]&gt;`,"g"),c=new RegExp(`&lt;/${t[n]} [/]&gt;`,"g"),f=new RegExp(`&lt;[/]${t[n]}&gt;`,"g"),h=new RegExp(`&lt;[/]${t[n]} &gt;`,"g");e=e.replace(r,`<${t[n]}>`).replace(s,`<${t[n]}>`).replace(a,`<${t[n]}>`).replace(o,`<${t[n]}>`).replace(l,`</${t[n]}>`).replace(c,`</${t[n]}>`).replace(f,`</${t[n]}>`).replace(h,`</${t[n]}>`)}return e},sanatizeHtmlExceptTextFormatting(i=""){return this.restoreSanitizedElements(this.sanitizeHtml(i))},sanitizeParam(i=""){return String(i).replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/\//g,"&sol;")},escapeKeyForRegexp(i=""){return i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},processTextAndLinks(i="",e,t){const r={sanitizedText:this.restoreSanitizedBrs(this.sanitizeHtml(i)),links:[]};return e?Object.entries(e).reduce((s,[a,o])=>{const l=`_luigi_alert_${t}_link_${this.sanitizeParam(a)}`,c=this.restoreSanitizedBrs(this.sanitizeHtml(o.text)),f=`<a id="${l}">${c}</a>`,h=this.escapeKeyForRegexp(a),u=new RegExp(`({${h}})`,"g");return{sanitizedText:s.sanitizedText.replace(u,f),links:s.links.concat({elemId:l,url:o.url?encodeURI(this.sanitizeHtml(o.url)):void 0,dismissKey:o.dismissKey?encodeURI(this.sanitizeHtml(o.dismissKey)):void 0})}},r):r}},v={getRandomId:()=>window.crypto.getRandomValues(new Uint32Array(1))[0],isPromise:i=>i&&v.isFunction(i.then),isFunction:i=>i&&{}.toString.call(i)==="[object Function]",isString:i=>typeof i=="string"||i instanceof String,isObject:i=>!!(i&&typeof i=="object"&&!Array.isArray(i)),trimLeadingSlash:i=>v.isString(i)?i.replace(/^\/+/g,""):"",trimTrailingSlash:i=>v.isString(i)?i.replace(/\/+$/,""):"",isElementVisible:i=>i?window.getComputedStyle(i).getPropertyValue("display")!=="none":!1,getNodeList:(i,e=!1)=>{const t=[];return i&&Array.from(document.querySelectorAll(i)).forEach(r=>{e?v.isElementVisible(r)&&t.push(r):t.push(r)}),t},prependOrigin:i=>{if(!i||i.startsWith("http"))return i;const e=i.startsWith("/");return i.length?window.location.origin+(e?"":"/")+i:window.location.origin},getConfigValueFromObject:(i,e)=>{let t=0,n=i;const r=e.split(".");for(;n&&t<r.length;)n=n[r[t++]];return n},getConfigBooleanValue:(i,e)=>{const t=v.getConfigValueFromObject(i,e);return t===!0||t==="true"},getUrlParameter:i=>new URLSearchParams(window.location.search).get(i)};class Ei{constructor(e){this.luigi=e,this.currentLocaleStorageKey="luigi.currentLocale",this.defaultLocale="en",this.listeners={},this.translationTable=Si}_init(){this._initCustomImplementation(),this.addCurrentLocaleChangeListener(e=>{this.broadcastLocaleToAllContainers(e)})}getCurrentLocale(){return sessionStorage.getItem(this.currentLocaleStorageKey)||this.defaultLocale}setCurrentLocale(e,t){var n,r;if(!((n=t==null?void 0:t.clientPermissions)!=null&&n.changeCurrentLocale)){console.error('Current locale change declined from client, as client permission "changeCurrentLocale" is not set for this view.');return}e&&(t&&(t.locale=e),sessionStorage.setItem(this.currentLocaleStorageKey,e),this._notifyLocaleChange(e)),(r=this.luigi.getEngine()._connector)==null||r.setCurrentLocale(e)}addCurrentLocaleChangeListener(e){let t=null;return v.isFunction(e)?(t=v.getRandomId(),this.listeners[t]=e):console.error("Provided locale change listener is not a function."),t}removeCurrentLocaleChangeListener(e){e&&this.listeners[e]?delete this.listeners[e]:console.error("Unable to remove locale change listener - no listener registered for given ID.")}getTranslation(e,t=void 0,n=void 0){if(!e)return"";if(this.translationImpl){const s=this.translationImpl.getTranslation(e,t,n);if(s!==e)return s}const r=this.findTranslation(e,this.translationTable,t);return r||e}_notifyLocaleChange(e){Object.getOwnPropertyNames(this.listeners).forEach(t=>{this.listeners[Number(t)](e)}),this.luigi.configChanged()}_initCustomImplementation(){this.translationImpl=this.luigi.getConfigValue("settings.customTranslationImplementation"),v.isFunction(this.translationImpl)&&(this.translationImpl=this.translationImpl())}broadcastLocaleToAllContainers(e){const t=v.getNodeList("luigi-container[lui_container]");t!=null&&t.length&&e&&t.forEach(n=>{n.locale=e,n.updateContext({locale:e})})}findTranslation(e,t,n){const r=e.split(".");for(let s=0;s<r.length;s++){const a=r[s];if(Object.prototype.hasOwnProperty.call(t,a)&&typeof t[a]=="object")t=t[a];else return n?this.findInterpolations(t[a],n):t[a]}}findInterpolations(e,t){return typeof e!="string"||!e.trim()||Object.keys(t).forEach(n=>{e=e.replace(new RegExp("{"+Be.escapeKeyForRegexp(n)+"}","gi"),t[n])}),e}}const Ue={wrapAsPromise:i=>new Promise(e=>{e(i)}),applyFunctionPromisified:(i,e)=>(i=i.apply(void 0,e),v.isPromise(i)?i:Ue.wrapAsPromise(i)),getConfigValueFromObjectAsync:(i,e,...t)=>{const n=v.getConfigValueFromObject(i,e);return v.isFunction(n)?Ue.applyFunctionPromisified(n,t):Ue.wrapAsPromise(n)}};class vi{constructor(){this.featureToggleList=new Set}setFeatureToggle(e,t=!1){this.isValid(e)&&(e.startsWith("!")&&!t||this.isDuplicatedOrDisabled(e)||this.featureToggleList.add(e))}unsetFeatureToggle(e){if(this.isValid(e)){if(!this.featureToggleList.has(e)){console.warn("Feature toggle name is not in the list.");return}this.featureToggleList.delete(e)}}getActiveFeatureToggleList(){return[...Array.from(this.featureToggleList)].filter(t=>!t.startsWith("!"))}isValid(e){return v.isString(e)?!0:(console.warn("Feature toggle name is not valid or not of type 'string'"),!1)}isDuplicatedOrDisabled(e){return this.featureToggleList.has(e)?(console.warn("Feature toggle name already exists"),!0):this.featureToggleList.has(`!${e}`)?(console.warn("Disabled feature toggle can not be activated"),!0):!1}}class ye{constructor(e){this.luigi=e,this._modalStack=[],this.modalSettings={}}async closeModals(){if(this._modalStack.length===0)return;const e=[...this._modalStack];for(const{onInternalClose:t}of e)try{typeof t=="function"&&t()}catch(n){console.warn("onInternalClose threw an error",n)}this.clearModalStack()}registerModal(e){e&&this._modalStack.push(e)}getModalSettings(){return this._modalStack.length>0?this._modalStack[0].modalsettings||{}:{}}getModalStackLength(){return this._modalStack.length}updateFirstModalSettings(e){if(this._modalStack.length>0){const t=this._modalStack[0];t.modalsettings={...t.modalsettings,...e}}}clearModalStack(){this._modalStack=[]}removeLastModalFromStack(){this._modalStack.pop()}}class Ci{constructor(e){this.$subscribers=new Set,this.$value=e}set(e){this.$value=e,this.$subscribers.forEach(t=>{t(e)})}update(e){this.set(e(this.$value))}subscribe(e){return this.$subscribers.add(e),e(this.$value),()=>{this.$subscribers.delete(e)}}}function Mt(i){return i.$value}function je(i){return new Ci(i)}class Ti{setErrorMessage(e){var t,n;(n=(t=this.getLuigi().getEngine())==null?void 0:t._connector)==null||n.showFatalError(e)}getLuigi(){return window.Luigi}getConfigValue(e){return this.getLuigi().getConfigValue(e)}getConfigValueAsync(e){return this.getLuigi().getConfigValueAsync(e)}async executeConfigFnAsync(e,t=!1,...n){const r=this.getConfigValue(e);if(v.isFunction(r))try{return await Ue.applyFunctionPromisified(r,n)}catch(s){if(t)return Promise.reject(s)}return Promise.resolve(void 0)}}const F=new Ti;class wi{constructor(){this._internalStorage={},this._defaultStorage="localStorage",this._authKey="luigi.auth",this._newlyAuthorizedKey="luigi.newlyAuthorized",this._invalidStorageMsg="Configuration Error: Invalid auth.storage value defined. Must be one of localStorage, sessionStorage or none."}reset(){this._storageType=void 0}getStorageKey(){return this._authKey}getStorageType(){return this._storageType||(this._storageType=F.getConfigValue("auth.storage")||this._defaultStorage),this._storageType}getAuthData(){return this._getStore(this.getStorageKey())}setAuthData(e){this._setStore(this.getStorageKey(),e)}removeAuthData(){this._setStore(this.getStorageKey(),void 0)}isNewlyAuthorized(){return!!this._getStore(this._newlyAuthorizedKey)}setNewlyAuthorized(){this._setStore(this._newlyAuthorizedKey,!0)}removeNewlyAuthorized(){this._setStore(this._newlyAuthorizedKey,void 0)}_getWebStorage(e){return window[e]}_setStore(e,t){switch(this.getStorageType()){case"localStorage":case"sessionStorage":t!==void 0?this._getWebStorage(this.getStorageType()).setItem(e,JSON.stringify(t)):this._getWebStorage(this.getStorageType()).removeItem(e);break;case"none":this._internalStorage[e]=t;break;default:console.error(this._invalidStorageMsg)}}_getStore(e){try{switch(this.getStorageType()){case"localStorage":case"sessionStorage":return JSON.parse(this._getWebStorage(this.getStorageType()).getItem(e));case"none":return this._internalStorage[e];default:console.error(this._invalidStorageMsg)}}catch{console.warn("Error parsing authorization data. Auto-logout might not work!")}}}const q=new wi;class yi{constructor(){this._userInfoStore=je({}),this._loggedInStore=je(!1)}setUserInfo(e){this._userInfoStore.set(e)}setLoggedIn(e){this._loggedInStore.set(e)}getUserInfoStore(){return this._userInfoStore}getLoggedInStore(){return this._loggedInStore}async init(){const e=F.getConfigValue("auth.use");if(!e)return Promise.resolve(!0);const t=F.getConfigValue(`auth.${e}`),n=ce.parseUrlAuthErrors()||{};if(await ce.handleUrlAuthErrors(t,n.error,n.errorDescription))return this.idpProviderInstance=this.getIdpProviderInstance(e,t),v.isPromise(this.idpProviderInstance)?this.idpProviderInstance.then(s=>(this.idpProviderInstance=s,this.checkAuth(t))).catch(s=>{const a=`Error: ${s.message||s}`;console.error(a,s.message&&s),F.setErrorMessage(a)}):this.checkAuth(t)}async checkAuth(e){const t=ce.getStoredAuthData();if(!t||!ce.isLoggedIn()){if(F.getConfigValue("auth.disableAutoLogin"))return;let r=!0;return t&&(r=await Se.handleAuthEvent("onAuthExpired",e)),r?this.startAuthorization():void 0}this.idpProviderInstance.settings&&v.isFunction(this.idpProviderInstance.settings.userInfoFn)?this.idpProviderInstance.settings.userInfoFn(this.idpProviderInstance.settings,t).then(r=>{this.setUserInfo(r),this.setLoggedIn(!0)}):v.isFunction(this.idpProviderInstance.userInfo)?this.idpProviderInstance.userInfo(e).then(r=>{this.setUserInfo(r),this.setLoggedIn(!0)}):(this.setLoggedIn(!0),this.setUserInfo(Mt(this._userInfoStore))),v.isFunction(F.getConfigValue("auth.events.onAuthSuccessful"))&&q.isNewlyAuthorized()&&await Se.handleAuthEvent("onAuthSuccessful",e,t),q.removeNewlyAuthorized(),v.isFunction(this.idpProviderInstance.setTokenExpirationAction)&&this.idpProviderInstance.setTokenExpirationAction(),v.isFunction(this.idpProviderInstance.setTokenExpireSoonAction)&&this.idpProviderInstance.setTokenExpireSoonAction()}async startAuthorization(){if(this.idpProviderInstance)return this.idpProviderInstance.login().then(e=>{q.setNewlyAuthorized(),e&&console.error(e)})}logout(){const e=ce.getStoredAuthData(),t=async s=>{await Se.handleAuthEvent("onLogout",this.idpProviderInstance.settings,void 0,s),q.removeAuthData()},n=F.getConfigValue(`auth.${F.getConfigValue("auth.use")}.logoutFn`),r=F.getConfigValueAsync("navigation.profile.logout.customLogoutFn");v.isFunction(n)?n(this.idpProviderInstance.settings,e,t):v.isFunction(this.idpProviderInstance.logout)?this.idpProviderInstance.logout(e,t):r&&v.isFunction(r)?r(e,t):t(this.idpProviderInstance.settings.logoutUrl)}createIdpProviderException(e){return{message:e,name:"IdpProviderException"}}async getIdpProviderInstance(e,t){const n=v.getConfigValueFromObject(t,"idpProvider");if(n){const s=await new n(t);return["login"].forEach(a=>{if(!v.isFunction(s[a]))throw this.createIdpProviderException(`${a} function does not exist in custom IDP Provider ${e}`)}),s}if(v.isFunction(F.getConfigValue("auth.events.onAuthConfigError")))await Se.handleAuthEvent("onAuthConfigError",{idpProviderName:e,type:"IdpProviderException"});else throw this.createIdpProviderException(`IDP Provider ${e} does not exist.`)}unload(){this.idpProviderInstance&&v.isFunction(this.idpProviderInstance.unload)&&this.idpProviderInstance.unload()}resetExpirationChecks(){this.idpProviderInstance&&v.isFunction(this.idpProviderInstance.resetExpirationChecks)&&this.idpProviderInstance.resetExpirationChecks()}}const ve=new yi;class bi{isAuthorizationEnabled(){return!!F.getConfigValue("auth.use")}login(){this.isAuthorizationEnabled()&&ve.startAuthorization()}logout(){this.isAuthorizationEnabled()&&ve.logout()}async handleAuthEvent(e,t,n,r){const s=await F.executeConfigFnAsync("auth.events."+e,!1,t,n),a=s===void 0||!!s;if(a&&r){window.location.href=r;return}return a}get store(){var e;return(e=F.getLuigi())!=null&&e.initialized||console.warn("Luigi Core is not initialized yet. Consider moving your code to the luigiAfterInit lifecycle hook. Documentation: https://docs.luigi-project.io/docs/lifecycle-hooks"),{getStorageKey:()=>q.getStorageKey(),getStorageType:()=>q.getStorageType(),getAuthData:()=>q.getAuthData(),setAuthData:t=>q.setAuthData(t),removeAuthData:()=>q.removeAuthData(),setNewlyAuthorized:()=>{q.setNewlyAuthorized(),ve.resetExpirationChecks()}}}}const Se=new bi;class Ri{getStoredAuthData(){return q.getAuthData()}isLoggedIn(){const e=this.getStoredAuthData();return!!(e&&e.accessTokenExpirationDate>Number(new Date))}parseUrlAuthErrors(){const e=v.getUrlParameter("error"),t=v.getUrlParameter("errorDescription");if(e)return{error:e,errorDescription:t}}async handleUrlAuthErrors(e,t,n){return t?await Se.handleAuthEvent("onAuthError",e,{error:t,errorDescription:n},e.logoutUrl+"?post_logout_redirect_uri="+e.post_logout_redirect_uri+"&error="+t+"&errorDescription="+n):!0}}const ce=new Ri,M={normalizePath:i=>{if(!i||i.length<=0)return i;let e=i;return e.startsWith("#")&&(e=e.substring(1)),e.startsWith("/")&&(e=e.substring(1)),e},segmentMatches:(i,e,t)=>!!(i===e||e.startsWith(":")&&t&&t[e.substr(1)]===i),checkMatch:(i,e,t)=>{let n=!0;return v.trimTrailingSlash(v.trimLeadingSlash(i)).split("/").forEach((r,s)=>{var a,o;n&&(s+1>=e.length||!((a=e[s+1])!=null&&a.pathSegment)||!M.segmentMatches(r,((o=e[s+1])==null?void 0:o.pathSegment)??"",t??{}))&&(n=!1)}),n},checkVisibleForFeatureToggles:(i,e)=>{if(i!=null&&i.visibleForFeatureToggles){const t=(e==null?void 0:e.getActiveFeatureToggleList())||[];for(const n of i.visibleForFeatureToggles)if(n.startsWith("!")){if(t.includes(n.slice(1)))return!1}else if(!t.includes(n))return!1}return!0},generateTooltipText:(i,e,t)=>{let n=i==null?void 0:i.tooltipText;switch(n===void 0&&(n=t.getConfigValue("navigation.defaults.tooltipText")),n){case void 0:return e;case!1:return"";default:return t.i18n().getTranslation(n)}},isNodeAccessPermitted:(i,e,t,n)=>{if(n.auth().isAuthorizationEnabled()){const a=ce.isLoggedIn(),o=i.anonymousAccess;if(a&&o==="exclusive"||!a&&o!=="exclusive"&&o!==!0)return!1}const r=n.featureToggles();if(!M.checkVisibleForFeatureToggles(i,r))return!1;const s=n.getConfigValue("navigation.nodeAccessibilityResolver");return typeof s!="function"?!0:s(i,e,t)},updateHeaderTitle:(i,e)=>{const t=i==null?void 0:i.items;if(t&&e){let n="";return[...t].sort((r,s)=>(s.link||"").localeCompare(r.link||"")).some(r=>{let s=!1;if(s=M.checkMatch(r.link||"",e.nodesInPath??[]),!s&&r.selectionConditions&&r.selectionConditions.route&&(s=M.checkMatch(r.selectionConditions.route,e.nodesInPath??[]),s&&(r.selectionConditions.contextCriteria||[]).forEach(a=>{var o,l;s=s&&((l=(o=e==null?void 0:e.selectedNode)==null?void 0:o.context)==null?void 0:l[a.key])===a.value})),s)return n=r.title||"",!0}),n}},buildPath(i,e){return i.map(n=>{var s;const r=n.pathSegment;if(r!=null&&r.startsWith(":")){const a=r.slice(1),o=(s=e==null?void 0:e.pathParams)==null?void 0:s[a];if(o!=null)return encodeURIComponent(String(o))}return r}).join("/")},mergeContext(...i){return Object.assign({},...i)},prepareForTests(...i){let e="";return i.forEach(t=>{t&&(e+=(e?"_":"")+encodeURIComponent(t.toLowerCase().split(" ").join("")))}),e}},C={defaultContentViewParamPrefix:"~",defaultQueryParamSeparator:"?",defaultModalViewParamName:"modal",addParamsOnHashRouting(i,e,t){let n=e;const[r,s]=n.split("?"),a=new URLSearchParams(s);return this.modifySearchParams(i,a,t),n=r,a.toString()!==""&&(n+=`?${a.toString()}`),n},modifySearchParams(i,e,t){for(const[n,r]of Object.entries(i)){const s=t?`${t}${n}`:n;e.set(s,r),r===void 0&&e.delete(s)}},filterNodeParams(i,e){const t={},n=this.getContentViewParamPrefix(e);return i&&Object.entries(i).forEach(r=>{if(r[0].startsWith(n)){const s=r[0].substr(n.length);t[s]=r[1]}}),this.sanitizeParamsMap(t)},getContentViewParamPrefix(i){let e=i==null?void 0:i.getConfigValue("routing.nodeParamPrefix");return e===!1?e="":e||(e=this.defaultContentViewParamPrefix),e},sanitizeParamsMap(i){return Object.entries(i).reduce((e,t)=>(e[Be.sanitizeParam(t[0])]=Be.sanitizeParam(t[1]),e),{})},prepareSearchParamsForClient(i,e){const t={};return i&&i.clientPermissions&&i.clientPermissions.urlParameters&&Object.keys(i.clientPermissions.urlParameters).forEach(n=>{var r,s;n in e.routing().getSearchParams()&&((r=i.clientPermissions)!=null&&r.urlParameters)&&((s=i.clientPermissions.urlParameters[n])==null?void 0:s.read)===!0&&(t[n]=e.routing().getSearchParams()[n])}),t},getCurrentPath(i){if(i){const e=M.normalizePath(location.hash),[t,n]=e.split("?");return{path:t,query:n}}else return{path:M.normalizePath(location.pathname),query:location.search}},getModalPathFromPath(i){return this.getQueryParam(this.getModalViewParamName(i),i)},getQueryParam(i,e){return this.getQueryParams(e)[i]},getQueryParams(i){return i.getConfigValue("routing.useHashRouting")?this.getLocationHashQueryParams():this.getLocationSearchQueryParams()},getLocationSearchQueryParams(){return C.getLocation().search?C.parseParams(C.getLocation().search.slice(1)):{}},getLocation(){return location},getLocationHashQueryParams(){const i=C.getLocation().hash.indexOf(this.defaultQueryParamSeparator);return i!==-1?C.parseParams(C.getLocation().hash.slice(i+1)):{}},getModalViewParamName(i){let e=i.getConfigValue("routing.modalPathParam");return e||(e=this.defaultModalViewParamName),e},parseParams(i){const e=new URLSearchParams(i),t=new Map;for(const[n,r]of e.entries())t.set(n,r);return Object.fromEntries(t)},getModalParamsFromPath(i){const e=this.getQueryParam(`${this.getModalViewParamName(i)}Params`,i);return e&&JSON.parse(e)},getHashQueryParamSeparator(){return this.defaultQueryParamSeparator},getURLWithoutModalData(i,e){const t=new URLSearchParams(i);return t.delete(e),t.delete(`${e}Params`),t.toString()},handleHistoryState(i,e){return i&&i.modalHistoryLength?i.modalHistoryLength+=1:i={modalHistoryLength:1,historygap:history.length,pathBeforeHistory:e},i},encodeParams(i){const e=[];for(const t in i)e.push(encodeURIComponent(t)+"="+encodeURIComponent(i[t]));return e.join("&")},getLastNodeObject(i){return(i.nodesInPath?[...i.nodesInPath].pop():{})||{}},checkWCUrl(i,e){if(i.indexOf("://")>0||i.trim().indexOf("//")===0){if(new URL(i).host===window.location.host)return!0;const n=e.getConfigValue("navigation.validWebcomponentUrls");if((n==null?void 0:n.length)>0)for(const r of n)try{if(new RegExp(r).test(i))return!0}catch(s){console.error(s)}return!1}return!0},setFeatureToggles(i,e,t){const n=this.sanitizeParamsMap(this.parseParams(e.split("?")[1]));let r;if(n[i]&&(r=n[i]),!r)return;const s=r.split(",");s.length>0&&s[0]!==""&&s.forEach(a=>t==null?void 0:t.setFeatureToggle(a,!0))},substituteDynamicParamsInObject(i,e,t=":",n=!1){return Object.entries(i).map(([r,s])=>{const a=n?Object.keys(e).find(o=>s&&s.indexOf(t+o)>=0):Object.keys(e).find(o=>s===t+o);return[r,a?n?s.replace(t+a,e[a]):e[a]:s]}).reduce((r,[s,a])=>Object.assign(r,{[s]:a}),{})}},it={logout:{label:"Sign Out",icon:"log"}};class de{constructor(e){this.luigi=e}getPathData(e){var c;const t=this.luigi.getConfig();let n=e.split("/");(n==null?void 0:n.length)>0&&n[0]===""&&(n=n.slice(1));let s=t.navigation.globalContext||{};const a=this.prepareRootNodes((c=t.navigation)==null?void 0:c.nodes,s);let o={};const l={selectedNodeChildren:a,nodesInPath:[{children:a}],rootNodes:a,pathParams:o};return n.forEach(f=>{var h,u,g;if(l.selectedNodeChildren){const p=this.findMatchingNode(f,l.selectedNodeChildren||[]);if(!p){console.log("No matching node found for segment:",f,"in children:",l.selectedNodeChildren);return}const S=p.context||{},T=M.mergeContext(s,S);let R=T;l.selectedNodeChildren=this.getAccessibleNodes(p,p.children||[],T),(h=p.pathSegment)!=null&&h.startsWith(":")&&(o[p.pathSegment.replace(":","")]=Be.sanitizeParam(f),R=C.substituteDynamicParamsInObject(T,o)),s=R,p.context=R,l.selectedNode=p,l.selectedNodeChildren=(u=l.selectedNode)!=null&&u.children?this.getAccessibleNodes(l.selectedNode,l.selectedNode.children,s):void 0,l.selectedNode&&((g=l.nodesInPath)==null||g.push(l.selectedNode))}}),l}findMatchingNode(e,t){let n;const r=t.filter(a=>!!a.pathSegment).length,s=t.filter(a=>a.pathSegment&&a.pathSegment.startsWith(":")).length;if(r>1&&(s===1&&(console.warn(`Invalid node setup detected.
1
+ var Rm=Object.defineProperty;var Ku=s=>{throw TypeError(s)};var bm=(s,n,r)=>n in s?Rm(s,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[n]=r;var Ee=(s,n,r)=>bm(s,typeof n!="symbol"?n+"":n,r),zu=(s,n,r)=>n.has(s)||Ku("Cannot "+r);var ht=(s,n,r)=>(zu(s,n,"read from private field"),r?r.call(s):n.get(s)),eo=(s,n,r)=>n.has(s)?Ku("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(s):n.set(s,r),to=(s,n,r,o)=>(zu(s,n,"write to private field"),o?o.call(s,r):n.set(s,r),r);class Im{constructor(n){this.$subscribers=new Set,this.$value=n}set(n){this.$value=n,this.$subscribers.forEach(r=>{r(n)})}update(n){this.set(n(this.$value))}subscribe(n){return this.$subscribers.add(n),n(this.$value),()=>{this.$subscribers.delete(n)}}}function fl(s){return s.$value}function Ti(s){return new Im(s)}const B={getRandomId:()=>window.crypto.getRandomValues(new Uint32Array(1))[0],isPromise:s=>s&&B.isFunction(s.then),isFunction:s=>s&&{}.toString.call(s)==="[object Function]",isAsyncFunction:s=>s&&{}.toString.call(s)==="[object AsyncFunction]",isString:s=>typeof s=="string"||s instanceof String,isObject:s=>!!(s&&typeof s=="object"&&!Array.isArray(s)),trimLeadingSlash:s=>B.isString(s)?s.replace(/^\/+/g,""):"",trimTrailingSlash:s=>B.isString(s)?s.replace(/\/+$/,""):"",isElementVisible:s=>s?window.getComputedStyle(s).getPropertyValue("display")!=="none":!1,getNodeList:(s,n=!1)=>{const r=[];return s&&Array.from(document.querySelectorAll(s)).forEach(u=>{n?B.isElementVisible(u)&&r.push(u):r.push(u)}),r},prependOrigin:s=>{if(!s||s.startsWith("http"))return s;const n=s.startsWith("/");return s.length?window.location.origin+(n?"":"/")+s:window.location.origin},getConfigValueFromObject:(s,n)=>{let r=0,o=s;const u=n.split(".");for(;o&&r<u.length;)o=o[u[r++]];return o},getConfigBooleanValue:(s,n)=>{const r=B.getConfigValueFromObject(s,n);return r===!0||r==="true"},getUrlParameter:s=>new URLSearchParams(window.location.search).get(s)},_r={wrapAsPromise:s=>new Promise(n=>{n(s)}),applyFunctionPromisified:(s,n)=>(s=s.apply(void 0,n),B.isPromise(s)?s:_r.wrapAsPromise(s)),getConfigValueFromObjectAsync:(s,n,...r)=>{const o=B.getConfigValueFromObject(s,n);return B.isFunction(o)?_r.applyFunctionPromisified(o,r):_r.wrapAsPromise(o)}};class Pm{setErrorMessage(n){var r,o;(o=(r=this.getLuigi().getEngine())==null?void 0:r._connector)==null||o.showFatalError(n)}getLuigi(){return window.Luigi}getConfigValue(n){return this.getLuigi().getConfigValue(n)}getConfigValueAsync(n){return this.getLuigi().getConfigValueAsync(n)}async executeConfigFnAsync(n,r=!1,...o){const u=this.getConfigValue(n);if(B.isFunction(u))try{return await _r.applyFunctionPromisified(u,o)}catch(c){if(r)return Promise.reject(c)}return Promise.resolve(void 0)}}const ze=new Pm;class Lm{constructor(){this._internalStorage={},this._defaultStorage="localStorage",this._authKey="luigi.auth",this._newlyAuthorizedKey="luigi.newlyAuthorized",this._invalidStorageMsg="Configuration Error: Invalid auth.storage value defined. Must be one of localStorage, sessionStorage or none."}reset(){this._storageType=void 0}getStorageKey(){return this._authKey}getStorageType(){return this._storageType||(this._storageType=ze.getConfigValue("auth.storage")||this._defaultStorage),this._storageType}getAuthData(){return this._getStore(this.getStorageKey())}setAuthData(n){this._setStore(this.getStorageKey(),n)}removeAuthData(){this._setStore(this.getStorageKey(),void 0)}isNewlyAuthorized(){return!!this._getStore(this._newlyAuthorizedKey)}setNewlyAuthorized(){this._setStore(this._newlyAuthorizedKey,!0)}removeNewlyAuthorized(){this._setStore(this._newlyAuthorizedKey,void 0)}_getWebStorage(n){return window[n]}_setStore(n,r){switch(this.getStorageType()){case"localStorage":case"sessionStorage":r!==void 0?this._getWebStorage(this.getStorageType()).setItem(n,JSON.stringify(r)):this._getWebStorage(this.getStorageType()).removeItem(n);break;case"none":this._internalStorage[n]=r;break;default:console.error(this._invalidStorageMsg)}}_getStore(n){try{switch(this.getStorageType()){case"localStorage":case"sessionStorage":return JSON.parse(this._getWebStorage(this.getStorageType()).getItem(n));case"none":return this._internalStorage[n];default:console.error(this._invalidStorageMsg)}}catch{console.warn("Error parsing authorization data. Auto-logout might not work!")}}}const Tt=new Lm;class xm{isAuthorizationEnabled(){return!!ze.getConfigValue("auth.use")}login(){this.isAuthorizationEnabled()&&kn.startAuthorization()}logout(){this.isAuthorizationEnabled()&&kn.logout()}async handleAuthEvent(n,r,o,u){const c=await ze.executeConfigFnAsync("auth.events."+n,!1,r,o),h=c===void 0||!!c;if(h&&u){window.location.href=u;return}return h}get store(){var n;return(n=ze.getLuigi())!=null&&n.initialized||console.warn("Luigi Core is not initialized yet. Consider moving your code to the luigiAfterInit lifecycle hook. Documentation: https://docs.luigi-project.io/docs/lifecycle-hooks"),{getStorageKey:()=>Tt.getStorageKey(),getStorageType:()=>Tt.getStorageType(),getAuthData:()=>Tt.getAuthData(),setAuthData:r=>Tt.setAuthData(r),removeAuthData:()=>Tt.removeAuthData(),setNewlyAuthorized:()=>{Tt.setNewlyAuthorized(),kn.resetExpirationChecks()}}}}const Mn=new xm;class $m{getStoredAuthData(){return Tt.getAuthData()}isLoggedIn(){const n=this.getStoredAuthData();return!!(n&&n.accessTokenExpirationDate>Number(new Date))}parseUrlAuthErrors(){const n=B.getUrlParameter("error"),r=B.getUrlParameter("errorDescription");if(n)return{error:n,errorDescription:r}}async handleUrlAuthErrors(n,r,o){return r?await Mn.handleAuthEvent("onAuthError",n,{error:r,errorDescription:o},n.logoutUrl+"?post_logout_redirect_uri="+n.post_logout_redirect_uri+"&error="+r+"&errorDescription="+o):!0}}const dn=new $m;class Om{constructor(){this._userInfoStore=Ti({}),this._loggedInStore=Ti(!1)}setUserInfo(n){this._userInfoStore.set(n)}setLoggedIn(n){this._loggedInStore.set(n)}getUserInfoStore(){return this._userInfoStore}getLoggedInStore(){return this._loggedInStore}async init(){const n=ze.getConfigValue("auth.use");if(!n)return Promise.resolve(!0);const r=ze.getConfigValue(`auth.${n}`),o=dn.parseUrlAuthErrors()||{};if(await dn.handleUrlAuthErrors(r,o.error,o.errorDescription))return this.idpProviderInstance=this.getIdpProviderInstance(n,r),B.isPromise(this.idpProviderInstance)?this.idpProviderInstance.then(c=>(this.idpProviderInstance=c,this.checkAuth(r))).catch(c=>{const h=`Error: ${c.message||c}`;console.error(h,c.message&&c),ze.setErrorMessage(h)}):this.checkAuth(r)}async checkAuth(n){const r=dn.getStoredAuthData();if(!r||!dn.isLoggedIn()){if(ze.getConfigValue("auth.disableAutoLogin"))return;let u=!0;return r&&(u=await Mn.handleAuthEvent("onAuthExpired",n)),u?this.startAuthorization():void 0}this.idpProviderInstance.settings&&B.isFunction(this.idpProviderInstance.settings.userInfoFn)?this.idpProviderInstance.settings.userInfoFn(this.idpProviderInstance.settings,r).then(u=>{this.setUserInfo(u),this.setLoggedIn(!0)}):B.isFunction(this.idpProviderInstance.userInfo)?this.idpProviderInstance.userInfo(n).then(u=>{this.setUserInfo(u),this.setLoggedIn(!0)}):(this.setLoggedIn(!0),this.setUserInfo(fl(this._userInfoStore))),B.isFunction(ze.getConfigValue("auth.events.onAuthSuccessful"))&&Tt.isNewlyAuthorized()&&await Mn.handleAuthEvent("onAuthSuccessful",n,r),Tt.removeNewlyAuthorized(),B.isFunction(this.idpProviderInstance.setTokenExpirationAction)&&this.idpProviderInstance.setTokenExpirationAction(),B.isFunction(this.idpProviderInstance.setTokenExpireSoonAction)&&this.idpProviderInstance.setTokenExpireSoonAction()}async startAuthorization(){if(this.idpProviderInstance)return this.idpProviderInstance.login().then(n=>{Tt.setNewlyAuthorized(),n&&console.error(n)})}logout(){const n=dn.getStoredAuthData(),r=async c=>{await Mn.handleAuthEvent("onLogout",this.idpProviderInstance.settings,void 0,c),Tt.removeAuthData()},o=ze.getConfigValue(`auth.${ze.getConfigValue("auth.use")}.logoutFn`),u=ze.getConfigValueAsync("navigation.profile.logout.customLogoutFn");B.isFunction(o)?o(this.idpProviderInstance.settings,n,r):B.isFunction(this.idpProviderInstance.logout)?this.idpProviderInstance.logout(n,r):u&&B.isFunction(u)?u(n,r):r(this.idpProviderInstance.settings.logoutUrl)}createIdpProviderException(n){return{message:n,name:"IdpProviderException"}}async getIdpProviderInstance(n,r){const o=B.getConfigValueFromObject(r,"idpProvider");if(o){const c=await new o(r);return["login"].forEach(h=>{if(!B.isFunction(c[h]))throw this.createIdpProviderException(`${h} function does not exist in custom IDP Provider ${n}`)}),c}if(B.isFunction(ze.getConfigValue("auth.events.onAuthConfigError")))await Mn.handleAuthEvent("onAuthConfigError",{idpProviderName:n,type:"IdpProviderException"});else throw this.createIdpProviderException(`IDP Provider ${n} does not exist.`)}unload(){this.idpProviderInstance&&B.isFunction(this.idpProviderInstance.unload)&&this.idpProviderInstance.unload()}resetExpirationChecks(){this.idpProviderInstance&&B.isFunction(this.idpProviderInstance.resetExpirationChecks)&&this.idpProviderInstance.resetExpirationChecks()}}const kn=new Om,Um={luigi:{button:{confirm:"Yes",dismiss:"No"},confirmationModal:{body:"Are you sure you want to do this?",header:"Confirmation"},navigation:{up:"Up"},notExactTargetNode:"Could not map the exact target node for the requested route {route}.",requestedRouteNotFound:"Could not find the requested route {route}.",unsavedChangesAlert:{body:"Unsaved changes will be lost. Do you want to continue?",header:"Unsaved changes detected"}}},Nm=Um,yi={sanitizeHtml(s=""){return s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/javascript:/g,"")},restoreSanitizedBrs(s=""){return s.replace(/&lt;br\/&gt;/g,"<br>").replace(/&lt;br \/&gt;/g,"<br>").replace(/&lt;br&gt;/g,"<br>").replace(/&lt;br &gt;/g,"<br>")},restoreSanitizedElements(s=""){let n=s;const r=["i","b","br","mark","strong","em","small","del","ins","sub","sup"];for(let o=0;o<r.length;o++){const u=new RegExp(`&lt;${r[o]}/&gt;`,"g"),c=new RegExp(`&lt;${r[o]} /&gt;`,"g"),h=new RegExp(`&lt;${r[o]}&gt;`,"g"),d=new RegExp(`&lt;${r[o]} &gt;`,"g"),_=new RegExp(`&lt;/${r[o]}[/]&gt;`,"g"),v=new RegExp(`&lt;/${r[o]} [/]&gt;`,"g"),x=new RegExp(`&lt;[/]${r[o]}&gt;`,"g"),C=new RegExp(`&lt;[/]${r[o]} &gt;`,"g");n=n.replace(u,`<${r[o]}>`).replace(c,`<${r[o]}>`).replace(h,`<${r[o]}>`).replace(d,`<${r[o]}>`).replace(_,`</${r[o]}>`).replace(v,`</${r[o]}>`).replace(x,`</${r[o]}>`).replace(C,`</${r[o]}>`)}return n},sanatizeHtmlExceptTextFormatting(s=""){return this.restoreSanitizedElements(this.sanitizeHtml(s))},sanitizeParam(s=""){return String(s).replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/\//g,"&sol;")},escapeKeyForRegexp(s=""){return s.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},processTextAndLinks(s="",n,r){const u={sanitizedText:this.restoreSanitizedBrs(this.sanitizeHtml(s)),links:[]};return n?Object.entries(n).reduce((c,[h,d])=>{const _=`_luigi_alert_${r}_link_${this.sanitizeParam(h)}`,v=this.restoreSanitizedBrs(this.sanitizeHtml(d.text)),x=`<a id="${_}">${v}</a>`,C=this.escapeKeyForRegexp(h),y=new RegExp(`({${C}})`,"g");return{sanitizedText:c.sanitizedText.replace(y,x),links:c.links.concat({elemId:_,url:d.url?encodeURI(this.sanitizeHtml(d.url)):void 0,dismissKey:d.dismissKey?encodeURI(this.sanitizeHtml(d.dismissKey)):void 0})}},u):u}};class Dm{constructor(n){this.luigi=n,this.currentLocaleStorageKey="luigi.currentLocale",this.defaultLocale="en",this.listeners={},this.translationTable=Nm}_init(){this._initCustomImplementation(),this.addCurrentLocaleChangeListener(n=>{this.broadcastLocaleToAllContainers(n)})}getCurrentLocale(){return sessionStorage.getItem(this.currentLocaleStorageKey)||this.defaultLocale}setCurrentLocale(n,r){var o,u;if(!((o=r==null?void 0:r.clientPermissions)!=null&&o.changeCurrentLocale)){console.error('Current locale change declined from client, as client permission "changeCurrentLocale" is not set for this view.');return}n&&(r&&(r.locale=n),sessionStorage.setItem(this.currentLocaleStorageKey,n),this._notifyLocaleChange(n)),(u=this.luigi.getEngine()._connector)==null||u.setCurrentLocale(n)}addCurrentLocaleChangeListener(n){let r=null;return B.isFunction(n)?(r=B.getRandomId(),this.listeners[r]=n):console.error("Provided locale change listener is not a function."),r}removeCurrentLocaleChangeListener(n){n&&this.listeners[n]?delete this.listeners[n]:console.error("Unable to remove locale change listener - no listener registered for given ID.")}getTranslation(n,r=void 0,o=void 0){if(!n)return"";if(this.translationImpl){const c=this.translationImpl.getTranslation(n,r,o);if(c!==n)return c}const u=this.findTranslation(n,this.translationTable,r);return u||n}_notifyLocaleChange(n){Object.getOwnPropertyNames(this.listeners).forEach(r=>{this.listeners[Number(r)](n)}),this.luigi.configChanged()}_initCustomImplementation(){this.translationImpl=this.luigi.getConfigValue("settings.customTranslationImplementation"),B.isFunction(this.translationImpl)&&(this.translationImpl=this.translationImpl())}broadcastLocaleToAllContainers(n){const r=B.getNodeList("luigi-container[lui_container]");r!=null&&r.length&&n&&r.forEach(o=>{o.locale=n,o.updateContext({locale:n})})}findTranslation(n,r,o){const u=n.split(".");for(let c=0;c<u.length;c++){const h=u[c];if(Object.prototype.hasOwnProperty.call(r,h)&&typeof r[h]=="object")r=r[h];else return o?this.findInterpolations(r[h],o):r[h]}}findInterpolations(n,r){return typeof n!="string"||!n.trim()||Object.keys(r).forEach(o=>{n=n.replace(new RegExp("{"+yi.escapeKeyForRegexp(o)+"}","gi"),r[o])}),n}}const Mm={luigiAfterInit:async s=>{B.getConfigBooleanValue(s.getConfig(),"settings.appLoadingIndicator.hideAutomatically")&&setTimeout(()=>{s.ux().hideAppLoadingIndicator()},0),await ze.executeConfigFnAsync("lifecycleHooks.luigiAfterInit")}};class Fm{constructor(){this.featureToggleList=new Set}setFeatureToggle(n,r=!1){this.isValid(n)&&(n.startsWith("!")&&!r||this.isDuplicatedOrDisabled(n)||this.featureToggleList.add(n))}unsetFeatureToggle(n){if(this.isValid(n)){if(!this.featureToggleList.has(n)){console.warn("Feature toggle name is not in the list.");return}this.featureToggleList.delete(n)}}getActiveFeatureToggleList(){return[...Array.from(this.featureToggleList)].filter(r=>!r.startsWith("!"))}isValid(n){return B.isString(n)?!0:(console.warn("Feature toggle name is not valid or not of type 'string'"),!1)}isDuplicatedOrDisabled(n){return this.featureToggleList.has(n)?(console.warn("Feature toggle name already exists"),!0):this.featureToggleList.has(`!${n}`)?(console.warn("Disabled feature toggle can not be activated"),!0):!1}}class mn{constructor(n){this.luigi=n,this._modalStack=[],this.modalSettings={}}async closeModals(){if(this._modalStack.length===0)return;const n=[...this._modalStack];for(const{onInternalClose:r}of n)try{typeof r=="function"&&r()}catch(o){console.warn("onInternalClose threw an error",o)}this.clearModalStack()}registerModal(n){n&&this._modalStack.push(n)}getModalSettings(){return this._modalStack.length>0?this._modalStack[0].modalsettings||{}:{}}getModalStackLength(){return this._modalStack.length}updateFirstModalSettings(n){if(this._modalStack.length>0){const r=this._modalStack[0];r.modalsettings={...r.modalsettings,...n}}}clearModalStack(){this._modalStack=[]}removeLastModalFromStack(){this._modalStack.pop()}}var Si=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},pr={exports:{}};/**
2
+ * @license
3
+ * Lodash <https://lodash.com/>
4
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
5
+ * Released under MIT license <https://lodash.com/license>
6
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
7
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
8
+ */var km=pr.exports,Yu;function Wm(){return Yu||(Yu=1,(function(s,n){(function(){var r,o="4.17.23",u=200,c="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",h="Expected a function",d="Invalid `variable` option passed into `_.template`",_="__lodash_hash_undefined__",v=500,x="__lodash_placeholder__",C=1,y=2,I=4,L=1,D=2,F=1,te=2,ge=4,oe=8,Oe=16,de=32,Ue=64,we=128,Pe=256,Ce=512,pe=30,_e="...",$=800,gt=16,ke=1,Ae=2,yt=3,b=1/0,Ne=9007199254740991,ee=17976931348623157e292,me=NaN,Le=4294967295,Ar=Le-1,Rr=Le>>>1,Re=[["ary",we],["bind",F],["bindKey",te],["curry",oe],["curryRight",Oe],["flip",Ce],["partial",de],["partialRight",Ue],["rearg",Pe]],nt="[object Arguments]",dt="[object Array]",br="[object AsyncFunction]",Qt="[object Boolean]",pt="[object Date]",$i="[object DOMException]",Ir="[object Error]",Pr="[object Function]",_o="[object GeneratorFunction]",_t="[object Map]",Yn="[object Number]",Bl="[object Null]",$t="[object Object]",mo="[object Promise]",Vl="[object Proxy]",Xn="[object RegExp]",mt="[object Set]",Jn="[object String]",Lr="[object Symbol]",Ql="[object Undefined]",Zn="[object WeakMap]",Gl="[object WeakSet]",jn="[object ArrayBuffer]",vn="[object DataView]",Oi="[object Float32Array]",Ui="[object Float64Array]",Ni="[object Int8Array]",Di="[object Int16Array]",Mi="[object Int32Array]",Fi="[object Uint8Array]",ki="[object Uint8ClampedArray]",Wi="[object Uint16Array]",Hi="[object Uint32Array]",ql=/\b__p \+= '';/g,Kl=/\b(__p \+=) '' \+/g,zl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,vo=/&(?:amp|lt|gt|quot|#39);/g,So=/[&<>"']/g,Yl=RegExp(vo.source),Xl=RegExp(So.source),Jl=/<%-([\s\S]+?)%>/g,Zl=/<%([\s\S]+?)%>/g,Eo=/<%=([\s\S]+?)%>/g,jl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ec=/^\w*$/,tc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Bi=/[\\^$.*+?()[\]{}|]/g,nc=RegExp(Bi.source),Vi=/^\s+/,rc=/\s/,ic=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,sc=/\{\n\/\* \[wrapped with (.+)\] \*/,oc=/,? & /,ac=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,uc=/[()=,{}\[\]\/\s]/,lc=/\\(\\)?/g,cc=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,wo=/\w*$/,hc=/^[-+]0x[0-9a-f]+$/i,fc=/^0b[01]+$/i,gc=/^\[object .+?Constructor\]$/,dc=/^0o[0-7]+$/i,pc=/^(?:0|[1-9]\d*)$/,_c=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xr=/($^)/,mc=/['\n\r\u2028\u2029\\]/g,$r="\\ud800-\\udfff",vc="\\u0300-\\u036f",Sc="\\ufe20-\\ufe2f",Ec="\\u20d0-\\u20ff",Co=vc+Sc+Ec,To="\\u2700-\\u27bf",yo="a-z\\xdf-\\xf6\\xf8-\\xff",wc="\\xac\\xb1\\xd7\\xf7",Cc="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Tc="\\u2000-\\u206f",yc=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ao="A-Z\\xc0-\\xd6\\xd8-\\xde",Ro="\\ufe0e\\ufe0f",bo=wc+Cc+Tc+yc,Qi="['’]",Ac="["+$r+"]",Io="["+bo+"]",Or="["+Co+"]",Po="\\d+",Rc="["+To+"]",Lo="["+yo+"]",xo="[^"+$r+bo+Po+To+yo+Ao+"]",Gi="\\ud83c[\\udffb-\\udfff]",bc="(?:"+Or+"|"+Gi+")",$o="[^"+$r+"]",qi="(?:\\ud83c[\\udde6-\\uddff]){2}",Ki="[\\ud800-\\udbff][\\udc00-\\udfff]",Sn="["+Ao+"]",Oo="\\u200d",Uo="(?:"+Lo+"|"+xo+")",Ic="(?:"+Sn+"|"+xo+")",No="(?:"+Qi+"(?:d|ll|m|re|s|t|ve))?",Do="(?:"+Qi+"(?:D|LL|M|RE|S|T|VE))?",Mo=bc+"?",Fo="["+Ro+"]?",Pc="(?:"+Oo+"(?:"+[$o,qi,Ki].join("|")+")"+Fo+Mo+")*",Lc="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",xc="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ko=Fo+Mo+Pc,$c="(?:"+[Rc,qi,Ki].join("|")+")"+ko,Oc="(?:"+[$o+Or+"?",Or,qi,Ki,Ac].join("|")+")",Uc=RegExp(Qi,"g"),Nc=RegExp(Or,"g"),zi=RegExp(Gi+"(?="+Gi+")|"+Oc+ko,"g"),Dc=RegExp([Sn+"?"+Lo+"+"+No+"(?="+[Io,Sn,"$"].join("|")+")",Ic+"+"+Do+"(?="+[Io,Sn+Uo,"$"].join("|")+")",Sn+"?"+Uo+"+"+No,Sn+"+"+Do,xc,Lc,Po,$c].join("|"),"g"),Mc=RegExp("["+Oo+$r+Co+Ro+"]"),Fc=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,kc=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Wc=-1,le={};le[Oi]=le[Ui]=le[Ni]=le[Di]=le[Mi]=le[Fi]=le[ki]=le[Wi]=le[Hi]=!0,le[nt]=le[dt]=le[jn]=le[Qt]=le[vn]=le[pt]=le[Ir]=le[Pr]=le[_t]=le[Yn]=le[$t]=le[Xn]=le[mt]=le[Jn]=le[Zn]=!1;var ue={};ue[nt]=ue[dt]=ue[jn]=ue[vn]=ue[Qt]=ue[pt]=ue[Oi]=ue[Ui]=ue[Ni]=ue[Di]=ue[Mi]=ue[_t]=ue[Yn]=ue[$t]=ue[Xn]=ue[mt]=ue[Jn]=ue[Lr]=ue[Fi]=ue[ki]=ue[Wi]=ue[Hi]=!0,ue[Ir]=ue[Pr]=ue[Zn]=!1;var Hc={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Bc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Vc={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Qc={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Gc=parseFloat,qc=parseInt,Wo=typeof Si=="object"&&Si&&Si.Object===Object&&Si,Kc=typeof self=="object"&&self&&self.Object===Object&&self,xe=Wo||Kc||Function("return this")(),Yi=n&&!n.nodeType&&n,sn=Yi&&!0&&s&&!s.nodeType&&s,Ho=sn&&sn.exports===Yi,Xi=Ho&&Wo.process,rt=(function(){try{var S=sn&&sn.require&&sn.require("util").types;return S||Xi&&Xi.binding&&Xi.binding("util")}catch{}})(),Bo=rt&&rt.isArrayBuffer,Vo=rt&&rt.isDate,Qo=rt&&rt.isMap,Go=rt&&rt.isRegExp,qo=rt&&rt.isSet,Ko=rt&&rt.isTypedArray;function Ye(S,T,w){switch(w.length){case 0:return S.call(T);case 1:return S.call(T,w[0]);case 2:return S.call(T,w[0],w[1]);case 3:return S.call(T,w[0],w[1],w[2])}return S.apply(T,w)}function zc(S,T,w,N){for(var V=-1,ne=S==null?0:S.length;++V<ne;){var Te=S[V];T(N,Te,w(Te),S)}return N}function it(S,T){for(var w=-1,N=S==null?0:S.length;++w<N&&T(S[w],w,S)!==!1;);return S}function Yc(S,T){for(var w=S==null?0:S.length;w--&&T(S[w],w,S)!==!1;);return S}function zo(S,T){for(var w=-1,N=S==null?0:S.length;++w<N;)if(!T(S[w],w,S))return!1;return!0}function Gt(S,T){for(var w=-1,N=S==null?0:S.length,V=0,ne=[];++w<N;){var Te=S[w];T(Te,w,S)&&(ne[V++]=Te)}return ne}function Ur(S,T){var w=S==null?0:S.length;return!!w&&En(S,T,0)>-1}function Ji(S,T,w){for(var N=-1,V=S==null?0:S.length;++N<V;)if(w(T,S[N]))return!0;return!1}function ce(S,T){for(var w=-1,N=S==null?0:S.length,V=Array(N);++w<N;)V[w]=T(S[w],w,S);return V}function qt(S,T){for(var w=-1,N=T.length,V=S.length;++w<N;)S[V+w]=T[w];return S}function Zi(S,T,w,N){var V=-1,ne=S==null?0:S.length;for(N&&ne&&(w=S[++V]);++V<ne;)w=T(w,S[V],V,S);return w}function Xc(S,T,w,N){var V=S==null?0:S.length;for(N&&V&&(w=S[--V]);V--;)w=T(w,S[V],V,S);return w}function ji(S,T){for(var w=-1,N=S==null?0:S.length;++w<N;)if(T(S[w],w,S))return!0;return!1}var Jc=es("length");function Zc(S){return S.split("")}function jc(S){return S.match(ac)||[]}function Yo(S,T,w){var N;return w(S,function(V,ne,Te){if(T(V,ne,Te))return N=ne,!1}),N}function Nr(S,T,w,N){for(var V=S.length,ne=w+(N?1:-1);N?ne--:++ne<V;)if(T(S[ne],ne,S))return ne;return-1}function En(S,T,w){return T===T?hh(S,T,w):Nr(S,Xo,w)}function eh(S,T,w,N){for(var V=w-1,ne=S.length;++V<ne;)if(N(S[V],T))return V;return-1}function Xo(S){return S!==S}function Jo(S,T){var w=S==null?0:S.length;return w?ns(S,T)/w:me}function es(S){return function(T){return T==null?r:T[S]}}function ts(S){return function(T){return S==null?r:S[T]}}function Zo(S,T,w,N,V){return V(S,function(ne,Te,ae){w=N?(N=!1,ne):T(w,ne,Te,ae)}),w}function th(S,T){var w=S.length;for(S.sort(T);w--;)S[w]=S[w].value;return S}function ns(S,T){for(var w,N=-1,V=S.length;++N<V;){var ne=T(S[N]);ne!==r&&(w=w===r?ne:w+ne)}return w}function rs(S,T){for(var w=-1,N=Array(S);++w<S;)N[w]=T(w);return N}function nh(S,T){return ce(T,function(w){return[w,S[w]]})}function jo(S){return S&&S.slice(0,ra(S)+1).replace(Vi,"")}function Xe(S){return function(T){return S(T)}}function is(S,T){return ce(T,function(w){return S[w]})}function er(S,T){return S.has(T)}function ea(S,T){for(var w=-1,N=S.length;++w<N&&En(T,S[w],0)>-1;);return w}function ta(S,T){for(var w=S.length;w--&&En(T,S[w],0)>-1;);return w}function rh(S,T){for(var w=S.length,N=0;w--;)S[w]===T&&++N;return N}var ih=ts(Hc),sh=ts(Bc);function oh(S){return"\\"+Qc[S]}function ah(S,T){return S==null?r:S[T]}function wn(S){return Mc.test(S)}function uh(S){return Fc.test(S)}function lh(S){for(var T,w=[];!(T=S.next()).done;)w.push(T.value);return w}function ss(S){var T=-1,w=Array(S.size);return S.forEach(function(N,V){w[++T]=[V,N]}),w}function na(S,T){return function(w){return S(T(w))}}function Kt(S,T){for(var w=-1,N=S.length,V=0,ne=[];++w<N;){var Te=S[w];(Te===T||Te===x)&&(S[w]=x,ne[V++]=w)}return ne}function Dr(S){var T=-1,w=Array(S.size);return S.forEach(function(N){w[++T]=N}),w}function ch(S){var T=-1,w=Array(S.size);return S.forEach(function(N){w[++T]=[N,N]}),w}function hh(S,T,w){for(var N=w-1,V=S.length;++N<V;)if(S[N]===T)return N;return-1}function fh(S,T,w){for(var N=w+1;N--;)if(S[N]===T)return N;return N}function Cn(S){return wn(S)?dh(S):Jc(S)}function vt(S){return wn(S)?ph(S):Zc(S)}function ra(S){for(var T=S.length;T--&&rc.test(S.charAt(T)););return T}var gh=ts(Vc);function dh(S){for(var T=zi.lastIndex=0;zi.test(S);)++T;return T}function ph(S){return S.match(zi)||[]}function _h(S){return S.match(Dc)||[]}var mh=(function S(T){T=T==null?xe:Tn.defaults(xe.Object(),T,Tn.pick(xe,kc));var w=T.Array,N=T.Date,V=T.Error,ne=T.Function,Te=T.Math,ae=T.Object,os=T.RegExp,vh=T.String,st=T.TypeError,Mr=w.prototype,Sh=ne.prototype,yn=ae.prototype,Fr=T["__core-js_shared__"],kr=Sh.toString,re=yn.hasOwnProperty,Eh=0,ia=(function(){var e=/[^.]+$/.exec(Fr&&Fr.keys&&Fr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})(),Wr=yn.toString,wh=kr.call(ae),Ch=xe._,Th=os("^"+kr.call(re).replace(Bi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Hr=Ho?T.Buffer:r,zt=T.Symbol,Br=T.Uint8Array,sa=Hr?Hr.allocUnsafe:r,Vr=na(ae.getPrototypeOf,ae),oa=ae.create,aa=yn.propertyIsEnumerable,Qr=Mr.splice,ua=zt?zt.isConcatSpreadable:r,tr=zt?zt.iterator:r,on=zt?zt.toStringTag:r,Gr=(function(){try{var e=hn(ae,"defineProperty");return e({},"",{}),e}catch{}})(),yh=T.clearTimeout!==xe.clearTimeout&&T.clearTimeout,Ah=N&&N.now!==xe.Date.now&&N.now,Rh=T.setTimeout!==xe.setTimeout&&T.setTimeout,qr=Te.ceil,Kr=Te.floor,as=ae.getOwnPropertySymbols,bh=Hr?Hr.isBuffer:r,la=T.isFinite,Ih=Mr.join,Ph=na(ae.keys,ae),ye=Te.max,De=Te.min,Lh=N.now,xh=T.parseInt,ca=Te.random,$h=Mr.reverse,us=hn(T,"DataView"),nr=hn(T,"Map"),ls=hn(T,"Promise"),An=hn(T,"Set"),rr=hn(T,"WeakMap"),ir=hn(ae,"create"),zr=rr&&new rr,Rn={},Oh=fn(us),Uh=fn(nr),Nh=fn(ls),Dh=fn(An),Mh=fn(rr),Yr=zt?zt.prototype:r,sr=Yr?Yr.valueOf:r,ha=Yr?Yr.toString:r;function f(e){if(fe(e)&&!G(e)&&!(e instanceof Z)){if(e instanceof ot)return e;if(re.call(e,"__wrapped__"))return fu(e)}return new ot(e)}var bn=(function(){function e(){}return function(t){if(!he(t))return{};if(oa)return oa(t);e.prototype=t;var i=new e;return e.prototype=r,i}})();function Xr(){}function ot(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}f.templateSettings={escape:Jl,evaluate:Zl,interpolate:Eo,variable:"",imports:{_:f}},f.prototype=Xr.prototype,f.prototype.constructor=f,ot.prototype=bn(Xr.prototype),ot.prototype.constructor=ot;function Z(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Le,this.__views__=[]}function Fh(){var e=new Z(this.__wrapped__);return e.__actions__=Qe(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Qe(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Qe(this.__views__),e}function kh(){if(this.__filtered__){var e=new Z(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Wh(){var e=this.__wrapped__.value(),t=this.__dir__,i=G(e),a=t<0,l=i?e.length:0,g=jf(0,l,this.__views__),p=g.start,m=g.end,E=m-p,A=a?m:p-1,R=this.__iteratees__,P=R.length,U=0,M=De(E,this.__takeCount__);if(!i||!a&&l==E&&M==E)return Na(e,this.__actions__);var W=[];e:for(;E--&&U<M;){A+=t;for(var z=-1,H=e[A];++z<P;){var X=R[z],j=X.iteratee,je=X.type,Be=j(H);if(je==Ae)H=Be;else if(!Be){if(je==ke)continue e;break e}}W[U++]=H}return W}Z.prototype=bn(Xr.prototype),Z.prototype.constructor=Z;function an(e){var t=-1,i=e==null?0:e.length;for(this.clear();++t<i;){var a=e[t];this.set(a[0],a[1])}}function Hh(){this.__data__=ir?ir(null):{},this.size=0}function Bh(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Vh(e){var t=this.__data__;if(ir){var i=t[e];return i===_?r:i}return re.call(t,e)?t[e]:r}function Qh(e){var t=this.__data__;return ir?t[e]!==r:re.call(t,e)}function Gh(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=ir&&t===r?_:t,this}an.prototype.clear=Hh,an.prototype.delete=Bh,an.prototype.get=Vh,an.prototype.has=Qh,an.prototype.set=Gh;function Ot(e){var t=-1,i=e==null?0:e.length;for(this.clear();++t<i;){var a=e[t];this.set(a[0],a[1])}}function qh(){this.__data__=[],this.size=0}function Kh(e){var t=this.__data__,i=Jr(t,e);if(i<0)return!1;var a=t.length-1;return i==a?t.pop():Qr.call(t,i,1),--this.size,!0}function zh(e){var t=this.__data__,i=Jr(t,e);return i<0?r:t[i][1]}function Yh(e){return Jr(this.__data__,e)>-1}function Xh(e,t){var i=this.__data__,a=Jr(i,e);return a<0?(++this.size,i.push([e,t])):i[a][1]=t,this}Ot.prototype.clear=qh,Ot.prototype.delete=Kh,Ot.prototype.get=zh,Ot.prototype.has=Yh,Ot.prototype.set=Xh;function Ut(e){var t=-1,i=e==null?0:e.length;for(this.clear();++t<i;){var a=e[t];this.set(a[0],a[1])}}function Jh(){this.size=0,this.__data__={hash:new an,map:new(nr||Ot),string:new an}}function Zh(e){var t=li(this,e).delete(e);return this.size-=t?1:0,t}function jh(e){return li(this,e).get(e)}function ef(e){return li(this,e).has(e)}function tf(e,t){var i=li(this,e),a=i.size;return i.set(e,t),this.size+=i.size==a?0:1,this}Ut.prototype.clear=Jh,Ut.prototype.delete=Zh,Ut.prototype.get=jh,Ut.prototype.has=ef,Ut.prototype.set=tf;function un(e){var t=-1,i=e==null?0:e.length;for(this.__data__=new Ut;++t<i;)this.add(e[t])}function nf(e){return this.__data__.set(e,_),this}function rf(e){return this.__data__.has(e)}un.prototype.add=un.prototype.push=nf,un.prototype.has=rf;function St(e){var t=this.__data__=new Ot(e);this.size=t.size}function sf(){this.__data__=new Ot,this.size=0}function of(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i}function af(e){return this.__data__.get(e)}function uf(e){return this.__data__.has(e)}function lf(e,t){var i=this.__data__;if(i instanceof Ot){var a=i.__data__;if(!nr||a.length<u-1)return a.push([e,t]),this.size=++i.size,this;i=this.__data__=new Ut(a)}return i.set(e,t),this.size=i.size,this}St.prototype.clear=sf,St.prototype.delete=of,St.prototype.get=af,St.prototype.has=uf,St.prototype.set=lf;function fa(e,t){var i=G(e),a=!i&&gn(e),l=!i&&!a&&jt(e),g=!i&&!a&&!l&&xn(e),p=i||a||l||g,m=p?rs(e.length,vh):[],E=m.length;for(var A in e)(t||re.call(e,A))&&!(p&&(A=="length"||l&&(A=="offset"||A=="parent")||g&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||Ft(A,E)))&&m.push(A);return m}function ga(e){var t=e.length;return t?e[Es(0,t-1)]:r}function cf(e,t){return ci(Qe(e),ln(t,0,e.length))}function hf(e){return ci(Qe(e))}function cs(e,t,i){(i!==r&&!Et(e[t],i)||i===r&&!(t in e))&&Nt(e,t,i)}function or(e,t,i){var a=e[t];(!(re.call(e,t)&&Et(a,i))||i===r&&!(t in e))&&Nt(e,t,i)}function Jr(e,t){for(var i=e.length;i--;)if(Et(e[i][0],t))return i;return-1}function ff(e,t,i,a){return Yt(e,function(l,g,p){t(a,l,i(l),p)}),a}function da(e,t){return e&&Rt(t,be(t),e)}function gf(e,t){return e&&Rt(t,qe(t),e)}function Nt(e,t,i){t=="__proto__"&&Gr?Gr(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function hs(e,t){for(var i=-1,a=t.length,l=w(a),g=e==null;++i<a;)l[i]=g?r:Gs(e,t[i]);return l}function ln(e,t,i){return e===e&&(i!==r&&(e=e<=i?e:i),t!==r&&(e=e>=t?e:t)),e}function at(e,t,i,a,l,g){var p,m=t&C,E=t&y,A=t&I;if(i&&(p=l?i(e,a,l,g):i(e)),p!==r)return p;if(!he(e))return e;var R=G(e);if(R){if(p=tg(e),!m)return Qe(e,p)}else{var P=Me(e),U=P==Pr||P==_o;if(jt(e))return Fa(e,m);if(P==$t||P==nt||U&&!l){if(p=E||U?{}:ru(e),!m)return E?Qf(e,gf(p,e)):Vf(e,da(p,e))}else{if(!ue[P])return l?e:{};p=ng(e,P,m)}}g||(g=new St);var M=g.get(e);if(M)return M;g.set(e,p),$u(e)?e.forEach(function(H){p.add(at(H,t,i,H,e,g))}):Lu(e)&&e.forEach(function(H,X){p.set(X,at(H,t,i,X,e,g))});var W=A?E?xs:Ls:E?qe:be,z=R?r:W(e);return it(z||e,function(H,X){z&&(X=H,H=e[X]),or(p,X,at(H,t,i,X,e,g))}),p}function df(e){var t=be(e);return function(i){return pa(i,e,t)}}function pa(e,t,i){var a=i.length;if(e==null)return!a;for(e=ae(e);a--;){var l=i[a],g=t[l],p=e[l];if(p===r&&!(l in e)||!g(p))return!1}return!0}function _a(e,t,i){if(typeof e!="function")throw new st(h);return gr(function(){e.apply(r,i)},t)}function ar(e,t,i,a){var l=-1,g=Ur,p=!0,m=e.length,E=[],A=t.length;if(!m)return E;i&&(t=ce(t,Xe(i))),a?(g=Ji,p=!1):t.length>=u&&(g=er,p=!1,t=new un(t));e:for(;++l<m;){var R=e[l],P=i==null?R:i(R);if(R=a||R!==0?R:0,p&&P===P){for(var U=A;U--;)if(t[U]===P)continue e;E.push(R)}else g(t,P,a)||E.push(R)}return E}var Yt=Va(At),ma=Va(gs,!0);function pf(e,t){var i=!0;return Yt(e,function(a,l,g){return i=!!t(a,l,g),i}),i}function Zr(e,t,i){for(var a=-1,l=e.length;++a<l;){var g=e[a],p=t(g);if(p!=null&&(m===r?p===p&&!Ze(p):i(p,m)))var m=p,E=g}return E}function _f(e,t,i,a){var l=e.length;for(i=K(i),i<0&&(i=-i>l?0:l+i),a=a===r||a>l?l:K(a),a<0&&(a+=l),a=i>a?0:Uu(a);i<a;)e[i++]=t;return e}function va(e,t){var i=[];return Yt(e,function(a,l,g){t(a,l,g)&&i.push(a)}),i}function $e(e,t,i,a,l){var g=-1,p=e.length;for(i||(i=ig),l||(l=[]);++g<p;){var m=e[g];t>0&&i(m)?t>1?$e(m,t-1,i,a,l):qt(l,m):a||(l[l.length]=m)}return l}var fs=Qa(),Sa=Qa(!0);function At(e,t){return e&&fs(e,t,be)}function gs(e,t){return e&&Sa(e,t,be)}function jr(e,t){return Gt(t,function(i){return kt(e[i])})}function cn(e,t){t=Jt(t,e);for(var i=0,a=t.length;e!=null&&i<a;)e=e[bt(t[i++])];return i&&i==a?e:r}function Ea(e,t,i){var a=t(e);return G(e)?a:qt(a,i(e))}function We(e){return e==null?e===r?Ql:Bl:on&&on in ae(e)?Zf(e):hg(e)}function ds(e,t){return e>t}function mf(e,t){return e!=null&&re.call(e,t)}function vf(e,t){return e!=null&&t in ae(e)}function Sf(e,t,i){return e>=De(t,i)&&e<ye(t,i)}function ps(e,t,i){for(var a=i?Ji:Ur,l=e[0].length,g=e.length,p=g,m=w(g),E=1/0,A=[];p--;){var R=e[p];p&&t&&(R=ce(R,Xe(t))),E=De(R.length,E),m[p]=!i&&(t||l>=120&&R.length>=120)?new un(p&&R):r}R=e[0];var P=-1,U=m[0];e:for(;++P<l&&A.length<E;){var M=R[P],W=t?t(M):M;if(M=i||M!==0?M:0,!(U?er(U,W):a(A,W,i))){for(p=g;--p;){var z=m[p];if(!(z?er(z,W):a(e[p],W,i)))continue e}U&&U.push(W),A.push(M)}}return A}function Ef(e,t,i,a){return At(e,function(l,g,p){t(a,i(l),g,p)}),a}function ur(e,t,i){t=Jt(t,e),e=au(e,t);var a=e==null?e:e[bt(lt(t))];return a==null?r:Ye(a,e,i)}function wa(e){return fe(e)&&We(e)==nt}function wf(e){return fe(e)&&We(e)==jn}function Cf(e){return fe(e)&&We(e)==pt}function lr(e,t,i,a,l){return e===t?!0:e==null||t==null||!fe(e)&&!fe(t)?e!==e&&t!==t:Tf(e,t,i,a,lr,l)}function Tf(e,t,i,a,l,g){var p=G(e),m=G(t),E=p?dt:Me(e),A=m?dt:Me(t);E=E==nt?$t:E,A=A==nt?$t:A;var R=E==$t,P=A==$t,U=E==A;if(U&&jt(e)){if(!jt(t))return!1;p=!0,R=!1}if(U&&!R)return g||(g=new St),p||xn(e)?eu(e,t,i,a,l,g):Xf(e,t,E,i,a,l,g);if(!(i&L)){var M=R&&re.call(e,"__wrapped__"),W=P&&re.call(t,"__wrapped__");if(M||W){var z=M?e.value():e,H=W?t.value():t;return g||(g=new St),l(z,H,i,a,g)}}return U?(g||(g=new St),Jf(e,t,i,a,l,g)):!1}function yf(e){return fe(e)&&Me(e)==_t}function _s(e,t,i,a){var l=i.length,g=l,p=!a;if(e==null)return!g;for(e=ae(e);l--;){var m=i[l];if(p&&m[2]?m[1]!==e[m[0]]:!(m[0]in e))return!1}for(;++l<g;){m=i[l];var E=m[0],A=e[E],R=m[1];if(p&&m[2]){if(A===r&&!(E in e))return!1}else{var P=new St;if(a)var U=a(A,R,E,e,t,P);if(!(U===r?lr(R,A,L|D,a,P):U))return!1}}return!0}function Ca(e){if(!he(e)||og(e))return!1;var t=kt(e)?Th:gc;return t.test(fn(e))}function Af(e){return fe(e)&&We(e)==Xn}function Rf(e){return fe(e)&&Me(e)==mt}function bf(e){return fe(e)&&_i(e.length)&&!!le[We(e)]}function Ta(e){return typeof e=="function"?e:e==null?Ke:typeof e=="object"?G(e)?Ra(e[0],e[1]):Aa(e):Gu(e)}function ms(e){if(!fr(e))return Ph(e);var t=[];for(var i in ae(e))re.call(e,i)&&i!="constructor"&&t.push(i);return t}function If(e){if(!he(e))return cg(e);var t=fr(e),i=[];for(var a in e)a=="constructor"&&(t||!re.call(e,a))||i.push(a);return i}function vs(e,t){return e<t}function ya(e,t){var i=-1,a=Ge(e)?w(e.length):[];return Yt(e,function(l,g,p){a[++i]=t(l,g,p)}),a}function Aa(e){var t=Os(e);return t.length==1&&t[0][2]?su(t[0][0],t[0][1]):function(i){return i===e||_s(i,e,t)}}function Ra(e,t){return Ns(e)&&iu(t)?su(bt(e),t):function(i){var a=Gs(i,e);return a===r&&a===t?qs(i,e):lr(t,a,L|D)}}function ei(e,t,i,a,l){e!==t&&fs(t,function(g,p){if(l||(l=new St),he(g))Pf(e,t,p,i,ei,a,l);else{var m=a?a(Ms(e,p),g,p+"",e,t,l):r;m===r&&(m=g),cs(e,p,m)}},qe)}function Pf(e,t,i,a,l,g,p){var m=Ms(e,i),E=Ms(t,i),A=p.get(E);if(A){cs(e,i,A);return}var R=g?g(m,E,i+"",e,t,p):r,P=R===r;if(P){var U=G(E),M=!U&&jt(E),W=!U&&!M&&xn(E);R=E,U||M||W?G(m)?R=m:ve(m)?R=Qe(m):M?(P=!1,R=Fa(E,!0)):W?(P=!1,R=ka(E,!0)):R=[]:dr(E)||gn(E)?(R=m,gn(m)?R=Nu(m):(!he(m)||kt(m))&&(R=ru(E))):P=!1}P&&(p.set(E,R),l(R,E,a,g,p),p.delete(E)),cs(e,i,R)}function ba(e,t){var i=e.length;if(i)return t+=t<0?i:0,Ft(t,i)?e[t]:r}function Ia(e,t,i){t.length?t=ce(t,function(g){return G(g)?function(p){return cn(p,g.length===1?g[0]:g)}:g}):t=[Ke];var a=-1;t=ce(t,Xe(k()));var l=ya(e,function(g,p,m){var E=ce(t,function(A){return A(g)});return{criteria:E,index:++a,value:g}});return th(l,function(g,p){return Bf(g,p,i)})}function Lf(e,t){return Pa(e,t,function(i,a){return qs(e,a)})}function Pa(e,t,i){for(var a=-1,l=t.length,g={};++a<l;){var p=t[a],m=cn(e,p);i(m,p)&&cr(g,Jt(p,e),m)}return g}function xf(e){return function(t){return cn(t,e)}}function Ss(e,t,i,a){var l=a?eh:En,g=-1,p=t.length,m=e;for(e===t&&(t=Qe(t)),i&&(m=ce(e,Xe(i)));++g<p;)for(var E=0,A=t[g],R=i?i(A):A;(E=l(m,R,E,a))>-1;)m!==e&&Qr.call(m,E,1),Qr.call(e,E,1);return e}function La(e,t){for(var i=e?t.length:0,a=i-1;i--;){var l=t[i];if(i==a||l!==g){var g=l;Ft(l)?Qr.call(e,l,1):Ts(e,l)}}return e}function Es(e,t){return e+Kr(ca()*(t-e+1))}function $f(e,t,i,a){for(var l=-1,g=ye(qr((t-e)/(i||1)),0),p=w(g);g--;)p[a?g:++l]=e,e+=i;return p}function ws(e,t){var i="";if(!e||t<1||t>Ne)return i;do t%2&&(i+=e),t=Kr(t/2),t&&(e+=e);while(t);return i}function Y(e,t){return Fs(ou(e,t,Ke),e+"")}function Of(e){return ga($n(e))}function Uf(e,t){var i=$n(e);return ci(i,ln(t,0,i.length))}function cr(e,t,i,a){if(!he(e))return e;t=Jt(t,e);for(var l=-1,g=t.length,p=g-1,m=e;m!=null&&++l<g;){var E=bt(t[l]),A=i;if(E==="__proto__"||E==="constructor"||E==="prototype")return e;if(l!=p){var R=m[E];A=a?a(R,E,m):r,A===r&&(A=he(R)?R:Ft(t[l+1])?[]:{})}or(m,E,A),m=m[E]}return e}var xa=zr?function(e,t){return zr.set(e,t),e}:Ke,Nf=Gr?function(e,t){return Gr(e,"toString",{configurable:!0,enumerable:!1,value:zs(t),writable:!0})}:Ke;function Df(e){return ci($n(e))}function ut(e,t,i){var a=-1,l=e.length;t<0&&(t=-t>l?0:l+t),i=i>l?l:i,i<0&&(i+=l),l=t>i?0:i-t>>>0,t>>>=0;for(var g=w(l);++a<l;)g[a]=e[a+t];return g}function Mf(e,t){var i;return Yt(e,function(a,l,g){return i=t(a,l,g),!i}),!!i}function ti(e,t,i){var a=0,l=e==null?a:e.length;if(typeof t=="number"&&t===t&&l<=Rr){for(;a<l;){var g=a+l>>>1,p=e[g];p!==null&&!Ze(p)&&(i?p<=t:p<t)?a=g+1:l=g}return l}return Cs(e,t,Ke,i)}function Cs(e,t,i,a){var l=0,g=e==null?0:e.length;if(g===0)return 0;t=i(t);for(var p=t!==t,m=t===null,E=Ze(t),A=t===r;l<g;){var R=Kr((l+g)/2),P=i(e[R]),U=P!==r,M=P===null,W=P===P,z=Ze(P);if(p)var H=a||W;else A?H=W&&(a||U):m?H=W&&U&&(a||!M):E?H=W&&U&&!M&&(a||!z):M||z?H=!1:H=a?P<=t:P<t;H?l=R+1:g=R}return De(g,Ar)}function $a(e,t){for(var i=-1,a=e.length,l=0,g=[];++i<a;){var p=e[i],m=t?t(p):p;if(!i||!Et(m,E)){var E=m;g[l++]=p===0?0:p}}return g}function Oa(e){return typeof e=="number"?e:Ze(e)?me:+e}function Je(e){if(typeof e=="string")return e;if(G(e))return ce(e,Je)+"";if(Ze(e))return ha?ha.call(e):"";var t=e+"";return t=="0"&&1/e==-b?"-0":t}function Xt(e,t,i){var a=-1,l=Ur,g=e.length,p=!0,m=[],E=m;if(i)p=!1,l=Ji;else if(g>=u){var A=t?null:zf(e);if(A)return Dr(A);p=!1,l=er,E=new un}else E=t?[]:m;e:for(;++a<g;){var R=e[a],P=t?t(R):R;if(R=i||R!==0?R:0,p&&P===P){for(var U=E.length;U--;)if(E[U]===P)continue e;t&&E.push(P),m.push(R)}else l(E,P,i)||(E!==m&&E.push(P),m.push(R))}return m}function Ts(e,t){t=Jt(t,e);var i=-1,a=t.length;if(!a)return!0;for(var l=e==null||typeof e!="object"&&typeof e!="function";++i<a;){var g=t[i];if(typeof g=="string"){if(g==="__proto__"&&!re.call(e,"__proto__"))return!1;if(g==="constructor"&&i+1<a&&typeof t[i+1]=="string"&&t[i+1]==="prototype"){if(l&&i===0)continue;return!1}}}var p=au(e,t);return p==null||delete p[bt(lt(t))]}function Ua(e,t,i,a){return cr(e,t,i(cn(e,t)),a)}function ni(e,t,i,a){for(var l=e.length,g=a?l:-1;(a?g--:++g<l)&&t(e[g],g,e););return i?ut(e,a?0:g,a?g+1:l):ut(e,a?g+1:0,a?l:g)}function Na(e,t){var i=e;return i instanceof Z&&(i=i.value()),Zi(t,function(a,l){return l.func.apply(l.thisArg,qt([a],l.args))},i)}function ys(e,t,i){var a=e.length;if(a<2)return a?Xt(e[0]):[];for(var l=-1,g=w(a);++l<a;)for(var p=e[l],m=-1;++m<a;)m!=l&&(g[l]=ar(g[l]||p,e[m],t,i));return Xt($e(g,1),t,i)}function Da(e,t,i){for(var a=-1,l=e.length,g=t.length,p={};++a<l;){var m=a<g?t[a]:r;i(p,e[a],m)}return p}function As(e){return ve(e)?e:[]}function Rs(e){return typeof e=="function"?e:Ke}function Jt(e,t){return G(e)?e:Ns(e,t)?[e]:hu(ie(e))}var Ff=Y;function Zt(e,t,i){var a=e.length;return i=i===r?a:i,!t&&i>=a?e:ut(e,t,i)}var Ma=yh||function(e){return xe.clearTimeout(e)};function Fa(e,t){if(t)return e.slice();var i=e.length,a=sa?sa(i):new e.constructor(i);return e.copy(a),a}function bs(e){var t=new e.constructor(e.byteLength);return new Br(t).set(new Br(e)),t}function kf(e,t){var i=t?bs(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}function Wf(e){var t=new e.constructor(e.source,wo.exec(e));return t.lastIndex=e.lastIndex,t}function Hf(e){return sr?ae(sr.call(e)):{}}function ka(e,t){var i=t?bs(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function Wa(e,t){if(e!==t){var i=e!==r,a=e===null,l=e===e,g=Ze(e),p=t!==r,m=t===null,E=t===t,A=Ze(t);if(!m&&!A&&!g&&e>t||g&&p&&E&&!m&&!A||a&&p&&E||!i&&E||!l)return 1;if(!a&&!g&&!A&&e<t||A&&i&&l&&!a&&!g||m&&i&&l||!p&&l||!E)return-1}return 0}function Bf(e,t,i){for(var a=-1,l=e.criteria,g=t.criteria,p=l.length,m=i.length;++a<p;){var E=Wa(l[a],g[a]);if(E){if(a>=m)return E;var A=i[a];return E*(A=="desc"?-1:1)}}return e.index-t.index}function Ha(e,t,i,a){for(var l=-1,g=e.length,p=i.length,m=-1,E=t.length,A=ye(g-p,0),R=w(E+A),P=!a;++m<E;)R[m]=t[m];for(;++l<p;)(P||l<g)&&(R[i[l]]=e[l]);for(;A--;)R[m++]=e[l++];return R}function Ba(e,t,i,a){for(var l=-1,g=e.length,p=-1,m=i.length,E=-1,A=t.length,R=ye(g-m,0),P=w(R+A),U=!a;++l<R;)P[l]=e[l];for(var M=l;++E<A;)P[M+E]=t[E];for(;++p<m;)(U||l<g)&&(P[M+i[p]]=e[l++]);return P}function Qe(e,t){var i=-1,a=e.length;for(t||(t=w(a));++i<a;)t[i]=e[i];return t}function Rt(e,t,i,a){var l=!i;i||(i={});for(var g=-1,p=t.length;++g<p;){var m=t[g],E=a?a(i[m],e[m],m,i,e):r;E===r&&(E=e[m]),l?Nt(i,m,E):or(i,m,E)}return i}function Vf(e,t){return Rt(e,Us(e),t)}function Qf(e,t){return Rt(e,tu(e),t)}function ri(e,t){return function(i,a){var l=G(i)?zc:ff,g=t?t():{};return l(i,e,k(a,2),g)}}function In(e){return Y(function(t,i){var a=-1,l=i.length,g=l>1?i[l-1]:r,p=l>2?i[2]:r;for(g=e.length>3&&typeof g=="function"?(l--,g):r,p&&He(i[0],i[1],p)&&(g=l<3?r:g,l=1),t=ae(t);++a<l;){var m=i[a];m&&e(t,m,a,g)}return t})}function Va(e,t){return function(i,a){if(i==null)return i;if(!Ge(i))return e(i,a);for(var l=i.length,g=t?l:-1,p=ae(i);(t?g--:++g<l)&&a(p[g],g,p)!==!1;);return i}}function Qa(e){return function(t,i,a){for(var l=-1,g=ae(t),p=a(t),m=p.length;m--;){var E=p[e?m:++l];if(i(g[E],E,g)===!1)break}return t}}function Gf(e,t,i){var a=t&F,l=hr(e);function g(){var p=this&&this!==xe&&this instanceof g?l:e;return p.apply(a?i:this,arguments)}return g}function Ga(e){return function(t){t=ie(t);var i=wn(t)?vt(t):r,a=i?i[0]:t.charAt(0),l=i?Zt(i,1).join(""):t.slice(1);return a[e]()+l}}function Pn(e){return function(t){return Zi(Vu(Bu(t).replace(Uc,"")),e,"")}}function hr(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var i=bn(e.prototype),a=e.apply(i,t);return he(a)?a:i}}function qf(e,t,i){var a=hr(e);function l(){for(var g=arguments.length,p=w(g),m=g,E=Ln(l);m--;)p[m]=arguments[m];var A=g<3&&p[0]!==E&&p[g-1]!==E?[]:Kt(p,E);if(g-=A.length,g<i)return Xa(e,t,ii,l.placeholder,r,p,A,r,r,i-g);var R=this&&this!==xe&&this instanceof l?a:e;return Ye(R,this,p)}return l}function qa(e){return function(t,i,a){var l=ae(t);if(!Ge(t)){var g=k(i,3);t=be(t),i=function(m){return g(l[m],m,l)}}var p=e(t,i,a);return p>-1?l[g?t[p]:p]:r}}function Ka(e){return Mt(function(t){var i=t.length,a=i,l=ot.prototype.thru;for(e&&t.reverse();a--;){var g=t[a];if(typeof g!="function")throw new st(h);if(l&&!p&&ui(g)=="wrapper")var p=new ot([],!0)}for(a=p?a:i;++a<i;){g=t[a];var m=ui(g),E=m=="wrapper"?$s(g):r;E&&Ds(E[0])&&E[1]==(we|oe|de|Pe)&&!E[4].length&&E[9]==1?p=p[ui(E[0])].apply(p,E[3]):p=g.length==1&&Ds(g)?p[m]():p.thru(g)}return function(){var A=arguments,R=A[0];if(p&&A.length==1&&G(R))return p.plant(R).value();for(var P=0,U=i?t[P].apply(this,A):R;++P<i;)U=t[P].call(this,U);return U}})}function ii(e,t,i,a,l,g,p,m,E,A){var R=t&we,P=t&F,U=t&te,M=t&(oe|Oe),W=t&Ce,z=U?r:hr(e);function H(){for(var X=arguments.length,j=w(X),je=X;je--;)j[je]=arguments[je];if(M)var Be=Ln(H),et=rh(j,Be);if(a&&(j=Ha(j,a,l,M)),g&&(j=Ba(j,g,p,M)),X-=et,M&&X<A){var Se=Kt(j,Be);return Xa(e,t,ii,H.placeholder,i,j,Se,m,E,A-X)}var wt=P?i:this,Ht=U?wt[e]:e;return X=j.length,m?j=fg(j,m):W&&X>1&&j.reverse(),R&&E<X&&(j.length=E),this&&this!==xe&&this instanceof H&&(Ht=z||hr(Ht)),Ht.apply(wt,j)}return H}function za(e,t){return function(i,a){return Ef(i,e,t(a),{})}}function si(e,t){return function(i,a){var l;if(i===r&&a===r)return t;if(i!==r&&(l=i),a!==r){if(l===r)return a;typeof i=="string"||typeof a=="string"?(i=Je(i),a=Je(a)):(i=Oa(i),a=Oa(a)),l=e(i,a)}return l}}function Is(e){return Mt(function(t){return t=ce(t,Xe(k())),Y(function(i){var a=this;return e(t,function(l){return Ye(l,a,i)})})})}function oi(e,t){t=t===r?" ":Je(t);var i=t.length;if(i<2)return i?ws(t,e):t;var a=ws(t,qr(e/Cn(t)));return wn(t)?Zt(vt(a),0,e).join(""):a.slice(0,e)}function Kf(e,t,i,a){var l=t&F,g=hr(e);function p(){for(var m=-1,E=arguments.length,A=-1,R=a.length,P=w(R+E),U=this&&this!==xe&&this instanceof p?g:e;++A<R;)P[A]=a[A];for(;E--;)P[A++]=arguments[++m];return Ye(U,l?i:this,P)}return p}function Ya(e){return function(t,i,a){return a&&typeof a!="number"&&He(t,i,a)&&(i=a=r),t=Wt(t),i===r?(i=t,t=0):i=Wt(i),a=a===r?t<i?1:-1:Wt(a),$f(t,i,a,e)}}function ai(e){return function(t,i){return typeof t=="string"&&typeof i=="string"||(t=ct(t),i=ct(i)),e(t,i)}}function Xa(e,t,i,a,l,g,p,m,E,A){var R=t&oe,P=R?p:r,U=R?r:p,M=R?g:r,W=R?r:g;t|=R?de:Ue,t&=~(R?Ue:de),t&ge||(t&=-4);var z=[e,t,l,M,P,W,U,m,E,A],H=i.apply(r,z);return Ds(e)&&uu(H,z),H.placeholder=a,lu(H,e,t)}function Ps(e){var t=Te[e];return function(i,a){if(i=ct(i),a=a==null?0:De(K(a),292),a&&la(i)){var l=(ie(i)+"e").split("e"),g=t(l[0]+"e"+(+l[1]+a));return l=(ie(g)+"e").split("e"),+(l[0]+"e"+(+l[1]-a))}return t(i)}}var zf=An&&1/Dr(new An([,-0]))[1]==b?function(e){return new An(e)}:Js;function Ja(e){return function(t){var i=Me(t);return i==_t?ss(t):i==mt?ch(t):nh(t,e(t))}}function Dt(e,t,i,a,l,g,p,m){var E=t&te;if(!E&&typeof e!="function")throw new st(h);var A=a?a.length:0;if(A||(t&=-97,a=l=r),p=p===r?p:ye(K(p),0),m=m===r?m:K(m),A-=l?l.length:0,t&Ue){var R=a,P=l;a=l=r}var U=E?r:$s(e),M=[e,t,i,a,l,R,P,g,p,m];if(U&&lg(M,U),e=M[0],t=M[1],i=M[2],a=M[3],l=M[4],m=M[9]=M[9]===r?E?0:e.length:ye(M[9]-A,0),!m&&t&(oe|Oe)&&(t&=-25),!t||t==F)var W=Gf(e,t,i);else t==oe||t==Oe?W=qf(e,t,m):(t==de||t==(F|de))&&!l.length?W=Kf(e,t,i,a):W=ii.apply(r,M);var z=U?xa:uu;return lu(z(W,M),e,t)}function Za(e,t,i,a){return e===r||Et(e,yn[i])&&!re.call(a,i)?t:e}function ja(e,t,i,a,l,g){return he(e)&&he(t)&&(g.set(t,e),ei(e,t,r,ja,g),g.delete(t)),e}function Yf(e){return dr(e)?r:e}function eu(e,t,i,a,l,g){var p=i&L,m=e.length,E=t.length;if(m!=E&&!(p&&E>m))return!1;var A=g.get(e),R=g.get(t);if(A&&R)return A==t&&R==e;var P=-1,U=!0,M=i&D?new un:r;for(g.set(e,t),g.set(t,e);++P<m;){var W=e[P],z=t[P];if(a)var H=p?a(z,W,P,t,e,g):a(W,z,P,e,t,g);if(H!==r){if(H)continue;U=!1;break}if(M){if(!ji(t,function(X,j){if(!er(M,j)&&(W===X||l(W,X,i,a,g)))return M.push(j)})){U=!1;break}}else if(!(W===z||l(W,z,i,a,g))){U=!1;break}}return g.delete(e),g.delete(t),U}function Xf(e,t,i,a,l,g,p){switch(i){case vn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case jn:return!(e.byteLength!=t.byteLength||!g(new Br(e),new Br(t)));case Qt:case pt:case Yn:return Et(+e,+t);case Ir:return e.name==t.name&&e.message==t.message;case Xn:case Jn:return e==t+"";case _t:var m=ss;case mt:var E=a&L;if(m||(m=Dr),e.size!=t.size&&!E)return!1;var A=p.get(e);if(A)return A==t;a|=D,p.set(e,t);var R=eu(m(e),m(t),a,l,g,p);return p.delete(e),R;case Lr:if(sr)return sr.call(e)==sr.call(t)}return!1}function Jf(e,t,i,a,l,g){var p=i&L,m=Ls(e),E=m.length,A=Ls(t),R=A.length;if(E!=R&&!p)return!1;for(var P=E;P--;){var U=m[P];if(!(p?U in t:re.call(t,U)))return!1}var M=g.get(e),W=g.get(t);if(M&&W)return M==t&&W==e;var z=!0;g.set(e,t),g.set(t,e);for(var H=p;++P<E;){U=m[P];var X=e[U],j=t[U];if(a)var je=p?a(j,X,U,t,e,g):a(X,j,U,e,t,g);if(!(je===r?X===j||l(X,j,i,a,g):je)){z=!1;break}H||(H=U=="constructor")}if(z&&!H){var Be=e.constructor,et=t.constructor;Be!=et&&"constructor"in e&&"constructor"in t&&!(typeof Be=="function"&&Be instanceof Be&&typeof et=="function"&&et instanceof et)&&(z=!1)}return g.delete(e),g.delete(t),z}function Mt(e){return Fs(ou(e,r,pu),e+"")}function Ls(e){return Ea(e,be,Us)}function xs(e){return Ea(e,qe,tu)}var $s=zr?function(e){return zr.get(e)}:Js;function ui(e){for(var t=e.name+"",i=Rn[t],a=re.call(Rn,t)?i.length:0;a--;){var l=i[a],g=l.func;if(g==null||g==e)return l.name}return t}function Ln(e){var t=re.call(f,"placeholder")?f:e;return t.placeholder}function k(){var e=f.iteratee||Ys;return e=e===Ys?Ta:e,arguments.length?e(arguments[0],arguments[1]):e}function li(e,t){var i=e.__data__;return sg(t)?i[typeof t=="string"?"string":"hash"]:i.map}function Os(e){for(var t=be(e),i=t.length;i--;){var a=t[i],l=e[a];t[i]=[a,l,iu(l)]}return t}function hn(e,t){var i=ah(e,t);return Ca(i)?i:r}function Zf(e){var t=re.call(e,on),i=e[on];try{e[on]=r;var a=!0}catch{}var l=Wr.call(e);return a&&(t?e[on]=i:delete e[on]),l}var Us=as?function(e){return e==null?[]:(e=ae(e),Gt(as(e),function(t){return aa.call(e,t)}))}:Zs,tu=as?function(e){for(var t=[];e;)qt(t,Us(e)),e=Vr(e);return t}:Zs,Me=We;(us&&Me(new us(new ArrayBuffer(1)))!=vn||nr&&Me(new nr)!=_t||ls&&Me(ls.resolve())!=mo||An&&Me(new An)!=mt||rr&&Me(new rr)!=Zn)&&(Me=function(e){var t=We(e),i=t==$t?e.constructor:r,a=i?fn(i):"";if(a)switch(a){case Oh:return vn;case Uh:return _t;case Nh:return mo;case Dh:return mt;case Mh:return Zn}return t});function jf(e,t,i){for(var a=-1,l=i.length;++a<l;){var g=i[a],p=g.size;switch(g.type){case"drop":e+=p;break;case"dropRight":t-=p;break;case"take":t=De(t,e+p);break;case"takeRight":e=ye(e,t-p);break}}return{start:e,end:t}}function eg(e){var t=e.match(sc);return t?t[1].split(oc):[]}function nu(e,t,i){t=Jt(t,e);for(var a=-1,l=t.length,g=!1;++a<l;){var p=bt(t[a]);if(!(g=e!=null&&i(e,p)))break;e=e[p]}return g||++a!=l?g:(l=e==null?0:e.length,!!l&&_i(l)&&Ft(p,l)&&(G(e)||gn(e)))}function tg(e){var t=e.length,i=new e.constructor(t);return t&&typeof e[0]=="string"&&re.call(e,"index")&&(i.index=e.index,i.input=e.input),i}function ru(e){return typeof e.constructor=="function"&&!fr(e)?bn(Vr(e)):{}}function ng(e,t,i){var a=e.constructor;switch(t){case jn:return bs(e);case Qt:case pt:return new a(+e);case vn:return kf(e,i);case Oi:case Ui:case Ni:case Di:case Mi:case Fi:case ki:case Wi:case Hi:return ka(e,i);case _t:return new a;case Yn:case Jn:return new a(e);case Xn:return Wf(e);case mt:return new a;case Lr:return Hf(e)}}function rg(e,t){var i=t.length;if(!i)return e;var a=i-1;return t[a]=(i>1?"& ":"")+t[a],t=t.join(i>2?", ":" "),e.replace(ic,`{
9
+ /* [wrapped with `+t+`] */
10
+ `)}function ig(e){return G(e)||gn(e)||!!(ua&&e&&e[ua])}function Ft(e,t){var i=typeof e;return t=t??Ne,!!t&&(i=="number"||i!="symbol"&&pc.test(e))&&e>-1&&e%1==0&&e<t}function He(e,t,i){if(!he(i))return!1;var a=typeof t;return(a=="number"?Ge(i)&&Ft(t,i.length):a=="string"&&t in i)?Et(i[t],e):!1}function Ns(e,t){if(G(e))return!1;var i=typeof e;return i=="number"||i=="symbol"||i=="boolean"||e==null||Ze(e)?!0:ec.test(e)||!jl.test(e)||t!=null&&e in ae(t)}function sg(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ds(e){var t=ui(e),i=f[t];if(typeof i!="function"||!(t in Z.prototype))return!1;if(e===i)return!0;var a=$s(i);return!!a&&e===a[0]}function og(e){return!!ia&&ia in e}var ag=Fr?kt:js;function fr(e){var t=e&&e.constructor,i=typeof t=="function"&&t.prototype||yn;return e===i}function iu(e){return e===e&&!he(e)}function su(e,t){return function(i){return i==null?!1:i[e]===t&&(t!==r||e in ae(i))}}function ug(e){var t=di(e,function(a){return i.size===v&&i.clear(),a}),i=t.cache;return t}function lg(e,t){var i=e[1],a=t[1],l=i|a,g=l<(F|te|we),p=a==we&&i==oe||a==we&&i==Pe&&e[7].length<=t[8]||a==(we|Pe)&&t[7].length<=t[8]&&i==oe;if(!(g||p))return e;a&F&&(e[2]=t[2],l|=i&F?0:ge);var m=t[3];if(m){var E=e[3];e[3]=E?Ha(E,m,t[4]):m,e[4]=E?Kt(e[3],x):t[4]}return m=t[5],m&&(E=e[5],e[5]=E?Ba(E,m,t[6]):m,e[6]=E?Kt(e[5],x):t[6]),m=t[7],m&&(e[7]=m),a&we&&(e[8]=e[8]==null?t[8]:De(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=l,e}function cg(e){var t=[];if(e!=null)for(var i in ae(e))t.push(i);return t}function hg(e){return Wr.call(e)}function ou(e,t,i){return t=ye(t===r?e.length-1:t,0),function(){for(var a=arguments,l=-1,g=ye(a.length-t,0),p=w(g);++l<g;)p[l]=a[t+l];l=-1;for(var m=w(t+1);++l<t;)m[l]=a[l];return m[t]=i(p),Ye(e,this,m)}}function au(e,t){return t.length<2?e:cn(e,ut(t,0,-1))}function fg(e,t){for(var i=e.length,a=De(t.length,i),l=Qe(e);a--;){var g=t[a];e[a]=Ft(g,i)?l[g]:r}return e}function Ms(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var uu=cu(xa),gr=Rh||function(e,t){return xe.setTimeout(e,t)},Fs=cu(Nf);function lu(e,t,i){var a=t+"";return Fs(e,rg(a,gg(eg(a),i)))}function cu(e){var t=0,i=0;return function(){var a=Lh(),l=gt-(a-i);if(i=a,l>0){if(++t>=$)return arguments[0]}else t=0;return e.apply(r,arguments)}}function ci(e,t){var i=-1,a=e.length,l=a-1;for(t=t===r?a:t;++i<t;){var g=Es(i,l),p=e[g];e[g]=e[i],e[i]=p}return e.length=t,e}var hu=ug(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(tc,function(i,a,l,g){t.push(l?g.replace(lc,"$1"):a||i)}),t});function bt(e){if(typeof e=="string"||Ze(e))return e;var t=e+"";return t=="0"&&1/e==-b?"-0":t}function fn(e){if(e!=null){try{return kr.call(e)}catch{}try{return e+""}catch{}}return""}function gg(e,t){return it(Re,function(i){var a="_."+i[0];t&i[1]&&!Ur(e,a)&&e.push(a)}),e.sort()}function fu(e){if(e instanceof Z)return e.clone();var t=new ot(e.__wrapped__,e.__chain__);return t.__actions__=Qe(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function dg(e,t,i){(i?He(e,t,i):t===r)?t=1:t=ye(K(t),0);var a=e==null?0:e.length;if(!a||t<1)return[];for(var l=0,g=0,p=w(qr(a/t));l<a;)p[g++]=ut(e,l,l+=t);return p}function pg(e){for(var t=-1,i=e==null?0:e.length,a=0,l=[];++t<i;){var g=e[t];g&&(l[a++]=g)}return l}function _g(){var e=arguments.length;if(!e)return[];for(var t=w(e-1),i=arguments[0],a=e;a--;)t[a-1]=arguments[a];return qt(G(i)?Qe(i):[i],$e(t,1))}var mg=Y(function(e,t){return ve(e)?ar(e,$e(t,1,ve,!0)):[]}),vg=Y(function(e,t){var i=lt(t);return ve(i)&&(i=r),ve(e)?ar(e,$e(t,1,ve,!0),k(i,2)):[]}),Sg=Y(function(e,t){var i=lt(t);return ve(i)&&(i=r),ve(e)?ar(e,$e(t,1,ve,!0),r,i):[]});function Eg(e,t,i){var a=e==null?0:e.length;return a?(t=i||t===r?1:K(t),ut(e,t<0?0:t,a)):[]}function wg(e,t,i){var a=e==null?0:e.length;return a?(t=i||t===r?1:K(t),t=a-t,ut(e,0,t<0?0:t)):[]}function Cg(e,t){return e&&e.length?ni(e,k(t,3),!0,!0):[]}function Tg(e,t){return e&&e.length?ni(e,k(t,3),!0):[]}function yg(e,t,i,a){var l=e==null?0:e.length;return l?(i&&typeof i!="number"&&He(e,t,i)&&(i=0,a=l),_f(e,t,i,a)):[]}function gu(e,t,i){var a=e==null?0:e.length;if(!a)return-1;var l=i==null?0:K(i);return l<0&&(l=ye(a+l,0)),Nr(e,k(t,3),l)}function du(e,t,i){var a=e==null?0:e.length;if(!a)return-1;var l=a-1;return i!==r&&(l=K(i),l=i<0?ye(a+l,0):De(l,a-1)),Nr(e,k(t,3),l,!0)}function pu(e){var t=e==null?0:e.length;return t?$e(e,1):[]}function Ag(e){var t=e==null?0:e.length;return t?$e(e,b):[]}function Rg(e,t){var i=e==null?0:e.length;return i?(t=t===r?1:K(t),$e(e,t)):[]}function bg(e){for(var t=-1,i=e==null?0:e.length,a={};++t<i;){var l=e[t];a[l[0]]=l[1]}return a}function _u(e){return e&&e.length?e[0]:r}function Ig(e,t,i){var a=e==null?0:e.length;if(!a)return-1;var l=i==null?0:K(i);return l<0&&(l=ye(a+l,0)),En(e,t,l)}function Pg(e){var t=e==null?0:e.length;return t?ut(e,0,-1):[]}var Lg=Y(function(e){var t=ce(e,As);return t.length&&t[0]===e[0]?ps(t):[]}),xg=Y(function(e){var t=lt(e),i=ce(e,As);return t===lt(i)?t=r:i.pop(),i.length&&i[0]===e[0]?ps(i,k(t,2)):[]}),$g=Y(function(e){var t=lt(e),i=ce(e,As);return t=typeof t=="function"?t:r,t&&i.pop(),i.length&&i[0]===e[0]?ps(i,r,t):[]});function Og(e,t){return e==null?"":Ih.call(e,t)}function lt(e){var t=e==null?0:e.length;return t?e[t-1]:r}function Ug(e,t,i){var a=e==null?0:e.length;if(!a)return-1;var l=a;return i!==r&&(l=K(i),l=l<0?ye(a+l,0):De(l,a-1)),t===t?fh(e,t,l):Nr(e,Xo,l,!0)}function Ng(e,t){return e&&e.length?ba(e,K(t)):r}var Dg=Y(mu);function mu(e,t){return e&&e.length&&t&&t.length?Ss(e,t):e}function Mg(e,t,i){return e&&e.length&&t&&t.length?Ss(e,t,k(i,2)):e}function Fg(e,t,i){return e&&e.length&&t&&t.length?Ss(e,t,r,i):e}var kg=Mt(function(e,t){var i=e==null?0:e.length,a=hs(e,t);return La(e,ce(t,function(l){return Ft(l,i)?+l:l}).sort(Wa)),a});function Wg(e,t){var i=[];if(!(e&&e.length))return i;var a=-1,l=[],g=e.length;for(t=k(t,3);++a<g;){var p=e[a];t(p,a,e)&&(i.push(p),l.push(a))}return La(e,l),i}function ks(e){return e==null?e:$h.call(e)}function Hg(e,t,i){var a=e==null?0:e.length;return a?(i&&typeof i!="number"&&He(e,t,i)?(t=0,i=a):(t=t==null?0:K(t),i=i===r?a:K(i)),ut(e,t,i)):[]}function Bg(e,t){return ti(e,t)}function Vg(e,t,i){return Cs(e,t,k(i,2))}function Qg(e,t){var i=e==null?0:e.length;if(i){var a=ti(e,t);if(a<i&&Et(e[a],t))return a}return-1}function Gg(e,t){return ti(e,t,!0)}function qg(e,t,i){return Cs(e,t,k(i,2),!0)}function Kg(e,t){var i=e==null?0:e.length;if(i){var a=ti(e,t,!0)-1;if(Et(e[a],t))return a}return-1}function zg(e){return e&&e.length?$a(e):[]}function Yg(e,t){return e&&e.length?$a(e,k(t,2)):[]}function Xg(e){var t=e==null?0:e.length;return t?ut(e,1,t):[]}function Jg(e,t,i){return e&&e.length?(t=i||t===r?1:K(t),ut(e,0,t<0?0:t)):[]}function Zg(e,t,i){var a=e==null?0:e.length;return a?(t=i||t===r?1:K(t),t=a-t,ut(e,t<0?0:t,a)):[]}function jg(e,t){return e&&e.length?ni(e,k(t,3),!1,!0):[]}function ed(e,t){return e&&e.length?ni(e,k(t,3)):[]}var td=Y(function(e){return Xt($e(e,1,ve,!0))}),nd=Y(function(e){var t=lt(e);return ve(t)&&(t=r),Xt($e(e,1,ve,!0),k(t,2))}),rd=Y(function(e){var t=lt(e);return t=typeof t=="function"?t:r,Xt($e(e,1,ve,!0),r,t)});function id(e){return e&&e.length?Xt(e):[]}function sd(e,t){return e&&e.length?Xt(e,k(t,2)):[]}function od(e,t){return t=typeof t=="function"?t:r,e&&e.length?Xt(e,r,t):[]}function Ws(e){if(!(e&&e.length))return[];var t=0;return e=Gt(e,function(i){if(ve(i))return t=ye(i.length,t),!0}),rs(t,function(i){return ce(e,es(i))})}function vu(e,t){if(!(e&&e.length))return[];var i=Ws(e);return t==null?i:ce(i,function(a){return Ye(t,r,a)})}var ad=Y(function(e,t){return ve(e)?ar(e,t):[]}),ud=Y(function(e){return ys(Gt(e,ve))}),ld=Y(function(e){var t=lt(e);return ve(t)&&(t=r),ys(Gt(e,ve),k(t,2))}),cd=Y(function(e){var t=lt(e);return t=typeof t=="function"?t:r,ys(Gt(e,ve),r,t)}),hd=Y(Ws);function fd(e,t){return Da(e||[],t||[],or)}function gd(e,t){return Da(e||[],t||[],cr)}var dd=Y(function(e){var t=e.length,i=t>1?e[t-1]:r;return i=typeof i=="function"?(e.pop(),i):r,vu(e,i)});function Su(e){var t=f(e);return t.__chain__=!0,t}function pd(e,t){return t(e),e}function hi(e,t){return t(e)}var _d=Mt(function(e){var t=e.length,i=t?e[0]:0,a=this.__wrapped__,l=function(g){return hs(g,e)};return t>1||this.__actions__.length||!(a instanceof Z)||!Ft(i)?this.thru(l):(a=a.slice(i,+i+(t?1:0)),a.__actions__.push({func:hi,args:[l],thisArg:r}),new ot(a,this.__chain__).thru(function(g){return t&&!g.length&&g.push(r),g}))});function md(){return Su(this)}function vd(){return new ot(this.value(),this.__chain__)}function Sd(){this.__values__===r&&(this.__values__=Ou(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function Ed(){return this}function wd(e){for(var t,i=this;i instanceof Xr;){var a=fu(i);a.__index__=0,a.__values__=r,t?l.__wrapped__=a:t=a;var l=a;i=i.__wrapped__}return l.__wrapped__=e,t}function Cd(){var e=this.__wrapped__;if(e instanceof Z){var t=e;return this.__actions__.length&&(t=new Z(this)),t=t.reverse(),t.__actions__.push({func:hi,args:[ks],thisArg:r}),new ot(t,this.__chain__)}return this.thru(ks)}function Td(){return Na(this.__wrapped__,this.__actions__)}var yd=ri(function(e,t,i){re.call(e,i)?++e[i]:Nt(e,i,1)});function Ad(e,t,i){var a=G(e)?zo:pf;return i&&He(e,t,i)&&(t=r),a(e,k(t,3))}function Rd(e,t){var i=G(e)?Gt:va;return i(e,k(t,3))}var bd=qa(gu),Id=qa(du);function Pd(e,t){return $e(fi(e,t),1)}function Ld(e,t){return $e(fi(e,t),b)}function xd(e,t,i){return i=i===r?1:K(i),$e(fi(e,t),i)}function Eu(e,t){var i=G(e)?it:Yt;return i(e,k(t,3))}function wu(e,t){var i=G(e)?Yc:ma;return i(e,k(t,3))}var $d=ri(function(e,t,i){re.call(e,i)?e[i].push(t):Nt(e,i,[t])});function Od(e,t,i,a){e=Ge(e)?e:$n(e),i=i&&!a?K(i):0;var l=e.length;return i<0&&(i=ye(l+i,0)),mi(e)?i<=l&&e.indexOf(t,i)>-1:!!l&&En(e,t,i)>-1}var Ud=Y(function(e,t,i){var a=-1,l=typeof t=="function",g=Ge(e)?w(e.length):[];return Yt(e,function(p){g[++a]=l?Ye(t,p,i):ur(p,t,i)}),g}),Nd=ri(function(e,t,i){Nt(e,i,t)});function fi(e,t){var i=G(e)?ce:ya;return i(e,k(t,3))}function Dd(e,t,i,a){return e==null?[]:(G(t)||(t=t==null?[]:[t]),i=a?r:i,G(i)||(i=i==null?[]:[i]),Ia(e,t,i))}var Md=ri(function(e,t,i){e[i?0:1].push(t)},function(){return[[],[]]});function Fd(e,t,i){var a=G(e)?Zi:Zo,l=arguments.length<3;return a(e,k(t,4),i,l,Yt)}function kd(e,t,i){var a=G(e)?Xc:Zo,l=arguments.length<3;return a(e,k(t,4),i,l,ma)}function Wd(e,t){var i=G(e)?Gt:va;return i(e,pi(k(t,3)))}function Hd(e){var t=G(e)?ga:Of;return t(e)}function Bd(e,t,i){(i?He(e,t,i):t===r)?t=1:t=K(t);var a=G(e)?cf:Uf;return a(e,t)}function Vd(e){var t=G(e)?hf:Df;return t(e)}function Qd(e){if(e==null)return 0;if(Ge(e))return mi(e)?Cn(e):e.length;var t=Me(e);return t==_t||t==mt?e.size:ms(e).length}function Gd(e,t,i){var a=G(e)?ji:Mf;return i&&He(e,t,i)&&(t=r),a(e,k(t,3))}var qd=Y(function(e,t){if(e==null)return[];var i=t.length;return i>1&&He(e,t[0],t[1])?t=[]:i>2&&He(t[0],t[1],t[2])&&(t=[t[0]]),Ia(e,$e(t,1),[])}),gi=Ah||function(){return xe.Date.now()};function Kd(e,t){if(typeof t!="function")throw new st(h);return e=K(e),function(){if(--e<1)return t.apply(this,arguments)}}function Cu(e,t,i){return t=i?r:t,t=e&&t==null?e.length:t,Dt(e,we,r,r,r,r,t)}function Tu(e,t){var i;if(typeof t!="function")throw new st(h);return e=K(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=r),i}}var Hs=Y(function(e,t,i){var a=F;if(i.length){var l=Kt(i,Ln(Hs));a|=de}return Dt(e,a,t,i,l)}),yu=Y(function(e,t,i){var a=F|te;if(i.length){var l=Kt(i,Ln(yu));a|=de}return Dt(t,a,e,i,l)});function Au(e,t,i){t=i?r:t;var a=Dt(e,oe,r,r,r,r,r,t);return a.placeholder=Au.placeholder,a}function Ru(e,t,i){t=i?r:t;var a=Dt(e,Oe,r,r,r,r,r,t);return a.placeholder=Ru.placeholder,a}function bu(e,t,i){var a,l,g,p,m,E,A=0,R=!1,P=!1,U=!0;if(typeof e!="function")throw new st(h);t=ct(t)||0,he(i)&&(R=!!i.leading,P="maxWait"in i,g=P?ye(ct(i.maxWait)||0,t):g,U="trailing"in i?!!i.trailing:U);function M(Se){var wt=a,Ht=l;return a=l=r,A=Se,p=e.apply(Ht,wt),p}function W(Se){return A=Se,m=gr(X,t),R?M(Se):p}function z(Se){var wt=Se-E,Ht=Se-A,qu=t-wt;return P?De(qu,g-Ht):qu}function H(Se){var wt=Se-E,Ht=Se-A;return E===r||wt>=t||wt<0||P&&Ht>=g}function X(){var Se=gi();if(H(Se))return j(Se);m=gr(X,z(Se))}function j(Se){return m=r,U&&a?M(Se):(a=l=r,p)}function je(){m!==r&&Ma(m),A=0,a=E=l=m=r}function Be(){return m===r?p:j(gi())}function et(){var Se=gi(),wt=H(Se);if(a=arguments,l=this,E=Se,wt){if(m===r)return W(E);if(P)return Ma(m),m=gr(X,t),M(E)}return m===r&&(m=gr(X,t)),p}return et.cancel=je,et.flush=Be,et}var zd=Y(function(e,t){return _a(e,1,t)}),Yd=Y(function(e,t,i){return _a(e,ct(t)||0,i)});function Xd(e){return Dt(e,Ce)}function di(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new st(h);var i=function(){var a=arguments,l=t?t.apply(this,a):a[0],g=i.cache;if(g.has(l))return g.get(l);var p=e.apply(this,a);return i.cache=g.set(l,p)||g,p};return i.cache=new(di.Cache||Ut),i}di.Cache=Ut;function pi(e){if(typeof e!="function")throw new st(h);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Jd(e){return Tu(2,e)}var Zd=Ff(function(e,t){t=t.length==1&&G(t[0])?ce(t[0],Xe(k())):ce($e(t,1),Xe(k()));var i=t.length;return Y(function(a){for(var l=-1,g=De(a.length,i);++l<g;)a[l]=t[l].call(this,a[l]);return Ye(e,this,a)})}),Bs=Y(function(e,t){var i=Kt(t,Ln(Bs));return Dt(e,de,r,t,i)}),Iu=Y(function(e,t){var i=Kt(t,Ln(Iu));return Dt(e,Ue,r,t,i)}),jd=Mt(function(e,t){return Dt(e,Pe,r,r,r,t)});function ep(e,t){if(typeof e!="function")throw new st(h);return t=t===r?t:K(t),Y(e,t)}function tp(e,t){if(typeof e!="function")throw new st(h);return t=t==null?0:ye(K(t),0),Y(function(i){var a=i[t],l=Zt(i,0,t);return a&&qt(l,a),Ye(e,this,l)})}function np(e,t,i){var a=!0,l=!0;if(typeof e!="function")throw new st(h);return he(i)&&(a="leading"in i?!!i.leading:a,l="trailing"in i?!!i.trailing:l),bu(e,t,{leading:a,maxWait:t,trailing:l})}function rp(e){return Cu(e,1)}function ip(e,t){return Bs(Rs(t),e)}function sp(){if(!arguments.length)return[];var e=arguments[0];return G(e)?e:[e]}function op(e){return at(e,I)}function ap(e,t){return t=typeof t=="function"?t:r,at(e,I,t)}function up(e){return at(e,C|I)}function lp(e,t){return t=typeof t=="function"?t:r,at(e,C|I,t)}function cp(e,t){return t==null||pa(e,t,be(t))}function Et(e,t){return e===t||e!==e&&t!==t}var hp=ai(ds),fp=ai(function(e,t){return e>=t}),gn=wa((function(){return arguments})())?wa:function(e){return fe(e)&&re.call(e,"callee")&&!aa.call(e,"callee")},G=w.isArray,gp=Bo?Xe(Bo):wf;function Ge(e){return e!=null&&_i(e.length)&&!kt(e)}function ve(e){return fe(e)&&Ge(e)}function dp(e){return e===!0||e===!1||fe(e)&&We(e)==Qt}var jt=bh||js,pp=Vo?Xe(Vo):Cf;function _p(e){return fe(e)&&e.nodeType===1&&!dr(e)}function mp(e){if(e==null)return!0;if(Ge(e)&&(G(e)||typeof e=="string"||typeof e.splice=="function"||jt(e)||xn(e)||gn(e)))return!e.length;var t=Me(e);if(t==_t||t==mt)return!e.size;if(fr(e))return!ms(e).length;for(var i in e)if(re.call(e,i))return!1;return!0}function vp(e,t){return lr(e,t)}function Sp(e,t,i){i=typeof i=="function"?i:r;var a=i?i(e,t):r;return a===r?lr(e,t,r,i):!!a}function Vs(e){if(!fe(e))return!1;var t=We(e);return t==Ir||t==$i||typeof e.message=="string"&&typeof e.name=="string"&&!dr(e)}function Ep(e){return typeof e=="number"&&la(e)}function kt(e){if(!he(e))return!1;var t=We(e);return t==Pr||t==_o||t==br||t==Vl}function Pu(e){return typeof e=="number"&&e==K(e)}function _i(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ne}function he(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function fe(e){return e!=null&&typeof e=="object"}var Lu=Qo?Xe(Qo):yf;function wp(e,t){return e===t||_s(e,t,Os(t))}function Cp(e,t,i){return i=typeof i=="function"?i:r,_s(e,t,Os(t),i)}function Tp(e){return xu(e)&&e!=+e}function yp(e){if(ag(e))throw new V(c);return Ca(e)}function Ap(e){return e===null}function Rp(e){return e==null}function xu(e){return typeof e=="number"||fe(e)&&We(e)==Yn}function dr(e){if(!fe(e)||We(e)!=$t)return!1;var t=Vr(e);if(t===null)return!0;var i=re.call(t,"constructor")&&t.constructor;return typeof i=="function"&&i instanceof i&&kr.call(i)==wh}var Qs=Go?Xe(Go):Af;function bp(e){return Pu(e)&&e>=-Ne&&e<=Ne}var $u=qo?Xe(qo):Rf;function mi(e){return typeof e=="string"||!G(e)&&fe(e)&&We(e)==Jn}function Ze(e){return typeof e=="symbol"||fe(e)&&We(e)==Lr}var xn=Ko?Xe(Ko):bf;function Ip(e){return e===r}function Pp(e){return fe(e)&&Me(e)==Zn}function Lp(e){return fe(e)&&We(e)==Gl}var xp=ai(vs),$p=ai(function(e,t){return e<=t});function Ou(e){if(!e)return[];if(Ge(e))return mi(e)?vt(e):Qe(e);if(tr&&e[tr])return lh(e[tr]());var t=Me(e),i=t==_t?ss:t==mt?Dr:$n;return i(e)}function Wt(e){if(!e)return e===0?e:0;if(e=ct(e),e===b||e===-b){var t=e<0?-1:1;return t*ee}return e===e?e:0}function K(e){var t=Wt(e),i=t%1;return t===t?i?t-i:t:0}function Uu(e){return e?ln(K(e),0,Le):0}function ct(e){if(typeof e=="number")return e;if(Ze(e))return me;if(he(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=he(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=jo(e);var i=fc.test(e);return i||dc.test(e)?qc(e.slice(2),i?2:8):hc.test(e)?me:+e}function Nu(e){return Rt(e,qe(e))}function Op(e){return e?ln(K(e),-Ne,Ne):e===0?e:0}function ie(e){return e==null?"":Je(e)}var Up=In(function(e,t){if(fr(t)||Ge(t)){Rt(t,be(t),e);return}for(var i in t)re.call(t,i)&&or(e,i,t[i])}),Du=In(function(e,t){Rt(t,qe(t),e)}),vi=In(function(e,t,i,a){Rt(t,qe(t),e,a)}),Np=In(function(e,t,i,a){Rt(t,be(t),e,a)}),Dp=Mt(hs);function Mp(e,t){var i=bn(e);return t==null?i:da(i,t)}var Fp=Y(function(e,t){e=ae(e);var i=-1,a=t.length,l=a>2?t[2]:r;for(l&&He(t[0],t[1],l)&&(a=1);++i<a;)for(var g=t[i],p=qe(g),m=-1,E=p.length;++m<E;){var A=p[m],R=e[A];(R===r||Et(R,yn[A])&&!re.call(e,A))&&(e[A]=g[A])}return e}),kp=Y(function(e){return e.push(r,ja),Ye(Mu,r,e)});function Wp(e,t){return Yo(e,k(t,3),At)}function Hp(e,t){return Yo(e,k(t,3),gs)}function Bp(e,t){return e==null?e:fs(e,k(t,3),qe)}function Vp(e,t){return e==null?e:Sa(e,k(t,3),qe)}function Qp(e,t){return e&&At(e,k(t,3))}function Gp(e,t){return e&&gs(e,k(t,3))}function qp(e){return e==null?[]:jr(e,be(e))}function Kp(e){return e==null?[]:jr(e,qe(e))}function Gs(e,t,i){var a=e==null?r:cn(e,t);return a===r?i:a}function zp(e,t){return e!=null&&nu(e,t,mf)}function qs(e,t){return e!=null&&nu(e,t,vf)}var Yp=za(function(e,t,i){t!=null&&typeof t.toString!="function"&&(t=Wr.call(t)),e[t]=i},zs(Ke)),Xp=za(function(e,t,i){t!=null&&typeof t.toString!="function"&&(t=Wr.call(t)),re.call(e,t)?e[t].push(i):e[t]=[i]},k),Jp=Y(ur);function be(e){return Ge(e)?fa(e):ms(e)}function qe(e){return Ge(e)?fa(e,!0):If(e)}function Zp(e,t){var i={};return t=k(t,3),At(e,function(a,l,g){Nt(i,t(a,l,g),a)}),i}function jp(e,t){var i={};return t=k(t,3),At(e,function(a,l,g){Nt(i,l,t(a,l,g))}),i}var e_=In(function(e,t,i){ei(e,t,i)}),Mu=In(function(e,t,i,a){ei(e,t,i,a)}),t_=Mt(function(e,t){var i={};if(e==null)return i;var a=!1;t=ce(t,function(g){return g=Jt(g,e),a||(a=g.length>1),g}),Rt(e,xs(e),i),a&&(i=at(i,C|y|I,Yf));for(var l=t.length;l--;)Ts(i,t[l]);return i});function n_(e,t){return Fu(e,pi(k(t)))}var r_=Mt(function(e,t){return e==null?{}:Lf(e,t)});function Fu(e,t){if(e==null)return{};var i=ce(xs(e),function(a){return[a]});return t=k(t),Pa(e,i,function(a,l){return t(a,l[0])})}function i_(e,t,i){t=Jt(t,e);var a=-1,l=t.length;for(l||(l=1,e=r);++a<l;){var g=e==null?r:e[bt(t[a])];g===r&&(a=l,g=i),e=kt(g)?g.call(e):g}return e}function s_(e,t,i){return e==null?e:cr(e,t,i)}function o_(e,t,i,a){return a=typeof a=="function"?a:r,e==null?e:cr(e,t,i,a)}var ku=Ja(be),Wu=Ja(qe);function a_(e,t,i){var a=G(e),l=a||jt(e)||xn(e);if(t=k(t,4),i==null){var g=e&&e.constructor;l?i=a?new g:[]:he(e)?i=kt(g)?bn(Vr(e)):{}:i={}}return(l?it:At)(e,function(p,m,E){return t(i,p,m,E)}),i}function u_(e,t){return e==null?!0:Ts(e,t)}function l_(e,t,i){return e==null?e:Ua(e,t,Rs(i))}function c_(e,t,i,a){return a=typeof a=="function"?a:r,e==null?e:Ua(e,t,Rs(i),a)}function $n(e){return e==null?[]:is(e,be(e))}function h_(e){return e==null?[]:is(e,qe(e))}function f_(e,t,i){return i===r&&(i=t,t=r),i!==r&&(i=ct(i),i=i===i?i:0),t!==r&&(t=ct(t),t=t===t?t:0),ln(ct(e),t,i)}function g_(e,t,i){return t=Wt(t),i===r?(i=t,t=0):i=Wt(i),e=ct(e),Sf(e,t,i)}function d_(e,t,i){if(i&&typeof i!="boolean"&&He(e,t,i)&&(t=i=r),i===r&&(typeof t=="boolean"?(i=t,t=r):typeof e=="boolean"&&(i=e,e=r)),e===r&&t===r?(e=0,t=1):(e=Wt(e),t===r?(t=e,e=0):t=Wt(t)),e>t){var a=e;e=t,t=a}if(i||e%1||t%1){var l=ca();return De(e+l*(t-e+Gc("1e-"+((l+"").length-1))),t)}return Es(e,t)}var p_=Pn(function(e,t,i){return t=t.toLowerCase(),e+(i?Hu(t):t)});function Hu(e){return Ks(ie(e).toLowerCase())}function Bu(e){return e=ie(e),e&&e.replace(_c,ih).replace(Nc,"")}function __(e,t,i){e=ie(e),t=Je(t);var a=e.length;i=i===r?a:ln(K(i),0,a);var l=i;return i-=t.length,i>=0&&e.slice(i,l)==t}function m_(e){return e=ie(e),e&&Xl.test(e)?e.replace(So,sh):e}function v_(e){return e=ie(e),e&&nc.test(e)?e.replace(Bi,"\\$&"):e}var S_=Pn(function(e,t,i){return e+(i?"-":"")+t.toLowerCase()}),E_=Pn(function(e,t,i){return e+(i?" ":"")+t.toLowerCase()}),w_=Ga("toLowerCase");function C_(e,t,i){e=ie(e),t=K(t);var a=t?Cn(e):0;if(!t||a>=t)return e;var l=(t-a)/2;return oi(Kr(l),i)+e+oi(qr(l),i)}function T_(e,t,i){e=ie(e),t=K(t);var a=t?Cn(e):0;return t&&a<t?e+oi(t-a,i):e}function y_(e,t,i){e=ie(e),t=K(t);var a=t?Cn(e):0;return t&&a<t?oi(t-a,i)+e:e}function A_(e,t,i){return i||t==null?t=0:t&&(t=+t),xh(ie(e).replace(Vi,""),t||0)}function R_(e,t,i){return(i?He(e,t,i):t===r)?t=1:t=K(t),ws(ie(e),t)}function b_(){var e=arguments,t=ie(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var I_=Pn(function(e,t,i){return e+(i?"_":"")+t.toLowerCase()});function P_(e,t,i){return i&&typeof i!="number"&&He(e,t,i)&&(t=i=r),i=i===r?Le:i>>>0,i?(e=ie(e),e&&(typeof t=="string"||t!=null&&!Qs(t))&&(t=Je(t),!t&&wn(e))?Zt(vt(e),0,i):e.split(t,i)):[]}var L_=Pn(function(e,t,i){return e+(i?" ":"")+Ks(t)});function x_(e,t,i){return e=ie(e),i=i==null?0:ln(K(i),0,e.length),t=Je(t),e.slice(i,i+t.length)==t}function $_(e,t,i){var a=f.templateSettings;i&&He(e,t,i)&&(t=r),e=ie(e),t=vi({},t,a,Za);var l=vi({},t.imports,a.imports,Za),g=be(l),p=is(l,g),m,E,A=0,R=t.interpolate||xr,P="__p += '",U=os((t.escape||xr).source+"|"+R.source+"|"+(R===Eo?cc:xr).source+"|"+(t.evaluate||xr).source+"|$","g"),M="//# sourceURL="+(re.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Wc+"]")+`
11
+ `;e.replace(U,function(H,X,j,je,Be,et){return j||(j=je),P+=e.slice(A,et).replace(mc,oh),X&&(m=!0,P+=`' +
12
+ __e(`+X+`) +
13
+ '`),Be&&(E=!0,P+=`';
14
+ `+Be+`;
15
+ __p += '`),j&&(P+=`' +
16
+ ((__t = (`+j+`)) == null ? '' : __t) +
17
+ '`),A=et+H.length,H}),P+=`';
18
+ `;var W=re.call(t,"variable")&&t.variable;if(!W)P=`with (obj) {
19
+ `+P+`
20
+ }
21
+ `;else if(uc.test(W))throw new V(d);P=(E?P.replace(ql,""):P).replace(Kl,"$1").replace(zl,"$1;"),P="function("+(W||"obj")+`) {
22
+ `+(W?"":`obj || (obj = {});
23
+ `)+"var __t, __p = ''"+(m?", __e = _.escape":"")+(E?`, __j = Array.prototype.join;
24
+ function print() { __p += __j.call(arguments, '') }
25
+ `:`;
26
+ `)+P+`return __p
27
+ }`;var z=Qu(function(){return ne(g,M+"return "+P).apply(r,p)});if(z.source=P,Vs(z))throw z;return z}function O_(e){return ie(e).toLowerCase()}function U_(e){return ie(e).toUpperCase()}function N_(e,t,i){if(e=ie(e),e&&(i||t===r))return jo(e);if(!e||!(t=Je(t)))return e;var a=vt(e),l=vt(t),g=ea(a,l),p=ta(a,l)+1;return Zt(a,g,p).join("")}function D_(e,t,i){if(e=ie(e),e&&(i||t===r))return e.slice(0,ra(e)+1);if(!e||!(t=Je(t)))return e;var a=vt(e),l=ta(a,vt(t))+1;return Zt(a,0,l).join("")}function M_(e,t,i){if(e=ie(e),e&&(i||t===r))return e.replace(Vi,"");if(!e||!(t=Je(t)))return e;var a=vt(e),l=ea(a,vt(t));return Zt(a,l).join("")}function F_(e,t){var i=pe,a=_e;if(he(t)){var l="separator"in t?t.separator:l;i="length"in t?K(t.length):i,a="omission"in t?Je(t.omission):a}e=ie(e);var g=e.length;if(wn(e)){var p=vt(e);g=p.length}if(i>=g)return e;var m=i-Cn(a);if(m<1)return a;var E=p?Zt(p,0,m).join(""):e.slice(0,m);if(l===r)return E+a;if(p&&(m+=E.length-m),Qs(l)){if(e.slice(m).search(l)){var A,R=E;for(l.global||(l=os(l.source,ie(wo.exec(l))+"g")),l.lastIndex=0;A=l.exec(R);)var P=A.index;E=E.slice(0,P===r?m:P)}}else if(e.indexOf(Je(l),m)!=m){var U=E.lastIndexOf(l);U>-1&&(E=E.slice(0,U))}return E+a}function k_(e){return e=ie(e),e&&Yl.test(e)?e.replace(vo,gh):e}var W_=Pn(function(e,t,i){return e+(i?" ":"")+t.toUpperCase()}),Ks=Ga("toUpperCase");function Vu(e,t,i){return e=ie(e),t=i?r:t,t===r?uh(e)?_h(e):jc(e):e.match(t)||[]}var Qu=Y(function(e,t){try{return Ye(e,r,t)}catch(i){return Vs(i)?i:new V(i)}}),H_=Mt(function(e,t){return it(t,function(i){i=bt(i),Nt(e,i,Hs(e[i],e))}),e});function B_(e){var t=e==null?0:e.length,i=k();return e=t?ce(e,function(a){if(typeof a[1]!="function")throw new st(h);return[i(a[0]),a[1]]}):[],Y(function(a){for(var l=-1;++l<t;){var g=e[l];if(Ye(g[0],this,a))return Ye(g[1],this,a)}})}function V_(e){return df(at(e,C))}function zs(e){return function(){return e}}function Q_(e,t){return e==null||e!==e?t:e}var G_=Ka(),q_=Ka(!0);function Ke(e){return e}function Ys(e){return Ta(typeof e=="function"?e:at(e,C))}function K_(e){return Aa(at(e,C))}function z_(e,t){return Ra(e,at(t,C))}var Y_=Y(function(e,t){return function(i){return ur(i,e,t)}}),X_=Y(function(e,t){return function(i){return ur(e,i,t)}});function Xs(e,t,i){var a=be(t),l=jr(t,a);i==null&&!(he(t)&&(l.length||!a.length))&&(i=t,t=e,e=this,l=jr(t,be(t)));var g=!(he(i)&&"chain"in i)||!!i.chain,p=kt(e);return it(l,function(m){var E=t[m];e[m]=E,p&&(e.prototype[m]=function(){var A=this.__chain__;if(g||A){var R=e(this.__wrapped__),P=R.__actions__=Qe(this.__actions__);return P.push({func:E,args:arguments,thisArg:e}),R.__chain__=A,R}return E.apply(e,qt([this.value()],arguments))})}),e}function J_(){return xe._===this&&(xe._=Ch),this}function Js(){}function Z_(e){return e=K(e),Y(function(t){return ba(t,e)})}var j_=Is(ce),em=Is(zo),tm=Is(ji);function Gu(e){return Ns(e)?es(bt(e)):xf(e)}function nm(e){return function(t){return e==null?r:cn(e,t)}}var rm=Ya(),im=Ya(!0);function Zs(){return[]}function js(){return!1}function sm(){return{}}function om(){return""}function am(){return!0}function um(e,t){if(e=K(e),e<1||e>Ne)return[];var i=Le,a=De(e,Le);t=k(t),e-=Le;for(var l=rs(a,t);++i<e;)t(i);return l}function lm(e){return G(e)?ce(e,bt):Ze(e)?[e]:Qe(hu(ie(e)))}function cm(e){var t=++Eh;return ie(e)+t}var hm=si(function(e,t){return e+t},0),fm=Ps("ceil"),gm=si(function(e,t){return e/t},1),dm=Ps("floor");function pm(e){return e&&e.length?Zr(e,Ke,ds):r}function _m(e,t){return e&&e.length?Zr(e,k(t,2),ds):r}function mm(e){return Jo(e,Ke)}function vm(e,t){return Jo(e,k(t,2))}function Sm(e){return e&&e.length?Zr(e,Ke,vs):r}function Em(e,t){return e&&e.length?Zr(e,k(t,2),vs):r}var wm=si(function(e,t){return e*t},1),Cm=Ps("round"),Tm=si(function(e,t){return e-t},0);function ym(e){return e&&e.length?ns(e,Ke):0}function Am(e,t){return e&&e.length?ns(e,k(t,2)):0}return f.after=Kd,f.ary=Cu,f.assign=Up,f.assignIn=Du,f.assignInWith=vi,f.assignWith=Np,f.at=Dp,f.before=Tu,f.bind=Hs,f.bindAll=H_,f.bindKey=yu,f.castArray=sp,f.chain=Su,f.chunk=dg,f.compact=pg,f.concat=_g,f.cond=B_,f.conforms=V_,f.constant=zs,f.countBy=yd,f.create=Mp,f.curry=Au,f.curryRight=Ru,f.debounce=bu,f.defaults=Fp,f.defaultsDeep=kp,f.defer=zd,f.delay=Yd,f.difference=mg,f.differenceBy=vg,f.differenceWith=Sg,f.drop=Eg,f.dropRight=wg,f.dropRightWhile=Cg,f.dropWhile=Tg,f.fill=yg,f.filter=Rd,f.flatMap=Pd,f.flatMapDeep=Ld,f.flatMapDepth=xd,f.flatten=pu,f.flattenDeep=Ag,f.flattenDepth=Rg,f.flip=Xd,f.flow=G_,f.flowRight=q_,f.fromPairs=bg,f.functions=qp,f.functionsIn=Kp,f.groupBy=$d,f.initial=Pg,f.intersection=Lg,f.intersectionBy=xg,f.intersectionWith=$g,f.invert=Yp,f.invertBy=Xp,f.invokeMap=Ud,f.iteratee=Ys,f.keyBy=Nd,f.keys=be,f.keysIn=qe,f.map=fi,f.mapKeys=Zp,f.mapValues=jp,f.matches=K_,f.matchesProperty=z_,f.memoize=di,f.merge=e_,f.mergeWith=Mu,f.method=Y_,f.methodOf=X_,f.mixin=Xs,f.negate=pi,f.nthArg=Z_,f.omit=t_,f.omitBy=n_,f.once=Jd,f.orderBy=Dd,f.over=j_,f.overArgs=Zd,f.overEvery=em,f.overSome=tm,f.partial=Bs,f.partialRight=Iu,f.partition=Md,f.pick=r_,f.pickBy=Fu,f.property=Gu,f.propertyOf=nm,f.pull=Dg,f.pullAll=mu,f.pullAllBy=Mg,f.pullAllWith=Fg,f.pullAt=kg,f.range=rm,f.rangeRight=im,f.rearg=jd,f.reject=Wd,f.remove=Wg,f.rest=ep,f.reverse=ks,f.sampleSize=Bd,f.set=s_,f.setWith=o_,f.shuffle=Vd,f.slice=Hg,f.sortBy=qd,f.sortedUniq=zg,f.sortedUniqBy=Yg,f.split=P_,f.spread=tp,f.tail=Xg,f.take=Jg,f.takeRight=Zg,f.takeRightWhile=jg,f.takeWhile=ed,f.tap=pd,f.throttle=np,f.thru=hi,f.toArray=Ou,f.toPairs=ku,f.toPairsIn=Wu,f.toPath=lm,f.toPlainObject=Nu,f.transform=a_,f.unary=rp,f.union=td,f.unionBy=nd,f.unionWith=rd,f.uniq=id,f.uniqBy=sd,f.uniqWith=od,f.unset=u_,f.unzip=Ws,f.unzipWith=vu,f.update=l_,f.updateWith=c_,f.values=$n,f.valuesIn=h_,f.without=ad,f.words=Vu,f.wrap=ip,f.xor=ud,f.xorBy=ld,f.xorWith=cd,f.zip=hd,f.zipObject=fd,f.zipObjectDeep=gd,f.zipWith=dd,f.entries=ku,f.entriesIn=Wu,f.extend=Du,f.extendWith=vi,Xs(f,f),f.add=hm,f.attempt=Qu,f.camelCase=p_,f.capitalize=Hu,f.ceil=fm,f.clamp=f_,f.clone=op,f.cloneDeep=up,f.cloneDeepWith=lp,f.cloneWith=ap,f.conformsTo=cp,f.deburr=Bu,f.defaultTo=Q_,f.divide=gm,f.endsWith=__,f.eq=Et,f.escape=m_,f.escapeRegExp=v_,f.every=Ad,f.find=bd,f.findIndex=gu,f.findKey=Wp,f.findLast=Id,f.findLastIndex=du,f.findLastKey=Hp,f.floor=dm,f.forEach=Eu,f.forEachRight=wu,f.forIn=Bp,f.forInRight=Vp,f.forOwn=Qp,f.forOwnRight=Gp,f.get=Gs,f.gt=hp,f.gte=fp,f.has=zp,f.hasIn=qs,f.head=_u,f.identity=Ke,f.includes=Od,f.indexOf=Ig,f.inRange=g_,f.invoke=Jp,f.isArguments=gn,f.isArray=G,f.isArrayBuffer=gp,f.isArrayLike=Ge,f.isArrayLikeObject=ve,f.isBoolean=dp,f.isBuffer=jt,f.isDate=pp,f.isElement=_p,f.isEmpty=mp,f.isEqual=vp,f.isEqualWith=Sp,f.isError=Vs,f.isFinite=Ep,f.isFunction=kt,f.isInteger=Pu,f.isLength=_i,f.isMap=Lu,f.isMatch=wp,f.isMatchWith=Cp,f.isNaN=Tp,f.isNative=yp,f.isNil=Rp,f.isNull=Ap,f.isNumber=xu,f.isObject=he,f.isObjectLike=fe,f.isPlainObject=dr,f.isRegExp=Qs,f.isSafeInteger=bp,f.isSet=$u,f.isString=mi,f.isSymbol=Ze,f.isTypedArray=xn,f.isUndefined=Ip,f.isWeakMap=Pp,f.isWeakSet=Lp,f.join=Og,f.kebabCase=S_,f.last=lt,f.lastIndexOf=Ug,f.lowerCase=E_,f.lowerFirst=w_,f.lt=xp,f.lte=$p,f.max=pm,f.maxBy=_m,f.mean=mm,f.meanBy=vm,f.min=Sm,f.minBy=Em,f.stubArray=Zs,f.stubFalse=js,f.stubObject=sm,f.stubString=om,f.stubTrue=am,f.multiply=wm,f.nth=Ng,f.noConflict=J_,f.noop=Js,f.now=gi,f.pad=C_,f.padEnd=T_,f.padStart=y_,f.parseInt=A_,f.random=d_,f.reduce=Fd,f.reduceRight=kd,f.repeat=R_,f.replace=b_,f.result=i_,f.round=Cm,f.runInContext=S,f.sample=Hd,f.size=Qd,f.snakeCase=I_,f.some=Gd,f.sortedIndex=Bg,f.sortedIndexBy=Vg,f.sortedIndexOf=Qg,f.sortedLastIndex=Gg,f.sortedLastIndexBy=qg,f.sortedLastIndexOf=Kg,f.startCase=L_,f.startsWith=x_,f.subtract=Tm,f.sum=ym,f.sumBy=Am,f.template=$_,f.times=um,f.toFinite=Wt,f.toInteger=K,f.toLength=Uu,f.toLower=O_,f.toNumber=ct,f.toSafeInteger=Op,f.toString=ie,f.toUpper=U_,f.trim=N_,f.trimEnd=D_,f.trimStart=M_,f.truncate=F_,f.unescape=k_,f.uniqueId=cm,f.upperCase=W_,f.upperFirst=Ks,f.each=Eu,f.eachRight=wu,f.first=_u,Xs(f,(function(){var e={};return At(f,function(t,i){re.call(f.prototype,i)||(e[i]=t)}),e})(),{chain:!1}),f.VERSION=o,it(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){f[e].placeholder=f}),it(["drop","take"],function(e,t){Z.prototype[e]=function(i){i=i===r?1:ye(K(i),0);var a=this.__filtered__&&!t?new Z(this):this.clone();return a.__filtered__?a.__takeCount__=De(i,a.__takeCount__):a.__views__.push({size:De(i,Le),type:e+(a.__dir__<0?"Right":"")}),a},Z.prototype[e+"Right"]=function(i){return this.reverse()[e](i).reverse()}}),it(["filter","map","takeWhile"],function(e,t){var i=t+1,a=i==ke||i==yt;Z.prototype[e]=function(l){var g=this.clone();return g.__iteratees__.push({iteratee:k(l,3),type:i}),g.__filtered__=g.__filtered__||a,g}}),it(["head","last"],function(e,t){var i="take"+(t?"Right":"");Z.prototype[e]=function(){return this[i](1).value()[0]}}),it(["initial","tail"],function(e,t){var i="drop"+(t?"":"Right");Z.prototype[e]=function(){return this.__filtered__?new Z(this):this[i](1)}}),Z.prototype.compact=function(){return this.filter(Ke)},Z.prototype.find=function(e){return this.filter(e).head()},Z.prototype.findLast=function(e){return this.reverse().find(e)},Z.prototype.invokeMap=Y(function(e,t){return typeof e=="function"?new Z(this):this.map(function(i){return ur(i,e,t)})}),Z.prototype.reject=function(e){return this.filter(pi(k(e)))},Z.prototype.slice=function(e,t){e=K(e);var i=this;return i.__filtered__&&(e>0||t<0)?new Z(i):(e<0?i=i.takeRight(-e):e&&(i=i.drop(e)),t!==r&&(t=K(t),i=t<0?i.dropRight(-t):i.take(t-e)),i)},Z.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Z.prototype.toArray=function(){return this.take(Le)},At(Z.prototype,function(e,t){var i=/^(?:filter|find|map|reject)|While$/.test(t),a=/^(?:head|last)$/.test(t),l=f[a?"take"+(t=="last"?"Right":""):t],g=a||/^find/.test(t);l&&(f.prototype[t]=function(){var p=this.__wrapped__,m=a?[1]:arguments,E=p instanceof Z,A=m[0],R=E||G(p),P=function(X){var j=l.apply(f,qt([X],m));return a&&U?j[0]:j};R&&i&&typeof A=="function"&&A.length!=1&&(E=R=!1);var U=this.__chain__,M=!!this.__actions__.length,W=g&&!U,z=E&&!M;if(!g&&R){p=z?p:new Z(this);var H=e.apply(p,m);return H.__actions__.push({func:hi,args:[P],thisArg:r}),new ot(H,U)}return W&&z?e.apply(this,m):(H=this.thru(P),W?a?H.value()[0]:H.value():H)})}),it(["pop","push","shift","sort","splice","unshift"],function(e){var t=Mr[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",a=/^(?:pop|shift)$/.test(e);f.prototype[e]=function(){var l=arguments;if(a&&!this.__chain__){var g=this.value();return t.apply(G(g)?g:[],l)}return this[i](function(p){return t.apply(G(p)?p:[],l)})}}),At(Z.prototype,function(e,t){var i=f[t];if(i){var a=i.name+"";re.call(Rn,a)||(Rn[a]=[]),Rn[a].push({name:t,func:i})}}),Rn[ii(r,te).name]=[{name:"wrapper",func:r}],Z.prototype.clone=Fh,Z.prototype.reverse=kh,Z.prototype.value=Wh,f.prototype.at=_d,f.prototype.chain=md,f.prototype.commit=vd,f.prototype.next=Sd,f.prototype.plant=wd,f.prototype.reverse=Cd,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=Td,f.prototype.first=f.prototype.head,tr&&(f.prototype[tr]=Ed),f}),Tn=mh();sn?((sn.exports=Tn)._=Tn,Yi._=Tn):xe._=Tn}).call(km)})(pr,pr.exports)),pr.exports}var Hm=Wm();const Ve={normalizePath:s=>{if(!s||s.length<=0)return s;let n=s;return n.startsWith("#")&&(n=n.substring(1)),n.startsWith("/")&&(n=n.substring(1)),n},segmentMatches:(s,n,r)=>!!(s===n||n.startsWith(":")&&r&&r[n.substr(1)]===s),checkMatch:(s,n,r)=>{let o=!0;return B.trimTrailingSlash(B.trimLeadingSlash(s)).split("/").forEach((u,c)=>{var h,d;o&&(c+1>=n.length||!((h=n[c+1])!=null&&h.pathSegment)||!Ve.segmentMatches(u,((d=n[c+1])==null?void 0:d.pathSegment)??"",r??{}))&&(o=!1)}),o},checkVisibleForFeatureToggles:(s,n)=>{if(s!=null&&s.visibleForFeatureToggles){const r=(n==null?void 0:n.getActiveFeatureToggleList())||[];for(const o of s.visibleForFeatureToggles)if(o.startsWith("!")){if(r.includes(o.slice(1)))return!1}else if(!r.includes(o))return!1}return!0},generateTooltipText:(s,n,r)=>{let o=s==null?void 0:s.tooltipText;switch(o===void 0&&(o=r.getConfigValue("navigation.defaults.tooltipText")),o){case void 0:return n;case!1:return"";default:return r.i18n().getTranslation(o)}},isNodeAccessPermitted:(s,n,r,o)=>{if(o.auth().isAuthorizationEnabled()){const h=dn.isLoggedIn(),d=s.anonymousAccess;if(h&&d==="exclusive"||!h&&d!=="exclusive"&&d!==!0)return!1}const u=o.featureToggles();if(!Ve.checkVisibleForFeatureToggles(s,u))return!1;const c=o.getConfigValue("navigation.nodeAccessibilityResolver");return typeof c!="function"?!0:c(s,n,r)},updateHeaderTitle:(s,n)=>{const r=s==null?void 0:s.items;if(r&&n){let o="";return[...r].sort((u,c)=>(c.link||"").localeCompare(u.link||"")).some(u=>{let c=!1;if(c=Ve.checkMatch(u.link||"",n.nodesInPath??[]),!c&&u.selectionConditions&&u.selectionConditions.route&&(c=Ve.checkMatch(u.selectionConditions.route,n.nodesInPath??[]),c&&(u.selectionConditions.contextCriteria||[]).forEach(h=>{var d,_;c=c&&((_=(d=n==null?void 0:n.selectedNode)==null?void 0:d.context)==null?void 0:_[h.key])===h.value})),c)return o=u.title||"",!0}),o}},buildPath(s,n){return s.map(o=>{var c;const u=o.pathSegment;if(u!=null&&u.startsWith(":")){const h=u.slice(1),d=(c=n==null?void 0:n.pathParams)==null?void 0:c[h];if(d!=null)return encodeURIComponent(String(d))}return u}).join("/")},mergeContext(...s){return Object.assign({},...s)},prepareForTests(...s){let n="";return s.forEach(r=>{r&&(n+=(n?"_":"")+encodeURIComponent(r.toLowerCase().split(" ").join("")))}),n}},q={defaultContentViewParamPrefix:"~",defaultQueryParamSeparator:"?",defaultModalViewParamName:"modal",addParamsOnHashRouting(s,n,r){let o=n;const[u,c]=o.split("?"),h=new URLSearchParams(c);return this.modifySearchParams(s,h,r),o=u,h.toString()!==""&&(o+=`?${h.toString()}`),o},modifySearchParams(s,n,r){for(const[o,u]of Object.entries(s)){const c=r?`${r}${o}`:o;n.set(c,u),u===void 0&&n.delete(c)}},filterNodeParams(s,n){const r={},o=this.getContentViewParamPrefix(n);return s&&Object.entries(s).forEach(u=>{if(u[0].startsWith(o)){const c=u[0].substr(o.length);r[c]=u[1]}}),this.sanitizeParamsMap(r)},getContentViewParamPrefix(s){let n=s==null?void 0:s.getConfigValue("routing.nodeParamPrefix");return n===!1?n="":n||(n=this.defaultContentViewParamPrefix),n},sanitizeParamsMap(s){return Object.entries(s).reduce((n,r)=>(n[yi.sanitizeParam(r[0])]=yi.sanitizeParam(r[1]),n),{})},prepareSearchParamsForClient(s,n){const r={};return s&&s.clientPermissions&&s.clientPermissions.urlParameters&&Object.keys(s.clientPermissions.urlParameters).forEach(o=>{var u,c;o in n.routing().getSearchParams()&&((u=s.clientPermissions)!=null&&u.urlParameters)&&((c=s.clientPermissions.urlParameters[o])==null?void 0:c.read)===!0&&(r[o]=n.routing().getSearchParams()[o])}),r},getCurrentPath(s){if(s){const n=Ve.normalizePath(location.hash),[r,o]=n.split("?");return{path:r,query:o}}else return{path:Ve.normalizePath(location.pathname),query:location.search}},getModalPathFromPath(s){return this.getQueryParam(this.getModalViewParamName(s),s)},getQueryParam(s,n){return this.getQueryParams(n)[s]},getQueryParams(s){return s.getConfigValue("routing.useHashRouting")?this.getLocationHashQueryParams():this.getLocationSearchQueryParams()},getLocationSearchQueryParams(){return q.getLocation().search?q.parseParams(q.getLocation().search.slice(1)):{}},getLocation(){return location},getLocationHashQueryParams(){const s=q.getLocation().hash.indexOf(this.defaultQueryParamSeparator);return s!==-1?q.parseParams(q.getLocation().hash.slice(s+1)):{}},getModalViewParamName(s){let n=s.getConfigValue("routing.modalPathParam");return n||(n=this.defaultModalViewParamName),n},parseParams(s){const n=new URLSearchParams(s),r=new Map;for(const[o,u]of n.entries())r.set(o,u);return Object.fromEntries(r)},getModalParamsFromPath(s){const n=this.getQueryParam(`${this.getModalViewParamName(s)}Params`,s);return n&&JSON.parse(n)},getHashQueryParamSeparator(){return this.defaultQueryParamSeparator},getURLWithoutModalData(s,n){const r=new URLSearchParams(s);return r.delete(n),r.delete(`${n}Params`),r.toString()},handleHistoryState(s,n){return s&&s.modalHistoryLength?s.modalHistoryLength+=1:s={modalHistoryLength:1,historygap:history.length,pathBeforeHistory:n},s},encodeParams(s){const n=[];for(const r in s)n.push(encodeURIComponent(r)+"="+encodeURIComponent(s[r]));return n.join("&")},getLastNodeObject(s){return(s.nodesInPath?[...s.nodesInPath].pop():{})||{}},checkWCUrl(s,n){if(s.indexOf("://")>0||s.trim().indexOf("//")===0){if(new URL(s).host===window.location.host)return!0;const o=n.getConfigValue("navigation.validWebcomponentUrls");if((o==null?void 0:o.length)>0)for(const u of o)try{if(new RegExp(u).test(s))return!0}catch(c){console.error(c)}return!1}return!0},setFeatureToggles(s,n,r){const o=this.sanitizeParamsMap(this.parseParams(n.split("?")[1]));let u;if(o[s]&&(u=o[s]),!u)return;const c=u.split(",");c.length>0&&c[0]!==""&&c.forEach(h=>r==null?void 0:r.setFeatureToggle(h,!0))},substituteDynamicParamsInObject(s,n,r=":",o=!1){return Object.entries(s).map(([u,c])=>{const h=o?Object.keys(n).find(d=>c&&c.indexOf(r+d)>=0):Object.keys(n).find(d=>c===r+d);return[u,h?o?c.replace(r+h,n[h]):n[h]:c]}).reduce((u,[c,h])=>Object.assign(u,{[c]:h}),{})}},no={logout:{label:"Sign Out",icon:"log"}};class Bm{constructor(){this.services=new Map}register(n,r,o=!0){this.services.set(n,{factory:r,singleton:o})}get(n){const r=this.services.get(n);if(!r)throw new Error(`Service '${n}' is not registered.`);return r.singleton?(r.instance||(r.instance=r.factory()),r.instance):r.factory()}}const se=new Bm;class rn{constructor(n){this.luigi=n}getPathData(n){var v;const r=this.luigi.getConfig();let o=n.split("/");(o==null?void 0:o.length)>0&&o[0]===""&&(o=o.slice(1));let c=r.navigation.globalContext||{};const h=this.prepareRootNodes((v=r.navigation)==null?void 0:v.nodes,c);let d={};const _={selectedNodeChildren:h,nodesInPath:[{children:h}],rootNodes:h,pathParams:d};return o.forEach(x=>{var C,y,I;if(_.selectedNodeChildren){const L=this.findMatchingNode(x,_.selectedNodeChildren||[]);if(!L){console.log("No matching node found for segment:",x,"in children:",_.selectedNodeChildren);return}const D=L.context||{},F=Ve.mergeContext(c,D);let te=F;_.selectedNodeChildren=this.getAccessibleNodes(L,L.children||[],F),(C=L.pathSegment)!=null&&C.startsWith(":")&&(d[L.pathSegment.replace(":","")]=yi.sanitizeParam(x),te=q.substituteDynamicParamsInObject(F,d)),c=te,L.context=te,_.selectedNode=L,_.selectedNodeChildren=(y=_.selectedNode)!=null&&y.children?this.getAccessibleNodes(_.selectedNode,_.selectedNode.children,c):void 0,_.selectedNode&&((I=_.nodesInPath)==null||I.push(_.selectedNode))}}),_}findMatchingNode(n,r){let o;const u=r.filter(h=>!!h.pathSegment).length,c=r.filter(h=>h.pathSegment&&h.pathSegment.startsWith(":")).length;if(u>1&&(c===1&&(console.warn(`Invalid node setup detected.
2
28
  Static and dynamic nodes cannot be used together on the same level. Static node gets cleaned up.
3
29
  Remove the static node from the configuration to resolve this warning.
4
- Affected pathSegment:`,e,"Children:",t),t=t.filter(a=>a.pathSegment&&a.pathSegment.startsWith(":"))),s>1)){console.error(`Invalid node setup detected.
30
+ Affected pathSegment:`,n,"Children:",r),r=r.filter(h=>h.pathSegment&&h.pathSegment.startsWith(":"))),c>1)){console.error(`Invalid node setup detected.
5
31
  Multiple dynamic nodes are not allowed on the same level. Stopped navigation.
6
- Invalid Children:`,t);return}return t.some(a=>{if(a.pathSegment===e||a.pathSegment&&a.pathSegment.startsWith(":"))return n=a,!0}),n}buildNavItems(e,t,n){const r={},s=[];return e==null||e.forEach(a=>{var o,l,c;if(M.isNodeAccessPermitted(a,this.getParentNode(n.selectedNode,n),((o=n==null?void 0:n.selectedNode)==null?void 0:o.context)||{},this.luigi))if(a.label&&(a.label=this.luigi.i18n().getTranslation(a.label),a.tooltip=this.resolveTooltipText(a,a.label)),a.category){const f=a.category.id||a.category.label||a.category,h=this.luigi.i18n().getTranslation(a.category.label||a.category.id||a.category);let u=r[f];u||(u={category:{icon:a.category.icon,id:f,label:h,nodes:[],tooltip:this.resolveTooltipText(a.category,h)}},r[f]=u,s.push(u)),(c=(l=u.category)==null?void 0:l.nodes)==null||c.push({node:a,selected:a===t})}else s.push({node:a,selected:a===t})}),s}shouldRedirect(e,t){var r;const n=t??this.getPathData(e);if(e=="")return n.rootNodes[0].pathSegment;if(n.selectedNode&&!n.selectedNode.viewUrl&&((r=n.selectedNode.children)!=null&&r.length))return e+"/"+n.selectedNode.children[0].pathSegment}getCurrentNode(e){var r;const t=this.getPathData(e),n=t.selectedNode;if(!(!n||!M.isNodeAccessPermitted(n,this.getParentNode(t.selectedNode,t),((r=t==null?void 0:t.selectedNode)==null?void 0:r.context)||{},this.luigi)))return n}getPathParams(e){return this.getPathData(e).pathParams}getTruncatedChildren(e){let t=!1,n=!1,r=[];return e.slice().reverse().forEach(s=>{(!t||s.tabNav)&&(s.tabNav===!1&&(n=!0),s.keepSelectedForChildren===!1?t=!0:(s.keepSelectedForChildren||s.tabNav&&!n)&&(t=!0,r=[])),r.push(s)}),r.reverse()}applyNavGroups(e){const t={},n=[],s=[];return e.forEach(a=>{if(a.node)s.push(a);else if(a.category){const o=a.category.id;o&&o.indexOf("::")>0?n.push(a):(a.category.isGroup,t[o]=a,s.push(a))}}),n.forEach(a=>{var c;const o=((c=a.category)==null?void 0:c.id.split("::")[0])||"",l=t[o];l&&l.category&&(l.category.isGroup||(l.category.isGroup=!0),l.category.nodes||(l.category.nodes=[]),l.category.nodes.push(a))}),s.filter(a=>{var o,l,c,f,h,u;if((o=a.category)!=null&&o.isGroup&&((l=a.category)!=null&&l.nodes)&&((c=a.category)==null?void 0:c.nodes.length)>0){for(let g=0;g<((f=a.category)==null?void 0:f.nodes.length);g++){const p=(h=a.category)==null?void 0:h.nodes[g];if(p.node&&!p.node.hideFromNav&&p.node.label||(u=p.category)!=null&&u.nodes&&p.category.nodes.filter(S=>{var T,R;return!((T=S.node)!=null&&T.hideFromNav)&&((R=S.node)==null?void 0:R.label)}).length>0)return!0}return!1}return!0})}getLeftNavData(e,t){var h,u,g;const n=t??this.getPathData(e);let r=[];const s=[];let a="";(h=n.nodesInPath)==null||h.forEach(p=>{p.children&&(p.tabNav||(a+="/"+(p.pathSegment||"")),s.push(p))});const o=this.getTruncatedChildren(n.nodesInPath);let l=[...o].pop(),c=n.selectedNode;(l!=null&&l.keepSelectedForChildren||l!=null&&l.tabNav)&&(c=l,o.pop(),l=[...o].pop()),c&&c.children&&n.rootNodes.includes(c)?r=this.buildNavItems(c.children,void 0,n):c&&c.tabNav?r=l!=null&&l.children?this.buildNavItems(l.children,c,n):[]:r=this.buildNavItems(((u=[...s].pop())==null?void 0:u.children)||[],c,n);const f=M.buildPath(s,n);return r=this.applyNavGroups(r),{selectedNode:c,items:r,basePath:a.replace(/\/\/+/g,"/"),sideNavFooterText:(g=this.luigi.getConfig().settings)==null?void 0:g.sideNavFooterText,navClick:p=>this.navItemClick(p,f)}}navItemClick(e,t){if(!e.pathSegment){console.error("Navigation error: pathSegment is not defined for the node.");return}let n="/";if(t.trim()!=="")n+=t+"/";else if(!e.isRootNode){console.error("Navigation error: parentPath is empty while the node is not a root node");return}n+=e.pathSegment,this.luigi.navigation().navigate(n)}getTopNavData(e,t){var u,g,p,S,T,R,$,N,z,G,K,J,B,x,P,I,_,te,Q,U,re,d,le,y,O,ge,pt,mt;const n=this.luigi.getConfig(),r=t??this.getPathData(e),s=this.prepareRootNodes((u=n.navigation)==null?void 0:u.nodes,((g=n.navigation)==null?void 0:g.globalContext)||{}),a=(T=(S=(p=n.navigation)==null?void 0:p.profile)==null?void 0:S.items)!=null&&T.length?JSON.parse(JSON.stringify(n.navigation.profile.items)):[],o=((R=n.navigation)==null?void 0:R.appSwitcher)&&this.getAppSwitcherData(($=n.navigation)==null?void 0:$.appSwitcher,(N=n.settings)==null?void 0:N.header),l=M.updateHeaderTitle(o,r);a!=null&&a.length&&a.map(k=>({...k,label:this.luigi.i18n().getTranslation(k.label||"")}));const c=this.luigi.i18n().getTranslation((K=(G=(z=n.navigation)==null?void 0:z.profile)==null?void 0:G.logout)==null?void 0:K.label)||it.logout.label,f=k=>{var Le;k.link?this.luigi.navigation().navigate(k.link):(Le=k.externalLink)!=null&&Le.url&&(k.externalLink.sameWindow?window.location.href=k.externalLink.url:window.open(k.externalLink.url,"_blank","noopener noreferrer"))},h={authEnabled:this.luigi.auth().isAuthorizationEnabled(),signedIn:this.luigi.auth().isAuthorizationEnabled()&&ce.isLoggedIn(),items:a,itemClick:f,logout:{altText:this.luigi.i18n().getTranslation((x=(B=(J=n.navigation)==null?void 0:J.profile)==null?void 0:B.logout)==null?void 0:x.altText)||it.logout.label,label:c,icon:((_=(I=(P=n.navigation)==null?void 0:P.profile)==null?void 0:I.logout)==null?void 0:_.icon)||it.logout.icon,testId:((U=(Q=(te=n.navigation)==null?void 0:te.profile)==null?void 0:Q.logout)==null?void 0:U.testId)||M.prepareForTests(c),doLogout:()=>{ve.logout()}},onUserInfoUpdate:k=>{var Le,_t,St,Et;if((_t=(Le=n.navigation)==null?void 0:Le.profile)!=null&&_t.staticUserInfoFn){const Ne=(Et=(St=n.navigation)==null?void 0:St.profile)==null?void 0:Et.staticUserInfoFn();Ne instanceof Promise?Ne.then(fi=>{k(fi)}):k(Ne)}else ve.getUserInfoStore().subscribe(Ne=>{k(Ne)})}};return{appTitle:l||((d=(re=n.settings)==null?void 0:re.header)==null?void 0:d.title),logo:(y=(le=n.settings)==null?void 0:le.header)==null?void 0:y.logo,topNodes:this.buildNavItems(s,void 0,r),productSwitcher:(O=n.navigation)==null?void 0:O.productSwitcher,profile:h,appSwitcher:((ge=n.navigation)==null?void 0:ge.appSwitcher)&&this.getAppSwitcherData((pt=n.navigation)==null?void 0:pt.appSwitcher,(mt=n.settings)==null?void 0:mt.header),navClick:k=>{this.navItemClick(k,"")}}}getParentNode(e,t){var n;if(e&&e===((n=t.nodesInPath)==null?void 0:n[t.nodesInPath.length-1]))return t.nodesInPath[t.nodesInPath.length-2]}getAppSwitcherData(e,t){var s;const n=e,r=n==null?void 0:n.showMainAppEntry;if(n&&n.items&&r){const a={title:this.luigi.i18n().getTranslation(t.title||""),subTitle:t.subTitle,link:"/"};if((s=n.items)==null||s.map(o=>({...o,title:this.luigi.i18n().getTranslation(o.title||"")})),n.items.some(o=>o.link===a.link))return n;n.items.unshift(a)}return n}getTabNavData(e,t){var f;const n=t??this.getPathData(e),r=n==null?void 0:n.selectedNode;let s;if(!r)return{};if(!r.tabNav&&(s=this.getParentNode(r,n),s&&!s.tabNav))return{};let a="";(f=n.nodesInPath)==null||f.forEach(h=>{h.children&&(a+="/"+(h.pathSegment||""))});const o=s?this.getTruncatedChildren(s.children):this.getTruncatedChildren(r.children),l=this.buildNavItems(o,r,n),c=M.buildPath(n.nodesInPath||[],n);return{selectedNode:r,items:l,basePath:a.replace(/\/\/+/g,"/"),navClick:h=>this.navItemClick(h,c)}}onNodeChange(e,t){const n=this.luigi.getConfigValue("navigation.nodeChangeHook");v.isFunction(n)?n(e,t):n!==void 0&&console.warn("nodeChangeHook is not a function!")}async extractDataFromPath(e){const t=this.getPathData(e);return{nodeObject:C.getLastNodeObject(t),pathData:t}}resolveTooltipText(e,t){return M.generateTooltipText(e,t,this.luigi)}prepareRootNodes(e,t){const n=JSON.parse(JSON.stringify(e))||[];return n.length?(n.forEach(r=>{r.isRootNode=!0}),e.forEach(r=>{var s;if((s=r==null?void 0:r.badgeCounter)!=null&&s.count){const a=n.find(o=>o.badgeCounter&&o.viewUrl===r.viewUrl);a&&(a.badgeCounter.count=r.badgeCounter.count)}}),this.getAccessibleNodes(void 0,n,t)):n}getAccessibleNodes(e,t,n){return t?t.filter(r=>M.isNodeAccessPermitted(r,e,n,this.luigi)):[]}}function ae(){}function Vt(i){return i()}function Tt(){return Object.create(null)}function qe(i){i.forEach(Vt)}function Ft(i){return typeof i=="function"}function Qt(i,e){return i!=i?e==e:i!==e||i&&typeof i=="object"||typeof i=="function"}let He,ke;function wt(i,e){return i===e||(He||(He=document.createElement("a")),He.href=e,i===He.href)}function Ai(i,e,t){const n=(function(r){if(!r)return document;const s=r.getRootNode?r.getRootNode():r.ownerDocument;return s&&s.host?s:r.ownerDocument})(i);if(!n.getElementById(e)){const r=be("style");r.id=e,r.textContent=t,(function(s,a){(function(o,l){o.appendChild(l)})(s.head||s,a),a.sheet})(n,r)}}function ue(i,e,t){i.insertBefore(e,t||null)}function oe(i){i.parentNode&&i.parentNode.removeChild(i)}function be(i){return document.createElement(i)}function Ht(i){return document.createTextNode(i)}function W(i,e,t){t==null?i.removeAttribute(e):i.getAttribute(e)!==t&&i.setAttribute(e,t)}function Oe(i){ke=i}function Wt(){if(!ke)throw new Error("Function called outside component initialization");return ke}function Gt(i){Wt().$$.on_mount.push(i)}const me=[],Me=[];let Ce=[];const yt=[],Pi=Promise.resolve();let st=!1;function at(i){Ce.push(i)}const nt=new Set;let fe=0;function E(){if(fe!==0)return;const i=ke;do{try{for(;fe<me.length;){const e=me[fe];fe++,Oe(e),Ii(e.$$)}}catch(e){throw me.length=0,fe=0,e}for(Oe(null),me.length=0,fe=0;Me.length;)Me.pop()();for(let e=0;e<Ce.length;e+=1){const t=Ce[e];nt.has(t)||(nt.add(t),t())}Ce.length=0}while(me.length);for(;yt.length;)yt.pop()();st=!1,nt.clear(),Oe(i)}function Ii(i){if(i.fragment!==null){i.update(),qe(i.before_update);const e=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,e),i.after_update.forEach(at)}}const $i=new Set;function Li(i,e){const t=i.$$;t.fragment!==null&&((function(n){const r=[],s=[];Ce.forEach((a=>n.indexOf(a)===-1?r.push(a):s.push(a))),s.forEach((a=>a())),Ce=r})(t.after_update),qe(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Ni(i,e){i.$$.dirty[0]===-1&&(me.push(i),st||(st=!0,Pi.then(E)),i.$$.dirty.fill(0)),i.$$.dirty[e/31|0]|=1<<e%31}function Bt(i,e,t,n,r,s,a=null,o=[-1]){const l=ke;Oe(i);const c=i.$$={fragment:null,ctx:[],props:s,update:ae,not_equal:r,bound:Tt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(l?l.$$.context:[])),callbacks:Tt(),dirty:o,skip_bound:!1,root:e.target||l.$$.root};a&&a(c.root);let f=!1;if(c.ctx=t?t(i,e.props||{},((g,p,...S)=>{const T=S.length?S[0]:p;return c.ctx&&r(c.ctx[g],c.ctx[g]=T)&&(!c.skip_bound&&c.bound[g]&&c.bound[g](T),f&&Ni(i,g)),p})):[],c.update(),f=!0,qe(c.before_update),c.fragment=!!n&&n(c.ctx),e.target){if(e.hydrate){const g=(function(p){return Array.from(p.childNodes)})(e.target);c.fragment&&c.fragment.l(g),g.forEach(oe)}else c.fragment&&c.fragment.c();e.intro&&(h=i.$$.fragment)&&h.i&&($i.delete(h),h.i(u)),(function(g,p,S){const{fragment:T,after_update:R}=g.$$;T&&T.m(p,S),at((()=>{const $=g.$$.on_mount.map(Vt).filter(Ft);g.$$.on_destroy?g.$$.on_destroy.push(...$):qe($),g.$$.on_mount=[]})),R.forEach(at)})(i,e.target,e.anchor),E()}var h,u;Oe(l)}let jt;function Ge(i,e,t,n){var s;const r=(s=t[i])==null?void 0:s.type;if(e=r==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!t[i])return e;if(n==="toAttribute")switch(r){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":default:return e;case"Number":return e!=null?+e:e}}function qt(i,e,t,n,r,s){let a=class extends jt{constructor(){super(i,t,r),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map((o=>(e[o].attribute||o).toLowerCase()))}};return Object.keys(e).forEach((o=>{Object.defineProperty(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(l){var c;l=Ge(o,l,e),this.$$d[o]=l,(c=this.$$c)==null||c.$set({[o]:l})}})})),n.forEach((o=>{Object.defineProperty(a.prototype,o,{get(){var l;return(l=this.$$c)==null?void 0:l[o]}})})),s&&(a=s(a)),i.element=a,a}typeof HTMLElement=="function"&&(jt=class extends HTMLElement{constructor(e,t,n){super();A(this,"$$ctor");A(this,"$$s");A(this,"$$c");A(this,"$$cn",!1);A(this,"$$d",{});A(this,"$$r",!1);A(this,"$$p_d",{});A(this,"$$l",{});A(this,"$$l_u",new Map);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 r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(a){return()=>{let o;return{c:function(){o=be("slot"),a!=="default"&&W(o,"name",a)},m:function(l,c){ue(l,o,c)},d:function(l){l&&oe(o)}}}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=(function(a){const o={};return a.childNodes.forEach((l=>{o[l.slot||"default"]=!0})),o})(this);for(const a of this.$$s)a in r&&(n[a]=[t(a)]);for(const a of this.attributes){const o=this.$$g_p(a.name);o in this.$$d||(this.$$d[o]=Ge(o,a.value,this.$$p_d,"toProp"))}for(const a in this.$$p_d)a in this.$$d||this[a]===void 0||(this.$$d[a]=this[a],delete this[a]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$scope:{ctx:[]}}});const s=()=>{this.$$r=!0;for(const a in this.$$p_d)if(this.$$d[a]=this.$$c.$$.ctx[this.$$c.$$.props[a]],this.$$p_d[a].reflect){const o=Ge(a,this.$$d[a],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[a].attribute||a):this.setAttribute(this.$$p_d[a].attribute||a,o)}this.$$r=!1};this.$$c.$$.after_update.push(s),s();for(const a in this.$$l)for(const o of this.$$l[a]){const l=this.$$c.$on(a,o);this.$$l_u.set(o,l)}this.$$l={}}}attributeChangedCallback(e,t,n){var r;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Ge(e,n,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{!this.$$cn&&this.$$c&&(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 zt{constructor(){A(this,"$$");A(this,"$$set")}$destroy(){Li(this,1),this.$destroy=ae}$on(e,t){if(!Ft(t))return ae;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}$set(e){var t;this.$$set&&(t=e,Object.keys(t).length!==0)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}var w;typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4"),(function(i){i.CUSTOM_MESSAGE="custom",i.GET_CONTEXT="luigi.get-context",i.SEND_CONTEXT_HANDSHAKE="luigi.init",i.CONTEXT_RECEIVED="luigi.init.ok",i.NAVIGATION_REQUEST="luigi.navigation.open",i.ALERT_REQUEST="luigi.ux.alert.show",i.ALERT_CLOSED="luigi.ux.alert.hide",i.INITIALIZED="luigi.init.ok",i.ADD_SEARCH_PARAMS_REQUEST="luigi.addSearchParams",i.ADD_NODE_PARAMS_REQUEST="luigi.addNodeParams",i.SHOW_CONFIRMATION_MODAL_REQUEST="luigi.ux.confirmationModal.show",i.CONFIRMATION_MODAL_CLOSED="luigi.ux.confirmationModal.hide",i.SHOW_LOADING_INDICATOR_REQUEST="luigi.show-loading-indicator",i.HIDE_LOADING_INDICATOR_REQUEST="luigi.hide-loading-indicator",i.SET_CURRENT_LOCALE_REQUEST="luigi.ux.set-current-locale",i.LOCAL_STORAGE_SET_REQUEST="storage",i.RUNTIME_ERROR_HANDLING_REQUEST="luigi-runtime-error-handling",i.SET_ANCHOR_LINK_REQUEST="luigi.setAnchor",i.SET_THIRD_PARTY_COOKIES_REQUEST="luigi.third-party-cookie",i.BACK_NAVIGATION_REQUEST="luigi.navigation.back",i.GET_CURRENT_ROUTE_REQUEST="luigi.navigation.currentRoute",i.SEND_CURRENT_ROUTE_ANSWER="luigi.navigation.currentRoute.answer",i.SEND_CONTEXT_OBJECT="luigi.navigate",i.NAVIGATION_COMPLETED_REPORT="luigi.navigate.ok",i.CLOSE_MODAL_ANSWER="luigi.navigation.modal.close",i.UPDATE_MODAL_PATH_DATA_REQUEST="luigi.navigation.updateModalDataPath",i.UPDATE_MODAL_SETTINGS="luigi.navigation.updateModalSettings",i.CHECK_PATH_EXISTS_REQUEST="luigi.navigation.pathExists",i.SEND_PATH_EXISTS_ANSWER="luigi.navigation.pathExists.answer",i.SET_DIRTY_STATUS_REQUEST="luigi.set-page-dirty",i.AUTH_SET_TOKEN="luigi.auth.tokenIssued",i.ADD_BACKDROP_REQUEST="luigi.add-backdrop",i.REMOVE_BACKDROP_REQUEST="luigi.remove-backdrop",i.SET_VIEW_GROUP_DATA_REQUEST="luigi.setVGData",i.CLOSE_CURRENT_MODAL_REQUEST="luigi.close-modal"})(w||(w={}));class Ui extends Event{constructor(e,t,n,r){super(e),this.detail=t,this.payload=n||t||{},this.callbackFn=r}callback(e){this.callbackFn&&this.callbackFn(e)}}const m={ADD_BACKDROP_REQUEST:"add-backdrop-request",ADD_NODE_PARAMS_REQUEST:"add-node-params-request",ADD_SEARCH_PARAMS_REQUEST:"add-search-params-request",ALERT_CLOSED:"close-alert-request",ALERT_REQUEST:"show-alert-request",BACK_NAVIGATION_REQUEST:"navigate-back-request",CHECK_PATH_EXISTS_REQUEST:"check-path-exists-request",CLOSE_CURRENT_MODAL_REQUEST:"close-current-modal-request",CLOSE_USER_SETTINGS_REQUEST:"close-user-settings-request",COLLAPSE_LEFT_NAV_REQUEST:"collapse-leftnav-request",CUSTOM_MESSAGE:"custom-message",GET_CONTEXT_REQUEST:"get-context-request",GET_CURRENT_ROUTE_REQUEST:"get-current-route-request",GO_BACK_REQUEST:"go-back-request",HAS_BACK_REQUEST:"has-back-request",HIDE_LOADING_INDICATOR_REQUEST:"hide-loading-indicator-request",INITIALIZED:"initialized",LOCAL_STORAGE_SET_REQUEST:"set-storage-request",NAVIGATION_COMPLETED_REPORT:"report-navigation-completed-request",NAVIGATION_REQUEST:"navigation-request",OPEN_USER_SETTINGS_REQUEST:"open-user-settings-request",PATH_EXISTS_REQUEST:"path-exists-request",REMOVE_BACKDROP_REQUEST:"remove-backdrop-request",RUNTIME_ERROR_HANDLING_REQUEST:"runtime-error-handling-request",SET_ANCHOR_LINK_REQUEST:"set-anchor-request",SET_CURRENT_LOCALE_REQUEST:"set-current-locale-request",SET_DIRTY_STATUS_REQUEST:"set-dirty-status-request",SET_DOCUMENT_TITLE_REQUEST:"set-document-title-request",SET_THIRD_PARTY_COOKIES_REQUEST:"set-third-party-cookies-request",SET_VIEW_GROUP_DATA_REQUEST:"set-viewgroup-data-request",SHOW_CONFIRMATION_MODAL_REQUEST:"show-confirmation-modal-request",SHOW_LOADING_INDICATOR_REQUEST:"show-loading-indicator-request",UPDATE_MODAL_PATH_DATA_REQUEST:"update-modal-path-data-request",UPDATE_MODAL_SETTINGS_REQUEST:"update-modal-settings-request",UPDATE_TOP_NAVIGATION_REQUEST:"update-top-navigation-request"};class ct{isVisible(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}sendCustomMessageToIframe(e,t,n){var s;const r=n||"custom";if((s=e==null?void 0:e.iframe)!=null&&s.contentWindow){const a=new URL(e.iframe.src);r==="custom"?e.iframe.contentWindow.postMessage({msg:r,data:t},a.origin):e.iframe.contentWindow.postMessage({msg:r,...t},a.origin)}else console.error("Message target could not be resolved")}dispatchWithPayload(e,t,n,r,s){this.dispatch(e,t,n,s,r)}dispatch(e,t,n,r,s){const a=new Ui(e,n,s,r);t.dispatchEvent(a)}getTargetContainer(e){let t;return globalThis.__luigi_container_manager.container.forEach((n=>{var r;(r=n.iframeHandle)!=null&&r.iframe&&n.iframeHandle.iframe.contentWindow===e.source&&(t=n)})),t}getContainerManager(){return globalThis.__luigi_container_manager||(globalThis.__luigi_container_manager={container:[],messageListener:e=>{var r,s,a,o,l,c,f,h;const t=this.getTargetContainer(e),n=(s=(r=t==null?void 0:t.iframeHandle)==null?void 0:r.iframe)==null?void 0:s.contentWindow;if(n&&n===e.source)switch(e.data.msg){case w.CUSTOM_MESSAGE:{const u=e.data.data,g=u.id;delete u.id,this.dispatch(m.CUSTOM_MESSAGE,t,{id:g,_metaData:{},data:u})}break;case w.GET_CONTEXT:n.postMessage({msg:w.SEND_CONTEXT_HANDSHAKE,context:t.context||{},internal:{thirdPartyCookieCheck:{disabled:t.skipCookieCheck==="true"},currentTheme:t.theme,currentLocale:t.locale,activeFeatureToggleList:t.activeFeatureToggleList||[],cssVariables:t.cssVariables||{},anchor:t.anchor||"",userSettings:t.userSettings||null,drawer:t.drawer||!1,modal:t.modal||!1,viewStackSize:t.viewStackSize||0,isNavigateBack:t.isNavigateBack||!1},authData:t.authData||{},nodeParams:t.nodeParams||{},searchParams:t.searchParams||{},pathParams:t.pathParams||{}},e.origin);break;case w.NAVIGATION_REQUEST:this.dispatch(m.NAVIGATION_REQUEST,t,e.data.params,(u=>{n.postMessage({msg:w.CLOSE_MODAL_ANSWER,data:u},e.origin)}));break;case w.ALERT_REQUEST:this.dispatchWithPayload(m.ALERT_REQUEST,t,e,(o=(a=e.data)==null?void 0:a.data)==null?void 0:o.settings,(u=>{var g,p,S;t.notifyAlertClosed((S=(p=(g=e.data)==null?void 0:g.data)==null?void 0:p.settings)==null?void 0:S.id,u)}));break;case w.INITIALIZED:this.dispatch(m.INITIALIZED,t,((l=e.data)==null?void 0:l.params)||{});break;case w.ADD_SEARCH_PARAMS_REQUEST:this.dispatch(m.ADD_SEARCH_PARAMS_REQUEST,t,{data:e.data.data,keepBrowserHistory:e.data.keepBrowserHistory});break;case w.ADD_NODE_PARAMS_REQUEST:this.dispatch(m.ADD_NODE_PARAMS_REQUEST,t,{data:e.data.data,keepBrowserHistory:e.data.keepBrowserHistory});break;case w.SHOW_CONFIRMATION_MODAL_REQUEST:this.dispatchWithPayload(m.SHOW_CONFIRMATION_MODAL_REQUEST,t,e.data.data,(c=e.data.data)==null?void 0:c.settings,(u=>{t.notifyConfirmationModalClosed(u)}));break;case w.SHOW_LOADING_INDICATOR_REQUEST:this.dispatch(m.SHOW_LOADING_INDICATOR_REQUEST,t,e);break;case w.HIDE_LOADING_INDICATOR_REQUEST:this.dispatch(m.HIDE_LOADING_INDICATOR_REQUEST,t,e);break;case w.SET_CURRENT_LOCALE_REQUEST:this.dispatchWithPayload(m.SET_CURRENT_LOCALE_REQUEST,t,e,e.data.data);break;case w.LOCAL_STORAGE_SET_REQUEST:this.dispatchWithPayload(m.LOCAL_STORAGE_SET_REQUEST,t,e,(f=e.data.data)==null?void 0:f.params);break;case w.RUNTIME_ERROR_HANDLING_REQUEST:this.dispatch(m.RUNTIME_ERROR_HANDLING_REQUEST,t,e);break;case w.SET_ANCHOR_LINK_REQUEST:this.dispatchWithPayload(m.SET_ANCHOR_LINK_REQUEST,t,e,e.data.anchor);break;case w.SET_THIRD_PARTY_COOKIES_REQUEST:this.dispatch(m.SET_THIRD_PARTY_COOKIES_REQUEST,t,e);break;case w.BACK_NAVIGATION_REQUEST:{let u=((h=e.data)==null?void 0:h.goBackContext)||{};if(typeof u=="string")try{u=JSON.parse(u)}catch(g){console.warn(g)}this.dispatch(m.GO_BACK_REQUEST,t,u),this.dispatch(m.BACK_NAVIGATION_REQUEST,t,e)}break;case w.GET_CURRENT_ROUTE_REQUEST:this.dispatchWithPayload(m.GET_CURRENT_ROUTE_REQUEST,t,e,e.data.data,(u=>{var g,p;n.postMessage({msg:w.SEND_CURRENT_ROUTE_ANSWER,data:{correlationId:(p=(g=e.data)==null?void 0:g.data)==null?void 0:p.id,route:u}},e.origin)}));break;case w.NAVIGATION_COMPLETED_REPORT:this.dispatch(m.NAVIGATION_COMPLETED_REPORT,t,e);break;case w.UPDATE_MODAL_PATH_DATA_REQUEST:this.dispatchWithPayload(m.UPDATE_MODAL_PATH_DATA_REQUEST,t,e,e.data.params);break;case w.UPDATE_MODAL_SETTINGS:this.dispatchWithPayload(m.UPDATE_MODAL_SETTINGS_REQUEST,t,e,{addHistoryEntry:e.data.addHistoryEntry,updatedModalSettings:e.data.updatedModalSettings});break;case w.CHECK_PATH_EXISTS_REQUEST:this.dispatchWithPayload(m.CHECK_PATH_EXISTS_REQUEST,t,e,e.data.data,(u=>{var g,p;n.postMessage({msg:w.SEND_PATH_EXISTS_ANSWER,data:{correlationId:(p=(g=e.data)==null?void 0:g.data)==null?void 0:p.id,pathExists:u}},e.origin)}));break;case w.SET_DIRTY_STATUS_REQUEST:this.dispatchWithPayload(m.SET_DIRTY_STATUS_REQUEST,t,e,{dirty:e.data.dirty});break;case w.SET_VIEW_GROUP_DATA_REQUEST:this.dispatch(m.SET_VIEW_GROUP_DATA_REQUEST,t,e.data.data);break;case w.ADD_BACKDROP_REQUEST:this.dispatch(m.ADD_BACKDROP_REQUEST,t,e);break;case w.REMOVE_BACKDROP_REQUEST:this.dispatch(m.REMOVE_BACKDROP_REQUEST,t,e);break;case w.CLOSE_CURRENT_MODAL_REQUEST:this.dispatch(m.CLOSE_CURRENT_MODAL_REQUEST,t,e)}}},window.addEventListener("message",globalThis.__luigi_container_manager.messageListener)),globalThis.__luigi_container_manager}registerContainer(e){this.getContainerManager().container.push(e)}}const se=new ct,_e=new class{constructor(){this.updateContext=(i,e,t,n,r,s)=>{if(t){const a=e||{};se.sendCustomMessageToIframe(t,{context:i,nodeParams:n||{},pathParams:r||{},searchParams:s||{},internal:a,withoutSync:!0},w.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update context on inexisting iframe")},this.updateViewUrl=(i,e,t,n)=>{if(n){const r=t||{};se.sendCustomMessageToIframe(n,{context:e,internal:r,withoutSync:!1,viewUrl:i},w.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update route on inexisting iframe")},this.updateAuthData=(i,e)=>{i&&e?se.sendCustomMessageToIframe(i,{authData:e},w.AUTH_SET_TOKEN):console.warn("Attempting to update auth data on inexisting iframe or authData")},this.sendCustomMessage=(i,e,t,n,r)=>{if(t&&e._luigi_mfe_webcomponent)se.dispatch(i,e._luigi_mfe_webcomponent,r);else{const s={...r};s.id&&console.warn('Property "id" is reserved and can not be used in custom message data'),s.id=i,se.sendCustomMessageToIframe(n,s)}},this.notifyConfirmationModalClosed=(i,e)=>{const t={data:{confirmed:i}};se.sendCustomMessageToIframe(e,t,w.CONFIRMATION_MODAL_CLOSED)}}notifyAlertClosed(i,e,t){const n=e?{id:i,dismissKey:e}:{id:i};se.sendCustomMessageToIframe(t,n,w.ALERT_CLOSED)}},bt=i=>{if(!i)return;const e=i;return e.forEach(((t,n)=>{e[n]=t+(t.indexOf(";")!=-1?"":";"),e[n]=i[n].replaceAll('"',"'")})),e.join(" ")};class Re{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 Oi extends Re{constructor(e){super(e||{use:{}}),e&&e.use&&e.use.extends&&(this.superRenderer=Kt({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 Di extends Re{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((r=>{if(r.minWidth||r.maxWidth){let s="@media only screen ";r.minWidth!=null&&(s+=`and (min-width: ${r.minWidth}px) `),r.maxWidth!=null&&(s+=`and (max-width: ${r.maxWidth}px) `),s+=`{
7
- .${e} {
8
- grid-template-columns: ${r.columns||"auto"};
9
- grid-template-rows: ${r.rows||"auto"};
10
- grid-gap: ${r.gap||"0"};
32
+ Invalid Children:`,r);return}return r.some(h=>{if(h.pathSegment===n||h.pathSegment&&h.pathSegment.startsWith(":"))return o=h,!0}),o}buildNavItems(n,r,o){const u={},c=[];return n==null||n.forEach(h=>{var d,_,v;if(Ve.isNodeAccessPermitted(h,this.getParentNode(o.selectedNode,o),((d=o==null?void 0:o.selectedNode)==null?void 0:d.context)||{},this.luigi))if(h.category){const x=h.category.id||h.category.label||h.category,C=this.luigi.i18n().getTranslation(h.category.label||h.category.id||h.category);let y=u[x];y||(y={category:{altText:h.category.altText||"",icon:h.category.icon,id:x,label:C,nodes:[],tooltip:this.resolveTooltipText(h.category,C)}},u[x]=y,c.push(y)),(v=(_=y.category)==null?void 0:_.nodes)==null||v.push({node:h,selected:h===r,label:h.label?this.luigi.i18n().getTranslation(h.label):void 0,tooltip:h.label?this.resolveTooltipText(h,h.label):void 0,altText:h.altText,icon:h.icon})}else c.push({altText:h.altText,icon:h.icon,label:h.label?this.luigi.i18n().getTranslation(h.label):void 0,tooltip:h.label?this.resolveTooltipText(h,h.label):void 0,node:h,selected:h===r})}),c}shouldRedirect(n,r){var u;const o=r??this.getPathData(n);if(n=="")return o.rootNodes[0].pathSegment;if(o.selectedNode&&!o.selectedNode.viewUrl&&((u=o.selectedNode.children)!=null&&u.length))return n+"/"+o.selectedNode.children[0].pathSegment}getCurrentNode(n){var u;const r=this.getPathData(n),o=r.selectedNode;if(!(!o||!Ve.isNodeAccessPermitted(o,this.getParentNode(r.selectedNode,r),((u=r==null?void 0:r.selectedNode)==null?void 0:u.context)||{},this.luigi)))return o}getPathParams(n){return this.getPathData(n).pathParams}getTruncatedChildren(n){let r=!1,o=!1,u=[];return n.slice().reverse().forEach(c=>{(!r||c.tabNav)&&(c.tabNav===!1&&(o=!0),c.keepSelectedForChildren===!1?r=!0:(c.keepSelectedForChildren||c.tabNav&&!o)&&(r=!0,u=[])),u.push(c)}),u.reverse()}applyNavGroups(n){const r={},o=[],c=[];return n.forEach(h=>{if(h.node)c.push(h);else if(h.category){const d=h.category.id;d&&d.indexOf("::")>0?o.push(h):(h.category.isGroup,r[d]=h,c.push(h))}}),o.forEach(h=>{var v;const d=((v=h.category)==null?void 0:v.id.split("::")[0])||"",_=r[d];_&&_.category&&(_.category.isGroup||(_.category.isGroup=!0),_.category.nodes||(_.category.nodes=[]),_.category.nodes.push(h))}),c.filter(h=>{var d,_,v,x,C,y;if((d=h.category)!=null&&d.isGroup&&((_=h.category)!=null&&_.nodes)&&((v=h.category)==null?void 0:v.nodes.length)>0){for(let I=0;I<((x=h.category)==null?void 0:x.nodes.length);I++){const L=(C=h.category)==null?void 0:C.nodes[I];if(L.node&&!L.node.hideFromNav&&L.node.label||(y=L.category)!=null&&y.nodes&&L.category.nodes.filter(D=>{var F,te;return!((F=D.node)!=null&&F.hideFromNav)&&((te=D.node)==null?void 0:te.label)}).length>0)return!0}return!1}return!0})}getLeftNavData(n,r){var C,y,I;const o=r??this.getPathData(n);let u=[];const c=[];let h="";(C=o.nodesInPath)==null||C.forEach(L=>{L.children&&(L.tabNav||(h+="/"+(L.pathSegment||"")),c.push(L))});const d=this.getTruncatedChildren(o.nodesInPath);let _=[...d].pop(),v=o.selectedNode;(_!=null&&_.keepSelectedForChildren||_!=null&&_.tabNav)&&(v=_,d.pop(),_=[...d].pop()),v&&v.children&&o.rootNodes.includes(v)?u=this.buildNavItems(v.children,void 0,o):v&&v.tabNav?u=_!=null&&_.children?this.buildNavItems(_.children,v,o):[]:u=this.buildNavItems(((y=[...c].pop())==null?void 0:y.children)||[],v,o);const x=Ve.buildPath(c,o);return u=this.applyNavGroups(u),{selectedNode:v,items:u,basePath:h.replace(/\/\/+/g,"/"),sideNavFooterText:(I=this.luigi.getConfig().settings)==null?void 0:I.sideNavFooterText,navClick:L=>L.node&&this.navItemClick(L.node,x)}}navItemClick(n,r){if(!n.pathSegment){console.error("Navigation error: pathSegment is not defined for the node.");return}let o="/";if(r.trim()!=="")o+=r+"/";else if(!n.isRootNode){console.error("Navigation error: parentPath is empty while the node is not a root node");return}o+=n.pathSegment,this.luigi.navigation().navigate(o)}getTopNavData(n,r){var y,I,L,D,F,te,ge,oe,Oe,de,Ue,we,Pe,Ce,pe,_e,$,gt,ke,Ae,yt,b,Ne,ee,me,Le,Ar,Rr;const o=this.luigi.getConfig(),u=r??this.getPathData(n),c=this.prepareRootNodes((y=o.navigation)==null?void 0:y.nodes,((I=o.navigation)==null?void 0:I.globalContext)||{}),h=(F=(D=(L=o.navigation)==null?void 0:L.profile)==null?void 0:D.items)!=null&&F.length?JSON.parse(JSON.stringify(o.navigation.profile.items)):[],d=((te=o.navigation)==null?void 0:te.appSwitcher)&&this.getAppSwitcherData((ge=o.navigation)==null?void 0:ge.appSwitcher,(oe=o.settings)==null?void 0:oe.header),_=Ve.updateHeaderTitle(d,u);h!=null&&h.length&&h.map(Re=>({...Re,label:this.luigi.i18n().getTranslation(Re.label||"")}));const v=this.luigi.i18n().getTranslation((Ue=(de=(Oe=o.navigation)==null?void 0:Oe.profile)==null?void 0:de.logout)==null?void 0:Ue.label)||no.logout.label,x=Re=>{var nt;if(Re.link)this.luigi.navigation().navigate(Re.link);else if((nt=Re.externalLink)!=null&&nt.url)if(Re.externalLink.sameWindow)window.location.href=Re.externalLink.url;else{const dt=window.open(Re.externalLink.url,"_blank","noopener noreferrer");dt&&(dt.opener=null,dt.focus())}},C={authEnabled:this.luigi.auth().isAuthorizationEnabled(),signedIn:this.luigi.auth().isAuthorizationEnabled()&&dn.isLoggedIn(),items:h,itemClick:x,logout:{altText:this.luigi.i18n().getTranslation((Ce=(Pe=(we=o.navigation)==null?void 0:we.profile)==null?void 0:Pe.logout)==null?void 0:Ce.altText)||no.logout.label,label:v,icon:(($=(_e=(pe=o.navigation)==null?void 0:pe.profile)==null?void 0:_e.logout)==null?void 0:$.icon)||no.logout.icon,testId:((Ae=(ke=(gt=o.navigation)==null?void 0:gt.profile)==null?void 0:ke.logout)==null?void 0:Ae.testId)||Ve.prepareForTests(v),doLogout:()=>{kn.logout()}},onUserInfoUpdate:Re=>{var nt,dt,br,Qt;if((dt=(nt=o.navigation)==null?void 0:nt.profile)!=null&&dt.staticUserInfoFn){const pt=(Qt=(br=o.navigation)==null?void 0:br.profile)==null?void 0:Qt.staticUserInfoFn();pt instanceof Promise?pt.then($i=>{Re($i)}):Re(pt)}else kn.getUserInfoStore().subscribe(pt=>{Re(pt)})}};return{appTitle:_||((b=(yt=o.settings)==null?void 0:yt.header)==null?void 0:b.title),logo:(ee=(Ne=o.settings)==null?void 0:Ne.header)==null?void 0:ee.logo,topNodes:this.buildNavItems(c,void 0,u),productSwitcher:(me=o.navigation)==null?void 0:me.productSwitcher,profile:C,appSwitcher:((Le=o.navigation)==null?void 0:Le.appSwitcher)&&this.getAppSwitcherData((Ar=o.navigation)==null?void 0:Ar.appSwitcher,(Rr=o.settings)==null?void 0:Rr.header),navClick:Re=>Re.node&&this.navItemClick(Re.node,"")}}getParentNode(n,r){var o;if(n&&n===((o=r.nodesInPath)==null?void 0:o[r.nodesInPath.length-1]))return r.nodesInPath[r.nodesInPath.length-2]}getAppSwitcherData(n,r){var c;const o=n,u=o==null?void 0:o.showMainAppEntry;if(o&&o.items&&u){const h={title:this.luigi.i18n().getTranslation(r.title||""),subTitle:r.subTitle,link:"/"};if((c=o.items)==null||c.map(d=>({...d,title:this.luigi.i18n().getTranslation(d.title||"")})),o.items.some(d=>d.link===h.link))return o;o.items.unshift(h)}return o}getTabNavData(n,r){var x;const o=r??this.getPathData(n),u=o==null?void 0:o.selectedNode;let c;if(!u)return{};if(!u.tabNav&&(c=this.getParentNode(u,o),c&&!c.tabNav))return{};let h="";(x=o.nodesInPath)==null||x.forEach(C=>{C.children&&(h+="/"+(C.pathSegment||""))});const d=c?this.getTruncatedChildren(c.children):this.getTruncatedChildren(u.children),_=this.buildNavItems(d,u,o),v=Ve.buildPath(o.nodesInPath||[],o);return{selectedNode:u,items:_,basePath:h.replace(/\/\/+/g,"/"),navClick:C=>C.node&&this.navItemClick(C.node,v)}}onNodeChange(n,r){const o=this.luigi.getConfigValue("navigation.nodeChangeHook");B.isFunction(o)?o(n,r):o!==void 0&&console.warn("nodeChangeHook is not a function!")}async extractDataFromPath(n){const r=this.getPathData(n);return{nodeObject:q.getLastNodeObject(r),pathData:r}}async shouldPreventNavigation(n){return!!(n!=null&&n.onNodeActivation&&(B.isFunction(n.onNodeActivation)||B.isAsyncFunction(n.onNodeActivation))&&await n.onNodeActivation(n)===!1)}async shouldPreventNavigationForPath(n){const{nodeObject:r}=await this.extractDataFromPath(n);return!!await this.shouldPreventNavigation(r)}async openViewInNewTab(n){if(await this.shouldPreventNavigationForPath(n))return;this.luigi.getConfigValue("routing.useHashRouting")&&(n="#"+n),window.open(n,"_blank","noopener,noreferrer")}resolveTooltipText(n,r){return Ve.generateTooltipText(n,r,this.luigi)}prepareRootNodes(n,r){const o=Hm.cloneDeep(n)||[];return o.length?(o.forEach(u=>{u.isRootNode=!0}),this.getAccessibleNodes(void 0,o,r)):o}getAccessibleNodes(n,r,o){return r?r.filter(u=>Ve.isNodeAccessPermitted(u,n,o,this.luigi)):[]}async handleNavigationRequest(n,r,o,u,c,h){var v;const d=n.replace(/\/\/+/g,"/"),_=!1;if(o)this.luigi.navigation().openAsModal(n,o,h);else{const x={detail:{preventContextUpdate:_,withoutSync:!!c}};if(await se.get(mn).closeModals(),u){await this.openViewInNewTab(n);return}if((v=this.luigi.getConfig().routing)!=null&&v.useHashRouting)if(!c)location.hash=d;else{const C=new CustomEvent("hashchange",x);window.history.pushState({path:"/#"+d},"","/#"+d),window.dispatchEvent(C)}else{const C=new CustomEvent("popstate",x);window.history.pushState({path:d},"",d),window.dispatchEvent(C)}}}}function tn(){}function gl(s){return s()}function Xu(){return Object.create(null)}function Ai(s){s.forEach(gl)}function dl(s){return typeof s=="function"}function pl(s,n){return s!=s?n==n:s!==n||s&&typeof s=="object"||typeof s=="function"}let Ei,Er;function Ju(s,n){return s===n||(Ei||(Ei=document.createElement("a")),Ei.href=n,s===Ei.href)}function Vm(s,n,r){const o=(function(u){if(!u)return document;const c=u.getRootNode?u.getRootNode():u.ownerDocument;return c&&c.host?c:u.ownerDocument})(s);if(!o.getElementById(n)){const u=Vn("style");u.id=n,u.textContent=r,(function(c,h){(function(d,_){d.appendChild(_)})(c.head||c,h),h.sheet})(o,u)}}function pn(s,n,r){s.insertBefore(n,r||null)}function nn(s){s.parentNode&&s.parentNode.removeChild(s)}function Vn(s){return document.createElement(s)}function _l(s){return document.createTextNode(s)}function ft(s,n,r){r==null?s.removeAttribute(n):s.getAttribute(n)!==r&&s.setAttribute(n,r)}function mr(s){Er=s}function ml(){if(!Er)throw new Error("Function called outside component initialization");return Er}function vl(s){ml().$$.on_mount.push(s)}const Nn=[],wr=[];let Wn=[];const Zu=[],Qm=Promise.resolve();let so=!1;function oo(s){Wn.push(s)}const ro=new Set;let On=0;function Q(){if(On!==0)return;const s=Er;do{try{for(;On<Nn.length;){const n=Nn[On];On++,mr(n),Gm(n.$$)}}catch(n){throw Nn.length=0,On=0,n}for(mr(null),Nn.length=0,On=0;wr.length;)wr.pop()();for(let n=0;n<Wn.length;n+=1){const r=Wn[n];ro.has(r)||(ro.add(r),r())}Wn.length=0}while(Nn.length);for(;Zu.length;)Zu.pop()();so=!1,ro.clear(),mr(s)}function Gm(s){if(s.fragment!==null){s.update(),Ai(s.before_update);const n=s.dirty;s.dirty=[-1],s.fragment&&s.fragment.p(s.ctx,n),s.after_update.forEach(oo)}}const qm=new Set;function Km(s,n){const r=s.$$;r.fragment!==null&&((function(o){const u=[],c=[];Wn.forEach((h=>o.indexOf(h)===-1?u.push(h):c.push(h))),c.forEach((h=>h())),Wn=u})(r.after_update),Ai(r.on_destroy),r.fragment&&r.fragment.d(n),r.on_destroy=r.fragment=null,r.ctx=[])}function zm(s,n){s.$$.dirty[0]===-1&&(Nn.push(s),so||(so=!0,Qm.then(Q)),s.$$.dirty.fill(0)),s.$$.dirty[n/31|0]|=1<<n%31}function Sl(s,n,r,o,u,c,h=null,d=[-1]){const _=Er;mr(s);const v=s.$$={fragment:null,ctx:[],props:c,update:tn,not_equal:u,bound:Xu(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(_?_.$$.context:[])),callbacks:Xu(),dirty:d,skip_bound:!1,root:n.target||_.$$.root};h&&h(v.root);let x=!1;if(v.ctx=r?r(s,n.props||{},((I,L,...D)=>{const F=D.length?D[0]:L;return v.ctx&&u(v.ctx[I],v.ctx[I]=F)&&(!v.skip_bound&&v.bound[I]&&v.bound[I](F),x&&zm(s,I)),L})):[],v.update(),x=!0,Ai(v.before_update),v.fragment=!!o&&o(v.ctx),n.target){if(n.hydrate){const I=(function(L){return Array.from(L.childNodes)})(n.target);v.fragment&&v.fragment.l(I),I.forEach(nn)}else v.fragment&&v.fragment.c();n.intro&&(C=s.$$.fragment)&&C.i&&(qm.delete(C),C.i(y)),(function(I,L,D){const{fragment:F,after_update:te}=I.$$;F&&F.m(L,D),oo((()=>{const ge=I.$$.on_mount.map(gl).filter(dl);I.$$.on_destroy?I.$$.on_destroy.push(...ge):Ai(ge),I.$$.on_mount=[]})),te.forEach(oo)})(s,n.target,n.anchor),Q()}var C,y;mr(_)}let El;function Ci(s,n,r,o){var c;const u=(c=r[s])==null?void 0:c.type;if(n=u==="Boolean"&&typeof n!="boolean"?n!=null:n,!o||!r[s])return n;if(o==="toAttribute")switch(u){case"Object":case"Array":return n==null?null:JSON.stringify(n);case"Boolean":return n?"":null;case"Number":return n??null;default:return n}else switch(u){case"Object":case"Array":return n&&JSON.parse(n);case"Boolean":default:return n;case"Number":return n!=null?+n:n}}function wl(s,n,r,o,u,c){let h=class extends El{constructor(){super(s,r,u),this.$$p_d=n}static get observedAttributes(){return Object.keys(n).map((d=>(n[d].attribute||d).toLowerCase()))}};return Object.keys(n).forEach((d=>{Object.defineProperty(h.prototype,d,{get(){return this.$$c&&d in this.$$c?this.$$c[d]:this.$$d[d]},set(_){var v;_=Ci(d,_,n),this.$$d[d]=_,(v=this.$$c)==null||v.$set({[d]:_})}})})),o.forEach((d=>{Object.defineProperty(h.prototype,d,{get(){var _;return(_=this.$$c)==null?void 0:_[d]}})})),c&&(h=c(h)),s.element=h,h}typeof HTMLElement=="function"&&(El=class extends HTMLElement{constructor(n,r,o){super();Ee(this,"$$ctor");Ee(this,"$$s");Ee(this,"$$c");Ee(this,"$$cn",!1);Ee(this,"$$d",{});Ee(this,"$$r",!1);Ee(this,"$$p_d",{});Ee(this,"$$l",{});Ee(this,"$$l_u",new Map);this.$$ctor=n,this.$$s=r,o&&this.attachShadow({mode:"open"})}addEventListener(n,r,o){if(this.$$l[n]=this.$$l[n]||[],this.$$l[n].push(r),this.$$c){const u=this.$$c.$on(n,r);this.$$l_u.set(r,u)}super.addEventListener(n,r,o)}removeEventListener(n,r,o){if(super.removeEventListener(n,r,o),this.$$c){const u=this.$$l_u.get(r);u&&(u(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let r=function(h){return()=>{let d;return{c:function(){d=Vn("slot"),h!=="default"&&ft(d,"name",h)},m:function(_,v){pn(_,d,v)},d:function(_){_&&nn(d)}}}};var n=r;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const o={},u=(function(h){const d={};return h.childNodes.forEach((_=>{d[_.slot||"default"]=!0})),d})(this);for(const h of this.$$s)h in u&&(o[h]=[r(h)]);for(const h of this.attributes){const d=this.$$g_p(h.name);d in this.$$d||(this.$$d[d]=Ci(d,h.value,this.$$p_d,"toProp"))}for(const h in this.$$p_d)h in this.$$d||this[h]===void 0||(this.$$d[h]=this[h],delete this[h]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:o,$$scope:{ctx:[]}}});const c=()=>{this.$$r=!0;for(const h in this.$$p_d)if(this.$$d[h]=this.$$c.$$.ctx[this.$$c.$$.props[h]],this.$$p_d[h].reflect){const d=Ci(h,this.$$d[h],this.$$p_d,"toAttribute");d==null?this.removeAttribute(this.$$p_d[h].attribute||h):this.setAttribute(this.$$p_d[h].attribute||h,d)}this.$$r=!1};this.$$c.$$.after_update.push(c),c();for(const h in this.$$l)for(const d of this.$$l[h]){const _=this.$$c.$on(h,d);this.$$l_u.set(d,_)}this.$$l={}}}attributeChangedCallback(n,r,o){var u;this.$$r||(n=this.$$g_p(n),this.$$d[n]=Ci(n,o,this.$$p_d,"toProp"),(u=this.$$c)==null||u.$set({[n]:this.$$d[n]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(n){return Object.keys(this.$$p_d).find((r=>this.$$p_d[r].attribute===n||!this.$$p_d[r].attribute&&r.toLowerCase()===n))||n}});class Cl{constructor(){Ee(this,"$$");Ee(this,"$$set")}$destroy(){Km(this,1),this.$destroy=tn}$on(n,r){if(!dl(r))return tn;const o=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return o.push(r),()=>{const u=o.indexOf(r);u!==-1&&o.splice(u,1)}}$set(n){var r;this.$$set&&(r=n,Object.keys(r).length!==0)&&(this.$$.skip_bound=!0,this.$$set(n),this.$$.skip_bound=!1)}}var J;typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4"),(function(s){s.CUSTOM_MESSAGE="custom",s.GET_CONTEXT="luigi.get-context",s.SEND_CONTEXT_HANDSHAKE="luigi.init",s.CONTEXT_RECEIVED="luigi.init.ok",s.NAVIGATION_REQUEST="luigi.navigation.open",s.ALERT_REQUEST="luigi.ux.alert.show",s.ALERT_CLOSED="luigi.ux.alert.hide",s.INITIALIZED="luigi.init.ok",s.ADD_SEARCH_PARAMS_REQUEST="luigi.addSearchParams",s.ADD_NODE_PARAMS_REQUEST="luigi.addNodeParams",s.SHOW_CONFIRMATION_MODAL_REQUEST="luigi.ux.confirmationModal.show",s.CONFIRMATION_MODAL_CLOSED="luigi.ux.confirmationModal.hide",s.SHOW_LOADING_INDICATOR_REQUEST="luigi.show-loading-indicator",s.HIDE_LOADING_INDICATOR_REQUEST="luigi.hide-loading-indicator",s.SET_CURRENT_LOCALE_REQUEST="luigi.ux.set-current-locale",s.LOCAL_STORAGE_SET_REQUEST="storage",s.RUNTIME_ERROR_HANDLING_REQUEST="luigi-runtime-error-handling",s.SET_ANCHOR_LINK_REQUEST="luigi.setAnchor",s.SET_THIRD_PARTY_COOKIES_REQUEST="luigi.third-party-cookie",s.BACK_NAVIGATION_REQUEST="luigi.navigation.back",s.GET_CURRENT_ROUTE_REQUEST="luigi.navigation.currentRoute",s.SEND_CURRENT_ROUTE_ANSWER="luigi.navigation.currentRoute.answer",s.SEND_CONTEXT_OBJECT="luigi.navigate",s.NAVIGATION_COMPLETED_REPORT="luigi.navigate.ok",s.CLOSE_MODAL_ANSWER="luigi.navigation.modal.close",s.UPDATE_MODAL_PATH_DATA_REQUEST="luigi.navigation.updateModalDataPath",s.UPDATE_MODAL_SETTINGS="luigi.navigation.updateModalSettings",s.CHECK_PATH_EXISTS_REQUEST="luigi.navigation.pathExists",s.SEND_PATH_EXISTS_ANSWER="luigi.navigation.pathExists.answer",s.SET_DIRTY_STATUS_REQUEST="luigi.set-page-dirty",s.AUTH_SET_TOKEN="luigi.auth.tokenIssued",s.ADD_BACKDROP_REQUEST="luigi.add-backdrop",s.REMOVE_BACKDROP_REQUEST="luigi.remove-backdrop",s.SET_VIEW_GROUP_DATA_REQUEST="luigi.setVGData",s.CLOSE_CURRENT_MODAL_REQUEST="luigi.close-modal"})(J||(J={}));class Ym extends Event{constructor(n,r,o,u){super(n),this.detail=r,this.payload=o||r||{},this.callbackFn=u}callback(n){this.callbackFn&&this.callbackFn(n)}}const O={ADD_BACKDROP_REQUEST:"add-backdrop-request",ADD_NODE_PARAMS_REQUEST:"add-node-params-request",ADD_SEARCH_PARAMS_REQUEST:"add-search-params-request",ALERT_CLOSED:"close-alert-request",ALERT_REQUEST:"show-alert-request",BACK_NAVIGATION_REQUEST:"navigate-back-request",CHECK_PATH_EXISTS_REQUEST:"check-path-exists-request",CLOSE_CURRENT_MODAL_REQUEST:"close-current-modal-request",CLOSE_USER_SETTINGS_REQUEST:"close-user-settings-request",COLLAPSE_LEFT_NAV_REQUEST:"collapse-leftnav-request",CUSTOM_MESSAGE:"custom-message",GET_CONTEXT_REQUEST:"get-context-request",GET_CURRENT_ROUTE_REQUEST:"get-current-route-request",GO_BACK_REQUEST:"go-back-request",HAS_BACK_REQUEST:"has-back-request",HIDE_LOADING_INDICATOR_REQUEST:"hide-loading-indicator-request",INITIALIZED:"initialized",LOCAL_STORAGE_SET_REQUEST:"set-storage-request",NAVIGATION_COMPLETED_REPORT:"report-navigation-completed-request",NAVIGATION_REQUEST:"navigation-request",OPEN_USER_SETTINGS_REQUEST:"open-user-settings-request",PATH_EXISTS_REQUEST:"path-exists-request",REMOVE_BACKDROP_REQUEST:"remove-backdrop-request",RUNTIME_ERROR_HANDLING_REQUEST:"runtime-error-handling-request",SET_ANCHOR_LINK_REQUEST:"set-anchor-request",SET_CURRENT_LOCALE_REQUEST:"set-current-locale-request",SET_DIRTY_STATUS_REQUEST:"set-dirty-status-request",SET_DOCUMENT_TITLE_REQUEST:"set-document-title-request",SET_THIRD_PARTY_COOKIES_REQUEST:"set-third-party-cookies-request",SET_VIEW_GROUP_DATA_REQUEST:"set-viewgroup-data-request",SHOW_CONFIRMATION_MODAL_REQUEST:"show-confirmation-modal-request",SHOW_LOADING_INDICATOR_REQUEST:"show-loading-indicator-request",UPDATE_MODAL_PATH_DATA_REQUEST:"update-modal-path-data-request",UPDATE_MODAL_SETTINGS_REQUEST:"update-modal-settings-request",UPDATE_TOP_NAVIGATION_REQUEST:"update-top-navigation-request"};class lo{isVisible(n){return!!(n.offsetWidth||n.offsetHeight||n.getClientRects().length)}sendCustomMessageToIframe(n,r,o){var c;const u=o||"custom";if((c=n==null?void 0:n.iframe)!=null&&c.contentWindow){const h=new URL(n.iframe.src);u==="custom"?n.iframe.contentWindow.postMessage({msg:u,data:r},h.origin):n.iframe.contentWindow.postMessage({msg:u,...r},h.origin)}else console.error("Message target could not be resolved")}dispatchWithPayload(n,r,o,u,c){this.dispatch(n,r,o,c,u)}dispatch(n,r,o,u,c){const h=new Ym(n,o,c,u);r.dispatchEvent(h)}getTargetContainer(n){let r;return globalThis.__luigi_container_manager.container.forEach((o=>{var u;(u=o.iframeHandle)!=null&&u.iframe&&o.iframeHandle.iframe.contentWindow===n.source&&(r=o)})),r}getContainerManager(){return globalThis.__luigi_container_manager||(globalThis.__luigi_container_manager={container:[],messageListener:n=>{var u,c,h,d,_,v,x,C;const r=this.getTargetContainer(n),o=(c=(u=r==null?void 0:r.iframeHandle)==null?void 0:u.iframe)==null?void 0:c.contentWindow;if(o&&o===n.source)switch(n.data.msg){case J.CUSTOM_MESSAGE:{const y=n.data.data,I=y.id;delete y.id,this.dispatch(O.CUSTOM_MESSAGE,r,{id:I,_metaData:{},data:y})}break;case J.GET_CONTEXT:o.postMessage({msg:J.SEND_CONTEXT_HANDSHAKE,context:r.context||{},internal:{thirdPartyCookieCheck:{disabled:r.skipCookieCheck==="true"},currentTheme:r.theme,currentLocale:r.locale,activeFeatureToggleList:r.activeFeatureToggleList||[],cssVariables:r.cssVariables||{},anchor:r.anchor||"",userSettings:r.userSettings||null,drawer:r.drawer||!1,modal:r.modal||!1,viewStackSize:r.viewStackSize||0,isNavigateBack:r.isNavigateBack||!1},authData:r.authData||{},nodeParams:r.nodeParams||{},searchParams:r.searchParams||{},pathParams:r.pathParams||{}},n.origin);break;case J.NAVIGATION_REQUEST:this.dispatch(O.NAVIGATION_REQUEST,r,n.data.params,(y=>{o.postMessage({msg:J.CLOSE_MODAL_ANSWER,data:y},n.origin)}));break;case J.ALERT_REQUEST:this.dispatchWithPayload(O.ALERT_REQUEST,r,n,(d=(h=n.data)==null?void 0:h.data)==null?void 0:d.settings,(y=>{var I,L,D;r.notifyAlertClosed((D=(L=(I=n.data)==null?void 0:I.data)==null?void 0:L.settings)==null?void 0:D.id,y)}));break;case J.INITIALIZED:this.dispatch(O.INITIALIZED,r,((_=n.data)==null?void 0:_.params)||{});break;case J.ADD_SEARCH_PARAMS_REQUEST:this.dispatch(O.ADD_SEARCH_PARAMS_REQUEST,r,{data:n.data.data,keepBrowserHistory:n.data.keepBrowserHistory});break;case J.ADD_NODE_PARAMS_REQUEST:this.dispatch(O.ADD_NODE_PARAMS_REQUEST,r,{data:n.data.data,keepBrowserHistory:n.data.keepBrowserHistory});break;case J.SHOW_CONFIRMATION_MODAL_REQUEST:this.dispatchWithPayload(O.SHOW_CONFIRMATION_MODAL_REQUEST,r,n.data.data,(v=n.data.data)==null?void 0:v.settings,(y=>{r.notifyConfirmationModalClosed(y)}));break;case J.SHOW_LOADING_INDICATOR_REQUEST:this.dispatch(O.SHOW_LOADING_INDICATOR_REQUEST,r,n);break;case J.HIDE_LOADING_INDICATOR_REQUEST:this.dispatch(O.HIDE_LOADING_INDICATOR_REQUEST,r,n);break;case J.SET_CURRENT_LOCALE_REQUEST:this.dispatchWithPayload(O.SET_CURRENT_LOCALE_REQUEST,r,n,n.data.data);break;case J.LOCAL_STORAGE_SET_REQUEST:this.dispatchWithPayload(O.LOCAL_STORAGE_SET_REQUEST,r,n,(x=n.data.data)==null?void 0:x.params);break;case J.RUNTIME_ERROR_HANDLING_REQUEST:this.dispatch(O.RUNTIME_ERROR_HANDLING_REQUEST,r,n);break;case J.SET_ANCHOR_LINK_REQUEST:this.dispatchWithPayload(O.SET_ANCHOR_LINK_REQUEST,r,n,n.data.anchor);break;case J.SET_THIRD_PARTY_COOKIES_REQUEST:this.dispatch(O.SET_THIRD_PARTY_COOKIES_REQUEST,r,n);break;case J.BACK_NAVIGATION_REQUEST:{let y=((C=n.data)==null?void 0:C.goBackContext)||{};if(typeof y=="string")try{y=JSON.parse(y)}catch(I){console.warn(I)}this.dispatch(O.GO_BACK_REQUEST,r,y),this.dispatch(O.BACK_NAVIGATION_REQUEST,r,n)}break;case J.GET_CURRENT_ROUTE_REQUEST:this.dispatchWithPayload(O.GET_CURRENT_ROUTE_REQUEST,r,n,n.data.data,(y=>{var I,L;o.postMessage({msg:J.SEND_CURRENT_ROUTE_ANSWER,data:{correlationId:(L=(I=n.data)==null?void 0:I.data)==null?void 0:L.id,route:y}},n.origin)}));break;case J.NAVIGATION_COMPLETED_REPORT:this.dispatch(O.NAVIGATION_COMPLETED_REPORT,r,n);break;case J.UPDATE_MODAL_PATH_DATA_REQUEST:this.dispatchWithPayload(O.UPDATE_MODAL_PATH_DATA_REQUEST,r,n,n.data.params);break;case J.UPDATE_MODAL_SETTINGS:this.dispatchWithPayload(O.UPDATE_MODAL_SETTINGS_REQUEST,r,n,{addHistoryEntry:n.data.addHistoryEntry,updatedModalSettings:n.data.updatedModalSettings});break;case J.CHECK_PATH_EXISTS_REQUEST:this.dispatchWithPayload(O.CHECK_PATH_EXISTS_REQUEST,r,n,n.data.data,(y=>{var I,L;o.postMessage({msg:J.SEND_PATH_EXISTS_ANSWER,data:{correlationId:(L=(I=n.data)==null?void 0:I.data)==null?void 0:L.id,pathExists:y}},n.origin)}));break;case J.SET_DIRTY_STATUS_REQUEST:this.dispatchWithPayload(O.SET_DIRTY_STATUS_REQUEST,r,n,{dirty:n.data.dirty});break;case J.SET_VIEW_GROUP_DATA_REQUEST:this.dispatch(O.SET_VIEW_GROUP_DATA_REQUEST,r,n.data.data);break;case J.ADD_BACKDROP_REQUEST:this.dispatch(O.ADD_BACKDROP_REQUEST,r,n);break;case J.REMOVE_BACKDROP_REQUEST:this.dispatch(O.REMOVE_BACKDROP_REQUEST,r,n);break;case J.CLOSE_CURRENT_MODAL_REQUEST:this.dispatch(O.CLOSE_CURRENT_MODAL_REQUEST,r,n)}}},window.addEventListener("message",globalThis.__luigi_container_manager.messageListener)),globalThis.__luigi_container_manager}registerContainer(n){this.getContainerManager().container.push(n)}}const en=new lo,Dn=new class{constructor(){this.updateContext=(s,n,r,o,u,c)=>{if(r){const h=n||{};en.sendCustomMessageToIframe(r,{context:s,nodeParams:o||{},pathParams:u||{},searchParams:c||{},internal:h,withoutSync:!0},J.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update context on inexisting iframe")},this.updateViewUrl=(s,n,r,o)=>{if(o){const u=r||{};en.sendCustomMessageToIframe(o,{context:n,internal:u,withoutSync:!1,viewUrl:s},J.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update route on inexisting iframe")},this.updateAuthData=(s,n)=>{s&&n?en.sendCustomMessageToIframe(s,{authData:n},J.AUTH_SET_TOKEN):console.warn("Attempting to update auth data on inexisting iframe or authData")},this.sendCustomMessage=(s,n,r,o,u)=>{if(r&&n._luigi_mfe_webcomponent)en.dispatch(s,n._luigi_mfe_webcomponent,u);else{const c={...u};c.id&&console.warn('Property "id" is reserved and can not be used in custom message data'),c.id=s,en.sendCustomMessageToIframe(o,c)}},this.notifyConfirmationModalClosed=(s,n)=>{const r={data:{confirmed:s}};en.sendCustomMessageToIframe(n,r,J.CONFIRMATION_MODAL_CLOSED)}}notifyAlertClosed(s,n,r){const o=n?{id:s,dismissKey:n}:{id:s};en.sendCustomMessageToIframe(r,o,J.ALERT_CLOSED)}},ju=s=>{if(!s)return;const n=s;return n.forEach(((r,o)=>{n[o]=r+(r.indexOf(";")!=-1?"":";"),n[o]=s[o].replaceAll('"',"'")})),n.join(" ")};class Qn{constructor(n){n?(this.rendererObject=n,this.config=n.config||{}):this.config={}}createCompoundContainer(){return document.createElement("div")}createCompoundItemContainer(n){return document.createElement("div")}attachCompoundItem(n,r){n.appendChild(r)}}class Xm extends Qn{constructor(n){super(n||{use:{}}),n&&n.use&&n.use.extends&&(this.superRenderer=Tl({use:n.use.extends,config:n.config}))}createCompoundContainer(){return this.rendererObject.use.createCompoundContainer?this.rendererObject.use.createCompoundContainer(this.config,this.superRenderer):this.superRenderer?this.superRenderer.createCompoundContainer():super.createCompoundContainer()}createCompoundItemContainer(n){return this.rendererObject.use.createCompoundItemContainer?this.rendererObject.use.createCompoundItemContainer(n,this.config,this.superRenderer):this.superRenderer?this.superRenderer.createCompoundItemContainer(n):super.createCompoundItemContainer(n)}attachCompoundItem(n,r){this.rendererObject.use.attachCompoundItem?this.rendererObject.use.attachCompoundItem(n,r,this.superRenderer):this.superRenderer?this.superRenderer.attachCompoundItem(n,r):super.attachCompoundItem(n,r)}}class Jm extends Qn{createCompoundContainer(){const n="__lui_compound_"+new Date().getTime(),r=document.createElement("div");r.classList.add(n);let o="";return this.config.layouts&&this.config.layouts.forEach((u=>{if(u.minWidth||u.maxWidth){let c="@media only screen ";u.minWidth!=null&&(c+=`and (min-width: ${u.minWidth}px) `),u.maxWidth!=null&&(c+=`and (max-width: ${u.maxWidth}px) `),c+=`{
33
+ .${n} {
34
+ grid-template-columns: ${u.columns||"auto"};
35
+ grid-template-rows: ${u.rows||"auto"};
36
+ grid-gap: ${u.gap||"0"};
11
37
  }
12
38
  }
13
- `,n+=s}})),t.innerHTML=`
39
+ `,o+=c}})),r.innerHTML=`
14
40
  <style scoped>
15
- .${e} {
41
+ .${n} {
16
42
  display: grid;
17
43
  grid-template-columns: ${this.config.columns||"auto"};
18
44
  grid-template-rows: ${this.config.rows||"auto"};
19
45
  grid-gap: ${this.config.gap||"0"};
20
46
  min-height: ${this.config.minHeight||"auto"};
21
47
  }
22
- ${n}
48
+ ${o}
23
49
  </style>
24
- `,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.classList.add("lui-compoundItemCnt"),n}}const Kt=i=>{const e=i.use;return e?e==="grid"?new Di(i):e.createCompoundContainer||e.createCompoundItemContainer||e.attachCompoundItem?new Oi(i):new Re(i):new Re(i)},Rt=(i,e,t,n)=>{e!=null&&e.eventListeners&&e.eventListeners.forEach((r=>{const s=r.source+"."+r.name,a=i[s],o={wcElementId:t,wcElement:n,action:r.action,converter:r.dataConverter};a?a.push(o):i[s]=[o]}))};function At(i){return String(i).replaceAll("&lt;","<").replaceAll("&gt;",">").replaceAll("&quot;",'"').replaceAll("&#39;","'").replaceAll("&sol;","/")}class Jt{constructor(){this.alertResolvers={},this.alertIndex=0,this.containerService=new ct}dynamicImport(e){return Object.freeze(import(e))}processViewUrl(e,t){return e}attachWC(e,t,n,r,s,a,o){if(n&&n.contains(t)){const l=document.createElement(e);a&&l.setAttribute("nodeId",a),l.setAttribute("lui_web_component","true"),this.initWC(l,e,n,s,r,a,o),n.replaceChild(l,t),n._luigi_node&&(n._luigi_mfe_webcomponent=l),n.dispatchEvent(new Event("wc_ready"))}}dispatchLuigiEvent(e,t,n){this.containerService.dispatch(e,this.thisComponent,t,n)}createClientAPI(e,t,n,r,s){return{linkManager:()=>{let a=null,o=!1,l=!1,c=!1,f={};const h={navigate:(u,g={})=>{const p={fromContext:a,fromClosestContext:o,fromVirtualTreeRoot:l,fromParent:c,nodeParams:f,...g};this.dispatchLuigiEvent(m.NAVIGATION_REQUEST,{link:u,...p})},navigateToIntent:(u,g={})=>{var S;let p="#?intent=";if(p+=u,g&&((S=Object.keys(g))==null?void 0:S.length)){const T=Object.entries(g);if(T.length>0){p+="?";for(const[R,$]of T)p+=R+"="+$+"&";p=p.slice(0,-1)}}h.navigate(p)},fromClosestContext:()=>(o=!0,h),fromContext:u=>(a=u,h),fromVirtualTreeRoot:()=>(l=!0,h),fromParent:()=>(c=!0,h),getCurrentRoute:()=>{const u={fromContext:a,fromClosestContext:o,fromVirtualTreeRoot:l,fromParent:c,nodeParams:f};return new Promise(((g,p)=>{this.containerService.dispatch(m.GET_CURRENT_ROUTE_REQUEST,this.thisComponent,{...u},(S=>{S?g(S):p("No current route received.")}))}))},withParams:u=>(f=u,h),updateModalPathInternalNavigation:(u,g={},p=!1)=>{if(!u)return void console.warn("Updating path of the modal upon internal navigation prevented. No path specified.");const S={fromClosestContext:o,fromContext:a,fromParent:c,fromVirtualTreeRoot:l,nodeParams:f};this.dispatchLuigiEvent(m.UPDATE_MODAL_PATH_DATA_REQUEST,Object.assign(S,{history:p,link:u,modal:g}))},updateTopNavigation:()=>{this.dispatchLuigiEvent(m.UPDATE_TOP_NAVIGATION_REQUEST,{})},pathExists:u=>{const g={fromContext:a,fromClosestContext:o,fromVirtualTreeRoot:l,fromParent:c,nodeParams:f};return new Promise(((p,S)=>{this.containerService.dispatch(m.CHECK_PATH_EXISTS_REQUEST,this.thisComponent,{...g,link:u},(T=>{T?p(!0):S(!1)})),this.containerService.dispatch(m.PATH_EXISTS_REQUEST,this.thisComponent,{...g,link:u},(T=>{T?p(!0):S(!1)}))}))},openAsDrawer:(u,g={})=>{h.navigate(u,{drawer:g})},openAsModal:(u,g={})=>{h.navigate(u,{modal:g})},openAsSplitView:(u,g={})=>{h.navigate(u,{splitView:g})},goBack:u=>{this.dispatchLuigiEvent(m.GO_BACK_REQUEST,u)},hasBack:()=>!1,updateModalSettings:(u={},g=!1)=>{this.dispatchLuigiEvent(m.UPDATE_MODAL_SETTINGS_REQUEST,{updatedModalSettings:u,addHistoryEntry:g})}};return h},uxManager:()=>({showAlert:a=>(a.id=this.alertIndex++,new Promise((o=>{this.alertResolvers[a.id]=o,this.dispatchLuigiEvent(m.ALERT_REQUEST,a,(l=>{this.resolveAlert(a.id,l)}))}))),showConfirmationModal:a=>new Promise(((o,l)=>{this.modalResolver={resolve:o,reject:l},this.containerService.dispatch(m.SHOW_CONFIRMATION_MODAL_REQUEST,this.thisComponent,a,(c=>{c?o():l()}))})),getCurrentTheme:()=>this.thisComponent.theme,closeUserSettings:()=>{this.dispatchLuigiEvent(m.CLOSE_USER_SETTINGS_REQUEST,this.thisComponent.userSettings)},openUserSettings:()=>{this.dispatchLuigiEvent(m.OPEN_USER_SETTINGS_REQUEST,this.thisComponent.userSettings)},collapseLeftSideNav:()=>{this.dispatchLuigiEvent(m.COLLAPSE_LEFT_NAV_REQUEST,{})},getDirtyStatus:()=>this.thisComponent.dirtyStatus||!1,getDocumentTitle:()=>this.thisComponent.documentTitle,setDocumentTitle:a=>{this.dispatchLuigiEvent(m.SET_DOCUMENT_TITLE_REQUEST,a)},setDirtyStatus:a=>{this.dispatchLuigiEvent(m.SET_DIRTY_STATUS_REQUEST,{dirty:a})},setCurrentLocale:a=>{a&&this.dispatchLuigiEvent(m.SET_CURRENT_LOCALE_REQUEST,{currentLocale:a})},removeBackdrop:()=>{this.dispatchLuigiEvent(m.REMOVE_BACKDROP_REQUEST,{})},addBackdrop:()=>{this.dispatchLuigiEvent(m.ADD_BACKDROP_REQUEST,{})},showLoadingIndicator:()=>{this.dispatchLuigiEvent(m.SHOW_LOADING_INDICATOR_REQUEST,{})},hideLoadingIndicator:()=>{this.dispatchLuigiEvent(m.HIDE_LOADING_INDICATOR_REQUEST,{})},hideAppLoadingIndicator:()=>{this.dispatchLuigiEvent(m.HIDE_LOADING_INDICATOR_REQUEST,{})},closeCurrentModal:()=>{this.dispatchLuigiEvent(m.CLOSE_CURRENT_MODAL_REQUEST,{})}}),getCurrentLocale:()=>this.thisComponent.locale,getActiveFeatureToggles:()=>this.thisComponent.activeFeatureToggleList||[],publishEvent:a=>{e&&e.eventBus&&e.eventBus.onPublishEvent(a,t,n);const o={id:a.type,_metaData:{nodeId:t,wc_id:n,src:r},data:a.detail};this.dispatchLuigiEvent(m.CUSTOM_MESSAGE,o)},luigiClientInit:()=>{this.dispatchLuigiEvent(m.INITIALIZED,{})},addNodeParams:(a,o)=>{s||this.dispatchLuigiEvent(m.ADD_NODE_PARAMS_REQUEST,{params:a,data:a,keepBrowserHistory:o})},getNodeParams:a=>{return s?{}:a?(o=this.thisComponent.nodeParams,Object.entries(o).reduce(((l,c)=>(l[At(c[0])]=At(c[1]),l)),{})):this.thisComponent.nodeParams||{};var o},setAnchor:a=>{s||this.dispatchLuigiEvent(m.SET_ANCHOR_LINK_REQUEST,a)},getAnchor:()=>this.thisComponent.anchor||"",getCoreSearchParams:()=>this.thisComponent.searchParams||{},getPathParams:()=>this.thisComponent.pathParams||{},getClientPermissions:()=>this.thisComponent.clientPermissions||{},addCoreSearchParams:(a={},o=!0)=>{this.dispatchLuigiEvent(m.ADD_SEARCH_PARAMS_REQUEST,{data:a,keepBrowserHistory:o})},getUserSettings:()=>this.thisComponent.userSettings||{},setViewGroupData:a=>{this.dispatchLuigiEvent(m.SET_VIEW_GROUP_DATA_REQUEST,a)}}}initWC(e,t,n,r,s,a,o){const l=this.createClientAPI(n,a,t,e,o);if(e.__postProcess){const c=new URL(document.baseURI).origin===new URL(r,document.baseURI).origin?new URL("./",new URL(r,document.baseURI)):new URL("./",r);e.__postProcess(s,l,c.origin+c.pathname)}else e.context=s,e.LuigiClient=l}generateWCId(e){let t="";const n=new URL(e,encodeURI(location.href)).href;for(let r=0;r<n.length;r++)t+=n.charCodeAt(r).toString(16);return"luigi-wc-"+t}registerWCFromUrl(e,t){const n=this.processViewUrl(e);return new Promise(((r,s)=>{this.checkWCUrl(n)?this.dynamicImport(n).then((a=>{try{if(!window.customElements.get(t)){let o=a.default;if(!HTMLElement.isPrototypeOf(o)){const l=Object.keys(a);for(let c=0;c<l.length&&(o=a[l[c]],!HTMLElement.isPrototypeOf(o));c++);}window.customElements.define(t,o)}r(1)}catch(o){s(o)}})).catch((a=>{s(a)})):s(`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=(s,a)=>{window.customElements.define(this.generateWCId(s),a)}),window.Luigi||(window.Luigi={},window.Luigi._registerWebcomponent||(window.Luigi._registerWebcomponent=(s,a)=>{this.containerService.getContainerManager()._registerWebcomponent(s,a)}));const r=document.createElement("script");r.setAttribute("src",t),e.webcomponent.type==="module"&&r.setAttribute("type","module"),r.setAttribute("defer","true"),r.addEventListener("load",(()=>{n()})),document.body.appendChild(r)}else console.warn(`View URL '${t}' not allowed to be included`)}checkWCUrl(e){return!0}renderWebComponent(e,t,n,r,s,a){var f,h;const o=this.processViewUrl(e,{context:n}),l=((f=r==null?void 0:r.webcomponent)==null?void 0:f.tagName)||this.generateWCId(o),c=document.createElement("div");t.appendChild(c),t._luigi_node=r,window.customElements.get(l)?this.attachWC(l,c,t,n,o,s,a):window.luigiWCFn?window.luigiWCFn(o,l,c,(()=>{this.attachWC(l,c,t,n,o,s,a)})):(h=r==null?void 0:r.webcomponent)!=null&&h.selfRegistered?this.includeSelfRegisteredWCFromUrl(r,o,(()=>{this.attachWC(l,c,t,n,o,s,a)})):this.registerWCFromUrl(o,l).then((()=>{this.attachWC(l,c,t,n,o,s,a)})).catch((u=>{console.warn("ERROR =>",u),this.containerService.dispatch(m.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,u)}))}createCompoundContainerAsync(e,t,n){return new Promise(((r,s)=>{var a,o;if(e.viewUrl)try{const l=((a=n==null?void 0:n.webcomponent)==null?void 0:a.tagName)||this.generateWCId(e.viewUrl);(o=n==null?void 0:n.webcomponent)!=null&&o.selfRegistered?this.includeSelfRegisteredWCFromUrl(n,e.viewUrl,(()=>{const c=document.createElement(l);c.setAttribute("lui_web_component","true"),this.initWC(c,l,c,e.viewUrl,t,"_root"),r(c)})):this.registerWCFromUrl(e.viewUrl,l).then((()=>{const c=document.createElement(l);c.setAttribute("lui_web_component","true"),this.initWC(c,l,c,e.viewUrl,t,"_root"),r(c)})).catch((c=>{console.warn("Error: ",c),this.containerService.dispatch(m.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,c)}))}catch(l){s(l)}else r(e.createCompoundContainer())}))}renderWebComponentCompound(e,t,n){var s;let r;return e.webcomponent&&e.viewUrl?(r=new Re,r.viewUrl=this.processViewUrl(e.viewUrl,{context:n}),r.createCompoundItemContainer=a=>{const o=document.createElement("div");return a!=null&&a.slot&&o.setAttribute("slot",a.slot),o}):(s=e.compound)!=null&&s.renderer&&(r=Kt(e.compound.renderer)),r=r||new Re,new Promise((a=>{this.createCompoundContainerAsync(r,n,e).then((o=>{var c,f;t._luigi_mfe_webcomponent=o,t._luigi_node=e;const l={};o.eventBus={listeners:l,onPublishEvent:(h,u,g)=>{const p=l[u+"."+h.type]||[];p.push(...l["*."+h.type]||[]),p.forEach((S=>{const T=S.wcElement||o.querySelector("[nodeId="+S.wcElementId+"]");T?T.dispatchEvent(new CustomEvent(S.action,{detail:S.converter?S.converter(h.detail):h.detail})):console.debug("Could not find event target",S)}))}},(f=(c=e.compound)==null?void 0:c.children)==null||f.forEach(((h,u)=>{const g={...n,...h.context},p=r.createCompoundItemContainer(h.layoutConfig);p.eventBus=o.eventBus,r.attachCompoundItem(o,p);const S=h.id||"gen_"+u;this.renderWebComponent(h.viewUrl,p,g,h,S,!0),Rt(l,h,S)})),t.appendChild(o),Rt(l,e.compound,"_root",o),a(o)})).catch((o=>{console.warn("Error: ",o),this.containerService.dispatch(m.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,o)}))}))}resolveAlert(e,t){this.alertResolvers[e]?(this.alertResolvers[e](t===void 0||t),this.alertResolvers[e]=void 0):console.log("Promise is not in the list.")}notifyConfirmationModalClosed(e){this.modalResolver?(e?this.modalResolver.resolve():this.modalResolver.reject(),this.modalResolver=void 0):console.log("Modal promise is not listed.")}}const De=new class{isFunction(i){return i&&{}.toString.call(i)==="[object Function]"}isObject(i){return!(!i||typeof i!="object"||Array.isArray(i))}checkWebcomponentValue(i){return typeof i=="string"?JSON.parse(i):typeof i=="boolean"||typeof i=="object"?i:void console.warn("Webcomponent value has a wrong type.")}resolveContext(i){return i?typeof i=="string"?JSON.parse(i):i:{}}};function Pt(i){let e,t=(!i[4]||i[4]==="false")&&It(i);return{c(){t&&t.c(),e=Ht("")},m(n,r){t&&t.m(n,r),ue(n,e,r)},p(n,r){n[4]&&n[4]!=="false"?t&&(t.d(1),t=null):t?t.p(n,r):(t=It(n),t.c(),t.m(e.parentNode,e))},d(n){n&&oe(e),t&&t.d(n)}}}function It(i){let e,t,n,r,s,a;return{c(){e=be("style"),e.textContent=`main.lui-isolated,
50
+ `,r}createCompoundItemContainer(n){const r=n||{},o=document.createElement("div");return o.setAttribute("style",`grid-row: ${r.row||"auto"}; grid-column: ${r.column||"auto"}`),o.classList.add("lui-compoundItemCnt"),o}}const Tl=s=>{const n=s.use;return n?n==="grid"?new Jm(s):n.createCompoundContainer||n.createCompoundItemContainer||n.attachCompoundItem?new Xm(s):new Qn(s):new Qn(s)},el=(s,n,r,o)=>{n!=null&&n.eventListeners&&n.eventListeners.forEach((u=>{const c=u.source+"."+u.name,h=s[c],d={wcElementId:r,wcElement:o,action:u.action,converter:u.dataConverter};h?h.push(d):s[c]=[d]}))};function tl(s){return String(s).replaceAll("&lt;","<").replaceAll("&gt;",">").replaceAll("&quot;",'"').replaceAll("&#39;","'").replaceAll("&sol;","/")}class yl{constructor(){this.alertResolvers={},this.alertIndex=0,this.containerService=new lo}dynamicImport(n){return Object.freeze(import(n))}processViewUrl(n,r){return n}attachWC(n,r,o,u,c,h,d){if(o&&o.contains(r)){const _=document.createElement(n);h&&_.setAttribute("nodeId",h),_.setAttribute("lui_web_component","true"),this.initWC(_,n,o,c,u,h,d),o.replaceChild(_,r),o._luigi_node&&(o._luigi_mfe_webcomponent=_),o.dispatchEvent(new Event("wc_ready"))}}dispatchLuigiEvent(n,r,o){this.containerService.dispatch(n,this.thisComponent,r,o)}createClientAPI(n,r,o,u,c){return{linkManager:()=>{let h=null,d=!1,_=!1,v=!1,x={};const C={navigate:(y,I={})=>{const L={fromContext:h,fromClosestContext:d,fromVirtualTreeRoot:_,fromParent:v,nodeParams:x,...I};this.dispatchLuigiEvent(O.NAVIGATION_REQUEST,{link:y,...L})},navigateToIntent:(y,I={})=>{var D;let L="#?intent=";if(L+=y,I&&((D=Object.keys(I))==null?void 0:D.length)){const F=Object.entries(I);if(F.length>0){L+="?";for(const[te,ge]of F)L+=te+"="+ge+"&";L=L.slice(0,-1)}}C.navigate(L)},fromClosestContext:()=>(d=!0,C),fromContext:y=>(h=y,C),fromVirtualTreeRoot:()=>(_=!0,C),fromParent:()=>(v=!0,C),getCurrentRoute:()=>{const y={fromContext:h,fromClosestContext:d,fromVirtualTreeRoot:_,fromParent:v,nodeParams:x};return new Promise(((I,L)=>{this.containerService.dispatch(O.GET_CURRENT_ROUTE_REQUEST,this.thisComponent,{...y},(D=>{D?I(D):L("No current route received.")}))}))},withParams:y=>(x=y,C),updateModalPathInternalNavigation:(y,I={},L=!1)=>{if(!y)return void console.warn("Updating path of the modal upon internal navigation prevented. No path specified.");const D={fromClosestContext:d,fromContext:h,fromParent:v,fromVirtualTreeRoot:_,nodeParams:x};this.dispatchLuigiEvent(O.UPDATE_MODAL_PATH_DATA_REQUEST,Object.assign(D,{history:L,link:y,modal:I}))},updateTopNavigation:()=>{this.dispatchLuigiEvent(O.UPDATE_TOP_NAVIGATION_REQUEST,{})},pathExists:y=>{const I={fromContext:h,fromClosestContext:d,fromVirtualTreeRoot:_,fromParent:v,nodeParams:x};return new Promise(((L,D)=>{this.containerService.dispatch(O.CHECK_PATH_EXISTS_REQUEST,this.thisComponent,{...I,link:y},(F=>{F?L(!0):D(!1)})),this.containerService.dispatch(O.PATH_EXISTS_REQUEST,this.thisComponent,{...I,link:y},(F=>{F?L(!0):D(!1)}))}))},openAsDrawer:(y,I={})=>{C.navigate(y,{drawer:I})},openAsModal:(y,I={})=>{C.navigate(y,{modal:I})},openAsSplitView:(y,I={})=>{C.navigate(y,{splitView:I})},goBack:y=>{this.dispatchLuigiEvent(O.GO_BACK_REQUEST,y)},hasBack:()=>!1,updateModalSettings:(y={},I=!1)=>{this.dispatchLuigiEvent(O.UPDATE_MODAL_SETTINGS_REQUEST,{updatedModalSettings:y,addHistoryEntry:I})}};return C},uxManager:()=>({showAlert:h=>(h.id=this.alertIndex++,new Promise((d=>{this.alertResolvers[h.id]=d,this.dispatchLuigiEvent(O.ALERT_REQUEST,h,(_=>{this.resolveAlert(h.id,_)}))}))),showConfirmationModal:h=>new Promise(((d,_)=>{this.modalResolver={resolve:d,reject:_},this.containerService.dispatch(O.SHOW_CONFIRMATION_MODAL_REQUEST,this.thisComponent,h,(v=>{v?d():_()}))})),getCurrentTheme:()=>this.thisComponent.theme,closeUserSettings:()=>{this.dispatchLuigiEvent(O.CLOSE_USER_SETTINGS_REQUEST,this.thisComponent.userSettings)},openUserSettings:()=>{this.dispatchLuigiEvent(O.OPEN_USER_SETTINGS_REQUEST,this.thisComponent.userSettings)},collapseLeftSideNav:()=>{this.dispatchLuigiEvent(O.COLLAPSE_LEFT_NAV_REQUEST,{})},getDirtyStatus:()=>this.thisComponent.dirtyStatus||!1,getDocumentTitle:()=>this.thisComponent.documentTitle,setDocumentTitle:h=>{this.dispatchLuigiEvent(O.SET_DOCUMENT_TITLE_REQUEST,h)},setDirtyStatus:h=>{this.dispatchLuigiEvent(O.SET_DIRTY_STATUS_REQUEST,{dirty:h})},setCurrentLocale:h=>{h&&this.dispatchLuigiEvent(O.SET_CURRENT_LOCALE_REQUEST,{currentLocale:h})},removeBackdrop:()=>{this.dispatchLuigiEvent(O.REMOVE_BACKDROP_REQUEST,{})},addBackdrop:()=>{this.dispatchLuigiEvent(O.ADD_BACKDROP_REQUEST,{})},showLoadingIndicator:()=>{this.dispatchLuigiEvent(O.SHOW_LOADING_INDICATOR_REQUEST,{})},hideLoadingIndicator:()=>{this.dispatchLuigiEvent(O.HIDE_LOADING_INDICATOR_REQUEST,{})},hideAppLoadingIndicator:()=>{this.dispatchLuigiEvent(O.HIDE_LOADING_INDICATOR_REQUEST,{})},closeCurrentModal:()=>{this.dispatchLuigiEvent(O.CLOSE_CURRENT_MODAL_REQUEST,{})}}),getCurrentLocale:()=>this.thisComponent.locale,getActiveFeatureToggles:()=>this.thisComponent.activeFeatureToggleList||[],publishEvent:h=>{n&&n.eventBus&&n.eventBus.onPublishEvent(h,r,o);const d={id:h.type,_metaData:{nodeId:r,wc_id:o,src:u},data:h.detail};this.dispatchLuigiEvent(O.CUSTOM_MESSAGE,d)},luigiClientInit:()=>{this.dispatchLuigiEvent(O.INITIALIZED,{})},addNodeParams:(h,d)=>{c||this.dispatchLuigiEvent(O.ADD_NODE_PARAMS_REQUEST,{params:h,data:h,keepBrowserHistory:d})},getNodeParams:h=>{return c?{}:h?(d=this.thisComponent.nodeParams,Object.entries(d).reduce(((_,v)=>(_[tl(v[0])]=tl(v[1]),_)),{})):this.thisComponent.nodeParams||{};var d},setAnchor:h=>{c||this.dispatchLuigiEvent(O.SET_ANCHOR_LINK_REQUEST,h)},getAnchor:()=>this.thisComponent.anchor||"",getCoreSearchParams:()=>this.thisComponent.searchParams||{},getPathParams:()=>this.thisComponent.pathParams||{},getClientPermissions:()=>this.thisComponent.clientPermissions||{},addCoreSearchParams:(h={},d=!0)=>{this.dispatchLuigiEvent(O.ADD_SEARCH_PARAMS_REQUEST,{data:h,keepBrowserHistory:d})},getUserSettings:()=>this.thisComponent.userSettings||{},setViewGroupData:h=>{this.dispatchLuigiEvent(O.SET_VIEW_GROUP_DATA_REQUEST,h)}}}initWC(n,r,o,u,c,h,d){const _=this.createClientAPI(o,h,r,n,d);if(n.__postProcess){const v=new URL(document.baseURI).origin===new URL(u,document.baseURI).origin?new URL("./",new URL(u,document.baseURI)):new URL("./",u);n.__postProcess(c,_,v.origin+v.pathname)}else n.context=c,n.LuigiClient=_}generateWCId(n){let r="";const o=new URL(n,encodeURI(location.href)).href;for(let u=0;u<o.length;u++)r+=o.charCodeAt(u).toString(16);return"luigi-wc-"+r}registerWCFromUrl(n,r){const o=this.processViewUrl(n);return new Promise(((u,c)=>{this.checkWCUrl(o)?this.dynamicImport(o).then((h=>{try{if(!window.customElements.get(r)){let d=h.default;if(!HTMLElement.isPrototypeOf(d)){const _=Object.keys(h);for(let v=0;v<_.length&&(d=h[_[v]],!HTMLElement.isPrototypeOf(d));v++);}window.customElements.define(r,d)}u(1)}catch(d){c(d)}})).catch((h=>{c(h)})):c(`Error: View URL '${o}' not allowed to be included`)}))}includeSelfRegisteredWCFromUrl(n,r,o){if(this.checkWCUrl(r)){this.containerService.getContainerManager()._registerWebcomponent||(this.containerService.getContainerManager()._registerWebcomponent=(c,h)=>{window.customElements.define(this.generateWCId(c),h)}),window.Luigi||(window.Luigi={},window.Luigi._registerWebcomponent||(window.Luigi._registerWebcomponent=(c,h)=>{this.containerService.getContainerManager()._registerWebcomponent(c,h)}));const u=document.createElement("script");u.setAttribute("src",r),n.webcomponent.type==="module"&&u.setAttribute("type","module"),u.setAttribute("defer","true"),u.addEventListener("load",(()=>{o()})),document.body.appendChild(u)}else console.warn(`View URL '${r}' not allowed to be included`)}checkWCUrl(n){return!0}renderWebComponent(n,r,o,u,c,h){var x,C;const d=this.processViewUrl(n,{context:o}),_=((x=u==null?void 0:u.webcomponent)==null?void 0:x.tagName)||this.generateWCId(d),v=document.createElement("div");r.appendChild(v),r._luigi_node=u,window.customElements.get(_)?this.attachWC(_,v,r,o,d,c,h):window.luigiWCFn?window.luigiWCFn(d,_,v,(()=>{this.attachWC(_,v,r,o,d,c,h)})):(C=u==null?void 0:u.webcomponent)!=null&&C.selfRegistered?this.includeSelfRegisteredWCFromUrl(u,d,(()=>{this.attachWC(_,v,r,o,d,c,h)})):this.registerWCFromUrl(d,_).then((()=>{this.attachWC(_,v,r,o,d,c,h)})).catch((y=>{console.warn("ERROR =>",y),this.containerService.dispatch(O.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,y)}))}createCompoundContainerAsync(n,r,o){return new Promise(((u,c)=>{var h,d;if(n.viewUrl)try{const _=((h=o==null?void 0:o.webcomponent)==null?void 0:h.tagName)||this.generateWCId(n.viewUrl);(d=o==null?void 0:o.webcomponent)!=null&&d.selfRegistered?this.includeSelfRegisteredWCFromUrl(o,n.viewUrl,(()=>{const v=document.createElement(_);v.setAttribute("lui_web_component","true"),this.initWC(v,_,v,n.viewUrl,r,"_root"),u(v)})):this.registerWCFromUrl(n.viewUrl,_).then((()=>{const v=document.createElement(_);v.setAttribute("lui_web_component","true"),this.initWC(v,_,v,n.viewUrl,r,"_root"),u(v)})).catch((v=>{console.warn("Error: ",v),this.containerService.dispatch(O.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,v)}))}catch(_){c(_)}else u(n.createCompoundContainer())}))}renderWebComponentCompound(n,r,o){var c;let u;return n.webcomponent&&n.viewUrl?(u=new Qn,u.viewUrl=this.processViewUrl(n.viewUrl,{context:o}),u.createCompoundItemContainer=h=>{const d=document.createElement("div");return h!=null&&h.slot&&d.setAttribute("slot",h.slot),d}):(c=n.compound)!=null&&c.renderer&&(u=Tl(n.compound.renderer)),u=u||new Qn,new Promise((h=>{this.createCompoundContainerAsync(u,o,n).then((d=>{var v,x;r._luigi_mfe_webcomponent=d,r._luigi_node=n;const _={};d.eventBus={listeners:_,onPublishEvent:(C,y,I)=>{const L=_[y+"."+C.type]||[];L.push(..._["*."+C.type]||[]),L.forEach((D=>{const F=D.wcElement||d.querySelector("[nodeId="+D.wcElementId+"]");F?F.dispatchEvent(new CustomEvent(D.action,{detail:D.converter?D.converter(C.detail):C.detail})):console.debug("Could not find event target",D)}))}},(x=(v=n.compound)==null?void 0:v.children)==null||x.forEach(((C,y)=>{const I={...o,...C.context},L=u.createCompoundItemContainer(C.layoutConfig);L.eventBus=d.eventBus,u.attachCompoundItem(d,L);const D=C.id||"gen_"+y;this.renderWebComponent(C.viewUrl,L,I,C,D,!0),el(_,C,D)})),r.appendChild(d),el(_,n.compound,"_root",d),h(d)})).catch((d=>{console.warn("Error: ",d),this.containerService.dispatch(O.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,d)}))}))}resolveAlert(n,r){this.alertResolvers[n]?(this.alertResolvers[n](r===void 0||r),this.alertResolvers[n]=void 0):console.log("Promise is not in the list.")}notifyConfirmationModalClosed(n){this.modalResolver?(n?this.modalResolver.resolve():this.modalResolver.reject(),this.modalResolver=void 0):console.log("Modal promise is not listed.")}}const vr=new class{isFunction(s){return s&&{}.toString.call(s)==="[object Function]"}isObject(s){return!(!s||typeof s!="object"||Array.isArray(s))}checkWebcomponentValue(s){return typeof s=="string"?JSON.parse(s):typeof s=="boolean"||typeof s=="object"?s:void console.warn("Webcomponent value has a wrong type.")}resolveContext(s){return s?typeof s=="string"?JSON.parse(s):s:{}}};function nl(s){let n,r=(!s[4]||s[4]==="false")&&rl(s);return{c(){r&&r.c(),n=_l("")},m(o,u){r&&r.m(o,u),pn(o,n,u)},p(o,u){o[4]&&o[4]!=="false"?r&&(r.d(1),r=null):r?r.p(o,u):(r=rl(o),r.c(),r.m(n.parentNode,n))},d(o){o&&nn(n),r&&r.d(o)}}}function rl(s){let n,r,o,u,c,h;return{c(){n=Vn("style"),n.textContent=`main.lui-isolated,
25
51
  .lui-isolated iframe {
26
52
  width: 100%;
27
53
  height: 100%;
@@ -30,5 +56,5 @@ Invalid Children:`,t);return}return t.some(a=>{if(a.pathSegment===e||a.pathSegme
30
56
 
31
57
  main.lui-isolated {
32
58
  line-height: 0;
33
- }`,t=Ht(" "),n=be("iframe"),wt(n.src,r=i[3])||W(n,"src",r),W(n,"title",i[1]),W(n,"allow",s=bt(i[0])),W(n,"sandbox",a=i[2]?i[2].join(" "):void 0)},m(o,l){ue(o,e,l),ue(o,t,l),ue(o,n,l),i[28](n)},p(o,l){8&l[0]&&!wt(n.src,r=o[3])&&W(n,"src",r),2&l[0]&&W(n,"title",o[1]),1&l[0]&&s!==(s=bt(o[0]))&&W(n,"allow",s),4&l[0]&&a!==(a=o[2]?o[2].join(" "):void 0)&&W(n,"sandbox",a)},d(o){o&&(oe(e),oe(t),oe(n)),i[28](null)}}}function xi(i){let e,t,n=i[5]&&Pt(i);return{c(){e=be("main"),n&&n.c(),W(e,"class",t=i[4]?void 0:"lui-isolated")},m(r,s){ue(r,e,s),n&&n.m(e,null),i[29](e)},p(r,s){r[5]?n?n.p(r,s):(n=Pt(r),n.c(),n.m(e,null)):n&&(n.d(1),n=null),16&s[0]&&t!==(t=r[4]?void 0:"lui-isolated")&&W(e,"class",t)},i:ae,o:ae,d(r){r&&oe(e),n&&n.d(),i[29](null)}}}function ki(i,e,t){let{activeFeatureToggleList:n}=e,{allowRules:r}=e,{anchor:s}=e,{authData:a}=e,{clientPermissions:o}=e,{context:l}=e,{deferInit:c}=e,{dirtyStatus:f}=e,{documentTitle:h}=e,{hasBack:u}=e,{label:g}=e,{locale:p}=e,{noShadow:S}=e,{nodeParams:T}=e,{pathParams:R}=e,{sandboxRules:$}=e,{searchParams:N}=e,{skipCookieCheck:z}=e,{skipInitCheck:G}=e,{theme:K}=e,{userSettings:J}=e,{viewurl:B}=e,{webcomponent:x}=e;const P={};let I,_,te=!1;const Q=new Jt,U=d=>{if(!te){d.sendCustomMessage=(y,O)=>{_e.sendCustomMessage(y,d.getNoShadow()?d:I,!!x,P,O)},d.updateContext=(y,O)=>{if(t(8,l=y),x)(d.getNoShadow()?d:I)._luigi_mfe_webcomponent.context=y;else{const ge={...O||{},activeFeatureToggleList:d.activeFeatureToggleList||[],currentLocale:d.locale,currentTheme:d.theme,userSettings:d.userSettings||null,cssVariables:d.cssVariables||{},anchor:d.anchor||"",drawer:d.drawer||!1,modal:d.modal||!1,viewStackSize:d.viewStackSize||0,isNavigateBack:d.isNavigateBack||!1};_e.updateContext(y,ge,P,T,R,N)}},d.closeAlert=(y,O)=>{d.notifyAlertClosed(y,O)},d.notifyAlertClosed=(y,O)=>{d.isConnected&&(x?Q.resolveAlert(y,O):_e.notifyAlertClosed(y,O,P))},d.notifyConfirmationModalClosed=y=>{d.isConnected&&(x?Q.notifyConfirmationModalClosed(!!y):_e.notifyConfirmationModalClosed(!!y,P))},se.registerContainer(d),Q.thisComponent=d;const le=De.resolveContext(l);if(d.updateViewUrl=(y,O)=>{y!=null&&y.length&&_e.updateViewUrl(y,De.resolveContext(l),O,P)},x&&x!="false"){d.getNoShadow()?d.innerHTML="":(t(7,I.innerHTML="",I),d.attachShadow({mode:"open"}).append(I));const y=De.checkWebcomponentValue(x);Q.renderWebComponent(B,d.getNoShadow()?d:I,le,typeof y=="object"?{webcomponent:y}:{})}else d.getNoShadow()||(d.innerHTML="",d.attachShadow({mode:"open"}).append(I));G?(d.initialized=!0,setTimeout((()=>{Q.dispatchLuigiEvent(m.INITIALIZED,{})}))):x&&(d.getNoShadow()?d:I).addEventListener("wc_ready",(()=>{var y;(y=(d.getNoShadow()?d:I)._luigi_mfe_webcomponent)!=null&&y.deferLuigiClientWCInit||(d.initialized=!0,Q.dispatchLuigiEvent(m.INITIALIZED,{}))})),t(5,te=!0),d.containerInitialized=!0}};var re;return Gt((async()=>{t(27,_=I.parentNode),t(27,_.iframeHandle=P,_),t(27,_.init=()=>{U(_)},_),!c&&B&&U(_)})),re=async()=>{},Wt().$$.on_destroy.push(re),i.$$set=d=>{"activeFeatureToggleList"in d&&t(9,n=d.activeFeatureToggleList),"allowRules"in d&&t(0,r=d.allowRules),"anchor"in d&&t(10,s=d.anchor),"authData"in d&&t(11,a=d.authData),"clientPermissions"in d&&t(12,o=d.clientPermissions),"context"in d&&t(8,l=d.context),"deferInit"in d&&t(13,c=d.deferInit),"dirtyStatus"in d&&t(14,f=d.dirtyStatus),"documentTitle"in d&&t(15,h=d.documentTitle),"hasBack"in d&&t(16,u=d.hasBack),"label"in d&&t(1,g=d.label),"locale"in d&&t(17,p=d.locale),"noShadow"in d&&t(18,S=d.noShadow),"nodeParams"in d&&t(19,T=d.nodeParams),"pathParams"in d&&t(20,R=d.pathParams),"sandboxRules"in d&&t(2,$=d.sandboxRules),"searchParams"in d&&t(21,N=d.searchParams),"skipCookieCheck"in d&&t(22,z=d.skipCookieCheck),"skipInitCheck"in d&&t(23,G=d.skipInitCheck),"theme"in d&&t(24,K=d.theme),"userSettings"in d&&t(25,J=d.userSettings),"viewurl"in d&&t(3,B=d.viewurl),"webcomponent"in d&&t(4,x=d.webcomponent)},i.$$.update=()=>{134225960&i.$$.dirty[0]&&!te&&B&&!c&&_&&U(_)},[r,g,$,B,x,te,P,I,l,n,s,a,o,c,f,h,u,p,S,T,R,N,z,G,K,J,()=>n&&r&&s&&a&&o&&f&&h&&u&&p&&S&&T&&R&&$&&N&&z&&G&&K&&J,_,function(d){Me[d?"unshift":"push"]((()=>{P.iframe=d,t(6,P)}))},function(d){Me[d?"unshift":"push"]((()=>{I=d,t(7,I)}))}]}class Xt extends zt{constructor(e){super(),Bt(this,e,ki,xi,Qt,{activeFeatureToggleList:9,allowRules:0,anchor:10,authData:11,clientPermissions:12,context:8,deferInit:13,dirtyStatus:14,documentTitle:15,hasBack:16,label:1,locale:17,noShadow:18,nodeParams:19,pathParams:20,sandboxRules:2,searchParams:21,skipCookieCheck:22,skipInitCheck:23,theme:24,userSettings:25,viewurl:3,webcomponent:4,unwarn:26},null,[-1,-1])}get activeFeatureToggleList(){return this.$$.ctx[9]}set activeFeatureToggleList(e){this.$$set({activeFeatureToggleList:e}),E()}get allowRules(){return this.$$.ctx[0]}set allowRules(e){this.$$set({allowRules:e}),E()}get anchor(){return this.$$.ctx[10]}set anchor(e){this.$$set({anchor:e}),E()}get authData(){return this.$$.ctx[11]}set authData(e){this.$$set({authData:e}),E()}get clientPermissions(){return this.$$.ctx[12]}set clientPermissions(e){this.$$set({clientPermissions:e}),E()}get context(){return this.$$.ctx[8]}set context(e){this.$$set({context:e}),E()}get deferInit(){return this.$$.ctx[13]}set deferInit(e){this.$$set({deferInit:e}),E()}get dirtyStatus(){return this.$$.ctx[14]}set dirtyStatus(e){this.$$set({dirtyStatus:e}),E()}get documentTitle(){return this.$$.ctx[15]}set documentTitle(e){this.$$set({documentTitle:e}),E()}get hasBack(){return this.$$.ctx[16]}set hasBack(e){this.$$set({hasBack:e}),E()}get label(){return this.$$.ctx[1]}set label(e){this.$$set({label:e}),E()}get locale(){return this.$$.ctx[17]}set locale(e){this.$$set({locale:e}),E()}get noShadow(){return this.$$.ctx[18]}set noShadow(e){this.$$set({noShadow:e}),E()}get nodeParams(){return this.$$.ctx[19]}set nodeParams(e){this.$$set({nodeParams:e}),E()}get pathParams(){return this.$$.ctx[20]}set pathParams(e){this.$$set({pathParams:e}),E()}get sandboxRules(){return this.$$.ctx[2]}set sandboxRules(e){this.$$set({sandboxRules:e}),E()}get searchParams(){return this.$$.ctx[21]}set searchParams(e){this.$$set({searchParams:e}),E()}get skipCookieCheck(){return this.$$.ctx[22]}set skipCookieCheck(e){this.$$set({skipCookieCheck:e}),E()}get skipInitCheck(){return this.$$.ctx[23]}set skipInitCheck(e){this.$$set({skipInitCheck:e}),E()}get theme(){return this.$$.ctx[24]}set theme(e){this.$$set({theme:e}),E()}get userSettings(){return this.$$.ctx[25]}set userSettings(e){this.$$set({userSettings:e}),E()}get viewurl(){return this.$$.ctx[3]}set viewurl(e){this.$$set({viewurl:e}),E()}get webcomponent(){return this.$$.ctx[4]}set webcomponent(e){this.$$set({webcomponent:e}),E()}get unwarn(){return this.$$.ctx[26]}}function Mi(i){Ai(i,"svelte-1buc46y","main.svelte-1buc46y{width:100%;height:100%;border:none}")}function Vi(i){let e;return{c(){e=be("main"),W(e,"class","svelte-1buc46y")},m(t,n){ue(t,e,n),i[21](e)},p:ae,i:ae,o:ae,d(t){t&&oe(e),i[21](null)}}}function Fi(i,e,t){let n,r,{activeFeatureToggleList:s}=e,{anchor:a}=e,{clientPermissions:o}=e,{compoundConfig:l}=e,{context:c}=e,{deferInit:f}=e,{dirtyStatus:h}=e,{documentTitle:u}=e,{hasBack:g}=e,{locale:p}=e,{noShadow:S}=e,{nodeParams:T}=e,{pathParams:R}=e,{searchParams:$}=e,{skipInitCheck:N}=e,{theme:z}=e,{userSettings:G}=e,{viewurl:K}=e,{webcomponent:J}=e,B=!1;const x=new ct,P=new Jt,I=_=>{if(!l||B)return;_.updateContext=(U,re)=>{const d=_.getNoShadow()?_:n;d._luigi_mfe_webcomponent.context=U,t(1,c=U);const le=d._luigi_mfe_webcomponent;if(le){const y=le.querySelectorAll("[lui_web_component]");y==null||y.forEach((O=>{const ge=O.context||{};O.context=Object.assign(ge,U)}))}};const te=De.resolveContext(c);t(2,f=!1),_.notifyAlertClosed=(U,re)=>{_.isConnected&&P.resolveAlert(U,re)},_.notifyConfirmationModalClosed=U=>{_.isConnected&&P.notifyConfirmationModalClosed(!!U)};const Q={compound:l,viewUrl:K,webcomponent:De.checkWebcomponentValue(J)||!0};_.getNoShadow()?_.innerHTML="":(t(0,n.innerHTML="",n),_.attachShadow({mode:"open"}).append(n)),P.renderWebComponentCompound(Q,_.getNoShadow()?_:n,te).then((U=>{r=U,N||!Q.viewUrl?(_.initialized=!0,setTimeout((()=>{P.dispatchLuigiEvent(m.INITIALIZED,{})}))):r.LuigiClient&&!r.deferLuigiClientWCInit&&(_.initialized=!0,P.dispatchLuigiEvent(m.INITIALIZED,{}))})),B=!0,_.containerInitialized=!0};return Gt((async()=>{const _=n.getRootNode()===document?n.parentNode:n.getRootNode().host;_.init=()=>{I(_)},f||I(_),x.registerContainer(_),P.thisComponent=_})),i.$$set=_=>{"activeFeatureToggleList"in _&&t(3,s=_.activeFeatureToggleList),"anchor"in _&&t(4,a=_.anchor),"clientPermissions"in _&&t(5,o=_.clientPermissions),"compoundConfig"in _&&t(6,l=_.compoundConfig),"context"in _&&t(1,c=_.context),"deferInit"in _&&t(2,f=_.deferInit),"dirtyStatus"in _&&t(7,h=_.dirtyStatus),"documentTitle"in _&&t(8,u=_.documentTitle),"hasBack"in _&&t(9,g=_.hasBack),"locale"in _&&t(10,p=_.locale),"noShadow"in _&&t(11,S=_.noShadow),"nodeParams"in _&&t(12,T=_.nodeParams),"pathParams"in _&&t(13,R=_.pathParams),"searchParams"in _&&t(14,$=_.searchParams),"skipInitCheck"in _&&t(15,N=_.skipInitCheck),"theme"in _&&t(16,z=_.theme),"userSettings"in _&&t(17,G=_.userSettings),"viewurl"in _&&t(18,K=_.viewurl),"webcomponent"in _&&t(19,J=_.webcomponent)},[n,c,f,s,a,o,l,h,u,g,p,S,T,R,$,N,z,G,K,J,()=>s&&a&&o&&h&&u&&g&&p&&S&&T&&R&&$&&N&&z&&G,function(_){Me[_?"unshift":"push"]((()=>{n=_,t(0,n)}))}]}qt(Xt,{activeFeatureToggleList:{type:"Array",reflect:!1,attribute:"active-feature-toggle-list"},allowRules:{type:"Array",reflect:!1,attribute:"allow-rules"},anchor:{type:"String",reflect:!1,attribute:"anchor"},authData:{type:"Object",reflect:!1,attribute:"auth-data"},clientPermissions:{type:"Object",reflect:!1,attribute:"client-permissions"},context:{type:"String",reflect:!1,attribute:"context"},deferInit:{type:"Boolean",attribute:"defer-init"},dirtyStatus:{type:"Boolean",reflect:!1,attribute:"dirty-status"},documentTitle:{type:"String",reflect:!1,attribute:"document-title"},hasBack:{type:"Boolean",reflect:!1,attribute:"has-back"},label:{type:"String",reflect:!1,attribute:"label"},locale:{type:"String",reflect:!1,attribute:"locale"},noShadow:{type:"Boolean",attribute:"no-shadow"},nodeParams:{type:"Object",reflect:!1,attribute:"node-params"},pathParams:{type:"Object",reflect:!1,attribute:"path-params"},sandboxRules:{type:"Array",reflect:!1,attribute:"sandbox-rules"},searchParams:{type:"Object",reflect:!1,attribute:"search-params"},skipCookieCheck:{type:"String",reflect:!1,attribute:"skip-cookie-check"},skipInitCheck:{type:"Boolean",reflect:!1,attribute:"skip-init-check"},theme:{type:"String",reflect:!1,attribute:"theme"},userSettings:{type:"Object",reflect:!1,attribute:"user-settings"},viewurl:{type:"String",reflect:!1,attribute:"viewurl"},webcomponent:{type:"String",reflect:!1,attribute:"webcomponent"}},[],["unwarn"],!1,(i=>{let e=t=>()=>console.warn(t+" can't be called on luigi-container before its micro frontend is attached to the DOM.");return class extends i{constructor(){super(...arguments);A(this,"sendCustomMessage",e("sendCustomMessage"));A(this,"updateContext",e("updateContext"));A(this,"updateViewUrl",e("updateViewUrl"));A(this,"closeAlert",e("closeAlert"));A(this,"notifyAlertClosed",e("notifyAlertClosed"));A(this,"notifyConfirmationModalClosed",e("notifyConfirmationModalClosed"))}attributeChangedCallback(n,r,s){try{super.attributeChangedCallback(n,r,s)}catch(a){console.error("Error in super.attributeChangedCallback",a)}this.containerInitialized&&(n==="context"&&this.updateContext(JSON.parse(s)),n==="auth-data"&&_e.updateAuthData(this.iframeHandle,JSON.parse(s)))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}}));class $t extends zt{constructor(e){super(),Bt(this,e,Fi,Vi,Qt,{activeFeatureToggleList:3,anchor:4,clientPermissions:5,compoundConfig:6,context:1,deferInit:2,dirtyStatus:7,documentTitle:8,hasBack:9,locale:10,noShadow:11,nodeParams:12,pathParams:13,searchParams:14,skipInitCheck:15,theme:16,userSettings:17,viewurl:18,webcomponent:19,unwarn:20},Mi)}get activeFeatureToggleList(){return this.$$.ctx[3]}set activeFeatureToggleList(e){this.$$set({activeFeatureToggleList:e}),E()}get anchor(){return this.$$.ctx[4]}set anchor(e){this.$$set({anchor:e}),E()}get clientPermissions(){return this.$$.ctx[5]}set clientPermissions(e){this.$$set({clientPermissions:e}),E()}get compoundConfig(){return this.$$.ctx[6]}set compoundConfig(e){this.$$set({compoundConfig:e}),E()}get context(){return this.$$.ctx[1]}set context(e){this.$$set({context:e}),E()}get deferInit(){return this.$$.ctx[2]}set deferInit(e){this.$$set({deferInit:e}),E()}get dirtyStatus(){return this.$$.ctx[7]}set dirtyStatus(e){this.$$set({dirtyStatus:e}),E()}get documentTitle(){return this.$$.ctx[8]}set documentTitle(e){this.$$set({documentTitle:e}),E()}get hasBack(){return this.$$.ctx[9]}set hasBack(e){this.$$set({hasBack:e}),E()}get locale(){return this.$$.ctx[10]}set locale(e){this.$$set({locale:e}),E()}get noShadow(){return this.$$.ctx[11]}set noShadow(e){this.$$set({noShadow:e}),E()}get nodeParams(){return this.$$.ctx[12]}set nodeParams(e){this.$$set({nodeParams:e}),E()}get pathParams(){return this.$$.ctx[13]}set pathParams(e){this.$$set({pathParams:e}),E()}get searchParams(){return this.$$.ctx[14]}set searchParams(e){this.$$set({searchParams:e}),E()}get skipInitCheck(){return this.$$.ctx[15]}set skipInitCheck(e){this.$$set({skipInitCheck:e}),E()}get theme(){return this.$$.ctx[16]}set theme(e){this.$$set({theme:e}),E()}get userSettings(){return this.$$.ctx[17]}set userSettings(e){this.$$set({userSettings:e}),E()}get viewurl(){return this.$$.ctx[18]}set viewurl(e){this.$$set({viewurl:e}),E()}get webcomponent(){return this.$$.ctx[19]}set webcomponent(e){this.$$set({webcomponent:e}),E()}get unwarn(){return this.$$.ctx[20]}}qt($t,{activeFeatureToggleList:{type:"Array",reflect:!1,attribute:"active-feature-toggle-list"},anchor:{type:"String",reflect:!1,attribute:"anchor"},clientPermissions:{type:"Object",reflect:!1,attribute:"client-permissions"},compoundConfig:{type:"Object",reflect:!1,attribute:"compound-config"},context:{type:"String",reflect:!1,attribute:"context"},deferInit:{type:"Boolean",attribute:"defer-init"},dirtyStatus:{type:"Boolean",reflect:!1,attribute:"dirty-status"},documentTitle:{type:"String",reflect:!1,attribute:"document-title"},hasBack:{type:"Boolean",reflect:!1,attribute:"has-back"},locale:{type:"String",reflect:!1,attribute:"locale"},noShadow:{type:"Boolean",attribute:"no-shadow",reflect:!1},nodeParams:{type:"Object",reflect:!1,attribute:"node-params"},pathParams:{type:"Object",reflect:!1,attribute:"path-params"},searchParams:{type:"Object",reflect:!1,attribute:"search-params"},skipInitCheck:{type:"Boolean",reflect:!1,attribute:"skip-init-check"},theme:{type:"String",reflect:!1,attribute:"theme"},userSettings:{type:"Object",reflect:!1,attribute:"user-settings"},viewurl:{type:"String",reflect:!1,attribute:"viewurl"},webcomponent:{type:"String",reflect:!1,attribute:"webcomponent"}},[],["unwarn"],!1,(i=>{let e=t=>()=>console.warn(t+" can't be called on luigi-container before its micro frontend is attached to the DOM.");return class extends i{constructor(){super(...arguments);A(this,"updateContext",e("updateContext"));A(this,"notifyAlertClosed",e("notifyAlertClosed"));A(this,"notifyConfirmationModalClosed",e("notifyConfirmationModalClosed"))}attributeChangedCallback(n,r,s){try{super.attributeChangedCallback(n,r,s)}catch(a){console.warn("Error in attributeChangedCallback",a)}this.containerInitialized&&n==="context"&&this.updateContext(JSON.parse(s))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}})),customElements.get("luigi-container")||customElements.define("luigi-container",Xt.element),customElements.get("luigi-compound-container")||customElements.define("luigi-compound-container",$t.element);class Qi{constructor(){this.services=new Map}register(e,t,n=!0){this.services.set(e,{factory:t,singleton:n})}get(e){const t=this.services.get(e);if(!t)throw new Error(`Service '${e}' is not registered.`);return t.singleton?(t.instance||(t.instance=t.factory()),t.instance):t.factory()}}const b=new Qi;class Ae{constructor(){this.decorators=[]}hasDecorators(){return this.decorators.length>0}add(e){this.decorators=this.decorators.filter(t=>t.uid!==e.uid).concat(e)}applyDecorators(e,t){if(!e)return e;const n=new URL(v.prependOrigin(e)),r=this.decorators.filter(s=>s.type==="queryString");for(let s=0;s<r.length;s++){const a=r[s];n.searchParams.has(a.key)&&n.searchParams.delete(a.key);const o=a.valueFn();n.searchParams.append(a.key,o)}return t&&(n.search=decodeURIComponent(n.search)),n.href}}const rt=async(i,e)=>{const t=await e.readUserSettings(),r=i.userSettingsGroup&&typeof t=="object"&&t!==null?t[i.userSettingsGroup]:null;if(i.webcomponent&&!C.checkWCUrl(i.viewUrl,e))return console.warn(`View URL '${i.viewUrl}' not allowed to be included`),document.createElement("div");if(i.compound){const s=document.createElement("luigi-compound-container");return s.setAttribute("lui_container","true"),s.viewurl=b.get(Ae).applyDecorators(i.viewUrl,i.decodeViewUrl),s.webcomponent=i.webcomponent,s.compoundConfig=i.compound,s.context=i.context,s.clientPermissions=i.clientPermissions,s.nodeParams=i.nodeParams,s.pathParams=i.pathParams,s.userSettingsGroup=i.userSettingsGroup,s.userSettings=r,s.searchParams=i.searchParams,s.activeFeatureToggleList=e.featureToggles().getActiveFeatureToggleList(),s.locale=e.i18n().getCurrentLocale(),s.theme=e.theming().getCurrentTheme(),s.viewGroup=i.viewGroup,e.getEngine()._comm.addListeners(s,e),s}else{const s=document.createElement("luigi-container");return s.setAttribute("lui_container","true"),s.viewurl=b.get(Ae).applyDecorators(i.viewUrl,i.decodeViewUrl),s.webcomponent=i.webcomponent,s.context=i.context,s.clientPermissions=i.clientPermissions,s.cssVariables=await e.theming().getCSSVariables(),s.nodeParams=i.nodeParams,s.pathParams=i.pathParams,s.userSettingsGroup=i.userSettingsGroup,s.userSettings=r,s.searchParams=i.searchParams,s.activeFeatureToggleList=e.featureToggles().getActiveFeatureToggleList(),s.locale=e.i18n().getCurrentLocale(),s.theme=e.theming().getCurrentTheme(),s.viewGroup=i.viewGroup,Yt(s,e),Zt(s,e),e.getEngine()._comm.addListeners(s,e),s}},Yt=(i,e)=>{const t=e.getConfigValue("settings.customSandboxRules");if(!(t!=null&&t.length))return;const n=["allow-forms","allow-modals","allow-popups","allow-popups-to-escape-sandbox","allow-same-origin","allow-scripts"],r=t?[...new Set([...n,...t])]:n;i.sandboxRules=r},Zt=(i,e)=>{const t=e.getConfigValue("settings.allowRules");t!=null&&t.length&&(t.forEach((n,r)=>{t[r]=n+(n.indexOf(";")!=-1?"":";")}),i.allowRules=t)},D={navService:void 0,routingService:void 0,luigi:void 0,init:i=>{var e;console.log("Init UI..."),D.navService=b.get(de),D.routingService=b.get(he),D.luigi=i,(e=i.getEngine()._connector)==null||e.renderMainLayout()},update:i=>{var n,r,s;const e=D.routingService.getCurrentRoute();if(!e)return;const t=!i||i.length===0;(t||i.includes("settings.header")||i.includes("settings")||i.includes("navigation")||i.includes("navigation.profile")||i.includes("navigation.contextSwitcher")||i.includes("navigation.productSwitcher"))&&((n=D.luigi.getEngine()._connector)==null||n.renderTopNav(D.navService.getTopNavData(e.path))),(t||i.includes("navigation")||i.includes("navigation.nodes")||i.includes("navigation.viewgroupdata")||i.includes("settings")||i.includes("settings.footer"))&&((r=D.luigi.getEngine()._connector)==null||r.renderLeftNav(D.navService.getLeftNavData(e.path)),(s=D.luigi.getEngine()._connector)==null||s.renderTabNav(D.navService.getTabNavData(e.path))),(t||i.includes("navigation")||i.includes("navigation.nodes")||i.includes("navigation.viewgroupdata")||i.includes("settings.theming"))&&D.updateMainContent(e.node,D.luigi)},updateMainContent:async(i,e)=>{var a,o,l;const t=await e.readUserSettings(),r=i.userSettingsGroup&&typeof t=="object"&&t!==null?t[i.userSettingsGroup]:null,s=(a=e.getEngine()._connector)==null?void 0:a.getContainerWrapper();if((o=e.getEngine()._connector)==null||o.hideLoadingIndicator(s),i&&s){let c;if([...s.childNodes].forEach(f=>{var h;((h=f.tagName)==null?void 0:h.indexOf("LUIGI-"))===0&&(f.viewGroup?i.viewGroup===f.viewGroup?c=f:f.style.display="none":f.remove())}),c)c.style.display="block",c.viewurl=b.get(Ae).applyDecorators(i.viewUrl,i.decodeViewUrl),c.nodeParams=i.nodeParams,c.pathParams=i.pathParams,c.clientPermissions=i.clientPermissions,c.searchParams=C.prepareSearchParamsForClient(i,e),c.locale=e.i18n().getCurrentLocale(),c.theme=e.theming().getCurrentTheme(),c.activeFeatureToggleList=e.featureToggles().getActiveFeatureToggleList(),c.userSettingsGroup=i.userSettingsGroup,c.userSettings=r,Yt(c,e),Zt(c,e),c.updateContext(i.context||{});else{const f=await rt(i,e);s==null||s.appendChild(f);const h=e.getEngine()._connector;((l=i.loadingIndicator)==null?void 0:l.enabled)!==!1&&(h==null||h.showLoadingIndicator(s))}}},openModal:async(i,e,t,n)=>{var p,S;const r=await rt(e,i),s=b.get(he),a=b.get(ye);let o=!1,l,c;const h=new Promise(T=>{l=()=>{o||(o=!0,T(),a.removeLastModalFromStack())},c=()=>{l&&l(),i.getConfigValue("routing.showModalPathInUrl")&&a.getModalStackLength()===0&&s.removeModalDataFromUrl(!0)},r.addEventListener(m.CLOSE_CURRENT_MODAL_REQUEST,c)}),u={closePromise:h,resolveFn:l,onCloseRequestHandler:c,onInternalClose:()=>{try{u.resolveFn&&u.resolveFn()}catch(T){console.warn("onInternalClose failed",T)}},modalsettings:t};a.registerModal(u),(p=i.getEngine()._connector)==null||p.renderModal(r,t,()=>{n==null||n(),a.removeLastModalFromStack(),i.getConfigValue("routing.showModalPathInUrl")&&a.getModalStackLength()===0&&s.removeModalDataFromUrl(!0)},()=>h);const g=i.getEngine()._connector;((S=e.loadingIndicator)==null?void 0:S.enabled)!==!1&&(g==null||g.showLoadingIndicator(r.parentElement))},updateModalSettings:(i,e,t)=>{var a;const n=b.get(ye);if(n.getModalStackLength()===0)return;n.updateFirstModalSettings(i);const r=b.get(he),s=C.getModalPathFromPath(t);s&&r.updateModalDataInUrl(s,n.getModalSettings(),e),(a=t.getEngine()._connector)==null||a.updateModalSettings(n.getModalSettings())},openDrawer:async(i,e,t,n)=>{var a,o;const r=await rt(e,i);(a=i.getEngine()._connector)==null||a.renderDrawer(r,t,n);const s=i.getEngine()._connector;((o=e.loadingIndicator)==null?void 0:o.enabled)!==!1&&(s==null||s.showLoadingIndicator(r.parentElement))}};class he{constructor(e){this.luigi=e}getNavigationService(){return this.navigationService||(this.navigationService=b.get(de)),this.navigationService}shouldSkipRoutingForUrlPatterns(){const e=[/access_token=/,/id_token=/];return(this.luigi.getConfigValue("routing.skipRoutingForUrlPatterns")||e).filter(n=>location.href.match(n)).length!==0}enableRouting(){var t;const e=this.luigi.getConfig();console.log("Init Routing...",e.routing),(t=e.routing)!=null&&t.useHashRouting?(window.addEventListener("hashchange",n=>{this.handleRouteChange(C.getCurrentPath(!0))}),this.handleRouteChange(C.getCurrentPath(!0))):(window.addEventListener("popstate",n=>{this.handleRouteChange(C.getCurrentPath())}),this.handleRouteChange(C.getCurrentPath()))}async handleRouteChange(e){var h,u,g;const t=e.path,n=e.query,r=t+(n?"?"+n:""),s=new URLSearchParams(n),a={};if(this.shouldSkipRoutingForUrlPatterns())return;this.setFeatureToggle(r),await this.shouldShowModalPathInUrl(e),s.forEach((p,S)=>{a[S]=p});const o=this.getNavigationService().getPathData(t),l=C.filterNodeParams(a,this.luigi),c=this.getNavigationService().shouldRedirect(t,o);if(c){this.luigi.navigation().navigate(c);return}this.currentRoute={raw:window.location.href,path:t,nodeParams:l},(h=this.luigi.getEngine()._connector)==null||h.renderTopNav(this.getNavigationService().getTopNavData(t,o)),(u=this.luigi.getEngine()._connector)==null||u.renderLeftNav(this.getNavigationService().getLeftNavData(t,o)),(g=this.luigi.getEngine()._connector)==null||g.renderTabNav(this.getNavigationService().getTabNavData(t,o));const f=(o==null?void 0:o.selectedNode)??this.getNavigationService().getCurrentNode(t);f&&(this.currentRoute.node=f,f.nodeParams=l||{},f.pathParams=(o==null?void 0:o.pathParams)||{},f.searchParams=C.prepareSearchParamsForClient(f,this.luigi),this.getNavigationService().onNodeChange(this.previousNode,f),this.previousNode=f,D.updateMainContent(f,this.luigi))}getCurrentRoute(){return this.currentRoute}async shouldShowModalPathInUrl(e){this.luigi.getConfigValue("routing.showModalPathInUrl")&&await this.handleBookmarkableModalPath(e)}async handleBookmarkableModalPath(e){var o;const t=b.get(de),n=b.get(ye),r=new URLSearchParams((e==null?void 0:e.query)||""),s=C.getModalViewParamName(this.luigi),a=r.get(s);if(a){const l=r.get(`${s}Params`);try{const c=JSON.parse(l||"{}"),{nodeObject:f}=await t.extractDataFromPath(a);document.querySelector(".lui-modal luigi-container")?(o=this.luigi.getEngine()._connector)==null||o.updateModalSettings(c):this.luigi.navigation().openAsModal(a,c||f.openNodeInModal)}catch(c){console.error("Error parsing modal settings from URL parameters",c)}}else{n.closeModals();return}}appendModalDataToUrl(e,t){const n=C.getHashQueryParamSeparator(),r=C.getQueryParams(this.luigi),s=C.getModalViewParamName(this.luigi),a=r[s],o=new URL(location.href),l=this.luigi.getConfigValue("routing.useHashRouting");let c=history.state,f,h;if(l){let[u,g]=o.hash.split("?");f=u,h=C.getURLWithoutModalData(g,s),h&&(f+="?"+h)}else f=o.pathname,h=C.getURLWithoutModalData(o.search,s),h&&(f+="?"+C.getURLWithoutModalData(o.search,s));if(c=C.handleHistoryState(c,f),a!==e){if(r[s]=e,t&&Object.keys(t).length&&(r[`${s}Params`]=JSON.stringify(t)),l){const u=location.hash.indexOf(n);u!==-1&&(o.hash=o.hash.slice(0,u)),o.hash=`${o.hash}${n}${C.encodeParams(r)}`}else o.search=`?${C.encodeParams(r)}`;history.pushState(c,"",o.href)}else{const u=new URL(o);if(l){let g=u.hash.split("?")[0];u.hash=g,h&&(u.hash+="?"+h)}else u.search=h;history.replaceState({},"",u.href),history.pushState(c,"",o.href)}}removeModalDataFromUrl(e){const t=C.getQueryParams(this.luigi),n=C.getModalViewParamName(this.luigi);let r=new URL(location.href);if(this.luigi.getConfigValue("routing.useHashRouting")){let a={};t[n]&&(a[n]=t[n]),t[`${n}Params`]&&(a[`${n}Params`]=t[`${n}Params`]);let o=C.encodeParams(a);r.hash.includes(`?${o}`)?r.hash=r.hash.replace(`?${o}`,""):r.hash.includes(`&${o}`)&&(r.hash=r.hash.replace(`&${o}`,""))}else{let a=new URLSearchParams(r.search.slice(1));a.delete(n),a.delete(`${n}Params`);let o="";Array.from(a.keys()).forEach(l=>{o+=(o===""?"?":"&")+l+"="+a.get(l)}),r.search=o}if(history.state&&history.state.modalHistoryLength>=0&&e){history.state.modalHistoryLength;const a=history.state.pathBeforeHistory;let o=!1;if(window.addEventListener("popstate",l=>{o?(history.replaceState({},"",a),history.pushState({},"",a),history.back()):(history.pushState({},"",a),history.back())},{once:!0}),history.state.historygap===history.length-history.state.modalHistoryLength)history.go(-history.state.modalHistoryLength);else if(history.state.modalHistoryLength>history.length){const l=history.length-1;o=!0,history.go(-l),window.Luigi.preventLoadingModalData=!0}else{const l=history.state.modalHistoryLength;history.go(-l)}}else history.pushState({},"",r.href)}setFeatureToggle(e){const t=this.luigi.getConfigValue("settings.featureToggles.queryStringParam"),n=this.luigi.featureToggles();t&&typeof e=="string"&&C.setFeatureToggles(t,e,n)}updateModalDataInUrl(e,t,n){let r=C.getHashQueryParamSeparator();const s=C.getQueryParams(this.luigi),a=C.getModalViewParamName(this.luigi);s[a]=e,t&&Object.keys(t).length&&(s[`${a}Params`]=JSON.stringify(t));const o=new URL(location.href);if(this.luigi.getConfigValue("routing.useHashRouting")){const c=location.hash.indexOf(r);c!==-1&&(o.hash=o.hash.slice(0,c)),o.hash=`${o.hash}${r}${C.encodeParams(s)}`}else o.search=`?${C.encodeParams(s)}`;n?history.pushState(window.state,"",o.href):history.replaceState(window.state,"",o.href)}}class Hi{constructor(e){var t;this.hashRouting=!1,this.navigate=(n,r,s,a)=>{const o=n.replace(/\/\/+/g,"/"),l=!1;if(s)this.openAsModal(n,s,a);else if(this.modalService.closeModals(),this.hashRouting)location.hash=o;else{window.history.pushState({path:o},"",o);const c={detail:{preventContextUpdate:l,withoutSync:!1}},f=new CustomEvent("popstate",c);window.dispatchEvent(f)}},this.openAsModal=async(n,r,s)=>{r.keepPrevious||await this.modalService.closeModals();const a=n.replace(/\/\/+/g,"/"),o=this.navService.getCurrentNode(a),l=r||{};l.title||(l.title=o.label),this.luigi.getConfigValue("routing.showModalPathInUrl")&&this.modalService.getModalStackLength()===0&&this.routingService.appendModalDataToUrl(a,l),this.luigi.getEngine()._ui.openModal(this.luigi,o,l,s)},this.openAsDrawer=(n,r,s)=>{const a=n.replace(/\/\/+/g,"/"),o=this.navService.getCurrentNode(a),l=r||{};l.title||(l.title=o.label),this.luigi.getEngine()._ui.openDrawer(this.luigi,o,l,s)},this.luigi=e,this.hashRouting=(t=e.getConfig().routing)==null?void 0:t.useHashRouting,this.navService=b.get(de),this.routingService=b.get(he),this.modalService=b.get(ye)}}class Wi{constructor(e){this.luigi=e}addSearchParams(e,t=!1){if(!v.isObject(e)){console.log("Params argument must be an object");return}const n=new URL(location.href);this.luigi.getConfigValue("routing.useHashRouting")?n.hash=C.addParamsOnHashRouting(e,n.hash):C.modifySearchParams(e,n.searchParams),this.handleBrowserHistory(t,n),this.luigi.configChanged()}getSearchParams(){const e={},t=["__proto__","constructor","prototype"],n=new URL(location.href);let r;if(this.luigi.getConfigValue("routing.useHashRouting")){const s=n.hash.split("?")[1];r=s?new URLSearchParams(s).entries():[]}else r=n.searchParams.entries();for(const[s,a]of r){if(t.some(o=>s===o)){console.warn(`Blocked because of potentially dangerous query param: ${s}`);continue}e[s]=a}return e}handleBrowserHistory(e,t){const n=this.sanitizeUrl(t.href);if(!n){console.warn("invalid url: "+n);return}e?window.history.pushState({},"",n):window.history.replaceState({},"",n)}sanitizeUrl(e){return new URL(location.href).origin===new URL(e).origin?e:void 0}addNodeParams(e,t){if(!v.isObject(e)){console.log("Params argument must be an object");return}const n=C.getContentViewParamPrefix(this.luigi),r=new URL(location.href);this.luigi.getConfigValue("routing.useHashRouting")?r.hash=C.addParamsOnHashRouting(e,r.hash,n):C.modifySearchParams(e,r.searchParams,n),this.handleBrowserHistory(t,r),this.luigi.getConfigValue("routing.useHashRouting")?window.dispatchEvent(new HashChangeEvent("hashchange")):this.luigi.configChanged()}}var V,we;class Gi{constructor(e){et(this,V);et(this,we,"");tt(this,V,e)}async getAvailableThemes(){return await H(this,V).getConfigValueAsync("settings.theming.themes")}setCurrentTheme(e){tt(this,we,e),H(this,V).__cssVars=void 0}async getThemeObject(e){const t=await this.getAvailableThemes();return t==null?void 0:t.find(n=>n.id===e)}getCurrentTheme(){if(!this.isThemingAvailable())return!1;if(H(this,we))return H(this,we);const e=H(this,V).getConfigValue("settings.theming");return e.defaultTheme||console.error("[Theming] getCurrentTheme() error. No theme set and no defaultTheme found in configuration",e),e.defaultTheme}isThemingAvailable(){return!!H(this,V).getConfigValue("settings.theming")}async getCSSVariables(){if(!window.Luigi.__cssVars){const e=H(this,V).getConfigValue("settings.theming.variables.file");if(e)try{const t=await fetch(e);window.Luigi.__cssVars=(await t.json()).root,Object.keys(window.Luigi.__cssVars).forEach(n=>{const r=getComputedStyle(document.documentElement).getPropertyValue("--"+n);r&&(window.Luigi.__cssVars[n]=r)})}catch(t){v.isFunction(H(this,V).getConfigValue("settings.theming.variables.errorHandling"))?H(this,V).getConfigValue("settings.theming.variables.errorHandling")(t):console.error("CSS variables file error: ",t)}else H(this,V).getConfigValue("settings.theming.variables")==="fiori"&&window.__luigiThemeVars?(window.Luigi.__cssVars={},window.__luigiThemeVars.forEach(t=>{window.Luigi.__cssVars[t]=getComputedStyle(document.documentElement).getPropertyValue("--"+t)})):window.Luigi.__cssVars={}}return window.Luigi.__cssVars}_init(){const e=b.get(Ae);(()=>{const n=H(this,V).getConfigValue("settings.theming");n&&n.nodeViewURLDecorator&&n.nodeViewURLDecorator.queryStringParameter&&e.add({type:"queryString",uid:"theming",key:n.nodeViewURLDecorator.queryStringParameter.keyName,valueFn:()=>{const r=this.getCurrentTheme(),s=n.nodeViewURLDecorator.queryStringParameter.value;return s?s(r):r}}),n&&n.useFioriScrollbars===!0&&document.body.classList.add("fioriScrollbars")})()}}V=new WeakMap,we=new WeakMap;class ze{constructor(){this.unsavedChanges={isDirty:!1,persistUrl:null}}updateDirtyStatus(e,t){var n,r;if(!this.unsavedChanges.dirtySet||!(this.unsavedChanges.dirtySet instanceof Set)){const s=new Set;s.add(t),this.unsavedChanges={dirtySet:s}}this.unsavedChanges.persistUrl=window.location.href,e?(n=this.unsavedChanges.dirtySet)==null||n.add(t):(r=this.unsavedChanges.dirtySet)==null||r.delete(t)}clearDirtyState(e){this.unsavedChanges&&this.unsavedChanges.dirtySet&&(e?this.unsavedChanges.dirtySet.delete(e):this.unsavedChanges.dirtySet.clear())}readDirtyStatus(){return this.unsavedChanges.dirtySet?this.unsavedChanges.dirtySet.size>0:!!this.unsavedChanges.isDirty}}let Lt;const L={luigi:void 0,documentTitle:void 0,init:i=>{console.log("ux init..."),L.luigi=i,L.documentTitle=je(void 0),Lt=b.get(ze)},processAlert:(i,e,t)=>{var r;if(!L.luigi)throw new Error("Luigi is not initialized.");const n={openFromClient:e,close:()=>{i.id&&t.notifyAlertClosed(i.id)},link:s=>{var a;if(i.links){const o=i.links[s];if(o&&(o.url&&((a=L.luigi)==null||a.navigation().navigate(o.url)),o.dismissKey&&i.id))return t.notifyAlertClosed(i.id,o.dismissKey),!0}return!1}};(r=L.luigi.getEngine()._connector)==null||r.renderAlert(i,n)},handleConfirmationModalRequest:(i,e)=>{var t;if(!L.luigi)throw new Error("Luigi is not initialized.");i&&(i={...i,header:L.luigi.i18n().getTranslation(i.header||"luigi.confirmationModal.header"),body:L.luigi.i18n().getTranslation(i.body||"luigi.confirmationModal.body"),buttonDismiss:L.luigi.i18n().getTranslation(i.buttonDismiss||"luigi.button.dismiss"),buttonConfirm:L.luigi.i18n().getTranslation(i.buttonConfirm||"luigi.button.confirm")}),(t=L.luigi.getEngine()._connector)==null||t.renderConfirmationModal(i,{confirm(){e.notifyConfirmationModalClosed(!0)},dismiss(){e.notifyConfirmationModalClosed(!1)}})},handleDirtyStatusRequest:(i,e)=>{if(!L.luigi)throw new Error("Luigi is not initialized.");Lt.updateDirtyStatus(i,e)}};class Bi{processUserSettingGroups(e,t){var o;const n=[],r=e==null?void 0:e.userSettingGroups,s=(o=t==null?void 0:t.userSettings)==null?void 0:o.userSettingGroups,a=r||s;if(v.isObject(a)){for(const l in a){const c={};c[l]=a[l],n.push(c)}return n}return n}getUserSettingsIframesInDom(){const e=document.querySelector(".iframeUserSettingsCtn");return e?[...e.children]:[]}hideUserSettingsIframe(){this.getUserSettingsIframesInDom().forEach(e=>{e.style.display="none"})}findActiveCustomUserSettingsIframe(e){const t=document.querySelectorAll("[userSettingsGroup]");for(let n=0;n<t.length;n++)if(t[n].contentWindow===e)return t[n];return null}}const ji=new Bi;class qi{constructor(e){this.dirtyStatusService=b.get(ze),this.appLoadingIndicatorSelector="[luigi-app-loading-indicator]",this.showAlert=t=>new Promise(n=>{var s;t.id||(t.id=v.getRandomId().toString());const r={openFromClient:!1,close:()=>{n(!0)},link:a=>{var o;if(t.links){const l=t.links[a];if(l&&(l.url&&((o=this.luigi)==null||o.navigation().navigate(l.url)),l.dismissKey))return n(l.dismissKey),!0}return!1}};(s=this.luigi.getEngine()._connector)==null||s.renderAlert(t,r)}),this.showConfirmationModal=t=>(t&&(t={...t,header:this.luigi.i18n().getTranslation(t.header||"luigi.confirmationModal.header"),body:this.luigi.i18n().getTranslation(t.body||"luigi.confirmationModal.body"),buttonDismiss:this.luigi.i18n().getTranslation(t.buttonDismiss||"luigi.button.dismiss"),buttonConfirm:this.luigi.i18n().getTranslation(t.buttonConfirm||"luigi.button.confirm")}),new Promise((n,r)=>{var s;(s=this.luigi.getEngine()._connector)==null||s.renderConfirmationModal(t,{confirm(){n(!0)},dismiss(){r()}})})),this.processUserSettingGroups=()=>{const t=this.luigi.getConfigValue("userSettings"),n=this.luigi.getConfigValue("settings");return ji.processUserSettingGroups(t,n)},this.openUserSettings=t=>{var n;(n=this.luigi.getEngine()._connector)==null||n.openUserSettings(t)},this.closeUserSettings=()=>{var t;(t=this.luigi.getEngine()._connector)==null||t.closeUserSettings()},this.setDocumentTitle=t=>{var n,r,s;(r=(n=this.luigi.getEngine()._ux)==null?void 0:n.documentTitle)==null||r.set(t),(s=this.luigi.getEngine()._connector)==null||s.setDocumentTitle(t)},this.getDocumentTitle=()=>{var t;return Mt((t=this.luigi.getEngine()._ux)==null?void 0:t.documentTitle)||window.document.title||""},this.hideAppLoadingIndicator=()=>{const t=document.querySelector(this.appLoadingIndicatorSelector);t&&(t.classList.add("hidden"),setTimeout(()=>{var n;(n=t.parentNode)==null||n.removeChild(t)},500))},this.showLoadingIndicator=t=>{var n;return(n=this.luigi.getEngine()._connector)==null?void 0:n.showLoadingIndicator(t)},this.hideLoadingIndicator=t=>{var n;return(n=this.luigi.getEngine()._connector)==null?void 0:n.hideLoadingIndicator(t)},this.addBackdrop=()=>{var t;return(t=this.luigi.getEngine()._connector)==null?void 0:t.addBackdrop()},this.removeBackdrop=()=>{var t;return(t=this.luigi.getEngine()._connector)==null?void 0:t.removeBackdrop()},this.getDirtyStatus=()=>this.dirtyStatusService.readDirtyStatus(),this.luigi=e}}class zi{constructor(e){this.engine=e,this.initialized=!1,this.configReadyCallback=function(){},this.USER_SETTINGS_KEY="luigi.preferences.userSettings",this.setConfig=t=>{this.config=t,this.setConfigCallback(this.getConfigReadyCallback()),this.engine.init(),this.initialized=!0,this.luigiAfterInit()},this.getConfig=()=>this.config,this.configChanged=(...t)=>{this.getEngine()._ui.update(t)},this.i18n=()=>(this._i18n||(this._i18n=new Ei(this)),this._i18n),this.navigation=()=>new Hi(this),this.ux=()=>new qi(this),this.featureToggles=()=>(this._featureToggles||(this._featureToggles=new vi),this._featureToggles),this.routing=()=>(this._routing||(this._routing=new Wi(this)),this._routing),this.theming=()=>(this._theming||(this._theming=new Gi(this)),this._theming),this.auth=()=>Se,this._store=this.createConfigStore()}getEngine(){return this.engine}getConfigValue(e){return v.getConfigValueFromObject(this.getConfig(),e)}getConfigValueAsync(e,...t){return Ue.getConfigValueFromObjectAsync(this.getConfig(),e,t)}async readUserSettings(){const e=await this.getConfigValueAsync("userSettings"),t=e||await this.getConfigValueAsync("settings.userSettings");if(t&&v.isFunction(t.readUserSettings))return t.readUserSettings();const n=localStorage.getItem(this.USER_SETTINGS_KEY);return n&&JSON.parse(n)}async storeUserSettings(e,t){const n=await this.getConfigValueAsync("userSettings"),r=n||await this.getConfigValueAsync("settings.userSettings");if(r&&v.isFunction(r.storeUserSettings))return r.storeUserSettings(e,t);localStorage.setItem(this.USER_SETTINGS_KEY,JSON.stringify(e)),this.configChanged()}luigiAfterInit(){v.getConfigBooleanValue(this.getConfig(),"settings.appLoadingIndicator.hideAutomatically")&&setTimeout(()=>{this.ux().hideAppLoadingIndicator()},0)}createConfigStore(){const e=je({}),t={};let n=[];return{subscribe:r=>{n.push(e.subscribe(r))},reset:r=>{e.update(r)},subscribeToScope:(r,s)=>{let a=t[s];a||(a=new Set,t[s]=a),a.add(r)},fire:(r,s)=>{const a=t[r];a&&[...a].forEach(o=>{o(s)})},clear:()=>{n.forEach(r=>{r()}),n=[]}}}getConfigReadyCallback(){return new Promise(e=>{this.i18n()._init(),e()})}setConfigCallback(e){this.configReadyCallback=e}}const Ki=!1;var Ji=Array.isArray,Xi=Array.from,Yi=Object.defineProperty,Nt=Object.getOwnPropertyDescriptor;const ut=2,ei=4,ti=8,Zi=16,Fe=32,Xe=64,Ye=128,Ke=256,ne=512,ii=1024,ht=2048,ni=4096,Ze=8192,en=16384,tn=1<<18,nn=1<<19;function rn(i){return i===this.v}function sn(){throw new Error("effect_update_depth_exceeded")}function an(i){return{f:0,v:i,reactions:null,equals:rn,version:0}}var Ut,ri;function on(){if(Ut===void 0){Ut=window;var i=Element.prototype,e=Node.prototype;Nt(e,"firstChild").get,ri=Nt(e,"nextSibling").get,i.__click=void 0,i.__className="",i.__attributes=null,i.__styles=null,i.__e=void 0,Text.prototype.__t=void 0}}function ln(i=""){return document.createTextNode(i)}function cn(i){return ri.call(i)}function si(i){var e=i.children;if(e!==null){i.children=null;for(var t=0;t<e.length;t+=1){var n=e[t];(n.f&ut)!==0?ai(n):Qe(n)}}}function un(i){var e,t=ie;Ie(i.parent);try{si(i),e=di(i)}finally{Ie(t)}return e}function hn(i){var e=un(i),t=(Ee||(i.f&Ye)!==0)&&i.deps!==null?ht:ne;$e(i,t),i.equals(e)||(i.v=e,i.version=_n())}function ai(i){si(i),Ve(i,0),$e(i,Ze),i.v=i.children=i.deps=i.ctx=i.reactions=null}function dn(i,e){var t=e.last;t===null?e.last=e.first=i:(t.next=i,i.prev=t,e.last=i)}function dt(i,e,t,n=!0){var r=(i&Xe)!==0,s=ie,a={ctx:ee,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:i|ii,first:null,fn:e,last:null,next:null,parent:r?null:s,prev:null,teardown:null,transitions:null,version:0};if(t){var o=Te;try{Ot(!0),ft(a),a.f|=en}catch(f){throw Qe(a),f}finally{Ot(o)}}else e!==null&&yn(a);var l=t&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&nn)===0;if(!l&&!r&&n&&(s!==null&&dn(a,s),Z!==null&&(Z.f&ut)!==0)){var c=Z;(c.children??(c.children=[])).push(a)}return a}function gn(i){const e=dt(Xe,i,!0);return()=>{Qe(e)}}function fn(i){return dt(ei,i,!1)}function pn(i,e=!0){return dt(ti|Fe,i,!0,e)}function oi(i){var e=i.teardown;if(e!==null){const t=Z;Pe(null);try{e.call(null)}finally{Pe(t)}}}function li(i){var e=i.deriveds;if(e!==null){i.deriveds=null;for(var t=0;t<e.length;t+=1)ai(e[t])}}function ci(i,e=!1){var t=i.first;for(i.first=i.last=null;t!==null;){var n=t.next;Qe(t,e),t=n}}function mn(i){for(var e=i.first;e!==null;){var t=e.next;(e.f&Fe)===0&&Qe(e),e=t}}function Qe(i,e=!0){var t=!1;if((e||(i.f&tn)!==0)&&i.nodes_start!==null){for(var n=i.nodes_start,r=i.nodes_end;n!==null;){var s=n===r?null:cn(n);n.remove(),n=s}t=!0}li(i),ci(i,e&&!t),Ve(i,0),$e(i,Ze);var a=i.transitions;if(a!==null)for(const l of a)l.stop();oi(i);var o=i.parent;o!==null&&o.first!==null&&ui(i),i.next=i.prev=i.teardown=i.ctx=i.deps=i.parent=i.fn=i.nodes_start=i.nodes_end=null}function ui(i){var e=i.parent,t=i.prev,n=i.next;t!==null&&(t.next=n),n!==null&&(n.prev=t),e!==null&&(e.first===i&&(e.first=n),e.last===i&&(e.last=t))}let Je=!1,Te=!1;function Ot(i){Te=i}let ot=[],xe=0;let Z=null;function Pe(i){Z=i}let ie=null;function Ie(i){ie=i}let X=null,j=0,hi=0,Ee=!1,ee=null;function _n(){return++hi}function gt(i){var a,o;var e=i.f;if((e&ii)!==0)return!0;if((e&ht)!==0){var t=i.deps,n=(e&Ye)!==0;if(t!==null){var r;if((e&Ke)!==0){for(r=0;r<t.length;r++)((a=t[r]).reactions??(a.reactions=[])).push(i);i.f^=Ke}for(r=0;r<t.length;r++){var s=t[r];if(gt(s)&&hn(s),n&&ie!==null&&!Ee&&!((o=s==null?void 0:s.reactions)!=null&&o.includes(i))&&(s.reactions??(s.reactions=[])).push(i),s.version>i.version)return!0}}n||$e(i,ne)}return!1}function Sn(i,e,t){throw i}function di(i){var f;var e=X,t=j,n=Z,r=Ee,s=ee,a=i.f;X=null,j=0,Z=(a&(Fe|Xe))===0?i:null,Ee=!Te&&(a&Ye)!==0,ee=i.ctx;try{var o=(0,i.fn)(),l=i.deps;if(X!==null){var c;if(Ve(i,j),l!==null&&j>0)for(l.length=j+X.length,c=0;c<X.length;c++)l[j+c]=X[c];else i.deps=l=X;if(!Ee)for(c=j;c<l.length;c++)((f=l[c]).reactions??(f.reactions=[])).push(i)}else l!==null&&j<l.length&&(Ve(i,j),l.length=j);return o}finally{X=e,j=t,Z=n,Ee=r,ee=s}}function En(i,e){let t=e.reactions;if(t!==null){var n=t.indexOf(i);if(n!==-1){var r=t.length-1;r===0?t=e.reactions=null:(t[n]=t[r],t.pop())}}t===null&&(e.f&ut)!==0&&(X===null||!X.includes(e))&&($e(e,ht),(e.f&(Ye|Ke))===0&&(e.f^=Ke),Ve(e,0))}function Ve(i,e){var t=i.deps;if(t!==null)for(var n=e;n<t.length;n++)En(i,t[n])}function ft(i){var e=i.f;if((e&Ze)===0){$e(i,ne);var t=ie;ie=i;try{li(i),(e&Zi)!==0?mn(i):ci(i),oi(i);var n=di(i);i.teardown=typeof n=="function"?n:null,i.version=hi}catch(r){Sn(r)}finally{ie=t}}}function vn(){xe>1e3&&(xe=0,sn()),xe++}function Cn(i){var e=i.length;if(e!==0){vn();var t=Te;Te=!0;try{for(var n=0;n<e;n++){var r=i[n];(r.f&ne)===0&&(r.f^=ne);var s=[];gi(r,s),Tn(s)}}finally{Te=t}}}function Tn(i){var e=i.length;if(e!==0)for(var t=0;t<e;t++){var n=i[t];(n.f&(Ze|ni))===0&&gt(n)&&(ft(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?ui(n):n.fn=null))}}function wn(){if(Je=!1,xe>1001)return;const i=ot;ot=[],Cn(i),Je||(xe=0)}function yn(i){Je||(Je=!0,queueMicrotask(wn));for(var e=i;e.parent!==null;){e=e.parent;var t=e.f;if((t&(Xe|Fe))!==0){if((t&ne)===0)return;e.f^=ne}}ot.push(e)}function gi(i,e){var t=i.first,n=[];e:for(;t!==null;){var r=t.f,s=(r&Fe)!==0,a=s&&(r&ne)!==0;if(!a&&(r&ni)===0)if((r&ti)!==0){s?t.f^=ne:gt(t)&&ft(t);var o=t.first;if(o!==null){t=o;continue}}else(r&ei)!==0&&n.push(t);var l=t.next;if(l===null){let h=t.parent;for(;h!==null;){if(i===h)break e;var c=h.next;if(c!==null){t=c;continue e}h=h.parent}}t=l}for(var f=0;f<n.length;f++)o=n[f],e.push(o),gi(o,e)}const bn=-3585;function $e(i,e){i.f=i.f&bn|e}function Rn(i,e=!1,t){ee={p:ee,c:null,e:null,m:!1,s:i,x:null,l:null},e||(ee.l={s:null,u:null,r1:[],r2:an(!1)})}function An(i){const e=ee;if(e!==null){const a=e.e;if(a!==null){var t=ie,n=Z;e.e=null;try{for(var r=0;r<a.length;r++){var s=a[r];Ie(s.effect),Pe(s.reaction),fn(s.fn)}}finally{Ie(t),Pe(n)}}ee=e.p,e.m=!0}return{}}const Pn=new Set,Dt=new Set;function We(i){var $;var e=this,t=e.ownerDocument,n=i.type,r=(($=i.composedPath)==null?void 0:$.call(i))||[],s=r[0]||i.target,a=0,o=i.__root;if(o){var l=r.indexOf(o);if(l!==-1&&(e===document||e===window)){i.__root=e;return}var c=r.indexOf(e);if(c===-1)return;l<=c&&(a=l)}if(s=r[a]||i.target,s!==e){Yi(i,"currentTarget",{configurable:!0,get(){return s||t}});var f=Z,h=ie;Pe(null),Ie(null);try{for(var u,g=[];s!==null;){var p=s.assignedSlot||s.parentNode||s.host||null;try{var S=s["__"+n];if(S!==void 0&&!s.disabled)if(Ji(S)){var[T,...R]=S;T.apply(s,[i,...R])}else S.call(s,i)}catch(N){u?g.push(N):u=N}if(i.cancelBubble||p===e||p===null)break;s=p}if(u){for(let N of g)queueMicrotask(()=>{throw N});throw u}}finally{i.__root=e,delete i.currentTarget,Pe(f),Ie(h)}}}const In=["touchstart","touchmove"];function $n(i){return In.includes(i)}function Ln(i,e){return Nn(i,e)}const pe=new Map;function Nn(i,{target:e,anchor:t,props:n={},events:r,context:s,intro:a=!0}){on();var o=new Set,l=h=>{for(var u=0;u<h.length;u++){var g=h[u];if(!o.has(g)){o.add(g);var p=$n(g);e.addEventListener(g,We,{passive:p});var S=pe.get(g);S===void 0?(document.addEventListener(g,We,{passive:p}),pe.set(g,1)):pe.set(g,S+1)}}};l(Xi(Pn)),Dt.add(l);var c=void 0,f=gn(()=>{var h=t??e.appendChild(ln());return pn(()=>{if(s){Rn({});var u=ee;u.c=s}r&&(n.$$events=r),c=i(h,n)||{},s&&An()}),()=>{var p;for(var u of o){e.removeEventListener(u,We);var g=pe.get(u);--g===0?(document.removeEventListener(u,We),pe.delete(u)):pe.set(u,g)}Dt.delete(l),xt.delete(c),h!==t&&((p=h.parentNode)==null||p.removeChild(h))}});return xt.set(c,f),c}let xt=new WeakMap;const Un="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Un);function On(i){}const lt={init:i=>{b.get(he).enableRouting()},handlePageErrorHandler:(i,e,t)=>{i&&i.timeout&&setTimeout(()=>{if(i.viewUrl)e.viewUrl=i.viewUrl,t.getEngine()._ui.updateMainContent(e,t);else if(i.errorFn)i.errorFn(e);else{console.warn("Something went wrong with a client! You will be redirected to another page.");const n=i.redirectPath||"/";t.navigation().navigate(n)}},i.timeout)},handleExternalLinkNavigation:i=>{if(i.url)if(i.sameWindow||!1)window.location.href=i.url;else{const t=window.open(i.url,"_blank","noopener noreferrer");t&&(t.opener=null,t.focus())}},addSearchParamsFromClient(i,e,t){var o;const n=b.get(de),r=C.getCurrentPath(),s=n.getCurrentNode(r.path),a={...i};if((o=s==null?void 0:s.clientPermissions)!=null&&o.urlParameters){const l={};Object.keys(s.clientPermissions.urlParameters).forEach(c=>{c in a&&s.clientPermissions.urlParameters[c].write===!0&&(l[c]=a[c],delete a[c])});for(const c in a)console.warn(`No permission to add the search param "${c}" to the url`);Object.keys(l).length>0&&t.routing().addSearchParams(l,e)}}},Y={luigi:{},init:i=>{console.log("Init communication..."),Y.luigi=i},addListeners:(i,e)=>{i.addEventListener(m.INITIALIZED,t=>{var n;(n=L.luigi)==null||n.ux().hideLoadingIndicator(i.parentNode)}),i.addEventListener(m.NAVIGATION_REQUEST,t=>{e.navigation().navigate(t.detail.link,t.detail.preserveView,t.detail.modal,t.callbackFn)}),i.addEventListener(m.ALERT_REQUEST,t=>{L.processAlert(t.payload,!0,i)}),i.addEventListener(m.SHOW_CONFIRMATION_MODAL_REQUEST,t=>{L.handleConfirmationModalRequest(t.payload,i)}),i.addEventListener(m.SET_DOCUMENT_TITLE_REQUEST,t=>{var n;(n=Y.luigi.getEngine()._connector)==null||n.setDocumentTitle(t.detail.title)}),i.addEventListener(m.SHOW_LOADING_INDICATOR_REQUEST,t=>{var n;(n=Y.luigi.getEngine()._connector)==null||n.showLoadingIndicator(i.parentNode)}),i.addEventListener(m.HIDE_LOADING_INDICATOR_REQUEST,t=>{var n;(n=Y.luigi.getEngine()._connector)==null||n.hideLoadingIndicator(i.parentNode)}),i.addEventListener(m.ADD_BACKDROP_REQUEST,t=>{var n;(n=Y.luigi.getEngine()._connector)==null||n.addBackdrop()}),i.addEventListener(m.REMOVE_BACKDROP_REQUEST,t=>{var n;(n=Y.luigi.getEngine()._connector)==null||n.removeBackdrop()}),i.addEventListener(m.SET_DIRTY_STATUS_REQUEST,t=>{var n,r,s;L.handleDirtyStatusRequest((r=(n=t.detail)==null?void 0:n.data)==null?void 0:r.dirty,(s=t.detail)==null?void 0:s.source)}),i.addEventListener(m.ADD_NODE_PARAMS_REQUEST,t=>{e.routing().addNodeParams(t.payload.data,t.payload.keepBrowserHistory)}),i.addEventListener(m.OPEN_USER_SETTINGS_REQUEST,t=>{var n;(n=Y.luigi.getEngine()._connector)==null||n.openUserSettings(t.detail)}),i.addEventListener(m.CLOSE_USER_SETTINGS_REQUEST,t=>{var n;(n=Y.luigi.getEngine()._connector)==null||n.closeUserSettings()}),i.addEventListener(m.ADD_SEARCH_PARAMS_REQUEST,t=>{lt.addSearchParamsFromClient(t.detail.data,t.detail.keepBrowserHistory,e)}),i.addEventListener(m.UPDATE_MODAL_SETTINGS_REQUEST,t=>{D.updateModalSettings(t.payload.updatedModalSettings,t.payload.addHistoryEntry,e)}),i.addEventListener(m.SET_CURRENT_LOCALE_REQUEST,t=>{var n,r,s;e.i18n().setCurrentLocale((s=(r=(n=t.detail)==null?void 0:n.data)==null?void 0:r.data)==null?void 0:s.currentLocale,i)})}};class kt{constructor(){this.dataManagement=new Map}setChildren(e,t){this.dataManagement.set(e,t),this.navPath=""}getChildren(e){return e?this.dataManagement.get(e):{}}hasChildren(e){const t=this.getChildren(e);return!!(t&&Object.prototype.hasOwnProperty.call(t,"children"))}setRootNode(e){this.dataManagement.set("_luigiRootNode",{node:e})}getRootNode(){return this.dataManagement.get("_luigiRootNode")}hasRootNode(){return!!this.getRootNode()}deleteCache(){this.dataManagement.clear()}deleteNodesRecursively(e){if(this.hasChildren(e)){const t=this.getChildren(e).children;for(let n=0;n<t.length;n++)this.deleteNodesRecursively(t[n])}this.dataManagement.delete(e)}}class Dn{constructor(){this._ui=D,this._comm=Y,this._ux=L,this._routing=lt}bootstrap(e){this._app=Ln(On,{target:document.body}),this._connector=e}init(){const e=window.Luigi;ve.init().then(()=>{b.register(ze,()=>new ze),b.register(de,()=>new de(e)),b.register(kt,()=>new kt),b.register(he,()=>new he(e)),b.register(Ae,()=>new Ae),b.register(ye,()=>new ye(e)),e.theming()._init(),D.init(e),lt.init(e),Y.init(e),L.init(e)})}}window.Luigi=new zi(new Dn);
59
+ }`,r=_l(" "),o=Vn("iframe"),Ju(o.src,u=s[3])||ft(o,"src",u),ft(o,"title",s[1]),ft(o,"allow",c=ju(s[0])),ft(o,"sandbox",h=s[2]?s[2].join(" "):void 0)},m(d,_){pn(d,n,_),pn(d,r,_),pn(d,o,_),s[28](o)},p(d,_){8&_[0]&&!Ju(o.src,u=d[3])&&ft(o,"src",u),2&_[0]&&ft(o,"title",d[1]),1&_[0]&&c!==(c=ju(d[0]))&&ft(o,"allow",c),4&_[0]&&h!==(h=d[2]?d[2].join(" "):void 0)&&ft(o,"sandbox",h)},d(d){d&&(nn(n),nn(r),nn(o)),s[28](null)}}}function Zm(s){let n,r,o=s[5]&&nl(s);return{c(){n=Vn("main"),o&&o.c(),ft(n,"class",r=s[4]?void 0:"lui-isolated")},m(u,c){pn(u,n,c),o&&o.m(n,null),s[29](n)},p(u,c){u[5]?o?o.p(u,c):(o=nl(u),o.c(),o.m(n,null)):o&&(o.d(1),o=null),16&c[0]&&r!==(r=u[4]?void 0:"lui-isolated")&&ft(n,"class",r)},i:tn,o:tn,d(u){u&&nn(n),o&&o.d(),s[29](null)}}}function jm(s,n,r){let{activeFeatureToggleList:o}=n,{allowRules:u}=n,{anchor:c}=n,{authData:h}=n,{clientPermissions:d}=n,{context:_}=n,{deferInit:v}=n,{dirtyStatus:x}=n,{documentTitle:C}=n,{hasBack:y}=n,{label:I}=n,{locale:L}=n,{noShadow:D}=n,{nodeParams:F}=n,{pathParams:te}=n,{sandboxRules:ge}=n,{searchParams:oe}=n,{skipCookieCheck:Oe}=n,{skipInitCheck:de}=n,{theme:Ue}=n,{userSettings:we}=n,{viewurl:Pe}=n,{webcomponent:Ce}=n;const pe={};let _e,$,gt=!1;const ke=new yl,Ae=b=>{if(!gt){b.sendCustomMessage=(ee,me)=>{Dn.sendCustomMessage(ee,b.getNoShadow()?b:_e,!!Ce,pe,me)},b.updateContext=(ee,me)=>{if(r(8,_=ee),Ce)(b.getNoShadow()?b:_e)._luigi_mfe_webcomponent.context=ee;else{const Le={...me||{},activeFeatureToggleList:b.activeFeatureToggleList||[],currentLocale:b.locale,currentTheme:b.theme,userSettings:b.userSettings||null,cssVariables:b.cssVariables||{},anchor:b.anchor||"",drawer:b.drawer||!1,modal:b.modal||!1,viewStackSize:b.viewStackSize||0,isNavigateBack:b.isNavigateBack||!1};Dn.updateContext(ee,Le,pe,F,te,oe)}},b.closeAlert=(ee,me)=>{b.notifyAlertClosed(ee,me)},b.notifyAlertClosed=(ee,me)=>{b.isConnected&&(Ce?ke.resolveAlert(ee,me):Dn.notifyAlertClosed(ee,me,pe))},b.notifyConfirmationModalClosed=ee=>{b.isConnected&&(Ce?ke.notifyConfirmationModalClosed(!!ee):Dn.notifyConfirmationModalClosed(!!ee,pe))},en.registerContainer(b),ke.thisComponent=b;const Ne=vr.resolveContext(_);if(b.updateViewUrl=(ee,me)=>{ee!=null&&ee.length&&Dn.updateViewUrl(ee,vr.resolveContext(_),me,pe)},Ce&&Ce!="false"){b.getNoShadow()?b.innerHTML="":(r(7,_e.innerHTML="",_e),b.attachShadow({mode:"open"}).append(_e));const ee=vr.checkWebcomponentValue(Ce);ke.renderWebComponent(Pe,b.getNoShadow()?b:_e,Ne,typeof ee=="object"?{webcomponent:ee}:{})}else b.getNoShadow()||(b.innerHTML="",b.attachShadow({mode:"open"}).append(_e));de?(b.initialized=!0,setTimeout((()=>{ke.dispatchLuigiEvent(O.INITIALIZED,{})}))):Ce&&(b.getNoShadow()?b:_e).addEventListener("wc_ready",(()=>{var ee;(ee=(b.getNoShadow()?b:_e)._luigi_mfe_webcomponent)!=null&&ee.deferLuigiClientWCInit||(b.initialized=!0,ke.dispatchLuigiEvent(O.INITIALIZED,{}))})),r(5,gt=!0),b.containerInitialized=!0}};var yt;return vl((async()=>{r(27,$=_e.parentNode),r(27,$.iframeHandle=pe,$),r(27,$.init=()=>{Ae($)},$),!v&&Pe&&Ae($)})),yt=async()=>{},ml().$$.on_destroy.push(yt),s.$$set=b=>{"activeFeatureToggleList"in b&&r(9,o=b.activeFeatureToggleList),"allowRules"in b&&r(0,u=b.allowRules),"anchor"in b&&r(10,c=b.anchor),"authData"in b&&r(11,h=b.authData),"clientPermissions"in b&&r(12,d=b.clientPermissions),"context"in b&&r(8,_=b.context),"deferInit"in b&&r(13,v=b.deferInit),"dirtyStatus"in b&&r(14,x=b.dirtyStatus),"documentTitle"in b&&r(15,C=b.documentTitle),"hasBack"in b&&r(16,y=b.hasBack),"label"in b&&r(1,I=b.label),"locale"in b&&r(17,L=b.locale),"noShadow"in b&&r(18,D=b.noShadow),"nodeParams"in b&&r(19,F=b.nodeParams),"pathParams"in b&&r(20,te=b.pathParams),"sandboxRules"in b&&r(2,ge=b.sandboxRules),"searchParams"in b&&r(21,oe=b.searchParams),"skipCookieCheck"in b&&r(22,Oe=b.skipCookieCheck),"skipInitCheck"in b&&r(23,de=b.skipInitCheck),"theme"in b&&r(24,Ue=b.theme),"userSettings"in b&&r(25,we=b.userSettings),"viewurl"in b&&r(3,Pe=b.viewurl),"webcomponent"in b&&r(4,Ce=b.webcomponent)},s.$$.update=()=>{134225960&s.$$.dirty[0]&&!gt&&Pe&&!v&&$&&Ae($)},[u,I,ge,Pe,Ce,gt,pe,_e,_,o,c,h,d,v,x,C,y,L,D,F,te,oe,Oe,de,Ue,we,()=>o&&u&&c&&h&&d&&x&&C&&y&&L&&D&&F&&te&&ge&&oe&&Oe&&de&&Ue&&we,$,function(b){wr[b?"unshift":"push"]((()=>{pe.iframe=b,r(6,pe)}))},function(b){wr[b?"unshift":"push"]((()=>{_e=b,r(7,_e)}))}]}class Al extends Cl{constructor(n){super(),Sl(this,n,jm,Zm,pl,{activeFeatureToggleList:9,allowRules:0,anchor:10,authData:11,clientPermissions:12,context:8,deferInit:13,dirtyStatus:14,documentTitle:15,hasBack:16,label:1,locale:17,noShadow:18,nodeParams:19,pathParams:20,sandboxRules:2,searchParams:21,skipCookieCheck:22,skipInitCheck:23,theme:24,userSettings:25,viewurl:3,webcomponent:4,unwarn:26},null,[-1,-1])}get activeFeatureToggleList(){return this.$$.ctx[9]}set activeFeatureToggleList(n){this.$$set({activeFeatureToggleList:n}),Q()}get allowRules(){return this.$$.ctx[0]}set allowRules(n){this.$$set({allowRules:n}),Q()}get anchor(){return this.$$.ctx[10]}set anchor(n){this.$$set({anchor:n}),Q()}get authData(){return this.$$.ctx[11]}set authData(n){this.$$set({authData:n}),Q()}get clientPermissions(){return this.$$.ctx[12]}set clientPermissions(n){this.$$set({clientPermissions:n}),Q()}get context(){return this.$$.ctx[8]}set context(n){this.$$set({context:n}),Q()}get deferInit(){return this.$$.ctx[13]}set deferInit(n){this.$$set({deferInit:n}),Q()}get dirtyStatus(){return this.$$.ctx[14]}set dirtyStatus(n){this.$$set({dirtyStatus:n}),Q()}get documentTitle(){return this.$$.ctx[15]}set documentTitle(n){this.$$set({documentTitle:n}),Q()}get hasBack(){return this.$$.ctx[16]}set hasBack(n){this.$$set({hasBack:n}),Q()}get label(){return this.$$.ctx[1]}set label(n){this.$$set({label:n}),Q()}get locale(){return this.$$.ctx[17]}set locale(n){this.$$set({locale:n}),Q()}get noShadow(){return this.$$.ctx[18]}set noShadow(n){this.$$set({noShadow:n}),Q()}get nodeParams(){return this.$$.ctx[19]}set nodeParams(n){this.$$set({nodeParams:n}),Q()}get pathParams(){return this.$$.ctx[20]}set pathParams(n){this.$$set({pathParams:n}),Q()}get sandboxRules(){return this.$$.ctx[2]}set sandboxRules(n){this.$$set({sandboxRules:n}),Q()}get searchParams(){return this.$$.ctx[21]}set searchParams(n){this.$$set({searchParams:n}),Q()}get skipCookieCheck(){return this.$$.ctx[22]}set skipCookieCheck(n){this.$$set({skipCookieCheck:n}),Q()}get skipInitCheck(){return this.$$.ctx[23]}set skipInitCheck(n){this.$$set({skipInitCheck:n}),Q()}get theme(){return this.$$.ctx[24]}set theme(n){this.$$set({theme:n}),Q()}get userSettings(){return this.$$.ctx[25]}set userSettings(n){this.$$set({userSettings:n}),Q()}get viewurl(){return this.$$.ctx[3]}set viewurl(n){this.$$set({viewurl:n}),Q()}get webcomponent(){return this.$$.ctx[4]}set webcomponent(n){this.$$set({webcomponent:n}),Q()}get unwarn(){return this.$$.ctx[26]}}function ev(s){Vm(s,"svelte-1buc46y","main.svelte-1buc46y{width:100%;height:100%;border:none}")}function tv(s){let n;return{c(){n=Vn("main"),ft(n,"class","svelte-1buc46y")},m(r,o){pn(r,n,o),s[21](n)},p:tn,i:tn,o:tn,d(r){r&&nn(n),s[21](null)}}}function nv(s,n,r){let o,u,{activeFeatureToggleList:c}=n,{anchor:h}=n,{clientPermissions:d}=n,{compoundConfig:_}=n,{context:v}=n,{deferInit:x}=n,{dirtyStatus:C}=n,{documentTitle:y}=n,{hasBack:I}=n,{locale:L}=n,{noShadow:D}=n,{nodeParams:F}=n,{pathParams:te}=n,{searchParams:ge}=n,{skipInitCheck:oe}=n,{theme:Oe}=n,{userSettings:de}=n,{viewurl:Ue}=n,{webcomponent:we}=n,Pe=!1;const Ce=new lo,pe=new yl,_e=$=>{if(!_||Pe)return;$.updateContext=(Ae,yt)=>{const b=$.getNoShadow()?$:o;b._luigi_mfe_webcomponent.context=Ae,r(1,v=Ae);const Ne=b._luigi_mfe_webcomponent;if(Ne){const ee=Ne.querySelectorAll("[lui_web_component]");ee==null||ee.forEach((me=>{const Le=me.context||{};me.context=Object.assign(Le,Ae)}))}};const gt=vr.resolveContext(v);r(2,x=!1),$.notifyAlertClosed=(Ae,yt)=>{$.isConnected&&pe.resolveAlert(Ae,yt)},$.notifyConfirmationModalClosed=Ae=>{$.isConnected&&pe.notifyConfirmationModalClosed(!!Ae)};const ke={compound:_,viewUrl:Ue,webcomponent:vr.checkWebcomponentValue(we)||!0};$.getNoShadow()?$.innerHTML="":(r(0,o.innerHTML="",o),$.attachShadow({mode:"open"}).append(o)),pe.renderWebComponentCompound(ke,$.getNoShadow()?$:o,gt).then((Ae=>{u=Ae,oe||!ke.viewUrl?($.initialized=!0,setTimeout((()=>{pe.dispatchLuigiEvent(O.INITIALIZED,{})}))):u.LuigiClient&&!u.deferLuigiClientWCInit&&($.initialized=!0,pe.dispatchLuigiEvent(O.INITIALIZED,{}))})),Pe=!0,$.containerInitialized=!0};return vl((async()=>{const $=o.getRootNode()===document?o.parentNode:o.getRootNode().host;$.init=()=>{_e($)},x||_e($),Ce.registerContainer($),pe.thisComponent=$})),s.$$set=$=>{"activeFeatureToggleList"in $&&r(3,c=$.activeFeatureToggleList),"anchor"in $&&r(4,h=$.anchor),"clientPermissions"in $&&r(5,d=$.clientPermissions),"compoundConfig"in $&&r(6,_=$.compoundConfig),"context"in $&&r(1,v=$.context),"deferInit"in $&&r(2,x=$.deferInit),"dirtyStatus"in $&&r(7,C=$.dirtyStatus),"documentTitle"in $&&r(8,y=$.documentTitle),"hasBack"in $&&r(9,I=$.hasBack),"locale"in $&&r(10,L=$.locale),"noShadow"in $&&r(11,D=$.noShadow),"nodeParams"in $&&r(12,F=$.nodeParams),"pathParams"in $&&r(13,te=$.pathParams),"searchParams"in $&&r(14,ge=$.searchParams),"skipInitCheck"in $&&r(15,oe=$.skipInitCheck),"theme"in $&&r(16,Oe=$.theme),"userSettings"in $&&r(17,de=$.userSettings),"viewurl"in $&&r(18,Ue=$.viewurl),"webcomponent"in $&&r(19,we=$.webcomponent)},[o,v,x,c,h,d,_,C,y,I,L,D,F,te,ge,oe,Oe,de,Ue,we,()=>c&&h&&d&&C&&y&&I&&L&&D&&F&&te&&ge&&oe&&Oe&&de,function($){wr[$?"unshift":"push"]((()=>{o=$,r(0,o)}))}]}wl(Al,{activeFeatureToggleList:{type:"Array",reflect:!1,attribute:"active-feature-toggle-list"},allowRules:{type:"Array",reflect:!1,attribute:"allow-rules"},anchor:{type:"String",reflect:!1,attribute:"anchor"},authData:{type:"Object",reflect:!1,attribute:"auth-data"},clientPermissions:{type:"Object",reflect:!1,attribute:"client-permissions"},context:{type:"String",reflect:!1,attribute:"context"},deferInit:{type:"Boolean",attribute:"defer-init"},dirtyStatus:{type:"Boolean",reflect:!1,attribute:"dirty-status"},documentTitle:{type:"String",reflect:!1,attribute:"document-title"},hasBack:{type:"Boolean",reflect:!1,attribute:"has-back"},label:{type:"String",reflect:!1,attribute:"label"},locale:{type:"String",reflect:!1,attribute:"locale"},noShadow:{type:"Boolean",attribute:"no-shadow"},nodeParams:{type:"Object",reflect:!1,attribute:"node-params"},pathParams:{type:"Object",reflect:!1,attribute:"path-params"},sandboxRules:{type:"Array",reflect:!1,attribute:"sandbox-rules"},searchParams:{type:"Object",reflect:!1,attribute:"search-params"},skipCookieCheck:{type:"String",reflect:!1,attribute:"skip-cookie-check"},skipInitCheck:{type:"Boolean",reflect:!1,attribute:"skip-init-check"},theme:{type:"String",reflect:!1,attribute:"theme"},userSettings:{type:"Object",reflect:!1,attribute:"user-settings"},viewurl:{type:"String",reflect:!1,attribute:"viewurl"},webcomponent:{type:"String",reflect:!1,attribute:"webcomponent"}},[],["unwarn"],!1,(s=>{let n=r=>()=>console.warn(r+" can't be called on luigi-container before its micro frontend is attached to the DOM.");return class extends s{constructor(){super(...arguments);Ee(this,"sendCustomMessage",n("sendCustomMessage"));Ee(this,"updateContext",n("updateContext"));Ee(this,"updateViewUrl",n("updateViewUrl"));Ee(this,"closeAlert",n("closeAlert"));Ee(this,"notifyAlertClosed",n("notifyAlertClosed"));Ee(this,"notifyConfirmationModalClosed",n("notifyConfirmationModalClosed"))}attributeChangedCallback(o,u,c){try{super.attributeChangedCallback(o,u,c)}catch(h){console.error("Error in super.attributeChangedCallback",h)}this.containerInitialized&&(o==="context"&&this.updateContext(JSON.parse(c)),o==="auth-data"&&Dn.updateAuthData(this.iframeHandle,JSON.parse(c)))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}}));class il extends Cl{constructor(n){super(),Sl(this,n,nv,tv,pl,{activeFeatureToggleList:3,anchor:4,clientPermissions:5,compoundConfig:6,context:1,deferInit:2,dirtyStatus:7,documentTitle:8,hasBack:9,locale:10,noShadow:11,nodeParams:12,pathParams:13,searchParams:14,skipInitCheck:15,theme:16,userSettings:17,viewurl:18,webcomponent:19,unwarn:20},ev)}get activeFeatureToggleList(){return this.$$.ctx[3]}set activeFeatureToggleList(n){this.$$set({activeFeatureToggleList:n}),Q()}get anchor(){return this.$$.ctx[4]}set anchor(n){this.$$set({anchor:n}),Q()}get clientPermissions(){return this.$$.ctx[5]}set clientPermissions(n){this.$$set({clientPermissions:n}),Q()}get compoundConfig(){return this.$$.ctx[6]}set compoundConfig(n){this.$$set({compoundConfig:n}),Q()}get context(){return this.$$.ctx[1]}set context(n){this.$$set({context:n}),Q()}get deferInit(){return this.$$.ctx[2]}set deferInit(n){this.$$set({deferInit:n}),Q()}get dirtyStatus(){return this.$$.ctx[7]}set dirtyStatus(n){this.$$set({dirtyStatus:n}),Q()}get documentTitle(){return this.$$.ctx[8]}set documentTitle(n){this.$$set({documentTitle:n}),Q()}get hasBack(){return this.$$.ctx[9]}set hasBack(n){this.$$set({hasBack:n}),Q()}get locale(){return this.$$.ctx[10]}set locale(n){this.$$set({locale:n}),Q()}get noShadow(){return this.$$.ctx[11]}set noShadow(n){this.$$set({noShadow:n}),Q()}get nodeParams(){return this.$$.ctx[12]}set nodeParams(n){this.$$set({nodeParams:n}),Q()}get pathParams(){return this.$$.ctx[13]}set pathParams(n){this.$$set({pathParams:n}),Q()}get searchParams(){return this.$$.ctx[14]}set searchParams(n){this.$$set({searchParams:n}),Q()}get skipInitCheck(){return this.$$.ctx[15]}set skipInitCheck(n){this.$$set({skipInitCheck:n}),Q()}get theme(){return this.$$.ctx[16]}set theme(n){this.$$set({theme:n}),Q()}get userSettings(){return this.$$.ctx[17]}set userSettings(n){this.$$set({userSettings:n}),Q()}get viewurl(){return this.$$.ctx[18]}set viewurl(n){this.$$set({viewurl:n}),Q()}get webcomponent(){return this.$$.ctx[19]}set webcomponent(n){this.$$set({webcomponent:n}),Q()}get unwarn(){return this.$$.ctx[20]}}wl(il,{activeFeatureToggleList:{type:"Array",reflect:!1,attribute:"active-feature-toggle-list"},anchor:{type:"String",reflect:!1,attribute:"anchor"},clientPermissions:{type:"Object",reflect:!1,attribute:"client-permissions"},compoundConfig:{type:"Object",reflect:!1,attribute:"compound-config"},context:{type:"String",reflect:!1,attribute:"context"},deferInit:{type:"Boolean",attribute:"defer-init"},dirtyStatus:{type:"Boolean",reflect:!1,attribute:"dirty-status"},documentTitle:{type:"String",reflect:!1,attribute:"document-title"},hasBack:{type:"Boolean",reflect:!1,attribute:"has-back"},locale:{type:"String",reflect:!1,attribute:"locale"},noShadow:{type:"Boolean",attribute:"no-shadow",reflect:!1},nodeParams:{type:"Object",reflect:!1,attribute:"node-params"},pathParams:{type:"Object",reflect:!1,attribute:"path-params"},searchParams:{type:"Object",reflect:!1,attribute:"search-params"},skipInitCheck:{type:"Boolean",reflect:!1,attribute:"skip-init-check"},theme:{type:"String",reflect:!1,attribute:"theme"},userSettings:{type:"Object",reflect:!1,attribute:"user-settings"},viewurl:{type:"String",reflect:!1,attribute:"viewurl"},webcomponent:{type:"String",reflect:!1,attribute:"webcomponent"}},[],["unwarn"],!1,(s=>{let n=r=>()=>console.warn(r+" can't be called on luigi-container before its micro frontend is attached to the DOM.");return class extends s{constructor(){super(...arguments);Ee(this,"updateContext",n("updateContext"));Ee(this,"notifyAlertClosed",n("notifyAlertClosed"));Ee(this,"notifyConfirmationModalClosed",n("notifyConfirmationModalClosed"))}attributeChangedCallback(o,u,c){try{super.attributeChangedCallback(o,u,c)}catch(h){console.warn("Error in attributeChangedCallback",h)}this.containerInitialized&&o==="context"&&this.updateContext(JSON.parse(c))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}})),customElements.get("luigi-container")||customElements.define("luigi-container",Al.element),customElements.get("luigi-compound-container")||customElements.define("luigi-compound-container",il.element);class Gn{constructor(){this.decorators=[]}hasDecorators(){return this.decorators.length>0}add(n){this.decorators=this.decorators.filter(r=>r.uid!==n.uid).concat(n)}applyDecorators(n,r){if(!n)return n;const o=new URL(B.prependOrigin(n)),u=this.decorators.filter(c=>c.type==="queryString");for(let c=0;c<u.length;c++){const h=u[c];o.searchParams.has(h.key)&&o.searchParams.delete(h.key);const d=h.valueFn();o.searchParams.append(h.key,d)}return r&&(o.search=decodeURIComponent(o.search)),o.href}}const io=async(s,n)=>{const r=await n.readUserSettings(),u=s.userSettingsGroup&&typeof r=="object"&&r!==null?r[s.userSettingsGroup]:null;if(s.webcomponent&&!q.checkWCUrl(s.viewUrl,n))return console.warn(`View URL '${s.viewUrl}' not allowed to be included`),document.createElement("div");if(s.compound){const c=document.createElement("luigi-compound-container");return c.setAttribute("lui_container","true"),c.viewurl=se.get(Gn).applyDecorators(s.viewUrl,s.decodeViewUrl),c.webcomponent=s.webcomponent,c.compoundConfig=s.compound,c.context=s.context,c.clientPermissions=s.clientPermissions,c.nodeParams=s.nodeParams,c.pathParams=s.pathParams,c.userSettingsGroup=s.userSettingsGroup,c.userSettings=u,c.searchParams=s.searchParams,c.activeFeatureToggleList=n.featureToggles().getActiveFeatureToggleList(),c.locale=n.i18n().getCurrentLocale(),c.theme=n.theming().getCurrentTheme(),c.viewGroup=s.viewGroup,n.getEngine()._comm.addListeners(c,n),c}else{const c=document.createElement("luigi-container");return c.setAttribute("lui_container","true"),c.viewurl=se.get(Gn).applyDecorators(s.viewUrl,s.decodeViewUrl),c.webcomponent=s.webcomponent,c.context=s.context,c.clientPermissions=s.clientPermissions,c.cssVariables=await n.theming().getCSSVariables(),c.nodeParams=s.nodeParams,c.pathParams=s.pathParams,c.userSettingsGroup=s.userSettingsGroup,c.userSettings=u,c.searchParams=s.searchParams,c.activeFeatureToggleList=n.featureToggles().getActiveFeatureToggleList(),c.locale=n.i18n().getCurrentLocale(),c.theme=n.theming().getCurrentTheme(),c.viewGroup=s.viewGroup,Rl(c,n),bl(c,n),n.getEngine()._comm.addListeners(c,n),c}},Rl=(s,n)=>{const r=n.getConfigValue("settings.customSandboxRules");if(!(r!=null&&r.length))return;const o=["allow-forms","allow-modals","allow-popups","allow-popups-to-escape-sandbox","allow-same-origin","allow-scripts"],u=r?[...new Set([...o,...r])]:o;s.sandboxRules=u},bl=(s,n)=>{const r=n.getConfigValue("settings.allowRules");r!=null&&r.length&&(r.forEach((o,u)=>{r[u]=o+(o.indexOf(";")!=-1?"":";")}),s.allowRules=r)},Fe={navService:void 0,routingService:void 0,luigi:void 0,init:s=>{var n;console.log("Init UI..."),Fe.navService=se.get(rn),Fe.routingService=se.get(_n),Fe.luigi=s,(n=s.getEngine()._connector)==null||n.renderMainLayout()},update:s=>{var o,u,c;const n=Fe.routingService.getCurrentRoute();if(!n)return;const r=!s||s.length===0;(r||s.includes("settings.header")||s.includes("settings")||s.includes("navigation")||s.includes("navigation.profile")||s.includes("navigation.contextSwitcher")||s.includes("navigation.productSwitcher"))&&((o=Fe.luigi.getEngine()._connector)==null||o.renderTopNav(Fe.navService.getTopNavData(n.path))),(r||s.includes("navigation")||s.includes("navigation.nodes")||s.includes("navigation.viewgroupdata")||s.includes("settings")||s.includes("settings.footer"))&&((u=Fe.luigi.getEngine()._connector)==null||u.renderLeftNav(Fe.navService.getLeftNavData(n.path)),(c=Fe.luigi.getEngine()._connector)==null||c.renderTabNav(Fe.navService.getTabNavData(n.path))),(r||s.includes("navigation")||s.includes("navigation.nodes")||s.includes("navigation.viewgroupdata")||s.includes("settings.theming"))&&Fe.updateMainContent(n.node,Fe.luigi)},updateMainContent:async(s,n)=>{var h,d,_;const r=await n.readUserSettings(),u=s.userSettingsGroup&&typeof r=="object"&&r!==null?r[s.userSettingsGroup]:null,c=(h=n.getEngine()._connector)==null?void 0:h.getContainerWrapper();if((d=n.getEngine()._connector)==null||d.hideLoadingIndicator(c),s&&c){let v;if([...c.childNodes].forEach(x=>{var C;((C=x.tagName)==null?void 0:C.indexOf("LUIGI-"))===0&&(x.viewGroup?s.viewGroup===x.viewGroup?v=x:x.style.display="none":x.remove())}),v)v.style.display="block",v.viewurl=se.get(Gn).applyDecorators(s.viewUrl,s.decodeViewUrl),v.nodeParams=s.nodeParams,v.pathParams=s.pathParams,v.clientPermissions=s.clientPermissions,v.searchParams=q.prepareSearchParamsForClient(s,n),v.locale=n.i18n().getCurrentLocale(),v.theme=n.theming().getCurrentTheme(),v.activeFeatureToggleList=n.featureToggles().getActiveFeatureToggleList(),v.userSettingsGroup=s.userSettingsGroup,v.userSettings=u,Rl(v,n),bl(v,n),v.updateContext(s.context||{});else{const x=await io(s,n);c==null||c.appendChild(x);const C=n.getEngine()._connector;((_=s.loadingIndicator)==null?void 0:_.enabled)!==!1&&(C==null||C.showLoadingIndicator(c))}}},openModal:async(s,n,r,o)=>{var L,D;const u=await io(n,s),c=se.get(_n),h=se.get(mn);let d=!1,_,v;const C=new Promise(F=>{_=()=>{d||(d=!0,F(),h.removeLastModalFromStack())},v=()=>{_&&_(),s.getConfigValue("routing.showModalPathInUrl")&&h.getModalStackLength()===0&&c.removeModalDataFromUrl(!0)},u.addEventListener(O.CLOSE_CURRENT_MODAL_REQUEST,v)}),y={closePromise:C,resolveFn:_,onCloseRequestHandler:v,onInternalClose:()=>{try{y.resolveFn&&y.resolveFn()}catch(F){console.warn("onInternalClose failed",F)}},modalsettings:r};h.registerModal(y),(L=s.getEngine()._connector)==null||L.renderModal(u,r,()=>{o==null||o(),h.removeLastModalFromStack(),s.getConfigValue("routing.showModalPathInUrl")&&h.getModalStackLength()===0&&c.removeModalDataFromUrl(!0)},()=>C);const I=s.getEngine()._connector;((D=n.loadingIndicator)==null?void 0:D.enabled)!==!1&&(I==null||I.showLoadingIndicator(u.parentElement))},updateModalSettings:(s,n,r)=>{var h;const o=se.get(mn);if(o.getModalStackLength()===0)return;o.updateFirstModalSettings(s);const u=se.get(_n),c=q.getModalPathFromPath(r);c&&u.updateModalDataInUrl(c,o.getModalSettings(),n),(h=r.getEngine()._connector)==null||h.updateModalSettings(o.getModalSettings())},openDrawer:async(s,n,r,o)=>{var h,d;const u=await io(n,s);(h=s.getEngine()._connector)==null||h.renderDrawer(u,r,o);const c=s.getEngine()._connector;((d=n.loadingIndicator)==null?void 0:d.enabled)!==!1&&(c==null||c.showLoadingIndicator(u.parentElement))}};class _n{constructor(n){this.luigi=n}getNavigationService(){return this.navigationService||(this.navigationService=se.get(rn)),this.navigationService}shouldSkipRoutingForUrlPatterns(){const n=[/access_token=/,/id_token=/];return(this.luigi.getConfigValue("routing.skipRoutingForUrlPatterns")||n).filter(o=>location.href.match(o)).length!==0}enableRouting(){var r;const n=this.luigi.getConfig();console.log("Init Routing...",n.routing),(r=n.routing)!=null&&r.useHashRouting?(window.addEventListener("hashchange",o=>{var c;const u=!!((c=o==null?void 0:o.detail)!=null&&c.withoutSync);this.handleRouteChange(q.getCurrentPath(!0),u)}),this.handleRouteChange(q.getCurrentPath(!0))):(window.addEventListener("popstate",o=>{var c;const u=!!((c=o==null?void 0:o.detail)!=null&&c.withoutSync);this.handleRouteChange(q.getCurrentPath(),u)}),this.handleRouteChange(q.getCurrentPath()))}async handleRouteChange(n,r=!1){var y,I,L;const o=n.path,u=n.query,c=o+(u?"?"+u:""),h=new URLSearchParams(u),d={};if(this.shouldSkipRoutingForUrlPatterns())return;this.setFeatureToggle(c),await this.shouldShowModalPathInUrl(n),h.forEach((D,F)=>{d[F]=D});const _=this.getNavigationService().getPathData(o),v=q.filterNodeParams(d,this.luigi),x=this.getNavigationService().shouldRedirect(o,_);if(x){this.luigi.navigation().navigate(x);return}this.currentRoute={raw:window.location.href,path:o,nodeParams:v},(y=this.luigi.getEngine()._connector)==null||y.renderTopNav(this.getNavigationService().getTopNavData(o,_)),(I=this.luigi.getEngine()._connector)==null||I.renderLeftNav(this.getNavigationService().getLeftNavData(o,_)),(L=this.luigi.getEngine()._connector)==null||L.renderTabNav(this.getNavigationService().getTabNavData(o,_));const C=(_==null?void 0:_.selectedNode)??this.getNavigationService().getCurrentNode(o);C&&(this.currentRoute.node=C,C.nodeParams=v||{},C.pathParams=(_==null?void 0:_.pathParams)||{},C.searchParams=q.prepareSearchParamsForClient(C,this.luigi),this.getNavigationService().onNodeChange(this.previousNode,C),this.previousNode=C,r||Fe.updateMainContent(C,this.luigi))}getCurrentRoute(){return this.currentRoute}async shouldShowModalPathInUrl(n){this.luigi.getConfigValue("routing.showModalPathInUrl")&&await this.handleBookmarkableModalPath(n)}async handleBookmarkableModalPath(n){var d;const r=se.get(rn),o=se.get(mn),u=new URLSearchParams((n==null?void 0:n.query)||""),c=q.getModalViewParamName(this.luigi),h=u.get(c);if(h){const _=u.get(`${c}Params`);try{const v=JSON.parse(_||"{}"),{nodeObject:x}=await r.extractDataFromPath(h);document.querySelector(".lui-modal luigi-container")?(d=this.luigi.getEngine()._connector)==null||d.updateModalSettings(v):this.luigi.navigation().openAsModal(h,v||x.openNodeInModal)}catch(v){console.error("Error parsing modal settings from URL parameters",v)}}else{o.closeModals();return}}appendModalDataToUrl(n,r){const o=q.getHashQueryParamSeparator(),u=q.getQueryParams(this.luigi),c=q.getModalViewParamName(this.luigi),h=u[c],d=new URL(location.href),_=this.luigi.getConfigValue("routing.useHashRouting");let v=history.state,x,C;if(_){let[y,I]=d.hash.split("?");x=y,C=q.getURLWithoutModalData(I,c),C&&(x+="?"+C)}else x=d.pathname,C=q.getURLWithoutModalData(d.search,c),C&&(x+="?"+q.getURLWithoutModalData(d.search,c));if(v=q.handleHistoryState(v,x),h!==n){if(u[c]=n,r&&Object.keys(r).length&&(u[`${c}Params`]=JSON.stringify(r)),_){const y=location.hash.indexOf(o);y!==-1&&(d.hash=d.hash.slice(0,y)),d.hash=`${d.hash}${o}${q.encodeParams(u)}`}else d.search=`?${q.encodeParams(u)}`;history.pushState(v,"",d.href)}else{const y=new URL(d);if(_){let I=y.hash.split("?")[0];y.hash=I,C&&(y.hash+="?"+C)}else y.search=C;history.replaceState({},"",y.href),history.pushState(v,"",d.href)}}removeModalDataFromUrl(n){const r=q.getQueryParams(this.luigi),o=q.getModalViewParamName(this.luigi);let u=new URL(location.href);if(this.luigi.getConfigValue("routing.useHashRouting")){let h={};r[o]&&(h[o]=r[o]),r[`${o}Params`]&&(h[`${o}Params`]=r[`${o}Params`]);let d=q.encodeParams(h);u.hash.includes(`?${d}`)?u.hash=u.hash.replace(`?${d}`,""):u.hash.includes(`&${d}`)&&(u.hash=u.hash.replace(`&${d}`,""))}else{let h=new URLSearchParams(u.search.slice(1));h.delete(o),h.delete(`${o}Params`);let d="";Array.from(h.keys()).forEach(_=>{d+=(d===""?"?":"&")+_+"="+h.get(_)}),u.search=d}if(history.state&&history.state.modalHistoryLength>=0&&n){history.state.modalHistoryLength;const h=history.state.pathBeforeHistory;let d=!1;if(window.addEventListener("popstate",_=>{d?(history.replaceState({},"",h),history.pushState({},"",h),history.back()):(history.pushState({},"",h),history.back())},{once:!0}),history.state.historygap===history.length-history.state.modalHistoryLength)history.go(-history.state.modalHistoryLength);else if(history.state.modalHistoryLength>history.length){const _=history.length-1;d=!0,history.go(-_),window.Luigi.preventLoadingModalData=!0}else{const _=history.state.modalHistoryLength;history.go(-_)}}else history.pushState({},"",u.href)}setFeatureToggle(n){const r=this.luigi.getConfigValue("settings.featureToggles.queryStringParam"),o=this.luigi.featureToggles();r&&typeof n=="string"&&q.setFeatureToggles(r,n,o)}updateModalDataInUrl(n,r,o){let u=q.getHashQueryParamSeparator();const c=q.getQueryParams(this.luigi),h=q.getModalViewParamName(this.luigi);c[h]=n,r&&Object.keys(r).length&&(c[`${h}Params`]=JSON.stringify(r));const d=new URL(location.href);if(this.luigi.getConfigValue("routing.useHashRouting")){const v=location.hash.indexOf(u);v!==-1&&(d.hash=d.hash.slice(0,v)),d.hash=`${d.hash}${u}${q.encodeParams(c)}`}else d.search=`?${q.encodeParams(c)}`;o?history.pushState(window.state,"",d.href):history.replaceState(window.state,"",d.href)}}class rv{constructor(n){var r;this.hashRouting=!1,this.navigate=async(o,u,c,h,d)=>{this.navService.handleNavigationRequest(o,u,c,!1,!1,void 0)},this.openAsModal=async(o,u,c)=>{u.keepPrevious||await this.modalService.closeModals();const h=o.replace(/\/\/+/g,"/"),d=this.navService.getCurrentNode(h),_=u||{};_.title||(_.title=d.label),this.luigi.getConfigValue("routing.showModalPathInUrl")&&this.modalService.getModalStackLength()===0&&this.routingService.appendModalDataToUrl(h,_),this.luigi.getEngine()._ui.openModal(this.luigi,d,_,c)},this.openAsDrawer=(o,u,c)=>{const h=o.replace(/\/\/+/g,"/"),d=this.navService.getCurrentNode(h),_=u||{};_.title||(_.title=d.label),this.luigi.getEngine()._ui.openDrawer(this.luigi,d,_,c)},this.runTimeErrorHandler=o=>{var d,_,v;const{path:u}=q.getCurrentPath((d=this.luigi.getConfig().routing)==null?void 0:d.useHashRouting),c=this.navService.getCurrentNode(u),h=this.luigi.getConfigValue("navigation.defaults.runTimeErrorHandler");(_=c==null?void 0:c.runTimeErrorHandler)!=null&&_.errorFn&&B.isFunction((v=c==null?void 0:c.runTimeErrorHandler)==null?void 0:v.errorFn)?c.runTimeErrorHandler.errorFn(o,c):h!=null&&h.errorFn&&B.isFunction(h.errorFn)&&h.errorFn(o,c)},this.luigi=n,this.hashRouting=(r=n.getConfig().routing)==null?void 0:r.useHashRouting,this.navService=se.get(rn),this.routingService=se.get(_n),this.modalService=se.get(mn)}}class iv{constructor(n){this.luigi=n}addSearchParams(n,r=!1){if(!B.isObject(n)){console.log("Params argument must be an object");return}const o=new URL(location.href);this.luigi.getConfigValue("routing.useHashRouting")?o.hash=q.addParamsOnHashRouting(n,o.hash):q.modifySearchParams(n,o.searchParams),this.handleBrowserHistory(r,o),this.luigi.configChanged()}getSearchParams(){const n={},r=["__proto__","constructor","prototype"],o=new URL(location.href);let u;if(this.luigi.getConfigValue("routing.useHashRouting")){const c=o.hash.split("?")[1];u=c?new URLSearchParams(c).entries():[]}else u=o.searchParams.entries();for(const[c,h]of u){if(r.some(d=>c===d)){console.warn(`Blocked because of potentially dangerous query param: ${c}`);continue}n[c]=h}return n}handleBrowserHistory(n,r){const o=this.sanitizeUrl(r.href);if(!o){console.warn("invalid url: "+o);return}n?window.history.pushState({},"",o):window.history.replaceState({},"",o)}sanitizeUrl(n){return new URL(location.href).origin===new URL(n).origin?n:void 0}addNodeParams(n,r){if(!B.isObject(n)){console.log("Params argument must be an object");return}const o=q.getContentViewParamPrefix(this.luigi),u=new URL(location.href);this.luigi.getConfigValue("routing.useHashRouting")?u.hash=q.addParamsOnHashRouting(n,u.hash,o):q.modifySearchParams(n,u.searchParams,o),this.handleBrowserHistory(r,u),this.luigi.getConfigValue("routing.useHashRouting")?window.dispatchEvent(new HashChangeEvent("hashchange")):this.luigi.configChanged()}}var tt,Bn;class sv{constructor(n){eo(this,tt);eo(this,Bn,"");to(this,tt,n)}async getAvailableThemes(){return await ht(this,tt).getConfigValueAsync("settings.theming.themes")}setCurrentTheme(n){to(this,Bn,n),ht(this,tt).__cssVars=void 0}async getThemeObject(n){const r=await this.getAvailableThemes();return r==null?void 0:r.find(o=>o.id===n)}getCurrentTheme(){if(!this.isThemingAvailable())return!1;if(ht(this,Bn))return ht(this,Bn);const n=ht(this,tt).getConfigValue("settings.theming");return n.defaultTheme||console.error("[Theming] getCurrentTheme() error. No theme set and no defaultTheme found in configuration",n),n.defaultTheme}isThemingAvailable(){return!!ht(this,tt).getConfigValue("settings.theming")}async getCSSVariables(){if(!window.Luigi.__cssVars){const n=ht(this,tt).getConfigValue("settings.theming.variables.file");if(n)try{const r=await fetch(n);window.Luigi.__cssVars=(await r.json()).root,Object.keys(window.Luigi.__cssVars).forEach(o=>{const u=getComputedStyle(document.documentElement).getPropertyValue("--"+o);u&&(window.Luigi.__cssVars[o]=u)})}catch(r){B.isFunction(ht(this,tt).getConfigValue("settings.theming.variables.errorHandling"))?ht(this,tt).getConfigValue("settings.theming.variables.errorHandling")(r):console.error("CSS variables file error: ",r)}else ht(this,tt).getConfigValue("settings.theming.variables")==="fiori"&&window.__luigiThemeVars?(window.Luigi.__cssVars={},window.__luigiThemeVars.forEach(r=>{window.Luigi.__cssVars[r]=getComputedStyle(document.documentElement).getPropertyValue("--"+r)})):window.Luigi.__cssVars={}}return window.Luigi.__cssVars}_init(){const n=se.get(Gn);(()=>{const o=ht(this,tt).getConfigValue("settings.theming");o&&o.nodeViewURLDecorator&&o.nodeViewURLDecorator.queryStringParameter&&n.add({type:"queryString",uid:"theming",key:o.nodeViewURLDecorator.queryStringParameter.keyName,valueFn:()=>{const u=this.getCurrentTheme(),c=o.nodeViewURLDecorator.queryStringParameter.value;return c?c(u):u}}),o&&o.useFioriScrollbars===!0&&document.body.classList.add("fioriScrollbars")})()}}tt=new WeakMap,Bn=new WeakMap;class Ri{constructor(){this.unsavedChanges={isDirty:!1,persistUrl:null}}updateDirtyStatus(n,r){var o,u;if(!this.unsavedChanges.dirtySet||!(this.unsavedChanges.dirtySet instanceof Set)){const c=new Set;c.add(r),this.unsavedChanges={dirtySet:c}}this.unsavedChanges.persistUrl=window.location.href,n?(o=this.unsavedChanges.dirtySet)==null||o.add(r):(u=this.unsavedChanges.dirtySet)==null||u.delete(r)}clearDirtyState(n){this.unsavedChanges&&this.unsavedChanges.dirtySet&&(n?this.unsavedChanges.dirtySet.delete(n):this.unsavedChanges.dirtySet.clear())}readDirtyStatus(){return this.unsavedChanges.dirtySet?this.unsavedChanges.dirtySet.size>0:!!this.unsavedChanges.isDirty}}let sl;const Ie={luigi:void 0,documentTitle:void 0,init:s=>{console.log("ux init..."),Ie.luigi=s,Ie.documentTitle=Ti(void 0),sl=se.get(Ri)},processAlert:(s,n,r)=>{var u;if(!Ie.luigi)throw new Error("Luigi is not initialized.");const o={openFromClient:n,close:()=>{s.id&&r.notifyAlertClosed(s.id)},link:c=>{var h;if(s.links){const d=s.links[c];if(d&&(d.url&&((h=Ie.luigi)==null||h.navigation().navigate(d.url)),d.dismissKey&&s.id))return r.notifyAlertClosed(s.id,d.dismissKey),!0}return!1}};(u=Ie.luigi.getEngine()._connector)==null||u.renderAlert(s,o)},handleConfirmationModalRequest:(s,n)=>{var r;if(!Ie.luigi)throw new Error("Luigi is not initialized.");s&&(s={...s,header:Ie.luigi.i18n().getTranslation(s.header||"luigi.confirmationModal.header"),body:Ie.luigi.i18n().getTranslation(s.body||"luigi.confirmationModal.body"),buttonDismiss:Ie.luigi.i18n().getTranslation(s.buttonDismiss||"luigi.button.dismiss"),buttonConfirm:Ie.luigi.i18n().getTranslation(s.buttonConfirm||"luigi.button.confirm")}),(r=Ie.luigi.getEngine()._connector)==null||r.renderConfirmationModal(s,{confirm(){n.notifyConfirmationModalClosed(!0)},dismiss(){n.notifyConfirmationModalClosed(!1)}})},handleDirtyStatusRequest:(s,n)=>{if(!Ie.luigi)throw new Error("Luigi is not initialized.");sl.updateDirtyStatus(s,n)}};class ov{processUserSettingGroups(n,r){var d;const o=[],u=n==null?void 0:n.userSettingGroups,c=(d=r==null?void 0:r.userSettings)==null?void 0:d.userSettingGroups,h=u||c;if(B.isObject(h)){for(const _ in h){const v={};v[_]=h[_],o.push(v)}return o}return o}getUserSettingsIframesInDom(){const n=document.querySelector(".iframeUserSettingsCtn");return n?[...n.children]:[]}hideUserSettingsIframe(){this.getUserSettingsIframesInDom().forEach(n=>{n.style.display="none"})}findActiveCustomUserSettingsIframe(n){const r=document.querySelectorAll("[userSettingsGroup]");for(let o=0;o<r.length;o++)if(r[o].contentWindow===n)return r[o];return null}}const av=new ov;class uv{constructor(n){this.dirtyStatusService=se.get(Ri),this.appLoadingIndicatorSelector="[luigi-app-loading-indicator]",this.showAlert=r=>new Promise(o=>{var c;r.id||(r.id=B.getRandomId().toString());const u={openFromClient:!1,close:()=>{o(!0)},link:h=>{var d;if(r.links){const _=r.links[h];if(_&&(_.url&&((d=this.luigi)==null||d.navigation().navigate(_.url)),_.dismissKey))return o(_.dismissKey),!0}return!1}};(c=this.luigi.getEngine()._connector)==null||c.renderAlert(r,u)}),this.showConfirmationModal=r=>(r&&(r={...r,header:this.luigi.i18n().getTranslation(r.header||"luigi.confirmationModal.header"),body:this.luigi.i18n().getTranslation(r.body||"luigi.confirmationModal.body"),buttonDismiss:this.luigi.i18n().getTranslation(r.buttonDismiss||"luigi.button.dismiss"),buttonConfirm:this.luigi.i18n().getTranslation(r.buttonConfirm||"luigi.button.confirm")}),new Promise((o,u)=>{var c;(c=this.luigi.getEngine()._connector)==null||c.renderConfirmationModal(r,{confirm(){o(!0)},dismiss(){u()}})})),this.processUserSettingGroups=()=>{const r=this.luigi.getConfigValue("userSettings"),o=this.luigi.getConfigValue("settings");return av.processUserSettingGroups(r,o)},this.openUserSettings=r=>{var o;(o=this.luigi.getEngine()._connector)==null||o.openUserSettings(r)},this.closeUserSettings=()=>{var r;(r=this.luigi.getEngine()._connector)==null||r.closeUserSettings()},this.setDocumentTitle=r=>{var o,u,c;(u=(o=this.luigi.getEngine()._ux)==null?void 0:o.documentTitle)==null||u.set(r),(c=this.luigi.getEngine()._connector)==null||c.setDocumentTitle(r)},this.getDocumentTitle=()=>{var r;return fl((r=this.luigi.getEngine()._ux)==null?void 0:r.documentTitle)||window.document.title||""},this.hideAppLoadingIndicator=()=>{const r=document.querySelector(this.appLoadingIndicatorSelector);r&&(r.classList.add("hidden"),setTimeout(()=>{var o;(o=r.parentNode)==null||o.removeChild(r)},500))},this.showLoadingIndicator=r=>{var o;return(o=this.luigi.getEngine()._connector)==null?void 0:o.showLoadingIndicator(r)},this.hideLoadingIndicator=r=>{var o;return(o=this.luigi.getEngine()._connector)==null?void 0:o.hideLoadingIndicator(r)},this.addBackdrop=()=>{var r;return(r=this.luigi.getEngine()._connector)==null?void 0:r.addBackdrop()},this.removeBackdrop=()=>{var r;return(r=this.luigi.getEngine()._connector)==null?void 0:r.removeBackdrop()},this.getDirtyStatus=()=>this.dirtyStatusService.readDirtyStatus(),this.luigi=n}}class lv{constructor(n){this.engine=n,this.initialized=!1,this.configReadyCallback=function(){},this.USER_SETTINGS_KEY="luigi.preferences.userSettings",this.setConfig=r=>{this.config=r,this.setConfigCallback(this.getConfigReadyCallback()),kn.init().then(()=>{this.engine.init(),this.initialized||(this.initialized=!0,Mm.luigiAfterInit(this))})},this.getConfig=()=>this.config,this.configChanged=(...r)=>{this.getEngine()._ui.update(r)},this.i18n=()=>(this._i18n||(this._i18n=new Dm(this)),this._i18n),this.navigation=()=>new rv(this),this.ux=()=>new uv(this),this.featureToggles=()=>(this._featureToggles||(this._featureToggles=new Fm),this._featureToggles),this.routing=()=>(this._routing||(this._routing=new iv(this)),this._routing),this.theming=()=>(this._theming||(this._theming=new sv(this)),this._theming),this.auth=()=>Mn,this._store=this.createConfigStore()}getEngine(){return this.engine}getConfigValue(n){return B.getConfigValueFromObject(this.getConfig(),n)}getConfigValueAsync(n,...r){return _r.getConfigValueFromObjectAsync(this.getConfig(),n,r)}async readUserSettings(){const n=await this.getConfigValueAsync("userSettings"),r=n||await this.getConfigValueAsync("settings.userSettings");if(r&&B.isFunction(r.readUserSettings))return r.readUserSettings();const o=localStorage.getItem(this.USER_SETTINGS_KEY);return o&&JSON.parse(o)}async storeUserSettings(n,r){const o=await this.getConfigValueAsync("userSettings"),u=o||await this.getConfigValueAsync("settings.userSettings");if(u&&B.isFunction(u.storeUserSettings))return u.storeUserSettings(n,r);localStorage.setItem(this.USER_SETTINGS_KEY,JSON.stringify(n)),this.configChanged()}createConfigStore(){const n=Ti({}),r={};let o=[];return{subscribe:u=>{o.push(n.subscribe(u))},reset:u=>{n.update(u)},subscribeToScope:(u,c)=>{let h=r[c];h||(h=new Set,r[c]=h),h.add(u)},fire:(u,c)=>{const h=r[u];h&&[...h].forEach(d=>{d(c)})},clear:()=>{o.forEach(u=>{u()}),o=[]}}}getConfigReadyCallback(){return new Promise(n=>{this.i18n()._init(),n()})}setConfigCallback(n){this.configReadyCallback=n}}const cv=!1;var hv=Array.isArray,fv=Array.from,gv=Object.defineProperty,ol=Object.getOwnPropertyDescriptor;const co=2,Il=4,Pl=8,dv=16,Tr=32,Pi=64,Li=128,bi=256,Vt=512,Ll=1024,ho=2048,xl=4096,xi=8192,pv=16384,_v=1<<18,mv=1<<19;function vv(s){return s===this.v}function Sv(){throw new Error("effect_update_depth_exceeded")}function Ev(s){return{f:0,v:s,reactions:null,equals:vv,version:0}}var al,$l;function wv(){if(al===void 0){al=window;var s=Element.prototype,n=Node.prototype;ol(n,"firstChild").get,$l=ol(n,"nextSibling").get,s.__click=void 0,s.__className="",s.__attributes=null,s.__styles=null,s.__e=void 0,Text.prototype.__t=void 0}}function Cv(s=""){return document.createTextNode(s)}function Tv(s){return $l.call(s)}function Ol(s){var n=s.children;if(n!==null){s.children=null;for(var r=0;r<n.length;r+=1){var o=n[r];(o.f&co)!==0?Ul(o):yr(o)}}}function yv(s){var n,r=Bt;Kn(s.parent);try{Ol(s),n=Wl(s)}finally{Kn(r)}return n}function Av(s){var n=yv(s),r=(Fn||(s.f&Li)!==0)&&s.deps!==null?ho:Vt;zn(s,r),s.equals(n)||(s.v=n,s.version=xv())}function Ul(s){Ol(s),Cr(s,0),zn(s,xi),s.v=s.children=s.deps=s.ctx=s.reactions=null}function Rv(s,n){var r=n.last;r===null?n.last=n.first=s:(r.next=s,s.prev=r,n.last=s)}function fo(s,n,r,o=!0){var u=(s&Pi)!==0,c=Bt,h={ctx:xt,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:s|Ll,first:null,fn:n,last:null,next:null,parent:u?null:c,prev:null,teardown:null,transitions:null,version:0};if(r){var d=Hn;try{ul(!0),po(h),h.f|=pv}catch(x){throw yr(h),x}finally{ul(d)}}else n!==null&&Fv(h);var _=r&&h.deps===null&&h.first===null&&h.nodes_start===null&&h.teardown===null&&(h.f&mv)===0;if(!_&&!u&&o&&(c!==null&&Rv(h,c),Lt!==null&&(Lt.f&co)!==0)){var v=Lt;(v.children??(v.children=[])).push(h)}return h}function bv(s){const n=fo(Pi,s,!0);return()=>{yr(n)}}function Iv(s){return fo(Il,s,!1)}function Pv(s,n=!0){return fo(Pl|Tr,s,!0,n)}function Nl(s){var n=s.teardown;if(n!==null){const r=Lt;qn(null);try{n.call(null)}finally{qn(r)}}}function Dl(s){var n=s.deriveds;if(n!==null){s.deriveds=null;for(var r=0;r<n.length;r+=1)Ul(n[r])}}function Ml(s,n=!1){var r=s.first;for(s.first=s.last=null;r!==null;){var o=r.next;yr(r,n),r=o}}function Lv(s){for(var n=s.first;n!==null;){var r=n.next;(n.f&Tr)===0&&yr(n),n=r}}function yr(s,n=!0){var r=!1;if((n||(s.f&_v)!==0)&&s.nodes_start!==null){for(var o=s.nodes_start,u=s.nodes_end;o!==null;){var c=o===u?null:Tv(o);o.remove(),o=c}r=!0}Dl(s),Ml(s,n&&!r),Cr(s,0),zn(s,xi);var h=s.transitions;if(h!==null)for(const _ of h)_.stop();Nl(s);var d=s.parent;d!==null&&d.first!==null&&Fl(s),s.next=s.prev=s.teardown=s.ctx=s.deps=s.parent=s.fn=s.nodes_start=s.nodes_end=null}function Fl(s){var n=s.parent,r=s.prev,o=s.next;r!==null&&(r.next=o),o!==null&&(o.prev=r),n!==null&&(n.first===s&&(n.first=o),n.last===s&&(n.last=r))}let Ii=!1,Hn=!1;function ul(s){Hn=s}let ao=[],Sr=0;let Lt=null;function qn(s){Lt=s}let Bt=null;function Kn(s){Bt=s}let It=null,Ct=0,kl=0,Fn=!1,xt=null;function xv(){return++kl}function go(s){var h,d;var n=s.f;if((n&Ll)!==0)return!0;if((n&ho)!==0){var r=s.deps,o=(n&Li)!==0;if(r!==null){var u;if((n&bi)!==0){for(u=0;u<r.length;u++)((h=r[u]).reactions??(h.reactions=[])).push(s);s.f^=bi}for(u=0;u<r.length;u++){var c=r[u];if(go(c)&&Av(c),o&&Bt!==null&&!Fn&&!((d=c==null?void 0:c.reactions)!=null&&d.includes(s))&&(c.reactions??(c.reactions=[])).push(s),c.version>s.version)return!0}}o||zn(s,Vt)}return!1}function $v(s,n,r){throw s}function Wl(s){var x;var n=It,r=Ct,o=Lt,u=Fn,c=xt,h=s.f;It=null,Ct=0,Lt=(h&(Tr|Pi))===0?s:null,Fn=!Hn&&(h&Li)!==0,xt=s.ctx;try{var d=(0,s.fn)(),_=s.deps;if(It!==null){var v;if(Cr(s,Ct),_!==null&&Ct>0)for(_.length=Ct+It.length,v=0;v<It.length;v++)_[Ct+v]=It[v];else s.deps=_=It;if(!Fn)for(v=Ct;v<_.length;v++)((x=_[v]).reactions??(x.reactions=[])).push(s)}else _!==null&&Ct<_.length&&(Cr(s,Ct),_.length=Ct);return d}finally{It=n,Ct=r,Lt=o,Fn=u,xt=c}}function Ov(s,n){let r=n.reactions;if(r!==null){var o=r.indexOf(s);if(o!==-1){var u=r.length-1;u===0?r=n.reactions=null:(r[o]=r[u],r.pop())}}r===null&&(n.f&co)!==0&&(It===null||!It.includes(n))&&(zn(n,ho),(n.f&(Li|bi))===0&&(n.f^=bi),Cr(n,0))}function Cr(s,n){var r=s.deps;if(r!==null)for(var o=n;o<r.length;o++)Ov(s,r[o])}function po(s){var n=s.f;if((n&xi)===0){zn(s,Vt);var r=Bt;Bt=s;try{Dl(s),(n&dv)!==0?Lv(s):Ml(s),Nl(s);var o=Wl(s);s.teardown=typeof o=="function"?o:null,s.version=kl}catch(u){$v(u)}finally{Bt=r}}}function Uv(){Sr>1e3&&(Sr=0,Sv()),Sr++}function Nv(s){var n=s.length;if(n!==0){Uv();var r=Hn;Hn=!0;try{for(var o=0;o<n;o++){var u=s[o];(u.f&Vt)===0&&(u.f^=Vt);var c=[];Hl(u,c),Dv(c)}}finally{Hn=r}}}function Dv(s){var n=s.length;if(n!==0)for(var r=0;r<n;r++){var o=s[r];(o.f&(xi|xl))===0&&go(o)&&(po(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?Fl(o):o.fn=null))}}function Mv(){if(Ii=!1,Sr>1001)return;const s=ao;ao=[],Nv(s),Ii||(Sr=0)}function Fv(s){Ii||(Ii=!0,queueMicrotask(Mv));for(var n=s;n.parent!==null;){n=n.parent;var r=n.f;if((r&(Pi|Tr))!==0){if((r&Vt)===0)return;n.f^=Vt}}ao.push(n)}function Hl(s,n){var r=s.first,o=[];e:for(;r!==null;){var u=r.f,c=(u&Tr)!==0,h=c&&(u&Vt)!==0;if(!h&&(u&xl)===0)if((u&Pl)!==0){c?r.f^=Vt:go(r)&&po(r);var d=r.first;if(d!==null){r=d;continue}}else(u&Il)!==0&&o.push(r);var _=r.next;if(_===null){let C=r.parent;for(;C!==null;){if(s===C)break e;var v=C.next;if(v!==null){r=v;continue e}C=C.parent}}r=_}for(var x=0;x<o.length;x++)d=o[x],n.push(d),Hl(d,n)}const kv=-3585;function zn(s,n){s.f=s.f&kv|n}function Wv(s,n=!1,r){xt={p:xt,c:null,e:null,m:!1,s,x:null,l:null},n||(xt.l={s:null,u:null,r1:[],r2:Ev(!1)})}function Hv(s){const n=xt;if(n!==null){const h=n.e;if(h!==null){var r=Bt,o=Lt;n.e=null;try{for(var u=0;u<h.length;u++){var c=h[u];Kn(c.effect),qn(c.reaction),Iv(c.fn)}}finally{Kn(r),qn(o)}}xt=n.p,n.m=!0}return{}}const Bv=new Set,ll=new Set;function wi(s){var ge;var n=this,r=n.ownerDocument,o=s.type,u=((ge=s.composedPath)==null?void 0:ge.call(s))||[],c=u[0]||s.target,h=0,d=s.__root;if(d){var _=u.indexOf(d);if(_!==-1&&(n===document||n===window)){s.__root=n;return}var v=u.indexOf(n);if(v===-1)return;_<=v&&(h=_)}if(c=u[h]||s.target,c!==n){gv(s,"currentTarget",{configurable:!0,get(){return c||r}});var x=Lt,C=Bt;qn(null),Kn(null);try{for(var y,I=[];c!==null;){var L=c.assignedSlot||c.parentNode||c.host||null;try{var D=c["__"+o];if(D!==void 0&&!c.disabled)if(hv(D)){var[F,...te]=D;F.apply(c,[s,...te])}else D.call(c,s)}catch(oe){y?I.push(oe):y=oe}if(s.cancelBubble||L===n||L===null)break;c=L}if(y){for(let oe of I)queueMicrotask(()=>{throw oe});throw y}}finally{s.__root=n,delete s.currentTarget,qn(x),Kn(C)}}}const Vv=["touchstart","touchmove"];function Qv(s){return Vv.includes(s)}function Gv(s,n){return qv(s,n)}const Un=new Map;function qv(s,{target:n,anchor:r,props:o={},events:u,context:c,intro:h=!0}){wv();var d=new Set,_=C=>{for(var y=0;y<C.length;y++){var I=C[y];if(!d.has(I)){d.add(I);var L=Qv(I);n.addEventListener(I,wi,{passive:L});var D=Un.get(I);D===void 0?(document.addEventListener(I,wi,{passive:L}),Un.set(I,1)):Un.set(I,D+1)}}};_(fv(Bv)),ll.add(_);var v=void 0,x=bv(()=>{var C=r??n.appendChild(Cv());return Pv(()=>{if(c){Wv({});var y=xt;y.c=c}u&&(o.$$events=u),v=s(C,o)||{},c&&Hv()}),()=>{var L;for(var y of d){n.removeEventListener(y,wi);var I=Un.get(y);--I===0?(document.removeEventListener(y,wi),Un.delete(y)):Un.set(y,I)}ll.delete(_),cl.delete(v),C!==r&&((L=C.parentNode)==null||L.removeChild(C))}});return cl.set(v,x),v}let cl=new WeakMap;const Kv="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Kv);function zv(s){}const uo={init:s=>{se.get(_n).enableRouting()},handlePageErrorHandler:(s,n,r)=>{s&&s.timeout&&setTimeout(()=>{if(s.viewUrl)n.viewUrl=s.viewUrl,r.getEngine()._ui.updateMainContent(n,r);else if(s.errorFn)s.errorFn(n);else{console.warn("Something went wrong with a client! You will be redirected to another page.");const o=s.redirectPath||"/";r.navigation().navigate(o)}},s.timeout)},handleExternalLinkNavigation:s=>{if(s.url)if(s.sameWindow||!1)window.location.href=s.url;else{const r=window.open(s.url,"_blank","noopener noreferrer");r&&(r.opener=null,r.focus())}},addSearchParamsFromClient(s,n,r){var d;const o=se.get(rn),u=q.getCurrentPath(),c=o.getCurrentNode(u.path),h={...s};if((d=c==null?void 0:c.clientPermissions)!=null&&d.urlParameters){const _={};Object.keys(c.clientPermissions.urlParameters).forEach(v=>{v in h&&c.clientPermissions.urlParameters[v].write===!0&&(_[v]=h[v],delete h[v])});for(const v in h)console.warn(`No permission to add the search param "${v}" to the url`);Object.keys(_).length>0&&r.routing().addSearchParams(_,n)}}},Pt={luigi:{},init:s=>{console.log("Init communication..."),Pt.luigi=s},addListeners:(s,n)=>{s.addEventListener(O.INITIALIZED,r=>{var o;(o=Ie.luigi)==null||o.ux().hideLoadingIndicator(s.parentNode)}),s.addEventListener(O.NAVIGATION_REQUEST,r=>{const{link:o,preserveView:u,modal:c,newTab:h,withoutSync:d}=r.detail;se.get(rn).handleNavigationRequest(o,u,c,h,d,r.callbackFn)}),s.addEventListener(O.RUNTIME_ERROR_HANDLING_REQUEST,r=>{var o,u;n.navigation().runTimeErrorHandler(((u=(o=r.payload)==null?void 0:o.data)==null?void 0:u.errorObj)||{})}),s.addEventListener(O.ALERT_REQUEST,r=>{Ie.processAlert(r.payload,!0,s)}),s.addEventListener(O.SHOW_CONFIRMATION_MODAL_REQUEST,r=>{Ie.handleConfirmationModalRequest(r.payload,s)}),s.addEventListener(O.SET_DOCUMENT_TITLE_REQUEST,r=>{var o;(o=Pt.luigi.getEngine()._connector)==null||o.setDocumentTitle(r.detail.title)}),s.addEventListener(O.SHOW_LOADING_INDICATOR_REQUEST,r=>{var o;(o=Pt.luigi.getEngine()._connector)==null||o.showLoadingIndicator(s.parentNode)}),s.addEventListener(O.HIDE_LOADING_INDICATOR_REQUEST,r=>{var o;(o=Pt.luigi.getEngine()._connector)==null||o.hideLoadingIndicator(s.parentNode)}),s.addEventListener(O.ADD_BACKDROP_REQUEST,r=>{var o;(o=Pt.luigi.getEngine()._connector)==null||o.addBackdrop()}),s.addEventListener(O.REMOVE_BACKDROP_REQUEST,r=>{var o;(o=Pt.luigi.getEngine()._connector)==null||o.removeBackdrop()}),s.addEventListener(O.SET_DIRTY_STATUS_REQUEST,r=>{var o,u,c;Ie.handleDirtyStatusRequest((u=(o=r.detail)==null?void 0:o.data)==null?void 0:u.dirty,(c=r.detail)==null?void 0:c.source)}),s.addEventListener(O.ADD_NODE_PARAMS_REQUEST,r=>{n.routing().addNodeParams(r.payload.data,r.payload.keepBrowserHistory)}),s.addEventListener(O.OPEN_USER_SETTINGS_REQUEST,r=>{var o;(o=Pt.luigi.getEngine()._connector)==null||o.openUserSettings(r.detail)}),s.addEventListener(O.CLOSE_USER_SETTINGS_REQUEST,r=>{var o;(o=Pt.luigi.getEngine()._connector)==null||o.closeUserSettings()}),s.addEventListener(O.ADD_SEARCH_PARAMS_REQUEST,r=>{uo.addSearchParamsFromClient(r.detail.data,r.detail.keepBrowserHistory,n)}),s.addEventListener(O.UPDATE_MODAL_SETTINGS_REQUEST,r=>{Fe.updateModalSettings(r.payload.updatedModalSettings,r.payload.addHistoryEntry,n)}),s.addEventListener(O.SET_CURRENT_LOCALE_REQUEST,r=>{var o,u,c;n.i18n().setCurrentLocale((c=(u=(o=r.detail)==null?void 0:o.data)==null?void 0:u.data)==null?void 0:c.currentLocale,s)})}};class hl{constructor(){this.dataManagement=new Map}setChildren(n,r){this.dataManagement.set(n,r),this.navPath=""}getChildren(n){return n?this.dataManagement.get(n):{}}hasChildren(n){const r=this.getChildren(n);return!!(r&&Object.prototype.hasOwnProperty.call(r,"children"))}setRootNode(n){this.dataManagement.set("_luigiRootNode",{node:n})}getRootNode(){return this.dataManagement.get("_luigiRootNode")}hasRootNode(){return!!this.getRootNode()}deleteCache(){this.dataManagement.clear()}deleteNodesRecursively(n){if(this.hasChildren(n)){const r=this.getChildren(n).children;for(let o=0;o<r.length;o++)this.deleteNodesRecursively(r[o])}this.dataManagement.delete(n)}}class Yv{constructor(){this._ui=Fe,this._comm=Pt,this._ux=Ie,this._routing=uo}bootstrap(n){this._app=Gv(zv,{target:document.body}),this._connector=n}init(){const n=window.Luigi;se.register(Ri,()=>new Ri),se.register(rn,()=>new rn(n)),se.register(hl,()=>new hl),se.register(_n,()=>new _n(n)),se.register(Gn,()=>new Gn),se.register(mn,()=>new mn(n)),n.theming()._init(),Fe.init(n),uo.init(n),Pt.init(n),Ie.init(n)}}window.Luigi=new lv(new Yv);
34
60
  //# sourceMappingURL=luigi.js.map