@luigi-project/core-modular 0.0.7-dev.202605180111 → 0.0.7-dev.202605190111
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 +18 -18
- package/luigi.js.map +1 -1
- package/package.json +1 -1
- package/services/routing.service.d.ts +10 -0
- package/types/navigation.d.ts +1 -0
package/luigi.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
class Hv{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 cc(i){return i.$value}function ss(i){return new Hv(i)}var Xi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Qr={exports:{}};var Wv=Qr.exports,Vl;function Vv(){return Vl||(Vl=1,(function(i,n){(function(){var r,a="4.18.1",o=200,c="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",f="Invalid `variable` option passed into `_.template`",g="Invalid `imports` option passed into `_.template`",m="__lodash_hash_undefined__",w=500,y="__lodash_placeholder__",E=1,b=2,R=4,x=1,U=2,H=1,re=2,we=4,me=8,qe=16,Le=32,Ze=64,Re=128,Ae=256,Ee=512,Pe=30,D="...",Zt=800,St=16,$e=1,yn=2,N=3,ot=1/0,oe=9007199254740991,We=17976931348623157e292,jt=NaN,Ut=4294967295,jc=Ut-1,eh=Ut>>>1,th=[["ary",Re],["bind",H],["bindKey",re],["curry",me],["curryRight",qe],["flip",Ee],["partial",Le],["partialRight",Ze],["rearg",Ae]],Gn="[object Arguments]",ai="[object Array]",nh="[object AsyncFunction]",yr="[object Boolean]",Tr="[object Date]",rh="[object DOMException]",oi="[object Error]",ui="[object Function]",uo="[object GeneratorFunction]",wt="[object Map]",br="[object Number]",ih="[object Null]",Vt="[object Object]",lo="[object Promise]",sh="[object Proxy]",Rr="[object RegExp]",Et="[object Set]",Ar="[object String]",li="[object Symbol]",ah="[object Undefined]",Pr="[object WeakMap]",oh="[object WeakSet]",Ir="[object ArrayBuffer]",Qn="[object DataView]",ps="[object Float32Array]",ms="[object Float64Array]",_s="[object Int8Array]",vs="[object Int16Array]",Ss="[object Int32Array]",ws="[object Uint8Array]",Es="[object Uint8ClampedArray]",Cs="[object Uint16Array]",ys="[object Uint32Array]",uh=/\b__p \+= '';/g,lh=/\b(__p \+=) '' \+/g,ch=/(__e\(.*?\)|\b__t\)) \+\n'';/g,co=/&(?:amp|lt|gt|quot|#39);/g,ho=/[&<>"']/g,hh=RegExp(co.source),fh=RegExp(ho.source),dh=/<%-([\s\S]+?)%>/g,gh=/<%([\s\S]+?)%>/g,fo=/<%=([\s\S]+?)%>/g,ph=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mh=/^\w*$/,_h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ts=/[\\^$.*+?()[\]{}|]/g,vh=RegExp(Ts.source),bs=/^\s+/,Sh=/\s/,wh=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Eh=/\{\n\/\* \[wrapped with (.+)\] \*/,Ch=/,? & /,yh=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,go=/[()=,{}\[\]\/\s]/,Th=/\\(\\)?/g,bh=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,po=/\w*$/,Rh=/^[-+]0x[0-9a-f]+$/i,Ah=/^0b[01]+$/i,Ph=/^\[object .+?Constructor\]$/,Ih=/^0o[0-7]+$/i,xh=/^(?:0|[1-9]\d*)$/,Lh=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ci=/($^)/,Nh=/['\n\r\u2028\u2029\\]/g,hi="\\ud800-\\udfff",Uh="\\u0300-\\u036f",Oh="\\ufe20-\\ufe2f",$h="\\u20d0-\\u20ff",mo=Uh+Oh+$h,_o="\\u2700-\\u27bf",vo="a-z\\xdf-\\xf6\\xf8-\\xff",Dh="\\xac\\xb1\\xd7\\xf7",Mh="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",kh="\\u2000-\\u206f",Fh=" \\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",So="A-Z\\xc0-\\xd6\\xd8-\\xde",wo="\\ufe0e\\ufe0f",Eo=Dh+Mh+kh+Fh,Rs="['’]",Hh="["+hi+"]",Co="["+Eo+"]",fi="["+mo+"]",yo="\\d+",Wh="["+_o+"]",To="["+vo+"]",bo="[^"+hi+Eo+yo+_o+vo+So+"]",As="\\ud83c[\\udffb-\\udfff]",Vh="(?:"+fi+"|"+As+")",Ro="[^"+hi+"]",Ps="(?:\\ud83c[\\udde6-\\uddff]){2}",Is="[\\ud800-\\udbff][\\udc00-\\udfff]",qn="["+So+"]",Ao="\\u200d",Po="(?:"+To+"|"+bo+")",Bh="(?:"+qn+"|"+bo+")",Io="(?:"+Rs+"(?:d|ll|m|re|s|t|ve))?",xo="(?:"+Rs+"(?:D|LL|M|RE|S|T|VE))?",Lo=Vh+"?",No="["+wo+"]?",Gh="(?:"+Ao+"(?:"+[Ro,Ps,Is].join("|")+")"+No+Lo+")*",Qh="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",qh="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Uo=No+Lo+Gh,zh="(?:"+[Wh,Ps,Is].join("|")+")"+Uo,Kh="(?:"+[Ro+fi+"?",fi,Ps,Is,Hh].join("|")+")",Yh=RegExp(Rs,"g"),Jh=RegExp(fi,"g"),xs=RegExp(As+"(?="+As+")|"+Kh+Uo,"g"),Xh=RegExp([qn+"?"+To+"+"+Io+"(?="+[Co,qn,"$"].join("|")+")",Bh+"+"+xo+"(?="+[Co,qn+Po,"$"].join("|")+")",qn+"?"+Po+"+"+Io,qn+"+"+xo,qh,Qh,yo,zh].join("|"),"g"),Zh=RegExp("["+Ao+hi+mo+wo+"]"),jh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ef=["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"],tf=-1,he={};he[ps]=he[ms]=he[_s]=he[vs]=he[Ss]=he[ws]=he[Es]=he[Cs]=he[ys]=!0,he[Gn]=he[ai]=he[Ir]=he[yr]=he[Qn]=he[Tr]=he[oi]=he[ui]=he[wt]=he[br]=he[Vt]=he[Rr]=he[Et]=he[Ar]=he[Pr]=!1;var ce={};ce[Gn]=ce[ai]=ce[Ir]=ce[Qn]=ce[yr]=ce[Tr]=ce[ps]=ce[ms]=ce[_s]=ce[vs]=ce[Ss]=ce[wt]=ce[br]=ce[Vt]=ce[Rr]=ce[Et]=ce[Ar]=ce[li]=ce[ws]=ce[Es]=ce[Cs]=ce[ys]=!0,ce[oi]=ce[ui]=ce[Pr]=!1;var nf={À:"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"},rf={"&":"&","<":"<",">":">",'"':""","'":"'"},sf={"&":"&","<":"<",">":">",""":'"',"'":"'"},af={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},of=parseFloat,uf=parseInt,Oo=typeof Xi=="object"&&Xi&&Xi.Object===Object&&Xi,lf=typeof self=="object"&&self&&self.Object===Object&&self,Ne=Oo||lf||Function("return this")(),Ls=n&&!n.nodeType&&n,Tn=Ls&&!0&&i&&!i.nodeType&&i,$o=Tn&&Tn.exports===Ls,Ns=$o&&Oo.process,ut=(function(){try{var S=Tn&&Tn.require&&Tn.require("util").types;return S||Ns&&Ns.binding&&Ns.binding("util")}catch{}})(),Do=ut&&ut.isArrayBuffer,Mo=ut&&ut.isDate,ko=ut&&ut.isMap,Fo=ut&&ut.isRegExp,Ho=ut&&ut.isSet,Wo=ut&&ut.isTypedArray;function je(S,A,T){switch(T.length){case 0:return S.call(A);case 1:return S.call(A,T[0]);case 2:return S.call(A,T[0],T[1]);case 3:return S.call(A,T[0],T[1],T[2])}return S.apply(A,T)}function cf(S,A,T,F){for(var z=-1,ie=S==null?0:S.length;++z<ie;){var Te=S[z];A(F,Te,T(Te),S)}return F}function et(S,A){for(var T=-1,F=S==null?0:S.length;++T<F&&A(S[T],T,S)!==!1;);return S}function hf(S,A){for(var T=S==null?0:S.length;T--&&A(S[T],T,S)!==!1;);return S}function Vo(S,A){for(var T=-1,F=S==null?0:S.length;++T<F;)if(!A(S[T],T,S))return!1;return!0}function en(S,A){for(var T=-1,F=S==null?0:S.length,z=0,ie=[];++T<F;){var Te=S[T];A(Te,T,S)&&(ie[z++]=Te)}return ie}function di(S,A){var T=S==null?0:S.length;return!!T&&zn(S,A,0)>-1}function Us(S,A,T){for(var F=-1,z=S==null?0:S.length;++F<z;)if(T(A,S[F]))return!0;return!1}function de(S,A){for(var T=-1,F=S==null?0:S.length,z=Array(F);++T<F;)z[T]=A(S[T],T,S);return z}function tn(S,A){for(var T=-1,F=A.length,z=S.length;++T<F;)S[z+T]=A[T];return S}function Os(S,A,T,F){var z=-1,ie=S==null?0:S.length;for(F&&ie&&(T=S[++z]);++z<ie;)T=A(T,S[z],z,S);return T}function ff(S,A,T,F){var z=S==null?0:S.length;for(F&&z&&(T=S[--z]);z--;)T=A(T,S[z],z,S);return T}function $s(S,A){for(var T=-1,F=S==null?0:S.length;++T<F;)if(A(S[T],T,S))return!0;return!1}var df=Ds("length");function gf(S){return S.split("")}function pf(S){return S.match(yh)||[]}function Bo(S,A,T){var F;return T(S,function(z,ie,Te){if(A(z,ie,Te))return F=ie,!1}),F}function gi(S,A,T,F){for(var z=S.length,ie=T+(F?1:-1);F?ie--:++ie<z;)if(A(S[ie],ie,S))return ie;return-1}function zn(S,A,T){return A===A?Af(S,A,T):gi(S,Go,T)}function mf(S,A,T,F){for(var z=T-1,ie=S.length;++z<ie;)if(F(S[z],A))return z;return-1}function Go(S){return S!==S}function Qo(S,A){var T=S==null?0:S.length;return T?ks(S,A)/T:jt}function Ds(S){return function(A){return A==null?r:A[S]}}function Ms(S){return function(A){return S==null?r:S[A]}}function qo(S,A,T,F,z){return z(S,function(ie,Te,le){T=F?(F=!1,ie):A(T,ie,Te,le)}),T}function _f(S,A){var T=S.length;for(S.sort(A);T--;)S[T]=S[T].value;return S}function ks(S,A){for(var T,F=-1,z=S.length;++F<z;){var ie=A(S[F]);ie!==r&&(T=T===r?ie:T+ie)}return T}function Fs(S,A){for(var T=-1,F=Array(S);++T<S;)F[T]=A(T);return F}function vf(S,A){return de(A,function(T){return[T,S[T]]})}function zo(S){return S&&S.slice(0,Xo(S)+1).replace(bs,"")}function tt(S){return function(A){return S(A)}}function Hs(S,A){return de(A,function(T){return S[T]})}function xr(S,A){return S.has(A)}function Ko(S,A){for(var T=-1,F=S.length;++T<F&&zn(A,S[T],0)>-1;);return T}function Yo(S,A){for(var T=S.length;T--&&zn(A,S[T],0)>-1;);return T}function Sf(S,A){for(var T=S.length,F=0;T--;)S[T]===A&&++F;return F}var wf=Ms(nf),Ef=Ms(rf);function Cf(S){return"\\"+af[S]}function yf(S,A){return S==null?r:S[A]}function Kn(S){return Zh.test(S)}function Tf(S){return jh.test(S)}function bf(S){for(var A,T=[];!(A=S.next()).done;)T.push(A.value);return T}function Ws(S){var A=-1,T=Array(S.size);return S.forEach(function(F,z){T[++A]=[z,F]}),T}function Jo(S,A){return function(T){return S(A(T))}}function nn(S,A){for(var T=-1,F=S.length,z=0,ie=[];++T<F;){var Te=S[T];(Te===A||Te===y)&&(S[T]=y,ie[z++]=T)}return ie}function pi(S){var A=-1,T=Array(S.size);return S.forEach(function(F){T[++A]=F}),T}function Rf(S){var A=-1,T=Array(S.size);return S.forEach(function(F){T[++A]=[F,F]}),T}function Af(S,A,T){for(var F=T-1,z=S.length;++F<z;)if(S[F]===A)return F;return-1}function Pf(S,A,T){for(var F=T+1;F--;)if(S[F]===A)return F;return F}function Yn(S){return Kn(S)?xf(S):df(S)}function Ct(S){return Kn(S)?Lf(S):gf(S)}function Xo(S){for(var A=S.length;A--&&Sh.test(S.charAt(A)););return A}var If=Ms(sf);function xf(S){for(var A=xs.lastIndex=0;xs.test(S);)++A;return A}function Lf(S){return S.match(xs)||[]}function Nf(S){return S.match(Xh)||[]}var Uf=(function S(A){A=A==null?Ne:Jn.defaults(Ne.Object(),A,Jn.pick(Ne,ef));var T=A.Array,F=A.Date,z=A.Error,ie=A.Function,Te=A.Math,le=A.Object,Vs=A.RegExp,Of=A.String,lt=A.TypeError,mi=T.prototype,$f=ie.prototype,Xn=le.prototype,_i=A["__core-js_shared__"],vi=$f.toString,se=Xn.hasOwnProperty,Df=0,Zo=(function(){var e=/[^.]+$/.exec(_i&&_i.keys&&_i.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})(),Si=Xn.toString,Mf=vi.call(le),kf=Ne._,Ff=Vs("^"+vi.call(se).replace(Ts,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wi=$o?A.Buffer:r,rn=A.Symbol,Ei=A.Uint8Array,jo=wi?wi.allocUnsafe:r,Ci=Jo(le.getPrototypeOf,le),eu=le.create,tu=Xn.propertyIsEnumerable,yi=mi.splice,nu=rn?rn.isConcatSpreadable:r,Lr=rn?rn.iterator:r,bn=rn?rn.toStringTag:r,Ti=(function(){try{var e=xn(le,"defineProperty");return e({},"",{}),e}catch{}})(),Hf=A.clearTimeout!==Ne.clearTimeout&&A.clearTimeout,Wf=F&&F.now!==Ne.Date.now&&F.now,Vf=A.setTimeout!==Ne.setTimeout&&A.setTimeout,bi=Te.ceil,Ri=Te.floor,Bs=le.getOwnPropertySymbols,Bf=wi?wi.isBuffer:r,ru=A.isFinite,Gf=mi.join,Qf=Jo(le.keys,le),be=Te.max,De=Te.min,qf=F.now,zf=A.parseInt,iu=Te.random,Kf=mi.reverse,Gs=xn(A,"DataView"),Nr=xn(A,"Map"),Qs=xn(A,"Promise"),Zn=xn(A,"Set"),Ur=xn(A,"WeakMap"),Or=xn(le,"create"),Ai=Ur&&new Ur,jn={},Yf=Ln(Gs),Jf=Ln(Nr),Xf=Ln(Qs),Zf=Ln(Zn),jf=Ln(Ur),Pi=rn?rn.prototype:r,$r=Pi?Pi.valueOf:r,su=Pi?Pi.toString:r;function d(e){if(_e(e)&&!Y(e)&&!(e instanceof te)){if(e instanceof ct)return e;if(se.call(e,"__wrapped__"))return al(e)}return new ct(e)}var er=(function(){function e(){}return function(t){if(!pe(t))return{};if(eu)return eu(t);e.prototype=t;var s=new e;return e.prototype=r,s}})();function Ii(){}function ct(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}d.templateSettings={escape:dh,evaluate:gh,interpolate:fo,variable:"",imports:{_:d}},d.prototype=Ii.prototype,d.prototype.constructor=d,ct.prototype=er(Ii.prototype),ct.prototype.constructor=ct;function te(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ut,this.__views__=[]}function ed(){var e=new te(this.__wrapped__);return e.__actions__=ze(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ze(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ze(this.__views__),e}function td(){if(this.__filtered__){var e=new te(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function nd(){var e=this.__wrapped__.value(),t=this.__dir__,s=Y(e),u=t<0,h=s?e.length:0,p=gg(0,h,this.__views__),_=p.start,v=p.end,C=v-_,P=u?v:_-1,I=this.__iteratees__,L=I.length,k=0,W=De(C,this.__takeCount__);if(!s||!u&&h==C&&W==C)return Iu(e,this.__actions__);var Q=[];e:for(;C--&&k<W;){P+=t;for(var X=-1,V=e[P];++X<L;){var j=I[X],ne=j.iteratee,it=j.type,Ge=ne(V);if(it==yn)V=Ge;else if(!Ge){if(it==$e)continue e;break e}}Q[k++]=V}return Q}te.prototype=er(Ii.prototype),te.prototype.constructor=te;function Rn(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t<s;){var u=e[t];this.set(u[0],u[1])}}function rd(){this.__data__=Or?Or(null):{},this.size=0}function id(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function sd(e){var t=this.__data__;if(Or){var s=t[e];return s===m?r:s}return se.call(t,e)?t[e]:r}function ad(e){var t=this.__data__;return Or?t[e]!==r:se.call(t,e)}function od(e,t){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=Or&&t===r?m:t,this}Rn.prototype.clear=rd,Rn.prototype.delete=id,Rn.prototype.get=sd,Rn.prototype.has=ad,Rn.prototype.set=od;function Bt(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t<s;){var u=e[t];this.set(u[0],u[1])}}function ud(){this.__data__=[],this.size=0}function ld(e){var t=this.__data__,s=xi(t,e);if(s<0)return!1;var u=t.length-1;return s==u?t.pop():yi.call(t,s,1),--this.size,!0}function cd(e){var t=this.__data__,s=xi(t,e);return s<0?r:t[s][1]}function hd(e){return xi(this.__data__,e)>-1}function fd(e,t){var s=this.__data__,u=xi(s,e);return u<0?(++this.size,s.push([e,t])):s[u][1]=t,this}Bt.prototype.clear=ud,Bt.prototype.delete=ld,Bt.prototype.get=cd,Bt.prototype.has=hd,Bt.prototype.set=fd;function Gt(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t<s;){var u=e[t];this.set(u[0],u[1])}}function dd(){this.size=0,this.__data__={hash:new Rn,map:new(Nr||Bt),string:new Rn}}function gd(e){var t=Vi(this,e).delete(e);return this.size-=t?1:0,t}function pd(e){return Vi(this,e).get(e)}function md(e){return Vi(this,e).has(e)}function _d(e,t){var s=Vi(this,e),u=s.size;return s.set(e,t),this.size+=s.size==u?0:1,this}Gt.prototype.clear=dd,Gt.prototype.delete=gd,Gt.prototype.get=pd,Gt.prototype.has=md,Gt.prototype.set=_d;function An(e){var t=-1,s=e==null?0:e.length;for(this.__data__=new Gt;++t<s;)this.add(e[t])}function vd(e){return this.__data__.set(e,m),this}function Sd(e){return this.__data__.has(e)}An.prototype.add=An.prototype.push=vd,An.prototype.has=Sd;function yt(e){var t=this.__data__=new Bt(e);this.size=t.size}function wd(){this.__data__=new Bt,this.size=0}function Ed(e){var t=this.__data__,s=t.delete(e);return this.size=t.size,s}function Cd(e){return this.__data__.get(e)}function yd(e){return this.__data__.has(e)}function Td(e,t){var s=this.__data__;if(s instanceof Bt){var u=s.__data__;if(!Nr||u.length<o-1)return u.push([e,t]),this.size=++s.size,this;s=this.__data__=new Gt(u)}return s.set(e,t),this.size=s.size,this}yt.prototype.clear=wd,yt.prototype.delete=Ed,yt.prototype.get=Cd,yt.prototype.has=yd,yt.prototype.set=Td;function au(e,t){var s=Y(e),u=!s&&Nn(e),h=!s&&!u&&ln(e),p=!s&&!u&&!h&&ir(e),_=s||u||h||p,v=_?Fs(e.length,Of):[],C=v.length;for(var P in e)(t||se.call(e,P))&&!(_&&(P=="length"||h&&(P=="offset"||P=="parent")||p&&(P=="buffer"||P=="byteLength"||P=="byteOffset")||zt(P,C)))&&v.push(P);return v}function ou(e){var t=e.length;return t?e[na(0,t-1)]:r}function bd(e,t){return Bi(ze(e),Pn(t,0,e.length))}function Rd(e){return Bi(ze(e))}function qs(e,t,s){(s!==r&&!bt(e[t],s)||s===r&&!(t in e))&&Ot(e,t,s)}function Dr(e,t,s){var u=e[t];(!(se.call(e,t)&&bt(u,s))||s===r&&!(t in e))&&Ot(e,t,s)}function xi(e,t){for(var s=e.length;s--;)if(bt(e[s][0],t))return s;return-1}function Ad(e,t,s,u){return sn(e,function(h,p,_){t(u,h,s(h),_)}),u}function uu(e,t){return e&&Dt(t,Ie(t),e)}function Pd(e,t){return e&&Dt(t,Ye(t),e)}function Ot(e,t,s){t=="__proto__"&&Ti?Ti(e,t,{configurable:!0,enumerable:!0,value:s,writable:!0}):e[t]=s}function zs(e,t){for(var s=-1,u=t.length,h=T(u),p=e==null;++s<u;)h[s]=p?r:Pa(e,t[s]);return h}function Pn(e,t,s){return e===e&&(s!==r&&(e=e<=s?e:s),t!==r&&(e=e>=t?e:t)),e}function ht(e,t,s,u,h,p){var _,v=t&E,C=t&b,P=t&R;if(s&&(_=h?s(e,u,h,p):s(e)),_!==r)return _;if(!pe(e))return e;var I=Y(e);if(I){if(_=mg(e),!v)return ze(e,_)}else{var L=Me(e),k=L==ui||L==uo;if(ln(e))return Nu(e,v);if(L==Vt||L==Gn||k&&!h){if(_=C||k?{}:Xu(e),!v)return C?sg(e,Pd(_,e)):ig(e,uu(_,e))}else{if(!ce[L])return h?e:{};_=_g(e,L,v)}}p||(p=new yt);var W=p.get(e);if(W)return W;p.set(e,_),Rl(e)?e.forEach(function(V){_.add(ht(V,t,s,V,e,p))}):Tl(e)&&e.forEach(function(V,j){_.set(j,ht(V,t,s,j,e,p))});var Q=P?C?da:fa:C?Ye:Ie,X=I?r:Q(e);return et(X||e,function(V,j){X&&(j=V,V=e[j]),Dr(_,j,ht(V,t,s,j,e,p))}),_}function Id(e){var t=Ie(e);return function(s){return lu(s,e,t)}}function lu(e,t,s){var u=s.length;if(e==null)return!u;for(e=le(e);u--;){var h=s[u],p=t[h],_=e[h];if(_===r&&!(h in e)||!p(_))return!1}return!0}function cu(e,t,s){if(typeof e!="function")throw new lt(l);return Br(function(){e.apply(r,s)},t)}function Mr(e,t,s,u){var h=-1,p=di,_=!0,v=e.length,C=[],P=t.length;if(!v)return C;s&&(t=de(t,tt(s))),u?(p=Us,_=!1):t.length>=o&&(p=xr,_=!1,t=new An(t));e:for(;++h<v;){var I=e[h],L=s==null?I:s(I);if(I=u||I!==0?I:0,_&&L===L){for(var k=P;k--;)if(t[k]===L)continue e;C.push(I)}else p(t,L,u)||C.push(I)}return C}var sn=Mu($t),hu=Mu(Ys,!0);function xd(e,t){var s=!0;return sn(e,function(u,h,p){return s=!!t(u,h,p),s}),s}function Li(e,t,s){for(var u=-1,h=e.length;++u<h;){var p=e[u],_=t(p);if(_!=null&&(v===r?_===_&&!rt(_):s(_,v)))var v=_,C=p}return C}function Ld(e,t,s,u){var h=e.length;for(s=J(s),s<0&&(s=-s>h?0:h+s),u=u===r||u>h?h:J(u),u<0&&(u+=h),u=s>u?0:Pl(u);s<u;)e[s++]=t;return e}function fu(e,t){var s=[];return sn(e,function(u,h,p){t(u,h,p)&&s.push(u)}),s}function Ue(e,t,s,u,h){var p=-1,_=e.length;for(s||(s=Sg),h||(h=[]);++p<_;){var v=e[p];t>0&&s(v)?t>1?Ue(v,t-1,s,u,h):tn(h,v):u||(h[h.length]=v)}return h}var Ks=ku(),du=ku(!0);function $t(e,t){return e&&Ks(e,t,Ie)}function Ys(e,t){return e&&du(e,t,Ie)}function Ni(e,t){return en(t,function(s){return Kt(e[s])})}function In(e,t){t=on(t,e);for(var s=0,u=t.length;e!=null&&s<u;)e=e[Tt(t[s++])];return s&&s==u?e:r}function gu(e,t,s){var u=t(e);return Y(e)?u:tn(u,s(e))}function Ve(e){return e==null?e===r?ah:ih:bn&&bn in le(e)?dg(e):Rg(e)}function Js(e,t){return e>t}function Nd(e,t){return e!=null&&se.call(e,t)}function Ud(e,t){return e!=null&&t in le(e)}function Od(e,t,s){return e>=De(t,s)&&e<be(t,s)}function Xs(e,t,s){for(var u=s?Us:di,h=e[0].length,p=e.length,_=p,v=T(p),C=1/0,P=[];_--;){var I=e[_];_&&t&&(I=de(I,tt(t))),C=De(I.length,C),v[_]=!s&&(t||h>=120&&I.length>=120)?new An(_&&I):r}I=e[0];var L=-1,k=v[0];e:for(;++L<h&&P.length<C;){var W=I[L],Q=t?t(W):W;if(W=s||W!==0?W:0,!(k?xr(k,Q):u(P,Q,s))){for(_=p;--_;){var X=v[_];if(!(X?xr(X,Q):u(e[_],Q,s)))continue e}k&&k.push(Q),P.push(W)}}return P}function $d(e,t,s,u){return $t(e,function(h,p,_){t(u,s(h),p,_)}),u}function kr(e,t,s){t=on(t,e),e=tl(e,t);var u=e==null?e:e[Tt(dt(t))];return u==null?r:je(u,e,s)}function pu(e){return _e(e)&&Ve(e)==Gn}function Dd(e){return _e(e)&&Ve(e)==Ir}function Md(e){return _e(e)&&Ve(e)==Tr}function Fr(e,t,s,u,h){return e===t?!0:e==null||t==null||!_e(e)&&!_e(t)?e!==e&&t!==t:kd(e,t,s,u,Fr,h)}function kd(e,t,s,u,h,p){var _=Y(e),v=Y(t),C=_?ai:Me(e),P=v?ai:Me(t);C=C==Gn?Vt:C,P=P==Gn?Vt:P;var I=C==Vt,L=P==Vt,k=C==P;if(k&&ln(e)){if(!ln(t))return!1;_=!0,I=!1}if(k&&!I)return p||(p=new yt),_||ir(e)?Ku(e,t,s,u,h,p):hg(e,t,C,s,u,h,p);if(!(s&x)){var W=I&&se.call(e,"__wrapped__"),Q=L&&se.call(t,"__wrapped__");if(W||Q){var X=W?e.value():e,V=Q?t.value():t;return p||(p=new yt),h(X,V,s,u,p)}}return k?(p||(p=new yt),fg(e,t,s,u,h,p)):!1}function Fd(e){return _e(e)&&Me(e)==wt}function Zs(e,t,s,u){var h=s.length,p=h,_=!u;if(e==null)return!p;for(e=le(e);h--;){var v=s[h];if(_&&v[2]?v[1]!==e[v[0]]:!(v[0]in e))return!1}for(;++h<p;){v=s[h];var C=v[0],P=e[C],I=v[1];if(_&&v[2]){if(P===r&&!(C in e))return!1}else{var L=new yt;if(u)var k=u(P,I,C,e,t,L);if(!(k===r?Fr(I,P,x|U,u,L):k))return!1}}return!0}function mu(e){if(!pe(e)||Eg(e))return!1;var t=Kt(e)?Ff:Ph;return t.test(Ln(e))}function Hd(e){return _e(e)&&Ve(e)==Rr}function Wd(e){return _e(e)&&Me(e)==Et}function Vd(e){return _e(e)&&Yi(e.length)&&!!he[Ve(e)]}function _u(e){return typeof e=="function"?e:e==null?Je:typeof e=="object"?Y(e)?wu(e[0],e[1]):Su(e):Hl(e)}function js(e){if(!Vr(e))return Qf(e);var t=[];for(var s in le(e))se.call(e,s)&&s!="constructor"&&t.push(s);return t}function Bd(e){if(!pe(e))return bg(e);var t=Vr(e),s=[];for(var u in e)u=="constructor"&&(t||!se.call(e,u))||s.push(u);return s}function ea(e,t){return e<t}function vu(e,t){var s=-1,u=Ke(e)?T(e.length):[];return sn(e,function(h,p,_){u[++s]=t(h,p,_)}),u}function Su(e){var t=pa(e);return t.length==1&&t[0][2]?ju(t[0][0],t[0][1]):function(s){return s===e||Zs(s,e,t)}}function wu(e,t){return _a(e)&&Zu(t)?ju(Tt(e),t):function(s){var u=Pa(s,e);return u===r&&u===t?Ia(s,e):Fr(t,u,x|U)}}function Ui(e,t,s,u,h){e!==t&&Ks(t,function(p,_){if(h||(h=new yt),pe(p))Gd(e,t,_,s,Ui,u,h);else{var v=u?u(Sa(e,_),p,_+"",e,t,h):r;v===r&&(v=p),qs(e,_,v)}},Ye)}function Gd(e,t,s,u,h,p,_){var v=Sa(e,s),C=Sa(t,s),P=_.get(C);if(P){qs(e,s,P);return}var I=p?p(v,C,s+"",e,t,_):r,L=I===r;if(L){var k=Y(C),W=!k&&ln(C),Q=!k&&!W&&ir(C);I=C,k||W||Q?Y(v)?I=v:ve(v)?I=ze(v):W?(L=!1,I=Nu(C,!0)):Q?(L=!1,I=Uu(C,!0)):I=[]:Gr(C)||Nn(C)?(I=v,Nn(v)?I=Il(v):(!pe(v)||Kt(v))&&(I=Xu(C))):L=!1}L&&(_.set(C,I),h(I,C,u,p,_),_.delete(C)),qs(e,s,I)}function Eu(e,t){var s=e.length;if(s)return t+=t<0?s:0,zt(t,s)?e[t]:r}function Cu(e,t,s){t.length?t=de(t,function(p){return Y(p)?function(_){return In(_,p.length===1?p[0]:p)}:p}):t=[Je];var u=-1;t=de(t,tt(B()));var h=vu(e,function(p,_,v){var C=de(t,function(P){return P(p)});return{criteria:C,index:++u,value:p}});return _f(h,function(p,_){return rg(p,_,s)})}function Qd(e,t){return yu(e,t,function(s,u){return Ia(e,u)})}function yu(e,t,s){for(var u=-1,h=t.length,p={};++u<h;){var _=t[u],v=In(e,_);s(v,_)&&Hr(p,on(_,e),v)}return p}function qd(e){return function(t){return In(t,e)}}function ta(e,t,s,u){var h=u?mf:zn,p=-1,_=t.length,v=e;for(e===t&&(t=ze(t)),s&&(v=de(e,tt(s)));++p<_;)for(var C=0,P=t[p],I=s?s(P):P;(C=h(v,I,C,u))>-1;)v!==e&&yi.call(v,C,1),yi.call(e,C,1);return e}function Tu(e,t){for(var s=e?t.length:0,u=s-1;s--;){var h=t[s];if(s==u||h!==p){var p=h;zt(h)?yi.call(e,h,1):sa(e,h)}}return e}function na(e,t){return e+Ri(iu()*(t-e+1))}function zd(e,t,s,u){for(var h=-1,p=be(bi((t-e)/(s||1)),0),_=T(p);p--;)_[u?p:++h]=e,e+=s;return _}function ra(e,t){var s="";if(!e||t<1||t>oe)return s;do t%2&&(s+=e),t=Ri(t/2),t&&(e+=e);while(t);return s}function Z(e,t){return wa(el(e,t,Je),e+"")}function Kd(e){return ou(sr(e))}function Yd(e,t){var s=sr(e);return Bi(s,Pn(t,0,s.length))}function Hr(e,t,s,u){if(!pe(e))return e;t=on(t,e);for(var h=-1,p=t.length,_=p-1,v=e;v!=null&&++h<p;){var C=Tt(t[h]),P=s;if(C==="__proto__"||C==="constructor"||C==="prototype")return e;if(h!=_){var I=v[C];P=u?u(I,C,v):r,P===r&&(P=pe(I)?I:zt(t[h+1])?[]:{})}Dr(v,C,P),v=v[C]}return e}var bu=Ai?function(e,t){return Ai.set(e,t),e}:Je,Jd=Ti?function(e,t){return Ti(e,"toString",{configurable:!0,enumerable:!1,value:La(t),writable:!0})}:Je;function Xd(e){return Bi(sr(e))}function ft(e,t,s){var u=-1,h=e.length;t<0&&(t=-t>h?0:h+t),s=s>h?h:s,s<0&&(s+=h),h=t>s?0:s-t>>>0,t>>>=0;for(var p=T(h);++u<h;)p[u]=e[u+t];return p}function Zd(e,t){var s;return sn(e,function(u,h,p){return s=t(u,h,p),!s}),!!s}function Oi(e,t,s){var u=0,h=e==null?u:e.length;if(typeof t=="number"&&t===t&&h<=eh){for(;u<h;){var p=u+h>>>1,_=e[p];_!==null&&!rt(_)&&(s?_<=t:_<t)?u=p+1:h=p}return h}return ia(e,t,Je,s)}function ia(e,t,s,u){var h=0,p=e==null?0:e.length;if(p===0)return 0;t=s(t);for(var _=t!==t,v=t===null,C=rt(t),P=t===r;h<p;){var I=Ri((h+p)/2),L=s(e[I]),k=L!==r,W=L===null,Q=L===L,X=rt(L);if(_)var V=u||Q;else P?V=Q&&(u||k):v?V=Q&&k&&(u||!W):C?V=Q&&k&&!W&&(u||!X):W||X?V=!1:V=u?L<=t:L<t;V?h=I+1:p=I}return De(p,jc)}function Ru(e,t){for(var s=-1,u=e.length,h=0,p=[];++s<u;){var _=e[s],v=t?t(_):_;if(!s||!bt(v,C)){var C=v;p[h++]=_===0?0:_}}return p}function Au(e){return typeof e=="number"?e:rt(e)?jt:+e}function nt(e){if(typeof e=="string")return e;if(Y(e))return de(e,nt)+"";if(rt(e))return su?su.call(e):"";var t=e+"";return t=="0"&&1/e==-ot?"-0":t}function an(e,t,s){var u=-1,h=di,p=e.length,_=!0,v=[],C=v;if(s)_=!1,h=Us;else if(p>=o){var P=t?null:lg(e);if(P)return pi(P);_=!1,h=xr,C=new An}else C=t?[]:v;e:for(;++u<p;){var I=e[u],L=t?t(I):I;if(I=s||I!==0?I:0,_&&L===L){for(var k=C.length;k--;)if(C[k]===L)continue e;t&&C.push(L),v.push(I)}else h(C,L,s)||(C!==v&&C.push(L),v.push(I))}return v}function sa(e,t){t=on(t,e);var s=-1,u=t.length;if(!u)return!0;for(;++s<u;){var h=Tt(t[s]);if(h==="__proto__"&&!se.call(e,"__proto__")||(h==="constructor"||h==="prototype")&&s<u-1)return!1}var p=tl(e,t);return p==null||delete p[Tt(dt(t))]}function Pu(e,t,s,u){return Hr(e,t,s(In(e,t)),u)}function $i(e,t,s,u){for(var h=e.length,p=u?h:-1;(u?p--:++p<h)&&t(e[p],p,e););return s?ft(e,u?0:p,u?p+1:h):ft(e,u?p+1:0,u?h:p)}function Iu(e,t){var s=e;return s instanceof te&&(s=s.value()),Os(t,function(u,h){return h.func.apply(h.thisArg,tn([u],h.args))},s)}function aa(e,t,s){var u=e.length;if(u<2)return u?an(e[0]):[];for(var h=-1,p=T(u);++h<u;)for(var _=e[h],v=-1;++v<u;)v!=h&&(p[h]=Mr(p[h]||_,e[v],t,s));return an(Ue(p,1),t,s)}function xu(e,t,s){for(var u=-1,h=e.length,p=t.length,_={};++u<h;){var v=u<p?t[u]:r;s(_,e[u],v)}return _}function oa(e){return ve(e)?e:[]}function ua(e){return typeof e=="function"?e:Je}function on(e,t){return Y(e)?e:_a(e,t)?[e]:sl(ae(e))}var jd=Z;function un(e,t,s){var u=e.length;return s=s===r?u:s,!t&&s>=u?e:ft(e,t,s)}var Lu=Hf||function(e){return Ne.clearTimeout(e)};function Nu(e,t){if(t)return e.slice();var s=e.length,u=jo?jo(s):new e.constructor(s);return e.copy(u),u}function la(e){var t=new e.constructor(e.byteLength);return new Ei(t).set(new Ei(e)),t}function eg(e,t){var s=t?la(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.byteLength)}function tg(e){var t=new e.constructor(e.source,po.exec(e));return t.lastIndex=e.lastIndex,t}function ng(e){return $r?le($r.call(e)):{}}function Uu(e,t){var s=t?la(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)}function Ou(e,t){if(e!==t){var s=e!==r,u=e===null,h=e===e,p=rt(e),_=t!==r,v=t===null,C=t===t,P=rt(t);if(!v&&!P&&!p&&e>t||p&&_&&C&&!v&&!P||u&&_&&C||!s&&C||!h)return 1;if(!u&&!p&&!P&&e<t||P&&s&&h&&!u&&!p||v&&s&&h||!_&&h||!C)return-1}return 0}function rg(e,t,s){for(var u=-1,h=e.criteria,p=t.criteria,_=h.length,v=s.length;++u<_;){var C=Ou(h[u],p[u]);if(C){if(u>=v)return C;var P=s[u];return C*(P=="desc"?-1:1)}}return e.index-t.index}function $u(e,t,s,u){for(var h=-1,p=e.length,_=s.length,v=-1,C=t.length,P=be(p-_,0),I=T(C+P),L=!u;++v<C;)I[v]=t[v];for(;++h<_;)(L||h<p)&&(I[s[h]]=e[h]);for(;P--;)I[v++]=e[h++];return I}function Du(e,t,s,u){for(var h=-1,p=e.length,_=-1,v=s.length,C=-1,P=t.length,I=be(p-v,0),L=T(I+P),k=!u;++h<I;)L[h]=e[h];for(var W=h;++C<P;)L[W+C]=t[C];for(;++_<v;)(k||h<p)&&(L[W+s[_]]=e[h++]);return L}function ze(e,t){var s=-1,u=e.length;for(t||(t=T(u));++s<u;)t[s]=e[s];return t}function Dt(e,t,s,u){var h=!s;s||(s={});for(var p=-1,_=t.length;++p<_;){var v=t[p],C=u?u(s[v],e[v],v,s,e):r;C===r&&(C=e[v]),h?Ot(s,v,C):Dr(s,v,C)}return s}function ig(e,t){return Dt(e,ma(e),t)}function sg(e,t){return Dt(e,Yu(e),t)}function Di(e,t){return function(s,u){var h=Y(s)?cf:Ad,p=t?t():{};return h(s,e,B(u,2),p)}}function tr(e){return Z(function(t,s){var u=-1,h=s.length,p=h>1?s[h-1]:r,_=h>2?s[2]:r;for(p=e.length>3&&typeof p=="function"?(h--,p):r,_&&Be(s[0],s[1],_)&&(p=h<3?r:p,h=1),t=le(t);++u<h;){var v=s[u];v&&e(t,v,u,p)}return t})}function Mu(e,t){return function(s,u){if(s==null)return s;if(!Ke(s))return e(s,u);for(var h=s.length,p=t?h:-1,_=le(s);(t?p--:++p<h)&&u(_[p],p,_)!==!1;);return s}}function ku(e){return function(t,s,u){for(var h=-1,p=le(t),_=u(t),v=_.length;v--;){var C=_[e?v:++h];if(s(p[C],C,p)===!1)break}return t}}function ag(e,t,s){var u=t&H,h=Wr(e);function p(){var _=this&&this!==Ne&&this instanceof p?h:e;return _.apply(u?s:this,arguments)}return p}function Fu(e){return function(t){t=ae(t);var s=Kn(t)?Ct(t):r,u=s?s[0]:t.charAt(0),h=s?un(s,1).join(""):t.slice(1);return u[e]()+h}}function nr(e){return function(t){return Os(kl(Ml(t).replace(Yh,"")),e,"")}}function Wr(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 s=er(e.prototype),u=e.apply(s,t);return pe(u)?u:s}}function og(e,t,s){var u=Wr(e);function h(){for(var p=arguments.length,_=T(p),v=p,C=rr(h);v--;)_[v]=arguments[v];var P=p<3&&_[0]!==C&&_[p-1]!==C?[]:nn(_,C);if(p-=P.length,p<s)return Gu(e,t,Mi,h.placeholder,r,_,P,r,r,s-p);var I=this&&this!==Ne&&this instanceof h?u:e;return je(I,this,_)}return h}function Hu(e){return function(t,s,u){var h=le(t);if(!Ke(t)){var p=B(s,3);t=Ie(t),s=function(v){return p(h[v],v,h)}}var _=e(t,s,u);return _>-1?h[p?t[_]:_]:r}}function Wu(e){return qt(function(t){var s=t.length,u=s,h=ct.prototype.thru;for(e&&t.reverse();u--;){var p=t[u];if(typeof p!="function")throw new lt(l);if(h&&!_&&Wi(p)=="wrapper")var _=new ct([],!0)}for(u=_?u:s;++u<s;){p=t[u];var v=Wi(p),C=v=="wrapper"?ga(p):r;C&&va(C[0])&&C[1]==(Re|me|Le|Ae)&&!C[4].length&&C[9]==1?_=_[Wi(C[0])].apply(_,C[3]):_=p.length==1&&va(p)?_[v]():_.thru(p)}return function(){var P=arguments,I=P[0];if(_&&P.length==1&&Y(I))return _.plant(I).value();for(var L=0,k=s?t[L].apply(this,P):I;++L<s;)k=t[L].call(this,k);return k}})}function Mi(e,t,s,u,h,p,_,v,C,P){var I=t&Re,L=t&H,k=t&re,W=t&(me|qe),Q=t&Ee,X=k?r:Wr(e);function V(){for(var j=arguments.length,ne=T(j),it=j;it--;)ne[it]=arguments[it];if(W)var Ge=rr(V),st=Sf(ne,Ge);if(u&&(ne=$u(ne,u,h,W)),p&&(ne=Du(ne,p,_,W)),j-=st,W&&j<P){var Se=nn(ne,Ge);return Gu(e,t,Mi,V.placeholder,s,ne,Se,v,C,P-j)}var Rt=L?s:this,Jt=k?Rt[e]:e;return j=ne.length,v?ne=Ag(ne,v):Q&&j>1&&ne.reverse(),I&&C<j&&(ne.length=C),this&&this!==Ne&&this instanceof V&&(Jt=X||Wr(Jt)),Jt.apply(Rt,ne)}return V}function Vu(e,t){return function(s,u){return $d(s,e,t(u),{})}}function ki(e,t){return function(s,u){var h;if(s===r&&u===r)return t;if(s!==r&&(h=s),u!==r){if(h===r)return u;typeof s=="string"||typeof u=="string"?(s=nt(s),u=nt(u)):(s=Au(s),u=Au(u)),h=e(s,u)}return h}}function ca(e){return qt(function(t){return t=de(t,tt(B())),Z(function(s){var u=this;return e(t,function(h){return je(h,u,s)})})})}function Fi(e,t){t=t===r?" ":nt(t);var s=t.length;if(s<2)return s?ra(t,e):t;var u=ra(t,bi(e/Yn(t)));return Kn(t)?un(Ct(u),0,e).join(""):u.slice(0,e)}function ug(e,t,s,u){var h=t&H,p=Wr(e);function _(){for(var v=-1,C=arguments.length,P=-1,I=u.length,L=T(I+C),k=this&&this!==Ne&&this instanceof _?p:e;++P<I;)L[P]=u[P];for(;C--;)L[P++]=arguments[++v];return je(k,h?s:this,L)}return _}function Bu(e){return function(t,s,u){return u&&typeof u!="number"&&Be(t,s,u)&&(s=u=r),t=Yt(t),s===r?(s=t,t=0):s=Yt(s),u=u===r?t<s?1:-1:Yt(u),zd(t,s,u,e)}}function Hi(e){return function(t,s){return typeof t=="string"&&typeof s=="string"||(t=gt(t),s=gt(s)),e(t,s)}}function Gu(e,t,s,u,h,p,_,v,C,P){var I=t&me,L=I?_:r,k=I?r:_,W=I?p:r,Q=I?r:p;t|=I?Le:Ze,t&=~(I?Ze:Le),t&we||(t&=-4);var X=[e,t,h,W,L,Q,k,v,C,P],V=s.apply(r,X);return va(e)&&nl(V,X),V.placeholder=u,rl(V,e,t)}function ha(e){var t=Te[e];return function(s,u){if(s=gt(s),u=u==null?0:De(J(u),292),u&&ru(s)){var h=(ae(s)+"e").split("e"),p=t(h[0]+"e"+(+h[1]+u));return h=(ae(p)+"e").split("e"),+(h[0]+"e"+(+h[1]-u))}return t(s)}}var lg=Zn&&1/pi(new Zn([,-0]))[1]==ot?function(e){return new Zn(e)}:Oa;function Qu(e){return function(t){var s=Me(t);return s==wt?Ws(t):s==Et?Rf(t):vf(t,e(t))}}function Qt(e,t,s,u,h,p,_,v){var C=t&re;if(!C&&typeof e!="function")throw new lt(l);var P=u?u.length:0;if(P||(t&=-97,u=h=r),_=_===r?_:be(J(_),0),v=v===r?v:J(v),P-=h?h.length:0,t&Ze){var I=u,L=h;u=h=r}var k=C?r:ga(e),W=[e,t,s,u,h,I,L,p,_,v];if(k&&Tg(W,k),e=W[0],t=W[1],s=W[2],u=W[3],h=W[4],v=W[9]=W[9]===r?C?0:e.length:be(W[9]-P,0),!v&&t&(me|qe)&&(t&=-25),!t||t==H)var Q=ag(e,t,s);else t==me||t==qe?Q=og(e,t,v):(t==Le||t==(H|Le))&&!h.length?Q=ug(e,t,s,u):Q=Mi.apply(r,W);var X=k?bu:nl;return rl(X(Q,W),e,t)}function qu(e,t,s,u){return e===r||bt(e,Xn[s])&&!se.call(u,s)?t:e}function zu(e,t,s,u,h,p){return pe(e)&&pe(t)&&(p.set(t,e),Ui(e,t,r,zu,p),p.delete(t)),e}function cg(e){return Gr(e)?r:e}function Ku(e,t,s,u,h,p){var _=s&x,v=e.length,C=t.length;if(v!=C&&!(_&&C>v))return!1;var P=p.get(e),I=p.get(t);if(P&&I)return P==t&&I==e;var L=-1,k=!0,W=s&U?new An:r;for(p.set(e,t),p.set(t,e);++L<v;){var Q=e[L],X=t[L];if(u)var V=_?u(X,Q,L,t,e,p):u(Q,X,L,e,t,p);if(V!==r){if(V)continue;k=!1;break}if(W){if(!$s(t,function(j,ne){if(!xr(W,ne)&&(Q===j||h(Q,j,s,u,p)))return W.push(ne)})){k=!1;break}}else if(!(Q===X||h(Q,X,s,u,p))){k=!1;break}}return p.delete(e),p.delete(t),k}function hg(e,t,s,u,h,p,_){switch(s){case Qn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ir:return!(e.byteLength!=t.byteLength||!p(new Ei(e),new Ei(t)));case yr:case Tr:case br:return bt(+e,+t);case oi:return e.name==t.name&&e.message==t.message;case Rr:case Ar:return e==t+"";case wt:var v=Ws;case Et:var C=u&x;if(v||(v=pi),e.size!=t.size&&!C)return!1;var P=_.get(e);if(P)return P==t;u|=U,_.set(e,t);var I=Ku(v(e),v(t),u,h,p,_);return _.delete(e),I;case li:if($r)return $r.call(e)==$r.call(t)}return!1}function fg(e,t,s,u,h,p){var _=s&x,v=fa(e),C=v.length,P=fa(t),I=P.length;if(C!=I&&!_)return!1;for(var L=C;L--;){var k=v[L];if(!(_?k in t:se.call(t,k)))return!1}var W=p.get(e),Q=p.get(t);if(W&&Q)return W==t&&Q==e;var X=!0;p.set(e,t),p.set(t,e);for(var V=_;++L<C;){k=v[L];var j=e[k],ne=t[k];if(u)var it=_?u(ne,j,k,t,e,p):u(j,ne,k,e,t,p);if(!(it===r?j===ne||h(j,ne,s,u,p):it)){X=!1;break}V||(V=k=="constructor")}if(X&&!V){var Ge=e.constructor,st=t.constructor;Ge!=st&&"constructor"in e&&"constructor"in t&&!(typeof Ge=="function"&&Ge instanceof Ge&&typeof st=="function"&&st instanceof st)&&(X=!1)}return p.delete(e),p.delete(t),X}function qt(e){return wa(el(e,r,ll),e+"")}function fa(e){return gu(e,Ie,ma)}function da(e){return gu(e,Ye,Yu)}var ga=Ai?function(e){return Ai.get(e)}:Oa;function Wi(e){for(var t=e.name+"",s=jn[t],u=se.call(jn,t)?s.length:0;u--;){var h=s[u],p=h.func;if(p==null||p==e)return h.name}return t}function rr(e){var t=se.call(d,"placeholder")?d:e;return t.placeholder}function B(){var e=d.iteratee||Na;return e=e===Na?_u:e,arguments.length?e(arguments[0],arguments[1]):e}function Vi(e,t){var s=e.__data__;return wg(t)?s[typeof t=="string"?"string":"hash"]:s.map}function pa(e){for(var t=Ie(e),s=t.length;s--;){var u=t[s],h=e[u];t[s]=[u,h,Zu(h)]}return t}function xn(e,t){var s=yf(e,t);return mu(s)?s:r}function dg(e){var t=se.call(e,bn),s=e[bn];try{e[bn]=r;var u=!0}catch{}var h=Si.call(e);return u&&(t?e[bn]=s:delete e[bn]),h}var ma=Bs?function(e){return e==null?[]:(e=le(e),en(Bs(e),function(t){return tu.call(e,t)}))}:$a,Yu=Bs?function(e){for(var t=[];e;)tn(t,ma(e)),e=Ci(e);return t}:$a,Me=Ve;(Gs&&Me(new Gs(new ArrayBuffer(1)))!=Qn||Nr&&Me(new Nr)!=wt||Qs&&Me(Qs.resolve())!=lo||Zn&&Me(new Zn)!=Et||Ur&&Me(new Ur)!=Pr)&&(Me=function(e){var t=Ve(e),s=t==Vt?e.constructor:r,u=s?Ln(s):"";if(u)switch(u){case Yf:return Qn;case Jf:return wt;case Xf:return lo;case Zf:return Et;case jf:return Pr}return t});function gg(e,t,s){for(var u=-1,h=s.length;++u<h;){var p=s[u],_=p.size;switch(p.type){case"drop":e+=_;break;case"dropRight":t-=_;break;case"take":t=De(t,e+_);break;case"takeRight":e=be(e,t-_);break}}return{start:e,end:t}}function pg(e){var t=e.match(Eh);return t?t[1].split(Ch):[]}function Ju(e,t,s){t=on(t,e);for(var u=-1,h=t.length,p=!1;++u<h;){var _=Tt(t[u]);if(!(p=e!=null&&s(e,_)))break;e=e[_]}return p||++u!=h?p:(h=e==null?0:e.length,!!h&&Yi(h)&&zt(_,h)&&(Y(e)||Nn(e)))}function mg(e){var t=e.length,s=new e.constructor(t);return t&&typeof e[0]=="string"&&se.call(e,"index")&&(s.index=e.index,s.input=e.input),s}function Xu(e){return typeof e.constructor=="function"&&!Vr(e)?er(Ci(e)):{}}function _g(e,t,s){var u=e.constructor;switch(t){case Ir:return la(e);case yr:case Tr:return new u(+e);case Qn:return eg(e,s);case ps:case ms:case _s:case vs:case Ss:case ws:case Es:case Cs:case ys:return Uu(e,s);case wt:return new u;case br:case Ar:return new u(e);case Rr:return tg(e);case Et:return new u;case li:return ng(e)}}function vg(e,t){var s=t.length;if(!s)return e;var u=s-1;return t[u]=(s>1?"& ":"")+t[u],t=t.join(s>2?", ":" "),e.replace(wh,`{
|
|
2
|
-
/* [wrapped with `+
|
|
3
|
-
`)}function Sg(e){return Y(e)||Nn(e)||!!(nu&&e&&e[nu])}function zt(e,t){var s=typeof e;return t=t??oe,!!t&&(s=="number"||s!="symbol"&&xh.test(e))&&e>-1&&e%1==0&&e<t}function Be(e,t,s){if(!pe(s))return!1;var u=typeof t;return(u=="number"?Ke(s)&&zt(t,s.length):u=="string"&&t in s)?bt(s[t],e):!1}function _a(e,t){if(Y(e))return!1;var s=typeof e;return s=="number"||s=="symbol"||s=="boolean"||e==null||rt(e)?!0:mh.test(e)||!ph.test(e)||t!=null&&e in le(t)}function wg(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function va(e){var t=Wi(e),s=d[t];if(typeof s!="function"||!(t in te.prototype))return!1;if(e===s)return!0;var u=ga(s);return!!u&&e===u[0]}function Eg(e){return!!Zo&&Zo in e}var Cg=_i?Kt:Da;function Vr(e){var t=e&&e.constructor,s=typeof t=="function"&&t.prototype||Xn;return e===s}function Zu(e){return e===e&&!pe(e)}function ju(e,t){return function(s){return s==null?!1:s[e]===t&&(t!==r||e in le(s))}}function yg(e){var t=zi(e,function(u){return s.size===w&&s.clear(),u}),s=t.cache;return t}function Tg(e,t){var s=e[1],u=t[1],h=s|u,p=h<(H|re|Re),_=u==Re&&s==me||u==Re&&s==Ae&&e[7].length<=t[8]||u==(Re|Ae)&&t[7].length<=t[8]&&s==me;if(!(p||_))return e;u&H&&(e[2]=t[2],h|=s&H?0:we);var v=t[3];if(v){var C=e[3];e[3]=C?$u(C,v,t[4]):v,e[4]=C?nn(e[3],y):t[4]}return v=t[5],v&&(C=e[5],e[5]=C?Du(C,v,t[6]):v,e[6]=C?nn(e[5],y):t[6]),v=t[7],v&&(e[7]=v),u&Re&&(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]=h,e}function bg(e){var t=[];if(e!=null)for(var s in le(e))t.push(s);return t}function Rg(e){return Si.call(e)}function el(e,t,s){return t=be(t===r?e.length-1:t,0),function(){for(var u=arguments,h=-1,p=be(u.length-t,0),_=T(p);++h<p;)_[h]=u[t+h];h=-1;for(var v=T(t+1);++h<t;)v[h]=u[h];return v[t]=s(_),je(e,this,v)}}function tl(e,t){return t.length<2?e:In(e,ft(t,0,-1))}function Ag(e,t){for(var s=e.length,u=De(t.length,s),h=ze(e);u--;){var p=t[u];e[u]=zt(p,s)?h[p]:r}return e}function Sa(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var nl=il(bu),Br=Vf||function(e,t){return Ne.setTimeout(e,t)},wa=il(Jd);function rl(e,t,s){var u=t+"";return wa(e,vg(u,Pg(pg(u),s)))}function il(e){var t=0,s=0;return function(){var u=qf(),h=St-(u-s);if(s=u,h>0){if(++t>=Zt)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Bi(e,t){var s=-1,u=e.length,h=u-1;for(t=t===r?u:t;++s<t;){var p=na(s,h),_=e[p];e[p]=e[s],e[s]=_}return e.length=t,e}var sl=yg(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(_h,function(s,u,h,p){t.push(h?p.replace(Th,"$1"):u||s)}),t});function Tt(e){if(typeof e=="string"||rt(e))return e;var t=e+"";return t=="0"&&1/e==-ot?"-0":t}function Ln(e){if(e!=null){try{return vi.call(e)}catch{}try{return e+""}catch{}}return""}function Pg(e,t){return et(th,function(s){var u="_."+s[0];t&s[1]&&!di(e,u)&&e.push(u)}),e.sort()}function al(e){if(e instanceof te)return e.clone();var t=new ct(e.__wrapped__,e.__chain__);return t.__actions__=ze(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Ig(e,t,s){(s?Be(e,t,s):t===r)?t=1:t=be(J(t),0);var u=e==null?0:e.length;if(!u||t<1)return[];for(var h=0,p=0,_=T(bi(u/t));h<u;)_[p++]=ft(e,h,h+=t);return _}function xg(e){for(var t=-1,s=e==null?0:e.length,u=0,h=[];++t<s;){var p=e[t];p&&(h[u++]=p)}return h}function Lg(){var e=arguments.length;if(!e)return[];for(var t=T(e-1),s=arguments[0],u=e;u--;)t[u-1]=arguments[u];return tn(Y(s)?ze(s):[s],Ue(t,1))}var Ng=Z(function(e,t){return ve(e)?Mr(e,Ue(t,1,ve,!0)):[]}),Ug=Z(function(e,t){var s=dt(t);return ve(s)&&(s=r),ve(e)?Mr(e,Ue(t,1,ve,!0),B(s,2)):[]}),Og=Z(function(e,t){var s=dt(t);return ve(s)&&(s=r),ve(e)?Mr(e,Ue(t,1,ve,!0),r,s):[]});function $g(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:J(t),ft(e,t<0?0:t,u)):[]}function Dg(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:J(t),t=u-t,ft(e,0,t<0?0:t)):[]}function Mg(e,t){return e&&e.length?$i(e,B(t,3),!0,!0):[]}function kg(e,t){return e&&e.length?$i(e,B(t,3),!0):[]}function Fg(e,t,s,u){var h=e==null?0:e.length;return h?(s&&typeof s!="number"&&Be(e,t,s)&&(s=0,u=h),Ld(e,t,s,u)):[]}function ol(e,t,s){var u=e==null?0:e.length;if(!u)return-1;var h=s==null?0:J(s);return h<0&&(h=be(u+h,0)),gi(e,B(t,3),h)}function ul(e,t,s){var u=e==null?0:e.length;if(!u)return-1;var h=u-1;return s!==r&&(h=J(s),h=s<0?be(u+h,0):De(h,u-1)),gi(e,B(t,3),h,!0)}function ll(e){var t=e==null?0:e.length;return t?Ue(e,1):[]}function Hg(e){var t=e==null?0:e.length;return t?Ue(e,ot):[]}function Wg(e,t){var s=e==null?0:e.length;return s?(t=t===r?1:J(t),Ue(e,t)):[]}function Vg(e){for(var t=-1,s=e==null?0:e.length,u={};++t<s;){var h=e[t];Ot(u,h[0],h[1])}return u}function cl(e){return e&&e.length?e[0]:r}function Bg(e,t,s){var u=e==null?0:e.length;if(!u)return-1;var h=s==null?0:J(s);return h<0&&(h=be(u+h,0)),zn(e,t,h)}function Gg(e){var t=e==null?0:e.length;return t?ft(e,0,-1):[]}var Qg=Z(function(e){var t=de(e,oa);return t.length&&t[0]===e[0]?Xs(t):[]}),qg=Z(function(e){var t=dt(e),s=de(e,oa);return t===dt(s)?t=r:s.pop(),s.length&&s[0]===e[0]?Xs(s,B(t,2)):[]}),zg=Z(function(e){var t=dt(e),s=de(e,oa);return t=typeof t=="function"?t:r,t&&s.pop(),s.length&&s[0]===e[0]?Xs(s,r,t):[]});function Kg(e,t){return e==null?"":Gf.call(e,t)}function dt(e){var t=e==null?0:e.length;return t?e[t-1]:r}function Yg(e,t,s){var u=e==null?0:e.length;if(!u)return-1;var h=u;return s!==r&&(h=J(s),h=h<0?be(u+h,0):De(h,u-1)),t===t?Pf(e,t,h):gi(e,Go,h,!0)}function Jg(e,t){return e&&e.length?Eu(e,J(t)):r}var Xg=Z(hl);function hl(e,t){return e&&e.length&&t&&t.length?ta(e,t):e}function Zg(e,t,s){return e&&e.length&&t&&t.length?ta(e,t,B(s,2)):e}function jg(e,t,s){return e&&e.length&&t&&t.length?ta(e,t,r,s):e}var ep=qt(function(e,t){var s=e==null?0:e.length,u=zs(e,t);return Tu(e,de(t,function(h){return zt(h,s)?+h:h}).sort(Ou)),u});function tp(e,t){var s=[];if(!(e&&e.length))return s;var u=-1,h=[],p=e.length;for(t=B(t,3);++u<p;){var _=e[u];t(_,u,e)&&(s.push(_),h.push(u))}return Tu(e,h),s}function Ea(e){return e==null?e:Kf.call(e)}function np(e,t,s){var u=e==null?0:e.length;return u?(s&&typeof s!="number"&&Be(e,t,s)?(t=0,s=u):(t=t==null?0:J(t),s=s===r?u:J(s)),ft(e,t,s)):[]}function rp(e,t){return Oi(e,t)}function ip(e,t,s){return ia(e,t,B(s,2))}function sp(e,t){var s=e==null?0:e.length;if(s){var u=Oi(e,t);if(u<s&&bt(e[u],t))return u}return-1}function ap(e,t){return Oi(e,t,!0)}function op(e,t,s){return ia(e,t,B(s,2),!0)}function up(e,t){var s=e==null?0:e.length;if(s){var u=Oi(e,t,!0)-1;if(bt(e[u],t))return u}return-1}function lp(e){return e&&e.length?Ru(e):[]}function cp(e,t){return e&&e.length?Ru(e,B(t,2)):[]}function hp(e){var t=e==null?0:e.length;return t?ft(e,1,t):[]}function fp(e,t,s){return e&&e.length?(t=s||t===r?1:J(t),ft(e,0,t<0?0:t)):[]}function dp(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:J(t),t=u-t,ft(e,t<0?0:t,u)):[]}function gp(e,t){return e&&e.length?$i(e,B(t,3),!1,!0):[]}function pp(e,t){return e&&e.length?$i(e,B(t,3)):[]}var mp=Z(function(e){return an(Ue(e,1,ve,!0))}),_p=Z(function(e){var t=dt(e);return ve(t)&&(t=r),an(Ue(e,1,ve,!0),B(t,2))}),vp=Z(function(e){var t=dt(e);return t=typeof t=="function"?t:r,an(Ue(e,1,ve,!0),r,t)});function Sp(e){return e&&e.length?an(e):[]}function wp(e,t){return e&&e.length?an(e,B(t,2)):[]}function Ep(e,t){return t=typeof t=="function"?t:r,e&&e.length?an(e,r,t):[]}function Ca(e){if(!(e&&e.length))return[];var t=0;return e=en(e,function(s){if(ve(s))return t=be(s.length,t),!0}),Fs(t,function(s){return de(e,Ds(s))})}function fl(e,t){if(!(e&&e.length))return[];var s=Ca(e);return t==null?s:de(s,function(u){return je(t,r,u)})}var Cp=Z(function(e,t){return ve(e)?Mr(e,t):[]}),yp=Z(function(e){return aa(en(e,ve))}),Tp=Z(function(e){var t=dt(e);return ve(t)&&(t=r),aa(en(e,ve),B(t,2))}),bp=Z(function(e){var t=dt(e);return t=typeof t=="function"?t:r,aa(en(e,ve),r,t)}),Rp=Z(Ca);function Ap(e,t){return xu(e||[],t||[],Dr)}function Pp(e,t){return xu(e||[],t||[],Hr)}var Ip=Z(function(e){var t=e.length,s=t>1?e[t-1]:r;return s=typeof s=="function"?(e.pop(),s):r,fl(e,s)});function dl(e){var t=d(e);return t.__chain__=!0,t}function xp(e,t){return t(e),e}function Gi(e,t){return t(e)}var Lp=qt(function(e){var t=e.length,s=t?e[0]:0,u=this.__wrapped__,h=function(p){return zs(p,e)};return t>1||this.__actions__.length||!(u instanceof te)||!zt(s)?this.thru(h):(u=u.slice(s,+s+(t?1:0)),u.__actions__.push({func:Gi,args:[h],thisArg:r}),new ct(u,this.__chain__).thru(function(p){return t&&!p.length&&p.push(r),p}))});function Np(){return dl(this)}function Up(){return new ct(this.value(),this.__chain__)}function Op(){this.__values__===r&&(this.__values__=Al(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function $p(){return this}function Dp(e){for(var t,s=this;s instanceof Ii;){var u=al(s);u.__index__=0,u.__values__=r,t?h.__wrapped__=u:t=u;var h=u;s=s.__wrapped__}return h.__wrapped__=e,t}function Mp(){var e=this.__wrapped__;if(e instanceof te){var t=e;return this.__actions__.length&&(t=new te(this)),t=t.reverse(),t.__actions__.push({func:Gi,args:[Ea],thisArg:r}),new ct(t,this.__chain__)}return this.thru(Ea)}function kp(){return Iu(this.__wrapped__,this.__actions__)}var Fp=Di(function(e,t,s){se.call(e,s)?++e[s]:Ot(e,s,1)});function Hp(e,t,s){var u=Y(e)?Vo:xd;return s&&Be(e,t,s)&&(t=r),u(e,B(t,3))}function Wp(e,t){var s=Y(e)?en:fu;return s(e,B(t,3))}var Vp=Hu(ol),Bp=Hu(ul);function Gp(e,t){return Ue(Qi(e,t),1)}function Qp(e,t){return Ue(Qi(e,t),ot)}function qp(e,t,s){return s=s===r?1:J(s),Ue(Qi(e,t),s)}function gl(e,t){var s=Y(e)?et:sn;return s(e,B(t,3))}function pl(e,t){var s=Y(e)?hf:hu;return s(e,B(t,3))}var zp=Di(function(e,t,s){se.call(e,s)?e[s].push(t):Ot(e,s,[t])});function Kp(e,t,s,u){e=Ke(e)?e:sr(e),s=s&&!u?J(s):0;var h=e.length;return s<0&&(s=be(h+s,0)),Ji(e)?s<=h&&e.indexOf(t,s)>-1:!!h&&zn(e,t,s)>-1}var Yp=Z(function(e,t,s){var u=-1,h=typeof t=="function",p=Ke(e)?T(e.length):[];return sn(e,function(_){p[++u]=h?je(t,_,s):kr(_,t,s)}),p}),Jp=Di(function(e,t,s){Ot(e,s,t)});function Qi(e,t){var s=Y(e)?de:vu;return s(e,B(t,3))}function Xp(e,t,s,u){return e==null?[]:(Y(t)||(t=t==null?[]:[t]),s=u?r:s,Y(s)||(s=s==null?[]:[s]),Cu(e,t,s))}var Zp=Di(function(e,t,s){e[s?0:1].push(t)},function(){return[[],[]]});function jp(e,t,s){var u=Y(e)?Os:qo,h=arguments.length<3;return u(e,B(t,4),s,h,sn)}function em(e,t,s){var u=Y(e)?ff:qo,h=arguments.length<3;return u(e,B(t,4),s,h,hu)}function tm(e,t){var s=Y(e)?en:fu;return s(e,Ki(B(t,3)))}function nm(e){var t=Y(e)?ou:Kd;return t(e)}function rm(e,t,s){(s?Be(e,t,s):t===r)?t=1:t=J(t);var u=Y(e)?bd:Yd;return u(e,t)}function im(e){var t=Y(e)?Rd:Xd;return t(e)}function sm(e){if(e==null)return 0;if(Ke(e))return Ji(e)?Yn(e):e.length;var t=Me(e);return t==wt||t==Et?e.size:js(e).length}function am(e,t,s){var u=Y(e)?$s:Zd;return s&&Be(e,t,s)&&(t=r),u(e,B(t,3))}var om=Z(function(e,t){if(e==null)return[];var s=t.length;return s>1&&Be(e,t[0],t[1])?t=[]:s>2&&Be(t[0],t[1],t[2])&&(t=[t[0]]),Cu(e,Ue(t,1),[])}),qi=Wf||function(){return Ne.Date.now()};function um(e,t){if(typeof t!="function")throw new lt(l);return e=J(e),function(){if(--e<1)return t.apply(this,arguments)}}function ml(e,t,s){return t=s?r:t,t=e&&t==null?e.length:t,Qt(e,Re,r,r,r,r,t)}function _l(e,t){var s;if(typeof t!="function")throw new lt(l);return e=J(e),function(){return--e>0&&(s=t.apply(this,arguments)),e<=1&&(t=r),s}}var ya=Z(function(e,t,s){var u=H;if(s.length){var h=nn(s,rr(ya));u|=Le}return Qt(e,u,t,s,h)}),vl=Z(function(e,t,s){var u=H|re;if(s.length){var h=nn(s,rr(vl));u|=Le}return Qt(t,u,e,s,h)});function Sl(e,t,s){t=s?r:t;var u=Qt(e,me,r,r,r,r,r,t);return u.placeholder=Sl.placeholder,u}function wl(e,t,s){t=s?r:t;var u=Qt(e,qe,r,r,r,r,r,t);return u.placeholder=wl.placeholder,u}function El(e,t,s){var u,h,p,_,v,C,P=0,I=!1,L=!1,k=!0;if(typeof e!="function")throw new lt(l);t=gt(t)||0,pe(s)&&(I=!!s.leading,L="maxWait"in s,p=L?be(gt(s.maxWait)||0,t):p,k="trailing"in s?!!s.trailing:k);function W(Se){var Rt=u,Jt=h;return u=h=r,P=Se,_=e.apply(Jt,Rt),_}function Q(Se){return P=Se,v=Br(j,t),I?W(Se):_}function X(Se){var Rt=Se-C,Jt=Se-P,Wl=t-Rt;return L?De(Wl,p-Jt):Wl}function V(Se){var Rt=Se-C,Jt=Se-P;return C===r||Rt>=t||Rt<0||L&&Jt>=p}function j(){var Se=qi();if(V(Se))return ne(Se);v=Br(j,X(Se))}function ne(Se){return v=r,k&&u?W(Se):(u=h=r,_)}function it(){v!==r&&Lu(v),P=0,u=C=h=v=r}function Ge(){return v===r?_:ne(qi())}function st(){var Se=qi(),Rt=V(Se);if(u=arguments,h=this,C=Se,Rt){if(v===r)return Q(C);if(L)return Lu(v),v=Br(j,t),W(C)}return v===r&&(v=Br(j,t)),_}return st.cancel=it,st.flush=Ge,st}var lm=Z(function(e,t){return cu(e,1,t)}),cm=Z(function(e,t,s){return cu(e,gt(t)||0,s)});function hm(e){return Qt(e,Ee)}function zi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new lt(l);var s=function(){var u=arguments,h=t?t.apply(this,u):u[0],p=s.cache;if(p.has(h))return p.get(h);var _=e.apply(this,u);return s.cache=p.set(h,_)||p,_};return s.cache=new(zi.Cache||Gt),s}zi.Cache=Gt;function Ki(e){if(typeof e!="function")throw new lt(l);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 fm(e){return _l(2,e)}var dm=jd(function(e,t){t=t.length==1&&Y(t[0])?de(t[0],tt(B())):de(Ue(t,1),tt(B()));var s=t.length;return Z(function(u){for(var h=-1,p=De(u.length,s);++h<p;)u[h]=t[h].call(this,u[h]);return je(e,this,u)})}),Ta=Z(function(e,t){var s=nn(t,rr(Ta));return Qt(e,Le,r,t,s)}),Cl=Z(function(e,t){var s=nn(t,rr(Cl));return Qt(e,Ze,r,t,s)}),gm=qt(function(e,t){return Qt(e,Ae,r,r,r,t)});function pm(e,t){if(typeof e!="function")throw new lt(l);return t=t===r?t:J(t),Z(e,t)}function mm(e,t){if(typeof e!="function")throw new lt(l);return t=t==null?0:be(J(t),0),Z(function(s){var u=s[t],h=un(s,0,t);return u&&tn(h,u),je(e,this,h)})}function _m(e,t,s){var u=!0,h=!0;if(typeof e!="function")throw new lt(l);return pe(s)&&(u="leading"in s?!!s.leading:u,h="trailing"in s?!!s.trailing:h),El(e,t,{leading:u,maxWait:t,trailing:h})}function vm(e){return ml(e,1)}function Sm(e,t){return Ta(ua(t),e)}function wm(){if(!arguments.length)return[];var e=arguments[0];return Y(e)?e:[e]}function Em(e){return ht(e,R)}function Cm(e,t){return t=typeof t=="function"?t:r,ht(e,R,t)}function ym(e){return ht(e,E|R)}function Tm(e,t){return t=typeof t=="function"?t:r,ht(e,E|R,t)}function bm(e,t){return t==null||lu(e,t,Ie(t))}function bt(e,t){return e===t||e!==e&&t!==t}var Rm=Hi(Js),Am=Hi(function(e,t){return e>=t}),Nn=pu((function(){return arguments})())?pu:function(e){return _e(e)&&se.call(e,"callee")&&!tu.call(e,"callee")},Y=T.isArray,Pm=Do?tt(Do):Dd;function Ke(e){return e!=null&&Yi(e.length)&&!Kt(e)}function ve(e){return _e(e)&&Ke(e)}function Im(e){return e===!0||e===!1||_e(e)&&Ve(e)==yr}var ln=Bf||Da,xm=Mo?tt(Mo):Md;function Lm(e){return _e(e)&&e.nodeType===1&&!Gr(e)}function Nm(e){if(e==null)return!0;if(Ke(e)&&(Y(e)||typeof e=="string"||typeof e.splice=="function"||ln(e)||ir(e)||Nn(e)))return!e.length;var t=Me(e);if(t==wt||t==Et)return!e.size;if(Vr(e))return!js(e).length;for(var s in e)if(se.call(e,s))return!1;return!0}function Um(e,t){return Fr(e,t)}function Om(e,t,s){s=typeof s=="function"?s:r;var u=s?s(e,t):r;return u===r?Fr(e,t,r,s):!!u}function ba(e){if(!_e(e))return!1;var t=Ve(e);return t==oi||t==rh||typeof e.message=="string"&&typeof e.name=="string"&&!Gr(e)}function $m(e){return typeof e=="number"&&ru(e)}function Kt(e){if(!pe(e))return!1;var t=Ve(e);return t==ui||t==uo||t==nh||t==sh}function yl(e){return typeof e=="number"&&e==J(e)}function Yi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=oe}function pe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function _e(e){return e!=null&&typeof e=="object"}var Tl=ko?tt(ko):Fd;function Dm(e,t){return e===t||Zs(e,t,pa(t))}function Mm(e,t,s){return s=typeof s=="function"?s:r,Zs(e,t,pa(t),s)}function km(e){return bl(e)&&e!=+e}function Fm(e){if(Cg(e))throw new z(c);return mu(e)}function Hm(e){return e===null}function Wm(e){return e==null}function bl(e){return typeof e=="number"||_e(e)&&Ve(e)==br}function Gr(e){if(!_e(e)||Ve(e)!=Vt)return!1;var t=Ci(e);if(t===null)return!0;var s=se.call(t,"constructor")&&t.constructor;return typeof s=="function"&&s instanceof s&&vi.call(s)==Mf}var Ra=Fo?tt(Fo):Hd;function Vm(e){return yl(e)&&e>=-oe&&e<=oe}var Rl=Ho?tt(Ho):Wd;function Ji(e){return typeof e=="string"||!Y(e)&&_e(e)&&Ve(e)==Ar}function rt(e){return typeof e=="symbol"||_e(e)&&Ve(e)==li}var ir=Wo?tt(Wo):Vd;function Bm(e){return e===r}function Gm(e){return _e(e)&&Me(e)==Pr}function Qm(e){return _e(e)&&Ve(e)==oh}var qm=Hi(ea),zm=Hi(function(e,t){return e<=t});function Al(e){if(!e)return[];if(Ke(e))return Ji(e)?Ct(e):ze(e);if(Lr&&e[Lr])return bf(e[Lr]());var t=Me(e),s=t==wt?Ws:t==Et?pi:sr;return s(e)}function Yt(e){if(!e)return e===0?e:0;if(e=gt(e),e===ot||e===-ot){var t=e<0?-1:1;return t*We}return e===e?e:0}function J(e){var t=Yt(e),s=t%1;return t===t?s?t-s:t:0}function Pl(e){return e?Pn(J(e),0,Ut):0}function gt(e){if(typeof e=="number")return e;if(rt(e))return jt;if(pe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=pe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=zo(e);var s=Ah.test(e);return s||Ih.test(e)?uf(e.slice(2),s?2:8):Rh.test(e)?jt:+e}function Il(e){return Dt(e,Ye(e))}function Km(e){return e?Pn(J(e),-oe,oe):e===0?e:0}function ae(e){return e==null?"":nt(e)}var Ym=tr(function(e,t){if(Vr(t)||Ke(t)){Dt(t,Ie(t),e);return}for(var s in t)se.call(t,s)&&Dr(e,s,t[s])}),xl=tr(function(e,t){Dt(t,Ye(t),e)}),Ll=tr(function(e,t,s,u){Dt(t,Ye(t),e,u)}),Aa=tr(function(e,t,s,u){Dt(t,Ie(t),e,u)}),Jm=qt(zs);function Xm(e,t){var s=er(e);return t==null?s:uu(s,t)}var Zm=Z(function(e,t){e=le(e);var s=-1,u=t.length,h=u>2?t[2]:r;for(h&&Be(t[0],t[1],h)&&(u=1);++s<u;)for(var p=t[s],_=Ye(p),v=-1,C=_.length;++v<C;){var P=_[v],I=e[P];(I===r||bt(I,Xn[P])&&!se.call(e,P))&&(e[P]=p[P])}return e}),jm=Z(function(e){return e.push(r,zu),je(Nl,r,e)});function e_(e,t){return Bo(e,B(t,3),$t)}function t_(e,t){return Bo(e,B(t,3),Ys)}function n_(e,t){return e==null?e:Ks(e,B(t,3),Ye)}function r_(e,t){return e==null?e:du(e,B(t,3),Ye)}function i_(e,t){return e&&$t(e,B(t,3))}function s_(e,t){return e&&Ys(e,B(t,3))}function a_(e){return e==null?[]:Ni(e,Ie(e))}function o_(e){return e==null?[]:Ni(e,Ye(e))}function Pa(e,t,s){var u=e==null?r:In(e,t);return u===r?s:u}function u_(e,t){return e!=null&&Ju(e,t,Nd)}function Ia(e,t){return e!=null&&Ju(e,t,Ud)}var l_=Vu(function(e,t,s){t!=null&&typeof t.toString!="function"&&(t=Si.call(t)),e[t]=s},La(Je)),c_=Vu(function(e,t,s){t!=null&&typeof t.toString!="function"&&(t=Si.call(t)),se.call(e,t)?e[t].push(s):e[t]=[s]},B),h_=Z(kr);function Ie(e){return Ke(e)?au(e):js(e)}function Ye(e){return Ke(e)?au(e,!0):Bd(e)}function f_(e,t){var s={};return t=B(t,3),$t(e,function(u,h,p){Ot(s,t(u,h,p),u)}),s}function d_(e,t){var s={};return t=B(t,3),$t(e,function(u,h,p){Ot(s,h,t(u,h,p))}),s}var g_=tr(function(e,t,s){Ui(e,t,s)}),Nl=tr(function(e,t,s,u){Ui(e,t,s,u)}),p_=qt(function(e,t){var s={};if(e==null)return s;var u=!1;t=de(t,function(p){return p=on(p,e),u||(u=p.length>1),p}),Dt(e,da(e),s),u&&(s=ht(s,E|b|R,cg));for(var h=t.length;h--;)sa(s,t[h]);return s});function m_(e,t){return Ul(e,Ki(B(t)))}var __=qt(function(e,t){return e==null?{}:Qd(e,t)});function Ul(e,t){if(e==null)return{};var s=de(da(e),function(u){return[u]});return t=B(t),yu(e,s,function(u,h){return t(u,h[0])})}function v_(e,t,s){t=on(t,e);var u=-1,h=t.length;for(h||(h=1,e=r);++u<h;){var p=e==null?r:e[Tt(t[u])];p===r&&(u=h,p=s),e=Kt(p)?p.call(e):p}return e}function S_(e,t,s){return e==null?e:Hr(e,t,s)}function w_(e,t,s,u){return u=typeof u=="function"?u:r,e==null?e:Hr(e,t,s,u)}var Ol=Qu(Ie),$l=Qu(Ye);function E_(e,t,s){var u=Y(e),h=u||ln(e)||ir(e);if(t=B(t,4),s==null){var p=e&&e.constructor;h?s=u?new p:[]:pe(e)?s=Kt(p)?er(Ci(e)):{}:s={}}return(h?et:$t)(e,function(_,v,C){return t(s,_,v,C)}),s}function C_(e,t){return e==null?!0:sa(e,t)}function y_(e,t,s){return e==null?e:Pu(e,t,ua(s))}function T_(e,t,s,u){return u=typeof u=="function"?u:r,e==null?e:Pu(e,t,ua(s),u)}function sr(e){return e==null?[]:Hs(e,Ie(e))}function b_(e){return e==null?[]:Hs(e,Ye(e))}function R_(e,t,s){return s===r&&(s=t,t=r),s!==r&&(s=gt(s),s=s===s?s:0),t!==r&&(t=gt(t),t=t===t?t:0),Pn(gt(e),t,s)}function A_(e,t,s){return t=Yt(t),s===r?(s=t,t=0):s=Yt(s),e=gt(e),Od(e,t,s)}function P_(e,t,s){if(s&&typeof s!="boolean"&&Be(e,t,s)&&(t=s=r),s===r&&(typeof t=="boolean"?(s=t,t=r):typeof e=="boolean"&&(s=e,e=r)),e===r&&t===r?(e=0,t=1):(e=Yt(e),t===r?(t=e,e=0):t=Yt(t)),e>t){var u=e;e=t,t=u}if(s||e%1||t%1){var h=iu();return De(e+h*(t-e+of("1e-"+((h+"").length-1))),t)}return na(e,t)}var I_=nr(function(e,t,s){return t=t.toLowerCase(),e+(s?Dl(t):t)});function Dl(e){return xa(ae(e).toLowerCase())}function Ml(e){return e=ae(e),e&&e.replace(Lh,wf).replace(Jh,"")}function x_(e,t,s){e=ae(e),t=nt(t);var u=e.length;s=s===r?u:Pn(J(s),0,u);var h=s;return s-=t.length,s>=0&&e.slice(s,h)==t}function L_(e){return e=ae(e),e&&fh.test(e)?e.replace(ho,Ef):e}function N_(e){return e=ae(e),e&&vh.test(e)?e.replace(Ts,"\\$&"):e}var U_=nr(function(e,t,s){return e+(s?"-":"")+t.toLowerCase()}),O_=nr(function(e,t,s){return e+(s?" ":"")+t.toLowerCase()}),$_=Fu("toLowerCase");function D_(e,t,s){e=ae(e),t=J(t);var u=t?Yn(e):0;if(!t||u>=t)return e;var h=(t-u)/2;return Fi(Ri(h),s)+e+Fi(bi(h),s)}function M_(e,t,s){e=ae(e),t=J(t);var u=t?Yn(e):0;return t&&u<t?e+Fi(t-u,s):e}function k_(e,t,s){e=ae(e),t=J(t);var u=t?Yn(e):0;return t&&u<t?Fi(t-u,s)+e:e}function F_(e,t,s){return s||t==null?t=0:t&&(t=+t),zf(ae(e).replace(bs,""),t||0)}function H_(e,t,s){return(s?Be(e,t,s):t===r)?t=1:t=J(t),ra(ae(e),t)}function W_(){var e=arguments,t=ae(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var V_=nr(function(e,t,s){return e+(s?"_":"")+t.toLowerCase()});function B_(e,t,s){return s&&typeof s!="number"&&Be(e,t,s)&&(t=s=r),s=s===r?Ut:s>>>0,s?(e=ae(e),e&&(typeof t=="string"||t!=null&&!Ra(t))&&(t=nt(t),!t&&Kn(e))?un(Ct(e),0,s):e.split(t,s)):[]}var G_=nr(function(e,t,s){return e+(s?" ":"")+xa(t)});function Q_(e,t,s){return e=ae(e),s=s==null?0:Pn(J(s),0,e.length),t=nt(t),e.slice(s,s+t.length)==t}function q_(e,t,s){var u=d.templateSettings;s&&Be(e,t,s)&&(t=r),e=ae(e),t=Aa({},t,u,qu);var h=Aa({},t.imports,u.imports,qu),p=Ie(h),_=Hs(h,p);et(p,function(V){if(go.test(V))throw new z(g)});var v,C,P=0,I=t.interpolate||ci,L="__p += '",k=Vs((t.escape||ci).source+"|"+I.source+"|"+(I===fo?bh:ci).source+"|"+(t.evaluate||ci).source+"|$","g"),W="//# sourceURL="+(se.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++tf+"]")+`
|
|
4
|
-
`;e.replace(k,function(V,
|
|
5
|
-
__e(`+
|
|
6
|
-
'`),
|
|
7
|
-
`+
|
|
8
|
-
__p += '`),
|
|
9
|
-
((__t = (`+
|
|
1
|
+
class Hv{constructor(t){this.$subscribers=new Set,this.$value=t}set(t){this.$value=t,this.$subscribers.forEach(r=>{r(t)})}update(t){this.set(t(this.$value))}subscribe(t){return this.$subscribers.add(t),t(this.$value),()=>{this.$subscribers.delete(t)}}}function cc(i){return i.$value}function ss(i){return new Hv(i)}var Xi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Qr={exports:{}};var Wv=Qr.exports,Vl;function Vv(){return Vl||(Vl=1,(function(i,t){(function(){var r,a="4.18.1",o=200,c="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",f="Invalid `variable` option passed into `_.template`",d="Invalid `imports` option passed into `_.template`",m="__lodash_hash_undefined__",S=500,y="__lodash_placeholder__",E=1,T=2,R=4,x=1,$=2,W=1,Z=2,Se=4,Re=8,Ae=16,me=32,Ze=64,Pe=128,Ie=256,Ee=512,xe=30,M="...",Zt=800,wt=16,De=1,yn=2,N=3,ot=1/0,oe=9007199254740991,Ve=17976931348623157e292,jt=NaN,Ut=4294967295,jc=Ut-1,eh=Ut>>>1,th=[["ary",Pe],["bind",W],["bindKey",Z],["curry",Re],["curryRight",Ae],["flip",Ee],["partial",me],["partialRight",Ze],["rearg",Ie]],Gn="[object Arguments]",ai="[object Array]",nh="[object AsyncFunction]",yr="[object Boolean]",Tr="[object Date]",rh="[object DOMException]",oi="[object Error]",ui="[object Function]",uo="[object GeneratorFunction]",St="[object Map]",br="[object Number]",ih="[object Null]",Vt="[object Object]",lo="[object Promise]",sh="[object Proxy]",Rr="[object RegExp]",Et="[object Set]",Ar="[object String]",li="[object Symbol]",ah="[object Undefined]",Pr="[object WeakMap]",oh="[object WeakSet]",Ir="[object ArrayBuffer]",Qn="[object DataView]",ps="[object Float32Array]",ms="[object Float64Array]",_s="[object Int8Array]",vs="[object Int16Array]",ws="[object Int32Array]",Ss="[object Uint8Array]",Es="[object Uint8ClampedArray]",Cs="[object Uint16Array]",ys="[object Uint32Array]",uh=/\b__p \+= '';/g,lh=/\b(__p \+=) '' \+/g,ch=/(__e\(.*?\)|\b__t\)) \+\n'';/g,co=/&(?:amp|lt|gt|quot|#39);/g,ho=/[&<>"']/g,hh=RegExp(co.source),fh=RegExp(ho.source),dh=/<%-([\s\S]+?)%>/g,gh=/<%([\s\S]+?)%>/g,fo=/<%=([\s\S]+?)%>/g,ph=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mh=/^\w*$/,_h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ts=/[\\^$.*+?()[\]{}|]/g,vh=RegExp(Ts.source),bs=/^\s+/,wh=/\s/,Sh=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Eh=/\{\n\/\* \[wrapped with (.+)\] \*/,Ch=/,? & /,yh=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,go=/[()=,{}\[\]\/\s]/,Th=/\\(\\)?/g,bh=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,po=/\w*$/,Rh=/^[-+]0x[0-9a-f]+$/i,Ah=/^0b[01]+$/i,Ph=/^\[object .+?Constructor\]$/,Ih=/^0o[0-7]+$/i,xh=/^(?:0|[1-9]\d*)$/,Lh=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ci=/($^)/,Nh=/['\n\r\u2028\u2029\\]/g,hi="\\ud800-\\udfff",Uh="\\u0300-\\u036f",Oh="\\ufe20-\\ufe2f",$h="\\u20d0-\\u20ff",mo=Uh+Oh+$h,_o="\\u2700-\\u27bf",vo="a-z\\xdf-\\xf6\\xf8-\\xff",Dh="\\xac\\xb1\\xd7\\xf7",Mh="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",kh="\\u2000-\\u206f",Fh=" \\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",wo="A-Z\\xc0-\\xd6\\xd8-\\xde",So="\\ufe0e\\ufe0f",Eo=Dh+Mh+kh+Fh,Rs="['’]",Hh="["+hi+"]",Co="["+Eo+"]",fi="["+mo+"]",yo="\\d+",Wh="["+_o+"]",To="["+vo+"]",bo="[^"+hi+Eo+yo+_o+vo+wo+"]",As="\\ud83c[\\udffb-\\udfff]",Vh="(?:"+fi+"|"+As+")",Ro="[^"+hi+"]",Ps="(?:\\ud83c[\\udde6-\\uddff]){2}",Is="[\\ud800-\\udbff][\\udc00-\\udfff]",qn="["+wo+"]",Ao="\\u200d",Po="(?:"+To+"|"+bo+")",Bh="(?:"+qn+"|"+bo+")",Io="(?:"+Rs+"(?:d|ll|m|re|s|t|ve))?",xo="(?:"+Rs+"(?:D|LL|M|RE|S|T|VE))?",Lo=Vh+"?",No="["+So+"]?",Gh="(?:"+Ao+"(?:"+[Ro,Ps,Is].join("|")+")"+No+Lo+")*",Qh="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",qh="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Uo=No+Lo+Gh,zh="(?:"+[Wh,Ps,Is].join("|")+")"+Uo,Kh="(?:"+[Ro+fi+"?",fi,Ps,Is,Hh].join("|")+")",Yh=RegExp(Rs,"g"),Jh=RegExp(fi,"g"),xs=RegExp(As+"(?="+As+")|"+Kh+Uo,"g"),Xh=RegExp([qn+"?"+To+"+"+Io+"(?="+[Co,qn,"$"].join("|")+")",Bh+"+"+xo+"(?="+[Co,qn+Po,"$"].join("|")+")",qn+"?"+Po+"+"+Io,qn+"+"+xo,qh,Qh,yo,zh].join("|"),"g"),Zh=RegExp("["+Ao+hi+mo+So+"]"),jh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ef=["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"],tf=-1,he={};he[ps]=he[ms]=he[_s]=he[vs]=he[ws]=he[Ss]=he[Es]=he[Cs]=he[ys]=!0,he[Gn]=he[ai]=he[Ir]=he[yr]=he[Qn]=he[Tr]=he[oi]=he[ui]=he[St]=he[br]=he[Vt]=he[Rr]=he[Et]=he[Ar]=he[Pr]=!1;var ce={};ce[Gn]=ce[ai]=ce[Ir]=ce[Qn]=ce[yr]=ce[Tr]=ce[ps]=ce[ms]=ce[_s]=ce[vs]=ce[ws]=ce[St]=ce[br]=ce[Vt]=ce[Rr]=ce[Et]=ce[Ar]=ce[li]=ce[Ss]=ce[Es]=ce[Cs]=ce[ys]=!0,ce[oi]=ce[ui]=ce[Pr]=!1;var nf={À:"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"},rf={"&":"&","<":"<",">":">",'"':""","'":"'"},sf={"&":"&","<":"<",">":">",""":'"',"'":"'"},af={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},of=parseFloat,uf=parseInt,Oo=typeof Xi=="object"&&Xi&&Xi.Object===Object&&Xi,lf=typeof self=="object"&&self&&self.Object===Object&&self,Ue=Oo||lf||Function("return this")(),Ls=t&&!t.nodeType&&t,Tn=Ls&&!0&&i&&!i.nodeType&&i,$o=Tn&&Tn.exports===Ls,Ns=$o&&Oo.process,ut=(function(){try{var w=Tn&&Tn.require&&Tn.require("util").types;return w||Ns&&Ns.binding&&Ns.binding("util")}catch{}})(),Do=ut&&ut.isArrayBuffer,Mo=ut&&ut.isDate,ko=ut&&ut.isMap,Fo=ut&&ut.isRegExp,Ho=ut&&ut.isSet,Wo=ut&&ut.isTypedArray;function je(w,A,b){switch(b.length){case 0:return w.call(A);case 1:return w.call(A,b[0]);case 2:return w.call(A,b[0],b[1]);case 3:return w.call(A,b[0],b[1],b[2])}return w.apply(A,b)}function cf(w,A,b,F){for(var z=-1,ie=w==null?0:w.length;++z<ie;){var Te=w[z];A(F,Te,b(Te),w)}return F}function et(w,A){for(var b=-1,F=w==null?0:w.length;++b<F&&A(w[b],b,w)!==!1;);return w}function hf(w,A){for(var b=w==null?0:w.length;b--&&A(w[b],b,w)!==!1;);return w}function Vo(w,A){for(var b=-1,F=w==null?0:w.length;++b<F;)if(!A(w[b],b,w))return!1;return!0}function en(w,A){for(var b=-1,F=w==null?0:w.length,z=0,ie=[];++b<F;){var Te=w[b];A(Te,b,w)&&(ie[z++]=Te)}return ie}function di(w,A){var b=w==null?0:w.length;return!!b&&zn(w,A,0)>-1}function Us(w,A,b){for(var F=-1,z=w==null?0:w.length;++F<z;)if(b(A,w[F]))return!0;return!1}function de(w,A){for(var b=-1,F=w==null?0:w.length,z=Array(F);++b<F;)z[b]=A(w[b],b,w);return z}function tn(w,A){for(var b=-1,F=A.length,z=w.length;++b<F;)w[z+b]=A[b];return w}function Os(w,A,b,F){var z=-1,ie=w==null?0:w.length;for(F&&ie&&(b=w[++z]);++z<ie;)b=A(b,w[z],z,w);return b}function ff(w,A,b,F){var z=w==null?0:w.length;for(F&&z&&(b=w[--z]);z--;)b=A(b,w[z],z,w);return b}function $s(w,A){for(var b=-1,F=w==null?0:w.length;++b<F;)if(A(w[b],b,w))return!0;return!1}var df=Ds("length");function gf(w){return w.split("")}function pf(w){return w.match(yh)||[]}function Bo(w,A,b){var F;return b(w,function(z,ie,Te){if(A(z,ie,Te))return F=ie,!1}),F}function gi(w,A,b,F){for(var z=w.length,ie=b+(F?1:-1);F?ie--:++ie<z;)if(A(w[ie],ie,w))return ie;return-1}function zn(w,A,b){return A===A?Af(w,A,b):gi(w,Go,b)}function mf(w,A,b,F){for(var z=b-1,ie=w.length;++z<ie;)if(F(w[z],A))return z;return-1}function Go(w){return w!==w}function Qo(w,A){var b=w==null?0:w.length;return b?ks(w,A)/b:jt}function Ds(w){return function(A){return A==null?r:A[w]}}function Ms(w){return function(A){return w==null?r:w[A]}}function qo(w,A,b,F,z){return z(w,function(ie,Te,le){b=F?(F=!1,ie):A(b,ie,Te,le)}),b}function _f(w,A){var b=w.length;for(w.sort(A);b--;)w[b]=w[b].value;return w}function ks(w,A){for(var b,F=-1,z=w.length;++F<z;){var ie=A(w[F]);ie!==r&&(b=b===r?ie:b+ie)}return b}function Fs(w,A){for(var b=-1,F=Array(w);++b<w;)F[b]=A(b);return F}function vf(w,A){return de(A,function(b){return[b,w[b]]})}function zo(w){return w&&w.slice(0,Xo(w)+1).replace(bs,"")}function tt(w){return function(A){return w(A)}}function Hs(w,A){return de(A,function(b){return w[b]})}function xr(w,A){return w.has(A)}function Ko(w,A){for(var b=-1,F=w.length;++b<F&&zn(A,w[b],0)>-1;);return b}function Yo(w,A){for(var b=w.length;b--&&zn(A,w[b],0)>-1;);return b}function wf(w,A){for(var b=w.length,F=0;b--;)w[b]===A&&++F;return F}var Sf=Ms(nf),Ef=Ms(rf);function Cf(w){return"\\"+af[w]}function yf(w,A){return w==null?r:w[A]}function Kn(w){return Zh.test(w)}function Tf(w){return jh.test(w)}function bf(w){for(var A,b=[];!(A=w.next()).done;)b.push(A.value);return b}function Ws(w){var A=-1,b=Array(w.size);return w.forEach(function(F,z){b[++A]=[z,F]}),b}function Jo(w,A){return function(b){return w(A(b))}}function nn(w,A){for(var b=-1,F=w.length,z=0,ie=[];++b<F;){var Te=w[b];(Te===A||Te===y)&&(w[b]=y,ie[z++]=b)}return ie}function pi(w){var A=-1,b=Array(w.size);return w.forEach(function(F){b[++A]=F}),b}function Rf(w){var A=-1,b=Array(w.size);return w.forEach(function(F){b[++A]=[F,F]}),b}function Af(w,A,b){for(var F=b-1,z=w.length;++F<z;)if(w[F]===A)return F;return-1}function Pf(w,A,b){for(var F=b+1;F--;)if(w[F]===A)return F;return F}function Yn(w){return Kn(w)?xf(w):df(w)}function Ct(w){return Kn(w)?Lf(w):gf(w)}function Xo(w){for(var A=w.length;A--&&wh.test(w.charAt(A)););return A}var If=Ms(sf);function xf(w){for(var A=xs.lastIndex=0;xs.test(w);)++A;return A}function Lf(w){return w.match(xs)||[]}function Nf(w){return w.match(Xh)||[]}var Uf=(function w(A){A=A==null?Ue:Jn.defaults(Ue.Object(),A,Jn.pick(Ue,ef));var b=A.Array,F=A.Date,z=A.Error,ie=A.Function,Te=A.Math,le=A.Object,Vs=A.RegExp,Of=A.String,lt=A.TypeError,mi=b.prototype,$f=ie.prototype,Xn=le.prototype,_i=A["__core-js_shared__"],vi=$f.toString,se=Xn.hasOwnProperty,Df=0,Zo=(function(){var e=/[^.]+$/.exec(_i&&_i.keys&&_i.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})(),wi=Xn.toString,Mf=vi.call(le),kf=Ue._,Ff=Vs("^"+vi.call(se).replace(Ts,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Si=$o?A.Buffer:r,rn=A.Symbol,Ei=A.Uint8Array,jo=Si?Si.allocUnsafe:r,Ci=Jo(le.getPrototypeOf,le),eu=le.create,tu=Xn.propertyIsEnumerable,yi=mi.splice,nu=rn?rn.isConcatSpreadable:r,Lr=rn?rn.iterator:r,bn=rn?rn.toStringTag:r,Ti=(function(){try{var e=xn(le,"defineProperty");return e({},"",{}),e}catch{}})(),Hf=A.clearTimeout!==Ue.clearTimeout&&A.clearTimeout,Wf=F&&F.now!==Ue.Date.now&&F.now,Vf=A.setTimeout!==Ue.setTimeout&&A.setTimeout,bi=Te.ceil,Ri=Te.floor,Bs=le.getOwnPropertySymbols,Bf=Si?Si.isBuffer:r,ru=A.isFinite,Gf=mi.join,Qf=Jo(le.keys,le),be=Te.max,Me=Te.min,qf=F.now,zf=A.parseInt,iu=Te.random,Kf=mi.reverse,Gs=xn(A,"DataView"),Nr=xn(A,"Map"),Qs=xn(A,"Promise"),Zn=xn(A,"Set"),Ur=xn(A,"WeakMap"),Or=xn(le,"create"),Ai=Ur&&new Ur,jn={},Yf=Ln(Gs),Jf=Ln(Nr),Xf=Ln(Qs),Zf=Ln(Zn),jf=Ln(Ur),Pi=rn?rn.prototype:r,$r=Pi?Pi.valueOf:r,su=Pi?Pi.toString:r;function g(e){if(_e(e)&&!Y(e)&&!(e instanceof ne)){if(e instanceof ct)return e;if(se.call(e,"__wrapped__"))return al(e)}return new ct(e)}var er=(function(){function e(){}return function(n){if(!pe(n))return{};if(eu)return eu(n);e.prototype=n;var s=new e;return e.prototype=r,s}})();function Ii(){}function ct(e,n){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=r}g.templateSettings={escape:dh,evaluate:gh,interpolate:fo,variable:"",imports:{_:g}},g.prototype=Ii.prototype,g.prototype.constructor=g,ct.prototype=er(Ii.prototype),ct.prototype.constructor=ct;function ne(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ut,this.__views__=[]}function ed(){var e=new ne(this.__wrapped__);return e.__actions__=ze(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ze(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ze(this.__views__),e}function td(){if(this.__filtered__){var e=new ne(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function nd(){var e=this.__wrapped__.value(),n=this.__dir__,s=Y(e),u=n<0,h=s?e.length:0,p=gg(0,h,this.__views__),_=p.start,v=p.end,C=v-_,P=u?v:_-1,I=this.__iteratees__,L=I.length,k=0,H=Me(C,this.__takeCount__);if(!s||!u&&h==C&&H==C)return Iu(e,this.__actions__);var Q=[];e:for(;C--&&k<H;){P+=n;for(var X=-1,V=e[P];++X<L;){var ee=I[X],re=ee.iteratee,it=ee.type,Qe=re(V);if(it==yn)V=Qe;else if(!Qe){if(it==De)continue e;break e}}Q[k++]=V}return Q}ne.prototype=er(Ii.prototype),ne.prototype.constructor=ne;function Rn(e){var n=-1,s=e==null?0:e.length;for(this.clear();++n<s;){var u=e[n];this.set(u[0],u[1])}}function rd(){this.__data__=Or?Or(null):{},this.size=0}function id(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}function sd(e){var n=this.__data__;if(Or){var s=n[e];return s===m?r:s}return se.call(n,e)?n[e]:r}function ad(e){var n=this.__data__;return Or?n[e]!==r:se.call(n,e)}function od(e,n){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=Or&&n===r?m:n,this}Rn.prototype.clear=rd,Rn.prototype.delete=id,Rn.prototype.get=sd,Rn.prototype.has=ad,Rn.prototype.set=od;function Bt(e){var n=-1,s=e==null?0:e.length;for(this.clear();++n<s;){var u=e[n];this.set(u[0],u[1])}}function ud(){this.__data__=[],this.size=0}function ld(e){var n=this.__data__,s=xi(n,e);if(s<0)return!1;var u=n.length-1;return s==u?n.pop():yi.call(n,s,1),--this.size,!0}function cd(e){var n=this.__data__,s=xi(n,e);return s<0?r:n[s][1]}function hd(e){return xi(this.__data__,e)>-1}function fd(e,n){var s=this.__data__,u=xi(s,e);return u<0?(++this.size,s.push([e,n])):s[u][1]=n,this}Bt.prototype.clear=ud,Bt.prototype.delete=ld,Bt.prototype.get=cd,Bt.prototype.has=hd,Bt.prototype.set=fd;function Gt(e){var n=-1,s=e==null?0:e.length;for(this.clear();++n<s;){var u=e[n];this.set(u[0],u[1])}}function dd(){this.size=0,this.__data__={hash:new Rn,map:new(Nr||Bt),string:new Rn}}function gd(e){var n=Vi(this,e).delete(e);return this.size-=n?1:0,n}function pd(e){return Vi(this,e).get(e)}function md(e){return Vi(this,e).has(e)}function _d(e,n){var s=Vi(this,e),u=s.size;return s.set(e,n),this.size+=s.size==u?0:1,this}Gt.prototype.clear=dd,Gt.prototype.delete=gd,Gt.prototype.get=pd,Gt.prototype.has=md,Gt.prototype.set=_d;function An(e){var n=-1,s=e==null?0:e.length;for(this.__data__=new Gt;++n<s;)this.add(e[n])}function vd(e){return this.__data__.set(e,m),this}function wd(e){return this.__data__.has(e)}An.prototype.add=An.prototype.push=vd,An.prototype.has=wd;function yt(e){var n=this.__data__=new Bt(e);this.size=n.size}function Sd(){this.__data__=new Bt,this.size=0}function Ed(e){var n=this.__data__,s=n.delete(e);return this.size=n.size,s}function Cd(e){return this.__data__.get(e)}function yd(e){return this.__data__.has(e)}function Td(e,n){var s=this.__data__;if(s instanceof Bt){var u=s.__data__;if(!Nr||u.length<o-1)return u.push([e,n]),this.size=++s.size,this;s=this.__data__=new Gt(u)}return s.set(e,n),this.size=s.size,this}yt.prototype.clear=Sd,yt.prototype.delete=Ed,yt.prototype.get=Cd,yt.prototype.has=yd,yt.prototype.set=Td;function au(e,n){var s=Y(e),u=!s&&Nn(e),h=!s&&!u&&ln(e),p=!s&&!u&&!h&&ir(e),_=s||u||h||p,v=_?Fs(e.length,Of):[],C=v.length;for(var P in e)(n||se.call(e,P))&&!(_&&(P=="length"||h&&(P=="offset"||P=="parent")||p&&(P=="buffer"||P=="byteLength"||P=="byteOffset")||zt(P,C)))&&v.push(P);return v}function ou(e){var n=e.length;return n?e[na(0,n-1)]:r}function bd(e,n){return Bi(ze(e),Pn(n,0,e.length))}function Rd(e){return Bi(ze(e))}function qs(e,n,s){(s!==r&&!bt(e[n],s)||s===r&&!(n in e))&&Ot(e,n,s)}function Dr(e,n,s){var u=e[n];(!(se.call(e,n)&&bt(u,s))||s===r&&!(n in e))&&Ot(e,n,s)}function xi(e,n){for(var s=e.length;s--;)if(bt(e[s][0],n))return s;return-1}function Ad(e,n,s,u){return sn(e,function(h,p,_){n(u,h,s(h),_)}),u}function uu(e,n){return e&&Dt(n,Le(n),e)}function Pd(e,n){return e&&Dt(n,Ye(n),e)}function Ot(e,n,s){n=="__proto__"&&Ti?Ti(e,n,{configurable:!0,enumerable:!0,value:s,writable:!0}):e[n]=s}function zs(e,n){for(var s=-1,u=n.length,h=b(u),p=e==null;++s<u;)h[s]=p?r:Pa(e,n[s]);return h}function Pn(e,n,s){return e===e&&(s!==r&&(e=e<=s?e:s),n!==r&&(e=e>=n?e:n)),e}function ht(e,n,s,u,h,p){var _,v=n&E,C=n&T,P=n&R;if(s&&(_=h?s(e,u,h,p):s(e)),_!==r)return _;if(!pe(e))return e;var I=Y(e);if(I){if(_=mg(e),!v)return ze(e,_)}else{var L=ke(e),k=L==ui||L==uo;if(ln(e))return Nu(e,v);if(L==Vt||L==Gn||k&&!h){if(_=C||k?{}:Xu(e),!v)return C?sg(e,Pd(_,e)):ig(e,uu(_,e))}else{if(!ce[L])return h?e:{};_=_g(e,L,v)}}p||(p=new yt);var H=p.get(e);if(H)return H;p.set(e,_),Rl(e)?e.forEach(function(V){_.add(ht(V,n,s,V,e,p))}):Tl(e)&&e.forEach(function(V,ee){_.set(ee,ht(V,n,s,ee,e,p))});var Q=P?C?da:fa:C?Ye:Le,X=I?r:Q(e);return et(X||e,function(V,ee){X&&(ee=V,V=e[ee]),Dr(_,ee,ht(V,n,s,ee,e,p))}),_}function Id(e){var n=Le(e);return function(s){return lu(s,e,n)}}function lu(e,n,s){var u=s.length;if(e==null)return!u;for(e=le(e);u--;){var h=s[u],p=n[h],_=e[h];if(_===r&&!(h in e)||!p(_))return!1}return!0}function cu(e,n,s){if(typeof e!="function")throw new lt(l);return Br(function(){e.apply(r,s)},n)}function Mr(e,n,s,u){var h=-1,p=di,_=!0,v=e.length,C=[],P=n.length;if(!v)return C;s&&(n=de(n,tt(s))),u?(p=Us,_=!1):n.length>=o&&(p=xr,_=!1,n=new An(n));e:for(;++h<v;){var I=e[h],L=s==null?I:s(I);if(I=u||I!==0?I:0,_&&L===L){for(var k=P;k--;)if(n[k]===L)continue e;C.push(I)}else p(n,L,u)||C.push(I)}return C}var sn=Mu($t),hu=Mu(Ys,!0);function xd(e,n){var s=!0;return sn(e,function(u,h,p){return s=!!n(u,h,p),s}),s}function Li(e,n,s){for(var u=-1,h=e.length;++u<h;){var p=e[u],_=n(p);if(_!=null&&(v===r?_===_&&!rt(_):s(_,v)))var v=_,C=p}return C}function Ld(e,n,s,u){var h=e.length;for(s=J(s),s<0&&(s=-s>h?0:h+s),u=u===r||u>h?h:J(u),u<0&&(u+=h),u=s>u?0:Pl(u);s<u;)e[s++]=n;return e}function fu(e,n){var s=[];return sn(e,function(u,h,p){n(u,h,p)&&s.push(u)}),s}function Oe(e,n,s,u,h){var p=-1,_=e.length;for(s||(s=wg),h||(h=[]);++p<_;){var v=e[p];n>0&&s(v)?n>1?Oe(v,n-1,s,u,h):tn(h,v):u||(h[h.length]=v)}return h}var Ks=ku(),du=ku(!0);function $t(e,n){return e&&Ks(e,n,Le)}function Ys(e,n){return e&&du(e,n,Le)}function Ni(e,n){return en(n,function(s){return Kt(e[s])})}function In(e,n){n=on(n,e);for(var s=0,u=n.length;e!=null&&s<u;)e=e[Tt(n[s++])];return s&&s==u?e:r}function gu(e,n,s){var u=n(e);return Y(e)?u:tn(u,s(e))}function Be(e){return e==null?e===r?ah:ih:bn&&bn in le(e)?dg(e):Rg(e)}function Js(e,n){return e>n}function Nd(e,n){return e!=null&&se.call(e,n)}function Ud(e,n){return e!=null&&n in le(e)}function Od(e,n,s){return e>=Me(n,s)&&e<be(n,s)}function Xs(e,n,s){for(var u=s?Us:di,h=e[0].length,p=e.length,_=p,v=b(p),C=1/0,P=[];_--;){var I=e[_];_&&n&&(I=de(I,tt(n))),C=Me(I.length,C),v[_]=!s&&(n||h>=120&&I.length>=120)?new An(_&&I):r}I=e[0];var L=-1,k=v[0];e:for(;++L<h&&P.length<C;){var H=I[L],Q=n?n(H):H;if(H=s||H!==0?H:0,!(k?xr(k,Q):u(P,Q,s))){for(_=p;--_;){var X=v[_];if(!(X?xr(X,Q):u(e[_],Q,s)))continue e}k&&k.push(Q),P.push(H)}}return P}function $d(e,n,s,u){return $t(e,function(h,p,_){n(u,s(h),p,_)}),u}function kr(e,n,s){n=on(n,e),e=tl(e,n);var u=e==null?e:e[Tt(dt(n))];return u==null?r:je(u,e,s)}function pu(e){return _e(e)&&Be(e)==Gn}function Dd(e){return _e(e)&&Be(e)==Ir}function Md(e){return _e(e)&&Be(e)==Tr}function Fr(e,n,s,u,h){return e===n?!0:e==null||n==null||!_e(e)&&!_e(n)?e!==e&&n!==n:kd(e,n,s,u,Fr,h)}function kd(e,n,s,u,h,p){var _=Y(e),v=Y(n),C=_?ai:ke(e),P=v?ai:ke(n);C=C==Gn?Vt:C,P=P==Gn?Vt:P;var I=C==Vt,L=P==Vt,k=C==P;if(k&&ln(e)){if(!ln(n))return!1;_=!0,I=!1}if(k&&!I)return p||(p=new yt),_||ir(e)?Ku(e,n,s,u,h,p):hg(e,n,C,s,u,h,p);if(!(s&x)){var H=I&&se.call(e,"__wrapped__"),Q=L&&se.call(n,"__wrapped__");if(H||Q){var X=H?e.value():e,V=Q?n.value():n;return p||(p=new yt),h(X,V,s,u,p)}}return k?(p||(p=new yt),fg(e,n,s,u,h,p)):!1}function Fd(e){return _e(e)&&ke(e)==St}function Zs(e,n,s,u){var h=s.length,p=h,_=!u;if(e==null)return!p;for(e=le(e);h--;){var v=s[h];if(_&&v[2]?v[1]!==e[v[0]]:!(v[0]in e))return!1}for(;++h<p;){v=s[h];var C=v[0],P=e[C],I=v[1];if(_&&v[2]){if(P===r&&!(C in e))return!1}else{var L=new yt;if(u)var k=u(P,I,C,e,n,L);if(!(k===r?Fr(I,P,x|$,u,L):k))return!1}}return!0}function mu(e){if(!pe(e)||Eg(e))return!1;var n=Kt(e)?Ff:Ph;return n.test(Ln(e))}function Hd(e){return _e(e)&&Be(e)==Rr}function Wd(e){return _e(e)&&ke(e)==Et}function Vd(e){return _e(e)&&Yi(e.length)&&!!he[Be(e)]}function _u(e){return typeof e=="function"?e:e==null?Je:typeof e=="object"?Y(e)?Su(e[0],e[1]):wu(e):Hl(e)}function js(e){if(!Vr(e))return Qf(e);var n=[];for(var s in le(e))se.call(e,s)&&s!="constructor"&&n.push(s);return n}function Bd(e){if(!pe(e))return bg(e);var n=Vr(e),s=[];for(var u in e)u=="constructor"&&(n||!se.call(e,u))||s.push(u);return s}function ea(e,n){return e<n}function vu(e,n){var s=-1,u=Ke(e)?b(e.length):[];return sn(e,function(h,p,_){u[++s]=n(h,p,_)}),u}function wu(e){var n=pa(e);return n.length==1&&n[0][2]?ju(n[0][0],n[0][1]):function(s){return s===e||Zs(s,e,n)}}function Su(e,n){return _a(e)&&Zu(n)?ju(Tt(e),n):function(s){var u=Pa(s,e);return u===r&&u===n?Ia(s,e):Fr(n,u,x|$)}}function Ui(e,n,s,u,h){e!==n&&Ks(n,function(p,_){if(h||(h=new yt),pe(p))Gd(e,n,_,s,Ui,u,h);else{var v=u?u(wa(e,_),p,_+"",e,n,h):r;v===r&&(v=p),qs(e,_,v)}},Ye)}function Gd(e,n,s,u,h,p,_){var v=wa(e,s),C=wa(n,s),P=_.get(C);if(P){qs(e,s,P);return}var I=p?p(v,C,s+"",e,n,_):r,L=I===r;if(L){var k=Y(C),H=!k&&ln(C),Q=!k&&!H&&ir(C);I=C,k||H||Q?Y(v)?I=v:ve(v)?I=ze(v):H?(L=!1,I=Nu(C,!0)):Q?(L=!1,I=Uu(C,!0)):I=[]:Gr(C)||Nn(C)?(I=v,Nn(v)?I=Il(v):(!pe(v)||Kt(v))&&(I=Xu(C))):L=!1}L&&(_.set(C,I),h(I,C,u,p,_),_.delete(C)),qs(e,s,I)}function Eu(e,n){var s=e.length;if(s)return n+=n<0?s:0,zt(n,s)?e[n]:r}function Cu(e,n,s){n.length?n=de(n,function(p){return Y(p)?function(_){return In(_,p.length===1?p[0]:p)}:p}):n=[Je];var u=-1;n=de(n,tt(B()));var h=vu(e,function(p,_,v){var C=de(n,function(P){return P(p)});return{criteria:C,index:++u,value:p}});return _f(h,function(p,_){return rg(p,_,s)})}function Qd(e,n){return yu(e,n,function(s,u){return Ia(e,u)})}function yu(e,n,s){for(var u=-1,h=n.length,p={};++u<h;){var _=n[u],v=In(e,_);s(v,_)&&Hr(p,on(_,e),v)}return p}function qd(e){return function(n){return In(n,e)}}function ta(e,n,s,u){var h=u?mf:zn,p=-1,_=n.length,v=e;for(e===n&&(n=ze(n)),s&&(v=de(e,tt(s)));++p<_;)for(var C=0,P=n[p],I=s?s(P):P;(C=h(v,I,C,u))>-1;)v!==e&&yi.call(v,C,1),yi.call(e,C,1);return e}function Tu(e,n){for(var s=e?n.length:0,u=s-1;s--;){var h=n[s];if(s==u||h!==p){var p=h;zt(h)?yi.call(e,h,1):sa(e,h)}}return e}function na(e,n){return e+Ri(iu()*(n-e+1))}function zd(e,n,s,u){for(var h=-1,p=be(bi((n-e)/(s||1)),0),_=b(p);p--;)_[u?p:++h]=e,e+=s;return _}function ra(e,n){var s="";if(!e||n<1||n>oe)return s;do n%2&&(s+=e),n=Ri(n/2),n&&(e+=e);while(n);return s}function j(e,n){return Sa(el(e,n,Je),e+"")}function Kd(e){return ou(sr(e))}function Yd(e,n){var s=sr(e);return Bi(s,Pn(n,0,s.length))}function Hr(e,n,s,u){if(!pe(e))return e;n=on(n,e);for(var h=-1,p=n.length,_=p-1,v=e;v!=null&&++h<p;){var C=Tt(n[h]),P=s;if(C==="__proto__"||C==="constructor"||C==="prototype")return e;if(h!=_){var I=v[C];P=u?u(I,C,v):r,P===r&&(P=pe(I)?I:zt(n[h+1])?[]:{})}Dr(v,C,P),v=v[C]}return e}var bu=Ai?function(e,n){return Ai.set(e,n),e}:Je,Jd=Ti?function(e,n){return Ti(e,"toString",{configurable:!0,enumerable:!1,value:La(n),writable:!0})}:Je;function Xd(e){return Bi(sr(e))}function ft(e,n,s){var u=-1,h=e.length;n<0&&(n=-n>h?0:h+n),s=s>h?h:s,s<0&&(s+=h),h=n>s?0:s-n>>>0,n>>>=0;for(var p=b(h);++u<h;)p[u]=e[u+n];return p}function Zd(e,n){var s;return sn(e,function(u,h,p){return s=n(u,h,p),!s}),!!s}function Oi(e,n,s){var u=0,h=e==null?u:e.length;if(typeof n=="number"&&n===n&&h<=eh){for(;u<h;){var p=u+h>>>1,_=e[p];_!==null&&!rt(_)&&(s?_<=n:_<n)?u=p+1:h=p}return h}return ia(e,n,Je,s)}function ia(e,n,s,u){var h=0,p=e==null?0:e.length;if(p===0)return 0;n=s(n);for(var _=n!==n,v=n===null,C=rt(n),P=n===r;h<p;){var I=Ri((h+p)/2),L=s(e[I]),k=L!==r,H=L===null,Q=L===L,X=rt(L);if(_)var V=u||Q;else P?V=Q&&(u||k):v?V=Q&&k&&(u||!H):C?V=Q&&k&&!H&&(u||!X):H||X?V=!1:V=u?L<=n:L<n;V?h=I+1:p=I}return Me(p,jc)}function Ru(e,n){for(var s=-1,u=e.length,h=0,p=[];++s<u;){var _=e[s],v=n?n(_):_;if(!s||!bt(v,C)){var C=v;p[h++]=_===0?0:_}}return p}function Au(e){return typeof e=="number"?e:rt(e)?jt:+e}function nt(e){if(typeof e=="string")return e;if(Y(e))return de(e,nt)+"";if(rt(e))return su?su.call(e):"";var n=e+"";return n=="0"&&1/e==-ot?"-0":n}function an(e,n,s){var u=-1,h=di,p=e.length,_=!0,v=[],C=v;if(s)_=!1,h=Us;else if(p>=o){var P=n?null:lg(e);if(P)return pi(P);_=!1,h=xr,C=new An}else C=n?[]:v;e:for(;++u<p;){var I=e[u],L=n?n(I):I;if(I=s||I!==0?I:0,_&&L===L){for(var k=C.length;k--;)if(C[k]===L)continue e;n&&C.push(L),v.push(I)}else h(C,L,s)||(C!==v&&C.push(L),v.push(I))}return v}function sa(e,n){n=on(n,e);var s=-1,u=n.length;if(!u)return!0;for(;++s<u;){var h=Tt(n[s]);if(h==="__proto__"&&!se.call(e,"__proto__")||(h==="constructor"||h==="prototype")&&s<u-1)return!1}var p=tl(e,n);return p==null||delete p[Tt(dt(n))]}function Pu(e,n,s,u){return Hr(e,n,s(In(e,n)),u)}function $i(e,n,s,u){for(var h=e.length,p=u?h:-1;(u?p--:++p<h)&&n(e[p],p,e););return s?ft(e,u?0:p,u?p+1:h):ft(e,u?p+1:0,u?h:p)}function Iu(e,n){var s=e;return s instanceof ne&&(s=s.value()),Os(n,function(u,h){return h.func.apply(h.thisArg,tn([u],h.args))},s)}function aa(e,n,s){var u=e.length;if(u<2)return u?an(e[0]):[];for(var h=-1,p=b(u);++h<u;)for(var _=e[h],v=-1;++v<u;)v!=h&&(p[h]=Mr(p[h]||_,e[v],n,s));return an(Oe(p,1),n,s)}function xu(e,n,s){for(var u=-1,h=e.length,p=n.length,_={};++u<h;){var v=u<p?n[u]:r;s(_,e[u],v)}return _}function oa(e){return ve(e)?e:[]}function ua(e){return typeof e=="function"?e:Je}function on(e,n){return Y(e)?e:_a(e,n)?[e]:sl(ae(e))}var jd=j;function un(e,n,s){var u=e.length;return s=s===r?u:s,!n&&s>=u?e:ft(e,n,s)}var Lu=Hf||function(e){return Ue.clearTimeout(e)};function Nu(e,n){if(n)return e.slice();var s=e.length,u=jo?jo(s):new e.constructor(s);return e.copy(u),u}function la(e){var n=new e.constructor(e.byteLength);return new Ei(n).set(new Ei(e)),n}function eg(e,n){var s=n?la(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.byteLength)}function tg(e){var n=new e.constructor(e.source,po.exec(e));return n.lastIndex=e.lastIndex,n}function ng(e){return $r?le($r.call(e)):{}}function Uu(e,n){var s=n?la(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)}function Ou(e,n){if(e!==n){var s=e!==r,u=e===null,h=e===e,p=rt(e),_=n!==r,v=n===null,C=n===n,P=rt(n);if(!v&&!P&&!p&&e>n||p&&_&&C&&!v&&!P||u&&_&&C||!s&&C||!h)return 1;if(!u&&!p&&!P&&e<n||P&&s&&h&&!u&&!p||v&&s&&h||!_&&h||!C)return-1}return 0}function rg(e,n,s){for(var u=-1,h=e.criteria,p=n.criteria,_=h.length,v=s.length;++u<_;){var C=Ou(h[u],p[u]);if(C){if(u>=v)return C;var P=s[u];return C*(P=="desc"?-1:1)}}return e.index-n.index}function $u(e,n,s,u){for(var h=-1,p=e.length,_=s.length,v=-1,C=n.length,P=be(p-_,0),I=b(C+P),L=!u;++v<C;)I[v]=n[v];for(;++h<_;)(L||h<p)&&(I[s[h]]=e[h]);for(;P--;)I[v++]=e[h++];return I}function Du(e,n,s,u){for(var h=-1,p=e.length,_=-1,v=s.length,C=-1,P=n.length,I=be(p-v,0),L=b(I+P),k=!u;++h<I;)L[h]=e[h];for(var H=h;++C<P;)L[H+C]=n[C];for(;++_<v;)(k||h<p)&&(L[H+s[_]]=e[h++]);return L}function ze(e,n){var s=-1,u=e.length;for(n||(n=b(u));++s<u;)n[s]=e[s];return n}function Dt(e,n,s,u){var h=!s;s||(s={});for(var p=-1,_=n.length;++p<_;){var v=n[p],C=u?u(s[v],e[v],v,s,e):r;C===r&&(C=e[v]),h?Ot(s,v,C):Dr(s,v,C)}return s}function ig(e,n){return Dt(e,ma(e),n)}function sg(e,n){return Dt(e,Yu(e),n)}function Di(e,n){return function(s,u){var h=Y(s)?cf:Ad,p=n?n():{};return h(s,e,B(u,2),p)}}function tr(e){return j(function(n,s){var u=-1,h=s.length,p=h>1?s[h-1]:r,_=h>2?s[2]:r;for(p=e.length>3&&typeof p=="function"?(h--,p):r,_&&Ge(s[0],s[1],_)&&(p=h<3?r:p,h=1),n=le(n);++u<h;){var v=s[u];v&&e(n,v,u,p)}return n})}function Mu(e,n){return function(s,u){if(s==null)return s;if(!Ke(s))return e(s,u);for(var h=s.length,p=n?h:-1,_=le(s);(n?p--:++p<h)&&u(_[p],p,_)!==!1;);return s}}function ku(e){return function(n,s,u){for(var h=-1,p=le(n),_=u(n),v=_.length;v--;){var C=_[e?v:++h];if(s(p[C],C,p)===!1)break}return n}}function ag(e,n,s){var u=n&W,h=Wr(e);function p(){var _=this&&this!==Ue&&this instanceof p?h:e;return _.apply(u?s:this,arguments)}return p}function Fu(e){return function(n){n=ae(n);var s=Kn(n)?Ct(n):r,u=s?s[0]:n.charAt(0),h=s?un(s,1).join(""):n.slice(1);return u[e]()+h}}function nr(e){return function(n){return Os(kl(Ml(n).replace(Yh,"")),e,"")}}function Wr(e){return function(){var n=arguments;switch(n.length){case 0:return new e;case 1:return new e(n[0]);case 2:return new e(n[0],n[1]);case 3:return new e(n[0],n[1],n[2]);case 4:return new e(n[0],n[1],n[2],n[3]);case 5:return new e(n[0],n[1],n[2],n[3],n[4]);case 6:return new e(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new e(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var s=er(e.prototype),u=e.apply(s,n);return pe(u)?u:s}}function og(e,n,s){var u=Wr(e);function h(){for(var p=arguments.length,_=b(p),v=p,C=rr(h);v--;)_[v]=arguments[v];var P=p<3&&_[0]!==C&&_[p-1]!==C?[]:nn(_,C);if(p-=P.length,p<s)return Gu(e,n,Mi,h.placeholder,r,_,P,r,r,s-p);var I=this&&this!==Ue&&this instanceof h?u:e;return je(I,this,_)}return h}function Hu(e){return function(n,s,u){var h=le(n);if(!Ke(n)){var p=B(s,3);n=Le(n),s=function(v){return p(h[v],v,h)}}var _=e(n,s,u);return _>-1?h[p?n[_]:_]:r}}function Wu(e){return qt(function(n){var s=n.length,u=s,h=ct.prototype.thru;for(e&&n.reverse();u--;){var p=n[u];if(typeof p!="function")throw new lt(l);if(h&&!_&&Wi(p)=="wrapper")var _=new ct([],!0)}for(u=_?u:s;++u<s;){p=n[u];var v=Wi(p),C=v=="wrapper"?ga(p):r;C&&va(C[0])&&C[1]==(Pe|Re|me|Ie)&&!C[4].length&&C[9]==1?_=_[Wi(C[0])].apply(_,C[3]):_=p.length==1&&va(p)?_[v]():_.thru(p)}return function(){var P=arguments,I=P[0];if(_&&P.length==1&&Y(I))return _.plant(I).value();for(var L=0,k=s?n[L].apply(this,P):I;++L<s;)k=n[L].call(this,k);return k}})}function Mi(e,n,s,u,h,p,_,v,C,P){var I=n&Pe,L=n&W,k=n&Z,H=n&(Re|Ae),Q=n&Ee,X=k?r:Wr(e);function V(){for(var ee=arguments.length,re=b(ee),it=ee;it--;)re[it]=arguments[it];if(H)var Qe=rr(V),st=wf(re,Qe);if(u&&(re=$u(re,u,h,H)),p&&(re=Du(re,p,_,H)),ee-=st,H&&ee<P){var we=nn(re,Qe);return Gu(e,n,Mi,V.placeholder,s,re,we,v,C,P-ee)}var Rt=L?s:this,Jt=k?Rt[e]:e;return ee=re.length,v?re=Ag(re,v):Q&&ee>1&&re.reverse(),I&&C<ee&&(re.length=C),this&&this!==Ue&&this instanceof V&&(Jt=X||Wr(Jt)),Jt.apply(Rt,re)}return V}function Vu(e,n){return function(s,u){return $d(s,e,n(u),{})}}function ki(e,n){return function(s,u){var h;if(s===r&&u===r)return n;if(s!==r&&(h=s),u!==r){if(h===r)return u;typeof s=="string"||typeof u=="string"?(s=nt(s),u=nt(u)):(s=Au(s),u=Au(u)),h=e(s,u)}return h}}function ca(e){return qt(function(n){return n=de(n,tt(B())),j(function(s){var u=this;return e(n,function(h){return je(h,u,s)})})})}function Fi(e,n){n=n===r?" ":nt(n);var s=n.length;if(s<2)return s?ra(n,e):n;var u=ra(n,bi(e/Yn(n)));return Kn(n)?un(Ct(u),0,e).join(""):u.slice(0,e)}function ug(e,n,s,u){var h=n&W,p=Wr(e);function _(){for(var v=-1,C=arguments.length,P=-1,I=u.length,L=b(I+C),k=this&&this!==Ue&&this instanceof _?p:e;++P<I;)L[P]=u[P];for(;C--;)L[P++]=arguments[++v];return je(k,h?s:this,L)}return _}function Bu(e){return function(n,s,u){return u&&typeof u!="number"&&Ge(n,s,u)&&(s=u=r),n=Yt(n),s===r?(s=n,n=0):s=Yt(s),u=u===r?n<s?1:-1:Yt(u),zd(n,s,u,e)}}function Hi(e){return function(n,s){return typeof n=="string"&&typeof s=="string"||(n=gt(n),s=gt(s)),e(n,s)}}function Gu(e,n,s,u,h,p,_,v,C,P){var I=n&Re,L=I?_:r,k=I?r:_,H=I?p:r,Q=I?r:p;n|=I?me:Ze,n&=~(I?Ze:me),n&Se||(n&=-4);var X=[e,n,h,H,L,Q,k,v,C,P],V=s.apply(r,X);return va(e)&&nl(V,X),V.placeholder=u,rl(V,e,n)}function ha(e){var n=Te[e];return function(s,u){if(s=gt(s),u=u==null?0:Me(J(u),292),u&&ru(s)){var h=(ae(s)+"e").split("e"),p=n(h[0]+"e"+(+h[1]+u));return h=(ae(p)+"e").split("e"),+(h[0]+"e"+(+h[1]-u))}return n(s)}}var lg=Zn&&1/pi(new Zn([,-0]))[1]==ot?function(e){return new Zn(e)}:Oa;function Qu(e){return function(n){var s=ke(n);return s==St?Ws(n):s==Et?Rf(n):vf(n,e(n))}}function Qt(e,n,s,u,h,p,_,v){var C=n&Z;if(!C&&typeof e!="function")throw new lt(l);var P=u?u.length:0;if(P||(n&=-97,u=h=r),_=_===r?_:be(J(_),0),v=v===r?v:J(v),P-=h?h.length:0,n&Ze){var I=u,L=h;u=h=r}var k=C?r:ga(e),H=[e,n,s,u,h,I,L,p,_,v];if(k&&Tg(H,k),e=H[0],n=H[1],s=H[2],u=H[3],h=H[4],v=H[9]=H[9]===r?C?0:e.length:be(H[9]-P,0),!v&&n&(Re|Ae)&&(n&=-25),!n||n==W)var Q=ag(e,n,s);else n==Re||n==Ae?Q=og(e,n,v):(n==me||n==(W|me))&&!h.length?Q=ug(e,n,s,u):Q=Mi.apply(r,H);var X=k?bu:nl;return rl(X(Q,H),e,n)}function qu(e,n,s,u){return e===r||bt(e,Xn[s])&&!se.call(u,s)?n:e}function zu(e,n,s,u,h,p){return pe(e)&&pe(n)&&(p.set(n,e),Ui(e,n,r,zu,p),p.delete(n)),e}function cg(e){return Gr(e)?r:e}function Ku(e,n,s,u,h,p){var _=s&x,v=e.length,C=n.length;if(v!=C&&!(_&&C>v))return!1;var P=p.get(e),I=p.get(n);if(P&&I)return P==n&&I==e;var L=-1,k=!0,H=s&$?new An:r;for(p.set(e,n),p.set(n,e);++L<v;){var Q=e[L],X=n[L];if(u)var V=_?u(X,Q,L,n,e,p):u(Q,X,L,e,n,p);if(V!==r){if(V)continue;k=!1;break}if(H){if(!$s(n,function(ee,re){if(!xr(H,re)&&(Q===ee||h(Q,ee,s,u,p)))return H.push(re)})){k=!1;break}}else if(!(Q===X||h(Q,X,s,u,p))){k=!1;break}}return p.delete(e),p.delete(n),k}function hg(e,n,s,u,h,p,_){switch(s){case Qn:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case Ir:return!(e.byteLength!=n.byteLength||!p(new Ei(e),new Ei(n)));case yr:case Tr:case br:return bt(+e,+n);case oi:return e.name==n.name&&e.message==n.message;case Rr:case Ar:return e==n+"";case St:var v=Ws;case Et:var C=u&x;if(v||(v=pi),e.size!=n.size&&!C)return!1;var P=_.get(e);if(P)return P==n;u|=$,_.set(e,n);var I=Ku(v(e),v(n),u,h,p,_);return _.delete(e),I;case li:if($r)return $r.call(e)==$r.call(n)}return!1}function fg(e,n,s,u,h,p){var _=s&x,v=fa(e),C=v.length,P=fa(n),I=P.length;if(C!=I&&!_)return!1;for(var L=C;L--;){var k=v[L];if(!(_?k in n:se.call(n,k)))return!1}var H=p.get(e),Q=p.get(n);if(H&&Q)return H==n&&Q==e;var X=!0;p.set(e,n),p.set(n,e);for(var V=_;++L<C;){k=v[L];var ee=e[k],re=n[k];if(u)var it=_?u(re,ee,k,n,e,p):u(ee,re,k,e,n,p);if(!(it===r?ee===re||h(ee,re,s,u,p):it)){X=!1;break}V||(V=k=="constructor")}if(X&&!V){var Qe=e.constructor,st=n.constructor;Qe!=st&&"constructor"in e&&"constructor"in n&&!(typeof Qe=="function"&&Qe instanceof Qe&&typeof st=="function"&&st instanceof st)&&(X=!1)}return p.delete(e),p.delete(n),X}function qt(e){return Sa(el(e,r,ll),e+"")}function fa(e){return gu(e,Le,ma)}function da(e){return gu(e,Ye,Yu)}var ga=Ai?function(e){return Ai.get(e)}:Oa;function Wi(e){for(var n=e.name+"",s=jn[n],u=se.call(jn,n)?s.length:0;u--;){var h=s[u],p=h.func;if(p==null||p==e)return h.name}return n}function rr(e){var n=se.call(g,"placeholder")?g:e;return n.placeholder}function B(){var e=g.iteratee||Na;return e=e===Na?_u:e,arguments.length?e(arguments[0],arguments[1]):e}function Vi(e,n){var s=e.__data__;return Sg(n)?s[typeof n=="string"?"string":"hash"]:s.map}function pa(e){for(var n=Le(e),s=n.length;s--;){var u=n[s],h=e[u];n[s]=[u,h,Zu(h)]}return n}function xn(e,n){var s=yf(e,n);return mu(s)?s:r}function dg(e){var n=se.call(e,bn),s=e[bn];try{e[bn]=r;var u=!0}catch{}var h=wi.call(e);return u&&(n?e[bn]=s:delete e[bn]),h}var ma=Bs?function(e){return e==null?[]:(e=le(e),en(Bs(e),function(n){return tu.call(e,n)}))}:$a,Yu=Bs?function(e){for(var n=[];e;)tn(n,ma(e)),e=Ci(e);return n}:$a,ke=Be;(Gs&&ke(new Gs(new ArrayBuffer(1)))!=Qn||Nr&&ke(new Nr)!=St||Qs&&ke(Qs.resolve())!=lo||Zn&&ke(new Zn)!=Et||Ur&&ke(new Ur)!=Pr)&&(ke=function(e){var n=Be(e),s=n==Vt?e.constructor:r,u=s?Ln(s):"";if(u)switch(u){case Yf:return Qn;case Jf:return St;case Xf:return lo;case Zf:return Et;case jf:return Pr}return n});function gg(e,n,s){for(var u=-1,h=s.length;++u<h;){var p=s[u],_=p.size;switch(p.type){case"drop":e+=_;break;case"dropRight":n-=_;break;case"take":n=Me(n,e+_);break;case"takeRight":e=be(e,n-_);break}}return{start:e,end:n}}function pg(e){var n=e.match(Eh);return n?n[1].split(Ch):[]}function Ju(e,n,s){n=on(n,e);for(var u=-1,h=n.length,p=!1;++u<h;){var _=Tt(n[u]);if(!(p=e!=null&&s(e,_)))break;e=e[_]}return p||++u!=h?p:(h=e==null?0:e.length,!!h&&Yi(h)&&zt(_,h)&&(Y(e)||Nn(e)))}function mg(e){var n=e.length,s=new e.constructor(n);return n&&typeof e[0]=="string"&&se.call(e,"index")&&(s.index=e.index,s.input=e.input),s}function Xu(e){return typeof e.constructor=="function"&&!Vr(e)?er(Ci(e)):{}}function _g(e,n,s){var u=e.constructor;switch(n){case Ir:return la(e);case yr:case Tr:return new u(+e);case Qn:return eg(e,s);case ps:case ms:case _s:case vs:case ws:case Ss:case Es:case Cs:case ys:return Uu(e,s);case St:return new u;case br:case Ar:return new u(e);case Rr:return tg(e);case Et:return new u;case li:return ng(e)}}function vg(e,n){var s=n.length;if(!s)return e;var u=s-1;return n[u]=(s>1?"& ":"")+n[u],n=n.join(s>2?", ":" "),e.replace(Sh,`{
|
|
2
|
+
/* [wrapped with `+n+`] */
|
|
3
|
+
`)}function wg(e){return Y(e)||Nn(e)||!!(nu&&e&&e[nu])}function zt(e,n){var s=typeof e;return n=n??oe,!!n&&(s=="number"||s!="symbol"&&xh.test(e))&&e>-1&&e%1==0&&e<n}function Ge(e,n,s){if(!pe(s))return!1;var u=typeof n;return(u=="number"?Ke(s)&&zt(n,s.length):u=="string"&&n in s)?bt(s[n],e):!1}function _a(e,n){if(Y(e))return!1;var s=typeof e;return s=="number"||s=="symbol"||s=="boolean"||e==null||rt(e)?!0:mh.test(e)||!ph.test(e)||n!=null&&e in le(n)}function Sg(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}function va(e){var n=Wi(e),s=g[n];if(typeof s!="function"||!(n in ne.prototype))return!1;if(e===s)return!0;var u=ga(s);return!!u&&e===u[0]}function Eg(e){return!!Zo&&Zo in e}var Cg=_i?Kt:Da;function Vr(e){var n=e&&e.constructor,s=typeof n=="function"&&n.prototype||Xn;return e===s}function Zu(e){return e===e&&!pe(e)}function ju(e,n){return function(s){return s==null?!1:s[e]===n&&(n!==r||e in le(s))}}function yg(e){var n=zi(e,function(u){return s.size===S&&s.clear(),u}),s=n.cache;return n}function Tg(e,n){var s=e[1],u=n[1],h=s|u,p=h<(W|Z|Pe),_=u==Pe&&s==Re||u==Pe&&s==Ie&&e[7].length<=n[8]||u==(Pe|Ie)&&n[7].length<=n[8]&&s==Re;if(!(p||_))return e;u&W&&(e[2]=n[2],h|=s&W?0:Se);var v=n[3];if(v){var C=e[3];e[3]=C?$u(C,v,n[4]):v,e[4]=C?nn(e[3],y):n[4]}return v=n[5],v&&(C=e[5],e[5]=C?Du(C,v,n[6]):v,e[6]=C?nn(e[5],y):n[6]),v=n[7],v&&(e[7]=v),u&Pe&&(e[8]=e[8]==null?n[8]:Me(e[8],n[8])),e[9]==null&&(e[9]=n[9]),e[0]=n[0],e[1]=h,e}function bg(e){var n=[];if(e!=null)for(var s in le(e))n.push(s);return n}function Rg(e){return wi.call(e)}function el(e,n,s){return n=be(n===r?e.length-1:n,0),function(){for(var u=arguments,h=-1,p=be(u.length-n,0),_=b(p);++h<p;)_[h]=u[n+h];h=-1;for(var v=b(n+1);++h<n;)v[h]=u[h];return v[n]=s(_),je(e,this,v)}}function tl(e,n){return n.length<2?e:In(e,ft(n,0,-1))}function Ag(e,n){for(var s=e.length,u=Me(n.length,s),h=ze(e);u--;){var p=n[u];e[u]=zt(p,s)?h[p]:r}return e}function wa(e,n){if(!(n==="constructor"&&typeof e[n]=="function")&&n!="__proto__")return e[n]}var nl=il(bu),Br=Vf||function(e,n){return Ue.setTimeout(e,n)},Sa=il(Jd);function rl(e,n,s){var u=n+"";return Sa(e,vg(u,Pg(pg(u),s)))}function il(e){var n=0,s=0;return function(){var u=qf(),h=wt-(u-s);if(s=u,h>0){if(++n>=Zt)return arguments[0]}else n=0;return e.apply(r,arguments)}}function Bi(e,n){var s=-1,u=e.length,h=u-1;for(n=n===r?u:n;++s<n;){var p=na(s,h),_=e[p];e[p]=e[s],e[s]=_}return e.length=n,e}var sl=yg(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(_h,function(s,u,h,p){n.push(h?p.replace(Th,"$1"):u||s)}),n});function Tt(e){if(typeof e=="string"||rt(e))return e;var n=e+"";return n=="0"&&1/e==-ot?"-0":n}function Ln(e){if(e!=null){try{return vi.call(e)}catch{}try{return e+""}catch{}}return""}function Pg(e,n){return et(th,function(s){var u="_."+s[0];n&s[1]&&!di(e,u)&&e.push(u)}),e.sort()}function al(e){if(e instanceof ne)return e.clone();var n=new ct(e.__wrapped__,e.__chain__);return n.__actions__=ze(e.__actions__),n.__index__=e.__index__,n.__values__=e.__values__,n}function Ig(e,n,s){(s?Ge(e,n,s):n===r)?n=1:n=be(J(n),0);var u=e==null?0:e.length;if(!u||n<1)return[];for(var h=0,p=0,_=b(bi(u/n));h<u;)_[p++]=ft(e,h,h+=n);return _}function xg(e){for(var n=-1,s=e==null?0:e.length,u=0,h=[];++n<s;){var p=e[n];p&&(h[u++]=p)}return h}function Lg(){var e=arguments.length;if(!e)return[];for(var n=b(e-1),s=arguments[0],u=e;u--;)n[u-1]=arguments[u];return tn(Y(s)?ze(s):[s],Oe(n,1))}var Ng=j(function(e,n){return ve(e)?Mr(e,Oe(n,1,ve,!0)):[]}),Ug=j(function(e,n){var s=dt(n);return ve(s)&&(s=r),ve(e)?Mr(e,Oe(n,1,ve,!0),B(s,2)):[]}),Og=j(function(e,n){var s=dt(n);return ve(s)&&(s=r),ve(e)?Mr(e,Oe(n,1,ve,!0),r,s):[]});function $g(e,n,s){var u=e==null?0:e.length;return u?(n=s||n===r?1:J(n),ft(e,n<0?0:n,u)):[]}function Dg(e,n,s){var u=e==null?0:e.length;return u?(n=s||n===r?1:J(n),n=u-n,ft(e,0,n<0?0:n)):[]}function Mg(e,n){return e&&e.length?$i(e,B(n,3),!0,!0):[]}function kg(e,n){return e&&e.length?$i(e,B(n,3),!0):[]}function Fg(e,n,s,u){var h=e==null?0:e.length;return h?(s&&typeof s!="number"&&Ge(e,n,s)&&(s=0,u=h),Ld(e,n,s,u)):[]}function ol(e,n,s){var u=e==null?0:e.length;if(!u)return-1;var h=s==null?0:J(s);return h<0&&(h=be(u+h,0)),gi(e,B(n,3),h)}function ul(e,n,s){var u=e==null?0:e.length;if(!u)return-1;var h=u-1;return s!==r&&(h=J(s),h=s<0?be(u+h,0):Me(h,u-1)),gi(e,B(n,3),h,!0)}function ll(e){var n=e==null?0:e.length;return n?Oe(e,1):[]}function Hg(e){var n=e==null?0:e.length;return n?Oe(e,ot):[]}function Wg(e,n){var s=e==null?0:e.length;return s?(n=n===r?1:J(n),Oe(e,n)):[]}function Vg(e){for(var n=-1,s=e==null?0:e.length,u={};++n<s;){var h=e[n];Ot(u,h[0],h[1])}return u}function cl(e){return e&&e.length?e[0]:r}function Bg(e,n,s){var u=e==null?0:e.length;if(!u)return-1;var h=s==null?0:J(s);return h<0&&(h=be(u+h,0)),zn(e,n,h)}function Gg(e){var n=e==null?0:e.length;return n?ft(e,0,-1):[]}var Qg=j(function(e){var n=de(e,oa);return n.length&&n[0]===e[0]?Xs(n):[]}),qg=j(function(e){var n=dt(e),s=de(e,oa);return n===dt(s)?n=r:s.pop(),s.length&&s[0]===e[0]?Xs(s,B(n,2)):[]}),zg=j(function(e){var n=dt(e),s=de(e,oa);return n=typeof n=="function"?n:r,n&&s.pop(),s.length&&s[0]===e[0]?Xs(s,r,n):[]});function Kg(e,n){return e==null?"":Gf.call(e,n)}function dt(e){var n=e==null?0:e.length;return n?e[n-1]:r}function Yg(e,n,s){var u=e==null?0:e.length;if(!u)return-1;var h=u;return s!==r&&(h=J(s),h=h<0?be(u+h,0):Me(h,u-1)),n===n?Pf(e,n,h):gi(e,Go,h,!0)}function Jg(e,n){return e&&e.length?Eu(e,J(n)):r}var Xg=j(hl);function hl(e,n){return e&&e.length&&n&&n.length?ta(e,n):e}function Zg(e,n,s){return e&&e.length&&n&&n.length?ta(e,n,B(s,2)):e}function jg(e,n,s){return e&&e.length&&n&&n.length?ta(e,n,r,s):e}var ep=qt(function(e,n){var s=e==null?0:e.length,u=zs(e,n);return Tu(e,de(n,function(h){return zt(h,s)?+h:h}).sort(Ou)),u});function tp(e,n){var s=[];if(!(e&&e.length))return s;var u=-1,h=[],p=e.length;for(n=B(n,3);++u<p;){var _=e[u];n(_,u,e)&&(s.push(_),h.push(u))}return Tu(e,h),s}function Ea(e){return e==null?e:Kf.call(e)}function np(e,n,s){var u=e==null?0:e.length;return u?(s&&typeof s!="number"&&Ge(e,n,s)?(n=0,s=u):(n=n==null?0:J(n),s=s===r?u:J(s)),ft(e,n,s)):[]}function rp(e,n){return Oi(e,n)}function ip(e,n,s){return ia(e,n,B(s,2))}function sp(e,n){var s=e==null?0:e.length;if(s){var u=Oi(e,n);if(u<s&&bt(e[u],n))return u}return-1}function ap(e,n){return Oi(e,n,!0)}function op(e,n,s){return ia(e,n,B(s,2),!0)}function up(e,n){var s=e==null?0:e.length;if(s){var u=Oi(e,n,!0)-1;if(bt(e[u],n))return u}return-1}function lp(e){return e&&e.length?Ru(e):[]}function cp(e,n){return e&&e.length?Ru(e,B(n,2)):[]}function hp(e){var n=e==null?0:e.length;return n?ft(e,1,n):[]}function fp(e,n,s){return e&&e.length?(n=s||n===r?1:J(n),ft(e,0,n<0?0:n)):[]}function dp(e,n,s){var u=e==null?0:e.length;return u?(n=s||n===r?1:J(n),n=u-n,ft(e,n<0?0:n,u)):[]}function gp(e,n){return e&&e.length?$i(e,B(n,3),!1,!0):[]}function pp(e,n){return e&&e.length?$i(e,B(n,3)):[]}var mp=j(function(e){return an(Oe(e,1,ve,!0))}),_p=j(function(e){var n=dt(e);return ve(n)&&(n=r),an(Oe(e,1,ve,!0),B(n,2))}),vp=j(function(e){var n=dt(e);return n=typeof n=="function"?n:r,an(Oe(e,1,ve,!0),r,n)});function wp(e){return e&&e.length?an(e):[]}function Sp(e,n){return e&&e.length?an(e,B(n,2)):[]}function Ep(e,n){return n=typeof n=="function"?n:r,e&&e.length?an(e,r,n):[]}function Ca(e){if(!(e&&e.length))return[];var n=0;return e=en(e,function(s){if(ve(s))return n=be(s.length,n),!0}),Fs(n,function(s){return de(e,Ds(s))})}function fl(e,n){if(!(e&&e.length))return[];var s=Ca(e);return n==null?s:de(s,function(u){return je(n,r,u)})}var Cp=j(function(e,n){return ve(e)?Mr(e,n):[]}),yp=j(function(e){return aa(en(e,ve))}),Tp=j(function(e){var n=dt(e);return ve(n)&&(n=r),aa(en(e,ve),B(n,2))}),bp=j(function(e){var n=dt(e);return n=typeof n=="function"?n:r,aa(en(e,ve),r,n)}),Rp=j(Ca);function Ap(e,n){return xu(e||[],n||[],Dr)}function Pp(e,n){return xu(e||[],n||[],Hr)}var Ip=j(function(e){var n=e.length,s=n>1?e[n-1]:r;return s=typeof s=="function"?(e.pop(),s):r,fl(e,s)});function dl(e){var n=g(e);return n.__chain__=!0,n}function xp(e,n){return n(e),e}function Gi(e,n){return n(e)}var Lp=qt(function(e){var n=e.length,s=n?e[0]:0,u=this.__wrapped__,h=function(p){return zs(p,e)};return n>1||this.__actions__.length||!(u instanceof ne)||!zt(s)?this.thru(h):(u=u.slice(s,+s+(n?1:0)),u.__actions__.push({func:Gi,args:[h],thisArg:r}),new ct(u,this.__chain__).thru(function(p){return n&&!p.length&&p.push(r),p}))});function Np(){return dl(this)}function Up(){return new ct(this.value(),this.__chain__)}function Op(){this.__values__===r&&(this.__values__=Al(this.value()));var e=this.__index__>=this.__values__.length,n=e?r:this.__values__[this.__index__++];return{done:e,value:n}}function $p(){return this}function Dp(e){for(var n,s=this;s instanceof Ii;){var u=al(s);u.__index__=0,u.__values__=r,n?h.__wrapped__=u:n=u;var h=u;s=s.__wrapped__}return h.__wrapped__=e,n}function Mp(){var e=this.__wrapped__;if(e instanceof ne){var n=e;return this.__actions__.length&&(n=new ne(this)),n=n.reverse(),n.__actions__.push({func:Gi,args:[Ea],thisArg:r}),new ct(n,this.__chain__)}return this.thru(Ea)}function kp(){return Iu(this.__wrapped__,this.__actions__)}var Fp=Di(function(e,n,s){se.call(e,s)?++e[s]:Ot(e,s,1)});function Hp(e,n,s){var u=Y(e)?Vo:xd;return s&&Ge(e,n,s)&&(n=r),u(e,B(n,3))}function Wp(e,n){var s=Y(e)?en:fu;return s(e,B(n,3))}var Vp=Hu(ol),Bp=Hu(ul);function Gp(e,n){return Oe(Qi(e,n),1)}function Qp(e,n){return Oe(Qi(e,n),ot)}function qp(e,n,s){return s=s===r?1:J(s),Oe(Qi(e,n),s)}function gl(e,n){var s=Y(e)?et:sn;return s(e,B(n,3))}function pl(e,n){var s=Y(e)?hf:hu;return s(e,B(n,3))}var zp=Di(function(e,n,s){se.call(e,s)?e[s].push(n):Ot(e,s,[n])});function Kp(e,n,s,u){e=Ke(e)?e:sr(e),s=s&&!u?J(s):0;var h=e.length;return s<0&&(s=be(h+s,0)),Ji(e)?s<=h&&e.indexOf(n,s)>-1:!!h&&zn(e,n,s)>-1}var Yp=j(function(e,n,s){var u=-1,h=typeof n=="function",p=Ke(e)?b(e.length):[];return sn(e,function(_){p[++u]=h?je(n,_,s):kr(_,n,s)}),p}),Jp=Di(function(e,n,s){Ot(e,s,n)});function Qi(e,n){var s=Y(e)?de:vu;return s(e,B(n,3))}function Xp(e,n,s,u){return e==null?[]:(Y(n)||(n=n==null?[]:[n]),s=u?r:s,Y(s)||(s=s==null?[]:[s]),Cu(e,n,s))}var Zp=Di(function(e,n,s){e[s?0:1].push(n)},function(){return[[],[]]});function jp(e,n,s){var u=Y(e)?Os:qo,h=arguments.length<3;return u(e,B(n,4),s,h,sn)}function em(e,n,s){var u=Y(e)?ff:qo,h=arguments.length<3;return u(e,B(n,4),s,h,hu)}function tm(e,n){var s=Y(e)?en:fu;return s(e,Ki(B(n,3)))}function nm(e){var n=Y(e)?ou:Kd;return n(e)}function rm(e,n,s){(s?Ge(e,n,s):n===r)?n=1:n=J(n);var u=Y(e)?bd:Yd;return u(e,n)}function im(e){var n=Y(e)?Rd:Xd;return n(e)}function sm(e){if(e==null)return 0;if(Ke(e))return Ji(e)?Yn(e):e.length;var n=ke(e);return n==St||n==Et?e.size:js(e).length}function am(e,n,s){var u=Y(e)?$s:Zd;return s&&Ge(e,n,s)&&(n=r),u(e,B(n,3))}var om=j(function(e,n){if(e==null)return[];var s=n.length;return s>1&&Ge(e,n[0],n[1])?n=[]:s>2&&Ge(n[0],n[1],n[2])&&(n=[n[0]]),Cu(e,Oe(n,1),[])}),qi=Wf||function(){return Ue.Date.now()};function um(e,n){if(typeof n!="function")throw new lt(l);return e=J(e),function(){if(--e<1)return n.apply(this,arguments)}}function ml(e,n,s){return n=s?r:n,n=e&&n==null?e.length:n,Qt(e,Pe,r,r,r,r,n)}function _l(e,n){var s;if(typeof n!="function")throw new lt(l);return e=J(e),function(){return--e>0&&(s=n.apply(this,arguments)),e<=1&&(n=r),s}}var ya=j(function(e,n,s){var u=W;if(s.length){var h=nn(s,rr(ya));u|=me}return Qt(e,u,n,s,h)}),vl=j(function(e,n,s){var u=W|Z;if(s.length){var h=nn(s,rr(vl));u|=me}return Qt(n,u,e,s,h)});function wl(e,n,s){n=s?r:n;var u=Qt(e,Re,r,r,r,r,r,n);return u.placeholder=wl.placeholder,u}function Sl(e,n,s){n=s?r:n;var u=Qt(e,Ae,r,r,r,r,r,n);return u.placeholder=Sl.placeholder,u}function El(e,n,s){var u,h,p,_,v,C,P=0,I=!1,L=!1,k=!0;if(typeof e!="function")throw new lt(l);n=gt(n)||0,pe(s)&&(I=!!s.leading,L="maxWait"in s,p=L?be(gt(s.maxWait)||0,n):p,k="trailing"in s?!!s.trailing:k);function H(we){var Rt=u,Jt=h;return u=h=r,P=we,_=e.apply(Jt,Rt),_}function Q(we){return P=we,v=Br(ee,n),I?H(we):_}function X(we){var Rt=we-C,Jt=we-P,Wl=n-Rt;return L?Me(Wl,p-Jt):Wl}function V(we){var Rt=we-C,Jt=we-P;return C===r||Rt>=n||Rt<0||L&&Jt>=p}function ee(){var we=qi();if(V(we))return re(we);v=Br(ee,X(we))}function re(we){return v=r,k&&u?H(we):(u=h=r,_)}function it(){v!==r&&Lu(v),P=0,u=C=h=v=r}function Qe(){return v===r?_:re(qi())}function st(){var we=qi(),Rt=V(we);if(u=arguments,h=this,C=we,Rt){if(v===r)return Q(C);if(L)return Lu(v),v=Br(ee,n),H(C)}return v===r&&(v=Br(ee,n)),_}return st.cancel=it,st.flush=Qe,st}var lm=j(function(e,n){return cu(e,1,n)}),cm=j(function(e,n,s){return cu(e,gt(n)||0,s)});function hm(e){return Qt(e,Ee)}function zi(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new lt(l);var s=function(){var u=arguments,h=n?n.apply(this,u):u[0],p=s.cache;if(p.has(h))return p.get(h);var _=e.apply(this,u);return s.cache=p.set(h,_)||p,_};return s.cache=new(zi.Cache||Gt),s}zi.Cache=Gt;function Ki(e){if(typeof e!="function")throw new lt(l);return function(){var n=arguments;switch(n.length){case 0:return!e.call(this);case 1:return!e.call(this,n[0]);case 2:return!e.call(this,n[0],n[1]);case 3:return!e.call(this,n[0],n[1],n[2])}return!e.apply(this,n)}}function fm(e){return _l(2,e)}var dm=jd(function(e,n){n=n.length==1&&Y(n[0])?de(n[0],tt(B())):de(Oe(n,1),tt(B()));var s=n.length;return j(function(u){for(var h=-1,p=Me(u.length,s);++h<p;)u[h]=n[h].call(this,u[h]);return je(e,this,u)})}),Ta=j(function(e,n){var s=nn(n,rr(Ta));return Qt(e,me,r,n,s)}),Cl=j(function(e,n){var s=nn(n,rr(Cl));return Qt(e,Ze,r,n,s)}),gm=qt(function(e,n){return Qt(e,Ie,r,r,r,n)});function pm(e,n){if(typeof e!="function")throw new lt(l);return n=n===r?n:J(n),j(e,n)}function mm(e,n){if(typeof e!="function")throw new lt(l);return n=n==null?0:be(J(n),0),j(function(s){var u=s[n],h=un(s,0,n);return u&&tn(h,u),je(e,this,h)})}function _m(e,n,s){var u=!0,h=!0;if(typeof e!="function")throw new lt(l);return pe(s)&&(u="leading"in s?!!s.leading:u,h="trailing"in s?!!s.trailing:h),El(e,n,{leading:u,maxWait:n,trailing:h})}function vm(e){return ml(e,1)}function wm(e,n){return Ta(ua(n),e)}function Sm(){if(!arguments.length)return[];var e=arguments[0];return Y(e)?e:[e]}function Em(e){return ht(e,R)}function Cm(e,n){return n=typeof n=="function"?n:r,ht(e,R,n)}function ym(e){return ht(e,E|R)}function Tm(e,n){return n=typeof n=="function"?n:r,ht(e,E|R,n)}function bm(e,n){return n==null||lu(e,n,Le(n))}function bt(e,n){return e===n||e!==e&&n!==n}var Rm=Hi(Js),Am=Hi(function(e,n){return e>=n}),Nn=pu((function(){return arguments})())?pu:function(e){return _e(e)&&se.call(e,"callee")&&!tu.call(e,"callee")},Y=b.isArray,Pm=Do?tt(Do):Dd;function Ke(e){return e!=null&&Yi(e.length)&&!Kt(e)}function ve(e){return _e(e)&&Ke(e)}function Im(e){return e===!0||e===!1||_e(e)&&Be(e)==yr}var ln=Bf||Da,xm=Mo?tt(Mo):Md;function Lm(e){return _e(e)&&e.nodeType===1&&!Gr(e)}function Nm(e){if(e==null)return!0;if(Ke(e)&&(Y(e)||typeof e=="string"||typeof e.splice=="function"||ln(e)||ir(e)||Nn(e)))return!e.length;var n=ke(e);if(n==St||n==Et)return!e.size;if(Vr(e))return!js(e).length;for(var s in e)if(se.call(e,s))return!1;return!0}function Um(e,n){return Fr(e,n)}function Om(e,n,s){s=typeof s=="function"?s:r;var u=s?s(e,n):r;return u===r?Fr(e,n,r,s):!!u}function ba(e){if(!_e(e))return!1;var n=Be(e);return n==oi||n==rh||typeof e.message=="string"&&typeof e.name=="string"&&!Gr(e)}function $m(e){return typeof e=="number"&&ru(e)}function Kt(e){if(!pe(e))return!1;var n=Be(e);return n==ui||n==uo||n==nh||n==sh}function yl(e){return typeof e=="number"&&e==J(e)}function Yi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=oe}function pe(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}function _e(e){return e!=null&&typeof e=="object"}var Tl=ko?tt(ko):Fd;function Dm(e,n){return e===n||Zs(e,n,pa(n))}function Mm(e,n,s){return s=typeof s=="function"?s:r,Zs(e,n,pa(n),s)}function km(e){return bl(e)&&e!=+e}function Fm(e){if(Cg(e))throw new z(c);return mu(e)}function Hm(e){return e===null}function Wm(e){return e==null}function bl(e){return typeof e=="number"||_e(e)&&Be(e)==br}function Gr(e){if(!_e(e)||Be(e)!=Vt)return!1;var n=Ci(e);if(n===null)return!0;var s=se.call(n,"constructor")&&n.constructor;return typeof s=="function"&&s instanceof s&&vi.call(s)==Mf}var Ra=Fo?tt(Fo):Hd;function Vm(e){return yl(e)&&e>=-oe&&e<=oe}var Rl=Ho?tt(Ho):Wd;function Ji(e){return typeof e=="string"||!Y(e)&&_e(e)&&Be(e)==Ar}function rt(e){return typeof e=="symbol"||_e(e)&&Be(e)==li}var ir=Wo?tt(Wo):Vd;function Bm(e){return e===r}function Gm(e){return _e(e)&&ke(e)==Pr}function Qm(e){return _e(e)&&Be(e)==oh}var qm=Hi(ea),zm=Hi(function(e,n){return e<=n});function Al(e){if(!e)return[];if(Ke(e))return Ji(e)?Ct(e):ze(e);if(Lr&&e[Lr])return bf(e[Lr]());var n=ke(e),s=n==St?Ws:n==Et?pi:sr;return s(e)}function Yt(e){if(!e)return e===0?e:0;if(e=gt(e),e===ot||e===-ot){var n=e<0?-1:1;return n*Ve}return e===e?e:0}function J(e){var n=Yt(e),s=n%1;return n===n?s?n-s:n:0}function Pl(e){return e?Pn(J(e),0,Ut):0}function gt(e){if(typeof e=="number")return e;if(rt(e))return jt;if(pe(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=pe(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=zo(e);var s=Ah.test(e);return s||Ih.test(e)?uf(e.slice(2),s?2:8):Rh.test(e)?jt:+e}function Il(e){return Dt(e,Ye(e))}function Km(e){return e?Pn(J(e),-oe,oe):e===0?e:0}function ae(e){return e==null?"":nt(e)}var Ym=tr(function(e,n){if(Vr(n)||Ke(n)){Dt(n,Le(n),e);return}for(var s in n)se.call(n,s)&&Dr(e,s,n[s])}),xl=tr(function(e,n){Dt(n,Ye(n),e)}),Ll=tr(function(e,n,s,u){Dt(n,Ye(n),e,u)}),Aa=tr(function(e,n,s,u){Dt(n,Le(n),e,u)}),Jm=qt(zs);function Xm(e,n){var s=er(e);return n==null?s:uu(s,n)}var Zm=j(function(e,n){e=le(e);var s=-1,u=n.length,h=u>2?n[2]:r;for(h&&Ge(n[0],n[1],h)&&(u=1);++s<u;)for(var p=n[s],_=Ye(p),v=-1,C=_.length;++v<C;){var P=_[v],I=e[P];(I===r||bt(I,Xn[P])&&!se.call(e,P))&&(e[P]=p[P])}return e}),jm=j(function(e){return e.push(r,zu),je(Nl,r,e)});function e_(e,n){return Bo(e,B(n,3),$t)}function t_(e,n){return Bo(e,B(n,3),Ys)}function n_(e,n){return e==null?e:Ks(e,B(n,3),Ye)}function r_(e,n){return e==null?e:du(e,B(n,3),Ye)}function i_(e,n){return e&&$t(e,B(n,3))}function s_(e,n){return e&&Ys(e,B(n,3))}function a_(e){return e==null?[]:Ni(e,Le(e))}function o_(e){return e==null?[]:Ni(e,Ye(e))}function Pa(e,n,s){var u=e==null?r:In(e,n);return u===r?s:u}function u_(e,n){return e!=null&&Ju(e,n,Nd)}function Ia(e,n){return e!=null&&Ju(e,n,Ud)}var l_=Vu(function(e,n,s){n!=null&&typeof n.toString!="function"&&(n=wi.call(n)),e[n]=s},La(Je)),c_=Vu(function(e,n,s){n!=null&&typeof n.toString!="function"&&(n=wi.call(n)),se.call(e,n)?e[n].push(s):e[n]=[s]},B),h_=j(kr);function Le(e){return Ke(e)?au(e):js(e)}function Ye(e){return Ke(e)?au(e,!0):Bd(e)}function f_(e,n){var s={};return n=B(n,3),$t(e,function(u,h,p){Ot(s,n(u,h,p),u)}),s}function d_(e,n){var s={};return n=B(n,3),$t(e,function(u,h,p){Ot(s,h,n(u,h,p))}),s}var g_=tr(function(e,n,s){Ui(e,n,s)}),Nl=tr(function(e,n,s,u){Ui(e,n,s,u)}),p_=qt(function(e,n){var s={};if(e==null)return s;var u=!1;n=de(n,function(p){return p=on(p,e),u||(u=p.length>1),p}),Dt(e,da(e),s),u&&(s=ht(s,E|T|R,cg));for(var h=n.length;h--;)sa(s,n[h]);return s});function m_(e,n){return Ul(e,Ki(B(n)))}var __=qt(function(e,n){return e==null?{}:Qd(e,n)});function Ul(e,n){if(e==null)return{};var s=de(da(e),function(u){return[u]});return n=B(n),yu(e,s,function(u,h){return n(u,h[0])})}function v_(e,n,s){n=on(n,e);var u=-1,h=n.length;for(h||(h=1,e=r);++u<h;){var p=e==null?r:e[Tt(n[u])];p===r&&(u=h,p=s),e=Kt(p)?p.call(e):p}return e}function w_(e,n,s){return e==null?e:Hr(e,n,s)}function S_(e,n,s,u){return u=typeof u=="function"?u:r,e==null?e:Hr(e,n,s,u)}var Ol=Qu(Le),$l=Qu(Ye);function E_(e,n,s){var u=Y(e),h=u||ln(e)||ir(e);if(n=B(n,4),s==null){var p=e&&e.constructor;h?s=u?new p:[]:pe(e)?s=Kt(p)?er(Ci(e)):{}:s={}}return(h?et:$t)(e,function(_,v,C){return n(s,_,v,C)}),s}function C_(e,n){return e==null?!0:sa(e,n)}function y_(e,n,s){return e==null?e:Pu(e,n,ua(s))}function T_(e,n,s,u){return u=typeof u=="function"?u:r,e==null?e:Pu(e,n,ua(s),u)}function sr(e){return e==null?[]:Hs(e,Le(e))}function b_(e){return e==null?[]:Hs(e,Ye(e))}function R_(e,n,s){return s===r&&(s=n,n=r),s!==r&&(s=gt(s),s=s===s?s:0),n!==r&&(n=gt(n),n=n===n?n:0),Pn(gt(e),n,s)}function A_(e,n,s){return n=Yt(n),s===r?(s=n,n=0):s=Yt(s),e=gt(e),Od(e,n,s)}function P_(e,n,s){if(s&&typeof s!="boolean"&&Ge(e,n,s)&&(n=s=r),s===r&&(typeof n=="boolean"?(s=n,n=r):typeof e=="boolean"&&(s=e,e=r)),e===r&&n===r?(e=0,n=1):(e=Yt(e),n===r?(n=e,e=0):n=Yt(n)),e>n){var u=e;e=n,n=u}if(s||e%1||n%1){var h=iu();return Me(e+h*(n-e+of("1e-"+((h+"").length-1))),n)}return na(e,n)}var I_=nr(function(e,n,s){return n=n.toLowerCase(),e+(s?Dl(n):n)});function Dl(e){return xa(ae(e).toLowerCase())}function Ml(e){return e=ae(e),e&&e.replace(Lh,Sf).replace(Jh,"")}function x_(e,n,s){e=ae(e),n=nt(n);var u=e.length;s=s===r?u:Pn(J(s),0,u);var h=s;return s-=n.length,s>=0&&e.slice(s,h)==n}function L_(e){return e=ae(e),e&&fh.test(e)?e.replace(ho,Ef):e}function N_(e){return e=ae(e),e&&vh.test(e)?e.replace(Ts,"\\$&"):e}var U_=nr(function(e,n,s){return e+(s?"-":"")+n.toLowerCase()}),O_=nr(function(e,n,s){return e+(s?" ":"")+n.toLowerCase()}),$_=Fu("toLowerCase");function D_(e,n,s){e=ae(e),n=J(n);var u=n?Yn(e):0;if(!n||u>=n)return e;var h=(n-u)/2;return Fi(Ri(h),s)+e+Fi(bi(h),s)}function M_(e,n,s){e=ae(e),n=J(n);var u=n?Yn(e):0;return n&&u<n?e+Fi(n-u,s):e}function k_(e,n,s){e=ae(e),n=J(n);var u=n?Yn(e):0;return n&&u<n?Fi(n-u,s)+e:e}function F_(e,n,s){return s||n==null?n=0:n&&(n=+n),zf(ae(e).replace(bs,""),n||0)}function H_(e,n,s){return(s?Ge(e,n,s):n===r)?n=1:n=J(n),ra(ae(e),n)}function W_(){var e=arguments,n=ae(e[0]);return e.length<3?n:n.replace(e[1],e[2])}var V_=nr(function(e,n,s){return e+(s?"_":"")+n.toLowerCase()});function B_(e,n,s){return s&&typeof s!="number"&&Ge(e,n,s)&&(n=s=r),s=s===r?Ut:s>>>0,s?(e=ae(e),e&&(typeof n=="string"||n!=null&&!Ra(n))&&(n=nt(n),!n&&Kn(e))?un(Ct(e),0,s):e.split(n,s)):[]}var G_=nr(function(e,n,s){return e+(s?" ":"")+xa(n)});function Q_(e,n,s){return e=ae(e),s=s==null?0:Pn(J(s),0,e.length),n=nt(n),e.slice(s,s+n.length)==n}function q_(e,n,s){var u=g.templateSettings;s&&Ge(e,n,s)&&(n=r),e=ae(e),n=Aa({},n,u,qu);var h=Aa({},n.imports,u.imports,qu),p=Le(h),_=Hs(h,p);et(p,function(V){if(go.test(V))throw new z(d)});var v,C,P=0,I=n.interpolate||ci,L="__p += '",k=Vs((n.escape||ci).source+"|"+I.source+"|"+(I===fo?bh:ci).source+"|"+(n.evaluate||ci).source+"|$","g"),H="//# sourceURL="+(se.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++tf+"]")+`
|
|
4
|
+
`;e.replace(k,function(V,ee,re,it,Qe,st){return re||(re=it),L+=e.slice(P,st).replace(Nh,Cf),ee&&(v=!0,L+=`' +
|
|
5
|
+
__e(`+ee+`) +
|
|
6
|
+
'`),Qe&&(C=!0,L+=`';
|
|
7
|
+
`+Qe+`;
|
|
8
|
+
__p += '`),re&&(L+=`' +
|
|
9
|
+
((__t = (`+re+`)) == null ? '' : __t) +
|
|
10
10
|
'`),P=st+V.length,V}),L+=`';
|
|
11
|
-
`;var Q=se.call(
|
|
11
|
+
`;var Q=se.call(n,"variable")&&n.variable;if(!Q)L=`with (obj) {
|
|
12
12
|
`+L+`
|
|
13
13
|
}
|
|
14
14
|
`;else if(go.test(Q))throw new z(f);L=(C?L.replace(uh,""):L).replace(lh,"$1").replace(ch,"$1;"),L="function("+(Q||"obj")+`) {
|
|
@@ -17,8 +17,8 @@ __p += '`),ne&&(L+=`' +
|
|
|
17
17
|
function print() { __p += __j.call(arguments, '') }
|
|
18
18
|
`:`;
|
|
19
19
|
`)+L+`return __p
|
|
20
|
-
}`;var X=Fl(function(){return ie(p,W+"return "+L).apply(r,_)});if(X.source=L,ba(X))throw X;return X}function z_(e){return ae(e).toLowerCase()}function K_(e){return ae(e).toUpperCase()}function Y_(e,t,s){if(e=ae(e),e&&(s||t===r))return zo(e);if(!e||!(t=nt(t)))return e;var u=Ct(e),h=Ct(t),p=Ko(u,h),_=Yo(u,h)+1;return un(u,p,_).join("")}function J_(e,t,s){if(e=ae(e),e&&(s||t===r))return e.slice(0,Xo(e)+1);if(!e||!(t=nt(t)))return e;var u=Ct(e),h=Yo(u,Ct(t))+1;return un(u,0,h).join("")}function X_(e,t,s){if(e=ae(e),e&&(s||t===r))return e.replace(bs,"");if(!e||!(t=nt(t)))return e;var u=Ct(e),h=Ko(u,Ct(t));return un(u,h).join("")}function Z_(e,t){var s=Pe,u=D;if(pe(t)){var h="separator"in t?t.separator:h;s="length"in t?J(t.length):s,u="omission"in t?nt(t.omission):u}e=ae(e);var p=e.length;if(Kn(e)){var _=Ct(e);p=_.length}if(s>=p)return e;var v=s-Yn(u);if(v<1)return u;var C=_?un(_,0,v).join(""):e.slice(0,v);if(h===r)return C+u;if(_&&(v+=C.length-v),Ra(h)){if(e.slice(v).search(h)){var P,I=C;for(h.global||(h=Vs(h.source,ae(po.exec(h))+"g")),h.lastIndex=0;P=h.exec(I);)var L=P.index;C=C.slice(0,L===r?v:L)}}else if(e.indexOf(nt(h),v)!=v){var k=C.lastIndexOf(h);k>-1&&(C=C.slice(0,k))}return C+u}function j_(e){return e=ae(e),e&&hh.test(e)?e.replace(co,If):e}var ev=nr(function(e,t,s){return e+(s?" ":"")+t.toUpperCase()}),xa=Fu("toUpperCase");function kl(e,t,s){return e=ae(e),t=s?r:t,t===r?Tf(e)?Nf(e):pf(e):e.match(t)||[]}var Fl=Z(function(e,t){try{return je(e,r,t)}catch(s){return ba(s)?s:new z(s)}}),tv=qt(function(e,t){return et(t,function(s){s=Tt(s),Ot(e,s,ya(e[s],e))}),e});function nv(e){var t=e==null?0:e.length,s=B();return e=t?de(e,function(u){if(typeof u[1]!="function")throw new lt(l);return[s(u[0]),u[1]]}):[],Z(function(u){for(var h=-1;++h<t;){var p=e[h];if(je(p[0],this,u))return je(p[1],this,u)}})}function rv(e){return Id(ht(e,E))}function La(e){return function(){return e}}function iv(e,t){return e==null||e!==e?t:e}var sv=Wu(),av=Wu(!0);function Je(e){return e}function Na(e){return _u(typeof e=="function"?e:ht(e,E))}function ov(e){return Su(ht(e,E))}function uv(e,t){return wu(e,ht(t,E))}var lv=Z(function(e,t){return function(s){return kr(s,e,t)}}),cv=Z(function(e,t){return function(s){return kr(e,s,t)}});function Ua(e,t,s){var u=Ie(t),h=Ni(t,u);s==null&&!(pe(t)&&(h.length||!u.length))&&(s=t,t=e,e=this,h=Ni(t,Ie(t)));var p=!(pe(s)&&"chain"in s)||!!s.chain,_=Kt(e);return et(h,function(v){var C=t[v];e[v]=C,_&&(e.prototype[v]=function(){var P=this.__chain__;if(p||P){var I=e(this.__wrapped__),L=I.__actions__=ze(this.__actions__);return L.push({func:C,args:arguments,thisArg:e}),I.__chain__=P,I}return C.apply(e,tn([this.value()],arguments))})}),e}function hv(){return Ne._===this&&(Ne._=kf),this}function Oa(){}function fv(e){return e=J(e),Z(function(t){return Eu(t,e)})}var dv=ca(de),gv=ca(Vo),pv=ca($s);function Hl(e){return _a(e)?Ds(Tt(e)):qd(e)}function mv(e){return function(t){return e==null?r:In(e,t)}}var _v=Bu(),vv=Bu(!0);function $a(){return[]}function Da(){return!1}function Sv(){return{}}function wv(){return""}function Ev(){return!0}function Cv(e,t){if(e=J(e),e<1||e>oe)return[];var s=Ut,u=De(e,Ut);t=B(t),e-=Ut;for(var h=Fs(u,t);++s<e;)t(s);return h}function yv(e){return Y(e)?de(e,Tt):rt(e)?[e]:ze(sl(ae(e)))}function Tv(e){var t=++Df;return ae(e)+t}var bv=ki(function(e,t){return e+t},0),Rv=ha("ceil"),Av=ki(function(e,t){return e/t},1),Pv=ha("floor");function Iv(e){return e&&e.length?Li(e,Je,Js):r}function xv(e,t){return e&&e.length?Li(e,B(t,2),Js):r}function Lv(e){return Qo(e,Je)}function Nv(e,t){return Qo(e,B(t,2))}function Uv(e){return e&&e.length?Li(e,Je,ea):r}function Ov(e,t){return e&&e.length?Li(e,B(t,2),ea):r}var $v=ki(function(e,t){return e*t},1),Dv=ha("round"),Mv=ki(function(e,t){return e-t},0);function kv(e){return e&&e.length?ks(e,Je):0}function Fv(e,t){return e&&e.length?ks(e,B(t,2)):0}return d.after=um,d.ary=ml,d.assign=Ym,d.assignIn=xl,d.assignInWith=Ll,d.assignWith=Aa,d.at=Jm,d.before=_l,d.bind=ya,d.bindAll=tv,d.bindKey=vl,d.castArray=wm,d.chain=dl,d.chunk=Ig,d.compact=xg,d.concat=Lg,d.cond=nv,d.conforms=rv,d.constant=La,d.countBy=Fp,d.create=Xm,d.curry=Sl,d.curryRight=wl,d.debounce=El,d.defaults=Zm,d.defaultsDeep=jm,d.defer=lm,d.delay=cm,d.difference=Ng,d.differenceBy=Ug,d.differenceWith=Og,d.drop=$g,d.dropRight=Dg,d.dropRightWhile=Mg,d.dropWhile=kg,d.fill=Fg,d.filter=Wp,d.flatMap=Gp,d.flatMapDeep=Qp,d.flatMapDepth=qp,d.flatten=ll,d.flattenDeep=Hg,d.flattenDepth=Wg,d.flip=hm,d.flow=sv,d.flowRight=av,d.fromPairs=Vg,d.functions=a_,d.functionsIn=o_,d.groupBy=zp,d.initial=Gg,d.intersection=Qg,d.intersectionBy=qg,d.intersectionWith=zg,d.invert=l_,d.invertBy=c_,d.invokeMap=Yp,d.iteratee=Na,d.keyBy=Jp,d.keys=Ie,d.keysIn=Ye,d.map=Qi,d.mapKeys=f_,d.mapValues=d_,d.matches=ov,d.matchesProperty=uv,d.memoize=zi,d.merge=g_,d.mergeWith=Nl,d.method=lv,d.methodOf=cv,d.mixin=Ua,d.negate=Ki,d.nthArg=fv,d.omit=p_,d.omitBy=m_,d.once=fm,d.orderBy=Xp,d.over=dv,d.overArgs=dm,d.overEvery=gv,d.overSome=pv,d.partial=Ta,d.partialRight=Cl,d.partition=Zp,d.pick=__,d.pickBy=Ul,d.property=Hl,d.propertyOf=mv,d.pull=Xg,d.pullAll=hl,d.pullAllBy=Zg,d.pullAllWith=jg,d.pullAt=ep,d.range=_v,d.rangeRight=vv,d.rearg=gm,d.reject=tm,d.remove=tp,d.rest=pm,d.reverse=Ea,d.sampleSize=rm,d.set=S_,d.setWith=w_,d.shuffle=im,d.slice=np,d.sortBy=om,d.sortedUniq=lp,d.sortedUniqBy=cp,d.split=B_,d.spread=mm,d.tail=hp,d.take=fp,d.takeRight=dp,d.takeRightWhile=gp,d.takeWhile=pp,d.tap=xp,d.throttle=_m,d.thru=Gi,d.toArray=Al,d.toPairs=Ol,d.toPairsIn=$l,d.toPath=yv,d.toPlainObject=Il,d.transform=E_,d.unary=vm,d.union=mp,d.unionBy=_p,d.unionWith=vp,d.uniq=Sp,d.uniqBy=wp,d.uniqWith=Ep,d.unset=C_,d.unzip=Ca,d.unzipWith=fl,d.update=y_,d.updateWith=T_,d.values=sr,d.valuesIn=b_,d.without=Cp,d.words=kl,d.wrap=Sm,d.xor=yp,d.xorBy=Tp,d.xorWith=bp,d.zip=Rp,d.zipObject=Ap,d.zipObjectDeep=Pp,d.zipWith=Ip,d.entries=Ol,d.entriesIn=$l,d.extend=xl,d.extendWith=Ll,Ua(d,d),d.add=bv,d.attempt=Fl,d.camelCase=I_,d.capitalize=Dl,d.ceil=Rv,d.clamp=R_,d.clone=Em,d.cloneDeep=ym,d.cloneDeepWith=Tm,d.cloneWith=Cm,d.conformsTo=bm,d.deburr=Ml,d.defaultTo=iv,d.divide=Av,d.endsWith=x_,d.eq=bt,d.escape=L_,d.escapeRegExp=N_,d.every=Hp,d.find=Vp,d.findIndex=ol,d.findKey=e_,d.findLast=Bp,d.findLastIndex=ul,d.findLastKey=t_,d.floor=Pv,d.forEach=gl,d.forEachRight=pl,d.forIn=n_,d.forInRight=r_,d.forOwn=i_,d.forOwnRight=s_,d.get=Pa,d.gt=Rm,d.gte=Am,d.has=u_,d.hasIn=Ia,d.head=cl,d.identity=Je,d.includes=Kp,d.indexOf=Bg,d.inRange=A_,d.invoke=h_,d.isArguments=Nn,d.isArray=Y,d.isArrayBuffer=Pm,d.isArrayLike=Ke,d.isArrayLikeObject=ve,d.isBoolean=Im,d.isBuffer=ln,d.isDate=xm,d.isElement=Lm,d.isEmpty=Nm,d.isEqual=Um,d.isEqualWith=Om,d.isError=ba,d.isFinite=$m,d.isFunction=Kt,d.isInteger=yl,d.isLength=Yi,d.isMap=Tl,d.isMatch=Dm,d.isMatchWith=Mm,d.isNaN=km,d.isNative=Fm,d.isNil=Wm,d.isNull=Hm,d.isNumber=bl,d.isObject=pe,d.isObjectLike=_e,d.isPlainObject=Gr,d.isRegExp=Ra,d.isSafeInteger=Vm,d.isSet=Rl,d.isString=Ji,d.isSymbol=rt,d.isTypedArray=ir,d.isUndefined=Bm,d.isWeakMap=Gm,d.isWeakSet=Qm,d.join=Kg,d.kebabCase=U_,d.last=dt,d.lastIndexOf=Yg,d.lowerCase=O_,d.lowerFirst=$_,d.lt=qm,d.lte=zm,d.max=Iv,d.maxBy=xv,d.mean=Lv,d.meanBy=Nv,d.min=Uv,d.minBy=Ov,d.stubArray=$a,d.stubFalse=Da,d.stubObject=Sv,d.stubString=wv,d.stubTrue=Ev,d.multiply=$v,d.nth=Jg,d.noConflict=hv,d.noop=Oa,d.now=qi,d.pad=D_,d.padEnd=M_,d.padStart=k_,d.parseInt=F_,d.random=P_,d.reduce=jp,d.reduceRight=em,d.repeat=H_,d.replace=W_,d.result=v_,d.round=Dv,d.runInContext=S,d.sample=nm,d.size=sm,d.snakeCase=V_,d.some=am,d.sortedIndex=rp,d.sortedIndexBy=ip,d.sortedIndexOf=sp,d.sortedLastIndex=ap,d.sortedLastIndexBy=op,d.sortedLastIndexOf=up,d.startCase=G_,d.startsWith=Q_,d.subtract=Mv,d.sum=kv,d.sumBy=Fv,d.template=q_,d.times=Cv,d.toFinite=Yt,d.toInteger=J,d.toLength=Pl,d.toLower=z_,d.toNumber=gt,d.toSafeInteger=Km,d.toString=ae,d.toUpper=K_,d.trim=Y_,d.trimEnd=J_,d.trimStart=X_,d.truncate=Z_,d.unescape=j_,d.uniqueId=Tv,d.upperCase=ev,d.upperFirst=xa,d.each=gl,d.eachRight=pl,d.first=cl,Ua(d,(function(){var e={};return $t(d,function(t,s){se.call(d.prototype,s)||(e[s]=t)}),e})(),{chain:!1}),d.VERSION=a,et(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){d[e].placeholder=d}),et(["drop","take"],function(e,t){te.prototype[e]=function(s){s=s===r?1:be(J(s),0);var u=this.__filtered__&&!t?new te(this):this.clone();return u.__filtered__?u.__takeCount__=De(s,u.__takeCount__):u.__views__.push({size:De(s,Ut),type:e+(u.__dir__<0?"Right":"")}),u},te.prototype[e+"Right"]=function(s){return this.reverse()[e](s).reverse()}}),et(["filter","map","takeWhile"],function(e,t){var s=t+1,u=s==$e||s==N;te.prototype[e]=function(h){var p=this.clone();return p.__iteratees__.push({iteratee:B(h,3),type:s}),p.__filtered__=p.__filtered__||u,p}}),et(["head","last"],function(e,t){var s="take"+(t?"Right":"");te.prototype[e]=function(){return this[s](1).value()[0]}}),et(["initial","tail"],function(e,t){var s="drop"+(t?"":"Right");te.prototype[e]=function(){return this.__filtered__?new te(this):this[s](1)}}),te.prototype.compact=function(){return this.filter(Je)},te.prototype.find=function(e){return this.filter(e).head()},te.prototype.findLast=function(e){return this.reverse().find(e)},te.prototype.invokeMap=Z(function(e,t){return typeof e=="function"?new te(this):this.map(function(s){return kr(s,e,t)})}),te.prototype.reject=function(e){return this.filter(Ki(B(e)))},te.prototype.slice=function(e,t){e=J(e);var s=this;return s.__filtered__&&(e>0||t<0)?new te(s):(e<0?s=s.takeRight(-e):e&&(s=s.drop(e)),t!==r&&(t=J(t),s=t<0?s.dropRight(-t):s.take(t-e)),s)},te.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},te.prototype.toArray=function(){return this.take(Ut)},$t(te.prototype,function(e,t){var s=/^(?:filter|find|map|reject)|While$/.test(t),u=/^(?:head|last)$/.test(t),h=d[u?"take"+(t=="last"?"Right":""):t],p=u||/^find/.test(t);h&&(d.prototype[t]=function(){var _=this.__wrapped__,v=u?[1]:arguments,C=_ instanceof te,P=v[0],I=C||Y(_),L=function(j){var ne=h.apply(d,tn([j],v));return u&&k?ne[0]:ne};I&&s&&typeof P=="function"&&P.length!=1&&(C=I=!1);var k=this.__chain__,W=!!this.__actions__.length,Q=p&&!k,X=C&&!W;if(!p&&I){_=X?_:new te(this);var V=e.apply(_,v);return V.__actions__.push({func:Gi,args:[L],thisArg:r}),new ct(V,k)}return Q&&X?e.apply(this,v):(V=this.thru(L),Q?u?V.value()[0]:V.value():V)})}),et(["pop","push","shift","sort","splice","unshift"],function(e){var t=mi[e],s=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",u=/^(?:pop|shift)$/.test(e);d.prototype[e]=function(){var h=arguments;if(u&&!this.__chain__){var p=this.value();return t.apply(Y(p)?p:[],h)}return this[s](function(_){return t.apply(Y(_)?_:[],h)})}}),$t(te.prototype,function(e,t){var s=d[t];if(s){var u=s.name+"";se.call(jn,u)||(jn[u]=[]),jn[u].push({name:t,func:s})}}),jn[Mi(r,re).name]=[{name:"wrapper",func:r}],te.prototype.clone=ed,te.prototype.reverse=td,te.prototype.value=nd,d.prototype.at=Lp,d.prototype.chain=Np,d.prototype.commit=Up,d.prototype.next=Op,d.prototype.plant=Dp,d.prototype.reverse=Mp,d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=kp,d.prototype.first=d.prototype.head,Lr&&(d.prototype[Lr]=$p),d}),Jn=Uf();Tn?((Tn.exports=Jn)._=Jn,Ls._=Jn):Ne._=Jn}).call(Wv)})(Qr,Qr.exports)),Qr.exports}var Ba=Vv();const M={getRandomId:()=>window.crypto.getRandomValues(new Uint32Array(1))[0],isPromise:i=>i&&M.isFunction(i.then),isFunction:i=>i&&{}.toString.call(i)==="[object Function]",isAsyncFunction:i=>i&&{}.toString.call(i)==="[object AsyncFunction]",isString:i=>typeof i=="string"||i instanceof String,isObject:i=>!!(i&&typeof i=="object"&&!Array.isArray(i)),hasHash:i=>!!(i&&i.search(/^[#\/].*$/)===0),getPathWithoutHash:i=>{for(;M.hasHash(i);)i=i.substring(1,i.length);return i},getTrimmedUrl:i=>{const n=i.length>0?M.getPathWithoutHash(i):i;return M.trimTrailingSlash(n.split("?")[0])},addLeadingSlash:i=>(i.startsWith("/")?"":"/")+i,trimLeadingSlash:i=>M.isString(i)?i.replace(/^\/+/g,""):"",trimTrailingSlash:i=>M.isString(i)?i.replace(/\/+$/,""):"",isElementVisible:i=>i?window.getComputedStyle(i).getPropertyValue("display")!=="none":!1,getNodeList:(i,n=!1)=>{const r=[];return i&&Array.from(document.querySelectorAll(i)).forEach(o=>{n?M.isElementVisible(o)&&r.push(o):r.push(o)}),r},prependOrigin:i=>{if(!i||i.startsWith("http"))return i;const n=i.startsWith("/");return i.length?window.location.origin+(n?"":"/")+i:window.location.origin},getConfigValueFromObject:(i,n)=>{let r=0,a=i;const o=n.split(".");for(;a&&r<o.length;)a=a[o[r++]];return a},getConfigBooleanValue:(i,n)=>{const r=M.getConfigValueFromObject(i,n);return r===!0||r==="true"},getUrlParameter:i=>new URLSearchParams(window.location.search).get(i),removeProperties(i,n){const r={};if(!(n instanceof Array)||!n.length)return console.error("[ERROR] removeProperties requires second parameter: array of keys to remove from object."),i;for(const a in i)if(i.hasOwnProperty(a)){const o=n.filter(l=>a.includes(l)).length===0,c=n.filter(l=>l.endsWith("*")).map(l=>l.slice(0,-1)).filter(l=>a.startsWith(l)).length===0;o&&c&&(r[a]=i[a])}return r},replaceVars(i,n,r,a=!0,o=!1){let c=i;if(n)if(a)c=Ba.replace(c,/{([\s\S]+?)}/g,l=>{let f=l.slice(1,-1).trim();return f.indexOf(r)===0&&(f=f.substring(r.length)),Ba.get(n,f,l)});else{const l=o?" ":"";c=c.replace(/\//g,l+"/")+l,Array.from(Object.entries(n)).sort((f,g)=>g[0].length-f[0].length).forEach(f=>{c=c.replace(new RegExp(this.escapeRegExp(r+f[0]+l),"g"),encodeURIComponent(f[1]))}),c=c.replace(new RegExp(this.escapeRegExp(l),"g"),"")}return a&&(c=c.replace(new RegExp("\\{"+this.escapeRegExp(r)+"[^\\}]+\\}","g"),"")),c},escapeRegExp(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},hasHashOrSlash:i=>!!(i&&i.search(/^[#\/].*$/)===0),getPathWithoutHashOrSlash:i=>{for(;M.hasHashOrSlash(i);)i=i.substring(1,i.length);return i}},Dn={wrapAsPromise:i=>new Promise(n=>{n(i)}),applyFunctionPromisified:(i,n)=>(i=i.apply(void 0,n),M.isPromise(i)?i:Dn.wrapAsPromise(i)),getConfigValueFromObjectAsync:(i,n,...r)=>{const a=M.getConfigValueFromObject(i,n);return M.isFunction(a)?Dn.applyFunctionPromisified(a,r):Dn.wrapAsPromise(a)}};class Bv{setErrorMessage(n){this.getLuigi().getEngine()?._connector?.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,...a){const o=this.getConfigValue(n);if(M.isFunction(o))try{return await Dn.applyFunctionPromisified(o,a)}catch(c){if(r)return Promise.reject(c)}return Promise.resolve(void 0)}}const Qe=new Bv;class Gv{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=Qe.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 At=new Gv;class Qv{isAuthorizationEnabled(){return!!Qe.getConfigValue("auth.use")}login(){this.isAuthorizationEnabled()&&dn.startAuthorization()}logout(){this.isAuthorizationEnabled()&&dn.logout()}async handleAuthEvent(n,r,a,o){const c=await Qe.executeConfigFnAsync("auth.events."+n,!1,r,a),l=c===void 0||!!c;if(l&&o){window.location.href=o;return}return l}get store(){return Qe.getLuigi()?.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:()=>At.getStorageKey(),getStorageType:()=>At.getStorageType(),getAuthData:()=>At.getAuthData(),setAuthData:n=>{At.setAuthData(n),dn.broadcastAuthData(n)},removeAuthData:()=>At.removeAuthData(),setNewlyAuthorized:()=>{At.setNewlyAuthorized(),dn.resetExpirationChecks()}}}}const cr=new Qv;class qv{getStoredAuthData(){return At.getAuthData()}isLoggedIn(){const n=this.getStoredAuthData();return!!(n&&n.accessTokenExpirationDate>Number(new Date))}parseUrlAuthErrors(){const n=M.getUrlParameter("error"),r=M.getUrlParameter("errorDescription");if(n)return{error:n,errorDescription:r}}async handleUrlAuthErrors(n,r,a){return r?await cr.handleAuthEvent("onAuthError",n,{error:r,errorDescription:a},n.logoutUrl+"?post_logout_redirect_uri="+n.post_logout_redirect_uri+"&error="+encodeURIComponent(r)+"&errorDescription="+encodeURIComponent(a||"")):!0}}const fn=new qv;function gn(){}function hc(i){return i()}function Bl(){return Object.create(null)}function as(i){i.forEach(hc)}function fc(i){return typeof i=="function"}function dc(i,n){return i!=i?n==n:i!==n||i&&typeof i=="object"||typeof i=="function"}let Zi,Zr;function Gl(i,n){return i===n||(Zi||(Zi=document.createElement("a")),Zi.href=n,i===Zi.href)}function zv(i,n,r){const a=(function(o){if(!o)return document;const c=o.getRootNode?o.getRootNode():o.ownerDocument;return c&&c.host?c:o.ownerDocument})(i);if(!a.getElementById(n)){const o=_r("style");o.id=n,o.textContent=r,(function(c,l){(function(f,g){f.appendChild(g)})(c.head||c,l),l.sheet})(a,o)}}function Mn(i,n,r){i.insertBefore(n,r||null)}function pn(i){i.parentNode&&i.parentNode.removeChild(i)}function _r(i){return document.createElement(i)}function gc(i){return document.createTextNode(i)}function mt(i,n,r){r==null?i.removeAttribute(n):i.getAttribute(n)!==r&&i.setAttribute(n,r)}function zr(i){Zr=i}function pc(){if(!Zr)throw new Error("Function called outside component initialization");return Zr}function mc(i){pc().$$.on_mount.push(i)}const ur=[],jr=[];let pr=[];const Ql=[],Kv=Promise.resolve();let Ga=!1;function Qa(i){pr.push(i)}const Ma=new Set;let ar=0;function K(){if(ar!==0)return;const i=Zr;do{try{for(;ar<ur.length;){const n=ur[ar];ar++,zr(n),Yv(n.$$)}}catch(n){throw ur.length=0,ar=0,n}for(zr(null),ur.length=0,ar=0;jr.length;)jr.pop()();for(let n=0;n<pr.length;n+=1){const r=pr[n];Ma.has(r)||(Ma.add(r),r())}pr.length=0}while(ur.length);for(;Ql.length;)Ql.pop()();Ga=!1,Ma.clear(),zr(i)}function Yv(i){if(i.fragment!==null){i.update(),as(i.before_update);const n=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,n),i.after_update.forEach(Qa)}}const Jv=new Set;function Xv(i,n){const r=i.$$;r.fragment!==null&&((function(a){const o=[],c=[];pr.forEach((l=>a.indexOf(l)===-1?o.push(l):c.push(l))),c.forEach((l=>l())),pr=o})(r.after_update),as(r.on_destroy),r.fragment&&r.fragment.d(n),r.on_destroy=r.fragment=null,r.ctx=[])}function Zv(i,n){i.$$.dirty[0]===-1&&(ur.push(i),Ga||(Ga=!0,Kv.then(K)),i.$$.dirty.fill(0)),i.$$.dirty[n/31|0]|=1<<n%31}function _c(i,n,r,a,o,c,l=null,f=[-1]){const g=Zr;zr(i);const m=i.$$={fragment:null,ctx:[],props:c,update:gn,not_equal:o,bound:Bl(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(g?g.$$.context:[])),callbacks:Bl(),dirty:f,skip_bound:!1,root:n.target||g.$$.root};l&&l(m.root);let w=!1;if(m.ctx=r?r(i,n.props||{},((b,R,...x)=>{const U=x.length?x[0]:R;return m.ctx&&o(m.ctx[b],m.ctx[b]=U)&&(!m.skip_bound&&m.bound[b]&&m.bound[b](U),w&&Zv(i,b)),R})):[],m.update(),w=!0,as(m.before_update),m.fragment=!!a&&a(m.ctx),n.target){if(n.hydrate){const b=(function(R){return Array.from(R.childNodes)})(n.target);m.fragment&&m.fragment.l(b),b.forEach(pn)}else m.fragment&&m.fragment.c();n.intro&&(y=i.$$.fragment)&&y.i&&(Jv.delete(y),y.i(E)),(function(b,R,x){const{fragment:U,after_update:H}=b.$$;U&&U.m(R,x),Qa((()=>{const re=b.$$.on_mount.map(hc).filter(fc);b.$$.on_destroy?b.$$.on_destroy.push(...re):as(re),b.$$.on_mount=[]})),H.forEach(Qa)})(i,n.target,n.anchor),K()}var y,E;zr(g)}let vc;function ts(i,n,r,a){const o=r[i]?.type;if(n=o==="Boolean"&&typeof n!="boolean"?n!=null:n,!a||!r[i])return n;if(a==="toAttribute")switch(o){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(o){case"Object":case"Array":return n&&JSON.parse(n);case"Boolean":default:return n;case"Number":return n!=null?+n:n}}function Sc(i,n,r,a,o,c){let l=class extends vc{constructor(){super(i,r,o),this.$$p_d=n}static get observedAttributes(){return Object.keys(n).map((f=>(n[f].attribute||f).toLowerCase()))}};return Object.keys(n).forEach((f=>{Object.defineProperty(l.prototype,f,{get(){return this.$$c&&f in this.$$c?this.$$c[f]:this.$$d[f]},set(g){g=ts(f,g,n),this.$$d[f]=g,this.$$c?.$set({[f]:g})}})})),a.forEach((f=>{Object.defineProperty(l.prototype,f,{get(){return this.$$c?.[f]}})})),c&&(l=c(l)),i.element=l,l}typeof HTMLElement=="function"&&(vc=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;constructor(i,n,r){super(),this.$$ctor=i,this.$$s=n,r&&this.attachShadow({mode:"open"})}addEventListener(i,n,r){if(this.$$l[i]=this.$$l[i]||[],this.$$l[i].push(n),this.$$c){const a=this.$$c.$on(i,n);this.$$l_u.set(n,a)}super.addEventListener(i,n,r)}removeEventListener(i,n,r){if(super.removeEventListener(i,n,r),this.$$c){const a=this.$$l_u.get(n);a&&(a(),this.$$l_u.delete(n))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let n=function(c){return()=>{let l;return{c:function(){l=_r("slot"),c!=="default"&&mt(l,"name",c)},m:function(f,g){Mn(f,l,g)},d:function(f){f&&pn(l)}}}};var i=n;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},a=(function(c){const l={};return c.childNodes.forEach((f=>{l[f.slot||"default"]=!0})),l})(this);for(const c of this.$$s)c in a&&(r[c]=[n(c)]);for(const c of this.attributes){const l=this.$$g_p(c.name);l in this.$$d||(this.$$d[l]=ts(l,c.value,this.$$p_d,"toProp"))}for(const c in this.$$p_d)c in this.$$d||this[c]===void 0||(this.$$d[c]=this[c],delete this[c]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$scope:{ctx:[]}}});const o=()=>{this.$$r=!0;for(const c in this.$$p_d)if(this.$$d[c]=this.$$c.$$.ctx[this.$$c.$$.props[c]],this.$$p_d[c].reflect){const l=ts(c,this.$$d[c],this.$$p_d,"toAttribute");l==null?this.removeAttribute(this.$$p_d[c].attribute||c):this.setAttribute(this.$$p_d[c].attribute||c,l)}this.$$r=!1};this.$$c.$$.after_update.push(o),o();for(const c in this.$$l)for(const l of this.$$l[c]){const f=this.$$c.$on(c,l);this.$$l_u.set(l,f)}this.$$l={}}}attributeChangedCallback(i,n,r){this.$$r||(i=this.$$g_p(i),this.$$d[i]=ts(i,r,this.$$p_d,"toProp"),this.$$c?.$set({[i]:this.$$d[i]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(i){return Object.keys(this.$$p_d).find((n=>this.$$p_d[n].attribute===i||!this.$$p_d[n].attribute&&n.toLowerCase()===i))||i}});class wc{$$=void 0;$$set=void 0;$destroy(){Xv(this,1),this.$destroy=gn}$on(n,r){if(!fc(r))return gn;const a=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return a.push(r),()=>{const o=a.indexOf(r);o!==-1&&a.splice(o,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 ee;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"})(ee||(ee={}));class jv extends Event{constructor(n,r,a,o){super(n),this.detail=r,this.payload=a||r||{},this.callbackFn=o}callback(n){this.callbackFn&&this.callbackFn(n)}}const $={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 Za{isVisible(n){return!!(n.offsetWidth||n.offsetHeight||n.getClientRects().length)}sendCustomMessageToIframe(n,r,a){const o=a||"custom";if(n?.iframe?.contentWindow){const c=new URL(n.iframe.src);o==="custom"?n.iframe.contentWindow.postMessage({msg:o,data:r},c.origin):n.iframe.contentWindow.postMessage({msg:o,...r},c.origin)}else console.error("Message target could not be resolved")}dispatchWithPayload(n,r,a,o,c){this.dispatch(n,r,a,c,o)}dispatch(n,r,a,o,c){const l=new jv(n,a,c,o);r.dispatchEvent(l)}getTargetContainer(n){let r;return globalThis.__luigi_container_manager.container.forEach((a=>{a.iframeHandle?.iframe&&a.iframeHandle.iframe.contentWindow===n.source&&(r=a)})),r}getContainerManager(){return globalThis.__luigi_container_manager||(globalThis.__luigi_container_manager={container:[],messageListener:n=>{const r=this.getTargetContainer(n),a=r?.iframeHandle?.iframe?.contentWindow;if(a&&a===n.source)switch(n.data.msg){case ee.CUSTOM_MESSAGE:{const o=n.data.data,c=o.id;delete o.id,this.dispatch($.CUSTOM_MESSAGE,r,{id:c,_metaData:{},data:o})}break;case ee.GET_CONTEXT:a.postMessage({msg:ee.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 ee.NAVIGATION_REQUEST:this.dispatch($.NAVIGATION_REQUEST,r,n.data.params,(o=>{a.postMessage({msg:ee.CLOSE_MODAL_ANSWER,data:o},n.origin)}));break;case ee.ALERT_REQUEST:this.dispatchWithPayload($.ALERT_REQUEST,r,n,n.data?.data?.settings,(o=>{r.notifyAlertClosed(n.data?.data?.settings?.id,o)}));break;case ee.INITIALIZED:this.dispatch($.INITIALIZED,r,n.data?.params||{});break;case ee.ADD_SEARCH_PARAMS_REQUEST:this.dispatch($.ADD_SEARCH_PARAMS_REQUEST,r,{data:n.data.data,keepBrowserHistory:n.data.keepBrowserHistory});break;case ee.ADD_NODE_PARAMS_REQUEST:this.dispatch($.ADD_NODE_PARAMS_REQUEST,r,{data:n.data.data,keepBrowserHistory:n.data.keepBrowserHistory});break;case ee.SHOW_CONFIRMATION_MODAL_REQUEST:this.dispatchWithPayload($.SHOW_CONFIRMATION_MODAL_REQUEST,r,n.data.data,n.data.data?.settings,(o=>{r.notifyConfirmationModalClosed(o)}));break;case ee.SHOW_LOADING_INDICATOR_REQUEST:this.dispatch($.SHOW_LOADING_INDICATOR_REQUEST,r,n);break;case ee.HIDE_LOADING_INDICATOR_REQUEST:this.dispatch($.HIDE_LOADING_INDICATOR_REQUEST,r,n);break;case ee.SET_CURRENT_LOCALE_REQUEST:this.dispatchWithPayload($.SET_CURRENT_LOCALE_REQUEST,r,n,n.data.data);break;case ee.LOCAL_STORAGE_SET_REQUEST:this.dispatchWithPayload($.LOCAL_STORAGE_SET_REQUEST,r,n,n.data.data?.params);break;case ee.RUNTIME_ERROR_HANDLING_REQUEST:this.dispatch($.RUNTIME_ERROR_HANDLING_REQUEST,r,n);break;case ee.SET_ANCHOR_LINK_REQUEST:this.dispatchWithPayload($.SET_ANCHOR_LINK_REQUEST,r,n,n.data.anchor);break;case ee.SET_THIRD_PARTY_COOKIES_REQUEST:this.dispatch($.SET_THIRD_PARTY_COOKIES_REQUEST,r,n);break;case ee.BACK_NAVIGATION_REQUEST:{let o=n.data?.goBackContext||{};if(typeof o=="string")try{o=JSON.parse(o)}catch(c){console.warn(c)}this.dispatch($.GO_BACK_REQUEST,r,o),this.dispatch($.BACK_NAVIGATION_REQUEST,r,n)}break;case ee.GET_CURRENT_ROUTE_REQUEST:this.dispatchWithPayload($.GET_CURRENT_ROUTE_REQUEST,r,n,n.data.data,(o=>{a.postMessage({msg:ee.SEND_CURRENT_ROUTE_ANSWER,data:{correlationId:n.data?.data?.id,route:o}},n.origin)}));break;case ee.NAVIGATION_COMPLETED_REPORT:this.dispatch($.NAVIGATION_COMPLETED_REPORT,r,n);break;case ee.UPDATE_MODAL_PATH_DATA_REQUEST:this.dispatchWithPayload($.UPDATE_MODAL_PATH_DATA_REQUEST,r,n,n.data.params);break;case ee.UPDATE_MODAL_SETTINGS:this.dispatchWithPayload($.UPDATE_MODAL_SETTINGS_REQUEST,r,n,{addHistoryEntry:n.data.addHistoryEntry,updatedModalSettings:n.data.updatedModalSettings});break;case ee.CHECK_PATH_EXISTS_REQUEST:this.dispatchWithPayload($.CHECK_PATH_EXISTS_REQUEST,r,n,n.data.data,(o=>{a.postMessage({msg:ee.SEND_PATH_EXISTS_ANSWER,data:{correlationId:n.data?.data?.id,pathExists:o}},n.origin)}));break;case ee.SET_DIRTY_STATUS_REQUEST:this.dispatchWithPayload($.SET_DIRTY_STATUS_REQUEST,r,n,{dirty:n.data.dirty});break;case ee.SET_VIEW_GROUP_DATA_REQUEST:this.dispatch($.SET_VIEW_GROUP_DATA_REQUEST,r,n.data.data);break;case ee.ADD_BACKDROP_REQUEST:this.dispatch($.ADD_BACKDROP_REQUEST,r,n);break;case ee.REMOVE_BACKDROP_REQUEST:this.dispatch($.REMOVE_BACKDROP_REQUEST,r,n);break;case ee.CLOSE_CURRENT_MODAL_REQUEST:this.dispatch($.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 hn=new Za,lr=new class{constructor(){this.updateContext=(i,n,r,a,o,c)=>{if(r){const l=n||{};hn.sendCustomMessageToIframe(r,{context:i,nodeParams:a||{},pathParams:o||{},searchParams:c||{},internal:l,withoutSync:!0},ee.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update context on inexisting iframe")},this.updateViewUrl=(i,n,r,a)=>{if(a){const o=r||{};hn.sendCustomMessageToIframe(a,{context:n,internal:o,withoutSync:!1,viewUrl:i},ee.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update route on inexisting iframe")},this.updateAuthData=(i,n)=>{i&&n?hn.sendCustomMessageToIframe(i,{authData:n},ee.AUTH_SET_TOKEN):console.warn("Attempting to update auth data on inexisting iframe or authData")},this.sendCustomMessage=(i,n,r,a,o)=>{if(r&&n._luigi_mfe_webcomponent)hn.dispatch(i,n._luigi_mfe_webcomponent,o);else{const c={...o};c.id&&console.warn('Property "id" is reserved and can not be used in custom message data'),c.id=i,hn.sendCustomMessageToIframe(a,c)}},this.notifyConfirmationModalClosed=(i,n)=>{const r={data:{confirmed:i}};hn.sendCustomMessageToIframe(n,r,ee.CONFIRMATION_MODAL_CLOSED)}}notifyAlertClosed(i,n,r){const a=n?{id:i,dismissKey:n}:{id:i};hn.sendCustomMessageToIframe(r,a,ee.ALERT_CLOSED)}},ql=i=>{if(!i)return;const n=i;return n.forEach(((r,a)=>{n[a]=r+(r.indexOf(";")!=-1?"":";"),n[a]=i[a].replaceAll('"',"'")})),n.join(" ")};class vr{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 eS extends vr{constructor(n){super(n||{use:{}}),n&&n.use&&n.use.extends&&(this.superRenderer=Ec({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 tS extends vr{createCompoundContainer(){const n="__lui_compound_"+new Date().getTime(),r=document.createElement("div");r.classList.add(n);let a="";return this.config.layouts&&this.config.layouts.forEach((o=>{if(o.minWidth||o.maxWidth){let c="@media only screen ";o.minWidth!=null&&(c+=`and (min-width: ${o.minWidth}px) `),o.maxWidth!=null&&(c+=`and (max-width: ${o.maxWidth}px) `),c+=`{
|
|
21
|
-
.${
|
|
20
|
+
}`;var X=Fl(function(){return ie(p,H+"return "+L).apply(r,_)});if(X.source=L,ba(X))throw X;return X}function z_(e){return ae(e).toLowerCase()}function K_(e){return ae(e).toUpperCase()}function Y_(e,n,s){if(e=ae(e),e&&(s||n===r))return zo(e);if(!e||!(n=nt(n)))return e;var u=Ct(e),h=Ct(n),p=Ko(u,h),_=Yo(u,h)+1;return un(u,p,_).join("")}function J_(e,n,s){if(e=ae(e),e&&(s||n===r))return e.slice(0,Xo(e)+1);if(!e||!(n=nt(n)))return e;var u=Ct(e),h=Yo(u,Ct(n))+1;return un(u,0,h).join("")}function X_(e,n,s){if(e=ae(e),e&&(s||n===r))return e.replace(bs,"");if(!e||!(n=nt(n)))return e;var u=Ct(e),h=Ko(u,Ct(n));return un(u,h).join("")}function Z_(e,n){var s=xe,u=M;if(pe(n)){var h="separator"in n?n.separator:h;s="length"in n?J(n.length):s,u="omission"in n?nt(n.omission):u}e=ae(e);var p=e.length;if(Kn(e)){var _=Ct(e);p=_.length}if(s>=p)return e;var v=s-Yn(u);if(v<1)return u;var C=_?un(_,0,v).join(""):e.slice(0,v);if(h===r)return C+u;if(_&&(v+=C.length-v),Ra(h)){if(e.slice(v).search(h)){var P,I=C;for(h.global||(h=Vs(h.source,ae(po.exec(h))+"g")),h.lastIndex=0;P=h.exec(I);)var L=P.index;C=C.slice(0,L===r?v:L)}}else if(e.indexOf(nt(h),v)!=v){var k=C.lastIndexOf(h);k>-1&&(C=C.slice(0,k))}return C+u}function j_(e){return e=ae(e),e&&hh.test(e)?e.replace(co,If):e}var ev=nr(function(e,n,s){return e+(s?" ":"")+n.toUpperCase()}),xa=Fu("toUpperCase");function kl(e,n,s){return e=ae(e),n=s?r:n,n===r?Tf(e)?Nf(e):pf(e):e.match(n)||[]}var Fl=j(function(e,n){try{return je(e,r,n)}catch(s){return ba(s)?s:new z(s)}}),tv=qt(function(e,n){return et(n,function(s){s=Tt(s),Ot(e,s,ya(e[s],e))}),e});function nv(e){var n=e==null?0:e.length,s=B();return e=n?de(e,function(u){if(typeof u[1]!="function")throw new lt(l);return[s(u[0]),u[1]]}):[],j(function(u){for(var h=-1;++h<n;){var p=e[h];if(je(p[0],this,u))return je(p[1],this,u)}})}function rv(e){return Id(ht(e,E))}function La(e){return function(){return e}}function iv(e,n){return e==null||e!==e?n:e}var sv=Wu(),av=Wu(!0);function Je(e){return e}function Na(e){return _u(typeof e=="function"?e:ht(e,E))}function ov(e){return wu(ht(e,E))}function uv(e,n){return Su(e,ht(n,E))}var lv=j(function(e,n){return function(s){return kr(s,e,n)}}),cv=j(function(e,n){return function(s){return kr(e,s,n)}});function Ua(e,n,s){var u=Le(n),h=Ni(n,u);s==null&&!(pe(n)&&(h.length||!u.length))&&(s=n,n=e,e=this,h=Ni(n,Le(n)));var p=!(pe(s)&&"chain"in s)||!!s.chain,_=Kt(e);return et(h,function(v){var C=n[v];e[v]=C,_&&(e.prototype[v]=function(){var P=this.__chain__;if(p||P){var I=e(this.__wrapped__),L=I.__actions__=ze(this.__actions__);return L.push({func:C,args:arguments,thisArg:e}),I.__chain__=P,I}return C.apply(e,tn([this.value()],arguments))})}),e}function hv(){return Ue._===this&&(Ue._=kf),this}function Oa(){}function fv(e){return e=J(e),j(function(n){return Eu(n,e)})}var dv=ca(de),gv=ca(Vo),pv=ca($s);function Hl(e){return _a(e)?Ds(Tt(e)):qd(e)}function mv(e){return function(n){return e==null?r:In(e,n)}}var _v=Bu(),vv=Bu(!0);function $a(){return[]}function Da(){return!1}function wv(){return{}}function Sv(){return""}function Ev(){return!0}function Cv(e,n){if(e=J(e),e<1||e>oe)return[];var s=Ut,u=Me(e,Ut);n=B(n),e-=Ut;for(var h=Fs(u,n);++s<e;)n(s);return h}function yv(e){return Y(e)?de(e,Tt):rt(e)?[e]:ze(sl(ae(e)))}function Tv(e){var n=++Df;return ae(e)+n}var bv=ki(function(e,n){return e+n},0),Rv=ha("ceil"),Av=ki(function(e,n){return e/n},1),Pv=ha("floor");function Iv(e){return e&&e.length?Li(e,Je,Js):r}function xv(e,n){return e&&e.length?Li(e,B(n,2),Js):r}function Lv(e){return Qo(e,Je)}function Nv(e,n){return Qo(e,B(n,2))}function Uv(e){return e&&e.length?Li(e,Je,ea):r}function Ov(e,n){return e&&e.length?Li(e,B(n,2),ea):r}var $v=ki(function(e,n){return e*n},1),Dv=ha("round"),Mv=ki(function(e,n){return e-n},0);function kv(e){return e&&e.length?ks(e,Je):0}function Fv(e,n){return e&&e.length?ks(e,B(n,2)):0}return g.after=um,g.ary=ml,g.assign=Ym,g.assignIn=xl,g.assignInWith=Ll,g.assignWith=Aa,g.at=Jm,g.before=_l,g.bind=ya,g.bindAll=tv,g.bindKey=vl,g.castArray=Sm,g.chain=dl,g.chunk=Ig,g.compact=xg,g.concat=Lg,g.cond=nv,g.conforms=rv,g.constant=La,g.countBy=Fp,g.create=Xm,g.curry=wl,g.curryRight=Sl,g.debounce=El,g.defaults=Zm,g.defaultsDeep=jm,g.defer=lm,g.delay=cm,g.difference=Ng,g.differenceBy=Ug,g.differenceWith=Og,g.drop=$g,g.dropRight=Dg,g.dropRightWhile=Mg,g.dropWhile=kg,g.fill=Fg,g.filter=Wp,g.flatMap=Gp,g.flatMapDeep=Qp,g.flatMapDepth=qp,g.flatten=ll,g.flattenDeep=Hg,g.flattenDepth=Wg,g.flip=hm,g.flow=sv,g.flowRight=av,g.fromPairs=Vg,g.functions=a_,g.functionsIn=o_,g.groupBy=zp,g.initial=Gg,g.intersection=Qg,g.intersectionBy=qg,g.intersectionWith=zg,g.invert=l_,g.invertBy=c_,g.invokeMap=Yp,g.iteratee=Na,g.keyBy=Jp,g.keys=Le,g.keysIn=Ye,g.map=Qi,g.mapKeys=f_,g.mapValues=d_,g.matches=ov,g.matchesProperty=uv,g.memoize=zi,g.merge=g_,g.mergeWith=Nl,g.method=lv,g.methodOf=cv,g.mixin=Ua,g.negate=Ki,g.nthArg=fv,g.omit=p_,g.omitBy=m_,g.once=fm,g.orderBy=Xp,g.over=dv,g.overArgs=dm,g.overEvery=gv,g.overSome=pv,g.partial=Ta,g.partialRight=Cl,g.partition=Zp,g.pick=__,g.pickBy=Ul,g.property=Hl,g.propertyOf=mv,g.pull=Xg,g.pullAll=hl,g.pullAllBy=Zg,g.pullAllWith=jg,g.pullAt=ep,g.range=_v,g.rangeRight=vv,g.rearg=gm,g.reject=tm,g.remove=tp,g.rest=pm,g.reverse=Ea,g.sampleSize=rm,g.set=w_,g.setWith=S_,g.shuffle=im,g.slice=np,g.sortBy=om,g.sortedUniq=lp,g.sortedUniqBy=cp,g.split=B_,g.spread=mm,g.tail=hp,g.take=fp,g.takeRight=dp,g.takeRightWhile=gp,g.takeWhile=pp,g.tap=xp,g.throttle=_m,g.thru=Gi,g.toArray=Al,g.toPairs=Ol,g.toPairsIn=$l,g.toPath=yv,g.toPlainObject=Il,g.transform=E_,g.unary=vm,g.union=mp,g.unionBy=_p,g.unionWith=vp,g.uniq=wp,g.uniqBy=Sp,g.uniqWith=Ep,g.unset=C_,g.unzip=Ca,g.unzipWith=fl,g.update=y_,g.updateWith=T_,g.values=sr,g.valuesIn=b_,g.without=Cp,g.words=kl,g.wrap=wm,g.xor=yp,g.xorBy=Tp,g.xorWith=bp,g.zip=Rp,g.zipObject=Ap,g.zipObjectDeep=Pp,g.zipWith=Ip,g.entries=Ol,g.entriesIn=$l,g.extend=xl,g.extendWith=Ll,Ua(g,g),g.add=bv,g.attempt=Fl,g.camelCase=I_,g.capitalize=Dl,g.ceil=Rv,g.clamp=R_,g.clone=Em,g.cloneDeep=ym,g.cloneDeepWith=Tm,g.cloneWith=Cm,g.conformsTo=bm,g.deburr=Ml,g.defaultTo=iv,g.divide=Av,g.endsWith=x_,g.eq=bt,g.escape=L_,g.escapeRegExp=N_,g.every=Hp,g.find=Vp,g.findIndex=ol,g.findKey=e_,g.findLast=Bp,g.findLastIndex=ul,g.findLastKey=t_,g.floor=Pv,g.forEach=gl,g.forEachRight=pl,g.forIn=n_,g.forInRight=r_,g.forOwn=i_,g.forOwnRight=s_,g.get=Pa,g.gt=Rm,g.gte=Am,g.has=u_,g.hasIn=Ia,g.head=cl,g.identity=Je,g.includes=Kp,g.indexOf=Bg,g.inRange=A_,g.invoke=h_,g.isArguments=Nn,g.isArray=Y,g.isArrayBuffer=Pm,g.isArrayLike=Ke,g.isArrayLikeObject=ve,g.isBoolean=Im,g.isBuffer=ln,g.isDate=xm,g.isElement=Lm,g.isEmpty=Nm,g.isEqual=Um,g.isEqualWith=Om,g.isError=ba,g.isFinite=$m,g.isFunction=Kt,g.isInteger=yl,g.isLength=Yi,g.isMap=Tl,g.isMatch=Dm,g.isMatchWith=Mm,g.isNaN=km,g.isNative=Fm,g.isNil=Wm,g.isNull=Hm,g.isNumber=bl,g.isObject=pe,g.isObjectLike=_e,g.isPlainObject=Gr,g.isRegExp=Ra,g.isSafeInteger=Vm,g.isSet=Rl,g.isString=Ji,g.isSymbol=rt,g.isTypedArray=ir,g.isUndefined=Bm,g.isWeakMap=Gm,g.isWeakSet=Qm,g.join=Kg,g.kebabCase=U_,g.last=dt,g.lastIndexOf=Yg,g.lowerCase=O_,g.lowerFirst=$_,g.lt=qm,g.lte=zm,g.max=Iv,g.maxBy=xv,g.mean=Lv,g.meanBy=Nv,g.min=Uv,g.minBy=Ov,g.stubArray=$a,g.stubFalse=Da,g.stubObject=wv,g.stubString=Sv,g.stubTrue=Ev,g.multiply=$v,g.nth=Jg,g.noConflict=hv,g.noop=Oa,g.now=qi,g.pad=D_,g.padEnd=M_,g.padStart=k_,g.parseInt=F_,g.random=P_,g.reduce=jp,g.reduceRight=em,g.repeat=H_,g.replace=W_,g.result=v_,g.round=Dv,g.runInContext=w,g.sample=nm,g.size=sm,g.snakeCase=V_,g.some=am,g.sortedIndex=rp,g.sortedIndexBy=ip,g.sortedIndexOf=sp,g.sortedLastIndex=ap,g.sortedLastIndexBy=op,g.sortedLastIndexOf=up,g.startCase=G_,g.startsWith=Q_,g.subtract=Mv,g.sum=kv,g.sumBy=Fv,g.template=q_,g.times=Cv,g.toFinite=Yt,g.toInteger=J,g.toLength=Pl,g.toLower=z_,g.toNumber=gt,g.toSafeInteger=Km,g.toString=ae,g.toUpper=K_,g.trim=Y_,g.trimEnd=J_,g.trimStart=X_,g.truncate=Z_,g.unescape=j_,g.uniqueId=Tv,g.upperCase=ev,g.upperFirst=xa,g.each=gl,g.eachRight=pl,g.first=cl,Ua(g,(function(){var e={};return $t(g,function(n,s){se.call(g.prototype,s)||(e[s]=n)}),e})(),{chain:!1}),g.VERSION=a,et(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){g[e].placeholder=g}),et(["drop","take"],function(e,n){ne.prototype[e]=function(s){s=s===r?1:be(J(s),0);var u=this.__filtered__&&!n?new ne(this):this.clone();return u.__filtered__?u.__takeCount__=Me(s,u.__takeCount__):u.__views__.push({size:Me(s,Ut),type:e+(u.__dir__<0?"Right":"")}),u},ne.prototype[e+"Right"]=function(s){return this.reverse()[e](s).reverse()}}),et(["filter","map","takeWhile"],function(e,n){var s=n+1,u=s==De||s==N;ne.prototype[e]=function(h){var p=this.clone();return p.__iteratees__.push({iteratee:B(h,3),type:s}),p.__filtered__=p.__filtered__||u,p}}),et(["head","last"],function(e,n){var s="take"+(n?"Right":"");ne.prototype[e]=function(){return this[s](1).value()[0]}}),et(["initial","tail"],function(e,n){var s="drop"+(n?"":"Right");ne.prototype[e]=function(){return this.__filtered__?new ne(this):this[s](1)}}),ne.prototype.compact=function(){return this.filter(Je)},ne.prototype.find=function(e){return this.filter(e).head()},ne.prototype.findLast=function(e){return this.reverse().find(e)},ne.prototype.invokeMap=j(function(e,n){return typeof e=="function"?new ne(this):this.map(function(s){return kr(s,e,n)})}),ne.prototype.reject=function(e){return this.filter(Ki(B(e)))},ne.prototype.slice=function(e,n){e=J(e);var s=this;return s.__filtered__&&(e>0||n<0)?new ne(s):(e<0?s=s.takeRight(-e):e&&(s=s.drop(e)),n!==r&&(n=J(n),s=n<0?s.dropRight(-n):s.take(n-e)),s)},ne.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ne.prototype.toArray=function(){return this.take(Ut)},$t(ne.prototype,function(e,n){var s=/^(?:filter|find|map|reject)|While$/.test(n),u=/^(?:head|last)$/.test(n),h=g[u?"take"+(n=="last"?"Right":""):n],p=u||/^find/.test(n);h&&(g.prototype[n]=function(){var _=this.__wrapped__,v=u?[1]:arguments,C=_ instanceof ne,P=v[0],I=C||Y(_),L=function(ee){var re=h.apply(g,tn([ee],v));return u&&k?re[0]:re};I&&s&&typeof P=="function"&&P.length!=1&&(C=I=!1);var k=this.__chain__,H=!!this.__actions__.length,Q=p&&!k,X=C&&!H;if(!p&&I){_=X?_:new ne(this);var V=e.apply(_,v);return V.__actions__.push({func:Gi,args:[L],thisArg:r}),new ct(V,k)}return Q&&X?e.apply(this,v):(V=this.thru(L),Q?u?V.value()[0]:V.value():V)})}),et(["pop","push","shift","sort","splice","unshift"],function(e){var n=mi[e],s=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",u=/^(?:pop|shift)$/.test(e);g.prototype[e]=function(){var h=arguments;if(u&&!this.__chain__){var p=this.value();return n.apply(Y(p)?p:[],h)}return this[s](function(_){return n.apply(Y(_)?_:[],h)})}}),$t(ne.prototype,function(e,n){var s=g[n];if(s){var u=s.name+"";se.call(jn,u)||(jn[u]=[]),jn[u].push({name:n,func:s})}}),jn[Mi(r,Z).name]=[{name:"wrapper",func:r}],ne.prototype.clone=ed,ne.prototype.reverse=td,ne.prototype.value=nd,g.prototype.at=Lp,g.prototype.chain=Np,g.prototype.commit=Up,g.prototype.next=Op,g.prototype.plant=Dp,g.prototype.reverse=Mp,g.prototype.toJSON=g.prototype.valueOf=g.prototype.value=kp,g.prototype.first=g.prototype.head,Lr&&(g.prototype[Lr]=$p),g}),Jn=Uf();Tn?((Tn.exports=Jn)._=Jn,Ls._=Jn):Ue._=Jn}).call(Wv)})(Qr,Qr.exports)),Qr.exports}var Ba=Vv();const D={getRandomId:()=>window.crypto.getRandomValues(new Uint32Array(1))[0],isPromise:i=>i&&D.isFunction(i.then),isFunction:i=>i&&{}.toString.call(i)==="[object Function]",isAsyncFunction:i=>i&&{}.toString.call(i)==="[object AsyncFunction]",isString:i=>typeof i=="string"||i instanceof String,isObject:i=>!!(i&&typeof i=="object"&&!Array.isArray(i)),hasHash:i=>!!(i&&i.search(/^[#\/].*$/)===0),getPathWithoutHash:i=>{for(;D.hasHash(i);)i=i.substring(1,i.length);return i},getTrimmedUrl:i=>{const t=i.length>0?D.getPathWithoutHash(i):i;return D.trimTrailingSlash(t.split("?")[0])},addLeadingSlash:i=>(i.startsWith("/")?"":"/")+i,trimLeadingSlash:i=>D.isString(i)?i.replace(/^\/+/g,""):"",trimTrailingSlash:i=>D.isString(i)?i.replace(/\/+$/,""):"",isElementVisible:i=>i?window.getComputedStyle(i).getPropertyValue("display")!=="none":!1,getNodeList:(i,t=!1)=>{const r=[];return i&&Array.from(document.querySelectorAll(i)).forEach(o=>{t?D.isElementVisible(o)&&r.push(o):r.push(o)}),r},prependOrigin:i=>{if(!i||i.startsWith("http"))return i;const t=i.startsWith("/");return i.length?window.location.origin+(t?"":"/")+i:window.location.origin},getConfigValueFromObject:(i,t)=>{let r=0,a=i;const o=t.split(".");for(;a&&r<o.length;)a=a[o[r++]];return a},getConfigBooleanValue:(i,t)=>{const r=D.getConfigValueFromObject(i,t);return r===!0||r==="true"},getUrlParameter:i=>new URLSearchParams(window.location.search).get(i),removeProperties(i,t){const r={};if(!(t instanceof Array)||!t.length)return console.error("[ERROR] removeProperties requires second parameter: array of keys to remove from object."),i;for(const a in i)if(i.hasOwnProperty(a)){const o=t.filter(l=>a.includes(l)).length===0,c=t.filter(l=>l.endsWith("*")).map(l=>l.slice(0,-1)).filter(l=>a.startsWith(l)).length===0;o&&c&&(r[a]=i[a])}return r},replaceVars(i,t,r,a=!0,o=!1){let c=i;if(t)if(a)c=Ba.replace(c,/{([\s\S]+?)}/g,l=>{let f=l.slice(1,-1).trim();return f.indexOf(r)===0&&(f=f.substring(r.length)),Ba.get(t,f,l)});else{const l=o?" ":"";c=c.replace(/\//g,l+"/")+l,Array.from(Object.entries(t)).sort((f,d)=>d[0].length-f[0].length).forEach(f=>{c=c.replace(new RegExp(this.escapeRegExp(r+f[0]+l),"g"),encodeURIComponent(f[1]))}),c=c.replace(new RegExp(this.escapeRegExp(l),"g"),"")}return a&&(c=c.replace(new RegExp("\\{"+this.escapeRegExp(r)+"[^\\}]+\\}","g"),"")),c},escapeRegExp(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},hasHashOrSlash:i=>!!(i&&i.search(/^[#\/].*$/)===0),getPathWithoutHashOrSlash:i=>{for(;D.hasHashOrSlash(i);)i=i.substring(1,i.length);return i}},Dn={wrapAsPromise:i=>new Promise(t=>{t(i)}),applyFunctionPromisified:(i,t)=>(i=i.apply(void 0,t),D.isPromise(i)?i:Dn.wrapAsPromise(i)),getConfigValueFromObjectAsync:(i,t,...r)=>{const a=D.getConfigValueFromObject(i,t);return D.isFunction(a)?Dn.applyFunctionPromisified(a,r):Dn.wrapAsPromise(a)}};class Bv{setErrorMessage(t){this.getLuigi().getEngine()?._connector?.showFatalError(t)}getLuigi(){return window.Luigi}getConfigValue(t){return this.getLuigi().getConfigValue(t)}getConfigValueAsync(t){return this.getLuigi().getConfigValueAsync(t)}async executeConfigFnAsync(t,r=!1,...a){const o=this.getConfigValue(t);if(D.isFunction(o))try{return await Dn.applyFunctionPromisified(o,a)}catch(c){if(r)return Promise.reject(c)}return Promise.resolve(void 0)}}const qe=new Bv;class Gv{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=qe.getConfigValue("auth.storage")||this._defaultStorage),this._storageType}getAuthData(){return this._getStore(this.getStorageKey())}setAuthData(t){this._setStore(this.getStorageKey(),t)}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(t){return window[t]}_setStore(t,r){switch(this.getStorageType()){case"localStorage":case"sessionStorage":r!==void 0?this._getWebStorage(this.getStorageType()).setItem(t,JSON.stringify(r)):this._getWebStorage(this.getStorageType()).removeItem(t);break;case"none":this._internalStorage[t]=r;break;default:console.error(this._invalidStorageMsg)}}_getStore(t){try{switch(this.getStorageType()){case"localStorage":case"sessionStorage":return JSON.parse(this._getWebStorage(this.getStorageType()).getItem(t));case"none":return this._internalStorage[t];default:console.error(this._invalidStorageMsg)}}catch{console.warn("Error parsing authorization data. Auto-logout might not work!")}}}const At=new Gv;class Qv{isAuthorizationEnabled(){return!!qe.getConfigValue("auth.use")}login(){this.isAuthorizationEnabled()&&dn.startAuthorization()}logout(){this.isAuthorizationEnabled()&&dn.logout()}async handleAuthEvent(t,r,a,o){const c=await qe.executeConfigFnAsync("auth.events."+t,!1,r,a),l=c===void 0||!!c;if(l&&o){window.location.href=o;return}return l}get store(){return qe.getLuigi()?.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:()=>At.getStorageKey(),getStorageType:()=>At.getStorageType(),getAuthData:()=>At.getAuthData(),setAuthData:t=>{At.setAuthData(t),dn.broadcastAuthData(t)},removeAuthData:()=>At.removeAuthData(),setNewlyAuthorized:()=>{At.setNewlyAuthorized(),dn.resetExpirationChecks()}}}}const cr=new Qv;class qv{getStoredAuthData(){return At.getAuthData()}isLoggedIn(){const t=this.getStoredAuthData();return!!(t&&t.accessTokenExpirationDate>Number(new Date))}parseUrlAuthErrors(){const t=D.getUrlParameter("error"),r=D.getUrlParameter("errorDescription");if(t)return{error:t,errorDescription:r}}async handleUrlAuthErrors(t,r,a){return r?await cr.handleAuthEvent("onAuthError",t,{error:r,errorDescription:a},t.logoutUrl+"?post_logout_redirect_uri="+t.post_logout_redirect_uri+"&error="+encodeURIComponent(r)+"&errorDescription="+encodeURIComponent(a||"")):!0}}const fn=new qv;function gn(){}function hc(i){return i()}function Bl(){return Object.create(null)}function as(i){i.forEach(hc)}function fc(i){return typeof i=="function"}function dc(i,t){return i!=i?t==t:i!==t||i&&typeof i=="object"||typeof i=="function"}let Zi,Zr;function Gl(i,t){return i===t||(Zi||(Zi=document.createElement("a")),Zi.href=t,i===Zi.href)}function zv(i,t,r){const a=(function(o){if(!o)return document;const c=o.getRootNode?o.getRootNode():o.ownerDocument;return c&&c.host?c:o.ownerDocument})(i);if(!a.getElementById(t)){const o=_r("style");o.id=t,o.textContent=r,(function(c,l){(function(f,d){f.appendChild(d)})(c.head||c,l),l.sheet})(a,o)}}function Mn(i,t,r){i.insertBefore(t,r||null)}function pn(i){i.parentNode&&i.parentNode.removeChild(i)}function _r(i){return document.createElement(i)}function gc(i){return document.createTextNode(i)}function mt(i,t,r){r==null?i.removeAttribute(t):i.getAttribute(t)!==r&&i.setAttribute(t,r)}function zr(i){Zr=i}function pc(){if(!Zr)throw new Error("Function called outside component initialization");return Zr}function mc(i){pc().$$.on_mount.push(i)}const ur=[],jr=[];let pr=[];const Ql=[],Kv=Promise.resolve();let Ga=!1;function Qa(i){pr.push(i)}const Ma=new Set;let ar=0;function K(){if(ar!==0)return;const i=Zr;do{try{for(;ar<ur.length;){const t=ur[ar];ar++,zr(t),Yv(t.$$)}}catch(t){throw ur.length=0,ar=0,t}for(zr(null),ur.length=0,ar=0;jr.length;)jr.pop()();for(let t=0;t<pr.length;t+=1){const r=pr[t];Ma.has(r)||(Ma.add(r),r())}pr.length=0}while(ur.length);for(;Ql.length;)Ql.pop()();Ga=!1,Ma.clear(),zr(i)}function Yv(i){if(i.fragment!==null){i.update(),as(i.before_update);const t=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,t),i.after_update.forEach(Qa)}}const Jv=new Set;function Xv(i,t){const r=i.$$;r.fragment!==null&&((function(a){const o=[],c=[];pr.forEach((l=>a.indexOf(l)===-1?o.push(l):c.push(l))),c.forEach((l=>l())),pr=o})(r.after_update),as(r.on_destroy),r.fragment&&r.fragment.d(t),r.on_destroy=r.fragment=null,r.ctx=[])}function Zv(i,t){i.$$.dirty[0]===-1&&(ur.push(i),Ga||(Ga=!0,Kv.then(K)),i.$$.dirty.fill(0)),i.$$.dirty[t/31|0]|=1<<t%31}function _c(i,t,r,a,o,c,l=null,f=[-1]){const d=Zr;zr(i);const m=i.$$={fragment:null,ctx:[],props:c,update:gn,not_equal:o,bound:Bl(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(d?d.$$.context:[])),callbacks:Bl(),dirty:f,skip_bound:!1,root:t.target||d.$$.root};l&&l(m.root);let S=!1;if(m.ctx=r?r(i,t.props||{},((T,R,...x)=>{const $=x.length?x[0]:R;return m.ctx&&o(m.ctx[T],m.ctx[T]=$)&&(!m.skip_bound&&m.bound[T]&&m.bound[T]($),S&&Zv(i,T)),R})):[],m.update(),S=!0,as(m.before_update),m.fragment=!!a&&a(m.ctx),t.target){if(t.hydrate){const T=(function(R){return Array.from(R.childNodes)})(t.target);m.fragment&&m.fragment.l(T),T.forEach(pn)}else m.fragment&&m.fragment.c();t.intro&&(y=i.$$.fragment)&&y.i&&(Jv.delete(y),y.i(E)),(function(T,R,x){const{fragment:$,after_update:W}=T.$$;$&&$.m(R,x),Qa((()=>{const Z=T.$$.on_mount.map(hc).filter(fc);T.$$.on_destroy?T.$$.on_destroy.push(...Z):as(Z),T.$$.on_mount=[]})),W.forEach(Qa)})(i,t.target,t.anchor),K()}var y,E;zr(d)}let vc;function ts(i,t,r,a){const o=r[i]?.type;if(t=o==="Boolean"&&typeof t!="boolean"?t!=null:t,!a||!r[i])return t;if(a==="toAttribute")switch(o){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(o){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":default:return t;case"Number":return t!=null?+t:t}}function wc(i,t,r,a,o,c){let l=class extends vc{constructor(){super(i,r,o),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map((f=>(t[f].attribute||f).toLowerCase()))}};return Object.keys(t).forEach((f=>{Object.defineProperty(l.prototype,f,{get(){return this.$$c&&f in this.$$c?this.$$c[f]:this.$$d[f]},set(d){d=ts(f,d,t),this.$$d[f]=d,this.$$c?.$set({[f]:d})}})})),a.forEach((f=>{Object.defineProperty(l.prototype,f,{get(){return this.$$c?.[f]}})})),c&&(l=c(l)),i.element=l,l}typeof HTMLElement=="function"&&(vc=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;constructor(i,t,r){super(),this.$$ctor=i,this.$$s=t,r&&this.attachShadow({mode:"open"})}addEventListener(i,t,r){if(this.$$l[i]=this.$$l[i]||[],this.$$l[i].push(t),this.$$c){const a=this.$$c.$on(i,t);this.$$l_u.set(t,a)}super.addEventListener(i,t,r)}removeEventListener(i,t,r){if(super.removeEventListener(i,t,r),this.$$c){const a=this.$$l_u.get(t);a&&(a(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(c){return()=>{let l;return{c:function(){l=_r("slot"),c!=="default"&&mt(l,"name",c)},m:function(f,d){Mn(f,l,d)},d:function(f){f&&pn(l)}}}};var i=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},a=(function(c){const l={};return c.childNodes.forEach((f=>{l[f.slot||"default"]=!0})),l})(this);for(const c of this.$$s)c in a&&(r[c]=[t(c)]);for(const c of this.attributes){const l=this.$$g_p(c.name);l in this.$$d||(this.$$d[l]=ts(l,c.value,this.$$p_d,"toProp"))}for(const c in this.$$p_d)c in this.$$d||this[c]===void 0||(this.$$d[c]=this[c],delete this[c]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$scope:{ctx:[]}}});const o=()=>{this.$$r=!0;for(const c in this.$$p_d)if(this.$$d[c]=this.$$c.$$.ctx[this.$$c.$$.props[c]],this.$$p_d[c].reflect){const l=ts(c,this.$$d[c],this.$$p_d,"toAttribute");l==null?this.removeAttribute(this.$$p_d[c].attribute||c):this.setAttribute(this.$$p_d[c].attribute||c,l)}this.$$r=!1};this.$$c.$$.after_update.push(o),o();for(const c in this.$$l)for(const l of this.$$l[c]){const f=this.$$c.$on(c,l);this.$$l_u.set(l,f)}this.$$l={}}}attributeChangedCallback(i,t,r){this.$$r||(i=this.$$g_p(i),this.$$d[i]=ts(i,r,this.$$p_d,"toProp"),this.$$c?.$set({[i]:this.$$d[i]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(i){return Object.keys(this.$$p_d).find((t=>this.$$p_d[t].attribute===i||!this.$$p_d[t].attribute&&t.toLowerCase()===i))||i}});class Sc{$$=void 0;$$set=void 0;$destroy(){Xv(this,1),this.$destroy=gn}$on(t,r){if(!fc(r))return gn;const a=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return a.push(r),()=>{const o=a.indexOf(r);o!==-1&&a.splice(o,1)}}$set(t){var r;this.$$set&&(r=t,Object.keys(r).length!==0)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}var te;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"})(te||(te={}));class jv extends Event{constructor(t,r,a,o){super(t),this.detail=r,this.payload=a||r||{},this.callbackFn=o}callback(t){this.callbackFn&&this.callbackFn(t)}}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 Za{isVisible(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}sendCustomMessageToIframe(t,r,a){const o=a||"custom";if(t?.iframe?.contentWindow){const c=new URL(t.iframe.src);o==="custom"?t.iframe.contentWindow.postMessage({msg:o,data:r},c.origin):t.iframe.contentWindow.postMessage({msg:o,...r},c.origin)}else console.error("Message target could not be resolved")}dispatchWithPayload(t,r,a,o,c){this.dispatch(t,r,a,c,o)}dispatch(t,r,a,o,c){const l=new jv(t,a,c,o);r.dispatchEvent(l)}getTargetContainer(t){let r;return globalThis.__luigi_container_manager.container.forEach((a=>{a.iframeHandle?.iframe&&a.iframeHandle.iframe.contentWindow===t.source&&(r=a)})),r}getContainerManager(){return globalThis.__luigi_container_manager||(globalThis.__luigi_container_manager={container:[],messageListener:t=>{const r=this.getTargetContainer(t),a=r?.iframeHandle?.iframe?.contentWindow;if(a&&a===t.source)switch(t.data.msg){case te.CUSTOM_MESSAGE:{const o=t.data.data,c=o.id;delete o.id,this.dispatch(O.CUSTOM_MESSAGE,r,{id:c,_metaData:{},data:o})}break;case te.GET_CONTEXT:a.postMessage({msg:te.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||{}},t.origin);break;case te.NAVIGATION_REQUEST:this.dispatch(O.NAVIGATION_REQUEST,r,t.data.params,(o=>{a.postMessage({msg:te.CLOSE_MODAL_ANSWER,data:o},t.origin)}));break;case te.ALERT_REQUEST:this.dispatchWithPayload(O.ALERT_REQUEST,r,t,t.data?.data?.settings,(o=>{r.notifyAlertClosed(t.data?.data?.settings?.id,o)}));break;case te.INITIALIZED:this.dispatch(O.INITIALIZED,r,t.data?.params||{});break;case te.ADD_SEARCH_PARAMS_REQUEST:this.dispatch(O.ADD_SEARCH_PARAMS_REQUEST,r,{data:t.data.data,keepBrowserHistory:t.data.keepBrowserHistory});break;case te.ADD_NODE_PARAMS_REQUEST:this.dispatch(O.ADD_NODE_PARAMS_REQUEST,r,{data:t.data.data,keepBrowserHistory:t.data.keepBrowserHistory});break;case te.SHOW_CONFIRMATION_MODAL_REQUEST:this.dispatchWithPayload(O.SHOW_CONFIRMATION_MODAL_REQUEST,r,t.data.data,t.data.data?.settings,(o=>{r.notifyConfirmationModalClosed(o)}));break;case te.SHOW_LOADING_INDICATOR_REQUEST:this.dispatch(O.SHOW_LOADING_INDICATOR_REQUEST,r,t);break;case te.HIDE_LOADING_INDICATOR_REQUEST:this.dispatch(O.HIDE_LOADING_INDICATOR_REQUEST,r,t);break;case te.SET_CURRENT_LOCALE_REQUEST:this.dispatchWithPayload(O.SET_CURRENT_LOCALE_REQUEST,r,t,t.data.data);break;case te.LOCAL_STORAGE_SET_REQUEST:this.dispatchWithPayload(O.LOCAL_STORAGE_SET_REQUEST,r,t,t.data.data?.params);break;case te.RUNTIME_ERROR_HANDLING_REQUEST:this.dispatch(O.RUNTIME_ERROR_HANDLING_REQUEST,r,t);break;case te.SET_ANCHOR_LINK_REQUEST:this.dispatchWithPayload(O.SET_ANCHOR_LINK_REQUEST,r,t,t.data.anchor);break;case te.SET_THIRD_PARTY_COOKIES_REQUEST:this.dispatch(O.SET_THIRD_PARTY_COOKIES_REQUEST,r,t);break;case te.BACK_NAVIGATION_REQUEST:{let o=t.data?.goBackContext||{};if(typeof o=="string")try{o=JSON.parse(o)}catch(c){console.warn(c)}this.dispatch(O.GO_BACK_REQUEST,r,o),this.dispatch(O.BACK_NAVIGATION_REQUEST,r,t)}break;case te.GET_CURRENT_ROUTE_REQUEST:this.dispatchWithPayload(O.GET_CURRENT_ROUTE_REQUEST,r,t,t.data.data,(o=>{a.postMessage({msg:te.SEND_CURRENT_ROUTE_ANSWER,data:{correlationId:t.data?.data?.id,route:o}},t.origin)}));break;case te.NAVIGATION_COMPLETED_REPORT:this.dispatch(O.NAVIGATION_COMPLETED_REPORT,r,t);break;case te.UPDATE_MODAL_PATH_DATA_REQUEST:this.dispatchWithPayload(O.UPDATE_MODAL_PATH_DATA_REQUEST,r,t,t.data.params);break;case te.UPDATE_MODAL_SETTINGS:this.dispatchWithPayload(O.UPDATE_MODAL_SETTINGS_REQUEST,r,t,{addHistoryEntry:t.data.addHistoryEntry,updatedModalSettings:t.data.updatedModalSettings});break;case te.CHECK_PATH_EXISTS_REQUEST:this.dispatchWithPayload(O.CHECK_PATH_EXISTS_REQUEST,r,t,t.data.data,(o=>{a.postMessage({msg:te.SEND_PATH_EXISTS_ANSWER,data:{correlationId:t.data?.data?.id,pathExists:o}},t.origin)}));break;case te.SET_DIRTY_STATUS_REQUEST:this.dispatchWithPayload(O.SET_DIRTY_STATUS_REQUEST,r,t,{dirty:t.data.dirty});break;case te.SET_VIEW_GROUP_DATA_REQUEST:this.dispatch(O.SET_VIEW_GROUP_DATA_REQUEST,r,t.data.data);break;case te.ADD_BACKDROP_REQUEST:this.dispatch(O.ADD_BACKDROP_REQUEST,r,t);break;case te.REMOVE_BACKDROP_REQUEST:this.dispatch(O.REMOVE_BACKDROP_REQUEST,r,t);break;case te.CLOSE_CURRENT_MODAL_REQUEST:this.dispatch(O.CLOSE_CURRENT_MODAL_REQUEST,r,t)}}},window.addEventListener("message",globalThis.__luigi_container_manager.messageListener)),globalThis.__luigi_container_manager}registerContainer(t){this.getContainerManager().container.push(t)}}const hn=new Za,lr=new class{constructor(){this.updateContext=(i,t,r,a,o,c)=>{if(r){const l=t||{};hn.sendCustomMessageToIframe(r,{context:i,nodeParams:a||{},pathParams:o||{},searchParams:c||{},internal:l,withoutSync:!0},te.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update context on inexisting iframe")},this.updateViewUrl=(i,t,r,a)=>{if(a){const o=r||{};hn.sendCustomMessageToIframe(a,{context:t,internal:o,withoutSync:!1,viewUrl:i},te.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update route on inexisting iframe")},this.updateAuthData=(i,t)=>{i&&t?hn.sendCustomMessageToIframe(i,{authData:t},te.AUTH_SET_TOKEN):console.warn("Attempting to update auth data on inexisting iframe or authData")},this.sendCustomMessage=(i,t,r,a,o)=>{if(r&&t._luigi_mfe_webcomponent)hn.dispatch(i,t._luigi_mfe_webcomponent,o);else{const c={...o};c.id&&console.warn('Property "id" is reserved and can not be used in custom message data'),c.id=i,hn.sendCustomMessageToIframe(a,c)}},this.notifyConfirmationModalClosed=(i,t)=>{const r={data:{confirmed:i}};hn.sendCustomMessageToIframe(t,r,te.CONFIRMATION_MODAL_CLOSED)}}notifyAlertClosed(i,t,r){const a=t?{id:i,dismissKey:t}:{id:i};hn.sendCustomMessageToIframe(r,a,te.ALERT_CLOSED)}},ql=i=>{if(!i)return;const t=i;return t.forEach(((r,a)=>{t[a]=r+(r.indexOf(";")!=-1?"":";"),t[a]=i[a].replaceAll('"',"'")})),t.join(" ")};class vr{constructor(t){t?(this.rendererObject=t,this.config=t.config||{}):this.config={}}createCompoundContainer(){return document.createElement("div")}createCompoundItemContainer(t){return document.createElement("div")}attachCompoundItem(t,r){t.appendChild(r)}}class ew extends vr{constructor(t){super(t||{use:{}}),t&&t.use&&t.use.extends&&(this.superRenderer=Ec({use:t.use.extends,config:t.config}))}createCompoundContainer(){return this.rendererObject.use.createCompoundContainer?this.rendererObject.use.createCompoundContainer(this.config,this.superRenderer):this.superRenderer?this.superRenderer.createCompoundContainer():super.createCompoundContainer()}createCompoundItemContainer(t){return this.rendererObject.use.createCompoundItemContainer?this.rendererObject.use.createCompoundItemContainer(t,this.config,this.superRenderer):this.superRenderer?this.superRenderer.createCompoundItemContainer(t):super.createCompoundItemContainer(t)}attachCompoundItem(t,r){this.rendererObject.use.attachCompoundItem?this.rendererObject.use.attachCompoundItem(t,r,this.superRenderer):this.superRenderer?this.superRenderer.attachCompoundItem(t,r):super.attachCompoundItem(t,r)}}class tw extends vr{createCompoundContainer(){const t="__lui_compound_"+new Date().getTime(),r=document.createElement("div");r.classList.add(t);let a="";return this.config.layouts&&this.config.layouts.forEach((o=>{if(o.minWidth||o.maxWidth){let c="@media only screen ";o.minWidth!=null&&(c+=`and (min-width: ${o.minWidth}px) `),o.maxWidth!=null&&(c+=`and (max-width: ${o.maxWidth}px) `),c+=`{
|
|
21
|
+
.${t} {
|
|
22
22
|
grid-template-columns: ${o.columns||"auto"};
|
|
23
23
|
grid-template-rows: ${o.rows||"auto"};
|
|
24
24
|
grid-gap: ${o.gap||"0"};
|
|
@@ -26,7 +26,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
26
26
|
}
|
|
27
27
|
`,a+=c}})),r.innerHTML=`
|
|
28
28
|
<style scoped>
|
|
29
|
-
.${
|
|
29
|
+
.${t} {
|
|
30
30
|
display: grid;
|
|
31
31
|
grid-template-columns: ${this.config.columns||"auto"};
|
|
32
32
|
grid-template-rows: ${this.config.rows||"auto"};
|
|
@@ -35,7 +35,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
35
35
|
}
|
|
36
36
|
${a}
|
|
37
37
|
</style>
|
|
38
|
-
`,r}createCompoundItemContainer(n){const r=n||{},a=document.createElement("div");return a.setAttribute("style",`grid-row: ${r.row||"auto"}; grid-column: ${r.column||"auto"}`),a.classList.add("lui-compoundItemCnt"),a}}const Ec=i=>{const n=i.use;return n?n==="grid"?new tS(i):n.createCompoundContainer||n.createCompoundItemContainer||n.attachCompoundItem?new eS(i):new vr(i):new vr(i)},zl=(i,n,r,a)=>{n?.eventListeners&&n.eventListeners.forEach((o=>{const c=o.source+"."+o.name,l=i[c],f={wcElementId:r,wcElement:a,action:o.action,converter:o.dataConverter};l?l.push(f):i[c]=[f]}))};function Kl(i){return String(i).replaceAll("<","<").replaceAll(">",">").replaceAll(""",'"').replaceAll("'","'").replaceAll("/","/")}class Cc{constructor(){this.alertResolvers={},this.alertIndex=0,this.containerService=new Za}dynamicImport(n){return Object.freeze(import(n))}processViewUrl(n,r){return n}attachWC(n,r,a,o,c,l,f){if(a&&a.contains(r)){const g=document.createElement(n);l&&g.setAttribute("nodeId",l),g.setAttribute("lui_web_component","true"),this.initWC(g,n,a,c,o,l,f),a.replaceChild(g,r),a._luigi_node&&(a._luigi_mfe_webcomponent=g),a.dispatchEvent(new Event("wc_ready"))}}dispatchLuigiEvent(n,r,a){this.containerService.dispatch(n,this.thisComponent,r,a)}createClientAPI(n,r,a,o,c){return{linkManager:()=>{let l=null,f=!1,g=!1,m=!1,w={};const y={navigate:(E,b={})=>{const R={fromContext:l,fromClosestContext:f,fromVirtualTreeRoot:g,fromParent:m,nodeParams:w,...b};this.dispatchLuigiEvent($.NAVIGATION_REQUEST,{link:E,...R})},navigateToIntent:(E,b={})=>{let R="#?intent=";if(R+=E,b&&Object.keys(b)?.length){const x=Object.entries(b);if(x.length>0){R+="?";for(const[U,H]of x)R+=U+"="+H+"&";R=R.slice(0,-1)}}y.navigate(R)},fromClosestContext:()=>(f=!0,y),fromContext:E=>(l=E,y),fromVirtualTreeRoot:()=>(g=!0,y),fromParent:()=>(m=!0,y),getCurrentRoute:()=>{const E={fromContext:l,fromClosestContext:f,fromVirtualTreeRoot:g,fromParent:m,nodeParams:w};return new Promise(((b,R)=>{this.containerService.dispatch($.GET_CURRENT_ROUTE_REQUEST,this.thisComponent,{...E},(x=>{x?b(x):R("No current route received.")}))}))},withParams:E=>(w=E,y),updateModalPathInternalNavigation:(E,b={},R=!1)=>{if(!E)return void console.warn("Updating path of the modal upon internal navigation prevented. No path specified.");const x={fromClosestContext:f,fromContext:l,fromParent:m,fromVirtualTreeRoot:g,nodeParams:w};this.dispatchLuigiEvent($.UPDATE_MODAL_PATH_DATA_REQUEST,Object.assign(x,{history:R,link:E,modal:b}))},updateTopNavigation:()=>{this.dispatchLuigiEvent($.UPDATE_TOP_NAVIGATION_REQUEST,{})},pathExists:E=>{const b={fromContext:l,fromClosestContext:f,fromVirtualTreeRoot:g,fromParent:m,nodeParams:w};return new Promise(((R,x)=>{this.containerService.dispatch($.CHECK_PATH_EXISTS_REQUEST,this.thisComponent,{...b,link:E},(U=>{U?R(!0):x(!1)})),this.containerService.dispatch($.PATH_EXISTS_REQUEST,this.thisComponent,{...b,link:E},(U=>{U?R(!0):x(!1)}))}))},openAsDrawer:(E,b={})=>{y.navigate(E,{drawer:b})},openAsModal:(E,b={})=>{y.navigate(E,{modal:b})},openAsSplitView:(E,b={})=>{y.navigate(E,{splitView:b})},goBack:E=>{this.dispatchLuigiEvent($.GO_BACK_REQUEST,E)},hasBack:()=>!1,updateModalSettings:(E={},b=!1)=>{this.dispatchLuigiEvent($.UPDATE_MODAL_SETTINGS_REQUEST,{updatedModalSettings:E,addHistoryEntry:b})}};return y},uxManager:()=>({showAlert:l=>(l.id=this.alertIndex++,new Promise((f=>{this.alertResolvers[l.id]=f,this.dispatchLuigiEvent($.ALERT_REQUEST,l,(g=>{this.resolveAlert(l.id,g)}))}))),showConfirmationModal:l=>new Promise(((f,g)=>{this.modalResolver={resolve:f,reject:g},this.containerService.dispatch($.SHOW_CONFIRMATION_MODAL_REQUEST,this.thisComponent,l,(m=>{m?f():g()}))})),getCurrentTheme:()=>this.thisComponent.theme,closeUserSettings:()=>{this.dispatchLuigiEvent($.CLOSE_USER_SETTINGS_REQUEST,this.thisComponent.userSettings)},openUserSettings:()=>{this.dispatchLuigiEvent($.OPEN_USER_SETTINGS_REQUEST,this.thisComponent.userSettings)},collapseLeftSideNav:()=>{this.dispatchLuigiEvent($.COLLAPSE_LEFT_NAV_REQUEST,{})},getDirtyStatus:()=>this.thisComponent.dirtyStatus||!1,getDocumentTitle:()=>this.thisComponent.documentTitle,setDocumentTitle:l=>{this.dispatchLuigiEvent($.SET_DOCUMENT_TITLE_REQUEST,l)},setDirtyStatus:l=>{this.dispatchLuigiEvent($.SET_DIRTY_STATUS_REQUEST,{dirty:l})},setCurrentLocale:l=>{l&&this.dispatchLuigiEvent($.SET_CURRENT_LOCALE_REQUEST,{currentLocale:l})},removeBackdrop:()=>{this.dispatchLuigiEvent($.REMOVE_BACKDROP_REQUEST,{})},addBackdrop:()=>{this.dispatchLuigiEvent($.ADD_BACKDROP_REQUEST,{})},showLoadingIndicator:()=>{this.dispatchLuigiEvent($.SHOW_LOADING_INDICATOR_REQUEST,{})},hideLoadingIndicator:()=>{this.dispatchLuigiEvent($.HIDE_LOADING_INDICATOR_REQUEST,{})},hideAppLoadingIndicator:()=>{this.dispatchLuigiEvent($.HIDE_LOADING_INDICATOR_REQUEST,{})},closeCurrentModal:()=>{this.dispatchLuigiEvent($.CLOSE_CURRENT_MODAL_REQUEST,{})}}),getCurrentLocale:()=>this.thisComponent.locale,getActiveFeatureToggles:()=>this.thisComponent.activeFeatureToggleList||[],publishEvent:l=>{n&&n.eventBus&&n.eventBus.onPublishEvent(l,r,a);const f={id:l.type,_metaData:{nodeId:r,wc_id:a,src:o},data:l.detail};this.dispatchLuigiEvent($.CUSTOM_MESSAGE,f)},luigiClientInit:()=>{this.dispatchLuigiEvent($.INITIALIZED,{})},addNodeParams:(l,f)=>{c||this.dispatchLuigiEvent($.ADD_NODE_PARAMS_REQUEST,{params:l,data:l,keepBrowserHistory:f})},getNodeParams:l=>{return c?{}:l?(f=this.thisComponent.nodeParams,Object.entries(f).reduce(((g,m)=>(g[Kl(m[0])]=Kl(m[1]),g)),{})):this.thisComponent.nodeParams||{};var f},setAnchor:l=>{c||this.dispatchLuigiEvent($.SET_ANCHOR_LINK_REQUEST,l)},getAnchor:()=>this.thisComponent.anchor||"",getCoreSearchParams:()=>this.thisComponent.searchParams||{},getPathParams:()=>this.thisComponent.pathParams||{},getClientPermissions:()=>this.thisComponent.clientPermissions||{},addCoreSearchParams:(l={},f=!0)=>{this.dispatchLuigiEvent($.ADD_SEARCH_PARAMS_REQUEST,{data:l,keepBrowserHistory:f})},getUserSettings:()=>this.thisComponent.userSettings||{},setViewGroupData:l=>{this.dispatchLuigiEvent($.SET_VIEW_GROUP_DATA_REQUEST,l)}}}initWC(n,r,a,o,c,l,f){const g=this.createClientAPI(a,l,r,n,f);if(n.__postProcess){const m=new URL(document.baseURI).origin===new URL(o,document.baseURI).origin?new URL("./",new URL(o,document.baseURI)):new URL("./",o);n.__postProcess(c,g,m.origin+m.pathname)}else n.context=c,n.LuigiClient=g}generateWCId(n){let r="";const a=new URL(n,encodeURI(location.href)).href;for(let o=0;o<a.length;o++)r+=a.charCodeAt(o).toString(16);return"luigi-wc-"+r}registerWCFromUrl(n,r){const a=this.processViewUrl(n);return new Promise(((o,c)=>{this.checkWCUrl(a)?this.dynamicImport(a).then((l=>{try{if(!window.customElements.get(r)){let f=l.default;if(!HTMLElement.isPrototypeOf(f)){const g=Object.keys(l);for(let m=0;m<g.length&&(f=l[g[m]],!HTMLElement.isPrototypeOf(f));m++);}window.customElements.define(r,f)}o(1)}catch(f){c(f)}})).catch((l=>{c(l)})):c(`Error: View URL '${a}' not allowed to be included`)}))}includeSelfRegisteredWCFromUrl(n,r,a){if(this.checkWCUrl(r)){this.containerService.getContainerManager()._registerWebcomponent||(this.containerService.getContainerManager()._registerWebcomponent=(c,l)=>{window.customElements.define(this.generateWCId(c),l)}),window.Luigi||(window.Luigi={},window.Luigi._registerWebcomponent||(window.Luigi._registerWebcomponent=(c,l)=>{this.containerService.getContainerManager()._registerWebcomponent(c,l)}));const o=document.createElement("script");o.setAttribute("src",r),n.webcomponent.type==="module"&&o.setAttribute("type","module"),o.setAttribute("defer","true"),o.addEventListener("load",(()=>{a()})),document.body.appendChild(o)}else console.warn(`View URL '${r}' not allowed to be included`)}checkWCUrl(n){return!0}renderWebComponent(n,r,a,o,c,l){const f=this.processViewUrl(n,{context:a}),g=o?.webcomponent?.tagName||this.generateWCId(f),m=document.createElement("div");r.appendChild(m),r._luigi_node=o,window.customElements.get(g)?this.attachWC(g,m,r,a,f,c,l):window.luigiWCFn?window.luigiWCFn(f,g,m,(()=>{this.attachWC(g,m,r,a,f,c,l)})):o?.webcomponent?.selfRegistered?this.includeSelfRegisteredWCFromUrl(o,f,(()=>{this.attachWC(g,m,r,a,f,c,l)})):this.registerWCFromUrl(f,g).then((()=>{this.attachWC(g,m,r,a,f,c,l)})).catch((w=>{console.warn("ERROR =>",w),this.containerService.dispatch($.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,w)}))}createCompoundContainerAsync(n,r,a){return new Promise(((o,c)=>{if(n.viewUrl)try{const l=a?.webcomponent?.tagName||this.generateWCId(n.viewUrl);a?.webcomponent?.selfRegistered?this.includeSelfRegisteredWCFromUrl(a,n.viewUrl,(()=>{const f=document.createElement(l);f.setAttribute("lui_web_component","true"),this.initWC(f,l,f,n.viewUrl,r,"_root"),o(f)})):this.registerWCFromUrl(n.viewUrl,l).then((()=>{const f=document.createElement(l);f.setAttribute("lui_web_component","true"),this.initWC(f,l,f,n.viewUrl,r,"_root"),o(f)})).catch((f=>{console.warn("Error: ",f),this.containerService.dispatch($.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,f)}))}catch(l){c(l)}else o(n.createCompoundContainer())}))}renderWebComponentCompound(n,r,a){let o;return n.webcomponent&&n.viewUrl?(o=new vr,o.viewUrl=this.processViewUrl(n.viewUrl,{context:a}),o.createCompoundItemContainer=c=>{const l=document.createElement("div");return c?.slot&&l.setAttribute("slot",c.slot),l}):n.compound?.renderer&&(o=Ec(n.compound.renderer)),o=o||new vr,new Promise((c=>{this.createCompoundContainerAsync(o,a,n).then((l=>{r._luigi_mfe_webcomponent=l,r._luigi_node=n;const f={};l.eventBus={listeners:f,onPublishEvent:(g,m,w)=>{const y=f[m+"."+g.type]||[];y.push(...f["*."+g.type]||[]),y.forEach((E=>{const b=E.wcElement||l.querySelector("[nodeId="+E.wcElementId+"]");b?b.dispatchEvent(new CustomEvent(E.action,{detail:E.converter?E.converter(g.detail):g.detail})):console.debug("Could not find event target",E)}))}},n.compound?.children?.forEach(((g,m)=>{const w={...a,...g.context},y=o.createCompoundItemContainer(g.layoutConfig);y.eventBus=l.eventBus,o.attachCompoundItem(l,y);const E=g.id||"gen_"+m;this.renderWebComponent(g.viewUrl,y,w,g,E,!0),zl(f,g,E)})),r.appendChild(l),zl(f,n.compound,"_root",l),c(l)})).catch((l=>{console.warn("Error: ",l),this.containerService.dispatch($.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,l)}))}))}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 Kr=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 Yl(i){let n,r=(!i[4]||i[4]==="false")&&Jl(i);return{c(){r&&r.c(),n=gc("")},m(a,o){r&&r.m(a,o),Mn(a,n,o)},p(a,o){a[4]&&a[4]!=="false"?r&&(r.d(1),r=null):r?r.p(a,o):(r=Jl(a),r.c(),r.m(n.parentNode,n))},d(a){a&&pn(n),r&&r.d(a)}}}function Jl(i){let n,r,a,o,c,l;return{c(){n=_r("style"),n.textContent=`main.lui-isolated,
|
|
38
|
+
`,r}createCompoundItemContainer(t){const r=t||{},a=document.createElement("div");return a.setAttribute("style",`grid-row: ${r.row||"auto"}; grid-column: ${r.column||"auto"}`),a.classList.add("lui-compoundItemCnt"),a}}const Ec=i=>{const t=i.use;return t?t==="grid"?new tw(i):t.createCompoundContainer||t.createCompoundItemContainer||t.attachCompoundItem?new ew(i):new vr(i):new vr(i)},zl=(i,t,r,a)=>{t?.eventListeners&&t.eventListeners.forEach((o=>{const c=o.source+"."+o.name,l=i[c],f={wcElementId:r,wcElement:a,action:o.action,converter:o.dataConverter};l?l.push(f):i[c]=[f]}))};function Kl(i){return String(i).replaceAll("<","<").replaceAll(">",">").replaceAll(""",'"').replaceAll("'","'").replaceAll("/","/")}class Cc{constructor(){this.alertResolvers={},this.alertIndex=0,this.containerService=new Za}dynamicImport(t){return Object.freeze(import(t))}processViewUrl(t,r){return t}attachWC(t,r,a,o,c,l,f){if(a&&a.contains(r)){const d=document.createElement(t);l&&d.setAttribute("nodeId",l),d.setAttribute("lui_web_component","true"),this.initWC(d,t,a,c,o,l,f),a.replaceChild(d,r),a._luigi_node&&(a._luigi_mfe_webcomponent=d),a.dispatchEvent(new Event("wc_ready"))}}dispatchLuigiEvent(t,r,a){this.containerService.dispatch(t,this.thisComponent,r,a)}createClientAPI(t,r,a,o,c){return{linkManager:()=>{let l=null,f=!1,d=!1,m=!1,S={};const y={navigate:(E,T={})=>{const R={fromContext:l,fromClosestContext:f,fromVirtualTreeRoot:d,fromParent:m,nodeParams:S,...T};this.dispatchLuigiEvent(O.NAVIGATION_REQUEST,{link:E,...R})},navigateToIntent:(E,T={})=>{let R="#?intent=";if(R+=E,T&&Object.keys(T)?.length){const x=Object.entries(T);if(x.length>0){R+="?";for(const[$,W]of x)R+=$+"="+W+"&";R=R.slice(0,-1)}}y.navigate(R)},fromClosestContext:()=>(f=!0,y),fromContext:E=>(l=E,y),fromVirtualTreeRoot:()=>(d=!0,y),fromParent:()=>(m=!0,y),getCurrentRoute:()=>{const E={fromContext:l,fromClosestContext:f,fromVirtualTreeRoot:d,fromParent:m,nodeParams:S};return new Promise(((T,R)=>{this.containerService.dispatch(O.GET_CURRENT_ROUTE_REQUEST,this.thisComponent,{...E},(x=>{x?T(x):R("No current route received.")}))}))},withParams:E=>(S=E,y),updateModalPathInternalNavigation:(E,T={},R=!1)=>{if(!E)return void console.warn("Updating path of the modal upon internal navigation prevented. No path specified.");const x={fromClosestContext:f,fromContext:l,fromParent:m,fromVirtualTreeRoot:d,nodeParams:S};this.dispatchLuigiEvent(O.UPDATE_MODAL_PATH_DATA_REQUEST,Object.assign(x,{history:R,link:E,modal:T}))},updateTopNavigation:()=>{this.dispatchLuigiEvent(O.UPDATE_TOP_NAVIGATION_REQUEST,{})},pathExists:E=>{const T={fromContext:l,fromClosestContext:f,fromVirtualTreeRoot:d,fromParent:m,nodeParams:S};return new Promise(((R,x)=>{this.containerService.dispatch(O.CHECK_PATH_EXISTS_REQUEST,this.thisComponent,{...T,link:E},($=>{$?R(!0):x(!1)})),this.containerService.dispatch(O.PATH_EXISTS_REQUEST,this.thisComponent,{...T,link:E},($=>{$?R(!0):x(!1)}))}))},openAsDrawer:(E,T={})=>{y.navigate(E,{drawer:T})},openAsModal:(E,T={})=>{y.navigate(E,{modal:T})},openAsSplitView:(E,T={})=>{y.navigate(E,{splitView:T})},goBack:E=>{this.dispatchLuigiEvent(O.GO_BACK_REQUEST,E)},hasBack:()=>!1,updateModalSettings:(E={},T=!1)=>{this.dispatchLuigiEvent(O.UPDATE_MODAL_SETTINGS_REQUEST,{updatedModalSettings:E,addHistoryEntry:T})}};return y},uxManager:()=>({showAlert:l=>(l.id=this.alertIndex++,new Promise((f=>{this.alertResolvers[l.id]=f,this.dispatchLuigiEvent(O.ALERT_REQUEST,l,(d=>{this.resolveAlert(l.id,d)}))}))),showConfirmationModal:l=>new Promise(((f,d)=>{this.modalResolver={resolve:f,reject:d},this.containerService.dispatch(O.SHOW_CONFIRMATION_MODAL_REQUEST,this.thisComponent,l,(m=>{m?f():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:l=>{this.dispatchLuigiEvent(O.SET_DOCUMENT_TITLE_REQUEST,l)},setDirtyStatus:l=>{this.dispatchLuigiEvent(O.SET_DIRTY_STATUS_REQUEST,{dirty:l})},setCurrentLocale:l=>{l&&this.dispatchLuigiEvent(O.SET_CURRENT_LOCALE_REQUEST,{currentLocale:l})},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:l=>{t&&t.eventBus&&t.eventBus.onPublishEvent(l,r,a);const f={id:l.type,_metaData:{nodeId:r,wc_id:a,src:o},data:l.detail};this.dispatchLuigiEvent(O.CUSTOM_MESSAGE,f)},luigiClientInit:()=>{this.dispatchLuigiEvent(O.INITIALIZED,{})},addNodeParams:(l,f)=>{c||this.dispatchLuigiEvent(O.ADD_NODE_PARAMS_REQUEST,{params:l,data:l,keepBrowserHistory:f})},getNodeParams:l=>{return c?{}:l?(f=this.thisComponent.nodeParams,Object.entries(f).reduce(((d,m)=>(d[Kl(m[0])]=Kl(m[1]),d)),{})):this.thisComponent.nodeParams||{};var f},setAnchor:l=>{c||this.dispatchLuigiEvent(O.SET_ANCHOR_LINK_REQUEST,l)},getAnchor:()=>this.thisComponent.anchor||"",getCoreSearchParams:()=>this.thisComponent.searchParams||{},getPathParams:()=>this.thisComponent.pathParams||{},getClientPermissions:()=>this.thisComponent.clientPermissions||{},addCoreSearchParams:(l={},f=!0)=>{this.dispatchLuigiEvent(O.ADD_SEARCH_PARAMS_REQUEST,{data:l,keepBrowserHistory:f})},getUserSettings:()=>this.thisComponent.userSettings||{},setViewGroupData:l=>{this.dispatchLuigiEvent(O.SET_VIEW_GROUP_DATA_REQUEST,l)}}}initWC(t,r,a,o,c,l,f){const d=this.createClientAPI(a,l,r,t,f);if(t.__postProcess){const m=new URL(document.baseURI).origin===new URL(o,document.baseURI).origin?new URL("./",new URL(o,document.baseURI)):new URL("./",o);t.__postProcess(c,d,m.origin+m.pathname)}else t.context=c,t.LuigiClient=d}generateWCId(t){let r="";const a=new URL(t,encodeURI(location.href)).href;for(let o=0;o<a.length;o++)r+=a.charCodeAt(o).toString(16);return"luigi-wc-"+r}registerWCFromUrl(t,r){const a=this.processViewUrl(t);return new Promise(((o,c)=>{this.checkWCUrl(a)?this.dynamicImport(a).then((l=>{try{if(!window.customElements.get(r)){let f=l.default;if(!HTMLElement.isPrototypeOf(f)){const d=Object.keys(l);for(let m=0;m<d.length&&(f=l[d[m]],!HTMLElement.isPrototypeOf(f));m++);}window.customElements.define(r,f)}o(1)}catch(f){c(f)}})).catch((l=>{c(l)})):c(`Error: View URL '${a}' not allowed to be included`)}))}includeSelfRegisteredWCFromUrl(t,r,a){if(this.checkWCUrl(r)){this.containerService.getContainerManager()._registerWebcomponent||(this.containerService.getContainerManager()._registerWebcomponent=(c,l)=>{window.customElements.define(this.generateWCId(c),l)}),window.Luigi||(window.Luigi={},window.Luigi._registerWebcomponent||(window.Luigi._registerWebcomponent=(c,l)=>{this.containerService.getContainerManager()._registerWebcomponent(c,l)}));const o=document.createElement("script");o.setAttribute("src",r),t.webcomponent.type==="module"&&o.setAttribute("type","module"),o.setAttribute("defer","true"),o.addEventListener("load",(()=>{a()})),document.body.appendChild(o)}else console.warn(`View URL '${r}' not allowed to be included`)}checkWCUrl(t){return!0}renderWebComponent(t,r,a,o,c,l){const f=this.processViewUrl(t,{context:a}),d=o?.webcomponent?.tagName||this.generateWCId(f),m=document.createElement("div");r.appendChild(m),r._luigi_node=o,window.customElements.get(d)?this.attachWC(d,m,r,a,f,c,l):window.luigiWCFn?window.luigiWCFn(f,d,m,(()=>{this.attachWC(d,m,r,a,f,c,l)})):o?.webcomponent?.selfRegistered?this.includeSelfRegisteredWCFromUrl(o,f,(()=>{this.attachWC(d,m,r,a,f,c,l)})):this.registerWCFromUrl(f,d).then((()=>{this.attachWC(d,m,r,a,f,c,l)})).catch((S=>{console.warn("ERROR =>",S),this.containerService.dispatch(O.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,S)}))}createCompoundContainerAsync(t,r,a){return new Promise(((o,c)=>{if(t.viewUrl)try{const l=a?.webcomponent?.tagName||this.generateWCId(t.viewUrl);a?.webcomponent?.selfRegistered?this.includeSelfRegisteredWCFromUrl(a,t.viewUrl,(()=>{const f=document.createElement(l);f.setAttribute("lui_web_component","true"),this.initWC(f,l,f,t.viewUrl,r,"_root"),o(f)})):this.registerWCFromUrl(t.viewUrl,l).then((()=>{const f=document.createElement(l);f.setAttribute("lui_web_component","true"),this.initWC(f,l,f,t.viewUrl,r,"_root"),o(f)})).catch((f=>{console.warn("Error: ",f),this.containerService.dispatch(O.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,f)}))}catch(l){c(l)}else o(t.createCompoundContainer())}))}renderWebComponentCompound(t,r,a){let o;return t.webcomponent&&t.viewUrl?(o=new vr,o.viewUrl=this.processViewUrl(t.viewUrl,{context:a}),o.createCompoundItemContainer=c=>{const l=document.createElement("div");return c?.slot&&l.setAttribute("slot",c.slot),l}):t.compound?.renderer&&(o=Ec(t.compound.renderer)),o=o||new vr,new Promise((c=>{this.createCompoundContainerAsync(o,a,t).then((l=>{r._luigi_mfe_webcomponent=l,r._luigi_node=t;const f={};l.eventBus={listeners:f,onPublishEvent:(d,m,S)=>{const y=f[m+"."+d.type]||[];y.push(...f["*."+d.type]||[]),y.forEach((E=>{const T=E.wcElement||l.querySelector("[nodeId="+E.wcElementId+"]");T?T.dispatchEvent(new CustomEvent(E.action,{detail:E.converter?E.converter(d.detail):d.detail})):console.debug("Could not find event target",E)}))}},t.compound?.children?.forEach(((d,m)=>{const S={...a,...d.context},y=o.createCompoundItemContainer(d.layoutConfig);y.eventBus=l.eventBus,o.attachCompoundItem(l,y);const E=d.id||"gen_"+m;this.renderWebComponent(d.viewUrl,y,S,d,E,!0),zl(f,d,E)})),r.appendChild(l),zl(f,t.compound,"_root",l),c(l)})).catch((l=>{console.warn("Error: ",l),this.containerService.dispatch(O.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,l)}))}))}resolveAlert(t,r){this.alertResolvers[t]?(this.alertResolvers[t](r===void 0||r),this.alertResolvers[t]=void 0):console.log("Promise is not in the list.")}notifyConfirmationModalClosed(t){this.modalResolver?(t?this.modalResolver.resolve():this.modalResolver.reject(),this.modalResolver=void 0):console.log("Modal promise is not listed.")}}const Kr=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 Yl(i){let t,r=(!i[4]||i[4]==="false")&&Jl(i);return{c(){r&&r.c(),t=gc("")},m(a,o){r&&r.m(a,o),Mn(a,t,o)},p(a,o){a[4]&&a[4]!=="false"?r&&(r.d(1),r=null):r?r.p(a,o):(r=Jl(a),r.c(),r.m(t.parentNode,t))},d(a){a&&pn(t),r&&r.d(a)}}}function Jl(i){let t,r,a,o,c,l;return{c(){t=_r("style"),t.textContent=`main.lui-isolated,
|
|
39
39
|
.lui-isolated iframe {
|
|
40
40
|
width: 100%;
|
|
41
41
|
height: 100%;
|
|
@@ -44,12 +44,12 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
44
44
|
|
|
45
45
|
main.lui-isolated {
|
|
46
46
|
line-height: 0;
|
|
47
|
-
}`,r=gc(" "),a=_r("iframe"),Gl(a.src,o=i[3])||mt(a,"src",o),mt(a,"title",i[1]),mt(a,"allow",c=ql(i[0])),mt(a,"sandbox",l=i[2]?i[2].join(" "):void 0)},m(f,g){Mn(f,n,g),Mn(f,r,g),Mn(f,a,g),i[28](a)},p(f,g){8&g[0]&&!Gl(a.src,o=f[3])&&mt(a,"src",o),2&g[0]&&mt(a,"title",f[1]),1&g[0]&&c!==(c=ql(f[0]))&&mt(a,"allow",c),4&g[0]&&l!==(l=f[2]?f[2].join(" "):void 0)&&mt(a,"sandbox",l)},d(f){f&&(pn(n),pn(r),pn(a)),i[28](null)}}}function nS(i){let n,r,a=i[5]&&Yl(i);return{c(){n=_r("main"),a&&a.c(),mt(n,"class",r=i[4]?void 0:"lui-isolated")},m(o,c){Mn(o,n,c),a&&a.m(n,null),i[29](n)},p(o,c){o[5]?a?a.p(o,c):(a=Yl(o),a.c(),a.m(n,null)):a&&(a.d(1),a=null),16&c[0]&&r!==(r=o[4]?void 0:"lui-isolated")&&mt(n,"class",r)},i:gn,o:gn,d(o){o&&pn(n),a&&a.d(),i[29](null)}}}function rS(i,n,r){let{activeFeatureToggleList:a}=n,{allowRules:o}=n,{anchor:c}=n,{authData:l}=n,{clientPermissions:f}=n,{context:g}=n,{deferInit:m}=n,{dirtyStatus:w}=n,{documentTitle:y}=n,{hasBack:E}=n,{label:b}=n,{locale:R}=n,{noShadow:x}=n,{nodeParams:U}=n,{pathParams:H}=n,{sandboxRules:re}=n,{searchParams:we}=n,{skipCookieCheck:me}=n,{skipInitCheck:qe}=n,{theme:Le}=n,{userSettings:Ze}=n,{viewurl:Re}=n,{webcomponent:Ae}=n;const Ee={};let Pe,D,Zt=!1;const St=new Cc,$e=N=>{if(!Zt){N.sendCustomMessage=(oe,We)=>{lr.sendCustomMessage(oe,N.getNoShadow()?N:Pe,!!Ae,Ee,We)},N.updateContext=(oe,We)=>{if(r(8,g=oe),Ae)(N.getNoShadow()?N:Pe)._luigi_mfe_webcomponent.context=oe;else{const jt={...We||{},activeFeatureToggleList:N.activeFeatureToggleList||[],currentLocale:N.locale,currentTheme:N.theme,userSettings:N.userSettings||null,cssVariables:N.cssVariables||{},anchor:N.anchor||"",drawer:N.drawer||!1,modal:N.modal||!1,viewStackSize:N.viewStackSize||0,isNavigateBack:N.isNavigateBack||!1};lr.updateContext(oe,jt,Ee,U,H,we)}},N.closeAlert=(oe,We)=>{N.notifyAlertClosed(oe,We)},N.notifyAlertClosed=(oe,We)=>{N.isConnected&&(Ae?St.resolveAlert(oe,We):lr.notifyAlertClosed(oe,We,Ee))},N.notifyConfirmationModalClosed=oe=>{N.isConnected&&(Ae?St.notifyConfirmationModalClosed(!!oe):lr.notifyConfirmationModalClosed(!!oe,Ee))},hn.registerContainer(N),St.thisComponent=N;const ot=Kr.resolveContext(g);if(N.updateViewUrl=(oe,We)=>{oe?.length&&lr.updateViewUrl(oe,Kr.resolveContext(g),We,Ee)},Ae&&Ae!="false"){N.getNoShadow()?N.innerHTML="":(r(7,Pe.innerHTML="",Pe),N.attachShadow({mode:"open"}).append(Pe));const oe=Kr.checkWebcomponentValue(Ae);St.renderWebComponent(Re,N.getNoShadow()?N:Pe,ot,typeof oe=="object"?{webcomponent:oe}:{})}else N.getNoShadow()||(N.innerHTML="",N.attachShadow({mode:"open"}).append(Pe));qe?(N.initialized=!0,setTimeout((()=>{St.dispatchLuigiEvent($.INITIALIZED,{})}))):Ae&&(N.getNoShadow()?N:Pe).addEventListener("wc_ready",(()=>{(N.getNoShadow()?N:Pe)._luigi_mfe_webcomponent?.deferLuigiClientWCInit||(N.initialized=!0,St.dispatchLuigiEvent($.INITIALIZED,{}))})),r(5,Zt=!0),N.containerInitialized=!0}};var yn;return mc((async()=>{r(27,D=Pe.parentNode),r(27,D.iframeHandle=Ee,D),r(27,D.init=()=>{$e(D)},D),!m&&Re&&$e(D)})),yn=async()=>{},pc().$$.on_destroy.push(yn),i.$$set=N=>{"activeFeatureToggleList"in N&&r(9,a=N.activeFeatureToggleList),"allowRules"in N&&r(0,o=N.allowRules),"anchor"in N&&r(10,c=N.anchor),"authData"in N&&r(11,l=N.authData),"clientPermissions"in N&&r(12,f=N.clientPermissions),"context"in N&&r(8,g=N.context),"deferInit"in N&&r(13,m=N.deferInit),"dirtyStatus"in N&&r(14,w=N.dirtyStatus),"documentTitle"in N&&r(15,y=N.documentTitle),"hasBack"in N&&r(16,E=N.hasBack),"label"in N&&r(1,b=N.label),"locale"in N&&r(17,R=N.locale),"noShadow"in N&&r(18,x=N.noShadow),"nodeParams"in N&&r(19,U=N.nodeParams),"pathParams"in N&&r(20,H=N.pathParams),"sandboxRules"in N&&r(2,re=N.sandboxRules),"searchParams"in N&&r(21,we=N.searchParams),"skipCookieCheck"in N&&r(22,me=N.skipCookieCheck),"skipInitCheck"in N&&r(23,qe=N.skipInitCheck),"theme"in N&&r(24,Le=N.theme),"userSettings"in N&&r(25,Ze=N.userSettings),"viewurl"in N&&r(3,Re=N.viewurl),"webcomponent"in N&&r(4,Ae=N.webcomponent)},i.$$.update=()=>{134225960&i.$$.dirty[0]&&!Zt&&Re&&!m&&D&&$e(D)},[o,b,re,Re,Ae,Zt,Ee,Pe,g,a,c,l,f,m,w,y,E,R,x,U,H,we,me,qe,Le,Ze,()=>a&&o&&c&&l&&f&&w&&y&&E&&R&&x&&U&&H&&re&&we&&me&&qe&&Le&&Ze,D,function(N){jr[N?"unshift":"push"]((()=>{Ee.iframe=N,r(6,Ee)}))},function(N){jr[N?"unshift":"push"]((()=>{Pe=N,r(7,Pe)}))}]}class yc extends wc{constructor(n){super(),_c(this,n,rS,nS,dc,{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}),K()}get allowRules(){return this.$$.ctx[0]}set allowRules(n){this.$$set({allowRules:n}),K()}get anchor(){return this.$$.ctx[10]}set anchor(n){this.$$set({anchor:n}),K()}get authData(){return this.$$.ctx[11]}set authData(n){this.$$set({authData:n}),K()}get clientPermissions(){return this.$$.ctx[12]}set clientPermissions(n){this.$$set({clientPermissions:n}),K()}get context(){return this.$$.ctx[8]}set context(n){this.$$set({context:n}),K()}get deferInit(){return this.$$.ctx[13]}set deferInit(n){this.$$set({deferInit:n}),K()}get dirtyStatus(){return this.$$.ctx[14]}set dirtyStatus(n){this.$$set({dirtyStatus:n}),K()}get documentTitle(){return this.$$.ctx[15]}set documentTitle(n){this.$$set({documentTitle:n}),K()}get hasBack(){return this.$$.ctx[16]}set hasBack(n){this.$$set({hasBack:n}),K()}get label(){return this.$$.ctx[1]}set label(n){this.$$set({label:n}),K()}get locale(){return this.$$.ctx[17]}set locale(n){this.$$set({locale:n}),K()}get noShadow(){return this.$$.ctx[18]}set noShadow(n){this.$$set({noShadow:n}),K()}get nodeParams(){return this.$$.ctx[19]}set nodeParams(n){this.$$set({nodeParams:n}),K()}get pathParams(){return this.$$.ctx[20]}set pathParams(n){this.$$set({pathParams:n}),K()}get sandboxRules(){return this.$$.ctx[2]}set sandboxRules(n){this.$$set({sandboxRules:n}),K()}get searchParams(){return this.$$.ctx[21]}set searchParams(n){this.$$set({searchParams:n}),K()}get skipCookieCheck(){return this.$$.ctx[22]}set skipCookieCheck(n){this.$$set({skipCookieCheck:n}),K()}get skipInitCheck(){return this.$$.ctx[23]}set skipInitCheck(n){this.$$set({skipInitCheck:n}),K()}get theme(){return this.$$.ctx[24]}set theme(n){this.$$set({theme:n}),K()}get userSettings(){return this.$$.ctx[25]}set userSettings(n){this.$$set({userSettings:n}),K()}get viewurl(){return this.$$.ctx[3]}set viewurl(n){this.$$set({viewurl:n}),K()}get webcomponent(){return this.$$.ctx[4]}set webcomponent(n){this.$$set({webcomponent:n}),K()}get unwarn(){return this.$$.ctx[26]}}function iS(i){zv(i,"svelte-1buc46y","main.svelte-1buc46y{width:100%;height:100%;border:none}")}function sS(i){let n;return{c(){n=_r("main"),mt(n,"class","svelte-1buc46y")},m(r,a){Mn(r,n,a),i[21](n)},p:gn,i:gn,o:gn,d(r){r&&pn(n),i[21](null)}}}function aS(i,n,r){let a,o,{activeFeatureToggleList:c}=n,{anchor:l}=n,{clientPermissions:f}=n,{compoundConfig:g}=n,{context:m}=n,{deferInit:w}=n,{dirtyStatus:y}=n,{documentTitle:E}=n,{hasBack:b}=n,{locale:R}=n,{noShadow:x}=n,{nodeParams:U}=n,{pathParams:H}=n,{searchParams:re}=n,{skipInitCheck:we}=n,{theme:me}=n,{userSettings:qe}=n,{viewurl:Le}=n,{webcomponent:Ze}=n,Re=!1;const Ae=new Za,Ee=new Cc,Pe=D=>{if(!g||Re)return;D.updateContext=($e,yn)=>{const N=D.getNoShadow()?D:a;N._luigi_mfe_webcomponent.context=$e,r(1,m=$e);const ot=N._luigi_mfe_webcomponent;ot&&ot.querySelectorAll("[lui_web_component]")?.forEach((We=>{const jt=We.context||{};We.context=Object.assign(jt,$e)}))};const Zt=Kr.resolveContext(m);r(2,w=!1),D.notifyAlertClosed=($e,yn)=>{D.isConnected&&Ee.resolveAlert($e,yn)},D.notifyConfirmationModalClosed=$e=>{D.isConnected&&Ee.notifyConfirmationModalClosed(!!$e)};const St={compound:g,viewUrl:Le,webcomponent:Kr.checkWebcomponentValue(Ze)||!0};D.getNoShadow()?D.innerHTML="":(r(0,a.innerHTML="",a),D.attachShadow({mode:"open"}).append(a)),Ee.renderWebComponentCompound(St,D.getNoShadow()?D:a,Zt).then(($e=>{o=$e,we||!St.viewUrl?(D.initialized=!0,setTimeout((()=>{Ee.dispatchLuigiEvent($.INITIALIZED,{})}))):o.LuigiClient&&!o.deferLuigiClientWCInit&&(D.initialized=!0,Ee.dispatchLuigiEvent($.INITIALIZED,{}))})),Re=!0,D.containerInitialized=!0};return mc((async()=>{const D=a.getRootNode()===document?a.parentNode:a.getRootNode().host;D.init=()=>{Pe(D)},w||Pe(D),Ae.registerContainer(D),Ee.thisComponent=D})),i.$$set=D=>{"activeFeatureToggleList"in D&&r(3,c=D.activeFeatureToggleList),"anchor"in D&&r(4,l=D.anchor),"clientPermissions"in D&&r(5,f=D.clientPermissions),"compoundConfig"in D&&r(6,g=D.compoundConfig),"context"in D&&r(1,m=D.context),"deferInit"in D&&r(2,w=D.deferInit),"dirtyStatus"in D&&r(7,y=D.dirtyStatus),"documentTitle"in D&&r(8,E=D.documentTitle),"hasBack"in D&&r(9,b=D.hasBack),"locale"in D&&r(10,R=D.locale),"noShadow"in D&&r(11,x=D.noShadow),"nodeParams"in D&&r(12,U=D.nodeParams),"pathParams"in D&&r(13,H=D.pathParams),"searchParams"in D&&r(14,re=D.searchParams),"skipInitCheck"in D&&r(15,we=D.skipInitCheck),"theme"in D&&r(16,me=D.theme),"userSettings"in D&&r(17,qe=D.userSettings),"viewurl"in D&&r(18,Le=D.viewurl),"webcomponent"in D&&r(19,Ze=D.webcomponent)},[a,m,w,c,l,f,g,y,E,b,R,x,U,H,re,we,me,qe,Le,Ze,()=>c&&l&&f&&y&&E&&b&&R&&x&&U&&H&&re&&we&&me&&qe,function(D){jr[D?"unshift":"push"]((()=>{a=D,r(0,a)}))}]}Sc(yc,{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 n=r=>()=>console.warn(r+" can't be called on luigi-container before its micro frontend is attached to the DOM.");return class extends i{sendCustomMessage=n("sendCustomMessage");updateContext=n("updateContext");updateViewUrl=n("updateViewUrl");closeAlert=n("closeAlert");notifyAlertClosed=n("notifyAlertClosed");notifyConfirmationModalClosed=n("notifyConfirmationModalClosed");attributeChangedCallback(r,a,o){try{super.attributeChangedCallback(r,a,o)}catch(c){console.error("Error in super.attributeChangedCallback",c)}this.containerInitialized&&(r==="context"&&this.updateContext(JSON.parse(o)),r==="auth-data"&&lr.updateAuthData(this.iframeHandle,JSON.parse(o)))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}}));class Xl extends wc{constructor(n){super(),_c(this,n,aS,sS,dc,{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},iS)}get activeFeatureToggleList(){return this.$$.ctx[3]}set activeFeatureToggleList(n){this.$$set({activeFeatureToggleList:n}),K()}get anchor(){return this.$$.ctx[4]}set anchor(n){this.$$set({anchor:n}),K()}get clientPermissions(){return this.$$.ctx[5]}set clientPermissions(n){this.$$set({clientPermissions:n}),K()}get compoundConfig(){return this.$$.ctx[6]}set compoundConfig(n){this.$$set({compoundConfig:n}),K()}get context(){return this.$$.ctx[1]}set context(n){this.$$set({context:n}),K()}get deferInit(){return this.$$.ctx[2]}set deferInit(n){this.$$set({deferInit:n}),K()}get dirtyStatus(){return this.$$.ctx[7]}set dirtyStatus(n){this.$$set({dirtyStatus:n}),K()}get documentTitle(){return this.$$.ctx[8]}set documentTitle(n){this.$$set({documentTitle:n}),K()}get hasBack(){return this.$$.ctx[9]}set hasBack(n){this.$$set({hasBack:n}),K()}get locale(){return this.$$.ctx[10]}set locale(n){this.$$set({locale:n}),K()}get noShadow(){return this.$$.ctx[11]}set noShadow(n){this.$$set({noShadow:n}),K()}get nodeParams(){return this.$$.ctx[12]}set nodeParams(n){this.$$set({nodeParams:n}),K()}get pathParams(){return this.$$.ctx[13]}set pathParams(n){this.$$set({pathParams:n}),K()}get searchParams(){return this.$$.ctx[14]}set searchParams(n){this.$$set({searchParams:n}),K()}get skipInitCheck(){return this.$$.ctx[15]}set skipInitCheck(n){this.$$set({skipInitCheck:n}),K()}get theme(){return this.$$.ctx[16]}set theme(n){this.$$set({theme:n}),K()}get userSettings(){return this.$$.ctx[17]}set userSettings(n){this.$$set({userSettings:n}),K()}get viewurl(){return this.$$.ctx[18]}set viewurl(n){this.$$set({viewurl:n}),K()}get webcomponent(){return this.$$.ctx[19]}set webcomponent(n){this.$$set({webcomponent:n}),K()}get unwarn(){return this.$$.ctx[20]}}Sc(Xl,{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 n=r=>()=>console.warn(r+" can't be called on luigi-container before its micro frontend is attached to the DOM.");return class extends i{updateContext=n("updateContext");notifyAlertClosed=n("notifyAlertClosed");notifyConfirmationModalClosed=n("notifyConfirmationModalClosed");attributeChangedCallback(r,a,o){try{super.attributeChangedCallback(r,a,o)}catch(c){console.warn("Error in attributeChangedCallback",c)}this.containerInitialized&&r==="context"&&this.updateContext(JSON.parse(o))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}})),customElements.get("luigi-container")||customElements.define("luigi-container",yc.element),customElements.get("luigi-compound-container")||customElements.define("luigi-compound-container",Xl.element);const os={sanitizeHtml(i=""){return i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/javascript:/gi,"").replace(/data:/gi,"").replace(/vbscript:/gi,"")},restoreSanitizedBrs(i=""){return i.replace(/<br\/>/g,"<br>").replace(/<br \/>/g,"<br>").replace(/<br>/g,"<br>").replace(/<br >/g,"<br>")},restoreSanitizedElements(i=""){let n=i;const r=["i","b","br","mark","strong","em","small","del","ins","sub","sup"];for(let a=0;a<r.length;a++){const o=new RegExp(`<${r[a]}/>`,"g"),c=new RegExp(`<${r[a]} />`,"g"),l=new RegExp(`<${r[a]}>`,"g"),f=new RegExp(`<${r[a]} >`,"g"),g=new RegExp(`</${r[a]}[/]>`,"g"),m=new RegExp(`</${r[a]} [/]>`,"g"),w=new RegExp(`<[/]${r[a]}>`,"g"),y=new RegExp(`<[/]${r[a]} >`,"g");n=n.replace(o,`<${r[a]}>`).replace(c,`<${r[a]}>`).replace(l,`<${r[a]}>`).replace(f,`<${r[a]}>`).replace(g,`</${r[a]}>`).replace(m,`</${r[a]}>`).replace(w,`</${r[a]}>`).replace(y,`</${r[a]}>`)}return n},sanatizeHtmlExceptTextFormatting(i=""){return this.restoreSanitizedElements(this.sanitizeHtml(i))},sanitizeParam(i=""){return String(i).replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},escapeKeyForRegexp(i=""){return i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},processTextAndLinks(i="",n,r){const o={sanitizedText:this.restoreSanitizedBrs(this.sanitizeHtml(i)),links:[]};return n?Object.entries(n).reduce((c,[l,f])=>{const g=`_luigi_alert_${r}_link_${this.sanitizeParam(l)}`,m=this.restoreSanitizedBrs(this.sanitizeHtml(f.text)),w=`<a id="${g}">${m}</a>`,y=this.escapeKeyForRegexp(l),E=new RegExp(`({${y}})`,"g");return{sanitizedText:c.sanitizedText.replace(E,w),links:c.links.concat({elemId:g,url:f.url?encodeURI(this.sanitizeHtml(f.url)):void 0,dismissKey:f.dismissKey?encodeURI(this.sanitizeHtml(f.dismissKey)):void 0})}},o):o}},O={defaultContentViewParamPrefix:"~",defaultQueryParamSeparator:"?",defaultModalViewParamName:"modal",addParamsOnHashRouting(i,n,r){let a=n;const[o,c]=a.split("?"),l=new URLSearchParams(c);return this.modifySearchParams(i,l,r),a=o,l.toString()!==""&&(a+=`?${l.toString()}`),a},modifySearchParams(i,n,r){for(const[a,o]of Object.entries(i)){const c=r?`${r}${a}`:a;n.set(c,o),o===void 0&&n.delete(c)}},filterNodeParams(i,n){const r=Object.create(null),a=this.getContentViewParamPrefix(n);return i&&Object.entries(i).forEach(o=>{if(o[0].startsWith(a)){const c=o[0].substr(a.length);r[c]=o[1]}}),this.sanitizeParamsMap(r)},mapPathToNode(i,n){if(!i||!n)return;const r=M.trimLeadingSlash(i).split("/"),a=O.buildRoute(n,`/${n.pathSegment}`),o=M.trimLeadingSlash(a).split("/");if(r.length<o.length)return;let c="";for(let l=0;l<o.length;l++){if(r[l]!==o[l]&&o[l].indexOf(":")!==0)return;c+="/"+r[l]}return c},async getNodeLabel(i,n){if(i.label&&!i._virtualTree)return n.i18n().getTranslation(i.label)||i.label;if(i.pathSegment&&i.pathSegment.indexOf(":")===0){const r=n.getConfig().routing?.useHashRouting,a=O.mapPathToNode(O.getCurrentPath(r)?.path,i)||"",o=await n.navigation().navService.extractDataFromPath(a);return O.getDynamicNodeValue(i,o.pathData.pathParams)||""}return i.pathSegment?i.pathSegment:""},getContentViewParamPrefix(i){let n=i?.getConfigValue("routing.nodeParamPrefix");return n===!1?n="":n||(n=this.defaultContentViewParamPrefix),n},sanitizeParamsMap(i){return Object.entries(i).reduce((n,r)=>(n[os.sanitizeParam(r[0])]=os.sanitizeParam(r[1]),n),{})},prepareSearchParamsForClient(i,n){const r={};return i&&i.clientPermissions&&i.clientPermissions.urlParameters&&Object.keys(i.clientPermissions.urlParameters).forEach(a=>{a in n.routing().getSearchParams()&&i.clientPermissions?.urlParameters&&i.clientPermissions.urlParameters[a]?.read===!0&&(r[a]=n.routing().getSearchParams()[a])}),r},getCurrentPath(i){if(i){const n=Ce.normalizePath(location.hash),[r,a]=n.split("?");return{path:r,query:a}}else return{path:Ce.normalizePath(location.pathname),query:location.search}},getModalPathFromPath(i){return this.getQueryParam(this.getModalViewParamName(i),i)},getQueryParam(i,n){return this.getQueryParams(n)[i]},getQueryParams(i){return i.getConfigValue("routing.useHashRouting")?this.getLocationHashQueryParams():this.getLocationSearchQueryParams()},getLocationSearchQueryParams(){return O.getLocation().search?O.parseParams(O.getLocation().search.slice(1)):{}},getLocation(){return location},getLocationHashQueryParams(){const i=O.getLocation().hash.indexOf(this.defaultQueryParamSeparator);return i!==-1?O.parseParams(O.getLocation().hash.slice(i+1)):{}},getModalViewParamName(i){let n=i.getConfigValue("routing.modalPathParam");return n||(n=this.defaultModalViewParamName),n},parseParams(i){const n=new URLSearchParams(i),r=new Map;for(const[a,o]of n.entries())r.set(a,o);return Object.fromEntries(r)},getModalParamsFromPath(i){const n=this.getQueryParam(`${this.getModalViewParamName(i)}Params`,i);return n&&JSON.parse(n)},getHashQueryParamSeparator(){return this.defaultQueryParamSeparator},getURLWithoutModalData(i,n){const r=new URLSearchParams(i);return r.delete(n),r.delete(`${n}Params`),r.toString()},handleHistoryState(i,n){return i&&i.modalHistoryLength?i.modalHistoryLength+=1:i={modalHistoryLength:1,historygap:history.length,pathBeforeHistory:n},i},encodeParams(i){const n=[];for(const r in i)n.push(encodeURIComponent(r)+"="+encodeURIComponent(i[r]));return n.join("&")},getLastNodeObject(i){return(i.nodesInPath?[...i.nodesInPath].pop():{})||{}},checkWCUrl(i,n){if(i.indexOf("://")>0||i.trim().indexOf("//")===0){if(new URL(i).host===window.location.host)return!0;const a=n.getConfigValue("navigation.validWebcomponentUrls");if(a?.length>0)for(const o of a)try{if(new RegExp(o).test(i))return!0}catch(c){console.error(c)}return!1}return!0},setFeatureToggles(i,n,r){const a=this.sanitizeParamsMap(this.parseParams(n.split("?")[1]));let o;if(a[i]&&(o=a[i]),!o)return;const c=o.split(",");c.length>0&&c[0]!==""&&c.forEach(l=>r?.setFeatureToggle(l,!0))},substituteDynamicParamsInObject(i,n,r=":",a=!1){return Object.entries(i).map(([o,c])=>{const l=a?Object.keys(n).find(f=>c&&c.indexOf(r+f)>=0):Object.keys(n).find(f=>c===r+f);return[o,l?a?c.replace(r+l,n[l]):n[l]:c]}).reduce((o,[c,l])=>Object.assign(o,{[c]:l}),{})},isDynamicNode(i){return typeof i.pathSegment=="string"&&i.pathSegment.length>0&&i.pathSegment[0]===":"},getDynamicNodeValue(i,n){return this.isDynamicNode(i)&&i.pathSegment?n[i.pathSegment.substring(1)]:void 0},isExistingRoute(i,n){const r=i?.split("/")||[],a=n?.nodesInPath||[],o=(l,f)=>{let g=null;if(l?.children?.length){const m=l.children.filter(w=>w.pathSegment===f);m?.length&&(g=m[0])}return g};let c=[];if(r.length>1&&a.length===1){let l;r.forEach((f,g)=>{const m=g===0?a[0]:l;l=o(m,f),l?.pathSegment&&c.push(l.pathSegment)})}else c=a.filter(l=>l.pathSegment).map(l=>l.pathSegment||"");return!i||r.length===c.length},async pathExists(i,n){const r=M.getTrimmedUrl(i),a=await n.navigation().navService.getPathData(i),o=O.isExistingRoute(r,a);return a?o:!1},showRouteNotFoundAlert(i,n=!1,r){const a={text:r.i18n().getTranslation(n?"luigi.notExactTargetNode":"luigi.requestedRouteNotFound",{route:i}),type:"error",ttl:1};r.ux().showAlert(a)},getPageNotFoundRedirectResult(i,n=!1,r){const a=r.getConfigValue("routing.pageNotFoundHandler");if(typeof a=="function"){const o=a(i,n);if(o&&(o.redirectTo||o.ignoreLuigiErrorHandling))return{path:o.redirectTo,keepURL:o.keepURL,ignoreLuigiErrorHandling:o.ignoreLuigiErrorHandling}}return{}},async handlePageNotFoundAndRetrieveRedirectPath(i,n,r){if(n)return i;const a=r.getConfigValue("routing.pageNotFoundHandler"),o=this.getPageNotFoundRedirectResult(i,a,r)?.path;if(o!==void 0)return o;this.showRouteNotFoundAlert(i,!1,r),console.warn(`Could not find the requested route: ${i}`)},async getDefaultChildNode(i,n){if(!i)return"";const r=i.nodesInPath&&i.nodesInPath[i.nodesInPath.length-1],a=i.context,o=n?await n(r,a):await Dn.getConfigValueFromObjectAsync(r,"children",a),c=o.find(l=>l.pathSegment===r.defaultChildNode);if(r.defaultChildNode&&c)return r.defaultChildNode;if(o&&o.length){if(i?.nodesInPath?.length===1){const g=o.find(m=>m.pathSegment);return g&&g.pathSegment||console.error("At least one navigation node in the root hierarchy must have a pathSegment.")}const f=o.find(g=>g.pathSegment&&(g.viewUrl||g.compound||g.externalLink&&g.externalLink.url));if(f)return f.pathSegment}return""},getNodePath(i,n){return!i||n?i?this.buildRoute(i,i.pathSegment?"/"+i.pathSegment:"",n):"":`${i.parent?this.getNodePath(i.parent):""}/${i.pathSegment}`},buildRoute(i,n,r){return i.parent?this.buildRoute(i.parent,`/${i.parent.pathSegment}${n}`,r):n+(r?"?"+r:"")},substituteViewUrl(i,n,r,a){if(!i.viewUrl)return"";let o=i.viewUrl;const c="context.",l="nodeParams.",f="routing.queryParams";if(i.virtualTree&&(o=o.replace("{virtualTreePath}","")),o=M.replaceVars(o,n,":",!1),i.context&&(o=M.replaceVars(o,i.context,c)),o=M.replaceVars(o,r,l),o=this.getI18nViewUrl(o,a),o&&o.includes(f)){const g=o.split("?")[1];if(g){const m=g.split("=")[0],w=a.routing().getSearchParams();w[m]?o=o.replace(`{${f}.${m}}`,w[m]):o=o.replace(`?${m}={${f}.${m}}`,"")}}return o},getI18nViewUrl(i,n){const r="{i18n.currentLocale}",a=n.i18n().getCurrentLocale();return i&&i.includes(r)?i.replace(r,a):i},getSubPath(i,n){return M.replaceVars(O.getNodePath(i),n,":",!1)},concatenatePath(i,n){let r=M.getPathWithoutHashOrSlash(i);return r?(n&&(r.endsWith("/")&&(r=r.substring(0,r.length-1)),n.startsWith("/")||(r+="/"),r+=n),r):n}},Ce={normalizePath:i=>{if(!i||i.length<=0)return i;let n=i;return n.startsWith("#")&&(n=n.substring(1)),n.startsWith("/")&&(n=n.substring(1)),n},segmentMatches:(i,n,r)=>!!(i===n||n.startsWith(":")&&r&&r[n.substr(1)]===i),checkMatch:(i,n,r)=>{let a=!0;return M.trimTrailingSlash(M.trimLeadingSlash(i)).split("/").forEach((o,c)=>{a&&(c+1>=n.length||!n[c+1]?.pathSegment||!Ce.segmentMatches(o,n[c+1]?.pathSegment??"",r??{}))&&(a=!1)}),a},checkVisibleForFeatureToggles:(i,n)=>{if(i?.visibleForFeatureToggles){const r=n?.getActiveFeatureToggleList()||[];for(const a of i.visibleForFeatureToggles)if(a.startsWith("!")){if(r.includes(a.slice(1)))return!1}else if(!r.includes(a))return!1}return!0},generateTooltipText:(i,n,r)=>{let a=i?.tooltipText;switch(a===void 0&&(a=r.getConfigValue("navigation.defaults.tooltipText")),a){case void 0:return n;case!1:return"";default:return r.i18n().getTranslation(a)}},isNodeAccessPermitted:(i,n,r,a)=>{if(a.auth().isAuthorizationEnabled()){const l=fn.isLoggedIn(),f=i.anonymousAccess;if(l&&f==="exclusive"||!l&&f!=="exclusive"&&f!==!0)return!1}const o=a.featureToggles();if(!Ce.checkVisibleForFeatureToggles(i,o))return!1;const c=a.getConfigValue("navigation.nodeAccessibilityResolver");return typeof c!="function"?!0:c(i,n,r)},applyContext:(i,n,r)=>{if(n)for(let a in n)i[a]=n[a];return r&&i.parentNavigationContexts&&i.parentNavigationContexts.unshift(r),i},updateHeaderTitle:(i,n)=>{const r=i?.items;if(r&&n){let a="";return[...r].sort((o,c)=>(c.link||"").localeCompare(o.link||"")).some(o=>{let c=!1;if(c=Ce.checkMatch(o.link||"",n.nodesInPath??[]),!c&&o.selectionConditions&&o.selectionConditions.route&&(c=Ce.checkMatch(o.selectionConditions.route,n.nodesInPath??[]),c&&(o.selectionConditions.contextCriteria||[]).forEach(l=>{c=c&&n?.selectedNode?.context?.[l.key]===l.value})),c)return a=o.title||"",!0}),a}},buildPath(i,n){return i.map(a=>{const o=a.pathSegment;if(o?.startsWith(":")){const c=o.slice(1),l=n?.pathParams?.[c];if(l!=null)return encodeURIComponent(String(l))}return o}).join("/")},mergeContext(...i){return Object.assign({},...i)},prepareForTests(...i){let n="";return i.forEach(r=>{r&&(n+=(n?"_":"")+encodeURIComponent(r.toLowerCase().split(" ").join("")))}),n},findVirtualTreeRootNode(i){if(i.virtualTree)return i;if(i.parent)return Ce.findVirtualTreeRootNode(i.parent)},validatePathAndGetRedirect:async(i,n)=>{const r=await O.pathExists(i,n);return await O.handlePageNotFoundAndRetrieveRedirectPath(i,r,n)||void 0},async fetchNodeTitleData(i,n){return new Promise((r,a)=>{if(!i.titleResolver){a(new Error("No title resolver defined at node"));return}const o={...i.titleResolver};delete o._cache;const c=this.substituteVars(o,n),l=JSON.stringify(c);if(i.titleResolver._cache&&i.titleResolver._cache.key===l){r(i.titleResolver._cache.value);return}const f=c.request;this._fetch(f.url,{method:f.method,headers:f.headers,body:JSON.stringify(f.body)}).then(g=>{g.json().then(m=>{try{const w=this.processTitleData(m,c);i.titleResolver._cache={key:l,value:w},r(w)}catch(w){a(w)}})}).catch(g=>{a(g)})})},getPropertyChainValue(i,n,r){return!n||!i?r:Ba.get(i,n,r)},substituteVars(i,n){const a=JSON.stringify(i).replace(/\$\{[a-zA-Z0-9$_.]+\}/g,o=>{const c=o.substr(2,o.length-3);return this.getPropertyChainValue(n,c)||o});return JSON.parse(a)},_fetch(i,n){return fetch(i,n)},processTitleData(i,n){let r=this.getPropertyChainValue(i,n.titlePropertyChain);return r&&(r=r.trim()),r&&n.titleDecorator&&(r=n.titleDecorator.replace("%s",r)),{label:r||n.fallbackTitle,icon:this.getPropertyChainValue(i,n.iconPropertyChain,n.fallbackIcon)}}};class _n{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 a=0;a<r.length;a++)this.deleteNodesRecursively(r[a])}this.dataManagement.delete(n)}}const ka={logout:{label:"Sign Out",icon:"log"}};class oS{constructor(){this.services=new Map}register(n,r,a=!0){this.services.set(n,{factory:r,singleton:a})}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 q=new oS;class Lt{constructor(n){this.luigi=n,this.luigi=n,this.unsavedChanges={isDirty:!1,persistUrl:null}}updateDirtyStatus(n,r){if(!this.unsavedChanges.dirtySet||!(this.unsavedChanges.dirtySet instanceof Set)){const a=new Set;a.add(r),this.unsavedChanges={dirtySet:a}}this.unsavedChanges.persistUrl=window.location.href,n?this.unsavedChanges.dirtySet?.add(r):this.unsavedChanges.dirtySet?.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}getUnsavedChangesModalPromise(n){if(!this.shouldShowUnsavedChangesModal(n))return Promise.resolve();const r=this.luigi.getConfigValue("settings.unsavedChangesHandler");if(r)return r().then(()=>this.clearDirtyState(n));const a={header:this.luigi.i18n().getTranslation("luigi.unsavedChangesAlert.header"),body:this.luigi.i18n().getTranslation("luigi.unsavedChangesAlert.body"),buttonDismiss:this.luigi.i18n().getTranslation("luigi.button.dismiss"),buttonConfirm:this.luigi.i18n().getTranslation("luigi.button.confirm")};return new Promise((o,c)=>{this.luigi.getEngine()._connector?.renderConfirmationModal(a,{confirm:()=>{this.clearDirtyState(n),o()},dismiss:()=>{c()}})})}shouldShowUnsavedChangesModal(n){return n?this.unsavedChanges.dirtySet?.has(n)??!1:this.readDirtyStatus()}}class vn{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(a){console.warn("onInternalClose threw an error",a)}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(){G.modalContainer.pop(),this._modalStack.pop()}async closeModalsWithDirtyCheck(){const n=q.get(Lt);for(const r of G.modalContainer)if(n.shouldShowUnsavedChangesModal(r))try{await n.getUnsavedChangesModalPromise(r)}catch{return!1}return await this.closeModals(),!0}}class Sn{constructor(n){this.luigi=n,this.previousBreadcrumbs={}}getModalService(){return this.modalService||(this.modalService=q.get(vn)),this.modalService}getNodeDataManagementService(){return this.nodeDataManagementService||(this.nodeDataManagementService=q.get(_n)),this.nodeDataManagementService}async getPathData(n){const r=this.luigi.getConfig();let a=n.split("/");a?.length>0&&a[0]===""&&(a=a.slice(1));let c=r.navigation?.globalContext||{},l;if(this.getNodeDataManagementService().hasRootNode())l=this.getNodeDataManagementService().getRootNode().node;else{const y=await this.luigi.getConfigValueAsync("navigation.nodes");typeof y=="object"&&!Array.isArray(y)?(l=y,l.pathSegment&&(l.pathSegment="",console.warn("Root node must have an empty path segment. Provided path segment will be ignored."))):l={children:y},l.children=await this.getChildren(l,c),l.children=this.prepareRootNodes(l.children||[],c),this.getNodeDataManagementService().setRootNode(l)}const f={...c||{},...l.context||{}},g={},m={context:f,selectedNodeChildren:l.children,nodesInPath:[l],rootNodes:l.children,pathParams:g,matchedPath:""};if(l.viewUrl&&a.length===0)m.selectedNode=l;else for(const y of a)if(m.selectedNodeChildren){const E=this.findMatchingNode(y,m.selectedNodeChildren||[]);if(!E){console.warn("No matching node found for segment:",y);break}const b=E.context||{},R=Ce.mergeContext(c,b);let x=R;if(E.pathSegment?.startsWith(":")&&(g[E.pathSegment.replace(":","")]=os.sanitizeParam(y),x=O.substituteDynamicParamsInObject(R,g)),c=x,E.context=x,m.selectedNode=E,m.selectedNode&&m.nodesInPath?.push(m.selectedNode),E.virtualTree||E._virtualTree){const U=this.buildVirtualTree(E,y,g);U&&U.length>0&&(E.children=U)}m.selectedNodeChildren=await this.getChildren(E,c)}const w=m.nodesInPath?.filter(y=>y.pathSegment).map(y=>y.pathSegment)||[];return m.matchedPath=a.filter((y,E)=>w[E]&&w[E].startsWith(":")||w[E]===y).join("/")||"",m}findMatchingNode(n,r){let a;const o=r.filter(l=>!!l.pathSegment).length,c=r.filter(l=>l.pathSegment&&l.pathSegment.startsWith(":")).length;if(o>1&&(c===1&&(console.warn(`Invalid node setup detected.
|
|
47
|
+
}`,r=gc(" "),a=_r("iframe"),Gl(a.src,o=i[3])||mt(a,"src",o),mt(a,"title",i[1]),mt(a,"allow",c=ql(i[0])),mt(a,"sandbox",l=i[2]?i[2].join(" "):void 0)},m(f,d){Mn(f,t,d),Mn(f,r,d),Mn(f,a,d),i[28](a)},p(f,d){8&d[0]&&!Gl(a.src,o=f[3])&&mt(a,"src",o),2&d[0]&&mt(a,"title",f[1]),1&d[0]&&c!==(c=ql(f[0]))&&mt(a,"allow",c),4&d[0]&&l!==(l=f[2]?f[2].join(" "):void 0)&&mt(a,"sandbox",l)},d(f){f&&(pn(t),pn(r),pn(a)),i[28](null)}}}function nw(i){let t,r,a=i[5]&&Yl(i);return{c(){t=_r("main"),a&&a.c(),mt(t,"class",r=i[4]?void 0:"lui-isolated")},m(o,c){Mn(o,t,c),a&&a.m(t,null),i[29](t)},p(o,c){o[5]?a?a.p(o,c):(a=Yl(o),a.c(),a.m(t,null)):a&&(a.d(1),a=null),16&c[0]&&r!==(r=o[4]?void 0:"lui-isolated")&&mt(t,"class",r)},i:gn,o:gn,d(o){o&&pn(t),a&&a.d(),i[29](null)}}}function rw(i,t,r){let{activeFeatureToggleList:a}=t,{allowRules:o}=t,{anchor:c}=t,{authData:l}=t,{clientPermissions:f}=t,{context:d}=t,{deferInit:m}=t,{dirtyStatus:S}=t,{documentTitle:y}=t,{hasBack:E}=t,{label:T}=t,{locale:R}=t,{noShadow:x}=t,{nodeParams:$}=t,{pathParams:W}=t,{sandboxRules:Z}=t,{searchParams:Se}=t,{skipCookieCheck:Re}=t,{skipInitCheck:Ae}=t,{theme:me}=t,{userSettings:Ze}=t,{viewurl:Pe}=t,{webcomponent:Ie}=t;const Ee={};let xe,M,Zt=!1;const wt=new Cc,De=N=>{if(!Zt){N.sendCustomMessage=(oe,Ve)=>{lr.sendCustomMessage(oe,N.getNoShadow()?N:xe,!!Ie,Ee,Ve)},N.updateContext=(oe,Ve)=>{if(r(8,d=oe),Ie)(N.getNoShadow()?N:xe)._luigi_mfe_webcomponent.context=oe;else{const jt={...Ve||{},activeFeatureToggleList:N.activeFeatureToggleList||[],currentLocale:N.locale,currentTheme:N.theme,userSettings:N.userSettings||null,cssVariables:N.cssVariables||{},anchor:N.anchor||"",drawer:N.drawer||!1,modal:N.modal||!1,viewStackSize:N.viewStackSize||0,isNavigateBack:N.isNavigateBack||!1};lr.updateContext(oe,jt,Ee,$,W,Se)}},N.closeAlert=(oe,Ve)=>{N.notifyAlertClosed(oe,Ve)},N.notifyAlertClosed=(oe,Ve)=>{N.isConnected&&(Ie?wt.resolveAlert(oe,Ve):lr.notifyAlertClosed(oe,Ve,Ee))},N.notifyConfirmationModalClosed=oe=>{N.isConnected&&(Ie?wt.notifyConfirmationModalClosed(!!oe):lr.notifyConfirmationModalClosed(!!oe,Ee))},hn.registerContainer(N),wt.thisComponent=N;const ot=Kr.resolveContext(d);if(N.updateViewUrl=(oe,Ve)=>{oe?.length&&lr.updateViewUrl(oe,Kr.resolveContext(d),Ve,Ee)},Ie&&Ie!="false"){N.getNoShadow()?N.innerHTML="":(r(7,xe.innerHTML="",xe),N.attachShadow({mode:"open"}).append(xe));const oe=Kr.checkWebcomponentValue(Ie);wt.renderWebComponent(Pe,N.getNoShadow()?N:xe,ot,typeof oe=="object"?{webcomponent:oe}:{})}else N.getNoShadow()||(N.innerHTML="",N.attachShadow({mode:"open"}).append(xe));Ae?(N.initialized=!0,setTimeout((()=>{wt.dispatchLuigiEvent(O.INITIALIZED,{})}))):Ie&&(N.getNoShadow()?N:xe).addEventListener("wc_ready",(()=>{(N.getNoShadow()?N:xe)._luigi_mfe_webcomponent?.deferLuigiClientWCInit||(N.initialized=!0,wt.dispatchLuigiEvent(O.INITIALIZED,{}))})),r(5,Zt=!0),N.containerInitialized=!0}};var yn;return mc((async()=>{r(27,M=xe.parentNode),r(27,M.iframeHandle=Ee,M),r(27,M.init=()=>{De(M)},M),!m&&Pe&&De(M)})),yn=async()=>{},pc().$$.on_destroy.push(yn),i.$$set=N=>{"activeFeatureToggleList"in N&&r(9,a=N.activeFeatureToggleList),"allowRules"in N&&r(0,o=N.allowRules),"anchor"in N&&r(10,c=N.anchor),"authData"in N&&r(11,l=N.authData),"clientPermissions"in N&&r(12,f=N.clientPermissions),"context"in N&&r(8,d=N.context),"deferInit"in N&&r(13,m=N.deferInit),"dirtyStatus"in N&&r(14,S=N.dirtyStatus),"documentTitle"in N&&r(15,y=N.documentTitle),"hasBack"in N&&r(16,E=N.hasBack),"label"in N&&r(1,T=N.label),"locale"in N&&r(17,R=N.locale),"noShadow"in N&&r(18,x=N.noShadow),"nodeParams"in N&&r(19,$=N.nodeParams),"pathParams"in N&&r(20,W=N.pathParams),"sandboxRules"in N&&r(2,Z=N.sandboxRules),"searchParams"in N&&r(21,Se=N.searchParams),"skipCookieCheck"in N&&r(22,Re=N.skipCookieCheck),"skipInitCheck"in N&&r(23,Ae=N.skipInitCheck),"theme"in N&&r(24,me=N.theme),"userSettings"in N&&r(25,Ze=N.userSettings),"viewurl"in N&&r(3,Pe=N.viewurl),"webcomponent"in N&&r(4,Ie=N.webcomponent)},i.$$.update=()=>{134225960&i.$$.dirty[0]&&!Zt&&Pe&&!m&&M&&De(M)},[o,T,Z,Pe,Ie,Zt,Ee,xe,d,a,c,l,f,m,S,y,E,R,x,$,W,Se,Re,Ae,me,Ze,()=>a&&o&&c&&l&&f&&S&&y&&E&&R&&x&&$&&W&&Z&&Se&&Re&&Ae&&me&&Ze,M,function(N){jr[N?"unshift":"push"]((()=>{Ee.iframe=N,r(6,Ee)}))},function(N){jr[N?"unshift":"push"]((()=>{xe=N,r(7,xe)}))}]}class yc extends Sc{constructor(t){super(),_c(this,t,rw,nw,dc,{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(t){this.$$set({activeFeatureToggleList:t}),K()}get allowRules(){return this.$$.ctx[0]}set allowRules(t){this.$$set({allowRules:t}),K()}get anchor(){return this.$$.ctx[10]}set anchor(t){this.$$set({anchor:t}),K()}get authData(){return this.$$.ctx[11]}set authData(t){this.$$set({authData:t}),K()}get clientPermissions(){return this.$$.ctx[12]}set clientPermissions(t){this.$$set({clientPermissions:t}),K()}get context(){return this.$$.ctx[8]}set context(t){this.$$set({context:t}),K()}get deferInit(){return this.$$.ctx[13]}set deferInit(t){this.$$set({deferInit:t}),K()}get dirtyStatus(){return this.$$.ctx[14]}set dirtyStatus(t){this.$$set({dirtyStatus:t}),K()}get documentTitle(){return this.$$.ctx[15]}set documentTitle(t){this.$$set({documentTitle:t}),K()}get hasBack(){return this.$$.ctx[16]}set hasBack(t){this.$$set({hasBack:t}),K()}get label(){return this.$$.ctx[1]}set label(t){this.$$set({label:t}),K()}get locale(){return this.$$.ctx[17]}set locale(t){this.$$set({locale:t}),K()}get noShadow(){return this.$$.ctx[18]}set noShadow(t){this.$$set({noShadow:t}),K()}get nodeParams(){return this.$$.ctx[19]}set nodeParams(t){this.$$set({nodeParams:t}),K()}get pathParams(){return this.$$.ctx[20]}set pathParams(t){this.$$set({pathParams:t}),K()}get sandboxRules(){return this.$$.ctx[2]}set sandboxRules(t){this.$$set({sandboxRules:t}),K()}get searchParams(){return this.$$.ctx[21]}set searchParams(t){this.$$set({searchParams:t}),K()}get skipCookieCheck(){return this.$$.ctx[22]}set skipCookieCheck(t){this.$$set({skipCookieCheck:t}),K()}get skipInitCheck(){return this.$$.ctx[23]}set skipInitCheck(t){this.$$set({skipInitCheck:t}),K()}get theme(){return this.$$.ctx[24]}set theme(t){this.$$set({theme:t}),K()}get userSettings(){return this.$$.ctx[25]}set userSettings(t){this.$$set({userSettings:t}),K()}get viewurl(){return this.$$.ctx[3]}set viewurl(t){this.$$set({viewurl:t}),K()}get webcomponent(){return this.$$.ctx[4]}set webcomponent(t){this.$$set({webcomponent:t}),K()}get unwarn(){return this.$$.ctx[26]}}function iw(i){zv(i,"svelte-1buc46y","main.svelte-1buc46y{width:100%;height:100%;border:none}")}function sw(i){let t;return{c(){t=_r("main"),mt(t,"class","svelte-1buc46y")},m(r,a){Mn(r,t,a),i[21](t)},p:gn,i:gn,o:gn,d(r){r&&pn(t),i[21](null)}}}function aw(i,t,r){let a,o,{activeFeatureToggleList:c}=t,{anchor:l}=t,{clientPermissions:f}=t,{compoundConfig:d}=t,{context:m}=t,{deferInit:S}=t,{dirtyStatus:y}=t,{documentTitle:E}=t,{hasBack:T}=t,{locale:R}=t,{noShadow:x}=t,{nodeParams:$}=t,{pathParams:W}=t,{searchParams:Z}=t,{skipInitCheck:Se}=t,{theme:Re}=t,{userSettings:Ae}=t,{viewurl:me}=t,{webcomponent:Ze}=t,Pe=!1;const Ie=new Za,Ee=new Cc,xe=M=>{if(!d||Pe)return;M.updateContext=(De,yn)=>{const N=M.getNoShadow()?M:a;N._luigi_mfe_webcomponent.context=De,r(1,m=De);const ot=N._luigi_mfe_webcomponent;ot&&ot.querySelectorAll("[lui_web_component]")?.forEach((Ve=>{const jt=Ve.context||{};Ve.context=Object.assign(jt,De)}))};const Zt=Kr.resolveContext(m);r(2,S=!1),M.notifyAlertClosed=(De,yn)=>{M.isConnected&&Ee.resolveAlert(De,yn)},M.notifyConfirmationModalClosed=De=>{M.isConnected&&Ee.notifyConfirmationModalClosed(!!De)};const wt={compound:d,viewUrl:me,webcomponent:Kr.checkWebcomponentValue(Ze)||!0};M.getNoShadow()?M.innerHTML="":(r(0,a.innerHTML="",a),M.attachShadow({mode:"open"}).append(a)),Ee.renderWebComponentCompound(wt,M.getNoShadow()?M:a,Zt).then((De=>{o=De,Se||!wt.viewUrl?(M.initialized=!0,setTimeout((()=>{Ee.dispatchLuigiEvent(O.INITIALIZED,{})}))):o.LuigiClient&&!o.deferLuigiClientWCInit&&(M.initialized=!0,Ee.dispatchLuigiEvent(O.INITIALIZED,{}))})),Pe=!0,M.containerInitialized=!0};return mc((async()=>{const M=a.getRootNode()===document?a.parentNode:a.getRootNode().host;M.init=()=>{xe(M)},S||xe(M),Ie.registerContainer(M),Ee.thisComponent=M})),i.$$set=M=>{"activeFeatureToggleList"in M&&r(3,c=M.activeFeatureToggleList),"anchor"in M&&r(4,l=M.anchor),"clientPermissions"in M&&r(5,f=M.clientPermissions),"compoundConfig"in M&&r(6,d=M.compoundConfig),"context"in M&&r(1,m=M.context),"deferInit"in M&&r(2,S=M.deferInit),"dirtyStatus"in M&&r(7,y=M.dirtyStatus),"documentTitle"in M&&r(8,E=M.documentTitle),"hasBack"in M&&r(9,T=M.hasBack),"locale"in M&&r(10,R=M.locale),"noShadow"in M&&r(11,x=M.noShadow),"nodeParams"in M&&r(12,$=M.nodeParams),"pathParams"in M&&r(13,W=M.pathParams),"searchParams"in M&&r(14,Z=M.searchParams),"skipInitCheck"in M&&r(15,Se=M.skipInitCheck),"theme"in M&&r(16,Re=M.theme),"userSettings"in M&&r(17,Ae=M.userSettings),"viewurl"in M&&r(18,me=M.viewurl),"webcomponent"in M&&r(19,Ze=M.webcomponent)},[a,m,S,c,l,f,d,y,E,T,R,x,$,W,Z,Se,Re,Ae,me,Ze,()=>c&&l&&f&&y&&E&&T&&R&&x&&$&&W&&Z&&Se&&Re&&Ae,function(M){jr[M?"unshift":"push"]((()=>{a=M,r(0,a)}))}]}wc(yc,{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 t=r=>()=>console.warn(r+" can't be called on luigi-container before its micro frontend is attached to the DOM.");return class extends i{sendCustomMessage=t("sendCustomMessage");updateContext=t("updateContext");updateViewUrl=t("updateViewUrl");closeAlert=t("closeAlert");notifyAlertClosed=t("notifyAlertClosed");notifyConfirmationModalClosed=t("notifyConfirmationModalClosed");attributeChangedCallback(r,a,o){try{super.attributeChangedCallback(r,a,o)}catch(c){console.error("Error in super.attributeChangedCallback",c)}this.containerInitialized&&(r==="context"&&this.updateContext(JSON.parse(o)),r==="auth-data"&&lr.updateAuthData(this.iframeHandle,JSON.parse(o)))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}}));class Xl extends Sc{constructor(t){super(),_c(this,t,aw,sw,dc,{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},iw)}get activeFeatureToggleList(){return this.$$.ctx[3]}set activeFeatureToggleList(t){this.$$set({activeFeatureToggleList:t}),K()}get anchor(){return this.$$.ctx[4]}set anchor(t){this.$$set({anchor:t}),K()}get clientPermissions(){return this.$$.ctx[5]}set clientPermissions(t){this.$$set({clientPermissions:t}),K()}get compoundConfig(){return this.$$.ctx[6]}set compoundConfig(t){this.$$set({compoundConfig:t}),K()}get context(){return this.$$.ctx[1]}set context(t){this.$$set({context:t}),K()}get deferInit(){return this.$$.ctx[2]}set deferInit(t){this.$$set({deferInit:t}),K()}get dirtyStatus(){return this.$$.ctx[7]}set dirtyStatus(t){this.$$set({dirtyStatus:t}),K()}get documentTitle(){return this.$$.ctx[8]}set documentTitle(t){this.$$set({documentTitle:t}),K()}get hasBack(){return this.$$.ctx[9]}set hasBack(t){this.$$set({hasBack:t}),K()}get locale(){return this.$$.ctx[10]}set locale(t){this.$$set({locale:t}),K()}get noShadow(){return this.$$.ctx[11]}set noShadow(t){this.$$set({noShadow:t}),K()}get nodeParams(){return this.$$.ctx[12]}set nodeParams(t){this.$$set({nodeParams:t}),K()}get pathParams(){return this.$$.ctx[13]}set pathParams(t){this.$$set({pathParams:t}),K()}get searchParams(){return this.$$.ctx[14]}set searchParams(t){this.$$set({searchParams:t}),K()}get skipInitCheck(){return this.$$.ctx[15]}set skipInitCheck(t){this.$$set({skipInitCheck:t}),K()}get theme(){return this.$$.ctx[16]}set theme(t){this.$$set({theme:t}),K()}get userSettings(){return this.$$.ctx[17]}set userSettings(t){this.$$set({userSettings:t}),K()}get viewurl(){return this.$$.ctx[18]}set viewurl(t){this.$$set({viewurl:t}),K()}get webcomponent(){return this.$$.ctx[19]}set webcomponent(t){this.$$set({webcomponent:t}),K()}get unwarn(){return this.$$.ctx[20]}}wc(Xl,{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 t=r=>()=>console.warn(r+" can't be called on luigi-container before its micro frontend is attached to the DOM.");return class extends i{updateContext=t("updateContext");notifyAlertClosed=t("notifyAlertClosed");notifyConfirmationModalClosed=t("notifyConfirmationModalClosed");attributeChangedCallback(r,a,o){try{super.attributeChangedCallback(r,a,o)}catch(c){console.warn("Error in attributeChangedCallback",c)}this.containerInitialized&&r==="context"&&this.updateContext(JSON.parse(o))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}})),customElements.get("luigi-container")||customElements.define("luigi-container",yc.element),customElements.get("luigi-compound-container")||customElements.define("luigi-compound-container",Xl.element);const os={sanitizeHtml(i=""){return i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/javascript:/gi,"").replace(/data:/gi,"").replace(/vbscript:/gi,"")},restoreSanitizedBrs(i=""){return i.replace(/<br\/>/g,"<br>").replace(/<br \/>/g,"<br>").replace(/<br>/g,"<br>").replace(/<br >/g,"<br>")},restoreSanitizedElements(i=""){let t=i;const r=["i","b","br","mark","strong","em","small","del","ins","sub","sup"];for(let a=0;a<r.length;a++){const o=new RegExp(`<${r[a]}/>`,"g"),c=new RegExp(`<${r[a]} />`,"g"),l=new RegExp(`<${r[a]}>`,"g"),f=new RegExp(`<${r[a]} >`,"g"),d=new RegExp(`</${r[a]}[/]>`,"g"),m=new RegExp(`</${r[a]} [/]>`,"g"),S=new RegExp(`<[/]${r[a]}>`,"g"),y=new RegExp(`<[/]${r[a]} >`,"g");t=t.replace(o,`<${r[a]}>`).replace(c,`<${r[a]}>`).replace(l,`<${r[a]}>`).replace(f,`<${r[a]}>`).replace(d,`</${r[a]}>`).replace(m,`</${r[a]}>`).replace(S,`</${r[a]}>`).replace(y,`</${r[a]}>`)}return t},sanatizeHtmlExceptTextFormatting(i=""){return this.restoreSanitizedElements(this.sanitizeHtml(i))},sanitizeParam(i=""){return String(i).replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},escapeKeyForRegexp(i=""){return i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},processTextAndLinks(i="",t,r){const o={sanitizedText:this.restoreSanitizedBrs(this.sanitizeHtml(i)),links:[]};return t?Object.entries(t).reduce((c,[l,f])=>{const d=`_luigi_alert_${r}_link_${this.sanitizeParam(l)}`,m=this.restoreSanitizedBrs(this.sanitizeHtml(f.text)),S=`<a id="${d}">${m}</a>`,y=this.escapeKeyForRegexp(l),E=new RegExp(`({${y}})`,"g");return{sanitizedText:c.sanitizedText.replace(E,S),links:c.links.concat({elemId:d,url:f.url?encodeURI(this.sanitizeHtml(f.url)):void 0,dismissKey:f.dismissKey?encodeURI(this.sanitizeHtml(f.dismissKey)):void 0})}},o):o}},U={defaultContentViewParamPrefix:"~",defaultQueryParamSeparator:"?",defaultModalViewParamName:"modal",addParamsOnHashRouting(i,t,r){let a=t;const[o,c]=a.split("?"),l=new URLSearchParams(c);return this.modifySearchParams(i,l,r),a=o,l.toString()!==""&&(a+=`?${l.toString()}`),a},modifySearchParams(i,t,r){for(const[a,o]of Object.entries(i)){const c=r?`${r}${a}`:a;t.set(c,o),o===void 0&&t.delete(c)}},filterNodeParams(i,t){const r=Object.create(null),a=this.getContentViewParamPrefix(t);return i&&Object.entries(i).forEach(o=>{if(o[0].startsWith(a)){const c=o[0].substr(a.length);r[c]=o[1]}}),this.sanitizeParamsMap(r)},mapPathToNode(i,t){if(!i||!t)return;const r=D.trimLeadingSlash(i).split("/"),a=U.buildRoute(t,`/${t.pathSegment}`),o=D.trimLeadingSlash(a).split("/");if(r.length<o.length)return;let c="";for(let l=0;l<o.length;l++){if(r[l]!==o[l]&&o[l].indexOf(":")!==0)return;c+="/"+r[l]}return c},async getNodeLabel(i,t){if(i.label&&!i._virtualTree)return t.i18n().getTranslation(i.label)||i.label;if(i.pathSegment&&i.pathSegment.indexOf(":")===0){const r=t.getConfig().routing?.useHashRouting,a=U.mapPathToNode(U.getCurrentPath(r)?.path,i)||"",o=await t.navigation().navService.extractDataFromPath(a);return U.getDynamicNodeValue(i,o.pathData.pathParams)||""}return i.pathSegment?i.pathSegment:""},getContentViewParamPrefix(i){let t=i?.getConfigValue("routing.nodeParamPrefix");return t===!1?t="":t||(t=this.defaultContentViewParamPrefix),t},sanitizeParamsMap(i){return Object.entries(i).reduce((t,r)=>(t[os.sanitizeParam(r[0])]=os.sanitizeParam(r[1]),t),{})},prepareSearchParamsForClient(i,t){const r={};return i&&i.clientPermissions&&i.clientPermissions.urlParameters&&Object.keys(i.clientPermissions.urlParameters).forEach(a=>{a in t.routing().getSearchParams()&&i.clientPermissions?.urlParameters&&i.clientPermissions.urlParameters[a]?.read===!0&&(r[a]=t.routing().getSearchParams()[a])}),r},getCurrentPath(i){if(i){const t=Ce.normalizePath(location.hash),[r,a]=t.split("?");return{path:r,query:a}}else return{path:Ce.normalizePath(location.pathname),query:location.search}},getModalPathFromPath(i){return this.getQueryParam(this.getModalViewParamName(i),i)},getQueryParam(i,t){return this.getQueryParams(t)[i]},getQueryParams(i){return i.getConfigValue("routing.useHashRouting")?this.getLocationHashQueryParams():this.getLocationSearchQueryParams()},getLocationSearchQueryParams(){return U.getLocation().search?U.parseParams(U.getLocation().search.slice(1)):{}},getLocation(){return location},getLocationHashQueryParams(){const i=U.getLocation().hash.indexOf(this.defaultQueryParamSeparator);return i!==-1?U.parseParams(U.getLocation().hash.slice(i+1)):{}},getModalViewParamName(i){let t=i.getConfigValue("routing.modalPathParam");return t||(t=this.defaultModalViewParamName),t},parseParams(i){const t=new URLSearchParams(i),r=new Map;for(const[a,o]of t.entries())r.set(a,o);return Object.fromEntries(r)},getModalParamsFromPath(i){const t=this.getQueryParam(`${this.getModalViewParamName(i)}Params`,i);return t&&JSON.parse(t)},getHashQueryParamSeparator(){return this.defaultQueryParamSeparator},getURLWithoutModalData(i,t){const r=new URLSearchParams(i);return r.delete(t),r.delete(`${t}Params`),r.toString()},handleHistoryState(i,t){return i&&i.modalHistoryLength?i.modalHistoryLength+=1:i={modalHistoryLength:1,historygap:history.length,pathBeforeHistory:t},i},encodeParams(i){const t=[];for(const r in i)t.push(encodeURIComponent(r)+"="+encodeURIComponent(i[r]));return t.join("&")},getLastNodeObject(i){return(i.nodesInPath?[...i.nodesInPath].pop():{})||{}},checkWCUrl(i,t){if(i.indexOf("://")>0||i.trim().indexOf("//")===0){if(new URL(i).host===window.location.host)return!0;const a=t.getConfigValue("navigation.validWebcomponentUrls");if(a?.length>0)for(const o of a)try{if(new RegExp(o).test(i))return!0}catch(c){console.error(c)}return!1}return!0},setFeatureToggles(i,t,r){const a=this.sanitizeParamsMap(this.parseParams(t.split("?")[1]));let o;if(a[i]&&(o=a[i]),!o)return;const c=o.split(",");c.length>0&&c[0]!==""&&c.forEach(l=>r?.setFeatureToggle(l,!0))},substituteDynamicParamsInObject(i,t,r=":",a=!1){return Object.entries(i).map(([o,c])=>{const l=a?Object.keys(t).find(f=>c&&c.indexOf(r+f)>=0):Object.keys(t).find(f=>c===r+f);return[o,l?a?c.replace(r+l,t[l]):t[l]:c]}).reduce((o,[c,l])=>Object.assign(o,{[c]:l}),{})},isDynamicNode(i){return typeof i.pathSegment=="string"&&i.pathSegment.length>0&&i.pathSegment[0]===":"},getDynamicNodeValue(i,t){return this.isDynamicNode(i)&&i.pathSegment?t[i.pathSegment.substring(1)]:void 0},isExistingRoute(i,t){const r=i?.split("/")||[],a=t?.nodesInPath||[],o=(l,f)=>{let d=null;if(l?.children?.length){const m=l.children.filter(S=>S.pathSegment===f);m?.length&&(d=m[0])}return d};let c=[];if(r.length>1&&a.length===1){let l;r.forEach((f,d)=>{const m=d===0?a[0]:l;l=o(m,f),l?.pathSegment&&c.push(l.pathSegment)})}else c=a.filter(l=>l.pathSegment).map(l=>l.pathSegment||"");return!i||r.length===c.length},async pathExists(i,t){const r=D.getTrimmedUrl(i),a=await t.navigation().navService.getPathData(i),o=U.isExistingRoute(r,a);return a?o:!1},showRouteNotFoundAlert(i,t=!1,r){const a={text:r.i18n().getTranslation(t?"luigi.notExactTargetNode":"luigi.requestedRouteNotFound",{route:i}),type:"error",ttl:1};r.ux().showAlert(a)},getPageNotFoundRedirectResult(i,t=!1,r){const a=r.getConfigValue("routing.pageNotFoundHandler");if(typeof a=="function"){const o=a(i,t);if(o&&(o.redirectTo||o.ignoreLuigiErrorHandling))return{path:o.redirectTo,keepURL:o.keepURL,ignoreLuigiErrorHandling:o.ignoreLuigiErrorHandling}}return{}},async handlePageNotFoundAndRetrieveRedirectPath(i,t,r){if(t)return i;const a=r.getConfigValue("routing.pageNotFoundHandler"),o=this.getPageNotFoundRedirectResult(i,a,r)?.path;if(o!==void 0)return o;this.showRouteNotFoundAlert(i,!1,r),console.warn(`Could not find the requested route: ${i}`)},async getDefaultChildNode(i,t){if(!i)return"";const r=i.nodesInPath&&i.nodesInPath[i.nodesInPath.length-1],a=i.context,o=t?await t(r,a):await Dn.getConfigValueFromObjectAsync(r,"children",a),c=o.find(l=>l.pathSegment===r.defaultChildNode);if(r.defaultChildNode&&c)return r.defaultChildNode;if(o&&o.length){if(i?.nodesInPath?.length===1){const d=o.find(m=>m.pathSegment);return d&&d.pathSegment||console.error("At least one navigation node in the root hierarchy must have a pathSegment.")}const f=o.find(d=>d.pathSegment&&(d.viewUrl||d.compound||d.externalLink&&d.externalLink.url));if(f)return f.pathSegment}return""},getNodePath(i,t){return!i||t?i?this.buildRoute(i,i.pathSegment?"/"+i.pathSegment:"",t):"":`${i.parent?this.getNodePath(i.parent):""}/${i.pathSegment}`},buildRoute(i,t,r){return i.parent?this.buildRoute(i.parent,`/${i.parent.pathSegment}${t}`,r):t+(r?"?"+r:"")},substituteViewUrl(i,t,r,a){if(!i.viewUrl)return"";let o=i.viewUrl;const c="context.",l="nodeParams.",f="routing.queryParams";if(i.virtualTree&&(o=o.replace("{virtualTreePath}","")),o=D.replaceVars(o,t,":",!1),i.context&&(o=D.replaceVars(o,i.context,c)),o=D.replaceVars(o,r,l),o=this.getI18nViewUrl(o,a),o&&o.includes(f)){const d=o.split("?")[1];if(d){const m=d.split("=")[0],S=a.routing().getSearchParams();S[m]?o=o.replace(`{${f}.${m}}`,S[m]):o=o.replace(`?${m}={${f}.${m}}`,"")}}return o},getI18nViewUrl(i,t){const r="{i18n.currentLocale}",a=t.i18n().getCurrentLocale();return i&&i.includes(r)?i.replace(r,a):i},getSubPath(i,t){return D.replaceVars(U.getNodePath(i),t,":",!1)},concatenatePath(i,t){let r=D.getPathWithoutHashOrSlash(i);return r?(t&&(r.endsWith("/")&&(r=r.substring(0,r.length-1)),t.startsWith("/")||(r+="/"),r+=t),r):t}},Ce={normalizePath:i=>{if(!i||i.length<=0)return i;let t=i;return t.startsWith("#")&&(t=t.substring(1)),t.startsWith("/")&&(t=t.substring(1)),t},segmentMatches:(i,t,r)=>!!(i===t||t.startsWith(":")&&r&&r[t.substr(1)]===i),checkMatch:(i,t,r)=>{let a=!0;return D.trimTrailingSlash(D.trimLeadingSlash(i)).split("/").forEach((o,c)=>{a&&(c+1>=t.length||!t[c+1]?.pathSegment||!Ce.segmentMatches(o,t[c+1]?.pathSegment??"",r??{}))&&(a=!1)}),a},checkVisibleForFeatureToggles:(i,t)=>{if(i?.visibleForFeatureToggles){const r=t?.getActiveFeatureToggleList()||[];for(const a of i.visibleForFeatureToggles)if(a.startsWith("!")){if(r.includes(a.slice(1)))return!1}else if(!r.includes(a))return!1}return!0},generateTooltipText:(i,t,r)=>{let a=i?.tooltipText;switch(a===void 0&&(a=r.getConfigValue("navigation.defaults.tooltipText")),a){case void 0:return t;case!1:return"";default:return r.i18n().getTranslation(a)}},isNodeAccessPermitted:(i,t,r,a)=>{if(a.auth().isAuthorizationEnabled()){const l=fn.isLoggedIn(),f=i.anonymousAccess;if(l&&f==="exclusive"||!l&&f!=="exclusive"&&f!==!0)return!1}const o=a.featureToggles();if(!Ce.checkVisibleForFeatureToggles(i,o))return!1;const c=a.getConfigValue("navigation.nodeAccessibilityResolver");return typeof c!="function"?!0:c(i,t,r)},applyContext:(i,t,r)=>{if(t)for(let a in t)i[a]=t[a];return r&&i.parentNavigationContexts&&i.parentNavigationContexts.unshift(r),i},updateHeaderTitle:(i,t)=>{const r=i?.items;if(r&&t){let a="";return[...r].sort((o,c)=>(c.link||"").localeCompare(o.link||"")).some(o=>{let c=!1;if(c=Ce.checkMatch(o.link||"",t.nodesInPath??[]),!c&&o.selectionConditions&&o.selectionConditions.route&&(c=Ce.checkMatch(o.selectionConditions.route,t.nodesInPath??[]),c&&(o.selectionConditions.contextCriteria||[]).forEach(l=>{c=c&&t?.selectedNode?.context?.[l.key]===l.value})),c)return a=o.title||"",!0}),a}},buildPath(i,t){return i.map(a=>{const o=a.pathSegment;if(o?.startsWith(":")){const c=o.slice(1),l=t?.pathParams?.[c];if(l!=null)return encodeURIComponent(String(l))}return o}).join("/")},mergeContext(...i){return Object.assign({},...i)},prepareForTests(...i){let t="";return i.forEach(r=>{r&&(t+=(t?"_":"")+encodeURIComponent(r.toLowerCase().split(" ").join("")))}),t},findVirtualTreeRootNode(i){if(i.virtualTree)return i;if(i.parent)return Ce.findVirtualTreeRootNode(i.parent)},validatePathAndGetRedirect:async(i,t)=>{const r=await U.pathExists(i,t);return await U.handlePageNotFoundAndRetrieveRedirectPath(i,r,t)||void 0},async fetchNodeTitleData(i,t){return new Promise((r,a)=>{if(!i.titleResolver){a(new Error("No title resolver defined at node"));return}const o={...i.titleResolver};delete o._cache;const c=this.substituteVars(o,t),l=JSON.stringify(c);if(i.titleResolver._cache&&i.titleResolver._cache.key===l){r(i.titleResolver._cache.value);return}const f=c.request;this._fetch(f.url,{method:f.method,headers:f.headers,body:JSON.stringify(f.body)}).then(d=>{d.json().then(m=>{try{const S=this.processTitleData(m,c);i.titleResolver._cache={key:l,value:S},r(S)}catch(S){a(S)}})}).catch(d=>{a(d)})})},getPropertyChainValue(i,t,r){return!t||!i?r:Ba.get(i,t,r)},substituteVars(i,t){const a=JSON.stringify(i).replace(/\$\{[a-zA-Z0-9$_.]+\}/g,o=>{const c=o.substr(2,o.length-3);return this.getPropertyChainValue(t,c)||o});return JSON.parse(a)},_fetch(i,t){return fetch(i,t)},processTitleData(i,t){let r=this.getPropertyChainValue(i,t.titlePropertyChain);return r&&(r=r.trim()),r&&t.titleDecorator&&(r=t.titleDecorator.replace("%s",r)),{label:r||t.fallbackTitle,icon:this.getPropertyChainValue(i,t.iconPropertyChain,t.fallbackIcon)}}};class _n{constructor(){this.dataManagement=new Map}setChildren(t,r){this.dataManagement.set(t,r),this.navPath=""}getChildren(t){return t?this.dataManagement.get(t):{}}hasChildren(t){const r=this.getChildren(t);return!!(r&&Object.prototype.hasOwnProperty.call(r,"children"))}setRootNode(t){this.dataManagement.set("_luigiRootNode",{node:t})}getRootNode(){return this.dataManagement.get("_luigiRootNode")}hasRootNode(){return!!this.getRootNode()}deleteCache(){this.dataManagement.clear()}deleteNodesRecursively(t){if(this.hasChildren(t)){const r=this.getChildren(t).children;for(let a=0;a<r.length;a++)this.deleteNodesRecursively(r[a])}this.dataManagement.delete(t)}}const ka={logout:{label:"Sign Out",icon:"log"}};class ow{constructor(){this.services=new Map}register(t,r,a=!0){this.services.set(t,{factory:r,singleton:a})}get(t){const r=this.services.get(t);if(!r)throw new Error(`Service '${t}' is not registered.`);return r.singleton?(r.instance||(r.instance=r.factory()),r.instance):r.factory()}}const q=new ow;class Lt{constructor(t){this.luigi=t,this.luigi=t,this.unsavedChanges={isDirty:!1,persistUrl:null}}updateDirtyStatus(t,r){if(!this.unsavedChanges.dirtySet||!(this.unsavedChanges.dirtySet instanceof Set)){const a=new Set;a.add(r),this.unsavedChanges={dirtySet:a}}this.unsavedChanges.persistUrl=window.location.href,t?this.unsavedChanges.dirtySet?.add(r):this.unsavedChanges.dirtySet?.delete(r)}clearDirtyState(t){this.unsavedChanges&&this.unsavedChanges.dirtySet&&(t?this.unsavedChanges.dirtySet.delete(t):this.unsavedChanges.dirtySet.clear())}readDirtyStatus(){return this.unsavedChanges.dirtySet?this.unsavedChanges.dirtySet.size>0:!!this.unsavedChanges.isDirty}getUnsavedChangesModalPromise(t){if(!this.shouldShowUnsavedChangesModal(t))return Promise.resolve();const r=this.luigi.getConfigValue("settings.unsavedChangesHandler");if(r)return r().then(()=>this.clearDirtyState(t));const a={header:this.luigi.i18n().getTranslation("luigi.unsavedChangesAlert.header"),body:this.luigi.i18n().getTranslation("luigi.unsavedChangesAlert.body"),buttonDismiss:this.luigi.i18n().getTranslation("luigi.button.dismiss"),buttonConfirm:this.luigi.i18n().getTranslation("luigi.button.confirm")};return new Promise((o,c)=>{this.luigi.getEngine()._connector?.renderConfirmationModal(a,{confirm:()=>{this.clearDirtyState(t),o()},dismiss:()=>{c()}})})}shouldShowUnsavedChangesModal(t){return t?this.unsavedChanges.dirtySet?.has(t)??!1:this.readDirtyStatus()}}class vn{constructor(t){this.luigi=t,this._modalStack=[],this.modalSettings={}}async closeModals(){if(this._modalStack.length===0)return;const t=[...this._modalStack];for(const{onInternalClose:r}of t)try{typeof r=="function"&&r()}catch(a){console.warn("onInternalClose threw an error",a)}this.clearModalStack()}registerModal(t){t&&this._modalStack.push(t)}getModalSettings(){return this._modalStack.length>0?this._modalStack[0].modalsettings||{}:{}}getModalStackLength(){return this._modalStack.length}updateFirstModalSettings(t){if(this._modalStack.length>0){const r=this._modalStack[0];r.modalsettings={...r.modalsettings,...t}}}clearModalStack(){this._modalStack=[]}removeLastModalFromStack(){G.modalContainer.pop(),this._modalStack.pop()}async closeModalsWithDirtyCheck(){const t=q.get(Lt);for(const r of G.modalContainer)if(t.shouldShowUnsavedChangesModal(r))try{await t.getUnsavedChangesModalPromise(r)}catch{return!1}return await this.closeModals(),!0}}class wn{constructor(t){this.luigi=t,this.previousBreadcrumbs={}}getModalService(){return this.modalService||(this.modalService=q.get(vn)),this.modalService}getNodeDataManagementService(){return this.nodeDataManagementService||(this.nodeDataManagementService=q.get(_n)),this.nodeDataManagementService}async getPathData(t){const r=this.luigi.getConfig();let a=t.split("/");a?.length>0&&a[0]===""&&(a=a.slice(1));let c=r.navigation?.globalContext||{},l;if(this.getNodeDataManagementService().hasRootNode())l=this.getNodeDataManagementService().getRootNode().node;else{const y=await this.luigi.getConfigValueAsync("navigation.nodes");typeof y=="object"&&!Array.isArray(y)?(l=y,l.pathSegment&&(l.pathSegment="",console.warn("Root node must have an empty path segment. Provided path segment will be ignored."))):l={children:y},l.children=await this.getChildren(l,c),l.children=this.prepareRootNodes(l.children||[],c),this.getNodeDataManagementService().setRootNode(l)}const f={...c||{},...l.context||{}},d={},m={context:f,selectedNodeChildren:l.children,nodesInPath:[l],rootNodes:l.children,pathParams:d,matchedPath:""};if(l.viewUrl&&a.length===0)m.selectedNode=l;else for(const y of a)if(m.selectedNodeChildren){const E=this.findMatchingNode(y,m.selectedNodeChildren||[]);if(!E){console.warn("No matching node found for segment:",y);break}const T=E.context||{},R=Ce.mergeContext(c,T);let x=R;if(E.pathSegment?.startsWith(":")&&(d[E.pathSegment.replace(":","")]=os.sanitizeParam(y),x=U.substituteDynamicParamsInObject(R,d)),c=x,E.context=x,m.selectedNode=E,m.selectedNode&&m.nodesInPath?.push(m.selectedNode),E.virtualTree||E._virtualTree){const $=this.buildVirtualTree(E,y,d);$&&$.length>0&&(E.children=$)}m.selectedNodeChildren=await this.getChildren(E,c)}const S=m.nodesInPath?.filter(y=>y.pathSegment).map(y=>y.pathSegment)||[];return m.matchedPath=a.filter((y,E)=>S[E]&&S[E].startsWith(":")||S[E]===y).join("/")||"",m}findMatchingNode(t,r){let a;const o=r.filter(l=>!!l.pathSegment).length,c=r.filter(l=>l.pathSegment&&l.pathSegment.startsWith(":")).length;if(o>1&&(c===1&&(console.warn(`Invalid node setup detected.
|
|
48
48
|
Static and dynamic nodes cannot be used together on the same level. Static node gets cleaned up.
|
|
49
49
|
Remove the static node from the configuration to resolve this warning.
|
|
50
|
-
Affected pathSegment:`,
|
|
50
|
+
Affected pathSegment:`,t,"Children:",r),r=r.filter(l=>l.pathSegment&&l.pathSegment.startsWith(":"))),c>1)){console.error(`Invalid node setup detected.
|
|
51
51
|
Multiple dynamic nodes are not allowed on the same level. Stopped navigation.
|
|
52
|
-
Invalid Children:`,r);return}return r.some(l=>{if(l.pathSegment===n||l.pathSegment&&l.pathSegment.startsWith(":"))return a=l,!0}),a}buildNavItems(n,r,a){const o={},c=[];return n?.forEach(l=>{if(Ce.isNodeAccessPermitted(l,this.getParentNode(a.selectedNode,a),a?.selectedNode?.context||{},this.luigi))if(l.category){const f=l.category.id||l.category.label||l.category,g=this.luigi.i18n().getTranslation(l.category.label||l.category.id||l.category);let m=o[f];m||(m={category:{altText:l.category.altText||"",icon:l.category.icon,id:f,label:g,nodes:[],tooltip:this.resolveTooltipText(l.category,g)}},o[f]=m,c.push(m)),m.category?.nodes?.push({node:l,selected:l===r,label:l.label?this.luigi.i18n().getTranslation(l.label):void 0,tooltip:l.label?this.resolveTooltipText(l,l.label):void 0,altText:l.altText,icon:l.icon})}else c.push({altText:l.altText,icon:l.icon,label:l.label?this.luigi.i18n().getTranslation(l.label):void 0,tooltip:l.label?this.resolveTooltipText(l,l.label):void 0,node:l,selected:l===r})}),c}async getCurrentNode(n){const r=await this.getPathData(n);let a=r.selectedNode;if(!a&&r.nodesInPath?.length===1&&(a=r.nodesInPath[0]),!(!a||!Ce.isNodeAccessPermitted(a,this.getParentNode(r.selectedNode,r),r?.selectedNode?.context||{},this.luigi)))return a}async getPathParams(n){return(await this.getPathData(n)).pathParams}getTruncatedChildren(n){let r=!1,a=!1,o=[];return n.slice().reverse().forEach(c=>{(!r||c.tabNav)&&(c.tabNav===!1&&(a=!0),c.keepSelectedForChildren===!1?r=!0:(c.keepSelectedForChildren||c.tabNav&&!a)&&(r=!0,o=[])),o.push(c)}),o.reverse()}applyNavGroups(n){const r={},a=[],c=[];return n.forEach(l=>{if(l.node)c.push(l);else if(l.category){const f=l.category.id;f&&f.indexOf("::")>0?a.push(l):(l.category.isGroup,r[f]=l,c.push(l))}}),a.forEach(l=>{const f=l.category?.id.split("::")[0]||"",g=r[f];g&&g.category&&(g.category.isGroup||(g.category.isGroup=!0),g.category.nodes||(g.category.nodes=[]),g.category.nodes.push(l))}),c.filter(l=>{if(l.category?.isGroup&&l.category?.nodes&&l.category?.nodes.length>0){for(let f=0;f<l.category?.nodes.length;f++){const g=l.category?.nodes[f];if(g.node&&!g.node.hideFromNav&&g.node.label||g.category?.nodes&&g.category.nodes.filter(m=>!m.node?.hideFromNav&&m.node?.label).length>0)return!0}return!1}return!0})}async getLeftNavData(n,r){const a=r??await this.getPathData(n);if(n===""&&a?.nodesInPath?.[0].viewUrl)return{items:[],basePath:"",selectedNode:{},navClick:void 0};let o=[];const c=[];let l="";a.nodesInPath?.forEach(b=>{b.children&&(b.tabNav||(l+="/"+(b.pathSegment||"")),c.push(b))});const f=this.getTruncatedChildren(a.nodesInPath??[]);let g=[...f].pop(),m=a.selectedNode;(g?.keepSelectedForChildren||g?.tabNav)&&(m=g,f.pop(),g=[...f].pop());let w,y=m;m?a.rootNodes.includes(m)?(w=m,y=void 0):m.tabNav||m.keepSelectedForChildren?w=g:w=[...c].pop():(w=[...c].pop(),y=void 0);let E=await this.getChildren(w,w?.context||{})||[];return o=this.buildNavItems(E,y,a),o=this.applyNavGroups(o),{selectedNode:m||{},items:o,basePath:l.replace(/\/\/+/g,"/"),sideNavFooterText:this.luigi.getConfig().settings?.sideNavFooterText,navClick:b=>b.node?this.navItemClick(b.node,a):Promise.resolve()}}async navItemClick(n,r){await q.get(Lt).getUnsavedChangesModalPromise();let o=O.getNodePath(n),c=r?.pathParams;if(o=M.replaceVars(o,c||{},":",!1),!o&&o!==""){console.error("Navigation error: could not build path for the node. Check if pathSegment is defined for all nodes in the path and if there are no duplicate pathSegments on the same level.");return}return this.luigi.navigation().navigate(o)}async getTopNavData(n,r){const a=this.luigi.getConfig(),o=r??await this.getPathData(n),c=a.navigation?.profile?.items?.length?JSON.parse(JSON.stringify(a.navigation.profile.items)):[],l=a.navigation?.appSwitcher&&this.getAppSwitcherData(a.navigation?.appSwitcher,a.settings?.header),f=Ce.updateHeaderTitle(l,o);c?.length&&c.map(b=>({...b,label:this.luigi.i18n().getTranslation(b.label||"")}));const g=this.luigi.i18n().getTranslation(a.navigation?.profile?.logout?.label)||ka.logout.label,m=b=>{if(b.openNodeInModal&&!b.externalLink?.url)this.luigi.navigation().openAsModal(b.link||"",b.openNodeInModal===!0?{}:b.openNodeInModal);else if(b.link)this.luigi.navigation().navigate(b.link);else if(b.externalLink?.url)if(b.externalLink.sameWindow)window.location.href=b.externalLink.url;else{const R=window.open(b.externalLink.url,"_blank","noopener noreferrer");R&&(R.opener=null,R.focus())}},w={authEnabled:this.luigi.auth().isAuthorizationEnabled(),signedIn:this.luigi.auth().isAuthorizationEnabled()&&fn.isLoggedIn(),items:c,itemClick:m,logout:{altText:this.luigi.i18n().getTranslation(a.navigation?.profile?.logout?.altText)||ka.logout.label,label:g,icon:a.navigation?.profile?.logout?.icon||ka.logout.icon,testId:a.navigation?.profile?.logout?.testId||Ce.prepareForTests(g),doLogout:()=>{dn.logout()}},onUserInfoUpdate:b=>{this.luigi.getConfigValueAsync("navigation.profile.staticUserInfoFn").then(R=>{R?b(R):dn.getUserInfoStore().subscribe(x=>{b(x)})})}},y=o.selectedNode,E=y&&o.rootNodes.includes(y)?y:void 0;return{appTitle:f||a.settings?.header?.title,logo:a.settings?.header?.logo,topNodes:this.buildNavItems(o.rootNodes,E,o),productSwitcher:a.navigation?.productSwitcher,profile:this.luigi.auth().isAuthorizationEnabled()||a.navigation?.profile?w:void 0,appSwitcher:a.navigation?.appSwitcher&&this.getAppSwitcherData(a.navigation?.appSwitcher,a.settings?.header),navClick:b=>b.node?this.navItemClick(b.node,o):Promise.resolve()}}getParentNode(n,r){if(n&&n===r.nodesInPath?.[r.nodesInPath.length-1])return r.nodesInPath[r.nodesInPath.length-2]}getAppSwitcherData(n,r){const a=n,o=a?.showMainAppEntry;if(a&&a.items&&o){const c={title:this.luigi.i18n().getTranslation(r.title||""),subTitle:r.subTitle,link:"/"};if(a.items?.map(l=>({...l,title:this.luigi.i18n().getTranslation(l.title||"")})),a.items.some(l=>l.link===c.link))return a;a.items.unshift(c)}return a}async getTabNavData(n,r){const a=r??await this.getPathData(n);if(n===""&&a?.nodesInPath?.[0].viewUrl)return{};const o=a?.selectedNode;let c;if(!o)return{};if(!o.tabNav&&(c=this.getParentNode(o,a),c&&!c.tabNav))return{};let l="";a.nodesInPath?.forEach(m=>{m.children&&(l+="/"+(m.pathSegment||""))});const f=c?this.getTruncatedChildren(c.children??[]):this.getTruncatedChildren(o.children??[]),g=this.buildNavItems(f,o,a);return{selectedNode:o,items:g,basePath:l.replace(/\/\/+/g,"/"),navClick:m=>m.node?this.navItemClick(m.node,a):Promise.resolve()}}async getBreadcrumbData(n,r,a){const o=this.luigi.getConfigValue("navigation.breadcrumbs"),c=r??await this.getPathData(n),l=c?.nodesInPath||[],f=[];let g=!!o,m="";if(!o||n===""&&l?.[0].viewUrl)return this.previousBreadcrumbs={},{};if(l.forEach(x=>{x.children&&(m+="/"+(x.pathSegment||"")),x.showBreadcrumbs===!1?g=!1:x.showBreadcrumbs===!0&&(g=!0)}),!g)return{clearBeforeRender:!0};const w=this.luigi.getConfigValue("routing.useHashRouting"),y=O.getCurrentPath(w),E=o.omitRoot?2:1;for(let x=E;x<l.length;x++){const U=l[x],H=O.mapPathToNode(y.path,U);if(H&&this.previousBreadcrumbs[H])f.push(this.previousBreadcrumbs[H]);else if(U.label||U.pathSegment||U.titleResolver)if(U.titleResolver)f.push({label:U.titleResolver.prerenderFallback&&U.titleResolver.fallbackTitle?this.luigi.i18n().getTranslation(U.titleResolver.fallbackTitle):o.pendingItemLabel||"",node:U,route:H,pending:!0});else{const re=await O.getNodeLabel(U,this.luigi);re&&f.push({label:re,node:U,route:H})}}const b=f.some(x=>x.pending),R=x=>({basePath:m.replace(/\/\/+/g,"/"),clearBeforeRender:o.clearBeforeRender,items:x,renderer:o.renderer,selectedNode:c?.selectedNode||{}});if(b&&a)return this.resolveBreadcrumbTitles(l,E,y,w,o,R,a),R(f);if(y.path===O.getCurrentPath(w).path){const x={};f.length>1?f[f.length-1].last=!0:o.autoHide&&(f.length=0),f.map(U=>{U.route&&(x[U.route]=U)}),this.previousBreadcrumbs=x}return R(f)}async resolveBreadcrumbTitles(n,r,a,o,c,l,f){const g=[];for(let m=r;m<n.length;m++){const w=n[m],y=O.mapPathToNode(a.path,w);if(w.titleResolver)try{const b=await this.extractDataFromPath(y||""),R=O.substituteDynamicParamsInObject(Object.assign({},b.pathData.context,w.context),b.pathData.pathParams||{}),x=await Ce.fetchNodeTitleData(w,R);g.push({label:x.label,node:w,route:y});continue}catch{}const E=await O.getNodeLabel(w,this.luigi);E&&g.push({label:E,node:w,route:y})}if(a.path===O.getCurrentPath(o).path){const m={};g.length>1?g[g.length-1].last=!0:c.autoHide&&(g.length=0),g.map(w=>{w.route&&(m[w.route]=w)}),this.previousBreadcrumbs=m}f(l(g))}onNodeChange(n,r){const a=this.luigi.getConfigValue("navigation.nodeChangeHook");M.isFunction(a)?a(n,r):a!==void 0&&console.warn("nodeChangeHook is not a function!")}async extractDataFromPath(n){const r=await this.getPathData(n);return{nodeObject:O.getLastNodeObject(r),pathData:r}}async shouldPreventNavigation(n){return!!(n?.onNodeActivation&&(M.isFunction(n.onNodeActivation)||M.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);let a;try{if(a=new URL(n,window.location.origin),a.origin!==window.location.origin)return}catch{return}window.open(a.toString(),"_blank","noopener,noreferrer")}resolveTooltipText(n,r){return Ce.generateTooltipText(n,r,this.luigi)}prepareRootNodes(n,r){const a=n;return a.length&&a.forEach(o=>{o.isRootNode=!0}),a}getAccessibleNodes(n,r,a){return r?r.filter(o=>Ce.isNodeAccessPermitted(o,n,a,this.luigi)):[]}async handleNavigationRequest(n,r){const{path:a,preserveView:o,drawerSettings:c,modalSettings:l,newTab:f,withoutSync:g,preventContextUpdate:m,preventHistoryEntry:w,options:y}=n;if(!!!(c||l)){const U=q.get(Lt);try{await U.getUnsavedChangesModalPromise()}catch{return}}const R=(await this.buildPath(a,y||{})).replace(/\/\/+/g,"/"),x=w?"replaceState":"pushState";if(c||l)if(c)this.luigi.navigation().openAsDrawer(R,c,r);else{if(!l.keepPrevious&&!await this.getModalService().closeModalsWithDirtyCheck())return;this.luigi.navigation().openAsModal(R,l,r)}else{const U={detail:{preventContextUpdate:!!m,preventHistoryEntry:!!w,withoutSync:!!g}},H=q.get(Lt);if(G.drawerContainer&&H.shouldShowUnsavedChangesModal(G.drawerContainer))try{await H.getUnsavedChangesModalPromise(G.drawerContainer)}catch{return}if(!await q.get(vn).closeModalsWithDirtyCheck())return;if(f){await this.openViewInNewTab(R);return}const we=this.luigi.getConfigValue("routing.disableBrowserHistory")?"replaceState":x;if(this.luigi.getConfig().routing?.useHashRouting)if(!g&&we!=="replaceState")location.hash=R;else{const me=new CustomEvent("hashchange",U);window.history[we]({path:"/#"+R},"","/#"+R),window.dispatchEvent(me)}else{const me=new CustomEvent("popstate",U);window.history[we]({path:R},"",R),window.dispatchEvent(me)}}}async getChildren(n,r={}){const a=q.get(_n);if(!n)return[];let o=[];if(a.hasChildren(n)){let l=a.getChildren(n);l&&(o=l.children)}else try{o=await Dn.getConfigValueFromObjectAsync(n,"children",r||n.context),o==null&&(o=[]),o=o.map(l=>this.getExpandStructuralPathSegment(l)).map(l=>this.bindChildToParent(l,n))||[]}catch(l){console.error("Could not lazy-load children for node",l)}let c=this.getAccessibleNodes(n,o,r);return a.setChildren(n,{children:o,filteredChildren:c}),c}getExpandStructuralPathSegment(n){if(n&&n.pathSegment&&n.pathSegment.indexOf("/")!==-1){const r=n.pathSegment.split("/"),a={...n},o=(c,l)=>{const f=c.shift();let g={};return c.length?(g.pathSegment=f,l.hideFromNav&&(g.hideFromNav=l.hideFromNav),g.children=[o(c,l)]):(g=a,g.pathSegment=f),g};return o(r,n)}return n}bindChildToParent(n,r){return r&&r.pathSegment&&(n.parent=r),n}buildVirtualTree(n,r,a){const o=n.virtualTree,c=n._virtualTree,l=n._virtualViewUrl||n.viewUrl;if((o||c)&&r){let f=typeof n._virtualPathIndex=="number"?n._virtualPathIndex:void 0;o&&(f=void 0,n.keepSelectedForChildren=!0);const g=50;if(typeof f=="number"&&f>g)return;const m=(f??0)+1;if(m>g)return;const w=["_*","virtualTree","parent","children","keepSelectedForChildren","navigationContext"],y=M.removeProperties(n,w);Object.assign(y,{pathSegment:":virtualSegment_"+m,label:":virtualSegment_"+m,viewUrl:M.trimTrailingSlash(this.buildVirtualViewUrl(l||"",a,m)),_virtualTree:!0,_virtualPathIndex:m,_virtualViewUrl:l});const E=Array.isArray(n.children)&&n.children.length>0?n.children[0]._virtualTree:!1;return n.children&&!E&&console.warn(`Found both virtualTree and children nodes defined on a navigation node.
|
|
52
|
+
Invalid Children:`,r);return}return r.some(l=>{if(l.pathSegment===t||l.pathSegment&&l.pathSegment.startsWith(":"))return a=l,!0}),a}buildNavItems(t,r,a){const o={},c=[];return t?.forEach(l=>{if(Ce.isNodeAccessPermitted(l,this.getParentNode(a.selectedNode,a),a?.selectedNode?.context||{},this.luigi))if(l.category){const f=l.category.id||l.category.label||l.category,d=this.luigi.i18n().getTranslation(l.category.label||l.category.id||l.category);let m=o[f];m||(m={category:{altText:l.category.altText||"",icon:l.category.icon,id:f,label:d,nodes:[],tooltip:this.resolveTooltipText(l.category,d)}},o[f]=m,c.push(m)),m.category?.nodes?.push({node:l,selected:l===r,label:l.label?this.luigi.i18n().getTranslation(l.label):void 0,tooltip:l.label?this.resolveTooltipText(l,l.label):void 0,altText:l.altText,icon:l.icon})}else c.push({altText:l.altText,icon:l.icon,label:l.label?this.luigi.i18n().getTranslation(l.label):void 0,tooltip:l.label?this.resolveTooltipText(l,l.label):void 0,node:l,selected:l===r})}),c}async getCurrentNode(t){const r=await this.getPathData(t);let a=r.selectedNode;if(!a&&r.nodesInPath?.length===1&&(a=r.nodesInPath[0]),!(!a||!Ce.isNodeAccessPermitted(a,this.getParentNode(r.selectedNode,r),r?.selectedNode?.context||{},this.luigi)))return a}async getPathParams(t){return(await this.getPathData(t)).pathParams}getTruncatedChildren(t){let r=!1,a=!1,o=[];return t.slice().reverse().forEach(c=>{(!r||c.tabNav)&&(c.tabNav===!1&&(a=!0),c.keepSelectedForChildren===!1?r=!0:(c.keepSelectedForChildren||c.tabNav&&!a)&&(r=!0,o=[])),o.push(c)}),o.reverse()}applyNavGroups(t){const r={},a=[],c=[];return t.forEach(l=>{if(l.node)c.push(l);else if(l.category){const f=l.category.id;f&&f.indexOf("::")>0?a.push(l):(l.category.isGroup,r[f]=l,c.push(l))}}),a.forEach(l=>{const f=l.category?.id.split("::")[0]||"",d=r[f];d&&d.category&&(d.category.isGroup||(d.category.isGroup=!0),d.category.nodes||(d.category.nodes=[]),d.category.nodes.push(l))}),c.filter(l=>{if(l.category?.isGroup&&l.category?.nodes&&l.category?.nodes.length>0){for(let f=0;f<l.category?.nodes.length;f++){const d=l.category?.nodes[f];if(d.node&&!d.node.hideFromNav&&d.node.label||d.category?.nodes&&d.category.nodes.filter(m=>!m.node?.hideFromNav&&m.node?.label).length>0)return!0}return!1}return!0})}async getLeftNavData(t,r){const a=r??await this.getPathData(t);if(t===""&&a?.nodesInPath?.[0].viewUrl)return{items:[],basePath:"",selectedNode:{},navClick:void 0};let o=[];const c=[];let l="";a.nodesInPath?.forEach(T=>{T.children&&(T.tabNav||(l+="/"+(T.pathSegment||"")),c.push(T))});const f=this.getTruncatedChildren(a.nodesInPath??[]);let d=[...f].pop(),m=a.selectedNode;(d?.keepSelectedForChildren||d?.tabNav)&&(m=d,f.pop(),d=[...f].pop());let S,y=m;m?a.rootNodes.includes(m)?(S=m,y=void 0):m.tabNav||m.keepSelectedForChildren?S=d:S=[...c].pop():(S=[...c].pop(),y=void 0);let E=await this.getChildren(S,S?.context||{})||[];return o=this.buildNavItems(E,y,a),o=this.applyNavGroups(o),{selectedNode:m||{},items:o,basePath:l.replace(/\/\/+/g,"/"),sideNavFooterText:this.luigi.getConfig().settings?.sideNavFooterText,navClick:T=>T.node?this.navItemClick(T.node,a):Promise.resolve()}}async navItemClick(t,r){await q.get(Lt).getUnsavedChangesModalPromise();let o=U.getNodePath(t),c=r?.pathParams;if(o=D.replaceVars(o,c||{},":",!1),!o&&o!==""){console.error("Navigation error: could not build path for the node. Check if pathSegment is defined for all nodes in the path and if there are no duplicate pathSegments on the same level.");return}return this.luigi.navigation().navigate(o)}async getTopNavData(t,r){const a=this.luigi.getConfig(),o=r??await this.getPathData(t),c=a.navigation?.profile?.items?.length?JSON.parse(JSON.stringify(a.navigation.profile.items)):[],l=a.navigation?.appSwitcher&&this.getAppSwitcherData(a.navigation?.appSwitcher,a.settings?.header),f=Ce.updateHeaderTitle(l,o);c?.length&&c.map(T=>({...T,label:this.luigi.i18n().getTranslation(T.label||"")}));const d=this.luigi.i18n().getTranslation(a.navigation?.profile?.logout?.label)||ka.logout.label,m=T=>{if(T.openNodeInModal&&!T.externalLink?.url)this.luigi.navigation().openAsModal(T.link||"",T.openNodeInModal===!0?{}:T.openNodeInModal);else if(T.link)this.luigi.navigation().navigate(T.link);else if(T.externalLink?.url)if(T.externalLink.sameWindow)window.location.href=T.externalLink.url;else{const R=window.open(T.externalLink.url,"_blank","noopener noreferrer");R&&(R.opener=null,R.focus())}},S={authEnabled:this.luigi.auth().isAuthorizationEnabled(),signedIn:this.luigi.auth().isAuthorizationEnabled()&&fn.isLoggedIn(),items:c,itemClick:m,logout:{altText:this.luigi.i18n().getTranslation(a.navigation?.profile?.logout?.altText)||ka.logout.label,label:d,icon:a.navigation?.profile?.logout?.icon||ka.logout.icon,testId:a.navigation?.profile?.logout?.testId||Ce.prepareForTests(d),doLogout:()=>{dn.logout()}},onUserInfoUpdate:T=>{this.luigi.getConfigValueAsync("navigation.profile.staticUserInfoFn").then(R=>{R?T(R):dn.getUserInfoStore().subscribe(x=>{T(x)})})}},y=o.selectedNode,E=y&&o.rootNodes.includes(y)?y:void 0;return{appTitle:f||a.settings?.header?.title,logo:a.settings?.header?.logo,topNodes:this.buildNavItems(o.rootNodes,E,o),productSwitcher:a.navigation?.productSwitcher,profile:this.luigi.auth().isAuthorizationEnabled()||a.navigation?.profile?S:void 0,appSwitcher:a.navigation?.appSwitcher&&this.getAppSwitcherData(a.navigation?.appSwitcher,a.settings?.header),navClick:T=>T.node?this.navItemClick(T.node,o):Promise.resolve()}}getParentNode(t,r){if(t&&t===r.nodesInPath?.[r.nodesInPath.length-1])return r.nodesInPath[r.nodesInPath.length-2]}getAppSwitcherData(t,r){const a=t,o=a?.showMainAppEntry;if(a&&a.items&&o){const c={title:this.luigi.i18n().getTranslation(r.title||""),subTitle:r.subTitle,link:"/"};if(a.items?.map(l=>({...l,title:this.luigi.i18n().getTranslation(l.title||"")})),a.items.some(l=>l.link===c.link))return a;a.items.unshift(c)}return a}async getTabNavData(t,r){const a=r??await this.getPathData(t);if(t===""&&a?.nodesInPath?.[0].viewUrl)return{};const o=a?.selectedNode;let c;if(!o)return{};if(!o.tabNav&&(c=this.getParentNode(o,a),c&&!c.tabNav))return{};let l="";a.nodesInPath?.forEach(m=>{m.children&&(l+="/"+(m.pathSegment||""))});const f=c?this.getTruncatedChildren(c.children??[]):this.getTruncatedChildren(o.children??[]),d=this.buildNavItems(f,o,a);return{selectedNode:o,items:d,basePath:l.replace(/\/\/+/g,"/"),navClick:m=>m.node?this.navItemClick(m.node,a):Promise.resolve()}}async getBreadcrumbData(t,r,a){const o=this.luigi.getConfigValue("navigation.breadcrumbs"),c=r??await this.getPathData(t),l=c?.nodesInPath||[],f=[];let d=!!o,m="";if(!o||t===""&&l?.[0].viewUrl)return this.previousBreadcrumbs={},{};if(l.forEach(x=>{x.children&&(m+="/"+(x.pathSegment||"")),x.showBreadcrumbs===!1?d=!1:x.showBreadcrumbs===!0&&(d=!0)}),!d)return{clearBeforeRender:!0};const S=this.luigi.getConfigValue("routing.useHashRouting"),y=U.getCurrentPath(S),E=o.omitRoot?2:1;for(let x=E;x<l.length;x++){const $=l[x],W=U.mapPathToNode(y.path,$);if(W&&this.previousBreadcrumbs[W])f.push(this.previousBreadcrumbs[W]);else if($.label||$.pathSegment||$.titleResolver)if($.titleResolver)f.push({label:$.titleResolver.prerenderFallback&&$.titleResolver.fallbackTitle?this.luigi.i18n().getTranslation($.titleResolver.fallbackTitle):o.pendingItemLabel||"",node:$,route:W,pending:!0});else{const Z=await U.getNodeLabel($,this.luigi);Z&&f.push({label:Z,node:$,route:W})}}const T=f.some(x=>x.pending),R=x=>({basePath:m.replace(/\/\/+/g,"/"),clearBeforeRender:o.clearBeforeRender,items:x,renderer:o.renderer,selectedNode:c?.selectedNode||{}});if(T&&a)return this.resolveBreadcrumbTitles(l,E,y,S,o,R,a),R(f);if(y.path===U.getCurrentPath(S).path){const x={};f.length>1?f[f.length-1].last=!0:o.autoHide&&(f.length=0),f.map($=>{$.route&&(x[$.route]=$)}),this.previousBreadcrumbs=x}return R(f)}async resolveBreadcrumbTitles(t,r,a,o,c,l,f){const d=[];for(let m=r;m<t.length;m++){const S=t[m],y=U.mapPathToNode(a.path,S);if(S.titleResolver)try{const T=await this.extractDataFromPath(y||""),R=U.substituteDynamicParamsInObject(Object.assign({},T.pathData.context,S.context),T.pathData.pathParams||{}),x=await Ce.fetchNodeTitleData(S,R);d.push({label:x.label,node:S,route:y});continue}catch{}const E=await U.getNodeLabel(S,this.luigi);E&&d.push({label:E,node:S,route:y})}if(a.path===U.getCurrentPath(o).path){const m={};d.length>1?d[d.length-1].last=!0:c.autoHide&&(d.length=0),d.map(S=>{S.route&&(m[S.route]=S)}),this.previousBreadcrumbs=m}f(l(d))}onNodeChange(t,r){const a=this.luigi.getConfigValue("navigation.nodeChangeHook");D.isFunction(a)?a(t,r):a!==void 0&&console.warn("nodeChangeHook is not a function!")}async extractDataFromPath(t){const r=await this.getPathData(t);return{nodeObject:U.getLastNodeObject(r),pathData:r}}async shouldPreventNavigation(t){return!!(t?.onNodeActivation&&(D.isFunction(t.onNodeActivation)||D.isAsyncFunction(t.onNodeActivation))&&await t.onNodeActivation(t)===!1)}async shouldPreventNavigationForPath(t){const{nodeObject:r}=await this.extractDataFromPath(t);return!!await this.shouldPreventNavigation(r)}async openViewInNewTab(t){if(await this.shouldPreventNavigationForPath(t))return;this.luigi.getConfigValue("routing.useHashRouting")&&(t="#"+t);let a;try{if(a=new URL(t,window.location.origin),a.origin!==window.location.origin)return}catch{return}window.open(a.toString(),"_blank","noopener,noreferrer")}resolveTooltipText(t,r){return Ce.generateTooltipText(t,r,this.luigi)}prepareRootNodes(t,r){const a=t;return a.length&&a.forEach(o=>{o.isRootNode=!0}),a}getAccessibleNodes(t,r,a){return r?r.filter(o=>Ce.isNodeAccessPermitted(o,t,a,this.luigi)):[]}async handleNavigationRequest(t,r){const{path:a,preserveView:o,drawerSettings:c,modalSettings:l,newTab:f,withoutSync:d,preventContextUpdate:m,preventHistoryEntry:S,options:y}=t;if(!!!(c||l)){const Z=q.get(Lt);try{await Z.getUnsavedChangesModalPromise()}catch{return}}const R=(await this.buildPath(a,y||{})).replace(/\/\/+/g,"/"),x=S?"replaceState":"pushState",$=this.luigi.getConfig()?.routing?.useHashRouting,W=U.getCurrentPath($).path;if(D.trimLeadingSlash(W)!==D.trimLeadingSlash(R))if(c||l)if(c)this.luigi.navigation().openAsDrawer(R,c,r);else{if(!l.keepPrevious&&!await this.getModalService().closeModalsWithDirtyCheck())return;this.luigi.navigation().openAsModal(R,l,r)}else{const Z={detail:{preventContextUpdate:!!m,preventHistoryEntry:!!S,withoutSync:!!d}},Se=q.get(Lt);if(G.drawerContainer&&Se.shouldShowUnsavedChangesModal(G.drawerContainer))try{await Se.getUnsavedChangesModalPromise(G.drawerContainer)}catch{return}if(!await q.get(vn).closeModalsWithDirtyCheck())return;if(f){await this.openViewInNewTab(R);return}const Ae=this.luigi.getConfigValue("routing.disableBrowserHistory")?"replaceState":x;if(this.luigi.getConfig().routing?.useHashRouting)if(!d&&Ae!=="replaceState")location.hash=R;else{const me=new CustomEvent("hashchange",Z);window.history[Ae]({path:"/#"+R},"","/#"+R),window.dispatchEvent(me)}else{const me=new CustomEvent("popstate",Z);window.history[Ae]({path:R},"",R),window.dispatchEvent(me)}}}async getChildren(t,r={}){const a=q.get(_n);if(!t)return[];let o=[];if(a.hasChildren(t)){let l=a.getChildren(t);l&&(o=l.children)}else try{o=await Dn.getConfigValueFromObjectAsync(t,"children",r||t.context),o==null&&(o=[]),o=o.map(l=>this.getExpandStructuralPathSegment(l)).map(l=>this.bindChildToParent(l,t))||[]}catch(l){console.error("Could not lazy-load children for node",l)}let c=this.getAccessibleNodes(t,o,r);return a.setChildren(t,{children:o,filteredChildren:c}),c}getExpandStructuralPathSegment(t){if(t&&t.pathSegment&&t.pathSegment.indexOf("/")!==-1){const r=t.pathSegment.split("/"),a={...t},o=(c,l)=>{const f=c.shift();let d={};return c.length?(d.pathSegment=f,l.hideFromNav&&(d.hideFromNav=l.hideFromNav),d.children=[o(c,l)]):(d=a,d.pathSegment=f),d};return o(r,t)}return t}bindChildToParent(t,r){return r&&r.pathSegment&&(t.parent=r),t}buildVirtualTree(t,r,a){const o=t.virtualTree,c=t._virtualTree,l=t._virtualViewUrl||t.viewUrl;if((o||c)&&r){let f=typeof t._virtualPathIndex=="number"?t._virtualPathIndex:void 0;o&&(f=void 0,t.keepSelectedForChildren=!0);const d=50;if(typeof f=="number"&&f>d)return;const m=(f??0)+1;if(m>d)return;const S=["_*","virtualTree","parent","children","keepSelectedForChildren","navigationContext"],y=D.removeProperties(t,S);Object.assign(y,{pathSegment:":virtualSegment_"+m,label:":virtualSegment_"+m,viewUrl:D.trimTrailingSlash(this.buildVirtualViewUrl(l||"",a,m)),_virtualTree:!0,_virtualPathIndex:m,_virtualViewUrl:l});const E=Array.isArray(t.children)&&t.children.length>0?t.children[0]._virtualTree:!1;return t.children&&!E&&console.warn(`Found both virtualTree and children nodes defined on a navigation node.
|
|
53
53
|
Children nodes are redundant and ignored when virtualTree is enabled.
|
|
54
|
-
Please refer to documentation`),[y]}}buildVirtualViewUrl(n,r,a){let o="";for(const l in r)l.startsWith("virtualSegment")&&(o+=":"+l+"/");if(!a)return n;o+=":virtualSegment_"+a+"/";let c=n;n.includes("{virtualTreePath}")?c=n.replace("{virtualTreePath}",o):c=n+"/"+o;try{if(new URL(c,"http://dummy-base").origin===new URL(n,"http://dummy-base").origin)return c}catch(l){console.error("Error building virtual view URL -- make sure virtualTreePath is not part of origin.",l)}return n}async buildPath(n,r){const{fromVirtualTreeRoot:a,fromContext:o,fromClosestContext:c,fromParent:l,relative:f,nodeParams:g}=r,m=this.luigi.getConfigValue("routing.useHashRouting"),{path:w,query:y}=O.getCurrentPath(m),E=w+(y?"?"+y:""),b=await this.getPathData(E),R=b.nodesInPath;let x=n;if(R===void 0)return console.warn("No nodes in path found for current path:",E),x;if(a){x="";const U=[...R].map((H,re)=>H.virtualTree?re:-1).filter(H=>H!==-1).pop();R.forEach((H,re)=>{H.pathSegment&&(U===void 0||re<=U)&&(x+="/"+H.pathSegment)}),x+="/"+n}else if(o){const U=o,H=[...R].reverse().find(re=>U===re.navigationContext);x=O.concatenatePath(O.getSubPath(H,b.pathParams),n)}else if(c){const U=[...R].reverse().find(H=>H.navigationContext&&H.navigationContext.length>0);x=O.concatenatePath(O.getSubPath(U,b.pathParams),n)}else l?x=O.concatenatePath(O.getSubPath(b.selectedNode?.parent,b.pathParams),n):f&&(x=O.concatenatePath(O.getSubPath(b.selectedNode,b.pathParams),n));return g&&Object.keys(g).length>0&&(x+=x.includes("?")?"&":"?",Object.entries(g).forEach((U,H)=>{x+=encodeURIComponent(O.getContentViewParamPrefix(this.luigi)+U[0])+"="+encodeURIComponent(U[1])+(H<Object.keys(g).length-1?"&":"")})),x}}class Sr{constructor(n){this.luigi=n,this.preloadBatchSize=1,this.shouldPreload=!1}preloadViewGroups(n=3,r){const a=this.luigi.getConfigValue("navigation.preloadViewGroups"),o=this.luigi.getConfigValue("navigation.viewGroupSettings"),c=this.luigi.getEngine()._connector?.getContainerWrapper();if(a===!1||!o||!c)return;const l=Date.now();if(this.getPreloadingContainers(c).filter(w=>l-(w._luigiPreloadCreatedAt||0)<3e4).length>0){console.log("skipping view group preloading (busy)");return}const g=[...c.childNodes].filter(w=>w.tagName?.startsWith("LUIGI-")&&w.viewGroup).map(w=>w.viewGroup),m=Object.entries(o).filter(([w])=>!g.includes(w)).filter(([w,y])=>y&&y.preloadUrl);r?m.forEach(([w,y])=>{y.loadOnStartup&&this.preloadContainerOnBackground(y,w,c)}):m.filter((w,y)=>y<n).forEach(([w,y])=>{this.preloadContainerOnBackground(y,w,c)})}preloadContainerOnBackground(n,r,a){const o=document.createElement("luigi-container");o.setAttribute("lui_container","true"),o.viewurl=n.preloadUrl,o.viewGroup=r,o.style.display="none",o._luigiPreloading=!0,o._luigiPreloadCreatedAt=Date.now(),o.luigiMfId=M.getRandomId(),this.luigi.getEngine()._comm.addListeners(o,this.luigi),a.appendChild(o)}preload(n){this.shouldPreload&&setTimeout(()=>{this.preloadViewGroups(this.preloadBatchSize,!!n)},n?1:0),this.shouldPreload=!0}viewGroupLoaded(n){if(n._luigiPreloading){const r=Date.now()-(n._luigiPreloadCreatedAt||0);let a=1;r<500?a=3:r<1e3&&(a=2),this.preloadBatchSize=a,setTimeout(()=>{n._luigiPreloading=!1},this.preloadBatchSize>2?500:1e3)}}getPreloadingContainers(n){return[...n.childNodes].filter(r=>r.tagName?.startsWith("LUIGI-")&&r._luigiPreloading)}}const qa={listeners:[],hashChangeWithoutSync:!1,addEventListener(i,n){this.listeners.push({type:i,listenerFn:n}),window.addEventListener(i,n)},removeEventListener(i,n){this.listeners=this.listeners.filter(r=>!(r.type===i&&r.listenerFn===n)),window.removeEventListener(i,n)},removeAllEventListeners(){this.listeners.forEach(i=>{window.removeEventListener(i.type,i.listenerFn)}),this.listeners=[]}};class kn{constructor(n){this.luigi=n}getNavigationService(){return this.navigationService||(this.navigationService=q.get(Sn),this.dirtyStatusService=q.get(Lt)),this.navigationService}shouldSkipRoutingForUrlPatterns(){const n=[/access_token=/,/id_token=/];return(this.luigi.getConfigValue("routing.skipRoutingForUrlPatterns")||n).filter(a=>location.href.match(a)).length!==0}enableRouting(){this.luigi.getConfig().routing?.useHashRouting?(qa.addEventListener("hashchange",r=>{const a=!!r?.detail?.preventContextUpdate,o=!!r?.detail?.withoutSync;this.handleRouteChange(O.getCurrentPath(!0),o,a)}),this.handleRouteChange(O.getCurrentPath(!0))):(qa.addEventListener("popstate",r=>{const a=!!r?.detail?.preventContextUpdate,o=!!r?.detail?.withoutSync;this.handleRouteChange(O.getCurrentPath(),o,a)}),this.handleRouteChange(O.getCurrentPath()))}async handleRouteChange(n,r=!1,a=!1){const o=n.path,c=n.query,l=o+(c?"?"+c:""),f=new URLSearchParams(c),g=Object.create(null);try{if(this.dirtyStatusService?.shouldShowUnsavedChangesModal()){const x=window.location.href,U=this.dirtyStatusService.unsavedChanges.persistUrl;U&&history.pushState(window.state,"",U)}}catch{return}if(this.shouldSkipRoutingForUrlPatterns())return;this.setFeatureToggle(l),await this.shouldShowModalPathInUrl(n),f.forEach((x,U)=>{g[U]=x}),this.checkInvalidateCache(this.previousPathData,o);const m=await this.getNavigationService().getPathData(o);this.previousPathData=m;const w=O.filterNodeParams(g,this.luigi),y=M.getPathWithoutHash(o);this.currentRoute={raw:window.location.href,path:o,nodeParams:w};const E=m?.selectedNode??await this.getNavigationService().getCurrentNode(o),b=E?.viewUrl||"";if(await this.handlePageNotFound(E,b,m,o,y))return;const R=this.luigi.getEngine()._connector;if(R?.renderTopNav(await this.getNavigationService().getTopNavData(o,m)),R?.renderLeftNav(await this.getNavigationService().getLeftNavData(o,m)),R?.renderTabNav(await this.getNavigationService().getTabNavData(o,m)),R?.renderBreadcrumbs(await this.getNavigationService().getBreadcrumbData(o,m,x=>{R?.renderBreadcrumbs(x)})),E){const x={nodeParams:w||{},pathParams:m?.pathParams||{},searchParams:O.prepareSearchParamsForClient(E,this.luigi)};this.currentRoute.node=E,this.getNavigationService().onNodeChange(this.previousNode,E),this.previousNode=E,await G.updateMainContent(E,this.luigi,x,r,a)}}getCurrentRoute(){return this.currentRoute}async shouldShowModalPathInUrl(n){this.luigi.getConfigValue("routing.showModalPathInUrl")&&await this.handleBookmarkableModalPath(n)}async handleBookmarkableModalPath(n){const r=q.get(Sn),a=q.get(vn),o=new URLSearchParams(n?.query||""),c=O.getModalViewParamName(this.luigi),l=o.get(c);if(l){const f=o.get(`${c}Params`);try{const g=JSON.parse(f||"{}"),{nodeObject:m}=await r.extractDataFromPath(l);document.querySelector(".lui-modal luigi-container")?this.luigi.getEngine()._connector?.updateModalSettings(g):this.luigi.navigation().openAsModal(l,g||m.openNodeInModal)}catch(g){console.error("Error parsing modal settings from URL parameters",g)}}else return await a.closeModalsWithDirtyCheck(),void 0}appendModalDataToUrl(n,r){const a=O.getHashQueryParamSeparator(),o=O.getQueryParams(this.luigi),c=O.getModalViewParamName(this.luigi),l=o[c],f=new URL(location.href),g=this.luigi.getConfigValue("routing.useHashRouting");let m=history.state,w,y;if(g){let[E,b]=f.hash.split("?");w=E,y=O.getURLWithoutModalData(b,c),y&&(w+="?"+y)}else w=f.pathname,y=O.getURLWithoutModalData(f.search,c),y&&(w+="?"+O.getURLWithoutModalData(f.search,c));if(m=O.handleHistoryState(m,w),l!==n){if(o[c]=n,r&&Object.keys(r).length&&(o[`${c}Params`]=JSON.stringify(r)),g){const E=location.hash.indexOf(a);E!==-1&&(f.hash=f.hash.slice(0,E)),f.hash=`${f.hash}${a}${O.encodeParams(o)}`}else f.search=`?${O.encodeParams(o)}`;history.pushState(m,"",f.href)}else{const E=new URL(f);if(g){let b=E.hash.split("?")[0];E.hash=b,y&&(E.hash+="?"+y)}else E.search=y;history.replaceState({},"",E.href),history.pushState(m,"",f.href)}}removeModalDataFromUrl(n){const r=O.getQueryParams(this.luigi),a=O.getModalViewParamName(this.luigi);let o=new URL(location.href);if(this.luigi.getConfigValue("routing.useHashRouting")){let l={};r[a]&&(l[a]=r[a]),r[`${a}Params`]&&(l[`${a}Params`]=r[`${a}Params`]);let f=O.encodeParams(l);o.hash.includes(`?${f}`)?o.hash=o.hash.replace(`?${f}`,""):o.hash.includes(`&${f}`)&&(o.hash=o.hash.replace(`&${f}`,""))}else{let l=new URLSearchParams(o.search.slice(1));l.delete(a),l.delete(`${a}Params`);let f="";Array.from(l.keys()).forEach(g=>{f+=(f===""?"?":"&")+g+"="+l.get(g)}),o.search=f}if(history.state&&history.state.modalHistoryLength>=0&&n){history.state.modalHistoryLength;const l=history.state.pathBeforeHistory;let f=!1;if(window.addEventListener("popstate",g=>{f?(history.replaceState({},"",l),history.pushState({},"",l),history.back()):(history.pushState({},"",l),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 g=history.length-1;f=!0,history.go(-g),window.Luigi.preventLoadingModalData=!0}else{const g=history.state.modalHistoryLength;history.go(-g)}}else history.pushState({},"",o.href)}setFeatureToggle(n){const r=this.luigi.getConfigValue("settings.featureToggles.queryStringParam"),a=this.luigi.featureToggles();r&&typeof n=="string"&&O.setFeatureToggles(r,n,a)}updateModalDataInUrl(n,r,a){let o=O.getHashQueryParamSeparator();const c=O.getQueryParams(this.luigi),l=O.getModalViewParamName(this.luigi);c[l]=n,r&&Object.keys(r).length&&(c[`${l}Params`]=JSON.stringify(r));const f=new URL(location.href);if(this.luigi.getConfigValue("routing.useHashRouting")){const m=location.hash.indexOf(o);m!==-1&&(f.hash=f.hash.slice(0,m)),f.hash=`${f.hash}${o}${O.encodeParams(c)}`}else f.search=`?${O.encodeParams(c)}`;a?history.pushState(window.state,"",f.href):history.replaceState(window.state,"",f.href)}checkInvalidateCache(n,r){if(!n)return;const a=q.get(_n);let o=r.split("/");if(n.nodesInPath&&n.nodesInPath.length>0){let c=n.nodesInPath.slice(1),l=!0;for(let f=0;f<c.length;f++){let g=o.length>f?o[f]:void 0,m=c[f];if(g!==m.pathSegment||!l)if(O.isDynamicNode(m)){if(!l||g!==O.getDynamicNodeValue(m,n.pathParams)){a.deleteNodesRecursively(m);break}}else l=!1}}else a.deleteCache()}async handlePageNotFound(n,r,a,o,c){const l=M.getTrimmedUrl(o),f=O.isExistingRoute(l,a);if(!r&&!n?.compound||n?.tabNav?.showAsTabHeader){const g=await O.getDefaultChildNode(a,async(m,w)=>await this.getNavigationService().getChildren(m,w));if(f){const m=M.getTrimmedUrl(o);return this.getNavigationService().handleNavigationRequest({path:`${m?`/${m}`:""}/${g}`,preserveView:void 0,modalSettings:void 0,newTab:!1,withoutSync:!1,preventContextUpdate:!1,preventHistoryEntry:!0}),!1}else{if(g&&a?.nodesInPath&&a.nodesInPath.length>1)return this.showPageNotFoundError(M.trimTrailingSlash(l||"")+"/"+g,c,!0),!0;const m=await O.getDefaultChildNode(a);this.showPageNotFoundError(m,c,!1)}return!0}return f?!1:(this.showPageNotFoundError(a.matchedPath,c,!0),!0)}async showPageNotFoundError(n,r,a=!1){const o=O.getPageNotFoundRedirectResult(r,a,this.luigi);if(o.ignoreLuigiErrorHandling)return;const c=o.path;if(c){if(o.keepURL){const l=this.luigi.getConfig().routing?.useHashRouting,f=O.getCurrentPath(l);f.path=c,this.handleRouteChange(f)}else this.getNavigationService().handleNavigationRequest({path:c});return}O.showRouteNotFoundAlert(r,a,this.luigi),this.getNavigationService().handleNavigationRequest({path:M.addLeadingSlash(n)})}}class wr{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 a=new URL(M.prependOrigin(n)),o=this.decorators.filter(c=>c.type==="queryString");for(let c=0;c<o.length;c++){const l=o[c];a.searchParams.has(l.key)&&a.searchParams.delete(l.key);const f=l.valueFn();a.searchParams.append(l.key,f)}return r&&(a.search=decodeURIComponent(a.search)),a.href}}const Fa=async(i,n,r)=>{const a=await n.readUserSettings(),c=i.userSettingsGroup&&typeof a=="object"&&a!==null&&i.userSettingsGroup?a[i.userSettingsGroup]:null,l=r?.nodeParams||{},f=r?.pathParams||{},g=r?.searchParams||{};if(i.webcomponent&&i.viewUrl&&!O.checkWCUrl(i.viewUrl,n))return console.warn(`View URL '${i.viewUrl}' not allowed to be included`),document.createElement("div");if(i.compound){const m=document.createElement("luigi-compound-container");return m.setAttribute("lui_container","true"),m.viewurl=i.viewUrl?q.get(wr).applyDecorators(O.substituteViewUrl(i,f,l,n),i.decodeViewUrl??!1):"",m.webcomponent=i.webcomponent??!1,m.compoundConfig=i.compound,m.context=i.context,m.clientPermissions=i.clientPermissions??{},m.nodeParams=l,m.pathParams=f,m.userSettingsGroup=i.userSettingsGroup,m.userSettings=c,m.searchParams=g,m.activeFeatureToggleList=n.featureToggles().getActiveFeatureToggleList(),m.locale=n.i18n().getCurrentLocale(),m.theme=n.theming().getCurrentTheme(),m.viewGroup=i.viewGroup,m.virtualTree=i.virtualTree||i._virtualTree,m.virtualTreeRootNode=Ce.findVirtualTreeRootNode(i),n.getEngine()._comm.addListeners(m,n),m}else{const m=document.createElement("luigi-container");return m.setAttribute("lui_container","true"),m.viewurl=i.viewUrl?q.get(wr).applyDecorators(O.substituteViewUrl(i,f,l,n),i.decodeViewUrl??!1):"",m.webcomponent=i.webcomponent??!1,m.context=i.context,m.authData=fn.getStoredAuthData(),m.clientPermissions=i.clientPermissions??{},m.cssVariables=await n.theming().getCSSVariables(),m.nodeParams=l,m.pathParams=f,m.userSettingsGroup=i.userSettingsGroup,m.userSettings=c,m.searchParams=g,m.activeFeatureToggleList=n.featureToggles().getActiveFeatureToggleList(),m.locale=n.i18n().getCurrentLocale(),m.theme=n.theming().getCurrentTheme(),m.viewGroup=i.viewGroup,m.virtualTree=i.virtualTree||i._virtualTree,m.virtualTreeRootNode=Ce.findVirtualTreeRootNode(i),Tc(m,n),bc(m,n),n.getEngine()._comm.addListeners(m,n),m.luigiMfId=M.getRandomId(),m}},Tc=(i,n)=>{const r=n.getConfigValue("settings.customSandboxRules");if(!r?.length)return;const a=["allow-forms","allow-modals","allow-popups","allow-popups-to-escape-sandbox","allow-same-origin","allow-scripts"],o=r?[...new Set([...a,...r])]:a;i.sandboxRules=o},bc=(i,n)=>{const r=n.getConfigValue("settings.allowRules");r?.length&&(r.forEach((a,o)=>{r[o]=a+(a.indexOf(";")!=-1?"":";")}),i.allowRules=r)},G={navService:void 0,routingService:void 0,luigi:void 0,modalContainer:[],drawerContainer:void 0,init:i=>{G.navService=q.get(Sn),G.routingService=q.get(kn),G.luigi=i,i.getEngine()._connector?.renderMainLayout();const n=q.get(Sr);n.shouldPreload=!0,n.preload(!0),n.shouldPreload=!1},update:async i=>{const n=G.routingService.getCurrentRoute();if(!n)return;const r=!i||i.length===0;if((r||i.includes("settings.header")||i.includes("settings")||i.includes("navigation")||i.includes("navigation.profile")||i.includes("navigation.contextSwitcher")||i.includes("navigation.productSwitcher"))&&G.luigi.getEngine()._connector?.renderTopNav(await G.navService.getTopNavData(n.path)),r||i.includes("navigation")||i.includes("navigation.nodes")||i.includes("navigation.viewgroupdata")||i.includes("settings")||i.includes("settings.footer")){q.get(_n).deleteCache(),G.luigi.getEngine()._connector?.renderLeftNav(await G.navService.getLeftNavData(n.path)),G.luigi.getEngine()._connector?.renderTabNav(await G.navService.getTabNavData(n.path));const a=G.luigi.getEngine()._connector;a?.renderBreadcrumbs(await G.navService.getBreadcrumbData(n.path,void 0,o=>{a?.renderBreadcrumbs(o)}))}(r||i.includes("navigation")||i.includes("navigation.nodes")||i.includes("navigation.viewgroupdata")||i.includes("settings.theming"))&&(q.get(_n).deleteCache(),n.node&&G.updateMainContent(n.node,G.luigi))},updateMainContent:async(i,n,r,a,o)=>{const c=await n.readUserSettings(),f=i.userSettingsGroup&&typeof c=="object"&&c!==null&&i.userSettingsGroup?c[i.userSettingsGroup]:null,g=n.getEngine()._connector?.getContainerWrapper();n.getEngine()._connector?.hideLoadingIndicator(g);const m=r?.nodeParams||{},w=r?.pathParams||{},y=r?.searchParams||{};if(i&&g){let E,b;if((i.virtualTree||i._virtualTree)&&(b=Ce.findVirtualTreeRootNode(i)),[...g.childNodes].forEach(R=>{if(R.tagName?.indexOf("LUIGI-")===0)if(R.viewGroup&&i.viewGroup!==R.viewGroup){R.style.display="none";const x=n.getConfigValue("navigation.viewGroupSettings")?.[R.viewGroup];x?.preloadUrl&&(R.viewurl=x.preloadUrl,R.context={},R.nodeParams={},R.pathParams={})}else R.viewGroup||R.virtualTree&&b===R.virtualTreeRootNode?E=R:R.remove()}),E&&E._luigiPreloading&&(E._luigiPreloading=!1,q.get(Sr).viewGroupLoaded(E)),E)a||(E.style.display="block",E.viewurl=i.viewUrl?q.get(wr).applyDecorators(O.substituteViewUrl(i,w,m,n),i.decodeViewUrl??!1):"",E.nodeParams=m,E.pathParams=w,E.clientPermissions=i.clientPermissions,E.searchParams=y,E.locale=n.i18n().getCurrentLocale(),E.theme=n.theming().getCurrentTheme(),E.activeFeatureToggleList=n.featureToggles().getActiveFeatureToggleList(),E.userSettingsGroup=i.userSettingsGroup,E.userSettings=f,Tc(E,n),bc(E,n)),o||E.updateContext(i.context||{});else{const R=await Fa(i,n,r);g?.appendChild(R);const x=n.getEngine()._connector;i.loadingIndicator?.enabled!==!1&&x?.showLoadingIndicator(g)}}},openModal:async(i,n,r,a)=>{const o=await Fa(n,i);G.modalContainer.push(o);const c=q.get(kn),l=q.get(vn),f=q.get(Lt);let g=!1,m,w;const E=new Promise(x=>{m=()=>{g||(g=!0,x(),l.removeLastModalFromStack())},w=async()=>{try{await f.getUnsavedChangesModalPromise(o)}catch{return}m&&m(),i.getConfigValue("routing.showModalPathInUrl")&&l.getModalStackLength()===0&&c.removeModalDataFromUrl(!0)},o.addEventListener($.CLOSE_CURRENT_MODAL_REQUEST,w)}),b={closePromise:E,resolveFn:m,onCloseRequestHandler:w,onInternalClose:()=>{try{f.clearDirtyState(o),b.resolveFn&&b.resolveFn()}catch(x){console.warn("onInternalClose failed",x)}},modalsettings:r};l.registerModal(b),i.getEngine()._connector?.renderModal(o,r,async()=>{try{await f.getUnsavedChangesModalPromise(o)}catch{return}a?.(),m&&m(),i.getConfigValue("routing.showModalPathInUrl")&&l.getModalStackLength()===0&&c.removeModalDataFromUrl(!0)},()=>E);const R=i.getEngine()._connector;n.loadingIndicator?.enabled!==!1&&R?.showLoadingIndicator(o.parentElement)},updateModalSettings:(i,n,r)=>{const a=q.get(vn);if(a.getModalStackLength()===0)return;a.updateFirstModalSettings(i);const o=q.get(kn),c=O.getModalPathFromPath(r);c&&o.updateModalDataInUrl(c,a.getModalSettings(),n),r.getEngine()._connector?.updateModalSettings(a.getModalSettings())},openDrawer:async(i,n,r,a)=>{const o=q.get(Lt);if(G.drawerContainer&&o.shouldShowUnsavedChangesModal(G.drawerContainer))try{await o.getUnsavedChangesModalPromise(G.drawerContainer)}catch{return}const c=await Fa(n,i);G.drawerContainer=c;const l=new Promise(g=>{const m=async()=>{try{await o.getUnsavedChangesModalPromise(c)}catch{return}G.drawerContainer=void 0,o.clearDirtyState(c),g()};c.addEventListener($.CLOSE_CURRENT_MODAL_REQUEST,m)});i.getEngine()._connector?.renderDrawer(c,r,async()=>{try{await o.getUnsavedChangesModalPromise(c)}catch{return}a?.(),G.drawerContainer=void 0,o.clearDirtyState(c)},()=>l);const f=i.getEngine()._connector;n.loadingIndicator?.enabled!==!1&&f?.showLoadingIndicator(c.parentElement)}};class uS{constructor(){this._userInfoStore=ss({}),this._loggedInStore=ss(!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=Qe.getConfigValue("auth.use");if(!n)return Promise.resolve(!0);const r=Qe.getConfigValue(`auth.${n}`),a=fn.parseUrlAuthErrors()||{};if(await fn.handleUrlAuthErrors(r,a.error,a.errorDescription))return this.idpProviderInstance=this.getIdpProviderInstance(n,r),M.isPromise(this.idpProviderInstance)?this.idpProviderInstance.then(c=>(this.idpProviderInstance=c,this.checkAuth(r))).catch(c=>{const l=`Error: ${c.message||c}`;console.error(l,c.message&&c),Qe.setErrorMessage(l)}):this.checkAuth(r)}async checkAuth(n){const r=fn.getStoredAuthData();if(!r||!fn.isLoggedIn()){if(Qe.getConfigValue("auth.disableAutoLogin"))return;let o=!0;return r&&(o=await cr.handleAuthEvent("onAuthExpired",n)),o?this.startAuthorization():void 0}this.idpProviderInstance.settings&&M.isFunction(this.idpProviderInstance.settings.userInfoFn)?this.idpProviderInstance.settings.userInfoFn(this.idpProviderInstance.settings,r).then(o=>{this.setUserInfo(o),this.setLoggedIn(!0)}):M.isFunction(this.idpProviderInstance.userInfo)?this.idpProviderInstance.userInfo(n).then(o=>{this.setUserInfo(o),this.setLoggedIn(!0)}):(this.setLoggedIn(!0),this.setUserInfo(cc(this._userInfoStore))),M.isFunction(Qe.getConfigValue("auth.events.onAuthSuccessful"))&&At.isNewlyAuthorized()&&await cr.handleAuthEvent("onAuthSuccessful",n,r),At.removeNewlyAuthorized(),M.isFunction(this.idpProviderInstance.setTokenExpirationAction)&&this.idpProviderInstance.setTokenExpirationAction(),M.isFunction(this.idpProviderInstance.setTokenExpireSoonAction)&&this.idpProviderInstance.setTokenExpireSoonAction()}async startAuthorization(){if(this.idpProviderInstance)return this.idpProviderInstance.login().then(n=>{At.setNewlyAuthorized(),n&&console.error(n)})}logout(){const n=fn.getStoredAuthData(),r=async c=>{await cr.handleAuthEvent("onLogout",this.idpProviderInstance.settings,void 0,c),At.removeAuthData()},a=Qe.getConfigValue(`auth.${Qe.getConfigValue("auth.use")}.logoutFn`),o=Qe.getConfigValueAsync("navigation.profile.logout.customLogoutFn");M.isFunction(a)?a(this.idpProviderInstance.settings,n,r):M.isFunction(this.idpProviderInstance.logout)?this.idpProviderInstance.logout(n,r):o&&M.isFunction(o)?o(n,r):r(this.idpProviderInstance.settings.logoutUrl)}createIdpProviderException(n){return{message:n,name:"IdpProviderException"}}async getIdpProviderInstance(n,r){const a=M.getConfigValueFromObject(r,"idpProvider");if(a){const c=await new a(r);return["login"].forEach(l=>{if(!M.isFunction(c[l]))throw this.createIdpProviderException(`${l} function does not exist in custom IDP Provider ${n}`)}),c}if(M.isFunction(Qe.getConfigValue("auth.events.onAuthConfigError")))await cr.handleAuthEvent("onAuthConfigError",{idpProviderName:n,type:"IdpProviderException"});else throw this.createIdpProviderException(`IDP Provider ${n} does not exist.`)}unload(){this.idpProviderInstance&&M.isFunction(this.idpProviderInstance.unload)&&this.idpProviderInstance.unload()}resetExpirationChecks(){this.idpProviderInstance&&M.isFunction(this.idpProviderInstance.resetExpirationChecks)&&this.idpProviderInstance.resetExpirationChecks()}broadcastAuthData(n){const a=Qe.getLuigi()?.getEngine()?._connector?.getContainerWrapper();if(a){for(const o of a.childNodes)o.tagName?.startsWith("LUIGI-")&&o.setAttribute("auth-data",JSON.stringify(n));G.modalContainer?.forEach(o=>o.setAttribute("auth-data",JSON.stringify(n))),G.drawerContainer&&G.drawerContainer.setAttribute("auth-data",JSON.stringify(n))}}}const dn=new uS,lS={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"}}},cS=lS;class hS{constructor(n){this.luigi=n,this.currentLocaleStorageKey="luigi.currentLocale",this.defaultLocale="en",this.listeners={},this.translationTable=cS}_init(){this._initCustomImplementation(),this.addCurrentLocaleChangeListener(n=>{this.broadcastLocaleToAllContainers(n)})}getCurrentLocale(){return sessionStorage.getItem(this.currentLocaleStorageKey)||this.defaultLocale}setCurrentLocale(n){n&&(sessionStorage.setItem(this.currentLocaleStorageKey,n),this._notifyLocaleChange(n)),this.luigi.getEngine()._connector?.setCurrentLocale(n)}addCurrentLocaleChangeListener(n){let r=null;return M.isFunction(n)?(r=M.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,a=void 0){if(!n)return"";if(this.translationImpl){const c=this.translationImpl.getTranslation(n,r,a);if(c!==n)return c}const o=this.findTranslation(n,this.translationTable,r);return o||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"),M.isFunction(this.translationImpl)&&(this.translationImpl=this.translationImpl())}broadcastLocaleToAllContainers(n){const r=M.getNodeList("luigi-container[lui_container]");r?.length&&n&&r.forEach(a=>{a.locale=n,a.updateContext({locale:n})})}findTranslation(n,r,a){const o=n.split(".");for(let c=0;c<o.length;c++){const l=o[c];if(Object.prototype.hasOwnProperty.call(r,l)&&typeof r[l]=="object")r=r[l];else return a?this.findInterpolations(r[l],a):r[l]}}findInterpolations(n,r){return typeof n!="string"||!n.trim()||Object.keys(r).forEach(a=>{n=n.replace(new RegExp("{"+os.escapeKeyForRegexp(a)+"}","gi"),r[a])}),n}}const za={getMicrofrontendsInDom(i){return[...this.getMainMicrofrontends(i).map(n=>({container:n.iframe,active:n.active,type:"main",id:n.id})),...this.getModalMicrofrontends().map(n=>({container:n.iframe,active:n.active,type:"modal",id:n.id})),...(()=>{const n=this.getDrawerMicrofrontends();return n.iframe?[{container:n.iframe,active:n.active,type:"drawer",id:n.id}]:[]})()]},getMainMicrofrontends(i){const n=i.getEngine()._connector?.getContainerWrapper();if(!n)return[];const r=[];for(const a of n.childNodes)if(a.tagName?.startsWith("LUIGI-"))if(a.iframeHandle?.iframe)r.push({iframe:a.iframeHandle.iframe,id:a.luigiMfId,active:M.isElementVisible(a)});else{const o=a.shadowRoot?.firstElementChild?.firstElementChild??null;o&&r.push({iframe:o,id:a.luigiMfId,active:M.isElementVisible(a)})}return r},getModalMicrofrontends(){const i=[];for(const n of G.modalContainer)if(n.iframeHandle?.iframe)i.push({iframe:n.iframeHandle.iframe,id:n.luigiMfId,active:M.isElementVisible(n)});else{const r=n.shadowRoot?.firstElementChild?.firstElementChild??null;r&&i.push({iframe:r,id:n.luigiMfId,active:M.isElementVisible(n)})}return i},getDrawerMicrofrontends(){if(!G.drawerContainer)return{};if(G.drawerContainer.iframeHandle?.iframe)return{iframe:G.drawerContainer.iframeHandle.iframe,id:G.drawerContainer.luigiMfId,active:M.isElementVisible(G.drawerContainer)};{const i=G.drawerContainer.shadowRoot?.firstElementChild?.firstElementChild??null;if(i)return{iframe:i,id:G.drawerContainer.luigiMfId,active:M.isElementVisible(G.drawerContainer)}}return{}},getAllLuigiContainerIframe(i){const n=i.getEngine()._connector?.getContainerWrapper();if(!n)return;const r=[...n.children].filter(a=>a.tagName?.indexOf("LUIGI-CONTAINER")===0&&a.iframeHandle?.iframe);for(const a of G.modalContainer)a.iframeHandle?.iframe&&r.push(a);return G.drawerContainer&&G.drawerContainer.iframeHandle?.iframe&&r.push(G.drawerContainer),r.length>0?r:void 0}};class fS{constructor(n){this.luigi=n}getShellbar(){return this.luigi.getEngine()._connector?.getCoreAPISupportedElements().getShellbarElement()||null}getShellbarActions(){return this.luigi.getEngine()._connector?.getCoreAPISupportedElements().getShellbarActions()||null}getLuigiContainer(){return this.luigi.getEngine()._connector?.getCoreAPISupportedElements().getLuigiContainer()||null}getNavFooterContainer(){return this.luigi.getEngine()._connector?.getCoreAPISupportedElements().getNavFooterContainer()||null}getMicrofrontends(){return za.getMicrofrontendsInDom(this.luigi)}getMicrofrontendIframes(){const n=this.luigi.getEngine()._connector?.getContainerWrapper();let r=[];if(G.modalContainer)for(const a of Array.from(G.modalContainer))a.tagName?.startsWith("LUIGI-")&&a.iframeHandle?.iframe&&r.push(a.iframeHandle.iframe);if(G.drawerContainer&&r.push(G.drawerContainer.iframeHandle.iframe),!n)return null;for(const a of Array.from(n.childNodes))a.tagName?.startsWith("LUIGI-")&&a.iframeHandle?.iframe&&r.push(a.iframeHandle.iframe);return r}getCurrentMicrofrontendIframe(){const n=this.luigi.getEngine()._connector?.getContainerWrapper();if(!n)return null;const r=G.modalContainer[0]?.iframeHandle?.iframe??null;let a=null,o=null;for(const c of Array.from(n.children))c.tagName?.startsWith("LUIGI-")&&M.isElementVisible(c)&&(c.iframeHandle?.iframe?a=c.iframeHandle.iframe:o=c.shadowRoot?.firstElementChild?.firstElementChild??null);return r||a||o}}const dS={luigiAfterInit:async i=>{M.getConfigBooleanValue(i.getConfig(),"settings.appLoadingIndicator.hideAutomatically")&&setTimeout(()=>{i.ux().hideAppLoadingIndicator()},0),await Qe.executeConfigFnAsync("lifecycleHooks.luigiAfterInit")}};class gS{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 M.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 pS{constructor(n){this.hashRouting=!1,this.options={fromContext:null,fromClosestContext:!1,fromVirtualTreeRoot:!1,fromParent:!1,nodeParams:{}},this.navigate=async(r,a,o,c,l)=>{const f=r[0]!=="/";this.options.relative=f;const g={modalSettings:o,newTab:!1,options:this.options,path:r,preserveView:a,preventContextUpdate:!1,preventHistoryEntry:!1,withoutSync:!1};return this.navService.handleNavigationRequest(g,void 0)},this.openAsModal=async(r,a,o)=>{if(!a?.keepPrevious&&!await this.modalService.closeModalsWithDirtyCheck())return;const c=r.replace(/\/\/+/g,"/");if(!await Ce.validatePathAndGetRedirect(c,this.luigi))return;const f=await this.navService.getCurrentNode(c),g=a||{};g.title||(g.title=f?.label),this.luigi.getConfigValue("routing.showModalPathInUrl")&&this.modalService.getModalStackLength()===0&&this.routingService.appendModalDataToUrl(c,g),this.luigi.getEngine()._ui.openModal(this.luigi,f,g,o)},this.openAsDrawer=async(r,a,o)=>{const c=r.replace(/\/\/+/g,"/");if(!await Ce.validatePathAndGetRedirect(c,this.luigi))return;const f=await this.navService.getCurrentNode(c),g=a||{};if(!g.header?.title){const w=await O.getNodeLabel(f,this.luigi)||"";g.header?g.header.title=w:g.header={title:w}}g.overlap===void 0&&(g.overlap=!0),this.luigi.getEngine()._ui.openDrawer(this.luigi,f,g,o)},this.runTimeErrorHandler=async r=>{const{path:a}=O.getCurrentPath(this.luigi.getConfig().routing?.useHashRouting),o=await this.navService.getCurrentNode(a),c=this.luigi.getConfigValue("navigation.defaults.runTimeErrorHandler");o?.runTimeErrorHandler?.errorFn&&M.isFunction(o?.runTimeErrorHandler?.errorFn)?o.runTimeErrorHandler.errorFn(r,o):c?.errorFn&&M.isFunction(c.errorFn)&&c.errorFn(r,o)},this.pathExists=async r=>await O.pathExists(r,this.luigi),this.luigi=n,this.hashRouting=n.getConfig().routing?.useHashRouting,this.navService=q.get(Sn),this.routingService=q.get(kn),this.modalService=q.get(vn)}fromVirtualTreeRoot(){return this.options.fromContext=null,this.options.fromClosestContext=!1,this.options.fromVirtualTreeRoot=!0,this.options.fromParent=!1,this}fromContext(n){return this.options.fromContext=n,this}fromClosestContext(){return this.options.fromContext=null,this.options.fromClosestContext=!0,this.options.fromParent=!1,this}fromParent(){return this.options.fromContext=null,this.options.fromClosestContext=!1,this.options.fromVirtualTreeRoot=!1,this.options.fromParent=!0,this}withParams(n){return n&&Object.assign(this.options.nodeParams??{},n),this}}class mS{constructor(n){this.luigi=n}addSearchParams(n,r=!1){if(!M.isObject(n)){console.log("Params argument must be an object");return}const a=new URL(location.href);this.luigi.getConfigValue("routing.useHashRouting")?a.hash=O.addParamsOnHashRouting(n,a.hash):O.modifySearchParams(n,a.searchParams),this.handleBrowserHistory(r,a),this.luigi.configChanged()}getSearchParams(){const n={},r=["__proto__","constructor","prototype"],a=new URL(location.href);let o;if(this.luigi.getConfigValue("routing.useHashRouting")){const c=a.hash.split("?")[1];o=c?new URLSearchParams(c).entries():[]}else o=a.searchParams.entries();for(const[c,l]of o){if(r.some(f=>c===f)){console.warn(`Blocked because of potentially dangerous query param: ${c}`);continue}n[c]=l}return n}handleBrowserHistory(n,r){const a=this.sanitizeUrl(r.href);if(!a){console.warn("invalid url: "+a);return}n?window.history.pushState({},"",a):window.history.replaceState({},"",a)}sanitizeUrl(n){return new URL(location.href).origin===new URL(n).origin?n:void 0}addNodeParams(n,r){if(!M.isObject(n)){console.log("Params argument must be an object");return}const a=O.getContentViewParamPrefix(this.luigi),o=new URL(location.href);this.luigi.getConfigValue("routing.useHashRouting")?o.hash=O.addParamsOnHashRouting(n,o.hash,a):O.modifySearchParams(n,o.searchParams,a),this.handleBrowserHistory(r,o),this.luigi.getConfigValue("routing.useHashRouting")?window.dispatchEvent(new HashChangeEvent("hashchange")):this.luigi.configChanged()}}class _S{#e;#o="";constructor(n){this.#e=n}async getAvailableThemes(){return await this.#e.getConfigValueAsync("settings.theming.themes")}setCurrentTheme(n){this.#o=n,this.#e.__cssVars=void 0}async getThemeObject(n){return(await this.getAvailableThemes())?.find(a=>a.id===n)}getCurrentTheme(){if(!this.isThemingAvailable())return!1;if(this.#o)return this.#o;const n=this.#e.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!!this.#e.getConfigValue("settings.theming")}async getCSSVariables(){if(!window.Luigi.__cssVars){const n=this.#e.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(a=>{const o=getComputedStyle(document.documentElement).getPropertyValue("--"+a);o&&(window.Luigi.__cssVars[a]=o)})}catch(r){M.isFunction(this.#e.getConfigValue("settings.theming.variables.errorHandling"))?this.#e.getConfigValue("settings.theming.variables.errorHandling")(r):console.error("CSS variables file error: ",r)}else this.#e.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=q.get(wr);(()=>{const a=this.#e.getConfigValue("settings.theming");a&&a.nodeViewURLDecorator&&a.nodeViewURLDecorator.queryStringParameter&&n.add({type:"queryString",uid:"theming",key:a.nodeViewURLDecorator.queryStringParameter.keyName,valueFn:()=>{const o=this.getCurrentTheme(),c=a.nodeViewURLDecorator.queryStringParameter.value;return c?c(o):o}}),a&&a.useFioriScrollbars===!0&&document.body.classList.add("fioriScrollbars")})()}}let Zl;const xe={luigi:void 0,documentTitle:void 0,init:i=>{xe.luigi=i,xe.documentTitle=ss(void 0),Zl=q.get(Lt)},processAlert:(i,n,r)=>{if(!xe.luigi)throw new Error("Luigi is not initialized.");const a={openFromClient:n,close:()=>{i.id&&r.notifyAlertClosed(i.id)},link:o=>{if(i.links){const c=i.links[o];if(c&&(c.url&&xe.luigi?.navigation().navigate(c.url),c.dismissKey&&i.id))return r.notifyAlertClosed(i.id,c.dismissKey),!0}return!1}};xe.luigi.getEngine()._connector?.renderAlert(i,a)},handleConfirmationModalRequest:(i,n)=>{if(!xe.luigi)throw new Error("Luigi is not initialized.");i&&(i={...i,header:xe.luigi.i18n().getTranslation(i.header||"luigi.confirmationModal.header"),body:xe.luigi.i18n().getTranslation(i.body||"luigi.confirmationModal.body"),buttonDismiss:xe.luigi.i18n().getTranslation(i.buttonDismiss||"luigi.button.dismiss"),buttonConfirm:xe.luigi.i18n().getTranslation(i.buttonConfirm||"luigi.button.confirm")}),xe.luigi.getEngine()._connector?.renderConfirmationModal(i,{confirm(){n.notifyConfirmationModalClosed(!0)},dismiss(){n.notifyConfirmationModalClosed(!1)}})},handleDirtyStatusRequest:(i,n)=>{if(!xe.luigi)throw new Error("Luigi is not initialized.");Zl.updateDirtyStatus(i,n)}};class vS{processUserSettingGroups(n,r){const a=[],o=n?.userSettingGroups,c=r?.userSettings?.userSettingGroups,l=o||c;if(M.isObject(l)){for(const f in l){const g={};g[f]=l[f],a.push(g)}return a}return a}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 a=0;a<r.length;a++)if(r[a].contentWindow===n)return r[a];return null}}const SS=new vS;class wS{constructor(n){this.dirtyStatusService=q.get(Lt),this.appLoadingIndicatorSelector="[luigi-app-loading-indicator]",this.showAlert=r=>new Promise(a=>{r.id||(r.id=M.getRandomId().toString());const o={openFromClient:!1,close:()=>{a(!0)},link:c=>{if(r.links){const l=r.links[c];if(l&&(l.url&&this.luigi?.navigation().navigate(l.url),l.dismissKey))return a(l.dismissKey),!0}return!1}};this.luigi.getEngine()._connector?.renderAlert(r,o)}),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((a,o)=>{this.luigi.getEngine()._connector?.renderConfirmationModal(r,{confirm(){a(!0)},dismiss(){o()}})})),this.processUserSettingGroups=()=>{const r=this.luigi.getConfigValue("userSettings"),a=this.luigi.getConfigValue("settings");return SS.processUserSettingGroups(r,a)},this.openUserSettings=r=>{this.luigi.getEngine()._connector?.openUserSettings(r)},this.closeUserSettings=()=>{this.luigi.getEngine()._connector?.closeUserSettings()},this.setDocumentTitle=r=>{this.luigi.getEngine()._ux?.documentTitle?.set(r),this.luigi.getEngine()._connector?.setDocumentTitle(r)},this.getDocumentTitle=()=>cc(this.luigi.getEngine()._ux?.documentTitle)||window.document.title||"",this.hideAppLoadingIndicator=()=>{const r=document.querySelector(this.appLoadingIndicatorSelector);r&&(r.classList.add("hidden"),setTimeout(()=>{r.parentNode?.removeChild(r)},500))},this.showLoadingIndicator=r=>this.luigi.getEngine()._connector?.showLoadingIndicator(r),this.hideLoadingIndicator=r=>this.luigi.getEngine()._connector?.hideLoadingIndicator(r),this.addBackdrop=()=>this.luigi.getEngine()._connector?.addBackdrop(),this.removeBackdrop=()=>this.luigi.getEngine()._connector?.removeBackdrop(),this.getDirtyStatus=()=>this.dirtyStatusService.readDirtyStatus(),this.luigi=n}}class ES{filterIdFromMessageObject(n){const{id:r,...a}=n;return{id:r,messageWithoutId:a}}}const jl=new ES;class CS{constructor(n){this.luigi=n}sendToAll(n){const r=za.getAllLuigiContainerIframe(this.luigi);if(!r){console.warn("No Luigi containers found to send the message to.");return}const{id:a,messageWithoutId:o}=jl.filterIdFromMessageObject(n);if(!a){console.warn('Message object must contain an "id" property to specify the message type.');return}for(const c of r)c.sendCustomMessage?c.sendCustomMessage(a,o):console.warn("Container does not support sending custom messages:",c)}send(n,r){const a=za.getAllLuigiContainerIframe(this.luigi);if(!a){console.warn("No Luigi containers found to send the message to.");return}const{id:o,messageWithoutId:c}=jl.filterIdFromMessageObject(r);if(!o){console.warn('Message object must contain an "id" property to specify the message type.');return}for(const l of a)if(l.luigiMfId===n){l.sendCustomMessage?l.sendCustomMessage(o,c):console.warn("Container does not support sending custom messages:",l);return}console.warn(`No container found with microfrontend ID: ${n}`)}}class yS{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()),dn.init().then(()=>{this.engine.init(),this.initialized||(this.initialized=!0,dS.luigiAfterInit(this))})},this.getConfig=()=>this.config,this.configChanged=(...r)=>{this.getEngine()._ui.update(r)},this.customMessages=()=>(this._customMessages||(this._customMessages=new CS(this)),this._customMessages),this.i18n=()=>(this._i18n||(this._i18n=new hS(this)),this._i18n),this.elements=()=>(this._elements||(this._elements=new fS(this)),this._elements),this.navigation=()=>new pS(this),this.ux=()=>new wS(this),this.featureToggles=()=>(this._featureToggles||(this._featureToggles=new gS),this._featureToggles),this.routing=()=>(this._routing||(this._routing=new mS(this)),this._routing),this.theming=()=>(this._theming||(this._theming=new _S(this)),this._theming),this.auth=()=>cr,this._store=this.createConfigStore()}getEngine(){return this.engine}getConfigValue(n){return M.getConfigValueFromObject(this.getConfig(),n)}getConfigValueAsync(n,...r){return Dn.getConfigValueFromObjectAsync(this.getConfig(),n,r)}clearNavigationCache(){q.get(_n).deleteCache();const n=r=>{r&&r.forEach&&r.forEach(a=>{a.titleResolver&&a.titleResolver._cache&&(a.titleResolver._cache=void 0),a.children&&n(a.children)})};n(this.getConfig().navigation.nodes)}async readUserSettings(){const n=await this.getConfigValueAsync("userSettings"),r=n||await this.getConfigValueAsync("settings.userSettings");if(r&&M.isFunction(r.readUserSettings))return r.readUserSettings();const a=localStorage.getItem(this.USER_SETTINGS_KEY);return a&&JSON.parse(a)}async storeUserSettings(n,r){const a=await this.getConfigValueAsync("userSettings"),o=a||await this.getConfigValueAsync("settings.userSettings");if(o&&M.isFunction(o.storeUserSettings))return o.storeUserSettings(n,r);localStorage.setItem(this.USER_SETTINGS_KEY,JSON.stringify(n)),this.configChanged()}reset(){const n=this.getConfig();this.unload(),this.setConfig(n)}unload(){this.initialized=!1,window.Luigi._store.clear(),dn.unload(),qa.removeAllEventListeners(),this.getEngine()._connector?.unload(),this._i18n=void 0}createConfigStore(){const n=ss({}),r={};let a=[];return{subscribe:o=>{a.push(n.subscribe(o))},reset:o=>{n.update(o)},subscribeToScope:(o,c)=>{let l=r[c];l||(l=new Set,r[c]=l),l.add(o)},fire:(o,c)=>{const l=r[o];l&&[...l].forEach(f=>{f(c)})},clear:()=>{a.forEach(o=>{o()}),a=[]}}}getConfigReadyCallback(){return new Promise(n=>{this.i18n()._init(),n()})}setConfigCallback(n){this.configReadyCallback=n}}const Rc=!1;var TS=Array.isArray,bS=Array.prototype.indexOf,Er=Array.prototype.includes,RS=Array.from,AS=Object.defineProperty,Yr=Object.getOwnPropertyDescriptor,PS=Object.prototype,IS=Array.prototype,xS=Object.getPrototypeOf,ec=Object.isExtensible;const LS=()=>{};function NS(i){for(var n=0;n<i.length;n++)i[n]()}function US(){var i,n,r=new Promise((a,o)=>{i=a,n=o});return{promise:r,resolve:i,reject:n}}const He=2,ei=4,Ac=8,Pc=1<<24,Pt=16,wn=32,En=64,Ka=128,_t=512,Oe=1024,Fe=2048,Ht=4096,kt=8192,mn=16384,ri=32768,tc=1<<25,us=65536,ls=1<<17,OS=1<<18,ds=1<<19,$S=1<<20,Wn=65536,cs=1<<21,Jr=1<<22,ti=1<<23,Ha=Symbol("$state"),DS=Symbol("attributes"),MS=Symbol("class"),kS=Symbol("style"),FS=Symbol("text"),ja=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function HS(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function WS(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function VS(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function BS(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function GS(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const ke=Symbol();function QS(){console.warn("https://svelte.dev/e/derived_inert")}function qS(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function zS(i){return i===this.v}let eo=!1,KS=!1;function YS(){eo=!0}let Nt=null;function hs(i){Nt=i}function JS(i,n=!1,r){Nt={p:Nt,i:!1,c:null,e:null,s:i,x:null,r:ge,l:eo&&!n?{s:null,u:null,$:[]}:null}}function XS(i){var n=Nt,r=n.e;if(r!==null){n.e=null;for(var a of r)hw(a)}return n.i=!0,Nt=n.p,{}}function gs(){return!eo||Nt!==null&&Nt.l===null}let hr=[];function ZS(){var i=hr;hr=[],NS(i)}function mr(i){if(hr.length===0){var n=hr;queueMicrotask(()=>{n===hr&&ZS()})}hr.push(i)}function Ic(i){var n=ge;if(n===null)return ue.f|=ti,i;if((n.f&ri)===0&&(n.f&ei)===0)throw i;fr(i,n)}function fr(i,n){for(;n!==null;){if((n.f&Ka)!==0){if((n.f&ri)===0)throw i;try{n.b.error(i);return}catch(r){i=r}}n=n.parent}throw i}const jS=-7169;function ye(i,n){i.f=i.f&jS|n}function to(i){(i.f&_t)!==0||i.deps===null?ye(i,Oe):ye(i,Ht)}function xc(i){if(i!==null)for(const n of i)(n.f&He)===0||(n.f&Wn)===0||(n.f^=Wn,xc(n.deps))}function Lc(i,n,r){(i.f&Fe)!==0?n.add(i):(i.f&Ht)!==0&&r.add(i),xc(i.deps),ye(i,Oe)}let Wa=null,or=null,fe=null,Ya=null,It=null,Ja=null,Va=!1,dr=null,ns=null;var nc=0;let ew=1;class Vn{id=ew++;#e=!1;linked=!0;#o=null;#s=null;async_deriveds=new Map;current=new Map;previous=new Map;unblocked=new Set;#d=new Set;#r=new Set;#a=new Set;#n=0;#t=new Map;#h=null;#i=[];#g=[];#f=new Set;#u=new Set;#l=new Map;#c=new Set;is_fork=!1;#m=!1;#C(){if(this.is_fork)return!0;for(const a of this.#t.keys()){for(var n=a,r=!1;n.parent!==null;){if(this.#l.has(n)){r=!0;break}n=n.parent}if(!r)return!0}return!1}skip_effect(n){this.#l.has(n)||this.#l.set(n,{d:[],m:[]}),this.#c.delete(n)}unskip_effect(n,r=a=>this.schedule(a)){var a=this.#l.get(n);if(a){this.#l.delete(n);for(var o of a.d)ye(o,Fe),r(o);for(o of a.m)ye(o,Ht),r(o)}this.#c.add(n)}#_(){if(this.#e=!0,nc++>1e3&&(this.#w(),tw()),!this.#C()){for(const g of this.#f)this.#u.delete(g),ye(g,Fe),this.schedule(g);for(const g of this.#u)ye(g,Ht),this.schedule(g)}const n=this.#i;this.#i=[],this.apply();var r=dr=[],a=[],o=ns=[];for(const g of n)try{this.#y(g,r,a)}catch(m){throw Oc(g),m}if(fe=null,o.length>0){var c=Vn.ensure();for(const g of o)c.schedule(g)}if(dr=null,ns=null,this.#C()){this.#p(a),this.#p(r);for(const[g,m]of this.#l)Uc(g,m);o.length>0&&fe.#_();return}const l=this.#E();if(l){l.#v(this);return}this.#f.clear(),this.#u.clear();for(const g of this.#d)g(this);this.#d.clear(),Ya=this,rc(a),rc(r),Ya=null,this.#h?.resolve();var f=fe;if(this.linked&&this.#n===0&&this.#w(),this.#i.length>0){f===null&&(f=this,this.#S());const g=f;g.#i.push(...this.#i.filter(m=>!g.#i.includes(m)))}f!==null&&f.#_()}#y(n,r,a){n.f^=Oe;for(var o=n.first;o!==null;){var c=o.f,l=(c&(wn|En))!==0,f=l&&(c&Oe)!==0,g=f||(c&kt)!==0||this.#l.has(o);if(!g&&o.fn!==null){l?o.f^=Oe:(c&ei)!==0?r.push(o):si(o)&&((c&Pt)!==0&&this.#u.add(o),Cr(o));var m=o.first;if(m!==null){o=m;continue}}for(;o!==null;){var w=o.next;if(w!==null){o=w;break}o=o.parent}}}#E(){for(var n=this.#o;n!==null;){if(!n.is_fork){for(const[r,[,a]]of this.current)if(n.current.has(r)&&!a)return n}n=n.#o}return null}#v(n){for(const[a,o]of n.current)!this.previous.has(a)&&n.previous.has(a)&&this.previous.set(a,n.previous.get(a)),this.current.set(a,o);for(const[a,o]of n.async_deriveds){const c=this.async_deriveds.get(a);c&&o.promise.then(c.resolve)}const r=a=>{var o=a.reactions;if(o!==null)for(const f of o){var c=f.f;if((c&He)!==0)r(f);else{var l=f;c&(Jr|Pt)&&!this.async_deriveds.has(l)&&(this.#u.delete(l),ye(l,Fe),this.schedule(l))}}};for(const a of this.current.keys())r(a);this.oncommit(()=>n.discard()),n.#w(),fe=this,this.#_()}#p(n){for(var r=0;r<n.length;r+=1)Lc(n[r],this.#f,this.#u)}capture(n,r,a=!1){n.v!==ke&&!this.previous.has(n)&&this.previous.set(n,n.v),(n.f&ti)===0&&(this.current.set(n,[r,a]),It?.set(n,r)),this.is_fork||(n.v=r)}activate(){fe=this}deactivate(){fe=null,It=null}flush(){try{Va=!0,fe=this,this.#_()}finally{nc=0,Ja=null,dr=null,ns=null,Va=!1,fe=null,It=null,Fn.clear()}}discard(){for(const n of this.#r)n(this);this.#r.clear(),this.#a.clear(),this.#w()}register_created_effect(n){this.#g.push(n)}#T(){this.#w();for(let w=Wa;w!==null;w=w.#s){var n=w.id<this.id,r=[];for(const[y,[E,b]]of this.current){if(w.current.has(y)){var a=w.current.get(y)[0];if(n&&E!==a)w.current.set(y,[E,b]);else continue}r.push(y)}if(n)for(const[y,E]of this.async_deriveds){const b=w.async_deriveds.get(y);b&&E.promise.then(b.resolve)}if(w.#e){var o=[...w.current.keys()].filter(y=>!this.current.has(y));if(o.length===0)n&&w.discard();else if(r.length>0){if(n)for(const y of this.#c)w.unskip_effect(y,E=>{(E.f&(Pt|Jr))!==0?w.schedule(E):w.#p([E])});w.activate();var c=new Set,l=new Map;for(var f of r)Nc(f,o,c,l);l=new Map;var g=[...w.current.keys()].filter(y=>this.current.has(y)?this.current.get(y)[0]!==y.v:!0);if(g.length>0)for(const y of this.#g)(y.f&(mn|kt|ls))===0&&no(y,g,l)&&((y.f&(Jr|Pt))!==0?(ye(y,Fe),w.schedule(y)):w.#f.add(y));if(w.#i.length>0){w.apply();for(var m of w.#i)w.#y(m,[],[]);w.#i=[]}w.deactivate()}}}}increment(n,r){if(this.#n+=1,n){let a=this.#t.get(r)??0;this.#t.set(r,a+1)}}decrement(n,r){if(this.#n-=1,n){let a=this.#t.get(r)??0;a===1?this.#t.delete(r):this.#t.set(r,a-1)}this.#m||(this.#m=!0,mr(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(n,r){for(const a of n)this.#f.add(a);for(const a of r)this.#u.add(a);n.clear(),r.clear()}oncommit(n){this.#d.add(n)}ondiscard(n){this.#r.add(n)}on_fork_commit(n){this.#a.add(n)}run_fork_commit_callbacks(){for(const n of this.#a)n(this);this.#a.clear()}settled(){return(this.#h??=US()).promise}static ensure(){if(fe===null){const n=fe=new Vn;n.#S(),Va||mr(()=>{n.#e||n.flush()})}return fe}apply(){{It=null;return}}schedule(n){if(Ja=n,n.b?.is_pending&&(n.f&(ei|Ac|Pc))!==0&&(n.f&ri)===0){n.b.defer_effect(n);return}for(var r=n;r.parent!==null;){r=r.parent;var a=r.f;if(dr!==null&&r===ge&&(ue===null||(ue.f&He)===0))return;if((a&(En|wn))!==0){if((a&Oe)===0)return;r.f^=Oe}}this.#i.push(r)}#S(){or===null?Wa=or=this:(or.#s=this,this.#o=or),or=this}#w(){var n=this.#o,r=this.#s;n===null?Wa=r:n.#s=r,r===null?or=n:r.#o=n,this.linked=!1}}function tw(){try{HS()}catch(i){fr(i,Ja)}}let Xt=null;function rc(i){var n=i.length;if(n!==0){for(var r=0;r<n;){var a=i[r++];if((a.f&(mn|kt))===0&&si(a)&&(Xt=new Set,Cr(a),a.deps===null&&a.first===null&&a.nodes===null&&a.teardown===null&&a.ac===null&&Qc(a),Xt?.size>0)){Fn.clear();for(const o of Xt){if((o.f&(mn|kt))!==0)continue;const c=[o];let l=o.parent;for(;l!==null;)Xt.has(l)&&(Xt.delete(l),c.push(l)),l=l.parent;for(let f=c.length-1;f>=0;f--){const g=c[f];(g.f&(mn|kt))===0&&Cr(g)}}Xt.clear()}}Xt=null}}function Nc(i,n,r,a){if(!r.has(i)&&(r.add(i),i.reactions!==null))for(const o of i.reactions){const c=o.f;(c&He)!==0?Nc(o,n,r,a):(c&(Jr|Pt))!==0&&(c&Fe)===0&&no(o,n,a)&&(ye(o,Fe),ro(o))}}function no(i,n,r){const a=r.get(i);if(a!==void 0)return a;if(i.deps!==null)for(const o of i.deps){if(Er.call(n,o))return!0;if((o.f&He)!==0&&no(o,n,r))return r.set(o,!0),!0}return r.set(i,!1),!1}function ro(i){fe.schedule(i)}function Uc(i,n){if(!((i.f&wn)!==0&&(i.f&Oe)!==0)){(i.f&Fe)!==0?n.d.push(i):(i.f&Ht)!==0&&n.m.push(i),ye(i,Oe);for(var r=i.first;r!==null;)Uc(r,n),r=r.next}}function Oc(i){ye(i,Oe);for(var n=i.first;n!==null;)Oc(n),n=n.next}function nw(i){let n=0,r=so(0),a;return()=>{ao()&&(gr(r),dw(()=>(n===0&&(a=Ew(()=>i(()=>Xr(r)))),n+=1,()=>{mr(()=>{n-=1,n===0&&(a?.(),a=void 0,Xr(r))})})))}}var rw=us|ds;function iw(i,n,r,a){new sw(i,n,r,a)}class sw{parent;is_pending=!1;transform_error;#e;#o=null;#s;#d;#r;#a=null;#n=null;#t=null;#h=null;#i=0;#g=0;#f=!1;#u=new Set;#l=new Set;#c=null;#m=nw(()=>(this.#c=so(this.#i),()=>{this.#c=null}));constructor(n,r,a,o){this.#e=n,this.#s=r,this.#d=c=>{var l=ge;l.b=this,l.f|=Ka,a(c)},this.parent=ge.b,this.transform_error=o??this.parent?.transform_error??(c=>c),this.#r=gw(()=>{this.#E()},rw)}#C(){try{this.#a=Un(()=>this.#d(this.#e))}catch(n){this.error(n)}}#_(n){const r=this.#s.failed;r&&(this.#t=Un(()=>{r(this.#e,()=>n,()=>()=>{})}))}#y(){const n=this.#s.pending;n&&(this.is_pending=!0,this.#n=Un(()=>n(this.#e)),mr(()=>{var r=this.#h=document.createDocumentFragment(),a=Wc();r.append(a),this.#a=this.#p(()=>Un(()=>this.#d(a))),this.#g===0&&(this.#e.before(r),this.#h=null,rs(this.#n,()=>{this.#n=null}),this.#v(fe))}))}#E(){try{if(this.is_pending=this.has_pending_snippet(),this.#g=0,this.#i=0,this.#a=Un(()=>{this.#d(this.#e)}),this.#g>0){var n=this.#h=document.createDocumentFragment();_w(this.#a,n);const r=this.#s.pending;this.#n=Un(()=>r(this.#e))}else this.#v(fe)}catch(r){this.error(r)}}#v(n){this.is_pending=!1,n.transfer_effects(this.#u,this.#l)}defer_effect(n){Lc(n,this.#u,this.#l)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#s.pending}#p(n){var r=ge,a=ue,o=Nt;Cn(this.#r),Wt(this.#r),hs(this.#r.ctx);try{return Vn.ensure(),n()}catch(c){return Ic(c),null}finally{Cn(r),Wt(a),hs(o)}}#T(n,r){if(!this.has_pending_snippet()){this.parent&&this.parent.#T(n,r);return}this.#g+=n,this.#g===0&&(this.#v(r),this.#n&&rs(this.#n,()=>{this.#n=null}),this.#h&&(this.#e.before(this.#h),this.#h=null))}update_pending_count(n,r){this.#T(n,r),this.#i+=n,!(!this.#c||this.#f)&&(this.#f=!0,mr(()=>{this.#f=!1,this.#c&&kc(this.#c,this.#i)}))}get_effect_pending(){return this.#m(),gr(this.#c)}error(n){if(!this.#s.onerror&&!this.#s.failed)throw n;fe?.is_fork?(this.#a&&fe.skip_effect(this.#a),this.#n&&fe.skip_effect(this.#n),this.#t&&fe.skip_effect(this.#t),fe.on_fork_commit(()=>{this.#S(n)})):this.#S(n)}#S(n){this.#a&&(Ft(this.#a),this.#a=null),this.#n&&(Ft(this.#n),this.#n=null),this.#t&&(Ft(this.#t),this.#t=null);var r=this.#s.onerror;let a=this.#s.failed;var o=!1,c=!1;const l=()=>{if(o){qS();return}o=!0,c&&GS(),this.#t!==null&&rs(this.#t,()=>{this.#t=null}),this.#p(()=>{this.#E()})},f=g=>{try{c=!0,r?.(g,l),c=!1}catch(m){fr(m,this.#r&&this.#r.parent)}a&&(this.#t=this.#p(()=>{try{return Un(()=>{var m=ge;m.b=this,m.f|=Ka,a(this.#e,()=>g,()=>l)})}catch(m){return fr(m,this.#r.parent),null}}))};mr(()=>{var g;try{g=this.transform_error(n)}catch(m){fr(m,this.#r&&this.#r.parent);return}g!==null&&typeof g=="object"&&typeof g.then=="function"?g.then(f,m=>fr(m,this.#r&&this.#r.parent)):f(g)})}}function aw(i){var n=i.effects;if(n!==null){i.effects=null;for(var r=0;r<n.length;r+=1)Ft(n[r])}}function io(i){var n,r=ge,a=i.parent;if(!Bn&&a!==null&&(a.f&(mn|kt))!==0)return QS(),i.v;Cn(a);try{i.f&=~Wn,aw(i),n=Jc(i)}finally{Cn(r)}return n}function $c(i){var n=io(i);if(!i.equals(n)&&(i.wv=Kc(),(!fe?.is_fork||i.deps===null)&&(fe!==null?(fe.capture(i,n,!0),Ya?.capture(i,n,!0)):i.v=n,i.deps===null))){ye(i,Oe);return}Bn||(It!==null?(ao()||fe?.is_fork)&&It.set(i,n):to(i))}function ow(i){if(i.effects!==null)for(const n of i.effects)(n.teardown||n.ac)&&(n.teardown?.(),n.ac?.abort(ja),n.teardown=LS,n.ac=null,ni(n,0),oo(n))}function Dc(i){if(i.effects!==null)for(const n of i.effects)n.teardown&&Cr(n)}let fs=new Set;const Fn=new Map;let Mc=!1;function so(i,n){var r={f:0,v:i,reactions:null,equals:zS,rv:0,wv:0};return r}function cn(i,n){const r=so(i);return vw(r),r}function On(i,n,r=!1){ue!==null&&(!xt||(ue.f&ls)!==0)&&gs()&&(ue.f&(He|Pt|Jr|ls))!==0&&(vt===null||!Er.call(vt,i))&&BS();let a=r?qr(n):n;return kc(i,a,ns)}function kc(i,n,r=null){if(!i.equals(n)){Fn.set(i,Bn?n:i.v);var a=Vn.ensure();if(a.capture(i,n),(i.f&He)!==0){const o=i;(i.f&Fe)!==0&&io(o),It===null&&to(o)}i.wv=Kc(),Fc(i,Fe,r),gs()&&ge!==null&&(ge.f&Oe)!==0&&(ge.f&(wn|En))===0&&(pt===null?Sw([i]):pt.push(i)),!a.is_fork&&fs.size>0&&!Mc&&uw()}return n}function uw(){Mc=!1;for(const i of fs){(i.f&Oe)!==0&&ye(i,Ht);let n;try{n=si(i)}catch{n=!0}n&&Cr(i)}fs.clear()}function Xr(i){On(i,i.v+1)}function Fc(i,n,r){var a=i.reactions;if(a!==null)for(var o=gs(),c=a.length,l=0;l<c;l++){var f=a[l],g=f.f;if(!(!o&&f===ge)){var m=(g&Fe)===0;if(m&&ye(f,n),(g&ls)!==0)fs.add(f);else if((g&He)!==0){var w=f;It?.delete(w),(g&Wn)===0&&(g&_t&&(ge===null||(ge.f&cs)===0)&&(f.f|=Wn),Fc(w,Ht,r))}else if(m){var y=f;(g&Pt)!==0&&Xt!==null&&Xt.add(y),r!==null?r.push(y):ro(y)}}}}function qr(i){if(typeof i!="object"||i===null||Ha in i)return i;const n=xS(i);if(n!==PS&&n!==IS)return i;var r=new Map,a=TS(i),o=cn(0),c=Hn,l=f=>{if(Hn===c)return f();var g=ue,m=Hn;Wt(null),ac(c);var w=f();return Wt(g),ac(m),w};return a&&r.set("length",cn(i.length)),new Proxy(i,{defineProperty(f,g,m){(!("value"in m)||m.configurable===!1||m.enumerable===!1||m.writable===!1)&&WS();var w=r.get(g);return w===void 0?l(()=>{var y=cn(m.value);return r.set(g,y),y}):On(w,m.value,!0),!0},deleteProperty(f,g){var m=r.get(g);if(m===void 0){if(g in f){const w=l(()=>cn(ke));r.set(g,w),Xr(o)}}else On(m,ke),Xr(o);return!0},get(f,g,m){if(g===Ha)return i;var w=r.get(g),y=g in f;if(w===void 0&&(!y||Yr(f,g)?.writable)&&(w=l(()=>{var b=qr(y?f[g]:ke),R=cn(b);return R}),r.set(g,w)),w!==void 0){var E=gr(w);return E===ke?void 0:E}return Reflect.get(f,g,m)},getOwnPropertyDescriptor(f,g){var m=Reflect.getOwnPropertyDescriptor(f,g);if(m&&"value"in m){var w=r.get(g);w&&(m.value=gr(w))}else if(m===void 0){var y=r.get(g),E=y?.v;if(y!==void 0&&E!==ke)return{enumerable:!0,configurable:!0,value:E,writable:!0}}return m},has(f,g){if(g===Ha)return!0;var m=r.get(g),w=m!==void 0&&m.v!==ke||Reflect.has(f,g);if(m!==void 0||ge!==null&&(!w||Yr(f,g)?.writable)){m===void 0&&(m=l(()=>{var E=w?qr(f[g]):ke,b=cn(E);return b}),r.set(g,m));var y=gr(m);if(y===ke)return!1}return w},set(f,g,m,w){var y=r.get(g),E=g in f;if(a&&g==="length")for(var b=m;b<y.v;b+=1){var R=r.get(b+"");R!==void 0?On(R,ke):b in f&&(R=l(()=>cn(ke)),r.set(b+"",R))}if(y===void 0)(!E||Yr(f,g)?.writable)&&(y=l(()=>cn(void 0)),On(y,qr(m)),r.set(g,y));else{E=y.v!==ke;var x=l(()=>qr(m));On(y,x)}var U=Reflect.getOwnPropertyDescriptor(f,g);if(U?.set&&U.set.call(w,m),!E){if(a&&typeof g=="string"){var H=r.get("length"),re=Number(g);Number.isInteger(re)&&re>=H.v&&On(H,re+1)}Xr(o)}return!0},ownKeys(f){gr(o);var g=Reflect.ownKeys(f).filter(y=>{var E=r.get(y);return E===void 0||E.v!==ke});for(var[m,w]of r)w.v!==ke&&!(m in f)&&g.push(m);return g},setPrototypeOf(){VS()}})}var ic,Hc;function lw(){if(ic===void 0){ic=window;var i=Element.prototype,n=Node.prototype,r=Text.prototype;Yr(n,"firstChild").get,Hc=Yr(n,"nextSibling").get,ec(i)&&(i[MS]=void 0,i[DS]=null,i[kS]=void 0,i.__e=void 0),ec(r)&&(r[FS]=void 0)}}function Wc(i=""){return document.createTextNode(i)}function Vc(i){return Hc.call(i)}function Bc(i){var n=ue,r=ge;Wt(null),Cn(null);try{return i()}finally{Wt(n),Cn(r)}}function cw(i,n){var r=n.last;r===null?n.last=n.first=i:(r.next=i,i.prev=r,n.last=i)}function ii(i,n){var r=ge;r!==null&&(r.f&kt)!==0&&(i|=kt);var a={ctx:Nt,deps:null,nodes:null,f:i|Fe|_t,first:null,fn:n,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};fe?.register_created_effect(a);var o=a;if((i&ei)!==0)dr!==null?dr.push(a):Vn.ensure().schedule(a);else if(n!==null){try{Cr(a)}catch(l){throw Ft(a),l}o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&(o.f&ds)===0&&(o=o.first,(i&Pt)!==0&&(i&us)!==0&&o!==null&&(o.f|=us))}if(o!==null&&(o.parent=r,r!==null&&cw(o,r),ue!==null&&(ue.f&He)!==0&&(i&En)===0)){var c=ue;(c.effects??=[]).push(o)}return a}function ao(){return ue!==null&&!xt}function hw(i){return ii(ei|$S,i)}function fw(i){Vn.ensure();const n=ii(En|ds,i);return(r={})=>new Promise(a=>{r.outro?rs(n,()=>{Ft(n),a(void 0)}):(Ft(n),a(void 0))})}function dw(i,n=0){return ii(Ac|n,i)}function gw(i,n=0){var r=ii(Pt|n,i);return r}function Un(i){return ii(wn|ds,i)}function Gc(i){var n=i.teardown;if(n!==null){const r=Bn,a=ue;sc(!0),Wt(null);try{n.call(null)}finally{sc(r),Wt(a)}}}function oo(i,n=!1){var r=i.first;for(i.first=i.last=null;r!==null;){const o=r.ac;o!==null&&Bc(()=>{o.abort(ja)});var a=r.next;(r.f&En)!==0?r.parent=null:Ft(r,n),r=a}}function pw(i){for(var n=i.first;n!==null;){var r=n.next;(n.f&wn)===0&&Ft(n),n=r}}function Ft(i,n=!0){var r=!1;(n||(i.f&OS)!==0)&&i.nodes!==null&&i.nodes.end!==null&&(mw(i.nodes.start,i.nodes.end),r=!0),ye(i,tc),oo(i,n&&!r),ni(i,0);var a=i.nodes&&i.nodes.t;if(a!==null)for(const c of a)c.stop();Gc(i),i.f^=tc,i.f|=mn;var o=i.parent;o!==null&&o.first!==null&&Qc(i),i.next=i.prev=i.teardown=i.ctx=i.deps=i.fn=i.nodes=i.ac=i.b=null}function mw(i,n){for(;i!==null;){var r=i===n?null:Vc(i);i.remove(),i=r}}function Qc(i){var n=i.parent,r=i.prev,a=i.next;r!==null&&(r.next=a),a!==null&&(a.prev=r),n!==null&&(n.first===i&&(n.first=a),n.last===i&&(n.last=r))}function rs(i,n,r=!0){var a=[];qc(i,a,!0);var o=()=>{r&&Ft(i),n&&n()},c=a.length;if(c>0){var l=()=>--c||o();for(var f of a)f.out(l)}else o()}function qc(i,n,r){if((i.f&kt)===0){i.f^=kt;var a=i.nodes&&i.nodes.t;if(a!==null)for(const f of a)(f.is_global||r)&&n.push(f);for(var o=i.first;o!==null;){var c=o.next;if((o.f&En)===0){var l=(o.f&us)!==0||(o.f&wn)!==0&&(i.f&Pt)!==0;qc(o,n,l?r:!1)}o=c}}}function _w(i,n){if(i.nodes)for(var r=i.nodes.start,a=i.nodes.end;r!==null;){var o=r===a?null:Vc(r);n.append(r),r=o}}let is=!1,Bn=!1;function sc(i){Bn=i}let ue=null,xt=!1;function Wt(i){ue=i}let ge=null;function Cn(i){ge=i}let vt=null;function vw(i){ue!==null&&(vt===null?vt=[i]:vt.push(i))}let Xe=null,at=0,pt=null;function Sw(i){pt=i}let zc=1,$n=0,Hn=$n;function ac(i){Hn=i}function Kc(){return++zc}function si(i){var n=i.f;if((n&Fe)!==0)return!0;if(n&He&&(i.f&=~Wn),(n&Ht)!==0){for(var r=i.deps,a=r.length,o=0;o<a;o++){var c=r[o];if(si(c)&&$c(c),c.wv>i.wv)return!0}(n&_t)!==0&&It===null&&ye(i,Oe)}return!1}function Yc(i,n,r=!0){var a=i.reactions;if(a!==null&&!(vt!==null&&Er.call(vt,i)))for(var o=0;o<a.length;o++){var c=a[o];(c.f&He)!==0?Yc(c,n,!1):n===c&&(r?ye(c,Fe):(c.f&Oe)!==0&&ye(c,Ht),ro(c))}}function Jc(i){var n=Xe,r=at,a=pt,o=ue,c=vt,l=Nt,f=xt,g=Hn,m=i.f;Xe=null,at=0,pt=null,ue=(m&(wn|En))===0?i:null,vt=null,hs(i.ctx),xt=!1,Hn=++$n,i.ac!==null&&(Bc(()=>{i.ac.abort(ja)}),i.ac=null);try{i.f|=cs;var w=i.fn,y=w();i.f|=ri;var E=i.deps,b=fe?.is_fork;if(Xe!==null){var R;if(b||ni(i,at),E!==null&&at>0)for(E.length=at+Xe.length,R=0;R<Xe.length;R++)E[at+R]=Xe[R];else i.deps=E=Xe;if(ao()&&(i.f&_t)!==0)for(R=at;R<E.length;R++)(E[R].reactions??=[]).push(i)}else!b&&E!==null&&at<E.length&&(ni(i,at),E.length=at);if(gs()&&pt!==null&&!xt&&E!==null&&(i.f&(He|Ht|Fe))===0)for(R=0;R<pt.length;R++)Yc(pt[R],i);if(o!==null&&o!==i){if($n++,o.deps!==null)for(let x=0;x<r;x+=1)o.deps[x].rv=$n;if(n!==null)for(const x of n)x.rv=$n;pt!==null&&(a===null?a=pt:a.push(...pt))}return(i.f&ti)!==0&&(i.f^=ti),y}catch(x){return Ic(x)}finally{i.f^=cs,Xe=n,at=r,pt=a,ue=o,vt=c,hs(l),xt=f,Hn=g}}function ww(i,n){let r=n.reactions;if(r!==null){var a=bS.call(r,i);if(a!==-1){var o=r.length-1;o===0?r=n.reactions=null:(r[a]=r[o],r.pop())}}if(r===null&&(n.f&He)!==0&&(Xe===null||!Er.call(Xe,n))){var c=n;(c.f&_t)!==0&&(c.f^=_t,c.f&=~Wn),c.v!==ke&&to(c),ow(c),ni(c,0)}}function ni(i,n){var r=i.deps;if(r!==null)for(var a=n;a<r.length;a++)ww(i,r[a])}function Cr(i){var n=i.f;if((n&mn)===0){ye(i,Oe);var r=ge,a=is;ge=i,is=!0;try{(n&(Pt|Pc))!==0?pw(i):oo(i),Gc(i);var o=Jc(i);i.teardown=typeof o=="function"?o:null,i.wv=zc;var c;Rc&&KS&&(i.f&Fe)!==0&&i.deps}finally{is=a,ge=r}}}function gr(i){var n=i.f,r=(n&He)!==0;if(ue!==null&&!xt){var a=ge!==null&&(ge.f&mn)!==0;if(!a&&(vt===null||!Er.call(vt,i))){var o=ue.deps;if((ue.f&cs)!==0)i.rv<$n&&(i.rv=$n,Xe===null&&o!==null&&o[at]===i?at++:Xe===null?Xe=[i]:Xe.push(i));else{(ue.deps??=[]).push(i);var c=i.reactions;c===null?i.reactions=[ue]:Er.call(c,ue)||c.push(ue)}}}if(Bn&&Fn.has(i))return Fn.get(i);if(r){var l=i;if(Bn){var f=l.v;return((l.f&Oe)===0&&l.reactions!==null||Zc(l))&&(f=io(l)),Fn.set(l,f),f}var g=(l.f&_t)===0&&!xt&&ue!==null&&(is||(ue.f&_t)!==0),m=(l.f&ri)===0;si(l)&&(g&&(l.f|=_t),$c(l)),g&&!m&&(Dc(l),Xc(l))}if(It?.has(i))return It.get(i);if((i.f&ti)!==0)throw i.v;return i.v}function Xc(i){if(i.f|=_t,i.deps!==null)for(const n of i.deps)(n.reactions??=[]).push(i),(n.f&He)!==0&&(n.f&_t)===0&&(Dc(n),Xc(n))}function Zc(i){if(i.v===ke)return!0;if(i.deps===null)return!1;for(const n of i.deps)if(Fn.has(n)||(n.f&He)!==0&&Zc(n))return!0;return!1}function Ew(i){var n=xt;try{return xt=!0,i()}finally{xt=n}}const Cw=["touchstart","touchmove"];function yw(i){return Cw.includes(i)}const ji=Symbol("events"),Tw=new Set,oc=new Set;let uc=null;function lc(i){var n=this,r=n.ownerDocument,a=i.type,o=i.composedPath?.()||[],c=o[0]||i.target;uc=i;var l=0,f=uc===i&&i[ji];if(f){var g=o.indexOf(f);if(g!==-1&&(n===document||n===window)){i[ji]=n;return}var m=o.indexOf(n);if(m===-1)return;g<=m&&(l=g)}if(c=o[l]||i.target,c!==n){AS(i,"currentTarget",{configurable:!0,get(){return c||r}});var w=ue,y=ge;Wt(null),Cn(null);try{for(var E,b=[];c!==null;){var R=c.assignedSlot||c.parentNode||c.host||null;try{var x=c[ji]?.[a];x!=null&&(!c.disabled||i.target===c)&&x.call(c,i)}catch(U){E?b.push(U):E=U}if(i.cancelBubble||R===n||R===null)break;c=R}if(E){for(let U of b)queueMicrotask(()=>{throw U});throw E}}finally{i[ji]=n,delete i.currentTarget,Wt(w),Cn(y)}}}function bw(i,n){return Rw(i,n)}const es=new Map;function Rw(i,{target:n,anchor:r,props:a={},events:o,context:c,intro:l=!0,transformError:f}){lw();var g=void 0,m=fw(()=>{var w=r??n.appendChild(Wc());iw(w,{pending:()=>{}},b=>{JS({});var R=Nt;c&&(R.c=c),o&&(a.$$events=o),g=i(b,a)||{},XS()},f);var y=new Set,E=b=>{for(var R=0;R<b.length;R++){var x=b[R];if(!y.has(x)){y.add(x);var U=yw(x);for(const we of[n,document]){var H=es.get(we);H===void 0&&(H=new Map,es.set(we,H));var re=H.get(x);re===void 0?(we.addEventListener(x,lc,{passive:U}),H.set(x,1)):H.set(x,re+1)}}}};return E(RS(Tw)),oc.add(E),()=>{for(var b of y)for(const U of[n,document]){var R=es.get(U),x=R.get(b);--x==0?(U.removeEventListener(b,lc),R.delete(b),R.size===0&&es.delete(U)):R.set(b,x)}oc.delete(E),w!==r&&w.parentNode?.removeChild(w)}});return Aw.set(g,m),g}let Aw=new WeakMap;const Pw="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Pw);YS();function Iw(i){}const Xa={init:i=>{q.get(kn).enableRouting()},handlePageErrorHandler:(i,n,r)=>{i&&i.timeout&&setTimeout(()=>{if(i.viewUrl)n.viewUrl=i.viewUrl,r.getEngine()._ui.updateMainContent(n,r);else if(i.errorFn)i.errorFn(n);else{console.warn("Something went wrong with a client! You will be redirected to another page.");const a=i.redirectPath||"/";r.navigation().navigate(a)}},i.timeout)},handleExternalLinkNavigation:i=>{if(i.url)if(i.sameWindow||!1)window.location.href=i.url;else{const r=window.open(i.url,"_blank","noopener noreferrer");r&&(r.opener=null,r.focus())}},async addSearchParamsFromClient(i,n,r){const a=q.get(Sn),o=O.getCurrentPath(r.getConfig().routing?.useHashRouting),l=(await a.getCurrentNode(o.path))?.clientPermissions?.urlParameters,f={...i};if(l){const g={};Object.keys(l).forEach(m=>{m in f&&l[m]?.write===!0&&(g[m]=f[m],delete f[m])});for(const m in f)console.warn(`No permission to add the search param "${m}" to the url`);Object.keys(g).length>0&&r.routing().addSearchParams(g,n)}}};class xw{static hasLocaleChangePermission(n){return n?.clientPermissions?.changeCurrentLocale?!0:(console.error('Current locale change declined from client, as client permission "changeCurrentLocale" is not set for this view.'),!1)}}const Mt={luigi:{},init:i=>{Mt.luigi=i},addListeners:(i,n)=>{i.addEventListener($.INITIALIZED,r=>{xe.luigi?.ux().hideLoadingIndicator(i.parentNode);const a=q.get(Sr);a.viewGroupLoaded(i),!i._luigiPreloading&&i.style.display!=="none"&&a.preload()}),i.addEventListener($.NAVIGATION_COMPLETED_REPORT,()=>{q.get(Sr).preload()}),i.addEventListener($.NAVIGATION_REQUEST,r=>{const{drawer:a,link:o,preserveView:c,modal:l,newTab:f,withoutSync:g,preventContextUpdate:m,preventHistoryEntry:w,fromVirtualTreeRoot:y,fromContext:E,fromClosestContext:b,fromParent:R,relative:x,nodeParams:U}=r.detail,H={drawerSettings:a,modalSettings:l,newTab:f,path:o,preserveView:c,preventContextUpdate:m,options:{fromVirtualTreeRoot:y,fromContext:E,fromClosestContext:b,fromParent:R,relative:x,nodeParams:U},preventHistoryEntry:w,withoutSync:g};q.get(Sn).handleNavigationRequest(H,r.callbackFn)}),i.addEventListener($.RUNTIME_ERROR_HANDLING_REQUEST,r=>{n.navigation().runTimeErrorHandler(r.payload?.data?.errorObj||{})}),i.addEventListener($.ALERT_REQUEST,r=>{xe.processAlert(r.payload,!0,i)}),i.addEventListener($.SHOW_CONFIRMATION_MODAL_REQUEST,r=>{xe.handleConfirmationModalRequest(r.payload,i)}),i.addEventListener($.SET_DOCUMENT_TITLE_REQUEST,r=>{Mt.luigi.getEngine()._connector?.setDocumentTitle(r.detail.title)}),i.addEventListener($.SHOW_LOADING_INDICATOR_REQUEST,r=>{Mt.luigi.getEngine()._connector?.showLoadingIndicator(i.parentNode)}),i.addEventListener($.HIDE_LOADING_INDICATOR_REQUEST,r=>{Mt.luigi.getEngine()._connector?.hideLoadingIndicator(i.parentNode)}),i.addEventListener($.ADD_BACKDROP_REQUEST,r=>{Mt.luigi.getEngine()._connector?.addBackdrop()}),i.addEventListener($.REMOVE_BACKDROP_REQUEST,r=>{Mt.luigi.getEngine()._connector?.removeBackdrop()}),i.addEventListener($.SET_DIRTY_STATUS_REQUEST,r=>{xe.handleDirtyStatusRequest(r.detail?.data?.dirty,i)}),i.addEventListener($.ADD_NODE_PARAMS_REQUEST,r=>{n.routing().addNodeParams(r.payload.data,r.payload.keepBrowserHistory)}),i.addEventListener($.OPEN_USER_SETTINGS_REQUEST,r=>{Mt.luigi.getEngine()._connector?.openUserSettings(r.detail)}),i.addEventListener($.CLOSE_USER_SETTINGS_REQUEST,r=>{Mt.luigi.getEngine()._connector?.closeUserSettings()}),i.addEventListener($.ADD_SEARCH_PARAMS_REQUEST,r=>{Xa.addSearchParamsFromClient(r.detail.data,r.detail.keepBrowserHistory,n)}),i.addEventListener($.UPDATE_MODAL_SETTINGS_REQUEST,r=>{G.updateModalSettings(r.payload.updatedModalSettings,r.payload.addHistoryEntry,n)}),i.addEventListener($.SET_CURRENT_LOCALE_REQUEST,r=>{xw.hasLocaleChangePermission(i)&&n.i18n().setCurrentLocale(r.detail?.data?.data?.currentLocale)})}};class Lw{constructor(){this._ui=G,this._comm=Mt,this._ux=xe,this._routing=Xa}bootstrap(n){this._app=bw(Iw,{target:document.body}),this._connector=n}init(){const n=window.Luigi;q.register(Lt,()=>new Lt(n)),q.register(Sn,()=>new Sn(n)),q.register(_n,()=>new _n),q.register(kn,()=>new kn(n)),q.register(wr,()=>new wr),q.register(vn,()=>new vn(n)),q.register(Sr,()=>new Sr(n)),n.theming()._init(),G.init(n),Xa.init(n),Mt.init(n),xe.init(n)}}window.Luigi=new yS(new Lw);
|
|
54
|
+
Please refer to documentation`),[y]}}buildVirtualViewUrl(t,r,a){let o="";for(const l in r)l.startsWith("virtualSegment")&&(o+=":"+l+"/");if(!a)return t;o+=":virtualSegment_"+a+"/";let c=t;t.includes("{virtualTreePath}")?c=t.replace("{virtualTreePath}",o):c=t+"/"+o;try{if(new URL(c,"http://dummy-base").origin===new URL(t,"http://dummy-base").origin)return c}catch(l){console.error("Error building virtual view URL -- make sure virtualTreePath is not part of origin.",l)}return t}async buildPath(t,r){const{fromVirtualTreeRoot:a,fromContext:o,fromClosestContext:c,fromParent:l,relative:f,nodeParams:d}=r,m=this.luigi.getConfigValue("routing.useHashRouting"),{path:S,query:y}=U.getCurrentPath(m),E=S+(y?"?"+y:""),T=await this.getPathData(E),R=T.nodesInPath;let x=t;if(R===void 0)return console.warn("No nodes in path found for current path:",E),x;if(a){x="";const $=[...R].map((W,Z)=>W.virtualTree?Z:-1).filter(W=>W!==-1).pop();R.forEach((W,Z)=>{W.pathSegment&&($===void 0||Z<=$)&&(x+="/"+W.pathSegment)}),x+="/"+t}else if(o){const $=o,W=[...R].reverse().find(Z=>$===Z.navigationContext);x=U.concatenatePath(U.getSubPath(W,T.pathParams),t)}else if(c){const $=[...R].reverse().find(W=>W.navigationContext&&W.navigationContext.length>0);x=U.concatenatePath(U.getSubPath($,T.pathParams),t)}else l?x=U.concatenatePath(U.getSubPath(T.selectedNode?.parent,T.pathParams),t):f&&(x=U.concatenatePath(U.getSubPath(T.selectedNode,T.pathParams),t));return d&&Object.keys(d).length>0&&(x+=x.includes("?")?"&":"?",Object.entries(d).forEach(($,W)=>{x+=encodeURIComponent(U.getContentViewParamPrefix(this.luigi)+$[0])+"="+encodeURIComponent($[1])+(W<Object.keys(d).length-1?"&":"")})),x}}class wr{constructor(t){this.luigi=t,this.preloadBatchSize=1,this.shouldPreload=!1}preloadViewGroups(t=3,r){const a=this.luigi.getConfigValue("navigation.preloadViewGroups"),o=this.luigi.getConfigValue("navigation.viewGroupSettings"),c=this.luigi.getEngine()._connector?.getContainerWrapper();if(a===!1||!o||!c)return;const l=Date.now();if(this.getPreloadingContainers(c).filter(S=>l-(S._luigiPreloadCreatedAt||0)<3e4).length>0){console.log("skipping view group preloading (busy)");return}const d=[...c.childNodes].filter(S=>S.tagName?.startsWith("LUIGI-")&&S.viewGroup).map(S=>S.viewGroup),m=Object.entries(o).filter(([S])=>!d.includes(S)).filter(([S,y])=>y&&y.preloadUrl);r?m.forEach(([S,y])=>{y.loadOnStartup&&this.preloadContainerOnBackground(y,S,c)}):m.filter((S,y)=>y<t).forEach(([S,y])=>{this.preloadContainerOnBackground(y,S,c)})}preloadContainerOnBackground(t,r,a){const o=document.createElement("luigi-container");o.setAttribute("lui_container","true"),o.viewurl=t.preloadUrl,o.viewGroup=r,o.style.display="none",o._luigiPreloading=!0,o._luigiPreloadCreatedAt=Date.now(),o.luigiMfId=D.getRandomId(),this.luigi.getEngine()._comm.addListeners(o,this.luigi),a.appendChild(o)}preload(t){this.shouldPreload&&setTimeout(()=>{this.preloadViewGroups(this.preloadBatchSize,!!t)},t?1:0),this.shouldPreload=!0}viewGroupLoaded(t){if(t._luigiPreloading){const r=Date.now()-(t._luigiPreloadCreatedAt||0);let a=1;r<500?a=3:r<1e3&&(a=2),this.preloadBatchSize=a,setTimeout(()=>{t._luigiPreloading=!1},this.preloadBatchSize>2?500:1e3)}}getPreloadingContainers(t){return[...t.childNodes].filter(r=>r.tagName?.startsWith("LUIGI-")&&r._luigiPreloading)}}const qa={listeners:[],hashChangeWithoutSync:!1,addEventListener(i,t){this.listeners.push({type:i,listenerFn:t}),window.addEventListener(i,t)},removeEventListener(i,t){this.listeners=this.listeners.filter(r=>!(r.type===i&&r.listenerFn===t)),window.removeEventListener(i,t)},removeAllEventListeners(){this.listeners.forEach(i=>{window.removeEventListener(i.type,i.listenerFn)}),this.listeners=[]}};class kn{constructor(t){this.luigi=t}getNavigationService(){return this.navigationService||(this.navigationService=q.get(wn),this.dirtyStatusService=q.get(Lt)),this.navigationService}shouldSkipRoutingForUrlPatterns(){const t=[/access_token=/,/id_token=/];return(this.luigi.getConfigValue("routing.skipRoutingForUrlPatterns")||t).filter(a=>location.href.match(a)).length!==0}enableRouting(){this.luigi.getConfig().routing?.useHashRouting?(qa.addEventListener("hashchange",r=>{const a=!!r?.detail?.preventContextUpdate,o=!!r?.detail?.withoutSync;this.handleRouteChange(U.getCurrentPath(!0),o,a)}),this.handleRouteChange(U.getCurrentPath(!0))):(qa.addEventListener("popstate",r=>{const a=!!r?.detail?.preventContextUpdate,o=!!r?.detail?.withoutSync;this.handleRouteChange(U.getCurrentPath(),o,a)}),this.handleRouteChange(U.getCurrentPath()))}async handleRouteChange(t,r=!1,a=!1){const o=t.path,c=t.query,l=o+(c?"?"+c:""),f=new URLSearchParams(c),d=Object.create(null);try{if(this.dirtyStatusService?.shouldShowUnsavedChangesModal()){const x=window.location.href,$=this.dirtyStatusService.unsavedChanges.persistUrl;$&&history.pushState(window.state,"",$)}}catch{return}if(this.shouldSkipRoutingForUrlPatterns())return;this.setFeatureToggle(l),await this.shouldShowModalPathInUrl(t),f.forEach((x,$)=>{d[$]=x}),this.checkInvalidateCache(this.previousPathData,o);const m=await this.getNavigationService().getPathData(o),S=U.filterNodeParams(d,this.luigi),y=D.getPathWithoutHash(o)||"";this.currentRoute={raw:window.location.href,path:o,nodeParams:S};const E=m?.selectedNode??await this.getNavigationService().getCurrentNode(o),T=E?.viewUrl||"";if(E&&this.previousPathData&&await this.handleViewUrlMisconfigured(E,T,this.previousPathData,y)||await this.handlePageNotFound(E,T,m,o,y))return;const R=this.luigi.getEngine()._connector;if(R?.renderTopNav(await this.getNavigationService().getTopNavData(o,m)),R?.renderLeftNav(await this.getNavigationService().getLeftNavData(o,m)),R?.renderTabNav(await this.getNavigationService().getTabNavData(o,m)),R?.renderBreadcrumbs(await this.getNavigationService().getBreadcrumbData(o,m,x=>{R?.renderBreadcrumbs(x)})),E){const x={nodeParams:S||{},pathParams:m?.pathParams||{},searchParams:U.prepareSearchParamsForClient(E,this.luigi)};this.currentRoute.node=E,this.getNavigationService().onNodeChange(this.previousNode,E),this.previousNode=E,await G.updateMainContent(E,this.luigi,x,r,a),this.previousPathData=m}}getCurrentRoute(){return this.currentRoute}async shouldShowModalPathInUrl(t){this.luigi.getConfigValue("routing.showModalPathInUrl")&&await this.handleBookmarkableModalPath(t)}async handleBookmarkableModalPath(t){const r=q.get(wn),a=q.get(vn),o=new URLSearchParams(t?.query||""),c=U.getModalViewParamName(this.luigi),l=o.get(c);if(l){const f=o.get(`${c}Params`);try{const d=JSON.parse(f||"{}"),{nodeObject:m}=await r.extractDataFromPath(l);document.querySelector(".lui-modal luigi-container")?this.luigi.getEngine()._connector?.updateModalSettings(d):this.luigi.navigation().openAsModal(l,d||m.openNodeInModal)}catch(d){console.error("Error parsing modal settings from URL parameters",d)}}else return await a.closeModalsWithDirtyCheck(),void 0}appendModalDataToUrl(t,r){const a=U.getHashQueryParamSeparator(),o=U.getQueryParams(this.luigi),c=U.getModalViewParamName(this.luigi),l=o[c],f=new URL(location.href),d=this.luigi.getConfigValue("routing.useHashRouting");let m=history.state,S,y;if(d){let[E,T]=f.hash.split("?");S=E,y=U.getURLWithoutModalData(T,c),y&&(S+="?"+y)}else S=f.pathname,y=U.getURLWithoutModalData(f.search,c),y&&(S+="?"+U.getURLWithoutModalData(f.search,c));if(m=U.handleHistoryState(m,S),l!==t){if(o[c]=t,r&&Object.keys(r).length&&(o[`${c}Params`]=JSON.stringify(r)),d){const E=location.hash.indexOf(a);E!==-1&&(f.hash=f.hash.slice(0,E)),f.hash=`${f.hash}${a}${U.encodeParams(o)}`}else f.search=`?${U.encodeParams(o)}`;history.pushState(m,"",f.href)}else{const E=new URL(f);if(d){let T=E.hash.split("?")[0];E.hash=T,y&&(E.hash+="?"+y)}else E.search=y;history.replaceState({},"",E.href),history.pushState(m,"",f.href)}}removeModalDataFromUrl(t){const r=U.getQueryParams(this.luigi),a=U.getModalViewParamName(this.luigi);let o=new URL(location.href);if(this.luigi.getConfigValue("routing.useHashRouting")){let l={};r[a]&&(l[a]=r[a]),r[`${a}Params`]&&(l[`${a}Params`]=r[`${a}Params`]);let f=U.encodeParams(l);o.hash.includes(`?${f}`)?o.hash=o.hash.replace(`?${f}`,""):o.hash.includes(`&${f}`)&&(o.hash=o.hash.replace(`&${f}`,""))}else{let l=new URLSearchParams(o.search.slice(1));l.delete(a),l.delete(`${a}Params`);let f="";Array.from(l.keys()).forEach(d=>{f+=(f===""?"?":"&")+d+"="+l.get(d)}),o.search=f}if(history.state&&history.state.modalHistoryLength>=0&&t){history.state.modalHistoryLength;const l=history.state.pathBeforeHistory;let f=!1;if(window.addEventListener("popstate",d=>{f?(history.replaceState({},"",l),history.pushState({},"",l),history.back()):(history.pushState({},"",l),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 d=history.length-1;f=!0,history.go(-d),window.Luigi.preventLoadingModalData=!0}else{const d=history.state.modalHistoryLength;history.go(-d)}}else history.pushState({},"",o.href)}setFeatureToggle(t){const r=this.luigi.getConfigValue("settings.featureToggles.queryStringParam"),a=this.luigi.featureToggles();r&&typeof t=="string"&&U.setFeatureToggles(r,t,a)}updateModalDataInUrl(t,r,a){let o=U.getHashQueryParamSeparator();const c=U.getQueryParams(this.luigi),l=U.getModalViewParamName(this.luigi);c[l]=t,r&&Object.keys(r).length&&(c[`${l}Params`]=JSON.stringify(r));const f=new URL(location.href);if(this.luigi.getConfigValue("routing.useHashRouting")){const m=location.hash.indexOf(o);m!==-1&&(f.hash=f.hash.slice(0,m)),f.hash=`${f.hash}${o}${U.encodeParams(c)}`}else f.search=`?${U.encodeParams(c)}`;a?history.pushState(window.state,"",f.href):history.replaceState(window.state,"",f.href)}checkInvalidateCache(t,r){if(!t)return;const a=q.get(_n);let o=r.split("/");if(t.nodesInPath&&t.nodesInPath.length>0){let c=t.nodesInPath.slice(1),l=!0;for(let f=0;f<c.length;f++){let d=o.length>f?o[f]:void 0,m=c[f];if(d!==m.pathSegment||!l)if(U.isDynamicNode(m)){if(!l||d!==U.getDynamicNodeValue(m,t.pathParams)){a.deleteNodesRecursively(m);break}}else l=!1}}else a.deleteCache()}async handlePageNotFound(t,r,a,o,c){const l=D.getTrimmedUrl(o),f=U.isExistingRoute(l,a);if(!r&&!t?.compound||t?.tabNav?.showAsTabHeader){const d=await U.getDefaultChildNode(a,async(m,S)=>await this.getNavigationService().getChildren(m,S));if(f){const m=D.getTrimmedUrl(o);return this.getNavigationService().handleNavigationRequest({path:`${m?`/${m}`:""}/${d}`,preserveView:void 0,modalSettings:void 0,newTab:!1,withoutSync:!1,preventContextUpdate:!1,preventHistoryEntry:!0}),!1}else{if(d&&a?.nodesInPath&&a.nodesInPath.length>1)return this.showPageNotFoundError(D.trimTrailingSlash(l||"")+"/"+d,c,!0),!0;const m=await U.getDefaultChildNode(a);this.showPageNotFoundError(m,c,!1)}return!0}return f?!1:(this.showPageNotFoundError(a.matchedPath,c,!0),!0)}async showPageNotFoundError(t,r,a=!1){const o=U.getPageNotFoundRedirectResult(r,a,this.luigi);if(o.ignoreLuigiErrorHandling)return;const c=o.path;if(c){if(o.keepURL){const l=this.luigi.getConfig().routing?.useHashRouting,f=U.getCurrentPath(l);f.path=c,this.handleRouteChange(f)}else this.getNavigationService().handleNavigationRequest({path:c});return}U.showRouteNotFoundAlert(r,a,this.luigi),this.getNavigationService().handleNavigationRequest({path:D.addLeadingSlash(t)})}async handleViewUrlMisconfigured(t,r,a,o){const{children:c,intendToHaveEmptyViewUrl:l,compound:f}=t,d=!!c?.length;if(!f&&r.trim()===""&&!d&&!l){if(console.warn("The intended target route can't be accessed since it has neither a viewUrl nor children. This is most likely a misconfiguration."),!(a&&(a.selectedNode?.viewUrl||a.selectedNode&&a.selectedNode.compound))){const m=await this.getNavigationService().getPathData("/"),S=await U.getDefaultChildNode(m);this.showPageNotFoundError(S,o,!1),this.getNavigationService().handleNavigationRequest({path:S})}return!0}return!1}}class Sr{constructor(){this.decorators=[]}hasDecorators(){return this.decorators.length>0}add(t){this.decorators=this.decorators.filter(r=>r.uid!==t.uid).concat(t)}applyDecorators(t,r){if(!t)return t;const a=new URL(D.prependOrigin(t)),o=this.decorators.filter(c=>c.type==="queryString");for(let c=0;c<o.length;c++){const l=o[c];a.searchParams.has(l.key)&&a.searchParams.delete(l.key);const f=l.valueFn();a.searchParams.append(l.key,f)}return r&&(a.search=decodeURIComponent(a.search)),a.href}}const Fa=async(i,t,r)=>{const a=await t.readUserSettings(),c=i.userSettingsGroup&&typeof a=="object"&&a!==null&&i.userSettingsGroup?a[i.userSettingsGroup]:null,l=r?.nodeParams||{},f=r?.pathParams||{},d=r?.searchParams||{};if(i.webcomponent&&i.viewUrl&&!U.checkWCUrl(i.viewUrl,t))return console.warn(`View URL '${i.viewUrl}' not allowed to be included`),document.createElement("div");if(i.compound){const m=document.createElement("luigi-compound-container");return m.setAttribute("lui_container","true"),m.viewurl=i.viewUrl?q.get(Sr).applyDecorators(U.substituteViewUrl(i,f,l,t),i.decodeViewUrl??!1):"",m.webcomponent=i.webcomponent??!1,m.compoundConfig=i.compound,m.context=i.context,m.clientPermissions=i.clientPermissions??{},m.nodeParams=l,m.pathParams=f,m.userSettingsGroup=i.userSettingsGroup,m.userSettings=c,m.searchParams=d,m.activeFeatureToggleList=t.featureToggles().getActiveFeatureToggleList(),m.locale=t.i18n().getCurrentLocale(),m.theme=t.theming().getCurrentTheme(),m.viewGroup=i.viewGroup,m.virtualTree=i.virtualTree||i._virtualTree,m.virtualTreeRootNode=Ce.findVirtualTreeRootNode(i),t.getEngine()._comm.addListeners(m,t),m}else{const m=document.createElement("luigi-container");return m.setAttribute("lui_container","true"),m.viewurl=i.viewUrl?q.get(Sr).applyDecorators(U.substituteViewUrl(i,f,l,t),i.decodeViewUrl??!1):"",m.webcomponent=i.webcomponent??!1,m.context=i.context,m.authData=fn.getStoredAuthData(),m.clientPermissions=i.clientPermissions??{},m.cssVariables=await t.theming().getCSSVariables(),m.nodeParams=l,m.pathParams=f,m.userSettingsGroup=i.userSettingsGroup,m.userSettings=c,m.searchParams=d,m.activeFeatureToggleList=t.featureToggles().getActiveFeatureToggleList(),m.locale=t.i18n().getCurrentLocale(),m.theme=t.theming().getCurrentTheme(),m.viewGroup=i.viewGroup,m.virtualTree=i.virtualTree||i._virtualTree,m.virtualTreeRootNode=Ce.findVirtualTreeRootNode(i),Tc(m,t),bc(m,t),t.getEngine()._comm.addListeners(m,t),m.luigiMfId=D.getRandomId(),m}},Tc=(i,t)=>{const r=t.getConfigValue("settings.customSandboxRules");if(!r?.length)return;const a=["allow-forms","allow-modals","allow-popups","allow-popups-to-escape-sandbox","allow-same-origin","allow-scripts"],o=r?[...new Set([...a,...r])]:a;i.sandboxRules=o},bc=(i,t)=>{const r=t.getConfigValue("settings.allowRules");r?.length&&(r.forEach((a,o)=>{r[o]=a+(a.indexOf(";")!=-1?"":";")}),i.allowRules=r)},G={navService:void 0,routingService:void 0,luigi:void 0,modalContainer:[],drawerContainer:void 0,init:i=>{G.navService=q.get(wn),G.routingService=q.get(kn),G.luigi=i,i.getEngine()._connector?.renderMainLayout();const t=q.get(wr);t.shouldPreload=!0,t.preload(!0),t.shouldPreload=!1},update:async i=>{const t=G.routingService.getCurrentRoute();if(!t)return;const r=!i||i.length===0;if((r||i.includes("settings.header")||i.includes("settings")||i.includes("navigation")||i.includes("navigation.profile")||i.includes("navigation.contextSwitcher")||i.includes("navigation.productSwitcher"))&&G.luigi.getEngine()._connector?.renderTopNav(await G.navService.getTopNavData(t.path)),r||i.includes("navigation")||i.includes("navigation.nodes")||i.includes("navigation.viewgroupdata")||i.includes("settings")||i.includes("settings.footer")){q.get(_n).deleteCache(),G.luigi.getEngine()._connector?.renderLeftNav(await G.navService.getLeftNavData(t.path)),G.luigi.getEngine()._connector?.renderTabNav(await G.navService.getTabNavData(t.path));const a=G.luigi.getEngine()._connector;a?.renderBreadcrumbs(await G.navService.getBreadcrumbData(t.path,void 0,o=>{a?.renderBreadcrumbs(o)}))}(r||i.includes("navigation")||i.includes("navigation.nodes")||i.includes("navigation.viewgroupdata")||i.includes("settings.theming"))&&(q.get(_n).deleteCache(),t.node&&G.updateMainContent(t.node,G.luigi))},updateMainContent:async(i,t,r,a,o)=>{const c=await t.readUserSettings(),f=i.userSettingsGroup&&typeof c=="object"&&c!==null&&i.userSettingsGroup?c[i.userSettingsGroup]:null,d=t.getEngine()._connector?.getContainerWrapper();t.getEngine()._connector?.hideLoadingIndicator(d);const m=r?.nodeParams||{},S=r?.pathParams||{},y=r?.searchParams||{};if(i&&d){let E,T;if((i.virtualTree||i._virtualTree)&&(T=Ce.findVirtualTreeRootNode(i)),[...d.childNodes].forEach(R=>{if(R.tagName?.indexOf("LUIGI-")===0)if(R.viewGroup&&i.viewGroup!==R.viewGroup){R.style.display="none";const x=t.getConfigValue("navigation.viewGroupSettings")?.[R.viewGroup];x?.preloadUrl&&(R.viewurl=x.preloadUrl,R.context={},R.nodeParams={},R.pathParams={})}else R.viewGroup||R.virtualTree&&T===R.virtualTreeRootNode?E=R:R.remove()}),E&&E._luigiPreloading&&(E._luigiPreloading=!1,q.get(wr).viewGroupLoaded(E)),E)a||(E.style.display="block",E.viewurl=i.viewUrl?q.get(Sr).applyDecorators(U.substituteViewUrl(i,S,m,t),i.decodeViewUrl??!1):"",E.nodeParams=m,E.pathParams=S,E.clientPermissions=i.clientPermissions,E.searchParams=y,E.locale=t.i18n().getCurrentLocale(),E.theme=t.theming().getCurrentTheme(),E.activeFeatureToggleList=t.featureToggles().getActiveFeatureToggleList(),E.userSettingsGroup=i.userSettingsGroup,E.userSettings=f,Tc(E,t),bc(E,t)),o||E.updateContext(i.context||{});else{const R=await Fa(i,t,r);d?.appendChild(R);const x=t.getEngine()._connector;i.loadingIndicator?.enabled!==!1&&x?.showLoadingIndicator(d)}}},openModal:async(i,t,r,a)=>{const o=await Fa(t,i);G.modalContainer.push(o);const c=q.get(kn),l=q.get(vn),f=q.get(Lt);let d=!1,m,S;const E=new Promise(x=>{m=()=>{d||(d=!0,x(),l.removeLastModalFromStack())},S=async()=>{try{await f.getUnsavedChangesModalPromise(o)}catch{return}m&&m(),i.getConfigValue("routing.showModalPathInUrl")&&l.getModalStackLength()===0&&c.removeModalDataFromUrl(!0)},o.addEventListener(O.CLOSE_CURRENT_MODAL_REQUEST,S)}),T={closePromise:E,resolveFn:m,onCloseRequestHandler:S,onInternalClose:()=>{try{f.clearDirtyState(o),T.resolveFn&&T.resolveFn()}catch(x){console.warn("onInternalClose failed",x)}},modalsettings:r};l.registerModal(T),i.getEngine()._connector?.renderModal(o,r,async()=>{try{await f.getUnsavedChangesModalPromise(o)}catch{return}a?.(),m&&m(),i.getConfigValue("routing.showModalPathInUrl")&&l.getModalStackLength()===0&&c.removeModalDataFromUrl(!0)},()=>E);const R=i.getEngine()._connector;t.loadingIndicator?.enabled!==!1&&R?.showLoadingIndicator(o.parentElement)},updateModalSettings:(i,t,r)=>{const a=q.get(vn);if(a.getModalStackLength()===0)return;a.updateFirstModalSettings(i);const o=q.get(kn),c=U.getModalPathFromPath(r);c&&o.updateModalDataInUrl(c,a.getModalSettings(),t),r.getEngine()._connector?.updateModalSettings(a.getModalSettings())},openDrawer:async(i,t,r,a)=>{const o=q.get(Lt);if(G.drawerContainer&&o.shouldShowUnsavedChangesModal(G.drawerContainer))try{await o.getUnsavedChangesModalPromise(G.drawerContainer)}catch{return}const c=await Fa(t,i);G.drawerContainer=c;const l=new Promise(d=>{const m=async()=>{try{await o.getUnsavedChangesModalPromise(c)}catch{return}G.drawerContainer=void 0,o.clearDirtyState(c),d()};c.addEventListener(O.CLOSE_CURRENT_MODAL_REQUEST,m)});i.getEngine()._connector?.renderDrawer(c,r,async()=>{try{await o.getUnsavedChangesModalPromise(c)}catch{return}a?.(),G.drawerContainer=void 0,o.clearDirtyState(c)},()=>l);const f=i.getEngine()._connector;t.loadingIndicator?.enabled!==!1&&f?.showLoadingIndicator(c.parentElement)}};class uw{constructor(){this._userInfoStore=ss({}),this._loggedInStore=ss(!1)}setUserInfo(t){this._userInfoStore.set(t)}setLoggedIn(t){this._loggedInStore.set(t)}getUserInfoStore(){return this._userInfoStore}getLoggedInStore(){return this._loggedInStore}async init(){const t=qe.getConfigValue("auth.use");if(!t)return Promise.resolve(!0);const r=qe.getConfigValue(`auth.${t}`),a=fn.parseUrlAuthErrors()||{};if(await fn.handleUrlAuthErrors(r,a.error,a.errorDescription))return this.idpProviderInstance=this.getIdpProviderInstance(t,r),D.isPromise(this.idpProviderInstance)?this.idpProviderInstance.then(c=>(this.idpProviderInstance=c,this.checkAuth(r))).catch(c=>{const l=`Error: ${c.message||c}`;console.error(l,c.message&&c),qe.setErrorMessage(l)}):this.checkAuth(r)}async checkAuth(t){const r=fn.getStoredAuthData();if(!r||!fn.isLoggedIn()){if(qe.getConfigValue("auth.disableAutoLogin"))return;let o=!0;return r&&(o=await cr.handleAuthEvent("onAuthExpired",t)),o?this.startAuthorization():void 0}this.idpProviderInstance.settings&&D.isFunction(this.idpProviderInstance.settings.userInfoFn)?this.idpProviderInstance.settings.userInfoFn(this.idpProviderInstance.settings,r).then(o=>{this.setUserInfo(o),this.setLoggedIn(!0)}):D.isFunction(this.idpProviderInstance.userInfo)?this.idpProviderInstance.userInfo(t).then(o=>{this.setUserInfo(o),this.setLoggedIn(!0)}):(this.setLoggedIn(!0),this.setUserInfo(cc(this._userInfoStore))),D.isFunction(qe.getConfigValue("auth.events.onAuthSuccessful"))&&At.isNewlyAuthorized()&&await cr.handleAuthEvent("onAuthSuccessful",t,r),At.removeNewlyAuthorized(),D.isFunction(this.idpProviderInstance.setTokenExpirationAction)&&this.idpProviderInstance.setTokenExpirationAction(),D.isFunction(this.idpProviderInstance.setTokenExpireSoonAction)&&this.idpProviderInstance.setTokenExpireSoonAction()}async startAuthorization(){if(this.idpProviderInstance)return this.idpProviderInstance.login().then(t=>{At.setNewlyAuthorized(),t&&console.error(t)})}logout(){const t=fn.getStoredAuthData(),r=async c=>{await cr.handleAuthEvent("onLogout",this.idpProviderInstance.settings,void 0,c),At.removeAuthData()},a=qe.getConfigValue(`auth.${qe.getConfigValue("auth.use")}.logoutFn`),o=qe.getConfigValueAsync("navigation.profile.logout.customLogoutFn");D.isFunction(a)?a(this.idpProviderInstance.settings,t,r):D.isFunction(this.idpProviderInstance.logout)?this.idpProviderInstance.logout(t,r):o&&D.isFunction(o)?o(t,r):r(this.idpProviderInstance.settings.logoutUrl)}createIdpProviderException(t){return{message:t,name:"IdpProviderException"}}async getIdpProviderInstance(t,r){const a=D.getConfigValueFromObject(r,"idpProvider");if(a){const c=await new a(r);return["login"].forEach(l=>{if(!D.isFunction(c[l]))throw this.createIdpProviderException(`${l} function does not exist in custom IDP Provider ${t}`)}),c}if(D.isFunction(qe.getConfigValue("auth.events.onAuthConfigError")))await cr.handleAuthEvent("onAuthConfigError",{idpProviderName:t,type:"IdpProviderException"});else throw this.createIdpProviderException(`IDP Provider ${t} does not exist.`)}unload(){this.idpProviderInstance&&D.isFunction(this.idpProviderInstance.unload)&&this.idpProviderInstance.unload()}resetExpirationChecks(){this.idpProviderInstance&&D.isFunction(this.idpProviderInstance.resetExpirationChecks)&&this.idpProviderInstance.resetExpirationChecks()}broadcastAuthData(t){const a=qe.getLuigi()?.getEngine()?._connector?.getContainerWrapper();if(a){for(const o of a.childNodes)o.tagName?.startsWith("LUIGI-")&&o.setAttribute("auth-data",JSON.stringify(t));G.modalContainer?.forEach(o=>o.setAttribute("auth-data",JSON.stringify(t))),G.drawerContainer&&G.drawerContainer.setAttribute("auth-data",JSON.stringify(t))}}}const dn=new uw,lw={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"}}},cw=lw;class hw{constructor(t){this.luigi=t,this.currentLocaleStorageKey="luigi.currentLocale",this.defaultLocale="en",this.listeners={},this.translationTable=cw}_init(){this._initCustomImplementation(),this.addCurrentLocaleChangeListener(t=>{this.broadcastLocaleToAllContainers(t)})}getCurrentLocale(){return sessionStorage.getItem(this.currentLocaleStorageKey)||this.defaultLocale}setCurrentLocale(t){t&&(sessionStorage.setItem(this.currentLocaleStorageKey,t),this._notifyLocaleChange(t)),this.luigi.getEngine()._connector?.setCurrentLocale(t)}addCurrentLocaleChangeListener(t){let r=null;return D.isFunction(t)?(r=D.getRandomId(),this.listeners[r]=t):console.error("Provided locale change listener is not a function."),r}removeCurrentLocaleChangeListener(t){t&&this.listeners[t]?delete this.listeners[t]:console.error("Unable to remove locale change listener - no listener registered for given ID.")}getTranslation(t,r=void 0,a=void 0){if(!t)return"";if(this.translationImpl){const c=this.translationImpl.getTranslation(t,r,a);if(c!==t)return c}const o=this.findTranslation(t,this.translationTable,r);return o||t}_notifyLocaleChange(t){Object.getOwnPropertyNames(this.listeners).forEach(r=>{this.listeners[Number(r)](t)}),this.luigi.configChanged()}_initCustomImplementation(){this.translationImpl=this.luigi.getConfigValue("settings.customTranslationImplementation"),D.isFunction(this.translationImpl)&&(this.translationImpl=this.translationImpl())}broadcastLocaleToAllContainers(t){const r=D.getNodeList("luigi-container[lui_container]");r?.length&&t&&r.forEach(a=>{a.locale=t,a.updateContext({locale:t})})}findTranslation(t,r,a){const o=t.split(".");for(let c=0;c<o.length;c++){const l=o[c];if(Object.prototype.hasOwnProperty.call(r,l)&&typeof r[l]=="object")r=r[l];else return a?this.findInterpolations(r[l],a):r[l]}}findInterpolations(t,r){return typeof t!="string"||!t.trim()||Object.keys(r).forEach(a=>{t=t.replace(new RegExp("{"+os.escapeKeyForRegexp(a)+"}","gi"),r[a])}),t}}const za={getMicrofrontendsInDom(i){return[...this.getMainMicrofrontends(i).map(t=>({container:t.iframe,active:t.active,type:"main",id:t.id})),...this.getModalMicrofrontends().map(t=>({container:t.iframe,active:t.active,type:"modal",id:t.id})),...(()=>{const t=this.getDrawerMicrofrontends();return t.iframe?[{container:t.iframe,active:t.active,type:"drawer",id:t.id}]:[]})()]},getMainMicrofrontends(i){const t=i.getEngine()._connector?.getContainerWrapper();if(!t)return[];const r=[];for(const a of t.childNodes)if(a.tagName?.startsWith("LUIGI-"))if(a.iframeHandle?.iframe)r.push({iframe:a.iframeHandle.iframe,id:a.luigiMfId,active:D.isElementVisible(a)});else{const o=a.shadowRoot?.firstElementChild?.firstElementChild??null;o&&r.push({iframe:o,id:a.luigiMfId,active:D.isElementVisible(a)})}return r},getModalMicrofrontends(){const i=[];for(const t of G.modalContainer)if(t.iframeHandle?.iframe)i.push({iframe:t.iframeHandle.iframe,id:t.luigiMfId,active:D.isElementVisible(t)});else{const r=t.shadowRoot?.firstElementChild?.firstElementChild??null;r&&i.push({iframe:r,id:t.luigiMfId,active:D.isElementVisible(t)})}return i},getDrawerMicrofrontends(){if(!G.drawerContainer)return{};if(G.drawerContainer.iframeHandle?.iframe)return{iframe:G.drawerContainer.iframeHandle.iframe,id:G.drawerContainer.luigiMfId,active:D.isElementVisible(G.drawerContainer)};{const i=G.drawerContainer.shadowRoot?.firstElementChild?.firstElementChild??null;if(i)return{iframe:i,id:G.drawerContainer.luigiMfId,active:D.isElementVisible(G.drawerContainer)}}return{}},getAllLuigiContainerIframe(i){const t=i.getEngine()._connector?.getContainerWrapper();if(!t)return;const r=[...t.children].filter(a=>a.tagName?.indexOf("LUIGI-CONTAINER")===0&&a.iframeHandle?.iframe);for(const a of G.modalContainer)a.iframeHandle?.iframe&&r.push(a);return G.drawerContainer&&G.drawerContainer.iframeHandle?.iframe&&r.push(G.drawerContainer),r.length>0?r:void 0}};class fw{constructor(t){this.luigi=t}getShellbar(){return this.luigi.getEngine()._connector?.getCoreAPISupportedElements().getShellbarElement()||null}getShellbarActions(){return this.luigi.getEngine()._connector?.getCoreAPISupportedElements().getShellbarActions()||null}getLuigiContainer(){return this.luigi.getEngine()._connector?.getCoreAPISupportedElements().getLuigiContainer()||null}getNavFooterContainer(){return this.luigi.getEngine()._connector?.getCoreAPISupportedElements().getNavFooterContainer()||null}getMicrofrontends(){return za.getMicrofrontendsInDom(this.luigi)}getMicrofrontendIframes(){const t=this.luigi.getEngine()._connector?.getContainerWrapper();let r=[];if(G.modalContainer)for(const a of Array.from(G.modalContainer))a.tagName?.startsWith("LUIGI-")&&a.iframeHandle?.iframe&&r.push(a.iframeHandle.iframe);if(G.drawerContainer&&r.push(G.drawerContainer.iframeHandle.iframe),!t)return null;for(const a of Array.from(t.childNodes))a.tagName?.startsWith("LUIGI-")&&a.iframeHandle?.iframe&&r.push(a.iframeHandle.iframe);return r}getCurrentMicrofrontendIframe(){const t=this.luigi.getEngine()._connector?.getContainerWrapper();if(!t)return null;const r=G.modalContainer[0]?.iframeHandle?.iframe??null;let a=null,o=null;for(const c of Array.from(t.children))c.tagName?.startsWith("LUIGI-")&&D.isElementVisible(c)&&(c.iframeHandle?.iframe?a=c.iframeHandle.iframe:o=c.shadowRoot?.firstElementChild?.firstElementChild??null);return r||a||o}}const dw={luigiAfterInit:async i=>{D.getConfigBooleanValue(i.getConfig(),"settings.appLoadingIndicator.hideAutomatically")&&setTimeout(()=>{i.ux().hideAppLoadingIndicator()},0),await qe.executeConfigFnAsync("lifecycleHooks.luigiAfterInit")}};class gw{constructor(){this.featureToggleList=new Set}setFeatureToggle(t,r=!1){this.isValid(t)&&(t.startsWith("!")&&!r||this.isDuplicatedOrDisabled(t)||this.featureToggleList.add(t))}unsetFeatureToggle(t){if(this.isValid(t)){if(!this.featureToggleList.has(t)){console.warn("Feature toggle name is not in the list.");return}this.featureToggleList.delete(t)}}getActiveFeatureToggleList(){return[...Array.from(this.featureToggleList)].filter(r=>!r.startsWith("!"))}isValid(t){return D.isString(t)?!0:(console.warn("Feature toggle name is not valid or not of type 'string'"),!1)}isDuplicatedOrDisabled(t){return this.featureToggleList.has(t)?(console.warn("Feature toggle name already exists"),!0):this.featureToggleList.has(`!${t}`)?(console.warn("Disabled feature toggle can not be activated"),!0):!1}}class pw{constructor(t){this.hashRouting=!1,this.options={fromContext:null,fromClosestContext:!1,fromVirtualTreeRoot:!1,fromParent:!1,nodeParams:{}},this.navigate=async(r,a,o,c,l)=>{const f=r[0]!=="/";this.options.relative=f;const d={modalSettings:o,newTab:!1,options:this.options,path:r,preserveView:a,preventContextUpdate:!1,preventHistoryEntry:!1,withoutSync:!1};return this.navService.handleNavigationRequest(d,void 0)},this.openAsModal=async(r,a,o)=>{if(!a?.keepPrevious&&!await this.modalService.closeModalsWithDirtyCheck())return;const c=r.replace(/\/\/+/g,"/");if(!await Ce.validatePathAndGetRedirect(c,this.luigi))return;const f=await this.navService.getCurrentNode(c),d=a||{};d.title||(d.title=f?.label),this.luigi.getConfigValue("routing.showModalPathInUrl")&&this.modalService.getModalStackLength()===0&&this.routingService.appendModalDataToUrl(c,d),this.luigi.getEngine()._ui.openModal(this.luigi,f,d,o)},this.openAsDrawer=async(r,a,o)=>{const c=r.replace(/\/\/+/g,"/");if(!await Ce.validatePathAndGetRedirect(c,this.luigi))return;const f=await this.navService.getCurrentNode(c),d=a||{};if(!d.header?.title){const S=await U.getNodeLabel(f,this.luigi)||"";d.header?d.header.title=S:d.header={title:S}}d.overlap===void 0&&(d.overlap=!0),this.luigi.getEngine()._ui.openDrawer(this.luigi,f,d,o)},this.runTimeErrorHandler=async r=>{const{path:a}=U.getCurrentPath(this.luigi.getConfig().routing?.useHashRouting),o=await this.navService.getCurrentNode(a),c=this.luigi.getConfigValue("navigation.defaults.runTimeErrorHandler");o?.runTimeErrorHandler?.errorFn&&D.isFunction(o?.runTimeErrorHandler?.errorFn)?o.runTimeErrorHandler.errorFn(r,o):c?.errorFn&&D.isFunction(c.errorFn)&&c.errorFn(r,o)},this.pathExists=async r=>await U.pathExists(r,this.luigi),this.luigi=t,this.hashRouting=t.getConfig().routing?.useHashRouting,this.navService=q.get(wn),this.routingService=q.get(kn),this.modalService=q.get(vn)}fromVirtualTreeRoot(){return this.options.fromContext=null,this.options.fromClosestContext=!1,this.options.fromVirtualTreeRoot=!0,this.options.fromParent=!1,this}fromContext(t){return this.options.fromContext=t,this}fromClosestContext(){return this.options.fromContext=null,this.options.fromClosestContext=!0,this.options.fromParent=!1,this}fromParent(){return this.options.fromContext=null,this.options.fromClosestContext=!1,this.options.fromVirtualTreeRoot=!1,this.options.fromParent=!0,this}withParams(t){return t&&Object.assign(this.options.nodeParams??{},t),this}}class mw{constructor(t){this.luigi=t}addSearchParams(t,r=!1){if(!D.isObject(t)){console.log("Params argument must be an object");return}const a=new URL(location.href);this.luigi.getConfigValue("routing.useHashRouting")?a.hash=U.addParamsOnHashRouting(t,a.hash):U.modifySearchParams(t,a.searchParams),this.handleBrowserHistory(r,a),this.luigi.configChanged()}getSearchParams(){const t={},r=["__proto__","constructor","prototype"],a=new URL(location.href);let o;if(this.luigi.getConfigValue("routing.useHashRouting")){const c=a.hash.split("?")[1];o=c?new URLSearchParams(c).entries():[]}else o=a.searchParams.entries();for(const[c,l]of o){if(r.some(f=>c===f)){console.warn(`Blocked because of potentially dangerous query param: ${c}`);continue}t[c]=l}return t}handleBrowserHistory(t,r){const a=this.sanitizeUrl(r.href);if(!a){console.warn("invalid url: "+a);return}t?window.history.pushState({},"",a):window.history.replaceState({},"",a)}sanitizeUrl(t){return new URL(location.href).origin===new URL(t).origin?t:void 0}addNodeParams(t,r){if(!D.isObject(t)){console.log("Params argument must be an object");return}const a=U.getContentViewParamPrefix(this.luigi),o=new URL(location.href);this.luigi.getConfigValue("routing.useHashRouting")?o.hash=U.addParamsOnHashRouting(t,o.hash,a):U.modifySearchParams(t,o.searchParams,a),this.handleBrowserHistory(r,o),this.luigi.getConfigValue("routing.useHashRouting")?window.dispatchEvent(new HashChangeEvent("hashchange")):this.luigi.configChanged()}}class _w{#e;#o="";constructor(t){this.#e=t}async getAvailableThemes(){return await this.#e.getConfigValueAsync("settings.theming.themes")}setCurrentTheme(t){this.#o=t,this.#e.__cssVars=void 0}async getThemeObject(t){return(await this.getAvailableThemes())?.find(a=>a.id===t)}getCurrentTheme(){if(!this.isThemingAvailable())return!1;if(this.#o)return this.#o;const t=this.#e.getConfigValue("settings.theming");return t.defaultTheme||console.error("[Theming] getCurrentTheme() error. No theme set and no defaultTheme found in configuration",t),t.defaultTheme}isThemingAvailable(){return!!this.#e.getConfigValue("settings.theming")}async getCSSVariables(){if(!window.Luigi.__cssVars){const t=this.#e.getConfigValue("settings.theming.variables.file");if(t)try{const r=await fetch(t);window.Luigi.__cssVars=(await r.json()).root,Object.keys(window.Luigi.__cssVars).forEach(a=>{const o=getComputedStyle(document.documentElement).getPropertyValue("--"+a);o&&(window.Luigi.__cssVars[a]=o)})}catch(r){D.isFunction(this.#e.getConfigValue("settings.theming.variables.errorHandling"))?this.#e.getConfigValue("settings.theming.variables.errorHandling")(r):console.error("CSS variables file error: ",r)}else this.#e.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 t=q.get(Sr);(()=>{const a=this.#e.getConfigValue("settings.theming");a&&a.nodeViewURLDecorator&&a.nodeViewURLDecorator.queryStringParameter&&t.add({type:"queryString",uid:"theming",key:a.nodeViewURLDecorator.queryStringParameter.keyName,valueFn:()=>{const o=this.getCurrentTheme(),c=a.nodeViewURLDecorator.queryStringParameter.value;return c?c(o):o}}),a&&a.useFioriScrollbars===!0&&document.body.classList.add("fioriScrollbars")})()}}let Zl;const Ne={luigi:void 0,documentTitle:void 0,init:i=>{Ne.luigi=i,Ne.documentTitle=ss(void 0),Zl=q.get(Lt)},processAlert:(i,t,r)=>{if(!Ne.luigi)throw new Error("Luigi is not initialized.");const a={openFromClient:t,close:()=>{i.id&&r.notifyAlertClosed(i.id)},link:o=>{if(i.links){const c=i.links[o];if(c&&(c.url&&Ne.luigi?.navigation().navigate(c.url),c.dismissKey&&i.id))return r.notifyAlertClosed(i.id,c.dismissKey),!0}return!1}};Ne.luigi.getEngine()._connector?.renderAlert(i,a)},handleConfirmationModalRequest:(i,t)=>{if(!Ne.luigi)throw new Error("Luigi is not initialized.");i&&(i={...i,header:Ne.luigi.i18n().getTranslation(i.header||"luigi.confirmationModal.header"),body:Ne.luigi.i18n().getTranslation(i.body||"luigi.confirmationModal.body"),buttonDismiss:Ne.luigi.i18n().getTranslation(i.buttonDismiss||"luigi.button.dismiss"),buttonConfirm:Ne.luigi.i18n().getTranslation(i.buttonConfirm||"luigi.button.confirm")}),Ne.luigi.getEngine()._connector?.renderConfirmationModal(i,{confirm(){t.notifyConfirmationModalClosed(!0)},dismiss(){t.notifyConfirmationModalClosed(!1)}})},handleDirtyStatusRequest:(i,t)=>{if(!Ne.luigi)throw new Error("Luigi is not initialized.");Zl.updateDirtyStatus(i,t)}};class vw{processUserSettingGroups(t,r){const a=[],o=t?.userSettingGroups,c=r?.userSettings?.userSettingGroups,l=o||c;if(D.isObject(l)){for(const f in l){const d={};d[f]=l[f],a.push(d)}return a}return a}getUserSettingsIframesInDom(){const t=document.querySelector(".iframeUserSettingsCtn");return t?[...t.children]:[]}hideUserSettingsIframe(){this.getUserSettingsIframesInDom().forEach(t=>{t.style.display="none"})}findActiveCustomUserSettingsIframe(t){const r=document.querySelectorAll("[userSettingsGroup]");for(let a=0;a<r.length;a++)if(r[a].contentWindow===t)return r[a];return null}}const ww=new vw;class Sw{constructor(t){this.dirtyStatusService=q.get(Lt),this.appLoadingIndicatorSelector="[luigi-app-loading-indicator]",this.showAlert=r=>new Promise(a=>{r.id||(r.id=D.getRandomId().toString());const o={openFromClient:!1,close:()=>{a(!0)},link:c=>{if(r.links){const l=r.links[c];if(l&&(l.url&&this.luigi?.navigation().navigate(l.url),l.dismissKey))return a(l.dismissKey),!0}return!1}};this.luigi.getEngine()._connector?.renderAlert(r,o)}),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((a,o)=>{this.luigi.getEngine()._connector?.renderConfirmationModal(r,{confirm(){a(!0)},dismiss(){o()}})})),this.processUserSettingGroups=()=>{const r=this.luigi.getConfigValue("userSettings"),a=this.luigi.getConfigValue("settings");return ww.processUserSettingGroups(r,a)},this.openUserSettings=r=>{this.luigi.getEngine()._connector?.openUserSettings(r)},this.closeUserSettings=()=>{this.luigi.getEngine()._connector?.closeUserSettings()},this.setDocumentTitle=r=>{this.luigi.getEngine()._ux?.documentTitle?.set(r),this.luigi.getEngine()._connector?.setDocumentTitle(r)},this.getDocumentTitle=()=>cc(this.luigi.getEngine()._ux?.documentTitle)||window.document.title||"",this.hideAppLoadingIndicator=()=>{const r=document.querySelector(this.appLoadingIndicatorSelector);r&&(r.classList.add("hidden"),setTimeout(()=>{r.parentNode?.removeChild(r)},500))},this.showLoadingIndicator=r=>this.luigi.getEngine()._connector?.showLoadingIndicator(r),this.hideLoadingIndicator=r=>this.luigi.getEngine()._connector?.hideLoadingIndicator(r),this.addBackdrop=()=>this.luigi.getEngine()._connector?.addBackdrop(),this.removeBackdrop=()=>this.luigi.getEngine()._connector?.removeBackdrop(),this.getDirtyStatus=()=>this.dirtyStatusService.readDirtyStatus(),this.luigi=t}}class Ew{filterIdFromMessageObject(t){const{id:r,...a}=t;return{id:r,messageWithoutId:a}}}const jl=new Ew;class Cw{constructor(t){this.luigi=t}sendToAll(t){const r=za.getAllLuigiContainerIframe(this.luigi);if(!r){console.warn("No Luigi containers found to send the message to.");return}const{id:a,messageWithoutId:o}=jl.filterIdFromMessageObject(t);if(!a){console.warn('Message object must contain an "id" property to specify the message type.');return}for(const c of r)c.sendCustomMessage?c.sendCustomMessage(a,o):console.warn("Container does not support sending custom messages:",c)}send(t,r){const a=za.getAllLuigiContainerIframe(this.luigi);if(!a){console.warn("No Luigi containers found to send the message to.");return}const{id:o,messageWithoutId:c}=jl.filterIdFromMessageObject(r);if(!o){console.warn('Message object must contain an "id" property to specify the message type.');return}for(const l of a)if(l.luigiMfId===t){l.sendCustomMessage?l.sendCustomMessage(o,c):console.warn("Container does not support sending custom messages:",l);return}console.warn(`No container found with microfrontend ID: ${t}`)}}class yw{constructor(t){this.engine=t,this.initialized=!1,this.configReadyCallback=function(){},this.USER_SETTINGS_KEY="luigi.preferences.userSettings",this.setConfig=r=>{this.config=r,this.setConfigCallback(this.getConfigReadyCallback()),dn.init().then(()=>{this.engine.init(),this.initialized||(this.initialized=!0,dw.luigiAfterInit(this))})},this.getConfig=()=>this.config,this.configChanged=(...r)=>{this.getEngine()._ui.update(r)},this.customMessages=()=>(this._customMessages||(this._customMessages=new Cw(this)),this._customMessages),this.i18n=()=>(this._i18n||(this._i18n=new hw(this)),this._i18n),this.elements=()=>(this._elements||(this._elements=new fw(this)),this._elements),this.navigation=()=>new pw(this),this.ux=()=>new Sw(this),this.featureToggles=()=>(this._featureToggles||(this._featureToggles=new gw),this._featureToggles),this.routing=()=>(this._routing||(this._routing=new mw(this)),this._routing),this.theming=()=>(this._theming||(this._theming=new _w(this)),this._theming),this.auth=()=>cr,this._store=this.createConfigStore()}getEngine(){return this.engine}getConfigValue(t){return D.getConfigValueFromObject(this.getConfig(),t)}getConfigValueAsync(t,...r){return Dn.getConfigValueFromObjectAsync(this.getConfig(),t,r)}clearNavigationCache(){q.get(_n).deleteCache();const t=r=>{r&&r.forEach&&r.forEach(a=>{a.titleResolver&&a.titleResolver._cache&&(a.titleResolver._cache=void 0),a.children&&t(a.children)})};t(this.getConfig().navigation.nodes)}async readUserSettings(){const t=await this.getConfigValueAsync("userSettings"),r=t||await this.getConfigValueAsync("settings.userSettings");if(r&&D.isFunction(r.readUserSettings))return r.readUserSettings();const a=localStorage.getItem(this.USER_SETTINGS_KEY);return a&&JSON.parse(a)}async storeUserSettings(t,r){const a=await this.getConfigValueAsync("userSettings"),o=a||await this.getConfigValueAsync("settings.userSettings");if(o&&D.isFunction(o.storeUserSettings))return o.storeUserSettings(t,r);localStorage.setItem(this.USER_SETTINGS_KEY,JSON.stringify(t)),this.configChanged()}reset(){const t=this.getConfig();this.unload(),this.setConfig(t)}unload(){this.initialized=!1,window.Luigi._store.clear(),dn.unload(),qa.removeAllEventListeners(),this.getEngine()._connector?.unload(),this._i18n=void 0}createConfigStore(){const t=ss({}),r={};let a=[];return{subscribe:o=>{a.push(t.subscribe(o))},reset:o=>{t.update(o)},subscribeToScope:(o,c)=>{let l=r[c];l||(l=new Set,r[c]=l),l.add(o)},fire:(o,c)=>{const l=r[o];l&&[...l].forEach(f=>{f(c)})},clear:()=>{a.forEach(o=>{o()}),a=[]}}}getConfigReadyCallback(){return new Promise(t=>{this.i18n()._init(),t()})}setConfigCallback(t){this.configReadyCallback=t}}const Rc=!1;var Tw=Array.isArray,bw=Array.prototype.indexOf,Er=Array.prototype.includes,Rw=Array.from,Aw=Object.defineProperty,Yr=Object.getOwnPropertyDescriptor,Pw=Object.prototype,Iw=Array.prototype,xw=Object.getPrototypeOf,ec=Object.isExtensible;const Lw=()=>{};function Nw(i){for(var t=0;t<i.length;t++)i[t]()}function Uw(){var i,t,r=new Promise((a,o)=>{i=a,t=o});return{promise:r,resolve:i,reject:t}}const We=2,ei=4,Ac=8,Pc=1<<24,Pt=16,Sn=32,En=64,Ka=128,_t=512,$e=1024,He=2048,Ht=4096,kt=8192,mn=16384,ri=32768,tc=1<<25,us=65536,ls=1<<17,Ow=1<<18,ds=1<<19,$w=1<<20,Wn=65536,cs=1<<21,Jr=1<<22,ti=1<<23,Ha=Symbol("$state"),Dw=Symbol("attributes"),Mw=Symbol("class"),kw=Symbol("style"),Fw=Symbol("text"),ja=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function Hw(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ww(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Vw(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Bw(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Gw(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Fe=Symbol();function Qw(){console.warn("https://svelte.dev/e/derived_inert")}function qw(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function zw(i){return i===this.v}let eo=!1,Kw=!1;function Yw(){eo=!0}let Nt=null;function hs(i){Nt=i}function Jw(i,t=!1,r){Nt={p:Nt,i:!1,c:null,e:null,s:i,x:null,r:ge,l:eo&&!t?{s:null,u:null,$:[]}:null}}function Xw(i){var t=Nt,r=t.e;if(r!==null){t.e=null;for(var a of r)hS(a)}return t.i=!0,Nt=t.p,{}}function gs(){return!eo||Nt!==null&&Nt.l===null}let hr=[];function Zw(){var i=hr;hr=[],Nw(i)}function mr(i){if(hr.length===0){var t=hr;queueMicrotask(()=>{t===hr&&Zw()})}hr.push(i)}function Ic(i){var t=ge;if(t===null)return ue.f|=ti,i;if((t.f&ri)===0&&(t.f&ei)===0)throw i;fr(i,t)}function fr(i,t){for(;t!==null;){if((t.f&Ka)!==0){if((t.f&ri)===0)throw i;try{t.b.error(i);return}catch(r){i=r}}t=t.parent}throw i}const jw=-7169;function ye(i,t){i.f=i.f&jw|t}function to(i){(i.f&_t)!==0||i.deps===null?ye(i,$e):ye(i,Ht)}function xc(i){if(i!==null)for(const t of i)(t.f&We)===0||(t.f&Wn)===0||(t.f^=Wn,xc(t.deps))}function Lc(i,t,r){(i.f&He)!==0?t.add(i):(i.f&Ht)!==0&&r.add(i),xc(i.deps),ye(i,$e)}let Wa=null,or=null,fe=null,Ya=null,It=null,Ja=null,Va=!1,dr=null,ns=null;var nc=0;let eS=1;class Vn{id=eS++;#e=!1;linked=!0;#o=null;#s=null;async_deriveds=new Map;current=new Map;previous=new Map;unblocked=new Set;#d=new Set;#r=new Set;#a=new Set;#n=0;#t=new Map;#h=null;#i=[];#g=[];#f=new Set;#u=new Set;#l=new Map;#c=new Set;is_fork=!1;#m=!1;#C(){if(this.is_fork)return!0;for(const a of this.#t.keys()){for(var t=a,r=!1;t.parent!==null;){if(this.#l.has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1}skip_effect(t){this.#l.has(t)||this.#l.set(t,{d:[],m:[]}),this.#c.delete(t)}unskip_effect(t,r=a=>this.schedule(a)){var a=this.#l.get(t);if(a){this.#l.delete(t);for(var o of a.d)ye(o,He),r(o);for(o of a.m)ye(o,Ht),r(o)}this.#c.add(t)}#_(){if(this.#e=!0,nc++>1e3&&(this.#S(),tS()),!this.#C()){for(const d of this.#f)this.#u.delete(d),ye(d,He),this.schedule(d);for(const d of this.#u)ye(d,Ht),this.schedule(d)}const t=this.#i;this.#i=[],this.apply();var r=dr=[],a=[],o=ns=[];for(const d of t)try{this.#y(d,r,a)}catch(m){throw Oc(d),m}if(fe=null,o.length>0){var c=Vn.ensure();for(const d of o)c.schedule(d)}if(dr=null,ns=null,this.#C()){this.#p(a),this.#p(r);for(const[d,m]of this.#l)Uc(d,m);o.length>0&&fe.#_();return}const l=this.#E();if(l){l.#v(this);return}this.#f.clear(),this.#u.clear();for(const d of this.#d)d(this);this.#d.clear(),Ya=this,rc(a),rc(r),Ya=null,this.#h?.resolve();var f=fe;if(this.linked&&this.#n===0&&this.#S(),this.#i.length>0){f===null&&(f=this,this.#w());const d=f;d.#i.push(...this.#i.filter(m=>!d.#i.includes(m)))}f!==null&&f.#_()}#y(t,r,a){t.f^=$e;for(var o=t.first;o!==null;){var c=o.f,l=(c&(Sn|En))!==0,f=l&&(c&$e)!==0,d=f||(c&kt)!==0||this.#l.has(o);if(!d&&o.fn!==null){l?o.f^=$e:(c&ei)!==0?r.push(o):si(o)&&((c&Pt)!==0&&this.#u.add(o),Cr(o));var m=o.first;if(m!==null){o=m;continue}}for(;o!==null;){var S=o.next;if(S!==null){o=S;break}o=o.parent}}}#E(){for(var t=this.#o;t!==null;){if(!t.is_fork){for(const[r,[,a]]of this.current)if(t.current.has(r)&&!a)return t}t=t.#o}return null}#v(t){for(const[a,o]of t.current)!this.previous.has(a)&&t.previous.has(a)&&this.previous.set(a,t.previous.get(a)),this.current.set(a,o);for(const[a,o]of t.async_deriveds){const c=this.async_deriveds.get(a);c&&o.promise.then(c.resolve)}const r=a=>{var o=a.reactions;if(o!==null)for(const f of o){var c=f.f;if((c&We)!==0)r(f);else{var l=f;c&(Jr|Pt)&&!this.async_deriveds.has(l)&&(this.#u.delete(l),ye(l,He),this.schedule(l))}}};for(const a of this.current.keys())r(a);this.oncommit(()=>t.discard()),t.#S(),fe=this,this.#_()}#p(t){for(var r=0;r<t.length;r+=1)Lc(t[r],this.#f,this.#u)}capture(t,r,a=!1){t.v!==Fe&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&ti)===0&&(this.current.set(t,[r,a]),It?.set(t,r)),this.is_fork||(t.v=r)}activate(){fe=this}deactivate(){fe=null,It=null}flush(){try{Va=!0,fe=this,this.#_()}finally{nc=0,Ja=null,dr=null,ns=null,Va=!1,fe=null,It=null,Fn.clear()}}discard(){for(const t of this.#r)t(this);this.#r.clear(),this.#a.clear(),this.#S()}register_created_effect(t){this.#g.push(t)}#T(){this.#S();for(let S=Wa;S!==null;S=S.#s){var t=S.id<this.id,r=[];for(const[y,[E,T]]of this.current){if(S.current.has(y)){var a=S.current.get(y)[0];if(t&&E!==a)S.current.set(y,[E,T]);else continue}r.push(y)}if(t)for(const[y,E]of this.async_deriveds){const T=S.async_deriveds.get(y);T&&E.promise.then(T.resolve)}if(S.#e){var o=[...S.current.keys()].filter(y=>!this.current.has(y));if(o.length===0)t&&S.discard();else if(r.length>0){if(t)for(const y of this.#c)S.unskip_effect(y,E=>{(E.f&(Pt|Jr))!==0?S.schedule(E):S.#p([E])});S.activate();var c=new Set,l=new Map;for(var f of r)Nc(f,o,c,l);l=new Map;var d=[...S.current.keys()].filter(y=>this.current.has(y)?this.current.get(y)[0]!==y.v:!0);if(d.length>0)for(const y of this.#g)(y.f&(mn|kt|ls))===0&&no(y,d,l)&&((y.f&(Jr|Pt))!==0?(ye(y,He),S.schedule(y)):S.#f.add(y));if(S.#i.length>0){S.apply();for(var m of S.#i)S.#y(m,[],[]);S.#i=[]}S.deactivate()}}}}increment(t,r){if(this.#n+=1,t){let a=this.#t.get(r)??0;this.#t.set(r,a+1)}}decrement(t,r){if(this.#n-=1,t){let a=this.#t.get(r)??0;a===1?this.#t.delete(r):this.#t.set(r,a-1)}this.#m||(this.#m=!0,mr(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(t,r){for(const a of t)this.#f.add(a);for(const a of r)this.#u.add(a);t.clear(),r.clear()}oncommit(t){this.#d.add(t)}ondiscard(t){this.#r.add(t)}on_fork_commit(t){this.#a.add(t)}run_fork_commit_callbacks(){for(const t of this.#a)t(this);this.#a.clear()}settled(){return(this.#h??=Uw()).promise}static ensure(){if(fe===null){const t=fe=new Vn;t.#w(),Va||mr(()=>{t.#e||t.flush()})}return fe}apply(){{It=null;return}}schedule(t){if(Ja=t,t.b?.is_pending&&(t.f&(ei|Ac|Pc))!==0&&(t.f&ri)===0){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var a=r.f;if(dr!==null&&r===ge&&(ue===null||(ue.f&We)===0))return;if((a&(En|Sn))!==0){if((a&$e)===0)return;r.f^=$e}}this.#i.push(r)}#w(){or===null?Wa=or=this:(or.#s=this,this.#o=or),or=this}#S(){var t=this.#o,r=this.#s;t===null?Wa=r:t.#s=r,r===null?or=t:r.#o=t,this.linked=!1}}function tS(){try{Hw()}catch(i){fr(i,Ja)}}let Xt=null;function rc(i){var t=i.length;if(t!==0){for(var r=0;r<t;){var a=i[r++];if((a.f&(mn|kt))===0&&si(a)&&(Xt=new Set,Cr(a),a.deps===null&&a.first===null&&a.nodes===null&&a.teardown===null&&a.ac===null&&Qc(a),Xt?.size>0)){Fn.clear();for(const o of Xt){if((o.f&(mn|kt))!==0)continue;const c=[o];let l=o.parent;for(;l!==null;)Xt.has(l)&&(Xt.delete(l),c.push(l)),l=l.parent;for(let f=c.length-1;f>=0;f--){const d=c[f];(d.f&(mn|kt))===0&&Cr(d)}}Xt.clear()}}Xt=null}}function Nc(i,t,r,a){if(!r.has(i)&&(r.add(i),i.reactions!==null))for(const o of i.reactions){const c=o.f;(c&We)!==0?Nc(o,t,r,a):(c&(Jr|Pt))!==0&&(c&He)===0&&no(o,t,a)&&(ye(o,He),ro(o))}}function no(i,t,r){const a=r.get(i);if(a!==void 0)return a;if(i.deps!==null)for(const o of i.deps){if(Er.call(t,o))return!0;if((o.f&We)!==0&&no(o,t,r))return r.set(o,!0),!0}return r.set(i,!1),!1}function ro(i){fe.schedule(i)}function Uc(i,t){if(!((i.f&Sn)!==0&&(i.f&$e)!==0)){(i.f&He)!==0?t.d.push(i):(i.f&Ht)!==0&&t.m.push(i),ye(i,$e);for(var r=i.first;r!==null;)Uc(r,t),r=r.next}}function Oc(i){ye(i,$e);for(var t=i.first;t!==null;)Oc(t),t=t.next}function nS(i){let t=0,r=so(0),a;return()=>{ao()&&(gr(r),dS(()=>(t===0&&(a=ES(()=>i(()=>Xr(r)))),t+=1,()=>{mr(()=>{t-=1,t===0&&(a?.(),a=void 0,Xr(r))})})))}}var rS=us|ds;function iS(i,t,r,a){new sS(i,t,r,a)}class sS{parent;is_pending=!1;transform_error;#e;#o=null;#s;#d;#r;#a=null;#n=null;#t=null;#h=null;#i=0;#g=0;#f=!1;#u=new Set;#l=new Set;#c=null;#m=nS(()=>(this.#c=so(this.#i),()=>{this.#c=null}));constructor(t,r,a,o){this.#e=t,this.#s=r,this.#d=c=>{var l=ge;l.b=this,l.f|=Ka,a(c)},this.parent=ge.b,this.transform_error=o??this.parent?.transform_error??(c=>c),this.#r=gS(()=>{this.#E()},rS)}#C(){try{this.#a=Un(()=>this.#d(this.#e))}catch(t){this.error(t)}}#_(t){const r=this.#s.failed;r&&(this.#t=Un(()=>{r(this.#e,()=>t,()=>()=>{})}))}#y(){const t=this.#s.pending;t&&(this.is_pending=!0,this.#n=Un(()=>t(this.#e)),mr(()=>{var r=this.#h=document.createDocumentFragment(),a=Wc();r.append(a),this.#a=this.#p(()=>Un(()=>this.#d(a))),this.#g===0&&(this.#e.before(r),this.#h=null,rs(this.#n,()=>{this.#n=null}),this.#v(fe))}))}#E(){try{if(this.is_pending=this.has_pending_snippet(),this.#g=0,this.#i=0,this.#a=Un(()=>{this.#d(this.#e)}),this.#g>0){var t=this.#h=document.createDocumentFragment();_S(this.#a,t);const r=this.#s.pending;this.#n=Un(()=>r(this.#e))}else this.#v(fe)}catch(r){this.error(r)}}#v(t){this.is_pending=!1,t.transfer_effects(this.#u,this.#l)}defer_effect(t){Lc(t,this.#u,this.#l)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#s.pending}#p(t){var r=ge,a=ue,o=Nt;Cn(this.#r),Wt(this.#r),hs(this.#r.ctx);try{return Vn.ensure(),t()}catch(c){return Ic(c),null}finally{Cn(r),Wt(a),hs(o)}}#T(t,r){if(!this.has_pending_snippet()){this.parent&&this.parent.#T(t,r);return}this.#g+=t,this.#g===0&&(this.#v(r),this.#n&&rs(this.#n,()=>{this.#n=null}),this.#h&&(this.#e.before(this.#h),this.#h=null))}update_pending_count(t,r){this.#T(t,r),this.#i+=t,!(!this.#c||this.#f)&&(this.#f=!0,mr(()=>{this.#f=!1,this.#c&&kc(this.#c,this.#i)}))}get_effect_pending(){return this.#m(),gr(this.#c)}error(t){if(!this.#s.onerror&&!this.#s.failed)throw t;fe?.is_fork?(this.#a&&fe.skip_effect(this.#a),this.#n&&fe.skip_effect(this.#n),this.#t&&fe.skip_effect(this.#t),fe.on_fork_commit(()=>{this.#w(t)})):this.#w(t)}#w(t){this.#a&&(Ft(this.#a),this.#a=null),this.#n&&(Ft(this.#n),this.#n=null),this.#t&&(Ft(this.#t),this.#t=null);var r=this.#s.onerror;let a=this.#s.failed;var o=!1,c=!1;const l=()=>{if(o){qw();return}o=!0,c&&Gw(),this.#t!==null&&rs(this.#t,()=>{this.#t=null}),this.#p(()=>{this.#E()})},f=d=>{try{c=!0,r?.(d,l),c=!1}catch(m){fr(m,this.#r&&this.#r.parent)}a&&(this.#t=this.#p(()=>{try{return Un(()=>{var m=ge;m.b=this,m.f|=Ka,a(this.#e,()=>d,()=>l)})}catch(m){return fr(m,this.#r.parent),null}}))};mr(()=>{var d;try{d=this.transform_error(t)}catch(m){fr(m,this.#r&&this.#r.parent);return}d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(f,m=>fr(m,this.#r&&this.#r.parent)):f(d)})}}function aS(i){var t=i.effects;if(t!==null){i.effects=null;for(var r=0;r<t.length;r+=1)Ft(t[r])}}function io(i){var t,r=ge,a=i.parent;if(!Bn&&a!==null&&(a.f&(mn|kt))!==0)return Qw(),i.v;Cn(a);try{i.f&=~Wn,aS(i),t=Jc(i)}finally{Cn(r)}return t}function $c(i){var t=io(i);if(!i.equals(t)&&(i.wv=Kc(),(!fe?.is_fork||i.deps===null)&&(fe!==null?(fe.capture(i,t,!0),Ya?.capture(i,t,!0)):i.v=t,i.deps===null))){ye(i,$e);return}Bn||(It!==null?(ao()||fe?.is_fork)&&It.set(i,t):to(i))}function oS(i){if(i.effects!==null)for(const t of i.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(ja),t.teardown=Lw,t.ac=null,ni(t,0),oo(t))}function Dc(i){if(i.effects!==null)for(const t of i.effects)t.teardown&&Cr(t)}let fs=new Set;const Fn=new Map;let Mc=!1;function so(i,t){var r={f:0,v:i,reactions:null,equals:zw,rv:0,wv:0};return r}function cn(i,t){const r=so(i);return vS(r),r}function On(i,t,r=!1){ue!==null&&(!xt||(ue.f&ls)!==0)&&gs()&&(ue.f&(We|Pt|Jr|ls))!==0&&(vt===null||!Er.call(vt,i))&&Bw();let a=r?qr(t):t;return kc(i,a,ns)}function kc(i,t,r=null){if(!i.equals(t)){Fn.set(i,Bn?t:i.v);var a=Vn.ensure();if(a.capture(i,t),(i.f&We)!==0){const o=i;(i.f&He)!==0&&io(o),It===null&&to(o)}i.wv=Kc(),Fc(i,He,r),gs()&&ge!==null&&(ge.f&$e)!==0&&(ge.f&(Sn|En))===0&&(pt===null?wS([i]):pt.push(i)),!a.is_fork&&fs.size>0&&!Mc&&uS()}return t}function uS(){Mc=!1;for(const i of fs){(i.f&$e)!==0&&ye(i,Ht);let t;try{t=si(i)}catch{t=!0}t&&Cr(i)}fs.clear()}function Xr(i){On(i,i.v+1)}function Fc(i,t,r){var a=i.reactions;if(a!==null)for(var o=gs(),c=a.length,l=0;l<c;l++){var f=a[l],d=f.f;if(!(!o&&f===ge)){var m=(d&He)===0;if(m&&ye(f,t),(d&ls)!==0)fs.add(f);else if((d&We)!==0){var S=f;It?.delete(S),(d&Wn)===0&&(d&_t&&(ge===null||(ge.f&cs)===0)&&(f.f|=Wn),Fc(S,Ht,r))}else if(m){var y=f;(d&Pt)!==0&&Xt!==null&&Xt.add(y),r!==null?r.push(y):ro(y)}}}}function qr(i){if(typeof i!="object"||i===null||Ha in i)return i;const t=xw(i);if(t!==Pw&&t!==Iw)return i;var r=new Map,a=Tw(i),o=cn(0),c=Hn,l=f=>{if(Hn===c)return f();var d=ue,m=Hn;Wt(null),ac(c);var S=f();return Wt(d),ac(m),S};return a&&r.set("length",cn(i.length)),new Proxy(i,{defineProperty(f,d,m){(!("value"in m)||m.configurable===!1||m.enumerable===!1||m.writable===!1)&&Ww();var S=r.get(d);return S===void 0?l(()=>{var y=cn(m.value);return r.set(d,y),y}):On(S,m.value,!0),!0},deleteProperty(f,d){var m=r.get(d);if(m===void 0){if(d in f){const S=l(()=>cn(Fe));r.set(d,S),Xr(o)}}else On(m,Fe),Xr(o);return!0},get(f,d,m){if(d===Ha)return i;var S=r.get(d),y=d in f;if(S===void 0&&(!y||Yr(f,d)?.writable)&&(S=l(()=>{var T=qr(y?f[d]:Fe),R=cn(T);return R}),r.set(d,S)),S!==void 0){var E=gr(S);return E===Fe?void 0:E}return Reflect.get(f,d,m)},getOwnPropertyDescriptor(f,d){var m=Reflect.getOwnPropertyDescriptor(f,d);if(m&&"value"in m){var S=r.get(d);S&&(m.value=gr(S))}else if(m===void 0){var y=r.get(d),E=y?.v;if(y!==void 0&&E!==Fe)return{enumerable:!0,configurable:!0,value:E,writable:!0}}return m},has(f,d){if(d===Ha)return!0;var m=r.get(d),S=m!==void 0&&m.v!==Fe||Reflect.has(f,d);if(m!==void 0||ge!==null&&(!S||Yr(f,d)?.writable)){m===void 0&&(m=l(()=>{var E=S?qr(f[d]):Fe,T=cn(E);return T}),r.set(d,m));var y=gr(m);if(y===Fe)return!1}return S},set(f,d,m,S){var y=r.get(d),E=d in f;if(a&&d==="length")for(var T=m;T<y.v;T+=1){var R=r.get(T+"");R!==void 0?On(R,Fe):T in f&&(R=l(()=>cn(Fe)),r.set(T+"",R))}if(y===void 0)(!E||Yr(f,d)?.writable)&&(y=l(()=>cn(void 0)),On(y,qr(m)),r.set(d,y));else{E=y.v!==Fe;var x=l(()=>qr(m));On(y,x)}var $=Reflect.getOwnPropertyDescriptor(f,d);if($?.set&&$.set.call(S,m),!E){if(a&&typeof d=="string"){var W=r.get("length"),Z=Number(d);Number.isInteger(Z)&&Z>=W.v&&On(W,Z+1)}Xr(o)}return!0},ownKeys(f){gr(o);var d=Reflect.ownKeys(f).filter(y=>{var E=r.get(y);return E===void 0||E.v!==Fe});for(var[m,S]of r)S.v!==Fe&&!(m in f)&&d.push(m);return d},setPrototypeOf(){Vw()}})}var ic,Hc;function lS(){if(ic===void 0){ic=window;var i=Element.prototype,t=Node.prototype,r=Text.prototype;Yr(t,"firstChild").get,Hc=Yr(t,"nextSibling").get,ec(i)&&(i[Mw]=void 0,i[Dw]=null,i[kw]=void 0,i.__e=void 0),ec(r)&&(r[Fw]=void 0)}}function Wc(i=""){return document.createTextNode(i)}function Vc(i){return Hc.call(i)}function Bc(i){var t=ue,r=ge;Wt(null),Cn(null);try{return i()}finally{Wt(t),Cn(r)}}function cS(i,t){var r=t.last;r===null?t.last=t.first=i:(r.next=i,i.prev=r,t.last=i)}function ii(i,t){var r=ge;r!==null&&(r.f&kt)!==0&&(i|=kt);var a={ctx:Nt,deps:null,nodes:null,f:i|He|_t,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};fe?.register_created_effect(a);var o=a;if((i&ei)!==0)dr!==null?dr.push(a):Vn.ensure().schedule(a);else if(t!==null){try{Cr(a)}catch(l){throw Ft(a),l}o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&(o.f&ds)===0&&(o=o.first,(i&Pt)!==0&&(i&us)!==0&&o!==null&&(o.f|=us))}if(o!==null&&(o.parent=r,r!==null&&cS(o,r),ue!==null&&(ue.f&We)!==0&&(i&En)===0)){var c=ue;(c.effects??=[]).push(o)}return a}function ao(){return ue!==null&&!xt}function hS(i){return ii(ei|$w,i)}function fS(i){Vn.ensure();const t=ii(En|ds,i);return(r={})=>new Promise(a=>{r.outro?rs(t,()=>{Ft(t),a(void 0)}):(Ft(t),a(void 0))})}function dS(i,t=0){return ii(Ac|t,i)}function gS(i,t=0){var r=ii(Pt|t,i);return r}function Un(i){return ii(Sn|ds,i)}function Gc(i){var t=i.teardown;if(t!==null){const r=Bn,a=ue;sc(!0),Wt(null);try{t.call(null)}finally{sc(r),Wt(a)}}}function oo(i,t=!1){var r=i.first;for(i.first=i.last=null;r!==null;){const o=r.ac;o!==null&&Bc(()=>{o.abort(ja)});var a=r.next;(r.f&En)!==0?r.parent=null:Ft(r,t),r=a}}function pS(i){for(var t=i.first;t!==null;){var r=t.next;(t.f&Sn)===0&&Ft(t),t=r}}function Ft(i,t=!0){var r=!1;(t||(i.f&Ow)!==0)&&i.nodes!==null&&i.nodes.end!==null&&(mS(i.nodes.start,i.nodes.end),r=!0),ye(i,tc),oo(i,t&&!r),ni(i,0);var a=i.nodes&&i.nodes.t;if(a!==null)for(const c of a)c.stop();Gc(i),i.f^=tc,i.f|=mn;var o=i.parent;o!==null&&o.first!==null&&Qc(i),i.next=i.prev=i.teardown=i.ctx=i.deps=i.fn=i.nodes=i.ac=i.b=null}function mS(i,t){for(;i!==null;){var r=i===t?null:Vc(i);i.remove(),i=r}}function Qc(i){var t=i.parent,r=i.prev,a=i.next;r!==null&&(r.next=a),a!==null&&(a.prev=r),t!==null&&(t.first===i&&(t.first=a),t.last===i&&(t.last=r))}function rs(i,t,r=!0){var a=[];qc(i,a,!0);var o=()=>{r&&Ft(i),t&&t()},c=a.length;if(c>0){var l=()=>--c||o();for(var f of a)f.out(l)}else o()}function qc(i,t,r){if((i.f&kt)===0){i.f^=kt;var a=i.nodes&&i.nodes.t;if(a!==null)for(const f of a)(f.is_global||r)&&t.push(f);for(var o=i.first;o!==null;){var c=o.next;if((o.f&En)===0){var l=(o.f&us)!==0||(o.f&Sn)!==0&&(i.f&Pt)!==0;qc(o,t,l?r:!1)}o=c}}}function _S(i,t){if(i.nodes)for(var r=i.nodes.start,a=i.nodes.end;r!==null;){var o=r===a?null:Vc(r);t.append(r),r=o}}let is=!1,Bn=!1;function sc(i){Bn=i}let ue=null,xt=!1;function Wt(i){ue=i}let ge=null;function Cn(i){ge=i}let vt=null;function vS(i){ue!==null&&(vt===null?vt=[i]:vt.push(i))}let Xe=null,at=0,pt=null;function wS(i){pt=i}let zc=1,$n=0,Hn=$n;function ac(i){Hn=i}function Kc(){return++zc}function si(i){var t=i.f;if((t&He)!==0)return!0;if(t&We&&(i.f&=~Wn),(t&Ht)!==0){for(var r=i.deps,a=r.length,o=0;o<a;o++){var c=r[o];if(si(c)&&$c(c),c.wv>i.wv)return!0}(t&_t)!==0&&It===null&&ye(i,$e)}return!1}function Yc(i,t,r=!0){var a=i.reactions;if(a!==null&&!(vt!==null&&Er.call(vt,i)))for(var o=0;o<a.length;o++){var c=a[o];(c.f&We)!==0?Yc(c,t,!1):t===c&&(r?ye(c,He):(c.f&$e)!==0&&ye(c,Ht),ro(c))}}function Jc(i){var t=Xe,r=at,a=pt,o=ue,c=vt,l=Nt,f=xt,d=Hn,m=i.f;Xe=null,at=0,pt=null,ue=(m&(Sn|En))===0?i:null,vt=null,hs(i.ctx),xt=!1,Hn=++$n,i.ac!==null&&(Bc(()=>{i.ac.abort(ja)}),i.ac=null);try{i.f|=cs;var S=i.fn,y=S();i.f|=ri;var E=i.deps,T=fe?.is_fork;if(Xe!==null){var R;if(T||ni(i,at),E!==null&&at>0)for(E.length=at+Xe.length,R=0;R<Xe.length;R++)E[at+R]=Xe[R];else i.deps=E=Xe;if(ao()&&(i.f&_t)!==0)for(R=at;R<E.length;R++)(E[R].reactions??=[]).push(i)}else!T&&E!==null&&at<E.length&&(ni(i,at),E.length=at);if(gs()&&pt!==null&&!xt&&E!==null&&(i.f&(We|Ht|He))===0)for(R=0;R<pt.length;R++)Yc(pt[R],i);if(o!==null&&o!==i){if($n++,o.deps!==null)for(let x=0;x<r;x+=1)o.deps[x].rv=$n;if(t!==null)for(const x of t)x.rv=$n;pt!==null&&(a===null?a=pt:a.push(...pt))}return(i.f&ti)!==0&&(i.f^=ti),y}catch(x){return Ic(x)}finally{i.f^=cs,Xe=t,at=r,pt=a,ue=o,vt=c,hs(l),xt=f,Hn=d}}function SS(i,t){let r=t.reactions;if(r!==null){var a=bw.call(r,i);if(a!==-1){var o=r.length-1;o===0?r=t.reactions=null:(r[a]=r[o],r.pop())}}if(r===null&&(t.f&We)!==0&&(Xe===null||!Er.call(Xe,t))){var c=t;(c.f&_t)!==0&&(c.f^=_t,c.f&=~Wn),c.v!==Fe&&to(c),oS(c),ni(c,0)}}function ni(i,t){var r=i.deps;if(r!==null)for(var a=t;a<r.length;a++)SS(i,r[a])}function Cr(i){var t=i.f;if((t&mn)===0){ye(i,$e);var r=ge,a=is;ge=i,is=!0;try{(t&(Pt|Pc))!==0?pS(i):oo(i),Gc(i);var o=Jc(i);i.teardown=typeof o=="function"?o:null,i.wv=zc;var c;Rc&&Kw&&(i.f&He)!==0&&i.deps}finally{is=a,ge=r}}}function gr(i){var t=i.f,r=(t&We)!==0;if(ue!==null&&!xt){var a=ge!==null&&(ge.f&mn)!==0;if(!a&&(vt===null||!Er.call(vt,i))){var o=ue.deps;if((ue.f&cs)!==0)i.rv<$n&&(i.rv=$n,Xe===null&&o!==null&&o[at]===i?at++:Xe===null?Xe=[i]:Xe.push(i));else{(ue.deps??=[]).push(i);var c=i.reactions;c===null?i.reactions=[ue]:Er.call(c,ue)||c.push(ue)}}}if(Bn&&Fn.has(i))return Fn.get(i);if(r){var l=i;if(Bn){var f=l.v;return((l.f&$e)===0&&l.reactions!==null||Zc(l))&&(f=io(l)),Fn.set(l,f),f}var d=(l.f&_t)===0&&!xt&&ue!==null&&(is||(ue.f&_t)!==0),m=(l.f&ri)===0;si(l)&&(d&&(l.f|=_t),$c(l)),d&&!m&&(Dc(l),Xc(l))}if(It?.has(i))return It.get(i);if((i.f&ti)!==0)throw i.v;return i.v}function Xc(i){if(i.f|=_t,i.deps!==null)for(const t of i.deps)(t.reactions??=[]).push(i),(t.f&We)!==0&&(t.f&_t)===0&&(Dc(t),Xc(t))}function Zc(i){if(i.v===Fe)return!0;if(i.deps===null)return!1;for(const t of i.deps)if(Fn.has(t)||(t.f&We)!==0&&Zc(t))return!0;return!1}function ES(i){var t=xt;try{return xt=!0,i()}finally{xt=t}}const CS=["touchstart","touchmove"];function yS(i){return CS.includes(i)}const ji=Symbol("events"),TS=new Set,oc=new Set;let uc=null;function lc(i){var t=this,r=t.ownerDocument,a=i.type,o=i.composedPath?.()||[],c=o[0]||i.target;uc=i;var l=0,f=uc===i&&i[ji];if(f){var d=o.indexOf(f);if(d!==-1&&(t===document||t===window)){i[ji]=t;return}var m=o.indexOf(t);if(m===-1)return;d<=m&&(l=d)}if(c=o[l]||i.target,c!==t){Aw(i,"currentTarget",{configurable:!0,get(){return c||r}});var S=ue,y=ge;Wt(null),Cn(null);try{for(var E,T=[];c!==null;){var R=c.assignedSlot||c.parentNode||c.host||null;try{var x=c[ji]?.[a];x!=null&&(!c.disabled||i.target===c)&&x.call(c,i)}catch($){E?T.push($):E=$}if(i.cancelBubble||R===t||R===null)break;c=R}if(E){for(let $ of T)queueMicrotask(()=>{throw $});throw E}}finally{i[ji]=t,delete i.currentTarget,Wt(S),Cn(y)}}}function bS(i,t){return RS(i,t)}const es=new Map;function RS(i,{target:t,anchor:r,props:a={},events:o,context:c,intro:l=!0,transformError:f}){lS();var d=void 0,m=fS(()=>{var S=r??t.appendChild(Wc());iS(S,{pending:()=>{}},T=>{Jw({});var R=Nt;c&&(R.c=c),o&&(a.$$events=o),d=i(T,a)||{},Xw()},f);var y=new Set,E=T=>{for(var R=0;R<T.length;R++){var x=T[R];if(!y.has(x)){y.add(x);var $=yS(x);for(const Se of[t,document]){var W=es.get(Se);W===void 0&&(W=new Map,es.set(Se,W));var Z=W.get(x);Z===void 0?(Se.addEventListener(x,lc,{passive:$}),W.set(x,1)):W.set(x,Z+1)}}}};return E(Rw(TS)),oc.add(E),()=>{for(var T of y)for(const $ of[t,document]){var R=es.get($),x=R.get(T);--x==0?($.removeEventListener(T,lc),R.delete(T),R.size===0&&es.delete($)):R.set(T,x)}oc.delete(E),S!==r&&S.parentNode?.removeChild(S)}});return AS.set(d,m),d}let AS=new WeakMap;const PS="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(PS);Yw();function IS(i){}const Xa={init:i=>{q.get(kn).enableRouting()},handlePageErrorHandler:(i,t,r)=>{i&&i.timeout&&setTimeout(()=>{if(i.viewUrl)t.viewUrl=i.viewUrl,r.getEngine()._ui.updateMainContent(t,r);else if(i.errorFn)i.errorFn(t);else{console.warn("Something went wrong with a client! You will be redirected to another page.");const a=i.redirectPath||"/";r.navigation().navigate(a)}},i.timeout)},handleExternalLinkNavigation:i=>{if(i.url)if(i.sameWindow||!1)window.location.href=i.url;else{const r=window.open(i.url,"_blank","noopener noreferrer");r&&(r.opener=null,r.focus())}},async addSearchParamsFromClient(i,t,r){const a=q.get(wn),o=U.getCurrentPath(r.getConfig().routing?.useHashRouting),l=(await a.getCurrentNode(o.path))?.clientPermissions?.urlParameters,f={...i};if(l){const d={};Object.keys(l).forEach(m=>{m in f&&l[m]?.write===!0&&(d[m]=f[m],delete f[m])});for(const m in f)console.warn(`No permission to add the search param "${m}" to the url`);Object.keys(d).length>0&&r.routing().addSearchParams(d,t)}}};class xS{static hasLocaleChangePermission(t){return t?.clientPermissions?.changeCurrentLocale?!0:(console.error('Current locale change declined from client, as client permission "changeCurrentLocale" is not set for this view.'),!1)}}const Mt={luigi:{},init:i=>{Mt.luigi=i},addListeners:(i,t)=>{i.addEventListener(O.INITIALIZED,r=>{Ne.luigi?.ux().hideLoadingIndicator(i.parentNode);const a=q.get(wr);a.viewGroupLoaded(i),!i._luigiPreloading&&i.style.display!=="none"&&a.preload()}),i.addEventListener(O.NAVIGATION_COMPLETED_REPORT,()=>{q.get(wr).preload()}),i.addEventListener(O.NAVIGATION_REQUEST,r=>{const{drawer:a,link:o,preserveView:c,modal:l,newTab:f,withoutSync:d,preventContextUpdate:m,preventHistoryEntry:S,fromVirtualTreeRoot:y,fromContext:E,fromClosestContext:T,fromParent:R,relative:x,nodeParams:$}=r.detail,W={drawerSettings:a,modalSettings:l,newTab:f,path:o,preserveView:c,preventContextUpdate:m,options:{fromVirtualTreeRoot:y,fromContext:E,fromClosestContext:T,fromParent:R,relative:x,nodeParams:$},preventHistoryEntry:S,withoutSync:d};q.get(wn).handleNavigationRequest(W,r.callbackFn)}),i.addEventListener(O.RUNTIME_ERROR_HANDLING_REQUEST,r=>{t.navigation().runTimeErrorHandler(r.payload?.data?.errorObj||{})}),i.addEventListener(O.ALERT_REQUEST,r=>{Ne.processAlert(r.payload,!0,i)}),i.addEventListener(O.SHOW_CONFIRMATION_MODAL_REQUEST,r=>{Ne.handleConfirmationModalRequest(r.payload,i)}),i.addEventListener(O.SET_DOCUMENT_TITLE_REQUEST,r=>{Mt.luigi.getEngine()._connector?.setDocumentTitle(r.detail.title)}),i.addEventListener(O.SHOW_LOADING_INDICATOR_REQUEST,r=>{Mt.luigi.getEngine()._connector?.showLoadingIndicator(i.parentNode)}),i.addEventListener(O.HIDE_LOADING_INDICATOR_REQUEST,r=>{Mt.luigi.getEngine()._connector?.hideLoadingIndicator(i.parentNode)}),i.addEventListener(O.ADD_BACKDROP_REQUEST,r=>{Mt.luigi.getEngine()._connector?.addBackdrop()}),i.addEventListener(O.REMOVE_BACKDROP_REQUEST,r=>{Mt.luigi.getEngine()._connector?.removeBackdrop()}),i.addEventListener(O.SET_DIRTY_STATUS_REQUEST,r=>{Ne.handleDirtyStatusRequest(r.detail?.data?.dirty,i)}),i.addEventListener(O.ADD_NODE_PARAMS_REQUEST,r=>{t.routing().addNodeParams(r.payload.data,r.payload.keepBrowserHistory)}),i.addEventListener(O.OPEN_USER_SETTINGS_REQUEST,r=>{Mt.luigi.getEngine()._connector?.openUserSettings(r.detail)}),i.addEventListener(O.CLOSE_USER_SETTINGS_REQUEST,r=>{Mt.luigi.getEngine()._connector?.closeUserSettings()}),i.addEventListener(O.ADD_SEARCH_PARAMS_REQUEST,r=>{Xa.addSearchParamsFromClient(r.detail.data,r.detail.keepBrowserHistory,t)}),i.addEventListener(O.UPDATE_MODAL_SETTINGS_REQUEST,r=>{G.updateModalSettings(r.payload.updatedModalSettings,r.payload.addHistoryEntry,t)}),i.addEventListener(O.SET_CURRENT_LOCALE_REQUEST,r=>{xS.hasLocaleChangePermission(i)&&t.i18n().setCurrentLocale(r.detail?.data?.data?.currentLocale)})}};class LS{constructor(){this._ui=G,this._comm=Mt,this._ux=Ne,this._routing=Xa}bootstrap(t){this._app=bS(IS,{target:document.body}),this._connector=t}init(){const t=window.Luigi;q.register(Lt,()=>new Lt(t)),q.register(wn,()=>new wn(t)),q.register(_n,()=>new _n),q.register(kn,()=>new kn(t)),q.register(Sr,()=>new Sr),q.register(vn,()=>new vn(t)),q.register(wr,()=>new wr(t)),t.theming()._init(),G.init(t),Xa.init(t),Mt.init(t),Ne.init(t)}}window.Luigi=new yw(new LS);
|
|
55
55
|
//# sourceMappingURL=luigi.js.map
|