@letscooee/web-sdk 9.10.8 → 9.10.9

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.
@@ -1,46 +1,46 @@
1
- "use strict";(()=>{var b0=Object.create,qs=Object.defineProperty,w0=Object.defineProperties,Pp=Object.getOwnPropertyDescriptor,E0=Object.getOwnPropertyDescriptors,x0=Object.getOwnPropertyNames,Gh=Object.getOwnPropertySymbols,S0=Object.getPrototypeOf,kp=Object.prototype.hasOwnProperty,C0=Object.prototype.propertyIsEnumerable,Pl=(t,e,n)=>e in t?qs(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,j=(t,e)=>{for(var n in e||={})kp.call(e,n)&&Pl(t,n,e[n]);if(Gh)for(var n of Gh(e))C0.call(e,n)&&Pl(t,n,e[n]);return t},Zt=(t,e)=>w0(t,E0(e)),Po=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),_n=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),I0=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of x0(e))!kp.call(t,i)&&i!==n&&qs(t,i,{get:()=>e[i],enumerable:!(r=Pp(e,i))||r.enumerable});return t},en=(t,e,n)=>(n=t!=null?b0(S0(t)):{},I0(e||!t||!t.__esModule?qs(n,"default",{value:t,enumerable:!0}):n,t)),T0=(t,e,n,r)=>{for(var i=r>1?void 0:r?Pp(e,n):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(r?s(e,n,i):s(i))||i);return r&&i&&qs(e,n,i),i},Wh=(t,e,n)=>Pl(t,typeof e!="symbol"?e+"":e,n),O0=_n((t,e)=>{"use strict";(function(n){"use strict";var r={};r.VERSION="1.6.1";var i,o={},s=function(d,_){return function(){return _.apply(d,arguments)}},a=function(){var d=arguments,_=d[0],y,x;for(x=1;x<d.length;x++)for(y in d[x])!(y in _)&&d[x].hasOwnProperty(y)&&(_[y]=d[x][y]);return _},l=function(d,_){return{value:d,name:_}};r.TRACE=l(1,"TRACE"),r.DEBUG=l(2,"DEBUG"),r.INFO=l(3,"INFO"),r.TIME=l(4,"TIME"),r.WARN=l(5,"WARN"),r.ERROR=l(8,"ERROR"),r.OFF=l(99,"OFF");var u=function(d){this.context=d,this.setLevel(d.filterLevel),this.log=this.info};u.prototype={setLevel:function(d){d&&"value"in d&&(this.context.filterLevel=d)},getLevel:function(){return this.context.filterLevel},enabledFor:function(d){var _=this.context.filterLevel;return d.value>=_.value},trace:function(){this.invoke(r.TRACE,arguments)},debug:function(){this.invoke(r.DEBUG,arguments)},info:function(){this.invoke(r.INFO,arguments)},warn:function(){this.invoke(r.WARN,arguments)},error:function(){this.invoke(r.ERROR,arguments)},time:function(d){typeof d=="string"&&d.length>0&&this.invoke(r.TIME,[d,"start"])},timeEnd:function(d){typeof d=="string"&&d.length>0&&this.invoke(r.TIME,[d,"end"])},invoke:function(d,_){i&&this.enabledFor(d)&&i(_,a({level:d},this.context))}};var f=new u({filterLevel:r.OFF});(function(){var d=r;d.enabledFor=s(f,f.enabledFor),d.trace=s(f,f.trace),d.debug=s(f,f.debug),d.time=s(f,f.time),d.timeEnd=s(f,f.timeEnd),d.info=s(f,f.info),d.warn=s(f,f.warn),d.error=s(f,f.error),d.log=d.info})(),r.setHandler=function(d){i=d},r.setLevel=function(d){f.setLevel(d);for(var _ in o)o.hasOwnProperty(_)&&o[_].setLevel(d)},r.getLevel=function(){return f.getLevel()},r.get=function(d){return o[d]||(o[d]=new u(a({name:d},f.context)))},r.createDefaultHandler=function(d){d=d||{},d.formatter=d.formatter||function(x,I){I.name&&x.unshift("["+I.name+"]")};var _={},y=function(x,I){Function.prototype.apply.call(x,console,I)};return typeof console>"u"?function(){}:function(x,I){x=Array.prototype.slice.call(x);var V=console.log,L;I.level===r.TIME?(L=(I.name?"["+I.name+"] ":"")+x[0],x[1]==="start"?console.time?console.time(L):_[L]=new Date().getTime():console.timeEnd?console.timeEnd(L):y(V,[L+": "+(new Date().getTime()-_[L])+"ms"])):(I.level===r.WARN&&console.warn?V=console.warn:I.level===r.ERROR&&console.error?V=console.error:I.level===r.INFO&&console.info?V=console.info:I.level===r.DEBUG&&console.debug?V=console.debug:I.level===r.TRACE&&console.trace&&(V=console.trace),d.formatter(x,I),y(V,x))}},r.useDefaults=function(d){r.setLevel(d&&d.defaultLevel||r.DEBUG),r.setHandler(r.createDefaultHandler(d))},r.setDefaults=r.useDefaults,typeof define=="function"&&define.amd?define(r):typeof e<"u"&&e.exports?e.exports=r:(r._prevLogger=n.Logger,r.noConflict=function(){return n.Logger=r._prevLogger,r},n.Logger=r)})(t)}),Ap=_n((t,e)=>{"use strict";(function(n,r){typeof t=="object"&&typeof e<"u"?r(t):typeof define=="function"&&define.amd?define(["exports"],r):r((n=typeof globalThis<"u"?globalThis:n||self).Sqrl={})})(t,function(n){"use strict";function r(R){var D,b,v=new Error(R);return D=v,b=r.prototype,Object.setPrototypeOf?Object.setPrototypeOf(D,b):D.__proto__=b,v}function i(R,D,b){var v=D.slice(0,b).split(/\n/),k=v.length,U=v[k-1].length+1;throw r(R+=" at line "+k+" col "+U+`:
1
+ "use strict";(()=>{var Lb=Object.create,ca=Object.defineProperty,Mb=Object.defineProperties,Og=Object.getOwnPropertyDescriptor,jb=Object.getOwnPropertyDescriptors,Fb=Object.getOwnPropertyNames,Rd=Object.getOwnPropertySymbols,Vb=Object.getPrototypeOf,Dg=Object.prototype.hasOwnProperty,Bb=Object.prototype.propertyIsEnumerable,ec=(e,t,n)=>t in e?ca(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F=(e,t)=>{for(var n in t||={})Dg.call(t,n)&&ec(e,n,t[n]);if(Rd)for(var n of Rd(t))Bb.call(t,n)&&ec(e,n,t[n]);return e},Ye=(e,t)=>Mb(e,jb(t)),qo=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),kn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ub=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Fb(t))!Dg.call(e,i)&&i!==n&&ca(e,i,{get:()=>t[i],enumerable:!(r=Og(t,i))||r.enumerable});return e},bn=(e,t,n)=>(n=e!=null?Lb(Vb(e)):{},Ub(t||!e||!e.__esModule?ca(n,"default",{value:e,enumerable:!0}):n,e)),Hb=(e,t,n,r)=>{for(var i=r>1?void 0:r?Og(t,n):t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=(r?s(t,n,i):s(i))||i);return r&&i&&ca(t,n,i),i},Nd=(e,t,n)=>ec(e,typeof t!="symbol"?t+"":t,n),$b=kn((e,t)=>{"use strict";(function(n){"use strict";var r={};r.VERSION="1.6.1";var i,o={},s=function(h,v){return function(){return v.apply(h,arguments)}},a=function(){var h=arguments,v=h[0],m,w;for(w=1;w<h.length;w++)for(m in h[w])!(m in v)&&h[w].hasOwnProperty(m)&&(v[m]=h[w][m]);return v},l=function(h,v){return{value:h,name:v}};r.TRACE=l(1,"TRACE"),r.DEBUG=l(2,"DEBUG"),r.INFO=l(3,"INFO"),r.TIME=l(4,"TIME"),r.WARN=l(5,"WARN"),r.ERROR=l(8,"ERROR"),r.OFF=l(99,"OFF");var u=function(h){this.context=h,this.setLevel(h.filterLevel),this.log=this.info};u.prototype={setLevel:function(h){h&&"value"in h&&(this.context.filterLevel=h)},getLevel:function(){return this.context.filterLevel},enabledFor:function(h){var v=this.context.filterLevel;return h.value>=v.value},trace:function(){this.invoke(r.TRACE,arguments)},debug:function(){this.invoke(r.DEBUG,arguments)},info:function(){this.invoke(r.INFO,arguments)},warn:function(){this.invoke(r.WARN,arguments)},error:function(){this.invoke(r.ERROR,arguments)},time:function(h){typeof h=="string"&&h.length>0&&this.invoke(r.TIME,[h,"start"])},timeEnd:function(h){typeof h=="string"&&h.length>0&&this.invoke(r.TIME,[h,"end"])},invoke:function(h,v){i&&this.enabledFor(h)&&i(v,a({level:h},this.context))}};var d=new u({filterLevel:r.OFF});(function(){var h=r;h.enabledFor=s(d,d.enabledFor),h.trace=s(d,d.trace),h.debug=s(d,d.debug),h.time=s(d,d.time),h.timeEnd=s(d,d.timeEnd),h.info=s(d,d.info),h.warn=s(d,d.warn),h.error=s(d,d.error),h.log=h.info})(),r.setHandler=function(h){i=h},r.setLevel=function(h){d.setLevel(h);for(var v in o)o.hasOwnProperty(v)&&o[v].setLevel(h)},r.getLevel=function(){return d.getLevel()},r.get=function(h){return o[h]||(o[h]=new u(a({name:h},d.context)))},r.createDefaultHandler=function(h){h=h||{},h.formatter=h.formatter||function(w,C){C.name&&w.unshift("["+C.name+"]")};var v={},m=function(w,C){Function.prototype.apply.call(w,console,C)};return typeof console>"u"?function(){}:function(w,C){w=Array.prototype.slice.call(w);var A=console.log,k;C.level===r.TIME?(k=(C.name?"["+C.name+"] ":"")+w[0],w[1]==="start"?console.time?console.time(k):v[k]=new Date().getTime():console.timeEnd?console.timeEnd(k):m(A,[k+": "+(new Date().getTime()-v[k])+"ms"])):(C.level===r.WARN&&console.warn?A=console.warn:C.level===r.ERROR&&console.error?A=console.error:C.level===r.INFO&&console.info?A=console.info:C.level===r.DEBUG&&console.debug?A=console.debug:C.level===r.TRACE&&console.trace&&(A=console.trace),h.formatter(w,C),m(A,w))}},r.useDefaults=function(h){r.setLevel(h&&h.defaultLevel||r.DEBUG),r.setHandler(r.createDefaultHandler(h))},r.setDefaults=r.useDefaults,typeof define=="function"&&define.amd?define(r):typeof t<"u"&&t.exports?t.exports=r:(r._prevLogger=n.Logger,r.noConflict=function(){return n.Logger=r._prevLogger,r},n.Logger=r)})(e)}),Rg=kn((e,t)=>{"use strict";(function(n,r){typeof e=="object"&&typeof t<"u"?r(e):typeof define=="function"&&define.amd?define(["exports"],r):r((n=typeof globalThis<"u"?globalThis:n||self).Sqrl={})})(e,function(n){"use strict";function r(R){var D,b,y=new Error(R);return D=y,b=r.prototype,Object.setPrototypeOf?Object.setPrototypeOf(D,b):D.__proto__=b,y}function i(R,D,b){var y=D.slice(0,b).split(/\n/),L=y.length,U=y[L-1].length+1;throw r(R+=" at line "+L+" col "+U+`:
2
2
 
3
- `+D.split(/\n/)[k-1]+`
4
- `+Array(U).join(" ")+"^")}r.prototype=Object.create(Error.prototype,{name:{value:"Squirrelly Error",enumerable:!1}});var o=new Function("return this")().Promise,s=!1;try{s=new Function("return (async function(){}).constructor")()}catch(R){if(!(R instanceof SyntaxError))throw R}function a(R,D){return Object.prototype.hasOwnProperty.call(R,D)}function l(R,D,b){for(var v in D)a(D,v)&&(D[v]==null||typeof D[v]!="object"||v!=="storage"&&v!=="prefixes"||b?R[v]=D[v]:R[v]=l({},D[v]));return R}var u=/^async +/,f=/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})*}|(?!\${)[^\\`])*`/g,d=/'(?:\\[\s\w"'\\`]|[^\n\r'\\])*?'/g,_=/"(?:\\[\s\w"'\\`]|[^\n\r"\\])*?"/g,y=/[.*+\-?^${}()|[\]\\]/g;function x(R){return y.test(R)?R.replace(y,"\\$&"):R}function I(R,D){D.rmWhitespace&&(R=R.replace(/[\r\n]+/g,`
5
- `).replace(/^\s+|\s+$/gm,"")),f.lastIndex=0,d.lastIndex=0,_.lastIndex=0;var b=D.prefixes,v=[b.h,b.b,b.i,b.r,b.c,b.e].reduce(function(Et,X){return Et&&X?Et+"|"+x(X):X?x(X):Et},""),k=new RegExp("([|()]|=>)|('|\"|`|\\/\\*)|\\s*((\\/)?(-|_)?"+x(D.tags[1])+")","g"),U=new RegExp("([^]*?)"+x(D.tags[0])+"(-|_)?\\s*("+v+")?\\s*","g"),G=0,nt=!1;function et(Et,X){var ot,gt={f:[]},ut=0,c="c";function h(Ct){var Mt=R.slice(G,Ct),Rt=Mt.trim();if(c==="f")Rt==="safe"?gt.raw=!0:D.async&&u.test(Rt)?(Rt=Rt.replace(u,""),gt.f.push([Rt,"",!0])):gt.f.push([Rt,""]);else if(c==="fp")gt.f[gt.f.length-1][1]+=Rt;else if(c==="err"){if(Rt){var ye=Mt.search(/\S/);i("invalid syntax",R,G+ye)}}else gt[c]=Rt;G=Ct+1}for(X==="h"||X==="b"||X==="c"?c="n":X==="r"&&(gt.raw=!0,X="i"),k.lastIndex=G;(ot=k.exec(R))!==null;){var p=ot[1],S=ot[2],N=ot[3],M=ot[4],J=ot[5],rt=ot.index;if(p)p==="("?(ut===0&&(c==="n"?(h(rt),c="p"):c==="f"&&(h(rt),c="fp")),ut++):p===")"?--ut===0&&c!=="c"&&(h(rt),c="err"):ut===0&&p==="|"?(h(rt),c="f"):p==="=>"&&(h(rt),G+=1,c="res");else if(S)if(S==="/*"){var Lt=R.indexOf("*/",k.lastIndex);Lt===-1&&i("unclosed comment",R,ot.index),k.lastIndex=Lt+2}else S==="'"?(d.lastIndex=ot.index,d.exec(R)?k.lastIndex=d.lastIndex:i("unclosed string",R,ot.index)):S==='"'?(_.lastIndex=ot.index,_.exec(R)?k.lastIndex=_.lastIndex:i("unclosed string",R,ot.index)):S==="`"&&(f.lastIndex=ot.index,f.exec(R)?k.lastIndex=f.lastIndex:i("unclosed string",R,ot.index));else if(N)return h(rt),G=rt+ot[0].length,U.lastIndex=G,nt=J,M&&X==="h"&&(X="s"),gt.t=X,gt}return i("unclosed tag",R,Et),gt}var K=function Et(X,ot){X.b=[],X.d=[];var gt,ut=!1,c=[];function h(ye,Rn){ye&&(ye=function(le,on,wn,Zn){var Me,sn;return typeof on.autoTrim=="string"?Me=sn=on.autoTrim:Array.isArray(on.autoTrim)&&(Me=on.autoTrim[1],sn=on.autoTrim[0]),(wn||wn===!1)&&(Me=wn),(Zn||Zn===!1)&&(sn=Zn),Me==="slurp"&&sn==="slurp"?le.trim():(Me==="_"||Me==="slurp"?le=String.prototype.trimLeft?le.trimLeft():le.replace(/^[\s\uFEFF\xA0]+/,""):Me!=="-"&&Me!=="nl"||(le=le.replace(/^(?:\n|\r|\r\n)/,"")),sn==="_"||sn==="slurp"?le=String.prototype.trimRight?le.trimRight():le.replace(/[\s\uFEFF\xA0]+$/,""):sn!=="-"&&sn!=="nl"||(le=le.replace(/(?:\n|\r|\r\n)$/,"")),le)}(ye,D,nt,Rn))&&(ye=ye.replace(/\\|'/g,"\\$&").replace(/\r\n|\n|\r/g,"\\n"),c.push(ye))}for(;(gt=U.exec(R))!==null;){var p,S=gt[1],N=gt[2],M=gt[3]||"";for(var J in b)if(b[J]===M){p=J;break}h(S,N),G=gt.index+gt[0].length,p||i("unrecognized tag type: "+M,R,G);var rt=et(gt.index,p),Lt=rt.t;if(Lt==="h"){var Ct=rt.n||"";D.async&&u.test(Ct)&&(rt.a=!0,rt.n=Ct.replace(u,"")),rt=Et(rt),c.push(rt)}else if(Lt==="c"){if(X.n===rt.n)return ut?(ut.d=c,X.b.push(ut)):X.d=c,X;i("Helper start and end don't match",R,gt.index+gt[0].length)}else if(Lt==="b"){ut?(ut.d=c,X.b.push(ut)):X.d=c;var Mt=rt.n||"";D.async&&u.test(Mt)&&(rt.a=!0,rt.n=Mt.replace(u,"")),ut=rt,c=[]}else if(Lt==="s"){var Rt=rt.n||"";D.async&&u.test(Rt)&&(rt.a=!0,rt.n=Rt.replace(u,"")),c.push(rt)}else c.push(rt)}if(!ot)throw r('unclosed helper "'+X.n+'"');return h(R.slice(G,R.length),!1),X.d=c,X}({f:[]},!0);if(D.plugins)for(var ct=0;ct<D.plugins.length;ct++){var ft=D.plugins[ct];ft.processAST&&(K.d=ft.processAST(K.d,D))}return K.d}function V(R,D){var b=I(R,D),v="var tR='';"+(D.useWith?"with("+D.varName+"||{}){":"")+lt(b,D)+"if(cb){cb(null,tR)} return tR"+(D.useWith?"}":"");if(D.plugins)for(var k=0;k<D.plugins.length;k++){var U=D.plugins[k];U.processFnString&&(v=U.processFnString(v,D))}return v}function L(R,D){for(var b=0;b<D.length;b++){var v=D[b][0],k=D[b][1];R=(D[b][2]?"await ":"")+"c.l('F','"+v+"')("+R,k&&(R+=","+k),R+=")"}return R}function Z(R,D,b,v,k,U){var G="{exec:"+(k?"async ":"")+B(b,D,R)+",params:["+v+"]";return U&&(G+=",name:'"+U+"'"),k&&(G+=",async:true"),G+="}"}function W(R,D){for(var b="[",v=0;v<R.length;v++){var k=R[v];b+=Z(D,k.res||"",k.d,k.p||"",k.a,k.n),v<R.length&&(b+=",")}return b+="]"}function B(R,D,b){return"function("+D+"){var tR='';"+lt(R,b)+"return tR}"}function lt(R,D){for(var b=0,v=R.length,k="";b<v;b++){var U=R[b];if(typeof U=="string")k+="tR+='"+U+"';";else{var G=U.t,nt=U.c||"",et=U.f,K=U.n||"",ct=U.p||"",ft=U.res||"",Et=U.b,X=!!U.a;if(G==="i"){D.defaultFilter&&(nt="c.l('F','"+D.defaultFilter+"')("+nt+")");var ot=L(nt,et);!U.raw&&D.autoEscape&&(ot="c.l('F','e')("+ot+")"),k+="tR+="+ot+";"}else if(G==="h")if(D.storage.nativeHelpers.get(K))k+=D.storage.nativeHelpers.get(K)(U,D);else{var gt=(X?"await ":"")+"c.l('H','"+K+"')("+Z(D,ft,U.d,ct,X);gt+=Et?","+W(Et,D):",[]",k+="tR+="+L(gt+=",c)",et)+";"}else G==="s"?k+="tR+="+L((X?"await ":"")+"c.l('H','"+K+"')({params:["+ct+"]},[],c)",et)+";":G==="e"&&(k+=nt+`
6
- `)}}return k}var Ht=function(){function R(D){this.cache=D}return R.prototype.define=function(D,b){this.cache[D]=b},R.prototype.get=function(D){return this.cache[D]},R.prototype.remove=function(D){delete this.cache[D]},R.prototype.reset=function(){this.cache={}},R.prototype.load=function(D){l(this.cache,D,!0)},R}();function At(R,D,b,v){if(D&&D.length>0)throw r((v?"Native":"")+"Helper '"+R+"' doesn't accept blocks");if(b&&b.length>0)throw r((v?"Native":"")+"Helper '"+R+"' doesn't accept filters")}var $={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function _t(R){return $[R]}var ht=new Ht({}),bt=new Ht({each:function(R,D){var b="",v=R.params[0];if(At("each",D,!1),R.async)return new Promise(function(U){(function G(nt,et,K,ct,ft){K(nt[et],et).then(function(Et){ct+=Et,et===nt.length-1?ft(ct):G(nt,et+1,K,ct,ft)})})(v,0,R.exec,b,U)});for(var k=0;k<v.length;k++)b+=R.exec(v[k],k);return b},foreach:function(R,D){var b=R.params[0];if(At("foreach",D,!1),R.async)return new Promise(function(U){(function G(nt,et,K,ct,ft,Et){ct(et[K],nt[et[K]]).then(function(X){ft+=X,K===et.length-1?Et(ft):G(nt,et,K+1,ct,ft,Et)})})(b,Object.keys(b),0,R.exec,"",U)});var v="";for(var k in b)a(b,k)&&(v+=R.exec(k,b[k]));return v},include:function(R,D,b){At("include",D,!1);var v=b.storage.templates.get(R.params[0]);if(!v)throw r('Could not fetch template "'+R.params[0]+'"');return v(R.params[1],b)},extends:function(R,D,b){var v=R.params[1]||{};v.content=R.exec();for(var k=0;k<D.length;k++){var U=D[k];v[U.name]=U.exec()}var G=b.storage.templates.get(R.params[0]);if(!G)throw r('Could not fetch template "'+R.params[0]+'"');return G(v,b)},useScope:function(R,D){return At("useScope",D,!1),R.exec(R.params[0])}}),kt=new Ht({if:function(R,D){At("if",!1,R.f,!0);var b="if("+R.p+"){"+lt(R.d,D)+"}";if(R.b)for(var v=0;v<R.b.length;v++){var k=R.b[v];k.n==="else"?b+="else{"+lt(k.d,D)+"}":k.n==="elif"&&(b+="else if("+k.p+"){"+lt(k.d,D)+"}")}return b},try:function(R,D){if(At("try",!1,R.f,!0),!R.b||R.b.length!==1||R.b[0].n!=="catch")throw r("native helper 'try' only accepts 1 block, 'catch'");var b="try{"+lt(R.d,D)+"}",v=R.b[0];return b+="catch"+(v.res?"("+v.res+")":"")+"{"+lt(v.d,D)+"}"},block:function(R,D){return At("block",R.b,R.f,!0),"if(!"+D.varName+"["+R.p+"]){tR+=("+B(R.d,"",D)+")()}else{tR+="+D.varName+"["+R.p+"]}"}}),$t=new Ht({e:function(R){var D=String(R);return/[&<>"']/.test(D)?D.replace(/[&<>"']/g,_t):D}}),m={varName:"it",autoTrim:[!1,"nl"],autoEscape:!0,defaultFilter:!1,tags:["{{","}}"],l:function(R,D){if(R==="H"){var b=this.storage.helpers.get(D);if(b)return b;throw r("Can't find helper '"+D+"'")}if(R==="F"){var v=this.storage.filters.get(D);if(v)return v;throw r("Can't find filter '"+D+"'")}},async:!1,storage:{helpers:bt,nativeHelpers:kt,filters:$t,templates:ht},prefixes:{h:"@",b:"#",i:"",r:"*",c:"/",e:"!"},cache:!1,plugins:[],useWith:!1};function Yt(R,D){var b={};return l(b,m),D&&l(b,D),R&&l(b,R),b.l.bind(b),b}function re(R,D){var b,v=Yt(D||{}),k=Function;if(v.async){if(!s)throw r("This environment doesn't support async/await");k=s}if(v.varName&&(b=v.varName,/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(b)===!1))throw r("options.varName must be a valid JS identifier");try{return new k(v.varName,"c","cb",V(R,v))}catch(U){throw U instanceof SyntaxError?r(`Bad template syntax
3
+ `+D.split(/\n/)[L-1]+`
4
+ `+Array(U).join(" ")+"^")}r.prototype=Object.create(Error.prototype,{name:{value:"Squirrelly Error",enumerable:!1}});var o=new Function("return this")().Promise,s=!1;try{s=new Function("return (async function(){}).constructor")()}catch(R){if(!(R instanceof SyntaxError))throw R}function a(R,D){return Object.prototype.hasOwnProperty.call(R,D)}function l(R,D,b){for(var y in D)a(D,y)&&(D[y]==null||typeof D[y]!="object"||y!=="storage"&&y!=="prefixes"||b?R[y]=D[y]:R[y]=l({},D[y]));return R}var u=/^async +/,d=/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})*}|(?!\${)[^\\`])*`/g,h=/'(?:\\[\s\w"'\\`]|[^\n\r'\\])*?'/g,v=/"(?:\\[\s\w"'\\`]|[^\n\r"\\])*?"/g,m=/[.*+\-?^${}()|[\]\\]/g;function w(R){return m.test(R)?R.replace(m,"\\$&"):R}function C(R,D){D.rmWhitespace&&(R=R.replace(/[\r\n]+/g,`
5
+ `).replace(/^\s+|\s+$/gm,"")),d.lastIndex=0,h.lastIndex=0,v.lastIndex=0;var b=D.prefixes,y=[b.h,b.b,b.i,b.r,b.c,b.e].reduce(function(Ee,K){return Ee&&K?Ee+"|"+w(K):K?w(K):Ee},""),L=new RegExp("([|()]|=>)|('|\"|`|\\/\\*)|\\s*((\\/)?(-|_)?"+w(D.tags[1])+")","g"),U=new RegExp("([^]*?)"+w(D.tags[0])+"(-|_)?\\s*("+y+")?\\s*","g"),W=0,te=!1;function ee(Ee,K){var oe,me={f:[]},de=0,c="c";function f(Ie){var je=R.slice(W,Ie),ke=je.trim();if(c==="f")ke==="safe"?me.raw=!0:D.async&&u.test(ke)?(ke=ke.replace(u,""),me.f.push([ke,"",!0])):me.f.push([ke,""]);else if(c==="fp")me.f[me.f.length-1][1]+=ke;else if(c==="err"){if(ke){var Et=je.search(/\S/);i("invalid syntax",R,W+Et)}}else me[c]=ke;W=Ie+1}for(K==="h"||K==="b"||K==="c"?c="n":K==="r"&&(me.raw=!0,K="i"),L.lastIndex=W;(oe=L.exec(R))!==null;){var p=oe[1],S=oe[2],N=oe[3],j=oe[4],J=oe[5],ie=oe.index;if(p)p==="("?(de===0&&(c==="n"?(f(ie),c="p"):c==="f"&&(f(ie),c="fp")),de++):p===")"?--de===0&&c!=="c"&&(f(ie),c="err"):de===0&&p==="|"?(f(ie),c="f"):p==="=>"&&(f(ie),W+=1,c="res");else if(S)if(S==="/*"){var Me=R.indexOf("*/",L.lastIndex);Me===-1&&i("unclosed comment",R,oe.index),L.lastIndex=Me+2}else S==="'"?(h.lastIndex=oe.index,h.exec(R)?L.lastIndex=h.lastIndex:i("unclosed string",R,oe.index)):S==='"'?(v.lastIndex=oe.index,v.exec(R)?L.lastIndex=v.lastIndex:i("unclosed string",R,oe.index)):S==="`"&&(d.lastIndex=oe.index,d.exec(R)?L.lastIndex=d.lastIndex:i("unclosed string",R,oe.index));else if(N)return f(ie),W=ie+oe[0].length,U.lastIndex=W,te=J,j&&K==="h"&&(K="s"),me.t=K,me}return i("unclosed tag",R,Ee),me}var Y=function Ee(K,oe){K.b=[],K.d=[];var me,de=!1,c=[];function f(Et,Ln){Et&&(Et=function(ut,sn,Sn,Qn){var Ut,an;return typeof sn.autoTrim=="string"?Ut=an=sn.autoTrim:Array.isArray(sn.autoTrim)&&(Ut=sn.autoTrim[1],an=sn.autoTrim[0]),(Sn||Sn===!1)&&(Ut=Sn),(Qn||Qn===!1)&&(an=Qn),Ut==="slurp"&&an==="slurp"?ut.trim():(Ut==="_"||Ut==="slurp"?ut=String.prototype.trimLeft?ut.trimLeft():ut.replace(/^[\s\uFEFF\xA0]+/,""):Ut!=="-"&&Ut!=="nl"||(ut=ut.replace(/^(?:\n|\r|\r\n)/,"")),an==="_"||an==="slurp"?ut=String.prototype.trimRight?ut.trimRight():ut.replace(/[\s\uFEFF\xA0]+$/,""):an!=="-"&&an!=="nl"||(ut=ut.replace(/(?:\n|\r|\r\n)$/,"")),ut)}(Et,D,te,Ln))&&(Et=Et.replace(/\\|'/g,"\\$&").replace(/\r\n|\n|\r/g,"\\n"),c.push(Et))}for(;(me=U.exec(R))!==null;){var p,S=me[1],N=me[2],j=me[3]||"";for(var J in b)if(b[J]===j){p=J;break}f(S,N),W=me.index+me[0].length,p||i("unrecognized tag type: "+j,R,W);var ie=ee(me.index,p),Me=ie.t;if(Me==="h"){var Ie=ie.n||"";D.async&&u.test(Ie)&&(ie.a=!0,ie.n=Ie.replace(u,"")),ie=Ee(ie),c.push(ie)}else if(Me==="c"){if(K.n===ie.n)return de?(de.d=c,K.b.push(de)):K.d=c,K;i("Helper start and end don't match",R,me.index+me[0].length)}else if(Me==="b"){de?(de.d=c,K.b.push(de)):K.d=c;var je=ie.n||"";D.async&&u.test(je)&&(ie.a=!0,ie.n=je.replace(u,"")),de=ie,c=[]}else if(Me==="s"){var ke=ie.n||"";D.async&&u.test(ke)&&(ie.a=!0,ie.n=ke.replace(u,"")),c.push(ie)}else c.push(ie)}if(!oe)throw r('unclosed helper "'+K.n+'"');return f(R.slice(W,R.length),!1),K.d=c,K}({f:[]},!0);if(D.plugins)for(var ue=0;ue<D.plugins.length;ue++){var pe=D.plugins[ue];pe.processAST&&(Y.d=pe.processAST(Y.d,D))}return Y.d}function A(R,D){var b=C(R,D),y="var tR='';"+(D.useWith?"with("+D.varName+"||{}){":"")+re(b,D)+"if(cb){cb(null,tR)} return tR"+(D.useWith?"}":"");if(D.plugins)for(var L=0;L<D.plugins.length;L++){var U=D.plugins[L];U.processFnString&&(y=U.processFnString(y,D))}return y}function k(R,D){for(var b=0;b<D.length;b++){var y=D[b][0],L=D[b][1];R=(D[b][2]?"await ":"")+"c.l('F','"+y+"')("+R,L&&(R+=","+L),R+=")"}return R}function $(R,D,b,y,L,U){var W="{exec:"+(L?"async ":"")+z(b,D,R)+",params:["+y+"]";return U&&(W+=",name:'"+U+"'"),L&&(W+=",async:true"),W+="}"}function ne(R,D){for(var b="[",y=0;y<R.length;y++){var L=R[y];b+=$(D,L.res||"",L.d,L.p||"",L.a,L.n),y<R.length&&(b+=",")}return b+="]"}function z(R,D,b){return"function("+D+"){var tR='';"+re(R,b)+"return tR}"}function re(R,D){for(var b=0,y=R.length,L="";b<y;b++){var U=R[b];if(typeof U=="string")L+="tR+='"+U+"';";else{var W=U.t,te=U.c||"",ee=U.f,Y=U.n||"",ue=U.p||"",pe=U.res||"",Ee=U.b,K=!!U.a;if(W==="i"){D.defaultFilter&&(te="c.l('F','"+D.defaultFilter+"')("+te+")");var oe=k(te,ee);!U.raw&&D.autoEscape&&(oe="c.l('F','e')("+oe+")"),L+="tR+="+oe+";"}else if(W==="h")if(D.storage.nativeHelpers.get(Y))L+=D.storage.nativeHelpers.get(Y)(U,D);else{var me=(K?"await ":"")+"c.l('H','"+Y+"')("+$(D,pe,U.d,ue,K);me+=Ee?","+ne(Ee,D):",[]",L+="tR+="+k(me+=",c)",ee)+";"}else W==="s"?L+="tR+="+k((K?"await ":"")+"c.l('H','"+Y+"')({params:["+ue+"]},[],c)",ee)+";":W==="e"&&(L+=te+`
6
+ `)}}return L}var Re=function(){function R(D){this.cache=D}return R.prototype.define=function(D,b){this.cache[D]=b},R.prototype.get=function(D){return this.cache[D]},R.prototype.remove=function(D){delete this.cache[D]},R.prototype.reset=function(){this.cache={}},R.prototype.load=function(D){l(this.cache,D,!0)},R}();function Ne(R,D,b,y){if(D&&D.length>0)throw r((y?"Native":"")+"Helper '"+R+"' doesn't accept blocks");if(b&&b.length>0)throw r((y?"Native":"")+"Helper '"+R+"' doesn't accept filters")}var V={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function fe(R){return V[R]}var ce=new Re({}),he=new Re({each:function(R,D){var b="",y=R.params[0];if(Ne("each",D,!1),R.async)return new Promise(function(U){(function W(te,ee,Y,ue,pe){Y(te[ee],ee).then(function(Ee){ue+=Ee,ee===te.length-1?pe(ue):W(te,ee+1,Y,ue,pe)})})(y,0,R.exec,b,U)});for(var L=0;L<y.length;L++)b+=R.exec(y[L],L);return b},foreach:function(R,D){var b=R.params[0];if(Ne("foreach",D,!1),R.async)return new Promise(function(U){(function W(te,ee,Y,ue,pe,Ee){ue(ee[Y],te[ee[Y]]).then(function(K){pe+=K,Y===ee.length-1?Ee(pe):W(te,ee,Y+1,ue,pe,Ee)})})(b,Object.keys(b),0,R.exec,"",U)});var y="";for(var L in b)a(b,L)&&(y+=R.exec(L,b[L]));return y},include:function(R,D,b){Ne("include",D,!1);var y=b.storage.templates.get(R.params[0]);if(!y)throw r('Could not fetch template "'+R.params[0]+'"');return y(R.params[1],b)},extends:function(R,D,b){var y=R.params[1]||{};y.content=R.exec();for(var L=0;L<D.length;L++){var U=D[L];y[U.name]=U.exec()}var W=b.storage.templates.get(R.params[0]);if(!W)throw r('Could not fetch template "'+R.params[0]+'"');return W(y,b)},useScope:function(R,D){return Ne("useScope",D,!1),R.exec(R.params[0])}}),Se=new Re({if:function(R,D){Ne("if",!1,R.f,!0);var b="if("+R.p+"){"+re(R.d,D)+"}";if(R.b)for(var y=0;y<R.b.length;y++){var L=R.b[y];L.n==="else"?b+="else{"+re(L.d,D)+"}":L.n==="elif"&&(b+="else if("+L.p+"){"+re(L.d,D)+"}")}return b},try:function(R,D){if(Ne("try",!1,R.f,!0),!R.b||R.b.length!==1||R.b[0].n!=="catch")throw r("native helper 'try' only accepts 1 block, 'catch'");var b="try{"+re(R.d,D)+"}",y=R.b[0];return b+="catch"+(y.res?"("+y.res+")":"")+"{"+re(y.d,D)+"}"},block:function(R,D){return Ne("block",R.b,R.f,!0),"if(!"+D.varName+"["+R.p+"]){tR+=("+z(R.d,"",D)+")()}else{tR+="+D.varName+"["+R.p+"]}"}}),$e=new Re({e:function(R){var D=String(R);return/[&<>"']/.test(D)?D.replace(/[&<>"']/g,fe):D}}),_={varName:"it",autoTrim:[!1,"nl"],autoEscape:!0,defaultFilter:!1,tags:["{{","}}"],l:function(R,D){if(R==="H"){var b=this.storage.helpers.get(D);if(b)return b;throw r("Can't find helper '"+D+"'")}if(R==="F"){var y=this.storage.filters.get(D);if(y)return y;throw r("Can't find filter '"+D+"'")}},async:!1,storage:{helpers:he,nativeHelpers:Se,filters:$e,templates:ce},prefixes:{h:"@",b:"#",i:"",r:"*",c:"/",e:"!"},cache:!1,plugins:[],useWith:!1};function Ke(R,D){var b={};return l(b,_),D&&l(b,D),R&&l(b,R),b.l.bind(b),b}function it(R,D){var b,y=Ke(D||{}),L=Function;if(y.async){if(!s)throw r("This environment doesn't support async/await");L=s}if(y.varName&&(b=y.varName,/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(b)===!1))throw r("options.varName must be a valid JS identifier");try{return new L(y.varName,"c","cb",A(R,y))}catch(U){throw U instanceof SyntaxError?r(`Bad template syntax
7
7
 
8
8
  `+U.message+`
9
9
  `+Array(U.message.length+1).join("=")+`
10
- `+V(R,v)):U}}function Dt(R,D){var b;return D.cache&&D.name&&D.storage.templates.get(D.name)?D.storage.templates.get(D.name):(b=typeof R=="function"?R:re(R,D),D.cache&&D.name&&D.storage.templates.define(D.name,b),b)}m.l.bind(m),n.compile=re,n.compileScope=lt,n.compileScopeIntoFunction=B,n.compileToString=V,n.defaultConfig=m,n.filters=$t,n.getConfig=Yt,n.helpers=bt,n.nativeHelpers=kt,n.parse=I,n.render=function(R,D,b,v){var k=Yt(b||{});if(!k.async)return Dt(R,k)(D,k);if(!v){if(typeof o=="function")return new o(function(U,G){try{U(Dt(R,k)(D,k))}catch(nt){G(nt)}});throw r("Please provide a callback function, this env doesn't support Promises")}try{Dt(R,k)(D,k,v)}catch(U){return v(U)}},n.templates=ht,Object.defineProperty(n,"__esModule",{value:!0})})}),uo=_n(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MilestoneRewardType=t.ProgressBarLayout=t.EngagementContentSource=t.EngagementObjective=t.OnsiteDeliveryType=t.ClickActionType=t.FrequencyGapUnit=t.FrequencyType=t.RedirectBehaviour=t.EngagementPlacementPosition=t.EngagementCollectionSource=t.PromotionType=t.CartFilterEnum=t.CartCurrencyOperator=t.CartCriteria=t.URLCriteria=t.UTMCriteria=t.CartItemSource=t.EngagementItemSource=t.PurchasedVisitor=t.LoggedInVisitor=t.SessionType=t.EngagementContentType=t.TriggerType=t.EngagementType=t.EngagementStatus=t.TimePreference=t.ScheduleFrequency=t.CriteriaFrequency=void 0;var e=function(m){return m[m.ONCE_PER_USER=1]="ONCE_PER_USER",m[m.ONCE_PER_SESSION=2]="ONCE_PER_SESSION",m[m.EVERY_TIME=3]="EVERY_TIME",m}(e||(t.CriteriaFrequency=e={})),n=function(m){return m[m.ONE_TIME=1]="ONE_TIME",m[m.MULTIPLE=2]="MULTIPLE",m[m.RECURRING=3]="RECURRING",m}(n||(t.ScheduleFrequency=n={})),r=function(m){return m[m.NOW=1]="NOW",m[m.LATER=2]="LATER",m[m.NEVER=3]="NEVER",m}(r||(t.TimePreference=r={})),i=function(m){return m[m.PUBLISHED=1]="PUBLISHED",m[m.DRAFT=2]="DRAFT",m[m.PAUSED=3]="PAUSED",m[m.STOPPED=5]="STOPPED",m[m.COMPLETED=6]="COMPLETED",m[m.UNINSTALLED=8]="UNINSTALLED",m}(i||(t.EngagementStatus=i={})),o=function(m){return m.CAMPAIGN="CAMPAIGN",m.NATIVE_AB="NATIVE_AB",m.CRO_COPILOT="CRO_COPILOT",m}(o||(t.EngagementType=o={})),s=function(m){return m[m.NONE=0]="NONE",m[m.RULE_BASED=1]="RULE_BASED",m[m.INTENT_BASED=2]="INTENT_BASED",m}(s||(t.TriggerType=s={})),a=function(m){return m[m.SINGLE=1]="SINGLE",m[m.EXCLUSION=2]="EXCLUSION",m[m.ABTESTING=3]="ABTESTING",m}(a||(t.EngagementContentType=a={})),l=function(m){return m[m.ALL=0]="ALL",m[m.NEW_ONLY=1]="NEW_ONLY",m[m.RETURNING_ONLY=2]="RETURNING_ONLY",m}(l||(t.SessionType=l={})),u=function(m){return m.ALL="ALL",m.LOGGED_IN="LOGGED_IN",m.NON_LOGGED_IN="NON_LOGGED_IN",m}(u||(t.LoggedInVisitor=u={})),f=function(m){return m.ALL="ALL",m.PURCHASED="PURCHASED",m.NON_PURCHASED="NON_PURCHASED",m}(f||(t.PurchasedVisitor=f={})),d=function(m){return m[m.NONE=0]="NONE",m[m.ITEM_RECOMMENDATION=1]="ITEM_RECOMMENDATION",m[m.MULTIPLE_ITEMS=2]="MULTIPLE_ITEMS",m[m.SINGLE_ITEM=3]="SINGLE_ITEM",m[m.TOP_SELLING=4]="TOP_SELLING",m[m.STOCK_CLEARANCE=5]="STOCK_CLEARANCE",m[m.NEW_ARRIVALS=6]="NEW_ARRIVALS",m[m.RECENTLY_VIEWED=7]="RECENTLY_VIEWED",m[m.EVENT_ITEM=8]="EVENT_ITEM",m[m.CART_ITEM=9]="CART_ITEM",m[m.BUNDLE=10]="BUNDLE",m[m.CURRENT_ITEM=11]="CURRENT_ITEM",m[m.PURCHASED_PREVIOUSLY=12]="PURCHASED_PREVIOUSLY",m[m.COLLECTION_ITEMS=13]="COLLECTION_ITEMS",m[m.TRENDING_ITEMS=14]="TRENDING_ITEMS",m}(d||(t.EngagementItemSource=d={})),_=function(m){return m[m.LAST_ADDED=1]="LAST_ADDED",m[m.FIRST_ADDED=2]="FIRST_ADDED",m[m.HIGHEST_PRICE=3]="HIGHEST_PRICE",m[m.LOWEST_PRICE=4]="LOWEST_PRICE",m[m.FIRST_MATCHING_TAG=5]="FIRST_MATCHING_TAG",m[m.ALL=6]="ALL",m}(_||(t.CartItemSource=_={})),y=function(m){return m[m.ALL=0]="ALL",m[m.ONLY_ORGANIC=1]="ONLY_ORGANIC",m[m.ONLY_NON_ORGANIC=2]="ONLY_NON_ORGANIC",m[m.INCLUDES=3]="INCLUDES",m[m.EXCLUDES=4]="EXCLUDES",m}(y||(t.UTMCriteria=y={})),x=function(m){return m[m.NONE=0]="NONE",m[m.LIKE=1]="LIKE",m[m.NOT_LIKE=2]="NOT_LIKE",m[m.EQUALS=3]="EQUALS",m[m.NOT_EQUALS=4]="NOT_EQUALS",m}(x||(t.URLCriteria=x={})),I=function(m){return m[m.NONE=0]="NONE",m[m.LESS_THAN=1]="LESS_THAN",m[m.GREATER_THAN=2]="GREATER_THAN",m[m.BETWEEN=3]="BETWEEN",m[m.EQUALS=4]="EQUALS",m}(I||(t.CartCriteria=I={})),V=function(m){return m[m.ALL=0]="ALL",m[m.INCLUDES=1]="INCLUDES",m[m.EXCLUDES=2]="EXCLUDES",m}(V||(t.CartCurrencyOperator=V={})),L=function(m){return m[m.NONE=0]="NONE",m[m.AMOUNT=1]="AMOUNT",m[m.TOTAL_PRODUCT=2]="TOTAL_PRODUCT",m[m.UNIQUE_PRODUCT=3]="UNIQUE_PRODUCT",m}(L||(t.CartFilterEnum=L={})),Z=function(m){return m[m.NONE=0]="NONE",m[m.ITEM=1]="ITEM",m[m.COLLECTION=2]="COLLECTION",m}(Z||(t.PromotionType=Z={})),W=function(m){return m[m.NONE=0]="NONE",m[m.SINGLE=1]="SINGLE",m[m.MULTIPLE=2]="MULTIPLE",m}(W||(t.EngagementCollectionSource=W={})),B=function(m){return m.BEFORE="before",m.AFTER="after",m.INSIDE_FIRST="insideFirst",m.INSIDE_LAST="insideLast",m}(B||(t.EngagementPlacementPosition=B={})),lt=function(m){return m.SHOPIFY_CHECKOUT="shopify_checkout",m.THIRD_PARTY_CHECKOUT="third_party_checkout",m.CART_PAGE="cart_page",m.CART_DRAWER="cart_drawer",m}(lt||(t.RedirectBehaviour=lt={})),Ht=function(m){return m.ONCE_IN_SESSION="ONCE_IN_SESSION",m.ACROSS_SESSIONS="ACROSS_SESSIONS",m}(Ht||(t.FrequencyType=Ht={})),At=function(m){return m.DAYS="DAYS",m.HOURS="HOURS",m.MINUTES="MINUTES",m.SECONDS="SECONDS",m}(At||(t.FrequencyGapUnit=At={})),$=function(m){return m[m.NONE=0]="NONE",m[m.REJECT_POPUP=1]="REJECT_POPUP",m[m.ACCEPT_POPUP=2]="ACCEPT_POPUP",m[m.GO_TO_URL=4]="GO_TO_URL",m[m.SHARE=5]="SHARE",m[m.KEY_VALUE=100]="KEY_VALUE",m[m.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",m[m.ADD_TO_CART=102]="ADD_TO_CART",m[m.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",m[m.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",m[m.OPEN_CART=105]="OPEN_CART",m[m.SUBMIT_FORM=106]="SUBMIT_FORM",m[m.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",m[m.ADD_BUNDLE=108]="ADD_BUNDLE",m[m.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",m}($||(t.ClickActionType=$={})),_t=function(m){return m.POPUP="POPUP",m.PAGE_EMBED="PAGE_EMBED",m.CART_EMBED="CART_EMBED",m.ANNOUNCEMENT_BAR="ANNOUNCEMENT_BAR",m}(_t||(t.OnsiteDeliveryType=_t={})),ht=function(m){return m.PRODUCT_PROMOTION="PRODUCT_PROMOTION",m.BUNDLE_AND_UPSELL="BUNDLE_AND_UPSELL",m.CART_RECOVERY="CART_RECOVERY",m.ANNOUNCEMENT="ANNOUNCEMENT",m.LEAD_GENERATION="LEAD_GENERATION",m.DATA_COLLECTION="DATA_COLLECTION",m.SALE_PROMOTION="SALE_PROMOTION",m.SUBSCRIPTION_UPSELL="SUBSCRIPTION_UPSELL",m.SHOPPABLE_VIDEO="SHOPPABLE_VIDEO",m.BYOB="BYOB",m.PROGRESS_BAR="PROGRESS_BAR",m.BUY_NOW="BUY_NOW",m.STICKY_ATC="STICKY_ATC",m.EXPERIMENT="EXPERIMENT",m}(ht||(t.EngagementObjective=ht={})),bt=function(m){return m.COOEE="COOEE",m.KLAVIYO="KLAVIYO",m}(bt||(t.EngagementContentSource=bt={})),kt=function(m){return m.ICONS="ICONS",m.TILES="TILES",m}(kt||(t.ProgressBarLayout=kt={})),$t=function(m){return m.FREE_SHIPPING="FREE_SHIPPING",m.DISCOUNT="DISCOUNT",m.FREE_AUTO_GIFT="FREE_AUTO_GIFT",m.FREE_GIFT_SELECT="FREE_GIFT_SELECT",m}($t||(t.MilestoneRewardType=$t={}))}),D0=_n(t=>{"use strict";var e=t&&t.__awaiter||function(r,i,o,s){function a(l){return l instanceof o?l:new o(function(u){u(l)})}return new(o||(o=Promise))(function(l,u){function f(y){try{_(s.next(y))}catch(x){u(x)}}function d(y){try{_(s.throw(y))}catch(x){u(x)}}function _(y){y.done?l(y.value):a(y.value).then(f,d)}_((s=s.apply(r,i||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.JSUtils=void 0;var n=class{static isObject(r){return typeof r=="object"&&!Array.isArray(r)&&r!==null}static parseToAny(r){try{return JSON.parse(r.toString())}catch{}return r.toString().match(this.ISO_WITHOUT_MS_REGEX)?new Date(r.toString()):r}static sleep(r){return e(this,void 0,void 0,function*(){return new Promise(i=>setTimeout(i,r))})}static hasKeys(r){return r?Object.keys(r).length>=1:!1}static convertObjectToArray(r,i){return i.reduce((o,s)=>(r.hasOwnProperty(s)&&r[s]!=null&&o.push({[s]:r[s]}),o),[])}static removeNullUndefinedKeys(r){return Object.keys(r).reduce((i,o)=>(r[o]!==null&&r[o]!==void 0&&(i[o]=r[o]),i),{})}static stringify(r){return JSON.stringify(r,function(i,o){return o===void 0?null:o})}};t.JSUtils=n,n.ISO_WITHOUT_MS_REGEX=new RegExp(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)/)}),R0=_n((t,e)=>{"use strict";(function(n){if(typeof t=="object"&&typeof e<"u")e.exports=n();else if(typeof define=="function"&&define.amd)define([],n);else{var r;typeof window<"u"?r=window:typeof global<"u"?r=global:typeof self<"u"?r=self:r=this,r.localforage=n()}})(function(){var n,r,i;return function o(s,a,l){function u(_,y){if(!a[_]){if(!s[_]){var x=typeof Po=="function"&&Po;if(!y&&x)return x(_,!0);if(f)return f(_,!0);var I=new Error("Cannot find module '"+_+"'");throw I.code="MODULE_NOT_FOUND",I}var V=a[_]={exports:{}};s[_][0].call(V.exports,function(L){var Z=s[_][1][L];return u(Z||L)},V,V.exports,o,s,a,l)}return a[_].exports}for(var f=typeof Po=="function"&&Po,d=0;d<l.length;d++)u(l[d]);return u}({1:[function(o,s,a){(function(l){"use strict";var u=l.MutationObserver||l.WebKitMutationObserver,f;if(u){var d=0,_=new u(L),y=l.document.createTextNode("");_.observe(y,{characterData:!0}),f=function(){y.data=d=++d%2}}else if(!l.setImmediate&&typeof l.MessageChannel<"u"){var x=new l.MessageChannel;x.port1.onmessage=L,f=function(){x.port2.postMessage(0)}}else"document"in l&&"onreadystatechange"in l.document.createElement("script")?f=function(){var W=l.document.createElement("script");W.onreadystatechange=function(){L(),W.onreadystatechange=null,W.parentNode.removeChild(W),W=null},l.document.documentElement.appendChild(W)}:f=function(){setTimeout(L,0)};var I,V=[];function L(){I=!0;for(var W,B,lt=V.length;lt;){for(B=V,V=[],W=-1;++W<lt;)B[W]();lt=V.length}I=!1}s.exports=Z;function Z(W){V.push(W)===1&&!I&&f()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(o,s,a){"use strict";var l=o(1);function u(){}var f={},d=["REJECTED"],_=["FULFILLED"],y=["PENDING"];s.exports=x;function x($){if(typeof $!="function")throw new TypeError("resolver must be a function");this.state=y,this.queue=[],this.outcome=void 0,$!==u&&Z(this,$)}x.prototype.catch=function($){return this.then(null,$)},x.prototype.then=function($,_t){if(typeof $!="function"&&this.state===_||typeof _t!="function"&&this.state===d)return this;var ht=new this.constructor(u);if(this.state!==y){var bt=this.state===_?$:_t;V(ht,bt,this.outcome)}else this.queue.push(new I(ht,$,_t));return ht};function I($,_t,ht){this.promise=$,typeof _t=="function"&&(this.onFulfilled=_t,this.callFulfilled=this.otherCallFulfilled),typeof ht=="function"&&(this.onRejected=ht,this.callRejected=this.otherCallRejected)}I.prototype.callFulfilled=function($){f.resolve(this.promise,$)},I.prototype.otherCallFulfilled=function($){V(this.promise,this.onFulfilled,$)},I.prototype.callRejected=function($){f.reject(this.promise,$)},I.prototype.otherCallRejected=function($){V(this.promise,this.onRejected,$)};function V($,_t,ht){l(function(){var bt;try{bt=_t(ht)}catch(kt){return f.reject($,kt)}bt===$?f.reject($,new TypeError("Cannot resolve promise with itself")):f.resolve($,bt)})}f.resolve=function($,_t){var ht=W(L,_t);if(ht.status==="error")return f.reject($,ht.value);var bt=ht.value;if(bt)Z($,bt);else{$.state=_,$.outcome=_t;for(var kt=-1,$t=$.queue.length;++kt<$t;)$.queue[kt].callFulfilled(_t)}return $},f.reject=function($,_t){$.state=d,$.outcome=_t;for(var ht=-1,bt=$.queue.length;++ht<bt;)$.queue[ht].callRejected(_t);return $};function L($){var _t=$&&$.then;if($&&(typeof $=="object"||typeof $=="function")&&typeof _t=="function")return function(){_t.apply($,arguments)}}function Z($,_t){var ht=!1;function bt(Yt){ht||(ht=!0,f.reject($,Yt))}function kt(Yt){ht||(ht=!0,f.resolve($,Yt))}function $t(){_t(kt,bt)}var m=W($t);m.status==="error"&&bt(m.value)}function W($,_t){var ht={};try{ht.value=$(_t),ht.status="success"}catch(bt){ht.status="error",ht.value=bt}return ht}x.resolve=B;function B($){return $ instanceof this?$:f.resolve(new this(u),$)}x.reject=lt;function lt($){var _t=new this(u);return f.reject(_t,$)}x.all=Ht;function Ht($){var _t=this;if(Object.prototype.toString.call($)!=="[object Array]")return this.reject(new TypeError("must be an array"));var ht=$.length,bt=!1;if(!ht)return this.resolve([]);for(var kt=new Array(ht),$t=0,m=-1,Yt=new this(u);++m<ht;)re($[m],m);return Yt;function re(Dt,R){_t.resolve(Dt).then(D,function(b){bt||(bt=!0,f.reject(Yt,b))});function D(b){kt[R]=b,++$t===ht&&!bt&&(bt=!0,f.resolve(Yt,kt))}}}x.race=At;function At($){var _t=this;if(Object.prototype.toString.call($)!=="[object Array]")return this.reject(new TypeError("must be an array"));var ht=$.length,bt=!1;if(!ht)return this.resolve([]);for(var kt=-1,$t=new this(u);++kt<ht;)m($[kt]);return $t;function m(Yt){_t.resolve(Yt).then(function(re){bt||(bt=!0,f.resolve($t,re))},function(re){bt||(bt=!0,f.reject($t,re))})}}},{1:1}],3:[function(o,s,a){(function(l){"use strict";typeof l.Promise!="function"&&(l.Promise=o(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(o,s,a){"use strict";var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g};function u(g,w){if(!(g instanceof w))throw new TypeError("Cannot call a class as a function")}function f(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var d=f();function _(){try{if(!d||!d.open)return!1;var g=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),w=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!g||w)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function y(g,w){g=g||[],w=w||{};try{return new Blob(g,w)}catch(O){if(O.name!=="TypeError")throw O;for(var E=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,T=new E,C=0;C<g.length;C+=1)T.append(g[C]);return T.getBlob(w.type)}}typeof Promise>"u"&&o(3);var x=Promise;function I(g,w){w&&g.then(function(E){w(null,E)},function(E){w(E)})}function V(g,w,E){typeof w=="function"&&g.then(w),typeof E=="function"&&g.catch(E)}function L(g){return typeof g!="string"&&(console.warn(g+" used as a key, but it is not a string."),g=String(g)),g}function Z(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var W="local-forage-detect-blob-support",B=void 0,lt={},Ht=Object.prototype.toString,At="readonly",$="readwrite";function _t(g){for(var w=g.length,E=new ArrayBuffer(w),T=new Uint8Array(E),C=0;C<w;C++)T[C]=g.charCodeAt(C);return E}function ht(g){return new x(function(w){var E=g.transaction(W,$),T=y([""]);E.objectStore(W).put(T,"key"),E.onabort=function(C){C.preventDefault(),C.stopPropagation(),w(!1)},E.oncomplete=function(){var C=navigator.userAgent.match(/Chrome\/(\d+)/),O=navigator.userAgent.match(/Edge\//);w(O||!C||parseInt(C[1],10)>=43)}}).catch(function(){return!1})}function bt(g){return typeof B=="boolean"?x.resolve(B):ht(g).then(function(w){return B=w,B})}function kt(g){var w=lt[g.name],E={};E.promise=new x(function(T,C){E.resolve=T,E.reject=C}),w.deferredOperations.push(E),w.dbReady?w.dbReady=w.dbReady.then(function(){return E.promise}):w.dbReady=E.promise}function $t(g){var w=lt[g.name],E=w.deferredOperations.pop();if(E)return E.resolve(),E.promise}function m(g,w){var E=lt[g.name],T=E.deferredOperations.pop();if(T)return T.reject(w),T.promise}function Yt(g,w){return new x(function(E,T){if(lt[g.name]=lt[g.name]||nt(),g.db)if(w)kt(g),g.db.close();else return E(g.db);var C=[g.name];w&&C.push(g.version);var O=d.open.apply(d,C);w&&(O.onupgradeneeded=function(A){var F=O.result;try{F.createObjectStore(g.storeName),A.oldVersion<=1&&F.createObjectStore(W)}catch(q){if(q.name==="ConstraintError")console.warn('The database "'+g.name+'" has been upgraded from version '+A.oldVersion+" to version "+A.newVersion+', but the storage "'+g.storeName+'" already exists.');else throw q}}),O.onerror=function(A){A.preventDefault(),T(O.error)},O.onsuccess=function(){var A=O.result;A.onversionchange=function(F){F.target.close()},E(A),$t(g)}})}function re(g){return Yt(g,!1)}function Dt(g){return Yt(g,!0)}function R(g,w){if(!g.db)return!0;var E=!g.db.objectStoreNames.contains(g.storeName),T=g.version<g.db.version,C=g.version>g.db.version;if(T&&(g.version!==w&&console.warn('The database "'+g.name+`" can't be downgraded from version `+g.db.version+" to version "+g.version+"."),g.version=g.db.version),C||E){if(E){var O=g.db.version+1;O>g.version&&(g.version=O)}return!0}return!1}function D(g){return new x(function(w,E){var T=new FileReader;T.onerror=E,T.onloadend=function(C){var O=btoa(C.target.result||"");w({__local_forage_encoded_blob:!0,data:O,type:g.type})},T.readAsBinaryString(g)})}function b(g){var w=_t(atob(g.data));return y([w],{type:g.type})}function v(g){return g&&g.__local_forage_encoded_blob}function k(g){var w=this,E=w._initReady().then(function(){var T=lt[w._dbInfo.name];if(T&&T.dbReady)return T.dbReady});return V(E,g,g),E}function U(g){kt(g);for(var w=lt[g.name],E=w.forages,T=0;T<E.length;T++){var C=E[T];C._dbInfo.db&&(C._dbInfo.db.close(),C._dbInfo.db=null)}return g.db=null,re(g).then(function(O){return g.db=O,R(g)?Dt(g):O}).then(function(O){g.db=w.db=O;for(var A=0;A<E.length;A++)E[A]._dbInfo.db=O}).catch(function(O){throw m(g,O),O})}function G(g,w,E,T){T===void 0&&(T=1);try{var C=g.db.transaction(g.storeName,w);E(null,C)}catch(O){if(T>0&&(!g.db||O.name==="InvalidStateError"||O.name==="NotFoundError"))return x.resolve().then(function(){if(!g.db||O.name==="NotFoundError"&&!g.db.objectStoreNames.contains(g.storeName)&&g.version<=g.db.version)return g.db&&(g.version=g.db.version+1),Dt(g)}).then(function(){return U(g).then(function(){G(g,w,E,T-1)})}).catch(E);E(O)}}function nt(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function et(g){var w=this,E={db:null};if(g)for(var T in g)E[T]=g[T];var C=lt[E.name];C||(C=nt(),lt[E.name]=C),C.forages.push(w),w._initReady||(w._initReady=w.ready,w.ready=k);var O=[];function A(){return x.resolve()}for(var F=0;F<C.forages.length;F++){var q=C.forages[F];q!==w&&O.push(q._initReady().catch(A))}var z=C.forages.slice(0);return x.all(O).then(function(){return E.db=C.db,re(E)}).then(function(H){return E.db=H,R(E,w._defaultConfig.version)?Dt(E):H}).then(function(H){E.db=C.db=H,w._dbInfo=E;for(var at=0;at<z.length;at++){var It=z[at];It!==w&&(It._dbInfo.db=E.db,It._dbInfo.version=E.version)}})}function K(g,w){var E=this;g=L(g);var T=new x(function(C,O){E.ready().then(function(){G(E._dbInfo,At,function(A,F){if(A)return O(A);try{var q=F.objectStore(E._dbInfo.storeName),z=q.get(g);z.onsuccess=function(){var H=z.result;H===void 0&&(H=null),v(H)&&(H=b(H)),C(H)},z.onerror=function(){O(z.error)}}catch(H){O(H)}})}).catch(O)});return I(T,w),T}function ct(g,w){var E=this,T=new x(function(C,O){E.ready().then(function(){G(E._dbInfo,At,function(A,F){if(A)return O(A);try{var q=F.objectStore(E._dbInfo.storeName),z=q.openCursor(),H=1;z.onsuccess=function(){var at=z.result;if(at){var It=at.value;v(It)&&(It=b(It));var qt=g(It,at.key,H++);qt!==void 0?C(qt):at.continue()}else C()},z.onerror=function(){O(z.error)}}catch(at){O(at)}})}).catch(O)});return I(T,w),T}function ft(g,w,E){var T=this;g=L(g);var C=new x(function(O,A){var F;T.ready().then(function(){return F=T._dbInfo,Ht.call(w)==="[object Blob]"?bt(F.db).then(function(q){return q?w:D(w)}):w}).then(function(q){G(T._dbInfo,$,function(z,H){if(z)return A(z);try{var at=H.objectStore(T._dbInfo.storeName);q===null&&(q=void 0);var It=at.put(q,g);H.oncomplete=function(){q===void 0&&(q=null),O(q)},H.onabort=H.onerror=function(){var qt=It.error?It.error:It.transaction.error;A(qt)}}catch(qt){A(qt)}})}).catch(A)});return I(C,E),C}function Et(g,w){var E=this;g=L(g);var T=new x(function(C,O){E.ready().then(function(){G(E._dbInfo,$,function(A,F){if(A)return O(A);try{var q=F.objectStore(E._dbInfo.storeName),z=q.delete(g);F.oncomplete=function(){C()},F.onerror=function(){O(z.error)},F.onabort=function(){var H=z.error?z.error:z.transaction.error;O(H)}}catch(H){O(H)}})}).catch(O)});return I(T,w),T}function X(g){var w=this,E=new x(function(T,C){w.ready().then(function(){G(w._dbInfo,$,function(O,A){if(O)return C(O);try{var F=A.objectStore(w._dbInfo.storeName),q=F.clear();A.oncomplete=function(){T()},A.onabort=A.onerror=function(){var z=q.error?q.error:q.transaction.error;C(z)}}catch(z){C(z)}})}).catch(C)});return I(E,g),E}function ot(g){var w=this,E=new x(function(T,C){w.ready().then(function(){G(w._dbInfo,At,function(O,A){if(O)return C(O);try{var F=A.objectStore(w._dbInfo.storeName),q=F.count();q.onsuccess=function(){T(q.result)},q.onerror=function(){C(q.error)}}catch(z){C(z)}})}).catch(C)});return I(E,g),E}function gt(g,w){var E=this,T=new x(function(C,O){if(g<0){C(null);return}E.ready().then(function(){G(E._dbInfo,At,function(A,F){if(A)return O(A);try{var q=F.objectStore(E._dbInfo.storeName),z=!1,H=q.openKeyCursor();H.onsuccess=function(){var at=H.result;if(!at){C(null);return}g===0||z?C(at.key):(z=!0,at.advance(g))},H.onerror=function(){O(H.error)}}catch(at){O(at)}})}).catch(O)});return I(T,w),T}function ut(g){var w=this,E=new x(function(T,C){w.ready().then(function(){G(w._dbInfo,At,function(O,A){if(O)return C(O);try{var F=A.objectStore(w._dbInfo.storeName),q=F.openKeyCursor(),z=[];q.onsuccess=function(){var H=q.result;if(!H){T(z);return}z.push(H.key),H.continue()},q.onerror=function(){C(q.error)}}catch(H){C(H)}})}).catch(C)});return I(E,g),E}function c(g,w){w=Z.apply(this,arguments);var E=this.config();g=typeof g!="function"&&g||{},g.name||(g.name=g.name||E.name,g.storeName=g.storeName||E.storeName);var T=this,C;if(!g.name)C=x.reject("Invalid arguments");else{var O=g.name===E.name&&T._dbInfo.db,A=O?x.resolve(T._dbInfo.db):re(g).then(function(F){var q=lt[g.name],z=q.forages;q.db=F;for(var H=0;H<z.length;H++)z[H]._dbInfo.db=F;return F});g.storeName?C=A.then(function(F){if(F.objectStoreNames.contains(g.storeName)){var q=F.version+1;kt(g);var z=lt[g.name],H=z.forages;F.close();for(var at=0;at<H.length;at++){var It=H[at];It._dbInfo.db=null,It._dbInfo.version=q}var qt=new x(function(Ut,fe){var Qt=d.open(g.name,q);Qt.onerror=function(We){var $a=Qt.result;$a.close(),fe(We)},Qt.onupgradeneeded=function(){var We=Qt.result;We.deleteObjectStore(g.storeName)},Qt.onsuccess=function(){var We=Qt.result;We.close(),Ut(We)}});return qt.then(function(Ut){z.db=Ut;for(var fe=0;fe<H.length;fe++){var Qt=H[fe];Qt._dbInfo.db=Ut,$t(Qt._dbInfo)}}).catch(function(Ut){throw(m(g,Ut)||x.resolve()).catch(function(){}),Ut})}}):C=A.then(function(F){kt(g);var q=lt[g.name],z=q.forages;F.close();for(var H=0;H<z.length;H++){var at=z[H];at._dbInfo.db=null}var It=new x(function(qt,Ut){var fe=d.deleteDatabase(g.name);fe.onerror=function(){var Qt=fe.result;Qt&&Qt.close(),Ut(fe.error)},fe.onblocked=function(){console.warn('dropInstance blocked for database "'+g.name+'" until all open connections are closed')},fe.onsuccess=function(){var Qt=fe.result;Qt&&Qt.close(),qt(Qt)}});return It.then(function(qt){q.db=qt;for(var Ut=0;Ut<z.length;Ut++){var fe=z[Ut];$t(fe._dbInfo)}}).catch(function(qt){throw(m(g,qt)||x.resolve()).catch(function(){}),qt})})}return I(C,w),C}var h={_driver:"asyncStorage",_initStorage:et,_support:_(),iterate:ct,getItem:K,setItem:ft,removeItem:Et,clear:X,length:ot,key:gt,keys:ut,dropInstance:c};function p(){return typeof openDatabase=="function"}var S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N="~~local_forage_type~",M=/^~~local_forage_type~([^~]+)~/,J="__lfsc__:",rt=J.length,Lt="arbf",Ct="blob",Mt="si08",Rt="ui08",ye="uic8",Rn="si16",le="si32",on="ur16",wn="ui32",Zn="fl32",Me="fl64",sn=rt+Lt.length,jh=Object.prototype.toString;function Fh(g){var w=g.length*.75,E=g.length,T,C=0,O,A,F,q;g[g.length-1]==="="&&(w--,g[g.length-2]==="="&&w--);var z=new ArrayBuffer(w),H=new Uint8Array(z);for(T=0;T<E;T+=4)O=S.indexOf(g[T]),A=S.indexOf(g[T+1]),F=S.indexOf(g[T+2]),q=S.indexOf(g[T+3]),H[C++]=O<<2|A>>4,H[C++]=(A&15)<<4|F>>2,H[C++]=(F&3)<<6|q&63;return z}function Fa(g){var w=new Uint8Array(g),E="",T;for(T=0;T<w.length;T+=3)E+=S[w[T]>>2],E+=S[(w[T]&3)<<4|w[T+1]>>4],E+=S[(w[T+1]&15)<<2|w[T+2]>>6],E+=S[w[T+2]&63];return w.length%3===2?E=E.substring(0,E.length-1)+"=":w.length%3===1&&(E=E.substring(0,E.length-2)+"=="),E}function Vy(g,w){var E="";if(g&&(E=jh.call(g)),g&&(E==="[object ArrayBuffer]"||g.buffer&&jh.call(g.buffer)==="[object ArrayBuffer]")){var T,C=J;g instanceof ArrayBuffer?(T=g,C+=Lt):(T=g.buffer,E==="[object Int8Array]"?C+=Mt:E==="[object Uint8Array]"?C+=Rt:E==="[object Uint8ClampedArray]"?C+=ye:E==="[object Int16Array]"?C+=Rn:E==="[object Uint16Array]"?C+=on:E==="[object Int32Array]"?C+=le:E==="[object Uint32Array]"?C+=wn:E==="[object Float32Array]"?C+=Zn:E==="[object Float64Array]"?C+=Me:w(new Error("Failed to get type for BinaryArray"))),w(C+Fa(T))}else if(E==="[object Blob]"){var O=new FileReader;O.onload=function(){var A=N+g.type+"~"+Fa(this.result);w(J+Ct+A)},O.readAsArrayBuffer(g)}else try{w(JSON.stringify(g))}catch(A){console.error("Couldn't convert value into a JSON string: ",g),w(null,A)}}function jy(g){if(g.substring(0,rt)!==J)return JSON.parse(g);var w=g.substring(sn),E=g.substring(rt,sn),T;if(E===Ct&&M.test(w)){var C=w.match(M);T=C[1],w=w.substring(C[0].length)}var O=Fh(w);switch(E){case Lt:return O;case Ct:return y([O],{type:T});case Mt:return new Int8Array(O);case Rt:return new Uint8Array(O);case ye:return new Uint8ClampedArray(O);case Rn:return new Int16Array(O);case on:return new Uint16Array(O);case le:return new Int32Array(O);case wn:return new Uint32Array(O);case Zn:return new Float32Array(O);case Me:return new Float64Array(O);default:throw new Error("Unkown type: "+E)}}var Ba={serialize:Vy,deserialize:jy,stringToBuffer:Fh,bufferToString:Fa};function Bh(g,w,E,T){g.executeSql("CREATE TABLE IF NOT EXISTS "+w.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],E,T)}function Fy(g){var w=this,E={db:null};if(g)for(var T in g)E[T]=typeof g[T]!="string"?g[T].toString():g[T];var C=new x(function(O,A){try{E.db=openDatabase(E.name,String(E.version),E.description,E.size)}catch(F){return A(F)}E.db.transaction(function(F){Bh(F,E,function(){w._dbInfo=E,O()},function(q,z){A(z)})},A)});return E.serializer=Ba,C}function Yn(g,w,E,T,C,O){g.executeSql(E,T,C,function(A,F){F.code===F.SYNTAX_ERR?A.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[w.storeName],function(q,z){z.rows.length?O(q,F):Bh(q,w,function(){q.executeSql(E,T,C,O)},O)},O):O(A,F)},O)}function By(g,w){var E=this;g=L(g);var T=new x(function(C,O){E.ready().then(function(){var A=E._dbInfo;A.db.transaction(function(F){Yn(F,A,"SELECT * FROM "+A.storeName+" WHERE key = ? LIMIT 1",[g],function(q,z){var H=z.rows.length?z.rows.item(0).value:null;H&&(H=A.serializer.deserialize(H)),C(H)},function(q,z){O(z)})})}).catch(O)});return I(T,w),T}function Uy(g,w){var E=this,T=new x(function(C,O){E.ready().then(function(){var A=E._dbInfo;A.db.transaction(function(F){Yn(F,A,"SELECT * FROM "+A.storeName,[],function(q,z){for(var H=z.rows,at=H.length,It=0;It<at;It++){var qt=H.item(It),Ut=qt.value;if(Ut&&(Ut=A.serializer.deserialize(Ut)),Ut=g(Ut,qt.key,It+1),Ut!==void 0){C(Ut);return}}C()},function(q,z){O(z)})})}).catch(O)});return I(T,w),T}function Uh(g,w,E,T){var C=this;g=L(g);var O=new x(function(A,F){C.ready().then(function(){w===void 0&&(w=null);var q=w,z=C._dbInfo;z.serializer.serialize(w,function(H,at){at?F(at):z.db.transaction(function(It){Yn(It,z,"INSERT OR REPLACE INTO "+z.storeName+" (key, value) VALUES (?, ?)",[g,H],function(){A(q)},function(qt,Ut){F(Ut)})},function(It){if(It.code===It.QUOTA_ERR){if(T>0){A(Uh.apply(C,[g,q,E,T-1]));return}F(It)}})})}).catch(F)});return I(O,E),O}function Hy(g,w,E){return Uh.apply(this,[g,w,E,1])}function $y(g,w){var E=this;g=L(g);var T=new x(function(C,O){E.ready().then(function(){var A=E._dbInfo;A.db.transaction(function(F){Yn(F,A,"DELETE FROM "+A.storeName+" WHERE key = ?",[g],function(){C()},function(q,z){O(z)})})}).catch(O)});return I(T,w),T}function zy(g){var w=this,E=new x(function(T,C){w.ready().then(function(){var O=w._dbInfo;O.db.transaction(function(A){Yn(A,O,"DELETE FROM "+O.storeName,[],function(){T()},function(F,q){C(q)})})}).catch(C)});return I(E,g),E}function qy(g){var w=this,E=new x(function(T,C){w.ready().then(function(){var O=w._dbInfo;O.db.transaction(function(A){Yn(A,O,"SELECT COUNT(key) as c FROM "+O.storeName,[],function(F,q){var z=q.rows.item(0).c;T(z)},function(F,q){C(q)})})}).catch(C)});return I(E,g),E}function Gy(g,w){var E=this,T=new x(function(C,O){E.ready().then(function(){var A=E._dbInfo;A.db.transaction(function(F){Yn(F,A,"SELECT key FROM "+A.storeName+" WHERE id = ? LIMIT 1",[g+1],function(q,z){var H=z.rows.length?z.rows.item(0).key:null;C(H)},function(q,z){O(z)})})}).catch(O)});return I(T,w),T}function Wy(g){var w=this,E=new x(function(T,C){w.ready().then(function(){var O=w._dbInfo;O.db.transaction(function(A){Yn(A,O,"SELECT key FROM "+O.storeName,[],function(F,q){for(var z=[],H=0;H<q.rows.length;H++)z.push(q.rows.item(H).key);T(z)},function(F,q){C(q)})})}).catch(C)});return I(E,g),E}function Zy(g){return new x(function(w,E){g.transaction(function(T){T.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(C,O){for(var A=[],F=0;F<O.rows.length;F++)A.push(O.rows.item(F).name);w({db:g,storeNames:A})},function(C,O){E(O)})},function(T){E(T)})})}function Yy(g,w){w=Z.apply(this,arguments);var E=this.config();g=typeof g!="function"&&g||{},g.name||(g.name=g.name||E.name,g.storeName=g.storeName||E.storeName);var T=this,C;return g.name?C=new x(function(O){var A;g.name===E.name?A=T._dbInfo.db:A=openDatabase(g.name,"","",0),g.storeName?O({db:A,storeNames:[g.storeName]}):O(Zy(A))}).then(function(O){return new x(function(A,F){O.db.transaction(function(q){function z(qt){return new x(function(Ut,fe){q.executeSql("DROP TABLE IF EXISTS "+qt,[],function(){Ut()},function(Qt,We){fe(We)})})}for(var H=[],at=0,It=O.storeNames.length;at<It;at++)H.push(z(O.storeNames[at]));x.all(H).then(function(){A()}).catch(function(qt){F(qt)})},function(q){F(q)})})}):C=x.reject("Invalid arguments"),I(C,w),C}var Ky={_driver:"webSQLStorage",_initStorage:Fy,_support:p(),iterate:Uy,getItem:By,setItem:Hy,removeItem:$y,clear:zy,length:qy,key:Gy,keys:Wy,dropInstance:Yy};function Xy(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function Hh(g,w){var E=g.name+"/";return g.storeName!==w.storeName&&(E+=g.storeName+"/"),E}function Jy(){var g="_localforage_support_test";try{return localStorage.setItem(g,!0),localStorage.removeItem(g),!1}catch{return!0}}function Qy(){return!Jy()||localStorage.length>0}function t0(g){var w=this,E={};if(g)for(var T in g)E[T]=g[T];return E.keyPrefix=Hh(g,w._defaultConfig),Qy()?(w._dbInfo=E,E.serializer=Ba,x.resolve()):x.reject()}function e0(g){var w=this,E=w.ready().then(function(){for(var T=w._dbInfo.keyPrefix,C=localStorage.length-1;C>=0;C--){var O=localStorage.key(C);O.indexOf(T)===0&&localStorage.removeItem(O)}});return I(E,g),E}function n0(g,w){var E=this;g=L(g);var T=E.ready().then(function(){var C=E._dbInfo,O=localStorage.getItem(C.keyPrefix+g);return O&&(O=C.serializer.deserialize(O)),O});return I(T,w),T}function r0(g,w){var E=this,T=E.ready().then(function(){for(var C=E._dbInfo,O=C.keyPrefix,A=O.length,F=localStorage.length,q=1,z=0;z<F;z++){var H=localStorage.key(z);if(H.indexOf(O)===0){var at=localStorage.getItem(H);if(at&&(at=C.serializer.deserialize(at)),at=g(at,H.substring(A),q++),at!==void 0)return at}}});return I(T,w),T}function i0(g,w){var E=this,T=E.ready().then(function(){var C=E._dbInfo,O;try{O=localStorage.key(g)}catch{O=null}return O&&(O=O.substring(C.keyPrefix.length)),O});return I(T,w),T}function o0(g){var w=this,E=w.ready().then(function(){for(var T=w._dbInfo,C=localStorage.length,O=[],A=0;A<C;A++){var F=localStorage.key(A);F.indexOf(T.keyPrefix)===0&&O.push(F.substring(T.keyPrefix.length))}return O});return I(E,g),E}function s0(g){var w=this,E=w.keys().then(function(T){return T.length});return I(E,g),E}function a0(g,w){var E=this;g=L(g);var T=E.ready().then(function(){var C=E._dbInfo;localStorage.removeItem(C.keyPrefix+g)});return I(T,w),T}function l0(g,w,E){var T=this;g=L(g);var C=T.ready().then(function(){w===void 0&&(w=null);var O=w;return new x(function(A,F){var q=T._dbInfo;q.serializer.serialize(w,function(z,H){if(H)F(H);else try{localStorage.setItem(q.keyPrefix+g,z),A(O)}catch(at){(at.name==="QuotaExceededError"||at.name==="NS_ERROR_DOM_QUOTA_REACHED")&&F(at),F(at)}})})});return I(C,E),C}function c0(g,w){if(w=Z.apply(this,arguments),g=typeof g!="function"&&g||{},!g.name){var E=this.config();g.name=g.name||E.name,g.storeName=g.storeName||E.storeName}var T=this,C;return g.name?C=new x(function(O){g.storeName?O(Hh(g,T._defaultConfig)):O(g.name+"/")}).then(function(O){for(var A=localStorage.length-1;A>=0;A--){var F=localStorage.key(A);F.indexOf(O)===0&&localStorage.removeItem(F)}}):C=x.reject("Invalid arguments"),I(C,w),C}var u0={_driver:"localStorageWrapper",_initStorage:t0,_support:Xy(),iterate:r0,getItem:n0,setItem:l0,removeItem:a0,clear:e0,length:s0,key:i0,keys:o0,dropInstance:c0},h0=function(g,w){return g===w||typeof g=="number"&&typeof w=="number"&&isNaN(g)&&isNaN(w)},f0=function(g,w){for(var E=g.length,T=0;T<E;){if(h0(g[T],w))return!0;T++}return!1},$h=Array.isArray||function(g){return Object.prototype.toString.call(g)==="[object Array]"},Ti={},zh={},zr={INDEXEDDB:h,WEBSQL:Ky,LOCALSTORAGE:u0},d0=[zr.INDEXEDDB._driver,zr.WEBSQL._driver,zr.LOCALSTORAGE._driver],No=["dropInstance"],Ua=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(No),p0={description:"",driver:d0.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function g0(g,w){g[w]=function(){var E=arguments;return g.ready().then(function(){return g[w].apply(g,E)})}}function Ha(){for(var g=1;g<arguments.length;g++){var w=arguments[g];if(w)for(var E in w)w.hasOwnProperty(E)&&($h(w[E])?arguments[0][E]=w[E].slice():arguments[0][E]=w[E])}return arguments[0]}var m0=function(){function g(w){u(this,g);for(var E in zr)if(zr.hasOwnProperty(E)){var T=zr[E],C=T._driver;this[E]=C,Ti[C]||this.defineDriver(T)}this._defaultConfig=Ha({},p0),this._config=Ha({},this._defaultConfig,w),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return g.prototype.config=function(w){if((typeof w>"u"?"undefined":l(w))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var E in w){if(E==="storeName"&&(w[E]=w[E].replace(/\W/g,"_")),E==="version"&&typeof w[E]!="number")return new Error("Database version must be a number.");this._config[E]=w[E]}return"driver"in w&&w.driver?this.setDriver(this._config.driver):!0}else return typeof w=="string"?this._config[w]:this._config},g.prototype.defineDriver=function(w,E,T){var C=new x(function(O,A){try{var F=w._driver,q=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!w._driver){A(q);return}for(var z=Ua.concat("_initStorage"),H=0,at=z.length;H<at;H++){var It=z[H],qt=!f0(No,It);if((qt||w[It])&&typeof w[It]!="function"){A(q);return}}var Ut=function(){for(var Qt=function(v0){return function(){var y0=new Error("Method "+v0+" is not implemented by the current driver"),qh=x.reject(y0);return I(qh,arguments[arguments.length-1]),qh}},We=0,$a=No.length;We<$a;We++){var za=No[We];w[za]||(w[za]=Qt(za))}};Ut();var fe=function(Qt){Ti[F]&&console.info("Redefining LocalForage driver: "+F),Ti[F]=w,zh[F]=Qt,O()};"_support"in w?w._support&&typeof w._support=="function"?w._support().then(fe,A):fe(!!w._support):fe(!0)}catch(Qt){A(Qt)}});return V(C,E,T),C},g.prototype.driver=function(){return this._driver||null},g.prototype.getDriver=function(w,E,T){var C=Ti[w]?x.resolve(Ti[w]):x.reject(new Error("Driver not found."));return V(C,E,T),C},g.prototype.getSerializer=function(w){var E=x.resolve(Ba);return V(E,w),E},g.prototype.ready=function(w){var E=this,T=E._driverSet.then(function(){return E._ready===null&&(E._ready=E._initDriver()),E._ready});return V(T,w,w),T},g.prototype.setDriver=function(w,E,T){var C=this;$h(w)||(w=[w]);var O=this._getSupportedDrivers(w);function A(){C._config.driver=C.driver()}function F(H){return C._extend(H),A(),C._ready=C._initStorage(C._config),C._ready}function q(H){return function(){var at=0;function It(){for(;at<H.length;){var qt=H[at];return at++,C._dbInfo=null,C._ready=null,C.getDriver(qt).then(F).catch(It)}A();var Ut=new Error("No available storage method found.");return C._driverSet=x.reject(Ut),C._driverSet}return It()}}var z=this._driverSet!==null?this._driverSet.catch(function(){return x.resolve()}):x.resolve();return this._driverSet=z.then(function(){var H=O[0];return C._dbInfo=null,C._ready=null,C.getDriver(H).then(function(at){C._driver=at._driver,A(),C._wrapLibraryMethodsWithReady(),C._initDriver=q(O)})}).catch(function(){A();var H=new Error("No available storage method found.");return C._driverSet=x.reject(H),C._driverSet}),V(this._driverSet,E,T),this._driverSet},g.prototype.supports=function(w){return!!zh[w]},g.prototype._extend=function(w){Ha(this,w)},g.prototype._getSupportedDrivers=function(w){for(var E=[],T=0,C=w.length;T<C;T++){var O=w[T];this.supports(O)&&E.push(O)}return E},g.prototype._wrapLibraryMethodsWithReady=function(){for(var w=0,E=Ua.length;w<E;w++)g0(this,Ua[w])},g.prototype.createInstance=function(w){return new g(w)},g}(),_0=new m0;s.exports=_0},{3:3}]},{},[4])(4)})}),N0=_n(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MustacheUtils=void 0;var e=class Lp{static escapeHtml(r){return String(r).replace(/"/g,i=>Lp.entityMap[i])}};t.MustacheUtils=e,e.entityMap={'"':"&quot;"}}),P0=_n(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StorageDestination=t.AssetType=void 0;var e=function(r){return r[r.IMAGE=1]="IMAGE",r[r.VIDEO=2]="VIDEO",r[r.GIF=3]="GIF",r[r.SCREENSHOT=4]="SCREENSHOT",r[r.THREE_D=5]="THREE_D",r[r.FONT=6]="FONT",r[r.TEXT=7]="TEXT",r[r.JSON=8]="JSON",r[r.SVG=9]="SVG",r[r.HTML=10]="HTML",r[r.LOGO=11]="LOGO",r[r.OTHERS=1e3]="OTHERS",r}(e||(t.AssetType=e={})),n=function(r){return r.AWS_S3="AWS_S3",r.SHOPIFY_FILES="SHOPIFY_FILES",r}(n||(t.StorageDestination=n={}))}),k0=_n(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateStatus=void 0;var e=function(n){return n[n.DRAFT=1]="DRAFT",n[n.PUBLISHED=2]="PUBLISHED",n[n.DISABLED=3]="DISABLED",n}(e||(t.TemplateStatus=e={}))}),A0=_n(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionType=void 0;var e=function(n){return n.VIEW_ITEM="VIEW_ITEM",n.ADD_TO_CART="ADD_TO_CART",n.VIEW_CATEGORY="VIEW_CATEGORY",n.VIEW_TAG="VIEW_TAG",n.SEARCH="SEARCH",n.APPLY_COUPON="APPLY_COUPON",n}(e||(t.ActionType=e={}))}),L0=_n(t=>{"use strict";var e=t&&t.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=t&&t.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,r,o)};Object.defineProperty(t,"__esModule",{value:!0}),n(P0(),t),n(k0(),t),n(uo(),t),n(A0(),t)}),M0=_n((t,e)=>{"use strict";(function(n,r){typeof t=="object"&&typeof e<"u"?e.exports=r():typeof define=="function"&&define.amd?define(r):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=r())})(t,function(){"use strict";var n=function(o,s){if(s=s||{},typeof o!="function")throw new i("fetch must be a function");if(typeof s!="object")throw new i("defaults must be an object");if(s.retries!==void 0&&!r(s.retries))throw new i("retries must be a positive integer");if(s.retryDelay!==void 0&&!r(s.retryDelay)&&typeof s.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(s.retryOn!==void 0&&!Array.isArray(s.retryOn)&&typeof s.retryOn!="function")throw new i("retryOn property expects an array or function");var a={retries:3,retryDelay:1e3,retryOn:[]};return s=Object.assign(a,s),function(l,u){var f=s.retries,d=s.retryDelay,_=s.retryOn;if(u&&u.retries!==void 0)if(r(u.retries))f=u.retries;else throw new i("retries must be a positive integer");if(u&&u.retryDelay!==void 0)if(r(u.retryDelay)||typeof u.retryDelay=="function")d=u.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(u&&u.retryOn)if(Array.isArray(u.retryOn)||typeof u.retryOn=="function")_=u.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(y,x){var I=function(L){var Z=typeof Request<"u"&&l instanceof Request?l.clone():l;o(Z,u).then(function(W){if(Array.isArray(_)&&_.indexOf(W.status)===-1)y(W);else if(typeof _=="function")try{return Promise.resolve(_(L,null,W)).then(function(B){B?V(L,null,W):y(W)}).catch(x)}catch(B){x(B)}else L<f?V(L,null,W):y(W)}).catch(function(W){if(typeof _=="function")try{Promise.resolve(_(L,W,null)).then(function(B){B?V(L,W,null):x(W)}).catch(function(B){x(B)})}catch(B){x(B)}else L<f?V(L,W,null):x(W)})};function V(L,Z,W){var B=typeof d=="function"?d(L,Z,W):d;setTimeout(function(){I(++L)},B)}I(0)})}};function r(o){return Number.isInteger(o)&&o>=0}function i(o){this.name="ArgumentError",this.message=o}return n})});function V0(t,e){return Object.is(t,e)}var ge=null,Xo=!1,nu=1,er=Symbol("SIGNAL");function Tt(t){let e=ge;return ge=t,e}function j0(){return ge}var ru={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function F0(t){if(Xo)throw new Error("");if(ge===null)return;ge.consumerOnSignalRead(t);let e=ge.nextProducerIndex++;if(Ws(ge),e<ge.producerNode.length&&ge.producerNode[e]!==t&&zi(ge)){let n=ge.producerNode[e];Gs(n,ge.producerIndexOfThis[e])}ge.producerNode[e]!==t&&(ge.producerNode[e]=t,ge.producerIndexOfThis[e]=zi(ge)?Bp(t,ge,e):0),ge.producerLastReadVersion[e]=t.version}function B0(){nu++}function U0(t){if(!(zi(t)&&!t.dirty)&&!(!t.dirty&&t.lastCleanEpoch===nu)){if(!t.producerMustRecompute(t)&&!jp(t)){Zh(t);return}t.producerRecomputeValue(t),Zh(t)}}function Mp(t){if(t.liveConsumerNode===void 0)return;let e=Xo;Xo=!0;try{for(let n of t.liveConsumerNode)n.dirty||H0(n)}finally{Xo=e}}function Vp(){return ge?.consumerAllowSignalWrites!==!1}function H0(t){t.dirty=!0,Mp(t),t.consumerMarkedDirty?.(t)}function Zh(t){t.dirty=!1,t.lastCleanEpoch=nu}function Yh(t){return t&&(t.nextProducerIndex=0),Tt(t)}function $0(t,e){if(Tt(e),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(zi(t))for(let n=t.nextProducerIndex;n<t.producerNode.length;n++)Gs(t.producerNode[n],t.producerIndexOfThis[n]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function jp(t){Ws(t);for(let e=0;e<t.producerNode.length;e++){let n=t.producerNode[e],r=t.producerLastReadVersion[e];if(r!==n.version||(U0(n),r!==n.version))return!0}return!1}function Fp(t){if(Ws(t),zi(t))for(let e=0;e<t.producerNode.length;e++)Gs(t.producerNode[e],t.producerIndexOfThis[e]);t.producerNode.length=t.producerLastReadVersion.length=t.producerIndexOfThis.length=0,t.liveConsumerNode&&(t.liveConsumerNode.length=t.liveConsumerIndexOfThis.length=0)}function Bp(t,e,n){if(Up(t),t.liveConsumerNode.length===0&&Hp(t))for(let r=0;r<t.producerNode.length;r++)t.producerIndexOfThis[r]=Bp(t.producerNode[r],t,r);return t.liveConsumerIndexOfThis.push(n),t.liveConsumerNode.push(e)-1}function Gs(t,e){if(Up(t),t.liveConsumerNode.length===1&&Hp(t))for(let r=0;r<t.producerNode.length;r++)Gs(t.producerNode[r],t.producerIndexOfThis[r]);let n=t.liveConsumerNode.length-1;if(t.liveConsumerNode[e]=t.liveConsumerNode[n],t.liveConsumerIndexOfThis[e]=t.liveConsumerIndexOfThis[n],t.liveConsumerNode.length--,t.liveConsumerIndexOfThis.length--,e<t.liveConsumerNode.length){let r=t.liveConsumerIndexOfThis[e],i=t.liveConsumerNode[e];Ws(i),i.producerIndexOfThis[r]=e}}function zi(t){return t.consumerIsAlwaysLive||(t?.liveConsumerNode?.length??0)>0}function Ws(t){t.producerNode??=[],t.producerIndexOfThis??=[],t.producerLastReadVersion??=[]}function Up(t){t.liveConsumerNode??=[],t.liveConsumerIndexOfThis??=[]}function Hp(t){return t.producerNode!==void 0}function z0(){throw new Error}var $p=z0;function zp(t){$p(t)}function q0(t){$p=t}var G0=null;function W0(t){let e=Object.create(Y0);e.value=t;let n=()=>(F0(e),e.value);return n[er]=e,n}function qp(t,e){Vp()||zp(t),t.equal(t.value,e)||(t.value=e,K0(t))}function Z0(t,e){Vp()||zp(t),qp(t,e(t.value))}var Y0=Zt(j({},ru),{equal:V0,value:void 0,kind:"signal"});function K0(t){t.version++,B0(),Mp(t),G0?.()}function Gt(t){return typeof t=="function"}function Gp(t){let e=t(n=>{Error.call(n),n.stack=new Error().stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var qa=Gp(t=>function(e){t(this),this.message=e?`${e.length} errors occurred during unsubscription:
11
- ${e.map((n,r)=>`${r+1}) ${n.toString()}`).join(`
12
- `)}`:"",this.name="UnsubscriptionError",this.errors=e});function us(t,e){if(t){let n=t.indexOf(e);0<=n&&t.splice(n,1)}}var me=class kl{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(let o of n)o.remove(this);else n.remove(this);let{initialTeardown:r}=this;if(Gt(r))try{r()}catch(o){e=o instanceof qa?o.errors:[o]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let o of i)try{Kh(o)}catch(s){e=e??[],s instanceof qa?e=[...e,...s.errors]:e.push(s)}}if(e)throw new qa(e)}}add(e){var n;if(e&&e!==this)if(this.closed)Kh(e);else{if(e instanceof kl){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}}_hasParent(e){let{_parentage:n}=this;return n===e||Array.isArray(n)&&n.includes(e)}_addParent(e){let{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e}_removeParent(e){let{_parentage:n}=this;n===e?this._parentage=null:Array.isArray(n)&&us(n,e)}remove(e){let{_finalizers:n}=this;n&&us(n,e),e instanceof kl&&e._removeParent(this)}};me.EMPTY=(()=>{let t=new me;return t.closed=!0,t})();var Wp=me.EMPTY;function Zp(t){return t instanceof me||t&&"closed"in t&&Gt(t.remove)&&Gt(t.add)&&Gt(t.unsubscribe)}function Kh(t){Gt(t)?t():t.unsubscribe()}var jr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},hs={setTimeout(t,e,...n){let{delegate:r}=hs;return r?.setTimeout?r.setTimeout(t,e,...n):setTimeout(t,e,...n)},clearTimeout(t){let{delegate:e}=hs;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function Yp(t){hs.setTimeout(()=>{let{onUnhandledError:e}=jr;if(e)e(t);else throw t})}function Al(){}var X0=iu("C",void 0,void 0);function J0(t){return iu("E",void 0,t)}function Q0(t){return iu("N",t,void 0)}function iu(t,e,n){return{kind:t,value:e,error:n}}var yr=null;function Jo(t){if(jr.useDeprecatedSynchronousErrorHandling){let e=!yr;if(e&&(yr={errorThrown:!1,error:null}),t(),e){let{errorThrown:n,error:r}=yr;if(yr=null,n)throw r}}else t()}function tb(t){jr.useDeprecatedSynchronousErrorHandling&&yr&&(yr.errorThrown=!0,yr.error=t)}var ou=class extends me{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Zp(t)&&t.add(this)):this.destination=ib}static create(t,e,n){return new Ll(t,e,n)}next(t){this.isStopped?Wa(Q0(t),this):this._next(t)}error(t){this.isStopped?Wa(J0(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Wa(X0,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},eb=Function.prototype.bind;function Ga(t,e){return eb.call(t,e)}var nb=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){ko(n)}}error(t){let{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){ko(n)}else ko(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){ko(e)}}},Ll=class extends ou{constructor(t,e,n){super();let r;if(Gt(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let i;this&&jr.useDeprecatedNextContext?(i=Object.create(t),i.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Ga(t.next,i),error:t.error&&Ga(t.error,i),complete:t.complete&&Ga(t.complete,i)}):r=t}this.destination=new nb(r)}};function ko(t){jr.useDeprecatedSynchronousErrorHandling?tb(t):Yp(t)}function rb(t){throw t}function Wa(t,e){let{onStoppedNotification:n}=jr;n&&hs.setTimeout(()=>n(t,e))}var ib={closed:!0,next:Al,error:rb,complete:Al},su=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Zs(t){return t}function ob(t){return t.length===0?Zs:t.length===1?t[0]:function(e){return t.reduce((n,r)=>r(n),e)}}var _e=(()=>{class t{constructor(n){n&&(this._subscribe=n)}lift(n){let r=new t;return r.source=this,r.operator=n,r}subscribe(n,r,i){let o=ab(n)?n:new Ll(n,r,i);return Jo(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(n){try{return this._subscribe(n)}catch(r){n.error(r)}}forEach(n,r){return r=Xh(r),new r((i,o)=>{let s=new Ll({next:a=>{try{n(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:i});this.subscribe(s)})}_subscribe(n){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(n)}[su](){return this}pipe(...n){return ob(n)(this)}toPromise(n){return n=Xh(n),new n((r,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>r(o))})}}return t.create=e=>new t(e),t})();function Xh(t){var e;return(e=t??jr.Promise)!==null&&e!==void 0?e:Promise}function sb(t){return t&&Gt(t.next)&&Gt(t.error)&&Gt(t.complete)}function ab(t){return t&&t instanceof ou||sb(t)&&Zp(t)}function lb(t){return Gt(t?.lift)}function nn(t){return e=>{if(lb(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Fe(t,e,n,r,i){return new cb(t,e,n,r,i)}var cb=class extends ou{constructor(t,e,n,r,i,o){super(t),this.onFinalize=i,this.shouldUnsubscribe=o,this._next=e?function(s){try{e(s)}catch(a){t.error(a)}}:super._next,this._error=r?function(s){try{r(s)}catch(a){t.error(a)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(s){t.error(s)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:e}=this;super.unsubscribe(),!e&&((t=this.onFinalize)===null||t===void 0||t.call(this))}}},ji={schedule(t){let e=requestAnimationFrame,n=cancelAnimationFrame,{delegate:r}=ji;r&&(e=r.requestAnimationFrame,n=r.cancelAnimationFrame);let i=e(o=>{n=void 0,t(o)});return new me(()=>n?.(i))},requestAnimationFrame(...t){let{delegate:e}=ji;return(e?.requestAnimationFrame||requestAnimationFrame)(...t)},cancelAnimationFrame(...t){let{delegate:e}=ji;return(e?.cancelAnimationFrame||cancelAnimationFrame)(...t)},delegate:void 0},ub=Gp(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}),vt=(()=>{class t extends _e{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){let r=new Jh(this,this);return r.operator=n,r}_throwIfClosed(){if(this.closed)throw new ub}next(n){Jo(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(n)}})}error(n){Jo(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;let{observers:r}=this;for(;r.length;)r.shift().error(n)}})}complete(){Jo(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:n}=this;for(;n.length;)n.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){let{hasError:r,isStopped:i,observers:o}=this;return r||i?Wp:(this.currentObservers=null,o.push(n),new me(()=>{this.currentObservers=null,us(o,n)}))}_checkFinalizedStatuses(n){let{hasError:r,thrownError:i,isStopped:o}=this;r?n.error(i):o&&n.complete()}asObservable(){let n=new _e;return n.source=this,n}}return t.create=(e,n)=>new Jh(e,n),t})(),Jh=class extends vt{constructor(t,e){super(),this.destination=t,this.source=e}next(t){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.next)===null||n===void 0||n.call(e,t)}error(t){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.error)===null||n===void 0||n.call(e,t)}complete(){var t,e;(e=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||e===void 0||e.call(t)}_subscribe(t){var e,n;return(n=(e=this.source)===null||e===void 0?void 0:e.subscribe(t))!==null&&n!==void 0?n:Wp}},au=class extends vt{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){let e=super._subscribe(t);return!e.closed&&t.next(this._value),e}getValue(){let{hasError:t,thrownError:e,_value:n}=this;if(t)throw e;return this._throwIfClosed(),n}next(t){super.next(this._value=t)}},lu={now(){return(lu.delegate||Date).now()},delegate:void 0},hb=class extends vt{constructor(t=1/0,e=1/0,n=lu){super(),this._bufferSize=t,this._windowTime=e,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,t),this._windowTime=Math.max(1,e)}next(t){let{isStopped:e,_buffer:n,_infiniteTimeWindow:r,_timestampProvider:i,_windowTime:o}=this;e||(n.push(t),!r&&n.push(i.now()+o)),this._trimBuffer(),super.next(t)}_subscribe(t){this._throwIfClosed(),this._trimBuffer();let e=this._innerSubscribe(t),{_infiniteTimeWindow:n,_buffer:r}=this,i=r.slice();for(let o=0;o<i.length&&!t.closed;o+=n?1:2)t.next(i[o]);return this._checkFinalizedStatuses(t),e}_trimBuffer(){let{_bufferSize:t,_timestampProvider:e,_buffer:n,_infiniteTimeWindow:r}=this,i=(r?1:2)*t;if(t<1/0&&i<n.length&&n.splice(0,n.length-i),!r){let o=e.now(),s=0;for(let a=1;a<n.length&&n[a]<=o;a+=2)s=a;s&&n.splice(0,s+1)}}},fb=class extends me{constructor(t,e){super()}schedule(t,e=0){return this}},fs={setInterval(t,e,...n){let{delegate:r}=fs;return r?.setInterval?r.setInterval(t,e,...n):setInterval(t,e,...n)},clearInterval(t){let{delegate:e}=fs;return(e?.clearInterval||clearInterval)(t)},delegate:void 0},Kp=class extends fb{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){var n;if(this.closed)return this;this.state=t;let r=this.id,i=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(i,r,e)),this.pending=!0,this.delay=e,this.id=(n=this.id)!==null&&n!==void 0?n:this.requestAsyncId(i,this.id,e),this}requestAsyncId(t,e,n=0){return fs.setInterval(t.flush.bind(t,this),n)}recycleAsyncId(t,e,n=0){if(n!=null&&this.delay===n&&this.pending===!1)return e;e!=null&&fs.clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let n=this._execute(t,e);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let n=!1,r;try{this.work(t)}catch(i){n=!0,r=i||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){let{id:t,scheduler:e}=this,{actions:n}=e;this.work=this.state=this.scheduler=null,this.pending=!1,us(n,this),t!=null&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}},Ml=class Xp{constructor(e,n=Xp.now){this.schedulerActionCtor=e,this.now=n}schedule(e,n=0,r){return new this.schedulerActionCtor(this,e).schedule(r,n)}};Ml.now=lu.now;var Jp=class extends Ml{constructor(t,e=Ml.now){super(t,e),this.actions=[],this._active=!1}flush(t){let{actions:e}=this;if(this._active){e.push(t);return}let n;this._active=!0;do if(n=t.execute(t.state,t.delay))break;while(t=e.shift());if(this._active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},cu=new Jp(Kp),db=cu,pb=class extends Kp{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,n=0){return n!==null&&n>0?super.requestAsyncId(t,e,n):(t.actions.push(this),t._scheduled||(t._scheduled=ji.requestAnimationFrame(()=>t.flush(void 0))))}recycleAsyncId(t,e,n=0){var r;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(t,e,n);let{actions:i}=t;e!=null&&((r=i[i.length-1])===null||r===void 0?void 0:r.id)!==e&&(ji.cancelAnimationFrame(e),t._scheduled=void 0)}},gb=class extends Jp{flush(t){this._active=!0;let e=this._scheduled;this._scheduled=void 0;let{actions:n}=this,r;t=t||n.shift();do if(r=t.execute(t.state,t.delay))break;while((t=n[0])&&t.id===e&&n.shift());if(this._active=!1,r){for(;(t=n[0])&&t.id===e&&n.shift();)t.unsubscribe();throw r}}},mb=new gb(pb),uu=new _e(t=>t.complete());function Qp(t){return t&&Gt(t.schedule)}function tg(t){return t[t.length-1]}function Ys(t){return Qp(tg(t))?t.pop():void 0}function _b(t,e){return typeof tg(t)=="number"?t.pop():e}function vb(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(f){try{u(r.next(f))}catch(d){s(d)}}function l(f){try{u(r.throw(f))}catch(d){s(d)}}function u(f){f.done?o(f.value):i(f.value).then(a,l)}u((r=r.apply(t,e||[])).next())})}function Qh(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ti(t){return this instanceof ti?(this.v=t,this):new ti(t)}function yb(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(y){return function(x){return Promise.resolve(x).then(y,d)}}function a(y,x){r[y]&&(i[y]=function(I){return new Promise(function(V,L){o.push([y,I,V,L])>1||l(y,I)})},x&&(i[y]=x(i[y])))}function l(y,x){try{u(r[y](x))}catch(I){_(o[0][3],I)}}function u(y){y.value instanceof ti?Promise.resolve(y.value.v).then(f,d):_(o[0][2],y)}function f(y){l("next",y)}function d(y){l("throw",y)}function _(y,x){y(x),o.shift(),o.length&&l(o[0][0],o[0][1])}}function bb(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Qh=="function"?Qh(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(s){return new Promise(function(a,l){s=t[o](s),i(a,l,s.done,s.value)})}}function i(o,s,a,l){Promise.resolve(l).then(function(u){o({value:u,done:a})},s)}}var hu=t=>t&&typeof t.length=="number"&&typeof t!="function";function eg(t){return Gt(t?.then)}function ng(t){return Gt(t[su])}function rg(t){return Symbol.asyncIterator&&Gt(t?.[Symbol.asyncIterator])}function ig(t){return new TypeError(`You provided ${t!==null&&typeof t=="object"?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function wb(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var og=wb();function sg(t){return Gt(t?.[og])}function ag(t){return yb(this,arguments,function*(){let e=t.getReader();try{for(;;){let{value:n,done:r}=yield ti(e.read());if(r)return yield ti(void 0);yield yield ti(n)}}finally{e.releaseLock()}})}function lg(t){return Gt(t?.getReader)}function vn(t){if(t instanceof _e)return t;if(t!=null){if(ng(t))return Eb(t);if(hu(t))return xb(t);if(eg(t))return Sb(t);if(rg(t))return cg(t);if(sg(t))return Cb(t);if(lg(t))return Ib(t)}throw ig(t)}function Eb(t){return new _e(e=>{let n=t[su]();if(Gt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function xb(t){return new _e(e=>{for(let n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Sb(t){return new _e(e=>{t.then(n=>{e.closed||(e.next(n),e.complete())},n=>e.error(n)).then(null,Yp)})}function Cb(t){return new _e(e=>{for(let n of t)if(e.next(n),e.closed)return;e.complete()})}function cg(t){return new _e(e=>{Tb(t,e).catch(n=>e.error(n))})}function Ib(t){return cg(ag(t))}function Tb(t,e){var n,r,i,o;return vb(this,void 0,void 0,function*(){try{for(n=bb(t);r=yield n.next(),!r.done;){let s=r.value;if(e.next(s),e.closed)return}}catch(s){i={error:s}}finally{try{r&&!r.done&&(o=n.return)&&(yield o.call(n))}finally{if(i)throw i.error}}e.complete()})}function nr(t,e,n,r=0,i=!1){let o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function ug(t,e=0){return nn((n,r)=>{n.subscribe(Fe(r,i=>nr(r,t,()=>r.next(i),e),()=>nr(r,t,()=>r.complete(),e),i=>nr(r,t,()=>r.error(i),e)))})}function hg(t,e=0){return nn((n,r)=>{r.add(t.schedule(()=>n.subscribe(r),e))})}function Ob(t,e){return vn(t).pipe(hg(e),ug(e))}function Db(t,e){return vn(t).pipe(hg(e),ug(e))}function Rb(t,e){return new _e(n=>{let r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function Nb(t,e){return new _e(n=>{let r;return nr(n,e,()=>{r=t[og](),nr(n,e,()=>{let i,o;try{({value:i,done:o}=r.next())}catch(s){n.error(s);return}o?n.complete():n.next(i)},0,!0)}),()=>Gt(r?.return)&&r.return()})}function fg(t,e){if(!t)throw new Error("Iterable cannot be null");return new _e(n=>{nr(n,e,()=>{let r=t[Symbol.asyncIterator]();nr(n,e,()=>{r.next().then(i=>{i.done?n.complete():n.next(i.value)})},0,!0)})})}function Pb(t,e){return fg(ag(t),e)}function kb(t,e){if(t!=null){if(ng(t))return Ob(t,e);if(hu(t))return Rb(t,e);if(eg(t))return Db(t,e);if(rg(t))return fg(t,e);if(sg(t))return Nb(t,e);if(lg(t))return Pb(t,e)}throw ig(t)}function Ks(t,e){return e?kb(t,e):vn(t)}function fu(...t){let e=Ys(t);return Ks(t,e)}function Ab(t){return t instanceof Date&&!isNaN(t)}function Xs(t,e){return nn((n,r)=>{let i=0;n.subscribe(Fe(r,o=>{r.next(t.call(e,o,i++))}))})}var{isArray:Lb}=Array;function Mb(t,e){return Lb(e)?t(...e):t(e)}function Vb(t){return Xs(e=>Mb(t,e))}function jb(t,e,n,r,i,o,s,a){let l=[],u=0,f=0,d=!1,_=()=>{d&&!l.length&&!u&&e.complete()},y=I=>u<r?x(I):l.push(I),x=I=>{o&&e.next(I),u++;let V=!1;vn(n(I,f++)).subscribe(Fe(e,L=>{i?.(L),o?y(L):e.next(L)},()=>{V=!0},void 0,()=>{if(V)try{for(u--;l.length&&u<r;){let L=l.shift();s?nr(e,s,()=>x(L)):x(L)}_()}catch(L){e.error(L)}}))};return t.subscribe(Fe(e,y,()=>{d=!0,_()})),()=>{a?.()}}function qi(t,e,n=1/0){return Gt(e)?qi((r,i)=>Xs((o,s)=>e(r,o,i,s))(vn(t(r,i))),n):(typeof e=="number"&&(n=e),nn((r,i)=>jb(r,i,t,n)))}function dg(t=1/0){return qi(Zs,t)}function Fb(){return dg(1)}function tf(...t){return Fb()(Ks(t,Ys(t)))}function Bb(t){return new _e(e=>{vn(t()).subscribe(e)})}var Ub=["addListener","removeListener"],Hb=["addEventListener","removeEventListener"],$b=["on","off"];function Vl(t,e,n,r){if(Gt(n)&&(r=n,n=void 0),r)return Vl(t,e,n).pipe(Vb(r));let[i,o]=Gb(t)?Hb.map(s=>a=>t[s](e,a,n)):zb(t)?Ub.map(ef(t,e)):qb(t)?$b.map(ef(t,e)):[];if(!i&&hu(t))return qi(s=>Vl(s,e,n))(vn(t));if(!i)throw new TypeError("Invalid event target");return new _e(s=>{let a=(...l)=>s.next(1<l.length?l:l[0]);return i(a),()=>o(a)})}function ef(t,e){return n=>r=>t[n](e,r)}function zb(t){return Gt(t.addListener)&&Gt(t.removeListener)}function qb(t){return Gt(t.on)&&Gt(t.off)}function Gb(t){return Gt(t.addEventListener)&&Gt(t.removeEventListener)}function pg(t=0,e,n=db){let r=-1;return e!=null&&(Qp(e)?n=e:r=e),new _e(i=>{let o=Ab(t)?+t-n.now():t;o<0&&(o=0);let s=0;return n.schedule(function(){i.closed||(i.next(s++),0<=r?this.schedule(void 0,r):i.complete())},o)})}function Wb(t=0,e=cu){return t<0&&(t=0),pg(t,t,e)}function Js(...t){let e=Ys(t),n=_b(t,1/0),r=t;return r.length?r.length===1?vn(r[0]):dg(n)(Ks(r,e)):uu}function du(t,e){return nn((n,r)=>{let i=0;n.subscribe(Fe(r,o=>t.call(e,o,i++)&&r.next(o)))})}function Zb(t){return nn((e,n)=>{let r=!1,i=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,r){r=!1;let u=i;i=null,n.next(u)}s&&n.complete()},l=()=>{o=null,s&&n.complete()};e.subscribe(Fe(n,u=>{r=!0,i=u,o||vn(t(u)).subscribe(o=Fe(n,a,l))},()=>{s=!0,(!r||!o||o.closed)&&n.complete()}))})}function gg(t,e=cu){return Zb(()=>pg(t,e))}function Yb(t){return t<=0?()=>uu:nn((e,n)=>{let r=0;e.subscribe(Fe(n,i=>{++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function Kb(t,e=Zs){return t=t??Xb,nn((n,r)=>{let i,o=!0;n.subscribe(Fe(r,s=>{let a=e(s);(o||!t(i,a))&&(o=!1,i=a,r.next(s))}))})}function Xb(t,e){return t===e}function Jb(t){return du((e,n)=>t<=n)}function mg(...t){let e=Ys(t);return nn((n,r)=>{(e?tf(t,n,e):tf(t,n)).subscribe(r)})}function _g(t,e){return nn((n,r)=>{let i=null,o=0,s=!1,a=()=>s&&!i&&r.complete();n.subscribe(Fe(r,l=>{i?.unsubscribe();let u=0,f=o++;vn(t(l,f)).subscribe(i=Fe(r,d=>r.next(e?e(l,d,f,u++):d),()=>{i=null,a()}))},()=>{s=!0,a()}))})}function si(t){return nn((e,n)=>{vn(t).subscribe(Fe(n,()=>n.complete(),Al)),!n.closed&&e.subscribe(n)})}function Qb(t,e,n){let r=Gt(t)||e||n?{next:t,error:e,complete:n}:t;return r?nn((i,o)=>{var s;(s=r.subscribe)===null||s===void 0||s.call(r);let a=!0;i.subscribe(Fe(o,l=>{var u;(u=r.next)===null||u===void 0||u.call(r,l),o.next(l)},()=>{var l;a=!1,(l=r.complete)===null||l===void 0||l.call(r),o.complete()},l=>{var u;a=!1,(u=r.error)===null||u===void 0||u.call(r,l),o.error(l)},()=>{var l,u;a&&((l=r.unsubscribe)===null||l===void 0||l.call(r)),(u=r.finalize)===null||u===void 0||u.call(r)}))}):Zs}var vg="https://g.co/ng/security#xss",Nt=class extends Error{code;constructor(t,e){super(tw(t,e)),this.code=t}};function tw(t,e){return`${`NG0${Math.abs(t)}`}${e?": "+e:""}`}function pu(t){return{toString:t}.toString()}var Gi=globalThis;function Kt(t){for(let e in t)if(t[e]===Kt)return e;throw Error("Could not find renamed property on target object.")}function ew(t,e){for(let n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function hn(t){if(typeof t=="string")return t;if(Array.isArray(t))return`[${t.map(hn).join(", ")}]`;if(t==null)return""+t;let e=t.overriddenName||t.name;if(e)return`${e}`;let n=t.toString();if(n==null)return""+n;let r=n.indexOf(`
13
- `);return r>=0?n.slice(0,r):n}function nf(t,e){return t?e?`${t} ${e}`:t:e||""}var nw=Kt({__forward_ref__:Kt});function yg(t){return t.__forward_ref__=yg,t.toString=function(){return hn(this())},t}function Oe(t){return bg(t)?t():t}function bg(t){return typeof t=="function"&&t.hasOwnProperty(nw)&&t.__forward_ref__===yg}function pt(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function gu(t){return rf(t,wg)||rf(t,Eg)}function rf(t,e){return t.hasOwnProperty(e)?t[e]:null}function rw(t){return t&&(t[wg]||t[Eg])||null}function of(t){return t&&(t.hasOwnProperty(sf)||t.hasOwnProperty(iw))?t[sf]:null}var wg=Kt({\u0275prov:Kt}),sf=Kt({\u0275inj:Kt}),Eg=Kt({ngInjectableDef:Kt}),iw=Kt({ngInjectorDef:Kt}),St=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(t,e){this._desc=t,this.\u0275prov=void 0,typeof e=="number"?this.__NG_ELEMENT_ID__=e:e!==void 0&&(this.\u0275prov=pt({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function xg(t){return t&&!!t.\u0275providers}var ow=Kt({\u0275cmp:Kt}),sw=Kt({\u0275dir:Kt}),Sg=Kt({\u0275pipe:Kt}),ds=Kt({\u0275fac:Kt}),Fi=Kt({__NG_ELEMENT_ID__:Kt}),af=Kt({__NG_ENV_ID__:Kt});function ho(t){return typeof t=="string"?t:t==null?"":String(t)}function aw(t){return typeof t=="function"?t.name||t.toString():typeof t=="object"&&t!=null&&typeof t.type=="function"?t.type.name||t.type.toString():ho(t)}function lw(t,e){throw new Nt(-200,t)}function mu(t,e){throw new Nt(-201,!1)}var Ot=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}(Ot||{}),jl;function Cg(){return jl}function Pe(t){let e=jl;return jl=t,e}function Ig(t,e,n){let r=gu(t);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(n&Ot.Optional)return null;if(e!==void 0)return e;mu(t,"Injector")}var cw={},Wi=cw,uw="__NG_DI_FLAG__",ps="ngTempTokenPath",hw="ngTokenPath",fw=/\n/gm,dw="\u0275",lf="__source",ei;function pw(){return ei}function Kn(t){let e=ei;return ei=t,e}function gw(t,e=Ot.Default){if(ei===void 0)throw new Nt(-203,!1);return ei===null?Ig(t,void 0,e):ei.get(t,e&Ot.Optional?null:void 0,e)}function Vt(t,e=Ot.Default){return(Cg()||gw)(Oe(t),e)}function P(t,e=Ot.Default){return Vt(t,Qs(e))}function Qs(t){return typeof t>"u"||typeof t=="number"?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function Fl(t){let e=[];for(let n=0;n<t.length;n++){let r=Oe(t[n]);if(Array.isArray(r)){if(r.length===0)throw new Nt(900,!1);let i,o=Ot.Default;for(let s=0;s<r.length;s++){let a=r[s],l=mw(a);typeof l=="number"?l===-1?i=a.token:o|=l:i=a}e.push(Vt(i,o))}else e.push(Vt(r))}return e}function mw(t){return t[uw]}function _w(t,e,n,r){let i=t[ps];throw e[lf]&&i.unshift(e[lf]),t.message=vw(`
14
- `+t.message,i,n,r),t[hw]=i,t[ps]=null,t}function vw(t,e,n,r=null){t=t&&t.charAt(0)===`
15
- `&&t.charAt(1)==dw?t.slice(2):t;let i=hn(e);if(Array.isArray(e))i=e.map(hn).join(" -> ");else if(typeof e=="object"){let o=[];for(let s in e)if(e.hasOwnProperty(s)){let a=e[s];o.push(s+":"+(typeof a=="string"?JSON.stringify(a):hn(a)))}i=`{${o.join(", ")}}`}return`${n}${r?"("+r+")":""}[${i}]: ${t.replace(fw,`
16
- `)}`}function Cr(t,e){return t.hasOwnProperty(ds)?t[ds]:null}function yw(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){let i=t[r],o=e[r];if(n&&(i=n(i),o=n(o)),o!==i)return!1}return!0}function bw(t){return t.flat(Number.POSITIVE_INFINITY)}function _u(t,e){t.forEach(n=>Array.isArray(n)?_u(n,e):e(n))}function Tg(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function gs(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function ww(t,e,n,r){let i=t.length;if(i==e)t.push(n,r);else if(i===1)t.push(r,t[0]),t[0]=n;else{for(i--,t.push(t[i-1],t[i]);i>e;){let o=i-2;t[i]=t[o],i--}t[e]=n,t[e+1]=r}}function Ew(t,e,n){let r=fo(t,e);return r>=0?t[r|1]=n:(r=~r,ww(t,r,e,n)),r}function Za(t,e){let n=fo(t,e);if(n>=0)return t[n|1]}function fo(t,e){return xw(t,e,1)}function xw(t,e,n){let r=0,i=t.length>>n;for(;i!==r;){let o=r+(i-r>>1),s=t[o<<n];if(e===s)return o<<n;s>e?i=o:r=o+1}return~(i<<n)}var Ir={},Vn=[],ms=new St(""),Og=new St("",-1),Dg=new St(""),Rg=class{get(t,e=Wi){if(e===Wi){let n=new Error(`NullInjectorError: No provider for ${hn(t)}!`);throw n.name="NullInjectorError",n}return e}};function Tr(t){return t[ow]||null}function Ng(t){return t[sw]||null}function Pg(t){return t[Sg]||null}function Sw(t){let e=Tr(t)||Ng(t)||Pg(t);return e!==null&&e.standalone}function Cw(t){return{\u0275providers:t}}function Iw(...t){return{\u0275providers:kg(!0,t),\u0275fromNgModule:!0}}function kg(t,...e){let n=[],r=new Set,i,o=s=>{n.push(s)};return _u(e,s=>{let a=s;Bl(a,o,[],r)&&(i||=[],i.push(a))}),i!==void 0&&Ag(i,o),n}function Ag(t,e){for(let n=0;n<t.length;n++){let{ngModule:r,providers:i}=t[n];vu(i,o=>{e(o,r)})}}function Bl(t,e,n,r){if(t=Oe(t),!t)return!1;let i=null,o=of(t),s=!o&&Tr(t);if(!o&&!s){let l=t.ngModule;if(o=of(l),o)i=l;else return!1}else{if(s&&!s.standalone)return!1;i=t}let a=r.has(i);if(s){if(a)return!1;if(r.add(i),s.dependencies){let l=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let u of l)Bl(u,e,n,r)}}else if(o){if(o.imports!=null&&!a){r.add(i);let u;try{_u(o.imports,f=>{Bl(f,e,n,r)&&(u||=[],u.push(f))})}finally{}u!==void 0&&Ag(u,e)}if(!a){let u=Cr(i)||(()=>new i);e({provide:i,useFactory:u,deps:Vn},i),e({provide:Dg,useValue:i,multi:!0},i),e({provide:ms,useValue:()=>Vt(i),multi:!0},i)}let l=o.providers;if(l!=null&&!a){let u=t;vu(l,f=>{e(f,u)})}}else return!1;return i!==t&&t.providers!==void 0}function vu(t,e){for(let n of t)xg(n)&&(n=n.\u0275providers),Array.isArray(n)?vu(n,e):e(n)}var Tw=Kt({provide:String,useValue:Kt});function Lg(t){return t!==null&&typeof t=="object"&&Tw in t}function Ow(t){return!!(t&&t.useExisting)}function Dw(t){return!!(t&&t.useFactory)}function ai(t){return typeof t=="function"}function Rw(t){return!!t.useClass}var yu=new St(""),Qo={},Nw={},Ya;function ta(){return Ya===void 0&&(Ya=new Rg),Ya}var jn=class{},bu=class extends jn{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(t,e,n,r){super(),this.parent=e,this.source=n,this.scopes=r,Hl(t,o=>this.processProvider(o)),this.records.set(Og,Zr(void 0,this)),r.has("environment")&&this.records.set(jn,Zr(void 0,this));let i=this.records.get(yu);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Dg,Vn,Ot.Self))}destroy(){Ai(this),this._destroyed=!0;let t=Tt(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of e)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),Tt(t)}}onDestroy(t){return Ai(this),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){Ai(this);let e=Kn(this),n=Pe(void 0),r;try{return t()}finally{Kn(e),Pe(n)}}get(t,e=Wi,n=Ot.Default){if(Ai(this),t.hasOwnProperty(af))return t[af](this);n=Qs(n);let r,i=Kn(this),o=Pe(void 0);try{if(!(n&Ot.SkipSelf)){let a=this.records.get(t);if(a===void 0){let l=Mw(t)&&gu(t);l&&this.injectableDefInScope(l)?a=Zr(Ul(t),Qo):a=null,this.records.set(t,a)}if(a!=null)return this.hydrate(t,a)}let s=n&Ot.Self?ta():this.parent;return e=n&Ot.Optional&&e===Wi?null:e,s.get(t,e)}catch(s){if(s.name==="NullInjectorError"){if((s[ps]=s[ps]||[]).unshift(hn(t)),i)throw s;return _w(s,t,"R3InjectorError",this.source)}else throw s}finally{Pe(o),Kn(i)}}resolveInjectorInitializers(){let t=Tt(null),e=Kn(this),n=Pe(void 0),r;try{let i=this.get(ms,Vn,Ot.Self);for(let o of i)o()}finally{Kn(e),Pe(n),Tt(t)}}toString(){let t=[],e=this.records;for(let n of e.keys())t.push(hn(n));return`R3Injector[${t.join(", ")}]`}processProvider(t){t=Oe(t);let e=ai(t)?t:Oe(t&&t.provide),n=kw(t);if(!ai(t)&&t.multi===!0){let r=this.records.get(e);r||(r=Zr(void 0,Qo,!0),r.factory=()=>Fl(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){let n=Tt(null);try{return e.value===Qo&&(e.value=Nw,e.value=e.factory()),typeof e.value=="object"&&e.value&&Lw(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}finally{Tt(n)}}injectableDefInScope(t){if(!t.providedIn)return!1;let e=Oe(t.providedIn);return typeof e=="string"?e==="any"||this.scopes.has(e):this.injectorDefTypes.has(e)}removeOnDestroy(t){let e=this._onDestroyHooks.indexOf(t);e!==-1&&this._onDestroyHooks.splice(e,1)}};function Ul(t){let e=gu(t),n=e!==null?e.factory:Cr(t);if(n!==null)return n;if(t instanceof St)throw new Nt(204,!1);if(t instanceof Function)return Pw(t);throw new Nt(204,!1)}function Pw(t){if(t.length>0)throw new Nt(204,!1);let e=rw(t);return e!==null?()=>e.factory(t):()=>new t}function kw(t){if(Lg(t))return Zr(void 0,t.useValue);{let e=Mg(t);return Zr(e,Qo)}}function Mg(t,e,n){let r;if(ai(t)){let i=Oe(t);return Cr(i)||Ul(i)}else if(Lg(t))r=()=>Oe(t.useValue);else if(Dw(t))r=()=>t.useFactory(...Fl(t.deps||[]));else if(Ow(t))r=()=>Vt(Oe(t.useExisting));else{let i=Oe(t&&(t.useClass||t.provide));if(Aw(t))r=()=>new i(...Fl(t.deps));else return Cr(i)||Ul(i)}return r}function Ai(t){if(t.destroyed)throw new Nt(205,!1)}function Zr(t,e,n=!1){return{factory:t,value:e,multi:n?[]:void 0}}function Aw(t){return!!t.deps}function Lw(t){return t!==null&&typeof t=="object"&&typeof t.ngOnDestroy=="function"}function Mw(t){return typeof t=="function"||typeof t=="object"&&t instanceof St}function Hl(t,e){for(let n of t)Array.isArray(n)?Hl(n,e):n&&xg(n)?Hl(n.\u0275providers,e):e(n)}function Vg(t,e){t instanceof bu&&Ai(t);let n,r=Kn(t),i=Pe(void 0);try{return e()}finally{Kn(r),Pe(i)}}function jg(){return Cg()!==void 0||pw()!=null}function Fg(t){if(!jg())throw new Nt(-203,!1)}function Vw(t){return typeof t=="function"}var $n=0,dt=1,mt=2,Ie=3,fn=4,yn=5,Zi=6,_s=7,ce=8,Yi=9,Fn=10,ve=11,Ki=12,cf=13,gi=14,mn=15,Or=16,Yr=17,Bn=18,po=19,Bg=20,rr=21,Ka=22,vs=23,je=24,ni=25,ae=26,Ug=1,Dr=7,ys=8,li=9,Ce=10;function An(t){return Array.isArray(t)&&typeof t[Ug]=="object"}function zn(t){return Array.isArray(t)&&t[Ug]===!0}function wu(t){return(t.flags&4)!==0}function mi(t){return t.componentOffset>-1}function ea(t){return(t.flags&1)===1}function Tn(t){return!!t.template}function bs(t){return(t[mt]&512)!==0}function go(t){return(t[mt]&256)===256}var jw=class{previousValue;currentValue;firstChange;constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}};function Hg(t,e,n,r){e!==null?e.applyValueToInputSignal(e,r):t[n]=r}var $g=(()=>{let t=()=>zg;return t.ngInherit=!0,t})();function zg(t){return t.type.prototype.ngOnChanges&&(t.setInput=Bw),Fw}function Fw(){let t=Gg(this),e=t?.current;if(e){let n=t.previous;if(n===Ir)t.previous=e;else for(let r in e)n[r]=e[r];t.current=null,this.ngOnChanges(e)}}function Bw(t,e,n,r,i){let o=this.declaredInputs[r],s=Gg(t)||Uw(t,{previous:Ir,current:null}),a=s.current||(s.current={}),l=s.previous,u=l[o];a[o]=new jw(u&&u.currentValue,n,l===Ir),Hg(t,e,i,n)}var qg="__ngSimpleChanges__";function Gg(t){return t[qg]||null}function Uw(t,e){return t[qg]=e}var Hw=null,zt=function(t,e=null,n){Hw?.(t,e,n)},Wg="svg",$w="math";function Be(t){for(;Array.isArray(t);)t=t[$n];return t}function Zg(t,e){return Be(e[t])}function Dn(t,e){return Be(e[t.index])}function Eu(t,e){return t.data[e]}function na(t,e){return t[e]}function Je(t,e){let n=e[t];return An(n)?n:n[$n]}function zw(t){return(t[mt]&4)===4}function xu(t){return(t[mt]&128)===128}function qw(t){return zn(t[Ie])}function sr(t,e){return e==null?null:t[e]}function Yg(t){t[Yr]=0}function Su(t){t[mt]&1024||(t[mt]|=1024,xu(t)&&mo(t))}function Gw(t,e){for(;t>0;)e=e[gi],t--;return e}function ra(t){return!!(t[mt]&9216||t[je]?.dirty)}function $l(t){t[Fn].changeDetectionScheduler?.notify(8),t[mt]&64&&(t[mt]|=1024),ra(t)&&mo(t)}function mo(t){t[Fn].changeDetectionScheduler?.notify(0);let e=Rr(t);for(;e!==null&&!(e[mt]&8192||(e[mt]|=8192,!xu(e)));)e=Rr(e)}function Kg(t,e){if(go(t))throw new Nt(911,!1);t[rr]===null&&(t[rr]=[]),t[rr].push(e)}function Ww(t,e){if(t[rr]===null)return;let n=t[rr].indexOf(e);n!==-1&&t[rr].splice(n,1)}function Rr(t){let e=t[Ie];return zn(e)?e[Ie]:e}function Xg(t){return t[_s]??=[]}function Jg(t){return t.cleanup??=[]}function Zw(t,e,n,r){let i=Xg(e);i.push(n),t.firstCreatePass&&Jg(t).push(r,i.length-1)}var yt={lFrame:sm(null),bindingsEnabled:!0,skipHydrationRootTNode:null},zl=!1;function Yw(){return yt.lFrame.elementDepthCount}function Kw(){yt.lFrame.elementDepthCount++}function Xw(){yt.lFrame.elementDepthCount--}function Cu(){return yt.bindingsEnabled}function Jw(){return yt.skipHydrationRootTNode!==null}function Qw(t){return yt.skipHydrationRootTNode===t}function t1(){yt.skipHydrationRootTNode=null}function xt(){return yt.lFrame.lView}function pe(){return yt.lFrame.tView}function ue(t){return yt.lFrame.contextLView=t,t[ce]}function he(t){return yt.lFrame.contextLView=null,t}function He(){let t=Qg();for(;t!==null&&t.type===64;)t=t.parent;return t}function Qg(){return yt.lFrame.currentTNode}function e1(){let t=yt.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}function ur(t,e){let n=yt.lFrame;n.currentTNode=t,n.isParent=e}function Iu(){return yt.lFrame.isParent}function tm(){yt.lFrame.isParent=!1}function em(){return yt.lFrame.contextLView}function nm(){return zl}function uf(t){let e=zl;return zl=t,e}function ia(){let t=yt.lFrame,e=t.bindingRootIndex;return e===-1&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function n1(t){return yt.lFrame.bindingIndex=t}function _o(){return yt.lFrame.bindingIndex++}function r1(t){let e=yt.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function i1(){return yt.lFrame.inI18n}function o1(t,e){let n=yt.lFrame;n.bindingIndex=n.bindingRootIndex=t,ql(e)}function s1(){return yt.lFrame.currentDirectiveIndex}function ql(t){yt.lFrame.currentDirectiveIndex=t}function a1(t){let e=yt.lFrame.currentDirectiveIndex;return e===-1?null:t[e]}function rm(){return yt.lFrame.currentQueryIndex}function Tu(t){yt.lFrame.currentQueryIndex=t}function l1(t){let e=t[dt];return e.type===2?e.declTNode:e.type===1?t[yn]:null}function im(t,e,n){if(n&Ot.SkipSelf){let i=e,o=t;for(;(i=i.parent,i===null&&!(n&Ot.Host))&&(i=l1(o),!(i===null||(o=o[gi],i.type&10))););if(i===null)return!1;e=i,t=o}let r=yt.lFrame=om();return r.currentTNode=e,r.lView=t,!0}function Ou(t){let e=om(),n=t[dt];yt.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex,e.inI18n=!1}function om(){let t=yt.lFrame,e=t===null?null:t.child;return e===null?sm(t):e}function sm(t){let e={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:t,child:null,inI18n:!1};return t!==null&&(t.child=e),e}function am(){let t=yt.lFrame;return yt.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var lm=am;function Du(){let t=am();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function c1(t){return(yt.lFrame.contextLView=Gw(t,yt.lFrame.contextLView))[ce]}function hr(){return yt.lFrame.selectedIndex}function Nr(t){yt.lFrame.selectedIndex=t}function Ru(){let t=yt.lFrame;return Eu(t.tView,t.selectedIndex)}function ar(){yt.lFrame.currentNamespace=Wg}function ws(){u1()}function u1(){yt.lFrame.currentNamespace=null}function h1(){return yt.lFrame.currentNamespace}var cm=!0;function oa(){return cm}function sa(t){cm=t}function f1(t,e,n){let{ngOnChanges:r,ngOnInit:i,ngDoCheck:o}=e.type.prototype;if(r){let s=zg(e);(n.preOrderHooks??=[]).push(t,s),(n.preOrderCheckHooks??=[]).push(t,s)}i&&(n.preOrderHooks??=[]).push(0-t,i),o&&((n.preOrderHooks??=[]).push(t,o),(n.preOrderCheckHooks??=[]).push(t,o))}function Nu(t,e){for(let n=e.directiveStart,r=e.directiveEnd;n<r;n++){let i=t.data[n].type.prototype,{ngAfterContentInit:o,ngAfterContentChecked:s,ngAfterViewInit:a,ngAfterViewChecked:l,ngOnDestroy:u}=i;o&&(t.contentHooks??=[]).push(-n,o),s&&((t.contentHooks??=[]).push(n,s),(t.contentCheckHooks??=[]).push(n,s)),a&&(t.viewHooks??=[]).push(-n,a),l&&((t.viewHooks??=[]).push(n,l),(t.viewCheckHooks??=[]).push(n,l)),u!=null&&(t.destroyHooks??=[]).push(n,u)}}function ts(t,e,n){um(t,e,3,n)}function es(t,e,n,r){(t[mt]&3)===n&&um(t,e,n,r)}function Xa(t,e){let n=t[mt];(n&3)===e&&(n&=16383,n+=1,t[mt]=n)}function um(t,e,n,r){let i=r!==void 0?t[Yr]&65535:0,o=r??-1,s=e.length-1,a=0;for(let l=i;l<s;l++)if(typeof e[l+1]=="number"){if(a=e[l],r!=null&&a>=r)break}else e[l]<0&&(t[Yr]+=65536),(a<o||o==-1)&&(d1(t,n,e,l),t[Yr]=(t[Yr]&4294901760)+l+2),l++}function hf(t,e){zt(4,t,e);let n=Tt(null);try{e.call(t)}finally{Tt(n),zt(5,t,e)}}function d1(t,e,n,r){let i=n[r]<0,o=n[r+1],s=i?-n[r]:n[r],a=t[s];i?t[mt]>>14<t[Yr]>>16&&(t[mt]&3)===e&&(t[mt]+=16384,hf(a,o)):hf(a,o)}var ri=-1,vo=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(t,e,n){this.factory=t,this.canSeeViewProviders=e,this.injectImpl=n}};function p1(t){return t instanceof vo}function g1(t){return(t.flags&8)!==0}function m1(t){return(t.flags&16)!==0}function _1(t,e,n){let r=0;for(;r<n.length;){let i=n[r];if(typeof i=="number"){if(i!==0)break;r++;let o=n[r++],s=n[r++],a=n[r++];t.setAttribute(e,s,a,o)}else{let o=i,s=n[++r];y1(o)?t.setProperty(e,o,s):t.setAttribute(e,o,s),r++}}return r}function v1(t){return t===3||t===4||t===6}function y1(t){return t.charCodeAt(0)===64}function ci(t,e){if(!(e===null||e.length===0))if(t===null||t.length===0)t=e.slice();else{let n=-1;for(let r=0;r<e.length;r++){let i=e[r];typeof i=="number"?n=i:n===0||(n===-1||n===2?ff(t,n,i,null,e[++r]):ff(t,n,i,null,null))}}return t}function ff(t,e,n,r,i){let o=0,s=t.length;if(e===-1)s=-1;else for(;o<t.length;){let a=t[o++];if(typeof a=="number"){if(a===e){s=-1;break}else if(a>e){s=o-1;break}}}for(;o<t.length;){let a=t[o];if(typeof a=="number")break;if(a===n){if(r===null){i!==null&&(t[o+1]=i);return}else if(r===t[o+1]){t[o+2]=i;return}}o++,r!==null&&o++,i!==null&&o++}s!==-1&&(t.splice(s,0,e),o=s+1),t.splice(o++,0,n),r!==null&&t.splice(o++,0,r),i!==null&&t.splice(o++,0,i)}var Ja={},b1=class{injector;parentInjector;constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=Qs(n);let r=this.injector.get(t,Ja,n);return r!==Ja||e===Ja?r:this.parentInjector.get(t,e,n)}};function hm(t){return t!==ri}function Es(t){return t&32767}function w1(t){return t>>16}function xs(t,e){let n=w1(t),r=e;for(;n>0;)r=r[gi],n--;return r}var Gl=!0;function Ss(t){let e=Gl;return Gl=t,e}var E1=256,fm=E1-1,dm=5,x1=0,Cn={};function S1(t,e,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:n.hasOwnProperty(Fi)&&(r=n[Fi]),r==null&&(r=n[Fi]=x1++);let i=r&fm,o=1<<i;e.data[t+(i>>dm)]|=o}function Cs(t,e){let n=pm(t,e);if(n!==-1)return n;let r=e[dt];r.firstCreatePass&&(t.injectorIndex=e.length,Qa(r.data,t),Qa(e,null),Qa(r.blueprint,null));let i=Pu(t,e),o=t.injectorIndex;if(hm(i)){let s=Es(i),a=xs(i,e),l=a[dt].data;for(let u=0;u<8;u++)e[o+u]=a[s+u]|l[s+u]}return e[o+8]=i,o}function Qa(t,e){t.push(0,0,0,0,0,0,0,0,e)}function pm(t,e){return t.injectorIndex===-1||t.parent&&t.parent.injectorIndex===t.injectorIndex||e[t.injectorIndex+8]===null?-1:t.injectorIndex}function Pu(t,e){if(t.parent&&t.parent.injectorIndex!==-1)return t.parent.injectorIndex;let n=0,r=null,i=e;for(;i!==null;){if(r=bm(i),r===null)return ri;if(n++,i=i[gi],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return ri}function Wl(t,e,n){S1(t,e,n)}function gm(t,e,n){if(n&Ot.Optional||t!==void 0)return t;mu(e,"NodeInjector")}function mm(t,e,n,r){if(n&Ot.Optional&&r===void 0&&(r=null),(n&(Ot.Self|Ot.Host))===0){let i=t[Yi],o=Pe(void 0);try{return i?i.get(e,r,n&Ot.Optional):Ig(e,r,n&Ot.Optional)}finally{Pe(o)}}return gm(r,e,n)}function _m(t,e,n,r=Ot.Default,i){if(t!==null){if(e[mt]&2048&&!(r&Ot.Self)){let s=O1(t,e,n,r,Cn);if(s!==Cn)return s}let o=vm(t,e,n,r,Cn);if(o!==Cn)return o}return mm(e,n,r,i)}function vm(t,e,n,r,i){let o=I1(n);if(typeof o=="function"){if(!im(e,t,r))return r&Ot.Host?gm(i,n,r):mm(e,n,r,i);try{let s;if(s=o(r),s==null&&!(r&Ot.Optional))mu(n);else return s}finally{lm()}}else if(typeof o=="number"){let s=null,a=pm(t,e),l=ri,u=r&Ot.Host?e[mn][yn]:null;for((a===-1||r&Ot.SkipSelf)&&(l=a===-1?Pu(t,e):e[a+8],l===ri||!pf(r,!1)?a=-1:(s=e[dt],a=Es(l),e=xs(l,e)));a!==-1;){let f=e[dt];if(df(o,a,f.data)){let d=C1(a,e,n,s,r,u);if(d!==Cn)return d}l=e[a+8],l!==ri&&pf(r,e[dt].data[a+8]===u)&&df(o,a,e)?(s=f,a=Es(l),e=xs(l,e)):a=-1}}return i}function C1(t,e,n,r,i,o){let s=e[dt],a=s.data[t+8],l=r==null?mi(a)&&Gl:r!=s&&(a.type&3)!==0,u=i&Ot.Host&&o===a,f=ns(a,s,n,l,u);return f!==null?Xi(e,s,f,a):Cn}function ns(t,e,n,r,i){let o=t.providerIndexes,s=e.data,a=o&1048575,l=t.directiveStart,u=t.directiveEnd,f=o>>20,d=r?a:a+f,_=i?a+f:u;for(let y=d;y<_;y++){let x=s[y];if(y<l&&n===x||y>=l&&x.type===n)return y}if(i){let y=s[l];if(y&&Tn(y)&&y.type===n)return l}return null}function Xi(t,e,n,r){let i=t[n],o=e.data;if(p1(i)){let s=i;s.resolving&&lw(aw(o[n]));let a=Ss(s.canSeeViewProviders);s.resolving=!0;let l,u=s.injectImpl?Pe(s.injectImpl):null,f=im(t,r,Ot.Default);try{i=t[n]=s.factory(void 0,o,t,r),e.firstCreatePass&&n>=r.directiveStart&&f1(n,o[n],e)}finally{u!==null&&Pe(u),Ss(a),s.resolving=!1,lm()}}return i}function I1(t){if(typeof t=="string")return t.charCodeAt(0)||0;let e=t.hasOwnProperty(Fi)?t[Fi]:void 0;return typeof e=="number"?e>=0?e&fm:T1:e}function df(t,e,n){let r=1<<t;return!!(n[e+(t>>dm)]&r)}function pf(t,e){return!(t&Ot.Self)&&!(t&Ot.Host&&e)}var Bi=class{_tNode;_lView;constructor(t,e){this._tNode=t,this._lView=e}get(t,e,n){return _m(this._tNode,this._lView,t,Qs(n),e)}};function T1(){return new Bi(He(),xt())}function ym(t){return pu(()=>{let e=t.prototype.constructor,n=e[ds]||Zl(e),r=Object.prototype,i=Object.getPrototypeOf(t.prototype).constructor;for(;i&&i!==r;){let o=i[ds]||Zl(i);if(o&&o!==n)return o;i=Object.getPrototypeOf(i)}return o=>new o})}function Zl(t){return bg(t)?()=>{let e=Zl(Oe(t));return e&&e()}:Cr(t)}function O1(t,e,n,r,i){let o=t,s=e;for(;o!==null&&s!==null&&s[mt]&2048&&!bs(s);){let a=vm(o,s,n,r|Ot.Self,Cn);if(a!==Cn)return a;let l=o.parent;if(!l){let u=s[Bg];if(u){let f=u.get(n,Cn,r);if(f!==Cn)return f}l=bm(s),s=s[gi]}o=l}return i}function bm(t){let e=t[dt],n=e.type;return n===2?e.declTNode:n===1?t[yn]:null}function gf(t,e=null,n=null,r){let i=D1(t,e,n,r);return i.resolveInjectorInitializers(),i}function D1(t,e=null,n=null,r,i=new Set){let o=[n||Vn,Iw(t)];return r=r||(typeof t=="object"?void 0:hn(t)),new bu(o,e||ta(),r||null,i)}var De=class wm{static THROW_IF_NOT_FOUND=Wi;static NULL=new Rg;static create(e,n){if(Array.isArray(e))return gf({name:""},n,e,"");{let r=e.name??"";return gf({name:r},e.parent,e.providers,r)}}static \u0275prov=pt({token:wm,providedIn:"any",factory:()=>Vt(Og)});static __NG_ELEMENT_ID__=-1},R1=new St("");R1.__NG_ELEMENT_ID__=t=>{let e=He();if(e===null)throw new Nt(204,!1);if(e.type&2)return e.value;if(t&Ot.Optional)return null;throw new Nt(204,!1)};var Em=!1,ku=(()=>{class t{static __NG_ELEMENT_ID__=P1;static __NG_ENV_ID__=n=>n}return t})(),N1=class extends ku{_lView;constructor(t){super(),this._lView=t}onDestroy(t){return Kg(this._lView,t),()=>Ww(this._lView,t)}};function P1(){return new N1(xt())}var _i=class{},Au=new St("",{providedIn:"root",factory:()=>!1}),xm=new St(""),Lu=new St(""),aa=(()=>{class t{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new au(!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=pt({token:t,providedIn:"root",factory:()=>new t})}return t})(),k1=class extends vt{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(t=!1){super(),this.__isAsync=t,jg()&&(this.destroyRef=P(ku,{optional:!0})??void 0,this.pendingTasks=P(aa,{optional:!0})??void 0)}emit(t){let e=Tt(null);try{super.next(t)}finally{Tt(e)}}subscribe(t,e,n){let r=t,i=e||(()=>null),o=n;if(t&&typeof t=="object"){let a=t;r=a.next?.bind(a),i=a.error?.bind(a),o=a.complete?.bind(a)}this.__isAsync&&(i=this.wrapInTimeout(i),r&&(r=this.wrapInTimeout(r)),o&&(o=this.wrapInTimeout(o)));let s=super.subscribe({next:r,error:i,complete:o});return t instanceof me&&t.add(s),s}wrapInTimeout(t){return e=>{let n=this.pendingTasks?.add();setTimeout(()=>{t(e),n!==void 0&&this.pendingTasks?.remove(n)})}}},Xt=k1;function Is(...t){}function Sm(t){let e,n;function r(){t=Is;try{n!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(n),e!==void 0&&clearTimeout(e)}catch{}}return e=setTimeout(()=>{t(),r()}),typeof requestAnimationFrame=="function"&&(n=requestAnimationFrame(()=>{t(),r()})),()=>r()}function mf(t){return queueMicrotask(()=>t()),()=>{t=Is}}var Mu="isAngularZone",Ts=Mu+"_ID",A1=0,Wt=class Yl{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Xt(!1);onMicrotaskEmpty=new Xt(!1);onStable=new Xt(!1);onError=new Xt(!1);constructor(e){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:o=Em}=e;if(typeof Zone>"u")throw new Nt(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!i&&r,s.shouldCoalesceRunChangeDetection=i,s.callbackScheduled=!1,s.scheduleInRootZone=o,V1(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Mu)===!0}static assertInAngularZone(){if(!Yl.isInAngularZone())throw new Nt(909,!1)}static assertNotInAngularZone(){if(Yl.isInAngularZone())throw new Nt(909,!1)}run(e,n,r){return this._inner.run(e,n,r)}runTask(e,n,r,i){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+i,e,L1,Is,Is);try{return o.runTask(s,n,r)}finally{o.cancelTask(s)}}runGuarded(e,n,r){return this._inner.runGuarded(e,n,r)}runOutsideAngular(e){return this._outer.run(e)}},L1={};function Vu(t){if(t._nesting==0&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function M1(t){if(t.isCheckStableRunning||t.callbackScheduled)return;t.callbackScheduled=!0;function e(){Sm(()=>{t.callbackScheduled=!1,Kl(t),t.isCheckStableRunning=!0,Vu(t),t.isCheckStableRunning=!1})}t.scheduleInRootZone?Zone.root.run(()=>{e()}):t._outer.run(()=>{e()}),Kl(t)}function V1(t){let e=()=>{M1(t)},n=A1++;t._inner=t._inner.fork({name:"angular",properties:{[Mu]:!0,[Ts]:n,[Ts+n]:!0},onInvokeTask:(r,i,o,s,a,l)=>{if(j1(l))return r.invokeTask(o,s,a,l);try{return _f(t),r.invokeTask(o,s,a,l)}finally{(t.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||t.shouldCoalesceRunChangeDetection)&&e(),vf(t)}},onInvoke:(r,i,o,s,a,l,u)=>{try{return _f(t),r.invoke(o,s,a,l,u)}finally{t.shouldCoalesceRunChangeDetection&&!t.callbackScheduled&&!F1(l)&&e(),vf(t)}},onHasTask:(r,i,o,s)=>{r.hasTask(o,s),i===o&&(s.change=="microTask"?(t._hasPendingMicrotasks=s.microTask,Kl(t),Vu(t)):s.change=="macroTask"&&(t.hasPendingMacrotasks=s.macroTask))},onHandleError:(r,i,o,s)=>(r.handleError(o,s),t.runOutsideAngular(()=>t.onError.emit(s)),!1)})}function Kl(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&t.callbackScheduled===!0?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function _f(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function vf(t){t._nesting--,Vu(t)}var Cm=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Xt;onMicrotaskEmpty=new Xt;onStable=new Xt;onError=new Xt;run(t,e,n){return t.apply(e,n)}runGuarded(t,e,n){return t.apply(e,n)}runOutsideAngular(t){return t()}runTask(t,e,n,r){return t.apply(e,n)}};function j1(t){return Im(t,"__ignore_ng_zone__")}function F1(t){return Im(t,"__scheduler_tick__")}function Im(t,e){return!Array.isArray(t)||t.length!==1?!1:t[0]?.data?.[e]===!0}var vi=class{_console=console;handleError(t){this._console.error("ERROR",t)}},B1=new St("",{providedIn:"root",factory:()=>{let t=P(Wt),e=P(vi);return n=>t.runOutsideAngular(()=>e.handleError(n))}});function U1(){return yi(He(),xt())}function yi(t,e){return new Le(Dn(t,e))}var Le=(()=>{class t{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=U1}return t})();function H1(t){return t instanceof Le?t.nativeElement:t}function Ln(t,e){let n=W0(t),r=n[er];return e?.equal&&(r.equal=e.equal),n.set=i=>qp(r,i),n.update=i=>Z0(r,i),n.asReadonly=$1.bind(n),n}function $1(){let t=this[er];if(t.readonlyFn===void 0){let e=()=>this();e[er]=t,t.readonlyFn=e}return t.readonlyFn}function z1(){return this._results[Symbol.iterator]()}var q1=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 vt}constructor(t=!1){this._emitDistinctChangesOnly=t}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,e){this.dirty=!1;let n=bw(t);(this._changesDetected=!yw(this._results,n,e))&&(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(t){this._onDirty=t}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=z1};function Tm(t){return(t.flags&128)===128}var Om=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}(Om||{}),ju=new Map,G1=0;function W1(){return G1++}function Z1(t){ju.set(t[po],t)}function Dm(t){return ju.get(t)||null}function Xl(t){ju.delete(t[po])}var Y1=class{lViewId;nodeIndex;native;component;directives;localRefs;get lView(){return Dm(this.lViewId)}constructor(t,e,n){this.lViewId=t,this.nodeIndex=e,this.native=n}};function K1(t){let e=tl(t);if(e){if(An(e)){let n=e,r,i,o;if(Rm(t)){if(r=Q1(n,t),r==-1)throw new Error("The provided component was not found in the application");i=t}else if(X1(t)){if(r=tE(n,t),r==-1)throw new Error("The provided directive was not found in the application");o=eE(r,n)}else if(r=bf(n,t),r==-1)return null;let s=Be(n[r]),a=tl(s),l=a&&!Array.isArray(a)?a:yf(n,r,s);if(i&&l.component===void 0&&(l.component=i,In(l.component,l)),o&&l.directives===void 0){l.directives=o;for(let u=0;u<o.length;u++)In(o[u],l)}In(l.native,l),e=l}}else{let n=t,r=n;for(;r=r.parentNode;){let i=tl(r);if(i){let o=Array.isArray(i)?i:i.lView;if(!o)return null;let s=bf(o,n);if(s>=0){let a=Be(o[s]),l=yf(o,s,a);In(a,l),e=l;break}}}}return e||null}function yf(t,e,n){return new Y1(t[po],e,n)}var Jl="__ngContext__";function In(t,e){An(e)?(t[Jl]=e[po],Z1(e)):t[Jl]=e}function tl(t){let e=t[Jl];return typeof e=="number"?Dm(e):e||null}function Rm(t){return t&&t.constructor&&t.constructor.\u0275cmp}function X1(t){return t&&t.constructor&&t.constructor.\u0275dir}function bf(t,e){let n=t[dt];for(let r=ae;r<n.bindingStartIndex;r++)if(Be(t[r])===e)return r;return-1}function J1(t){if(t.child)return t.child;if(t.next)return t.next;for(;t.parent&&!t.parent.next;)t=t.parent;return t.parent&&t.parent.next}function Q1(t,e){let n=t[dt].components;if(n)for(let r=0;r<n.length;r++){let i=n[r];if(Je(i,t)[ce]===e)return i}else if(Je(ae,t)[ce]===e)return ae;return-1}function tE(t,e){let n=t[dt].firstChild;for(;n;){let r=n.directiveStart,i=n.directiveEnd;for(let o=r;o<i;o++)if(t[o]===e)return n.index;n=J1(n)}return-1}function eE(t,e){let n=e[dt].data[t];if(n.directiveStart===0)return Vn;let r=[];for(let i=n.directiveStart;i<n.directiveEnd;i++){let o=e[i];Rm(o)||r.push(o)}return r}function Nm(t){return km(t[Ki])}function Pm(t){return km(t[fn])}function km(t){for(;t!==null&&!zn(t);)t=t[fn];return t}var Ql;function nE(t){Ql=t}function Am(){if(Ql!==void 0)return Ql;if(typeof document<"u")return document;throw new Nt(210,!1)}var Fu=new St("",{providedIn:"root",factory:()=>rE}),rE="ng",Lm=new St(""),la=new St("",{providedIn:"platform",factory:()=>"unknown"}),iE=new St(""),Mm=new St("",{providedIn:"root",factory:()=>Am().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null}),oE="h",sE="b",Vm=!1,aE=new St("",{providedIn:"root",factory:()=>Vm}),Bu=function(t){return t[t.CHANGE_DETECTION=0]="CHANGE_DETECTION",t[t.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",t}(Bu||{}),yo=new St(""),wf=new Set;function Fr(t){wf.has(t)||(wf.add(t),performance?.mark?.("mark_feature_usage",{detail:{feature:t}}))}var jm=(()=>{class t{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=lE}return t})();function lE(){return new jm(xt(),He())}var Kr=function(t){return t[t.EarlyRead=0]="EarlyRead",t[t.Write=1]="Write",t[t.MixedReadWrite=2]="MixedReadWrite",t[t.Read=3]="Read",t}(Kr||{}),Fm=(()=>{class t{impl=null;execute(){this.impl?.execute()}static \u0275prov=pt({token:t,providedIn:"root",factory:()=>new t})}return t})(),cE=[Kr.EarlyRead,Kr.Write,Kr.MixedReadWrite,Kr.Read],uE=(()=>{class t{ngZone=P(Wt);scheduler=P(_i);errorHandler=P(vi,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){P(yo,{optional:!0})}execute(){let n=this.sequences.size>0;n&&zt(16),this.executing=!0;for(let r of cE)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[r]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=i.hooks[r];return o(i.pipelinedValue)},i.snapshot))}catch(o){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}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&&zt(17)}register(n){let{view:r}=n;r!==void 0?((r[ni]??=[]).push(n),mo(r),r[mt]|=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(Bu.AFTER_NEXT_RENDER,n):n()}static \u0275prov=pt({token:t,providedIn:"root",factory:()=>new t})}return t})(),hE=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(t,e,n,r,i,o=null){this.impl=t,this.hooks=e,this.view=n,this.once=r,this.snapshot=o,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 t=this.view?.[ni];t&&(this.view[ni]=t.filter(e=>e!==this))}};function Bm(t,e){!e?.injector&&Fg(Bm);let n=e?.injector??P(De);return Fr("NgAfterRender"),Um(t,n,e,!1)}function bo(t,e){!e?.injector&&Fg(bo);let n=e?.injector??P(De);return Fr("NgAfterNextRender"),Um(t,n,e,!0)}function fE(t,e){if(t instanceof Function){let n=[void 0,void 0,void 0,void 0];return n[e]=t,n}else return[t.earlyRead,t.write,t.mixedReadWrite,t.read]}function Um(t,e,n,r){let i=e.get(Fm);i.impl??=e.get(uE);let o=e.get(yo,null,{optional:!0}),s=n?.phase??Kr.MixedReadWrite,a=n?.manualCleanup!==!0?e.get(ku):null,l=e.get(jm,null,{optional:!0}),u=new hE(i.impl,fE(t,s),l?.view,r,a,o?.snapshot(null));return i.impl.register(u),u}var dE=()=>null;function Hm(t,e,n=!1){return dE(t,e,n)}function $m(t,e){let n=t.contentQueries;if(n!==null){let r=Tt(null);try{for(let i=0;i<n.length;i+=2){let o=n[i],s=n[i+1];if(s!==-1){let a=t.data[s];Tu(o),a.contentQueries(2,e[s],s)}}}finally{Tt(r)}}}function tc(t,e,n){Tu(0);let r=Tt(null);try{e(t,n)}finally{Tt(r)}}function Uu(t,e,n){if(wu(e)){let r=Tt(null);try{let i=e.directiveStart,o=e.directiveEnd;for(let s=i;s<o;s++){let a=t.data[s];if(a.contentQueries){let l=n[s];a.contentQueries(1,l,s)}}}finally{Tt(r)}}}var kn=function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}(kn||{}),Ao;function pE(){if(Ao===void 0&&(Ao=null,Gi.trustedTypes))try{Ao=Gi.trustedTypes.createPolicy("angular",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return Ao}function ca(t){return pE()?.createHTML(t)||t}var Lo;function gE(){if(Lo===void 0&&(Lo=null,Gi.trustedTypes))try{Lo=Gi.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return Lo}function Ef(t){return gE()?.createHTML(t)||t}var Br=class{changingThisBreaksApplicationSecurity;constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${vg})`}},mE=class extends Br{getTypeName(){return"HTML"}},_E=class extends Br{getTypeName(){return"Style"}},vE=class extends Br{getTypeName(){return"Script"}},yE=class extends Br{getTypeName(){return"URL"}},bE=class extends Br{getTypeName(){return"ResourceURL"}};function tr(t){return t instanceof Br?t.changingThisBreaksApplicationSecurity:t}function vr(t,e){let n=wE(t);if(n!=null&&n!==e){if(n==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${n} (see ${vg})`)}return n===e}function wE(t){return t instanceof Br&&t.getTypeName()||null}function EE(t){return new mE(t)}function xE(t){return new _E(t)}function SE(t){return new vE(t)}function CE(t){return new yE(t)}function IE(t){return new bE(t)}function TE(t){let e=new DE(t);return RE()?new OE(e):e}var OE=class{inertDocumentHelper;constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t="<body><remove></remove>"+t;try{let e=new window.DOMParser().parseFromString(ca(t),"text/html").body;return e===null?this.inertDocumentHelper.getInertBodyElement(t):(e.firstChild?.remove(),e)}catch{return null}}},DE=class{defaultDoc;inertDocument;constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){let e=this.inertDocument.createElement("template");return e.innerHTML=ca(t),e}};function RE(){try{return!!new window.DOMParser().parseFromString(ca(""),"text/html")}catch{return!1}}var NE=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Hu(t){return t=String(t),t.match(NE)?t:"unsafe:"+t}function qn(t){let e={};for(let n of t.split(","))e[n]=!0;return e}function wo(...t){let e={};for(let n of t)for(let r in n)n.hasOwnProperty(r)&&(e[r]=!0);return e}var zm=qn("area,br,col,hr,img,wbr"),qm=qn("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Gm=qn("rp,rt"),PE=wo(Gm,qm),kE=wo(qm,qn("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")),AE=wo(Gm,qn("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")),xf=wo(zm,kE,AE,PE),Wm=qn("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),LE=qn("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"),ME=qn("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"),VE=wo(Wm,LE,ME),jE=qn("script,style,template"),FE=class{sanitizedSomething=!1;buf=[];sanitizeChildren(t){let e=t.firstChild,n=!0,r=[];for(;e;){if(e.nodeType===Node.ELEMENT_NODE?n=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,n&&e.firstChild){r.push(e),e=HE(e);continue}for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let i=UE(e);if(i){e=i;break}e=r.pop()}}return this.buf.join("")}startElement(t){let e=Sf(t).toLowerCase();if(!xf.hasOwnProperty(e))return this.sanitizedSomething=!0,!jE.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);let n=t.attributes;for(let r=0;r<n.length;r++){let i=n.item(r),o=i.name,s=o.toLowerCase();if(!VE.hasOwnProperty(s)){this.sanitizedSomething=!0;continue}let a=i.value;Wm[s]&&(a=Hu(a)),this.buf.push(" ",o,'="',Cf(a),'"')}return this.buf.push(">"),!0}endElement(t){let e=Sf(t).toLowerCase();xf.hasOwnProperty(e)&&!zm.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(Cf(t))}};function BE(t,e){return(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function UE(t){let e=t.nextSibling;if(e&&t!==e.previousSibling)throw Zm(e);return e}function HE(t){let e=t.firstChild;if(e&&BE(t,e))throw Zm(e);return e}function Sf(t){let e=t.nodeName;return typeof e=="string"?e:"FORM"}function Zm(t){return new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`)}var $E=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,zE=/([^\#-~ |!])/g;function Cf(t){return t.replace(/&/g,"&amp;").replace($E,function(e){let n=e.charCodeAt(0),r=e.charCodeAt(1);return"&#"+((n-55296)*1024+(r-56320)+65536)+";"}).replace(zE,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Mo;function Ym(t,e){let n=null;try{Mo=Mo||TE(t);let r=e?String(e):"";n=Mo.getInertBodyElement(r);let i=5,o=r;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=n.innerHTML,n=Mo.getInertBodyElement(r)}while(r!==o);let s=new FE().sanitizeChildren(If(n)||n);return ca(s)}finally{if(n){let r=If(n)||n;for(;r.firstChild;)r.firstChild.remove()}}}function If(t){return"content"in t&&qE(t)?t.content:null}function qE(t){return t.nodeType===Node.ELEMENT_NODE&&t.nodeName==="TEMPLATE"}var Pn=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}(Pn||{});function Ur(t){let e=Km();return e?Ef(e.sanitize(Pn.HTML,t)||""):vr(t,"HTML")?Ef(tr(t)):Ym(Am(),ho(t))}function rn(t){let e=Km();return e?e.sanitize(Pn.URL,t)||"":vr(t,"URL")?tr(t):Hu(ho(t))}function Km(){let t=xt();return t&&t[Fn].sanitizer}var GE=/^>|^->|<!--|-->|--!>|<!-$/g,WE=/(<|>)/g,ZE="\u200B$1\u200B";function YE(t){return t.replace(GE,e=>e.replace(WE,ZE))}function KE(t){return t.ownerDocument.defaultView}function XE(t,e,n){let r=t.length;for(;;){let i=t.indexOf(e,n);if(i===-1)return i;if(i===0||t.charCodeAt(i-1)<=32){let o=e.length;if(i+o===r||t.charCodeAt(i+o)<=32)return i}n=i+1}}var Xm="ng-template";function JE(t,e,n,r){let i=0;if(r){for(;i<e.length&&typeof e[i]=="string";i+=2)if(e[i]==="class"&&XE(e[i+1].toLowerCase(),n,0)!==-1)return!0}else if($u(t))return!1;if(i=e.indexOf(1,i),i>-1){let o;for(;++i<e.length&&typeof(o=e[i])=="string";)if(o.toLowerCase()===n)return!0}return!1}function $u(t){return t.type===4&&t.value!==Xm}function QE(t,e,n){let r=t.type===4&&!n?Xm:t.value;return e===r}function tx(t,e,n){let r=4,i=t.attrs,o=i!==null?rx(i):0,s=!1;for(let a=0;a<e.length;a++){let l=e[a];if(typeof l=="number"){if(!s&&!an(r)&&!an(l))return!1;if(s&&an(l))continue;s=!1,r=l|r&1;continue}if(!s)if(r&4){if(r=2|r&1,l!==""&&!QE(t,l,n)||l===""&&e.length===1){if(an(r))return!1;s=!0}}else if(r&8){if(i===null||!JE(t,i,l,n)){if(an(r))return!1;s=!0}}else{let u=e[++a],f=ex(l,i,$u(t),n);if(f===-1){if(an(r))return!1;s=!0;continue}if(u!==""){let d;if(f>o?d="":d=i[f+1].toLowerCase(),r&2&&u!==d){if(an(r))return!1;s=!0}}}}return an(r)||s}function an(t){return(t&1)===0}function ex(t,e,n,r){if(e===null)return-1;let i=0;if(r||!n){let o=!1;for(;i<e.length;){let s=e[i];if(s===t)return i;if(s===3||s===6)o=!0;else if(s===1||s===2){let a=e[++i];for(;typeof a=="string";)a=e[++i];continue}else{if(s===4)break;if(s===0){i+=4;continue}}i+=o?1:2}return-1}else return ix(e,t)}function nx(t,e,n=!1){for(let r=0;r<e.length;r++)if(tx(t,e[r],n))return!0;return!1}function rx(t){for(let e=0;e<t.length;e++){let n=t[e];if(v1(n))return e}return t.length}function ix(t,e){let n=t.indexOf(4);if(n>-1)for(n++;n<t.length;){let r=t[n];if(typeof r=="number")return-1;if(r===e)return n;n++}return-1}function Tf(t,e){return t?":not("+e.trim()+")":e}function ox(t){let e=t[0],n=1,r=2,i="",o=!1;for(;n<t.length;){let s=t[n];if(typeof s=="string")if(r&2){let a=t[++n];i+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else r&8?i+="."+s:r&4&&(i+=" "+s);else i!==""&&!an(s)&&(e+=Tf(o,i),i=""),r=s,o=o||!an(r);n++}return i!==""&&(e+=Tf(o,i)),e}function sx(t){return t.map(ox).join(",")}function ax(t){let e=[],n=[],r=1,i=2;for(;r<t.length;){let o=t[r];if(typeof o=="string")i===2?o!==""&&e.push(o,t[++r]):i===8&&n.push(o);else{if(!an(i))break;i=o}r++}return n.length&&e.push(1,...n),e}var Gn={};function lx(t,e){return t.createText(e)}function cx(t,e,n){t.setValue(e,n)}function ux(t,e){return t.createComment(YE(e))}function Jm(t,e,n){return t.createElement(e,n)}function Os(t,e,n,r,i){t.insertBefore(e,n,r,i)}function Qm(t,e,n){t.appendChild(e,n)}function Of(t,e,n,r,i){r!==null?Os(t,e,n,r,i):Qm(t,e,n)}function hx(t,e,n){t.removeChild(null,e,n)}function fx(t,e,n){t.setAttribute(e,"style",n)}function dx(t,e,n){n===""?t.removeAttribute(e,"class"):t.setAttribute(e,"class",n)}function t_(t,e,n){let{mergedAttrs:r,classes:i,styles:o}=n;r!==null&&_1(t,e,r),i!==null&&dx(t,e,i),o!==null&&fx(t,e,o)}function zu(t,e,n,r,i,o,s,a,l,u,f){let d=ae+r,_=d+i,y=px(d,_),x=typeof u=="function"?u():u;return y[dt]={type:t,blueprint:y,template:n,queries:null,viewQuery:a,declTNode:e,data:y.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:_,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 o=="function"?o():o,pipeRegistry:typeof s=="function"?s():s,firstChild:null,schemas:l,consts:x,incompleteFirstPass:!1,ssrId:f}}function px(t,e){let n=[];for(let r=0;r<e;r++)n.push(r<t?null:Gn);return n}function gx(t){let e=t.tView;return e===null||e.incompleteFirstPass?t.tView=zu(1,null,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts,t.id):e}function qu(t,e,n,r,i,o,s,a,l,u,f){let d=e.blueprint.slice();return d[$n]=i,d[mt]=r|4|128|8|64|1024,(u!==null||t&&t[mt]&2048)&&(d[mt]|=2048),Yg(d),d[Ie]=d[gi]=t,d[ce]=n,d[Fn]=s||t&&t[Fn],d[ve]=a||t&&t[ve],d[Yi]=l||t&&t[Yi]||null,d[yn]=o,d[po]=W1(),d[Zi]=f,d[Bg]=u,d[mn]=e.type==2?t[mn]:d,d}function mx(t,e,n){let r=Dn(e,t),i=gx(n),o=t[Fn].rendererFactory,s=Gu(t,qu(t,i,null,e_(n),r,e,null,o.createRenderer(r,n),null,null,null));return t[e.index]=s}function e_(t){let e=16;return t.signals?e=4096:t.onPush&&(e=64),e}function n_(t,e,n,r){if(n===0)return-1;let i=e.length;for(let o=0;o<n;o++)e.push(r),t.blueprint.push(r),t.data.push(null);return i}function Gu(t,e){return t[Ki]?t[cf][fn]=e:t[Ki]=e,t[cf]=e,e}function Y(t=1){r_(pe(),xt(),hr()+t,!1)}function r_(t,e,n,r){if(!r)if((e[mt]&3)===3){let i=t.preOrderCheckHooks;i!==null&&ts(e,i,n)}else{let i=t.preOrderHooks;i!==null&&es(e,i,0,n)}Nr(n)}var ua=function(t){return t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",t}(ua||{});function ec(t,e,n,r){let i=Tt(null);try{let[o,s,a]=t.inputs[n],l=null;(s&ua.SignalBased)!==0&&(l=e[o][er]),l!==null&&l.transformFn!==void 0?r=l.transformFn(r):a!==null&&(r=a.call(e,r)),t.setInput!==null?t.setInput(e,l,r,n,o):Hg(e,l,o,r)}finally{Tt(i)}}function i_(t,e,n,r,i){let o=hr(),s=r&2;try{Nr(-1),s&&e.length>ae&&r_(t,e,ae,!1),zt(s?2:0,i),n(r,i)}finally{Nr(o),zt(s?3:1,i)}}function ha(t,e,n){Ex(t,e,n),(n.flags&64)===64&&xx(t,e,n)}function Wu(t,e,n=Dn){let r=e.localNames;if(r!==null){let i=e.index+1;for(let o=0;o<r.length;o+=2){let s=r[o+1],a=s===-1?n(e,t):t[s];t[i++]=a}}}function _x(t,e,n,r){let i=r.get(aE,Vm)||n===kn.ShadowDom,o=t.selectRootElement(e,i);return vx(o),o}function vx(t){yx(t)}var yx=()=>null;function bx(t){return t==="class"?"className":t==="for"?"htmlFor":t==="formaction"?"formAction":t==="innerHtml"?"innerHTML":t==="readonly"?"readOnly":t==="tabindex"?"tabIndex":t}function o_(t,e,n,r,i,o,s,a){if(!a&&Yu(e,t,n,r,i)){mi(e)&&wx(n,e.index);return}if(e.type&3){let l=Dn(e,n);r=bx(r),i=s!=null?s(i,e.value||"",r):i,o.setProperty(l,r,i)}else e.type&12}function wx(t,e){let n=Je(e,t);n[mt]&16||(n[mt]|=64)}function Ex(t,e,n){let r=n.directiveStart,i=n.directiveEnd;mi(n)&&mx(e,n,t.data[r+n.componentOffset]),t.firstCreatePass||Cs(n,e);let o=n.initialInputs;for(let s=r;s<i;s++){let a=t.data[s],l=Xi(e,t,s,n);if(In(l,e),o!==null&&Tx(e,s-r,l,a,n,o),Tn(a)){let u=Je(n.index,e);u[ce]=Xi(e,t,s,n)}}}function xx(t,e,n){let r=n.directiveStart,i=n.directiveEnd,o=n.index,s=s1();try{Nr(o);for(let a=r;a<i;a++){let l=t.data[a],u=e[a];ql(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&Sx(l,u)}}finally{Nr(-1),ql(s)}}function Sx(t,e){t.hostBindings!==null&&t.hostBindings(1,e)}function Zu(t,e){let n=t.directiveRegistry,r=null;if(n)for(let i=0;i<n.length;i++){let o=n[i];nx(e,o.selectors,!1)&&(r??=[],Tn(o)?r.unshift(o):r.push(o))}return r}function Cx(t,e,n,r,i,o){let s=Dn(t,e);Ix(e[ve],s,o,t.value,n,r,i)}function Ix(t,e,n,r,i,o,s){if(o==null)t.removeAttribute(e,i,n);else{let a=s==null?ho(o):s(o,r||"",i);t.setAttribute(e,i,a,n)}}function Tx(t,e,n,r,i,o){let s=o[e];if(s!==null)for(let a=0;a<s.length;a+=2){let l=s[a],u=s[a+1];ec(r,n,l,u)}}function s_(t,e){let n=t[Yi],r=n?n.get(vi,null):null;r&&r.handleError(e)}function Yu(t,e,n,r,i){let o=t.inputs?.[r],s=t.hostDirectiveInputs?.[r],a=!1;if(s)for(let l=0;l<s.length;l+=2){let u=s[l],f=s[l+1],d=e.data[u];ec(d,n[u],f,i),a=!0}if(o)for(let l of o){let u=n[l],f=e.data[l];ec(f,u,r,i),a=!0}return a}function Ox(t,e){let n=Je(e,t),r=n[dt];Dx(r,n);let i=n[$n];i!==null&&n[Zi]===null&&(n[Zi]=Hm(i,n[Yi])),zt(18),Ku(r,n,n[ce]),zt(19,n[ce])}function Dx(t,e){for(let n=e.length;n<t.blueprint.length;n++)e.push(t.blueprint[n])}function Ku(t,e,n){Ou(e);try{let r=t.viewQuery;r!==null&&tc(1,r,n);let i=t.template;i!==null&&i_(t,e,i,1,n),t.firstCreatePass&&(t.firstCreatePass=!1),e[Bn]?.finishViewCreation(t),t.staticContentQueries&&$m(t,e),t.staticViewQueries&&tc(2,t.viewQuery,n);let o=t.components;o!==null&&Rx(e,o)}catch(r){throw t.firstCreatePass&&(t.incompleteFirstPass=!0,t.firstCreatePass=!1),r}finally{e[mt]&=-5,Du()}}function Rx(t,e){for(let n=0;n<e.length;n++)Ox(t,e[n])}function fa(t,e,n,r){let i=Tt(null);try{let o=e.tView,s=t[mt]&4096?4096:16,a=qu(t,o,n,s,null,e,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null),l=t[e.index];a[Or]=l;let u=t[Bn];return u!==null&&(a[Bn]=u.createEmbeddedView(o)),Ku(o,a,n),a}finally{Tt(i)}}function Ji(t,e){return!e||e.firstChild===null||Tm(t)}var Nx;function Xu(t,e){return Nx(t,e)}var br=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}(br||{});function a_(t){return(t.flags&32)===32}function Xr(t,e,n,r,i){if(r!=null){let o,s=!1;zn(r)?o=r:An(r)&&(s=!0,r=r[$n]);let a=Be(r);t===0&&n!==null?i==null?Qm(e,n,a):Os(e,n,a,i||null,!0):t===1&&n!==null?Os(e,n,a,i||null,!0):t===2?hx(e,a,s):t===3&&e.destroyNode(a),o!=null&&$x(e,t,o,n,i)}}function Px(t,e){l_(t,e),e[$n]=null,e[yn]=null}function kx(t,e,n,r,i,o){r[$n]=i,r[yn]=e,ga(t,r,n,1,i,o)}function l_(t,e){e[Fn].changeDetectionScheduler?.notify(9),ga(t,e,e[ve],2,null,null)}function Ax(t){let e=t[Ki];if(!e)return el(t[dt],t);for(;e;){let n=null;if(An(e))n=e[Ki];else{let r=e[Ce];r&&(n=r)}if(!n){for(;e&&!e[fn]&&e!==t;)An(e)&&el(e[dt],e),e=e[Ie];e===null&&(e=t),An(e)&&el(e[dt],e),n=e&&e[fn]}e=n}}function Ju(t,e){let n=t[li],r=n.indexOf(e);n.splice(r,1)}function da(t,e){if(go(e))return;let n=e[ve];n.destroyNode&&ga(t,e,n,3,null,null),Ax(e)}function el(t,e){if(go(e))return;let n=Tt(null);try{e[mt]&=-129,e[mt]|=256,e[je]&&Fp(e[je]),Mx(t,e),Lx(t,e),e[dt].type===1&&e[ve].destroy();let r=e[Or];if(r!==null&&zn(e[Ie])){r!==e[Ie]&&Ju(r,e);let i=e[Bn];i!==null&&i.detachView(t)}Xl(e)}finally{Tt(n)}}function Lx(t,e){let n=t.cleanup,r=e[_s];if(n!==null)for(let s=0;s<n.length-1;s+=2)if(typeof n[s]=="string"){let a=n[s+3];a>=0?r[a]():r[-a].unsubscribe(),s+=2}else{let a=r[n[s+1]];n[s].call(a)}r!==null&&(e[_s]=null);let i=e[rr];if(i!==null){e[rr]=null;for(let s=0;s<i.length;s++){let a=i[s];a()}}let o=e[vs];if(o!==null){e[vs]=null;for(let s of o)s.destroy()}}function Mx(t,e){let n;if(t!=null&&(n=t.destroyHooks)!=null)for(let r=0;r<n.length;r+=2){let i=e[n[r]];if(!(i instanceof vo)){let o=n[r+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=i[o[s]],l=o[s+1];zt(4,a,l);try{l.call(a)}finally{zt(5,a,l)}}else{zt(4,i,o);try{o.call(i)}finally{zt(5,i,o)}}}}}function Vx(t,e,n){return jx(t,e.parent,n)}function jx(t,e,n){let r=e;for(;r!==null&&r.type&168;)e=r,r=e.parent;if(r===null)return n[$n];if(mi(r)){let{encapsulation:i}=t.data[r.directiveStart+r.componentOffset];if(i===kn.None||i===kn.Emulated)return null}return Dn(r,n)}function Fx(t,e,n){return Ux(t,e,n)}function Bx(t,e,n){return t.type&40?Dn(t,n):null}var Ux=Bx,Df;function pa(t,e,n,r){let i=Vx(t,r,e),o=e[ve],s=r.parent||e[yn],a=Fx(s,r,e);if(i!=null)if(Array.isArray(n))for(let l=0;l<n.length;l++)Of(o,i,n[l],a,!1);else Of(o,i,n,a,!1);Df!==void 0&&Df(o,r,e,n,i)}function Li(t,e){if(e!==null){let n=e.type;if(n&3)return Dn(e,t);if(n&4)return nc(-1,t[e.index]);if(n&8){let r=e.child;if(r!==null)return Li(t,r);{let i=t[e.index];return zn(i)?nc(-1,i):Be(i)}}else{if(n&128)return Li(t,e.next);if(n&32)return Xu(e,t)()||Be(t[e.index]);{let r=c_(t,e);if(r!==null){if(Array.isArray(r))return r[0];let i=Rr(t[mn]);return Li(i,r)}else return Li(t,e.next)}}}return null}function c_(t,e){if(e!==null){let n=t[mn][yn],r=e.projection;return n.projection[r]}return null}function nc(t,e){let n=Ce+t+1;if(n<e.length){let r=e[n],i=r[dt].firstChild;if(i!==null)return Li(r,i)}return e[Dr]}function Qu(t,e,n,r,i,o,s){for(;n!=null;){if(n.type===128){n=n.next;continue}let a=r[n.index],l=n.type;if(s&&e===0&&(a&&In(Be(a),r),n.flags|=2),!a_(n))if(l&8)Qu(t,e,n.child,r,i,o,!1),Xr(e,t,i,a,o);else if(l&32){let u=Xu(n,r),f;for(;f=u();)Xr(e,t,i,f,o);Xr(e,t,i,a,o)}else l&16?Hx(t,e,r,n,i,o):Xr(e,t,i,a,o);n=s?n.projectionNext:n.next}}function ga(t,e,n,r,i,o){Qu(n,r,t.firstChild,e,i,o,!1)}function Hx(t,e,n,r,i,o){let s=n[mn],a=s[yn].projection[r.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++){let u=a[l];Xr(e,t,i,u,o)}else{let l=a,u=s[Ie];Tm(r)&&(l.flags|=128),Qu(t,e,l,u,i,o,!0)}}function $x(t,e,n,r,i){let o=n[Dr],s=Be(n);o!==s&&Xr(e,t,r,o,i);for(let a=Ce;a<n.length;a++){let l=n[a];ga(l[dt],l,t,e,r,o)}}function zx(t,e,n,r,i){if(e)i?t.addClass(n,r):t.removeClass(n,r);else{let o=r.indexOf("-")===-1?void 0:br.DashCase;i==null?t.removeStyle(n,r,o):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),o|=br.Important),t.setStyle(n,r,i,o))}}function Ds(t,e,n,r,i=!1){for(;n!==null;){if(n.type===128){n=i?n.projectionNext:n.next;continue}let o=e[n.index];o!==null&&r.push(Be(o)),zn(o)&&qx(o,r);let s=n.type;if(s&8)Ds(t,e,n.child,r);else if(s&32){let a=Xu(n,e),l;for(;l=a();)r.push(l)}else if(s&16){let a=c_(e,n);if(Array.isArray(a))r.push(...a);else{let l=Rr(e[mn]);Ds(l[dt],l,a,r,!0)}}n=i?n.projectionNext:n.next}return r}function qx(t,e){for(let n=Ce;n<t.length;n++){let r=t[n],i=r[dt].firstChild;i!==null&&Ds(r[dt],r,i,e)}t[Dr]!==t[$n]&&e.push(t[Dr])}function u_(t){if(t[ni]!==null){for(let e of t[ni])e.impl.addSequence(e);t[ni].length=0}}var h_=[];function Gx(t){return t[je]??Wx(t)}function Wx(t){let e=h_.pop()??Object.create(Yx);return e.lView=t,e}function Zx(t){t.lView[je]!==t&&(t.lView=null,h_.push(t))}var Yx=Zt(j({},ru),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:t=>{mo(t.lView)},consumerOnSignalRead(){this.lView[je]=this}});function Kx(t){let e=t[je]??Object.create(Xx);return e.lView=t,e}var Xx=Zt(j({},ru),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:t=>{let e=Rr(t.lView);for(;e&&!f_(e[dt]);)e=Rr(e);e&&Su(e)},consumerOnSignalRead(){this.lView[je]=this}});function f_(t){return t.type!==2}function d_(t){if(t[vs]===null)return;let e=!0;for(;e;){let n=!1;for(let r of t[vs])r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));e=n&&!!(t[mt]&8192)}}var Jx=100;function p_(t,e=!0,n=0){let r=t[Fn].rendererFactory,i=!1;i||r.begin?.();try{Qx(t,n)}catch(o){throw e&&s_(t,o),o}finally{i||r.end?.()}}function Qx(t,e){let n=nm();try{uf(!0),rc(t,e);let r=0;for(;ra(t);){if(r===Jx)throw new Nt(103,!1);r++,rc(t,1)}}finally{uf(n)}}function tS(t,e,n,r){if(go(e))return;let i=e[mt],o=!1,s=!1;Ou(e);let a=!0,l=null,u=null;o||(f_(t)?(u=Gx(e),l=Yh(u)):j0()===null?(a=!1,u=Kx(e),l=Yh(u)):e[je]&&(Fp(e[je]),e[je]=null));try{Yg(e),n1(t.bindingStartIndex),n!==null&&i_(t,e,n,2,r);let f=(i&3)===3;if(!o)if(f){let y=t.preOrderCheckHooks;y!==null&&ts(e,y,null)}else{let y=t.preOrderHooks;y!==null&&es(e,y,0,null),Xa(e,0)}if(s||eS(e),d_(e),g_(e,0),t.contentQueries!==null&&$m(t,e),!o)if(f){let y=t.contentCheckHooks;y!==null&&ts(e,y)}else{let y=t.contentHooks;y!==null&&es(e,y,1),Xa(e,1)}rS(t,e);let d=t.components;d!==null&&__(e,d,0);let _=t.viewQuery;if(_!==null&&tc(2,_,r),!o)if(f){let y=t.viewCheckHooks;y!==null&&ts(e,y)}else{let y=t.viewHooks;y!==null&&es(e,y,2),Xa(e,2)}if(t.firstUpdatePass===!0&&(t.firstUpdatePass=!1),e[Ka]){for(let y of e[Ka])y();e[Ka]=null}o||(u_(e),e[mt]&=-73)}catch(f){throw o||mo(e),f}finally{u!==null&&($0(u,l),a&&Zx(u)),Du()}}function g_(t,e){for(let n=Nm(t);n!==null;n=Pm(n))for(let r=Ce;r<n.length;r++){let i=n[r];m_(i,e)}}function eS(t){for(let e=Nm(t);e!==null;e=Pm(e)){if(!(e[mt]&2))continue;let n=e[li];for(let r=0;r<n.length;r++){let i=n[r];Su(i)}}}function nS(t,e,n){zt(18);let r=Je(e,t);m_(r,n),zt(19,r[ce])}function m_(t,e){xu(t)&&rc(t,e)}function rc(t,e){let n=t[dt],r=t[mt],i=t[je],o=!!(e===0&&r&16);if(o||=!!(r&64&&e===0),o||=!!(r&1024),o||=!!(i?.dirty&&jp(i)),o||=!1,i&&(i.dirty=!1),t[mt]&=-9217,o)tS(n,t,n.template,t[ce]);else if(r&8192){d_(t),g_(t,1);let s=n.components;s!==null&&__(t,s,1),u_(t)}}function __(t,e,n){for(let r=0;r<e.length;r++)nS(t,e[r],n)}function rS(t,e){let n=t.hostBindingOpCodes;if(n!==null)try{for(let r=0;r<n.length;r++){let i=n[r];if(i<0)Nr(~i);else{let o=i,s=n[++r],a=n[++r];o1(s,o);let l=e[o];zt(24,l),a(2,l),zt(25,l)}}}finally{Nr(-1)}}function th(t,e){let n=nm()?64:1088;for(t[Fn].changeDetectionScheduler?.notify(e);t;){t[mt]|=n;let r=Rr(t);if(bs(t)&&!r)return t;t=r}return null}function v_(t,e,n,r){return[t,!0,0,e,null,r,null,n,null,null]}function y_(t,e){let n=Ce+e;if(n<t.length)return t[n]}function ma(t,e,n,r=!0){let i=e[dt];if(iS(i,e,t,n),r){let s=nc(n,t),a=e[ve],l=a.parentNode(t[Dr]);l!==null&&kx(i,t[yn],a,e,l,s)}let o=e[Zi];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function b_(t,e){let n=Qi(t,e);return n!==void 0&&da(n[dt],n),n}function Qi(t,e){if(t.length<=Ce)return;let n=Ce+e,r=t[n];if(r){let i=r[Or];i!==null&&i!==t&&Ju(i,r),e>0&&(t[n-1][fn]=r[fn]);let o=gs(t,Ce+e);Px(r[dt],r);let s=o[Bn];s!==null&&s.detachView(o[dt]),r[Ie]=null,r[fn]=null,r[mt]&=-129}return r}function iS(t,e,n,r){let i=Ce+r,o=n.length;r>0&&(n[i-1][fn]=e),r<o-Ce?(e[fn]=n[i],Tg(n,Ce+r,e)):(n.push(e),e[fn]=null),e[Ie]=n;let s=e[Or];s!==null&&n!==s&&w_(s,e);let a=e[Bn];a!==null&&a.insertView(t),$l(e),e[mt]|=128}function w_(t,e){let n=t[li],r=e[Ie];if(An(r))t[mt]|=2;else{let i=r[Ie][mn];e[mn]!==i&&(t[mt]|=2)}n===null?t[li]=[e]:n.push(e)}var to=class{_lView;_cdRefInjectingView;notifyErrorHandler;_appRef=null;_attachedToViewContainer=!1;get rootNodes(){let t=this._lView,e=t[dt];return Ds(e,t,e.firstChild,[])}constructor(t,e,n=!0){this._lView=t,this._cdRefInjectingView=e,this.notifyErrorHandler=n}get context(){return this._lView[ce]}get dirty(){return!!(this._lView[mt]&9280)||!!this._lView[je]?.dirty}set context(t){this._lView[ce]=t}get destroyed(){return go(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let t=this._lView[Ie];if(zn(t)){let e=t[ys],n=e?e.indexOf(this):-1;n>-1&&(Qi(t,n),gs(e,n))}this._attachedToViewContainer=!1}da(this._lView[dt],this._lView)}onDestroy(t){Kg(this._lView,t)}markForCheck(){th(this._cdRefInjectingView||this._lView,4)}markForRefresh(){Su(this._cdRefInjectingView||this._lView)}detach(){this._lView[mt]&=-129}reattach(){$l(this._lView),this._lView[mt]|=128}detectChanges(){this._lView[mt]|=1024,p_(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Nt(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let t=bs(this._lView),e=this._lView[Or];e!==null&&!t&&Ju(e,this._lView),l_(this._lView[dt],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new Nt(902,!1);this._appRef=t;let e=bs(this._lView),n=this._lView[Or];n!==null&&!e&&w_(n,this._lView),$l(this._lView)}},eo=(()=>{class t{static __NG_ELEMENT_ID__=aS}return t})(),oS=eo,sS=class extends oS{_declarationLView;_declarationTContainer;elementRef;constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,e){return this.createEmbeddedViewImpl(t,e)}createEmbeddedViewImpl(t,e,n){let r=fa(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:e,dehydratedView:n});return new to(r)}};function aS(){return _a(He(),xt())}function _a(t,e){return t.type&4?new sS(e,t,yi(t,e)):null}function Eo(t,e,n,r,i){let o=t.data[e];if(o===null)o=lS(t,e,n,r,i),i1()&&(o.flags|=32);else if(o.type&64){o.type=n,o.value=r,o.attrs=i;let s=e1();o.injectorIndex=s===null?-1:s.injectorIndex}return ur(o,!0),o}function lS(t,e,n,r,i){let o=Qg(),s=Iu(),a=s?o:o&&o.parent,l=t.data[e]=uS(t,a,n,e,r,i);return cS(t,l,o,s),l}function cS(t,e,n,r){t.firstChild===null&&(t.firstChild=e),n!==null&&(r?n.child==null&&e.parent!==null&&(n.child=e):n.next===null&&(n.next=e,e.prev=n))}function uS(t,e,n,r,i,o){let s=e?e.injectorIndex:-1,a=0;return Jw()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:o,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:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var YA=new RegExp(`^(\\d+)*(${sE}|${oE})*(.*)`),hS=()=>null;function no(t,e){return hS(t,e)}var fS=class{},E_=class{},dS=class{resolveComponentFactory(t){throw Error(`No component factory found for ${hn(t)}.`)}},xo=class{static NULL=new dS},bn=class{},x_=(()=>{class t{destroyNode=null;static __NG_ELEMENT_ID__=()=>pS()}return t})();function pS(){let t=xt(),e=He(),n=Je(e.index,t);return(An(n)?n:t)[ve]}var gS=(()=>{class t{static \u0275prov=pt({token:t,providedIn:"root",factory:()=>null})}return t})();function ic(t,e,n){let r=n?t.styles:null,i=n?t.classes:null,o=0;if(e!==null)for(let s=0;s<e.length;s++){let a=e[s];if(typeof a=="number")o=a;else if(o==1)i=nf(i,a);else if(o==2){let l=a,u=e[++s];r=nf(r,l+": "+u+";")}}n?t.styles=r:t.stylesWithoutHost=r,n?t.classes=i:t.classesWithoutHost=i}function Ee(t,e=Ot.Default){let n=xt();if(n===null)return Vt(t,e);let r=He();return _m(r,n,Oe(t),e)}function eh(t,e,n,r,i){let o=r===null?null:{"":-1},s=i(t,n);if(s!==null){let a,l=null,u=null,f=_S(s);f===null?a=s:[a,l,u]=f,bS(t,e,n,a,o,l,u)}o!==null&&r!==null&&mS(n,r,o)}function mS(t,e,n){let r=t.localNames=[];for(let i=0;i<e.length;i+=2){let o=n[e[i+1]];if(o==null)throw new Nt(-301,!1);r.push(e[i],o)}}function _S(t){let e=null,n=!1;for(let s=0;s<t.length;s++){let a=t[s];if(s===0&&Tn(a)&&(e=a),a.findHostDirectiveDefs!==null){n=!0;break}}if(!n)return null;let r=null,i=null,o=null;for(let s of t)s.findHostDirectiveDefs!==null&&(r??=[],i??=new Map,o??=new Map,vS(s,r,o,i)),s===e&&(r??=[],r.push(s));return r!==null?(r.push(...e===null?t:t.slice(1)),[r,i,o]):null}function vS(t,e,n,r){let i=e.length;t.findHostDirectiveDefs(t,e,r),n.set(t,[i,e.length-1])}function yS(t,e,n){e.componentOffset=n,(t.components??=[]).push(e.index)}function bS(t,e,n,r,i,o,s){let a=r.length,l=!1;for(let _=0;_<a;_++){let y=r[_];!l&&Tn(y)&&(l=!0,yS(t,n,_)),Wl(Cs(n,e),t,y.type)}IS(n,t.data.length,a);for(let _=0;_<a;_++){let y=r[_];y.providersResolver&&y.providersResolver(y)}let u=!1,f=!1,d=n_(t,e,a,null);a>0&&(n.directiveToIndex=new Map);for(let _=0;_<a;_++){let y=r[_];if(n.mergedAttrs=ci(n.mergedAttrs,y.hostAttrs),ES(t,n,e,d,y),CS(d,y,i),s!==null&&s.has(y)){let[I,V]=s.get(y);n.directiveToIndex.set(y.type,[d,I+n.directiveStart,V+n.directiveStart])}else(o===null||!o.has(y))&&n.directiveToIndex.set(y.type,d);y.contentQueries!==null&&(n.flags|=4),(y.hostBindings!==null||y.hostAttrs!==null||y.hostVars!==0)&&(n.flags|=64);let x=y.type.prototype;!u&&(x.ngOnChanges||x.ngOnInit||x.ngDoCheck)&&((t.preOrderHooks??=[]).push(n.index),u=!0),!f&&(x.ngOnChanges||x.ngDoCheck)&&((t.preOrderCheckHooks??=[]).push(n.index),f=!0),d++}wS(t,n,o)}function wS(t,e,n){for(let r=e.directiveStart;r<e.directiveEnd;r++){let i=t.data[r];if(n===null||!n.has(i))Rf(0,e,i,r),Rf(1,e,i,r),Pf(e,r,!1);else{let o=n.get(i);Nf(0,e,o,r),Nf(1,e,o,r),Pf(e,r,!0)}}}function Rf(t,e,n,r){let i=t===0?n.inputs:n.outputs;for(let o in i)if(i.hasOwnProperty(o)){let s;t===0?s=e.inputs??={}:s=e.outputs??={},s[o]??=[],s[o].push(r),S_(e,o)}}function Nf(t,e,n,r){let i=t===0?n.inputs:n.outputs;for(let o in i)if(i.hasOwnProperty(o)){let s=i[o],a;t===0?a=e.hostDirectiveInputs??={}:a=e.hostDirectiveOutputs??={},a[s]??=[],a[s].push(r,o),S_(e,s)}}function S_(t,e){e==="class"?t.flags|=8:e==="style"&&(t.flags|=16)}function Pf(t,e,n){let{attrs:r,inputs:i,hostDirectiveInputs:o}=t;if(r===null||!n&&i===null||n&&o===null||$u(t)){t.initialInputs??=[],t.initialInputs.push(null);return}let s=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 u=i[l];for(let f of u)if(f===e){s??=[],s.push(l,r[a+1]);break}}else if(n&&o.hasOwnProperty(l)){let u=o[l];for(let f=0;f<u.length;f+=2)if(u[f]===e){s??=[],s.push(u[f+1],r[a+1]);break}}a+=2}t.initialInputs??=[],t.initialInputs.push(s)}function ES(t,e,n,r,i){t.data[r]=i;let o=i.factory||(i.factory=Cr(i.type,!0)),s=new vo(o,Tn(i),Ee);t.blueprint[r]=s,n[r]=s,xS(t,e,r,n_(t,n,i.hostVars,Gn),i)}function xS(t,e,n,r,i){let o=i.hostBindings;if(o){let s=t.hostBindingOpCodes;s===null&&(s=t.hostBindingOpCodes=[]);let a=~e.index;SS(s)!=a&&s.push(a),s.push(n,r,o)}}function SS(t){let e=t.length;for(;e>0;){let n=t[--e];if(typeof n=="number"&&n<0)return n}return 0}function CS(t,e,n){if(n){if(e.exportAs)for(let r=0;r<e.exportAs.length;r++)n[e.exportAs[r]]=t;Tn(e)&&(n[""]=t)}}function IS(t,e,n){t.flags|=1,t.directiveStart=e,t.directiveEnd=e+n,t.providerIndexes=e}function C_(t,e,n,r,i,o,s,a){let l=e.consts,u=sr(l,s),f=Eo(e,t,2,r,u);return o&&eh(e,n,f,sr(l,a),i),f.mergedAttrs=ci(f.mergedAttrs,f.attrs),f.attrs!==null&&ic(f,f.attrs,!1),f.mergedAttrs!==null&&ic(f,f.mergedAttrs,!0),e.queries!==null&&e.queries.elementStart(e,f),f}function I_(t,e){Nu(t,e),wu(e)&&t.queries.elementEnd(e)}var TS=class extends xo{ngModule;constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){let e=Tr(t);return new nh(e,this.ngModule)}};function OS(t){return Object.keys(t).map(e=>{let[n,r,i]=t[e],o={propName:n,templateName:e,isSignal:(r&ua.SignalBased)!==0};return i&&(o.transform=i),o})}function DS(t){return Object.keys(t).map(e=>({propName:t[e],templateName:e}))}function RS(t,e,n){let r=e instanceof jn?e:e?.injector;return r&&t.getStandaloneInjector!==null&&(r=t.getStandaloneInjector(r)||r),r?new b1(n,r):n}function NS(t){let e=t.get(bn,null);if(e===null)throw new Nt(407,!1);let n=t.get(gS,null),r=t.get(_i,null);return{rendererFactory:e,sanitizer:n,changeDetectionScheduler:r}}function PS(t,e){let n=(t.selectors[0][0]||"div").toLowerCase();return Jm(e,n,n==="svg"?Wg:n==="math"?$w:null)}var nh=class extends E_{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;get inputs(){return OS(this.componentDef.inputs)}get outputs(){return DS(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=sx(t.selectors),this.ngContentSelectors=t.ngContentSelectors??[],this.isBoundToModule=!!e}create(t,e,n,r){zt(22);let i=Tt(null);try{let o=this.componentDef,s=n?["ng-version","19.2.0"]:ax(this.componentDef.selectors[0]),a=zu(0,null,null,1,0,null,null,null,null,[s],null),l=RS(o,r||this.ngModule,t),u=NS(l),f=u.rendererFactory.createRenderer(null,o),d=n?_x(f,n,o.encapsulation,l):PS(o,f),_=qu(null,a,null,512|e_(o),null,null,u,f,l,null,Hm(d,l,!0));_[ae]=d,Ou(_);let y=null;try{let x=C_(ae,a,_,"#host",()=>[this.componentDef],!0,0);d&&(t_(f,d,x),In(d,_)),ha(a,_,x),Uu(a,x,_),I_(a,x),e!==void 0&&AS(x,this.ngContentSelectors,e),y=Je(x.index,_),_[ce]=y[ce],Ku(a,_,null)}catch(x){throw y!==null&&Xl(y),Xl(_),x}finally{zt(23),Du()}return new kS(this.componentType,_)}finally{Tt(i)}}},kS=class extends fS{_rootLView;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(t,e){super(),this._rootLView=e,this._tNode=Eu(e[dt],ae),this.location=yi(this._tNode,e),this.instance=Je(this._tNode.index,e)[ce],this.hostView=this.changeDetectorRef=new to(e,void 0,!1),this.componentType=t}setInput(t,e){let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(t)&&Object.is(this.previousInputValues.get(t),e))return;let r=this._rootLView,i=Yu(n,r[dt],r,t,e);this.previousInputValues.set(t,e);let o=Je(n.index,r);th(o,1)}get injector(){return new Bi(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}};function AS(t,e,n){let r=t.projection=[];for(let i=0;i<e.length;i++){let o=n[i];r.push(o!=null&&o.length?Array.from(o):null)}}var bi=(()=>{class t{static __NG_ELEMENT_ID__=LS}return t})();function LS(){let t=He();return O_(t,xt())}var MS=bi,T_=class extends MS{_lContainer;_hostTNode;_hostLView;constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return yi(this._hostTNode,this._hostLView)}get injector(){return new Bi(this._hostTNode,this._hostLView)}get parentInjector(){let t=Pu(this._hostTNode,this._hostLView);if(hm(t)){let e=xs(t,this._hostLView),n=Es(t),r=e[dt].data[n+8];return new Bi(r,e)}else return new Bi(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let e=kf(this._lContainer);return e!==null&&e[t]||null}get length(){return this._lContainer.length-Ce}createEmbeddedView(t,e,n){let r,i;typeof n=="number"?r=n:n!=null&&(r=n.index,i=n.injector);let o=no(this._lContainer,t.ssrId),s=t.createEmbeddedViewImpl(e||{},i,o);return this.insertImpl(s,r,Ji(this._hostTNode,o)),s}createComponent(t,e,n,r,i){let o=t&&!Vw(t),s;if(o)s=e;else{let y=e||{};s=y.index,n=y.injector,r=y.projectableNodes,i=y.environmentInjector||y.ngModuleRef}let a=o?t:new nh(Tr(t)),l=n||this.parentInjector;if(!i&&a.ngModule==null){let y=(o?l:this.parentInjector).get(jn,null);y&&(i=y)}let u=Tr(a.componentType??{}),f=no(this._lContainer,u?.id??null),d=f?.firstChild??null,_=a.create(l,r,d,i);return this.insertImpl(_.hostView,s,Ji(this._hostTNode,f)),_}insert(t,e){return this.insertImpl(t,e,!0)}insertImpl(t,e,n){let r=t._lView;if(qw(r)){let s=this.indexOf(t);if(s!==-1)this.detach(s);else{let a=r[Ie],l=new T_(a,a[yn],a[Ie]);l.detach(l.indexOf(t))}}let i=this._adjustIndex(e),o=this._lContainer;return ma(o,r,i,n),t.attachToViewContainerRef(),Tg(nl(o),i,t),t}move(t,e){return this.insert(t,e)}indexOf(t){let e=kf(this._lContainer);return e!==null?e.indexOf(t):-1}remove(t){let e=this._adjustIndex(t,-1),n=Qi(this._lContainer,e);n&&(gs(nl(this._lContainer),e),da(n[dt],n))}detach(t){let e=this._adjustIndex(t,-1),n=Qi(this._lContainer,e);return n&&gs(nl(this._lContainer),e)!=null?new to(n):null}_adjustIndex(t,e=0){return t??this.length+e}};function kf(t){return t[ys]}function nl(t){return t[ys]||(t[ys]=[])}function O_(t,e){let n,r=e[t.index];return zn(r)?n=r:(n=v_(r,e,null,t),e[t.index]=n,Gu(e,n)),jS(n,e,t,r),new T_(n,t,e)}function VS(t,e){let n=t[ve],r=n.createComment(""),i=Dn(e,t),o=n.parentNode(i);return Os(n,o,r,n.nextSibling(i),!1),r}var jS=US,FS=()=>!1;function BS(t,e,n){return FS(t,e,n)}function US(t,e,n,r){if(t[Dr])return;let i;n.type&8?i=Be(r):i=VS(e,n),t[Dr]=i}var HS=class D_{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new D_(this.queryList)}setDirty(){this.queryList.setDirty()}},$S=class R_{queries;constructor(e=[]){this.queries=e}createEmbeddedView(e){let n=e.queries;if(n!==null){let r=e.contentQueries!==null?e.contentQueries[0]:n.length,i=[];for(let o=0;o<r;o++){let s=n.getByIndex(o),a=this.queries[s.indexInDeclarationView];i.push(a.clone())}return new R_(i)}return null}insertView(e){this.dirtyQueriesWithMatches(e)}detachView(e){this.dirtyQueriesWithMatches(e)}finishViewCreation(e){this.dirtyQueriesWithMatches(e)}dirtyQueriesWithMatches(e){for(let n=0;n<this.queries.length;n++)rh(e,n).matches!==null&&this.queries[n].setDirty()}},zS=class{flags;read;predicate;constructor(t,e,n=null){this.flags=e,this.read=n,typeof t=="string"?this.predicate=tC(t):this.predicate=t}},qS=class N_{queries;constructor(e=[]){this.queries=e}elementStart(e,n){for(let r=0;r<this.queries.length;r++)this.queries[r].elementStart(e,n)}elementEnd(e){for(let n=0;n<this.queries.length;n++)this.queries[n].elementEnd(e)}embeddedTView(e){let n=null;for(let r=0;r<this.length;r++){let i=n!==null?n.length:0,o=this.getByIndex(r).embeddedTView(e,i);o&&(o.indexInDeclarationView=r,n!==null?n.push(o):n=[o])}return n!==null?new N_(n):null}template(e,n){for(let r=0;r<this.queries.length;r++)this.queries[r].template(e,n)}getByIndex(e){return this.queries[e]}get length(){return this.queries.length}track(e){this.queries.push(e)}},GS=class P_{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(e,n=-1){this.metadata=e,this._declarationNodeIndex=n}elementStart(e,n){this.isApplyingToNode(n)&&this.matchTNode(e,n)}elementEnd(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}template(e,n){this.elementStart(e,n)}embeddedTView(e,n){return this.isApplyingToNode(e)?(this.crossesNgTemplate=!0,this.addMatch(-e.index,n),new P_(this.metadata)):null}isApplyingToNode(e){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let n=this._declarationNodeIndex,r=e.parent;for(;r!==null&&r.type&8&&r.index!==n;)r=r.parent;return n===(r!==null?r.index:-1)}return this._appliesToNextNode}matchTNode(e,n){let r=this.metadata.predicate;if(Array.isArray(r))for(let i=0;i<r.length;i++){let o=r[i];this.matchTNodeWithReadOption(e,n,WS(n,o)),this.matchTNodeWithReadOption(e,n,ns(n,e,o,!1,!1))}else r===eo?n.type&4&&this.matchTNodeWithReadOption(e,n,-1):this.matchTNodeWithReadOption(e,n,ns(n,e,r,!1,!1))}matchTNodeWithReadOption(e,n,r){if(r!==null){let i=this.metadata.read;if(i!==null)if(i===Le||i===bi||i===eo&&n.type&4)this.addMatch(n.index,-2);else{let o=ns(n,e,i,!1,!1);o!==null&&this.addMatch(n.index,o)}else this.addMatch(n.index,r)}}addMatch(e,n){this.matches===null?this.matches=[e,n]:this.matches.push(e,n)}};function WS(t,e){let n=t.localNames;if(n!==null){for(let r=0;r<n.length;r+=2)if(n[r]===e)return n[r+1]}return null}function ZS(t,e){return t.type&11?yi(t,e):t.type&4?_a(t,e):null}function YS(t,e,n,r){return n===-1?ZS(e,t):n===-2?KS(t,e,r):Xi(t,t[dt],n,e)}function KS(t,e,n){if(n===Le)return yi(e,t);if(n===eo)return _a(e,t);if(n===bi)return O_(e,t)}function k_(t,e,n,r){let i=e[Bn].queries[r];if(i.matches===null){let o=t.data,s=n.matches,a=[];for(let l=0;s!==null&&l<s.length;l+=2){let u=s[l];if(u<0)a.push(null);else{let f=o[u];a.push(YS(e,f,s[l+1],n.metadata.read))}}i.matches=a}return i.matches}function oc(t,e,n,r){let i=t.queries.getByIndex(n),o=i.matches;if(o!==null){let s=k_(t,e,i,n);for(let a=0;a<o.length;a+=2){let l=o[a];if(l>0)r.push(s[a/2]);else{let u=o[a+1],f=e[-l];for(let d=Ce;d<f.length;d++){let _=f[d];_[Or]===_[Ie]&&oc(_[dt],_,u,r)}if(f[li]!==null){let d=f[li];for(let _=0;_<d.length;_++){let y=d[_];oc(y[dt],y,u,r)}}}}}return r}function XS(t,e){return t[Bn].queries[e].queryList}function JS(t,e,n){let r=new q1((n&4)===4);return Zw(t,e,r,r.destroy),(e[Bn]??=new $S).queries.push(new HS(r))-1}function QS(t,e,n){let r=pe();return r.firstCreatePass&&(eC(r,new zS(t,e,n),-1),(e&2)===2&&(r.staticViewQueries=!0)),JS(r,xt(),e)}function tC(t){return t.split(",").map(e=>e.trim())}function eC(t,e,n){t.queries===null&&(t.queries=new qS),t.queries.track(new GS(e,n))}function rh(t,e){return t.queries.getByIndex(e)}function nC(t,e){let n=t[dt],r=rh(n,e);return r.crossesNgTemplate?oc(n,t,e,[]):k_(n,t,r,e)}var ro=class{},A_=class extends ro{injector;componentFactoryResolver=new TS(this);instance=null;constructor(t){super();let e=new bu([...t.providers,{provide:ro,useValue:this},{provide:xo,useValue:this.componentFactoryResolver}],t.parent||ta(),t.debugName,new Set(["environment"]));this.injector=e,t.runEnvironmentInitializers&&e.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function rC(t,e,n=null){return new A_({providers:t,parent:e,debugName:n,runEnvironmentInitializers:!0}).injector}var iC=(()=>{class t{_injector;cachedInjectors=new Map;constructor(n){this._injector=n}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=kg(!1,n.type),i=r.length>0?rC([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=pt({token:t,providedIn:"environment",factory:()=>new t(Vt(jn))})}return t})();function Re(t){return pu(()=>{let e=L_(t),n=Zt(j({},e),{decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===Om.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&t.dependencies||null,getStandaloneInjector:e.standalone?i=>i.get(iC).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:t.signals??!1,data:t.data||{},encapsulation:t.encapsulation||kn.Emulated,styles:t.styles||Vn,_:null,schemas:t.schemas||null,tView:null,id:""});e.standalone&&Fr("NgStandalone"),M_(n);let r=t.dependencies;return n.directiveDefs=Af(r,!1),n.pipeDefs=Af(r,!0),n.id=cC(n),n})}function oC(t){return Tr(t)||Ng(t)}function sC(t){return t!==null}function aC(t,e){if(t==null)return Ir;let n={};for(let r in t)if(t.hasOwnProperty(r)){let i=t[r],o,s,a,l;Array.isArray(i)?(a=i[0],o=i[1],s=i[2]??o,l=i[3]||null):(o=i,s=i,a=ua.None,l=null),n[o]=[r,a,l],e[o]=s}return n}function lC(t){if(t==null)return Ir;let e={};for(let n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function va(t){return pu(()=>{let e=L_(t);return M_(e),e})}function ih(t){return{type:t.type,name:t.name,factory:null,pure:t.pure!==!1,standalone:t.standalone??!0,onDestroy:t.type.prototype.ngOnDestroy||null}}function L_(t){let e={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputConfig:t.inputs||Ir,exportAs:t.exportAs||null,standalone:t.standalone??!0,signals:t.signals===!0,selectors:t.selectors||Vn,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:aC(t.inputs,e),outputs:lC(t.outputs),debugInfo:null}}function M_(t){t.features?.forEach(e=>e(t))}function Af(t,e){if(!t)return null;let n=e?Pg:oC;return()=>(typeof t=="function"?t():t).map(r=>n(r)).filter(sC)}function cC(t){let e=0,n=typeof t.consts=="function"?"":t.consts,r=[t.selectors,t.ngContentSelectors,t.hostVars,t.hostAttrs,n,t.vars,t.decls,t.encapsulation,t.standalone,t.signals,t.exportAs,JSON.stringify(t.inputs),JSON.stringify(t.outputs),Object.getOwnPropertyNames(t.type.prototype),!!t.contentQueries,!!t.viewQuery];for(let i of r.join("|"))e=Math.imul(31,e)+i.charCodeAt(0)<<0;return e+=2147483648,"c"+e}function uC(t){return Object.getPrototypeOf(t.prototype).constructor}function wi(t){let e=uC(t.type),n=!0,r=[t];for(;e;){let i;if(Tn(t))i=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Nt(903,!1);i=e.\u0275dir}if(i){if(n){r.push(i);let s=t;s.inputs=rl(t.inputs),s.declaredInputs=rl(t.declaredInputs),s.outputs=rl(t.outputs);let a=i.hostBindings;a&&gC(t,a);let l=i.viewQuery,u=i.contentQueries;if(l&&dC(t,l),u&&pC(t,u),hC(t,i),ew(t.outputs,i.outputs),Tn(i)&&i.data.animation){let f=t.data;f.animation=(f.animation||[]).concat(i.data.animation)}}let o=i.features;if(o)for(let s=0;s<o.length;s++){let a=o[s];a&&a.ngInherit&&a(t),a===wi&&(n=!1)}}e=Object.getPrototypeOf(e)}fC(r)}function hC(t,e){for(let n in e.inputs){if(!e.inputs.hasOwnProperty(n)||t.inputs.hasOwnProperty(n))continue;let r=e.inputs[n];r!==void 0&&(t.inputs[n]=r,t.declaredInputs[n]=e.declaredInputs[n])}}function fC(t){let e=0,n=null;for(let r=t.length-1;r>=0;r--){let i=t[r];i.hostVars=e+=i.hostVars,i.hostAttrs=ci(i.hostAttrs,n=ci(n,i.hostAttrs))}}function rl(t){return t===Ir?{}:t===Vn?[]:t}function dC(t,e){let n=t.viewQuery;n?t.viewQuery=(r,i)=>{e(r,i),n(r,i)}:t.viewQuery=e}function pC(t,e){let n=t.contentQueries;n?t.contentQueries=(r,i,o)=>{e(r,i,o),n(r,i,o)}:t.contentQueries=e}function gC(t,e){let n=t.hostBindings;n?t.hostBindings=(r,i)=>{e(r,i),n(r,i)}:t.hostBindings=e}function V_(t,e,n){return t[e]=n}function Un(t,e,n){let r=t[e];return Object.is(r,n)?!1:(t[e]=n,!0)}function mC(t,e,n,r){let i=Un(t,e,n);return Un(t,e+1,r)||i}function _C(t,e,n,r,i,o,s,a,l){let u=e.consts,f=Eo(e,t,4,s||null,a||null);Cu()&&eh(e,n,f,sr(u,l),Zu),f.mergedAttrs=ci(f.mergedAttrs,f.attrs),Nu(e,f);let d=f.tView=zu(2,f,r,i,o,e.directiveRegistry,e.pipeRegistry,null,e.schemas,u,null);return e.queries!==null&&(e.queries.template(e,f),d.queries=e.queries.embeddedTView(f)),f}function sc(t,e,n,r,i,o,s,a,l,u){let f=n+ae,d=e.firstCreatePass?_C(f,e,t,r,i,o,s,a,l):e.data[f];ur(d,!1);let _=vC(e,t,d,n);oa()&&pa(e,t,_,d),In(_,t);let y=v_(_,t,_,d);return t[f]=y,Gu(t,y),BS(y,d,t),ea(d)&&ha(e,t,d),l!=null&&Wu(t,d,u),d}function se(t,e,n,r,i,o,s,a){let l=xt(),u=pe(),f=sr(u.consts,o);return sc(l,u,t,e,n,r,i,f,s,a),se}var vC=yC;function yC(t,e,n,r){return sa(!0),e[ve].createComment("")}var bC=new St(""),wC=(()=>{class t{static \u0275prov=pt({token:t,providedIn:"root",factory:()=>new EC})}return t})(),EC=class{queuedEffectCount=0;queues=new Map;schedule(t){this.enqueue(t)}remove(t){let e=t.zone,n=this.queues.get(e);n.has(t)&&(n.delete(t),this.queuedEffectCount--)}enqueue(t){let e=t.zone;this.queues.has(e)||this.queues.set(e,new Set);let n=this.queues.get(e);n.has(t)||(this.queuedEffectCount++,n.add(t))}flush(){for(;this.queuedEffectCount>0;)for(let[t,e]of this.queues)t===null?this.flushQueue(e):t.run(()=>this.flushQueue(e))}flushQueue(t){for(let e of t)t.delete(e),this.queuedEffectCount--,e.run()}};function j_(t){return!!t&&typeof t.then=="function"}function xC(t){return!!t&&typeof t.subscribe=="function"}var SC=new St(""),F_=(()=>{class t{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=P(SC,{optional:!0})??[];injector=P(De);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let i of this.appInits){let o=Vg(this.injector,i);if(j_(o))n.push(o);else if(xC(o)){let s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});n.push(s)}}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||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),CC=new St("");function IC(){q0(()=>{throw new Nt(600,!1)})}function TC(t){return t.isBoundToModule}var OC=10,lr=(()=>{class t{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=P(B1);afterRenderManager=P(Fm);zonelessEnabled=P(Au);rootEffectScheduler=P(wC);dirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new vt;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=P(aa).hasPendingTasks.pipe(Xs(n=>!n));constructor(){P(yo,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:i=>{i&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=P(jn);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){zt(10);let i=n instanceof E_;if(!this._injector.get(F_).done){let d=!i&&Sw(n),_=!1;throw new Nt(405,_)}let o;i?o=n:o=this._injector.get(xo).resolveComponentFactory(n),this.componentTypes.push(o.componentType);let s=TC(o)?void 0:this._injector.get(ro),a=r||o.selector,l=o.create(De.NULL,[],a,s),u=l.location.nativeElement,f=l.injector.get(bC,null);return f?.registerApplication(u),l.onDestroy(()=>{this.detachView(l.hostView),rs(this.components,l),f?.unregisterApplication(u)}),this._loadComponent(l),zt(11,l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){zt(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(Bu.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new Nt(101,!1);let n=Tt(null);try{this._runningTick=!0,this.synchronize()}catch(r){this.internalErrorHandler(r)}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,Tt(n),this.afterTick.next(),zt(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(bn,null,{optional:!0}));let n=0;for(;this.dirtyFlags!==0&&n++<OC;)zt(14),this.synchronizeOnce(),zt(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)DC(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})=>ra(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;rs(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n),this._injector.get(CC,[]).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),()=>rs(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new Nt(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||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function rs(t,e){let n=t.indexOf(e);n>-1&&t.splice(n,1)}function DC(t,e,n,r){!n&&!ra(t)||p_(t,e,n&&!r?0:1)}function ya(t,e,n,r){let i=xt(),o=_o();if(Un(i,o,e)){let s=pe(),a=Ru();Cx(a,i,t,e,n,r)}return ya}function B_(t,e,n,r){return Un(t,_o(),n)?e+ho(n)+r:Gn}function Vo(t,e){return t<<17|e<<2}function Pr(t){return t>>17&32767}function RC(t){return(t&2)==2}function NC(t,e){return t&131071|e<<17}function ac(t){return t|2}function ui(t){return(t&131068)>>2}function il(t,e){return t&-131069|e<<2}function PC(t){return(t&1)===1}function lc(t){return t|1}function kC(t,e,n,r,i,o){let s=o?e.classBindings:e.styleBindings,a=Pr(s),l=ui(s);t[r]=n;let u=!1,f;if(Array.isArray(n)){let d=n;f=d[1],(f===null||fo(d,f)>0)&&(u=!0)}else f=n;if(i)if(l!==0){let d=Pr(t[a+1]);t[r+1]=Vo(d,a),d!==0&&(t[d+1]=il(t[d+1],r)),t[a+1]=NC(t[a+1],r)}else t[r+1]=Vo(a,0),a!==0&&(t[a+1]=il(t[a+1],r)),a=r;else t[r+1]=Vo(l,0),a===0?a=r:t[l+1]=il(t[l+1],r),l=r;u&&(t[r+1]=ac(t[r+1])),Lf(t,f,r,!0),Lf(t,f,r,!1),AC(e,f,t,r,o),s=Vo(a,l),o?e.classBindings=s:e.styleBindings=s}function AC(t,e,n,r,i){let o=i?t.residualClasses:t.residualStyles;o!=null&&typeof e=="string"&&fo(o,e)>=0&&(n[r+1]=lc(n[r+1]))}function Lf(t,e,n,r){let i=t[n+1],o=e===null,s=r?Pr(i):ui(i),a=!1;for(;s!==0&&(a===!1||o);){let l=t[s],u=t[s+1];LC(l,e)&&(a=!0,t[s+1]=r?lc(u):ac(u)),s=r?Pr(u):ui(u)}a&&(t[n+1]=r?ac(i):lc(i))}function LC(t,e){return t===null||e==null||(Array.isArray(t)?t[1]:t)===e?!0:Array.isArray(t)&&typeof e=="string"?fo(t,e)>=0:!1}function Pt(t,e,n){let r=xt(),i=_o();if(Un(r,i,e)){let o=pe(),s=Ru();o_(o,s,r,t,e,r[ve],n,!1)}return Pt}function Mf(t,e,n,r,i){Yu(e,t,n,i?"class":"style",r)}function ba(t,e,n){return U_(t,e,n,!1),ba}function wa(t,e){return U_(t,e,null,!0),wa}function U_(t,e,n,r){let i=xt(),o=pe(),s=r1(2);if(o.firstUpdatePass&&VC(o,t,s,r),e!==Gn&&Un(i,s,e)){let a=o.data[hr()];HC(o,a,i,i[ve],t,i[s+1]=$C(e,n),r,s)}}function MC(t,e){return e>=t.expandoStartIndex}function VC(t,e,n,r){let i=t.data;if(i[n+1]===null){let o=i[hr()],s=MC(t,n);zC(o,r)&&e===null&&!s&&(e=!1),e=jC(i,o,e,r),kC(i,o,e,n,s,r)}}function jC(t,e,n,r){let i=a1(t),o=r?e.residualClasses:e.residualStyles;if(i===null)(r?e.classBindings:e.styleBindings)===0&&(n=ol(null,t,e,n,r),n=io(n,e.attrs,r),o=null);else{let s=e.directiveStylingLast;if(s===-1||t[s]!==i)if(n=ol(i,t,e,n,r),o===null){let a=FC(t,e,r);a!==void 0&&Array.isArray(a)&&(a=ol(null,t,e,a[1],r),a=io(a,e.attrs,r),BC(t,e,r,a))}else o=UC(t,e,r)}return o!==void 0&&(r?e.residualClasses=o:e.residualStyles=o),n}function FC(t,e,n){let r=n?e.classBindings:e.styleBindings;if(ui(r)!==0)return t[Pr(r)]}function BC(t,e,n,r){let i=n?e.classBindings:e.styleBindings;t[Pr(i)]=r}function UC(t,e,n){let r,i=e.directiveEnd;for(let o=1+e.directiveStylingLast;o<i;o++){let s=t[o].hostAttrs;r=io(r,s,n)}return io(r,e.attrs,n)}function ol(t,e,n,r,i){let o=null,s=n.directiveEnd,a=n.directiveStylingLast;for(a===-1?a=n.directiveStart:a++;a<s&&(o=e[a],r=io(r,o.hostAttrs,i),o!==t);)a++;return t!==null&&(n.directiveStylingLast=a),r}function io(t,e,n){let r=n?1:2,i=-1;if(e!==null)for(let o=0;o<e.length;o++){let s=e[o];typeof s=="number"?i=s:i===r&&(Array.isArray(t)||(t=t===void 0?[]:["",t]),Ew(t,s,n?!0:e[++o]))}return t===void 0?null:t}function HC(t,e,n,r,i,o,s,a){if(!(e.type&3))return;let l=t.data,u=l[a+1],f=PC(u)?Vf(l,e,n,i,ui(u),s):void 0;if(!Rs(f)){Rs(o)||RC(u)&&(o=Vf(l,null,n,i,a,s));let d=Zg(hr(),n);zx(r,s,d,i,o)}}function Vf(t,e,n,r,i,o){let s=e===null,a;for(;i>0;){let l=t[i],u=Array.isArray(l),f=u?l[1]:l,d=f===null,_=n[i+1];_===Gn&&(_=d?Vn:void 0);let y=d?Za(_,r):f===r?_:void 0;if(u&&!Rs(y)&&(y=Za(l,r)),Rs(y)&&(a=y,s))return a;let x=t[i+1];i=s?Pr(x):ui(x)}if(e!==null){let l=o?e.residualClasses:e.residualStyles;l!=null&&(a=Za(l,r))}return a}function Rs(t){return t!==void 0}function $C(t,e){return t==null||t===""||(typeof e=="string"?t=t+e:typeof t=="object"&&(t=hn(tr(t)))),t}function zC(t,e){return(t.flags&(e?8:16))!==0}var qC=class{destroy(t){}updateValue(t,e){}swap(t,e){let n=Math.min(t,e),r=Math.max(t,e),i=this.detach(r);if(r-n>1){let o=this.detach(n);this.attach(n,i),this.attach(r,o)}else this.attach(n,i)}move(t,e){this.attach(e,this.detach(t))}};function sl(t,e,n,r,i){return t===n&&Object.is(e,r)?1:Object.is(i(t,e),i(n,r))?-1:0}function GC(t,e,n){let r,i,o=0,s=t.length-1,a;if(Array.isArray(e)){let l=e.length-1;for(;o<=s&&o<=l;){let u=t.at(o),f=e[o],d=sl(o,u,o,f,n);if(d!==0){d<0&&t.updateValue(o,f),o++;continue}let _=t.at(s),y=e[l],x=sl(s,_,l,y,n);if(x!==0){x<0&&t.updateValue(s,y),s--,l--;continue}let I=n(o,u),V=n(s,_),L=n(o,f);if(Object.is(L,V)){let Z=n(l,y);Object.is(Z,I)?(t.swap(o,s),t.updateValue(s,y),l--,s--):t.move(s,o),t.updateValue(o,f),o++;continue}if(r??=new Bf,i??=Ff(t,o,s,n),cc(t,r,o,L))t.updateValue(o,f),o++,s++;else if(i.has(L))r.set(I,t.detach(o)),s--;else{let Z=t.create(o,e[o]);t.attach(o,Z),o++,s++}}for(;o<=l;)jf(t,r,n,o,e[o]),o++}else if(e!=null){let l=e[Symbol.iterator](),u=l.next();for(;!u.done&&o<=s;){let f=t.at(o),d=u.value,_=sl(o,f,o,d,n);if(_!==0)_<0&&t.updateValue(o,d),o++,u=l.next();else{r??=new Bf,i??=Ff(t,o,s,n);let y=n(o,d);if(cc(t,r,o,y))t.updateValue(o,d),o++,s++,u=l.next();else if(!i.has(y))t.attach(o,t.create(o,d)),o++,s++,u=l.next();else{let x=n(o,f);r.set(x,t.detach(o)),s--}}}for(;!u.done;)jf(t,r,n,t.length,u.value),u=l.next()}for(;o<=s;)t.destroy(t.detach(s--));r?.forEach(l=>{t.destroy(l)})}function cc(t,e,n,r){return e!==void 0&&e.has(r)?(t.attach(n,e.get(r)),e.delete(r),!0):!1}function jf(t,e,n,r,i){if(cc(t,e,r,n(r,i)))t.updateValue(r,i);else{let o=t.create(r,i);t.attach(r,o)}}function Ff(t,e,n,r){let i=new Set;for(let o=e;o<=n;o++)i.add(r(o,t.at(o)));return i}var Bf=class{kvMap=new Map;_vMap=void 0;has(t){return this.kvMap.has(t)}delete(t){if(!this.has(t))return!1;let e=this.kvMap.get(t);return this._vMap!==void 0&&this._vMap.has(e)?(this.kvMap.set(t,this._vMap.get(e)),this._vMap.delete(e)):this.kvMap.delete(t),!0}get(t){return this.kvMap.get(t)}set(t,e){if(this.kvMap.has(t)){let n=this.kvMap.get(t);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,e)}else this.kvMap.set(t,e)}forEach(t){for(let[e,n]of this.kvMap)if(t(n,e),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),t(n,e)}}};function te(t,e){Fr("NgControlFlow");let n=xt(),r=_o(),i=n[r]!==Gn?n[r]:-1,o=i!==-1?Ns(n,ae+i):void 0,s=0;if(Un(n,r,t)){let a=Tt(null);try{if(o!==void 0&&b_(o,s),t!==-1){let l=ae+t,u=Ns(n,l),f=uc(n[dt],l),d=no(u,f.tView.ssrId),_=fa(n,f,e,{dehydratedView:d});ma(u,_,s,Ji(f,d))}}finally{Tt(a)}}else if(o!==void 0){let a=y_(o,s);a!==void 0&&(a[ce]=e)}}var WC=class{lContainer;$implicit;$index;constructor(t,e,n){this.lContainer=t,this.$implicit=e,this.$index=n}get $count(){return this.lContainer.length-Ce}};function Ei(t,e){return e}var ZC=class{hasEmptyBlock;trackByFn;liveCollection;constructor(t,e,n){this.hasEmptyBlock=t,this.trackByFn=e,this.liveCollection=n}};function $e(t,e,n,r,i,o,s,a,l,u,f,d,_){Fr("NgControlFlow");let y=xt(),x=pe(),I=l!==void 0,V=xt(),L=a?s.bind(V[mn][ce]):s,Z=new ZC(I,L);V[ae+t]=Z,sc(y,x,t+1,e,n,r,i,sr(x.consts,o)),I&&sc(y,x,t+2,l,u,f,d,sr(x.consts,_))}var YC=class extends qC{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(t,e,n){super(),this.lContainer=t,this.hostLView=e,this.templateTNode=n}get length(){return this.lContainer.length-Ce}at(t){return this.getLView(t)[ce].$implicit}attach(t,e){let n=e[Zi];this.needsIndexUpdate||=t!==this.length,ma(this.lContainer,e,t,Ji(this.templateTNode,n))}detach(t){return this.needsIndexUpdate||=t!==this.length-1,KC(this.lContainer,t)}create(t,e){let n=no(this.lContainer,this.templateTNode.tView.ssrId),r=fa(this.hostLView,this.templateTNode,new WC(this.lContainer,e,t),{dehydratedView:n});return this.operationsCounter?.recordCreate(),r}destroy(t){da(t[dt],t),this.operationsCounter?.recordDestroy()}updateValue(t,e){this.getLView(t)[ce].$implicit=e}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let t=0;t<this.length;t++)this.getLView(t)[ce].$index=t}getLView(t){return XC(this.lContainer,t)}};function ze(t){let e=Tt(null),n=hr();try{let r=xt(),i=r[dt],o=r[n],s=n+1,a=Ns(r,s);if(o.liveCollection===void 0){let u=uc(i,s);o.liveCollection=new YC(a,r,u)}else o.liveCollection.reset();let l=o.liveCollection;if(GC(l,t,o.trackByFn),l.updateIndexes(),o.hasEmptyBlock){let u=_o(),f=l.length===0;if(Un(r,u,f)){let d=n+2,_=Ns(r,d);if(f){let y=uc(i,d),x=no(_,y.tView.ssrId),I=fa(r,y,void 0,{dehydratedView:x});ma(_,I,0,Ji(y,x))}else b_(_,0)}}}finally{Tt(e)}}function Ns(t,e){return t[e]}function KC(t,e){return Qi(t,e)}function XC(t,e){return y_(t,e)}function uc(t,e){return Eu(t,e)}function Q(t,e,n,r){let i=xt(),o=pe(),s=ae+t,a=i[ve],l=o.firstCreatePass?C_(s,o,i,e,Zu,Cu(),n,r):o.data[s],u=JC(o,i,l,a,e,t);i[s]=u;let f=ea(l);return ur(l,!0),t_(a,u,l),!a_(l)&&oa()&&pa(o,i,u,l),(Yw()===0||f)&&In(u,i),Kw(),f&&(ha(o,i,l),Uu(o,l,i)),r!==null&&Wu(i,l),Q}function tt(){let t=He();Iu()?tm():(t=t.parent,ur(t,!1));let e=t;Qw(e)&&t1(),Xw();let n=pe();return n.firstCreatePass&&I_(n,e),e.classesWithoutHost!=null&&g1(e)&&Mf(n,e,xt(),e.classesWithoutHost,!0),e.stylesWithoutHost!=null&&m1(e)&&Mf(n,e,xt(),e.stylesWithoutHost,!1),tt}function Bt(t,e,n,r){return Q(t,e,n,r),tt(),Bt}var JC=(t,e,n,r,i,o)=>(sa(!0),Jm(r,i,h1()));function QC(t,e,n,r,i){let o=e.consts,s=sr(o,r),a=Eo(e,t,8,"ng-container",s);s!==null&&ic(a,s,!0);let l=sr(o,i);return Cu()&&eh(e,n,a,l,Zu),a.mergedAttrs=ci(a.mergedAttrs,a.attrs),e.queries!==null&&e.queries.elementStart(e,a),a}function H_(t,e,n){let r=xt(),i=pe(),o=t+ae,s=i.firstCreatePass?QC(o,i,r,e,n):i.data[o];ur(s,!0);let a=tI(i,r,s,t);return r[o]=a,oa()&&pa(i,r,a,s),In(a,r),ea(s)&&(ha(i,r,s),Uu(i,s,r)),n!=null&&Wu(r,s),H_}function $_(){let t=He(),e=pe();return Iu()?tm():(t=t.parent,ur(t,!1)),e.firstCreatePass&&(Nu(e,t),wu(t)&&e.queries.elementEnd(t)),$_}function oh(t,e,n){return H_(t,e,n),$_(),oh}var tI=(t,e,n,r)=>(sa(!0),ux(e[ve],""));function qe(){return xt()}var Ps="en-US",eI=Ps;function nI(t){typeof t=="string"&&(eI=t.toLowerCase().replace(/_/g,"-"))}var rI=(t,e,n)=>{};function ee(t,e,n,r){let i=xt(),o=pe(),s=He();return oI(o,i,i[ve],s,t,e,r),ee}function iI(t,e,n,r){let i=t.cleanup;if(i!=null)for(let o=0;o<i.length-1;o+=2){let s=i[o];if(s===n&&i[o+1]===r){let a=e[_s],l=i[o+2];return a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function oI(t,e,n,r,i,o,s){let a=ea(r),l=t.firstCreatePass?Jg(t):null,u=e[ce],f=Xg(e),d=!0;if(r.type&3||s){let _=Dn(r,e),y=s?s(_):_,x=f.length,I=s?L=>s(Be(L[r.index])):r.index,V=null;if(!s&&a&&(V=iI(t,e,i,r.index)),V!==null){let L=V.__ngLastListenerFn__||V;L.__ngNextListenerFn__=o,V.__ngLastListenerFn__=o,d=!1}else{o=$f(r,e,u,o),rI(_,i,o);let L=n.listen(y,i,o);f.push(o,L),l&&l.push(i,I,x,x+1)}}else o=$f(r,e,u,o);if(d){let _=r.outputs?.[i],y=r.hostDirectiveOutputs?.[i];if(y&&y.length)for(let x=0;x<y.length;x+=2){let I=y[x],V=y[x+1];Uf(r,t,e,I,V,i,o,f,l)}if(_&&_.length)for(let x of _)Uf(r,t,e,x,i,i,o,f,l)}}function Uf(t,e,n,r,i,o,s,a,l){let u=n[r],f=e.data[r].outputs[i],d=u[f].subscribe(s),_=a.length;a.push(s,d),l&&l.push(o,t.index,_,-(_+1))}function Hf(t,e,n,r){let i=Tt(null);try{return zt(6,e,n),n(r)!==!1}catch(o){return s_(t,o),!1}finally{zt(7,e,n),Tt(i)}}function $f(t,e,n,r){return function i(o){if(o===Function)return r;let s=mi(t)?Je(t.index,e):e;th(s,5);let a=Hf(e,n,r,o),l=i.__ngNextListenerFn__;for(;l;)a=Hf(e,n,l,o)&&a,l=l.__ngNextListenerFn__;return a}}function it(t=1){return c1(t)}function xi(t,e,n){return z_(t,"",e,"",n),xi}function z_(t,e,n,r,i){let o=xt(),s=B_(o,e,n,r);if(s!==Gn){let a=pe(),l=Ru();o_(a,l,o,t,s,o[ve],i,!1)}return z_}function ks(t,e,n){QS(t,e,n)}function As(t){let e=xt(),n=pe(),r=rm();Tu(r+1);let i=rh(n,r);if(t.dirty&&zw(e)===((i.metadata.flags&2)===2)){if(i.matches===null)t.reset([]);else{let o=nC(e,r);t.reset(o,H1),t.notifyOnChanges()}return!0}return!1}function Ls(){return XS(xt(),rm())}function sh(t,e,n,r){n>=t.data.length&&(t.data[n]=null,t.blueprint[n]=null),e[n]=r}function ir(t){let e=em();return na(e,ae+t)}function ne(t,e=""){let n=xt(),r=pe(),i=t+ae,o=r.firstCreatePass?Eo(r,i,1,e,null):r.data[i],s=sI(r,n,o,e,t);n[i]=s,oa()&&pa(r,n,s,o),ur(o,!1)}var sI=(t,e,n,r,i)=>(sa(!0),lx(e[ve],r));function Ea(t){return On("",t,""),Ea}function On(t,e,n){let r=xt(),i=B_(r,t,e,n);return i!==Gn&&aI(r,hr(),i),On}function aI(t,e,n){let r=Zg(e,t);cx(t[ve],r,n)}var q_={};function Si(t){let e=pe(),n=xt(),r=t+ae,i=Eo(e,r,128,null,null);return ur(i,!1),sh(e,n,r,q_),Si}function ii(t){Fr("NgLet");let e=pe(),n=xt(),r=hr();return sh(e,n,r,t),t}function ln(t){let e=em(),n=na(e,ae+t);if(n===q_)throw new Nt(314,!1);return n}function lI(t,e,n){let r=pe();if(r.firstCreatePass){let i=Tn(t);hc(n,r.data,r.blueprint,i,!0),hc(e,r.data,r.blueprint,i,!1)}}function hc(t,e,n,r,i){if(t=Oe(t),Array.isArray(t))for(let o=0;o<t.length;o++)hc(t[o],e,n,r,i);else{let o=pe(),s=xt(),a=He(),l=ai(t)?t:Oe(t.provide),u=Mg(t),f=a.providerIndexes&1048575,d=a.directiveStart,_=a.providerIndexes>>20;if(ai(t)||!t.multi){let y=new vo(u,i,Ee),x=ll(l,e,i?f:f+_,d);x===-1?(Wl(Cs(a,s),o,l),al(o,t,e.length),e.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(y),s.push(y)):(n[x]=y,s[x]=y)}else{let y=ll(l,e,f+_,d),x=ll(l,e,f,f+_),I=y>=0&&n[y],V=x>=0&&n[x];if(i&&!V||!i&&!I){Wl(Cs(a,s),o,l);let L=hI(i?uI:cI,n.length,i,r,u);!i&&V&&(n[x].providerFactory=L),al(o,t,e.length,0),e.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(L),s.push(L)}else{let L=G_(n[i?x:y],u,!i&&r);al(o,t,y>-1?y:x,L)}!i&&r&&V&&n[x].componentProviders++}}}function al(t,e,n,r){let i=ai(e),o=Rw(e);if(i||o){let s=(o?Oe(e.useClass):e).prototype.ngOnDestroy;if(s){let a=t.destroyHooks||(t.destroyHooks=[]);if(!i&&e.multi){let l=a.indexOf(n);l===-1?a.push(n,[r,s]):a[l+1].push(r,s)}else a.push(n,s)}}}function G_(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function ll(t,e,n,r){for(let i=n;i<r;i++)if(e[i]===t)return i;return-1}function cI(t,e,n,r){return fc(this.multi,[])}function uI(t,e,n,r){let i=this.multi,o;if(this.providerFactory){let s=this.providerFactory.componentProviders,a=Xi(n,n[dt],this.providerFactory.index,r);o=a.slice(0,s),fc(i,o);for(let l=s;l<a.length;l++)o.push(a[l])}else o=[],fc(i,o);return o}function fc(t,e){for(let n=0;n<t.length;n++){let r=t[n];e.push(r())}return e}function hI(t,e,n,r,i){let o=new vo(t,n,Ee);return o.multi=[],o.index=e,o.componentProviders=0,G_(o,i,r&&!n),o}function fI(t,e=[]){return n=>{n.providersResolver=(r,i)=>lI(r,i?i(t):t,e)}}function W_(t,e,n,r){return Y_(xt(),ia(),t,e,n,r)}function dI(t,e,n,r,i){return K_(xt(),ia(),t,e,n,r,i)}function Z_(t,e){let n=t[e];return n===Gn?void 0:n}function Y_(t,e,n,r,i,o){let s=e+n;return Un(t,s,i)?V_(t,s+1,o?r.call(o,i):r(i)):Z_(t,s+1)}function K_(t,e,n,r,i,o,s){let a=e+n;return mC(t,a,i,o)?V_(t,a+2,s?r.call(s,i,o):r(i,o)):Z_(t,a+2)}function Ue(t,e){let n=pe(),r,i=t+ae;n.firstCreatePass?(r=pI(e,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks??=[]).push(i,r.onDestroy)):r=n.data[i];let o=r.factory||(r.factory=Cr(r.type,!0)),s,a=Pe(Ee);try{let l=Ss(!1),u=o();return Ss(l),sh(n,xt(),i,u),u}finally{Pe(a)}}function pI(t,e){if(e)for(let n=e.length-1;n>=0;n--){let r=e[n];if(t===r.name)return r}}function Qe(t,e,n){let r=t+ae,i=xt(),o=na(i,r);return X_(i,r)?Y_(i,ia(),e,o.transform,n,o):o.transform(n)}function gI(t,e,n,r){let i=t+ae,o=xt(),s=na(o,i);return X_(o,i)?K_(o,ia(),e,s.transform,n,r,s):s.transform(n,r)}function X_(t,e){return t[dt].data[e].pure}function mI(t,e){return _a(t,e)}var _I=class{full;major;minor;patch;constructor(t){this.full=t;let e=t.split(".");this.major=e[0],this.minor=e[1],this.patch=e.slice(2).join(".")}},zf=new _I("19.2.0"),vI=(()=>{class t{zone=P(Wt);changeDetectionScheduler=P(_i);applicationRef=P(lr);_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||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function yI({ngZoneFactory:t,ignoreChangesOutsideZone:e,scheduleInRootZone:n}){return t??=()=>new Wt(Zt(j({},bI()),{scheduleInRootZone:n})),[{provide:Wt,useFactory:t},{provide:ms,multi:!0,useFactory:()=>{let r=P(vI,{optional:!0});return()=>r.initialize()}},{provide:ms,multi:!0,useFactory:()=>{let r=P(wI);return()=>{r.initialize()}}},e===!0?{provide:xm,useValue:!0}:[],{provide:Lu,useValue:n??Em}]}function bI(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:t?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:t?.runCoalescing??!1}}var wI=(()=>{class t{subscription=new me;initialized=!1;zone=P(Wt);pendingTasks=P(aa);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(()=>{Wt.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Wt.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),J_=(()=>{class t{appRef=P(lr);taskService=P(aa);ngZone=P(Wt);zonelessEnabled=P(Au);tracing=P(yo,{optional:!0});disableScheduling=P(xm,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new me;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Ts):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(P(Lu,{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 Cm||!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?mf:Sm;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(Ts+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,mf(()=>{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||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function EI(){return Fr("NgZoneless"),Cw([{provide:_i,useExisting:J_},{provide:Wt,useClass:Cm},{provide:Au,useValue:!0},{provide:Lu,useValue:!1},[]])}function xI(){return typeof $localize<"u"&&$localize.locale||Ps}var Q_=new St("",{providedIn:"root",factory:()=>P(Q_,Ot.Optional|Ot.SkipSelf)||xI()}),dc=new St(""),SI=new St("");function Oi(t){return!t.moduleRef}function CI(t){let e=Oi(t)?t.r3Injector:t.moduleRef.injector,n=e.get(Wt);return n.run(()=>{Oi(t)?t.r3Injector.resolveInjectorInitializers():t.moduleRef.resolveInjectorInitializers();let r=e.get(vi,null),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:o=>{r.handleError(o)}})}),Oi(t)){let o=()=>e.destroy(),s=t.platformInjector.get(dc);s.add(o),e.onDestroy(()=>{i.unsubscribe(),s.delete(o)})}else{let o=()=>t.moduleRef.destroy(),s=t.platformInjector.get(dc);s.add(o),t.moduleRef.onDestroy(()=>{rs(t.allPlatformModules,t.moduleRef),i.unsubscribe(),s.delete(o)})}return TI(r,n,()=>{let o=e.get(F_);return o.runInitializers(),o.donePromise.then(()=>{let s=e.get(Q_,Ps);if(nI(s||Ps),!e.get(SI,!0))return Oi(t)?e.get(lr):(t.allPlatformModules.push(t.moduleRef),t.moduleRef);if(Oi(t)){let a=e.get(lr);return t.rootComponent!==void 0&&a.bootstrap(t.rootComponent),a}else return II(t.moduleRef,t.allPlatformModules),t.moduleRef})})})}function II(t,e){let n=t.injector.get(lr);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(r=>n.bootstrap(r));else if(t.instance.ngDoBootstrap)t.instance.ngDoBootstrap(n);else throw new Nt(-403,!1);e.push(t)}function TI(t,e,n){try{let r=n();return j_(r)?r.catch(i=>{throw e.runOutsideAngular(()=>t.handleError(i)),i}):r}catch(r){throw e.runOutsideAngular(()=>t.handleError(r)),r}}var is=null;function OI(t=[],e){return De.create({name:e,providers:[{provide:yu,useValue:"platform"},{provide:dc,useValue:new Set([()=>is=null])},...t]})}function DI(t=[]){if(is)return is;let e=OI(t);return is=e,IC(),RI(e),e}function RI(t){let e=t.get(Lm,null);Vg(t,()=>{e?.forEach(n=>n())})}var So=(()=>{class t{static __NG_ELEMENT_ID__=NI}return t})();function NI(t){return PI(He(),xt(),(t&16)===16)}function PI(t,e,n){if(mi(t)&&!n){let r=Je(t.index,e);return new to(r,r)}else if(t.type&175){let r=e[mn];return new to(r,e)}return null}function kI(t){zt(8);try{let{rootComponent:e,appProviders:n,platformProviders:r}=t,i=DI(r),o=[yI({}),{provide:_i,useExisting:J_},...n||[]],s=new A_({providers:o,parent:i,debugName:"",runEnvironmentInitializers:!1});return CI({r3Injector:s.injector,platformInjector:i,rootComponent:e})}catch(e){return Promise.reject(e)}finally{zt(9)}}function AI(t){return typeof t=="boolean"?t:t!=null&&t!=="false"}function LI(t,e=NaN){return!isNaN(parseFloat(t))&&!isNaN(Number(t))?Number(t):e}function MI(t){let e=Tt(null);try{return t()}finally{Tt(e)}}var KA=class{[er];constructor(t){this[er]=t}destroy(){this[er].destroy()}};function tv(t,e){let n=Tr(t),r=e.elementInjector||ta();return new nh(n).create(r,e.projectableNodes,e.hostElement,e.environmentInjector)}var VI={schedule(t,e){let n=setTimeout(t,e);return()=>clearTimeout(n)}};function jI(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function FI(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}var cl;function BI(t,e){if(!cl){let n=Element.prototype;cl=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return t.nodeType===Node.ELEMENT_NODE?cl.call(t,e):!1}function UI(t){let e={};return t.forEach(({propName:n,templateName:r,transform:i})=>{e[jI(r)]=[n,i]}),e}function HI(t,e){return e.get(xo).resolveComponentFactory(t).inputs}function $I(t,e){let n=t.childNodes,r=e.map(()=>[]),i=-1;e.some((o,s)=>o==="*"?(i=s,!0):!1);for(let o=0,s=n.length;o<s;++o){let a=n[o],l=zI(a,e,i);l!==-1&&r[l].push(a)}return r}function zI(t,e,n){let r=n;return FI(t)&&e.some((i,o)=>i!=="*"&&BI(t,i)?(r=o,!0):!1),r}var qI=10,GI=class{componentFactory;inputMap=new Map;constructor(t,e){this.componentFactory=e.get(xo).resolveComponentFactory(t);for(let n of this.componentFactory.inputs)this.inputMap.set(n.propName,n.templateName)}create(t){return new WI(this.componentFactory,t,this.inputMap)}},WI=class{componentFactory;injector;inputMap;eventEmitters=new hb(1);events=this.eventEmitters.pipe(_g(t=>Js(...t)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(t,e,n){this.componentFactory=t,this.injector=e,this.inputMap=n,this.ngZone=this.injector.get(Wt),this.appRef=this.injector.get(lr),this.cdScheduler=e.get(_i),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(t){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(t)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=VI.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},qI))})}getInputValue(t){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(t):this.componentRef.instance[t])}setInputValue(t,e){if(this.componentRef===null){this.initialInputValues.set(t,e);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(t)??t,e),this.componentRef.hostView.dirty&&(this.componentRef.changeDetectorRef.markForRefresh(),this.cdScheduler.notify(6))})}initializeComponent(t){let e=De.create({providers:[],parent:this.injector}),n=$I(t,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(e,n,t),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[t,e]of this.initialInputValues)this.setInputValue(t,e);this.initialInputValues.clear()}initializeOutputs(t){let e=this.componentFactory.outputs.map(({propName:n,templateName:r})=>{let i=t.instance[n];return new _e(o=>{let s=i.subscribe(a=>o.next({name:r,value:a}));return()=>s.unsubscribe()})});this.eventEmitters.next(e)}runInZone(t){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(t):t()}},ZI=class extends HTMLElement{ngElementEventsSubscription=null};function YI(t,e){let n=HI(t,e.injector),r=e.strategyFactory||new GI(t,e.injector),i=UI(n);class o extends ZI{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let a=this._ngElementStrategy=r.create(this.injector||e.injector);n.forEach(({propName:l,transform:u})=>{if(!this.hasOwnProperty(l))return;let f=this[l];delete this[l],a.setInputValue(l,f,u)})}return this._ngElementStrategy}_ngElementStrategy;constructor(a){super(),this.injector=a}attributeChangedCallback(a,l,u,f){let[d,_]=i[a];this.ngElementStrategy.setInputValue(d,u,_)}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:s,transform:a})=>{Object.defineProperty(o.prototype,s,{get(){return this.ngElementStrategy.getInputValue(s)},set(l){this.ngElementStrategy.setInputValue(s,l,a)},configurable:!0,enumerable:!0})}),o}var ev=null;function Ui(){return ev}function KI(t){ev??=t}var XI=class{},Jt=new St(""),nv=(()=>{class t{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:()=>P(JI),providedIn:"platform"})}return t})(),JI=(()=>{class t extends nv{_location;_history;_doc=P(Jt);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Ui().getBaseHref(this._doc)}onPopState(n){let r=Ui().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=Ui().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||t)};static \u0275prov=pt({token:t,factory:()=>new t,providedIn:"platform"})}return t})();function rv(t,e){return t?e?t.endsWith("/")?e.startsWith("/")?t+e.slice(1):t+e:e.startsWith("/")?t+e:`${t}/${e}`:t:e}function qf(t){let e=t.search(/#|\?|$/);return t[e-1]==="/"?t.slice(0,e-1)+t.slice(e):t}function wr(t){return t&&t[0]!=="?"?`?${t}`:t}var ah=(()=>{class t{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:()=>P(tT),providedIn:"root"})}return t})(),QI=new St(""),tT=(()=>{class t extends ah{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??P(Jt).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 rv(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+wr(this._platformLocation.search),i=this._platformLocation.hash;return i&&n?`${r}${i}`:r}pushState(n,r,i,o){let s=this.prepareExternalUrl(i+wr(o));this._platformLocation.pushState(n,r,s)}replaceState(n,r,i,o){let s=this.prepareExternalUrl(i+wr(o));this._platformLocation.replaceState(n,r,s)}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||t)(Vt(nv),Vt(QI,8))};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),iv=(()=>{class t{_subject=new vt;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=rT(qf(Gf(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+wr(r))}normalize(n){return t.stripTrailingSlash(nT(this._basePath,Gf(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+wr(r)),i)}replaceState(n,r="",i=null){this._locationStrategy.replaceState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+wr(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=wr;static joinWithSlash=rv;static stripTrailingSlash=qf;static \u0275fac=function(n){return new(n||t)(Vt(ah))};static \u0275prov=pt({token:t,factory:()=>eT(),providedIn:"root"})}return t})();function eT(){return new iv(Vt(ah))}function nT(t,e){if(!t||!e.startsWith(t))return e;let n=e.substring(t.length);return n===""||["/",";","?","#"].includes(n[0])?n:e}function Gf(t){return t.replace(/\/index.html$/,"")}function rT(t){if(new RegExp("^(https?:)?//").test(t)){let[,e]=t.split(/\/\/[^\/]+/);return e}return t}function iT(t,e){e=encodeURIComponent(e);for(let n of t.split(";")){let r=n.indexOf("="),[i,o]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(i.trim()===e)return decodeURIComponent(o)}return null}var ul=/\s+/,Wf=[],xa=(()=>{class t{_ngEl;_renderer;initialClasses=Wf;rawClass;stateMap=new Map;constructor(n,r){this._ngEl=n,this._renderer=r}set klass(n){this.initialClasses=n!=null?n.trim().split(ul):Wf}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(ul):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(ul).forEach(i=>{r?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static \u0275fac=function(n){return new(n||t)(Ee(Le),Ee(x_))};static \u0275dir=va({type:t,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return t})(),oT=(()=>{class t{_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||t)(Ee(bi))};static \u0275dir=va({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[$g]})}return t})(),ov="browser",sT="server";function aT(t){return t===ov}function sv(t){return t===sT}var lT=class{},cT=class extends XI{supportsDOMEvents=!0},uT=class av extends cT{static makeCurrent(){KI(new av)}onAndCancel(e,n,r,i){return e.addEventListener(n,r,i),()=>{e.removeEventListener(n,r,i)}}dispatchEvent(e,n){e.dispatchEvent(n)}remove(e){e.remove()}createElement(e,n){return n=n||this.getDefaultDocument(),n.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,n){return n==="window"?window:n==="document"?e:n==="body"?e.body:null}getBaseHref(e){let n=hT();return n==null?null:fT(n)}resetBaseElement(){Mi=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return iT(document.cookie,e)}},Mi=null;function hT(){return Mi=Mi||document.querySelector("base"),Mi?Mi.getAttribute("href"):null}function fT(t){return new URL(t,document.baseURI).pathname}var dT=(()=>{class t{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac})}return t})(),pc=new St(""),lv=(()=>{class t{_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,o){return this._findPluginFor(r).addEventListener(n,r,i,o)}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 Nt(5101,!1);return this._eventNameToPlugin.set(n,r),r}static \u0275fac=function(n){return new(n||t)(Vt(pc),Vt(Wt))};static \u0275prov=pt({token:t,factory:t.\u0275fac})}return t})(),cv=class{_doc;constructor(t){this._doc=t}manager},os="ng-app-id";function Zf(t){for(let e of t)e.remove()}function Yf(t,e){let n=e.createElement("style");return n.textContent=t,n}function pT(t,e,n,r){let i=t.head?.querySelectorAll(`style[${os}="${e}"],link[${os}="${e}"]`);if(i)for(let o of i)o.removeAttribute(os),o instanceof HTMLLinkElement?r.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&n.set(o.textContent,{usage:0,elements:[o]})}function gc(t,e){let n=e.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",t),n}var uv=(()=>{class t{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(n,r,i,o={}){this.doc=n,this.appId=r,this.nonce=i,this.isServer=sv(o),pT(n,r,this.inline,this.external),this.hosts.add(n.head)}addStyles(n,r){for(let i of n)this.addUsage(i,this.inline,Yf);r?.forEach(i=>this.addUsage(i,this.external,gc))}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 o=r.get(n);o?o.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,i(n,this.doc)))})}removeUsage(n,r){let i=r.get(n);i&&(i.usage--,i.usage<=0&&(Zf(i.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])Zf(n);this.hosts.clear()}addHost(n){this.hosts.add(n);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(n,Yf(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(n,gc(r,this.doc)))}removeHost(n){this.hosts.delete(n)}addElement(n,r){return this.nonce&&r.setAttribute("nonce",this.nonce),this.isServer&&r.setAttribute(os,this.appId),n.appendChild(r)}static \u0275fac=function(n){return new(n||t)(Vt(Jt),Vt(Fu),Vt(Mm,8),Vt(la))};static \u0275prov=pt({token:t,factory:t.\u0275fac})}return t})(),hl={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"},lh=/%COMP%/g,hv="%COMP%",gT=`_nghost-${hv}`,mT=`_ngcontent-${hv}`,_T=!0,vT=new St("",{providedIn:"root",factory:()=>_T});function yT(t){return mT.replace(lh,t)}function bT(t){return gT.replace(lh,t)}function fv(t,e){return e.map(n=>n.replace(lh,t))}var Kf=(()=>{class t{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(n,r,i,o,s,a,l,u=null,f=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=o,this.doc=s,this.platformId=a,this.ngZone=l,this.nonce=u,this.tracingService=f,this.platformIsServer=sv(a),this.defaultRenderer=new ch(n,s,l,this.platformIsServer,this.tracingService)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===kn.ShadowDom&&(r=Zt(j({},r),{encapsulation:kn.Emulated}));let i=this.getOrCreateRenderer(n,r);return i instanceof Jf?i.applyToHost(n):i instanceof mc&&i.applyStyles(),i}getOrCreateRenderer(n,r){let i=this.rendererByCompId,o=i.get(r.id);if(!o){let s=this.doc,a=this.ngZone,l=this.eventManager,u=this.sharedStylesHost,f=this.removeStylesOnCompDestroy,d=this.platformIsServer,_=this.tracingService;switch(r.encapsulation){case kn.Emulated:o=new Jf(l,u,r,this.appId,f,s,a,d,_);break;case kn.ShadowDom:return new wT(l,u,n,r,s,a,this.nonce,d,_);default:o=new mc(l,u,r,f,s,a,d,_);break}i.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static \u0275fac=function(n){return new(n||t)(Vt(lv),Vt(uv),Vt(Fu),Vt(vT),Vt(Jt),Vt(la),Vt(Wt),Vt(Mm),Vt(yo,8))};static \u0275prov=pt({token:t,factory:t.\u0275fac})}return t})(),ch=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,e,n,r,i){this.eventManager=t,this.doc=e,this.ngZone=n,this.platformIsServer=r,this.tracingService=i}destroy(){}destroyNode=null;createElement(t,e){return e?this.doc.createElementNS(hl[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(Xf(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(Xf(t)?t.content:t).insertBefore(e,n)}removeChild(t,e){e.remove()}selectRootElement(t,e){let n=typeof t=="string"?this.doc.querySelector(t):t;if(!n)throw new Nt(-5104,!1);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,r){if(r){e=r+":"+e;let i=hl[r];i?t.setAttributeNS(i,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){let r=hl[n];r?t.removeAttributeNS(r,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,r){r&(br.DashCase|br.Important)?t.style.setProperty(e,n,r&br.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&br.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t!=null&&(t[e]=n)}setValue(t,e){t.nodeValue=e}listen(t,e,n,r){if(typeof t=="string"&&(t=Ui().getGlobalEventTarget(this.doc,t),!t))throw new Error(`Unsupported event target ${t} for event ${e}`);let i=this.decoratePreventDefault(n);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(i=this.tracingService.wrapEventListener(t,e,i)),this.eventManager.addEventListener(t,e,i,r)}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;(this.platformIsServer?this.ngZone.runGuarded(()=>t(e)):t(e))===!1&&e.preventDefault()}}};function Xf(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var wT=class extends ch{sharedStylesHost;hostEl;shadowRoot;constructor(t,e,n,r,i,o,s,a,l){super(t,i,o,a,l),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let u=r.styles;u=fv(r.id,u);for(let d of u){let _=document.createElement("style");s&&_.setAttribute("nonce",s),_.textContent=d,this.shadowRoot.appendChild(_)}let f=r.getExternalStyles?.();if(f)for(let d of f){let _=gc(d,i);s&&_.setAttribute("nonce",s),this.shadowRoot.appendChild(_)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},mc=class extends ch{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,e,n,r,i,o,s,a,l){super(t,i,o,s,a),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=r;let u=n.styles;this.styles=l?fv(l,u):u,this.styleUrls=n.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Jf=class extends mc{contentAttr;hostAttr;constructor(t,e,n,r,i,o,s,a,l){let u=r+"-"+n.id;super(t,e,n,i,o,s,a,l,u),this.contentAttr=yT(u),this.hostAttr=bT(u)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}},ET=(()=>{class t extends cv{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,i,o){return n.addEventListener(r,i,o),()=>this.removeEventListener(n,r,i,o)}removeEventListener(n,r,i,o){return n.removeEventListener(r,i,o)}static \u0275fac=function(n){return new(n||t)(Vt(Jt))};static \u0275prov=pt({token:t,factory:t.\u0275fac})}return t})(),Qf=["alt","control","meta","shift"],xT={"\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"},ST={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},CT=(()=>{class t extends cv{constructor(n){super(n)}supports(n){return t.parseEventName(n)!=null}addEventListener(n,r,i,o){let s=t.parseEventName(r),a=t.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Ui().onAndCancel(n,s.domEventName,a,o))}static parseEventName(n){let r=n.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let o=t._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),Qf.forEach(u=>{let f=r.indexOf(u);f>-1&&(r.splice(f,1),s+=u+".")}),s+=o,r.length!=0||o.length===0)return null;let l={};return l.domEventName=i,l.fullKey=s,l}static matchEventFullKeyCode(n,r){let i=xT[n.key]||n.key,o="";return r.indexOf("code.")>-1&&(i=n.code,o="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),Qf.forEach(s=>{if(s!==i){let a=ST[s];a(n)&&(o+=s+".")}}),o+=i,o===r)}static eventCallback(n,r,i){return o=>{t.matchEventFullKeyCode(o,n)&&i.runGuarded(()=>r(o))}}static _normalizeKey(n){return n==="esc"?"escape":n}static \u0275fac=function(n){return new(n||t)(Vt(Jt))};static \u0275prov=pt({token:t,factory:t.\u0275fac})}return t})();function IT(t){return kI(TT(t))}function TT(t){return{appProviders:[...PT,...t?.providers??[]],platformProviders:NT}}function OT(){uT.makeCurrent()}function DT(){return new vi}function RT(){return nE(document),document}var NT=[{provide:la,useValue:ov},{provide:Lm,useValue:OT,multi:!0},{provide:Jt,useFactory:RT,deps:[]}],PT=[{provide:yu,useValue:"root"},{provide:vi,useFactory:DT,deps:[]},{provide:pc,useClass:ET,multi:!0,deps:[Jt]},{provide:pc,useClass:CT,multi:!0,deps:[Jt]},Kf,uv,lv,{provide:bn,useExisting:Kf},{provide:lT,useClass:dT,deps:[]},[]],dv=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:function(n){let r=null;return n?r=new(n||t):r=Vt(kT),r},providedIn:"root"})}return t})(),kT=(()=>{class t extends dv{_doc;constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case Pn.NONE:return r;case Pn.HTML:return vr(r,"HTML")?tr(r):Ym(this._doc,String(r)).toString();case Pn.STYLE:return vr(r,"Style")?tr(r):r;case Pn.SCRIPT:if(vr(r,"Script"))return tr(r);throw new Nt(5200,!1);case Pn.URL:return vr(r,"URL")?tr(r):Hu(String(r));case Pn.RESOURCE_URL:if(vr(r,"ResourceURL"))return tr(r);throw new Nt(5201,!1);default:throw new Nt(5202,!1)}}bypassSecurityTrustHtml(n){return EE(n)}bypassSecurityTrustStyle(n){return xE(n)}bypassSecurityTrustScript(n){return SE(n)}bypassSecurityTrustUrl(n){return CE(n)}bypassSecurityTrustResourceUrl(n){return IE(n)}static \u0275fac=function(n){return new(n||t)(Vt(Jt))};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),AT="9.10.8",be=class _c{static SDK_VERSION=AT;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 e=_c.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");_c.SDK_VERSION_CODE=parseInt(e,10)}},oo={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${be.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${be.SDK_VERSION}/dist/widget.min.js`},Ke=en(O0()),Ve=class{static log(...t){Ke.default.info(...t)}static debug(...t){Ke.default.debug(...t)}static error(...t){Ke.default.error(...t)}static warn(...t){Ke.default.warn(...t)}static info(...t){Ke.default.info(...t)}static trace(...t){Ke.default.trace(...t)}};function LT(t=be.LOG_PREFIX){Ke.default.useDefaults({formatter:function(n){n.unshift(`${t} (v${be.SDK_VERSION}):`)}});let e=MT();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Ke.default.setLevel(Ke.default[localStorage.cooeeLogLevel]):Ke.default.setLevel(oo.debug?Ke.default.TRACE:Ke.default.OFF)}function MT(){return new URL(location.href).searchParams?.get("cooee-debug")}var jo=en(Ap()),VT={providers:[EI()]},fl=en(uo()),XA=en(D0()),pv=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;currency;static get(){return window.CooeeSDK.config}update(t){return t??={},this.gaEnabled=t.gaEnabled,this.gaMeasurementID=t.gaMeasurementID,this.pixelPush=t.pixelPush,this.website=t.website??{},this.currencyCount=t.currencyCount??0,this.money=t.money,this.currency=t.currency,this.storefrontToken=t.storefrontToken,this.skipItemAttribute=t.skipItemAttribute,this}},gv=Object.prototype.toString;function uh(t){switch(gv.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return kr(t,Error)}}function Ci(t,e){return gv.call(t)===`[object ${e}]`}function mv(t){return Ci(t,"ErrorEvent")}function td(t){return Ci(t,"DOMError")}function jT(t){return Ci(t,"DOMException")}function Mn(t){return Ci(t,"String")}function hh(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function fh(t){return t===null||hh(t)||typeof t!="object"&&typeof t!="function"}function hi(t){return Ci(t,"Object")}function Sa(t){return typeof Event<"u"&&kr(t,Event)}function FT(t){return typeof Element<"u"&&kr(t,Element)}function BT(t){return Ci(t,"RegExp")}function Ca(t){return!!(t&&t.then&&typeof t.then=="function")}function UT(t){return hi(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function kr(t,e){try{return t instanceof e}catch{return!1}}function _v(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function oi(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function ed(t,e){if(!Array.isArray(t))return"";let n=[];for(let r=0;r<t.length;r++){let i=t[r];try{_v(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function HT(t,e,n=!1){return Mn(t)?BT(e)?e.test(t):Mn(e)?n?t===e:t.includes(e):!1:!1}function Ia(t,e=[],n=!1){return e.some(r=>HT(t,r,n))}function $T(t,e,n=250,r,i,o,s){if(!o.exception||!o.exception.values||!s||!kr(s.originalException,Error))return;let a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=zT(vc(t,e,i,s.originalException,r,o.exception.values,a,0),n))}function vc(t,e,n,r,i,o,s,a){if(o.length>=n+1)return o;let l=[...o];if(kr(r[i],Error)){nd(s,a);let u=t(e,r[i]),f=l.length;rd(u,i,f,a),l=vc(t,e,n,r[i],i,[u,...l],u,f)}return Array.isArray(r.errors)&&r.errors.forEach((u,f)=>{if(kr(u,Error)){nd(s,a);let d=t(e,u),_=l.length;rd(d,`errors[${f}]`,_,a),l=vc(t,e,n,u,i,[d,...l],d,_)}}),l}function nd(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Zt(j(j({},t.mechanism),t.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:e})}function rd(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Zt(j({},t.mechanism),{type:"chained",source:e,exception_id:n,parent_id:r})}function zT(t,e){return t.map(n=>(n.value&&(n.value=oi(n.value,e)),n))}var Er="8.18.0",Ft=globalThis;function dh(t,e,n){let r=n||Ft,i=r.__SENTRY__=r.__SENTRY__||{},o=i[Er]=i[Er]||{};return o[t]||(o[t]=e())}var ph=Ft,qT=80;function vv(t,e={}){if(!t)return"<unknown>";try{let n=t,r=5,i=[],o=0,s=0,a=" > ",l=a.length,u,f=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||qT;for(;n&&o++<r&&(u=GT(n,f),!(u==="html"||o>1&&s+i.length*l+u.length>=d));)i.push(u),s+=u.length,n=n.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function GT(t,e){let n=t,r=[];if(!n||!n.tagName)return"";if(ph.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=e&&e.length?e.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(i&&i.length)i.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let s=n.className;if(s&&Mn(s)){let a=s.split(/\s+/);for(let l of a)r.push(`.${l}`)}}let o=["aria-label","type","name","title","alt"];for(let s of o){let a=n.getAttribute(s);a&&r.push(`[${s}="${a}"]`)}return r.join("")}function WT(){try{return ph.document.location.href}catch{return""}}function ZT(t){if(!ph.HTMLElement)return null;let e=t,n=5;for(let r=0;r<n;r++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}var Co=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,YT="Sentry Logger ",yc=["debug","info","warn","error","log","assert","trace"],Ms={};function gh(t){if(!("console"in Ft))return t();let e=Ft.console,n={},r=Object.keys(Ms);r.forEach(i=>{let o=Ms[i];n[i]=e[i],e[i]=o});try{return t()}finally{r.forEach(i=>{e[i]=n[i]})}}function KT(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return Co?yc.forEach(n=>{e[n]=(...r)=>{t&&gh(()=>{Ft.console[n](`${YT}[${n}]:`,...r)})}}):yc.forEach(n=>{e[n]=()=>{}}),e}var wt=KT(),XT=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function JT(t){return t==="http"||t==="https"}function Ta(t,e=!1){let{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:l}=t;return`${a}://${l}${e&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${s}`}function QT(t){let e=XT.exec(t);if(!e){gh(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}let[n,r,i="",o="",s="",a=""]=e.slice(1),l="",u=a,f=u.split("/");if(f.length>1&&(l=f.slice(0,-1).join("/"),u=f.pop()),u){let d=u.match(/^\d+/);d&&(u=d[0])}return yv({host:o,pass:i,path:l,projectId:u,port:s,protocol:n,publicKey:r})}function yv(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function tO(t){if(!Co)return!0;let{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(i=>t[i]?!1:(wt.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?JT(r)?e&&isNaN(parseInt(e,10))?(wt.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(wt.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(wt.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function eO(t){let e=typeof t=="string"?QT(t):yv(t);if(!(!e||!tO(e)))return e}var xn=class extends Error{constructor(t,e="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=e}};function xe(t,e,n){if(!(e in t))return;let r=t[e],i=n(r);typeof i=="function"&&bv(i,r),t[e]=i}function Ar(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{Co&&wt.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function bv(t,e){try{let n=e.prototype||{};t.prototype=e.prototype=n,Ar(t,"__sentry_original__",e)}catch{}}function mh(t){return t.__sentry_original__}function nO(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function wv(t){if(uh(t))return j({message:t.message,name:t.name,stack:t.stack},od(t));if(Sa(t)){let e=j({type:t.type,target:id(t.target),currentTarget:id(t.currentTarget)},od(t));return typeof CustomEvent<"u"&&kr(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function id(t){try{return FT(t)?vv(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function od(t){if(typeof t=="object"&&t!==null){let e={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function rO(t,e=40){let n=Object.keys(wv(t));n.sort();let r=n[0];if(!r)return"[object has no keys]";if(r.length>=e)return oi(r,e);for(let i=n.length;i>0;i--){let o=n.slice(0,i).join(", ");if(!(o.length>e))return i===n.length?o:oi(o,e)}return""}function cn(t){return bc(t,new Map)}function bc(t,e){if(iO(t)){let n=e.get(t);if(n!==void 0)return n;let r={};e.set(t,r);for(let i of Object.keys(t))typeof t[i]<"u"&&(r[i]=bc(t[i],e));return r}if(Array.isArray(t)){let n=e.get(t);if(n!==void 0)return n;let r=[];return e.set(t,r),t.forEach(i=>{r.push(bc(i,e))}),r}return t}function iO(t){if(!hi(t))return!1;try{let e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch{return!0}}var Lr="?",sd=/\(error: (.*)\)/,ad=/captureMessage|captureException/;function oO(...t){let e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{let o=[],s=n.split(`
17
- `);for(let a=r;a<s.length;a++){let l=s[a];if(l.length>1024)continue;let u=sd.test(l)?l.replace(sd,"$1"):l;if(!u.match(/\S*Error: /)){for(let f of e){let d=f(u);if(d){o.push(d);break}}if(o.length>=50+i)break}}return sO(o.slice(i))}}function sO(t){if(!t.length)return[];let e=Array.from(t);return/sentryWrapped/.test(Fo(e).function||"")&&e.pop(),e.reverse(),ad.test(Fo(e).function||"")&&(e.pop(),ad.test(Fo(e).function||"")&&e.pop()),e.slice(0,50).map(n=>Zt(j({},n),{filename:n.filename||Fo(e).filename,function:n.function||Lr}))}function Fo(t){return t[t.length-1]||{}}var dl="<anonymous>";function cr(t){try{return!t||typeof t!="function"?dl:t.name||dl}catch{return dl}}function ld(t){let e=t.exception;if(e){let n=[];try{return e.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}var ss={},cd={};function Hr(t,e){ss[t]=ss[t]||[],ss[t].push(e)}function $r(t,e){cd[t]||(e(),cd[t]=!0)}function dn(t,e){let n=t&&ss[t];if(n)for(let r of n)try{r(e)}catch(i){Co&&wt.error(`Error while triggering instrumentation handler.
18
- Type: ${t}
19
- Name: ${cr(r)}
20
- Error:`,i)}}function aO(t){let e="console";Hr(e,t),$r(e,lO)}function lO(){"console"in Ft&&yc.forEach(function(t){t in Ft.console&&xe(Ft.console,t,function(e){return Ms[t]=e,function(...n){dn("console",{args:n,level:t});let r=Ms[t];r&&r.apply(Ft.console,n)}})})}var wc=Ft;function cO(){if(!("fetch"in wc))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Ec(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function uO(){if(typeof EdgeRuntime=="string")return!0;if(!cO())return!1;if(Ec(wc.fetch))return!0;let t=!1,e=wc.document;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=Ec(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){Co&&wt.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}var Ev=1e3;function Io(){return Date.now()/Ev}function hO(){let{performance:t}=Ft;if(!t||!t.now)return Io;let e=Date.now()-t.now(),n=t.timeOrigin==null?e:t.timeOrigin;return()=>(n+t.now())/Ev}var or=hO(),Bo,JA=(()=>{let{performance:t}=Ft;if(!t||!t.now){Bo="none";return}let e=3600*1e3,n=t.now(),r=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,o=i<e,s=t.timing&&t.timing.navigationStart,a=typeof s=="number"?Math.abs(s+n-r):e,l=a<e;return o||l?i<=a?(Bo="timeOrigin",t.timeOrigin):(Bo="navigationStart",s):(Bo="dateNow",r)})();function fO(t){let e="fetch";Hr(e,t),$r(e,dO)}function dO(){uO()&&xe(Ft,"fetch",function(t){return function(...e){let{method:n,url:r}=pO(e),i={args:e,fetchData:{method:n,url:r},startTimestamp:or()*1e3};dn("fetch",j({},i));let o=new Error().stack;return t.apply(Ft,e).then(s=>{let a=Zt(j({},i),{endTimestamp:or()*1e3,response:s});return dn("fetch",a),s},s=>{let a=Zt(j({},i),{endTimestamp:or()*1e3,error:s});throw dn("fetch",a),uh(s)&&s.stack===void 0&&(s.stack=o,Ar(s,"framesToPop",1)),s})}})}function xc(t,e){return!!t&&typeof t=="object"&&!!t[e]}function ud(t){return typeof t=="string"?t:t?xc(t,"url")?t.url:t.toString?t.toString():"":""}function pO(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[n,r]=t;return{url:ud(n),method:xc(r,"method")?String(r.method).toUpperCase():"GET"}}let e=t[0];return{url:ud(e),method:xc(e,"method")?String(e.method).toUpperCase():"GET"}}var Uo=null;function gO(t){let e="error";Hr(e,t),$r(e,mO)}function mO(){Uo=Ft.onerror,Ft.onerror=function(t,e,n,r,i){return dn("error",{column:r,error:i,line:n,msg:t,url:e}),Uo&&!Uo.__SENTRY_LOADER__?Uo.apply(this,arguments):!1},Ft.onerror.__SENTRY_INSTRUMENTED__=!0}var Ho=null;function _O(t){let e="unhandledrejection";Hr(e,t),$r(e,vO)}function vO(){Ho=Ft.onunhandledrejection,Ft.onunhandledrejection=function(t){return dn("unhandledrejection",t),Ho&&!Ho.__SENTRY_LOADER__?Ho.apply(this,arguments):!0},Ft.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function yO(){return"npm"}function bO(){let t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(i){if(t)return e.has(i)?!0:(e.add(i),!1);for(let o=0;o<e.length;o++)if(e[o]===i)return!0;return e.push(i),!1}function r(i){if(t)e.delete(i);else for(let o=0;o<e.length;o++)if(e[o]===i){e.splice(o,1);break}}return[n,r]}function pn(){let t=Ft,e=t.crypto||t.msCrypto,n=()=>Math.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{let r=new Uint8Array(1);return e.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function xv(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function Xn(t){let{message:e,event_id:n}=t;if(e)return e;let r=xv(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Sc(t,e,n){let r=t.exception=t.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=e||""),o.type||(o.type=n||"Error")}function so(t,e){let n=xv(t);if(!n)return;let r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism=j(j(j({},r),i),e),e&&"data"in e){let o=j(j({},i&&i.data),e.data);n.mechanism.data=o}}function hd(t){if(t&&t.__sentry_captured__)return!0;try{Ar(t,"__sentry_captured__",!0)}catch{}return!1}function wO(t){return Array.isArray(t)?t:[t]}function Jn(t,e=100,n=1/0){try{return Cc("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Sv(t,e=3,n=100*1024){let r=Jn(t,e);return CO(r)>n?Sv(t,e-1,n):r}function Cc(t,e,n=1/0,r=1/0,i=bO()){let[o,s]=i;if(e==null||["number","boolean","string"].includes(typeof e)&&!Number.isNaN(e))return e;let a=EO(t,e);if(!a.startsWith("[object "))return a;if(e.__sentry_skip_normalization__)return e;let l=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:n;if(l===0)return a.replace("object ","");if(o(e))return"[Circular ~]";let u=e;if(u&&typeof u.toJSON=="function")try{let y=u.toJSON();return Cc("",y,l-1,r,i)}catch{}let f=Array.isArray(e)?[]:{},d=0,_=wv(e);for(let y in _){if(!Object.prototype.hasOwnProperty.call(_,y))continue;if(d>=r){f[y]="[MaxProperties ~]";break}let x=_[y];f[y]=Cc(y,x,l-1,r,i),d++}return s(e),f}function EO(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(_v(e))return"[VueViewModel]";if(UT(e))return"[SyntheticEvent]";if(typeof e=="number"&&e!==e)return"[NaN]";if(typeof e=="function")return`[Function: ${cr(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;let n=xO(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function xO(t){let e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function SO(t){return~-encodeURI(t).split(/%..|./).length}function CO(t){return SO(JSON.stringify(t))}var Nn;(function(t){t[t.PENDING=0]="PENDING";let e=1;t[t.RESOLVED=e]="RESOLVED";let n=2;t[t.REJECTED=n]="REJECTED"})(Nn||(Nn={}));function Mr(t){return new To(e=>{e(t)})}function Vs(t){return new To((e,n)=>{n(t)})}var To=class mr{constructor(e){mr.prototype.__init.call(this),mr.prototype.__init2.call(this),mr.prototype.__init3.call(this),mr.prototype.__init4.call(this),this._state=Nn.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new mr((r,i)=>{this._handlers.push([!1,o=>{if(!e)r(o);else try{r(e(o))}catch(s){i(s)}},o=>{if(!n)i(o);else try{r(n(o))}catch(s){i(s)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new mr((n,r)=>{let i,o;return this.then(s=>{o=!1,i=s,e&&e()},s=>{o=!0,i=s,e&&e()}).then(()=>{if(o){r(i);return}n(i)})})}__init(){this._resolve=e=>{this._setResult(Nn.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Nn.REJECTED,e)}}__init3(){this._setResult=(e,n)=>{if(this._state===Nn.PENDING){if(Ca(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Nn.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===Nn.RESOLVED&&n[1](this._value),this._state===Nn.REJECTED&&n[2](this._value),n[0]=!0)})}}};function IO(t){let e=[];function n(){return t===void 0||e.length<t}function r(s){return e.splice(e.indexOf(s),1)[0]||Promise.resolve(void 0)}function i(s){if(!n())return Vs(new xn("Not adding Promise because buffer limit was reached."));let a=s();return e.indexOf(a)===-1&&e.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function o(s){return new To((a,l)=>{let u=e.length;if(!u)return a(!0);let f=setTimeout(()=>{s&&s>0&&a(!1)},s);e.forEach(d=>{Mr(d).then(()=>{--u||(clearTimeout(f),a(!0))},l)})})}return{$:e,add:i,drain:o}}function pl(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}var TO=["fatal","error","warning","log","info","debug"];function OO(t){return t==="warn"?"warning":TO.includes(t)?t:"log"}var DO="sentry-",RO=/^sentry-/;function NO(t){let e=PO(t);if(!e)return;let n=Object.entries(e).reduce((r,[i,o])=>{if(i.match(RO)){let s=i.slice(DO.length);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function PO(t){if(!(!t||!Mn(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{let r=fd(n);return Object.entries(r).forEach(([i,o])=>{e[i]=o}),e},{}):fd(t)}function fd(t){return t.split(",").map(e=>e.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((e,[n,r])=>(n&&r&&(e[n]=r),e),{})}function Oo(t,e=[]){return[t,e]}function kO(t,e){let[n,r]=t;return[n,[...r,e]]}function dd(t,e){let n=t[1];for(let r of n){let i=r[0].type;if(e(r,i))return!0}return!1}function Ic(t){return Ft.__SENTRY__&&Ft.__SENTRY__.encodePolyfill?Ft.__SENTRY__.encodePolyfill(t):new TextEncoder().encode(t)}function AO(t){let[e,n]=t,r=JSON.stringify(e);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[Ic(r),o]:r.push(typeof o=="string"?Ic(o):o)}for(let o of n){let[s,a]=o;if(i(`
10
+ `+A(R,y)):U}}function Pe(R,D){var b;return D.cache&&D.name&&D.storage.templates.get(D.name)?D.storage.templates.get(D.name):(b=typeof R=="function"?R:it(R,D),D.cache&&D.name&&D.storage.templates.define(D.name,b),b)}_.l.bind(_),n.compile=it,n.compileScope=re,n.compileScopeIntoFunction=z,n.compileToString=A,n.defaultConfig=_,n.filters=$e,n.getConfig=Ke,n.helpers=he,n.nativeHelpers=Se,n.parse=C,n.render=function(R,D,b,y){var L=Ke(b||{});if(!L.async)return Pe(R,L)(D,L);if(!y){if(typeof o=="function")return new o(function(U,W){try{U(Pe(R,L)(D,L))}catch(te){W(te)}});throw r("Please provide a callback function, this env doesn't support Promises")}try{Pe(R,L)(D,L,y)}catch(U){return y(U)}},n.templates=ce,Object.defineProperty(n,"__esModule",{value:!0})})}),So=kn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MilestoneRewardType=e.ProgressBarLayout=e.EngagementContentSource=e.EngagementObjective=e.OnsiteDeliveryType=e.ClickActionType=e.FrequencyGapUnit=e.FrequencyType=e.RedirectBehaviour=e.EngagementPlacementPosition=e.EngagementCollectionSource=e.PromotionType=e.CartFilterEnum=e.CartCurrencyOperator=e.CartCriteria=e.URLCriteria=e.UTMCriteria=e.CartItemSource=e.EngagementItemSource=e.PurchasedVisitor=e.LoggedInVisitor=e.SessionType=e.EngagementContentType=e.TriggerType=e.EngagementType=e.EngagementStatus=e.TimePreference=e.ScheduleFrequency=e.CriteriaFrequency=void 0;var t=function(_){return _[_.ONCE_PER_USER=1]="ONCE_PER_USER",_[_.ONCE_PER_SESSION=2]="ONCE_PER_SESSION",_[_.EVERY_TIME=3]="EVERY_TIME",_}(t||(e.CriteriaFrequency=t={})),n=function(_){return _[_.ONE_TIME=1]="ONE_TIME",_[_.MULTIPLE=2]="MULTIPLE",_[_.RECURRING=3]="RECURRING",_}(n||(e.ScheduleFrequency=n={})),r=function(_){return _[_.NOW=1]="NOW",_[_.LATER=2]="LATER",_[_.NEVER=3]="NEVER",_}(r||(e.TimePreference=r={})),i=function(_){return _[_.PUBLISHED=1]="PUBLISHED",_[_.DRAFT=2]="DRAFT",_[_.PAUSED=3]="PAUSED",_[_.STOPPED=5]="STOPPED",_[_.COMPLETED=6]="COMPLETED",_[_.UNINSTALLED=8]="UNINSTALLED",_}(i||(e.EngagementStatus=i={})),o=function(_){return _.CAMPAIGN="CAMPAIGN",_.NATIVE_AB="NATIVE_AB",_.CRO_COPILOT="CRO_COPILOT",_}(o||(e.EngagementType=o={})),s=function(_){return _[_.NONE=0]="NONE",_[_.RULE_BASED=1]="RULE_BASED",_[_.INTENT_BASED=2]="INTENT_BASED",_}(s||(e.TriggerType=s={})),a=function(_){return _[_.SINGLE=1]="SINGLE",_[_.EXCLUSION=2]="EXCLUSION",_[_.ABTESTING=3]="ABTESTING",_}(a||(e.EngagementContentType=a={})),l=function(_){return _[_.ALL=0]="ALL",_[_.NEW_ONLY=1]="NEW_ONLY",_[_.RETURNING_ONLY=2]="RETURNING_ONLY",_}(l||(e.SessionType=l={})),u=function(_){return _.ALL="ALL",_.LOGGED_IN="LOGGED_IN",_.NON_LOGGED_IN="NON_LOGGED_IN",_}(u||(e.LoggedInVisitor=u={})),d=function(_){return _.ALL="ALL",_.PURCHASED="PURCHASED",_.NON_PURCHASED="NON_PURCHASED",_}(d||(e.PurchasedVisitor=d={})),h=function(_){return _[_.NONE=0]="NONE",_[_.ITEM_RECOMMENDATION=1]="ITEM_RECOMMENDATION",_[_.MULTIPLE_ITEMS=2]="MULTIPLE_ITEMS",_[_.SINGLE_ITEM=3]="SINGLE_ITEM",_[_.TOP_SELLING=4]="TOP_SELLING",_[_.STOCK_CLEARANCE=5]="STOCK_CLEARANCE",_[_.NEW_ARRIVALS=6]="NEW_ARRIVALS",_[_.RECENTLY_VIEWED=7]="RECENTLY_VIEWED",_[_.EVENT_ITEM=8]="EVENT_ITEM",_[_.CART_ITEM=9]="CART_ITEM",_[_.BUNDLE=10]="BUNDLE",_[_.CURRENT_ITEM=11]="CURRENT_ITEM",_[_.PURCHASED_PREVIOUSLY=12]="PURCHASED_PREVIOUSLY",_[_.COLLECTION_ITEMS=13]="COLLECTION_ITEMS",_[_.TRENDING_ITEMS=14]="TRENDING_ITEMS",_}(h||(e.EngagementItemSource=h={})),v=function(_){return _[_.LAST_ADDED=1]="LAST_ADDED",_[_.FIRST_ADDED=2]="FIRST_ADDED",_[_.HIGHEST_PRICE=3]="HIGHEST_PRICE",_[_.LOWEST_PRICE=4]="LOWEST_PRICE",_[_.FIRST_MATCHING_TAG=5]="FIRST_MATCHING_TAG",_[_.ALL=6]="ALL",_}(v||(e.CartItemSource=v={})),m=function(_){return _[_.ALL=0]="ALL",_[_.ONLY_ORGANIC=1]="ONLY_ORGANIC",_[_.ONLY_NON_ORGANIC=2]="ONLY_NON_ORGANIC",_[_.INCLUDES=3]="INCLUDES",_[_.EXCLUDES=4]="EXCLUDES",_}(m||(e.UTMCriteria=m={})),w=function(_){return _[_.NONE=0]="NONE",_[_.LIKE=1]="LIKE",_[_.NOT_LIKE=2]="NOT_LIKE",_[_.EQUALS=3]="EQUALS",_[_.NOT_EQUALS=4]="NOT_EQUALS",_}(w||(e.URLCriteria=w={})),C=function(_){return _[_.NONE=0]="NONE",_[_.LESS_THAN=1]="LESS_THAN",_[_.GREATER_THAN=2]="GREATER_THAN",_[_.BETWEEN=3]="BETWEEN",_[_.EQUALS=4]="EQUALS",_}(C||(e.CartCriteria=C={})),A=function(_){return _[_.ALL=0]="ALL",_[_.INCLUDES=1]="INCLUDES",_[_.EXCLUDES=2]="EXCLUDES",_}(A||(e.CartCurrencyOperator=A={})),k=function(_){return _[_.NONE=0]="NONE",_[_.AMOUNT=1]="AMOUNT",_[_.TOTAL_PRODUCT=2]="TOTAL_PRODUCT",_[_.UNIQUE_PRODUCT=3]="UNIQUE_PRODUCT",_}(k||(e.CartFilterEnum=k={})),$=function(_){return _[_.NONE=0]="NONE",_[_.ITEM=1]="ITEM",_[_.COLLECTION=2]="COLLECTION",_}($||(e.PromotionType=$={})),ne=function(_){return _[_.NONE=0]="NONE",_[_.SINGLE=1]="SINGLE",_[_.MULTIPLE=2]="MULTIPLE",_}(ne||(e.EngagementCollectionSource=ne={})),z=function(_){return _.BEFORE="before",_.AFTER="after",_.INSIDE_FIRST="insideFirst",_.INSIDE_LAST="insideLast",_}(z||(e.EngagementPlacementPosition=z={})),re=function(_){return _.SHOPIFY_CHECKOUT="shopify_checkout",_.THIRD_PARTY_CHECKOUT="third_party_checkout",_.CART_PAGE="cart_page",_.CART_DRAWER="cart_drawer",_}(re||(e.RedirectBehaviour=re={})),Re=function(_){return _.ONCE_IN_SESSION="ONCE_IN_SESSION",_.ACROSS_SESSIONS="ACROSS_SESSIONS",_}(Re||(e.FrequencyType=Re={})),Ne=function(_){return _.DAYS="DAYS",_.HOURS="HOURS",_.MINUTES="MINUTES",_.SECONDS="SECONDS",_}(Ne||(e.FrequencyGapUnit=Ne={})),V=function(_){return _[_.NONE=0]="NONE",_[_.REJECT_POPUP=1]="REJECT_POPUP",_[_.ACCEPT_POPUP=2]="ACCEPT_POPUP",_[_.GO_TO_URL=4]="GO_TO_URL",_[_.SHARE=5]="SHARE",_[_.KEY_VALUE=100]="KEY_VALUE",_[_.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",_[_.ADD_TO_CART=102]="ADD_TO_CART",_[_.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",_[_.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",_[_.OPEN_CART=105]="OPEN_CART",_[_.SUBMIT_FORM=106]="SUBMIT_FORM",_[_.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",_[_.ADD_BUNDLE=108]="ADD_BUNDLE",_[_.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",_}(V||(e.ClickActionType=V={})),fe=function(_){return _.POPUP="POPUP",_.PAGE_EMBED="PAGE_EMBED",_.CART_EMBED="CART_EMBED",_.ANNOUNCEMENT_BAR="ANNOUNCEMENT_BAR",_}(fe||(e.OnsiteDeliveryType=fe={})),ce=function(_){return _.PRODUCT_PROMOTION="PRODUCT_PROMOTION",_.BUNDLE_AND_UPSELL="BUNDLE_AND_UPSELL",_.CART_RECOVERY="CART_RECOVERY",_.ANNOUNCEMENT="ANNOUNCEMENT",_.LEAD_GENERATION="LEAD_GENERATION",_.DATA_COLLECTION="DATA_COLLECTION",_.SALE_PROMOTION="SALE_PROMOTION",_.SUBSCRIPTION_UPSELL="SUBSCRIPTION_UPSELL",_.SHOPPABLE_VIDEO="SHOPPABLE_VIDEO",_.BYOB="BYOB",_.PROGRESS_BAR="PROGRESS_BAR",_.BUY_NOW="BUY_NOW",_.STICKY_ATC="STICKY_ATC",_.EXPERIMENT="EXPERIMENT",_}(ce||(e.EngagementObjective=ce={})),he=function(_){return _.COOEE="COOEE",_.KLAVIYO="KLAVIYO",_}(he||(e.EngagementContentSource=he={})),Se=function(_){return _.ICONS="ICONS",_.TILES="TILES",_}(Se||(e.ProgressBarLayout=Se={})),$e=function(_){return _.FREE_SHIPPING="FREE_SHIPPING",_.DISCOUNT="DISCOUNT",_.FREE_AUTO_GIFT="FREE_AUTO_GIFT",_.FREE_GIFT_SELECT="FREE_GIFT_SELECT",_}($e||(e.MilestoneRewardType=$e={}))}),zb=kn(e=>{"use strict";var t=e&&e.__awaiter||function(r,i,o,s){function a(l){return l instanceof o?l:new o(function(u){u(l)})}return new(o||(o=Promise))(function(l,u){function d(m){try{v(s.next(m))}catch(w){u(w)}}function h(m){try{v(s.throw(m))}catch(w){u(w)}}function v(m){m.done?l(m.value):a(m.value).then(d,h)}v((s=s.apply(r,i||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.JSUtils=void 0;var n=class{static isObject(r){return typeof r=="object"&&!Array.isArray(r)&&r!==null}static parseToAny(r){try{return JSON.parse(r.toString())}catch{}return r.toString().match(this.ISO_WITHOUT_MS_REGEX)?new Date(r.toString()):r}static sleep(r){return t(this,void 0,void 0,function*(){return new Promise(i=>setTimeout(i,r))})}static hasKeys(r){return r?Object.keys(r).length>=1:!1}static convertObjectToArray(r,i){return i.reduce((o,s)=>(r.hasOwnProperty(s)&&r[s]!=null&&o.push({[s]:r[s]}),o),[])}static removeNullUndefinedKeys(r){return Object.keys(r).reduce((i,o)=>(r[o]!==null&&r[o]!==void 0&&(i[o]=r[o]),i),{})}static stringify(r){return JSON.stringify(r,function(i,o){return o===void 0?null:o})}};e.JSUtils=n,n.ISO_WITHOUT_MS_REGEX=new RegExp(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)/)}),qb=kn((e,t)=>{"use strict";(function(n){if(typeof e=="object"&&typeof t<"u")t.exports=n();else if(typeof define=="function"&&define.amd)define([],n);else{var r;typeof window<"u"?r=window:typeof global<"u"?r=global:typeof self<"u"?r=self:r=this,r.localforage=n()}})(function(){var n,r,i;return function o(s,a,l){function u(v,m){if(!a[v]){if(!s[v]){var w=typeof qo=="function"&&qo;if(!m&&w)return w(v,!0);if(d)return d(v,!0);var C=new Error("Cannot find module '"+v+"'");throw C.code="MODULE_NOT_FOUND",C}var A=a[v]={exports:{}};s[v][0].call(A.exports,function(k){var $=s[v][1][k];return u($||k)},A,A.exports,o,s,a,l)}return a[v].exports}for(var d=typeof qo=="function"&&qo,h=0;h<l.length;h++)u(l[h]);return u}({1:[function(o,s,a){(function(l){"use strict";var u=l.MutationObserver||l.WebKitMutationObserver,d;if(u){var h=0,v=new u(k),m=l.document.createTextNode("");v.observe(m,{characterData:!0}),d=function(){m.data=h=++h%2}}else if(!l.setImmediate&&typeof l.MessageChannel<"u"){var w=new l.MessageChannel;w.port1.onmessage=k,d=function(){w.port2.postMessage(0)}}else"document"in l&&"onreadystatechange"in l.document.createElement("script")?d=function(){var ne=l.document.createElement("script");ne.onreadystatechange=function(){k(),ne.onreadystatechange=null,ne.parentNode.removeChild(ne),ne=null},l.document.documentElement.appendChild(ne)}:d=function(){setTimeout(k,0)};var C,A=[];function k(){C=!0;for(var ne,z,re=A.length;re;){for(z=A,A=[],ne=-1;++ne<re;)z[ne]();re=A.length}C=!1}s.exports=$;function $(ne){A.push(ne)===1&&!C&&d()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(o,s,a){"use strict";var l=o(1);function u(){}var d={},h=["REJECTED"],v=["FULFILLED"],m=["PENDING"];s.exports=w;function w(V){if(typeof V!="function")throw new TypeError("resolver must be a function");this.state=m,this.queue=[],this.outcome=void 0,V!==u&&$(this,V)}w.prototype.catch=function(V){return this.then(null,V)},w.prototype.then=function(V,fe){if(typeof V!="function"&&this.state===v||typeof fe!="function"&&this.state===h)return this;var ce=new this.constructor(u);if(this.state!==m){var he=this.state===v?V:fe;A(ce,he,this.outcome)}else this.queue.push(new C(ce,V,fe));return ce};function C(V,fe,ce){this.promise=V,typeof fe=="function"&&(this.onFulfilled=fe,this.callFulfilled=this.otherCallFulfilled),typeof ce=="function"&&(this.onRejected=ce,this.callRejected=this.otherCallRejected)}C.prototype.callFulfilled=function(V){d.resolve(this.promise,V)},C.prototype.otherCallFulfilled=function(V){A(this.promise,this.onFulfilled,V)},C.prototype.callRejected=function(V){d.reject(this.promise,V)},C.prototype.otherCallRejected=function(V){A(this.promise,this.onRejected,V)};function A(V,fe,ce){l(function(){var he;try{he=fe(ce)}catch(Se){return d.reject(V,Se)}he===V?d.reject(V,new TypeError("Cannot resolve promise with itself")):d.resolve(V,he)})}d.resolve=function(V,fe){var ce=ne(k,fe);if(ce.status==="error")return d.reject(V,ce.value);var he=ce.value;if(he)$(V,he);else{V.state=v,V.outcome=fe;for(var Se=-1,$e=V.queue.length;++Se<$e;)V.queue[Se].callFulfilled(fe)}return V},d.reject=function(V,fe){V.state=h,V.outcome=fe;for(var ce=-1,he=V.queue.length;++ce<he;)V.queue[ce].callRejected(fe);return V};function k(V){var fe=V&&V.then;if(V&&(typeof V=="object"||typeof V=="function")&&typeof fe=="function")return function(){fe.apply(V,arguments)}}function $(V,fe){var ce=!1;function he(Ke){ce||(ce=!0,d.reject(V,Ke))}function Se(Ke){ce||(ce=!0,d.resolve(V,Ke))}function $e(){fe(Se,he)}var _=ne($e);_.status==="error"&&he(_.value)}function ne(V,fe){var ce={};try{ce.value=V(fe),ce.status="success"}catch(he){ce.status="error",ce.value=he}return ce}w.resolve=z;function z(V){return V instanceof this?V:d.resolve(new this(u),V)}w.reject=re;function re(V){var fe=new this(u);return d.reject(fe,V)}w.all=Re;function Re(V){var fe=this;if(Object.prototype.toString.call(V)!=="[object Array]")return this.reject(new TypeError("must be an array"));var ce=V.length,he=!1;if(!ce)return this.resolve([]);for(var Se=new Array(ce),$e=0,_=-1,Ke=new this(u);++_<ce;)it(V[_],_);return Ke;function it(Pe,R){fe.resolve(Pe).then(D,function(b){he||(he=!0,d.reject(Ke,b))});function D(b){Se[R]=b,++$e===ce&&!he&&(he=!0,d.resolve(Ke,Se))}}}w.race=Ne;function Ne(V){var fe=this;if(Object.prototype.toString.call(V)!=="[object Array]")return this.reject(new TypeError("must be an array"));var ce=V.length,he=!1;if(!ce)return this.resolve([]);for(var Se=-1,$e=new this(u);++Se<ce;)_(V[Se]);return $e;function _(Ke){fe.resolve(Ke).then(function(it){he||(he=!0,d.resolve($e,it))},function(it){he||(he=!0,d.reject($e,it))})}}},{1:1}],3:[function(o,s,a){(function(l){"use strict";typeof l.Promise!="function"&&(l.Promise=o(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(o,s,a){"use strict";var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g};function u(g,E){if(!(g instanceof E))throw new TypeError("Cannot call a class as a function")}function d(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var h=d();function v(){try{if(!h||!h.open)return!1;var g=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),E=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!g||E)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function m(g,E){g=g||[],E=E||{};try{return new Blob(g,E)}catch(O){if(O.name!=="TypeError")throw O;for(var x=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,T=new x,I=0;I<g.length;I+=1)T.append(g[I]);return T.getBlob(E.type)}}typeof Promise>"u"&&o(3);var w=Promise;function C(g,E){E&&g.then(function(x){E(null,x)},function(x){E(x)})}function A(g,E,x){typeof E=="function"&&g.then(E),typeof x=="function"&&g.catch(x)}function k(g){return typeof g!="string"&&(console.warn(g+" used as a key, but it is not a string."),g=String(g)),g}function $(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var ne="local-forage-detect-blob-support",z=void 0,re={},Re=Object.prototype.toString,Ne="readonly",V="readwrite";function fe(g){for(var E=g.length,x=new ArrayBuffer(E),T=new Uint8Array(x),I=0;I<E;I++)T[I]=g.charCodeAt(I);return x}function ce(g){return new w(function(E){var x=g.transaction(ne,V),T=m([""]);x.objectStore(ne).put(T,"key"),x.onabort=function(I){I.preventDefault(),I.stopPropagation(),E(!1)},x.oncomplete=function(){var I=navigator.userAgent.match(/Chrome\/(\d+)/),O=navigator.userAgent.match(/Edge\//);E(O||!I||parseInt(I[1],10)>=43)}}).catch(function(){return!1})}function he(g){return typeof z=="boolean"?w.resolve(z):ce(g).then(function(E){return z=E,z})}function Se(g){var E=re[g.name],x={};x.promise=new w(function(T,I){x.resolve=T,x.reject=I}),E.deferredOperations.push(x),E.dbReady?E.dbReady=E.dbReady.then(function(){return x.promise}):E.dbReady=x.promise}function $e(g){var E=re[g.name],x=E.deferredOperations.pop();if(x)return x.resolve(),x.promise}function _(g,E){var x=re[g.name],T=x.deferredOperations.pop();if(T)return T.reject(E),T.promise}function Ke(g,E){return new w(function(x,T){if(re[g.name]=re[g.name]||te(),g.db)if(E)Se(g),g.db.close();else return x(g.db);var I=[g.name];E&&I.push(g.version);var O=h.open.apply(h,I);E&&(O.onupgradeneeded=function(M){var B=O.result;try{B.createObjectStore(g.storeName),M.oldVersion<=1&&B.createObjectStore(ne)}catch(G){if(G.name==="ConstraintError")console.warn('The database "'+g.name+'" has been upgraded from version '+M.oldVersion+" to version "+M.newVersion+', but the storage "'+g.storeName+'" already exists.');else throw G}}),O.onerror=function(M){M.preventDefault(),T(O.error)},O.onsuccess=function(){var M=O.result;M.onversionchange=function(B){B.target.close()},x(M),$e(g)}})}function it(g){return Ke(g,!1)}function Pe(g){return Ke(g,!0)}function R(g,E){if(!g.db)return!0;var x=!g.db.objectStoreNames.contains(g.storeName),T=g.version<g.db.version,I=g.version>g.db.version;if(T&&(g.version!==E&&console.warn('The database "'+g.name+`" can't be downgraded from version `+g.db.version+" to version "+g.version+"."),g.version=g.db.version),I||x){if(x){var O=g.db.version+1;O>g.version&&(g.version=O)}return!0}return!1}function D(g){return new w(function(E,x){var T=new FileReader;T.onerror=x,T.onloadend=function(I){var O=btoa(I.target.result||"");E({__local_forage_encoded_blob:!0,data:O,type:g.type})},T.readAsBinaryString(g)})}function b(g){var E=fe(atob(g.data));return m([E],{type:g.type})}function y(g){return g&&g.__local_forage_encoded_blob}function L(g){var E=this,x=E._initReady().then(function(){var T=re[E._dbInfo.name];if(T&&T.dbReady)return T.dbReady});return A(x,g,g),x}function U(g){Se(g);for(var E=re[g.name],x=E.forages,T=0;T<x.length;T++){var I=x[T];I._dbInfo.db&&(I._dbInfo.db.close(),I._dbInfo.db=null)}return g.db=null,it(g).then(function(O){return g.db=O,R(g)?Pe(g):O}).then(function(O){g.db=E.db=O;for(var M=0;M<x.length;M++)x[M]._dbInfo.db=O}).catch(function(O){throw _(g,O),O})}function W(g,E,x,T){T===void 0&&(T=1);try{var I=g.db.transaction(g.storeName,E);x(null,I)}catch(O){if(T>0&&(!g.db||O.name==="InvalidStateError"||O.name==="NotFoundError"))return w.resolve().then(function(){if(!g.db||O.name==="NotFoundError"&&!g.db.objectStoreNames.contains(g.storeName)&&g.version<=g.db.version)return g.db&&(g.version=g.db.version+1),Pe(g)}).then(function(){return U(g).then(function(){W(g,E,x,T-1)})}).catch(x);x(O)}}function te(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function ee(g){var E=this,x={db:null};if(g)for(var T in g)x[T]=g[T];var I=re[x.name];I||(I=te(),re[x.name]=I),I.forages.push(E),E._initReady||(E._initReady=E.ready,E.ready=L);var O=[];function M(){return w.resolve()}for(var B=0;B<I.forages.length;B++){var G=I.forages[B];G!==E&&O.push(G._initReady().catch(M))}var q=I.forages.slice(0);return w.all(O).then(function(){return x.db=I.db,it(x)}).then(function(H){return x.db=H,R(x,E._defaultConfig.version)?Pe(x):H}).then(function(H){x.db=I.db=H,E._dbInfo=x;for(var ae=0;ae<q.length;ae++){var Te=q[ae];Te!==E&&(Te._dbInfo.db=x.db,Te._dbInfo.version=x.version)}})}function Y(g,E){var x=this;g=k(g);var T=new w(function(I,O){x.ready().then(function(){W(x._dbInfo,Ne,function(M,B){if(M)return O(M);try{var G=B.objectStore(x._dbInfo.storeName),q=G.get(g);q.onsuccess=function(){var H=q.result;H===void 0&&(H=null),y(H)&&(H=b(H)),I(H)},q.onerror=function(){O(q.error)}}catch(H){O(H)}})}).catch(O)});return C(T,E),T}function ue(g,E){var x=this,T=new w(function(I,O){x.ready().then(function(){W(x._dbInfo,Ne,function(M,B){if(M)return O(M);try{var G=B.objectStore(x._dbInfo.storeName),q=G.openCursor(),H=1;q.onsuccess=function(){var ae=q.result;if(ae){var Te=ae.value;y(Te)&&(Te=b(Te));var qe=g(Te,ae.key,H++);qe!==void 0?I(qe):ae.continue()}else I()},q.onerror=function(){O(q.error)}}catch(ae){O(ae)}})}).catch(O)});return C(T,E),T}function pe(g,E,x){var T=this;g=k(g);var I=new w(function(O,M){var B;T.ready().then(function(){return B=T._dbInfo,Re.call(E)==="[object Blob]"?he(B.db).then(function(G){return G?E:D(E)}):E}).then(function(G){W(T._dbInfo,V,function(q,H){if(q)return M(q);try{var ae=H.objectStore(T._dbInfo.storeName);G===null&&(G=void 0);var Te=ae.put(G,g);H.oncomplete=function(){G===void 0&&(G=null),O(G)},H.onabort=H.onerror=function(){var qe=Te.error?Te.error:Te.transaction.error;M(qe)}}catch(qe){M(qe)}})}).catch(M)});return C(I,x),I}function Ee(g,E){var x=this;g=k(g);var T=new w(function(I,O){x.ready().then(function(){W(x._dbInfo,V,function(M,B){if(M)return O(M);try{var G=B.objectStore(x._dbInfo.storeName),q=G.delete(g);B.oncomplete=function(){I()},B.onerror=function(){O(q.error)},B.onabort=function(){var H=q.error?q.error:q.transaction.error;O(H)}}catch(H){O(H)}})}).catch(O)});return C(T,E),T}function K(g){var E=this,x=new w(function(T,I){E.ready().then(function(){W(E._dbInfo,V,function(O,M){if(O)return I(O);try{var B=M.objectStore(E._dbInfo.storeName),G=B.clear();M.oncomplete=function(){T()},M.onabort=M.onerror=function(){var q=G.error?G.error:G.transaction.error;I(q)}}catch(q){I(q)}})}).catch(I)});return C(x,g),x}function oe(g){var E=this,x=new w(function(T,I){E.ready().then(function(){W(E._dbInfo,Ne,function(O,M){if(O)return I(O);try{var B=M.objectStore(E._dbInfo.storeName),G=B.count();G.onsuccess=function(){T(G.result)},G.onerror=function(){I(G.error)}}catch(q){I(q)}})}).catch(I)});return C(x,g),x}function me(g,E){var x=this,T=new w(function(I,O){if(g<0){I(null);return}x.ready().then(function(){W(x._dbInfo,Ne,function(M,B){if(M)return O(M);try{var G=B.objectStore(x._dbInfo.storeName),q=!1,H=G.openKeyCursor();H.onsuccess=function(){var ae=H.result;if(!ae){I(null);return}g===0||q?I(ae.key):(q=!0,ae.advance(g))},H.onerror=function(){O(H.error)}}catch(ae){O(ae)}})}).catch(O)});return C(T,E),T}function de(g){var E=this,x=new w(function(T,I){E.ready().then(function(){W(E._dbInfo,Ne,function(O,M){if(O)return I(O);try{var B=M.objectStore(E._dbInfo.storeName),G=B.openKeyCursor(),q=[];G.onsuccess=function(){var H=G.result;if(!H){T(q);return}q.push(H.key),H.continue()},G.onerror=function(){I(G.error)}}catch(H){I(H)}})}).catch(I)});return C(x,g),x}function c(g,E){E=$.apply(this,arguments);var x=this.config();g=typeof g!="function"&&g||{},g.name||(g.name=g.name||x.name,g.storeName=g.storeName||x.storeName);var T=this,I;if(!g.name)I=w.reject("Invalid arguments");else{var O=g.name===x.name&&T._dbInfo.db,M=O?w.resolve(T._dbInfo.db):it(g).then(function(B){var G=re[g.name],q=G.forages;G.db=B;for(var H=0;H<q.length;H++)q[H]._dbInfo.db=B;return B});g.storeName?I=M.then(function(B){if(B.objectStoreNames.contains(g.storeName)){var G=B.version+1;Se(g);var q=re[g.name],H=q.forages;B.close();for(var ae=0;ae<H.length;ae++){var Te=H[ae];Te._dbInfo.db=null,Te._dbInfo.version=G}var qe=new w(function(Ue,pt){var tt=h.open(g.name,G);tt.onerror=function(Kt){var ll=tt.result;ll.close(),pt(Kt)},tt.onupgradeneeded=function(){var Kt=tt.result;Kt.deleteObjectStore(g.storeName)},tt.onsuccess=function(){var Kt=tt.result;Kt.close(),Ue(Kt)}});return qe.then(function(Ue){q.db=Ue;for(var pt=0;pt<H.length;pt++){var tt=H[pt];tt._dbInfo.db=Ue,$e(tt._dbInfo)}}).catch(function(Ue){throw(_(g,Ue)||w.resolve()).catch(function(){}),Ue})}}):I=M.then(function(B){Se(g);var G=re[g.name],q=G.forages;B.close();for(var H=0;H<q.length;H++){var ae=q[H];ae._dbInfo.db=null}var Te=new w(function(qe,Ue){var pt=h.deleteDatabase(g.name);pt.onerror=function(){var tt=pt.result;tt&&tt.close(),Ue(pt.error)},pt.onblocked=function(){console.warn('dropInstance blocked for database "'+g.name+'" until all open connections are closed')},pt.onsuccess=function(){var tt=pt.result;tt&&tt.close(),qe(tt)}});return Te.then(function(qe){G.db=qe;for(var Ue=0;Ue<q.length;Ue++){var pt=q[Ue];$e(pt._dbInfo)}}).catch(function(qe){throw(_(g,qe)||w.resolve()).catch(function(){}),qe})})}return C(I,E),I}var f={_driver:"asyncStorage",_initStorage:ee,_support:v(),iterate:ue,getItem:Y,setItem:pe,removeItem:Ee,clear:K,length:oe,key:me,keys:de,dropInstance:c};function p(){return typeof openDatabase=="function"}var S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N="~~local_forage_type~",j=/^~~local_forage_type~([^~]+)~/,J="__lfsc__:",ie=J.length,Me="arbf",Ie="blob",je="si08",ke="ui08",Et="uic8",Ln="si16",ut="si32",sn="ur16",Sn="ui32",Qn="fl32",Ut="fl64",an=ie+Me.length,Ed=Object.prototype.toString;function xd(g){var E=g.length*.75,x=g.length,T,I=0,O,M,B,G;g[g.length-1]==="="&&(E--,g[g.length-2]==="="&&E--);var q=new ArrayBuffer(E),H=new Uint8Array(q);for(T=0;T<x;T+=4)O=S.indexOf(g[T]),M=S.indexOf(g[T+1]),B=S.indexOf(g[T+2]),G=S.indexOf(g[T+3]),H[I++]=O<<2|M>>4,H[I++]=(M&15)<<4|B>>2,H[I++]=(B&3)<<6|G&63;return q}function il(g){var E=new Uint8Array(g),x="",T;for(T=0;T<E.length;T+=3)x+=S[E[T]>>2],x+=S[(E[T]&3)<<4|E[T+1]>>4],x+=S[(E[T+1]&15)<<2|E[T+2]>>6],x+=S[E[T+2]&63];return E.length%3===2?x=x.substring(0,x.length-1)+"=":E.length%3===1&&(x=x.substring(0,x.length-2)+"=="),x}function X0(g,E){var x="";if(g&&(x=Ed.call(g)),g&&(x==="[object ArrayBuffer]"||g.buffer&&Ed.call(g.buffer)==="[object ArrayBuffer]")){var T,I=J;g instanceof ArrayBuffer?(T=g,I+=Me):(T=g.buffer,x==="[object Int8Array]"?I+=je:x==="[object Uint8Array]"?I+=ke:x==="[object Uint8ClampedArray]"?I+=Et:x==="[object Int16Array]"?I+=Ln:x==="[object Uint16Array]"?I+=sn:x==="[object Int32Array]"?I+=ut:x==="[object Uint32Array]"?I+=Sn:x==="[object Float32Array]"?I+=Qn:x==="[object Float64Array]"?I+=Ut:E(new Error("Failed to get type for BinaryArray"))),E(I+il(T))}else if(x==="[object Blob]"){var O=new FileReader;O.onload=function(){var M=N+g.type+"~"+il(this.result);E(J+Ie+M)},O.readAsArrayBuffer(g)}else try{E(JSON.stringify(g))}catch(M){console.error("Couldn't convert value into a JSON string: ",g),E(null,M)}}function Q0(g){if(g.substring(0,ie)!==J)return JSON.parse(g);var E=g.substring(an),x=g.substring(ie,an),T;if(x===Ie&&j.test(E)){var I=E.match(j);T=I[1],E=E.substring(I[0].length)}var O=xd(E);switch(x){case Me:return O;case Ie:return m([O],{type:T});case je:return new Int8Array(O);case ke:return new Uint8Array(O);case Et:return new Uint8ClampedArray(O);case Ln:return new Int16Array(O);case sn:return new Uint16Array(O);case ut:return new Int32Array(O);case Sn:return new Uint32Array(O);case Qn:return new Float32Array(O);case Ut:return new Float64Array(O);default:throw new Error("Unkown type: "+x)}}var ol={serialize:X0,deserialize:Q0,stringToBuffer:xd,bufferToString:il};function Sd(g,E,x,T){g.executeSql("CREATE TABLE IF NOT EXISTS "+E.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],x,T)}function eb(g){var E=this,x={db:null};if(g)for(var T in g)x[T]=typeof g[T]!="string"?g[T].toString():g[T];var I=new w(function(O,M){try{x.db=openDatabase(x.name,String(x.version),x.description,x.size)}catch(B){return M(B)}x.db.transaction(function(B){Sd(B,x,function(){E._dbInfo=x,O()},function(G,q){M(q)})},M)});return x.serializer=ol,I}function er(g,E,x,T,I,O){g.executeSql(x,T,I,function(M,B){B.code===B.SYNTAX_ERR?M.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[E.storeName],function(G,q){q.rows.length?O(G,B):Sd(G,E,function(){G.executeSql(x,T,I,O)},O)},O):O(M,B)},O)}function tb(g,E){var x=this;g=k(g);var T=new w(function(I,O){x.ready().then(function(){var M=x._dbInfo;M.db.transaction(function(B){er(B,M,"SELECT * FROM "+M.storeName+" WHERE key = ? LIMIT 1",[g],function(G,q){var H=q.rows.length?q.rows.item(0).value:null;H&&(H=M.serializer.deserialize(H)),I(H)},function(G,q){O(q)})})}).catch(O)});return C(T,E),T}function nb(g,E){var x=this,T=new w(function(I,O){x.ready().then(function(){var M=x._dbInfo;M.db.transaction(function(B){er(B,M,"SELECT * FROM "+M.storeName,[],function(G,q){for(var H=q.rows,ae=H.length,Te=0;Te<ae;Te++){var qe=H.item(Te),Ue=qe.value;if(Ue&&(Ue=M.serializer.deserialize(Ue)),Ue=g(Ue,qe.key,Te+1),Ue!==void 0){I(Ue);return}}I()},function(G,q){O(q)})})}).catch(O)});return C(T,E),T}function Cd(g,E,x,T){var I=this;g=k(g);var O=new w(function(M,B){I.ready().then(function(){E===void 0&&(E=null);var G=E,q=I._dbInfo;q.serializer.serialize(E,function(H,ae){ae?B(ae):q.db.transaction(function(Te){er(Te,q,"INSERT OR REPLACE INTO "+q.storeName+" (key, value) VALUES (?, ?)",[g,H],function(){M(G)},function(qe,Ue){B(Ue)})},function(Te){if(Te.code===Te.QUOTA_ERR){if(T>0){M(Cd.apply(I,[g,G,x,T-1]));return}B(Te)}})})}).catch(B)});return C(O,x),O}function rb(g,E,x){return Cd.apply(this,[g,E,x,1])}function ib(g,E){var x=this;g=k(g);var T=new w(function(I,O){x.ready().then(function(){var M=x._dbInfo;M.db.transaction(function(B){er(B,M,"DELETE FROM "+M.storeName+" WHERE key = ?",[g],function(){I()},function(G,q){O(q)})})}).catch(O)});return C(T,E),T}function ob(g){var E=this,x=new w(function(T,I){E.ready().then(function(){var O=E._dbInfo;O.db.transaction(function(M){er(M,O,"DELETE FROM "+O.storeName,[],function(){T()},function(B,G){I(G)})})}).catch(I)});return C(x,g),x}function sb(g){var E=this,x=new w(function(T,I){E.ready().then(function(){var O=E._dbInfo;O.db.transaction(function(M){er(M,O,"SELECT COUNT(key) as c FROM "+O.storeName,[],function(B,G){var q=G.rows.item(0).c;T(q)},function(B,G){I(G)})})}).catch(I)});return C(x,g),x}function ab(g,E){var x=this,T=new w(function(I,O){x.ready().then(function(){var M=x._dbInfo;M.db.transaction(function(B){er(B,M,"SELECT key FROM "+M.storeName+" WHERE id = ? LIMIT 1",[g+1],function(G,q){var H=q.rows.length?q.rows.item(0).key:null;I(H)},function(G,q){O(q)})})}).catch(O)});return C(T,E),T}function lb(g){var E=this,x=new w(function(T,I){E.ready().then(function(){var O=E._dbInfo;O.db.transaction(function(M){er(M,O,"SELECT key FROM "+O.storeName,[],function(B,G){for(var q=[],H=0;H<G.rows.length;H++)q.push(G.rows.item(H).key);T(q)},function(B,G){I(G)})})}).catch(I)});return C(x,g),x}function cb(g){return new w(function(E,x){g.transaction(function(T){T.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(I,O){for(var M=[],B=0;B<O.rows.length;B++)M.push(O.rows.item(B).name);E({db:g,storeNames:M})},function(I,O){x(O)})},function(T){x(T)})})}function ub(g,E){E=$.apply(this,arguments);var x=this.config();g=typeof g!="function"&&g||{},g.name||(g.name=g.name||x.name,g.storeName=g.storeName||x.storeName);var T=this,I;return g.name?I=new w(function(O){var M;g.name===x.name?M=T._dbInfo.db:M=openDatabase(g.name,"","",0),g.storeName?O({db:M,storeNames:[g.storeName]}):O(cb(M))}).then(function(O){return new w(function(M,B){O.db.transaction(function(G){function q(qe){return new w(function(Ue,pt){G.executeSql("DROP TABLE IF EXISTS "+qe,[],function(){Ue()},function(tt,Kt){pt(Kt)})})}for(var H=[],ae=0,Te=O.storeNames.length;ae<Te;ae++)H.push(q(O.storeNames[ae]));w.all(H).then(function(){M()}).catch(function(qe){B(qe)})},function(G){B(G)})})}):I=w.reject("Invalid arguments"),C(I,E),I}var hb={_driver:"webSQLStorage",_initStorage:eb,_support:p(),iterate:nb,getItem:tb,setItem:rb,removeItem:ib,clear:ob,length:sb,key:ab,keys:lb,dropInstance:ub};function db(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function Id(g,E){var x=g.name+"/";return g.storeName!==E.storeName&&(x+=g.storeName+"/"),x}function fb(){var g="_localforage_support_test";try{return localStorage.setItem(g,!0),localStorage.removeItem(g),!1}catch{return!0}}function pb(){return!fb()||localStorage.length>0}function gb(g){var E=this,x={};if(g)for(var T in g)x[T]=g[T];return x.keyPrefix=Id(g,E._defaultConfig),pb()?(E._dbInfo=x,x.serializer=ol,w.resolve()):w.reject()}function _b(g){var E=this,x=E.ready().then(function(){for(var T=E._dbInfo.keyPrefix,I=localStorage.length-1;I>=0;I--){var O=localStorage.key(I);O.indexOf(T)===0&&localStorage.removeItem(O)}});return C(x,g),x}function mb(g,E){var x=this;g=k(g);var T=x.ready().then(function(){var I=x._dbInfo,O=localStorage.getItem(I.keyPrefix+g);return O&&(O=I.serializer.deserialize(O)),O});return C(T,E),T}function vb(g,E){var x=this,T=x.ready().then(function(){for(var I=x._dbInfo,O=I.keyPrefix,M=O.length,B=localStorage.length,G=1,q=0;q<B;q++){var H=localStorage.key(q);if(H.indexOf(O)===0){var ae=localStorage.getItem(H);if(ae&&(ae=I.serializer.deserialize(ae)),ae=g(ae,H.substring(M),G++),ae!==void 0)return ae}}});return C(T,E),T}function yb(g,E){var x=this,T=x.ready().then(function(){var I=x._dbInfo,O;try{O=localStorage.key(g)}catch{O=null}return O&&(O=O.substring(I.keyPrefix.length)),O});return C(T,E),T}function bb(g){var E=this,x=E.ready().then(function(){for(var T=E._dbInfo,I=localStorage.length,O=[],M=0;M<I;M++){var B=localStorage.key(M);B.indexOf(T.keyPrefix)===0&&O.push(B.substring(T.keyPrefix.length))}return O});return C(x,g),x}function wb(g){var E=this,x=E.keys().then(function(T){return T.length});return C(x,g),x}function Eb(g,E){var x=this;g=k(g);var T=x.ready().then(function(){var I=x._dbInfo;localStorage.removeItem(I.keyPrefix+g)});return C(T,E),T}function xb(g,E,x){var T=this;g=k(g);var I=T.ready().then(function(){E===void 0&&(E=null);var O=E;return new w(function(M,B){var G=T._dbInfo;G.serializer.serialize(E,function(q,H){if(H)B(H);else try{localStorage.setItem(G.keyPrefix+g,q),M(O)}catch(ae){(ae.name==="QuotaExceededError"||ae.name==="NS_ERROR_DOM_QUOTA_REACHED")&&B(ae),B(ae)}})})});return C(I,x),I}function Sb(g,E){if(E=$.apply(this,arguments),g=typeof g!="function"&&g||{},!g.name){var x=this.config();g.name=g.name||x.name,g.storeName=g.storeName||x.storeName}var T=this,I;return g.name?I=new w(function(O){g.storeName?O(Id(g,T._defaultConfig)):O(g.name+"/")}).then(function(O){for(var M=localStorage.length-1;M>=0;M--){var B=localStorage.key(M);B.indexOf(O)===0&&localStorage.removeItem(B)}}):I=w.reject("Invalid arguments"),C(I,E),I}var Cb={_driver:"localStorageWrapper",_initStorage:gb,_support:db(),iterate:vb,getItem:mb,setItem:xb,removeItem:Eb,clear:_b,length:wb,key:yb,keys:bb,dropInstance:Sb},Ib=function(g,E){return g===E||typeof g=="number"&&typeof E=="number"&&isNaN(g)&&isNaN(E)},Tb=function(g,E){for(var x=g.length,T=0;T<x;){if(Ib(g[T],E))return!0;T++}return!1},Td=Array.isArray||function(g){return Object.prototype.toString.call(g)==="[object Array]"},Fi={},Od={},Jr={INDEXEDDB:f,WEBSQL:hb,LOCALSTORAGE:Cb},Ob=[Jr.INDEXEDDB._driver,Jr.WEBSQL._driver,Jr.LOCALSTORAGE._driver],zo=["dropInstance"],sl=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(zo),Db={description:"",driver:Ob.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Rb(g,E){g[E]=function(){var x=arguments;return g.ready().then(function(){return g[E].apply(g,x)})}}function al(){for(var g=1;g<arguments.length;g++){var E=arguments[g];if(E)for(var x in E)E.hasOwnProperty(x)&&(Td(E[x])?arguments[0][x]=E[x].slice():arguments[0][x]=E[x])}return arguments[0]}var Nb=function(){function g(E){u(this,g);for(var x in Jr)if(Jr.hasOwnProperty(x)){var T=Jr[x],I=T._driver;this[x]=I,Fi[I]||this.defineDriver(T)}this._defaultConfig=al({},Db),this._config=al({},this._defaultConfig,E),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return g.prototype.config=function(E){if((typeof E>"u"?"undefined":l(E))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var x in E){if(x==="storeName"&&(E[x]=E[x].replace(/\W/g,"_")),x==="version"&&typeof E[x]!="number")return new Error("Database version must be a number.");this._config[x]=E[x]}return"driver"in E&&E.driver?this.setDriver(this._config.driver):!0}else return typeof E=="string"?this._config[E]:this._config},g.prototype.defineDriver=function(E,x,T){var I=new w(function(O,M){try{var B=E._driver,G=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!E._driver){M(G);return}for(var q=sl.concat("_initStorage"),H=0,ae=q.length;H<ae;H++){var Te=q[H],qe=!Tb(zo,Te);if((qe||E[Te])&&typeof E[Te]!="function"){M(G);return}}var Ue=function(){for(var tt=function(kb){return function(){var Ab=new Error("Method "+kb+" is not implemented by the current driver"),Dd=w.reject(Ab);return C(Dd,arguments[arguments.length-1]),Dd}},Kt=0,ll=zo.length;Kt<ll;Kt++){var cl=zo[Kt];E[cl]||(E[cl]=tt(cl))}};Ue();var pt=function(tt){Fi[B]&&console.info("Redefining LocalForage driver: "+B),Fi[B]=E,Od[B]=tt,O()};"_support"in E?E._support&&typeof E._support=="function"?E._support().then(pt,M):pt(!!E._support):pt(!0)}catch(tt){M(tt)}});return A(I,x,T),I},g.prototype.driver=function(){return this._driver||null},g.prototype.getDriver=function(E,x,T){var I=Fi[E]?w.resolve(Fi[E]):w.reject(new Error("Driver not found."));return A(I,x,T),I},g.prototype.getSerializer=function(E){var x=w.resolve(ol);return A(x,E),x},g.prototype.ready=function(E){var x=this,T=x._driverSet.then(function(){return x._ready===null&&(x._ready=x._initDriver()),x._ready});return A(T,E,E),T},g.prototype.setDriver=function(E,x,T){var I=this;Td(E)||(E=[E]);var O=this._getSupportedDrivers(E);function M(){I._config.driver=I.driver()}function B(H){return I._extend(H),M(),I._ready=I._initStorage(I._config),I._ready}function G(H){return function(){var ae=0;function Te(){for(;ae<H.length;){var qe=H[ae];return ae++,I._dbInfo=null,I._ready=null,I.getDriver(qe).then(B).catch(Te)}M();var Ue=new Error("No available storage method found.");return I._driverSet=w.reject(Ue),I._driverSet}return Te()}}var q=this._driverSet!==null?this._driverSet.catch(function(){return w.resolve()}):w.resolve();return this._driverSet=q.then(function(){var H=O[0];return I._dbInfo=null,I._ready=null,I.getDriver(H).then(function(ae){I._driver=ae._driver,M(),I._wrapLibraryMethodsWithReady(),I._initDriver=G(O)})}).catch(function(){M();var H=new Error("No available storage method found.");return I._driverSet=w.reject(H),I._driverSet}),A(this._driverSet,x,T),this._driverSet},g.prototype.supports=function(E){return!!Od[E]},g.prototype._extend=function(E){al(this,E)},g.prototype._getSupportedDrivers=function(E){for(var x=[],T=0,I=E.length;T<I;T++){var O=E[T];this.supports(O)&&x.push(O)}return x},g.prototype._wrapLibraryMethodsWithReady=function(){for(var E=0,x=sl.length;E<x;E++)Rb(this,sl[E])},g.prototype.createInstance=function(E){return new g(E)},g}(),Pb=new Nb;s.exports=Pb},{3:3}]},{},[4])(4)})}),Gb=kn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MustacheUtils=void 0;var t=class Ng{static escapeHtml(r){return String(r).replace(/"/g,i=>Ng.entityMap[i])}};e.MustacheUtils=t,t.entityMap={'"':"&quot;"}}),Wb=kn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StorageDestination=e.AssetType=void 0;var t=function(r){return r[r.IMAGE=1]="IMAGE",r[r.VIDEO=2]="VIDEO",r[r.GIF=3]="GIF",r[r.SCREENSHOT=4]="SCREENSHOT",r[r.THREE_D=5]="THREE_D",r[r.FONT=6]="FONT",r[r.TEXT=7]="TEXT",r[r.JSON=8]="JSON",r[r.SVG=9]="SVG",r[r.HTML=10]="HTML",r[r.LOGO=11]="LOGO",r[r.OTHERS=1e3]="OTHERS",r}(t||(e.AssetType=t={})),n=function(r){return r.AWS_S3="AWS_S3",r.SHOPIFY_FILES="SHOPIFY_FILES",r}(n||(e.StorageDestination=n={}))}),Zb=kn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TemplateStatus=void 0;var t=function(n){return n[n.DRAFT=1]="DRAFT",n[n.PUBLISHED=2]="PUBLISHED",n[n.DISABLED=3]="DISABLED",n}(t||(e.TemplateStatus=t={}))}),Yb=kn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=void 0;var t=function(n){return n.VIEW_ITEM="VIEW_ITEM",n.ADD_TO_CART="ADD_TO_CART",n.VIEW_CATEGORY="VIEW_CATEGORY",n.VIEW_TAG="VIEW_TAG",n.SEARCH="SEARCH",n.APPLY_COUPON="APPLY_COUPON",n}(t||(e.ActionType=t={}))}),Kb=kn(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=e&&e.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wb(),e),n(Zb(),e),n(So(),e),n(Yb(),e)});function Jb(e,t){return Object.is(e,t)}var mt=null,hs=!1,Nu=1,ar=Symbol("SIGNAL");function Oe(e){let t=mt;return mt=e,t}function Xb(){return mt}var Pu={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Qb(e){if(hs)throw new Error("");if(mt===null)return;mt.consumerOnSignalRead(e);let t=mt.nextProducerIndex++;if(ha(mt),t<mt.producerNode.length&&mt.producerNode[t]!==e&&ro(mt)){let n=mt.producerNode[t];ua(n,mt.producerIndexOfThis[t])}mt.producerNode[t]!==e&&(mt.producerNode[t]=e,mt.producerIndexOfThis[t]=ro(mt)?Mg(e,mt,t):0),mt.producerLastReadVersion[t]=e.version}function ew(){Nu++}function tw(e){if(!(ro(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===Nu)){if(!e.producerMustRecompute(e)&&!Ag(e)){Pd(e);return}e.producerRecomputeValue(e),Pd(e)}}function Pg(e){if(e.liveConsumerNode===void 0)return;let t=hs;hs=!0;try{for(let n of e.liveConsumerNode)n.dirty||nw(n)}finally{hs=t}}function kg(){return mt?.consumerAllowSignalWrites!==!1}function nw(e){e.dirty=!0,Pg(e),e.consumerMarkedDirty?.(e)}function Pd(e){e.dirty=!1,e.lastCleanEpoch=Nu}function kd(e){return e&&(e.nextProducerIndex=0),Oe(e)}function rw(e,t){if(Oe(t),!(!e||e.producerNode===void 0||e.producerIndexOfThis===void 0||e.producerLastReadVersion===void 0)){if(ro(e))for(let n=e.nextProducerIndex;n<e.producerNode.length;n++)ua(e.producerNode[n],e.producerIndexOfThis[n]);for(;e.producerNode.length>e.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function Ag(e){ha(e);for(let t=0;t<e.producerNode.length;t++){let n=e.producerNode[t],r=e.producerLastReadVersion[t];if(r!==n.version||(tw(n),r!==n.version))return!0}return!1}function Lg(e){if(ha(e),ro(e))for(let t=0;t<e.producerNode.length;t++)ua(e.producerNode[t],e.producerIndexOfThis[t]);e.producerNode.length=e.producerLastReadVersion.length=e.producerIndexOfThis.length=0,e.liveConsumerNode&&(e.liveConsumerNode.length=e.liveConsumerIndexOfThis.length=0)}function Mg(e,t,n){if(jg(e),e.liveConsumerNode.length===0&&Fg(e))for(let r=0;r<e.producerNode.length;r++)e.producerIndexOfThis[r]=Mg(e.producerNode[r],e,r);return e.liveConsumerIndexOfThis.push(n),e.liveConsumerNode.push(t)-1}function ua(e,t){if(jg(e),e.liveConsumerNode.length===1&&Fg(e))for(let r=0;r<e.producerNode.length;r++)ua(e.producerNode[r],e.producerIndexOfThis[r]);let n=e.liveConsumerNode.length-1;if(e.liveConsumerNode[t]=e.liveConsumerNode[n],e.liveConsumerIndexOfThis[t]=e.liveConsumerIndexOfThis[n],e.liveConsumerNode.length--,e.liveConsumerIndexOfThis.length--,t<e.liveConsumerNode.length){let r=e.liveConsumerIndexOfThis[t],i=e.liveConsumerNode[t];ha(i),i.producerIndexOfThis[r]=t}}function ro(e){return e.consumerIsAlwaysLive||(e?.liveConsumerNode?.length??0)>0}function ha(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function jg(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}function Fg(e){return e.producerNode!==void 0}function iw(){throw new Error}var Vg=iw;function Bg(e){Vg(e)}function ow(e){Vg=e}var sw=null;function aw(e){let t=Object.create(cw);t.value=e;let n=()=>(Qb(t),t.value);return n[ar]=t,n}function Ug(e,t){kg()||Bg(e),e.equal(e.value,t)||(e.value=t,uw(e))}function lw(e,t){kg()||Bg(e),Ug(e,t(e.value))}var cw=Ye(F({},Pu),{equal:Jb,value:void 0,kind:"signal"});function uw(e){e.version++,ew(),Pg(e),sw?.()}function We(e){return typeof e=="function"}function Hg(e){let t=e(n=>{Error.call(n),n.stack=new Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var ul=Hg(e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription:
11
+ ${t.map((n,r)=>`${r+1}) ${n.toString()}`).join(`
12
+ `)}`:"",this.name="UnsubscriptionError",this.errors=t});function Cs(e,t){if(e){let n=e.indexOf(t);0<=n&&e.splice(n,1)}}var yt=class tc{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;let{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(let o of n)o.remove(this);else n.remove(this);let{initialTeardown:r}=this;if(We(r))try{r()}catch(o){t=o instanceof ul?o.errors:[o]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let o of i)try{Ad(o)}catch(s){t=t??[],s instanceof ul?t=[...t,...s.errors]:t.push(s)}}if(t)throw new ul(t)}}add(t){var n;if(t&&t!==this)if(this.closed)Ad(t);else{if(t instanceof tc){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}}_hasParent(t){let{_parentage:n}=this;return n===t||Array.isArray(n)&&n.includes(t)}_addParent(t){let{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t}_removeParent(t){let{_parentage:n}=this;n===t?this._parentage=null:Array.isArray(n)&&Cs(n,t)}remove(t){let{_finalizers:n}=this;n&&Cs(n,t),t instanceof tc&&t._removeParent(this)}};yt.EMPTY=(()=>{let e=new yt;return e.closed=!0,e})();var $g=yt.EMPTY;function zg(e){return e instanceof yt||e&&"closed"in e&&We(e.remove)&&We(e.add)&&We(e.unsubscribe)}function Ad(e){We(e)?e():e.unsubscribe()}var Gr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Is={setTimeout(e,t,...n){let{delegate:r}=Is;return r?.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){let{delegate:t}=Is;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function qg(e){Is.setTimeout(()=>{let{onUnhandledError:t}=Gr;if(t)t(e);else throw e})}function nc(){}var hw=ku("C",void 0,void 0);function dw(e){return ku("E",void 0,e)}function fw(e){return ku("N",e,void 0)}function ku(e,t,n){return{kind:e,value:t,error:n}}var Tr=null;function ds(e){if(Gr.useDeprecatedSynchronousErrorHandling){let t=!Tr;if(t&&(Tr={errorThrown:!1,error:null}),e(),t){let{errorThrown:n,error:r}=Tr;if(Tr=null,n)throw r}}else e()}function pw(e){Gr.useDeprecatedSynchronousErrorHandling&&Tr&&(Tr.errorThrown=!0,Tr.error=e)}var Au=class extends yt{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,zg(e)&&e.add(this)):this.destination=vw}static create(e,t,n){return new rc(e,t,n)}next(e){this.isStopped?dl(fw(e),this):this._next(e)}error(e){this.isStopped?dl(dw(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?dl(hw,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},gw=Function.prototype.bind;function hl(e,t){return gw.call(e,t)}var _w=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(n){Go(n)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(n){Go(n)}else Go(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){Go(t)}}},rc=class extends Au{constructor(e,t,n){super();let r;if(We(e)||!e)r={next:e??void 0,error:t??void 0,complete:n??void 0};else{let i;this&&Gr.useDeprecatedNextContext?(i=Object.create(e),i.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&hl(e.next,i),error:e.error&&hl(e.error,i),complete:e.complete&&hl(e.complete,i)}):r=e}this.destination=new _w(r)}};function Go(e){Gr.useDeprecatedSynchronousErrorHandling?pw(e):qg(e)}function mw(e){throw e}function dl(e,t){let{onStoppedNotification:n}=Gr;n&&Is.setTimeout(()=>n(e,t))}var vw={closed:!0,next:nc,error:mw,complete:nc},Lu=typeof Symbol=="function"&&Symbol.observable||"@@observable";function da(e){return e}function yw(e){return e.length===0?da:e.length===1?e[0]:function(t){return e.reduce((n,r)=>r(n),t)}}var bt=(()=>{class e{constructor(n){n&&(this._subscribe=n)}lift(n){let r=new e;return r.source=this,r.operator=n,r}subscribe(n,r,i){let o=ww(n)?n:new rc(n,r,i);return ds(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(n){try{return this._subscribe(n)}catch(r){n.error(r)}}forEach(n,r){return r=Ld(r),new r((i,o)=>{let s=new rc({next:a=>{try{n(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:i});this.subscribe(s)})}_subscribe(n){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(n)}[Lu](){return this}pipe(...n){return yw(n)(this)}toPromise(n){return n=Ld(n),new n((r,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>r(o))})}}return e.create=t=>new e(t),e})();function Ld(e){var t;return(t=e??Gr.Promise)!==null&&t!==void 0?t:Promise}function bw(e){return e&&We(e.next)&&We(e.error)&&We(e.complete)}function ww(e){return e&&e instanceof Au||bw(e)&&zg(e)}function Ew(e){return We(e?.lift)}function rn(e){return t=>{if(Ew(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function zt(e,t,n,r,i){return new xw(e,t,n,r,i)}var xw=class extends Au{constructor(e,t,n,r,i,o){super(e),this.onFinalize=i,this.shouldUnsubscribe=o,this._next=t?function(s){try{t(s)}catch(a){e.error(a)}}:super._next,this._error=r?function(s){try{r(s)}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(s){e.error(s)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:t}=this;super.unsubscribe(),!t&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}},Yi={schedule(e){let t=requestAnimationFrame,n=cancelAnimationFrame,{delegate:r}=Yi;r&&(t=r.requestAnimationFrame,n=r.cancelAnimationFrame);let i=t(o=>{n=void 0,e(o)});return new yt(()=>n?.(i))},requestAnimationFrame(...e){let{delegate:t}=Yi;return(t?.requestAnimationFrame||requestAnimationFrame)(...e)},cancelAnimationFrame(...e){let{delegate:t}=Yi;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...e)},delegate:void 0},Sw=Hg(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}),ye=(()=>{class e extends bt{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){let r=new Md(this,this);return r.operator=n,r}_throwIfClosed(){if(this.closed)throw new Sw}next(n){ds(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(n)}})}error(n){ds(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;let{observers:r}=this;for(;r.length;)r.shift().error(n)}})}complete(){ds(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:n}=this;for(;n.length;)n.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){let{hasError:r,isStopped:i,observers:o}=this;return r||i?$g:(this.currentObservers=null,o.push(n),new yt(()=>{this.currentObservers=null,Cs(o,n)}))}_checkFinalizedStatuses(n){let{hasError:r,thrownError:i,isStopped:o}=this;r?n.error(i):o&&n.complete()}asObservable(){let n=new bt;return n.source=this,n}}return e.create=(t,n)=>new Md(t,n),e})(),Md=class extends ye{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.next)===null||n===void 0||n.call(t,e)}error(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.error)===null||n===void 0||n.call(t,e)}complete(){var e,t;(t=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||t===void 0||t.call(e)}_subscribe(e){var t,n;return(n=(t=this.source)===null||t===void 0?void 0:t.subscribe(e))!==null&&n!==void 0?n:$g}},Mu=class extends ye{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let t=super._subscribe(e);return!t.closed&&e.next(this._value),t}getValue(){let{hasError:e,thrownError:t,_value:n}=this;if(e)throw t;return this._throwIfClosed(),n}next(e){super.next(this._value=e)}},ju={now(){return(ju.delegate||Date).now()},delegate:void 0},Cw=class extends ye{constructor(e=1/0,t=1/0,n=ju){super(),this._bufferSize=e,this._windowTime=t,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=t===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,t)}next(e){let{isStopped:t,_buffer:n,_infiniteTimeWindow:r,_timestampProvider:i,_windowTime:o}=this;t||(n.push(e),!r&&n.push(i.now()+o)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();let t=this._innerSubscribe(e),{_infiniteTimeWindow:n,_buffer:r}=this,i=r.slice();for(let o=0;o<i.length&&!e.closed;o+=n?1:2)e.next(i[o]);return this._checkFinalizedStatuses(e),t}_trimBuffer(){let{_bufferSize:e,_timestampProvider:t,_buffer:n,_infiniteTimeWindow:r}=this,i=(r?1:2)*e;if(e<1/0&&i<n.length&&n.splice(0,n.length-i),!r){let o=t.now(),s=0;for(let a=1;a<n.length&&n[a]<=o;a+=2)s=a;s&&n.splice(0,s+1)}}},Iw=class extends yt{constructor(e,t){super()}schedule(e,t=0){return this}},Ts={setInterval(e,t,...n){let{delegate:r}=Ts;return r?.setInterval?r.setInterval(e,t,...n):setInterval(e,t,...n)},clearInterval(e){let{delegate:t}=Ts;return(t?.clearInterval||clearInterval)(e)},delegate:void 0},Gg=class extends Iw{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){var n;if(this.closed)return this;this.state=e;let r=this.id,i=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=(n=this.id)!==null&&n!==void 0?n:this.requestAsyncId(i,this.id,t),this}requestAsyncId(e,t,n=0){return Ts.setInterval(e.flush.bind(e,this),n)}recycleAsyncId(e,t,n=0){if(n!=null&&this.delay===n&&this.pending===!1)return t;t!=null&&Ts.clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let n=this._execute(e,t);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let n=!1,r;try{this.work(e)}catch(i){n=!0,r=i||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){let{id:e,scheduler:t}=this,{actions:n}=t;this.work=this.state=this.scheduler=null,this.pending=!1,Cs(n,this),e!=null&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,super.unsubscribe()}}},ic=class Wg{constructor(t,n=Wg.now){this.schedulerActionCtor=t,this.now=n}schedule(t,n=0,r){return new this.schedulerActionCtor(this,t).schedule(r,n)}};ic.now=ju.now;var Zg=class extends ic{constructor(e,t=ic.now){super(e,t),this.actions=[],this._active=!1}flush(e){let{actions:t}=this;if(this._active){t.push(e);return}let n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},Fu=new Zg(Gg),Tw=Fu,Ow=class extends Gg{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,n=0){return n!==null&&n>0?super.requestAsyncId(e,t,n):(e.actions.push(this),e._scheduled||(e._scheduled=Yi.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,t,n=0){var r;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(e,t,n);let{actions:i}=e;t!=null&&((r=i[i.length-1])===null||r===void 0?void 0:r.id)!==t&&(Yi.cancelAnimationFrame(t),e._scheduled=void 0)}},Dw=class extends Zg{flush(e){this._active=!0;let t=this._scheduled;this._scheduled=void 0;let{actions:n}=this,r;e=e||n.shift();do if(r=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}}},Rw=new Dw(Ow),Vu=new bt(e=>e.complete());function Yg(e){return e&&We(e.schedule)}function Kg(e){return e[e.length-1]}function fa(e){return Yg(Kg(e))?e.pop():void 0}function Nw(e,t){return typeof Kg(e)=="number"?e.pop():t}function Pw(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(d){try{u(r.next(d))}catch(h){s(h)}}function l(d){try{u(r.throw(d))}catch(h){s(h)}}function u(d){d.done?o(d.value):i(d.value).then(a,l)}u((r=r.apply(e,t||[])).next())})}function jd(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ai(e){return this instanceof ai?(this.v=e,this):new ai(e)}function kw(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(m){return function(w){return Promise.resolve(w).then(m,h)}}function a(m,w){r[m]&&(i[m]=function(C){return new Promise(function(A,k){o.push([m,C,A,k])>1||l(m,C)})},w&&(i[m]=w(i[m])))}function l(m,w){try{u(r[m](w))}catch(C){v(o[0][3],C)}}function u(m){m.value instanceof ai?Promise.resolve(m.value.v).then(d,h):v(o[0][2],m)}function d(m){l("next",m)}function h(m){l("throw",m)}function v(m,w){m(w),o.shift(),o.length&&l(o[0][0],o[0][1])}}function Aw(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof jd=="function"?jd(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(s){return new Promise(function(a,l){s=e[o](s),i(a,l,s.done,s.value)})}}function i(o,s,a,l){Promise.resolve(l).then(function(u){o({value:u,done:a})},s)}}var Bu=e=>e&&typeof e.length=="number"&&typeof e!="function";function Jg(e){return We(e?.then)}function Xg(e){return We(e[Lu])}function Qg(e){return Symbol.asyncIterator&&We(e?.[Symbol.asyncIterator])}function e_(e){return new TypeError(`You provided ${e!==null&&typeof e=="object"?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function Lw(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var t_=Lw();function n_(e){return We(e?.[t_])}function r_(e){return kw(this,arguments,function*(){let t=e.getReader();try{for(;;){let{value:n,done:r}=yield ai(t.read());if(r)return yield ai(void 0);yield yield ai(n)}}finally{t.releaseLock()}})}function i_(e){return We(e?.getReader)}function wn(e){if(e instanceof bt)return e;if(e!=null){if(Xg(e))return Mw(e);if(Bu(e))return jw(e);if(Jg(e))return Fw(e);if(Qg(e))return o_(e);if(n_(e))return Vw(e);if(i_(e))return Bw(e)}throw e_(e)}function Mw(e){return new bt(t=>{let n=e[Lu]();if(We(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function jw(e){return new bt(t=>{for(let n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function Fw(e){return new bt(t=>{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,qg)})}function Vw(e){return new bt(t=>{for(let n of e)if(t.next(n),t.closed)return;t.complete()})}function o_(e){return new bt(t=>{Uw(e,t).catch(n=>t.error(n))})}function Bw(e){return o_(r_(e))}function Uw(e,t){var n,r,i,o;return Pw(this,void 0,void 0,function*(){try{for(n=Aw(e);r=yield n.next(),!r.done;){let s=r.value;if(t.next(s),t.closed)return}}catch(s){i={error:s}}finally{try{r&&!r.done&&(o=n.return)&&(yield o.call(n))}finally{if(i)throw i.error}}t.complete()})}function lr(e,t,n,r=0,i=!1){let o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function s_(e,t=0){return rn((n,r)=>{n.subscribe(zt(r,i=>lr(r,e,()=>r.next(i),t),()=>lr(r,e,()=>r.complete(),t),i=>lr(r,e,()=>r.error(i),t)))})}function a_(e,t=0){return rn((n,r)=>{r.add(e.schedule(()=>n.subscribe(r),t))})}function Hw(e,t){return wn(e).pipe(a_(t),s_(t))}function $w(e,t){return wn(e).pipe(a_(t),s_(t))}function zw(e,t){return new bt(n=>{let r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function qw(e,t){return new bt(n=>{let r;return lr(n,t,()=>{r=e[t_](),lr(n,t,()=>{let i,o;try{({value:i,done:o}=r.next())}catch(s){n.error(s);return}o?n.complete():n.next(i)},0,!0)}),()=>We(r?.return)&&r.return()})}function l_(e,t){if(!e)throw new Error("Iterable cannot be null");return new bt(n=>{lr(n,t,()=>{let r=e[Symbol.asyncIterator]();lr(n,t,()=>{r.next().then(i=>{i.done?n.complete():n.next(i.value)})},0,!0)})})}function Gw(e,t){return l_(r_(e),t)}function Ww(e,t){if(e!=null){if(Xg(e))return Hw(e,t);if(Bu(e))return zw(e,t);if(Jg(e))return $w(e,t);if(Qg(e))return l_(e,t);if(n_(e))return qw(e,t);if(i_(e))return Gw(e,t)}throw e_(e)}function pa(e,t){return t?Ww(e,t):wn(e)}function Uu(...e){let t=fa(e);return pa(e,t)}function Zw(e){return e instanceof Date&&!isNaN(e)}function ga(e,t){return rn((n,r)=>{let i=0;n.subscribe(zt(r,o=>{r.next(e.call(t,o,i++))}))})}var{isArray:Yw}=Array;function Kw(e,t){return Yw(t)?e(...t):e(t)}function Jw(e){return ga(t=>Kw(e,t))}function Xw(e,t,n,r,i,o,s,a){let l=[],u=0,d=0,h=!1,v=()=>{h&&!l.length&&!u&&t.complete()},m=C=>u<r?w(C):l.push(C),w=C=>{o&&t.next(C),u++;let A=!1;wn(n(C,d++)).subscribe(zt(t,k=>{i?.(k),o?m(k):t.next(k)},()=>{A=!0},void 0,()=>{if(A)try{for(u--;l.length&&u<r;){let k=l.shift();s?lr(t,s,()=>w(k)):w(k)}v()}catch(k){t.error(k)}}))};return e.subscribe(zt(t,m,()=>{h=!0,v()})),()=>{a?.()}}function io(e,t,n=1/0){return We(t)?io((r,i)=>ga((o,s)=>t(r,o,i,s))(wn(e(r,i))),n):(typeof t=="number"&&(n=t),rn((r,i)=>Xw(r,i,e,n)))}function c_(e=1/0){return io(da,e)}function Qw(){return c_(1)}function Fd(...e){return Qw()(pa(e,fa(e)))}function e1(e){return new bt(t=>{wn(e()).subscribe(t)})}var t1=["addListener","removeListener"],n1=["addEventListener","removeEventListener"],r1=["on","off"];function oc(e,t,n,r){if(We(n)&&(r=n,n=void 0),r)return oc(e,t,n).pipe(Jw(r));let[i,o]=s1(e)?n1.map(s=>a=>e[s](t,a,n)):i1(e)?t1.map(Vd(e,t)):o1(e)?r1.map(Vd(e,t)):[];if(!i&&Bu(e))return io(s=>oc(s,t,n))(wn(e));if(!i)throw new TypeError("Invalid event target");return new bt(s=>{let a=(...l)=>s.next(1<l.length?l:l[0]);return i(a),()=>o(a)})}function Vd(e,t){return n=>r=>e[n](t,r)}function i1(e){return We(e.addListener)&&We(e.removeListener)}function o1(e){return We(e.on)&&We(e.off)}function s1(e){return We(e.addEventListener)&&We(e.removeEventListener)}function u_(e=0,t,n=Tw){let r=-1;return t!=null&&(Yg(t)?n=t:r=t),new bt(i=>{let o=Zw(e)?+e-n.now():e;o<0&&(o=0);let s=0;return n.schedule(function(){i.closed||(i.next(s++),0<=r?this.schedule(void 0,r):i.complete())},o)})}function a1(e=0,t=Fu){return e<0&&(e=0),u_(e,e,t)}function _a(...e){let t=fa(e),n=Nw(e,1/0),r=e;return r.length?r.length===1?wn(r[0]):c_(n)(pa(r,t)):Vu}function Hu(e,t){return rn((n,r)=>{let i=0;n.subscribe(zt(r,o=>e.call(t,o,i++)&&r.next(o)))})}function l1(e){return rn((t,n)=>{let r=!1,i=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,r){r=!1;let u=i;i=null,n.next(u)}s&&n.complete()},l=()=>{o=null,s&&n.complete()};t.subscribe(zt(n,u=>{r=!0,i=u,o||wn(e(u)).subscribe(o=zt(n,a,l))},()=>{s=!0,(!r||!o||o.closed)&&n.complete()}))})}function h_(e,t=Fu){return l1(()=>u_(e,t))}function c1(e){return e<=0?()=>Vu:rn((t,n)=>{let r=0;t.subscribe(zt(n,i=>{++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function u1(e,t=da){return e=e??h1,rn((n,r)=>{let i,o=!0;n.subscribe(zt(r,s=>{let a=t(s);(o||!e(i,a))&&(o=!1,i=a,r.next(s))}))})}function h1(e,t){return e===t}function d1(e){return Hu((t,n)=>e<=n)}function d_(...e){let t=fa(e);return rn((n,r)=>{(t?Fd(e,n,t):Fd(e,n)).subscribe(r)})}function f_(e,t){return rn((n,r)=>{let i=null,o=0,s=!1,a=()=>s&&!i&&r.complete();n.subscribe(zt(r,l=>{i?.unsubscribe();let u=0,d=o++;wn(e(l,d)).subscribe(i=zt(r,h=>r.next(t?t(l,h,d,u++):h),()=>{i=null,a()}))},()=>{s=!0,a()}))})}function pi(e){return rn((t,n)=>{wn(e).subscribe(zt(n,()=>n.complete(),nc)),!n.closed&&t.subscribe(n)})}function f1(e,t,n){let r=We(e)||t||n?{next:e,error:t,complete:n}:e;return r?rn((i,o)=>{var s;(s=r.subscribe)===null||s===void 0||s.call(r);let a=!0;i.subscribe(zt(o,l=>{var u;(u=r.next)===null||u===void 0||u.call(r,l),o.next(l)},()=>{var l;a=!1,(l=r.complete)===null||l===void 0||l.call(r),o.complete()},l=>{var u;a=!1,(u=r.error)===null||u===void 0||u.call(r,l),o.error(l)},()=>{var l,u;a&&((l=r.unsubscribe)===null||l===void 0||l.call(r)),(u=r.finalize)===null||u===void 0||u.call(r)}))}):da}var p_="https://g.co/ng/security#xss",Ae=class extends Error{code;constructor(e,t){super(p1(e,t)),this.code=e}};function p1(e,t){return`${`NG0${Math.abs(e)}`}${t?": "+t:""}`}function $u(e){return{toString:e}.toString()}var oo=globalThis;function Xe(e){for(let t in e)if(e[t]===Xe)return t;throw Error("Could not find renamed property on target object.")}function g1(e,t){for(let n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function fn(e){if(typeof e=="string")return e;if(Array.isArray(e))return`[${e.map(fn).join(", ")}]`;if(e==null)return""+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let n=e.toString();if(n==null)return""+n;let r=n.indexOf(`
13
+ `);return r>=0?n.slice(0,r):n}function Bd(e,t){return e?t?`${e} ${t}`:e:t||""}var _1=Xe({__forward_ref__:Xe});function g_(e){return e.__forward_ref__=g_,e.toString=function(){return fn(this())},e}function Pt(e){return __(e)?e():e}function __(e){return typeof e=="function"&&e.hasOwnProperty(_1)&&e.__forward_ref__===g_}function _e(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function zu(e){return Ud(e,m_)||Ud(e,v_)}function Ud(e,t){return e.hasOwnProperty(t)?e[t]:null}function m1(e){return e&&(e[m_]||e[v_])||null}function Hd(e){return e&&(e.hasOwnProperty($d)||e.hasOwnProperty(v1))?e[$d]:null}var m_=Xe({\u0275prov:Xe}),$d=Xe({\u0275inj:Xe}),v_=Xe({ngInjectableDef:Xe}),v1=Xe({ngInjectorDef:Xe}),Ce=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=_e({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function y_(e){return e&&!!e.\u0275providers}var y1=Xe({\u0275cmp:Xe}),b1=Xe({\u0275dir:Xe}),b_=Xe({\u0275pipe:Xe}),Os=Xe({\u0275fac:Xe}),Ki=Xe({__NG_ELEMENT_ID__:Xe}),zd=Xe({__NG_ENV_ID__:Xe});function Co(e){return typeof e=="string"?e:e==null?"":String(e)}function w1(e){return typeof e=="function"?e.name||e.toString():typeof e=="object"&&e!=null&&typeof e.type=="function"?e.type.name||e.type.toString():Co(e)}function E1(e,t){throw new Ae(-200,e)}function qu(e,t){throw new Ae(-201,!1)}var De=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}(De||{}),sc;function w_(){return sc}function Mt(e){let t=sc;return sc=e,t}function E_(e,t,n){let r=zu(e);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(n&De.Optional)return null;if(t!==void 0)return t;qu(e,"Injector")}var x1={},so=x1,S1="__NG_DI_FLAG__",Ds="ngTempTokenPath",C1="ngTokenPath",I1=/\n/gm,T1="\u0275",qd="__source",li;function O1(){return li}function tr(e){let t=li;return li=e,t}function D1(e,t=De.Default){if(li===void 0)throw new Ae(-203,!1);return li===null?E_(e,void 0,t):li.get(e,t&De.Optional?null:void 0,t)}function Fe(e,t=De.Default){return(w_()||D1)(Pt(e),t)}function P(e,t=De.Default){return Fe(e,ma(t))}function ma(e){return typeof e>"u"||typeof e=="number"?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function ac(e){let t=[];for(let n=0;n<e.length;n++){let r=Pt(e[n]);if(Array.isArray(r)){if(r.length===0)throw new Ae(900,!1);let i,o=De.Default;for(let s=0;s<r.length;s++){let a=r[s],l=R1(a);typeof l=="number"?l===-1?i=a.token:o|=l:i=a}t.push(Fe(i,o))}else t.push(Fe(r))}return t}function R1(e){return e[S1]}function N1(e,t,n,r){let i=e[Ds];throw t[qd]&&i.unshift(t[qd]),e.message=P1(`
14
+ `+e.message,i,n,r),e[C1]=i,e[Ds]=null,e}function P1(e,t,n,r=null){e=e&&e.charAt(0)===`
15
+ `&&e.charAt(1)==T1?e.slice(2):e;let i=fn(t);if(Array.isArray(t))i=t.map(fn).join(" -> ");else if(typeof t=="object"){let o=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];o.push(s+":"+(typeof a=="string"?JSON.stringify(a):fn(a)))}i=`{${o.join(", ")}}`}return`${n}${r?"("+r+")":""}[${i}]: ${e.replace(I1,`
16
+ `)}`}function kr(e,t){return e.hasOwnProperty(Os)?e[Os]:null}function k1(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],o=t[r];if(n&&(i=n(i),o=n(o)),o!==i)return!1}return!0}function A1(e){return e.flat(Number.POSITIVE_INFINITY)}function Gu(e,t){e.forEach(n=>Array.isArray(n)?Gu(n,t):t(n))}function x_(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Rs(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function L1(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 o=i-2;e[i]=e[o],i--}e[t]=n,e[t+1]=r}}function M1(e,t,n){let r=Io(e,t);return r>=0?e[r|1]=n:(r=~r,L1(e,r,t,n)),r}function fl(e,t){let n=Io(e,t);if(n>=0)return e[n|1]}function Io(e,t){return j1(e,t,1)}function j1(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){let o=r+(i-r>>1),s=e[o<<n];if(t===s)return o<<n;s>t?i=o:r=o+1}return~(i<<n)}var Ar={},Hn=[],Ns=new Ce(""),S_=new Ce("",-1),C_=new Ce(""),I_=class{get(e,t=so){if(t===so){let n=new Error(`NullInjectorError: No provider for ${fn(e)}!`);throw n.name="NullInjectorError",n}return t}};function Lr(e){return e[y1]||null}function T_(e){return e[b1]||null}function O_(e){return e[b_]||null}function F1(e){let t=Lr(e)||T_(e)||O_(e);return t!==null&&t.standalone}function V1(e){return{\u0275providers:e}}function B1(...e){return{\u0275providers:D_(!0,e),\u0275fromNgModule:!0}}function D_(e,...t){let n=[],r=new Set,i,o=s=>{n.push(s)};return Gu(t,s=>{let a=s;lc(a,o,[],r)&&(i||=[],i.push(a))}),i!==void 0&&R_(i,o),n}function R_(e,t){for(let n=0;n<e.length;n++){let{ngModule:r,providers:i}=e[n];Wu(i,o=>{t(o,r)})}}function lc(e,t,n,r){if(e=Pt(e),!e)return!1;let i=null,o=Hd(e),s=!o&&Lr(e);if(!o&&!s){let l=e.ngModule;if(o=Hd(l),o)i=l;else return!1}else{if(s&&!s.standalone)return!1;i=e}let a=r.has(i);if(s){if(a)return!1;if(r.add(i),s.dependencies){let l=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let u of l)lc(u,t,n,r)}}else if(o){if(o.imports!=null&&!a){r.add(i);let u;try{Gu(o.imports,d=>{lc(d,t,n,r)&&(u||=[],u.push(d))})}finally{}u!==void 0&&R_(u,t)}if(!a){let u=kr(i)||(()=>new i);t({provide:i,useFactory:u,deps:Hn},i),t({provide:C_,useValue:i,multi:!0},i),t({provide:Ns,useValue:()=>Fe(i),multi:!0},i)}let l=o.providers;if(l!=null&&!a){let u=e;Wu(l,d=>{t(d,u)})}}else return!1;return i!==e&&e.providers!==void 0}function Wu(e,t){for(let n of e)y_(n)&&(n=n.\u0275providers),Array.isArray(n)?Wu(n,t):t(n)}var U1=Xe({provide:String,useValue:Xe});function N_(e){return e!==null&&typeof e=="object"&&U1 in e}function H1(e){return!!(e&&e.useExisting)}function $1(e){return!!(e&&e.useFactory)}function gi(e){return typeof e=="function"}function z1(e){return!!e.useClass}var Zu=new Ce(""),fs={},q1={},pl;function va(){return pl===void 0&&(pl=new I_),pl}var $n=class{},Yu=class extends $n{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,uc(e,o=>this.processProvider(o)),this.records.set(S_,ti(void 0,this)),r.has("environment")&&this.records.set($n,ti(void 0,this));let i=this.records.get(Zu);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(C_,Hn,De.Self))}destroy(){qi(this),this._destroyed=!0;let e=Oe(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(),Oe(e)}}onDestroy(e){return qi(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){qi(this);let t=tr(this),n=Mt(void 0),r;try{return e()}finally{tr(t),Mt(n)}}get(e,t=so,n=De.Default){if(qi(this),e.hasOwnProperty(zd))return e[zd](this);n=ma(n);let r,i=tr(this),o=Mt(void 0);try{if(!(n&De.SkipSelf)){let a=this.records.get(e);if(a===void 0){let l=K1(e)&&zu(e);l&&this.injectableDefInScope(l)?a=ti(cc(e),fs):a=null,this.records.set(e,a)}if(a!=null)return this.hydrate(e,a)}let s=n&De.Self?va():this.parent;return t=n&De.Optional&&t===so?null:t,s.get(e,t)}catch(s){if(s.name==="NullInjectorError"){if((s[Ds]=s[Ds]||[]).unshift(fn(e)),i)throw s;return N1(s,e,"R3InjectorError",this.source)}else throw s}finally{Mt(o),tr(i)}}resolveInjectorInitializers(){let e=Oe(null),t=tr(this),n=Mt(void 0),r;try{let i=this.get(Ns,Hn,De.Self);for(let o of i)o()}finally{tr(t),Mt(n),Oe(e)}}toString(){let e=[],t=this.records;for(let n of t.keys())e.push(fn(n));return`R3Injector[${e.join(", ")}]`}processProvider(e){e=Pt(e);let t=gi(e)?e:Pt(e&&e.provide),n=W1(e);if(!gi(e)&&e.multi===!0){let r=this.records.get(t);r||(r=ti(void 0,fs,!0),r.factory=()=>ac(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t){let n=Oe(null);try{return t.value===fs&&(t.value=q1,t.value=t.factory()),typeof t.value=="object"&&t.value&&Y1(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{Oe(n)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=Pt(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 cc(e){let t=zu(e),n=t!==null?t.factory:kr(e);if(n!==null)return n;if(e instanceof Ce)throw new Ae(204,!1);if(e instanceof Function)return G1(e);throw new Ae(204,!1)}function G1(e){if(e.length>0)throw new Ae(204,!1);let t=m1(e);return t!==null?()=>t.factory(e):()=>new e}function W1(e){if(N_(e))return ti(void 0,e.useValue);{let t=P_(e);return ti(t,fs)}}function P_(e,t,n){let r;if(gi(e)){let i=Pt(e);return kr(i)||cc(i)}else if(N_(e))r=()=>Pt(e.useValue);else if($1(e))r=()=>e.useFactory(...ac(e.deps||[]));else if(H1(e))r=()=>Fe(Pt(e.useExisting));else{let i=Pt(e&&(e.useClass||e.provide));if(Z1(e))r=()=>new i(...ac(e.deps));else return kr(i)||cc(i)}return r}function qi(e){if(e.destroyed)throw new Ae(205,!1)}function ti(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function Z1(e){return!!e.deps}function Y1(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function K1(e){return typeof e=="function"||typeof e=="object"&&e instanceof Ce}function uc(e,t){for(let n of e)Array.isArray(n)?uc(n,t):n&&y_(n)?uc(n.\u0275providers,t):t(n)}function k_(e,t){e instanceof Yu&&qi(e);let n,r=tr(e),i=Mt(void 0);try{return t()}finally{tr(r),Mt(i)}}function A_(){return w_()!==void 0||O1()!=null}function L_(e){if(!A_())throw new Ae(-203,!1)}function J1(e){return typeof e=="function"}var Zn=0,ge=1,ve=2,Rt=3,pn=4,En=5,ao=6,Ps=7,ht=8,lo=9,zn=10,wt=11,co=12,Gd=13,Si=14,vn=15,Mr=16,ni=17,qn=18,To=19,M_=20,cr=21,gl=22,ks=23,$t=24,ci=25,ct=26,j_=1,jr=7,As=8,_i=9,Dt=10;function Vn(e){return Array.isArray(e)&&typeof e[j_]=="object"}function Yn(e){return Array.isArray(e)&&e[j_]===!0}function Ku(e){return(e.flags&4)!==0}function Ci(e){return e.componentOffset>-1}function ya(e){return(e.flags&1)===1}function Rn(e){return!!e.template}function Ls(e){return(e[ve]&512)!==0}function Oo(e){return(e[ve]&256)===256}var X1=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function F_(e,t,n,r){t!==null?t.applyValueToInputSignal(t,r):e[n]=r}var V_=(()=>{let e=()=>B_;return e.ngInherit=!0,e})();function B_(e){return e.type.prototype.ngOnChanges&&(e.setInput=eE),Q1}function Q1(){let e=H_(this),t=e?.current;if(t){let n=e.previous;if(n===Ar)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function eE(e,t,n,r,i){let o=this.declaredInputs[r],s=H_(e)||tE(e,{previous:Ar,current:null}),a=s.current||(s.current={}),l=s.previous,u=l[o];a[o]=new X1(u&&u.currentValue,n,l===Ar),F_(e,t,i,n)}var U_="__ngSimpleChanges__";function H_(e){return e[U_]||null}function tE(e,t){return e[U_]=t}var nE=null,ze=function(e,t=null,n){nE?.(e,t,n)},$_="svg",rE="math";function qt(e){for(;Array.isArray(e);)e=e[Zn];return e}function z_(e,t){return qt(t[e])}function An(e,t){return qt(t[e.index])}function Ju(e,t){return e.data[t]}function ba(e,t){return e[t]}function tn(e,t){let n=t[e];return Vn(n)?n:n[Zn]}function iE(e){return(e[ve]&4)===4}function Xu(e){return(e[ve]&128)===128}function oE(e){return Yn(e[Rt])}function dr(e,t){return t==null?null:e[t]}function q_(e){e[ni]=0}function Qu(e){e[ve]&1024||(e[ve]|=1024,Xu(e)&&Do(e))}function sE(e,t){for(;e>0;)t=t[Si],e--;return t}function wa(e){return!!(e[ve]&9216||e[$t]?.dirty)}function hc(e){e[zn].changeDetectionScheduler?.notify(8),e[ve]&64&&(e[ve]|=1024),wa(e)&&Do(e)}function Do(e){e[zn].changeDetectionScheduler?.notify(0);let t=Fr(e);for(;t!==null&&!(t[ve]&8192||(t[ve]|=8192,!Xu(t)));)t=Fr(t)}function G_(e,t){if(Oo(e))throw new Ae(911,!1);e[cr]===null&&(e[cr]=[]),e[cr].push(t)}function aE(e,t){if(e[cr]===null)return;let n=e[cr].indexOf(t);n!==-1&&e[cr].splice(n,1)}function Fr(e){let t=e[Rt];return Yn(t)?t[Rt]:t}function W_(e){return e[Ps]??=[]}function Z_(e){return e.cleanup??=[]}function lE(e,t,n,r){let i=W_(t);i.push(n),e.firstCreatePass&&Z_(e).push(r,i.length-1)}var be={lFrame:nm(null),bindingsEnabled:!0,skipHydrationRootTNode:null},dc=!1;function cE(){return be.lFrame.elementDepthCount}function uE(){be.lFrame.elementDepthCount++}function hE(){be.lFrame.elementDepthCount--}function eh(){return be.bindingsEnabled}function dE(){return be.skipHydrationRootTNode!==null}function fE(e){return be.skipHydrationRootTNode===e}function pE(){be.skipHydrationRootTNode=null}function xe(){return be.lFrame.lView}function _t(){return be.lFrame.tView}function dt(e){return be.lFrame.contextLView=e,e[ht]}function ft(e){return be.lFrame.contextLView=null,e}function Gt(){let e=Y_();for(;e!==null&&e.type===64;)e=e.parent;return e}function Y_(){return be.lFrame.currentTNode}function gE(){let e=be.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function _r(e,t){let n=be.lFrame;n.currentTNode=e,n.isParent=t}function th(){return be.lFrame.isParent}function K_(){be.lFrame.isParent=!1}function J_(){return be.lFrame.contextLView}function X_(){return dc}function Wd(e){let t=dc;return dc=e,t}function Ea(){let e=be.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function _E(e){return be.lFrame.bindingIndex=e}function Ro(){return be.lFrame.bindingIndex++}function mE(e){let t=be.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function vE(){return be.lFrame.inI18n}function yE(e,t){let n=be.lFrame;n.bindingIndex=n.bindingRootIndex=e,fc(t)}function bE(){return be.lFrame.currentDirectiveIndex}function fc(e){be.lFrame.currentDirectiveIndex=e}function wE(e){let t=be.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function Q_(){return be.lFrame.currentQueryIndex}function nh(e){be.lFrame.currentQueryIndex=e}function EE(e){let t=e[ge];return t.type===2?t.declTNode:t.type===1?e[En]:null}function em(e,t,n){if(n&De.SkipSelf){let i=t,o=e;for(;(i=i.parent,i===null&&!(n&De.Host))&&(i=EE(o),!(i===null||(o=o[Si],i.type&10))););if(i===null)return!1;t=i,e=o}let r=be.lFrame=tm();return r.currentTNode=t,r.lView=e,!0}function rh(e){let t=tm(),n=e[ge];be.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function tm(){let e=be.lFrame,t=e===null?null:e.child;return t===null?nm(e):t}function nm(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 rm(){let e=be.lFrame;return be.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var im=rm;function ih(){let e=rm();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 xE(e){return(be.lFrame.contextLView=sE(e,be.lFrame.contextLView))[ht]}function mr(){return be.lFrame.selectedIndex}function Vr(e){be.lFrame.selectedIndex=e}function oh(){let e=be.lFrame;return Ju(e.tView,e.selectedIndex)}function fr(){be.lFrame.currentNamespace=$_}function Ms(){SE()}function SE(){be.lFrame.currentNamespace=null}function CE(){return be.lFrame.currentNamespace}var om=!0;function xa(){return om}function Sa(e){om=e}function IE(e,t,n){let{ngOnChanges:r,ngOnInit:i,ngDoCheck:o}=t.type.prototype;if(r){let s=B_(t);(n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s)}i&&(n.preOrderHooks??=[]).push(0-e,i),o&&((n.preOrderHooks??=[]).push(e,o),(n.preOrderCheckHooks??=[]).push(e,o))}function sh(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n<r;n++){let i=e.data[n].type.prototype,{ngAfterContentInit:o,ngAfterContentChecked:s,ngAfterViewInit:a,ngAfterViewChecked:l,ngOnDestroy:u}=i;o&&(e.contentHooks??=[]).push(-n,o),s&&((e.contentHooks??=[]).push(n,s),(e.contentCheckHooks??=[]).push(n,s)),a&&(e.viewHooks??=[]).push(-n,a),l&&((e.viewHooks??=[]).push(n,l),(e.viewCheckHooks??=[]).push(n,l)),u!=null&&(e.destroyHooks??=[]).push(n,u)}}function ps(e,t,n){sm(e,t,3,n)}function gs(e,t,n,r){(e[ve]&3)===n&&sm(e,t,n,r)}function _l(e,t){let n=e[ve];(n&3)===t&&(n&=16383,n+=1,e[ve]=n)}function sm(e,t,n,r){let i=r!==void 0?e[ni]&65535:0,o=r??-1,s=t.length-1,a=0;for(let l=i;l<s;l++)if(typeof t[l+1]=="number"){if(a=t[l],r!=null&&a>=r)break}else t[l]<0&&(e[ni]+=65536),(a<o||o==-1)&&(TE(e,n,t,l),e[ni]=(e[ni]&4294901760)+l+2),l++}function Zd(e,t){ze(4,e,t);let n=Oe(null);try{t.call(e)}finally{Oe(n),ze(5,e,t)}}function TE(e,t,n,r){let i=n[r]<0,o=n[r+1],s=i?-n[r]:n[r],a=e[s];i?e[ve]>>14<e[ni]>>16&&(e[ve]&3)===t&&(e[ve]+=16384,Zd(a,o)):Zd(a,o)}var ui=-1,No=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n){this.factory=e,this.canSeeViewProviders=t,this.injectImpl=n}};function OE(e){return e instanceof No}function DE(e){return(e.flags&8)!==0}function RE(e){return(e.flags&16)!==0}function NE(e,t,n){let r=0;for(;r<n.length;){let i=n[r];if(typeof i=="number"){if(i!==0)break;r++;let o=n[r++],s=n[r++],a=n[r++];e.setAttribute(t,s,a,o)}else{let o=i,s=n[++r];kE(o)?e.setProperty(t,o,s):e.setAttribute(t,o,s),r++}}return r}function PE(e){return e===3||e===4||e===6}function kE(e){return e.charCodeAt(0)===64}function mi(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?Yd(e,n,i,null,t[++r]):Yd(e,n,i,null,null))}}return e}function Yd(e,t,n,r,i){let o=0,s=e.length;if(t===-1)s=-1;else for(;o<e.length;){let a=e[o++];if(typeof a=="number"){if(a===t){s=-1;break}else if(a>t){s=o-1;break}}}for(;o<e.length;){let a=e[o];if(typeof a=="number")break;if(a===n){if(r===null){i!==null&&(e[o+1]=i);return}else if(r===e[o+1]){e[o+2]=i;return}}o++,r!==null&&o++,i!==null&&o++}s!==-1&&(e.splice(s,0,t),o=s+1),e.splice(o++,0,n),r!==null&&e.splice(o++,0,r),i!==null&&e.splice(o++,0,i)}var ml={},AE=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){n=ma(n);let r=this.injector.get(e,ml,n);return r!==ml||t===ml?r:this.parentInjector.get(e,t,n)}};function am(e){return e!==ui}function js(e){return e&32767}function LE(e){return e>>16}function Fs(e,t){let n=LE(e),r=t;for(;n>0;)r=r[Si],n--;return r}var pc=!0;function Vs(e){let t=pc;return pc=e,t}var ME=256,lm=ME-1,cm=5,jE=0,On={};function FE(e,t,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:n.hasOwnProperty(Ki)&&(r=n[Ki]),r==null&&(r=n[Ki]=jE++);let i=r&lm,o=1<<i;t.data[e+(i>>cm)]|=o}function Bs(e,t){let n=um(e,t);if(n!==-1)return n;let r=t[ge];r.firstCreatePass&&(e.injectorIndex=t.length,vl(r.data,e),vl(t,null),vl(r.blueprint,null));let i=ah(e,t),o=e.injectorIndex;if(am(i)){let s=js(i),a=Fs(i,t),l=a[ge].data;for(let u=0;u<8;u++)t[o+u]=a[s+u]|l[s+u]}return t[o+8]=i,o}function vl(e,t){e.push(0,0,0,0,0,0,0,0,t)}function um(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function ah(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=_m(i),r===null)return ui;if(n++,i=i[Si],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return ui}function gc(e,t,n){FE(e,t,n)}function hm(e,t,n){if(n&De.Optional||e!==void 0)return e;qu(t,"NodeInjector")}function dm(e,t,n,r){if(n&De.Optional&&r===void 0&&(r=null),(n&(De.Self|De.Host))===0){let i=e[lo],o=Mt(void 0);try{return i?i.get(t,r,n&De.Optional):E_(t,r,n&De.Optional)}finally{Mt(o)}}return hm(r,t,n)}function fm(e,t,n,r=De.Default,i){if(e!==null){if(t[ve]&2048&&!(r&De.Self)){let s=HE(e,t,n,r,On);if(s!==On)return s}let o=pm(e,t,n,r,On);if(o!==On)return o}return dm(t,n,r,i)}function pm(e,t,n,r,i){let o=BE(n);if(typeof o=="function"){if(!em(t,e,r))return r&De.Host?hm(i,n,r):dm(t,n,r,i);try{let s;if(s=o(r),s==null&&!(r&De.Optional))qu(n);else return s}finally{im()}}else if(typeof o=="number"){let s=null,a=um(e,t),l=ui,u=r&De.Host?t[vn][En]:null;for((a===-1||r&De.SkipSelf)&&(l=a===-1?ah(e,t):t[a+8],l===ui||!Jd(r,!1)?a=-1:(s=t[ge],a=js(l),t=Fs(l,t)));a!==-1;){let d=t[ge];if(Kd(o,a,d.data)){let h=VE(a,t,n,s,r,u);if(h!==On)return h}l=t[a+8],l!==ui&&Jd(r,t[ge].data[a+8]===u)&&Kd(o,a,t)?(s=d,a=js(l),t=Fs(l,t)):a=-1}}return i}function VE(e,t,n,r,i,o){let s=t[ge],a=s.data[e+8],l=r==null?Ci(a)&&pc:r!=s&&(a.type&3)!==0,u=i&De.Host&&o===a,d=_s(a,s,n,l,u);return d!==null?uo(t,s,d,a):On}function _s(e,t,n,r,i){let o=e.providerIndexes,s=t.data,a=o&1048575,l=e.directiveStart,u=e.directiveEnd,d=o>>20,h=r?a:a+d,v=i?a+d:u;for(let m=h;m<v;m++){let w=s[m];if(m<l&&n===w||m>=l&&w.type===n)return m}if(i){let m=s[l];if(m&&Rn(m)&&m.type===n)return l}return null}function uo(e,t,n,r){let i=e[n],o=t.data;if(OE(i)){let s=i;s.resolving&&E1(w1(o[n]));let a=Vs(s.canSeeViewProviders);s.resolving=!0;let l,u=s.injectImpl?Mt(s.injectImpl):null,d=em(e,r,De.Default);try{i=e[n]=s.factory(void 0,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&IE(n,o[n],t)}finally{u!==null&&Mt(u),Vs(a),s.resolving=!1,im()}}return i}function BE(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(Ki)?e[Ki]:void 0;return typeof t=="number"?t>=0?t&lm:UE:t}function Kd(e,t,n){let r=1<<e;return!!(n[t+(e>>cm)]&r)}function Jd(e,t){return!(e&De.Self)&&!(e&De.Host&&t)}var Ji=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return fm(this._tNode,this._lView,e,ma(n),t)}};function UE(){return new Ji(Gt(),xe())}function gm(e){return $u(()=>{let t=e.prototype.constructor,n=t[Os]||_c(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let o=i[Os]||_c(i);if(o&&o!==n)return o;i=Object.getPrototypeOf(i)}return o=>new o})}function _c(e){return __(e)?()=>{let t=_c(Pt(e));return t&&t()}:kr(e)}function HE(e,t,n,r,i){let o=e,s=t;for(;o!==null&&s!==null&&s[ve]&2048&&!Ls(s);){let a=pm(o,s,n,r|De.Self,On);if(a!==On)return a;let l=o.parent;if(!l){let u=s[M_];if(u){let d=u.get(n,On,r);if(d!==On)return d}l=_m(s),s=s[Si]}o=l}return i}function _m(e){let t=e[ge],n=t.type;return n===2?t.declTNode:n===1?e[En]:null}function Xd(e,t=null,n=null,r){let i=$E(e,t,n,r);return i.resolveInjectorInitializers(),i}function $E(e,t=null,n=null,r,i=new Set){let o=[n||Hn,B1(e)];return r=r||(typeof e=="object"?void 0:fn(e)),new Yu(o,t||va(),r||null,i)}var kt=class mm{static THROW_IF_NOT_FOUND=so;static NULL=new I_;static create(t,n){if(Array.isArray(t))return Xd({name:""},n,t,"");{let r=t.name??"";return Xd({name:r},t.parent,t.providers,r)}}static \u0275prov=_e({token:mm,providedIn:"any",factory:()=>Fe(S_)});static __NG_ELEMENT_ID__=-1},zE=new Ce("");zE.__NG_ELEMENT_ID__=e=>{let t=Gt();if(t===null)throw new Ae(204,!1);if(t.type&2)return t.value;if(e&De.Optional)return null;throw new Ae(204,!1)};var vm=!1,lh=(()=>{class e{static __NG_ELEMENT_ID__=GE;static __NG_ENV_ID__=n=>n}return e})(),qE=class extends lh{_lView;constructor(e){super(),this._lView=e}onDestroy(e){return G_(this._lView,e),()=>aE(this._lView,e)}};function GE(){return new qE(xe())}var Ii=class{},ch=new Ce("",{providedIn:"root",factory:()=>!1}),ym=new Ce(""),uh=new Ce(""),Ca=(()=>{class e{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new Mu(!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=_e({token:e,providedIn:"root",factory:()=>new e})}return e})(),WE=class extends ye{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,A_()&&(this.destroyRef=P(lh,{optional:!0})??void 0,this.pendingTasks=P(Ca,{optional:!0})??void 0)}emit(e){let t=Oe(null);try{super.next(e)}finally{Oe(t)}}subscribe(e,t,n){let r=e,i=t||(()=>null),o=n;if(e&&typeof e=="object"){let a=e;r=a.next?.bind(a),i=a.error?.bind(a),o=a.complete?.bind(a)}this.__isAsync&&(i=this.wrapInTimeout(i),r&&(r=this.wrapInTimeout(r)),o&&(o=this.wrapInTimeout(o)));let s=super.subscribe({next:r,error:i,complete:o});return e instanceof yt&&e.add(s),s}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{e(t),n!==void 0&&this.pendingTasks?.remove(n)})}}},Qe=WE;function Us(...e){}function bm(e){let t,n;function r(){e=Us;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 Qd(e){return queueMicrotask(()=>e()),()=>{e=Us}}var hh="isAngularZone",Hs=hh+"_ID",ZE=0,Ze=class mc{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Qe(!1);onMicrotaskEmpty=new Qe(!1);onStable=new Qe(!1);onError=new Qe(!1);constructor(t){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:o=vm}=t;if(typeof Zone>"u")throw new Ae(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!i&&r,s.shouldCoalesceRunChangeDetection=i,s.callbackScheduled=!1,s.scheduleInRootZone=o,JE(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(hh)===!0}static assertInAngularZone(){if(!mc.isInAngularZone())throw new Ae(909,!1)}static assertNotInAngularZone(){if(mc.isInAngularZone())throw new Ae(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,i){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+i,t,YE,Us,Us);try{return o.runTask(s,n,r)}finally{o.cancelTask(s)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}},YE={};function dh(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 KE(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){bm(()=>{e.callbackScheduled=!1,vc(e),e.isCheckStableRunning=!0,dh(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),vc(e)}function JE(e){let t=()=>{KE(e)},n=ZE++;e._inner=e._inner.fork({name:"angular",properties:{[hh]:!0,[Hs]:n,[Hs+n]:!0},onInvokeTask:(r,i,o,s,a,l)=>{if(XE(l))return r.invokeTask(o,s,a,l);try{return ef(e),r.invokeTask(o,s,a,l)}finally{(e.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),tf(e)}},onInvoke:(r,i,o,s,a,l,u)=>{try{return ef(e),r.invoke(o,s,a,l,u)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!QE(l)&&t(),tf(e)}},onHasTask:(r,i,o,s)=>{r.hasTask(o,s),i===o&&(s.change=="microTask"?(e._hasPendingMicrotasks=s.microTask,vc(e),dh(e)):s.change=="macroTask"&&(e.hasPendingMacrotasks=s.macroTask))},onHandleError:(r,i,o,s)=>(r.handleError(o,s),e.runOutsideAngular(()=>e.onError.emit(s)),!1)})}function vc(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function ef(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function tf(e){e._nesting--,dh(e)}var wm=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Qe;onMicrotaskEmpty=new Qe;onStable=new Qe;onError=new Qe;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 XE(e){return Em(e,"__ignore_ng_zone__")}function QE(e){return Em(e,"__scheduler_tick__")}function Em(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Ti=class{_console=console;handleError(e){this._console.error("ERROR",e)}},ex=new Ce("",{providedIn:"root",factory:()=>{let e=P(Ze),t=P(Ti);return n=>e.runOutsideAngular(()=>t.handleError(n))}});function tx(){return Oi(Gt(),xe())}function Oi(e,t){return new Vt(An(e,t))}var Vt=(()=>{class e{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=tx}return e})();function nx(e){return e instanceof Vt?e.nativeElement:e}function Bn(e,t){let n=aw(e),r=n[ar];return t?.equal&&(r.equal=t.equal),n.set=i=>Ug(r,i),n.update=i=>lw(r,i),n.asReadonly=rx.bind(n),n}function rx(){let e=this[ar];if(e.readonlyFn===void 0){let t=()=>this();t[ar]=e,e.readonlyFn=t}return e.readonlyFn}function ix(){return this._results[Symbol.iterator]()}var ox=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 ye}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=A1(e);(this._changesDetected=!k1(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]=ix};function xm(e){return(e.flags&128)===128}var Sm=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(Sm||{}),fh=new Map,sx=0;function ax(){return sx++}function lx(e){fh.set(e[To],e)}function Cm(e){return fh.get(e)||null}function yc(e){fh.delete(e[To])}var cx=class{lViewId;nodeIndex;native;component;directives;localRefs;get lView(){return Cm(this.lViewId)}constructor(e,t,n){this.lViewId=e,this.nodeIndex=t,this.native=n}};function ux(e){let t=yl(e);if(t){if(Vn(t)){let n=t,r,i,o;if(Im(e)){if(r=fx(n,e),r==-1)throw new Error("The provided component was not found in the application");i=e}else if(hx(e)){if(r=px(n,e),r==-1)throw new Error("The provided directive was not found in the application");o=gx(r,n)}else if(r=rf(n,e),r==-1)return null;let s=qt(n[r]),a=yl(s),l=a&&!Array.isArray(a)?a:nf(n,r,s);if(i&&l.component===void 0&&(l.component=i,Dn(l.component,l)),o&&l.directives===void 0){l.directives=o;for(let u=0;u<o.length;u++)Dn(o[u],l)}Dn(l.native,l),t=l}}else{let n=e,r=n;for(;r=r.parentNode;){let i=yl(r);if(i){let o=Array.isArray(i)?i:i.lView;if(!o)return null;let s=rf(o,n);if(s>=0){let a=qt(o[s]),l=nf(o,s,a);Dn(a,l),t=l;break}}}}return t||null}function nf(e,t,n){return new cx(e[To],t,n)}var bc="__ngContext__";function Dn(e,t){Vn(t)?(e[bc]=t[To],lx(t)):e[bc]=t}function yl(e){let t=e[bc];return typeof t=="number"?Cm(t):t||null}function Im(e){return e&&e.constructor&&e.constructor.\u0275cmp}function hx(e){return e&&e.constructor&&e.constructor.\u0275dir}function rf(e,t){let n=e[ge];for(let r=ct;r<n.bindingStartIndex;r++)if(qt(e[r])===t)return r;return-1}function dx(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 fx(e,t){let n=e[ge].components;if(n)for(let r=0;r<n.length;r++){let i=n[r];if(tn(i,e)[ht]===t)return i}else if(tn(ct,e)[ht]===t)return ct;return-1}function px(e,t){let n=e[ge].firstChild;for(;n;){let r=n.directiveStart,i=n.directiveEnd;for(let o=r;o<i;o++)if(e[o]===t)return n.index;n=dx(n)}return-1}function gx(e,t){let n=t[ge].data[e];if(n.directiveStart===0)return Hn;let r=[];for(let i=n.directiveStart;i<n.directiveEnd;i++){let o=t[i];Im(o)||r.push(o)}return r}function Tm(e){return Dm(e[co])}function Om(e){return Dm(e[pn])}function Dm(e){for(;e!==null&&!Yn(e);)e=e[pn];return e}var wc;function _x(e){wc=e}function Rm(){if(wc!==void 0)return wc;if(typeof document<"u")return document;throw new Ae(210,!1)}var ph=new Ce("",{providedIn:"root",factory:()=>mx}),mx="ng",Nm=new Ce(""),Ia=new Ce("",{providedIn:"platform",factory:()=>"unknown"}),vx=new Ce(""),Pm=new Ce("",{providedIn:"root",factory:()=>Rm().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null}),yx="h",bx="b",km=!1,wx=new Ce("",{providedIn:"root",factory:()=>km}),gh=function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e}(gh||{}),Po=new Ce(""),of=new Set;function Wr(e){of.has(e)||(of.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var Am=(()=>{class e{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=Ex}return e})();function Ex(){return new Am(xe(),Gt())}var ri=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(ri||{}),Lm=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=_e({token:e,providedIn:"root",factory:()=>new e})}return e})(),xx=[ri.EarlyRead,ri.Write,ri.MixedReadWrite,ri.Read],Sx=(()=>{class e{ngZone=P(Ze);scheduler=P(Ii);errorHandler=P(Ti,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){P(Po,{optional:!0})}execute(){let n=this.sequences.size>0;n&&ze(16),this.executing=!0;for(let r of xx)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[r]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=i.hooks[r];return o(i.pipelinedValue)},i.snapshot))}catch(o){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}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&&ze(17)}register(n){let{view:r}=n;r!==void 0?((r[ci]??=[]).push(n),Do(r),r[ve]|=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(gh.AFTER_NEXT_RENDER,n):n()}static \u0275prov=_e({token:e,providedIn:"root",factory:()=>new e})}return e})(),Cx=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,i,o=null){this.impl=e,this.hooks=t,this.view=n,this.once=r,this.snapshot=o,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?.[ci];e&&(this.view[ci]=e.filter(t=>t!==this))}};function Mm(e,t){!t?.injector&&L_(Mm);let n=t?.injector??P(kt);return Wr("NgAfterRender"),jm(e,n,t,!1)}function ko(e,t){!t?.injector&&L_(ko);let n=t?.injector??P(kt);return Wr("NgAfterNextRender"),jm(e,n,t,!0)}function Ix(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 jm(e,t,n,r){let i=t.get(Lm);i.impl??=t.get(Sx);let o=t.get(Po,null,{optional:!0}),s=n?.phase??ri.MixedReadWrite,a=n?.manualCleanup!==!0?t.get(lh):null,l=t.get(Am,null,{optional:!0}),u=new Cx(i.impl,Ix(e,s),l?.view,r,a,o?.snapshot(null));return i.impl.register(u),u}var Tx=()=>null;function Fm(e,t,n=!1){return Tx(e,t,n)}function Vm(e,t){let n=e.contentQueries;if(n!==null){let r=Oe(null);try{for(let i=0;i<n.length;i+=2){let o=n[i],s=n[i+1];if(s!==-1){let a=e.data[s];nh(o),a.contentQueries(2,t[s],s)}}}finally{Oe(r)}}}function Ec(e,t,n){nh(0);let r=Oe(null);try{t(e,n)}finally{Oe(r)}}function _h(e,t,n){if(Ku(t)){let r=Oe(null);try{let i=t.directiveStart,o=t.directiveEnd;for(let s=i;s<o;s++){let a=e.data[s];if(a.contentQueries){let l=n[s];a.contentQueries(1,l,s)}}}finally{Oe(r)}}}var Fn=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}(Fn||{}),Wo;function Ox(){if(Wo===void 0&&(Wo=null,oo.trustedTypes))try{Wo=oo.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Wo}function Ta(e){return Ox()?.createHTML(e)||e}var Zo;function Dx(){if(Zo===void 0&&(Zo=null,oo.trustedTypes))try{Zo=oo.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Zo}function sf(e){return Dx()?.createHTML(e)||e}var Zr=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${p_})`}},Rx=class extends Zr{getTypeName(){return"HTML"}},Nx=class extends Zr{getTypeName(){return"Style"}},Px=class extends Zr{getTypeName(){return"Script"}},kx=class extends Zr{getTypeName(){return"URL"}},Ax=class extends Zr{getTypeName(){return"ResourceURL"}};function or(e){return e instanceof Zr?e.changingThisBreaksApplicationSecurity:e}function Cr(e,t){let n=Lx(e);if(n!=null&&n!==t){if(n==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${n} (see ${p_})`)}return n===t}function Lx(e){return e instanceof Zr&&e.getTypeName()||null}function Mx(e){return new Rx(e)}function jx(e){return new Nx(e)}function Fx(e){return new Px(e)}function Vx(e){return new kx(e)}function Bx(e){return new Ax(e)}function Ux(e){let t=new $x(e);return zx()?new Hx(t):t}var Hx=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(Ta(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},$x=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=Ta(e),t}};function zx(){try{return!!new window.DOMParser().parseFromString(Ta(""),"text/html")}catch{return!1}}var qx=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function mh(e){return e=String(e),e.match(qx)?e:"unsafe:"+e}function Kn(e){let t={};for(let n of e.split(","))t[n]=!0;return t}function Ao(...e){let t={};for(let n of e)for(let r in n)n.hasOwnProperty(r)&&(t[r]=!0);return t}var Bm=Kn("area,br,col,hr,img,wbr"),Um=Kn("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Hm=Kn("rp,rt"),Gx=Ao(Hm,Um),Wx=Ao(Um,Kn("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")),Zx=Ao(Hm,Kn("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")),af=Ao(Bm,Wx,Zx,Gx),$m=Kn("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Yx=Kn("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"),Kx=Kn("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"),Jx=Ao($m,Yx,Kx),Xx=Kn("script,style,template"),Qx=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=nS(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let i=tS(t);if(i){t=i;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=lf(e).toLowerCase();if(!af.hasOwnProperty(t))return this.sanitizedSomething=!0,!Xx.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),o=i.name,s=o.toLowerCase();if(!Jx.hasOwnProperty(s)){this.sanitizedSomething=!0;continue}let a=i.value;$m[s]&&(a=mh(a)),this.buf.push(" ",o,'="',cf(a),'"')}return this.buf.push(">"),!0}endElement(e){let t=lf(e).toLowerCase();af.hasOwnProperty(t)&&!Bm.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(cf(e))}};function eS(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function tS(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw zm(t);return t}function nS(e){let t=e.firstChild;if(t&&eS(e,t))throw zm(t);return t}function lf(e){let t=e.nodeName;return typeof t=="string"?t:"FORM"}function zm(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var rS=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,iS=/([^\#-~ |!])/g;function cf(e){return e.replace(/&/g,"&amp;").replace(rS,function(t){let n=t.charCodeAt(0),r=t.charCodeAt(1);return"&#"+((n-55296)*1024+(r-56320)+65536)+";"}).replace(iS,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Yo;function qm(e,t){let n=null;try{Yo=Yo||Ux(e);let r=t?String(t):"";n=Yo.getInertBodyElement(r);let i=5,o=r;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=n.innerHTML,n=Yo.getInertBodyElement(r)}while(r!==o);let s=new Qx().sanitizeChildren(uf(n)||n);return Ta(s)}finally{if(n){let r=uf(n)||n;for(;r.firstChild;)r.firstChild.remove()}}}function uf(e){return"content"in e&&oS(e)?e.content:null}function oS(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var jn=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}(jn||{});function Di(e){let t=Gm();return t?sf(t.sanitize(jn.HTML,e)||""):Cr(e,"HTML")?sf(or(e)):qm(Rm(),Co(e))}function on(e){let t=Gm();return t?t.sanitize(jn.URL,e)||"":Cr(e,"URL")?or(e):mh(Co(e))}function Gm(){let e=xe();return e&&e[zn].sanitizer}var sS=/^>|^->|<!--|-->|--!>|<!-$/g,aS=/(<|>)/g,lS="\u200B$1\u200B";function cS(e){return e.replace(sS,t=>t.replace(aS,lS))}function uS(e){return e.ownerDocument.defaultView}function hS(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 o=t.length;if(i+o===r||e.charCodeAt(i+o)<=32)return i}n=i+1}}var Wm="ng-template";function dS(e,t,n,r){let i=0;if(r){for(;i<t.length&&typeof t[i]=="string";i+=2)if(t[i]==="class"&&hS(t[i+1].toLowerCase(),n,0)!==-1)return!0}else if(vh(e))return!1;if(i=t.indexOf(1,i),i>-1){let o;for(;++i<t.length&&typeof(o=t[i])=="string";)if(o.toLowerCase()===n)return!0}return!1}function vh(e){return e.type===4&&e.value!==Wm}function fS(e,t,n){let r=e.type===4&&!n?Wm:e.value;return t===r}function pS(e,t,n){let r=4,i=e.attrs,o=i!==null?mS(i):0,s=!1;for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="number"){if(!s&&!ln(r)&&!ln(l))return!1;if(s&&ln(l))continue;s=!1,r=l|r&1;continue}if(!s)if(r&4){if(r=2|r&1,l!==""&&!fS(e,l,n)||l===""&&t.length===1){if(ln(r))return!1;s=!0}}else if(r&8){if(i===null||!dS(e,i,l,n)){if(ln(r))return!1;s=!0}}else{let u=t[++a],d=gS(l,i,vh(e),n);if(d===-1){if(ln(r))return!1;s=!0;continue}if(u!==""){let h;if(d>o?h="":h=i[d+1].toLowerCase(),r&2&&u!==h){if(ln(r))return!1;s=!0}}}}return ln(r)||s}function ln(e){return(e&1)===0}function gS(e,t,n,r){if(t===null)return-1;let i=0;if(r||!n){let o=!1;for(;i<t.length;){let s=t[i];if(s===e)return i;if(s===3||s===6)o=!0;else if(s===1||s===2){let a=t[++i];for(;typeof a=="string";)a=t[++i];continue}else{if(s===4)break;if(s===0){i+=4;continue}}i+=o?1:2}return-1}else return vS(t,e)}function _S(e,t,n=!1){for(let r=0;r<t.length;r++)if(pS(e,t[r],n))return!0;return!1}function mS(e){for(let t=0;t<e.length;t++){let n=e[t];if(PE(n))return t}return e.length}function vS(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 hf(e,t){return e?":not("+t.trim()+")":t}function yS(e){let t=e[0],n=1,r=2,i="",o=!1;for(;n<e.length;){let s=e[n];if(typeof s=="string")if(r&2){let a=e[++n];i+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else r&8?i+="."+s:r&4&&(i+=" "+s);else i!==""&&!ln(s)&&(t+=hf(o,i),i=""),r=s,o=o||!ln(r);n++}return i!==""&&(t+=hf(o,i)),t}function bS(e){return e.map(yS).join(",")}function wS(e){let t=[],n=[],r=1,i=2;for(;r<e.length;){let o=e[r];if(typeof o=="string")i===2?o!==""&&t.push(o,e[++r]):i===8&&n.push(o);else{if(!ln(i))break;i=o}r++}return n.length&&t.push(1,...n),t}var Jn={};function ES(e,t){return e.createText(t)}function xS(e,t,n){e.setValue(t,n)}function SS(e,t){return e.createComment(cS(t))}function Zm(e,t,n){return e.createElement(t,n)}function $s(e,t,n,r,i){e.insertBefore(t,n,r,i)}function Ym(e,t,n){e.appendChild(t,n)}function df(e,t,n,r,i){r!==null?$s(e,t,n,r,i):Ym(e,t,n)}function CS(e,t,n){e.removeChild(null,t,n)}function IS(e,t,n){e.setAttribute(t,"style",n)}function TS(e,t,n){n===""?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n)}function Km(e,t,n){let{mergedAttrs:r,classes:i,styles:o}=n;r!==null&&NE(e,t,r),i!==null&&TS(e,t,i),o!==null&&IS(e,t,o)}function yh(e,t,n,r,i,o,s,a,l,u,d){let h=ct+r,v=h+i,m=OS(h,v),w=typeof u=="function"?u():u;return m[ge]={type:e,blueprint:m,template:n,queries:null,viewQuery:a,declTNode:t,data:m.slice().fill(null,h),bindingStartIndex:h,expandoStartIndex:v,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 o=="function"?o():o,pipeRegistry:typeof s=="function"?s():s,firstChild:null,schemas:l,consts:w,incompleteFirstPass:!1,ssrId:d}}function OS(e,t){let n=[];for(let r=0;r<t;r++)n.push(r<e?null:Jn);return n}function DS(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=yh(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function bh(e,t,n,r,i,o,s,a,l,u,d){let h=t.blueprint.slice();return h[Zn]=i,h[ve]=r|4|128|8|64|1024,(u!==null||e&&e[ve]&2048)&&(h[ve]|=2048),q_(h),h[Rt]=h[Si]=e,h[ht]=n,h[zn]=s||e&&e[zn],h[wt]=a||e&&e[wt],h[lo]=l||e&&e[lo]||null,h[En]=o,h[To]=ax(),h[ao]=d,h[M_]=u,h[vn]=t.type==2?e[vn]:h,h}function RS(e,t,n){let r=An(t,e),i=DS(n),o=e[zn].rendererFactory,s=wh(e,bh(e,i,null,Jm(n),r,t,null,o.createRenderer(r,n),null,null,null));return e[t.index]=s}function Jm(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function Xm(e,t,n,r){if(n===0)return-1;let i=t.length;for(let o=0;o<n;o++)t.push(r),e.blueprint.push(r),e.data.push(null);return i}function wh(e,t){return e[co]?e[Gd][pn]=t:e[co]=t,e[Gd]=t,t}function Z(e=1){Qm(_t(),xe(),mr()+e,!1)}function Qm(e,t,n,r){if(!r)if((t[ve]&3)===3){let i=e.preOrderCheckHooks;i!==null&&ps(t,i,n)}else{let i=e.preOrderHooks;i!==null&&gs(t,i,0,n)}Vr(n)}var Oa=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(Oa||{});function xc(e,t,n,r){let i=Oe(null);try{let[o,s,a]=e.inputs[n],l=null;(s&Oa.SignalBased)!==0&&(l=t[o][ar]),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,o):F_(t,l,o,r)}finally{Oe(i)}}function ev(e,t,n,r,i){let o=mr(),s=r&2;try{Vr(-1),s&&t.length>ct&&Qm(e,t,ct,!1),ze(s?2:0,i),n(r,i)}finally{Vr(o),ze(s?3:1,i)}}function Da(e,t,n){MS(e,t,n),(n.flags&64)===64&&jS(e,t,n)}function Eh(e,t,n=An){let r=t.localNames;if(r!==null){let i=t.index+1;for(let o=0;o<r.length;o+=2){let s=r[o+1],a=s===-1?n(t,e):e[s];e[i++]=a}}}function NS(e,t,n,r){let i=r.get(wx,km)||n===Fn.ShadowDom,o=e.selectRootElement(t,i);return PS(o),o}function PS(e){kS(e)}var kS=()=>null;function AS(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function tv(e,t,n,r,i,o,s,a){if(!a&&Sh(t,e,n,r,i)){Ci(t)&&LS(n,t.index);return}if(t.type&3){let l=An(t,n);r=AS(r),i=s!=null?s(i,t.value||"",r):i,o.setProperty(l,r,i)}else t.type&12}function LS(e,t){let n=tn(t,e);n[ve]&16||(n[ve]|=64)}function MS(e,t,n){let r=n.directiveStart,i=n.directiveEnd;Ci(n)&&RS(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||Bs(n,t);let o=n.initialInputs;for(let s=r;s<i;s++){let a=e.data[s],l=uo(t,e,s,n);if(Dn(l,t),o!==null&&US(t,s-r,l,a,n,o),Rn(a)){let u=tn(n.index,t);u[ht]=uo(t,e,s,n)}}}function jS(e,t,n){let r=n.directiveStart,i=n.directiveEnd,o=n.index,s=bE();try{Vr(o);for(let a=r;a<i;a++){let l=e.data[a],u=t[a];fc(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&FS(l,u)}}finally{Vr(-1),fc(s)}}function FS(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function xh(e,t){let n=e.directiveRegistry,r=null;if(n)for(let i=0;i<n.length;i++){let o=n[i];_S(t,o.selectors,!1)&&(r??=[],Rn(o)?r.unshift(o):r.push(o))}return r}function VS(e,t,n,r,i,o){let s=An(e,t);BS(t[wt],s,o,e.value,n,r,i)}function BS(e,t,n,r,i,o,s){if(o==null)e.removeAttribute(t,i,n);else{let a=s==null?Co(o):s(o,r||"",i);e.setAttribute(t,i,a,n)}}function US(e,t,n,r,i,o){let s=o[t];if(s!==null)for(let a=0;a<s.length;a+=2){let l=s[a],u=s[a+1];xc(r,n,l,u)}}function nv(e,t){let n=e[lo],r=n?n.get(Ti,null):null;r&&r.handleError(t)}function Sh(e,t,n,r,i){let o=e.inputs?.[r],s=e.hostDirectiveInputs?.[r],a=!1;if(s)for(let l=0;l<s.length;l+=2){let u=s[l],d=s[l+1],h=t.data[u];xc(h,n[u],d,i),a=!0}if(o)for(let l of o){let u=n[l],d=t.data[l];xc(d,u,r,i),a=!0}return a}function HS(e,t){let n=tn(t,e),r=n[ge];$S(r,n);let i=n[Zn];i!==null&&n[ao]===null&&(n[ao]=Fm(i,n[lo])),ze(18),Ch(r,n,n[ht]),ze(19,n[ht])}function $S(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}function Ch(e,t,n){rh(t);try{let r=e.viewQuery;r!==null&&Ec(1,r,n);let i=e.template;i!==null&&ev(e,t,i,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),t[qn]?.finishViewCreation(e),e.staticContentQueries&&Vm(e,t),e.staticViewQueries&&Ec(2,e.viewQuery,n);let o=e.components;o!==null&&zS(t,o)}catch(r){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),r}finally{t[ve]&=-5,ih()}}function zS(e,t){for(let n=0;n<t.length;n++)HS(e,t[n])}function Ra(e,t,n,r){let i=Oe(null);try{let o=t.tView,s=e[ve]&4096?4096:16,a=bh(e,o,n,s,null,t,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null),l=e[t.index];a[Mr]=l;let u=e[qn];return u!==null&&(a[qn]=u.createEmbeddedView(o)),Ch(o,a,n),a}finally{Oe(i)}}function ho(e,t){return!t||t.firstChild===null||xm(e)}var qS;function Ih(e,t){return qS(e,t)}var Or=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Or||{});function rv(e){return(e.flags&32)===32}function ii(e,t,n,r,i){if(r!=null){let o,s=!1;Yn(r)?o=r:Vn(r)&&(s=!0,r=r[Zn]);let a=qt(r);e===0&&n!==null?i==null?Ym(t,n,a):$s(t,n,a,i||null,!0):e===1&&n!==null?$s(t,n,a,i||null,!0):e===2?CS(t,a,s):e===3&&t.destroyNode(a),o!=null&&rC(t,e,o,n,i)}}function GS(e,t){iv(e,t),t[Zn]=null,t[En]=null}function WS(e,t,n,r,i,o){r[Zn]=i,r[En]=t,ka(e,r,n,1,i,o)}function iv(e,t){t[zn].changeDetectionScheduler?.notify(9),ka(e,t,t[wt],2,null,null)}function ZS(e){let t=e[co];if(!t)return bl(e[ge],e);for(;t;){let n=null;if(Vn(t))n=t[co];else{let r=t[Dt];r&&(n=r)}if(!n){for(;t&&!t[pn]&&t!==e;)Vn(t)&&bl(t[ge],t),t=t[Rt];t===null&&(t=e),Vn(t)&&bl(t[ge],t),n=t&&t[pn]}t=n}}function Th(e,t){let n=e[_i],r=n.indexOf(t);n.splice(r,1)}function Na(e,t){if(Oo(t))return;let n=t[wt];n.destroyNode&&ka(e,t,n,3,null,null),ZS(t)}function bl(e,t){if(Oo(t))return;let n=Oe(null);try{t[ve]&=-129,t[ve]|=256,t[$t]&&Lg(t[$t]),KS(e,t),YS(e,t),t[ge].type===1&&t[wt].destroy();let r=t[Mr];if(r!==null&&Yn(t[Rt])){r!==t[Rt]&&Th(r,t);let i=t[qn];i!==null&&i.detachView(e)}yc(t)}finally{Oe(n)}}function YS(e,t){let n=e.cleanup,r=t[Ps];if(n!==null)for(let s=0;s<n.length-1;s+=2)if(typeof n[s]=="string"){let a=n[s+3];a>=0?r[a]():r[-a].unsubscribe(),s+=2}else{let a=r[n[s+1]];n[s].call(a)}r!==null&&(t[Ps]=null);let i=t[cr];if(i!==null){t[cr]=null;for(let s=0;s<i.length;s++){let a=i[s];a()}}let o=t[ks];if(o!==null){t[ks]=null;for(let s of o)s.destroy()}}function KS(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 No)){let o=n[r+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=i[o[s]],l=o[s+1];ze(4,a,l);try{l.call(a)}finally{ze(5,a,l)}}else{ze(4,i,o);try{o.call(i)}finally{ze(5,i,o)}}}}}function JS(e,t,n){return XS(e,t.parent,n)}function XS(e,t,n){let r=t;for(;r!==null&&r.type&168;)t=r,r=t.parent;if(r===null)return n[Zn];if(Ci(r)){let{encapsulation:i}=e.data[r.directiveStart+r.componentOffset];if(i===Fn.None||i===Fn.Emulated)return null}return An(r,n)}function QS(e,t,n){return tC(e,t,n)}function eC(e,t,n){return e.type&40?An(e,n):null}var tC=eC,ff;function Pa(e,t,n,r){let i=JS(e,r,t),o=t[wt],s=r.parent||t[En],a=QS(s,r,t);if(i!=null)if(Array.isArray(n))for(let l=0;l<n.length;l++)df(o,i,n[l],a,!1);else df(o,i,n,a,!1);ff!==void 0&&ff(o,r,t,n,i)}function Gi(e,t){if(t!==null){let n=t.type;if(n&3)return An(t,e);if(n&4)return Sc(-1,e[t.index]);if(n&8){let r=t.child;if(r!==null)return Gi(e,r);{let i=e[t.index];return Yn(i)?Sc(-1,i):qt(i)}}else{if(n&128)return Gi(e,t.next);if(n&32)return Ih(t,e)()||qt(e[t.index]);{let r=ov(e,t);if(r!==null){if(Array.isArray(r))return r[0];let i=Fr(e[vn]);return Gi(i,r)}else return Gi(e,t.next)}}}return null}function ov(e,t){if(t!==null){let n=e[vn][En],r=t.projection;return n.projection[r]}return null}function Sc(e,t){let n=Dt+e+1;if(n<t.length){let r=t[n],i=r[ge].firstChild;if(i!==null)return Gi(r,i)}return t[jr]}function Oh(e,t,n,r,i,o,s){for(;n!=null;){if(n.type===128){n=n.next;continue}let a=r[n.index],l=n.type;if(s&&t===0&&(a&&Dn(qt(a),r),n.flags|=2),!rv(n))if(l&8)Oh(e,t,n.child,r,i,o,!1),ii(t,e,i,a,o);else if(l&32){let u=Ih(n,r),d;for(;d=u();)ii(t,e,i,d,o);ii(t,e,i,a,o)}else l&16?nC(e,t,r,n,i,o):ii(t,e,i,a,o);n=s?n.projectionNext:n.next}}function ka(e,t,n,r,i,o){Oh(n,r,e.firstChild,t,i,o,!1)}function nC(e,t,n,r,i,o){let s=n[vn],a=s[En].projection[r.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++){let u=a[l];ii(t,e,i,u,o)}else{let l=a,u=s[Rt];xm(r)&&(l.flags|=128),Oh(e,t,l,u,i,o,!0)}}function rC(e,t,n,r,i){let o=n[jr],s=qt(n);o!==s&&ii(t,e,r,o,i);for(let a=Dt;a<n.length;a++){let l=n[a];ka(l[ge],l,e,t,r,o)}}function iC(e,t,n,r,i){if(t)i?e.addClass(n,r):e.removeClass(n,r);else{let o=r.indexOf("-")===-1?void 0:Or.DashCase;i==null?e.removeStyle(n,r,o):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),o|=Or.Important),e.setStyle(n,r,i,o))}}function zs(e,t,n,r,i=!1){for(;n!==null;){if(n.type===128){n=i?n.projectionNext:n.next;continue}let o=t[n.index];o!==null&&r.push(qt(o)),Yn(o)&&oC(o,r);let s=n.type;if(s&8)zs(e,t,n.child,r);else if(s&32){let a=Ih(n,t),l;for(;l=a();)r.push(l)}else if(s&16){let a=ov(t,n);if(Array.isArray(a))r.push(...a);else{let l=Fr(t[vn]);zs(l[ge],l,a,r,!0)}}n=i?n.projectionNext:n.next}return r}function oC(e,t){for(let n=Dt;n<e.length;n++){let r=e[n],i=r[ge].firstChild;i!==null&&zs(r[ge],r,i,t)}e[jr]!==e[Zn]&&t.push(e[jr])}function sv(e){if(e[ci]!==null){for(let t of e[ci])t.impl.addSequence(t);e[ci].length=0}}var av=[];function sC(e){return e[$t]??aC(e)}function aC(e){let t=av.pop()??Object.create(cC);return t.lView=e,t}function lC(e){e.lView[$t]!==e&&(e.lView=null,av.push(e))}var cC=Ye(F({},Pu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{Do(e.lView)},consumerOnSignalRead(){this.lView[$t]=this}});function uC(e){let t=e[$t]??Object.create(hC);return t.lView=e,t}var hC=Ye(F({},Pu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=Fr(e.lView);for(;t&&!lv(t[ge]);)t=Fr(t);t&&Qu(t)},consumerOnSignalRead(){this.lView[$t]=this}});function lv(e){return e.type!==2}function cv(e){if(e[ks]===null)return;let t=!0;for(;t;){let n=!1;for(let r of e[ks])r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));t=n&&!!(e[ve]&8192)}}var dC=100;function uv(e,t=!0,n=0){let r=e[zn].rendererFactory,i=!1;i||r.begin?.();try{fC(e,n)}catch(o){throw t&&nv(e,o),o}finally{i||r.end?.()}}function fC(e,t){let n=X_();try{Wd(!0),Cc(e,t);let r=0;for(;wa(e);){if(r===dC)throw new Ae(103,!1);r++,Cc(e,1)}}finally{Wd(n)}}function pC(e,t,n,r){if(Oo(t))return;let i=t[ve],o=!1,s=!1;rh(t);let a=!0,l=null,u=null;o||(lv(e)?(u=sC(t),l=kd(u)):Xb()===null?(a=!1,u=uC(t),l=kd(u)):t[$t]&&(Lg(t[$t]),t[$t]=null));try{q_(t),_E(e.bindingStartIndex),n!==null&&ev(e,t,n,2,r);let d=(i&3)===3;if(!o)if(d){let m=e.preOrderCheckHooks;m!==null&&ps(t,m,null)}else{let m=e.preOrderHooks;m!==null&&gs(t,m,0,null),_l(t,0)}if(s||gC(t),cv(t),hv(t,0),e.contentQueries!==null&&Vm(e,t),!o)if(d){let m=e.contentCheckHooks;m!==null&&ps(t,m)}else{let m=e.contentHooks;m!==null&&gs(t,m,1),_l(t,1)}mC(e,t);let h=e.components;h!==null&&fv(t,h,0);let v=e.viewQuery;if(v!==null&&Ec(2,v,r),!o)if(d){let m=e.viewCheckHooks;m!==null&&ps(t,m)}else{let m=e.viewHooks;m!==null&&gs(t,m,2),_l(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[gl]){for(let m of t[gl])m();t[gl]=null}o||(sv(t),t[ve]&=-73)}catch(d){throw o||Do(t),d}finally{u!==null&&(rw(u,l),a&&lC(u)),ih()}}function hv(e,t){for(let n=Tm(e);n!==null;n=Om(n))for(let r=Dt;r<n.length;r++){let i=n[r];dv(i,t)}}function gC(e){for(let t=Tm(e);t!==null;t=Om(t)){if(!(t[ve]&2))continue;let n=t[_i];for(let r=0;r<n.length;r++){let i=n[r];Qu(i)}}}function _C(e,t,n){ze(18);let r=tn(t,e);dv(r,n),ze(19,r[ht])}function dv(e,t){Xu(e)&&Cc(e,t)}function Cc(e,t){let n=e[ge],r=e[ve],i=e[$t],o=!!(t===0&&r&16);if(o||=!!(r&64&&t===0),o||=!!(r&1024),o||=!!(i?.dirty&&Ag(i)),o||=!1,i&&(i.dirty=!1),e[ve]&=-9217,o)pC(n,e,n.template,e[ht]);else if(r&8192){cv(e),hv(e,1);let s=n.components;s!==null&&fv(e,s,1),sv(e)}}function fv(e,t,n){for(let r=0;r<t.length;r++)_C(e,t[r],n)}function mC(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)Vr(~i);else{let o=i,s=n[++r],a=n[++r];yE(s,o);let l=t[o];ze(24,l),a(2,l),ze(25,l)}}}finally{Vr(-1)}}function Dh(e,t){let n=X_()?64:1088;for(e[zn].changeDetectionScheduler?.notify(t);e;){e[ve]|=n;let r=Fr(e);if(Ls(e)&&!r)return e;e=r}return null}function pv(e,t,n,r){return[e,!0,0,t,null,r,null,n,null,null]}function gv(e,t){let n=Dt+t;if(n<e.length)return e[n]}function Aa(e,t,n,r=!0){let i=t[ge];if(vC(i,t,e,n),r){let s=Sc(n,e),a=t[wt],l=a.parentNode(e[jr]);l!==null&&WS(i,e[En],a,t,l,s)}let o=t[ao];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function _v(e,t){let n=fo(e,t);return n!==void 0&&Na(n[ge],n),n}function fo(e,t){if(e.length<=Dt)return;let n=Dt+t,r=e[n];if(r){let i=r[Mr];i!==null&&i!==e&&Th(i,r),t>0&&(e[n-1][pn]=r[pn]);let o=Rs(e,Dt+t);GS(r[ge],r);let s=o[qn];s!==null&&s.detachView(o[ge]),r[Rt]=null,r[pn]=null,r[ve]&=-129}return r}function vC(e,t,n,r){let i=Dt+r,o=n.length;r>0&&(n[i-1][pn]=t),r<o-Dt?(t[pn]=n[i],x_(n,Dt+r,t)):(n.push(t),t[pn]=null),t[Rt]=n;let s=t[Mr];s!==null&&n!==s&&mv(s,t);let a=t[qn];a!==null&&a.insertView(e),hc(t),t[ve]|=128}function mv(e,t){let n=e[_i],r=t[Rt];if(Vn(r))e[ve]|=2;else{let i=r[Rt][vn];t[vn]!==i&&(e[ve]|=2)}n===null?e[_i]=[t]:n.push(t)}var po=class{_lView;_cdRefInjectingView;notifyErrorHandler;_appRef=null;_attachedToViewContainer=!1;get rootNodes(){let e=this._lView,t=e[ge];return zs(t,e,t.firstChild,[])}constructor(e,t,n=!0){this._lView=e,this._cdRefInjectingView=t,this.notifyErrorHandler=n}get context(){return this._lView[ht]}get dirty(){return!!(this._lView[ve]&9280)||!!this._lView[$t]?.dirty}set context(e){this._lView[ht]=e}get destroyed(){return Oo(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Rt];if(Yn(e)){let t=e[As],n=t?t.indexOf(this):-1;n>-1&&(fo(e,n),Rs(t,n))}this._attachedToViewContainer=!1}Na(this._lView[ge],this._lView)}onDestroy(e){G_(this._lView,e)}markForCheck(){Dh(this._cdRefInjectingView||this._lView,4)}markForRefresh(){Qu(this._cdRefInjectingView||this._lView)}detach(){this._lView[ve]&=-129}reattach(){hc(this._lView),this._lView[ve]|=128}detectChanges(){this._lView[ve]|=1024,uv(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Ae(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=Ls(this._lView),t=this._lView[Mr];t!==null&&!e&&Th(t,this._lView),iv(this._lView[ge],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Ae(902,!1);this._appRef=e;let t=Ls(this._lView),n=this._lView[Mr];n!==null&&!t&&mv(n,this._lView),hc(this._lView)}},go=(()=>{class e{static __NG_ELEMENT_ID__=wC}return e})(),yC=go,bC=class extends yC{_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=Ra(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n});return new po(r)}};function wC(){return La(Gt(),xe())}function La(e,t){return e.type&4?new bC(t,e,Oi(e,t)):null}function Lo(e,t,n,r,i){let o=e.data[t];if(o===null)o=EC(e,t,n,r,i),vE()&&(o.flags|=32);else if(o.type&64){o.type=n,o.value=r,o.attrs=i;let s=gE();o.injectorIndex=s===null?-1:s.injectorIndex}return _r(o,!0),o}function EC(e,t,n,r,i){let o=Y_(),s=th(),a=s?o:o&&o.parent,l=e.data[t]=SC(e,a,n,t,r,i);return xC(e,l,o,s),l}function xC(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 SC(e,t,n,r,i,o){let s=t?t.injectorIndex:-1,a=0;return dE()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:o,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 wM=new RegExp(`^(\\d+)*(${bx}|${yx})*(.*)`),CC=()=>null;function _o(e,t){return CC(e,t)}var IC=class{},vv=class{},TC=class{resolveComponentFactory(e){throw Error(`No component factory found for ${fn(e)}.`)}},Mo=class{static NULL=new TC},xn=class{},yv=(()=>{class e{destroyNode=null;static __NG_ELEMENT_ID__=()=>OC()}return e})();function OC(){let e=xe(),t=Gt(),n=tn(t.index,e);return(Vn(n)?n:e)[wt]}var DC=(()=>{class e{static \u0275prov=_e({token:e,providedIn:"root",factory:()=>null})}return e})();function Ic(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,o=0;if(t!==null)for(let s=0;s<t.length;s++){let a=t[s];if(typeof a=="number")o=a;else if(o==1)i=Bd(i,a);else if(o==2){let l=a,u=t[++s];r=Bd(r,l+": "+u+";")}}n?e.styles=r:e.stylesWithoutHost=r,n?e.classes=i:e.classesWithoutHost=i}function Ot(e,t=De.Default){let n=xe();if(n===null)return Fe(e,t);let r=Gt();return fm(r,n,Pt(e),t)}function Rh(e,t,n,r,i){let o=r===null?null:{"":-1},s=i(e,n);if(s!==null){let a,l=null,u=null,d=NC(s);d===null?a=s:[a,l,u]=d,AC(e,t,n,a,o,l,u)}o!==null&&r!==null&&RC(n,r,o)}function RC(e,t,n){let r=e.localNames=[];for(let i=0;i<t.length;i+=2){let o=n[t[i+1]];if(o==null)throw new Ae(-301,!1);r.push(t[i],o)}}function NC(e){let t=null,n=!1;for(let s=0;s<e.length;s++){let a=e[s];if(s===0&&Rn(a)&&(t=a),a.findHostDirectiveDefs!==null){n=!0;break}}if(!n)return null;let r=null,i=null,o=null;for(let s of e)s.findHostDirectiveDefs!==null&&(r??=[],i??=new Map,o??=new Map,PC(s,r,o,i)),s===t&&(r??=[],r.push(s));return r!==null?(r.push(...t===null?e:e.slice(1)),[r,i,o]):null}function PC(e,t,n,r){let i=t.length;e.findHostDirectiveDefs(e,t,r),n.set(e,[i,t.length-1])}function kC(e,t,n){t.componentOffset=n,(e.components??=[]).push(t.index)}function AC(e,t,n,r,i,o,s){let a=r.length,l=!1;for(let v=0;v<a;v++){let m=r[v];!l&&Rn(m)&&(l=!0,kC(e,n,v)),gc(Bs(n,t),e,m.type)}BC(n,e.data.length,a);for(let v=0;v<a;v++){let m=r[v];m.providersResolver&&m.providersResolver(m)}let u=!1,d=!1,h=Xm(e,t,a,null);a>0&&(n.directiveToIndex=new Map);for(let v=0;v<a;v++){let m=r[v];if(n.mergedAttrs=mi(n.mergedAttrs,m.hostAttrs),MC(e,n,t,h,m),VC(h,m,i),s!==null&&s.has(m)){let[C,A]=s.get(m);n.directiveToIndex.set(m.type,[h,C+n.directiveStart,A+n.directiveStart])}else(o===null||!o.has(m))&&n.directiveToIndex.set(m.type,h);m.contentQueries!==null&&(n.flags|=4),(m.hostBindings!==null||m.hostAttrs!==null||m.hostVars!==0)&&(n.flags|=64);let w=m.type.prototype;!u&&(w.ngOnChanges||w.ngOnInit||w.ngDoCheck)&&((e.preOrderHooks??=[]).push(n.index),u=!0),!d&&(w.ngOnChanges||w.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(n.index),d=!0),h++}LC(e,n,o)}function LC(e,t,n){for(let r=t.directiveStart;r<t.directiveEnd;r++){let i=e.data[r];if(n===null||!n.has(i))pf(0,t,i,r),pf(1,t,i,r),_f(t,r,!1);else{let o=n.get(i);gf(0,t,o,r),gf(1,t,o,r),_f(t,r,!0)}}}function pf(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let o in i)if(i.hasOwnProperty(o)){let s;e===0?s=t.inputs??={}:s=t.outputs??={},s[o]??=[],s[o].push(r),bv(t,o)}}function gf(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let o in i)if(i.hasOwnProperty(o)){let s=i[o],a;e===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[s]??=[],a[s].push(r,o),bv(t,s)}}function bv(e,t){t==="class"?e.flags|=8:t==="style"&&(e.flags|=16)}function _f(e,t,n){let{attrs:r,inputs:i,hostDirectiveInputs:o}=e;if(r===null||!n&&i===null||n&&o===null||vh(e)){e.initialInputs??=[],e.initialInputs.push(null);return}let s=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 u=i[l];for(let d of u)if(d===t){s??=[],s.push(l,r[a+1]);break}}else if(n&&o.hasOwnProperty(l)){let u=o[l];for(let d=0;d<u.length;d+=2)if(u[d]===t){s??=[],s.push(u[d+1],r[a+1]);break}}a+=2}e.initialInputs??=[],e.initialInputs.push(s)}function MC(e,t,n,r,i){e.data[r]=i;let o=i.factory||(i.factory=kr(i.type,!0)),s=new No(o,Rn(i),Ot);e.blueprint[r]=s,n[r]=s,jC(e,t,r,Xm(e,n,i.hostVars,Jn),i)}function jC(e,t,n,r,i){let o=i.hostBindings;if(o){let s=e.hostBindingOpCodes;s===null&&(s=e.hostBindingOpCodes=[]);let a=~t.index;FC(s)!=a&&s.push(a),s.push(n,r,o)}}function FC(e){let t=e.length;for(;t>0;){let n=e[--t];if(typeof n=="number"&&n<0)return n}return 0}function VC(e,t,n){if(n){if(t.exportAs)for(let r=0;r<t.exportAs.length;r++)n[t.exportAs[r]]=e;Rn(t)&&(n[""]=e)}}function BC(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function wv(e,t,n,r,i,o,s,a){let l=t.consts,u=dr(l,s),d=Lo(t,e,2,r,u);return o&&Rh(t,n,d,dr(l,a),i),d.mergedAttrs=mi(d.mergedAttrs,d.attrs),d.attrs!==null&&Ic(d,d.attrs,!1),d.mergedAttrs!==null&&Ic(d,d.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,d),d}function Ev(e,t){sh(e,t),Ku(t)&&e.queries.elementEnd(t)}var UC=class extends Mo{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=Lr(e);return new Nh(t,this.ngModule)}};function HC(e){return Object.keys(e).map(t=>{let[n,r,i]=e[t],o={propName:n,templateName:t,isSignal:(r&Oa.SignalBased)!==0};return i&&(o.transform=i),o})}function $C(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function zC(e,t,n){let r=t instanceof $n?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new AE(n,r):n}function qC(e){let t=e.get(xn,null);if(t===null)throw new Ae(407,!1);let n=e.get(DC,null),r=e.get(Ii,null);return{rendererFactory:t,sanitizer:n,changeDetectionScheduler:r}}function GC(e,t){let n=(e.selectors[0][0]||"div").toLowerCase();return Zm(t,n,n==="svg"?$_:n==="math"?rE:null)}var Nh=class extends vv{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;get inputs(){return HC(this.componentDef.inputs)}get outputs(){return $C(this.componentDef.outputs)}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=bS(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r){ze(22);let i=Oe(null);try{let o=this.componentDef,s=n?["ng-version","19.2.0"]:wS(this.componentDef.selectors[0]),a=yh(0,null,null,1,0,null,null,null,null,[s],null),l=zC(o,r||this.ngModule,e),u=qC(l),d=u.rendererFactory.createRenderer(null,o),h=n?NS(d,n,o.encapsulation,l):GC(o,d),v=bh(null,a,null,512|Jm(o),null,null,u,d,l,null,Fm(h,l,!0));v[ct]=h,rh(v);let m=null;try{let w=wv(ct,a,v,"#host",()=>[this.componentDef],!0,0);h&&(Km(d,h,w),Dn(h,v)),Da(a,v,w),_h(a,w,v),Ev(a,w),t!==void 0&&ZC(w,this.ngContentSelectors,t),m=tn(w.index,v),v[ht]=m[ht],Ch(a,v,null)}catch(w){throw m!==null&&yc(m),yc(v),w}finally{ze(23),ih()}return new WC(this.componentType,v)}finally{Oe(i)}}},WC=class extends IC{_rootLView;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t){super(),this._rootLView=t,this._tNode=Ju(t[ge],ct),this.location=Oi(this._tNode,t),this.instance=tn(this._tNode.index,t)[ht],this.hostView=this.changeDetectorRef=new po(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=Sh(n,r[ge],r,e,t);this.previousInputValues.set(e,t);let o=tn(n.index,r);Dh(o,1)}get injector(){return new Ji(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function ZC(e,t,n){let r=e.projection=[];for(let i=0;i<t.length;i++){let o=n[i];r.push(o!=null&&o.length?Array.from(o):null)}}var Ri=(()=>{class e{static __NG_ELEMENT_ID__=YC}return e})();function YC(){let e=Gt();return Sv(e,xe())}var KC=Ri,xv=class extends KC{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Oi(this._hostTNode,this._hostLView)}get injector(){return new Ji(this._hostTNode,this._hostLView)}get parentInjector(){let e=ah(this._hostTNode,this._hostLView);if(am(e)){let t=Fs(e,this._hostLView),n=js(e),r=t[ge].data[n+8];return new Ji(r,t)}else return new Ji(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=mf(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-Dt}createEmbeddedView(e,t,n){let r,i;typeof n=="number"?r=n:n!=null&&(r=n.index,i=n.injector);let o=_o(this._lContainer,e.ssrId),s=e.createEmbeddedViewImpl(t||{},i,o);return this.insertImpl(s,r,ho(this._hostTNode,o)),s}createComponent(e,t,n,r,i){let o=e&&!J1(e),s;if(o)s=t;else{let m=t||{};s=m.index,n=m.injector,r=m.projectableNodes,i=m.environmentInjector||m.ngModuleRef}let a=o?e:new Nh(Lr(e)),l=n||this.parentInjector;if(!i&&a.ngModule==null){let m=(o?l:this.parentInjector).get($n,null);m&&(i=m)}let u=Lr(a.componentType??{}),d=_o(this._lContainer,u?.id??null),h=d?.firstChild??null,v=a.create(l,r,h,i);return this.insertImpl(v.hostView,s,ho(this._hostTNode,d)),v}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,n){let r=e._lView;if(oE(r)){let s=this.indexOf(e);if(s!==-1)this.detach(s);else{let a=r[Rt],l=new xv(a,a[En],a[Rt]);l.detach(l.indexOf(e))}}let i=this._adjustIndex(t),o=this._lContainer;return Aa(o,r,i,n),e.attachToViewContainerRef(),x_(wl(o),i,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=mf(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=fo(this._lContainer,t);n&&(Rs(wl(this._lContainer),t),Na(n[ge],n))}detach(e){let t=this._adjustIndex(e,-1),n=fo(this._lContainer,t);return n&&Rs(wl(this._lContainer),t)!=null?new po(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function mf(e){return e[As]}function wl(e){return e[As]||(e[As]=[])}function Sv(e,t){let n,r=t[e.index];return Yn(r)?n=r:(n=pv(r,t,null,e),t[e.index]=n,wh(t,n)),XC(n,t,e,r),new xv(n,e,t)}function JC(e,t){let n=e[wt],r=n.createComment(""),i=An(t,e),o=n.parentNode(i);return $s(n,o,r,n.nextSibling(i),!1),r}var XC=tI,QC=()=>!1;function eI(e,t,n){return QC(e,t,n)}function tI(e,t,n,r){if(e[jr])return;let i;n.type&8?i=qt(r):i=JC(t,n),e[jr]=i}var nI=class Cv{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new Cv(this.queryList)}setDirty(){this.queryList.setDirty()}},rI=class Iv{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 o=0;o<r;o++){let s=n.getByIndex(o),a=this.queries[s.indexInDeclarationView];i.push(a.clone())}return new Iv(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++)Ph(t,n).matches!==null&&this.queries[n].setDirty()}},iI=class{flags;read;predicate;constructor(e,t,n=null){this.flags=t,this.read=n,typeof e=="string"?this.predicate=pI(e):this.predicate=e}},oI=class Tv{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,o=this.getByIndex(r).embeddedTView(t,i);o&&(o.indexInDeclarationView=r,n!==null?n.push(o):n=[o])}return n!==null?new Tv(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)}},sI=class Ov{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 Ov(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 o=r[i];this.matchTNodeWithReadOption(t,n,aI(n,o)),this.matchTNodeWithReadOption(t,n,_s(n,t,o,!1,!1))}else r===go?n.type&4&&this.matchTNodeWithReadOption(t,n,-1):this.matchTNodeWithReadOption(t,n,_s(n,t,r,!1,!1))}matchTNodeWithReadOption(t,n,r){if(r!==null){let i=this.metadata.read;if(i!==null)if(i===Vt||i===Ri||i===go&&n.type&4)this.addMatch(n.index,-2);else{let o=_s(n,t,i,!1,!1);o!==null&&this.addMatch(n.index,o)}else this.addMatch(n.index,r)}}addMatch(t,n){this.matches===null?this.matches=[t,n]:this.matches.push(t,n)}};function aI(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 lI(e,t){return e.type&11?Oi(e,t):e.type&4?La(e,t):null}function cI(e,t,n,r){return n===-1?lI(t,e):n===-2?uI(e,t,r):uo(e,e[ge],n,t)}function uI(e,t,n){if(n===Vt)return Oi(t,e);if(n===go)return La(t,e);if(n===Ri)return Sv(t,e)}function Dv(e,t,n,r){let i=t[qn].queries[r];if(i.matches===null){let o=e.data,s=n.matches,a=[];for(let l=0;s!==null&&l<s.length;l+=2){let u=s[l];if(u<0)a.push(null);else{let d=o[u];a.push(cI(t,d,s[l+1],n.metadata.read))}}i.matches=a}return i.matches}function Tc(e,t,n,r){let i=e.queries.getByIndex(n),o=i.matches;if(o!==null){let s=Dv(e,t,i,n);for(let a=0;a<o.length;a+=2){let l=o[a];if(l>0)r.push(s[a/2]);else{let u=o[a+1],d=t[-l];for(let h=Dt;h<d.length;h++){let v=d[h];v[Mr]===v[Rt]&&Tc(v[ge],v,u,r)}if(d[_i]!==null){let h=d[_i];for(let v=0;v<h.length;v++){let m=h[v];Tc(m[ge],m,u,r)}}}}}return r}function hI(e,t){return e[qn].queries[t].queryList}function dI(e,t,n){let r=new ox((n&4)===4);return lE(e,t,r,r.destroy),(t[qn]??=new rI).queries.push(new nI(r))-1}function fI(e,t,n){let r=_t();return r.firstCreatePass&&(gI(r,new iI(e,t,n),-1),(t&2)===2&&(r.staticViewQueries=!0)),dI(r,xe(),t)}function pI(e){return e.split(",").map(t=>t.trim())}function gI(e,t,n){e.queries===null&&(e.queries=new oI),e.queries.track(new sI(t,n))}function Ph(e,t){return e.queries.getByIndex(t)}function _I(e,t){let n=e[ge],r=Ph(n,t);return r.crossesNgTemplate?Tc(n,e,t,[]):Dv(n,e,r,t)}var mo=class{},Rv=class extends mo{injector;componentFactoryResolver=new UC(this);instance=null;constructor(e){super();let t=new Yu([...e.providers,{provide:mo,useValue:this},{provide:Mo,useValue:this.componentFactoryResolver}],e.parent||va(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function mI(e,t,n=null){return new Rv({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var vI=(()=>{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=D_(!1,n.type),i=r.length>0?mI([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=_e({token:e,providedIn:"environment",factory:()=>new e(Fe($n))})}return e})();function At(e){return $u(()=>{let t=Nv(e),n=Ye(F({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===Sm.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?i=>i.get(vI).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Fn.Emulated,styles:e.styles||Hn,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&&Wr("NgStandalone"),Pv(n);let r=e.dependencies;return n.directiveDefs=vf(r,!1),n.pipeDefs=vf(r,!0),n.id=xI(n),n})}function yI(e){return Lr(e)||T_(e)}function bI(e){return e!==null}function wI(e,t){if(e==null)return Ar;let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],o,s,a,l;Array.isArray(i)?(a=i[0],o=i[1],s=i[2]??o,l=i[3]||null):(o=i,s=i,a=Oa.None,l=null),n[o]=[r,a,l],t[o]=s}return n}function EI(e){if(e==null)return Ar;let t={};for(let n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function Ma(e){return $u(()=>{let t=Nv(e);return Pv(t),t})}function kh(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 Nv(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||Ar,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||Hn,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:wI(e.inputs,t),outputs:EI(e.outputs),debugInfo:null}}function Pv(e){e.features?.forEach(t=>t(e))}function vf(e,t){if(!e)return null;let n=t?O_:yI;return()=>(typeof e=="function"?e():e).map(r=>n(r)).filter(bI)}function xI(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 SI(e){return Object.getPrototypeOf(e.prototype).constructor}function Ni(e){let t=SI(e.type),n=!0,r=[e];for(;t;){let i;if(Rn(e))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Ae(903,!1);i=t.\u0275dir}if(i){if(n){r.push(i);let s=e;s.inputs=El(e.inputs),s.declaredInputs=El(e.declaredInputs),s.outputs=El(e.outputs);let a=i.hostBindings;a&&DI(e,a);let l=i.viewQuery,u=i.contentQueries;if(l&&TI(e,l),u&&OI(e,u),CI(e,i),g1(e.outputs,i.outputs),Rn(i)&&i.data.animation){let d=e.data;d.animation=(d.animation||[]).concat(i.data.animation)}}let o=i.features;if(o)for(let s=0;s<o.length;s++){let a=o[s];a&&a.ngInherit&&a(e),a===Ni&&(n=!1)}}t=Object.getPrototypeOf(t)}II(r)}function CI(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 II(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=mi(i.hostAttrs,n=mi(n,i.hostAttrs))}}function El(e){return e===Ar?{}:e===Hn?[]:e}function TI(e,t){let n=e.viewQuery;n?e.viewQuery=(r,i)=>{t(r,i),n(r,i)}:e.viewQuery=t}function OI(e,t){let n=e.contentQueries;n?e.contentQueries=(r,i,o)=>{t(r,i,o),n(r,i,o)}:e.contentQueries=t}function DI(e,t){let n=e.hostBindings;n?e.hostBindings=(r,i)=>{t(r,i),n(r,i)}:e.hostBindings=t}function kv(e,t,n){return e[t]=n}function Gn(e,t,n){let r=e[t];return Object.is(r,n)?!1:(e[t]=n,!0)}function RI(e,t,n,r){let i=Gn(e,t,n);return Gn(e,t+1,r)||i}function NI(e,t,n,r,i,o,s,a,l){let u=t.consts,d=Lo(t,e,4,s||null,a||null);eh()&&Rh(t,n,d,dr(u,l),xh),d.mergedAttrs=mi(d.mergedAttrs,d.attrs),sh(t,d);let h=d.tView=yh(2,d,r,i,o,t.directiveRegistry,t.pipeRegistry,null,t.schemas,u,null);return t.queries!==null&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}function Oc(e,t,n,r,i,o,s,a,l,u){let d=n+ct,h=t.firstCreatePass?NI(d,t,e,r,i,o,s,a,l):t.data[d];_r(h,!1);let v=PI(t,e,h,n);xa()&&Pa(t,e,v,h),Dn(v,e);let m=pv(v,e,v,h);return e[d]=m,wh(e,m),eI(m,h,e),ya(h)&&Da(t,e,h),l!=null&&Eh(e,h,u),h}function lt(e,t,n,r,i,o,s,a){let l=xe(),u=_t(),d=dr(u.consts,o);return Oc(l,u,e,t,n,r,i,d,s,a),lt}var PI=kI;function kI(e,t,n,r){return Sa(!0),t[wt].createComment("")}var AI=new Ce(""),LI=(()=>{class e{static \u0275prov=_e({token:e,providedIn:"root",factory:()=>new MI})}return e})(),MI=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 Av(e){return!!e&&typeof e.then=="function"}function jI(e){return!!e&&typeof e.subscribe=="function"}var FI=new Ce(""),Lv=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=P(FI,{optional:!0})??[];injector=P(kt);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let i of this.appInits){let o=k_(this.injector,i);if(Av(o))n.push(o);else if(jI(o)){let s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});n.push(s)}}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=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),VI=new Ce("");function BI(){ow(()=>{throw new Ae(600,!1)})}function UI(e){return e.isBoundToModule}var HI=10,pr=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=P(ex);afterRenderManager=P(Lm);zonelessEnabled=P(ch);rootEffectScheduler=P(LI);dirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new ye;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=P(Ca).hasPendingTasks.pipe(ga(n=>!n));constructor(){P(Po,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:i=>{i&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=P($n);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){ze(10);let i=n instanceof vv;if(!this._injector.get(Lv).done){let h=!i&&F1(n),v=!1;throw new Ae(405,v)}let o;i?o=n:o=this._injector.get(Mo).resolveComponentFactory(n),this.componentTypes.push(o.componentType);let s=UI(o)?void 0:this._injector.get(mo),a=r||o.selector,l=o.create(kt.NULL,[],a,s),u=l.location.nativeElement,d=l.injector.get(AI,null);return d?.registerApplication(u),l.onDestroy(()=>{this.detachView(l.hostView),ms(this.components,l),d?.unregisterApplication(u)}),this._loadComponent(l),ze(11,l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){ze(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(gh.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new Ae(101,!1);let n=Oe(null);try{this._runningTick=!0,this.synchronize()}catch(r){this.internalErrorHandler(r)}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,Oe(n),this.afterTick.next(),ze(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(xn,null,{optional:!0}));let n=0;for(;this.dirtyFlags!==0&&n++<HI;)ze(14),this.synchronizeOnce(),ze(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)$I(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})=>wa(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;ms(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n),this._injector.get(VI,[]).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),()=>ms(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new Ae(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=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function ms(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function $I(e,t,n,r){!n&&!wa(e)||uv(e,t,n&&!r?0:1)}function ja(e,t,n,r){let i=xe(),o=Ro();if(Gn(i,o,t)){let s=_t(),a=oh();VS(a,i,e,t,n,r)}return ja}function Mv(e,t,n,r){return Gn(e,Ro(),n)?t+Co(n)+r:Jn}function Ko(e,t){return e<<17|t<<2}function Br(e){return e>>17&32767}function zI(e){return(e&2)==2}function qI(e,t){return e&131071|t<<17}function Dc(e){return e|2}function vi(e){return(e&131068)>>2}function xl(e,t){return e&-131069|t<<2}function GI(e){return(e&1)===1}function Rc(e){return e|1}function WI(e,t,n,r,i,o){let s=o?t.classBindings:t.styleBindings,a=Br(s),l=vi(s);e[r]=n;let u=!1,d;if(Array.isArray(n)){let h=n;d=h[1],(d===null||Io(h,d)>0)&&(u=!0)}else d=n;if(i)if(l!==0){let h=Br(e[a+1]);e[r+1]=Ko(h,a),h!==0&&(e[h+1]=xl(e[h+1],r)),e[a+1]=qI(e[a+1],r)}else e[r+1]=Ko(a,0),a!==0&&(e[a+1]=xl(e[a+1],r)),a=r;else e[r+1]=Ko(l,0),a===0?a=r:e[l+1]=xl(e[l+1],r),l=r;u&&(e[r+1]=Dc(e[r+1])),yf(e,d,r,!0),yf(e,d,r,!1),ZI(t,d,e,r,o),s=Ko(a,l),o?t.classBindings=s:t.styleBindings=s}function ZI(e,t,n,r,i){let o=i?e.residualClasses:e.residualStyles;o!=null&&typeof t=="string"&&Io(o,t)>=0&&(n[r+1]=Rc(n[r+1]))}function yf(e,t,n,r){let i=e[n+1],o=t===null,s=r?Br(i):vi(i),a=!1;for(;s!==0&&(a===!1||o);){let l=e[s],u=e[s+1];YI(l,t)&&(a=!0,e[s+1]=r?Rc(u):Dc(u)),s=r?Br(u):vi(u)}a&&(e[n+1]=r?Dc(i):Rc(i))}function YI(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?Io(e,t)>=0:!1}function Le(e,t,n){let r=xe(),i=Ro();if(Gn(r,i,t)){let o=_t(),s=oh();tv(o,s,r,e,t,r[wt],n,!1)}return Le}function bf(e,t,n,r,i){Sh(t,e,n,i?"class":"style",r)}function Fa(e,t,n){return jv(e,t,n,!1),Fa}function Va(e,t){return jv(e,t,null,!0),Va}function jv(e,t,n,r){let i=xe(),o=_t(),s=mE(2);if(o.firstUpdatePass&&JI(o,e,s,r),t!==Jn&&Gn(i,s,t)){let a=o.data[mr()];nT(o,a,i,i[wt],e,i[s+1]=rT(t,n),r,s)}}function KI(e,t){return t>=e.expandoStartIndex}function JI(e,t,n,r){let i=e.data;if(i[n+1]===null){let o=i[mr()],s=KI(e,n);iT(o,r)&&t===null&&!s&&(t=!1),t=XI(i,o,t,r),WI(i,o,t,n,s,r)}}function XI(e,t,n,r){let i=wE(e),o=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=Sl(null,e,t,n,r),n=vo(n,t.attrs,r),o=null);else{let s=t.directiveStylingLast;if(s===-1||e[s]!==i)if(n=Sl(i,e,t,n,r),o===null){let a=QI(e,t,r);a!==void 0&&Array.isArray(a)&&(a=Sl(null,e,t,a[1],r),a=vo(a,t.attrs,r),eT(e,t,r,a))}else o=tT(e,t,r)}return o!==void 0&&(r?t.residualClasses=o:t.residualStyles=o),n}function QI(e,t,n){let r=n?t.classBindings:t.styleBindings;if(vi(r)!==0)return e[Br(r)]}function eT(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[Br(i)]=r}function tT(e,t,n){let r,i=t.directiveEnd;for(let o=1+t.directiveStylingLast;o<i;o++){let s=e[o].hostAttrs;r=vo(r,s,n)}return vo(r,t.attrs,n)}function Sl(e,t,n,r,i){let o=null,s=n.directiveEnd,a=n.directiveStylingLast;for(a===-1?a=n.directiveStart:a++;a<s&&(o=t[a],r=vo(r,o.hostAttrs,i),o!==e);)a++;return e!==null&&(n.directiveStylingLast=a),r}function vo(e,t,n){let r=n?1:2,i=-1;if(t!==null)for(let o=0;o<t.length;o++){let s=t[o];typeof s=="number"?i=s:i===r&&(Array.isArray(e)||(e=e===void 0?[]:["",e]),M1(e,s,n?!0:t[++o]))}return e===void 0?null:e}function nT(e,t,n,r,i,o,s,a){if(!(t.type&3))return;let l=e.data,u=l[a+1],d=GI(u)?wf(l,t,n,i,vi(u),s):void 0;if(!qs(d)){qs(o)||zI(u)&&(o=wf(l,null,n,i,a,s));let h=z_(mr(),n);iC(r,s,h,i,o)}}function wf(e,t,n,r,i,o){let s=t===null,a;for(;i>0;){let l=e[i],u=Array.isArray(l),d=u?l[1]:l,h=d===null,v=n[i+1];v===Jn&&(v=h?Hn:void 0);let m=h?fl(v,r):d===r?v:void 0;if(u&&!qs(m)&&(m=fl(l,r)),qs(m)&&(a=m,s))return a;let w=e[i+1];i=s?Br(w):vi(w)}if(t!==null){let l=o?t.residualClasses:t.residualStyles;l!=null&&(a=fl(l,r))}return a}function qs(e){return e!==void 0}function rT(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=fn(or(e)))),e}function iT(e,t){return(e.flags&(t?8:16))!==0}var oT=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 o=this.detach(n);this.attach(n,i),this.attach(r,o)}else this.attach(n,i)}move(e,t){this.attach(t,this.detach(e))}};function Cl(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function sT(e,t,n){let r,i,o=0,s=e.length-1,a;if(Array.isArray(t)){let l=t.length-1;for(;o<=s&&o<=l;){let u=e.at(o),d=t[o],h=Cl(o,u,o,d,n);if(h!==0){h<0&&e.updateValue(o,d),o++;continue}let v=e.at(s),m=t[l],w=Cl(s,v,l,m,n);if(w!==0){w<0&&e.updateValue(s,m),s--,l--;continue}let C=n(o,u),A=n(s,v),k=n(o,d);if(Object.is(k,A)){let $=n(l,m);Object.is($,C)?(e.swap(o,s),e.updateValue(s,m),l--,s--):e.move(s,o),e.updateValue(o,d),o++;continue}if(r??=new Sf,i??=xf(e,o,s,n),Nc(e,r,o,k))e.updateValue(o,d),o++,s++;else if(i.has(k))r.set(C,e.detach(o)),s--;else{let $=e.create(o,t[o]);e.attach(o,$),o++,s++}}for(;o<=l;)Ef(e,r,n,o,t[o]),o++}else if(t!=null){let l=t[Symbol.iterator](),u=l.next();for(;!u.done&&o<=s;){let d=e.at(o),h=u.value,v=Cl(o,d,o,h,n);if(v!==0)v<0&&e.updateValue(o,h),o++,u=l.next();else{r??=new Sf,i??=xf(e,o,s,n);let m=n(o,h);if(Nc(e,r,o,m))e.updateValue(o,h),o++,s++,u=l.next();else if(!i.has(m))e.attach(o,e.create(o,h)),o++,s++,u=l.next();else{let w=n(o,d);r.set(w,e.detach(o)),s--}}}for(;!u.done;)Ef(e,r,n,e.length,u.value),u=l.next()}for(;o<=s;)e.destroy(e.detach(s--));r?.forEach(l=>{e.destroy(l)})}function Nc(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Ef(e,t,n,r,i){if(Nc(e,t,r,n(r,i)))e.updateValue(r,i);else{let o=e.create(r,i);e.attach(r,o)}}function xf(e,t,n,r){let i=new Set;for(let o=t;o<=n;o++)i.add(r(o,e.at(o)));return i}var Sf=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 st(e,t){Wr("NgControlFlow");let n=xe(),r=Ro(),i=n[r]!==Jn?n[r]:-1,o=i!==-1?Gs(n,ct+i):void 0,s=0;if(Gn(n,r,e)){let a=Oe(null);try{if(o!==void 0&&_v(o,s),e!==-1){let l=ct+e,u=Gs(n,l),d=Pc(n[ge],l),h=_o(u,d.tView.ssrId),v=Ra(n,d,t,{dehydratedView:h});Aa(u,v,s,ho(d,h))}}finally{Oe(a)}}else if(o!==void 0){let a=gv(o,s);a!==void 0&&(a[ht]=t)}}var aT=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-Dt}};function Pi(e,t){return t}var lT=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function Wt(e,t,n,r,i,o,s,a,l,u,d,h,v){Wr("NgControlFlow");let m=xe(),w=_t(),C=l!==void 0,A=xe(),k=a?s.bind(A[vn][ht]):s,$=new lT(C,k);A[ct+e]=$,Oc(m,w,e+1,t,n,r,i,dr(w.consts,o)),C&&Oc(m,w,e+2,l,u,d,h,dr(w.consts,v))}var cT=class extends oT{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-Dt}at(e){return this.getLView(e)[ht].$implicit}attach(e,t){let n=t[ao];this.needsIndexUpdate||=e!==this.length,Aa(this.lContainer,t,e,ho(this.templateTNode,n))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,uT(this.lContainer,e)}create(e,t){let n=_o(this.lContainer,this.templateTNode.tView.ssrId),r=Ra(this.hostLView,this.templateTNode,new aT(this.lContainer,t,e),{dehydratedView:n});return this.operationsCounter?.recordCreate(),r}destroy(e){Na(e[ge],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[ht].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[ht].$index=e}getLView(e){return hT(this.lContainer,e)}};function Zt(e){let t=Oe(null),n=mr();try{let r=xe(),i=r[ge],o=r[n],s=n+1,a=Gs(r,s);if(o.liveCollection===void 0){let u=Pc(i,s);o.liveCollection=new cT(a,r,u)}else o.liveCollection.reset();let l=o.liveCollection;if(sT(l,e,o.trackByFn),l.updateIndexes(),o.hasEmptyBlock){let u=Ro(),d=l.length===0;if(Gn(r,u,d)){let h=n+2,v=Gs(r,h);if(d){let m=Pc(i,h),w=_o(v,m.tView.ssrId),C=Ra(r,m,void 0,{dehydratedView:w});Aa(v,C,0,ho(m,w))}else _v(v,0)}}}finally{Oe(t)}}function Gs(e,t){return e[t]}function uT(e,t){return fo(e,t)}function hT(e,t){return gv(e,t)}function Pc(e,t){return Ju(e,t)}function X(e,t,n,r){let i=xe(),o=_t(),s=ct+e,a=i[wt],l=o.firstCreatePass?wv(s,o,i,t,xh,eh(),n,r):o.data[s],u=dT(o,i,l,a,t,e);i[s]=u;let d=ya(l);return _r(l,!0),Km(a,u,l),!rv(l)&&xa()&&Pa(o,i,u,l),(cE()===0||d)&&Dn(u,i),uE(),d&&(Da(o,i,l),_h(o,l,i)),r!==null&&Eh(i,l),X}function Q(){let e=Gt();th()?K_():(e=e.parent,_r(e,!1));let t=e;fE(t)&&pE(),hE();let n=_t();return n.firstCreatePass&&Ev(n,t),t.classesWithoutHost!=null&&DE(t)&&bf(n,t,xe(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&RE(t)&&bf(n,t,xe(),t.stylesWithoutHost,!1),Q}function He(e,t,n,r){return X(e,t,n,r),Q(),He}var dT=(e,t,n,r,i,o)=>(Sa(!0),Zm(r,i,CE()));function fT(e,t,n,r,i){let o=t.consts,s=dr(o,r),a=Lo(t,e,8,"ng-container",s);s!==null&&Ic(a,s,!0);let l=dr(o,i);return eh()&&Rh(t,n,a,l,xh),a.mergedAttrs=mi(a.mergedAttrs,a.attrs),t.queries!==null&&t.queries.elementStart(t,a),a}function Fv(e,t,n){let r=xe(),i=_t(),o=e+ct,s=i.firstCreatePass?fT(o,i,r,t,n):i.data[o];_r(s,!0);let a=pT(i,r,s,e);return r[o]=a,xa()&&Pa(i,r,a,s),Dn(a,r),ya(s)&&(Da(i,r,s),_h(i,s,r)),n!=null&&Eh(r,s),Fv}function Vv(){let e=Gt(),t=_t();return th()?K_():(e=e.parent,_r(e,!1)),t.firstCreatePass&&(sh(t,e),Ku(e)&&t.queries.elementEnd(e)),Vv}function Ah(e,t,n){return Fv(e,t,n),Vv(),Ah}var pT=(e,t,n,r)=>(Sa(!0),SS(t[wt],""));function Bt(){return xe()}var Ws="en-US",gT=Ws;function _T(e){typeof e=="string"&&(gT=e.toLowerCase().replace(/_/g,"-"))}var mT=(e,t,n)=>{};function nt(e,t,n,r){let i=xe(),o=_t(),s=Gt();return yT(o,i,i[wt],s,e,t,r),nt}function vT(e,t,n,r){let i=e.cleanup;if(i!=null)for(let o=0;o<i.length-1;o+=2){let s=i[o];if(s===n&&i[o+1]===r){let a=t[Ps],l=i[o+2];return a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function yT(e,t,n,r,i,o,s){let a=ya(r),l=e.firstCreatePass?Z_(e):null,u=t[ht],d=W_(t),h=!0;if(r.type&3||s){let v=An(r,t),m=s?s(v):v,w=d.length,C=s?k=>s(qt(k[r.index])):r.index,A=null;if(!s&&a&&(A=vT(e,t,i,r.index)),A!==null){let k=A.__ngLastListenerFn__||A;k.__ngNextListenerFn__=o,A.__ngLastListenerFn__=o,h=!1}else{o=Tf(r,t,u,o),mT(v,i,o);let k=n.listen(m,i,o);d.push(o,k),l&&l.push(i,C,w,w+1)}}else o=Tf(r,t,u,o);if(h){let v=r.outputs?.[i],m=r.hostDirectiveOutputs?.[i];if(m&&m.length)for(let w=0;w<m.length;w+=2){let C=m[w],A=m[w+1];Cf(r,e,t,C,A,i,o,d,l)}if(v&&v.length)for(let w of v)Cf(r,e,t,w,i,i,o,d,l)}}function Cf(e,t,n,r,i,o,s,a,l){let u=n[r],d=t.data[r].outputs[i],h=u[d].subscribe(s),v=a.length;a.push(s,h),l&&l.push(o,e.index,v,-(v+1))}function If(e,t,n,r){let i=Oe(null);try{return ze(6,t,n),n(r)!==!1}catch(o){return nv(e,o),!1}finally{ze(7,t,n),Oe(i)}}function Tf(e,t,n,r){return function i(o){if(o===Function)return r;let s=Ci(e)?tn(e.index,t):t;Dh(s,5);let a=If(t,n,r,o),l=i.__ngNextListenerFn__;for(;l;)a=If(t,n,l,o)&&a,l=l.__ngNextListenerFn__;return a}}function le(e=1){return xE(e)}function ki(e,t,n){return Bv(e,"",t,"",n),ki}function Bv(e,t,n,r,i){let o=xe(),s=Mv(o,t,n,r);if(s!==Jn){let a=_t(),l=oh();tv(a,l,o,e,s,o[wt],i,!1)}return Bv}function Zs(e,t,n){fI(e,t,n)}function Ys(e){let t=xe(),n=_t(),r=Q_();nh(r+1);let i=Ph(n,r);if(e.dirty&&iE(t)===((i.metadata.flags&2)===2)){if(i.matches===null)e.reset([]);else{let o=_I(t,r);e.reset(o,nx),e.notifyOnChanges()}return!0}return!1}function Ks(){return hI(xe(),Q_())}function Lh(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function ur(e){let t=J_();return ba(t,ct+e)}function rt(e,t=""){let n=xe(),r=_t(),i=e+ct,o=r.firstCreatePass?Lo(r,i,1,t,null):r.data[i],s=bT(r,n,o,t,e);n[i]=s,xa()&&Pa(r,n,s,o),_r(o,!1)}var bT=(e,t,n,r,i)=>(Sa(!0),ES(t[wt],r));function Ba(e){return Nn("",e,""),Ba}function Nn(e,t,n){let r=xe(),i=Mv(r,e,t,n);return i!==Jn&&wT(r,mr(),i),Nn}function wT(e,t,n){let r=z_(t,e);xS(e[wt],r,n)}var Uv={};function vr(e){let t=_t(),n=xe(),r=e+ct,i=Lo(t,r,128,null,null);return _r(i,!1),Lh(t,n,r,Uv),vr}function hi(e){Wr("NgLet");let t=_t(),n=xe(),r=mr();return Lh(t,n,r,e),e}function un(e){let t=J_(),n=ba(t,ct+e);if(n===Uv)throw new Ae(314,!1);return n}function ET(e,t,n){let r=_t();if(r.firstCreatePass){let i=Rn(e);kc(n,r.data,r.blueprint,i,!0),kc(t,r.data,r.blueprint,i,!1)}}function kc(e,t,n,r,i){if(e=Pt(e),Array.isArray(e))for(let o=0;o<e.length;o++)kc(e[o],t,n,r,i);else{let o=_t(),s=xe(),a=Gt(),l=gi(e)?e:Pt(e.provide),u=P_(e),d=a.providerIndexes&1048575,h=a.directiveStart,v=a.providerIndexes>>20;if(gi(e)||!e.multi){let m=new No(u,i,Ot),w=Tl(l,t,i?d:d+v,h);w===-1?(gc(Bs(a,s),o,l),Il(o,e,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(m),s.push(m)):(n[w]=m,s[w]=m)}else{let m=Tl(l,t,d+v,h),w=Tl(l,t,d,d+v),C=m>=0&&n[m],A=w>=0&&n[w];if(i&&!A||!i&&!C){gc(Bs(a,s),o,l);let k=CT(i?ST:xT,n.length,i,r,u);!i&&A&&(n[w].providerFactory=k),Il(o,e,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(k),s.push(k)}else{let k=Hv(n[i?w:m],u,!i&&r);Il(o,e,m>-1?m:w,k)}!i&&r&&A&&n[w].componentProviders++}}}function Il(e,t,n,r){let i=gi(t),o=z1(t);if(i||o){let s=(o?Pt(t.useClass):t).prototype.ngOnDestroy;if(s){let a=e.destroyHooks||(e.destroyHooks=[]);if(!i&&t.multi){let l=a.indexOf(n);l===-1?a.push(n,[r,s]):a[l+1].push(r,s)}else a.push(n,s)}}}function Hv(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function Tl(e,t,n,r){for(let i=n;i<r;i++)if(t[i]===e)return i;return-1}function xT(e,t,n,r){return Ac(this.multi,[])}function ST(e,t,n,r){let i=this.multi,o;if(this.providerFactory){let s=this.providerFactory.componentProviders,a=uo(n,n[ge],this.providerFactory.index,r);o=a.slice(0,s),Ac(i,o);for(let l=s;l<a.length;l++)o.push(a[l])}else o=[],Ac(i,o);return o}function Ac(e,t){for(let n=0;n<e.length;n++){let r=e[n];t.push(r())}return t}function CT(e,t,n,r,i){let o=new No(e,n,Ot);return o.multi=[],o.index=t,o.componentProviders=0,Hv(o,i,r&&!n),o}function IT(e,t=[]){return n=>{n.providersResolver=(r,i)=>ET(r,i?i(e):e,t)}}function $v(e,t,n,r){return qv(xe(),Ea(),e,t,n,r)}function TT(e,t,n,r,i){return Gv(xe(),Ea(),e,t,n,r,i)}function zv(e,t){let n=e[t];return n===Jn?void 0:n}function qv(e,t,n,r,i,o){let s=t+n;return Gn(e,s,i)?kv(e,s+1,o?r.call(o,i):r(i)):zv(e,s+1)}function Gv(e,t,n,r,i,o,s){let a=t+n;return RI(e,a,i,o)?kv(e,a+2,s?r.call(s,i,o):r(i,o)):zv(e,a+2)}function yn(e,t){let n=_t(),r,i=e+ct;n.firstCreatePass?(r=OT(t,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks??=[]).push(i,r.onDestroy)):r=n.data[i];let o=r.factory||(r.factory=kr(r.type,!0)),s,a=Mt(Ot);try{let l=Vs(!1),u=o();return Vs(l),Lh(n,xe(),i,u),u}finally{Mt(a)}}function OT(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function Pn(e,t,n){let r=e+ct,i=xe(),o=ba(i,r);return Wv(i,r)?qv(i,Ea(),t,o.transform,n,o):o.transform(n)}function DT(e,t,n,r){let i=e+ct,o=xe(),s=ba(o,i);return Wv(o,i)?Gv(o,Ea(),t,s.transform,n,r,s):s.transform(n,r)}function Wv(e,t){return e[ge].data[t].pure}function RT(e,t){return La(e,t)}var NT=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(".")}},Of=new NT("19.2.0"),PT=(()=>{class e{zone=P(Ze);changeDetectionScheduler=P(Ii);applicationRef=P(pr);_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=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function kT({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:n}){return e??=()=>new Ze(Ye(F({},AT()),{scheduleInRootZone:n})),[{provide:Ze,useFactory:e},{provide:Ns,multi:!0,useFactory:()=>{let r=P(PT,{optional:!0});return()=>r.initialize()}},{provide:Ns,multi:!0,useFactory:()=>{let r=P(LT);return()=>{r.initialize()}}},t===!0?{provide:ym,useValue:!0}:[],{provide:uh,useValue:n??vm}]}function AT(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var LT=(()=>{class e{subscription=new yt;initialized=!1;zone=P(Ze);pendingTasks=P(Ca);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(()=>{Ze.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Ze.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Zv=(()=>{class e{appRef=P(pr);taskService=P(Ca);ngZone=P(Ze);zonelessEnabled=P(ch);tracing=P(Po,{optional:!0});disableScheduling=P(ym,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new yt;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Hs):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(P(uh,{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 wm||!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?Qd:bm;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(Hs+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,Qd(()=>{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=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function MT(){return Wr("NgZoneless"),V1([{provide:Ii,useExisting:Zv},{provide:Ze,useClass:wm},{provide:ch,useValue:!0},{provide:uh,useValue:!1},[]])}function jT(){return typeof $localize<"u"&&$localize.locale||Ws}var Yv=new Ce("",{providedIn:"root",factory:()=>P(Yv,De.Optional|De.SkipSelf)||jT()}),Lc=new Ce(""),FT=new Ce("");function Vi(e){return!e.moduleRef}function VT(e){let t=Vi(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Ze);return n.run(()=>{Vi(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Ti,null),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:o=>{r.handleError(o)}})}),Vi(e)){let o=()=>t.destroy(),s=e.platformInjector.get(Lc);s.add(o),t.onDestroy(()=>{i.unsubscribe(),s.delete(o)})}else{let o=()=>e.moduleRef.destroy(),s=e.platformInjector.get(Lc);s.add(o),e.moduleRef.onDestroy(()=>{ms(e.allPlatformModules,e.moduleRef),i.unsubscribe(),s.delete(o)})}return UT(r,n,()=>{let o=t.get(Lv);return o.runInitializers(),o.donePromise.then(()=>{let s=t.get(Yv,Ws);if(_T(s||Ws),!t.get(FT,!0))return Vi(e)?t.get(pr):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Vi(e)){let a=t.get(pr);return e.rootComponent!==void 0&&a.bootstrap(e.rootComponent),a}else return BT(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}function BT(e,t){let n=e.injector.get(pr);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else if(e.instance.ngDoBootstrap)e.instance.ngDoBootstrap(n);else throw new Ae(-403,!1);t.push(e)}function UT(e,t,n){try{let r=n();return Av(r)?r.catch(i=>{throw t.runOutsideAngular(()=>e.handleError(i)),i}):r}catch(r){throw t.runOutsideAngular(()=>e.handleError(r)),r}}var vs=null;function HT(e=[],t){return kt.create({name:t,providers:[{provide:Zu,useValue:"platform"},{provide:Lc,useValue:new Set([()=>vs=null])},...e]})}function $T(e=[]){if(vs)return vs;let t=HT(e);return vs=t,BI(),zT(t),t}function zT(e){let t=e.get(Nm,null);k_(e,()=>{t?.forEach(n=>n())})}var Ua=(()=>{class e{static __NG_ELEMENT_ID__=qT}return e})();function qT(e){return GT(Gt(),xe(),(e&16)===16)}function GT(e,t,n){if(Ci(e)&&!n){let r=tn(e.index,t);return new po(r,r)}else if(e.type&175){let r=t[vn];return new po(r,t)}return null}function WT(e){ze(8);try{let{rootComponent:t,appProviders:n,platformProviders:r}=e,i=$T(r),o=[kT({}),{provide:Ii,useExisting:Zv},...n||[]],s=new Rv({providers:o,parent:i,debugName:"",runEnvironmentInitializers:!1});return VT({r3Injector:s.injector,platformInjector:i,rootComponent:t})}catch(t){return Promise.reject(t)}finally{ze(9)}}function ZT(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}function YT(e,t=NaN){return!isNaN(parseFloat(e))&&!isNaN(Number(e))?Number(e):t}function KT(e){let t=Oe(null);try{return e()}finally{Oe(t)}}var EM=class{[ar];constructor(e){this[ar]=e}destroy(){this[ar].destroy()}};function Kv(e,t){let n=Lr(e),r=t.elementInjector||va();return new Nh(n).create(r,t.projectableNodes,t.hostElement,t.environmentInjector)}var JT={schedule(e,t){let n=setTimeout(e,t);return()=>clearTimeout(n)}};function XT(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function QT(e){return!!e&&e.nodeType===Node.ELEMENT_NODE}var Ol;function eO(e,t){if(!Ol){let n=Element.prototype;Ol=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return e.nodeType===Node.ELEMENT_NODE?Ol.call(e,t):!1}function tO(e){let t={};return e.forEach(({propName:n,templateName:r,transform:i})=>{t[XT(r)]=[n,i]}),t}function nO(e,t){return t.get(Mo).resolveComponentFactory(e).inputs}function rO(e,t){let n=e.childNodes,r=t.map(()=>[]),i=-1;t.some((o,s)=>o==="*"?(i=s,!0):!1);for(let o=0,s=n.length;o<s;++o){let a=n[o],l=iO(a,t,i);l!==-1&&r[l].push(a)}return r}function iO(e,t,n){let r=n;return QT(e)&&t.some((i,o)=>i!=="*"&&eO(e,i)?(r=o,!0):!1),r}var oO=10,sO=class{componentFactory;inputMap=new Map;constructor(e,t){this.componentFactory=t.get(Mo).resolveComponentFactory(e);for(let n of this.componentFactory.inputs)this.inputMap.set(n.propName,n.templateName)}create(e){return new aO(this.componentFactory,e,this.inputMap)}},aO=class{componentFactory;injector;inputMap;eventEmitters=new Cw(1);events=this.eventEmitters.pipe(f_(e=>_a(...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(Ze),this.appRef=this.injector.get(pr),this.cdScheduler=t.get(Ii),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=JT.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},oO))})}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=kt.create({providers:[],parent:this.injector}),n=rO(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 bt(o=>{let s=i.subscribe(a=>o.next({name:r,value:a}));return()=>s.unsubscribe()})});this.eventEmitters.next(t)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},lO=class extends HTMLElement{ngElementEventsSubscription=null};function cO(e,t){let n=nO(e,t.injector),r=t.strategyFactory||new sO(e,t.injector),i=tO(n);class o extends lO{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:u})=>{if(!this.hasOwnProperty(l))return;let d=this[l];delete this[l],a.setInputValue(l,d,u)})}return this._ngElementStrategy}_ngElementStrategy;constructor(a){super(),this.injector=a}attributeChangedCallback(a,l,u,d){let[h,v]=i[a];this.ngElementStrategy.setInputValue(h,u,v)}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:s,transform:a})=>{Object.defineProperty(o.prototype,s,{get(){return this.ngElementStrategy.getInputValue(s)},set(l){this.ngElementStrategy.setInputValue(s,l,a)},configurable:!0,enumerable:!0})}),o}var Jv=null;function Xi(){return Jv}function uO(e){Jv??=e}var hO=class{},et=new Ce(""),Xv=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:()=>P(dO),providedIn:"platform"})}return e})(),dO=(()=>{class e extends Xv{_location;_history;_doc=P(et);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Xi().getBaseHref(this._doc)}onPopState(n){let r=Xi().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=Xi().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=_e({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function Qv(e,t){return e?t?e.endsWith("/")?t.startsWith("/")?e+t.slice(1):e+t:t.startsWith("/")?e+t:`${e}/${t}`:e:t}function Df(e){let t=e.search(/#|\?|$/);return e[t-1]==="/"?e.slice(0,t-1)+e.slice(t):e}function Dr(e){return e&&e[0]!=="?"?`?${e}`:e}var Mh=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:()=>P(pO),providedIn:"root"})}return e})(),fO=new Ce(""),pO=(()=>{class e extends Mh{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??P(et).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 Qv(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+Dr(this._platformLocation.search),i=this._platformLocation.hash;return i&&n?`${r}${i}`:r}pushState(n,r,i,o){let s=this.prepareExternalUrl(i+Dr(o));this._platformLocation.pushState(n,r,s)}replaceState(n,r,i,o){let s=this.prepareExternalUrl(i+Dr(o));this._platformLocation.replaceState(n,r,s)}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)(Fe(Xv),Fe(fO,8))};static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ey=(()=>{class e{_subject=new ye;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=mO(Df(Rf(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+Dr(r))}normalize(n){return e.stripTrailingSlash(_O(this._basePath,Rf(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+Dr(r)),i)}replaceState(n,r="",i=null){this._locationStrategy.replaceState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Dr(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=Dr;static joinWithSlash=Qv;static stripTrailingSlash=Df;static \u0275fac=function(n){return new(n||e)(Fe(Mh))};static \u0275prov=_e({token:e,factory:()=>gO(),providedIn:"root"})}return e})();function gO(){return new ey(Fe(Mh))}function _O(e,t){if(!e||!t.startsWith(e))return t;let n=t.substring(e.length);return n===""||["/",";","?","#"].includes(n[0])?n:t}function Rf(e){return e.replace(/\/index.html$/,"")}function mO(e){if(new RegExp("^(https?:)?//").test(e)){let[,t]=e.split(/\/\/[^\/]+/);return t}return e}function vO(e,t){t=encodeURIComponent(t);for(let n of e.split(";")){let r=n.indexOf("="),[i,o]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(i.trim()===t)return decodeURIComponent(o)}return null}var Dl=/\s+/,Nf=[],Ha=(()=>{class e{_ngEl;_renderer;initialClasses=Nf;rawClass;stateMap=new Map;constructor(n,r){this._ngEl=n,this._renderer=r}set klass(n){this.initialClasses=n!=null?n.trim().split(Dl):Nf}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(Dl):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(Dl).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)(Ot(Vt),Ot(yv))};static \u0275dir=Ma({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return e})(),yO=(()=>{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)(Ot(Ri))};static \u0275dir=Ma({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[V_]})}return e})(),ty="browser",bO="server";function wO(e){return e===ty}function ny(e){return e===bO}var EO=class{},xO=class extends hO{supportsDOMEvents=!0},SO=class ry extends xO{static makeCurrent(){uO(new ry)}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=CO();return n==null?null:IO(n)}resetBaseElement(){Wi=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return vO(document.cookie,t)}},Wi=null;function CO(){return Wi=Wi||document.querySelector("base"),Wi?Wi.getAttribute("href"):null}function IO(e){return new URL(e,document.baseURI).pathname}var TO=(()=>{class e{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:e.\u0275fac})}return e})(),Mc=new Ce(""),iy=(()=>{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,o){return this._findPluginFor(r).addEventListener(n,r,i,o)}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 Ae(5101,!1);return this._eventNameToPlugin.set(n,r),r}static \u0275fac=function(n){return new(n||e)(Fe(Mc),Fe(Ze))};static \u0275prov=_e({token:e,factory:e.\u0275fac})}return e})(),oy=class{_doc;constructor(e){this._doc=e}manager},ys="ng-app-id";function Pf(e){for(let t of e)t.remove()}function kf(e,t){let n=t.createElement("style");return n.textContent=e,n}function OO(e,t,n,r){let i=e.head?.querySelectorAll(`style[${ys}="${t}"],link[${ys}="${t}"]`);if(i)for(let o of i)o.removeAttribute(ys),o instanceof HTMLLinkElement?r.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&n.set(o.textContent,{usage:0,elements:[o]})}function jc(e,t){let n=t.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n}var sy=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(n,r,i,o={}){this.doc=n,this.appId=r,this.nonce=i,this.isServer=ny(o),OO(n,r,this.inline,this.external),this.hosts.add(n.head)}addStyles(n,r){for(let i of n)this.addUsage(i,this.inline,kf);r?.forEach(i=>this.addUsage(i,this.external,jc))}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 o=r.get(n);o?o.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,i(n,this.doc)))})}removeUsage(n,r){let i=r.get(n);i&&(i.usage--,i.usage<=0&&(Pf(i.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])Pf(n);this.hosts.clear()}addHost(n){this.hosts.add(n);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(n,kf(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(n,jc(r,this.doc)))}removeHost(n){this.hosts.delete(n)}addElement(n,r){return this.nonce&&r.setAttribute("nonce",this.nonce),this.isServer&&r.setAttribute(ys,this.appId),n.appendChild(r)}static \u0275fac=function(n){return new(n||e)(Fe(et),Fe(ph),Fe(Pm,8),Fe(Ia))};static \u0275prov=_e({token:e,factory:e.\u0275fac})}return e})(),Rl={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"},jh=/%COMP%/g,ay="%COMP%",DO=`_nghost-${ay}`,RO=`_ngcontent-${ay}`,NO=!0,PO=new Ce("",{providedIn:"root",factory:()=>NO});function kO(e){return RO.replace(jh,e)}function AO(e){return DO.replace(jh,e)}function ly(e,t){return t.map(n=>n.replace(jh,e))}var Af=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(n,r,i,o,s,a,l,u=null,d=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=o,this.doc=s,this.platformId=a,this.ngZone=l,this.nonce=u,this.tracingService=d,this.platformIsServer=ny(a),this.defaultRenderer=new Fh(n,s,l,this.platformIsServer,this.tracingService)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===Fn.ShadowDom&&(r=Ye(F({},r),{encapsulation:Fn.Emulated}));let i=this.getOrCreateRenderer(n,r);return i instanceof Mf?i.applyToHost(n):i instanceof Fc&&i.applyStyles(),i}getOrCreateRenderer(n,r){let i=this.rendererByCompId,o=i.get(r.id);if(!o){let s=this.doc,a=this.ngZone,l=this.eventManager,u=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,h=this.platformIsServer,v=this.tracingService;switch(r.encapsulation){case Fn.Emulated:o=new Mf(l,u,r,this.appId,d,s,a,h,v);break;case Fn.ShadowDom:return new LO(l,u,n,r,s,a,this.nonce,h,v);default:o=new Fc(l,u,r,d,s,a,h,v);break}i.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static \u0275fac=function(n){return new(n||e)(Fe(iy),Fe(sy),Fe(ph),Fe(PO),Fe(et),Fe(Ia),Fe(Ze),Fe(Pm),Fe(Po,8))};static \u0275prov=_e({token:e,factory:e.\u0275fac})}return e})(),Fh=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(Rl[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(Lf(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(Lf(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 Ae(-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=Rl[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Rl[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&(Or.DashCase|Or.Important)?e.style.setProperty(t,n,r&Or.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&Or.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=Xi().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 Lf(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var LO=class extends Fh{sharedStylesHost;hostEl;shadowRoot;constructor(e,t,n,r,i,o,s,a,l){super(e,i,o,a,l),this.sharedStylesHost=t,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let u=r.styles;u=ly(r.id,u);for(let h of u){let v=document.createElement("style");s&&v.setAttribute("nonce",s),v.textContent=h,this.shadowRoot.appendChild(v)}let d=r.getExternalStyles?.();if(d)for(let h of d){let v=jc(h,i);s&&v.setAttribute("nonce",s),this.shadowRoot.appendChild(v)}}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)}},Fc=class extends Fh{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,i,o,s,a,l){super(e,i,o,s,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let u=n.styles;this.styles=l?ly(l,u):u,this.styleUrls=n.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Mf=class extends Fc{contentAttr;hostAttr;constructor(e,t,n,r,i,o,s,a,l){let u=r+"-"+n.id;super(e,t,n,i,o,s,a,l,u),this.contentAttr=kO(u),this.hostAttr=AO(u)}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}},MO=(()=>{class e extends oy{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,i,o){return n.addEventListener(r,i,o),()=>this.removeEventListener(n,r,i,o)}removeEventListener(n,r,i,o){return n.removeEventListener(r,i,o)}static \u0275fac=function(n){return new(n||e)(Fe(et))};static \u0275prov=_e({token:e,factory:e.\u0275fac})}return e})(),jf=["alt","control","meta","shift"],jO={"\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"},FO={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},VO=(()=>{class e extends oy{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,i,o){let s=e.parseEventName(r),a=e.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Xi().onAndCancel(n,s.domEventName,a,o))}static parseEventName(n){let r=n.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let o=e._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),jf.forEach(u=>{let d=r.indexOf(u);d>-1&&(r.splice(d,1),s+=u+".")}),s+=o,r.length!=0||o.length===0)return null;let l={};return l.domEventName=i,l.fullKey=s,l}static matchEventFullKeyCode(n,r){let i=jO[n.key]||n.key,o="";return r.indexOf("code.")>-1&&(i=n.code,o="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),jf.forEach(s=>{if(s!==i){let a=FO[s];a(n)&&(o+=s+".")}}),o+=i,o===r)}static eventCallback(n,r,i){return o=>{e.matchEventFullKeyCode(o,n)&&i.runGuarded(()=>r(o))}}static _normalizeKey(n){return n==="esc"?"escape":n}static \u0275fac=function(n){return new(n||e)(Fe(et))};static \u0275prov=_e({token:e,factory:e.\u0275fac})}return e})();function BO(e){return WT(UO(e))}function UO(e){return{appProviders:[...GO,...e?.providers??[]],platformProviders:qO}}function HO(){SO.makeCurrent()}function $O(){return new Ti}function zO(){return _x(document),document}var qO=[{provide:Ia,useValue:ty},{provide:Nm,useValue:HO,multi:!0},{provide:et,useFactory:zO,deps:[]}],GO=[{provide:Zu,useValue:"root"},{provide:Ti,useFactory:$O,deps:[]},{provide:Mc,useClass:MO,multi:!0,deps:[et]},{provide:Mc,useClass:VO,multi:!0,deps:[et]},Af,sy,iy,{provide:xn,useExisting:Af},{provide:EO,useClass:TO,deps:[]},[]],cy=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:function(n){let r=null;return n?r=new(n||e):r=Fe(WO),r},providedIn:"root"})}return e})(),WO=(()=>{class e extends cy{_doc;constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case jn.NONE:return r;case jn.HTML:return Cr(r,"HTML")?or(r):qm(this._doc,String(r)).toString();case jn.STYLE:return Cr(r,"Style")?or(r):r;case jn.SCRIPT:if(Cr(r,"Script"))return or(r);throw new Ae(5200,!1);case jn.URL:return Cr(r,"URL")?or(r):mh(String(r));case jn.RESOURCE_URL:if(Cr(r,"ResourceURL"))return or(r);throw new Ae(5201,!1);default:throw new Ae(5202,!1)}}bypassSecurityTrustHtml(n){return Mx(n)}bypassSecurityTrustStyle(n){return jx(n)}bypassSecurityTrustScript(n){return Fx(n)}bypassSecurityTrustUrl(n){return Vx(n)}bypassSecurityTrustResourceUrl(n){return Bx(n)}static \u0275fac=function(n){return new(n||e)(Fe(et))};static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ZO="9.10.9",xt=class Vc{static SDK_VERSION=ZO;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=Vc.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");Vc.SDK_VERSION_CODE=parseInt(t,10)}},yo={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${xt.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${xt.SDK_VERSION}/dist/widget.min.js`},Qt=bn($b()),cn=class{static log(...e){Qt.default.info(...e)}static debug(...e){Qt.default.debug(...e)}static error(...e){Qt.default.error(...e)}static warn(...e){Qt.default.warn(...e)}static info(...e){Qt.default.info(...e)}static trace(...e){Qt.default.trace(...e)}};function YO(e=xt.LOG_PREFIX){Qt.default.useDefaults({formatter:function(n){n.unshift(`${e} (v${xt.SDK_VERSION}):`)}});let t=KO();(t==="1"||t==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Qt.default.setLevel(Qt.default[localStorage.cooeeLogLevel]):Qt.default.setLevel(yo.debug?Qt.default.TRACE:Qt.default.OFF)}function KO(){return new URL(location.href).searchParams?.get("cooee-debug")}var Jo=bn(Rg()),JO={providers:[MT()]},Nl=bn(So()),xM=bn(zb()),uy=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;currency;static get(){return window.CooeeSDK.config}update(e){return e??={},this.gaEnabled=e.gaEnabled,this.gaMeasurementID=e.gaMeasurementID,this.pixelPush=e.pixelPush,this.website=e.website??{},this.currencyCount=e.currencyCount??0,this.money=e.money,this.currency=e.currency,this.storefrontToken=e.storefrontToken,this.skipItemAttribute=e.skipItemAttribute,this}},hy=Object.prototype.toString;function Vh(e){switch(hy.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Ur(e,Error)}}function Ai(e,t){return hy.call(e)===`[object ${t}]`}function dy(e){return Ai(e,"ErrorEvent")}function Ff(e){return Ai(e,"DOMError")}function XO(e){return Ai(e,"DOMException")}function Un(e){return Ai(e,"String")}function Bh(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Uh(e){return e===null||Bh(e)||typeof e!="object"&&typeof e!="function"}function yi(e){return Ai(e,"Object")}function $a(e){return typeof Event<"u"&&Ur(e,Event)}function QO(e){return typeof Element<"u"&&Ur(e,Element)}function eD(e){return Ai(e,"RegExp")}function za(e){return!!(e&&e.then&&typeof e.then=="function")}function tD(e){return yi(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Ur(e,t){try{return e instanceof t}catch{return!1}}function fy(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function di(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Vf(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let i=e[r];try{fy(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function nD(e,t,n=!1){return Un(e)?eD(t)?t.test(e):Un(t)?n?e===t:e.includes(t):!1:!1}function qa(e,t=[],n=!1){return t.some(r=>nD(e,r,n))}function rD(e,t,n=250,r,i,o,s){if(!o.exception||!o.exception.values||!s||!Ur(s.originalException,Error))return;let a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=iD(Bc(e,t,i,s.originalException,r,o.exception.values,a,0),n))}function Bc(e,t,n,r,i,o,s,a){if(o.length>=n+1)return o;let l=[...o];if(Ur(r[i],Error)){Bf(s,a);let u=e(t,r[i]),d=l.length;Uf(u,i,d,a),l=Bc(e,t,n,r[i],i,[u,...l],u,d)}return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(Ur(u,Error)){Bf(s,a);let h=e(t,u),v=l.length;Uf(h,`errors[${d}]`,v,a),l=Bc(e,t,n,u,i,[h,...l],h,v)}}),l}function Bf(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=Ye(F(F({},e.mechanism),e.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:t})}function Uf(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=Ye(F({},e.mechanism),{type:"chained",source:t,exception_id:n,parent_id:r})}function iD(e,t){return e.map(n=>(n.value&&(n.value=di(n.value,t)),n))}var Rr="8.18.0",Be=globalThis;function Hh(e,t,n){let r=n||Be,i=r.__SENTRY__=r.__SENTRY__||{},o=i[Rr]=i[Rr]||{};return o[e]||(o[e]=t())}var $h=Be,oD=80;function py(e,t={}){if(!e)return"<unknown>";try{let n=e,r=5,i=[],o=0,s=0,a=" > ",l=a.length,u,d=Array.isArray(t)?t:t.keyAttrs,h=!Array.isArray(t)&&t.maxStringLength||oD;for(;n&&o++<r&&(u=sD(n,d),!(u==="html"||o>1&&s+i.length*l+u.length>=h));)i.push(u),s+=u.length,n=n.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function sD(e,t){let n=e,r=[];if(!n||!n.tagName)return"";if($h.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=t&&t.length?t.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(i&&i.length)i.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let s=n.className;if(s&&Un(s)){let a=s.split(/\s+/);for(let l of a)r.push(`.${l}`)}}let o=["aria-label","type","name","title","alt"];for(let s of o){let a=n.getAttribute(s);a&&r.push(`[${s}="${a}"]`)}return r.join("")}function aD(){try{return $h.document.location.href}catch{return""}}function lD(e){if(!$h.HTMLElement)return null;let t=e,n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}var jo=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,cD="Sentry Logger ",Uc=["debug","info","warn","error","log","assert","trace"],Js={};function zh(e){if(!("console"in Be))return e();let t=Be.console,n={},r=Object.keys(Js);r.forEach(i=>{let o=Js[i];n[i]=t[i],t[i]=o});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function uD(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return jo?Uc.forEach(n=>{t[n]=(...r)=>{e&&zh(()=>{Be.console[n](`${cD}[${n}]:`,...r)})}}):Uc.forEach(n=>{t[n]=()=>{}}),t}var we=uD(),hD=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function dD(e){return e==="http"||e==="https"}function Ga(e,t=!1){let{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${s}`}function fD(e){let t=hD.exec(e);if(!t){zh(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i="",o="",s="",a=""]=t.slice(1),l="",u=a,d=u.split("/");if(d.length>1&&(l=d.slice(0,-1).join("/"),u=d.pop()),u){let h=u.match(/^\d+/);h&&(u=h[0])}return gy({host:o,pass:i,path:l,projectId:u,port:s,protocol:n,publicKey:r})}function gy(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function pD(e){if(!jo)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(we.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?dD(r)?t&&isNaN(parseInt(t,10))?(we.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(we.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(we.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function gD(e){let t=typeof e=="string"?fD(e):gy(e);if(!(!t||!pD(t)))return t}var In=class extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}};function Ct(e,t,n){if(!(t in e))return;let r=e[t],i=n(r);typeof i=="function"&&_y(i,r),e[t]=i}function Hr(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{jo&&we.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function _y(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,Hr(e,"__sentry_original__",t)}catch{}}function qh(e){return e.__sentry_original__}function _D(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function my(e){if(Vh(e))return F({message:e.message,name:e.name,stack:e.stack},$f(e));if($a(e)){let t=F({type:e.type,target:Hf(e.target),currentTarget:Hf(e.currentTarget)},$f(e));return typeof CustomEvent<"u"&&Ur(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Hf(e){try{return QO(e)?py(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function $f(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function mD(e,t=40){let n=Object.keys(my(e));n.sort();let r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return di(r,t);for(let i=n.length;i>0;i--){let o=n.slice(0,i).join(", ");if(!(o.length>t))return i===n.length?o:di(o,t)}return""}function hn(e){return Hc(e,new Map)}function Hc(e,t){if(vD(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let i of Object.keys(e))typeof e[i]<"u"&&(r[i]=Hc(e[i],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(i=>{r.push(Hc(i,t))}),r}return e}function vD(e){if(!yi(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}var $r="?",zf=/\(error: (.*)\)/,qf=/captureMessage|captureException/;function yD(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{let o=[],s=n.split(`
17
+ `);for(let a=r;a<s.length;a++){let l=s[a];if(l.length>1024)continue;let u=zf.test(l)?l.replace(zf,"$1"):l;if(!u.match(/\S*Error: /)){for(let d of t){let h=d(u);if(h){o.push(h);break}}if(o.length>=50+i)break}}return bD(o.slice(i))}}function bD(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(Xo(t).function||"")&&t.pop(),t.reverse(),qf.test(Xo(t).function||"")&&(t.pop(),qf.test(Xo(t).function||"")&&t.pop()),t.slice(0,50).map(n=>Ye(F({},n),{filename:n.filename||Xo(t).filename,function:n.function||$r}))}function Xo(e){return e[e.length-1]||{}}var Pl="<anonymous>";function gr(e){try{return!e||typeof e!="function"?Pl:e.name||Pl}catch{return Pl}}function Gf(e){let t=e.exception;if(t){let n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}var bs={},Wf={};function Yr(e,t){bs[e]=bs[e]||[],bs[e].push(t)}function Kr(e,t){Wf[e]||(t(),Wf[e]=!0)}function gn(e,t){let n=e&&bs[e];if(n)for(let r of n)try{r(t)}catch(i){jo&&we.error(`Error while triggering instrumentation handler.
18
+ Type: ${e}
19
+ Name: ${gr(r)}
20
+ Error:`,i)}}function wD(e){let t="console";Yr(t,e),Kr(t,ED)}function ED(){"console"in Be&&Uc.forEach(function(e){e in Be.console&&Ct(Be.console,e,function(t){return Js[e]=t,function(...n){gn("console",{args:n,level:e});let r=Js[e];r&&r.apply(Be.console,n)}})})}var $c=Be;function xD(){if(!("fetch"in $c))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function zc(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function SD(){if(typeof EdgeRuntime=="string")return!0;if(!xD())return!1;if(zc($c.fetch))return!0;let e=!1,t=$c.document;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=zc(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){jo&&we.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}var vy=1e3;function Fo(){return Date.now()/vy}function CD(){let{performance:e}=Be;if(!e||!e.now)return Fo;let t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/vy}var hr=CD(),Qo,SM=(()=>{let{performance:e}=Be;if(!e||!e.now){Qo="none";return}let t=3600*1e3,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=i<t,s=e.timing&&e.timing.navigationStart,a=typeof s=="number"?Math.abs(s+n-r):t,l=a<t;return o||l?i<=a?(Qo="timeOrigin",e.timeOrigin):(Qo="navigationStart",s):(Qo="dateNow",r)})();function ID(e){let t="fetch";Yr(t,e),Kr(t,TD)}function TD(){SD()&&Ct(Be,"fetch",function(e){return function(...t){let{method:n,url:r}=OD(t),i={args:t,fetchData:{method:n,url:r},startTimestamp:hr()*1e3};gn("fetch",F({},i));let o=new Error().stack;return e.apply(Be,t).then(s=>{let a=Ye(F({},i),{endTimestamp:hr()*1e3,response:s});return gn("fetch",a),s},s=>{let a=Ye(F({},i),{endTimestamp:hr()*1e3,error:s});throw gn("fetch",a),Vh(s)&&s.stack===void 0&&(s.stack=o,Hr(s,"framesToPop",1)),s})}})}function qc(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Zf(e){return typeof e=="string"?e:e?qc(e,"url")?e.url:e.toString?e.toString():"":""}function OD(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[n,r]=e;return{url:Zf(n),method:qc(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:Zf(t),method:qc(t,"method")?String(t.method).toUpperCase():"GET"}}var es=null;function DD(e){let t="error";Yr(t,e),Kr(t,RD)}function RD(){es=Be.onerror,Be.onerror=function(e,t,n,r,i){return gn("error",{column:r,error:i,line:n,msg:e,url:t}),es&&!es.__SENTRY_LOADER__?es.apply(this,arguments):!1},Be.onerror.__SENTRY_INSTRUMENTED__=!0}var ts=null;function ND(e){let t="unhandledrejection";Yr(t,e),Kr(t,PD)}function PD(){ts=Be.onunhandledrejection,Be.onunhandledrejection=function(e){return gn("unhandledrejection",e),ts&&!ts.__SENTRY_LOADER__?ts.apply(this,arguments):!0},Be.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function kD(){return"npm"}function AD(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(i){if(e)return t.has(i)?!0:(t.add(i),!1);for(let o=0;o<t.length;o++)if(t[o]===i)return!0;return t.push(i),!1}function r(i){if(e)t.delete(i);else for(let o=0;o<t.length;o++)if(t[o]===i){t.splice(o,1);break}}return[n,r]}function _n(){let e=Be,t=e.crypto||e.msCrypto,n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{let r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function yy(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function nr(e){let{message:t,event_id:n}=e;if(t)return t;let r=yy(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Gc(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function bo(e,t){let n=yy(e);if(!n)return;let r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism=F(F(F({},r),i),t),t&&"data"in t){let o=F(F({},i&&i.data),t.data);n.mechanism.data=o}}function Yf(e){if(e&&e.__sentry_captured__)return!0;try{Hr(e,"__sentry_captured__",!0)}catch{}return!1}function LD(e){return Array.isArray(e)?e:[e]}function rr(e,t=100,n=1/0){try{return Wc("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function by(e,t=3,n=100*1024){let r=rr(e,t);return VD(r)>n?by(e,t-1,n):r}function Wc(e,t,n=1/0,r=1/0,i=AD()){let[o,s]=i;if(t==null||["number","boolean","string"].includes(typeof t)&&!Number.isNaN(t))return t;let a=MD(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;let l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(l===0)return a.replace("object ","");if(o(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let m=u.toJSON();return Wc("",m,l-1,r,i)}catch{}let d=Array.isArray(t)?[]:{},h=0,v=my(t);for(let m in v){if(!Object.prototype.hasOwnProperty.call(v,m))continue;if(h>=r){d[m]="[MaxProperties ~]";break}let w=v[m];d[m]=Wc(m,w,l-1,r,i),h++}return s(t),d}function MD(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(fy(t))return"[VueViewModel]";if(tD(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${gr(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=jD(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function jD(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function FD(e){return~-encodeURI(e).split(/%..|./).length}function VD(e){return FD(JSON.stringify(e))}var Mn;(function(e){e[e.PENDING=0]="PENDING";let t=1;e[e.RESOLVED=t]="RESOLVED";let n=2;e[e.REJECTED=n]="REJECTED"})(Mn||(Mn={}));function zr(e){return new Vo(t=>{t(e)})}function Xs(e){return new Vo((t,n)=>{n(e)})}var Vo=class xr{constructor(t){xr.prototype.__init.call(this),xr.prototype.__init2.call(this),xr.prototype.__init3.call(this),xr.prototype.__init4.call(this),this._state=Mn.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new xr((r,i)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(s){i(s)}},o=>{if(!n)i(o);else try{r(n(o))}catch(s){i(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new xr((n,r)=>{let i,o;return this.then(s=>{o=!1,i=s,t&&t()},s=>{o=!0,i=s,t&&t()}).then(()=>{if(o){r(i);return}n(i)})})}__init(){this._resolve=t=>{this._setResult(Mn.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Mn.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===Mn.PENDING){if(za(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Mn.PENDING)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Mn.RESOLVED&&n[1](this._value),this._state===Mn.REJECTED&&n[2](this._value),n[0]=!0)})}}};function BD(e){let t=[];function n(){return e===void 0||t.length<e}function r(s){return t.splice(t.indexOf(s),1)[0]||Promise.resolve(void 0)}function i(s){if(!n())return Xs(new In("Not adding Promise because buffer limit was reached."));let a=s();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function o(s){return new Vo((a,l)=>{let u=t.length;if(!u)return a(!0);let d=setTimeout(()=>{s&&s>0&&a(!1)},s);t.forEach(h=>{zr(h).then(()=>{--u||(clearTimeout(d),a(!0))},l)})})}return{$:t,add:i,drain:o}}function kl(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}var UD=["fatal","error","warning","log","info","debug"];function HD(e){return e==="warn"?"warning":UD.includes(e)?e:"log"}var $D="sentry-",zD=/^sentry-/;function qD(e){let t=GD(e);if(!t)return;let n=Object.entries(t).reduce((r,[i,o])=>{if(i.match(zD)){let s=i.slice($D.length);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function GD(e){if(!(!e||!Un(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{let r=Kf(n);return Object.entries(r).forEach(([i,o])=>{t[i]=o}),t},{}):Kf(e)}function Kf(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function Bo(e,t=[]){return[e,t]}function WD(e,t){let[n,r]=e;return[n,[...r,t]]}function Jf(e,t){let n=e[1];for(let r of n){let i=r[0].type;if(t(r,i))return!0}return!1}function Zc(e){return Be.__SENTRY__&&Be.__SENTRY__.encodePolyfill?Be.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function ZD(e){let[t,n]=e,r=JSON.stringify(t);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[Zc(r),o]:r.push(typeof o=="string"?Zc(o):o)}for(let o of n){let[s,a]=o;if(i(`
21
21
  ${JSON.stringify(s)}
22
- `),typeof a=="string"||a instanceof Uint8Array)i(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(Jn(a))}i(l)}}return typeof r=="string"?r:LO(r)}function LO(t){let e=t.reduce((i,o)=>i+o.length,0),n=new Uint8Array(e),r=0;for(let i of t)n.set(i,r),r+=i.length;return n}function MO(t){let e=typeof t.data=="string"?Ic(t.data):t.data;return[cn({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}var VO={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function pd(t){return VO[t]}function Cv(t){if(!t||!t.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function jO(t,e,n,r){let i=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return j(j(j({event_id:t.event_id,sent_at:new Date().toISOString()},e&&{sdk:e}),!!n&&r&&{dsn:Ta(r)}),i&&{trace:cn(j({},i))})}function FO(t,e,n){let r=[{type:"client_report"},{timestamp:n||Io(),discarded_events:t}];return Oo(e?{dsn:e}:{},[r])}function BO(t,e=Date.now()){let n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${t}`);return isNaN(r)?6e4:r-e}function UO(t,e){return t[e]||t.all||0}function HO(t,e,n=Date.now()){return UO(t,e)>n}function $O(t,{statusCode:e,headers:n},r=Date.now()){let i=j({},t),o=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(o)for(let a of o.trim().split(",")){let[l,u,,,f]=a.split(":",5),d=parseInt(l,10),_=(isNaN(d)?60:d)*1e3;if(!u)i.all=r+_;else for(let y of u.split(";"))y==="metric_bucket"?(!f||f.split(";").includes("custom"))&&(i[y]=r+_):i[y]=r+_}else s?i.all=r+BO(s,r):e===429&&(i.all=r+60*1e3);return i}function gd(){return{traceId:pn(),spanId:pn().substring(16)}}var $o=Ft;function zO(){let t=$o.chrome,e=t&&t.app&&t.app.runtime,n="history"in $o&&!!$o.history.pushState&&!!$o.history.replaceState;return!e&&n}var ie=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Oa(){return _h(Ft),Ft}function _h(t){let e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||Er,e[Er]=e[Er]||{}}function Tc(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||or(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:pn()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{let n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}var Oc="_sentrySpan";function md(t,e){e?Ar(t,Oc,e):delete t[Oc]}function _d(t){return t[Oc]}var qO=100,GO=class Iv{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=gd()}clone(){let e=new Iv;return e._breadcrumbs=[...this._breadcrumbs],e._tags=j({},this._tags),e._extra=j({},this._extra),e._contexts=j({},this._contexts),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata=j({},this._sdkProcessingMetadata),e._propagationContext=j({},this._propagationContext),e._client=this._client,e._lastEventId=this._lastEventId,md(e,_d(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Tc(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags=j(j({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,n){return this._tags=Zt(j({},this._tags),{[e]:n}),this._notifyScopeListeners(),this}setExtras(e){return this._extra=j(j({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,n){return this._extra=Zt(j({},this._extra),{[e]:n}),this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts[e]=n,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let n=typeof e=="function"?e(this):e,[r,i]=n instanceof Hn?[n.getScopeData(),n.getRequestSession()]:hi(n)?[e,e.requestSession]:[],{tags:o,extra:s,user:a,contexts:l,level:u,fingerprint:f=[],propagationContext:d}=r||{};return this._tags=j(j({},this._tags),o),this._extra=j(j({},this._extra),s),this._contexts=j(j({},this._contexts),l),a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),f.length&&(this._fingerprint=f),d&&(this._propagationContext=d),i&&(this._requestSession=i),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,md(this,void 0),this._attachments=[],this._propagationContext=gd(),this._notifyScopeListeners(),this}addBreadcrumb(e,n){let r=typeof n=="number"?n:qO;if(r<=0)return this;let i=j({timestamp:Io()},e),o=this._breadcrumbs;return o.push(i),this._breadcrumbs=o.length>r?o.slice(-r):o,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:_d(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=j(j({},this._sdkProcessingMetadata),e),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){let r=n&&n.event_id?n.event_id:pn();if(!this._client)return wt.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(e,Zt(j({originalException:e,syntheticException:i},n),{event_id:r}),this),r}captureMessage(e,n,r){let i=r&&r.event_id?r.event_id:pn();if(!this._client)return wt.warn("No client configured on scope - will not capture message!"),i;let o=new Error(e);return this._client.captureMessage(e,n,Zt(j({originalException:e,syntheticException:o},r),{event_id:i}),this),i}captureEvent(e,n){let r=n&&n.event_id?n.event_id:pn();return this._client?(this._client.captureEvent(e,Zt(j({},n),{event_id:r}),this),r):(wt.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}},Hn=GO;function WO(){return dh("defaultCurrentScope",()=>new Hn)}function ZO(){return dh("defaultIsolationScope",()=>new Hn)}var YO=class{constructor(t,e){let n;t?n=t:n=new Hn;let r;e?r=e:r=new Hn,this._stack=[{scope:n}],this._isolationScope=r}withScope(t){let e=this._pushScope(),n;try{n=t(e)}catch(r){throw this._popScope(),r}return Ca(n)?n.then(r=>(this._popScope(),r),r=>{throw this._popScope(),r}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function fi(){let t=Oa(),e=_h(t);return e.stack=e.stack||new YO(WO(),ZO())}function KO(t){return fi().withScope(t)}function XO(t,e){let n=fi();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function vd(t){return fi().withScope(()=>t(fi().getIsolationScope()))}function JO(){return{withIsolationScope:vd,withScope:KO,withSetScope:XO,withSetIsolationScope:(t,e)=>vd(e),getCurrentScope:()=>fi().getScope(),getIsolationScope:()=>fi().getIsolationScope()}}function vh(t){let e=_h(t);return e.acs?e.acs:JO()}function yh(){let t=Oa();return vh(t).getCurrentScope()}function Tv(){let t=Oa();return vh(t).getIsolationScope()}function QO(){return dh("globalScope",()=>new Hn)}function tD(...t){let e=Oa(),n=vh(e);if(t.length===2){let[r,i]=t;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(t[0])}function Ge(){return yh().getClient()}var eD="_sentryMetrics";function nD(t){let e=t[eD];if(!e)return;let n={};for(let[,[r,i]]of e)(n[r]||(n[r]=[])).push(cn(i));return n}var rD="sentry.source",iD="sentry.sample_rate",oD="sentry.op",sD="sentry.origin",aD=1;function lD(t){let{spanId:e,traceId:n}=t.spanContext(),{parent_span_id:r}=js(t);return cn({parent_span_id:r,span_id:e,trace_id:n})}function yd(t){return typeof t=="number"?bd(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?bd(t.getTime()):or()}function bd(t){return t>9999999999?t/1e3:t}function js(t){if(uD(t))return t.getSpanJSON();try{let{spanId:e,traceId:n}=t.spanContext();if(cD(t)){let{attributes:r,startTime:i,name:o,endTime:s,parentSpanId:a,status:l}=t;return cn({span_id:e,trace_id:n,data:r,description:o,parent_span_id:a,start_timestamp:yd(i),timestamp:yd(s)||void 0,status:fD(l),op:r[oD],origin:r[sD],_metrics_summary:nD(t)})}return{span_id:e,trace_id:n}}catch{return{}}}function cD(t){let e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function uD(t){return typeof t.getSpanJSON=="function"}function hD(t){let{traceFlags:e}=t.spanContext();return e===aD}function fD(t){if(!(!t||t.code===0))return t.code===1?"ok":t.message||"unknown_error"}var dD="_sentryRootSpan";function Ov(t){return t[dD]||t}var Dv="production",pD="_frozenDsc";function Rv(t,e){let n=e.getOptions(),{publicKey:r}=e.getDsn()||{},i=cn({environment:n.environment||Dv,release:n.release,public_key:r,trace_id:t});return e.emit("createDsc",i),i}function gD(t){let e=Ge();if(!e)return{};let n=Rv(js(t).trace_id||"",e),r=Ov(t),i=r[pD];if(i)return i;let o=r.spanContext().traceState,s=o&&o.get("sentry.dsc"),a=s&&NO(s);if(a)return a;let l=js(r),u=l.data||{},f=u[iD];f!=null&&(n.sample_rate=`${f}`);let d=u[rD],_=l.description;return d!=="url"&&_&&(n.transaction=_),n.sampled=String(hD(r)),e.emit("createDsc",n,r),n}function mD(t){if(typeof t=="boolean")return Number(t);let e=typeof t=="string"?parseFloat(t):t;if(typeof e!="number"||isNaN(e)||e<0||e>1){ie&&wt.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`);return}return e}function _D(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function vD(t,e,n,r){let i=Cv(n),o=j(j({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&e&&{dsn:Ta(e)}),s="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return Oo(o,[s])}function yD(t,e,n,r){let i=Cv(n),o=t.type&&t.type!=="replay_event"?t.type:"event";_D(t,n&&n.sdk);let s=jO(t,i,r,e);return delete t.sdkProcessingMetadata,Oo(s,[[{type:o},t]])}function Dc(t,e,n,r=0){return new To((i,o)=>{let s=t[r];if(e===null||typeof s!="function")i(e);else{let a=s(j({},e),n);ie&&s.id&&a===null&&wt.log(`Event processor "${s.id}" dropped event`),Ca(a)?a.then(l=>Dc(t,l,n,r+1).then(i)).then(null,o):Dc(t,a,n,r+1).then(i).then(null,o)}})}function bD(t,e){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=e;wD(t,e),r&&SD(t,r),CD(t,n),ED(t,i),xD(t,o)}function wd(t,e){let{extra:n,tags:r,user:i,contexts:o,level:s,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:u,eventProcessors:f,attachments:d,propagationContext:_,transactionName:y,span:x}=e;Di(t,"extra",n),Di(t,"tags",r),Di(t,"user",i),Di(t,"contexts",o),Di(t,"sdkProcessingMetadata",a),s&&(t.level=s),y&&(t.transactionName=y),x&&(t.span=x),l.length&&(t.breadcrumbs=[...t.breadcrumbs,...l]),u.length&&(t.fingerprint=[...t.fingerprint,...u]),f.length&&(t.eventProcessors=[...t.eventProcessors,...f]),d.length&&(t.attachments=[...t.attachments,...d]),t.propagationContext=j(j({},t.propagationContext),_)}function Di(t,e,n){if(n&&Object.keys(n).length){t[e]=j({},t[e]);for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[e][r]=n[r])}}function wD(t,e){let{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:a}=e,l=cn(n);l&&Object.keys(l).length&&(t.extra=j(j({},l),t.extra));let u=cn(r);u&&Object.keys(u).length&&(t.tags=j(j({},u),t.tags));let f=cn(i);f&&Object.keys(f).length&&(t.user=j(j({},f),t.user));let d=cn(o);d&&Object.keys(d).length&&(t.contexts=j(j({},d),t.contexts)),s&&(t.level=s),a&&t.type!=="transaction"&&(t.transaction=a)}function ED(t,e){let n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function xD(t,e){t.sdkProcessingMetadata=j(j({},t.sdkProcessingMetadata),e)}function SD(t,e){t.contexts=j({trace:lD(e)},t.contexts),t.sdkProcessingMetadata=j({dynamicSamplingContext:gD(e)},t.sdkProcessingMetadata);let n=Ov(e),r=js(n).description;r&&!t.transaction&&t.type==="transaction"&&(t.transaction=r)}function CD(t,e){t.fingerprint=t.fingerprint?wO(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}function ID(t,e,n,r,i,o){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=t,l=Zt(j({},e),{event_id:e.event_id||n.event_id||pn(),timestamp:e.timestamp||Io()}),u=n.integrations||t.integrations.map(I=>I.name);TD(l,t),RD(l,u),i&&i.emit("applyFrameMetadata",e),e.type===void 0&&OD(l,t.stackParser);let f=PD(r,n.captureContext);n.mechanism&&so(l,n.mechanism);let d=i?i.getEventProcessors():[],_=QO().getScopeData();if(o){let I=o.getScopeData();wd(_,I)}if(f){let I=f.getScopeData();wd(_,I)}let y=[...n.attachments||[],..._.attachments];y.length&&(n.attachments=y),bD(l,_);let x=[...d,..._.eventProcessors];return Dc(x,l,n).then(I=>(I&&DD(I),typeof s=="number"&&s>0?ND(I,s,a):I))}function TD(t,e){let{environment:n,release:r,dist:i,maxValueLength:o=250}=e;"environment"in t||(t.environment="environment"in e?n:Dv),t.release===void 0&&r!==void 0&&(t.release=r),t.dist===void 0&&i!==void 0&&(t.dist=i),t.message&&(t.message=oi(t.message,o));let s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=oi(s.value,o));let a=t.request;a&&a.url&&(a.url=oi(a.url,o))}var Ed=new WeakMap;function OD(t,e){let n=Ft._sentryDebugIds;if(!n)return;let r,i=Ed.get(e);i?r=i:(r=new Map,Ed.set(e,r));let o=Object.entries(n).reduce((s,[a,l])=>{let u,f=r.get(a);f?u=f:(u=e(a),r.set(a,u));for(let d=u.length-1;d>=0;d--){let _=u[d];if(_.filename){s[_.filename]=l;break}}return s},{});try{t.exception.values.forEach(s=>{s.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=o[a.filename])})})}catch{}}function DD(t){let e={};try{t.exception.values.forEach(r=>{r.stacktrace.frames.forEach(i=>{i.debug_id&&(i.abs_path?e[i.abs_path]=i.debug_id:i.filename&&(e[i.filename]=i.debug_id),delete i.debug_id)})})}catch{}if(Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];let n=t.debug_meta.images;Object.entries(e).forEach(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function RD(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function ND(t,e,n){if(!t)return null;let r=j(j(j(j(j({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(i=>j(j({},i),i.data&&{data:Jn(i.data,e,n)}))}),t.user&&{user:Jn(t.user,e,n)}),t.contexts&&{contexts:Jn(t.contexts,e,n)}),t.extra&&{extra:Jn(t.extra,e,n)});return t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=Jn(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(i=>j(j({},i),i.data&&{data:Jn(i.data,e,n)}))),r}function PD(t,e){if(!e)return t;let n=t?t.clone():new Hn;return n.update(e),n}function kD(t){if(t)return AD(t)?{captureContext:t}:MD(t)?{captureContext:t}:t}function AD(t){return t instanceof Hn||typeof t=="function"}var LD=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function MD(t){return Object.keys(t).some(e=>LD.includes(e))}function VD(t,e){return yh().captureException(t,kD(e))}function Nv(t,e){return yh().captureEvent(t,e)}var jD="7";function FD(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function BD(t){return`${FD(t)}${t.projectId}/envelope/`}function UD(t,e){return nO(j({sentry_key:t.publicKey,sentry_version:jD},e&&{sentry_client:`${e.name}/${e.version}`}))}function HD(t,e,n){return e||`${BD(t)}?${UD(t,n)}`}var xd=[];function $D(t,e){let n={};return e.forEach(r=>{r&&Pv(t,r,n)}),n}function Sd(t,e){for(let n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function Pv(t,e,n){if(n[e.name]){ie&&wt.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,xd.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),xd.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){let r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(i,o)=>r(i,o,t))}if(typeof e.processEvent=="function"){let r=e.processEvent.bind(e),i=Object.assign((o,s)=>r(o,s,t),{id:e.name});t.addEventProcessor(i)}ie&&wt.log(`Integration installed: ${e.name}`)}var Cd="Not capturing exception because it's already been captured.",zD=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=eO(t.dsn):ie&&wt.warn("No DSN provided, client will not send events."),this._dsn){let e=HD(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport(Zt(j({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},t.transportOptions),{url:e}))}}captureException(t,e,n){let r=pn();if(hd(t))return ie&&wt.log(Cd),r;let i=j({event_id:r},e);return this._process(this.eventFromException(t,i).then(o=>this._captureEvent(o,i,n))),i.event_id}captureMessage(t,e,n,r){let i=j({event_id:pn()},n),o=hh(t)?t:String(t),s=fh(t)?this.eventFromMessage(o,e,i):this.eventFromException(t,i);return this._process(s.then(a=>this._captureEvent(a,i,r))),i.event_id}captureEvent(t,e,n){let r=pn();if(e&&e.originalException&&hd(e.originalException))return ie&&wt.log(Cd),r;let i=j({event_id:r},e),o=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,i,o||n)),i.event_id}captureSession(t){typeof t.release!="string"?ie&&wt.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Tc(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){let e=this._transport;return e?(this.emit("flush"),this._isClientDoneProcessing(t).then(n=>e.flush(t).then(r=>n&&r))):Mr(!0)}close(t){return this.flush(t).then(e=>(this.getOptions().enabled=!1,this.emit("close"),e))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){let e=this._integrations[t.name];Pv(this,t,this._integrations),e||Sd(this,[t])}sendEvent(t,e={}){this.emit("beforeSendEvent",t,e);let n=yD(t,this._dsn,this._options._metadata,this._options.tunnel);for(let i of e.attachments||[])n=kO(n,MO(i));let r=this.sendEnvelope(n);r&&r.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){let e=vD(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(e)}recordDroppedEvent(t,e,n){if(this._options.sendClientReports){let r=`${t}:${e}`;ie&&wt.log(`Adding outcome: "${r}"`),this._outcomes[r]=(this._outcomes[r]||0)+1}}on(t,e){let n=this._hooks[t]=this._hooks[t]||[];return n.push(e),()=>{let r=n.indexOf(e);r>-1&&n.splice(r,1)}}emit(t,...e){let n=this._hooks[t];n&&n.forEach(r=>r(...e))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,e=>(ie&&wt.error("Error while sending event:",e),e)):(ie&&wt.error("Transport disabled"),Mr({}))}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=$D(this,t),Sd(this,t)}_updateSessionFromEvent(t,e){let n=!1,r=!1,i=e.exception&&e.exception.values;if(i){r=!0;for(let s of i){let a=s.mechanism;if(a&&a.handled===!1){n=!0;break}}}let o=t.status==="ok";(o&&t.errors===0||o&&n)&&(Tc(t,Zt(j({},n&&{status:"crashed"}),{errors:t.errors||Number(r||n)})),this.captureSession(t))}_isClientDoneProcessing(t){return new To(e=>{let n=0,r=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),e(!0)):(n+=r,t&&n>=t&&(clearInterval(i),e(!1)))},r)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,e,n,r=Tv()){let i=this.getOptions(),o=Object.keys(this._integrations);return!e.integrations&&o.length>0&&(e.integrations=o),this.emit("preprocessEvent",t,e),t.type||r.setLastEventId(t.event_id||e.event_id),ID(i,t,e,n,this,r).then(s=>{if(s===null)return s;let a=j(j({},r.getPropagationContext()),n?n.getPropagationContext():void 0);if(!(s.contexts&&s.contexts.trace)&&a){let{traceId:l,spanId:u,parentSpanId:f,dsc:d}=a;s.contexts=j({trace:cn({trace_id:l,span_id:u,parent_span_id:f})},s.contexts);let _=d||Rv(l,this);s.sdkProcessingMetadata=j({dynamicSamplingContext:_},s.sdkProcessingMetadata)}return s})}_captureEvent(t,e={},n){return this._processEvent(t,e,n).then(r=>r.event_id,r=>{if(ie){let i=r;i.logLevel==="log"?wt.log(i.message):wt.warn(i)}})}_processEvent(t,e,n){let r=this.getOptions(),{sampleRate:i}=r,o=Rc(t),s=kv(t),a=t.type||"error",l=`before send for type \`${a}\``,u=typeof i>"u"?void 0:mD(i);if(s&&typeof u=="number"&&Math.random()>u)return this.recordDroppedEvent("sample_rate","error",t),Vs(new xn(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let f=a==="replay_event"?"replay":a,d=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,e,n,d).then(_=>{if(_===null)throw this.recordDroppedEvent("event_processor",f,t),new xn("An event processor returned `null`, will not send event.","log");if(e.data&&e.data.__sentry__===!0)return _;let y=GD(this,r,_,e);return qD(y,l)}).then(_=>{if(_===null){if(this.recordDroppedEvent("before_send",f,t),Rc(t)){let I=1+(t.spans||[]).length;this._outcomes.span=(this._outcomes.span||0)+I}throw new xn(`${l} returned \`null\`, will not send event.`,"log")}let y=n&&n.getSession();!o&&y&&this._updateSessionFromEvent(y,_);let x=_.transaction_info;if(o&&x&&_.transaction!==t.transaction){let I="custom";_.transaction_info=Zt(j({},x),{source:I})}return this.sendEvent(_,e),_}).then(null,_=>{throw _ instanceof xn?_:(this.captureException(_,{data:{__sentry__:!0},originalException:_}),new xn(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
23
- Reason: ${_}`))})}_process(t){this._numProcessing++,t.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.entries(t).map(([e,n])=>{let[r,i]=e.split(":");return{reason:r,category:i,quantity:n}})}};function qD(t,e){let n=`${e} must return \`null\` or a valid event.`;if(Ca(t))return t.then(r=>{if(!hi(r)&&r!==null)throw new xn(n);return r},r=>{throw new xn(`${e} rejected with ${r}`)});if(!hi(t)&&t!==null)throw new xn(n);return t}function GD(t,e,n,r){let{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:s}=e;if(kv(n)&&i)return i(n,r);if(Rc(n)){if(n.spans&&s){let a=[];for(let l of n.spans){let u=s(l);u?a.push(u):t.recordDroppedEvent("before_send","span")}n.spans=a}if(o)return o(n,r)}return n}function kv(t){return t.type===void 0}function Rc(t){return t.type==="transaction"}var WD=64;function ZD(t,e,n=IO(t.bufferSize||WD)){let r={},i=s=>n.drain(s);function o(s){let a=[];if(dd(s,(d,_)=>{let y=pd(_);if(HO(r,y)){let x=Id(d,_);t.recordDroppedEvent("ratelimit_backoff",y,x)}else a.push(d)}),a.length===0)return Mr({});let l=Oo(s[0],a),u=d=>{dd(l,(_,y)=>{let x=Id(_,y);t.recordDroppedEvent(d,pd(y),x)})},f=()=>e({body:AO(l)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&ie&&wt.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=$O(r,d),d),d=>{throw u("network_error"),d});return n.add(f).then(d=>d,d=>{if(d instanceof xn)return ie&&wt.error("Skipped sending event because buffer is full."),u("queue_overflow"),Mr({});throw d})}return{send:o,flush:i}}function Id(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}function YD(t,e,n=[e],r="npm"){let i=t._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${e}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:Er})),version:Er}),t._metadata=i}var KD=100;function Vr(t,e){let n=Ge(),r=Tv();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=KD}=n.getOptions();if(o<=0)return;let s=Io(),a=j({timestamp:s},t),l=i?gh(()=>i(a,e)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,e),r.addBreadcrumb(l,o))}var Td,XD="FunctionToString",Od=new WeakMap,JD=()=>({name:XD,setupOnce(){Td=Function.prototype.toString;try{Function.prototype.toString=function(...t){let e=mh(this),n=Od.has(Ge())&&e!==void 0?e:this;return Td.apply(n,t)}}catch{}},setup(t){Od.set(t,!0)}}),QD=JD,tR=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],eR="InboundFilters",nR=(t={})=>({name:eR,processEvent(e,n,r){let i=r.getOptions(),o=iR(t,i);return oR(e,o)?null:e}}),rR=nR;function iR(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:tR],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function oR(t,e){return e.ignoreInternal&&hR(t)?(ie&&wt.warn(`Event dropped due to being internal Sentry Error.
24
- Event: ${Xn(t)}`),!0):sR(t,e.ignoreErrors)?(ie&&wt.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
25
- Event: ${Xn(t)}`),!0):dR(t)?(ie&&wt.warn(`Event dropped due to not having an error message, error type or stacktrace.
26
- Event: ${Xn(t)}`),!0):aR(t,e.ignoreTransactions)?(ie&&wt.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
27
- Event: ${Xn(t)}`),!0):lR(t,e.denyUrls)?(ie&&wt.warn(`Event dropped due to being matched by \`denyUrls\` option.
28
- Event: ${Xn(t)}.
29
- Url: ${Fs(t)}`),!0):cR(t,e.allowUrls)?!1:(ie&&wt.warn(`Event dropped due to not being matched by \`allowUrls\` option.
30
- Event: ${Xn(t)}.
31
- Url: ${Fs(t)}`),!0)}function sR(t,e){return t.type||!e||!e.length?!1:uR(t).some(n=>Ia(n,e))}function aR(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;let n=t.transaction;return n?Ia(n,e):!1}function lR(t,e){if(!e||!e.length)return!1;let n=Fs(t);return n?Ia(n,e):!1}function cR(t,e){if(!e||!e.length)return!0;let n=Fs(t);return n?Ia(n,e):!0}function uR(t){let e=[];t.message&&e.push(t.message);let n;try{n=t.exception.values[t.exception.values.length-1]}catch{}return n&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`)),e}function hR(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function fR(t=[]){for(let e=t.length-1;e>=0;e--){let n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Fs(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?fR(e):null}catch{return ie&&wt.error(`Cannot extract url for event ${Xn(t)}`),null}}function dR(t){return t.type||!t.exception||!t.exception.values||t.exception.values.length===0?!1:!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value)}var pR="Dedupe",gR=()=>{let t;return{name:pR,processEvent(e){if(e.type)return e;try{if(_R(e,t))return ie&&wt.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},mR=gR;function _R(t,e){return e?!!(vR(t,e)||yR(t,e)):!1}function vR(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Lv(t,e)||!Av(t,e))}function yR(t,e){let n=Dd(e),r=Dd(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Lv(t,e)||!Av(t,e))}function Av(t,e){let n=ld(t),r=ld(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){let o=r[i],s=n[i];if(o.filename!==s.filename||o.lineno!==s.lineno||o.colno!==s.colno||o.function!==s.function)return!1}return!0}function Lv(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Dd(t){return t.exception&&t.exception.values&&t.exception.values[0]}var we=Ft,Nc=0;function Mv(){return Nc>0}function bR(){Nc++,setTimeout(()=>{Nc--})}function di(t,e={},n){if(typeof t!="function")return t;try{let i=t.__sentry_wrapped__;if(i)return i;if(mh(t))return t}catch{return t}let r=function(){let i=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let o=i.map(s=>di(s,e));return t.apply(this,o)}catch(o){throw bR(),tD(s=>{s.addEventProcessor(a=>(e.mechanism&&(Sc(a,void 0,void 0),so(a,e.mechanism)),a.extra=Zt(j({},a.extra),{arguments:i}),a)),VD(o)}),o}};try{for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}catch{}bv(r,t),Ar(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}var Jr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function bh(t,e){let n=wh(t,e),r={type:e&&e.name,value:CR(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function wR(t,e,n,r){let i=Ge(),o=i&&i.getOptions().normalizeDepth,s=RR(e),a={__serialized__:Sv(e,o)};if(s)return{exception:{values:[bh(t,s)]},extra:a};let l={exception:{values:[{type:Sa(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:OR(e,{isUnhandledRejection:r})}]},extra:a};if(n){let u=wh(t,n);u.length&&(l.exception.values[0].stacktrace={frames:u})}return l}function gl(t,e){return{exception:{values:[bh(t,e)]}}}function wh(t,e){let n=e.stacktrace||e.stack||"",r=xR(e),i=SR(e);try{return t(n,r,i)}catch{}return[]}var ER=/Minified React error #\d+;/i;function xR(t){return t&&ER.test(t.message)?1:0}function SR(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function CR(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function IR(t,e,n,r){let i=n&&n.syntheticException||void 0,o=Eh(t,e,i,r);return so(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),Mr(o)}function TR(t,e,n="info",r,i){let o=r&&r.syntheticException||void 0,s=Pc(t,e,o,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),Mr(s)}function Eh(t,e,n,r,i){let o;if(mv(e)&&e.error)return gl(t,e.error);if(td(e)||jT(e)){let s=e;if("stack"in e)o=gl(t,e);else{let a=s.name||(td(s)?"DOMError":"DOMException"),l=s.message?`${a}: ${s.message}`:a;o=Pc(t,l,n,r),Sc(o,l)}return"code"in s&&(o.tags=Zt(j({},o.tags),{"DOMException.code":`${s.code}`})),o}return uh(e)?gl(t,e):hi(e)||Sa(e)?(o=wR(t,e,n,i),so(o,{synthetic:!0}),o):(o=Pc(t,e,n,r),Sc(o,`${e}`,void 0),so(o,{synthetic:!0}),o)}function Pc(t,e,n,r){let i={};if(r&&n){let o=wh(t,n);o.length&&(i.exception={values:[{value:e,stacktrace:{frames:o}}]})}if(hh(e)){let{__sentry_template_string__:o,__sentry_template_values__:s}=e;return i.logentry={message:o,params:s},i}return i.message=e,i}function OR(t,{isUnhandledRejection:e}){let n=rO(t),r=e?"promise rejection":"exception";return mv(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:Sa(t)?`Event \`${DR(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function DR(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function RR(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let n=t[e];if(n instanceof Error)return n}}function NR(t,{metadata:e,tunnel:n,dsn:r}){let i=j(j({event_id:t.event_id,sent_at:new Date().toISOString()},e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}}),!!n&&!!r&&{dsn:Ta(r)}),o=PR(t);return Oo(i,[o])}function PR(t){return[{type:"user_report"},t]}var kR=class extends zD{constructor(t){let e=j({parentSpanIsAlwaysRootSpan:!0},t),n=we.SENTRY_SDK_SOURCE||yO();YD(e,"browser",["browser"],n),super(e),e.sendClientReports&&we.document&&we.document.addEventListener("visibilitychange",()=>{we.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,e){return IR(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t,e="info",n){return TR(this._options.stackParser,t,e,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){Jr&&wt.warn("SDK not enabled, will not capture user feedback.");return}let e=NR(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(e)}_prepareEvent(t,e,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,e,n)}_flushOutcomes(){let t=this._clearOutcomes();if(t.length===0){Jr&&wt.log("No outcomes to send");return}if(!this._dsn){Jr&&wt.log("No dsn provided, will not send outcomes");return}Jr&&wt.log("Sending outcomes:",t);let e=FO(t,this._options.tunnel&&Ta(this._dsn));this.sendEnvelope(e)}},AR=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Se=Ft,LR=1e3,Rd,kc,Ac;function MR(t){let e="dom";Hr(e,t),$r(e,VR)}function VR(){if(!Se.document)return;let t=dn.bind(null,"dom"),e=Nd(t,!0);Se.document.addEventListener("click",e,!1),Se.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{let r=Se[n]&&Se[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(xe(r,"addEventListener",function(i){return function(o,s,a){if(o==="click"||o=="keypress")try{let l=this,u=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},f=u[o]=u[o]||{refCount:0};if(!f.handler){let d=Nd(t);f.handler=d,i.call(this,o,d,a)}f.refCount++}catch{}return i.call(this,o,s,a)}}),xe(r,"removeEventListener",function(i){return function(o,s,a){if(o==="click"||o=="keypress")try{let l=this,u=l.__sentry_instrumentation_handlers__||{},f=u[o];f&&(f.refCount--,f.refCount<=0&&(i.call(this,o,f.handler,a),f.handler=void 0,delete u[o]),Object.keys(u).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return i.call(this,o,s,a)}}))})}function jR(t){if(t.type!==kc)return!1;try{if(!t.target||t.target._sentryId!==Ac)return!1}catch{}return!0}function FR(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function Nd(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;let r=BR(n);if(FR(n.type,r))return;Ar(n,"_sentryCaptured",!0),r&&!r._sentryId&&Ar(r,"_sentryId",pn());let i=n.type==="keypress"?"input":n.type;jR(n)||(t({event:n,name:i,global:e}),kc=n.type,Ac=r?r._sentryId:void 0),clearTimeout(Rd),Rd=Se.setTimeout(()=>{Ac=void 0,kc=void 0},LR)}}function BR(t){try{return t.target}catch{return null}}var zo;function UR(t){let e="history";Hr(e,t),$r(e,HR)}function HR(){if(!zO())return;let t=Se.onpopstate;Se.onpopstate=function(...n){let r=Se.location.href,i=zo;if(zo=r,dn("history",{from:i,to:r}),t)try{return t.apply(this,n)}catch{}};function e(n){return function(...r){let i=r.length>2?r[2]:void 0;if(i){let o=zo,s=String(i);zo=s,dn("history",{from:o,to:s})}return n.apply(this,r)}}xe(Se.history,"pushState",e),xe(Se.history,"replaceState",e)}var as={};function $R(t){let e=as[t];if(e)return e;let n=Se[t];if(Ec(n))return as[t]=n.bind(Se);let r=Se.document;if(r&&typeof r.createElement=="function")try{let i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);let o=i.contentWindow;o&&o[t]&&(n=o[t]),r.head.removeChild(i)}catch(i){AR&&wt.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,i)}return n&&(as[t]=n.bind(Se))}function Pd(t){as[t]=void 0}var Vi="__sentry_xhr_v3__";function zR(t){let e="xhr";Hr(e,t),$r(e,qR)}function qR(){if(!Se.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;xe(t,"open",function(e){return function(...n){let r=or()*1e3,i=Mn(n[0])?n[0].toUpperCase():void 0,o=GR(n[1]);if(!i||!o)return e.apply(this,n);this[Vi]={method:i,url:o,request_headers:{}},i==="POST"&&o.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let s=()=>{let a=this[Vi];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}let l={endTimestamp:or()*1e3,startTimestamp:r,xhr:this};dn("xhr",l)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?xe(this,"onreadystatechange",function(a){return function(...l){return s(),a.apply(this,l)}}):this.addEventListener("readystatechange",s),xe(this,"setRequestHeader",function(a){return function(...l){let[u,f]=l,d=this[Vi];return d&&Mn(u)&&Mn(f)&&(d.request_headers[u.toLowerCase()]=f),a.apply(this,l)}}),e.apply(this,n)}}),xe(t,"send",function(e){return function(...n){let r=this[Vi];if(!r)return e.apply(this,n);n[0]!==void 0&&(r.body=n[0]);let i={startTimestamp:or()*1e3,xhr:this};return dn("xhr",i),e.apply(this,n)}})}function GR(t){if(Mn(t))return t;try{return t.toString()}catch{}}function WR(t,e=$R("fetch")){let n=0,r=0;function i(o){let s=o.body.length;n+=s,r++;let a=j({body:o.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15},t.fetchOptions);if(!e)return Pd("fetch"),Vs("No fetch implementation available");try{return e(t.url,a).then(l=>(n-=s,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return Pd("fetch"),n-=s,r--,Vs(l)}}return ZD(t,i)}var ZR=30,YR=50;function Lc(t,e,n,r){let i={filename:t,function:e==="<anonymous>"?Lr:e,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var KR=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,XR=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,JR=/\((\S*)(?::(\d+))(?::(\d+))\)/,QR=t=>{let e=KR.exec(t);if(e){let[,r,i,o]=e;return Lc(r,Lr,+i,+o)}let n=XR.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){let o=JR.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}let[r,i]=Vv(n[1]||Lr,n[2]);return Lc(i,r,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},t2=[ZR,QR],e2=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,n2=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,r2=t=>{let e=e2.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let i=n2.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let n=e[3],r=e[1]||Lr;return[r,n]=Vv(r,n),Lc(n,r,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},i2=[YR,r2],o2=[t2,i2],s2=oO(...o2),Vv=(t,e)=>{let n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:Lr,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},qo=1024,a2="Breadcrumbs",l2=(t={})=>{let e=j({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:a2,setup(n){e.console&&aO(f2(n)),e.dom&&MR(h2(n,e.dom)),e.xhr&&zR(d2(n)),e.fetch&&fO(p2(n)),e.history&&UR(g2(n)),e.sentry&&n.on("beforeSendEvent",u2(n))}}},c2=l2;function u2(t){return function(e){Ge()===t&&Vr({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:Xn(e)},{event:e})}}function h2(t,e){return function(n){if(Ge()!==t)return;let r,i,o=typeof e=="object"?e.serializeAttribute:void 0,s=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;s&&s>qo&&(Jr&&wt.warn(`\`dom.maxStringLength\` cannot exceed ${qo}, but a value of ${s} was configured. Sentry will use ${qo} instead.`),s=qo),typeof o=="string"&&(o=[o]);try{let l=n.event,u=m2(l)?l.target:l;r=vv(u,{keyAttrs:o,maxStringLength:s}),i=ZT(u)}catch{r="<unknown>"}if(r.length===0)return;let a={category:`ui.${n.name}`,message:r};i&&(a.data={"ui.component_name":i}),Vr(a,{event:n.event,name:n.name,global:n.global})}}function f2(t){return function(e){if(Ge()!==t)return;let n={category:"console",data:{arguments:e.args,logger:"console"},level:OO(e.level),message:ed(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)n.message=`Assertion failed: ${ed(e.args.slice(1)," ")||"console.assert"}`,n.data.arguments=e.args.slice(1);else return;Vr(n,{input:e.args,level:e.level})}}function d2(t){return function(e){if(Ge()!==t)return;let{startTimestamp:n,endTimestamp:r}=e,i=e.xhr[Vi];if(!n||!r||!i)return;let{method:o,url:s,status_code:a,body:l}=i,u={method:o,url:s,status_code:a},f={xhr:e.xhr,input:l,startTimestamp:n,endTimestamp:r};Vr({category:"xhr",data:u,type:"http"},f)}}function p2(t){return function(e){if(Ge()!==t)return;let{startTimestamp:n,endTimestamp:r}=e;if(r&&!(e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"))if(e.error){let i=e.fetchData,o={data:e.error,input:e.args,startTimestamp:n,endTimestamp:r};Vr({category:"fetch",data:i,level:"error",type:"http"},o)}else{let i=e.response,o=Zt(j({},e.fetchData),{status_code:i&&i.status}),s={input:e.args,response:i,startTimestamp:n,endTimestamp:r};Vr({category:"fetch",data:o,type:"http"},s)}}}function g2(t){return function(e){if(Ge()!==t)return;let n=e.from,r=e.to,i=pl(we.location.href),o=n?pl(n):void 0,s=pl(r);(!o||!o.path)&&(o=i),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),Vr({category:"navigation",data:{from:n,to:r}})}}function m2(t){return!!t&&!!t.target}var _2=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],v2="BrowserApiErrors",y2=(t={})=>{let e=j({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t);return{name:v2,setupOnce(){e.setTimeout&&xe(we,"setTimeout",kd),e.setInterval&&xe(we,"setInterval",kd),e.requestAnimationFrame&&xe(we,"requestAnimationFrame",w2),e.XMLHttpRequest&&"XMLHttpRequest"in we&&xe(XMLHttpRequest.prototype,"send",E2);let n=e.eventTarget;n&&(Array.isArray(n)?n:_2).forEach(x2)}}},b2=y2;function kd(t){return function(...e){let n=e[0];return e[0]=di(n,{mechanism:{data:{function:cr(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function w2(t){return function(e){return t.apply(this,[di(e,{mechanism:{data:{function:"requestAnimationFrame",handler:cr(t)},handled:!1,type:"instrument"}})])}}function E2(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(r=>{r in n&&typeof n[r]=="function"&&xe(n,r,function(i){let o={mechanism:{data:{function:r,handler:cr(i)},handled:!1,type:"instrument"}},s=mh(i);return s&&(o.mechanism.data.handler=cr(s)),di(i,o)})}),t.apply(this,e)}}function x2(t){let e=we,n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(xe(n,"addEventListener",function(r){return function(i,o,s){try{typeof o.handleEvent=="function"&&(o.handleEvent=di(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:cr(o),target:t},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,di(o,{mechanism:{data:{function:"addEventListener",handler:cr(o),target:t},handled:!1,type:"instrument"}}),s])}}),xe(n,"removeEventListener",function(r){return function(i,o,s){let a=o;try{let l=a&&a.__sentry_wrapped__;l&&r.call(this,i,l,s)}catch{}return r.call(this,i,a,s)}}))}var S2="GlobalHandlers",C2=(t={})=>{let e=j({onerror:!0,onunhandledrejection:!0},t);return{name:S2,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(T2(n),Ad("onerror")),e.onunhandledrejection&&(O2(n),Ad("onunhandledrejection"))}}},I2=C2;function T2(t){gO(e=>{let{stackParser:n,attachStacktrace:r}=jv();if(Ge()!==t||Mv())return;let{msg:i,url:o,line:s,column:a,error:l}=e,u=N2(Eh(n,l||i,void 0,r,!1),o,s,a);u.level="error",Nv(u,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function O2(t){_O(e=>{let{stackParser:n,attachStacktrace:r}=jv();if(Ge()!==t||Mv())return;let i=D2(e),o=fh(i)?R2(i):Eh(n,i,void 0,r,!0);o.level="error",Nv(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function D2(t){if(fh(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}function R2(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function N2(t,e,n,r){let i=t.exception=t.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},l=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,f=isNaN(parseInt(n,10))?void 0:n,d=Mn(e)&&e.length>0?e:WT();return l.length===0&&l.push({colno:u,filename:d,function:Lr,in_app:!0,lineno:f}),t}function Ad(t){Jr&&wt.log(`Global Handler attached: ${t}`)}function jv(){let t=Ge();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var P2=()=>({name:"HttpContext",preprocessEvent(t){if(!we.navigator&&!we.location&&!we.document)return;let e=t.request&&t.request.url||we.location&&we.location.href,{referrer:n}=we.document||{},{userAgent:r}=we.navigator||{},i=j(j(j({},t.request&&t.request.headers),n&&{Referer:n}),r&&{"User-Agent":r}),o=Zt(j(j({},t.request),e&&{url:e}),{headers:i});t.request=o}}),k2="cause",A2=5,L2="LinkedErrors",M2=(t={})=>{let e=t.limit||A2,n=t.key||k2;return{name:L2,preprocessEvent(r,i,o){let s=o.getOptions();$T(bh,s.stackParser,s.maxValueLength,n,e,r,i)}}},V2=M2;function j2(t){return[rR(),QD(),b2(),c2(),I2(),V2(),mR(),P2()]}var F2=class extends Error{cause;constructor(t,e){super(t),this.cause=e}},Fv=class Bv{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Bv),this.INSTANCE}captureException(e,n,r){Ve.error(e),this.getNewScope(n,r).captureException(e)}captureMessage(e,n,r,i){this.getNewScope(r,i).captureMessage(e,n??"error")}captureError(e,n,r,i){Ve.error(e,n);let o=this.getNewScope(r,i),s=new F2(e,n);o.captureException(s)}setGlobalContext(e,n){this.contexts[e]=j({context:n},this.contexts[e])}setUser(e){this.user=e}setTags(e){this.tags=e}getNewScope(e,n){let r=new Hn;if(r.setClient(this.client),r.setUser(this.user),e?.triggerContext){let i=e.triggerContext;r.setExtras(i.triggerData.sentryContext()),delete e.triggerContext}return e&&r.setExtras(e),this.tags&&r.setTags(this.tags),n&&r.setTags(n),Object.keys(this.contexts).forEach(i=>{r.setContext(i,this.contexts[i])}),r.setTag("language",navigator.language),r.setTag("timezone",z2()),r}init(){let e=j2({}).filter(n=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(n.name));this.client=new kR({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:WR,stackParser:s2,integrations:e,environment:oo.mode,release:`web-sdk@${be.SDK_VERSION}`,debug:oo.debug}),this.client.init()}},Ld=class{static ID="id";static SESSION_LANDING_PAGE="landing";static SESSION_LAST_USED_TIME="lastUsedTime";static SESSION_SYNCED="synced";static APP_CONFIG="conf";static DEVICE_ID="did";static SDK_TOKEN="token";static FIRST_SEEN="firstSeen";static SESSION_NUMBER="sessionNumber";static GA_CLIENT_ID="gacid";static CURRENT_CART="cart";static MUTED="muted"},Md=en(R0());function Uv(t){return Md.default.createInstance({name:"lc",storeName:t,driver:Md.default.LOCALSTORAGE})}var Hv=class{static storage;static async get(t,e){return await this.storage?.getItem(t)??e}static set(t,e){return this.storage?.setItem(t,e)}static remove(t){return this.storage?.removeItem(t)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}},QA=class extends Hv{static storeName="ses";static{this.storage=Uv(this.storeName)}},Vd=class extends Hv{static storeName="usr";static{this.storage=Uv(this.storeName)}},B2=class{static format(t,e){let n=/{{\s*(\w+)\s*}}/;return e.replace(n,(r,i)=>{switch(i){case"amount":return this.formatWithDelimiters(t,2);case"amount_no_decimals":return this.formatWithDelimiters(t,0);case"amount_with_comma_separator":return this.formatWithDelimiters(t,2,".",",");case"amount_no_decimals_with_comma_separator":return this.formatWithDelimiters(t,0,".",",");case"amount_with_apostrophe_separator":return this.formatWithDelimiters(t,2,"'",".");case"amount_no_decimals_with_space_separator":return this.formatWithDelimiters(t,0," ");case"amount_with_space_separator":return this.formatWithDelimiters(t,2," ",",");case"amount_with_period_and_space_separator":return this.formatWithDelimiters(t,2," ",".");default:return r}})}static formatWithDelimiters(t,e=2,n=",",r="."){if(isNaN(t)||t==null)return"0";let i=(t/100).toFixed(e).split("."),o=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+n),s=i[1]?r+i[1]:"";return o+s}},U2=class{id;mID;vID;vName;imageURL;name;link;quantity;price;finalPrice;constructor(t){this.id=t.id,this.mID=t.mID,this.vID=t.vID,this.vName=t.vName,this.imageURL=t.imageURL,this.name=t.name,this.link=t.link,this.quantity=t.quantity,this.price=t.price,this.finalPrice=t.finalPrice??t.price}},H2=class{isCartDirty=!0;cartEngagements;isGoKwikPopupOpen;previewIDs;previewVariant;pageName;moneyFormat;jsLoadTime=new Date;shopCurrencyCode;locale;activeExperiment;inInactive=!1;lastEnterActive=new Date;lastEnterInactive=null;currentItem;_currencyCode;get currencyCode(){return this._currencyCode}set currencyCode(t){this._currencyCode=t}static get(){return window.CooeeSDK.runtimeData}isInactive(){return this.inInactive}async setInactive(){return this.inInactive?0:(this.inInactive=!0,this.lastEnterInactive=new Date,Math.max((this.lastEnterInactive.getTime()-this.lastEnterActive.getTime())/1e3,0))}setActive(){return this.inInactive?(this.inInactive=!1,this.lastEnterActive=new Date,Math.max((this.lastEnterActive.getTime()-this.lastEnterInactive.getTime())/1e3,0)):0}isFirstActive(){return this.lastEnterInactive==null}getCurrentItem(){return this.currentItem}setCurrentItem(t){this.currentItem=new U2(t)}};function xh(t,e){if(t==0&&e)return"Free";let n=H2.get(),r=pv.get(),i=n.shopCurrencyCode||r.currency,o=n.currencyCode;o||Ve.warn("Currency code is not set in RuntimeData");let s=r.money?.format??n.moneyFormat,a;if(s&&i===o)a=B2.format(t*100,s);else{let l;try{l=new Intl.NumberFormat($2(),{style:"currency",currency:o||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(u){return Fv.getInstance().captureException(u,{currentCurrency:o,shopCurrency:i}),""}a=l.format(t),a=a.replace("\u20B9","Rs. "),r.money?.showCurrency&&o!=="INR"&&(a=a.concat(` ${o}`))}return a}function $2(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}var Go;function z2(){if(Go)return Go;try{return Go=Intl.DateTimeFormat().resolvedOptions().timeZone,Go}catch{return""}}var Da=class Mc{transform(e){return e==null?null:xh(e)}static \u0275fac=function(e){return new(e||Mc)};static \u0275pipe=ih({name:"cooeeCurrency",type:Mc,pure:!0})},q2=en(N0()),G2=Object.prototype.toString,Ii=Array.isArray||function(t){return G2.call(t)==="[object Array]"};function Sh(t){return typeof t=="function"}function W2(t){return Ii(t)?"array":typeof t}function ml(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function jd(t,e){return t!=null&&typeof t=="object"&&e in t}function Z2(t,e){return t!=null&&typeof t!="object"&&t.hasOwnProperty&&t.hasOwnProperty(e)}var Y2=RegExp.prototype.test;function K2(t,e){return Y2.call(t,e)}var X2=/\S/;function J2(t){return!K2(X2,t)}var Q2={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function tN(t){return String(t).replace(/[&<>"'`=\/]/g,function(e){return Q2[e]})}var eN=/\s*/,nN=/\s+/,Fd=/\s*=/,rN=/\s*\}/,iN=/#|\^|\/|>|\{|&|=|!/;function oN(t,e){if(!t)return[];var n=!1,r=[],i=[],o=[],s=!1,a=!1,l="",u=0;function f(){if(s&&!a)for(;o.length;)delete i[o.pop()];else o=[];s=!1,a=!1}var d,_,y;function x($){if(typeof $=="string"&&($=$.split(nN,2)),!Ii($)||$.length!==2)throw new Error("Invalid tags: "+$);d=new RegExp(ml($[0])+"\\s*"),_=new RegExp("\\s*"+ml($[1])),y=new RegExp("\\s*"+ml("}"+$[1]))}x(e||tn.tags);for(var I=new Do(t),V,L,Z,W,B,lt;!I.eos();){if(V=I.pos,Z=I.scanUntil(d),Z)for(var Ht=0,At=Z.length;Ht<At;++Ht)W=Z.charAt(Ht),J2(W)?(o.push(i.length),l+=W):(a=!0,n=!0,l+=" "),i.push(["text",W,V,V+1]),V+=1,W===`
32
- `&&(f(),l="",u=0,n=!1);if(!I.scan(d))break;if(s=!0,L=I.scan(iN)||"name",I.scan(eN),L==="="?(Z=I.scanUntil(Fd),I.scan(Fd),I.scanUntil(_)):L==="{"?(Z=I.scanUntil(y),I.scan(rN),I.scanUntil(_),L="&"):Z=I.scanUntil(_),!I.scan(_))throw new Error("Unclosed tag at "+I.pos);if(L==">"?B=[L,Z,V,I.pos,l,u,n]:B=[L,Z,V,I.pos],u++,i.push(B),L==="#"||L==="^")r.push(B);else if(L==="/"){if(lt=r.pop(),!lt)throw new Error('Unopened section "'+Z+'" at '+V);if(lt[1]!==Z)throw new Error('Unclosed section "'+lt[1]+'" at '+V)}else L==="name"||L==="{"||L==="&"?a=!0:L==="="&&x(Z)}if(f(),lt=r.pop(),lt)throw new Error('Unclosed section "'+lt[1]+'" at '+I.pos);return aN(sN(i))}function sN(t){for(var e=[],n,r,i=0,o=t.length;i<o;++i)n=t[i],n&&(n[0]==="text"&&r&&r[0]==="text"?(r[1]+=n[1],r[3]=n[3]):(e.push(n),r=n));return e}function aN(t){for(var e=[],n=e,r=[],i,o,s=0,a=t.length;s<a;++s)switch(i=t[s],i[0]){case"#":case"^":n.push(i),r.push(i),n=i[4]=[];break;case"/":o=r.pop(),o[5]=i[2],n=r.length>0?r[r.length-1][4]:e;break;default:n.push(i)}return e}function Do(t){this.string=t,this.tail=t,this.pos=0}Do.prototype.eos=function(){return this.tail===""};Do.prototype.scan=function(t){var e=this.tail.match(t);if(!e||e.index!==0)return"";var n=e[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n};Do.prototype.scanUntil=function(t){var e=this.tail.search(t),n;switch(e){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,e),this.tail=this.tail.substring(e)}return this.pos+=n.length,n};function pi(t,e){this.view=t,this.cache={".":this.view},this.parent=e}pi.prototype.push=function(t){return new pi(t,this)};pi.prototype.lookup=function(t){var e=this.cache,n;if(e.hasOwnProperty(t))n=e[t];else{for(var r=this,i,o,s,a=!1;r;){if(t.indexOf(".")>0)for(i=r.view,o=t.split("."),s=0;i!=null&&s<o.length;)s===o.length-1&&(a=jd(i,o[s])||Z2(i,o[s])),i=i[o[s++]];else i=r.view[t],a=jd(r.view,t);if(a){n=i;break}r=r.parent}e[t]=n}return Sh(n)&&(n=n.call(this.view)),n};function Ne(){this.templateCache={_cache:{},set:function(t,e){this._cache[t]=e},get:function(t){return this._cache[t]},clear:function(){this._cache={}}}}Ne.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()};Ne.prototype.parse=function(t,e){var n=this.templateCache,r=t+":"+(e||tn.tags).join(":"),i=typeof n<"u",o=i?n.get(r):void 0;return o==null&&(o=oN(t,e),i&&n.set(r,o)),o};Ne.prototype.render=function(t,e,n,r){var i=this.getConfigTags(r),o=this.parse(t,i),s=e instanceof pi?e:new pi(e,void 0);return this.renderTokens(o,s,n,t,r)};Ne.prototype.renderTokens=function(t,e,n,r,i){for(var o="",s,a,l,u=0,f=t.length;u<f;++u)l=void 0,s=t[u],a=s[0],a==="#"?l=this.renderSection(s,e,n,r,i):a==="^"?l=this.renderInverted(s,e,n,r,i):a===">"?l=this.renderPartial(s,e,n,i):a==="&"?l=this.unescapedValue(s,e):a==="name"?l=this.escapedValue(s,e,i):a==="text"&&(l=this.rawValue(s)),l!==void 0&&(o+=l);return o};Ne.prototype.renderSection=function(t,e,n,r,i){var o=this,s="",a=e.lookup(t[1]);function l(d){return o.render(d,e,n,i)}if(a){if(Ii(a))for(var u=0,f=a.length;u<f;++u)s+=this.renderTokens(t[4],e.push(a[u]),n,r,i);else if(typeof a=="object"||typeof a=="string"||typeof a=="number")s+=this.renderTokens(t[4],e.push(a),n,r,i);else if(Sh(a)){if(typeof r!="string")throw new Error("Cannot use higher-order sections without the original template");a=a.call(e.view,r.slice(t[3],t[5]),l),a!=null&&(s+=a)}else s+=this.renderTokens(t[4],e,n,r,i);return s}};Ne.prototype.renderInverted=function(t,e,n,r,i){var o=e.lookup(t[1]);if(!o||Ii(o)&&o.length===0)return this.renderTokens(t[4],e,n,r,i)};Ne.prototype.indentPartial=function(t,e,n){for(var r=e.replace(/[^ \t]/g,""),i=t.split(`
22
+ `),typeof a=="string"||a instanceof Uint8Array)i(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(rr(a))}i(l)}}return typeof r=="string"?r:YD(r)}function YD(e){let t=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(t),r=0;for(let i of e)n.set(i,r),r+=i.length;return n}function KD(e){let t=typeof e.data=="string"?Zc(e.data):e.data;return[hn({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}var JD={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Xf(e){return JD[e]}function wy(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function XD(e,t,n,r){let i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return F(F(F({event_id:e.event_id,sent_at:new Date().toISOString()},t&&{sdk:t}),!!n&&r&&{dsn:Ga(r)}),i&&{trace:hn(F({},i))})}function QD(e,t,n){let r=[{type:"client_report"},{timestamp:n||Fo(),discarded_events:e}];return Bo(t?{dsn:t}:{},[r])}function e2(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function t2(e,t){return e[t]||e.all||0}function n2(e,t,n=Date.now()){return t2(e,t)>n}function r2(e,{statusCode:t,headers:n},r=Date.now()){let i=F({},e),o=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(o)for(let a of o.trim().split(",")){let[l,u,,,d]=a.split(":",5),h=parseInt(l,10),v=(isNaN(h)?60:h)*1e3;if(!u)i.all=r+v;else for(let m of u.split(";"))m==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(i[m]=r+v):i[m]=r+v}else s?i.all=r+e2(s,r):t===429&&(i.all=r+60*1e3);return i}function Qf(){return{traceId:_n(),spanId:_n().substring(16)}}var ns=Be;function i2(){let e=ns.chrome,t=e&&e.app&&e.app.runtime,n="history"in ns&&!!ns.history.pushState&&!!ns.history.replaceState;return!t&&n}var ot=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Wa(){return Gh(Be),Be}function Gh(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Rr,t[Rr]=t[Rr]||{}}function Yc(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||hr(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:_n()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}var Kc="_sentrySpan";function ep(e,t){t?Hr(e,Kc,t):delete e[Kc]}function tp(e){return e[Kc]}var o2=100,s2=class Ey{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Qf()}clone(){let t=new Ey;return t._breadcrumbs=[...this._breadcrumbs],t._tags=F({},this._tags),t._extra=F({},this._extra),t._contexts=F({},this._contexts),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata=F({},this._sdkProcessingMetadata),t._propagationContext=F({},this._propagationContext),t._client=this._client,t._lastEventId=this._lastEventId,ep(t,tp(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Yc(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags=F(F({},this._tags),t),this._notifyScopeListeners(),this}setTag(t,n){return this._tags=Ye(F({},this._tags),{[t]:n}),this._notifyScopeListeners(),this}setExtras(t){return this._extra=F(F({},this._extra),t),this._notifyScopeListeners(),this}setExtra(t,n){return this._extra=Ye(F({},this._extra),{[t]:n}),this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t=="function"?t(this):t,[r,i]=n instanceof Wn?[n.getScopeData(),n.getRequestSession()]:yi(n)?[t,t.requestSession]:[],{tags:o,extra:s,user:a,contexts:l,level:u,fingerprint:d=[],propagationContext:h}=r||{};return this._tags=F(F({},this._tags),o),this._extra=F(F({},this._extra),s),this._contexts=F(F({},this._contexts),l),a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),d.length&&(this._fingerprint=d),h&&(this._propagationContext=h),i&&(this._requestSession=i),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,ep(this,void 0),this._attachments=[],this._propagationContext=Qf(),this._notifyScopeListeners(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:o2;if(r<=0)return this;let i=F({timestamp:Fo()},t),o=this._breadcrumbs;return o.push(i),this._breadcrumbs=o.length>r?o.slice(-r):o,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:tp(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=F(F({},this._sdkProcessingMetadata),t),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n&&n.event_id?n.event_id:_n();if(!this._client)return we.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(t,Ye(F({originalException:t,syntheticException:i},n),{event_id:r}),this),r}captureMessage(t,n,r){let i=r&&r.event_id?r.event_id:_n();if(!this._client)return we.warn("No client configured on scope - will not capture message!"),i;let o=new Error(t);return this._client.captureMessage(t,n,Ye(F({originalException:t,syntheticException:o},r),{event_id:i}),this),i}captureEvent(t,n){let r=n&&n.event_id?n.event_id:_n();return this._client?(this._client.captureEvent(t,Ye(F({},n),{event_id:r}),this),r):(we.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}},Wn=s2;function a2(){return Hh("defaultCurrentScope",()=>new Wn)}function l2(){return Hh("defaultIsolationScope",()=>new Wn)}var c2=class{constructor(e,t){let n;e?n=e:n=new Wn;let r;t?r=t:r=new Wn,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(r){throw this._popScope(),r}return za(n)?n.then(r=>(this._popScope(),r),r=>{throw this._popScope(),r}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function bi(){let e=Wa(),t=Gh(e);return t.stack=t.stack||new c2(a2(),l2())}function u2(e){return bi().withScope(e)}function h2(e,t){let n=bi();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function np(e){return bi().withScope(()=>e(bi().getIsolationScope()))}function d2(){return{withIsolationScope:np,withScope:u2,withSetScope:h2,withSetIsolationScope:(e,t)=>np(t),getCurrentScope:()=>bi().getScope(),getIsolationScope:()=>bi().getIsolationScope()}}function Wh(e){let t=Gh(e);return t.acs?t.acs:d2()}function Zh(){let e=Wa();return Wh(e).getCurrentScope()}function xy(){let e=Wa();return Wh(e).getIsolationScope()}function f2(){return Hh("globalScope",()=>new Wn)}function p2(...e){let t=Wa(),n=Wh(t);if(e.length===2){let[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function Yt(){return Zh().getClient()}var g2="_sentryMetrics";function _2(e){let t=e[g2];if(!t)return;let n={};for(let[,[r,i]]of t)(n[r]||(n[r]=[])).push(hn(i));return n}var m2="sentry.source",v2="sentry.sample_rate",y2="sentry.op",b2="sentry.origin",w2=1;function E2(e){let{spanId:t,traceId:n}=e.spanContext(),{parent_span_id:r}=Qs(e);return hn({parent_span_id:r,span_id:t,trace_id:n})}function rp(e){return typeof e=="number"?ip(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ip(e.getTime()):hr()}function ip(e){return e>9999999999?e/1e3:e}function Qs(e){if(S2(e))return e.getSpanJSON();try{let{spanId:t,traceId:n}=e.spanContext();if(x2(e)){let{attributes:r,startTime:i,name:o,endTime:s,parentSpanId:a,status:l}=e;return hn({span_id:t,trace_id:n,data:r,description:o,parent_span_id:a,start_timestamp:rp(i),timestamp:rp(s)||void 0,status:I2(l),op:r[y2],origin:r[b2],_metrics_summary:_2(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function x2(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function S2(e){return typeof e.getSpanJSON=="function"}function C2(e){let{traceFlags:t}=e.spanContext();return t===w2}function I2(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"unknown_error"}var T2="_sentryRootSpan";function Sy(e){return e[T2]||e}var Cy="production",O2="_frozenDsc";function Iy(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=hn({environment:n.environment||Cy,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",i),i}function D2(e){let t=Yt();if(!t)return{};let n=Iy(Qs(e).trace_id||"",t),r=Sy(e),i=r[O2];if(i)return i;let o=r.spanContext().traceState,s=o&&o.get("sentry.dsc"),a=s&&qD(s);if(a)return a;let l=Qs(r),u=l.data||{},d=u[v2];d!=null&&(n.sample_rate=`${d}`);let h=u[m2],v=l.description;return h!=="url"&&v&&(n.transaction=v),n.sampled=String(C2(r)),t.emit("createDsc",n,r),n}function R2(e){if(typeof e=="boolean")return Number(e);let t=typeof e=="string"?parseFloat(e):e;if(typeof t!="number"||isNaN(t)||t<0||t>1){ot&&we.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}function N2(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function P2(e,t,n,r){let i=wy(n),o=F(F({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&t&&{dsn:Ga(t)}),s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Bo(o,[s])}function k2(e,t,n,r){let i=wy(n),o=e.type&&e.type!=="replay_event"?e.type:"event";N2(e,n&&n.sdk);let s=XD(e,i,r,t);return delete e.sdkProcessingMetadata,Bo(s,[[{type:o},e]])}function Jc(e,t,n,r=0){return new Vo((i,o)=>{let s=e[r];if(t===null||typeof s!="function")i(t);else{let a=s(F({},t),n);ot&&s.id&&a===null&&we.log(`Event processor "${s.id}" dropped event`),za(a)?a.then(l=>Jc(e,l,n,r+1).then(i)).then(null,o):Jc(e,a,n,r+1).then(i).then(null,o)}})}function A2(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;L2(e,t),r&&F2(e,r),V2(e,n),M2(e,i),j2(e,o)}function op(e,t){let{extra:n,tags:r,user:i,contexts:o,level:s,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:h,propagationContext:v,transactionName:m,span:w}=t;Bi(e,"extra",n),Bi(e,"tags",r),Bi(e,"user",i),Bi(e,"contexts",o),Bi(e,"sdkProcessingMetadata",a),s&&(e.level=s),m&&(e.transactionName=m),w&&(e.span=w),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),h.length&&(e.attachments=[...e.attachments,...h]),e.propagationContext=F(F({},e.propagationContext),v)}function Bi(e,t,n){if(n&&Object.keys(n).length){e[t]=F({},e[t]);for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function L2(e,t){let{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:a}=t,l=hn(n);l&&Object.keys(l).length&&(e.extra=F(F({},l),e.extra));let u=hn(r);u&&Object.keys(u).length&&(e.tags=F(F({},u),e.tags));let d=hn(i);d&&Object.keys(d).length&&(e.user=F(F({},d),e.user));let h=hn(o);h&&Object.keys(h).length&&(e.contexts=F(F({},h),e.contexts)),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function M2(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function j2(e,t){e.sdkProcessingMetadata=F(F({},e.sdkProcessingMetadata),t)}function F2(e,t){e.contexts=F({trace:E2(t)},e.contexts),e.sdkProcessingMetadata=F({dynamicSamplingContext:D2(t)},e.sdkProcessingMetadata);let n=Sy(t),r=Qs(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function V2(e,t){e.fingerprint=e.fingerprint?LD(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function B2(e,t,n,r,i,o){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,l=Ye(F({},t),{event_id:t.event_id||n.event_id||_n(),timestamp:t.timestamp||Fo()}),u=n.integrations||e.integrations.map(C=>C.name);U2(l,e),z2(l,u),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&H2(l,e.stackParser);let d=G2(r,n.captureContext);n.mechanism&&bo(l,n.mechanism);let h=i?i.getEventProcessors():[],v=f2().getScopeData();if(o){let C=o.getScopeData();op(v,C)}if(d){let C=d.getScopeData();op(v,C)}let m=[...n.attachments||[],...v.attachments];m.length&&(n.attachments=m),A2(l,v);let w=[...h,...v.eventProcessors];return Jc(w,l,n).then(C=>(C&&$2(C),typeof s=="number"&&s>0?q2(C,s,a):C))}function U2(e,t){let{environment:n,release:r,dist:i,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:Cy),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=di(e.message,o));let s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=di(s.value,o));let a=e.request;a&&a.url&&(a.url=di(a.url,o))}var sp=new WeakMap;function H2(e,t){let n=Be._sentryDebugIds;if(!n)return;let r,i=sp.get(t);i?r=i:(r=new Map,sp.set(t,r));let o=Object.entries(n).reduce((s,[a,l])=>{let u,d=r.get(a);d?u=d:(u=t(a),r.set(a,u));for(let h=u.length-1;h>=0;h--){let v=u[h];if(v.filename){s[v.filename]=l;break}}return s},{});try{e.exception.values.forEach(s=>{s.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=o[a.filename])})})}catch{}}function $2(e){let t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function z2(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function q2(e,t,n){if(!e)return null;let r=F(F(F(F(F({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>F(F({},i),i.data&&{data:rr(i.data,t,n)}))}),e.user&&{user:rr(e.user,t,n)}),e.contexts&&{contexts:rr(e.contexts,t,n)}),e.extra&&{extra:rr(e.extra,t,n)});return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=rr(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>F(F({},i),i.data&&{data:rr(i.data,t,n)}))),r}function G2(e,t){if(!t)return e;let n=e?e.clone():new Wn;return n.update(t),n}function W2(e){if(e)return Z2(e)?{captureContext:e}:K2(e)?{captureContext:e}:e}function Z2(e){return e instanceof Wn||typeof e=="function"}var Y2=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function K2(e){return Object.keys(e).some(t=>Y2.includes(t))}function J2(e,t){return Zh().captureException(e,W2(t))}function Ty(e,t){return Zh().captureEvent(e,t)}var X2="7";function Q2(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function eR(e){return`${Q2(e)}${e.projectId}/envelope/`}function tR(e,t){return _D(F({sentry_key:e.publicKey,sentry_version:X2},t&&{sentry_client:`${t.name}/${t.version}`}))}function nR(e,t,n){return t||`${eR(e)}?${tR(e,n)}`}var ap=[];function rR(e,t){let n={};return t.forEach(r=>{r&&Oy(e,r,n)}),n}function lp(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Oy(e,t,n){if(n[t.name]){ot&&we.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,ap.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),ap.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,o)=>r(i,o,e))}if(typeof t.processEvent=="function"){let r=t.processEvent.bind(t),i=Object.assign((o,s)=>r(o,s,e),{id:t.name});e.addEventProcessor(i)}ot&&we.log(`Integration installed: ${t.name}`)}var cp="Not capturing exception because it's already been captured.",iR=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=gD(e.dsn):ot&&we.warn("No DSN provided, client will not send events."),this._dsn){let t=nR(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport(Ye(F({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:t}))}}captureException(e,t,n){let r=_n();if(Yf(e))return ot&&we.log(cp),r;let i=F({event_id:r},t);return this._process(this.eventFromException(e,i).then(o=>this._captureEvent(o,i,n))),i.event_id}captureMessage(e,t,n,r){let i=F({event_id:_n()},n),o=Bh(e)?e:String(e),s=Uh(e)?this.eventFromMessage(o,t,i):this.eventFromException(e,i);return this._process(s.then(a=>this._captureEvent(a,i,r))),i.event_id}captureEvent(e,t,n){let r=_n();if(t&&t.originalException&&Yf(t.originalException))return ot&&we.log(cp),r;let i=F({event_id:r},t),o=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,o||n)),i.event_id}captureSession(e){typeof e.release!="string"?ot&&we.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Yc(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then(n=>t.flush(e).then(r=>n&&r))):zr(!0)}close(e){return this.flush(e).then(t=>(this.getOptions().enabled=!1,this.emit("close"),t))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let t=this._integrations[e.name];Oy(this,e,this._integrations),t||lp(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=k2(e,this._dsn,this._options._metadata,this._options.tunnel);for(let i of t.attachments||[])n=WD(n,KD(i));let r=this.sendEnvelope(n);r&&r.then(i=>this.emit("afterSendEvent",e,i),null)}sendSession(e){let t=P2(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){let r=`${e}:${t}`;ot&&we.log(`Adding outcome: "${r}"`),this._outcomes[r]=(this._outcomes[r]||0)+1}}on(e,t){let n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{let r=n.indexOf(t);r>-1&&n.splice(r,1)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(r=>r(...t))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,t=>(ot&&we.error("Error while sending event:",t),t)):(ot&&we.error("Transport disabled"),zr({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=rR(this,e),lp(this,e)}_updateSessionFromEvent(e,t){let n=!1,r=!1,i=t.exception&&t.exception.values;if(i){r=!0;for(let s of i){let a=s.mechanism;if(a&&a.handled===!1){n=!0;break}}}let o=e.status==="ok";(o&&e.errors===0||o&&n)&&(Yc(e,Ye(F({},n&&{status:"crashed"}),{errors:e.errors||Number(r||n)})),this.captureSession(e))}_isClientDoneProcessing(e){return new Vo(t=>{let n=0,r=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),t(!0)):(n+=r,e&&n>=e&&(clearInterval(i),t(!1)))},r)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r=xy()){let i=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o.length>0&&(t.integrations=o),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),B2(i,e,t,n,this,r).then(s=>{if(s===null)return s;let a=F(F({},r.getPropagationContext()),n?n.getPropagationContext():void 0);if(!(s.contexts&&s.contexts.trace)&&a){let{traceId:l,spanId:u,parentSpanId:d,dsc:h}=a;s.contexts=F({trace:hn({trace_id:l,span_id:u,parent_span_id:d})},s.contexts);let v=h||Iy(l,this);s.sdkProcessingMetadata=F({dynamicSamplingContext:v},s.sdkProcessingMetadata)}return s})}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(r=>r.event_id,r=>{if(ot){let i=r;i.logLevel==="log"?we.log(i.message):we.warn(i)}})}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:i}=r,o=Xc(e),s=Dy(e),a=e.type||"error",l=`before send for type \`${a}\``,u=typeof i>"u"?void 0:R2(i);if(s&&typeof u=="number"&&Math.random()>u)return this.recordDroppedEvent("sample_rate","error",e),Xs(new In(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let d=a==="replay_event"?"replay":a,h=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,h).then(v=>{if(v===null)throw this.recordDroppedEvent("event_processor",d,e),new In("An event processor returned `null`, will not send event.","log");if(t.data&&t.data.__sentry__===!0)return v;let m=sR(this,r,v,t);return oR(m,l)}).then(v=>{if(v===null){if(this.recordDroppedEvent("before_send",d,e),Xc(e)){let C=1+(e.spans||[]).length;this._outcomes.span=(this._outcomes.span||0)+C}throw new In(`${l} returned \`null\`, will not send event.`,"log")}let m=n&&n.getSession();!o&&m&&this._updateSessionFromEvent(m,v);let w=v.transaction_info;if(o&&w&&v.transaction!==e.transaction){let C="custom";v.transaction_info=Ye(F({},w),{source:C})}return this.sendEvent(v,t),v}).then(null,v=>{throw v instanceof In?v:(this.captureException(v,{data:{__sentry__:!0},originalException:v}),new In(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
23
+ Reason: ${v}`))})}_process(e){this._numProcessing++,e.then(t=>(this._numProcessing--,t),t=>(this._numProcessing--,t))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([t,n])=>{let[r,i]=t.split(":");return{reason:r,category:i,quantity:n}})}};function oR(e,t){let n=`${t} must return \`null\` or a valid event.`;if(za(e))return e.then(r=>{if(!yi(r)&&r!==null)throw new In(n);return r},r=>{throw new In(`${t} rejected with ${r}`)});if(!yi(e)&&e!==null)throw new In(n);return e}function sR(e,t,n,r){let{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:s}=t;if(Dy(n)&&i)return i(n,r);if(Xc(n)){if(n.spans&&s){let a=[];for(let l of n.spans){let u=s(l);u?a.push(u):e.recordDroppedEvent("before_send","span")}n.spans=a}if(o)return o(n,r)}return n}function Dy(e){return e.type===void 0}function Xc(e){return e.type==="transaction"}var aR=64;function lR(e,t,n=BD(e.bufferSize||aR)){let r={},i=s=>n.drain(s);function o(s){let a=[];if(Jf(s,(h,v)=>{let m=Xf(v);if(n2(r,m)){let w=up(h,v);e.recordDroppedEvent("ratelimit_backoff",m,w)}else a.push(h)}),a.length===0)return zr({});let l=Bo(s[0],a),u=h=>{Jf(l,(v,m)=>{let w=up(v,m);e.recordDroppedEvent(h,Xf(m),w)})},d=()=>t({body:ZD(l)}).then(h=>(h.statusCode!==void 0&&(h.statusCode<200||h.statusCode>=300)&&ot&&we.warn(`Sentry responded with status code ${h.statusCode} to sent event.`),r=r2(r,h),h),h=>{throw u("network_error"),h});return n.add(d).then(h=>h,h=>{if(h instanceof In)return ot&&we.error("Skipped sending event because buffer is full."),u("queue_overflow"),zr({});throw h})}return{send:o,flush:i}}function up(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function cR(e,t,n=[t],r="npm"){let i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:Rr})),version:Rr}),e._metadata=i}var uR=100;function qr(e,t){let n=Yt(),r=xy();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=uR}=n.getOptions();if(o<=0)return;let s=Fo(),a=F({timestamp:s},e),l=i?zh(()=>i(a,t)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,o))}var hp,hR="FunctionToString",dp=new WeakMap,dR=()=>({name:hR,setupOnce(){hp=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=qh(this),n=dp.has(Yt())&&t!==void 0?t:this;return hp.apply(n,e)}}catch{}},setup(e){dp.set(e,!0)}}),fR=dR,pR=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],gR="InboundFilters",_R=(e={})=>({name:gR,processEvent(t,n,r){let i=r.getOptions(),o=vR(e,i);return yR(t,o)?null:t}}),mR=_R;function vR(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:pR],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function yR(e,t){return t.ignoreInternal&&CR(e)?(ot&&we.warn(`Event dropped due to being internal Sentry Error.
24
+ Event: ${nr(e)}`),!0):bR(e,t.ignoreErrors)?(ot&&we.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
25
+ Event: ${nr(e)}`),!0):TR(e)?(ot&&we.warn(`Event dropped due to not having an error message, error type or stacktrace.
26
+ Event: ${nr(e)}`),!0):wR(e,t.ignoreTransactions)?(ot&&we.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
27
+ Event: ${nr(e)}`),!0):ER(e,t.denyUrls)?(ot&&we.warn(`Event dropped due to being matched by \`denyUrls\` option.
28
+ Event: ${nr(e)}.
29
+ Url: ${ea(e)}`),!0):xR(e,t.allowUrls)?!1:(ot&&we.warn(`Event dropped due to not being matched by \`allowUrls\` option.
30
+ Event: ${nr(e)}.
31
+ Url: ${ea(e)}`),!0)}function bR(e,t){return e.type||!t||!t.length?!1:SR(e).some(n=>qa(n,t))}function wR(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;let n=e.transaction;return n?qa(n,t):!1}function ER(e,t){if(!t||!t.length)return!1;let n=ea(e);return n?qa(n,t):!1}function xR(e,t){if(!t||!t.length)return!0;let n=ea(e);return n?qa(n,t):!0}function SR(e){let t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function CR(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function IR(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function ea(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?IR(t):null}catch{return ot&&we.error(`Cannot extract url for event ${nr(e)}`),null}}function TR(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}var OR="Dedupe",DR=()=>{let e;return{name:OR,processEvent(t){if(t.type)return t;try{if(NR(t,e))return ot&&we.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},RR=DR;function NR(e,t){return t?!!(PR(e,t)||kR(e,t)):!1}function PR(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Ny(e,t)||!Ry(e,t))}function kR(e,t){let n=fp(t),r=fp(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Ny(e,t)||!Ry(e,t))}function Ry(e,t){let n=Gf(e),r=Gf(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){let o=r[i],s=n[i];if(o.filename!==s.filename||o.lineno!==s.lineno||o.colno!==s.colno||o.function!==s.function)return!1}return!0}function Ny(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function fp(e){return e.exception&&e.exception.values&&e.exception.values[0]}var St=Be,Qc=0;function Py(){return Qc>0}function AR(){Qc++,setTimeout(()=>{Qc--})}function wi(e,t={},n){if(typeof e!="function")return e;try{let i=e.__sentry_wrapped__;if(i)return i;if(qh(e))return e}catch{return e}let r=function(){let i=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let o=i.map(s=>wi(s,t));return e.apply(this,o)}catch(o){throw AR(),p2(s=>{s.addEventProcessor(a=>(t.mechanism&&(Gc(a,void 0,void 0),bo(a,t.mechanism)),a.extra=Ye(F({},a.extra),{arguments:i}),a)),J2(o)}),o}};try{for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}_y(r,e),Hr(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}var oi=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Yh(e,t){let n=Kh(e,t),r={type:t&&t.name,value:VR(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function LR(e,t,n,r){let i=Yt(),o=i&&i.getOptions().normalizeDepth,s=zR(t),a={__serialized__:by(t,o)};if(s)return{exception:{values:[Yh(e,s)]},extra:a};let l={exception:{values:[{type:$a(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:HR(t,{isUnhandledRejection:r})}]},extra:a};if(n){let u=Kh(e,n);u.length&&(l.exception.values[0].stacktrace={frames:u})}return l}function Al(e,t){return{exception:{values:[Yh(e,t)]}}}function Kh(e,t){let n=t.stacktrace||t.stack||"",r=jR(t),i=FR(t);try{return e(n,r,i)}catch{}return[]}var MR=/Minified React error #\d+;/i;function jR(e){return e&&MR.test(e.message)?1:0}function FR(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function VR(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function BR(e,t,n,r){let i=n&&n.syntheticException||void 0,o=Jh(e,t,i,r);return bo(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),zr(o)}function UR(e,t,n="info",r,i){let o=r&&r.syntheticException||void 0,s=eu(e,t,o,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),zr(s)}function Jh(e,t,n,r,i){let o;if(dy(t)&&t.error)return Al(e,t.error);if(Ff(t)||XO(t)){let s=t;if("stack"in t)o=Al(e,t);else{let a=s.name||(Ff(s)?"DOMError":"DOMException"),l=s.message?`${a}: ${s.message}`:a;o=eu(e,l,n,r),Gc(o,l)}return"code"in s&&(o.tags=Ye(F({},o.tags),{"DOMException.code":`${s.code}`})),o}return Vh(t)?Al(e,t):yi(t)||$a(t)?(o=LR(e,t,n,i),bo(o,{synthetic:!0}),o):(o=eu(e,t,n,r),Gc(o,`${t}`,void 0),bo(o,{synthetic:!0}),o)}function eu(e,t,n,r){let i={};if(r&&n){let o=Kh(e,n);o.length&&(i.exception={values:[{value:t,stacktrace:{frames:o}}]})}if(Bh(t)){let{__sentry_template_string__:o,__sentry_template_values__:s}=t;return i.logentry={message:o,params:s},i}return i.message=t,i}function HR(e,{isUnhandledRejection:t}){let n=mD(e),r=t?"promise rejection":"exception";return dy(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:$a(e)?`Event \`${$R(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function $R(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function zR(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}function qR(e,{metadata:t,tunnel:n,dsn:r}){let i=F(F({event_id:e.event_id,sent_at:new Date().toISOString()},t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}}),!!n&&!!r&&{dsn:Ga(r)}),o=GR(e);return Bo(i,[o])}function GR(e){return[{type:"user_report"},e]}var WR=class extends iR{constructor(e){let t=F({parentSpanIsAlwaysRootSpan:!0},e),n=St.SENTRY_SDK_SOURCE||kD();cR(t,"browser",["browser"],n),super(t),t.sendClientReports&&St.document&&St.document.addEventListener("visibilitychange",()=>{St.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,t){return BR(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return UR(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){oi&&we.warn("SDK not enabled, will not capture user feedback.");return}let t=qR(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){oi&&we.log("No outcomes to send");return}if(!this._dsn){oi&&we.log("No dsn provided, will not send outcomes");return}oi&&we.log("Sending outcomes:",e);let t=QD(e,this._options.tunnel&&Ga(this._dsn));this.sendEnvelope(t)}},ZR=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Tt=Be,YR=1e3,pp,tu,nu;function KR(e){let t="dom";Yr(t,e),Kr(t,JR)}function JR(){if(!Tt.document)return;let e=gn.bind(null,"dom"),t=gp(e,!0);Tt.document.addEventListener("click",t,!1),Tt.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{let r=Tt[n]&&Tt[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Ct(r,"addEventListener",function(i){return function(o,s,a){if(o==="click"||o=="keypress")try{let l=this,u=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},d=u[o]=u[o]||{refCount:0};if(!d.handler){let h=gp(e);d.handler=h,i.call(this,o,h,a)}d.refCount++}catch{}return i.call(this,o,s,a)}}),Ct(r,"removeEventListener",function(i){return function(o,s,a){if(o==="click"||o=="keypress")try{let l=this,u=l.__sentry_instrumentation_handlers__||{},d=u[o];d&&(d.refCount--,d.refCount<=0&&(i.call(this,o,d.handler,a),d.handler=void 0,delete u[o]),Object.keys(u).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return i.call(this,o,s,a)}}))})}function XR(e){if(e.type!==tu)return!1;try{if(!e.target||e.target._sentryId!==nu)return!1}catch{}return!0}function QR(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function gp(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=eN(n);if(QR(n.type,r))return;Hr(n,"_sentryCaptured",!0),r&&!r._sentryId&&Hr(r,"_sentryId",_n());let i=n.type==="keypress"?"input":n.type;XR(n)||(e({event:n,name:i,global:t}),tu=n.type,nu=r?r._sentryId:void 0),clearTimeout(pp),pp=Tt.setTimeout(()=>{nu=void 0,tu=void 0},YR)}}function eN(e){try{return e.target}catch{return null}}var rs;function tN(e){let t="history";Yr(t,e),Kr(t,nN)}function nN(){if(!i2())return;let e=Tt.onpopstate;Tt.onpopstate=function(...n){let r=Tt.location.href,i=rs;if(rs=r,gn("history",{from:i,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){let i=r.length>2?r[2]:void 0;if(i){let o=rs,s=String(i);rs=s,gn("history",{from:o,to:s})}return n.apply(this,r)}}Ct(Tt.history,"pushState",t),Ct(Tt.history,"replaceState",t)}var ws={};function rN(e){let t=ws[e];if(t)return t;let n=Tt[e];if(zc(n))return ws[e]=n.bind(Tt);let r=Tt.document;if(r&&typeof r.createElement=="function")try{let i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);let o=i.contentWindow;o&&o[e]&&(n=o[e]),r.head.removeChild(i)}catch(i){ZR&&we.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(ws[e]=n.bind(Tt))}function _p(e){ws[e]=void 0}var Zi="__sentry_xhr_v3__";function iN(e){let t="xhr";Yr(t,e),Kr(t,oN)}function oN(){if(!Tt.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;Ct(e,"open",function(t){return function(...n){let r=hr()*1e3,i=Un(n[0])?n[0].toUpperCase():void 0,o=sN(n[1]);if(!i||!o)return t.apply(this,n);this[Zi]={method:i,url:o,request_headers:{}},i==="POST"&&o.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let s=()=>{let a=this[Zi];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}let l={endTimestamp:hr()*1e3,startTimestamp:r,xhr:this};gn("xhr",l)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Ct(this,"onreadystatechange",function(a){return function(...l){return s(),a.apply(this,l)}}):this.addEventListener("readystatechange",s),Ct(this,"setRequestHeader",function(a){return function(...l){let[u,d]=l,h=this[Zi];return h&&Un(u)&&Un(d)&&(h.request_headers[u.toLowerCase()]=d),a.apply(this,l)}}),t.apply(this,n)}}),Ct(e,"send",function(t){return function(...n){let r=this[Zi];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);let i={startTimestamp:hr()*1e3,xhr:this};return gn("xhr",i),t.apply(this,n)}})}function sN(e){if(Un(e))return e;try{return e.toString()}catch{}}function aN(e,t=rN("fetch")){let n=0,r=0;function i(o){let s=o.body.length;n+=s,r++;let a=F({body:o.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15},e.fetchOptions);if(!t)return _p("fetch"),Xs("No fetch implementation available");try{return t(e.url,a).then(l=>(n-=s,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return _p("fetch"),n-=s,r--,Xs(l)}}return lR(e,i)}var lN=30,cN=50;function ru(e,t,n,r){let i={filename:e,function:t==="<anonymous>"?$r:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var uN=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,hN=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,dN=/\((\S*)(?::(\d+))(?::(\d+))\)/,fN=e=>{let t=uN.exec(e);if(t){let[,r,i,o]=t;return ru(r,$r,+i,+o)}let n=hN.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){let o=dN.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}let[r,i]=ky(n[1]||$r,n[2]);return ru(i,r,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},pN=[lN,fN],gN=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,_N=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,mN=e=>{let t=gN.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=_N.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let n=t[3],r=t[1]||$r;return[r,n]=ky(r,n),ru(n,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},vN=[cN,mN],yN=[pN,vN],bN=yD(...yN),ky=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:$r,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},is=1024,wN="Breadcrumbs",EN=(e={})=>{let t=F({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e);return{name:wN,setup(n){t.console&&wD(IN(n)),t.dom&&KR(CN(n,t.dom)),t.xhr&&iN(TN(n)),t.fetch&&ID(ON(n)),t.history&&tN(DN(n)),t.sentry&&n.on("beforeSendEvent",SN(n))}}},xN=EN;function SN(e){return function(t){Yt()===e&&qr({category:`sentry.${t.type==="transaction"?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:nr(t)},{event:t})}}function CN(e,t){return function(n){if(Yt()!==e)return;let r,i,o=typeof t=="object"?t.serializeAttribute:void 0,s=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;s&&s>is&&(oi&&we.warn(`\`dom.maxStringLength\` cannot exceed ${is}, but a value of ${s} was configured. Sentry will use ${is} instead.`),s=is),typeof o=="string"&&(o=[o]);try{let l=n.event,u=RN(l)?l.target:l;r=py(u,{keyAttrs:o,maxStringLength:s}),i=lD(u)}catch{r="<unknown>"}if(r.length===0)return;let a={category:`ui.${n.name}`,message:r};i&&(a.data={"ui.component_name":i}),qr(a,{event:n.event,name:n.name,global:n.global})}}function IN(e){return function(t){if(Yt()!==e)return;let n={category:"console",data:{arguments:t.args,logger:"console"},level:HD(t.level),message:Vf(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)n.message=`Assertion failed: ${Vf(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1);else return;qr(n,{input:t.args,level:t.level})}}function TN(e){return function(t){if(Yt()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[Zi];if(!n||!r||!i)return;let{method:o,url:s,status_code:a,body:l}=i,u={method:o,url:s,status_code:a},d={xhr:t.xhr,input:l,startTimestamp:n,endTimestamp:r};qr({category:"xhr",data:u,type:"http"},d)}}function ON(e){return function(t){if(Yt()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.error){let i=t.fetchData,o={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r};qr({category:"fetch",data:i,level:"error",type:"http"},o)}else{let i=t.response,o=Ye(F({},t.fetchData),{status_code:i&&i.status}),s={input:t.args,response:i,startTimestamp:n,endTimestamp:r};qr({category:"fetch",data:o,type:"http"},s)}}}function DN(e){return function(t){if(Yt()!==e)return;let n=t.from,r=t.to,i=kl(St.location.href),o=n?kl(n):void 0,s=kl(r);(!o||!o.path)&&(o=i),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),qr({category:"navigation",data:{from:n,to:r}})}}function RN(e){return!!e&&!!e.target}var NN=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],PN="BrowserApiErrors",kN=(e={})=>{let t=F({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e);return{name:PN,setupOnce(){t.setTimeout&&Ct(St,"setTimeout",mp),t.setInterval&&Ct(St,"setInterval",mp),t.requestAnimationFrame&&Ct(St,"requestAnimationFrame",LN),t.XMLHttpRequest&&"XMLHttpRequest"in St&&Ct(XMLHttpRequest.prototype,"send",MN);let n=t.eventTarget;n&&(Array.isArray(n)?n:NN).forEach(jN)}}},AN=kN;function mp(e){return function(...t){let n=t[0];return t[0]=wi(n,{mechanism:{data:{function:gr(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function LN(e){return function(t){return e.apply(this,[wi(t,{mechanism:{data:{function:"requestAnimationFrame",handler:gr(e)},handled:!1,type:"instrument"}})])}}function MN(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(r=>{r in n&&typeof n[r]=="function"&&Ct(n,r,function(i){let o={mechanism:{data:{function:r,handler:gr(i)},handled:!1,type:"instrument"}},s=qh(i);return s&&(o.mechanism.data.handler=gr(s)),wi(i,o)})}),e.apply(this,t)}}function jN(e){let t=St,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Ct(n,"addEventListener",function(r){return function(i,o,s){try{typeof o.handleEvent=="function"&&(o.handleEvent=wi(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:gr(o),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,wi(o,{mechanism:{data:{function:"addEventListener",handler:gr(o),target:e},handled:!1,type:"instrument"}}),s])}}),Ct(n,"removeEventListener",function(r){return function(i,o,s){let a=o;try{let l=a&&a.__sentry_wrapped__;l&&r.call(this,i,l,s)}catch{}return r.call(this,i,a,s)}}))}var FN="GlobalHandlers",VN=(e={})=>{let t=F({onerror:!0,onunhandledrejection:!0},e);return{name:FN,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(UN(n),vp("onerror")),t.onunhandledrejection&&(HN(n),vp("onunhandledrejection"))}}},BN=VN;function UN(e){DD(t=>{let{stackParser:n,attachStacktrace:r}=Ay();if(Yt()!==e||Py())return;let{msg:i,url:o,line:s,column:a,error:l}=t,u=qN(Jh(n,l||i,void 0,r,!1),o,s,a);u.level="error",Ty(u,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function HN(e){ND(t=>{let{stackParser:n,attachStacktrace:r}=Ay();if(Yt()!==e||Py())return;let i=$N(t),o=Uh(i)?zN(i):Jh(n,i,void 0,r,!0);o.level="error",Ty(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function $N(e){if(Uh(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function zN(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function qN(e,t,n,r){let i=e.exception=e.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},l=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(n,10))?void 0:n,h=Un(t)&&t.length>0?t:aD();return l.length===0&&l.push({colno:u,filename:h,function:$r,in_app:!0,lineno:d}),e}function vp(e){oi&&we.log(`Global Handler attached: ${e}`)}function Ay(){let e=Yt();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var GN=()=>({name:"HttpContext",preprocessEvent(e){if(!St.navigator&&!St.location&&!St.document)return;let t=e.request&&e.request.url||St.location&&St.location.href,{referrer:n}=St.document||{},{userAgent:r}=St.navigator||{},i=F(F(F({},e.request&&e.request.headers),n&&{Referer:n}),r&&{"User-Agent":r}),o=Ye(F(F({},e.request),t&&{url:t}),{headers:i});e.request=o}}),WN="cause",ZN=5,YN="LinkedErrors",KN=(e={})=>{let t=e.limit||ZN,n=e.key||WN;return{name:YN,preprocessEvent(r,i,o){let s=o.getOptions();rD(Yh,s.stackParser,s.maxValueLength,n,t,r,i)}}},JN=KN;function XN(e){return[mR(),fR(),AN(),xN(),BN(),JN(),RR(),GN()]}var QN=class extends Error{cause;constructor(e,t){super(e),this.cause=t}},eP=class Ly{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Ly),this.INSTANCE}captureException(t,n,r){cn.error(t),this.getNewScope(n,r).captureException(t)}captureMessage(t,n,r,i){this.getNewScope(r,i).captureMessage(t,n??"error")}captureError(t,n,r,i){cn.error(t,n);let o=this.getNewScope(r,i),s=new QN(t,n);o.captureException(s)}setGlobalContext(t,n){this.contexts[t]=F({context:n},this.contexts[t])}setUser(t){this.user=t}setTags(t){this.tags=t}getNewScope(t,n){let r=new Wn;if(r.setClient(this.client),r.setUser(this.user),t?.triggerContext){let i=t.triggerContext;r.setExtras(i.triggerData.sentryContext()),delete t.triggerContext}return t&&r.setExtras(t),this.tags&&r.setTags(this.tags),n&&r.setTags(n),Object.keys(this.contexts).forEach(i=>{r.setContext(i,this.contexts[i])}),r.setTag("language",navigator.language),r.setTag("timezone",oP()),r}init(){let t=XN({}).filter(n=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(n.name));this.client=new WR({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:aN,stackParser:bN,integrations:t,environment:yo.mode,release:`web-sdk@${xt.SDK_VERSION}`,debug:yo.debug}),this.client.init()}},yp=class{static ID="id";static SESSION_LANDING_PAGE="landing";static SESSION_LAST_USED_TIME="lastUsedTime";static SESSION_SYNCED="synced";static APP_CONFIG="conf";static DEVICE_ID="did";static SDK_TOKEN="token";static FIRST_SEEN="firstSeen";static SESSION_NUMBER="sessionNumber";static GA_CLIENT_ID="gacid";static CURRENT_CART="cart";static MUTED="muted"},bp=bn(qb());function My(e){return bp.default.createInstance({name:"lc",storeName:e,driver:bp.default.LOCALSTORAGE})}var jy=class{static storage;static async get(e,t){return await this.storage?.getItem(e)??t}static set(e,t){return this.storage?.setItem(e,t)}static remove(e){return this.storage?.removeItem(e)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}},CM=class extends jy{static storeName="ses";static{this.storage=My(this.storeName)}},wp=class extends jy{static storeName="usr";static{this.storage=My(this.storeName)}},tP=class{static format(e,t){let n=/{{\s*(\w+)\s*}}/;return t.replace(n,(r,i)=>{switch(i){case"amount":return this.formatWithDelimiters(e,2);case"amount_no_decimals":return this.formatWithDelimiters(e,0);case"amount_with_comma_separator":return this.formatWithDelimiters(e,2,".",",");case"amount_no_decimals_with_comma_separator":return this.formatWithDelimiters(e,0,".",",");case"amount_with_apostrophe_separator":return this.formatWithDelimiters(e,2,"'",".");case"amount_no_decimals_with_space_separator":return this.formatWithDelimiters(e,0," ");case"amount_with_space_separator":return this.formatWithDelimiters(e,2," ",",");case"amount_with_period_and_space_separator":return this.formatWithDelimiters(e,2," ",".");default:return r}})}static formatWithDelimiters(e,t=2,n=",",r="."){if(isNaN(e)||e==null)return"0";let i=(e/100).toFixed(t).split("."),o=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+n),s=i[1]?r+i[1]:"";return o+s}},nP=class{id;mID;vID;vName;imageURL;name;link;quantity;price;finalPrice;constructor(e){this.id=e.id,this.mID=e.mID,this.vID=e.vID,this.vName=e.vName,this.imageURL=e.imageURL,this.name=e.name,this.link=e.link,this.quantity=e.quantity,this.price=e.price,this.finalPrice=e.finalPrice??e.price}},rP=class{isCartDirty=!0;cartEngagements;isGoKwikPopupOpen;previewIDs;previewVariant;pageName;moneyFormat;jsLoadTime=new Date;shopCurrencyCode;locale;activeExperiment;inInactive=!1;lastEnterActive=new Date;lastEnterInactive=null;currentItem;_currencyCode;get currencyCode(){return this._currencyCode}set currencyCode(e){this._currencyCode=e}static get(){return window.CooeeSDK.runtimeData}isInactive(){return this.inInactive}async setInactive(){return this.inInactive?0:(this.inInactive=!0,this.lastEnterInactive=new Date,Math.max((this.lastEnterInactive.getTime()-this.lastEnterActive.getTime())/1e3,0))}setActive(){return this.inInactive?(this.inInactive=!1,this.lastEnterActive=new Date,Math.max((this.lastEnterActive.getTime()-this.lastEnterInactive.getTime())/1e3,0)):0}isFirstActive(){return this.lastEnterInactive==null}getCurrentItem(){return this.currentItem}setCurrentItem(e){this.currentItem=new nP(e)}};function Xh(e,t){if(e==0&&t)return"Free";let n=rP.get(),r=uy.get(),i=n.shopCurrencyCode||r.currency,o=n.currencyCode;o||cn.warn("Currency code is not set in RuntimeData");let s=r.money?.format??n.moneyFormat,a;if(s&&i===o)a=tP.format(e*100,s);else{let l;try{l=new Intl.NumberFormat(iP(),{style:"currency",currency:o||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(u){return eP.getInstance().captureException(u,{currentCurrency:o,shopCurrency:i}),""}a=l.format(e),a=a.replace("\u20B9","Rs. "),r.money?.showCurrency&&o!=="INR"&&(a=a.concat(` ${o}`))}return a}function iP(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}var os;function oP(){if(os)return os;try{return os=Intl.DateTimeFormat().resolvedOptions().timeZone,os}catch{return""}}var Za=class iu{transform(t){return t==null?null:Xh(t)}static \u0275fac=function(t){return new(t||iu)};static \u0275pipe=kh({name:"cooeeCurrency",type:iu,pure:!0})},sP=bn(Gb()),aP=Object.prototype.toString,Li=Array.isArray||function(e){return aP.call(e)==="[object Array]"};function Qh(e){return typeof e=="function"}function lP(e){return Li(e)?"array":typeof e}function Ll(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Ep(e,t){return e!=null&&typeof e=="object"&&t in e}function cP(e,t){return e!=null&&typeof e!="object"&&e.hasOwnProperty&&e.hasOwnProperty(t)}var uP=RegExp.prototype.test;function hP(e,t){return uP.call(e,t)}var dP=/\S/;function fP(e){return!hP(dP,e)}var pP={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function gP(e){return String(e).replace(/[&<>"'`=\/]/g,function(t){return pP[t]})}var _P=/\s*/,mP=/\s+/,xp=/\s*=/,vP=/\s*\}/,yP=/#|\^|\/|>|\{|&|=|!/;function bP(e,t){if(!e)return[];var n=!1,r=[],i=[],o=[],s=!1,a=!1,l="",u=0;function d(){if(s&&!a)for(;o.length;)delete i[o.pop()];else o=[];s=!1,a=!1}var h,v,m;function w(V){if(typeof V=="string"&&(V=V.split(mP,2)),!Li(V)||V.length!==2)throw new Error("Invalid tags: "+V);h=new RegExp(Ll(V[0])+"\\s*"),v=new RegExp("\\s*"+Ll(V[1])),m=new RegExp("\\s*"+Ll("}"+V[1]))}w(t||nn.tags);for(var C=new Uo(e),A,k,$,ne,z,re;!C.eos();){if(A=C.pos,$=C.scanUntil(h),$)for(var Re=0,Ne=$.length;Re<Ne;++Re)ne=$.charAt(Re),fP(ne)?(o.push(i.length),l+=ne):(a=!0,n=!0,l+=" "),i.push(["text",ne,A,A+1]),A+=1,ne===`
32
+ `&&(d(),l="",u=0,n=!1);if(!C.scan(h))break;if(s=!0,k=C.scan(yP)||"name",C.scan(_P),k==="="?($=C.scanUntil(xp),C.scan(xp),C.scanUntil(v)):k==="{"?($=C.scanUntil(m),C.scan(vP),C.scanUntil(v),k="&"):$=C.scanUntil(v),!C.scan(v))throw new Error("Unclosed tag at "+C.pos);if(k==">"?z=[k,$,A,C.pos,l,u,n]:z=[k,$,A,C.pos],u++,i.push(z),k==="#"||k==="^")r.push(z);else if(k==="/"){if(re=r.pop(),!re)throw new Error('Unopened section "'+$+'" at '+A);if(re[1]!==$)throw new Error('Unclosed section "'+re[1]+'" at '+A)}else k==="name"||k==="{"||k==="&"?a=!0:k==="="&&w($)}if(d(),re=r.pop(),re)throw new Error('Unclosed section "'+re[1]+'" at '+C.pos);return EP(wP(i))}function wP(e){for(var t=[],n,r,i=0,o=e.length;i<o;++i)n=e[i],n&&(n[0]==="text"&&r&&r[0]==="text"?(r[1]+=n[1],r[3]=n[3]):(t.push(n),r=n));return t}function EP(e){for(var t=[],n=t,r=[],i,o,s=0,a=e.length;s<a;++s)switch(i=e[s],i[0]){case"#":case"^":n.push(i),r.push(i),n=i[4]=[];break;case"/":o=r.pop(),o[5]=i[2],n=r.length>0?r[r.length-1][4]:t;break;default:n.push(i)}return t}function Uo(e){this.string=e,this.tail=e,this.pos=0}Uo.prototype.eos=function(){return this.tail===""};Uo.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n};Uo.prototype.scanUntil=function(e){var t=this.tail.search(e),n;switch(t){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=n.length,n};function Ei(e,t){this.view=e,this.cache={".":this.view},this.parent=t}Ei.prototype.push=function(e){return new Ei(e,this)};Ei.prototype.lookup=function(e){var t=this.cache,n;if(t.hasOwnProperty(e))n=t[e];else{for(var r=this,i,o,s,a=!1;r;){if(e.indexOf(".")>0)for(i=r.view,o=e.split("."),s=0;i!=null&&s<o.length;)s===o.length-1&&(a=Ep(i,o[s])||cP(i,o[s])),i=i[o[s++]];else i=r.view[e],a=Ep(r.view,e);if(a){n=i;break}r=r.parent}t[e]=n}return Qh(n)&&(n=n.call(this.view)),n};function Lt(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}Lt.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()};Lt.prototype.parse=function(e,t){var n=this.templateCache,r=e+":"+(t||nn.tags).join(":"),i=typeof n<"u",o=i?n.get(r):void 0;return o==null&&(o=bP(e,t),i&&n.set(r,o)),o};Lt.prototype.render=function(e,t,n,r){var i=this.getConfigTags(r),o=this.parse(e,i),s=t instanceof Ei?t:new Ei(t,void 0);return this.renderTokens(o,s,n,e,r)};Lt.prototype.renderTokens=function(e,t,n,r,i){for(var o="",s,a,l,u=0,d=e.length;u<d;++u)l=void 0,s=e[u],a=s[0],a==="#"?l=this.renderSection(s,t,n,r,i):a==="^"?l=this.renderInverted(s,t,n,r,i):a===">"?l=this.renderPartial(s,t,n,i):a==="&"?l=this.unescapedValue(s,t):a==="name"?l=this.escapedValue(s,t,i):a==="text"&&(l=this.rawValue(s)),l!==void 0&&(o+=l);return o};Lt.prototype.renderSection=function(e,t,n,r,i){var o=this,s="",a=t.lookup(e[1]);function l(h){return o.render(h,t,n,i)}if(a){if(Li(a))for(var u=0,d=a.length;u<d;++u)s+=this.renderTokens(e[4],t.push(a[u]),n,r,i);else if(typeof a=="object"||typeof a=="string"||typeof a=="number")s+=this.renderTokens(e[4],t.push(a),n,r,i);else if(Qh(a)){if(typeof r!="string")throw new Error("Cannot use higher-order sections without the original template");a=a.call(t.view,r.slice(e[3],e[5]),l),a!=null&&(s+=a)}else s+=this.renderTokens(e[4],t,n,r,i);return s}};Lt.prototype.renderInverted=function(e,t,n,r,i){var o=t.lookup(e[1]);if(!o||Li(o)&&o.length===0)return this.renderTokens(e[4],t,n,r,i)};Lt.prototype.indentPartial=function(e,t,n){for(var r=t.replace(/[^ \t]/g,""),i=e.split(`
33
33
  `),o=0;o<i.length;o++)i[o].length&&(o>0||!n)&&(i[o]=r+i[o]);return i.join(`
34
- `)};Ne.prototype.renderPartial=function(t,e,n,r){if(n){var i=this.getConfigTags(r),o=Sh(n)?n(t[1]):n[t[1]];if(o!=null){var s=t[6],a=t[5],l=t[4],u=o;a==0&&l&&(u=this.indentPartial(o,l,s));var f=this.parse(u,i);return this.renderTokens(f,e,n,u,r)}}};Ne.prototype.unescapedValue=function(t,e){var n=e.lookup(t[1]);if(n!=null)return n};Ne.prototype.escapedValue=function(t,e,n){var r=this.getConfigEscape(n)||tn.escape,i=e.lookup(t[1]);if(i!=null)return typeof i=="number"&&r===tn.escape?String(i):r(i)};Ne.prototype.rawValue=function(t){return t[1]};Ne.prototype.getConfigTags=function(t){return Ii(t)?t:t&&typeof t=="object"?t.tags:void 0};Ne.prototype.getConfigEscape=function(t){if(t&&typeof t=="object"&&!Ii(t))return t.escape};var tn={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(t){ao.templateCache=t},get templateCache(){return ao.templateCache}},ao=new Ne;tn.clearCache=function(){return ao.clearCache()};tn.parse=function(t,e){return ao.parse(t,e)};tn.render=function(t,e,n,r){if(typeof t!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+W2(t)+'" was given as the first argument for mustache#render(template, view, partials)');return ao.render(t,e,n,r)};tn.escape=tN;tn.Scanner=Do;tn.Context=pi;tn.Writer=Ne;var $v=tn;$v.escape=q2.MustacheUtils.escapeHtml;var lN=class Vc{transform(e,n){return e?$v.render(e,j({},n)):null}static \u0275fac=function(e){return new(e||Vc)};static \u0275pipe=ih({name:"cooeeDynamicVariables",type:Vc,pure:!0})},Ra=class jc{constructor(e){this.sanitizer=e}transform(e){return e?this.sanitizer.bypassSecurityTrustHtml(e):""}static \u0275fac=function(e){return new(e||jc)(Ee(dv,16))};static \u0275pipe=ih({name:"safeHtml",type:jc,pure:!0})},Ch={};(function t(e,n,r,i){var o=!!(e.Worker&&e.Blob&&e.Promise&&e.OffscreenCanvas&&e.OffscreenCanvasRenderingContext2D&&e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype.transferControlToOffscreen&&e.URL&&e.URL.createObjectURL),s=typeof Path2D=="function"&&typeof DOMMatrix=="function",a=function(){if(!e.OffscreenCanvas)return!1;var b=new OffscreenCanvas(1,1),v=b.getContext("2d");v.fillRect(0,0,1,1);var k=b.transferToImageBitmap();try{v.createPattern(k,"no-repeat")}catch{return!1}return!0}();function l(){}function u(b){var v=n.exports.Promise,k=v!==void 0?v:e.Promise;return typeof k=="function"?new k(b):(b(l,l),null)}var f=function(b,v){return{transform:function(k){if(b)return k;if(v.has(k))return v.get(k);var U=new OffscreenCanvas(k.width,k.height),G=U.getContext("2d");return G.drawImage(k,0,0),v.set(k,U),U},clear:function(){v.clear()}}}(a,new Map),d=function(){var b=Math.floor(16.666666666666668),v,k,U={},G=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(v=function(nt){var et=Math.random();return U[et]=requestAnimationFrame(function K(ct){G===ct||G+b-1<ct?(G=ct,delete U[et],nt()):U[et]=requestAnimationFrame(K)}),et},k=function(nt){U[nt]&&cancelAnimationFrame(U[nt])}):(v=function(nt){return setTimeout(nt,b)},k=function(nt){return clearTimeout(nt)}),{frame:v,cancel:k}}(),_=function(){var b,v,k={};function U(G){function nt(et,K){G.postMessage({options:et||{},callback:K})}G.init=function(et){var K=et.transferControlToOffscreen();G.postMessage({canvas:K},[K])},G.fire=function(et,K,ct){if(v)return nt(et,null),v;var ft=Math.random().toString(36).slice(2);return v=u(function(Et){function X(ot){ot.data.callback===ft&&(delete k[ft],G.removeEventListener("message",X),v=null,f.clear(),ct(),Et())}G.addEventListener("message",X),nt(et,ft),k[ft]=X.bind(null,{data:{callback:ft}})}),v},G.reset=function(){G.postMessage({reset:!0});for(var et in k)k[et](),delete k[et]}}return function(){if(b)return b;if(!r&&o){var G=["var CONFETTI, SIZE = {}, module = {};","("+t.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(`
35
- `);try{b=new Worker(URL.createObjectURL(new Blob([G])))}catch(nt){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",nt),null}U(b)}return b}}(),y={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 x(b,v){return v?v(b):b}function I(b){return b!=null}function V(b,v,k){return x(b&&I(b[v])?b[v]:y[v],k)}function L(b){return b<0?0:Math.floor(b)}function Z(b,v){return Math.floor(Math.random()*(v-b))+b}function W(b){return parseInt(b,16)}function B(b){return b.map(lt)}function lt(b){var v=String(b).replace(/[^0-9a-f]/gi,"");return v.length<6&&(v=v[0]+v[0]+v[1]+v[1]+v[2]+v[2]),{r:W(v.substring(0,2)),g:W(v.substring(2,4)),b:W(v.substring(4,6))}}function Ht(b){var v=V(b,"origin",Object);return v.x=V(v,"x",Number),v.y=V(v,"y",Number),v}function At(b){b.width=document.documentElement.clientWidth,b.height=document.documentElement.clientHeight}function $(b){var v=b.getBoundingClientRect();b.width=v.width,b.height=v.height}function _t(b){var v=document.createElement("canvas");return v.style.position="fixed",v.style.top="0px",v.style.left="0px",v.style.pointerEvents="none",v.style.zIndex=b,v}function ht(b,v,k,U,G,nt,et,K,ct){b.save(),b.translate(v,k),b.rotate(nt),b.scale(U,G),b.arc(0,0,1,et,K,ct),b.restore()}function bt(b){var v=b.angle*(Math.PI/180),k=b.spread*(Math.PI/180);return{x:b.x,y:b.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:b.startVelocity*.5+Math.random()*b.startVelocity,angle2D:-v+(.5*k-Math.random()*k),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:b.color,shape:b.shape,tick:0,totalTicks:b.ticks,decay:b.decay,drift:b.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:b.gravity*3,ovalScalar:.6,scalar:b.scalar,flat:b.flat}}function kt(b,v){v.x+=Math.cos(v.angle2D)*v.velocity+v.drift,v.y+=Math.sin(v.angle2D)*v.velocity+v.gravity,v.velocity*=v.decay,v.flat?(v.wobble=0,v.wobbleX=v.x+10*v.scalar,v.wobbleY=v.y+10*v.scalar,v.tiltSin=0,v.tiltCos=0,v.random=1):(v.wobble+=v.wobbleSpeed,v.wobbleX=v.x+10*v.scalar*Math.cos(v.wobble),v.wobbleY=v.y+10*v.scalar*Math.sin(v.wobble),v.tiltAngle+=.1,v.tiltSin=Math.sin(v.tiltAngle),v.tiltCos=Math.cos(v.tiltAngle),v.random=Math.random()+2);var k=v.tick++/v.totalTicks,U=v.x+v.random*v.tiltCos,G=v.y+v.random*v.tiltSin,nt=v.wobbleX+v.random*v.tiltCos,et=v.wobbleY+v.random*v.tiltSin;if(b.fillStyle="rgba("+v.color.r+", "+v.color.g+", "+v.color.b+", "+(1-k)+")",b.beginPath(),s&&v.shape.type==="path"&&typeof v.shape.path=="string"&&Array.isArray(v.shape.matrix))b.fill(Dt(v.shape.path,v.shape.matrix,v.x,v.y,Math.abs(nt-U)*.1,Math.abs(et-G)*.1,Math.PI/10*v.wobble));else if(v.shape.type==="bitmap"){var K=Math.PI/10*v.wobble,ct=Math.abs(nt-U)*.1,ft=Math.abs(et-G)*.1,Et=v.shape.bitmap.width*v.scalar,X=v.shape.bitmap.height*v.scalar,ot=new DOMMatrix([Math.cos(K)*ct,Math.sin(K)*ct,-Math.sin(K)*ft,Math.cos(K)*ft,v.x,v.y]);ot.multiplySelf(new DOMMatrix(v.shape.matrix));var gt=b.createPattern(f.transform(v.shape.bitmap),"no-repeat");gt.setTransform(ot),b.globalAlpha=1-k,b.fillStyle=gt,b.fillRect(v.x-Et/2,v.y-X/2,Et,X),b.globalAlpha=1}else if(v.shape==="circle")b.ellipse?b.ellipse(v.x,v.y,Math.abs(nt-U)*v.ovalScalar,Math.abs(et-G)*v.ovalScalar,Math.PI/10*v.wobble,0,2*Math.PI):ht(b,v.x,v.y,Math.abs(nt-U)*v.ovalScalar,Math.abs(et-G)*v.ovalScalar,Math.PI/10*v.wobble,0,2*Math.PI);else if(v.shape==="star")for(var ut=Math.PI/2*3,c=4*v.scalar,h=8*v.scalar,p=v.x,S=v.y,N=5,M=Math.PI/N;N--;)p=v.x+Math.cos(ut)*h,S=v.y+Math.sin(ut)*h,b.lineTo(p,S),ut+=M,p=v.x+Math.cos(ut)*c,S=v.y+Math.sin(ut)*c,b.lineTo(p,S),ut+=M;else b.moveTo(Math.floor(v.x),Math.floor(v.y)),b.lineTo(Math.floor(v.wobbleX),Math.floor(G)),b.lineTo(Math.floor(nt),Math.floor(et)),b.lineTo(Math.floor(U),Math.floor(v.wobbleY));return b.closePath(),b.fill(),v.tick<v.totalTicks}function $t(b,v,k,U,G){var nt=v.slice(),et=b.getContext("2d"),K,ct,ft=u(function(Et){function X(){K=ct=null,et.clearRect(0,0,U.width,U.height),f.clear(),G(),Et()}function ot(){r&&!(U.width===i.width&&U.height===i.height)&&(U.width=b.width=i.width,U.height=b.height=i.height),!U.width&&!U.height&&(k(b),U.width=b.width,U.height=b.height),et.clearRect(0,0,U.width,U.height),nt=nt.filter(function(gt){return kt(et,gt)}),nt.length?K=d.frame(ot):X()}K=d.frame(ot),ct=X});return{addFettis:function(Et){return nt=nt.concat(Et),ft},canvas:b,promise:ft,reset:function(){K&&d.cancel(K),ct&&ct()}}}function m(b,v){var k=!b,U=!!V(v||{},"resize"),G=!1,nt=V(v,"disableForReducedMotion",Boolean),et=o&&!!V(v||{},"useWorker"),K=et?_():null,ct=k?At:$,ft=b&&K?!!b.__confetti_initialized:!1,Et=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,X;function ot(ut,c,h){for(var p=V(ut,"particleCount",L),S=V(ut,"angle",Number),N=V(ut,"spread",Number),M=V(ut,"startVelocity",Number),J=V(ut,"decay",Number),rt=V(ut,"gravity",Number),Lt=V(ut,"drift",Number),Ct=V(ut,"colors",B),Mt=V(ut,"ticks",Number),Rt=V(ut,"shapes"),ye=V(ut,"scalar"),Rn=!!V(ut,"flat"),le=Ht(ut),on=p,wn=[],Zn=b.width*le.x,Me=b.height*le.y;on--;)wn.push(bt({x:Zn,y:Me,angle:S,spread:N,startVelocity:M,color:Ct[on%Ct.length],shape:Rt[Z(0,Rt.length)],ticks:Mt,decay:J,gravity:rt,drift:Lt,scalar:ye,flat:Rn}));return X?X.addFettis(wn):(X=$t(b,wn,ct,c,h),X.promise)}function gt(ut){var c=nt||V(ut,"disableForReducedMotion",Boolean),h=V(ut,"zIndex",Number);if(c&&Et)return u(function(M){M()});k&&X?b=X.canvas:k&&!b&&(b=_t(h),document.body.appendChild(b)),U&&!ft&&ct(b);var p={width:b.width,height:b.height};K&&!ft&&K.init(b),ft=!0,K&&(b.__confetti_initialized=!0);function S(){if(K){var M={getBoundingClientRect:function(){if(!k)return b.getBoundingClientRect()}};ct(M),K.postMessage({resize:{width:M.width,height:M.height}});return}p.width=p.height=null}function N(){X=null,U&&(G=!1,e.removeEventListener("resize",S)),k&&b&&(document.body.contains(b)&&document.body.removeChild(b),b=null,ft=!1)}return U&&!G&&(G=!0,e.addEventListener("resize",S,!1)),K?K.fire(ut,p,N):ot(ut,p,N)}return gt.reset=function(){K&&K.reset(),X&&X.reset()},gt}var Yt;function re(){return Yt||(Yt=m(null,{useWorker:!0,resize:!0})),Yt}function Dt(b,v,k,U,G,nt,et){var K=new Path2D(b),ct=new Path2D;ct.addPath(K,new DOMMatrix(v));var ft=new Path2D;return ft.addPath(ct,new DOMMatrix([Math.cos(et)*G,Math.sin(et)*G,-Math.sin(et)*nt,Math.cos(et)*nt,k,U])),ft}function R(b){if(!s)throw new Error("path confetti are not supported in this browser");var v,k;typeof b=="string"?v=b:(v=b.path,k=b.matrix);var U=new Path2D(v),G=document.createElement("canvas"),nt=G.getContext("2d");if(!k){for(var et=1e3,K=et,ct=et,ft=0,Et=0,X,ot,gt=0;gt<et;gt+=2)for(var ut=0;ut<et;ut+=2)nt.isPointInPath(U,gt,ut,"nonzero")&&(K=Math.min(K,gt),ct=Math.min(ct,ut),ft=Math.max(ft,gt),Et=Math.max(Et,ut));X=ft-K,ot=Et-ct;var c=10,h=Math.min(c/X,c/ot);k=[h,0,0,h,-Math.round(X/2+K)*h,-Math.round(ot/2+ct)*h]}return{type:"path",path:v,matrix:k}}function D(b){var v,k=1,U="#000000",G='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof b=="string"?v=b:(v=b.text,k="scalar"in b?b.scalar:k,G="fontFamily"in b?b.fontFamily:G,U="color"in b?b.color:U);var nt=10*k,et=""+nt+"px "+G,K=new OffscreenCanvas(nt,nt),ct=K.getContext("2d");ct.font=et;var ft=ct.measureText(v),Et=Math.ceil(ft.actualBoundingBoxRight+ft.actualBoundingBoxLeft),X=Math.ceil(ft.actualBoundingBoxAscent+ft.actualBoundingBoxDescent),ot=2,gt=ft.actualBoundingBoxLeft+ot,ut=ft.actualBoundingBoxAscent+ot;Et+=ot+ot,X+=ot+ot,K=new OffscreenCanvas(Et,X),ct=K.getContext("2d"),ct.font=et,ct.fillStyle=U,ct.fillText(v,gt,ut);var c=1/k;return{type:"bitmap",bitmap:K.transferToImageBitmap(),matrix:[c,0,0,c,-Et*c/2,-X*c/2]}}n.exports=function(){return re().apply(this,arguments)},n.exports.reset=function(){re().reset()},n.exports.create=m,n.exports.shapeFromPath=R,n.exports.shapeFromText=D})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),Ch,!1);var cN=Ch.exports,tL=Ch.exports.create,uN=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(t=100){let e=[],n=Date.now()+2e3,r=()=>{e.push(this.fire({angle:60,spread:55,origin:{x:0}}),this.fire({angle:120,spread:55,origin:{x:1}})),Date.now()<n&&t>0&&(requestAnimationFrame(r),t--)};r(),await Promise.all(e)}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(t){Object.assign(t,this.DEFAULTS,t),t.particleCount=t.particleCount??this.DEFAULTS.colors.length,await cN(t)}static async realisticFire(t,e){let n={origin:{y:.7}};await this.fire(Object.assign({},n,e,{particleCount:Math.floor(200*t)}))}},hN=(t,e)=>e.minValue;function fN(t,e){if(t&1&&(Q(0,"li",6)(1,"div",7),Bt(2,"div",8),Ue(3,"cooeeCurrency"),Ue(4,"safeHtml"),Bt(5,"img",9),Q(6,"div",10),ne(7),tt()()()),t&2){let n=e.$implicit,r=it(2);ba("left",n.calculatedAlignment+"%"),Y(2),Pt("innerHTML",Qe(4,7,Qe(3,5,n.minValue)),Ur),Y(3),Pt("src",r.getIconURL(n),rn),Y(2),Ea(n.label)}}function dN(t,e){if(t&1&&(Si(0)(1),Bt(2,"div",0),Ue(3,"cooeeDynamicVariables"),Ue(4,"safeHtml"),Q(5,"div",1)(6,"ul",2)(7,"div",3),Bt(8,"div",4),tt(),$e(9,fN,8,9,"li",5,hN),tt()()),t&2){let n=it(),r=n.calculatedState(),i=r.nextMilestone?r.nextMilestone.reachingText:r.lastMilestone.reachedText;Y(2),Pt("innerHTML",Qe(4,6,gI(3,3,i,n.localDynamicVariables())),Ur),Y(6),ba("width",r.cartValuePercentage+"%"),Y(),ze(r.milestones)}}var pN=class Fc{constructor(e){this.elementRef=e,this.elementRef.nativeElement.update=this.update.bind(this)}cart;localDynamicVariables=Ln({});calculatedState=Ln({});_engagementTrigger=Ln(null);progressBarConfig;set engagementTrigger(e){this._engagementTrigger.set(e),this.progressBarConfig=e.progressBarConfig}ngOnInit(){Ve.debug("Init progressbar"),this.calculateMilestonesSilently()}ngOnDestroy(){Ve.debug("Destroying progressbar")}update(){this.calculateMilestonesSilently()}getIconURL(e){return e.rewardType===fl.MilestoneRewardType.FREE_SHIPPING?"https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png":e.rewardType===fl.MilestoneRewardType.DISCOUNT?"https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png":e.rewardType===fl.MilestoneRewardType.FREE_AUTO_GIFT?"https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png":""}calculateMilestonesSilently(){this.calculateMilestones().catch(e=>Ve.error(e))}async calculateMilestones(){let e=this._engagementTrigger();if(!e?.progressBarConfig?.milestones?.length){Ve.warn("Milestones not available in progress bar config",e);return}let n=await this.cart.getNormalisedCart(),r=e.progressBarConfig,i=r.milestones.at(-1),o=n.originalAmount,s=r.totalProgress??0;Ve.debug("Cart value:",o,`, percentage: ${s}%`),this.celebrate(e,o);let a={milestonesReady:!0,cartValuePercentage:s,milestones:r.milestones},l=r.milestones.find(u=>u.minValue>o);if(l){this.localDynamicVariables.set({amount_left:xh(l.minValue-o)}),a.nextMilestone=l,this.calculatedState.set(a);return}a.lastMilestone=i,this.calculatedState.set(a)}celebrate(e,n){let r=[...e.progressBarConfig.milestones].reverse().find(o=>o.minValue<n);if(!r)return;let i=`lc/en/${e.shortID}/${r.minValue}`;sessionStorage.getItem(i)||(sessionStorage.setItem(i,"1"),this.progressBarConfig?.noConfetti||uN.realistic())}static \u0275fac=function(e){return new(e||Fc)(Ee(Le))};static \u0275cmp=Re({type:Fc,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(e,n){e&1&&se(0,dN,11,8),e&2&&te(n.calculatedState().milestonesReady?0:-1)},dependencies:[lN,Ra,Da],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}"]})},gN=en(Ap()),zv=class Bc{cooeeEvent=new Xt;cooeeCTA=new Xt;elementRef=P(Le);_engagementTrigger=Ln(null);_triggerContext=Ln(null);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get triggerContext(){return this._triggerContext()}set triggerContext(e){this._triggerContext.set(e),this._engagementTrigger.set(e.triggerData),this.engagementTriggerReceived(e.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){Ve.debug("Init",this.constructor.name)}ngOnDestroy(){Ve.debug("Destroying",this.constructor.name)}sendEventToRenderer(e){this.cooeeEvent.emit(e)}executeCTAViaRenderer(e){this.cooeeCTA.emit(e)}static \u0275fac=function(e){return new(e||Bc)};static \u0275cmp=Re({type:Bc,selectors:[["ng-component"]],inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:0,vars:0,template:function(e,n){},encapsulation:2})},mN=(t,e)=>({enter:t,exit:e});function _N(t,e){if(t&1&&(Q(0,"div",7),ne(1),tt(),Q(2,"div",8),ne(3),tt()),t&2){let n=it(2);Y(),On(" ",n.getCurrency(n.selectedVariant().price.cmp)," "),Y(2),On(" ",n.getDiscountPercentage(n.selectedVariant().price),"% off ")}}function vN(t,e){if(t&1&&(Q(0,"div",6),ne(1),tt()),t&2){let n=it(2);Y(),On(" ",n.stickyATCConfig.leftText," ")}}function yN(t,e){if(t&1&&(Q(0,"div",1)(1,"div",5),ne(2),tt(),se(3,_N,4,2)(4,vN,2,1,"div",6),tt()),t&2){let n=it();Y(2),On(" ",n.getCurrency(n.selectedVariant().price.d)," "),Y(),te(n.selectedVariant().price.cmp?3:-1),Y(),te(n.stickyATCConfig.leftText?4:-1)}}function bN(t,e){if(t&1&&(Q(0,"div",9),ne(1),tt()),t&2){let n=e.$implicit,r=e.$index;it(2);let i=ln(5);Pt("ngClass",dI(2,mN,r===i.currentIndex,r===i.previousIndex)),Y(),On(" ",n," ")}}function wN(t,e){if(t&1&&(Q(0,"div",4),$e(1,bN,2,5,"div",9,Ei),tt()),t&2){it();let n=ln(5);Y(),ze(n.features)}}var EN=class Uc extends zv{currentItem;stickyATCConfig;selectedVariant=Ln(void 0);featureSlider=Ln({features:[],currentIndex:0});constructor(){super()}engagementTriggerReceived(e){this.stickyATCConfig=e.stickyATCConfig??{},this.currentItem=e.items[0],this.selectedVariant.set(this.currentItem.vars[0]),this.stickyATCConfig.leftText=this.replaceVariables(this.stickyATCConfig.leftText),this.stickyATCConfig.rightText=this.replaceVariables(this.stickyATCConfig.rightText),this.startFeatureRotation()}update(){}getCurrency(e){return xh(e)}getDiscountPercentage(e){return((e.cmp-e.d)/e.cmp*100).toFixed(0)}async addToCart(){this.executeCTAViaRenderer({clickAction:{at:102},item:this.currentItem})}startFeatureRotation(){if(!this.stickyATCConfig.rightText)return;let e=this.stickyATCConfig.rightText.split(`
36
- `),n=e.length===1?null:setInterval(()=>{this.featureSlider.update(r=>Zt(j({},r),{previousIndex:r.currentIndex,currentIndex:(r.currentIndex+1)%r.features.length}))},3e3);this.featureSlider.set({intervalRef:n,currentIndex:0,features:e})}replaceVariables(e){return e?(0,gN.render)(e,this.currentItem.getTemplateVariables()):""}static \u0275fac=function(e){return new(e||Uc)};static \u0275cmp=Re({type:Uc,selectors:[["cooee-sticky-atc"]],features:[wi],decls:7,vars:3,consts:[[1,"lc-wrapper"],[1,"lc-prices"],[1,"lc-button-wrapper"],["type","button",1,"lc-button","lc-button-atc",3,"click"],[1,"lc-features"],[1,"lc-sale-price"],[1,"lc-additional-text"],[1,"lc-compare-price"],[1,"lc-discount-label"],[1,"lc-feature",3,"ngClass"]],template:function(e,n){if(e&1){let r=qe();Q(0,"div",0),se(1,yN,5,3,"div",1),Q(2,"div",2)(3,"button",3),ee("click",function(){return ue(r),he(n.addToCart())}),ne(4,"Add To Cart"),tt(),Si(5),se(6,wN,3,0,"div",4),tt()()}if(e&2){Y(),te(n.selectedVariant()&&n.stickyATCConfig.showProductInfo?1:-1),Y(4);let r=ii(n.featureSlider());Y(),te(r.features.length?6:-1)}},dependencies:[xa],styles:["[_nghost-%COMP%]{display:flex;justify-content:center;padding:10px;background-color:#fff;width:100%;box-shadow:4px 0 10px #0006;line-height:normal}.lc-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:8px;max-width:1100px;width:100%}.lc-prices[_ngcontent-%COMP%]{flex:1 1 100%;display:flex;flex-wrap:wrap;align-items:center;gap:6px}@media (min-width: 768px){.lc-prices[_ngcontent-%COMP%]{gap:8px}}.lc-sale-price[_ngcontent-%COMP%]{font-size:24px;font-weight:600}.lc-compare-price[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:red;text-decoration:line-through}.lc-discount-label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:green}.lc-button-wrapper[_ngcontent-%COMP%]{flex:1 1 100%;display:flex;flex-direction:column;gap:4px;align-items:center}.lc-button[_ngcontent-%COMP%]{background-color:#000;color:#fff;opacity:1;cursor:pointer;pointer-events:auto;border-radius:4px;min-width:150px;width:100%;padding:8px}.lc-additional-text[_ngcontent-%COMP%], .lc-feature[_ngcontent-%COMP%]{font-size:12px;color:#666}.lc-features[_ngcontent-%COMP%]{position:relative;overflow:hidden;height:16px;text-align:center;width:100%}.lc-features[_ngcontent-%COMP%] .lc-feature[_ngcontent-%COMP%]{position:absolute;width:100%;opacity:0;transform:translateY(100%);transition:transform .5s ease,opacity .5s ease}.lc-features[_ngcontent-%COMP%] .lc-feature.enter[_ngcontent-%COMP%]{opacity:1;transform:translateY(0);z-index:2}.lc-features[_ngcontent-%COMP%] .lc-feature.exit[_ngcontent-%COMP%]{opacity:0;transform:translateY(-100%);z-index:1}"]})},Wo=en(L0()),xN=en(uo()),qv=(t=>(t.GALLERY="GALLERY",t.CURRENT_PRODUCT="CURRENT_PRODUCT",t))(qv||{}),Gv=(t=>(t.SIMPLE="SIMPLE",t.SWIPER="SWIPER",t.STORY="STORY",t.FLOATING_POPUP="FLOATING_POPUP",t))(Gv||{}),Wv=(t=>(t.ON="ON",t.OFF="OFF",t.ON_HOVER="ON_HOVER",t))(Wv||{}),Zv=(t=>(t.FIRST_ITEM="FIRST_ITEM",t.BADGE="BADGE",t.NONE="NONE",t))(Zv||{});function SN(t,e){return e={exports:{}},t(e,e.exports),e.exports}var CN=DN,IN=NN,TN=AN,Sn=[],Ye=[],ON=typeof Uint8Array<"u"?Uint8Array:Array,_l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(fr=0,Bd=_l.length;fr<Bd;++fr)Sn[fr]=_l[fr],Ye[_l.charCodeAt(fr)]=fr;var fr,Bd;Ye[45]=62;Ye[95]=63;function Yv(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function DN(t){var e=Yv(t),n=e[0],r=e[1];return(n+r)*3/4-r}function RN(t,e,n){return(e+n)*3/4-n}function NN(t){var e,n=Yv(t),r=n[0],i=n[1],o=new ON(RN(t,r,i)),s=0,a=i>0?r-4:r,l;for(l=0;l<a;l+=4)e=Ye[t.charCodeAt(l)]<<18|Ye[t.charCodeAt(l+1)]<<12|Ye[t.charCodeAt(l+2)]<<6|Ye[t.charCodeAt(l+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=Ye[t.charCodeAt(l)]<<2|Ye[t.charCodeAt(l+1)]>>4,o[s++]=e&255),i===1&&(e=Ye[t.charCodeAt(l)]<<10|Ye[t.charCodeAt(l+1)]<<4|Ye[t.charCodeAt(l+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function PN(t){return Sn[t>>18&63]+Sn[t>>12&63]+Sn[t>>6&63]+Sn[t&63]}function kN(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(PN(r));return i.join("")}function AN(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,a=n-r;s<a;s+=o)i.push(kN(t,s,s+o>a?a:s+o));return r===1?(e=t[n-1],i.push(Sn[e>>2]+Sn[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(Sn[e>>10]+Sn[e>>4&63]+Sn[e<<2&63]+"=")),i.join("")}var vl={byteLength:CN,toByteArray:IN,fromByteArray:TN},LN=function(t,e,n,r,i){var o,s,a=i*8-r-1,l=(1<<a)-1,u=l>>1,f=-7,d=n?i-1:0,_=n?-1:1,y=t[e+d];for(d+=_,o=y&(1<<-f)-1,y>>=-f,f+=a;f>0;o=o*256+t[e+d],d+=_,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=r;f>0;s=s*256+t[e+d],d+=_,f-=8);if(o===0)o=1-u;else{if(o===l)return s?NaN:(y?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-u}return(y?-1:1)*s*Math.pow(2,o-r)},MN=function(t,e,n,r,i,o){var s,a,l,u=o*8-i-1,f=(1<<u)-1,d=f>>1,_=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=r?0:o-1,x=r?1:-1,I=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+d>=1?e+=_/l:e+=_*Math.pow(2,1-d),e*l>=2&&(s++,l/=2),s+d>=f?(a=0,s=f):s+d>=1?(a=(e*l-1)*Math.pow(2,i),s=s+d):(a=e*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;t[n+y]=a&255,y+=x,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[n+y]=s&255,y+=x,s/=256,u-=8);t[n+y-x]|=I*128},qr={read:LN,write:MN},Na=SN(function(t,e){var n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=L,e.INSPECT_MAX_BYTES=50;var r=2147483647;e.kMaxLength=r,s.TYPED_ARRAY_SUPPORT=i(),!s.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 c=new Uint8Array(1),h={foo:function(){return 42}};return Object.setPrototypeOf(h,Uint8Array.prototype),Object.setPrototypeOf(c,h),c.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(c){if(c>r)throw new RangeError('The value "'+c+'" is invalid for option "size"');var h=new Uint8Array(c);return Object.setPrototypeOf(h,s.prototype),h}function s(c,h,p){if(typeof c=="number"){if(typeof h=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(c)}return a(c,h,p)}s.poolSize=8192;function a(c,h,p){if(typeof c=="string")return d(c,h);if(ArrayBuffer.isView(c))return y(c);if(c==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(c));if(ot(c,ArrayBuffer)||c&&ot(c.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ot(c,SharedArrayBuffer)||c&&ot(c.buffer,SharedArrayBuffer)))return x(c,h,p);if(typeof c=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var S=c.valueOf&&c.valueOf();if(S!=null&&S!==c)return s.from(S,h,p);var N=I(c);if(N)return N;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof c[Symbol.toPrimitive]=="function")return s.from(c[Symbol.toPrimitive]("string"),h,p);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(c))}s.from=function(c,h,p){return a(c,h,p)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(c){if(typeof c!="number")throw new TypeError('"size" argument must be of type number');if(c<0)throw new RangeError('The value "'+c+'" is invalid for option "size"')}function u(c,h,p){return l(c),c<=0?o(c):h!==void 0?typeof p=="string"?o(c).fill(h,p):o(c).fill(h):o(c)}s.alloc=function(c,h,p){return u(c,h,p)};function f(c){return l(c),o(c<0?0:V(c)|0)}s.allocUnsafe=function(c){return f(c)},s.allocUnsafeSlow=function(c){return f(c)};function d(c,h){if((typeof h!="string"||h==="")&&(h="utf8"),!s.isEncoding(h))throw new TypeError("Unknown encoding: "+h);var p=Z(c,h)|0,S=o(p),N=S.write(c,h);return N!==p&&(S=S.slice(0,N)),S}function _(c){for(var h=c.length<0?0:V(c.length)|0,p=o(h),S=0;S<h;S+=1)p[S]=c[S]&255;return p}function y(c){if(ot(c,Uint8Array)){var h=new Uint8Array(c);return x(h.buffer,h.byteOffset,h.byteLength)}return _(c)}function x(c,h,p){if(h<0||c.byteLength<h)throw new RangeError('"offset" is outside of buffer bounds');if(c.byteLength<h+(p||0))throw new RangeError('"length" is outside of buffer bounds');var S;return h===void 0&&p===void 0?S=new Uint8Array(c):p===void 0?S=new Uint8Array(c,h):S=new Uint8Array(c,h,p),Object.setPrototypeOf(S,s.prototype),S}function I(c){if(s.isBuffer(c)){var h=V(c.length)|0,p=o(h);return p.length===0||c.copy(p,0,0,h),p}if(c.length!==void 0)return typeof c.length!="number"||gt(c.length)?o(0):_(c);if(c.type==="Buffer"&&Array.isArray(c.data))return _(c.data)}function V(c){if(c>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return c|0}function L(c){return+c!=c&&(c=0),s.alloc(+c)}s.isBuffer=function(c){return c!=null&&c._isBuffer===!0&&c!==s.prototype},s.compare=function(c,h){if(ot(c,Uint8Array)&&(c=s.from(c,c.offset,c.byteLength)),ot(h,Uint8Array)&&(h=s.from(h,h.offset,h.byteLength)),!s.isBuffer(c)||!s.isBuffer(h))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===h)return 0;for(var p=c.length,S=h.length,N=0,M=Math.min(p,S);N<M;++N)if(c[N]!==h[N]){p=c[N],S=h[N];break}return p<S?-1:S<p?1:0},s.isEncoding=function(c){switch(String(c).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}},s.concat=function(c,h){if(!Array.isArray(c))throw new TypeError('"list" argument must be an Array of Buffers');if(c.length===0)return s.alloc(0);var p;if(h===void 0)for(h=0,p=0;p<c.length;++p)h+=c[p].length;var S=s.allocUnsafe(h),N=0;for(p=0;p<c.length;++p){var M=c[p];if(ot(M,Uint8Array))N+M.length>S.length?s.from(M).copy(S,N):Uint8Array.prototype.set.call(S,M,N);else if(s.isBuffer(M))M.copy(S,N);else throw new TypeError('"list" argument must be an Array of Buffers');N+=M.length}return S};function Z(c,h){if(s.isBuffer(c))return c.length;if(ArrayBuffer.isView(c)||ot(c,ArrayBuffer))return c.byteLength;if(typeof c!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(c));var p=c.length,S=arguments.length>2&&arguments[2]===!0;if(!S&&p===0)return 0;for(var N=!1;;)switch(h){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return K(c).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p*2;case"hex":return p>>>1;case"base64":return Et(c).length;default:if(N)return S?-1:K(c).length;h=(""+h).toLowerCase(),N=!0}}s.byteLength=Z;function W(c,h,p){var S=!1;if((h===void 0||h<0)&&(h=0),h>this.length||((p===void 0||p>this.length)&&(p=this.length),p<=0)||(p>>>=0,h>>>=0,p<=h))return"";for(c||(c="utf8");;)switch(c){case"hex":return R(this,h,p);case"utf8":case"utf-8":return $t(this,h,p);case"ascii":return re(this,h,p);case"latin1":case"binary":return Dt(this,h,p);case"base64":return kt(this,h,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,h,p);default:if(S)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),S=!0}}s.prototype._isBuffer=!0;function B(c,h,p){var S=c[h];c[h]=c[p],c[p]=S}s.prototype.swap16=function(){var c=this.length;if(c%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var h=0;h<c;h+=2)B(this,h,h+1);return this},s.prototype.swap32=function(){var c=this.length;if(c%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var h=0;h<c;h+=4)B(this,h,h+3),B(this,h+1,h+2);return this},s.prototype.swap64=function(){var c=this.length;if(c%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var h=0;h<c;h+=8)B(this,h,h+7),B(this,h+1,h+6),B(this,h+2,h+5),B(this,h+3,h+4);return this},s.prototype.toString=function(){var c=this.length;return c===0?"":arguments.length===0?$t(this,0,c):W.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(c){if(!s.isBuffer(c))throw new TypeError("Argument must be a Buffer");return this===c?!0:s.compare(this,c)===0},s.prototype.inspect=function(){var c="",h=e.INSPECT_MAX_BYTES;return c=this.toString("hex",0,h).replace(/(.{2})/g,"$1 ").trim(),this.length>h&&(c+=" ... "),"<Buffer "+c+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(c,h,p,S,N){if(ot(c,Uint8Array)&&(c=s.from(c,c.offset,c.byteLength)),!s.isBuffer(c))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(c));if(h===void 0&&(h=0),p===void 0&&(p=c?c.length:0),S===void 0&&(S=0),N===void 0&&(N=this.length),h<0||p>c.length||S<0||N>this.length)throw new RangeError("out of range index");if(S>=N&&h>=p)return 0;if(S>=N)return-1;if(h>=p)return 1;if(h>>>=0,p>>>=0,S>>>=0,N>>>=0,this===c)return 0;for(var M=N-S,J=p-h,rt=Math.min(M,J),Lt=this.slice(S,N),Ct=c.slice(h,p),Mt=0;Mt<rt;++Mt)if(Lt[Mt]!==Ct[Mt]){M=Lt[Mt],J=Ct[Mt];break}return M<J?-1:J<M?1:0};function lt(c,h,p,S,N){if(c.length===0)return-1;if(typeof p=="string"?(S=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),p=+p,gt(p)&&(p=N?0:c.length-1),p<0&&(p=c.length+p),p>=c.length){if(N)return-1;p=c.length-1}else if(p<0)if(N)p=0;else return-1;if(typeof h=="string"&&(h=s.from(h,S)),s.isBuffer(h))return h.length===0?-1:Ht(c,h,p,S,N);if(typeof h=="number")return h=h&255,typeof Uint8Array.prototype.indexOf=="function"?N?Uint8Array.prototype.indexOf.call(c,h,p):Uint8Array.prototype.lastIndexOf.call(c,h,p):Ht(c,[h],p,S,N);throw new TypeError("val must be string, number or Buffer")}function Ht(c,h,p,S,N){var M=1,J=c.length,rt=h.length;if(S!==void 0&&(S=String(S).toLowerCase(),S==="ucs2"||S==="ucs-2"||S==="utf16le"||S==="utf-16le")){if(c.length<2||h.length<2)return-1;M=2,J/=2,rt/=2,p/=2}function Lt(Rn,le){return M===1?Rn[le]:Rn.readUInt16BE(le*M)}var Ct;if(N){var Mt=-1;for(Ct=p;Ct<J;Ct++)if(Lt(c,Ct)===Lt(h,Mt===-1?0:Ct-Mt)){if(Mt===-1&&(Mt=Ct),Ct-Mt+1===rt)return Mt*M}else Mt!==-1&&(Ct-=Ct-Mt),Mt=-1}else for(p+rt>J&&(p=J-rt),Ct=p;Ct>=0;Ct--){for(var Rt=!0,ye=0;ye<rt;ye++)if(Lt(c,Ct+ye)!==Lt(h,ye)){Rt=!1;break}if(Rt)return Ct}return-1}s.prototype.includes=function(c,h,p){return this.indexOf(c,h,p)!==-1},s.prototype.indexOf=function(c,h,p){return lt(this,c,h,p,!0)},s.prototype.lastIndexOf=function(c,h,p){return lt(this,c,h,p,!1)};function At(c,h,p,S){p=Number(p)||0;var N=c.length-p;S?(S=Number(S),S>N&&(S=N)):S=N;var M=h.length;S>M/2&&(S=M/2);for(var J=0;J<S;++J){var rt=parseInt(h.substr(J*2,2),16);if(gt(rt))return J;c[p+J]=rt}return J}function $(c,h,p,S){return X(K(h,c.length-p),c,p,S)}function _t(c,h,p,S){return X(ct(h),c,p,S)}function ht(c,h,p,S){return X(Et(h),c,p,S)}function bt(c,h,p,S){return X(ft(h,c.length-p),c,p,S)}s.prototype.write=function(c,h,p,S){if(h===void 0)S="utf8",p=this.length,h=0;else if(p===void 0&&typeof h=="string")S=h,p=this.length,h=0;else if(isFinite(h))h=h>>>0,isFinite(p)?(p=p>>>0,S===void 0&&(S="utf8")):(S=p,p=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var N=this.length-h;if((p===void 0||p>N)&&(p=N),c.length>0&&(p<0||h<0)||h>this.length)throw new RangeError("Attempt to write outside buffer bounds");S||(S="utf8");for(var M=!1;;)switch(S){case"hex":return At(this,c,h,p);case"utf8":case"utf-8":return $(this,c,h,p);case"ascii":case"latin1":case"binary":return _t(this,c,h,p);case"base64":return ht(this,c,h,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return bt(this,c,h,p);default:if(M)throw new TypeError("Unknown encoding: "+S);S=(""+S).toLowerCase(),M=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function kt(c,h,p){return h===0&&p===c.length?vl.fromByteArray(c):vl.fromByteArray(c.slice(h,p))}function $t(c,h,p){p=Math.min(c.length,p);for(var S=[],N=h;N<p;){var M=c[N],J=null,rt=M>239?4:M>223?3:M>191?2:1;if(N+rt<=p){var Lt,Ct,Mt,Rt;switch(rt){case 1:M<128&&(J=M);break;case 2:Lt=c[N+1],(Lt&192)===128&&(Rt=(M&31)<<6|Lt&63,Rt>127&&(J=Rt));break;case 3:Lt=c[N+1],Ct=c[N+2],(Lt&192)===128&&(Ct&192)===128&&(Rt=(M&15)<<12|(Lt&63)<<6|Ct&63,Rt>2047&&(Rt<55296||Rt>57343)&&(J=Rt));break;case 4:Lt=c[N+1],Ct=c[N+2],Mt=c[N+3],(Lt&192)===128&&(Ct&192)===128&&(Mt&192)===128&&(Rt=(M&15)<<18|(Lt&63)<<12|(Ct&63)<<6|Mt&63,Rt>65535&&Rt<1114112&&(J=Rt))}}J===null?(J=65533,rt=1):J>65535&&(J-=65536,S.push(J>>>10&1023|55296),J=56320|J&1023),S.push(J),N+=rt}return Yt(S)}var m=4096;function Yt(c){var h=c.length;if(h<=m)return String.fromCharCode.apply(String,c);for(var p="",S=0;S<h;)p+=String.fromCharCode.apply(String,c.slice(S,S+=m));return p}function re(c,h,p){var S="";p=Math.min(c.length,p);for(var N=h;N<p;++N)S+=String.fromCharCode(c[N]&127);return S}function Dt(c,h,p){var S="";p=Math.min(c.length,p);for(var N=h;N<p;++N)S+=String.fromCharCode(c[N]);return S}function R(c,h,p){var S=c.length;(!h||h<0)&&(h=0),(!p||p<0||p>S)&&(p=S);for(var N="",M=h;M<p;++M)N+=ut[c[M]];return N}function D(c,h,p){for(var S=c.slice(h,p),N="",M=0;M<S.length-1;M+=2)N+=String.fromCharCode(S[M]+S[M+1]*256);return N}s.prototype.slice=function(c,h){var p=this.length;c=~~c,h=h===void 0?p:~~h,c<0?(c+=p,c<0&&(c=0)):c>p&&(c=p),h<0?(h+=p,h<0&&(h=0)):h>p&&(h=p),h<c&&(h=c);var S=this.subarray(c,h);return Object.setPrototypeOf(S,s.prototype),S};function b(c,h,p){if(c%1!==0||c<0)throw new RangeError("offset is not uint");if(c+h>p)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(c,h,p){c=c>>>0,h=h>>>0,p||b(c,h,this.length);for(var S=this[c],N=1,M=0;++M<h&&(N*=256);)S+=this[c+M]*N;return S},s.prototype.readUintBE=s.prototype.readUIntBE=function(c,h,p){c=c>>>0,h=h>>>0,p||b(c,h,this.length);for(var S=this[c+--h],N=1;h>0&&(N*=256);)S+=this[c+--h]*N;return S},s.prototype.readUint8=s.prototype.readUInt8=function(c,h){return c=c>>>0,h||b(c,1,this.length),this[c]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(c,h){return c=c>>>0,h||b(c,2,this.length),this[c]|this[c+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(c,h){return c=c>>>0,h||b(c,2,this.length),this[c]<<8|this[c+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(c,h){return c=c>>>0,h||b(c,4,this.length),(this[c]|this[c+1]<<8|this[c+2]<<16)+this[c+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(c,h){return c=c>>>0,h||b(c,4,this.length),this[c]*16777216+(this[c+1]<<16|this[c+2]<<8|this[c+3])},s.prototype.readIntLE=function(c,h,p){c=c>>>0,h=h>>>0,p||b(c,h,this.length);for(var S=this[c],N=1,M=0;++M<h&&(N*=256);)S+=this[c+M]*N;return N*=128,S>=N&&(S-=Math.pow(2,8*h)),S},s.prototype.readIntBE=function(c,h,p){c=c>>>0,h=h>>>0,p||b(c,h,this.length);for(var S=h,N=1,M=this[c+--S];S>0&&(N*=256);)M+=this[c+--S]*N;return N*=128,M>=N&&(M-=Math.pow(2,8*h)),M},s.prototype.readInt8=function(c,h){return c=c>>>0,h||b(c,1,this.length),this[c]&128?(255-this[c]+1)*-1:this[c]},s.prototype.readInt16LE=function(c,h){c=c>>>0,h||b(c,2,this.length);var p=this[c]|this[c+1]<<8;return p&32768?p|4294901760:p},s.prototype.readInt16BE=function(c,h){c=c>>>0,h||b(c,2,this.length);var p=this[c+1]|this[c]<<8;return p&32768?p|4294901760:p},s.prototype.readInt32LE=function(c,h){return c=c>>>0,h||b(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},s.prototype.readInt32BE=function(c,h){return c=c>>>0,h||b(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},s.prototype.readFloatLE=function(c,h){return c=c>>>0,h||b(c,4,this.length),qr.read(this,c,!0,23,4)},s.prototype.readFloatBE=function(c,h){return c=c>>>0,h||b(c,4,this.length),qr.read(this,c,!1,23,4)},s.prototype.readDoubleLE=function(c,h){return c=c>>>0,h||b(c,8,this.length),qr.read(this,c,!0,52,8)},s.prototype.readDoubleBE=function(c,h){return c=c>>>0,h||b(c,8,this.length),qr.read(this,c,!1,52,8)};function v(c,h,p,S,N,M){if(!s.isBuffer(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(h>N||h<M)throw new RangeError('"value" argument is out of bounds');if(p+S>c.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(c,h,p,S){if(c=+c,h=h>>>0,p=p>>>0,!S){var N=Math.pow(2,8*p)-1;v(this,c,h,p,N,0)}var M=1,J=0;for(this[h]=c&255;++J<p&&(M*=256);)this[h+J]=c/M&255;return h+p},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(c,h,p,S){if(c=+c,h=h>>>0,p=p>>>0,!S){var N=Math.pow(2,8*p)-1;v(this,c,h,p,N,0)}var M=p-1,J=1;for(this[h+M]=c&255;--M>=0&&(J*=256);)this[h+M]=c/J&255;return h+p},s.prototype.writeUint8=s.prototype.writeUInt8=function(c,h,p){return c=+c,h=h>>>0,p||v(this,c,h,1,255,0),this[h]=c&255,h+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(c,h,p){return c=+c,h=h>>>0,p||v(this,c,h,2,65535,0),this[h]=c&255,this[h+1]=c>>>8,h+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(c,h,p){return c=+c,h=h>>>0,p||v(this,c,h,2,65535,0),this[h]=c>>>8,this[h+1]=c&255,h+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(c,h,p){return c=+c,h=h>>>0,p||v(this,c,h,4,4294967295,0),this[h+3]=c>>>24,this[h+2]=c>>>16,this[h+1]=c>>>8,this[h]=c&255,h+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(c,h,p){return c=+c,h=h>>>0,p||v(this,c,h,4,4294967295,0),this[h]=c>>>24,this[h+1]=c>>>16,this[h+2]=c>>>8,this[h+3]=c&255,h+4},s.prototype.writeIntLE=function(c,h,p,S){if(c=+c,h=h>>>0,!S){var N=Math.pow(2,8*p-1);v(this,c,h,p,N-1,-N)}var M=0,J=1,rt=0;for(this[h]=c&255;++M<p&&(J*=256);)c<0&&rt===0&&this[h+M-1]!==0&&(rt=1),this[h+M]=(c/J>>0)-rt&255;return h+p},s.prototype.writeIntBE=function(c,h,p,S){if(c=+c,h=h>>>0,!S){var N=Math.pow(2,8*p-1);v(this,c,h,p,N-1,-N)}var M=p-1,J=1,rt=0;for(this[h+M]=c&255;--M>=0&&(J*=256);)c<0&&rt===0&&this[h+M+1]!==0&&(rt=1),this[h+M]=(c/J>>0)-rt&255;return h+p},s.prototype.writeInt8=function(c,h,p){return c=+c,h=h>>>0,p||v(this,c,h,1,127,-128),c<0&&(c=255+c+1),this[h]=c&255,h+1},s.prototype.writeInt16LE=function(c,h,p){return c=+c,h=h>>>0,p||v(this,c,h,2,32767,-32768),this[h]=c&255,this[h+1]=c>>>8,h+2},s.prototype.writeInt16BE=function(c,h,p){return c=+c,h=h>>>0,p||v(this,c,h,2,32767,-32768),this[h]=c>>>8,this[h+1]=c&255,h+2},s.prototype.writeInt32LE=function(c,h,p){return c=+c,h=h>>>0,p||v(this,c,h,4,2147483647,-2147483648),this[h]=c&255,this[h+1]=c>>>8,this[h+2]=c>>>16,this[h+3]=c>>>24,h+4},s.prototype.writeInt32BE=function(c,h,p){return c=+c,h=h>>>0,p||v(this,c,h,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[h]=c>>>24,this[h+1]=c>>>16,this[h+2]=c>>>8,this[h+3]=c&255,h+4};function k(c,h,p,S,N,M){if(p+S>c.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function U(c,h,p,S,N){return h=+h,p=p>>>0,N||k(c,h,p,4),qr.write(c,h,p,S,23,4),p+4}s.prototype.writeFloatLE=function(c,h,p){return U(this,c,h,!0,p)},s.prototype.writeFloatBE=function(c,h,p){return U(this,c,h,!1,p)};function G(c,h,p,S,N){return h=+h,p=p>>>0,N||k(c,h,p,8),qr.write(c,h,p,S,52,8),p+8}s.prototype.writeDoubleLE=function(c,h,p){return G(this,c,h,!0,p)},s.prototype.writeDoubleBE=function(c,h,p){return G(this,c,h,!1,p)},s.prototype.copy=function(c,h,p,S){if(!s.isBuffer(c))throw new TypeError("argument should be a Buffer");if(p||(p=0),!S&&S!==0&&(S=this.length),h>=c.length&&(h=c.length),h||(h=0),S>0&&S<p&&(S=p),S===p||c.length===0||this.length===0)return 0;if(h<0)throw new RangeError("targetStart out of bounds");if(p<0||p>=this.length)throw new RangeError("Index out of range");if(S<0)throw new RangeError("sourceEnd out of bounds");S>this.length&&(S=this.length),c.length-h<S-p&&(S=c.length-h+p);var N=S-p;return this===c&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(h,p,S):Uint8Array.prototype.set.call(c,this.subarray(p,S),h),N},s.prototype.fill=function(c,h,p,S){if(typeof c=="string"){if(typeof h=="string"?(S=h,h=0,p=this.length):typeof p=="string"&&(S=p,p=this.length),S!==void 0&&typeof S!="string")throw new TypeError("encoding must be a string");if(typeof S=="string"&&!s.isEncoding(S))throw new TypeError("Unknown encoding: "+S);if(c.length===1){var N=c.charCodeAt(0);(S==="utf8"&&N<128||S==="latin1")&&(c=N)}}else typeof c=="number"?c=c&255:typeof c=="boolean"&&(c=Number(c));if(h<0||this.length<h||this.length<p)throw new RangeError("Out of range index");if(p<=h)return this;h=h>>>0,p=p===void 0?this.length:p>>>0,c||(c=0);var M;if(typeof c=="number")for(M=h;M<p;++M)this[M]=c;else{var J=s.isBuffer(c)?c:s.from(c,S),rt=J.length;if(rt===0)throw new TypeError('The value "'+c+'" is invalid for argument "value"');for(M=0;M<p-h;++M)this[M+h]=J[M%rt]}return this};var nt=/[^+/0-9A-Za-z-_]/g;function et(c){if(c=c.split("=")[0],c=c.trim().replace(nt,""),c.length<2)return"";for(;c.length%4!==0;)c=c+"=";return c}function K(c,h){h=h||1/0;for(var p,S=c.length,N=null,M=[],J=0;J<S;++J){if(p=c.charCodeAt(J),p>55295&&p<57344){if(!N){if(p>56319){(h-=3)>-1&&M.push(239,191,189);continue}else if(J+1===S){(h-=3)>-1&&M.push(239,191,189);continue}N=p;continue}if(p<56320){(h-=3)>-1&&M.push(239,191,189),N=p;continue}p=(N-55296<<10|p-56320)+65536}else N&&(h-=3)>-1&&M.push(239,191,189);if(N=null,p<128){if((h-=1)<0)break;M.push(p)}else if(p<2048){if((h-=2)<0)break;M.push(p>>6|192,p&63|128)}else if(p<65536){if((h-=3)<0)break;M.push(p>>12|224,p>>6&63|128,p&63|128)}else if(p<1114112){if((h-=4)<0)break;M.push(p>>18|240,p>>12&63|128,p>>6&63|128,p&63|128)}else throw new Error("Invalid code point")}return M}function ct(c){for(var h=[],p=0;p<c.length;++p)h.push(c.charCodeAt(p)&255);return h}function ft(c,h){for(var p,S,N,M=[],J=0;J<c.length&&!((h-=2)<0);++J)p=c.charCodeAt(J),S=p>>8,N=p%256,M.push(N),M.push(S);return M}function Et(c){return vl.toByteArray(et(c))}function X(c,h,p,S){for(var N=0;N<S&&!(N+p>=h.length||N>=c.length);++N)h[N+p]=c[N];return N}function ot(c,h){return c instanceof h||c!=null&&c.constructor!=null&&c.constructor.name!=null&&c.constructor.name===h.name}function gt(c){return c!==c}var ut=function(){for(var c="0123456789abcdef",h=new Array(256),p=0;p<16;++p)for(var S=p*16,N=0;N<16;++N)h[S+N]=c[p]+c[N];return h}()}),jt=Na.Buffer;Na.SlowBuffer;Na.INSPECT_MAX_BYTES;Na.kMaxLength;var Hc=function(t,e){return Hc=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])},Hc(t,e)};function Pa(t,e){Hc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var xr=function(t){Pa(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),e}(Error),oe=function(t){Pa(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),e}(TypeError);function Zo(t){return t&&t.Math==Math&&t}function Kv(){return Zo(typeof globalThis=="object"&&globalThis)||Zo(typeof window=="object"&&window)||Zo(typeof self=="object"&&self)||Zo(typeof global=="object"&&global)||Function("return this")()}function VN(){var t=Kv();return typeof t.navigator=="object"&&t.navigator.product==="ReactNative"}var jN=function(t){var e=VN()?"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(e);for(var n=jt.alloc(t),r=0;r<t;++r)n[r]=Math.floor(Math.random()*256);return n},FN=function(){{if(typeof window<"u"){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(jt.alloc(e))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(e){return global.crypto.getRandomValues(jt.alloc(e))}:jN}},Xv=FN();function BN(t){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(t))}function Ih(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function UN(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function HN(t){return Ro(t)&&Object.prototype.toString.call(t)==="[object Date]"}function Ro(t){return typeof t=="object"&&t!==null}function ka(t,e){var n=!1;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return n||(console.warn(e),n=!0),t.apply(this,i)}return r}function Bs(t){if(ArrayBuffer.isView(t))return jt.from(t.buffer,t.byteOffset,t.byteLength);if(BN(t))return jt.from(t);throw new oe("Must use either Buffer or TypedArray")}var $N=/^(?:[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,Jv=function(t){return typeof t=="string"&&$N.test(t)},$c=function(t){if(!Jv(t))throw new oe('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var e=t.replace(/-/g,"");return jt.from(e,"hex")},Ud=function(t,e){return e===void 0&&(e=!0),e?t.toString("hex",0,4)+"-"+t.toString("hex",4,6)+"-"+t.toString("hex",6,8)+"-"+t.toString("hex",8,10)+"-"+t.toString("hex",10,16):t.toString("hex")},eL=Math.pow(2,63)-1,nL=-Math.pow(2,63),zN=Math.pow(2,53),qN=-Math.pow(2,53),Qv=4,Sr=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(e!=null&&typeof e!="string"&&!ArrayBuffer.isView(e)&&!(e instanceof ArrayBuffer)&&!Array.isArray(e))throw new oe("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=n??t.BSON_BINARY_SUBTYPE_DEFAULT,e==null?(this.buffer=jt.alloc(t.BUFFER_SIZE),this.position=0):(typeof e=="string"?this.buffer=jt.from(e,"binary"):Array.isArray(e)?this.buffer=jt.from(e):this.buffer=Bs(e),this.position=this.buffer.byteLength)}return t.prototype.put=function(e){if(typeof e=="string"&&e.length!==1)throw new oe("only accepts single character String");if(typeof e!="number"&&e.length!==1)throw new oe("only accepts single character Uint8Array or Array");var n;if(typeof e=="string"?n=e.charCodeAt(0):typeof e=="number"?n=e:n=e[0],n<0||n>255)throw new oe("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=jt.alloc(t.BUFFER_SIZE+this.buffer.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r,this.buffer[this.position++]=n}},t.prototype.write=function(e,n){if(n=typeof n=="number"?n:this.position,this.buffer.length<n+e.length){var r=jt.alloc(this.buffer.length+e.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(e)?(this.buffer.set(Bs(e),n),this.position=n+e.byteLength>this.position?n+e.length:this.position):typeof e=="string"&&(this.buffer.write(e,n,e.length,"binary"),this.position=n+e.length>this.position?n+e.length:this.position)},t.prototype.read=function(e,n){return n=n&&n>0?n:this.position,this.buffer.slice(e,e+n)},t.prototype.value=function(e){return e=!!e,e&&this.buffer.length===this.position?this.buffer:e?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},t.prototype.length=function(){return this.position},t.prototype.toJSON=function(){return this.buffer.toString("base64")},t.prototype.toString=function(e){return this.buffer.toString(e)},t.prototype.toExtendedJSON=function(e){e=e||{};var n=this.buffer.toString("base64"),r=Number(this.sub_type).toString(16);return e.legacy?{$binary:n,$type:r.length===1?"0"+r:r}:{$binary:{base64:n,subType:r.length===1?"0"+r:r}}},t.prototype.toUUID=function(){if(this.sub_type===t.SUBTYPE_UUID)return new Hd(this.buffer.slice(0,this.position));throw new xr('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(t.SUBTYPE_UUID,'" is currently supported.'))},t.fromExtendedJSON=function(e,n){n=n||{};var r,i;if("$binary"in e?n.legacy&&typeof e.$binary=="string"&&"$type"in e?(i=e.$type?parseInt(e.$type,16):0,r=jt.from(e.$binary,"base64")):typeof e.$binary!="string"&&(i=e.$binary.subType?parseInt(e.$binary.subType,16):0,r=jt.from(e.$binary.base64,"base64")):"$uuid"in e&&(i=4,r=$c(e.$uuid)),!r)throw new oe("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return i===Qv?new Hd(r):new t(r,i)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},t.BSON_BINARY_SUBTYPE_DEFAULT=0,t.BUFFER_SIZE=256,t.SUBTYPE_DEFAULT=0,t.SUBTYPE_FUNCTION=1,t.SUBTYPE_BYTE_ARRAY=2,t.SUBTYPE_UUID_OLD=3,t.SUBTYPE_UUID=4,t.SUBTYPE_MD5=5,t.SUBTYPE_ENCRYPTED=6,t.SUBTYPE_COLUMN=7,t.SUBTYPE_USER_DEFINED=128,t}();Object.defineProperty(Sr.prototype,"_bsontype",{value:"Binary"});var yl=16,Hd=function(t){Pa(e,t);function e(n){var r=this,i,o;if(n==null)i=e.generate();else if(n instanceof e)i=jt.from(n.buffer),o=n.__id;else if(ArrayBuffer.isView(n)&&n.byteLength===yl)i=Bs(n);else if(typeof n=="string")i=$c(n);else throw new oe("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=t.call(this,i,Qv)||this,r.__id=o,r}return Object.defineProperty(e.prototype,"id",{get:function(){return this.buffer},set:function(n){this.buffer=n,e.cacheHexString&&(this.__id=Ud(n))},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(n){if(n===void 0&&(n=!0),e.cacheHexString&&this.__id)return this.__id;var r=Ud(this.id,n);return e.cacheHexString&&(this.__id=r),r},e.prototype.toString=function(n){return n?this.id.toString(n):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(n){if(!n)return!1;if(n instanceof e)return n.id.equals(this.id);try{return new e(n).id.equals(this.id)}catch{return!1}},e.prototype.toBinary=function(){return new Sr(this.id,Sr.SUBTYPE_UUID)},e.generate=function(){var n=Xv(yl);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,jt.from(n)},e.isValid=function(n){return n?n instanceof e?!0:typeof n=="string"?Jv(n):Ih(n)?n.length!==yl?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},e.createFromHexString=function(n){var r=$c(n);return new e(r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},e}(Sr),Aa=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);this.code=e,this.scope=n}return t.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},t.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},t.fromExtendedJSON=function(e){return new t(e.$code,e.$scope)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.toJSON();return'new Code("'.concat(String(e.code),'"').concat(e.scope?", ".concat(JSON.stringify(e.scope)):"",")")},t}();Object.defineProperty(Aa.prototype,"_bsontype",{value:"Code"});function GN(t){return Ro(t)&&t.$id!=null&&typeof t.$ref=="string"&&(t.$db==null||typeof t.$db=="string")}var lo=function(){function t(e,n,r,i){if(!(this instanceof t))return new t(e,n,r,i);var o=e.split(".");o.length===2&&(r=o.shift(),e=o.shift()),this.collection=e,this.oid=n,this.db=r,this.fields=i||{}}return Object.defineProperty(t.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(e.$db=this.db),e},t.prototype.toExtendedJSON=function(e){e=e||{};var n={$ref:this.collection,$id:this.oid};return e.legacy||(this.db&&(n.$db=this.db),n=Object.assign(n,this.fields)),n},t.fromExtendedJSON=function(e){var n=Object.assign({},e);return delete n.$ref,delete n.$id,delete n.$db,new t(e.$ref,e.$id,e.$db,n)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.oid===void 0||this.oid.toString===void 0?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(e),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},t}();Object.defineProperty(lo.prototype,"_bsontype",{value:"DBRef"});var Ze=void 0;try{Ze=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 $d=65536,WN=1<<24,Qr=$d*$d,ty=Qr*Qr,zd=ty/2,qd={},Gd={},st=function(){function t(e,n,r){if(e===void 0&&(e=0),!(this instanceof t))return new t(e,n,r);typeof e=="bigint"?Object.assign(this,t.fromBigInt(e,!!n)):typeof e=="string"?Object.assign(this,t.fromString(e,!!n)):(this.low=e|0,this.high=n|0,this.unsigned=!!r),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return t.fromBits=function(e,n,r){return new t(e,n,r)},t.fromInt=function(e,n){var r,i,o;return n?(e>>>=0,(o=0<=e&&e<256)&&(i=Gd[e],i)?i:(r=t.fromBits(e,(e|0)<0?-1:0,!0),o&&(Gd[e]=r),r)):(e|=0,(o=-128<=e&&e<128)&&(i=qd[e],i)?i:(r=t.fromBits(e,e<0?-1:0,!1),o&&(qd[e]=r),r))},t.fromNumber=function(e,n){if(isNaN(e))return n?t.UZERO:t.ZERO;if(n){if(e<0)return t.UZERO;if(e>=ty)return t.MAX_UNSIGNED_VALUE}else{if(e<=-zd)return t.MIN_VALUE;if(e+1>=zd)return t.MAX_VALUE}return e<0?t.fromNumber(-e,n).neg():t.fromBits(e%Qr|0,e/Qr|0,n)},t.fromBigInt=function(e,n){return t.fromString(e.toString(),n)},t.fromString=function(e,n,r){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return t.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=e.indexOf("-"))>0)throw Error("interior hyphen");if(i===0)return t.fromString(e.substring(1),n,r).neg();for(var o=t.fromNumber(Math.pow(r,8)),s=t.ZERO,a=0;a<e.length;a+=8){var l=Math.min(8,e.length-a),u=parseInt(e.substring(a,a+l),r);if(l<8){var f=t.fromNumber(Math.pow(r,l));s=s.mul(f).add(t.fromNumber(u))}else s=s.mul(o),s=s.add(t.fromNumber(u))}return s.unsigned=n,s},t.fromBytes=function(e,n,r){return r?t.fromBytesLE(e,n):t.fromBytesBE(e,n)},t.fromBytesLE=function(e,n){return new t(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)},t.fromBytesBE=function(e,n){return new t(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)},t.isLong=function(e){return Ro(e)&&e.__isLong__===!0},t.fromValue=function(e,n){return typeof e=="number"?t.fromNumber(e,n):typeof e=="string"?t.fromString(e,n):t.fromBits(e.low,e.high,typeof n=="boolean"?n:e.unsigned)},t.prototype.add=function(e){t.isLong(e)||(e=t.fromValue(e));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,o=this.low&65535,s=e.high>>>16,a=e.high&65535,l=e.low>>>16,u=e.low&65535,f=0,d=0,_=0,y=0;return y+=o+u,_+=y>>>16,y&=65535,_+=i+l,d+=_>>>16,_&=65535,d+=r+a,f+=d>>>16,d&=65535,f+=n+s,f&=65535,t.fromBits(_<<16|y,f<<16|d,this.unsigned)},t.prototype.and=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low&e.low,this.high&e.high,this.unsigned)},t.prototype.compare=function(e){if(t.isLong(e)||(e=t.fromValue(e)),this.eq(e))return 0;var n=this.isNegative(),r=e.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},t.prototype.comp=function(e){return this.compare(e)},t.prototype.divide=function(e){if(t.isLong(e)||(e=t.fromValue(e)),e.isZero())throw Error("division by zero");if(Ze){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var n=(this.unsigned?Ze.div_u:Ze.div_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Ze.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?t.UZERO:t.ZERO;var r,i,o;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return t.UZERO;if(e.gt(this.shru(1)))return t.UONE;o=t.UZERO}else{if(this.eq(t.MIN_VALUE)){if(e.eq(t.ONE)||e.eq(t.NEG_ONE))return t.MIN_VALUE;if(e.eq(t.MIN_VALUE))return t.ONE;var s=this.shr(1);return r=s.div(e).shl(1),r.eq(t.ZERO)?e.isNegative()?t.ONE:t.NEG_ONE:(i=this.sub(e.mul(r)),o=r.add(i.div(e)),o)}else if(e.eq(t.MIN_VALUE))return this.unsigned?t.UZERO:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=t.ZERO}for(i=this;i.gte(e);){r=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),l=a<=48?1:Math.pow(2,a-48),u=t.fromNumber(r),f=u.mul(e);f.isNegative()||f.gt(i);)r-=l,u=t.fromNumber(r,this.unsigned),f=u.mul(e);u.isZero()&&(u=t.ONE),o=o.add(u),i=i.sub(f)}return o},t.prototype.div=function(e){return this.divide(e)},t.prototype.equals=function(e){return t.isLong(e)||(e=t.fromValue(e)),this.unsigned!==e.unsigned&&this.high>>>31===1&&e.high>>>31===1?!1:this.high===e.high&&this.low===e.low},t.prototype.eq=function(e){return this.equals(e)},t.prototype.getHighBits=function(){return this.high},t.prototype.getHighBitsUnsigned=function(){return this.high>>>0},t.prototype.getLowBits=function(){return this.low},t.prototype.getLowBitsUnsigned=function(){return this.low>>>0},t.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(t.MIN_VALUE)?64:this.neg().getNumBitsAbs();var e=this.high!==0?this.high:this.low,n;for(n=31;n>0&&(e&1<<n)===0;n--);return this.high!==0?n+33:n+1},t.prototype.greaterThan=function(e){return this.comp(e)>0},t.prototype.gt=function(e){return this.greaterThan(e)},t.prototype.greaterThanOrEqual=function(e){return this.comp(e)>=0},t.prototype.gte=function(e){return this.greaterThanOrEqual(e)},t.prototype.ge=function(e){return this.greaterThanOrEqual(e)},t.prototype.isEven=function(){return(this.low&1)===0},t.prototype.isNegative=function(){return!this.unsigned&&this.high<0},t.prototype.isOdd=function(){return(this.low&1)===1},t.prototype.isPositive=function(){return this.unsigned||this.high>=0},t.prototype.isZero=function(){return this.high===0&&this.low===0},t.prototype.lessThan=function(e){return this.comp(e)<0},t.prototype.lt=function(e){return this.lessThan(e)},t.prototype.lessThanOrEqual=function(e){return this.comp(e)<=0},t.prototype.lte=function(e){return this.lessThanOrEqual(e)},t.prototype.modulo=function(e){if(t.isLong(e)||(e=t.fromValue(e)),Ze){var n=(this.unsigned?Ze.rem_u:Ze.rem_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Ze.get_high(),this.unsigned)}return this.sub(this.div(e).mul(e))},t.prototype.mod=function(e){return this.modulo(e)},t.prototype.rem=function(e){return this.modulo(e)},t.prototype.multiply=function(e){if(this.isZero())return t.ZERO;if(t.isLong(e)||(e=t.fromValue(e)),Ze){var n=Ze.mul(this.low,this.high,e.low,e.high);return t.fromBits(n,Ze.get_high(),this.unsigned)}if(e.isZero())return t.ZERO;if(this.eq(t.MIN_VALUE))return e.isOdd()?t.MIN_VALUE:t.ZERO;if(e.eq(t.MIN_VALUE))return this.isOdd()?t.MIN_VALUE:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(t.TWO_PWR_24)&&e.lt(t.TWO_PWR_24))return t.fromNumber(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,o=this.low>>>16,s=this.low&65535,a=e.high>>>16,l=e.high&65535,u=e.low>>>16,f=e.low&65535,d=0,_=0,y=0,x=0;return x+=s*f,y+=x>>>16,x&=65535,y+=o*f,_+=y>>>16,y&=65535,y+=s*u,_+=y>>>16,y&=65535,_+=i*f,d+=_>>>16,_&=65535,_+=o*u,d+=_>>>16,_&=65535,_+=s*l,d+=_>>>16,_&=65535,d+=r*f+i*u+o*l+s*a,d&=65535,t.fromBits(y<<16|x,d<<16|_,this.unsigned)},t.prototype.mul=function(e){return this.multiply(e)},t.prototype.negate=function(){return!this.unsigned&&this.eq(t.MIN_VALUE)?t.MIN_VALUE:this.not().add(t.ONE)},t.prototype.neg=function(){return this.negate()},t.prototype.not=function(){return t.fromBits(~this.low,~this.high,this.unsigned)},t.prototype.notEquals=function(e){return!this.equals(e)},t.prototype.neq=function(e){return this.notEquals(e)},t.prototype.ne=function(e){return this.notEquals(e)},t.prototype.or=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low|e.low,this.high|e.high,this.unsigned)},t.prototype.shiftLeft=function(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):t.fromBits(0,this.low<<e-32,this.unsigned)},t.prototype.shl=function(e){return this.shiftLeft(e)},t.prototype.shiftRight=function(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):t.fromBits(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},t.prototype.shr=function(e){return this.shiftRight(e)},t.prototype.shiftRightUnsigned=function(e){if(t.isLong(e)&&(e=e.toInt()),e&=63,e===0)return this;var n=this.high;if(e<32){var r=this.low;return t.fromBits(r>>>e|n<<32-e,n>>>e,this.unsigned)}else return e===32?t.fromBits(n,0,this.unsigned):t.fromBits(n>>>e-32,0,this.unsigned)},t.prototype.shr_u=function(e){return this.shiftRightUnsigned(e)},t.prototype.shru=function(e){return this.shiftRightUnsigned(e)},t.prototype.subtract=function(e){return t.isLong(e)||(e=t.fromValue(e)),this.add(e.neg())},t.prototype.sub=function(e){return this.subtract(e)},t.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},t.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*Qr+(this.low>>>0):this.high*Qr+(this.low>>>0)},t.prototype.toBigInt=function(){return BigInt(this.toString())},t.prototype.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},t.prototype.toBytesLE=function(){var e=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]},t.prototype.toBytesBE=function(){var e=this.high,n=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,n>>>24,n>>>16&255,n>>>8&255,n&255]},t.prototype.toSigned=function(){return this.unsigned?t.fromBits(this.low,this.high,!1):this},t.prototype.toString=function(e){if(e=e||10,e<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(t.MIN_VALUE)){var n=t.fromNumber(e),r=this.div(n),i=r.mul(n).sub(this);return r.toString(e)+i.toInt().toString(e)}else return"-"+this.neg().toString(e);for(var o=t.fromNumber(Math.pow(e,6),this.unsigned),s=this,a="";;){var l=s.div(o),u=s.sub(l.mul(o)).toInt()>>>0,f=u.toString(e);if(s=l,s.isZero())return f+a;for(;f.length<6;)f="0"+f;a=""+f+a}},t.prototype.toUnsigned=function(){return this.unsigned?this:t.fromBits(this.low,this.high,!0)},t.prototype.xor=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low^e.low,this.high^e.high,this.unsigned)},t.prototype.eqz=function(){return this.isZero()},t.prototype.le=function(e){return this.lessThanOrEqual(e)},t.prototype.toExtendedJSON=function(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}},t.fromExtendedJSON=function(e,n){var r=t.fromString(e.$numberLong);return n&&n.relaxed?r.toNumber():r},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},t.TWO_PWR_24=t.fromInt(WN),t.MAX_UNSIGNED_VALUE=t.fromBits(-1,-1,!0),t.ZERO=t.fromInt(0),t.UZERO=t.fromInt(0,!0),t.ONE=t.fromInt(1),t.UONE=t.fromInt(1,!0),t.NEG_ONE=t.fromInt(-1),t.MAX_VALUE=t.fromBits(-1,2147483647,!1),t.MIN_VALUE=t.fromBits(0,-2147483648,!1),t}();Object.defineProperty(st.prototype,"__isLong__",{value:!0});Object.defineProperty(st.prototype,"_bsontype",{value:"Long"});var ZN=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,YN=/^(\+|-)?(Infinity|inf)$/i,KN=/^(\+|-)?NaN$/i,Ri=6111,bl=-6176,Wd=6176,XN=34,wl=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Zd=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Yd=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),JN=/^([-+])?(\d+)?$/,QN=31,Kd=16383,tP=30,eP=31;function Xd(t){return!isNaN(parseInt(t,10))}function nP(t){var e=st.fromNumber(1e9),n=st.fromNumber(0);if(!t.parts[0]&&!t.parts[1]&&!t.parts[2]&&!t.parts[3])return{quotient:t,rem:n};for(var r=0;r<=3;r++)n=n.shiftLeft(32),n=n.add(new st(t.parts[r],0)),t.parts[r]=n.div(e).low,n=n.modulo(e);return{quotient:t,rem:n}}function rP(t,e){if(!t&&!e)return{high:st.fromNumber(0),low:st.fromNumber(0)};var n=t.shiftRightUnsigned(32),r=new st(t.getLowBits(),0),i=e.shiftRightUnsigned(32),o=new st(e.getLowBits(),0),s=n.multiply(i),a=n.multiply(o),l=r.multiply(i),u=r.multiply(o);return s=s.add(a.shiftRightUnsigned(32)),a=new st(a.getLowBits(),0).add(l).add(u.shiftRightUnsigned(32)),s=s.add(a.shiftRightUnsigned(32)),u=a.shiftLeft(32).add(new st(u.getLowBits(),0)),{high:s,low:u}}function iP(t,e){var n=t.high>>>0,r=e.high>>>0;if(n<r)return!0;if(n===r){var i=t.low>>>0,o=e.low>>>0;if(i<o)return!0}return!1}function Gr(t,e){throw new oe('"'.concat(t,'" is not a valid Decimal128 string - ').concat(e))}var Th=function(){function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="string")this.bytes=t.fromString(e).bytes;else if(Ih(e)){if(e.byteLength!==16)throw new oe("Decimal128 must take a Buffer of 16 bytes");this.bytes=e}else throw new oe("Decimal128 must take a Buffer or string")}return t.fromString=function(e){var n=!1,r=!1,i=!1,o=0,s=0,a=0,l=0,u=0,f=[0],d=0,_=0,y=0,x=0,I=0,V=0,L=new st(0,0),Z=new st(0,0),W=0,B=0;if(e.length>=7e3)throw new oe(""+e+" not a valid Decimal128 string");var lt=e.match(ZN),Ht=e.match(YN),At=e.match(KN);if(!lt&&!Ht&&!At||e.length===0)throw new oe(""+e+" not a valid Decimal128 string");if(lt){var $=lt[2],_t=lt[4],ht=lt[5],bt=lt[6];_t&&bt===void 0&&Gr(e,"missing exponent power"),_t&&$===void 0&&Gr(e,"missing exponent base"),_t===void 0&&(ht||bt)&&Gr(e,"missing e before exponent")}if((e[B]==="+"||e[B]==="-")&&(n=e[B++]==="-"),!Xd(e[B])&&e[B]!=="."){if(e[B]==="i"||e[B]==="I")return new t(jt.from(n?Zd:Yd));if(e[B]==="N")return new t(jt.from(wl))}for(;Xd(e[B])||e[B]===".";){if(e[B]==="."){r&&Gr(e,"contains multiple periods"),r=!0,B=B+1;continue}d<34&&(e[B]!=="0"||i)&&(i||(u=s),i=!0,f[_++]=parseInt(e[B],10),d=d+1),i&&(a=a+1),r&&(l=l+1),s=s+1,B=B+1}if(r&&!s)throw new oe(""+e+" not a valid Decimal128 string");if(e[B]==="e"||e[B]==="E"){var kt=e.substr(++B).match(JN);if(!kt||!kt[2])return new t(jt.from(wl));I=parseInt(kt[0],10),B=B+kt[0].length}if(e[B])return new t(jt.from(wl));if(y=0,!d)y=0,x=0,f[0]=0,a=1,d=1,o=0;else if(x=d-1,o=a,o!==1)for(;f[u+o-1]===0;)o=o-1;for(I<=l&&l-I>16384?I=bl:I=I-l;I>Ri;){if(x=x+1,x-y>XN){var $t=f.join("");if($t.match(/^0+$/)){I=Ri;break}Gr(e,"overflow")}I=I-1}for(;I<bl||d<a;){if(x===0&&o<d){I=bl,o=0;break}if(d<a?a=a-1:x=x-1,I<Ri)I=I+1;else{var $t=f.join("");if($t.match(/^0+$/)){I=Ri;break}Gr(e,"overflow")}}if(x-y+1<o){var m=s;r&&(u=u+1,m=m+1),n&&(u=u+1,m=m+1);var Yt=parseInt(e[u+x+1],10),re=0;if(Yt>=5&&(re=1,Yt===5)){for(re=f[x]%2===1?1:0,V=u+x+2;V<m;V++)if(parseInt(e[V],10)){re=1;break}}if(re){for(var Dt=x;Dt>=0;Dt--)if(++f[Dt]>9&&(f[Dt]=0,Dt===0))if(I<Ri)I=I+1,f[Dt]=1;else return new t(jt.from(n?Zd:Yd))}}if(L=st.fromNumber(0),Z=st.fromNumber(0),o===0)L=st.fromNumber(0),Z=st.fromNumber(0);else if(x-y<17){var Dt=y;for(Z=st.fromNumber(f[Dt++]),L=new st(0,0);Dt<=x;Dt++)Z=Z.multiply(st.fromNumber(10)),Z=Z.add(st.fromNumber(f[Dt]))}else{var Dt=y;for(L=st.fromNumber(f[Dt++]);Dt<=x-17;Dt++)L=L.multiply(st.fromNumber(10)),L=L.add(st.fromNumber(f[Dt]));for(Z=st.fromNumber(f[Dt++]);Dt<=x;Dt++)Z=Z.multiply(st.fromNumber(10)),Z=Z.add(st.fromNumber(f[Dt]))}var R=rP(L,st.fromString("100000000000000000"));R.low=R.low.add(Z),iP(R.low,Z)&&(R.high=R.high.add(st.fromNumber(1))),W=I+Wd;var D={low:st.fromNumber(0),high:st.fromNumber(0)};R.high.shiftRightUnsigned(49).and(st.fromNumber(1)).equals(st.fromNumber(1))?(D.high=D.high.or(st.fromNumber(3).shiftLeft(61)),D.high=D.high.or(st.fromNumber(W).and(st.fromNumber(16383).shiftLeft(47))),D.high=D.high.or(R.high.and(st.fromNumber(0x7fffffffffff)))):(D.high=D.high.or(st.fromNumber(W&16383).shiftLeft(49)),D.high=D.high.or(R.high.and(st.fromNumber(562949953421311)))),D.low=R.low,n&&(D.high=D.high.or(st.fromString("9223372036854775808")));var b=jt.alloc(16);return B=0,b[B++]=D.low.low&255,b[B++]=D.low.low>>8&255,b[B++]=D.low.low>>16&255,b[B++]=D.low.low>>24&255,b[B++]=D.low.high&255,b[B++]=D.low.high>>8&255,b[B++]=D.low.high>>16&255,b[B++]=D.low.high>>24&255,b[B++]=D.high.low&255,b[B++]=D.high.low>>8&255,b[B++]=D.high.low>>16&255,b[B++]=D.high.low>>24&255,b[B++]=D.high.high&255,b[B++]=D.high.high>>8&255,b[B++]=D.high.high>>16&255,b[B++]=D.high.high>>24&255,new t(b)},t.prototype.toString=function(){for(var e,n=0,r=new Array(36),i=0;i<r.length;i++)r[i]=0;var o=0,s=!1,a,l={parts:[0,0,0,0]},u,f,d=[];o=0;var _=this.bytes,y=_[o++]|_[o++]<<8|_[o++]<<16|_[o++]<<24,x=_[o++]|_[o++]<<8|_[o++]<<16|_[o++]<<24,I=_[o++]|_[o++]<<8|_[o++]<<16|_[o++]<<24,V=_[o++]|_[o++]<<8|_[o++]<<16|_[o++]<<24;o=0;var L={low:new st(y,x),high:new st(I,V)};L.high.lessThan(st.ZERO)&&d.push("-");var Z=V>>26&QN;if(Z>>3===3){if(Z===tP)return d.join("")+"Infinity";if(Z===eP)return"NaN";e=V>>15&Kd,a=8+(V>>14&1)}else a=V>>14&7,e=V>>17&Kd;var W=e-Wd;if(l.parts[0]=(V&16383)+((a&15)<<14),l.parts[1]=I,l.parts[2]=x,l.parts[3]=y,l.parts[0]===0&&l.parts[1]===0&&l.parts[2]===0&&l.parts[3]===0)s=!0;else for(f=3;f>=0;f--){var B=0,lt=nP(l);if(l=lt.quotient,B=lt.rem.low,!!B)for(u=8;u>=0;u--)r[f*9+u]=B%10,B=Math.floor(B/10)}if(s)n=1,r[o]=0;else for(n=36;!r[o];)n=n-1,o=o+1;var Ht=n-1+W;if(Ht>=34||Ht<=-7||W>0){if(n>34)return d.push("".concat(0)),W>0?d.push("E+".concat(W)):W<0&&d.push("E".concat(W)),d.join("");d.push("".concat(r[o++])),n=n-1,n&&d.push(".");for(var i=0;i<n;i++)d.push("".concat(r[o++]));d.push("E"),Ht>0?d.push("+".concat(Ht)):d.push("".concat(Ht))}else if(W>=0)for(var i=0;i<n;i++)d.push("".concat(r[o++]));else{var At=n+W;if(At>0)for(var i=0;i<At;i++)d.push("".concat(r[o++]));else d.push("0");for(d.push(".");At++<0;)d.push("0");for(var i=0;i<n-Math.max(At-1,0);i++)d.push("".concat(r[o++]))}return d.join("")},t.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},t.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},t.fromExtendedJSON=function(e){return t.fromString(e.$numberDecimal)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},t}();Object.defineProperty(Th.prototype,"_bsontype",{value:"Decimal128"});var La=function(){function t(e){if(!(this instanceof t))return new t(e);e instanceof Number&&(e=e.valueOf()),this.value=+e}return t.prototype.valueOf=function(){return this.value},t.prototype.toJSON=function(){return this.value},t.prototype.toString=function(e){return this.value.toString(e)},t.prototype.toExtendedJSON=function(e){return e&&(e.legacy||e.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()}},t.fromExtendedJSON=function(e,n){var r=parseFloat(e.$numberDouble);return n&&n.relaxed?r:new t(r)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.toExtendedJSON();return"new Double(".concat(e.$numberDouble,")")},t}();Object.defineProperty(La.prototype,"_bsontype",{value:"Double"});var Ma=function(){function t(e){if(!(this instanceof t))return new t(e);e instanceof Number&&(e=e.valueOf()),this.value=+e|0}return t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(e){return this.value.toString(e)},t.prototype.toJSON=function(){return this.value},t.prototype.toExtendedJSON=function(e){return e&&(e.relaxed||e.legacy)?this.value:{$numberInt:this.value.toString()}},t.fromExtendedJSON=function(e,n){return n&&n.relaxed?parseInt(e.$numberInt,10):new t(e.$numberInt)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},t}();Object.defineProperty(Ma.prototype,"_bsontype",{value:"Int32"});var Oh=function(){function t(){if(!(this instanceof t))return new t}return t.prototype.toExtendedJSON=function(){return{$maxKey:1}},t.fromExtendedJSON=function(){return new t},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new MaxKey()"},t}();Object.defineProperty(Oh.prototype,"_bsontype",{value:"MaxKey"});var Dh=function(){function t(){if(!(this instanceof t))return new t}return t.prototype.toExtendedJSON=function(){return{$minKey:1}},t.fromExtendedJSON=function(){return new t},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new MinKey()"},t}();Object.defineProperty(Dh.prototype,"_bsontype",{value:"MinKey"});var oP=new RegExp("^[0-9a-fA-F]{24}$"),dr=null,En=Symbol("id"),Ae=function(){function t(e){if(!(this instanceof t))return new t(e);var n;if(typeof e=="object"&&e&&"id"in e){if(typeof e.id!="string"&&!ArrayBuffer.isView(e.id))throw new oe("Argument passed in must have an id that is of type string or Buffer");"toHexString"in e&&typeof e.toHexString=="function"?n=jt.from(e.toHexString(),"hex"):n=e.id}else n=e;if(n==null||typeof n=="number")this[En]=t.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)this[En]=n instanceof jt?n:Bs(n);else if(typeof n=="string")if(n.length===12){var r=jt.from(n);if(r.byteLength===12)this[En]=r;else throw new oe("Argument passed in must be a string of 12 bytes")}else if(n.length===24&&oP.test(n))this[En]=jt.from(n,"hex");else throw new oe("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new oe("Argument passed in does not match the accepted types");t.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(t.prototype,"id",{get:function(){return this[En]},set:function(e){this[En]=e,t.cacheHexString&&(this.__id=e.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(e){this.id.writeUInt32BE(e,0)},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(){if(t.cacheHexString&&this.__id)return this.__id;var e=this.id.toString("hex");return t.cacheHexString&&!this.__id&&(this.__id=e),e},t.getInc=function(){return t.index=(t.index+1)%16777215},t.generate=function(e){typeof e!="number"&&(e=Math.floor(Date.now()/1e3));var n=t.getInc(),r=jt.alloc(12);return r.writeUInt32BE(e,0),dr===null&&(dr=Xv(5)),r[4]=dr[0],r[5]=dr[1],r[6]=dr[2],r[7]=dr[3],r[8]=dr[4],r[11]=n&255,r[10]=n>>8&255,r[9]=n>>16&255,r},t.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(e){if(e==null)return!1;if(e instanceof t)return this[En][11]===e[En][11]&&this[En].equals(e[En]);if(typeof e=="string"&&t.isValid(e)&&e.length===12&&Ih(this.id))return e===jt.prototype.toString.call(this.id,"latin1");if(typeof e=="string"&&t.isValid(e)&&e.length===24)return e.toLowerCase()===this.toHexString();if(typeof e=="string"&&t.isValid(e)&&e.length===12)return jt.from(e).equals(this.id);if(typeof e=="object"&&"toHexString"in e&&typeof e.toHexString=="function"){var n=e.toHexString(),r=this.toHexString().toLowerCase();return typeof n=="string"&&n.toLowerCase()===r}return!1},t.prototype.getTimestamp=function(){var e=new Date,n=this.id.readUInt32BE(0);return e.setTime(Math.floor(n)*1e3),e},t.createPk=function(){return new t},t.createFromTime=function(e){var n=jt.from([0,0,0,0,0,0,0,0,0,0,0,0]);return n.writeUInt32BE(e,0),new t(n)},t.createFromHexString=function(e){if(typeof e>"u"||e!=null&&e.length!==24)throw new oe("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new t(jt.from(e,"hex"))},t.isValid=function(e){if(e==null)return!1;try{return new t(e),!0}catch{return!1}},t.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},t.fromExtendedJSON=function(e){return new t(e.$oid)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},t.index=Math.floor(Math.random()*16777215),t}();Object.defineProperty(Ae.prototype,"generate",{value:ka(function(t){return Ae.generate(t)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(Ae.prototype,"getInc",{value:ka(function(){return Ae.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Ae.prototype,"get_inc",{value:ka(function(){return Ae.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Ae,"get_inc",{value:ka(function(){return Ae.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Ae.prototype,"_bsontype",{value:"ObjectID"});function sP(t){return t.split("").sort().join("")}var co=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this.pattern=e,this.options=sP(n??""),this.pattern.indexOf("\0")!==-1)throw new xr("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new xr("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 xr("The regular expression option [".concat(this.options[r],"] is not supported"))}return t.parseOptions=function(e){return e?e.split("").sort().join(""):""},t.prototype.toExtendedJSON=function(e){return e=e||{},e.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},t.fromExtendedJSON=function(e){if("$regex"in e)if(typeof e.$regex!="string"){if(e.$regex._bsontype==="BSONRegExp")return e}else return new t(e.$regex,t.parseOptions(e.$options));if("$regularExpression"in e)return new t(e.$regularExpression.pattern,t.parseOptions(e.$regularExpression.options));throw new oe("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(e)))},t}();Object.defineProperty(co.prototype,"_bsontype",{value:"BSONRegExp"});var Rh=function(){function t(e){if(!(this instanceof t))return new t(e);this.value=e}return t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(){return this.value},t.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},t.prototype.toJSON=function(){return this.value},t.prototype.toExtendedJSON=function(){return{$symbol:this.value}},t.fromExtendedJSON=function(e){return new t(e.$symbol)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t}();Object.defineProperty(Rh.prototype,"_bsontype",{value:"Symbol"});var aP=st,ey=function(t){Pa(e,t);function e(n,r){var i=this;return i instanceof e?(st.isLong(n)?i=t.call(this,n.low,n.high,!0)||this:Ro(n)&&typeof n.t<"u"&&typeof n.i<"u"?i=t.call(this,n.i,n.t,!0)||this:i=t.call(this,n,r,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new e(n,r)}return e.prototype.toJSON=function(){return{$timestamp:this.toString()}},e.fromInt=function(n){return new e(st.fromInt(n,!0))},e.fromNumber=function(n){return new e(st.fromNumber(n,!0))},e.fromBits=function(n,r){return new e(n,r)},e.fromString=function(n,r){return new e(st.fromString(n,!0,r))},e.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},e.fromExtendedJSON=function(n){return new e(n.$timestamp)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},e.MAX_VALUE=st.MAX_UNSIGNED_VALUE,e}(aP);function lP(t){return Ro(t)&&Reflect.has(t,"_bsontype")&&typeof t._bsontype=="string"}var ny=2147483647,ry=-2147483648,iy=9223372036854776e3,oy=-9223372036854776e3,cP={$oid:Ae,$binary:Sr,$uuid:Sr,$symbol:Rh,$numberInt:Ma,$numberDecimal:Th,$numberDouble:La,$numberLong:st,$minKey:Dh,$maxKey:Oh,$regex:co,$regularExpression:co,$timestamp:ey};function sy(t,e){if(e===void 0&&(e={}),typeof t=="number"){if(e.relaxed||e.legacy)return t;if(Math.floor(t)===t){if(t>=ry&&t<=ny)return new Ma(t);if(t>=oy&&t<=iy)return st.fromNumber(t)}return new La(t)}if(t==null||typeof t!="object")return t;if(t.$undefined)return null;for(var n=Object.keys(t).filter(function(d){return d.startsWith("$")&&t[d]!=null}),r=0;r<n.length;r++){var i=cP[n[r]];if(i)return i.fromExtendedJSON(t,e)}if(t.$date!=null){var o=t.$date,s=new Date;return e.legacy?typeof o=="number"?s.setTime(o):typeof o=="string"&&s.setTime(Date.parse(o)):typeof o=="string"?s.setTime(Date.parse(o)):st.isLong(o)?s.setTime(o.toNumber()):typeof o=="number"&&e.relaxed&&s.setTime(o),s}if(t.$code!=null){var a=Object.assign({},t);return t.$scope&&(a.$scope=sy(t.$scope)),Aa.fromExtendedJSON(t)}if(GN(t)||t.$dbPointer){var l=t.$ref?t:t.$dbPointer;if(l instanceof lo)return l;var u=Object.keys(l).filter(function(d){return d.startsWith("$")}),f=!0;if(u.forEach(function(d){["$ref","$id","$db"].indexOf(d)===-1&&(f=!1)}),f)return lo.fromExtendedJSON(l)}return t}function uP(t,e){return t.map(function(n,r){e.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return Qn(n,e)}finally{e.seenObjects.pop()}})}function Jd(t){var e=t.toISOString();return t.getUTCMilliseconds()!==0?e:e.slice(0,-5)+"Z"}function Qn(t,e){if((typeof t=="object"||typeof t=="function")&&t!==null){var n=e.seenObjects.findIndex(function(L){return L.obj===t});if(n!==-1){var r=e.seenObjects.map(function(L){return L.propertyName}),i=r.slice(0,n).map(function(L){return"".concat(L," -> ")}).join(""),o=r[n],s=" -> "+r.slice(n+1,r.length-1).map(function(L){return"".concat(L," -> ")}).join(""),a=r[r.length-1],l=" ".repeat(i.length+o.length/2),u="-".repeat(s.length+(o.length+a.length)/2-1);throw new oe(`Converting circular structure to EJSON:
34
+ `)};Lt.prototype.renderPartial=function(e,t,n,r){if(n){var i=this.getConfigTags(r),o=Qh(n)?n(e[1]):n[e[1]];if(o!=null){var s=e[6],a=e[5],l=e[4],u=o;a==0&&l&&(u=this.indentPartial(o,l,s));var d=this.parse(u,i);return this.renderTokens(d,t,n,u,r)}}};Lt.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};Lt.prototype.escapedValue=function(e,t,n){var r=this.getConfigEscape(n)||nn.escape,i=t.lookup(e[1]);if(i!=null)return typeof i=="number"&&r===nn.escape?String(i):r(i)};Lt.prototype.rawValue=function(e){return e[1]};Lt.prototype.getConfigTags=function(e){return Li(e)?e:e&&typeof e=="object"?e.tags:void 0};Lt.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Li(e))return e.escape};var nn={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){wo.templateCache=e},get templateCache(){return wo.templateCache}},wo=new Lt;nn.clearCache=function(){return wo.clearCache()};nn.parse=function(e,t){return wo.parse(e,t)};nn.render=function(e,t,n,r){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+lP(e)+'" was given as the first argument for mustache#render(template, view, partials)');return wo.render(e,t,n,r)};nn.escape=gP;nn.Scanner=Uo;nn.Context=Ei;nn.Writer=Lt;var Fy=nn;Fy.escape=sP.MustacheUtils.escapeHtml;var xP=class ou{transform(t,n){return t?Fy.render(t,F({},n)):null}static \u0275fac=function(t){return new(t||ou)};static \u0275pipe=kh({name:"cooeeDynamicVariables",type:ou,pure:!0})},Ya=class su{constructor(t){this.sanitizer=t}transform(t){return t?this.sanitizer.bypassSecurityTrustHtml(t):""}static \u0275fac=function(t){return new(t||su)(Ot(cy,16))};static \u0275pipe=kh({name:"safeHtml",type:su,pure:!0})},ed={};(function e(t,n,r,i){var o=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),s=typeof Path2D=="function"&&typeof DOMMatrix=="function",a=function(){if(!t.OffscreenCanvas)return!1;var b=new OffscreenCanvas(1,1),y=b.getContext("2d");y.fillRect(0,0,1,1);var L=b.transferToImageBitmap();try{y.createPattern(L,"no-repeat")}catch{return!1}return!0}();function l(){}function u(b){var y=n.exports.Promise,L=y!==void 0?y:t.Promise;return typeof L=="function"?new L(b):(b(l,l),null)}var d=function(b,y){return{transform:function(L){if(b)return L;if(y.has(L))return y.get(L);var U=new OffscreenCanvas(L.width,L.height),W=U.getContext("2d");return W.drawImage(L,0,0),y.set(L,U),U},clear:function(){y.clear()}}}(a,new Map),h=function(){var b=Math.floor(16.666666666666668),y,L,U={},W=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(y=function(te){var ee=Math.random();return U[ee]=requestAnimationFrame(function Y(ue){W===ue||W+b-1<ue?(W=ue,delete U[ee],te()):U[ee]=requestAnimationFrame(Y)}),ee},L=function(te){U[te]&&cancelAnimationFrame(U[te])}):(y=function(te){return setTimeout(te,b)},L=function(te){return clearTimeout(te)}),{frame:y,cancel:L}}(),v=function(){var b,y,L={};function U(W){function te(ee,Y){W.postMessage({options:ee||{},callback:Y})}W.init=function(ee){var Y=ee.transferControlToOffscreen();W.postMessage({canvas:Y},[Y])},W.fire=function(ee,Y,ue){if(y)return te(ee,null),y;var pe=Math.random().toString(36).slice(2);return y=u(function(Ee){function K(oe){oe.data.callback===pe&&(delete L[pe],W.removeEventListener("message",K),y=null,d.clear(),ue(),Ee())}W.addEventListener("message",K),te(ee,pe),L[pe]=K.bind(null,{data:{callback:pe}})}),y},W.reset=function(){W.postMessage({reset:!0});for(var ee in L)L[ee](),delete L[ee]}}return function(){if(b)return b;if(!r&&o){var W=["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(`
35
+ `);try{b=new Worker(URL.createObjectURL(new Blob([W])))}catch(te){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",te),null}U(b)}return b}}(),m={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 w(b,y){return y?y(b):b}function C(b){return b!=null}function A(b,y,L){return w(b&&C(b[y])?b[y]:m[y],L)}function k(b){return b<0?0:Math.floor(b)}function $(b,y){return Math.floor(Math.random()*(y-b))+b}function ne(b){return parseInt(b,16)}function z(b){return b.map(re)}function re(b){var y=String(b).replace(/[^0-9a-f]/gi,"");return y.length<6&&(y=y[0]+y[0]+y[1]+y[1]+y[2]+y[2]),{r:ne(y.substring(0,2)),g:ne(y.substring(2,4)),b:ne(y.substring(4,6))}}function Re(b){var y=A(b,"origin",Object);return y.x=A(y,"x",Number),y.y=A(y,"y",Number),y}function Ne(b){b.width=document.documentElement.clientWidth,b.height=document.documentElement.clientHeight}function V(b){var y=b.getBoundingClientRect();b.width=y.width,b.height=y.height}function fe(b){var y=document.createElement("canvas");return y.style.position="fixed",y.style.top="0px",y.style.left="0px",y.style.pointerEvents="none",y.style.zIndex=b,y}function ce(b,y,L,U,W,te,ee,Y,ue){b.save(),b.translate(y,L),b.rotate(te),b.scale(U,W),b.arc(0,0,1,ee,Y,ue),b.restore()}function he(b){var y=b.angle*(Math.PI/180),L=b.spread*(Math.PI/180);return{x:b.x,y:b.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:b.startVelocity*.5+Math.random()*b.startVelocity,angle2D:-y+(.5*L-Math.random()*L),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:b.color,shape:b.shape,tick:0,totalTicks:b.ticks,decay:b.decay,drift:b.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:b.gravity*3,ovalScalar:.6,scalar:b.scalar,flat:b.flat}}function Se(b,y){y.x+=Math.cos(y.angle2D)*y.velocity+y.drift,y.y+=Math.sin(y.angle2D)*y.velocity+y.gravity,y.velocity*=y.decay,y.flat?(y.wobble=0,y.wobbleX=y.x+10*y.scalar,y.wobbleY=y.y+10*y.scalar,y.tiltSin=0,y.tiltCos=0,y.random=1):(y.wobble+=y.wobbleSpeed,y.wobbleX=y.x+10*y.scalar*Math.cos(y.wobble),y.wobbleY=y.y+10*y.scalar*Math.sin(y.wobble),y.tiltAngle+=.1,y.tiltSin=Math.sin(y.tiltAngle),y.tiltCos=Math.cos(y.tiltAngle),y.random=Math.random()+2);var L=y.tick++/y.totalTicks,U=y.x+y.random*y.tiltCos,W=y.y+y.random*y.tiltSin,te=y.wobbleX+y.random*y.tiltCos,ee=y.wobbleY+y.random*y.tiltSin;if(b.fillStyle="rgba("+y.color.r+", "+y.color.g+", "+y.color.b+", "+(1-L)+")",b.beginPath(),s&&y.shape.type==="path"&&typeof y.shape.path=="string"&&Array.isArray(y.shape.matrix))b.fill(Pe(y.shape.path,y.shape.matrix,y.x,y.y,Math.abs(te-U)*.1,Math.abs(ee-W)*.1,Math.PI/10*y.wobble));else if(y.shape.type==="bitmap"){var Y=Math.PI/10*y.wobble,ue=Math.abs(te-U)*.1,pe=Math.abs(ee-W)*.1,Ee=y.shape.bitmap.width*y.scalar,K=y.shape.bitmap.height*y.scalar,oe=new DOMMatrix([Math.cos(Y)*ue,Math.sin(Y)*ue,-Math.sin(Y)*pe,Math.cos(Y)*pe,y.x,y.y]);oe.multiplySelf(new DOMMatrix(y.shape.matrix));var me=b.createPattern(d.transform(y.shape.bitmap),"no-repeat");me.setTransform(oe),b.globalAlpha=1-L,b.fillStyle=me,b.fillRect(y.x-Ee/2,y.y-K/2,Ee,K),b.globalAlpha=1}else if(y.shape==="circle")b.ellipse?b.ellipse(y.x,y.y,Math.abs(te-U)*y.ovalScalar,Math.abs(ee-W)*y.ovalScalar,Math.PI/10*y.wobble,0,2*Math.PI):ce(b,y.x,y.y,Math.abs(te-U)*y.ovalScalar,Math.abs(ee-W)*y.ovalScalar,Math.PI/10*y.wobble,0,2*Math.PI);else if(y.shape==="star")for(var de=Math.PI/2*3,c=4*y.scalar,f=8*y.scalar,p=y.x,S=y.y,N=5,j=Math.PI/N;N--;)p=y.x+Math.cos(de)*f,S=y.y+Math.sin(de)*f,b.lineTo(p,S),de+=j,p=y.x+Math.cos(de)*c,S=y.y+Math.sin(de)*c,b.lineTo(p,S),de+=j;else b.moveTo(Math.floor(y.x),Math.floor(y.y)),b.lineTo(Math.floor(y.wobbleX),Math.floor(W)),b.lineTo(Math.floor(te),Math.floor(ee)),b.lineTo(Math.floor(U),Math.floor(y.wobbleY));return b.closePath(),b.fill(),y.tick<y.totalTicks}function $e(b,y,L,U,W){var te=y.slice(),ee=b.getContext("2d"),Y,ue,pe=u(function(Ee){function K(){Y=ue=null,ee.clearRect(0,0,U.width,U.height),d.clear(),W(),Ee()}function oe(){r&&!(U.width===i.width&&U.height===i.height)&&(U.width=b.width=i.width,U.height=b.height=i.height),!U.width&&!U.height&&(L(b),U.width=b.width,U.height=b.height),ee.clearRect(0,0,U.width,U.height),te=te.filter(function(me){return Se(ee,me)}),te.length?Y=h.frame(oe):K()}Y=h.frame(oe),ue=K});return{addFettis:function(Ee){return te=te.concat(Ee),pe},canvas:b,promise:pe,reset:function(){Y&&h.cancel(Y),ue&&ue()}}}function _(b,y){var L=!b,U=!!A(y||{},"resize"),W=!1,te=A(y,"disableForReducedMotion",Boolean),ee=o&&!!A(y||{},"useWorker"),Y=ee?v():null,ue=L?Ne:V,pe=b&&Y?!!b.__confetti_initialized:!1,Ee=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,K;function oe(de,c,f){for(var p=A(de,"particleCount",k),S=A(de,"angle",Number),N=A(de,"spread",Number),j=A(de,"startVelocity",Number),J=A(de,"decay",Number),ie=A(de,"gravity",Number),Me=A(de,"drift",Number),Ie=A(de,"colors",z),je=A(de,"ticks",Number),ke=A(de,"shapes"),Et=A(de,"scalar"),Ln=!!A(de,"flat"),ut=Re(de),sn=p,Sn=[],Qn=b.width*ut.x,Ut=b.height*ut.y;sn--;)Sn.push(he({x:Qn,y:Ut,angle:S,spread:N,startVelocity:j,color:Ie[sn%Ie.length],shape:ke[$(0,ke.length)],ticks:je,decay:J,gravity:ie,drift:Me,scalar:Et,flat:Ln}));return K?K.addFettis(Sn):(K=$e(b,Sn,ue,c,f),K.promise)}function me(de){var c=te||A(de,"disableForReducedMotion",Boolean),f=A(de,"zIndex",Number);if(c&&Ee)return u(function(j){j()});L&&K?b=K.canvas:L&&!b&&(b=fe(f),document.body.appendChild(b)),U&&!pe&&ue(b);var p={width:b.width,height:b.height};Y&&!pe&&Y.init(b),pe=!0,Y&&(b.__confetti_initialized=!0);function S(){if(Y){var j={getBoundingClientRect:function(){if(!L)return b.getBoundingClientRect()}};ue(j),Y.postMessage({resize:{width:j.width,height:j.height}});return}p.width=p.height=null}function N(){K=null,U&&(W=!1,t.removeEventListener("resize",S)),L&&b&&(document.body.contains(b)&&document.body.removeChild(b),b=null,pe=!1)}return U&&!W&&(W=!0,t.addEventListener("resize",S,!1)),Y?Y.fire(de,p,N):oe(de,p,N)}return me.reset=function(){Y&&Y.reset(),K&&K.reset()},me}var Ke;function it(){return Ke||(Ke=_(null,{useWorker:!0,resize:!0})),Ke}function Pe(b,y,L,U,W,te,ee){var Y=new Path2D(b),ue=new Path2D;ue.addPath(Y,new DOMMatrix(y));var pe=new Path2D;return pe.addPath(ue,new DOMMatrix([Math.cos(ee)*W,Math.sin(ee)*W,-Math.sin(ee)*te,Math.cos(ee)*te,L,U])),pe}function R(b){if(!s)throw new Error("path confetti are not supported in this browser");var y,L;typeof b=="string"?y=b:(y=b.path,L=b.matrix);var U=new Path2D(y),W=document.createElement("canvas"),te=W.getContext("2d");if(!L){for(var ee=1e3,Y=ee,ue=ee,pe=0,Ee=0,K,oe,me=0;me<ee;me+=2)for(var de=0;de<ee;de+=2)te.isPointInPath(U,me,de,"nonzero")&&(Y=Math.min(Y,me),ue=Math.min(ue,de),pe=Math.max(pe,me),Ee=Math.max(Ee,de));K=pe-Y,oe=Ee-ue;var c=10,f=Math.min(c/K,c/oe);L=[f,0,0,f,-Math.round(K/2+Y)*f,-Math.round(oe/2+ue)*f]}return{type:"path",path:y,matrix:L}}function D(b){var y,L=1,U="#000000",W='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof b=="string"?y=b:(y=b.text,L="scalar"in b?b.scalar:L,W="fontFamily"in b?b.fontFamily:W,U="color"in b?b.color:U);var te=10*L,ee=""+te+"px "+W,Y=new OffscreenCanvas(te,te),ue=Y.getContext("2d");ue.font=ee;var pe=ue.measureText(y),Ee=Math.ceil(pe.actualBoundingBoxRight+pe.actualBoundingBoxLeft),K=Math.ceil(pe.actualBoundingBoxAscent+pe.actualBoundingBoxDescent),oe=2,me=pe.actualBoundingBoxLeft+oe,de=pe.actualBoundingBoxAscent+oe;Ee+=oe+oe,K+=oe+oe,Y=new OffscreenCanvas(Ee,K),ue=Y.getContext("2d"),ue.font=ee,ue.fillStyle=U,ue.fillText(y,me,de);var c=1/L;return{type:"bitmap",bitmap:Y.transferToImageBitmap(),matrix:[c,0,0,c,-Ee*c/2,-K*c/2]}}n.exports=function(){return it().apply(this,arguments)},n.exports.reset=function(){it().reset()},n.exports.create=_,n.exports.shapeFromPath=R,n.exports.shapeFromText=D})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),ed,!1);var SP=ed.exports,IM=ed.exports.create,CP=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 SP(e)}static async realisticFire(e,t){let n={origin:{y:.7}};await this.fire(Object.assign({},n,t,{particleCount:Math.floor(200*e)}))}},IP=(e,t)=>t.minValue;function TP(e,t){if(e&1&&(X(0,"li",6)(1,"div",7),He(2,"div",8),yn(3,"cooeeCurrency"),yn(4,"safeHtml"),He(5,"img",9),X(6,"div",10),rt(7),Q()()()),e&2){let n=t.$implicit,r=le(2);Fa("left",n.calculatedAlignment+"%"),Z(2),Le("innerHTML",Pn(4,7,Pn(3,5,n.minValue)),Di),Z(3),Le("src",r.getIconURL(n),on),Z(2),Ba(n.label)}}function OP(e,t){if(e&1&&(vr(0)(1),He(2,"div",0),yn(3,"cooeeDynamicVariables"),yn(4,"safeHtml"),X(5,"div",1)(6,"ul",2)(7,"div",3),He(8,"div",4),Q(),Wt(9,TP,8,9,"li",5,IP),Q()()),e&2){let n=le(),r=n.calculatedState(),i=r.nextMilestone?r.nextMilestone.reachingText:r.lastMilestone.reachedText;Z(2),Le("innerHTML",Pn(4,6,DT(3,3,i,n.localDynamicVariables())),Di),Z(6),Fa("width",r.cartValuePercentage+"%"),Z(),Zt(r.milestones)}}var DP=class au{constructor(t){this.elementRef=t,this.elementRef.nativeElement.update=this.update.bind(this)}cart;localDynamicVariables=Bn({});calculatedState=Bn({});_engagementTrigger=Bn(null);progressBarConfig;set engagementTrigger(t){this._engagementTrigger.set(t),this.progressBarConfig=t.progressBarConfig}ngOnInit(){cn.debug("Init progressbar"),this.calculateMilestonesSilently()}ngOnDestroy(){cn.debug("Destroying progressbar")}update(){this.calculateMilestonesSilently()}getIconURL(t){return t.rewardType===Nl.MilestoneRewardType.FREE_SHIPPING?"https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png":t.rewardType===Nl.MilestoneRewardType.DISCOUNT?"https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png":t.rewardType===Nl.MilestoneRewardType.FREE_AUTO_GIFT?"https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png":""}calculateMilestonesSilently(){this.calculateMilestones().catch(t=>cn.error(t))}async calculateMilestones(){let t=this._engagementTrigger();if(!t?.progressBarConfig?.milestones?.length){cn.warn("Milestones not available in progress bar config",t);return}let n=await this.cart.getNormalisedCart(),r=t.progressBarConfig,i=r.milestones.at(-1),o=n.originalAmount,s=r.totalProgress??0;cn.debug("Cart value:",o,`, percentage: ${s}%`),this.celebrate(t,o);let a={milestonesReady:!0,cartValuePercentage:s,milestones:r.milestones},l=r.milestones.find(u=>u.minValue>o);if(l){this.localDynamicVariables.set({amount_left:Xh(l.minValue-o)}),a.nextMilestone=l,this.calculatedState.set(a);return}a.lastMilestone=i,this.calculatedState.set(a)}celebrate(t,n){let r=[...t.progressBarConfig.milestones].reverse().find(o=>o.minValue<n);if(!r)return;let i=`lc/en/${t.shortID}/${r.minValue}`;sessionStorage.getItem(i)||(sessionStorage.setItem(i,"1"),this.progressBarConfig?.noConfetti||CP.realistic())}static \u0275fac=function(t){return new(t||au)(Ot(Vt))};static \u0275cmp=At({type:au,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&&lt(0,OP,11,8),t&2&&st(n.calculatedState().milestonesReady?0:-1)},dependencies:[xP,Ya,Za],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}"]})},RP=bn(Rg()),Vy=class lu{cooeeEvent=new Qe;cooeeCTA=new Qe;elementRef=P(Vt);_engagementTrigger=Bn(null);_triggerContext=Bn(null);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get triggerContext(){return this._triggerContext()}set triggerContext(t){this._triggerContext.set(t),this._engagementTrigger.set(t.triggerData),this.engagementTriggerReceived(t.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){cn.debug("Init",this.constructor.name)}ngOnDestroy(){cn.debug("Destroying",this.constructor.name)}sendEventToRenderer(t){this.cooeeEvent.emit(t)}executeCTAViaRenderer(t){this.cooeeCTA.emit(t)}static \u0275fac=function(t){return new(t||lu)};static \u0275cmp=At({type:lu,selectors:[["ng-component"]],inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:0,vars:0,template:function(t,n){},encapsulation:2})},NP=(e,t)=>({enter:e,exit:t});function PP(e,t){if(e&1&&(X(0,"div",7),rt(1),Q(),X(2,"div",8),rt(3),Q()),e&2){let n=le(2);Z(),Nn(" ",n.getCurrency(n.selectedVariant().price.cmp)," "),Z(2),Nn(" ",n.getDiscountPercentage(n.selectedVariant().price),"% off ")}}function kP(e,t){if(e&1&&(X(0,"div",6),rt(1),Q()),e&2){let n=le(2);Z(),Nn(" ",n.stickyATCConfig.leftText," ")}}function AP(e,t){if(e&1&&(X(0,"div",1)(1,"div",5),rt(2),Q(),lt(3,PP,4,2)(4,kP,2,1,"div",6),Q()),e&2){let n=le();Z(2),Nn(" ",n.getCurrency(n.selectedVariant().price.d)," "),Z(),st(n.selectedVariant().price.cmp?3:-1),Z(),st(n.stickyATCConfig.leftText?4:-1)}}function LP(e,t){if(e&1&&(X(0,"div",9),rt(1),Q()),e&2){let n=t.$implicit,r=t.$index;le(2);let i=un(5);Le("ngClass",TT(2,NP,r===i.currentIndex,r===i.previousIndex)),Z(),Nn(" ",n," ")}}function MP(e,t){if(e&1&&(X(0,"div",4),Wt(1,LP,2,5,"div",9,Pi),Q()),e&2){le();let n=un(5);Z(),Zt(n.features)}}var jP=class cu extends Vy{currentItem;stickyATCConfig;selectedVariant=Bn(void 0);featureSlider=Bn({features:[],currentIndex:0});constructor(){super()}engagementTriggerReceived(t){this.stickyATCConfig=t.stickyATCConfig??{},this.currentItem=t.items[0],this.selectedVariant.set(this.currentItem.vars[0]),this.stickyATCConfig.leftText=this.replaceVariables(this.stickyATCConfig.leftText),this.stickyATCConfig.rightText=this.replaceVariables(this.stickyATCConfig.rightText),this.startFeatureRotation()}update(){}getCurrency(t){return Xh(t)}getDiscountPercentage(t){return((t.cmp-t.d)/t.cmp*100).toFixed(0)}async addToCart(){this.executeCTAViaRenderer({clickAction:{at:102},item:this.currentItem})}startFeatureRotation(){if(!this.stickyATCConfig.rightText)return;let t=this.stickyATCConfig.rightText.split(`
36
+ `),n=t.length===1?null:setInterval(()=>{this.featureSlider.update(r=>Ye(F({},r),{previousIndex:r.currentIndex,currentIndex:(r.currentIndex+1)%r.features.length}))},3e3);this.featureSlider.set({intervalRef:n,currentIndex:0,features:t})}replaceVariables(t){return t?(0,RP.render)(t,this.currentItem.getTemplateVariables()):""}static \u0275fac=function(t){return new(t||cu)};static \u0275cmp=At({type:cu,selectors:[["cooee-sticky-atc"]],features:[Ni],decls:7,vars:3,consts:[[1,"lc-wrapper"],[1,"lc-prices"],[1,"lc-button-wrapper"],["type","button",1,"lc-button","lc-button-atc",3,"click"],[1,"lc-features"],[1,"lc-sale-price"],[1,"lc-additional-text"],[1,"lc-compare-price"],[1,"lc-discount-label"],[1,"lc-feature",3,"ngClass"]],template:function(t,n){if(t&1){let r=Bt();X(0,"div",0),lt(1,AP,5,3,"div",1),X(2,"div",2)(3,"button",3),nt("click",function(){return dt(r),ft(n.addToCart())}),rt(4,"Add To Cart"),Q(),vr(5),lt(6,MP,3,0,"div",4),Q()()}if(t&2){Z(),st(n.selectedVariant()&&n.stickyATCConfig.showProductInfo?1:-1),Z(4);let r=hi(n.featureSlider());Z(),st(r.features.length?6:-1)}},dependencies:[Ha],styles:["[_nghost-%COMP%]{display:flex;justify-content:center;padding:10px;background-color:#fff;width:100%;box-shadow:4px 0 10px #0006;line-height:normal}.lc-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:8px;max-width:1100px;width:100%}.lc-prices[_ngcontent-%COMP%]{flex:1 1 100%;display:flex;flex-wrap:wrap;align-items:center;gap:6px}@media (min-width: 768px){.lc-prices[_ngcontent-%COMP%]{gap:8px}}.lc-sale-price[_ngcontent-%COMP%]{font-size:24px;font-weight:600}.lc-compare-price[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:red;text-decoration:line-through}.lc-discount-label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:green}.lc-button-wrapper[_ngcontent-%COMP%]{flex:1 1 100%;display:flex;flex-direction:column;gap:4px;align-items:center}.lc-button[_ngcontent-%COMP%]{background-color:#000;color:#fff;opacity:1;cursor:pointer;pointer-events:auto;border-radius:4px;min-width:150px;width:100%;padding:8px}.lc-additional-text[_ngcontent-%COMP%], .lc-feature[_ngcontent-%COMP%]{font-size:12px;color:#666}.lc-features[_ngcontent-%COMP%]{position:relative;overflow:hidden;height:16px;text-align:center;width:100%}.lc-features[_ngcontent-%COMP%] .lc-feature[_ngcontent-%COMP%]{position:absolute;width:100%;opacity:0;transform:translateY(100%);transition:transform .5s ease,opacity .5s ease}.lc-features[_ngcontent-%COMP%] .lc-feature.enter[_ngcontent-%COMP%]{opacity:1;transform:translateY(0);z-index:2}.lc-features[_ngcontent-%COMP%] .lc-feature.exit[_ngcontent-%COMP%]{opacity:0;transform:translateY(-100%);z-index:1}"]})},ss=bn(Kb()),FP=bn(So()),By,Je,Uy,Hy,Ir,Sp,$y,uu,zy,td,hu,du,VP,fu={},qy=[],BP=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,nd=Array.isArray;function sr(e,t){for(var n in t)e[n]=t[n];return e}function rd(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Ml(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Uy,__i:-1,__u:0};return i==null&&Je.vnode!=null&&Je.vnode(o),o}function id(e){return e.children}function Qi(e,t){this.props=e,this.context=t}function xi(e,t){if(t==null)return e.__?xi(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"?xi(e):null}function Gy(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 Gy(e)}}function Cp(e){(!e.__d&&(e.__d=!0)&&Ir.push(e)&&!ta.__r++||Sp!==Je.debounceRendering)&&((Sp=Je.debounceRendering)||$y)(ta)}function ta(){var e,t,n,r,i,o,s,a;for(Ir.sort(uu);e=Ir.shift();)e.__d&&(t=Ir.length,r=void 0,o=(i=(n=e).__v).__e,s=[],a=[],n.__P&&((r=sr({},i)).__v=i.__v+1,Je.vnode&&Je.vnode(r),Yy(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,o??xi(i),!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,$P(s,r,a),r.__e!=o&&Gy(r)),Ir.length>t&&Ir.sort(uu));ta.__r=0}function Wy(e,t,n,r,i,o,s,a,l,u,d){var h,v,m,w,C,A,k=r&&r.__k||qy,$=t.length;for(l=UP(n,t,k,l,$),h=0;h<$;h++)(m=n.__k[h])!=null&&(v=m.__i===-1?fu:k[m.__i]||fu,m.__i=h,A=Yy(e,m,v,i,o,s,a,l,u,d),w=m.__e,m.ref&&v.ref!=m.ref&&(v.ref&&od(v.ref,null,m),d.push(m.ref,m.__c||w,m)),C==null&&w!=null&&(C=w),4&m.__u||v.__k===m.__k?l=Zy(m,l,e):typeof m.type=="function"&&A!==void 0?l=A:w&&(l=w.nextSibling),m.__u&=-7);return n.__e=C,l}function UP(e,t,n,r,i){var o,s,a,l,u,d=n.length,h=d,v=0;for(e.__k=new Array(i),o=0;o<i;o++)(s=t[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(l=o+v,(s=e.__k[o]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?Ml(null,s,null,null,null):nd(s)?Ml(id,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?Ml(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=e,s.__b=e.__b+1,a=null,(u=s.__i=HP(s,n,l,h))!==-1&&(h--,(a=n[u])&&(a.__u|=2)),a==null||a.__v===null?(u==-1&&v--,typeof s.type!="function"&&(s.__u|=4)):u!=l&&(u==l-1?v--:u==l+1?v++:(u>l?v--:v++,s.__u|=4))):e.__k[o]=null;if(h)for(o=0;o<d;o++)(a=n[o])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=xi(a)),Ky(a,a));return r}function Zy(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=Zy(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=xi(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function HP(e,t,n,r){var i,o,s=e.key,a=e.type,l=t[n];if(l===null||l&&s==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,o=n+1;i>=0||o<t.length;){if(i>=0){if((l=t[i])&&(2&l.__u)==0&&s==l.key&&a===l.type)return i;i--}if(o<t.length){if((l=t[o])&&(2&l.__u)==0&&s==l.key&&a===l.type)return o;o++}}return-1}function Ip(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||BP.test(t)?n:n+"px"}function as(e,t,n,r,i){var o;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||Ip(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Ip(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(zy,"$1")),t=t.toLowerCase()in e||t=="onFocusOut"||t=="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=td,e.addEventListener(t,o?du:hu,o)):e.removeEventListener(t,o?du:hu,o);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 Tp(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=td++;else if(t.t<n.u)return;return n(Je.event?Je.event(t):t)}}}function Yy(e,t,n,r,i,o,s,a,l,u){var d,h,v,m,w,C,A,k,$,ne,z,re,Re,Ne,V,fe,ce,he=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=t.__e=n.__e]),(d=Je.__b)&&d(t);e:if(typeof he=="function")try{if(k=t.props,$="prototype"in he&&he.prototype.render,ne=(d=he.contextType)&&r[d.__c],z=d?ne?ne.props.value:d.__:r,n.__c?A=(h=t.__c=n.__c).__=h.__E:($?t.__c=h=new he(k,z):(t.__c=h=new Qi(k,z),h.constructor=he,h.render=qP),ne&&ne.sub(h),h.props=k,h.state||(h.state={}),h.context=z,h.__n=r,v=h.__d=!0,h.__h=[],h._sb=[]),$&&h.__s==null&&(h.__s=h.state),$&&he.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=sr({},h.__s)),sr(h.__s,he.getDerivedStateFromProps(k,h.__s))),m=h.props,w=h.state,h.__v=t,v)$&&he.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),$&&h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if($&&he.getDerivedStateFromProps==null&&k!==m&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(k,z),!h.__e&&(h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(k,h.__s,z)===!1||t.__v==n.__v)){for(t.__v!=n.__v&&(h.props=k,h.state=h.__s,h.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(Se){Se&&(Se.__=t)}),re=0;re<h._sb.length;re++)h.__h.push(h._sb[re]);h._sb=[],h.__h.length&&s.push(h);break e}h.componentWillUpdate!=null&&h.componentWillUpdate(k,h.__s,z),$&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(m,w,C)})}if(h.context=z,h.props=k,h.__P=e,h.__e=!1,Re=Je.__r,Ne=0,$){for(h.state=h.__s,h.__d=!1,Re&&Re(t),d=h.render(h.props,h.state,h.context),V=0;V<h._sb.length;V++)h.__h.push(h._sb[V]);h._sb=[]}else do h.__d=!1,Re&&Re(t),d=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++Ne<25);h.state=h.__s,h.getChildContext!=null&&(r=sr(sr({},r),h.getChildContext())),$&&!v&&h.getSnapshotBeforeUpdate!=null&&(C=h.getSnapshotBeforeUpdate(m,w)),a=Wy(e,nd(fe=d!=null&&d.type===id&&d.key==null?d.props.children:d)?fe:[fe],t,n,r,i,o,s,a,l,u),h.base=t.__e,t.__u&=-161,h.__h.length&&s.push(h),A&&(h.__E=h.__=null)}catch(Se){if(t.__v=null,l||o!=null)if(Se.then){for(t.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,t.__e=a}else for(ce=o.length;ce--;)rd(o[ce]);else t.__e=n.__e,t.__k=n.__k;Je.__e(Se,t,n)}else o==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=zP(n.__e,t,n,r,i,o,s,l,u);return(d=Je.diffed)&&d(t),128&t.__u?void 0:a}function $P(e,t,n){for(var r=0;r<n.length;r++)od(n[r],n[++r],n[++r]);Je.__c&&Je.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){Je.__e(o,i.__v)}})}function zP(e,t,n,r,i,o,s,a,l){var u,d,h,v,m,w,C,A=n.props,k=t.props,$=t.type;if($=="svg"?i="http://www.w3.org/2000/svg":$=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(u=0;u<o.length;u++)if((m=o[u])&&"setAttribute"in m==!!$&&($?m.localName==$:m.nodeType==3)){e=m,o[u]=null;break}}if(e==null){if($==null)return document.createTextNode(k);e=document.createElementNS(i,$,k.is&&k),a&&(Je.__m&&Je.__m(t,o),a=!1),o=null}if($===null)A===k||a&&e.data===k||(e.data=k);else{if(o=o&&By.call(e.childNodes),A=n.props||fu,!a&&o!=null)for(A={},u=0;u<e.attributes.length;u++)A[(m=e.attributes[u]).name]=m.value;for(u in A)if(m=A[u],u!="children"){if(u=="dangerouslySetInnerHTML")h=m;else if(!(u in k)){if(u=="value"&&"defaultValue"in k||u=="checked"&&"defaultChecked"in k)continue;as(e,u,null,m,i)}}for(u in k)m=k[u],u=="children"?v=m:u=="dangerouslySetInnerHTML"?d=m:u=="value"?w=m:u=="checked"?C=m:a&&typeof m!="function"||A[u]===m||as(e,u,m,A[u],i);if(d)a||h&&(d.__html===h.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(h&&(e.innerHTML=""),Wy(e,nd(v)?v:[v],t,n,r,$=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&xi(n,0),a,l),o!=null)for(u=o.length;u--;)rd(o[u]);a||(u="value",$=="progress"&&w==null?e.removeAttribute("value"):w!==void 0&&(w!==e[u]||$=="progress"&&!w||$=="option"&&w!==A[u])&&as(e,u,w,A[u],i),u="checked",C!==void 0&&C!==e[u]&&as(e,u,C,A[u],i))}return e}function od(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){Je.__e(i,n)}}function Ky(e,t,n){var r,i;if(Je.unmount&&Je.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||od(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){Je.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Ky(r[i],t,n||typeof e.type!="function");n||rd(e.__e),e.__c=e.__=e.__e=void 0}function qP(e,t,n){return this.constructor(e,n)}By=qy.slice,Je={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},Uy=0,Hy=function(e){return e!=null&&e.constructor==null},Qi.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=sr({},this.state),typeof e=="function"&&(e=e(sr({},n),this.props)),e&&sr(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Cp(this))},Qi.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Cp(this))},Qi.prototype.render=id,Ir=[],$y=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,uu=function(e,t){return e.__v.__b-t.__v.__b},ta.__r=0,zy=/(PointerCapture)$|Capture$/i,td=0,hu=Tp(!1),du=Tp(!0),VP=0;var pu,Ht,jl,Op,Dp=0,Jy=[],vt=Je,Rp=vt.__b,Np=vt.__r,Pp=vt.diffed,kp=vt.__c,Ap=vt.unmount,Lp=vt.__;function GP(e,t){vt.__h&&vt.__h(Ht,e,Dp||t),Dp=0;var n=Ht.__H||(Ht.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Xy(e,t){var n=GP(pu++,7);return YP(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function WP(){for(var e;e=Jy.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Es),e.__H.__h.forEach(gu),e.__H.__h=[]}catch(t){e.__H.__h=[],vt.__e(t,e.__v)}}vt.__b=function(e){Ht=null,Rp&&Rp(e)},vt.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Lp&&Lp(e,t)},vt.__r=function(e){Np&&Np(e),pu=0;var t=(Ht=e.__c).__H;t&&(jl===Ht?(t.__h=[],Ht.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(t.__h.forEach(Es),t.__h.forEach(gu),t.__h=[],pu=0)),jl=Ht},vt.diffed=function(e){Pp&&Pp(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Jy.push(t)!==1&&Op===vt.requestAnimationFrame||((Op=vt.requestAnimationFrame)||ZP)(WP)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),jl=Ht=null},vt.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Es),n.__h=n.__h.filter(function(r){return!r.__||gu(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],vt.__e(r,n.__v)}}),kp&&kp(e,t)},vt.unmount=function(e){Ap&&Ap(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Es(r)}catch(i){t=i}}),n.__H=void 0,t&&vt.__e(t,n.__v))};var Mp=typeof requestAnimationFrame=="function";function ZP(e){var t,n=function(){clearTimeout(r),Mp&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Mp&&(t=requestAnimationFrame(n))}function Es(e){var t=Ht,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Ht=t}function gu(e){var t=Ht;e.__c=e.__(),Ht=t}function YP(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}var KP=Symbol.for("preact-signals");function sd(){if(fi>1)fi--;else{for(var e,t=!1;eo!==void 0;){var n=eo;for(eo=void 0,_u++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&t0(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(_u=0,fi--,t)throw e}}var Ge=void 0,eo=void 0,fi=0,_u=0,na=0;function Qy(e){if(Ge!==void 0){var t=e.n;if(t===void 0||t.t!==Ge)return t={i:0,S:e,p:Ge.s,n:void 0,t:Ge,e:void 0,x:void 0,r:t},Ge.s!==void 0&&(Ge.s.n=t),Ge.s=t,e.n=t,32&Ge.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=Ge.s,t.n=void 0,Ge.s.n=t,Ge.s=t),t}}function It(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}It.prototype.brand=KP;It.prototype.h=function(){return!0};It.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)};It.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)}};It.prototype.subscribe=function(e){var t=this;return ld(function(){var n=t.value,r=Ge;Ge=void 0;try{e(n)}finally{Ge=r}})};It.prototype.valueOf=function(){return this.value};It.prototype.toString=function(){return this.value+""};It.prototype.toJSON=function(){return this.value};It.prototype.peek=function(){var e=Ge;Ge=void 0;try{return this.value}finally{Ge=e}};Object.defineProperty(It.prototype,"value",{get:function(){var e=Qy(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++,na++,fi++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{sd()}}}});function e0(e){return new It(e)}function t0(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 n0(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 r0(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 Mi(e){It.call(this,void 0),this.x=e,this.s=void 0,this.g=na-1,this.f=4}(Mi.prototype=new It).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===na))return!0;if(this.g=na,this.f|=1,this.i>0&&!t0(this))return this.f&=-2,!0;var e=Ge;try{n0(this),Ge=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 Ge=e,r0(this),this.f&=-2,!0};Mi.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)}It.prototype.S.call(this,e)};Mi.prototype.U=function(e){if(this.t!==void 0&&(It.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)}};Mi.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(Mi.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Qy(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function JP(e){return new Mi(e)}function i0(e){var t=e.u;if(e.u=void 0,typeof t=="function"){fi++;var n=Ge;Ge=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,ad(e),r}finally{Ge=n,sd()}}}function ad(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,i0(e)}function XP(e){if(Ge!==this)throw new Error("Out-of-order effect");r0(this),Ge=e,this.f&=-2,8&this.f&&ad(this),sd()}function Ho(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ho.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()}};Ho.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,i0(this),n0(this),fi++;var e=Ge;return Ge=this,XP.bind(this,e)};Ho.prototype.N=function(){2&this.f||(this.f|=2,this.o=eo,eo=this)};Ho.prototype.d=function(){this.f|=8,1&this.f||ad(this)};function ld(e){var t=new Ho(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var cd,Fl;function ji(e,t){Je[e]=t.bind(null,Je[e]||function(){})}function ra(e){Fl&&Fl(),Fl=e&&e.S()}function o0(e){var t=this,n=e.data,r=ek(n);r.value=n;var i=Xy(function(){for(var o=t.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return t.__$u.c=function(){var s,a=t.__$u.S(),l=i.value;a(),Hy(l)||((s=t.base)==null?void 0:s.nodeType)!==3?(t.__$f|=1,t.setState({})):t.base.data=l},JP(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}o0.displayName="_st";Object.defineProperties(It.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:o0},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});ji("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var i in r)if(i!=="children"){var o=r[i];o instanceof It&&(n||(t.__np=n={}),n[i]=o,r[i]=o.peek())}}e(t)});ji("__r",function(e,t){ra();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var o;return ld(function(){o=this}),o.c=function(){r.__$f|=1,r.setState({})},o}())),cd=r,ra(n),e(t)});ji("__e",function(e,t,n,r){ra(),cd=void 0,e(t,n,r)});ji("diffed",function(e,t){ra(),cd=void 0;var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,i=t.props;if(r){var o=n.U;if(o)for(var s in o){var a=o[s];a!==void 0&&!(s in r)&&(a.d(),o[s]=void 0)}else n.U=o={};for(var l in r){var u=o[l],d=r[l];u===void 0?(u=QP(n,l,d,i),o[l]=u):u.o(d,i)}}}e(t)});function QP(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,o=e0(n);return{o:function(s,a){o.value=s,r=a},d:ld(function(){var s=o.value.value;r[t]!==s&&(r[t]=s,i?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}ji("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 o=r[i];o&&o.d()}}}}else{var s=t.__c;if(s){var a=s.__$u;a&&(s.__$u=void 0,a.d())}}e(t)});ji("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)});Qi.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 o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var s in this.props)if(!(s in e))return!0;return!1};function ek(e){return Xy(function(){return e0(e)},[])}var s0=(e=>(e.GALLERY="GALLERY",e.CURRENT_PRODUCT="CURRENT_PRODUCT",e))(s0||{}),a0=(e=>(e.SIMPLE="SIMPLE",e.SWIPER="SWIPER",e.STORY="STORY",e.FLOATING_POPUP="FLOATING_POPUP",e))(a0||{}),l0=(e=>(e.ON="ON",e.OFF="OFF",e.ON_HOVER="ON_HOVER",e))(l0||{}),c0=(e=>(e.FIRST_ITEM="FIRST_ITEM",e.BADGE="BADGE",e.NONE="NONE",e))(c0||{});function tk(e,t){return t={exports:{}},e(t,t.exports),t.exports}var nk=sk,rk=lk,ik=hk,Tn=[],Xt=[],ok=typeof Uint8Array<"u"?Uint8Array:Array,Vl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(yr=0,jp=Vl.length;yr<jp;++yr)Tn[yr]=Vl[yr],Xt[Vl.charCodeAt(yr)]=yr;var yr,jp;Xt[45]=62;Xt[95]=63;function u0(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 sk(e){var t=u0(e),n=t[0],r=t[1];return(n+r)*3/4-r}function ak(e,t,n){return(t+n)*3/4-n}function lk(e){var t,n=u0(e),r=n[0],i=n[1],o=new ok(ak(e,r,i)),s=0,a=i>0?r-4:r,l;for(l=0;l<a;l+=4)t=Xt[e.charCodeAt(l)]<<18|Xt[e.charCodeAt(l+1)]<<12|Xt[e.charCodeAt(l+2)]<<6|Xt[e.charCodeAt(l+3)],o[s++]=t>>16&255,o[s++]=t>>8&255,o[s++]=t&255;return i===2&&(t=Xt[e.charCodeAt(l)]<<2|Xt[e.charCodeAt(l+1)]>>4,o[s++]=t&255),i===1&&(t=Xt[e.charCodeAt(l)]<<10|Xt[e.charCodeAt(l+1)]<<4|Xt[e.charCodeAt(l+2)]>>2,o[s++]=t>>8&255,o[s++]=t&255),o}function ck(e){return Tn[e>>18&63]+Tn[e>>12&63]+Tn[e>>6&63]+Tn[e&63]}function uk(e,t,n){for(var r,i=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),i.push(ck(r));return i.join("")}function hk(e){for(var t,n=e.length,r=n%3,i=[],o=16383,s=0,a=n-r;s<a;s+=o)i.push(uk(e,s,s+o>a?a:s+o));return r===1?(t=e[n-1],i.push(Tn[t>>2]+Tn[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(Tn[t>>10]+Tn[t>>4&63]+Tn[t<<2&63]+"=")),i.join("")}var Bl={byteLength:nk,toByteArray:rk,fromByteArray:ik},dk=function(e,t,n,r,i){var o,s,a=i*8-r-1,l=(1<<a)-1,u=l>>1,d=-7,h=n?i-1:0,v=n?-1:1,m=e[t+h];for(h+=v,o=m&(1<<-d)-1,m>>=-d,d+=a;d>0;o=o*256+e[t+h],h+=v,d-=8);for(s=o&(1<<-d)-1,o>>=-d,d+=r;d>0;s=s*256+e[t+h],h+=v,d-=8);if(o===0)o=1-u;else{if(o===l)return s?NaN:(m?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-u}return(m?-1:1)*s*Math.pow(2,o-r)},fk=function(e,t,n,r,i,o){var s,a,l,u=o*8-i-1,d=(1<<u)-1,h=d>>1,v=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:o-1,w=r?1:-1,C=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=d):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+h>=1?t+=v/l:t+=v*Math.pow(2,1-h),t*l>=2&&(s++,l/=2),s+h>=d?(a=0,s=d):s+h>=1?(a=(t*l-1)*Math.pow(2,i),s=s+h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[n+m]=a&255,m+=w,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;e[n+m]=s&255,m+=w,s/=256,u-=8);e[n+m-w]|=C*128},Xr={read:dk,write:fk},Ka=tk(function(e,t){var n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=s,t.SlowBuffer=k,t.INSPECT_MAX_BYTES=50;var r=2147483647;t.kMaxLength=r,s.TYPED_ARRAY_SUPPORT=i(),!s.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 c=new Uint8Array(1),f={foo:function(){return 42}};return Object.setPrototypeOf(f,Uint8Array.prototype),Object.setPrototypeOf(c,f),c.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(c){if(c>r)throw new RangeError('The value "'+c+'" is invalid for option "size"');var f=new Uint8Array(c);return Object.setPrototypeOf(f,s.prototype),f}function s(c,f,p){if(typeof c=="number"){if(typeof f=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(c)}return a(c,f,p)}s.poolSize=8192;function a(c,f,p){if(typeof c=="string")return h(c,f);if(ArrayBuffer.isView(c))return m(c);if(c==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(c));if(oe(c,ArrayBuffer)||c&&oe(c.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(oe(c,SharedArrayBuffer)||c&&oe(c.buffer,SharedArrayBuffer)))return w(c,f,p);if(typeof c=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var S=c.valueOf&&c.valueOf();if(S!=null&&S!==c)return s.from(S,f,p);var N=C(c);if(N)return N;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof c[Symbol.toPrimitive]=="function")return s.from(c[Symbol.toPrimitive]("string"),f,p);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(c))}s.from=function(c,f,p){return a(c,f,p)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(c){if(typeof c!="number")throw new TypeError('"size" argument must be of type number');if(c<0)throw new RangeError('The value "'+c+'" is invalid for option "size"')}function u(c,f,p){return l(c),c<=0?o(c):f!==void 0?typeof p=="string"?o(c).fill(f,p):o(c).fill(f):o(c)}s.alloc=function(c,f,p){return u(c,f,p)};function d(c){return l(c),o(c<0?0:A(c)|0)}s.allocUnsafe=function(c){return d(c)},s.allocUnsafeSlow=function(c){return d(c)};function h(c,f){if((typeof f!="string"||f==="")&&(f="utf8"),!s.isEncoding(f))throw new TypeError("Unknown encoding: "+f);var p=$(c,f)|0,S=o(p),N=S.write(c,f);return N!==p&&(S=S.slice(0,N)),S}function v(c){for(var f=c.length<0?0:A(c.length)|0,p=o(f),S=0;S<f;S+=1)p[S]=c[S]&255;return p}function m(c){if(oe(c,Uint8Array)){var f=new Uint8Array(c);return w(f.buffer,f.byteOffset,f.byteLength)}return v(c)}function w(c,f,p){if(f<0||c.byteLength<f)throw new RangeError('"offset" is outside of buffer bounds');if(c.byteLength<f+(p||0))throw new RangeError('"length" is outside of buffer bounds');var S;return f===void 0&&p===void 0?S=new Uint8Array(c):p===void 0?S=new Uint8Array(c,f):S=new Uint8Array(c,f,p),Object.setPrototypeOf(S,s.prototype),S}function C(c){if(s.isBuffer(c)){var f=A(c.length)|0,p=o(f);return p.length===0||c.copy(p,0,0,f),p}if(c.length!==void 0)return typeof c.length!="number"||me(c.length)?o(0):v(c);if(c.type==="Buffer"&&Array.isArray(c.data))return v(c.data)}function A(c){if(c>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return c|0}function k(c){return+c!=c&&(c=0),s.alloc(+c)}s.isBuffer=function(c){return c!=null&&c._isBuffer===!0&&c!==s.prototype},s.compare=function(c,f){if(oe(c,Uint8Array)&&(c=s.from(c,c.offset,c.byteLength)),oe(f,Uint8Array)&&(f=s.from(f,f.offset,f.byteLength)),!s.isBuffer(c)||!s.isBuffer(f))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===f)return 0;for(var p=c.length,S=f.length,N=0,j=Math.min(p,S);N<j;++N)if(c[N]!==f[N]){p=c[N],S=f[N];break}return p<S?-1:S<p?1:0},s.isEncoding=function(c){switch(String(c).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}},s.concat=function(c,f){if(!Array.isArray(c))throw new TypeError('"list" argument must be an Array of Buffers');if(c.length===0)return s.alloc(0);var p;if(f===void 0)for(f=0,p=0;p<c.length;++p)f+=c[p].length;var S=s.allocUnsafe(f),N=0;for(p=0;p<c.length;++p){var j=c[p];if(oe(j,Uint8Array))N+j.length>S.length?s.from(j).copy(S,N):Uint8Array.prototype.set.call(S,j,N);else if(s.isBuffer(j))j.copy(S,N);else throw new TypeError('"list" argument must be an Array of Buffers');N+=j.length}return S};function $(c,f){if(s.isBuffer(c))return c.length;if(ArrayBuffer.isView(c)||oe(c,ArrayBuffer))return c.byteLength;if(typeof c!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(c));var p=c.length,S=arguments.length>2&&arguments[2]===!0;if(!S&&p===0)return 0;for(var N=!1;;)switch(f){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return Y(c).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p*2;case"hex":return p>>>1;case"base64":return Ee(c).length;default:if(N)return S?-1:Y(c).length;f=(""+f).toLowerCase(),N=!0}}s.byteLength=$;function ne(c,f,p){var S=!1;if((f===void 0||f<0)&&(f=0),f>this.length||((p===void 0||p>this.length)&&(p=this.length),p<=0)||(p>>>=0,f>>>=0,p<=f))return"";for(c||(c="utf8");;)switch(c){case"hex":return R(this,f,p);case"utf8":case"utf-8":return $e(this,f,p);case"ascii":return it(this,f,p);case"latin1":case"binary":return Pe(this,f,p);case"base64":return Se(this,f,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,f,p);default:if(S)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),S=!0}}s.prototype._isBuffer=!0;function z(c,f,p){var S=c[f];c[f]=c[p],c[p]=S}s.prototype.swap16=function(){var c=this.length;if(c%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var f=0;f<c;f+=2)z(this,f,f+1);return this},s.prototype.swap32=function(){var c=this.length;if(c%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var f=0;f<c;f+=4)z(this,f,f+3),z(this,f+1,f+2);return this},s.prototype.swap64=function(){var c=this.length;if(c%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var f=0;f<c;f+=8)z(this,f,f+7),z(this,f+1,f+6),z(this,f+2,f+5),z(this,f+3,f+4);return this},s.prototype.toString=function(){var c=this.length;return c===0?"":arguments.length===0?$e(this,0,c):ne.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(c){if(!s.isBuffer(c))throw new TypeError("Argument must be a Buffer");return this===c?!0:s.compare(this,c)===0},s.prototype.inspect=function(){var c="",f=t.INSPECT_MAX_BYTES;return c=this.toString("hex",0,f).replace(/(.{2})/g,"$1 ").trim(),this.length>f&&(c+=" ... "),"<Buffer "+c+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(c,f,p,S,N){if(oe(c,Uint8Array)&&(c=s.from(c,c.offset,c.byteLength)),!s.isBuffer(c))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(c));if(f===void 0&&(f=0),p===void 0&&(p=c?c.length:0),S===void 0&&(S=0),N===void 0&&(N=this.length),f<0||p>c.length||S<0||N>this.length)throw new RangeError("out of range index");if(S>=N&&f>=p)return 0;if(S>=N)return-1;if(f>=p)return 1;if(f>>>=0,p>>>=0,S>>>=0,N>>>=0,this===c)return 0;for(var j=N-S,J=p-f,ie=Math.min(j,J),Me=this.slice(S,N),Ie=c.slice(f,p),je=0;je<ie;++je)if(Me[je]!==Ie[je]){j=Me[je],J=Ie[je];break}return j<J?-1:J<j?1:0};function re(c,f,p,S,N){if(c.length===0)return-1;if(typeof p=="string"?(S=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),p=+p,me(p)&&(p=N?0:c.length-1),p<0&&(p=c.length+p),p>=c.length){if(N)return-1;p=c.length-1}else if(p<0)if(N)p=0;else return-1;if(typeof f=="string"&&(f=s.from(f,S)),s.isBuffer(f))return f.length===0?-1:Re(c,f,p,S,N);if(typeof f=="number")return f=f&255,typeof Uint8Array.prototype.indexOf=="function"?N?Uint8Array.prototype.indexOf.call(c,f,p):Uint8Array.prototype.lastIndexOf.call(c,f,p):Re(c,[f],p,S,N);throw new TypeError("val must be string, number or Buffer")}function Re(c,f,p,S,N){var j=1,J=c.length,ie=f.length;if(S!==void 0&&(S=String(S).toLowerCase(),S==="ucs2"||S==="ucs-2"||S==="utf16le"||S==="utf-16le")){if(c.length<2||f.length<2)return-1;j=2,J/=2,ie/=2,p/=2}function Me(Ln,ut){return j===1?Ln[ut]:Ln.readUInt16BE(ut*j)}var Ie;if(N){var je=-1;for(Ie=p;Ie<J;Ie++)if(Me(c,Ie)===Me(f,je===-1?0:Ie-je)){if(je===-1&&(je=Ie),Ie-je+1===ie)return je*j}else je!==-1&&(Ie-=Ie-je),je=-1}else for(p+ie>J&&(p=J-ie),Ie=p;Ie>=0;Ie--){for(var ke=!0,Et=0;Et<ie;Et++)if(Me(c,Ie+Et)!==Me(f,Et)){ke=!1;break}if(ke)return Ie}return-1}s.prototype.includes=function(c,f,p){return this.indexOf(c,f,p)!==-1},s.prototype.indexOf=function(c,f,p){return re(this,c,f,p,!0)},s.prototype.lastIndexOf=function(c,f,p){return re(this,c,f,p,!1)};function Ne(c,f,p,S){p=Number(p)||0;var N=c.length-p;S?(S=Number(S),S>N&&(S=N)):S=N;var j=f.length;S>j/2&&(S=j/2);for(var J=0;J<S;++J){var ie=parseInt(f.substr(J*2,2),16);if(me(ie))return J;c[p+J]=ie}return J}function V(c,f,p,S){return K(Y(f,c.length-p),c,p,S)}function fe(c,f,p,S){return K(ue(f),c,p,S)}function ce(c,f,p,S){return K(Ee(f),c,p,S)}function he(c,f,p,S){return K(pe(f,c.length-p),c,p,S)}s.prototype.write=function(c,f,p,S){if(f===void 0)S="utf8",p=this.length,f=0;else if(p===void 0&&typeof f=="string")S=f,p=this.length,f=0;else if(isFinite(f))f=f>>>0,isFinite(p)?(p=p>>>0,S===void 0&&(S="utf8")):(S=p,p=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var N=this.length-f;if((p===void 0||p>N)&&(p=N),c.length>0&&(p<0||f<0)||f>this.length)throw new RangeError("Attempt to write outside buffer bounds");S||(S="utf8");for(var j=!1;;)switch(S){case"hex":return Ne(this,c,f,p);case"utf8":case"utf-8":return V(this,c,f,p);case"ascii":case"latin1":case"binary":return fe(this,c,f,p);case"base64":return ce(this,c,f,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return he(this,c,f,p);default:if(j)throw new TypeError("Unknown encoding: "+S);S=(""+S).toLowerCase(),j=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Se(c,f,p){return f===0&&p===c.length?Bl.fromByteArray(c):Bl.fromByteArray(c.slice(f,p))}function $e(c,f,p){p=Math.min(c.length,p);for(var S=[],N=f;N<p;){var j=c[N],J=null,ie=j>239?4:j>223?3:j>191?2:1;if(N+ie<=p){var Me,Ie,je,ke;switch(ie){case 1:j<128&&(J=j);break;case 2:Me=c[N+1],(Me&192)===128&&(ke=(j&31)<<6|Me&63,ke>127&&(J=ke));break;case 3:Me=c[N+1],Ie=c[N+2],(Me&192)===128&&(Ie&192)===128&&(ke=(j&15)<<12|(Me&63)<<6|Ie&63,ke>2047&&(ke<55296||ke>57343)&&(J=ke));break;case 4:Me=c[N+1],Ie=c[N+2],je=c[N+3],(Me&192)===128&&(Ie&192)===128&&(je&192)===128&&(ke=(j&15)<<18|(Me&63)<<12|(Ie&63)<<6|je&63,ke>65535&&ke<1114112&&(J=ke))}}J===null?(J=65533,ie=1):J>65535&&(J-=65536,S.push(J>>>10&1023|55296),J=56320|J&1023),S.push(J),N+=ie}return Ke(S)}var _=4096;function Ke(c){var f=c.length;if(f<=_)return String.fromCharCode.apply(String,c);for(var p="",S=0;S<f;)p+=String.fromCharCode.apply(String,c.slice(S,S+=_));return p}function it(c,f,p){var S="";p=Math.min(c.length,p);for(var N=f;N<p;++N)S+=String.fromCharCode(c[N]&127);return S}function Pe(c,f,p){var S="";p=Math.min(c.length,p);for(var N=f;N<p;++N)S+=String.fromCharCode(c[N]);return S}function R(c,f,p){var S=c.length;(!f||f<0)&&(f=0),(!p||p<0||p>S)&&(p=S);for(var N="",j=f;j<p;++j)N+=de[c[j]];return N}function D(c,f,p){for(var S=c.slice(f,p),N="",j=0;j<S.length-1;j+=2)N+=String.fromCharCode(S[j]+S[j+1]*256);return N}s.prototype.slice=function(c,f){var p=this.length;c=~~c,f=f===void 0?p:~~f,c<0?(c+=p,c<0&&(c=0)):c>p&&(c=p),f<0?(f+=p,f<0&&(f=0)):f>p&&(f=p),f<c&&(f=c);var S=this.subarray(c,f);return Object.setPrototypeOf(S,s.prototype),S};function b(c,f,p){if(c%1!==0||c<0)throw new RangeError("offset is not uint");if(c+f>p)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(c,f,p){c=c>>>0,f=f>>>0,p||b(c,f,this.length);for(var S=this[c],N=1,j=0;++j<f&&(N*=256);)S+=this[c+j]*N;return S},s.prototype.readUintBE=s.prototype.readUIntBE=function(c,f,p){c=c>>>0,f=f>>>0,p||b(c,f,this.length);for(var S=this[c+--f],N=1;f>0&&(N*=256);)S+=this[c+--f]*N;return S},s.prototype.readUint8=s.prototype.readUInt8=function(c,f){return c=c>>>0,f||b(c,1,this.length),this[c]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(c,f){return c=c>>>0,f||b(c,2,this.length),this[c]|this[c+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(c,f){return c=c>>>0,f||b(c,2,this.length),this[c]<<8|this[c+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(c,f){return c=c>>>0,f||b(c,4,this.length),(this[c]|this[c+1]<<8|this[c+2]<<16)+this[c+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(c,f){return c=c>>>0,f||b(c,4,this.length),this[c]*16777216+(this[c+1]<<16|this[c+2]<<8|this[c+3])},s.prototype.readIntLE=function(c,f,p){c=c>>>0,f=f>>>0,p||b(c,f,this.length);for(var S=this[c],N=1,j=0;++j<f&&(N*=256);)S+=this[c+j]*N;return N*=128,S>=N&&(S-=Math.pow(2,8*f)),S},s.prototype.readIntBE=function(c,f,p){c=c>>>0,f=f>>>0,p||b(c,f,this.length);for(var S=f,N=1,j=this[c+--S];S>0&&(N*=256);)j+=this[c+--S]*N;return N*=128,j>=N&&(j-=Math.pow(2,8*f)),j},s.prototype.readInt8=function(c,f){return c=c>>>0,f||b(c,1,this.length),this[c]&128?(255-this[c]+1)*-1:this[c]},s.prototype.readInt16LE=function(c,f){c=c>>>0,f||b(c,2,this.length);var p=this[c]|this[c+1]<<8;return p&32768?p|4294901760:p},s.prototype.readInt16BE=function(c,f){c=c>>>0,f||b(c,2,this.length);var p=this[c+1]|this[c]<<8;return p&32768?p|4294901760:p},s.prototype.readInt32LE=function(c,f){return c=c>>>0,f||b(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},s.prototype.readInt32BE=function(c,f){return c=c>>>0,f||b(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},s.prototype.readFloatLE=function(c,f){return c=c>>>0,f||b(c,4,this.length),Xr.read(this,c,!0,23,4)},s.prototype.readFloatBE=function(c,f){return c=c>>>0,f||b(c,4,this.length),Xr.read(this,c,!1,23,4)},s.prototype.readDoubleLE=function(c,f){return c=c>>>0,f||b(c,8,this.length),Xr.read(this,c,!0,52,8)},s.prototype.readDoubleBE=function(c,f){return c=c>>>0,f||b(c,8,this.length),Xr.read(this,c,!1,52,8)};function y(c,f,p,S,N,j){if(!s.isBuffer(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(f>N||f<j)throw new RangeError('"value" argument is out of bounds');if(p+S>c.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(c,f,p,S){if(c=+c,f=f>>>0,p=p>>>0,!S){var N=Math.pow(2,8*p)-1;y(this,c,f,p,N,0)}var j=1,J=0;for(this[f]=c&255;++J<p&&(j*=256);)this[f+J]=c/j&255;return f+p},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(c,f,p,S){if(c=+c,f=f>>>0,p=p>>>0,!S){var N=Math.pow(2,8*p)-1;y(this,c,f,p,N,0)}var j=p-1,J=1;for(this[f+j]=c&255;--j>=0&&(J*=256);)this[f+j]=c/J&255;return f+p},s.prototype.writeUint8=s.prototype.writeUInt8=function(c,f,p){return c=+c,f=f>>>0,p||y(this,c,f,1,255,0),this[f]=c&255,f+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(c,f,p){return c=+c,f=f>>>0,p||y(this,c,f,2,65535,0),this[f]=c&255,this[f+1]=c>>>8,f+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(c,f,p){return c=+c,f=f>>>0,p||y(this,c,f,2,65535,0),this[f]=c>>>8,this[f+1]=c&255,f+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(c,f,p){return c=+c,f=f>>>0,p||y(this,c,f,4,4294967295,0),this[f+3]=c>>>24,this[f+2]=c>>>16,this[f+1]=c>>>8,this[f]=c&255,f+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(c,f,p){return c=+c,f=f>>>0,p||y(this,c,f,4,4294967295,0),this[f]=c>>>24,this[f+1]=c>>>16,this[f+2]=c>>>8,this[f+3]=c&255,f+4},s.prototype.writeIntLE=function(c,f,p,S){if(c=+c,f=f>>>0,!S){var N=Math.pow(2,8*p-1);y(this,c,f,p,N-1,-N)}var j=0,J=1,ie=0;for(this[f]=c&255;++j<p&&(J*=256);)c<0&&ie===0&&this[f+j-1]!==0&&(ie=1),this[f+j]=(c/J>>0)-ie&255;return f+p},s.prototype.writeIntBE=function(c,f,p,S){if(c=+c,f=f>>>0,!S){var N=Math.pow(2,8*p-1);y(this,c,f,p,N-1,-N)}var j=p-1,J=1,ie=0;for(this[f+j]=c&255;--j>=0&&(J*=256);)c<0&&ie===0&&this[f+j+1]!==0&&(ie=1),this[f+j]=(c/J>>0)-ie&255;return f+p},s.prototype.writeInt8=function(c,f,p){return c=+c,f=f>>>0,p||y(this,c,f,1,127,-128),c<0&&(c=255+c+1),this[f]=c&255,f+1},s.prototype.writeInt16LE=function(c,f,p){return c=+c,f=f>>>0,p||y(this,c,f,2,32767,-32768),this[f]=c&255,this[f+1]=c>>>8,f+2},s.prototype.writeInt16BE=function(c,f,p){return c=+c,f=f>>>0,p||y(this,c,f,2,32767,-32768),this[f]=c>>>8,this[f+1]=c&255,f+2},s.prototype.writeInt32LE=function(c,f,p){return c=+c,f=f>>>0,p||y(this,c,f,4,2147483647,-2147483648),this[f]=c&255,this[f+1]=c>>>8,this[f+2]=c>>>16,this[f+3]=c>>>24,f+4},s.prototype.writeInt32BE=function(c,f,p){return c=+c,f=f>>>0,p||y(this,c,f,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[f]=c>>>24,this[f+1]=c>>>16,this[f+2]=c>>>8,this[f+3]=c&255,f+4};function L(c,f,p,S,N,j){if(p+S>c.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function U(c,f,p,S,N){return f=+f,p=p>>>0,N||L(c,f,p,4),Xr.write(c,f,p,S,23,4),p+4}s.prototype.writeFloatLE=function(c,f,p){return U(this,c,f,!0,p)},s.prototype.writeFloatBE=function(c,f,p){return U(this,c,f,!1,p)};function W(c,f,p,S,N){return f=+f,p=p>>>0,N||L(c,f,p,8),Xr.write(c,f,p,S,52,8),p+8}s.prototype.writeDoubleLE=function(c,f,p){return W(this,c,f,!0,p)},s.prototype.writeDoubleBE=function(c,f,p){return W(this,c,f,!1,p)},s.prototype.copy=function(c,f,p,S){if(!s.isBuffer(c))throw new TypeError("argument should be a Buffer");if(p||(p=0),!S&&S!==0&&(S=this.length),f>=c.length&&(f=c.length),f||(f=0),S>0&&S<p&&(S=p),S===p||c.length===0||this.length===0)return 0;if(f<0)throw new RangeError("targetStart out of bounds");if(p<0||p>=this.length)throw new RangeError("Index out of range");if(S<0)throw new RangeError("sourceEnd out of bounds");S>this.length&&(S=this.length),c.length-f<S-p&&(S=c.length-f+p);var N=S-p;return this===c&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(f,p,S):Uint8Array.prototype.set.call(c,this.subarray(p,S),f),N},s.prototype.fill=function(c,f,p,S){if(typeof c=="string"){if(typeof f=="string"?(S=f,f=0,p=this.length):typeof p=="string"&&(S=p,p=this.length),S!==void 0&&typeof S!="string")throw new TypeError("encoding must be a string");if(typeof S=="string"&&!s.isEncoding(S))throw new TypeError("Unknown encoding: "+S);if(c.length===1){var N=c.charCodeAt(0);(S==="utf8"&&N<128||S==="latin1")&&(c=N)}}else typeof c=="number"?c=c&255:typeof c=="boolean"&&(c=Number(c));if(f<0||this.length<f||this.length<p)throw new RangeError("Out of range index");if(p<=f)return this;f=f>>>0,p=p===void 0?this.length:p>>>0,c||(c=0);var j;if(typeof c=="number")for(j=f;j<p;++j)this[j]=c;else{var J=s.isBuffer(c)?c:s.from(c,S),ie=J.length;if(ie===0)throw new TypeError('The value "'+c+'" is invalid for argument "value"');for(j=0;j<p-f;++j)this[j+f]=J[j%ie]}return this};var te=/[^+/0-9A-Za-z-_]/g;function ee(c){if(c=c.split("=")[0],c=c.trim().replace(te,""),c.length<2)return"";for(;c.length%4!==0;)c=c+"=";return c}function Y(c,f){f=f||1/0;for(var p,S=c.length,N=null,j=[],J=0;J<S;++J){if(p=c.charCodeAt(J),p>55295&&p<57344){if(!N){if(p>56319){(f-=3)>-1&&j.push(239,191,189);continue}else if(J+1===S){(f-=3)>-1&&j.push(239,191,189);continue}N=p;continue}if(p<56320){(f-=3)>-1&&j.push(239,191,189),N=p;continue}p=(N-55296<<10|p-56320)+65536}else N&&(f-=3)>-1&&j.push(239,191,189);if(N=null,p<128){if((f-=1)<0)break;j.push(p)}else if(p<2048){if((f-=2)<0)break;j.push(p>>6|192,p&63|128)}else if(p<65536){if((f-=3)<0)break;j.push(p>>12|224,p>>6&63|128,p&63|128)}else if(p<1114112){if((f-=4)<0)break;j.push(p>>18|240,p>>12&63|128,p>>6&63|128,p&63|128)}else throw new Error("Invalid code point")}return j}function ue(c){for(var f=[],p=0;p<c.length;++p)f.push(c.charCodeAt(p)&255);return f}function pe(c,f){for(var p,S,N,j=[],J=0;J<c.length&&!((f-=2)<0);++J)p=c.charCodeAt(J),S=p>>8,N=p%256,j.push(N),j.push(S);return j}function Ee(c){return Bl.toByteArray(ee(c))}function K(c,f,p,S){for(var N=0;N<S&&!(N+p>=f.length||N>=c.length);++N)f[N+p]=c[N];return N}function oe(c,f){return c instanceof f||c!=null&&c.constructor!=null&&c.constructor.name!=null&&c.constructor.name===f.name}function me(c){return c!==c}var de=function(){for(var c="0123456789abcdef",f=new Array(256),p=0;p<16;++p)for(var S=p*16,N=0;N<16;++N)f[S+N]=c[p]+c[N];return f}()}),Ve=Ka.Buffer;Ka.SlowBuffer;Ka.INSPECT_MAX_BYTES;Ka.kMaxLength;var mu=function(e,t){return mu=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])},mu(e,t)};function Ja(e,t){mu(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Nr=function(e){Ja(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),at=function(e){Ja(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 ls(e){return e&&e.Math==Math&&e}function h0(){return ls(typeof globalThis=="object"&&globalThis)||ls(typeof window=="object"&&window)||ls(typeof self=="object"&&self)||ls(typeof global=="object"&&global)||Function("return this")()}function pk(){var e=h0();return typeof e.navigator=="object"&&e.navigator.product==="ReactNative"}var gk=function(e){var t=pk()?"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=Ve.alloc(e),r=0;r<e;++r)n[r]=Math.floor(Math.random()*256);return n},_k=function(){{if(typeof window<"u"){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues)return function(t){return e.getRandomValues(Ve.alloc(t))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(t){return global.crypto.getRandomValues(Ve.alloc(t))}:gk}},d0=_k();function mk(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function ud(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function vk(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function yk(e){return $o(e)&&Object.prototype.toString.call(e)==="[object Date]"}function $o(e){return typeof e=="object"&&e!==null}function Xa(e,t){var n=!1;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return n||(console.warn(t),n=!0),e.apply(this,i)}return r}function ia(e){if(ArrayBuffer.isView(e))return Ve.from(e.buffer,e.byteOffset,e.byteLength);if(mk(e))return Ve.from(e);throw new at("Must use either Buffer or TypedArray")}var bk=/^(?:[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,f0=function(e){return typeof e=="string"&&bk.test(e)},vu=function(e){if(!f0(e))throw new at('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 Ve.from(t,"hex")},Fp=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")},TM=Math.pow(2,63)-1,OM=-Math.pow(2,63),wk=Math.pow(2,53),Ek=-Math.pow(2,53),p0=4,Pr=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 at("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=Ve.alloc(e.BUFFER_SIZE),this.position=0):(typeof t=="string"?this.buffer=Ve.from(t,"binary"):Array.isArray(t)?this.buffer=Ve.from(t):this.buffer=ia(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if(typeof t=="string"&&t.length!==1)throw new at("only accepts single character String");if(typeof t!="number"&&t.length!==1)throw new at("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 at("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=Ve.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=Ve.alloc(this.buffer.length+t.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(t)?(this.buffer.set(ia(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 Vp(this.buffer.slice(0,this.position));throw new Nr('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=Ve.from(t.$binary,"base64")):typeof t.$binary!="string"&&(i=t.$binary.subType?parseInt(t.$binary.subType,16):0,r=Ve.from(t.$binary.base64,"base64")):"$uuid"in t&&(i=4,r=vu(t.$uuid)),!r)throw new at("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return i===p0?new Vp(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(Pr.prototype,"_bsontype",{value:"Binary"});var Ul=16,Vp=function(e){Ja(t,e);function t(n){var r=this,i,o;if(n==null)i=t.generate();else if(n instanceof t)i=Ve.from(n.buffer),o=n.__id;else if(ArrayBuffer.isView(n)&&n.byteLength===Ul)i=ia(n);else if(typeof n=="string")i=vu(n);else throw new at("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,p0)||this,r.__id=o,r}return Object.defineProperty(t.prototype,"id",{get:function(){return this.buffer},set:function(n){this.buffer=n,t.cacheHexString&&(this.__id=Fp(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=Fp(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 Pr(this.id,Pr.SUBTYPE_UUID)},t.generate=function(){var n=d0(Ul);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Ve.from(n)},t.isValid=function(n){return n?n instanceof t?!0:typeof n=="string"?f0(n):ud(n)?n.length!==Ul?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},t.createFromHexString=function(n){var r=vu(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}(Pr),Qa=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(Qa.prototype,"_bsontype",{value:"Code"});function xk(e){return $o(e)&&e.$id!=null&&typeof e.$ref=="string"&&(e.$db==null||typeof e.$db=="string")}var Eo=function(){function e(t,n,r,i){if(!(this instanceof e))return new e(t,n,r,i);var o=t.split(".");o.length===2&&(r=o.shift(),t=o.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(Eo.prototype,"_bsontype",{value:"DBRef"});var Jt=void 0;try{Jt=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 Bp=65536,Sk=1<<24,si=Bp*Bp,g0=si*si,Up=g0/2,Hp={},$p={},se=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,o;return n?(t>>>=0,(o=0<=t&&t<256)&&(i=$p[t],i)?i:(r=e.fromBits(t,(t|0)<0?-1:0,!0),o&&($p[t]=r),r)):(t|=0,(o=-128<=t&&t<128)&&(i=Hp[t],i)?i:(r=e.fromBits(t,t<0?-1:0,!1),o&&(Hp[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>=g0)return e.MAX_UNSIGNED_VALUE}else{if(t<=-Up)return e.MIN_VALUE;if(t+1>=Up)return e.MAX_VALUE}return t<0?e.fromNumber(-t,n).neg():e.fromBits(t%si|0,t/si|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 o=e.fromNumber(Math.pow(r,8)),s=e.ZERO,a=0;a<t.length;a+=8){var l=Math.min(8,t.length-a),u=parseInt(t.substring(a,a+l),r);if(l<8){var d=e.fromNumber(Math.pow(r,l));s=s.mul(d).add(e.fromNumber(u))}else s=s.mul(o),s=s.add(e.fromNumber(u))}return s.unsigned=n,s},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 $o(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,o=this.low&65535,s=t.high>>>16,a=t.high&65535,l=t.low>>>16,u=t.low&65535,d=0,h=0,v=0,m=0;return m+=o+u,v+=m>>>16,m&=65535,v+=i+l,h+=v>>>16,v&=65535,h+=r+a,d+=h>>>16,h&=65535,d+=n+s,d&=65535,e.fromBits(v<<16|m,d<<16|h,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(Jt){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var n=(this.unsigned?Jt.div_u:Jt.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,Jt.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var r,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;o=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 s=this.shr(1);return r=s.div(t).shl(1),r.eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(i=this.sub(t.mul(r)),o=r.add(i.div(t)),o)}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();o=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),u=e.fromNumber(r),d=u.mul(t);d.isNegative()||d.gt(i);)r-=l,u=e.fromNumber(r,this.unsigned),d=u.mul(t);u.isZero()&&(u=e.ONE),o=o.add(u),i=i.sub(d)}return o},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)),Jt){var n=(this.unsigned?Jt.rem_u:Jt.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,Jt.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)),Jt){var n=Jt.mul(this.low,this.high,t.low,t.high);return e.fromBits(n,Jt.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,o=this.low>>>16,s=this.low&65535,a=t.high>>>16,l=t.high&65535,u=t.low>>>16,d=t.low&65535,h=0,v=0,m=0,w=0;return w+=s*d,m+=w>>>16,w&=65535,m+=o*d,v+=m>>>16,m&=65535,m+=s*u,v+=m>>>16,m&=65535,v+=i*d,h+=v>>>16,v&=65535,v+=o*u,h+=v>>>16,v&=65535,v+=s*l,h+=v>>>16,v&=65535,h+=r*d+i*u+o*l+s*a,h&=65535,e.fromBits(m<<16|w,h<<16|v,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)*si+(this.low>>>0):this.high*si+(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 o=e.fromNumber(Math.pow(t,6),this.unsigned),s=this,a="";;){var l=s.div(o),u=s.sub(l.mul(o)).toInt()>>>0,d=u.toString(t);if(s=l,s.isZero())return d+a;for(;d.length<6;)d="0"+d;a=""+d+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(Sk),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(se.prototype,"__isLong__",{value:!0});Object.defineProperty(se.prototype,"_bsontype",{value:"Long"});var Ck=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,Ik=/^(\+|-)?(Infinity|inf)$/i,Tk=/^(\+|-)?NaN$/i,Ui=6111,Hl=-6176,zp=6176,Ok=34,$l=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),qp=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Gp=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Dk=/^([-+])?(\d+)?$/,Rk=31,Wp=16383,Nk=30,Pk=31;function Zp(e){return!isNaN(parseInt(e,10))}function kk(e){var t=se.fromNumber(1e9),n=se.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 se(e.parts[r],0)),e.parts[r]=n.div(t).low,n=n.modulo(t);return{quotient:e,rem:n}}function Ak(e,t){if(!e&&!t)return{high:se.fromNumber(0),low:se.fromNumber(0)};var n=e.shiftRightUnsigned(32),r=new se(e.getLowBits(),0),i=t.shiftRightUnsigned(32),o=new se(t.getLowBits(),0),s=n.multiply(i),a=n.multiply(o),l=r.multiply(i),u=r.multiply(o);return s=s.add(a.shiftRightUnsigned(32)),a=new se(a.getLowBits(),0).add(l).add(u.shiftRightUnsigned(32)),s=s.add(a.shiftRightUnsigned(32)),u=a.shiftLeft(32).add(new se(u.getLowBits(),0)),{high:s,low:u}}function Lk(e,t){var n=e.high>>>0,r=t.high>>>0;if(n<r)return!0;if(n===r){var i=e.low>>>0,o=t.low>>>0;if(i<o)return!0}return!1}function Qr(e,t){throw new at('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var hd=function(){function e(t){if(!(this instanceof e))return new e(t);if(typeof t=="string")this.bytes=e.fromString(t).bytes;else if(ud(t)){if(t.byteLength!==16)throw new at("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}else throw new at("Decimal128 must take a Buffer or string")}return e.fromString=function(t){var n=!1,r=!1,i=!1,o=0,s=0,a=0,l=0,u=0,d=[0],h=0,v=0,m=0,w=0,C=0,A=0,k=new se(0,0),$=new se(0,0),ne=0,z=0;if(t.length>=7e3)throw new at(""+t+" not a valid Decimal128 string");var re=t.match(Ck),Re=t.match(Ik),Ne=t.match(Tk);if(!re&&!Re&&!Ne||t.length===0)throw new at(""+t+" not a valid Decimal128 string");if(re){var V=re[2],fe=re[4],ce=re[5],he=re[6];fe&&he===void 0&&Qr(t,"missing exponent power"),fe&&V===void 0&&Qr(t,"missing exponent base"),fe===void 0&&(ce||he)&&Qr(t,"missing e before exponent")}if((t[z]==="+"||t[z]==="-")&&(n=t[z++]==="-"),!Zp(t[z])&&t[z]!=="."){if(t[z]==="i"||t[z]==="I")return new e(Ve.from(n?qp:Gp));if(t[z]==="N")return new e(Ve.from($l))}for(;Zp(t[z])||t[z]===".";){if(t[z]==="."){r&&Qr(t,"contains multiple periods"),r=!0,z=z+1;continue}h<34&&(t[z]!=="0"||i)&&(i||(u=s),i=!0,d[v++]=parseInt(t[z],10),h=h+1),i&&(a=a+1),r&&(l=l+1),s=s+1,z=z+1}if(r&&!s)throw new at(""+t+" not a valid Decimal128 string");if(t[z]==="e"||t[z]==="E"){var Se=t.substr(++z).match(Dk);if(!Se||!Se[2])return new e(Ve.from($l));C=parseInt(Se[0],10),z=z+Se[0].length}if(t[z])return new e(Ve.from($l));if(m=0,!h)m=0,w=0,d[0]=0,a=1,h=1,o=0;else if(w=h-1,o=a,o!==1)for(;d[u+o-1]===0;)o=o-1;for(C<=l&&l-C>16384?C=Hl:C=C-l;C>Ui;){if(w=w+1,w-m>Ok){var $e=d.join("");if($e.match(/^0+$/)){C=Ui;break}Qr(t,"overflow")}C=C-1}for(;C<Hl||h<a;){if(w===0&&o<h){C=Hl,o=0;break}if(h<a?a=a-1:w=w-1,C<Ui)C=C+1;else{var $e=d.join("");if($e.match(/^0+$/)){C=Ui;break}Qr(t,"overflow")}}if(w-m+1<o){var _=s;r&&(u=u+1,_=_+1),n&&(u=u+1,_=_+1);var Ke=parseInt(t[u+w+1],10),it=0;if(Ke>=5&&(it=1,Ke===5)){for(it=d[w]%2===1?1:0,A=u+w+2;A<_;A++)if(parseInt(t[A],10)){it=1;break}}if(it){for(var Pe=w;Pe>=0;Pe--)if(++d[Pe]>9&&(d[Pe]=0,Pe===0))if(C<Ui)C=C+1,d[Pe]=1;else return new e(Ve.from(n?qp:Gp))}}if(k=se.fromNumber(0),$=se.fromNumber(0),o===0)k=se.fromNumber(0),$=se.fromNumber(0);else if(w-m<17){var Pe=m;for($=se.fromNumber(d[Pe++]),k=new se(0,0);Pe<=w;Pe++)$=$.multiply(se.fromNumber(10)),$=$.add(se.fromNumber(d[Pe]))}else{var Pe=m;for(k=se.fromNumber(d[Pe++]);Pe<=w-17;Pe++)k=k.multiply(se.fromNumber(10)),k=k.add(se.fromNumber(d[Pe]));for($=se.fromNumber(d[Pe++]);Pe<=w;Pe++)$=$.multiply(se.fromNumber(10)),$=$.add(se.fromNumber(d[Pe]))}var R=Ak(k,se.fromString("100000000000000000"));R.low=R.low.add($),Lk(R.low,$)&&(R.high=R.high.add(se.fromNumber(1))),ne=C+zp;var D={low:se.fromNumber(0),high:se.fromNumber(0)};R.high.shiftRightUnsigned(49).and(se.fromNumber(1)).equals(se.fromNumber(1))?(D.high=D.high.or(se.fromNumber(3).shiftLeft(61)),D.high=D.high.or(se.fromNumber(ne).and(se.fromNumber(16383).shiftLeft(47))),D.high=D.high.or(R.high.and(se.fromNumber(0x7fffffffffff)))):(D.high=D.high.or(se.fromNumber(ne&16383).shiftLeft(49)),D.high=D.high.or(R.high.and(se.fromNumber(562949953421311)))),D.low=R.low,n&&(D.high=D.high.or(se.fromString("9223372036854775808")));var b=Ve.alloc(16);return z=0,b[z++]=D.low.low&255,b[z++]=D.low.low>>8&255,b[z++]=D.low.low>>16&255,b[z++]=D.low.low>>24&255,b[z++]=D.low.high&255,b[z++]=D.low.high>>8&255,b[z++]=D.low.high>>16&255,b[z++]=D.low.high>>24&255,b[z++]=D.high.low&255,b[z++]=D.high.low>>8&255,b[z++]=D.high.low>>16&255,b[z++]=D.high.low>>24&255,b[z++]=D.high.high&255,b[z++]=D.high.high>>8&255,b[z++]=D.high.high>>16&255,b[z++]=D.high.high>>24&255,new e(b)},e.prototype.toString=function(){for(var t,n=0,r=new Array(36),i=0;i<r.length;i++)r[i]=0;var o=0,s=!1,a,l={parts:[0,0,0,0]},u,d,h=[];o=0;var v=this.bytes,m=v[o++]|v[o++]<<8|v[o++]<<16|v[o++]<<24,w=v[o++]|v[o++]<<8|v[o++]<<16|v[o++]<<24,C=v[o++]|v[o++]<<8|v[o++]<<16|v[o++]<<24,A=v[o++]|v[o++]<<8|v[o++]<<16|v[o++]<<24;o=0;var k={low:new se(m,w),high:new se(C,A)};k.high.lessThan(se.ZERO)&&h.push("-");var $=A>>26&Rk;if($>>3===3){if($===Nk)return h.join("")+"Infinity";if($===Pk)return"NaN";t=A>>15&Wp,a=8+(A>>14&1)}else a=A>>14&7,t=A>>17&Wp;var ne=t-zp;if(l.parts[0]=(A&16383)+((a&15)<<14),l.parts[1]=C,l.parts[2]=w,l.parts[3]=m,l.parts[0]===0&&l.parts[1]===0&&l.parts[2]===0&&l.parts[3]===0)s=!0;else for(d=3;d>=0;d--){var z=0,re=kk(l);if(l=re.quotient,z=re.rem.low,!!z)for(u=8;u>=0;u--)r[d*9+u]=z%10,z=Math.floor(z/10)}if(s)n=1,r[o]=0;else for(n=36;!r[o];)n=n-1,o=o+1;var Re=n-1+ne;if(Re>=34||Re<=-7||ne>0){if(n>34)return h.push("".concat(0)),ne>0?h.push("E+".concat(ne)):ne<0&&h.push("E".concat(ne)),h.join("");h.push("".concat(r[o++])),n=n-1,n&&h.push(".");for(var i=0;i<n;i++)h.push("".concat(r[o++]));h.push("E"),Re>0?h.push("+".concat(Re)):h.push("".concat(Re))}else if(ne>=0)for(var i=0;i<n;i++)h.push("".concat(r[o++]));else{var Ne=n+ne;if(Ne>0)for(var i=0;i<Ne;i++)h.push("".concat(r[o++]));else h.push("0");for(h.push(".");Ne++<0;)h.push("0");for(var i=0;i<n-Math.max(Ne-1,0);i++)h.push("".concat(r[o++]))}return h.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(hd.prototype,"_bsontype",{value:"Decimal128"});var el=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(el.prototype,"_bsontype",{value:"Double"});var tl=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(tl.prototype,"_bsontype",{value:"Int32"});var dd=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(dd.prototype,"_bsontype",{value:"MaxKey"});var fd=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(fd.prototype,"_bsontype",{value:"MinKey"});var Mk=new RegExp("^[0-9a-fA-F]{24}$"),br=null,Cn=Symbol("id"),Ft=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 at("Argument passed in must have an id that is of type string or Buffer");"toHexString"in t&&typeof t.toHexString=="function"?n=Ve.from(t.toHexString(),"hex"):n=t.id}else n=t;if(n==null||typeof n=="number")this[Cn]=e.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)this[Cn]=n instanceof Ve?n:ia(n);else if(typeof n=="string")if(n.length===12){var r=Ve.from(n);if(r.byteLength===12)this[Cn]=r;else throw new at("Argument passed in must be a string of 12 bytes")}else if(n.length===24&&Mk.test(n))this[Cn]=Ve.from(n,"hex");else throw new at("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new at("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[Cn]},set:function(t){this[Cn]=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=Ve.alloc(12);return r.writeUInt32BE(t,0),br===null&&(br=d0(5)),r[4]=br[0],r[5]=br[1],r[6]=br[2],r[7]=br[3],r[8]=br[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[Cn][11]===t[Cn][11]&&this[Cn].equals(t[Cn]);if(typeof t=="string"&&e.isValid(t)&&t.length===12&&ud(this.id))return t===Ve.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 Ve.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=Ve.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 at("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(Ve.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(Ft.prototype,"generate",{value:Xa(function(e){return Ft.generate(e)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(Ft.prototype,"getInc",{value:Xa(function(){return Ft.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Ft.prototype,"get_inc",{value:Xa(function(){return Ft.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Ft,"get_inc",{value:Xa(function(){return Ft.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Ft.prototype,"_bsontype",{value:"ObjectID"});function jk(e){return e.split("").sort().join("")}var xo=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);if(this.pattern=t,this.options=jk(n??""),this.pattern.indexOf("\0")!==-1)throw new Nr("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new Nr("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 Nr("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 at("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(xo.prototype,"_bsontype",{value:"BSONRegExp"});var pd=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(pd.prototype,"_bsontype",{value:"Symbol"});var Fk=se,_0=function(e){Ja(t,e);function t(n,r){var i=this;return i instanceof t?(se.isLong(n)?i=e.call(this,n.low,n.high,!0)||this:$o(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(se.fromInt(n,!0))},t.fromNumber=function(n){return new t(se.fromNumber(n,!0))},t.fromBits=function(n,r){return new t(n,r)},t.fromString=function(n,r){return new t(se.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=se.MAX_UNSIGNED_VALUE,t}(Fk);function Vk(e){return $o(e)&&Reflect.has(e,"_bsontype")&&typeof e._bsontype=="string"}var m0=2147483647,v0=-2147483648,y0=9223372036854776e3,b0=-9223372036854776e3,Bk={$oid:Ft,$binary:Pr,$uuid:Pr,$symbol:pd,$numberInt:tl,$numberDecimal:hd,$numberDouble:el,$numberLong:se,$minKey:fd,$maxKey:dd,$regex:xo,$regularExpression:xo,$timestamp:_0};function w0(e,t){if(t===void 0&&(t={}),typeof e=="number"){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=v0&&e<=m0)return new tl(e);if(e>=b0&&e<=y0)return se.fromNumber(e)}return new el(e)}if(e==null||typeof e!="object")return e;if(e.$undefined)return null;for(var n=Object.keys(e).filter(function(h){return h.startsWith("$")&&e[h]!=null}),r=0;r<n.length;r++){var i=Bk[n[r]];if(i)return i.fromExtendedJSON(e,t)}if(e.$date!=null){var o=e.$date,s=new Date;return t.legacy?typeof o=="number"?s.setTime(o):typeof o=="string"&&s.setTime(Date.parse(o)):typeof o=="string"?s.setTime(Date.parse(o)):se.isLong(o)?s.setTime(o.toNumber()):typeof o=="number"&&t.relaxed&&s.setTime(o),s}if(e.$code!=null){var a=Object.assign({},e);return e.$scope&&(a.$scope=w0(e.$scope)),Qa.fromExtendedJSON(e)}if(xk(e)||e.$dbPointer){var l=e.$ref?e:e.$dbPointer;if(l instanceof Eo)return l;var u=Object.keys(l).filter(function(h){return h.startsWith("$")}),d=!0;if(u.forEach(function(h){["$ref","$id","$db"].indexOf(h)===-1&&(d=!1)}),d)return Eo.fromExtendedJSON(l)}return e}function Uk(e,t){return e.map(function(n,r){t.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return ir(n,t)}finally{t.seenObjects.pop()}})}function Yp(e){var t=e.toISOString();return e.getUTCMilliseconds()!==0?t:t.slice(0,-5)+"Z"}function ir(e,t){if((typeof e=="object"||typeof e=="function")&&e!==null){var n=t.seenObjects.findIndex(function(k){return k.obj===e});if(n!==-1){var r=t.seenObjects.map(function(k){return k.propertyName}),i=r.slice(0,n).map(function(k){return"".concat(k," -> ")}).join(""),o=r[n],s=" -> "+r.slice(n+1,r.length-1).map(function(k){return"".concat(k," -> ")}).join(""),a=r[r.length-1],l=" ".repeat(i.length+o.length/2),u="-".repeat(s.length+(o.length+a.length)/2-1);throw new at(`Converting circular structure to EJSON:
37
37
  `+" ".concat(i).concat(o).concat(s).concat(a,`
38
- `)+" ".concat(l,"\\").concat(u,"/"))}e.seenObjects[e.seenObjects.length-1].obj=t}if(Array.isArray(t))return uP(t,e);if(t===void 0)return null;if(t instanceof Date||HN(t)){var f=t.getTime(),d=f>-1&&f<2534023188e5;return e.legacy?e.relaxed&&d?{$date:t.getTime()}:{$date:Jd(t)}:e.relaxed&&d?{$date:Jd(t)}:{$date:{$numberLong:t.getTime().toString()}}}if(typeof t=="number"&&(!e.relaxed||!isFinite(t))){if(Math.floor(t)===t){var _=t>=ry&&t<=ny,y=t>=oy&&t<=iy;if(_)return{$numberInt:t.toString()};if(y)return{$numberLong:t.toString()}}return{$numberDouble:t.toString()}}if(t instanceof RegExp||UN(t)){var x=t.flags;if(x===void 0){var I=t.toString().match(/[gimuy]*$/);I&&(x=I[0])}var V=new co(t.source,x);return V.toExtendedJSON(e)}return t!=null&&typeof t=="object"?fP(t,e):t}var hP={Binary:function(t){return new Sr(t.value(),t.sub_type)},Code:function(t){return new Aa(t.code,t.scope)},DBRef:function(t){return new lo(t.collection||t.namespace,t.oid,t.db,t.fields)},Decimal128:function(t){return new Th(t.bytes)},Double:function(t){return new La(t.value)},Int32:function(t){return new Ma(t.value)},Long:function(t){return st.fromBits(t.low!=null?t.low:t.low_,t.low!=null?t.high:t.high_,t.low!=null?t.unsigned:t.unsigned_)},MaxKey:function(){return new Oh},MinKey:function(){return new Dh},ObjectID:function(t){return new Ae(t)},ObjectId:function(t){return new Ae(t)},BSONRegExp:function(t){return new co(t.pattern,t.options)},Symbol:function(t){return new Rh(t.value)},Timestamp:function(t){return ey.fromBits(t.low,t.high)}};function fP(t,e){if(t==null||typeof t!="object")throw new xr("not an object instance");var n=t._bsontype;if(typeof n>"u"){var r={};for(var i in t){e.seenObjects.push({propertyName:i,obj:null});try{var o=Qn(t[i],e);i==="__proto__"?Object.defineProperty(r,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):r[i]=o}finally{e.seenObjects.pop()}}return r}else if(lP(t)){var s=t;if(typeof s.toExtendedJSON!="function"){var a=hP[t._bsontype];if(!a)throw new oe("Unrecognized or invalid _bsontype: "+t._bsontype);s=a(s)}return n==="Code"&&s.scope?s=new Aa(s.code,Qn(s.scope,e)):n==="DBRef"&&s.oid&&(s=new lo(Qn(s.collection,e),Qn(s.oid,e),Qn(s.db,e),Qn(s.fields,e))),s.toExtendedJSON(e)}else throw new xr("_bsontype must be a string, but was: "+typeof n)}var Qd;(function(t){function e(o,s){var a=Object.assign({},{relaxed:!0,legacy:!1},s);return typeof a.relaxed=="boolean"&&(a.strict=!a.relaxed),typeof a.strict=="boolean"&&(a.relaxed=!a.strict),JSON.parse(o,function(l,u){if(l.indexOf("\0")!==-1)throw new xr("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(l)));return sy(u,a)})}t.parse=e;function n(o,s,a,l){a!=null&&typeof a=="object"&&(l=a,a=0),s!=null&&typeof s=="object"&&!Array.isArray(s)&&(l=s,s=void 0,a=0);var u=Object.assign({relaxed:!0,legacy:!1},l,{seenObjects:[{propertyName:"(root)",obj:null}]}),f=Qn(o,u);return JSON.stringify(f,s,a)}t.stringify=n;function r(o,s){return s=s||{},JSON.parse(n(o,s))}t.serialize=r;function i(o,s){return s=s||{},e(JSON.stringify(o),s)}t.deserialize=i})(Qd||(Qd={}));var tp,ep=Kv();ep.Map?tp=ep.Map:tp=function(){function t(e){e===void 0&&(e=[]),this._keys=[],this._values={};for(var n=0;n<e.length;n++)if(e[n]!=null){var r=e[n],i=r[0],o=r[1];this._keys.push(i),this._values[i]={v:o,i:this._keys.length-1}}}return t.prototype.clear=function(){this._keys=[],this._values={}},t.prototype.delete=function(e){var n=this._values[e];return n==null?!1:(delete this._values[e],this._keys.splice(n.i,1),!0)},t.prototype.entries=function(){var e=this,n=0;return{next:function(){var r=e._keys[n++];return{value:r!==void 0?[r,e._values[r].v]:void 0,done:r===void 0}}}},t.prototype.forEach=function(e,n){n=n||this;for(var r=0;r<this._keys.length;r++){var i=this._keys[r];e.call(n,this._values[i].v,i,n)}},t.prototype.get=function(e){return this._values[e]?this._values[e].v:void 0},t.prototype.has=function(e){return this._values[e]!=null},t.prototype.keys=function(){var e=this,n=0;return{next:function(){var r=e._keys[n++];return{value:r!==void 0?r:void 0,done:r===void 0}}}},t.prototype.set=function(e,n){return this._values[e]?(this._values[e].v=n,this):(this._keys.push(e),this._values[e]={v:n,i:this._keys.length-1},this)},t.prototype.values=function(){var e=this,n=0;return{next:function(){var r=e._keys[n++];return{value:r!==void 0?e._values[r].v:void 0,done:r===void 0}}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),t}();var rL=st.fromNumber(zN),iL=st.fromNumber(qN),El=new Uint8Array(8),oL=new DataView(El.buffer,El.byteOffset,El.byteLength),dP=1024*1024*17,sL=jt.alloc(dP),pP=class{triggerID;nudgeID;engagementID;contentID;shortID;contentType;variation;props;objective;onsiteDeliveryType;holdout;constructor(t){t=t||{},this.triggerID=t.id||t.triggerID,this.nudgeID=t.nudgeID,this.shortID=t.shortID,this.contentType=t.contentType,this.engagementID=t.engagementID,this.contentID=t.contentID,this.variation=t.variation,this.props=t.props,this.objective=t.objective,this.onsiteDeliveryType=t.onsiteDeliveryType,this.holdout=t.holdout}},xl=class{constructor(t,e={},n,r){this.name=t,this.properties=e,this.id=r?new Ae(r):new Ae,this.occurred=new Date,n&&(this.trigger=new pP(n)),this.newEvent=!r}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale},Hi=class{static SWIPER_CSS="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css";static injectScriptURL(t,e){if(!t)return;let n=document.createElement("script");n.id=e??"",n.src=t,oo.mode==="local"&&(n.type="module"),document.head.appendChild(n)}static injectRawScript(t){if(!t)return;let e=document.createElement("script");e.id="cooee-app-script",e.innerHTML=t,document.head.appendChild(e)}static injectRawCSS(t,e=document.head){if(!t)return;let n=document.createElement("style");n.textContent=t,e.appendChild(n)}static injectSwiperCSS(t=document.head){this.injectStylesheet(this.SWIPER_CSS,t)}static injectStylesheet(t,e=document.head){if(!t)return;let n=document.createElement("link");n.rel="stylesheet",n.href=t,t===this.SWIPER_CSS&&(n.crossOrigin="anonymous",n.onload=r=>{let i=r.currentTarget?.sheet?.cssRules;if(i){for(let o of i)if(o.type==CSSRule.FONT_FACE_RULE){let s=t.split("/"),a=s.slice(0,s.length-1).join("/"),l=o.cssText;l=l.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${a}/$4")`);let u=document.createElement("style");u.appendChild(document.createTextNode(l)),document.head.appendChild(u)}}}),e.appendChild(n)}static loadSwiperScript(){let t="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js";return new Promise(e=>{if(window.Swiper){e();return}if(Array.from(document.scripts).some(r=>r.src.includes(t))){let r=setInterval(()=>{window.Swiper&&(clearInterval(r),e())},50)}let n=document.createElement("script");n.src=t,n.onload=()=>{e()},n.onerror=()=>{n.remove()},document.body.appendChild(n)})}};function gP(t,e){t&1&&(ar(),Bt(0,"path",3))}function mP(t,e){t&1&&(ar(),Bt(0,"path",4))}var ay=class zc{muted;videoEl;toggled=new Xt;toggleMute(e){e.stopPropagation(),e.preventDefault(),this.muted=!this.muted,this.videoEl.muted=this.muted,this.toggled.emit(this.muted),this.muted||this.videoEl.play()}static \u0275fac=function(e){return new(e||zc)};static \u0275cmp=Re({type:zc,selectors:[["cooee-mute-toggle"]],inputs:{muted:"muted",videoEl:"videoEl"},outputs:{toggled:"toggled"},decls:5,vars:1,consts:[["type","button",1,"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(e,n){e&1&&(Q(0,"button",0),ee("click",function(r){return n.toggleMute(r)}),ar(),Q(1,"svg",1),Bt(2,"path",2),se(3,gP,1,0,":svg:path",3)(4,mP,1,0,":svg:path",4),tt()()),e&2&&(Y(3),te(n.muted?3:4))},styles:["button[_ngcontent-%COMP%]{width:40px;height:40px;display:flex;justify-content:center;align-items:center;border:none;cursor:pointer;border-radius:100%}"]})},Sl;function _P(){if(Sl==null){let t=typeof document<"u"?document.head:null;Sl=!!(t&&(t.createShadowRoot||t.attachShadow))}return Sl}function Va(t){if(_P()){let e=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}function Cl(){let t=typeof document<"u"&&document?document.activeElement:null;for(;t&&t.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}function gn(t){return t.composedPath?t.composedPath()[0]:t.target}function ly(t){return t.buttons===0||t.detail===0}function cy(t){let e=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!!e&&e.identifier===-1&&(e.radiusX==null||e.radiusX===1)&&(e.radiusY==null||e.radiusY===1)}function vP(t,e=0){return yP(t)?Number(t):arguments.length===2?e:0}function yP(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function un(t){return t instanceof Le?t.nativeElement:t}function ke(t,e,n,r,i){let o=parseInt(zf.major),s=parseInt(zf.minor);return o>19||o===19&&s>0||o===0&&s===0?t.listen(e,n,r,i):(e.addEventListener(n,r,i),()=>{e.removeEventListener(n,r,i)})}var Yo=new WeakMap,ja=(()=>{class t{_appRef;_injector=P(De);_environmentInjector=P(jn);load(n){let r=this._appRef=this._appRef||this._injector.get(lr),i=Yo.get(r);i||(i={loaders:new Set,refs:[]},Yo.set(r,i),r.onDestroy(()=>{Yo.get(r)?.refs.forEach(o=>o.destroy()),Yo.delete(r)})),i.loaders.has(n)||(i.loaders.add(n),i.refs.push(tv(n,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),qc;try{qc=typeof Intl<"u"&&Intl.v8BreakIterator}catch{qc=!1}var Wn=(()=>{class t{_platformId=P(la);isBrowser=this._platformId?aT(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||qc)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),bP=new St("cdk-dir-doc",{providedIn:"root",factory:wP});function wP(){return P(Jt)}var EP=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function xP(t){let e=t?.toLowerCase()||"";return e==="auto"&&typeof navigator<"u"&&navigator?.language?EP.test(navigator.language)?"rtl":"ltr":e==="rtl"?"rtl":"ltr"}var Us=(()=>{class t{value="ltr";change=new Xt;constructor(){let n=P(bP,{optional:!0});if(n){let r=n.body?n.body.dir:null,i=n.documentElement?n.documentElement.dir:null;this.value=xP(r||i||"ltr")}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),pr;function SP(){if(pr==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return pr=!1,pr;if("scrollBehavior"in document.documentElement.style)pr=!0;else{let t=Element.prototype.scrollTo;t?pr=!/\{\s*\[native code\]\s*\}/.test(t.toString()):pr=!1}}return pr}var CP=20,IP=(()=>{class t{_ngZone=P(Wt);_platform=P(Wn);_renderer=P(bn).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new vt;_scrolledCount=0;scrollContainers=new Map;register(n){this.scrollContainers.has(n)||this.scrollContainers.set(n,n.elementScrolled().subscribe(()=>this._scrolled.next(n)))}deregister(n){let r=this.scrollContainers.get(n);r&&(r.unsubscribe(),this.scrollContainers.delete(n))}scrolled(n=CP){return this._platform.isBrowser?new _e(r=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let i=n>0?this._scrolled.pipe(gg(n)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):fu()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((n,r)=>this.deregister(r)),this._scrolled.complete()}ancestorScrolled(n,r){let i=this.getAncestorScrollContainers(n);return this.scrolled(r).pipe(du(o=>!o||i.indexOf(o)>-1))}getAncestorScrollContainers(n){let r=[];return this.scrollContainers.forEach((i,o)=>{this._scrollableContainsElement(o,n)&&r.push(o)}),r}_scrollableContainsElement(n,r){let i=un(r),o=n.getElementRef().nativeElement;do if(i==o)return!0;while(i=i.parentElement);return!1}static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),TP=20,Nh=(()=>{class t{_platform=P(Wn);_listeners;_viewportSize;_change=new vt;_document=P(Jt,{optional:!0});constructor(){let n=P(Wt),r=P(bn).createRenderer(null,null);n.runOutsideAngular(()=>{if(this._platform.isBrowser){let i=o=>this._change.next(o);this._listeners=[r.listen("window","resize",i),r.listen("window","orientationchange",i)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(n=>n()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let n={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),n}getViewportRect(){let n=this.getViewportScrollPosition(),{width:r,height:i}=this.getViewportSize();return{top:n.top,left:n.left,bottom:n.top+i,right:n.left+r,height:i,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let n=this._document,r=this._getWindow(),i=n.documentElement,o=i.getBoundingClientRect(),s=-o.top||n.body.scrollTop||r.scrollY||i.scrollTop||0,a=-o.left||n.body.scrollLeft||r.scrollX||i.scrollLeft||0;return{top:s,left:a}}change(n=TP){return n>0?this._change.pipe(gg(n)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let n=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:n.innerWidth,height:n.innerHeight}:{width:0,height:0}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Il={},uy=(()=>{class t{_appId=P(Fu);getId(n){return this._appId!=="ng"&&(n+=this._appId),Il.hasOwnProperty(n)||(Il[n]=0),`${n}${Il[n]++}`}static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function hy(t){return Array.isArray(t)?t:[t]}function fy(t){let e=t.cloneNode(!0),n=e.querySelectorAll("[id]"),r=t.nodeName.toLowerCase();e.removeAttribute("id");for(let i=0;i<n.length;i++)n[i].removeAttribute("id");return r==="canvas"?ip(t,e):(r==="input"||r==="select"||r==="textarea")&&rp(t,e),np("canvas",t,e,ip),np("input, textarea, select",t,e,rp),e}function np(t,e,n,r){let i=e.querySelectorAll(t);if(i.length){let o=n.querySelectorAll(t);for(let s=0;s<i.length;s++)r(i[s],o[s])}}var OP=0;function rp(t,e){e.type!=="file"&&(e.value=t.value),e.type==="radio"&&e.name&&(e.name=`mat-clone-${e.name}-${OP++}`)}function ip(t,e){let n=e.getContext("2d");if(n)try{n.drawImage(t,0,0)}catch{}}function Ph(t){let e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y}}function Gc(t,e,n){let{top:r,bottom:i,left:o,right:s}=t;return n>=r&&n<=i&&e>=o&&e<=s}function $i(t,e,n){t.top+=e,t.bottom=t.top+t.height,t.left+=n,t.right=t.left+t.width}function op(t,e,n,r){let{top:i,right:o,bottom:s,left:a,width:l,height:u}=t,f=l*e,d=u*e;return r>i-d&&r<s+d&&n>a-f&&n<o+f}var dy=class{_document;positions=new Map;constructor(t){this._document=t}clear(){this.positions.clear()}cache(t){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),t.forEach(e=>{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:Ph(e)})})}handleScroll(t){let e=gn(t),n=this.positions.get(e);if(!n)return null;let r=n.scrollPosition,i,o;if(e===this._document){let l=this.getViewportScrollPosition();i=l.top,o=l.left}else i=e.scrollTop,o=e.scrollLeft;let s=r.top-i,a=r.left-o;return this.positions.forEach((l,u)=>{l.clientRect&&e!==u&&e.contains(u)&&$i(l.clientRect,s,a)}),r.top=i,r.left=o,{top:s,left:a}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function py(t,e){let n=t.rootNodes;if(n.length===1&&n[0].nodeType===e.ELEMENT_NODE)return n[0];let r=e.createElement("div");return n.forEach(i=>r.appendChild(i)),r}function kh(t,e,n){for(let r in e)if(e.hasOwnProperty(r)){let i=e[r];i?t.setProperty(r,i,n?.has(r)?"important":""):t.removeProperty(r)}return t}function Wr(t,e){let n=e?"":"none";kh(t.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":n,"-ms-user-select":n,"-webkit-user-select":n,"-moz-user-select":n})}function sp(t,e,n){kh(t.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},n)}function Hs(t,e){return e&&e!="none"?t+" "+e:t}function ap(t,e){t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.transform=$s(e.left,e.top)}function $s(t,e){return`translate3d(${Math.round(t)}px, ${Math.round(e)}px, 0)`}function lp(t){let e=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*e}function DP(t){let e=getComputedStyle(t),n=Tl(e,"transition-property"),r=n.find(a=>a==="transform"||a==="all");if(!r)return 0;let i=n.indexOf(r),o=Tl(e,"transition-duration"),s=Tl(e,"transition-delay");return lp(o[i])+lp(s[i])}function Tl(t,e){return t.getPropertyValue(e).split(",").map(n=>n.trim())}var RP=new Set(["position"]),NP=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(t,e,n,r,i,o,s,a,l,u){this._document=t,this._rootElement=e,this._direction=n,this._initialDomRect=r,this._previewTemplate=i,this._previewClass=o,this._pickupPositionOnPage=s,this._initialTransform=a,this._zIndex=l,this._renderer=u}attach(t){this._preview=this._createPreview(),t.appendChild(this._preview),cp(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(t){this._preview.style.transform=t}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(t){this._preview.classList.add(t)}getTransitionDuration(){return DP(this._preview)}addEventListener(t,e){return this._renderer.listen(this._preview,t,e)}_createPreview(){let t=this._previewTemplate,e=this._previewClass,n=t?t.template:null,r;if(n&&t){let i=t.matchSize?this._initialDomRect:null,o=t.viewContainer.createEmbeddedView(n,t.context);o.detectChanges(),r=py(o,this._document),this._previewEmbeddedView=o,t.matchSize?ap(r,i):r.style.transform=$s(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=fy(this._rootElement),ap(r,this._initialDomRect),this._initialTransform&&(r.style.transform=this._initialTransform);return kh(r.style,{"pointer-events":"none",margin:cp(r)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},RP),Wr(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("popover","manual"),r.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(i=>r.classList.add(i)):r.classList.add(e)),r}};function cp(t){return"showPopover"in t}var PP={passive:!0},up={passive:!1},kP={passive:!1,capture:!0},AP=800,hp=new Set(["position"]),LP=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_anchor;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=Ln(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new vt;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=me.EMPTY;_pointerUpSubscription=me.EMPTY;_scrollSubscription=me.EMPTY;_resizeSubscription=me.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(t){t!==this._disabled&&(this._disabled=t,this._toggleNativeDragInteractions(),this._handles.forEach(e=>Wr(e,t)))}_disabled=!1;beforeStarted=new vt;started=new vt;released=new vt;ended=new vt;entered=new vt;exited=new vt;dropped=new vt;moved=this._moveEvents;data;constrainPosition;constructor(t,e,n,r,i,o,s){this._config=e,this._document=n,this._ngZone=r,this._viewportRuler=i,this._dragDropRegistry=o,this._renderer=s,this.withRootElement(t).withParent(e.parentDragRef||null),this._parentPositions=new dy(n),o.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(t){this._handles=t.map(n=>un(n)),this._handles.forEach(n=>Wr(n,this.disabled)),this._toggleNativeDragInteractions();let e=new Set;return this._disabledHandles.forEach(n=>{this._handles.indexOf(n)>-1&&e.add(n)}),this._disabledHandles=e,this}withPreviewTemplate(t){return this._previewTemplate=t,this}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this}withRootElement(t){let e=un(t);return e!==this._rootElement&&(this._removeRootElementListeners(),this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[ke(this._renderer,e,"mousedown",this._pointerDown,up),ke(this._renderer,e,"touchstart",this._pointerDown,PP),ke(this._renderer,e,"dragstart",this._nativeDragStart,up)]),this._initialTransform=void 0,this._rootElement=e),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?un(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(t){return this._parentDragRef=t,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(t){!this._disabledHandles.has(t)&&this._handles.indexOf(t)>-1&&(this._disabledHandles.add(t),Wr(t,!0))}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),Wr(t,this.disabled))}withDirection(t){return this._direction=t,this}_withDropContainer(t){this._dropContainer=t}getFreeDragPosition(){let t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}withPreviewContainer(t){return this._previewContainer=t,this}_sortFromLastPointerPosition(){let t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_pointerDown=t=>{if(this.beforeStarted.next(),this._handles.length){let e=this._getTargetHandle(t);e&&!this._disabledHandles.has(e)&&!this.disabled&&this._initializeDragSequence(e,t)}else this.disabled||this._initializeDragSequence(this._rootElement,t)};_pointerMove=t=>{let e=this._getPointerPositionOnPage(t);if(!this._hasStartedDragging()){let r=Math.abs(e.x-this._pickupPositionOnPage.x),i=Math.abs(e.y-this._pickupPositionOnPage.y);if(r+i>=this._config.dragStartThreshold){let o=Date.now()>=this._dragStartTime+this._getDragStartDelay(t),s=this._dropContainer;if(!o){this._endDragSequence(t);return}(!s||!s.isDragging()&&!s.isReceiving())&&(t.cancelable&&t.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(t)))}return}t.cancelable&&t.preventDefault();let n=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(n),this._dropContainer)this._updateActiveDropContainer(n,e);else{let r=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,i=this._activeTransform;i.x=n.x-r.x+this._passiveTransform.x,i.y=n.y-r.y+this._passiveTransform.y,this._applyRootElementTransform(i.x,i.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:n,event:t,distance:this._getDragDistance(n),delta:this._pointerDirectionDelta})})};_pointerUp=t=>{this._endDragSequence(t)};_endDragSequence(t){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:t}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let e=this._getPointerPositionOnPage(t);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:t})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(t){Ni(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),n=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=ke(this._renderer,e,"selectstart",MP,kP)}),n){let r=this._rootElement,i=r.parentNode,o=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment("");i.insertBefore(s,r),this._initialTransform=r.style.transform||"",this._preview=new NP(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(i,e)),sp(r,!1,hp),this._document.body.appendChild(i.replaceChild(o,r)),this.started.next({source:this,event:t}),n.start(),this._initialContainer=n,this._initialIndex=n.getItemIndex(this)}else this.started.next({source:this,event:t}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(n?n.getScrollableParents():[])}_initializeDragSequence(t,e){this._parentDragRef&&e.stopPropagation();let n=this.isDragging(),r=Ni(e),i=!r&&e.button!==0,o=this._rootElement,s=gn(e),a=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+AP>Date.now(),l=r?cy(e):ly(e);if(s&&s.draggable&&e.type==="mousedown"&&e.preventDefault(),n||i||a||l)return;if(this._handles.length){let d=o.style;this._rootElementTapHighlight=d.webkitTapHighlightColor||"",d.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(d=>this._updateOnScroll(d)),this._boundaryElement&&(this._boundaryRect=Ph(this._boundaryElement));let u=this._previewTemplate;this._pickupPositionInElement=u&&u.template&&!u.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,t,e);let f=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:f.x,y:f.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){sp(this._rootElement,!0,hp),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let e=this._dropContainer,n=e.getItemIndex(this),r=this._getPointerPositionOnPage(t),i=this._getDragDistance(r),o=e._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:i,dropPoint:r,event:t}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:i,dropPoint:r,event:t}),e.drop(this,n,this._initialIndex,this._initialContainer,o,i,r,t),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:n,y:r}){let i=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!i&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(i=this._initialContainer),i&&i!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=i,this._dropContainer.enter(this,t,e,i===this._initialContainer&&i.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:i,currentIndex:i.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,r),this._dropContainer._sortItem(this,t,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(t,e):this._applyPreviewTransform(t-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let t=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(t.left,t.top);let e=this._preview.getTransitionDuration();return e===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(n=>{let r=s=>{(!s||this._preview&&gn(s)===this._preview.element&&s.propertyName==="transform")&&(o(),n(),clearTimeout(i))},i=setTimeout(r,e*1.5),o=this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){let t=this._placeholderTemplate,e=t?t.template:null,n;return e?(this._placeholderRef=t.viewContainer.createEmbeddedView(e,t.context),this._placeholderRef.detectChanges(),n=py(this._placeholderRef,this._document)):n=fy(this._rootElement),n.style.pointerEvents="none",n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(t,e,n){let r=e===this._rootElement?null:e,i=r?r.getBoundingClientRect():t,o=Ni(n)?n.targetTouches[0]:n,s=this._getViewportScrollPosition(),a=o.pageX-i.left-s.left,l=o.pageY-i.top-s.top;return{x:i.left-t.left+a,y:i.top-t.top+l}}_getPointerPositionOnPage(t){let e=this._getViewportScrollPosition(),n=Ni(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,r=n.pageX-e.left,i=n.pageY-e.top;if(this._ownerSVGElement){let o=this._ownerSVGElement.getScreenCTM();if(o){let s=this._ownerSVGElement.createSVGPoint();return s.x=r,s.y=i,s.matrixTransform(o.inverse())}}return{x:r,y:i}}_getConstrainedPointerPosition(t){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:n,y:r}=this.constrainPosition?this.constrainPosition(t,this,this._initialDomRect,this._pickupPositionInElement):t;if(this.lockAxis==="x"||e==="x"?r=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||e==="y")&&(n=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:i,y:o}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,s=this._boundaryRect,{width:a,height:l}=this._getPreviewRect(),u=s.top+o,f=s.bottom-(l-o),d=s.left+i,_=s.right-(a-i);n=fp(n,d,_),r=fp(r,u,f)}return{x:n,y:r}}_updatePointerDirectionDelta(t){let{x:e,y:n}=t,r=this._pointerDirectionDelta,i=this._pointerPositionAtLastDirectionChange,o=Math.abs(e-i.x),s=Math.abs(n-i.y);return o>this._config.pointerDirectionChangeThreshold&&(r.x=e>i.x?1:-1,i.x=e),s>this._config.pointerDirectionChangeThreshold&&(r.y=n>i.y?1:-1,i.y=n),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,Wr(this._rootElement,t))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(t=>t()),this._rootElementCleanups=void 0}_applyRootElementTransform(t,e){let n=1/this.scale,r=$s(t*n,e*n),i=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=i.transform&&i.transform!="none"?i.transform:""),i.transform=Hs(r,this._initialTransform)}_applyPreviewTransform(t,e){let n=this._previewTemplate?.template?void 0:this._initialTransform,r=$s(t,e);this._preview.setTransform(Hs(r,n))}_getDragDistance(t){let e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:t,y:e}=this._passiveTransform;if(t===0&&e===0||this.isDragging()||!this._boundaryElement)return;let n=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(r.width===0&&r.height===0||n.width===0&&n.height===0)return;let i=r.left-n.left,o=n.right-r.right,s=r.top-n.top,a=n.bottom-r.bottom;r.width>n.width?(i>0&&(t+=i),o>0&&(t-=o)):t=0,r.height>n.height?(s>0&&(e+=s),a>0&&(e-=a)):e=0,(t!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:t})}_getDragStartDelay(t){let e=this.dragStartDelay;return typeof e=="number"?e:Ni(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){let e=this._parentPositions.handleScroll(t);if(e){let n=gn(t);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&$i(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=Va(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(t,e){let n=this._previewContainer||"global";if(n==="parent")return t;if(n==="global"){let r=this._document;return e||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return un(n)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=t=>{if(this._handles.length){let e=this._getTargetHandle(t);e&&!this._disabledHandles.has(e)&&!this.disabled&&t.preventDefault()}else this.disabled||t.preventDefault()};_getTargetHandle(t){return this._handles.find(e=>t.target&&(t.target===e||e.contains(t.target)))}};function fp(t,e,n){return Math.max(e,Math.min(n,t))}function Ni(t){return t.type[0]==="t"}function MP(t){t.preventDefault()}function gy(t,e,n){let r=dp(e,t.length-1),i=dp(n,t.length-1);if(r===i)return;let o=t[r],s=i<r?-1:1;for(let a=r;a!==i;a+=s)t[a]=t[a+s];t[i]=o}function dp(t,e){return Math.max(0,Math.min(e,t))}var pp=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(t){this._dragDropRegistry=t}_previousSwap={drag:null,delta:0,overlaps:!1};start(t){this.withItems(t)}sort(t,e,n,r){let i=this._itemPositions,o=this._getItemIndexFromPointerPosition(t,e,n,r);if(o===-1&&i.length>0)return null;let s=this.orientation==="horizontal",a=i.findIndex(I=>I.drag===t),l=i[o],u=i[a].clientRect,f=l.clientRect,d=a>o?1:-1,_=this._getItemOffsetPx(u,f,d),y=this._getSiblingOffsetPx(a,i,d),x=i.slice();return gy(i,a,o),i.forEach((I,V)=>{if(x[V]===I)return;let L=I.drag===t,Z=L?_:y,W=L?t.getPlaceholderElement():I.drag.getRootElement();I.offset+=Z;let B=Math.round(I.offset*(1/I.drag.scale));s?(W.style.transform=Hs(`translate3d(${B}px, 0, 0)`,I.initialTransform),$i(I.clientRect,0,Z)):(W.style.transform=Hs(`translate3d(0, ${B}px, 0)`,I.initialTransform),$i(I.clientRect,Z,0))}),this._previousSwap.overlaps=Gc(f,e,n),this._previousSwap.drag=l.drag,this._previousSwap.delta=s?r.x:r.y,{previousIndex:a,currentIndex:o}}enter(t,e,n,r){let i=r==null||r<0?this._getItemIndexFromPointerPosition(t,e,n):r,o=this._activeDraggables,s=o.indexOf(t),a=t.getPlaceholderElement(),l=o[i];if(l===t&&(l=o[i+1]),!l&&(i==null||i===-1||i<o.length-1)&&this._shouldEnterAsFirstChild(e,n)&&(l=o[0]),s>-1&&o.splice(s,1),l&&!this._dragDropRegistry.isDragging(l)){let u=l.getRootElement();u.parentElement.insertBefore(a,u),o.splice(i,0,t)}else this._element.appendChild(a),o.push(t);a.style.transform="",this._cacheItemPositions()}withItems(t){this._activeDraggables=t.slice(),this._cacheItemPositions()}withSortPredicate(t){this._sortPredicate=t}reset(){this._activeDraggables?.forEach(t=>{let e=t.getRootElement();if(e){let n=this._itemPositions.find(r=>r.drag===t)?.initialTransform;e.style.transform=n||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(t){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(e=>e.drag===t)}updateOnScroll(t,e){this._itemPositions.forEach(({clientRect:n})=>{$i(n,t,e)}),this._itemPositions.forEach(({drag:n})=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}withElementContainer(t){this._element=t}_cacheItemPositions(){let t=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(e=>{let n=e.getVisibleElement();return{drag:e,offset:0,initialTransform:n.style.transform||"",clientRect:Ph(n)}}).sort((e,n)=>t?e.clientRect.left-n.clientRect.left:e.clientRect.top-n.clientRect.top)}_getItemOffsetPx(t,e,n){let r=this.orientation==="horizontal",i=r?e.left-t.left:e.top-t.top;return n===-1&&(i+=r?e.width-t.width:e.height-t.height),i}_getSiblingOffsetPx(t,e,n){let r=this.orientation==="horizontal",i=e[t].clientRect,o=e[t+n*-1],s=i[r?"width":"height"]*n;if(o){let a=r?"left":"top",l=r?"right":"bottom";n===-1?s-=o.clientRect[a]-i[l]:s+=i[a]-o.clientRect[l]}return s}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return!1;let n=this._itemPositions,r=this.orientation==="horizontal";if(n[0].drag!==this._activeDraggables[0]){let i=n[n.length-1].clientRect;return r?t>=i.right:e>=i.bottom}else{let i=n[0].clientRect;return r?t<=i.left:e<=i.top}}_getItemIndexFromPointerPosition(t,e,n,r){let i=this.orientation==="horizontal",o=this._itemPositions.findIndex(({drag:s,clientRect:a})=>{if(s===t)return!1;if(r){let l=i?r.x:r.y;if(s===this._previousSwap.drag&&this._previousSwap.overlaps&&l===this._previousSwap.delta)return!1}return i?e>=Math.floor(a.left)&&e<Math.floor(a.right):n>=Math.floor(a.top)&&n<Math.floor(a.bottom)});return o===-1||!this._sortPredicate(o,t)?-1:o}},VP=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(t,e){this._document=t,this._dragDropRegistry=e}start(t){let e=this._element.childNodes;this._relatedNodes=[];for(let n=0;n<e.length;n++){let r=e[n];this._relatedNodes.push([r,r.nextSibling])}this.withItems(t)}sort(t,e,n,r){let i=this._getItemIndexFromPointerPosition(t,e,n),o=this._previousSwap;if(i===-1||this._activeItems[i]===t)return null;let s=this._activeItems[i];if(o.drag===s&&o.overlaps&&o.deltaX===r.x&&o.deltaY===r.y)return null;let a=this.getItemIndex(t),l=t.getPlaceholderElement(),u=s.getRootElement();i>a?u.after(l):u.before(l),gy(this._activeItems,a,i);let f=this._getRootNode().elementFromPoint(e,n);return o.deltaX=r.x,o.deltaY=r.y,o.drag=s,o.overlaps=u===f||u.contains(f),{previousIndex:a,currentIndex:i}}enter(t,e,n,r){let i=r==null||r<0?this._getItemIndexFromPointerPosition(t,e,n):r;i===-1&&(i=this._getClosestItemIndexToPointer(t,e,n));let o=this._activeItems[i],s=this._activeItems.indexOf(t);s>-1&&this._activeItems.splice(s,1),o&&!this._dragDropRegistry.isDragging(o)?(this._activeItems.splice(i,0,t),o.getRootElement().before(t.getPlaceholderElement())):(this._activeItems.push(t),this._element.appendChild(t.getPlaceholderElement()))}withItems(t){this._activeItems=t.slice()}withSortPredicate(t){this._sortPredicate=t}reset(){let t=this._element,e=this._previousSwap;for(let n=this._relatedNodes.length-1;n>-1;n--){let[r,i]=this._relatedNodes[n];r.parentNode===t&&r.nextSibling!==i&&(i===null?t.appendChild(r):i.parentNode===t&&t.insertBefore(r,i))}this._relatedNodes=[],this._activeItems=[],e.drag=null,e.deltaX=e.deltaY=0,e.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(t){return this._activeItems.indexOf(t)}updateOnScroll(){this._activeItems.forEach(t=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition()})}withElementContainer(t){t!==this._element&&(this._element=t,this._rootNode=void 0)}_getItemIndexFromPointerPosition(t,e,n){let r=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(n)),i=r?this._activeItems.findIndex(o=>{let s=o.getRootElement();return r===s||s.contains(r)}):-1;return i===-1||!this._sortPredicate(i,t)?-1:i}_getRootNode(){return this._rootNode||(this._rootNode=Va(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(t,e,n){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let r=1/0,i=-1;for(let o=0;o<this._activeItems.length;o++){let s=this._activeItems[o];if(s!==t){let{x:a,y:l}=s.getRootElement().getBoundingClientRect(),u=Math.hypot(e-a,n-l);u<r&&(r=u,i=o)}}return i}},gp=.05,my=.05,Xe=function(t){return t[t.NONE=0]="NONE",t[t.UP=1]="UP",t[t.DOWN=2]="DOWN",t}(Xe||{}),Te=function(t){return t[t.NONE=0]="NONE",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t}(Te||{}),jP=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new vt;entered=new vt;exited=new vt;dropped=new vt;sorted=new vt;receivingStarted=new vt;receivingStopped=new vt;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=me.EMPTY;_verticalScrollDirection=Xe.NONE;_horizontalScrollDirection=Te.NONE;_scrollNode;_stopScrollTimers=new vt;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(t,e,n,r,i){this._dragDropRegistry=e,this._ngZone=r,this._viewportRuler=i;let o=this.element=un(t);this._document=n,this.withOrientation("vertical").withElementContainer(o),e.registerDropContainer(this),this._parentPositions=new dy(n)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(t,e,n,r){this._draggingStarted(),r==null&&this.sortingDisabled&&(r=this._draggables.indexOf(t)),this._sortStrategy.enter(t,e,n,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}exit(t){this._reset(),this.exited.next({item:t,container:this})}drop(t,e,n,r,i,o,s,a={}){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:n,container:this,previousContainer:r,isPointerOverContainer:i,distance:o,dropPoint:s,event:a})}withItems(t){let e=this._draggables;return this._draggables=t,t.forEach(n=>n._withDropContainer(this)),this.isDragging()&&(e.filter(n=>n.isDragging()).every(n=>t.indexOf(n)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(t){return this._direction=t,this._sortStrategy instanceof pp&&(this._sortStrategy.direction=t),this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){if(t==="mixed")this._sortStrategy=new VP(this._document,this._dragDropRegistry);else{let e=new pp(this._dragDropRegistry);e.direction=this._direction,e.orientation=t,this._sortStrategy=e}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((e,n)=>this.sortPredicate(e,n,this)),this}withScrollableParents(t){let e=this._container;return this._scrollableElements=t.indexOf(e)===-1?[e,...t]:t.slice(),this}withElementContainer(t){if(t===this._container)return this;let e=un(this.element),n=this._scrollableElements.indexOf(this._container),r=this._scrollableElements.indexOf(t);return n>-1&&this._scrollableElements.splice(n,1),r>-1&&this._scrollableElements.splice(r,1),this._sortStrategy&&this._sortStrategy.withElementContainer(t),this._cachedShadowRoot=null,this._scrollableElements.unshift(t),this._container=t,this}getScrollableParents(){return this._scrollableElements}getItemIndex(t){return this._isDragging?this._sortStrategy.getItemIndex(t):this._draggables.indexOf(t)}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,n,r){if(this.sortingDisabled||!this._domRect||!op(this._domRect,gp,e,n))return;let i=this._sortStrategy.sort(t,e,n,r);i&&this.sorted.next({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:t})}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let n,r=Xe.NONE,i=Te.NONE;if(this._parentPositions.positions.forEach((o,s)=>{s===this._document||!o.clientRect||n||op(o.clientRect,gp,t,e)&&([r,i]=FP(s,o.clientRect,this._direction,t,e),(r||i)&&(n=s))}),!r&&!i){let{width:o,height:s}=this._viewportRuler.getViewportSize(),a={width:o,height:s,top:0,right:o,bottom:s,left:0};r=_y(a,e),i=vy(a,t),n=window}n&&(r!==this._verticalScrollDirection||i!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=i,this._scrollNode=n,(r||i)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let t=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let t=this._container.style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),Wb(0,mb).pipe(si(this._stopScrollTimers)).subscribe(()=>{let t=this._scrollNode,e=this.autoScrollStep;this._verticalScrollDirection===Xe.UP?t.scrollBy(0,-e):this._verticalScrollDirection===Xe.DOWN&&t.scrollBy(0,e),this._horizontalScrollDirection===Te.LEFT?t.scrollBy(-e,0):this._horizontalScrollDirection===Te.RIGHT&&t.scrollBy(e,0)})};_isOverContainer(t,e){return this._domRect!=null&&Gc(this._domRect,t,e)}_getSiblingContainerFromPosition(t,e,n){return this._siblings.find(r=>r._canReceive(t,e,n))}_canReceive(t,e,n){if(!this._domRect||!Gc(this._domRect,e,n)||!this.enterPredicate(t,this))return!1;let r=this._getShadowRoot().elementFromPoint(e,n);return r?r===this._container||this._container.contains(r):!1}_startReceiving(t,e){let n=this._activeSiblings;!n.has(t)&&e.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(n.add(t),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:t,receiver:this,items:e}))}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:t,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(t=>{if(this.isDragging()){let e=this._parentPositions.handleScroll(t);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let t=Va(this._container);this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let t=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,t))}};function _y(t,e){let{top:n,bottom:r,height:i}=t,o=i*my;return e>=n-o&&e<=n+o?Xe.UP:e>=r-o&&e<=r+o?Xe.DOWN:Xe.NONE}function vy(t,e){let{left:n,right:r,width:i}=t,o=i*my;return e>=n-o&&e<=n+o?Te.LEFT:e>=r-o&&e<=r+o?Te.RIGHT:Te.NONE}function FP(t,e,n,r,i){let o=_y(e,i),s=vy(e,r),a=Xe.NONE,l=Te.NONE;if(o){let u=t.scrollTop;o===Xe.UP?u>0&&(a=Xe.UP):t.scrollHeight-u>t.clientHeight&&(a=Xe.DOWN)}if(s){let u=t.scrollLeft;n==="rtl"?s===Te.RIGHT?u<0&&(l=Te.RIGHT):t.scrollWidth+u>t.clientWidth&&(l=Te.LEFT):s===Te.LEFT?u>0&&(l=Te.LEFT):t.scrollWidth-u>t.clientWidth&&(l=Te.RIGHT)}return[a,l]}var Pi={capture:!0},Ol={passive:!1,capture:!0},BP=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Re({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(n,r){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}
39
- `],encapsulation:2,changeDetection:0})}return t})(),yy=(()=>{class t{_ngZone=P(Wt);_document=P(Jt);_styleLoader=P(ja);_renderer=P(bn).createRenderer(null,null);_cleanupDocumentTouchmove;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=Ln([]);_globalListeners;_draggingPredicate=n=>n.isDragging();_domNodesToDirectives=null;pointerMove=new vt;pointerUp=new vt;scroll=new vt;constructor(){}registerDropContainer(n){this._dropInstances.has(n)||this._dropInstances.add(n)}registerDragItem(n){this._dragInstances.add(n),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=ke(this._renderer,this._document,"touchmove",this._persistentTouchmoveListener,Ol)})}removeDropContainer(n){this._dropInstances.delete(n)}removeDragItem(n){this._dragInstances.delete(n),this.stopDragging(n),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(n,r){if(!(this._activeDragInstances().indexOf(n)>-1)&&(this._styleLoader.load(BP),this._activeDragInstances.update(i=>[...i,n]),this._activeDragInstances().length===1)){let i=r.type.startsWith("touch"),o=a=>this.pointerUp.next(a),s=[["scroll",a=>this.scroll.next(a),Pi],["selectstart",this._preventDefaultWhileDragging,Ol]];i?s.push(["touchend",o,Pi],["touchcancel",o,Pi]):s.push(["mouseup",o,Pi]),i||s.push(["mousemove",a=>this.pointerMove.next(a),Ol]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=s.map(([a,l,u])=>ke(this._renderer,this._document,a,l,u))})}}stopDragging(n){this._activeDragInstances.update(r=>{let i=r.indexOf(n);return i>-1?(r.splice(i,1),[...r]):r}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(n){return this._activeDragInstances().indexOf(n)>-1}scrolled(n){let r=[this.scroll];return n&&n!==this._document&&r.push(new _e(i=>this._ngZone.runOutsideAngular(()=>{let o=ke(this._renderer,n,"scroll",s=>{this._activeDragInstances().length&&i.next(s)},Pi);return()=>{o()}}))),Js(...r)}registerDirectiveNode(n,r){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(n,r)}removeDirectiveNode(n){this._domNodesToDirectives?.delete(n)}getDragDirectiveForNode(n){return this._domNodesToDirectives?.get(n)||null}ngOnDestroy(){this._dragInstances.forEach(n=>this.removeDragItem(n)),this._dropInstances.forEach(n=>this.removeDropContainer(n)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=n=>{this._activeDragInstances().length>0&&n.preventDefault()};_persistentTouchmoveListener=n=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&n.preventDefault(),this.pointerMove.next(n))};_clearGlobalListeners(){this._globalListeners?.forEach(n=>n()),this._globalListeners=void 0}static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),UP={dragStartThreshold:5,pointerDirectionChangeThreshold:5},HP=(()=>{class t{_document=P(Jt);_ngZone=P(Wt);_viewportRuler=P(Nh);_dragDropRegistry=P(yy);_renderer=P(bn).createRenderer(null,null);constructor(){}createDrag(n,r=UP){return new LP(n,r,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(n){return new jP(n,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),mp=new St("CDK_DRAG_PARENT"),$P=new St("CdkDragHandle"),zP=new St("CDK_DRAG_CONFIG"),qP=new St("CdkDropList"),GP=(()=>{class t{element=P(Le);dropContainer=P(qP,{optional:!0,skipSelf:!0});_ngZone=P(Wt);_viewContainerRef=P(bi);_dir=P(Us,{optional:!0});_changeDetectorRef=P(So);_selfHandle=P($P,{optional:!0,self:!0});_parentDrag=P(mp,{optional:!0,skipSelf:!0});_dragDropRegistry=P(yy);_destroyed=new vt;_handles=new au([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(n){this._disabled=n,this._dragRef.disabled=this._disabled}_disabled;constrainPosition;previewClass;previewContainer;scale=1;started=new Xt;released=new Xt;ended=new Xt;entered=new Xt;exited=new Xt;dropped=new Xt;moved=new _e(n=>{let r=this._dragRef.moved.pipe(Xs(i=>({source:this,pointerPosition:i.pointerPosition,event:i.event,delta:i.delta,distance:i.distance}))).subscribe(n);return()=>{r.unsubscribe()}});_injector=P(De);constructor(){let n=this.dropContainer,r=P(zP,{optional:!0}),i=P(HP);this._dragRef=i.createDrag(this.element,{dragStartThreshold:r&&r.dragStartThreshold!=null?r.dragStartThreshold:5,pointerDirectionChangeThreshold:r&&r.pointerDirectionChangeThreshold!=null?r.pointerDirectionChangeThreshold:5,zIndex:r?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),r&&this._assignDefaults(r),n&&(this._dragRef._withDropContainer(n._dropListRef),n.addItem(this),n._dropListRef.beforeStarted.pipe(si(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(n){this._dragRef.setFreeDragPosition(n)}ngAfterViewInit(){bo(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(n){let r=n.rootElementSelector,i=n.freeDragPosition;r&&!r.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,i&&!i.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(n){let r=this._handles.getValue();r.push(n),this._handles.next(r)}_removeHandle(n){let r=this._handles.getValue(),i=r.indexOf(n);i>-1&&(r.splice(i,1),this._handles.next(r))}_setPreviewTemplate(n){this._previewTemplate=n}_resetPreviewTemplate(n){n===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(n){this._placeholderTemplate=n}_resetPlaceholderTemplate(n){n===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let n=this.element.nativeElement,r=n;this.rootElementSelector&&(r=n.closest!==void 0?n.closest(this.rootElementSelector):n.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(r||n)}_getBoundaryElement(){let n=this.boundaryElement;return n?typeof n=="string"?this.element.nativeElement.closest(n):un(n):null}_syncInputs(n){n.beforeStarted.subscribe(()=>{if(!n.isDragging()){let r=this._dir,i=this.dragStartDelay,o=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,s=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;n.disabled=this.disabled,n.lockAxis=this.lockAxis,n.scale=this.scale,n.dragStartDelay=typeof i=="object"&&i?i:vP(i),n.constrainPosition=this.constrainPosition,n.previewClass=this.previewClass,n.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(o).withPreviewTemplate(s).withPreviewContainer(this.previewContainer||"global"),r&&n.withDirection(r.value)}}),n.beforeStarted.pipe(Yb(1)).subscribe(()=>{if(this._parentDrag){n.withParent(this._parentDrag._dragRef);return}let r=this.element.nativeElement.parentElement;for(;r;){let i=this._dragDropRegistry.getDragDirectiveForNode(r);if(i){n.withParent(i._dragRef);break}r=r.parentElement}})}_handleEvents(n){n.started.subscribe(r=>{this.started.emit({source:this,event:r.event}),this._changeDetectorRef.markForCheck()}),n.released.subscribe(r=>{this.released.emit({source:this,event:r.event})}),n.ended.subscribe(r=>{this.ended.emit({source:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event}),this._changeDetectorRef.markForCheck()}),n.entered.subscribe(r=>{this.entered.emit({container:r.container.data,item:this,currentIndex:r.currentIndex})}),n.exited.subscribe(r=>{this.exited.emit({container:r.container.data,item:this})}),n.dropped.subscribe(r=>{this.dropped.emit({previousIndex:r.previousIndex,currentIndex:r.currentIndex,previousContainer:r.previousContainer.data,container:r.container.data,isPointerOverContainer:r.isPointerOverContainer,item:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event})})}_assignDefaults(n){let{lockAxis:r,dragStartDelay:i,constrainPosition:o,previewClass:s,boundaryElement:a,draggingDisabled:l,rootElementSelector:u,previewContainer:f}=n;this.disabled=l??!1,this.dragStartDelay=i||0,r&&(this.lockAxis=r),o&&(this.constrainPosition=o),s&&(this.previewClass=s),a&&(this.boundaryElement=a),u&&(this.rootElementSelector=u),f&&(this.previewContainer=f)}_setupHandlesListener(){this._handles.pipe(Qb(n=>{let r=n.map(i=>i.element);this._selfHandle&&this.rootElementSelector&&r.push(this.element),this._dragRef.withHandles(r)}),_g(n=>Js(...n.map(r=>r._stateChanges.pipe(mg(r))))),si(this._destroyed)).subscribe(n=>{let r=this._dragRef,i=n.element.nativeElement;n.disabled?r.disableHandle(i):r.enableHandle(i)})}static \u0275fac=function(n){return new(n||t)};static \u0275dir=va({type:t,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(n,r){n&2&&wa("cdk-drag-disabled",r.disabled)("cdk-drag-dragging",r._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",AI],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",LI]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[fI([{provide:mp,useExisting:t}]),$g]})}return t})(),WP=t=>({"lc:cursor-grab":t}),ZP=(t,e)=>e.url;function YP(t,e){if(t&1&&Bt(0,"source",11),t&2){let n=e.$implicit;xi("type",n.mimeType),Pt("src",n.url,rn)}}var KP=class Wc{constructor(e){this.elementRef=e}video;closeClicked=new Xt;videoClicked=new Xt;isDragging=!1;ngOnInit(){let e=this.elementRef.nativeElement.parentElement.parentElement;e.style.zIndex="2147483647"}close(){this.closeClicked.emit()}onVideoClick(){if(this.isDragging){this.isDragging=!1;return}this.videoClicked.emit()}static \u0275fac=function(e){return new(e||Wc)(Ee(Le))};static \u0275cmp=Re({type:Wc,selectors:[["cooee-draggable-video-popup"]],inputs:{video:"video"},outputs:{closeClicked:"closeClicked",videoClicked:"videoClicked"},decls:14,vars:5,consts:[["role","button","tabindex","0","cdkDrag","",1,"lc-popup-inner","lc:shadow-2xl","lc:rounded-lg","lc:flex","lc:justify-center","lc:items-center",3,"click","keyup","cdkDragMoved","ngClass","cdkDragBoundary"],[1,"lc-close-button","lc:absolute","lc:-top-3.5","lc:-right-3.5","lc:bg-black/50","lc:rounded-full","lc:w-8","lc:h-8","lc:border-none","lc:z-10","lc:flex","lc:justify-center","lc:items-center",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","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-play-button"],[1,"lc-icon"],["viewBox","0 0 28.31 30"],["d","M19.15,1.29A1.24,1.24,0,0,0,17.82.15a1.36,1.36,0,0,0-.35.07,3.2,3.2,0,0,0-.65.46l-5.06,4.6a1.24,1.24,0,0,0,0,1.75l0,0a1.22,1.22,0,0,0,.89.39,1.25,1.25,0,0,0,.85-.32l3-2.78.17-.13v8l2.44,2.62ZM26.79,26.6l-7.64-7.93-2.5-2.58-6-6.34L8.9,8,5.23,4.15a1.17,1.17,0,0,0-1.66,0h0a1.18,1.18,0,0,0,0,1.66h0L6.1,8.47H3.32a2.94,2.94,0,0,0-2.45,3v7.16a3,3,0,0,0,2.86,3.08H8.07a.44.44,0,0,1,.33.13C9.7,23,11,24.19,12.26,25.36L17,29.7a1.24,1.24,0,0,0,2.17-1V22.21l5.95,6.15a1.2,1.2,0,0,0,1.67,0,1.17,1.17,0,0,0,.08-1.66Zm-10.14-.67-.18-.11L9.75,19.67a1.72,1.72,0,0,0-1.16-.45H4c-.48,0-.59-.11-.59-.61V11.55c0-.49,0-.6.59-.6H8.29l8.29,8.55ZM29.09,15.07A9.9,9.9,0,0,1,26.33,22l-.11.13a1.24,1.24,0,0,1-2-.28,1.29,1.29,0,0,1,.24-1.52h0a6.77,6.77,0,0,0,1.32-1.89,7.41,7.41,0,0,0-1.37-8.55,1.24,1.24,0,0,1-.08-1.75,1.33,1.33,0,0,1,.41-.29,1.19,1.19,0,0,1,1.34.2A8.88,8.88,0,0,1,28,10.36a10,10,0,0,1,1.17,4.17A3.35,3.35,0,0,1,29.09,15.07Z","transform","translate(-0.86 -0.14)","fill","#191919"],[1,"lc-text"],["loop","","preload","auto","playsinline","","autoplay","",1,"lc:rounded-lg","lc:w-full",3,"muted"],[3,"src","type"]],template:function(e,n){e&1&&(Q(0,"div",0),ee("click",function(){return n.onVideoClick()})("keyup",function(){return n.onVideoClick()})("cdkDragMoved",function(){return n.isDragging=!0}),Q(1,"button",1),ee("click",function(r){return r.stopPropagation(),n.close()}),ar(),Q(2,"svg",2),Bt(3,"path",3)(4,"path",4),tt()(),ws(),Q(5,"div",5)(6,"div",6),ar(),Q(7,"svg",7),Bt(8,"path",8),tt()(),ws(),Q(9,"div",9),ne(10,"Tap to unmute"),tt()(),Q(11,"video",10),$e(12,YP,1,2,"source",11,ZP),tt()()),e&2&&(Pt("ngClass",W_(3,WP,n.isDragging))("cdkDragBoundary","body"),Y(11),Pt("muted",!0),Y(),ze(n.video.sources))},dependencies:[xa,GP],styles:["[_nghost-%COMP%]{position:fixed;display:block;right:24px;bottom:24px;max-width:150px}.lc-play-button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(1);transition:all .1s ease-in-out;z-index:999;flex-wrap:wrap;width:100%;max-width:130px;border-radius:5px;padding:5px 10px;background-color:#97979761;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.lc-play-button[_ngcontent-%COMP%] .lc-icon[_ngcontent-%COMP%]{width:14px;height:14px}.lc-play-button[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#fff}.lc-play-button[_ngcontent-%COMP%] .lc-text[_ngcontent-%COMP%]{font-size:11px;line-height:1;color:#fff;font-weight:400;margin-left:5px;text-align:center}"]})},Ah=class{_attachedHost;attach(t){return this._attachedHost=t,t.attach(this)}detach(){let t=this._attachedHost;t!=null&&(this._attachedHost=null,t.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(t){this._attachedHost=t}},Zc=class extends Ah{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(t,e,n,r,i){super(),this.component=t,this.viewContainerRef=e,this.injector=n,this.projectableNodes=i}},by=class extends Ah{templateRef;viewContainerRef;context;injector;constructor(t,e,n,r){super(),this.templateRef=t,this.viewContainerRef=e,this.context=n,this.injector=r}get origin(){return this.templateRef.elementRef}attach(t,e=this.context){return this.context=e,super.attach(t)}detach(){return this.context=void 0,super.detach()}},XP=class extends Ah{element;constructor(t){super(),this.element=t instanceof Le?t.nativeElement:t}},Lh=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(t){if(t instanceof Zc)return this._attachedPortal=t,this.attachComponentPortal(t);if(t instanceof by)return this._attachedPortal=t,this.attachTemplatePortal(t);if(this.attachDomPortal&&t instanceof XP)return this._attachedPortal=t,this.attachDomPortal(t)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(t){this._disposeFn=t}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},JP=class extends Lh{outletElement;_appRef;_defaultInjector;_document;constructor(t,e,n,r,i){super(),this.outletElement=t,this._appRef=n,this._defaultInjector=r,this._document=i}attachComponentPortal(t){let e;if(t.viewContainerRef){let n=t.injector||t.viewContainerRef.injector,r=n.get(ro,null,{optional:!0})||void 0;e=t.viewContainerRef.createComponent(t.component,{index:t.viewContainerRef.length,injector:n,ngModuleRef:r,projectableNodes:t.projectableNodes||void 0}),this.setDisposeFn(()=>e.destroy())}else{let n=this._appRef,r=t.injector||this._defaultInjector||De.NULL,i=r.get(jn,n.injector);e=tv(t.component,{elementInjector:r,environmentInjector:i,projectableNodes:t.projectableNodes||void 0}),n.attachView(e.hostView),this.setDisposeFn(()=>{n.viewCount>0&&n.detachView(e.hostView),e.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(e)),this._attachedPortal=t,e}attachTemplatePortal(t){let e=t.viewContainerRef,n=e.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return n.rootNodes.forEach(r=>this.outletElement.appendChild(r)),n.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(n);r!==-1&&e.remove(r)}),this._attachedPortal=t,n}attachDomPortal=t=>{let e=t.element;e.parentNode;let n=this._document.createComment("dom-portal");e.parentNode.insertBefore(n,e),this.outletElement.appendChild(e),this._attachedPortal=t,super.setDisposeFn(()=>{n.parentNode&&n.parentNode.replaceChild(e,n)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(t){return t.hostView.rootNodes[0]}},_p=(()=>{class t extends Lh{_moduleRef=P(ro,{optional:!0});_document=P(Jt);_viewContainerRef=P(bi);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(n){this.hasAttached()&&!n&&!this._isInitialized||(this.hasAttached()&&super.detach(),n&&super.attach(n),this._attachedPortal=n||null)}attached=new Xt;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(n){n.setAttachedHost(this);let r=n.viewContainerRef!=null?n.viewContainerRef:this._viewContainerRef,i=r.createComponent(n.component,{index:r.length,injector:n.injector||r.injector,projectableNodes:n.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return r!==this._viewContainerRef&&this._getRootNode().appendChild(i.hostView.rootNodes[0]),super.setDisposeFn(()=>i.destroy()),this._attachedPortal=n,this._attachedRef=i,this.attached.emit(i),i}attachTemplatePortal(n){n.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=n,this._attachedRef=r,this.attached.emit(r),r}attachDomPortal=n=>{let r=n.element;r.parentNode;let i=this._document.createComment("dom-portal");n.setAttachedHost(this),r.parentNode.insertBefore(i,r),this._getRootNode().appendChild(r),this._attachedPortal=n,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(r,i)})};_getRootNode(){let n=this._viewContainerRef.element.nativeElement;return n.nodeType===n.ELEMENT_NODE?n:n.parentNode}static \u0275fac=function(n){return new(n||t)};static \u0275dir=va({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[wi]})}return t})(),ki;function QP(){if(ki==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>ki=!0}))}finally{ki=ki||!1}return ki}function tk(t){return QP()?t:!!t.capture}var ek=new St("cdk-input-modality-detector-options"),nk={ignoreKeys:[18,17,224,91,16]},wy=650,Dl={passive:!0,capture:!0},rk=(()=>{class t{_platform=P(Wn);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new au(null);_options;_lastTouchMs=0;_onKeydown=n=>{this._options?.ignoreKeys?.some(r=>r===n.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=gn(n))};_onMousedown=n=>{Date.now()-this._lastTouchMs<wy||(this._modality.next(ly(n)?"keyboard":"mouse"),this._mostRecentTarget=gn(n))};_onTouchstart=n=>{if(cy(n)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=gn(n)};constructor(){let n=P(Wt),r=P(Jt),i=P(ek,{optional:!0});if(this._options=j(j({},nk),i),this.modalityDetected=this._modality.pipe(Jb(1)),this.modalityChanged=this.modalityDetected.pipe(Kb()),this._platform.isBrowser){let o=P(bn).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[ke(o,r,"keydown",this._onKeydown,Dl),ke(o,r,"mousedown",this._onMousedown,Dl),ke(o,r,"touchstart",this._onTouchstart,Dl)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(n=>n())}static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ls=function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t}(ls||{}),ik=new St("cdk-focus-monitor-default-options"),Ko=tk({passive:!0,capture:!0}),ok=(()=>{class t{_ngZone=P(Wt);_platform=P(Wn);_inputModalityDetector=P(rk);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=P(Jt,{optional:!0});_stopInputModalityDetector=new vt;constructor(){let n=P(ik,{optional:!0});this._detectionMode=n?.detectionMode||ls.IMMEDIATE}_rootNodeFocusAndBlurListener=n=>{let r=gn(n);for(let i=r;i;i=i.parentElement)n.type==="focus"?this._onFocus(n,i):this._onBlur(n,i)};monitor(n,r=!1){let i=un(n);if(!this._platform.isBrowser||i.nodeType!==1)return fu();let o=Va(i)||this._getDocument(),s=this._elementInfo.get(i);if(s)return r&&(s.checkChildren=!0),s.subject;let a={checkChildren:r,subject:new vt,rootNode:o};return this._elementInfo.set(i,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(n){let r=un(n),i=this._elementInfo.get(r);i&&(i.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(i))}focusVia(n,r,i){let o=un(n),s=this._getDocument().activeElement;o===s?this._getClosestElementsInfo(o).forEach(([a,l])=>this._originChanged(a,r,l)):(this._setOrigin(r),typeof o.focus=="function"&&o.focus(i))}ngOnDestroy(){this._elementInfo.forEach((n,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(n){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(n)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:n&&this._isLastInteractionFromInputLabel(n)?"mouse":"program"}_shouldBeAttributedToTouch(n){return this._detectionMode===ls.EVENTUAL||!!n?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(n,r){n.classList.toggle("cdk-focused",!!r),n.classList.toggle("cdk-touch-focused",r==="touch"),n.classList.toggle("cdk-keyboard-focused",r==="keyboard"),n.classList.toggle("cdk-mouse-focused",r==="mouse"),n.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(n,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=n,this._originFromTouchInteraction=n==="touch"&&r,this._detectionMode===ls.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?wy:1;this._originTimeoutId=setTimeout(()=>this._origin=null,i)}})}_onFocus(n,r){let i=this._elementInfo.get(r),o=gn(n);!i||!i.checkChildren&&r!==o||this._originChanged(r,this._getFocusOrigin(o),i)}_onBlur(n,r){let i=this._elementInfo.get(r);!i||i.checkChildren&&n.relatedTarget instanceof Node&&r.contains(n.relatedTarget)||(this._setClasses(r),this._emitOrigin(i,null))}_emitOrigin(n,r){n.subject.observers.length&&this._ngZone.run(()=>n.subject.next(r))}_registerGlobalListeners(n){if(!this._platform.isBrowser)return;let r=n.rootNode,i=this._rootNodeFocusListenerCount.get(r)||0;i||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,Ko),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,Ko)}),this._rootNodeFocusListenerCount.set(r,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(si(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(n){let r=n.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let i=this._rootNodeFocusListenerCount.get(r);i>1?this._rootNodeFocusListenerCount.set(r,i-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Ko),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Ko),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(n,r,i){this._setClasses(n,r),this._emitOrigin(i,r),this._lastFocusOrigin=r}_getClosestElementsInfo(n){let r=[];return this._elementInfo.forEach((i,o)=>{(o===n||i.checkChildren&&o.contains(n))&&r.push([o,i])}),r}_isLastInteractionFromInputLabel(n){let{_mostRecentTarget:r,mostRecentModality:i}=this._inputModalityDetector;if(i!=="mouse"||!r||r===n||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA"||n.disabled)return!1;let o=n.labels;if(o){for(let s=0;s<o.length;s++)if(o[s].contains(r))return!0}return!1}static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),sk=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Re({type:t,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(n,r){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}
40
- `],encapsulation:2,changeDetection:0})}return t})(),Ey=(()=>{class t{_platform=P(Wn);constructor(){}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return lk(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=ak(mk(n));if(r&&(vp(r)===-1||!this.isVisible(r)))return!1;let i=n.nodeName.toLowerCase(),o=vp(n);return n.hasAttribute("contenteditable")?o!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!pk(n)?!1:i==="audio"?n.hasAttribute("controls")?o!==-1:!1:i==="video"?o===-1?!1:o!==null?!0:this._platform.FIREFOX||n.hasAttribute("controls"):n.tabIndex>=0}isFocusable(n,r){return gk(n)&&!this.isDisabled(n)&&(r?.ignoreVisibility||this.isVisible(n))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function ak(t){try{return t.frameElement}catch{return null}}function lk(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function ck(t){let e=t.nodeName.toLowerCase();return e==="input"||e==="select"||e==="button"||e==="textarea"}function uk(t){return fk(t)&&t.type=="hidden"}function hk(t){return dk(t)&&t.hasAttribute("href")}function fk(t){return t.nodeName.toLowerCase()=="input"}function dk(t){return t.nodeName.toLowerCase()=="a"}function xy(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let e=t.getAttribute("tabindex");return!!(e&&!isNaN(parseInt(e,10)))}function vp(t){if(!xy(t))return null;let e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}function pk(t){let e=t.nodeName.toLowerCase(),n=e==="input"&&t.type;return n==="text"||n==="password"||e==="select"||e==="textarea"}function gk(t){return uk(t)?!1:ck(t)||hk(t)||t.hasAttribute("contenteditable")||xy(t)}function mk(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var _k=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}_enabled=!0;constructor(t,e,n,r,i=!1,o){this._element=t,this._checker=e,this._ngZone=n,this._document=r,this._injector=o,i||this.attachAnchors()}destroy(){let t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(t)))})}focusFirstTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(t)))})}focusLastTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(t)))})}_getRegionBoundary(t){let e=this._element.querySelectorAll(`[cdk-focus-region-${t}], [cdkFocusRegion${t}], [cdk-focus-${t}]`);return t=="start"?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(t){let e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){let n=this._getFirstTabbableElement(e);return n?.focus(t),!!n}return e.focus(t),!0}return this.focusFirstTabbableElement(t)}focusFirstTabbableElement(t){let e=this._getRegionBoundary("start");return e&&e.focus(t),!!e}focusLastTabbableElement(t){let e=this._getRegionBoundary("end");return e&&e.focus(t),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children;for(let n=0;n<e.length;n++){let r=e[n].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[n]):null;if(r)return r}return null}_getLastTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children;for(let n=e.length-1;n>=0;n--){let r=e[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[n]):null;if(r)return r}return null}_createAnchor(){let t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}_toggleAnchorTabIndex(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}_executeOnStable(t){this._injector?bo(t,{injector:this._injector}):setTimeout(t)}},vk=(()=>{class t{_checker=P(Ey);_ngZone=P(Wt);_document=P(Jt);_injector=P(De);constructor(){P(ja).load(sk)}create(n,r=!1){return new _k(n,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function yp(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function de(t){return t==null?"":typeof t=="string"?t:`${t}px`}function yk(t,...e){return e.length?e.some(n=>t[n]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var bp=SP(),bk=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(t,e){this._viewportRuler=t,this._document=e}attach(){}enable(){if(this._canBeEnabled()){let t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=de(-this._previousScrollPosition.left),t.style.top=de(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let t=this._document.documentElement,e=this._document.body,n=t.style,r=e.style,i=n.scrollBehavior||"",o=r.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),bp&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),bp&&(n.scrollBehavior=i,r.scrollBehavior=o)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let t=this._document.documentElement,e=this._viewportRuler.getViewportSize();return t.scrollHeight>e.height||t.scrollWidth>e.width}},wk=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(t,e,n,r){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=n,this._config=r}attach(t){this._overlayRef,this._overlayRef=t}enable(){if(this._scrollSubscription)return;let t=this._scrollDispatcher.scrolled(0).pipe(du(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(()=>{let e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}},Sy=class{enable(){}disable(){}attach(){}};function Yc(t,e){return e.some(n=>{let r=t.bottom<n.top,i=t.top>n.bottom,o=t.right<n.left,s=t.left>n.right;return r||i||o||s})}function wp(t,e){return e.some(n=>{let r=t.top<n.top,i=t.bottom>n.bottom,o=t.left<n.left,s=t.right>n.right;return r||i||o||s})}var Ek=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(t,e,n,r){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=n,this._config=r}attach(t){this._overlayRef,this._overlayRef=t}enable(){if(!this._scrollSubscription){let t=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(t).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:n,height:r}=this._viewportRuler.getViewportSize();Yc(e,[{width:n,height:r,bottom:r,right:n,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},xk=(()=>{class t{_scrollDispatcher=P(IP);_viewportRuler=P(Nh);_ngZone=P(Wt);_document=P(Jt);constructor(){}noop=()=>new Sy;close=n=>new wk(this._scrollDispatcher,this._ngZone,this._viewportRuler,n);block=()=>new bk(this._viewportRuler,this._document);reposition=n=>new Ek(this._scrollDispatcher,this._viewportRuler,this._ngZone,n);static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Cy=class{positionStrategy;scrollStrategy=new Sy;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(t){if(t){let e=Object.keys(t);for(let n of e)t[n]!==void 0&&(this[n]=t[n])}}},Sk=class{connectionPair;scrollableViewProperties;constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}},Iy=(()=>{class t{_attachedOverlays=[];_document=P(Jt);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(n){this.remove(n),this._attachedOverlays.push(n)}remove(n){let r=this._attachedOverlays.indexOf(n);r>-1&&this._attachedOverlays.splice(r,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ck=(()=>{class t extends Iy{_ngZone=P(Wt);_renderer=P(bn).createRenderer(null,null);_cleanupKeydown;add(n){super.add(n),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=n=>{let r=this._attachedOverlays;for(let i=r.length-1;i>-1;i--)if(r[i]._keydownEvents.observers.length>0){this._ngZone.run(()=>r[i]._keydownEvents.next(n));break}};static \u0275fac=(()=>{let n;return function(r){return(n||(n=ym(t)))(r||t)}})();static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ik=(()=>{class t extends Iy{_platform=P(Wn);_ngZone=P(Wt);_renderer=P(bn).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(n){if(super.add(n),!this._isAttached){let r=this._document.body,i={capture:!0};this._cleanups=this._ngZone.runOutsideAngular(()=>[ke(this._renderer,r,"pointerdown",this._pointerDownListener,i),ke(this._renderer,r,"click",this._clickListener,i),ke(this._renderer,r,"auxclick",this._clickListener,i),ke(this._renderer,r,"contextmenu",this._clickListener,i)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(n=>n()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=n=>{this._pointerDownEventTarget=gn(n)};_clickListener=n=>{let r=gn(n),i=n.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:r;this._pointerDownEventTarget=null;let o=this._attachedOverlays.slice();for(let s=o.length-1;s>-1;s--){let a=o[s];if(a._outsidePointerEvents.observers.length<1||!a.hasAttached())continue;if(Ep(a.overlayElement,r)||Ep(a.overlayElement,i))break;let l=a._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>l.next(n)):l.next(n)}};static \u0275fac=(()=>{let n;return function(r){return(n||(n=ym(t)))(r||t)}})();static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Ep(t,e){let n=typeof ShadowRoot<"u"&&ShadowRoot,r=e;for(;r;){if(r===t)return!0;r=n&&r instanceof ShadowRoot?r.host:r.parentNode}return!1}var Ty=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Re({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(n,r){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}
41
- `],encapsulation:2,changeDetection:0})}return t})(),Mh=(()=>{class t{_platform=P(Wn);_containerElement;_document=P(Jt);_styleLoader=P(ja);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let n="cdk-overlay-container";if(this._platform.isBrowser||yp()){let i=this._document.querySelectorAll(`.${n}[platform="server"], .${n}[platform="test"]`);for(let o=0;o<i.length;o++)i[o].remove()}let r=this._document.createElement("div");r.classList.add(n),yp()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(Ty)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Tk=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(t,e,n,r){this._renderer=e,this._ngZone=n,this.element=t.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=e.listen(this.element,"click",r)}detach(){this._ngZone.runOutsideAngular(()=>{let t=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(t,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),t.style.pointerEvents="none",t.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}},Vh=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new vt;_attachments=new vt;_detachments=new vt;_positionStrategy;_scrollStrategy;_locationChanges=me.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new vt;_outsidePointerEvents=new vt;_renders=new vt;_afterRenderRef;_afterNextRenderRef;constructor(t,e,n,r,i,o,s,a,l,u=!1,f,d){this._portalOutlet=t,this._host=e,this._pane=n,this._config=r,this._ngZone=i,this._keyboardDispatcher=o,this._document=s,this._location=a,this._outsideClickDispatcher=l,this._animationsDisabled=u,this._injector=f,this._renderer=d,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy,this._afterRenderRef=MI(()=>Bm(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(t){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let e=this._portalOutlet.attach(t);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=bo(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof e?.onDestroy=="function"&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),t}dispose(){let t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,t&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}updateSize(t){this._config=j(j({},this._config),t),this._updateElementSize()}setDirection(t){this._config=Zt(j({},this._config),{direction:t}),this._updateElementDirection()}addPanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!0)}removePanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!1)}getDirection(){let t=this._config.direction;return t?typeof t=="string"?t:t.value:"ltr"}updateScrollStrategy(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let t=this._pane.style;t.width=de(this._config.width),t.height=de(this._config.height),t.minWidth=de(this._config.minWidth),t.minHeight=de(this._config.minHeight),t.maxWidth=de(this._config.maxWidth),t.maxHeight=de(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"":"none"}_attachBackdrop(){let t="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Tk(this._document,this._renderer,this._ngZone,e=>{this._backdropClick.next(e)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(t))}):this._backdropRef.element.classList.add(t)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(t,e,n){let r=hy(e||[]).filter(i=>!!i);r.length&&(n?t.classList.add(...r):t.classList.remove(...r))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let t=this._renders.pipe(si(Js(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),t.unsubscribe())})})}_disposeScrollStrategy(){let t=this._scrollStrategy;t?.disable(),t?.detach?.()}},xp="cdk-overlay-connected-position-bounding-box",Ok=/([A-Za-z%]+)$/,Dk=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed;_boundingBox;_lastPosition;_lastScrollVisibility;_positionChanges=new vt;_resizeSubscription=me.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(t,e,n,r,i){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=i,this.setOrigin(t)}attach(t){this._overlayRef&&this._overlayRef,this._validatePositions(),t.hostElement.classList.add(xp),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let t=this._originRect,e=this._overlayRect,n=this._viewportRect,r=this._containerRect,i=[],o;for(let s of this._preferredPositions){let a=this._getOriginPoint(t,r,s),l=this._getOverlayPoint(a,e,s),u=this._getOverlayFit(l,e,n,s);if(u.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(s,a);return}if(this._canFitWithFlexibleDimensions(u,l,n)){i.push({position:s,origin:a,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(a,s)});continue}(!o||o.overlayFit.visibleArea<u.visibleArea)&&(o={overlayFit:u,overlayPoint:l,originPoint:a,position:s,overlayRect:e})}if(i.length){let s=null,a=-1;for(let l of i){let u=l.boundingBoxRect.width*l.boundingBoxRect.height*(l.position.weight||1);u>a&&(a=u,s=l)}this._isPushed=!1,this._applyPosition(s.position,s.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(o.position,o.originPoint);return}this._applyPosition(o.position,o.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&gr(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(xp),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let t=this._lastPosition;if(t){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._getOriginPoint(this._originRect,this._containerRect,t);this._applyPosition(t,e)}else this.apply()}withScrollableContainers(t){return this._scrollables=t,this}withPositions(t){return this._preferredPositions=t,t.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(t){return this._viewportMargin=t,this}withFlexibleDimensions(t=!0){return this._hasFlexibleDimensions=t,this}withGrowAfterOpen(t=!0){return this._growAfterOpen=t,this}withPush(t=!0){return this._canPush=t,this}withLockedPosition(t=!0){return this._positionLocked=t,this}setOrigin(t){return this._origin=t,this}withDefaultOffsetX(t){return this._offsetX=t,this}withDefaultOffsetY(t){return this._offsetY=t,this}withTransformOriginOn(t){return this._transformOriginSelector=t,this}_getOriginPoint(t,e,n){let r;if(n.originX=="center")r=t.left+t.width/2;else{let o=this._isRtl()?t.right:t.left,s=this._isRtl()?t.left:t.right;r=n.originX=="start"?o:s}e.left<0&&(r-=e.left);let i;return n.originY=="center"?i=t.top+t.height/2:i=n.originY=="top"?t.top:t.bottom,e.top<0&&(i-=e.top),{x:r,y:i}}_getOverlayPoint(t,e,n){let r;n.overlayX=="center"?r=-e.width/2:n.overlayX==="start"?r=this._isRtl()?-e.width:0:r=this._isRtl()?0:-e.width;let i;return n.overlayY=="center"?i=-e.height/2:i=n.overlayY=="top"?0:-e.height,{x:t.x+r,y:t.y+i}}_getOverlayFit(t,e,n,r){let i=Cp(e),{x:o,y:s}=t,a=this._getOffset(r,"x"),l=this._getOffset(r,"y");a&&(o+=a),l&&(s+=l);let u=0-o,f=o+i.width-n.width,d=0-s,_=s+i.height-n.height,y=this._subtractOverflows(i.width,u,f),x=this._subtractOverflows(i.height,d,_),I=y*x;return{visibleArea:I,isCompletelyWithinViewport:i.width*i.height===I,fitsInViewportVertically:x===i.height,fitsInViewportHorizontally:y==i.width}}_canFitWithFlexibleDimensions(t,e,n){if(this._hasFlexibleDimensions){let r=n.bottom-e.y,i=n.right-e.x,o=Sp(this._overlayRef.getConfig().minHeight),s=Sp(this._overlayRef.getConfig().minWidth),a=t.fitsInViewportVertically||o!=null&&o<=r,l=t.fitsInViewportHorizontally||s!=null&&s<=i;return a&&l}return!1}_pushOverlayOnScreen(t,e,n){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};let r=Cp(e),i=this._viewportRect,o=Math.max(t.x+r.width-i.width,0),s=Math.max(t.y+r.height-i.height,0),a=Math.max(i.top-n.top-t.y,0),l=Math.max(i.left-n.left-t.x,0),u=0,f=0;return r.width<=i.width?u=l||-o:u=t.x<this._viewportMargin?i.left-n.left-t.x:0,r.height<=i.height?f=a||-s:f=t.y<this._viewportMargin?i.top-n.top-t.y:0,this._previousPushAmount={x:u,y:f},{x:t.x+u,y:t.y+f}}_applyPosition(t,e){if(this._setTransformOrigin(t),this._setOverlayElementStyles(e,t),this._setBoundingBoxStyles(e,t),t.panelClass&&this._addPanelClasses(t.panelClass),this._positionChanges.observers.length){let n=this._getScrollVisibility();if(t!==this._lastPosition||!this._lastScrollVisibility||!Rk(this._lastScrollVisibility,n)){let r=new Sk(t,n);this._positionChanges.next(r)}this._lastScrollVisibility=n}this._lastPosition=t,this._isInitialRender=!1}_setTransformOrigin(t){if(!this._transformOriginSelector)return;let e=this._boundingBox.querySelectorAll(this._transformOriginSelector),n,r=t.overlayY;t.overlayX==="center"?n="center":this._isRtl()?n=t.overlayX==="start"?"right":"left":n=t.overlayX==="start"?"left":"right";for(let i=0;i<e.length;i++)e[i].style.transformOrigin=`${n} ${r}`}_calculateBoundingBoxRect(t,e){let n=this._viewportRect,r=this._isRtl(),i,o,s;if(e.overlayY==="top")o=t.y,i=n.height-o+this._viewportMargin;else if(e.overlayY==="bottom")s=n.height-t.y+this._viewportMargin*2,i=n.height-s+this._viewportMargin;else{let _=Math.min(n.bottom-t.y+n.top,t.y),y=this._lastBoundingBoxSize.height;i=_*2,o=t.y-_,i>y&&!this._isInitialRender&&!this._growAfterOpen&&(o=t.y-y/2)}let a=e.overlayX==="start"&&!r||e.overlayX==="end"&&r,l=e.overlayX==="end"&&!r||e.overlayX==="start"&&r,u,f,d;if(l)d=n.width-t.x+this._viewportMargin*2,u=t.x-this._viewportMargin;else if(a)f=t.x,u=n.right-t.x;else{let _=Math.min(n.right-t.x+n.left,t.x),y=this._lastBoundingBoxSize.width;u=_*2,f=t.x-_,u>y&&!this._isInitialRender&&!this._growAfterOpen&&(f=t.x-y/2)}return{top:o,left:f,bottom:s,right:d,width:u,height:i}}_setBoundingBoxStyles(t,e){let n=this._calculateBoundingBoxRect(t,e);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));let r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{let i=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;r.height=de(n.height),r.top=de(n.top),r.bottom=de(n.bottom),r.width=de(n.width),r.left=de(n.left),r.right=de(n.right),e.overlayX==="center"?r.alignItems="center":r.alignItems=e.overlayX==="end"?"flex-end":"flex-start",e.overlayY==="center"?r.justifyContent="center":r.justifyContent=e.overlayY==="bottom"?"flex-end":"flex-start",i&&(r.maxHeight=de(i)),o&&(r.maxWidth=de(o))}this._lastBoundingBoxSize=n,gr(this._boundingBox.style,r)}_resetBoundingBoxStyles(){gr(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){gr(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){let n={},r=this._hasExactPosition(),i=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(r){let u=this._viewportRuler.getViewportScrollPosition();gr(n,this._getExactOverlayY(e,t,u)),gr(n,this._getExactOverlayX(e,t,u))}else n.position="static";let s="",a=this._getOffset(e,"x"),l=this._getOffset(e,"y");a&&(s+=`translateX(${a}px) `),l&&(s+=`translateY(${l}px)`),n.transform=s.trim(),o.maxHeight&&(r?n.maxHeight=de(o.maxHeight):i&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=de(o.maxWidth):i&&(n.maxWidth="")),gr(this._pane.style,n)}_getExactOverlayY(t,e,n){let r={top:"",bottom:""},i=this._getOverlayPoint(e,this._overlayRect,t);if(this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n)),t.overlayY==="bottom"){let o=this._document.documentElement.clientHeight;r.bottom=`${o-(i.y+this._overlayRect.height)}px`}else r.top=de(i.y);return r}_getExactOverlayX(t,e,n){let r={left:"",right:""},i=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n));let o;if(this._isRtl()?o=t.overlayX==="end"?"left":"right":o=t.overlayX==="end"?"right":"left",o==="right"){let s=this._document.documentElement.clientWidth;r.right=`${s-(i.x+this._overlayRect.width)}px`}else r.left=de(i.x);return r}_getScrollVisibility(){let t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:wp(t,n),isOriginOutsideView:Yc(t,n),isOverlayClipped:wp(e,n),isOverlayOutsideView:Yc(e,n)}}_subtractOverflows(t,...e){return e.reduce((n,r)=>n-Math.max(r,0),t)}_getNarrowedViewportRect(){let t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+t-this._viewportMargin,bottom:n.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(t,e){return e==="x"?t.offsetX==null?this._offsetX:t.offsetX:t.offsetY==null?this._offsetY:t.offsetY}_validatePositions(){}_addPanelClasses(t){this._pane&&hy(t).forEach(e=>{e!==""&&this._appliedPanelClasses.indexOf(e)===-1&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(t=>{this._pane.classList.remove(t)}),this._appliedPanelClasses=[])}_getOriginRect(){let t=this._origin;if(t instanceof Le)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();let e=t.width||0,n=t.height||0;return{top:t.y,bottom:t.y+n,left:t.x,right:t.x+e,height:n,width:e}}};function gr(t,e){for(let n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Sp(t){if(typeof t!="number"&&t!=null){let[e,n]=t.split(Ok);return!n||n==="px"?parseFloat(e):null}return t||null}function Cp(t){return{top:Math.floor(t.top),right:Math.floor(t.right),bottom:Math.floor(t.bottom),left:Math.floor(t.left),width:Math.floor(t.width),height:Math.floor(t.height)}}function Rk(t,e){return t===e?!0:t.isOriginClipped===e.isOriginClipped&&t.isOriginOutsideView===e.isOriginOutsideView&&t.isOverlayClipped===e.isOverlayClipped&&t.isOverlayOutsideView===e.isOverlayOutsideView}var Ip="cdk-global-overlay-wrapper",Nk=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(t){let e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add(Ip),this._isDisposed=!1}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._xOffset=t,this._xPosition="left",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._xOffset=t,this._xPosition="right",this}start(t=""){return this._xOffset=t,this._xPosition="start",this}end(t=""){return this._xOffset=t,this._xPosition="end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._xPosition="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:r,height:i,maxWidth:o,maxHeight:s}=n,a=(r==="100%"||r==="100vw")&&(!o||o==="100%"||o==="100vw"),l=(i==="100%"||i==="100vh")&&(!s||s==="100%"||s==="100vh"),u=this._xPosition,f=this._xOffset,d=this._overlayRef.getConfig().direction==="rtl",_="",y="",x="";a?x="flex-start":u==="center"?(x="center",d?y=f:_=f):d?u==="left"||u==="end"?(x="flex-end",_=f):(u==="right"||u==="start")&&(x="flex-start",y=f):u==="left"||u==="start"?(x="flex-start",_=f):(u==="right"||u==="end")&&(x="flex-end",y=f),t.position=this._cssPosition,t.marginLeft=a?"0":_,t.marginTop=l?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=a?"0":y,e.justifyContent=x,e.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,n=e.style;e.classList.remove(Ip),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}},Pk=(()=>{class t{_viewportRuler=P(Nh);_document=P(Jt);_platform=P(Wn);_overlayContainer=P(Mh);constructor(){}global(){return new Nk}flexibleConnectedTo(n){return new Dk(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Oy=(()=>{class t{scrollStrategies=P(xk);_overlayContainer=P(Mh);_positionBuilder=P(Pk);_keyboardDispatcher=P(Ck);_injector=P(De);_ngZone=P(Wt);_document=P(Jt);_directionality=P(Us);_location=P(iv);_outsideClickDispatcher=P(Ik);_animationsModuleType=P(iE,{optional:!0});_idGenerator=P(uy);_renderer=P(bn).createRenderer(null,null);_appRef;_styleLoader=P(ja);constructor(){}create(n){this._styleLoader.load(Ty);let r=this._createHostElement(),i=this._createPaneElement(r),o=this._createPortalOutlet(i),s=new Cy(n);return s.direction=s.direction||this._directionality.value,new Vh(o,r,i,s,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(jn),this._renderer)}position(){return this._positionBuilder}_createPaneElement(n){let r=this._document.createElement("div");return r.id=this._idGenerator.getId("cdk-overlay-"),r.classList.add("cdk-overlay-pane"),n.appendChild(r),r}_createHostElement(){let n=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalOutlet(n){return this._appRef||(this._appRef=this._injector.get(lr)),new JP(n,null,this._appRef,this._injector,this._document)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function kk(t,e){}var zs=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;componentFactoryResolver;providers;container;templateContext},Ak=(()=>{class t extends Lh{_elementRef=P(Le);_focusTrapFactory=P(vk);_config;_interactivityChecker=P(Ey);_ngZone=P(Wt);_overlayRef=P(Vh);_focusMonitor=P(ok);_renderer=P(x_);_platform=P(Wn);_document=P(Jt,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=P(So);_injector=P(De);_isDestroyed=!1;constructor(){super(),this._config=P(zs,{optional:!0})||new zs,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(n){this._ariaLabelledByQueue.push(n),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(n){let r=this._ariaLabelledByQueue.indexOf(n);r>-1&&(this._ariaLabelledByQueue.splice(r,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachComponentPortal(n);return this._contentAttached(),r}attachTemplatePortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachTemplatePortal(n);return this._contentAttached(),r}attachDomPortal=n=>{this._portalOutlet.hasAttached();let r=this._portalOutlet.attachDomPortal(n);return this._contentAttached(),r};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(n,r){this._interactivityChecker.isFocusable(n)||(n.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let i=()=>{o(),s(),n.removeAttribute("tabindex")},o=this._renderer.listen(n,"blur",i),s=this._renderer.listen(n,"mousedown",i)})),n.focus(r)}_focusByCssSelector(n,r){let i=this._elementRef.nativeElement.querySelector(n);i&&this._forceFocus(i,r)}_trapFocus(n){this._isDestroyed||bo(()=>{let r=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||r.focus(n);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(n)||this._focusDialogContainer(n);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',n);break;default:this._focusByCssSelector(this._config.autoFocus,n);break}},{injector:this._injector})}_restoreFocus(){let n=this._config.restoreFocus,r=null;if(typeof n=="string"?r=this._document.querySelector(n):typeof n=="boolean"?r=n?this._elementFocusedBeforeDialogWasOpened:null:n&&(r=n),this._config.restoreFocus&&r&&typeof r.focus=="function"){let i=Cl(),o=this._elementRef.nativeElement;(!i||i===this._document.body||i===o||o.contains(i))&&(this._focusMonitor?(this._focusMonitor.focusVia(r,this._closeInteractionType),this._closeInteractionType=null):r.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(n){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus(n)}_containsFocus(){let n=this._elementRef.nativeElement,r=Cl();return n===r||n.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Cl()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Re({type:t,selectors:[["cdk-dialog-container"]],viewQuery:function(n,r){if(n&1&&ks(_p,7),n&2){let i;As(i=Ls())&&(r._portalOutlet=i.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(n,r){n&2&&ya("id",r._config.id||null)("role",r._config.role)("aria-modal",r._config.ariaModal)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null)},features:[wi],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(n,r){n&1&&se(0,kk,0,0,"ng-template",0)},dependencies:[_p],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
42
- `],encapsulation:2})}return t})(),cs=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new vt;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(t,e){this.overlayRef=t,this.config=e,this.disableClose=e.disableClose,this.backdropClick=t.backdropClick(),this.keydownEvents=t.keydownEvents(),this.outsidePointerEvents=t.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(n=>{n.keyCode===27&&!this.disableClose&&!yk(n)&&(n.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=t.detachments().subscribe(()=>{e.closeOnOverlayDetachments!==!1&&this.close()})}close(t,e){if(this.containerInstance){let n=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),n.next(t),n.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(t="",e=""){return this.overlayRef.updateSize({width:t,height:e}),this}addPanelClass(t){return this.overlayRef.addPanelClass(t),this}removePanelClass(t){return this.overlayRef.removePanelClass(t),this}},Lk=new St("DialogScrollStrategy",{providedIn:"root",factory:()=>{let t=P(Oy);return()=>t.scrollStrategies.block()}}),Dy=new St("DialogData"),Mk=new St("DefaultDialogConfig"),Vk=(()=>{class t{_overlay=P(Oy);_injector=P(De);_defaultOptions=P(Mk,{optional:!0});_parentDialog=P(t,{optional:!0,skipSelf:!0});_overlayContainer=P(Mh);_idGenerator=P(uy);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new vt;_afterOpenedAtThisLevel=new vt;_ariaHiddenElements=new Map;_scrollStrategy=P(Lk);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=Bb(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(mg(void 0)));constructor(){}open(n,r){let i=this._defaultOptions||new zs;r=j(j({},i),r),r.id=r.id||this._idGenerator.getId("cdk-dialog-"),r.id&&this.getDialogById(r.id);let o=this._getOverlayConfig(r),s=this._overlay.create(o),a=new cs(s,r),l=this._attachContainer(s,a,r);return a.containerInstance=l,this._attachDialogContent(n,a,l,r),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){Rl(this.openDialogs,n=>n.close())}getDialogById(n){return this.openDialogs.find(r=>r.id===n)}ngOnDestroy(){Rl(this._openDialogsAtThisLevel,n=>{n.config.closeOnDestroy===!1&&this._removeOpenDialog(n,!1)}),Rl(this._openDialogsAtThisLevel,n=>n.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(n){let r=new Cy({positionStrategy:n.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:n.scrollStrategy||this._scrollStrategy(),panelClass:n.panelClass,hasBackdrop:n.hasBackdrop,direction:n.direction,minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight,width:n.width,height:n.height,disposeOnNavigation:n.closeOnNavigation});return n.backdropClass&&(r.backdropClass=n.backdropClass),r}_attachContainer(n,r,i){let o=i.injector||i.viewContainerRef?.injector,s=[{provide:zs,useValue:i},{provide:cs,useValue:r},{provide:Vh,useValue:n}],a;i.container?typeof i.container=="function"?a=i.container:(a=i.container.type,s.push(...i.container.providers(i))):a=Ak;let l=new Zc(a,i.viewContainerRef,De.create({parent:o||this._injector,providers:s}));return n.attach(l).instance}_attachDialogContent(n,r,i,o){if(n instanceof eo){let s=this._createInjector(o,r,i,void 0),a={$implicit:o.data,dialogRef:r};o.templateContext&&(a=j(j({},a),typeof o.templateContext=="function"?o.templateContext():o.templateContext)),i.attachTemplatePortal(new by(n,null,a,s))}else{let s=this._createInjector(o,r,i,this._injector),a=i.attachComponentPortal(new Zc(n,o.viewContainerRef,s));r.componentRef=a,r.componentInstance=a.instance}}_createInjector(n,r,i,o){let s=n.injector||n.viewContainerRef?.injector,a=[{provide:Dy,useValue:n.data},{provide:cs,useValue:r}];return n.providers&&(typeof n.providers=="function"?a.push(...n.providers(r,n,i)):a.push(...n.providers)),n.direction&&(!s||!s.get(Us,null,{optional:!0}))&&a.push({provide:Us,useValue:{value:n.direction,change:fu()}}),De.create({parent:s||o,providers:a})}_removeOpenDialog(n,r){let i=this.openDialogs.indexOf(n);i>-1&&(this.openDialogs.splice(i,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((o,s)=>{o?s.setAttribute("aria-hidden",o):s.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),r&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let n=this._overlayContainer.getContainerElement();if(n.parentElement){let r=n.parentElement.children;for(let i=r.length-1;i>-1;i--){let o=r[i];o!==n&&o.nodeName!=="SCRIPT"&&o.nodeName!=="STYLE"&&!o.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let n=this._parentDialog;return n?n._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(n){return new(n||t)};static \u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Rl(t,e){let n=t.length;for(;n--;)e(t[n])}var jk=Sg;function Fk(t){return!!t[jk]}var Bk=Symbol("__destroy"),Ry=Symbol("__decoratorApplied");function Ny(t){return typeof t=="string"?Symbol(`__destroy__${t}`):Bk}function Uk(t){t.prototype[Ry]=!0}function Py(t,e){t[e]||(t[e]=new vt)}function ky(t,e){t[e]&&(t[e].next(),t[e].complete(),t[e]=null)}function Ay(t){t instanceof me&&t.unsubscribe()}function Hk(t){Array.isArray(t)&&t.forEach(Ay)}function Ly(t,e){return function(){if(t&&t.call(this),ky(this,Ny()),e.arrayName&&Hk(this[e.arrayName]),e.checkProperties)for(let n in this)e.blackList?.includes(n)||Ay(this[n])}}function $k(t,e){t.prototype.ngOnDestroy=Ly(t.prototype.ngOnDestroy,e)}function zk(t,e){let n=t.\u0275pipe;n.onDestroy=Ly(n.onDestroy,e)}function qk(t={}){return e=>{Fk(e)?zk(e,t):$k(e,t),Uk(e)}}var Tp=7,Op=Symbol("CheckerHasBeenSet");function Gk(t,e){t[Op]||Wk()||(Dp(()=>Ks(Promise.resolve()).pipe(qi(()=>{let n;try{n=K1(t)}catch{n=null}let r=n?.lView;if(r==null)return uu;let i=r[Tp]||(r[Tp]=[]),o=new vt;return i.push(function(){Dp(()=>{o.next(),o.complete()})}),o}),qi(()=>Promise.resolve())).subscribe(()=>{(e.observed??e.observers.length>0)&&console.warn(Zk(t))})),t[Op]=!0)}function Wk(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"}function Dp(t){let e=Gi.Zone;return e&&typeof e.root?.run=="function"?e.root.run(t):t()}function Zk(t){return`
43
- The ${t.constructor.name} still has subscriptions that haven't been unsubscribed.
38
+ `)+" ".concat(l,"\\").concat(u,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return Uk(e,t);if(e===void 0)return null;if(e instanceof Date||yk(e)){var d=e.getTime(),h=d>-1&&d<2534023188e5;return t.legacy?t.relaxed&&h?{$date:e.getTime()}:{$date:Yp(e)}:t.relaxed&&h?{$date:Yp(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(typeof e=="number"&&(!t.relaxed||!isFinite(e))){if(Math.floor(e)===e){var v=e>=v0&&e<=m0,m=e>=b0&&e<=y0;if(v)return{$numberInt:e.toString()};if(m)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||vk(e)){var w=e.flags;if(w===void 0){var C=e.toString().match(/[gimuy]*$/);C&&(w=C[0])}var A=new xo(e.source,w);return A.toExtendedJSON(t)}return e!=null&&typeof e=="object"?$k(e,t):e}var Hk={Binary:function(e){return new Pr(e.value(),e.sub_type)},Code:function(e){return new Qa(e.code,e.scope)},DBRef:function(e){return new Eo(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new hd(e.bytes)},Double:function(e){return new el(e.value)},Int32:function(e){return new tl(e.value)},Long:function(e){return se.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 dd},MinKey:function(){return new fd},ObjectID:function(e){return new Ft(e)},ObjectId:function(e){return new Ft(e)},BSONRegExp:function(e){return new xo(e.pattern,e.options)},Symbol:function(e){return new pd(e.value)},Timestamp:function(e){return _0.fromBits(e.low,e.high)}};function $k(e,t){if(e==null||typeof e!="object")throw new Nr("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 o=ir(e[i],t);i==="__proto__"?Object.defineProperty(r,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):r[i]=o}finally{t.seenObjects.pop()}}return r}else if(Vk(e)){var s=e;if(typeof s.toExtendedJSON!="function"){var a=Hk[e._bsontype];if(!a)throw new at("Unrecognized or invalid _bsontype: "+e._bsontype);s=a(s)}return n==="Code"&&s.scope?s=new Qa(s.code,ir(s.scope,t)):n==="DBRef"&&s.oid&&(s=new Eo(ir(s.collection,t),ir(s.oid,t),ir(s.db,t),ir(s.fields,t))),s.toExtendedJSON(t)}else throw new Nr("_bsontype must be a string, but was: "+typeof n)}var Kp;(function(e){function t(o,s){var a=Object.assign({},{relaxed:!0,legacy:!1},s);return typeof a.relaxed=="boolean"&&(a.strict=!a.relaxed),typeof a.strict=="boolean"&&(a.relaxed=!a.strict),JSON.parse(o,function(l,u){if(l.indexOf("\0")!==-1)throw new Nr("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(l)));return w0(u,a)})}e.parse=t;function n(o,s,a,l){a!=null&&typeof a=="object"&&(l=a,a=0),s!=null&&typeof s=="object"&&!Array.isArray(s)&&(l=s,s=void 0,a=0);var u=Object.assign({relaxed:!0,legacy:!1},l,{seenObjects:[{propertyName:"(root)",obj:null}]}),d=ir(o,u);return JSON.stringify(d,s,a)}e.stringify=n;function r(o,s){return s=s||{},JSON.parse(n(o,s))}e.serialize=r;function i(o,s){return s=s||{},t(JSON.stringify(o),s)}e.deserialize=i})(Kp||(Kp={}));var Jp,Xp=h0();Xp.Map?Jp=Xp.Map:Jp=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],o=r[1];this._keys.push(i),this._values[i]={v:o,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 DM=se.fromNumber(wk),RM=se.fromNumber(Ek),zl=new Uint8Array(8),NM=new DataView(zl.buffer,zl.byteOffset,zl.byteLength),zk=1024*1024*17,PM=Ve.alloc(zk),qk=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}},ql=class{constructor(e,t={},n,r){this.name=e,this.properties=t,this.id=r?new Ft(r):new Ft,this.occurred=new Date,n&&(this.trigger=new qk(n)),this.newEvent=!r}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale},to=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,yo.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 o of i)if(o.type==CSSRule.FONT_FACE_RULE){let s=e.split("/"),a=s.slice(0,s.length-1).join("/"),l=o.cssText;l=l.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${a}/$4")`);let u=document.createElement("style");u.appendChild(document.createTextNode(l)),document.head.appendChild(u)}}}),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)})}};function Gk(e,t){e&1&&(fr(),He(0,"path",3))}function Wk(e,t){e&1&&(fr(),He(0,"path",4))}var E0=class yu{muted;videoEl;toggled=new Qe;toggleMute(t){t.stopPropagation(),t.preventDefault(),this.muted=!this.muted,this.videoEl.muted=this.muted,this.toggled.emit(this.muted),this.muted||this.videoEl.play()}static \u0275fac=function(t){return new(t||yu)};static \u0275cmp=At({type:yu,selectors:[["cooee-mute-toggle"]],inputs:{muted:"muted",videoEl:"videoEl"},outputs:{toggled:"toggled"},decls:5,vars:1,consts:[["type","button",1,"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&&(X(0,"button",0),nt("click",function(r){return n.toggleMute(r)}),fr(),X(1,"svg",1),He(2,"path",2),lt(3,Gk,1,0,":svg:path",3)(4,Wk,1,0,":svg:path",4),Q()()),t&2&&(Z(3),st(n.muted?3:4))},styles:["button[_ngcontent-%COMP%]{width:40px;height:40px;display:flex;justify-content:center;align-items:center;border:none;cursor:pointer;border-radius:100%}"]})},Gl;function Zk(){if(Gl==null){let e=typeof document<"u"?document.head:null;Gl=!!(e&&(e.createShadowRoot||e.attachShadow))}return Gl}function nl(e){if(Zk()){let t=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function Wl(){let e=typeof document<"u"&&document?document.activeElement:null;for(;e&&e.shadowRoot;){let t=e.shadowRoot.activeElement;if(t===e)break;e=t}return e}function mn(e){return e.composedPath?e.composedPath()[0]:e.target}function x0(e){return e.buttons===0||e.detail===0}function S0(e){let t=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0];return!!t&&t.identifier===-1&&(t.radiusX==null||t.radiusX===1)&&(t.radiusY==null||t.radiusY===1)}function Yk(e,t=0){return Kk(e)?Number(e):arguments.length===2?t:0}function Kk(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function dn(e){return e instanceof Vt?e.nativeElement:e}function jt(e,t,n,r,i){let o=parseInt(Of.major),s=parseInt(Of.minor);return o>19||o===19&&s>0||o===0&&s===0?e.listen(t,n,r,i):(t.addEventListener(n,r,i),()=>{t.removeEventListener(n,r,i)})}var cs=new WeakMap,rl=(()=>{class e{_appRef;_injector=P(kt);_environmentInjector=P($n);load(n){let r=this._appRef=this._appRef||this._injector.get(pr),i=cs.get(r);i||(i={loaders:new Set,refs:[]},cs.set(r,i),r.onDestroy(()=>{cs.get(r)?.refs.forEach(o=>o.destroy()),cs.delete(r)})),i.loaders.has(n)||(i.loaders.add(n),i.refs.push(Kv(n,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),bu;try{bu=typeof Intl<"u"&&Intl.v8BreakIterator}catch{bu=!1}var Xn=(()=>{class e{_platformId=P(Ia);isBrowser=this._platformId?wO(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||bu)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Jk=new Ce("cdk-dir-doc",{providedIn:"root",factory:Xk});function Xk(){return P(et)}var Qk=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function eA(e){let t=e?.toLowerCase()||"";return t==="auto"&&typeof navigator<"u"&&navigator?.language?Qk.test(navigator.language)?"rtl":"ltr":t==="rtl"?"rtl":"ltr"}var oa=(()=>{class e{value="ltr";change=new Qe;constructor(){let n=P(Jk,{optional:!0});if(n){let r=n.body?n.body.dir:null,i=n.documentElement?n.documentElement.dir:null;this.value=eA(r||i||"ltr")}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),wr;function tA(){if(wr==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return wr=!1,wr;if("scrollBehavior"in document.documentElement.style)wr=!0;else{let e=Element.prototype.scrollTo;e?wr=!/\{\s*\[native code\]\s*\}/.test(e.toString()):wr=!1}}return wr}var nA=20,rA=(()=>{class e{_ngZone=P(Ze);_platform=P(Xn);_renderer=P(xn).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new ye;_scrolledCount=0;scrollContainers=new Map;register(n){this.scrollContainers.has(n)||this.scrollContainers.set(n,n.elementScrolled().subscribe(()=>this._scrolled.next(n)))}deregister(n){let r=this.scrollContainers.get(n);r&&(r.unsubscribe(),this.scrollContainers.delete(n))}scrolled(n=nA){return this._platform.isBrowser?new bt(r=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let i=n>0?this._scrolled.pipe(h_(n)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):Uu()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((n,r)=>this.deregister(r)),this._scrolled.complete()}ancestorScrolled(n,r){let i=this.getAncestorScrollContainers(n);return this.scrolled(r).pipe(Hu(o=>!o||i.indexOf(o)>-1))}getAncestorScrollContainers(n){let r=[];return this.scrollContainers.forEach((i,o)=>{this._scrollableContainsElement(o,n)&&r.push(o)}),r}_scrollableContainsElement(n,r){let i=dn(r),o=n.getElementRef().nativeElement;do if(i==o)return!0;while(i=i.parentElement);return!1}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),iA=20,gd=(()=>{class e{_platform=P(Xn);_listeners;_viewportSize;_change=new ye;_document=P(et,{optional:!0});constructor(){let n=P(Ze),r=P(xn).createRenderer(null,null);n.runOutsideAngular(()=>{if(this._platform.isBrowser){let i=o=>this._change.next(o);this._listeners=[r.listen("window","resize",i),r.listen("window","orientationchange",i)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(n=>n()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let n={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),n}getViewportRect(){let n=this.getViewportScrollPosition(),{width:r,height:i}=this.getViewportSize();return{top:n.top,left:n.left,bottom:n.top+i,right:n.left+r,height:i,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let n=this._document,r=this._getWindow(),i=n.documentElement,o=i.getBoundingClientRect(),s=-o.top||n.body.scrollTop||r.scrollY||i.scrollTop||0,a=-o.left||n.body.scrollLeft||r.scrollX||i.scrollLeft||0;return{top:s,left:a}}change(n=iA){return n>0?this._change.pipe(h_(n)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let n=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:n.innerWidth,height:n.innerHeight}:{width:0,height:0}}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Zl={},C0=(()=>{class e{_appId=P(ph);getId(n){return this._appId!=="ng"&&(n+=this._appId),Zl.hasOwnProperty(n)||(Zl[n]=0),`${n}${Zl[n]++}`}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function I0(e){return Array.isArray(e)?e:[e]}function T0(e){let t=e.cloneNode(!0),n=t.querySelectorAll("[id]"),r=e.nodeName.toLowerCase();t.removeAttribute("id");for(let i=0;i<n.length;i++)n[i].removeAttribute("id");return r==="canvas"?tg(e,t):(r==="input"||r==="select"||r==="textarea")&&eg(e,t),Qp("canvas",e,t,tg),Qp("input, textarea, select",e,t,eg),t}function Qp(e,t,n,r){let i=t.querySelectorAll(e);if(i.length){let o=n.querySelectorAll(e);for(let s=0;s<i.length;s++)r(i[s],o[s])}}var oA=0;function eg(e,t){t.type!=="file"&&(t.value=e.value),t.type==="radio"&&t.name&&(t.name=`mat-clone-${t.name}-${oA++}`)}function tg(e,t){let n=t.getContext("2d");if(n)try{n.drawImage(e,0,0)}catch{}}function _d(e){let t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height,x:t.x,y:t.y}}function wu(e,t,n){let{top:r,bottom:i,left:o,right:s}=e;return n>=r&&n<=i&&t>=o&&t<=s}function no(e,t,n){e.top+=t,e.bottom=e.top+e.height,e.left+=n,e.right=e.left+e.width}function ng(e,t,n,r){let{top:i,right:o,bottom:s,left:a,width:l,height:u}=e,d=l*t,h=u*t;return r>i-h&&r<s+h&&n>a-d&&n<o+d}var O0=class{_document;positions=new Map;constructor(e){this._document=e}clear(){this.positions.clear()}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),e.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:_d(t)})})}handleScroll(e){let t=mn(e),n=this.positions.get(t);if(!n)return null;let r=n.scrollPosition,i,o;if(t===this._document){let l=this.getViewportScrollPosition();i=l.top,o=l.left}else i=t.scrollTop,o=t.scrollLeft;let s=r.top-i,a=r.left-o;return this.positions.forEach((l,u)=>{l.clientRect&&t!==u&&t.contains(u)&&no(l.clientRect,s,a)}),r.top=i,r.left=o,{top:s,left:a}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function D0(e,t){let n=e.rootNodes;if(n.length===1&&n[0].nodeType===t.ELEMENT_NODE)return n[0];let r=t.createElement("div");return n.forEach(i=>r.appendChild(i)),r}function md(e,t,n){for(let r in t)if(t.hasOwnProperty(r)){let i=t[r];i?e.setProperty(r,i,n?.has(r)?"important":""):e.removeProperty(r)}return e}function ei(e,t){let n=t?"":"none";md(e.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":n,"-ms-user-select":n,"-webkit-user-select":n,"-moz-user-select":n})}function rg(e,t,n){md(e.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},n)}function sa(e,t){return t&&t!="none"?e+" "+t:e}function ig(e,t){e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.transform=aa(t.left,t.top)}function aa(e,t){return`translate3d(${Math.round(e)}px, ${Math.round(t)}px, 0)`}function og(e){let t=e.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(e)*t}function sA(e){let t=getComputedStyle(e),n=Yl(t,"transition-property"),r=n.find(a=>a==="transform"||a==="all");if(!r)return 0;let i=n.indexOf(r),o=Yl(t,"transition-duration"),s=Yl(t,"transition-delay");return og(o[i])+og(s[i])}function Yl(e,t){return e.getPropertyValue(t).split(",").map(n=>n.trim())}var aA=new Set(["position"]),lA=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(e,t,n,r,i,o,s,a,l,u){this._document=e,this._rootElement=t,this._direction=n,this._initialDomRect=r,this._previewTemplate=i,this._previewClass=o,this._pickupPositionOnPage=s,this._initialTransform=a,this._zIndex=l,this._renderer=u}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),sg(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return sA(this._preview)}addEventListener(e,t){return this._renderer.listen(this._preview,e,t)}_createPreview(){let e=this._previewTemplate,t=this._previewClass,n=e?e.template:null,r;if(n&&e){let i=e.matchSize?this._initialDomRect:null,o=e.viewContainer.createEmbeddedView(n,e.context);o.detectChanges(),r=D0(o,this._document),this._previewEmbeddedView=o,e.matchSize?ig(r,i):r.style.transform=aa(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=T0(this._rootElement),ig(r,this._initialDomRect),this._initialTransform&&(r.style.transform=this._initialTransform);return md(r.style,{"pointer-events":"none",margin:sg(r)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},aA),ei(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("popover","manual"),r.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(i=>r.classList.add(i)):r.classList.add(t)),r}};function sg(e){return"showPopover"in e}var cA={passive:!0},ag={passive:!1},uA={passive:!1,capture:!0},hA=800,lg=new Set(["position"]),dA=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_anchor;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=Bn(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new ye;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=yt.EMPTY;_pointerUpSubscription=yt.EMPTY;_scrollSubscription=yt.EMPTY;_resizeSubscription=yt.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>ei(t,e)))}_disabled=!1;beforeStarted=new ye;started=new ye;released=new ye;ended=new ye;entered=new ye;exited=new ye;dropped=new ye;moved=this._moveEvents;data;constrainPosition;constructor(e,t,n,r,i,o,s){this._config=t,this._document=n,this._ngZone=r,this._viewportRuler=i,this._dragDropRegistry=o,this._renderer=s,this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new O0(n),o.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(n=>dn(n)),this._handles.forEach(n=>ei(n,this.disabled)),this._toggleNativeDragInteractions();let t=new Set;return this._disabledHandles.forEach(n=>{this._handles.indexOf(n)>-1&&t.add(n)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let t=dn(e);return t!==this._rootElement&&(this._removeRootElementListeners(),this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[jt(this._renderer,t,"mousedown",this._pointerDown,ag),jt(this._renderer,t,"touchstart",this._pointerDown,cA),jt(this._renderer,t,"dragstart",this._nativeDragStart,ag)]),this._initialTransform=void 0,this._rootElement=t),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?dn(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),ei(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),ei(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_pointerDown=e=>{if(this.beforeStarted.next(),this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&this._initializeDragSequence(t,e)}else this.disabled||this._initializeDragSequence(this._rootElement,e)};_pointerMove=e=>{let t=this._getPointerPositionOnPage(e);if(!this._hasStartedDragging()){let r=Math.abs(t.x-this._pickupPositionOnPage.x),i=Math.abs(t.y-this._pickupPositionOnPage.y);if(r+i>=this._config.dragStartThreshold){let o=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),s=this._dropContainer;if(!o){this._endDragSequence(e);return}(!s||!s.isDragging()&&!s.isReceiving())&&(e.cancelable&&e.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(e)))}return}e.cancelable&&e.preventDefault();let n=this._getConstrainedPointerPosition(t);if(this._hasMoved=!0,this._lastKnownPointerPosition=t,this._updatePointerDirectionDelta(n),this._dropContainer)this._updateActiveDropContainer(n,t);else{let r=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,i=this._activeTransform;i.x=n.x-r.x+this._passiveTransform.x,i.y=n.y-r.y+this._passiveTransform.y,this._applyRootElementTransform(i.x,i.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:n,event:e,distance:this._getDragDistance(n),delta:this._pointerDirectionDelta})})};_pointerUp=e=>{this._endDragSequence(e)};_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){Hi(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),n=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=jt(this._renderer,t,"selectstart",fA,uA)}),n){let r=this._rootElement,i=r.parentNode,o=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment("");i.insertBefore(s,r),this._initialTransform=r.style.transform||"",this._preview=new lA(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(i,t)),rg(r,!1,lg),this._document.body.appendChild(i.replaceChild(o,r)),this.started.next({source:this,event:e}),n.start(),this._initialContainer=n,this._initialIndex=n.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(n?n.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();let n=this.isDragging(),r=Hi(t),i=!r&&t.button!==0,o=this._rootElement,s=mn(t),a=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+hA>Date.now(),l=r?S0(t):x0(t);if(s&&s.draggable&&t.type==="mousedown"&&t.preventDefault(),n||i||a||l)return;if(this._handles.length){let h=o.style;this._rootElementTapHighlight=h.webkitTapHighlightColor||"",h.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(h=>this._updateOnScroll(h)),this._boundaryElement&&(this._boundaryRect=_d(this._boundaryElement));let u=this._previewTemplate;this._pickupPositionInElement=u&&u.template&&!u.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);let d=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:d.x,y:d.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){rg(this._rootElement,!0,lg),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let t=this._dropContainer,n=t.getItemIndex(this),r=this._getPointerPositionOnPage(e),i=this._getDragDistance(r),o=t._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:i,dropPoint:r,event:e}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:i,dropPoint:r,event:e}),t.drop(this,n,this._initialIndex,this._initialContainer,o,i,r,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:n,y:r}){let i=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!i&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(i=this._initialContainer),i&&i!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=i,this._dropContainer.enter(this,e,t,i===this._initialContainer&&i.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:i,currentIndex:i.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,r),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let t=this._preview.getTransitionDuration();return t===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(n=>{let r=s=>{(!s||this._preview&&mn(s)===this._preview.element&&s.propertyName==="transform")&&(o(),n(),clearTimeout(i))},i=setTimeout(r,t*1.5),o=this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,t=e?e.template:null,n;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),n=D0(this._placeholderRef,this._document)):n=T0(this._rootElement),n.style.pointerEvents="none",n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(e,t,n){let r=t===this._rootElement?null:t,i=r?r.getBoundingClientRect():e,o=Hi(n)?n.targetTouches[0]:n,s=this._getViewportScrollPosition(),a=o.pageX-i.left-s.left,l=o.pageY-i.top-s.top;return{x:i.left-e.left+a,y:i.top-e.top+l}}_getPointerPositionOnPage(e){let t=this._getViewportScrollPosition(),n=Hi(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,r=n.pageX-t.left,i=n.pageY-t.top;if(this._ownerSVGElement){let o=this._ownerSVGElement.getScreenCTM();if(o){let s=this._ownerSVGElement.createSVGPoint();return s.x=r,s.y=i,s.matrixTransform(o.inverse())}}return{x:r,y:i}}_getConstrainedPointerPosition(e){let t=this._dropContainer?this._dropContainer.lockAxis:null,{x:n,y:r}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||t==="x"?r=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||t==="y")&&(n=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:i,y:o}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,s=this._boundaryRect,{width:a,height:l}=this._getPreviewRect(),u=s.top+o,d=s.bottom-(l-o),h=s.left+i,v=s.right-(a-i);n=cg(n,h,v),r=cg(r,u,d)}return{x:n,y:r}}_updatePointerDirectionDelta(e){let{x:t,y:n}=e,r=this._pointerDirectionDelta,i=this._pointerPositionAtLastDirectionChange,o=Math.abs(t-i.x),s=Math.abs(n-i.y);return o>this._config.pointerDirectionChangeThreshold&&(r.x=t>i.x?1:-1,i.x=t),s>this._config.pointerDirectionChangeThreshold&&(r.y=n>i.y?1:-1,i.y=n),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,ei(this._rootElement,e))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e=>e()),this._rootElementCleanups=void 0}_applyRootElementTransform(e,t){let n=1/this.scale,r=aa(e*n,t*n),i=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=i.transform&&i.transform!="none"?i.transform:""),i.transform=sa(r,this._initialTransform)}_applyPreviewTransform(e,t){let n=this._previewTemplate?.template?void 0:this._initialTransform,r=aa(e,t);this._preview.setTransform(sa(r,n))}_getDragDistance(e){let t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(e===0&&t===0||this.isDragging()||!this._boundaryElement)return;let n=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(r.width===0&&r.height===0||n.width===0&&n.height===0)return;let i=r.left-n.left,o=n.right-r.right,s=r.top-n.top,a=n.bottom-r.bottom;r.width>n.width?(i>0&&(e+=i),o>0&&(e-=o)):e=0,r.height>n.height?(s>0&&(t+=s),a>0&&(t-=a)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){let t=this.dragStartDelay;return typeof t=="number"?t:Hi(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){let t=this._parentPositions.handleScroll(e);if(t){let n=mn(e);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&no(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=nl(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){let n=this._previewContainer||"global";if(n==="parent")return e;if(n==="global"){let r=this._document;return t||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return dn(n)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=e=>{if(this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&e.preventDefault()}else this.disabled||e.preventDefault()};_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}};function cg(e,t,n){return Math.max(t,Math.min(n,e))}function Hi(e){return e.type[0]==="t"}function fA(e){e.preventDefault()}function R0(e,t,n){let r=ug(t,e.length-1),i=ug(n,e.length-1);if(r===i)return;let o=e[r],s=i<r?-1:1;for(let a=r;a!==i;a+=s)e[a]=e[a+s];e[i]=o}function ug(e,t){return Math.max(0,Math.min(t,e))}var hg=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(e){this._dragDropRegistry=e}_previousSwap={drag:null,delta:0,overlaps:!1};start(e){this.withItems(e)}sort(e,t,n,r){let i=this._itemPositions,o=this._getItemIndexFromPointerPosition(e,t,n,r);if(o===-1&&i.length>0)return null;let s=this.orientation==="horizontal",a=i.findIndex(C=>C.drag===e),l=i[o],u=i[a].clientRect,d=l.clientRect,h=a>o?1:-1,v=this._getItemOffsetPx(u,d,h),m=this._getSiblingOffsetPx(a,i,h),w=i.slice();return R0(i,a,o),i.forEach((C,A)=>{if(w[A]===C)return;let k=C.drag===e,$=k?v:m,ne=k?e.getPlaceholderElement():C.drag.getRootElement();C.offset+=$;let z=Math.round(C.offset*(1/C.drag.scale));s?(ne.style.transform=sa(`translate3d(${z}px, 0, 0)`,C.initialTransform),no(C.clientRect,0,$)):(ne.style.transform=sa(`translate3d(0, ${z}px, 0)`,C.initialTransform),no(C.clientRect,$,0))}),this._previousSwap.overlaps=wu(d,t,n),this._previousSwap.drag=l.drag,this._previousSwap.delta=s?r.x:r.y,{previousIndex:a,currentIndex:o}}enter(e,t,n,r){let i=r==null||r<0?this._getItemIndexFromPointerPosition(e,t,n):r,o=this._activeDraggables,s=o.indexOf(e),a=e.getPlaceholderElement(),l=o[i];if(l===e&&(l=o[i+1]),!l&&(i==null||i===-1||i<o.length-1)&&this._shouldEnterAsFirstChild(t,n)&&(l=o[0]),s>-1&&o.splice(s,1),l&&!this._dragDropRegistry.isDragging(l)){let u=l.getRootElement();u.parentElement.insertBefore(a,u),o.splice(i,0,e)}else this._element.appendChild(a),o.push(e);a.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{let t=e.getRootElement();if(t){let n=this._itemPositions.find(r=>r.drag===e)?.initialTransform;t.style.transform=n||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(t=>t.drag===e)}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:n})=>{no(n,e,t)}),this._itemPositions.forEach(({drag:n})=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(t=>{let n=t.getVisibleElement();return{drag:t,offset:0,initialTransform:n.style.transform||"",clientRect:_d(n)}}).sort((t,n)=>e?t.clientRect.left-n.clientRect.left:t.clientRect.top-n.clientRect.top)}_getItemOffsetPx(e,t,n){let r=this.orientation==="horizontal",i=r?t.left-e.left:t.top-e.top;return n===-1&&(i+=r?t.width-e.width:t.height-e.height),i}_getSiblingOffsetPx(e,t,n){let r=this.orientation==="horizontal",i=t[e].clientRect,o=t[e+n*-1],s=i[r?"width":"height"]*n;if(o){let a=r?"left":"top",l=r?"right":"bottom";n===-1?s-=o.clientRect[a]-i[l]:s+=i[a]-o.clientRect[l]}return s}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;let n=this._itemPositions,r=this.orientation==="horizontal";if(n[0].drag!==this._activeDraggables[0]){let i=n[n.length-1].clientRect;return r?e>=i.right:t>=i.bottom}else{let i=n[0].clientRect;return r?e<=i.left:t<=i.top}}_getItemIndexFromPointerPosition(e,t,n,r){let i=this.orientation==="horizontal",o=this._itemPositions.findIndex(({drag:s,clientRect:a})=>{if(s===e)return!1;if(r){let l=i?r.x:r.y;if(s===this._previousSwap.drag&&this._previousSwap.overlaps&&l===this._previousSwap.delta)return!1}return i?t>=Math.floor(a.left)&&t<Math.floor(a.right):n>=Math.floor(a.top)&&n<Math.floor(a.bottom)});return o===-1||!this._sortPredicate(o,e)?-1:o}},pA=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(e,t){this._document=e,this._dragDropRegistry=t}start(e){let t=this._element.childNodes;this._relatedNodes=[];for(let n=0;n<t.length;n++){let r=t[n];this._relatedNodes.push([r,r.nextSibling])}this.withItems(e)}sort(e,t,n,r){let i=this._getItemIndexFromPointerPosition(e,t,n),o=this._previousSwap;if(i===-1||this._activeItems[i]===e)return null;let s=this._activeItems[i];if(o.drag===s&&o.overlaps&&o.deltaX===r.x&&o.deltaY===r.y)return null;let a=this.getItemIndex(e),l=e.getPlaceholderElement(),u=s.getRootElement();i>a?u.after(l):u.before(l),R0(this._activeItems,a,i);let d=this._getRootNode().elementFromPoint(t,n);return o.deltaX=r.x,o.deltaY=r.y,o.drag=s,o.overlaps=u===d||u.contains(d),{previousIndex:a,currentIndex:i}}enter(e,t,n,r){let i=r==null||r<0?this._getItemIndexFromPointerPosition(e,t,n):r;i===-1&&(i=this._getClosestItemIndexToPointer(e,t,n));let o=this._activeItems[i],s=this._activeItems.indexOf(e);s>-1&&this._activeItems.splice(s,1),o&&!this._dragDropRegistry.isDragging(o)?(this._activeItems.splice(i,0,e),o.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){let e=this._element,t=this._previousSwap;for(let n=this._relatedNodes.length-1;n>-1;n--){let[r,i]=this._relatedNodes[n];r.parentNode===e&&r.nextSibling!==i&&(i===null?e.appendChild(r):i.parentNode===e&&e.insertBefore(r,i))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,t,n){let r=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(n)),i=r?this._activeItems.findIndex(o=>{let s=o.getRootElement();return r===s||s.contains(r)}):-1;return i===-1||!this._sortPredicate(i,e)?-1:i}_getRootNode(){return this._rootNode||(this._rootNode=nl(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,t,n){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let r=1/0,i=-1;for(let o=0;o<this._activeItems.length;o++){let s=this._activeItems[o];if(s!==e){let{x:a,y:l}=s.getRootElement().getBoundingClientRect(),u=Math.hypot(t-a,n-l);u<r&&(r=u,i=o)}}return i}},dg=.05,N0=.05,en=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e}(en||{}),Nt=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e}(Nt||{}),gA=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new ye;entered=new ye;exited=new ye;dropped=new ye;sorted=new ye;receivingStarted=new ye;receivingStopped=new ye;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=yt.EMPTY;_verticalScrollDirection=en.NONE;_horizontalScrollDirection=Nt.NONE;_scrollNode;_stopScrollTimers=new ye;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(e,t,n,r,i){this._dragDropRegistry=t,this._ngZone=r,this._viewportRuler=i;let o=this.element=dn(e);this._document=n,this.withOrientation("vertical").withElementContainer(o),t.registerDropContainer(this),this._parentPositions=new O0(n)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,n,r){this._draggingStarted(),r==null&&this.sortingDisabled&&(r=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,n,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,n,r,i,o,s,a={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:n,container:this,previousContainer:r,isPointerOverContainer:i,distance:o,dropPoint:s,event:a})}withItems(e){let t=this._draggables;return this._draggables=e,e.forEach(n=>n._withDropContainer(this)),this.isDragging()&&(t.filter(n=>n.isDragging()).every(n=>e.indexOf(n)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof hg&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new pA(this._document,this._dragDropRegistry);else{let t=new hg(this._dragDropRegistry);t.direction=this._direction,t.orientation=e,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,n)=>this.sortPredicate(t,n,this)),this}withScrollableParents(e){let t=this._container;return this._scrollableElements=e.indexOf(t)===-1?[t,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;let t=dn(this.element),n=this._scrollableElements.indexOf(this._container),r=this._scrollableElements.indexOf(e);return n>-1&&this._scrollableElements.splice(n,1),r>-1&&this._scrollableElements.splice(r,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,n,r){if(this.sortingDisabled||!this._domRect||!ng(this._domRect,dg,t,n))return;let i=this._sortStrategy.sort(e,t,n,r);i&&this.sorted.next({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let n,r=en.NONE,i=Nt.NONE;if(this._parentPositions.positions.forEach((o,s)=>{s===this._document||!o.clientRect||n||ng(o.clientRect,dg,e,t)&&([r,i]=_A(s,o.clientRect,this._direction,e,t),(r||i)&&(n=s))}),!r&&!i){let{width:o,height:s}=this._viewportRuler.getViewportSize(),a={width:o,height:s,top:0,right:o,bottom:s,left:0};r=P0(a,t),i=k0(a,e),n=window}n&&(r!==this._verticalScrollDirection||i!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=i,this._scrollNode=n,(r||i)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),a1(0,Rw).pipe(pi(this._stopScrollTimers)).subscribe(()=>{let e=this._scrollNode,t=this.autoScrollStep;this._verticalScrollDirection===en.UP?e.scrollBy(0,-t):this._verticalScrollDirection===en.DOWN&&e.scrollBy(0,t),this._horizontalScrollDirection===Nt.LEFT?e.scrollBy(-t,0):this._horizontalScrollDirection===Nt.RIGHT&&e.scrollBy(t,0)})};_isOverContainer(e,t){return this._domRect!=null&&wu(this._domRect,e,t)}_getSiblingContainerFromPosition(e,t,n){return this._siblings.find(r=>r._canReceive(e,t,n))}_canReceive(e,t,n){if(!this._domRect||!wu(this._domRect,t,n)||!this.enterPredicate(e,this))return!1;let r=this._getShadowRoot().elementFromPoint(t,n);return r?r===this._container||this._container.contains(r):!1}_startReceiving(e,t){let n=this._activeSiblings;!n.has(e)&&t.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(n.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=nl(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}};function P0(e,t){let{top:n,bottom:r,height:i}=e,o=i*N0;return t>=n-o&&t<=n+o?en.UP:t>=r-o&&t<=r+o?en.DOWN:en.NONE}function k0(e,t){let{left:n,right:r,width:i}=e,o=i*N0;return t>=n-o&&t<=n+o?Nt.LEFT:t>=r-o&&t<=r+o?Nt.RIGHT:Nt.NONE}function _A(e,t,n,r,i){let o=P0(t,i),s=k0(t,r),a=en.NONE,l=Nt.NONE;if(o){let u=e.scrollTop;o===en.UP?u>0&&(a=en.UP):e.scrollHeight-u>e.clientHeight&&(a=en.DOWN)}if(s){let u=e.scrollLeft;n==="rtl"?s===Nt.RIGHT?u<0&&(l=Nt.RIGHT):e.scrollWidth+u>e.clientWidth&&(l=Nt.LEFT):s===Nt.LEFT?u>0&&(l=Nt.LEFT):e.scrollWidth-u>e.clientWidth&&(l=Nt.RIGHT)}return[a,l]}var $i={capture:!0},Kl={passive:!1,capture:!0},mA=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=At({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(n,r){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}
39
+ `],encapsulation:2,changeDetection:0})}return e})(),A0=(()=>{class e{_ngZone=P(Ze);_document=P(et);_styleLoader=P(rl);_renderer=P(xn).createRenderer(null,null);_cleanupDocumentTouchmove;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=Bn([]);_globalListeners;_draggingPredicate=n=>n.isDragging();_domNodesToDirectives=null;pointerMove=new ye;pointerUp=new ye;scroll=new ye;constructor(){}registerDropContainer(n){this._dropInstances.has(n)||this._dropInstances.add(n)}registerDragItem(n){this._dragInstances.add(n),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=jt(this._renderer,this._document,"touchmove",this._persistentTouchmoveListener,Kl)})}removeDropContainer(n){this._dropInstances.delete(n)}removeDragItem(n){this._dragInstances.delete(n),this.stopDragging(n),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(n,r){if(!(this._activeDragInstances().indexOf(n)>-1)&&(this._styleLoader.load(mA),this._activeDragInstances.update(i=>[...i,n]),this._activeDragInstances().length===1)){let i=r.type.startsWith("touch"),o=a=>this.pointerUp.next(a),s=[["scroll",a=>this.scroll.next(a),$i],["selectstart",this._preventDefaultWhileDragging,Kl]];i?s.push(["touchend",o,$i],["touchcancel",o,$i]):s.push(["mouseup",o,$i]),i||s.push(["mousemove",a=>this.pointerMove.next(a),Kl]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=s.map(([a,l,u])=>jt(this._renderer,this._document,a,l,u))})}}stopDragging(n){this._activeDragInstances.update(r=>{let i=r.indexOf(n);return i>-1?(r.splice(i,1),[...r]):r}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(n){return this._activeDragInstances().indexOf(n)>-1}scrolled(n){let r=[this.scroll];return n&&n!==this._document&&r.push(new bt(i=>this._ngZone.runOutsideAngular(()=>{let o=jt(this._renderer,n,"scroll",s=>{this._activeDragInstances().length&&i.next(s)},$i);return()=>{o()}}))),_a(...r)}registerDirectiveNode(n,r){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(n,r)}removeDirectiveNode(n){this._domNodesToDirectives?.delete(n)}getDragDirectiveForNode(n){return this._domNodesToDirectives?.get(n)||null}ngOnDestroy(){this._dragInstances.forEach(n=>this.removeDragItem(n)),this._dropInstances.forEach(n=>this.removeDropContainer(n)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=n=>{this._activeDragInstances().length>0&&n.preventDefault()};_persistentTouchmoveListener=n=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&n.preventDefault(),this.pointerMove.next(n))};_clearGlobalListeners(){this._globalListeners?.forEach(n=>n()),this._globalListeners=void 0}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),vA={dragStartThreshold:5,pointerDirectionChangeThreshold:5},yA=(()=>{class e{_document=P(et);_ngZone=P(Ze);_viewportRuler=P(gd);_dragDropRegistry=P(A0);_renderer=P(xn).createRenderer(null,null);constructor(){}createDrag(n,r=vA){return new dA(n,r,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(n){return new gA(n,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),fg=new Ce("CDK_DRAG_PARENT"),bA=new Ce("CdkDragHandle"),wA=new Ce("CDK_DRAG_CONFIG"),EA=new Ce("CdkDropList"),xA=(()=>{class e{element=P(Vt);dropContainer=P(EA,{optional:!0,skipSelf:!0});_ngZone=P(Ze);_viewContainerRef=P(Ri);_dir=P(oa,{optional:!0});_changeDetectorRef=P(Ua);_selfHandle=P(bA,{optional:!0,self:!0});_parentDrag=P(fg,{optional:!0,skipSelf:!0});_dragDropRegistry=P(A0);_destroyed=new ye;_handles=new Mu([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(n){this._disabled=n,this._dragRef.disabled=this._disabled}_disabled;constrainPosition;previewClass;previewContainer;scale=1;started=new Qe;released=new Qe;ended=new Qe;entered=new Qe;exited=new Qe;dropped=new Qe;moved=new bt(n=>{let r=this._dragRef.moved.pipe(ga(i=>({source:this,pointerPosition:i.pointerPosition,event:i.event,delta:i.delta,distance:i.distance}))).subscribe(n);return()=>{r.unsubscribe()}});_injector=P(kt);constructor(){let n=this.dropContainer,r=P(wA,{optional:!0}),i=P(yA);this._dragRef=i.createDrag(this.element,{dragStartThreshold:r&&r.dragStartThreshold!=null?r.dragStartThreshold:5,pointerDirectionChangeThreshold:r&&r.pointerDirectionChangeThreshold!=null?r.pointerDirectionChangeThreshold:5,zIndex:r?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),r&&this._assignDefaults(r),n&&(this._dragRef._withDropContainer(n._dropListRef),n.addItem(this),n._dropListRef.beforeStarted.pipe(pi(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(n){this._dragRef.setFreeDragPosition(n)}ngAfterViewInit(){ko(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(n){let r=n.rootElementSelector,i=n.freeDragPosition;r&&!r.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,i&&!i.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(n){let r=this._handles.getValue();r.push(n),this._handles.next(r)}_removeHandle(n){let r=this._handles.getValue(),i=r.indexOf(n);i>-1&&(r.splice(i,1),this._handles.next(r))}_setPreviewTemplate(n){this._previewTemplate=n}_resetPreviewTemplate(n){n===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(n){this._placeholderTemplate=n}_resetPlaceholderTemplate(n){n===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let n=this.element.nativeElement,r=n;this.rootElementSelector&&(r=n.closest!==void 0?n.closest(this.rootElementSelector):n.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(r||n)}_getBoundaryElement(){let n=this.boundaryElement;return n?typeof n=="string"?this.element.nativeElement.closest(n):dn(n):null}_syncInputs(n){n.beforeStarted.subscribe(()=>{if(!n.isDragging()){let r=this._dir,i=this.dragStartDelay,o=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,s=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;n.disabled=this.disabled,n.lockAxis=this.lockAxis,n.scale=this.scale,n.dragStartDelay=typeof i=="object"&&i?i:Yk(i),n.constrainPosition=this.constrainPosition,n.previewClass=this.previewClass,n.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(o).withPreviewTemplate(s).withPreviewContainer(this.previewContainer||"global"),r&&n.withDirection(r.value)}}),n.beforeStarted.pipe(c1(1)).subscribe(()=>{if(this._parentDrag){n.withParent(this._parentDrag._dragRef);return}let r=this.element.nativeElement.parentElement;for(;r;){let i=this._dragDropRegistry.getDragDirectiveForNode(r);if(i){n.withParent(i._dragRef);break}r=r.parentElement}})}_handleEvents(n){n.started.subscribe(r=>{this.started.emit({source:this,event:r.event}),this._changeDetectorRef.markForCheck()}),n.released.subscribe(r=>{this.released.emit({source:this,event:r.event})}),n.ended.subscribe(r=>{this.ended.emit({source:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event}),this._changeDetectorRef.markForCheck()}),n.entered.subscribe(r=>{this.entered.emit({container:r.container.data,item:this,currentIndex:r.currentIndex})}),n.exited.subscribe(r=>{this.exited.emit({container:r.container.data,item:this})}),n.dropped.subscribe(r=>{this.dropped.emit({previousIndex:r.previousIndex,currentIndex:r.currentIndex,previousContainer:r.previousContainer.data,container:r.container.data,isPointerOverContainer:r.isPointerOverContainer,item:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event})})}_assignDefaults(n){let{lockAxis:r,dragStartDelay:i,constrainPosition:o,previewClass:s,boundaryElement:a,draggingDisabled:l,rootElementSelector:u,previewContainer:d}=n;this.disabled=l??!1,this.dragStartDelay=i||0,r&&(this.lockAxis=r),o&&(this.constrainPosition=o),s&&(this.previewClass=s),a&&(this.boundaryElement=a),u&&(this.rootElementSelector=u),d&&(this.previewContainer=d)}_setupHandlesListener(){this._handles.pipe(f1(n=>{let r=n.map(i=>i.element);this._selfHandle&&this.rootElementSelector&&r.push(this.element),this._dragRef.withHandles(r)}),f_(n=>_a(...n.map(r=>r._stateChanges.pipe(d_(r))))),pi(this._destroyed)).subscribe(n=>{let r=this._dragRef,i=n.element.nativeElement;n.disabled?r.disableHandle(i):r.enableHandle(i)})}static \u0275fac=function(n){return new(n||e)};static \u0275dir=Ma({type:e,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(n,r){n&2&&Va("cdk-drag-disabled",r.disabled)("cdk-drag-dragging",r._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",ZT],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",YT]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[IT([{provide:fg,useExisting:e}]),V_]})}return e})(),SA=e=>({"lc:cursor-grab":e}),CA=(e,t)=>t.url;function IA(e,t){if(e&1&&He(0,"source",11),e&2){let n=t.$implicit;ki("type",n.mimeType),Le("src",n.url,on)}}var TA=class Eu{constructor(t){this.elementRef=t}video;closeClicked=new Qe;videoClicked=new Qe;isDragging=!1;ngOnInit(){let t=this.elementRef.nativeElement.parentElement.parentElement;t.style.zIndex="2147483647"}close(){this.closeClicked.emit()}onVideoClick(){if(this.isDragging){this.isDragging=!1;return}this.videoClicked.emit()}static \u0275fac=function(t){return new(t||Eu)(Ot(Vt))};static \u0275cmp=At({type:Eu,selectors:[["cooee-draggable-video-popup"]],inputs:{video:"video"},outputs:{closeClicked:"closeClicked",videoClicked:"videoClicked"},decls:14,vars:5,consts:[["role","button","tabindex","0","cdkDrag","",1,"lc-popup-inner","lc:shadow-2xl","lc:rounded-lg","lc:flex","lc:justify-center","lc:items-center",3,"click","keyup","cdkDragMoved","ngClass","cdkDragBoundary"],[1,"lc-close-button","lc:absolute","lc:-top-3.5","lc:-right-3.5","lc:bg-black/50","lc:rounded-full","lc:w-8","lc:h-8","lc:border-none","lc:z-10","lc:flex","lc:justify-center","lc:items-center",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","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-play-button"],[1,"lc-icon"],["viewBox","0 0 28.31 30"],["d","M19.15,1.29A1.24,1.24,0,0,0,17.82.15a1.36,1.36,0,0,0-.35.07,3.2,3.2,0,0,0-.65.46l-5.06,4.6a1.24,1.24,0,0,0,0,1.75l0,0a1.22,1.22,0,0,0,.89.39,1.25,1.25,0,0,0,.85-.32l3-2.78.17-.13v8l2.44,2.62ZM26.79,26.6l-7.64-7.93-2.5-2.58-6-6.34L8.9,8,5.23,4.15a1.17,1.17,0,0,0-1.66,0h0a1.18,1.18,0,0,0,0,1.66h0L6.1,8.47H3.32a2.94,2.94,0,0,0-2.45,3v7.16a3,3,0,0,0,2.86,3.08H8.07a.44.44,0,0,1,.33.13C9.7,23,11,24.19,12.26,25.36L17,29.7a1.24,1.24,0,0,0,2.17-1V22.21l5.95,6.15a1.2,1.2,0,0,0,1.67,0,1.17,1.17,0,0,0,.08-1.66Zm-10.14-.67-.18-.11L9.75,19.67a1.72,1.72,0,0,0-1.16-.45H4c-.48,0-.59-.11-.59-.61V11.55c0-.49,0-.6.59-.6H8.29l8.29,8.55ZM29.09,15.07A9.9,9.9,0,0,1,26.33,22l-.11.13a1.24,1.24,0,0,1-2-.28,1.29,1.29,0,0,1,.24-1.52h0a6.77,6.77,0,0,0,1.32-1.89,7.41,7.41,0,0,0-1.37-8.55,1.24,1.24,0,0,1-.08-1.75,1.33,1.33,0,0,1,.41-.29,1.19,1.19,0,0,1,1.34.2A8.88,8.88,0,0,1,28,10.36a10,10,0,0,1,1.17,4.17A3.35,3.35,0,0,1,29.09,15.07Z","transform","translate(-0.86 -0.14)","fill","#191919"],[1,"lc-text"],["loop","","preload","auto","playsinline","","autoplay","",1,"lc:rounded-lg","lc:w-full",3,"muted"],[3,"src","type"]],template:function(t,n){t&1&&(X(0,"div",0),nt("click",function(){return n.onVideoClick()})("keyup",function(){return n.onVideoClick()})("cdkDragMoved",function(){return n.isDragging=!0}),X(1,"button",1),nt("click",function(r){return r.stopPropagation(),n.close()}),fr(),X(2,"svg",2),He(3,"path",3)(4,"path",4),Q()(),Ms(),X(5,"div",5)(6,"div",6),fr(),X(7,"svg",7),He(8,"path",8),Q()(),Ms(),X(9,"div",9),rt(10,"Tap to unmute"),Q()(),X(11,"video",10),Wt(12,IA,1,2,"source",11,CA),Q()()),t&2&&(Le("ngClass",$v(3,SA,n.isDragging))("cdkDragBoundary","body"),Z(11),Le("muted",!0),Z(),Zt(n.video.sources))},dependencies:[Ha,xA],styles:["[_nghost-%COMP%]{position:fixed;display:block;right:24px;bottom:24px;max-width:150px}.lc-play-button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(1);transition:all .1s ease-in-out;z-index:999;flex-wrap:wrap;width:100%;max-width:130px;border-radius:5px;padding:5px 10px;background-color:#97979761;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.lc-play-button[_ngcontent-%COMP%] .lc-icon[_ngcontent-%COMP%]{width:14px;height:14px}.lc-play-button[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#fff}.lc-play-button[_ngcontent-%COMP%] .lc-text[_ngcontent-%COMP%]{font-size:11px;line-height:1;color:#fff;font-weight:400;margin-left:5px;text-align:center}"]})},vd=class{_attachedHost;attach(e){return this._attachedHost=e,e.attach(this)}detach(){let e=this._attachedHost;e!=null&&(this._attachedHost=null,e.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(e){this._attachedHost=e}},xu=class extends vd{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(e,t,n,r,i){super(),this.component=e,this.viewContainerRef=t,this.injector=n,this.projectableNodes=i}},L0=class extends vd{templateRef;viewContainerRef;context;injector;constructor(e,t,n,r){super(),this.templateRef=e,this.viewContainerRef=t,this.context=n,this.injector=r}get origin(){return this.templateRef.elementRef}attach(e,t=this.context){return this.context=t,super.attach(e)}detach(){return this.context=void 0,super.detach()}},OA=class extends vd{element;constructor(e){super(),this.element=e instanceof Vt?e.nativeElement:e}},yd=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof xu)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof L0)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof OA)return this._attachedPortal=e,this.attachDomPortal(e)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(e){this._disposeFn=e}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},DA=class extends yd{outletElement;_appRef;_defaultInjector;_document;constructor(e,t,n,r,i){super(),this.outletElement=e,this._appRef=n,this._defaultInjector=r,this._document=i}attachComponentPortal(e){let t;if(e.viewContainerRef){let n=e.injector||e.viewContainerRef.injector,r=n.get(mo,null,{optional:!0})||void 0;t=e.viewContainerRef.createComponent(e.component,{index:e.viewContainerRef.length,injector:n,ngModuleRef:r,projectableNodes:e.projectableNodes||void 0}),this.setDisposeFn(()=>t.destroy())}else{let n=this._appRef,r=e.injector||this._defaultInjector||kt.NULL,i=r.get($n,n.injector);t=Kv(e.component,{elementInjector:r,environmentInjector:i,projectableNodes:e.projectableNodes||void 0}),n.attachView(t.hostView),this.setDisposeFn(()=>{n.viewCount>0&&n.detachView(t.hostView),t.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(t)),this._attachedPortal=e,t}attachTemplatePortal(e){let t=e.viewContainerRef,n=t.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return n.rootNodes.forEach(r=>this.outletElement.appendChild(r)),n.detectChanges(),this.setDisposeFn(()=>{let r=t.indexOf(n);r!==-1&&t.remove(r)}),this._attachedPortal=e,n}attachDomPortal=e=>{let t=e.element;t.parentNode;let n=this._document.createComment("dom-portal");t.parentNode.insertBefore(n,t),this.outletElement.appendChild(t),this._attachedPortal=e,super.setDisposeFn(()=>{n.parentNode&&n.parentNode.replaceChild(t,n)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}},pg=(()=>{class e extends yd{_moduleRef=P(mo,{optional:!0});_document=P(et);_viewContainerRef=P(Ri);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(n){this.hasAttached()&&!n&&!this._isInitialized||(this.hasAttached()&&super.detach(),n&&super.attach(n),this._attachedPortal=n||null)}attached=new Qe;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(n){n.setAttachedHost(this);let r=n.viewContainerRef!=null?n.viewContainerRef:this._viewContainerRef,i=r.createComponent(n.component,{index:r.length,injector:n.injector||r.injector,projectableNodes:n.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return r!==this._viewContainerRef&&this._getRootNode().appendChild(i.hostView.rootNodes[0]),super.setDisposeFn(()=>i.destroy()),this._attachedPortal=n,this._attachedRef=i,this.attached.emit(i),i}attachTemplatePortal(n){n.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=n,this._attachedRef=r,this.attached.emit(r),r}attachDomPortal=n=>{let r=n.element;r.parentNode;let i=this._document.createComment("dom-portal");n.setAttachedHost(this),r.parentNode.insertBefore(i,r),this._getRootNode().appendChild(r),this._attachedPortal=n,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(r,i)})};_getRootNode(){let n=this._viewContainerRef.element.nativeElement;return n.nodeType===n.ELEMENT_NODE?n:n.parentNode}static \u0275fac=function(n){return new(n||e)};static \u0275dir=Ma({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Ni]})}return e})(),zi;function RA(){if(zi==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>zi=!0}))}finally{zi=zi||!1}return zi}function NA(e){return RA()?e:!!e.capture}var PA=new Ce("cdk-input-modality-detector-options"),kA={ignoreKeys:[18,17,224,91,16]},M0=650,Jl={passive:!0,capture:!0},AA=(()=>{class e{_platform=P(Xn);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new Mu(null);_options;_lastTouchMs=0;_onKeydown=n=>{this._options?.ignoreKeys?.some(r=>r===n.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=mn(n))};_onMousedown=n=>{Date.now()-this._lastTouchMs<M0||(this._modality.next(x0(n)?"keyboard":"mouse"),this._mostRecentTarget=mn(n))};_onTouchstart=n=>{if(S0(n)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=mn(n)};constructor(){let n=P(Ze),r=P(et),i=P(PA,{optional:!0});if(this._options=F(F({},kA),i),this.modalityDetected=this._modality.pipe(d1(1)),this.modalityChanged=this.modalityDetected.pipe(u1()),this._platform.isBrowser){let o=P(xn).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[jt(o,r,"keydown",this._onKeydown,Jl),jt(o,r,"mousedown",this._onMousedown,Jl),jt(o,r,"touchstart",this._onTouchstart,Jl)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(n=>n())}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),xs=function(e){return e[e.IMMEDIATE=0]="IMMEDIATE",e[e.EVENTUAL=1]="EVENTUAL",e}(xs||{}),LA=new Ce("cdk-focus-monitor-default-options"),us=NA({passive:!0,capture:!0}),MA=(()=>{class e{_ngZone=P(Ze);_platform=P(Xn);_inputModalityDetector=P(AA);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=P(et,{optional:!0});_stopInputModalityDetector=new ye;constructor(){let n=P(LA,{optional:!0});this._detectionMode=n?.detectionMode||xs.IMMEDIATE}_rootNodeFocusAndBlurListener=n=>{let r=mn(n);for(let i=r;i;i=i.parentElement)n.type==="focus"?this._onFocus(n,i):this._onBlur(n,i)};monitor(n,r=!1){let i=dn(n);if(!this._platform.isBrowser||i.nodeType!==1)return Uu();let o=nl(i)||this._getDocument(),s=this._elementInfo.get(i);if(s)return r&&(s.checkChildren=!0),s.subject;let a={checkChildren:r,subject:new ye,rootNode:o};return this._elementInfo.set(i,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(n){let r=dn(n),i=this._elementInfo.get(r);i&&(i.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(i))}focusVia(n,r,i){let o=dn(n),s=this._getDocument().activeElement;o===s?this._getClosestElementsInfo(o).forEach(([a,l])=>this._originChanged(a,r,l)):(this._setOrigin(r),typeof o.focus=="function"&&o.focus(i))}ngOnDestroy(){this._elementInfo.forEach((n,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(n){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(n)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:n&&this._isLastInteractionFromInputLabel(n)?"mouse":"program"}_shouldBeAttributedToTouch(n){return this._detectionMode===xs.EVENTUAL||!!n?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(n,r){n.classList.toggle("cdk-focused",!!r),n.classList.toggle("cdk-touch-focused",r==="touch"),n.classList.toggle("cdk-keyboard-focused",r==="keyboard"),n.classList.toggle("cdk-mouse-focused",r==="mouse"),n.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(n,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=n,this._originFromTouchInteraction=n==="touch"&&r,this._detectionMode===xs.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?M0:1;this._originTimeoutId=setTimeout(()=>this._origin=null,i)}})}_onFocus(n,r){let i=this._elementInfo.get(r),o=mn(n);!i||!i.checkChildren&&r!==o||this._originChanged(r,this._getFocusOrigin(o),i)}_onBlur(n,r){let i=this._elementInfo.get(r);!i||i.checkChildren&&n.relatedTarget instanceof Node&&r.contains(n.relatedTarget)||(this._setClasses(r),this._emitOrigin(i,null))}_emitOrigin(n,r){n.subject.observers.length&&this._ngZone.run(()=>n.subject.next(r))}_registerGlobalListeners(n){if(!this._platform.isBrowser)return;let r=n.rootNode,i=this._rootNodeFocusListenerCount.get(r)||0;i||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,us),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,us)}),this._rootNodeFocusListenerCount.set(r,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(pi(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(n){let r=n.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let i=this._rootNodeFocusListenerCount.get(r);i>1?this._rootNodeFocusListenerCount.set(r,i-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,us),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,us),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(n,r,i){this._setClasses(n,r),this._emitOrigin(i,r),this._lastFocusOrigin=r}_getClosestElementsInfo(n){let r=[];return this._elementInfo.forEach((i,o)=>{(o===n||i.checkChildren&&o.contains(n))&&r.push([o,i])}),r}_isLastInteractionFromInputLabel(n){let{_mostRecentTarget:r,mostRecentModality:i}=this._inputModalityDetector;if(i!=="mouse"||!r||r===n||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA"||n.disabled)return!1;let o=n.labels;if(o){for(let s=0;s<o.length;s++)if(o[s].contains(r))return!0}return!1}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),jA=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=At({type:e,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(n,r){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}
40
+ `],encapsulation:2,changeDetection:0})}return e})(),j0=(()=>{class e{_platform=P(Xn);constructor(){}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return VA(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=FA(WA(n));if(r&&(gg(r)===-1||!this.isVisible(r)))return!1;let i=n.nodeName.toLowerCase(),o=gg(n);return n.hasAttribute("contenteditable")?o!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!qA(n)?!1:i==="audio"?n.hasAttribute("controls")?o!==-1:!1:i==="video"?o===-1?!1:o!==null?!0:this._platform.FIREFOX||n.hasAttribute("controls"):n.tabIndex>=0}isFocusable(n,r){return GA(n)&&!this.isDisabled(n)&&(r?.ignoreVisibility||this.isVisible(n))}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function FA(e){try{return e.frameElement}catch{return null}}function VA(e){return!!(e.offsetWidth||e.offsetHeight||typeof e.getClientRects=="function"&&e.getClientRects().length)}function BA(e){let t=e.nodeName.toLowerCase();return t==="input"||t==="select"||t==="button"||t==="textarea"}function UA(e){return $A(e)&&e.type=="hidden"}function HA(e){return zA(e)&&e.hasAttribute("href")}function $A(e){return e.nodeName.toLowerCase()=="input"}function zA(e){return e.nodeName.toLowerCase()=="a"}function F0(e){if(!e.hasAttribute("tabindex")||e.tabIndex===void 0)return!1;let t=e.getAttribute("tabindex");return!!(t&&!isNaN(parseInt(t,10)))}function gg(e){if(!F0(e))return null;let t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}function qA(e){let t=e.nodeName.toLowerCase(),n=t==="input"&&e.type;return n==="text"||n==="password"||t==="select"||t==="textarea"}function GA(e){return UA(e)?!1:BA(e)||HA(e)||e.hasAttribute("contenteditable")||F0(e)}function WA(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}var ZA=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_enabled=!0;constructor(e,t,n,r,i=!1,o){this._element=e,this._checker=t,this._ngZone=n,this._document=r,this._injector=o,i||this.attachAnchors()}destroy(){let e=this._startAnchor,t=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.remove()),t&&(t.removeEventListener("focus",this.endAnchorListener),t.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement(e)))})}focusFirstTabbableElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement(e)))})}focusLastTabbableElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement(e)))})}_getRegionBoundary(e){let t=this._element.querySelectorAll(`[cdk-focus-region-${e}], [cdkFocusRegion${e}], [cdk-focus-${e}]`);return e=="start"?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(e){let t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(!this._checker.isFocusable(t)){let n=this._getFirstTabbableElement(t);return n?.focus(e),!!n}return t.focus(e),!0}return this.focusFirstTabbableElement(e)}focusFirstTabbableElement(e){let t=this._getRegionBoundary("start");return t&&t.focus(e),!!t}focusLastTabbableElement(e){let t=this._getRegionBoundary("end");return t&&t.focus(e),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let t=e.children;for(let n=0;n<t.length;n++){let r=t[n].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(t[n]):null;if(r)return r}return null}_getLastTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let t=e.children;for(let n=t.length-1;n>=0;n--){let r=t[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[n]):null;if(r)return r}return null}_createAnchor(){let e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}_toggleAnchorTabIndex(e,t){e?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}toggleAnchors(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_executeOnStable(e){this._injector?ko(e,{injector:this._injector}):setTimeout(e)}},YA=(()=>{class e{_checker=P(j0);_ngZone=P(Ze);_document=P(et);_injector=P(kt);constructor(){P(rl).load(jA)}create(n,r=!1){return new ZA(n,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function _g(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function gt(e){return e==null?"":typeof e=="string"?e:`${e}px`}function KA(e,...t){return t.length?t.some(n=>e[n]):e.altKey||e.shiftKey||e.ctrlKey||e.metaKey}var mg=tA(),JA=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(e,t){this._viewportRuler=e,this._document=t}attach(){}enable(){if(this._canBeEnabled()){let e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=gt(-this._previousScrollPosition.left),e.style.top=gt(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let e=this._document.documentElement,t=this._document.body,n=e.style,r=t.style,i=n.scrollBehavior||"",o=r.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),mg&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),mg&&(n.scrollBehavior=i,r.scrollBehavior=o)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.documentElement,t=this._viewportRuler.getViewportSize();return e.scrollHeight>t.height||e.scrollWidth>t.width}},XA=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(e,t,n,r){this._scrollDispatcher=e,this._ngZone=t,this._viewportRuler=n,this._config=r}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(this._scrollSubscription)return;let e=this._scrollDispatcher.scrolled(0).pipe(Hu(t=>!t||!this._overlayRef.overlayElement.contains(t.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{let t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}},V0=class{enable(){}disable(){}attach(){}};function Su(e,t){return t.some(n=>{let r=e.bottom<n.top,i=e.top>n.bottom,o=e.right<n.left,s=e.left>n.right;return r||i||o||s})}function vg(e,t){return t.some(n=>{let r=e.top<n.top,i=e.bottom>n.bottom,o=e.left<n.left,s=e.right>n.right;return r||i||o||s})}var QA=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(e,t,n,r){this._scrollDispatcher=e,this._viewportRuler=t,this._ngZone=n,this._config=r}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(!this._scrollSubscription){let e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:n,height:r}=this._viewportRuler.getViewportSize();Su(t,[{width:n,height:r,bottom:r,right:n,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},eL=(()=>{class e{_scrollDispatcher=P(rA);_viewportRuler=P(gd);_ngZone=P(Ze);_document=P(et);constructor(){}noop=()=>new V0;close=n=>new XA(this._scrollDispatcher,this._ngZone,this._viewportRuler,n);block=()=>new JA(this._viewportRuler,this._document);reposition=n=>new QA(this._scrollDispatcher,this._viewportRuler,this._ngZone,n);static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),B0=class{positionStrategy;scrollStrategy=new V0;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(e){if(e){let t=Object.keys(e);for(let n of t)e[n]!==void 0&&(this[n]=e[n])}}},tL=class{connectionPair;scrollableViewProperties;constructor(e,t){this.connectionPair=e,this.scrollableViewProperties=t}},U0=(()=>{class e{_attachedOverlays=[];_document=P(et);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(n){this.remove(n),this._attachedOverlays.push(n)}remove(n){let r=this._attachedOverlays.indexOf(n);r>-1&&this._attachedOverlays.splice(r,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),nL=(()=>{class e extends U0{_ngZone=P(Ze);_renderer=P(xn).createRenderer(null,null);_cleanupKeydown;add(n){super.add(n),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=n=>{let r=this._attachedOverlays;for(let i=r.length-1;i>-1;i--)if(r[i]._keydownEvents.observers.length>0){this._ngZone.run(()=>r[i]._keydownEvents.next(n));break}};static \u0275fac=(()=>{let n;return function(r){return(n||(n=gm(e)))(r||e)}})();static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),rL=(()=>{class e extends U0{_platform=P(Xn);_ngZone=P(Ze);_renderer=P(xn).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(n){if(super.add(n),!this._isAttached){let r=this._document.body,i={capture:!0};this._cleanups=this._ngZone.runOutsideAngular(()=>[jt(this._renderer,r,"pointerdown",this._pointerDownListener,i),jt(this._renderer,r,"click",this._clickListener,i),jt(this._renderer,r,"auxclick",this._clickListener,i),jt(this._renderer,r,"contextmenu",this._clickListener,i)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(n=>n()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=n=>{this._pointerDownEventTarget=mn(n)};_clickListener=n=>{let r=mn(n),i=n.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:r;this._pointerDownEventTarget=null;let o=this._attachedOverlays.slice();for(let s=o.length-1;s>-1;s--){let a=o[s];if(a._outsidePointerEvents.observers.length<1||!a.hasAttached())continue;if(yg(a.overlayElement,r)||yg(a.overlayElement,i))break;let l=a._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>l.next(n)):l.next(n)}};static \u0275fac=(()=>{let n;return function(r){return(n||(n=gm(e)))(r||e)}})();static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function yg(e,t){let n=typeof ShadowRoot<"u"&&ShadowRoot,r=t;for(;r;){if(r===e)return!0;r=n&&r instanceof ShadowRoot?r.host:r.parentNode}return!1}var H0=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=At({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(n,r){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}
41
+ `],encapsulation:2,changeDetection:0})}return e})(),bd=(()=>{class e{_platform=P(Xn);_containerElement;_document=P(et);_styleLoader=P(rl);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let n="cdk-overlay-container";if(this._platform.isBrowser||_g()){let i=this._document.querySelectorAll(`.${n}[platform="server"], .${n}[platform="test"]`);for(let o=0;o<i.length;o++)i[o].remove()}let r=this._document.createElement("div");r.classList.add(n),_g()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(H0)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),iL=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(e,t,n,r){this._renderer=t,this._ngZone=n,this.element=e.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=t.listen(this.element,"click",r)}detach(){this._ngZone.runOutsideAngular(()=>{let e=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),e.style.pointerEvents="none",e.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}},wd=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new ye;_attachments=new ye;_detachments=new ye;_positionStrategy;_scrollStrategy;_locationChanges=yt.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new ye;_outsidePointerEvents=new ye;_renders=new ye;_afterRenderRef;_afterNextRenderRef;constructor(e,t,n,r,i,o,s,a,l,u=!1,d,h){this._portalOutlet=e,this._host=t,this._pane=n,this._config=r,this._ngZone=i,this._keyboardDispatcher=o,this._document=s,this._location=a,this._outsideClickDispatcher=l,this._animationsDisabled=u,this._injector=d,this._renderer=h,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy,this._afterRenderRef=KT(()=>Mm(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let t=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=ko(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof t?.onDestroy=="function"&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){let e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,e&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config=F(F({},this._config),e),this._updateElementSize()}setDirection(e){this._config=Ye(F({},this._config),{direction:e}),this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){let e=this._config.direction;return e?typeof e=="string"?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let e=this._pane.style;e.width=gt(this._config.width),e.height=gt(this._config.height),e.minWidth=gt(this._config.minWidth),e.minHeight=gt(this._config.minHeight),e.maxWidth=gt(this._config.maxWidth),e.maxHeight=gt(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new iL(this._document,this._renderer,this._ngZone,t=>{this._backdropClick.next(t)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(e))}):this._backdropRef.element.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(e,t,n){let r=I0(t||[]).filter(i=>!!i);r.length&&(n?e.classList.add(...r):e.classList.remove(...r))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(pi(_a(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){let e=this._scrollStrategy;e?.disable(),e?.detach?.()}},bg="cdk-overlay-connected-position-bounding-box",oL=/([A-Za-z%]+)$/,sL=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed;_boundingBox;_lastPosition;_lastScrollVisibility;_positionChanges=new ye;_resizeSubscription=yt.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(e,t,n,r,i){this._viewportRuler=t,this._document=n,this._platform=r,this._overlayContainer=i,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add(bg),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._originRect,t=this._overlayRect,n=this._viewportRect,r=this._containerRect,i=[],o;for(let s of this._preferredPositions){let a=this._getOriginPoint(e,r,s),l=this._getOverlayPoint(a,t,s),u=this._getOverlayFit(l,t,n,s);if(u.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(s,a);return}if(this._canFitWithFlexibleDimensions(u,l,n)){i.push({position:s,origin:a,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(a,s)});continue}(!o||o.overlayFit.visibleArea<u.visibleArea)&&(o={overlayFit:u,overlayPoint:l,originPoint:a,position:s,overlayRect:t})}if(i.length){let s=null,a=-1;for(let l of i){let u=l.boundingBoxRect.width*l.boundingBoxRect.height*(l.position.weight||1);u>a&&(a=u,s=l)}this._isPushed=!1,this._applyPosition(s.position,s.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(o.position,o.originPoint);return}this._applyPosition(o.position,o.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&Er(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(bg),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let t=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,t)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,e.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,t,n){let r;if(n.originX=="center")r=e.left+e.width/2;else{let o=this._isRtl()?e.right:e.left,s=this._isRtl()?e.left:e.right;r=n.originX=="start"?o:s}t.left<0&&(r-=t.left);let i;return n.originY=="center"?i=e.top+e.height/2:i=n.originY=="top"?e.top:e.bottom,t.top<0&&(i-=t.top),{x:r,y:i}}_getOverlayPoint(e,t,n){let r;n.overlayX=="center"?r=-t.width/2:n.overlayX==="start"?r=this._isRtl()?-t.width:0:r=this._isRtl()?0:-t.width;let i;return n.overlayY=="center"?i=-t.height/2:i=n.overlayY=="top"?0:-t.height,{x:e.x+r,y:e.y+i}}_getOverlayFit(e,t,n,r){let i=Eg(t),{x:o,y:s}=e,a=this._getOffset(r,"x"),l=this._getOffset(r,"y");a&&(o+=a),l&&(s+=l);let u=0-o,d=o+i.width-n.width,h=0-s,v=s+i.height-n.height,m=this._subtractOverflows(i.width,u,d),w=this._subtractOverflows(i.height,h,v),C=m*w;return{visibleArea:C,isCompletelyWithinViewport:i.width*i.height===C,fitsInViewportVertically:w===i.height,fitsInViewportHorizontally:m==i.width}}_canFitWithFlexibleDimensions(e,t,n){if(this._hasFlexibleDimensions){let r=n.bottom-t.y,i=n.right-t.x,o=wg(this._overlayRef.getConfig().minHeight),s=wg(this._overlayRef.getConfig().minWidth),a=e.fitsInViewportVertically||o!=null&&o<=r,l=e.fitsInViewportHorizontally||s!=null&&s<=i;return a&&l}return!1}_pushOverlayOnScreen(e,t,n){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let r=Eg(t),i=this._viewportRect,o=Math.max(e.x+r.width-i.width,0),s=Math.max(e.y+r.height-i.height,0),a=Math.max(i.top-n.top-e.y,0),l=Math.max(i.left-n.left-e.x,0),u=0,d=0;return r.width<=i.width?u=l||-o:u=e.x<this._viewportMargin?i.left-n.left-e.x:0,r.height<=i.height?d=a||-s:d=e.y<this._viewportMargin?i.top-n.top-e.y:0,this._previousPushAmount={x:u,y:d},{x:e.x+u,y:e.y+d}}_applyPosition(e,t){if(this._setTransformOrigin(e),this._setOverlayElementStyles(t,e),this._setBoundingBoxStyles(t,e),e.panelClass&&this._addPanelClasses(e.panelClass),this._positionChanges.observers.length){let n=this._getScrollVisibility();if(e!==this._lastPosition||!this._lastScrollVisibility||!aL(this._lastScrollVisibility,n)){let r=new tL(e,n);this._positionChanges.next(r)}this._lastScrollVisibility=n}this._lastPosition=e,this._isInitialRender=!1}_setTransformOrigin(e){if(!this._transformOriginSelector)return;let t=this._boundingBox.querySelectorAll(this._transformOriginSelector),n,r=e.overlayY;e.overlayX==="center"?n="center":this._isRtl()?n=e.overlayX==="start"?"right":"left":n=e.overlayX==="start"?"left":"right";for(let i=0;i<t.length;i++)t[i].style.transformOrigin=`${n} ${r}`}_calculateBoundingBoxRect(e,t){let n=this._viewportRect,r=this._isRtl(),i,o,s;if(t.overlayY==="top")o=e.y,i=n.height-o+this._viewportMargin;else if(t.overlayY==="bottom")s=n.height-e.y+this._viewportMargin*2,i=n.height-s+this._viewportMargin;else{let v=Math.min(n.bottom-e.y+n.top,e.y),m=this._lastBoundingBoxSize.height;i=v*2,o=e.y-v,i>m&&!this._isInitialRender&&!this._growAfterOpen&&(o=e.y-m/2)}let a=t.overlayX==="start"&&!r||t.overlayX==="end"&&r,l=t.overlayX==="end"&&!r||t.overlayX==="start"&&r,u,d,h;if(l)h=n.width-e.x+this._viewportMargin*2,u=e.x-this._viewportMargin;else if(a)d=e.x,u=n.right-e.x;else{let v=Math.min(n.right-e.x+n.left,e.x),m=this._lastBoundingBoxSize.width;u=v*2,d=e.x-v,u>m&&!this._isInitialRender&&!this._growAfterOpen&&(d=e.x-m/2)}return{top:o,left:d,bottom:s,right:h,width:u,height:i}}_setBoundingBoxStyles(e,t){let n=this._calculateBoundingBoxRect(e,t);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));let r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{let i=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;r.height=gt(n.height),r.top=gt(n.top),r.bottom=gt(n.bottom),r.width=gt(n.width),r.left=gt(n.left),r.right=gt(n.right),t.overlayX==="center"?r.alignItems="center":r.alignItems=t.overlayX==="end"?"flex-end":"flex-start",t.overlayY==="center"?r.justifyContent="center":r.justifyContent=t.overlayY==="bottom"?"flex-end":"flex-start",i&&(r.maxHeight=gt(i)),o&&(r.maxWidth=gt(o))}this._lastBoundingBoxSize=n,Er(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Er(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Er(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,t){let n={},r=this._hasExactPosition(),i=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(r){let u=this._viewportRuler.getViewportScrollPosition();Er(n,this._getExactOverlayY(t,e,u)),Er(n,this._getExactOverlayX(t,e,u))}else n.position="static";let s="",a=this._getOffset(t,"x"),l=this._getOffset(t,"y");a&&(s+=`translateX(${a}px) `),l&&(s+=`translateY(${l}px)`),n.transform=s.trim(),o.maxHeight&&(r?n.maxHeight=gt(o.maxHeight):i&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=gt(o.maxWidth):i&&(n.maxWidth="")),Er(this._pane.style,n)}_getExactOverlayY(e,t,n){let r={top:"",bottom:""},i=this._getOverlayPoint(t,this._overlayRect,e);if(this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n)),e.overlayY==="bottom"){let o=this._document.documentElement.clientHeight;r.bottom=`${o-(i.y+this._overlayRect.height)}px`}else r.top=gt(i.y);return r}_getExactOverlayX(e,t,n){let r={left:"",right:""},i=this._getOverlayPoint(t,this._overlayRect,e);this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n));let o;if(this._isRtl()?o=e.overlayX==="end"?"left":"right":o=e.overlayX==="end"?"right":"left",o==="right"){let s=this._document.documentElement.clientWidth;r.right=`${s-(i.x+this._overlayRect.width)}px`}else r.left=gt(i.x);return r}_getScrollVisibility(){let e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:vg(e,n),isOriginOutsideView:Su(e,n),isOverlayClipped:vg(t,n),isOverlayOutsideView:Su(t,n)}}_subtractOverflows(e,...t){return t.reduce((n,r)=>n-Math.max(r,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+e-this._viewportMargin,bottom:n.top+t-this._viewportMargin,width:e-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,t){return t==="x"?e.offsetX==null?this._offsetX:e.offsetX:e.offsetY==null?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&I0(e).forEach(t=>{t!==""&&this._appliedPanelClasses.indexOf(t)===-1&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){let e=this._origin;if(e instanceof Vt)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let t=e.width||0,n=e.height||0;return{top:e.y,bottom:e.y+n,left:e.x,right:e.x+t,height:n,width:t}}};function Er(e,t){for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function wg(e){if(typeof e!="number"&&e!=null){let[t,n]=e.split(oL);return!n||n==="px"?parseFloat(t):null}return e||null}function Eg(e){return{top:Math.floor(e.top),right:Math.floor(e.right),bottom:Math.floor(e.bottom),left:Math.floor(e.left),width:Math.floor(e.width),height:Math.floor(e.height)}}function aL(e,t){return e===t?!0:e.isOriginClipped===t.isOriginClipped&&e.isOriginOutsideView===t.isOriginOutsideView&&e.isOverlayClipped===t.isOverlayClipped&&e.isOverlayOutsideView===t.isOverlayOutsideView}var xg="cdk-global-overlay-wrapper",lL=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(e){let t=e.getConfig();this._overlayRef=e,this._width&&!t.width&&e.updateSize({width:this._width}),this._height&&!t.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(xg),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:r,height:i,maxWidth:o,maxHeight:s}=n,a=(r==="100%"||r==="100vw")&&(!o||o==="100%"||o==="100vw"),l=(i==="100%"||i==="100vh")&&(!s||s==="100%"||s==="100vh"),u=this._xPosition,d=this._xOffset,h=this._overlayRef.getConfig().direction==="rtl",v="",m="",w="";a?w="flex-start":u==="center"?(w="center",h?m=d:v=d):h?u==="left"||u==="end"?(w="flex-end",v=d):(u==="right"||u==="start")&&(w="flex-start",m=d):u==="left"||u==="start"?(w="flex-start",v=d):(u==="right"||u==="end")&&(w="flex-end",m=d),e.position=this._cssPosition,e.marginLeft=a?"0":v,e.marginTop=l?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=a?"0":m,t.justifyContent=w,t.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,n=t.style;t.classList.remove(xg),n.justifyContent=n.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},cL=(()=>{class e{_viewportRuler=P(gd);_document=P(et);_platform=P(Xn);_overlayContainer=P(bd);constructor(){}global(){return new lL}flexibleConnectedTo(n){return new sL(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),$0=(()=>{class e{scrollStrategies=P(eL);_overlayContainer=P(bd);_positionBuilder=P(cL);_keyboardDispatcher=P(nL);_injector=P(kt);_ngZone=P(Ze);_document=P(et);_directionality=P(oa);_location=P(ey);_outsideClickDispatcher=P(rL);_animationsModuleType=P(vx,{optional:!0});_idGenerator=P(C0);_renderer=P(xn).createRenderer(null,null);_appRef;_styleLoader=P(rl);constructor(){}create(n){this._styleLoader.load(H0);let r=this._createHostElement(),i=this._createPaneElement(r),o=this._createPortalOutlet(i),s=new B0(n);return s.direction=s.direction||this._directionality.value,new wd(o,r,i,s,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get($n),this._renderer)}position(){return this._positionBuilder}_createPaneElement(n){let r=this._document.createElement("div");return r.id=this._idGenerator.getId("cdk-overlay-"),r.classList.add("cdk-overlay-pane"),n.appendChild(r),r}_createHostElement(){let n=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalOutlet(n){return this._appRef||(this._appRef=this._injector.get(pr)),new DA(n,null,this._appRef,this._injector,this._document)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function uL(e,t){}var la=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;componentFactoryResolver;providers;container;templateContext},hL=(()=>{class e extends yd{_elementRef=P(Vt);_focusTrapFactory=P(YA);_config;_interactivityChecker=P(j0);_ngZone=P(Ze);_overlayRef=P(wd);_focusMonitor=P(MA);_renderer=P(yv);_platform=P(Xn);_document=P(et,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=P(Ua);_injector=P(kt);_isDestroyed=!1;constructor(){super(),this._config=P(la,{optional:!0})||new la,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(n){this._ariaLabelledByQueue.push(n),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(n){let r=this._ariaLabelledByQueue.indexOf(n);r>-1&&(this._ariaLabelledByQueue.splice(r,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachComponentPortal(n);return this._contentAttached(),r}attachTemplatePortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachTemplatePortal(n);return this._contentAttached(),r}attachDomPortal=n=>{this._portalOutlet.hasAttached();let r=this._portalOutlet.attachDomPortal(n);return this._contentAttached(),r};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(n,r){this._interactivityChecker.isFocusable(n)||(n.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let i=()=>{o(),s(),n.removeAttribute("tabindex")},o=this._renderer.listen(n,"blur",i),s=this._renderer.listen(n,"mousedown",i)})),n.focus(r)}_focusByCssSelector(n,r){let i=this._elementRef.nativeElement.querySelector(n);i&&this._forceFocus(i,r)}_trapFocus(n){this._isDestroyed||ko(()=>{let r=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||r.focus(n);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(n)||this._focusDialogContainer(n);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',n);break;default:this._focusByCssSelector(this._config.autoFocus,n);break}},{injector:this._injector})}_restoreFocus(){let n=this._config.restoreFocus,r=null;if(typeof n=="string"?r=this._document.querySelector(n):typeof n=="boolean"?r=n?this._elementFocusedBeforeDialogWasOpened:null:n&&(r=n),this._config.restoreFocus&&r&&typeof r.focus=="function"){let i=Wl(),o=this._elementRef.nativeElement;(!i||i===this._document.body||i===o||o.contains(i))&&(this._focusMonitor?(this._focusMonitor.focusVia(r,this._closeInteractionType),this._closeInteractionType=null):r.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(n){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus(n)}_containsFocus(){let n=this._elementRef.nativeElement,r=Wl();return n===r||n.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Wl()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=At({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(n,r){if(n&1&&Zs(pg,7),n&2){let i;Ys(i=Ks())&&(r._portalOutlet=i.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(n,r){n&2&&ja("id",r._config.id||null)("role",r._config.role)("aria-modal",r._config.ariaModal)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null)},features:[Ni],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(n,r){n&1&&lt(0,uL,0,0,"ng-template",0)},dependencies:[pg],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
42
+ `],encapsulation:2})}return e})(),Ss=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new ye;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(e,t){this.overlayRef=e,this.config=t,this.disableClose=t.disableClose,this.backdropClick=e.backdropClick(),this.keydownEvents=e.keydownEvents(),this.outsidePointerEvents=e.outsidePointerEvents(),this.id=t.id,this.keydownEvents.subscribe(n=>{n.keyCode===27&&!this.disableClose&&!KA(n)&&(n.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=e.detachments().subscribe(()=>{t.closeOnOverlayDetachments!==!1&&this.close()})}close(e,t){if(this.containerInstance){let n=this.closed;this.containerInstance._closeInteractionType=t?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),n.next(e),n.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(e="",t=""){return this.overlayRef.updateSize({width:e,height:t}),this}addPanelClass(e){return this.overlayRef.addPanelClass(e),this}removePanelClass(e){return this.overlayRef.removePanelClass(e),this}},dL=new Ce("DialogScrollStrategy",{providedIn:"root",factory:()=>{let e=P($0);return()=>e.scrollStrategies.block()}}),z0=new Ce("DialogData"),fL=new Ce("DefaultDialogConfig"),pL=(()=>{class e{_overlay=P($0);_injector=P(kt);_defaultOptions=P(fL,{optional:!0});_parentDialog=P(e,{optional:!0,skipSelf:!0});_overlayContainer=P(bd);_idGenerator=P(C0);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new ye;_afterOpenedAtThisLevel=new ye;_ariaHiddenElements=new Map;_scrollStrategy=P(dL);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=e1(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(d_(void 0)));constructor(){}open(n,r){let i=this._defaultOptions||new la;r=F(F({},i),r),r.id=r.id||this._idGenerator.getId("cdk-dialog-"),r.id&&this.getDialogById(r.id);let o=this._getOverlayConfig(r),s=this._overlay.create(o),a=new Ss(s,r),l=this._attachContainer(s,a,r);return a.containerInstance=l,this._attachDialogContent(n,a,l,r),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){Xl(this.openDialogs,n=>n.close())}getDialogById(n){return this.openDialogs.find(r=>r.id===n)}ngOnDestroy(){Xl(this._openDialogsAtThisLevel,n=>{n.config.closeOnDestroy===!1&&this._removeOpenDialog(n,!1)}),Xl(this._openDialogsAtThisLevel,n=>n.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(n){let r=new B0({positionStrategy:n.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:n.scrollStrategy||this._scrollStrategy(),panelClass:n.panelClass,hasBackdrop:n.hasBackdrop,direction:n.direction,minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight,width:n.width,height:n.height,disposeOnNavigation:n.closeOnNavigation});return n.backdropClass&&(r.backdropClass=n.backdropClass),r}_attachContainer(n,r,i){let o=i.injector||i.viewContainerRef?.injector,s=[{provide:la,useValue:i},{provide:Ss,useValue:r},{provide:wd,useValue:n}],a;i.container?typeof i.container=="function"?a=i.container:(a=i.container.type,s.push(...i.container.providers(i))):a=hL;let l=new xu(a,i.viewContainerRef,kt.create({parent:o||this._injector,providers:s}));return n.attach(l).instance}_attachDialogContent(n,r,i,o){if(n instanceof go){let s=this._createInjector(o,r,i,void 0),a={$implicit:o.data,dialogRef:r};o.templateContext&&(a=F(F({},a),typeof o.templateContext=="function"?o.templateContext():o.templateContext)),i.attachTemplatePortal(new L0(n,null,a,s))}else{let s=this._createInjector(o,r,i,this._injector),a=i.attachComponentPortal(new xu(n,o.viewContainerRef,s));r.componentRef=a,r.componentInstance=a.instance}}_createInjector(n,r,i,o){let s=n.injector||n.viewContainerRef?.injector,a=[{provide:z0,useValue:n.data},{provide:Ss,useValue:r}];return n.providers&&(typeof n.providers=="function"?a.push(...n.providers(r,n,i)):a.push(...n.providers)),n.direction&&(!s||!s.get(oa,null,{optional:!0}))&&a.push({provide:oa,useValue:{value:n.direction,change:Uu()}}),kt.create({parent:s||o,providers:a})}_removeOpenDialog(n,r){let i=this.openDialogs.indexOf(n);i>-1&&(this.openDialogs.splice(i,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((o,s)=>{o?s.setAttribute("aria-hidden",o):s.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),r&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let n=this._overlayContainer.getContainerElement();if(n.parentElement){let r=n.parentElement.children;for(let i=r.length-1;i>-1;i--){let o=r[i];o!==n&&o.nodeName!=="SCRIPT"&&o.nodeName!=="STYLE"&&!o.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let n=this._parentDialog;return n?n._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_e({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Xl(e,t){let n=e.length;for(;n--;)t(e[n])}var gL=b_;function _L(e){return!!e[gL]}var mL=Symbol("__destroy"),q0=Symbol("__decoratorApplied");function G0(e){return typeof e=="string"?Symbol(`__destroy__${e}`):mL}function vL(e){e.prototype[q0]=!0}function W0(e,t){e[t]||(e[t]=new ye)}function Z0(e,t){e[t]&&(e[t].next(),e[t].complete(),e[t]=null)}function Y0(e){e instanceof yt&&e.unsubscribe()}function yL(e){Array.isArray(e)&&e.forEach(Y0)}function K0(e,t){return function(){if(e&&e.call(this),Z0(this,G0()),t.arrayName&&yL(this[t.arrayName]),t.checkProperties)for(let n in this)t.blackList?.includes(n)||Y0(this[n])}}function bL(e,t){e.prototype.ngOnDestroy=K0(e.prototype.ngOnDestroy,t)}function wL(e,t){let n=e.\u0275pipe;n.onDestroy=K0(n.onDestroy,t)}function EL(e={}){return t=>{_L(t)?wL(t,e):bL(t,e),vL(t)}}var Sg=7,Cg=Symbol("CheckerHasBeenSet");function xL(e,t){e[Cg]||SL()||(Ig(()=>pa(Promise.resolve()).pipe(io(()=>{let n;try{n=ux(e)}catch{n=null}let r=n?.lView;if(r==null)return Vu;let i=r[Sg]||(r[Sg]=[]),o=new ye;return i.push(function(){Ig(()=>{o.next(),o.complete()})}),o}),io(()=>Promise.resolve())).subscribe(()=>{(t.observed??t.observers.length>0)&&console.warn(CL(e))})),e[Cg]=!0)}function SL(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"}function Ig(e){let t=oo.Zone;return t&&typeof t.root?.run=="function"?t.root.run(e):e()}function CL(e){return`
43
+ The ${e.constructor.name} still has subscriptions that haven't been unsubscribed.
44
44
  This may happen if the class extends another class decorated with @UntilDestroy().
45
45
  The child class implements its own ngOnDestroy() method but doesn't call super.ngOnDestroy().
46
46
  Let's look at the following example:
@@ -76,5 +76,5 @@ Url: ${Fs(t)}`),!0)}function sR(t,e){return t.type||!e||!e.length?!1:uR(t).some(
76
76
  super.ngOnDestroy();
77
77
  }
78
78
  }
79
- `}var Kc=!1;function Yk(t,e,n){let r=t[e];if(Kc&&typeof r!="function")throw new Error(`${t.constructor.name} is using untilDestroyed but doesn't implement ${e}`);Py(t,n),t[e]=function(){r.apply(this,arguments),ky(this,n),t[e]=r}}function Kk(t,e){return n=>{let r=Ny(e);typeof e=="string"?Yk(t,e,r):(Kc&&Xk(t),Py(t,r));let i=t[r];return Kc&&Gk(t,i),n.pipe(si(i))}}function Xk(t){let e=Object.getPrototypeOf(t);if(!(Ry in e))throw new Error("untilDestroyed operator cannot be used inside directives or components or providers that are not decorated with UntilDestroy decorator")}var Jk=class Xc{engagementTrigger;isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";ngOnInit(){this.engagementTrigger=this.triggerContext?.triggerData}static \u0275fac=function(e){return new(e||Xc)};static \u0275cmp=Re({type:Xc,selectors:[["cooee-base-video"]],inputs:{triggerContext:"triggerContext"},decls:0,vars:0,template:function(e,n){},encapsulation:2})},Nl=en(uo());function Qk(){return window.Shopify?.routes?.root??"/"}var tA=en(M0()),eA=(0,tA.default)(fetch),Rp=class{static async getAjaxItem(t){let e=this.getItemSlug(t);if(!e)return;let n,r=Qk()+`products/${e}.js`;try{n=await(await eA(r)).json()}catch(i){Ve.error(`Failed to fetch ${r}`,i);let o=Fv.getInstance();i instanceof Response?o.captureMessage(`Shopify product fetch failed ${i.status}`,"error",{mID:t.mID,path:r}):o.captureException(i,{mID:t.mID,path:r});return}if(!n){Ve.error("Item not found after AJAX call for:",t.mID);return}return n}static getItemSlug(t){if(t.link)try{let e=new URL(t.link).pathname.match(/\/products\/([^/]+?)(?:\.html)?$/);return e?e[1]:void 0}catch{return}}},nA=t=>({active:t}),rA=(t,e)=>e.id;function iA(t,e){if(t&1&&Bt(0,"img",9),t&2){let n=e.$implicit,r=it(2);Pt("src",n,rn)("alt",r.selectedItem.name)}}function oA(t,e){if(t&1&&$e(0,iA,1,2,"img",9,Ei),t&2){let n=it();ze(n.ajaxItem.images)}}function sA(t,e){if(t&1&&Bt(0,"img",9),t&2){let n=it();Pt("src",n.selectedItem.imageURL,rn)("alt",n.selectedItem.name)}}function aA(t,e){if(t&1&&(Bt(0,"span",12),Ue(1,"cooeeCurrency"),Ue(2,"safeHtml")),t&2){let n=it();Pt("innerHTML",Qe(2,3,Qe(1,1,(n.selectedVariant==null?null:n.selectedVariant.price)/100)),Ur)}}function lA(t,e){if(t&1&&(Bt(0,"span",12),Ue(1,"cooeeCurrency"),Ue(2,"safeHtml")),t&2){let n=it();Pt("innerHTML",Qe(2,3,Qe(1,1,n.selectedItem.price)),Ur)}}function cA(t,e){if(t&1){let n=qe();Q(0,"a",18),ee("click",function(r){let i=ue(n).$implicit;return it(2).changeItem(i),r.stopPropagation(),he(r.preventDefault())}),Bt(1,"img",19),tt()}if(t&2){let n=e.$implicit,r=it(2);Y(),Pt("src",n.imageURL,rn)("alt",n.name)("ngClass",W_(3,nA,n.mID===(r.ajaxItem==null?null:r.ajaxItem.id)+""))}}function uA(t,e){if(t&1&&(Q(0,"span",16),ne(1,"Selected Product"),tt(),Q(2,"div",8),$e(3,cA,2,5,"a",17,Ei),tt()),t&2){let n=it();Y(3),ze(n.items)}}function hA(t,e){if(t&1){let n=qe();Q(0,"div",23),ee("click",function(){let r=ue(n).$implicit,i=it(2);return he(i.selectedVariant=r)})("keydown",function(){let r=ue(n).$implicit,i=it(2);return he(i.selectedVariant=r)}),Q(1,"span",24),ne(2),tt()()}if(t&2){let n=e.$implicit,r=it(2);wa("lc-selected-variant",(r.selectedVariant==null?null:r.selectedVariant.id)===n.id),Y(2),Ea(n.title)}}function fA(t,e){if(t&1&&(Q(0,"span",20),ne(1,"Select Variant"),tt(),Q(2,"div",21),$e(3,hA,3,3,"div",22,rA),tt()),t&2){let n=it();Y(3),ze(n.availableVariants)}}function dA(t,e){if(t&1&&(Q(0,"div",25),ne(1,"Description"),tt(),Bt(2,"div",26),Ue(3,"safeHtml")),t&2){let n=it();Y(2),Pt("innerHTML",Qe(3,1,n.ajaxItem==null?null:n.ajaxItem.description),Ur)}}function pA(t,e){t&1&&ne(0," Open Cart ")}function gA(t,e){t&1&&ne(0," Add To Cart ")}var mA=class Jc{constructor(e){this.cd=e}selectedItem;items;closeModel=new Xt;performCTA=new Xt;atcClicked=!1;selectedVariant=null;availableVariants=[];ajaxItem;ClickActionType=Nl.ClickActionType;async ngOnInit(){this.ajaxItem=await Rp.getAjaxItem(this.selectedItem),this.processVariants(),this.cd.markForCheck()}closeDialog(){this.closeModel.emit()}clickAddToCart(e){e.vID=this.selectedVariant?.id,e.vName=this.selectedVariant?.public_title,this.performCTA.emit({item:e,cta:this.atcClicked?Nl.ClickActionType.OPEN_CART:Nl.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}async changeItem(e){this.selectedItem=e,this.ajaxItem=await Rp.getAjaxItem(this.selectedItem),this.processVariants(),this.cd.markForCheck()}processVariants(){this.availableVariants=this.ajaxItem?.variants??[],this.selectedVariant=this.availableVariants[0]}static \u0275fac=function(e){return new(e||Jc)(Ee(So))};static \u0275cmp=Re({type:Jc,selectors:[["cooee-product-modal"]],inputs:{selectedItem:"selectedItem",items:"items"},outputs:{closeModel:"closeModel",performCTA:"performCTA"},decls:26,vars:7,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-card-footer"],[1,"lc-cta-button",3,"click"],[1,"lc-more-info-button",3,"click"],[1,"lc-selected-product-title"],["href","#"],["href","#",3,"click"],[1,"product-selector",3,"src","alt","ngClass"],[1,"lc-selected-variant-title"],[1,"lc-variant-list"],["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(e,n){e&1&&(Q(0,"div",0)(1,"div",1)(2,"div",2),ne(3,"Shop Now"),tt(),Q(4,"button",3),ee("click",function(){return n.closeDialog()}),ar(),Q(5,"svg",4),Bt(6,"path",5)(7,"path",6),tt()()(),ws(),Q(8,"div",7)(9,"div",8),se(10,oA,2,0)(11,sA,1,2,"img",9),tt(),Q(12,"div",10)(13,"div",11),ne(14),tt(),se(15,aA,3,5,"span",12)(16,lA,3,5,"span",12)(17,uA,5,0)(18,fA,5,0)(19,dA,4,3),tt()(),Q(20,"div",13)(21,"button",14),ee("click",function(){return n.clickAddToCart(n.selectedItem)}),se(22,pA,1,0)(23,gA,1,0),tt(),Q(24,"button",15),ee("click",function(){return n.performCTA.emit({item:n.selectedItem,cta:n.ClickActionType.GO_TO_PRODUCT})}),ne(25," More Info "),tt()()()),e&2&&(Y(10),te(!(n.ajaxItem==null||n.ajaxItem.images==null)&&n.ajaxItem.images.length?10:11),Y(4),Ea(n.selectedItem.name),Y(),te(n.selectedVariant!=null&&n.selectedVariant.price?15:16),Y(2),te(n.items.length>1?17:-1),Y(),te(n.availableVariants[0]!=null&&n.availableVariants[0].title!=="Default Title"?18:-1),Y(),te(n.ajaxItem!=null&&n.ajaxItem.description?19:-1),Y(3),te(n.atcClicked?22:23))},dependencies:[Ra,Da,xa],styles:["[_nghost-%COMP%]{display:block;background:#fff}.lc-card-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%;overflow:auto}.lc-card-header[_ngcontent-%COMP%]{display:var(--header-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;color:#000}.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-image-strip[_ngcontent-%COMP%] .product-selector[_ngcontent-%COMP%]{height:100px;flex-shrink:0;padding:2px}.lc-image-strip[_ngcontent-%COMP%] .product-selector.active[_ngcontent-%COMP%]{border:red solid 1px}.lc-item-name[_ngcontent-%COMP%]{font-size:20px;font-weight:600;line-height:normal;color:#000}.lc-item-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500;color:#000}.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%]{border:1px solid black;color:#000}.lc-description-title[_ngcontent-%COMP%], .lc-selected-product-title[_ngcontent-%COMP%], .lc-selected-variant-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;margin-top:8px;line-height:normal;color:#000}.lc-description[_ngcontent-%COMP%]{line-height:normal;color:#000}.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:#fff;color:#000}"]})},_A=class Qc{width;static \u0275fac=function(e){return new(e||Qc)};static \u0275cmp=Re({type:Qc,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(e,n){e&1&&(Q(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),Bt(4,"div"),tt()()()()),e&2&&(Y(3),ba("width",n.width,"%"))},encapsulation:2})},Np=en(uo());function vA(t,e){t&1&&ne(0," Open Cart ")}function yA(t,e){t&1&&ne(0," Add To Cart ")}var bA=class tu{item;performCTA=new Xt;atcClicked=!1;clickAddToCart(e){e.stopPropagation(),this.performCTA.emit({item:this.item,cta:this.atcClicked?Np.ClickActionType.OPEN_CART:Np.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}static \u0275fac=function(e){return new(e||tu)};static \u0275cmp=Re({type:tu,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(e,n){e&1&&(Q(0,"div",0)(1,"div",1),Bt(2,"img",2),Q(3,"div",3)(4,"div",4),ne(5),tt(),Bt(6,"div",5),Ue(7,"cooeeCurrency"),Ue(8,"safeHtml"),tt()(),Q(9,"button",6),ee("click",function(r){return n.clickAddToCart(r)}),se(10,vA,1,0)(11,yA,1,0),tt()()),e&2&&(Y(2),xi("alt",n.item.name),Pt("src",n.item.imageURL,rn),Y(3),On(" ",n.item.name," "),Y(),Pt("innerHTML",Qe(8,9,Qe(7,7,n.item.price)),Ur),Y(3),wa("atc-clicked",n.atcClicked),Y(),te(n.atcClicked?10:11))},dependencies:[Da,Ra],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;color:#000}.lc-item-price[_ngcontent-%COMP%]{font-size:16px;line-height:normal;color:#000}.lc-cta-button[_ngcontent-%COMP%]{padding:12px 8px;border:none;border-radius:8px;width:100%;background:#000;text-align:center;font-weight:500;cursor:pointer;color:#fff;font-size:16px}.lc-cta-button.atc-clicked[_ngcontent-%COMP%]{background:#000}"]})},wA=["swiperContainer"],EA=["videoEl"],xA=(t,e)=>e.url,SA=(t,e)=>e.mID;function CA(t,e){if(t&1&&Bt(0,"source",14),t&2){let n=e.$implicit;xi("type",n.mimeType),Pt("src",n.url,rn)}}function IA(t,e){t&1&&oh(0)}function TA(t,e){if(t&1){let n=qe();Bt(0,"cooee-video-progress-bar",17),Q(1,"div",18)(2,"cooee-mute-toggle",19),ee("toggled",function(){ue(n);let r=it(2);return he(r.toggleMute())}),tt(),se(3,IA,1,0,"ng-container",10),tt()}if(t&2){let n=it().$index,r=ir(4),i=it(),o=ir(11);Pt("width",i.videoProgress[n]||0),Y(2),Pt("muted",i.muted)("videoEl",r),Y(),Pt("ngTemplateOutlet",o)}}function OA(t,e){if(t&1){let n=qe();Q(0,"cooee-product-card",22),ee("performCTA",function(r){ue(n);let i=it(2).$implicit,o=it();return he(o.performClickToAction(r,i))})("click",function(){let r=ue(n).$implicit,i=it(2).$implicit,o=it();return he(o.productCardClicked(r,i))}),tt()}if(t&2){let n=e.$implicit;Pt("item",n)}}function DA(t,e){if(t&1&&(Q(0,"div",15)(1,"div",20),$e(2,OA,1,1,"cooee-product-card",21,SA),tt()()),t&2){let n=it().$implicit;Y(2),ze(n.items)}}function RA(t,e){if(t&1){let n=qe();Q(0,"cooee-product-modal",23),ee("performCTA",function(r){ue(n);let i=it(2);return he(i.performClickToAction(r,i.selectedVideo))})("closeModel",function(){ue(n);let r=it(2);return he(r.productModalClosed())}),tt()}if(t&2){let n=it(2);Pt("selectedItem",n.selectedItem)("items",n.selectedVideo.items)}}function NA(t,e){if(t&1){let n=qe();Q(0,"div",6)(1,"div",11)(2,"div",12)(3,"video",13,2),ee("timeupdate",function(r){let i=ue(n).$index,o=it();return he(o.updateProgress(r,i))})("click",function(){let r=ue(n).$index,i=it();return he(i.currentIndex===r&&i.toggleMute())})("ended",function(){ue(n);let r=it();return he(r.onVideoEnded())}),$e(5,CA,1,2,"source",14,xA),tt(),se(7,TA,4,4)(8,DA,4,0,"div",15),tt(),se(9,RA,1,2,"cooee-product-modal",16),tt()()}if(t&2){let n=e.$implicit,r=e.$index,i=it();Y(3),Pt("ngClass",i.viewTemplateClassName)("autoplay",i.currentIndex===r)("muted",i.muted)("poster",n.thumbnail,rn),ya("data-video-id",n.id),Y(2),ze(n.sources),Y(2),te(i.currentIndex===r?7:-1),Y(),te(n.items!=null&&n.items.length&&i.currentIndex===r?8:-1),Y(),te(i.selectedItem&&i.currentIndex===r?9:-1)}}function PA(t,e){t&1&&oh(0)}function kA(t,e){if(t&1){let n=qe();Q(0,"button",24),ee("click",function(){ue(n);let r=it();return he(r.close())}),ar(),Q(1,"svg",25),Bt(2,"path",26)(3,"path",27),tt()()}}var _r=class extends Jk{constructor(t,e,n,r){super(),this.cdr=t,this.elementRef=e,this.dialogRef=n,this.data=r,this.videos=r.videos,this.currentIndex=r.currentIndex,this.triggerContext=r.triggerContext}videos=[];currentIndex=0;swiperContainerRef;videoElements;muted=!1;videoProgress=[];selectedItem=null;selectedVideo;swiperInstance;detailPopupTemplate;viewTemplateClassName="lc-video-only-view";onResize(){this.swiperInstance?.destroy?.(),this.initSwiper()}ngOnInit(){super.ngOnInit(),this.detailPopupTemplate=this.engagementTrigger?.content?.videoConfig?.detailPopup.template??"VIDEO_ONLY_VIEW";let t=this.elementRef.nativeElement.shadowRoot,e=pv.get().website.commonCSS;switch(Hi.injectRawCSS(e,t),Hi.injectStylesheet(oo.styleURL,t),Hi.injectSwiperCSS(t),this.detailPopupTemplate){case"PRODUCT_DETAIL_VIEW":this.selectItemForDetailView(),this.viewTemplateClassName="lc-product-detail-view";break;case"VIDEO_ONLY_VIEW":this.viewTemplateClassName="lc-video-only-view";break}}ngAfterViewInit(){Vl(this.getCurrentVideoElement(),"loadeddata").pipe(Kk(this)).subscribe(()=>{this.initSwiper()})}ngOnDestroy(){this.swiperInstance?.destroy?.()}close(t=this.videos[this.currentIndex],e=this.currentIndex){let n=this.getCurrentVideoElement();this.dialogRef.close({lastVideo:t,lastVideoIndex:e,lastVideoDuration:n?.currentTime})}performClickToAction(t,e){this.data.onCTAPerformed({cta:t.cta,item:t.item,video:e})}getCurrentVideoElement(){return this.videoElements.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.swiperInstance.slideTo(this.currentIndex+1)}productModalClosed(){this.selectedItem=null,this.selectedVideo=void 0,this.swiperInstance.enable()}pauseAll(){this.videoElements.forEach(t=>t.nativeElement.pause())}async toggleMute(){this.muted=!this.muted,this.videoElements.forEach(e=>e.nativeElement.muted=this.muted);let t=[this.muted?be.EVENT_VIDEO_MUTED:be.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(t),await Vd.set(Ld.MUTED,this.muted),this.cdr.detectChanges()}playActiveVideo(){this.pauseAll();let t=this.getCurrentVideoElement();t&&(t.currentTime=1,t.play().then(async()=>{this.muted=await Vd.get(Ld.MUTED,!1),t.muted=this.muted}))}onVideoEnded(){if(this.currentIndex<this.videos.length-1)if(this.selectedItem){let t=this.getCurrentVideoElement();t.currentTime=0,t.play()}else this.moveToNextVideo();else{let t=this.videoElements.last;if(t){let e=this.getPreviousVideoDataForEvent(),n=[be.EVENT_LAST_VIDEO_ENDED,{previous:e},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(n),t.nativeElement.currentTime=0,t.nativeElement.play()}}}updateProgress(t,e){let n=t.target;this.videoProgress[e]=n.currentTime/n.duration*100,this.cdr.detectChanges()}onSlideChange(t){let e=this.getPreviousVideoDataForEvent();this.currentIndex=t.realIndex,this.playActiveVideo(),this.detailPopupTemplate==="PRODUCT_DETAIL_VIEW"?this.selectItemForDetailView():(this.selectedItem=null,delete this.selectedVideo);let n=this.currentVideoProps(),r={previous:e,current:n},i=[be.EVENT_VIDEO_CHANGE,r,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(i)}productCardClicked(t,e){let n={videoID:e.id,videoIndex:this.currentIndex},r=[be.EVENT_MORE_ITEM_INFO_CLICKED,{current:n},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(r),this.selectedItem=t,this.selectedVideo=e,this.swiperInstance.disable()}initSwiper(){let t=this.isMobile?1:"auto",e=0;this.detailPopupTemplate==="PRODUCT_DETAIL_VIEW"&&(t="auto",e=10),this.swiperInstance=new window.Swiper(this.swiperContainerRef.nativeElement,{direction:this.isMobile?"vertical":"horizontal",effect:this.isMobile?"slide":"coverflow",slidesPerView:t,initialSlide:this.currentIndex,centeredSlides:!0,spaceBetween:e,coverflowEffect:{rotate:0,stretch:0,depth:400,modifier:1,slideShadows:!1},navigation:{nextEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-next"),prevEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-prev")}}),this.swiperInstance.on("slideChange",n=>{this.onSlideChange(n),this.cdr.detectChanges()}),this.playActiveVideo()}currentVideoProps(){return{videoID:this.videos[this.currentIndex].id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let t=this.currentVideoProps(),e=this.videoElements.find(r=>r.nativeElement.dataset.videoId===this.videos[this.currentIndex].id)?.nativeElement;t.playedTillMS=Math.ceil(e?.currentTime*1e3);let n=e?.duration*1e3;return t.playedTillPercent=+(t.playedTillMS/n).toFixed(4),t}selectItemForDetailView(){this.selectedVideo=this.videos[this.currentIndex],this.selectedItem=this.isMobile?null:this.selectedVideo?.items?.[0]??null}};Wh(_r,"\u0275fac",function(t){return new(t||_r)(Ee(So),Ee(Le),Ee(cs),Ee(Dy))}),Wh(_r,"\u0275cmp",Re({type:_r,selectors:[["cooee-video-swiper-dialog"]],viewQuery:function(t,e){if(t&1&&(ks(wA,5),ks(EA,5)),t&2){let n;As(n=Ls())&&(e.swiperContainerRef=n.first),As(n=Ls())&&(e.videoElements=n)}},hostBindings:function(t,e){t&1&&ee("resize",function(){return e.onResize()},!1,KE)},inputs:{videos:"videos",currentIndex:"currentIndex"},features:[wi],decls:12,vars:2,consts:[["swiperContainer",""],["closeButtonTemplate",""],["videoEl",""],[1,"lc-shadow-inner",3,"ngClass"],[1,"swiper-container"],[1,"swiper-wrapper"],[1,"swiper-slide"],[1,"swiper-button-prev"],[1,"swiper-button-next"],[1,"lc-desktop-controls"],[4,"ngTemplateOutlet"],[1,"lc-video-modal-row"],[1,"lc-video-container"],["playsinline","","preload","metadata",1,"lc-video-el",3,"timeupdate","click","ended","ngClass","autoplay","muted","poster"],[3,"src","type"],[1,"lc-card-container"],[3,"selectedItem","items"],[3,"width"],[1,"lc-video-controls"],[3,"toggled","muted","videoEl"],[1,"lc-card-scroll"],[3,"item"],[3,"performCTA","click","item"],[3,"performCTA","closeModel","selectedItem","items"],[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(t,e){if(t&1&&(Q(0,"div",3)(1,"div",4,0)(3,"div",5),$e(4,NA,10,8,"div",6,Ei),tt(),Bt(6,"div",7)(7,"div",8),tt(),Q(8,"div",9),se(9,PA,1,0,"ng-container",10),tt()(),se(10,kA,4,0,"ng-template",null,1,mI)),t&2){let n=ir(11);Pt("ngClass",e.viewTemplateClassName),Y(4),ze(e.videos),Y(5),Pt("ngTemplateOutlet",n)}},dependencies:[bA,mA,ay,_A,oT,xa],styles:[`:host{display:flex}.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}.lc-product-detail-view .swiper-container{align-items:center}@media (min-width: 768px){.swiper-container{width:100%;height:100%;max-width:90vw;max-height:90vh}}.swiper-wrapper{max-height:100%}.lc-product-detail-view .swiper-wrapper{align-items:center}@media (max-width: 768px){.swiper-button-prev,.swiper-button-next{display:none!important}}.swiper-slide{position:relative;display:flex;align-items:center;visibility:hidden}.lc-product-detail-view .swiper-slide{width:40vw!important;height:70vh!important}@media (min-width: 768px){.lc-product-detail-view .swiper-slide{min-width:650px!important}}@media (max-width: 768px){.lc-product-detail-view .swiper-slide{width:100%!important;height:100%!important}}@media (min-width: 768px){.lc-video-only-view .swiper-slide{width:fit-content!important}}@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{height:100%}.lc-product-detail-view video{width: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-product-detail-view .lc-video-container{height:100%;position:relative}@media (min-width: 768px){.lc-product-detail-view .lc-video-container{width:50%}}.lc-video-only-view .lc-video-container{height:100%}.lc-card-container{position:absolute;bottom:12px;z-index:10;width:100%;padding-inline:12px;box-sizing:border-box}.lc-product-detail-view .lc-card-container{display:none}@media (max-width: 768px){.lc-product-detail-view .lc-card-container{display:block}}.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}.lc-product-detail-view .lc-video-modal-row{display:flex;justify-content:center;height:100%;width:100%}.lc-video-only-view .lc-video-modal-row{display:block;height:100%}.lc-product-detail-view cooee-product-modal{--header-display: none;width:50%;flex:1}@media (max-width: 768px){.lc-product-detail-view cooee-product-modal{--header-display: flex;width:100%;height:70dvh;position:absolute;bottom:0;z-index:2147483646}}.lc-video-only-view cooee-product-modal{width:100%;height:70dvh;z-index:2147483646;bottom:0;position:absolute}
80
- `],encapsulation:3})),_r=T0([qk()],_r);var AA=["videoEl"],My=(t,e)=>e.url;function LA(t,e){if(t&1&&(Q(0,"div",1),ne(1),tt()),t&2){let n=it();Y(),On(" ",n.videoConfig.heading," ")}}function MA(t,e){if(t&1&&Bt(0,"source",7),t&2){let n=e.$implicit;xi("type",n.mimeType),Pt("src",n.url,rn)}}function VA(t,e){if(t&1){let n=qe();Q(0,"cooee-mute-toggle",12),ee("toggled",function(r){ue(n),it();let i=ir(5),o=it(2);return he(o.onMuteToggled(r,i))}),tt()}if(t&2){it();let n=ir(5);Pt("muted",n.muted)("videoEl",n)}}function jA(t,e){if(t&1&&Bt(0,"img",13),t&2){it(2);let n=ln(0);Pt("src",n.imageURL,rn)("alt",n.name)}}function FA(t,e){if(t&1&&(Q(0,"div",10),se(1,jA,1,2,"img",13),Q(2,"div",14)(3,"span",15),ne(4),tt(),Bt(5,"span",16),Ue(6,"cooeeCurrency"),Ue(7,"safeHtml"),tt()()),t&2){it();let n=ln(0),r=it(2);Y(),te(r.showImage?1:-1),Y(3),On(" ",n.name," "),Y(),Pt("innerHTML",Qe(7,5,Qe(6,3,n.price)),Ur)}}function BA(t,e){if(t&1){let n=qe();Q(0,"button",17),ee("click",function(){ue(n);let r=it().$implicit,i=ln(0),o=it(2);return he(o.addToCartClicked(r,i))}),ne(1," Add to cart "),tt()}}function UA(t,e){if(t&1){let n=qe();Si(0)(1),Q(2,"div",4)(3,"a",5),ee("click",function(r){let i=ue(n),o=i.$implicit,s=i.$index,a=ir(5),l=it(2);return he(l.onVideoTap(r,o,s,a))}),Q(4,"video",6,0),ee("mouseenter",function(){ue(n);let r=ir(5);it(2);let i=ln(3);return he(i&&r.play())})("mouseleave",function(){ue(n);let r=ir(5);it(2);let i=ln(3);return he(i&&r.pause())}),$e(6,MA,1,2,"source",7,My),tt(),Q(8,"div",8),se(9,VA,1,2,"cooee-mute-toggle",9),tt(),se(10,FA,8,7,"div",10),tt(),se(11,BA,2,0,"button",11),tt()}if(t&2){let n=e.$implicit,r=it(2),i=ln(2),o=ln(4),s=ii(n.items==null?null:n.items[0])&&r.videoConfig.footerContent==r.VideoConfigFooterContent.FIRST_ITEM;Y(4),Pt("poster",n.thumbnail,rn)("muted",!0),ya("autoplay",i||null),Y(2),ze(n.sources),Y(3),te(r.videoConfig.showMuteButton?9:-1),Y(),te(o&&s?10:-1),Y(),te(o&&s?11:-1)}}function HA(t,e){if(t&1&&(Q(0,"div",2),$e(1,UA,12,7,"div",4,Ei),tt()),t&2){let n=it();Y(),ze(n.videos)}}function $A(t,e){if(t&1&&Bt(0,"source",7),t&2){let n=e.$implicit;xi("type",n.mimeType),Pt("src",n.url,rn)}}function zA(t,e){if(t&1){let n=qe();Q(0,"div",18),ar(),Q(1,"svg",19),Bt(2,"circle",20)(3,"circle",21),tt(),ws(),Q(4,"div",22)(5,"video",23),ee("click",function(r){let i=ue(n),o=i.$implicit,s=i.$index,a=it(2);return he(a.onVideoTap(r,o,s))}),$e(6,$A,1,2,"source",7,My),tt()()()}if(t&2){let n=e.$implicit;Y(5),Pt("muted",!0),Y(),ze(n.sources)}}function qA(t,e){if(t&1&&(Q(0,"div",3),$e(1,zA,8,1,"div",18,Ei),tt()),t&2){let n=it();Y(),ze(n.videos)}}function GA(t,e){if(t&1){let n=qe();Q(0,"cooee-draggable-video-popup",25),ee("videoClicked",function(){ue(n),it();let r=ln(0),i=it();return he(i.onPopupVideoClicked(r,0))})("closeClicked",function(){ue(n);let r=it(2);return he(r.onPopupVideoClosed())}),tt()}if(t&2){it();let n=ln(0);Pt("video",n)}}function WA(t,e){if(t&1&&(Si(0),se(1,GA,1,1,"cooee-draggable-video-popup",24)),t&2){let n=it();ii(n.videos[0]),Y(),te(n.hidePopupVideo?-1:1)}}var ZA=class eu extends zv{constructor(e,n){super(),this.dialog=e,this.cdr=n}videoElements;videos;VideoConfigSource=qv;VideoConfigTemplate=Gv;VideoConfigFooterContent=Zv;VideoConfigAutoPlay=Wv;isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";hidePopupVideo;videoConfig;showImage;dialogRef=null;ngOnInit(){super.ngOnInit(),Hi.loadSwiperScript(),this.showImage=this.videoConfig.detailPopup.template==="PRODUCT_DETAIL_VIEW"}ngAfterViewInit(){this.playFirstVideo()}engagementTriggerReceived(e){this.videoConfig=e.content?.videoConfig,this.videos=this.videoConfig.videos}sendTriggerClicked(e,n){let r=new xl(be.EVENT_TRIGGER_CLICKED,{},this.triggerContext?.triggerData);r.videos=[e.id],n&&(r.items=[n]),this.sendEventToRenderer(r)}onVideoTap(e,n,r,i){e?.stopPropagation(),e?.preventDefault();let o=n.items?.[0];if(this.sendTriggerClicked(n,o),this.videoConfig.footerContent!=="FIRST_ITEM"){i&&(i.muted=!1,i.play(),this.onMuteToggled(!1,i));return}Hi.loadSwiperScript().then(()=>this.openDialog(n,r))}async performCTA(e){let n,r=this.triggerContext;if(e.cta===Wo.ClickActionType.ADD_TO_CART)n=be.EVENT_ADD_TO_CART_CLICKED;else if(e.cta===Wo.ClickActionType.GO_TO_PRODUCT)n=be.EVENT_VIEW_ITEM_CLICKED;else if(e.cta===Wo.ClickActionType.OPEN_CART)n=be.EVENT_OPEN_CART_CLICKED,r.triggerData.redirectBehaviour=xN.RedirectBehaviour.CART_DRAWER;else{Ve.warn(`Unsupported CTA type: ${e.cta}`);return}let i={at:e.cta},o={videoID:e.video.id};this.sendEvent(n,{current:o},e.video,e.item),this.executeCTAViaRenderer({clickAction:i,embeddedItem:e.item})}addToCartClicked(e,n){this.performCTA({cta:Wo.ClickActionType.ADD_TO_CART,item:n,video:e})}onPopupVideoClicked(e,n){this.hidePopupVideo=!0,this.onVideoTap(null,e,n),this.dialogRef?.closed.subscribe(()=>{this.hidePopupVideo=!1,this.cdr.detectChanges()})}onPopupVideoClosed(){this.hidePopupVideo=!0;let e=(new Date().getTime()-this.triggerContext.startTime.getTime())/1e3;this.sendEvent(be.EVENT_TRIGGER_CLOSED,{duration:e})}update(){}onMuteToggled(e,n){e||this.videoElements.forEach(r=>{r.nativeElement!==n&&(r.nativeElement.muted=!0,r.nativeElement.pause())})}playFirstVideo(){this.videoConfig.autoPlay==="ON_HOVER"&&this.isMobile&&this.videoElements.first?.nativeElement.play()}sendEvent(e,n,r,i){let o=new xl(e,n,this.engagementTrigger);r&&(o.videos=[r.id]),i&&(o.items=[i]),this.sendEventToRenderer(o)}openDialog(e,n){let r={videos:this.videos,currentIndex:n,triggerContext:this.triggerContext,onCTAPerformed:o=>this.performCTA(o)};this.dialogRef&&this.dialogRef.close(),this.dialogRef=this.dialog.open(_r,{width:"100vw",height:"100vh",data:r});let i={videoID:e.id,videoIndex:n};this.sendEvent(be.EVENT_VIDEO_DIALOG_OPENED,{current:i},e),this.dialogRef.closed.subscribe(o=>{if(!o)return;let s=o.lastVideoDuration*1e3,a={videoID:o.lastVideo.id,videoIndex:o.lastVideoIndex,playedTillMS:s,playedTillPercent:s/e.durationMS},l=new xl(be.EVENT_VIDEO_DIALOG_CLOSED,{current:a},this.triggerContext?.triggerData);l.videos=[o.lastVideo.id],this.sendEventToRenderer(l),this.dialogRef=null})}static \u0275fac=function(e){return new(e||eu)(Ee(Vk),Ee(So))};static \u0275cmp=Re({type:eu,selectors:[["cooee-shoppable-videos"]],viewQuery:function(e,n){if(e&1&&ks(AA,5),e&2){let r;As(r=Ls())&&(n.videoElements=r)}},features:[wi],decls:9,vars:5,consts:[["videoEl",""],["id","lc-heading-text",1,"lc-heading-text","lc:mb-2","lc:text-lg","lc:text-center","lc:font-bold"],[1,"lc-video-list"],[1,"lc-video-stories","lc:flex","lc:overflow-auto","lc:m-3","lc:gap-3","lc:justify-center","lc:items-center"],[1,"lc-video-card"],["href","",1,"lc-video-wrapper","lc:rounded-lg",3,"click"],["width","100%","playsinline","","loop","","preload","metadata",1,"lc:rounded-lg","lc:transition-transform","lc:duration-300",3,"mouseenter","mouseleave","poster","muted"],[3,"src","type"],[1,"lc-video-controls"],[3,"muted","videoEl"],["id","lc-single-product",1,"lc-single-product"],["id","lc-cta-button","type","button",1,"lc-cta-button","lc:rounded","lc:w-full","lc:h-auto","lc:text-center","lc:font-normal","lc:cursor-pointer","lc:bg-black","lc:z-4","lc:p-4","lc:text-xl"],[3,"toggled","muted","videoEl"],[1,"lc-item-image",3,"src","alt"],[1,"lc-item-details"],[1,"lc-item-name","lc:line-clamp-1"],[1,"lc-item-price",3,"innerHTML"],["id","lc-cta-button","type","button",1,"lc-cta-button","lc:rounded","lc:w-full","lc:h-auto","lc:text-center","lc:font-normal","lc:cursor-pointer","lc:bg-black","lc:z-4","lc:p-4","lc:text-xl",3,"click"],[1,"lc-video-story","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"],["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(e,n){if(e&1&&(Si(0)(1)(2)(3)(4),se(5,LA,2,1,"div",1)(6,HA,3,0,"div",2)(7,qA,3,0,"div",3)(8,WA,2,2)),e&2){let r=n.videoConfig.source,i=n.videoConfig.template;Y(2),ii(!n.videoConfig.autoPlay||n.videoConfig.autoPlay===n.VideoConfigAutoPlay.ON),Y(),ii(n.videoConfig.autoPlay===n.VideoConfigAutoPlay.ON_HOVER),Y(),ii(r===n.VideoConfigSource.GALLERY),Y(),te(n.videoConfig.heading?5:-1),Y(),te(i===n.VideoConfigTemplate.SIMPLE||i===n.VideoConfigTemplate.SWIPER?6:i===n.VideoConfigTemplate.STORY?7:i===n.VideoConfigTemplate.FLOATING_POPUP?8:-1)}},dependencies:[Da,KP,Ra,ay],styles:["[_nghost-%COMP%]{display:block}.lc-video-list[_ngcontent-%COMP%]{display:flex;overflow-x:auto;gap:24px;margin:8px;align-items:center;scroll-snap-type:x mandatory;scroll-behavior:smooth}@media (min-width: 768px){.lc-video-list[_ngcontent-%COMP%]{justify-content:center}}.lc-video-wrapper[_ngcontent-%COMP%]{position:relative}.lc-video-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2.5px;scroll-snap-align:center;min-width:200px;max-width:300px}.lc-video-card[_ngcontent-%COMP%] video[_ngcontent-%COMP%]:hover{scale:1.1}.lc-cta-button[_ngcontent-%COMP%]{color:#fff}.lc-video-controls[_ngcontent-%COMP%]{position:absolute;bottom:8px;z-index:10;right:8px;display:flex;gap:8px}.lc-single-product[_ngcontent-%COMP%]{display:flex;margin:.25rem 0;gap:.25rem;align-items:center}.lc-single-product[_ngcontent-%COMP%] .lc-item-image[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:.5rem}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:.25rem;font-size:14px;line-height:normal}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%] .lc-item-name[_ngcontent-%COMP%]{color:#000;font-weight:600}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%] .lc-item-price[_ngcontent-%COMP%]{color:#000}"]})};LT("CooeeWidgetSDK");(async()=>{let t=await IT(VT),e=(n,r)=>{let i=YI(n,{injector:t.injector});customElements.define(r,i)};e(EN,"cooee-sticky-atc"),e(pN,"cooee-progressbar"),e(ZA,"cooee-shoppable-videos"),jo.filters.define("default",function(n){return n??""}),jo.defaultConfig.defaultFilter="default",jo.defaultConfig.useWith=!0,jo.defaultConfig.autoTrim="slurp"})();})();
79
+ `}var Cu=!1;function IL(e,t,n){let r=e[t];if(Cu&&typeof r!="function")throw new Error(`${e.constructor.name} is using untilDestroyed but doesn't implement ${t}`);W0(e,n),e[t]=function(){r.apply(this,arguments),Z0(this,n),e[t]=r}}function TL(e,t){return n=>{let r=G0(t);typeof t=="string"?IL(e,t,r):(Cu&&OL(e),W0(e,r));let i=e[r];return Cu&&xL(e,i),n.pipe(pi(i))}}function OL(e){let t=Object.getPrototypeOf(e);if(!(q0 in t))throw new Error("untilDestroyed operator cannot be used inside directives or components or providers that are not decorated with UntilDestroy decorator")}var DL=class Iu{engagementTrigger;isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";ngOnInit(){this.engagementTrigger=this.triggerContext?.triggerData}static \u0275fac=function(t){return new(t||Iu)};static \u0275cmp=At({type:Iu,selectors:[["cooee-base-video"]],inputs:{triggerContext:"triggerContext"},decls:0,vars:0,template:function(t,n){},encapsulation:2})},Ql=bn(So()),RL=e=>({active:e}),NL=(e,t)=>t.mID;function PL(e,t){if(e&1&&He(0,"img",9),e&2){let n=t.$implicit,r=le(2);Le("src",n.url,on)("alt",r.selectedItem.name)}}function kL(e,t){if(e&1&&Wt(0,PL,1,2,"img",9,Pi),e&2){let n=le();Zt(n.selectedItem.imgs)}}function AL(e,t){if(e&1&&He(0,"img",9),e&2){let n=le();Le("src",n.selectedItem.imageURL,on)("alt",n.selectedItem.name)}}function LL(e,t){if(e&1){let n=Bt();X(0,"a",18),nt("click",function(r){let i=dt(n).$implicit;return le(2).changeItem(i),r.stopPropagation(),ft(r.preventDefault())}),He(1,"img",19),Q()}if(e&2){let n=t.$implicit,r=le(2);Z(),Le("src",n.imageURL,on)("alt",n.name)("ngClass",$v(3,RL,n.mID===r.selectedItem.mID+""))}}function ML(e,t){if(e&1&&(X(0,"span",16),rt(1,"Selected Product"),Q(),X(2,"div",8),Wt(3,LL,2,5,"a",17,Pi),Q()),e&2){let n=le();Z(3),Zt(n.items)}}function jL(e,t){if(e&1){let n=Bt();X(0,"a",23),nt("click",function(r){let i=dt(n).$implicit,o=le(2);return ft(o.changeVariant(r,i))}),X(1,"span",24),rt(2),Q()()}if(e&2){let n=t.$implicit,r=le(2);Va("lc-selected-variant",(r.selectedVariant==null?null:r.selectedVariant.mID)===n.mID),Z(2),Ba(n.name)}}function FL(e,t){if(e&1&&(X(0,"span",20),rt(1,"Select Variant"),Q(),X(2,"div",21),Wt(3,jL,3,3,"a",22,NL),Q()),e&2){let n=le();Z(3),Zt(n.selectedItem.vars)}}function VL(e,t){if(e&1&&(X(0,"div",25),rt(1,"Description"),Q(),He(2,"div",26),yn(3,"safeHtml")),e&2){let n=le();Z(2),Le("innerHTML",Pn(3,1,n.selectedItem.desc),Di)}}function BL(e,t){e&1&&rt(0," Open Cart ")}function UL(e,t){e&1&&rt(0," Add To Cart ")}var HL=class Tu{selectedItem;items;closeModel=new Qe;performCTA=new Qe;atcClicked=!1;selectedVariant=null;ClickActionType=Ql.ClickActionType;ngOnInit(){this.updateSelectedVariant()}closeDialog(){this.closeModel.emit()}clickAddToCart(t){this.performCTA.emit({item:t,cta:this.atcClicked?Ql.ClickActionType.OPEN_CART:Ql.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}async changeItem(t){this.selectedItem=t,this.updateSelectedVariant()}changeVariant(t,n){t.stopPropagation(),t.preventDefault(),this.selectedVariant=n,this.selectedItem.selectedOrFirstVariant.value=this.selectedVariant}updateSelectedVariant(){this.selectedVariant=this.selectedItem.selectedOrFirstVariant.value}static \u0275fac=function(t){return new(t||Tu)};static \u0275cmp=At({type:Tu,selectors:[["cooee-product-modal"]],inputs:{selectedItem:"selectedItem",items:"items"},outputs:{closeModel:"closeModel",performCTA:"performCTA"},decls:27,vars:11,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-card-footer"],[1,"lc-cta-button",3,"click"],[1,"lc-more-info-button",3,"click"],[1,"lc-selected-product-title"],["href","#"],["href","#",3,"click"],[1,"product-selector",3,"src","alt","ngClass"],[1,"lc-selected-variant-title"],[1,"lc-variant-list"],["href","#",1,"lc-variant",3,"lc-selected-variant"],["href","#",1,"lc-variant",3,"click"],[1,"truncate","max-w-[200px]"],[1,"lc-description-title"],[1,"lc-description",3,"innerHTML"]],template:function(t,n){t&1&&(X(0,"div",0)(1,"div",1)(2,"div",2),rt(3,"Shop Now"),Q(),X(4,"button",3),nt("click",function(){return n.closeDialog()}),fr(),X(5,"svg",4),He(6,"path",5)(7,"path",6),Q()()(),Ms(),X(8,"div",7)(9,"div",8),lt(10,kL,2,0)(11,AL,1,2,"img",9),Q(),X(12,"div",10)(13,"div",11),rt(14),Q(),He(15,"span",12),yn(16,"cooeeCurrency"),yn(17,"safeHtml"),lt(18,ML,5,0)(19,FL,5,0)(20,VL,4,3),Q()(),X(21,"div",13)(22,"button",14),nt("click",function(){return n.clickAddToCart(n.selectedItem)}),lt(23,BL,1,0)(24,UL,1,0),Q(),X(25,"button",15),nt("click",function(){return n.performCTA.emit({item:n.selectedItem,cta:n.ClickActionType.GO_TO_PRODUCT})}),rt(26," More Info "),Q()()()),t&2&&(Z(10),st(n.selectedItem.imgs!=null&&n.selectedItem.imgs.length?10:11),Z(4),Ba(n.selectedItem.name),Z(),Le("innerHTML",Pn(17,9,Pn(16,7,n.selectedVariant==null||n.selectedVariant.price==null?null:n.selectedVariant.price.d)),Di),Z(3),st(n.items.length>1?18:-1),Z(),st(n.selectedItem.vars[0]!=null&&n.selectedItem.vars[0].name!=="Default Title"?19:-1),Z(),st(n.selectedItem.desc?20:-1),Z(3),st(n.atcClicked?23:24))},dependencies:[Ya,Za,Ha],styles:["[_nghost-%COMP%]{display:block;background:#fff}.lc-card-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%;overflow:auto}.lc-card-header[_ngcontent-%COMP%]{display:var(--header-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;color:#000}.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-image-strip[_ngcontent-%COMP%] .product-selector[_ngcontent-%COMP%]{height:100px;flex-shrink:0;padding:2px}.lc-image-strip[_ngcontent-%COMP%] .product-selector.active[_ngcontent-%COMP%]{border:red solid 1px}.lc-item-name[_ngcontent-%COMP%]{font-size:20px;font-weight:600;line-height:normal;color:#000}.lc-item-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500;color:#000}.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;text-decoration:none}.lc-selected-variant[_ngcontent-%COMP%]{border:1px solid black;color:#000}.lc-description-title[_ngcontent-%COMP%], .lc-selected-product-title[_ngcontent-%COMP%], .lc-selected-variant-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;margin-top:8px;line-height:normal;color:#000}.lc-description[_ngcontent-%COMP%]{line-height:normal;color:#000}.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:#fff;color:#000}"]})},$L=class Ou{width;static \u0275fac=function(t){return new(t||Ou)};static \u0275cmp=At({type:Ou,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&&(X(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),He(4,"div"),Q()()()()),t&2&&(Z(3),Fa("width",n.width,"%"))},encapsulation:2})},Tg=bn(So());function zL(e,t){e&1&&rt(0," Open Cart ")}function qL(e,t){e&1&&rt(0," Add To Cart ")}var GL=class Du{item;performCTA=new Qe;atcClicked=!1;clickAddToCart(t){t.stopPropagation(),this.performCTA.emit({item:this.item,cta:this.atcClicked?Tg.ClickActionType.OPEN_CART:Tg.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}static \u0275fac=function(t){return new(t||Du)};static \u0275cmp=At({type:Du,selectors:[["cooee-product-card"]],inputs:{item:"item"},outputs:{performCTA:"performCTA"},decls:13,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){if(t&1){let r=Bt();X(0,"div",0)(1,"div",1),He(2,"img",2),X(3,"div",3)(4,"div",4),rt(5),Q(),vr(6),He(7,"div",5),yn(8,"cooeeCurrency"),yn(9,"safeHtml"),Q()(),X(10,"button",6),nt("click",function(i){return dt(r),ft(n.clickAddToCart(i))}),lt(11,zL,1,0)(12,qL,1,0),Q()()}if(t&2){Z(2),ki("alt",n.item.name),Le("src",n.item.imageURL,on),Z(3),Nn(" ",n.item.name," ");let r=n.item.selectedOrFirstVariant.value.price.d;Z(2),Le("innerHTML",Pn(9,9,Pn(8,7,r)),Di),Z(3),Va("atc-clicked",n.atcClicked),Z(),st(n.atcClicked?11:12)}},dependencies:[Za,Ya],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;color:#000}.lc-item-price[_ngcontent-%COMP%]{font-size:16px;line-height:normal;color:#000}.lc-cta-button[_ngcontent-%COMP%]{padding:12px 8px;border:none;border-radius:8px;width:100%;background:#000;text-align:center;font-weight:500;cursor:pointer;color:#fff;font-size:16px}.lc-cta-button.atc-clicked[_ngcontent-%COMP%]{background:#000}"]})},WL=["swiperContainer"],ZL=["videoEl"],YL=(e,t)=>t.url,KL=(e,t)=>t.mID;function JL(e,t){if(e&1&&He(0,"source",14),e&2){let n=t.$implicit;ki("type",n.mimeType),Le("src",n.url,on)}}function XL(e,t){e&1&&Ah(0)}function QL(e,t){if(e&1){let n=Bt();He(0,"cooee-video-progress-bar",17),X(1,"div",18)(2,"cooee-mute-toggle",19),nt("toggled",function(){dt(n);let r=le(2);return ft(r.toggleMute())}),Q(),lt(3,XL,1,0,"ng-container",10),Q()}if(e&2){let n=le().$index,r=ur(4),i=le(),o=ur(11);Le("width",i.videoProgress[n]||0),Z(2),Le("muted",i.muted)("videoEl",r),Z(),Le("ngTemplateOutlet",o)}}function eM(e,t){if(e&1){let n=Bt();X(0,"cooee-product-card",22),nt("performCTA",function(r){dt(n);let i=le(2).$implicit,o=le();return ft(o.performClickToAction(r,i))})("click",function(){let r=dt(n).$implicit,i=le(2).$implicit,o=le();return ft(o.productCardClicked(r,i))}),Q()}if(e&2){let n=t.$implicit;Le("item",n)}}function tM(e,t){if(e&1&&(X(0,"div",15)(1,"div",20),Wt(2,eM,1,1,"cooee-product-card",21,KL),Q()()),e&2){let n=le().$implicit;Z(2),Zt(n.items)}}function nM(e,t){if(e&1){let n=Bt();X(0,"cooee-product-modal",23),nt("performCTA",function(r){dt(n);let i=le(2);return ft(i.performClickToAction(r,i.selectedVideo))})("closeModel",function(){dt(n);let r=le(2);return ft(r.productModalClosed())}),Q()}if(e&2){let n=le(2);Le("selectedItem",n.selectedItem)("items",n.selectedVideo.items)}}function rM(e,t){if(e&1){let n=Bt();X(0,"div",6)(1,"div",11)(2,"div",12)(3,"video",13,2),nt("timeupdate",function(r){let i=dt(n).$index,o=le();return ft(o.updateProgress(r,i))})("click",function(){let r=dt(n).$index,i=le();return ft(i.currentIndex===r&&i.toggleMute())})("ended",function(){dt(n);let r=le();return ft(r.onVideoEnded())}),Wt(5,JL,1,2,"source",14,YL),Q(),lt(7,QL,4,4)(8,tM,4,0,"div",15),Q(),lt(9,nM,1,2,"cooee-product-modal",16),Q()()}if(e&2){let n=t.$implicit,r=t.$index,i=le();Z(3),Le("ngClass",i.viewTemplateClassName)("autoplay",i.currentIndex===r)("muted",i.muted)("poster",n.thumbnail,on),ja("data-video-id",n.id),Z(2),Zt(n.sources),Z(2),st(i.currentIndex===r?7:-1),Z(),st(n.items.length&&i.currentIndex===r?8:-1),Z(),st(i.selectedItem&&i.currentIndex===r?9:-1)}}function iM(e,t){e&1&&Ah(0)}function oM(e,t){if(e&1){let n=Bt();X(0,"button",24),nt("click",function(){dt(n);let r=le();return ft(r.close())}),fr(),X(1,"svg",25),He(2,"path",26)(3,"path",27),Q()()}}var Sr=class extends DL{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;videoElements;muted=!1;videoProgress=[];selectedItem=null;selectedVideo;swiperInstance;detailPopupTemplate;viewTemplateClassName="lc-video-only-view";onResize(){this.swiperInstance?.destroy?.(),this.initSwiper()}ngOnInit(){super.ngOnInit(),this.detailPopupTemplate=this.engagementTrigger?.content?.videoConfig?.detailPopup.template??"VIDEO_ONLY_VIEW";let e=this.elementRef.nativeElement.shadowRoot,t=uy.get().website.commonCSS;switch(to.injectRawCSS(t,e),to.injectStylesheet(yo.styleURL,e),to.injectSwiperCSS(e),this.detailPopupTemplate){case"PRODUCT_DETAIL_VIEW":this.selectItemForDetailView(),this.viewTemplateClassName="lc-product-detail-view";break;case"VIDEO_ONLY_VIEW":this.viewTemplateClassName="lc-video-only-view";break}}ngAfterViewInit(){oc(this.getCurrentVideoElement(),"loadeddata").pipe(TL(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.videoElements.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.swiperInstance.slideTo(this.currentIndex+1)}productModalClosed(){this.selectedItem=null,this.selectedVideo=void 0,this.swiperInstance.enable()}pauseAll(){this.videoElements.forEach(e=>e.nativeElement.pause())}async toggleMute(){this.muted=!this.muted,this.videoElements.forEach(t=>t.nativeElement.muted=this.muted);let e=[this.muted?xt.EVENT_VIDEO_MUTED:xt.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(e),await wp.set(yp.MUTED,this.muted),this.cdr.detectChanges()}playActiveVideo(){this.pauseAll();let e=this.getCurrentVideoElement();e&&(e.currentTime=1,e.play().then(async()=>{this.muted=await wp.get(yp.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.videoElements.last;if(e){let t=this.getPreviousVideoDataForEvent(),n=[xt.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.playActiveVideo(),this.detailPopupTemplate==="PRODUCT_DETAIL_VIEW"?this.selectItemForDetailView():(this.selectedItem=null,delete this.selectedVideo);let n=this.currentVideoProps(),r={previous:t,current:n},i=[xt.EVENT_VIDEO_CHANGE,r,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(i)}productCardClicked(e,t){let n={videoID:t.id,videoIndex:this.currentIndex},r=[xt.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(){let e=this.isMobile?1:"auto",t=0;this.detailPopupTemplate==="PRODUCT_DETAIL_VIEW"&&(e="auto",t=10),this.swiperInstance=new window.Swiper(this.swiperContainerRef.nativeElement,{direction:this.isMobile?"vertical":"horizontal",effect:this.isMobile?"slide":"coverflow",slidesPerView:e,initialSlide:this.currentIndex,centeredSlides:!0,spaceBetween:t,coverflowEffect:{rotate:0,stretch:0,depth:400,modifier:1,slideShadows:!1},navigation:{nextEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-next"),prevEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-prev")}}),this.swiperInstance.on("slideChange",n=>{this.onSlideChange(n),this.cdr.detectChanges()}),this.playActiveVideo()}currentVideoProps(){return{videoID:this.videos[this.currentIndex].id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let e=this.currentVideoProps(),t=this.videoElements.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}selectItemForDetailView(){this.selectedVideo=this.videos[this.currentIndex],this.selectedItem=this.isMobile?null:this.selectedVideo?.items?.[0]??null}};Nd(Sr,"\u0275fac",function(e){return new(e||Sr)(Ot(Ua),Ot(Vt),Ot(Ss),Ot(z0))}),Nd(Sr,"\u0275cmp",At({type:Sr,selectors:[["cooee-video-swiper-dialog"]],viewQuery:function(e,t){if(e&1&&(Zs(WL,5),Zs(ZL,5)),e&2){let n;Ys(n=Ks())&&(t.swiperContainerRef=n.first),Ys(n=Ks())&&(t.videoElements=n)}},hostBindings:function(e,t){e&1&&nt("resize",function(){return t.onResize()},!1,uS)},inputs:{videos:"videos",currentIndex:"currentIndex"},features:[Ni],decls:12,vars:2,consts:[["swiperContainer",""],["closeButtonTemplate",""],["videoEl",""],[1,"lc-shadow-inner",3,"ngClass"],[1,"swiper-container"],[1,"swiper-wrapper"],[1,"swiper-slide"],[1,"swiper-button-prev"],[1,"swiper-button-next"],[1,"lc-desktop-controls"],[4,"ngTemplateOutlet"],[1,"lc-video-modal-row"],[1,"lc-video-container"],["playsinline","","preload","metadata",1,"lc-video-el",3,"timeupdate","click","ended","ngClass","autoplay","muted","poster"],[3,"src","type"],[1,"lc-card-container"],[3,"selectedItem","items"],[3,"width"],[1,"lc-video-controls"],[3,"toggled","muted","videoEl"],[1,"lc-card-scroll"],[3,"item"],[3,"performCTA","click","item"],[3,"performCTA","closeModel","selectedItem","items"],[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&&(X(0,"div",3)(1,"div",4,0)(3,"div",5),Wt(4,rM,10,8,"div",6,Pi),Q(),He(6,"div",7)(7,"div",8),Q(),X(8,"div",9),lt(9,iM,1,0,"ng-container",10),Q()(),lt(10,oM,4,0,"ng-template",null,1,RT)),e&2){let n=ur(11);Le("ngClass",t.viewTemplateClassName),Z(4),Zt(t.videos),Z(5),Le("ngTemplateOutlet",n)}},dependencies:[GL,HL,E0,$L,yO,Ha],styles:[`:host{display:flex}.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}.lc-product-detail-view .swiper-container{align-items:center}@media (min-width: 768px){.swiper-container{width:100%;height:100%;max-width:90vw;max-height:90vh}}.swiper-wrapper{max-height:100%}.lc-product-detail-view .swiper-wrapper{align-items:center}@media (max-width: 768px){.swiper-button-prev,.swiper-button-next{display:none!important}}.swiper-slide{position:relative;display:flex;align-items:center;visibility:hidden}.lc-product-detail-view .swiper-slide{width:40vw!important;height:70vh!important}@media (min-width: 768px){.lc-product-detail-view .swiper-slide{min-width:650px!important}}@media (max-width: 768px){.lc-product-detail-view .swiper-slide{width:100%!important;height:100%!important}}@media (min-width: 768px){.lc-video-only-view .swiper-slide{width:fit-content!important}}@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{height:100%}.lc-product-detail-view video{width: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-product-detail-view .lc-video-container{height:100%;position:relative}@media (min-width: 768px){.lc-product-detail-view .lc-video-container{width:50%}}.lc-video-only-view .lc-video-container{height:100%}.lc-card-container{position:absolute;bottom:12px;z-index:10;width:100%;padding-inline:12px;box-sizing:border-box}.lc-product-detail-view .lc-card-container{display:none}@media (max-width: 768px){.lc-product-detail-view .lc-card-container{display:block}}.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}.lc-product-detail-view .lc-video-modal-row{display:flex;justify-content:center;height:100%;width:100%}.lc-video-only-view .lc-video-modal-row{display:block;height:100%}.lc-product-detail-view cooee-product-modal{--header-display: none;width:50%;flex:1}@media (max-width: 768px){.lc-product-detail-view cooee-product-modal{--header-display: flex;width:100%;height:70dvh;position:absolute;bottom:0;z-index:2147483646}}.lc-video-only-view cooee-product-modal{width:100%;height:70dvh;z-index:2147483646;bottom:0;position:absolute}
80
+ `],encapsulation:3})),Sr=Hb([EL()],Sr);var sM=["videoEl"],J0=(e,t)=>t.url;function aM(e,t){if(e&1&&(X(0,"div",1),rt(1),Q()),e&2){let n=le();Z(),Nn(" ",n.videoConfig.heading," ")}}function lM(e,t){if(e&1&&He(0,"source",7),e&2){let n=t.$implicit;ki("type",n.mimeType),Le("src",n.url,on)}}function cM(e,t){if(e&1){let n=Bt();X(0,"cooee-mute-toggle",12),nt("toggled",function(r){dt(n),le();let i=ur(5),o=le(2);return ft(o.onMuteToggled(r,i))}),Q()}if(e&2){le();let n=ur(5);Le("muted",n.muted)("videoEl",n)}}function uM(e,t){if(e&1&&He(0,"img",13),e&2){le(2);let n=un(0);Le("src",n.imageURL,on)("alt",n.name)}}function hM(e,t){if(e&1&&(X(0,"div",10),lt(1,uM,1,2,"img",13),X(2,"div",14)(3,"span",15),rt(4),Q(),vr(5),He(6,"span",16),yn(7,"cooeeCurrency"),yn(8,"safeHtml"),Q()()),e&2){le();let n=un(0),r=le(2);Z(),st(r.showImage?1:-1),Z(3),Nn(" ",n.name," ");let i=n.selectedOrFirstVariant.value.price.d;Z(2),Le("innerHTML",Pn(8,5,Pn(7,3,i)),Di)}}function dM(e,t){if(e&1){let n=Bt();X(0,"button",17),nt("click",function(){dt(n);let r=le().$implicit,i=un(0),o=le(2);return ft(o.addToCartClicked(r,i))}),rt(1," Add to cart "),Q()}}function fM(e,t){if(e&1){let n=Bt();vr(0)(1),X(2,"div",4)(3,"a",5),nt("click",function(r){let i=dt(n),o=i.$implicit,s=i.$index,a=ur(5),l=le(2);return ft(l.onVideoTap(r,o,s,a))}),X(4,"video",6,0),nt("mouseenter",function(){dt(n);let r=ur(5);le(2);let i=un(3);return ft(i&&r.play())})("mouseleave",function(){dt(n);let r=ur(5);le(2);let i=un(3);return ft(i&&r.pause())}),Wt(6,lM,1,2,"source",7,J0),Q(),X(8,"div",8),lt(9,cM,1,2,"cooee-mute-toggle",9),Q(),lt(10,hM,9,7,"div",10),Q(),lt(11,dM,2,0,"button",11),Q()}if(e&2){let n=t.$implicit,r=le(2),i=un(2),o=un(4),s=hi(n.items[0])&&r.videoConfig.footerContent==r.VideoConfigFooterContent.FIRST_ITEM;Z(4),Le("poster",n.thumbnail,on)("muted",!0),ja("autoplay",i||null),Z(2),Zt(n.sources),Z(3),st(r.videoConfig.showMuteButton?9:-1),Z(),st(o&&s?10:-1),Z(),st(o&&s?11:-1)}}function pM(e,t){if(e&1&&(X(0,"div",2),Wt(1,fM,12,7,"div",4,Pi),Q()),e&2){let n=le();Z(),Zt(n.videos)}}function gM(e,t){if(e&1&&He(0,"source",7),e&2){let n=t.$implicit;ki("type",n.mimeType),Le("src",n.url,on)}}function _M(e,t){if(e&1){let n=Bt();X(0,"div",18),fr(),X(1,"svg",19),He(2,"circle",20)(3,"circle",21),Q(),Ms(),X(4,"div",22)(5,"video",23),nt("click",function(r){let i=dt(n),o=i.$implicit,s=i.$index,a=le(2);return ft(a.onVideoTap(r,o,s))}),Wt(6,gM,1,2,"source",7,J0),Q()()()}if(e&2){let n=t.$implicit;Z(5),Le("muted",!0),Z(),Zt(n.sources)}}function mM(e,t){if(e&1&&(X(0,"div",3),Wt(1,_M,8,1,"div",18,Pi),Q()),e&2){let n=le();Z(),Zt(n.videos)}}function vM(e,t){if(e&1){let n=Bt();X(0,"cooee-draggable-video-popup",25),nt("videoClicked",function(){dt(n),le();let r=un(0),i=le();return ft(i.onPopupVideoClicked(r,0))})("closeClicked",function(){dt(n);let r=le(2);return ft(r.onPopupVideoClosed())}),Q()}if(e&2){le();let n=un(0);Le("video",n)}}function yM(e,t){if(e&1&&(vr(0),lt(1,vM,1,1,"cooee-draggable-video-popup",24)),e&2){let n=le();hi(n.videos[0]),Z(),st(n.hidePopupVideo?-1:1)}}var bM=class Ru extends Vy{constructor(t,n){super(),this.dialog=t,this.cdr=n}videoElements;videos;VideoConfigSource=s0;VideoConfigTemplate=a0;VideoConfigFooterContent=c0;VideoConfigAutoPlay=l0;isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";hidePopupVideo;videoConfig;showImage;dialogRef=null;ngOnInit(){super.ngOnInit(),to.loadSwiperScript(),this.showImage=this.videoConfig.detailPopup.template==="PRODUCT_DETAIL_VIEW"}ngAfterViewInit(){this.playFirstVideo()}engagementTriggerReceived(t){this.videoConfig=t.content?.videoConfig,this.videos=this.videoConfig.videos}sendTriggerClicked(t,n){let r=new ql(xt.EVENT_TRIGGER_CLICKED,{},this.triggerContext?.triggerData);r.videos=[t.id],n&&(r.items=[n]),this.sendEventToRenderer(r)}onVideoTap(t,n,r,i){t?.stopPropagation(),t?.preventDefault();let o=n.items?.[0];if(this.sendTriggerClicked(n,o?.toEmbed()),this.videoConfig.footerContent!=="FIRST_ITEM"){i&&(i.muted=!1,i.play(),this.onMuteToggled(!1,i));return}to.loadSwiperScript().then(()=>this.openDialog(n,r))}async performCTA(t){let n,r=this.triggerContext;if(t.cta===ss.ClickActionType.ADD_TO_CART)n=xt.EVENT_ADD_TO_CART_CLICKED;else if(t.cta===ss.ClickActionType.GO_TO_PRODUCT)n=xt.EVENT_VIEW_ITEM_CLICKED;else if(t.cta===ss.ClickActionType.OPEN_CART)n=xt.EVENT_OPEN_CART_CLICKED,r.triggerData.redirectBehaviour=FP.RedirectBehaviour.CART_DRAWER;else{cn.warn(`Unsupported CTA type: ${t.cta}`);return}let i={at:t.cta},o={videoID:t.video.id};this.sendEvent(n,{current:o},t.video,t.item),this.executeCTAViaRenderer({clickAction:i,embeddedItem:t.item.toEmbed()})}addToCartClicked(t,n){this.performCTA({cta:ss.ClickActionType.ADD_TO_CART,item:n,video:t})}onPopupVideoClicked(t,n){this.hidePopupVideo=!0,this.onVideoTap(null,t,n),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(xt.EVENT_TRIGGER_CLOSED,{duration:t})}update(){}onMuteToggled(t,n){t||this.videoElements.forEach(r=>{r.nativeElement!==n&&(r.nativeElement.muted=!0,r.nativeElement.pause())})}playFirstVideo(){this.videoConfig.autoPlay==="ON_HOVER"&&this.isMobile&&this.videoElements.first?.nativeElement.play()}sendEvent(t,n,r,i){let o=new ql(t,n,this.engagementTrigger);r&&(o.videos=[r.id]),i&&(o.items=[i.toEmbed()]),this.sendEventToRenderer(o)}openDialog(t,n){let r={videos:this.videos,currentIndex:n,triggerContext:this.triggerContext,onCTAPerformed:o=>this.performCTA(o)};this.dialogRef&&this.dialogRef.close(),this.dialogRef=this.dialog.open(Sr,{width:"100vw",height:"100vh",data:r});let i={videoID:t.id,videoIndex:n};this.sendEvent(xt.EVENT_VIDEO_DIALOG_OPENED,{current:i},t),this.dialogRef.closed.subscribe(o=>{if(!o)return;let s=o.lastVideoDuration*1e3,a={videoID:o.lastVideo.id,videoIndex:o.lastVideoIndex,playedTillMS:s,playedTillPercent:s/t.durationMS},l=new ql(xt.EVENT_VIDEO_DIALOG_CLOSED,{current:a},this.triggerContext?.triggerData);l.videos=[o.lastVideo.id],this.sendEventToRenderer(l),this.dialogRef=null})}static \u0275fac=function(t){return new(t||Ru)(Ot(pL),Ot(Ua))};static \u0275cmp=At({type:Ru,selectors:[["cooee-shoppable-videos"]],viewQuery:function(t,n){if(t&1&&Zs(sM,5),t&2){let r;Ys(r=Ks())&&(n.videoElements=r)}},features:[Ni],decls:9,vars:5,consts:[["videoEl",""],["id","lc-heading-text",1,"lc-heading-text","lc:mb-2","lc:text-lg","lc:text-center","lc:font-bold"],[1,"lc-video-list"],[1,"lc-video-stories","lc:flex","lc:overflow-auto","lc:m-3","lc:gap-3","lc:justify-center","lc:items-center"],[1,"lc-video-card"],["href","",1,"lc-video-wrapper","lc:rounded-lg",3,"click"],["width","100%","playsinline","","loop","","preload","metadata",1,"lc:rounded-lg","lc:transition-transform","lc:duration-300",3,"mouseenter","mouseleave","poster","muted"],[3,"src","type"],[1,"lc-video-controls"],[3,"muted","videoEl"],["id","lc-single-product",1,"lc-single-product"],["id","lc-cta-button","type","button",1,"lc-cta-button","lc:rounded","lc:w-full","lc:h-auto","lc:text-center","lc:font-normal","lc:cursor-pointer","lc:bg-black","lc:z-4","lc:p-4","lc:text-xl"],[3,"toggled","muted","videoEl"],[1,"lc-item-image",3,"src","alt"],[1,"lc-item-details"],[1,"lc-item-name","lc:line-clamp-1"],[1,"lc-item-price",3,"innerHTML"],["id","lc-cta-button","type","button",1,"lc-cta-button","lc:rounded","lc:w-full","lc:h-auto","lc:text-center","lc:font-normal","lc:cursor-pointer","lc:bg-black","lc:z-4","lc:p-4","lc:text-xl",3,"click"],[1,"lc-video-story","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"],["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&&(vr(0)(1)(2)(3)(4),lt(5,aM,2,1,"div",1)(6,pM,3,0,"div",2)(7,mM,3,0,"div",3)(8,yM,2,2)),t&2){let r=n.videoConfig.source,i=n.videoConfig.template;Z(2),hi(!n.videoConfig.autoPlay||n.videoConfig.autoPlay===n.VideoConfigAutoPlay.ON),Z(),hi(n.videoConfig.autoPlay===n.VideoConfigAutoPlay.ON_HOVER),Z(),hi(r===n.VideoConfigSource.GALLERY),Z(),st(n.videoConfig.heading?5:-1),Z(),st(i===n.VideoConfigTemplate.SIMPLE||i===n.VideoConfigTemplate.SWIPER?6:i===n.VideoConfigTemplate.STORY?7:i===n.VideoConfigTemplate.FLOATING_POPUP?8:-1)}},dependencies:[Za,TA,Ya,E0],styles:["[_nghost-%COMP%]{display:block}.lc-video-list[_ngcontent-%COMP%]{display:flex;overflow-x:auto;gap:24px;margin:8px;align-items:center;scroll-snap-type:x mandatory;scroll-behavior:smooth}@media (min-width: 768px){.lc-video-list[_ngcontent-%COMP%]{justify-content:center}}.lc-video-wrapper[_ngcontent-%COMP%]{position:relative}.lc-video-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2.5px;scroll-snap-align:center;min-width:200px;max-width:300px}.lc-video-card[_ngcontent-%COMP%] video[_ngcontent-%COMP%]:hover{scale:1.1}.lc-cta-button[_ngcontent-%COMP%]{color:#fff}.lc-video-controls[_ngcontent-%COMP%]{position:absolute;bottom:8px;z-index:10;right:8px;display:flex;gap:8px}.lc-single-product[_ngcontent-%COMP%]{display:flex;margin:.25rem 0;gap:.25rem;align-items:center}.lc-single-product[_ngcontent-%COMP%] .lc-item-image[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:.5rem}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:.25rem;font-size:14px;line-height:normal}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%] .lc-item-name[_ngcontent-%COMP%]{color:#000;font-weight:600}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%] .lc-item-price[_ngcontent-%COMP%]{color:#000}"]})};YO("CooeeWidgetSDK");(async()=>{let e=await BO(JO),t=(n,r)=>{let i=cO(n,{injector:e.injector});customElements.define(r,i)};t(jP,"cooee-sticky-atc"),t(DP,"cooee-progressbar"),t(bM,"cooee-shoppable-videos"),Jo.filters.define("default",function(n){return n??""}),Jo.defaultConfig.defaultFilter="default",Jo.defaultConfig.useWith=!0,Jo.defaultConfig.autoTrim="slurp"})();})();