@letscooee/web-sdk 9.7.6 → 9.7.7

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.
@@ -4,7 +4,7 @@ ${t.map((n,r)=>`${r+1}) ${n.toString()}`).join(`
4
4
  `);return r>=0?n.slice(0,r):n}function Vw(e,t){return e?t?`${e} ${t}`:e:t||""}var HN=Tt({__forward_ref__:Tt});function xg(e){return e.__forward_ref__=xg,e.toString=function(){return mr(this())},e}function kn(e){return xb(e)?e():e}function xb(e){return typeof e=="function"&&e.hasOwnProperty(HN)&&e.__forward_ref__===xg}function ne(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Rg(e){return Uw(e,Rb)||Uw(e,Nb)}function Uw(e,t){return e.hasOwnProperty(t)?e[t]:null}function jN(e){return e&&(e[Rb]||e[Nb])||null}function Hw(e){return e&&(e.hasOwnProperty(jw)||e.hasOwnProperty($N))?e[jw]:null}var Rb=Tt({\u0275prov:Tt}),jw=Tt({\u0275inj:Tt}),Nb=Tt({ngInjectableDef:Tt}),$N=Tt({ngInjectorDef:Tt}),pe=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(e,t){this._desc=e,this.\u0275prov=void 0,typeof t=="number"?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.\u0275prov=ne({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Ab(e){return e&&!!e.\u0275providers}var WN=Tt({\u0275cmp:Tt}),GN=Tt({\u0275dir:Tt}),Ng=Tt({\u0275pipe:Tt}),Yu=Tt({\u0275fac:Tt}),Fc=Tt({__NG_ELEMENT_ID__:Tt}),$w=Tt({__NG_ENV_ID__:Tt});function Zc(e){return typeof e=="string"?e:e==null?"":String(e)}function zN(e){return typeof e=="function"?e.name||e.toString():typeof e=="object"&&e!=null&&typeof e.type=="function"?e.type.name||e.type.toString():Zc(e)}function qN(e,t){throw new $e(-200,e)}function Ag(e,t){throw new $e(-201,!1)}var Ke=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(Ke||{}),bm;function Mb(){return bm}function Wn(e){let t=bm;return bm=e,t}function Ob(e,t,n){let r=Rg(e);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(n&Ke.Optional)return null;if(t!==void 0)return t;Ag(e,"Injector")}var YN={},Bc=YN,KN="__NG_DI_FLAG__",Ku="ngTempTokenPath",ZN="ngTokenPath",XN=/\n/gm,JN="\u0275",Ww="__source",oa;function QN(){return oa}function io(e){let t=oa;return oa=e,t}function eA(e,t=Ke.Default){if(oa===void 0)throw new $e(-203,!1);return oa===null?Ob(e,void 0,t):oa.get(e,t&Ke.Optional?null:void 0,t)}function Ze(e,t=Ke.Default){return(Mb()||eA)(kn(e),t)}function O(e,t=Ke.Default){return Ze(e,yd(t))}function yd(e){return typeof e>"u"||typeof e=="number"?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Cm(e){let t=[];for(let n=0;n<e.length;n++){let r=kn(e[n]);if(Array.isArray(r)){if(r.length===0)throw new $e(900,!1);let i,s=Ke.Default;for(let o=0;o<r.length;o++){let a=r[o],l=tA(a);typeof l=="number"?l===-1?i=a.token:s|=l:i=a}t.push(Ze(i,s))}else t.push(Ze(r))}return t}function tA(e){return e[KN]}function nA(e,t,n,r){let i=e[Ku];throw t[Ww]&&i.unshift(t[Ww]),e.message=rA(`
5
5
  `+e.message,i,n,r),e[ZN]=i,e[Ku]=null,e}function rA(e,t,n,r=null){e=e&&e.charAt(0)===`
6
6
  `&&e.charAt(1)==JN?e.slice(2):e;let i=mr(t);if(Array.isArray(t))i=t.map(mr).join(" -> ");else if(typeof t=="object"){let s=[];for(let o in t)if(t.hasOwnProperty(o)){let a=t[o];s.push(o+":"+(typeof a=="string"?JSON.stringify(a):mr(a)))}i=`{${s.join(", ")}}`}return`${n}${r?"("+r+")":""}[${i}]: ${e.replace(XN,`
7
- `)}`}function Go(e,t){return e.hasOwnProperty(Yu)?e[Yu]:null}function iA(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=t[r];if(n&&(i=n(i),s=n(s)),s!==i)return!1}return!0}function oA(e){return e.flat(Number.POSITIVE_INFINITY)}function Mg(e,t){e.forEach(n=>Array.isArray(n)?Mg(n,t):t(n))}function Pb(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Zu(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function sA(e,t,n,r){let i=e.length;if(i==t)e.push(n,r);else if(i===1)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;){let s=i-2;e[i]=e[s],i--}e[t]=n,e[t+1]=r}}function aA(e,t,n){let r=Xc(e,t);return r>=0?e[r|1]=n:(r=~r,sA(e,r,t,n)),r}function am(e,t){let n=Xc(e,t);if(n>=0)return e[n|1]}function Xc(e,t){return cA(e,t,1)}function cA(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){let s=r+(i-r>>1),o=e[s<<n];if(t===o)return s<<n;o>t?i=s:r=s+1}return~(i<<n)}var zo={},xi=[],Vc=new pe(""),kb=new pe("",-1),Lb=new pe(""),Xu=class{get(e,t=Bc){if(t===Bc){let n=new Error(`NullInjectorError: No provider for ${mr(e)}!`);throw n.name="NullInjectorError",n}return t}};function qo(e){return e[WN]||null}function Fb(e){return e[GN]||null}function Bb(e){return e[Ng]||null}function lA(e){let t=qo(e)||Fb(e)||Bb(e);return t!==null&&t.standalone}function Vb(e){return{\u0275providers:e}}function uA(...e){return{\u0275providers:Ub(!0,e),\u0275fromNgModule:!0}}function Ub(e,...t){let n=[],r=new Set,i,s=o=>{n.push(o)};return Mg(t,o=>{let a=o;Sm(a,s,[],r)&&(i||=[],i.push(a))}),i!==void 0&&Hb(i,s),n}function Hb(e,t){for(let n=0;n<e.length;n++){let{ngModule:r,providers:i}=e[n];Og(i,s=>{t(s,r)})}}function Sm(e,t,n,r){if(e=kn(e),!e)return!1;let i=null,s=Hw(e),o=!s&&qo(e);if(!s&&!o){let l=e.ngModule;if(s=Hw(l),s)i=l;else return!1}else{if(o&&!o.standalone)return!1;i=e}let a=r.has(i);if(o){if(a)return!1;if(r.add(i),o.dependencies){let l=typeof o.dependencies=="function"?o.dependencies():o.dependencies;for(let c of l)Sm(c,t,n,r)}}else if(s){if(s.imports!=null&&!a){r.add(i);let c;try{Mg(s.imports,h=>{Sm(h,t,n,r)&&(c||=[],c.push(h))})}finally{}c!==void 0&&Hb(c,t)}if(!a){let c=Go(i)||(()=>new i);t({provide:i,useFactory:c,deps:xi},i),t({provide:Lb,useValue:i,multi:!0},i),t({provide:Vc,useValue:()=>Ze(i),multi:!0},i)}let l=s.providers;if(l!=null&&!a){let c=e;Og(l,h=>{t(h,c)})}}else return!1;return i!==e&&e.providers!==void 0}function Og(e,t){for(let n of e)Ab(n)&&(n=n.\u0275providers),Array.isArray(n)?Og(n,t):t(n)}var dA=Tt({provide:String,useValue:Tt});function jb(e){return e!==null&&typeof e=="object"&&dA in e}function fA(e){return!!(e&&e.useExisting)}function pA(e){return!!(e&&e.useFactory)}function ca(e){return typeof e=="function"}function hA(e){return!!e.useClass}var vd=new pe(""),ju={},mA={},cm;function _d(){return cm===void 0&&(cm=new Xu),cm}var Gn=class{},Uc=class extends Gn{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,Im(e,s=>this.processProvider(s)),this.records.set(kb,ta(void 0,this)),r.has("environment")&&this.records.set(Gn,ta(void 0,this));let i=this.records.get(vd);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Lb,xi,Ke.Self))}destroy(){kc(this),this._destroyed=!0;let e=je(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),je(e)}}onDestroy(e){return kc(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){kc(this);let t=io(this),n=Wn(void 0),r;try{return e()}finally{io(t),Wn(n)}}get(e,t=Bc,n=Ke.Default){if(kc(this),e.hasOwnProperty($w))return e[$w](this);n=yd(n);let r,i=io(this),s=Wn(void 0);try{if(!(n&Ke.SkipSelf)){let a=this.records.get(e);if(a===void 0){let l=EA(e)&&Rg(e);l&&this.injectableDefInScope(l)?a=ta(Dm(e),ju):a=null,this.records.set(e,a)}if(a!=null)return this.hydrate(e,a)}let o=n&Ke.Self?_d():this.parent;return t=n&Ke.Optional&&t===Bc?null:t,o.get(e,t)}catch(o){if(o.name==="NullInjectorError"){if((o[Ku]=o[Ku]||[]).unshift(mr(e)),i)throw o;return nA(o,e,"R3InjectorError",this.source)}else throw o}finally{Wn(s),io(i)}}resolveInjectorInitializers(){let e=je(null),t=io(this),n=Wn(void 0),r;try{let i=this.get(Vc,xi,Ke.Self);for(let s of i)s()}finally{io(t),Wn(n),je(e)}}toString(){let e=[],t=this.records;for(let n of t.keys())e.push(mr(n));return`R3Injector[${e.join(", ")}]`}processProvider(e){e=kn(e);let t=ca(e)?e:kn(e&&e.provide),n=yA(e);if(!ca(e)&&e.multi===!0){let r=this.records.get(t);r||(r=ta(void 0,ju,!0),r.factory=()=>Cm(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t){let n=je(null);try{return t.value===ju&&(t.value=mA,t.value=t.factory()),typeof t.value=="object"&&t.value&&_A(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{je(n)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=kn(e.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function Dm(e){let t=Rg(e),n=t!==null?t.factory:Go(e);if(n!==null)return n;if(e instanceof pe)throw new $e(204,!1);if(e instanceof Function)return gA(e);throw new $e(204,!1)}function gA(e){if(e.length>0)throw new $e(204,!1);let t=jN(e);return t!==null?()=>t.factory(e):()=>new e}function yA(e){if(jb(e))return ta(void 0,e.useValue);{let t=$b(e);return ta(t,ju)}}function $b(e,t,n){let r;if(ca(e)){let i=kn(e);return Go(i)||Dm(i)}else if(jb(e))r=()=>kn(e.useValue);else if(pA(e))r=()=>e.useFactory(...Cm(e.deps||[]));else if(fA(e))r=()=>Ze(kn(e.useExisting));else{let i=kn(e&&(e.useClass||e.provide));if(vA(e))r=()=>new i(...Cm(e.deps));else return Go(i)||Dm(i)}return r}function kc(e){if(e.destroyed)throw new $e(205,!1)}function ta(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function vA(e){return!!e.deps}function _A(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function EA(e){return typeof e=="function"||typeof e=="object"&&e instanceof pe}function Im(e,t){for(let n of e)Array.isArray(n)?Im(n,t):n&&Ab(n)?Im(n.\u0275providers,t):t(n)}function Wb(e,t){e instanceof Uc&&kc(e);let n,r=io(e),i=Wn(void 0);try{return t()}finally{io(r),Wn(i)}}function Gb(){return Mb()!==void 0||QN()!=null}function zb(e){if(!Gb())throw new $e(-203,!1)}function wA(e){return typeof e=="function"}var Fi=0,_e=1,be=2,Rn=3,Or=4,Lr=5,Hc=6,Ju=7,jt=8,jc=9,Ri=10,sn=11,$c=12,Gw=13,pa=14,Pr=15,Yo=16,na=17,Ni=18,Jc=19,qb=20,oo=21,lm=22,Qu=23,Qn=24,sa=25,Vt=26,Yb=1,Ko=7,ed=8,la=9,xn=10;function Ti(e){return Array.isArray(e)&&typeof e[Yb]=="object"}function Bi(e){return Array.isArray(e)&&e[Yb]===!0}function Pg(e){return(e.flags&4)!==0}function ha(e){return e.componentOffset>-1}function Ed(e){return(e.flags&1)===1}function Kr(e){return!!e.template}function td(e){return(e[be]&512)!==0}function Qc(e){return(e[be]&256)===256}var Tm=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function Kb(e,t,n,r){t!==null?t.applyValueToInputSignal(t,r):e[n]=r}var ts=(()=>{let e=()=>Zb;return e.ngInherit=!0,e})();function Zb(e){return e.type.prototype.ngOnChanges&&(e.setInput=CA),bA}function bA(){let e=Jb(this),t=e?.current;if(t){let n=e.previous;if(n===zo)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function CA(e,t,n,r,i){let s=this.declaredInputs[r],o=Jb(e)||SA(e,{previous:zo,current:null}),a=o.current||(o.current={}),l=o.previous,c=l[s];a[s]=new Tm(c&&c.currentValue,n,l===zo),Kb(e,t,i,n)}var Xb="__ngSimpleChanges__";function Jb(e){return e[Xb]||null}function SA(e,t){return e[Xb]=t}var zw=null,pt=function(e,t=null,n){zw?.(e,t,n)},Qb="svg",DA="math";function er(e){for(;Array.isArray(e);)e=e[Fi];return e}function eC(e,t){return er(t[e])}function Xr(e,t){return er(t[e.index])}function kg(e,t){return e.data[t]}function wd(e,t){return e[t]}function gr(e,t){let n=t[e];return Ti(n)?n:n[Fi]}function IA(e){return(e[be]&4)===4}function Lg(e){return(e[be]&128)===128}function TA(e){return Bi(e[Rn])}function so(e,t){return t==null?null:e[t]}function tC(e){e[na]=0}function Fg(e){e[be]&1024||(e[be]|=1024,Lg(e)&&el(e))}function xA(e,t){for(;e>0;)t=t[pa],e--;return t}function bd(e){return!!(e[be]&9216||e[Qn]?.dirty)}function xm(e){e[Ri].changeDetectionScheduler?.notify(8),e[be]&64&&(e[be]|=1024),bd(e)&&el(e)}function el(e){e[Ri].changeDetectionScheduler?.notify(0);let t=Zo(e);for(;t!==null&&!(t[be]&8192||(t[be]|=8192,!Lg(t)));)t=Zo(t)}function nC(e,t){if(Qc(e))throw new $e(911,!1);e[oo]===null&&(e[oo]=[]),e[oo].push(t)}function RA(e,t){if(e[oo]===null)return;let n=e[oo].indexOf(t);n!==-1&&e[oo].splice(n,1)}function Zo(e){let t=e[Rn];return Bi(t)?t[Rn]:t}function rC(e){return e[Ju]??=[]}function iC(e){return e.cleanup??=[]}function NA(e,t,n,r){let i=rC(t);i.push(n),e.firstCreatePass&&iC(e).push(r,i.length-1)}var xe={lFrame:fC(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Rm=!1;function AA(){return xe.lFrame.elementDepthCount}function MA(){xe.lFrame.elementDepthCount++}function OA(){xe.lFrame.elementDepthCount--}function Bg(){return xe.bindingsEnabled}function PA(){return xe.skipHydrationRootTNode!==null}function kA(e){return xe.skipHydrationRootTNode===e}function LA(){xe.skipHydrationRootTNode=null}function Fe(){return xe.lFrame.lView}function Zt(){return xe.lFrame.tView}function Xt(e){return xe.lFrame.contextLView=e,e[jt]}function Jt(e){return xe.lFrame.contextLView=null,e}function tr(){let e=oC();for(;e!==null&&e.type===64;)e=e.parent;return e}function oC(){return xe.lFrame.currentTNode}function FA(){let e=xe.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function co(e,t){let n=xe.lFrame;n.currentTNode=e,n.isParent=t}function Vg(){return xe.lFrame.isParent}function sC(){xe.lFrame.isParent=!1}function aC(){return xe.lFrame.contextLView}function cC(){return Rm}function qw(e){let t=Rm;return Rm=e,t}function Ug(){let e=xe.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function BA(e){return xe.lFrame.bindingIndex=e}function tl(){return xe.lFrame.bindingIndex++}function VA(e){let t=xe.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function UA(){return xe.lFrame.inI18n}function HA(e,t){let n=xe.lFrame;n.bindingIndex=n.bindingRootIndex=e,Nm(t)}function jA(){return xe.lFrame.currentDirectiveIndex}function Nm(e){xe.lFrame.currentDirectiveIndex=e}function $A(e){let t=xe.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function lC(){return xe.lFrame.currentQueryIndex}function Hg(e){xe.lFrame.currentQueryIndex=e}function WA(e){let t=e[_e];return t.type===2?t.declTNode:t.type===1?e[Lr]:null}function uC(e,t,n){if(n&Ke.SkipSelf){let i=t,s=e;for(;(i=i.parent,i===null&&!(n&Ke.Host))&&(i=WA(s),!(i===null||(s=s[pa],i.type&10))););if(i===null)return!1;t=i,e=s}let r=xe.lFrame=dC();return r.currentTNode=t,r.lView=e,!0}function jg(e){let t=dC(),n=e[_e];xe.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function dC(){let e=xe.lFrame,t=e===null?null:e.child;return t===null?fC(e):t}function fC(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function pC(){let e=xe.lFrame;return xe.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var hC=pC;function $g(){let e=pC();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function GA(e){return(xe.lFrame.contextLView=xA(e,xe.lFrame.contextLView))[jt]}function lo(){return xe.lFrame.selectedIndex}function Xo(e){xe.lFrame.selectedIndex=e}function Wg(){let e=xe.lFrame;return kg(e.tView,e.selectedIndex)}function vr(){xe.lFrame.currentNamespace=Qb}function ns(){zA()}function zA(){xe.lFrame.currentNamespace=null}function qA(){return xe.lFrame.currentNamespace}var mC=!0;function Cd(){return mC}function Sd(e){mC=e}function YA(e,t,n){let{ngOnChanges:r,ngOnInit:i,ngDoCheck:s}=t.type.prototype;if(r){let o=Zb(t);(n.preOrderHooks??=[]).push(e,o),(n.preOrderCheckHooks??=[]).push(e,o)}i&&(n.preOrderHooks??=[]).push(0-e,i),s&&((n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s))}function Gg(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n<r;n++){let i=e.data[n].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:o,ngAfterViewInit:a,ngAfterViewChecked:l,ngOnDestroy:c}=i;s&&(e.contentHooks??=[]).push(-n,s),o&&((e.contentHooks??=[]).push(n,o),(e.contentCheckHooks??=[]).push(n,o)),a&&(e.viewHooks??=[]).push(-n,a),l&&((e.viewHooks??=[]).push(n,l),(e.viewCheckHooks??=[]).push(n,l)),c!=null&&(e.destroyHooks??=[]).push(n,c)}}function $u(e,t,n){gC(e,t,3,n)}function Wu(e,t,n,r){(e[be]&3)===n&&gC(e,t,n,r)}function um(e,t){let n=e[be];(n&3)===t&&(n&=16383,n+=1,e[be]=n)}function gC(e,t,n,r){let i=r!==void 0?e[na]&65535:0,s=r??-1,o=t.length-1,a=0;for(let l=i;l<o;l++)if(typeof t[l+1]=="number"){if(a=t[l],r!=null&&a>=r)break}else t[l]<0&&(e[na]+=65536),(a<s||s==-1)&&(KA(e,n,t,l),e[na]=(e[na]&4294901760)+l+2),l++}function Yw(e,t){pt(4,e,t);let n=je(null);try{t.call(e)}finally{je(n),pt(5,e,t)}}function KA(e,t,n,r){let i=n[r]<0,s=n[r+1],o=i?-n[r]:n[r],a=e[o];i?e[be]>>14<e[na]>>16&&(e[be]&3)===t&&(e[be]+=16384,Yw(a,s)):Yw(a,s)}var aa=-1,Jo=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n){this.factory=e,this.canSeeViewProviders=t,this.injectImpl=n}};function ZA(e){return e instanceof Jo}function XA(e){return(e.flags&8)!==0}function JA(e){return(e.flags&16)!==0}function QA(e,t,n){let r=0;for(;r<n.length;){let i=n[r];if(typeof i=="number"){if(i!==0)break;r++;let s=n[r++],o=n[r++],a=n[r++];e.setAttribute(t,o,a,s)}else{let s=i,o=n[++r];tM(s)?e.setProperty(t,s,o):e.setAttribute(t,s,o),r++}}return r}function eM(e){return e===3||e===4||e===6}function tM(e){return e.charCodeAt(0)===64}function ua(e,t){if(!(t===null||t.length===0))if(e===null||e.length===0)e=t.slice();else{let n=-1;for(let r=0;r<t.length;r++){let i=t[r];typeof i=="number"?n=i:n===0||(n===-1||n===2?Kw(e,n,i,null,t[++r]):Kw(e,n,i,null,null))}}return e}function Kw(e,t,n,r,i){let s=0,o=e.length;if(t===-1)o=-1;else for(;s<e.length;){let a=e[s++];if(typeof a=="number"){if(a===t){o=-1;break}else if(a>t){o=s-1;break}}}for(;s<e.length;){let a=e[s];if(typeof a=="number")break;if(a===n){if(r===null){i!==null&&(e[s+1]=i);return}else if(r===e[s+1]){e[s+2]=i;return}}s++,r!==null&&s++,i!==null&&s++}o!==-1&&(e.splice(o,0,t),s=o+1),e.splice(s++,0,n),r!==null&&e.splice(s++,0,r),i!==null&&e.splice(s++,0,i)}var dm={},Am=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){n=yd(n);let r=this.injector.get(e,dm,n);return r!==dm||t===dm?r:this.parentInjector.get(e,t,n)}};function yC(e){return e!==aa}function nd(e){return e&32767}function nM(e){return e>>16}function rd(e,t){let n=nM(e),r=t;for(;n>0;)r=r[pa],n--;return r}var Mm=!0;function id(e){let t=Mm;return Mm=e,t}var rM=256,vC=rM-1,_C=5,iM=0,qr={};function oM(e,t,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:n.hasOwnProperty(Fc)&&(r=n[Fc]),r==null&&(r=n[Fc]=iM++);let i=r&vC,s=1<<i;t.data[e+(i>>_C)]|=s}function od(e,t){let n=EC(e,t);if(n!==-1)return n;let r=t[_e];r.firstCreatePass&&(e.injectorIndex=t.length,fm(r.data,e),fm(t,null),fm(r.blueprint,null));let i=zg(e,t),s=e.injectorIndex;if(yC(i)){let o=nd(i),a=rd(i,t),l=a[_e].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=i,s}function fm(e,t){e.push(0,0,0,0,0,0,0,0,t)}function EC(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function zg(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,i=t;for(;i!==null;){if(r=DC(i),r===null)return aa;if(n++,i=i[pa],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return aa}function Om(e,t,n){oM(e,t,n)}function wC(e,t,n){if(n&Ke.Optional||e!==void 0)return e;Ag(t,"NodeInjector")}function bC(e,t,n,r){if(n&Ke.Optional&&r===void 0&&(r=null),(n&(Ke.Self|Ke.Host))===0){let i=e[jc],s=Wn(void 0);try{return i?i.get(t,r,n&Ke.Optional):Ob(t,r,n&Ke.Optional)}finally{Wn(s)}}return wC(r,t,n)}function CC(e,t,n,r=Ke.Default,i){if(e!==null){if(t[be]&2048&&!(r&Ke.Self)){let o=lM(e,t,n,r,qr);if(o!==qr)return o}let s=SC(e,t,n,r,qr);if(s!==qr)return s}return bC(t,n,r,i)}function SC(e,t,n,r,i){let s=aM(n);if(typeof s=="function"){if(!uC(t,e,r))return r&Ke.Host?wC(i,n,r):bC(t,n,r,i);try{let o;if(o=s(r),o==null&&!(r&Ke.Optional))Ag(n);else return o}finally{hC()}}else if(typeof s=="number"){let o=null,a=EC(e,t),l=aa,c=r&Ke.Host?t[Pr][Lr]:null;for((a===-1||r&Ke.SkipSelf)&&(l=a===-1?zg(e,t):t[a+8],l===aa||!Xw(r,!1)?a=-1:(o=t[_e],a=nd(l),t=rd(l,t)));a!==-1;){let h=t[_e];if(Zw(s,a,h.data)){let d=sM(a,t,n,o,r,c);if(d!==qr)return d}l=t[a+8],l!==aa&&Xw(r,t[_e].data[a+8]===c)&&Zw(s,a,t)?(o=h,a=nd(l),t=rd(l,t)):a=-1}}return i}function sM(e,t,n,r,i,s){let o=t[_e],a=o.data[e+8],l=r==null?ha(a)&&Mm:r!=o&&(a.type&3)!==0,c=i&Ke.Host&&s===a,h=Gu(a,o,n,l,c);return h!==null?Wc(t,o,h,a):qr}function Gu(e,t,n,r,i){let s=e.providerIndexes,o=t.data,a=s&1048575,l=e.directiveStart,c=e.directiveEnd,h=s>>20,d=r?a:a+h,f=i?a+h:c;for(let g=d;g<f;g++){let m=o[g];if(g<l&&n===m||g>=l&&m.type===n)return g}if(i){let g=o[l];if(g&&Kr(g)&&g.type===n)return l}return null}function Wc(e,t,n,r){let i=e[n],s=t.data;if(ZA(i)){let o=i;o.resolving&&qN(zN(s[n]));let a=id(o.canSeeViewProviders);o.resolving=!0;let l,c=o.injectImpl?Wn(o.injectImpl):null,h=uC(e,r,Ke.Default);try{i=e[n]=o.factory(void 0,s,e,r),t.firstCreatePass&&n>=r.directiveStart&&YA(n,s[n],t)}finally{c!==null&&Wn(c),id(a),o.resolving=!1,hC()}}return i}function aM(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(Fc)?e[Fc]:void 0;return typeof t=="number"?t>=0?t&vC:cM:t}function Zw(e,t,n){let r=1<<e;return!!(n[t+(e>>_C)]&r)}function Xw(e,t){return!(e&Ke.Self)&&!(e&Ke.Host&&t)}var $o=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return CC(this._tNode,this._lView,e,yd(n),t)}};function cM(){return new $o(tr(),Fe())}function Dd(e){return Tg(()=>{let t=e.prototype.constructor,n=t[Yu]||Pm(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let s=i[Yu]||Pm(i);if(s&&s!==n)return s;i=Object.getPrototypeOf(i)}return s=>new s})}function Pm(e){return xb(e)?()=>{let t=Pm(kn(e));return t&&t()}:Go(e)}function lM(e,t,n,r,i){let s=e,o=t;for(;s!==null&&o!==null&&o[be]&2048&&!td(o);){let a=SC(s,o,n,r|Ke.Self,qr);if(a!==qr)return a;let l=s.parent;if(!l){let c=o[qb];if(c){let h=c.get(n,qr,r);if(h!==qr)return h}l=DC(o),o=o[pa]}s=l}return i}function DC(e){let t=e[_e],n=t.type;return n===2?t.declTNode:n===1?e[Lr]:null}function Jw(e,t=null,n=null,r){let i=uM(e,t,n,r);return i.resolveInjectorInitializers(),i}function uM(e,t=null,n=null,r,i=new Set){let s=[n||xi,uA(e)];return r=r||(typeof e=="object"?void 0:mr(e)),new Uc(s,t||_d(),r||null,i)}var ht=class GE{static THROW_IF_NOT_FOUND=Bc;static NULL=new Xu;static create(t,n){if(Array.isArray(t))return Jw({name:""},n,t,"");{let r=t.name??"";return Jw({name:r},t.parent,t.providers,r)}}static \u0275prov=ne({token:GE,providedIn:"any",factory:()=>Ze(kb)});static __NG_ELEMENT_ID__=-1},dM=new pe("");dM.__NG_ELEMENT_ID__=e=>{let t=tr();if(t===null)throw new $e(204,!1);if(t.type&2)return t.value;if(e&Ke.Optional)return null;throw new $e(204,!1)};var IC=!1,qg=(()=>{class e{static __NG_ELEMENT_ID__=fM;static __NG_ENV_ID__=n=>n}return e})(),km=class extends qg{_lView;constructor(e){super(),this._lView=e}onDestroy(e){return nC(this._lView,e),()=>RA(this._lView,e)}};function fM(){return new km(Fe())}var Ai=class{},Id=new pe("",{providedIn:"root",factory:()=>!1}),TC=new pe(""),Yg=new pe(""),Td=(()=>{class e{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new Nr(!1);add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}has(n){return this.pendingTasks.has(n)}remove(n){this.pendingTasks.delete(n),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static \u0275prov=ne({token:e,providedIn:"root",factory:()=>new e})}return e})(),Lm=class extends J{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,Gb()&&(this.destroyRef=O(qg,{optional:!0})??void 0,this.pendingTasks=O(Td,{optional:!0})??void 0)}emit(e){let t=je(null);try{super.next(e)}finally{je(t)}}subscribe(e,t,n){let r=e,i=t||(()=>null),s=n;if(e&&typeof e=="object"){let a=e;r=a.next?.bind(a),i=a.error?.bind(a),s=a.complete?.bind(a)}this.__isAsync&&(i=this.wrapInTimeout(i),r&&(r=this.wrapInTimeout(r)),s&&(s=this.wrapInTimeout(s)));let o=super.subscribe({next:r,error:i,complete:s});return e instanceof ot&&e.add(o),o}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{e(t),n!==void 0&&this.pendingTasks?.remove(n)})}}},Je=Lm;function sd(...e){}function xC(e){let t,n;function r(){e=sd;try{n!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame=="function"&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function Qw(e){return queueMicrotask(()=>e()),()=>{e=sd}}var Kg="isAngularZone",ad=Kg+"_ID",pM=0,Le=class Yd{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Je(!1);onMicrotaskEmpty=new Je(!1);onStable=new Je(!1);onError=new Je(!1);constructor(t){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:s=IC}=t;if(typeof Zone>"u")throw new $e(908,!1);Zone.assertZonePatched();let o=this;o._nesting=0,o._outer=o._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(o._inner=o._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(o._inner=o._inner.fork(Zone.longStackTraceZoneSpec)),o.shouldCoalesceEventChangeDetection=!i&&r,o.shouldCoalesceRunChangeDetection=i,o.callbackScheduled=!1,o.scheduleInRootZone=s,gM(o)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Kg)===!0}static assertInAngularZone(){if(!Yd.isInAngularZone())throw new $e(909,!1)}static assertNotInAngularZone(){if(Yd.isInAngularZone())throw new $e(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,i){let s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+i,t,hM,sd,sd);try{return s.runTask(o,n,r)}finally{s.cancelTask(o)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}},hM={};function Zg(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function mM(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){xC(()=>{e.callbackScheduled=!1,Fm(e),e.isCheckStableRunning=!0,Zg(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Fm(e)}function gM(e){let t=()=>{mM(e)},n=pM++;e._inner=e._inner.fork({name:"angular",properties:{[Kg]:!0,[ad]:n,[ad+n]:!0},onInvokeTask:(r,i,s,o,a,l)=>{if(yM(l))return r.invokeTask(s,o,a,l);try{return eb(e),r.invokeTask(s,o,a,l)}finally{(e.shouldCoalesceEventChangeDetection&&o.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),tb(e)}},onInvoke:(r,i,s,o,a,l,c)=>{try{return eb(e),r.invoke(s,o,a,l,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!vM(l)&&t(),tb(e)}},onHasTask:(r,i,s,o)=>{r.hasTask(s,o),i===s&&(o.change=="microTask"?(e._hasPendingMicrotasks=o.microTask,Fm(e),Zg(e)):o.change=="macroTask"&&(e.hasPendingMacrotasks=o.macroTask))},onHandleError:(r,i,s,o)=>(r.handleError(s,o),e.runOutsideAngular(()=>e.onError.emit(o)),!1)})}function Fm(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function eb(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function tb(e){e._nesting--,Zg(e)}var cd=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Je;onMicrotaskEmpty=new Je;onStable=new Je;onError=new Je;run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function yM(e){return RC(e,"__ignore_ng_zone__")}function vM(e){return RC(e,"__scheduler_tick__")}function RC(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Mi=class{_console=console;handleError(e){this._console.error("ERROR",e)}},_M=new pe("",{providedIn:"root",factory:()=>{let e=O(Le),t=O(Mi);return n=>e.runOutsideAngular(()=>t.handleError(n))}});function EM(){return ma(tr(),Fe())}function ma(e,t){return new Ct(Xr(e,t))}var Ct=(()=>{class e{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=EM}return e})();function wM(e){return e instanceof Ct?e.nativeElement:e}function Vi(e,t){let n=cw(e),r=n[bi];return t?.equal&&(r.equal=t.equal),n.set=i=>Yh(r,i),n.update=i=>lw(r,i),n.asReadonly=bM.bind(n),n}function bM(){let e=this[bi];if(e.readonlyFn===void 0){let t=()=>this();t[bi]=e,e.readonlyFn=t}return e.readonlyFn}function CM(){return this._results[Symbol.iterator]()}var Bm=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new J}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let n=oA(e);(this._changesDetected=!iA(this._results,n,t))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=CM};function NC(e){return(e.flags&128)===128}var AC=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(AC||{}),Xg=new Map,SM=0;function DM(){return SM++}function IM(e){Xg.set(e[Jc],e)}function MC(e){return Xg.get(e)||null}function Vm(e){Xg.delete(e[Jc])}var Um=class{lViewId;nodeIndex;native;component;directives;localRefs;get lView(){return MC(this.lViewId)}constructor(e,t,n){this.lViewId=e,this.nodeIndex=t,this.native=n}};function OC(e){let t=pm(e);if(t){if(Ti(t)){let n=t,r,i,s;if(PC(e)){if(r=RM(n,e),r==-1)throw new Error("The provided component was not found in the application");i=e}else if(TM(e)){if(r=NM(n,e),r==-1)throw new Error("The provided directive was not found in the application");s=AM(r,n)}else if(r=rb(n,e),r==-1)return null;let o=er(n[r]),a=pm(o),l=a&&!Array.isArray(a)?a:nb(n,r,o);if(i&&l.component===void 0&&(l.component=i,Yr(l.component,l)),s&&l.directives===void 0){l.directives=s;for(let c=0;c<s.length;c++)Yr(s[c],l)}Yr(l.native,l),t=l}}else{let n=e,r=n;for(;r=r.parentNode;){let i=pm(r);if(i){let s=Array.isArray(i)?i:i.lView;if(!s)return null;let o=rb(s,n);if(o>=0){let a=er(s[o]),l=nb(s,o,a);Yr(a,l),t=l;break}}}}return t||null}function nb(e,t,n){return new Um(e[Jc],t,n)}var Hm="__ngContext__";function Yr(e,t){Ti(t)?(e[Hm]=t[Jc],IM(t)):e[Hm]=t}function pm(e){let t=e[Hm];return typeof t=="number"?MC(t):t||null}function PC(e){return e&&e.constructor&&e.constructor.\u0275cmp}function TM(e){return e&&e.constructor&&e.constructor.\u0275dir}function rb(e,t){let n=e[_e];for(let r=Vt;r<n.bindingStartIndex;r++)if(er(e[r])===t)return r;return-1}function xM(e){if(e.child)return e.child;if(e.next)return e.next;for(;e.parent&&!e.parent.next;)e=e.parent;return e.parent&&e.parent.next}function RM(e,t){let n=e[_e].components;if(n)for(let r=0;r<n.length;r++){let i=n[r];if(gr(i,e)[jt]===t)return i}else if(gr(Vt,e)[jt]===t)return Vt;return-1}function NM(e,t){let n=e[_e].firstChild;for(;n;){let r=n.directiveStart,i=n.directiveEnd;for(let s=r;s<i;s++)if(e[s]===t)return n.index;n=xM(n)}return-1}function AM(e,t){let n=t[_e].data[e];if(n.directiveStart===0)return xi;let r=[];for(let i=n.directiveStart;i<n.directiveEnd;i++){let s=t[i];PC(s)||r.push(s)}return r}function kC(e){return FC(e[$c])}function LC(e){return FC(e[Or])}function FC(e){for(;e!==null&&!Bi(e);)e=e[Or];return e}var jm;function BC(e){jm=e}function VC(){if(jm!==void 0)return jm;if(typeof document<"u")return document;throw new $e(210,!1)}var nl=new pe("",{providedIn:"root",factory:()=>MM}),MM="ng",Jg=new pe(""),rs=new pe("",{providedIn:"platform",factory:()=>"unknown"}),UC=new pe(""),Qg=new pe("",{providedIn:"root",factory:()=>VC().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null}),OM="h",PM="b",HC=!1,kM=new pe("",{providedIn:"root",factory:()=>HC}),ey=function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e}(ey||{}),ga=new pe(""),ib=new Set;function uo(e){ib.has(e)||(ib.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var jC=(()=>{class e{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=LM}return e})();function LM(){return new jC(Fe(),tr())}var ra=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(ra||{}),$C=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=ne({token:e,providedIn:"root",factory:()=>new e})}return e})(),FM=[ra.EarlyRead,ra.Write,ra.MixedReadWrite,ra.Read],BM=(()=>{class e{ngZone=O(Le);scheduler=O(Ai);errorHandler=O(Mi,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){O(ga,{optional:!0})}execute(){let n=this.sequences.size>0;n&&pt(16),this.executing=!0;for(let r of FM)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[r]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let s=i.hooks[r];return s(i.pipelinedValue)},i.snapshot))}catch(s){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(s)}this.executing=!1;for(let r of this.sequences)r.afterRun(),r.once&&(this.sequences.delete(r),r.destroy());for(let r of this.deferredRegistrations)this.sequences.add(r);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),n&&pt(17)}register(n){let{view:r}=n;r!==void 0?((r[sa]??=[]).push(n),el(r),r[be]|=8192):this.executing?this.deferredRegistrations.add(n):this.addSequence(n)}addSequence(n){this.sequences.add(n),this.scheduler.notify(7)}unregister(n){this.executing&&this.sequences.has(n)?(n.erroredOrDestroyed=!0,n.pipelinedValue=void 0,n.once=!0):(this.sequences.delete(n),this.deferredRegistrations.delete(n))}maybeTrace(n,r){return r?r.run(ey.AFTER_NEXT_RENDER,n):n()}static \u0275prov=ne({token:e,providedIn:"root",factory:()=>new e})}return e})(),$m=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,i,s=null){this.impl=e,this.hooks=t,this.view=n,this.once=r,this.snapshot=s,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[sa];e&&(this.view[sa]=e.filter(t=>t!==this))}};function ty(e,t){!t?.injector&&zb(ty);let n=t?.injector??O(ht);return uo("NgAfterRender"),WC(e,n,t,!1)}function Jr(e,t){!t?.injector&&zb(Jr);let n=t?.injector??O(ht);return uo("NgAfterNextRender"),WC(e,n,t,!0)}function VM(e,t){if(e instanceof Function){let n=[void 0,void 0,void 0,void 0];return n[t]=e,n}else return[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function WC(e,t,n,r){let i=t.get($C);i.impl??=t.get(BM);let s=t.get(ga,null,{optional:!0}),o=n?.phase??ra.MixedReadWrite,a=n?.manualCleanup!==!0?t.get(qg):null,l=t.get(jC,null,{optional:!0}),c=new $m(i.impl,VM(e,o),l?.view,r,a,s?.snapshot(null));return i.impl.register(c),c}var UM=()=>null;function GC(e,t,n=!1){return UM(e,t,n)}function zC(e,t){let n=e.contentQueries;if(n!==null){let r=je(null);try{for(let i=0;i<n.length;i+=2){let s=n[i],o=n[i+1];if(o!==-1){let a=e.data[o];Hg(s),a.contentQueries(2,t[o],o)}}}finally{je(r)}}}function Wm(e,t,n){Hg(0);let r=je(null);try{t(e,n)}finally{je(r)}}function ny(e,t,n){if(Pg(t)){let r=je(null);try{let i=t.directiveStart,s=t.directiveEnd;for(let o=i;o<s;o++){let a=e.data[o];if(a.contentQueries){let l=n[o];a.contentQueries(1,l,o)}}}finally{je(r)}}}var Zr=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}(Zr||{}),Bu;function HM(){if(Bu===void 0&&(Bu=null,Wo.trustedTypes))try{Bu=Wo.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Bu}function xd(e){return HM()?.createHTML(e)||e}var Vu;function jM(){if(Vu===void 0&&(Vu=null,Wo.trustedTypes))try{Vu=Wo.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Vu}function ob(e){return jM()?.createHTML(e)||e}var Oi=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Tb})`}},Gm=class extends Oi{getTypeName(){return"HTML"}},zm=class extends Oi{getTypeName(){return"Style"}},qm=class extends Oi{getTypeName(){return"Script"}},Ym=class extends Oi{getTypeName(){return"URL"}},Km=class extends Oi{getTypeName(){return"ResourceURL"}};function Qr(e){return e instanceof Oi?e.changingThisBreaksApplicationSecurity:e}function fo(e,t){let n=$M(e);if(n!=null&&n!==t){if(n==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${n} (see ${Tb})`)}return n===t}function $M(e){return e instanceof Oi&&e.getTypeName()||null}function qC(e){return new Gm(e)}function YC(e){return new zm(e)}function KC(e){return new qm(e)}function ZC(e){return new Ym(e)}function XC(e){return new Km(e)}function WM(e){let t=new Xm(e);return GM()?new Zm(t):t}var Zm=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(xd(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},Xm=class{defaultDoc;inertDocument;constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=xd(e),t}};function GM(){try{return!!new window.DOMParser().parseFromString(xd(""),"text/html")}catch{return!1}}var zM=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Rd(e){return e=String(e),e.match(zM)?e:"unsafe:"+e}function Ui(e){let t={};for(let n of e.split(","))t[n]=!0;return t}function rl(...e){let t={};for(let n of e)for(let r in n)n.hasOwnProperty(r)&&(t[r]=!0);return t}var JC=Ui("area,br,col,hr,img,wbr"),QC=Ui("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),eS=Ui("rp,rt"),qM=rl(eS,QC),YM=rl(QC,Ui("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),KM=rl(eS,Ui("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),sb=rl(JC,YM,KM,qM),tS=Ui("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),ZM=Ui("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),XM=Ui("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),JM=rl(tS,ZM,XM),QM=Ui("script,style,template"),Jm=class{sanitizedSomething=!1;buf=[];sanitizeChildren(e){let t=e.firstChild,n=!0,r=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild){r.push(t),t=nO(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let i=tO(t);if(i){t=i;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=ab(e).toLowerCase();if(!sb.hasOwnProperty(t))return this.sanitizedSomething=!0,!QM.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let n=e.attributes;for(let r=0;r<n.length;r++){let i=n.item(r),s=i.name,o=s.toLowerCase();if(!JM.hasOwnProperty(o)){this.sanitizedSomething=!0;continue}let a=i.value;tS[o]&&(a=Rd(a)),this.buf.push(" ",s,'="',cb(a),'"')}return this.buf.push(">"),!0}endElement(e){let t=ab(e).toLowerCase();sb.hasOwnProperty(t)&&!JC.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(cb(e))}};function eO(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function tO(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw nS(t);return t}function nO(e){let t=e.firstChild;if(t&&eO(e,t))throw nS(t);return t}function ab(e){let t=e.nodeName;return typeof t=="string"?t:"FORM"}function nS(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var rO=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,iO=/([^\#-~ |!])/g;function cb(e){return e.replace(/&/g,"&amp;").replace(rO,function(t){let n=t.charCodeAt(0),r=t.charCodeAt(1);return"&#"+((n-55296)*1024+(r-56320)+65536)+";"}).replace(iO,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Uu;function ry(e,t){let n=null;try{Uu=Uu||WM(e);let r=t?String(t):"";n=Uu.getInertBodyElement(r);let i=5,s=r;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,r=s,s=n.innerHTML,n=Uu.getInertBodyElement(r)}while(r!==s);let o=new Jm().sanitizeChildren(lb(n)||n);return xd(o)}finally{if(n){let r=lb(n)||n;for(;r.firstChild;)r.firstChild.remove()}}}function lb(e){return"content"in e&&oO(e)?e.content:null}function oO(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var ei=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(ei||{});function Fr(e){let t=rS();return t?ob(t.sanitize(ei.HTML,e)||""):fo(e,"HTML")?ob(Qr(e)):ry(VC(),Zc(e))}function an(e){let t=rS();return t?t.sanitize(ei.URL,e)||"":fo(e,"URL")?Qr(e):Rd(Zc(e))}function rS(){let e=Fe();return e&&e[Ri].sanitizer}var sO=/^>|^->|<!--|-->|--!>|<!-$/g,aO=/(<|>)/g,cO="\u200B$1\u200B";function lO(e){return e.replace(sO,t=>t.replace(aO,cO))}function iS(e){return e.ownerDocument.defaultView}function uO(e,t,n){let r=e.length;for(;;){let i=e.indexOf(t,n);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let s=t.length;if(i+s===r||e.charCodeAt(i+s)<=32)return i}n=i+1}}var oS="ng-template";function dO(e,t,n,r){let i=0;if(r){for(;i<t.length&&typeof t[i]=="string";i+=2)if(t[i]==="class"&&uO(t[i+1].toLowerCase(),n,0)!==-1)return!0}else if(iy(e))return!1;if(i=t.indexOf(1,i),i>-1){let s;for(;++i<t.length&&typeof(s=t[i])=="string";)if(s.toLowerCase()===n)return!0}return!1}function iy(e){return e.type===4&&e.value!==oS}function fO(e,t,n){let r=e.type===4&&!n?oS:e.value;return t===r}function pO(e,t,n){let r=4,i=e.attrs,s=i!==null?gO(i):0,o=!1;for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="number"){if(!o&&!Mr(r)&&!Mr(l))return!1;if(o&&Mr(l))continue;o=!1,r=l|r&1;continue}if(!o)if(r&4){if(r=2|r&1,l!==""&&!fO(e,l,n)||l===""&&t.length===1){if(Mr(r))return!1;o=!0}}else if(r&8){if(i===null||!dO(e,i,l,n)){if(Mr(r))return!1;o=!0}}else{let c=t[++a],h=hO(l,i,iy(e),n);if(h===-1){if(Mr(r))return!1;o=!0;continue}if(c!==""){let d;if(h>s?d="":d=i[h+1].toLowerCase(),r&2&&c!==d){if(Mr(r))return!1;o=!0}}}}return Mr(r)||o}function Mr(e){return(e&1)===0}function hO(e,t,n,r){if(t===null)return-1;let i=0;if(r||!n){let s=!1;for(;i<t.length;){let o=t[i];if(o===e)return i;if(o===3||o===6)s=!0;else if(o===1||o===2){let a=t[++i];for(;typeof a=="string";)a=t[++i];continue}else{if(o===4)break;if(o===0){i+=4;continue}}i+=s?1:2}return-1}else return yO(t,e)}function mO(e,t,n=!1){for(let r=0;r<t.length;r++)if(pO(e,t[r],n))return!0;return!1}function gO(e){for(let t=0;t<e.length;t++){let n=e[t];if(eM(n))return t}return e.length}function yO(e,t){let n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){let r=e[n];if(typeof r=="number")return-1;if(r===t)return n;n++}return-1}function ub(e,t){return e?":not("+t.trim()+")":t}function vO(e){let t=e[0],n=1,r=2,i="",s=!1;for(;n<e.length;){let o=e[n];if(typeof o=="string")if(r&2){let a=e[++n];i+="["+o+(a.length>0?'="'+a+'"':"")+"]"}else r&8?i+="."+o:r&4&&(i+=" "+o);else i!==""&&!Mr(o)&&(t+=ub(s,i),i=""),r=o,s=s||!Mr(r);n++}return i!==""&&(t+=ub(s,i)),t}function _O(e){return e.map(vO).join(",")}function EO(e){let t=[],n=[],r=1,i=2;for(;r<e.length;){let s=e[r];if(typeof s=="string")i===2?s!==""&&t.push(s,e[++r]):i===8&&n.push(s);else{if(!Mr(i))break;i=s}r++}return n.length&&t.push(1,...n),t}var Hi={};function wO(e,t){return e.createText(t)}function bO(e,t,n){e.setValue(t,n)}function CO(e,t){return e.createComment(lO(t))}function sS(e,t,n){return e.createElement(t,n)}function ld(e,t,n,r,i){e.insertBefore(t,n,r,i)}function aS(e,t,n){e.appendChild(t,n)}function db(e,t,n,r,i){r!==null?ld(e,t,n,r,i):aS(e,t,n)}function SO(e,t,n){e.removeChild(null,t,n)}function DO(e,t,n){e.setAttribute(t,"style",n)}function IO(e,t,n){n===""?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n)}function cS(e,t,n){let{mergedAttrs:r,classes:i,styles:s}=n;r!==null&&QA(e,t,r),i!==null&&IO(e,t,i),s!==null&&DO(e,t,s)}function oy(e,t,n,r,i,s,o,a,l,c,h){let d=Vt+r,f=d+i,g=TO(d,f),m=typeof c=="function"?c():c;return g[_e]={type:e,blueprint:g,template:n,queries:null,viewQuery:a,declTNode:t,data:g.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:f,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof s=="function"?s():s,pipeRegistry:typeof o=="function"?o():o,firstChild:null,schemas:l,consts:m,incompleteFirstPass:!1,ssrId:h}}function TO(e,t){let n=[];for(let r=0;r<t;r++)n.push(r<e?null:Hi);return n}function xO(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=oy(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function sy(e,t,n,r,i,s,o,a,l,c,h){let d=t.blueprint.slice();return d[Fi]=i,d[be]=r|4|128|8|64|1024,(c!==null||e&&e[be]&2048)&&(d[be]|=2048),tC(d),d[Rn]=d[pa]=e,d[jt]=n,d[Ri]=o||e&&e[Ri],d[sn]=a||e&&e[sn],d[jc]=l||e&&e[jc]||null,d[Lr]=s,d[Jc]=DM(),d[Hc]=h,d[qb]=c,d[Pr]=t.type==2?e[Pr]:d,d}function RO(e,t,n){let r=Xr(t,e),i=xO(n),s=e[Ri].rendererFactory,o=ay(e,sy(e,i,null,lS(n),r,t,null,s.createRenderer(r,n),null,null,null));return e[t.index]=o}function lS(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function uS(e,t,n,r){if(n===0)return-1;let i=t.length;for(let s=0;s<n;s++)t.push(r),e.blueprint.push(r),e.data.push(null);return i}function ay(e,t){return e[$c]?e[Gw][Or]=t:e[$c]=t,e[Gw]=t,t}function X(e=1){dS(Zt(),Fe(),lo()+e,!1)}function dS(e,t,n,r){if(!r)if((t[be]&3)===3){let i=e.preOrderCheckHooks;i!==null&&$u(t,i,n)}else{let i=e.preOrderHooks;i!==null&&Wu(t,i,0,n)}Xo(n)}var Nd=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(Nd||{});function Qm(e,t,n,r){let i=je(null);try{let[s,o,a]=e.inputs[n],l=null;(o&Nd.SignalBased)!==0&&(l=t[s][bi]),l!==null&&l.transformFn!==void 0?r=l.transformFn(r):a!==null&&(r=a.call(t,r)),e.setInput!==null?e.setInput(t,l,r,n,s):Kb(t,l,s,r)}finally{je(i)}}function fS(e,t,n,r,i){let s=lo(),o=r&2;try{Xo(-1),o&&t.length>Vt&&dS(e,t,Vt,!1),pt(o?2:0,i),n(r,i)}finally{Xo(s),pt(o?3:1,i)}}function Ad(e,t,n){kO(e,t,n),(n.flags&64)===64&&LO(e,t,n)}function cy(e,t,n=Xr){let r=t.localNames;if(r!==null){let i=t.index+1;for(let s=0;s<r.length;s+=2){let o=r[s+1],a=o===-1?n(t,e):e[o];e[i++]=a}}}function NO(e,t,n,r){let i=r.get(kM,HC)||n===Zr.ShadowDom,s=e.selectRootElement(t,i);return AO(s),s}function AO(e){MO(e)}var MO=()=>null;function OO(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function pS(e,t,n,r,i,s,o,a){if(!a&&uy(t,e,n,r,i)){ha(t)&&PO(n,t.index);return}if(t.type&3){let l=Xr(t,n);r=OO(r),i=o!=null?o(i,t.value||"",r):i,s.setProperty(l,r,i)}else t.type&12}function PO(e,t){let n=gr(t,e);n[be]&16||(n[be]|=64)}function kO(e,t,n){let r=n.directiveStart,i=n.directiveEnd;ha(n)&&RO(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||od(n,t);let s=n.initialInputs;for(let o=r;o<i;o++){let a=e.data[o],l=Wc(t,e,o,n);if(Yr(l,t),s!==null&&UO(t,o-r,l,a,n,s),Kr(a)){let c=gr(n.index,t);c[jt]=Wc(t,e,o,n)}}}function LO(e,t,n){let r=n.directiveStart,i=n.directiveEnd,s=n.index,o=jA();try{Xo(s);for(let a=r;a<i;a++){let l=e.data[a],c=t[a];Nm(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&FO(l,c)}}finally{Xo(-1),Nm(o)}}function FO(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function ly(e,t){let n=e.directiveRegistry,r=null;if(n)for(let i=0;i<n.length;i++){let s=n[i];mO(t,s.selectors,!1)&&(r??=[],Kr(s)?r.unshift(s):r.push(s))}return r}function BO(e,t,n,r,i,s){let o=Xr(e,t);VO(t[sn],o,s,e.value,n,r,i)}function VO(e,t,n,r,i,s,o){if(s==null)e.removeAttribute(t,i,n);else{let a=o==null?Zc(s):o(s,r||"",i);e.setAttribute(t,i,a,n)}}function UO(e,t,n,r,i,s){let o=s[t];if(o!==null)for(let a=0;a<o.length;a+=2){let l=o[a],c=o[a+1];Qm(r,n,l,c)}}function hS(e,t){let n=e[jc],r=n?n.get(Mi,null):null;r&&r.handleError(t)}function uy(e,t,n,r,i){let s=e.inputs?.[r],o=e.hostDirectiveInputs?.[r],a=!1;if(o)for(let l=0;l<o.length;l+=2){let c=o[l],h=o[l+1],d=t.data[c];Qm(d,n[c],h,i),a=!0}if(s)for(let l of s){let c=n[l],h=t.data[l];Qm(h,c,r,i),a=!0}return a}function HO(e,t){let n=gr(t,e),r=n[_e];jO(r,n);let i=n[Fi];i!==null&&n[Hc]===null&&(n[Hc]=GC(i,n[jc])),pt(18),dy(r,n,n[jt]),pt(19,n[jt])}function jO(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}function dy(e,t,n){jg(t);try{let r=e.viewQuery;r!==null&&Wm(1,r,n);let i=e.template;i!==null&&fS(e,t,i,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),t[Ni]?.finishViewCreation(e),e.staticContentQueries&&zC(e,t),e.staticViewQueries&&Wm(2,e.viewQuery,n);let s=e.components;s!==null&&$O(t,s)}catch(r){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),r}finally{t[be]&=-5,$g()}}function $O(e,t){for(let n=0;n<t.length;n++)HO(e,t[n])}function Md(e,t,n,r){let i=je(null);try{let s=t.tView,o=e[be]&4096?4096:16,a=sy(e,s,n,o,null,t,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null),l=e[t.index];a[Yo]=l;let c=e[Ni];return c!==null&&(a[Ni]=c.createEmbeddedView(s)),dy(s,a,n),a}finally{je(i)}}function Gc(e,t){return!t||t.firstChild===null||NC(e)}var WO;function fy(e,t){return WO(e,t)}var Pi=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Pi||{});function mS(e){return(e.flags&32)===32}function ia(e,t,n,r,i){if(r!=null){let s,o=!1;Bi(r)?s=r:Ti(r)&&(o=!0,r=r[Fi]);let a=er(r);e===0&&n!==null?i==null?aS(t,n,a):ld(t,n,a,i||null,!0):e===1&&n!==null?ld(t,n,a,i||null,!0):e===2?SO(t,a,o):e===3&&t.destroyNode(a),s!=null&&nP(t,e,s,n,i)}}function GO(e,t){gS(e,t),t[Fi]=null,t[Lr]=null}function zO(e,t,n,r,i,s){r[Fi]=i,r[Lr]=t,kd(e,r,n,1,i,s)}function gS(e,t){t[Ri].changeDetectionScheduler?.notify(9),kd(e,t,t[sn],2,null,null)}function qO(e){let t=e[$c];if(!t)return hm(e[_e],e);for(;t;){let n=null;if(Ti(t))n=t[$c];else{let r=t[xn];r&&(n=r)}if(!n){for(;t&&!t[Or]&&t!==e;)Ti(t)&&hm(t[_e],t),t=t[Rn];t===null&&(t=e),Ti(t)&&hm(t[_e],t),n=t&&t[Or]}t=n}}function py(e,t){let n=e[la],r=n.indexOf(t);n.splice(r,1)}function Od(e,t){if(Qc(t))return;let n=t[sn];n.destroyNode&&kd(e,t,n,3,null,null),qO(t)}function hm(e,t){if(Qc(t))return;let n=je(null);try{t[be]&=-129,t[be]|=256,t[Qn]&&qh(t[Qn]),KO(e,t),YO(e,t),t[_e].type===1&&t[sn].destroy();let r=t[Yo];if(r!==null&&Bi(t[Rn])){r!==t[Rn]&&py(r,t);let i=t[Ni];i!==null&&i.detachView(e)}Vm(t)}finally{je(n)}}function YO(e,t){let n=e.cleanup,r=t[Ju];if(n!==null)for(let o=0;o<n.length-1;o+=2)if(typeof n[o]=="string"){let a=n[o+3];a>=0?r[a]():r[-a].unsubscribe(),o+=2}else{let a=r[n[o+1]];n[o].call(a)}r!==null&&(t[Ju]=null);let i=t[oo];if(i!==null){t[oo]=null;for(let o=0;o<i.length;o++){let a=i[o];a()}}let s=t[Qu];if(s!==null){t[Qu]=null;for(let o of s)o.destroy()}}function KO(e,t){let n;if(e!=null&&(n=e.destroyHooks)!=null)for(let r=0;r<n.length;r+=2){let i=t[n[r]];if(!(i instanceof Jo)){let s=n[r+1];if(Array.isArray(s))for(let o=0;o<s.length;o+=2){let a=i[s[o]],l=s[o+1];pt(4,a,l);try{l.call(a)}finally{pt(5,a,l)}}else{pt(4,i,s);try{s.call(i)}finally{pt(5,i,s)}}}}}function ZO(e,t,n){return XO(e,t.parent,n)}function XO(e,t,n){let r=t;for(;r!==null&&r.type&168;)t=r,r=t.parent;if(r===null)return n[Fi];if(ha(r)){let{encapsulation:i}=e.data[r.directiveStart+r.componentOffset];if(i===Zr.None||i===Zr.Emulated)return null}return Xr(r,n)}function JO(e,t,n){return eP(e,t,n)}function QO(e,t,n){return e.type&40?Xr(e,n):null}var eP=QO,fb;function Pd(e,t,n,r){let i=ZO(e,r,t),s=t[sn],o=r.parent||t[Lr],a=JO(o,r,t);if(i!=null)if(Array.isArray(n))for(let l=0;l<n.length;l++)db(s,i,n[l],a,!1);else db(s,i,n,a,!1);fb!==void 0&&fb(s,r,t,n,i)}function Lc(e,t){if(t!==null){let n=t.type;if(n&3)return Xr(t,e);if(n&4)return eg(-1,e[t.index]);if(n&8){let r=t.child;if(r!==null)return Lc(e,r);{let i=e[t.index];return Bi(i)?eg(-1,i):er(i)}}else{if(n&128)return Lc(e,t.next);if(n&32)return fy(t,e)()||er(e[t.index]);{let r=yS(e,t);if(r!==null){if(Array.isArray(r))return r[0];let i=Zo(e[Pr]);return Lc(i,r)}else return Lc(e,t.next)}}}return null}function yS(e,t){if(t!==null){let n=e[Pr][Lr],r=t.projection;return n.projection[r]}return null}function eg(e,t){let n=xn+e+1;if(n<t.length){let r=t[n],i=r[_e].firstChild;if(i!==null)return Lc(r,i)}return t[Ko]}function hy(e,t,n,r,i,s,o){for(;n!=null;){if(n.type===128){n=n.next;continue}let a=r[n.index],l=n.type;if(o&&t===0&&(a&&Yr(er(a),r),n.flags|=2),!mS(n))if(l&8)hy(e,t,n.child,r,i,s,!1),ia(t,e,i,a,s);else if(l&32){let c=fy(n,r),h;for(;h=c();)ia(t,e,i,h,s);ia(t,e,i,a,s)}else l&16?tP(e,t,r,n,i,s):ia(t,e,i,a,s);n=o?n.projectionNext:n.next}}function kd(e,t,n,r,i,s){hy(n,r,e.firstChild,t,i,s,!1)}function tP(e,t,n,r,i,s){let o=n[Pr],a=o[Lr].projection[r.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++){let c=a[l];ia(t,e,i,c,s)}else{let l=a,c=o[Rn];NC(r)&&(l.flags|=128),hy(e,t,l,c,i,s,!0)}}function nP(e,t,n,r,i){let s=n[Ko],o=er(n);s!==o&&ia(t,e,r,s,i);for(let a=xn;a<n.length;a++){let l=n[a];kd(l[_e],l,e,t,r,s)}}function rP(e,t,n,r,i){if(t)i?e.addClass(n,r):e.removeClass(n,r);else{let s=r.indexOf("-")===-1?void 0:Pi.DashCase;i==null?e.removeStyle(n,r,s):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),s|=Pi.Important),e.setStyle(n,r,i,s))}}function ud(e,t,n,r,i=!1){for(;n!==null;){if(n.type===128){n=i?n.projectionNext:n.next;continue}let s=t[n.index];s!==null&&r.push(er(s)),Bi(s)&&iP(s,r);let o=n.type;if(o&8)ud(e,t,n.child,r);else if(o&32){let a=fy(n,t),l;for(;l=a();)r.push(l)}else if(o&16){let a=yS(t,n);if(Array.isArray(a))r.push(...a);else{let l=Zo(t[Pr]);ud(l[_e],l,a,r,!0)}}n=i?n.projectionNext:n.next}return r}function iP(e,t){for(let n=xn;n<e.length;n++){let r=e[n],i=r[_e].firstChild;i!==null&&ud(r[_e],r,i,t)}e[Ko]!==e[Fi]&&t.push(e[Ko])}function vS(e){if(e[sa]!==null){for(let t of e[sa])t.impl.addSequence(t);e[sa].length=0}}var _S=[];function oP(e){return e[Qn]??sP(e)}function sP(e){let t=_S.pop()??Object.create(cP);return t.lView=e,t}function aP(e){e.lView[Qn]!==e&&(e.lView=null,_S.push(e))}var cP=te(w({},lu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{el(e.lView)},consumerOnSignalRead(){this.lView[Qn]=this}});function lP(e){let t=e[Qn]??Object.create(uP);return t.lView=e,t}var uP=te(w({},lu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=Zo(e.lView);for(;t&&!ES(t[_e]);)t=Zo(t);t&&Fg(t)},consumerOnSignalRead(){this.lView[Qn]=this}});function ES(e){return e.type!==2}function wS(e){if(e[Qu]===null)return;let t=!0;for(;t;){let n=!1;for(let r of e[Qu])r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));t=n&&!!(e[be]&8192)}}var dP=100;function bS(e,t=!0,n=0){let r=e[Ri].rendererFactory,i=!1;i||r.begin?.();try{fP(e,n)}catch(s){throw t&&hS(e,s),s}finally{i||r.end?.()}}function fP(e,t){let n=cC();try{qw(!0),tg(e,t);let r=0;for(;bd(e);){if(r===dP)throw new $e(103,!1);r++,tg(e,1)}}finally{qw(n)}}function pP(e,t,n,r){if(Qc(t))return;let i=t[be],s=!1,o=!1;jg(t);let a=!0,l=null,c=null;s||(ES(e)?(c=oP(t),l=Gh(c)):XE()===null?(a=!1,c=lP(t),l=Gh(c)):t[Qn]&&(qh(t[Qn]),t[Qn]=null));try{tC(t),BA(e.bindingStartIndex),n!==null&&fS(e,t,n,2,r);let h=(i&3)===3;if(!s)if(h){let g=e.preOrderCheckHooks;g!==null&&$u(t,g,null)}else{let g=e.preOrderHooks;g!==null&&Wu(t,g,0,null),um(t,0)}if(o||hP(t),wS(t),CS(t,0),e.contentQueries!==null&&zC(e,t),!s)if(h){let g=e.contentCheckHooks;g!==null&&$u(t,g)}else{let g=e.contentHooks;g!==null&&Wu(t,g,1),um(t,1)}gP(e,t);let d=e.components;d!==null&&DS(t,d,0);let f=e.viewQuery;if(f!==null&&Wm(2,f,r),!s)if(h){let g=e.viewCheckHooks;g!==null&&$u(t,g)}else{let g=e.viewHooks;g!==null&&Wu(t,g,2),um(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[lm]){for(let g of t[lm])g();t[lm]=null}s||(vS(t),t[be]&=-73)}catch(h){throw s||el(t),h}finally{c!==null&&(tw(c,l),a&&aP(c)),$g()}}function CS(e,t){for(let n=kC(e);n!==null;n=LC(n))for(let r=xn;r<n.length;r++){let i=n[r];SS(i,t)}}function hP(e){for(let t=kC(e);t!==null;t=LC(t)){if(!(t[be]&2))continue;let n=t[la];for(let r=0;r<n.length;r++){let i=n[r];Fg(i)}}}function mP(e,t,n){pt(18);let r=gr(t,e);SS(r,n),pt(19,r[jt])}function SS(e,t){Lg(e)&&tg(e,t)}function tg(e,t){let n=e[_e],r=e[be],i=e[Qn],s=!!(t===0&&r&16);if(s||=!!(r&64&&t===0),s||=!!(r&1024),s||=!!(i?.dirty&&zh(i)),s||=!1,i&&(i.dirty=!1),e[be]&=-9217,s)pP(n,e,n.template,e[jt]);else if(r&8192){wS(e),CS(e,1);let o=n.components;o!==null&&DS(e,o,1),vS(e)}}function DS(e,t,n){for(let r=0;r<t.length;r++)mP(e,t[r],n)}function gP(e,t){let n=e.hostBindingOpCodes;if(n!==null)try{for(let r=0;r<n.length;r++){let i=n[r];if(i<0)Xo(~i);else{let s=i,o=n[++r],a=n[++r];HA(o,s);let l=t[s];pt(24,l),a(2,l),pt(25,l)}}}finally{Xo(-1)}}function my(e,t){let n=cC()?64:1088;for(e[Ri].changeDetectionScheduler?.notify(t);e;){e[be]|=n;let r=Zo(e);if(td(e)&&!r)return e;e=r}return null}function IS(e,t,n,r){return[e,!0,0,t,null,r,null,n,null,null]}function TS(e,t){let n=xn+t;if(n<e.length)return e[n]}function Ld(e,t,n,r=!0){let i=t[_e];if(yP(i,t,e,n),r){let o=eg(n,e),a=t[sn],l=a.parentNode(e[Ko]);l!==null&&zO(i,e[Lr],a,t,l,o)}let s=t[Hc];s!==null&&s.firstChild!==null&&(s.firstChild=null)}function xS(e,t){let n=zc(e,t);return n!==void 0&&Od(n[_e],n),n}function zc(e,t){if(e.length<=xn)return;let n=xn+t,r=e[n];if(r){let i=r[Yo];i!==null&&i!==e&&py(i,r),t>0&&(e[n-1][Or]=r[Or]);let s=Zu(e,xn+t);GO(r[_e],r);let o=s[Ni];o!==null&&o.detachView(s[_e]),r[Rn]=null,r[Or]=null,r[be]&=-129}return r}function yP(e,t,n,r){let i=xn+r,s=n.length;r>0&&(n[i-1][Or]=t),r<s-xn?(t[Or]=n[i],Pb(n,xn+r,t)):(n.push(t),t[Or]=null),t[Rn]=n;let o=t[Yo];o!==null&&n!==o&&RS(o,t);let a=t[Ni];a!==null&&a.insertView(e),xm(t),t[be]|=128}function RS(e,t){let n=e[la],r=t[Rn];if(Ti(r))e[be]|=2;else{let i=r[Rn][Pr];t[Pr]!==i&&(e[be]|=2)}n===null?e[la]=[t]:n.push(t)}var Qo=class{_lView;_cdRefInjectingView;notifyErrorHandler;_appRef=null;_attachedToViewContainer=!1;get rootNodes(){let e=this._lView,t=e[_e];return ud(t,e,t.firstChild,[])}constructor(e,t,n=!0){this._lView=e,this._cdRefInjectingView=t,this.notifyErrorHandler=n}get context(){return this._lView[jt]}get dirty(){return!!(this._lView[be]&9280)||!!this._lView[Qn]?.dirty}set context(e){this._lView[jt]=e}get destroyed(){return Qc(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Rn];if(Bi(e)){let t=e[ed],n=t?t.indexOf(this):-1;n>-1&&(zc(e,n),Zu(t,n))}this._attachedToViewContainer=!1}Od(this._lView[_e],this._lView)}onDestroy(e){nC(this._lView,e)}markForCheck(){my(this._cdRefInjectingView||this._lView,4)}markForRefresh(){Fg(this._cdRefInjectingView||this._lView)}detach(){this._lView[be]&=-129}reattach(){xm(this._lView),this._lView[be]|=128}detectChanges(){this._lView[be]|=1024,bS(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new $e(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=td(this._lView),t=this._lView[Yo];t!==null&&!e&&py(t,this._lView),gS(this._lView[_e],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new $e(902,!1);this._appRef=e;let t=td(this._lView),n=this._lView[Yo];n!==null&&!t&&RS(n,this._lView),xm(this._lView)}},kr=(()=>{class e{static __NG_ELEMENT_ID__=EP}return e})(),vP=kr,_P=class extends vP{_declarationLView;_declarationTContainer;elementRef;constructor(e,t,n){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,n){let r=Md(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n});return new Qo(r)}};function EP(){return Fd(tr(),Fe())}function Fd(e,t){return e.type&4?new _P(t,e,ma(e,t)):null}function il(e,t,n,r,i){let s=e.data[t];if(s===null)s=wP(e,t,n,r,i),UA()&&(s.flags|=32);else if(s.type&64){s.type=n,s.value=r,s.attrs=i;let o=FA();s.injectorIndex=o===null?-1:o.injectorIndex}return co(s,!0),s}function wP(e,t,n,r,i){let s=oC(),o=Vg(),a=o?s:s&&s.parent,l=e.data[t]=CP(e,a,n,t,r,i);return bP(e,l,s,o),l}function bP(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function CP(e,t,n,r,i,s){let o=t?t.injectorIndex:-1,a=0;return PA()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:o,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:s,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var lW=new RegExp(`^(\\d+)*(${PM}|${OM})*(.*)`),SP=()=>null;function qc(e,t){return SP(e,t)}var ng=class{},dd=class{},rg=class{resolveComponentFactory(e){throw Error(`No component factory found for ${mr(e)}.`)}},ao=class{static NULL=new rg},pn=class{},ya=(()=>{class e{destroyNode=null;static __NG_ELEMENT_ID__=()=>DP()}return e})();function DP(){let e=Fe(),t=tr(),n=gr(t.index,e);return(Ti(n)?n:e)[sn]}var IP=(()=>{class e{static \u0275prov=ne({token:e,providedIn:"root",factory:()=>null})}return e})();function ig(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,s=0;if(t!==null)for(let o=0;o<t.length;o++){let a=t[o];if(typeof a=="number")s=a;else if(s==1)i=Vw(i,a);else if(s==2){let l=a,c=t[++o];r=Vw(r,l+": "+c+";")}}n?e.styles=r:e.stylesWithoutHost=r,n?e.classes=i:e.classesWithoutHost=i}function Mt(e,t=Ke.Default){let n=Fe();if(n===null)return Ze(e,t);let r=tr();return CC(r,n,kn(e),t)}function gy(e,t,n,r,i){let s=r===null?null:{"":-1},o=i(e,n);if(o!==null){let a,l=null,c=null,h=xP(o);h===null?a=o:[a,l,c]=h,AP(e,t,n,a,s,l,c)}s!==null&&r!==null&&TP(n,r,s)}function TP(e,t,n){let r=e.localNames=[];for(let i=0;i<t.length;i+=2){let s=n[t[i+1]];if(s==null)throw new $e(-301,!1);r.push(t[i],s)}}function xP(e){let t=null,n=!1;for(let o=0;o<e.length;o++){let a=e[o];if(o===0&&Kr(a)&&(t=a),a.findHostDirectiveDefs!==null){n=!0;break}}if(!n)return null;let r=null,i=null,s=null;for(let o of e)o.findHostDirectiveDefs!==null&&(r??=[],i??=new Map,s??=new Map,RP(o,r,s,i)),o===t&&(r??=[],r.push(o));return r!==null?(r.push(...t===null?e:e.slice(1)),[r,i,s]):null}function RP(e,t,n,r){let i=t.length;e.findHostDirectiveDefs(e,t,r),n.set(e,[i,t.length-1])}function NP(e,t,n){t.componentOffset=n,(e.components??=[]).push(t.index)}function AP(e,t,n,r,i,s,o){let a=r.length,l=!1;for(let f=0;f<a;f++){let g=r[f];!l&&Kr(g)&&(l=!0,NP(e,n,f)),Om(od(n,t),e,g.type)}FP(n,e.data.length,a);for(let f=0;f<a;f++){let g=r[f];g.providersResolver&&g.providersResolver(g)}let c=!1,h=!1,d=uS(e,t,a,null);a>0&&(n.directiveToIndex=new Map);for(let f=0;f<a;f++){let g=r[f];if(n.mergedAttrs=ua(n.mergedAttrs,g.hostAttrs),OP(e,n,t,d,g),LP(d,g,i),o!==null&&o.has(g)){let[b,x]=o.get(g);n.directiveToIndex.set(g.type,[d,b+n.directiveStart,x+n.directiveStart])}else(s===null||!s.has(g))&&n.directiveToIndex.set(g.type,d);g.contentQueries!==null&&(n.flags|=4),(g.hostBindings!==null||g.hostAttrs!==null||g.hostVars!==0)&&(n.flags|=64);let m=g.type.prototype;!c&&(m.ngOnChanges||m.ngOnInit||m.ngDoCheck)&&((e.preOrderHooks??=[]).push(n.index),c=!0),!h&&(m.ngOnChanges||m.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(n.index),h=!0),d++}MP(e,n,s)}function MP(e,t,n){for(let r=t.directiveStart;r<t.directiveEnd;r++){let i=e.data[r];if(n===null||!n.has(i))pb(0,t,i,r),pb(1,t,i,r),mb(t,r,!1);else{let s=n.get(i);hb(0,t,s,r),hb(1,t,s,r),mb(t,r,!0)}}}function pb(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o;e===0?o=t.inputs??={}:o=t.outputs??={},o[s]??=[],o[s].push(r),NS(t,s)}}function hb(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o=i[s],a;e===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[o]??=[],a[o].push(r,s),NS(t,o)}}function NS(e,t){t==="class"?e.flags|=8:t==="style"&&(e.flags|=16)}function mb(e,t,n){let{attrs:r,inputs:i,hostDirectiveInputs:s}=e;if(r===null||!n&&i===null||n&&s===null||iy(e)){e.initialInputs??=[],e.initialInputs.push(null);return}let o=null,a=0;for(;a<r.length;){let l=r[a];if(l===0){a+=4;continue}else if(l===5){a+=2;continue}else if(typeof l=="number")break;if(!n&&i.hasOwnProperty(l)){let c=i[l];for(let h of c)if(h===t){o??=[],o.push(l,r[a+1]);break}}else if(n&&s.hasOwnProperty(l)){let c=s[l];for(let h=0;h<c.length;h+=2)if(c[h]===t){o??=[],o.push(c[h+1],r[a+1]);break}}a+=2}e.initialInputs??=[],e.initialInputs.push(o)}function OP(e,t,n,r,i){e.data[r]=i;let s=i.factory||(i.factory=Go(i.type,!0)),o=new Jo(s,Kr(i),Mt);e.blueprint[r]=o,n[r]=o,PP(e,t,r,uS(e,n,i.hostVars,Hi),i)}function PP(e,t,n,r,i){let s=i.hostBindings;if(s){let o=e.hostBindingOpCodes;o===null&&(o=e.hostBindingOpCodes=[]);let a=~t.index;kP(o)!=a&&o.push(a),o.push(n,r,s)}}function kP(e){let t=e.length;for(;t>0;){let n=e[--t];if(typeof n=="number"&&n<0)return n}return 0}function LP(e,t,n){if(n){if(t.exportAs)for(let r=0;r<t.exportAs.length;r++)n[t.exportAs[r]]=e;Kr(t)&&(n[""]=e)}}function FP(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function AS(e,t,n,r,i,s,o,a){let l=t.consts,c=so(l,o),h=il(t,e,2,r,c);return s&&gy(t,n,h,so(l,a),i),h.mergedAttrs=ua(h.mergedAttrs,h.attrs),h.attrs!==null&&ig(h,h.attrs,!1),h.mergedAttrs!==null&&ig(h,h.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,h),h}function MS(e,t){Gg(e,t),Pg(t)&&e.queries.elementEnd(t)}var og=class extends ao{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=qo(e);return new Yc(t,this.ngModule)}};function BP(e){return Object.keys(e).map(t=>{let[n,r,i]=e[t],s={propName:n,templateName:t,isSignal:(r&Nd.SignalBased)!==0};return i&&(s.transform=i),s})}function VP(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function UP(e,t,n){let r=t instanceof Gn?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new Am(n,r):n}function HP(e){let t=e.get(pn,null);if(t===null)throw new $e(407,!1);let n=e.get(IP,null),r=e.get(Ai,null);return{rendererFactory:t,sanitizer:n,changeDetectionScheduler:r}}function jP(e,t){let n=(e.selectors[0][0]||"div").toLowerCase();return sS(t,n,n==="svg"?Qb:n==="math"?DA:null)}var Yc=class extends dd{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;get inputs(){return BP(this.componentDef.inputs)}get outputs(){return VP(this.componentDef.outputs)}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=_O(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r){pt(22);let i=je(null);try{let s=this.componentDef,o=n?["ng-version","19.2.0"]:EO(this.componentDef.selectors[0]),a=oy(0,null,null,1,0,null,null,null,null,[o],null),l=UP(s,r||this.ngModule,e),c=HP(l),h=c.rendererFactory.createRenderer(null,s),d=n?NO(h,n,s.encapsulation,l):jP(s,h),f=sy(null,a,null,512|lS(s),null,null,c,h,l,null,GC(d,l,!0));f[Vt]=d,jg(f);let g=null;try{let m=AS(Vt,a,f,"#host",()=>[this.componentDef],!0,0);d&&(cS(h,d,m),Yr(d,f)),Ad(a,f,m),ny(a,m,f),MS(a,m),t!==void 0&&$P(m,this.ngContentSelectors,t),g=gr(m.index,f),f[jt]=g[jt],dy(a,f,null)}catch(m){throw g!==null&&Vm(g),Vm(f),m}finally{pt(23),$g()}return new sg(this.componentType,f)}finally{je(i)}}},sg=class extends ng{_rootLView;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t){super(),this._rootLView=t,this._tNode=kg(t[_e],Vt),this.location=ma(this._tNode,t),this.instance=gr(this._tNode.index,t)[jt],this.hostView=this.changeDetectorRef=new Qo(t,void 0,!1),this.componentType=e}setInput(e,t){let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView,i=uy(n,r[_e],r,e,t);this.previousInputValues.set(e,t);let s=gr(n.index,r);my(s,1)}get injector(){return new $o(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function $P(e,t,n){let r=e.projection=[];for(let i=0;i<t.length;i++){let s=n[i];r.push(s!=null&&s.length?Array.from(s):null)}}var Br=(()=>{class e{static __NG_ELEMENT_ID__=WP}return e})();function WP(){let e=tr();return PS(e,Fe())}var GP=Br,OS=class extends GP{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return ma(this._hostTNode,this._hostLView)}get injector(){return new $o(this._hostTNode,this._hostLView)}get parentInjector(){let e=zg(this._hostTNode,this._hostLView);if(yC(e)){let t=rd(e,this._hostLView),n=nd(e),r=t[_e].data[n+8];return new $o(r,t)}else return new $o(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=gb(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-xn}createEmbeddedView(e,t,n){let r,i;typeof n=="number"?r=n:n!=null&&(r=n.index,i=n.injector);let s=qc(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,s);return this.insertImpl(o,r,Gc(this._hostTNode,s)),o}createComponent(e,t,n,r,i){let s=e&&!wA(e),o;if(s)o=t;else{let g=t||{};o=g.index,n=g.injector,r=g.projectableNodes,i=g.environmentInjector||g.ngModuleRef}let a=s?e:new Yc(qo(e)),l=n||this.parentInjector;if(!i&&a.ngModule==null){let g=(s?l:this.parentInjector).get(Gn,null);g&&(i=g)}let c=qo(a.componentType??{}),h=qc(this._lContainer,c?.id??null),d=h?.firstChild??null,f=a.create(l,r,d,i);return this.insertImpl(f.hostView,o,Gc(this._hostTNode,h)),f}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,n){let r=e._lView;if(TA(r)){let o=this.indexOf(e);if(o!==-1)this.detach(o);else{let a=r[Rn],l=new OS(a,a[Lr],a[Rn]);l.detach(l.indexOf(e))}}let i=this._adjustIndex(t),s=this._lContainer;return Ld(s,r,i,n),e.attachToViewContainerRef(),Pb(mm(s),i,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=gb(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=zc(this._lContainer,t);n&&(Zu(mm(this._lContainer),t),Od(n[_e],n))}detach(e){let t=this._adjustIndex(e,-1),n=zc(this._lContainer,t);return n&&Zu(mm(this._lContainer),t)!=null?new Qo(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function gb(e){return e[ed]}function mm(e){return e[ed]||(e[ed]=[])}function PS(e,t){let n,r=t[e.index];return Bi(r)?n=r:(n=IS(r,t,null,e),t[e.index]=n,ay(t,n)),qP(n,t,e,r),new OS(n,e,t)}function zP(e,t){let n=e[sn],r=n.createComment(""),i=Xr(t,e),s=n.parentNode(i);return ld(n,s,r,n.nextSibling(i),!1),r}var qP=ZP,YP=()=>!1;function KP(e,t,n){return YP(e,t,n)}function ZP(e,t,n,r){if(e[Ko])return;let i;n.type&8?i=er(r):i=zP(t,n),e[Ko]=i}var ag=class WE{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new WE(this.queryList)}setDirty(){this.queryList.setDirty()}},cg=class sI{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries!==null?t.contentQueries[0]:n.length,i=[];for(let s=0;s<r;s++){let o=n.getByIndex(s),a=this.queries[o.indexInDeclarationView];i.push(a.clone())}return new sI(i)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}finishViewCreation(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let n=0;n<this.queries.length;n++)yy(t,n).matches!==null&&this.queries[n].setDirty()}},lg=class{flags;read;predicate;constructor(e,t,n=null){this.flags=t,this.read=n,typeof e=="string"?this.predicate=i1(e):this.predicate=e}},ug=class oI{queries;constructor(t=[]){this.queries=t}elementStart(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].elementStart(t,n)}elementEnd(t){for(let n=0;n<this.queries.length;n++)this.queries[n].elementEnd(t)}embeddedTView(t){let n=null;for(let r=0;r<this.length;r++){let i=n!==null?n.length:0,s=this.getByIndex(r).embeddedTView(t,i);s&&(s.indexInDeclarationView=r,n!==null?n.push(s):n=[s])}return n!==null?new oI(n):null}template(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].template(t,n)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}},dg=class aI{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(t,n=-1){this.metadata=t,this._declarationNodeIndex=n}elementStart(t,n){this.isApplyingToNode(n)&&this.matchTNode(t,n)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,n){this.elementStart(t,n)}embeddedTView(t,n){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,n),new aI(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let n=this._declarationNodeIndex,r=t.parent;for(;r!==null&&r.type&8&&r.index!==n;)r=r.parent;return n===(r!==null?r.index:-1)}return this._appliesToNextNode}matchTNode(t,n){let r=this.metadata.predicate;if(Array.isArray(r))for(let i=0;i<r.length;i++){let s=r[i];this.matchTNodeWithReadOption(t,n,XP(n,s)),this.matchTNodeWithReadOption(t,n,Gu(n,t,s,!1,!1))}else r===kr?n.type&4&&this.matchTNodeWithReadOption(t,n,-1):this.matchTNodeWithReadOption(t,n,Gu(n,t,r,!1,!1))}matchTNodeWithReadOption(t,n,r){if(r!==null){let i=this.metadata.read;if(i!==null)if(i===Ct||i===Br||i===kr&&n.type&4)this.addMatch(n.index,-2);else{let s=Gu(n,t,i,!1,!1);s!==null&&this.addMatch(n.index,s)}else this.addMatch(n.index,r)}}addMatch(t,n){this.matches===null?this.matches=[t,n]:this.matches.push(t,n)}};function XP(e,t){let n=e.localNames;if(n!==null){for(let r=0;r<n.length;r+=2)if(n[r]===t)return n[r+1]}return null}function JP(e,t){return e.type&11?ma(e,t):e.type&4?Fd(e,t):null}function QP(e,t,n,r){return n===-1?JP(t,e):n===-2?e1(e,t,r):Wc(e,e[_e],n,t)}function e1(e,t,n){if(n===Ct)return ma(t,e);if(n===kr)return Fd(t,e);if(n===Br)return PS(t,e)}function kS(e,t,n,r){let i=t[Ni].queries[r];if(i.matches===null){let s=e.data,o=n.matches,a=[];for(let l=0;o!==null&&l<o.length;l+=2){let c=o[l];if(c<0)a.push(null);else{let h=s[c];a.push(QP(t,h,o[l+1],n.metadata.read))}}i.matches=a}return i.matches}function fg(e,t,n,r){let i=e.queries.getByIndex(n),s=i.matches;if(s!==null){let o=kS(e,t,i,n);for(let a=0;a<s.length;a+=2){let l=s[a];if(l>0)r.push(o[a/2]);else{let c=s[a+1],h=t[-l];for(let d=xn;d<h.length;d++){let f=h[d];f[Yo]===f[Rn]&&fg(f[_e],f,c,r)}if(h[la]!==null){let d=h[la];for(let f=0;f<d.length;f++){let g=d[f];fg(g[_e],g,c,r)}}}}}return r}function t1(e,t){return e[Ni].queries[t].queryList}function n1(e,t,n){let r=new Bm((n&4)===4);return NA(e,t,r,r.destroy),(t[Ni]??=new cg).queries.push(new ag(r))-1}function r1(e,t,n){let r=Zt();return r.firstCreatePass&&(o1(r,new lg(e,t,n),-1),(t&2)===2&&(r.staticViewQueries=!0)),n1(r,Fe(),t)}function i1(e){return e.split(",").map(t=>t.trim())}function o1(e,t,n){e.queries===null&&(e.queries=new ug),e.queries.track(new dg(t,n))}function yy(e,t){return e.queries.getByIndex(t)}function s1(e,t){let n=e[_e],r=yy(n,t);return r.crossesNgTemplate?fg(n,e,t,[]):kS(n,e,r,t)}var ki=class{},fd=class extends ki{injector;componentFactoryResolver=new og(this);instance=null;constructor(e){super();let t=new Uc([...e.providers,{provide:ki,useValue:this},{provide:ao,useValue:this.componentFactoryResolver}],e.parent||_d(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function a1(e,t,n=null){return new fd({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var c1=(()=>{class e{_injector;cachedInjectors=new Map;constructor(n){this._injector=n}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=Ub(!1,n.type),i=r.length>0?a1([r],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,i)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=ne({token:e,providedIn:"environment",factory:()=>new e(Ze(Gn))})}return e})();function yt(e){return Tg(()=>{let t=LS(e),n=te(w({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===AC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?i=>i.get(c1).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Zr.Emulated,styles:e.styles||xi,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&&uo("NgStandalone"),FS(n);let r=e.dependencies;return n.directiveDefs=yb(r,!1),n.pipeDefs=yb(r,!0),n.id=p1(n),n})}function l1(e){return qo(e)||Fb(e)}function u1(e){return e!==null}function d1(e,t){if(e==null)return zo;let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],s,o,a,l;Array.isArray(i)?(a=i[0],s=i[1],o=i[2]??s,l=i[3]||null):(s=i,o=i,a=Nd.None,l=null),n[s]=[r,a,l],t[s]=o}return n}function f1(e){if(e==null)return zo;let t={};for(let n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function Vr(e){return Tg(()=>{let t=LS(e);return FS(t),t})}function is(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function LS(e){let t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||zo,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||xi,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:d1(e.inputs,t),outputs:f1(e.outputs),debugInfo:null}}function FS(e){e.features?.forEach(t=>t(e))}function yb(e,t){if(!e)return null;let n=t?Bb:l1;return()=>(typeof e=="function"?e():e).map(r=>n(r)).filter(u1)}function p1(e){let t=0,n=typeof e.consts=="function"?"":e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let i of r.join("|"))t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function h1(e){return Object.getPrototypeOf(e.prototype).constructor}function po(e){let t=h1(e.type),n=!0,r=[e];for(;t;){let i;if(Kr(e))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new $e(903,!1);i=t.\u0275dir}if(i){if(n){r.push(i);let o=e;o.inputs=gm(e.inputs),o.declaredInputs=gm(e.declaredInputs),o.outputs=gm(e.outputs);let a=i.hostBindings;a&&_1(e,a);let l=i.viewQuery,c=i.contentQueries;if(l&&y1(e,l),c&&v1(e,c),m1(e,i),UN(e.outputs,i.outputs),Kr(i)&&i.data.animation){let h=e.data;h.animation=(h.animation||[]).concat(i.data.animation)}}let s=i.features;if(s)for(let o=0;o<s.length;o++){let a=s[o];a&&a.ngInherit&&a(e),a===po&&(n=!1)}}t=Object.getPrototypeOf(t)}g1(r)}function m1(e,t){for(let n in t.inputs){if(!t.inputs.hasOwnProperty(n)||e.inputs.hasOwnProperty(n))continue;let r=t.inputs[n];r!==void 0&&(e.inputs[n]=r,e.declaredInputs[n]=t.declaredInputs[n])}}function g1(e){let t=0,n=null;for(let r=e.length-1;r>=0;r--){let i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=ua(i.hostAttrs,n=ua(n,i.hostAttrs))}}function gm(e){return e===zo?{}:e===xi?[]:e}function y1(e,t){let n=e.viewQuery;n?e.viewQuery=(r,i)=>{t(r,i),n(r,i)}:e.viewQuery=t}function v1(e,t){let n=e.contentQueries;n?e.contentQueries=(r,i,s)=>{t(r,i,s),n(r,i,s)}:e.contentQueries=t}function _1(e,t){let n=e.hostBindings;n?e.hostBindings=(r,i)=>{t(r,i),n(r,i)}:e.hostBindings=t}function BS(e,t,n){return e[t]=n}function Li(e,t,n){let r=e[t];return Object.is(r,n)?!1:(e[t]=n,!0)}function E1(e,t,n,r){let i=Li(e,t,n);return Li(e,t+1,r)||i}function w1(e,t,n,r,i,s,o,a,l){let c=t.consts,h=il(t,e,4,o||null,a||null);Bg()&&gy(t,n,h,so(c,l),ly),h.mergedAttrs=ua(h.mergedAttrs,h.attrs),Gg(t,h);let d=h.tView=oy(2,h,r,i,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c,null);return t.queries!==null&&(t.queries.template(t,h),d.queries=t.queries.embeddedTView(h)),h}function pg(e,t,n,r,i,s,o,a,l,c){let h=n+Vt,d=t.firstCreatePass?w1(h,t,e,r,i,s,o,a,l):t.data[h];co(d,!1);let f=b1(t,e,d,n);Cd()&&Pd(t,e,f,d),Yr(f,e);let g=IS(f,e,f,d);return e[h]=g,ay(e,g),KP(g,d,e),Ed(d)&&Ad(t,e,d),l!=null&&cy(e,d,c),d}function xt(e,t,n,r,i,s,o,a){let l=Fe(),c=Zt(),h=so(c.consts,s);return pg(l,c,e,t,n,r,i,h,o,a),xt}var b1=C1;function C1(e,t,n,r){return Sd(!0),t[sn].createComment("")}var VS=new pe(""),S1=(()=>{class e{static \u0275prov=ne({token:e,providedIn:"root",factory:()=>new hg})}return e})(),hg=class{queuedEffectCount=0;queues=new Map;schedule(e){this.enqueue(e)}remove(e){let t=e.zone,n=this.queues.get(t);n.has(e)&&(n.delete(e),this.queuedEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||(this.queuedEffectCount++,n.add(e))}flush(){for(;this.queuedEffectCount>0;)for(let[e,t]of this.queues)e===null?this.flushQueue(t):e.run(()=>this.flushQueue(t))}flushQueue(e){for(let t of e)e.delete(t),this.queuedEffectCount--,t.run()}};function vy(e){return!!e&&typeof e.then=="function"}function US(e){return!!e&&typeof e.subscribe=="function"}var D1=new pe(""),HS=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=O(D1,{optional:!0})??[];injector=O(ht);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let i of this.appInits){let s=Wb(this.injector,i);if(vy(s))n.push(s);else if(US(s)){let o=new Promise((a,l)=>{s.subscribe({complete:a,error:l})});n.push(o)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(i=>{this.reject(i)}),n.length===0&&r(),this.initialized=!0}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),I1=new pe("");function T1(){aw(()=>{throw new $e(600,!1)})}function x1(e){return e.isBoundToModule}var R1=10,yr=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=O(_M);afterRenderManager=O($C);zonelessEnabled=O(Id);rootEffectScheduler=O(S1);dirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new J;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=O(Td).hasPendingTasks.pipe(pr(n=>!n));constructor(){O(ga,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:i=>{i&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=O(Gn);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){pt(10);let i=n instanceof dd;if(!this._injector.get(HS).done){let d=!i&&lA(n),f=!1;throw new $e(405,f)}let s;i?s=n:s=this._injector.get(ao).resolveComponentFactory(n),this.componentTypes.push(s.componentType);let o=x1(s)?void 0:this._injector.get(ki),a=r||s.selector,l=s.create(ht.NULL,[],a,o),c=l.location.nativeElement,h=l.injector.get(VS,null);return h?.registerApplication(c),l.onDestroy(()=>{this.detachView(l.hostView),zu(this.components,l),h?.unregisterApplication(c)}),this._loadComponent(l),pt(11,l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){pt(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(ey.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new $e(101,!1);let n=je(null);try{this._runningTick=!0,this.synchronize()}catch(r){this.internalErrorHandler(r)}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,je(n),this.afterTick.next(),pt(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(pn,null,{optional:!0}));let n=0;for(;this.dirtyFlags!==0&&n++<R1;)pt(14),this.synchronizeOnce(),pt(15)}synchronizeOnce(){if(this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush()),this.dirtyFlags&7){let n=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:r,notifyErrorHandler:i}of this.allViews)N1(r,i,n,this.zonelessEnabled);if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}else this._rendererFactory?.begin?.(),this._rendererFactory?.end?.();this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:n})=>bd(n))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(n){let r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){let r=n;zu(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n),this._injector.get(I1,[]).forEach(r=>r(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>zu(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new $e(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function zu(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function N1(e,t,n,r){!n&&!bd(e)||bS(e,t,n&&!r?0:1)}function va(e,t,n,r){let i=Fe(),s=tl();if(Li(i,s,t)){let o=Zt(),a=Wg();BO(a,i,e,t,n,r)}return va}function jS(e,t,n,r){return Li(e,tl(),n)?t+Zc(n)+r:Hi}function Hu(e,t){return e<<17|t<<2}function es(e){return e>>17&32767}function A1(e){return(e&2)==2}function M1(e,t){return e&131071|t<<17}function mg(e){return e|2}function da(e){return(e&131068)>>2}function ym(e,t){return e&-131069|t<<2}function O1(e){return(e&1)===1}function gg(e){return e|1}function P1(e,t,n,r,i,s){let o=s?t.classBindings:t.styleBindings,a=es(o),l=da(o);e[r]=n;let c=!1,h;if(Array.isArray(n)){let d=n;h=d[1],(h===null||Xc(d,h)>0)&&(c=!0)}else h=n;if(i)if(l!==0){let d=es(e[a+1]);e[r+1]=Hu(d,a),d!==0&&(e[d+1]=ym(e[d+1],r)),e[a+1]=M1(e[a+1],r)}else e[r+1]=Hu(a,0),a!==0&&(e[a+1]=ym(e[a+1],r)),a=r;else e[r+1]=Hu(l,0),a===0?a=r:e[l+1]=ym(e[l+1],r),l=r;c&&(e[r+1]=mg(e[r+1])),vb(e,h,r,!0),vb(e,h,r,!1),k1(t,h,e,r,s),o=Hu(a,l),s?t.classBindings=o:t.styleBindings=o}function k1(e,t,n,r,i){let s=i?e.residualClasses:e.residualStyles;s!=null&&typeof t=="string"&&Xc(s,t)>=0&&(n[r+1]=gg(n[r+1]))}function vb(e,t,n,r){let i=e[n+1],s=t===null,o=r?es(i):da(i),a=!1;for(;o!==0&&(a===!1||s);){let l=e[o],c=e[o+1];L1(l,t)&&(a=!0,e[o+1]=r?gg(c):mg(c)),o=r?es(c):da(c)}a&&(e[n+1]=r?mg(i):gg(i))}function L1(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?Xc(e,t)>=0:!1}function Be(e,t,n){let r=Fe(),i=tl();if(Li(r,i,t)){let s=Zt(),o=Wg();pS(s,o,r,e,t,r[sn],n,!1)}return Be}function _b(e,t,n,r,i){uy(t,e,n,i?"class":"style",r)}function ho(e,t,n){return $S(e,t,n,!1),ho}function mo(e,t){return $S(e,t,null,!0),mo}function $S(e,t,n,r){let i=Fe(),s=Zt(),o=VA(2);if(s.firstUpdatePass&&B1(s,e,o,r),t!==Hi&&Li(i,o,t)){let a=s.data[lo()];$1(s,a,i,i[sn],e,i[o+1]=W1(t,n),r,o)}}function F1(e,t){return t>=e.expandoStartIndex}function B1(e,t,n,r){let i=e.data;if(i[n+1]===null){let s=i[lo()],o=F1(e,n);G1(s,r)&&t===null&&!o&&(t=!1),t=V1(i,s,t,r),P1(i,s,t,n,o,r)}}function V1(e,t,n,r){let i=$A(e),s=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=vm(null,e,t,n,r),n=Kc(n,t.attrs,r),s=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i)if(n=vm(i,e,t,n,r),s===null){let a=U1(e,t,r);a!==void 0&&Array.isArray(a)&&(a=vm(null,e,t,a[1],r),a=Kc(a,t.attrs,r),H1(e,t,r,a))}else s=j1(e,t,r)}return s!==void 0&&(r?t.residualClasses=s:t.residualStyles=s),n}function U1(e,t,n){let r=n?t.classBindings:t.styleBindings;if(da(r)!==0)return e[es(r)]}function H1(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[es(i)]=r}function j1(e,t,n){let r,i=t.directiveEnd;for(let s=1+t.directiveStylingLast;s<i;s++){let o=e[s].hostAttrs;r=Kc(r,o,n)}return Kc(r,t.attrs,n)}function vm(e,t,n,r,i){let s=null,o=n.directiveEnd,a=n.directiveStylingLast;for(a===-1?a=n.directiveStart:a++;a<o&&(s=t[a],r=Kc(r,s.hostAttrs,i),s!==e);)a++;return e!==null&&(n.directiveStylingLast=a),r}function Kc(e,t,n){let r=n?1:2,i=-1;if(t!==null)for(let s=0;s<t.length;s++){let o=t[s];typeof o=="number"?i=o:i===r&&(Array.isArray(e)||(e=e===void 0?[]:["",e]),aA(e,o,n?!0:t[++s]))}return e===void 0?null:e}function $1(e,t,n,r,i,s,o,a){if(!(t.type&3))return;let l=e.data,c=l[a+1],h=O1(c)?Eb(l,t,n,i,da(c),o):void 0;if(!pd(h)){pd(s)||A1(c)&&(s=Eb(l,null,n,i,a,o));let d=eC(lo(),n);rP(r,o,d,i,s)}}function Eb(e,t,n,r,i,s){let o=t===null,a;for(;i>0;){let l=e[i],c=Array.isArray(l),h=c?l[1]:l,d=h===null,f=n[i+1];f===Hi&&(f=d?xi:void 0);let g=d?am(f,r):h===r?f:void 0;if(c&&!pd(g)&&(g=am(l,r)),pd(g)&&(a=g,o))return a;let m=e[i+1];i=o?es(m):da(m)}if(t!==null){let l=s?t.residualClasses:t.residualStyles;l!=null&&(a=am(l,r))}return a}function pd(e){return e!==void 0}function W1(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=mr(Qr(e)))),e}function G1(e,t){return(e.flags&(t?8:16))!==0}var yg=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),i=this.detach(r);if(r-n>1){let s=this.detach(n);this.attach(n,i),this.attach(r,s)}else this.attach(n,i)}move(e,t){this.attach(t,this.detach(e))}};function _m(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function z1(e,t,n){let r,i,s=0,o=e.length-1,a;if(Array.isArray(t)){let l=t.length-1;for(;s<=o&&s<=l;){let c=e.at(s),h=t[s],d=_m(s,c,s,h,n);if(d!==0){d<0&&e.updateValue(s,h),s++;continue}let f=e.at(o),g=t[l],m=_m(o,f,l,g,n);if(m!==0){m<0&&e.updateValue(o,g),o--,l--;continue}let b=n(s,c),x=n(o,f),A=n(s,h);if(Object.is(A,x)){let F=n(l,g);Object.is(F,b)?(e.swap(s,o),e.updateValue(o,g),l--,o--):e.move(o,s),e.updateValue(s,h),s++;continue}if(r??=new hd,i??=bb(e,s,o,n),vg(e,r,s,A))e.updateValue(s,h),s++,o++;else if(i.has(A))r.set(b,e.detach(s)),o--;else{let F=e.create(s,t[s]);e.attach(s,F),s++,o++}}for(;s<=l;)wb(e,r,n,s,t[s]),s++}else if(t!=null){let l=t[Symbol.iterator](),c=l.next();for(;!c.done&&s<=o;){let h=e.at(s),d=c.value,f=_m(s,h,s,d,n);if(f!==0)f<0&&e.updateValue(s,d),s++,c=l.next();else{r??=new hd,i??=bb(e,s,o,n);let g=n(s,d);if(vg(e,r,s,g))e.updateValue(s,d),s++,o++,c=l.next();else if(!i.has(g))e.attach(s,e.create(s,d)),s++,o++,c=l.next();else{let m=n(s,h);r.set(m,e.detach(s)),o--}}}for(;!c.done;)wb(e,r,n,e.length,c.value),c=l.next()}for(;s<=o;)e.destroy(e.detach(o--));r?.forEach(l=>{e.destroy(l)})}function vg(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function wb(e,t,n,r,i){if(vg(e,t,r,n(r,i)))e.updateValue(r,i);else{let s=e.create(r,i);e.attach(r,s)}}function bb(e,t,n,r){let i=new Set;for(let s=t;s<=n;s++)i.add(r(s,e.at(s)));return i}var hd=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function $t(e,t){uo("NgControlFlow");let n=Fe(),r=tl(),i=n[r]!==Hi?n[r]:-1,s=i!==-1?md(n,Vt+i):void 0,o=0;if(Li(n,r,e)){let a=je(null);try{if(s!==void 0&&xS(s,o),e!==-1){let l=Vt+e,c=md(n,l),h=bg(n[_e],l),d=qc(c,h.tView.ssrId),f=Md(n,h,t,{dehydratedView:d});Ld(c,f,o,Gc(h,d))}}finally{je(a)}}else if(s!==void 0){let a=TS(s,o);a!==void 0&&(a[jt]=t)}}var _g=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-xn}};function os(e,t){return t}var Eg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function Qt(e,t,n,r,i,s,o,a,l,c,h,d,f){uo("NgControlFlow");let g=Fe(),m=Zt(),b=l!==void 0,x=Fe(),A=a?o.bind(x[Pr][jt]):o,F=new Eg(b,A);x[Vt+e]=F,pg(g,m,e+1,t,n,r,i,so(m.consts,s)),b&&pg(g,m,e+2,l,c,h,d,so(m.consts,f))}var wg=class extends yg{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n}get length(){return this.lContainer.length-xn}at(e){return this.getLView(e)[jt].$implicit}attach(e,t){let n=t[Hc];this.needsIndexUpdate||=e!==this.length,Ld(this.lContainer,t,e,Gc(this.templateTNode,n))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,q1(this.lContainer,e)}create(e,t){let n=qc(this.lContainer,this.templateTNode.tView.ssrId),r=Md(this.hostLView,this.templateTNode,new _g(this.lContainer,t,e),{dehydratedView:n});return this.operationsCounter?.recordCreate(),r}destroy(e){Od(e[_e],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[jt].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[jt].$index=e}getLView(e){return Y1(this.lContainer,e)}};function en(e){let t=je(null),n=lo();try{let r=Fe(),i=r[_e],s=r[n],o=n+1,a=md(r,o);if(s.liveCollection===void 0){let c=bg(i,o);s.liveCollection=new wg(a,r,c)}else s.liveCollection.reset();let l=s.liveCollection;if(z1(l,e,s.trackByFn),l.updateIndexes(),s.hasEmptyBlock){let c=tl(),h=l.length===0;if(Li(r,c,h)){let d=n+2,f=md(r,d);if(h){let g=bg(i,d),m=qc(f,g.tView.ssrId),b=Md(r,g,void 0,{dehydratedView:m});Ld(f,b,0,Gc(g,m))}else xS(f,0)}}}finally{je(t)}}function md(e,t){return e[t]}function q1(e,t){return zc(e,t)}function Y1(e,t){return TS(e,t)}function bg(e,t){return kg(e,t)}function re(e,t,n,r){let i=Fe(),s=Zt(),o=Vt+e,a=i[sn],l=s.firstCreatePass?AS(o,s,i,t,ly,Bg(),n,r):s.data[o],c=K1(s,i,l,a,t,e);i[o]=c;let h=Ed(l);return co(l,!0),cS(a,c,l),!mS(l)&&Cd()&&Pd(s,i,c,l),(AA()===0||h)&&Yr(c,i),MA(),h&&(Ad(s,i,l),ny(s,l,i)),r!==null&&cy(i,l),re}function ie(){let e=tr();Vg()?sC():(e=e.parent,co(e,!1));let t=e;kA(t)&&LA(),OA();let n=Zt();return n.firstCreatePass&&MS(n,t),t.classesWithoutHost!=null&&XA(t)&&_b(n,t,Fe(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&JA(t)&&_b(n,t,Fe(),t.stylesWithoutHost,!1),ie}function Ne(e,t,n,r){return re(e,t,n,r),ie(),Ne}var K1=(e,t,n,r,i,s)=>(Sd(!0),sS(r,i,qA()));function Z1(e,t,n,r,i){let s=t.consts,o=so(s,r),a=il(t,e,8,"ng-container",o);o!==null&&ig(a,o,!0);let l=so(s,i);return Bg()&&gy(t,n,a,l,ly),a.mergedAttrs=ua(a.mergedAttrs,a.attrs),t.queries!==null&&t.queries.elementStart(t,a),a}function WS(e,t,n){let r=Fe(),i=Zt(),s=e+Vt,o=i.firstCreatePass?Z1(s,i,r,t,n):i.data[s];co(o,!0);let a=X1(i,r,o,e);return r[s]=a,Cd()&&Pd(i,r,a,o),Yr(a,r),Ed(o)&&(Ad(i,r,o),ny(i,o,r)),n!=null&&cy(r,o),WS}function GS(){let e=tr(),t=Zt();return Vg()?sC():(e=e.parent,co(e,!1)),t.firstCreatePass&&(Gg(t,e),Pg(e)&&t.queries.elementEnd(e)),GS}function Bd(e,t,n){return WS(e,t,n),GS(),Bd}var X1=(e,t,n,r)=>(Sd(!0),CO(t[sn],""));function nr(){return Fe()}var gd="en-US",J1=gd;function Q1(e){typeof e=="string"&&(J1=e.toLowerCase().replace(/_/g,"-"))}var ek=(e,t,n)=>{};function Rt(e,t,n,r){let i=Fe(),s=Zt(),o=tr();return nk(s,i,i[sn],o,e,t,r),Rt}function tk(e,t,n,r){let i=e.cleanup;if(i!=null)for(let s=0;s<i.length-1;s+=2){let o=i[s];if(o===n&&i[s+1]===r){let a=t[Ju],l=i[s+2];return a.length>l?a[l]:null}typeof o=="string"&&(s+=2)}return null}function nk(e,t,n,r,i,s,o){let a=Ed(r),l=e.firstCreatePass?iC(e):null,c=t[jt],h=rC(t),d=!0;if(r.type&3||o){let f=Xr(r,t),g=o?o(f):f,m=h.length,b=o?A=>o(er(A[r.index])):r.index,x=null;if(!o&&a&&(x=tk(e,t,i,r.index)),x!==null){let A=x.__ngLastListenerFn__||x;A.__ngNextListenerFn__=s,x.__ngLastListenerFn__=s,d=!1}else{s=Db(r,t,c,s),ek(f,i,s);let A=n.listen(g,i,s);h.push(s,A),l&&l.push(i,b,m,m+1)}}else s=Db(r,t,c,s);if(d){let f=r.outputs?.[i],g=r.hostDirectiveOutputs?.[i];if(g&&g.length)for(let m=0;m<g.length;m+=2){let b=g[m],x=g[m+1];Cb(r,e,t,b,x,i,s,h,l)}if(f&&f.length)for(let m of f)Cb(r,e,t,m,i,i,s,h,l)}}function Cb(e,t,n,r,i,s,o,a,l){let c=n[r],h=t.data[r].outputs[i],d=c[h].subscribe(o),f=a.length;a.push(o,d),l&&l.push(s,e.index,f,-(f+1))}function Sb(e,t,n,r){let i=je(null);try{return pt(6,t,n),n(r)!==!1}catch(s){return hS(e,s),!1}finally{pt(7,t,n),je(i)}}function Db(e,t,n,r){return function i(s){if(s===Function)return r;let o=ha(e)?gr(e.index,t):t;my(o,5);let a=Sb(t,n,r,s),l=i.__ngNextListenerFn__;for(;l;)a=Sb(t,n,l,s)&&a,l=l.__ngNextListenerFn__;return a}}function me(e=1){return GA(e)}function zn(e,t,n){return ji(e,"",t,"",n),zn}function ji(e,t,n,r,i){let s=Fe(),o=jS(s,t,n,r);if(o!==Hi){let a=Zt(),l=Wg();pS(a,l,s,e,o,s[sn],i,!1)}return ji}function Ea(e,t,n){r1(e,t,n)}function wa(e){let t=Fe(),n=Zt(),r=lC();Hg(r+1);let i=yy(n,r);if(e.dirty&&IA(t)===((i.metadata.flags&2)===2)){if(i.matches===null)e.reset([]);else{let s=s1(t,r);e.reset(s,wM),e.notifyOnChanges()}return!0}return!1}function ba(){return t1(Fe(),lC())}function _y(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function Ey(e){let t=aC();return wd(t,Vt+e)}function tn(e,t=""){let n=Fe(),r=Zt(),i=e+Vt,s=r.firstCreatePass?il(r,i,1,t,null):r.data[i],o=rk(r,n,s,t,e);n[i]=o,Cd()&&Pd(r,n,o,s),co(s,!1)}var rk=(e,t,n,r,i)=>(Sd(!0),wO(t[sn],r));function Ca(e){return ss("",e,""),Ca}function ss(e,t,n){let r=Fe(),i=jS(r,e,t,n);return i!==Hi&&ik(r,lo(),i),ss}function ik(e,t,n){let r=eC(t,e);bO(e[sn],r,n)}var zS={};function $i(e){let t=Zt(),n=Fe(),r=e+Vt,i=il(t,r,128,null,null);return co(i,!1),_y(t,n,r,zS),$i}function go(e){uo("NgLet");let t=Zt(),n=Fe(),r=lo();return _y(t,n,r,e),e}function Ur(e){let t=aC(),n=wd(t,Vt+e);if(n===zS)throw new $e(314,!1);return n}function ok(e,t,n){let r=Zt();if(r.firstCreatePass){let i=Kr(e);Cg(n,r.data,r.blueprint,i,!0),Cg(t,r.data,r.blueprint,i,!1)}}function Cg(e,t,n,r,i){if(e=kn(e),Array.isArray(e))for(let s=0;s<e.length;s++)Cg(e[s],t,n,r,i);else{let s=Zt(),o=Fe(),a=tr(),l=ca(e)?e:kn(e.provide),c=$b(e),h=a.providerIndexes&1048575,d=a.directiveStart,f=a.providerIndexes>>20;if(ca(e)||!e.multi){let g=new Jo(c,i,Mt),m=wm(l,t,i?h:h+f,d);m===-1?(Om(od(a,o),s,l),Em(s,e,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(g),o.push(g)):(n[m]=g,o[m]=g)}else{let g=wm(l,t,h+f,d),m=wm(l,t,h,h+f),b=g>=0&&n[g],x=m>=0&&n[m];if(i&&!x||!i&&!b){Om(od(a,o),s,l);let A=ck(i?ak:sk,n.length,i,r,c);!i&&x&&(n[m].providerFactory=A),Em(s,e,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(A),o.push(A)}else{let A=qS(n[i?m:g],c,!i&&r);Em(s,e,g>-1?g:m,A)}!i&&r&&x&&n[m].componentProviders++}}}function Em(e,t,n,r){let i=ca(t),s=hA(t);if(i||s){let o=(s?kn(t.useClass):t).prototype.ngOnDestroy;if(o){let a=e.destroyHooks||(e.destroyHooks=[]);if(!i&&t.multi){let l=a.indexOf(n);l===-1?a.push(n,[r,o]):a[l+1].push(r,o)}else a.push(n,o)}}}function qS(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function wm(e,t,n,r){for(let i=n;i<r;i++)if(t[i]===e)return i;return-1}function sk(e,t,n,r){return Sg(this.multi,[])}function ak(e,t,n,r){let i=this.multi,s;if(this.providerFactory){let o=this.providerFactory.componentProviders,a=Wc(n,n[_e],this.providerFactory.index,r);s=a.slice(0,o),Sg(i,s);for(let l=o;l<a.length;l++)s.push(a[l])}else s=[],Sg(i,s);return s}function Sg(e,t){for(let n=0;n<e.length;n++){let r=e[n];t.push(r())}return t}function ck(e,t,n,r,i){let s=new Jo(e,n,Mt);return s.multi=[],s.index=t,s.componentProviders=0,qS(s,i,r&&!n),s}function Vd(e,t=[]){return n=>{n.providersResolver=(r,i)=>ok(r,i?i(e):e,t)}}function YS(e,t,n,r){return ZS(Fe(),Ug(),e,t,n,r)}function KS(e,t){let n=e[t];return n===Hi?void 0:n}function ZS(e,t,n,r,i,s){let o=t+n;return Li(e,o,i)?BS(e,o+1,s?r.call(s,i):r(i)):KS(e,o+1)}function lk(e,t,n,r,i,s,o){let a=t+n;return E1(e,a,i,s)?BS(e,a+2,o?r.call(o,i,s):r(i,s)):KS(e,a+2)}function Cn(e,t){let n=Zt(),r,i=e+Vt;n.firstCreatePass?(r=uk(t,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks??=[]).push(i,r.onDestroy)):r=n.data[i];let s=r.factory||(r.factory=Go(r.type,!0)),o,a=Wn(Mt);try{let l=id(!1),c=s();return id(l),_y(n,Fe(),i,c),c}finally{Wn(a)}}function uk(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function Nn(e,t,n){let r=e+Vt,i=Fe(),s=wd(i,r);return JS(i,r)?ZS(i,Ug(),t,s.transform,n,s):s.transform(n)}function XS(e,t,n,r){let i=e+Vt,s=Fe(),o=wd(s,i);return JS(s,i)?lk(s,Ug(),t,o.transform,n,r,o):o.transform(n,r)}function JS(e,t){return e[_e].data[t].pure}function QS(e,t){return Fd(e,t)}var fa=class{full;major;minor;patch;constructor(e){this.full=e;let t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}},wy=new fa("19.2.0"),dk=(()=>{class e{zone=O(Le);changeDetectionScheduler=O(Ai);applicationRef=O(yr);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function fk({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:n}){return e??=()=>new Le(te(w({},pk()),{scheduleInRootZone:n})),[{provide:Le,useFactory:e},{provide:Vc,multi:!0,useFactory:()=>{let r=O(dk,{optional:!0});return()=>r.initialize()}},{provide:Vc,multi:!0,useFactory:()=>{let r=O(hk);return()=>{r.initialize()}}},t===!0?{provide:TC,useValue:!0}:[],{provide:Yg,useValue:n??IC}]}function pk(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var hk=(()=>{class e{subscription=new ot;initialized=!1;zone=O(Le);pendingTasks=O(Td);initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Le.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Le.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),eD=(()=>{class e{appRef=O(yr);taskService=O(Td);ngZone=O(Le);zonelessEnabled=O(Id);tracing=O(ga,{optional:!0});disableScheduling=O(TC,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new ot;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(ad):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(O(Yg,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof cd||!this.zoneIsDefined)}notify(n){if(!this.zonelessEnabled&&n===5)return;let r=!1;switch(n){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2,r=!0;break}case 12:{this.appRef.dirtyFlags|=16,r=!0;break}case 13:{this.appRef.dirtyFlags|=2,r=!0;break}case 11:{r=!0;break}case 9:case 8:case 7:case 10:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(r))return;let i=this.useMicrotaskScheduler?Qw:xC;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>i(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>i(()=>this.tick()))}shouldScheduleTick(n){return!(this.disableScheduling&&!n||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(ad+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let n=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){throw this.taskService.remove(n),r}finally{this.cleanup()}this.useMicrotaskScheduler=!0,Qw(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function tD(){return uo("NgZoneless"),Vb([{provide:Ai,useExisting:eD},{provide:Le,useClass:cd},{provide:Id,useValue:!0},{provide:Yg,useValue:!1},[]])}function mk(){return typeof $localize<"u"&&$localize.locale||gd}var by=new pe("",{providedIn:"root",factory:()=>O(by,Ke.Optional|Ke.SkipSelf)||mk()}),Dg=new pe(""),gk=new pe("");function Pc(e){return!e.moduleRef}function yk(e){let t=Pc(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Le);return n.run(()=>{Pc(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Mi,null),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:s=>{r.handleError(s)}})}),Pc(e)){let s=()=>t.destroy(),o=e.platformInjector.get(Dg);o.add(s),t.onDestroy(()=>{i.unsubscribe(),o.delete(s)})}else{let s=()=>e.moduleRef.destroy(),o=e.platformInjector.get(Dg);o.add(s),e.moduleRef.onDestroy(()=>{zu(e.allPlatformModules,e.moduleRef),i.unsubscribe(),o.delete(s)})}return _k(r,n,()=>{let s=t.get(HS);return s.runInitializers(),s.donePromise.then(()=>{let o=t.get(by,gd);if(Q1(o||gd),!t.get(gk,!0))return Pc(e)?t.get(yr):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Pc(e)){let a=t.get(yr);return e.rootComponent!==void 0&&a.bootstrap(e.rootComponent),a}else return vk(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}function vk(e,t){let n=e.injector.get(yr);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else if(e.instance.ngDoBootstrap)e.instance.ngDoBootstrap(n);else throw new $e(-403,!1);t.push(e)}function _k(e,t,n){try{let r=n();return vy(r)?r.catch(i=>{throw t.runOutsideAngular(()=>e.handleError(i)),i}):r}catch(r){throw t.runOutsideAngular(()=>e.handleError(r)),r}}var qu=null;function Ek(e=[],t){return ht.create({name:t,providers:[{provide:vd,useValue:"platform"},{provide:Dg,useValue:new Set([()=>qu=null])},...e]})}function wk(e=[]){if(qu)return qu;let t=Ek(e);return qu=t,T1(),bk(t),t}function bk(e){let t=e.get(Jg,null);Wb(e,()=>{t?.forEach(n=>n())})}var rr=(()=>{class e{static __NG_ELEMENT_ID__=Ck}return e})();function Ck(e){return Sk(tr(),Fe(),(e&16)===16)}function Sk(e,t,n){if(ha(e)&&!n){let r=gr(e.index,t);return new Qo(r,r)}else if(e.type&175){let r=t[Pr];return new Qo(r,t)}return null}function nD(e){pt(8);try{let{rootComponent:t,appProviders:n,platformProviders:r}=e,i=wk(r),s=[fk({}),{provide:Ai,useExisting:eD},...n||[]],o=new fd({providers:s,parent:i,debugName:"",runEnvironmentInitializers:!1});return yk({r3Injector:o.injector,platformInjector:i,rootComponent:t})}catch(t){return Promise.reject(t)}finally{pt(9)}}function Sa(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}function Cy(e,t=NaN){return!isNaN(parseFloat(e))&&!isNaN(Number(e))?Number(e):t}function Sy(e){let t=je(null);try{return e()}finally{je(t)}}var Ib=class{[bi];constructor(e){this[bi]=e}destroy(){this[bi].destroy()}};function Ud(e,t){let n=qo(e),r=t.elementInjector||_d();return new Yc(n).create(r,t.projectableNodes,t.hostElement,t.environmentInjector)}var Dk={schedule(e,t){let n=setTimeout(e,t);return()=>clearTimeout(n)}};function Ik(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Tk(e){return!!e&&e.nodeType===Node.ELEMENT_NODE}var Dy;function xk(e,t){if(!Dy){let n=Element.prototype;Dy=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return e.nodeType===Node.ELEMENT_NODE?Dy.call(e,t):!1}function Rk(e){let t={};return e.forEach(({propName:n,templateName:r,transform:i})=>{t[Ik(r)]=[n,i]}),t}function Nk(e,t){return t.get(ao).resolveComponentFactory(e).inputs}function Ak(e,t){let n=e.childNodes,r=t.map(()=>[]),i=-1;t.some((s,o)=>s==="*"?(i=o,!0):!1);for(let s=0,o=n.length;s<o;++s){let a=n[s],l=Mk(a,t,i);l!==-1&&r[l].push(a)}return r}function Mk(e,t,n){let r=n;return Tk(e)&&t.some((i,s)=>i!=="*"&&xk(e,i)?(r=s,!0):!1),r}var Ok=10,Iy=class{componentFactory;inputMap=new Map;constructor(e,t){this.componentFactory=t.get(ao).resolveComponentFactory(e);for(let n of this.componentFactory.inputs)this.inputMap.set(n.propName,n.templateName)}create(e){return new Ty(this.componentFactory,e,this.inputMap)}},Ty=class{componentFactory;injector;inputMap;eventEmitters=new Fo(1);events=this.eventEmitters.pipe(ea(e=>ro(...e)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(e,t,n){this.componentFactory=e,this.injector=t,this.inputMap=n,this.ngZone=this.injector.get(Le),this.appRef=this.injector.get(yr),this.cdScheduler=t.get(Ai),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=Dk.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},Ok))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,t){if(this.componentRef===null){this.initialInputValues.set(e,t);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(e)??e,t),this.componentRef.hostView.dirty&&(this.componentRef.changeDetectorRef.markForRefresh(),this.cdScheduler.notify(6))})}initializeComponent(e){let t=ht.create({providers:[],parent:this.injector}),n=Ak(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(t,n,e),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[e,t]of this.initialInputValues)this.setInputValue(e,t);this.initialInputValues.clear()}initializeOutputs(e){let t=this.componentFactory.outputs.map(({propName:n,templateName:r})=>{let i=e.instance[n];return new nt(s=>{let o=i.subscribe(a=>s.next({name:r,value:a}));return()=>o.unsubscribe()})});this.eventEmitters.next(t)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},xy=class extends HTMLElement{ngElementEventsSubscription=null};function rD(e,t){let n=Nk(e,t.injector),r=t.strategyFactory||new Iy(e,t.injector),i=Rk(n);class s extends xy{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let a=this._ngElementStrategy=r.create(this.injector||t.injector);n.forEach(({propName:l,transform:c})=>{if(!this.hasOwnProperty(l))return;let h=this[l];delete this[l],a.setInputValue(l,h,c)})}return this._ngElementStrategy}_ngElementStrategy;constructor(a){super(),this.injector=a}attributeChangedCallback(a,l,c,h){let[d,f]=i[a];this.ngElementStrategy.setInputValue(d,c,f)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{let l=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(l)})}}return n.forEach(({propName:o,transform:a})=>{Object.defineProperty(s.prototype,o,{get(){return this.ngElementStrategy.getInputValue(o)},set(l){this.ngElementStrategy.setInputValue(o,l,a)},configurable:!0,enumerable:!0})}),s}var aD=null;function Da(){return aD}function cD(e){aD??=e}var Hd=class{},Qe=new pe(""),lD=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:()=>O(kk),providedIn:"platform"})}return e})(),kk=(()=>{class e extends lD{_location;_history;_doc=O(Qe);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Da().getBaseHref(this._doc)}onPopState(n){let r=Da().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=Da().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",n,!1),()=>r.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,r,i){this._history.pushState(n,r,i)}replaceState(n,r,i){this._history.replaceState(n,r,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function uD(e,t){return e?t?e.endsWith("/")?t.startsWith("/")?e+t.slice(1):e+t:t.startsWith("/")?e+t:`${e}/${t}`:e:t}function iD(e){let t=e.search(/#|\?|$/);return e[t-1]==="/"?e.slice(0,t-1)+e.slice(t):e}function as(e){return e&&e[0]!=="?"?`?${e}`:e}var Ny=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:()=>O(Fk),providedIn:"root"})}return e})(),Lk=new pe(""),Fk=(()=>{class e extends Ny{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??O(Qe).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return uD(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+as(this._platformLocation.search),i=this._platformLocation.hash;return i&&n?`${r}${i}`:r}pushState(n,r,i,s){let o=this.prepareExternalUrl(i+as(s));this._platformLocation.pushState(n,r,o)}replaceState(n,r,i,s){let o=this.prepareExternalUrl(i+as(s));this._platformLocation.replaceState(n,r,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static \u0275fac=function(n){return new(n||e)(Ze(lD),Ze(Lk,8))};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Ay=(()=>{class e{_subject=new J;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=Uk(iD(oD(r))),this._locationStrategy.onPopState(i=>{this._subject.next({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,r=""){return this.path()==this.normalize(n+as(r))}normalize(n){return e.stripTrailingSlash(Vk(this._basePath,oD(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,r="",i=null){this._locationStrategy.pushState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+as(r)),i)}replaceState(n,r="",i=null){this._locationStrategy.replaceState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+as(r)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",r){this._urlChangeListeners.forEach(i=>i(n,r))}subscribe(n,r,i){return this._subject.subscribe({next:n,error:r??void 0,complete:i??void 0})}static normalizeQueryParams=as;static joinWithSlash=uD;static stripTrailingSlash=iD;static \u0275fac=function(n){return new(n||e)(Ze(Ny))};static \u0275prov=ne({token:e,factory:()=>Bk(),providedIn:"root"})}return e})();function Bk(){return new Ay(Ze(Ny))}function Vk(e,t){if(!e||!t.startsWith(e))return t;let n=t.substring(e.length);return n===""||["/",";","?","#"].includes(n[0])?n:t}function oD(e){return e.replace(/\/index.html$/,"")}function Uk(e){if(new RegExp("^(https?:)?//").test(e)){let[,t]=e.split(/\/\/[^\/]+/);return t}return e}function dD(e,t){t=encodeURIComponent(t);for(let n of e.split(";")){let r=n.indexOf("="),[i,s]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(i.trim()===t)return decodeURIComponent(s)}return null}var Ry=/\s+/,sD=[],fD=(()=>{class e{_ngEl;_renderer;initialClasses=sD;rawClass;stateMap=new Map;constructor(n,r){this._ngEl=n,this._renderer=r}set klass(n){this.initialClasses=n!=null?n.trim().split(Ry):sD}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(Ry):n}ngDoCheck(){for(let r of this.initialClasses)this._updateState(r,!0);let n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(let r of n)this._updateState(r,!0);else if(n!=null)for(let r of Object.keys(n))this._updateState(r,!!n[r]);this._applyStateDiff()}_updateState(n,r){let i=this.stateMap.get(n);i!==void 0?(i.enabled!==r&&(i.changed=!0,i.enabled=r),i.touched=!0):this.stateMap.set(n,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(let n of this.stateMap){let r=n[0],i=n[1];i.changed?(this._toggleClass(r,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),i.touched=!1}}_toggleClass(n,r){n=n.trim(),n.length>0&&n.split(Ry).forEach(i=>{r?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static \u0275fac=function(n){return new(n||e)(Mt(Ct),Mt(ya))};static \u0275dir=Vr({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return e})(),pD=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(n){this._viewContainerRef=n}ngOnChanges(n){if(this._shouldRecreateView(n)){let r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let i=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,i,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,r,i)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,r,i):!1,get:(n,r,i)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,i)}})}static \u0275fac=function(n){return new(n||e)(Mt(Br))};static \u0275dir=Vr({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[ts]})}return e})(),My="browser",Hk="server";function hD(e){return e===My}function Oy(e){return e===Hk}var jd=class{},ky=class extends Hd{supportsDOMEvents=!0},Ly=class OI extends ky{static makeCurrent(){cD(new OI)}onAndCancel(t,n,r,i){return t.addEventListener(n,r,i),()=>{t.removeEventListener(n,r,i)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.remove()}createElement(t,n){return n=n||this.getDefaultDocument(),n.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,n){return n==="window"?window:n==="document"?t:n==="body"?t.body:null}getBaseHref(t){let n=$k();return n==null?null:Wk(n)}resetBaseElement(){ol=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return dD(document.cookie,t)}},ol=null;function $k(){return ol=ol||document.querySelector("base"),ol?ol.getAttribute("href"):null}function Wk(e){return new URL(e,document.baseURI).pathname}var Gk=(()=>{class e{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),Fy=new pe(""),ED=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(n,r){this._zone=r,n.forEach(i=>{i.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,i,s){return this._findPluginFor(r).addEventListener(n,r,i,s)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(i=>i.supports(n)),!r)throw new $e(5101,!1);return this._eventNameToPlugin.set(n,r),r}static \u0275fac=function(n){return new(n||e)(Ze(Fy),Ze(Le))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),Wd=class{_doc;constructor(e){this._doc=e}manager},$d="ng-app-id";function mD(e){for(let t of e)t.remove()}function gD(e,t){let n=t.createElement("style");return n.textContent=e,n}function zk(e,t,n,r){let i=e.head?.querySelectorAll(`style[${$d}="${t}"],link[${$d}="${t}"]`);if(i)for(let s of i)s.removeAttribute($d),s instanceof HTMLLinkElement?r.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&n.set(s.textContent,{usage:0,elements:[s]})}function By(e,t){let n=t.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n}var wD=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(n,r,i,s={}){this.doc=n,this.appId=r,this.nonce=i,this.isServer=Oy(s),zk(n,r,this.inline,this.external),this.hosts.add(n.head)}addStyles(n,r){for(let i of n)this.addUsage(i,this.inline,gD);r?.forEach(i=>this.addUsage(i,this.external,By))}removeStyles(n,r){for(let i of n)this.removeUsage(i,this.inline);r?.forEach(i=>this.removeUsage(i,this.external))}addUsage(n,r,i){let s=r.get(n);s?s.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(o=>this.addElement(o,i(n,this.doc)))})}removeUsage(n,r){let i=r.get(n);i&&(i.usage--,i.usage<=0&&(mD(i.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])mD(n);this.hosts.clear()}addHost(n){this.hosts.add(n);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(n,gD(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(n,By(r,this.doc)))}removeHost(n){this.hosts.delete(n)}addElement(n,r){return this.nonce&&r.setAttribute("nonce",this.nonce),this.isServer&&r.setAttribute($d,this.appId),n.appendChild(r)}static \u0275fac=function(n){return new(n||e)(Ze(Qe),Ze(nl),Ze(Qg,8),Ze(rs))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),Py={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Uy=/%COMP%/g,bD="%COMP%",qk=`_nghost-${bD}`,Yk=`_ngcontent-${bD}`,Kk=!0,Zk=new pe("",{providedIn:"root",factory:()=>Kk});function Xk(e){return Yk.replace(Uy,e)}function Jk(e){return qk.replace(Uy,e)}function CD(e,t){return t.map(n=>n.replace(Uy,e))}var yD=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(n,r,i,s,o,a,l,c=null,h=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=s,this.doc=o,this.platformId=a,this.ngZone=l,this.nonce=c,this.tracingService=h,this.platformIsServer=Oy(a),this.defaultRenderer=new sl(n,o,l,this.platformIsServer,this.tracingService)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===Zr.ShadowDom&&(r=te(w({},r),{encapsulation:Zr.Emulated}));let i=this.getOrCreateRenderer(n,r);return i instanceof Gd?i.applyToHost(n):i instanceof al&&i.applyStyles(),i}getOrCreateRenderer(n,r){let i=this.rendererByCompId,s=i.get(r.id);if(!s){let o=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,d=this.platformIsServer,f=this.tracingService;switch(r.encapsulation){case Zr.Emulated:s=new Gd(l,c,r,this.appId,h,o,a,d,f);break;case Zr.ShadowDom:return new Vy(l,c,n,r,o,a,this.nonce,d,f);default:s=new al(l,c,r,h,o,a,d,f);break}i.set(r.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static \u0275fac=function(n){return new(n||e)(Ze(ED),Ze(wD),Ze(nl),Ze(Zk),Ze(Qe),Ze(rs),Ze(Le),Ze(Qg),Ze(ga,8))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),sl=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r,i){this.eventManager=e,this.doc=t,this.ngZone=n,this.platformIsServer=r,this.tracingService=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(Py[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(vD(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(vD(e)?e.content:e).insertBefore(t,n)}removeChild(e,t){t.remove()}selectRootElement(e,t){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new $e(-5104,!1);return t||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+":"+t;let i=Py[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Py[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){r&(Pi.DashCase|Pi.Important)?e.style.setProperty(t,n,r&Pi.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&Pi.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e=="string"&&(e=Da().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${t}`);let i=this.decoratePreventDefault(n);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,r)}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(t)):e(t))===!1&&t.preventDefault()}}};function vD(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var Vy=class extends sl{sharedStylesHost;hostEl;shadowRoot;constructor(e,t,n,r,i,s,o,a,l){super(e,i,s,a,l),this.sharedStylesHost=t,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=r.styles;c=CD(r.id,c);for(let d of c){let f=document.createElement("style");o&&f.setAttribute("nonce",o),f.textContent=d,this.shadowRoot.appendChild(f)}let h=r.getExternalStyles?.();if(h)for(let d of h){let f=By(d,i);o&&f.setAttribute("nonce",o),this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},al=class extends sl{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,i,s,o,a,l){super(e,i,s,o,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let c=n.styles;this.styles=l?CD(l,c):c,this.styleUrls=n.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Gd=class extends al{contentAttr;hostAttr;constructor(e,t,n,r,i,s,o,a,l){let c=r+"-"+n.id;super(e,t,n,i,s,o,a,l,c),this.contentAttr=Xk(c),this.hostAttr=Jk(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,""),n}},Qk=(()=>{class e extends Wd{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,i,s){return n.addEventListener(r,i,s),()=>this.removeEventListener(n,r,i,s)}removeEventListener(n,r,i,s){return n.removeEventListener(r,i,s)}static \u0275fac=function(n){return new(n||e)(Ze(Qe))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),_D=["alt","control","meta","shift"],eL={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},tL={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},nL=(()=>{class e extends Wd{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,i,s){let o=e.parseEventName(r),a=e.eventCallback(o.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Da().onAndCancel(n,o.domEventName,a,s))}static parseEventName(n){let r=n.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let s=e._normalizeKey(r.pop()),o="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),o="code."),_D.forEach(c=>{let h=r.indexOf(c);h>-1&&(r.splice(h,1),o+=c+".")}),o+=s,r.length!=0||s.length===0)return null;let l={};return l.domEventName=i,l.fullKey=o,l}static matchEventFullKeyCode(n,r){let i=eL[n.key]||n.key,s="";return r.indexOf("code.")>-1&&(i=n.code,s="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),_D.forEach(o=>{if(o!==i){let a=tL[o];a(n)&&(s+=o+".")}}),s+=i,s===r)}static eventCallback(n,r,i){return s=>{e.matchEventFullKeyCode(s,n)&&i.runGuarded(()=>r(s))}}static _normalizeKey(n){return n==="esc"?"escape":n}static \u0275fac=function(n){return new(n||e)(Ze(Qe))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})();function SD(e){return nD(rL(e))}function rL(e){return{appProviders:[...cL,...e?.providers??[]],platformProviders:aL}}function iL(){Ly.makeCurrent()}function oL(){return new Mi}function sL(){return BC(document),document}var aL=[{provide:rs,useValue:My},{provide:Jg,useValue:iL,multi:!0},{provide:Qe,useFactory:sL,deps:[]}],cL=[{provide:vd,useValue:"root"},{provide:Mi,useFactory:oL,deps:[]},{provide:Fy,useClass:Qk,multi:!0,deps:[Qe]},{provide:Fy,useClass:nL,multi:!0,deps:[Qe]},yD,wD,ED,{provide:pn,useExisting:yD},{provide:jd,useClass:Gk,deps:[]},[]],Hy=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:function(n){let r=null;return n?r=new(n||e):r=Ze(lL),r},providedIn:"root"})}return e})(),lL=(()=>{class e extends Hy{_doc;constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case ei.NONE:return r;case ei.HTML:return fo(r,"HTML")?Qr(r):ry(this._doc,String(r)).toString();case ei.STYLE:return fo(r,"Style")?Qr(r):r;case ei.SCRIPT:if(fo(r,"Script"))return Qr(r);throw new $e(5200,!1);case ei.URL:return fo(r,"URL")?Qr(r):Rd(String(r));case ei.RESOURCE_URL:if(fo(r,"ResourceURL"))return Qr(r);throw new $e(5201,!1);default:throw new $e(5202,!1)}}bypassSecurityTrustHtml(n){return qC(n)}bypassSecurityTrustStyle(n){return YC(n)}bypassSecurityTrustScript(n){return KC(n)}bypassSecurityTrustUrl(n){return ZC(n)}bypassSecurityTrustResourceUrl(n){return XC(n)}static \u0275fac=function(n){return new(n||e)(Ze(Qe))};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),DD="9.7.6",k=class ep{static SDK_VERSION=DD;static SDK_VERSION_CODE;static SDK="WEB";static LOG_PREFIX="CooeeSDK";static COOEE="cooee";static SESSION_STORAGE_SCROLL_ID="sleid";static IDLE_TIME_IN_SECONDS=30*60;static IN_APP_WRAPPER_NAME="cooee-wrapper";static IN_APP_CONTAINER_NAME="cooee-container";static IN_APP_DEFAULT_PADDING=15;static EVENT_SCREEN_VIEW="CE Screen View";static EVENT_APP_BACKGROUND="CE App Background";static EVENT_TRIGGER_DISPLAYED="CE Trigger Displayed";static EVENT_CAMPAIGN_HOLDOUT="CE Campaign Holdout";static EVENT_CAMPAIGN_REJECTED="CE Campaign Rejected";static EVENT_CAMPAIGN_FAILED="CE Campaign Failed";static EVENT_TRIGGER_CLOSED="CE Trigger Closed";static EVENT_SCROLL="CE Scroll";static EVENT_TRIGGER_CLICKED="CE Trigger Clicked";static EVENT_FORM_SUBMITTED="CE Form Submitted";static EVENT_EXPERIMENT_START="CE Experiment Start";static EVENT_VIDEO_DIALOG_CLOSED="CE Video Dialog Closed";static EVENT_VIDEO_DIALOG_OPENED="CE Video Dialog Opened";static EVENT_VIDEO_CHANGE="CE Video Changed";static EVENT_LAST_VIDEO_ENDED="CE Last Video Ended";static EVENT_VIDEO_MUTED="CE Video Muted";static EVENT_VIDEO_UNMUTED="CE Video Unmuted";static EVENT_ADD_TO_CART_CLICKED="CE Add To Cart Clicked";static EVENT_VIEW_ITEM_CLICKED="CE View Item Clicked";static EVENT_MORE_ITEM_INFO_CLICKED="CE More Item Info Clicked";static EVENT_OPEN_CART_CLICKED="CE Open Cart Clicked";static EVENT_ADD_TO_CART="Add To Cart";static EVENT_REMOVE_FROM_CART="Remove From Cart";static EVENT_VIEW_ITEM="View Item";static EVENT_VIEW_CART="View Cart";static EVENT_VIEW_COLLECTION="View Collection";static EVENT_BUY_NOW_CLICKED="Buy Now Clicked";static EVENT_CHECKOUT_STARTED="Checkout Started";static EVENT_REVIEW_CLICKED="Review Clicked";static EVENT_ITEM_THUMBNAIL_CLICKED="Item Thumbnail Clicked";static JS_LOAD_WHITELIST_EVENTS=[this.EVENT_VIEW_ITEM,this.EVENT_VIEW_CART,this.EVENT_VIEW_COLLECTION];static HASH_INITIATE_CHECKOUT="initiate-checkout";static HASH_OPEN_CART_DRAWER="open-cart-drawer";static ADD_BUNDLE_CTA_INBOUND_EVENT="letscooee:inbound:cta:add-bundle";static CTA_OPEN_CART_EVENT="letscooee:outbound:open-cart";static CTA_AFTER_REFRESH_UI="letscooee:outbound:refresh-ui";static POPUP_ACTIVITY_EVENT="letscooee:outbound:popup-activities";static THIRD_PARTY_CHECKOUT_EVENT="letscooee:outbound:third-party-initiate-checkout";static CAMPAIGN_DISPLAYED_ACTIVITY="DISPLAYED";static CAMPAIGN_CLICKED_ACTIVITY="CLICKED";static CAMPAIGN_CLOSED_ACTIVITY="CLOSED";static BLACKLISTED_PAGE_NAMES=["collection","product","cart"];static API_CALL_MAX_ATTEMPTS=3;static API_CALL_RETRY_DELAY=1e3;static PLACEHOLDER_IMAGE="https://cdn.global.letscooee.com/images/placeholders/product.png";static CART_UPDATE_BROADCAST="CART_UPDATE";static GRAPHQL_VERSION="2024-10";static GRAPHQL_API_PATH=`/api/${this.GRAPHQL_VERSION}/graphql.json`;static SHADOW_SPLITTER=":shadow";static CAMPAIGN_ATTRIBUTE="_letscooee_campaign";static CONTENT_ATTRIBUTE="_letscooee_content";static VIA="_via";static PAYMENT_MODAL_DETAILS=[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}];static{let t=ep.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");ep.SDK_VERSION_CODE=parseInt(t,10)}},hn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.js`},ir=Re(us()),C=class{static log(...e){ir.default.info(...e)}static debug(...e){ir.default.debug(...e)}static error(...e){ir.default.error(...e)}static warn(...e){ir.default.warn(...e)}static info(...e){ir.default.info(...e)}static trace(...e){ir.default.trace(...e)}static configure(e=k.LOG_PREFIX){ir.default.useDefaults({formatter:function(n){n.unshift(`${e} (v${k.SDK_VERSION}):`)}});let t=this.getDebugParam();(t==="1"||t==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?ir.default.setLevel(ir.default[localStorage.cooeeLogLevel]):ir.default.setLevel(hn.debug?ir.default.TRACE:ir.default.OFF)}static getDebugParam(){return new URL(location.href).searchParams?.get("cooee-debug")}static logBrand(){let e=`
7
+ `)}`}function Go(e,t){return e.hasOwnProperty(Yu)?e[Yu]:null}function iA(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=t[r];if(n&&(i=n(i),s=n(s)),s!==i)return!1}return!0}function oA(e){return e.flat(Number.POSITIVE_INFINITY)}function Mg(e,t){e.forEach(n=>Array.isArray(n)?Mg(n,t):t(n))}function Pb(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Zu(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function sA(e,t,n,r){let i=e.length;if(i==t)e.push(n,r);else if(i===1)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;){let s=i-2;e[i]=e[s],i--}e[t]=n,e[t+1]=r}}function aA(e,t,n){let r=Xc(e,t);return r>=0?e[r|1]=n:(r=~r,sA(e,r,t,n)),r}function am(e,t){let n=Xc(e,t);if(n>=0)return e[n|1]}function Xc(e,t){return cA(e,t,1)}function cA(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){let s=r+(i-r>>1),o=e[s<<n];if(t===o)return s<<n;o>t?i=s:r=s+1}return~(i<<n)}var zo={},xi=[],Vc=new pe(""),kb=new pe("",-1),Lb=new pe(""),Xu=class{get(e,t=Bc){if(t===Bc){let n=new Error(`NullInjectorError: No provider for ${mr(e)}!`);throw n.name="NullInjectorError",n}return t}};function qo(e){return e[WN]||null}function Fb(e){return e[GN]||null}function Bb(e){return e[Ng]||null}function lA(e){let t=qo(e)||Fb(e)||Bb(e);return t!==null&&t.standalone}function Vb(e){return{\u0275providers:e}}function uA(...e){return{\u0275providers:Ub(!0,e),\u0275fromNgModule:!0}}function Ub(e,...t){let n=[],r=new Set,i,s=o=>{n.push(o)};return Mg(t,o=>{let a=o;Sm(a,s,[],r)&&(i||=[],i.push(a))}),i!==void 0&&Hb(i,s),n}function Hb(e,t){for(let n=0;n<e.length;n++){let{ngModule:r,providers:i}=e[n];Og(i,s=>{t(s,r)})}}function Sm(e,t,n,r){if(e=kn(e),!e)return!1;let i=null,s=Hw(e),o=!s&&qo(e);if(!s&&!o){let l=e.ngModule;if(s=Hw(l),s)i=l;else return!1}else{if(o&&!o.standalone)return!1;i=e}let a=r.has(i);if(o){if(a)return!1;if(r.add(i),o.dependencies){let l=typeof o.dependencies=="function"?o.dependencies():o.dependencies;for(let c of l)Sm(c,t,n,r)}}else if(s){if(s.imports!=null&&!a){r.add(i);let c;try{Mg(s.imports,h=>{Sm(h,t,n,r)&&(c||=[],c.push(h))})}finally{}c!==void 0&&Hb(c,t)}if(!a){let c=Go(i)||(()=>new i);t({provide:i,useFactory:c,deps:xi},i),t({provide:Lb,useValue:i,multi:!0},i),t({provide:Vc,useValue:()=>Ze(i),multi:!0},i)}let l=s.providers;if(l!=null&&!a){let c=e;Og(l,h=>{t(h,c)})}}else return!1;return i!==e&&e.providers!==void 0}function Og(e,t){for(let n of e)Ab(n)&&(n=n.\u0275providers),Array.isArray(n)?Og(n,t):t(n)}var dA=Tt({provide:String,useValue:Tt});function jb(e){return e!==null&&typeof e=="object"&&dA in e}function fA(e){return!!(e&&e.useExisting)}function pA(e){return!!(e&&e.useFactory)}function ca(e){return typeof e=="function"}function hA(e){return!!e.useClass}var vd=new pe(""),ju={},mA={},cm;function _d(){return cm===void 0&&(cm=new Xu),cm}var Gn=class{},Uc=class extends Gn{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,Im(e,s=>this.processProvider(s)),this.records.set(kb,ta(void 0,this)),r.has("environment")&&this.records.set(Gn,ta(void 0,this));let i=this.records.get(vd);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Lb,xi,Ke.Self))}destroy(){kc(this),this._destroyed=!0;let e=je(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),je(e)}}onDestroy(e){return kc(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){kc(this);let t=io(this),n=Wn(void 0),r;try{return e()}finally{io(t),Wn(n)}}get(e,t=Bc,n=Ke.Default){if(kc(this),e.hasOwnProperty($w))return e[$w](this);n=yd(n);let r,i=io(this),s=Wn(void 0);try{if(!(n&Ke.SkipSelf)){let a=this.records.get(e);if(a===void 0){let l=EA(e)&&Rg(e);l&&this.injectableDefInScope(l)?a=ta(Dm(e),ju):a=null,this.records.set(e,a)}if(a!=null)return this.hydrate(e,a)}let o=n&Ke.Self?_d():this.parent;return t=n&Ke.Optional&&t===Bc?null:t,o.get(e,t)}catch(o){if(o.name==="NullInjectorError"){if((o[Ku]=o[Ku]||[]).unshift(mr(e)),i)throw o;return nA(o,e,"R3InjectorError",this.source)}else throw o}finally{Wn(s),io(i)}}resolveInjectorInitializers(){let e=je(null),t=io(this),n=Wn(void 0),r;try{let i=this.get(Vc,xi,Ke.Self);for(let s of i)s()}finally{io(t),Wn(n),je(e)}}toString(){let e=[],t=this.records;for(let n of t.keys())e.push(mr(n));return`R3Injector[${e.join(", ")}]`}processProvider(e){e=kn(e);let t=ca(e)?e:kn(e&&e.provide),n=yA(e);if(!ca(e)&&e.multi===!0){let r=this.records.get(t);r||(r=ta(void 0,ju,!0),r.factory=()=>Cm(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t){let n=je(null);try{return t.value===ju&&(t.value=mA,t.value=t.factory()),typeof t.value=="object"&&t.value&&_A(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{je(n)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=kn(e.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function Dm(e){let t=Rg(e),n=t!==null?t.factory:Go(e);if(n!==null)return n;if(e instanceof pe)throw new $e(204,!1);if(e instanceof Function)return gA(e);throw new $e(204,!1)}function gA(e){if(e.length>0)throw new $e(204,!1);let t=jN(e);return t!==null?()=>t.factory(e):()=>new e}function yA(e){if(jb(e))return ta(void 0,e.useValue);{let t=$b(e);return ta(t,ju)}}function $b(e,t,n){let r;if(ca(e)){let i=kn(e);return Go(i)||Dm(i)}else if(jb(e))r=()=>kn(e.useValue);else if(pA(e))r=()=>e.useFactory(...Cm(e.deps||[]));else if(fA(e))r=()=>Ze(kn(e.useExisting));else{let i=kn(e&&(e.useClass||e.provide));if(vA(e))r=()=>new i(...Cm(e.deps));else return Go(i)||Dm(i)}return r}function kc(e){if(e.destroyed)throw new $e(205,!1)}function ta(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function vA(e){return!!e.deps}function _A(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function EA(e){return typeof e=="function"||typeof e=="object"&&e instanceof pe}function Im(e,t){for(let n of e)Array.isArray(n)?Im(n,t):n&&Ab(n)?Im(n.\u0275providers,t):t(n)}function Wb(e,t){e instanceof Uc&&kc(e);let n,r=io(e),i=Wn(void 0);try{return t()}finally{io(r),Wn(i)}}function Gb(){return Mb()!==void 0||QN()!=null}function zb(e){if(!Gb())throw new $e(-203,!1)}function wA(e){return typeof e=="function"}var Fi=0,_e=1,be=2,Rn=3,Or=4,Lr=5,Hc=6,Ju=7,jt=8,jc=9,Ri=10,sn=11,$c=12,Gw=13,pa=14,Pr=15,Yo=16,na=17,Ni=18,Jc=19,qb=20,oo=21,lm=22,Qu=23,Qn=24,sa=25,Vt=26,Yb=1,Ko=7,ed=8,la=9,xn=10;function Ti(e){return Array.isArray(e)&&typeof e[Yb]=="object"}function Bi(e){return Array.isArray(e)&&e[Yb]===!0}function Pg(e){return(e.flags&4)!==0}function ha(e){return e.componentOffset>-1}function Ed(e){return(e.flags&1)===1}function Kr(e){return!!e.template}function td(e){return(e[be]&512)!==0}function Qc(e){return(e[be]&256)===256}var Tm=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function Kb(e,t,n,r){t!==null?t.applyValueToInputSignal(t,r):e[n]=r}var ts=(()=>{let e=()=>Zb;return e.ngInherit=!0,e})();function Zb(e){return e.type.prototype.ngOnChanges&&(e.setInput=CA),bA}function bA(){let e=Jb(this),t=e?.current;if(t){let n=e.previous;if(n===zo)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function CA(e,t,n,r,i){let s=this.declaredInputs[r],o=Jb(e)||SA(e,{previous:zo,current:null}),a=o.current||(o.current={}),l=o.previous,c=l[s];a[s]=new Tm(c&&c.currentValue,n,l===zo),Kb(e,t,i,n)}var Xb="__ngSimpleChanges__";function Jb(e){return e[Xb]||null}function SA(e,t){return e[Xb]=t}var zw=null,pt=function(e,t=null,n){zw?.(e,t,n)},Qb="svg",DA="math";function er(e){for(;Array.isArray(e);)e=e[Fi];return e}function eC(e,t){return er(t[e])}function Xr(e,t){return er(t[e.index])}function kg(e,t){return e.data[t]}function wd(e,t){return e[t]}function gr(e,t){let n=t[e];return Ti(n)?n:n[Fi]}function IA(e){return(e[be]&4)===4}function Lg(e){return(e[be]&128)===128}function TA(e){return Bi(e[Rn])}function so(e,t){return t==null?null:e[t]}function tC(e){e[na]=0}function Fg(e){e[be]&1024||(e[be]|=1024,Lg(e)&&el(e))}function xA(e,t){for(;e>0;)t=t[pa],e--;return t}function bd(e){return!!(e[be]&9216||e[Qn]?.dirty)}function xm(e){e[Ri].changeDetectionScheduler?.notify(8),e[be]&64&&(e[be]|=1024),bd(e)&&el(e)}function el(e){e[Ri].changeDetectionScheduler?.notify(0);let t=Zo(e);for(;t!==null&&!(t[be]&8192||(t[be]|=8192,!Lg(t)));)t=Zo(t)}function nC(e,t){if(Qc(e))throw new $e(911,!1);e[oo]===null&&(e[oo]=[]),e[oo].push(t)}function RA(e,t){if(e[oo]===null)return;let n=e[oo].indexOf(t);n!==-1&&e[oo].splice(n,1)}function Zo(e){let t=e[Rn];return Bi(t)?t[Rn]:t}function rC(e){return e[Ju]??=[]}function iC(e){return e.cleanup??=[]}function NA(e,t,n,r){let i=rC(t);i.push(n),e.firstCreatePass&&iC(e).push(r,i.length-1)}var xe={lFrame:fC(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Rm=!1;function AA(){return xe.lFrame.elementDepthCount}function MA(){xe.lFrame.elementDepthCount++}function OA(){xe.lFrame.elementDepthCount--}function Bg(){return xe.bindingsEnabled}function PA(){return xe.skipHydrationRootTNode!==null}function kA(e){return xe.skipHydrationRootTNode===e}function LA(){xe.skipHydrationRootTNode=null}function Fe(){return xe.lFrame.lView}function Zt(){return xe.lFrame.tView}function Xt(e){return xe.lFrame.contextLView=e,e[jt]}function Jt(e){return xe.lFrame.contextLView=null,e}function tr(){let e=oC();for(;e!==null&&e.type===64;)e=e.parent;return e}function oC(){return xe.lFrame.currentTNode}function FA(){let e=xe.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function co(e,t){let n=xe.lFrame;n.currentTNode=e,n.isParent=t}function Vg(){return xe.lFrame.isParent}function sC(){xe.lFrame.isParent=!1}function aC(){return xe.lFrame.contextLView}function cC(){return Rm}function qw(e){let t=Rm;return Rm=e,t}function Ug(){let e=xe.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function BA(e){return xe.lFrame.bindingIndex=e}function tl(){return xe.lFrame.bindingIndex++}function VA(e){let t=xe.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function UA(){return xe.lFrame.inI18n}function HA(e,t){let n=xe.lFrame;n.bindingIndex=n.bindingRootIndex=e,Nm(t)}function jA(){return xe.lFrame.currentDirectiveIndex}function Nm(e){xe.lFrame.currentDirectiveIndex=e}function $A(e){let t=xe.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function lC(){return xe.lFrame.currentQueryIndex}function Hg(e){xe.lFrame.currentQueryIndex=e}function WA(e){let t=e[_e];return t.type===2?t.declTNode:t.type===1?e[Lr]:null}function uC(e,t,n){if(n&Ke.SkipSelf){let i=t,s=e;for(;(i=i.parent,i===null&&!(n&Ke.Host))&&(i=WA(s),!(i===null||(s=s[pa],i.type&10))););if(i===null)return!1;t=i,e=s}let r=xe.lFrame=dC();return r.currentTNode=t,r.lView=e,!0}function jg(e){let t=dC(),n=e[_e];xe.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function dC(){let e=xe.lFrame,t=e===null?null:e.child;return t===null?fC(e):t}function fC(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function pC(){let e=xe.lFrame;return xe.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var hC=pC;function $g(){let e=pC();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function GA(e){return(xe.lFrame.contextLView=xA(e,xe.lFrame.contextLView))[jt]}function lo(){return xe.lFrame.selectedIndex}function Xo(e){xe.lFrame.selectedIndex=e}function Wg(){let e=xe.lFrame;return kg(e.tView,e.selectedIndex)}function vr(){xe.lFrame.currentNamespace=Qb}function ns(){zA()}function zA(){xe.lFrame.currentNamespace=null}function qA(){return xe.lFrame.currentNamespace}var mC=!0;function Cd(){return mC}function Sd(e){mC=e}function YA(e,t,n){let{ngOnChanges:r,ngOnInit:i,ngDoCheck:s}=t.type.prototype;if(r){let o=Zb(t);(n.preOrderHooks??=[]).push(e,o),(n.preOrderCheckHooks??=[]).push(e,o)}i&&(n.preOrderHooks??=[]).push(0-e,i),s&&((n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s))}function Gg(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n<r;n++){let i=e.data[n].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:o,ngAfterViewInit:a,ngAfterViewChecked:l,ngOnDestroy:c}=i;s&&(e.contentHooks??=[]).push(-n,s),o&&((e.contentHooks??=[]).push(n,o),(e.contentCheckHooks??=[]).push(n,o)),a&&(e.viewHooks??=[]).push(-n,a),l&&((e.viewHooks??=[]).push(n,l),(e.viewCheckHooks??=[]).push(n,l)),c!=null&&(e.destroyHooks??=[]).push(n,c)}}function $u(e,t,n){gC(e,t,3,n)}function Wu(e,t,n,r){(e[be]&3)===n&&gC(e,t,n,r)}function um(e,t){let n=e[be];(n&3)===t&&(n&=16383,n+=1,e[be]=n)}function gC(e,t,n,r){let i=r!==void 0?e[na]&65535:0,s=r??-1,o=t.length-1,a=0;for(let l=i;l<o;l++)if(typeof t[l+1]=="number"){if(a=t[l],r!=null&&a>=r)break}else t[l]<0&&(e[na]+=65536),(a<s||s==-1)&&(KA(e,n,t,l),e[na]=(e[na]&4294901760)+l+2),l++}function Yw(e,t){pt(4,e,t);let n=je(null);try{t.call(e)}finally{je(n),pt(5,e,t)}}function KA(e,t,n,r){let i=n[r]<0,s=n[r+1],o=i?-n[r]:n[r],a=e[o];i?e[be]>>14<e[na]>>16&&(e[be]&3)===t&&(e[be]+=16384,Yw(a,s)):Yw(a,s)}var aa=-1,Jo=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n){this.factory=e,this.canSeeViewProviders=t,this.injectImpl=n}};function ZA(e){return e instanceof Jo}function XA(e){return(e.flags&8)!==0}function JA(e){return(e.flags&16)!==0}function QA(e,t,n){let r=0;for(;r<n.length;){let i=n[r];if(typeof i=="number"){if(i!==0)break;r++;let s=n[r++],o=n[r++],a=n[r++];e.setAttribute(t,o,a,s)}else{let s=i,o=n[++r];tM(s)?e.setProperty(t,s,o):e.setAttribute(t,s,o),r++}}return r}function eM(e){return e===3||e===4||e===6}function tM(e){return e.charCodeAt(0)===64}function ua(e,t){if(!(t===null||t.length===0))if(e===null||e.length===0)e=t.slice();else{let n=-1;for(let r=0;r<t.length;r++){let i=t[r];typeof i=="number"?n=i:n===0||(n===-1||n===2?Kw(e,n,i,null,t[++r]):Kw(e,n,i,null,null))}}return e}function Kw(e,t,n,r,i){let s=0,o=e.length;if(t===-1)o=-1;else for(;s<e.length;){let a=e[s++];if(typeof a=="number"){if(a===t){o=-1;break}else if(a>t){o=s-1;break}}}for(;s<e.length;){let a=e[s];if(typeof a=="number")break;if(a===n){if(r===null){i!==null&&(e[s+1]=i);return}else if(r===e[s+1]){e[s+2]=i;return}}s++,r!==null&&s++,i!==null&&s++}o!==-1&&(e.splice(o,0,t),s=o+1),e.splice(s++,0,n),r!==null&&e.splice(s++,0,r),i!==null&&e.splice(s++,0,i)}var dm={},Am=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){n=yd(n);let r=this.injector.get(e,dm,n);return r!==dm||t===dm?r:this.parentInjector.get(e,t,n)}};function yC(e){return e!==aa}function nd(e){return e&32767}function nM(e){return e>>16}function rd(e,t){let n=nM(e),r=t;for(;n>0;)r=r[pa],n--;return r}var Mm=!0;function id(e){let t=Mm;return Mm=e,t}var rM=256,vC=rM-1,_C=5,iM=0,qr={};function oM(e,t,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:n.hasOwnProperty(Fc)&&(r=n[Fc]),r==null&&(r=n[Fc]=iM++);let i=r&vC,s=1<<i;t.data[e+(i>>_C)]|=s}function od(e,t){let n=EC(e,t);if(n!==-1)return n;let r=t[_e];r.firstCreatePass&&(e.injectorIndex=t.length,fm(r.data,e),fm(t,null),fm(r.blueprint,null));let i=zg(e,t),s=e.injectorIndex;if(yC(i)){let o=nd(i),a=rd(i,t),l=a[_e].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=i,s}function fm(e,t){e.push(0,0,0,0,0,0,0,0,t)}function EC(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function zg(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,i=t;for(;i!==null;){if(r=DC(i),r===null)return aa;if(n++,i=i[pa],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return aa}function Om(e,t,n){oM(e,t,n)}function wC(e,t,n){if(n&Ke.Optional||e!==void 0)return e;Ag(t,"NodeInjector")}function bC(e,t,n,r){if(n&Ke.Optional&&r===void 0&&(r=null),(n&(Ke.Self|Ke.Host))===0){let i=e[jc],s=Wn(void 0);try{return i?i.get(t,r,n&Ke.Optional):Ob(t,r,n&Ke.Optional)}finally{Wn(s)}}return wC(r,t,n)}function CC(e,t,n,r=Ke.Default,i){if(e!==null){if(t[be]&2048&&!(r&Ke.Self)){let o=lM(e,t,n,r,qr);if(o!==qr)return o}let s=SC(e,t,n,r,qr);if(s!==qr)return s}return bC(t,n,r,i)}function SC(e,t,n,r,i){let s=aM(n);if(typeof s=="function"){if(!uC(t,e,r))return r&Ke.Host?wC(i,n,r):bC(t,n,r,i);try{let o;if(o=s(r),o==null&&!(r&Ke.Optional))Ag(n);else return o}finally{hC()}}else if(typeof s=="number"){let o=null,a=EC(e,t),l=aa,c=r&Ke.Host?t[Pr][Lr]:null;for((a===-1||r&Ke.SkipSelf)&&(l=a===-1?zg(e,t):t[a+8],l===aa||!Xw(r,!1)?a=-1:(o=t[_e],a=nd(l),t=rd(l,t)));a!==-1;){let h=t[_e];if(Zw(s,a,h.data)){let d=sM(a,t,n,o,r,c);if(d!==qr)return d}l=t[a+8],l!==aa&&Xw(r,t[_e].data[a+8]===c)&&Zw(s,a,t)?(o=h,a=nd(l),t=rd(l,t)):a=-1}}return i}function sM(e,t,n,r,i,s){let o=t[_e],a=o.data[e+8],l=r==null?ha(a)&&Mm:r!=o&&(a.type&3)!==0,c=i&Ke.Host&&s===a,h=Gu(a,o,n,l,c);return h!==null?Wc(t,o,h,a):qr}function Gu(e,t,n,r,i){let s=e.providerIndexes,o=t.data,a=s&1048575,l=e.directiveStart,c=e.directiveEnd,h=s>>20,d=r?a:a+h,f=i?a+h:c;for(let g=d;g<f;g++){let m=o[g];if(g<l&&n===m||g>=l&&m.type===n)return g}if(i){let g=o[l];if(g&&Kr(g)&&g.type===n)return l}return null}function Wc(e,t,n,r){let i=e[n],s=t.data;if(ZA(i)){let o=i;o.resolving&&qN(zN(s[n]));let a=id(o.canSeeViewProviders);o.resolving=!0;let l,c=o.injectImpl?Wn(o.injectImpl):null,h=uC(e,r,Ke.Default);try{i=e[n]=o.factory(void 0,s,e,r),t.firstCreatePass&&n>=r.directiveStart&&YA(n,s[n],t)}finally{c!==null&&Wn(c),id(a),o.resolving=!1,hC()}}return i}function aM(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(Fc)?e[Fc]:void 0;return typeof t=="number"?t>=0?t&vC:cM:t}function Zw(e,t,n){let r=1<<e;return!!(n[t+(e>>_C)]&r)}function Xw(e,t){return!(e&Ke.Self)&&!(e&Ke.Host&&t)}var $o=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return CC(this._tNode,this._lView,e,yd(n),t)}};function cM(){return new $o(tr(),Fe())}function Dd(e){return Tg(()=>{let t=e.prototype.constructor,n=t[Yu]||Pm(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let s=i[Yu]||Pm(i);if(s&&s!==n)return s;i=Object.getPrototypeOf(i)}return s=>new s})}function Pm(e){return xb(e)?()=>{let t=Pm(kn(e));return t&&t()}:Go(e)}function lM(e,t,n,r,i){let s=e,o=t;for(;s!==null&&o!==null&&o[be]&2048&&!td(o);){let a=SC(s,o,n,r|Ke.Self,qr);if(a!==qr)return a;let l=s.parent;if(!l){let c=o[qb];if(c){let h=c.get(n,qr,r);if(h!==qr)return h}l=DC(o),o=o[pa]}s=l}return i}function DC(e){let t=e[_e],n=t.type;return n===2?t.declTNode:n===1?e[Lr]:null}function Jw(e,t=null,n=null,r){let i=uM(e,t,n,r);return i.resolveInjectorInitializers(),i}function uM(e,t=null,n=null,r,i=new Set){let s=[n||xi,uA(e)];return r=r||(typeof e=="object"?void 0:mr(e)),new Uc(s,t||_d(),r||null,i)}var ht=class GE{static THROW_IF_NOT_FOUND=Bc;static NULL=new Xu;static create(t,n){if(Array.isArray(t))return Jw({name:""},n,t,"");{let r=t.name??"";return Jw({name:r},t.parent,t.providers,r)}}static \u0275prov=ne({token:GE,providedIn:"any",factory:()=>Ze(kb)});static __NG_ELEMENT_ID__=-1},dM=new pe("");dM.__NG_ELEMENT_ID__=e=>{let t=tr();if(t===null)throw new $e(204,!1);if(t.type&2)return t.value;if(e&Ke.Optional)return null;throw new $e(204,!1)};var IC=!1,qg=(()=>{class e{static __NG_ELEMENT_ID__=fM;static __NG_ENV_ID__=n=>n}return e})(),km=class extends qg{_lView;constructor(e){super(),this._lView=e}onDestroy(e){return nC(this._lView,e),()=>RA(this._lView,e)}};function fM(){return new km(Fe())}var Ai=class{},Id=new pe("",{providedIn:"root",factory:()=>!1}),TC=new pe(""),Yg=new pe(""),Td=(()=>{class e{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new Nr(!1);add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}has(n){return this.pendingTasks.has(n)}remove(n){this.pendingTasks.delete(n),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static \u0275prov=ne({token:e,providedIn:"root",factory:()=>new e})}return e})(),Lm=class extends J{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,Gb()&&(this.destroyRef=O(qg,{optional:!0})??void 0,this.pendingTasks=O(Td,{optional:!0})??void 0)}emit(e){let t=je(null);try{super.next(e)}finally{je(t)}}subscribe(e,t,n){let r=e,i=t||(()=>null),s=n;if(e&&typeof e=="object"){let a=e;r=a.next?.bind(a),i=a.error?.bind(a),s=a.complete?.bind(a)}this.__isAsync&&(i=this.wrapInTimeout(i),r&&(r=this.wrapInTimeout(r)),s&&(s=this.wrapInTimeout(s)));let o=super.subscribe({next:r,error:i,complete:s});return e instanceof ot&&e.add(o),o}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{e(t),n!==void 0&&this.pendingTasks?.remove(n)})}}},Je=Lm;function sd(...e){}function xC(e){let t,n;function r(){e=sd;try{n!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame=="function"&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function Qw(e){return queueMicrotask(()=>e()),()=>{e=sd}}var Kg="isAngularZone",ad=Kg+"_ID",pM=0,Le=class Yd{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Je(!1);onMicrotaskEmpty=new Je(!1);onStable=new Je(!1);onError=new Je(!1);constructor(t){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:s=IC}=t;if(typeof Zone>"u")throw new $e(908,!1);Zone.assertZonePatched();let o=this;o._nesting=0,o._outer=o._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(o._inner=o._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(o._inner=o._inner.fork(Zone.longStackTraceZoneSpec)),o.shouldCoalesceEventChangeDetection=!i&&r,o.shouldCoalesceRunChangeDetection=i,o.callbackScheduled=!1,o.scheduleInRootZone=s,gM(o)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Kg)===!0}static assertInAngularZone(){if(!Yd.isInAngularZone())throw new $e(909,!1)}static assertNotInAngularZone(){if(Yd.isInAngularZone())throw new $e(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,i){let s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+i,t,hM,sd,sd);try{return s.runTask(o,n,r)}finally{s.cancelTask(o)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}},hM={};function Zg(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function mM(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){xC(()=>{e.callbackScheduled=!1,Fm(e),e.isCheckStableRunning=!0,Zg(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Fm(e)}function gM(e){let t=()=>{mM(e)},n=pM++;e._inner=e._inner.fork({name:"angular",properties:{[Kg]:!0,[ad]:n,[ad+n]:!0},onInvokeTask:(r,i,s,o,a,l)=>{if(yM(l))return r.invokeTask(s,o,a,l);try{return eb(e),r.invokeTask(s,o,a,l)}finally{(e.shouldCoalesceEventChangeDetection&&o.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),tb(e)}},onInvoke:(r,i,s,o,a,l,c)=>{try{return eb(e),r.invoke(s,o,a,l,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!vM(l)&&t(),tb(e)}},onHasTask:(r,i,s,o)=>{r.hasTask(s,o),i===s&&(o.change=="microTask"?(e._hasPendingMicrotasks=o.microTask,Fm(e),Zg(e)):o.change=="macroTask"&&(e.hasPendingMacrotasks=o.macroTask))},onHandleError:(r,i,s,o)=>(r.handleError(s,o),e.runOutsideAngular(()=>e.onError.emit(o)),!1)})}function Fm(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function eb(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function tb(e){e._nesting--,Zg(e)}var cd=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Je;onMicrotaskEmpty=new Je;onStable=new Je;onError=new Je;run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function yM(e){return RC(e,"__ignore_ng_zone__")}function vM(e){return RC(e,"__scheduler_tick__")}function RC(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Mi=class{_console=console;handleError(e){this._console.error("ERROR",e)}},_M=new pe("",{providedIn:"root",factory:()=>{let e=O(Le),t=O(Mi);return n=>e.runOutsideAngular(()=>t.handleError(n))}});function EM(){return ma(tr(),Fe())}function ma(e,t){return new Ct(Xr(e,t))}var Ct=(()=>{class e{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=EM}return e})();function wM(e){return e instanceof Ct?e.nativeElement:e}function Vi(e,t){let n=cw(e),r=n[bi];return t?.equal&&(r.equal=t.equal),n.set=i=>Yh(r,i),n.update=i=>lw(r,i),n.asReadonly=bM.bind(n),n}function bM(){let e=this[bi];if(e.readonlyFn===void 0){let t=()=>this();t[bi]=e,e.readonlyFn=t}return e.readonlyFn}function CM(){return this._results[Symbol.iterator]()}var Bm=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new J}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let n=oA(e);(this._changesDetected=!iA(this._results,n,t))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=CM};function NC(e){return(e.flags&128)===128}var AC=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(AC||{}),Xg=new Map,SM=0;function DM(){return SM++}function IM(e){Xg.set(e[Jc],e)}function MC(e){return Xg.get(e)||null}function Vm(e){Xg.delete(e[Jc])}var Um=class{lViewId;nodeIndex;native;component;directives;localRefs;get lView(){return MC(this.lViewId)}constructor(e,t,n){this.lViewId=e,this.nodeIndex=t,this.native=n}};function OC(e){let t=pm(e);if(t){if(Ti(t)){let n=t,r,i,s;if(PC(e)){if(r=RM(n,e),r==-1)throw new Error("The provided component was not found in the application");i=e}else if(TM(e)){if(r=NM(n,e),r==-1)throw new Error("The provided directive was not found in the application");s=AM(r,n)}else if(r=rb(n,e),r==-1)return null;let o=er(n[r]),a=pm(o),l=a&&!Array.isArray(a)?a:nb(n,r,o);if(i&&l.component===void 0&&(l.component=i,Yr(l.component,l)),s&&l.directives===void 0){l.directives=s;for(let c=0;c<s.length;c++)Yr(s[c],l)}Yr(l.native,l),t=l}}else{let n=e,r=n;for(;r=r.parentNode;){let i=pm(r);if(i){let s=Array.isArray(i)?i:i.lView;if(!s)return null;let o=rb(s,n);if(o>=0){let a=er(s[o]),l=nb(s,o,a);Yr(a,l),t=l;break}}}}return t||null}function nb(e,t,n){return new Um(e[Jc],t,n)}var Hm="__ngContext__";function Yr(e,t){Ti(t)?(e[Hm]=t[Jc],IM(t)):e[Hm]=t}function pm(e){let t=e[Hm];return typeof t=="number"?MC(t):t||null}function PC(e){return e&&e.constructor&&e.constructor.\u0275cmp}function TM(e){return e&&e.constructor&&e.constructor.\u0275dir}function rb(e,t){let n=e[_e];for(let r=Vt;r<n.bindingStartIndex;r++)if(er(e[r])===t)return r;return-1}function xM(e){if(e.child)return e.child;if(e.next)return e.next;for(;e.parent&&!e.parent.next;)e=e.parent;return e.parent&&e.parent.next}function RM(e,t){let n=e[_e].components;if(n)for(let r=0;r<n.length;r++){let i=n[r];if(gr(i,e)[jt]===t)return i}else if(gr(Vt,e)[jt]===t)return Vt;return-1}function NM(e,t){let n=e[_e].firstChild;for(;n;){let r=n.directiveStart,i=n.directiveEnd;for(let s=r;s<i;s++)if(e[s]===t)return n.index;n=xM(n)}return-1}function AM(e,t){let n=t[_e].data[e];if(n.directiveStart===0)return xi;let r=[];for(let i=n.directiveStart;i<n.directiveEnd;i++){let s=t[i];PC(s)||r.push(s)}return r}function kC(e){return FC(e[$c])}function LC(e){return FC(e[Or])}function FC(e){for(;e!==null&&!Bi(e);)e=e[Or];return e}var jm;function BC(e){jm=e}function VC(){if(jm!==void 0)return jm;if(typeof document<"u")return document;throw new $e(210,!1)}var nl=new pe("",{providedIn:"root",factory:()=>MM}),MM="ng",Jg=new pe(""),rs=new pe("",{providedIn:"platform",factory:()=>"unknown"}),UC=new pe(""),Qg=new pe("",{providedIn:"root",factory:()=>VC().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null}),OM="h",PM="b",HC=!1,kM=new pe("",{providedIn:"root",factory:()=>HC}),ey=function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e}(ey||{}),ga=new pe(""),ib=new Set;function uo(e){ib.has(e)||(ib.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var jC=(()=>{class e{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=LM}return e})();function LM(){return new jC(Fe(),tr())}var ra=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(ra||{}),$C=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=ne({token:e,providedIn:"root",factory:()=>new e})}return e})(),FM=[ra.EarlyRead,ra.Write,ra.MixedReadWrite,ra.Read],BM=(()=>{class e{ngZone=O(Le);scheduler=O(Ai);errorHandler=O(Mi,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){O(ga,{optional:!0})}execute(){let n=this.sequences.size>0;n&&pt(16),this.executing=!0;for(let r of FM)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[r]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let s=i.hooks[r];return s(i.pipelinedValue)},i.snapshot))}catch(s){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(s)}this.executing=!1;for(let r of this.sequences)r.afterRun(),r.once&&(this.sequences.delete(r),r.destroy());for(let r of this.deferredRegistrations)this.sequences.add(r);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),n&&pt(17)}register(n){let{view:r}=n;r!==void 0?((r[sa]??=[]).push(n),el(r),r[be]|=8192):this.executing?this.deferredRegistrations.add(n):this.addSequence(n)}addSequence(n){this.sequences.add(n),this.scheduler.notify(7)}unregister(n){this.executing&&this.sequences.has(n)?(n.erroredOrDestroyed=!0,n.pipelinedValue=void 0,n.once=!0):(this.sequences.delete(n),this.deferredRegistrations.delete(n))}maybeTrace(n,r){return r?r.run(ey.AFTER_NEXT_RENDER,n):n()}static \u0275prov=ne({token:e,providedIn:"root",factory:()=>new e})}return e})(),$m=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,i,s=null){this.impl=e,this.hooks=t,this.view=n,this.once=r,this.snapshot=s,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[sa];e&&(this.view[sa]=e.filter(t=>t!==this))}};function ty(e,t){!t?.injector&&zb(ty);let n=t?.injector??O(ht);return uo("NgAfterRender"),WC(e,n,t,!1)}function Jr(e,t){!t?.injector&&zb(Jr);let n=t?.injector??O(ht);return uo("NgAfterNextRender"),WC(e,n,t,!0)}function VM(e,t){if(e instanceof Function){let n=[void 0,void 0,void 0,void 0];return n[t]=e,n}else return[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function WC(e,t,n,r){let i=t.get($C);i.impl??=t.get(BM);let s=t.get(ga,null,{optional:!0}),o=n?.phase??ra.MixedReadWrite,a=n?.manualCleanup!==!0?t.get(qg):null,l=t.get(jC,null,{optional:!0}),c=new $m(i.impl,VM(e,o),l?.view,r,a,s?.snapshot(null));return i.impl.register(c),c}var UM=()=>null;function GC(e,t,n=!1){return UM(e,t,n)}function zC(e,t){let n=e.contentQueries;if(n!==null){let r=je(null);try{for(let i=0;i<n.length;i+=2){let s=n[i],o=n[i+1];if(o!==-1){let a=e.data[o];Hg(s),a.contentQueries(2,t[o],o)}}}finally{je(r)}}}function Wm(e,t,n){Hg(0);let r=je(null);try{t(e,n)}finally{je(r)}}function ny(e,t,n){if(Pg(t)){let r=je(null);try{let i=t.directiveStart,s=t.directiveEnd;for(let o=i;o<s;o++){let a=e.data[o];if(a.contentQueries){let l=n[o];a.contentQueries(1,l,o)}}}finally{je(r)}}}var Zr=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}(Zr||{}),Bu;function HM(){if(Bu===void 0&&(Bu=null,Wo.trustedTypes))try{Bu=Wo.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Bu}function xd(e){return HM()?.createHTML(e)||e}var Vu;function jM(){if(Vu===void 0&&(Vu=null,Wo.trustedTypes))try{Vu=Wo.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Vu}function ob(e){return jM()?.createHTML(e)||e}var Oi=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Tb})`}},Gm=class extends Oi{getTypeName(){return"HTML"}},zm=class extends Oi{getTypeName(){return"Style"}},qm=class extends Oi{getTypeName(){return"Script"}},Ym=class extends Oi{getTypeName(){return"URL"}},Km=class extends Oi{getTypeName(){return"ResourceURL"}};function Qr(e){return e instanceof Oi?e.changingThisBreaksApplicationSecurity:e}function fo(e,t){let n=$M(e);if(n!=null&&n!==t){if(n==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${n} (see ${Tb})`)}return n===t}function $M(e){return e instanceof Oi&&e.getTypeName()||null}function qC(e){return new Gm(e)}function YC(e){return new zm(e)}function KC(e){return new qm(e)}function ZC(e){return new Ym(e)}function XC(e){return new Km(e)}function WM(e){let t=new Xm(e);return GM()?new Zm(t):t}var Zm=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(xd(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},Xm=class{defaultDoc;inertDocument;constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=xd(e),t}};function GM(){try{return!!new window.DOMParser().parseFromString(xd(""),"text/html")}catch{return!1}}var zM=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Rd(e){return e=String(e),e.match(zM)?e:"unsafe:"+e}function Ui(e){let t={};for(let n of e.split(","))t[n]=!0;return t}function rl(...e){let t={};for(let n of e)for(let r in n)n.hasOwnProperty(r)&&(t[r]=!0);return t}var JC=Ui("area,br,col,hr,img,wbr"),QC=Ui("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),eS=Ui("rp,rt"),qM=rl(eS,QC),YM=rl(QC,Ui("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),KM=rl(eS,Ui("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),sb=rl(JC,YM,KM,qM),tS=Ui("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),ZM=Ui("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),XM=Ui("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),JM=rl(tS,ZM,XM),QM=Ui("script,style,template"),Jm=class{sanitizedSomething=!1;buf=[];sanitizeChildren(e){let t=e.firstChild,n=!0,r=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild){r.push(t),t=nO(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let i=tO(t);if(i){t=i;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=ab(e).toLowerCase();if(!sb.hasOwnProperty(t))return this.sanitizedSomething=!0,!QM.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let n=e.attributes;for(let r=0;r<n.length;r++){let i=n.item(r),s=i.name,o=s.toLowerCase();if(!JM.hasOwnProperty(o)){this.sanitizedSomething=!0;continue}let a=i.value;tS[o]&&(a=Rd(a)),this.buf.push(" ",s,'="',cb(a),'"')}return this.buf.push(">"),!0}endElement(e){let t=ab(e).toLowerCase();sb.hasOwnProperty(t)&&!JC.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(cb(e))}};function eO(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function tO(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw nS(t);return t}function nO(e){let t=e.firstChild;if(t&&eO(e,t))throw nS(t);return t}function ab(e){let t=e.nodeName;return typeof t=="string"?t:"FORM"}function nS(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var rO=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,iO=/([^\#-~ |!])/g;function cb(e){return e.replace(/&/g,"&amp;").replace(rO,function(t){let n=t.charCodeAt(0),r=t.charCodeAt(1);return"&#"+((n-55296)*1024+(r-56320)+65536)+";"}).replace(iO,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Uu;function ry(e,t){let n=null;try{Uu=Uu||WM(e);let r=t?String(t):"";n=Uu.getInertBodyElement(r);let i=5,s=r;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,r=s,s=n.innerHTML,n=Uu.getInertBodyElement(r)}while(r!==s);let o=new Jm().sanitizeChildren(lb(n)||n);return xd(o)}finally{if(n){let r=lb(n)||n;for(;r.firstChild;)r.firstChild.remove()}}}function lb(e){return"content"in e&&oO(e)?e.content:null}function oO(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var ei=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(ei||{});function Fr(e){let t=rS();return t?ob(t.sanitize(ei.HTML,e)||""):fo(e,"HTML")?ob(Qr(e)):ry(VC(),Zc(e))}function an(e){let t=rS();return t?t.sanitize(ei.URL,e)||"":fo(e,"URL")?Qr(e):Rd(Zc(e))}function rS(){let e=Fe();return e&&e[Ri].sanitizer}var sO=/^>|^->|<!--|-->|--!>|<!-$/g,aO=/(<|>)/g,cO="\u200B$1\u200B";function lO(e){return e.replace(sO,t=>t.replace(aO,cO))}function iS(e){return e.ownerDocument.defaultView}function uO(e,t,n){let r=e.length;for(;;){let i=e.indexOf(t,n);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let s=t.length;if(i+s===r||e.charCodeAt(i+s)<=32)return i}n=i+1}}var oS="ng-template";function dO(e,t,n,r){let i=0;if(r){for(;i<t.length&&typeof t[i]=="string";i+=2)if(t[i]==="class"&&uO(t[i+1].toLowerCase(),n,0)!==-1)return!0}else if(iy(e))return!1;if(i=t.indexOf(1,i),i>-1){let s;for(;++i<t.length&&typeof(s=t[i])=="string";)if(s.toLowerCase()===n)return!0}return!1}function iy(e){return e.type===4&&e.value!==oS}function fO(e,t,n){let r=e.type===4&&!n?oS:e.value;return t===r}function pO(e,t,n){let r=4,i=e.attrs,s=i!==null?gO(i):0,o=!1;for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="number"){if(!o&&!Mr(r)&&!Mr(l))return!1;if(o&&Mr(l))continue;o=!1,r=l|r&1;continue}if(!o)if(r&4){if(r=2|r&1,l!==""&&!fO(e,l,n)||l===""&&t.length===1){if(Mr(r))return!1;o=!0}}else if(r&8){if(i===null||!dO(e,i,l,n)){if(Mr(r))return!1;o=!0}}else{let c=t[++a],h=hO(l,i,iy(e),n);if(h===-1){if(Mr(r))return!1;o=!0;continue}if(c!==""){let d;if(h>s?d="":d=i[h+1].toLowerCase(),r&2&&c!==d){if(Mr(r))return!1;o=!0}}}}return Mr(r)||o}function Mr(e){return(e&1)===0}function hO(e,t,n,r){if(t===null)return-1;let i=0;if(r||!n){let s=!1;for(;i<t.length;){let o=t[i];if(o===e)return i;if(o===3||o===6)s=!0;else if(o===1||o===2){let a=t[++i];for(;typeof a=="string";)a=t[++i];continue}else{if(o===4)break;if(o===0){i+=4;continue}}i+=s?1:2}return-1}else return yO(t,e)}function mO(e,t,n=!1){for(let r=0;r<t.length;r++)if(pO(e,t[r],n))return!0;return!1}function gO(e){for(let t=0;t<e.length;t++){let n=e[t];if(eM(n))return t}return e.length}function yO(e,t){let n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){let r=e[n];if(typeof r=="number")return-1;if(r===t)return n;n++}return-1}function ub(e,t){return e?":not("+t.trim()+")":t}function vO(e){let t=e[0],n=1,r=2,i="",s=!1;for(;n<e.length;){let o=e[n];if(typeof o=="string")if(r&2){let a=e[++n];i+="["+o+(a.length>0?'="'+a+'"':"")+"]"}else r&8?i+="."+o:r&4&&(i+=" "+o);else i!==""&&!Mr(o)&&(t+=ub(s,i),i=""),r=o,s=s||!Mr(r);n++}return i!==""&&(t+=ub(s,i)),t}function _O(e){return e.map(vO).join(",")}function EO(e){let t=[],n=[],r=1,i=2;for(;r<e.length;){let s=e[r];if(typeof s=="string")i===2?s!==""&&t.push(s,e[++r]):i===8&&n.push(s);else{if(!Mr(i))break;i=s}r++}return n.length&&t.push(1,...n),t}var Hi={};function wO(e,t){return e.createText(t)}function bO(e,t,n){e.setValue(t,n)}function CO(e,t){return e.createComment(lO(t))}function sS(e,t,n){return e.createElement(t,n)}function ld(e,t,n,r,i){e.insertBefore(t,n,r,i)}function aS(e,t,n){e.appendChild(t,n)}function db(e,t,n,r,i){r!==null?ld(e,t,n,r,i):aS(e,t,n)}function SO(e,t,n){e.removeChild(null,t,n)}function DO(e,t,n){e.setAttribute(t,"style",n)}function IO(e,t,n){n===""?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n)}function cS(e,t,n){let{mergedAttrs:r,classes:i,styles:s}=n;r!==null&&QA(e,t,r),i!==null&&IO(e,t,i),s!==null&&DO(e,t,s)}function oy(e,t,n,r,i,s,o,a,l,c,h){let d=Vt+r,f=d+i,g=TO(d,f),m=typeof c=="function"?c():c;return g[_e]={type:e,blueprint:g,template:n,queries:null,viewQuery:a,declTNode:t,data:g.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:f,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof s=="function"?s():s,pipeRegistry:typeof o=="function"?o():o,firstChild:null,schemas:l,consts:m,incompleteFirstPass:!1,ssrId:h}}function TO(e,t){let n=[];for(let r=0;r<t;r++)n.push(r<e?null:Hi);return n}function xO(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=oy(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function sy(e,t,n,r,i,s,o,a,l,c,h){let d=t.blueprint.slice();return d[Fi]=i,d[be]=r|4|128|8|64|1024,(c!==null||e&&e[be]&2048)&&(d[be]|=2048),tC(d),d[Rn]=d[pa]=e,d[jt]=n,d[Ri]=o||e&&e[Ri],d[sn]=a||e&&e[sn],d[jc]=l||e&&e[jc]||null,d[Lr]=s,d[Jc]=DM(),d[Hc]=h,d[qb]=c,d[Pr]=t.type==2?e[Pr]:d,d}function RO(e,t,n){let r=Xr(t,e),i=xO(n),s=e[Ri].rendererFactory,o=ay(e,sy(e,i,null,lS(n),r,t,null,s.createRenderer(r,n),null,null,null));return e[t.index]=o}function lS(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function uS(e,t,n,r){if(n===0)return-1;let i=t.length;for(let s=0;s<n;s++)t.push(r),e.blueprint.push(r),e.data.push(null);return i}function ay(e,t){return e[$c]?e[Gw][Or]=t:e[$c]=t,e[Gw]=t,t}function X(e=1){dS(Zt(),Fe(),lo()+e,!1)}function dS(e,t,n,r){if(!r)if((t[be]&3)===3){let i=e.preOrderCheckHooks;i!==null&&$u(t,i,n)}else{let i=e.preOrderHooks;i!==null&&Wu(t,i,0,n)}Xo(n)}var Nd=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(Nd||{});function Qm(e,t,n,r){let i=je(null);try{let[s,o,a]=e.inputs[n],l=null;(o&Nd.SignalBased)!==0&&(l=t[s][bi]),l!==null&&l.transformFn!==void 0?r=l.transformFn(r):a!==null&&(r=a.call(t,r)),e.setInput!==null?e.setInput(t,l,r,n,s):Kb(t,l,s,r)}finally{je(i)}}function fS(e,t,n,r,i){let s=lo(),o=r&2;try{Xo(-1),o&&t.length>Vt&&dS(e,t,Vt,!1),pt(o?2:0,i),n(r,i)}finally{Xo(s),pt(o?3:1,i)}}function Ad(e,t,n){kO(e,t,n),(n.flags&64)===64&&LO(e,t,n)}function cy(e,t,n=Xr){let r=t.localNames;if(r!==null){let i=t.index+1;for(let s=0;s<r.length;s+=2){let o=r[s+1],a=o===-1?n(t,e):e[o];e[i++]=a}}}function NO(e,t,n,r){let i=r.get(kM,HC)||n===Zr.ShadowDom,s=e.selectRootElement(t,i);return AO(s),s}function AO(e){MO(e)}var MO=()=>null;function OO(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function pS(e,t,n,r,i,s,o,a){if(!a&&uy(t,e,n,r,i)){ha(t)&&PO(n,t.index);return}if(t.type&3){let l=Xr(t,n);r=OO(r),i=o!=null?o(i,t.value||"",r):i,s.setProperty(l,r,i)}else t.type&12}function PO(e,t){let n=gr(t,e);n[be]&16||(n[be]|=64)}function kO(e,t,n){let r=n.directiveStart,i=n.directiveEnd;ha(n)&&RO(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||od(n,t);let s=n.initialInputs;for(let o=r;o<i;o++){let a=e.data[o],l=Wc(t,e,o,n);if(Yr(l,t),s!==null&&UO(t,o-r,l,a,n,s),Kr(a)){let c=gr(n.index,t);c[jt]=Wc(t,e,o,n)}}}function LO(e,t,n){let r=n.directiveStart,i=n.directiveEnd,s=n.index,o=jA();try{Xo(s);for(let a=r;a<i;a++){let l=e.data[a],c=t[a];Nm(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&FO(l,c)}}finally{Xo(-1),Nm(o)}}function FO(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function ly(e,t){let n=e.directiveRegistry,r=null;if(n)for(let i=0;i<n.length;i++){let s=n[i];mO(t,s.selectors,!1)&&(r??=[],Kr(s)?r.unshift(s):r.push(s))}return r}function BO(e,t,n,r,i,s){let o=Xr(e,t);VO(t[sn],o,s,e.value,n,r,i)}function VO(e,t,n,r,i,s,o){if(s==null)e.removeAttribute(t,i,n);else{let a=o==null?Zc(s):o(s,r||"",i);e.setAttribute(t,i,a,n)}}function UO(e,t,n,r,i,s){let o=s[t];if(o!==null)for(let a=0;a<o.length;a+=2){let l=o[a],c=o[a+1];Qm(r,n,l,c)}}function hS(e,t){let n=e[jc],r=n?n.get(Mi,null):null;r&&r.handleError(t)}function uy(e,t,n,r,i){let s=e.inputs?.[r],o=e.hostDirectiveInputs?.[r],a=!1;if(o)for(let l=0;l<o.length;l+=2){let c=o[l],h=o[l+1],d=t.data[c];Qm(d,n[c],h,i),a=!0}if(s)for(let l of s){let c=n[l],h=t.data[l];Qm(h,c,r,i),a=!0}return a}function HO(e,t){let n=gr(t,e),r=n[_e];jO(r,n);let i=n[Fi];i!==null&&n[Hc]===null&&(n[Hc]=GC(i,n[jc])),pt(18),dy(r,n,n[jt]),pt(19,n[jt])}function jO(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}function dy(e,t,n){jg(t);try{let r=e.viewQuery;r!==null&&Wm(1,r,n);let i=e.template;i!==null&&fS(e,t,i,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),t[Ni]?.finishViewCreation(e),e.staticContentQueries&&zC(e,t),e.staticViewQueries&&Wm(2,e.viewQuery,n);let s=e.components;s!==null&&$O(t,s)}catch(r){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),r}finally{t[be]&=-5,$g()}}function $O(e,t){for(let n=0;n<t.length;n++)HO(e,t[n])}function Md(e,t,n,r){let i=je(null);try{let s=t.tView,o=e[be]&4096?4096:16,a=sy(e,s,n,o,null,t,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null),l=e[t.index];a[Yo]=l;let c=e[Ni];return c!==null&&(a[Ni]=c.createEmbeddedView(s)),dy(s,a,n),a}finally{je(i)}}function Gc(e,t){return!t||t.firstChild===null||NC(e)}var WO;function fy(e,t){return WO(e,t)}var Pi=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Pi||{});function mS(e){return(e.flags&32)===32}function ia(e,t,n,r,i){if(r!=null){let s,o=!1;Bi(r)?s=r:Ti(r)&&(o=!0,r=r[Fi]);let a=er(r);e===0&&n!==null?i==null?aS(t,n,a):ld(t,n,a,i||null,!0):e===1&&n!==null?ld(t,n,a,i||null,!0):e===2?SO(t,a,o):e===3&&t.destroyNode(a),s!=null&&nP(t,e,s,n,i)}}function GO(e,t){gS(e,t),t[Fi]=null,t[Lr]=null}function zO(e,t,n,r,i,s){r[Fi]=i,r[Lr]=t,kd(e,r,n,1,i,s)}function gS(e,t){t[Ri].changeDetectionScheduler?.notify(9),kd(e,t,t[sn],2,null,null)}function qO(e){let t=e[$c];if(!t)return hm(e[_e],e);for(;t;){let n=null;if(Ti(t))n=t[$c];else{let r=t[xn];r&&(n=r)}if(!n){for(;t&&!t[Or]&&t!==e;)Ti(t)&&hm(t[_e],t),t=t[Rn];t===null&&(t=e),Ti(t)&&hm(t[_e],t),n=t&&t[Or]}t=n}}function py(e,t){let n=e[la],r=n.indexOf(t);n.splice(r,1)}function Od(e,t){if(Qc(t))return;let n=t[sn];n.destroyNode&&kd(e,t,n,3,null,null),qO(t)}function hm(e,t){if(Qc(t))return;let n=je(null);try{t[be]&=-129,t[be]|=256,t[Qn]&&qh(t[Qn]),KO(e,t),YO(e,t),t[_e].type===1&&t[sn].destroy();let r=t[Yo];if(r!==null&&Bi(t[Rn])){r!==t[Rn]&&py(r,t);let i=t[Ni];i!==null&&i.detachView(e)}Vm(t)}finally{je(n)}}function YO(e,t){let n=e.cleanup,r=t[Ju];if(n!==null)for(let o=0;o<n.length-1;o+=2)if(typeof n[o]=="string"){let a=n[o+3];a>=0?r[a]():r[-a].unsubscribe(),o+=2}else{let a=r[n[o+1]];n[o].call(a)}r!==null&&(t[Ju]=null);let i=t[oo];if(i!==null){t[oo]=null;for(let o=0;o<i.length;o++){let a=i[o];a()}}let s=t[Qu];if(s!==null){t[Qu]=null;for(let o of s)o.destroy()}}function KO(e,t){let n;if(e!=null&&(n=e.destroyHooks)!=null)for(let r=0;r<n.length;r+=2){let i=t[n[r]];if(!(i instanceof Jo)){let s=n[r+1];if(Array.isArray(s))for(let o=0;o<s.length;o+=2){let a=i[s[o]],l=s[o+1];pt(4,a,l);try{l.call(a)}finally{pt(5,a,l)}}else{pt(4,i,s);try{s.call(i)}finally{pt(5,i,s)}}}}}function ZO(e,t,n){return XO(e,t.parent,n)}function XO(e,t,n){let r=t;for(;r!==null&&r.type&168;)t=r,r=t.parent;if(r===null)return n[Fi];if(ha(r)){let{encapsulation:i}=e.data[r.directiveStart+r.componentOffset];if(i===Zr.None||i===Zr.Emulated)return null}return Xr(r,n)}function JO(e,t,n){return eP(e,t,n)}function QO(e,t,n){return e.type&40?Xr(e,n):null}var eP=QO,fb;function Pd(e,t,n,r){let i=ZO(e,r,t),s=t[sn],o=r.parent||t[Lr],a=JO(o,r,t);if(i!=null)if(Array.isArray(n))for(let l=0;l<n.length;l++)db(s,i,n[l],a,!1);else db(s,i,n,a,!1);fb!==void 0&&fb(s,r,t,n,i)}function Lc(e,t){if(t!==null){let n=t.type;if(n&3)return Xr(t,e);if(n&4)return eg(-1,e[t.index]);if(n&8){let r=t.child;if(r!==null)return Lc(e,r);{let i=e[t.index];return Bi(i)?eg(-1,i):er(i)}}else{if(n&128)return Lc(e,t.next);if(n&32)return fy(t,e)()||er(e[t.index]);{let r=yS(e,t);if(r!==null){if(Array.isArray(r))return r[0];let i=Zo(e[Pr]);return Lc(i,r)}else return Lc(e,t.next)}}}return null}function yS(e,t){if(t!==null){let n=e[Pr][Lr],r=t.projection;return n.projection[r]}return null}function eg(e,t){let n=xn+e+1;if(n<t.length){let r=t[n],i=r[_e].firstChild;if(i!==null)return Lc(r,i)}return t[Ko]}function hy(e,t,n,r,i,s,o){for(;n!=null;){if(n.type===128){n=n.next;continue}let a=r[n.index],l=n.type;if(o&&t===0&&(a&&Yr(er(a),r),n.flags|=2),!mS(n))if(l&8)hy(e,t,n.child,r,i,s,!1),ia(t,e,i,a,s);else if(l&32){let c=fy(n,r),h;for(;h=c();)ia(t,e,i,h,s);ia(t,e,i,a,s)}else l&16?tP(e,t,r,n,i,s):ia(t,e,i,a,s);n=o?n.projectionNext:n.next}}function kd(e,t,n,r,i,s){hy(n,r,e.firstChild,t,i,s,!1)}function tP(e,t,n,r,i,s){let o=n[Pr],a=o[Lr].projection[r.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++){let c=a[l];ia(t,e,i,c,s)}else{let l=a,c=o[Rn];NC(r)&&(l.flags|=128),hy(e,t,l,c,i,s,!0)}}function nP(e,t,n,r,i){let s=n[Ko],o=er(n);s!==o&&ia(t,e,r,s,i);for(let a=xn;a<n.length;a++){let l=n[a];kd(l[_e],l,e,t,r,s)}}function rP(e,t,n,r,i){if(t)i?e.addClass(n,r):e.removeClass(n,r);else{let s=r.indexOf("-")===-1?void 0:Pi.DashCase;i==null?e.removeStyle(n,r,s):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),s|=Pi.Important),e.setStyle(n,r,i,s))}}function ud(e,t,n,r,i=!1){for(;n!==null;){if(n.type===128){n=i?n.projectionNext:n.next;continue}let s=t[n.index];s!==null&&r.push(er(s)),Bi(s)&&iP(s,r);let o=n.type;if(o&8)ud(e,t,n.child,r);else if(o&32){let a=fy(n,t),l;for(;l=a();)r.push(l)}else if(o&16){let a=yS(t,n);if(Array.isArray(a))r.push(...a);else{let l=Zo(t[Pr]);ud(l[_e],l,a,r,!0)}}n=i?n.projectionNext:n.next}return r}function iP(e,t){for(let n=xn;n<e.length;n++){let r=e[n],i=r[_e].firstChild;i!==null&&ud(r[_e],r,i,t)}e[Ko]!==e[Fi]&&t.push(e[Ko])}function vS(e){if(e[sa]!==null){for(let t of e[sa])t.impl.addSequence(t);e[sa].length=0}}var _S=[];function oP(e){return e[Qn]??sP(e)}function sP(e){let t=_S.pop()??Object.create(cP);return t.lView=e,t}function aP(e){e.lView[Qn]!==e&&(e.lView=null,_S.push(e))}var cP=te(w({},lu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{el(e.lView)},consumerOnSignalRead(){this.lView[Qn]=this}});function lP(e){let t=e[Qn]??Object.create(uP);return t.lView=e,t}var uP=te(w({},lu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=Zo(e.lView);for(;t&&!ES(t[_e]);)t=Zo(t);t&&Fg(t)},consumerOnSignalRead(){this.lView[Qn]=this}});function ES(e){return e.type!==2}function wS(e){if(e[Qu]===null)return;let t=!0;for(;t;){let n=!1;for(let r of e[Qu])r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));t=n&&!!(e[be]&8192)}}var dP=100;function bS(e,t=!0,n=0){let r=e[Ri].rendererFactory,i=!1;i||r.begin?.();try{fP(e,n)}catch(s){throw t&&hS(e,s),s}finally{i||r.end?.()}}function fP(e,t){let n=cC();try{qw(!0),tg(e,t);let r=0;for(;bd(e);){if(r===dP)throw new $e(103,!1);r++,tg(e,1)}}finally{qw(n)}}function pP(e,t,n,r){if(Qc(t))return;let i=t[be],s=!1,o=!1;jg(t);let a=!0,l=null,c=null;s||(ES(e)?(c=oP(t),l=Gh(c)):XE()===null?(a=!1,c=lP(t),l=Gh(c)):t[Qn]&&(qh(t[Qn]),t[Qn]=null));try{tC(t),BA(e.bindingStartIndex),n!==null&&fS(e,t,n,2,r);let h=(i&3)===3;if(!s)if(h){let g=e.preOrderCheckHooks;g!==null&&$u(t,g,null)}else{let g=e.preOrderHooks;g!==null&&Wu(t,g,0,null),um(t,0)}if(o||hP(t),wS(t),CS(t,0),e.contentQueries!==null&&zC(e,t),!s)if(h){let g=e.contentCheckHooks;g!==null&&$u(t,g)}else{let g=e.contentHooks;g!==null&&Wu(t,g,1),um(t,1)}gP(e,t);let d=e.components;d!==null&&DS(t,d,0);let f=e.viewQuery;if(f!==null&&Wm(2,f,r),!s)if(h){let g=e.viewCheckHooks;g!==null&&$u(t,g)}else{let g=e.viewHooks;g!==null&&Wu(t,g,2),um(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[lm]){for(let g of t[lm])g();t[lm]=null}s||(vS(t),t[be]&=-73)}catch(h){throw s||el(t),h}finally{c!==null&&(tw(c,l),a&&aP(c)),$g()}}function CS(e,t){for(let n=kC(e);n!==null;n=LC(n))for(let r=xn;r<n.length;r++){let i=n[r];SS(i,t)}}function hP(e){for(let t=kC(e);t!==null;t=LC(t)){if(!(t[be]&2))continue;let n=t[la];for(let r=0;r<n.length;r++){let i=n[r];Fg(i)}}}function mP(e,t,n){pt(18);let r=gr(t,e);SS(r,n),pt(19,r[jt])}function SS(e,t){Lg(e)&&tg(e,t)}function tg(e,t){let n=e[_e],r=e[be],i=e[Qn],s=!!(t===0&&r&16);if(s||=!!(r&64&&t===0),s||=!!(r&1024),s||=!!(i?.dirty&&zh(i)),s||=!1,i&&(i.dirty=!1),e[be]&=-9217,s)pP(n,e,n.template,e[jt]);else if(r&8192){wS(e),CS(e,1);let o=n.components;o!==null&&DS(e,o,1),vS(e)}}function DS(e,t,n){for(let r=0;r<t.length;r++)mP(e,t[r],n)}function gP(e,t){let n=e.hostBindingOpCodes;if(n!==null)try{for(let r=0;r<n.length;r++){let i=n[r];if(i<0)Xo(~i);else{let s=i,o=n[++r],a=n[++r];HA(o,s);let l=t[s];pt(24,l),a(2,l),pt(25,l)}}}finally{Xo(-1)}}function my(e,t){let n=cC()?64:1088;for(e[Ri].changeDetectionScheduler?.notify(t);e;){e[be]|=n;let r=Zo(e);if(td(e)&&!r)return e;e=r}return null}function IS(e,t,n,r){return[e,!0,0,t,null,r,null,n,null,null]}function TS(e,t){let n=xn+t;if(n<e.length)return e[n]}function Ld(e,t,n,r=!0){let i=t[_e];if(yP(i,t,e,n),r){let o=eg(n,e),a=t[sn],l=a.parentNode(e[Ko]);l!==null&&zO(i,e[Lr],a,t,l,o)}let s=t[Hc];s!==null&&s.firstChild!==null&&(s.firstChild=null)}function xS(e,t){let n=zc(e,t);return n!==void 0&&Od(n[_e],n),n}function zc(e,t){if(e.length<=xn)return;let n=xn+t,r=e[n];if(r){let i=r[Yo];i!==null&&i!==e&&py(i,r),t>0&&(e[n-1][Or]=r[Or]);let s=Zu(e,xn+t);GO(r[_e],r);let o=s[Ni];o!==null&&o.detachView(s[_e]),r[Rn]=null,r[Or]=null,r[be]&=-129}return r}function yP(e,t,n,r){let i=xn+r,s=n.length;r>0&&(n[i-1][Or]=t),r<s-xn?(t[Or]=n[i],Pb(n,xn+r,t)):(n.push(t),t[Or]=null),t[Rn]=n;let o=t[Yo];o!==null&&n!==o&&RS(o,t);let a=t[Ni];a!==null&&a.insertView(e),xm(t),t[be]|=128}function RS(e,t){let n=e[la],r=t[Rn];if(Ti(r))e[be]|=2;else{let i=r[Rn][Pr];t[Pr]!==i&&(e[be]|=2)}n===null?e[la]=[t]:n.push(t)}var Qo=class{_lView;_cdRefInjectingView;notifyErrorHandler;_appRef=null;_attachedToViewContainer=!1;get rootNodes(){let e=this._lView,t=e[_e];return ud(t,e,t.firstChild,[])}constructor(e,t,n=!0){this._lView=e,this._cdRefInjectingView=t,this.notifyErrorHandler=n}get context(){return this._lView[jt]}get dirty(){return!!(this._lView[be]&9280)||!!this._lView[Qn]?.dirty}set context(e){this._lView[jt]=e}get destroyed(){return Qc(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Rn];if(Bi(e)){let t=e[ed],n=t?t.indexOf(this):-1;n>-1&&(zc(e,n),Zu(t,n))}this._attachedToViewContainer=!1}Od(this._lView[_e],this._lView)}onDestroy(e){nC(this._lView,e)}markForCheck(){my(this._cdRefInjectingView||this._lView,4)}markForRefresh(){Fg(this._cdRefInjectingView||this._lView)}detach(){this._lView[be]&=-129}reattach(){xm(this._lView),this._lView[be]|=128}detectChanges(){this._lView[be]|=1024,bS(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new $e(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=td(this._lView),t=this._lView[Yo];t!==null&&!e&&py(t,this._lView),gS(this._lView[_e],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new $e(902,!1);this._appRef=e;let t=td(this._lView),n=this._lView[Yo];n!==null&&!t&&RS(n,this._lView),xm(this._lView)}},kr=(()=>{class e{static __NG_ELEMENT_ID__=EP}return e})(),vP=kr,_P=class extends vP{_declarationLView;_declarationTContainer;elementRef;constructor(e,t,n){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,n){let r=Md(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n});return new Qo(r)}};function EP(){return Fd(tr(),Fe())}function Fd(e,t){return e.type&4?new _P(t,e,ma(e,t)):null}function il(e,t,n,r,i){let s=e.data[t];if(s===null)s=wP(e,t,n,r,i),UA()&&(s.flags|=32);else if(s.type&64){s.type=n,s.value=r,s.attrs=i;let o=FA();s.injectorIndex=o===null?-1:o.injectorIndex}return co(s,!0),s}function wP(e,t,n,r,i){let s=oC(),o=Vg(),a=o?s:s&&s.parent,l=e.data[t]=CP(e,a,n,t,r,i);return bP(e,l,s,o),l}function bP(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function CP(e,t,n,r,i,s){let o=t?t.injectorIndex:-1,a=0;return PA()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:o,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:s,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var lW=new RegExp(`^(\\d+)*(${PM}|${OM})*(.*)`),SP=()=>null;function qc(e,t){return SP(e,t)}var ng=class{},dd=class{},rg=class{resolveComponentFactory(e){throw Error(`No component factory found for ${mr(e)}.`)}},ao=class{static NULL=new rg},pn=class{},ya=(()=>{class e{destroyNode=null;static __NG_ELEMENT_ID__=()=>DP()}return e})();function DP(){let e=Fe(),t=tr(),n=gr(t.index,e);return(Ti(n)?n:e)[sn]}var IP=(()=>{class e{static \u0275prov=ne({token:e,providedIn:"root",factory:()=>null})}return e})();function ig(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,s=0;if(t!==null)for(let o=0;o<t.length;o++){let a=t[o];if(typeof a=="number")s=a;else if(s==1)i=Vw(i,a);else if(s==2){let l=a,c=t[++o];r=Vw(r,l+": "+c+";")}}n?e.styles=r:e.stylesWithoutHost=r,n?e.classes=i:e.classesWithoutHost=i}function Mt(e,t=Ke.Default){let n=Fe();if(n===null)return Ze(e,t);let r=tr();return CC(r,n,kn(e),t)}function gy(e,t,n,r,i){let s=r===null?null:{"":-1},o=i(e,n);if(o!==null){let a,l=null,c=null,h=xP(o);h===null?a=o:[a,l,c]=h,AP(e,t,n,a,s,l,c)}s!==null&&r!==null&&TP(n,r,s)}function TP(e,t,n){let r=e.localNames=[];for(let i=0;i<t.length;i+=2){let s=n[t[i+1]];if(s==null)throw new $e(-301,!1);r.push(t[i],s)}}function xP(e){let t=null,n=!1;for(let o=0;o<e.length;o++){let a=e[o];if(o===0&&Kr(a)&&(t=a),a.findHostDirectiveDefs!==null){n=!0;break}}if(!n)return null;let r=null,i=null,s=null;for(let o of e)o.findHostDirectiveDefs!==null&&(r??=[],i??=new Map,s??=new Map,RP(o,r,s,i)),o===t&&(r??=[],r.push(o));return r!==null?(r.push(...t===null?e:e.slice(1)),[r,i,s]):null}function RP(e,t,n,r){let i=t.length;e.findHostDirectiveDefs(e,t,r),n.set(e,[i,t.length-1])}function NP(e,t,n){t.componentOffset=n,(e.components??=[]).push(t.index)}function AP(e,t,n,r,i,s,o){let a=r.length,l=!1;for(let f=0;f<a;f++){let g=r[f];!l&&Kr(g)&&(l=!0,NP(e,n,f)),Om(od(n,t),e,g.type)}FP(n,e.data.length,a);for(let f=0;f<a;f++){let g=r[f];g.providersResolver&&g.providersResolver(g)}let c=!1,h=!1,d=uS(e,t,a,null);a>0&&(n.directiveToIndex=new Map);for(let f=0;f<a;f++){let g=r[f];if(n.mergedAttrs=ua(n.mergedAttrs,g.hostAttrs),OP(e,n,t,d,g),LP(d,g,i),o!==null&&o.has(g)){let[b,x]=o.get(g);n.directiveToIndex.set(g.type,[d,b+n.directiveStart,x+n.directiveStart])}else(s===null||!s.has(g))&&n.directiveToIndex.set(g.type,d);g.contentQueries!==null&&(n.flags|=4),(g.hostBindings!==null||g.hostAttrs!==null||g.hostVars!==0)&&(n.flags|=64);let m=g.type.prototype;!c&&(m.ngOnChanges||m.ngOnInit||m.ngDoCheck)&&((e.preOrderHooks??=[]).push(n.index),c=!0),!h&&(m.ngOnChanges||m.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(n.index),h=!0),d++}MP(e,n,s)}function MP(e,t,n){for(let r=t.directiveStart;r<t.directiveEnd;r++){let i=e.data[r];if(n===null||!n.has(i))pb(0,t,i,r),pb(1,t,i,r),mb(t,r,!1);else{let s=n.get(i);hb(0,t,s,r),hb(1,t,s,r),mb(t,r,!0)}}}function pb(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o;e===0?o=t.inputs??={}:o=t.outputs??={},o[s]??=[],o[s].push(r),NS(t,s)}}function hb(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o=i[s],a;e===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[o]??=[],a[o].push(r,s),NS(t,o)}}function NS(e,t){t==="class"?e.flags|=8:t==="style"&&(e.flags|=16)}function mb(e,t,n){let{attrs:r,inputs:i,hostDirectiveInputs:s}=e;if(r===null||!n&&i===null||n&&s===null||iy(e)){e.initialInputs??=[],e.initialInputs.push(null);return}let o=null,a=0;for(;a<r.length;){let l=r[a];if(l===0){a+=4;continue}else if(l===5){a+=2;continue}else if(typeof l=="number")break;if(!n&&i.hasOwnProperty(l)){let c=i[l];for(let h of c)if(h===t){o??=[],o.push(l,r[a+1]);break}}else if(n&&s.hasOwnProperty(l)){let c=s[l];for(let h=0;h<c.length;h+=2)if(c[h]===t){o??=[],o.push(c[h+1],r[a+1]);break}}a+=2}e.initialInputs??=[],e.initialInputs.push(o)}function OP(e,t,n,r,i){e.data[r]=i;let s=i.factory||(i.factory=Go(i.type,!0)),o=new Jo(s,Kr(i),Mt);e.blueprint[r]=o,n[r]=o,PP(e,t,r,uS(e,n,i.hostVars,Hi),i)}function PP(e,t,n,r,i){let s=i.hostBindings;if(s){let o=e.hostBindingOpCodes;o===null&&(o=e.hostBindingOpCodes=[]);let a=~t.index;kP(o)!=a&&o.push(a),o.push(n,r,s)}}function kP(e){let t=e.length;for(;t>0;){let n=e[--t];if(typeof n=="number"&&n<0)return n}return 0}function LP(e,t,n){if(n){if(t.exportAs)for(let r=0;r<t.exportAs.length;r++)n[t.exportAs[r]]=e;Kr(t)&&(n[""]=e)}}function FP(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function AS(e,t,n,r,i,s,o,a){let l=t.consts,c=so(l,o),h=il(t,e,2,r,c);return s&&gy(t,n,h,so(l,a),i),h.mergedAttrs=ua(h.mergedAttrs,h.attrs),h.attrs!==null&&ig(h,h.attrs,!1),h.mergedAttrs!==null&&ig(h,h.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,h),h}function MS(e,t){Gg(e,t),Pg(t)&&e.queries.elementEnd(t)}var og=class extends ao{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=qo(e);return new Yc(t,this.ngModule)}};function BP(e){return Object.keys(e).map(t=>{let[n,r,i]=e[t],s={propName:n,templateName:t,isSignal:(r&Nd.SignalBased)!==0};return i&&(s.transform=i),s})}function VP(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function UP(e,t,n){let r=t instanceof Gn?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new Am(n,r):n}function HP(e){let t=e.get(pn,null);if(t===null)throw new $e(407,!1);let n=e.get(IP,null),r=e.get(Ai,null);return{rendererFactory:t,sanitizer:n,changeDetectionScheduler:r}}function jP(e,t){let n=(e.selectors[0][0]||"div").toLowerCase();return sS(t,n,n==="svg"?Qb:n==="math"?DA:null)}var Yc=class extends dd{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;get inputs(){return BP(this.componentDef.inputs)}get outputs(){return VP(this.componentDef.outputs)}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=_O(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r){pt(22);let i=je(null);try{let s=this.componentDef,o=n?["ng-version","19.2.0"]:EO(this.componentDef.selectors[0]),a=oy(0,null,null,1,0,null,null,null,null,[o],null),l=UP(s,r||this.ngModule,e),c=HP(l),h=c.rendererFactory.createRenderer(null,s),d=n?NO(h,n,s.encapsulation,l):jP(s,h),f=sy(null,a,null,512|lS(s),null,null,c,h,l,null,GC(d,l,!0));f[Vt]=d,jg(f);let g=null;try{let m=AS(Vt,a,f,"#host",()=>[this.componentDef],!0,0);d&&(cS(h,d,m),Yr(d,f)),Ad(a,f,m),ny(a,m,f),MS(a,m),t!==void 0&&$P(m,this.ngContentSelectors,t),g=gr(m.index,f),f[jt]=g[jt],dy(a,f,null)}catch(m){throw g!==null&&Vm(g),Vm(f),m}finally{pt(23),$g()}return new sg(this.componentType,f)}finally{je(i)}}},sg=class extends ng{_rootLView;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t){super(),this._rootLView=t,this._tNode=kg(t[_e],Vt),this.location=ma(this._tNode,t),this.instance=gr(this._tNode.index,t)[jt],this.hostView=this.changeDetectorRef=new Qo(t,void 0,!1),this.componentType=e}setInput(e,t){let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView,i=uy(n,r[_e],r,e,t);this.previousInputValues.set(e,t);let s=gr(n.index,r);my(s,1)}get injector(){return new $o(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function $P(e,t,n){let r=e.projection=[];for(let i=0;i<t.length;i++){let s=n[i];r.push(s!=null&&s.length?Array.from(s):null)}}var Br=(()=>{class e{static __NG_ELEMENT_ID__=WP}return e})();function WP(){let e=tr();return PS(e,Fe())}var GP=Br,OS=class extends GP{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return ma(this._hostTNode,this._hostLView)}get injector(){return new $o(this._hostTNode,this._hostLView)}get parentInjector(){let e=zg(this._hostTNode,this._hostLView);if(yC(e)){let t=rd(e,this._hostLView),n=nd(e),r=t[_e].data[n+8];return new $o(r,t)}else return new $o(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=gb(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-xn}createEmbeddedView(e,t,n){let r,i;typeof n=="number"?r=n:n!=null&&(r=n.index,i=n.injector);let s=qc(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,s);return this.insertImpl(o,r,Gc(this._hostTNode,s)),o}createComponent(e,t,n,r,i){let s=e&&!wA(e),o;if(s)o=t;else{let g=t||{};o=g.index,n=g.injector,r=g.projectableNodes,i=g.environmentInjector||g.ngModuleRef}let a=s?e:new Yc(qo(e)),l=n||this.parentInjector;if(!i&&a.ngModule==null){let g=(s?l:this.parentInjector).get(Gn,null);g&&(i=g)}let c=qo(a.componentType??{}),h=qc(this._lContainer,c?.id??null),d=h?.firstChild??null,f=a.create(l,r,d,i);return this.insertImpl(f.hostView,o,Gc(this._hostTNode,h)),f}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,n){let r=e._lView;if(TA(r)){let o=this.indexOf(e);if(o!==-1)this.detach(o);else{let a=r[Rn],l=new OS(a,a[Lr],a[Rn]);l.detach(l.indexOf(e))}}let i=this._adjustIndex(t),s=this._lContainer;return Ld(s,r,i,n),e.attachToViewContainerRef(),Pb(mm(s),i,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=gb(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=zc(this._lContainer,t);n&&(Zu(mm(this._lContainer),t),Od(n[_e],n))}detach(e){let t=this._adjustIndex(e,-1),n=zc(this._lContainer,t);return n&&Zu(mm(this._lContainer),t)!=null?new Qo(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function gb(e){return e[ed]}function mm(e){return e[ed]||(e[ed]=[])}function PS(e,t){let n,r=t[e.index];return Bi(r)?n=r:(n=IS(r,t,null,e),t[e.index]=n,ay(t,n)),qP(n,t,e,r),new OS(n,e,t)}function zP(e,t){let n=e[sn],r=n.createComment(""),i=Xr(t,e),s=n.parentNode(i);return ld(n,s,r,n.nextSibling(i),!1),r}var qP=ZP,YP=()=>!1;function KP(e,t,n){return YP(e,t,n)}function ZP(e,t,n,r){if(e[Ko])return;let i;n.type&8?i=er(r):i=zP(t,n),e[Ko]=i}var ag=class WE{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new WE(this.queryList)}setDirty(){this.queryList.setDirty()}},cg=class sI{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries!==null?t.contentQueries[0]:n.length,i=[];for(let s=0;s<r;s++){let o=n.getByIndex(s),a=this.queries[o.indexInDeclarationView];i.push(a.clone())}return new sI(i)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}finishViewCreation(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let n=0;n<this.queries.length;n++)yy(t,n).matches!==null&&this.queries[n].setDirty()}},lg=class{flags;read;predicate;constructor(e,t,n=null){this.flags=t,this.read=n,typeof e=="string"?this.predicate=i1(e):this.predicate=e}},ug=class oI{queries;constructor(t=[]){this.queries=t}elementStart(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].elementStart(t,n)}elementEnd(t){for(let n=0;n<this.queries.length;n++)this.queries[n].elementEnd(t)}embeddedTView(t){let n=null;for(let r=0;r<this.length;r++){let i=n!==null?n.length:0,s=this.getByIndex(r).embeddedTView(t,i);s&&(s.indexInDeclarationView=r,n!==null?n.push(s):n=[s])}return n!==null?new oI(n):null}template(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].template(t,n)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}},dg=class aI{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(t,n=-1){this.metadata=t,this._declarationNodeIndex=n}elementStart(t,n){this.isApplyingToNode(n)&&this.matchTNode(t,n)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,n){this.elementStart(t,n)}embeddedTView(t,n){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,n),new aI(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let n=this._declarationNodeIndex,r=t.parent;for(;r!==null&&r.type&8&&r.index!==n;)r=r.parent;return n===(r!==null?r.index:-1)}return this._appliesToNextNode}matchTNode(t,n){let r=this.metadata.predicate;if(Array.isArray(r))for(let i=0;i<r.length;i++){let s=r[i];this.matchTNodeWithReadOption(t,n,XP(n,s)),this.matchTNodeWithReadOption(t,n,Gu(n,t,s,!1,!1))}else r===kr?n.type&4&&this.matchTNodeWithReadOption(t,n,-1):this.matchTNodeWithReadOption(t,n,Gu(n,t,r,!1,!1))}matchTNodeWithReadOption(t,n,r){if(r!==null){let i=this.metadata.read;if(i!==null)if(i===Ct||i===Br||i===kr&&n.type&4)this.addMatch(n.index,-2);else{let s=Gu(n,t,i,!1,!1);s!==null&&this.addMatch(n.index,s)}else this.addMatch(n.index,r)}}addMatch(t,n){this.matches===null?this.matches=[t,n]:this.matches.push(t,n)}};function XP(e,t){let n=e.localNames;if(n!==null){for(let r=0;r<n.length;r+=2)if(n[r]===t)return n[r+1]}return null}function JP(e,t){return e.type&11?ma(e,t):e.type&4?Fd(e,t):null}function QP(e,t,n,r){return n===-1?JP(t,e):n===-2?e1(e,t,r):Wc(e,e[_e],n,t)}function e1(e,t,n){if(n===Ct)return ma(t,e);if(n===kr)return Fd(t,e);if(n===Br)return PS(t,e)}function kS(e,t,n,r){let i=t[Ni].queries[r];if(i.matches===null){let s=e.data,o=n.matches,a=[];for(let l=0;o!==null&&l<o.length;l+=2){let c=o[l];if(c<0)a.push(null);else{let h=s[c];a.push(QP(t,h,o[l+1],n.metadata.read))}}i.matches=a}return i.matches}function fg(e,t,n,r){let i=e.queries.getByIndex(n),s=i.matches;if(s!==null){let o=kS(e,t,i,n);for(let a=0;a<s.length;a+=2){let l=s[a];if(l>0)r.push(o[a/2]);else{let c=s[a+1],h=t[-l];for(let d=xn;d<h.length;d++){let f=h[d];f[Yo]===f[Rn]&&fg(f[_e],f,c,r)}if(h[la]!==null){let d=h[la];for(let f=0;f<d.length;f++){let g=d[f];fg(g[_e],g,c,r)}}}}}return r}function t1(e,t){return e[Ni].queries[t].queryList}function n1(e,t,n){let r=new Bm((n&4)===4);return NA(e,t,r,r.destroy),(t[Ni]??=new cg).queries.push(new ag(r))-1}function r1(e,t,n){let r=Zt();return r.firstCreatePass&&(o1(r,new lg(e,t,n),-1),(t&2)===2&&(r.staticViewQueries=!0)),n1(r,Fe(),t)}function i1(e){return e.split(",").map(t=>t.trim())}function o1(e,t,n){e.queries===null&&(e.queries=new ug),e.queries.track(new dg(t,n))}function yy(e,t){return e.queries.getByIndex(t)}function s1(e,t){let n=e[_e],r=yy(n,t);return r.crossesNgTemplate?fg(n,e,t,[]):kS(n,e,r,t)}var ki=class{},fd=class extends ki{injector;componentFactoryResolver=new og(this);instance=null;constructor(e){super();let t=new Uc([...e.providers,{provide:ki,useValue:this},{provide:ao,useValue:this.componentFactoryResolver}],e.parent||_d(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function a1(e,t,n=null){return new fd({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var c1=(()=>{class e{_injector;cachedInjectors=new Map;constructor(n){this._injector=n}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=Ub(!1,n.type),i=r.length>0?a1([r],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,i)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=ne({token:e,providedIn:"environment",factory:()=>new e(Ze(Gn))})}return e})();function yt(e){return Tg(()=>{let t=LS(e),n=te(w({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===AC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?i=>i.get(c1).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Zr.Emulated,styles:e.styles||xi,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&&uo("NgStandalone"),FS(n);let r=e.dependencies;return n.directiveDefs=yb(r,!1),n.pipeDefs=yb(r,!0),n.id=p1(n),n})}function l1(e){return qo(e)||Fb(e)}function u1(e){return e!==null}function d1(e,t){if(e==null)return zo;let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],s,o,a,l;Array.isArray(i)?(a=i[0],s=i[1],o=i[2]??s,l=i[3]||null):(s=i,o=i,a=Nd.None,l=null),n[s]=[r,a,l],t[s]=o}return n}function f1(e){if(e==null)return zo;let t={};for(let n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function Vr(e){return Tg(()=>{let t=LS(e);return FS(t),t})}function is(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function LS(e){let t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||zo,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||xi,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:d1(e.inputs,t),outputs:f1(e.outputs),debugInfo:null}}function FS(e){e.features?.forEach(t=>t(e))}function yb(e,t){if(!e)return null;let n=t?Bb:l1;return()=>(typeof e=="function"?e():e).map(r=>n(r)).filter(u1)}function p1(e){let t=0,n=typeof e.consts=="function"?"":e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let i of r.join("|"))t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function h1(e){return Object.getPrototypeOf(e.prototype).constructor}function po(e){let t=h1(e.type),n=!0,r=[e];for(;t;){let i;if(Kr(e))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new $e(903,!1);i=t.\u0275dir}if(i){if(n){r.push(i);let o=e;o.inputs=gm(e.inputs),o.declaredInputs=gm(e.declaredInputs),o.outputs=gm(e.outputs);let a=i.hostBindings;a&&_1(e,a);let l=i.viewQuery,c=i.contentQueries;if(l&&y1(e,l),c&&v1(e,c),m1(e,i),UN(e.outputs,i.outputs),Kr(i)&&i.data.animation){let h=e.data;h.animation=(h.animation||[]).concat(i.data.animation)}}let s=i.features;if(s)for(let o=0;o<s.length;o++){let a=s[o];a&&a.ngInherit&&a(e),a===po&&(n=!1)}}t=Object.getPrototypeOf(t)}g1(r)}function m1(e,t){for(let n in t.inputs){if(!t.inputs.hasOwnProperty(n)||e.inputs.hasOwnProperty(n))continue;let r=t.inputs[n];r!==void 0&&(e.inputs[n]=r,e.declaredInputs[n]=t.declaredInputs[n])}}function g1(e){let t=0,n=null;for(let r=e.length-1;r>=0;r--){let i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=ua(i.hostAttrs,n=ua(n,i.hostAttrs))}}function gm(e){return e===zo?{}:e===xi?[]:e}function y1(e,t){let n=e.viewQuery;n?e.viewQuery=(r,i)=>{t(r,i),n(r,i)}:e.viewQuery=t}function v1(e,t){let n=e.contentQueries;n?e.contentQueries=(r,i,s)=>{t(r,i,s),n(r,i,s)}:e.contentQueries=t}function _1(e,t){let n=e.hostBindings;n?e.hostBindings=(r,i)=>{t(r,i),n(r,i)}:e.hostBindings=t}function BS(e,t,n){return e[t]=n}function Li(e,t,n){let r=e[t];return Object.is(r,n)?!1:(e[t]=n,!0)}function E1(e,t,n,r){let i=Li(e,t,n);return Li(e,t+1,r)||i}function w1(e,t,n,r,i,s,o,a,l){let c=t.consts,h=il(t,e,4,o||null,a||null);Bg()&&gy(t,n,h,so(c,l),ly),h.mergedAttrs=ua(h.mergedAttrs,h.attrs),Gg(t,h);let d=h.tView=oy(2,h,r,i,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c,null);return t.queries!==null&&(t.queries.template(t,h),d.queries=t.queries.embeddedTView(h)),h}function pg(e,t,n,r,i,s,o,a,l,c){let h=n+Vt,d=t.firstCreatePass?w1(h,t,e,r,i,s,o,a,l):t.data[h];co(d,!1);let f=b1(t,e,d,n);Cd()&&Pd(t,e,f,d),Yr(f,e);let g=IS(f,e,f,d);return e[h]=g,ay(e,g),KP(g,d,e),Ed(d)&&Ad(t,e,d),l!=null&&cy(e,d,c),d}function xt(e,t,n,r,i,s,o,a){let l=Fe(),c=Zt(),h=so(c.consts,s);return pg(l,c,e,t,n,r,i,h,o,a),xt}var b1=C1;function C1(e,t,n,r){return Sd(!0),t[sn].createComment("")}var VS=new pe(""),S1=(()=>{class e{static \u0275prov=ne({token:e,providedIn:"root",factory:()=>new hg})}return e})(),hg=class{queuedEffectCount=0;queues=new Map;schedule(e){this.enqueue(e)}remove(e){let t=e.zone,n=this.queues.get(t);n.has(e)&&(n.delete(e),this.queuedEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||(this.queuedEffectCount++,n.add(e))}flush(){for(;this.queuedEffectCount>0;)for(let[e,t]of this.queues)e===null?this.flushQueue(t):e.run(()=>this.flushQueue(t))}flushQueue(e){for(let t of e)e.delete(t),this.queuedEffectCount--,t.run()}};function vy(e){return!!e&&typeof e.then=="function"}function US(e){return!!e&&typeof e.subscribe=="function"}var D1=new pe(""),HS=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=O(D1,{optional:!0})??[];injector=O(ht);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let i of this.appInits){let s=Wb(this.injector,i);if(vy(s))n.push(s);else if(US(s)){let o=new Promise((a,l)=>{s.subscribe({complete:a,error:l})});n.push(o)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(i=>{this.reject(i)}),n.length===0&&r(),this.initialized=!0}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),I1=new pe("");function T1(){aw(()=>{throw new $e(600,!1)})}function x1(e){return e.isBoundToModule}var R1=10,yr=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=O(_M);afterRenderManager=O($C);zonelessEnabled=O(Id);rootEffectScheduler=O(S1);dirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new J;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=O(Td).hasPendingTasks.pipe(pr(n=>!n));constructor(){O(ga,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:i=>{i&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=O(Gn);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){pt(10);let i=n instanceof dd;if(!this._injector.get(HS).done){let d=!i&&lA(n),f=!1;throw new $e(405,f)}let s;i?s=n:s=this._injector.get(ao).resolveComponentFactory(n),this.componentTypes.push(s.componentType);let o=x1(s)?void 0:this._injector.get(ki),a=r||s.selector,l=s.create(ht.NULL,[],a,o),c=l.location.nativeElement,h=l.injector.get(VS,null);return h?.registerApplication(c),l.onDestroy(()=>{this.detachView(l.hostView),zu(this.components,l),h?.unregisterApplication(c)}),this._loadComponent(l),pt(11,l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){pt(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(ey.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new $e(101,!1);let n=je(null);try{this._runningTick=!0,this.synchronize()}catch(r){this.internalErrorHandler(r)}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,je(n),this.afterTick.next(),pt(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(pn,null,{optional:!0}));let n=0;for(;this.dirtyFlags!==0&&n++<R1;)pt(14),this.synchronizeOnce(),pt(15)}synchronizeOnce(){if(this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush()),this.dirtyFlags&7){let n=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:r,notifyErrorHandler:i}of this.allViews)N1(r,i,n,this.zonelessEnabled);if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}else this._rendererFactory?.begin?.(),this._rendererFactory?.end?.();this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:n})=>bd(n))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(n){let r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){let r=n;zu(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n),this._injector.get(I1,[]).forEach(r=>r(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>zu(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new $e(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function zu(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function N1(e,t,n,r){!n&&!bd(e)||bS(e,t,n&&!r?0:1)}function va(e,t,n,r){let i=Fe(),s=tl();if(Li(i,s,t)){let o=Zt(),a=Wg();BO(a,i,e,t,n,r)}return va}function jS(e,t,n,r){return Li(e,tl(),n)?t+Zc(n)+r:Hi}function Hu(e,t){return e<<17|t<<2}function es(e){return e>>17&32767}function A1(e){return(e&2)==2}function M1(e,t){return e&131071|t<<17}function mg(e){return e|2}function da(e){return(e&131068)>>2}function ym(e,t){return e&-131069|t<<2}function O1(e){return(e&1)===1}function gg(e){return e|1}function P1(e,t,n,r,i,s){let o=s?t.classBindings:t.styleBindings,a=es(o),l=da(o);e[r]=n;let c=!1,h;if(Array.isArray(n)){let d=n;h=d[1],(h===null||Xc(d,h)>0)&&(c=!0)}else h=n;if(i)if(l!==0){let d=es(e[a+1]);e[r+1]=Hu(d,a),d!==0&&(e[d+1]=ym(e[d+1],r)),e[a+1]=M1(e[a+1],r)}else e[r+1]=Hu(a,0),a!==0&&(e[a+1]=ym(e[a+1],r)),a=r;else e[r+1]=Hu(l,0),a===0?a=r:e[l+1]=ym(e[l+1],r),l=r;c&&(e[r+1]=mg(e[r+1])),vb(e,h,r,!0),vb(e,h,r,!1),k1(t,h,e,r,s),o=Hu(a,l),s?t.classBindings=o:t.styleBindings=o}function k1(e,t,n,r,i){let s=i?e.residualClasses:e.residualStyles;s!=null&&typeof t=="string"&&Xc(s,t)>=0&&(n[r+1]=gg(n[r+1]))}function vb(e,t,n,r){let i=e[n+1],s=t===null,o=r?es(i):da(i),a=!1;for(;o!==0&&(a===!1||s);){let l=e[o],c=e[o+1];L1(l,t)&&(a=!0,e[o+1]=r?gg(c):mg(c)),o=r?es(c):da(c)}a&&(e[n+1]=r?mg(i):gg(i))}function L1(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?Xc(e,t)>=0:!1}function Be(e,t,n){let r=Fe(),i=tl();if(Li(r,i,t)){let s=Zt(),o=Wg();pS(s,o,r,e,t,r[sn],n,!1)}return Be}function _b(e,t,n,r,i){uy(t,e,n,i?"class":"style",r)}function ho(e,t,n){return $S(e,t,n,!1),ho}function mo(e,t){return $S(e,t,null,!0),mo}function $S(e,t,n,r){let i=Fe(),s=Zt(),o=VA(2);if(s.firstUpdatePass&&B1(s,e,o,r),t!==Hi&&Li(i,o,t)){let a=s.data[lo()];$1(s,a,i,i[sn],e,i[o+1]=W1(t,n),r,o)}}function F1(e,t){return t>=e.expandoStartIndex}function B1(e,t,n,r){let i=e.data;if(i[n+1]===null){let s=i[lo()],o=F1(e,n);G1(s,r)&&t===null&&!o&&(t=!1),t=V1(i,s,t,r),P1(i,s,t,n,o,r)}}function V1(e,t,n,r){let i=$A(e),s=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=vm(null,e,t,n,r),n=Kc(n,t.attrs,r),s=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i)if(n=vm(i,e,t,n,r),s===null){let a=U1(e,t,r);a!==void 0&&Array.isArray(a)&&(a=vm(null,e,t,a[1],r),a=Kc(a,t.attrs,r),H1(e,t,r,a))}else s=j1(e,t,r)}return s!==void 0&&(r?t.residualClasses=s:t.residualStyles=s),n}function U1(e,t,n){let r=n?t.classBindings:t.styleBindings;if(da(r)!==0)return e[es(r)]}function H1(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[es(i)]=r}function j1(e,t,n){let r,i=t.directiveEnd;for(let s=1+t.directiveStylingLast;s<i;s++){let o=e[s].hostAttrs;r=Kc(r,o,n)}return Kc(r,t.attrs,n)}function vm(e,t,n,r,i){let s=null,o=n.directiveEnd,a=n.directiveStylingLast;for(a===-1?a=n.directiveStart:a++;a<o&&(s=t[a],r=Kc(r,s.hostAttrs,i),s!==e);)a++;return e!==null&&(n.directiveStylingLast=a),r}function Kc(e,t,n){let r=n?1:2,i=-1;if(t!==null)for(let s=0;s<t.length;s++){let o=t[s];typeof o=="number"?i=o:i===r&&(Array.isArray(e)||(e=e===void 0?[]:["",e]),aA(e,o,n?!0:t[++s]))}return e===void 0?null:e}function $1(e,t,n,r,i,s,o,a){if(!(t.type&3))return;let l=e.data,c=l[a+1],h=O1(c)?Eb(l,t,n,i,da(c),o):void 0;if(!pd(h)){pd(s)||A1(c)&&(s=Eb(l,null,n,i,a,o));let d=eC(lo(),n);rP(r,o,d,i,s)}}function Eb(e,t,n,r,i,s){let o=t===null,a;for(;i>0;){let l=e[i],c=Array.isArray(l),h=c?l[1]:l,d=h===null,f=n[i+1];f===Hi&&(f=d?xi:void 0);let g=d?am(f,r):h===r?f:void 0;if(c&&!pd(g)&&(g=am(l,r)),pd(g)&&(a=g,o))return a;let m=e[i+1];i=o?es(m):da(m)}if(t!==null){let l=s?t.residualClasses:t.residualStyles;l!=null&&(a=am(l,r))}return a}function pd(e){return e!==void 0}function W1(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=mr(Qr(e)))),e}function G1(e,t){return(e.flags&(t?8:16))!==0}var yg=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),i=this.detach(r);if(r-n>1){let s=this.detach(n);this.attach(n,i),this.attach(r,s)}else this.attach(n,i)}move(e,t){this.attach(t,this.detach(e))}};function _m(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function z1(e,t,n){let r,i,s=0,o=e.length-1,a;if(Array.isArray(t)){let l=t.length-1;for(;s<=o&&s<=l;){let c=e.at(s),h=t[s],d=_m(s,c,s,h,n);if(d!==0){d<0&&e.updateValue(s,h),s++;continue}let f=e.at(o),g=t[l],m=_m(o,f,l,g,n);if(m!==0){m<0&&e.updateValue(o,g),o--,l--;continue}let b=n(s,c),x=n(o,f),A=n(s,h);if(Object.is(A,x)){let F=n(l,g);Object.is(F,b)?(e.swap(s,o),e.updateValue(o,g),l--,o--):e.move(o,s),e.updateValue(s,h),s++;continue}if(r??=new hd,i??=bb(e,s,o,n),vg(e,r,s,A))e.updateValue(s,h),s++,o++;else if(i.has(A))r.set(b,e.detach(s)),o--;else{let F=e.create(s,t[s]);e.attach(s,F),s++,o++}}for(;s<=l;)wb(e,r,n,s,t[s]),s++}else if(t!=null){let l=t[Symbol.iterator](),c=l.next();for(;!c.done&&s<=o;){let h=e.at(s),d=c.value,f=_m(s,h,s,d,n);if(f!==0)f<0&&e.updateValue(s,d),s++,c=l.next();else{r??=new hd,i??=bb(e,s,o,n);let g=n(s,d);if(vg(e,r,s,g))e.updateValue(s,d),s++,o++,c=l.next();else if(!i.has(g))e.attach(s,e.create(s,d)),s++,o++,c=l.next();else{let m=n(s,h);r.set(m,e.detach(s)),o--}}}for(;!c.done;)wb(e,r,n,e.length,c.value),c=l.next()}for(;s<=o;)e.destroy(e.detach(o--));r?.forEach(l=>{e.destroy(l)})}function vg(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function wb(e,t,n,r,i){if(vg(e,t,r,n(r,i)))e.updateValue(r,i);else{let s=e.create(r,i);e.attach(r,s)}}function bb(e,t,n,r){let i=new Set;for(let s=t;s<=n;s++)i.add(r(s,e.at(s)));return i}var hd=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function $t(e,t){uo("NgControlFlow");let n=Fe(),r=tl(),i=n[r]!==Hi?n[r]:-1,s=i!==-1?md(n,Vt+i):void 0,o=0;if(Li(n,r,e)){let a=je(null);try{if(s!==void 0&&xS(s,o),e!==-1){let l=Vt+e,c=md(n,l),h=bg(n[_e],l),d=qc(c,h.tView.ssrId),f=Md(n,h,t,{dehydratedView:d});Ld(c,f,o,Gc(h,d))}}finally{je(a)}}else if(s!==void 0){let a=TS(s,o);a!==void 0&&(a[jt]=t)}}var _g=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-xn}};function os(e,t){return t}var Eg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function Qt(e,t,n,r,i,s,o,a,l,c,h,d,f){uo("NgControlFlow");let g=Fe(),m=Zt(),b=l!==void 0,x=Fe(),A=a?o.bind(x[Pr][jt]):o,F=new Eg(b,A);x[Vt+e]=F,pg(g,m,e+1,t,n,r,i,so(m.consts,s)),b&&pg(g,m,e+2,l,c,h,d,so(m.consts,f))}var wg=class extends yg{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n}get length(){return this.lContainer.length-xn}at(e){return this.getLView(e)[jt].$implicit}attach(e,t){let n=t[Hc];this.needsIndexUpdate||=e!==this.length,Ld(this.lContainer,t,e,Gc(this.templateTNode,n))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,q1(this.lContainer,e)}create(e,t){let n=qc(this.lContainer,this.templateTNode.tView.ssrId),r=Md(this.hostLView,this.templateTNode,new _g(this.lContainer,t,e),{dehydratedView:n});return this.operationsCounter?.recordCreate(),r}destroy(e){Od(e[_e],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[jt].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[jt].$index=e}getLView(e){return Y1(this.lContainer,e)}};function en(e){let t=je(null),n=lo();try{let r=Fe(),i=r[_e],s=r[n],o=n+1,a=md(r,o);if(s.liveCollection===void 0){let c=bg(i,o);s.liveCollection=new wg(a,r,c)}else s.liveCollection.reset();let l=s.liveCollection;if(z1(l,e,s.trackByFn),l.updateIndexes(),s.hasEmptyBlock){let c=tl(),h=l.length===0;if(Li(r,c,h)){let d=n+2,f=md(r,d);if(h){let g=bg(i,d),m=qc(f,g.tView.ssrId),b=Md(r,g,void 0,{dehydratedView:m});Ld(f,b,0,Gc(g,m))}else xS(f,0)}}}finally{je(t)}}function md(e,t){return e[t]}function q1(e,t){return zc(e,t)}function Y1(e,t){return TS(e,t)}function bg(e,t){return kg(e,t)}function re(e,t,n,r){let i=Fe(),s=Zt(),o=Vt+e,a=i[sn],l=s.firstCreatePass?AS(o,s,i,t,ly,Bg(),n,r):s.data[o],c=K1(s,i,l,a,t,e);i[o]=c;let h=Ed(l);return co(l,!0),cS(a,c,l),!mS(l)&&Cd()&&Pd(s,i,c,l),(AA()===0||h)&&Yr(c,i),MA(),h&&(Ad(s,i,l),ny(s,l,i)),r!==null&&cy(i,l),re}function ie(){let e=tr();Vg()?sC():(e=e.parent,co(e,!1));let t=e;kA(t)&&LA(),OA();let n=Zt();return n.firstCreatePass&&MS(n,t),t.classesWithoutHost!=null&&XA(t)&&_b(n,t,Fe(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&JA(t)&&_b(n,t,Fe(),t.stylesWithoutHost,!1),ie}function Ne(e,t,n,r){return re(e,t,n,r),ie(),Ne}var K1=(e,t,n,r,i,s)=>(Sd(!0),sS(r,i,qA()));function Z1(e,t,n,r,i){let s=t.consts,o=so(s,r),a=il(t,e,8,"ng-container",o);o!==null&&ig(a,o,!0);let l=so(s,i);return Bg()&&gy(t,n,a,l,ly),a.mergedAttrs=ua(a.mergedAttrs,a.attrs),t.queries!==null&&t.queries.elementStart(t,a),a}function WS(e,t,n){let r=Fe(),i=Zt(),s=e+Vt,o=i.firstCreatePass?Z1(s,i,r,t,n):i.data[s];co(o,!0);let a=X1(i,r,o,e);return r[s]=a,Cd()&&Pd(i,r,a,o),Yr(a,r),Ed(o)&&(Ad(i,r,o),ny(i,o,r)),n!=null&&cy(r,o),WS}function GS(){let e=tr(),t=Zt();return Vg()?sC():(e=e.parent,co(e,!1)),t.firstCreatePass&&(Gg(t,e),Pg(e)&&t.queries.elementEnd(e)),GS}function Bd(e,t,n){return WS(e,t,n),GS(),Bd}var X1=(e,t,n,r)=>(Sd(!0),CO(t[sn],""));function nr(){return Fe()}var gd="en-US",J1=gd;function Q1(e){typeof e=="string"&&(J1=e.toLowerCase().replace(/_/g,"-"))}var ek=(e,t,n)=>{};function Rt(e,t,n,r){let i=Fe(),s=Zt(),o=tr();return nk(s,i,i[sn],o,e,t,r),Rt}function tk(e,t,n,r){let i=e.cleanup;if(i!=null)for(let s=0;s<i.length-1;s+=2){let o=i[s];if(o===n&&i[s+1]===r){let a=t[Ju],l=i[s+2];return a.length>l?a[l]:null}typeof o=="string"&&(s+=2)}return null}function nk(e,t,n,r,i,s,o){let a=Ed(r),l=e.firstCreatePass?iC(e):null,c=t[jt],h=rC(t),d=!0;if(r.type&3||o){let f=Xr(r,t),g=o?o(f):f,m=h.length,b=o?A=>o(er(A[r.index])):r.index,x=null;if(!o&&a&&(x=tk(e,t,i,r.index)),x!==null){let A=x.__ngLastListenerFn__||x;A.__ngNextListenerFn__=s,x.__ngLastListenerFn__=s,d=!1}else{s=Db(r,t,c,s),ek(f,i,s);let A=n.listen(g,i,s);h.push(s,A),l&&l.push(i,b,m,m+1)}}else s=Db(r,t,c,s);if(d){let f=r.outputs?.[i],g=r.hostDirectiveOutputs?.[i];if(g&&g.length)for(let m=0;m<g.length;m+=2){let b=g[m],x=g[m+1];Cb(r,e,t,b,x,i,s,h,l)}if(f&&f.length)for(let m of f)Cb(r,e,t,m,i,i,s,h,l)}}function Cb(e,t,n,r,i,s,o,a,l){let c=n[r],h=t.data[r].outputs[i],d=c[h].subscribe(o),f=a.length;a.push(o,d),l&&l.push(s,e.index,f,-(f+1))}function Sb(e,t,n,r){let i=je(null);try{return pt(6,t,n),n(r)!==!1}catch(s){return hS(e,s),!1}finally{pt(7,t,n),je(i)}}function Db(e,t,n,r){return function i(s){if(s===Function)return r;let o=ha(e)?gr(e.index,t):t;my(o,5);let a=Sb(t,n,r,s),l=i.__ngNextListenerFn__;for(;l;)a=Sb(t,n,l,s)&&a,l=l.__ngNextListenerFn__;return a}}function me(e=1){return GA(e)}function zn(e,t,n){return ji(e,"",t,"",n),zn}function ji(e,t,n,r,i){let s=Fe(),o=jS(s,t,n,r);if(o!==Hi){let a=Zt(),l=Wg();pS(a,l,s,e,o,s[sn],i,!1)}return ji}function Ea(e,t,n){r1(e,t,n)}function wa(e){let t=Fe(),n=Zt(),r=lC();Hg(r+1);let i=yy(n,r);if(e.dirty&&IA(t)===((i.metadata.flags&2)===2)){if(i.matches===null)e.reset([]);else{let s=s1(t,r);e.reset(s,wM),e.notifyOnChanges()}return!0}return!1}function ba(){return t1(Fe(),lC())}function _y(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function Ey(e){let t=aC();return wd(t,Vt+e)}function tn(e,t=""){let n=Fe(),r=Zt(),i=e+Vt,s=r.firstCreatePass?il(r,i,1,t,null):r.data[i],o=rk(r,n,s,t,e);n[i]=o,Cd()&&Pd(r,n,o,s),co(s,!1)}var rk=(e,t,n,r,i)=>(Sd(!0),wO(t[sn],r));function Ca(e){return ss("",e,""),Ca}function ss(e,t,n){let r=Fe(),i=jS(r,e,t,n);return i!==Hi&&ik(r,lo(),i),ss}function ik(e,t,n){let r=eC(t,e);bO(e[sn],r,n)}var zS={};function $i(e){let t=Zt(),n=Fe(),r=e+Vt,i=il(t,r,128,null,null);return co(i,!1),_y(t,n,r,zS),$i}function go(e){uo("NgLet");let t=Zt(),n=Fe(),r=lo();return _y(t,n,r,e),e}function Ur(e){let t=aC(),n=wd(t,Vt+e);if(n===zS)throw new $e(314,!1);return n}function ok(e,t,n){let r=Zt();if(r.firstCreatePass){let i=Kr(e);Cg(n,r.data,r.blueprint,i,!0),Cg(t,r.data,r.blueprint,i,!1)}}function Cg(e,t,n,r,i){if(e=kn(e),Array.isArray(e))for(let s=0;s<e.length;s++)Cg(e[s],t,n,r,i);else{let s=Zt(),o=Fe(),a=tr(),l=ca(e)?e:kn(e.provide),c=$b(e),h=a.providerIndexes&1048575,d=a.directiveStart,f=a.providerIndexes>>20;if(ca(e)||!e.multi){let g=new Jo(c,i,Mt),m=wm(l,t,i?h:h+f,d);m===-1?(Om(od(a,o),s,l),Em(s,e,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(g),o.push(g)):(n[m]=g,o[m]=g)}else{let g=wm(l,t,h+f,d),m=wm(l,t,h,h+f),b=g>=0&&n[g],x=m>=0&&n[m];if(i&&!x||!i&&!b){Om(od(a,o),s,l);let A=ck(i?ak:sk,n.length,i,r,c);!i&&x&&(n[m].providerFactory=A),Em(s,e,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(A),o.push(A)}else{let A=qS(n[i?m:g],c,!i&&r);Em(s,e,g>-1?g:m,A)}!i&&r&&x&&n[m].componentProviders++}}}function Em(e,t,n,r){let i=ca(t),s=hA(t);if(i||s){let o=(s?kn(t.useClass):t).prototype.ngOnDestroy;if(o){let a=e.destroyHooks||(e.destroyHooks=[]);if(!i&&t.multi){let l=a.indexOf(n);l===-1?a.push(n,[r,o]):a[l+1].push(r,o)}else a.push(n,o)}}}function qS(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function wm(e,t,n,r){for(let i=n;i<r;i++)if(t[i]===e)return i;return-1}function sk(e,t,n,r){return Sg(this.multi,[])}function ak(e,t,n,r){let i=this.multi,s;if(this.providerFactory){let o=this.providerFactory.componentProviders,a=Wc(n,n[_e],this.providerFactory.index,r);s=a.slice(0,o),Sg(i,s);for(let l=o;l<a.length;l++)s.push(a[l])}else s=[],Sg(i,s);return s}function Sg(e,t){for(let n=0;n<e.length;n++){let r=e[n];t.push(r())}return t}function ck(e,t,n,r,i){let s=new Jo(e,n,Mt);return s.multi=[],s.index=t,s.componentProviders=0,qS(s,i,r&&!n),s}function Vd(e,t=[]){return n=>{n.providersResolver=(r,i)=>ok(r,i?i(e):e,t)}}function YS(e,t,n,r){return ZS(Fe(),Ug(),e,t,n,r)}function KS(e,t){let n=e[t];return n===Hi?void 0:n}function ZS(e,t,n,r,i,s){let o=t+n;return Li(e,o,i)?BS(e,o+1,s?r.call(s,i):r(i)):KS(e,o+1)}function lk(e,t,n,r,i,s,o){let a=t+n;return E1(e,a,i,s)?BS(e,a+2,o?r.call(o,i,s):r(i,s)):KS(e,a+2)}function Cn(e,t){let n=Zt(),r,i=e+Vt;n.firstCreatePass?(r=uk(t,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks??=[]).push(i,r.onDestroy)):r=n.data[i];let s=r.factory||(r.factory=Go(r.type,!0)),o,a=Wn(Mt);try{let l=id(!1),c=s();return id(l),_y(n,Fe(),i,c),c}finally{Wn(a)}}function uk(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function Nn(e,t,n){let r=e+Vt,i=Fe(),s=wd(i,r);return JS(i,r)?ZS(i,Ug(),t,s.transform,n,s):s.transform(n)}function XS(e,t,n,r){let i=e+Vt,s=Fe(),o=wd(s,i);return JS(s,i)?lk(s,Ug(),t,o.transform,n,r,o):o.transform(n,r)}function JS(e,t){return e[_e].data[t].pure}function QS(e,t){return Fd(e,t)}var fa=class{full;major;minor;patch;constructor(e){this.full=e;let t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}},wy=new fa("19.2.0"),dk=(()=>{class e{zone=O(Le);changeDetectionScheduler=O(Ai);applicationRef=O(yr);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function fk({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:n}){return e??=()=>new Le(te(w({},pk()),{scheduleInRootZone:n})),[{provide:Le,useFactory:e},{provide:Vc,multi:!0,useFactory:()=>{let r=O(dk,{optional:!0});return()=>r.initialize()}},{provide:Vc,multi:!0,useFactory:()=>{let r=O(hk);return()=>{r.initialize()}}},t===!0?{provide:TC,useValue:!0}:[],{provide:Yg,useValue:n??IC}]}function pk(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var hk=(()=>{class e{subscription=new ot;initialized=!1;zone=O(Le);pendingTasks=O(Td);initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Le.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Le.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),eD=(()=>{class e{appRef=O(yr);taskService=O(Td);ngZone=O(Le);zonelessEnabled=O(Id);tracing=O(ga,{optional:!0});disableScheduling=O(TC,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new ot;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(ad):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(O(Yg,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof cd||!this.zoneIsDefined)}notify(n){if(!this.zonelessEnabled&&n===5)return;let r=!1;switch(n){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2,r=!0;break}case 12:{this.appRef.dirtyFlags|=16,r=!0;break}case 13:{this.appRef.dirtyFlags|=2,r=!0;break}case 11:{r=!0;break}case 9:case 8:case 7:case 10:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(r))return;let i=this.useMicrotaskScheduler?Qw:xC;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>i(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>i(()=>this.tick()))}shouldScheduleTick(n){return!(this.disableScheduling&&!n||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(ad+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let n=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){throw this.taskService.remove(n),r}finally{this.cleanup()}this.useMicrotaskScheduler=!0,Qw(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function tD(){return uo("NgZoneless"),Vb([{provide:Ai,useExisting:eD},{provide:Le,useClass:cd},{provide:Id,useValue:!0},{provide:Yg,useValue:!1},[]])}function mk(){return typeof $localize<"u"&&$localize.locale||gd}var by=new pe("",{providedIn:"root",factory:()=>O(by,Ke.Optional|Ke.SkipSelf)||mk()}),Dg=new pe(""),gk=new pe("");function Pc(e){return!e.moduleRef}function yk(e){let t=Pc(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Le);return n.run(()=>{Pc(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Mi,null),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:s=>{r.handleError(s)}})}),Pc(e)){let s=()=>t.destroy(),o=e.platformInjector.get(Dg);o.add(s),t.onDestroy(()=>{i.unsubscribe(),o.delete(s)})}else{let s=()=>e.moduleRef.destroy(),o=e.platformInjector.get(Dg);o.add(s),e.moduleRef.onDestroy(()=>{zu(e.allPlatformModules,e.moduleRef),i.unsubscribe(),o.delete(s)})}return _k(r,n,()=>{let s=t.get(HS);return s.runInitializers(),s.donePromise.then(()=>{let o=t.get(by,gd);if(Q1(o||gd),!t.get(gk,!0))return Pc(e)?t.get(yr):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Pc(e)){let a=t.get(yr);return e.rootComponent!==void 0&&a.bootstrap(e.rootComponent),a}else return vk(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}function vk(e,t){let n=e.injector.get(yr);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else if(e.instance.ngDoBootstrap)e.instance.ngDoBootstrap(n);else throw new $e(-403,!1);t.push(e)}function _k(e,t,n){try{let r=n();return vy(r)?r.catch(i=>{throw t.runOutsideAngular(()=>e.handleError(i)),i}):r}catch(r){throw t.runOutsideAngular(()=>e.handleError(r)),r}}var qu=null;function Ek(e=[],t){return ht.create({name:t,providers:[{provide:vd,useValue:"platform"},{provide:Dg,useValue:new Set([()=>qu=null])},...e]})}function wk(e=[]){if(qu)return qu;let t=Ek(e);return qu=t,T1(),bk(t),t}function bk(e){let t=e.get(Jg,null);Wb(e,()=>{t?.forEach(n=>n())})}var rr=(()=>{class e{static __NG_ELEMENT_ID__=Ck}return e})();function Ck(e){return Sk(tr(),Fe(),(e&16)===16)}function Sk(e,t,n){if(ha(e)&&!n){let r=gr(e.index,t);return new Qo(r,r)}else if(e.type&175){let r=t[Pr];return new Qo(r,t)}return null}function nD(e){pt(8);try{let{rootComponent:t,appProviders:n,platformProviders:r}=e,i=wk(r),s=[fk({}),{provide:Ai,useExisting:eD},...n||[]],o=new fd({providers:s,parent:i,debugName:"",runEnvironmentInitializers:!1});return yk({r3Injector:o.injector,platformInjector:i,rootComponent:t})}catch(t){return Promise.reject(t)}finally{pt(9)}}function Sa(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}function Cy(e,t=NaN){return!isNaN(parseFloat(e))&&!isNaN(Number(e))?Number(e):t}function Sy(e){let t=je(null);try{return e()}finally{je(t)}}var Ib=class{[bi];constructor(e){this[bi]=e}destroy(){this[bi].destroy()}};function Ud(e,t){let n=qo(e),r=t.elementInjector||_d();return new Yc(n).create(r,t.projectableNodes,t.hostElement,t.environmentInjector)}var Dk={schedule(e,t){let n=setTimeout(e,t);return()=>clearTimeout(n)}};function Ik(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Tk(e){return!!e&&e.nodeType===Node.ELEMENT_NODE}var Dy;function xk(e,t){if(!Dy){let n=Element.prototype;Dy=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return e.nodeType===Node.ELEMENT_NODE?Dy.call(e,t):!1}function Rk(e){let t={};return e.forEach(({propName:n,templateName:r,transform:i})=>{t[Ik(r)]=[n,i]}),t}function Nk(e,t){return t.get(ao).resolveComponentFactory(e).inputs}function Ak(e,t){let n=e.childNodes,r=t.map(()=>[]),i=-1;t.some((s,o)=>s==="*"?(i=o,!0):!1);for(let s=0,o=n.length;s<o;++s){let a=n[s],l=Mk(a,t,i);l!==-1&&r[l].push(a)}return r}function Mk(e,t,n){let r=n;return Tk(e)&&t.some((i,s)=>i!=="*"&&xk(e,i)?(r=s,!0):!1),r}var Ok=10,Iy=class{componentFactory;inputMap=new Map;constructor(e,t){this.componentFactory=t.get(ao).resolveComponentFactory(e);for(let n of this.componentFactory.inputs)this.inputMap.set(n.propName,n.templateName)}create(e){return new Ty(this.componentFactory,e,this.inputMap)}},Ty=class{componentFactory;injector;inputMap;eventEmitters=new Fo(1);events=this.eventEmitters.pipe(ea(e=>ro(...e)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(e,t,n){this.componentFactory=e,this.injector=t,this.inputMap=n,this.ngZone=this.injector.get(Le),this.appRef=this.injector.get(yr),this.cdScheduler=t.get(Ai),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=Dk.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},Ok))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,t){if(this.componentRef===null){this.initialInputValues.set(e,t);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(e)??e,t),this.componentRef.hostView.dirty&&(this.componentRef.changeDetectorRef.markForRefresh(),this.cdScheduler.notify(6))})}initializeComponent(e){let t=ht.create({providers:[],parent:this.injector}),n=Ak(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(t,n,e),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[e,t]of this.initialInputValues)this.setInputValue(e,t);this.initialInputValues.clear()}initializeOutputs(e){let t=this.componentFactory.outputs.map(({propName:n,templateName:r})=>{let i=e.instance[n];return new nt(s=>{let o=i.subscribe(a=>s.next({name:r,value:a}));return()=>o.unsubscribe()})});this.eventEmitters.next(t)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},xy=class extends HTMLElement{ngElementEventsSubscription=null};function rD(e,t){let n=Nk(e,t.injector),r=t.strategyFactory||new Iy(e,t.injector),i=Rk(n);class s extends xy{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let a=this._ngElementStrategy=r.create(this.injector||t.injector);n.forEach(({propName:l,transform:c})=>{if(!this.hasOwnProperty(l))return;let h=this[l];delete this[l],a.setInputValue(l,h,c)})}return this._ngElementStrategy}_ngElementStrategy;constructor(a){super(),this.injector=a}attributeChangedCallback(a,l,c,h){let[d,f]=i[a];this.ngElementStrategy.setInputValue(d,c,f)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{let l=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(l)})}}return n.forEach(({propName:o,transform:a})=>{Object.defineProperty(s.prototype,o,{get(){return this.ngElementStrategy.getInputValue(o)},set(l){this.ngElementStrategy.setInputValue(o,l,a)},configurable:!0,enumerable:!0})}),s}var aD=null;function Da(){return aD}function cD(e){aD??=e}var Hd=class{},Qe=new pe(""),lD=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:()=>O(kk),providedIn:"platform"})}return e})(),kk=(()=>{class e extends lD{_location;_history;_doc=O(Qe);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Da().getBaseHref(this._doc)}onPopState(n){let r=Da().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=Da().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",n,!1),()=>r.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,r,i){this._history.pushState(n,r,i)}replaceState(n,r,i){this._history.replaceState(n,r,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function uD(e,t){return e?t?e.endsWith("/")?t.startsWith("/")?e+t.slice(1):e+t:t.startsWith("/")?e+t:`${e}/${t}`:e:t}function iD(e){let t=e.search(/#|\?|$/);return e[t-1]==="/"?e.slice(0,t-1)+e.slice(t):e}function as(e){return e&&e[0]!=="?"?`?${e}`:e}var Ny=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:()=>O(Fk),providedIn:"root"})}return e})(),Lk=new pe(""),Fk=(()=>{class e extends Ny{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??O(Qe).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return uD(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+as(this._platformLocation.search),i=this._platformLocation.hash;return i&&n?`${r}${i}`:r}pushState(n,r,i,s){let o=this.prepareExternalUrl(i+as(s));this._platformLocation.pushState(n,r,o)}replaceState(n,r,i,s){let o=this.prepareExternalUrl(i+as(s));this._platformLocation.replaceState(n,r,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static \u0275fac=function(n){return new(n||e)(Ze(lD),Ze(Lk,8))};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Ay=(()=>{class e{_subject=new J;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=Uk(iD(oD(r))),this._locationStrategy.onPopState(i=>{this._subject.next({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,r=""){return this.path()==this.normalize(n+as(r))}normalize(n){return e.stripTrailingSlash(Vk(this._basePath,oD(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,r="",i=null){this._locationStrategy.pushState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+as(r)),i)}replaceState(n,r="",i=null){this._locationStrategy.replaceState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+as(r)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",r){this._urlChangeListeners.forEach(i=>i(n,r))}subscribe(n,r,i){return this._subject.subscribe({next:n,error:r??void 0,complete:i??void 0})}static normalizeQueryParams=as;static joinWithSlash=uD;static stripTrailingSlash=iD;static \u0275fac=function(n){return new(n||e)(Ze(Ny))};static \u0275prov=ne({token:e,factory:()=>Bk(),providedIn:"root"})}return e})();function Bk(){return new Ay(Ze(Ny))}function Vk(e,t){if(!e||!t.startsWith(e))return t;let n=t.substring(e.length);return n===""||["/",";","?","#"].includes(n[0])?n:t}function oD(e){return e.replace(/\/index.html$/,"")}function Uk(e){if(new RegExp("^(https?:)?//").test(e)){let[,t]=e.split(/\/\/[^\/]+/);return t}return e}function dD(e,t){t=encodeURIComponent(t);for(let n of e.split(";")){let r=n.indexOf("="),[i,s]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(i.trim()===t)return decodeURIComponent(s)}return null}var Ry=/\s+/,sD=[],fD=(()=>{class e{_ngEl;_renderer;initialClasses=sD;rawClass;stateMap=new Map;constructor(n,r){this._ngEl=n,this._renderer=r}set klass(n){this.initialClasses=n!=null?n.trim().split(Ry):sD}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(Ry):n}ngDoCheck(){for(let r of this.initialClasses)this._updateState(r,!0);let n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(let r of n)this._updateState(r,!0);else if(n!=null)for(let r of Object.keys(n))this._updateState(r,!!n[r]);this._applyStateDiff()}_updateState(n,r){let i=this.stateMap.get(n);i!==void 0?(i.enabled!==r&&(i.changed=!0,i.enabled=r),i.touched=!0):this.stateMap.set(n,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(let n of this.stateMap){let r=n[0],i=n[1];i.changed?(this._toggleClass(r,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),i.touched=!1}}_toggleClass(n,r){n=n.trim(),n.length>0&&n.split(Ry).forEach(i=>{r?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static \u0275fac=function(n){return new(n||e)(Mt(Ct),Mt(ya))};static \u0275dir=Vr({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return e})(),pD=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(n){this._viewContainerRef=n}ngOnChanges(n){if(this._shouldRecreateView(n)){let r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let i=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,i,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,r,i)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,r,i):!1,get:(n,r,i)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,i)}})}static \u0275fac=function(n){return new(n||e)(Mt(Br))};static \u0275dir=Vr({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[ts]})}return e})(),My="browser",Hk="server";function hD(e){return e===My}function Oy(e){return e===Hk}var jd=class{},ky=class extends Hd{supportsDOMEvents=!0},Ly=class OI extends ky{static makeCurrent(){cD(new OI)}onAndCancel(t,n,r,i){return t.addEventListener(n,r,i),()=>{t.removeEventListener(n,r,i)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.remove()}createElement(t,n){return n=n||this.getDefaultDocument(),n.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,n){return n==="window"?window:n==="document"?t:n==="body"?t.body:null}getBaseHref(t){let n=$k();return n==null?null:Wk(n)}resetBaseElement(){ol=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return dD(document.cookie,t)}},ol=null;function $k(){return ol=ol||document.querySelector("base"),ol?ol.getAttribute("href"):null}function Wk(e){return new URL(e,document.baseURI).pathname}var Gk=(()=>{class e{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),Fy=new pe(""),ED=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(n,r){this._zone=r,n.forEach(i=>{i.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,i,s){return this._findPluginFor(r).addEventListener(n,r,i,s)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(i=>i.supports(n)),!r)throw new $e(5101,!1);return this._eventNameToPlugin.set(n,r),r}static \u0275fac=function(n){return new(n||e)(Ze(Fy),Ze(Le))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),Wd=class{_doc;constructor(e){this._doc=e}manager},$d="ng-app-id";function mD(e){for(let t of e)t.remove()}function gD(e,t){let n=t.createElement("style");return n.textContent=e,n}function zk(e,t,n,r){let i=e.head?.querySelectorAll(`style[${$d}="${t}"],link[${$d}="${t}"]`);if(i)for(let s of i)s.removeAttribute($d),s instanceof HTMLLinkElement?r.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&n.set(s.textContent,{usage:0,elements:[s]})}function By(e,t){let n=t.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n}var wD=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(n,r,i,s={}){this.doc=n,this.appId=r,this.nonce=i,this.isServer=Oy(s),zk(n,r,this.inline,this.external),this.hosts.add(n.head)}addStyles(n,r){for(let i of n)this.addUsage(i,this.inline,gD);r?.forEach(i=>this.addUsage(i,this.external,By))}removeStyles(n,r){for(let i of n)this.removeUsage(i,this.inline);r?.forEach(i=>this.removeUsage(i,this.external))}addUsage(n,r,i){let s=r.get(n);s?s.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(o=>this.addElement(o,i(n,this.doc)))})}removeUsage(n,r){let i=r.get(n);i&&(i.usage--,i.usage<=0&&(mD(i.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])mD(n);this.hosts.clear()}addHost(n){this.hosts.add(n);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(n,gD(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(n,By(r,this.doc)))}removeHost(n){this.hosts.delete(n)}addElement(n,r){return this.nonce&&r.setAttribute("nonce",this.nonce),this.isServer&&r.setAttribute($d,this.appId),n.appendChild(r)}static \u0275fac=function(n){return new(n||e)(Ze(Qe),Ze(nl),Ze(Qg,8),Ze(rs))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),Py={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Uy=/%COMP%/g,bD="%COMP%",qk=`_nghost-${bD}`,Yk=`_ngcontent-${bD}`,Kk=!0,Zk=new pe("",{providedIn:"root",factory:()=>Kk});function Xk(e){return Yk.replace(Uy,e)}function Jk(e){return qk.replace(Uy,e)}function CD(e,t){return t.map(n=>n.replace(Uy,e))}var yD=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(n,r,i,s,o,a,l,c=null,h=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=s,this.doc=o,this.platformId=a,this.ngZone=l,this.nonce=c,this.tracingService=h,this.platformIsServer=Oy(a),this.defaultRenderer=new sl(n,o,l,this.platformIsServer,this.tracingService)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===Zr.ShadowDom&&(r=te(w({},r),{encapsulation:Zr.Emulated}));let i=this.getOrCreateRenderer(n,r);return i instanceof Gd?i.applyToHost(n):i instanceof al&&i.applyStyles(),i}getOrCreateRenderer(n,r){let i=this.rendererByCompId,s=i.get(r.id);if(!s){let o=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,d=this.platformIsServer,f=this.tracingService;switch(r.encapsulation){case Zr.Emulated:s=new Gd(l,c,r,this.appId,h,o,a,d,f);break;case Zr.ShadowDom:return new Vy(l,c,n,r,o,a,this.nonce,d,f);default:s=new al(l,c,r,h,o,a,d,f);break}i.set(r.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static \u0275fac=function(n){return new(n||e)(Ze(ED),Ze(wD),Ze(nl),Ze(Zk),Ze(Qe),Ze(rs),Ze(Le),Ze(Qg),Ze(ga,8))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),sl=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r,i){this.eventManager=e,this.doc=t,this.ngZone=n,this.platformIsServer=r,this.tracingService=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(Py[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(vD(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(vD(e)?e.content:e).insertBefore(t,n)}removeChild(e,t){t.remove()}selectRootElement(e,t){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new $e(-5104,!1);return t||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+":"+t;let i=Py[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Py[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){r&(Pi.DashCase|Pi.Important)?e.style.setProperty(t,n,r&Pi.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&Pi.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e=="string"&&(e=Da().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${t}`);let i=this.decoratePreventDefault(n);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,r)}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(t)):e(t))===!1&&t.preventDefault()}}};function vD(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var Vy=class extends sl{sharedStylesHost;hostEl;shadowRoot;constructor(e,t,n,r,i,s,o,a,l){super(e,i,s,a,l),this.sharedStylesHost=t,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=r.styles;c=CD(r.id,c);for(let d of c){let f=document.createElement("style");o&&f.setAttribute("nonce",o),f.textContent=d,this.shadowRoot.appendChild(f)}let h=r.getExternalStyles?.();if(h)for(let d of h){let f=By(d,i);o&&f.setAttribute("nonce",o),this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},al=class extends sl{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,i,s,o,a,l){super(e,i,s,o,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let c=n.styles;this.styles=l?CD(l,c):c,this.styleUrls=n.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Gd=class extends al{contentAttr;hostAttr;constructor(e,t,n,r,i,s,o,a,l){let c=r+"-"+n.id;super(e,t,n,i,s,o,a,l,c),this.contentAttr=Xk(c),this.hostAttr=Jk(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,""),n}},Qk=(()=>{class e extends Wd{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,i,s){return n.addEventListener(r,i,s),()=>this.removeEventListener(n,r,i,s)}removeEventListener(n,r,i,s){return n.removeEventListener(r,i,s)}static \u0275fac=function(n){return new(n||e)(Ze(Qe))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),_D=["alt","control","meta","shift"],eL={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},tL={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},nL=(()=>{class e extends Wd{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,i,s){let o=e.parseEventName(r),a=e.eventCallback(o.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Da().onAndCancel(n,o.domEventName,a,s))}static parseEventName(n){let r=n.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let s=e._normalizeKey(r.pop()),o="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),o="code."),_D.forEach(c=>{let h=r.indexOf(c);h>-1&&(r.splice(h,1),o+=c+".")}),o+=s,r.length!=0||s.length===0)return null;let l={};return l.domEventName=i,l.fullKey=o,l}static matchEventFullKeyCode(n,r){let i=eL[n.key]||n.key,s="";return r.indexOf("code.")>-1&&(i=n.code,s="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),_D.forEach(o=>{if(o!==i){let a=tL[o];a(n)&&(s+=o+".")}}),s+=i,s===r)}static eventCallback(n,r,i){return s=>{e.matchEventFullKeyCode(s,n)&&i.runGuarded(()=>r(s))}}static _normalizeKey(n){return n==="esc"?"escape":n}static \u0275fac=function(n){return new(n||e)(Ze(Qe))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})();function SD(e){return nD(rL(e))}function rL(e){return{appProviders:[...cL,...e?.providers??[]],platformProviders:aL}}function iL(){Ly.makeCurrent()}function oL(){return new Mi}function sL(){return BC(document),document}var aL=[{provide:rs,useValue:My},{provide:Jg,useValue:iL,multi:!0},{provide:Qe,useFactory:sL,deps:[]}],cL=[{provide:vd,useValue:"root"},{provide:Mi,useFactory:oL,deps:[]},{provide:Fy,useClass:Qk,multi:!0,deps:[Qe]},{provide:Fy,useClass:nL,multi:!0,deps:[Qe]},yD,wD,ED,{provide:pn,useExisting:yD},{provide:jd,useClass:Gk,deps:[]},[]],Hy=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:function(n){let r=null;return n?r=new(n||e):r=Ze(lL),r},providedIn:"root"})}return e})(),lL=(()=>{class e extends Hy{_doc;constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case ei.NONE:return r;case ei.HTML:return fo(r,"HTML")?Qr(r):ry(this._doc,String(r)).toString();case ei.STYLE:return fo(r,"Style")?Qr(r):r;case ei.SCRIPT:if(fo(r,"Script"))return Qr(r);throw new $e(5200,!1);case ei.URL:return fo(r,"URL")?Qr(r):Rd(String(r));case ei.RESOURCE_URL:if(fo(r,"ResourceURL"))return Qr(r);throw new $e(5201,!1);default:throw new $e(5202,!1)}}bypassSecurityTrustHtml(n){return qC(n)}bypassSecurityTrustStyle(n){return YC(n)}bypassSecurityTrustScript(n){return KC(n)}bypassSecurityTrustUrl(n){return ZC(n)}bypassSecurityTrustResourceUrl(n){return XC(n)}static \u0275fac=function(n){return new(n||e)(Ze(Qe))};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),DD="9.7.7",k=class ep{static SDK_VERSION=DD;static SDK_VERSION_CODE;static SDK="WEB";static LOG_PREFIX="CooeeSDK";static COOEE="cooee";static SESSION_STORAGE_SCROLL_ID="sleid";static IDLE_TIME_IN_SECONDS=30*60;static IN_APP_WRAPPER_NAME="cooee-wrapper";static IN_APP_CONTAINER_NAME="cooee-container";static IN_APP_DEFAULT_PADDING=15;static EVENT_SCREEN_VIEW="CE Screen View";static EVENT_APP_BACKGROUND="CE App Background";static EVENT_TRIGGER_DISPLAYED="CE Trigger Displayed";static EVENT_CAMPAIGN_HOLDOUT="CE Campaign Holdout";static EVENT_CAMPAIGN_REJECTED="CE Campaign Rejected";static EVENT_CAMPAIGN_FAILED="CE Campaign Failed";static EVENT_TRIGGER_CLOSED="CE Trigger Closed";static EVENT_SCROLL="CE Scroll";static EVENT_TRIGGER_CLICKED="CE Trigger Clicked";static EVENT_FORM_SUBMITTED="CE Form Submitted";static EVENT_EXPERIMENT_START="CE Experiment Start";static EVENT_VIDEO_DIALOG_CLOSED="CE Video Dialog Closed";static EVENT_VIDEO_DIALOG_OPENED="CE Video Dialog Opened";static EVENT_VIDEO_CHANGE="CE Video Changed";static EVENT_LAST_VIDEO_ENDED="CE Last Video Ended";static EVENT_VIDEO_MUTED="CE Video Muted";static EVENT_VIDEO_UNMUTED="CE Video Unmuted";static EVENT_ADD_TO_CART_CLICKED="CE Add To Cart Clicked";static EVENT_VIEW_ITEM_CLICKED="CE View Item Clicked";static EVENT_MORE_ITEM_INFO_CLICKED="CE More Item Info Clicked";static EVENT_OPEN_CART_CLICKED="CE Open Cart Clicked";static EVENT_ADD_TO_CART="Add To Cart";static EVENT_REMOVE_FROM_CART="Remove From Cart";static EVENT_VIEW_ITEM="View Item";static EVENT_VIEW_CART="View Cart";static EVENT_VIEW_COLLECTION="View Collection";static EVENT_BUY_NOW_CLICKED="Buy Now Clicked";static EVENT_CHECKOUT_STARTED="Checkout Started";static EVENT_REVIEW_CLICKED="Review Clicked";static EVENT_ITEM_THUMBNAIL_CLICKED="Item Thumbnail Clicked";static JS_LOAD_WHITELIST_EVENTS=[this.EVENT_VIEW_ITEM,this.EVENT_VIEW_CART,this.EVENT_VIEW_COLLECTION];static HASH_INITIATE_CHECKOUT="initiate-checkout";static HASH_OPEN_CART_DRAWER="open-cart-drawer";static ADD_BUNDLE_CTA_INBOUND_EVENT="letscooee:inbound:cta:add-bundle";static CTA_OPEN_CART_EVENT="letscooee:outbound:open-cart";static CTA_AFTER_REFRESH_UI="letscooee:outbound:refresh-ui";static POPUP_ACTIVITY_EVENT="letscooee:outbound:popup-activities";static THIRD_PARTY_CHECKOUT_EVENT="letscooee:outbound:third-party-initiate-checkout";static CAMPAIGN_DISPLAYED_ACTIVITY="DISPLAYED";static CAMPAIGN_CLICKED_ACTIVITY="CLICKED";static CAMPAIGN_CLOSED_ACTIVITY="CLOSED";static BLACKLISTED_PAGE_NAMES=["collection","product","cart"];static API_CALL_MAX_ATTEMPTS=3;static API_CALL_RETRY_DELAY=1e3;static PLACEHOLDER_IMAGE="https://cdn.global.letscooee.com/images/placeholders/product.png";static CART_UPDATE_BROADCAST="CART_UPDATE";static GRAPHQL_VERSION="2024-10";static GRAPHQL_API_PATH=`/api/${this.GRAPHQL_VERSION}/graphql.json`;static SHADOW_SPLITTER=":shadow";static CAMPAIGN_ATTRIBUTE="_letscooee_campaign";static CONTENT_ATTRIBUTE="_letscooee_content";static VIA="_via";static PAYMENT_MODAL_DETAILS=[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}];static{let t=ep.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");ep.SDK_VERSION_CODE=parseInt(t,10)}},hn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.js`},ir=Re(us()),C=class{static log(...e){ir.default.info(...e)}static debug(...e){ir.default.debug(...e)}static error(...e){ir.default.error(...e)}static warn(...e){ir.default.warn(...e)}static info(...e){ir.default.info(...e)}static trace(...e){ir.default.trace(...e)}static configure(e=k.LOG_PREFIX){ir.default.useDefaults({formatter:function(n){n.unshift(`${e} (v${k.SDK_VERSION}):`)}});let t=this.getDebugParam();(t==="1"||t==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?ir.default.setLevel(ir.default[localStorage.cooeeLogLevel]):ir.default.setLevel(hn.debug?ir.default.TRACE:ir.default.OFF)}static getDebugParam(){return new URL(location.href).searchParams?.get("cooee-debug")}static logBrand(){let e=`
8
8
  display: inline-block;
9
9
  font-size: 14px;
10
10
  background: linear-gradient(90deg, #d52dc8 25%, #2179e2 82%);
@@ -40,7 +40,7 @@ Url: ${Cf(e)}`),!0)}function CF(e,t){return e.type||!t||!t.length?!1:TF(e).some(
40
40
  `)};Un.prototype.renderPartial=function(e,t,n,r){if(n){var i=this.getConfigTags(r),s=r_(n)?n(e[1]):n[e[1]];if(s!=null){var o=e[6],a=e[5],l=e[4],c=s;a==0&&l&&(c=this.indentPartial(s,l,o));var h=this.parse(c,i);return this.renderTokens(h,t,n,c,r)}}};Un.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};Un.prototype.escapedValue=function(e,t,n){var r=this.getConfigEscape(n)||br.escape,i=t.lookup(e[1]);if(i!=null)return typeof i=="number"&&r===br.escape?String(i):r(i)};Un.prototype.rawValue=function(e){return e[1]};Un.prototype.getConfigTags=function(e){return Va(e)?e:e&&typeof e=="object"?e.tags:void 0};Un.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Va(e))return e.escape};var br={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){wl.templateCache=e},get templateCache(){return wl.templateCache}},wl=new Un;br.clearCache=function(){return wl.clearCache()};br.parse=function(e,t){return wl.parse(e,t)};br.render=function(e,t,n,r){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+KB(e)+'" was given as the first argument for mustache#render(template, view, partials)');return wl.render(e,t,n,r)};br.escape=n2;br.Scanner=bl;br.Context=Ba;br.Writer=Un;var vn=br;vn.escape=RI.MustacheUtils.escapeHtml;var kf=class sp{transform(t,n){return t?vn.render(t,w({},n)):null}static \u0275fac=function(t){return new(t||sp)};static \u0275pipe=is({name:"cooeeDynamicVariables",type:sp,pure:!0})},i_={};(function e(t,n,r,i){var s=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),o=typeof Path2D=="function"&&typeof DOMMatrix=="function",a=function(){if(!t.OffscreenCanvas)return!1;var D=new OffscreenCanvas(1,1),T=D.getContext("2d");T.fillRect(0,0,1,1);var Z=D.transferToImageBitmap();try{T.createPattern(Z,"no-repeat")}catch{return!1}return!0}();function l(){}function c(D){var T=n.exports.Promise,Z=T!==void 0?T:t.Promise;return typeof Z=="function"?new Z(D):(D(l,l),null)}var h=function(D,T){return{transform:function(Z){if(D)return Z;if(T.has(Z))return T.get(Z);var ee=new OffscreenCanvas(Z.width,Z.height),se=ee.getContext("2d");return se.drawImage(Z,0,0),T.set(Z,ee),ee},clear:function(){T.clear()}}}(a,new Map),d=function(){var D=Math.floor(16.666666666666668),T,Z,ee={},se=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(T=function(we){var ve=Math.random();return ee[ve]=requestAnimationFrame(function ue(Ce){se===Ce||se+D-1<Ce?(se=Ce,delete ee[ve],we()):ee[ve]=requestAnimationFrame(ue)}),ve},Z=function(we){ee[we]&&cancelAnimationFrame(ee[we])}):(T=function(we){return setTimeout(we,D)},Z=function(we){return clearTimeout(we)}),{frame:T,cancel:Z}}(),f=function(){var D,T,Z={};function ee(se){function we(ve,ue){se.postMessage({options:ve||{},callback:ue})}se.init=function(ve){var ue=ve.transferControlToOffscreen();se.postMessage({canvas:ue},[ue])},se.fire=function(ve,ue,Ce){if(T)return we(ve,null),T;var Ue=Math.random().toString(36).slice(2);return T=c(function(kt){function He(Ye){Ye.data.callback===Ue&&(delete Z[Ue],se.removeEventListener("message",He),T=null,h.clear(),Ce(),kt())}se.addEventListener("message",He),we(ve,Ue),Z[Ue]=He.bind(null,{data:{callback:Ue}})}),T},se.reset=function(){se.postMessage({reset:!0});for(var ve in Z)Z[ve](),delete Z[ve]}}return function(){if(D)return D;if(!r&&s){var se=["var CONFETTI, SIZE = {}, module = {};","("+e.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join(`
41
41
  `);try{D=new Worker(URL.createObjectURL(new Blob([se])))}catch(we){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",we),null}ee(D)}return D}}(),g={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function m(D,T){return T?T(D):D}function b(D){return D!=null}function x(D,T,Z){return m(D&&b(D[T])?D[T]:g[T],Z)}function A(D){return D<0?0:Math.floor(D)}function F(D,T){return Math.floor(Math.random()*(T-D))+D}function U(D){return parseInt(D,16)}function M(D){return D.map(q)}function q(D){var T=String(D).replace(/[^0-9a-f]/gi,"");return T.length<6&&(T=T[0]+T[0]+T[1]+T[1]+T[2]+T[2]),{r:U(T.substring(0,2)),g:U(T.substring(2,4)),b:U(T.substring(4,6))}}function Pe(D){var T=x(D,"origin",Object);return T.x=x(T,"x",Number),T.y=x(T,"y",Number),T}function ct(D){D.width=document.documentElement.clientWidth,D.height=document.documentElement.clientHeight}function j(D){var T=D.getBoundingClientRect();D.width=T.width,D.height=T.height}function de(D){var T=document.createElement("canvas");return T.style.position="fixed",T.style.top="0px",T.style.left="0px",T.style.pointerEvents="none",T.style.zIndex=D,T}function Q(D,T,Z,ee,se,we,ve,ue,Ce){D.save(),D.translate(T,Z),D.rotate(we),D.scale(ee,se),D.arc(0,0,1,ve,ue,Ce),D.restore()}function he(D){var T=D.angle*(Math.PI/180),Z=D.spread*(Math.PI/180);return{x:D.x,y:D.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:D.startVelocity*.5+Math.random()*D.startVelocity,angle2D:-T+(.5*Z-Math.random()*Z),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:D.color,shape:D.shape,tick:0,totalTicks:D.ticks,decay:D.decay,drift:D.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:D.gravity*3,ovalScalar:.6,scalar:D.scalar,flat:D.flat}}function Ae(D,T){T.x+=Math.cos(T.angle2D)*T.velocity+T.drift,T.y+=Math.sin(T.angle2D)*T.velocity+T.gravity,T.velocity*=T.decay,T.flat?(T.wobble=0,T.wobbleX=T.x+10*T.scalar,T.wobbleY=T.y+10*T.scalar,T.tiltSin=0,T.tiltCos=0,T.random=1):(T.wobble+=T.wobbleSpeed,T.wobbleX=T.x+10*T.scalar*Math.cos(T.wobble),T.wobbleY=T.y+10*T.scalar*Math.sin(T.wobble),T.tiltAngle+=.1,T.tiltSin=Math.sin(T.tiltAngle),T.tiltCos=Math.cos(T.tiltAngle),T.random=Math.random()+2);var Z=T.tick++/T.totalTicks,ee=T.x+T.random*T.tiltCos,se=T.y+T.random*T.tiltSin,we=T.wobbleX+T.random*T.tiltCos,ve=T.wobbleY+T.random*T.tiltSin;if(D.fillStyle="rgba("+T.color.r+", "+T.color.g+", "+T.color.b+", "+(1-Z)+")",D.beginPath(),o&&T.shape.type==="path"&&typeof T.shape.path=="string"&&Array.isArray(T.shape.matrix))D.fill(Xe(T.shape.path,T.shape.matrix,T.x,T.y,Math.abs(we-ee)*.1,Math.abs(ve-se)*.1,Math.PI/10*T.wobble));else if(T.shape.type==="bitmap"){var ue=Math.PI/10*T.wobble,Ce=Math.abs(we-ee)*.1,Ue=Math.abs(ve-se)*.1,kt=T.shape.bitmap.width*T.scalar,He=T.shape.bitmap.height*T.scalar,Ye=new DOMMatrix([Math.cos(ue)*Ce,Math.sin(ue)*Ce,-Math.sin(ue)*Ue,Math.cos(ue)*Ue,T.x,T.y]);Ye.multiplySelf(new DOMMatrix(T.shape.matrix));var At=D.createPattern(h.transform(T.shape.bitmap),"no-repeat");At.setTransform(Ye),D.globalAlpha=1-Z,D.fillStyle=At,D.fillRect(T.x-kt/2,T.y-He/2,kt,He),D.globalAlpha=1}else if(T.shape==="circle")D.ellipse?D.ellipse(T.x,T.y,Math.abs(we-ee)*T.ovalScalar,Math.abs(ve-se)*T.ovalScalar,Math.PI/10*T.wobble,0,2*Math.PI):Q(D,T.x,T.y,Math.abs(we-ee)*T.ovalScalar,Math.abs(ve-se)*T.ovalScalar,Math.PI/10*T.wobble,0,2*Math.PI);else if(T.shape==="star")for(var ke=Math.PI/2*3,u=4*T.scalar,p=8*T.scalar,y=T.x,I=T.y,L=5,V=Math.PI/L;L--;)y=T.x+Math.cos(ke)*p,I=T.y+Math.sin(ke)*p,D.lineTo(y,I),ke+=V,y=T.x+Math.cos(ke)*u,I=T.y+Math.sin(ke)*u,D.lineTo(y,I),ke+=V;else D.moveTo(Math.floor(T.x),Math.floor(T.y)),D.lineTo(Math.floor(T.wobbleX),Math.floor(se)),D.lineTo(Math.floor(we),Math.floor(ve)),D.lineTo(Math.floor(ee),Math.floor(T.wobbleY));return D.closePath(),D.fill(),T.tick<T.totalTicks}function ut(D,T,Z,ee,se){var we=T.slice(),ve=D.getContext("2d"),ue,Ce,Ue=c(function(kt){function He(){ue=Ce=null,ve.clearRect(0,0,ee.width,ee.height),h.clear(),se(),kt()}function Ye(){r&&!(ee.width===i.width&&ee.height===i.height)&&(ee.width=D.width=i.width,ee.height=D.height=i.height),!ee.width&&!ee.height&&(Z(D),ee.width=D.width,ee.height=D.height),ve.clearRect(0,0,ee.width,ee.height),we=we.filter(function(At){return Ae(ve,At)}),we.length?ue=d.frame(Ye):He()}ue=d.frame(Ye),Ce=He});return{addFettis:function(kt){return we=we.concat(kt),Ue},canvas:D,promise:Ue,reset:function(){ue&&d.cancel(ue),Ce&&Ce()}}}function lt(D,T){var Z=!D,ee=!!x(T||{},"resize"),se=!1,we=x(T,"disableForReducedMotion",Boolean),ve=s&&!!x(T||{},"useWorker"),ue=ve?f():null,Ce=Z?ct:j,Ue=D&&ue?!!D.__confetti_initialized:!1,kt=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,He;function Ye(ke,u,p){for(var y=x(ke,"particleCount",A),I=x(ke,"angle",Number),L=x(ke,"spread",Number),V=x(ke,"startVelocity",Number),K=x(ke,"decay",Number),et=x(ke,"gravity",Number),ze=x(ke,"drift",Number),Me=x(ke,"colors",M),dt=x(ke,"ticks",Number),Y=x(ke,"shapes"),De=x(ke,"scalar"),fe=!!x(ke,"flat"),tt=Pe(ke),bn=y,wn=[],at=D.width*tt.x,ye=D.height*tt.y;bn--;)wn.push(he({x:at,y:ye,angle:I,spread:L,startVelocity:V,color:Me[bn%Me.length],shape:Y[F(0,Y.length)],ticks:dt,decay:K,gravity:et,drift:ze,scalar:De,flat:fe}));return He?He.addFettis(wn):(He=ut(D,wn,Ce,u,p),He.promise)}function At(ke){var u=we||x(ke,"disableForReducedMotion",Boolean),p=x(ke,"zIndex",Number);if(u&&kt)return c(function(V){V()});Z&&He?D=He.canvas:Z&&!D&&(D=de(p),document.body.appendChild(D)),ee&&!Ue&&Ce(D);var y={width:D.width,height:D.height};ue&&!Ue&&ue.init(D),Ue=!0,ue&&(D.__confetti_initialized=!0);function I(){if(ue){var V={getBoundingClientRect:function(){if(!Z)return D.getBoundingClientRect()}};Ce(V),ue.postMessage({resize:{width:V.width,height:V.height}});return}y.width=y.height=null}function L(){He=null,ee&&(se=!1,t.removeEventListener("resize",I)),Z&&D&&(document.body.contains(D)&&document.body.removeChild(D),D=null,Ue=!1)}return ee&&!se&&(se=!0,t.addEventListener("resize",I,!1)),ue?ue.fire(ke,y,L):Ye(ke,y,L)}return At.reset=function(){ue&&ue.reset(),He&&He.reset()},At}var v;function Ht(){return v||(v=lt(null,{useWorker:!0,resize:!0})),v}function Xe(D,T,Z,ee,se,we,ve){var ue=new Path2D(D),Ce=new Path2D;Ce.addPath(ue,new DOMMatrix(T));var Ue=new Path2D;return Ue.addPath(Ce,new DOMMatrix([Math.cos(ve)*se,Math.sin(ve)*se,-Math.sin(ve)*we,Math.cos(ve)*we,Z,ee])),Ue}function Yt(D){if(!o)throw new Error("path confetti are not supported in this browser");var T,Z;typeof D=="string"?T=D:(T=D.path,Z=D.matrix);var ee=new Path2D(T),se=document.createElement("canvas"),we=se.getContext("2d");if(!Z){for(var ve=1e3,ue=ve,Ce=ve,Ue=0,kt=0,He,Ye,At=0;At<ve;At+=2)for(var ke=0;ke<ve;ke+=2)we.isPointInPath(ee,At,ke,"nonzero")&&(ue=Math.min(ue,At),Ce=Math.min(Ce,ke),Ue=Math.max(Ue,At),kt=Math.max(kt,ke));He=Ue-ue,Ye=kt-Ce;var u=10,p=Math.min(u/He,u/Ye);Z=[p,0,0,p,-Math.round(He/2+ue)*p,-Math.round(Ye/2+Ce)*p]}return{type:"path",path:T,matrix:Z}}function Se(D){var T,Z=1,ee="#000000",se='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof D=="string"?T=D:(T=D.text,Z="scalar"in D?D.scalar:Z,se="fontFamily"in D?D.fontFamily:se,ee="color"in D?D.color:ee);var we=10*Z,ve=""+we+"px "+se,ue=new OffscreenCanvas(we,we),Ce=ue.getContext("2d");Ce.font=ve;var Ue=Ce.measureText(T),kt=Math.ceil(Ue.actualBoundingBoxRight+Ue.actualBoundingBoxLeft),He=Math.ceil(Ue.actualBoundingBoxAscent+Ue.actualBoundingBoxDescent),Ye=2,At=Ue.actualBoundingBoxLeft+Ye,ke=Ue.actualBoundingBoxAscent+Ye;kt+=Ye+Ye,He+=Ye+Ye,ue=new OffscreenCanvas(kt,He),Ce=ue.getContext("2d"),Ce.font=ve,Ce.fillStyle=ee,Ce.fillText(T,At,ke);var u=1/Z;return{type:"bitmap",bitmap:ue.transferToImageBitmap(),matrix:[u,0,0,u,-kt*u/2,-He*u/2]}}n.exports=function(){return Ht().apply(this,arguments)},n.exports.reset=function(){Ht().reset()},n.exports.create=lt,n.exports.shapeFromPath=Yt,n.exports.shapeFromText=Se})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),i_,!1);var NI=i_.exports,DK=i_.exports.create,Lf=class{static DEFAULTS={scalar:1.4,zIndex:1e4,shapes:["circle","circle","square"],colors:["#f51c8f","#2179e2","#d52dc8","#01a9d9","#78ff44","#fdff6a"]};static async basic(){await this.fire({particleCount:100,spread:70,origin:{y:.6}})}static async leftRight(e=100){let t=[],n=Date.now()+2e3,r=()=>{t.push(this.fire({angle:60,spread:55,origin:{x:0}}),this.fire({angle:120,spread:55,origin:{x:1}})),Date.now()<n&&e>0&&(requestAnimationFrame(r),e--)};r(),await Promise.all(t)}static async realistic(){await Promise.all([this.realisticFire(.25,{spread:26,startVelocity:55}),this.realisticFire(.2,{spread:60}),this.realisticFire(.35,{spread:100,decay:.91,scalar:.8}),this.realisticFire(.1,{spread:120,startVelocity:25,decay:.92,scalar:1.2}),this.realisticFire(.1,{spread:120,startVelocity:45})])}static async fire(e){Object.assign(e,this.DEFAULTS,e),e.particleCount=e.particleCount??this.DEFAULTS.colors.length,await NI(e)}static async realisticFire(e,t){let n={origin:{y:.7}};await this.fire(Object.assign({},n,t,{particleCount:Math.floor(200*e)}))}},ui=class Fp{constructor(t){this.sanitizer=t}transform(t){return t?this.sanitizer.bypassSecurityTrustHtml(t):""}static \u0275fac=function(t){return new(t||Fp)(Mt(Hy,16))};static \u0275pipe=is({name:"safeHtml",type:Fp,pure:!0})},u2=(e,t)=>t.minValue;function d2(e,t){if(e&1&&(re(0,"li",6)(1,"div",7),Ne(2,"div",8),Cn(3,"cooeeCurrency"),Cn(4,"safeHtml"),Ne(5,"img",9),re(6,"div",10),tn(7),ie()()()),e&2){let n=t.$implicit,r=me(2);ho("left",n.calculatedAlignment+"%"),X(2),Be("innerHTML",Nn(4,7,Nn(3,5,n.minValue)),Fr),X(3),Be("src",r.getIconURL(n),an),X(2),Ca(n.label)}}function f2(e,t){if(e&1&&($i(0)(1),Ne(2,"div",0),Cn(3,"cooeeDynamicVariables"),Cn(4,"safeHtml"),re(5,"div",1)(6,"ul",2)(7,"div",3),Ne(8,"div",4),ie(),Qt(9,d2,8,9,"li",5,u2),ie()()),e&2){let n=me(),r=n.calculatedState(),i=r.nextMilestone?r.nextMilestone.reachingText:r.lastMilestone.reachedText;X(2),Be("innerHTML",Nn(4,6,XS(3,3,i,n.localDynamicVariables())),Fr),X(6),ho("width",r.cartValuePercentage+"%"),X(),en(r.milestones)}}var Bf=class Of{constructor(t){this.elementRef=t,this.elementRef.nativeElement.update=this.update.bind(this)}cart;localDynamicVariables=Vi({});calculatedState=Vi({});_engagementTrigger=Vi(null);progressBarConfig;set engagementTrigger(t){this._engagementTrigger.set(t),this.progressBarConfig=t.progressBarConfig}ngOnInit(){C.debug("Init progressbar"),this.calculateMilestonesSilently()}ngOnDestroy(){C.debug("Destroying progressbar")}update(){this.calculateMilestonesSilently()}getIconURL(t){return t.rewardType===Ff.MilestoneRewardType.FREE_SHIPPING?"https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png":t.rewardType===Ff.MilestoneRewardType.DISCOUNT?"https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png":t.rewardType===Ff.MilestoneRewardType.FREE_AUTO_GIFT?"https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png":""}calculateMilestonesSilently(){this.calculateMilestones().catch(t=>C.error(t))}async calculateMilestones(){let t=this._engagementTrigger();if(!t?.progressBarConfig?.milestones?.length){C.warn("Milestones not available in progress bar config",t);return}let n=await this.cart.getNormalisedCart(),r=t.progressBarConfig,i=r.milestones.at(-1),s=i.minValue+Math.floor(i.minValue*5/100),o=n.originalAmount,a=Math.min(o,s),l=100/r.milestones.length,c=l;for(let g of r.milestones)g.calculatedAlignment=c,c+=l;let h=this.calculateTrackedProgress(a,r.milestones);C.debug("Cart value:",o,`, percentage: ${h}%`),this.celebrate(t,o);let d={milestonesReady:!0,cartValuePercentage:h,milestones:r.milestones},f=r.milestones.find(g=>g.minValue>o);if(f){this.localDynamicVariables.set({amount_left:le.formatCurrency(f.minValue-o)}),d.nextMilestone=f,this.calculatedState.set(d);return}d.lastMilestone=i,this.calculatedState.set(d)}celebrate(t,n){let r=[...t.progressBarConfig.milestones].reverse().find(s=>s.minValue<n);if(!r)return;let i=`lc/en/${t.shortID}/${r.minValue}`;sessionStorage.getItem(i)||(sessionStorage.setItem(i,"1"),this.progressBarConfig?.noConfetti||Lf.realistic())}calculateTrackedProgress(t,n){if(t<=n[0].minValue)return t/n[0].minValue*n[0].calculatedAlignment;if(t>=n[n.length-1].minValue)return 100;for(let r=0;r<n.length-1;r++){let i=n[r].minValue,s=n[r+1].minValue,o=n[r].calculatedAlignment,a=n[r+1].calculatedAlignment;if(t>=i&&t<=s)return(t-i)/(s-i)*(a-o)+o}return 0}static \u0275fac=function(t){return new(t||Of)(Mt(Ct))};static \u0275cmp=yt({type:Of,selectors:[["cooee-progressbar"]],inputs:{cart:"cart",engagementTrigger:"engagementTrigger"},decls:1,vars:1,consts:[["id","lc-heading",1,"lc:font-medium","lc:text-center","lc:text-[12px]","lc-primary-text",3,"innerHTML"],[1,"lc:mt-4","lc:w-[95%]"],["id","lc-milestone-list",1,"lc:flex","lc:items-center","lc:relative","lc:text-[10px]","lc:font-medium"],["id","lc-untracked-path",1,"lc:w-full","lc:bg-gray-200","lc:h-1","lc:absolute","lc-progress-rail"],["id","lc-tracked-path",1,"lc:bg-green-700","lc:h-full","lc:block!"],["id","lc-milestone-list-item",1,"lc:relative","lc:flex","lc:flex-col","lc:items-center","lc:h-[75px]",3,"left"],["id","lc-milestone-list-item",1,"lc:relative","lc:flex","lc:flex-col","lc:items-center","lc:h-[75px]"],[1,"lc:flex","lc:flex-col","lc:items-center","lc:justify-between","lc:absolute","lc:h-full","lc:w-[100px]"],["id","lc-milestone-value",1,"lc-milestone-value",3,"innerHTML"],["width","20","height","20","id","lc-milestone-icon","alt","milestone icon",1,"lc-milestone-icon","lc:bg-green-700",3,"src"],["id","lc-milestone-label",1,"lc="]],template:function(t,n){t&1&&xt(0,f2,11,8),t&2&&$t(n.calculatedState().milestonesReady?0:-1)},dependencies:[kf,ui,li],styles:["[_nghost-%COMP%]{display:block;padding:10px;background:linear-gradient(0deg,rgba(44,135,74,.1) 0%,transparent 100%)}.lc-milestone-icon[_ngcontent-%COMP%]{padding:5px;border-radius:1000px}.lc-progress-rail[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{transition:width .5s ease-in-out}"]})},$s=Re(FI()),_R=Re(qn()),$f=class{id;alt;sources;items;durationMS;thumbnail;constructor(e={}){this.id=e.id,this.alt=e.alt,this.sources=e.sources,this.durationMS=e.durationMS,this.thumbnail=e.thumbnail,this.items=e.items?e.items.map(t=>new mn(t)):[]}},o_=(e=>(e.GALLERY="GALLERY",e.CURRENT_PRODUCT="CURRENT_PRODUCT",e))(o_||{}),s_=(e=>(e.SWIPER="SWIPER",e.SIMPLE="SIMPLE",e.STORY="STORY",e.FLOATING_POPUP="FLOATING_POPUP",e))(s_||{}),Wf=class{videos;source;template;heading;constructor(e={}){this.videos=e.videos?.map(t=>new $f(t))??[],this.source=e.source,this.template=e.template,this.heading=e.heading}};function h2(e,t){return t={exports:{}},e(t,t.exports),t.exports}var m2=_2,g2=w2,y2=S2,pi=[],Sr=[],v2=typeof Uint8Array<"u"?Uint8Array:Array,a_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(ws=0,BI=a_.length;ws<BI;++ws)pi[ws]=a_[ws],Sr[a_.charCodeAt(ws)]=ws;var ws,BI;Sr[45]=62;Sr[95]=63;function eT(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function _2(e){var t=eT(e),n=t[0],r=t[1];return(n+r)*3/4-r}function E2(e,t,n){return(t+n)*3/4-n}function w2(e){var t,n=eT(e),r=n[0],i=n[1],s=new v2(E2(e,r,i)),o=0,a=i>0?r-4:r,l;for(l=0;l<a;l+=4)t=Sr[e.charCodeAt(l)]<<18|Sr[e.charCodeAt(l+1)]<<12|Sr[e.charCodeAt(l+2)]<<6|Sr[e.charCodeAt(l+3)],s[o++]=t>>16&255,s[o++]=t>>8&255,s[o++]=t&255;return i===2&&(t=Sr[e.charCodeAt(l)]<<2|Sr[e.charCodeAt(l+1)]>>4,s[o++]=t&255),i===1&&(t=Sr[e.charCodeAt(l)]<<10|Sr[e.charCodeAt(l+1)]<<4|Sr[e.charCodeAt(l+2)]>>2,s[o++]=t>>8&255,s[o++]=t&255),s}function b2(e){return pi[e>>18&63]+pi[e>>12&63]+pi[e>>6&63]+pi[e&63]}function C2(e,t,n){for(var r,i=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(e[s+2]&255),i.push(b2(r));return i.join("")}function S2(e){for(var t,n=e.length,r=n%3,i=[],s=16383,o=0,a=n-r;o<a;o+=s)i.push(C2(e,o,o+s>a?a:o+s));return r===1?(t=e[n-1],i.push(pi[t>>2]+pi[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(pi[t>>10]+pi[t>>4&63]+pi[t<<2&63]+"=")),i.join("")}var c_={byteLength:m2,toByteArray:g2,fromByteArray:y2},D2=function(e,t,n,r,i){var s,o,a=i*8-r-1,l=(1<<a)-1,c=l>>1,h=-7,d=n?i-1:0,f=n?-1:1,g=e[t+d];for(d+=f,s=g&(1<<-h)-1,g>>=-h,h+=a;h>0;s=s*256+e[t+d],d+=f,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=r;h>0;o=o*256+e[t+d],d+=f,h-=8);if(s===0)s=1-c;else{if(s===l)return o?NaN:(g?-1:1)*(1/0);o=o+Math.pow(2,r),s=s-c}return(g?-1:1)*o*Math.pow(2,s-r)},I2=function(e,t,n,r,i,s){var o,a,l,c=s*8-i-1,h=(1<<c)-1,d=h>>1,f=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=r?0:s-1,m=r?1:-1,b=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+d>=1?t+=f/l:t+=f*Math.pow(2,1-d),t*l>=2&&(o++,l/=2),o+d>=h?(a=0,o=h):o+d>=1?(a=(t*l-1)*Math.pow(2,i),o=o+d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+g]=a&255,g+=m,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;e[n+g]=o&255,g+=m,o/=256,c-=8);e[n+g-m]|=b*128},Ua={read:D2,write:I2},qf=h2(function(e,t){var n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=o,t.SlowBuffer=A,t.INSPECT_MAX_BYTES=50;var r=2147483647;t.kMaxLength=r,o.TYPED_ARRAY_SUPPORT=i(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var u=new Uint8Array(1),p={foo:function(){return 42}};return Object.setPrototypeOf(p,Uint8Array.prototype),Object.setPrototypeOf(u,p),u.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function s(u){if(u>r)throw new RangeError('The value "'+u+'" is invalid for option "size"');var p=new Uint8Array(u);return Object.setPrototypeOf(p,o.prototype),p}function o(u,p,y){if(typeof u=="number"){if(typeof p=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(u)}return a(u,p,y)}o.poolSize=8192;function a(u,p,y){if(typeof u=="string")return d(u,p);if(ArrayBuffer.isView(u))return g(u);if(u==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(u));if(Ye(u,ArrayBuffer)||u&&Ye(u.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ye(u,SharedArrayBuffer)||u&&Ye(u.buffer,SharedArrayBuffer)))return m(u,p,y);if(typeof u=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var I=u.valueOf&&u.valueOf();if(I!=null&&I!==u)return o.from(I,p,y);var L=b(u);if(L)return L;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof u[Symbol.toPrimitive]=="function")return o.from(u[Symbol.toPrimitive]("string"),p,y);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(u))}o.from=function(u,p,y){return a(u,p,y)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function l(u){if(typeof u!="number")throw new TypeError('"size" argument must be of type number');if(u<0)throw new RangeError('The value "'+u+'" is invalid for option "size"')}function c(u,p,y){return l(u),u<=0?s(u):p!==void 0?typeof y=="string"?s(u).fill(p,y):s(u).fill(p):s(u)}o.alloc=function(u,p,y){return c(u,p,y)};function h(u){return l(u),s(u<0?0:x(u)|0)}o.allocUnsafe=function(u){return h(u)},o.allocUnsafeSlow=function(u){return h(u)};function d(u,p){if((typeof p!="string"||p==="")&&(p="utf8"),!o.isEncoding(p))throw new TypeError("Unknown encoding: "+p);var y=F(u,p)|0,I=s(y),L=I.write(u,p);return L!==y&&(I=I.slice(0,L)),I}function f(u){for(var p=u.length<0?0:x(u.length)|0,y=s(p),I=0;I<p;I+=1)y[I]=u[I]&255;return y}function g(u){if(Ye(u,Uint8Array)){var p=new Uint8Array(u);return m(p.buffer,p.byteOffset,p.byteLength)}return f(u)}function m(u,p,y){if(p<0||u.byteLength<p)throw new RangeError('"offset" is outside of buffer bounds');if(u.byteLength<p+(y||0))throw new RangeError('"length" is outside of buffer bounds');var I;return p===void 0&&y===void 0?I=new Uint8Array(u):y===void 0?I=new Uint8Array(u,p):I=new Uint8Array(u,p,y),Object.setPrototypeOf(I,o.prototype),I}function b(u){if(o.isBuffer(u)){var p=x(u.length)|0,y=s(p);return y.length===0||u.copy(y,0,0,p),y}if(u.length!==void 0)return typeof u.length!="number"||At(u.length)?s(0):f(u);if(u.type==="Buffer"&&Array.isArray(u.data))return f(u.data)}function x(u){if(u>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return u|0}function A(u){return+u!=u&&(u=0),o.alloc(+u)}o.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==o.prototype},o.compare=function(u,p){if(Ye(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),Ye(p,Uint8Array)&&(p=o.from(p,p.offset,p.byteLength)),!o.isBuffer(u)||!o.isBuffer(p))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(u===p)return 0;for(var y=u.length,I=p.length,L=0,V=Math.min(y,I);L<V;++L)if(u[L]!==p[L]){y=u[L],I=p[L];break}return y<I?-1:I<y?1:0},o.isEncoding=function(u){switch(String(u).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(u,p){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return o.alloc(0);var y;if(p===void 0)for(p=0,y=0;y<u.length;++y)p+=u[y].length;var I=o.allocUnsafe(p),L=0;for(y=0;y<u.length;++y){var V=u[y];if(Ye(V,Uint8Array))L+V.length>I.length?o.from(V).copy(I,L):Uint8Array.prototype.set.call(I,V,L);else if(o.isBuffer(V))V.copy(I,L);else throw new TypeError('"list" argument must be an Array of Buffers');L+=V.length}return I};function F(u,p){if(o.isBuffer(u))return u.length;if(ArrayBuffer.isView(u)||Ye(u,ArrayBuffer))return u.byteLength;if(typeof u!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(u));var y=u.length,I=arguments.length>2&&arguments[2]===!0;if(!I&&y===0)return 0;for(var L=!1;;)switch(p){case"ascii":case"latin1":case"binary":return y;case"utf8":case"utf-8":return ue(u).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y*2;case"hex":return y>>>1;case"base64":return kt(u).length;default:if(L)return I?-1:ue(u).length;p=(""+p).toLowerCase(),L=!0}}o.byteLength=F;function U(u,p,y){var I=!1;if((p===void 0||p<0)&&(p=0),p>this.length||((y===void 0||y>this.length)&&(y=this.length),y<=0)||(y>>>=0,p>>>=0,y<=p))return"";for(u||(u="utf8");;)switch(u){case"hex":return Yt(this,p,y);case"utf8":case"utf-8":return ut(this,p,y);case"ascii":return Ht(this,p,y);case"latin1":case"binary":return Xe(this,p,y);case"base64":return Ae(this,p,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Se(this,p,y);default:if(I)throw new TypeError("Unknown encoding: "+u);u=(u+"").toLowerCase(),I=!0}}o.prototype._isBuffer=!0;function M(u,p,y){var I=u[p];u[p]=u[y],u[y]=I}o.prototype.swap16=function(){var u=this.length;if(u%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var p=0;p<u;p+=2)M(this,p,p+1);return this},o.prototype.swap32=function(){var u=this.length;if(u%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var p=0;p<u;p+=4)M(this,p,p+3),M(this,p+1,p+2);return this},o.prototype.swap64=function(){var u=this.length;if(u%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var p=0;p<u;p+=8)M(this,p,p+7),M(this,p+1,p+6),M(this,p+2,p+5),M(this,p+3,p+4);return this},o.prototype.toString=function(){var u=this.length;return u===0?"":arguments.length===0?ut(this,0,u):U.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(u){if(!o.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:o.compare(this,u)===0},o.prototype.inspect=function(){var u="",p=t.INSPECT_MAX_BYTES;return u=this.toString("hex",0,p).replace(/(.{2})/g,"$1 ").trim(),this.length>p&&(u+=" ... "),"<Buffer "+u+">"},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(u,p,y,I,L){if(Ye(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),!o.isBuffer(u))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(u));if(p===void 0&&(p=0),y===void 0&&(y=u?u.length:0),I===void 0&&(I=0),L===void 0&&(L=this.length),p<0||y>u.length||I<0||L>this.length)throw new RangeError("out of range index");if(I>=L&&p>=y)return 0;if(I>=L)return-1;if(p>=y)return 1;if(p>>>=0,y>>>=0,I>>>=0,L>>>=0,this===u)return 0;for(var V=L-I,K=y-p,et=Math.min(V,K),ze=this.slice(I,L),Me=u.slice(p,y),dt=0;dt<et;++dt)if(ze[dt]!==Me[dt]){V=ze[dt],K=Me[dt];break}return V<K?-1:K<V?1:0};function q(u,p,y,I,L){if(u.length===0)return-1;if(typeof y=="string"?(I=y,y=0):y>2147483647?y=2147483647:y<-2147483648&&(y=-2147483648),y=+y,At(y)&&(y=L?0:u.length-1),y<0&&(y=u.length+y),y>=u.length){if(L)return-1;y=u.length-1}else if(y<0)if(L)y=0;else return-1;if(typeof p=="string"&&(p=o.from(p,I)),o.isBuffer(p))return p.length===0?-1:Pe(u,p,y,I,L);if(typeof p=="number")return p=p&255,typeof Uint8Array.prototype.indexOf=="function"?L?Uint8Array.prototype.indexOf.call(u,p,y):Uint8Array.prototype.lastIndexOf.call(u,p,y):Pe(u,[p],y,I,L);throw new TypeError("val must be string, number or Buffer")}function Pe(u,p,y,I,L){var V=1,K=u.length,et=p.length;if(I!==void 0&&(I=String(I).toLowerCase(),I==="ucs2"||I==="ucs-2"||I==="utf16le"||I==="utf-16le")){if(u.length<2||p.length<2)return-1;V=2,K/=2,et/=2,y/=2}function ze(fe,tt){return V===1?fe[tt]:fe.readUInt16BE(tt*V)}var Me;if(L){var dt=-1;for(Me=y;Me<K;Me++)if(ze(u,Me)===ze(p,dt===-1?0:Me-dt)){if(dt===-1&&(dt=Me),Me-dt+1===et)return dt*V}else dt!==-1&&(Me-=Me-dt),dt=-1}else for(y+et>K&&(y=K-et),Me=y;Me>=0;Me--){for(var Y=!0,De=0;De<et;De++)if(ze(u,Me+De)!==ze(p,De)){Y=!1;break}if(Y)return Me}return-1}o.prototype.includes=function(u,p,y){return this.indexOf(u,p,y)!==-1},o.prototype.indexOf=function(u,p,y){return q(this,u,p,y,!0)},o.prototype.lastIndexOf=function(u,p,y){return q(this,u,p,y,!1)};function ct(u,p,y,I){y=Number(y)||0;var L=u.length-y;I?(I=Number(I),I>L&&(I=L)):I=L;var V=p.length;I>V/2&&(I=V/2);for(var K=0;K<I;++K){var et=parseInt(p.substr(K*2,2),16);if(At(et))return K;u[y+K]=et}return K}function j(u,p,y,I){return He(ue(p,u.length-y),u,y,I)}function de(u,p,y,I){return He(Ce(p),u,y,I)}function Q(u,p,y,I){return He(kt(p),u,y,I)}function he(u,p,y,I){return He(Ue(p,u.length-y),u,y,I)}o.prototype.write=function(u,p,y,I){if(p===void 0)I="utf8",y=this.length,p=0;else if(y===void 0&&typeof p=="string")I=p,y=this.length,p=0;else if(isFinite(p))p=p>>>0,isFinite(y)?(y=y>>>0,I===void 0&&(I="utf8")):(I=y,y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var L=this.length-p;if((y===void 0||y>L)&&(y=L),u.length>0&&(y<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");I||(I="utf8");for(var V=!1;;)switch(I){case"hex":return ct(this,u,p,y);case"utf8":case"utf-8":return j(this,u,p,y);case"ascii":case"latin1":case"binary":return de(this,u,p,y);case"base64":return Q(this,u,p,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return he(this,u,p,y);default:if(V)throw new TypeError("Unknown encoding: "+I);I=(""+I).toLowerCase(),V=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ae(u,p,y){return p===0&&y===u.length?c_.fromByteArray(u):c_.fromByteArray(u.slice(p,y))}function ut(u,p,y){y=Math.min(u.length,y);for(var I=[],L=p;L<y;){var V=u[L],K=null,et=V>239?4:V>223?3:V>191?2:1;if(L+et<=y){var ze,Me,dt,Y;switch(et){case 1:V<128&&(K=V);break;case 2:ze=u[L+1],(ze&192)===128&&(Y=(V&31)<<6|ze&63,Y>127&&(K=Y));break;case 3:ze=u[L+1],Me=u[L+2],(ze&192)===128&&(Me&192)===128&&(Y=(V&15)<<12|(ze&63)<<6|Me&63,Y>2047&&(Y<55296||Y>57343)&&(K=Y));break;case 4:ze=u[L+1],Me=u[L+2],dt=u[L+3],(ze&192)===128&&(Me&192)===128&&(dt&192)===128&&(Y=(V&15)<<18|(ze&63)<<12|(Me&63)<<6|dt&63,Y>65535&&Y<1114112&&(K=Y))}}K===null?(K=65533,et=1):K>65535&&(K-=65536,I.push(K>>>10&1023|55296),K=56320|K&1023),I.push(K),L+=et}return v(I)}var lt=4096;function v(u){var p=u.length;if(p<=lt)return String.fromCharCode.apply(String,u);for(var y="",I=0;I<p;)y+=String.fromCharCode.apply(String,u.slice(I,I+=lt));return y}function Ht(u,p,y){var I="";y=Math.min(u.length,y);for(var L=p;L<y;++L)I+=String.fromCharCode(u[L]&127);return I}function Xe(u,p,y){var I="";y=Math.min(u.length,y);for(var L=p;L<y;++L)I+=String.fromCharCode(u[L]);return I}function Yt(u,p,y){var I=u.length;(!p||p<0)&&(p=0),(!y||y<0||y>I)&&(y=I);for(var L="",V=p;V<y;++V)L+=ke[u[V]];return L}function Se(u,p,y){for(var I=u.slice(p,y),L="",V=0;V<I.length-1;V+=2)L+=String.fromCharCode(I[V]+I[V+1]*256);return L}o.prototype.slice=function(u,p){var y=this.length;u=~~u,p=p===void 0?y:~~p,u<0?(u+=y,u<0&&(u=0)):u>y&&(u=y),p<0?(p+=y,p<0&&(p=0)):p>y&&(p=y),p<u&&(p=u);var I=this.subarray(u,p);return Object.setPrototypeOf(I,o.prototype),I};function D(u,p,y){if(u%1!==0||u<0)throw new RangeError("offset is not uint");if(u+p>y)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(u,p,y){u=u>>>0,p=p>>>0,y||D(u,p,this.length);for(var I=this[u],L=1,V=0;++V<p&&(L*=256);)I+=this[u+V]*L;return I},o.prototype.readUintBE=o.prototype.readUIntBE=function(u,p,y){u=u>>>0,p=p>>>0,y||D(u,p,this.length);for(var I=this[u+--p],L=1;p>0&&(L*=256);)I+=this[u+--p]*L;return I},o.prototype.readUint8=o.prototype.readUInt8=function(u,p){return u=u>>>0,p||D(u,1,this.length),this[u]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(u,p){return u=u>>>0,p||D(u,2,this.length),this[u]|this[u+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(u,p){return u=u>>>0,p||D(u,2,this.length),this[u]<<8|this[u+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(u,p){return u=u>>>0,p||D(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(u,p){return u=u>>>0,p||D(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},o.prototype.readIntLE=function(u,p,y){u=u>>>0,p=p>>>0,y||D(u,p,this.length);for(var I=this[u],L=1,V=0;++V<p&&(L*=256);)I+=this[u+V]*L;return L*=128,I>=L&&(I-=Math.pow(2,8*p)),I},o.prototype.readIntBE=function(u,p,y){u=u>>>0,p=p>>>0,y||D(u,p,this.length);for(var I=p,L=1,V=this[u+--I];I>0&&(L*=256);)V+=this[u+--I]*L;return L*=128,V>=L&&(V-=Math.pow(2,8*p)),V},o.prototype.readInt8=function(u,p){return u=u>>>0,p||D(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},o.prototype.readInt16LE=function(u,p){u=u>>>0,p||D(u,2,this.length);var y=this[u]|this[u+1]<<8;return y&32768?y|4294901760:y},o.prototype.readInt16BE=function(u,p){u=u>>>0,p||D(u,2,this.length);var y=this[u+1]|this[u]<<8;return y&32768?y|4294901760:y},o.prototype.readInt32LE=function(u,p){return u=u>>>0,p||D(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},o.prototype.readInt32BE=function(u,p){return u=u>>>0,p||D(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},o.prototype.readFloatLE=function(u,p){return u=u>>>0,p||D(u,4,this.length),Ua.read(this,u,!0,23,4)},o.prototype.readFloatBE=function(u,p){return u=u>>>0,p||D(u,4,this.length),Ua.read(this,u,!1,23,4)},o.prototype.readDoubleLE=function(u,p){return u=u>>>0,p||D(u,8,this.length),Ua.read(this,u,!0,52,8)},o.prototype.readDoubleBE=function(u,p){return u=u>>>0,p||D(u,8,this.length),Ua.read(this,u,!1,52,8)};function T(u,p,y,I,L,V){if(!o.isBuffer(u))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>L||p<V)throw new RangeError('"value" argument is out of bounds');if(y+I>u.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(u,p,y,I){if(u=+u,p=p>>>0,y=y>>>0,!I){var L=Math.pow(2,8*y)-1;T(this,u,p,y,L,0)}var V=1,K=0;for(this[p]=u&255;++K<y&&(V*=256);)this[p+K]=u/V&255;return p+y},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(u,p,y,I){if(u=+u,p=p>>>0,y=y>>>0,!I){var L=Math.pow(2,8*y)-1;T(this,u,p,y,L,0)}var V=y-1,K=1;for(this[p+V]=u&255;--V>=0&&(K*=256);)this[p+V]=u/K&255;return p+y},o.prototype.writeUint8=o.prototype.writeUInt8=function(u,p,y){return u=+u,p=p>>>0,y||T(this,u,p,1,255,0),this[p]=u&255,p+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(u,p,y){return u=+u,p=p>>>0,y||T(this,u,p,2,65535,0),this[p]=u&255,this[p+1]=u>>>8,p+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(u,p,y){return u=+u,p=p>>>0,y||T(this,u,p,2,65535,0),this[p]=u>>>8,this[p+1]=u&255,p+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(u,p,y){return u=+u,p=p>>>0,y||T(this,u,p,4,4294967295,0),this[p+3]=u>>>24,this[p+2]=u>>>16,this[p+1]=u>>>8,this[p]=u&255,p+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(u,p,y){return u=+u,p=p>>>0,y||T(this,u,p,4,4294967295,0),this[p]=u>>>24,this[p+1]=u>>>16,this[p+2]=u>>>8,this[p+3]=u&255,p+4},o.prototype.writeIntLE=function(u,p,y,I){if(u=+u,p=p>>>0,!I){var L=Math.pow(2,8*y-1);T(this,u,p,y,L-1,-L)}var V=0,K=1,et=0;for(this[p]=u&255;++V<y&&(K*=256);)u<0&&et===0&&this[p+V-1]!==0&&(et=1),this[p+V]=(u/K>>0)-et&255;return p+y},o.prototype.writeIntBE=function(u,p,y,I){if(u=+u,p=p>>>0,!I){var L=Math.pow(2,8*y-1);T(this,u,p,y,L-1,-L)}var V=y-1,K=1,et=0;for(this[p+V]=u&255;--V>=0&&(K*=256);)u<0&&et===0&&this[p+V+1]!==0&&(et=1),this[p+V]=(u/K>>0)-et&255;return p+y},o.prototype.writeInt8=function(u,p,y){return u=+u,p=p>>>0,y||T(this,u,p,1,127,-128),u<0&&(u=255+u+1),this[p]=u&255,p+1},o.prototype.writeInt16LE=function(u,p,y){return u=+u,p=p>>>0,y||T(this,u,p,2,32767,-32768),this[p]=u&255,this[p+1]=u>>>8,p+2},o.prototype.writeInt16BE=function(u,p,y){return u=+u,p=p>>>0,y||T(this,u,p,2,32767,-32768),this[p]=u>>>8,this[p+1]=u&255,p+2},o.prototype.writeInt32LE=function(u,p,y){return u=+u,p=p>>>0,y||T(this,u,p,4,2147483647,-2147483648),this[p]=u&255,this[p+1]=u>>>8,this[p+2]=u>>>16,this[p+3]=u>>>24,p+4},o.prototype.writeInt32BE=function(u,p,y){return u=+u,p=p>>>0,y||T(this,u,p,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),this[p]=u>>>24,this[p+1]=u>>>16,this[p+2]=u>>>8,this[p+3]=u&255,p+4};function Z(u,p,y,I,L,V){if(y+I>u.length)throw new RangeError("Index out of range");if(y<0)throw new RangeError("Index out of range")}function ee(u,p,y,I,L){return p=+p,y=y>>>0,L||Z(u,p,y,4),Ua.write(u,p,y,I,23,4),y+4}o.prototype.writeFloatLE=function(u,p,y){return ee(this,u,p,!0,y)},o.prototype.writeFloatBE=function(u,p,y){return ee(this,u,p,!1,y)};function se(u,p,y,I,L){return p=+p,y=y>>>0,L||Z(u,p,y,8),Ua.write(u,p,y,I,52,8),y+8}o.prototype.writeDoubleLE=function(u,p,y){return se(this,u,p,!0,y)},o.prototype.writeDoubleBE=function(u,p,y){return se(this,u,p,!1,y)},o.prototype.copy=function(u,p,y,I){if(!o.isBuffer(u))throw new TypeError("argument should be a Buffer");if(y||(y=0),!I&&I!==0&&(I=this.length),p>=u.length&&(p=u.length),p||(p=0),I>0&&I<y&&(I=y),I===y||u.length===0||this.length===0)return 0;if(p<0)throw new RangeError("targetStart out of bounds");if(y<0||y>=this.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("sourceEnd out of bounds");I>this.length&&(I=this.length),u.length-p<I-y&&(I=u.length-p+y);var L=I-y;return this===u&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(p,y,I):Uint8Array.prototype.set.call(u,this.subarray(y,I),p),L},o.prototype.fill=function(u,p,y,I){if(typeof u=="string"){if(typeof p=="string"?(I=p,p=0,y=this.length):typeof y=="string"&&(I=y,y=this.length),I!==void 0&&typeof I!="string")throw new TypeError("encoding must be a string");if(typeof I=="string"&&!o.isEncoding(I))throw new TypeError("Unknown encoding: "+I);if(u.length===1){var L=u.charCodeAt(0);(I==="utf8"&&L<128||I==="latin1")&&(u=L)}}else typeof u=="number"?u=u&255:typeof u=="boolean"&&(u=Number(u));if(p<0||this.length<p||this.length<y)throw new RangeError("Out of range index");if(y<=p)return this;p=p>>>0,y=y===void 0?this.length:y>>>0,u||(u=0);var V;if(typeof u=="number")for(V=p;V<y;++V)this[V]=u;else{var K=o.isBuffer(u)?u:o.from(u,I),et=K.length;if(et===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(V=0;V<y-p;++V)this[V+p]=K[V%et]}return this};var we=/[^+/0-9A-Za-z-_]/g;function ve(u){if(u=u.split("=")[0],u=u.trim().replace(we,""),u.length<2)return"";for(;u.length%4!==0;)u=u+"=";return u}function ue(u,p){p=p||1/0;for(var y,I=u.length,L=null,V=[],K=0;K<I;++K){if(y=u.charCodeAt(K),y>55295&&y<57344){if(!L){if(y>56319){(p-=3)>-1&&V.push(239,191,189);continue}else if(K+1===I){(p-=3)>-1&&V.push(239,191,189);continue}L=y;continue}if(y<56320){(p-=3)>-1&&V.push(239,191,189),L=y;continue}y=(L-55296<<10|y-56320)+65536}else L&&(p-=3)>-1&&V.push(239,191,189);if(L=null,y<128){if((p-=1)<0)break;V.push(y)}else if(y<2048){if((p-=2)<0)break;V.push(y>>6|192,y&63|128)}else if(y<65536){if((p-=3)<0)break;V.push(y>>12|224,y>>6&63|128,y&63|128)}else if(y<1114112){if((p-=4)<0)break;V.push(y>>18|240,y>>12&63|128,y>>6&63|128,y&63|128)}else throw new Error("Invalid code point")}return V}function Ce(u){for(var p=[],y=0;y<u.length;++y)p.push(u.charCodeAt(y)&255);return p}function Ue(u,p){for(var y,I,L,V=[],K=0;K<u.length&&!((p-=2)<0);++K)y=u.charCodeAt(K),I=y>>8,L=y%256,V.push(L),V.push(I);return V}function kt(u){return c_.toByteArray(ve(u))}function He(u,p,y,I){for(var L=0;L<I&&!(L+y>=p.length||L>=u.length);++L)p[L+y]=u[L];return L}function Ye(u,p){return u instanceof p||u!=null&&u.constructor!=null&&u.constructor.name!=null&&u.constructor.name===p.name}function At(u){return u!==u}var ke=function(){for(var u="0123456789abcdef",p=new Array(256),y=0;y<16;++y)for(var I=y*16,L=0;L<16;++L)p[I+L]=u[y]+u[L];return p}()}),st=qf.Buffer;qf.SlowBuffer;qf.INSPECT_MAX_BYTES;qf.kMaxLength;var p_=function(e,t){return p_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},p_(e,t)};function Yf(e,t){p_(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Cs=function(e){Yf(t,e);function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return Object.defineProperty(t.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),t}(Error),Ut=function(e){Yf(t,e);function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return Object.defineProperty(t.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),t}(TypeError);function Gf(e){return e&&e.Math==Math&&e}function tT(){return Gf(typeof globalThis=="object"&&globalThis)||Gf(typeof window=="object"&&window)||Gf(typeof self=="object"&&self)||Gf(typeof global=="object"&&global)||Function("return this")()}function T2(){var e=tT();return typeof e.navigator=="object"&&e.navigator.product==="ReactNative"}var x2=function(e){var t=T2()?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(t);for(var n=st.alloc(e),r=0;r<e;++r)n[r]=Math.floor(Math.random()*256);return n},R2=function(){{if(typeof window<"u"){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues)return function(t){return e.getRandomValues(st.alloc(t))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(t){return global.crypto.getRandomValues(st.alloc(t))}:x2}},nT=R2();function N2(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function m_(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function A2(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function M2(e){return Il(e)&&Object.prototype.toString.call(e)==="[object Date]"}function Il(e){return typeof e=="object"&&e!==null}function Kf(e,t){var n=!1;function r(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return n||(console.warn(t),n=!0),e.apply(this,i)}return r}function zf(e){if(ArrayBuffer.isView(e))return st.from(e.buffer,e.byteOffset,e.byteLength);if(N2(e))return st.from(e);throw new Ut("Must use either Buffer or TypedArray")}var O2=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,rT=function(e){return typeof e=="string"&&O2.test(e)},h_=function(e){if(!rT(e))throw new Ut('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var t=e.replace(/-/g,"");return st.from(t,"hex")},VI=function(e,t){return t===void 0&&(t=!0),t?e.toString("hex",0,4)+"-"+e.toString("hex",4,6)+"-"+e.toString("hex",6,8)+"-"+e.toString("hex",8,10)+"-"+e.toString("hex",10,16):e.toString("hex")},XK=Math.pow(2,63)-1,JK=-Math.pow(2,63),P2=Math.pow(2,53),k2=-Math.pow(2,53),iT=4,Ss=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);if(t!=null&&typeof t!="string"&&!ArrayBuffer.isView(t)&&!(t instanceof ArrayBuffer)&&!Array.isArray(t))throw new Ut("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=n??e.BSON_BINARY_SUBTYPE_DEFAULT,t==null?(this.buffer=st.alloc(e.BUFFER_SIZE),this.position=0):(typeof t=="string"?this.buffer=st.from(t,"binary"):Array.isArray(t)?this.buffer=st.from(t):this.buffer=zf(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if(typeof t=="string"&&t.length!==1)throw new Ut("only accepts single character String");if(typeof t!="number"&&t.length!==1)throw new Ut("only accepts single character Uint8Array or Array");var n;if(typeof t=="string"?n=t.charCodeAt(0):typeof t=="number"?n=t:n=t[0],n<0||n>255)throw new Ut("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=n;else{var r=st.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r,this.buffer[this.position++]=n}},e.prototype.write=function(t,n){if(n=typeof n=="number"?n:this.position,this.buffer.length<n+t.length){var r=st.alloc(this.buffer.length+t.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(t)?(this.buffer.set(zf(t),n),this.position=n+t.byteLength>this.position?n+t.length:this.position):typeof t=="string"&&(this.buffer.write(t,n,t.length,"binary"),this.position=n+t.length>this.position?n+t.length:this.position)},e.prototype.read=function(t,n){return n=n&&n>0?n:this.position,this.buffer.slice(t,t+n)},e.prototype.value=function(t){return t=!!t,t&&this.buffer.length===this.position?this.buffer:t?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},e.prototype.length=function(){return this.position},e.prototype.toJSON=function(){return this.buffer.toString("base64")},e.prototype.toString=function(t){return this.buffer.toString(t)},e.prototype.toExtendedJSON=function(t){t=t||{};var n=this.buffer.toString("base64"),r=Number(this.sub_type).toString(16);return t.legacy?{$binary:n,$type:r.length===1?"0"+r:r}:{$binary:{base64:n,subType:r.length===1?"0"+r:r}}},e.prototype.toUUID=function(){if(this.sub_type===e.SUBTYPE_UUID)return new UI(this.buffer.slice(0,this.position));throw new Cs('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(e.SUBTYPE_UUID,'" is currently supported.'))},e.fromExtendedJSON=function(t,n){n=n||{};var r,i;if("$binary"in t?n.legacy&&typeof t.$binary=="string"&&"$type"in t?(i=t.$type?parseInt(t.$type,16):0,r=st.from(t.$binary,"base64")):typeof t.$binary!="string"&&(i=t.$binary.subType?parseInt(t.$binary.subType,16):0,r=st.from(t.$binary.base64,"base64")):"$uuid"in t&&(i=4,r=h_(t.$uuid)),!r)throw new Ut("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return i===iT?new UI(r):new e(r,i)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.value(!0);return'new Binary(Buffer.from("'.concat(t.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},e.BSON_BINARY_SUBTYPE_DEFAULT=0,e.BUFFER_SIZE=256,e.SUBTYPE_DEFAULT=0,e.SUBTYPE_FUNCTION=1,e.SUBTYPE_BYTE_ARRAY=2,e.SUBTYPE_UUID_OLD=3,e.SUBTYPE_UUID=4,e.SUBTYPE_MD5=5,e.SUBTYPE_ENCRYPTED=6,e.SUBTYPE_COLUMN=7,e.SUBTYPE_USER_DEFINED=128,e}();Object.defineProperty(Ss.prototype,"_bsontype",{value:"Binary"});var l_=16,UI=function(e){Yf(t,e);function t(n){var r=this,i,s;if(n==null)i=t.generate();else if(n instanceof t)i=st.from(n.buffer),s=n.__id;else if(ArrayBuffer.isView(n)&&n.byteLength===l_)i=zf(n);else if(typeof n=="string")i=h_(n);else throw new Ut("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");return r=e.call(this,i,iT)||this,r.__id=s,r}return Object.defineProperty(t.prototype,"id",{get:function(){return this.buffer},set:function(n){this.buffer=n,t.cacheHexString&&(this.__id=VI(n))},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(n){if(n===void 0&&(n=!0),t.cacheHexString&&this.__id)return this.__id;var r=VI(this.id,n);return t.cacheHexString&&(this.__id=r),r},t.prototype.toString=function(n){return n?this.id.toString(n):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(n){if(!n)return!1;if(n instanceof t)return n.id.equals(this.id);try{return new t(n).id.equals(this.id)}catch{return!1}},t.prototype.toBinary=function(){return new Ss(this.id,Ss.SUBTYPE_UUID)},t.generate=function(){var n=nT(l_);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,st.from(n)},t.isValid=function(n){return n?n instanceof t?!0:typeof n=="string"?rT(n):m_(n)?n.length!==l_?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},t.createFromHexString=function(n){var r=h_(n);return new t(r)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},t}(Ss),Zf=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);this.code=t,this.scope=n}return e.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},e.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},e.fromExtendedJSON=function(t){return new e(t.$code,t.$scope)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.toJSON();return'new Code("'.concat(String(t.code),'"').concat(t.scope?", ".concat(JSON.stringify(t.scope)):"",")")},e}();Object.defineProperty(Zf.prototype,"_bsontype",{value:"Code"});function L2(e){return Il(e)&&e.$id!=null&&typeof e.$ref=="string"&&(e.$db==null||typeof e.$db=="string")}var Sl=function(){function e(t,n,r,i){if(!(this instanceof e))return new e(t,n,r,i);var s=t.split(".");s.length===2&&(r=s.shift(),t=s.shift()),this.collection=t,this.oid=n,this.db=r,this.fields=i||{}}return Object.defineProperty(e.prototype,"namespace",{get:function(){return this.collection},set:function(t){this.collection=t},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){var t=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(t.$db=this.db),t},e.prototype.toExtendedJSON=function(t){t=t||{};var n={$ref:this.collection,$id:this.oid};return t.legacy||(this.db&&(n.$db=this.db),n=Object.assign(n,this.fields)),n},e.fromExtendedJSON=function(t){var n=Object.assign({},t);return delete n.$ref,delete n.$id,delete n.$db,new e(t.$ref,t.$id,t.$db,n)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.oid===void 0||this.oid.toString===void 0?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(t),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},e}();Object.defineProperty(Sl.prototype,"_bsontype",{value:"DBRef"});var Cr=void 0;try{Cr=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}var HI=65536,F2=1<<24,ja=HI*HI,oT=ja*ja,jI=oT/2,$I={},WI={},ce=function(){function e(t,n,r){if(t===void 0&&(t=0),!(this instanceof e))return new e(t,n,r);typeof t=="bigint"?Object.assign(this,e.fromBigInt(t,!!n)):typeof t=="string"?Object.assign(this,e.fromString(t,!!n)):(this.low=t|0,this.high=n|0,this.unsigned=!!r),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return e.fromBits=function(t,n,r){return new e(t,n,r)},e.fromInt=function(t,n){var r,i,s;return n?(t>>>=0,(s=0<=t&&t<256)&&(i=WI[t],i)?i:(r=e.fromBits(t,(t|0)<0?-1:0,!0),s&&(WI[t]=r),r)):(t|=0,(s=-128<=t&&t<128)&&(i=$I[t],i)?i:(r=e.fromBits(t,t<0?-1:0,!1),s&&($I[t]=r),r))},e.fromNumber=function(t,n){if(isNaN(t))return n?e.UZERO:e.ZERO;if(n){if(t<0)return e.UZERO;if(t>=oT)return e.MAX_UNSIGNED_VALUE}else{if(t<=-jI)return e.MIN_VALUE;if(t+1>=jI)return e.MAX_VALUE}return t<0?e.fromNumber(-t,n).neg():e.fromBits(t%ja|0,t/ja|0,n)},e.fromBigInt=function(t,n){return e.fromString(t.toString(),n)},e.fromString=function(t,n,r){if(t.length===0)throw Error("empty string");if(t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return e.ZERO;if(typeof n=="number"?(r=n,n=!1):n=!!n,r=r||10,r<2||36<r)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(i===0)return e.fromString(t.substring(1),n,r).neg();for(var s=e.fromNumber(Math.pow(r,8)),o=e.ZERO,a=0;a<t.length;a+=8){var l=Math.min(8,t.length-a),c=parseInt(t.substring(a,a+l),r);if(l<8){var h=e.fromNumber(Math.pow(r,l));o=o.mul(h).add(e.fromNumber(c))}else o=o.mul(s),o=o.add(e.fromNumber(c))}return o.unsigned=n,o},e.fromBytes=function(t,n,r){return r?e.fromBytesLE(t,n):e.fromBytesBE(t,n)},e.fromBytesLE=function(t,n){return new e(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},e.fromBytesBE=function(t,n){return new e(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)},e.isLong=function(t){return Il(t)&&t.__isLong__===!0},e.fromValue=function(t,n){return typeof t=="number"?e.fromNumber(t,n):typeof t=="string"?e.fromString(t,n):e.fromBits(t.low,t.high,typeof n=="boolean"?n:t.unsigned)},e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,s=this.low&65535,o=t.high>>>16,a=t.high&65535,l=t.low>>>16,c=t.low&65535,h=0,d=0,f=0,g=0;return g+=s+c,f+=g>>>16,g&=65535,f+=i+l,d+=f>>>16,f&=65535,d+=r+a,h+=d>>>16,d&=65535,h+=n+o,h&=65535,e.fromBits(f<<16|g,h<<16|d,this.unsigned)},e.prototype.and=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low&t.low,this.high&t.high,this.unsigned)},e.prototype.compare=function(t){if(e.isLong(t)||(t=e.fromValue(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},e.prototype.comp=function(t){return this.compare(t)},e.prototype.divide=function(t){if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())throw Error("division by zero");if(Cr){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var n=(this.unsigned?Cr.div_u:Cr.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,Cr.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var r,i,s;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;s=e.UZERO}else{if(this.eq(e.MIN_VALUE)){if(t.eq(e.ONE)||t.eq(e.NEG_ONE))return e.MIN_VALUE;if(t.eq(e.MIN_VALUE))return e.ONE;var o=this.shr(1);return r=o.div(t).shl(1),r.eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(i=this.sub(t.mul(r)),s=r.add(i.div(t)),s)}else if(t.eq(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();s=e.ZERO}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),l=a<=48?1:Math.pow(2,a-48),c=e.fromNumber(r),h=c.mul(t);h.isNegative()||h.gt(i);)r-=l,c=e.fromNumber(r,this.unsigned),h=c.mul(t);c.isZero()&&(c=e.ONE),s=s.add(c),i=i.sub(h)}return s},e.prototype.div=function(t){return this.divide(t)},e.prototype.equals=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low},e.prototype.eq=function(t){return this.equals(t)},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(e.MIN_VALUE)?64:this.neg().getNumBitsAbs();var t=this.high!==0?this.high:this.low,n;for(n=31;n>0&&(t&1<<n)===0;n--);return this.high!==0?n+33:n+1},e.prototype.greaterThan=function(t){return this.comp(t)>0},e.prototype.gt=function(t){return this.greaterThan(t)},e.prototype.greaterThanOrEqual=function(t){return this.comp(t)>=0},e.prototype.gte=function(t){return this.greaterThanOrEqual(t)},e.prototype.ge=function(t){return this.greaterThanOrEqual(t)},e.prototype.isEven=function(){return(this.low&1)===0},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isOdd=function(){return(this.low&1)===1},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isZero=function(){return this.high===0&&this.low===0},e.prototype.lessThan=function(t){return this.comp(t)<0},e.prototype.lt=function(t){return this.lessThan(t)},e.prototype.lessThanOrEqual=function(t){return this.comp(t)<=0},e.prototype.lte=function(t){return this.lessThanOrEqual(t)},e.prototype.modulo=function(t){if(e.isLong(t)||(t=e.fromValue(t)),Cr){var n=(this.unsigned?Cr.rem_u:Cr.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,Cr.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},e.prototype.mod=function(t){return this.modulo(t)},e.prototype.rem=function(t){return this.modulo(t)},e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;if(e.isLong(t)||(t=e.fromValue(t)),Cr){var n=Cr.mul(this.low,this.high,t.low,t.high);return e.fromBits(n,Cr.get_high(),this.unsigned)}if(t.isZero())return e.ZERO;if(this.eq(e.MIN_VALUE))return t.isOdd()?e.MIN_VALUE:e.ZERO;if(t.eq(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(e.TWO_PWR_24)&&t.lt(e.TWO_PWR_24))return e.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,s=this.low>>>16,o=this.low&65535,a=t.high>>>16,l=t.high&65535,c=t.low>>>16,h=t.low&65535,d=0,f=0,g=0,m=0;return m+=o*h,g+=m>>>16,m&=65535,g+=s*h,f+=g>>>16,g&=65535,g+=o*c,f+=g>>>16,g&=65535,f+=i*h,d+=f>>>16,f&=65535,f+=s*c,d+=f>>>16,f&=65535,f+=o*l,d+=f>>>16,f&=65535,d+=r*h+i*c+s*l+o*a,d&=65535,e.fromBits(g<<16|m,d<<16|f,this.unsigned)},e.prototype.mul=function(t){return this.multiply(t)},e.prototype.negate=function(){return!this.unsigned&&this.eq(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=function(){return this.negate()},e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.notEquals=function(t){return!this.equals(t)},e.prototype.neq=function(t){return this.notEquals(t)},e.prototype.ne=function(t){return this.notEquals(t)},e.prototype.or=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low|t.low,this.high|t.high,this.unsigned)},e.prototype.shiftLeft=function(t){return e.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?e.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):e.fromBits(0,this.low<<t-32,this.unsigned)},e.prototype.shl=function(t){return this.shiftLeft(t)},e.prototype.shiftRight=function(t){return e.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?e.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):e.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=function(t){return this.shiftRight(t)},e.prototype.shiftRightUnsigned=function(t){if(e.isLong(t)&&(t=t.toInt()),t&=63,t===0)return this;var n=this.high;if(t<32){var r=this.low;return e.fromBits(r>>>t|n<<32-t,n>>>t,this.unsigned)}else return t===32?e.fromBits(n,0,this.unsigned):e.fromBits(n>>>t-32,0,this.unsigned)},e.prototype.shr_u=function(t){return this.shiftRightUnsigned(t)},e.prototype.shru=function(t){return this.shiftRightUnsigned(t)},e.prototype.subtract=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.add(t.neg())},e.prototype.sub=function(t){return this.subtract(t)},e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*ja+(this.low>>>0):this.high*ja+(this.low>>>0)},e.prototype.toBigInt=function(){return BigInt(this.toString())},e.prototype.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},e.prototype.toBytesLE=function(){var t=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]},e.prototype.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,n>>>24,n>>>16&255,n>>>8&255,n&255]},e.prototype.toSigned=function(){return this.unsigned?e.fromBits(this.low,this.high,!1):this},e.prototype.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(e.MIN_VALUE)){var n=e.fromNumber(t),r=this.div(n),i=r.mul(n).sub(this);return r.toString(t)+i.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var s=e.fromNumber(Math.pow(t,6),this.unsigned),o=this,a="";;){var l=o.div(s),c=o.sub(l.mul(s)).toInt()>>>0,h=c.toString(t);if(o=l,o.isZero())return h+a;for(;h.length<6;)h="0"+h;a=""+h+a}},e.prototype.toUnsigned=function(){return this.unsigned?this:e.fromBits(this.low,this.high,!0)},e.prototype.xor=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low^t.low,this.high^t.high,this.unsigned)},e.prototype.eqz=function(){return this.isZero()},e.prototype.le=function(t){return this.lessThanOrEqual(t)},e.prototype.toExtendedJSON=function(t){return t&&t.relaxed?this.toNumber():{$numberLong:this.toString()}},e.fromExtendedJSON=function(t,n){var r=e.fromString(t.$numberLong);return n&&n.relaxed?r.toNumber():r},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},e.TWO_PWR_24=e.fromInt(F2),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e}();Object.defineProperty(ce.prototype,"__isLong__",{value:!0});Object.defineProperty(ce.prototype,"_bsontype",{value:"Long"});var B2=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,V2=/^(\+|-)?(Infinity|inf)$/i,U2=/^(\+|-)?NaN$/i,Cl=6111,u_=-6176,GI=6176,H2=34,d_=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),zI=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),qI=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),j2=/^([-+])?(\d+)?$/,$2=31,YI=16383,W2=30,G2=31;function KI(e){return!isNaN(parseInt(e,10))}function z2(e){var t=ce.fromNumber(1e9),n=ce.fromNumber(0);if(!e.parts[0]&&!e.parts[1]&&!e.parts[2]&&!e.parts[3])return{quotient:e,rem:n};for(var r=0;r<=3;r++)n=n.shiftLeft(32),n=n.add(new ce(e.parts[r],0)),e.parts[r]=n.div(t).low,n=n.modulo(t);return{quotient:e,rem:n}}function q2(e,t){if(!e&&!t)return{high:ce.fromNumber(0),low:ce.fromNumber(0)};var n=e.shiftRightUnsigned(32),r=new ce(e.getLowBits(),0),i=t.shiftRightUnsigned(32),s=new ce(t.getLowBits(),0),o=n.multiply(i),a=n.multiply(s),l=r.multiply(i),c=r.multiply(s);return o=o.add(a.shiftRightUnsigned(32)),a=new ce(a.getLowBits(),0).add(l).add(c.shiftRightUnsigned(32)),o=o.add(a.shiftRightUnsigned(32)),c=a.shiftLeft(32).add(new ce(c.getLowBits(),0)),{high:o,low:c}}function Y2(e,t){var n=e.high>>>0,r=t.high>>>0;if(n<r)return!0;if(n===r){var i=e.low>>>0,s=t.low>>>0;if(i<s)return!0}return!1}function Ha(e,t){throw new Ut('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var g_=function(){function e(t){if(!(this instanceof e))return new e(t);if(typeof t=="string")this.bytes=e.fromString(t).bytes;else if(m_(t)){if(t.byteLength!==16)throw new Ut("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}else throw new Ut("Decimal128 must take a Buffer or string")}return e.fromString=function(t){var n=!1,r=!1,i=!1,s=0,o=0,a=0,l=0,c=0,h=[0],d=0,f=0,g=0,m=0,b=0,x=0,A=new ce(0,0),F=new ce(0,0),U=0,M=0;if(t.length>=7e3)throw new Ut(""+t+" not a valid Decimal128 string");var q=t.match(B2),Pe=t.match(V2),ct=t.match(U2);if(!q&&!Pe&&!ct||t.length===0)throw new Ut(""+t+" not a valid Decimal128 string");if(q){var j=q[2],de=q[4],Q=q[5],he=q[6];de&&he===void 0&&Ha(t,"missing exponent power"),de&&j===void 0&&Ha(t,"missing exponent base"),de===void 0&&(Q||he)&&Ha(t,"missing e before exponent")}if((t[M]==="+"||t[M]==="-")&&(n=t[M++]==="-"),!KI(t[M])&&t[M]!=="."){if(t[M]==="i"||t[M]==="I")return new e(st.from(n?zI:qI));if(t[M]==="N")return new e(st.from(d_))}for(;KI(t[M])||t[M]===".";){if(t[M]==="."){r&&Ha(t,"contains multiple periods"),r=!0,M=M+1;continue}d<34&&(t[M]!=="0"||i)&&(i||(c=o),i=!0,h[f++]=parseInt(t[M],10),d=d+1),i&&(a=a+1),r&&(l=l+1),o=o+1,M=M+1}if(r&&!o)throw new Ut(""+t+" not a valid Decimal128 string");if(t[M]==="e"||t[M]==="E"){var Ae=t.substr(++M).match(j2);if(!Ae||!Ae[2])return new e(st.from(d_));b=parseInt(Ae[0],10),M=M+Ae[0].length}if(t[M])return new e(st.from(d_));if(g=0,!d)g=0,m=0,h[0]=0,a=1,d=1,s=0;else if(m=d-1,s=a,s!==1)for(;h[c+s-1]===0;)s=s-1;for(b<=l&&l-b>16384?b=u_:b=b-l;b>Cl;){if(m=m+1,m-g>H2){var ut=h.join("");if(ut.match(/^0+$/)){b=Cl;break}Ha(t,"overflow")}b=b-1}for(;b<u_||d<a;){if(m===0&&s<d){b=u_,s=0;break}if(d<a?a=a-1:m=m-1,b<Cl)b=b+1;else{var ut=h.join("");if(ut.match(/^0+$/)){b=Cl;break}Ha(t,"overflow")}}if(m-g+1<s){var lt=o;r&&(c=c+1,lt=lt+1),n&&(c=c+1,lt=lt+1);var v=parseInt(t[c+m+1],10),Ht=0;if(v>=5&&(Ht=1,v===5)){for(Ht=h[m]%2===1?1:0,x=c+m+2;x<lt;x++)if(parseInt(t[x],10)){Ht=1;break}}if(Ht){for(var Xe=m;Xe>=0;Xe--)if(++h[Xe]>9&&(h[Xe]=0,Xe===0))if(b<Cl)b=b+1,h[Xe]=1;else return new e(st.from(n?zI:qI))}}if(A=ce.fromNumber(0),F=ce.fromNumber(0),s===0)A=ce.fromNumber(0),F=ce.fromNumber(0);else if(m-g<17){var Xe=g;for(F=ce.fromNumber(h[Xe++]),A=new ce(0,0);Xe<=m;Xe++)F=F.multiply(ce.fromNumber(10)),F=F.add(ce.fromNumber(h[Xe]))}else{var Xe=g;for(A=ce.fromNumber(h[Xe++]);Xe<=m-17;Xe++)A=A.multiply(ce.fromNumber(10)),A=A.add(ce.fromNumber(h[Xe]));for(F=ce.fromNumber(h[Xe++]);Xe<=m;Xe++)F=F.multiply(ce.fromNumber(10)),F=F.add(ce.fromNumber(h[Xe]))}var Yt=q2(A,ce.fromString("100000000000000000"));Yt.low=Yt.low.add(F),Y2(Yt.low,F)&&(Yt.high=Yt.high.add(ce.fromNumber(1))),U=b+GI;var Se={low:ce.fromNumber(0),high:ce.fromNumber(0)};Yt.high.shiftRightUnsigned(49).and(ce.fromNumber(1)).equals(ce.fromNumber(1))?(Se.high=Se.high.or(ce.fromNumber(3).shiftLeft(61)),Se.high=Se.high.or(ce.fromNumber(U).and(ce.fromNumber(16383).shiftLeft(47))),Se.high=Se.high.or(Yt.high.and(ce.fromNumber(0x7fffffffffff)))):(Se.high=Se.high.or(ce.fromNumber(U&16383).shiftLeft(49)),Se.high=Se.high.or(Yt.high.and(ce.fromNumber(562949953421311)))),Se.low=Yt.low,n&&(Se.high=Se.high.or(ce.fromString("9223372036854775808")));var D=st.alloc(16);return M=0,D[M++]=Se.low.low&255,D[M++]=Se.low.low>>8&255,D[M++]=Se.low.low>>16&255,D[M++]=Se.low.low>>24&255,D[M++]=Se.low.high&255,D[M++]=Se.low.high>>8&255,D[M++]=Se.low.high>>16&255,D[M++]=Se.low.high>>24&255,D[M++]=Se.high.low&255,D[M++]=Se.high.low>>8&255,D[M++]=Se.high.low>>16&255,D[M++]=Se.high.low>>24&255,D[M++]=Se.high.high&255,D[M++]=Se.high.high>>8&255,D[M++]=Se.high.high>>16&255,D[M++]=Se.high.high>>24&255,new e(D)},e.prototype.toString=function(){for(var t,n=0,r=new Array(36),i=0;i<r.length;i++)r[i]=0;var s=0,o=!1,a,l={parts:[0,0,0,0]},c,h,d=[];s=0;var f=this.bytes,g=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24,m=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24,b=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24,x=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24;s=0;var A={low:new ce(g,m),high:new ce(b,x)};A.high.lessThan(ce.ZERO)&&d.push("-");var F=x>>26&$2;if(F>>3===3){if(F===W2)return d.join("")+"Infinity";if(F===G2)return"NaN";t=x>>15&YI,a=8+(x>>14&1)}else a=x>>14&7,t=x>>17&YI;var U=t-GI;if(l.parts[0]=(x&16383)+((a&15)<<14),l.parts[1]=b,l.parts[2]=m,l.parts[3]=g,l.parts[0]===0&&l.parts[1]===0&&l.parts[2]===0&&l.parts[3]===0)o=!0;else for(h=3;h>=0;h--){var M=0,q=z2(l);if(l=q.quotient,M=q.rem.low,!!M)for(c=8;c>=0;c--)r[h*9+c]=M%10,M=Math.floor(M/10)}if(o)n=1,r[s]=0;else for(n=36;!r[s];)n=n-1,s=s+1;var Pe=n-1+U;if(Pe>=34||Pe<=-7||U>0){if(n>34)return d.push("".concat(0)),U>0?d.push("E+".concat(U)):U<0&&d.push("E".concat(U)),d.join("");d.push("".concat(r[s++])),n=n-1,n&&d.push(".");for(var i=0;i<n;i++)d.push("".concat(r[s++]));d.push("E"),Pe>0?d.push("+".concat(Pe)):d.push("".concat(Pe))}else if(U>=0)for(var i=0;i<n;i++)d.push("".concat(r[s++]));else{var ct=n+U;if(ct>0)for(var i=0;i<ct;i++)d.push("".concat(r[s++]));else d.push("0");for(d.push(".");ct++<0;)d.push("0");for(var i=0;i<n-Math.max(ct-1,0);i++)d.push("".concat(r[s++]))}return d.join("")},e.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},e.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},e.fromExtendedJSON=function(t){return e.fromString(t.$numberDecimal)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},e}();Object.defineProperty(g_.prototype,"_bsontype",{value:"Decimal128"});var Xf=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toJSON=function(){return this.value},e.prototype.toString=function(t){return this.value.toString(t)},e.prototype.toExtendedJSON=function(t){return t&&(t.legacy||t.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}},e.fromExtendedJSON=function(t,n){var r=parseFloat(t.$numberDouble);return n&&n.relaxed?r:new e(r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.toExtendedJSON();return"new Double(".concat(t.$numberDouble,")")},e}();Object.defineProperty(Xf.prototype,"_bsontype",{value:"Double"});var Jf=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t|0}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(t){return this.value.toString(t)},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(t){return t&&(t.relaxed||t.legacy)?this.value:{$numberInt:this.value.toString()}},e.fromExtendedJSON=function(t,n){return n&&n.relaxed?parseInt(t.$numberInt,10):new e(t.$numberInt)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},e}();Object.defineProperty(Jf.prototype,"_bsontype",{value:"Int32"});var y_=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$maxKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MaxKey()"},e}();Object.defineProperty(y_.prototype,"_bsontype",{value:"MaxKey"});var v_=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$minKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MinKey()"},e}();Object.defineProperty(v_.prototype,"_bsontype",{value:"MinKey"});var K2=new RegExp("^[0-9a-fA-F]{24}$"),bs=null,fi=Symbol("id"),un=function(){function e(t){if(!(this instanceof e))return new e(t);var n;if(typeof t=="object"&&t&&"id"in t){if(typeof t.id!="string"&&!ArrayBuffer.isView(t.id))throw new Ut("Argument passed in must have an id that is of type string or Buffer");"toHexString"in t&&typeof t.toHexString=="function"?n=st.from(t.toHexString(),"hex"):n=t.id}else n=t;if(n==null||typeof n=="number")this[fi]=e.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)this[fi]=n instanceof st?n:zf(n);else if(typeof n=="string")if(n.length===12){var r=st.from(n);if(r.byteLength===12)this[fi]=r;else throw new Ut("Argument passed in must be a string of 12 bytes")}else if(n.length===24&&K2.test(n))this[fi]=st.from(n,"hex");else throw new Ut("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new Ut("Argument passed in does not match the accepted types");e.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(e.prototype,"id",{get:function(){return this[fi]},set:function(t){this[fi]=t,e.cacheHexString&&(this.__id=t.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(t){this.id.writeUInt32BE(t,0)},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(){if(e.cacheHexString&&this.__id)return this.__id;var t=this.id.toString("hex");return e.cacheHexString&&!this.__id&&(this.__id=t),t},e.getInc=function(){return e.index=(e.index+1)%16777215},e.generate=function(t){typeof t!="number"&&(t=Math.floor(Date.now()/1e3));var n=e.getInc(),r=st.alloc(12);return r.writeUInt32BE(t,0),bs===null&&(bs=nT(5)),r[4]=bs[0],r[5]=bs[1],r[6]=bs[2],r[7]=bs[3],r[8]=bs[4],r[11]=n&255,r[10]=n>>8&255,r[9]=n>>16&255,r},e.prototype.toString=function(t){return t?this.id.toString(t):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(t){if(t==null)return!1;if(t instanceof e)return this[fi][11]===t[fi][11]&&this[fi].equals(t[fi]);if(typeof t=="string"&&e.isValid(t)&&t.length===12&&m_(this.id))return t===st.prototype.toString.call(this.id,"latin1");if(typeof t=="string"&&e.isValid(t)&&t.length===24)return t.toLowerCase()===this.toHexString();if(typeof t=="string"&&e.isValid(t)&&t.length===12)return st.from(t).equals(this.id);if(typeof t=="object"&&"toHexString"in t&&typeof t.toHexString=="function"){var n=t.toHexString(),r=this.toHexString().toLowerCase();return typeof n=="string"&&n.toLowerCase()===r}return!1},e.prototype.getTimestamp=function(){var t=new Date,n=this.id.readUInt32BE(0);return t.setTime(Math.floor(n)*1e3),t},e.createPk=function(){return new e},e.createFromTime=function(t){var n=st.from([0,0,0,0,0,0,0,0,0,0,0,0]);return n.writeUInt32BE(t,0),new e(n)},e.createFromHexString=function(t){if(typeof t>"u"||t!=null&&t.length!==24)throw new Ut("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(st.from(t,"hex"))},e.isValid=function(t){if(t==null)return!1;try{return new e(t),!0}catch{return!1}},e.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},e.fromExtendedJSON=function(t){return new e(t.$oid)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},e.index=Math.floor(Math.random()*16777215),e}();Object.defineProperty(un.prototype,"generate",{value:Kf(function(e){return un.generate(e)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(un.prototype,"getInc",{value:Kf(function(){return un.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(un.prototype,"get_inc",{value:Kf(function(){return un.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(un,"get_inc",{value:Kf(function(){return un.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(un.prototype,"_bsontype",{value:"ObjectID"});function Z2(e){return e.split("").sort().join("")}var Dl=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);if(this.pattern=t,this.options=Z2(n??""),this.pattern.indexOf("\0")!==-1)throw new Cs("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new Cs("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var r=0;r<this.options.length;r++)if(!(this.options[r]==="i"||this.options[r]==="m"||this.options[r]==="x"||this.options[r]==="l"||this.options[r]==="s"||this.options[r]==="u"))throw new Cs("The regular expression option [".concat(this.options[r],"] is not supported"))}return e.parseOptions=function(t){return t?t.split("").sort().join(""):""},e.prototype.toExtendedJSON=function(t){return t=t||{},t.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},e.fromExtendedJSON=function(t){if("$regex"in t)if(typeof t.$regex!="string"){if(t.$regex._bsontype==="BSONRegExp")return t}else return new e(t.$regex,e.parseOptions(t.$options));if("$regularExpression"in t)return new e(t.$regularExpression.pattern,e.parseOptions(t.$regularExpression.options));throw new Ut("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(Dl.prototype,"_bsontype",{value:"BSONRegExp"});var __=function(){function e(t){if(!(this instanceof e))return new e(t);this.value=t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(){return this.value},e.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(){return{$symbol:this.value}},e.fromExtendedJSON=function(t){return new e(t.$symbol)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e}();Object.defineProperty(__.prototype,"_bsontype",{value:"Symbol"});var X2=ce,sT=function(e){Yf(t,e);function t(n,r){var i=this;return i instanceof t?(ce.isLong(n)?i=e.call(this,n.low,n.high,!0)||this:Il(n)&&typeof n.t<"u"&&typeof n.i<"u"?i=e.call(this,n.i,n.t,!0)||this:i=e.call(this,n,r,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new t(n,r)}return t.prototype.toJSON=function(){return{$timestamp:this.toString()}},t.fromInt=function(n){return new t(ce.fromInt(n,!0))},t.fromNumber=function(n){return new t(ce.fromNumber(n,!0))},t.fromBits=function(n,r){return new t(n,r)},t.fromString=function(n,r){return new t(ce.fromString(n,!0,r))},t.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},t.fromExtendedJSON=function(n){return new t(n.$timestamp)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},t.MAX_VALUE=ce.MAX_UNSIGNED_VALUE,t}(X2);function J2(e){return Il(e)&&Reflect.has(e,"_bsontype")&&typeof e._bsontype=="string"}var aT=2147483647,cT=-2147483648,lT=9223372036854776e3,uT=-9223372036854776e3,Q2={$oid:un,$binary:Ss,$uuid:Ss,$symbol:__,$numberInt:Jf,$numberDecimal:g_,$numberDouble:Xf,$numberLong:ce,$minKey:v_,$maxKey:y_,$regex:Dl,$regularExpression:Dl,$timestamp:sT};function dT(e,t){if(t===void 0&&(t={}),typeof e=="number"){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=cT&&e<=aT)return new Jf(e);if(e>=uT&&e<=lT)return ce.fromNumber(e)}return new Xf(e)}if(e==null||typeof e!="object")return e;if(e.$undefined)return null;for(var n=Object.keys(e).filter(function(d){return d.startsWith("$")&&e[d]!=null}),r=0;r<n.length;r++){var i=Q2[n[r]];if(i)return i.fromExtendedJSON(e,t)}if(e.$date!=null){var s=e.$date,o=new Date;return t.legacy?typeof s=="number"?o.setTime(s):typeof s=="string"&&o.setTime(Date.parse(s)):typeof s=="string"?o.setTime(Date.parse(s)):ce.isLong(s)?o.setTime(s.toNumber()):typeof s=="number"&&t.relaxed&&o.setTime(s),o}if(e.$code!=null){var a=Object.assign({},e);return e.$scope&&(a.$scope=dT(e.$scope)),Zf.fromExtendedJSON(e)}if(L2(e)||e.$dbPointer){var l=e.$ref?e:e.$dbPointer;if(l instanceof Sl)return l;var c=Object.keys(l).filter(function(d){return d.startsWith("$")}),h=!0;if(c.forEach(function(d){["$ref","$id","$db"].indexOf(d)===-1&&(h=!1)}),h)return Sl.fromExtendedJSON(l)}return e}function eV(e,t){return e.map(function(n,r){t.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return Eo(n,t)}finally{t.seenObjects.pop()}})}function ZI(e){var t=e.toISOString();return e.getUTCMilliseconds()!==0?t:t.slice(0,-5)+"Z"}function Eo(e,t){if((typeof e=="object"||typeof e=="function")&&e!==null){var n=t.seenObjects.findIndex(function(A){return A.obj===e});if(n!==-1){var r=t.seenObjects.map(function(A){return A.propertyName}),i=r.slice(0,n).map(function(A){return"".concat(A," -> ")}).join(""),s=r[n],o=" -> "+r.slice(n+1,r.length-1).map(function(A){return"".concat(A," -> ")}).join(""),a=r[r.length-1],l=" ".repeat(i.length+s.length/2),c="-".repeat(o.length+(s.length+a.length)/2-1);throw new Ut(`Converting circular structure to EJSON:
42
42
  `+" ".concat(i).concat(s).concat(o).concat(a,`
43
- `)+" ".concat(l,"\\").concat(c,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return eV(e,t);if(e===void 0)return null;if(e instanceof Date||M2(e)){var h=e.getTime(),d=h>-1&&h<2534023188e5;return t.legacy?t.relaxed&&d?{$date:e.getTime()}:{$date:ZI(e)}:t.relaxed&&d?{$date:ZI(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(typeof e=="number"&&(!t.relaxed||!isFinite(e))){if(Math.floor(e)===e){var f=e>=cT&&e<=aT,g=e>=uT&&e<=lT;if(f)return{$numberInt:e.toString()};if(g)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||A2(e)){var m=e.flags;if(m===void 0){var b=e.toString().match(/[gimuy]*$/);b&&(m=b[0])}var x=new Dl(e.source,m);return x.toExtendedJSON(t)}return e!=null&&typeof e=="object"?nV(e,t):e}var tV={Binary:function(e){return new Ss(e.value(),e.sub_type)},Code:function(e){return new Zf(e.code,e.scope)},DBRef:function(e){return new Sl(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new g_(e.bytes)},Double:function(e){return new Xf(e.value)},Int32:function(e){return new Jf(e.value)},Long:function(e){return ce.fromBits(e.low!=null?e.low:e.low_,e.low!=null?e.high:e.high_,e.low!=null?e.unsigned:e.unsigned_)},MaxKey:function(){return new y_},MinKey:function(){return new v_},ObjectID:function(e){return new un(e)},ObjectId:function(e){return new un(e)},BSONRegExp:function(e){return new Dl(e.pattern,e.options)},Symbol:function(e){return new __(e.value)},Timestamp:function(e){return sT.fromBits(e.low,e.high)}};function nV(e,t){if(e==null||typeof e!="object")throw new Cs("not an object instance");var n=e._bsontype;if(typeof n>"u"){var r={};for(var i in e){t.seenObjects.push({propertyName:i,obj:null});try{var s=Eo(e[i],t);i==="__proto__"?Object.defineProperty(r,i,{value:s,writable:!0,enumerable:!0,configurable:!0}):r[i]=s}finally{t.seenObjects.pop()}}return r}else if(J2(e)){var o=e;if(typeof o.toExtendedJSON!="function"){var a=tV[e._bsontype];if(!a)throw new Ut("Unrecognized or invalid _bsontype: "+e._bsontype);o=a(o)}return n==="Code"&&o.scope?o=new Zf(o.code,Eo(o.scope,t)):n==="DBRef"&&o.oid&&(o=new Sl(Eo(o.collection,t),Eo(o.oid,t),Eo(o.db,t),Eo(o.fields,t))),o.toExtendedJSON(t)}else throw new Cs("_bsontype must be a string, but was: "+typeof n)}var XI;(function(e){function t(s,o){var a=Object.assign({},{relaxed:!0,legacy:!1},o);return typeof a.relaxed=="boolean"&&(a.strict=!a.relaxed),typeof a.strict=="boolean"&&(a.relaxed=!a.strict),JSON.parse(s,function(l,c){if(l.indexOf("\0")!==-1)throw new Cs("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(l)));return dT(c,a)})}e.parse=t;function n(s,o,a,l){a!=null&&typeof a=="object"&&(l=a,a=0),o!=null&&typeof o=="object"&&!Array.isArray(o)&&(l=o,o=void 0,a=0);var c=Object.assign({relaxed:!0,legacy:!1},l,{seenObjects:[{propertyName:"(root)",obj:null}]}),h=Eo(s,c);return JSON.stringify(h,o,a)}e.stringify=n;function r(s,o){return o=o||{},JSON.parse(n(s,o))}e.serialize=r;function i(s,o){return o=o||{},t(JSON.stringify(s),o)}e.deserialize=i})(XI||(XI={}));var JI,QI=tT();QI.Map?JI=QI.Map:JI=function(){function e(t){t===void 0&&(t=[]),this._keys=[],this._values={};for(var n=0;n<t.length;n++)if(t[n]!=null){var r=t[n],i=r[0],s=r[1];this._keys.push(i),this._values[i]={v:s,i:this._keys.length-1}}}return e.prototype.clear=function(){this._keys=[],this._values={}},e.prototype.delete=function(t){var n=this._values[t];return n==null?!1:(delete this._values[t],this._keys.splice(n.i,1),!0)},e.prototype.entries=function(){var t=this,n=0;return{next:function(){var r=t._keys[n++];return{value:r!==void 0?[r,t._values[r].v]:void 0,done:r===void 0}}}},e.prototype.forEach=function(t,n){n=n||this;for(var r=0;r<this._keys.length;r++){var i=this._keys[r];t.call(n,this._values[i].v,i,n)}},e.prototype.get=function(t){return this._values[t]?this._values[t].v:void 0},e.prototype.has=function(t){return this._values[t]!=null},e.prototype.keys=function(){var t=this,n=0;return{next:function(){var r=t._keys[n++];return{value:r!==void 0?r:void 0,done:r===void 0}}}},e.prototype.set=function(t,n){return this._values[t]?(this._values[t].v=n,this):(this._keys.push(t),this._values[t]={v:n,i:this._keys.length-1},this)},e.prototype.values=function(){var t=this,n=0;return{next:function(){var r=t._keys[n++];return{value:r!==void 0?t._values[r].v:void 0,done:r===void 0}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e}();var QK=ce.fromNumber(P2),eZ=ce.fromNumber(k2),f_=new Uint8Array(8),tZ=new DataView(f_.buffer,f_.byteOffset,f_.byteLength),rV=1024*1024*17,nZ=st.alloc(rV),wo=class{triggerID;nudgeID;engagementID;contentID;shortID;contentType;variation;props;objective;onsiteDeliveryType;holdout;constructor(e){e=e||{},this.triggerID=e.id||e.triggerID,this.nudgeID=e.nudgeID,this.shortID=e.shortID,this.contentType=e.contentType,this.engagementID=e.engagementID,this.contentID=e.contentID,this.variation=e.variation,this.props=e.props,this.objective=e.objective,this.onsiteDeliveryType=e.onsiteDeliveryType,this.holdout=e.holdout}},We=class{constructor(e,t={},n,r){this.name=e,this.properties=t,this.id=r?new un(r):new un,this.occurred=new Date,n&&(this.trigger=new wo(n)),this.newEvent=!r}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale},Nt=class{static SWIPER_CSS="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css";static injectScriptURL(e,t){if(!e)return;let n=document.createElement("script");n.id=t??"",n.src=e,hn.mode==="local"&&(n.type="module"),document.head.appendChild(n)}static injectRawScript(e){if(!e)return;let t=document.createElement("script");t.id="cooee-app-script",t.innerHTML=e,document.head.appendChild(t)}static injectRawCSS(e,t=document.head){if(!e)return;let n=document.createElement("style");n.textContent=e,t.appendChild(n)}static injectSwiperCSS(e=document.head){this.injectStylesheet(this.SWIPER_CSS,e)}static injectStylesheet(e,t=document.head){if(!e)return;let n=document.createElement("link");n.rel="stylesheet",n.href=e,e===this.SWIPER_CSS&&(n.crossOrigin="anonymous",n.onload=r=>{let i=r.currentTarget?.sheet?.cssRules;if(i){for(let s of i)if(s.type==CSSRule.FONT_FACE_RULE){let o=e.split("/"),a=o.slice(0,o.length-1).join("/"),l=s.cssText;l=l.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${a}/$4")`);let c=document.createElement("style");c.appendChild(document.createTextNode(l)),document.head.appendChild(c)}}}),t.appendChild(n)}static loadSwiperScript(){let e="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js";return new Promise(t=>{if(window.Swiper){t();return}if(Array.from(document.scripts).some(r=>r.src.includes(e))){let r=setInterval(()=>{window.Swiper&&(clearInterval(r),t())},50)}let n=document.createElement("script");n.src=e,n.onload=()=>{t()},n.onerror=()=>{n.remove()},document.body.appendChild(n)})}},px=Re(Qf()),hx=Re(us()),Dt=class{static COOEE_URL_PREFIX="?from=cooee";static isShopify(){return!!window.Shopify}static getShopName(){if(this.isShopify())return window.Shopify.shop?.split(".")?.[0]}static getPageName(){if(!this.isShopify())return;let e=new URL(window.location.href).pathname.slice(1).split("/"),t=e[0];if(t==="")return"home";if(t==="collections")return e[2]==="products"?"product":"collection";if(t==="products")return"product";if(t==="cart")return"cart";if(location.href.includes("thank_you"))return"thank_you"}static getProductSlug(e){let t=(e.includes("://")?new URL(e).pathname:e).match(/\/products\/([^/]+?)(?:\.html)?$/);return t?t[1]:null}static getRootPrefix(){return window.Shopify?.routes?.root??"/"}static getCartURL(e){return this.getRootPrefix()+e+this.COOEE_URL_PREFIX}},iV=" daum[ /]| deusu/| yadirectfetcher|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\btime/|\\||^<|^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\d\\.\\d\\s[\\w\\.-]+$|^mozilla/\\d\\.\\d\\s\\(compatible;?(?:\\s\\w+\\/\\d+\\.\\d+)?\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|^{{.*}}$|adscanner/|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|cookiehubscan|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|firephp|functionize|gomezagent|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|infrawatch|insight|inspect|iplabel|ips-agent|java(?!;)|jsjcw_scanner|library|linkcheck|mail\\.ru/|manager|measure|neustar wpm|node|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|perl|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|retriever|rexx;|rigor|rss\\b|scanner\\.|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|zgrab",oV=/bot|crawl|http|lighthouse|scan|search|spider/i,Tl;function sV(){if(Tl instanceof RegExp)return Tl;try{Tl=new RegExp(iV,"i")}catch{Tl=oV}return Tl}function hT(e){return!!e&&sV().test(e)}var mT=Re(E_()),xl=class{static UTM_PARAMS=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id"];static TW_PARAMS={utm_source:"tw_source",utm_campaign:"tw_campaign"};static getReferrer(){if(document.referrer)return document.referrer.replace(location.origin,"")}static getUTMParams(){let e;try{e=new mT.URLBuilder(location.href)}catch{return{}}let t={};this.UTM_PARAMS.forEach(r=>{let i=e.getQueryParam(r);i&&(t[r]=i)});let n={};return Object.keys(this.TW_PARAMS).forEach(r=>{let i=e.getQueryParam(this.TW_PARAMS[r]);i&&(n[r]=i)}),w(w({},n),t)}},hi=class pT{origin;path;qs;name;referrer;utmSource;utmMedium;utmCampaign;utmId;utmTerm;utmContent;constructor(t){this.name=t.name,this.path=t.path,this.qs=t.qs,this.referrer=t.referrer,this.utmSource=t.utmSource||t.utm_source,this.utmMedium=t.utmMedium||t.utm_medium,this.utmCampaign=t.utmCampaign||t.utm_campaign,this.utmId=t.utmId||t.utm_id,this.utmTerm=t.utmTerm||t.utm_term,this.utmContent=t.utmContent||t.utm_content}static parseFromCurrent(){let t=location.pathname==="/"?location.pathname:location.pathname.replace(/\/+$/,"");return new pT(w({origin:location.origin,path:t,qs:location.search,referrer:xl.getReferrer(),name:Oe.get().pageName},xl.getUTMParams()))}},Te=class{static storage=new Map;static get(e){return this.storage.has(e)||this.storage.set(e,e.getInstance()),this.storage.get(e)}},w_={d:(e,t)=>{for(var n in t)w_.o(t,n)&&!w_.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},b_={};w_.d(b_,{A:()=>uV,k:()=>C_});var cV=function(e,t,n,r){return new(n||(n=Promise))(function(i,s){function o(c){try{l(r.next(c))}catch(h){s(h)}}function a(c){try{l(r.throw(c))}catch(h){s(h)}}function l(c){var h;c.done?i(c.value):(h=c.value,h instanceof n?h:new n(function(d){d(h)})).then(o,a)}l((r=r.apply(e,t||[])).next())})},lV=function(e,t){var n,r,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(c){return function(h){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,h[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&h[0]?r.return:h[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,h[1])).done)return i;switch(r=0,i&&(h=[2&h[0],i.value]),h[0]){case 0:case 1:i=h;break;case 4:return o.label++,{value:h[1],done:!1};case 5:o.label++,r=h[1],h=[0];continue;case 7:h=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!((i=i.length>0&&i[i.length-1])||h[0]!==6&&h[0]!==2)){o=0;continue}if(h[0]===3&&(!i||h[1]>i[0]&&h[1]<i[3])){o.label=h[1];break}if(h[0]===6&&o.label<i[1]){o.label=i[1],i=h;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(h);break}i[2]&&o.ops.pop(),o.trys.pop();continue}h=t.call(e,o)}catch(d){h=[6,d],r=0}finally{n=i=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([l,c])}}};function C_(){return cV(this,void 0,Promise,function(){return lV(this,function(_a){switch(_a.label){case 0:return[4,new Promise(function(resolve,reject){var browserName="Unknown";function __callback(e){resolve({isPrivate:e,browserName})}function identifyChromium(){var e=navigator.userAgent;return e.match(/Chrome/)?navigator.brave!==void 0?"Brave":e.match(/Edg/)?"Edge":e.match(/OPR/)?"Opera":"Chrome":"Chromium"}function assertEvalToString(e){return e===eval.toString().length}function feid(){var toFixedEngineID=0;try{eval("(-1).toFixed(-1);")}catch(e){toFixedEngineID=e.message.length}return toFixedEngineID}function isSafari(){return feid()===44}function isChrome(){return feid()===51}function isFirefox(){return feid()===25}function isMSIE(){return navigator.msSaveBlob!==void 0&&assertEvalToString(39)}function newSafariTest(){var e=String(Math.random());try{window.indexedDB.open(e,1).onupgradeneeded=function(t){var n,r,i=(n=t.target)===null||n===void 0?void 0:n.result;try{i.createObjectStore("test",{autoIncrement:!0}).put(new Blob),__callback(!1)}catch(o){var s=o;return o instanceof Error&&(s=(r=o.message)!==null&&r!==void 0?r:o),typeof s!="string"?void __callback(!1):void __callback(s.includes("BlobURLs are not yet supported"))}finally{i.close(),window.indexedDB.deleteDatabase(e)}}}catch{__callback(!1)}}function oldSafariTest(){var e=window.openDatabase,t=window.localStorage;try{e(null,null,null,null)}catch{return void __callback(!0)}try{t.setItem("test","1"),t.removeItem("test")}catch{return void __callback(!0)}__callback(!1)}function safariPrivateTest(){navigator.maxTouchPoints!==void 0?newSafariTest():oldSafariTest()}function getQuotaLimit(){var e=window;return e.performance!==void 0&&e.performance.memory!==void 0&&e.performance.memory.jsHeapSizeLimit!==void 0?performance.memory.jsHeapSizeLimit:1073741824}function storageQuotaChromePrivateTest(){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(e,t){__callback(Math.round(t/1048576)<2*Math.round(getQuotaLimit()/1048576))},function(e){reject(new Error("detectIncognito somehow failed to query storage quota: "+e.message))})}function oldChromePrivateTest(){(0,window.webkitRequestFileSystem)(0,1,function(){__callback(!1)},function(){__callback(!0)})}function chromePrivateTest(){self.Promise!==void 0&&self.Promise.allSettled!==void 0?storageQuotaChromePrivateTest():oldChromePrivateTest()}function firefoxPrivateTest(){__callback(navigator.serviceWorker===void 0)}function msiePrivateTest(){__callback(window.indexedDB===void 0)}function main(){isSafari()?(browserName="Safari",safariPrivateTest()):isChrome()?(browserName=identifyChromium(),chromePrivateTest()):isFirefox()?(browserName="Firefox",firefoxPrivateTest()):isMSIE()?(browserName="Internet Explorer",msiePrivateTest()):reject(new Error("detectIncognito cannot determine the browser"))}main()})];case 1:return[2,_a.sent()]}})})}typeof window<"u"&&(window.detectIncognito=C_);var uV=C_,gT=b_.A,wZ=b_.k,lx=Re(us()),yT=Re(np()),sr=class Qi{static DOCUMENT_STANDARD_MODE="CSS1Compat";static _instance;parentContainer;scalingFactor=1;doc=document;parser=new yT.default;constructor(){}static get(){return Qi._instance||(Qi._instance=new Qi),Qi._instance}getUAParser(){return this.parser}getWidth(){return this.parentContainer&&this.parentContainer!==document.body?this.parentContainer.clientWidth:document.compatMode===Qi.DOCUMENT_STANDARD_MODE?document.documentElement.clientWidth:window.innerWidth}getHeight(){return this.isParentNotBody()?this.parentContainer.clientHeight:document.compatMode===Qi.DOCUMENT_STANDARD_MODE?document.documentElement.clientHeight:window.innerHeight}isMobile(){return this.parser.getDevice().type==="mobile"}calculateScalingFactor(t){let n=t.max,r=t.cont.w,i=t.cont.h,s=t.spc,o=Qi.get().getWidth(),a=Qi.get().getHeight();n&&(o=o?Math.min(o,n):n,a=a?Math.min(a,n):n),a&&(o-=s.getHorizontal(),a-=s.getVertical(),o/a<r/i?this.scalingFactor=o/r:this.scalingFactor=a/i,this.scalingFactor=Math.min(this.scalingFactor,1))}getScalingFactor(){return this.scalingFactor}createElement(t){return this.doc.createElement(t)}appendChild(t,n){t.appendChild(n)}setStyles(t,n){Object.assign(t.style,n)}setStyle(t,n,r){if(n){if(!r){t.style.removeProperty(n);return}t.style.setProperty(n,r,"important")}}setAttribute(t,n,r){t.setAttribute(n,r)}removeInApp(t){let n=document.querySelector(`.${t.rootClassName}`);n&&n.parentElement.removeChild(n)}setParentContainer(t){this.parentContainer=t,this.parentContainer&&this.isParentNotBody()&&this.setStyle(this.parentContainer,"position","relative")}isParentNotBody(){return this.parentContainer!==document.body}},rp=class{parser;result={};constructor(){this.parser=sr.get().getUAParser()}async get(){let e=this.result;return this.getDeviceMemory(),this.getNetworkType(),this.getOrientation(),await this.getBatteryInfo(),await this.getLocation(),e.locale=navigator.language,e.display={w:screen.width,h:screen.height,pd:screen.pixelDepth,dpi:this.getDPI()},e.win={ow:window.outerWidth,oh:window.outerHeight,iw:window.innerWidth,ih:window.innerHeight,dpr:window.devicePixelRatio},e.browser={name:this.parser.getBrowser().name,ver:this.parser.getBrowser().version},e.device={model:this.parser.getDevice().model,type:this.parser.getDevice().type,vendor:this.parser.getDevice().vendor},e.os={name:this.parser.getOS().name,ver:this.parser.getOS().version},e.navigatorUA=navigator.userAgent,e.isHeadless=navigator.webdriver,e}getDeviceMemory(){let e=navigator;if(!e.deviceMemory)return;let t=e.deviceMemory;this.result.mem={tot:t*1024}}getNetworkType(){let e=navigator,t=e.connection||e.mozConnection||e.webkitConnection;t?.effectiveType&&(this.result.net={type:t.effectiveType})}getOrientation(){let e=screen.orientation?.type;e&&(this.result.orientation=e)}getDPI(){let e=document.createElement("div");e.setAttribute("style","height: 1in; left: -100%; position: absolute; top: -100%; width: 1in;"),document.body.appendChild(e);let t=window.devicePixelRatio||1,n=e.offsetWidth*t;return document.body.removeChild(e),n}async getLocation(){if(!(!navigator.geolocation||!navigator.permissions||(await navigator.permissions.query({name:"geolocation"})).state!="granted"))return new Promise(e=>{navigator.geolocation.getCurrentPosition(t=>{this.result.coords=[t.coords.latitude,t.coords.longitude],e()},()=>e())})}async getBatteryInfo(){if("getBattery"in navigator)try{let e=await navigator.getBattery();this.result.bat={l:e.level*100,c:e.charging}}catch{}}},Wa=class{isLocked=!1;queue=[];async acquire(){if(this.isLocked)await new Promise(e=>this.queue.push(e));else{this.isLocked=!0;return}}release(){if(this.queue.length>0){let e=this.queue.shift();e&&e()}else this.isLocked=!1}},Ge=class fT{static CURRENT;token;items;total_price;original_total_price;currency;item_count;attributes;lock=new Wa;constructor(){}static getCurrent(){return this.CURRENT||(this.CURRENT=new fT),this.CURRENT}async getNormalisedCart(t){await this.fetchCartFromShopify(t);let n=this.convertToCooeeCart();return t&&await rt.set(ge.CURRENT_CART,n),n}async addCooeeAttributes(){await this.lock.acquire();let t=await gn.get(ge.ID),n=await rt.get(ge.DEVICE_ID);if(this.attributes?.letscooee_did===n&&this.attributes?.letscooee_sid===t){C.debug("Not calling Shopify update.js API.","Current attributes:",this.attributes),this.lock.release();return}let r={letscooee_did:n,letscooee_sid:t,__letscooee_time:new Date().toLocaleString()};C.debug("Updating Shopify cart with attributes:",r);let i=Dt.getCartURL("cart/update.js"),s=await(await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:r})})).json();C.debug("Updated cart attributes",JSON.stringify(s)),this.update(s),this.lock.release()}update(t){return this.token=t.token,this.items=t.items,this.total_price=t.total_price,this.original_total_price=t.original_total_price,this.currency=t.currency,this.item_count=t.item_count,this.attributes=t.attributes,Oe.get().currencyCode=this.currency,C.log("Updated ShopifyCart",this),this}toString(){return`ShopifyCart(token: ${this.token}, itemCount: ${this.item_count})`}convertToCooeeCart(){return{amount:this.total_price/100,originalAmount:this.original_total_price/100,currency:this.currency,itemCount:this.item_count,items:this.normaliseItems(this.items),token:this.token}}normaliseItems(t){if(!t)return C.error("No item received to be sent"),[];Array.isArray(t)||(t=[t]);let n=[];for(let r of t){if(!r.id||!r.title){C.warn("Invalid item received",r);continue}let i={name:r.title,quantity:+r.quantity||1,mID:r.product_id?.toString(),vID:r.id.toString(),price:+r.price/100||0,properties:r.properties,key:r.key},s=r.selling_plan_allocation?.selling_plan;if(!s){n.push(i);continue}i.sellingPlanAllocation={sellingPlan:{fixedSellingPlan:s.fixed_selling_plan,id:s.id,name:s.name,recurringDeliveries:s.recurring_deliveries}},n.push(i)}return n}async fetchCartFromShopify(t){if(!t&&this.token){C.debug("Not fetching cart");return}C.debug("Fetching cart");let n=Dt.getCartURL("cart.js"),r=await(await fetch(n)).json();this.update(r)}},Ds=(e=>(e[e.LOW=1]="LOW",e[e.MEDIUM=2]="MEDIUM",e[e.HIGH=3]="HIGH",e))(Ds||{}),Ga=class{static trackDeviceID(e){this.isInstalled()}static trackIntent(e){if(!this.isInstalled())return;let t=Ds[e]?.toLowerCase();t&&(C.debug(`Sending ${t} intent to MS Clarity`),window.clarity("set","Cooee Intent",t))}static isInstalled(){return window.clarity&&typeof window.clarity=="function"}},Dr=class{static isOn=!1;static element;static watch(){let e=C.getDebugParam();(e==="1"||e==="on")&&Ve.getInstance().updateDeviceProps({debugTill:this.getDebugMillis()}),e==="on"?sessionStorage.cooeeDebug="1":e==="off"&&sessionStorage.removeItem("cooeeDebug"),sessionStorage.cooeeDebug&&(this.isOn=!0,this.renderDebugBar())}static prepend(e){if(!this.isOn)return;let t=document.createElement("div");t.innerHTML="&#x2022; "+new Date().toLocaleString()+" - "+e,this.element.prepend(t)}static renderDebugBar(){this.element=document.createElement("div"),this.element.id="cooee-debugger",this.element.setAttribute("draggable","true"),document.body.appendChild(this.element)}static dragElement(){let e=0,t=0,n=0,r=0,i=a=>{a=a||window.event,a.preventDefault(),n=a.clientX,r=a.clientY,document.onmouseup=o,document.onmousemove=s},s=a=>{a=a||window.event,a.preventDefault(),e=n-a.clientX,t=r-a.clientY,n=a.clientX,r=a.clientY,this.element.style.top=this.element.offsetTop-t+"px",this.element.style.left=this.element.offsetLeft-e+"px"},o=()=>{document.onmouseup=null,document.onmousemove=null};this.element.onmousedown=i}static getDebugMillis(){return new Date().getTime()+6*60*60*1e3}},Nl=class extends yo{static storeName="app";static{this.storage=xa(this.storeName)}},ip=Re(us()),mi=class xD{static INSTANCE=new xD;topics={};constructor(){}static get(){return this.INSTANCE}broadcast(t,n){this.topics[t]||(this.topics[t]=new J),this.topics[t].next(n)}subscriber(t){return this.topics[t]||(this.topics[t]=new J),this.topics[t].asObservable()}},Gt=class di{static DEFAULT_SELECTOR="cart-drawer";static _instance;inShadow=!1;cartDrawerElement;cartDrawerShadowElement;configWebsite=vt.get().website??{};currentState=!1;drawerSubject=new Nr({open:!1,firstOpen:!1});mutationObserver;firstOpen=!0;selector;shadowParentElementSelector;iconSelector=['button[drawer-to-open="cart-drawer"]','a[href="/cart"]',".header__icon--cart","#cart-icon-bubble",".cart-icon-bubble",".cart-count",'a[onclick*="handleFloCartBtn"]'].join(",");cartSelector=[di.DEFAULT_SELECTOR,"#halo-cart-sidebar",'[role="dialog"][class*="cart" i]','[id*="section-cart" i]',"#sidebar-cart","#rebuy-cart","#mini-cart","#flo-cart-wrapper","#drawer-cart","#UpcartPopupBackDrop",'[id$="CartDrawer" i]'].join(",");constructor(){this.initialize(),document.addEventListener(k.CTA_AFTER_REFRESH_UI,this.updateBubble.bind(this))}get element(){return this.cartDrawerElement}static get(){return di._instance||(di._instance=new di),di._instance}static forceUpdate(){di._instance=new di}isOpen(){let t=this.inShadow?this.isPresent():this.isVisible();return ip.default.log(`Cart drawer is currently ${t?"open":"close"}`),t}open(){if(this.isOpen()){C.log("Drawer is already open");return}document.dispatchEvent(new CustomEvent(k.CTA_OPEN_CART_EVENT));let t=document.querySelector(this.iconSelector);if(!t){C.debug("No clickable cart icon found with selector",this.iconSelector);return}t.click()}onToggle(){return this.drawerSubject}isShopifyDefaultDrawer(){return this.element?.tagName.toLowerCase()===di.DEFAULT_SELECTOR}isMiniCart(){return this.isShopifyDefaultDrawer()&&this.element?.id==="mini-cart"}refreshUI(t,n=!0){if(this.isMiniCart()&&this.element?._rerenderCart)this.element._rerenderCart({detail:{cart:t}});else if(window.MinimogTheme?.Cart?.renderNewCart)window.MinimogTheme.Cart.renderNewCart();else if(this.isShopifyDefaultDrawer()&&this.element?.renderContents&&t)this.element.classList.remove("is-empty"),this.element.renderContents?.(t);else if(this.element?.onCartDrawerUpdate)this.element.onCartDrawerUpdate();else if(window.cartGiftUpdate){if(!t?.items?.[0])return;let r=t.items[0].id,i=t.items[0].quantity,s=t.items[0].price;window.cartGiftUpdate(r,s,i,"","ADD_TO_CART")}else if(window.icartCartActivityEvent)window.icartCartActivityEvent();else if(window.theme?.CartDrawer)window.theme?.CartDrawer.init?new window.theme.CartDrawer().init():new window.theme.CartDrawer;else if(window.Hs_CartDrawer?.updateSlideCart)window.Hs_CartDrawer.updateSlideCart();else if(window.theme?.fetch_side_cart)window.theme.fetch_side_cart();else if(window.theme?.Cart?.updateCart)window.theme.Cart.updateCart();else if(window.cartUpdate)window.cartUpdate();else if(this.element?._onCartRefresh)this.element._onCartRefresh();else if(window.cart?.getCart)window.cart.getCart();else if(this.element?.tagName?.toLowerCase()==="cart-drawer-component")document.dispatchEvent(new CustomEvent("action:cart:updateCartandShowCart"));else if(this.element?.id==="sidebar-cart")document.body.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0,detail:{}}));else if(this.element?.id==="quick-cart"){let r=document.querySelector('a[href="/cart"]');r&&r.click()}else window.Shopify?.KT_onItemAdded?window.Shopify.KT_onItemAdded():window.sideCart?.updateCart?window.sideCart.updateCart():(C.info("No method found to update the cart drawer. Blindly firing some events to try"),document.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0})));document.dispatchEvent(new CustomEvent(k.CTA_AFTER_REFRESH_UI)),n&&mi.get().broadcast(k.CART_UPDATE_BROADCAST)}async initialize(){let t=this.configWebsite.cartDrawerSelector;if(!t){await this.findCartDrawer();return}let n=t.split(k.SHADOW_SPLITTER);n.length===1?(this.selector=n[0],await this.findCartDrawer()):(this.inShadow=!0,this.shadowParentElementSelector=n[0]?.trim(),this.selector=n[1]?.trim(),await this.findCartDrawerWithShadow())}async findCartDrawer(){if(!Dt.isShopify())return;let t=this.selector||this.cartSelector;if(this.cartDrawerElement=await le.retrySelector(t),!this.cartDrawerElement){ip.default.warn("Max attempts exhausted to find cart drawer");return}ip.default.log("Found",this.cartDrawerElement,`from selector: ${t}`),this.createMutationObservers()}async findCartDrawerWithShadow(){if(!Dt.isShopify()||!this.shadowParentElementSelector)return;let t=(await le.retrySelector(this.shadowParentElementSelector))?.shadowRoot;t?.mode==="open"&&(this.cartDrawerShadowElement=t,this.createMutationObservers())}isVisible(){if(!this.cartDrawerElement)return!1;if(this.cartDrawerElement.tagName.toLowerCase()===di.DEFAULT_SELECTOR&&this.cartDrawerElement.open)return!0;if(this.cartDrawerElement.id==="cart-drawer__container")return this.cartDrawerElement.classList.contains("cart-drawer-open");let t=this.cartDrawerElement.getBoundingClientRect(),n=(window.innerHeight||document.documentElement.clientHeight)+.5,r=(window.innerWidth||document.documentElement.clientWidth)+.5,i=t.top<=n&&t.bottom>=0,s=t.left<=r&&t.right>=0,o=i&&s,a=getComputedStyle(this.cartDrawerElement),l=a.display!=="none"&&a.visibility!=="hidden"&&parseFloat(a.opacity)>0,c=!this.cartDrawerElement.hidden,h=this.cartDrawerElement.offsetWidth>0||this.cartDrawerElement.offsetHeight>0||this.cartDrawerElement.getClientRects().length>0,d=a.transform.match(/matrix\(([^)]+)\)/),f=0,g=0;if(d){let M=d[1].split(", ").map(parseFloat);f=M[4],g=M[5]}let m=f+t.left>r||f+t.right<0||g+t.top>n||g+t.bottom<0,b=Math.max(0,Math.min(t.right,r)-Math.max(t.left,0)),x=Math.max(0,Math.min(t.bottom,n)-Math.max(t.top,0)),A=b*x,F=t.width*t.height,U=F>0&&A/F>=.1;return(o||!m)&&l&&c&&h&&U}createMutationObservers(){!this.cartDrawerElement&&!this.cartDrawerShadowElement||(le.onNodesRemoved(this.cartDrawerElement,()=>{this.initialize()}),this.watchForCartToggle())}watchForCartToggle(){let t=this.cartDrawerElement||this.cartDrawerShadowElement,n=new J;this.mutationObserver?.disconnect(),this.mutationObserver=new MutationObserver(()=>{n.next()}),this.mutationObserver.observe(t,{attributes:!0,subtree:!0,childList:this.inShadow}),n.pipe(Ar(500)).subscribe(()=>{let r=this.isOpen();this.currentState!==r&&(this.currentState=r,this.drawerSubject.next({open:r,firstOpen:this.firstOpen}),this.firstOpen&&(this.firstOpen=!1))})}isPresent(){return!this.selector||!this.cartDrawerShadowElement?!1:!!this.cartDrawerShadowElement.querySelector(this.selector)}async updateBubble(){let t=(await Ge.getCurrent().getNormalisedCart(!0)).itemCount,n=document.querySelector(".cart-link__bubble");n&&(n.innerText=t+"")}},op=class{static processConfiguration(){let e=vt.get();!e.gaMeasurementID||!e.gaEnabled||this.sendClientID()}static async sendClientID(){let e=await this.getClientID();e&&Ve.getInstance().updateDeviceProps({gaClientID:e})}static async getClientID(){let e=await rt.get(ge.GA_CLIENT_ID),t=await this.getClientIDViaGTag();if(e!==t)return await rt.set(ge.GA_CLIENT_ID,t),t}static async getClientIDViaGTag(){let e=vt.get().gaMeasurementID;if(!(!e||!window.gtag))return new Promise(t=>{window.gtag("get",e,"client_id",n=>{t(n)})})}},ax=Re(Pf()),In=Re(qn()),To=Re(Qf()),Pp=Re(D_()),up,it,bT,R_,Is,vT,CT,I_,ST,N_,T_,x_,dV,Al={},DT=[],fV=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,A_=Array.isArray;function bo(e,t){for(var n in t)e[n]=t[n];return e}function M_(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function O_(e,t,n){var r,i,s,o={};for(s in t)s=="key"?r=t[s]:s=="ref"?i=t[s]:o[s]=t[s];if(arguments.length>2&&(o.children=arguments.length>3?up.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)o[s]===void 0&&(o[s]=e.defaultProps[s]);return cp(e,o,r,i,null)}function cp(e,t,n,r,i){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++bT,__i:-1,__u:0};return i==null&&it.vnode!=null&&it.vnode(s),s}function yi(e){return e.children}function gi(e,t){this.props=e,this.context=t}function za(e,t){if(t==null)return e.__?za(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?za(e):null}function IT(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return IT(e)}}function _T(e){(!e.__d&&(e.__d=!0)&&Is.push(e)&&!lp.__r++||vT!==it.debounceRendering)&&((vT=it.debounceRendering)||CT)(lp)}function lp(){var e,t,n,r,i,s,o,a;for(Is.sort(I_);e=Is.shift();)e.__d&&(t=Is.length,r=void 0,s=(i=(n=e).__v).__e,o=[],a=[],n.__P&&((r=bo({},i)).__v=i.__v+1,it.vnode&&it.vnode(r),P_(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[s]:null,o,s??za(i),!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,RT(o,r,a),r.__e!=s&&IT(r)),Is.length>t&&Is.sort(I_));lp.__r=0}function TT(e,t,n,r,i,s,o,a,l,c,h){var d,f,g,m,b,x,A=r&&r.__k||DT,F=t.length;for(l=pV(n,t,A,l,F),d=0;d<F;d++)(g=n.__k[d])!=null&&(f=g.__i===-1?Al:A[g.__i]||Al,g.__i=d,x=P_(e,g,f,i,s,o,a,l,c,h),m=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&k_(f.ref,null,g),h.push(g.ref,g.__c||m,g)),b==null&&m!=null&&(b=m),4&g.__u||f.__k===g.__k?l=xT(g,l,e):typeof g.type=="function"&&x!==void 0?l=x:m&&(l=m.nextSibling),g.__u&=-7);return n.__e=b,l}function pV(e,t,n,r,i){var s,o,a,l,c,h=n.length,d=h,f=0;for(e.__k=new Array(i),s=0;s<i;s++)(o=t[s])!=null&&typeof o!="boolean"&&typeof o!="function"?(l=s+f,(o=e.__k[s]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?cp(null,o,null,null,null):A_(o)?cp(yi,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?cp(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,a=null,(c=o.__i=hV(o,n,l,d))!==-1&&(d--,(a=n[c])&&(a.__u|=2)),a==null||a.__v===null?(c==-1&&f--,typeof o.type!="function"&&(o.__u|=4)):c!=l&&(c==l-1?f--:c==l+1?f++:(c>l?f--:f++,o.__u|=4))):e.__k[s]=null;if(d)for(s=0;s<h;s++)(a=n[s])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=za(a)),NT(a,a));return r}function xT(e,t,n){var r,i;if(typeof e.type=="function"){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=xT(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=za(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function hV(e,t,n,r){var i,s,o=e.key,a=e.type,l=t[n];if(l===null||l&&o==l.key&&a===l.type&&(2&l.__u)==0)return n;if(r>(l!=null&&(2&l.__u)==0?1:0))for(i=n-1,s=n+1;i>=0||s<t.length;){if(i>=0){if((l=t[i])&&(2&l.__u)==0&&o==l.key&&a===l.type)return i;i--}if(s<t.length){if((l=t[s])&&(2&l.__u)==0&&o==l.key&&a===l.type)return s;s++}}return-1}function ET(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||fV.test(t)?n:n+"px"}function ap(e,t,n,r,i){var s;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||ET(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||ET(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(ST,"$1")),t=t.toLowerCase()in e||t=="onFocusOut"||t=="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.u=r.u:(n.u=N_,e.addEventListener(t,s?x_:T_,s)):e.removeEventListener(t,s?x_:T_,s);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function wT(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=N_++;else if(t.t<n.u)return;return n(it.event?it.event(t):t)}}}function P_(e,t,n,r,i,s,o,a,l,c){var h,d,f,g,m,b,x,A,F,U,M,q,Pe,ct,j,de,Q,he=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),s=[a=t.__e=n.__e]),(h=it.__b)&&h(t);e:if(typeof he=="function")try{if(A=t.props,F="prototype"in he&&he.prototype.render,U=(h=he.contextType)&&r[h.__c],M=h?U?U.props.value:h.__:r,n.__c?x=(d=t.__c=n.__c).__=d.__E:(F?t.__c=d=new he(A,M):(t.__c=d=new gi(A,M),d.constructor=he,d.render=gV),U&&U.sub(d),d.props=A,d.state||(d.state={}),d.context=M,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),F&&d.__s==null&&(d.__s=d.state),F&&he.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=bo({},d.__s)),bo(d.__s,he.getDerivedStateFromProps(A,d.__s))),g=d.props,m=d.state,d.__v=t,f)F&&he.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),F&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(F&&he.getDerivedStateFromProps==null&&A!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(A,M),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(A,d.__s,M)===!1||t.__v==n.__v)){for(t.__v!=n.__v&&(d.props=A,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(Ae){Ae&&(Ae.__=t)}),q=0;q<d._sb.length;q++)d.__h.push(d._sb[q]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(A,d.__s,M),F&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,m,b)})}if(d.context=M,d.props=A,d.__P=e,d.__e=!1,Pe=it.__r,ct=0,F){for(d.state=d.__s,d.__d=!1,Pe&&Pe(t),h=d.render(d.props,d.state,d.context),j=0;j<d._sb.length;j++)d.__h.push(d._sb[j]);d._sb=[]}else do d.__d=!1,Pe&&Pe(t),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++ct<25);d.state=d.__s,d.getChildContext!=null&&(r=bo(bo({},r),d.getChildContext())),F&&!f&&d.getSnapshotBeforeUpdate!=null&&(b=d.getSnapshotBeforeUpdate(g,m)),a=TT(e,A_(de=h!=null&&h.type===yi&&h.key==null?h.props.children:h)?de:[de],t,n,r,i,s,o,a,l,c),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),x&&(d.__E=d.__=null)}catch(Ae){if(t.__v=null,l||s!=null)if(Ae.then){for(t.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,t.__e=a}else for(Q=s.length;Q--;)M_(s[Q]);else t.__e=n.__e,t.__k=n.__k;it.__e(Ae,t,n)}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=mV(n.__e,t,n,r,i,s,o,l,c);return(h=it.diffed)&&h(t),128&t.__u?void 0:a}function RT(e,t,n){for(var r=0;r<n.length;r++)k_(n[r],n[++r],n[++r]);it.__c&&it.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(s){s.call(i)})}catch(s){it.__e(s,i.__v)}})}function mV(e,t,n,r,i,s,o,a,l){var c,h,d,f,g,m,b,x=n.props,A=t.props,F=t.type;if(F=="svg"?i="http://www.w3.org/2000/svg":F=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),s!=null){for(c=0;c<s.length;c++)if((g=s[c])&&"setAttribute"in g==!!F&&(F?g.localName==F:g.nodeType==3)){e=g,s[c]=null;break}}if(e==null){if(F==null)return document.createTextNode(A);e=document.createElementNS(i,F,A.is&&A),a&&(it.__m&&it.__m(t,s),a=!1),s=null}if(F===null)x===A||a&&e.data===A||(e.data=A);else{if(s=s&&up.call(e.childNodes),x=n.props||Al,!a&&s!=null)for(x={},c=0;c<e.attributes.length;c++)x[(g=e.attributes[c]).name]=g.value;for(c in x)if(g=x[c],c!="children"){if(c=="dangerouslySetInnerHTML")d=g;else if(!(c in A)){if(c=="value"&&"defaultValue"in A||c=="checked"&&"defaultChecked"in A)continue;ap(e,c,null,g,i)}}for(c in A)g=A[c],c=="children"?f=g:c=="dangerouslySetInnerHTML"?h=g:c=="value"?m=g:c=="checked"?b=g:a&&typeof g!="function"||x[c]===g||ap(e,c,g,x[c],i);if(h)a||d&&(h.__html===d.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(d&&(e.innerHTML=""),TT(e,A_(f)?f:[f],t,n,r,F=="foreignObject"?"http://www.w3.org/1999/xhtml":i,s,o,s?s[0]:n.__k&&za(n,0),a,l),s!=null)for(c=s.length;c--;)M_(s[c]);a||(c="value",F=="progress"&&m==null?e.removeAttribute("value"):m!==void 0&&(m!==e[c]||F=="progress"&&!m||F=="option"&&m!==x[c])&&ap(e,c,m,x[c],i),c="checked",b!==void 0&&b!==e[c]&&ap(e,c,b,x[c],i))}return e}function k_(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(i){it.__e(i,n)}}function NT(e,t,n){var r,i;if(it.unmount&&it.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||k_(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){it.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&NT(r[i],t,n||typeof e.type!="function");n||M_(e.__e),e.__c=e.__=e.__e=void 0}function gV(e,t,n){return this.constructor(e,n)}function AT(e,t,n){var r,i,s,o;t==document&&(t=document.documentElement),it.__&&it.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],o=[],P_(t,e=(!r&&n||t).__k=O_(yi,null,[e]),i||Al,Al,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?up.call(t.childNodes):null,s,!r&&n?n:i?i.__e:t.firstChild,r,o),RT(s,e,o)}up=DT.slice,it={__e:function(e,t,n,r){for(var i,s,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(a){e=a}throw e}},bT=0,R_=function(e){return e!=null&&e.constructor==null},gi.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=bo({},this.state),typeof e=="function"&&(e=e(bo({},n),this.props)),e&&bo(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),_T(this))},gi.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_T(this))},gi.prototype.render=yi,Is=[],CT=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,I_=function(e,t){return e.__v.__b-t.__v.__b},lp.__r=0,ST=/(PointerCapture)$|Capture$/i,N_=0,T_=wT(!1),x_=wT(!0),dV=0;var F_,ar,L_,MT,OT=0,HT=[],dn=it,PT=dn.__b,kT=dn.__r,LT=dn.diffed,FT=dn.__c,BT=dn.unmount,VT=dn.__;function yV(e,t){dn.__h&&dn.__h(ar,e,OT||t),OT=0;var n=ar.__H||(ar.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function V_(e,t){var n=yV(F_++,7);return EV(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function vV(){for(var e;e=HT.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(dp),e.__H.__h.forEach(B_),e.__H.__h=[]}catch(t){e.__H.__h=[],dn.__e(t,e.__v)}}dn.__b=function(e){ar=null,PT&&PT(e)},dn.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),VT&&VT(e,t)},dn.__r=function(e){kT&&kT(e),F_=0;var t=(ar=e.__c).__H;t&&(L_===ar?(t.__h=[],ar.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(t.__h.forEach(dp),t.__h.forEach(B_),t.__h=[],F_=0)),L_=ar},dn.diffed=function(e){LT&&LT(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(HT.push(t)!==1&&MT===dn.requestAnimationFrame||((MT=dn.requestAnimationFrame)||_V)(vV)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),L_=ar=null},dn.__c=function(e,t){t.some(function(n){try{n.__h.forEach(dp),n.__h=n.__h.filter(function(r){return!r.__||B_(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],dn.__e(r,n.__v)}}),FT&&FT(e,t)},dn.unmount=function(e){BT&&BT(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{dp(r)}catch(i){t=i}}),n.__H=void 0,t&&dn.__e(t,n.__v))};var UT=typeof requestAnimationFrame=="function";function _V(e){var t,n=function(){clearTimeout(r),UT&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);UT&&(t=requestAnimationFrame(n))}function dp(e){var t=ar,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),ar=t}function B_(e){var t=ar;e.__c=e.__(),ar=t}function EV(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}var wV=Symbol.for("preact-signals");function H_(){if(qa>1)qa--;else{for(var e,t=!1;Ml!==void 0;){var n=Ml;for(Ml=void 0,U_++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&$T(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(U_=0,qa--,t)throw e}}var Et=void 0,Ml=void 0,qa=0,U_=0,fp=0;function jT(e){if(Et!==void 0){var t=e.n;if(t===void 0||t.t!==Et)return t={i:0,S:e,p:Et.s,n:void 0,t:Et,e:void 0,x:void 0,r:t},Et.s!==void 0&&(Et.s.n=t),Et.s=t,e.n=t,32&Et.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Et.s,t.n=void 0,Et.s.n=t,Et.s=t),t}}function fn(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}fn.prototype.brand=wV;fn.prototype.h=function(){return!0};fn.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};fn.prototype.U=function(e){if(this.t!==void 0){var t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}};fn.prototype.subscribe=function(e){var t=this;return Sn(function(){var n=t.value,r=Et;Et=void 0;try{e(n)}finally{Et=r}})};fn.prototype.valueOf=function(){return this.value};fn.prototype.toString=function(){return this.value+""};fn.prototype.toJSON=function(){return this.value};fn.prototype.peek=function(){var e=Et;Et=void 0;try{return this.value}finally{Et=e}};Object.defineProperty(fn.prototype,"value",{get:function(){var e=jT(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(U_>100)throw new Error("Cycle detected");this.v=e,this.i++,fp++,qa++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{H_()}}}});function Ir(e){return new fn(e)}function $T(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function WT(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function GT(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function Ya(e){fn.call(this,void 0),this.x=e,this.s=void 0,this.g=fp-1,this.f=4}(Ya.prototype=new fn).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===fp))return!0;if(this.g=fp,this.f|=1,this.i>0&&!$T(this))return this.f&=-2,!0;var e=Et;try{WT(this),Et=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return Et=e,GT(this),this.f&=-2,!0};Ya.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}fn.prototype.S.call(this,e)};Ya.prototype.U=function(e){if(this.t!==void 0&&(fn.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};Ya.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(Ya.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=jT(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function j_(e){return new Ya(e)}function zT(e){var t=e.u;if(e.u=void 0,typeof t=="function"){qa++;var n=Et;Et=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,$_(e),r}finally{Et=n,H_()}}}function $_(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,zT(e)}function bV(e){if(Et!==this)throw new Error("Out-of-order effect");GT(this),Et=e,this.f&=-2,8&this.f&&$_(this),H_()}function Ol(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ol.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};Ol.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,zT(this),WT(this),qa++;var e=Et;return Et=this,bV.bind(this,e)};Ol.prototype.N=function(){2&this.f||(this.f|=2,this.o=Ml,Ml=this)};Ol.prototype.d=function(){this.f|=8,1&this.f||$_(this)};function Sn(e){var t=new Ol(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var G_,W_;function Ka(e,t){it[e]=t.bind(null,it[e]||function(){})}function pp(e){W_&&W_(),W_=e&&e.S()}function qT(e){var t=this,n=e.data,r=SV(n);r.value=n;var i=V_(function(){for(var s=t.__v;s=s.__;)if(s.__c){s.__c.__$f|=4;break}return t.__$u.c=function(){var o,a=t.__$u.S(),l=i.value;a(),R_(l)||((o=t.base)==null?void 0:o.nodeType)!==3?(t.__$f|=1,t.setState({})):t.base.data=l},j_(function(){var o=r.value.value;return o===0?0:o===!0?"":o||""})},[]);return i.value}qT.displayName="_st";Object.defineProperties(fn.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:qT},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});Ka("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var i in r)if(i!=="children"){var s=r[i];s instanceof fn&&(n||(t.__np=n={}),n[i]=s,r[i]=s.peek())}}e(t)});Ka("__r",function(e,t){pp();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var s;return Sn(function(){s=this}),s.c=function(){r.__$f|=1,r.setState({})},s}())),G_=r,pp(n),e(t)});Ka("__e",function(e,t,n,r){pp(),G_=void 0,e(t,n,r)});Ka("diffed",function(e,t){pp(),G_=void 0;var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,i=t.props;if(r){var s=n.U;if(s)for(var o in s){var a=s[o];a!==void 0&&!(o in r)&&(a.d(),s[o]=void 0)}else n.U=s={};for(var l in r){var c=s[l],h=r[l];c===void 0?(c=CV(n,l,h,i),s[l]=c):c.o(h,i)}}}e(t)});function CV(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,s=Ir(n);return{o:function(o,a){s.value=o,r=a},d:Sn(function(){var o=s.value.value;r[t]!==o&&(r[t]=o,i?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}Ka("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var i in r){var s=r[i];s&&s.d()}}}}else{var o=t.__c;if(o){var a=o.__$u;a&&(o.__$u=void 0,a.d())}}e(t)});Ka("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)});gi.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u,r=n&&n.s!==void 0;for(var i in t)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){if(!(r||2&this.__$f||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var s in e)if(s!=="__source"&&e[s]!==this.props[s])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function SV(e){return V_(function(){return Ir(e)},[])}var hp=class{url;alt;constructor(e){e.alt&&(this.alt=e.alt),this.url=e.url}},mp=class{d;cmp;effective;constructor(e={}){this.d=e.d,this.cmp=e.cmp,this.effective=this.d}},z_=class{id;mID;name;groupID;groupName;isSelected;constructor(e){e??={},this.id=e.id,this.mID=e.mID,this.name=e.name,this.groupID=e.groupID,this.groupName=e.groupName,this.isSelected=e.isSelected??!1}},vi=class{mID;name;imgs;link;price;sku;isAvailable;quantity;sellingPlans;selectedSellingPlan;effectivePrice;constructor(e){e=e??{},this.mID=e.mID,this.name=e.name,this.imgs=e.imgs?.map(t=>new hp(t))??[],this.link=e.link,this.price=new mp(e.price),this.sku=e.sku,this.isAvailable=e.isAvailable,this.quantity=e.quantity,this.effectivePrice=Ir(this.price.effective),e.sellingPlans?.length&&(this.selectedSellingPlan=Ir(void 0)),this.sellingPlans=e.sellingPlans?.map(t=>{let n=new z_(t);return n.isSelected&&(this.selectedSellingPlan.value=n),n})}getOneImage(){return this.imgs[0]?.url}changeSellingPlan(e){this.selectedSellingPlan.value=e}},Yn=class{id;mID;name;status;ctg;imgs;videos;portraitVideos;vars;desc;sDesc;link;slug;quantity;category;meta;reviews;tags;selectedOrFirstVariant;selected=Ir(!0);constructor(e){this.update(e),this.selectedOrFirstVariant=Ir(this.selectedVariant)}get imageURL(){return this.imgs?.[0]?.url}get secondaryImageURL(){return this.imgs?.[1]?.url}get getVariantImages(){return this.selectedOrFirstVariant.value.imgs}get variantImage(){return this.getVariantImages[0]?.url}get variantSecondaryImage(){return this.getVariantImages[1]?.url}get selectedVariant(){return this.vars.find(e=>e.isAvailable)??this.vars[0]}set variants(e){this.vars=e,this.selectedOrFirstVariant.value=this.selectedVariant}update(e){return this.id=e.id,this.mID=e.mID,this.name=e.name,this.status=e.status,this.ctg=e.ctg,this.imgs=e.imgs,this.desc=e.desc,this.sDesc=e.sDesc,this.link=e.link,this.slug=e.slug,this.quantity=e.quantity,this.meta=e.meta,this.category=e.category,this.videos=e.videos,this.reviews=e.reviews,this.portraitVideos=e.videos?.filter(t=>t.orientation==="PORTRAIT"),this.tags=e.tags,e.vars&&(this.vars=e.vars.map(t=>new vi(t))),this}toEmbed(e){return e=e??this.selectedOrFirstVariant.value,new mn({id:this.id,mID:this.mID,vID:e.mID,vName:e.name,name:this.name,link:this.link,slug:this.slug,price:e.price.d,imageURL:e.getOneImage()??this.imgs?.[0].url})}},gp=class{id;mID;handle;title;imageURL;constructor(e){e??={},this.id=e.id,this.mID=e.mID,this.handle=e.handle,this.title=e.title,this.imageURL=e.imageURL}},q_=class{enabled;constructor(e){this.enabled=e.enabled}},Y_=class extends q_{max;min;constructor(e){e??={},super(e),this.min=e.min,this.max=e.max}},yp=class{productQuantity;constructor(e){e??={},this.productQuantity=new Y_(e.productQuantity)}},Ts=class{s;g;i;constructor(e){e.s&&(this.s=new Ft(e.s)),e.g&&(this.g=new Pl(e.g)),this.i=e.i}get solid(){return this.s}get glossy(){return this.g}get img(){return this.i}},kl="a-f\\d",DV=`#?[${kl}]{3}[${kl}]?`,IV=`#?[${kl}]{6}([${kl}]{2})?`,TV=new RegExp(`[^#${kl}]`,"gi"),xV=new RegExp(`^${DV}$|^${IV}$`,"i");function K_(e,t={}){if(typeof e!="string"||TV.test(e)||!xV.test(e))throw new TypeError("Expected a valid hex string");e=e.replace(/^#/,"");let n=1;e.length===8&&(n=Number.parseInt(e.slice(6,8),16)/255,e=e.slice(0,6)),e.length===4&&(n=Number.parseInt(e.slice(3,4).repeat(2),16)/255,e=e.slice(0,3)),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let r=Number.parseInt(e,16),i=r>>16,s=r>>8&255,o=r&255,a=typeof t.alpha=="number"?t.alpha:n;if(t.format==="array")return[i,s,o,a];if(t.format==="css"){let l=a===1?"":` / ${Number((a*100).toFixed(2))}%`;return`rgb(${i} ${s} ${o}${l})`}return{red:i,green:s,blue:o,alpha:a}}var Ft=class{h;a=100;g;constructor(e){e??={},this.h=e.h,this.a=e.a,this.g=e.g}get hex(){return this.h}get grad(){return this.g}get rgba(){if(!this.hex)return"";try{return K_(this.hex,{format:"css",alpha:this.getAlpha()})}catch(e){return console.error("Invalid hex",e),"#000000"}}getAlpha(){return(this.a??100)/100}},xs=class{s;r;w;c;constructor(e){this.s=e.s,this.r=e.r,this.w=e.w,e.c&&(this.c=new Ft(e.c))}get radius(){return this.r}get width(){return this.w}get color(){return this.c}get style(){return YT[this.s??1]}},YT=(e=>(e[e.SOLID=1]="SOLID",e[e.DASHED=2]="DASHED",e))(YT||{}),Pl=class ID{static DEFAULT_FALLBACK=new Ft({h:"#000000",a:50});r;c;fb;constructor(t){this.r=t.r,t.c&&(this.c=new Ft(t.c)),t.fb&&(this.fb=new Ft(t.fb))}get radius(){return this.r}get color(){return this.c}get fallback(){return this.fb??ID.DEFAULT_FALLBACK}},Ll=class{blur;spr;clr;x;y;constructor(e){e=e??{},this.blur=e.blur??0,this.spr=e.spr??0,this.x=e.x??0,this.y=e.y??0,this.clr=new Ft(e.clr)}getStyle(e){return`${this.x*e}px ${this.y*e}px ${this.blur*e}px ${this.spr*e}px ${this.clr.rgba}`}},Yi=class{pl;pr;pt;pb;ml;mr;mt;mb;cent;constructor(e){e=e??{},this.pl=e.pl??0,this.pr=e.pr??0,this.pt=e.pt??0,this.pb=e.pb??0,this.ml=e.ml??0,this.mr=e.mr??0,this.mt=e.mt??0,this.mb=e.mb??0,this.cent=e.cent??!1}getHorizontal(){return this.pl+this.pr}getVertical(){return this.pt+this.pb}getPaddingCSS(){return`${this.pt}px ${this.pr}px ${this.pb}px ${this.pl}px`}},Rs=class{rot;constructor(e){e?.rot&&(this.rot=e.rot)}get rotate(){return this.rot}},cr=class{t;bg;br;clc;shd;spc;trf;a;w;h;x;y;constructor(e){this.t=e.t,e.bg&&(this.bg=new Ts(e.bg)),e.br&&(this.br=new xs(e.br)),e.shd&&(this.shd=new Ll(e.shd)),e.spc&&(this.spc=new Yi(e.spc)),this.trf=new Rs(e.trf),this.clc=e.clc,this.w=e.w,this.h=e.h,this.x=e.x,this.y=e.y,this.a=e.a}get alpha(){return this.a??100}get type(){return this.t}get typeAsString(){return Pt[this.t]}get click(){return this.clc}},Pt=(e=>(e[e.IMAGE=1]="IMAGE",e[e.TEXT=2]="TEXT",e[e.BUTTON=3]="BUTTON",e[e.FLEXBOX=4]="FLEXBOX",e[e.MULTI_COLUMN=5]="MULTI_COLUMN",e[e.CHECKBOX=6]="CHECKBOX",e[e.PRODUCTS=11]="PRODUCTS",e[e.PRODUCT=12]="PRODUCT",e[e.PRODUCT_IMAGE=13]="PRODUCT_IMAGE",e[e.PRODUCT_TITLE=14]="PRODUCT_TITLE",e[e.PRODUCT_VARIATIONS=15]="PRODUCT_VARIATIONS",e[e.PRODUCT_VARIATIONS_SELLING_PLANS=16]="PRODUCT_VARIATIONS_SELLING_PLANS",e[e.PRODUCT_BUTTON=18]="PRODUCT_BUTTON",e[e.PRODUCT_RATING=19]="PRODUCT_RATING",e[e.EMAIL_INPUT=51]="EMAIL_INPUT",e[e.PHONE_INPUT=52]="PHONE_INPUT",e[e.COUNTDOWN_TIMER=61]="COUNTDOWN_TIMER",e[e.CAROUSEL=62]="CAROUSEL",e[e.SHAPE=100]="SHAPE",e))(Pt||{}),Ns=class extends cr{constructor(e){super(e)}},Ki=class extends cr{src;constructor(e){super(e),this.src=e.src}},Za=(e=>(e[e.START=0]="START",e[e.CENTER=1]="CENTER",e[e.END=2]="END",e[e.JUSTIFY=3]="JUSTIFY",e))(Za||{}),vp=class{name;fonts;constructor(e){e=e??{},e.name&&(e.name=e.name!=="Arial"?e.name:""),this.name=e.name,this.fonts=e.fonts?.map(t=>new Z_(t))}},Z_=class{style;url;constructor(e){e=e??{},this.style=e.style,this.url=e.url}getFontDescriptor(){return{style:this.style===2||this.style===4?"italic":"normal",weight:this.style===4||this.style===3?"700":"400"}}getURL(){return`url('${this.url}') format('truetype')`}},Dn=class{fw;fs;fam;fmly;lh=1.2;ls;s;tc;ta;td;tdc;constructor(e){this.update(e)}get alignment(){return Za[this.ta]}get letterSpacing(){return this.ls?this.ls+"px":"normal"}update(e){e=e??{},e.lh&&(this.lh=e.lh),e.tdc&&(this.tdc=new Ft(e.tdc)),this.td=e.td,this.fs=e.s??e.fs??60,this.tc=new Ft(e.tc),this.ta=e.ta??1,this.fw=e.fw??400,this.ls=e.ls??0,this.tc.h??="#000000",this.fam=new vp(e.fam??e.fmly)}resize(e){this.s*=e,this.ls*=e}},_i=class extends cr{typo;constructor(e){super(e);let t=w(w({},e.f),e.typo);e.alg&&(t.ta=e.alg),e.c&&(t.tc=e.c),this.typo=new Dn(t)}get color(){return this.typography.tc}get typography(){return this.typo}},Co=class extends _i{prs;constructor(e){super(e),this.prs=e.prs}get parts(){return this.prs}},_p=class extends cr{o;constructor(e){super(e),this.o=e.o??5,this.w=this.w??1080,this.h=this.h??1920}getOrigin(){return this.o}},Xa=class{dd;hh;mm;ss;date;constructor(e){e??={},this.dd=e.dd??0,this.hh=e.hh??0,this.mm=e.mm??0,this.ss=e.ss??0,this.date=e.date?new Date(e.date):void 0}start(e,t){let n=new Date;e===2?(n.setSeconds(n.getSeconds()+this.ss),n.setMinutes(n.getMinutes()+this.mm),n.setHours(n.getHours()+this.hh),n.setDate(n.getDate()+this.dd)):n=this.date??new Date;let r=window.setInterval(()=>{let i=new Date().getTime(),s=n.getTime()-i;if(s<1){clearInterval(r);return}let o=Math.floor(s/(1e3*60*60*24)),a=Math.floor(s%(1e3*60*60*24)/(1e3*60*60)),l=Math.floor(s%(1e3*60*60)/(1e3*60)),c=Math.floor(s%(1e3*60)/1e3);t({days:o,hours:a,minutes:l,seconds:c})},1e3);return r}},Ja=class extends _i{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e),this.gap=e.gap,this.timerType=e.type,this.timer=new Xa(e.timer),this.show=e.show??{day:!0,hour:!0,minute:!0,second:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}},Ep=class{txt;c;constructor(e){e??={},this.txt=e.txt,this.c=new Ft(e.c??{})}get text(){return this.txt}get color(){return this.c}},So=class extends _i{ph;constructor(e){super(e),this.ph=new Ep(e.ph)}get placeholderText(){return this.ph.text}get placeholderColor(){return this.ph.color.rgba}},Qa=class extends So{constructor(e){e??={},super(e)}},ec=class extends So{},tc=class extends So{},nc=class extends Ki{},wp=class{en;ex;constructor(e){e=e??{},this.en=e.en,this.ex=e.ex}getEnterAnimation(){switch(this.en){case 2:return[{transform:"translateY(-100%)"},{transform:"translateY(0%)"}];case 3:return[{transform:"translateY(100%)"},{transform:"translateY(0%)"}];case 4:return[{transform:"translateX(-100%)"},{transform:"translateX(0%)"}];case 5:return[{transform:"translateX(100%)"},{transform:"translateX(0%)"}];case 6:return[{transform:"translate(-100%, -100%)"},{transform:"translate(0%, 0%)"}];case 7:return[{transform:"translate(100%, -100%)"},{transform:"translate(0%, 0%)"}];case 8:return[{transform:"translate(-100%, 100%)"},{transform:"translate(0%, 0%)"}];case 9:return[{transform:"translate(100%, 100%)"},{transform:"translate(0%, 0%)"}];case 10:return[{transform:"scale(0.1)"},{transform:"scale(1)"}];default:return[]}}getExitAnimation(){switch(this.ex){case 2:return[{transform:"translateY(0%)"},{transform:"translateY(-100%)"}];case 3:return[{transform:"translateY(0%)"},{transform:"translateY(100%)"}];case 4:return[{transform:"translateX(0%)"},{transform:"translateX(-100%)"}];case 5:return[{transform:"translateX(0%)"},{transform:"translateX(100%)"}];case 6:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, -100%)"}];case 7:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, -100%)"}];case 8:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, 100%)"}];case 9:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, 100%)"}];case 10:return[{transform:"scale(1)"},{transform:"scale(0)"}];default:return[]}}},Fl=class extends cr{gvt;max;cover;anim;embedded;position;constructor(e){e=e??{},super(e),this.gvt=e.gvt??5,this.max=e.max,this.cover=e.cover??!0,this.anim=new wp(e.anim),this.embedded=e.embedded,this.position=e.position??1,this.spc||(this.spc=new Yi({pl:k.IN_APP_DEFAULT_PADDING,pr:k.IN_APP_DEFAULT_PADDING,pt:k.IN_APP_DEFAULT_PADDING,pb:k.IN_APP_DEFAULT_PADDING}))}isEmbedded(){return this.position===2&&!!this.embedded}getEmbeddedSelector(){return`.letscooee-engagement.container-${this.embedded}`}},bp=class extends Fl{cont;elems=[];mob;constructor(e){e=e??{},super(e),this.cont=new _p(e.cont),this.mob=new Fl(e.mob),this.bg||(this.bg=this.cont.bg,delete this.cont.bg),e.elems.forEach(t=>{t.t===1?this.elems.push(new Ki(t)):t.t===2?this.elems.push(new Co(t)):t.t===3?this.elems.push(new Co(t)):t.t===100?this.elems.push(new Ns(t)):t.t===51?this.elems.push(new ec(t)):t.t===52?this.elems.push(new tc(t)):t.t===61?this.elems.push(new Ja(t)):t.t===15||t.t===16?this.elems.push(new Qa(t)):t.t===13&&this.elems.push(new nc(t))})}getStylesForWrapper(){if(this.cover)return{};let e;return this.gvt===1?e={top:0,left:0}:this.gvt===2?e={top:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===3?e={top:0,right:0}:this.gvt===6?e={top:"50%",right:0,transform:"translateY(-50%)"}:this.gvt===9?e={bottom:0,right:0}:this.gvt===8?e={bottom:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===7?e={bottom:0,left:0}:this.gvt===4?e={top:"50%",left:0,transform:"translateY(-50%)"}:e={top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},e.overflow="visible",e}getFlexStylesForContainer(){let e={display:"flex",flexDirection:"row"},t,n;return this.gvt===1?(t="flex-start",n="flex-start"):this.gvt===2?(t="center",n="flex-start"):this.gvt===3?(t="flex-end",n="flex-start"):this.gvt===4?(t="flex-start",n="center"):this.gvt===6?(t="flex-end",n="center"):this.gvt===7?(t="flex-start",n="flex-end"):this.gvt===8?(t="center",n="flex-end"):this.gvt===9?(t="flex-end",n="flex-end"):(t="center",n="center"),e.alignItems=n,e.justifyContent=t,e.overflow="visible",e}overrideForMobileView(){this.max=this.mob.max??this.max,this.cover=this.mob.cover??this.cover,this.gvt=this.mob.gvt??this.gvt,this.bg=this.mob.bg??this.bg,this.spc=this.mob.spc??this.spc,this.anim=this.mob.anim??this.anim,this.position=this.mob.position??this.position,this.embedded=this.mob.embedded??this.embedded}},rc=class{gap;dir;wrap;jc;ai;scroll;constructor(e){e??={},this.gap=e.gap??0,this.dir=e.dir??"row",this.wrap=e.wrap??"nowrap",this.jc=e.jc??"flex-start",this.ai=e.ai??"flex-start",this.scroll=e.scroll}},Cp=class{of;disp;pos;top;bottom;left;right;zIndex;constructor(e){e??={},this.of=e.of,this.disp=e.disp,this.pos=e.pos,this.top=e.top,this.bottom=e.bottom,this.left=e.left,this.right=e.right,this.zIndex=e.zIndex}},Sp=class{w;h;maxW;maxH;minW;minH;constructor(e){e??={},this.w=e.w??"100%",this.h=e.h??"auto",this.maxW=e.maxW,this.maxH=e.maxH,this.minW=e.minW,this.minH=e.minH}},Dp=class{size;bg;br;spc;typo;lout;flex;constructor(e){e??={},this.spc=new Yi(e.spc),e.size&&(this.size=new Sp(e.size)),e.bg&&(this.bg=new Ts(e.bg)),e.br&&(this.br=new xs(e.br)),e.typo&&(this.typo=new Dn(e.typo)),e.lout&&(this.lout=new Cp(e.lout)),e.flex&&(this.flex=new rc(e.flex))}},ic=class{sm;lg;constructor(e){e??={},this.sm=new Dp(e.sm),this.lg=new Dp(e.lg)}},_n=class{t;style;hide;when;clc;constructor(e,t){t??={},this.t=e,this.style=new ic(t.style),this.hide=t.hide,t.when?.op&&(this.when=t.when),t.clc&&(this.clc=t.clc)}get stringType(){return Pt[this.t]}},En=class extends _n{text;constructor(e,t){e?.style?.lg?.typo?.s&&delete e.style.lg.typo.s,e?.style?.sm?.typo?.s&&delete e.style.sm.typo.s,super(t??2,e),e??={},this.text=e.text}},As=class extends En{constructor(e,t){super(e,t??3)}},oc=class extends _n{value;constructor(e){super(6,e),e??={},this.value=e.value}},sc=class extends En{constructor(e=15,t){super(t,e)}},Ip=class extends _n{c;iconSize;showSingleStar;fullStar;halfStart;constructor(e){super(19,e),e??={},this.c=new Ft(e.c),this.iconSize=e.iconSize??24,this.showSingleStar=e.showSingleStar??!1,this.fullStar=e.fullStar,this.halfStart=e.halfStart}},KT=Re(us()),X_=class{enabled;type;color;constructor(e){e??={},this.enabled=e.enabled,this.type=e.type,this.color=new Ft(e.color)}},J_=class{size;enabled;color;constructor(e){e??={},this.enabled=e.enabled,this.size=e.size,this.color=new Ft(e.color)}},Bl=class{navigation;pagination;autoplay;maxInRow;gap;slidesPerView;constructor(e){e??={},this.navigation=new J_(e.navigation),this.pagination=new X_(e.pagination),this.autoplay=e.autoplay,this.slidesPerView=e.slidesPerView??1,this.maxInRow=e.maxInRow??e.slidesPerView??4,this.gap=e.gap??0}},Tp=class extends _n{conf;slide;formData;values;allowedTypes;constructor(e){super(62,e),e&&this.update(e)}update(e){e??={},this.slide=lr.getParsedElement(e.slide),this.formData=e.formData,this.values=e.values,this.conf=new Bl(e.conf),this.allowedTypes=e.allowedTypes}},xp=class extends En{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e,61),this.gap=e.gap,this.timerType=e.type,this.timer=new Xa(e.timer),this.show=e.show??{days:!0,hours:!0,minutes:!0,seconds:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}},Do=class extends _n{elems;constructor(e){super(4,e),this.update(e)}update(e){e??={},this.elems??=[],e.elems?.forEach(t=>{let n=lr.getParsedElement(t);n&&this.elems.push(n)})}},Ms=class extends _n{src;sm;lg;constructor(e,t){super(t??1,e),e&&this.update(e)}update(e){this.src=e.src,this.sm=e.sm,this.lg=e.lg}},lr=class OD{static getParsedElements(t){let n=[];return t?.forEach(r=>{let i=OD.getParsedElement(r);i&&n.push(i)}),n}static getParsedElement(t){switch(t.t){case 2:return new En(t);case 3:return new As(t);case 6:return new oc(t);case 11:return new Rp(t);case 12:return new Io(t);case 61:return new xp(t);case 4:return new Do(t);case 1:return new Ms(t);case 13:return new Ms(t,13);case 14:return new En(t,14);case 15:case 16:return new sc(t.t,t);case 18:return new As(t,18);case 62:return new Tp(t);case 19:return new Ip(t);default:KT.default.error("Unknown element type",t.t);return}}static parseAlignmentToJustifyContent(t){switch(t){case 1:return"center";case 2:return"flex-end";case 0:return"flex-start";default:return"flex-start"}}},Io=class extends _n{img;title;desc;price;compareAt;btn;variantDD;show;symbol;cBox;elems;noLinks;constructor(e){if(e??={},super(12,e),this.show=e.show,this.elems=lr.getParsedElements(e.elems),this.noLinks=e.noLinks,!this.elems.length){e.cBox&&this.elems.push(new oc(e.cBox)),this.elems.push(new Ms(e.img,13));let t=new En(e.title,14);t.hide=!e.show?.title,t.text="{{ product.name }}",this.elems.push(t);let n=new En(e.price);n.text="{{ product.price }}",n.hide=!e.show?.price;let r=new En(e.compareAt);r.text="{{ product.compare_price }}",r.hide=!e.show?.price,e.compareAt||(r.style=new ic(n.style),r.style.lg.typo=new Dn(te(w({},r.style.lg.typo),{td:"line-through"})),r.style.sm.typo=new Dn(te(w({},r.style.sm.typo),{td:"line-through"})));let i=new Do({style:{lg:{spc:{mb:10},flex:{dir:"row",gap:10,ai:"center",jc:lr.parseAlignmentToJustifyContent(n.style.lg.typo?.ta)}}}});i.elems.push(r),i.elems.push(n),this.elems.push(i);let s=new sc(15,e.variantDD);if(s.hide=!e.show?.variantDD,this.elems.push(s),e.btn){let o=new As(e.btn,18);o.hide=!e.show?.btn,this.elems.push(o)}}e.symbol&&(this.symbol=new En(e.symbol))}},Rp=class extends _n{conf;prod;constructor(e){super(11,e),e??={},this.conf=new Q_(e.conf),this.prod=new Io(e.prod)}},Np=class extends Bl{disp;maxItems;constructor(e){e??={},super(e),this.disp=e.disp,this.maxItems=e.maxItems}},Q_=class{lg;sm;constructor(e){e??={},this.lg=new Np(e.lg),this.sm=new Np(e.sm)}},Ap=class extends Do{constructor(e){super(e)}},ac=class{cont;elems=[];constructor(e){e=e??{},this.cont=new Ap(e.cont),e.elems?.forEach(t=>{this.addRawElement(t)})}addRawElement(e){let t=lr.getParsedElement(e);return t&&this.elems.push(t),t}},ZT=Re(qn()),eE=class{minValue;rewardType;label;reachingText;reachedText;discount;items;calculatedAlignment;constructor(e){this.minValue=e.minValue,this.rewardType=e.rewardType,this.label=e.label,this.reachingText=e.reachingText,this.reachedText=e.reachedText,this.discount=e.discount,this.items=e.items?.map(t=>new mn(t))}},Mp=class{layout;milestones;onlyLatestGift;noConfetti;constructor(e){this.layout=e.layout??ZT.ProgressBarLayout.ICONS,this.milestones=e.milestones?.map(t=>new eE(t))??[],this.onlyLatestGift=e.onlyLatestGift,this.noConfetti=e.noConfetti}},Op=class{applyDiscountOnMinimum;constructor(e){this.applyDiscountOnMinimum=e.applyDiscountOnMinimum}},tE=class{engagementID;shortID;contentType;delay;onsiteDeliveryType;objective;redirectBehaviour;constructor(e){this.shortID=e.shortID,this.contentType=e.contentType,this.engagementID=e.engagementID,this.delay=e.delay??0,this.redirectBehaviour=e.redirectBehaviour,this.onsiteDeliveryType=e.onsiteDeliveryType,this.objective=e.objective}isAnySplit(){return this.isABTesting()||this.isExclusionTesting()}isExclusionTesting(){return this.contentType===In.EngagementContentType.EXCLUSION}isABTesting(){return this.contentType===In.EngagementContentType.ABTESTING}isSingleContent(){return this.contentType===In.EngagementContentType.SINGLE}},Hn=class kD extends tE{static SWIPER_ELEMENTS=new Set([11,62]);nudgeID;contentID;variation;ian;widget;discount;placement;promotionType;contentSource;manipulation;klaviyoFormID;hasMultiplePlacement;skipSubscribedItems;progressBarConfig;bundleConfig;content;previewType;occurred;id;currency;props;items;nonMutableItems;embeddedItems;bundleFrom;collections;customerData;experiment;discountData=Ir({});constructor(t){super(t),this.id=t.id,this.nudgeID=t.nudgeID,this.currency=Oe.get().currencyCode??"USD",this.contentID=t.contentID,this.variation=t.variation,t.widget&&(this.widget=new ac(t.widget)),this.previewType=t.previewType,this.occurred=t.occurred??new Date,this.props=t.props,this.embeddedItems=t.embeddedItems?.map(n=>new mn(n)),this.items=t.items?.map(n=>new Yn(n))??[],this.nonMutableItems=t.items?.map(n=>new Yn(n))??[],this.collections=t.collections?.map(n=>new gp(n))??[],this.discount=t.discount,this.placement=t.placement,this.customerData=t.customerData,this.ian=t.ian?this.processPopup(t.ian):void 0,this.promotionType=t.promotionType,this.manipulation=new yp(t.manipulation),this.contentSource=t.contentSource,this.klaviyoFormID=t.klaviyoFormID,this.hasMultiplePlacement=t.hasMultiplePlacement,this.skipSubscribedItems=t.skipSubscribedItems,this.experiment=t.experiment,t.progressBarConfig&&(this.progressBarConfig=new Mp(t.progressBarConfig)),t.bundleConfig&&(this.bundleConfig=new Op(t.bundleConfig)),t.bundleFrom&&(this.bundleFrom=new Yn(t.bundleFrom)),t.content?.videoConfig&&(this.content={videoConfig:new Wf(t.content.videoConfig)})}shouldDelay(){return this.delay>0}sentryContext(){return{id:this.id,shortID:this.shortID,currency:this.currency,contentType:this.contentType,objective:this.objective,onsiteDeliveryType:this.onsiteDeliveryType,engagementID:this.engagementID,contentID:this.contentID,nudgeID:this.nudgeID,variation:this.variation}}getDelaySeconds(){let t=new Date().getTime()-this.occurred.getTime();return this.delay*1e3-t}isBundle(){return this.objective===In.EngagementObjective.BUNDLE_AND_UPSELL}isCartEmbed(){return this.onsiteDeliveryType===In.OnsiteDeliveryType.CART_EMBED}isPageEmbed(){return this.onsiteDeliveryType===In.OnsiteDeliveryType.PAGE_EMBED}isProgressBar(){return this.objective===In.EngagementObjective.PROGRESS_BAR}isSubscriptionUpsell(){return this.objective===In.EngagementObjective.SUBSCRIPTION_UPSELL}isCartRecovery(){return this.objective===In.EngagementObjective.CART_RECOVERY}isProductPromotion(){return this.objective===In.EngagementObjective.PRODUCT_PROMOTION}isProductPromoted(){return this.isProductPromotion()||this.isBundle()||this.isCartRecovery()}isCollectionPromoted(){return this.isProductPromotion()&&this.collections.length>0&&this.promotionType===In.PromotionType.COLLECTION}isBYOB(){return this.objective===In.EngagementObjective.BYOB}isShoppableVideo(){return this.objective===In.EngagementObjective.SHOPPABLE_VIDEO}processPopup(t){let n=JSON.stringify(t),r=this.items[0],i={},s={};if(r){let l=r.selectedOrFirstVariant.value;i={name:r.name,id:r.mID,link:r.link,vID:l.mID,image:r.variantImage,price:le.formatCurrency(l.price.d),comparePrice:le.formatCurrency(l.price.cmp),quantity:r.quantity},s={quantity:l.quantity}}let o={productCount:Ge.getCurrent().item_count},a=vn.render(n,{product:i,variant:s,cart:o,discount:this.discount,customer:this.customerData});return r&&(a=a.replace(new RegExp(k.PLACEHOLDER_IMAGE,"gi"),r.variantImage??r.imageURL)),new bp(JSON.parse(a))}calculateDiscountData(t,n){let r=Pp.ArrayUtils.sum(t,o=>o.selectedOrFirstVariant.value.price.d),i=Pp.ArrayUtils.sum(t,o=>{let a=o.selectedOrFirstVariant.value.price;return a.cmp??a.d});console.log("TestLog:EngagementTrigger:calculateDiscountData:337",i);let s={actualPrice:r,totalComparePrice:i,discountAmount:0,discountPercentage:0,discountedPrice:r};if(!t?.length||!n||!this.discount?.type){this.discountData.value=this.formatCurrencyAndNumber(s);return}if(To.DiscountType.BXGY===this.discount.type&&this.discount.values?.length)s.discountPercentage=this.discount.values[0],this.updateEffectivePrice(t,s.discountPercentage,!0),s.discountAmount=s.actualPrice-Pp.ArrayUtils.sum(t,o=>o.selectedOrFirstVariant.value.effectivePrice.value);else if([To.DiscountType.UNIQUE_FLAT_ITEMS,To.DiscountType.STATIC].includes(this.discount.type)&&this.discount.values?.length)s.discountPercentage=this.discount.values[0],s.discountAmount=s.actualPrice*s.discountPercentage/100,this.updateEffectivePrice(t,s.discountPercentage);else if(this.discount.type===To.DiscountType.UNIQUE_FIXED_ITEMS&&this.discount.values?.length)s.discountAmount=s.actualPrice-this.discount.values[0],s.discountPercentage=s.discountAmount/s.actualPrice*100,this.updateEffectivePrice(t,s.discountPercentage);else if(this.discount.type===To.DiscountType.UNIQUE_CHEAPEST_ITEM_FREE){t.sort((a,l)=>l.selectedOrFirstVariant.value.price.d-a.selectedOrFirstVariant.value.price.d);let o=t[t.length-1];o.selectedOrFirstVariant.value.effectivePrice.value=0,s.discountAmount=o.selectedOrFirstVariant.value.price.d,s.discountPercentage=s.discountAmount/s.actualPrice*100}s.discountedPrice=s.actualPrice-s.discountAmount,this.discountData.value=this.formatCurrencyAndNumber(s)}getPrivateAttributesForLineItem(){return vt.get().skipItemAttribute?{}:{[k.VIA]:"Cooee",[k.CAMPAIGN_ATTRIBUTE]:this.shortID,[k.CONTENT_ATTRIBUTE]:this.contentID}}getKVFormatPrivateAttributesForLineItem(){return vt.get().skipItemAttribute?[]:[{key:k.VIA,value:"Cooee"},{key:k.CAMPAIGN_ATTRIBUTE,value:this.shortID},{key:k.CONTENT_ATTRIBUTE,value:this.contentID}]}isBundleDiscount(){return[To.DiscountType.UNIQUE_FIXED_ITEMS,To.DiscountType.UNIQUE_FLAT_ITEMS].includes(this.discount.type)}isBundleOnCartDrawer(){return this.isBundle()&&this.isCartEmbed()}isBundleOnPDP(){return this.isPageEmbed()&&this.isBundle()}hasSwiperElement(){let t=this.widget?.elems.find(r=>kD.SWIPER_ELEMENTS.has(r.t));if(!t)return!1;if(t.t===62)return!0;let n=sr.get().isMobile()?"sm":"lg";return t.conf[n].disp===2}toString(){return`Engagement(id=${this.shortID})`}getCartMagicVariables(){let t=Ge.getCurrent();return{productCount:t.item_count,amount:le.formatCurrency(t.total_price/100),originalAmount:le.formatCurrency(t.original_total_price/100)}}updateEffectivePrice(t,n,r=!1){let i=Oe.get().getCurrentItem();t.forEach(s=>{let o=s.selectedOrFirstVariant.value,a=o.price;if(r&&s.mID===i.mID)o.effectivePrice.value=a.d;else{let l=a.d*n/100;o.effectivePrice.value=a.d-l}})}formatCurrencyAndNumber(t){if(!t)return{};let n={discountPercentage:le.formatNumber(t.discountPercentage??0),discountCode:this.discount?.code};return["actualPrice","discountAmount","discountedPrice","totalComparePrice"].map(r=>{n[r]=le.formatCurrency(t[r])}),n}},Yl=Re(qn()),tx=Re(D_()),nx=Re(Ta()),cc=class{constructor(e,t){this._startTime=e,this._triggerData=t}intervals=[];selectedEmbeddedItems;renderer;closeCallback;inputFields=[];get startTime(){return this._startTime}get triggerData(){return this._triggerData}get inputs(){return this.inputFields}get rootClassName(){let e=this.triggerData.shortID??this.triggerData.id.slice(-6);return e==="test"&&(e="test-"+this.startTime.getTime().toString()),k.IN_APP_WRAPPER_NAME+"-"+e}get selectedItems(){return this.triggerData.items.filter(e=>e.selected.value)}get shouldGiveFBTDiscount(){let e=this.selectedItems.length;return this.triggerData.bundleConfig?.applyDiscountOnMinimum?this.triggerData.bundleConfig.applyDiscountOnMinimum<=e:e===this.triggerData.items.length}onClose(e){this.closeCallback=e}closeInApp(e,t){t??={};let n=(new Date().getTime()-this.startTime.getTime())/1e3,r=w({eventName:e,duration:n},t);this.stopIntervals(),this.closeCallback&&this.closeCallback(r)}addInputField(e,t){this.inputFields.push({id:e,type:t,isValid:!1})}updateValidation(e,t){this.inputFields.forEach(n=>{if(n.id===e){n.isValid=t;return}})}hasManipulatedProductQuantity(){let e=this.triggerData.manipulation.productQuantity;return e?.enabled&&e.min!=null&&e.max!=null}getManipulatedQuantity(e){let{min:t=1,max:n=100}=this.triggerData.manipulation.productQuantity;if(t>n)return C.error("Invalid range: min should be less than or equal to max."),e;if(e>=t&&e<=n)return e;let r=e%100;return r<t?t:r>n?n:r}stopIntervals(){this.intervals.forEach(e=>clearInterval(e))}},rx=Re(us()),XT=Re(iE()),Os=class{static _flags={};static getFlags(){return this._flags}static setFlags(e){this._flags=e??{}}static isECommerceApp(){return Dt.isShopify()}},NV=(0,XT.default)(fetch),AV={retryDelay:k.API_CALL_RETRY_DELAY,retryOn:(e,t,n)=>e>=k.API_CALL_MAX_ATTEMPTS?!1:!!(t!==null||n?.status&&n?.status>=500)},On=class RD{static INSTANCE;apiToken="";firstSeen="";constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new RD),this.INSTANCE}async validateSession(t){return this.post("/v1/event/validate-session",t)}updateUserData(t){this.put("/v1/user/update",t).then(async n=>{C.log("Updated user profile"),await Ps.getInstance().storeAndPopulateAuthData(n)}).catch(n=>{C.error("Error saving user profile",n)})}trackOrder(t){this.post("/v1/event/track-order",t).then(()=>{C.log("Sent Order")}).catch(n=>{C.error("Error sending track order",n)})}generateDiscount(t){return this.post("/v1/event/generate-discount",t)}updateDeviceProps(t){this.put("/v1/device/update",t).then(()=>{C.log("Updated device property")}).catch(async n=>{C.error("Error saving device property",n)})}setAPIToken(t){this.apiToken=t??""}setFirstSeen(t){this.firstSeen=t?.toUTCString()??""}get(t){return this.requestBackend("GET",t)}post(t,n){return this.requestBackend("POST",t,n)}put(t,n){return this.requestBackend("PUT",t,n)}async requestBackend(t,n,r){if(!Os.isECommerceApp()&&!Os.getFlags().allowEvents)return C.log(`Rejecting ${t} ${n} as this is not e-commerce app`),Promise.reject();n.startsWith("http")||(n=hn.apiURL+n);let i=this.getDefaultHeaders(),s="keepalive"in new Request("");if(r&&!s&&JSON.stringify(r).includes("CE App Background"))try{return this.performXMLHttpRequest(n,i,r)}catch(a){return _t.getInstance().captureException(a,{body:JSON.stringify(r)}),{}}let o={method:t,headers:i,keepalive:!0};return r&&(o.body=JSON.stringify(r)),this.request(n,o)}async request(t,n){let r=w(w({},AV),n),i=await NV(t,r);if(!i.ok)throw i;return i.json()}performXMLHttpRequest(t,n,r){return new Promise((i,s)=>{let o=new XMLHttpRequest;o.open("POST",t,!0),n.forEach((a,l)=>{o.setRequestHeader(l,a)}),o.onreadystatechange=()=>{if(o.readyState===XMLHttpRequest.DONE)if(o.status>=200&&o.status<300)try{o.getResponseHeader("Content-Type")?.includes("application/json")?i(JSON.parse(o.responseText)):s(new Error("Content-Type of response header is not json"))}catch(a){s(a)}else s(new Error(`Received status - ${o.status}(${o.statusText})`))},o.onerror=()=>{s(new Error("Network error occurred during the request."))},o.send(JSON.stringify(r))})}getDefaultHeaders(){let t=new Headers;return t.set("content-type","application/json"),t.set("cooee-sdk",k.SDK),t.set("cooee-sdk-code",k.SDK_VERSION_CODE.toString()),t.set("cooee-sdk-version",k.SDK_VERSION),t.set("cooee-first-seen",this.firstSeen),this.apiToken&&t.append("cooee-sdk-token",this.apiToken),hn.debug&&t.set("cooee-sdk-debug",String(1)),t}},lc=class{static sentryService=_t.getInstance();static httpApiService=On.getInstance();static async refreshItems(e){if(e.isCartEmbed()&&!e.isSubscriptionUpsell()){let i=(await Ge.getCurrent().getNormalisedCart()).items.map(s=>s.mID);e.items=e.items.filter(s=>!i.includes(s.mID))}if(vt.get().currencyCount<=1)return e.items;let t=e.items.length,n=e.items.map(i=>this.updatedItem(i,e.engagementID)),r=(await Promise.all(n)).filter(i=>i!=null);if(t&&!r.length){let i="Failed to fetch any product from Ajax API",s=new We(k.EVENT_CAMPAIGN_FAILED,{reason:i,currency:e.currency},e);throw Ve.getInstance().sendEvent(s),new Error(i)}if(e.isCartRecovery()){let i=Ge.getCurrent().items,s=[];for(let o of r)for(let a of o.vars){if(!a.isAvailable)continue;let l=i.find(d=>d.variant_id.toString()===a.mID);if(!l)continue;let c=new Yn(o);c.name=l.title;let h=new vi(a);h.name=l.variant_title,h.price.d=l.discounted_price/100,c.variants=[h],s.push(c)}return s}return r}static async updatedItem(e,t){let n=e,r,i=`/products/${n.slug}.js`;try{r=await this.httpApiService.request(i)}catch(o){return C.error(`Failed to fetch ${i}`,o),o instanceof Response?this.sentryService.captureMessage(`Shopify product fetch failed ${o.status}`,"error",{item:n,path:i},{"engagement.id":t}):this.sentryService.captureException(o,{item:n,path:i},{"engagement.id":t}),null}if(!r)return C.error("Item not found after AJAX call for:",n),null;n.name=r.title,n.tags=r.tags;let s=n.selectedOrFirstVariant.value;return n.vars.map(o=>{let a=r.variants.find(l=>l.id===+o.mID);o.name=a.title,o.isAvailable=a.available,o.price.d=a.price?a.price/100:a.price,o.price.effective=o.price.d,o.price.cmp=a.compare_at_price?a.compare_at_price/100:a.compare_at_price,+s.mID===a.id&&(s.effectivePrice.value=o.price.d)}),n}},uc=class{constructor(e){this.scalingFactor=e}getLayoutStyles(e){if(!e)return{display:"block"};let t={display:e.disp};return e.of&&(t.objectFit=e.of),e.pos==="absolute"&&(t.width="auto !important",t.position="absolute",t.right=e.right+"px",t.left=e.left+"px",t.top=e.top+"px",t.bottom=e.bottom+"px"),t}getSizeStyles(e){let t={};return e?.w&&(t.width=e.w),e?.h&&(t.height=e.h),e?.maxW&&(t.maxWidth=e.maxW),e?.maxH&&(t.maxHeight=e.maxH),e?.minW&&(t.minWidth=e.minW),e?.minH&&(t.minHeight=e.minH),t}getBorderStyles(e){if(!e)return{};let t={};return e.radius&&e.radius>0&&(t.borderRadius=this.getSizePx(e.radius)),e.width&&e.width>0&&(t.borderWidth=this.getSizePx(e.width),t.borderStyle=e.style?.toLowerCase(),e.color?this.getColourStyles(e.color,"border-color",t):t.borderColor="black"),t}getFlexStyles(e){return e?{gap:e.gap+"px",flexWrap:e.wrap,flexDirection:e.dir,justifyContent:e.jc,alignItems:e.ai,width:"100%"}:{}}getSpaceStyles(e){let t={};return e?(t.paddingTop=this.getSizePx(e.pt),t.paddingBottom=this.getSizePx(e.pb),t.paddingLeft=this.getSizePx(e.pl),t.paddingRight=this.getSizePx(e.pr),t.marginTop=this.getSizePx(e.mt),t.marginBottom=this.getSizePx(e.mb),t.marginLeft=e.cent?"auto":this.getSizePx(e.ml),t.marginRight=e.cent?"auto":this.getSizePx(e.mr),t):(t.margin="0 !important",t.padding="unset",t)}getBackgroundStyles(e){if(!e)return{};let t={};if(e.glossy){let n="backdrop-filter",r="-webkit-"+n,i=`blur(${e.glossy.radius}px)`;if(!CSS.supports(r,i)&&!CSS.supports(n,i))return{background:e.glossy.fallback.rgba};if(t[r]=i,t[n]=i,e.glossy.color)return this.getColourStyles(e.glossy.color,"background",t)}else if(e.solid){if(e.solid.grad)return this.getGradientStyles(e.solid.grad,"background",t);if(e.solid.hex)return{backgroundColor:e.solid.rgba}}else if(e.img){if(!e.img.src)return{};let n=(e.img.a??0)/100;t.background=`linear-gradient(rgba(0, 0, 0, ${n}), rgba(0, 0, 0, ${n})),url("${e.img.src}") no-repeat center`,t.backgroundSize="cover",e.img.a&&(t["-webkit-backdrop-filter"]=`opacity(${e.img.a})`,t.backdropFilter=`opacity(${e.img.a})`)}return t}getGradientStyles(e,t,n){if(n??={},e.type==="LINEAR"){let r=`linear-gradient(${e.ang}deg, ${e.c1}, ${e.c2}`;e.c3&&(r+=`, ${e.c3}`),r+=")",n[t]=r}return n}getColourStyles(e,t="color",n){return n??={},e?e.grad?this.getGradientStyles(e.grad,t,n):(e.hex&&(n[t]=e.rgba),n):n}getSizePx(e){return this.getScaledSize(e)+"px"}getScaledSize(e){return(e??0)*this.scalingFactor}},mt=class extends gi{stylesConverter=new uc(1);renderer=sr.get();mediaStyle={};deviceTypeKey;clickExecutor;componentWillMount(){this.deviceTypeKey=this.renderer.isMobile()?"sm":"lg",this.clickExecutor=new xo(this.props.triggerContext,this.props.element)}getCompiledStyles(){return this.putStyleAccordingToDevice(),w(w(te(w(w(w(w(w(w({},this.stylesConverter.getFlexStyles(this.mediaStyle.flex)),this.stylesConverter.getBackgroundStyles(this.mediaStyle.bg)),this.stylesConverter.getBorderStyles(this.mediaStyle.br)),this.stylesConverter.getSizeStyles(this.mediaStyle.size)),this.stylesConverter.getSpaceStyles(this.mediaStyle.spc)),this.stylesConverter.getLayoutStyles(this.mediaStyle.lout)),{boxSizing:"border-box",outline:"none"}),this.getComponentStyles()),this.props.style)}matchWhenCondition(e){if(!e?.op)return!0;let{lhs:t,rhs:n}=e;switch(e.op){case"eq":return t===n;case"gt":return+t>+n;case"gte":return+t>=+n;case"lt":return+t<+n;case"lte":return+t<=+n;case"ne":return t!==n;case"null":return t==null;case"empty":return t.trim()==="";case"in":return new RegExp(`\\b${n}\\b`).test(t);case"nin":return!new RegExp(`\\b${n}\\b`).test(t);default:return C.error(`Invalid operator found for when condition - ${e.op}`),!1}}putStyleAccordingToDevice(){let e=this.props.element;this.mediaStyle=e.style.lg,this.renderer.isMobile()&&e.style.sm&&Object.keys(e.style.sm).length&&(this.mediaStyle=w(w({},this.mediaStyle),e.style.sm))}sendTriggerClicked(e,t){this.clickExecutor.sendTriggerClicked(e,t)}async onClick(e,t){e.stopPropagation(),await this.clickExecutor.execute(t)}},MV=0,one=Array.isArray;function G(e,t,n,r,i,s){t||(t={});var o,a,l=t;if("ref"in l)for(a in l={},t)a=="ref"?o=t[a]:l[a]=t[a];var c={type:e,props:l,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--MV,__i:-1,__u:0,__source:i,__self:s};if(typeof e=="function"&&(o=e.defaultProps))for(a in o)l[a]===void 0&&(l[a]=o[a]);return it.vnode&&it.vnode(c),c}var ur=class extends mt{componentDidMount(){this.setState(()=>({text:this.props.element.text})),Sn(this.onChange.bind(this))}componentWillReceiveProps(e){this.props.element=e.element,this.onChange()}render(){let e=this.getCompiledStyles(),t=this.state.text;return t||(e.display="none",t=""),G("div",{style:e,onClick:this.customOnClick.bind(this),className:"lc-text",children:G("span",{style:this.getSpanStyle(),dangerouslySetInnerHTML:{__html:t}})})}customOnClick(){this.props.onClick&&this.props.onClick("title")}onChange(){if(this.props.element.text==null)return;let e=this.props.triggerContext.triggerData,t={bundle:e.discountData.value,customer:e.customerData,cart:e.getCartMagicVariables()},n=vn.render(JSON.stringify(this.props.element),t),r=new En(JSON.parse(n));if(!this.matchWhenCondition(r.when)){this.setState(()=>({text:""}));return}this.setState(()=>({text:r.text}))}getTypoStyles(){let e={},t=this.mediaStyle.typo??new Dn;return e.letterSpacing=t.letterSpacing,e.fontSize=t.fs+"px",e.lineHeight=t.lh,e.fontFamily=t.fam.name||"inherit",e.textAlign=t.alignment,e.fontWeight=t.fw,e.textDecoration=t.td??"none",this.stylesConverter.getColourStyles(t.tc,"color",e),e}getComponentStyles(){return w({},this.getTypoStyles())}getSpanStyle(){return{overflow:"hidden",display:"-webkit-box",webkitBoxOrient:"vertical",webkitLineClamp:2,color:"inherit",fontSize:"inherit",fontWeight:"inherit",fontFamily:"inherit"}}},ks=class extends ur{render(){return G("div",{style:this.getCompiledStyles(),className:"lc-button",onClick:e=>this.onClick(e,{item:this.props.item}),children:G("span",{style:this.getSpanStyle(),dangerouslySetInnerHTML:{__html:this.state.text}})})}getComponentStyles(){return te(w({},super.getComponentStyles()),{cursor:"pointer"})}},oE=class extends gi{render(){if(this.props.element.show[this.props.label.toLowerCase()])return this.props.element.lblPos==="end"?G("div",{style:w(w({},this.getElementStyle()),this.props.styles),children:[G("span",{children:this.props.time}),G("span",{style:this.getTimeLabelStyle(),children:this.props.label})]}):G("div",{style:w(w({},this.getElementStyle()),this.props.styles),children:[G("span",{style:this.getTimeLabelStyle(),children:this.props.label}),G("span",{children:this.props.time})]})}getDesign(){}getTimeLabelStyle(){return{fontSize:"0.5em",alignContent:"center"}}getElementStyle(){let e={display:"flex",flexDirection:"column",placeContent:"center center",textAlign:"center"};return this.props.element.horizontal&&(e.gridTemplateColumns="repeat(2, minmax(0, 1fr))"),e}},Vl=class extends ur{labels={Days:"00",Hours:"00",Minutes:"00",Seconds:"00"};componentWillMount(){super.componentWillMount(),this.setState(()=>w({},this.labels)),this.processAndStartTimer()}render(){return G("div",{style:this.getLabelsParentStyle(),children:Object.keys(this.labels).map(e=>G(oE,{styles:this.getCompiledStyles(),label:e,time:this.state[e],element:this.props.element}))})}getLabelsParentStyle(){return{display:"grid",justifyContent:"center",gridTemplateColumns:"repeat(4, auto)",gap:this.stylesConverter.getSizePx(this.props.element.gap)}}getDisplayStyles(){return{display:"grid",placeContent:"center center"}}getComponentStyles(){return w(w({},super.getComponentStyles()),this.getDisplayStyles())}processAndStartTimer(){this.props.element.timer.start(this.props.element.timerType,e=>{this.labels.Days=String(e.days).padStart(2,"0"),this.labels.Hours=String(e.hours).padStart(2,"0"),this.labels.Minutes=String(e.minutes).padStart(2,"0"),this.labels.Seconds=String(e.seconds).padStart(2,"0"),this.setState(()=>w({},this.labels))})}},Ul=class extends mt{componentDidMount(){Sn(()=>{this.setState(()=>({checked:this.props.item.selected.value}))})}render(){return G("div",{style:this.getCompiledStyles(),className:"lc-checkbox",children:G("input",{type:"checkbox",checked:this.state.checked,onChange:this.onChange.bind(this),style:{appearance:"auto"}})})}onChange(e){let{checked:t}=e.target;this.props.item.selected.value=t}getTypoStyles(){let e={},t=this.mediaStyle.typo??new Dn;return e.textAlign=t.alignment,e.justifyContent=t.alignment,e}getComponentStyles(){return te(w({},this.getTypoStyles()),{display:"flex"})}},JT=Re(qn()),Zi=class extends mt{constructor(e,t){super(e,t)}render(){let e=this.props.element[this.deviceTypeKey],t=e?.src||this.props.element.src||this.props.element.lg?.src;return G("img",{onClick:this.customOnClick.bind(this),className:"lc-image",alt:e?.name||"Image",onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this),src:t,style:this.getCompiledStyles()})}customOnClick(e){this.props.element.clc?.at===JT.ClickActionType.ADD_TO_CART&&this.props.triggerContext.triggerData.items[0]&&this.onClick(e,{item:this.props.triggerContext.triggerData.items[0]}),this.props.onClick&&this.props.onClick("image")}getComponentStyles(){let e=this.mediaStyle.lout;if(!e||e.pos!=="absolute")return{};let t={zIndex:e.zIndex,cursor:this.props.element.clc?.at?"pointer":"auto"};return this.mediaStyle.size?.w&&(t.width=this.mediaStyle.size.w),this.mediaStyle.size?.h&&(t.height=this.mediaStyle.size.h),t}handleMouseEnter(e){let t=this.props.element[this.deviceTypeKey]?.secondarySrc;t&&(e.currentTarget.src=t)}handleMouseLeave(e){e.currentTarget.src=this.props.element[this.deviceTypeKey]?.src}},Xi=class extends mt{render(){if(!(this.props.element.hide||!this.matchWhenCondition(this.props.element.when)))return G("div",{style:this.getCompiledStyles(),class:"lc-flexbox",children:G(Ro,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext})})}getComponentStyles(){let e=this.mediaStyle.flex??new rc,t={display:"flex",gap:e.gap+"px",flexWrap:e.wrap,flexDirection:e.dir,justifyContent:e.jc,alignItems:e.ai};return e.wrap==="nowrap"&&e.scroll&&(e.dir==="column"?t["overflow-y"]="auto":t["overflow-x"]="auto"),t}},Hl=class extends Xi{render(){if(!(this.props.element.hide||!this.matchWhenCondition(this.props.element.when)))return G("div",{style:this.getCompiledStyles(),class:"lc-flexbox",children:G(dc,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext,item:this.props.item,noLinks:this.props.noLinks})})}},jl=class extends mt{render(){return G("select",{style:this.getCompiledStyles(),value:this.props.selectedVariant.selectedSellingPlan.value?.mID??"",onChange:this.onChange.bind(this),disabled:this.state.disabled,className:"lc-dropdown",children:this.createSelectItems()})}componentDidMount(){Sn(()=>{this.setState(()=>({disabled:this.props.triggerContext.triggerData.isBundle()?!this.props.item.selected.value:!1}))})}getTypoStyles(){let e={},t=this.mediaStyle.typo??new Dn;return e.letterSpacing=t.letterSpacing,e.fontSize=t.fs+"px",e.lineHeight=t.lh,e.fontFamily="inherit",e.textAlign=t.alignment,e.fontWeight=t.fw,this.stylesConverter.getColourStyles(t.tc,"color",e),e.boxShadow="none",e}getComponentStyles(){let e={};return this.props.selectedVariant.sellingPlans?.length||(e.visibility="hidden"),w(w({},e),this.getTypoStyles())}createSelectItems(){let e=[],t=this.props.selectedVariant;if(!t.sellingPlans?.length)return[];this.props.triggerContext.triggerData.skipSubscribedItems?t.selectedSellingPlan.value||(t.sellingPlans[0].isSelected=!0,t.changeSellingPlan(t.sellingPlans[0])):e.push(G("option",{value:"",selected:!t.selectedSellingPlan,children:"One time purchase"}));for(let n of t.sellingPlans??[])e.push(G("option",{value:n.mID,selected:n.isSelected,children:n.name}));return e}onChange(e){let t=e.target.value;t?this.props.selectedVariant.selectedSellingPlan.value=this.props.selectedVariant.sellingPlans.find(n=>n.mID===t):this.props.selectedVariant.selectedSellingPlan.value=void 0}},QT=Re(Pf()),$l=class extends mt{colorRegex=new RegExp('fill="#[a-zA-Z0-9]+"');constructor(){super(),vn.escape=QT.MustacheUtils.escapeHtml}render(){let e=this.getCompiledStyles(),t=this.getRating();return t||(e.display="none",t=""),G("div",{style:e,className:"lc-star-rating",dangerouslySetInnerHTML:{__html:t}})}getRating(){let e=this.props.element.fullStar,t=this.props.element.halfStart,n={size:this.props.element.iconSize,color:this.props.element.c.hex};e=vn.render(e,{svg:n}),t=vn.render(t,{svg:n});let r=this.props.review;if(!r?.rating)return"";let i="";if(this.props.element.showSingleStar)i=e;else{let s=5,o=`${r.rating}`.split(".");for(let a=0;a<+o[0];a++)i+=e,s--;o[1]&&(i+=t,s--);for(let a=0;a<s;a++)i+=e.replace(this.colorRegex,'fill="#f1f1f1')}return i}getComponentStyles(){return{display:"flex",alignItems:"center"}}},Wl=class extends mt{render(){return G("select",{style:this.getCompiledStyles(),value:this.props.item.selectedOrFirstVariant.value.mID,onChange:this.onChange.bind(this),disabled:this.state.disabled,className:"lc-dropdown",children:this.createSelectItems()})}componentDidMount(){Sn(()=>{this.setState(()=>({disabled:this.props.triggerContext.triggerData.isBundle()?!this.props.item.selected.value:!1}))})}getTypoStyles(){let e={},t=this.mediaStyle.typo??new Dn;return e.letterSpacing=t.letterSpacing,e.fontSize=t.fs+"px",e.lineHeight=t.lh,e.fontFamily="inherit",e.textAlign=t.alignment,e.fontWeight=t.fw,this.stylesConverter.getColourStyles(t.tc,"color",e),e.boxShadow="none",e}getComponentStyles(){let e={};return this.props.item.vars?.length===1&&this.props.item.vars[0].name==="Default Title"&&(e.visibility="hidden"),w(w({},e),this.getTypoStyles())}createSelectItems(){let e=[];for(let t of this.props.item.vars)e.push(G("option",{value:t.mID,disabled:!t.isAvailable,children:t.name}));return e}onChange(e){let t=e.target.value;this.props.item.selectedOrFirstVariant.value=this.props.item.vars.find(n=>n.mID===t)}},dc=class extends mt{constructor(e,t){super(e,t),this.setState(()=>({decoration:"unset"}))}renderElement(e){if(!(e.hide||!this.matchWhenCondition(e.when))){if(e.t===4){let t=e;return G(Hl,{element:t,triggerContext:this.props.triggerContext,elements:t.elems,item:this.props.item,noLinks:this.props.noLinks})}if(e.t===6)return this.props.triggerContext.triggerData.isBundle()?G(Ul,{element:e,item:this.props.item,triggerContext:this.props.triggerContext}):void 0;if(e.t===13){let t=e,n=this.props.item,r=n.variantImage??n.imageURL,i=n.variantSecondaryImage??n.secondaryImageURL;t.lg=t.sm={src:r,name:n.name,secondarySrc:i};let s=G(Zi,{element:t,onClick:this.customOnClick.bind(this),triggerContext:this.props.triggerContext});return this.props.noLinks?s:G("a",{href:this.props.item.selectedOrFirstVariant.value.link,style:{display:"block"},children:s})}if(e.t===14)return this.renderProductTitle(e);if(e.t===15){let t=e;return this.props.triggerContext.triggerData.isCartEmbed()&&this.props.item.vars?.length===1&&this.props.item.vars[0].name==="Default Title"?void 0:G(Wl,{element:t,item:this.props.item,triggerContext:this.props.triggerContext})}return e.t===16?G(jl,{element:e,selectedVariant:this.props.item.selectedOrFirstVariant.value,item:this.props.item,triggerContext:this.props.triggerContext}):e.t===19?G($l,{element:e,triggerContext:this.props.triggerContext,review:this.props.item.reviews}):e.t===18||e.t===3?G(ks,{element:e,item:this.props.item,triggerContext:this.props.triggerContext}):G(Ro,{elements:[e],element:this.props.element,triggerContext:this.props.triggerContext})}}render(){return this.props.elements.map(e=>this.renderElement(e))}getComponentStyles(){return{}}renderProductTitle(e){let t=G(ur,{element:e,onClick:this.customOnClick.bind(this),triggerContext:this.props.triggerContext});return this.props.noLinks?t:G("a",{href:this.props.item.selectedOrFirstVariant.value.link,style:{display:"block",textDecoration:this.state.decoration},onMouseEnter:this.onMouseEnter.bind(this),onMouseLeave:this.onMouseLeave.bind(this),children:t})}customOnClick(e){this.sendTriggerClicked([this.props.item.toEmbed()],{from:e})}onMouseEnter(){this.setState(()=>({decoration:"underline"}))}onMouseLeave(){this.setState(()=>({decoration:"unset"}))}},ex=Re(Qf()),Ls=class extends mt{productElement;constructor(e,t){super(e,t),this.setState(()=>({decoration:"unset"}))}render(){let e=JSON.stringify(this.props.element),t=vn.render(e,this.getProductData());if(this.productElement=new Io(JSON.parse(t)),!(this.productElement.hide||!this.matchWhenCondition(this.productElement.when)))return G("div",{style:w({},this.getCompiledStyles()),class:"lc-single-product",children:G(dc,{element:this.productElement,elements:this.productElement.elems,triggerContext:this.props.triggerContext,item:this.props.item,noLinks:this.productElement.noLinks})})}getComponentStyles(){return{flexShrink:0}}getProductData(){if(!this.props.item)return{};let e=this.props.item.selectedOrFirstVariant.value,t=e.price,n=this.props.item.name,r=this.props.item.category,i=le.formatCurrency(t.d,!0),s=this.props.item.variantImage??this.props.item.imageURL,o=this.props.item.meta,a=this.props.item.tags?.join(",")??"",l=this.props.item.reviews?.rating,c=this.props.item.reviews?.totalReviews,h=t.cmp&&t.cmp>t.d,d=this.props.triggerContext.hasManipulatedProductQuantity()?this.props.triggerContext.getManipulatedQuantity(this.props.item.quantity):this.props.item.quantity,f={name:n,price:i,quantity:d,image_url:s,meta:o,category:r,rating:l,reviews:c,tags:a},g=e.effectivePrice.value!==t.d;g&&(f.effective_price=le.formatCurrency(e.effectivePrice.value));let m=this.props.triggerContext.triggerData.discount.type===ex.DiscountType.BXGY;if(!g&&m&&(f.effective_price=le.formatCurrency(e.effectivePrice.value),f.price=""),h){f.compare_price=le.formatCurrency(t.cmp);let x=t.cmp-t.d;f.discount_percent=(x/t.cmp*100).toFixed(0),f.discount_price=le.formatCurrency(x)}let b={name:e.name,quantity:this.props.triggerContext.hasManipulatedProductQuantity()?this.props.triggerContext.getManipulatedQuantity(e.quantity):e.quantity};return{product:f,variant:b,svg:{color:()=>"{{svg.color}}",size:()=>"{{svg.size}}"}}}};function kp(e,t){if(!e||!window.Swiper)return;let n=new window.Swiper(e,{loop:!0,slidesPerView:t.maxInRow,spaceBetween:t.gap+"px",pagination:{type:t.pagination.type,el:e.querySelector(".swiper-pagination"),clickable:!0,renderBullet:(r,i)=>`
43
+ `)+" ".concat(l,"\\").concat(c,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return eV(e,t);if(e===void 0)return null;if(e instanceof Date||M2(e)){var h=e.getTime(),d=h>-1&&h<2534023188e5;return t.legacy?t.relaxed&&d?{$date:e.getTime()}:{$date:ZI(e)}:t.relaxed&&d?{$date:ZI(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(typeof e=="number"&&(!t.relaxed||!isFinite(e))){if(Math.floor(e)===e){var f=e>=cT&&e<=aT,g=e>=uT&&e<=lT;if(f)return{$numberInt:e.toString()};if(g)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||A2(e)){var m=e.flags;if(m===void 0){var b=e.toString().match(/[gimuy]*$/);b&&(m=b[0])}var x=new Dl(e.source,m);return x.toExtendedJSON(t)}return e!=null&&typeof e=="object"?nV(e,t):e}var tV={Binary:function(e){return new Ss(e.value(),e.sub_type)},Code:function(e){return new Zf(e.code,e.scope)},DBRef:function(e){return new Sl(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new g_(e.bytes)},Double:function(e){return new Xf(e.value)},Int32:function(e){return new Jf(e.value)},Long:function(e){return ce.fromBits(e.low!=null?e.low:e.low_,e.low!=null?e.high:e.high_,e.low!=null?e.unsigned:e.unsigned_)},MaxKey:function(){return new y_},MinKey:function(){return new v_},ObjectID:function(e){return new un(e)},ObjectId:function(e){return new un(e)},BSONRegExp:function(e){return new Dl(e.pattern,e.options)},Symbol:function(e){return new __(e.value)},Timestamp:function(e){return sT.fromBits(e.low,e.high)}};function nV(e,t){if(e==null||typeof e!="object")throw new Cs("not an object instance");var n=e._bsontype;if(typeof n>"u"){var r={};for(var i in e){t.seenObjects.push({propertyName:i,obj:null});try{var s=Eo(e[i],t);i==="__proto__"?Object.defineProperty(r,i,{value:s,writable:!0,enumerable:!0,configurable:!0}):r[i]=s}finally{t.seenObjects.pop()}}return r}else if(J2(e)){var o=e;if(typeof o.toExtendedJSON!="function"){var a=tV[e._bsontype];if(!a)throw new Ut("Unrecognized or invalid _bsontype: "+e._bsontype);o=a(o)}return n==="Code"&&o.scope?o=new Zf(o.code,Eo(o.scope,t)):n==="DBRef"&&o.oid&&(o=new Sl(Eo(o.collection,t),Eo(o.oid,t),Eo(o.db,t),Eo(o.fields,t))),o.toExtendedJSON(t)}else throw new Cs("_bsontype must be a string, but was: "+typeof n)}var XI;(function(e){function t(s,o){var a=Object.assign({},{relaxed:!0,legacy:!1},o);return typeof a.relaxed=="boolean"&&(a.strict=!a.relaxed),typeof a.strict=="boolean"&&(a.relaxed=!a.strict),JSON.parse(s,function(l,c){if(l.indexOf("\0")!==-1)throw new Cs("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(l)));return dT(c,a)})}e.parse=t;function n(s,o,a,l){a!=null&&typeof a=="object"&&(l=a,a=0),o!=null&&typeof o=="object"&&!Array.isArray(o)&&(l=o,o=void 0,a=0);var c=Object.assign({relaxed:!0,legacy:!1},l,{seenObjects:[{propertyName:"(root)",obj:null}]}),h=Eo(s,c);return JSON.stringify(h,o,a)}e.stringify=n;function r(s,o){return o=o||{},JSON.parse(n(s,o))}e.serialize=r;function i(s,o){return o=o||{},t(JSON.stringify(s),o)}e.deserialize=i})(XI||(XI={}));var JI,QI=tT();QI.Map?JI=QI.Map:JI=function(){function e(t){t===void 0&&(t=[]),this._keys=[],this._values={};for(var n=0;n<t.length;n++)if(t[n]!=null){var r=t[n],i=r[0],s=r[1];this._keys.push(i),this._values[i]={v:s,i:this._keys.length-1}}}return e.prototype.clear=function(){this._keys=[],this._values={}},e.prototype.delete=function(t){var n=this._values[t];return n==null?!1:(delete this._values[t],this._keys.splice(n.i,1),!0)},e.prototype.entries=function(){var t=this,n=0;return{next:function(){var r=t._keys[n++];return{value:r!==void 0?[r,t._values[r].v]:void 0,done:r===void 0}}}},e.prototype.forEach=function(t,n){n=n||this;for(var r=0;r<this._keys.length;r++){var i=this._keys[r];t.call(n,this._values[i].v,i,n)}},e.prototype.get=function(t){return this._values[t]?this._values[t].v:void 0},e.prototype.has=function(t){return this._values[t]!=null},e.prototype.keys=function(){var t=this,n=0;return{next:function(){var r=t._keys[n++];return{value:r!==void 0?r:void 0,done:r===void 0}}}},e.prototype.set=function(t,n){return this._values[t]?(this._values[t].v=n,this):(this._keys.push(t),this._values[t]={v:n,i:this._keys.length-1},this)},e.prototype.values=function(){var t=this,n=0;return{next:function(){var r=t._keys[n++];return{value:r!==void 0?t._values[r].v:void 0,done:r===void 0}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e}();var QK=ce.fromNumber(P2),eZ=ce.fromNumber(k2),f_=new Uint8Array(8),tZ=new DataView(f_.buffer,f_.byteOffset,f_.byteLength),rV=1024*1024*17,nZ=st.alloc(rV),wo=class{triggerID;nudgeID;engagementID;contentID;shortID;contentType;variation;props;objective;onsiteDeliveryType;holdout;constructor(e){e=e||{},this.triggerID=e.id||e.triggerID,this.nudgeID=e.nudgeID,this.shortID=e.shortID,this.contentType=e.contentType,this.engagementID=e.engagementID,this.contentID=e.contentID,this.variation=e.variation,this.props=e.props,this.objective=e.objective,this.onsiteDeliveryType=e.onsiteDeliveryType,this.holdout=e.holdout}},We=class{constructor(e,t={},n,r){this.name=e,this.properties=t,this.id=r?new un(r):new un,this.occurred=new Date,n&&(this.trigger=new wo(n)),this.newEvent=!r}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale},Nt=class{static SWIPER_CSS="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css";static injectScriptURL(e,t){if(!e)return;let n=document.createElement("script");n.id=t??"",n.src=e,hn.mode==="local"&&(n.type="module"),document.head.appendChild(n)}static injectRawScript(e){if(!e)return;let t=document.createElement("script");t.id="cooee-app-script",t.innerHTML=e,document.head.appendChild(t)}static injectRawCSS(e,t=document.head){if(!e)return;let n=document.createElement("style");n.textContent=e,t.appendChild(n)}static injectSwiperCSS(e=document.head){this.injectStylesheet(this.SWIPER_CSS,e)}static injectStylesheet(e,t=document.head){if(!e)return;let n=document.createElement("link");n.rel="stylesheet",n.href=e,e===this.SWIPER_CSS&&(n.crossOrigin="anonymous",n.onload=r=>{let i=r.currentTarget?.sheet?.cssRules;if(i){for(let s of i)if(s.type==CSSRule.FONT_FACE_RULE){let o=e.split("/"),a=o.slice(0,o.length-1).join("/"),l=s.cssText;l=l.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${a}/$4")`);let c=document.createElement("style");c.appendChild(document.createTextNode(l)),document.head.appendChild(c)}}}),t.appendChild(n)}static loadSwiperScript(){let e="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js";return new Promise(t=>{if(window.Swiper){t();return}if(Array.from(document.scripts).some(r=>r.src.includes(e))){let r=setInterval(()=>{window.Swiper&&(clearInterval(r),t())},50)}let n=document.createElement("script");n.src=e,n.onload=()=>{t()},n.onerror=()=>{n.remove()},document.body.appendChild(n)})}},px=Re(Qf()),hx=Re(us()),Dt=class{static COOEE_URL_PREFIX="?from=cooee";static isShopify(){return!!window.Shopify}static getShopName(){if(this.isShopify())return window.Shopify.shop?.split(".")?.[0]}static getPageName(){if(!this.isShopify())return;let e=new URL(window.location.href).pathname.slice(1).split("/"),t=e[0];if(t==="")return"home";if(t==="collections")return e[2]==="products"?"product":"collection";if(t==="products")return"product";if(t==="cart")return"cart";if(location.href.includes("thank_you"))return"thank_you"}static getProductSlug(e){let t=(e.includes("://")?new URL(e).pathname:e).match(/\/products\/([^/]+?)(?:\.html)?$/);return t?t[1]:null}static getRootPrefix(){return window.Shopify?.routes?.root??"/"}static getCartURL(e){return this.getRootPrefix()+e+this.COOEE_URL_PREFIX}},iV=" daum[ /]| deusu/| yadirectfetcher|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\btime/|\\||^<|^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\d\\.\\d\\s[\\w\\.-]+$|^mozilla/\\d\\.\\d\\s\\(compatible;?(?:\\s\\w+\\/\\d+\\.\\d+)?\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|^{{.*}}$|adscanner/|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|cookiehubscan|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|firephp|functionize|gomezagent|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|infrawatch|insight|inspect|iplabel|ips-agent|java(?!;)|jsjcw_scanner|library|linkcheck|mail\\.ru/|manager|measure|neustar wpm|node|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|perl|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|retriever|rexx;|rigor|rss\\b|scanner\\.|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|zgrab",oV=/bot|crawl|http|lighthouse|scan|search|spider/i,Tl;function sV(){if(Tl instanceof RegExp)return Tl;try{Tl=new RegExp(iV,"i")}catch{Tl=oV}return Tl}function hT(e){return!!e&&sV().test(e)}var mT=Re(E_()),xl=class{static UTM_PARAMS=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id"];static TW_PARAMS={utm_source:"tw_source",utm_campaign:"tw_campaign"};static getReferrer(){if(document.referrer)return document.referrer.replace(location.origin,"")}static getUTMParams(){let e;try{e=new mT.URLBuilder(location.href)}catch{return{}}let t={};this.UTM_PARAMS.forEach(r=>{let i=e.getQueryParam(r);i&&(t[r]=i)});let n={};return Object.keys(this.TW_PARAMS).forEach(r=>{let i=e.getQueryParam(this.TW_PARAMS[r]);i&&(n[r]=i)}),w(w({},n),t)}},hi=class pT{origin;path;qs;name;referrer;utmSource;utmMedium;utmCampaign;utmId;utmTerm;utmContent;constructor(t){this.name=t.name,this.path=t.path,this.qs=t.qs,this.referrer=t.referrer,this.utmSource=t.utmSource||t.utm_source,this.utmMedium=t.utmMedium||t.utm_medium,this.utmCampaign=t.utmCampaign||t.utm_campaign,this.utmId=t.utmId||t.utm_id,this.utmTerm=t.utmTerm||t.utm_term,this.utmContent=t.utmContent||t.utm_content}static parseFromCurrent(){let t=location.pathname==="/"?location.pathname:location.pathname.replace(/\/+$/,"");return new pT(w({origin:location.origin,path:t,qs:location.search,referrer:xl.getReferrer(),name:Oe.get().pageName},xl.getUTMParams()))}},Te=class{static storage=new Map;static get(e){return this.storage.has(e)||this.storage.set(e,e.getInstance()),this.storage.get(e)}},w_={d:(e,t)=>{for(var n in t)w_.o(t,n)&&!w_.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},b_={};w_.d(b_,{A:()=>uV,k:()=>C_});var cV=function(e,t,n,r){return new(n||(n=Promise))(function(i,s){function o(c){try{l(r.next(c))}catch(h){s(h)}}function a(c){try{l(r.throw(c))}catch(h){s(h)}}function l(c){var h;c.done?i(c.value):(h=c.value,h instanceof n?h:new n(function(d){d(h)})).then(o,a)}l((r=r.apply(e,t||[])).next())})},lV=function(e,t){var n,r,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(c){return function(h){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,h[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&h[0]?r.return:h[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,h[1])).done)return i;switch(r=0,i&&(h=[2&h[0],i.value]),h[0]){case 0:case 1:i=h;break;case 4:return o.label++,{value:h[1],done:!1};case 5:o.label++,r=h[1],h=[0];continue;case 7:h=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!((i=i.length>0&&i[i.length-1])||h[0]!==6&&h[0]!==2)){o=0;continue}if(h[0]===3&&(!i||h[1]>i[0]&&h[1]<i[3])){o.label=h[1];break}if(h[0]===6&&o.label<i[1]){o.label=i[1],i=h;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(h);break}i[2]&&o.ops.pop(),o.trys.pop();continue}h=t.call(e,o)}catch(d){h=[6,d],r=0}finally{n=i=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([l,c])}}};function C_(){return cV(this,void 0,Promise,function(){return lV(this,function(_a){switch(_a.label){case 0:return[4,new Promise(function(resolve,reject){var browserName="Unknown";function __callback(e){resolve({isPrivate:e,browserName})}function identifyChromium(){var e=navigator.userAgent;return e.match(/Chrome/)?navigator.brave!==void 0?"Brave":e.match(/Edg/)?"Edge":e.match(/OPR/)?"Opera":"Chrome":"Chromium"}function assertEvalToString(e){return e===eval.toString().length}function feid(){var toFixedEngineID=0;try{eval("(-1).toFixed(-1);")}catch(e){toFixedEngineID=e.message.length}return toFixedEngineID}function isSafari(){return feid()===44}function isChrome(){return feid()===51}function isFirefox(){return feid()===25}function isMSIE(){return navigator.msSaveBlob!==void 0&&assertEvalToString(39)}function newSafariTest(){var e=String(Math.random());try{window.indexedDB.open(e,1).onupgradeneeded=function(t){var n,r,i=(n=t.target)===null||n===void 0?void 0:n.result;try{i.createObjectStore("test",{autoIncrement:!0}).put(new Blob),__callback(!1)}catch(o){var s=o;return o instanceof Error&&(s=(r=o.message)!==null&&r!==void 0?r:o),typeof s!="string"?void __callback(!1):void __callback(s.includes("BlobURLs are not yet supported"))}finally{i.close(),window.indexedDB.deleteDatabase(e)}}}catch{__callback(!1)}}function oldSafariTest(){var e=window.openDatabase,t=window.localStorage;try{e(null,null,null,null)}catch{return void __callback(!0)}try{t.setItem("test","1"),t.removeItem("test")}catch{return void __callback(!0)}__callback(!1)}function safariPrivateTest(){navigator.maxTouchPoints!==void 0?newSafariTest():oldSafariTest()}function getQuotaLimit(){var e=window;return e.performance!==void 0&&e.performance.memory!==void 0&&e.performance.memory.jsHeapSizeLimit!==void 0?performance.memory.jsHeapSizeLimit:1073741824}function storageQuotaChromePrivateTest(){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(e,t){__callback(Math.round(t/1048576)<2*Math.round(getQuotaLimit()/1048576))},function(e){reject(new Error("detectIncognito somehow failed to query storage quota: "+e.message))})}function oldChromePrivateTest(){(0,window.webkitRequestFileSystem)(0,1,function(){__callback(!1)},function(){__callback(!0)})}function chromePrivateTest(){self.Promise!==void 0&&self.Promise.allSettled!==void 0?storageQuotaChromePrivateTest():oldChromePrivateTest()}function firefoxPrivateTest(){__callback(navigator.serviceWorker===void 0)}function msiePrivateTest(){__callback(window.indexedDB===void 0)}function main(){isSafari()?(browserName="Safari",safariPrivateTest()):isChrome()?(browserName=identifyChromium(),chromePrivateTest()):isFirefox()?(browserName="Firefox",firefoxPrivateTest()):isMSIE()?(browserName="Internet Explorer",msiePrivateTest()):reject(new Error("detectIncognito cannot determine the browser"))}main()})];case 1:return[2,_a.sent()]}})})}typeof window<"u"&&(window.detectIncognito=C_);var uV=C_,gT=b_.A,wZ=b_.k,lx=Re(us()),yT=Re(np()),sr=class Qi{static DOCUMENT_STANDARD_MODE="CSS1Compat";static _instance;parentContainer;scalingFactor=1;doc=document;parser=new yT.default;constructor(){}static get(){return Qi._instance||(Qi._instance=new Qi),Qi._instance}getUAParser(){return this.parser}getWidth(){return this.parentContainer&&this.parentContainer!==document.body?this.parentContainer.clientWidth:document.compatMode===Qi.DOCUMENT_STANDARD_MODE?document.documentElement.clientWidth:window.innerWidth}getHeight(){return this.isParentNotBody()?this.parentContainer.clientHeight:document.compatMode===Qi.DOCUMENT_STANDARD_MODE?document.documentElement.clientHeight:window.innerHeight}isMobile(){return this.parser.getDevice().type==="mobile"}calculateScalingFactor(t){let n=t.max,r=t.cont.w,i=t.cont.h,s=t.spc,o=Qi.get().getWidth(),a=Qi.get().getHeight();n&&(o=o?Math.min(o,n):n,a=a?Math.min(a,n):n),a&&(o-=s.getHorizontal(),a-=s.getVertical(),o/a<r/i?this.scalingFactor=o/r:this.scalingFactor=a/i,this.scalingFactor=Math.min(this.scalingFactor,1))}getScalingFactor(){return this.scalingFactor}createElement(t){return this.doc.createElement(t)}appendChild(t,n){t.appendChild(n)}setStyles(t,n){Object.assign(t.style,n)}setStyle(t,n,r){if(n){if(!r){t.style.removeProperty(n);return}t.style.setProperty(n,r,"important")}}setAttribute(t,n,r){t.setAttribute(n,r)}removeInApp(t){let n=document.querySelector(`.${t.rootClassName}`);n&&n.parentElement.removeChild(n)}setParentContainer(t){this.parentContainer=t,this.parentContainer&&this.isParentNotBody()&&this.setStyle(this.parentContainer,"position","relative")}isParentNotBody(){return this.parentContainer!==document.body}},rp=class{parser;result={};constructor(){this.parser=sr.get().getUAParser()}async get(){let e=this.result;return this.getDeviceMemory(),this.getNetworkType(),this.getOrientation(),await this.getBatteryInfo(),await this.getLocation(),e.locale=navigator.language,e.display={w:screen.width,h:screen.height,pd:screen.pixelDepth,dpi:this.getDPI()},e.win={ow:window.outerWidth,oh:window.outerHeight,iw:window.innerWidth,ih:window.innerHeight,dpr:window.devicePixelRatio},e.browser={name:this.parser.getBrowser().name,ver:this.parser.getBrowser().version},e.device={model:this.parser.getDevice().model,type:this.parser.getDevice().type,vendor:this.parser.getDevice().vendor},e.os={name:this.parser.getOS().name,ver:this.parser.getOS().version},e.navigatorUA=navigator.userAgent,e.isHeadless=navigator.webdriver,e}getDeviceMemory(){let e=navigator;if(!e.deviceMemory)return;let t=e.deviceMemory;this.result.mem={tot:t*1024}}getNetworkType(){let e=navigator,t=e.connection||e.mozConnection||e.webkitConnection;t?.effectiveType&&(this.result.net={type:t.effectiveType})}getOrientation(){let e=screen.orientation?.type;e&&(this.result.orientation=e)}getDPI(){let e=document.createElement("div");e.setAttribute("style","height: 1in; left: -100%; position: absolute; top: -100%; width: 1in;"),document.body.appendChild(e);let t=window.devicePixelRatio||1,n=e.offsetWidth*t;return document.body.removeChild(e),n}async getLocation(){if(!(!navigator.geolocation||!navigator.permissions||(await navigator.permissions.query({name:"geolocation"})).state!="granted"))return new Promise(e=>{navigator.geolocation.getCurrentPosition(t=>{this.result.coords=[t.coords.latitude,t.coords.longitude],e()},()=>e())})}async getBatteryInfo(){if("getBattery"in navigator)try{let e=await navigator.getBattery();this.result.bat={l:e.level*100,c:e.charging}}catch{}}},Wa=class{isLocked=!1;queue=[];async acquire(){if(this.isLocked)await new Promise(e=>this.queue.push(e));else{this.isLocked=!0;return}}release(){if(this.queue.length>0){let e=this.queue.shift();e&&e()}else this.isLocked=!1}},Ge=class fT{static CURRENT;token;items;total_price;original_total_price;currency;item_count;attributes;lock=new Wa;constructor(){}static getCurrent(){return this.CURRENT||(this.CURRENT=new fT),this.CURRENT}async getNormalisedCart(t){await this.fetchCartFromShopify(t);let n=this.convertToCooeeCart();return t&&await rt.set(ge.CURRENT_CART,n),n}async addCooeeAttributes(){await this.lock.acquire();let t=await gn.get(ge.ID),n=await rt.get(ge.DEVICE_ID);if(this.attributes?.letscooee_did===n&&this.attributes?.letscooee_sid===t){C.debug("Not calling Shopify update.js API.","Current attributes:",this.attributes),this.lock.release();return}let r={letscooee_did:n,letscooee_sid:t,__letscooee_time:new Date().toLocaleString()};C.debug("Updating Shopify cart with attributes:",r);let i=Dt.getCartURL("cart/update.js"),s=await(await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:r})})).json();C.debug("Updated cart attributes",JSON.stringify(s)),this.update(s),this.lock.release()}update(t){return this.token=t.token,this.items=t.items,this.total_price=t.total_price,this.original_total_price=t.original_total_price,this.currency=t.currency,this.item_count=t.item_count,this.attributes=t.attributes,Oe.get().currencyCode=this.currency,C.log("Updated ShopifyCart",this),this}toString(){return`ShopifyCart(token: ${this.token}, itemCount: ${this.item_count})`}convertToCooeeCart(){return{amount:this.total_price/100,originalAmount:this.original_total_price/100,currency:this.currency,itemCount:this.item_count,items:this.normaliseItems(this.items),token:this.token}}normaliseItems(t){if(!t)return C.error("No item received to be sent"),[];Array.isArray(t)||(t=[t]);let n=[];for(let r of t){if(!r.id||!r.title){C.warn("Invalid item received",r);continue}let i={name:r.title,quantity:+r.quantity||1,mID:r.product_id?.toString(),vID:r.id.toString(),price:+r.price/100||0,properties:r.properties,key:r.key},s=r.selling_plan_allocation?.selling_plan;if(!s){n.push(i);continue}i.sellingPlanAllocation={sellingPlan:{fixedSellingPlan:s.fixed_selling_plan,id:s.id,name:s.name,recurringDeliveries:s.recurring_deliveries}},n.push(i)}return n}async fetchCartFromShopify(t){if(!t&&this.token){C.debug("Not fetching cart");return}C.debug("Fetching cart");let n=Dt.getCartURL("cart.js"),r=await(await fetch(n)).json();this.update(r)}},Ds=(e=>(e[e.LOW=1]="LOW",e[e.MEDIUM=2]="MEDIUM",e[e.HIGH=3]="HIGH",e))(Ds||{}),Ga=class{static trackDeviceID(e){this.isInstalled()}static trackIntent(e){if(!this.isInstalled())return;let t=Ds[e]?.toLowerCase();t&&(C.debug(`Sending ${t} intent to MS Clarity`),window.clarity("set","Cooee Intent",t))}static isInstalled(){return window.clarity&&typeof window.clarity=="function"}},Dr=class{static isOn=!1;static element;static watch(){let e=C.getDebugParam();(e==="1"||e==="on")&&Ve.getInstance().updateDeviceProps({debugTill:this.getDebugMillis()}),e==="on"?sessionStorage.cooeeDebug="1":e==="off"&&sessionStorage.removeItem("cooeeDebug"),sessionStorage.cooeeDebug&&(this.isOn=!0,this.renderDebugBar())}static prepend(e){if(!this.isOn)return;let t=document.createElement("div");t.innerHTML="&#x2022; "+new Date().toLocaleString()+" - "+e,this.element.prepend(t)}static renderDebugBar(){this.element=document.createElement("div"),this.element.id="cooee-debugger",this.element.setAttribute("draggable","true"),document.body.appendChild(this.element)}static dragElement(){let e=0,t=0,n=0,r=0,i=a=>{a=a||window.event,a.preventDefault(),n=a.clientX,r=a.clientY,document.onmouseup=o,document.onmousemove=s},s=a=>{a=a||window.event,a.preventDefault(),e=n-a.clientX,t=r-a.clientY,n=a.clientX,r=a.clientY,this.element.style.top=this.element.offsetTop-t+"px",this.element.style.left=this.element.offsetLeft-e+"px"},o=()=>{document.onmouseup=null,document.onmousemove=null};this.element.onmousedown=i}static getDebugMillis(){return new Date().getTime()+6*60*60*1e3}},Nl=class extends yo{static storeName="app";static{this.storage=xa(this.storeName)}},ip=Re(us()),mi=class xD{static INSTANCE=new xD;topics={};constructor(){}static get(){return this.INSTANCE}broadcast(t,n){this.topics[t]||(this.topics[t]=new J),this.topics[t].next(n)}subscriber(t){return this.topics[t]||(this.topics[t]=new J),this.topics[t].asObservable()}},Gt=class di{static DEFAULT_SELECTOR="cart-drawer";static _instance;inShadow=!1;cartDrawerElement;cartDrawerShadowElement;configWebsite=vt.get().website??{};currentState=!1;drawerSubject=new Nr({open:!1,firstOpen:!1});mutationObserver;firstOpen=!0;selector;shadowParentElementSelector;iconSelector=['button[drawer-to-open="cart-drawer"]','a[href="/cart"]',".header__icon--cart","#cart-icon-bubble",".cart-icon-bubble",".cart-count",'a[onclick*="handleFloCartBtn"]'].join(",");cartSelector=[di.DEFAULT_SELECTOR,"#halo-cart-sidebar",'[role="dialog"][class*="cart" i]','[id*="section-cart" i]',"#sidebar-cart","#rebuy-cart","#mini-cart","#flo-cart-wrapper","#drawer-cart","#UpcartPopupBackDrop",'[id$="CartDrawer" i]'].join(",");constructor(){this.initialize(),document.addEventListener(k.CTA_AFTER_REFRESH_UI,this.updateBubble.bind(this))}get element(){return this.cartDrawerElement}static get(){return di._instance||(di._instance=new di),di._instance}static forceUpdate(){di._instance=new di}isOpen(){let t=this.inShadow?this.isPresent():this.isVisible();return ip.default.log(`Cart drawer is currently ${t?"open":"close"}`),t}open(){if(this.isOpen()){C.log("Drawer is already open");return}document.dispatchEvent(new CustomEvent(k.CTA_OPEN_CART_EVENT));let t=document.querySelector(this.iconSelector);if(!t){C.debug("No clickable cart icon found with selector",this.iconSelector);return}t.click()}onToggle(){return this.drawerSubject}isShopifyDefaultDrawer(){return this.element?.tagName.toLowerCase()===di.DEFAULT_SELECTOR}isMiniCart(){return this.isShopifyDefaultDrawer()&&this.element?.id==="mini-cart"}refreshUI(t,n=!0){if(this.isMiniCart()&&this.element?._rerenderCart)this.element._rerenderCart({detail:{cart:t}});else if(window.MinimogTheme?.Cart?.renderNewCart)window.MinimogTheme.Cart.renderNewCart();else if(this.isShopifyDefaultDrawer()&&this.element?.renderContents&&t)this.element.classList.remove("is-empty"),this.element.renderContents?.(t);else if(this.element?.onCartDrawerUpdate)this.element.onCartDrawerUpdate();else if(window.cartGiftUpdate){if(!t?.items?.[0])return;let r=t.items[0].id,i=t.items[0].quantity,s=t.items[0].price;window.cartGiftUpdate(r,s,i,"","ADD_TO_CART")}else if(window.icartCartActivityEvent)window.icartCartActivityEvent();else if(window.theme?.CartDrawer)window.theme?.CartDrawer.init?new window.theme.CartDrawer().init():new window.theme.CartDrawer;else if(window.Hs_CartDrawer?.updateSlideCart)window.Hs_CartDrawer.updateSlideCart();else if(window.theme?.fetch_side_cart)window.theme.fetch_side_cart();else if(window.theme?.Cart?.updateCart)window.theme.Cart.updateCart();else if(window.cartUpdate)window.cartUpdate();else if(this.element?._onCartRefresh)this.element._onCartRefresh();else if(window.cart?.getCart)window.cart.getCart();else if(this.element?.tagName?.toLowerCase()==="cart-drawer-component")document.dispatchEvent(new CustomEvent("action:cart:updateCartandShowCart"));else if(this.element?.id==="sidebar-cart")document.body.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0,detail:{}}));else if(this.element?.id==="quick-cart"){let r=document.querySelector('a[href="/cart"]');r&&r.click()}else window.Shopify?.KT_onItemAdded?window.Shopify.KT_onItemAdded():window.sideCart?.updateCart?window.sideCart.updateCart():(C.info("No method found to update the cart drawer. Blindly firing some events to try"),document.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0})));document.dispatchEvent(new CustomEvent(k.CTA_AFTER_REFRESH_UI)),n&&mi.get().broadcast(k.CART_UPDATE_BROADCAST)}async initialize(){let t=this.configWebsite.cartDrawerSelector;if(!t){await this.findCartDrawer();return}let n=t.split(k.SHADOW_SPLITTER);n.length===1?(this.selector=n[0],await this.findCartDrawer()):(this.inShadow=!0,this.shadowParentElementSelector=n[0]?.trim(),this.selector=n[1]?.trim(),await this.findCartDrawerWithShadow())}async findCartDrawer(){if(!Dt.isShopify())return;let t=this.selector||this.cartSelector;if(this.cartDrawerElement=await le.retrySelector(t),!this.cartDrawerElement){ip.default.warn("Max attempts exhausted to find cart drawer");return}ip.default.log("Found",this.cartDrawerElement,`from selector: ${t}`),this.createMutationObservers()}async findCartDrawerWithShadow(){if(!Dt.isShopify()||!this.shadowParentElementSelector)return;let t=(await le.retrySelector(this.shadowParentElementSelector))?.shadowRoot;t?.mode==="open"&&(this.cartDrawerShadowElement=t,this.createMutationObservers())}isVisible(){if(!this.cartDrawerElement)return!1;if(this.cartDrawerElement.tagName.toLowerCase()===di.DEFAULT_SELECTOR&&this.cartDrawerElement.open)return!0;if(this.cartDrawerElement.id==="cart-drawer__container")return this.cartDrawerElement.classList.contains("cart-drawer-open");let t=this.cartDrawerElement.getBoundingClientRect(),n=(window.innerHeight||document.documentElement.clientHeight)+.5,r=(window.innerWidth||document.documentElement.clientWidth)+.5,i=t.top<=n&&t.bottom>=0,s=t.left<=r&&t.right>=0,o=i&&s,a=getComputedStyle(this.cartDrawerElement),l=a.display!=="none"&&a.visibility!=="hidden"&&parseFloat(a.opacity)>0,c=!this.cartDrawerElement.hidden,h=this.cartDrawerElement.offsetWidth>0||this.cartDrawerElement.offsetHeight>0||this.cartDrawerElement.getClientRects().length>0,d=a.transform.match(/matrix\(([^)]+)\)/),f=0,g=0;if(d){let M=d[1].split(", ").map(parseFloat);f=M[4],g=M[5]}let m=f+t.left>r||f+t.right<0||g+t.top>n||g+t.bottom<0,b=Math.max(0,Math.min(t.right,r)-Math.max(t.left,0)),x=Math.max(0,Math.min(t.bottom,n)-Math.max(t.top,0)),A=b*x,F=t.width*t.height,U=F>0&&A/F>=.1;return(o||!m)&&l&&c&&h&&U}createMutationObservers(){!this.cartDrawerElement&&!this.cartDrawerShadowElement||(le.onNodesRemoved(this.cartDrawerElement,()=>{this.initialize()}),this.watchForCartToggle())}watchForCartToggle(){let t=this.cartDrawerElement||this.cartDrawerShadowElement,n=new J;this.mutationObserver?.disconnect(),this.mutationObserver=new MutationObserver(()=>{n.next()}),this.mutationObserver.observe(t,{attributes:!0,subtree:!0,childList:this.inShadow}),n.pipe(Ar(500)).subscribe(()=>{let r=this.isOpen();this.currentState!==r&&(this.currentState=r,this.drawerSubject.next({open:r,firstOpen:this.firstOpen}),this.firstOpen&&(this.firstOpen=!1))})}isPresent(){return!this.selector||!this.cartDrawerShadowElement?!1:!!this.cartDrawerShadowElement.querySelector(this.selector)}async updateBubble(){let t=(await Ge.getCurrent().getNormalisedCart(!0)).itemCount,n=document.querySelector(".cart-link__bubble");n&&(n.innerText=t+"")}},op=class{static processConfiguration(){let e=vt.get();!e.gaMeasurementID||!e.gaEnabled||this.sendClientID()}static async sendClientID(){let e=await this.getClientID();e&&Ve.getInstance().updateDeviceProps({gaClientID:e})}static async getClientID(){let e=await rt.get(ge.GA_CLIENT_ID),t=await this.getClientIDViaGTag();if(e!==t)return await rt.set(ge.GA_CLIENT_ID,t),t}static async getClientIDViaGTag(){let e=vt.get().gaMeasurementID;if(!(!e||!window.gtag))return new Promise(t=>{window.gtag("get",e,"client_id",n=>{t(n)})})}},ax=Re(Pf()),In=Re(qn()),To=Re(Qf()),Pp=Re(D_()),up,it,bT,R_,Is,vT,CT,I_,ST,N_,T_,x_,dV,Al={},DT=[],fV=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,A_=Array.isArray;function bo(e,t){for(var n in t)e[n]=t[n];return e}function M_(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function O_(e,t,n){var r,i,s,o={};for(s in t)s=="key"?r=t[s]:s=="ref"?i=t[s]:o[s]=t[s];if(arguments.length>2&&(o.children=arguments.length>3?up.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)o[s]===void 0&&(o[s]=e.defaultProps[s]);return cp(e,o,r,i,null)}function cp(e,t,n,r,i){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++bT,__i:-1,__u:0};return i==null&&it.vnode!=null&&it.vnode(s),s}function yi(e){return e.children}function gi(e,t){this.props=e,this.context=t}function za(e,t){if(t==null)return e.__?za(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?za(e):null}function IT(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return IT(e)}}function _T(e){(!e.__d&&(e.__d=!0)&&Is.push(e)&&!lp.__r++||vT!==it.debounceRendering)&&((vT=it.debounceRendering)||CT)(lp)}function lp(){var e,t,n,r,i,s,o,a;for(Is.sort(I_);e=Is.shift();)e.__d&&(t=Is.length,r=void 0,s=(i=(n=e).__v).__e,o=[],a=[],n.__P&&((r=bo({},i)).__v=i.__v+1,it.vnode&&it.vnode(r),P_(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[s]:null,o,s??za(i),!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,RT(o,r,a),r.__e!=s&&IT(r)),Is.length>t&&Is.sort(I_));lp.__r=0}function TT(e,t,n,r,i,s,o,a,l,c,h){var d,f,g,m,b,x,A=r&&r.__k||DT,F=t.length;for(l=pV(n,t,A,l,F),d=0;d<F;d++)(g=n.__k[d])!=null&&(f=g.__i===-1?Al:A[g.__i]||Al,g.__i=d,x=P_(e,g,f,i,s,o,a,l,c,h),m=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&k_(f.ref,null,g),h.push(g.ref,g.__c||m,g)),b==null&&m!=null&&(b=m),4&g.__u||f.__k===g.__k?l=xT(g,l,e):typeof g.type=="function"&&x!==void 0?l=x:m&&(l=m.nextSibling),g.__u&=-7);return n.__e=b,l}function pV(e,t,n,r,i){var s,o,a,l,c,h=n.length,d=h,f=0;for(e.__k=new Array(i),s=0;s<i;s++)(o=t[s])!=null&&typeof o!="boolean"&&typeof o!="function"?(l=s+f,(o=e.__k[s]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?cp(null,o,null,null,null):A_(o)?cp(yi,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?cp(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,a=null,(c=o.__i=hV(o,n,l,d))!==-1&&(d--,(a=n[c])&&(a.__u|=2)),a==null||a.__v===null?(c==-1&&f--,typeof o.type!="function"&&(o.__u|=4)):c!=l&&(c==l-1?f--:c==l+1?f++:(c>l?f--:f++,o.__u|=4))):e.__k[s]=null;if(d)for(s=0;s<h;s++)(a=n[s])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=za(a)),NT(a,a));return r}function xT(e,t,n){var r,i;if(typeof e.type=="function"){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=xT(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=za(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function hV(e,t,n,r){var i,s,o=e.key,a=e.type,l=t[n];if(l===null||l&&o==l.key&&a===l.type&&(2&l.__u)==0)return n;if(r>(l!=null&&(2&l.__u)==0?1:0))for(i=n-1,s=n+1;i>=0||s<t.length;){if(i>=0){if((l=t[i])&&(2&l.__u)==0&&o==l.key&&a===l.type)return i;i--}if(s<t.length){if((l=t[s])&&(2&l.__u)==0&&o==l.key&&a===l.type)return s;s++}}return-1}function ET(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||fV.test(t)?n:n+"px"}function ap(e,t,n,r,i){var s;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||ET(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||ET(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(ST,"$1")),t=t.toLowerCase()in e||t=="onFocusOut"||t=="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.u=r.u:(n.u=N_,e.addEventListener(t,s?x_:T_,s)):e.removeEventListener(t,s?x_:T_,s);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function wT(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=N_++;else if(t.t<n.u)return;return n(it.event?it.event(t):t)}}}function P_(e,t,n,r,i,s,o,a,l,c){var h,d,f,g,m,b,x,A,F,U,M,q,Pe,ct,j,de,Q,he=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),s=[a=t.__e=n.__e]),(h=it.__b)&&h(t);e:if(typeof he=="function")try{if(A=t.props,F="prototype"in he&&he.prototype.render,U=(h=he.contextType)&&r[h.__c],M=h?U?U.props.value:h.__:r,n.__c?x=(d=t.__c=n.__c).__=d.__E:(F?t.__c=d=new he(A,M):(t.__c=d=new gi(A,M),d.constructor=he,d.render=gV),U&&U.sub(d),d.props=A,d.state||(d.state={}),d.context=M,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),F&&d.__s==null&&(d.__s=d.state),F&&he.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=bo({},d.__s)),bo(d.__s,he.getDerivedStateFromProps(A,d.__s))),g=d.props,m=d.state,d.__v=t,f)F&&he.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),F&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(F&&he.getDerivedStateFromProps==null&&A!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(A,M),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(A,d.__s,M)===!1||t.__v==n.__v)){for(t.__v!=n.__v&&(d.props=A,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(Ae){Ae&&(Ae.__=t)}),q=0;q<d._sb.length;q++)d.__h.push(d._sb[q]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(A,d.__s,M),F&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,m,b)})}if(d.context=M,d.props=A,d.__P=e,d.__e=!1,Pe=it.__r,ct=0,F){for(d.state=d.__s,d.__d=!1,Pe&&Pe(t),h=d.render(d.props,d.state,d.context),j=0;j<d._sb.length;j++)d.__h.push(d._sb[j]);d._sb=[]}else do d.__d=!1,Pe&&Pe(t),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++ct<25);d.state=d.__s,d.getChildContext!=null&&(r=bo(bo({},r),d.getChildContext())),F&&!f&&d.getSnapshotBeforeUpdate!=null&&(b=d.getSnapshotBeforeUpdate(g,m)),a=TT(e,A_(de=h!=null&&h.type===yi&&h.key==null?h.props.children:h)?de:[de],t,n,r,i,s,o,a,l,c),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),x&&(d.__E=d.__=null)}catch(Ae){if(t.__v=null,l||s!=null)if(Ae.then){for(t.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,t.__e=a}else for(Q=s.length;Q--;)M_(s[Q]);else t.__e=n.__e,t.__k=n.__k;it.__e(Ae,t,n)}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=mV(n.__e,t,n,r,i,s,o,l,c);return(h=it.diffed)&&h(t),128&t.__u?void 0:a}function RT(e,t,n){for(var r=0;r<n.length;r++)k_(n[r],n[++r],n[++r]);it.__c&&it.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(s){s.call(i)})}catch(s){it.__e(s,i.__v)}})}function mV(e,t,n,r,i,s,o,a,l){var c,h,d,f,g,m,b,x=n.props,A=t.props,F=t.type;if(F=="svg"?i="http://www.w3.org/2000/svg":F=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),s!=null){for(c=0;c<s.length;c++)if((g=s[c])&&"setAttribute"in g==!!F&&(F?g.localName==F:g.nodeType==3)){e=g,s[c]=null;break}}if(e==null){if(F==null)return document.createTextNode(A);e=document.createElementNS(i,F,A.is&&A),a&&(it.__m&&it.__m(t,s),a=!1),s=null}if(F===null)x===A||a&&e.data===A||(e.data=A);else{if(s=s&&up.call(e.childNodes),x=n.props||Al,!a&&s!=null)for(x={},c=0;c<e.attributes.length;c++)x[(g=e.attributes[c]).name]=g.value;for(c in x)if(g=x[c],c!="children"){if(c=="dangerouslySetInnerHTML")d=g;else if(!(c in A)){if(c=="value"&&"defaultValue"in A||c=="checked"&&"defaultChecked"in A)continue;ap(e,c,null,g,i)}}for(c in A)g=A[c],c=="children"?f=g:c=="dangerouslySetInnerHTML"?h=g:c=="value"?m=g:c=="checked"?b=g:a&&typeof g!="function"||x[c]===g||ap(e,c,g,x[c],i);if(h)a||d&&(h.__html===d.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(d&&(e.innerHTML=""),TT(e,A_(f)?f:[f],t,n,r,F=="foreignObject"?"http://www.w3.org/1999/xhtml":i,s,o,s?s[0]:n.__k&&za(n,0),a,l),s!=null)for(c=s.length;c--;)M_(s[c]);a||(c="value",F=="progress"&&m==null?e.removeAttribute("value"):m!==void 0&&(m!==e[c]||F=="progress"&&!m||F=="option"&&m!==x[c])&&ap(e,c,m,x[c],i),c="checked",b!==void 0&&b!==e[c]&&ap(e,c,b,x[c],i))}return e}function k_(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(i){it.__e(i,n)}}function NT(e,t,n){var r,i;if(it.unmount&&it.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||k_(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){it.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&NT(r[i],t,n||typeof e.type!="function");n||M_(e.__e),e.__c=e.__=e.__e=void 0}function gV(e,t,n){return this.constructor(e,n)}function AT(e,t,n){var r,i,s,o;t==document&&(t=document.documentElement),it.__&&it.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],o=[],P_(t,e=(!r&&n||t).__k=O_(yi,null,[e]),i||Al,Al,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?up.call(t.childNodes):null,s,!r&&n?n:i?i.__e:t.firstChild,r,o),RT(s,e,o)}up=DT.slice,it={__e:function(e,t,n,r){for(var i,s,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(a){e=a}throw e}},bT=0,R_=function(e){return e!=null&&e.constructor==null},gi.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=bo({},this.state),typeof e=="function"&&(e=e(bo({},n),this.props)),e&&bo(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),_T(this))},gi.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_T(this))},gi.prototype.render=yi,Is=[],CT=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,I_=function(e,t){return e.__v.__b-t.__v.__b},lp.__r=0,ST=/(PointerCapture)$|Capture$/i,N_=0,T_=wT(!1),x_=wT(!0),dV=0;var F_,ar,L_,MT,OT=0,HT=[],dn=it,PT=dn.__b,kT=dn.__r,LT=dn.diffed,FT=dn.__c,BT=dn.unmount,VT=dn.__;function yV(e,t){dn.__h&&dn.__h(ar,e,OT||t),OT=0;var n=ar.__H||(ar.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function V_(e,t){var n=yV(F_++,7);return EV(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function vV(){for(var e;e=HT.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(dp),e.__H.__h.forEach(B_),e.__H.__h=[]}catch(t){e.__H.__h=[],dn.__e(t,e.__v)}}dn.__b=function(e){ar=null,PT&&PT(e)},dn.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),VT&&VT(e,t)},dn.__r=function(e){kT&&kT(e),F_=0;var t=(ar=e.__c).__H;t&&(L_===ar?(t.__h=[],ar.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(t.__h.forEach(dp),t.__h.forEach(B_),t.__h=[],F_=0)),L_=ar},dn.diffed=function(e){LT&&LT(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(HT.push(t)!==1&&MT===dn.requestAnimationFrame||((MT=dn.requestAnimationFrame)||_V)(vV)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),L_=ar=null},dn.__c=function(e,t){t.some(function(n){try{n.__h.forEach(dp),n.__h=n.__h.filter(function(r){return!r.__||B_(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],dn.__e(r,n.__v)}}),FT&&FT(e,t)},dn.unmount=function(e){BT&&BT(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{dp(r)}catch(i){t=i}}),n.__H=void 0,t&&dn.__e(t,n.__v))};var UT=typeof requestAnimationFrame=="function";function _V(e){var t,n=function(){clearTimeout(r),UT&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);UT&&(t=requestAnimationFrame(n))}function dp(e){var t=ar,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),ar=t}function B_(e){var t=ar;e.__c=e.__(),ar=t}function EV(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}var wV=Symbol.for("preact-signals");function H_(){if(qa>1)qa--;else{for(var e,t=!1;Ml!==void 0;){var n=Ml;for(Ml=void 0,U_++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&$T(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(U_=0,qa--,t)throw e}}var Et=void 0,Ml=void 0,qa=0,U_=0,fp=0;function jT(e){if(Et!==void 0){var t=e.n;if(t===void 0||t.t!==Et)return t={i:0,S:e,p:Et.s,n:void 0,t:Et,e:void 0,x:void 0,r:t},Et.s!==void 0&&(Et.s.n=t),Et.s=t,e.n=t,32&Et.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Et.s,t.n=void 0,Et.s.n=t,Et.s=t),t}}function fn(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}fn.prototype.brand=wV;fn.prototype.h=function(){return!0};fn.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};fn.prototype.U=function(e){if(this.t!==void 0){var t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}};fn.prototype.subscribe=function(e){var t=this;return Sn(function(){var n=t.value,r=Et;Et=void 0;try{e(n)}finally{Et=r}})};fn.prototype.valueOf=function(){return this.value};fn.prototype.toString=function(){return this.value+""};fn.prototype.toJSON=function(){return this.value};fn.prototype.peek=function(){var e=Et;Et=void 0;try{return this.value}finally{Et=e}};Object.defineProperty(fn.prototype,"value",{get:function(){var e=jT(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(U_>100)throw new Error("Cycle detected");this.v=e,this.i++,fp++,qa++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{H_()}}}});function Ir(e){return new fn(e)}function $T(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function WT(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function GT(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function Ya(e){fn.call(this,void 0),this.x=e,this.s=void 0,this.g=fp-1,this.f=4}(Ya.prototype=new fn).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===fp))return!0;if(this.g=fp,this.f|=1,this.i>0&&!$T(this))return this.f&=-2,!0;var e=Et;try{WT(this),Et=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return Et=e,GT(this),this.f&=-2,!0};Ya.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}fn.prototype.S.call(this,e)};Ya.prototype.U=function(e){if(this.t!==void 0&&(fn.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};Ya.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(Ya.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=jT(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function j_(e){return new Ya(e)}function zT(e){var t=e.u;if(e.u=void 0,typeof t=="function"){qa++;var n=Et;Et=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,$_(e),r}finally{Et=n,H_()}}}function $_(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,zT(e)}function bV(e){if(Et!==this)throw new Error("Out-of-order effect");GT(this),Et=e,this.f&=-2,8&this.f&&$_(this),H_()}function Ol(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ol.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};Ol.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,zT(this),WT(this),qa++;var e=Et;return Et=this,bV.bind(this,e)};Ol.prototype.N=function(){2&this.f||(this.f|=2,this.o=Ml,Ml=this)};Ol.prototype.d=function(){this.f|=8,1&this.f||$_(this)};function Sn(e){var t=new Ol(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var G_,W_;function Ka(e,t){it[e]=t.bind(null,it[e]||function(){})}function pp(e){W_&&W_(),W_=e&&e.S()}function qT(e){var t=this,n=e.data,r=SV(n);r.value=n;var i=V_(function(){for(var s=t.__v;s=s.__;)if(s.__c){s.__c.__$f|=4;break}return t.__$u.c=function(){var o,a=t.__$u.S(),l=i.value;a(),R_(l)||((o=t.base)==null?void 0:o.nodeType)!==3?(t.__$f|=1,t.setState({})):t.base.data=l},j_(function(){var o=r.value.value;return o===0?0:o===!0?"":o||""})},[]);return i.value}qT.displayName="_st";Object.defineProperties(fn.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:qT},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});Ka("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var i in r)if(i!=="children"){var s=r[i];s instanceof fn&&(n||(t.__np=n={}),n[i]=s,r[i]=s.peek())}}e(t)});Ka("__r",function(e,t){pp();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var s;return Sn(function(){s=this}),s.c=function(){r.__$f|=1,r.setState({})},s}())),G_=r,pp(n),e(t)});Ka("__e",function(e,t,n,r){pp(),G_=void 0,e(t,n,r)});Ka("diffed",function(e,t){pp(),G_=void 0;var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,i=t.props;if(r){var s=n.U;if(s)for(var o in s){var a=s[o];a!==void 0&&!(o in r)&&(a.d(),s[o]=void 0)}else n.U=s={};for(var l in r){var c=s[l],h=r[l];c===void 0?(c=CV(n,l,h,i),s[l]=c):c.o(h,i)}}}e(t)});function CV(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,s=Ir(n);return{o:function(o,a){s.value=o,r=a},d:Sn(function(){var o=s.value.value;r[t]!==o&&(r[t]=o,i?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}Ka("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var i in r){var s=r[i];s&&s.d()}}}}else{var o=t.__c;if(o){var a=o.__$u;a&&(o.__$u=void 0,a.d())}}e(t)});Ka("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)});gi.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u,r=n&&n.s!==void 0;for(var i in t)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){if(!(r||2&this.__$f||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var s in e)if(s!=="__source"&&e[s]!==this.props[s])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function SV(e){return V_(function(){return Ir(e)},[])}var hp=class{url;alt;constructor(e){e.alt&&(this.alt=e.alt),this.url=e.url}},mp=class{d;cmp;effective;constructor(e={}){this.d=e.d,this.cmp=e.cmp,this.effective=this.d}},z_=class{id;mID;name;groupID;groupName;isSelected;constructor(e){e??={},this.id=e.id,this.mID=e.mID,this.name=e.name,this.groupID=e.groupID,this.groupName=e.groupName,this.isSelected=e.isSelected??!1}},vi=class{mID;name;imgs;link;price;sku;isAvailable;quantity;sellingPlans;selectedSellingPlan;effectivePrice;constructor(e){e=e??{},this.mID=e.mID,this.name=e.name,this.imgs=e.imgs?.map(t=>new hp(t))??[],this.link=e.link,this.price=new mp(e.price),this.sku=e.sku,this.isAvailable=e.isAvailable,this.quantity=e.quantity,this.effectivePrice=Ir(this.price.effective),e.sellingPlans?.length&&(this.selectedSellingPlan=Ir(void 0)),this.sellingPlans=e.sellingPlans?.map(t=>{let n=new z_(t);return n.isSelected&&(this.selectedSellingPlan.value=n),n})}getOneImage(){return this.imgs[0]?.url}changeSellingPlan(e){this.selectedSellingPlan.value=e}},Yn=class{id;mID;name;status;ctg;imgs;videos;portraitVideos;vars;desc;sDesc;link;slug;quantity;category;meta;reviews;tags;selectedOrFirstVariant;selected=Ir(!0);constructor(e){this.update(e),this.selectedOrFirstVariant=Ir(this.selectedVariant)}get imageURL(){return this.imgs?.[0]?.url}get secondaryImageURL(){return this.imgs?.[1]?.url}get getVariantImages(){return this.selectedOrFirstVariant.value.imgs}get variantImage(){return this.getVariantImages[0]?.url}get variantSecondaryImage(){return this.getVariantImages[1]?.url}get selectedVariant(){return this.vars.find(e=>e.isAvailable)??this.vars[0]}set variants(e){this.vars=e,this.selectedOrFirstVariant.value=this.selectedVariant}update(e){return this.id=e.id,this.mID=e.mID,this.name=e.name,this.status=e.status,this.ctg=e.ctg,this.imgs=e.imgs,this.desc=e.desc,this.sDesc=e.sDesc,this.link=e.link,this.slug=e.slug,this.quantity=e.quantity,this.meta=e.meta,this.category=e.category,this.videos=e.videos,this.reviews=e.reviews,this.portraitVideos=e.videos?.filter(t=>t.orientation==="PORTRAIT"),this.tags=e.tags,e.vars&&(this.vars=e.vars.map(t=>new vi(t))),this}toEmbed(e){return e=e??this.selectedOrFirstVariant.value,new mn({id:this.id,mID:this.mID,vID:e.mID,vName:e.name,name:this.name,link:this.link,slug:this.slug,price:e.price.d,imageURL:e.getOneImage()??this.imgs?.[0].url})}},gp=class{id;mID;handle;title;imageURL;constructor(e){e??={},this.id=e.id,this.mID=e.mID,this.handle=e.handle,this.title=e.title,this.imageURL=e.imageURL}},q_=class{enabled;constructor(e){this.enabled=e.enabled}},Y_=class extends q_{max;min;constructor(e){e??={},super(e),this.min=e.min,this.max=e.max}},yp=class{productQuantity;constructor(e){e??={},this.productQuantity=new Y_(e.productQuantity)}},Ts=class{s;g;i;constructor(e){e.s&&(this.s=new Ft(e.s)),e.g&&(this.g=new Pl(e.g)),this.i=e.i}get solid(){return this.s}get glossy(){return this.g}get img(){return this.i}},kl="a-f\\d",DV=`#?[${kl}]{3}[${kl}]?`,IV=`#?[${kl}]{6}([${kl}]{2})?`,TV=new RegExp(`[^#${kl}]`,"gi"),xV=new RegExp(`^${DV}$|^${IV}$`,"i");function K_(e,t={}){if(typeof e!="string"||TV.test(e)||!xV.test(e))throw new TypeError("Expected a valid hex string");e=e.replace(/^#/,"");let n=1;e.length===8&&(n=Number.parseInt(e.slice(6,8),16)/255,e=e.slice(0,6)),e.length===4&&(n=Number.parseInt(e.slice(3,4).repeat(2),16)/255,e=e.slice(0,3)),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let r=Number.parseInt(e,16),i=r>>16,s=r>>8&255,o=r&255,a=typeof t.alpha=="number"?t.alpha:n;if(t.format==="array")return[i,s,o,a];if(t.format==="css"){let l=a===1?"":` / ${Number((a*100).toFixed(2))}%`;return`rgb(${i} ${s} ${o}${l})`}return{red:i,green:s,blue:o,alpha:a}}var Ft=class{h;a=100;g;constructor(e){e??={},this.h=e.h,this.a=e.a,this.g=e.g}get hex(){return this.h}get grad(){return this.g}get rgba(){if(!this.hex)return"";try{return K_(this.hex,{format:"css",alpha:this.getAlpha()})}catch(e){return console.error("Invalid hex",e),"#000000"}}getAlpha(){return(this.a??100)/100}},xs=class{s;r;w;c;constructor(e){this.s=e.s,this.r=e.r,this.w=e.w,e.c&&(this.c=new Ft(e.c))}get radius(){return this.r}get width(){return this.w}get color(){return this.c}get style(){return YT[this.s??1]}},YT=(e=>(e[e.SOLID=1]="SOLID",e[e.DASHED=2]="DASHED",e))(YT||{}),Pl=class ID{static DEFAULT_FALLBACK=new Ft({h:"#000000",a:50});r;c;fb;constructor(t){this.r=t.r,t.c&&(this.c=new Ft(t.c)),t.fb&&(this.fb=new Ft(t.fb))}get radius(){return this.r}get color(){return this.c}get fallback(){return this.fb??ID.DEFAULT_FALLBACK}},Ll=class{blur;spr;clr;x;y;constructor(e){e=e??{},this.blur=e.blur??0,this.spr=e.spr??0,this.x=e.x??0,this.y=e.y??0,this.clr=new Ft(e.clr)}getStyle(e){return`${this.x*e}px ${this.y*e}px ${this.blur*e}px ${this.spr*e}px ${this.clr.rgba}`}},Yi=class{pl;pr;pt;pb;ml;mr;mt;mb;cent;constructor(e){e=e??{},this.pl=e.pl??0,this.pr=e.pr??0,this.pt=e.pt??0,this.pb=e.pb??0,this.ml=e.ml??0,this.mr=e.mr??0,this.mt=e.mt??0,this.mb=e.mb??0,this.cent=e.cent??!1}getHorizontal(){return this.pl+this.pr}getVertical(){return this.pt+this.pb}getPaddingCSS(){return`${this.pt}px ${this.pr}px ${this.pb}px ${this.pl}px`}},Rs=class{rot;constructor(e){e?.rot&&(this.rot=e.rot)}get rotate(){return this.rot}},cr=class{t;bg;br;clc;shd;spc;trf;a;w;h;x;y;constructor(e){this.t=e.t,e.bg&&(this.bg=new Ts(e.bg)),e.br&&(this.br=new xs(e.br)),e.shd&&(this.shd=new Ll(e.shd)),e.spc&&(this.spc=new Yi(e.spc)),this.trf=new Rs(e.trf),this.clc=e.clc,this.w=e.w,this.h=e.h,this.x=e.x,this.y=e.y,this.a=e.a}get alpha(){return this.a??100}get type(){return this.t}get typeAsString(){return Pt[this.t]}get click(){return this.clc}},Pt=(e=>(e[e.IMAGE=1]="IMAGE",e[e.TEXT=2]="TEXT",e[e.BUTTON=3]="BUTTON",e[e.FLEXBOX=4]="FLEXBOX",e[e.MULTI_COLUMN=5]="MULTI_COLUMN",e[e.CHECKBOX=6]="CHECKBOX",e[e.PRODUCTS=11]="PRODUCTS",e[e.PRODUCT=12]="PRODUCT",e[e.PRODUCT_IMAGE=13]="PRODUCT_IMAGE",e[e.PRODUCT_TITLE=14]="PRODUCT_TITLE",e[e.PRODUCT_VARIATIONS=15]="PRODUCT_VARIATIONS",e[e.PRODUCT_VARIATIONS_SELLING_PLANS=16]="PRODUCT_VARIATIONS_SELLING_PLANS",e[e.PRODUCT_BUTTON=18]="PRODUCT_BUTTON",e[e.PRODUCT_RATING=19]="PRODUCT_RATING",e[e.EMAIL_INPUT=51]="EMAIL_INPUT",e[e.PHONE_INPUT=52]="PHONE_INPUT",e[e.COUNTDOWN_TIMER=61]="COUNTDOWN_TIMER",e[e.CAROUSEL=62]="CAROUSEL",e[e.SHAPE=100]="SHAPE",e))(Pt||{}),Ns=class extends cr{constructor(e){super(e)}},Ki=class extends cr{src;constructor(e){super(e),this.src=e.src}},Za=(e=>(e[e.START=0]="START",e[e.CENTER=1]="CENTER",e[e.END=2]="END",e[e.JUSTIFY=3]="JUSTIFY",e))(Za||{}),vp=class{name;fonts;constructor(e){e=e??{},e.name&&(e.name=e.name!=="Arial"?e.name:""),this.name=e.name,this.fonts=e.fonts?.map(t=>new Z_(t))}},Z_=class{style;url;constructor(e){e=e??{},this.style=e.style,this.url=e.url}getFontDescriptor(){return{style:this.style===2||this.style===4?"italic":"normal",weight:this.style===4||this.style===3?"700":"400"}}getURL(){return`url('${this.url}') format('truetype')`}},Dn=class{fw;fs;fam;fmly;lh=1.2;ls;s;tc;ta;td;tdc;constructor(e){this.update(e)}get alignment(){return Za[this.ta]}get letterSpacing(){return this.ls?this.ls+"px":"normal"}update(e){e=e??{},e.lh&&(this.lh=e.lh),e.tdc&&(this.tdc=new Ft(e.tdc)),this.td=e.td,this.fs=e.s??e.fs??60,this.tc=new Ft(e.tc),this.ta=e.ta??1,this.fw=e.fw??400,this.ls=e.ls??0,this.tc.h??="#000000",this.fam=new vp(e.fam??e.fmly)}resize(e){this.s*=e,this.ls*=e}},_i=class extends cr{typo;constructor(e){super(e);let t=w(w({},e.f),e.typo);e.alg&&(t.ta=e.alg),e.c&&(t.tc=e.c),this.typo=new Dn(t)}get color(){return this.typography.tc}get typography(){return this.typo}},Co=class extends _i{prs;constructor(e){super(e),this.prs=e.prs}get parts(){return this.prs}},_p=class extends cr{o;constructor(e){super(e),this.o=e.o??5,this.w=this.w??1080,this.h=this.h??1920}getOrigin(){return this.o}},Xa=class{dd;hh;mm;ss;date;constructor(e){e??={},this.dd=e.dd??0,this.hh=e.hh??0,this.mm=e.mm??0,this.ss=e.ss??0,this.date=e.date?new Date(e.date):void 0}start(e,t){let n=new Date;e===2?(n.setSeconds(n.getSeconds()+this.ss),n.setMinutes(n.getMinutes()+this.mm),n.setHours(n.getHours()+this.hh),n.setDate(n.getDate()+this.dd)):n=this.date??new Date;let r=window.setInterval(()=>{let i=new Date().getTime(),s=n.getTime()-i;if(s<1){clearInterval(r);return}let o=Math.floor(s/(1e3*60*60*24)),a=Math.floor(s%(1e3*60*60*24)/(1e3*60*60)),l=Math.floor(s%(1e3*60*60)/(1e3*60)),c=Math.floor(s%(1e3*60)/1e3);t({days:o,hours:a,minutes:l,seconds:c})},1e3);return r}},Ja=class extends _i{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e),this.gap=e.gap,this.timerType=e.type,this.timer=new Xa(e.timer),this.show=e.show??{day:!0,hour:!0,minute:!0,second:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}},Ep=class{txt;c;constructor(e){e??={},this.txt=e.txt,this.c=new Ft(e.c??{})}get text(){return this.txt}get color(){return this.c}},So=class extends _i{ph;constructor(e){super(e),this.ph=new Ep(e.ph)}get placeholderText(){return this.ph.text}get placeholderColor(){return this.ph.color.rgba}},Qa=class extends So{constructor(e){e??={},super(e)}},ec=class extends So{},tc=class extends So{},nc=class extends Ki{},wp=class{en;ex;constructor(e){e=e??{},this.en=e.en,this.ex=e.ex}getEnterAnimation(){switch(this.en){case 2:return[{transform:"translateY(-100%)"},{transform:"translateY(0%)"}];case 3:return[{transform:"translateY(100%)"},{transform:"translateY(0%)"}];case 4:return[{transform:"translateX(-100%)"},{transform:"translateX(0%)"}];case 5:return[{transform:"translateX(100%)"},{transform:"translateX(0%)"}];case 6:return[{transform:"translate(-100%, -100%)"},{transform:"translate(0%, 0%)"}];case 7:return[{transform:"translate(100%, -100%)"},{transform:"translate(0%, 0%)"}];case 8:return[{transform:"translate(-100%, 100%)"},{transform:"translate(0%, 0%)"}];case 9:return[{transform:"translate(100%, 100%)"},{transform:"translate(0%, 0%)"}];case 10:return[{transform:"scale(0.1)"},{transform:"scale(1)"}];default:return[]}}getExitAnimation(){switch(this.ex){case 2:return[{transform:"translateY(0%)"},{transform:"translateY(-100%)"}];case 3:return[{transform:"translateY(0%)"},{transform:"translateY(100%)"}];case 4:return[{transform:"translateX(0%)"},{transform:"translateX(-100%)"}];case 5:return[{transform:"translateX(0%)"},{transform:"translateX(100%)"}];case 6:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, -100%)"}];case 7:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, -100%)"}];case 8:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, 100%)"}];case 9:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, 100%)"}];case 10:return[{transform:"scale(1)"},{transform:"scale(0)"}];default:return[]}}},Fl=class extends cr{gvt;max;cover;anim;embedded;position;constructor(e){e=e??{},super(e),this.gvt=e.gvt??5,this.max=e.max,this.cover=e.cover??!0,this.anim=new wp(e.anim),this.embedded=e.embedded,this.position=e.position??1,this.spc||(this.spc=new Yi({pl:k.IN_APP_DEFAULT_PADDING,pr:k.IN_APP_DEFAULT_PADDING,pt:k.IN_APP_DEFAULT_PADDING,pb:k.IN_APP_DEFAULT_PADDING}))}isEmbedded(){return this.position===2&&!!this.embedded}getEmbeddedSelector(){return`.letscooee-engagement.container-${this.embedded}`}},bp=class extends Fl{cont;elems=[];mob;constructor(e){e=e??{},super(e),this.cont=new _p(e.cont),this.mob=new Fl(e.mob),this.bg||(this.bg=this.cont.bg,delete this.cont.bg),e.elems.forEach(t=>{t.t===1?this.elems.push(new Ki(t)):t.t===2?this.elems.push(new Co(t)):t.t===3?this.elems.push(new Co(t)):t.t===100?this.elems.push(new Ns(t)):t.t===51?this.elems.push(new ec(t)):t.t===52?this.elems.push(new tc(t)):t.t===61?this.elems.push(new Ja(t)):t.t===15||t.t===16?this.elems.push(new Qa(t)):t.t===13&&this.elems.push(new nc(t))})}getStylesForWrapper(){if(this.cover)return{};let e;return this.gvt===1?e={top:0,left:0}:this.gvt===2?e={top:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===3?e={top:0,right:0}:this.gvt===6?e={top:"50%",right:0,transform:"translateY(-50%)"}:this.gvt===9?e={bottom:0,right:0}:this.gvt===8?e={bottom:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===7?e={bottom:0,left:0}:this.gvt===4?e={top:"50%",left:0,transform:"translateY(-50%)"}:e={top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},e.overflow="visible",e}getFlexStylesForContainer(){let e={display:"flex",flexDirection:"row"},t,n;return this.gvt===1?(t="flex-start",n="flex-start"):this.gvt===2?(t="center",n="flex-start"):this.gvt===3?(t="flex-end",n="flex-start"):this.gvt===4?(t="flex-start",n="center"):this.gvt===6?(t="flex-end",n="center"):this.gvt===7?(t="flex-start",n="flex-end"):this.gvt===8?(t="center",n="flex-end"):this.gvt===9?(t="flex-end",n="flex-end"):(t="center",n="center"),e.alignItems=n,e.justifyContent=t,e.overflow="visible",e}overrideForMobileView(){this.max=this.mob.max??this.max,this.cover=this.mob.cover??this.cover,this.gvt=this.mob.gvt??this.gvt,this.bg=this.mob.bg??this.bg,this.spc=this.mob.spc??this.spc,this.anim=this.mob.anim??this.anim,this.position=this.mob.position??this.position,this.embedded=this.mob.embedded??this.embedded}},rc=class{gap;dir;wrap;jc;ai;scroll;constructor(e){e??={},this.gap=e.gap??0,this.dir=e.dir??"row",this.wrap=e.wrap??"nowrap",this.jc=e.jc??"flex-start",this.ai=e.ai??"flex-start",this.scroll=e.scroll}},Cp=class{of;disp;pos;top;bottom;left;right;zIndex;constructor(e){e??={},this.of=e.of,this.disp=e.disp,this.pos=e.pos,this.top=e.top,this.bottom=e.bottom,this.left=e.left,this.right=e.right,this.zIndex=e.zIndex}},Sp=class{w;h;maxW;maxH;minW;minH;constructor(e){e??={},this.w=e.w??"100%",this.h=e.h??"auto",this.maxW=e.maxW,this.maxH=e.maxH,this.minW=e.minW,this.minH=e.minH}},Dp=class{size;bg;br;spc;typo;lout;flex;constructor(e){e??={},this.spc=new Yi(e.spc),e.size&&(this.size=new Sp(e.size)),e.bg&&(this.bg=new Ts(e.bg)),e.br&&(this.br=new xs(e.br)),e.typo&&(this.typo=new Dn(e.typo)),e.lout&&(this.lout=new Cp(e.lout)),e.flex&&(this.flex=new rc(e.flex))}},ic=class{sm;lg;constructor(e){e??={},this.sm=new Dp(e.sm),this.lg=new Dp(e.lg)}},_n=class{t;style;hide;when;clc;constructor(e,t){t??={},this.t=e,this.style=new ic(t.style),this.hide=t.hide,t.when?.op&&(this.when=t.when),t.clc&&(this.clc=t.clc)}get stringType(){return Pt[this.t]}},En=class extends _n{text;constructor(e,t){e?.style?.lg?.typo?.s&&delete e.style.lg.typo.s,e?.style?.sm?.typo?.s&&delete e.style.sm.typo.s,super(t??2,e),e??={},this.text=e.text}},As=class extends En{constructor(e,t){super(e,t??3)}},oc=class extends _n{value;constructor(e){super(6,e),e??={},this.value=e.value}},sc=class extends En{constructor(e=15,t){super(t,e)}},Ip=class extends _n{c;iconSize;showSingleStar;fullStar;halfStart;constructor(e){super(19,e),e??={},this.c=new Ft(e.c),this.iconSize=e.iconSize??24,this.showSingleStar=e.showSingleStar??!1,this.fullStar=e.fullStar,this.halfStart=e.halfStart}},KT=Re(us()),X_=class{enabled;type;color;constructor(e){e??={},this.enabled=e.enabled,this.type=e.type,this.color=new Ft(e.color)}},J_=class{size;enabled;color;constructor(e){e??={},this.enabled=e.enabled,this.size=e.size,this.color=new Ft(e.color)}},Bl=class{navigation;pagination;autoplay;maxInRow;gap;slidesPerView;constructor(e){e??={},this.navigation=new J_(e.navigation),this.pagination=new X_(e.pagination),this.autoplay=e.autoplay,this.slidesPerView=e.slidesPerView??1,this.maxInRow=e.maxInRow??e.slidesPerView??4,this.gap=e.gap??0}},Tp=class extends _n{conf;slide;formData;values;allowedTypes;constructor(e){super(62,e),e&&this.update(e)}update(e){e??={},this.slide=lr.getParsedElement(e.slide),this.formData=e.formData,this.values=e.values,this.conf=new Bl(e.conf),this.allowedTypes=e.allowedTypes}},xp=class extends En{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e,61),this.gap=e.gap,this.timerType=e.type,this.timer=new Xa(e.timer),this.show=e.show??{days:!0,hours:!0,minutes:!0,seconds:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}},Do=class extends _n{elems;constructor(e){super(4,e),this.update(e)}update(e){e??={},this.elems??=[],e.elems?.forEach(t=>{let n=lr.getParsedElement(t);n&&this.elems.push(n)})}},Ms=class extends _n{src;sm;lg;constructor(e,t){super(t??1,e),e&&this.update(e)}update(e){this.src=e.src,this.sm=e.sm,this.lg=e.lg}},lr=class OD{static getParsedElements(t){let n=[];return t?.forEach(r=>{let i=OD.getParsedElement(r);i&&n.push(i)}),n}static getParsedElement(t){switch(t.t){case 2:return new En(t);case 3:return new As(t);case 6:return new oc(t);case 11:return new Rp(t);case 12:return new Io(t);case 61:return new xp(t);case 4:return new Do(t);case 1:return new Ms(t);case 13:return new Ms(t,13);case 14:return new En(t,14);case 15:case 16:return new sc(t.t,t);case 18:return new As(t,18);case 62:return new Tp(t);case 19:return new Ip(t);default:KT.default.error("Unknown element type",t.t);return}}static parseAlignmentToJustifyContent(t){switch(t){case 1:return"center";case 2:return"flex-end";case 0:return"flex-start";default:return"flex-start"}}},Io=class extends _n{img;title;desc;price;compareAt;btn;variantDD;show;symbol;cBox;elems;noLinks;constructor(e){if(e??={},super(12,e),this.show=e.show,this.elems=lr.getParsedElements(e.elems),this.noLinks=e.noLinks,!this.elems.length){e.cBox&&this.elems.push(new oc(e.cBox)),this.elems.push(new Ms(e.img,13));let t=new En(e.title,14);t.hide=!e.show?.title,t.text="{{ product.name }}",this.elems.push(t);let n=new En(e.price);n.text="{{ product.price }}",n.hide=!e.show?.price;let r=new En(e.compareAt);r.text="{{ product.compare_price }}",r.hide=!e.show?.price,e.compareAt||(r.style=new ic(n.style),r.style.lg.typo=new Dn(te(w({},r.style.lg.typo),{td:"line-through"})),r.style.sm.typo=new Dn(te(w({},r.style.sm.typo),{td:"line-through"})));let i=new Do({style:{lg:{spc:{mb:10},flex:{dir:"row",gap:10,ai:"center",jc:lr.parseAlignmentToJustifyContent(n.style.lg.typo?.ta)}}}});i.elems.push(r),i.elems.push(n),this.elems.push(i);let s=new sc(15,e.variantDD);if(s.hide=!e.show?.variantDD,this.elems.push(s),e.btn){let o=new As(e.btn,18);o.hide=!e.show?.btn,this.elems.push(o)}}e.symbol&&(this.symbol=new En(e.symbol))}},Rp=class extends _n{conf;prod;constructor(e){super(11,e),e??={},this.conf=new Q_(e.conf),this.prod=new Io(e.prod)}},Np=class extends Bl{disp;maxItems;constructor(e){e??={},super(e),this.disp=e.disp,this.maxItems=e.maxItems}},Q_=class{lg;sm;constructor(e){e??={},this.lg=new Np(e.lg),this.sm=new Np(e.sm)}},Ap=class extends Do{constructor(e){super(e)}},ac=class{cont;elems=[];constructor(e){e=e??{},this.cont=new Ap(e.cont),e.elems?.forEach(t=>{this.addRawElement(t)})}addRawElement(e){let t=lr.getParsedElement(e);return t&&this.elems.push(t),t}},ZT=Re(qn()),eE=class{minValue;rewardType;label;reachingText;reachedText;discount;items;calculatedAlignment;constructor(e){this.minValue=e.minValue,this.rewardType=e.rewardType,this.label=e.label,this.reachingText=e.reachingText,this.reachedText=e.reachedText,this.discount=e.discount,this.items=e.items?.map(t=>new mn(t))}},Mp=class{layout;milestones;onlyLatestGift;noConfetti;constructor(e){this.layout=e.layout??ZT.ProgressBarLayout.ICONS,this.milestones=e.milestones?.map(t=>new eE(t))??[],this.onlyLatestGift=e.onlyLatestGift,this.noConfetti=e.noConfetti}},Op=class{applyDiscountOnMinimum;constructor(e){this.applyDiscountOnMinimum=e.applyDiscountOnMinimum}},tE=class{engagementID;shortID;contentType;delay;onsiteDeliveryType;objective;redirectBehaviour;constructor(e){this.shortID=e.shortID,this.contentType=e.contentType,this.engagementID=e.engagementID,this.delay=e.delay??0,this.redirectBehaviour=e.redirectBehaviour,this.onsiteDeliveryType=e.onsiteDeliveryType,this.objective=e.objective}isAnySplit(){return this.isABTesting()||this.isExclusionTesting()}isExclusionTesting(){return this.contentType===In.EngagementContentType.EXCLUSION}isABTesting(){return this.contentType===In.EngagementContentType.ABTESTING}isSingleContent(){return this.contentType===In.EngagementContentType.SINGLE}},Hn=class kD extends tE{static SWIPER_ELEMENTS=new Set([11,62]);nudgeID;contentID;variation;ian;widget;discount;placement;promotionType;contentSource;manipulation;klaviyoFormID;hasMultiplePlacement;skipSubscribedItems;progressBarConfig;bundleConfig;content;previewType;occurred;id;currency;props;items;nonMutableItems;embeddedItems;bundleFrom;collections;customerData;experiment;discountData=Ir({});constructor(t){super(t),this.id=t.id,this.nudgeID=t.nudgeID,this.currency=Oe.get().currencyCode??"USD",this.contentID=t.contentID,this.variation=t.variation,t.widget&&(this.widget=new ac(t.widget)),this.previewType=t.previewType,this.occurred=t.occurred??new Date,this.props=t.props,this.embeddedItems=t.embeddedItems?.map(n=>new mn(n)),this.items=t.items?.map(n=>new Yn(n))??[],this.nonMutableItems=t.items?.map(n=>new Yn(n))??[],this.collections=t.collections?.map(n=>new gp(n))??[],this.discount=t.discount,this.placement=t.placement,this.customerData=t.customerData,this.ian=t.ian?this.processPopup(t.ian):void 0,this.promotionType=t.promotionType,this.manipulation=new yp(t.manipulation),this.contentSource=t.contentSource,this.klaviyoFormID=t.klaviyoFormID,this.hasMultiplePlacement=t.hasMultiplePlacement,this.skipSubscribedItems=t.skipSubscribedItems,this.experiment=t.experiment,t.progressBarConfig&&(this.progressBarConfig=new Mp(t.progressBarConfig)),t.bundleConfig&&(this.bundleConfig=new Op(t.bundleConfig)),t.bundleFrom&&(this.bundleFrom=new Yn(t.bundleFrom)),t.content?.videoConfig&&(this.content={videoConfig:new Wf(t.content.videoConfig)})}shouldDelay(){return this.delay>0}sentryContext(){return{id:this.id,shortID:this.shortID,currency:this.currency,contentType:this.contentType,objective:this.objective,onsiteDeliveryType:this.onsiteDeliveryType,engagementID:this.engagementID,contentID:this.contentID,nudgeID:this.nudgeID,variation:this.variation}}getDelaySeconds(){let t=new Date().getTime()-this.occurred.getTime();return this.delay*1e3-t}isBundle(){return this.objective===In.EngagementObjective.BUNDLE_AND_UPSELL}isCartEmbed(){return this.onsiteDeliveryType===In.OnsiteDeliveryType.CART_EMBED}isPageEmbed(){return this.onsiteDeliveryType===In.OnsiteDeliveryType.PAGE_EMBED}isProgressBar(){return this.objective===In.EngagementObjective.PROGRESS_BAR}isSubscriptionUpsell(){return this.objective===In.EngagementObjective.SUBSCRIPTION_UPSELL}isCartRecovery(){return this.objective===In.EngagementObjective.CART_RECOVERY}isProductPromotion(){return this.objective===In.EngagementObjective.PRODUCT_PROMOTION}isProductPromoted(){return this.isProductPromotion()||this.isBundle()||this.isCartRecovery()}isCollectionPromoted(){return this.isProductPromotion()&&this.collections.length>0&&this.promotionType===In.PromotionType.COLLECTION}isBYOB(){return this.objective===In.EngagementObjective.BYOB}isShoppableVideo(){return this.objective===In.EngagementObjective.SHOPPABLE_VIDEO}processPopup(t){let n=JSON.stringify(t),r=this.items[0],i={},s={};if(r){let l=r.selectedOrFirstVariant.value;i={name:r.name,id:r.mID,link:r.link,vID:l.mID,image:r.variantImage,price:le.formatCurrency(l.price.d),comparePrice:le.formatCurrency(l.price.cmp),quantity:r.quantity},s={quantity:l.quantity}}let o={productCount:Ge.getCurrent().item_count},a=vn.render(n,{product:i,variant:s,cart:o,discount:this.discount,customer:this.customerData});return r&&(a=a.replace(new RegExp(k.PLACEHOLDER_IMAGE,"gi"),r.variantImage??r.imageURL)),new bp(JSON.parse(a))}calculateDiscountData(t,n){let r=Pp.ArrayUtils.sum(t,o=>o.selectedOrFirstVariant.value.price.d),i=Pp.ArrayUtils.sum(t,o=>{let a=o.selectedOrFirstVariant.value.price;return a.cmp??a.d}),s={actualPrice:r,totalComparePrice:i,discountAmount:0,discountPercentage:0,discountedPrice:r};if(!t?.length||!n||!this.discount?.type){this.discountData.value=this.formatCurrencyAndNumber(s);return}if(To.DiscountType.BXGY===this.discount.type&&this.discount.values?.length)s.discountPercentage=this.discount.values[0],this.updateEffectivePrice(t,s.discountPercentage,!0),s.discountAmount=s.actualPrice-Pp.ArrayUtils.sum(t,o=>o.selectedOrFirstVariant.value.effectivePrice.value);else if([To.DiscountType.UNIQUE_FLAT_ITEMS,To.DiscountType.STATIC].includes(this.discount.type)&&this.discount.values?.length)s.discountPercentage=this.discount.values[0],s.discountAmount=s.actualPrice*s.discountPercentage/100,this.updateEffectivePrice(t,s.discountPercentage);else if(this.discount.type===To.DiscountType.UNIQUE_FIXED_ITEMS&&this.discount.values?.length)s.discountAmount=s.actualPrice-this.discount.values[0],s.discountPercentage=s.discountAmount/s.actualPrice*100,this.updateEffectivePrice(t,s.discountPercentage);else if(this.discount.type===To.DiscountType.UNIQUE_CHEAPEST_ITEM_FREE){t.sort((a,l)=>l.selectedOrFirstVariant.value.price.d-a.selectedOrFirstVariant.value.price.d);let o=t[t.length-1];o.selectedOrFirstVariant.value.effectivePrice.value=0,s.discountAmount=o.selectedOrFirstVariant.value.price.d,s.discountPercentage=s.discountAmount/s.actualPrice*100}s.discountedPrice=s.actualPrice-s.discountAmount,this.discountData.value=this.formatCurrencyAndNumber(s)}getPrivateAttributesForLineItem(){return vt.get().skipItemAttribute?{}:{[k.VIA]:"Cooee",[k.CAMPAIGN_ATTRIBUTE]:this.shortID,[k.CONTENT_ATTRIBUTE]:this.contentID}}getKVFormatPrivateAttributesForLineItem(){return vt.get().skipItemAttribute?[]:[{key:k.VIA,value:"Cooee"},{key:k.CAMPAIGN_ATTRIBUTE,value:this.shortID},{key:k.CONTENT_ATTRIBUTE,value:this.contentID}]}isBundleDiscount(){return[To.DiscountType.UNIQUE_FIXED_ITEMS,To.DiscountType.UNIQUE_FLAT_ITEMS].includes(this.discount.type)}isBundleOnCartDrawer(){return this.isBundle()&&this.isCartEmbed()}isBundleOnPDP(){return this.isPageEmbed()&&this.isBundle()}hasSwiperElement(){let t=this.widget?.elems.find(r=>kD.SWIPER_ELEMENTS.has(r.t));if(!t)return!1;if(t.t===62)return!0;let n=sr.get().isMobile()?"sm":"lg";return t.conf[n].disp===2}toString(){return`Engagement(id=${this.shortID})`}getCartMagicVariables(){let t=Ge.getCurrent();return{productCount:t.item_count,amount:le.formatCurrency(t.total_price/100),originalAmount:le.formatCurrency(t.original_total_price/100)}}updateEffectivePrice(t,n,r=!1){let i=Oe.get().getCurrentItem();t.forEach(s=>{let o=s.selectedOrFirstVariant.value,a=o.price;if(r&&s.mID===i.mID)o.effectivePrice.value=a.d;else{let l=a.d*n/100;o.effectivePrice.value=a.d-l}})}formatCurrencyAndNumber(t){if(!t)return{};let n={discountPercentage:le.formatNumber(t.discountPercentage??0),discountCode:this.discount?.code};return["actualPrice","discountAmount","discountedPrice","totalComparePrice"].map(r=>{n[r]=le.formatCurrency(t[r])}),n}},Yl=Re(qn()),tx=Re(D_()),nx=Re(Ta()),cc=class{constructor(e,t){this._startTime=e,this._triggerData=t}intervals=[];selectedEmbeddedItems;renderer;closeCallback;inputFields=[];get startTime(){return this._startTime}get triggerData(){return this._triggerData}get inputs(){return this.inputFields}get rootClassName(){let e=this.triggerData.shortID??this.triggerData.id.slice(-6);return e==="test"&&(e="test-"+this.startTime.getTime().toString()),k.IN_APP_WRAPPER_NAME+"-"+e}get selectedItems(){return this.triggerData.items.filter(e=>e.selected.value)}get shouldGiveFBTDiscount(){let e=this.selectedItems.length;return this.triggerData.bundleConfig?.applyDiscountOnMinimum?this.triggerData.bundleConfig.applyDiscountOnMinimum<=e:e===this.triggerData.items.length}onClose(e){this.closeCallback=e}closeInApp(e,t){t??={};let n=(new Date().getTime()-this.startTime.getTime())/1e3,r=w({eventName:e,duration:n},t);this.stopIntervals(),this.closeCallback&&this.closeCallback(r)}addInputField(e,t){this.inputFields.push({id:e,type:t,isValid:!1})}updateValidation(e,t){this.inputFields.forEach(n=>{if(n.id===e){n.isValid=t;return}})}hasManipulatedProductQuantity(){let e=this.triggerData.manipulation.productQuantity;return e?.enabled&&e.min!=null&&e.max!=null}getManipulatedQuantity(e){let{min:t=1,max:n=100}=this.triggerData.manipulation.productQuantity;if(t>n)return C.error("Invalid range: min should be less than or equal to max."),e;if(e>=t&&e<=n)return e;let r=e%100;return r<t?t:r>n?n:r}stopIntervals(){this.intervals.forEach(e=>clearInterval(e))}},rx=Re(us()),XT=Re(iE()),Os=class{static _flags={};static getFlags(){return this._flags}static setFlags(e){this._flags=e??{}}static isECommerceApp(){return Dt.isShopify()}},NV=(0,XT.default)(fetch),AV={retryDelay:k.API_CALL_RETRY_DELAY,retryOn:(e,t,n)=>e>=k.API_CALL_MAX_ATTEMPTS?!1:!!(t!==null||n?.status&&n?.status>=500)},On=class RD{static INSTANCE;apiToken="";firstSeen="";constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new RD),this.INSTANCE}async validateSession(t){return this.post("/v1/event/validate-session",t)}updateUserData(t){this.put("/v1/user/update",t).then(async n=>{C.log("Updated user profile"),await Ps.getInstance().storeAndPopulateAuthData(n)}).catch(n=>{C.error("Error saving user profile",n)})}trackOrder(t){this.post("/v1/event/track-order",t).then(()=>{C.log("Sent Order")}).catch(n=>{C.error("Error sending track order",n)})}generateDiscount(t){return this.post("/v1/event/generate-discount",t)}updateDeviceProps(t){this.put("/v1/device/update",t).then(()=>{C.log("Updated device property")}).catch(async n=>{C.error("Error saving device property",n)})}setAPIToken(t){this.apiToken=t??""}setFirstSeen(t){this.firstSeen=t?.toUTCString()??""}get(t){return this.requestBackend("GET",t)}post(t,n){return this.requestBackend("POST",t,n)}put(t,n){return this.requestBackend("PUT",t,n)}async requestBackend(t,n,r){if(!Os.isECommerceApp()&&!Os.getFlags().allowEvents)return C.log(`Rejecting ${t} ${n} as this is not e-commerce app`),Promise.reject();n.startsWith("http")||(n=hn.apiURL+n);let i=this.getDefaultHeaders(),s="keepalive"in new Request("");if(r&&!s&&JSON.stringify(r).includes("CE App Background"))try{return this.performXMLHttpRequest(n,i,r)}catch(a){return _t.getInstance().captureException(a,{body:JSON.stringify(r)}),{}}let o={method:t,headers:i,keepalive:!0};return r&&(o.body=JSON.stringify(r)),this.request(n,o)}async request(t,n){let r=w(w({},AV),n),i=await NV(t,r);if(!i.ok)throw i;return i.json()}performXMLHttpRequest(t,n,r){return new Promise((i,s)=>{let o=new XMLHttpRequest;o.open("POST",t,!0),n.forEach((a,l)=>{o.setRequestHeader(l,a)}),o.onreadystatechange=()=>{if(o.readyState===XMLHttpRequest.DONE)if(o.status>=200&&o.status<300)try{o.getResponseHeader("Content-Type")?.includes("application/json")?i(JSON.parse(o.responseText)):s(new Error("Content-Type of response header is not json"))}catch(a){s(a)}else s(new Error(`Received status - ${o.status}(${o.statusText})`))},o.onerror=()=>{s(new Error("Network error occurred during the request."))},o.send(JSON.stringify(r))})}getDefaultHeaders(){let t=new Headers;return t.set("content-type","application/json"),t.set("cooee-sdk",k.SDK),t.set("cooee-sdk-code",k.SDK_VERSION_CODE.toString()),t.set("cooee-sdk-version",k.SDK_VERSION),t.set("cooee-first-seen",this.firstSeen),this.apiToken&&t.append("cooee-sdk-token",this.apiToken),hn.debug&&t.set("cooee-sdk-debug",String(1)),t}},lc=class{static sentryService=_t.getInstance();static httpApiService=On.getInstance();static async refreshItems(e){if(e.isCartEmbed()&&!e.isSubscriptionUpsell()){let i=(await Ge.getCurrent().getNormalisedCart()).items.map(s=>s.mID);e.items=e.items.filter(s=>!i.includes(s.mID))}if(vt.get().currencyCount<=1)return e.items;let t=e.items.length,n=e.items.map(i=>this.updatedItem(i,e.engagementID)),r=(await Promise.all(n)).filter(i=>i!=null);if(t&&!r.length){let i="Failed to fetch any product from Ajax API",s=new We(k.EVENT_CAMPAIGN_FAILED,{reason:i,currency:e.currency},e);throw Ve.getInstance().sendEvent(s),new Error(i)}if(e.isCartRecovery()){let i=Ge.getCurrent().items,s=[];for(let o of r)for(let a of o.vars){if(!a.isAvailable)continue;let l=i.find(d=>d.variant_id.toString()===a.mID);if(!l)continue;let c=new Yn(o);c.name=l.title;let h=new vi(a);h.name=l.variant_title,h.price.d=l.discounted_price/100,c.variants=[h],s.push(c)}return s}return r}static async updatedItem(e,t){let n=e,r,i=`/products/${n.slug}.js`;try{r=await this.httpApiService.request(i)}catch(o){return C.error(`Failed to fetch ${i}`,o),o instanceof Response?this.sentryService.captureMessage(`Shopify product fetch failed ${o.status}`,"error",{item:n,path:i},{"engagement.id":t}):this.sentryService.captureException(o,{item:n,path:i},{"engagement.id":t}),null}if(!r)return C.error("Item not found after AJAX call for:",n),null;n.name=r.title,n.tags=r.tags;let s=n.selectedOrFirstVariant.value;return n.vars.map(o=>{let a=r.variants.find(l=>l.id===+o.mID);o.name=a.title,o.isAvailable=a.available,o.price.d=a.price?a.price/100:a.price,o.price.effective=o.price.d,o.price.cmp=a.compare_at_price?a.compare_at_price/100:a.compare_at_price,+s.mID===a.id&&(s.effectivePrice.value=o.price.d)}),n}},uc=class{constructor(e){this.scalingFactor=e}getLayoutStyles(e){if(!e)return{display:"block"};let t={display:e.disp};return e.of&&(t.objectFit=e.of),e.pos==="absolute"&&(t.width="auto !important",t.position="absolute",t.right=e.right+"px",t.left=e.left+"px",t.top=e.top+"px",t.bottom=e.bottom+"px"),t}getSizeStyles(e){let t={};return e?.w&&(t.width=e.w),e?.h&&(t.height=e.h),e?.maxW&&(t.maxWidth=e.maxW),e?.maxH&&(t.maxHeight=e.maxH),e?.minW&&(t.minWidth=e.minW),e?.minH&&(t.minHeight=e.minH),t}getBorderStyles(e){if(!e)return{};let t={};return e.radius&&e.radius>0&&(t.borderRadius=this.getSizePx(e.radius)),e.width&&e.width>0&&(t.borderWidth=this.getSizePx(e.width),t.borderStyle=e.style?.toLowerCase(),e.color?this.getColourStyles(e.color,"border-color",t):t.borderColor="black"),t}getFlexStyles(e){return e?{gap:e.gap+"px",flexWrap:e.wrap,flexDirection:e.dir,justifyContent:e.jc,alignItems:e.ai,width:"100%"}:{}}getSpaceStyles(e){let t={};return e?(t.paddingTop=this.getSizePx(e.pt),t.paddingBottom=this.getSizePx(e.pb),t.paddingLeft=this.getSizePx(e.pl),t.paddingRight=this.getSizePx(e.pr),t.marginTop=this.getSizePx(e.mt),t.marginBottom=this.getSizePx(e.mb),t.marginLeft=e.cent?"auto":this.getSizePx(e.ml),t.marginRight=e.cent?"auto":this.getSizePx(e.mr),t):(t.margin="0 !important",t.padding="unset",t)}getBackgroundStyles(e){if(!e)return{};let t={};if(e.glossy){let n="backdrop-filter",r="-webkit-"+n,i=`blur(${e.glossy.radius}px)`;if(!CSS.supports(r,i)&&!CSS.supports(n,i))return{background:e.glossy.fallback.rgba};if(t[r]=i,t[n]=i,e.glossy.color)return this.getColourStyles(e.glossy.color,"background",t)}else if(e.solid){if(e.solid.grad)return this.getGradientStyles(e.solid.grad,"background",t);if(e.solid.hex)return{backgroundColor:e.solid.rgba}}else if(e.img){if(!e.img.src)return{};let n=(e.img.a??0)/100;t.background=`linear-gradient(rgba(0, 0, 0, ${n}), rgba(0, 0, 0, ${n})),url("${e.img.src}") no-repeat center`,t.backgroundSize="cover",e.img.a&&(t["-webkit-backdrop-filter"]=`opacity(${e.img.a})`,t.backdropFilter=`opacity(${e.img.a})`)}return t}getGradientStyles(e,t,n){if(n??={},e.type==="LINEAR"){let r=`linear-gradient(${e.ang}deg, ${e.c1}, ${e.c2}`;e.c3&&(r+=`, ${e.c3}`),r+=")",n[t]=r}return n}getColourStyles(e,t="color",n){return n??={},e?e.grad?this.getGradientStyles(e.grad,t,n):(e.hex&&(n[t]=e.rgba),n):n}getSizePx(e){return this.getScaledSize(e)+"px"}getScaledSize(e){return(e??0)*this.scalingFactor}},mt=class extends gi{stylesConverter=new uc(1);renderer=sr.get();mediaStyle={};deviceTypeKey;clickExecutor;componentWillMount(){this.deviceTypeKey=this.renderer.isMobile()?"sm":"lg",this.clickExecutor=new xo(this.props.triggerContext,this.props.element)}getCompiledStyles(){return this.putStyleAccordingToDevice(),w(w(te(w(w(w(w(w(w({},this.stylesConverter.getFlexStyles(this.mediaStyle.flex)),this.stylesConverter.getBackgroundStyles(this.mediaStyle.bg)),this.stylesConverter.getBorderStyles(this.mediaStyle.br)),this.stylesConverter.getSizeStyles(this.mediaStyle.size)),this.stylesConverter.getSpaceStyles(this.mediaStyle.spc)),this.stylesConverter.getLayoutStyles(this.mediaStyle.lout)),{boxSizing:"border-box",outline:"none"}),this.getComponentStyles()),this.props.style)}matchWhenCondition(e){if(!e?.op)return!0;let{lhs:t,rhs:n}=e;switch(e.op){case"eq":return t===n;case"gt":return+t>+n;case"gte":return+t>=+n;case"lt":return+t<+n;case"lte":return+t<=+n;case"ne":return t!==n;case"null":return t==null;case"empty":return t.trim()==="";case"in":return new RegExp(`\\b${n}\\b`).test(t);case"nin":return!new RegExp(`\\b${n}\\b`).test(t);default:return C.error(`Invalid operator found for when condition - ${e.op}`),!1}}putStyleAccordingToDevice(){let e=this.props.element;this.mediaStyle=e.style.lg,this.renderer.isMobile()&&e.style.sm&&Object.keys(e.style.sm).length&&(this.mediaStyle=w(w({},this.mediaStyle),e.style.sm))}sendTriggerClicked(e,t){this.clickExecutor.sendTriggerClicked(e,t)}async onClick(e,t){e.stopPropagation(),await this.clickExecutor.execute(t)}},MV=0,one=Array.isArray;function G(e,t,n,r,i,s){t||(t={});var o,a,l=t;if("ref"in l)for(a in l={},t)a=="ref"?o=t[a]:l[a]=t[a];var c={type:e,props:l,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--MV,__i:-1,__u:0,__source:i,__self:s};if(typeof e=="function"&&(o=e.defaultProps))for(a in o)l[a]===void 0&&(l[a]=o[a]);return it.vnode&&it.vnode(c),c}var ur=class extends mt{componentDidMount(){this.setState(()=>({text:this.props.element.text})),Sn(this.onChange.bind(this))}componentWillReceiveProps(e){this.props.element=e.element,this.onChange()}render(){let e=this.getCompiledStyles(),t=this.state.text;return t||(e.display="none",t=""),G("div",{style:e,onClick:this.customOnClick.bind(this),className:"lc-text",children:G("span",{style:this.getSpanStyle(),dangerouslySetInnerHTML:{__html:t}})})}customOnClick(){this.props.onClick&&this.props.onClick("title")}onChange(){if(this.props.element.text==null)return;let e=this.props.triggerContext.triggerData,t={bundle:e.discountData.value,customer:e.customerData,cart:e.getCartMagicVariables()},n=vn.render(JSON.stringify(this.props.element),t),r=new En(JSON.parse(n));if(!this.matchWhenCondition(r.when)){this.setState(()=>({text:""}));return}this.setState(()=>({text:r.text}))}getTypoStyles(){let e={},t=this.mediaStyle.typo??new Dn;return e.letterSpacing=t.letterSpacing,e.fontSize=t.fs+"px",e.lineHeight=t.lh,e.fontFamily=t.fam.name||"inherit",e.textAlign=t.alignment,e.fontWeight=t.fw,e.textDecoration=t.td??"none",this.stylesConverter.getColourStyles(t.tc,"color",e),e}getComponentStyles(){return w({},this.getTypoStyles())}getSpanStyle(){return{overflow:"hidden",display:"-webkit-box",webkitBoxOrient:"vertical",webkitLineClamp:2,color:"inherit",fontSize:"inherit",fontWeight:"inherit",fontFamily:"inherit"}}},ks=class extends ur{render(){return G("div",{style:this.getCompiledStyles(),className:"lc-button",onClick:e=>this.onClick(e,{item:this.props.item}),children:G("span",{style:this.getSpanStyle(),dangerouslySetInnerHTML:{__html:this.state.text}})})}getComponentStyles(){return te(w({},super.getComponentStyles()),{cursor:"pointer"})}},oE=class extends gi{render(){if(this.props.element.show[this.props.label.toLowerCase()])return this.props.element.lblPos==="end"?G("div",{style:w(w({},this.getElementStyle()),this.props.styles),children:[G("span",{children:this.props.time}),G("span",{style:this.getTimeLabelStyle(),children:this.props.label})]}):G("div",{style:w(w({},this.getElementStyle()),this.props.styles),children:[G("span",{style:this.getTimeLabelStyle(),children:this.props.label}),G("span",{children:this.props.time})]})}getDesign(){}getTimeLabelStyle(){return{fontSize:"0.5em",alignContent:"center"}}getElementStyle(){let e={display:"flex",flexDirection:"column",placeContent:"center center",textAlign:"center"};return this.props.element.horizontal&&(e.gridTemplateColumns="repeat(2, minmax(0, 1fr))"),e}},Vl=class extends ur{labels={Days:"00",Hours:"00",Minutes:"00",Seconds:"00"};componentWillMount(){super.componentWillMount(),this.setState(()=>w({},this.labels)),this.processAndStartTimer()}render(){return G("div",{style:this.getLabelsParentStyle(),children:Object.keys(this.labels).map(e=>G(oE,{styles:this.getCompiledStyles(),label:e,time:this.state[e],element:this.props.element}))})}getLabelsParentStyle(){return{display:"grid",justifyContent:"center",gridTemplateColumns:"repeat(4, auto)",gap:this.stylesConverter.getSizePx(this.props.element.gap)}}getDisplayStyles(){return{display:"grid",placeContent:"center center"}}getComponentStyles(){return w(w({},super.getComponentStyles()),this.getDisplayStyles())}processAndStartTimer(){this.props.element.timer.start(this.props.element.timerType,e=>{this.labels.Days=String(e.days).padStart(2,"0"),this.labels.Hours=String(e.hours).padStart(2,"0"),this.labels.Minutes=String(e.minutes).padStart(2,"0"),this.labels.Seconds=String(e.seconds).padStart(2,"0"),this.setState(()=>w({},this.labels))})}},Ul=class extends mt{componentDidMount(){Sn(()=>{this.setState(()=>({checked:this.props.item.selected.value}))})}render(){return G("div",{style:this.getCompiledStyles(),className:"lc-checkbox",children:G("input",{type:"checkbox",checked:this.state.checked,onChange:this.onChange.bind(this),style:{appearance:"auto"}})})}onChange(e){let{checked:t}=e.target;this.props.item.selected.value=t}getTypoStyles(){let e={},t=this.mediaStyle.typo??new Dn;return e.textAlign=t.alignment,e.justifyContent=t.alignment,e}getComponentStyles(){return te(w({},this.getTypoStyles()),{display:"flex"})}},JT=Re(qn()),Zi=class extends mt{constructor(e,t){super(e,t)}render(){let e=this.props.element[this.deviceTypeKey],t=e?.src||this.props.element.src||this.props.element.lg?.src;return G("img",{onClick:this.customOnClick.bind(this),className:"lc-image",alt:e?.name||"Image",onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this),src:t,style:this.getCompiledStyles()})}customOnClick(e){this.props.element.clc?.at===JT.ClickActionType.ADD_TO_CART&&this.props.triggerContext.triggerData.items[0]&&this.onClick(e,{item:this.props.triggerContext.triggerData.items[0]}),this.props.onClick&&this.props.onClick("image")}getComponentStyles(){let e=this.mediaStyle.lout;if(!e||e.pos!=="absolute")return{};let t={zIndex:e.zIndex,cursor:this.props.element.clc?.at?"pointer":"auto"};return this.mediaStyle.size?.w&&(t.width=this.mediaStyle.size.w),this.mediaStyle.size?.h&&(t.height=this.mediaStyle.size.h),t}handleMouseEnter(e){let t=this.props.element[this.deviceTypeKey]?.secondarySrc;t&&(e.currentTarget.src=t)}handleMouseLeave(e){e.currentTarget.src=this.props.element[this.deviceTypeKey]?.src}},Xi=class extends mt{render(){if(!(this.props.element.hide||!this.matchWhenCondition(this.props.element.when)))return G("div",{style:this.getCompiledStyles(),class:"lc-flexbox",children:G(Ro,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext})})}getComponentStyles(){let e=this.mediaStyle.flex??new rc,t={display:"flex",gap:e.gap+"px",flexWrap:e.wrap,flexDirection:e.dir,justifyContent:e.jc,alignItems:e.ai};return e.wrap==="nowrap"&&e.scroll&&(e.dir==="column"?t["overflow-y"]="auto":t["overflow-x"]="auto"),t}},Hl=class extends Xi{render(){if(!(this.props.element.hide||!this.matchWhenCondition(this.props.element.when)))return G("div",{style:this.getCompiledStyles(),class:"lc-flexbox",children:G(dc,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext,item:this.props.item,noLinks:this.props.noLinks})})}},jl=class extends mt{render(){return G("select",{style:this.getCompiledStyles(),value:this.props.selectedVariant.selectedSellingPlan.value?.mID??"",onChange:this.onChange.bind(this),disabled:this.state.disabled,className:"lc-dropdown",children:this.createSelectItems()})}componentDidMount(){Sn(()=>{this.setState(()=>({disabled:this.props.triggerContext.triggerData.isBundle()?!this.props.item.selected.value:!1}))})}getTypoStyles(){let e={},t=this.mediaStyle.typo??new Dn;return e.letterSpacing=t.letterSpacing,e.fontSize=t.fs+"px",e.lineHeight=t.lh,e.fontFamily="inherit",e.textAlign=t.alignment,e.fontWeight=t.fw,this.stylesConverter.getColourStyles(t.tc,"color",e),e.boxShadow="none",e}getComponentStyles(){let e={};return this.props.selectedVariant.sellingPlans?.length||(e.visibility="hidden"),w(w({},e),this.getTypoStyles())}createSelectItems(){let e=[],t=this.props.selectedVariant;if(!t.sellingPlans?.length)return[];this.props.triggerContext.triggerData.skipSubscribedItems?t.selectedSellingPlan.value||(t.sellingPlans[0].isSelected=!0,t.changeSellingPlan(t.sellingPlans[0])):e.push(G("option",{value:"",selected:!t.selectedSellingPlan,children:"One time purchase"}));for(let n of t.sellingPlans??[])e.push(G("option",{value:n.mID,selected:n.isSelected,children:n.name}));return e}onChange(e){let t=e.target.value;t?this.props.selectedVariant.selectedSellingPlan.value=this.props.selectedVariant.sellingPlans.find(n=>n.mID===t):this.props.selectedVariant.selectedSellingPlan.value=void 0}},QT=Re(Pf()),$l=class extends mt{colorRegex=new RegExp('fill="#[a-zA-Z0-9]+"');constructor(){super(),vn.escape=QT.MustacheUtils.escapeHtml}render(){let e=this.getCompiledStyles(),t=this.getRating();return t||(e.display="none",t=""),G("div",{style:e,className:"lc-star-rating",dangerouslySetInnerHTML:{__html:t}})}getRating(){let e=this.props.element.fullStar,t=this.props.element.halfStart,n={size:this.props.element.iconSize,color:this.props.element.c.hex};e=vn.render(e,{svg:n}),t=vn.render(t,{svg:n});let r=this.props.review;if(!r?.rating)return"";let i="";if(this.props.element.showSingleStar)i=e;else{let s=5,o=`${r.rating}`.split(".");for(let a=0;a<+o[0];a++)i+=e,s--;o[1]&&(i+=t,s--);for(let a=0;a<s;a++)i+=e.replace(this.colorRegex,'fill="#f1f1f1')}return i}getComponentStyles(){return{display:"flex",alignItems:"center"}}},Wl=class extends mt{render(){return G("select",{style:this.getCompiledStyles(),value:this.props.item.selectedOrFirstVariant.value.mID,onChange:this.onChange.bind(this),disabled:this.state.disabled,className:"lc-dropdown",children:this.createSelectItems()})}componentDidMount(){Sn(()=>{this.setState(()=>({disabled:this.props.triggerContext.triggerData.isBundle()?!this.props.item.selected.value:!1}))})}getTypoStyles(){let e={},t=this.mediaStyle.typo??new Dn;return e.letterSpacing=t.letterSpacing,e.fontSize=t.fs+"px",e.lineHeight=t.lh,e.fontFamily="inherit",e.textAlign=t.alignment,e.fontWeight=t.fw,this.stylesConverter.getColourStyles(t.tc,"color",e),e.boxShadow="none",e}getComponentStyles(){let e={};return this.props.item.vars?.length===1&&this.props.item.vars[0].name==="Default Title"&&(e.visibility="hidden"),w(w({},e),this.getTypoStyles())}createSelectItems(){let e=[];for(let t of this.props.item.vars)e.push(G("option",{value:t.mID,disabled:!t.isAvailable,children:t.name}));return e}onChange(e){let t=e.target.value;this.props.item.selectedOrFirstVariant.value=this.props.item.vars.find(n=>n.mID===t)}},dc=class extends mt{constructor(e,t){super(e,t),this.setState(()=>({decoration:"unset"}))}renderElement(e){if(!(e.hide||!this.matchWhenCondition(e.when))){if(e.t===4){let t=e;return G(Hl,{element:t,triggerContext:this.props.triggerContext,elements:t.elems,item:this.props.item,noLinks:this.props.noLinks})}if(e.t===6)return this.props.triggerContext.triggerData.isBundle()?G(Ul,{element:e,item:this.props.item,triggerContext:this.props.triggerContext}):void 0;if(e.t===13){let t=e,n=this.props.item,r=n.variantImage??n.imageURL,i=n.variantSecondaryImage??n.secondaryImageURL;t.lg=t.sm={src:r,name:n.name,secondarySrc:i};let s=G(Zi,{element:t,onClick:this.customOnClick.bind(this),triggerContext:this.props.triggerContext});return this.props.noLinks?s:G("a",{href:this.props.item.selectedOrFirstVariant.value.link,style:{display:"block"},children:s})}if(e.t===14)return this.renderProductTitle(e);if(e.t===15){let t=e;return this.props.triggerContext.triggerData.isCartEmbed()&&this.props.item.vars?.length===1&&this.props.item.vars[0].name==="Default Title"?void 0:G(Wl,{element:t,item:this.props.item,triggerContext:this.props.triggerContext})}return e.t===16?G(jl,{element:e,selectedVariant:this.props.item.selectedOrFirstVariant.value,item:this.props.item,triggerContext:this.props.triggerContext}):e.t===19?G($l,{element:e,triggerContext:this.props.triggerContext,review:this.props.item.reviews}):e.t===18||e.t===3?G(ks,{element:e,item:this.props.item,triggerContext:this.props.triggerContext}):G(Ro,{elements:[e],element:this.props.element,triggerContext:this.props.triggerContext})}}render(){return this.props.elements.map(e=>this.renderElement(e))}getComponentStyles(){return{}}renderProductTitle(e){let t=G(ur,{element:e,onClick:this.customOnClick.bind(this),triggerContext:this.props.triggerContext});return this.props.noLinks?t:G("a",{href:this.props.item.selectedOrFirstVariant.value.link,style:{display:"block",textDecoration:this.state.decoration},onMouseEnter:this.onMouseEnter.bind(this),onMouseLeave:this.onMouseLeave.bind(this),children:t})}customOnClick(e){this.sendTriggerClicked([this.props.item.toEmbed()],{from:e})}onMouseEnter(){this.setState(()=>({decoration:"underline"}))}onMouseLeave(){this.setState(()=>({decoration:"unset"}))}},ex=Re(Qf()),Ls=class extends mt{productElement;constructor(e,t){super(e,t),this.setState(()=>({decoration:"unset"}))}render(){let e=JSON.stringify(this.props.element),t=vn.render(e,this.getProductData());if(this.productElement=new Io(JSON.parse(t)),!(this.productElement.hide||!this.matchWhenCondition(this.productElement.when)))return G("div",{style:w({},this.getCompiledStyles()),class:"lc-single-product",children:G(dc,{element:this.productElement,elements:this.productElement.elems,triggerContext:this.props.triggerContext,item:this.props.item,noLinks:this.productElement.noLinks})})}getComponentStyles(){return{flexShrink:0}}getProductData(){if(!this.props.item)return{};let e=this.props.item.selectedOrFirstVariant.value,t=e.price,n=this.props.item.name,r=this.props.item.category,i=le.formatCurrency(t.d,!0),s=this.props.item.variantImage??this.props.item.imageURL,o=this.props.item.meta,a=this.props.item.tags?.join(",")??"",l=this.props.item.reviews?.rating,c=this.props.item.reviews?.totalReviews,h=t.cmp&&t.cmp>t.d,d=this.props.triggerContext.hasManipulatedProductQuantity()?this.props.triggerContext.getManipulatedQuantity(this.props.item.quantity):this.props.item.quantity,f={name:n,price:i,quantity:d,image_url:s,meta:o,category:r,rating:l,reviews:c,tags:a},g=e.effectivePrice.value!==t.d;g&&(f.effective_price=le.formatCurrency(e.effectivePrice.value));let m=this.props.triggerContext.triggerData.discount.type===ex.DiscountType.BXGY;if(!g&&m&&(f.effective_price=le.formatCurrency(e.effectivePrice.value),f.price=""),h){f.compare_price=le.formatCurrency(t.cmp);let x=t.cmp-t.d;f.discount_percent=(x/t.cmp*100).toFixed(0),f.discount_price=le.formatCurrency(x)}let b={name:e.name,quantity:this.props.triggerContext.hasManipulatedProductQuantity()?this.props.triggerContext.getManipulatedQuantity(e.quantity):e.quantity};return{product:f,variant:b,svg:{color:()=>"{{svg.color}}",size:()=>"{{svg.size}}"}}}};function kp(e,t){if(!e||!window.Swiper)return;let n=new window.Swiper(e,{loop:!0,slidesPerView:t.maxInRow,spaceBetween:t.gap+"px",pagination:{type:t.pagination.type,el:e.querySelector(".swiper-pagination"),clickable:!0,renderBullet:(r,i)=>`
44
44
  <span class="${i}"
45
45
  style="background-color: ${t.pagination.color?.rgba};"></span>
46
46
  `,renderProgressbar:r=>`
@@ -113,5 +113,5 @@ mutation cartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!]) {
113
113
  super.ngOnDestroy();
114
114
  }
115
115
  }
116
- `}var BE=!1;function jU(e,t,n){let r=e[t];if(BE&&typeof r!="function")throw new Error(`${e.constructor.name} is using untilDestroyed but doesn't implement ${t}`);lR(e,n),e[t]=function(){r.apply(this,arguments),uR(this,n),e[t]=r}}function hR(e,t){return n=>{let r=cR(t);typeof t=="string"?jU(e,t,r):(BE&&$U(e),lR(e,r));let i=e[r];return BE&&VU(e,i),n.pipe(hr(i))}}function $U(e){let t=Object.getPrototypeOf(e);if(!(aR in t))throw new Error("untilDestroyed operator cannot be used inside directives or components or providers that are not decorated with UntilDestroy decorator")}var vR=Re(np()),mR=Re(np()),Th=class Hf{engagementTrigger;isMobile;ngOnInit(){this.engagementTrigger=this.triggerContext?.triggerData,this.isMobile=new mR.default().getDevice().type==="mobile"}static \u0275fac=function(t){return new(t||Hf)};static \u0275cmp=yt({type:Hf,selectors:[["cooee-base-video"]],inputs:{triggerContext:"triggerContext"},decls:0,vars:0,template:function(t,n){},encapsulation:2})},VE=Re(qn());function WU(e,t){e&1&&tn(0," Open Cart ")}function GU(e,t){e&1&&tn(0," Add To Cart ")}var xh=class jy{item;performCTA=new Je;atcClicked=!1;clickAddToCart(t){t.stopPropagation(),this.performCTA.emit({item:this.item,cta:this.atcClicked?VE.ClickActionType.OPEN_CART:VE.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}static \u0275fac=function(t){return new(t||jy)};static \u0275cmp=yt({type:jy,selectors:[["cooee-product-card"]],inputs:{item:"item"},outputs:{performCTA:"performCTA"},decls:12,vars:11,consts:[[1,"lc-item-card"],[1,"lc-card-content"],[1,"lc-item-image",3,"alt","src"],[1,"lc-product-details"],[1,"lc-item-name"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-cta-button",3,"click"]],template:function(t,n){t&1&&(re(0,"div",0)(1,"div",1),Ne(2,"img",2),re(3,"div",3)(4,"div",4),tn(5),ie(),Ne(6,"div",5),Cn(7,"cooeeCurrency"),Cn(8,"safeHtml"),ie()(),re(9,"button",6),Rt("click",function(r){return n.clickAddToCart(r)}),xt(10,WU,1,0)(11,GU,1,0),ie()()),t&2&&(X(2),zn("alt",n.item.name),Be("src",n.item.imageURL,an),X(3),ss(" ",n.item.name," "),X(),Be("innerHTML",Nn(8,9,Nn(7,7,n.item.price)),Fr),X(3),mo("atc-clicked",n.atcClicked),X(),$t(n.atcClicked?10:11))},dependencies:[li,ui],styles:["[_nghost-%COMP%]{display:block;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background-color:#ffffff80;border-radius:7px;cursor:pointer}.lc-item-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:8px}.lc-card-content[_ngcontent-%COMP%]{display:flex;gap:8px;width:100%;align-items:start}.lc-item-image[_ngcontent-%COMP%]{width:70px;height:70px;object-fit:cover;box-sizing:border-box;border-radius:7px}.lc-product-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3.5px;font-size:10.5px}.lc-item-name[_ngcontent-%COMP%]{font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:16px;line-height:normal}.lc-item-price[_ngcontent-%COMP%]{font-size:16px;line-height:normal}.lc-cta-button[_ngcontent-%COMP%]{padding:12px 8px;border:none;border-radius:8px;width:100%;background:#f6339a;text-align:center;font-weight:500;cursor:pointer;color:#fff;font-size:16px}.lc-cta-button.atc-clicked[_ngcontent-%COMP%]{background:#000}"]})},Nh=Re(qn()),gR=Re(iE()),zU=(0,gR.default)(fetch),Rh=class{static async getAjaxItem(e){let t=this.getItemSlug(e);if(!t)return;let n,r=Dt.getRootPrefix()+`products/${t}.js`;try{n=await(await zU(r)).json()}catch(i){C.error(`Failed to fetch ${r}`,i);let s=_t.getInstance();i instanceof Response?s.captureMessage(`Shopify product fetch failed ${i.status}`,"error",{mID:e.mID,path:r}):s.captureException(i,{mID:e.mID,path:r});return}if(!n){C.error("Item not found after AJAX call for:",e.mID);return}return n}static getItemSlug(e){if(e.link)try{let t=new URL(e.link).pathname.match(/\/products\/([^/]+?)(?:\.html)?$/);return t?t[1]:void 0}catch{return}}},qU=(e,t)=>t.id;function YU(e,t){if(e&1&&Ne(0,"img",9),e&2){let n=t.$implicit,r=me(2);Be("src",n,an)("alt",r.item.name)}}function KU(e,t){if(e&1&&Qt(0,YU,1,2,"img",9,os),e&2){let n=me();en(n.ajaxItem.images)}}function ZU(e,t){if(e&1&&Ne(0,"img",9),e&2){let n=me();Be("src",n.item.imageURL,an)("alt",n.item.name)}}function XU(e,t){if(e&1&&(Ne(0,"span",12),Cn(1,"cooeeCurrency"),Cn(2,"safeHtml")),e&2){let n=me();Be("innerHTML",Nn(2,3,Nn(1,1,(n.selectedVariant==null?null:n.selectedVariant.price)/100)),Fr)}}function JU(e,t){if(e&1&&(Ne(0,"span",12),Cn(1,"cooeeCurrency"),Cn(2,"safeHtml")),e&2){let n=me();Be("innerHTML",Nn(2,3,Nn(1,1,n.item.price)),Fr)}}function QU(e,t){if(e&1){let n=nr();re(0,"div",18),Rt("click",function(){let r=Xt(n).$implicit,i=me(2);return Jt(i.selectedVariant=r)})("keydown",function(){let r=Xt(n).$implicit,i=me(2);return Jt(i.selectedVariant=r)}),re(1,"span",19),tn(2),ie()()}if(e&2){let n=t.$implicit,r=me(2);mo("lc-selected-variant",(r.selectedVariant==null?null:r.selectedVariant.id)===n.id),X(2),Ca(n.title)}}function eH(e,t){if(e&1&&(re(0,"div",13),Qt(1,QU,3,3,"div",17,qU),ie()),e&2){let n=me();X(),en(n.availableVariants)}}function tH(e,t){if(e&1&&(re(0,"div",20),tn(1,"Description"),ie(),Ne(2,"div",21),Cn(3,"safeHtml")),e&2){let n=me();X(2),Be("innerHTML",Nn(3,1,n.ajaxItem==null?null:n.ajaxItem.description),Fr)}}function nH(e,t){e&1&&tn(0," Open Cart ")}function rH(e,t){e&1&&tn(0," Add To Cart ")}var Ah=class S_{constructor(t){this.cd=t}item;closeModel=new Je;performCTA=new Je;atcClicked=!1;selectedVariant=null;availableVariants=[];ajaxItem;ClickActionType=Nh.ClickActionType;async ngOnInit(){this.ajaxItem=await Rh.getAjaxItem(this.item),this.processVariants(),this.cd.markForCheck()}closeDialog(){this.closeModel.emit()}clickAddToCart(t){t.vID=this.selectedVariant?.id,t.vName=this.selectedVariant?.public_title,this.performCTA.emit({item:t,cta:this.atcClicked?Nh.ClickActionType.OPEN_CART:Nh.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}processVariants(){this.availableVariants=this.ajaxItem?.variants??[],this.selectedVariant=this.availableVariants[0]}static \u0275fac=function(t){return new(t||S_)(Mt(rr))};static \u0275cmp=yt({type:S_,selectors:[["cooee-product-modal"]],inputs:{item:"item"},outputs:{closeModel:"closeModel",performCTA:"performCTA"},decls:25,vars:6,consts:[[1,"lc-card-wrapper"],[1,"lc-card-header"],[1,"lc-header"],[1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","fill","#000"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc-card-content"],[1,"lc-image-strip"],[1,"w-28","h-28","object-contain",3,"src","alt"],[1,"lc-inner-body"],[1,"lc-item-name"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-variant-list"],[1,"lc-card-footer"],[1,"lc-cta-button",3,"click"],[1,"lc-more-info-button",3,"click"],["tabindex","{0}",1,"lc-variant",3,"lc-selected-variant"],["tabindex","{0}",1,"lc-variant",3,"click","keydown"],[1,"truncate","max-w-[200px]"],[1,"lc-description-title"],[1,"lc-description",3,"innerHTML"]],template:function(t,n){t&1&&(re(0,"div",0)(1,"div",1)(2,"div",2),tn(3,"Shop Now"),ie(),re(4,"button",3),Rt("click",function(){return n.closeDialog()}),vr(),re(5,"svg",4),Ne(6,"path",5)(7,"path",6),ie()()(),ns(),re(8,"div",7)(9,"div",8),xt(10,KU,2,0)(11,ZU,1,2,"img",9),ie(),re(12,"div",10)(13,"div",11),tn(14),ie(),xt(15,XU,3,5,"span",12)(16,JU,3,5,"span",12)(17,eH,3,0,"div",13)(18,tH,4,3),ie()(),re(19,"div",14)(20,"button",15),Rt("click",function(){return n.clickAddToCart(n.item)}),xt(21,nH,1,0)(22,rH,1,0),ie(),re(23,"button",16),Rt("click",function(){return n.performCTA.emit({item:n.item,cta:n.ClickActionType.GO_TO_PRODUCT})}),tn(24," More Info "),ie()()()),t&2&&(X(10),$t(!(n.ajaxItem==null||n.ajaxItem.images==null)&&n.ajaxItem.images.length?10:11),X(4),Ca(n.item.name),X(),$t(n.selectedVariant!=null&&n.selectedVariant.price?15:16),X(2),$t(n.availableVariants[0].title!=="Default Title"?17:-1),X(),$t(n.ajaxItem!=null&&n.ajaxItem.description?18:-1),X(3),$t(n.atcClicked?21:22))},dependencies:[ui,li],styles:["[_nghost-%COMP%]{display:block;background:#fff;height:70vh;border-top-left-radius:16px;border-top-right-radius:16px}.lc-card-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%}.lc-card-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:8px 16px;border-bottom:1px solid var(--lc-color-gray-300)}.lc-header[_ngcontent-%COMP%]{font-size:24px;font-weight:500}.lc-close-button[_ngcontent-%COMP%]{background:transparent;border:none;width:36px;height:36px}.lc-close-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:#000000b3}.lc-card-content[_ngcontent-%COMP%]{flex:1;overflow-y:auto}.lc-inner-body[_ngcontent-%COMP%]{padding:16px;display:flex;flex-direction:column;gap:8px}.lc-image-strip[_ngcontent-%COMP%]{width:100%;display:flex;overflow-x:auto;gap:.5rem;flex-wrap:nowrap}.lc-image-strip[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:auto;height:200px}.lc-item-name[_ngcontent-%COMP%]{font-size:20px;font-weight:500;line-height:normal}.lc-item-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500}.lc-variant-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;padding-top:.5rem;width:100%}.lc-variant[_ngcontent-%COMP%]{padding:4px 8px;border-radius:4px;background-color:#f3f4f6;color:#1f2937;font-size:12px;cursor:pointer;border:1px solid #e5e7eb;display:flex;align-items:center;gap:4px}.lc-selected-variant[_ngcontent-%COMP%]{background-color:#fce8f3;border:1px solid #F8B4D9;color:#db2777}.lc-description-title[_ngcontent-%COMP%]{font-size:18px;font-weight:500;margin-top:8px;line-height:normal}.lc-description[_ngcontent-%COMP%]{line-height:normal}.lc-card-footer[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;padding:12px;background-color:#0000004d;box-shadow:0 4px 6px #52525b4d;gap:12px}.lc-cta-button[_ngcontent-%COMP%], .lc-more-info-button[_ngcontent-%COMP%]{width:50%;padding:12px;border:none;border-radius:.5rem;font-weight:600;display:flex;justify-content:center;cursor:pointer;font-size:16px}.lc-cta-button[_ngcontent-%COMP%]{background-color:#000;color:#fff}.lc-more-info-button[_ngcontent-%COMP%]{background-color:#ffe4e6;color:#db2777}"]})};function iH(e,t){e&1&&(vr(),re(0,"svg",1),Ne(1,"path",2)(2,"path",3),ie())}function oH(e,t){e&1&&(vr(),re(0,"svg",1),Ne(1,"path",2)(2,"path",4),ie())}var Mh=class e0{muted;buttonClicked=new Je;static \u0275fac=function(t){return new(t||e0)};static \u0275cmp=yt({type:e0,selectors:[["cooee-mute-toggle"]],inputs:{muted:"muted"},outputs:{buttonClicked:"buttonClicked"},decls:3,vars:1,consts:[[1,"lc-mute-button","lc:bg-black/50",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M4.34 2.93L2.93 4.34 7.29 8.7 7 9H3v6h4l5 5v-6.59l4.18 4.18c-.65.49-1.38.88-2.18 1.11v2.06c1.34-.3 2.57-.92 3.61-1.75l2.05 2.05 1.41-1.41L4.34 2.93zM10 15.17L7.83 13H5v-2h2.83l.88-.88L10 11.41v3.76zM19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zm-7-8l-1.88 1.88L12 7.76zm4.5 8c0-1.77-1.02-3.29-2.5-4.03v1.79l2.48 2.48c.01-.08.02-.16.02-.24z"],["d","M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77z"]],template:function(t,n){t&1&&(re(0,"button",0),Rt("click",function(){return n.buttonClicked.emit()}),xt(1,iH,3,0,":svg:svg",1)(2,oH,3,0,":svg:svg",1),ie()),t&2&&(X(),$t(n.muted?1:2))},styles:["button[_ngcontent-%COMP%]{width:40px;height:40px;display:flex;justify-content:center;align-items:center;border:none;cursor:pointer;border-radius:100%}"]})},Oh=class t0{width;static \u0275fac=function(t){return new(t||t0)};static \u0275cmp=yt({type:t0,selectors:[["cooee-video-progress-bar"]],inputs:{width:"width"},decls:5,vars:2,consts:[[1,"lc:absolute","lc:top-1","lc:w-full","lc:z-10"],[1,"lc:px-2"],[1,"lc:h-1","lc:w-full","lc:bg-gray-700","lc:mb-2"],[1,"lc:h-1","lc:bg-pink-500"]],template:function(t,n){t&1&&(re(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),Ne(4,"div"),ie()()()()),t&2&&(X(3),ho("width",n.width,"%"))},encapsulation:2})},sH=["swiperContainer"],aH=["videoPlayers"],yR=(e,t)=>t.url,cH=(e,t)=>t.mID;function lH(e,t){if(e&1&&Ne(0,"source",12),e&2){let n=t.$implicit;zn("type",n.mimeType),ji("media","(max-width: ",n.width,"px)"),Be("src",n.url,an)}}function uH(e,t){if(e&1&&Ne(0,"source",13),e&2){let n=t.$implicit;zn("type",n.mimeType),Be("src",n.url,an)}}function dH(e,t){e&1&&Bd(0)}function fH(e,t){if(e&1){let n=nr();re(0,"cooee-product-modal",21),Rt("performCTA",function(r){Xt(n);let i=me(3);return Jt(i.performClickToAction(r,i.selectedVideo))})("closeModel",function(){Xt(n);let r=me(3);return Jt(r.productModalClosed())}),ie()}if(e&2){let n=me(3);Be("item",n.selectedItem)}}function pH(e,t){if(e&1){let n=nr();re(0,"cooee-product-card",22),Rt("performCTA",function(r){Xt(n);let i=me(2).$implicit,s=me();return Jt(s.performClickToAction(r,i))})("click",function(){let r=Xt(n).$implicit,i=me(2).$implicit,s=me();return Jt(s.productCardClicked(r,i))}),ie()}if(e&2){let n=t.$implicit;Be("item",n)}}function hH(e,t){if(e&1){let n=nr();Ne(0,"cooee-video-progress-bar",14),re(1,"div",15)(2,"cooee-mute-toggle",16),Rt("buttonClicked",function(){Xt(n);let r=me(2);return Jt(r.toggleMute())}),ie(),xt(3,dH,1,0,"ng-container",10),ie(),xt(4,fH,1,1,"cooee-product-modal",17),re(5,"div",18)(6,"div",19),Qt(7,pH,1,1,"cooee-product-card",20,cH),ie()()}if(e&2){let n=me(),r=n.$implicit,i=n.$index,s=me(),o=Ey(11);Be("width",s.videoProgress[i]||0),X(2),Be("muted",s.muted),X(),Be("ngTemplateOutlet",o),X(),$t(s.selectedItem?4:-1),X(3),en(r.items)}}function mH(e,t){if(e&1){let n=nr();re(0,"div",6)(1,"video",11,2),Rt("timeupdate",function(r){let i=Xt(n).$index,s=me();return Jt(s.updateProgress(r,i))})("click",function(){let r=Xt(n).$index,i=me();return Jt(i.currentIndex===r&&i.toggleMute())})("ended",function(){Xt(n);let r=me();return Jt(r.onVideoEnded())}),Qt(3,lH,1,4,"source",12,yR),Qt(5,uH,1,2,"source",13,yR),ie(),xt(7,hH,9,4),ie()}if(e&2){let n=t.$implicit,r=t.$index,i=me();X(),Be("autoplay",i.currentIndex===r)("muted",i.muted)("poster",n.thumbnail,an),va("data-video-id",n.id),X(2),en(n.sources),X(2),en(i.VideoUtils.getBestSources(n.sources)),X(2),$t(i.currentIndex===r?7:-1)}}function gH(e,t){e&1&&Bd(0)}function yH(e,t){if(e&1){let n=nr();re(0,"button",23),Rt("click",function(){Xt(n);let r=me();return Jt(r.close())}),vr(),re(1,"svg",24),Ne(2,"path",25)(3,"path",26),ie()()}}var zr=class extends Th{constructor(e,t,n,r){super(),this.cdr=e,this.elementRef=t,this.dialogRef=n,this.data=r,this.videos=r.videos,this.currentIndex=r.currentIndex,this.triggerContext=r.triggerContext}videos=[];currentIndex=0;swiperContainerRef;videoPlayers;muted=!0;videoProgress=[];selectedItem=null;selectedVideo;swiperInstance;VideoUtils=Oo;onResize(){this.isMobile=new vR.default().getDevice().type==="mobile",this.swiperInstance?.destroy?.(),this.initSwiper()}ngOnInit(){super.ngOnInit();let e=this.elementRef.nativeElement.shadowRoot,t=vt.get().website.commonCSS;Nt.injectRawCSS(t,e),Nt.injectStylesheet(hn.styleURL,e),Nt.injectSwiperCSS(e)}ngAfterViewInit(){Di(this.getCurrentVideoElement(),"loadeddata").pipe(hR(this)).subscribe(()=>{this.initSwiper()})}ngOnDestroy(){this.swiperInstance?.destroy?.()}close(e=this.videos[this.currentIndex],t=this.currentIndex){let n=this.getCurrentVideoElement();this.dialogRef.close({lastVideo:e,lastVideoIndex:t,lastVideoDuration:n?.currentTime})}performClickToAction(e,t){this.data.onCTAPerformed({cta:e.cta,item:e.item,video:t})}getCurrentVideoElement(){return this.videoPlayers.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.swiperInstance.slideTo(this.currentIndex+1)}productModalClosed(){this.selectedItem=null,this.selectedVideo=void 0,this.swiperInstance.enable()}pauseAll(){this.videoPlayers.forEach(e=>e.nativeElement.pause())}async toggleMute(){this.muted=!this.muted,this.videoPlayers.forEach(t=>t.nativeElement.muted=this.muted);let e=[this.muted?k.EVENT_VIDEO_MUTED:k.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(e),await rt.set(ge.MUTED,this.muted),this.cdr.detectChanges()}playActiveVideo(){this.pauseAll();let e=this.getCurrentVideoElement();e&&(e.currentTime=1,e.play().then(async()=>{this.muted=await rt.get(ge.MUTED,!0),e.muted=this.muted}))}onVideoEnded(){if(this.currentIndex<this.videos.length-1)if(this.selectedItem){let e=this.getCurrentVideoElement();e.currentTime=0,e.play()}else this.moveToNextVideo();else{let e=this.videoPlayers.last;if(e){let t=this.getPreviousVideoDataForEvent(),n=[k.EVENT_LAST_VIDEO_ENDED,{previous:t},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(n),e.nativeElement.currentTime=0,e.nativeElement.play()}}}updateProgress(e,t){let n=e.target;this.videoProgress[t]=n.currentTime/n.duration*100,this.cdr.detectChanges()}onSlideChange(e){let t=this.getPreviousVideoDataForEvent();this.currentIndex=e.realIndex,this.cdr.detectChanges(),this.playActiveVideo(),this.selectedItem=null,delete this.selectedVideo;let n=this.currentVideoProps(),r={previous:t,current:n},i=[k.EVENT_VIDEO_CHANGE,r,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(i)}productCardClicked(e,t){let n={videoID:t.id,videoIndex:this.currentIndex},r=[k.EVENT_MORE_ITEM_INFO_CLICKED,{current:n},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(r),this.selectedItem=e,this.selectedVideo=t,this.swiperInstance.disable()}initSwiper(){this.swiperInstance=new window.Swiper(this.swiperContainerRef.nativeElement,{direction:this.isMobile?"vertical":"horizontal",effect:this.isMobile?"slide":"coverflow",slidesPerView:1,initialSlide:this.currentIndex,centeredSlides:!0,coverflowEffect:{rotate:0,stretch:0,depth:400,modifier:1,slideShadows:!0},breakpoints:{1280:{slidesPerView:3}},navigation:{nextEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-next"),prevEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-prev")}}),this.swiperInstance.on("slideChange",e=>{this.onSlideChange(e)}),this.playActiveVideo()}currentVideoProps(){return{videoID:this.videos[this.currentIndex].id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let e=this.currentVideoProps(),t=this.videoPlayers.find(r=>r.nativeElement.dataset.videoId===this.videos[this.currentIndex].id)?.nativeElement;e.playedTillMS=Math.ceil(t?.currentTime*1e3);let n=t?.duration*1e3;return e.playedTillPercent=+(e.playedTillMS/n).toFixed(4),e}};$h(zr,"\u0275fac",function(e){return new(e||zr)(Mt(rr),Mt(Ct),Mt(js),Mt(FE))}),$h(zr,"\u0275cmp",yt({type:zr,selectors:[["cooee-video-swiper-dialog"]],viewQuery:function(e,t){if(e&1&&(Ea(sH,5),Ea(aH,5)),e&2){let n;wa(n=ba())&&(t.swiperContainerRef=n.first),wa(n=ba())&&(t.videoPlayers=n)}},hostBindings:function(e,t){e&1&&Rt("resize",function(){return t.onResize()},!1,iS)},inputs:{videos:"videos",currentIndex:"currentIndex"},features:[po],decls:12,vars:1,consts:[["swiperContainer",""],["closeButtonTemplate",""],["videoPlayers",""],[1,"lc-shadow-inner"],[1,"swiper-container"],[1,"swiper-wrapper"],[1,"swiper-slide"],[1,"swiper-button-prev"],[1,"swiper-button-next"],[1,"lc-desktop-controls"],[4,"ngTemplateOutlet"],["playsinline","","preload","metadata",3,"timeupdate","click","ended","autoplay","muted","poster"],[3,"src","type","media"],[3,"src","type"],[3,"width"],[1,"lc-video-controls"],[3,"buttonClicked","muted"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full",3,"item"],[1,"lc-card-container"],[1,"lc-card-scroll"],[3,"item"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full",3,"performCTA","closeModel","item"],[3,"performCTA","click","item"],[1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"]],template:function(e,t){if(e&1&&(re(0,"div",3)(1,"div",4,0)(3,"div",5),Qt(4,mH,8,5,"div",6,os),ie(),Ne(6,"div",7)(7,"div",8),ie(),re(8,"div",9),xt(9,gH,1,0,"ng-container",10),ie()(),xt(10,yH,4,0,"ng-template",null,1,QS)),e&2){let n=Ey(11);X(4),en(t.videos),X(5),Be("ngTemplateOutlet",n)}},dependencies:[xh,Ah,Mh,Oh,pD],styles:[`.lc-shadow-inner{position:relative;width:100vw;height:100vh;display:flex}@media (min-width: 768px){.lc-shadow-inner{background-color:color-mix(in oklab,#000 70%,transparent);justify-content:center;align-items:center}}.swiper-container{--swiper-navigation-size: 50px;--swiper-navigation-color: white;width:100dvw;height:100dvh}@media (min-width: 768px){.swiper-container{width:100%;height:100%;max-width:90vw;max-height:90vh}}.swiper-wrapper{max-height:100%}@media (max-width: 768px){.swiper-button-prev,.swiper-button-next{display:none!important}}.swiper-slide{position:relative;display:flex;align-items:center;visibility:hidden}@media (min-width: 768px){.swiper-slide{border-radius:12px;overflow:hidden}}.swiper-slide.swiper-slide-active,.swiper-slide.swiper-slide-prev,.swiper-slide.swiper-slide-next{visibility:visible}video{width:100%;height:100%;object-fit:cover;z-index:-1}.lc-desktop-controls{position:absolute;top:2rem;right:4rem;z-index:10;display:flex;gap:.5rem}@media (max-width: 768px){.lc-desktop-controls{display:none}}.lc-video-controls{position:absolute;top:1rem;z-index:10;right:.5rem;display:flex;gap:.25rem}.lc-video-controls .lc-close-button{display:block}@media (min-width: 768px){.lc-video-controls .lc-close-button{display:none}}.lc-close-button{border:none;display:flex;justify-content:center;align-items:center;width:40px;height:40px;background:#00000080;border-radius:100%}.lc-close-button svg{width:100%;height:100%}@media (min-width: 768px){.lc-close-button{width:48px;height:48px}}.lc-card-container{position:absolute;bottom:12px;z-index:10;width:100%;padding-inline:12px;box-sizing:border-box}.lc-card-scroll{display:flex;overflow-x:auto;gap:12px;width:100%;scrollbar-width:none}.lc-card-scroll::-webkit-scrollbar{display:none}.lc-card-scroll cooee-product-card{flex:0 0 auto;width:80%;max-width:300px}.lc-card-scroll:has(>cooee-product-card:only-child) cooee-product-card{width:100%;max-width:none}
116
+ `}var BE=!1;function jU(e,t,n){let r=e[t];if(BE&&typeof r!="function")throw new Error(`${e.constructor.name} is using untilDestroyed but doesn't implement ${t}`);lR(e,n),e[t]=function(){r.apply(this,arguments),uR(this,n),e[t]=r}}function hR(e,t){return n=>{let r=cR(t);typeof t=="string"?jU(e,t,r):(BE&&$U(e),lR(e,r));let i=e[r];return BE&&VU(e,i),n.pipe(hr(i))}}function $U(e){let t=Object.getPrototypeOf(e);if(!(aR in t))throw new Error("untilDestroyed operator cannot be used inside directives or components or providers that are not decorated with UntilDestroy decorator")}var vR=Re(np()),mR=Re(np()),Th=class Hf{engagementTrigger;isMobile;ngOnInit(){this.engagementTrigger=this.triggerContext?.triggerData,this.isMobile=new mR.default().getDevice().type==="mobile"}static \u0275fac=function(t){return new(t||Hf)};static \u0275cmp=yt({type:Hf,selectors:[["cooee-base-video"]],inputs:{triggerContext:"triggerContext"},decls:0,vars:0,template:function(t,n){},encapsulation:2})},VE=Re(qn());function WU(e,t){e&1&&tn(0," Open Cart ")}function GU(e,t){e&1&&tn(0," Add To Cart ")}var xh=class jy{item;performCTA=new Je;atcClicked=!1;clickAddToCart(t){t.stopPropagation(),this.performCTA.emit({item:this.item,cta:this.atcClicked?VE.ClickActionType.OPEN_CART:VE.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}static \u0275fac=function(t){return new(t||jy)};static \u0275cmp=yt({type:jy,selectors:[["cooee-product-card"]],inputs:{item:"item"},outputs:{performCTA:"performCTA"},decls:12,vars:11,consts:[[1,"lc-item-card"],[1,"lc-card-content"],[1,"lc-item-image",3,"alt","src"],[1,"lc-product-details"],[1,"lc-item-name"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-cta-button",3,"click"]],template:function(t,n){t&1&&(re(0,"div",0)(1,"div",1),Ne(2,"img",2),re(3,"div",3)(4,"div",4),tn(5),ie(),Ne(6,"div",5),Cn(7,"cooeeCurrency"),Cn(8,"safeHtml"),ie()(),re(9,"button",6),Rt("click",function(r){return n.clickAddToCart(r)}),xt(10,WU,1,0)(11,GU,1,0),ie()()),t&2&&(X(2),zn("alt",n.item.name),Be("src",n.item.imageURL,an),X(3),ss(" ",n.item.name," "),X(),Be("innerHTML",Nn(8,9,Nn(7,7,n.item.price)),Fr),X(3),mo("atc-clicked",n.atcClicked),X(),$t(n.atcClicked?10:11))},dependencies:[li,ui],styles:["[_nghost-%COMP%]{display:block;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background-color:#ffffff80;border-radius:7px;cursor:pointer}.lc-item-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:8px}.lc-card-content[_ngcontent-%COMP%]{display:flex;gap:8px;width:100%;align-items:start}.lc-item-image[_ngcontent-%COMP%]{width:70px;height:70px;object-fit:cover;box-sizing:border-box;border-radius:7px}.lc-product-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3.5px;font-size:10.5px}.lc-item-name[_ngcontent-%COMP%]{font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:16px;line-height:normal}.lc-item-price[_ngcontent-%COMP%]{font-size:16px;line-height:normal}.lc-cta-button[_ngcontent-%COMP%]{padding:12px 8px;border:none;border-radius:8px;width:100%;background:#f6339a;text-align:center;font-weight:500;cursor:pointer;color:#fff;font-size:16px}.lc-cta-button.atc-clicked[_ngcontent-%COMP%]{background:#000}"]})},Nh=Re(qn()),gR=Re(iE()),zU=(0,gR.default)(fetch),Rh=class{static async getAjaxItem(e){let t=this.getItemSlug(e);if(!t)return;let n,r=Dt.getRootPrefix()+`products/${t}.js`;try{n=await(await zU(r)).json()}catch(i){C.error(`Failed to fetch ${r}`,i);let s=_t.getInstance();i instanceof Response?s.captureMessage(`Shopify product fetch failed ${i.status}`,"error",{mID:e.mID,path:r}):s.captureException(i,{mID:e.mID,path:r});return}if(!n){C.error("Item not found after AJAX call for:",e.mID);return}return n}static getItemSlug(e){if(e.link)try{let t=new URL(e.link).pathname.match(/\/products\/([^/]+?)(?:\.html)?$/);return t?t[1]:void 0}catch{return}}},qU=(e,t)=>t.id;function YU(e,t){if(e&1&&Ne(0,"img",9),e&2){let n=t.$implicit,r=me(2);Be("src",n,an)("alt",r.item.name)}}function KU(e,t){if(e&1&&Qt(0,YU,1,2,"img",9,os),e&2){let n=me();en(n.ajaxItem.images)}}function ZU(e,t){if(e&1&&Ne(0,"img",9),e&2){let n=me();Be("src",n.item.imageURL,an)("alt",n.item.name)}}function XU(e,t){if(e&1&&(Ne(0,"span",12),Cn(1,"cooeeCurrency"),Cn(2,"safeHtml")),e&2){let n=me();Be("innerHTML",Nn(2,3,Nn(1,1,(n.selectedVariant==null?null:n.selectedVariant.price)/100)),Fr)}}function JU(e,t){if(e&1&&(Ne(0,"span",12),Cn(1,"cooeeCurrency"),Cn(2,"safeHtml")),e&2){let n=me();Be("innerHTML",Nn(2,3,Nn(1,1,n.item.price)),Fr)}}function QU(e,t){if(e&1){let n=nr();re(0,"div",18),Rt("click",function(){let r=Xt(n).$implicit,i=me(2);return Jt(i.selectedVariant=r)})("keydown",function(){let r=Xt(n).$implicit,i=me(2);return Jt(i.selectedVariant=r)}),re(1,"span",19),tn(2),ie()()}if(e&2){let n=t.$implicit,r=me(2);mo("lc-selected-variant",(r.selectedVariant==null?null:r.selectedVariant.id)===n.id),X(2),Ca(n.title)}}function eH(e,t){if(e&1&&(re(0,"div",13),Qt(1,QU,3,3,"div",17,qU),ie()),e&2){let n=me();X(),en(n.availableVariants)}}function tH(e,t){if(e&1&&(re(0,"div",20),tn(1,"Description"),ie(),Ne(2,"div",21),Cn(3,"safeHtml")),e&2){let n=me();X(2),Be("innerHTML",Nn(3,1,n.ajaxItem==null?null:n.ajaxItem.description),Fr)}}function nH(e,t){e&1&&tn(0," Open Cart ")}function rH(e,t){e&1&&tn(0," Add To Cart ")}var Ah=class S_{constructor(t){this.cd=t}item;closeModel=new Je;performCTA=new Je;atcClicked=!1;selectedVariant=null;availableVariants=[];ajaxItem;ClickActionType=Nh.ClickActionType;async ngOnInit(){this.ajaxItem=await Rh.getAjaxItem(this.item),this.processVariants(),this.cd.markForCheck()}closeDialog(){this.closeModel.emit()}clickAddToCart(t){t.vID=this.selectedVariant?.id,t.vName=this.selectedVariant?.public_title,this.performCTA.emit({item:t,cta:this.atcClicked?Nh.ClickActionType.OPEN_CART:Nh.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}processVariants(){this.availableVariants=this.ajaxItem?.variants??[],this.selectedVariant=this.availableVariants[0]}static \u0275fac=function(t){return new(t||S_)(Mt(rr))};static \u0275cmp=yt({type:S_,selectors:[["cooee-product-modal"]],inputs:{item:"item"},outputs:{closeModel:"closeModel",performCTA:"performCTA"},decls:25,vars:6,consts:[[1,"lc-card-wrapper"],[1,"lc-card-header"],[1,"lc-header"],[1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","fill","#000"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc-card-content"],[1,"lc-image-strip"],[1,"w-28","h-28","object-contain",3,"src","alt"],[1,"lc-inner-body"],[1,"lc-item-name"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-variant-list"],[1,"lc-card-footer"],[1,"lc-cta-button",3,"click"],[1,"lc-more-info-button",3,"click"],["tabindex","{0}",1,"lc-variant",3,"lc-selected-variant"],["tabindex","{0}",1,"lc-variant",3,"click","keydown"],[1,"truncate","max-w-[200px]"],[1,"lc-description-title"],[1,"lc-description",3,"innerHTML"]],template:function(t,n){t&1&&(re(0,"div",0)(1,"div",1)(2,"div",2),tn(3,"Shop Now"),ie(),re(4,"button",3),Rt("click",function(){return n.closeDialog()}),vr(),re(5,"svg",4),Ne(6,"path",5)(7,"path",6),ie()()(),ns(),re(8,"div",7)(9,"div",8),xt(10,KU,2,0)(11,ZU,1,2,"img",9),ie(),re(12,"div",10)(13,"div",11),tn(14),ie(),xt(15,XU,3,5,"span",12)(16,JU,3,5,"span",12)(17,eH,3,0,"div",13)(18,tH,4,3),ie()(),re(19,"div",14)(20,"button",15),Rt("click",function(){return n.clickAddToCart(n.item)}),xt(21,nH,1,0)(22,rH,1,0),ie(),re(23,"button",16),Rt("click",function(){return n.performCTA.emit({item:n.item,cta:n.ClickActionType.GO_TO_PRODUCT})}),tn(24," More Info "),ie()()()),t&2&&(X(10),$t(!(n.ajaxItem==null||n.ajaxItem.images==null)&&n.ajaxItem.images.length?10:11),X(4),Ca(n.item.name),X(),$t(n.selectedVariant!=null&&n.selectedVariant.price?15:16),X(2),$t(n.availableVariants[0]!=null&&n.availableVariants[0].title!=="Default Title"?17:-1),X(),$t(n.ajaxItem!=null&&n.ajaxItem.description?18:-1),X(3),$t(n.atcClicked?21:22))},dependencies:[ui,li],styles:["[_nghost-%COMP%]{display:block;background:#fff;height:70vh;border-top-left-radius:16px;border-top-right-radius:16px}.lc-card-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%}.lc-card-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:8px 16px;border-bottom:1px solid var(--lc-color-gray-300)}.lc-header[_ngcontent-%COMP%]{font-size:24px;font-weight:500}.lc-close-button[_ngcontent-%COMP%]{background:transparent;border:none;width:36px;height:36px}.lc-close-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:#000000b3}.lc-card-content[_ngcontent-%COMP%]{flex:1;overflow-y:auto}.lc-inner-body[_ngcontent-%COMP%]{padding:16px;display:flex;flex-direction:column;gap:8px}.lc-image-strip[_ngcontent-%COMP%]{width:100%;display:flex;overflow-x:auto;gap:.5rem;flex-wrap:nowrap}.lc-image-strip[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:auto;height:200px}.lc-item-name[_ngcontent-%COMP%]{font-size:20px;font-weight:500;line-height:normal}.lc-item-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500}.lc-variant-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;padding-top:.5rem;width:100%}.lc-variant[_ngcontent-%COMP%]{padding:4px 8px;border-radius:4px;background-color:#f3f4f6;color:#1f2937;font-size:12px;cursor:pointer;border:1px solid #e5e7eb;display:flex;align-items:center;gap:4px}.lc-selected-variant[_ngcontent-%COMP%]{background-color:#fce8f3;border:1px solid #F8B4D9;color:#db2777}.lc-description-title[_ngcontent-%COMP%]{font-size:18px;font-weight:500;margin-top:8px;line-height:normal}.lc-description[_ngcontent-%COMP%]{line-height:normal}.lc-card-footer[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;padding:12px;background-color:#0000004d;box-shadow:0 4px 6px #52525b4d;gap:12px}.lc-cta-button[_ngcontent-%COMP%], .lc-more-info-button[_ngcontent-%COMP%]{width:50%;padding:12px;border:none;border-radius:.5rem;font-weight:600;display:flex;justify-content:center;cursor:pointer;font-size:16px}.lc-cta-button[_ngcontent-%COMP%]{background-color:#000;color:#fff}.lc-more-info-button[_ngcontent-%COMP%]{background-color:#ffe4e6;color:#db2777}"]})};function iH(e,t){e&1&&(vr(),re(0,"svg",1),Ne(1,"path",2)(2,"path",3),ie())}function oH(e,t){e&1&&(vr(),re(0,"svg",1),Ne(1,"path",2)(2,"path",4),ie())}var Mh=class e0{muted;buttonClicked=new Je;static \u0275fac=function(t){return new(t||e0)};static \u0275cmp=yt({type:e0,selectors:[["cooee-mute-toggle"]],inputs:{muted:"muted"},outputs:{buttonClicked:"buttonClicked"},decls:3,vars:1,consts:[[1,"lc-mute-button","lc:bg-black/50",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M4.34 2.93L2.93 4.34 7.29 8.7 7 9H3v6h4l5 5v-6.59l4.18 4.18c-.65.49-1.38.88-2.18 1.11v2.06c1.34-.3 2.57-.92 3.61-1.75l2.05 2.05 1.41-1.41L4.34 2.93zM10 15.17L7.83 13H5v-2h2.83l.88-.88L10 11.41v3.76zM19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zm-7-8l-1.88 1.88L12 7.76zm4.5 8c0-1.77-1.02-3.29-2.5-4.03v1.79l2.48 2.48c.01-.08.02-.16.02-.24z"],["d","M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77z"]],template:function(t,n){t&1&&(re(0,"button",0),Rt("click",function(){return n.buttonClicked.emit()}),xt(1,iH,3,0,":svg:svg",1)(2,oH,3,0,":svg:svg",1),ie()),t&2&&(X(),$t(n.muted?1:2))},styles:["button[_ngcontent-%COMP%]{width:40px;height:40px;display:flex;justify-content:center;align-items:center;border:none;cursor:pointer;border-radius:100%}"]})},Oh=class t0{width;static \u0275fac=function(t){return new(t||t0)};static \u0275cmp=yt({type:t0,selectors:[["cooee-video-progress-bar"]],inputs:{width:"width"},decls:5,vars:2,consts:[[1,"lc:absolute","lc:top-1","lc:w-full","lc:z-10"],[1,"lc:px-2"],[1,"lc:h-1","lc:w-full","lc:bg-gray-700","lc:mb-2"],[1,"lc:h-1","lc:bg-pink-500"]],template:function(t,n){t&1&&(re(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),Ne(4,"div"),ie()()()()),t&2&&(X(3),ho("width",n.width,"%"))},encapsulation:2})},sH=["swiperContainer"],aH=["videoPlayers"],yR=(e,t)=>t.url,cH=(e,t)=>t.mID;function lH(e,t){if(e&1&&Ne(0,"source",12),e&2){let n=t.$implicit;zn("type",n.mimeType),ji("media","(max-width: ",n.width,"px)"),Be("src",n.url,an)}}function uH(e,t){if(e&1&&Ne(0,"source",13),e&2){let n=t.$implicit;zn("type",n.mimeType),Be("src",n.url,an)}}function dH(e,t){e&1&&Bd(0)}function fH(e,t){if(e&1){let n=nr();re(0,"cooee-product-modal",21),Rt("performCTA",function(r){Xt(n);let i=me(3);return Jt(i.performClickToAction(r,i.selectedVideo))})("closeModel",function(){Xt(n);let r=me(3);return Jt(r.productModalClosed())}),ie()}if(e&2){let n=me(3);Be("item",n.selectedItem)}}function pH(e,t){if(e&1){let n=nr();re(0,"cooee-product-card",22),Rt("performCTA",function(r){Xt(n);let i=me(2).$implicit,s=me();return Jt(s.performClickToAction(r,i))})("click",function(){let r=Xt(n).$implicit,i=me(2).$implicit,s=me();return Jt(s.productCardClicked(r,i))}),ie()}if(e&2){let n=t.$implicit;Be("item",n)}}function hH(e,t){if(e&1){let n=nr();Ne(0,"cooee-video-progress-bar",14),re(1,"div",15)(2,"cooee-mute-toggle",16),Rt("buttonClicked",function(){Xt(n);let r=me(2);return Jt(r.toggleMute())}),ie(),xt(3,dH,1,0,"ng-container",10),ie(),xt(4,fH,1,1,"cooee-product-modal",17),re(5,"div",18)(6,"div",19),Qt(7,pH,1,1,"cooee-product-card",20,cH),ie()()}if(e&2){let n=me(),r=n.$implicit,i=n.$index,s=me(),o=Ey(11);Be("width",s.videoProgress[i]||0),X(2),Be("muted",s.muted),X(),Be("ngTemplateOutlet",o),X(),$t(s.selectedItem?4:-1),X(3),en(r.items)}}function mH(e,t){if(e&1){let n=nr();re(0,"div",6)(1,"video",11,2),Rt("timeupdate",function(r){let i=Xt(n).$index,s=me();return Jt(s.updateProgress(r,i))})("click",function(){let r=Xt(n).$index,i=me();return Jt(i.currentIndex===r&&i.toggleMute())})("ended",function(){Xt(n);let r=me();return Jt(r.onVideoEnded())}),Qt(3,lH,1,4,"source",12,yR),Qt(5,uH,1,2,"source",13,yR),ie(),xt(7,hH,9,4),ie()}if(e&2){let n=t.$implicit,r=t.$index,i=me();X(),Be("autoplay",i.currentIndex===r)("muted",i.muted)("poster",n.thumbnail,an),va("data-video-id",n.id),X(2),en(n.sources),X(2),en(i.VideoUtils.getBestSources(n.sources)),X(2),$t(i.currentIndex===r?7:-1)}}function gH(e,t){e&1&&Bd(0)}function yH(e,t){if(e&1){let n=nr();re(0,"button",23),Rt("click",function(){Xt(n);let r=me();return Jt(r.close())}),vr(),re(1,"svg",24),Ne(2,"path",25)(3,"path",26),ie()()}}var zr=class extends Th{constructor(e,t,n,r){super(),this.cdr=e,this.elementRef=t,this.dialogRef=n,this.data=r,this.videos=r.videos,this.currentIndex=r.currentIndex,this.triggerContext=r.triggerContext}videos=[];currentIndex=0;swiperContainerRef;videoPlayers;muted=!1;videoProgress=[];selectedItem=null;selectedVideo;swiperInstance;VideoUtils=Oo;onResize(){this.isMobile=new vR.default().getDevice().type==="mobile",this.swiperInstance?.destroy?.(),this.initSwiper()}ngOnInit(){super.ngOnInit();let e=this.elementRef.nativeElement.shadowRoot,t=vt.get().website.commonCSS;Nt.injectRawCSS(t,e),Nt.injectStylesheet(hn.styleURL,e),Nt.injectSwiperCSS(e)}ngAfterViewInit(){Di(this.getCurrentVideoElement(),"loadeddata").pipe(hR(this)).subscribe(()=>{this.initSwiper()})}ngOnDestroy(){this.swiperInstance?.destroy?.()}close(e=this.videos[this.currentIndex],t=this.currentIndex){let n=this.getCurrentVideoElement();this.dialogRef.close({lastVideo:e,lastVideoIndex:t,lastVideoDuration:n?.currentTime})}performClickToAction(e,t){this.data.onCTAPerformed({cta:e.cta,item:e.item,video:t})}getCurrentVideoElement(){return this.videoPlayers.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.swiperInstance.slideTo(this.currentIndex+1)}productModalClosed(){this.selectedItem=null,this.selectedVideo=void 0,this.swiperInstance.enable()}pauseAll(){this.videoPlayers.forEach(e=>e.nativeElement.pause())}async toggleMute(){this.muted=!this.muted,this.videoPlayers.forEach(t=>t.nativeElement.muted=this.muted);let e=[this.muted?k.EVENT_VIDEO_MUTED:k.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(e),await rt.set(ge.MUTED,this.muted),this.cdr.detectChanges()}playActiveVideo(){this.pauseAll();let e=this.getCurrentVideoElement();e&&(e.currentTime=1,e.play().then(async()=>{this.muted=await rt.get(ge.MUTED,!1),e.muted=this.muted}))}onVideoEnded(){if(this.currentIndex<this.videos.length-1)if(this.selectedItem){let e=this.getCurrentVideoElement();e.currentTime=0,e.play()}else this.moveToNextVideo();else{let e=this.videoPlayers.last;if(e){let t=this.getPreviousVideoDataForEvent(),n=[k.EVENT_LAST_VIDEO_ENDED,{previous:t},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(n),e.nativeElement.currentTime=0,e.nativeElement.play()}}}updateProgress(e,t){let n=e.target;this.videoProgress[t]=n.currentTime/n.duration*100,this.cdr.detectChanges()}onSlideChange(e){let t=this.getPreviousVideoDataForEvent();this.currentIndex=e.realIndex,this.cdr.detectChanges(),this.playActiveVideo(),this.selectedItem=null,delete this.selectedVideo;let n=this.currentVideoProps(),r={previous:t,current:n},i=[k.EVENT_VIDEO_CHANGE,r,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(i)}productCardClicked(e,t){let n={videoID:t.id,videoIndex:this.currentIndex},r=[k.EVENT_MORE_ITEM_INFO_CLICKED,{current:n},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(r),this.selectedItem=e,this.selectedVideo=t,this.swiperInstance.disable()}initSwiper(){this.swiperInstance=new window.Swiper(this.swiperContainerRef.nativeElement,{direction:this.isMobile?"vertical":"horizontal",effect:this.isMobile?"slide":"coverflow",slidesPerView:1,initialSlide:this.currentIndex,centeredSlides:!0,coverflowEffect:{rotate:0,stretch:0,depth:400,modifier:1,slideShadows:!0},breakpoints:{1280:{slidesPerView:3}},navigation:{nextEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-next"),prevEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-prev")}}),this.swiperInstance.on("slideChange",e=>{this.onSlideChange(e)}),this.playActiveVideo()}currentVideoProps(){return{videoID:this.videos[this.currentIndex].id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let e=this.currentVideoProps(),t=this.videoPlayers.find(r=>r.nativeElement.dataset.videoId===this.videos[this.currentIndex].id)?.nativeElement;e.playedTillMS=Math.ceil(t?.currentTime*1e3);let n=t?.duration*1e3;return e.playedTillPercent=+(e.playedTillMS/n).toFixed(4),e}};$h(zr,"\u0275fac",function(e){return new(e||zr)(Mt(rr),Mt(Ct),Mt(js),Mt(FE))}),$h(zr,"\u0275cmp",yt({type:zr,selectors:[["cooee-video-swiper-dialog"]],viewQuery:function(e,t){if(e&1&&(Ea(sH,5),Ea(aH,5)),e&2){let n;wa(n=ba())&&(t.swiperContainerRef=n.first),wa(n=ba())&&(t.videoPlayers=n)}},hostBindings:function(e,t){e&1&&Rt("resize",function(){return t.onResize()},!1,iS)},inputs:{videos:"videos",currentIndex:"currentIndex"},features:[po],decls:12,vars:1,consts:[["swiperContainer",""],["closeButtonTemplate",""],["videoPlayers",""],[1,"lc-shadow-inner"],[1,"swiper-container"],[1,"swiper-wrapper"],[1,"swiper-slide"],[1,"swiper-button-prev"],[1,"swiper-button-next"],[1,"lc-desktop-controls"],[4,"ngTemplateOutlet"],["playsinline","","preload","metadata",3,"timeupdate","click","ended","autoplay","muted","poster"],[3,"src","type","media"],[3,"src","type"],[3,"width"],[1,"lc-video-controls"],[3,"buttonClicked","muted"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full",3,"item"],[1,"lc-card-container"],[1,"lc-card-scroll"],[3,"item"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full",3,"performCTA","closeModel","item"],[3,"performCTA","click","item"],[1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"]],template:function(e,t){if(e&1&&(re(0,"div",3)(1,"div",4,0)(3,"div",5),Qt(4,mH,8,5,"div",6,os),ie(),Ne(6,"div",7)(7,"div",8),ie(),re(8,"div",9),xt(9,gH,1,0,"ng-container",10),ie()(),xt(10,yH,4,0,"ng-template",null,1,QS)),e&2){let n=Ey(11);X(4),en(t.videos),X(5),Be("ngTemplateOutlet",n)}},dependencies:[xh,Ah,Mh,Oh,pD],styles:[`.lc-shadow-inner{position:relative;width:100vw;height:100vh;display:flex}@media (min-width: 768px){.lc-shadow-inner{background-color:color-mix(in oklab,#000 70%,transparent);justify-content:center;align-items:center}}.swiper-container{--swiper-navigation-size: 50px;--swiper-navigation-color: white;width:100dvw;height:100dvh}@media (min-width: 768px){.swiper-container{width:100%;height:100%;max-width:90vw;max-height:90vh}}.swiper-wrapper{max-height:100%}@media (max-width: 768px){.swiper-button-prev,.swiper-button-next{display:none!important}}.swiper-slide{position:relative;display:flex;align-items:center;visibility:hidden}@media (min-width: 768px){.swiper-slide{border-radius:12px;overflow:hidden}}.swiper-slide.swiper-slide-active,.swiper-slide.swiper-slide-prev,.swiper-slide.swiper-slide-next{visibility:visible}video{width:100%;height:100%;object-fit:cover;z-index:-1}.lc-desktop-controls{position:absolute;top:2rem;right:4rem;z-index:10;display:flex;gap:.5rem}@media (max-width: 768px){.lc-desktop-controls{display:none}}.lc-video-controls{position:absolute;top:1rem;z-index:10;right:.5rem;display:flex;gap:.25rem}.lc-video-controls .lc-close-button{display:block}@media (min-width: 768px){.lc-video-controls .lc-close-button{display:none}}.lc-close-button{border:none;display:flex;justify-content:center;align-items:center;width:40px;height:40px;background:#00000080;border-radius:100%}.lc-close-button svg{width:100%;height:100%}@media (min-width: 768px){.lc-close-button{width:48px;height:48px}}.lc-card-container{position:absolute;bottom:12px;z-index:10;width:100%;padding-inline:12px;box-sizing:border-box}.lc-card-scroll{display:flex;overflow-x:auto;gap:12px;width:100%;scrollbar-width:none}.lc-card-scroll::-webkit-scrollbar{display:none}.lc-card-scroll cooee-product-card{flex:0 0 auto;width:80%;max-width:300px}.lc-card-scroll:has(>cooee-product-card:only-child) cooee-product-card{width:100%;max-width:none}
117
117
  `],encapsulation:3})),zr=KE([pR()],zr);var Ph=(e,t)=>t.url;function vH(e,t){if(e&1&&(re(0,"div",0),tn(1),ie()),e&2){me();let n=Ur(1);X(),ss(" ",n," ")}}function _H(e,t){if(e&1&&Ne(0,"source",6),e&2){let n=t.$implicit;zn("type",n.mimeType),ji("media","(max-width: ",n.width,"px)"),Be("src",n.url,an)}}function EH(e,t){if(e&1&&Ne(0,"source",7),e&2){let n=t.$implicit;zn("type",n.mimeType),Be("src",n.url,an)}}function wH(e,t){if(e&1&&(re(0,"div",8)(1,"span",10),tn(2),ie(),Ne(3,"span",11),Cn(4,"cooeeCurrency"),Cn(5,"safeHtml"),ie()),e&2){me();let n=Ur(0);X(2),ss(" ",n.name," "),X(),Be("innerHTML",Nn(5,4,Nn(4,2,n.price)),Fr)}}function bH(e,t){if(e&1){let n=nr();re(0,"div",12),Rt("click",function(){Xt(n);let r=me().$implicit,i=Ur(0),s=me(2);return Jt(s.addToCartClicked(r,i))})("keydown",function(){Xt(n);let r=me().$implicit,i=Ur(0),s=me(2);return Jt(s.addToCartClicked(r,i))}),tn(1," Add to cart "),ie()}}function CH(e,t){if(e&1){let n=nr();$i(0),re(1,"div",3)(2,"a",4),Rt("click",function(r){let i=Xt(n),s=i.$implicit,o=i.$index,a=Ur(0),l=me(2);return Jt(l.injectScriptAndOpenDialog(r,s,a,o))}),re(3,"video",5),Qt(4,_H,1,4,"source",6,Ph),Qt(6,EH,1,2,"source",7,Ph),ie(),xt(8,wH,6,6,"div",8),ie(),xt(9,bH,2,0,"div",9),ie()}if(e&2){let n=t.$implicit,r=me(2),i=Ur(4);go(n.items==null?null:n.items[0]),X(3),Be("muted",!0),X(),en(n.sources),X(2),en(r.VideoUtils.getBestSources(n.sources)),X(2),$t(i?8:-1),X(),$t(i?9:-1)}}function SH(e,t){if(e&1&&(re(0,"div",1),Qt(1,CH,10,4,"div",3,os),ie()),e&2){let n=me();X(),en(n.videos)}}function DH(e,t){if(e&1&&Ne(0,"source",6),e&2){let n=t.$implicit;zn("type",n.mimeType),ji("media","(max-width: ",n.width,"px)"),Be("src",n.url,an)}}function IH(e,t){if(e&1&&Ne(0,"source",7),e&2){let n=t.$implicit;zn("type",n.mimeType),Be("src",n.url,an)}}function TH(e,t){if(e&1){let n=nr();$i(0),re(1,"div",13),vr(),re(2,"svg",14),Ne(3,"circle",15)(4,"circle",16),ie(),ns(),re(5,"div",17)(6,"video",18),Rt("click",function(r){let i=Xt(n),s=i.$implicit,o=i.$index,a=Ur(0),l=me(2);return Jt(l.injectScriptAndOpenDialog(r,s,a,o))}),Qt(7,DH,1,4,"source",6,Ph),Qt(9,IH,1,2,"source",7,Ph),ie()()()}if(e&2){let n=t.$implicit,r=me(2);go(n.items==null?null:n.items[0]),X(6),Be("muted",!0),X(),en(n.sources),X(2),en(r.VideoUtils.getBestSources(n.sources))}}function xH(e,t){if(e&1&&(re(0,"div",2),Qt(1,TH,11,2,"div",13,os),ie()),e&2){let n=me();X(),en(n.videos)}}function RH(e,t){if(e&1){let n=nr();re(0,"cooee-draggable-video-popup",20),Rt("videoClicked",function(){Xt(n),me();let r=Ur(0),i=Ur(1),s=Ur(2),o=me();return Jt(o.onPopupVideoClick(i,s,r))})("closeClicked",function(){Xt(n);let r=me(2);return Jt(r.onPopupVideoClosed())}),ie()}if(e&2){let n=me(2);Be("video",n.videos[0])}}function NH(e,t){if(e&1&&($i(0)(1)(2),xt(3,RH,1,1,"cooee-draggable-video-popup",19)),e&2){let n=me(),r=go(0);X();let i=go(n.videos[r]);X(),go(i.items[0]),X(),$t(n.hidePopupVideo?-1:3)}}var kh=class n0{constructor(t,n){this.dialog=t,this.cdr=n}output=new Je;videos;VideoUtils=Oo;VideoConfigSource=o_;VideoConfigTemplate=s_;hidePopupVideo;_triggerContext=Vi(null);dialogRef=null;get triggerContext(){return this._triggerContext()}set triggerContext(t){this._triggerContext.set(t),this.videos=t.triggerData.content?.videoConfig?.videos}ngOnInit(){Nt.loadSwiperScript()}sendTriggerClicked(t,n){let r=new We(k.EVENT_TRIGGER_CLICKED,{},this.triggerContext?.triggerData);r.videos=[t.id],r.items=[n],this.output.emit(r)}injectScriptAndOpenDialog(t,n,r,i){t?.stopPropagation(),t?.preventDefault(),this.sendTriggerClicked(n,r),Nt.loadSwiperScript().then(()=>this.openDialog(n,i))}async performCTA(t){let n,r={applyDiscount:!0},i=this.triggerContext;if(t.cta===$s.ClickActionType.ADD_TO_CART)n=k.EVENT_ADD_TO_CART_CLICKED,r={at:$s.ClickActionType.ADD_TO_CART,applyDiscount:!0};else if(t.cta===$s.ClickActionType.GO_TO_PRODUCT)n=k.EVENT_VIEW_ITEM_CLICKED,r={at:$s.ClickActionType.GO_TO_PRODUCT,applyDiscount:!0};else if(t.cta===$s.ClickActionType.OPEN_CART)n=k.EVENT_OPEN_CART_CLICKED,i.triggerData.redirectBehaviour=_R.RedirectBehaviour.CART_DRAWER;else{C.warn(`Unsupported CTA type: ${t.cta}`);return}let s={videoID:t.video.id};this.sendEvent(n,{current:s},t.video,t.item),await new xo(i).execute({clickAction:r,embeddedItem:new mn(t.item)})}addToCartClicked(t,n){this.performCTA({cta:$s.ClickActionType.ADD_TO_CART,item:n,video:t})}onPopupVideoClick(t,n,r){this.hidePopupVideo=!0,this.injectScriptAndOpenDialog(null,t,n,r),this.dialogRef?.closed.subscribe(()=>{this.hidePopupVideo=!1,this.cdr.detectChanges()})}onPopupVideoClosed(){this.hidePopupVideo=!0;let t=(new Date().getTime()-this.triggerContext.startTime.getTime())/1e3;this.sendEvent(k.EVENT_TRIGGER_CLOSED,{duration:t})}sendEvent(t,n,r,i){let s=new We(t,n,this.triggerContext?.triggerData);r&&(s.videos=[r.id]),i&&(s.items=[i]),this.output.emit(s)}openDialog(t,n){let r={videos:this.videos,currentIndex:n,triggerContext:this.triggerContext,onCTAPerformed:s=>this.performCTA(s)};this.dialogRef&&this.dialogRef.close(),this.dialogRef=this.dialog.open(zr,{width:"100vw",height:"100vh",data:r});let i={videoID:t.id,videoIndex:n};this.sendEvent(k.EVENT_VIDEO_DIALOG_OPENED,{current:i},t),this.dialogRef.closed.subscribe(s=>{if(!s)return;let o=s.lastVideoDuration*1e3,a={videoID:s.lastVideo.id,videoIndex:s.lastVideoIndex,playedTillMS:o,playedTillPercent:o/t.durationMS},l=new We(k.EVENT_VIDEO_DIALOG_CLOSED,{current:a},this.triggerContext?.triggerData);l.videos=[s.lastVideo.id],this.output.emit(l),this.dialogRef=null})}static \u0275fac=function(t){return new(t||n0)(Mt(nR),Mt(rr))};static \u0275cmp=yt({type:n0,selectors:[["cooee-shoppable-videos"]],inputs:{triggerContext:"triggerContext"},outputs:{output:"output"},decls:9,vars:4,consts:[["id","lc-heading-text",1,"lc:mb-2","lc:text-lg","lc:text-center","lc:font-bold"],["id","lc-video-list",1,"lc:flex","lc:overflow-auto","lc:m-3","lc:gap-10","lc:justify-center","lc:items-center"],["id","lc-video-stories",1,"lc:flex","lc:overflow-auto","lc:m-3","lc:gap-3","lc:justify-center","lc:items-center"],[1,"lc-video-card","lc:flex","lc:flex-col","lc:gap-1"],["href","",1,"lc-video-wrapper","lc:rounded-lg",3,"click"],["width","100%","autoplay","","loop","","playsinline","",1,"lc:rounded-lg","lc:transition-transform","lc:duration-300",3,"muted"],[3,"src","type","media"],[3,"src","type"],["id","lc-single-product",1,"lc:w-full","lc:flex","lc:flex-col","lc:gap-1","lc:text-sm","lc:mt-1","lc:mb-1"],["id","lc-cta-button","tabindex","{0}",1,"lc:rounded","lc:w-full","lc:h-auto","lc:text-center","lc:font-normal","lc:cursor-pointer","lc:bg-black","lc:text-white","lc:z-4","lc:p-4","lc:text-xl"],["id","lc-item-name",1,"lc:font-semibold","lc:line-clamp-1","lc:text-xl"],["id","lc-item-price",1,"lc:text-xl",3,"innerHTML"],["id","lc-cta-button","tabindex","{0}",1,"lc:rounded","lc:w-full","lc:h-auto","lc:text-center","lc:font-normal","lc:cursor-pointer","lc:bg-black","lc:text-white","lc:z-4","lc:p-4","lc:text-xl",3,"click","keydown"],["id","lc-video-story",1,"lc:relative","lc:w-20","lc:h-20","lc:cursor-pointer"],["viewBox","0 0 100 100",1,"lc:absolute","lc:top-0","lc:left-0","lc:w-full","lc:h-full"],["cx","50","cy","50","r","48","fill","none","stroke-width","4",1,"lc:stroke-gray-300"],["id","lc-video-story-circle","cx","50","cy","50","r","48","fill","none","stroke-width","4","stroke-linecap","round","stroke-dasharray","301.6","stroke-dashoffset","301.6",1,"lc:stroke-blue-500"],[1,"lc:w-full","lc:h-full","lc:rounded-full","lc:overflow-hidden"],["id","lc-video","autoplay","","loop","",1,"lc:w-full","lc:h-full","lc:object-cover","lc:rounded-full",3,"click","muted"],[3,"video"],[3,"videoClicked","closeClicked","video"]],template:function(t,n){if(t&1&&($i(0)(1),xt(2,vH,2,1,"div",0),$i(3)(4)(5),xt(6,SH,3,0,"div",1)(7,xH,3,0,"div",2)(8,NH,4,4)),t&2){let r=n.triggerContext==null||n.triggerContext.triggerData==null||n.triggerContext.triggerData.content==null?null:n.triggerContext.triggerData.content.videoConfig;X();let i=go(r==null?null:r.heading);X(),$t(i?2:-1);let s=r==null?null:r.source;X(2),go(s===n.VideoConfigSource.GALLERY);let o=r==null?null:r.template;X(2),$t(o===n.VideoConfigTemplate.SWIPER||o===n.VideoConfigTemplate.SIMPLE?6:o===n.VideoConfigTemplate.STORY?7:o===n.VideoConfigTemplate.FLOATING_POPUP?8:-1)}},dependencies:[li,wh,ui],styles:["[_nghost-%COMP%]{display:block}.lc-video-card[_ngcontent-%COMP%]{min-width:200px;max-width:300px}.lc-video-card[_ngcontent-%COMP%] video[_ngcontent-%COMP%]:hover{scale:1.1}"]})};C.configure("CooeeWidgetSDK");(async()=>{let e=await SD(TD),t=(n,r)=>{let i=rD(n,{injector:e.injector});customElements.define(r,i)};t(Bf,"cooee-progressbar"),t(kh,"cooee-shoppable-videos")})();})();