@letscooee/web-sdk 9.12.2 → 9.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.min.js +10 -10
- package/dist/widget.min.js +11 -11
- package/package.json +1 -1
package/dist/widget.min.js
CHANGED
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
|
|
8
8
|
`+F.message+`
|
|
9
9
|
`+Array(F.message.length+1).join("=")+`
|
|
10
|
-
`+M(R,m)):F}}function gt(R,O){var v;return O.cache&&O.name&&O.storage.templates.get(O.name)?O.storage.templates.get(O.name):(v=typeof R=="function"?R:Pt(R,O),O.cache&&O.name&&O.storage.templates.define(O.name,v),v)}xt.l.bind(xt),n.compile=Pt,n.compileScope=Q,n.compileScopeIntoFunction=H,n.compileToString=M,n.defaultConfig=xt,n.filters=Ot,n.getConfig=It,n.helpers=st,n.nativeHelpers=ft,n.parse=D,n.render=function(R,O,v,m){var k=It(v||{});if(!k.async)return gt(R,k)(O,k);if(!m){if(typeof s=="function")return new s(function(F,W){try{F(gt(R,k)(O,k))}catch(K){W(K)}});throw i("Please provide a callback function, this env doesn't support Promises")}try{gt(R,k)(O,k,m)}catch(F){return m(F)}},n.templates=ot,Object.defineProperty(n,"__esModule",{value:!0})})}),uu=(0,r.d)((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 i;typeof window<"u"?i=window:typeof global<"u"?i=global:typeof self<"u"?i=self:i=this,i.localforage=n()}})(function(){var n,i,o;return function s(a,c,h){function f(E,I){if(!c[E]){if(!a[E]){var S=typeof r.c=="function"&&r.c;if(!I&&S)return S(E,!0);if(_)return _(E,!0);var D=new Error("Cannot find module '"+E+"'");throw D.code="MODULE_NOT_FOUND",D}var M=c[E]={exports:{}};a[E][0].call(M.exports,function(L){var z=a[E][1][L];return f(z||L)},M,M.exports,s,a,c,h)}return c[E].exports}for(var _=typeof r.c=="function"&&r.c,d=0;d<h.length;d++)f(h[d]);return f}({1:[function(s,a,c){(function(h){"use strict";var f=h.MutationObserver||h.WebKitMutationObserver,_;if(f){var d=0,E=new f(L),I=h.document.createTextNode("");E.observe(I,{characterData:!0}),_=function(){I.data=d=++d%2}}else if(!h.setImmediate&&typeof h.MessageChannel<"u"){var S=new h.MessageChannel;S.port1.onmessage=L,_=function(){S.port2.postMessage(0)}}else"document"in h&&"onreadystatechange"in h.document.createElement("script")?_=function(){var X=h.document.createElement("script");X.onreadystatechange=function(){L(),X.onreadystatechange=null,X.parentNode.removeChild(X),X=null},h.document.documentElement.appendChild(X)}:_=function(){setTimeout(L,0)};var D,M=[];function L(){D=!0;for(var X,H,Q=M.length;Q;){for(H=M,M=[],X=-1;++X<Q;)H[X]();Q=M.length}D=!1}a.exports=z;function z(X){M.push(X)===1&&!D&&_()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(s,a,c){"use strict";var h=s(1);function f(){}var _={},d=["REJECTED"],E=["FULFILLED"],I=["PENDING"];a.exports=S;function S(j){if(typeof j!="function")throw new TypeError("resolver must be a function");this.state=I,this.queue=[],this.outcome=void 0,j!==f&&z(this,j)}S.prototype.catch=function(j){return this.then(null,j)},S.prototype.then=function(j,ct){if(typeof j!="function"&&this.state===E||typeof ct!="function"&&this.state===d)return this;var ot=new this.constructor(f);if(this.state!==I){var st=this.state===E?j:ct;M(ot,st,this.outcome)}else this.queue.push(new D(ot,j,ct));return ot};function D(j,ct,ot){this.promise=j,typeof ct=="function"&&(this.onFulfilled=ct,this.callFulfilled=this.otherCallFulfilled),typeof ot=="function"&&(this.onRejected=ot,this.callRejected=this.otherCallRejected)}D.prototype.callFulfilled=function(j){_.resolve(this.promise,j)},D.prototype.otherCallFulfilled=function(j){M(this.promise,this.onFulfilled,j)},D.prototype.callRejected=function(j){_.reject(this.promise,j)},D.prototype.otherCallRejected=function(j){M(this.promise,this.onRejected,j)};function M(j,ct,ot){h(function(){var st;try{st=ct(ot)}catch(ft){return _.reject(j,ft)}st===j?_.reject(j,new TypeError("Cannot resolve promise with itself")):_.resolve(j,st)})}_.resolve=function(j,ct){var ot=X(L,ct);if(ot.status==="error")return _.reject(j,ot.value);var st=ot.value;if(st)z(j,st);else{j.state=E,j.outcome=ct;for(var ft=-1,Ot=j.queue.length;++ft<Ot;)j.queue[ft].callFulfilled(ct)}return j},_.reject=function(j,ct){j.state=d,j.outcome=ct;for(var ot=-1,st=j.queue.length;++ot<st;)j.queue[ot].callRejected(ct);return j};function L(j){var ct=j&&j.then;if(j&&(typeof j=="object"||typeof j=="function")&&typeof ct=="function")return function(){ct.apply(j,arguments)}}function z(j,ct){var ot=!1;function st(It){ot||(ot=!0,_.reject(j,It))}function ft(It){ot||(ot=!0,_.resolve(j,It))}function Ot(){ct(ft,st)}var xt=X(Ot);xt.status==="error"&&st(xt.value)}function X(j,ct){var ot={};try{ot.value=j(ct),ot.status="success"}catch(st){ot.status="error",ot.value=st}return ot}S.resolve=H;function H(j){return j instanceof this?j:_.resolve(new this(f),j)}S.reject=Q;function Q(j){var ct=new this(f);return _.reject(ct,j)}S.all=mt;function mt(j){var ct=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var ot=j.length,st=!1;if(!ot)return this.resolve([]);for(var ft=new Array(ot),Ot=0,xt=-1,It=new this(f);++xt<ot;)Pt(j[xt],xt);return It;function Pt(gt,R){ct.resolve(gt).then(O,function(v){st||(st=!0,_.reject(It,v))});function O(v){ft[R]=v,++Ot===ot&&!st&&(st=!0,_.resolve(It,ft))}}}S.race=vt;function vt(j){var ct=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var ot=j.length,st=!1;if(!ot)return this.resolve([]);for(var ft=-1,Ot=new this(f);++ft<ot;)xt(j[ft]);return Ot;function xt(It){ct.resolve(It).then(function(Pt){st||(st=!0,_.resolve(Ot,Pt))},function(Pt){st||(st=!0,_.reject(Ot,Pt))})}}},{1:1}],3:[function(s,a,c){(function(h){"use strict";typeof h.Promise!="function"&&(h.Promise=s(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(s,a,c){"use strict";var h=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 f(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")}function _(){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=_();function E(){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),y=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!g||y)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function I(g,y){g=g||[],y=y||{};try{return new Blob(g,y)}catch(T){if(T.name!=="TypeError")throw T;for(var b=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,C=new b,x=0;x<g.length;x+=1)C.append(g[x]);return C.getBlob(y.type)}}typeof Promise>"u"&&s(3);var S=Promise;function D(g,y){y&&g.then(function(b){y(null,b)},function(b){y(b)})}function M(g,y,b){typeof y=="function"&&g.then(y),typeof b=="function"&&g.catch(b)}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 X="local-forage-detect-blob-support",H=void 0,Q={},mt=Object.prototype.toString,vt="readonly",j="readwrite";function ct(g){for(var y=g.length,b=new ArrayBuffer(y),C=new Uint8Array(b),x=0;x<y;x++)C[x]=g.charCodeAt(x);return b}function ot(g){return new S(function(y){var b=g.transaction(X,j),C=I([""]);b.objectStore(X).put(C,"key"),b.onabort=function(x){x.preventDefault(),x.stopPropagation(),y(!1)},b.oncomplete=function(){var x=navigator.userAgent.match(/Chrome\/(\d+)/),T=navigator.userAgent.match(/Edge\//);y(T||!x||parseInt(x[1],10)>=43)}}).catch(function(){return!1})}function st(g){return typeof H=="boolean"?S.resolve(H):ot(g).then(function(y){return H=y,H})}function ft(g){var y=Q[g.name],b={};b.promise=new S(function(C,x){b.resolve=C,b.reject=x}),y.deferredOperations.push(b),y.dbReady?y.dbReady=y.dbReady.then(function(){return b.promise}):y.dbReady=b.promise}function Ot(g){var y=Q[g.name],b=y.deferredOperations.pop();if(b)return b.resolve(),b.promise}function xt(g,y){var b=Q[g.name],C=b.deferredOperations.pop();if(C)return C.reject(y),C.promise}function It(g,y){return new S(function(b,C){if(Q[g.name]=Q[g.name]||K(),g.db)if(y)ft(g),g.db.close();else return b(g.db);var x=[g.name];y&&x.push(g.version);var T=d.open.apply(d,x);y&&(T.onupgradeneeded=function(N){var B=T.result;try{B.createObjectStore(g.storeName),N.oldVersion<=1&&B.createObjectStore(X)}catch($){if($.name==="ConstraintError")console.warn('The database "'+g.name+'" has been upgraded from version '+N.oldVersion+" to version "+N.newVersion+', but the storage "'+g.storeName+'" already exists.');else throw $}}),T.onerror=function(N){N.preventDefault(),C(T.error)},T.onsuccess=function(){var N=T.result;N.onversionchange=function(B){B.target.close()},b(N),Ot(g)}})}function Pt(g){return It(g,!1)}function gt(g){return It(g,!0)}function R(g,y){if(!g.db)return!0;var b=!g.db.objectStoreNames.contains(g.storeName),C=g.version<g.db.version,x=g.version>g.db.version;if(C&&(g.version!==y&&console.warn('The database "'+g.name+`" can't be downgraded from version `+g.db.version+" to version "+g.version+"."),g.version=g.db.version),x||b){if(b){var T=g.db.version+1;T>g.version&&(g.version=T)}return!0}return!1}function O(g){return new S(function(y,b){var C=new FileReader;C.onerror=b,C.onloadend=function(x){var T=btoa(x.target.result||"");y({__local_forage_encoded_blob:!0,data:T,type:g.type})},C.readAsBinaryString(g)})}function v(g){var y=ct(atob(g.data));return I([y],{type:g.type})}function m(g){return g&&g.__local_forage_encoded_blob}function k(g){var y=this,b=y._initReady().then(function(){var C=Q[y._dbInfo.name];if(C&&C.dbReady)return C.dbReady});return M(b,g,g),b}function F(g){ft(g);for(var y=Q[g.name],b=y.forages,C=0;C<b.length;C++){var x=b[C];x._dbInfo.db&&(x._dbInfo.db.close(),x._dbInfo.db=null)}return g.db=null,Pt(g).then(function(T){return g.db=T,R(g)?gt(g):T}).then(function(T){g.db=y.db=T;for(var N=0;N<b.length;N++)b[N]._dbInfo.db=T}).catch(function(T){throw xt(g,T),T})}function W(g,y,b,C){C===void 0&&(C=1);try{var x=g.db.transaction(g.storeName,y);b(null,x)}catch(T){if(C>0&&(!g.db||T.name==="InvalidStateError"||T.name==="NotFoundError"))return S.resolve().then(function(){if(!g.db||T.name==="NotFoundError"&&!g.db.objectStoreNames.contains(g.storeName)&&g.version<=g.db.version)return g.db&&(g.version=g.db.version+1),gt(g)}).then(function(){return F(g).then(function(){W(g,y,b,C-1)})}).catch(b);b(T)}}function K(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Y(g){var y=this,b={db:null};if(g)for(var C in g)b[C]=g[C];var x=Q[b.name];x||(x=K(),Q[b.name]=x),x.forages.push(y),y._initReady||(y._initReady=y.ready,y.ready=k);var T=[];function N(){return S.resolve()}for(var B=0;B<x.forages.length;B++){var $=x.forages[B];$!==y&&T.push($._initReady().catch(N))}var U=x.forages.slice(0);return S.all(T).then(function(){return b.db=x.db,Pt(b)}).then(function(V){return b.db=V,R(b,y._defaultConfig.version)?gt(b):V}).then(function(V){b.db=x.db=V,y._dbInfo=b;for(var nt=0;nt<U.length;nt++){var pt=U[nt];pt!==y&&(pt._dbInfo.db=b.db,pt._dbInfo.version=b.version)}})}function G(g,y){var b=this;g=L(g);var C=new S(function(x,T){b.ready().then(function(){W(b._dbInfo,vt,function(N,B){if(N)return T(N);try{var $=B.objectStore(b._dbInfo.storeName),U=$.get(g);U.onsuccess=function(){var V=U.result;V===void 0&&(V=null),m(V)&&(V=v(V)),x(V)},U.onerror=function(){T(U.error)}}catch(V){T(V)}})}).catch(T)});return D(C,y),C}function it(g,y){var b=this,C=new S(function(x,T){b.ready().then(function(){W(b._dbInfo,vt,function(N,B){if(N)return T(N);try{var $=B.objectStore(b._dbInfo.storeName),U=$.openCursor(),V=1;U.onsuccess=function(){var nt=U.result;if(nt){var pt=nt.value;m(pt)&&(pt=v(pt));var Ct=g(pt,nt.key,V++);Ct!==void 0?x(Ct):nt.continue()}else x()},U.onerror=function(){T(U.error)}}catch(nt){T(nt)}})}).catch(T)});return D(C,y),C}function at(g,y,b){var C=this;g=L(g);var x=new S(function(T,N){var B;C.ready().then(function(){return B=C._dbInfo,mt.call(y)==="[object Blob]"?st(B.db).then(function($){return $?y:O(y)}):y}).then(function($){W(C._dbInfo,j,function(U,V){if(U)return N(U);try{var nt=V.objectStore(C._dbInfo.storeName);$===null&&($=void 0);var pt=nt.put($,g);V.oncomplete=function(){$===void 0&&($=null),T($)},V.onabort=V.onerror=function(){var Ct=pt.error?pt.error:pt.transaction.error;N(Ct)}}catch(Ct){N(Ct)}})}).catch(N)});return D(x,b),x}function ht(g,y){var b=this;g=L(g);var C=new S(function(x,T){b.ready().then(function(){W(b._dbInfo,j,function(N,B){if(N)return T(N);try{var $=B.objectStore(b._dbInfo.storeName),U=$.delete(g);B.oncomplete=function(){x()},B.onerror=function(){T(U.error)},B.onabort=function(){var V=U.error?U.error:U.transaction.error;T(V)}}catch(V){T(V)}})}).catch(T)});return D(C,y),C}function q(g){var y=this,b=new S(function(C,x){y.ready().then(function(){W(y._dbInfo,j,function(T,N){if(T)return x(T);try{var B=N.objectStore(y._dbInfo.storeName),$=B.clear();N.oncomplete=function(){C()},N.onabort=N.onerror=function(){var U=$.error?$.error:$.transaction.error;x(U)}}catch(U){x(U)}})}).catch(x)});return D(b,g),b}function tt(g){var y=this,b=new S(function(C,x){y.ready().then(function(){W(y._dbInfo,vt,function(T,N){if(T)return x(T);try{var B=N.objectStore(y._dbInfo.storeName),$=B.count();$.onsuccess=function(){C($.result)},$.onerror=function(){x($.error)}}catch(U){x(U)}})}).catch(x)});return D(b,g),b}function lt(g,y){var b=this,C=new S(function(x,T){if(g<0){x(null);return}b.ready().then(function(){W(b._dbInfo,vt,function(N,B){if(N)return T(N);try{var $=B.objectStore(b._dbInfo.storeName),U=!1,V=$.openKeyCursor();V.onsuccess=function(){var nt=V.result;if(!nt){x(null);return}g===0||U?x(nt.key):(U=!0,nt.advance(g))},V.onerror=function(){T(V.error)}}catch(nt){T(nt)}})}).catch(T)});return D(C,y),C}function rt(g){var y=this,b=new S(function(C,x){y.ready().then(function(){W(y._dbInfo,vt,function(T,N){if(T)return x(T);try{var B=N.objectStore(y._dbInfo.storeName),$=B.openKeyCursor(),U=[];$.onsuccess=function(){var V=$.result;if(!V){C(U);return}U.push(V.key),V.continue()},$.onerror=function(){x($.error)}}catch(V){x(V)}})}).catch(x)});return D(b,g),b}function l(g,y){y=z.apply(this,arguments);var b=this.config();g=typeof g!="function"&&g||{},g.name||(g.name=g.name||b.name,g.storeName=g.storeName||b.storeName);var C=this,x;if(!g.name)x=S.reject("Invalid arguments");else{var T=g.name===b.name&&C._dbInfo.db,N=T?S.resolve(C._dbInfo.db):Pt(g).then(function(B){var $=Q[g.name],U=$.forages;$.db=B;for(var V=0;V<U.length;V++)U[V]._dbInfo.db=B;return B});g.storeName?x=N.then(function(B){if(B.objectStoreNames.contains(g.storeName)){var $=B.version+1;ft(g);var U=Q[g.name],V=U.forages;B.close();for(var nt=0;nt<V.length;nt++){var pt=V[nt];pt._dbInfo.db=null,pt._dbInfo.version=$}var Ct=new S(function(St,Mt){var Rt=d.open(g.name,$);Rt.onerror=function(Jt){var Ri=Rt.result;Ri.close(),Mt(Jt)},Rt.onupgradeneeded=function(){var Jt=Rt.result;Jt.deleteObjectStore(g.storeName)},Rt.onsuccess=function(){var Jt=Rt.result;Jt.close(),St(Jt)}});return Ct.then(function(St){U.db=St;for(var Mt=0;Mt<V.length;Mt++){var Rt=V[Mt];Rt._dbInfo.db=St,Ot(Rt._dbInfo)}}).catch(function(St){throw(xt(g,St)||S.resolve()).catch(function(){}),St})}}):x=N.then(function(B){ft(g);var $=Q[g.name],U=$.forages;B.close();for(var V=0;V<U.length;V++){var nt=U[V];nt._dbInfo.db=null}var pt=new S(function(Ct,St){var Mt=d.deleteDatabase(g.name);Mt.onerror=function(){var Rt=Mt.result;Rt&&Rt.close(),St(Mt.error)},Mt.onblocked=function(){console.warn('dropInstance blocked for database "'+g.name+'" until all open connections are closed')},Mt.onsuccess=function(){var Rt=Mt.result;Rt&&Rt.close(),Ct(Rt)}});return pt.then(function(Ct){$.db=Ct;for(var St=0;St<U.length;St++){var Mt=U[St];Ot(Mt._dbInfo)}}).catch(function(Ct){throw(xt(g,Ct)||S.resolve()).catch(function(){}),Ct})})}return D(x,y),x}var u={_driver:"asyncStorage",_initStorage:Y,_support:E(),iterate:it,getItem:G,setItem:at,removeItem:ht,clear:q,length:tt,key:lt,keys:rt,dropInstance:l};function p(){return typeof openDatabase=="function"}var w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",P="~~local_forage_type~",A=/^~~local_forage_type~([^~]+)~/,Z="__lfsc__:",J=Z.length,yt="arbf",dt="blob",bt="si08",_t="ui08",jt="uic8",ge="si16",At="si32",ie="ur16",ue="ui32",we="fl32",Zt="fl64",re=J+yt.length,Ro=Object.prototype.toString;function Po(g){var y=g.length*.75,b=g.length,C,x=0,T,N,B,$;g[g.length-1]==="="&&(y--,g[g.length-2]==="="&&y--);var U=new ArrayBuffer(y),V=new Uint8Array(U);for(C=0;C<b;C+=4)T=w.indexOf(g[C]),N=w.indexOf(g[C+1]),B=w.indexOf(g[C+2]),$=w.indexOf(g[C+3]),V[x++]=T<<2|N>>4,V[x++]=(N&15)<<4|B>>2,V[x++]=(B&3)<<6|$&63;return U}function Ti(g){var y=new Uint8Array(g),b="",C;for(C=0;C<y.length;C+=3)b+=w[y[C]>>2],b+=w[(y[C]&3)<<4|y[C+1]>>4],b+=w[(y[C+1]&15)<<2|y[C+2]>>6],b+=w[y[C+2]&63];return y.length%3===2?b=b.substring(0,b.length-1)+"=":y.length%3===1&&(b=b.substring(0,b.length-2)+"=="),b}function bc(g,y){var b="";if(g&&(b=Ro.call(g)),g&&(b==="[object ArrayBuffer]"||g.buffer&&Ro.call(g.buffer)==="[object ArrayBuffer]")){var C,x=Z;g instanceof ArrayBuffer?(C=g,x+=yt):(C=g.buffer,b==="[object Int8Array]"?x+=bt:b==="[object Uint8Array]"?x+=_t:b==="[object Uint8ClampedArray]"?x+=jt:b==="[object Int16Array]"?x+=ge:b==="[object Uint16Array]"?x+=ie:b==="[object Int32Array]"?x+=At:b==="[object Uint32Array]"?x+=ue:b==="[object Float32Array]"?x+=we:b==="[object Float64Array]"?x+=Zt:y(new Error("Failed to get type for BinaryArray"))),y(x+Ti(C))}else if(b==="[object Blob]"){var T=new FileReader;T.onload=function(){var N=P+g.type+"~"+Ti(this.result);y(Z+dt+N)},T.readAsArrayBuffer(g)}else try{y(JSON.stringify(g))}catch(N){console.error("Couldn't convert value into a JSON string: ",g),y(null,N)}}function wc(g){if(g.substring(0,J)!==Z)return JSON.parse(g);var y=g.substring(re),b=g.substring(J,re),C;if(b===dt&&A.test(y)){var x=y.match(A);C=x[1],y=y.substring(x[0].length)}var T=Po(y);switch(b){case yt:return T;case dt:return I([T],{type:C});case bt:return new Int8Array(T);case _t:return new Uint8Array(T);case jt:return new Uint8ClampedArray(T);case ge:return new Int16Array(T);case ie:return new Uint16Array(T);case At:return new Int32Array(T);case ue:return new Uint32Array(T);case we:return new Float32Array(T);case Zt:return new Float64Array(T);default:throw new Error("Unkown type: "+b)}}var Oi={serialize:bc,deserialize:wc,stringToBuffer:Po,bufferToString:Ti};function ko(g,y,b,C){g.executeSql("CREATE TABLE IF NOT EXISTS "+y.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],b,C)}function Ec(g){var y=this,b={db:null};if(g)for(var C in g)b[C]=typeof g[C]!="string"?g[C].toString():g[C];var x=new S(function(T,N){try{b.db=openDatabase(b.name,String(b.version),b.description,b.size)}catch(B){return N(B)}b.db.transaction(function(B){ko(B,b,function(){y._dbInfo=b,T()},function($,U){N(U)})},N)});return b.serializer=Oi,x}function Ee(g,y,b,C,x,T){g.executeSql(b,C,x,function(N,B){B.code===B.SYNTAX_ERR?N.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[y.storeName],function($,U){U.rows.length?T($,B):ko($,y,function(){$.executeSql(b,C,x,T)},T)},T):T(N,B)},T)}function xc(g,y){var b=this;g=L(g);var C=new S(function(x,T){b.ready().then(function(){var N=b._dbInfo;N.db.transaction(function(B){Ee(B,N,"SELECT * FROM "+N.storeName+" WHERE key = ? LIMIT 1",[g],function($,U){var V=U.rows.length?U.rows.item(0).value:null;V&&(V=N.serializer.deserialize(V)),x(V)},function($,U){T(U)})})}).catch(T)});return D(C,y),C}function Sc(g,y){var b=this,C=new S(function(x,T){b.ready().then(function(){var N=b._dbInfo;N.db.transaction(function(B){Ee(B,N,"SELECT * FROM "+N.storeName,[],function($,U){for(var V=U.rows,nt=V.length,pt=0;pt<nt;pt++){var Ct=V.item(pt),St=Ct.value;if(St&&(St=N.serializer.deserialize(St)),St=g(St,Ct.key,pt+1),St!==void 0){x(St);return}}x()},function($,U){T(U)})})}).catch(T)});return D(C,y),C}function No(g,y,b,C){var x=this;g=L(g);var T=new S(function(N,B){x.ready().then(function(){y===void 0&&(y=null);var $=y,U=x._dbInfo;U.serializer.serialize(y,function(V,nt){nt?B(nt):U.db.transaction(function(pt){Ee(pt,U,"INSERT OR REPLACE INTO "+U.storeName+" (key, value) VALUES (?, ?)",[g,V],function(){N($)},function(Ct,St){B(St)})},function(pt){if(pt.code===pt.QUOTA_ERR){if(C>0){N(No.apply(x,[g,$,b,C-1]));return}B(pt)}})})}).catch(B)});return D(T,b),T}function Cc(g,y,b){return No.apply(this,[g,y,b,1])}function Tc(g,y){var b=this;g=L(g);var C=new S(function(x,T){b.ready().then(function(){var N=b._dbInfo;N.db.transaction(function(B){Ee(B,N,"DELETE FROM "+N.storeName+" WHERE key = ?",[g],function(){x()},function($,U){T(U)})})}).catch(T)});return D(C,y),C}function Oc(g){var y=this,b=new S(function(C,x){y.ready().then(function(){var T=y._dbInfo;T.db.transaction(function(N){Ee(N,T,"DELETE FROM "+T.storeName,[],function(){C()},function(B,$){x($)})})}).catch(x)});return D(b,g),b}function Ic(g){var y=this,b=new S(function(C,x){y.ready().then(function(){var T=y._dbInfo;T.db.transaction(function(N){Ee(N,T,"SELECT COUNT(key) as c FROM "+T.storeName,[],function(B,$){var U=$.rows.item(0).c;C(U)},function(B,$){x($)})})}).catch(x)});return D(b,g),b}function Dc(g,y){var b=this,C=new S(function(x,T){b.ready().then(function(){var N=b._dbInfo;N.db.transaction(function(B){Ee(B,N,"SELECT key FROM "+N.storeName+" WHERE id = ? LIMIT 1",[g+1],function($,U){var V=U.rows.length?U.rows.item(0).key:null;x(V)},function($,U){T(U)})})}).catch(T)});return D(C,y),C}function Rc(g){var y=this,b=new S(function(C,x){y.ready().then(function(){var T=y._dbInfo;T.db.transaction(function(N){Ee(N,T,"SELECT key FROM "+T.storeName,[],function(B,$){for(var U=[],V=0;V<$.rows.length;V++)U.push($.rows.item(V).key);C(U)},function(B,$){x($)})})}).catch(x)});return D(b,g),b}function Pc(g){return new S(function(y,b){g.transaction(function(C){C.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(x,T){for(var N=[],B=0;B<T.rows.length;B++)N.push(T.rows.item(B).name);y({db:g,storeNames:N})},function(x,T){b(T)})},function(C){b(C)})})}function kc(g,y){y=z.apply(this,arguments);var b=this.config();g=typeof g!="function"&&g||{},g.name||(g.name=g.name||b.name,g.storeName=g.storeName||b.storeName);var C=this,x;return g.name?x=new S(function(T){var N;g.name===b.name?N=C._dbInfo.db:N=openDatabase(g.name,"","",0),g.storeName?T({db:N,storeNames:[g.storeName]}):T(Pc(N))}).then(function(T){return new S(function(N,B){T.db.transaction(function($){function U(Ct){return new S(function(St,Mt){$.executeSql("DROP TABLE IF EXISTS "+Ct,[],function(){St()},function(Rt,Jt){Mt(Jt)})})}for(var V=[],nt=0,pt=T.storeNames.length;nt<pt;nt++)V.push(U(T.storeNames[nt]));S.all(V).then(function(){N()}).catch(function(Ct){B(Ct)})},function($){B($)})})}):x=S.reject("Invalid arguments"),D(x,y),x}var Nc={_driver:"webSQLStorage",_initStorage:Ec,_support:p(),iterate:Sc,getItem:xc,setItem:Cc,removeItem:Tc,clear:Oc,length:Ic,key:Dc,keys:Rc,dropInstance:kc};function Ac(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function Ao(g,y){var b=g.name+"/";return g.storeName!==y.storeName&&(b+=g.storeName+"/"),b}function Mc(){var g="_localforage_support_test";try{return localStorage.setItem(g,!0),localStorage.removeItem(g),!1}catch{return!0}}function Lc(){return!Mc()||localStorage.length>0}function Bc(g){var y=this,b={};if(g)for(var C in g)b[C]=g[C];return b.keyPrefix=Ao(g,y._defaultConfig),Lc()?(y._dbInfo=b,b.serializer=Oi,S.resolve()):S.reject()}function jc(g){var y=this,b=y.ready().then(function(){for(var C=y._dbInfo.keyPrefix,x=localStorage.length-1;x>=0;x--){var T=localStorage.key(x);T.indexOf(C)===0&&localStorage.removeItem(T)}});return D(b,g),b}function Fc(g,y){var b=this;g=L(g);var C=b.ready().then(function(){var x=b._dbInfo,T=localStorage.getItem(x.keyPrefix+g);return T&&(T=x.serializer.deserialize(T)),T});return D(C,y),C}function Vc(g,y){var b=this,C=b.ready().then(function(){for(var x=b._dbInfo,T=x.keyPrefix,N=T.length,B=localStorage.length,$=1,U=0;U<B;U++){var V=localStorage.key(U);if(V.indexOf(T)===0){var nt=localStorage.getItem(V);if(nt&&(nt=x.serializer.deserialize(nt)),nt=g(nt,V.substring(N),$++),nt!==void 0)return nt}}});return D(C,y),C}function Uc(g,y){var b=this,C=b.ready().then(function(){var x=b._dbInfo,T;try{T=localStorage.key(g)}catch{T=null}return T&&(T=T.substring(x.keyPrefix.length)),T});return D(C,y),C}function $c(g){var y=this,b=y.ready().then(function(){for(var C=y._dbInfo,x=localStorage.length,T=[],N=0;N<x;N++){var B=localStorage.key(N);B.indexOf(C.keyPrefix)===0&&T.push(B.substring(C.keyPrefix.length))}return T});return D(b,g),b}function Hc(g){var y=this,b=y.keys().then(function(C){return C.length});return D(b,g),b}function zc(g,y){var b=this;g=L(g);var C=b.ready().then(function(){var x=b._dbInfo;localStorage.removeItem(x.keyPrefix+g)});return D(C,y),C}function Wc(g,y,b){var C=this;g=L(g);var x=C.ready().then(function(){y===void 0&&(y=null);var T=y;return new S(function(N,B){var $=C._dbInfo;$.serializer.serialize(y,function(U,V){if(V)B(V);else try{localStorage.setItem($.keyPrefix+g,U),N(T)}catch(nt){(nt.name==="QuotaExceededError"||nt.name==="NS_ERROR_DOM_QUOTA_REACHED")&&B(nt),B(nt)}})})});return D(x,b),x}function Gc(g,y){if(y=z.apply(this,arguments),g=typeof g!="function"&&g||{},!g.name){var b=this.config();g.name=g.name||b.name,g.storeName=g.storeName||b.storeName}var C=this,x;return g.name?x=new S(function(T){g.storeName?T(Ao(g,C._defaultConfig)):T(g.name+"/")}).then(function(T){for(var N=localStorage.length-1;N>=0;N--){var B=localStorage.key(N);B.indexOf(T)===0&&localStorage.removeItem(B)}}):x=S.reject("Invalid arguments"),D(x,y),x}var qc={_driver:"localStorageWrapper",_initStorage:Bc,_support:Ac(),iterate:Vc,getItem:Fc,setItem:Wc,removeItem:zc,clear:jc,length:Hc,key:Uc,keys:$c,dropInstance:Gc},Zc=function(g,y){return g===y||typeof g=="number"&&typeof y=="number"&&isNaN(g)&&isNaN(y)},Yc=function(g,y){for(var b=g.length,C=0;C<b;){if(Zc(g[C],y))return!0;C++}return!1},Mo=Array.isArray||function(g){return Object.prototype.toString.call(g)==="[object Array]"},dn={},Lo={},qe={INDEXEDDB:u,WEBSQL:Nc,LOCALSTORAGE:qc},Kc=[qe.INDEXEDDB._driver,qe.WEBSQL._driver,qe.LOCALSTORAGE._driver],Nn=["dropInstance"],Ii=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Nn),Jc={description:"",driver:Kc.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Xc(g,y){g[y]=function(){var b=arguments;return g.ready().then(function(){return g[y].apply(g,b)})}}function Di(){for(var g=1;g<arguments.length;g++){var y=arguments[g];if(y)for(var b in y)y.hasOwnProperty(b)&&(Mo(y[b])?arguments[0][b]=y[b].slice():arguments[0][b]=y[b])}return arguments[0]}var Qc=function(){function g(y){f(this,g);for(var b in qe)if(qe.hasOwnProperty(b)){var C=qe[b],x=C._driver;this[b]=x,dn[x]||this.defineDriver(C)}this._defaultConfig=Di({},Jc),this._config=Di({},this._defaultConfig,y),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(y){if((typeof y>"u"?"undefined":h(y))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var b in y){if(b==="storeName"&&(y[b]=y[b].replace(/\W/g,"_")),b==="version"&&typeof y[b]!="number")return new Error("Database version must be a number.");this._config[b]=y[b]}return"driver"in y&&y.driver?this.setDriver(this._config.driver):!0}else return typeof y=="string"?this._config[y]:this._config},g.prototype.defineDriver=function(y,b,C){var x=new S(function(T,N){try{var B=y._driver,$=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!y._driver){N($);return}for(var U=Ii.concat("_initStorage"),V=0,nt=U.length;V<nt;V++){var pt=U[V],Ct=!Yc(Nn,pt);if((Ct||y[pt])&&typeof y[pt]!="function"){N($);return}}var St=function(){for(var Rt=function(eu){return function(){var nu=new Error("Method "+eu+" is not implemented by the current driver"),Bo=S.reject(nu);return D(Bo,arguments[arguments.length-1]),Bo}},Jt=0,Ri=Nn.length;Jt<Ri;Jt++){var Pi=Nn[Jt];y[Pi]||(y[Pi]=Rt(Pi))}};St();var Mt=function(Rt){dn[B]&&console.info("Redefining LocalForage driver: "+B),dn[B]=y,Lo[B]=Rt,T()};"_support"in y?y._support&&typeof y._support=="function"?y._support().then(Mt,N):Mt(!!y._support):Mt(!0)}catch(Rt){N(Rt)}});return M(x,b,C),x},g.prototype.driver=function(){return this._driver||null},g.prototype.getDriver=function(y,b,C){var x=dn[y]?S.resolve(dn[y]):S.reject(new Error("Driver not found."));return M(x,b,C),x},g.prototype.getSerializer=function(y){var b=S.resolve(Oi);return M(b,y),b},g.prototype.ready=function(y){var b=this,C=b._driverSet.then(function(){return b._ready===null&&(b._ready=b._initDriver()),b._ready});return M(C,y,y),C},g.prototype.setDriver=function(y,b,C){var x=this;Mo(y)||(y=[y]);var T=this._getSupportedDrivers(y);function N(){x._config.driver=x.driver()}function B(V){return x._extend(V),N(),x._ready=x._initStorage(x._config),x._ready}function $(V){return function(){var nt=0;function pt(){for(;nt<V.length;){var Ct=V[nt];return nt++,x._dbInfo=null,x._ready=null,x.getDriver(Ct).then(B).catch(pt)}N();var St=new Error("No available storage method found.");return x._driverSet=S.reject(St),x._driverSet}return pt()}}var U=this._driverSet!==null?this._driverSet.catch(function(){return S.resolve()}):S.resolve();return this._driverSet=U.then(function(){var V=T[0];return x._dbInfo=null,x._ready=null,x.getDriver(V).then(function(nt){x._driver=nt._driver,N(),x._wrapLibraryMethodsWithReady(),x._initDriver=$(T)})}).catch(function(){N();var V=new Error("No available storage method found.");return x._driverSet=S.reject(V),x._driverSet}),M(this._driverSet,b,C),this._driverSet},g.prototype.supports=function(y){return!!Lo[y]},g.prototype._extend=function(y){Di(this,y)},g.prototype._getSupportedDrivers=function(y){for(var b=[],C=0,x=y.length;C<x;C++){var T=y[C];this.supports(T)&&b.push(T)}return b},g.prototype._wrapLibraryMethodsWithReady=function(){for(var y=0,b=Ii.length;y<b;y++)Xc(this,Ii[y])},g.prototype.createInstance=function(y){return new g(y)},g}(),tu=new Qc;a.exports=tu},{3:3}]},{},[4])(4)})}),hu={schedule(t,e){let n=setTimeout(t,e);return()=>clearTimeout(n)}};function du(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function pu(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}var ki;function fu(t,e){if(!ki){let n=Element.prototype;ki=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return t.nodeType===Node.ELEMENT_NODE?ki.call(t,e):!1}function gu(t){let e={};return t.forEach(({propName:n,templateName:i,transform:o})=>{e[du(i)]=[n,o]}),e}function _u(t,e){return e.get(r.ha).resolveComponentFactory(t).inputs}function mu(t,e){let n=t.childNodes,i=e.map(()=>[]),o=-1;e.some((s,a)=>s==="*"?(o=a,!0):!1);for(let s=0,a=n.length;s<a;++s){let c=n[s],h=vu(c,e,o);h!==-1&&i[h].push(c)}return i}function vu(t,e,n){let i=n;return pu(t)&&e.some((o,s)=>o!=="*"&&fu(t,o)?(i=s,!0):!1),i}var yu=10,bu=class{componentFactory;inputMap=new Map;constructor(t,e){this.componentFactory=e.get(r.ha).resolveComponentFactory(t);for(let n of this.componentFactory.inputs)this.inputMap.set(n.propName,n.templateName)}create(t){return new wu(this.componentFactory,t,this.inputMap)}},wu=class{componentFactory;injector;inputMap;eventEmitters=new r.l(1);events=this.eventEmitters.pipe((0,r.C)(t=>(0,r.v)(...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(r.V),this.appRef=this.injector.get(r.ta),this.cdScheduler=e.get(r.T),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=hu.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},yu))})}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=r.S.create({providers:[],parent:this.injector}),n=mu(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:i})=>{let o=t.instance[n];return new r.i(s=>{let a=o.subscribe(c=>s.next({name:i,value:c}));return()=>a.unsubscribe()})});this.eventEmitters.next(e)}runInZone(t){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(t):t()}},Eu=class extends HTMLElement{ngElementEventsSubscription=null};function xu(t,e){let n=_u(t,e.injector),i=e.strategyFactory||new bu(t,e.injector),o=gu(n);class s extends Eu{injector;static observedAttributes=Object.keys(o);get ngElementStrategy(){if(!this._ngElementStrategy){let c=this._ngElementStrategy=i.create(this.injector||e.injector);n.forEach(({propName:h,transform:f})=>{if(!this.hasOwnProperty(h))return;let _=this[h];delete this[h],c.setInputValue(h,_,f)})}return this._ngElementStrategy}_ngElementStrategy;constructor(c){super(),this.injector=c}attributeChangedCallback(c,h,f,_){let[d,E]=o[c];this.ngElementStrategy.setInputValue(d,f,E)}connectedCallback(){let c=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),c=!0),this.ngElementStrategy.connect(this),c||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(c=>{let h=new CustomEvent(c.name,{detail:c.value});this.dispatchEvent(h)})}}return n.forEach(({propName:a,transform:c})=>{Object.defineProperty(s.prototype,a,{get(){return this.ngElementStrategy.getInputValue(a)},set(h){this.ngElementStrategy.setInputValue(a,h,c)},configurable:!0,enumerable:!0})}),s}var Su="9.12.2",Ft=class tr{static SDK_VERSION=Su;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_OPEN_CART="Open 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=tr.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");tr.SDK_VERSION_CODE=parseInt(e,10)}},en={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Ft.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Ft.SDK_VERSION}/dist/widget.min.js`},te=(0,r.e)(cu()),me=class{static log(...t){te.default.info(...t)}static debug(...t){te.default.debug(...t)}static error(...t){te.default.error(...t)}static warn(...t){te.default.warn(...t)}static info(...t){te.default.info(...t)}static trace(...t){te.default.trace(...t)}};function Cu(t=Ft.LOG_PREFIX){te.default.useDefaults({formatter:function(n){n.unshift(`${t} (v${Ft.SDK_VERSION}):`)}});let e=Tu();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?te.default.setLevel(te.default[localStorage.cooeeLogLevel]):te.default.setLevel(en.debug?te.default.TRACE:te.default.OFF)}function Tu(){return new URL(location.href).searchParams?.get("cooee-debug")}var An=(0,r.e)(Da()),Ou={providers:[(0,r.db)()]},Iu={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},uy=(0,r.b)((0,r.a)({},Iu),{"[class.ng-submitted]":"isSubmitted"}),Du=new r.I("",{providedIn:"root",factory:()=>Ra}),Ra="always",Ru=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=(0,r.oa)({type:t});static \u0275inj=(0,r.H)({})}return t})(),Pu=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:Du,useValue:n.callSetDisabledState??Ra}]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=(0,r.oa)({type:t});static \u0275inj=(0,r.H)({imports:[Ru]})}return t})(),Le=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,en.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=i=>{let o=i.currentTarget?.sheet?.cssRules;if(o){for(let s of o)if(s.type==CSSRule.FONT_FACE_RULE){let a=t.split("/"),c=a.slice(0,a.length-1).join("/"),h=s.cssText;h=h.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${c}/$4")`);let f=document.createElement("style");f.appendChild(document.createTextNode(h)),document.head.appendChild(f)}}}),e.appendChild(n)}static async loadSwiperScript(){window.CooeeSDK.Swiper||(window.CooeeSDK.Swiper=(await import("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.mjs")).Swiper)}},hi=class er{cooeeEvent=new r.U;cooeeCTA=new r.U;elementRef=(0,r.K)(r.X);_engagementTrigger=(0,r.Y)(null);_triggerContext=(0,r.Y)(null);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get classes(){let e=["letscooee-widget"],n=this._engagementTrigger();return e.push(`widget-${n?.shortID}`),e}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(){me.debug("Init",this.constructor.name);let e=this.elementRef.nativeElement.shadowRoot;e&&(Le.injectStylesheet(en.styleURL,e),Le.injectRawCSS(window.CooeeSDK.config.website.commonCSS,e))}ngOnDestroy(){me.debug("Destroying",this.constructor.name)}sendEventToRenderer(e){this.cooeeEvent.emit(e)}executeCTAViaRenderer(e){this.cooeeCTA.emit(e)}static \u0275fac=function(e){return new(e||er)};static \u0275cmp=(0,r.na)({type:er,selectors:[["ng-component"]],hostVars:2,hostBindings:function(e,n){e&2&&(0,r.ya)(n.classes)},inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:0,vars:0,template:function(e,n){},encapsulation:2})},ku=(t,e,n)=>({"--option-color":t,"background-color":e,color:n}),Pa=(t,e)=>e.id;function Nu(t,e){if(t&1&&((0,r.Ea)(0,"span",6),(0,r.Qa)(1),(0,r.Fa)()),t&2){(0,r.Ka)();let n=(0,r.Va)(0);(0,r.fa)(),(0,r.Ra)(n)}}function Au(t,e){if(t&1){let n=(0,r.Ia)();(0,r.Ta)(0),(0,r.Ea)(1,"button",5),(0,r.Ja)("click",function(){let i=(0,r.N)(n).$implicit,o=(0,r.Ka)().$implicit,s=(0,r.Ka)();return(0,r.O)(s.onOptionChange(o,i))}),(0,r.sa)(2,Nu,2,1,"span",6),(0,r.Fa)()}if(t&2){let n=e.$implicit,i=(0,r.Ka)().$implicit,o=(0,r.Va)(1),s=(0,r.Ka)(),a=(0,r.Ua)(n.name);(0,r.fa)(),(0,r.xa)("color-type",o)("selected",s.selectedOptions()[i.name]===a),(0,r.va)("disabled",n.disabled)("ngStyle",(0,r.Za)(9,ku,o?a:"",o?a:"",o?"transparent":"")),(0,r.ua)("data-value",a),(0,r.fa)(),(0,r.Aa)(o?-1:2)}}function Mu(t,e){if(t&1&&((0,r.Ea)(0,"div"),(0,r.Ta)(1),(0,r.Ea)(2,"div",1),(0,r.Qa)(3),(0,r.Fa)(),(0,r.Ea)(4,"div",2),(0,r.Qa)(5),(0,r.Fa)(),(0,r.Ea)(6,"div",3),(0,r.Ca)(7,Au,3,13,"button",4,Pa),(0,r.Fa)()()),t&2){let n=e.$implicit,i=(0,r.Ka)();(0,r.za)("option-group ",n.name.toLowerCase(),""),(0,r.fa)(),(0,r.Ua)(n.name.toLowerCase().includes("color")),(0,r.fa)(2),(0,r.Sa)("",n.name,":"),(0,r.fa)(2),(0,r.Ra)(i.selectedOptions()[n.name]),(0,r.fa)(2),(0,r.Da)(n.optionValues)}}var Lu=class nr extends hi{selectedVariant=new r.U;item=r.W.required();selectedOptions=(0,r.Y)({});options=(0,r.ib)(()=>{let e=this.item();return!e.options||e.vars.length===1?[]:e.options});matchedVariant=(0,r.ib)(()=>{let e=this.item(),n=this.selectedOptions();return e.vars.find(i=>e.options.every(o=>n[o.name]===i.selectedOptions.find(s=>s.name===o.name)?.value))});constructor(){super(),(0,r.jb)(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let e=(0,r.jb)(()=>{let n=this.item();if(!n?.options)return;let i=(0,r.a)({},this.selectedOptions());n.options.forEach(o=>{let s=n.vars[0]?.selectedOptions.find(a=>a.name===o.name)?.value;s&&(i[o.name]=s)}),this.selectedOptions.set(i),e.destroy()})}onOptionChange(e,n){let i=(0,r.a)({},this.selectedOptions());i[e.name]=n.name,this.selectedOptions.set(i)}engagementTriggerReceived(){}update(){}static \u0275fac=function(e){return new(e||nr)};static \u0275cmp=(0,r.na)({type:nr,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[r.ra],decls:2,vars:0,consts:[[3,"class"],[1,"name"],[1,"selected-value"],[1,"option-values"],[1,"option-value",3,"disabled","color-type","selected","ngStyle"],[1,"option-value",3,"click","disabled","ngStyle"],[1,"title"]],template:function(e,n){e&1&&(0,r.Ca)(0,Mu,9,6,"div",0,Pa),e&2&&(0,r.Da)(n.options())},dependencies:[r.rb,r.ob,Pu],styles:[`.option-group{display:flex;gap:8px;align-items:center}.option-group+.option-group{margin-top:8px}.option-values{display:flex;flex-wrap:nowrap;overflow-x:auto;padding:6px;gap:8px}.selected-value{display:none}.option-value{padding:5px 10px;border:1px solid #ccc;cursor:pointer;border-radius:4px;min-width:32px;min-height:32px;text-align:center;position:relative;--selected-color: var(--option-color, var(--lc-color-button, rgb(var(--color-button, 0 0 0))))}.option-value.selected{box-shadow:#fff 0 0 0 2px,var(--selected-color) 0 0 0 4px}
|
|
11
|
-
`],encapsulation:3})},ka=function(t){return t.SHOPIFY_CHECKOUT="shopify_checkout",t.THIRD_PARTY_CHECKOUT="third_party_checkout",t.CART_PAGE="cart_page",t.CART_DRAWER="cart_drawer",t}(ka||{}),fe=function(t){return t[t.NONE=0]="NONE",t[t.REJECT_POPUP=1]="REJECT_POPUP",t[t.ACCEPT_POPUP=2]="ACCEPT_POPUP",t[t.GO_TO_URL=4]="GO_TO_URL",t[t.SHARE=5]="SHARE",t[t.KEY_VALUE=100]="KEY_VALUE",t[t.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",t[t.ADD_TO_CART=102]="ADD_TO_CART",t[t.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",t[t.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",t[t.OPEN_CART=105]="OPEN_CART",t[t.SUBMIT_FORM=106]="SUBMIT_FORM",t[t.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",t[t.ADD_BUNDLE=108]="ADD_BUNDLE",t[t.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",t}(fe||{}),qn=function(t){return t.FREE_SHIPPING="FREE_SHIPPING",t.DISCOUNT="DISCOUNT",t.FREE_AUTO_GIFT="FREE_AUTO_GIFT",t.FREE_GIFT_SELECT="FREE_GIFT_SELECT",t.UI_ONLY="UI_ONLY",t}(qn||{}),Bu=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}},Na=(t=>(t.CART_AMOUNT="CART_AMOUNT",t.ITEM_COUNT="ITEM_COUNT",t))(Na||{}),Aa=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}},Ma=Object.prototype.toString;function Gr(t){switch(Ma.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Ve(t,Error)}}function
|
|
10
|
+
`+M(R,m)):F}}function gt(R,O){var v;return O.cache&&O.name&&O.storage.templates.get(O.name)?O.storage.templates.get(O.name):(v=typeof R=="function"?R:Pt(R,O),O.cache&&O.name&&O.storage.templates.define(O.name,v),v)}xt.l.bind(xt),n.compile=Pt,n.compileScope=Q,n.compileScopeIntoFunction=H,n.compileToString=M,n.defaultConfig=xt,n.filters=Ot,n.getConfig=It,n.helpers=st,n.nativeHelpers=ft,n.parse=D,n.render=function(R,O,v,m){var k=It(v||{});if(!k.async)return gt(R,k)(O,k);if(!m){if(typeof s=="function")return new s(function(F,W){try{F(gt(R,k)(O,k))}catch(K){W(K)}});throw i("Please provide a callback function, this env doesn't support Promises")}try{gt(R,k)(O,k,m)}catch(F){return m(F)}},n.templates=ot,Object.defineProperty(n,"__esModule",{value:!0})})}),uu=(0,r.d)((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 i;typeof window<"u"?i=window:typeof global<"u"?i=global:typeof self<"u"?i=self:i=this,i.localforage=n()}})(function(){var n,i,o;return function s(a,c,h){function f(E,I){if(!c[E]){if(!a[E]){var S=typeof r.c=="function"&&r.c;if(!I&&S)return S(E,!0);if(_)return _(E,!0);var D=new Error("Cannot find module '"+E+"'");throw D.code="MODULE_NOT_FOUND",D}var M=c[E]={exports:{}};a[E][0].call(M.exports,function(L){var z=a[E][1][L];return f(z||L)},M,M.exports,s,a,c,h)}return c[E].exports}for(var _=typeof r.c=="function"&&r.c,d=0;d<h.length;d++)f(h[d]);return f}({1:[function(s,a,c){(function(h){"use strict";var f=h.MutationObserver||h.WebKitMutationObserver,_;if(f){var d=0,E=new f(L),I=h.document.createTextNode("");E.observe(I,{characterData:!0}),_=function(){I.data=d=++d%2}}else if(!h.setImmediate&&typeof h.MessageChannel<"u"){var S=new h.MessageChannel;S.port1.onmessage=L,_=function(){S.port2.postMessage(0)}}else"document"in h&&"onreadystatechange"in h.document.createElement("script")?_=function(){var X=h.document.createElement("script");X.onreadystatechange=function(){L(),X.onreadystatechange=null,X.parentNode.removeChild(X),X=null},h.document.documentElement.appendChild(X)}:_=function(){setTimeout(L,0)};var D,M=[];function L(){D=!0;for(var X,H,Q=M.length;Q;){for(H=M,M=[],X=-1;++X<Q;)H[X]();Q=M.length}D=!1}a.exports=z;function z(X){M.push(X)===1&&!D&&_()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(s,a,c){"use strict";var h=s(1);function f(){}var _={},d=["REJECTED"],E=["FULFILLED"],I=["PENDING"];a.exports=S;function S(j){if(typeof j!="function")throw new TypeError("resolver must be a function");this.state=I,this.queue=[],this.outcome=void 0,j!==f&&z(this,j)}S.prototype.catch=function(j){return this.then(null,j)},S.prototype.then=function(j,ct){if(typeof j!="function"&&this.state===E||typeof ct!="function"&&this.state===d)return this;var ot=new this.constructor(f);if(this.state!==I){var st=this.state===E?j:ct;M(ot,st,this.outcome)}else this.queue.push(new D(ot,j,ct));return ot};function D(j,ct,ot){this.promise=j,typeof ct=="function"&&(this.onFulfilled=ct,this.callFulfilled=this.otherCallFulfilled),typeof ot=="function"&&(this.onRejected=ot,this.callRejected=this.otherCallRejected)}D.prototype.callFulfilled=function(j){_.resolve(this.promise,j)},D.prototype.otherCallFulfilled=function(j){M(this.promise,this.onFulfilled,j)},D.prototype.callRejected=function(j){_.reject(this.promise,j)},D.prototype.otherCallRejected=function(j){M(this.promise,this.onRejected,j)};function M(j,ct,ot){h(function(){var st;try{st=ct(ot)}catch(ft){return _.reject(j,ft)}st===j?_.reject(j,new TypeError("Cannot resolve promise with itself")):_.resolve(j,st)})}_.resolve=function(j,ct){var ot=X(L,ct);if(ot.status==="error")return _.reject(j,ot.value);var st=ot.value;if(st)z(j,st);else{j.state=E,j.outcome=ct;for(var ft=-1,Ot=j.queue.length;++ft<Ot;)j.queue[ft].callFulfilled(ct)}return j},_.reject=function(j,ct){j.state=d,j.outcome=ct;for(var ot=-1,st=j.queue.length;++ot<st;)j.queue[ot].callRejected(ct);return j};function L(j){var ct=j&&j.then;if(j&&(typeof j=="object"||typeof j=="function")&&typeof ct=="function")return function(){ct.apply(j,arguments)}}function z(j,ct){var ot=!1;function st(It){ot||(ot=!0,_.reject(j,It))}function ft(It){ot||(ot=!0,_.resolve(j,It))}function Ot(){ct(ft,st)}var xt=X(Ot);xt.status==="error"&&st(xt.value)}function X(j,ct){var ot={};try{ot.value=j(ct),ot.status="success"}catch(st){ot.status="error",ot.value=st}return ot}S.resolve=H;function H(j){return j instanceof this?j:_.resolve(new this(f),j)}S.reject=Q;function Q(j){var ct=new this(f);return _.reject(ct,j)}S.all=mt;function mt(j){var ct=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var ot=j.length,st=!1;if(!ot)return this.resolve([]);for(var ft=new Array(ot),Ot=0,xt=-1,It=new this(f);++xt<ot;)Pt(j[xt],xt);return It;function Pt(gt,R){ct.resolve(gt).then(O,function(v){st||(st=!0,_.reject(It,v))});function O(v){ft[R]=v,++Ot===ot&&!st&&(st=!0,_.resolve(It,ft))}}}S.race=vt;function vt(j){var ct=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var ot=j.length,st=!1;if(!ot)return this.resolve([]);for(var ft=-1,Ot=new this(f);++ft<ot;)xt(j[ft]);return Ot;function xt(It){ct.resolve(It).then(function(Pt){st||(st=!0,_.resolve(Ot,Pt))},function(Pt){st||(st=!0,_.reject(Ot,Pt))})}}},{1:1}],3:[function(s,a,c){(function(h){"use strict";typeof h.Promise!="function"&&(h.Promise=s(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(s,a,c){"use strict";var h=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 f(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")}function _(){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=_();function E(){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),y=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!g||y)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function I(g,y){g=g||[],y=y||{};try{return new Blob(g,y)}catch(T){if(T.name!=="TypeError")throw T;for(var b=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,C=new b,x=0;x<g.length;x+=1)C.append(g[x]);return C.getBlob(y.type)}}typeof Promise>"u"&&s(3);var S=Promise;function D(g,y){y&&g.then(function(b){y(null,b)},function(b){y(b)})}function M(g,y,b){typeof y=="function"&&g.then(y),typeof b=="function"&&g.catch(b)}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 X="local-forage-detect-blob-support",H=void 0,Q={},mt=Object.prototype.toString,vt="readonly",j="readwrite";function ct(g){for(var y=g.length,b=new ArrayBuffer(y),C=new Uint8Array(b),x=0;x<y;x++)C[x]=g.charCodeAt(x);return b}function ot(g){return new S(function(y){var b=g.transaction(X,j),C=I([""]);b.objectStore(X).put(C,"key"),b.onabort=function(x){x.preventDefault(),x.stopPropagation(),y(!1)},b.oncomplete=function(){var x=navigator.userAgent.match(/Chrome\/(\d+)/),T=navigator.userAgent.match(/Edge\//);y(T||!x||parseInt(x[1],10)>=43)}}).catch(function(){return!1})}function st(g){return typeof H=="boolean"?S.resolve(H):ot(g).then(function(y){return H=y,H})}function ft(g){var y=Q[g.name],b={};b.promise=new S(function(C,x){b.resolve=C,b.reject=x}),y.deferredOperations.push(b),y.dbReady?y.dbReady=y.dbReady.then(function(){return b.promise}):y.dbReady=b.promise}function Ot(g){var y=Q[g.name],b=y.deferredOperations.pop();if(b)return b.resolve(),b.promise}function xt(g,y){var b=Q[g.name],C=b.deferredOperations.pop();if(C)return C.reject(y),C.promise}function It(g,y){return new S(function(b,C){if(Q[g.name]=Q[g.name]||K(),g.db)if(y)ft(g),g.db.close();else return b(g.db);var x=[g.name];y&&x.push(g.version);var T=d.open.apply(d,x);y&&(T.onupgradeneeded=function(N){var B=T.result;try{B.createObjectStore(g.storeName),N.oldVersion<=1&&B.createObjectStore(X)}catch($){if($.name==="ConstraintError")console.warn('The database "'+g.name+'" has been upgraded from version '+N.oldVersion+" to version "+N.newVersion+', but the storage "'+g.storeName+'" already exists.');else throw $}}),T.onerror=function(N){N.preventDefault(),C(T.error)},T.onsuccess=function(){var N=T.result;N.onversionchange=function(B){B.target.close()},b(N),Ot(g)}})}function Pt(g){return It(g,!1)}function gt(g){return It(g,!0)}function R(g,y){if(!g.db)return!0;var b=!g.db.objectStoreNames.contains(g.storeName),C=g.version<g.db.version,x=g.version>g.db.version;if(C&&(g.version!==y&&console.warn('The database "'+g.name+`" can't be downgraded from version `+g.db.version+" to version "+g.version+"."),g.version=g.db.version),x||b){if(b){var T=g.db.version+1;T>g.version&&(g.version=T)}return!0}return!1}function O(g){return new S(function(y,b){var C=new FileReader;C.onerror=b,C.onloadend=function(x){var T=btoa(x.target.result||"");y({__local_forage_encoded_blob:!0,data:T,type:g.type})},C.readAsBinaryString(g)})}function v(g){var y=ct(atob(g.data));return I([y],{type:g.type})}function m(g){return g&&g.__local_forage_encoded_blob}function k(g){var y=this,b=y._initReady().then(function(){var C=Q[y._dbInfo.name];if(C&&C.dbReady)return C.dbReady});return M(b,g,g),b}function F(g){ft(g);for(var y=Q[g.name],b=y.forages,C=0;C<b.length;C++){var x=b[C];x._dbInfo.db&&(x._dbInfo.db.close(),x._dbInfo.db=null)}return g.db=null,Pt(g).then(function(T){return g.db=T,R(g)?gt(g):T}).then(function(T){g.db=y.db=T;for(var N=0;N<b.length;N++)b[N]._dbInfo.db=T}).catch(function(T){throw xt(g,T),T})}function W(g,y,b,C){C===void 0&&(C=1);try{var x=g.db.transaction(g.storeName,y);b(null,x)}catch(T){if(C>0&&(!g.db||T.name==="InvalidStateError"||T.name==="NotFoundError"))return S.resolve().then(function(){if(!g.db||T.name==="NotFoundError"&&!g.db.objectStoreNames.contains(g.storeName)&&g.version<=g.db.version)return g.db&&(g.version=g.db.version+1),gt(g)}).then(function(){return F(g).then(function(){W(g,y,b,C-1)})}).catch(b);b(T)}}function K(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Y(g){var y=this,b={db:null};if(g)for(var C in g)b[C]=g[C];var x=Q[b.name];x||(x=K(),Q[b.name]=x),x.forages.push(y),y._initReady||(y._initReady=y.ready,y.ready=k);var T=[];function N(){return S.resolve()}for(var B=0;B<x.forages.length;B++){var $=x.forages[B];$!==y&&T.push($._initReady().catch(N))}var U=x.forages.slice(0);return S.all(T).then(function(){return b.db=x.db,Pt(b)}).then(function(V){return b.db=V,R(b,y._defaultConfig.version)?gt(b):V}).then(function(V){b.db=x.db=V,y._dbInfo=b;for(var nt=0;nt<U.length;nt++){var pt=U[nt];pt!==y&&(pt._dbInfo.db=b.db,pt._dbInfo.version=b.version)}})}function G(g,y){var b=this;g=L(g);var C=new S(function(x,T){b.ready().then(function(){W(b._dbInfo,vt,function(N,B){if(N)return T(N);try{var $=B.objectStore(b._dbInfo.storeName),U=$.get(g);U.onsuccess=function(){var V=U.result;V===void 0&&(V=null),m(V)&&(V=v(V)),x(V)},U.onerror=function(){T(U.error)}}catch(V){T(V)}})}).catch(T)});return D(C,y),C}function it(g,y){var b=this,C=new S(function(x,T){b.ready().then(function(){W(b._dbInfo,vt,function(N,B){if(N)return T(N);try{var $=B.objectStore(b._dbInfo.storeName),U=$.openCursor(),V=1;U.onsuccess=function(){var nt=U.result;if(nt){var pt=nt.value;m(pt)&&(pt=v(pt));var Ct=g(pt,nt.key,V++);Ct!==void 0?x(Ct):nt.continue()}else x()},U.onerror=function(){T(U.error)}}catch(nt){T(nt)}})}).catch(T)});return D(C,y),C}function at(g,y,b){var C=this;g=L(g);var x=new S(function(T,N){var B;C.ready().then(function(){return B=C._dbInfo,mt.call(y)==="[object Blob]"?st(B.db).then(function($){return $?y:O(y)}):y}).then(function($){W(C._dbInfo,j,function(U,V){if(U)return N(U);try{var nt=V.objectStore(C._dbInfo.storeName);$===null&&($=void 0);var pt=nt.put($,g);V.oncomplete=function(){$===void 0&&($=null),T($)},V.onabort=V.onerror=function(){var Ct=pt.error?pt.error:pt.transaction.error;N(Ct)}}catch(Ct){N(Ct)}})}).catch(N)});return D(x,b),x}function ht(g,y){var b=this;g=L(g);var C=new S(function(x,T){b.ready().then(function(){W(b._dbInfo,j,function(N,B){if(N)return T(N);try{var $=B.objectStore(b._dbInfo.storeName),U=$.delete(g);B.oncomplete=function(){x()},B.onerror=function(){T(U.error)},B.onabort=function(){var V=U.error?U.error:U.transaction.error;T(V)}}catch(V){T(V)}})}).catch(T)});return D(C,y),C}function q(g){var y=this,b=new S(function(C,x){y.ready().then(function(){W(y._dbInfo,j,function(T,N){if(T)return x(T);try{var B=N.objectStore(y._dbInfo.storeName),$=B.clear();N.oncomplete=function(){C()},N.onabort=N.onerror=function(){var U=$.error?$.error:$.transaction.error;x(U)}}catch(U){x(U)}})}).catch(x)});return D(b,g),b}function tt(g){var y=this,b=new S(function(C,x){y.ready().then(function(){W(y._dbInfo,vt,function(T,N){if(T)return x(T);try{var B=N.objectStore(y._dbInfo.storeName),$=B.count();$.onsuccess=function(){C($.result)},$.onerror=function(){x($.error)}}catch(U){x(U)}})}).catch(x)});return D(b,g),b}function lt(g,y){var b=this,C=new S(function(x,T){if(g<0){x(null);return}b.ready().then(function(){W(b._dbInfo,vt,function(N,B){if(N)return T(N);try{var $=B.objectStore(b._dbInfo.storeName),U=!1,V=$.openKeyCursor();V.onsuccess=function(){var nt=V.result;if(!nt){x(null);return}g===0||U?x(nt.key):(U=!0,nt.advance(g))},V.onerror=function(){T(V.error)}}catch(nt){T(nt)}})}).catch(T)});return D(C,y),C}function rt(g){var y=this,b=new S(function(C,x){y.ready().then(function(){W(y._dbInfo,vt,function(T,N){if(T)return x(T);try{var B=N.objectStore(y._dbInfo.storeName),$=B.openKeyCursor(),U=[];$.onsuccess=function(){var V=$.result;if(!V){C(U);return}U.push(V.key),V.continue()},$.onerror=function(){x($.error)}}catch(V){x(V)}})}).catch(x)});return D(b,g),b}function l(g,y){y=z.apply(this,arguments);var b=this.config();g=typeof g!="function"&&g||{},g.name||(g.name=g.name||b.name,g.storeName=g.storeName||b.storeName);var C=this,x;if(!g.name)x=S.reject("Invalid arguments");else{var T=g.name===b.name&&C._dbInfo.db,N=T?S.resolve(C._dbInfo.db):Pt(g).then(function(B){var $=Q[g.name],U=$.forages;$.db=B;for(var V=0;V<U.length;V++)U[V]._dbInfo.db=B;return B});g.storeName?x=N.then(function(B){if(B.objectStoreNames.contains(g.storeName)){var $=B.version+1;ft(g);var U=Q[g.name],V=U.forages;B.close();for(var nt=0;nt<V.length;nt++){var pt=V[nt];pt._dbInfo.db=null,pt._dbInfo.version=$}var Ct=new S(function(St,Mt){var Rt=d.open(g.name,$);Rt.onerror=function(Jt){var Ri=Rt.result;Ri.close(),Mt(Jt)},Rt.onupgradeneeded=function(){var Jt=Rt.result;Jt.deleteObjectStore(g.storeName)},Rt.onsuccess=function(){var Jt=Rt.result;Jt.close(),St(Jt)}});return Ct.then(function(St){U.db=St;for(var Mt=0;Mt<V.length;Mt++){var Rt=V[Mt];Rt._dbInfo.db=St,Ot(Rt._dbInfo)}}).catch(function(St){throw(xt(g,St)||S.resolve()).catch(function(){}),St})}}):x=N.then(function(B){ft(g);var $=Q[g.name],U=$.forages;B.close();for(var V=0;V<U.length;V++){var nt=U[V];nt._dbInfo.db=null}var pt=new S(function(Ct,St){var Mt=d.deleteDatabase(g.name);Mt.onerror=function(){var Rt=Mt.result;Rt&&Rt.close(),St(Mt.error)},Mt.onblocked=function(){console.warn('dropInstance blocked for database "'+g.name+'" until all open connections are closed')},Mt.onsuccess=function(){var Rt=Mt.result;Rt&&Rt.close(),Ct(Rt)}});return pt.then(function(Ct){$.db=Ct;for(var St=0;St<U.length;St++){var Mt=U[St];Ot(Mt._dbInfo)}}).catch(function(Ct){throw(xt(g,Ct)||S.resolve()).catch(function(){}),Ct})})}return D(x,y),x}var u={_driver:"asyncStorage",_initStorage:Y,_support:E(),iterate:it,getItem:G,setItem:at,removeItem:ht,clear:q,length:tt,key:lt,keys:rt,dropInstance:l};function p(){return typeof openDatabase=="function"}var w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",P="~~local_forage_type~",A=/^~~local_forage_type~([^~]+)~/,Z="__lfsc__:",J=Z.length,yt="arbf",dt="blob",bt="si08",_t="ui08",jt="uic8",ge="si16",At="si32",ie="ur16",ue="ui32",we="fl32",Zt="fl64",re=J+yt.length,Ro=Object.prototype.toString;function Po(g){var y=g.length*.75,b=g.length,C,x=0,T,N,B,$;g[g.length-1]==="="&&(y--,g[g.length-2]==="="&&y--);var U=new ArrayBuffer(y),V=new Uint8Array(U);for(C=0;C<b;C+=4)T=w.indexOf(g[C]),N=w.indexOf(g[C+1]),B=w.indexOf(g[C+2]),$=w.indexOf(g[C+3]),V[x++]=T<<2|N>>4,V[x++]=(N&15)<<4|B>>2,V[x++]=(B&3)<<6|$&63;return U}function Ti(g){var y=new Uint8Array(g),b="",C;for(C=0;C<y.length;C+=3)b+=w[y[C]>>2],b+=w[(y[C]&3)<<4|y[C+1]>>4],b+=w[(y[C+1]&15)<<2|y[C+2]>>6],b+=w[y[C+2]&63];return y.length%3===2?b=b.substring(0,b.length-1)+"=":y.length%3===1&&(b=b.substring(0,b.length-2)+"=="),b}function bc(g,y){var b="";if(g&&(b=Ro.call(g)),g&&(b==="[object ArrayBuffer]"||g.buffer&&Ro.call(g.buffer)==="[object ArrayBuffer]")){var C,x=Z;g instanceof ArrayBuffer?(C=g,x+=yt):(C=g.buffer,b==="[object Int8Array]"?x+=bt:b==="[object Uint8Array]"?x+=_t:b==="[object Uint8ClampedArray]"?x+=jt:b==="[object Int16Array]"?x+=ge:b==="[object Uint16Array]"?x+=ie:b==="[object Int32Array]"?x+=At:b==="[object Uint32Array]"?x+=ue:b==="[object Float32Array]"?x+=we:b==="[object Float64Array]"?x+=Zt:y(new Error("Failed to get type for BinaryArray"))),y(x+Ti(C))}else if(b==="[object Blob]"){var T=new FileReader;T.onload=function(){var N=P+g.type+"~"+Ti(this.result);y(Z+dt+N)},T.readAsArrayBuffer(g)}else try{y(JSON.stringify(g))}catch(N){console.error("Couldn't convert value into a JSON string: ",g),y(null,N)}}function wc(g){if(g.substring(0,J)!==Z)return JSON.parse(g);var y=g.substring(re),b=g.substring(J,re),C;if(b===dt&&A.test(y)){var x=y.match(A);C=x[1],y=y.substring(x[0].length)}var T=Po(y);switch(b){case yt:return T;case dt:return I([T],{type:C});case bt:return new Int8Array(T);case _t:return new Uint8Array(T);case jt:return new Uint8ClampedArray(T);case ge:return new Int16Array(T);case ie:return new Uint16Array(T);case At:return new Int32Array(T);case ue:return new Uint32Array(T);case we:return new Float32Array(T);case Zt:return new Float64Array(T);default:throw new Error("Unkown type: "+b)}}var Oi={serialize:bc,deserialize:wc,stringToBuffer:Po,bufferToString:Ti};function ko(g,y,b,C){g.executeSql("CREATE TABLE IF NOT EXISTS "+y.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],b,C)}function Ec(g){var y=this,b={db:null};if(g)for(var C in g)b[C]=typeof g[C]!="string"?g[C].toString():g[C];var x=new S(function(T,N){try{b.db=openDatabase(b.name,String(b.version),b.description,b.size)}catch(B){return N(B)}b.db.transaction(function(B){ko(B,b,function(){y._dbInfo=b,T()},function($,U){N(U)})},N)});return b.serializer=Oi,x}function Ee(g,y,b,C,x,T){g.executeSql(b,C,x,function(N,B){B.code===B.SYNTAX_ERR?N.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[y.storeName],function($,U){U.rows.length?T($,B):ko($,y,function(){$.executeSql(b,C,x,T)},T)},T):T(N,B)},T)}function xc(g,y){var b=this;g=L(g);var C=new S(function(x,T){b.ready().then(function(){var N=b._dbInfo;N.db.transaction(function(B){Ee(B,N,"SELECT * FROM "+N.storeName+" WHERE key = ? LIMIT 1",[g],function($,U){var V=U.rows.length?U.rows.item(0).value:null;V&&(V=N.serializer.deserialize(V)),x(V)},function($,U){T(U)})})}).catch(T)});return D(C,y),C}function Sc(g,y){var b=this,C=new S(function(x,T){b.ready().then(function(){var N=b._dbInfo;N.db.transaction(function(B){Ee(B,N,"SELECT * FROM "+N.storeName,[],function($,U){for(var V=U.rows,nt=V.length,pt=0;pt<nt;pt++){var Ct=V.item(pt),St=Ct.value;if(St&&(St=N.serializer.deserialize(St)),St=g(St,Ct.key,pt+1),St!==void 0){x(St);return}}x()},function($,U){T(U)})})}).catch(T)});return D(C,y),C}function No(g,y,b,C){var x=this;g=L(g);var T=new S(function(N,B){x.ready().then(function(){y===void 0&&(y=null);var $=y,U=x._dbInfo;U.serializer.serialize(y,function(V,nt){nt?B(nt):U.db.transaction(function(pt){Ee(pt,U,"INSERT OR REPLACE INTO "+U.storeName+" (key, value) VALUES (?, ?)",[g,V],function(){N($)},function(Ct,St){B(St)})},function(pt){if(pt.code===pt.QUOTA_ERR){if(C>0){N(No.apply(x,[g,$,b,C-1]));return}B(pt)}})})}).catch(B)});return D(T,b),T}function Cc(g,y,b){return No.apply(this,[g,y,b,1])}function Tc(g,y){var b=this;g=L(g);var C=new S(function(x,T){b.ready().then(function(){var N=b._dbInfo;N.db.transaction(function(B){Ee(B,N,"DELETE FROM "+N.storeName+" WHERE key = ?",[g],function(){x()},function($,U){T(U)})})}).catch(T)});return D(C,y),C}function Oc(g){var y=this,b=new S(function(C,x){y.ready().then(function(){var T=y._dbInfo;T.db.transaction(function(N){Ee(N,T,"DELETE FROM "+T.storeName,[],function(){C()},function(B,$){x($)})})}).catch(x)});return D(b,g),b}function Ic(g){var y=this,b=new S(function(C,x){y.ready().then(function(){var T=y._dbInfo;T.db.transaction(function(N){Ee(N,T,"SELECT COUNT(key) as c FROM "+T.storeName,[],function(B,$){var U=$.rows.item(0).c;C(U)},function(B,$){x($)})})}).catch(x)});return D(b,g),b}function Dc(g,y){var b=this,C=new S(function(x,T){b.ready().then(function(){var N=b._dbInfo;N.db.transaction(function(B){Ee(B,N,"SELECT key FROM "+N.storeName+" WHERE id = ? LIMIT 1",[g+1],function($,U){var V=U.rows.length?U.rows.item(0).key:null;x(V)},function($,U){T(U)})})}).catch(T)});return D(C,y),C}function Rc(g){var y=this,b=new S(function(C,x){y.ready().then(function(){var T=y._dbInfo;T.db.transaction(function(N){Ee(N,T,"SELECT key FROM "+T.storeName,[],function(B,$){for(var U=[],V=0;V<$.rows.length;V++)U.push($.rows.item(V).key);C(U)},function(B,$){x($)})})}).catch(x)});return D(b,g),b}function Pc(g){return new S(function(y,b){g.transaction(function(C){C.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(x,T){for(var N=[],B=0;B<T.rows.length;B++)N.push(T.rows.item(B).name);y({db:g,storeNames:N})},function(x,T){b(T)})},function(C){b(C)})})}function kc(g,y){y=z.apply(this,arguments);var b=this.config();g=typeof g!="function"&&g||{},g.name||(g.name=g.name||b.name,g.storeName=g.storeName||b.storeName);var C=this,x;return g.name?x=new S(function(T){var N;g.name===b.name?N=C._dbInfo.db:N=openDatabase(g.name,"","",0),g.storeName?T({db:N,storeNames:[g.storeName]}):T(Pc(N))}).then(function(T){return new S(function(N,B){T.db.transaction(function($){function U(Ct){return new S(function(St,Mt){$.executeSql("DROP TABLE IF EXISTS "+Ct,[],function(){St()},function(Rt,Jt){Mt(Jt)})})}for(var V=[],nt=0,pt=T.storeNames.length;nt<pt;nt++)V.push(U(T.storeNames[nt]));S.all(V).then(function(){N()}).catch(function(Ct){B(Ct)})},function($){B($)})})}):x=S.reject("Invalid arguments"),D(x,y),x}var Nc={_driver:"webSQLStorage",_initStorage:Ec,_support:p(),iterate:Sc,getItem:xc,setItem:Cc,removeItem:Tc,clear:Oc,length:Ic,key:Dc,keys:Rc,dropInstance:kc};function Ac(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function Ao(g,y){var b=g.name+"/";return g.storeName!==y.storeName&&(b+=g.storeName+"/"),b}function Mc(){var g="_localforage_support_test";try{return localStorage.setItem(g,!0),localStorage.removeItem(g),!1}catch{return!0}}function Lc(){return!Mc()||localStorage.length>0}function Bc(g){var y=this,b={};if(g)for(var C in g)b[C]=g[C];return b.keyPrefix=Ao(g,y._defaultConfig),Lc()?(y._dbInfo=b,b.serializer=Oi,S.resolve()):S.reject()}function jc(g){var y=this,b=y.ready().then(function(){for(var C=y._dbInfo.keyPrefix,x=localStorage.length-1;x>=0;x--){var T=localStorage.key(x);T.indexOf(C)===0&&localStorage.removeItem(T)}});return D(b,g),b}function Fc(g,y){var b=this;g=L(g);var C=b.ready().then(function(){var x=b._dbInfo,T=localStorage.getItem(x.keyPrefix+g);return T&&(T=x.serializer.deserialize(T)),T});return D(C,y),C}function Vc(g,y){var b=this,C=b.ready().then(function(){for(var x=b._dbInfo,T=x.keyPrefix,N=T.length,B=localStorage.length,$=1,U=0;U<B;U++){var V=localStorage.key(U);if(V.indexOf(T)===0){var nt=localStorage.getItem(V);if(nt&&(nt=x.serializer.deserialize(nt)),nt=g(nt,V.substring(N),$++),nt!==void 0)return nt}}});return D(C,y),C}function Uc(g,y){var b=this,C=b.ready().then(function(){var x=b._dbInfo,T;try{T=localStorage.key(g)}catch{T=null}return T&&(T=T.substring(x.keyPrefix.length)),T});return D(C,y),C}function $c(g){var y=this,b=y.ready().then(function(){for(var C=y._dbInfo,x=localStorage.length,T=[],N=0;N<x;N++){var B=localStorage.key(N);B.indexOf(C.keyPrefix)===0&&T.push(B.substring(C.keyPrefix.length))}return T});return D(b,g),b}function Hc(g){var y=this,b=y.keys().then(function(C){return C.length});return D(b,g),b}function zc(g,y){var b=this;g=L(g);var C=b.ready().then(function(){var x=b._dbInfo;localStorage.removeItem(x.keyPrefix+g)});return D(C,y),C}function Wc(g,y,b){var C=this;g=L(g);var x=C.ready().then(function(){y===void 0&&(y=null);var T=y;return new S(function(N,B){var $=C._dbInfo;$.serializer.serialize(y,function(U,V){if(V)B(V);else try{localStorage.setItem($.keyPrefix+g,U),N(T)}catch(nt){(nt.name==="QuotaExceededError"||nt.name==="NS_ERROR_DOM_QUOTA_REACHED")&&B(nt),B(nt)}})})});return D(x,b),x}function Gc(g,y){if(y=z.apply(this,arguments),g=typeof g!="function"&&g||{},!g.name){var b=this.config();g.name=g.name||b.name,g.storeName=g.storeName||b.storeName}var C=this,x;return g.name?x=new S(function(T){g.storeName?T(Ao(g,C._defaultConfig)):T(g.name+"/")}).then(function(T){for(var N=localStorage.length-1;N>=0;N--){var B=localStorage.key(N);B.indexOf(T)===0&&localStorage.removeItem(B)}}):x=S.reject("Invalid arguments"),D(x,y),x}var qc={_driver:"localStorageWrapper",_initStorage:Bc,_support:Ac(),iterate:Vc,getItem:Fc,setItem:Wc,removeItem:zc,clear:jc,length:Hc,key:Uc,keys:$c,dropInstance:Gc},Zc=function(g,y){return g===y||typeof g=="number"&&typeof y=="number"&&isNaN(g)&&isNaN(y)},Yc=function(g,y){for(var b=g.length,C=0;C<b;){if(Zc(g[C],y))return!0;C++}return!1},Mo=Array.isArray||function(g){return Object.prototype.toString.call(g)==="[object Array]"},hn={},Lo={},qe={INDEXEDDB:u,WEBSQL:Nc,LOCALSTORAGE:qc},Kc=[qe.INDEXEDDB._driver,qe.WEBSQL._driver,qe.LOCALSTORAGE._driver],Nn=["dropInstance"],Ii=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Nn),Jc={description:"",driver:Kc.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Xc(g,y){g[y]=function(){var b=arguments;return g.ready().then(function(){return g[y].apply(g,b)})}}function Di(){for(var g=1;g<arguments.length;g++){var y=arguments[g];if(y)for(var b in y)y.hasOwnProperty(b)&&(Mo(y[b])?arguments[0][b]=y[b].slice():arguments[0][b]=y[b])}return arguments[0]}var Qc=function(){function g(y){f(this,g);for(var b in qe)if(qe.hasOwnProperty(b)){var C=qe[b],x=C._driver;this[b]=x,hn[x]||this.defineDriver(C)}this._defaultConfig=Di({},Jc),this._config=Di({},this._defaultConfig,y),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(y){if((typeof y>"u"?"undefined":h(y))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var b in y){if(b==="storeName"&&(y[b]=y[b].replace(/\W/g,"_")),b==="version"&&typeof y[b]!="number")return new Error("Database version must be a number.");this._config[b]=y[b]}return"driver"in y&&y.driver?this.setDriver(this._config.driver):!0}else return typeof y=="string"?this._config[y]:this._config},g.prototype.defineDriver=function(y,b,C){var x=new S(function(T,N){try{var B=y._driver,$=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!y._driver){N($);return}for(var U=Ii.concat("_initStorage"),V=0,nt=U.length;V<nt;V++){var pt=U[V],Ct=!Yc(Nn,pt);if((Ct||y[pt])&&typeof y[pt]!="function"){N($);return}}var St=function(){for(var Rt=function(eu){return function(){var nu=new Error("Method "+eu+" is not implemented by the current driver"),Bo=S.reject(nu);return D(Bo,arguments[arguments.length-1]),Bo}},Jt=0,Ri=Nn.length;Jt<Ri;Jt++){var Pi=Nn[Jt];y[Pi]||(y[Pi]=Rt(Pi))}};St();var Mt=function(Rt){hn[B]&&console.info("Redefining LocalForage driver: "+B),hn[B]=y,Lo[B]=Rt,T()};"_support"in y?y._support&&typeof y._support=="function"?y._support().then(Mt,N):Mt(!!y._support):Mt(!0)}catch(Rt){N(Rt)}});return M(x,b,C),x},g.prototype.driver=function(){return this._driver||null},g.prototype.getDriver=function(y,b,C){var x=hn[y]?S.resolve(hn[y]):S.reject(new Error("Driver not found."));return M(x,b,C),x},g.prototype.getSerializer=function(y){var b=S.resolve(Oi);return M(b,y),b},g.prototype.ready=function(y){var b=this,C=b._driverSet.then(function(){return b._ready===null&&(b._ready=b._initDriver()),b._ready});return M(C,y,y),C},g.prototype.setDriver=function(y,b,C){var x=this;Mo(y)||(y=[y]);var T=this._getSupportedDrivers(y);function N(){x._config.driver=x.driver()}function B(V){return x._extend(V),N(),x._ready=x._initStorage(x._config),x._ready}function $(V){return function(){var nt=0;function pt(){for(;nt<V.length;){var Ct=V[nt];return nt++,x._dbInfo=null,x._ready=null,x.getDriver(Ct).then(B).catch(pt)}N();var St=new Error("No available storage method found.");return x._driverSet=S.reject(St),x._driverSet}return pt()}}var U=this._driverSet!==null?this._driverSet.catch(function(){return S.resolve()}):S.resolve();return this._driverSet=U.then(function(){var V=T[0];return x._dbInfo=null,x._ready=null,x.getDriver(V).then(function(nt){x._driver=nt._driver,N(),x._wrapLibraryMethodsWithReady(),x._initDriver=$(T)})}).catch(function(){N();var V=new Error("No available storage method found.");return x._driverSet=S.reject(V),x._driverSet}),M(this._driverSet,b,C),this._driverSet},g.prototype.supports=function(y){return!!Lo[y]},g.prototype._extend=function(y){Di(this,y)},g.prototype._getSupportedDrivers=function(y){for(var b=[],C=0,x=y.length;C<x;C++){var T=y[C];this.supports(T)&&b.push(T)}return b},g.prototype._wrapLibraryMethodsWithReady=function(){for(var y=0,b=Ii.length;y<b;y++)Xc(this,Ii[y])},g.prototype.createInstance=function(y){return new g(y)},g}(),tu=new Qc;a.exports=tu},{3:3}]},{},[4])(4)})}),hu={schedule(t,e){let n=setTimeout(t,e);return()=>clearTimeout(n)}};function du(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function pu(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}var ki;function fu(t,e){if(!ki){let n=Element.prototype;ki=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return t.nodeType===Node.ELEMENT_NODE?ki.call(t,e):!1}function gu(t){let e={};return t.forEach(({propName:n,templateName:i,transform:o})=>{e[du(i)]=[n,o]}),e}function _u(t,e){return e.get(r.ha).resolveComponentFactory(t).inputs}function mu(t,e){let n=t.childNodes,i=e.map(()=>[]),o=-1;e.some((s,a)=>s==="*"?(o=a,!0):!1);for(let s=0,a=n.length;s<a;++s){let c=n[s],h=vu(c,e,o);h!==-1&&i[h].push(c)}return i}function vu(t,e,n){let i=n;return pu(t)&&e.some((o,s)=>o!=="*"&&fu(t,o)?(i=s,!0):!1),i}var yu=10,bu=class{componentFactory;inputMap=new Map;constructor(t,e){this.componentFactory=e.get(r.ha).resolveComponentFactory(t);for(let n of this.componentFactory.inputs)this.inputMap.set(n.propName,n.templateName)}create(t){return new wu(this.componentFactory,t,this.inputMap)}},wu=class{componentFactory;injector;inputMap;eventEmitters=new r.l(1);events=this.eventEmitters.pipe((0,r.C)(t=>(0,r.v)(...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(r.V),this.appRef=this.injector.get(r.ta),this.cdScheduler=e.get(r.T),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=hu.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},yu))})}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=r.S.create({providers:[],parent:this.injector}),n=mu(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:i})=>{let o=t.instance[n];return new r.i(s=>{let a=o.subscribe(c=>s.next({name:i,value:c}));return()=>a.unsubscribe()})});this.eventEmitters.next(e)}runInZone(t){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(t):t()}},Eu=class extends HTMLElement{ngElementEventsSubscription=null};function xu(t,e){let n=_u(t,e.injector),i=e.strategyFactory||new bu(t,e.injector),o=gu(n);class s extends Eu{injector;static observedAttributes=Object.keys(o);get ngElementStrategy(){if(!this._ngElementStrategy){let c=this._ngElementStrategy=i.create(this.injector||e.injector);n.forEach(({propName:h,transform:f})=>{if(!this.hasOwnProperty(h))return;let _=this[h];delete this[h],c.setInputValue(h,_,f)})}return this._ngElementStrategy}_ngElementStrategy;constructor(c){super(),this.injector=c}attributeChangedCallback(c,h,f,_){let[d,E]=o[c];this.ngElementStrategy.setInputValue(d,f,E)}connectedCallback(){let c=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),c=!0),this.ngElementStrategy.connect(this),c||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(c=>{let h=new CustomEvent(c.name,{detail:c.value});this.dispatchEvent(h)})}}return n.forEach(({propName:a,transform:c})=>{Object.defineProperty(s.prototype,a,{get(){return this.ngElementStrategy.getInputValue(a)},set(h){this.ngElementStrategy.setInputValue(a,h,c)},configurable:!0,enumerable:!0})}),s}var Su="9.12.3",Ft=class tr{static SDK_VERSION=Su;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_OPEN_CART="Open 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=tr.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");tr.SDK_VERSION_CODE=parseInt(e,10)}},wn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Ft.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Ft.SDK_VERSION}/dist/widget.min.js`},te=(0,r.e)(cu()),me=class{static log(...t){te.default.info(...t)}static debug(...t){te.default.debug(...t)}static error(...t){te.default.error(...t)}static warn(...t){te.default.warn(...t)}static info(...t){te.default.info(...t)}static trace(...t){te.default.trace(...t)}};function Cu(t=Ft.LOG_PREFIX){te.default.useDefaults({formatter:function(n){n.unshift(`${t} (v${Ft.SDK_VERSION}):`)}});let e=Tu();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?te.default.setLevel(te.default[localStorage.cooeeLogLevel]):te.default.setLevel(wn.debug?te.default.TRACE:te.default.OFF)}function Tu(){return new URL(location.href).searchParams?.get("cooee-debug")}var An=(0,r.e)(Da()),Ou={providers:[(0,r.db)()]},Iu={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},uy=(0,r.b)((0,r.a)({},Iu),{"[class.ng-submitted]":"isSubmitted"}),Du=new r.I("",{providedIn:"root",factory:()=>Ra}),Ra="always",Ru=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=(0,r.oa)({type:t});static \u0275inj=(0,r.H)({})}return t})(),Pu=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:Du,useValue:n.callSetDisabledState??Ra}]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=(0,r.oa)({type:t});static \u0275inj=(0,r.H)({imports:[Ru]})}return t})(),Le=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,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=i=>{let o=i.currentTarget?.sheet?.cssRules;if(o){for(let s of o)if(s.type==CSSRule.FONT_FACE_RULE){let a=t.split("/"),c=a.slice(0,a.length-1).join("/"),h=s.cssText;h=h.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${c}/$4")`);let f=document.createElement("style");f.appendChild(document.createTextNode(h)),document.head.appendChild(f)}}}),e.appendChild(n)}static async loadSwiperScript(){window.CooeeSDK.Swiper||(window.CooeeSDK.Swiper=(await import("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.mjs")).Swiper)}},hi=class er{cooeeEvent=new r.U;cooeeCTA=new r.U;elementRef=(0,r.K)(r.X);_engagementTrigger=(0,r.Y)(null);_triggerContext=(0,r.Y)(null);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get classes(){let e=["letscooee-widget"],n=this._engagementTrigger();return e.push(`widget-${n?.shortID}`),e}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(){me.debug("Init",this.constructor.name);let e=this.elementRef.nativeElement.shadowRoot;e&&(Le.injectStylesheet(wn.styleURL,e),Le.injectRawCSS(window.CooeeSDK.config.website.commonCSS,e))}ngOnDestroy(){me.debug("Destroying",this.constructor.name)}sendEventToRenderer(e){this.cooeeEvent.emit(e)}executeCTAViaRenderer(e){this.cooeeCTA.emit(e)}static \u0275fac=function(e){return new(e||er)};static \u0275cmp=(0,r.na)({type:er,selectors:[["ng-component"]],hostVars:2,hostBindings:function(e,n){e&2&&(0,r.ya)(n.classes)},inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:0,vars:0,template:function(e,n){},encapsulation:2})},ku=(t,e,n)=>({"--option-color":t,"background-color":e,color:n}),Pa=(t,e)=>e.id;function Nu(t,e){if(t&1&&((0,r.Ea)(0,"span",6),(0,r.Qa)(1),(0,r.Fa)()),t&2){(0,r.Ka)();let n=(0,r.Va)(0);(0,r.fa)(),(0,r.Ra)(n)}}function Au(t,e){if(t&1){let n=(0,r.Ia)();(0,r.Ta)(0),(0,r.Ea)(1,"button",5),(0,r.Ja)("click",function(){let i=(0,r.N)(n).$implicit,o=(0,r.Ka)().$implicit,s=(0,r.Ka)();return(0,r.O)(s.onOptionChange(o,i))}),(0,r.sa)(2,Nu,2,1,"span",6),(0,r.Fa)()}if(t&2){let n=e.$implicit,i=(0,r.Ka)().$implicit,o=(0,r.Va)(1),s=(0,r.Ka)(),a=(0,r.Ua)(n.name);(0,r.fa)(),(0,r.xa)("color-type",o)("selected",s.selectedOptions()[i.name]===a),(0,r.va)("disabled",n.disabled)("ngStyle",(0,r.Za)(9,ku,o?a:"",o?a:"",o?"transparent":"")),(0,r.ua)("data-value",a),(0,r.fa)(),(0,r.Aa)(o?-1:2)}}function Mu(t,e){if(t&1&&((0,r.Ea)(0,"div"),(0,r.Ta)(1),(0,r.Ea)(2,"div",1),(0,r.Qa)(3),(0,r.Fa)(),(0,r.Ea)(4,"div",2),(0,r.Qa)(5),(0,r.Fa)(),(0,r.Ea)(6,"div",3),(0,r.Ca)(7,Au,3,13,"button",4,Pa),(0,r.Fa)()()),t&2){let n=e.$implicit,i=(0,r.Ka)();(0,r.za)("option-group ",n.name.toLowerCase(),""),(0,r.fa)(),(0,r.Ua)(n.name.toLowerCase().includes("color")),(0,r.fa)(2),(0,r.Sa)("",n.name,":"),(0,r.fa)(2),(0,r.Ra)(i.selectedOptions()[n.name]),(0,r.fa)(2),(0,r.Da)(n.optionValues)}}var Lu=class nr extends hi{selectedVariant=new r.U;item=r.W.required();selectedOptions=(0,r.Y)({});options=(0,r.ib)(()=>{let e=this.item();return!e.options||e.vars.length===1?[]:e.options});matchedVariant=(0,r.ib)(()=>{let e=this.item(),n=this.selectedOptions();return e.vars.find(i=>e.options.every(o=>n[o.name]===i.selectedOptions.find(s=>s.name===o.name)?.value))});constructor(){super(),(0,r.jb)(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let e=(0,r.jb)(()=>{let n=this.item();if(!n?.options)return;let i=(0,r.a)({},this.selectedOptions());n.options.forEach(o=>{let s=n.vars[0]?.selectedOptions.find(a=>a.name===o.name)?.value;s&&(i[o.name]=s)}),this.selectedOptions.set(i),e.destroy()})}onOptionChange(e,n){let i=(0,r.a)({},this.selectedOptions());i[e.name]=n.name,this.selectedOptions.set(i)}engagementTriggerReceived(){}update(){}static \u0275fac=function(e){return new(e||nr)};static \u0275cmp=(0,r.na)({type:nr,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[r.ra],decls:2,vars:0,consts:[[3,"class"],[1,"name"],[1,"selected-value"],[1,"option-values"],[1,"option-value",3,"disabled","color-type","selected","ngStyle"],[1,"option-value",3,"click","disabled","ngStyle"],[1,"title"]],template:function(e,n){e&1&&(0,r.Ca)(0,Mu,9,6,"div",0,Pa),e&2&&(0,r.Da)(n.options())},dependencies:[r.rb,r.ob,Pu],styles:[`.option-group{display:flex;gap:8px;align-items:center}.option-group+.option-group{margin-top:8px}.option-values{display:flex;flex-wrap:nowrap;overflow-x:auto;padding:6px;gap:8px}.selected-value{display:none}.option-value{padding:5px 10px;border:1px solid #ccc;cursor:pointer;border-radius:4px;min-width:32px;min-height:32px;text-align:center;position:relative;--selected-color: var(--option-color, var(--lc-color-button, rgb(var(--color-button, 0 0 0))))}.option-value.selected{box-shadow:#fff 0 0 0 2px,var(--selected-color) 0 0 0 4px}
|
|
11
|
+
`],encapsulation:3})},ka=function(t){return t.SHOPIFY_CHECKOUT="shopify_checkout",t.THIRD_PARTY_CHECKOUT="third_party_checkout",t.CART_PAGE="cart_page",t.CART_DRAWER="cart_drawer",t}(ka||{}),fe=function(t){return t[t.NONE=0]="NONE",t[t.REJECT_POPUP=1]="REJECT_POPUP",t[t.ACCEPT_POPUP=2]="ACCEPT_POPUP",t[t.GO_TO_URL=4]="GO_TO_URL",t[t.SHARE=5]="SHARE",t[t.KEY_VALUE=100]="KEY_VALUE",t[t.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",t[t.ADD_TO_CART=102]="ADD_TO_CART",t[t.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",t[t.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",t[t.OPEN_CART=105]="OPEN_CART",t[t.SUBMIT_FORM=106]="SUBMIT_FORM",t[t.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",t[t.ADD_BUNDLE=108]="ADD_BUNDLE",t[t.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",t}(fe||{}),qn=function(t){return t.FREE_SHIPPING="FREE_SHIPPING",t.DISCOUNT="DISCOUNT",t.FREE_AUTO_GIFT="FREE_AUTO_GIFT",t.FREE_GIFT_SELECT="FREE_GIFT_SELECT",t.UI_ONLY="UI_ONLY",t}(qn||{}),Bu=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}},Na=(t=>(t.CART_AMOUNT="CART_AMOUNT",t.ITEM_COUNT="ITEM_COUNT",t))(Na||{}),Aa=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}},Ma=Object.prototype.toString;function Gr(t){switch(Ma.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Ve(t,Error)}}function an(t,e){return Ma.call(t)===`[object ${e}]`}function La(t){return an(t,"ErrorEvent")}function Vo(t){return an(t,"DOMError")}function ju(t){return an(t,"DOMException")}function ve(t){return an(t,"String")}function qr(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function Zr(t){return t===null||qr(t)||typeof t!="object"&&typeof t!="function"}function en(t){return an(t,"Object")}function di(t){return typeof Event<"u"&&Ve(t,Event)}function Fu(t){return typeof Element<"u"&&Ve(t,Element)}function Vu(t){return an(t,"RegExp")}function pi(t){return!!(t&&t.then&&typeof t.then=="function")}function Uu(t){return en(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function Ve(t,e){try{return t instanceof e}catch{return!1}}function Ba(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function Qe(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function Uo(t,e){if(!Array.isArray(t))return"";let n=[];for(let i=0;i<t.length;i++){let o=t[i];try{Ba(o)?n.push("[VueViewModel]"):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function $u(t,e,n=!1){return ve(t)?Vu(e)?e.test(t):ve(e)?n?t===e:t.includes(e):!1:!1}function fi(t,e=[],n=!1){return e.some(i=>$u(t,i,n))}function Hu(t,e,n=250,i,o,s,a){if(!s.exception||!s.exception.values||!a||!Ve(a.originalException,Error))return;let c=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;c&&(s.exception.values=zu(ir(t,e,o,a.originalException,i,s.exception.values,c,0),n))}function ir(t,e,n,i,o,s,a,c){if(s.length>=n+1)return s;let h=[...s];if(Ve(i[o],Error)){$o(a,c);let f=t(e,i[o]),_=h.length;Ho(f,o,_,c),h=ir(t,e,n,i[o],o,[f,...h],f,_)}return Array.isArray(i.errors)&&i.errors.forEach((f,_)=>{if(Ve(f,Error)){$o(a,c);let d=t(e,f),E=h.length;Ho(d,`errors[${_}]`,E,c),h=ir(t,e,n,f,o,[d,...h],d,E)}}),h}function $o(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=(0,r.b)((0,r.a)((0,r.a)({},t.mechanism),t.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:e})}function Ho(t,e,n,i){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=(0,r.b)((0,r.a)({},t.mechanism),{type:"chained",source:e,exception_id:n,parent_id:i})}function zu(t,e){return t.map(n=>(n.value&&(n.value=Qe(n.value,e)),n))}var Be="8.18.0",Et=globalThis;function Yr(t,e,n){let i=n||Et,o=i.__SENTRY__=i.__SENTRY__||{},s=o[Be]=o[Be]||{};return s[t]||(s[t]=e())}var Kr=Et,Wu=80;function ja(t,e={}){if(!t)return"<unknown>";try{let n=t,i=5,o=[],s=0,a=0,c=" > ",h=c.length,f,_=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||Wu;for(;n&&s++<i&&(f=Gu(n,_),!(f==="html"||s>1&&a+o.length*h+f.length>=d));)o.push(f),a+=f.length,n=n.parentNode;return o.reverse().join(c)}catch{return"<unknown>"}}function Gu(t,e){let n=t,i=[];if(!n||!n.tagName)return"";if(Kr.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}i.push(n.tagName.toLowerCase());let o=e&&e.length?e.filter(a=>n.getAttribute(a)).map(a=>[a,n.getAttribute(a)]):null;if(o&&o.length)o.forEach(a=>{i.push(`[${a[0]}="${a[1]}"]`)});else{n.id&&i.push(`#${n.id}`);let a=n.className;if(a&&ve(a)){let c=a.split(/\s+/);for(let h of c)i.push(`.${h}`)}}let s=["aria-label","type","name","title","alt"];for(let a of s){let c=n.getAttribute(a);c&&i.push(`[${a}="${c}"]`)}return i.join("")}function qu(){try{return Kr.document.location.href}catch{return""}}function Zu(t){if(!Kr.HTMLElement)return null;let e=t,n=5;for(let i=0;i<n;i++){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 Tn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Yu="Sentry Logger ",rr=["debug","info","warn","error","log","assert","trace"],Qn={};function Jr(t){if(!("console"in Et))return t();let e=Et.console,n={},i=Object.keys(Qn);i.forEach(o=>{let s=Qn[o];n[o]=e[o],e[o]=s});try{return t()}finally{i.forEach(o=>{e[o]=n[o]})}}function Ku(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return Tn?rr.forEach(n=>{e[n]=(...i)=>{t&&Jr(()=>{Et.console[n](`${Yu}[${n}]:`,...i)})}}):rr.forEach(n=>{e[n]=()=>{}}),e}var ut=Ku(),Ju=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Xu(t){return t==="http"||t==="https"}function gi(t,e=!1){let{host:n,path:i,pass:o,port:s,projectId:a,protocol:c,publicKey:h}=t;return`${c}://${h}${e&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${i&&`${i}/`}${a}`}function Qu(t){let e=Ju.exec(t);if(!e){Jr(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}let[n,i,o="",s="",a="",c=""]=e.slice(1),h="",f=c,_=f.split("/");if(_.length>1&&(h=_.slice(0,-1).join("/"),f=_.pop()),f){let d=f.match(/^\d+/);d&&(f=d[0])}return Fa({host:s,pass:o,path:h,projectId:f,port:a,protocol:n,publicKey:i})}function Fa(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function th(t){if(!Tn)return!0;let{port:e,projectId:n,protocol:i}=t;return["protocol","publicKey","host","projectId"].find(o=>t[o]?!1:(ut.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?Xu(i)?e&&isNaN(parseInt(e,10))?(ut.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(ut.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),!1):(ut.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function eh(t){let e=typeof t=="string"?Qu(t):Fa(t);if(!(!e||!th(e)))return e}var de=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 Ut(t,e,n){if(!(e in t))return;let i=t[e],o=n(i);typeof o=="function"&&Va(o,i),t[e]=o}function Ue(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{Tn&&ut.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function Va(t,e){try{let n=e.prototype||{};t.prototype=e.prototype=n,Ue(t,"__sentry_original__",e)}catch{}}function Xr(t){return t.__sentry_original__}function nh(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function Ua(t){if(Gr(t))return(0,r.a)({message:t.message,name:t.name,stack:t.stack},Wo(t));if(di(t)){let e=(0,r.a)({type:t.type,target:zo(t.target),currentTarget:zo(t.currentTarget)},Wo(t));return typeof CustomEvent<"u"&&Ve(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function zo(t){try{return Fu(t)?ja(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function Wo(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 ih(t,e=40){let n=Object.keys(Ua(t));n.sort();let i=n[0];if(!i)return"[object has no keys]";if(i.length>=e)return Qe(i,e);for(let o=n.length;o>0;o--){let s=n.slice(0,o).join(", ");if(!(s.length>e))return o===n.length?s:Qe(s,e)}return""}function oe(t){return or(t,new Map)}function or(t,e){if(rh(t)){let n=e.get(t);if(n!==void 0)return n;let i={};e.set(t,i);for(let o of Object.keys(t))typeof t[o]<"u"&&(i[o]=or(t[o],e));return i}if(Array.isArray(t)){let n=e.get(t);if(n!==void 0)return n;let i=[];return e.set(t,i),t.forEach(o=>{i.push(or(o,e))}),i}return t}function rh(t){if(!en(t))return!1;try{let e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch{return!0}}var $e="?",Go=/\(error: (.*)\)/,qo=/captureMessage|captureException/;function oh(...t){let e=t.sort((n,i)=>n[0]-i[0]).map(n=>n[1]);return(n,i=0,o=0)=>{let s=[],a=n.split(`
|
|
12
12
|
`);for(let c=i;c<a.length;c++){let h=a[c];if(h.length>1024)continue;let f=Go.test(h)?h.replace(Go,"$1"):h;if(!f.match(/\S*Error: /)){for(let _ of e){let d=_(f);if(d){s.push(d);break}}if(s.length>=50+o)break}}return sh(s.slice(o))}}function sh(t){if(!t.length)return[];let e=Array.from(t);return/sentryWrapped/.test(Mn(e).function||"")&&e.pop(),e.reverse(),qo.test(Mn(e).function||"")&&(e.pop(),qo.test(Mn(e).function||"")&&e.pop()),e.slice(0,50).map(n=>(0,r.b)((0,r.a)({},n),{filename:n.filename||Mn(e).filename,function:n.function||$e}))}function Mn(t){return t[t.length-1]||{}}var Ni="<anonymous>";function Ie(t){try{return!t||typeof t!="function"?Ni:t.name||Ni}catch{return Ni}}function Zo(t){let e=t.exception;if(e){let n=[];try{return e.values.forEach(i=>{i.stacktrace.frames&&n.push(...i.stacktrace.frames)}),n}catch{return}}}var Zn={},Yo={};function We(t,e){Zn[t]=Zn[t]||[],Zn[t].push(e)}function Ge(t,e){Yo[t]||(e(),Yo[t]=!0)}function ae(t,e){let n=t&&Zn[t];if(n)for(let i of n)try{i(e)}catch(o){Tn&&ut.error(`Error while triggering instrumentation handler.
|
|
13
13
|
Type: ${t}
|
|
14
14
|
Name: ${Ie(i)}
|
|
15
15
|
Error:`,o)}}function ah(t){let e="console";We(e,t),Ge(e,lh)}function lh(){"console"in Et&&rr.forEach(function(t){t in Et.console&&Ut(Et.console,t,function(e){return Qn[t]=e,function(...n){ae("console",{args:n,level:t});let i=Qn[t];i&&i.apply(Et.console,n)}})})}var sr=Et;function ch(){if(!("fetch"in sr))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function ar(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function uh(){if(typeof EdgeRuntime=="string")return!0;if(!ch())return!1;if(ar(sr.fetch))return!0;let t=!1,e=sr.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=ar(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){Tn&&ut.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}var $a=1e3;function On(){return Date.now()/$a}function hh(){let{performance:t}=Et;if(!t||!t.now)return On;let e=Date.now()-t.now(),n=t.timeOrigin==null?e:t.timeOrigin;return()=>(n+t.now())/$a}var Oe=hh(),Ln,hy=(()=>{let{performance:t}=Et;if(!t||!t.now){Ln="none";return}let e=3600*1e3,n=t.now(),i=Date.now(),o=t.timeOrigin?Math.abs(t.timeOrigin+n-i):e,s=o<e,a=t.timing&&t.timing.navigationStart,c=typeof a=="number"?Math.abs(a+n-i):e,h=c<e;return s||h?o<=c?(Ln="timeOrigin",t.timeOrigin):(Ln="navigationStart",a):(Ln="dateNow",i)})();function dh(t){let e="fetch";We(e,t),Ge(e,ph)}function ph(){uh()&&Ut(Et,"fetch",function(t){return function(...e){let{method:n,url:i}=fh(e),o={args:e,fetchData:{method:n,url:i},startTimestamp:Oe()*1e3};ae("fetch",(0,r.a)({},o));let s=new Error().stack;return t.apply(Et,e).then(a=>{let c=(0,r.b)((0,r.a)({},o),{endTimestamp:Oe()*1e3,response:a});return ae("fetch",c),a},a=>{let c=(0,r.b)((0,r.a)({},o),{endTimestamp:Oe()*1e3,error:a});throw ae("fetch",c),Gr(a)&&a.stack===void 0&&(a.stack=s,Ue(a,"framesToPop",1)),a})}})}function lr(t,e){return!!t&&typeof t=="object"&&!!t[e]}function Ko(t){return typeof t=="string"?t:t?lr(t,"url")?t.url:t.toString?t.toString():"":""}function fh(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[n,i]=t;return{url:Ko(n),method:lr(i,"method")?String(i.method).toUpperCase():"GET"}}let e=t[0];return{url:Ko(e),method:lr(e,"method")?String(e.method).toUpperCase():"GET"}}var Bn=null;function gh(t){let e="error";We(e,t),Ge(e,_h)}function _h(){Bn=Et.onerror,Et.onerror=function(t,e,n,i,o){return ae("error",{column:i,error:o,line:n,msg:t,url:e}),Bn&&!Bn.__SENTRY_LOADER__?Bn.apply(this,arguments):!1},Et.onerror.__SENTRY_INSTRUMENTED__=!0}var jn=null;function mh(t){let e="unhandledrejection";We(e,t),Ge(e,vh)}function vh(){jn=Et.onunhandledrejection,Et.onunhandledrejection=function(t){return ae("unhandledrejection",t),jn&&!jn.__SENTRY_LOADER__?jn.apply(this,arguments):!0},Et.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function yh(){return"npm"}function bh(){let t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(o){if(t)return e.has(o)?!0:(e.add(o),!1);for(let s=0;s<e.length;s++)if(e[s]===o)return!0;return e.push(o),!1}function i(o){if(t)e.delete(o);else for(let s=0;s<e.length;s++)if(e[s]===o){e.splice(s,1);break}}return[n,i]}function le(){let t=Et,e=t.crypto||t.msCrypto,n=()=>Math.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{let i=new Uint8Array(1);return e.getRandomValues(i),i[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,i=>(i^(n()&15)>>i/4).toString(16))}function Ha(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function xe(t){let{message:e,event_id:n}=t;if(e)return e;let i=Ha(t);return i?i.type&&i.value?`${i.type}: ${i.value}`:i.type||i.value||n||"<unknown>":n||"<unknown>"}function cr(t,e,n){let i=t.exception=t.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{};s.value||(s.value=e||""),s.type||(s.type=n||"Error")}function En(t,e){let n=Ha(t);if(!n)return;let i={type:"generic",handled:!0},o=n.mechanism;if(n.mechanism=(0,r.a)((0,r.a)((0,r.a)({},i),o),e),e&&"data"in e){let s=(0,r.a)((0,r.a)({},o&&o.data),e.data);n.mechanism.data=s}}function Jo(t){if(t&&t.__sentry_captured__)return!0;try{Ue(t,"__sentry_captured__",!0)}catch{}return!1}function wh(t){return Array.isArray(t)?t:[t]}function Se(t,e=100,n=1/0){try{return ur("",t,e,n)}catch(i){return{ERROR:`**non-serializable** (${i})`}}}function za(t,e=3,n=100*1024){let i=Se(t,e);return Ch(i)>n?za(t,e-1,n):i}function ur(t,e,n=1/0,i=1/0,o=bh()){let[s,a]=o;if(e==null||["number","boolean","string"].includes(typeof e)&&!Number.isNaN(e))return e;let c=Eh(t,e);if(!c.startsWith("[object "))return c;if(e.__sentry_skip_normalization__)return e;let h=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:n;if(h===0)return c.replace("object ","");if(s(e))return"[Circular ~]";let f=e;if(f&&typeof f.toJSON=="function")try{let I=f.toJSON();return ur("",I,h-1,i,o)}catch{}let _=Array.isArray(e)?[]:{},d=0,E=Ua(e);for(let I in E){if(!Object.prototype.hasOwnProperty.call(E,I))continue;if(d>=i){_[I]="[MaxProperties ~]";break}let S=E[I];_[I]=ur(I,S,h-1,i,o),d++}return a(e),_}function Eh(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(Ba(e))return"[VueViewModel]";if(Uu(e))return"[SyntheticEvent]";if(typeof e=="number"&&e!==e)return"[NaN]";if(typeof e=="function")return`[Function: ${Ie(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;let n=xh(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function xh(t){let e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function Sh(t){return~-encodeURI(t).split(/%..|./).length}function Ch(t){return Sh(JSON.stringify(t))}var _e;(function(t){t[t.PENDING=0]="PENDING";let e=1;t[t.RESOLVED=e]="RESOLVED";let n=2;t[t.REJECTED=n]="REJECTED"})(_e||(_e={}));function He(t){return new In(e=>{e(t)})}function ti(t){return new In((e,n)=>{n(t)})}var In=class Ne{constructor(e){Ne.prototype.__init.call(this),Ne.prototype.__init2.call(this),Ne.prototype.__init3.call(this),Ne.prototype.__init4.call(this),this._state=_e.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new Ne((i,o)=>{this._handlers.push([!1,s=>{if(!e)i(s);else try{i(e(s))}catch(a){o(a)}},s=>{if(!n)o(s);else try{i(n(s))}catch(a){o(a)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new Ne((n,i)=>{let o,s;return this.then(a=>{s=!1,o=a,e&&e()},a=>{s=!0,o=a,e&&e()}).then(()=>{if(s){i(o);return}n(o)})})}__init(){this._resolve=e=>{this._setResult(_e.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(_e.REJECTED,e)}}__init3(){this._setResult=(e,n)=>{if(this._state===_e.PENDING){if(pi(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===_e.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===_e.RESOLVED&&n[1](this._value),this._state===_e.REJECTED&&n[2](this._value),n[0]=!0)})}}};function Th(t){let e=[];function n(){return t===void 0||e.length<t}function i(a){return e.splice(e.indexOf(a),1)[0]||Promise.resolve(void 0)}function o(a){if(!n())return ti(new de("Not adding Promise because buffer limit was reached."));let c=a();return e.indexOf(c)===-1&&e.push(c),c.then(()=>i(c)).then(null,()=>i(c).then(null,()=>{})),c}function s(a){return new In((c,h)=>{let f=e.length;if(!f)return c(!0);let _=setTimeout(()=>{a&&a>0&&c(!1)},a);e.forEach(d=>{He(d).then(()=>{--f||(clearTimeout(_),c(!0))},h)})})}return{$:e,add:o,drain:s}}function Ai(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let n=e[6]||"",i=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:i,relative:e[5]+n+i}}var Oh=["fatal","error","warning","log","info","debug"];function Ih(t){return t==="warn"?"warning":Oh.includes(t)?t:"log"}var Dh="sentry-",Rh=/^sentry-/;function Ph(t){let e=kh(t);if(!e)return;let n=Object.entries(e).reduce((i,[o,s])=>{if(o.match(Rh)){let a=o.slice(Dh.length);i[a]=s}return i},{});if(Object.keys(n).length>0)return n}function kh(t){if(!(!t||!ve(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{let i=Xo(n);return Object.entries(i).forEach(([o,s])=>{e[o]=s}),e},{}):Xo(t)}function Xo(t){return t.split(",").map(e=>e.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((e,[n,i])=>(n&&i&&(e[n]=i),e),{})}function Dn(t,e=[]){return[t,e]}function Nh(t,e){let[n,i]=t;return[n,[...i,e]]}function Qo(t,e){let n=t[1];for(let i of n){let o=i[0].type;if(e(i,o))return!0}return!1}function hr(t){return Et.__SENTRY__&&Et.__SENTRY__.encodePolyfill?Et.__SENTRY__.encodePolyfill(t):new TextEncoder().encode(t)}function Ah(t){let[e,n]=t,i=JSON.stringify(e);function o(s){typeof i=="string"?i=typeof s=="string"?i+s:[hr(i),s]:i.push(typeof s=="string"?hr(s):s)}for(let s of n){let[a,c]=s;if(o(`
|
|
16
16
|
${JSON.stringify(a)}
|
|
17
|
-
`),typeof c=="string"||c instanceof Uint8Array)o(c);else{let h;try{h=JSON.stringify(c)}catch{h=JSON.stringify(Se(c))}o(h)}}return typeof i=="string"?i:Mh(i)}function Mh(t){let e=t.reduce((o,s)=>o+s.length,0),n=new Uint8Array(e),i=0;for(let o of t)n.set(o,i),i+=o.length;return n}function Lh(t){let e=typeof t.data=="string"?hr(t.data):t.data;return[oe({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}var Bh={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 ts(t){return Bh[t]}function Wa(t){if(!t||!t.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function jh(t,e,n,i){let o=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return(0,r.a)((0,r.a)((0,r.a)({event_id:t.event_id,sent_at:new Date().toISOString()},e&&{sdk:e}),!!n&&i&&{dsn:gi(i)}),o&&{trace:oe((0,r.a)({},o))})}function Fh(t,e,n){let i=[{type:"client_report"},{timestamp:n||On(),discarded_events:t}];return Dn(e?{dsn:e}:{},[i])}function Vh(t,e=Date.now()){let n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;let i=Date.parse(`${t}`);return isNaN(i)?6e4:i-e}function Uh(t,e){return t[e]||t.all||0}function $h(t,e,n=Date.now()){return Uh(t,e)>n}function Hh(t,{statusCode:e,headers:n},i=Date.now()){let o=(0,r.a)({},t),s=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(s)for(let c of s.trim().split(",")){let[h,f,,,_]=c.split(":",5),d=parseInt(h,10),E=(isNaN(d)?60:d)*1e3;if(!f)o.all=i+E;else for(let I of f.split(";"))I==="metric_bucket"?(!_||_.split(";").includes("custom"))&&(o[I]=i+E):o[I]=i+E}else a?o.all=i+Vh(a,i):e===429&&(o.all=i+60*1e3);return o}function es(){return{traceId:le(),spanId:le().substring(16)}}var Fn=Et;function zh(){let t=Fn.chrome,e=t&&t.app&&t.app.runtime,n="history"in Fn&&!!Fn.history.pushState&&!!Fn.history.replaceState;return!e&&n}var kt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function _i(){return Qr(Et),Et}function Qr(t){let e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||Be,e[Be]=e[Be]||{}}function dr(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||Oe(),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:le()),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 pr="_sentrySpan";function ns(t,e){e?Ue(t,pr,e):delete t[pr]}function is(t){return t[pr]}var Wh=100,Gh=class Ga{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=es()}clone(){let e=new Ga;return e._breadcrumbs=[...this._breadcrumbs],e._tags=(0,r.a)({},this._tags),e._extra=(0,r.a)({},this._extra),e._contexts=(0,r.a)({},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=(0,r.a)({},this._sdkProcessingMetadata),e._propagationContext=(0,r.a)({},this._propagationContext),e._client=this._client,e._lastEventId=this._lastEventId,ns(e,is(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&&dr(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=(0,r.a)((0,r.a)({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,n){return this._tags=(0,r.b)((0,r.a)({},this._tags),{[e]:n}),this._notifyScopeListeners(),this}setExtras(e){return this._extra=(0,r.a)((0,r.a)({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,n){return this._extra=(0,r.b)((0,r.a)({},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,[i,o]=n instanceof ye?[n.getScopeData(),n.getRequestSession()]:nn(n)?[e,e.requestSession]:[],{tags:s,extra:a,user:c,contexts:h,level:f,fingerprint:_=[],propagationContext:d}=i||{};return this._tags=(0,r.a)((0,r.a)({},this._tags),s),this._extra=(0,r.a)((0,r.a)({},this._extra),a),this._contexts=(0,r.a)((0,r.a)({},this._contexts),h),c&&Object.keys(c).length&&(this._user=c),f&&(this._level=f),_.length&&(this._fingerprint=_),d&&(this._propagationContext=d),o&&(this._requestSession=o),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,ns(this,void 0),this._attachments=[],this._propagationContext=es(),this._notifyScopeListeners(),this}addBreadcrumb(e,n){let i=typeof n=="number"?n:Wh;if(i<=0)return this;let o=(0,r.a)({timestamp:On()},e),s=this._breadcrumbs;return s.push(o),this._breadcrumbs=s.length>i?s.slice(-i):s,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:is(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=(0,r.a)((0,r.a)({},this._sdkProcessingMetadata),e),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){let i=n&&n.event_id?n.event_id:le();if(!this._client)return ut.warn("No client configured on scope - will not capture exception!"),i;let o=new Error("Sentry syntheticException");return this._client.captureException(e,(0,r.b)((0,r.a)({originalException:e,syntheticException:o},n),{event_id:i}),this),i}captureMessage(e,n,i){let o=i&&i.event_id?i.event_id:le();if(!this._client)return ut.warn("No client configured on scope - will not capture message!"),o;let s=new Error(e);return this._client.captureMessage(e,n,(0,r.b)((0,r.a)({originalException:e,syntheticException:s},i),{event_id:o}),this),o}captureEvent(e,n){let i=n&&n.event_id?n.event_id:le();return this._client?(this._client.captureEvent(e,(0,r.b)((0,r.a)({},n),{event_id:i}),this),i):(ut.warn("No client configured on scope - will not capture event!"),i)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}},ye=Gh;function qh(){return Yr("defaultCurrentScope",()=>new ye)}function Zh(){return Yr("defaultIsolationScope",()=>new ye)}var Yh=class{constructor(t,e){let n;t?n=t:n=new ye;let i;e?i=e:i=new ye,this._stack=[{scope:n}],this._isolationScope=i}withScope(t){let e=this._pushScope(),n;try{n=t(e)}catch(i){throw this._popScope(),i}return pi(n)?n.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(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 rn(){let t=_i(),e=Qr(t);return e.stack=e.stack||new Yh(qh(),Zh())}function Kh(t){return rn().withScope(t)}function Jh(t,e){let n=rn();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function rs(t){return rn().withScope(()=>t(rn().getIsolationScope()))}function Xh(){return{withIsolationScope:rs,withScope:Kh,withSetScope:Jh,withSetIsolationScope:(t,e)=>rs(e),getCurrentScope:()=>rn().getScope(),getIsolationScope:()=>rn().getIsolationScope()}}function to(t){let e=Qr(t);return e.acs?e.acs:Xh()}function eo(){let t=_i();return to(t).getCurrentScope()}function qa(){let t=_i();return to(t).getIsolationScope()}function Qh(){return Yr("globalScope",()=>new ye)}function td(...t){let e=_i(),n=to(e);if(t.length===2){let[i,o]=t;return i?n.withSetScope(i,o):n.withScope(o)}return n.withScope(t[0])}function Kt(){return eo().getClient()}var ed="_sentryMetrics";function nd(t){let e=t[ed];if(!e)return;let n={};for(let[,[i,o]]of e)(n[i]||(n[i]=[])).push(oe(o));return n}var id="sentry.source",rd="sentry.sample_rate",od="sentry.op",sd="sentry.origin",ad=1;function ld(t){let{spanId:e,traceId:n}=t.spanContext(),{parent_span_id:i}=ei(t);return oe({parent_span_id:i,span_id:e,trace_id:n})}function os(t){return typeof t=="number"?ss(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?ss(t.getTime()):Oe()}function ss(t){return t>9999999999?t/1e3:t}function ei(t){if(ud(t))return t.getSpanJSON();try{let{spanId:e,traceId:n}=t.spanContext();if(cd(t)){let{attributes:i,startTime:o,name:s,endTime:a,parentSpanId:c,status:h}=t;return oe({span_id:e,trace_id:n,data:i,description:s,parent_span_id:c,start_timestamp:os(o),timestamp:os(a)||void 0,status:dd(h),op:i[od],origin:i[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 dd(t){if(!(!t||t.code===0))return t.code===1?"ok":t.message||"unknown_error"}var pd="_sentryRootSpan";function Za(t){return t[pd]||t}var Ya="production",fd="_frozenDsc";function Ka(t,e){let n=e.getOptions(),{publicKey:i}=e.getDsn()||{},o=oe({environment:n.environment||Ya,release:n.release,public_key:i,trace_id:t});return e.emit("createDsc",o),o}function gd(t){let e=Kt();if(!e)return{};let n=Ka(ei(t).trace_id||"",e),i=Za(t),o=i[fd];if(o)return o;let s=i.spanContext().traceState,a=s&&s.get("sentry.dsc"),c=a&&Ph(a);if(c)return c;let h=ei(i),f=h.data||{},_=f[rd];_!=null&&(n.sample_rate=`${_}`);let d=f[id],E=h.description;return d!=="url"&&E&&(n.transaction=E),n.sampled=String(hd(i)),e.emit("createDsc",n,i),n}function _d(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){kt&&ut.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 md(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,i){let o=Wa(n),s=(0,r.a)((0,r.a)({sent_at:new Date().toISOString()},o&&{sdk:o}),!!i&&e&&{dsn:gi(e)}),a="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return Dn(s,[a])}function yd(t,e,n,i){let o=Wa(n),s=t.type&&t.type!=="replay_event"?t.type:"event";md(t,n&&n.sdk);let a=jh(t,o,i,e);return delete t.sdkProcessingMetadata,Dn(a,[[{type:s},t]])}function fr(t,e,n,i=0){return new In((o,s)=>{let a=t[i];if(e===null||typeof a!="function")o(e);else{let c=a((0,r.a)({},e),n);kt&&a.id&&c===null&&ut.log(`Event processor "${a.id}" dropped event`),pi(c)?c.then(h=>fr(t,h,n,i+1).then(o)).then(null,s):fr(t,c,n,i+1).then(o).then(null,s)}})}function bd(t,e){let{fingerprint:n,span:i,breadcrumbs:o,sdkProcessingMetadata:s}=e;wd(t,e),i&&Sd(t,i),Cd(t,n),Ed(t,o),xd(t,s)}function as(t,e){let{extra:n,tags:i,user:o,contexts:s,level:a,sdkProcessingMetadata:c,breadcrumbs:h,fingerprint:f,eventProcessors:_,attachments:d,propagationContext:E,transactionName:I,span:S}=e;pn(t,"extra",n),pn(t,"tags",i),pn(t,"user",o),pn(t,"contexts",s),pn(t,"sdkProcessingMetadata",c),a&&(t.level=a),I&&(t.transactionName=I),S&&(t.span=S),h.length&&(t.breadcrumbs=[...t.breadcrumbs,...h]),f.length&&(t.fingerprint=[...t.fingerprint,...f]),_.length&&(t.eventProcessors=[...t.eventProcessors,..._]),d.length&&(t.attachments=[...t.attachments,...d]),t.propagationContext=(0,r.a)((0,r.a)({},t.propagationContext),E)}function pn(t,e,n){if(n&&Object.keys(n).length){t[e]=(0,r.a)({},t[e]);for(let i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[e][i]=n[i])}}function wd(t,e){let{extra:n,tags:i,user:o,contexts:s,level:a,transactionName:c}=e,h=oe(n);h&&Object.keys(h).length&&(t.extra=(0,r.a)((0,r.a)({},h),t.extra));let f=oe(i);f&&Object.keys(f).length&&(t.tags=(0,r.a)((0,r.a)({},f),t.tags));let _=oe(o);_&&Object.keys(_).length&&(t.user=(0,r.a)((0,r.a)({},_),t.user));let d=oe(s);d&&Object.keys(d).length&&(t.contexts=(0,r.a)((0,r.a)({},d),t.contexts)),a&&(t.level=a),c&&t.type!=="transaction"&&(t.transaction=c)}function Ed(t,e){let n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function xd(t,e){t.sdkProcessingMetadata=(0,r.a)((0,r.a)({},t.sdkProcessingMetadata),e)}function Sd(t,e){t.contexts=(0,r.a)({trace:ld(e)},t.contexts),t.sdkProcessingMetadata=(0,r.a)({dynamicSamplingContext:gd(e)},t.sdkProcessingMetadata);let n=Za(e),i=ei(n).description;i&&!t.transaction&&t.type==="transaction"&&(t.transaction=i)}function Cd(t,e){t.fingerprint=t.fingerprint?wh(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}function Td(t,e,n,i,o,s){let{normalizeDepth:a=3,normalizeMaxBreadth:c=1e3}=t,h=(0,r.b)((0,r.a)({},e),{event_id:e.event_id||n.event_id||le(),timestamp:e.timestamp||On()}),f=n.integrations||t.integrations.map(D=>D.name);Od(h,t),Rd(h,f),o&&o.emit("applyFrameMetadata",e),e.type===void 0&&Id(h,t.stackParser);let _=kd(i,n.captureContext);n.mechanism&&En(h,n.mechanism);let d=o?o.getEventProcessors():[],E=Qh().getScopeData();if(s){let D=s.getScopeData();as(E,D)}if(_){let D=_.getScopeData();as(E,D)}let I=[...n.attachments||[],...E.attachments];I.length&&(n.attachments=I),bd(h,E);let S=[...d,...E.eventProcessors];return fr(S,h,n).then(D=>(D&&Dd(D),typeof a=="number"&&a>0?Pd(D,a,c):D))}function Od(t,e){let{environment:n,release:i,dist:o,maxValueLength:s=250}=e;"environment"in t||(t.environment="environment"in e?n:Ya),t.release===void 0&&i!==void 0&&(t.release=i),t.dist===void 0&&o!==void 0&&(t.dist=o),t.message&&(t.message=Qe(t.message,s));let a=t.exception&&t.exception.values&&t.exception.values[0];a&&a.value&&(a.value=Qe(a.value,s));let c=t.request;c&&c.url&&(c.url=Qe(c.url,s))}var ls=new WeakMap;function Id(t,e){let n=Et._sentryDebugIds;if(!n)return;let i,o=ls.get(e);o?i=o:(i=new Map,ls.set(e,i));let s=Object.entries(n).reduce((a,[c,h])=>{let f,_=i.get(c);_?f=_:(f=e(c),i.set(c,f));for(let d=f.length-1;d>=0;d--){let E=f[d];if(E.filename){a[E.filename]=h;break}}return a},{});try{t.exception.values.forEach(a=>{a.stacktrace.frames.forEach(c=>{c.filename&&(c.debug_id=s[c.filename])})})}catch{}}function Dd(t){let e={};try{t.exception.values.forEach(i=>{i.stacktrace.frames.forEach(o=>{o.debug_id&&(o.abs_path?e[o.abs_path]=o.debug_id:o.filename&&(e[o.filename]=o.debug_id),delete o.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(([i,o])=>{n.push({type:"sourcemap",code_file:i,debug_id:o})})}function Rd(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function Pd(t,e,n){if(!t)return null;let i=(0,r.a)((0,r.a)((0,r.a)((0,r.a)((0,r.a)({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(o=>(0,r.a)((0,r.a)({},o),o.data&&{data:Se(o.data,e,n)}))}),t.user&&{user:Se(t.user,e,n)}),t.contexts&&{contexts:Se(t.contexts,e,n)}),t.extra&&{extra:Se(t.extra,e,n)});return t.contexts&&t.contexts.trace&&i.contexts&&(i.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(i.contexts.trace.data=Se(t.contexts.trace.data,e,n))),t.spans&&(i.spans=t.spans.map(o=>(0,r.a)((0,r.a)({},o),o.data&&{data:Se(o.data,e,n)}))),i}function kd(t,e){if(!e)return t;let n=t?t.clone():new ye;return n.update(e),n}function Nd(t){if(t)return Ad(t)?{captureContext:t}:Ld(t)?{captureContext:t}:t}function Ad(t){return t instanceof ye||typeof t=="function"}var Md=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function Ld(t){return Object.keys(t).some(e=>Md.includes(e))}function Bd(t,e){return eo().captureException(t,Nd(e))}function Ja(t,e){return eo().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 Vd(t){return`${Fd(t)}${t.projectId}/envelope/`}function Ud(t,e){return nh((0,r.a)({sentry_key:t.publicKey,sentry_version:jd},e&&{sentry_client:`${e.name}/${e.version}`}))}function $d(t,e,n){return e||`${Vd(t)}?${Ud(t,n)}`}var cs=[];function Hd(t,e){let n={};return e.forEach(i=>{i&&Xa(t,i,n)}),n}function us(t,e){for(let n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function Xa(t,e,n){if(n[e.name]){kt&&ut.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,cs.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),cs.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){let i=e.preprocessEvent.bind(e);t.on("preprocessEvent",(o,s)=>i(o,s,t))}if(typeof e.processEvent=="function"){let i=e.processEvent.bind(e),o=Object.assign((s,a)=>i(s,a,t),{id:e.name});t.addEventProcessor(o)}kt&&ut.log(`Integration installed: ${e.name}`)}var hs="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=eh(t.dsn):kt&&ut.warn("No DSN provided, client will not send events."),this._dsn){let e=$d(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport((0,r.b)((0,r.a)({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},t.transportOptions),{url:e}))}}captureException(t,e,n){let i=le();if(Jo(t))return kt&&ut.log(hs),i;let o=(0,r.a)({event_id:i},e);return this._process(this.eventFromException(t,o).then(s=>this._captureEvent(s,o,n))),o.event_id}captureMessage(t,e,n,i){let o=(0,r.a)({event_id:le()},n),s=qr(t)?t:String(t),a=Zr(t)?this.eventFromMessage(s,e,o):this.eventFromException(t,o);return this._process(a.then(c=>this._captureEvent(c,o,i))),o.event_id}captureEvent(t,e,n){let i=le();if(e&&e.originalException&&Jo(e.originalException))return kt&&ut.log(hs),i;let o=(0,r.a)({event_id:i},e),s=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,o,s||n)),o.event_id}captureSession(t){typeof t.release!="string"?kt&&ut.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),dr(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(i=>n&&i))):He(!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];Xa(this,t,this._integrations),e||us(this,[t])}sendEvent(t,e={}){this.emit("beforeSendEvent",t,e);let n=yd(t,this._dsn,this._options._metadata,this._options.tunnel);for(let o of e.attachments||[])n=Nh(n,Lh(o));let i=this.sendEnvelope(n);i&&i.then(o=>this.emit("afterSendEvent",t,o),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 i=`${t}:${e}`;kt&&ut.log(`Adding outcome: "${i}"`),this._outcomes[i]=(this._outcomes[i]||0)+1}}on(t,e){let n=this._hooks[t]=this._hooks[t]||[];return n.push(e),()=>{let i=n.indexOf(e);i>-1&&n.splice(i,1)}}emit(t,...e){let n=this._hooks[t];n&&n.forEach(i=>i(...e))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,e=>(kt&&ut.error("Error while sending event:",e),e)):(kt&&ut.error("Transport disabled"),He({}))}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=Hd(this,t),us(this,t)}_updateSessionFromEvent(t,e){let n=!1,i=!1,o=e.exception&&e.exception.values;if(o){i=!0;for(let a of o){let c=a.mechanism;if(c&&c.handled===!1){n=!0;break}}}let s=t.status==="ok";(s&&t.errors===0||s&&n)&&(dr(t,(0,r.b)((0,r.a)({},n&&{status:"crashed"}),{errors:t.errors||Number(i||n)})),this.captureSession(t))}_isClientDoneProcessing(t){return new In(e=>{let n=0,i=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),e(!0)):(n+=i,t&&n>=t&&(clearInterval(o),e(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,e,n,i=qa()){let o=this.getOptions(),s=Object.keys(this._integrations);return!e.integrations&&s.length>0&&(e.integrations=s),this.emit("preprocessEvent",t,e),t.type||i.setLastEventId(t.event_id||e.event_id),Td(o,t,e,n,this,i).then(a=>{if(a===null)return a;let c=(0,r.a)((0,r.a)({},i.getPropagationContext()),n?n.getPropagationContext():void 0);if(!(a.contexts&&a.contexts.trace)&&c){let{traceId:h,spanId:f,parentSpanId:_,dsc:d}=c;a.contexts=(0,r.a)({trace:oe({trace_id:h,span_id:f,parent_span_id:_})},a.contexts);let E=d||Ka(h,this);a.sdkProcessingMetadata=(0,r.a)({dynamicSamplingContext:E},a.sdkProcessingMetadata)}return a})}_captureEvent(t,e={},n){return this._processEvent(t,e,n).then(i=>i.event_id,i=>{if(kt){let o=i;o.logLevel==="log"?ut.log(o.message):ut.warn(o)}})}_processEvent(t,e,n){let i=this.getOptions(),{sampleRate:o}=i,s=gr(t),a=Qa(t),c=t.type||"error",h=`before send for type \`${c}\``,f=typeof o>"u"?void 0:_d(o);if(a&&typeof f=="number"&&Math.random()>f)return this.recordDroppedEvent("sample_rate","error",t),ti(new de(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));let _=c==="replay_event"?"replay":c,d=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,e,n,d).then(E=>{if(E===null)throw this.recordDroppedEvent("event_processor",_,t),new de("An event processor returned `null`, will not send event.","log");if(e.data&&e.data.__sentry__===!0)return E;let I=Gd(this,i,E,e);return Wd(I,h)}).then(E=>{if(E===null){if(this.recordDroppedEvent("before_send",_,t),gr(t)){let D=1+(t.spans||[]).length;this._outcomes.span=(this._outcomes.span||0)+D}throw new de(`${h} returned \`null\`, will not send event.`,"log")}let I=n&&n.getSession();!s&&I&&this._updateSessionFromEvent(I,E);let S=E.transaction_info;if(s&&S&&E.transaction!==t.transaction){let D="custom";E.transaction_info=(0,r.b)((0,r.a)({},S),{source:D})}return this.sendEvent(E,e),E}).then(null,E=>{throw E instanceof de?E:(this.captureException(E,{data:{__sentry__:!0},originalException:E}),new de(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
18
|
-
Reason: ${E}`))})}_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[i,o]=e.split(":");return{reason:i,category:o,quantity:n}})}};function Wd(t,e){let n=`${e} must return \`null\` or a valid event.`;if(pi(t))return t.then(i=>{if(!
|
|
17
|
+
`),typeof c=="string"||c instanceof Uint8Array)o(c);else{let h;try{h=JSON.stringify(c)}catch{h=JSON.stringify(Se(c))}o(h)}}return typeof i=="string"?i:Mh(i)}function Mh(t){let e=t.reduce((o,s)=>o+s.length,0),n=new Uint8Array(e),i=0;for(let o of t)n.set(o,i),i+=o.length;return n}function Lh(t){let e=typeof t.data=="string"?hr(t.data):t.data;return[oe({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}var Bh={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 ts(t){return Bh[t]}function Wa(t){if(!t||!t.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function jh(t,e,n,i){let o=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return(0,r.a)((0,r.a)((0,r.a)({event_id:t.event_id,sent_at:new Date().toISOString()},e&&{sdk:e}),!!n&&i&&{dsn:gi(i)}),o&&{trace:oe((0,r.a)({},o))})}function Fh(t,e,n){let i=[{type:"client_report"},{timestamp:n||On(),discarded_events:t}];return Dn(e?{dsn:e}:{},[i])}function Vh(t,e=Date.now()){let n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;let i=Date.parse(`${t}`);return isNaN(i)?6e4:i-e}function Uh(t,e){return t[e]||t.all||0}function $h(t,e,n=Date.now()){return Uh(t,e)>n}function Hh(t,{statusCode:e,headers:n},i=Date.now()){let o=(0,r.a)({},t),s=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(s)for(let c of s.trim().split(",")){let[h,f,,,_]=c.split(":",5),d=parseInt(h,10),E=(isNaN(d)?60:d)*1e3;if(!f)o.all=i+E;else for(let I of f.split(";"))I==="metric_bucket"?(!_||_.split(";").includes("custom"))&&(o[I]=i+E):o[I]=i+E}else a?o.all=i+Vh(a,i):e===429&&(o.all=i+60*1e3);return o}function es(){return{traceId:le(),spanId:le().substring(16)}}var Fn=Et;function zh(){let t=Fn.chrome,e=t&&t.app&&t.app.runtime,n="history"in Fn&&!!Fn.history.pushState&&!!Fn.history.replaceState;return!e&&n}var kt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function _i(){return Qr(Et),Et}function Qr(t){let e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||Be,e[Be]=e[Be]||{}}function dr(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||Oe(),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:le()),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 pr="_sentrySpan";function ns(t,e){e?Ue(t,pr,e):delete t[pr]}function is(t){return t[pr]}var Wh=100,Gh=class Ga{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=es()}clone(){let e=new Ga;return e._breadcrumbs=[...this._breadcrumbs],e._tags=(0,r.a)({},this._tags),e._extra=(0,r.a)({},this._extra),e._contexts=(0,r.a)({},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=(0,r.a)({},this._sdkProcessingMetadata),e._propagationContext=(0,r.a)({},this._propagationContext),e._client=this._client,e._lastEventId=this._lastEventId,ns(e,is(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&&dr(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=(0,r.a)((0,r.a)({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,n){return this._tags=(0,r.b)((0,r.a)({},this._tags),{[e]:n}),this._notifyScopeListeners(),this}setExtras(e){return this._extra=(0,r.a)((0,r.a)({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,n){return this._extra=(0,r.b)((0,r.a)({},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,[i,o]=n instanceof ye?[n.getScopeData(),n.getRequestSession()]:en(n)?[e,e.requestSession]:[],{tags:s,extra:a,user:c,contexts:h,level:f,fingerprint:_=[],propagationContext:d}=i||{};return this._tags=(0,r.a)((0,r.a)({},this._tags),s),this._extra=(0,r.a)((0,r.a)({},this._extra),a),this._contexts=(0,r.a)((0,r.a)({},this._contexts),h),c&&Object.keys(c).length&&(this._user=c),f&&(this._level=f),_.length&&(this._fingerprint=_),d&&(this._propagationContext=d),o&&(this._requestSession=o),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,ns(this,void 0),this._attachments=[],this._propagationContext=es(),this._notifyScopeListeners(),this}addBreadcrumb(e,n){let i=typeof n=="number"?n:Wh;if(i<=0)return this;let o=(0,r.a)({timestamp:On()},e),s=this._breadcrumbs;return s.push(o),this._breadcrumbs=s.length>i?s.slice(-i):s,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:is(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=(0,r.a)((0,r.a)({},this._sdkProcessingMetadata),e),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){let i=n&&n.event_id?n.event_id:le();if(!this._client)return ut.warn("No client configured on scope - will not capture exception!"),i;let o=new Error("Sentry syntheticException");return this._client.captureException(e,(0,r.b)((0,r.a)({originalException:e,syntheticException:o},n),{event_id:i}),this),i}captureMessage(e,n,i){let o=i&&i.event_id?i.event_id:le();if(!this._client)return ut.warn("No client configured on scope - will not capture message!"),o;let s=new Error(e);return this._client.captureMessage(e,n,(0,r.b)((0,r.a)({originalException:e,syntheticException:s},i),{event_id:o}),this),o}captureEvent(e,n){let i=n&&n.event_id?n.event_id:le();return this._client?(this._client.captureEvent(e,(0,r.b)((0,r.a)({},n),{event_id:i}),this),i):(ut.warn("No client configured on scope - will not capture event!"),i)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}},ye=Gh;function qh(){return Yr("defaultCurrentScope",()=>new ye)}function Zh(){return Yr("defaultIsolationScope",()=>new ye)}var Yh=class{constructor(t,e){let n;t?n=t:n=new ye;let i;e?i=e:i=new ye,this._stack=[{scope:n}],this._isolationScope=i}withScope(t){let e=this._pushScope(),n;try{n=t(e)}catch(i){throw this._popScope(),i}return pi(n)?n.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(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 nn(){let t=_i(),e=Qr(t);return e.stack=e.stack||new Yh(qh(),Zh())}function Kh(t){return nn().withScope(t)}function Jh(t,e){let n=nn();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function rs(t){return nn().withScope(()=>t(nn().getIsolationScope()))}function Xh(){return{withIsolationScope:rs,withScope:Kh,withSetScope:Jh,withSetIsolationScope:(t,e)=>rs(e),getCurrentScope:()=>nn().getScope(),getIsolationScope:()=>nn().getIsolationScope()}}function to(t){let e=Qr(t);return e.acs?e.acs:Xh()}function eo(){let t=_i();return to(t).getCurrentScope()}function qa(){let t=_i();return to(t).getIsolationScope()}function Qh(){return Yr("globalScope",()=>new ye)}function td(...t){let e=_i(),n=to(e);if(t.length===2){let[i,o]=t;return i?n.withSetScope(i,o):n.withScope(o)}return n.withScope(t[0])}function Kt(){return eo().getClient()}var ed="_sentryMetrics";function nd(t){let e=t[ed];if(!e)return;let n={};for(let[,[i,o]]of e)(n[i]||(n[i]=[])).push(oe(o));return n}var id="sentry.source",rd="sentry.sample_rate",od="sentry.op",sd="sentry.origin",ad=1;function ld(t){let{spanId:e,traceId:n}=t.spanContext(),{parent_span_id:i}=ei(t);return oe({parent_span_id:i,span_id:e,trace_id:n})}function os(t){return typeof t=="number"?ss(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?ss(t.getTime()):Oe()}function ss(t){return t>9999999999?t/1e3:t}function ei(t){if(ud(t))return t.getSpanJSON();try{let{spanId:e,traceId:n}=t.spanContext();if(cd(t)){let{attributes:i,startTime:o,name:s,endTime:a,parentSpanId:c,status:h}=t;return oe({span_id:e,trace_id:n,data:i,description:s,parent_span_id:c,start_timestamp:os(o),timestamp:os(a)||void 0,status:dd(h),op:i[od],origin:i[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 dd(t){if(!(!t||t.code===0))return t.code===1?"ok":t.message||"unknown_error"}var pd="_sentryRootSpan";function Za(t){return t[pd]||t}var Ya="production",fd="_frozenDsc";function Ka(t,e){let n=e.getOptions(),{publicKey:i}=e.getDsn()||{},o=oe({environment:n.environment||Ya,release:n.release,public_key:i,trace_id:t});return e.emit("createDsc",o),o}function gd(t){let e=Kt();if(!e)return{};let n=Ka(ei(t).trace_id||"",e),i=Za(t),o=i[fd];if(o)return o;let s=i.spanContext().traceState,a=s&&s.get("sentry.dsc"),c=a&&Ph(a);if(c)return c;let h=ei(i),f=h.data||{},_=f[rd];_!=null&&(n.sample_rate=`${_}`);let d=f[id],E=h.description;return d!=="url"&&E&&(n.transaction=E),n.sampled=String(hd(i)),e.emit("createDsc",n,i),n}function _d(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){kt&&ut.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 md(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,i){let o=Wa(n),s=(0,r.a)((0,r.a)({sent_at:new Date().toISOString()},o&&{sdk:o}),!!i&&e&&{dsn:gi(e)}),a="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return Dn(s,[a])}function yd(t,e,n,i){let o=Wa(n),s=t.type&&t.type!=="replay_event"?t.type:"event";md(t,n&&n.sdk);let a=jh(t,o,i,e);return delete t.sdkProcessingMetadata,Dn(a,[[{type:s},t]])}function fr(t,e,n,i=0){return new In((o,s)=>{let a=t[i];if(e===null||typeof a!="function")o(e);else{let c=a((0,r.a)({},e),n);kt&&a.id&&c===null&&ut.log(`Event processor "${a.id}" dropped event`),pi(c)?c.then(h=>fr(t,h,n,i+1).then(o)).then(null,s):fr(t,c,n,i+1).then(o).then(null,s)}})}function bd(t,e){let{fingerprint:n,span:i,breadcrumbs:o,sdkProcessingMetadata:s}=e;wd(t,e),i&&Sd(t,i),Cd(t,n),Ed(t,o),xd(t,s)}function as(t,e){let{extra:n,tags:i,user:o,contexts:s,level:a,sdkProcessingMetadata:c,breadcrumbs:h,fingerprint:f,eventProcessors:_,attachments:d,propagationContext:E,transactionName:I,span:S}=e;dn(t,"extra",n),dn(t,"tags",i),dn(t,"user",o),dn(t,"contexts",s),dn(t,"sdkProcessingMetadata",c),a&&(t.level=a),I&&(t.transactionName=I),S&&(t.span=S),h.length&&(t.breadcrumbs=[...t.breadcrumbs,...h]),f.length&&(t.fingerprint=[...t.fingerprint,...f]),_.length&&(t.eventProcessors=[...t.eventProcessors,..._]),d.length&&(t.attachments=[...t.attachments,...d]),t.propagationContext=(0,r.a)((0,r.a)({},t.propagationContext),E)}function dn(t,e,n){if(n&&Object.keys(n).length){t[e]=(0,r.a)({},t[e]);for(let i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[e][i]=n[i])}}function wd(t,e){let{extra:n,tags:i,user:o,contexts:s,level:a,transactionName:c}=e,h=oe(n);h&&Object.keys(h).length&&(t.extra=(0,r.a)((0,r.a)({},h),t.extra));let f=oe(i);f&&Object.keys(f).length&&(t.tags=(0,r.a)((0,r.a)({},f),t.tags));let _=oe(o);_&&Object.keys(_).length&&(t.user=(0,r.a)((0,r.a)({},_),t.user));let d=oe(s);d&&Object.keys(d).length&&(t.contexts=(0,r.a)((0,r.a)({},d),t.contexts)),a&&(t.level=a),c&&t.type!=="transaction"&&(t.transaction=c)}function Ed(t,e){let n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function xd(t,e){t.sdkProcessingMetadata=(0,r.a)((0,r.a)({},t.sdkProcessingMetadata),e)}function Sd(t,e){t.contexts=(0,r.a)({trace:ld(e)},t.contexts),t.sdkProcessingMetadata=(0,r.a)({dynamicSamplingContext:gd(e)},t.sdkProcessingMetadata);let n=Za(e),i=ei(n).description;i&&!t.transaction&&t.type==="transaction"&&(t.transaction=i)}function Cd(t,e){t.fingerprint=t.fingerprint?wh(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}function Td(t,e,n,i,o,s){let{normalizeDepth:a=3,normalizeMaxBreadth:c=1e3}=t,h=(0,r.b)((0,r.a)({},e),{event_id:e.event_id||n.event_id||le(),timestamp:e.timestamp||On()}),f=n.integrations||t.integrations.map(D=>D.name);Od(h,t),Rd(h,f),o&&o.emit("applyFrameMetadata",e),e.type===void 0&&Id(h,t.stackParser);let _=kd(i,n.captureContext);n.mechanism&&En(h,n.mechanism);let d=o?o.getEventProcessors():[],E=Qh().getScopeData();if(s){let D=s.getScopeData();as(E,D)}if(_){let D=_.getScopeData();as(E,D)}let I=[...n.attachments||[],...E.attachments];I.length&&(n.attachments=I),bd(h,E);let S=[...d,...E.eventProcessors];return fr(S,h,n).then(D=>(D&&Dd(D),typeof a=="number"&&a>0?Pd(D,a,c):D))}function Od(t,e){let{environment:n,release:i,dist:o,maxValueLength:s=250}=e;"environment"in t||(t.environment="environment"in e?n:Ya),t.release===void 0&&i!==void 0&&(t.release=i),t.dist===void 0&&o!==void 0&&(t.dist=o),t.message&&(t.message=Qe(t.message,s));let a=t.exception&&t.exception.values&&t.exception.values[0];a&&a.value&&(a.value=Qe(a.value,s));let c=t.request;c&&c.url&&(c.url=Qe(c.url,s))}var ls=new WeakMap;function Id(t,e){let n=Et._sentryDebugIds;if(!n)return;let i,o=ls.get(e);o?i=o:(i=new Map,ls.set(e,i));let s=Object.entries(n).reduce((a,[c,h])=>{let f,_=i.get(c);_?f=_:(f=e(c),i.set(c,f));for(let d=f.length-1;d>=0;d--){let E=f[d];if(E.filename){a[E.filename]=h;break}}return a},{});try{t.exception.values.forEach(a=>{a.stacktrace.frames.forEach(c=>{c.filename&&(c.debug_id=s[c.filename])})})}catch{}}function Dd(t){let e={};try{t.exception.values.forEach(i=>{i.stacktrace.frames.forEach(o=>{o.debug_id&&(o.abs_path?e[o.abs_path]=o.debug_id:o.filename&&(e[o.filename]=o.debug_id),delete o.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(([i,o])=>{n.push({type:"sourcemap",code_file:i,debug_id:o})})}function Rd(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function Pd(t,e,n){if(!t)return null;let i=(0,r.a)((0,r.a)((0,r.a)((0,r.a)((0,r.a)({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(o=>(0,r.a)((0,r.a)({},o),o.data&&{data:Se(o.data,e,n)}))}),t.user&&{user:Se(t.user,e,n)}),t.contexts&&{contexts:Se(t.contexts,e,n)}),t.extra&&{extra:Se(t.extra,e,n)});return t.contexts&&t.contexts.trace&&i.contexts&&(i.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(i.contexts.trace.data=Se(t.contexts.trace.data,e,n))),t.spans&&(i.spans=t.spans.map(o=>(0,r.a)((0,r.a)({},o),o.data&&{data:Se(o.data,e,n)}))),i}function kd(t,e){if(!e)return t;let n=t?t.clone():new ye;return n.update(e),n}function Nd(t){if(t)return Ad(t)?{captureContext:t}:Ld(t)?{captureContext:t}:t}function Ad(t){return t instanceof ye||typeof t=="function"}var Md=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function Ld(t){return Object.keys(t).some(e=>Md.includes(e))}function Bd(t,e){return eo().captureException(t,Nd(e))}function Ja(t,e){return eo().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 Vd(t){return`${Fd(t)}${t.projectId}/envelope/`}function Ud(t,e){return nh((0,r.a)({sentry_key:t.publicKey,sentry_version:jd},e&&{sentry_client:`${e.name}/${e.version}`}))}function $d(t,e,n){return e||`${Vd(t)}?${Ud(t,n)}`}var cs=[];function Hd(t,e){let n={};return e.forEach(i=>{i&&Xa(t,i,n)}),n}function us(t,e){for(let n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function Xa(t,e,n){if(n[e.name]){kt&&ut.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,cs.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),cs.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){let i=e.preprocessEvent.bind(e);t.on("preprocessEvent",(o,s)=>i(o,s,t))}if(typeof e.processEvent=="function"){let i=e.processEvent.bind(e),o=Object.assign((s,a)=>i(s,a,t),{id:e.name});t.addEventProcessor(o)}kt&&ut.log(`Integration installed: ${e.name}`)}var hs="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=eh(t.dsn):kt&&ut.warn("No DSN provided, client will not send events."),this._dsn){let e=$d(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport((0,r.b)((0,r.a)({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},t.transportOptions),{url:e}))}}captureException(t,e,n){let i=le();if(Jo(t))return kt&&ut.log(hs),i;let o=(0,r.a)({event_id:i},e);return this._process(this.eventFromException(t,o).then(s=>this._captureEvent(s,o,n))),o.event_id}captureMessage(t,e,n,i){let o=(0,r.a)({event_id:le()},n),s=qr(t)?t:String(t),a=Zr(t)?this.eventFromMessage(s,e,o):this.eventFromException(t,o);return this._process(a.then(c=>this._captureEvent(c,o,i))),o.event_id}captureEvent(t,e,n){let i=le();if(e&&e.originalException&&Jo(e.originalException))return kt&&ut.log(hs),i;let o=(0,r.a)({event_id:i},e),s=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,o,s||n)),o.event_id}captureSession(t){typeof t.release!="string"?kt&&ut.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),dr(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(i=>n&&i))):He(!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];Xa(this,t,this._integrations),e||us(this,[t])}sendEvent(t,e={}){this.emit("beforeSendEvent",t,e);let n=yd(t,this._dsn,this._options._metadata,this._options.tunnel);for(let o of e.attachments||[])n=Nh(n,Lh(o));let i=this.sendEnvelope(n);i&&i.then(o=>this.emit("afterSendEvent",t,o),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 i=`${t}:${e}`;kt&&ut.log(`Adding outcome: "${i}"`),this._outcomes[i]=(this._outcomes[i]||0)+1}}on(t,e){let n=this._hooks[t]=this._hooks[t]||[];return n.push(e),()=>{let i=n.indexOf(e);i>-1&&n.splice(i,1)}}emit(t,...e){let n=this._hooks[t];n&&n.forEach(i=>i(...e))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,e=>(kt&&ut.error("Error while sending event:",e),e)):(kt&&ut.error("Transport disabled"),He({}))}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=Hd(this,t),us(this,t)}_updateSessionFromEvent(t,e){let n=!1,i=!1,o=e.exception&&e.exception.values;if(o){i=!0;for(let a of o){let c=a.mechanism;if(c&&c.handled===!1){n=!0;break}}}let s=t.status==="ok";(s&&t.errors===0||s&&n)&&(dr(t,(0,r.b)((0,r.a)({},n&&{status:"crashed"}),{errors:t.errors||Number(i||n)})),this.captureSession(t))}_isClientDoneProcessing(t){return new In(e=>{let n=0,i=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),e(!0)):(n+=i,t&&n>=t&&(clearInterval(o),e(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,e,n,i=qa()){let o=this.getOptions(),s=Object.keys(this._integrations);return!e.integrations&&s.length>0&&(e.integrations=s),this.emit("preprocessEvent",t,e),t.type||i.setLastEventId(t.event_id||e.event_id),Td(o,t,e,n,this,i).then(a=>{if(a===null)return a;let c=(0,r.a)((0,r.a)({},i.getPropagationContext()),n?n.getPropagationContext():void 0);if(!(a.contexts&&a.contexts.trace)&&c){let{traceId:h,spanId:f,parentSpanId:_,dsc:d}=c;a.contexts=(0,r.a)({trace:oe({trace_id:h,span_id:f,parent_span_id:_})},a.contexts);let E=d||Ka(h,this);a.sdkProcessingMetadata=(0,r.a)({dynamicSamplingContext:E},a.sdkProcessingMetadata)}return a})}_captureEvent(t,e={},n){return this._processEvent(t,e,n).then(i=>i.event_id,i=>{if(kt){let o=i;o.logLevel==="log"?ut.log(o.message):ut.warn(o)}})}_processEvent(t,e,n){let i=this.getOptions(),{sampleRate:o}=i,s=gr(t),a=Qa(t),c=t.type||"error",h=`before send for type \`${c}\``,f=typeof o>"u"?void 0:_d(o);if(a&&typeof f=="number"&&Math.random()>f)return this.recordDroppedEvent("sample_rate","error",t),ti(new de(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));let _=c==="replay_event"?"replay":c,d=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,e,n,d).then(E=>{if(E===null)throw this.recordDroppedEvent("event_processor",_,t),new de("An event processor returned `null`, will not send event.","log");if(e.data&&e.data.__sentry__===!0)return E;let I=Gd(this,i,E,e);return Wd(I,h)}).then(E=>{if(E===null){if(this.recordDroppedEvent("before_send",_,t),gr(t)){let D=1+(t.spans||[]).length;this._outcomes.span=(this._outcomes.span||0)+D}throw new de(`${h} returned \`null\`, will not send event.`,"log")}let I=n&&n.getSession();!s&&I&&this._updateSessionFromEvent(I,E);let S=E.transaction_info;if(s&&S&&E.transaction!==t.transaction){let D="custom";E.transaction_info=(0,r.b)((0,r.a)({},S),{source:D})}return this.sendEvent(E,e),E}).then(null,E=>{throw E instanceof de?E:(this.captureException(E,{data:{__sentry__:!0},originalException:E}),new de(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
18
|
+
Reason: ${E}`))})}_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[i,o]=e.split(":");return{reason:i,category:o,quantity:n}})}};function Wd(t,e){let n=`${e} must return \`null\` or a valid event.`;if(pi(t))return t.then(i=>{if(!en(i)&&i!==null)throw new de(n);return i},i=>{throw new de(`${e} rejected with ${i}`)});if(!en(t)&&t!==null)throw new de(n);return t}function Gd(t,e,n,i){let{beforeSend:o,beforeSendTransaction:s,beforeSendSpan:a}=e;if(Qa(n)&&o)return o(n,i);if(gr(n)){if(n.spans&&a){let c=[];for(let h of n.spans){let f=a(h);f?c.push(f):t.recordDroppedEvent("before_send","span")}n.spans=c}if(s)return s(n,i)}return n}function Qa(t){return t.type===void 0}function gr(t){return t.type==="transaction"}var qd=64;function Zd(t,e,n=Th(t.bufferSize||qd)){let i={},o=a=>n.drain(a);function s(a){let c=[];if(Qo(a,(d,E)=>{let I=ts(E);if($h(i,I)){let S=ds(d,E);t.recordDroppedEvent("ratelimit_backoff",I,S)}else c.push(d)}),c.length===0)return He({});let h=Dn(a[0],c),f=d=>{Qo(h,(E,I)=>{let S=ds(E,I);t.recordDroppedEvent(d,ts(I),S)})},_=()=>e({body:Ah(h)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&kt&&ut.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),i=Hh(i,d),d),d=>{throw f("network_error"),d});return n.add(_).then(d=>d,d=>{if(d instanceof de)return kt&&ut.error("Skipped sending event because buffer is full."),f("queue_overflow"),He({});throw d})}return{send:s,flush:o}}function ds(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}function Yd(t,e,n=[e],i="npm"){let o=t._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${e}`,packages:n.map(s=>({name:`${i}:@sentry/${s}`,version:Be})),version:Be}),t._metadata=o}var Kd=100;function ze(t,e){let n=Kt(),i=qa();if(!n)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:s=Kd}=n.getOptions();if(s<=0)return;let a=On(),c=(0,r.a)({timestamp:a},t),h=o?Jr(()=>o(c,e)):c;h!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",h,e),i.addBreadcrumb(h,s))}var ps,Jd="FunctionToString",fs=new WeakMap,Xd=()=>({name:Jd,setupOnce(){ps=Function.prototype.toString;try{Function.prototype.toString=function(...t){let e=Xr(this),n=fs.has(Kt())&&e!==void 0?e:this;return ps.apply(n,t)}}catch{}},setup(t){fs.set(t,!0)}}),Qd=Xd,tp=[/^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"],ep="InboundFilters",np=(t={})=>({name:ep,processEvent(e,n,i){let o=i.getOptions(),s=rp(t,o);return op(e,s)?null:e}}),ip=np;function rp(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:tp],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function op(t,e){return e.ignoreInternal&&hp(t)?(kt&&ut.warn(`Event dropped due to being internal Sentry Error.
|
|
19
19
|
Event: ${xe(t)}`),!0):sp(t,e.ignoreErrors)?(kt&&ut.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
20
20
|
Event: ${xe(t)}`),!0):pp(t)?(kt&&ut.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
21
21
|
Event: ${xe(t)}`),!0):ap(t,e.ignoreTransactions)?(kt&&ut.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
@@ -23,16 +23,16 @@ Event: ${xe(t)}`),!0):lp(t,e.denyUrls)?(kt&&ut.warn(`Event dropped due to being
|
|
|
23
23
|
Event: ${xe(t)}.
|
|
24
24
|
Url: ${ni(t)}`),!0):cp(t,e.allowUrls)?!1:(kt&&ut.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
25
25
|
Event: ${xe(t)}.
|
|
26
|
-
Url: ${ni(t)}`),!0)}function sp(t,e){return t.type||!e||!e.length?!1:up(t).some(n=>fi(n,e))}function ap(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;let n=t.transaction;return n?fi(n,e):!1}function lp(t,e){if(!e||!e.length)return!1;let n=ni(t);return n?fi(n,e):!1}function cp(t,e){if(!e||!e.length)return!0;let n=ni(t);return n?fi(n,e):!0}function up(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 hp(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function dp(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 ni(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?dp(e):null}catch{return kt&&ut.error(`Cannot extract url for event ${xe(t)}`),null}}function pp(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 fp="Dedupe",gp=()=>{let t;return{name:fp,processEvent(e){if(e.type)return e;try{if(mp(e,t))return kt&&ut.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},_p=gp;function mp(t,e){return e?!!(vp(t,e)||yp(t,e)):!1}function vp(t,e){let n=t.message,i=e.message;return!(!n&&!i||n&&!i||!n&&i||n!==i||!el(t,e)||!tl(t,e))}function yp(t,e){let n=gs(e),i=gs(t);return!(!n||!i||n.type!==i.type||n.value!==i.value||!el(t,e)||!tl(t,e))}function tl(t,e){let n=Zo(t),i=Zo(e);if(!n&&!i)return!0;if(n&&!i||!n&&i||(n=n,i=i,i.length!==n.length))return!1;for(let o=0;o<i.length;o++){let s=i[o],a=n[o];if(s.filename!==a.filename||s.lineno!==a.lineno||s.colno!==a.colno||s.function!==a.function)return!1}return!0}function el(t,e){let n=t.fingerprint,i=e.fingerprint;if(!n&&!i)return!0;if(n&&!i||!n&&i)return!1;n=n,i=i;try{return n.join("")===i.join("")}catch{return!1}}function gs(t){return t.exception&&t.exception.values&&t.exception.values[0]}var Vt=Et,_r=0;function nl(){return _r>0}function bp(){_r++,setTimeout(()=>{_r--})}function on(t,e={},n){if(typeof t!="function")return t;try{let o=t.__sentry_wrapped__;if(o)return o;if(Xr(t))return t}catch{return t}let i=function(){let o=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let s=o.map(a=>on(a,e));return t.apply(this,s)}catch(s){throw bp(),td(a=>{a.addEventProcessor(c=>(e.mechanism&&(cr(c,void 0,void 0),En(c,e.mechanism)),c.extra=(0,r.b)((0,r.a)({},c.extra),{arguments:o}),c)),Bd(s)}),s}};try{for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(i[o]=t[o])}catch{}Va(i,t),Ue(t,"__sentry_wrapped__",i);try{Object.getOwnPropertyDescriptor(i,"name").configurable&&Object.defineProperty(i,"name",{get(){return t.name}})}catch{}return i}var Je=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function no(t,e){let n=io(t,e),i={type:e&&e.name,value:Cp(e)};return n.length&&(i.stacktrace={frames:n}),i.type===void 0&&i.value===""&&(i.value="Unrecoverable error caught"),i}function wp(t,e,n,i){let o=Kt(),s=o&&o.getOptions().normalizeDepth,a=Rp(e),c={__serialized__:za(e,s)};if(a)return{exception:{values:[no(t,a)]},extra:c};let h={exception:{values:[{type:di(e)?e.constructor.name:i?"UnhandledRejection":"Error",value:Ip(e,{isUnhandledRejection:i})}]},extra:c};if(n){let f=io(t,n);f.length&&(h.exception.values[0].stacktrace={frames:f})}return h}function Mi(t,e){return{exception:{values:[no(t,e)]}}}function io(t,e){let n=e.stacktrace||e.stack||"",i=xp(e),o=Sp(e);try{return t(n,i,o)}catch{}return[]}var Ep=/Minified React error #\d+;/i;function xp(t){return t&&Ep.test(t.message)?1:0}function Sp(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function Cp(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function Tp(t,e,n,i){let o=n&&n.syntheticException||void 0,s=ro(t,e,o,i);return En(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),He(s)}function Op(t,e,n="info",i,o){let s=i&&i.syntheticException||void 0,a=mr(t,e,s,o);return a.level=n,i&&i.event_id&&(a.event_id=i.event_id),He(a)}function ro(t,e,n,i,o){let s;if(La(e)&&e.error)return Mi(t,e.error);if(Vo(e)||ju(e)){let a=e;if("stack"in e)s=Mi(t,e);else{let c=a.name||(Vo(a)?"DOMError":"DOMException"),h=a.message?`${c}: ${a.message}`:c;s=mr(t,h,n,i),cr(s,h)}return"code"in a&&(s.tags=(0,r.b)((0,r.a)({},s.tags),{"DOMException.code":`${a.code}`})),s}return Gr(e)?Mi(t,e):nn(e)||di(e)?(s=wp(t,e,n,o),En(s,{synthetic:!0}),s):(s=mr(t,e,n,i),cr(s,`${e}`,void 0),En(s,{synthetic:!0}),s)}function mr(t,e,n,i){let o={};if(i&&n){let s=io(t,n);s.length&&(o.exception={values:[{value:e,stacktrace:{frames:s}}]})}if(qr(e)){let{__sentry_template_string__:s,__sentry_template_values__:a}=e;return o.logentry={message:s,params:a},o}return o.message=e,o}function Ip(t,{isUnhandledRejection:e}){let n=ih(t),i=e?"promise rejection":"exception";return La(t)?`Event \`ErrorEvent\` captured as ${i} with message \`${t.message}\``:di(t)?`Event \`${Dp(t)}\` (type=${t.type}) captured as ${i}`:`Object captured as ${i} with keys: ${n}`}function Dp(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function Rp(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let n=t[e];if(n instanceof Error)return n}}function Pp(t,{metadata:e,tunnel:n,dsn:i}){let o=(0,r.a)((0,r.a)({event_id:t.event_id,sent_at:new Date().toISOString()},e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}}),!!n&&!!i&&{dsn:gi(i)}),s=kp(t);return Dn(o,[s])}function kp(t){return[{type:"user_report"},t]}var Np=class extends zd{constructor(t){let e=(0,r.a)({parentSpanIsAlwaysRootSpan:!0},t),n=Vt.SENTRY_SDK_SOURCE||yh();Yd(e,"browser",["browser"],n),super(e),e.sendClientReports&&Vt.document&&Vt.document.addEventListener("visibilitychange",()=>{Vt.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,e){return Tp(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t,e="info",n){return Op(this._options.stackParser,t,e,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){Je&&ut.warn("SDK not enabled, will not capture user feedback.");return}let e=Pp(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){Je&&ut.log("No outcomes to send");return}if(!this._dsn){Je&&ut.log("No dsn provided, will not send outcomes");return}Je&&ut.log("Sending outcomes:",t);let e=Fh(t,this._options.tunnel&&gi(this._dsn));this.sendEnvelope(e)}},Ap=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ht=Et,Mp=1e3,_s,vr,yr;function Lp(t){let e="dom";We(e,t),Ge(e,Bp)}function Bp(){if(!Ht.document)return;let t=ae.bind(null,"dom"),e=ms(t,!0);Ht.document.addEventListener("click",e,!1),Ht.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{let i=Ht[n]&&Ht[n].prototype;!i||!i.hasOwnProperty||!i.hasOwnProperty("addEventListener")||(Ut(i,"addEventListener",function(o){return function(s,a,c){if(s==="click"||s=="keypress")try{let h=this,f=h.__sentry_instrumentation_handlers__=h.__sentry_instrumentation_handlers__||{},_=f[s]=f[s]||{refCount:0};if(!_.handler){let d=ms(t);_.handler=d,o.call(this,s,d,c)}_.refCount++}catch{}return o.call(this,s,a,c)}}),Ut(i,"removeEventListener",function(o){return function(s,a,c){if(s==="click"||s=="keypress")try{let h=this,f=h.__sentry_instrumentation_handlers__||{},_=f[s];_&&(_.refCount--,_.refCount<=0&&(o.call(this,s,_.handler,c),_.handler=void 0,delete f[s]),Object.keys(f).length===0&&delete h.__sentry_instrumentation_handlers__)}catch{}return o.call(this,s,a,c)}}))})}function jp(t){if(t.type!==vr)return!1;try{if(!t.target||t.target._sentryId!==yr)return!1}catch{}return!0}function Fp(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function ms(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;let i=Vp(n);if(Fp(n.type,i))return;Ue(n,"_sentryCaptured",!0),i&&!i._sentryId&&Ue(i,"_sentryId",le());let o=n.type==="keypress"?"input":n.type;jp(n)||(t({event:n,name:o,global:e}),vr=n.type,yr=i?i._sentryId:void 0),clearTimeout(_s),_s=Ht.setTimeout(()=>{yr=void 0,vr=void 0},Mp)}}function Vp(t){try{return t.target}catch{return null}}var Vn;function Up(t){let e="history";We(e,t),Ge(e,$p)}function $p(){if(!zh())return;let t=Ht.onpopstate;Ht.onpopstate=function(...n){let i=Ht.location.href,o=Vn;if(Vn=i,ae("history",{from:o,to:i}),t)try{return t.apply(this,n)}catch{}};function e(n){return function(...i){let o=i.length>2?i[2]:void 0;if(o){let s=Vn,a=String(o);Vn=a,ae("history",{from:s,to:a})}return n.apply(this,i)}}Ut(Ht.history,"pushState",e),Ut(Ht.history,"replaceState",e)}var Yn={};function Hp(t){let e=Yn[t];if(e)return e;let n=Ht[t];if(ar(n))return Yn[t]=n.bind(Ht);let i=Ht.document;if(i&&typeof i.createElement=="function")try{let o=i.createElement("iframe");o.hidden=!0,i.head.appendChild(o);let s=o.contentWindow;s&&s[t]&&(n=s[t]),i.head.removeChild(o)}catch(o){Ap&&ut.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,o)}return n&&(Yn[t]=n.bind(Ht))}function vs(t){Yn[t]=void 0}var vn="__sentry_xhr_v3__";function zp(t){let e="xhr";We(e,t),Ge(e,Wp)}function Wp(){if(!Ht.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;Ut(t,"open",function(e){return function(...n){let i=Oe()*1e3,o=ve(n[0])?n[0].toUpperCase():void 0,s=Gp(n[1]);if(!o||!s)return e.apply(this,n);this[vn]={method:o,url:s,request_headers:{}},o==="POST"&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let a=()=>{let c=this[vn];if(c&&this.readyState===4){try{c.status_code=this.status}catch{}let h={endTimestamp:Oe()*1e3,startTimestamp:i,xhr:this};ae("xhr",h)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Ut(this,"onreadystatechange",function(c){return function(...h){return a(),c.apply(this,h)}}):this.addEventListener("readystatechange",a),Ut(this,"setRequestHeader",function(c){return function(...h){let[f,_]=h,d=this[vn];return d&&ve(f)&&ve(_)&&(d.request_headers[f.toLowerCase()]=_),c.apply(this,h)}}),e.apply(this,n)}}),Ut(t,"send",function(e){return function(...n){let i=this[vn];if(!i)return e.apply(this,n);n[0]!==void 0&&(i.body=n[0]);let o={startTimestamp:Oe()*1e3,xhr:this};return ae("xhr",o),e.apply(this,n)}})}function Gp(t){if(ve(t))return t;try{return t.toString()}catch{}}function qp(t,e=Hp("fetch")){let n=0,i=0;function o(s){let a=s.body.length;n+=a,i++;let c=(0,r.a)({body:s.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&i<15},t.fetchOptions);if(!e)return vs("fetch"),ti("No fetch implementation available");try{return e(t.url,c).then(h=>(n-=a,i--,{statusCode:h.status,headers:{"x-sentry-rate-limits":h.headers.get("X-Sentry-Rate-Limits"),"retry-after":h.headers.get("Retry-After")}}))}catch(h){return vs("fetch"),n-=a,i--,ti(h)}}return Zd(t,o)}var Zp=30,Yp=50;function br(t,e,n,i){let o={filename:t,function:e==="<anonymous>"?$e:e,in_app:!0};return n!==void 0&&(o.lineno=n),i!==void 0&&(o.colno=i),o}var Kp=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Jp=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Xp=/\((\S*)(?::(\d+))(?::(\d+))\)/,Qp=t=>{let e=Kp.exec(t);if(e){let[,i,o,s]=e;return br(i,$e,+o,+s)}let n=Jp.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){let s=Xp.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}let[i,o]=il(n[1]||$e,n[2]);return br(o,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},tf=[Zp,Qp],ef=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,nf=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,rf=t=>{let e=ef.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let o=nf.exec(e[3]);o&&(e[1]=e[1]||"eval",e[3]=o[1],e[4]=o[2],e[5]="")}let n=e[3],i=e[1]||$e;return[i,n]=il(i,n),br(n,i,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},of=[Yp,rf],sf=[tf,of],af=oh(...sf),il=(t,e)=>{let n=t.indexOf("safari-extension")!==-1,i=t.indexOf("safari-web-extension")!==-1;return n||i?[t.indexOf("@")!==-1?t.split("@")[0]:$e,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},Un=1024,lf="Breadcrumbs",cf=(t={})=>{let e=(0,r.a)({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:lf,setup(n){e.console&&ah(pf(n)),e.dom&&Lp(df(n,e.dom)),e.xhr&&zp(ff(n)),e.fetch&&dh(gf(n)),e.history&&Up(_f(n)),e.sentry&&n.on("beforeSendEvent",hf(n))}}},uf=cf;function hf(t){return function(e){Kt()===t&&ze({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:xe(e)},{event:e})}}function df(t,e){return function(n){if(Kt()!==t)return;let i,o,s=typeof e=="object"?e.serializeAttribute:void 0,a=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;a&&a>Un&&(Je&&ut.warn(`\`dom.maxStringLength\` cannot exceed ${Un}, but a value of ${a} was configured. Sentry will use ${Un} instead.`),a=Un),typeof s=="string"&&(s=[s]);try{let h=n.event,f=mf(h)?h.target:h;i=ja(f,{keyAttrs:s,maxStringLength:a}),o=Zu(f)}catch{i="<unknown>"}if(i.length===0)return;let c={category:`ui.${n.name}`,message:i};o&&(c.data={"ui.component_name":o}),ze(c,{event:n.event,name:n.name,global:n.global})}}function pf(t){return function(e){if(Kt()!==t)return;let n={category:"console",data:{arguments:e.args,logger:"console"},level:Ih(e.level),message:Uo(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)n.message=`Assertion failed: ${Uo(e.args.slice(1)," ")||"console.assert"}`,n.data.arguments=e.args.slice(1);else return;ze(n,{input:e.args,level:e.level})}}function ff(t){return function(e){if(Kt()!==t)return;let{startTimestamp:n,endTimestamp:i}=e,o=e.xhr[vn];if(!n||!i||!o)return;let{method:s,url:a,status_code:c,body:h}=o,f={method:s,url:a,status_code:c},_={xhr:e.xhr,input:h,startTimestamp:n,endTimestamp:i};ze({category:"xhr",data:f,type:"http"},_)}}function gf(t){return function(e){if(Kt()!==t)return;let{startTimestamp:n,endTimestamp:i}=e;if(i&&!(e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"))if(e.error){let o=e.fetchData,s={data:e.error,input:e.args,startTimestamp:n,endTimestamp:i};ze({category:"fetch",data:o,level:"error",type:"http"},s)}else{let o=e.response,s=(0,r.b)((0,r.a)({},e.fetchData),{status_code:o&&o.status}),a={input:e.args,response:o,startTimestamp:n,endTimestamp:i};ze({category:"fetch",data:s,type:"http"},a)}}}function _f(t){return function(e){if(Kt()!==t)return;let n=e.from,i=e.to,o=Ai(Vt.location.href),s=n?Ai(n):void 0,a=Ai(i);(!s||!s.path)&&(s=o),o.protocol===a.protocol&&o.host===a.host&&(i=a.relative),o.protocol===s.protocol&&o.host===s.host&&(n=s.relative),ze({category:"navigation",data:{from:n,to:i}})}}function mf(t){return!!t&&!!t.target}var vf=["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"],yf="BrowserApiErrors",bf=(t={})=>{let e=(0,r.a)({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t);return{name:yf,setupOnce(){e.setTimeout&&Ut(Vt,"setTimeout",ys),e.setInterval&&Ut(Vt,"setInterval",ys),e.requestAnimationFrame&&Ut(Vt,"requestAnimationFrame",Ef),e.XMLHttpRequest&&"XMLHttpRequest"in Vt&&Ut(XMLHttpRequest.prototype,"send",xf);let n=e.eventTarget;n&&(Array.isArray(n)?n:vf).forEach(Sf)}}},wf=bf;function ys(t){return function(...e){let n=e[0];return e[0]=on(n,{mechanism:{data:{function:Ie(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function Ef(t){return function(e){return t.apply(this,[on(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Ie(t)},handled:!1,type:"instrument"}})])}}function xf(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&Ut(n,i,function(o){let s={mechanism:{data:{function:i,handler:Ie(o)},handled:!1,type:"instrument"}},a=Xr(o);return a&&(s.mechanism.data.handler=Ie(a)),on(o,s)})}),t.apply(this,e)}}function Sf(t){let e=Vt,n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Ut(n,"addEventListener",function(i){return function(o,s,a){try{typeof s.handleEvent=="function"&&(s.handleEvent=on(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ie(s),target:t},handled:!1,type:"instrument"}}))}catch{}return i.apply(this,[o,on(s,{mechanism:{data:{function:"addEventListener",handler:Ie(s),target:t},handled:!1,type:"instrument"}}),a])}}),Ut(n,"removeEventListener",function(i){return function(o,s,a){let c=s;try{let h=c&&c.__sentry_wrapped__;h&&i.call(this,o,h,a)}catch{}return i.call(this,o,c,a)}}))}var Cf="GlobalHandlers",Tf=(t={})=>{let e=(0,r.a)({onerror:!0,onunhandledrejection:!0},t);return{name:Cf,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(If(n),bs("onerror")),e.onunhandledrejection&&(Df(n),bs("onunhandledrejection"))}}},Of=Tf;function If(t){gh(e=>{let{stackParser:n,attachStacktrace:i}=rl();if(Kt()!==t||nl())return;let{msg:o,url:s,line:a,column:c,error:h}=e,f=kf(ro(n,h||o,void 0,i,!1),s,a,c);f.level="error",Ja(f,{originalException:h,mechanism:{handled:!1,type:"onerror"}})})}function Df(t){mh(e=>{let{stackParser:n,attachStacktrace:i}=rl();if(Kt()!==t||nl())return;let o=Rf(e),s=Zr(o)?Pf(o):ro(n,o,void 0,i,!0);s.level="error",Ja(s,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Rf(t){if(Zr(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 Pf(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function kf(t,e,n,i){let o=t.exception=t.exception||{},s=o.values=o.values||[],a=s[0]=s[0]||{},c=a.stacktrace=a.stacktrace||{},h=c.frames=c.frames||[],f=isNaN(parseInt(i,10))?void 0:i,_=isNaN(parseInt(n,10))?void 0:n,d=ve(e)&&e.length>0?e:qu();return h.length===0&&h.push({colno:f,filename:d,function:$e,in_app:!0,lineno:_}),t}function bs(t){Je&&ut.log(`Global Handler attached: ${t}`)}function rl(){let t=Kt();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var Nf=()=>({name:"HttpContext",preprocessEvent(t){if(!Vt.navigator&&!Vt.location&&!Vt.document)return;let e=t.request&&t.request.url||Vt.location&&Vt.location.href,{referrer:n}=Vt.document||{},{userAgent:i}=Vt.navigator||{},o=(0,r.a)((0,r.a)((0,r.a)({},t.request&&t.request.headers),n&&{Referer:n}),i&&{"User-Agent":i}),s=(0,r.b)((0,r.a)((0,r.a)({},t.request),e&&{url:e}),{headers:o});t.request=s}}),Af="cause",Mf=5,Lf="LinkedErrors",Bf=(t={})=>{let e=t.limit||Mf,n=t.key||Af;return{name:Lf,preprocessEvent(i,o,s){let a=s.getOptions();Hu(no,a.stackParser,a.maxValueLength,n,e,i,o)}}},jf=Bf;function Ff(t){return[ip(),Qd(),wf(),uf(),Of(),jf(),_p(),Nf()]}var Vf=class extends Error{cause;constructor(t,e){super(t),this.cause=e}},Uf=class ol{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new ol),this.INSTANCE}captureException(e,n,i){me.error(e),this.getNewScope(n,i).captureException(e)}captureMessage(e,n,i,o){this.getNewScope(i,o).captureMessage(e,n??"error")}captureError(e,n,i,o){me.error(e,n);let s=this.getNewScope(i,o),a=new Vf(e,n);s.captureException(a)}setGlobalContext(e,n){this.contexts[e]=(0,r.a)({context:n},this.contexts[e])}setUser(e){this.user=e}setTags(e){this.tags=e}getNewScope(e,n){let i=new ye;if(i.setClient(this.client),i.setUser(this.user),e?.triggerContext){let o=e.triggerContext;i.setExtras(o.triggerData.sentryContext()),delete e.triggerContext}return e&&i.setExtras(e),this.tags&&i.setTags(this.tags),n&&i.setTags(n),Object.keys(this.contexts).forEach(o=>{i.setContext(o,this.contexts[o])}),i.setTag("language",navigator.language),i.setTag("timezone",Wf()),i}init(){let e=Ff({}).filter(n=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(n.name));this.client=new Np({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:qp,stackParser:af,integrations:e,environment:en.mode,release:`web-sdk@${Ft.SDK_VERSION}`,debug:en.debug}),this.client.init()}},ws=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"},Es=(0,r.e)(uu());function sl(t){return Es.default.createInstance({name:"lc",storeName:t,driver:Es.default.LOCALSTORAGE})}var al=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}},dy=class extends al{static storeName="ses";static{this.storage=sl(this.storeName)}},xs=class extends al{static storeName="usr";static{this.storage=sl(this.storeName)}},$f=class{static format(t,e){let n=/{{\s*(\w+)\s*}}/;return e.replace(n,(i,o)=>{switch(o){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 i}})}static formatWithDelimiters(t,e=2,n=",",i="."){if(isNaN(t)||t==null)return"0";let o=(t/100).toFixed(e).split("."),s=o[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+n),a=o[1]?i+o[1]:"";return s+a}},Hf=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 Bu(t)}};function oo(t,e){if(t==0&&e)return"Free";let n=Hf.get(),i=Aa.get(),o=n.shopCurrencyCode||i.currency,s=n.currencyCode;s||me.warn("Currency code is not set in RuntimeData");let a=i.money?.format??n.moneyFormat,c;if(a&&o===s)c=$f.format(t*100,a);else{let h;try{h=new Intl.NumberFormat(zf(),{style:"currency",currency:s||o,minimumFractionDigits:0,maximumFractionDigits:2})}catch(f){return Uf.getInstance().captureException(f,{currentCurrency:s,shopCurrency:o}),""}c=h.format(t),c=c.replace("\u20B9","Rs. "),i.money?.showCurrency&&s!=="INR"&&(c=c.concat(` ${s}`))}return c}function zf(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}var $n;function Wf(){if($n)return $n;try{return $n=Intl.DateTimeFormat().resolvedOptions().timeZone,$n}catch{return""}}var mi=class wr{transform(e){return e==null?null:oo(e)}static \u0275fac=function(e){return new(e||wr)};static \u0275pipe=(0,r.qa)({name:"cooeeCurrency",type:wr,pure:!0})},Gf=(()=>{class t{static entityMap={'"':"""};static escapeHtml(n){return String(n).replace(/"/g,i=>t.entityMap[i])}}return t})(),qf=Object.prototype.toString,cn=Array.isArray||function(t){return qf.call(t)==="[object Array]"};function so(t){return typeof t=="function"}function Zf(t){return cn(t)?"array":typeof t}function Li(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Ss(t,e){return t!=null&&typeof t=="object"&&e in t}function Yf(t,e){return t!=null&&typeof t!="object"&&t.hasOwnProperty&&t.hasOwnProperty(e)}var Kf=RegExp.prototype.test;function Jf(t,e){return Kf.call(t,e)}var Xf=/\S/;function Qf(t){return!Jf(Xf,t)}var tg={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function eg(t){return String(t).replace(/[&<>"'`=\/]/g,function(e){return tg[e]})}var ng=/\s*/,ig=/\s+/,Cs=/\s*=/,rg=/\s*\}/,og=/#|\^|\/|>|\{|&|=|!/;function sg(t,e){if(!t)return[];var n=!1,i=[],o=[],s=[],a=!1,c=!1,h="",f=0;function _(){if(a&&!c)for(;s.length;)delete o[s.pop()];else s=[];a=!1,c=!1}var d,E,I;function S(j){if(typeof j=="string"&&(j=j.split(ig,2)),!cn(j)||j.length!==2)throw new Error("Invalid tags: "+j);d=new RegExp(Li(j[0])+"\\s*"),E=new RegExp("\\s*"+Li(j[1])),I=new RegExp("\\s*"+Li("}"+j[1]))}S(e||ne.tags);for(var D=new Rn(t),M,L,z,X,H,Q;!D.eos();){if(M=D.pos,z=D.scanUntil(d),z)for(var mt=0,vt=z.length;mt<vt;++mt)X=z.charAt(mt),Qf(X)?(s.push(o.length),h+=X):(c=!0,n=!0,h+=" "),o.push(["text",X,M,M+1]),M+=1,X===`
|
|
27
|
-
`&&(_(),h="",f=0,n=!1);if(!D.scan(d))break;if(a=!0,L=D.scan(og)||"name",D.scan(ng),L==="="?(z=D.scanUntil(Cs),D.scan(Cs),D.scanUntil(E)):L==="{"?(z=D.scanUntil(I),D.scan(rg),D.scanUntil(E),L="&"):z=D.scanUntil(E),!D.scan(E))throw new Error("Unclosed tag at "+D.pos);if(L==">"?H=[L,z,M,D.pos,h,f,n]:H=[L,z,M,D.pos],f++,o.push(H),L==="#"||L==="^")i.push(H);else if(L==="/"){if(Q=i.pop(),!Q)throw new Error('Unopened section "'+z+'" at '+M);if(Q[1]!==z)throw new Error('Unclosed section "'+Q[1]+'" at '+M)}else L==="name"||L==="{"||L==="&"?c=!0:L==="="&&S(z)}if(_(),Q=i.pop(),Q)throw new Error('Unclosed section "'+Q[1]+'" at '+D.pos);return lg(ag(o))}function ag(t){for(var e=[],n,i,o=0,s=t.length;o<s;++o)n=t[o],n&&(n[0]==="text"&&i&&i[0]==="text"?(i[1]+=n[1],i[3]=n[3]):(e.push(n),i=n));return e}function lg(t){for(var e=[],n=e,i=[],o,s,a=0,c=t.length;a<c;++a)switch(o=t[a],o[0]){case"#":case"^":n.push(o),i.push(o),n=o[4]=[];break;case"/":s=i.pop(),s[5]=o[2],n=i.length>0?i[i.length-1][4]:e;break;default:n.push(o)}return e}function Rn(t){this.string=t,this.tail=t,this.pos=0}Rn.prototype.eos=function(){return this.tail===""};Rn.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};Rn.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
|
|
26
|
+
Url: ${ni(t)}`),!0)}function sp(t,e){return t.type||!e||!e.length?!1:up(t).some(n=>fi(n,e))}function ap(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;let n=t.transaction;return n?fi(n,e):!1}function lp(t,e){if(!e||!e.length)return!1;let n=ni(t);return n?fi(n,e):!1}function cp(t,e){if(!e||!e.length)return!0;let n=ni(t);return n?fi(n,e):!0}function up(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 hp(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function dp(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 ni(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?dp(e):null}catch{return kt&&ut.error(`Cannot extract url for event ${xe(t)}`),null}}function pp(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 fp="Dedupe",gp=()=>{let t;return{name:fp,processEvent(e){if(e.type)return e;try{if(mp(e,t))return kt&&ut.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},_p=gp;function mp(t,e){return e?!!(vp(t,e)||yp(t,e)):!1}function vp(t,e){let n=t.message,i=e.message;return!(!n&&!i||n&&!i||!n&&i||n!==i||!el(t,e)||!tl(t,e))}function yp(t,e){let n=gs(e),i=gs(t);return!(!n||!i||n.type!==i.type||n.value!==i.value||!el(t,e)||!tl(t,e))}function tl(t,e){let n=Zo(t),i=Zo(e);if(!n&&!i)return!0;if(n&&!i||!n&&i||(n=n,i=i,i.length!==n.length))return!1;for(let o=0;o<i.length;o++){let s=i[o],a=n[o];if(s.filename!==a.filename||s.lineno!==a.lineno||s.colno!==a.colno||s.function!==a.function)return!1}return!0}function el(t,e){let n=t.fingerprint,i=e.fingerprint;if(!n&&!i)return!0;if(n&&!i||!n&&i)return!1;n=n,i=i;try{return n.join("")===i.join("")}catch{return!1}}function gs(t){return t.exception&&t.exception.values&&t.exception.values[0]}var Vt=Et,_r=0;function nl(){return _r>0}function bp(){_r++,setTimeout(()=>{_r--})}function rn(t,e={},n){if(typeof t!="function")return t;try{let o=t.__sentry_wrapped__;if(o)return o;if(Xr(t))return t}catch{return t}let i=function(){let o=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let s=o.map(a=>rn(a,e));return t.apply(this,s)}catch(s){throw bp(),td(a=>{a.addEventProcessor(c=>(e.mechanism&&(cr(c,void 0,void 0),En(c,e.mechanism)),c.extra=(0,r.b)((0,r.a)({},c.extra),{arguments:o}),c)),Bd(s)}),s}};try{for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(i[o]=t[o])}catch{}Va(i,t),Ue(t,"__sentry_wrapped__",i);try{Object.getOwnPropertyDescriptor(i,"name").configurable&&Object.defineProperty(i,"name",{get(){return t.name}})}catch{}return i}var Je=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function no(t,e){let n=io(t,e),i={type:e&&e.name,value:Cp(e)};return n.length&&(i.stacktrace={frames:n}),i.type===void 0&&i.value===""&&(i.value="Unrecoverable error caught"),i}function wp(t,e,n,i){let o=Kt(),s=o&&o.getOptions().normalizeDepth,a=Rp(e),c={__serialized__:za(e,s)};if(a)return{exception:{values:[no(t,a)]},extra:c};let h={exception:{values:[{type:di(e)?e.constructor.name:i?"UnhandledRejection":"Error",value:Ip(e,{isUnhandledRejection:i})}]},extra:c};if(n){let f=io(t,n);f.length&&(h.exception.values[0].stacktrace={frames:f})}return h}function Mi(t,e){return{exception:{values:[no(t,e)]}}}function io(t,e){let n=e.stacktrace||e.stack||"",i=xp(e),o=Sp(e);try{return t(n,i,o)}catch{}return[]}var Ep=/Minified React error #\d+;/i;function xp(t){return t&&Ep.test(t.message)?1:0}function Sp(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function Cp(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function Tp(t,e,n,i){let o=n&&n.syntheticException||void 0,s=ro(t,e,o,i);return En(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),He(s)}function Op(t,e,n="info",i,o){let s=i&&i.syntheticException||void 0,a=mr(t,e,s,o);return a.level=n,i&&i.event_id&&(a.event_id=i.event_id),He(a)}function ro(t,e,n,i,o){let s;if(La(e)&&e.error)return Mi(t,e.error);if(Vo(e)||ju(e)){let a=e;if("stack"in e)s=Mi(t,e);else{let c=a.name||(Vo(a)?"DOMError":"DOMException"),h=a.message?`${c}: ${a.message}`:c;s=mr(t,h,n,i),cr(s,h)}return"code"in a&&(s.tags=(0,r.b)((0,r.a)({},s.tags),{"DOMException.code":`${a.code}`})),s}return Gr(e)?Mi(t,e):en(e)||di(e)?(s=wp(t,e,n,o),En(s,{synthetic:!0}),s):(s=mr(t,e,n,i),cr(s,`${e}`,void 0),En(s,{synthetic:!0}),s)}function mr(t,e,n,i){let o={};if(i&&n){let s=io(t,n);s.length&&(o.exception={values:[{value:e,stacktrace:{frames:s}}]})}if(qr(e)){let{__sentry_template_string__:s,__sentry_template_values__:a}=e;return o.logentry={message:s,params:a},o}return o.message=e,o}function Ip(t,{isUnhandledRejection:e}){let n=ih(t),i=e?"promise rejection":"exception";return La(t)?`Event \`ErrorEvent\` captured as ${i} with message \`${t.message}\``:di(t)?`Event \`${Dp(t)}\` (type=${t.type}) captured as ${i}`:`Object captured as ${i} with keys: ${n}`}function Dp(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function Rp(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let n=t[e];if(n instanceof Error)return n}}function Pp(t,{metadata:e,tunnel:n,dsn:i}){let o=(0,r.a)((0,r.a)({event_id:t.event_id,sent_at:new Date().toISOString()},e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}}),!!n&&!!i&&{dsn:gi(i)}),s=kp(t);return Dn(o,[s])}function kp(t){return[{type:"user_report"},t]}var Np=class extends zd{constructor(t){let e=(0,r.a)({parentSpanIsAlwaysRootSpan:!0},t),n=Vt.SENTRY_SDK_SOURCE||yh();Yd(e,"browser",["browser"],n),super(e),e.sendClientReports&&Vt.document&&Vt.document.addEventListener("visibilitychange",()=>{Vt.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,e){return Tp(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t,e="info",n){return Op(this._options.stackParser,t,e,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){Je&&ut.warn("SDK not enabled, will not capture user feedback.");return}let e=Pp(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){Je&&ut.log("No outcomes to send");return}if(!this._dsn){Je&&ut.log("No dsn provided, will not send outcomes");return}Je&&ut.log("Sending outcomes:",t);let e=Fh(t,this._options.tunnel&&gi(this._dsn));this.sendEnvelope(e)}},Ap=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ht=Et,Mp=1e3,_s,vr,yr;function Lp(t){let e="dom";We(e,t),Ge(e,Bp)}function Bp(){if(!Ht.document)return;let t=ae.bind(null,"dom"),e=ms(t,!0);Ht.document.addEventListener("click",e,!1),Ht.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{let i=Ht[n]&&Ht[n].prototype;!i||!i.hasOwnProperty||!i.hasOwnProperty("addEventListener")||(Ut(i,"addEventListener",function(o){return function(s,a,c){if(s==="click"||s=="keypress")try{let h=this,f=h.__sentry_instrumentation_handlers__=h.__sentry_instrumentation_handlers__||{},_=f[s]=f[s]||{refCount:0};if(!_.handler){let d=ms(t);_.handler=d,o.call(this,s,d,c)}_.refCount++}catch{}return o.call(this,s,a,c)}}),Ut(i,"removeEventListener",function(o){return function(s,a,c){if(s==="click"||s=="keypress")try{let h=this,f=h.__sentry_instrumentation_handlers__||{},_=f[s];_&&(_.refCount--,_.refCount<=0&&(o.call(this,s,_.handler,c),_.handler=void 0,delete f[s]),Object.keys(f).length===0&&delete h.__sentry_instrumentation_handlers__)}catch{}return o.call(this,s,a,c)}}))})}function jp(t){if(t.type!==vr)return!1;try{if(!t.target||t.target._sentryId!==yr)return!1}catch{}return!0}function Fp(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function ms(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;let i=Vp(n);if(Fp(n.type,i))return;Ue(n,"_sentryCaptured",!0),i&&!i._sentryId&&Ue(i,"_sentryId",le());let o=n.type==="keypress"?"input":n.type;jp(n)||(t({event:n,name:o,global:e}),vr=n.type,yr=i?i._sentryId:void 0),clearTimeout(_s),_s=Ht.setTimeout(()=>{yr=void 0,vr=void 0},Mp)}}function Vp(t){try{return t.target}catch{return null}}var Vn;function Up(t){let e="history";We(e,t),Ge(e,$p)}function $p(){if(!zh())return;let t=Ht.onpopstate;Ht.onpopstate=function(...n){let i=Ht.location.href,o=Vn;if(Vn=i,ae("history",{from:o,to:i}),t)try{return t.apply(this,n)}catch{}};function e(n){return function(...i){let o=i.length>2?i[2]:void 0;if(o){let s=Vn,a=String(o);Vn=a,ae("history",{from:s,to:a})}return n.apply(this,i)}}Ut(Ht.history,"pushState",e),Ut(Ht.history,"replaceState",e)}var Yn={};function Hp(t){let e=Yn[t];if(e)return e;let n=Ht[t];if(ar(n))return Yn[t]=n.bind(Ht);let i=Ht.document;if(i&&typeof i.createElement=="function")try{let o=i.createElement("iframe");o.hidden=!0,i.head.appendChild(o);let s=o.contentWindow;s&&s[t]&&(n=s[t]),i.head.removeChild(o)}catch(o){Ap&&ut.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,o)}return n&&(Yn[t]=n.bind(Ht))}function vs(t){Yn[t]=void 0}var mn="__sentry_xhr_v3__";function zp(t){let e="xhr";We(e,t),Ge(e,Wp)}function Wp(){if(!Ht.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;Ut(t,"open",function(e){return function(...n){let i=Oe()*1e3,o=ve(n[0])?n[0].toUpperCase():void 0,s=Gp(n[1]);if(!o||!s)return e.apply(this,n);this[mn]={method:o,url:s,request_headers:{}},o==="POST"&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let a=()=>{let c=this[mn];if(c&&this.readyState===4){try{c.status_code=this.status}catch{}let h={endTimestamp:Oe()*1e3,startTimestamp:i,xhr:this};ae("xhr",h)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Ut(this,"onreadystatechange",function(c){return function(...h){return a(),c.apply(this,h)}}):this.addEventListener("readystatechange",a),Ut(this,"setRequestHeader",function(c){return function(...h){let[f,_]=h,d=this[mn];return d&&ve(f)&&ve(_)&&(d.request_headers[f.toLowerCase()]=_),c.apply(this,h)}}),e.apply(this,n)}}),Ut(t,"send",function(e){return function(...n){let i=this[mn];if(!i)return e.apply(this,n);n[0]!==void 0&&(i.body=n[0]);let o={startTimestamp:Oe()*1e3,xhr:this};return ae("xhr",o),e.apply(this,n)}})}function Gp(t){if(ve(t))return t;try{return t.toString()}catch{}}function qp(t,e=Hp("fetch")){let n=0,i=0;function o(s){let a=s.body.length;n+=a,i++;let c=(0,r.a)({body:s.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&i<15},t.fetchOptions);if(!e)return vs("fetch"),ti("No fetch implementation available");try{return e(t.url,c).then(h=>(n-=a,i--,{statusCode:h.status,headers:{"x-sentry-rate-limits":h.headers.get("X-Sentry-Rate-Limits"),"retry-after":h.headers.get("Retry-After")}}))}catch(h){return vs("fetch"),n-=a,i--,ti(h)}}return Zd(t,o)}var Zp=30,Yp=50;function br(t,e,n,i){let o={filename:t,function:e==="<anonymous>"?$e:e,in_app:!0};return n!==void 0&&(o.lineno=n),i!==void 0&&(o.colno=i),o}var Kp=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Jp=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Xp=/\((\S*)(?::(\d+))(?::(\d+))\)/,Qp=t=>{let e=Kp.exec(t);if(e){let[,i,o,s]=e;return br(i,$e,+o,+s)}let n=Jp.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){let s=Xp.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}let[i,o]=il(n[1]||$e,n[2]);return br(o,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},tf=[Zp,Qp],ef=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,nf=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,rf=t=>{let e=ef.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let o=nf.exec(e[3]);o&&(e[1]=e[1]||"eval",e[3]=o[1],e[4]=o[2],e[5]="")}let n=e[3],i=e[1]||$e;return[i,n]=il(i,n),br(n,i,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},of=[Yp,rf],sf=[tf,of],af=oh(...sf),il=(t,e)=>{let n=t.indexOf("safari-extension")!==-1,i=t.indexOf("safari-web-extension")!==-1;return n||i?[t.indexOf("@")!==-1?t.split("@")[0]:$e,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},Un=1024,lf="Breadcrumbs",cf=(t={})=>{let e=(0,r.a)({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:lf,setup(n){e.console&&ah(pf(n)),e.dom&&Lp(df(n,e.dom)),e.xhr&&zp(ff(n)),e.fetch&&dh(gf(n)),e.history&&Up(_f(n)),e.sentry&&n.on("beforeSendEvent",hf(n))}}},uf=cf;function hf(t){return function(e){Kt()===t&&ze({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:xe(e)},{event:e})}}function df(t,e){return function(n){if(Kt()!==t)return;let i,o,s=typeof e=="object"?e.serializeAttribute:void 0,a=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;a&&a>Un&&(Je&&ut.warn(`\`dom.maxStringLength\` cannot exceed ${Un}, but a value of ${a} was configured. Sentry will use ${Un} instead.`),a=Un),typeof s=="string"&&(s=[s]);try{let h=n.event,f=mf(h)?h.target:h;i=ja(f,{keyAttrs:s,maxStringLength:a}),o=Zu(f)}catch{i="<unknown>"}if(i.length===0)return;let c={category:`ui.${n.name}`,message:i};o&&(c.data={"ui.component_name":o}),ze(c,{event:n.event,name:n.name,global:n.global})}}function pf(t){return function(e){if(Kt()!==t)return;let n={category:"console",data:{arguments:e.args,logger:"console"},level:Ih(e.level),message:Uo(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)n.message=`Assertion failed: ${Uo(e.args.slice(1)," ")||"console.assert"}`,n.data.arguments=e.args.slice(1);else return;ze(n,{input:e.args,level:e.level})}}function ff(t){return function(e){if(Kt()!==t)return;let{startTimestamp:n,endTimestamp:i}=e,o=e.xhr[mn];if(!n||!i||!o)return;let{method:s,url:a,status_code:c,body:h}=o,f={method:s,url:a,status_code:c},_={xhr:e.xhr,input:h,startTimestamp:n,endTimestamp:i};ze({category:"xhr",data:f,type:"http"},_)}}function gf(t){return function(e){if(Kt()!==t)return;let{startTimestamp:n,endTimestamp:i}=e;if(i&&!(e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"))if(e.error){let o=e.fetchData,s={data:e.error,input:e.args,startTimestamp:n,endTimestamp:i};ze({category:"fetch",data:o,level:"error",type:"http"},s)}else{let o=e.response,s=(0,r.b)((0,r.a)({},e.fetchData),{status_code:o&&o.status}),a={input:e.args,response:o,startTimestamp:n,endTimestamp:i};ze({category:"fetch",data:s,type:"http"},a)}}}function _f(t){return function(e){if(Kt()!==t)return;let n=e.from,i=e.to,o=Ai(Vt.location.href),s=n?Ai(n):void 0,a=Ai(i);(!s||!s.path)&&(s=o),o.protocol===a.protocol&&o.host===a.host&&(i=a.relative),o.protocol===s.protocol&&o.host===s.host&&(n=s.relative),ze({category:"navigation",data:{from:n,to:i}})}}function mf(t){return!!t&&!!t.target}var vf=["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"],yf="BrowserApiErrors",bf=(t={})=>{let e=(0,r.a)({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t);return{name:yf,setupOnce(){e.setTimeout&&Ut(Vt,"setTimeout",ys),e.setInterval&&Ut(Vt,"setInterval",ys),e.requestAnimationFrame&&Ut(Vt,"requestAnimationFrame",Ef),e.XMLHttpRequest&&"XMLHttpRequest"in Vt&&Ut(XMLHttpRequest.prototype,"send",xf);let n=e.eventTarget;n&&(Array.isArray(n)?n:vf).forEach(Sf)}}},wf=bf;function ys(t){return function(...e){let n=e[0];return e[0]=rn(n,{mechanism:{data:{function:Ie(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function Ef(t){return function(e){return t.apply(this,[rn(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Ie(t)},handled:!1,type:"instrument"}})])}}function xf(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&Ut(n,i,function(o){let s={mechanism:{data:{function:i,handler:Ie(o)},handled:!1,type:"instrument"}},a=Xr(o);return a&&(s.mechanism.data.handler=Ie(a)),rn(o,s)})}),t.apply(this,e)}}function Sf(t){let e=Vt,n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Ut(n,"addEventListener",function(i){return function(o,s,a){try{typeof s.handleEvent=="function"&&(s.handleEvent=rn(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ie(s),target:t},handled:!1,type:"instrument"}}))}catch{}return i.apply(this,[o,rn(s,{mechanism:{data:{function:"addEventListener",handler:Ie(s),target:t},handled:!1,type:"instrument"}}),a])}}),Ut(n,"removeEventListener",function(i){return function(o,s,a){let c=s;try{let h=c&&c.__sentry_wrapped__;h&&i.call(this,o,h,a)}catch{}return i.call(this,o,c,a)}}))}var Cf="GlobalHandlers",Tf=(t={})=>{let e=(0,r.a)({onerror:!0,onunhandledrejection:!0},t);return{name:Cf,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(If(n),bs("onerror")),e.onunhandledrejection&&(Df(n),bs("onunhandledrejection"))}}},Of=Tf;function If(t){gh(e=>{let{stackParser:n,attachStacktrace:i}=rl();if(Kt()!==t||nl())return;let{msg:o,url:s,line:a,column:c,error:h}=e,f=kf(ro(n,h||o,void 0,i,!1),s,a,c);f.level="error",Ja(f,{originalException:h,mechanism:{handled:!1,type:"onerror"}})})}function Df(t){mh(e=>{let{stackParser:n,attachStacktrace:i}=rl();if(Kt()!==t||nl())return;let o=Rf(e),s=Zr(o)?Pf(o):ro(n,o,void 0,i,!0);s.level="error",Ja(s,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Rf(t){if(Zr(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 Pf(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function kf(t,e,n,i){let o=t.exception=t.exception||{},s=o.values=o.values||[],a=s[0]=s[0]||{},c=a.stacktrace=a.stacktrace||{},h=c.frames=c.frames||[],f=isNaN(parseInt(i,10))?void 0:i,_=isNaN(parseInt(n,10))?void 0:n,d=ve(e)&&e.length>0?e:qu();return h.length===0&&h.push({colno:f,filename:d,function:$e,in_app:!0,lineno:_}),t}function bs(t){Je&&ut.log(`Global Handler attached: ${t}`)}function rl(){let t=Kt();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var Nf=()=>({name:"HttpContext",preprocessEvent(t){if(!Vt.navigator&&!Vt.location&&!Vt.document)return;let e=t.request&&t.request.url||Vt.location&&Vt.location.href,{referrer:n}=Vt.document||{},{userAgent:i}=Vt.navigator||{},o=(0,r.a)((0,r.a)((0,r.a)({},t.request&&t.request.headers),n&&{Referer:n}),i&&{"User-Agent":i}),s=(0,r.b)((0,r.a)((0,r.a)({},t.request),e&&{url:e}),{headers:o});t.request=s}}),Af="cause",Mf=5,Lf="LinkedErrors",Bf=(t={})=>{let e=t.limit||Mf,n=t.key||Af;return{name:Lf,preprocessEvent(i,o,s){let a=s.getOptions();Hu(no,a.stackParser,a.maxValueLength,n,e,i,o)}}},jf=Bf;function Ff(t){return[ip(),Qd(),wf(),uf(),Of(),jf(),_p(),Nf()]}var Vf=class extends Error{cause;constructor(t,e){super(t),this.cause=e}},Uf=class ol{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new ol),this.INSTANCE}captureException(e,n,i){me.error(e),this.getNewScope(n,i).captureException(e)}captureMessage(e,n,i,o){this.getNewScope(i,o).captureMessage(e,n??"error")}captureError(e,n,i,o){me.error(e,n);let s=this.getNewScope(i,o),a=new Vf(e,n);s.captureException(a)}setGlobalContext(e,n){this.contexts[e]=(0,r.a)({context:n},this.contexts[e])}setUser(e){this.user=e}setTags(e){this.tags=e}getNewScope(e,n){let i=new ye;if(i.setClient(this.client),i.setUser(this.user),e?.triggerContext){let o=e.triggerContext;i.setExtras(o.triggerData.sentryContext()),delete e.triggerContext}return e&&i.setExtras(e),this.tags&&i.setTags(this.tags),n&&i.setTags(n),Object.keys(this.contexts).forEach(o=>{i.setContext(o,this.contexts[o])}),i.setTag("language",navigator.language),i.setTag("timezone",Wf()),i}init(){let e=Ff({}).filter(n=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(n.name));this.client=new Np({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:qp,stackParser:af,integrations:e,environment:wn.mode,release:`web-sdk@${Ft.SDK_VERSION}`,debug:wn.debug}),this.client.init()}},ws=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"},Es=(0,r.e)(uu());function sl(t){return Es.default.createInstance({name:"lc",storeName:t,driver:Es.default.LOCALSTORAGE})}var al=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}},dy=class extends al{static storeName="ses";static{this.storage=sl(this.storeName)}},xs=class extends al{static storeName="usr";static{this.storage=sl(this.storeName)}},$f=class{static format(t,e){let n=/{{\s*(\w+)\s*}}/;return e.replace(n,(i,o)=>{switch(o){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 i}})}static formatWithDelimiters(t,e=2,n=",",i="."){if(isNaN(t)||t==null)return"0";let o=(t/100).toFixed(e).split("."),s=o[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+n),a=o[1]?i+o[1]:"";return s+a}},Hf=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 Bu(t)}};function oo(t,e){if(t==0&&e)return"Free";let n=Hf.get(),i=Aa.get(),o=n.shopCurrencyCode||i.currency,s=n.currencyCode;s||me.warn("Currency code is not set in RuntimeData");let a=i.money?.format??n.moneyFormat,c;if(a&&o===s)c=$f.format(t*100,a);else{let h;try{h=new Intl.NumberFormat(zf(),{style:"currency",currency:s||o,minimumFractionDigits:0,maximumFractionDigits:2})}catch(f){return Uf.getInstance().captureException(f,{currentCurrency:s,shopCurrency:o}),""}c=h.format(t),c=c.replace("\u20B9","Rs. "),i.money?.showCurrency&&s!=="INR"&&(c=c.concat(` ${s}`))}return c}function zf(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}var $n;function Wf(){if($n)return $n;try{return $n=Intl.DateTimeFormat().resolvedOptions().timeZone,$n}catch{return""}}var mi=class wr{transform(e){return e==null?null:oo(e)}static \u0275fac=function(e){return new(e||wr)};static \u0275pipe=(0,r.qa)({name:"cooeeCurrency",type:wr,pure:!0})},Gf=(()=>{class t{static entityMap={'"':"""};static escapeHtml(n){return String(n).replace(/"/g,i=>t.entityMap[i])}}return t})(),qf=Object.prototype.toString,ln=Array.isArray||function(t){return qf.call(t)==="[object Array]"};function so(t){return typeof t=="function"}function Zf(t){return ln(t)?"array":typeof t}function Li(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Ss(t,e){return t!=null&&typeof t=="object"&&e in t}function Yf(t,e){return t!=null&&typeof t!="object"&&t.hasOwnProperty&&t.hasOwnProperty(e)}var Kf=RegExp.prototype.test;function Jf(t,e){return Kf.call(t,e)}var Xf=/\S/;function Qf(t){return!Jf(Xf,t)}var tg={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function eg(t){return String(t).replace(/[&<>"'`=\/]/g,function(e){return tg[e]})}var ng=/\s*/,ig=/\s+/,Cs=/\s*=/,rg=/\s*\}/,og=/#|\^|\/|>|\{|&|=|!/;function sg(t,e){if(!t)return[];var n=!1,i=[],o=[],s=[],a=!1,c=!1,h="",f=0;function _(){if(a&&!c)for(;s.length;)delete o[s.pop()];else s=[];a=!1,c=!1}var d,E,I;function S(j){if(typeof j=="string"&&(j=j.split(ig,2)),!ln(j)||j.length!==2)throw new Error("Invalid tags: "+j);d=new RegExp(Li(j[0])+"\\s*"),E=new RegExp("\\s*"+Li(j[1])),I=new RegExp("\\s*"+Li("}"+j[1]))}S(e||ne.tags);for(var D=new Rn(t),M,L,z,X,H,Q;!D.eos();){if(M=D.pos,z=D.scanUntil(d),z)for(var mt=0,vt=z.length;mt<vt;++mt)X=z.charAt(mt),Qf(X)?(s.push(o.length),h+=X):(c=!0,n=!0,h+=" "),o.push(["text",X,M,M+1]),M+=1,X===`
|
|
27
|
+
`&&(_(),h="",f=0,n=!1);if(!D.scan(d))break;if(a=!0,L=D.scan(og)||"name",D.scan(ng),L==="="?(z=D.scanUntil(Cs),D.scan(Cs),D.scanUntil(E)):L==="{"?(z=D.scanUntil(I),D.scan(rg),D.scanUntil(E),L="&"):z=D.scanUntil(E),!D.scan(E))throw new Error("Unclosed tag at "+D.pos);if(L==">"?H=[L,z,M,D.pos,h,f,n]:H=[L,z,M,D.pos],f++,o.push(H),L==="#"||L==="^")i.push(H);else if(L==="/"){if(Q=i.pop(),!Q)throw new Error('Unopened section "'+z+'" at '+M);if(Q[1]!==z)throw new Error('Unclosed section "'+Q[1]+'" at '+M)}else L==="name"||L==="{"||L==="&"?c=!0:L==="="&&S(z)}if(_(),Q=i.pop(),Q)throw new Error('Unclosed section "'+Q[1]+'" at '+D.pos);return lg(ag(o))}function ag(t){for(var e=[],n,i,o=0,s=t.length;o<s;++o)n=t[o],n&&(n[0]==="text"&&i&&i[0]==="text"?(i[1]+=n[1],i[3]=n[3]):(e.push(n),i=n));return e}function lg(t){for(var e=[],n=e,i=[],o,s,a=0,c=t.length;a<c;++a)switch(o=t[a],o[0]){case"#":case"^":n.push(o),i.push(o),n=o[4]=[];break;case"/":s=i.pop(),s[5]=o[2],n=i.length>0?i[i.length-1][4]:e;break;default:n.push(o)}return e}function Rn(t){this.string=t,this.tail=t,this.pos=0}Rn.prototype.eos=function(){return this.tail===""};Rn.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};Rn.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 on(t,e){this.view=t,this.cache={".":this.view},this.parent=e}on.prototype.push=function(t){return new on(t,this)};on.prototype.lookup=function(t){var e=this.cache,n;if(e.hasOwnProperty(t))n=e[t];else{for(var i=this,o,s,a,c=!1;i;){if(t.indexOf(".")>0)for(o=i.view,s=t.split("."),a=0;o!=null&&a<s.length;)a===s.length-1&&(c=Ss(o,s[a])||Yf(o,s[a])),o=o[s[a++]];else o=i.view[t],c=Ss(i.view,t);if(c){n=o;break}i=i.parent}e[t]=n}return so(n)&&(n=n.call(this.view)),n};function Wt(){this.templateCache={_cache:{},set:function(t,e){this._cache[t]=e},get:function(t){return this._cache[t]},clear:function(){this._cache={}}}}Wt.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()};Wt.prototype.parse=function(t,e){var n=this.templateCache,i=t+":"+(e||ne.tags).join(":"),o=typeof n<"u",s=o?n.get(i):void 0;return s==null&&(s=sg(t,e),o&&n.set(i,s)),s};Wt.prototype.render=function(t,e,n,i){var o=this.getConfigTags(i),s=this.parse(t,o),a=e instanceof on?e:new on(e,void 0);return this.renderTokens(s,a,n,t,i)};Wt.prototype.renderTokens=function(t,e,n,i,o){for(var s="",a,c,h,f=0,_=t.length;f<_;++f)h=void 0,a=t[f],c=a[0],c==="#"?h=this.renderSection(a,e,n,i,o):c==="^"?h=this.renderInverted(a,e,n,i,o):c===">"?h=this.renderPartial(a,e,n,o):c==="&"?h=this.unescapedValue(a,e):c==="name"?h=this.escapedValue(a,e,o):c==="text"&&(h=this.rawValue(a)),h!==void 0&&(s+=h);return s};Wt.prototype.renderSection=function(t,e,n,i,o){var s=this,a="",c=e.lookup(t[1]);function h(d){return s.render(d,e,n,o)}if(c){if(ln(c))for(var f=0,_=c.length;f<_;++f)a+=this.renderTokens(t[4],e.push(c[f]),n,i,o);else if(typeof c=="object"||typeof c=="string"||typeof c=="number")a+=this.renderTokens(t[4],e.push(c),n,i,o);else if(so(c)){if(typeof i!="string")throw new Error("Cannot use higher-order sections without the original template");c=c.call(e.view,i.slice(t[3],t[5]),h),c!=null&&(a+=c)}else a+=this.renderTokens(t[4],e,n,i,o);return a}};Wt.prototype.renderInverted=function(t,e,n,i,o){var s=e.lookup(t[1]);if(!s||ln(s)&&s.length===0)return this.renderTokens(t[4],e,n,i,o)};Wt.prototype.indentPartial=function(t,e,n){for(var i=e.replace(/[^ \t]/g,""),o=t.split(`
|
|
28
28
|
`),s=0;s<o.length;s++)o[s].length&&(s>0||!n)&&(o[s]=i+o[s]);return o.join(`
|
|
29
|
-
`)};Wt.prototype.renderPartial=function(t,e,n,i){if(n){var o=this.getConfigTags(i),s=so(n)?n(t[1]):n[t[1]];if(s!=null){var a=t[6],c=t[5],h=t[4],f=s;c==0&&h&&(f=this.indentPartial(s,h,a));var _=this.parse(f,o);return this.renderTokens(_,e,n,f,i)}}};Wt.prototype.unescapedValue=function(t,e){var n=e.lookup(t[1]);if(n!=null)return n};Wt.prototype.escapedValue=function(t,e,n){var i=this.getConfigEscape(n)||ne.escape,o=e.lookup(t[1]);if(o!=null)return typeof o=="number"&&i===ne.escape?String(o):i(o)};Wt.prototype.rawValue=function(t){return t[1]};Wt.prototype.getConfigTags=function(t){return
|
|
29
|
+
`)};Wt.prototype.renderPartial=function(t,e,n,i){if(n){var o=this.getConfigTags(i),s=so(n)?n(t[1]):n[t[1]];if(s!=null){var a=t[6],c=t[5],h=t[4],f=s;c==0&&h&&(f=this.indentPartial(s,h,a));var _=this.parse(f,o);return this.renderTokens(_,e,n,f,i)}}};Wt.prototype.unescapedValue=function(t,e){var n=e.lookup(t[1]);if(n!=null)return n};Wt.prototype.escapedValue=function(t,e,n){var i=this.getConfigEscape(n)||ne.escape,o=e.lookup(t[1]);if(o!=null)return typeof o=="number"&&i===ne.escape?String(o):i(o)};Wt.prototype.rawValue=function(t){return t[1]};Wt.prototype.getConfigTags=function(t){return ln(t)?t:t&&typeof t=="object"?t.tags:void 0};Wt.prototype.getConfigEscape=function(t){if(t&&typeof t=="object"&&!ln(t))return t.escape};var ne={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){xn.templateCache=t},get templateCache(){return xn.templateCache}},xn=new Wt;ne.clearCache=function(){return xn.clearCache()};ne.parse=function(t,e){return xn.parse(t,e)};ne.render=function(t,e,n,i){if(typeof t!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+Zf(t)+'" was given as the first argument for mustache#render(template, view, partials)');return xn.render(t,e,n,i)};ne.escape=eg;ne.Scanner=Rn;ne.Context=on;ne.Writer=Wt;var ll=ne;ll.escape=Gf.escapeHtml;var cg=class Er{transform(e,n){return e?ll.render(e,(0,r.a)({},n)):null}static \u0275fac=function(e){return new(e||Er)};static \u0275pipe=(0,r.qa)({name:"cooeeDynamicVariables",type:Er,pure:!0})},ao={};(function t(e,n,i,o){var s=!!(e.Worker&&e.Blob&&e.Promise&&e.OffscreenCanvas&&e.OffscreenCanvasRenderingContext2D&&e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype.transferControlToOffscreen&&e.URL&&e.URL.createObjectURL),a=typeof Path2D=="function"&&typeof DOMMatrix=="function",c=function(){if(!e.OffscreenCanvas)return!1;var v=new OffscreenCanvas(1,1),m=v.getContext("2d");m.fillRect(0,0,1,1);var k=v.transferToImageBitmap();try{m.createPattern(k,"no-repeat")}catch{return!1}return!0}();function h(){}function f(v){var m=n.exports.Promise,k=m!==void 0?m:e.Promise;return typeof k=="function"?new k(v):(v(h,h),null)}var _=function(v,m){return{transform:function(k){if(v)return k;if(m.has(k))return m.get(k);var F=new OffscreenCanvas(k.width,k.height),W=F.getContext("2d");return W.drawImage(k,0,0),m.set(k,F),F},clear:function(){m.clear()}}}(c,new Map),d=function(){var v=Math.floor(16.666666666666668),m,k,F={},W=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(m=function(K){var Y=Math.random();return F[Y]=requestAnimationFrame(function G(it){W===it||W+v-1<it?(W=it,delete F[Y],K()):F[Y]=requestAnimationFrame(G)}),Y},k=function(K){F[K]&&cancelAnimationFrame(F[K])}):(m=function(K){return setTimeout(K,v)},k=function(K){return clearTimeout(K)}),{frame:m,cancel:k}}(),E=function(){var v,m,k={};function F(W){function K(Y,G){W.postMessage({options:Y||{},callback:G})}W.init=function(Y){var G=Y.transferControlToOffscreen();W.postMessage({canvas:G},[G])},W.fire=function(Y,G,it){if(m)return K(Y,null),m;var at=Math.random().toString(36).slice(2);return m=f(function(ht){function q(tt){tt.data.callback===at&&(delete k[at],W.removeEventListener("message",q),m=null,_.clear(),it(),ht())}W.addEventListener("message",q),K(Y,at),k[at]=q.bind(null,{data:{callback:at}})}),m},W.reset=function(){W.postMessage({reset:!0});for(var Y in k)k[Y](),delete k[Y]}}return function(){if(v)return v;if(!i&&s){var W=["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(`
|
|
30
30
|
`);try{v=new Worker(URL.createObjectURL(new Blob([W])))}catch(K){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",K),null}F(v)}return v}}(),I={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 S(v,m){return m?m(v):v}function D(v){return v!=null}function M(v,m,k){return S(v&&D(v[m])?v[m]:I[m],k)}function L(v){return v<0?0:Math.floor(v)}function z(v,m){return Math.floor(Math.random()*(m-v))+v}function X(v){return parseInt(v,16)}function H(v){return v.map(Q)}function Q(v){var m=String(v).replace(/[^0-9a-f]/gi,"");return m.length<6&&(m=m[0]+m[0]+m[1]+m[1]+m[2]+m[2]),{r:X(m.substring(0,2)),g:X(m.substring(2,4)),b:X(m.substring(4,6))}}function mt(v){var m=M(v,"origin",Object);return m.x=M(m,"x",Number),m.y=M(m,"y",Number),m}function vt(v){v.width=document.documentElement.clientWidth,v.height=document.documentElement.clientHeight}function j(v){var m=v.getBoundingClientRect();v.width=m.width,v.height=m.height}function ct(v){var m=document.createElement("canvas");return m.style.position="fixed",m.style.top="0px",m.style.left="0px",m.style.pointerEvents="none",m.style.zIndex=v,m}function ot(v,m,k,F,W,K,Y,G,it){v.save(),v.translate(m,k),v.rotate(K),v.scale(F,W),v.arc(0,0,1,Y,G,it),v.restore()}function st(v){var m=v.angle*(Math.PI/180),k=v.spread*(Math.PI/180);return{x:v.x,y:v.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:v.startVelocity*.5+Math.random()*v.startVelocity,angle2D:-m+(.5*k-Math.random()*k),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:v.color,shape:v.shape,tick:0,totalTicks:v.ticks,decay:v.decay,drift:v.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:v.gravity*3,ovalScalar:.6,scalar:v.scalar,flat:v.flat}}function ft(v,m){m.x+=Math.cos(m.angle2D)*m.velocity+m.drift,m.y+=Math.sin(m.angle2D)*m.velocity+m.gravity,m.velocity*=m.decay,m.flat?(m.wobble=0,m.wobbleX=m.x+10*m.scalar,m.wobbleY=m.y+10*m.scalar,m.tiltSin=0,m.tiltCos=0,m.random=1):(m.wobble+=m.wobbleSpeed,m.wobbleX=m.x+10*m.scalar*Math.cos(m.wobble),m.wobbleY=m.y+10*m.scalar*Math.sin(m.wobble),m.tiltAngle+=.1,m.tiltSin=Math.sin(m.tiltAngle),m.tiltCos=Math.cos(m.tiltAngle),m.random=Math.random()+2);var k=m.tick++/m.totalTicks,F=m.x+m.random*m.tiltCos,W=m.y+m.random*m.tiltSin,K=m.wobbleX+m.random*m.tiltCos,Y=m.wobbleY+m.random*m.tiltSin;if(v.fillStyle="rgba("+m.color.r+", "+m.color.g+", "+m.color.b+", "+(1-k)+")",v.beginPath(),a&&m.shape.type==="path"&&typeof m.shape.path=="string"&&Array.isArray(m.shape.matrix))v.fill(gt(m.shape.path,m.shape.matrix,m.x,m.y,Math.abs(K-F)*.1,Math.abs(Y-W)*.1,Math.PI/10*m.wobble));else if(m.shape.type==="bitmap"){var G=Math.PI/10*m.wobble,it=Math.abs(K-F)*.1,at=Math.abs(Y-W)*.1,ht=m.shape.bitmap.width*m.scalar,q=m.shape.bitmap.height*m.scalar,tt=new DOMMatrix([Math.cos(G)*it,Math.sin(G)*it,-Math.sin(G)*at,Math.cos(G)*at,m.x,m.y]);tt.multiplySelf(new DOMMatrix(m.shape.matrix));var lt=v.createPattern(_.transform(m.shape.bitmap),"no-repeat");lt.setTransform(tt),v.globalAlpha=1-k,v.fillStyle=lt,v.fillRect(m.x-ht/2,m.y-q/2,ht,q),v.globalAlpha=1}else if(m.shape==="circle")v.ellipse?v.ellipse(m.x,m.y,Math.abs(K-F)*m.ovalScalar,Math.abs(Y-W)*m.ovalScalar,Math.PI/10*m.wobble,0,2*Math.PI):ot(v,m.x,m.y,Math.abs(K-F)*m.ovalScalar,Math.abs(Y-W)*m.ovalScalar,Math.PI/10*m.wobble,0,2*Math.PI);else if(m.shape==="star")for(var rt=Math.PI/2*3,l=4*m.scalar,u=8*m.scalar,p=m.x,w=m.y,P=5,A=Math.PI/P;P--;)p=m.x+Math.cos(rt)*u,w=m.y+Math.sin(rt)*u,v.lineTo(p,w),rt+=A,p=m.x+Math.cos(rt)*l,w=m.y+Math.sin(rt)*l,v.lineTo(p,w),rt+=A;else v.moveTo(Math.floor(m.x),Math.floor(m.y)),v.lineTo(Math.floor(m.wobbleX),Math.floor(W)),v.lineTo(Math.floor(K),Math.floor(Y)),v.lineTo(Math.floor(F),Math.floor(m.wobbleY));return v.closePath(),v.fill(),m.tick<m.totalTicks}function Ot(v,m,k,F,W){var K=m.slice(),Y=v.getContext("2d"),G,it,at=f(function(ht){function q(){G=it=null,Y.clearRect(0,0,F.width,F.height),_.clear(),W(),ht()}function tt(){i&&!(F.width===o.width&&F.height===o.height)&&(F.width=v.width=o.width,F.height=v.height=o.height),!F.width&&!F.height&&(k(v),F.width=v.width,F.height=v.height),Y.clearRect(0,0,F.width,F.height),K=K.filter(function(lt){return ft(Y,lt)}),K.length?G=d.frame(tt):q()}G=d.frame(tt),it=q});return{addFettis:function(ht){return K=K.concat(ht),at},canvas:v,promise:at,reset:function(){G&&d.cancel(G),it&&it()}}}function xt(v,m){var k=!v,F=!!M(m||{},"resize"),W=!1,K=M(m,"disableForReducedMotion",Boolean),Y=s&&!!M(m||{},"useWorker"),G=Y?E():null,it=k?vt:j,at=v&&G?!!v.__confetti_initialized:!1,ht=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,q;function tt(rt,l,u){for(var p=M(rt,"particleCount",L),w=M(rt,"angle",Number),P=M(rt,"spread",Number),A=M(rt,"startVelocity",Number),Z=M(rt,"decay",Number),J=M(rt,"gravity",Number),yt=M(rt,"drift",Number),dt=M(rt,"colors",H),bt=M(rt,"ticks",Number),_t=M(rt,"shapes"),jt=M(rt,"scalar"),ge=!!M(rt,"flat"),At=mt(rt),ie=p,ue=[],we=v.width*At.x,Zt=v.height*At.y;ie--;)ue.push(st({x:we,y:Zt,angle:w,spread:P,startVelocity:A,color:dt[ie%dt.length],shape:_t[z(0,_t.length)],ticks:bt,decay:Z,gravity:J,drift:yt,scalar:jt,flat:ge}));return q?q.addFettis(ue):(q=Ot(v,ue,it,l,u),q.promise)}function lt(rt){var l=K||M(rt,"disableForReducedMotion",Boolean),u=M(rt,"zIndex",Number);if(l&&ht)return f(function(A){A()});k&&q?v=q.canvas:k&&!v&&(v=ct(u),document.body.appendChild(v)),F&&!at&&it(v);var p={width:v.width,height:v.height};G&&!at&&G.init(v),at=!0,G&&(v.__confetti_initialized=!0);function w(){if(G){var A={getBoundingClientRect:function(){if(!k)return v.getBoundingClientRect()}};it(A),G.postMessage({resize:{width:A.width,height:A.height}});return}p.width=p.height=null}function P(){q=null,F&&(W=!1,e.removeEventListener("resize",w)),k&&v&&(document.body.contains(v)&&document.body.removeChild(v),v=null,at=!1)}return F&&!W&&(W=!0,e.addEventListener("resize",w,!1)),G?G.fire(rt,p,P):tt(rt,p,P)}return lt.reset=function(){G&&G.reset(),q&&q.reset()},lt}var It;function Pt(){return It||(It=xt(null,{useWorker:!0,resize:!0})),It}function gt(v,m,k,F,W,K,Y){var G=new Path2D(v),it=new Path2D;it.addPath(G,new DOMMatrix(m));var at=new Path2D;return at.addPath(it,new DOMMatrix([Math.cos(Y)*W,Math.sin(Y)*W,-Math.sin(Y)*K,Math.cos(Y)*K,k,F])),at}function R(v){if(!a)throw new Error("path confetti are not supported in this browser");var m,k;typeof v=="string"?m=v:(m=v.path,k=v.matrix);var F=new Path2D(m),W=document.createElement("canvas"),K=W.getContext("2d");if(!k){for(var Y=1e3,G=Y,it=Y,at=0,ht=0,q,tt,lt=0;lt<Y;lt+=2)for(var rt=0;rt<Y;rt+=2)K.isPointInPath(F,lt,rt,"nonzero")&&(G=Math.min(G,lt),it=Math.min(it,rt),at=Math.max(at,lt),ht=Math.max(ht,rt));q=at-G,tt=ht-it;var l=10,u=Math.min(l/q,l/tt);k=[u,0,0,u,-Math.round(q/2+G)*u,-Math.round(tt/2+it)*u]}return{type:"path",path:m,matrix:k}}function O(v){var m,k=1,F="#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 v=="string"?m=v:(m=v.text,k="scalar"in v?v.scalar:k,W="fontFamily"in v?v.fontFamily:W,F="color"in v?v.color:F);var K=10*k,Y=""+K+"px "+W,G=new OffscreenCanvas(K,K),it=G.getContext("2d");it.font=Y;var at=it.measureText(m),ht=Math.ceil(at.actualBoundingBoxRight+at.actualBoundingBoxLeft),q=Math.ceil(at.actualBoundingBoxAscent+at.actualBoundingBoxDescent),tt=2,lt=at.actualBoundingBoxLeft+tt,rt=at.actualBoundingBoxAscent+tt;ht+=tt+tt,q+=tt+tt,G=new OffscreenCanvas(ht,q),it=G.getContext("2d"),it.font=Y,it.fillStyle=F,it.fillText(m,lt,rt);var l=1/k;return{type:"bitmap",bitmap:G.transferToImageBitmap(),matrix:[l,0,0,l,-ht*l/2,-q*l/2]}}n.exports=function(){return Pt().apply(this,arguments)},n.exports.reset=function(){Pt().reset()},n.exports.create=xt,n.exports.shapeFromPath=R,n.exports.shapeFromText=O})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),ao,!1);var ug=ao.exports,py=ao.exports.create,hg=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,i=()=>{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(i),t--)};i(),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 ug(t)}static async realisticFire(t,e){let n={origin:{y:.7}};await this.fire(Object.assign({},n,e,{particleCount:Math.floor(200*t)}))}},dg=(t,e)=>e.minValue;function pg(t,e){if(t&1&&((0,r.Ga)(0,"div",7),(0,r._a)(1,"safeHtml")),t&2){let n=(0,r.Ka)().$implicit;(0,r.va)("innerHTML",(0,r.$a)(1,1,n.minValue+" Products"),r.da)}}function fg(t,e){if(t&1&&((0,r.Ga)(0,"div",7),(0,r._a)(1,"cooeeCurrency"),(0,r._a)(2,"safeHtml")),t&2){let n=(0,r.Ka)().$implicit;(0,r.va)("innerHTML",(0,r.$a)(2,3,(0,r.$a)(1,1,n.minValue)),r.da)}}function gg(t,e){if(t&1&&((0,r.Ea)(0,"li",6)(1,"div"),(0,r.sa)(2,pg,2,3,"div",7)(3,fg,3,5,"div",7),(0,r.Ga)(4,"img",8),(0,r.Ea)(5,"div",9),(0,r.Qa)(6),(0,r.Fa)()()()),t&2){let n=e.$implicit,i=(0,r.Ka)(2);(0,r.wa)("left",n.calculatedAlignment+"%"),(0,r.fa)(2),(0,r.Aa)((i.progressBarConfig==null?null:i.progressBarConfig.rewardBasis)===i.RewardBasis.ITEM_COUNT?2:3),(0,r.fa)(2),(0,r.va)("src",i.getIconURL(n),r.ea),(0,r.fa)(2),(0,r.Ra)(n.label)}}function _g(t,e){if(t&1&&((0,r.Ta)(0)(1),(0,r.Ga)(2,"div",0),(0,r._a)(3,"cooeeDynamicVariables"),(0,r._a)(4,"safeHtml"),(0,r.Ea)(5,"div",1)(6,"ul",2)(7,"div",3),(0,r.Ga)(8,"div",4),(0,r.Fa)(),(0,r.Ca)(9,gg,7,5,"li",5,dg),(0,r.Fa)()()),t&2){let n=(0,r.Ka)(),i=n.calculatedState(),o=i.nextMilestone?i.nextMilestone.reachingText:i.lastMilestone.reachedText;(0,r.fa)(2),(0,r.va)("innerHTML",(0,r.$a)(4,6,(0,r.ab)(3,3,o,n.localDynamicVariables())),r.da),(0,r.fa)(6),(0,r.wa)("width",i.cartValuePercentage+"%"),(0,r.fa)(),(0,r.Da)(i.milestones)}}var mg=class xr extends hi{cart;localDynamicVariables=(0,r.Y)({});calculatedState=(0,r.Y)({});progressBarConfig;RewardBasis=Na;constructor(){super()}engagementTriggerReceived(e){this.progressBarConfig=e.progressBarConfig}ngOnInit(){super.ngOnInit(),this.calculateMilestonesSilently()}update(){this.calculateMilestonesSilently()}getIconURL(e){return e.rewardType===qn.FREE_SHIPPING?"https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png":e.rewardType===qn.DISCOUNT?"https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png":e.rewardType===qn.FREE_AUTO_GIFT?"https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png":""}calculateMilestonesSilently(){this.calculateMilestones().catch(e=>me.error(e))}async calculateMilestones(){let e=this.engagementTrigger,n=this.progressBarConfig;if(!n?.milestones?.length){me.warn("Milestones not available in progress bar config",e);return}let i=await this.cart.getNormalisedCart(),o=n.milestones.at(-1),s=n?.reachedAmountOrCount??i.originalAmount,a=n.totalProgress??0;me.debug("Cart value:",s,`, percentage: ${a}%`),this.celebrate(e,s);let c={milestonesReady:!0,cartValuePercentage:a,milestones:n.milestones},h=n.milestones.find(f=>!f.reached);if(h){let f=oo(h.minValue-s);if(n.rewardBasis==="ITEM_COUNT"){let _=h.minValue-s;f=`${_} ${_===1?"product":"products"}`}this.localDynamicVariables.set({amount_left:f}),c.nextMilestone=h,this.calculatedState.set(c);return}c.lastMilestone=o,this.calculatedState.set(c)}celebrate(e,n){let i=[...e.progressBarConfig.milestones].reverse().find(s=>s.minValue<n);if(!i)return;let o=`lc/en/${e.shortID}/${i.minValue}`;sessionStorage.getItem(o)||(sessionStorage.setItem(o,"1"),this.progressBarConfig?.noConfetti||hg.realistic())}static \u0275fac=function(e){return new(e||xr)};static \u0275cmp=(0,r.na)({type:xr,selectors:[["cooee-progressbar"]],inputs:{cart:"cart"},features:[r.ra],decls:1,vars:1,consts:[[1,"heading",3,"innerHTML"],[1,"milestone-container"],[1,"milestone-list"],[1,"untracked-path"],[1,"tracked-path"],[1,"milestone-list-item",3,"left"],[1,"milestone-list-item"],[1,"milestone-value",3,"innerHTML"],["width","20","height","20","alt","milestone icon",1,"milestone-icon",3,"src"],[1,"milestone-label"]],template:function(e,n){e&1&&(0,r.sa)(0,_g,11,8),e&2&&(0,r.Aa)(n.calculatedState().milestonesReady?0:-1)},dependencies:[cg,r.ub,mi],styles:[`:host{display:block;padding:10px;background:linear-gradient(0deg,rgba(var(--lc-color-primary),.1) 0%,transparent 100%)}.milestone-container{width:95%;margin:8px 0}.heading{font-weight:500;text-align:center;font-size:12px}.milestone-list{display:flex;align-items:center;position:relative;font-size:10px;font-weight:500}.untracked-path{width:100%;background-color:#e5e7eb;height:4px;position:absolute}.tracked-path{background-color:rgb(var(--lc-color-primary));height:100%;display:block;transition:width .5s ease-in-out}.milestone-list{padding:0;margin:0}.milestone-list-item{position:relative;display:flex;flex-direction:column;align-items:center;height:75px}.milestone-list-item>div{display:flex;flex-direction:column;align-items:center;justify-content:space-between;position:absolute;height:100%;width:100px}.milestone-icon{padding:5px;border-radius:1000px;background-color:rgb(var(--lc-color-primary))}
|
|
31
31
|
`],encapsulation:3})},vg=(0,r.e)(Da()),yg=(t,e)=>({enter:t,exit:e});function bg(t,e){if(t&1&&((0,r.Ea)(0,"div",7),(0,r.Qa)(1),(0,r.Fa)(),(0,r.Ea)(2,"div",8),(0,r.Qa)(3),(0,r.Fa)()),t&2){let n=(0,r.Ka)(2);(0,r.fa)(),(0,r.Sa)(" ",n.getCurrency(n.selectedVariant().price.cmp)," "),(0,r.fa)(2),(0,r.Sa)(" ",n.getDiscountPercentage(n.selectedVariant().price),"% off ")}}function wg(t,e){if(t&1&&((0,r.Ea)(0,"div",6),(0,r.Qa)(1),(0,r.Fa)()),t&2){let n=(0,r.Ka)(2);(0,r.fa)(),(0,r.Sa)(" ",n.stickyATCConfig.leftText," ")}}function Eg(t,e){if(t&1&&((0,r.Ea)(0,"div",1)(1,"div",5),(0,r.Qa)(2),(0,r.Fa)(),(0,r.sa)(3,bg,4,2)(4,wg,2,1,"div",6),(0,r.Fa)()),t&2){let n=(0,r.Ka)();(0,r.fa)(2),(0,r.Sa)(" ",n.getCurrency(n.selectedVariant().price.d)," "),(0,r.fa)(),(0,r.Aa)(n.selectedVariant().price.cmp?3:-1),(0,r.fa)(),(0,r.Aa)(n.stickyATCConfig.leftText?4:-1)}}function xg(t,e){if(t&1&&((0,r.Ea)(0,"div",9),(0,r.Qa)(1),(0,r.Fa)()),t&2){let n=e.$implicit,i=e.$index;(0,r.Ka)(2);let o=(0,r.Va)(5);(0,r.va)("ngClass",(0,r.Ya)(2,yg,i===o.currentIndex,i===o.previousIndex)),(0,r.fa)(),(0,r.Sa)(" ",n," ")}}function Sg(t,e){if(t&1&&((0,r.Ea)(0,"div",4),(0,r.Ca)(1,xg,2,5,"div",9,r.Ba),(0,r.Fa)()),t&2){(0,r.Ka)();let n=(0,r.Va)(5);(0,r.fa)(),(0,r.Da)(n.features)}}var Cg=class Sr extends hi{currentItem;stickyATCConfig;selectedVariant=(0,r.Y)(void 0);featureSlider=(0,r.Y)({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 oo(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(`
|
|
32
|
-
`),n=e.length===1?null:setInterval(()=>{this.featureSlider.update(i=>(0,r.b)((0,r.a)({},i),{previousIndex:i.currentIndex,currentIndex:(i.currentIndex+1)%i.features.length}))},3e3);this.featureSlider.set({intervalRef:n,currentIndex:0,features:e})}replaceVariables(e){return e?(0,vg.render)(e,this.currentItem.getTemplateVariables()):""}static \u0275fac=function(e){return new(e||Sr)};static \u0275cmp=(0,r.na)({type:Sr,selectors:[["cooee-sticky-atc"]],features:[r.ra],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 i=(0,r.Ia)();(0,r.Ea)(0,"div",0),(0,r.sa)(1,Eg,5,3,"div",1),(0,r.Ea)(2,"div",2)(3,"button",3),(0,r.Ja)("click",function(){return(0,r.N)(i),(0,r.O)(n.addToCart())}),(0,r.Qa)(4,"Add To Cart"),(0,r.Fa)(),(0,r.Ta)(5),(0,r.sa)(6,Sg,3,0,"div",4),(0,r.Fa)()()}if(e&2){(0,r.fa)(),(0,r.Aa)(n.selectedVariant()&&n.stickyATCConfig.showProductInfo?1:-1),(0,r.fa)(4);let i=(0,r.Ua)(n.featureSlider());(0,r.fa)(),(0,r.Aa)(i.features.length?6:-1)}},dependencies:[r.nb],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}"]})},cl,Dt,ul,hl,Me,Ts,dl,Cr,pl,lo,Tr,Or,Tg,Ir={},fl=[],Og=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,co=Array.isArray;function Te(t,e){for(var n in e)t[n]=e[n];return t}function uo(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Bi(t,e,n,i,o){var s={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++ul,__i:-1,__u:0};return o==null&&Dt.vnode!=null&&Dt.vnode(s),s}function ho(t){return t.children}function yn(t,e){this.props=t,this.context=e}function an(t,e){if(e==null)return t.__?an(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?an(t):null}function gl(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return gl(t)}}function Os(t){(!t.__d&&(t.__d=!0)&&Me.push(t)&&!ii.__r++||Ts!==Dt.debounceRendering)&&((Ts=Dt.debounceRendering)||dl)(ii)}function ii(){var t,e,n,i,o,s,a,c;for(Me.sort(Cr);t=Me.shift();)t.__d&&(e=Me.length,i=void 0,s=(o=(n=t).__v).__e,a=[],c=[],n.__P&&((i=Te({},o)).__v=o.__v+1,Dt.vnode&&Dt.vnode(i),vl(n.__P,i,o,n.__n,n.__P.namespaceURI,32&o.__u?[s]:null,a,s??an(o),!!(32&o.__u),c),i.__v=o.__v,i.__.__k[i.__i]=i,Rg(a,i,c),i.__e!=s&&gl(i)),Me.length>e&&Me.sort(Cr));ii.__r=0}function _l(t,e,n,i,o,s,a,c,h,f,_){var d,E,I,S,D,M,L=i&&i.__k||fl,z=e.length;for(h=Ig(n,e,L,h,z),d=0;d<z;d++)(I=n.__k[d])!=null&&(E=I.__i===-1?Ir:L[I.__i]||Ir,I.__i=d,M=vl(t,I,E,o,s,a,c,h,f,_),S=I.__e,I.ref&&E.ref!=I.ref&&(E.ref&&po(E.ref,null,I),_.push(I.ref,I.__c||S,I)),D==null&&S!=null&&(D=S),4&I.__u||E.__k===I.__k?h=ml(I,h,t):typeof I.type=="function"&&M!==void 0?h=M:S&&(h=S.nextSibling),I.__u&=-7);return n.__e=D,h}function Ig(t,e,n,i,o){var s,a,c,h,f,_=n.length,d=_,E=0;for(t.__k=new Array(o),s=0;s<o;s++)(a=e[s])!=null&&typeof a!="boolean"&&typeof a!="function"?(h=s+E,(a=t.__k[s]=typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?Bi(null,a,null,null,null):co(a)?Bi(ho,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?Bi(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=t,a.__b=t.__b+1,c=null,(f=a.__i=Dg(a,n,h,d))!==-1&&(d--,(c=n[f])&&(c.__u|=2)),c==null||c.__v===null?(f==-1&&E--,typeof a.type!="function"&&(a.__u|=4)):f!=h&&(f==h-1?E--:f==h+1?E++:(f>h?E--:E++,a.__u|=4))):t.__k[s]=null;if(d)for(s=0;s<_;s++)(c=n[s])!=null&&(2&c.__u)==0&&(c.__e==i&&(i=an(c)),yl(c,c));return i}function ml(t,e,n){var i,o;if(typeof t.type=="function"){for(i=t.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=t,e=ml(i[o],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=an(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Dg(t,e,n,i){var o,s,a=t.key,c=t.type,h=e[n];if(h===null||h&&a==h.key&&c===h.type&&(2&h.__u)==0)return n;if(i>(h!=null&&(2&h.__u)==0?1:0))for(o=n-1,s=n+1;o>=0||s<e.length;){if(o>=0){if((h=e[o])&&(2&h.__u)==0&&a==h.key&&c===h.type)return o;o--}if(s<e.length){if((h=e[s])&&(2&h.__u)==0&&a==h.key&&c===h.type)return s;s++}}return-1}function Is(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Og.test(e)?n:n+"px"}function Hn(t,e,n,i,o){var s;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof i=="string"&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||Is(t.style,e,"");if(n)for(e in n)i&&n[e]===i[e]||Is(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(pl,"$1")),e=e.toLowerCase()in t||e=="onFocusOut"||e=="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?i?n.u=i.u:(n.u=lo,t.addEventListener(e,s?Or:Tr,s)):t.removeEventListener(e,s?Or:Tr,s);else{if(o=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Ds(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=lo++;else if(e.t<n.u)return;return n(Dt.event?Dt.event(e):e)}}}function vl(t,e,n,i,o,s,a,c,h,f){var _,d,E,I,S,D,M,L,z,X,H,Q,mt,vt,j,ct,ot,st=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(h=!!(32&n.__u),s=[c=e.__e=n.__e]),(_=Dt.__b)&&_(e);t:if(typeof st=="function")try{if(L=e.props,z="prototype"in st&&st.prototype.render,X=(_=st.contextType)&&i[_.__c],H=_?X?X.props.value:_.__:i,n.__c?M=(d=e.__c=n.__c).__=d.__E:(z?e.__c=d=new st(L,H):(e.__c=d=new yn(L,H),d.constructor=st,d.render=kg),X&&X.sub(d),d.props=L,d.state||(d.state={}),d.context=H,d.__n=i,E=d.__d=!0,d.__h=[],d._sb=[]),z&&d.__s==null&&(d.__s=d.state),z&&st.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Te({},d.__s)),Te(d.__s,st.getDerivedStateFromProps(L,d.__s))),I=d.props,S=d.state,d.__v=e,E)z&&st.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),z&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(z&&st.getDerivedStateFromProps==null&&L!==I&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(L,H),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(L,d.__s,H)===!1||e.__v==n.__v)){for(e.__v!=n.__v&&(d.props=L,d.state=d.__s,d.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(ft){ft&&(ft.__=e)}),Q=0;Q<d._sb.length;Q++)d.__h.push(d._sb[Q]);d._sb=[],d.__h.length&&a.push(d);break t}d.componentWillUpdate!=null&&d.componentWillUpdate(L,d.__s,H),z&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(I,S,D)})}if(d.context=H,d.props=L,d.__P=t,d.__e=!1,mt=Dt.__r,vt=0,z){for(d.state=d.__s,d.__d=!1,mt&&mt(e),_=d.render(d.props,d.state,d.context),j=0;j<d._sb.length;j++)d.__h.push(d._sb[j]);d._sb=[]}else do d.__d=!1,mt&&mt(e),_=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++vt<25);d.state=d.__s,d.getChildContext!=null&&(i=Te(Te({},i),d.getChildContext())),z&&!E&&d.getSnapshotBeforeUpdate!=null&&(D=d.getSnapshotBeforeUpdate(I,S)),c=_l(t,co(ct=_!=null&&_.type===ho&&_.key==null?_.props.children:_)?ct:[ct],e,n,i,o,s,a,c,h,f),d.base=e.__e,e.__u&=-161,d.__h.length&&a.push(d),M&&(d.__E=d.__=null)}catch(ft){if(e.__v=null,h||s!=null)if(ft.then){for(e.__u|=h?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;s[s.indexOf(c)]=null,e.__e=c}else for(ot=s.length;ot--;)uo(s[ot]);else e.__e=n.__e,e.__k=n.__k;Dt.__e(ft,e,n)}else s==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):c=e.__e=Pg(n.__e,e,n,i,o,s,a,h,f);return(_=Dt.diffed)&&_(e),128&e.__u?void 0:c}function Rg(t,e,n){for(var i=0;i<n.length;i++)po(n[i],n[++i],n[++i]);Dt.__c&&Dt.__c(e,t),t.some(function(o){try{t=o.__h,o.__h=[],t.some(function(s){s.call(o)})}catch(s){Dt.__e(s,o.__v)}})}function Pg(t,e,n,i,o,s,a,c,h){var f,_,d,E,I,S,D,M=n.props,L=e.props,z=e.type;if(z=="svg"?o="http://www.w3.org/2000/svg":z=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),s!=null){for(f=0;f<s.length;f++)if((I=s[f])&&"setAttribute"in I==!!z&&(z?I.localName==z:I.nodeType==3)){t=I,s[f]=null;break}}if(t==null){if(z==null)return document.createTextNode(L);t=document.createElementNS(o,z,L.is&&L),c&&(Dt.__m&&Dt.__m(e,s),c=!1),s=null}if(z===null)M===L||c&&t.data===L||(t.data=L);else{if(s=s&&cl.call(t.childNodes),M=n.props||Ir,!c&&s!=null)for(M={},f=0;f<t.attributes.length;f++)M[(I=t.attributes[f]).name]=I.value;for(f in M)if(I=M[f],f!="children"){if(f=="dangerouslySetInnerHTML")d=I;else if(!(f in L)){if(f=="value"&&"defaultValue"in L||f=="checked"&&"defaultChecked"in L)continue;Hn(t,f,null,I,o)}}for(f in L)I=L[f],f=="children"?E=I:f=="dangerouslySetInnerHTML"?_=I:f=="value"?S=I:f=="checked"?D=I:c&&typeof I!="function"||M[f]===I||Hn(t,f,I,M[f],o);if(_)c||d&&(_.__html===d.__html||_.__html===t.innerHTML)||(t.innerHTML=_.__html),e.__k=[];else if(d&&(t.innerHTML=""),_l(t,co(E)?E:[E],e,n,i,z=="foreignObject"?"http://www.w3.org/1999/xhtml":o,s,a,s?s[0]:n.__k&&an(n,0),c,h),s!=null)for(f=s.length;f--;)uo(s[f]);c||(f="value",z=="progress"&&S==null?t.removeAttribute("value"):S!==void 0&&(S!==t[f]||z=="progress"&&!S||z=="option"&&S!==M[f])&&Hn(t,f,S,M[f],o),f="checked",D!==void 0&&D!==t[f]&&Hn(t,f,D,M[f],o))}return t}function po(t,e,n){try{if(typeof t=="function"){var i=typeof t.__u=="function";i&&t.__u(),i&&e==null||(t.__u=t(e))}else t.current=e}catch(o){Dt.__e(o,n)}}function yl(t,e,n){var i,o;if(Dt.unmount&&Dt.unmount(t),(i=t.ref)&&(i.current&&i.current!==t.__e||po(i,null,e)),(i=t.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(s){Dt.__e(s,e)}i.base=i.__P=null}if(i=t.__k)for(o=0;o<i.length;o++)i[o]&&yl(i[o],e,n||typeof t.type!="function");n||uo(t.__e),t.__c=t.__=t.__e=void 0}function kg(t,e,n){return this.constructor(t,n)}cl=fl.slice,Dt={__e:function(t,e,n,i){for(var o,s,a;e=e.__;)if((o=e.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(t)),a=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(t,i||{}),a=o.__d),a)return o.__E=o}catch(c){t=c}throw t}},ul=0,hl=function(t){return t!=null&&t.constructor==null},yn.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Te({},this.state),typeof t=="function"&&(t=t(Te({},n),this.props)),t&&Te(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Os(this))},yn.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Os(this))},yn.prototype.render=ho,Me=[],dl=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Cr=function(t,e){return t.__v.__b-e.__v.__b},ii.__r=0,pl=/(PointerCapture)$|Capture$/i,lo=0,Tr=Ds(!1),Or=Ds(!0),Tg=0;var Dr,Yt,ji,Rs,Ps=0,bl=[],Bt=Dt,ks=Bt.__b,Ns=Bt.__r,As=Bt.diffed,Ms=Bt.__c,Ls=Bt.unmount,Bs=Bt.__;function Ng(t,e){Bt.__h&&Bt.__h(Yt,t,Ps||e),Ps=0;var n=Yt.__H||(Yt.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function wl(t,e){var n=Ng(Dr++,7);return Lg(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Ag(){for(var t;t=bl.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Kn),t.__H.__h.forEach(Rr),t.__H.__h=[]}catch(e){t.__H.__h=[],Bt.__e(e,t.__v)}}Bt.__b=function(t){Yt=null,ks&&ks(t)},Bt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Bs&&Bs(t,e)},Bt.__r=function(t){Ns&&Ns(t),Dr=0;var e=(Yt=t.__c).__H;e&&(ji===Yt?(e.__h=[],Yt.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(Kn),e.__h.forEach(Rr),e.__h=[],Dr=0)),ji=Yt},Bt.diffed=function(t){As&&As(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(bl.push(e)!==1&&Rs===Bt.requestAnimationFrame||((Rs=Bt.requestAnimationFrame)||Mg)(Ag)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),ji=Yt=null},Bt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Kn),n.__h=n.__h.filter(function(i){return!i.__||Rr(i)})}catch(i){e.some(function(o){o.__h&&(o.__h=[])}),e=[],Bt.__e(i,n.__v)}}),Ms&&Ms(t,e)},Bt.unmount=function(t){Ls&&Ls(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(i){try{Kn(i)}catch(o){e=o}}),n.__H=void 0,e&&Bt.__e(e,n.__v))};var js=typeof requestAnimationFrame=="function";function Mg(t){var e,n=function(){clearTimeout(i),js&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,100);js&&(e=requestAnimationFrame(n))}function Kn(t){var e=Yt,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Yt=e}function Rr(t){var e=Yt;t.__c=t.__(),Yt=e}function Lg(t,e){return!t||t.length!==e.length||e.some(function(n,i){return n!==t[i]})}var Bg=Symbol.for("preact-signals");function fo(){if(tn>1)tn--;else{for(var t,e=!1;bn!==void 0;){var n=bn;for(bn=void 0,Pr++;n!==void 0;){var i=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Sl(n))try{n.c()}catch(o){e||(t=o,e=!0)}n=i}}if(Pr=0,tn--,e)throw t}}var Tt=void 0,bn=void 0,tn=0,Pr=0,ri=0;function El(t){if(Tt!==void 0){var e=t.n;if(e===void 0||e.t!==Tt)return e={i:0,S:t,p:Tt.s,n:void 0,t:Tt,e:void 0,x:void 0,r:e},Tt.s!==void 0&&(Tt.s.n=e),Tt.s=e,t.n=e,32&Tt.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=Tt.s,e.n=void 0,Tt.s.n=e,Tt.s=e),e}}function $t(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}$t.prototype.brand=Bg;$t.prototype.h=function(){return!0};$t.prototype.S=function(t){this.t!==t&&t.e===void 0&&(t.x=this.t,this.t!==void 0&&(this.t.e=t),this.t=t)};$t.prototype.U=function(t){if(this.t!==void 0){var e=t.e,n=t.x;e!==void 0&&(e.x=n,t.e=void 0),n!==void 0&&(n.e=e,t.x=void 0),t===this.t&&(this.t=n)}};$t.prototype.subscribe=function(t){var e=this;return _o(function(){var n=e.value,i=Tt;Tt=void 0;try{t(n)}finally{Tt=i}})};$t.prototype.valueOf=function(){return this.value};$t.prototype.toString=function(){return this.value+""};$t.prototype.toJSON=function(){return this.value};$t.prototype.peek=function(){var t=Tt;Tt=void 0;try{return this.value}finally{Tt=t}};Object.defineProperty($t.prototype,"value",{get:function(){var t=El(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(Pr>100)throw new Error("Cycle detected");this.v=t,this.i++,ri++,tn++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{fo()}}}});function xl(t){return new $t(t)}function Sl(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function Cl(t){for(var e=t.s;e!==void 0;e=e.n){var n=e.S.n;if(n!==void 0&&(e.r=n),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function Tl(t){for(var e=t.s,n=void 0;e!==void 0;){var i=e.p;e.i===-1?(e.S.U(e),i!==void 0&&(i.n=e.n),e.n!==void 0&&(e.n.p=i)):n=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=i}t.s=n}function un(t){$t.call(this,void 0),this.x=t,this.s=void 0,this.g=ri-1,this.f=4}(un.prototype=new $t).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===ri))return!0;if(this.g=ri,this.f|=1,this.i>0&&!Sl(this))return this.f&=-2,!0;var t=Tt;try{Cl(this),Tt=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return Tt=t,Tl(this),this.f&=-2,!0};un.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}$t.prototype.S.call(this,t)};un.prototype.U=function(t){if(this.t!==void 0&&($t.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}};un.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}};Object.defineProperty(un.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=El(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function jg(t){return new un(t)}function Ol(t){var e=t.u;if(t.u=void 0,typeof e=="function"){tn++;var n=Tt;Tt=void 0;try{e()}catch(i){throw t.f&=-2,t.f|=8,go(t),i}finally{Tt=n,fo()}}}function go(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,Ol(t)}function Fg(t){if(Tt!==this)throw new Error("Out-of-order effect");Tl(this),Tt=t,this.f&=-2,8&this.f&&go(this),fo()}function Pn(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Pn.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}};Pn.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Ol(this),Cl(this),tn++;var t=Tt;return Tt=this,Fg.bind(this,t)};Pn.prototype.N=function(){2&this.f||(this.f|=2,this.o=bn,bn=this)};Pn.prototype.d=function(){this.f|=8,1&this.f||go(this)};function _o(t){var e=new Pn(t);try{e.c()}catch(n){throw e.d(),n}return e.d.bind(e)}var mo,Fi;function hn(t,e){Dt[t]=e.bind(null,Dt[t]||function(){})}function oi(t){Fi&&Fi(),Fi=t&&t.S()}function Il(t){var e=this,n=t.data,i=Ug(n);i.value=n;var o=wl(function(){for(var s=e.__v;s=s.__;)if(s.__c){s.__c.__$f|=4;break}return e.__$u.c=function(){var a,c=e.__$u.S(),h=o.value;c(),hl(h)||((a=e.base)==null?void 0:a.nodeType)!==3?(e.__$f|=1,e.setState({})):e.base.data=h},jg(function(){var a=i.value.value;return a===0?0:a===!0?"":a||""})},[]);return o.value}Il.displayName="_st";Object.defineProperties($t.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Il},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});hn("__b",function(t,e){if(typeof e.type=="string"){var n,i=e.props;for(var o in i)if(o!=="children"){var s=i[o];s instanceof $t&&(n||(e.__np=n={}),n[o]=s,i[o]=s.peek())}}t(e)});hn("__r",function(t,e){oi();var n,i=e.__c;i&&(i.__$f&=-2,(n=i.__$u)===void 0&&(i.__$u=n=function(o){var s;return _o(function(){s=this}),s.c=function(){i.__$f|=1,i.setState({})},s}())),mo=i,oi(n),t(e)});hn("__e",function(t,e,n,i){oi(),mo=void 0,t(e,n,i)});hn("diffed",function(t,e){oi(),mo=void 0;var n;if(typeof e.type=="string"&&(n=e.__e)){var i=e.__np,o=e.props;if(i){var s=n.U;if(s)for(var a in s){var c=s[a];c!==void 0&&!(a in i)&&(c.d(),s[a]=void 0)}else n.U=s={};for(var h in i){var f=s[h],_=i[h];f===void 0?(f=Vg(n,h,_,o),s[h]=f):f.o(_,o)}}}t(e)});function Vg(t,e,n,i){var o=e in t&&t.ownerSVGElement===void 0,s=xl(n);return{o:function(a,c){s.value=a,i=c},d:_o(function(){var a=s.value.value;i[e]!==a&&(i[e]=a,o?t[e]=a:a?t.setAttribute(e,a):t.removeAttribute(e))})}}hn("unmount",function(t,e){if(typeof e.type=="string"){var n=e.__e;if(n){var i=n.U;if(i){n.U=void 0;for(var o in i){var s=i[o];s&&s.d()}}}}else{var a=e.__c;if(a){var c=a.__$u;c&&(a.__$u=void 0,c.d())}}t(e)});hn("__h",function(t,e,n,i){(i<3||i===9)&&(e.__$f|=2),t(e,n,i)});yn.prototype.shouldComponentUpdate=function(t,e){var n=this.__$u,i=n&&n.s!==void 0;for(var o in e)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){if(!(i||2&this.__$f||4&this.__$f)||1&this.__$f)return!0}else if(!(i||4&this.__$f)||3&this.__$f)return!0;for(var s in t)if(s!=="__source"&&t[s]!==this.props[s])return!0;for(var a in this.props)if(!(a in t))return!0;return!1};function Ug(t){return wl(function(){return xl(t)},[])}var Dl=(t=>(t.SIMPLE="SIMPLE",t.SWIPER="SWIPER",t.STORY="STORY",t.FLOATING_POPUP="FLOATING_POPUP",t))(Dl||{}),Rl=(t=>(t.ON="ON",t.OFF="OFF",t.ON_HOVER="ON_HOVER",t))(Rl||{}),Pl=(t=>(t.FIRST_ITEM="FIRST_ITEM",t.BADGE="BADGE",t.NONE="NONE",t))(Pl||{});function $g(t,e){return e={exports:{}},t(e,e.exports),e.exports}var Hg=qg,zg=Yg,Wg=Xg,pe=[],Qt=[],Gg=typeof Uint8Array<"u"?Uint8Array:Array,Vi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(De=0,Fs=Vi.length;De<Fs;++De)pe[De]=Vi[De],Qt[Vi.charCodeAt(De)]=De;var De,Fs;Qt[45]=62;Qt[95]=63;function kl(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 i=n===e?0:4-n%4;return[n,i]}function qg(t){var e=kl(t),n=e[0],i=e[1];return(n+i)*3/4-i}function Zg(t,e,n){return(e+n)*3/4-n}function Yg(t){var e,n=kl(t),i=n[0],o=n[1],s=new Gg(Zg(t,i,o)),a=0,c=o>0?i-4:i,h;for(h=0;h<c;h+=4)e=Qt[t.charCodeAt(h)]<<18|Qt[t.charCodeAt(h+1)]<<12|Qt[t.charCodeAt(h+2)]<<6|Qt[t.charCodeAt(h+3)],s[a++]=e>>16&255,s[a++]=e>>8&255,s[a++]=e&255;return o===2&&(e=Qt[t.charCodeAt(h)]<<2|Qt[t.charCodeAt(h+1)]>>4,s[a++]=e&255),o===1&&(e=Qt[t.charCodeAt(h)]<<10|Qt[t.charCodeAt(h+1)]<<4|Qt[t.charCodeAt(h+2)]>>2,s[a++]=e>>8&255,s[a++]=e&255),s}function Kg(t){return pe[t>>18&63]+pe[t>>12&63]+pe[t>>6&63]+pe[t&63]}function Jg(t,e,n){for(var i,o=[],s=e;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),o.push(Kg(i));return o.join("")}function Xg(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,c=n-i;a<c;a+=s)o.push(Jg(t,a,a+s>c?c:a+s));return i===1?(e=t[n-1],o.push(pe[e>>2]+pe[e<<4&63]+"==")):i===2&&(e=(t[n-2]<<8)+t[n-1],o.push(pe[e>>10]+pe[e>>4&63]+pe[e<<2&63]+"=")),o.join("")}var Ui={byteLength:Hg,toByteArray:zg,fromByteArray:Wg},Qg=function(t,e,n,i,o){var s,a,c=o*8-i-1,h=(1<<c)-1,f=h>>1,_=-7,d=n?o-1:0,E=n?-1:1,I=t[e+d];for(d+=E,s=I&(1<<-_)-1,I>>=-_,_+=c;_>0;s=s*256+t[e+d],d+=E,_-=8);for(a=s&(1<<-_)-1,s>>=-_,_+=i;_>0;a=a*256+t[e+d],d+=E,_-=8);if(s===0)s=1-f;else{if(s===h)return a?NaN:(I?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-f}return(I?-1:1)*a*Math.pow(2,s-i)},t_=function(t,e,n,i,o,s){var a,c,h,f=s*8-o-1,_=(1<<f)-1,d=_>>1,E=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,I=i?0:s-1,S=i?1:-1,D=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,a=_):(a=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-a))<1&&(a--,h*=2),a+d>=1?e+=E/h:e+=E*Math.pow(2,1-d),e*h>=2&&(a++,h/=2),a+d>=_?(c=0,a=_):a+d>=1?(c=(e*h-1)*Math.pow(2,o),a=a+d):(c=e*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;t[n+I]=c&255,I+=S,c/=256,o-=8);for(a=a<<o|c,f+=o;f>0;t[n+I]=a&255,I+=S,a/=256,f-=8);t[n+I-S]|=D*128},Ze={read:Qg,write:t_},vi=$g(function(t,e){var n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=L,e.INSPECT_MAX_BYTES=50;var i=2147483647;e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=o(),!a.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 o(){try{var l=new Uint8Array(1),u={foo:function(){return 42}};return Object.setPrototypeOf(u,Uint8Array.prototype),Object.setPrototypeOf(l,u),l.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function s(l){if(l>i)throw new RangeError('The value "'+l+'" is invalid for option "size"');var u=new Uint8Array(l);return Object.setPrototypeOf(u,a.prototype),u}function a(l,u,p){if(typeof l=="number"){if(typeof u=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(l)}return c(l,u,p)}a.poolSize=8192;function c(l,u,p){if(typeof l=="string")return d(l,u);if(ArrayBuffer.isView(l))return I(l);if(l==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(l));if(tt(l,ArrayBuffer)||l&&tt(l.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(tt(l,SharedArrayBuffer)||l&&tt(l.buffer,SharedArrayBuffer)))return S(l,u,p);if(typeof l=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var w=l.valueOf&&l.valueOf();if(w!=null&&w!==l)return a.from(w,u,p);var P=D(l);if(P)return P;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof l[Symbol.toPrimitive]=="function")return a.from(l[Symbol.toPrimitive]("string"),u,p);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(l))}a.from=function(l,u,p){return c(l,u,p)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function h(l){if(typeof l!="number")throw new TypeError('"size" argument must be of type number');if(l<0)throw new RangeError('The value "'+l+'" is invalid for option "size"')}function f(l,u,p){return h(l),l<=0?s(l):u!==void 0?typeof p=="string"?s(l).fill(u,p):s(l).fill(u):s(l)}a.alloc=function(l,u,p){return f(l,u,p)};function _(l){return h(l),s(l<0?0:M(l)|0)}a.allocUnsafe=function(l){return _(l)},a.allocUnsafeSlow=function(l){return _(l)};function d(l,u){if((typeof u!="string"||u==="")&&(u="utf8"),!a.isEncoding(u))throw new TypeError("Unknown encoding: "+u);var p=z(l,u)|0,w=s(p),P=w.write(l,u);return P!==p&&(w=w.slice(0,P)),w}function E(l){for(var u=l.length<0?0:M(l.length)|0,p=s(u),w=0;w<u;w+=1)p[w]=l[w]&255;return p}function I(l){if(tt(l,Uint8Array)){var u=new Uint8Array(l);return S(u.buffer,u.byteOffset,u.byteLength)}return E(l)}function S(l,u,p){if(u<0||l.byteLength<u)throw new RangeError('"offset" is outside of buffer bounds');if(l.byteLength<u+(p||0))throw new RangeError('"length" is outside of buffer bounds');var w;return u===void 0&&p===void 0?w=new Uint8Array(l):p===void 0?w=new Uint8Array(l,u):w=new Uint8Array(l,u,p),Object.setPrototypeOf(w,a.prototype),w}function D(l){if(a.isBuffer(l)){var u=M(l.length)|0,p=s(u);return p.length===0||l.copy(p,0,0,u),p}if(l.length!==void 0)return typeof l.length!="number"||lt(l.length)?s(0):E(l);if(l.type==="Buffer"&&Array.isArray(l.data))return E(l.data)}function M(l){if(l>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return l|0}function L(l){return+l!=l&&(l=0),a.alloc(+l)}a.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==a.prototype},a.compare=function(l,u){if(tt(l,Uint8Array)&&(l=a.from(l,l.offset,l.byteLength)),tt(u,Uint8Array)&&(u=a.from(u,u.offset,u.byteLength)),!a.isBuffer(l)||!a.isBuffer(u))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(l===u)return 0;for(var p=l.length,w=u.length,P=0,A=Math.min(p,w);P<A;++P)if(l[P]!==u[P]){p=l[P],w=u[P];break}return p<w?-1:w<p?1:0},a.isEncoding=function(l){switch(String(l).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}},a.concat=function(l,u){if(!Array.isArray(l))throw new TypeError('"list" argument must be an Array of Buffers');if(l.length===0)return a.alloc(0);var p;if(u===void 0)for(u=0,p=0;p<l.length;++p)u+=l[p].length;var w=a.allocUnsafe(u),P=0;for(p=0;p<l.length;++p){var A=l[p];if(tt(A,Uint8Array))P+A.length>w.length?a.from(A).copy(w,P):Uint8Array.prototype.set.call(w,A,P);else if(a.isBuffer(A))A.copy(w,P);else throw new TypeError('"list" argument must be an Array of Buffers');P+=A.length}return w};function z(l,u){if(a.isBuffer(l))return l.length;if(ArrayBuffer.isView(l)||tt(l,ArrayBuffer))return l.byteLength;if(typeof l!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(l));var p=l.length,w=arguments.length>2&&arguments[2]===!0;if(!w&&p===0)return 0;for(var P=!1;;)switch(u){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return G(l).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p*2;case"hex":return p>>>1;case"base64":return ht(l).length;default:if(P)return w?-1:G(l).length;u=(""+u).toLowerCase(),P=!0}}a.byteLength=z;function X(l,u,p){var w=!1;if((u===void 0||u<0)&&(u=0),u>this.length||((p===void 0||p>this.length)&&(p=this.length),p<=0)||(p>>>=0,u>>>=0,p<=u))return"";for(l||(l="utf8");;)switch(l){case"hex":return R(this,u,p);case"utf8":case"utf-8":return Ot(this,u,p);case"ascii":return Pt(this,u,p);case"latin1":case"binary":return gt(this,u,p);case"base64":return ft(this,u,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,u,p);default:if(w)throw new TypeError("Unknown encoding: "+l);l=(l+"").toLowerCase(),w=!0}}a.prototype._isBuffer=!0;function H(l,u,p){var w=l[u];l[u]=l[p],l[p]=w}a.prototype.swap16=function(){var l=this.length;if(l%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var u=0;u<l;u+=2)H(this,u,u+1);return this},a.prototype.swap32=function(){var l=this.length;if(l%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var u=0;u<l;u+=4)H(this,u,u+3),H(this,u+1,u+2);return this},a.prototype.swap64=function(){var l=this.length;if(l%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var u=0;u<l;u+=8)H(this,u,u+7),H(this,u+1,u+6),H(this,u+2,u+5),H(this,u+3,u+4);return this},a.prototype.toString=function(){var l=this.length;return l===0?"":arguments.length===0?Ot(this,0,l):X.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(l){if(!a.isBuffer(l))throw new TypeError("Argument must be a Buffer");return this===l?!0:a.compare(this,l)===0},a.prototype.inspect=function(){var l="",u=e.INSPECT_MAX_BYTES;return l=this.toString("hex",0,u).replace(/(.{2})/g,"$1 ").trim(),this.length>u&&(l+=" ... "),"<Buffer "+l+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(l,u,p,w,P){if(tt(l,Uint8Array)&&(l=a.from(l,l.offset,l.byteLength)),!a.isBuffer(l))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(l));if(u===void 0&&(u=0),p===void 0&&(p=l?l.length:0),w===void 0&&(w=0),P===void 0&&(P=this.length),u<0||p>l.length||w<0||P>this.length)throw new RangeError("out of range index");if(w>=P&&u>=p)return 0;if(w>=P)return-1;if(u>=p)return 1;if(u>>>=0,p>>>=0,w>>>=0,P>>>=0,this===l)return 0;for(var A=P-w,Z=p-u,J=Math.min(A,Z),yt=this.slice(w,P),dt=l.slice(u,p),bt=0;bt<J;++bt)if(yt[bt]!==dt[bt]){A=yt[bt],Z=dt[bt];break}return A<Z?-1:Z<A?1:0};function Q(l,u,p,w,P){if(l.length===0)return-1;if(typeof p=="string"?(w=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),p=+p,lt(p)&&(p=P?0:l.length-1),p<0&&(p=l.length+p),p>=l.length){if(P)return-1;p=l.length-1}else if(p<0)if(P)p=0;else return-1;if(typeof u=="string"&&(u=a.from(u,w)),a.isBuffer(u))return u.length===0?-1:mt(l,u,p,w,P);if(typeof u=="number")return u=u&255,typeof Uint8Array.prototype.indexOf=="function"?P?Uint8Array.prototype.indexOf.call(l,u,p):Uint8Array.prototype.lastIndexOf.call(l,u,p):mt(l,[u],p,w,P);throw new TypeError("val must be string, number or Buffer")}function mt(l,u,p,w,P){var A=1,Z=l.length,J=u.length;if(w!==void 0&&(w=String(w).toLowerCase(),w==="ucs2"||w==="ucs-2"||w==="utf16le"||w==="utf-16le")){if(l.length<2||u.length<2)return-1;A=2,Z/=2,J/=2,p/=2}function yt(ge,At){return A===1?ge[At]:ge.readUInt16BE(At*A)}var dt;if(P){var bt=-1;for(dt=p;dt<Z;dt++)if(yt(l,dt)===yt(u,bt===-1?0:dt-bt)){if(bt===-1&&(bt=dt),dt-bt+1===J)return bt*A}else bt!==-1&&(dt-=dt-bt),bt=-1}else for(p+J>Z&&(p=Z-J),dt=p;dt>=0;dt--){for(var _t=!0,jt=0;jt<J;jt++)if(yt(l,dt+jt)!==yt(u,jt)){_t=!1;break}if(_t)return dt}return-1}a.prototype.includes=function(l,u,p){return this.indexOf(l,u,p)!==-1},a.prototype.indexOf=function(l,u,p){return Q(this,l,u,p,!0)},a.prototype.lastIndexOf=function(l,u,p){return Q(this,l,u,p,!1)};function vt(l,u,p,w){p=Number(p)||0;var P=l.length-p;w?(w=Number(w),w>P&&(w=P)):w=P;var A=u.length;w>A/2&&(w=A/2);for(var Z=0;Z<w;++Z){var J=parseInt(u.substr(Z*2,2),16);if(lt(J))return Z;l[p+Z]=J}return Z}function j(l,u,p,w){return q(G(u,l.length-p),l,p,w)}function ct(l,u,p,w){return q(it(u),l,p,w)}function ot(l,u,p,w){return q(ht(u),l,p,w)}function st(l,u,p,w){return q(at(u,l.length-p),l,p,w)}a.prototype.write=function(l,u,p,w){if(u===void 0)w="utf8",p=this.length,u=0;else if(p===void 0&&typeof u=="string")w=u,p=this.length,u=0;else if(isFinite(u))u=u>>>0,isFinite(p)?(p=p>>>0,w===void 0&&(w="utf8")):(w=p,p=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var P=this.length-u;if((p===void 0||p>P)&&(p=P),l.length>0&&(p<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");w||(w="utf8");for(var A=!1;;)switch(w){case"hex":return vt(this,l,u,p);case"utf8":case"utf-8":return j(this,l,u,p);case"ascii":case"latin1":case"binary":return ct(this,l,u,p);case"base64":return ot(this,l,u,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return st(this,l,u,p);default:if(A)throw new TypeError("Unknown encoding: "+w);w=(""+w).toLowerCase(),A=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ft(l,u,p){return u===0&&p===l.length?Ui.fromByteArray(l):Ui.fromByteArray(l.slice(u,p))}function Ot(l,u,p){p=Math.min(l.length,p);for(var w=[],P=u;P<p;){var A=l[P],Z=null,J=A>239?4:A>223?3:A>191?2:1;if(P+J<=p){var yt,dt,bt,_t;switch(J){case 1:A<128&&(Z=A);break;case 2:yt=l[P+1],(yt&192)===128&&(_t=(A&31)<<6|yt&63,_t>127&&(Z=_t));break;case 3:yt=l[P+1],dt=l[P+2],(yt&192)===128&&(dt&192)===128&&(_t=(A&15)<<12|(yt&63)<<6|dt&63,_t>2047&&(_t<55296||_t>57343)&&(Z=_t));break;case 4:yt=l[P+1],dt=l[P+2],bt=l[P+3],(yt&192)===128&&(dt&192)===128&&(bt&192)===128&&(_t=(A&15)<<18|(yt&63)<<12|(dt&63)<<6|bt&63,_t>65535&&_t<1114112&&(Z=_t))}}Z===null?(Z=65533,J=1):Z>65535&&(Z-=65536,w.push(Z>>>10&1023|55296),Z=56320|Z&1023),w.push(Z),P+=J}return It(w)}var xt=4096;function It(l){var u=l.length;if(u<=xt)return String.fromCharCode.apply(String,l);for(var p="",w=0;w<u;)p+=String.fromCharCode.apply(String,l.slice(w,w+=xt));return p}function Pt(l,u,p){var w="";p=Math.min(l.length,p);for(var P=u;P<p;++P)w+=String.fromCharCode(l[P]&127);return w}function gt(l,u,p){var w="";p=Math.min(l.length,p);for(var P=u;P<p;++P)w+=String.fromCharCode(l[P]);return w}function R(l,u,p){var w=l.length;(!u||u<0)&&(u=0),(!p||p<0||p>w)&&(p=w);for(var P="",A=u;A<p;++A)P+=rt[l[A]];return P}function O(l,u,p){for(var w=l.slice(u,p),P="",A=0;A<w.length-1;A+=2)P+=String.fromCharCode(w[A]+w[A+1]*256);return P}a.prototype.slice=function(l,u){var p=this.length;l=~~l,u=u===void 0?p:~~u,l<0?(l+=p,l<0&&(l=0)):l>p&&(l=p),u<0?(u+=p,u<0&&(u=0)):u>p&&(u=p),u<l&&(u=l);var w=this.subarray(l,u);return Object.setPrototypeOf(w,a.prototype),w};function v(l,u,p){if(l%1!==0||l<0)throw new RangeError("offset is not uint");if(l+u>p)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(l,u,p){l=l>>>0,u=u>>>0,p||v(l,u,this.length);for(var w=this[l],P=1,A=0;++A<u&&(P*=256);)w+=this[l+A]*P;return w},a.prototype.readUintBE=a.prototype.readUIntBE=function(l,u,p){l=l>>>0,u=u>>>0,p||v(l,u,this.length);for(var w=this[l+--u],P=1;u>0&&(P*=256);)w+=this[l+--u]*P;return w},a.prototype.readUint8=a.prototype.readUInt8=function(l,u){return l=l>>>0,u||v(l,1,this.length),this[l]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(l,u){return l=l>>>0,u||v(l,2,this.length),this[l]|this[l+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(l,u){return l=l>>>0,u||v(l,2,this.length),this[l]<<8|this[l+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(l,u){return l=l>>>0,u||v(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+this[l+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(l,u){return l=l>>>0,u||v(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},a.prototype.readIntLE=function(l,u,p){l=l>>>0,u=u>>>0,p||v(l,u,this.length);for(var w=this[l],P=1,A=0;++A<u&&(P*=256);)w+=this[l+A]*P;return P*=128,w>=P&&(w-=Math.pow(2,8*u)),w},a.prototype.readIntBE=function(l,u,p){l=l>>>0,u=u>>>0,p||v(l,u,this.length);for(var w=u,P=1,A=this[l+--w];w>0&&(P*=256);)A+=this[l+--w]*P;return P*=128,A>=P&&(A-=Math.pow(2,8*u)),A},a.prototype.readInt8=function(l,u){return l=l>>>0,u||v(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},a.prototype.readInt16LE=function(l,u){l=l>>>0,u||v(l,2,this.length);var p=this[l]|this[l+1]<<8;return p&32768?p|4294901760:p},a.prototype.readInt16BE=function(l,u){l=l>>>0,u||v(l,2,this.length);var p=this[l+1]|this[l]<<8;return p&32768?p|4294901760:p},a.prototype.readInt32LE=function(l,u){return l=l>>>0,u||v(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},a.prototype.readInt32BE=function(l,u){return l=l>>>0,u||v(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},a.prototype.readFloatLE=function(l,u){return l=l>>>0,u||v(l,4,this.length),Ze.read(this,l,!0,23,4)},a.prototype.readFloatBE=function(l,u){return l=l>>>0,u||v(l,4,this.length),Ze.read(this,l,!1,23,4)},a.prototype.readDoubleLE=function(l,u){return l=l>>>0,u||v(l,8,this.length),Ze.read(this,l,!0,52,8)},a.prototype.readDoubleBE=function(l,u){return l=l>>>0,u||v(l,8,this.length),Ze.read(this,l,!1,52,8)};function m(l,u,p,w,P,A){if(!a.isBuffer(l))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>P||u<A)throw new RangeError('"value" argument is out of bounds');if(p+w>l.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(l,u,p,w){if(l=+l,u=u>>>0,p=p>>>0,!w){var P=Math.pow(2,8*p)-1;m(this,l,u,p,P,0)}var A=1,Z=0;for(this[u]=l&255;++Z<p&&(A*=256);)this[u+Z]=l/A&255;return u+p},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(l,u,p,w){if(l=+l,u=u>>>0,p=p>>>0,!w){var P=Math.pow(2,8*p)-1;m(this,l,u,p,P,0)}var A=p-1,Z=1;for(this[u+A]=l&255;--A>=0&&(Z*=256);)this[u+A]=l/Z&255;return u+p},a.prototype.writeUint8=a.prototype.writeUInt8=function(l,u,p){return l=+l,u=u>>>0,p||m(this,l,u,1,255,0),this[u]=l&255,u+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(l,u,p){return l=+l,u=u>>>0,p||m(this,l,u,2,65535,0),this[u]=l&255,this[u+1]=l>>>8,u+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(l,u,p){return l=+l,u=u>>>0,p||m(this,l,u,2,65535,0),this[u]=l>>>8,this[u+1]=l&255,u+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(l,u,p){return l=+l,u=u>>>0,p||m(this,l,u,4,4294967295,0),this[u+3]=l>>>24,this[u+2]=l>>>16,this[u+1]=l>>>8,this[u]=l&255,u+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(l,u,p){return l=+l,u=u>>>0,p||m(this,l,u,4,4294967295,0),this[u]=l>>>24,this[u+1]=l>>>16,this[u+2]=l>>>8,this[u+3]=l&255,u+4},a.prototype.writeIntLE=function(l,u,p,w){if(l=+l,u=u>>>0,!w){var P=Math.pow(2,8*p-1);m(this,l,u,p,P-1,-P)}var A=0,Z=1,J=0;for(this[u]=l&255;++A<p&&(Z*=256);)l<0&&J===0&&this[u+A-1]!==0&&(J=1),this[u+A]=(l/Z>>0)-J&255;return u+p},a.prototype.writeIntBE=function(l,u,p,w){if(l=+l,u=u>>>0,!w){var P=Math.pow(2,8*p-1);m(this,l,u,p,P-1,-P)}var A=p-1,Z=1,J=0;for(this[u+A]=l&255;--A>=0&&(Z*=256);)l<0&&J===0&&this[u+A+1]!==0&&(J=1),this[u+A]=(l/Z>>0)-J&255;return u+p},a.prototype.writeInt8=function(l,u,p){return l=+l,u=u>>>0,p||m(this,l,u,1,127,-128),l<0&&(l=255+l+1),this[u]=l&255,u+1},a.prototype.writeInt16LE=function(l,u,p){return l=+l,u=u>>>0,p||m(this,l,u,2,32767,-32768),this[u]=l&255,this[u+1]=l>>>8,u+2},a.prototype.writeInt16BE=function(l,u,p){return l=+l,u=u>>>0,p||m(this,l,u,2,32767,-32768),this[u]=l>>>8,this[u+1]=l&255,u+2},a.prototype.writeInt32LE=function(l,u,p){return l=+l,u=u>>>0,p||m(this,l,u,4,2147483647,-2147483648),this[u]=l&255,this[u+1]=l>>>8,this[u+2]=l>>>16,this[u+3]=l>>>24,u+4},a.prototype.writeInt32BE=function(l,u,p){return l=+l,u=u>>>0,p||m(this,l,u,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[u]=l>>>24,this[u+1]=l>>>16,this[u+2]=l>>>8,this[u+3]=l&255,u+4};function k(l,u,p,w,P,A){if(p+w>l.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function F(l,u,p,w,P){return u=+u,p=p>>>0,P||k(l,u,p,4),Ze.write(l,u,p,w,23,4),p+4}a.prototype.writeFloatLE=function(l,u,p){return F(this,l,u,!0,p)},a.prototype.writeFloatBE=function(l,u,p){return F(this,l,u,!1,p)};function W(l,u,p,w,P){return u=+u,p=p>>>0,P||k(l,u,p,8),Ze.write(l,u,p,w,52,8),p+8}a.prototype.writeDoubleLE=function(l,u,p){return W(this,l,u,!0,p)},a.prototype.writeDoubleBE=function(l,u,p){return W(this,l,u,!1,p)},a.prototype.copy=function(l,u,p,w){if(!a.isBuffer(l))throw new TypeError("argument should be a Buffer");if(p||(p=0),!w&&w!==0&&(w=this.length),u>=l.length&&(u=l.length),u||(u=0),w>0&&w<p&&(w=p),w===p||l.length===0||this.length===0)return 0;if(u<0)throw new RangeError("targetStart out of bounds");if(p<0||p>=this.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("sourceEnd out of bounds");w>this.length&&(w=this.length),l.length-u<w-p&&(w=l.length-u+p);var P=w-p;return this===l&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(u,p,w):Uint8Array.prototype.set.call(l,this.subarray(p,w),u),P},a.prototype.fill=function(l,u,p,w){if(typeof l=="string"){if(typeof u=="string"?(w=u,u=0,p=this.length):typeof p=="string"&&(w=p,p=this.length),w!==void 0&&typeof w!="string")throw new TypeError("encoding must be a string");if(typeof w=="string"&&!a.isEncoding(w))throw new TypeError("Unknown encoding: "+w);if(l.length===1){var P=l.charCodeAt(0);(w==="utf8"&&P<128||w==="latin1")&&(l=P)}}else typeof l=="number"?l=l&255:typeof l=="boolean"&&(l=Number(l));if(u<0||this.length<u||this.length<p)throw new RangeError("Out of range index");if(p<=u)return this;u=u>>>0,p=p===void 0?this.length:p>>>0,l||(l=0);var A;if(typeof l=="number")for(A=u;A<p;++A)this[A]=l;else{var Z=a.isBuffer(l)?l:a.from(l,w),J=Z.length;if(J===0)throw new TypeError('The value "'+l+'" is invalid for argument "value"');for(A=0;A<p-u;++A)this[A+u]=Z[A%J]}return this};var K=/[^+/0-9A-Za-z-_]/g;function Y(l){if(l=l.split("=")[0],l=l.trim().replace(K,""),l.length<2)return"";for(;l.length%4!==0;)l=l+"=";return l}function G(l,u){u=u||1/0;for(var p,w=l.length,P=null,A=[],Z=0;Z<w;++Z){if(p=l.charCodeAt(Z),p>55295&&p<57344){if(!P){if(p>56319){(u-=3)>-1&&A.push(239,191,189);continue}else if(Z+1===w){(u-=3)>-1&&A.push(239,191,189);continue}P=p;continue}if(p<56320){(u-=3)>-1&&A.push(239,191,189),P=p;continue}p=(P-55296<<10|p-56320)+65536}else P&&(u-=3)>-1&&A.push(239,191,189);if(P=null,p<128){if((u-=1)<0)break;A.push(p)}else if(p<2048){if((u-=2)<0)break;A.push(p>>6|192,p&63|128)}else if(p<65536){if((u-=3)<0)break;A.push(p>>12|224,p>>6&63|128,p&63|128)}else if(p<1114112){if((u-=4)<0)break;A.push(p>>18|240,p>>12&63|128,p>>6&63|128,p&63|128)}else throw new Error("Invalid code point")}return A}function it(l){for(var u=[],p=0;p<l.length;++p)u.push(l.charCodeAt(p)&255);return u}function at(l,u){for(var p,w,P,A=[],Z=0;Z<l.length&&!((u-=2)<0);++Z)p=l.charCodeAt(Z),w=p>>8,P=p%256,A.push(P),A.push(w);return A}function ht(l){return Ui.toByteArray(Y(l))}function q(l,u,p,w){for(var P=0;P<w&&!(P+p>=u.length||P>=l.length);++P)u[P+p]=l[P];return P}function tt(l,u){return l instanceof u||l!=null&&l.constructor!=null&&l.constructor.name!=null&&l.constructor.name===u.name}function lt(l){return l!==l}var rt=function(){for(var l="0123456789abcdef",u=new Array(256),p=0;p<16;++p)for(var w=p*16,P=0;P<16;++P)u[w+P]=l[p]+l[P];return u}()}),wt=vi.Buffer;vi.SlowBuffer;vi.INSPECT_MAX_BYTES;vi.kMaxLength;var kr=function(t,e){return kr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])},kr(t,e)};function yi(t,e){kr(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var je=function(t){yi(e,t);function e(n){var i=t.call(this,n)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),e}(Error),Nt=function(t){yi(e,t);function e(n){var i=t.call(this,n)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),e}(TypeError);function zn(t){return t&&t.Math==Math&&t}function Nl(){return zn(typeof globalThis=="object"&&globalThis)||zn(typeof window=="object"&&window)||zn(typeof self=="object"&&self)||zn(typeof global=="object"&&global)||Function("return this")()}function e_(){var t=Nl();return typeof t.navigator=="object"&&t.navigator.product==="ReactNative"}var n_=function(t){var e=e_()?"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=wt.alloc(t),i=0;i<t;++i)n[i]=Math.floor(Math.random()*256);return n},i_=function(){{if(typeof window<"u"){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(wt.alloc(e))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(e){return global.crypto.getRandomValues(wt.alloc(e))}:n_}},Al=i_();function r_(t){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(t))}function vo(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function o_(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function s_(t){return kn(t)&&Object.prototype.toString.call(t)==="[object Date]"}function kn(t){return typeof t=="object"&&t!==null}function bi(t,e){var n=!1;function i(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];return n||(console.warn(e),n=!0),t.apply(this,o)}return i}function si(t){if(ArrayBuffer.isView(t))return wt.from(t.buffer,t.byteOffset,t.byteLength);if(r_(t))return wt.from(t);throw new Nt("Must use either Buffer or TypedArray")}var a_=/^(?:[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,Ml=function(t){return typeof t=="string"&&a_.test(t)},Nr=function(t){if(!Ml(t))throw new Nt('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 wt.from(e,"hex")},Vs=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")},fy=Math.pow(2,63)-1,gy=-Math.pow(2,63),l_=Math.pow(2,53),c_=-Math.pow(2,53),Ll=4,Fe=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 Nt("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=wt.alloc(t.BUFFER_SIZE),this.position=0):(typeof e=="string"?this.buffer=wt.from(e,"binary"):Array.isArray(e)?this.buffer=wt.from(e):this.buffer=si(e),this.position=this.buffer.byteLength)}return t.prototype.put=function(e){if(typeof e=="string"&&e.length!==1)throw new Nt("only accepts single character String");if(typeof e!="number"&&e.length!==1)throw new Nt("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 Nt("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=n;else{var i=wt.alloc(t.BUFFER_SIZE+this.buffer.length);this.buffer.copy(i,0,0,this.buffer.length),this.buffer=i,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 i=wt.alloc(this.buffer.length+e.length);this.buffer.copy(i,0,0,this.buffer.length),this.buffer=i}ArrayBuffer.isView(e)?(this.buffer.set(si(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"),i=Number(this.sub_type).toString(16);return e.legacy?{$binary:n,$type:i.length===1?"0"+i:i}:{$binary:{base64:n,subType:i.length===1?"0"+i:i}}},t.prototype.toUUID=function(){if(this.sub_type===t.SUBTYPE_UUID)return new Us(this.buffer.slice(0,this.position));throw new je('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 i,o;if("$binary"in e?n.legacy&&typeof e.$binary=="string"&&"$type"in e?(o=e.$type?parseInt(e.$type,16):0,i=wt.from(e.$binary,"base64")):typeof e.$binary!="string"&&(o=e.$binary.subType?parseInt(e.$binary.subType,16):0,i=wt.from(e.$binary.base64,"base64")):"$uuid"in e&&(o=4,i=Nr(e.$uuid)),!i)throw new Nt("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return o===Ll?new Us(i):new t(i,o)},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(Fe.prototype,"_bsontype",{value:"Binary"});var $i=16,Us=function(t){yi(e,t);function e(n){var i=this,o,s;if(n==null)o=e.generate();else if(n instanceof e)o=wt.from(n.buffer),s=n.__id;else if(ArrayBuffer.isView(n)&&n.byteLength===$i)o=si(n);else if(typeof n=="string")o=Nr(n);else throw new Nt("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 i=t.call(this,o,Ll)||this,i.__id=s,i}return Object.defineProperty(e.prototype,"id",{get:function(){return this.buffer},set:function(n){this.buffer=n,e.cacheHexString&&(this.__id=Vs(n))},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(n){if(n===void 0&&(n=!0),e.cacheHexString&&this.__id)return this.__id;var i=Vs(this.id,n);return e.cacheHexString&&(this.__id=i),i},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 Fe(this.id,Fe.SUBTYPE_UUID)},e.generate=function(){var n=Al($i);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,wt.from(n)},e.isValid=function(n){return n?n instanceof e?!0:typeof n=="string"?Ml(n):vo(n)?n.length!==$i?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},e.createFromHexString=function(n){var i=Nr(n);return new e(i)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},e}(Fe),wi=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(wi.prototype,"_bsontype",{value:"Code"});function u_(t){return kn(t)&&t.$id!=null&&typeof t.$ref=="string"&&(t.$db==null||typeof t.$db=="string")}var Sn=function(){function t(e,n,i,o){if(!(this instanceof t))return new t(e,n,i,o);var s=e.split(".");s.length===2&&(i=s.shift(),e=s.shift()),this.collection=e,this.oid=n,this.db=i,this.fields=o||{}}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(Sn.prototype,"_bsontype",{value:"DBRef"});var Xt=void 0;try{Xt=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 $s=65536,h_=1<<24,Xe=$s*$s,Bl=Xe*Xe,Hs=Bl/2,zs={},Ws={},et=function(){function t(e,n,i){if(e===void 0&&(e=0),!(this instanceof t))return new t(e,n,i);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=!!i),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return t.fromBits=function(e,n,i){return new t(e,n,i)},t.fromInt=function(e,n){var i,o,s;return n?(e>>>=0,(s=0<=e&&e<256)&&(o=Ws[e],o)?o:(i=t.fromBits(e,(e|0)<0?-1:0,!0),s&&(Ws[e]=i),i)):(e|=0,(s=-128<=e&&e<128)&&(o=zs[e],o)?o:(i=t.fromBits(e,e<0?-1:0,!1),s&&(zs[e]=i),i))},t.fromNumber=function(e,n){if(isNaN(e))return n?t.UZERO:t.ZERO;if(n){if(e<0)return t.UZERO;if(e>=Bl)return t.MAX_UNSIGNED_VALUE}else{if(e<=-Hs)return t.MIN_VALUE;if(e+1>=Hs)return t.MAX_VALUE}return e<0?t.fromNumber(-e,n).neg():t.fromBits(e%Xe|0,e/Xe|0,n)},t.fromBigInt=function(e,n){return t.fromString(e.toString(),n)},t.fromString=function(e,n,i){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return t.ZERO;if(typeof n=="number"?(i=n,n=!1):n=!!n,i=i||10,i<2||36<i)throw RangeError("radix");var o;if((o=e.indexOf("-"))>0)throw Error("interior hyphen");if(o===0)return t.fromString(e.substring(1),n,i).neg();for(var s=t.fromNumber(Math.pow(i,8)),a=t.ZERO,c=0;c<e.length;c+=8){var h=Math.min(8,e.length-c),f=parseInt(e.substring(c,c+h),i);if(h<8){var _=t.fromNumber(Math.pow(i,h));a=a.mul(_).add(t.fromNumber(f))}else a=a.mul(s),a=a.add(t.fromNumber(f))}return a.unsigned=n,a},t.fromBytes=function(e,n,i){return i?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 kn(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,i=this.high&65535,o=this.low>>>16,s=this.low&65535,a=e.high>>>16,c=e.high&65535,h=e.low>>>16,f=e.low&65535,_=0,d=0,E=0,I=0;return I+=s+f,E+=I>>>16,I&=65535,E+=o+h,d+=E>>>16,E&=65535,d+=i+c,_+=d>>>16,d&=65535,_+=n+a,_&=65535,t.fromBits(E<<16|I,_<<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(),i=e.isNegative();return n&&!i?-1:!n&&i?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(Xt){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var n=(this.unsigned?Xt.div_u:Xt.div_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Xt.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?t.UZERO:t.ZERO;var i,o,s;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return t.UZERO;if(e.gt(this.shru(1)))return t.UONE;s=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 a=this.shr(1);return i=a.div(e).shl(1),i.eq(t.ZERO)?e.isNegative()?t.ONE:t.NEG_ONE:(o=this.sub(e.mul(i)),s=i.add(o.div(e)),s)}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();s=t.ZERO}for(o=this;o.gte(e);){i=Math.max(1,Math.floor(o.toNumber()/e.toNumber()));for(var c=Math.ceil(Math.log(i)/Math.LN2),h=c<=48?1:Math.pow(2,c-48),f=t.fromNumber(i),_=f.mul(e);_.isNegative()||_.gt(o);)i-=h,f=t.fromNumber(i,this.unsigned),_=f.mul(e);f.isZero()&&(f=t.ONE),s=s.add(f),o=o.sub(_)}return s},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)),Xt){var n=(this.unsigned?Xt.rem_u:Xt.rem_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Xt.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)),Xt){var n=Xt.mul(this.low,this.high,e.low,e.high);return t.fromBits(n,Xt.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 i=this.high>>>16,o=this.high&65535,s=this.low>>>16,a=this.low&65535,c=e.high>>>16,h=e.high&65535,f=e.low>>>16,_=e.low&65535,d=0,E=0,I=0,S=0;return S+=a*_,I+=S>>>16,S&=65535,I+=s*_,E+=I>>>16,I&=65535,I+=a*f,E+=I>>>16,I&=65535,E+=o*_,d+=E>>>16,E&=65535,E+=s*f,d+=E>>>16,E&=65535,E+=a*h,d+=E>>>16,E&=65535,d+=i*_+o*f+s*h+a*c,d&=65535,t.fromBits(I<<16|S,d<<16|E,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 i=this.low;return t.fromBits(i>>>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)*Xe+(this.low>>>0):this.high*Xe+(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),i=this.div(n),o=i.mul(n).sub(this);return i.toString(e)+o.toInt().toString(e)}else return"-"+this.neg().toString(e);for(var s=t.fromNumber(Math.pow(e,6),this.unsigned),a=this,c="";;){var h=a.div(s),f=a.sub(h.mul(s)).toInt()>>>0,_=f.toString(e);if(a=h,a.isZero())return _+c;for(;_.length<6;)_="0"+_;c=""+_+c}},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 i=t.fromString(e.$numberLong);return n&&n.relaxed?i.toNumber():i},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(h_),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(et.prototype,"__isLong__",{value:!0});Object.defineProperty(et.prototype,"_bsontype",{value:"Long"});var d_=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,p_=/^(\+|-)?(Infinity|inf)$/i,f_=/^(\+|-)?NaN$/i,fn=6111,Hi=-6176,Gs=6176,g_=34,zi=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),qs=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Zs=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),__=/^([-+])?(\d+)?$/,m_=31,Ys=16383,v_=30,y_=31;function Ks(t){return!isNaN(parseInt(t,10))}function b_(t){var e=et.fromNumber(1e9),n=et.fromNumber(0);if(!t.parts[0]&&!t.parts[1]&&!t.parts[2]&&!t.parts[3])return{quotient:t,rem:n};for(var i=0;i<=3;i++)n=n.shiftLeft(32),n=n.add(new et(t.parts[i],0)),t.parts[i]=n.div(e).low,n=n.modulo(e);return{quotient:t,rem:n}}function w_(t,e){if(!t&&!e)return{high:et.fromNumber(0),low:et.fromNumber(0)};var n=t.shiftRightUnsigned(32),i=new et(t.getLowBits(),0),o=e.shiftRightUnsigned(32),s=new et(e.getLowBits(),0),a=n.multiply(o),c=n.multiply(s),h=i.multiply(o),f=i.multiply(s);return a=a.add(c.shiftRightUnsigned(32)),c=new et(c.getLowBits(),0).add(h).add(f.shiftRightUnsigned(32)),a=a.add(c.shiftRightUnsigned(32)),f=c.shiftLeft(32).add(new et(f.getLowBits(),0)),{high:a,low:f}}function E_(t,e){var n=t.high>>>0,i=e.high>>>0;if(n<i)return!0;if(n===i){var o=t.low>>>0,s=e.low>>>0;if(o<s)return!0}return!1}function Ye(t,e){throw new Nt('"'.concat(t,'" is not a valid Decimal128 string - ').concat(e))}var yo=function(){function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="string")this.bytes=t.fromString(e).bytes;else if(vo(e)){if(e.byteLength!==16)throw new Nt("Decimal128 must take a Buffer of 16 bytes");this.bytes=e}else throw new Nt("Decimal128 must take a Buffer or string")}return t.fromString=function(e){var n=!1,i=!1,o=!1,s=0,a=0,c=0,h=0,f=0,_=[0],d=0,E=0,I=0,S=0,D=0,M=0,L=new et(0,0),z=new et(0,0),X=0,H=0;if(e.length>=7e3)throw new Nt(""+e+" not a valid Decimal128 string");var Q=e.match(d_),mt=e.match(p_),vt=e.match(f_);if(!Q&&!mt&&!vt||e.length===0)throw new Nt(""+e+" not a valid Decimal128 string");if(Q){var j=Q[2],ct=Q[4],ot=Q[5],st=Q[6];ct&&st===void 0&&Ye(e,"missing exponent power"),ct&&j===void 0&&Ye(e,"missing exponent base"),ct===void 0&&(ot||st)&&Ye(e,"missing e before exponent")}if((e[H]==="+"||e[H]==="-")&&(n=e[H++]==="-"),!Ks(e[H])&&e[H]!=="."){if(e[H]==="i"||e[H]==="I")return new t(wt.from(n?qs:Zs));if(e[H]==="N")return new t(wt.from(zi))}for(;Ks(e[H])||e[H]===".";){if(e[H]==="."){i&&Ye(e,"contains multiple periods"),i=!0,H=H+1;continue}d<34&&(e[H]!=="0"||o)&&(o||(f=a),o=!0,_[E++]=parseInt(e[H],10),d=d+1),o&&(c=c+1),i&&(h=h+1),a=a+1,H=H+1}if(i&&!a)throw new Nt(""+e+" not a valid Decimal128 string");if(e[H]==="e"||e[H]==="E"){var ft=e.substr(++H).match(__);if(!ft||!ft[2])return new t(wt.from(zi));D=parseInt(ft[0],10),H=H+ft[0].length}if(e[H])return new t(wt.from(zi));if(I=0,!d)I=0,S=0,_[0]=0,c=1,d=1,s=0;else if(S=d-1,s=c,s!==1)for(;_[f+s-1]===0;)s=s-1;for(D<=h&&h-D>16384?D=Hi:D=D-h;D>fn;){if(S=S+1,S-I>g_){var Ot=_.join("");if(Ot.match(/^0+$/)){D=fn;break}Ye(e,"overflow")}D=D-1}for(;D<Hi||d<c;){if(S===0&&s<d){D=Hi,s=0;break}if(d<c?c=c-1:S=S-1,D<fn)D=D+1;else{var Ot=_.join("");if(Ot.match(/^0+$/)){D=fn;break}Ye(e,"overflow")}}if(S-I+1<s){var xt=a;i&&(f=f+1,xt=xt+1),n&&(f=f+1,xt=xt+1);var It=parseInt(e[f+S+1],10),Pt=0;if(It>=5&&(Pt=1,It===5)){for(Pt=_[S]%2===1?1:0,M=f+S+2;M<xt;M++)if(parseInt(e[M],10)){Pt=1;break}}if(Pt){for(var gt=S;gt>=0;gt--)if(++_[gt]>9&&(_[gt]=0,gt===0))if(D<fn)D=D+1,_[gt]=1;else return new t(wt.from(n?qs:Zs))}}if(L=et.fromNumber(0),z=et.fromNumber(0),s===0)L=et.fromNumber(0),z=et.fromNumber(0);else if(S-I<17){var gt=I;for(z=et.fromNumber(_[gt++]),L=new et(0,0);gt<=S;gt++)z=z.multiply(et.fromNumber(10)),z=z.add(et.fromNumber(_[gt]))}else{var gt=I;for(L=et.fromNumber(_[gt++]);gt<=S-17;gt++)L=L.multiply(et.fromNumber(10)),L=L.add(et.fromNumber(_[gt]));for(z=et.fromNumber(_[gt++]);gt<=S;gt++)z=z.multiply(et.fromNumber(10)),z=z.add(et.fromNumber(_[gt]))}var R=w_(L,et.fromString("100000000000000000"));R.low=R.low.add(z),E_(R.low,z)&&(R.high=R.high.add(et.fromNumber(1))),X=D+Gs;var O={low:et.fromNumber(0),high:et.fromNumber(0)};R.high.shiftRightUnsigned(49).and(et.fromNumber(1)).equals(et.fromNumber(1))?(O.high=O.high.or(et.fromNumber(3).shiftLeft(61)),O.high=O.high.or(et.fromNumber(X).and(et.fromNumber(16383).shiftLeft(47))),O.high=O.high.or(R.high.and(et.fromNumber(0x7fffffffffff)))):(O.high=O.high.or(et.fromNumber(X&16383).shiftLeft(49)),O.high=O.high.or(R.high.and(et.fromNumber(562949953421311)))),O.low=R.low,n&&(O.high=O.high.or(et.fromString("9223372036854775808")));var v=wt.alloc(16);return H=0,v[H++]=O.low.low&255,v[H++]=O.low.low>>8&255,v[H++]=O.low.low>>16&255,v[H++]=O.low.low>>24&255,v[H++]=O.low.high&255,v[H++]=O.low.high>>8&255,v[H++]=O.low.high>>16&255,v[H++]=O.low.high>>24&255,v[H++]=O.high.low&255,v[H++]=O.high.low>>8&255,v[H++]=O.high.low>>16&255,v[H++]=O.high.low>>24&255,v[H++]=O.high.high&255,v[H++]=O.high.high>>8&255,v[H++]=O.high.high>>16&255,v[H++]=O.high.high>>24&255,new t(v)},t.prototype.toString=function(){for(var e,n=0,i=new Array(36),o=0;o<i.length;o++)i[o]=0;var s=0,a=!1,c,h={parts:[0,0,0,0]},f,_,d=[];s=0;var E=this.bytes,I=E[s++]|E[s++]<<8|E[s++]<<16|E[s++]<<24,S=E[s++]|E[s++]<<8|E[s++]<<16|E[s++]<<24,D=E[s++]|E[s++]<<8|E[s++]<<16|E[s++]<<24,M=E[s++]|E[s++]<<8|E[s++]<<16|E[s++]<<24;s=0;var L={low:new et(I,S),high:new et(D,M)};L.high.lessThan(et.ZERO)&&d.push("-");var z=M>>26&m_;if(z>>3===3){if(z===v_)return d.join("")+"Infinity";if(z===y_)return"NaN";e=M>>15&Ys,c=8+(M>>14&1)}else c=M>>14&7,e=M>>17&Ys;var X=e-Gs;if(h.parts[0]=(M&16383)+((c&15)<<14),h.parts[1]=D,h.parts[2]=S,h.parts[3]=I,h.parts[0]===0&&h.parts[1]===0&&h.parts[2]===0&&h.parts[3]===0)a=!0;else for(_=3;_>=0;_--){var H=0,Q=b_(h);if(h=Q.quotient,H=Q.rem.low,!!H)for(f=8;f>=0;f--)i[_*9+f]=H%10,H=Math.floor(H/10)}if(a)n=1,i[s]=0;else for(n=36;!i[s];)n=n-1,s=s+1;var mt=n-1+X;if(mt>=34||mt<=-7||X>0){if(n>34)return d.push("".concat(0)),X>0?d.push("E+".concat(X)):X<0&&d.push("E".concat(X)),d.join("");d.push("".concat(i[s++])),n=n-1,n&&d.push(".");for(var o=0;o<n;o++)d.push("".concat(i[s++]));d.push("E"),mt>0?d.push("+".concat(mt)):d.push("".concat(mt))}else if(X>=0)for(var o=0;o<n;o++)d.push("".concat(i[s++]));else{var vt=n+X;if(vt>0)for(var o=0;o<vt;o++)d.push("".concat(i[s++]));else d.push("0");for(d.push(".");vt++<0;)d.push("0");for(var o=0;o<n-Math.max(vt-1,0);o++)d.push("".concat(i[s++]))}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(yo.prototype,"_bsontype",{value:"Decimal128"});var Ei=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 i=parseFloat(e.$numberDouble);return n&&n.relaxed?i:new t(i)},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(Ei.prototype,"_bsontype",{value:"Double"});var xi=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(xi.prototype,"_bsontype",{value:"Int32"});var bo=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(bo.prototype,"_bsontype",{value:"MaxKey"});var wo=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(wo.prototype,"_bsontype",{value:"MinKey"});var x_=new RegExp("^[0-9a-fA-F]{24}$"),Re=null,he=Symbol("id"),qt=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 Nt("Argument passed in must have an id that is of type string or Buffer");"toHexString"in e&&typeof e.toHexString=="function"?n=wt.from(e.toHexString(),"hex"):n=e.id}else n=e;if(n==null||typeof n=="number")this[he]=t.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)this[he]=n instanceof wt?n:si(n);else if(typeof n=="string")if(n.length===12){var i=wt.from(n);if(i.byteLength===12)this[he]=i;else throw new Nt("Argument passed in must be a string of 12 bytes")}else if(n.length===24&&x_.test(n))this[he]=wt.from(n,"hex");else throw new Nt("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new Nt("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[he]},set:function(e){this[he]=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(),i=wt.alloc(12);return i.writeUInt32BE(e,0),Re===null&&(Re=Al(5)),i[4]=Re[0],i[5]=Re[1],i[6]=Re[2],i[7]=Re[3],i[8]=Re[4],i[11]=n&255,i[10]=n>>8&255,i[9]=n>>16&255,i},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[he][11]===e[he][11]&&this[he].equals(e[he]);if(typeof e=="string"&&t.isValid(e)&&e.length===12&&vo(this.id))return e===wt.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 wt.from(e).equals(this.id);if(typeof e=="object"&&"toHexString"in e&&typeof e.toHexString=="function"){var n=e.toHexString(),i=this.toHexString().toLowerCase();return typeof n=="string"&&n.toLowerCase()===i}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=wt.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 Nt("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new t(wt.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(qt.prototype,"generate",{value:bi(function(t){return qt.generate(t)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(qt.prototype,"getInc",{value:bi(function(){return qt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(qt.prototype,"get_inc",{value:bi(function(){return qt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(qt,"get_inc",{value:bi(function(){return qt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(qt.prototype,"_bsontype",{value:"ObjectID"});function S_(t){return t.split("").sort().join("")}var Cn=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this.pattern=e,this.options=S_(n??""),this.pattern.indexOf("\0")!==-1)throw new je("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new je("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var i=0;i<this.options.length;i++)if(!(this.options[i]==="i"||this.options[i]==="m"||this.options[i]==="x"||this.options[i]==="l"||this.options[i]==="s"||this.options[i]==="u"))throw new je("The regular expression option [".concat(this.options[i],"] 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 Nt("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(e)))},t}();Object.defineProperty(Cn.prototype,"_bsontype",{value:"BSONRegExp"});var Eo=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(Eo.prototype,"_bsontype",{value:"Symbol"});var C_=et,jl=function(t){yi(e,t);function e(n,i){var o=this;return o instanceof e?(et.isLong(n)?o=t.call(this,n.low,n.high,!0)||this:kn(n)&&typeof n.t<"u"&&typeof n.i<"u"?o=t.call(this,n.i,n.t,!0)||this:o=t.call(this,n,i,!0)||this,Object.defineProperty(o,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),o):new e(n,i)}return e.prototype.toJSON=function(){return{$timestamp:this.toString()}},e.fromInt=function(n){return new e(et.fromInt(n,!0))},e.fromNumber=function(n){return new e(et.fromNumber(n,!0))},e.fromBits=function(n,i){return new e(n,i)},e.fromString=function(n,i){return new e(et.fromString(n,!0,i))},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=et.MAX_UNSIGNED_VALUE,e}(C_);function T_(t){return kn(t)&&Reflect.has(t,"_bsontype")&&typeof t._bsontype=="string"}var Fl=2147483647,Vl=-2147483648,Ul=9223372036854776e3,$l=-9223372036854776e3,O_={$oid:qt,$binary:Fe,$uuid:Fe,$symbol:Eo,$numberInt:xi,$numberDecimal:yo,$numberDouble:Ei,$numberLong:et,$minKey:wo,$maxKey:bo,$regex:Cn,$regularExpression:Cn,$timestamp:jl};function Hl(t,e){if(e===void 0&&(e={}),typeof t=="number"){if(e.relaxed||e.legacy)return t;if(Math.floor(t)===t){if(t>=Vl&&t<=Fl)return new xi(t);if(t>=$l&&t<=Ul)return et.fromNumber(t)}return new Ei(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}),i=0;i<n.length;i++){var o=O_[n[i]];if(o)return o.fromExtendedJSON(t,e)}if(t.$date!=null){var s=t.$date,a=new Date;return e.legacy?typeof s=="number"?a.setTime(s):typeof s=="string"&&a.setTime(Date.parse(s)):typeof s=="string"?a.setTime(Date.parse(s)):et.isLong(s)?a.setTime(s.toNumber()):typeof s=="number"&&e.relaxed&&a.setTime(s),a}if(t.$code!=null){var c=Object.assign({},t);return t.$scope&&(c.$scope=Hl(t.$scope)),wi.fromExtendedJSON(t)}if(u_(t)||t.$dbPointer){var h=t.$ref?t:t.$dbPointer;if(h instanceof Sn)return h;var f=Object.keys(h).filter(function(d){return d.startsWith("$")}),_=!0;if(f.forEach(function(d){["$ref","$id","$db"].indexOf(d)===-1&&(_=!1)}),_)return Sn.fromExtendedJSON(h)}return t}function I_(t,e){return t.map(function(n,i){e.seenObjects.push({propertyName:"index ".concat(i),obj:null});try{return Ce(n,e)}finally{e.seenObjects.pop()}})}function Js(t){var e=t.toISOString();return t.getUTCMilliseconds()!==0?e:e.slice(0,-5)+"Z"}function Ce(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 i=e.seenObjects.map(function(L){return L.propertyName}),o=i.slice(0,n).map(function(L){return"".concat(L," -> ")}).join(""),s=i[n],a=" -> "+i.slice(n+1,i.length-1).map(function(L){return"".concat(L," -> ")}).join(""),c=i[i.length-1],h=" ".repeat(o.length+s.length/2),f="-".repeat(a.length+(s.length+c.length)/2-1);throw new Nt(`Converting circular structure to EJSON:
|
|
32
|
+
`),n=e.length===1?null:setInterval(()=>{this.featureSlider.update(i=>(0,r.b)((0,r.a)({},i),{previousIndex:i.currentIndex,currentIndex:(i.currentIndex+1)%i.features.length}))},3e3);this.featureSlider.set({intervalRef:n,currentIndex:0,features:e})}replaceVariables(e){return e?(0,vg.render)(e,this.currentItem.getTemplateVariables()):""}static \u0275fac=function(e){return new(e||Sr)};static \u0275cmp=(0,r.na)({type:Sr,selectors:[["cooee-sticky-atc"]],features:[r.ra],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 i=(0,r.Ia)();(0,r.Ea)(0,"div",0),(0,r.sa)(1,Eg,5,3,"div",1),(0,r.Ea)(2,"div",2)(3,"button",3),(0,r.Ja)("click",function(){return(0,r.N)(i),(0,r.O)(n.addToCart())}),(0,r.Qa)(4,"Add To Cart"),(0,r.Fa)(),(0,r.Ta)(5),(0,r.sa)(6,Sg,3,0,"div",4),(0,r.Fa)()()}if(e&2){(0,r.fa)(),(0,r.Aa)(n.selectedVariant()&&n.stickyATCConfig.showProductInfo?1:-1),(0,r.fa)(4);let i=(0,r.Ua)(n.featureSlider());(0,r.fa)(),(0,r.Aa)(i.features.length?6:-1)}},dependencies:[r.nb],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}"]})},cl,Dt,ul,hl,Me,Ts,dl,Cr,pl,lo,Tr,Or,Tg,Ir={},fl=[],Og=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,co=Array.isArray;function Te(t,e){for(var n in e)t[n]=e[n];return t}function uo(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Bi(t,e,n,i,o){var s={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++ul,__i:-1,__u:0};return o==null&&Dt.vnode!=null&&Dt.vnode(s),s}function ho(t){return t.children}function vn(t,e){this.props=t,this.context=e}function sn(t,e){if(e==null)return t.__?sn(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?sn(t):null}function gl(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return gl(t)}}function Os(t){(!t.__d&&(t.__d=!0)&&Me.push(t)&&!ii.__r++||Ts!==Dt.debounceRendering)&&((Ts=Dt.debounceRendering)||dl)(ii)}function ii(){var t,e,n,i,o,s,a,c;for(Me.sort(Cr);t=Me.shift();)t.__d&&(e=Me.length,i=void 0,s=(o=(n=t).__v).__e,a=[],c=[],n.__P&&((i=Te({},o)).__v=o.__v+1,Dt.vnode&&Dt.vnode(i),vl(n.__P,i,o,n.__n,n.__P.namespaceURI,32&o.__u?[s]:null,a,s??sn(o),!!(32&o.__u),c),i.__v=o.__v,i.__.__k[i.__i]=i,Rg(a,i,c),i.__e!=s&&gl(i)),Me.length>e&&Me.sort(Cr));ii.__r=0}function _l(t,e,n,i,o,s,a,c,h,f,_){var d,E,I,S,D,M,L=i&&i.__k||fl,z=e.length;for(h=Ig(n,e,L,h,z),d=0;d<z;d++)(I=n.__k[d])!=null&&(E=I.__i===-1?Ir:L[I.__i]||Ir,I.__i=d,M=vl(t,I,E,o,s,a,c,h,f,_),S=I.__e,I.ref&&E.ref!=I.ref&&(E.ref&&po(E.ref,null,I),_.push(I.ref,I.__c||S,I)),D==null&&S!=null&&(D=S),4&I.__u||E.__k===I.__k?h=ml(I,h,t):typeof I.type=="function"&&M!==void 0?h=M:S&&(h=S.nextSibling),I.__u&=-7);return n.__e=D,h}function Ig(t,e,n,i,o){var s,a,c,h,f,_=n.length,d=_,E=0;for(t.__k=new Array(o),s=0;s<o;s++)(a=e[s])!=null&&typeof a!="boolean"&&typeof a!="function"?(h=s+E,(a=t.__k[s]=typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?Bi(null,a,null,null,null):co(a)?Bi(ho,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?Bi(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=t,a.__b=t.__b+1,c=null,(f=a.__i=Dg(a,n,h,d))!==-1&&(d--,(c=n[f])&&(c.__u|=2)),c==null||c.__v===null?(f==-1&&E--,typeof a.type!="function"&&(a.__u|=4)):f!=h&&(f==h-1?E--:f==h+1?E++:(f>h?E--:E++,a.__u|=4))):t.__k[s]=null;if(d)for(s=0;s<_;s++)(c=n[s])!=null&&(2&c.__u)==0&&(c.__e==i&&(i=sn(c)),yl(c,c));return i}function ml(t,e,n){var i,o;if(typeof t.type=="function"){for(i=t.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=t,e=ml(i[o],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=sn(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Dg(t,e,n,i){var o,s,a=t.key,c=t.type,h=e[n];if(h===null||h&&a==h.key&&c===h.type&&(2&h.__u)==0)return n;if(i>(h!=null&&(2&h.__u)==0?1:0))for(o=n-1,s=n+1;o>=0||s<e.length;){if(o>=0){if((h=e[o])&&(2&h.__u)==0&&a==h.key&&c===h.type)return o;o--}if(s<e.length){if((h=e[s])&&(2&h.__u)==0&&a==h.key&&c===h.type)return s;s++}}return-1}function Is(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Og.test(e)?n:n+"px"}function Hn(t,e,n,i,o){var s;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof i=="string"&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||Is(t.style,e,"");if(n)for(e in n)i&&n[e]===i[e]||Is(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(pl,"$1")),e=e.toLowerCase()in t||e=="onFocusOut"||e=="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?i?n.u=i.u:(n.u=lo,t.addEventListener(e,s?Or:Tr,s)):t.removeEventListener(e,s?Or:Tr,s);else{if(o=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Ds(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=lo++;else if(e.t<n.u)return;return n(Dt.event?Dt.event(e):e)}}}function vl(t,e,n,i,o,s,a,c,h,f){var _,d,E,I,S,D,M,L,z,X,H,Q,mt,vt,j,ct,ot,st=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(h=!!(32&n.__u),s=[c=e.__e=n.__e]),(_=Dt.__b)&&_(e);t:if(typeof st=="function")try{if(L=e.props,z="prototype"in st&&st.prototype.render,X=(_=st.contextType)&&i[_.__c],H=_?X?X.props.value:_.__:i,n.__c?M=(d=e.__c=n.__c).__=d.__E:(z?e.__c=d=new st(L,H):(e.__c=d=new vn(L,H),d.constructor=st,d.render=kg),X&&X.sub(d),d.props=L,d.state||(d.state={}),d.context=H,d.__n=i,E=d.__d=!0,d.__h=[],d._sb=[]),z&&d.__s==null&&(d.__s=d.state),z&&st.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Te({},d.__s)),Te(d.__s,st.getDerivedStateFromProps(L,d.__s))),I=d.props,S=d.state,d.__v=e,E)z&&st.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),z&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(z&&st.getDerivedStateFromProps==null&&L!==I&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(L,H),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(L,d.__s,H)===!1||e.__v==n.__v)){for(e.__v!=n.__v&&(d.props=L,d.state=d.__s,d.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(ft){ft&&(ft.__=e)}),Q=0;Q<d._sb.length;Q++)d.__h.push(d._sb[Q]);d._sb=[],d.__h.length&&a.push(d);break t}d.componentWillUpdate!=null&&d.componentWillUpdate(L,d.__s,H),z&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(I,S,D)})}if(d.context=H,d.props=L,d.__P=t,d.__e=!1,mt=Dt.__r,vt=0,z){for(d.state=d.__s,d.__d=!1,mt&&mt(e),_=d.render(d.props,d.state,d.context),j=0;j<d._sb.length;j++)d.__h.push(d._sb[j]);d._sb=[]}else do d.__d=!1,mt&&mt(e),_=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++vt<25);d.state=d.__s,d.getChildContext!=null&&(i=Te(Te({},i),d.getChildContext())),z&&!E&&d.getSnapshotBeforeUpdate!=null&&(D=d.getSnapshotBeforeUpdate(I,S)),c=_l(t,co(ct=_!=null&&_.type===ho&&_.key==null?_.props.children:_)?ct:[ct],e,n,i,o,s,a,c,h,f),d.base=e.__e,e.__u&=-161,d.__h.length&&a.push(d),M&&(d.__E=d.__=null)}catch(ft){if(e.__v=null,h||s!=null)if(ft.then){for(e.__u|=h?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;s[s.indexOf(c)]=null,e.__e=c}else for(ot=s.length;ot--;)uo(s[ot]);else e.__e=n.__e,e.__k=n.__k;Dt.__e(ft,e,n)}else s==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):c=e.__e=Pg(n.__e,e,n,i,o,s,a,h,f);return(_=Dt.diffed)&&_(e),128&e.__u?void 0:c}function Rg(t,e,n){for(var i=0;i<n.length;i++)po(n[i],n[++i],n[++i]);Dt.__c&&Dt.__c(e,t),t.some(function(o){try{t=o.__h,o.__h=[],t.some(function(s){s.call(o)})}catch(s){Dt.__e(s,o.__v)}})}function Pg(t,e,n,i,o,s,a,c,h){var f,_,d,E,I,S,D,M=n.props,L=e.props,z=e.type;if(z=="svg"?o="http://www.w3.org/2000/svg":z=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),s!=null){for(f=0;f<s.length;f++)if((I=s[f])&&"setAttribute"in I==!!z&&(z?I.localName==z:I.nodeType==3)){t=I,s[f]=null;break}}if(t==null){if(z==null)return document.createTextNode(L);t=document.createElementNS(o,z,L.is&&L),c&&(Dt.__m&&Dt.__m(e,s),c=!1),s=null}if(z===null)M===L||c&&t.data===L||(t.data=L);else{if(s=s&&cl.call(t.childNodes),M=n.props||Ir,!c&&s!=null)for(M={},f=0;f<t.attributes.length;f++)M[(I=t.attributes[f]).name]=I.value;for(f in M)if(I=M[f],f!="children"){if(f=="dangerouslySetInnerHTML")d=I;else if(!(f in L)){if(f=="value"&&"defaultValue"in L||f=="checked"&&"defaultChecked"in L)continue;Hn(t,f,null,I,o)}}for(f in L)I=L[f],f=="children"?E=I:f=="dangerouslySetInnerHTML"?_=I:f=="value"?S=I:f=="checked"?D=I:c&&typeof I!="function"||M[f]===I||Hn(t,f,I,M[f],o);if(_)c||d&&(_.__html===d.__html||_.__html===t.innerHTML)||(t.innerHTML=_.__html),e.__k=[];else if(d&&(t.innerHTML=""),_l(t,co(E)?E:[E],e,n,i,z=="foreignObject"?"http://www.w3.org/1999/xhtml":o,s,a,s?s[0]:n.__k&&sn(n,0),c,h),s!=null)for(f=s.length;f--;)uo(s[f]);c||(f="value",z=="progress"&&S==null?t.removeAttribute("value"):S!==void 0&&(S!==t[f]||z=="progress"&&!S||z=="option"&&S!==M[f])&&Hn(t,f,S,M[f],o),f="checked",D!==void 0&&D!==t[f]&&Hn(t,f,D,M[f],o))}return t}function po(t,e,n){try{if(typeof t=="function"){var i=typeof t.__u=="function";i&&t.__u(),i&&e==null||(t.__u=t(e))}else t.current=e}catch(o){Dt.__e(o,n)}}function yl(t,e,n){var i,o;if(Dt.unmount&&Dt.unmount(t),(i=t.ref)&&(i.current&&i.current!==t.__e||po(i,null,e)),(i=t.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(s){Dt.__e(s,e)}i.base=i.__P=null}if(i=t.__k)for(o=0;o<i.length;o++)i[o]&&yl(i[o],e,n||typeof t.type!="function");n||uo(t.__e),t.__c=t.__=t.__e=void 0}function kg(t,e,n){return this.constructor(t,n)}cl=fl.slice,Dt={__e:function(t,e,n,i){for(var o,s,a;e=e.__;)if((o=e.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(t)),a=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(t,i||{}),a=o.__d),a)return o.__E=o}catch(c){t=c}throw t}},ul=0,hl=function(t){return t!=null&&t.constructor==null},vn.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Te({},this.state),typeof t=="function"&&(t=t(Te({},n),this.props)),t&&Te(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Os(this))},vn.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Os(this))},vn.prototype.render=ho,Me=[],dl=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Cr=function(t,e){return t.__v.__b-e.__v.__b},ii.__r=0,pl=/(PointerCapture)$|Capture$/i,lo=0,Tr=Ds(!1),Or=Ds(!0),Tg=0;var Dr,Yt,ji,Rs,Ps=0,bl=[],Bt=Dt,ks=Bt.__b,Ns=Bt.__r,As=Bt.diffed,Ms=Bt.__c,Ls=Bt.unmount,Bs=Bt.__;function Ng(t,e){Bt.__h&&Bt.__h(Yt,t,Ps||e),Ps=0;var n=Yt.__H||(Yt.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function wl(t,e){var n=Ng(Dr++,7);return Lg(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Ag(){for(var t;t=bl.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Kn),t.__H.__h.forEach(Rr),t.__H.__h=[]}catch(e){t.__H.__h=[],Bt.__e(e,t.__v)}}Bt.__b=function(t){Yt=null,ks&&ks(t)},Bt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Bs&&Bs(t,e)},Bt.__r=function(t){Ns&&Ns(t),Dr=0;var e=(Yt=t.__c).__H;e&&(ji===Yt?(e.__h=[],Yt.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(Kn),e.__h.forEach(Rr),e.__h=[],Dr=0)),ji=Yt},Bt.diffed=function(t){As&&As(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(bl.push(e)!==1&&Rs===Bt.requestAnimationFrame||((Rs=Bt.requestAnimationFrame)||Mg)(Ag)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),ji=Yt=null},Bt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Kn),n.__h=n.__h.filter(function(i){return!i.__||Rr(i)})}catch(i){e.some(function(o){o.__h&&(o.__h=[])}),e=[],Bt.__e(i,n.__v)}}),Ms&&Ms(t,e)},Bt.unmount=function(t){Ls&&Ls(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(i){try{Kn(i)}catch(o){e=o}}),n.__H=void 0,e&&Bt.__e(e,n.__v))};var js=typeof requestAnimationFrame=="function";function Mg(t){var e,n=function(){clearTimeout(i),js&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,100);js&&(e=requestAnimationFrame(n))}function Kn(t){var e=Yt,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Yt=e}function Rr(t){var e=Yt;t.__c=t.__(),Yt=e}function Lg(t,e){return!t||t.length!==e.length||e.some(function(n,i){return n!==t[i]})}var Bg=Symbol.for("preact-signals");function fo(){if(tn>1)tn--;else{for(var t,e=!1;yn!==void 0;){var n=yn;for(yn=void 0,Pr++;n!==void 0;){var i=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Sl(n))try{n.c()}catch(o){e||(t=o,e=!0)}n=i}}if(Pr=0,tn--,e)throw t}}var Tt=void 0,yn=void 0,tn=0,Pr=0,ri=0;function El(t){if(Tt!==void 0){var e=t.n;if(e===void 0||e.t!==Tt)return e={i:0,S:t,p:Tt.s,n:void 0,t:Tt,e:void 0,x:void 0,r:e},Tt.s!==void 0&&(Tt.s.n=e),Tt.s=e,t.n=e,32&Tt.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=Tt.s,e.n=void 0,Tt.s.n=e,Tt.s=e),e}}function $t(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}$t.prototype.brand=Bg;$t.prototype.h=function(){return!0};$t.prototype.S=function(t){this.t!==t&&t.e===void 0&&(t.x=this.t,this.t!==void 0&&(this.t.e=t),this.t=t)};$t.prototype.U=function(t){if(this.t!==void 0){var e=t.e,n=t.x;e!==void 0&&(e.x=n,t.e=void 0),n!==void 0&&(n.e=e,t.x=void 0),t===this.t&&(this.t=n)}};$t.prototype.subscribe=function(t){var e=this;return _o(function(){var n=e.value,i=Tt;Tt=void 0;try{t(n)}finally{Tt=i}})};$t.prototype.valueOf=function(){return this.value};$t.prototype.toString=function(){return this.value+""};$t.prototype.toJSON=function(){return this.value};$t.prototype.peek=function(){var t=Tt;Tt=void 0;try{return this.value}finally{Tt=t}};Object.defineProperty($t.prototype,"value",{get:function(){var t=El(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(Pr>100)throw new Error("Cycle detected");this.v=t,this.i++,ri++,tn++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{fo()}}}});function xl(t){return new $t(t)}function Sl(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function Cl(t){for(var e=t.s;e!==void 0;e=e.n){var n=e.S.n;if(n!==void 0&&(e.r=n),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function Tl(t){for(var e=t.s,n=void 0;e!==void 0;){var i=e.p;e.i===-1?(e.S.U(e),i!==void 0&&(i.n=e.n),e.n!==void 0&&(e.n.p=i)):n=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=i}t.s=n}function cn(t){$t.call(this,void 0),this.x=t,this.s=void 0,this.g=ri-1,this.f=4}(cn.prototype=new $t).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===ri))return!0;if(this.g=ri,this.f|=1,this.i>0&&!Sl(this))return this.f&=-2,!0;var t=Tt;try{Cl(this),Tt=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return Tt=t,Tl(this),this.f&=-2,!0};cn.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}$t.prototype.S.call(this,t)};cn.prototype.U=function(t){if(this.t!==void 0&&($t.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}};cn.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}};Object.defineProperty(cn.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=El(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function jg(t){return new cn(t)}function Ol(t){var e=t.u;if(t.u=void 0,typeof e=="function"){tn++;var n=Tt;Tt=void 0;try{e()}catch(i){throw t.f&=-2,t.f|=8,go(t),i}finally{Tt=n,fo()}}}function go(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,Ol(t)}function Fg(t){if(Tt!==this)throw new Error("Out-of-order effect");Tl(this),Tt=t,this.f&=-2,8&this.f&&go(this),fo()}function Pn(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Pn.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}};Pn.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Ol(this),Cl(this),tn++;var t=Tt;return Tt=this,Fg.bind(this,t)};Pn.prototype.N=function(){2&this.f||(this.f|=2,this.o=yn,yn=this)};Pn.prototype.d=function(){this.f|=8,1&this.f||go(this)};function _o(t){var e=new Pn(t);try{e.c()}catch(n){throw e.d(),n}return e.d.bind(e)}var mo,Fi;function un(t,e){Dt[t]=e.bind(null,Dt[t]||function(){})}function oi(t){Fi&&Fi(),Fi=t&&t.S()}function Il(t){var e=this,n=t.data,i=Ug(n);i.value=n;var o=wl(function(){for(var s=e.__v;s=s.__;)if(s.__c){s.__c.__$f|=4;break}return e.__$u.c=function(){var a,c=e.__$u.S(),h=o.value;c(),hl(h)||((a=e.base)==null?void 0:a.nodeType)!==3?(e.__$f|=1,e.setState({})):e.base.data=h},jg(function(){var a=i.value.value;return a===0?0:a===!0?"":a||""})},[]);return o.value}Il.displayName="_st";Object.defineProperties($t.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Il},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});un("__b",function(t,e){if(typeof e.type=="string"){var n,i=e.props;for(var o in i)if(o!=="children"){var s=i[o];s instanceof $t&&(n||(e.__np=n={}),n[o]=s,i[o]=s.peek())}}t(e)});un("__r",function(t,e){oi();var n,i=e.__c;i&&(i.__$f&=-2,(n=i.__$u)===void 0&&(i.__$u=n=function(o){var s;return _o(function(){s=this}),s.c=function(){i.__$f|=1,i.setState({})},s}())),mo=i,oi(n),t(e)});un("__e",function(t,e,n,i){oi(),mo=void 0,t(e,n,i)});un("diffed",function(t,e){oi(),mo=void 0;var n;if(typeof e.type=="string"&&(n=e.__e)){var i=e.__np,o=e.props;if(i){var s=n.U;if(s)for(var a in s){var c=s[a];c!==void 0&&!(a in i)&&(c.d(),s[a]=void 0)}else n.U=s={};for(var h in i){var f=s[h],_=i[h];f===void 0?(f=Vg(n,h,_,o),s[h]=f):f.o(_,o)}}}t(e)});function Vg(t,e,n,i){var o=e in t&&t.ownerSVGElement===void 0,s=xl(n);return{o:function(a,c){s.value=a,i=c},d:_o(function(){var a=s.value.value;i[e]!==a&&(i[e]=a,o?t[e]=a:a?t.setAttribute(e,a):t.removeAttribute(e))})}}un("unmount",function(t,e){if(typeof e.type=="string"){var n=e.__e;if(n){var i=n.U;if(i){n.U=void 0;for(var o in i){var s=i[o];s&&s.d()}}}}else{var a=e.__c;if(a){var c=a.__$u;c&&(a.__$u=void 0,c.d())}}t(e)});un("__h",function(t,e,n,i){(i<3||i===9)&&(e.__$f|=2),t(e,n,i)});vn.prototype.shouldComponentUpdate=function(t,e){var n=this.__$u,i=n&&n.s!==void 0;for(var o in e)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){if(!(i||2&this.__$f||4&this.__$f)||1&this.__$f)return!0}else if(!(i||4&this.__$f)||3&this.__$f)return!0;for(var s in t)if(s!=="__source"&&t[s]!==this.props[s])return!0;for(var a in this.props)if(!(a in t))return!0;return!1};function Ug(t){return wl(function(){return xl(t)},[])}var Dl=(t=>(t.SIMPLE="SIMPLE",t.SWIPER="SWIPER",t.STORY="STORY",t.FLOATING_POPUP="FLOATING_POPUP",t))(Dl||{}),Rl=(t=>(t.ON="ON",t.OFF="OFF",t.ON_HOVER="ON_HOVER",t))(Rl||{}),Pl=(t=>(t.FIRST_ITEM="FIRST_ITEM",t.BADGE="BADGE",t.NONE="NONE",t))(Pl||{});function $g(t,e){return e={exports:{}},t(e,e.exports),e.exports}var Hg=qg,zg=Yg,Wg=Xg,pe=[],Qt=[],Gg=typeof Uint8Array<"u"?Uint8Array:Array,Vi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(De=0,Fs=Vi.length;De<Fs;++De)pe[De]=Vi[De],Qt[Vi.charCodeAt(De)]=De;var De,Fs;Qt[45]=62;Qt[95]=63;function kl(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 i=n===e?0:4-n%4;return[n,i]}function qg(t){var e=kl(t),n=e[0],i=e[1];return(n+i)*3/4-i}function Zg(t,e,n){return(e+n)*3/4-n}function Yg(t){var e,n=kl(t),i=n[0],o=n[1],s=new Gg(Zg(t,i,o)),a=0,c=o>0?i-4:i,h;for(h=0;h<c;h+=4)e=Qt[t.charCodeAt(h)]<<18|Qt[t.charCodeAt(h+1)]<<12|Qt[t.charCodeAt(h+2)]<<6|Qt[t.charCodeAt(h+3)],s[a++]=e>>16&255,s[a++]=e>>8&255,s[a++]=e&255;return o===2&&(e=Qt[t.charCodeAt(h)]<<2|Qt[t.charCodeAt(h+1)]>>4,s[a++]=e&255),o===1&&(e=Qt[t.charCodeAt(h)]<<10|Qt[t.charCodeAt(h+1)]<<4|Qt[t.charCodeAt(h+2)]>>2,s[a++]=e>>8&255,s[a++]=e&255),s}function Kg(t){return pe[t>>18&63]+pe[t>>12&63]+pe[t>>6&63]+pe[t&63]}function Jg(t,e,n){for(var i,o=[],s=e;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),o.push(Kg(i));return o.join("")}function Xg(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,c=n-i;a<c;a+=s)o.push(Jg(t,a,a+s>c?c:a+s));return i===1?(e=t[n-1],o.push(pe[e>>2]+pe[e<<4&63]+"==")):i===2&&(e=(t[n-2]<<8)+t[n-1],o.push(pe[e>>10]+pe[e>>4&63]+pe[e<<2&63]+"=")),o.join("")}var Ui={byteLength:Hg,toByteArray:zg,fromByteArray:Wg},Qg=function(t,e,n,i,o){var s,a,c=o*8-i-1,h=(1<<c)-1,f=h>>1,_=-7,d=n?o-1:0,E=n?-1:1,I=t[e+d];for(d+=E,s=I&(1<<-_)-1,I>>=-_,_+=c;_>0;s=s*256+t[e+d],d+=E,_-=8);for(a=s&(1<<-_)-1,s>>=-_,_+=i;_>0;a=a*256+t[e+d],d+=E,_-=8);if(s===0)s=1-f;else{if(s===h)return a?NaN:(I?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-f}return(I?-1:1)*a*Math.pow(2,s-i)},t_=function(t,e,n,i,o,s){var a,c,h,f=s*8-o-1,_=(1<<f)-1,d=_>>1,E=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,I=i?0:s-1,S=i?1:-1,D=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,a=_):(a=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-a))<1&&(a--,h*=2),a+d>=1?e+=E/h:e+=E*Math.pow(2,1-d),e*h>=2&&(a++,h/=2),a+d>=_?(c=0,a=_):a+d>=1?(c=(e*h-1)*Math.pow(2,o),a=a+d):(c=e*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;t[n+I]=c&255,I+=S,c/=256,o-=8);for(a=a<<o|c,f+=o;f>0;t[n+I]=a&255,I+=S,a/=256,f-=8);t[n+I-S]|=D*128},Ze={read:Qg,write:t_},vi=$g(function(t,e){var n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=L,e.INSPECT_MAX_BYTES=50;var i=2147483647;e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=o(),!a.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 o(){try{var l=new Uint8Array(1),u={foo:function(){return 42}};return Object.setPrototypeOf(u,Uint8Array.prototype),Object.setPrototypeOf(l,u),l.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function s(l){if(l>i)throw new RangeError('The value "'+l+'" is invalid for option "size"');var u=new Uint8Array(l);return Object.setPrototypeOf(u,a.prototype),u}function a(l,u,p){if(typeof l=="number"){if(typeof u=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(l)}return c(l,u,p)}a.poolSize=8192;function c(l,u,p){if(typeof l=="string")return d(l,u);if(ArrayBuffer.isView(l))return I(l);if(l==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(l));if(tt(l,ArrayBuffer)||l&&tt(l.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(tt(l,SharedArrayBuffer)||l&&tt(l.buffer,SharedArrayBuffer)))return S(l,u,p);if(typeof l=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var w=l.valueOf&&l.valueOf();if(w!=null&&w!==l)return a.from(w,u,p);var P=D(l);if(P)return P;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof l[Symbol.toPrimitive]=="function")return a.from(l[Symbol.toPrimitive]("string"),u,p);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(l))}a.from=function(l,u,p){return c(l,u,p)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function h(l){if(typeof l!="number")throw new TypeError('"size" argument must be of type number');if(l<0)throw new RangeError('The value "'+l+'" is invalid for option "size"')}function f(l,u,p){return h(l),l<=0?s(l):u!==void 0?typeof p=="string"?s(l).fill(u,p):s(l).fill(u):s(l)}a.alloc=function(l,u,p){return f(l,u,p)};function _(l){return h(l),s(l<0?0:M(l)|0)}a.allocUnsafe=function(l){return _(l)},a.allocUnsafeSlow=function(l){return _(l)};function d(l,u){if((typeof u!="string"||u==="")&&(u="utf8"),!a.isEncoding(u))throw new TypeError("Unknown encoding: "+u);var p=z(l,u)|0,w=s(p),P=w.write(l,u);return P!==p&&(w=w.slice(0,P)),w}function E(l){for(var u=l.length<0?0:M(l.length)|0,p=s(u),w=0;w<u;w+=1)p[w]=l[w]&255;return p}function I(l){if(tt(l,Uint8Array)){var u=new Uint8Array(l);return S(u.buffer,u.byteOffset,u.byteLength)}return E(l)}function S(l,u,p){if(u<0||l.byteLength<u)throw new RangeError('"offset" is outside of buffer bounds');if(l.byteLength<u+(p||0))throw new RangeError('"length" is outside of buffer bounds');var w;return u===void 0&&p===void 0?w=new Uint8Array(l):p===void 0?w=new Uint8Array(l,u):w=new Uint8Array(l,u,p),Object.setPrototypeOf(w,a.prototype),w}function D(l){if(a.isBuffer(l)){var u=M(l.length)|0,p=s(u);return p.length===0||l.copy(p,0,0,u),p}if(l.length!==void 0)return typeof l.length!="number"||lt(l.length)?s(0):E(l);if(l.type==="Buffer"&&Array.isArray(l.data))return E(l.data)}function M(l){if(l>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return l|0}function L(l){return+l!=l&&(l=0),a.alloc(+l)}a.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==a.prototype},a.compare=function(l,u){if(tt(l,Uint8Array)&&(l=a.from(l,l.offset,l.byteLength)),tt(u,Uint8Array)&&(u=a.from(u,u.offset,u.byteLength)),!a.isBuffer(l)||!a.isBuffer(u))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(l===u)return 0;for(var p=l.length,w=u.length,P=0,A=Math.min(p,w);P<A;++P)if(l[P]!==u[P]){p=l[P],w=u[P];break}return p<w?-1:w<p?1:0},a.isEncoding=function(l){switch(String(l).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}},a.concat=function(l,u){if(!Array.isArray(l))throw new TypeError('"list" argument must be an Array of Buffers');if(l.length===0)return a.alloc(0);var p;if(u===void 0)for(u=0,p=0;p<l.length;++p)u+=l[p].length;var w=a.allocUnsafe(u),P=0;for(p=0;p<l.length;++p){var A=l[p];if(tt(A,Uint8Array))P+A.length>w.length?a.from(A).copy(w,P):Uint8Array.prototype.set.call(w,A,P);else if(a.isBuffer(A))A.copy(w,P);else throw new TypeError('"list" argument must be an Array of Buffers');P+=A.length}return w};function z(l,u){if(a.isBuffer(l))return l.length;if(ArrayBuffer.isView(l)||tt(l,ArrayBuffer))return l.byteLength;if(typeof l!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(l));var p=l.length,w=arguments.length>2&&arguments[2]===!0;if(!w&&p===0)return 0;for(var P=!1;;)switch(u){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return G(l).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p*2;case"hex":return p>>>1;case"base64":return ht(l).length;default:if(P)return w?-1:G(l).length;u=(""+u).toLowerCase(),P=!0}}a.byteLength=z;function X(l,u,p){var w=!1;if((u===void 0||u<0)&&(u=0),u>this.length||((p===void 0||p>this.length)&&(p=this.length),p<=0)||(p>>>=0,u>>>=0,p<=u))return"";for(l||(l="utf8");;)switch(l){case"hex":return R(this,u,p);case"utf8":case"utf-8":return Ot(this,u,p);case"ascii":return Pt(this,u,p);case"latin1":case"binary":return gt(this,u,p);case"base64":return ft(this,u,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,u,p);default:if(w)throw new TypeError("Unknown encoding: "+l);l=(l+"").toLowerCase(),w=!0}}a.prototype._isBuffer=!0;function H(l,u,p){var w=l[u];l[u]=l[p],l[p]=w}a.prototype.swap16=function(){var l=this.length;if(l%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var u=0;u<l;u+=2)H(this,u,u+1);return this},a.prototype.swap32=function(){var l=this.length;if(l%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var u=0;u<l;u+=4)H(this,u,u+3),H(this,u+1,u+2);return this},a.prototype.swap64=function(){var l=this.length;if(l%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var u=0;u<l;u+=8)H(this,u,u+7),H(this,u+1,u+6),H(this,u+2,u+5),H(this,u+3,u+4);return this},a.prototype.toString=function(){var l=this.length;return l===0?"":arguments.length===0?Ot(this,0,l):X.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(l){if(!a.isBuffer(l))throw new TypeError("Argument must be a Buffer");return this===l?!0:a.compare(this,l)===0},a.prototype.inspect=function(){var l="",u=e.INSPECT_MAX_BYTES;return l=this.toString("hex",0,u).replace(/(.{2})/g,"$1 ").trim(),this.length>u&&(l+=" ... "),"<Buffer "+l+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(l,u,p,w,P){if(tt(l,Uint8Array)&&(l=a.from(l,l.offset,l.byteLength)),!a.isBuffer(l))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(l));if(u===void 0&&(u=0),p===void 0&&(p=l?l.length:0),w===void 0&&(w=0),P===void 0&&(P=this.length),u<0||p>l.length||w<0||P>this.length)throw new RangeError("out of range index");if(w>=P&&u>=p)return 0;if(w>=P)return-1;if(u>=p)return 1;if(u>>>=0,p>>>=0,w>>>=0,P>>>=0,this===l)return 0;for(var A=P-w,Z=p-u,J=Math.min(A,Z),yt=this.slice(w,P),dt=l.slice(u,p),bt=0;bt<J;++bt)if(yt[bt]!==dt[bt]){A=yt[bt],Z=dt[bt];break}return A<Z?-1:Z<A?1:0};function Q(l,u,p,w,P){if(l.length===0)return-1;if(typeof p=="string"?(w=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),p=+p,lt(p)&&(p=P?0:l.length-1),p<0&&(p=l.length+p),p>=l.length){if(P)return-1;p=l.length-1}else if(p<0)if(P)p=0;else return-1;if(typeof u=="string"&&(u=a.from(u,w)),a.isBuffer(u))return u.length===0?-1:mt(l,u,p,w,P);if(typeof u=="number")return u=u&255,typeof Uint8Array.prototype.indexOf=="function"?P?Uint8Array.prototype.indexOf.call(l,u,p):Uint8Array.prototype.lastIndexOf.call(l,u,p):mt(l,[u],p,w,P);throw new TypeError("val must be string, number or Buffer")}function mt(l,u,p,w,P){var A=1,Z=l.length,J=u.length;if(w!==void 0&&(w=String(w).toLowerCase(),w==="ucs2"||w==="ucs-2"||w==="utf16le"||w==="utf-16le")){if(l.length<2||u.length<2)return-1;A=2,Z/=2,J/=2,p/=2}function yt(ge,At){return A===1?ge[At]:ge.readUInt16BE(At*A)}var dt;if(P){var bt=-1;for(dt=p;dt<Z;dt++)if(yt(l,dt)===yt(u,bt===-1?0:dt-bt)){if(bt===-1&&(bt=dt),dt-bt+1===J)return bt*A}else bt!==-1&&(dt-=dt-bt),bt=-1}else for(p+J>Z&&(p=Z-J),dt=p;dt>=0;dt--){for(var _t=!0,jt=0;jt<J;jt++)if(yt(l,dt+jt)!==yt(u,jt)){_t=!1;break}if(_t)return dt}return-1}a.prototype.includes=function(l,u,p){return this.indexOf(l,u,p)!==-1},a.prototype.indexOf=function(l,u,p){return Q(this,l,u,p,!0)},a.prototype.lastIndexOf=function(l,u,p){return Q(this,l,u,p,!1)};function vt(l,u,p,w){p=Number(p)||0;var P=l.length-p;w?(w=Number(w),w>P&&(w=P)):w=P;var A=u.length;w>A/2&&(w=A/2);for(var Z=0;Z<w;++Z){var J=parseInt(u.substr(Z*2,2),16);if(lt(J))return Z;l[p+Z]=J}return Z}function j(l,u,p,w){return q(G(u,l.length-p),l,p,w)}function ct(l,u,p,w){return q(it(u),l,p,w)}function ot(l,u,p,w){return q(ht(u),l,p,w)}function st(l,u,p,w){return q(at(u,l.length-p),l,p,w)}a.prototype.write=function(l,u,p,w){if(u===void 0)w="utf8",p=this.length,u=0;else if(p===void 0&&typeof u=="string")w=u,p=this.length,u=0;else if(isFinite(u))u=u>>>0,isFinite(p)?(p=p>>>0,w===void 0&&(w="utf8")):(w=p,p=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var P=this.length-u;if((p===void 0||p>P)&&(p=P),l.length>0&&(p<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");w||(w="utf8");for(var A=!1;;)switch(w){case"hex":return vt(this,l,u,p);case"utf8":case"utf-8":return j(this,l,u,p);case"ascii":case"latin1":case"binary":return ct(this,l,u,p);case"base64":return ot(this,l,u,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return st(this,l,u,p);default:if(A)throw new TypeError("Unknown encoding: "+w);w=(""+w).toLowerCase(),A=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ft(l,u,p){return u===0&&p===l.length?Ui.fromByteArray(l):Ui.fromByteArray(l.slice(u,p))}function Ot(l,u,p){p=Math.min(l.length,p);for(var w=[],P=u;P<p;){var A=l[P],Z=null,J=A>239?4:A>223?3:A>191?2:1;if(P+J<=p){var yt,dt,bt,_t;switch(J){case 1:A<128&&(Z=A);break;case 2:yt=l[P+1],(yt&192)===128&&(_t=(A&31)<<6|yt&63,_t>127&&(Z=_t));break;case 3:yt=l[P+1],dt=l[P+2],(yt&192)===128&&(dt&192)===128&&(_t=(A&15)<<12|(yt&63)<<6|dt&63,_t>2047&&(_t<55296||_t>57343)&&(Z=_t));break;case 4:yt=l[P+1],dt=l[P+2],bt=l[P+3],(yt&192)===128&&(dt&192)===128&&(bt&192)===128&&(_t=(A&15)<<18|(yt&63)<<12|(dt&63)<<6|bt&63,_t>65535&&_t<1114112&&(Z=_t))}}Z===null?(Z=65533,J=1):Z>65535&&(Z-=65536,w.push(Z>>>10&1023|55296),Z=56320|Z&1023),w.push(Z),P+=J}return It(w)}var xt=4096;function It(l){var u=l.length;if(u<=xt)return String.fromCharCode.apply(String,l);for(var p="",w=0;w<u;)p+=String.fromCharCode.apply(String,l.slice(w,w+=xt));return p}function Pt(l,u,p){var w="";p=Math.min(l.length,p);for(var P=u;P<p;++P)w+=String.fromCharCode(l[P]&127);return w}function gt(l,u,p){var w="";p=Math.min(l.length,p);for(var P=u;P<p;++P)w+=String.fromCharCode(l[P]);return w}function R(l,u,p){var w=l.length;(!u||u<0)&&(u=0),(!p||p<0||p>w)&&(p=w);for(var P="",A=u;A<p;++A)P+=rt[l[A]];return P}function O(l,u,p){for(var w=l.slice(u,p),P="",A=0;A<w.length-1;A+=2)P+=String.fromCharCode(w[A]+w[A+1]*256);return P}a.prototype.slice=function(l,u){var p=this.length;l=~~l,u=u===void 0?p:~~u,l<0?(l+=p,l<0&&(l=0)):l>p&&(l=p),u<0?(u+=p,u<0&&(u=0)):u>p&&(u=p),u<l&&(u=l);var w=this.subarray(l,u);return Object.setPrototypeOf(w,a.prototype),w};function v(l,u,p){if(l%1!==0||l<0)throw new RangeError("offset is not uint");if(l+u>p)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(l,u,p){l=l>>>0,u=u>>>0,p||v(l,u,this.length);for(var w=this[l],P=1,A=0;++A<u&&(P*=256);)w+=this[l+A]*P;return w},a.prototype.readUintBE=a.prototype.readUIntBE=function(l,u,p){l=l>>>0,u=u>>>0,p||v(l,u,this.length);for(var w=this[l+--u],P=1;u>0&&(P*=256);)w+=this[l+--u]*P;return w},a.prototype.readUint8=a.prototype.readUInt8=function(l,u){return l=l>>>0,u||v(l,1,this.length),this[l]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(l,u){return l=l>>>0,u||v(l,2,this.length),this[l]|this[l+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(l,u){return l=l>>>0,u||v(l,2,this.length),this[l]<<8|this[l+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(l,u){return l=l>>>0,u||v(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+this[l+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(l,u){return l=l>>>0,u||v(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},a.prototype.readIntLE=function(l,u,p){l=l>>>0,u=u>>>0,p||v(l,u,this.length);for(var w=this[l],P=1,A=0;++A<u&&(P*=256);)w+=this[l+A]*P;return P*=128,w>=P&&(w-=Math.pow(2,8*u)),w},a.prototype.readIntBE=function(l,u,p){l=l>>>0,u=u>>>0,p||v(l,u,this.length);for(var w=u,P=1,A=this[l+--w];w>0&&(P*=256);)A+=this[l+--w]*P;return P*=128,A>=P&&(A-=Math.pow(2,8*u)),A},a.prototype.readInt8=function(l,u){return l=l>>>0,u||v(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},a.prototype.readInt16LE=function(l,u){l=l>>>0,u||v(l,2,this.length);var p=this[l]|this[l+1]<<8;return p&32768?p|4294901760:p},a.prototype.readInt16BE=function(l,u){l=l>>>0,u||v(l,2,this.length);var p=this[l+1]|this[l]<<8;return p&32768?p|4294901760:p},a.prototype.readInt32LE=function(l,u){return l=l>>>0,u||v(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},a.prototype.readInt32BE=function(l,u){return l=l>>>0,u||v(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},a.prototype.readFloatLE=function(l,u){return l=l>>>0,u||v(l,4,this.length),Ze.read(this,l,!0,23,4)},a.prototype.readFloatBE=function(l,u){return l=l>>>0,u||v(l,4,this.length),Ze.read(this,l,!1,23,4)},a.prototype.readDoubleLE=function(l,u){return l=l>>>0,u||v(l,8,this.length),Ze.read(this,l,!0,52,8)},a.prototype.readDoubleBE=function(l,u){return l=l>>>0,u||v(l,8,this.length),Ze.read(this,l,!1,52,8)};function m(l,u,p,w,P,A){if(!a.isBuffer(l))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>P||u<A)throw new RangeError('"value" argument is out of bounds');if(p+w>l.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(l,u,p,w){if(l=+l,u=u>>>0,p=p>>>0,!w){var P=Math.pow(2,8*p)-1;m(this,l,u,p,P,0)}var A=1,Z=0;for(this[u]=l&255;++Z<p&&(A*=256);)this[u+Z]=l/A&255;return u+p},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(l,u,p,w){if(l=+l,u=u>>>0,p=p>>>0,!w){var P=Math.pow(2,8*p)-1;m(this,l,u,p,P,0)}var A=p-1,Z=1;for(this[u+A]=l&255;--A>=0&&(Z*=256);)this[u+A]=l/Z&255;return u+p},a.prototype.writeUint8=a.prototype.writeUInt8=function(l,u,p){return l=+l,u=u>>>0,p||m(this,l,u,1,255,0),this[u]=l&255,u+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(l,u,p){return l=+l,u=u>>>0,p||m(this,l,u,2,65535,0),this[u]=l&255,this[u+1]=l>>>8,u+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(l,u,p){return l=+l,u=u>>>0,p||m(this,l,u,2,65535,0),this[u]=l>>>8,this[u+1]=l&255,u+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(l,u,p){return l=+l,u=u>>>0,p||m(this,l,u,4,4294967295,0),this[u+3]=l>>>24,this[u+2]=l>>>16,this[u+1]=l>>>8,this[u]=l&255,u+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(l,u,p){return l=+l,u=u>>>0,p||m(this,l,u,4,4294967295,0),this[u]=l>>>24,this[u+1]=l>>>16,this[u+2]=l>>>8,this[u+3]=l&255,u+4},a.prototype.writeIntLE=function(l,u,p,w){if(l=+l,u=u>>>0,!w){var P=Math.pow(2,8*p-1);m(this,l,u,p,P-1,-P)}var A=0,Z=1,J=0;for(this[u]=l&255;++A<p&&(Z*=256);)l<0&&J===0&&this[u+A-1]!==0&&(J=1),this[u+A]=(l/Z>>0)-J&255;return u+p},a.prototype.writeIntBE=function(l,u,p,w){if(l=+l,u=u>>>0,!w){var P=Math.pow(2,8*p-1);m(this,l,u,p,P-1,-P)}var A=p-1,Z=1,J=0;for(this[u+A]=l&255;--A>=0&&(Z*=256);)l<0&&J===0&&this[u+A+1]!==0&&(J=1),this[u+A]=(l/Z>>0)-J&255;return u+p},a.prototype.writeInt8=function(l,u,p){return l=+l,u=u>>>0,p||m(this,l,u,1,127,-128),l<0&&(l=255+l+1),this[u]=l&255,u+1},a.prototype.writeInt16LE=function(l,u,p){return l=+l,u=u>>>0,p||m(this,l,u,2,32767,-32768),this[u]=l&255,this[u+1]=l>>>8,u+2},a.prototype.writeInt16BE=function(l,u,p){return l=+l,u=u>>>0,p||m(this,l,u,2,32767,-32768),this[u]=l>>>8,this[u+1]=l&255,u+2},a.prototype.writeInt32LE=function(l,u,p){return l=+l,u=u>>>0,p||m(this,l,u,4,2147483647,-2147483648),this[u]=l&255,this[u+1]=l>>>8,this[u+2]=l>>>16,this[u+3]=l>>>24,u+4},a.prototype.writeInt32BE=function(l,u,p){return l=+l,u=u>>>0,p||m(this,l,u,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[u]=l>>>24,this[u+1]=l>>>16,this[u+2]=l>>>8,this[u+3]=l&255,u+4};function k(l,u,p,w,P,A){if(p+w>l.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function F(l,u,p,w,P){return u=+u,p=p>>>0,P||k(l,u,p,4),Ze.write(l,u,p,w,23,4),p+4}a.prototype.writeFloatLE=function(l,u,p){return F(this,l,u,!0,p)},a.prototype.writeFloatBE=function(l,u,p){return F(this,l,u,!1,p)};function W(l,u,p,w,P){return u=+u,p=p>>>0,P||k(l,u,p,8),Ze.write(l,u,p,w,52,8),p+8}a.prototype.writeDoubleLE=function(l,u,p){return W(this,l,u,!0,p)},a.prototype.writeDoubleBE=function(l,u,p){return W(this,l,u,!1,p)},a.prototype.copy=function(l,u,p,w){if(!a.isBuffer(l))throw new TypeError("argument should be a Buffer");if(p||(p=0),!w&&w!==0&&(w=this.length),u>=l.length&&(u=l.length),u||(u=0),w>0&&w<p&&(w=p),w===p||l.length===0||this.length===0)return 0;if(u<0)throw new RangeError("targetStart out of bounds");if(p<0||p>=this.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("sourceEnd out of bounds");w>this.length&&(w=this.length),l.length-u<w-p&&(w=l.length-u+p);var P=w-p;return this===l&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(u,p,w):Uint8Array.prototype.set.call(l,this.subarray(p,w),u),P},a.prototype.fill=function(l,u,p,w){if(typeof l=="string"){if(typeof u=="string"?(w=u,u=0,p=this.length):typeof p=="string"&&(w=p,p=this.length),w!==void 0&&typeof w!="string")throw new TypeError("encoding must be a string");if(typeof w=="string"&&!a.isEncoding(w))throw new TypeError("Unknown encoding: "+w);if(l.length===1){var P=l.charCodeAt(0);(w==="utf8"&&P<128||w==="latin1")&&(l=P)}}else typeof l=="number"?l=l&255:typeof l=="boolean"&&(l=Number(l));if(u<0||this.length<u||this.length<p)throw new RangeError("Out of range index");if(p<=u)return this;u=u>>>0,p=p===void 0?this.length:p>>>0,l||(l=0);var A;if(typeof l=="number")for(A=u;A<p;++A)this[A]=l;else{var Z=a.isBuffer(l)?l:a.from(l,w),J=Z.length;if(J===0)throw new TypeError('The value "'+l+'" is invalid for argument "value"');for(A=0;A<p-u;++A)this[A+u]=Z[A%J]}return this};var K=/[^+/0-9A-Za-z-_]/g;function Y(l){if(l=l.split("=")[0],l=l.trim().replace(K,""),l.length<2)return"";for(;l.length%4!==0;)l=l+"=";return l}function G(l,u){u=u||1/0;for(var p,w=l.length,P=null,A=[],Z=0;Z<w;++Z){if(p=l.charCodeAt(Z),p>55295&&p<57344){if(!P){if(p>56319){(u-=3)>-1&&A.push(239,191,189);continue}else if(Z+1===w){(u-=3)>-1&&A.push(239,191,189);continue}P=p;continue}if(p<56320){(u-=3)>-1&&A.push(239,191,189),P=p;continue}p=(P-55296<<10|p-56320)+65536}else P&&(u-=3)>-1&&A.push(239,191,189);if(P=null,p<128){if((u-=1)<0)break;A.push(p)}else if(p<2048){if((u-=2)<0)break;A.push(p>>6|192,p&63|128)}else if(p<65536){if((u-=3)<0)break;A.push(p>>12|224,p>>6&63|128,p&63|128)}else if(p<1114112){if((u-=4)<0)break;A.push(p>>18|240,p>>12&63|128,p>>6&63|128,p&63|128)}else throw new Error("Invalid code point")}return A}function it(l){for(var u=[],p=0;p<l.length;++p)u.push(l.charCodeAt(p)&255);return u}function at(l,u){for(var p,w,P,A=[],Z=0;Z<l.length&&!((u-=2)<0);++Z)p=l.charCodeAt(Z),w=p>>8,P=p%256,A.push(P),A.push(w);return A}function ht(l){return Ui.toByteArray(Y(l))}function q(l,u,p,w){for(var P=0;P<w&&!(P+p>=u.length||P>=l.length);++P)u[P+p]=l[P];return P}function tt(l,u){return l instanceof u||l!=null&&l.constructor!=null&&l.constructor.name!=null&&l.constructor.name===u.name}function lt(l){return l!==l}var rt=function(){for(var l="0123456789abcdef",u=new Array(256),p=0;p<16;++p)for(var w=p*16,P=0;P<16;++P)u[w+P]=l[p]+l[P];return u}()}),wt=vi.Buffer;vi.SlowBuffer;vi.INSPECT_MAX_BYTES;vi.kMaxLength;var kr=function(t,e){return kr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])},kr(t,e)};function yi(t,e){kr(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var je=function(t){yi(e,t);function e(n){var i=t.call(this,n)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),e}(Error),Nt=function(t){yi(e,t);function e(n){var i=t.call(this,n)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),e}(TypeError);function zn(t){return t&&t.Math==Math&&t}function Nl(){return zn(typeof globalThis=="object"&&globalThis)||zn(typeof window=="object"&&window)||zn(typeof self=="object"&&self)||zn(typeof global=="object"&&global)||Function("return this")()}function e_(){var t=Nl();return typeof t.navigator=="object"&&t.navigator.product==="ReactNative"}var n_=function(t){var e=e_()?"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=wt.alloc(t),i=0;i<t;++i)n[i]=Math.floor(Math.random()*256);return n},i_=function(){{if(typeof window<"u"){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(wt.alloc(e))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(e){return global.crypto.getRandomValues(wt.alloc(e))}:n_}},Al=i_();function r_(t){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(t))}function vo(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function o_(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function s_(t){return kn(t)&&Object.prototype.toString.call(t)==="[object Date]"}function kn(t){return typeof t=="object"&&t!==null}function bi(t,e){var n=!1;function i(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];return n||(console.warn(e),n=!0),t.apply(this,o)}return i}function si(t){if(ArrayBuffer.isView(t))return wt.from(t.buffer,t.byteOffset,t.byteLength);if(r_(t))return wt.from(t);throw new Nt("Must use either Buffer or TypedArray")}var a_=/^(?:[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,Ml=function(t){return typeof t=="string"&&a_.test(t)},Nr=function(t){if(!Ml(t))throw new Nt('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 wt.from(e,"hex")},Vs=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")},fy=Math.pow(2,63)-1,gy=-Math.pow(2,63),l_=Math.pow(2,53),c_=-Math.pow(2,53),Ll=4,Fe=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 Nt("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=wt.alloc(t.BUFFER_SIZE),this.position=0):(typeof e=="string"?this.buffer=wt.from(e,"binary"):Array.isArray(e)?this.buffer=wt.from(e):this.buffer=si(e),this.position=this.buffer.byteLength)}return t.prototype.put=function(e){if(typeof e=="string"&&e.length!==1)throw new Nt("only accepts single character String");if(typeof e!="number"&&e.length!==1)throw new Nt("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 Nt("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=n;else{var i=wt.alloc(t.BUFFER_SIZE+this.buffer.length);this.buffer.copy(i,0,0,this.buffer.length),this.buffer=i,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 i=wt.alloc(this.buffer.length+e.length);this.buffer.copy(i,0,0,this.buffer.length),this.buffer=i}ArrayBuffer.isView(e)?(this.buffer.set(si(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"),i=Number(this.sub_type).toString(16);return e.legacy?{$binary:n,$type:i.length===1?"0"+i:i}:{$binary:{base64:n,subType:i.length===1?"0"+i:i}}},t.prototype.toUUID=function(){if(this.sub_type===t.SUBTYPE_UUID)return new Us(this.buffer.slice(0,this.position));throw new je('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 i,o;if("$binary"in e?n.legacy&&typeof e.$binary=="string"&&"$type"in e?(o=e.$type?parseInt(e.$type,16):0,i=wt.from(e.$binary,"base64")):typeof e.$binary!="string"&&(o=e.$binary.subType?parseInt(e.$binary.subType,16):0,i=wt.from(e.$binary.base64,"base64")):"$uuid"in e&&(o=4,i=Nr(e.$uuid)),!i)throw new Nt("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return o===Ll?new Us(i):new t(i,o)},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(Fe.prototype,"_bsontype",{value:"Binary"});var $i=16,Us=function(t){yi(e,t);function e(n){var i=this,o,s;if(n==null)o=e.generate();else if(n instanceof e)o=wt.from(n.buffer),s=n.__id;else if(ArrayBuffer.isView(n)&&n.byteLength===$i)o=si(n);else if(typeof n=="string")o=Nr(n);else throw new Nt("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 i=t.call(this,o,Ll)||this,i.__id=s,i}return Object.defineProperty(e.prototype,"id",{get:function(){return this.buffer},set:function(n){this.buffer=n,e.cacheHexString&&(this.__id=Vs(n))},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(n){if(n===void 0&&(n=!0),e.cacheHexString&&this.__id)return this.__id;var i=Vs(this.id,n);return e.cacheHexString&&(this.__id=i),i},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 Fe(this.id,Fe.SUBTYPE_UUID)},e.generate=function(){var n=Al($i);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,wt.from(n)},e.isValid=function(n){return n?n instanceof e?!0:typeof n=="string"?Ml(n):vo(n)?n.length!==$i?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},e.createFromHexString=function(n){var i=Nr(n);return new e(i)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},e}(Fe),wi=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(wi.prototype,"_bsontype",{value:"Code"});function u_(t){return kn(t)&&t.$id!=null&&typeof t.$ref=="string"&&(t.$db==null||typeof t.$db=="string")}var Sn=function(){function t(e,n,i,o){if(!(this instanceof t))return new t(e,n,i,o);var s=e.split(".");s.length===2&&(i=s.shift(),e=s.shift()),this.collection=e,this.oid=n,this.db=i,this.fields=o||{}}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(Sn.prototype,"_bsontype",{value:"DBRef"});var Xt=void 0;try{Xt=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 $s=65536,h_=1<<24,Xe=$s*$s,Bl=Xe*Xe,Hs=Bl/2,zs={},Ws={},et=function(){function t(e,n,i){if(e===void 0&&(e=0),!(this instanceof t))return new t(e,n,i);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=!!i),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return t.fromBits=function(e,n,i){return new t(e,n,i)},t.fromInt=function(e,n){var i,o,s;return n?(e>>>=0,(s=0<=e&&e<256)&&(o=Ws[e],o)?o:(i=t.fromBits(e,(e|0)<0?-1:0,!0),s&&(Ws[e]=i),i)):(e|=0,(s=-128<=e&&e<128)&&(o=zs[e],o)?o:(i=t.fromBits(e,e<0?-1:0,!1),s&&(zs[e]=i),i))},t.fromNumber=function(e,n){if(isNaN(e))return n?t.UZERO:t.ZERO;if(n){if(e<0)return t.UZERO;if(e>=Bl)return t.MAX_UNSIGNED_VALUE}else{if(e<=-Hs)return t.MIN_VALUE;if(e+1>=Hs)return t.MAX_VALUE}return e<0?t.fromNumber(-e,n).neg():t.fromBits(e%Xe|0,e/Xe|0,n)},t.fromBigInt=function(e,n){return t.fromString(e.toString(),n)},t.fromString=function(e,n,i){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return t.ZERO;if(typeof n=="number"?(i=n,n=!1):n=!!n,i=i||10,i<2||36<i)throw RangeError("radix");var o;if((o=e.indexOf("-"))>0)throw Error("interior hyphen");if(o===0)return t.fromString(e.substring(1),n,i).neg();for(var s=t.fromNumber(Math.pow(i,8)),a=t.ZERO,c=0;c<e.length;c+=8){var h=Math.min(8,e.length-c),f=parseInt(e.substring(c,c+h),i);if(h<8){var _=t.fromNumber(Math.pow(i,h));a=a.mul(_).add(t.fromNumber(f))}else a=a.mul(s),a=a.add(t.fromNumber(f))}return a.unsigned=n,a},t.fromBytes=function(e,n,i){return i?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 kn(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,i=this.high&65535,o=this.low>>>16,s=this.low&65535,a=e.high>>>16,c=e.high&65535,h=e.low>>>16,f=e.low&65535,_=0,d=0,E=0,I=0;return I+=s+f,E+=I>>>16,I&=65535,E+=o+h,d+=E>>>16,E&=65535,d+=i+c,_+=d>>>16,d&=65535,_+=n+a,_&=65535,t.fromBits(E<<16|I,_<<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(),i=e.isNegative();return n&&!i?-1:!n&&i?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(Xt){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var n=(this.unsigned?Xt.div_u:Xt.div_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Xt.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?t.UZERO:t.ZERO;var i,o,s;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return t.UZERO;if(e.gt(this.shru(1)))return t.UONE;s=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 a=this.shr(1);return i=a.div(e).shl(1),i.eq(t.ZERO)?e.isNegative()?t.ONE:t.NEG_ONE:(o=this.sub(e.mul(i)),s=i.add(o.div(e)),s)}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();s=t.ZERO}for(o=this;o.gte(e);){i=Math.max(1,Math.floor(o.toNumber()/e.toNumber()));for(var c=Math.ceil(Math.log(i)/Math.LN2),h=c<=48?1:Math.pow(2,c-48),f=t.fromNumber(i),_=f.mul(e);_.isNegative()||_.gt(o);)i-=h,f=t.fromNumber(i,this.unsigned),_=f.mul(e);f.isZero()&&(f=t.ONE),s=s.add(f),o=o.sub(_)}return s},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)),Xt){var n=(this.unsigned?Xt.rem_u:Xt.rem_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Xt.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)),Xt){var n=Xt.mul(this.low,this.high,e.low,e.high);return t.fromBits(n,Xt.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 i=this.high>>>16,o=this.high&65535,s=this.low>>>16,a=this.low&65535,c=e.high>>>16,h=e.high&65535,f=e.low>>>16,_=e.low&65535,d=0,E=0,I=0,S=0;return S+=a*_,I+=S>>>16,S&=65535,I+=s*_,E+=I>>>16,I&=65535,I+=a*f,E+=I>>>16,I&=65535,E+=o*_,d+=E>>>16,E&=65535,E+=s*f,d+=E>>>16,E&=65535,E+=a*h,d+=E>>>16,E&=65535,d+=i*_+o*f+s*h+a*c,d&=65535,t.fromBits(I<<16|S,d<<16|E,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 i=this.low;return t.fromBits(i>>>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)*Xe+(this.low>>>0):this.high*Xe+(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),i=this.div(n),o=i.mul(n).sub(this);return i.toString(e)+o.toInt().toString(e)}else return"-"+this.neg().toString(e);for(var s=t.fromNumber(Math.pow(e,6),this.unsigned),a=this,c="";;){var h=a.div(s),f=a.sub(h.mul(s)).toInt()>>>0,_=f.toString(e);if(a=h,a.isZero())return _+c;for(;_.length<6;)_="0"+_;c=""+_+c}},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 i=t.fromString(e.$numberLong);return n&&n.relaxed?i.toNumber():i},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(h_),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(et.prototype,"__isLong__",{value:!0});Object.defineProperty(et.prototype,"_bsontype",{value:"Long"});var d_=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,p_=/^(\+|-)?(Infinity|inf)$/i,f_=/^(\+|-)?NaN$/i,pn=6111,Hi=-6176,Gs=6176,g_=34,zi=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),qs=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Zs=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),__=/^([-+])?(\d+)?$/,m_=31,Ys=16383,v_=30,y_=31;function Ks(t){return!isNaN(parseInt(t,10))}function b_(t){var e=et.fromNumber(1e9),n=et.fromNumber(0);if(!t.parts[0]&&!t.parts[1]&&!t.parts[2]&&!t.parts[3])return{quotient:t,rem:n};for(var i=0;i<=3;i++)n=n.shiftLeft(32),n=n.add(new et(t.parts[i],0)),t.parts[i]=n.div(e).low,n=n.modulo(e);return{quotient:t,rem:n}}function w_(t,e){if(!t&&!e)return{high:et.fromNumber(0),low:et.fromNumber(0)};var n=t.shiftRightUnsigned(32),i=new et(t.getLowBits(),0),o=e.shiftRightUnsigned(32),s=new et(e.getLowBits(),0),a=n.multiply(o),c=n.multiply(s),h=i.multiply(o),f=i.multiply(s);return a=a.add(c.shiftRightUnsigned(32)),c=new et(c.getLowBits(),0).add(h).add(f.shiftRightUnsigned(32)),a=a.add(c.shiftRightUnsigned(32)),f=c.shiftLeft(32).add(new et(f.getLowBits(),0)),{high:a,low:f}}function E_(t,e){var n=t.high>>>0,i=e.high>>>0;if(n<i)return!0;if(n===i){var o=t.low>>>0,s=e.low>>>0;if(o<s)return!0}return!1}function Ye(t,e){throw new Nt('"'.concat(t,'" is not a valid Decimal128 string - ').concat(e))}var yo=function(){function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="string")this.bytes=t.fromString(e).bytes;else if(vo(e)){if(e.byteLength!==16)throw new Nt("Decimal128 must take a Buffer of 16 bytes");this.bytes=e}else throw new Nt("Decimal128 must take a Buffer or string")}return t.fromString=function(e){var n=!1,i=!1,o=!1,s=0,a=0,c=0,h=0,f=0,_=[0],d=0,E=0,I=0,S=0,D=0,M=0,L=new et(0,0),z=new et(0,0),X=0,H=0;if(e.length>=7e3)throw new Nt(""+e+" not a valid Decimal128 string");var Q=e.match(d_),mt=e.match(p_),vt=e.match(f_);if(!Q&&!mt&&!vt||e.length===0)throw new Nt(""+e+" not a valid Decimal128 string");if(Q){var j=Q[2],ct=Q[4],ot=Q[5],st=Q[6];ct&&st===void 0&&Ye(e,"missing exponent power"),ct&&j===void 0&&Ye(e,"missing exponent base"),ct===void 0&&(ot||st)&&Ye(e,"missing e before exponent")}if((e[H]==="+"||e[H]==="-")&&(n=e[H++]==="-"),!Ks(e[H])&&e[H]!=="."){if(e[H]==="i"||e[H]==="I")return new t(wt.from(n?qs:Zs));if(e[H]==="N")return new t(wt.from(zi))}for(;Ks(e[H])||e[H]===".";){if(e[H]==="."){i&&Ye(e,"contains multiple periods"),i=!0,H=H+1;continue}d<34&&(e[H]!=="0"||o)&&(o||(f=a),o=!0,_[E++]=parseInt(e[H],10),d=d+1),o&&(c=c+1),i&&(h=h+1),a=a+1,H=H+1}if(i&&!a)throw new Nt(""+e+" not a valid Decimal128 string");if(e[H]==="e"||e[H]==="E"){var ft=e.substr(++H).match(__);if(!ft||!ft[2])return new t(wt.from(zi));D=parseInt(ft[0],10),H=H+ft[0].length}if(e[H])return new t(wt.from(zi));if(I=0,!d)I=0,S=0,_[0]=0,c=1,d=1,s=0;else if(S=d-1,s=c,s!==1)for(;_[f+s-1]===0;)s=s-1;for(D<=h&&h-D>16384?D=Hi:D=D-h;D>pn;){if(S=S+1,S-I>g_){var Ot=_.join("");if(Ot.match(/^0+$/)){D=pn;break}Ye(e,"overflow")}D=D-1}for(;D<Hi||d<c;){if(S===0&&s<d){D=Hi,s=0;break}if(d<c?c=c-1:S=S-1,D<pn)D=D+1;else{var Ot=_.join("");if(Ot.match(/^0+$/)){D=pn;break}Ye(e,"overflow")}}if(S-I+1<s){var xt=a;i&&(f=f+1,xt=xt+1),n&&(f=f+1,xt=xt+1);var It=parseInt(e[f+S+1],10),Pt=0;if(It>=5&&(Pt=1,It===5)){for(Pt=_[S]%2===1?1:0,M=f+S+2;M<xt;M++)if(parseInt(e[M],10)){Pt=1;break}}if(Pt){for(var gt=S;gt>=0;gt--)if(++_[gt]>9&&(_[gt]=0,gt===0))if(D<pn)D=D+1,_[gt]=1;else return new t(wt.from(n?qs:Zs))}}if(L=et.fromNumber(0),z=et.fromNumber(0),s===0)L=et.fromNumber(0),z=et.fromNumber(0);else if(S-I<17){var gt=I;for(z=et.fromNumber(_[gt++]),L=new et(0,0);gt<=S;gt++)z=z.multiply(et.fromNumber(10)),z=z.add(et.fromNumber(_[gt]))}else{var gt=I;for(L=et.fromNumber(_[gt++]);gt<=S-17;gt++)L=L.multiply(et.fromNumber(10)),L=L.add(et.fromNumber(_[gt]));for(z=et.fromNumber(_[gt++]);gt<=S;gt++)z=z.multiply(et.fromNumber(10)),z=z.add(et.fromNumber(_[gt]))}var R=w_(L,et.fromString("100000000000000000"));R.low=R.low.add(z),E_(R.low,z)&&(R.high=R.high.add(et.fromNumber(1))),X=D+Gs;var O={low:et.fromNumber(0),high:et.fromNumber(0)};R.high.shiftRightUnsigned(49).and(et.fromNumber(1)).equals(et.fromNumber(1))?(O.high=O.high.or(et.fromNumber(3).shiftLeft(61)),O.high=O.high.or(et.fromNumber(X).and(et.fromNumber(16383).shiftLeft(47))),O.high=O.high.or(R.high.and(et.fromNumber(0x7fffffffffff)))):(O.high=O.high.or(et.fromNumber(X&16383).shiftLeft(49)),O.high=O.high.or(R.high.and(et.fromNumber(562949953421311)))),O.low=R.low,n&&(O.high=O.high.or(et.fromString("9223372036854775808")));var v=wt.alloc(16);return H=0,v[H++]=O.low.low&255,v[H++]=O.low.low>>8&255,v[H++]=O.low.low>>16&255,v[H++]=O.low.low>>24&255,v[H++]=O.low.high&255,v[H++]=O.low.high>>8&255,v[H++]=O.low.high>>16&255,v[H++]=O.low.high>>24&255,v[H++]=O.high.low&255,v[H++]=O.high.low>>8&255,v[H++]=O.high.low>>16&255,v[H++]=O.high.low>>24&255,v[H++]=O.high.high&255,v[H++]=O.high.high>>8&255,v[H++]=O.high.high>>16&255,v[H++]=O.high.high>>24&255,new t(v)},t.prototype.toString=function(){for(var e,n=0,i=new Array(36),o=0;o<i.length;o++)i[o]=0;var s=0,a=!1,c,h={parts:[0,0,0,0]},f,_,d=[];s=0;var E=this.bytes,I=E[s++]|E[s++]<<8|E[s++]<<16|E[s++]<<24,S=E[s++]|E[s++]<<8|E[s++]<<16|E[s++]<<24,D=E[s++]|E[s++]<<8|E[s++]<<16|E[s++]<<24,M=E[s++]|E[s++]<<8|E[s++]<<16|E[s++]<<24;s=0;var L={low:new et(I,S),high:new et(D,M)};L.high.lessThan(et.ZERO)&&d.push("-");var z=M>>26&m_;if(z>>3===3){if(z===v_)return d.join("")+"Infinity";if(z===y_)return"NaN";e=M>>15&Ys,c=8+(M>>14&1)}else c=M>>14&7,e=M>>17&Ys;var X=e-Gs;if(h.parts[0]=(M&16383)+((c&15)<<14),h.parts[1]=D,h.parts[2]=S,h.parts[3]=I,h.parts[0]===0&&h.parts[1]===0&&h.parts[2]===0&&h.parts[3]===0)a=!0;else for(_=3;_>=0;_--){var H=0,Q=b_(h);if(h=Q.quotient,H=Q.rem.low,!!H)for(f=8;f>=0;f--)i[_*9+f]=H%10,H=Math.floor(H/10)}if(a)n=1,i[s]=0;else for(n=36;!i[s];)n=n-1,s=s+1;var mt=n-1+X;if(mt>=34||mt<=-7||X>0){if(n>34)return d.push("".concat(0)),X>0?d.push("E+".concat(X)):X<0&&d.push("E".concat(X)),d.join("");d.push("".concat(i[s++])),n=n-1,n&&d.push(".");for(var o=0;o<n;o++)d.push("".concat(i[s++]));d.push("E"),mt>0?d.push("+".concat(mt)):d.push("".concat(mt))}else if(X>=0)for(var o=0;o<n;o++)d.push("".concat(i[s++]));else{var vt=n+X;if(vt>0)for(var o=0;o<vt;o++)d.push("".concat(i[s++]));else d.push("0");for(d.push(".");vt++<0;)d.push("0");for(var o=0;o<n-Math.max(vt-1,0);o++)d.push("".concat(i[s++]))}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(yo.prototype,"_bsontype",{value:"Decimal128"});var Ei=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 i=parseFloat(e.$numberDouble);return n&&n.relaxed?i:new t(i)},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(Ei.prototype,"_bsontype",{value:"Double"});var xi=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(xi.prototype,"_bsontype",{value:"Int32"});var bo=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(bo.prototype,"_bsontype",{value:"MaxKey"});var wo=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(wo.prototype,"_bsontype",{value:"MinKey"});var x_=new RegExp("^[0-9a-fA-F]{24}$"),Re=null,he=Symbol("id"),qt=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 Nt("Argument passed in must have an id that is of type string or Buffer");"toHexString"in e&&typeof e.toHexString=="function"?n=wt.from(e.toHexString(),"hex"):n=e.id}else n=e;if(n==null||typeof n=="number")this[he]=t.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)this[he]=n instanceof wt?n:si(n);else if(typeof n=="string")if(n.length===12){var i=wt.from(n);if(i.byteLength===12)this[he]=i;else throw new Nt("Argument passed in must be a string of 12 bytes")}else if(n.length===24&&x_.test(n))this[he]=wt.from(n,"hex");else throw new Nt("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new Nt("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[he]},set:function(e){this[he]=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(),i=wt.alloc(12);return i.writeUInt32BE(e,0),Re===null&&(Re=Al(5)),i[4]=Re[0],i[5]=Re[1],i[6]=Re[2],i[7]=Re[3],i[8]=Re[4],i[11]=n&255,i[10]=n>>8&255,i[9]=n>>16&255,i},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[he][11]===e[he][11]&&this[he].equals(e[he]);if(typeof e=="string"&&t.isValid(e)&&e.length===12&&vo(this.id))return e===wt.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 wt.from(e).equals(this.id);if(typeof e=="object"&&"toHexString"in e&&typeof e.toHexString=="function"){var n=e.toHexString(),i=this.toHexString().toLowerCase();return typeof n=="string"&&n.toLowerCase()===i}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=wt.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 Nt("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new t(wt.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(qt.prototype,"generate",{value:bi(function(t){return qt.generate(t)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(qt.prototype,"getInc",{value:bi(function(){return qt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(qt.prototype,"get_inc",{value:bi(function(){return qt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(qt,"get_inc",{value:bi(function(){return qt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(qt.prototype,"_bsontype",{value:"ObjectID"});function S_(t){return t.split("").sort().join("")}var Cn=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this.pattern=e,this.options=S_(n??""),this.pattern.indexOf("\0")!==-1)throw new je("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new je("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var i=0;i<this.options.length;i++)if(!(this.options[i]==="i"||this.options[i]==="m"||this.options[i]==="x"||this.options[i]==="l"||this.options[i]==="s"||this.options[i]==="u"))throw new je("The regular expression option [".concat(this.options[i],"] 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 Nt("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(e)))},t}();Object.defineProperty(Cn.prototype,"_bsontype",{value:"BSONRegExp"});var Eo=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(Eo.prototype,"_bsontype",{value:"Symbol"});var C_=et,jl=function(t){yi(e,t);function e(n,i){var o=this;return o instanceof e?(et.isLong(n)?o=t.call(this,n.low,n.high,!0)||this:kn(n)&&typeof n.t<"u"&&typeof n.i<"u"?o=t.call(this,n.i,n.t,!0)||this:o=t.call(this,n,i,!0)||this,Object.defineProperty(o,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),o):new e(n,i)}return e.prototype.toJSON=function(){return{$timestamp:this.toString()}},e.fromInt=function(n){return new e(et.fromInt(n,!0))},e.fromNumber=function(n){return new e(et.fromNumber(n,!0))},e.fromBits=function(n,i){return new e(n,i)},e.fromString=function(n,i){return new e(et.fromString(n,!0,i))},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=et.MAX_UNSIGNED_VALUE,e}(C_);function T_(t){return kn(t)&&Reflect.has(t,"_bsontype")&&typeof t._bsontype=="string"}var Fl=2147483647,Vl=-2147483648,Ul=9223372036854776e3,$l=-9223372036854776e3,O_={$oid:qt,$binary:Fe,$uuid:Fe,$symbol:Eo,$numberInt:xi,$numberDecimal:yo,$numberDouble:Ei,$numberLong:et,$minKey:wo,$maxKey:bo,$regex:Cn,$regularExpression:Cn,$timestamp:jl};function Hl(t,e){if(e===void 0&&(e={}),typeof t=="number"){if(e.relaxed||e.legacy)return t;if(Math.floor(t)===t){if(t>=Vl&&t<=Fl)return new xi(t);if(t>=$l&&t<=Ul)return et.fromNumber(t)}return new Ei(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}),i=0;i<n.length;i++){var o=O_[n[i]];if(o)return o.fromExtendedJSON(t,e)}if(t.$date!=null){var s=t.$date,a=new Date;return e.legacy?typeof s=="number"?a.setTime(s):typeof s=="string"&&a.setTime(Date.parse(s)):typeof s=="string"?a.setTime(Date.parse(s)):et.isLong(s)?a.setTime(s.toNumber()):typeof s=="number"&&e.relaxed&&a.setTime(s),a}if(t.$code!=null){var c=Object.assign({},t);return t.$scope&&(c.$scope=Hl(t.$scope)),wi.fromExtendedJSON(t)}if(u_(t)||t.$dbPointer){var h=t.$ref?t:t.$dbPointer;if(h instanceof Sn)return h;var f=Object.keys(h).filter(function(d){return d.startsWith("$")}),_=!0;if(f.forEach(function(d){["$ref","$id","$db"].indexOf(d)===-1&&(_=!1)}),_)return Sn.fromExtendedJSON(h)}return t}function I_(t,e){return t.map(function(n,i){e.seenObjects.push({propertyName:"index ".concat(i),obj:null});try{return Ce(n,e)}finally{e.seenObjects.pop()}})}function Js(t){var e=t.toISOString();return t.getUTCMilliseconds()!==0?e:e.slice(0,-5)+"Z"}function Ce(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 i=e.seenObjects.map(function(L){return L.propertyName}),o=i.slice(0,n).map(function(L){return"".concat(L," -> ")}).join(""),s=i[n],a=" -> "+i.slice(n+1,i.length-1).map(function(L){return"".concat(L," -> ")}).join(""),c=i[i.length-1],h=" ".repeat(o.length+s.length/2),f="-".repeat(a.length+(s.length+c.length)/2-1);throw new Nt(`Converting circular structure to EJSON:
|
|
33
33
|
`+" ".concat(o).concat(s).concat(a).concat(c,`
|
|
34
|
-
`)+" ".concat(h,"\\").concat(f,"/"))}e.seenObjects[e.seenObjects.length-1].obj=t}if(Array.isArray(t))return I_(t,e);if(t===void 0)return null;if(t instanceof Date||s_(t)){var _=t.getTime(),d=_>-1&&_<2534023188e5;return e.legacy?e.relaxed&&d?{$date:t.getTime()}:{$date:Js(t)}:e.relaxed&&d?{$date:Js(t)}:{$date:{$numberLong:t.getTime().toString()}}}if(typeof t=="number"&&(!e.relaxed||!isFinite(t))){if(Math.floor(t)===t){var E=t>=Vl&&t<=Fl,I=t>=$l&&t<=Ul;if(E)return{$numberInt:t.toString()};if(I)return{$numberLong:t.toString()}}return{$numberDouble:t.toString()}}if(t instanceof RegExp||o_(t)){var S=t.flags;if(S===void 0){var D=t.toString().match(/[gimuy]*$/);D&&(S=D[0])}var M=new Cn(t.source,S);return M.toExtendedJSON(e)}return t!=null&&typeof t=="object"?R_(t,e):t}var D_={Binary:function(t){return new Fe(t.value(),t.sub_type)},Code:function(t){return new wi(t.code,t.scope)},DBRef:function(t){return new Sn(t.collection||t.namespace,t.oid,t.db,t.fields)},Decimal128:function(t){return new yo(t.bytes)},Double:function(t){return new Ei(t.value)},Int32:function(t){return new xi(t.value)},Long:function(t){return et.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 bo},MinKey:function(){return new wo},ObjectID:function(t){return new qt(t)},ObjectId:function(t){return new qt(t)},BSONRegExp:function(t){return new Cn(t.pattern,t.options)},Symbol:function(t){return new Eo(t.value)},Timestamp:function(t){return jl.fromBits(t.low,t.high)}};function R_(t,e){if(t==null||typeof t!="object")throw new je("not an object instance");var n=t._bsontype;if(typeof n>"u"){var i={};for(var o in t){e.seenObjects.push({propertyName:o,obj:null});try{var s=Ce(t[o],e);o==="__proto__"?Object.defineProperty(i,o,{value:s,writable:!0,enumerable:!0,configurable:!0}):i[o]=s}finally{e.seenObjects.pop()}}return i}else if(T_(t)){var a=t;if(typeof a.toExtendedJSON!="function"){var c=D_[t._bsontype];if(!c)throw new Nt("Unrecognized or invalid _bsontype: "+t._bsontype);a=c(a)}return n==="Code"&&a.scope?a=new wi(a.code,Ce(a.scope,e)):n==="DBRef"&&a.oid&&(a=new Sn(Ce(a.collection,e),Ce(a.oid,e),Ce(a.db,e),Ce(a.fields,e))),a.toExtendedJSON(e)}else throw new je("_bsontype must be a string, but was: "+typeof n)}var Xs;(function(t){function e(s,a){var c=Object.assign({},{relaxed:!0,legacy:!1},a);return typeof c.relaxed=="boolean"&&(c.strict=!c.relaxed),typeof c.strict=="boolean"&&(c.relaxed=!c.strict),JSON.parse(s,function(h,f){if(h.indexOf("\0")!==-1)throw new je("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(h)));return Hl(f,c)})}t.parse=e;function n(s,a,c,h){c!=null&&typeof c=="object"&&(h=c,c=0),a!=null&&typeof a=="object"&&!Array.isArray(a)&&(h=a,a=void 0,c=0);var f=Object.assign({relaxed:!0,legacy:!1},h,{seenObjects:[{propertyName:"(root)",obj:null}]}),_=Ce(s,f);return JSON.stringify(_,a,c)}t.stringify=n;function i(s,a){return a=a||{},JSON.parse(n(s,a))}t.serialize=i;function o(s,a){return a=a||{},e(JSON.stringify(s),a)}t.deserialize=o})(Xs||(Xs={}));var Qs,ta=Nl();ta.Map?Qs=ta.Map:Qs=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 i=e[n],o=i[0],s=i[1];this._keys.push(o),this._values[o]={v:s,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 i=e._keys[n++];return{value:i!==void 0?[i,e._values[i].v]:void 0,done:i===void 0}}}},t.prototype.forEach=function(e,n){n=n||this;for(var i=0;i<this._keys.length;i++){var o=this._keys[i];e.call(n,this._values[o].v,o,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 i=e._keys[n++];return{value:i!==void 0?i:void 0,done:i===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 i=e._keys[n++];return{value:i!==void 0?e._values[i].v:void 0,done:i===void 0}}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),t}();var _y=et.fromNumber(l_),my=et.fromNumber(c_),Wi=new Uint8Array(8),vy=new DataView(Wi.buffer,Wi.byteOffset,Wi.byteLength),P_=1024*1024*17,yy=wt.alloc(P_),k_=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}},Gi=class{constructor(t,e={},n,i){this.name=t,this.properties=e,this.id=i?new qt(i):new qt,this.occurred=new Date,n&&(this.trigger=new k_(n)),this.newEvent=!i}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale};function N_(t,e){t&1&&((0,r.P)(),(0,r.Ga)(0,"path",3))}function A_(t,e){t&1&&((0,r.P)(),(0,r.Ga)(0,"path",4))}var zl=class Ar{muted;videoEl;toggled=new r.U;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||Ar)};static \u0275cmp=(0,r.na)({type:Ar,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&&((0,r.Ea)(0,"button",0),(0,r.Ja)("click",function(i){return n.toggleMute(i)}),(0,r.P)(),(0,r.Ea)(1,"svg",1),(0,r.Ga)(2,"path",2),(0,r.sa)(3,N_,1,0,":svg:path",3)(4,A_,1,0,":svg:path",4),(0,r.Fa)()()),e&2&&((0,r.fa)(3),(0,r.Aa)(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%}"]})},qi;function M_(){if(qi==null){let t=typeof document<"u"?document.head:null;qi=!!(t&&(t.createShadowRoot||t.attachShadow))}return qi}function Si(t){if(M_()){let e=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}function Zi(){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 ce(t){return t.composedPath?t.composedPath()[0]:t.target}function Wl(t){return t.buttons===0||t.detail===0}function Gl(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 L_(t,e=0){return B_(t)?Number(t):arguments.length===2?e:0}function B_(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function se(t){return t instanceof r.X?t.nativeElement:t}function Gt(t,e,n,i,o){let s=parseInt(r.cb.major),a=parseInt(r.cb.minor);return s>19||s===19&&a>0||s===0&&a===0?t.listen(e,n,i,o):(e.addEventListener(n,i,o),()=>{e.removeEventListener(n,i,o)})}var Wn=new WeakMap,Ci=(()=>{class t{_appRef;_injector=(0,r.K)(r.S);_environmentInjector=(0,r.K)(r.L);load(n){let i=this._appRef=this._appRef||this._injector.get(r.ta),o=Wn.get(i);o||(o={loaders:new Set,refs:[]},Wn.set(i,o),i.onDestroy(()=>{Wn.get(i)?.refs.forEach(s=>s.destroy()),Wn.delete(i)})),o.loaders.has(n)||(o.loaders.add(n),o.refs.push((0,r.kb)(n,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Mr;try{Mr=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Mr=!1}var be=(()=>{class t{_platformId=(0,r.K)(r.$);isBrowser=this._platformId?(0,r.sb)(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||Mr)&&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=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),j_=new r.I("cdk-dir-doc",{providedIn:"root",factory:F_});function F_(){return(0,r.K)(r.lb)}var V_=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function U_(t){let e=t?.toLowerCase()||"";return e==="auto"&&typeof navigator<"u"&&navigator?.language?V_.test(navigator.language)?"rtl":"ltr":e==="rtl"?"rtl":"ltr"}var ai=(()=>{class t{value="ltr";change=new r.U;constructor(){let n=(0,r.K)(j_,{optional:!0});if(n){let i=n.body?n.body.dir:null,o=n.documentElement?n.documentElement.dir:null;this.value=U_(i||o||"ltr")}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Pe;function $_(){if(Pe==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Pe=!1,Pe;if("scrollBehavior"in document.documentElement.style)Pe=!0;else{let t=Element.prototype.scrollTo;t?Pe=!/\{\s*\[native code\]\s*\}/.test(t.toString()):Pe=!1}}return Pe}var H_=20,z_=(()=>{class t{_ngZone=(0,r.K)(r.V);_platform=(0,r.K)(be);_renderer=(0,r.K)(r.ia).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new r.j;_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 i=this.scrollContainers.get(n);i&&(i.unsubscribe(),this.scrollContainers.delete(n))}scrolled(n=H_){return this._platform.isBrowser?new r.i(i=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let o=n>0?this._scrolled.pipe((0,r.x)(n)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{o.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):(0,r.p)()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((n,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(n,i){let o=this.getAncestorScrollContainers(n);return this.scrolled(i).pipe((0,r.w)(s=>!s||o.indexOf(s)>-1))}getAncestorScrollContainers(n){let i=[];return this.scrollContainers.forEach((o,s)=>{this._scrollableContainsElement(s,n)&&i.push(s)}),i}_scrollableContainsElement(n,i){let o=se(i),s=n.getElementRef().nativeElement;do if(o==s)return!0;while(o=o.parentElement);return!1}static \u0275fac=function(n){return new(n||t)};static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),W_=20,xo=(()=>{class t{_platform=(0,r.K)(be);_listeners;_viewportSize;_change=new r.j;_document=(0,r.K)(r.lb,{optional:!0});constructor(){let n=(0,r.K)(r.V),i=(0,r.K)(r.ia).createRenderer(null,null);n.runOutsideAngular(()=>{if(this._platform.isBrowser){let o=s=>this._change.next(s);this._listeners=[i.listen("window","resize",o),i.listen("window","orientationchange",o)]}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:i,height:o}=this.getViewportSize();return{top:n.top,left:n.left,bottom:n.top+o,right:n.left+i,height:o,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let n=this._document,i=this._getWindow(),o=n.documentElement,s=o.getBoundingClientRect(),a=-s.top||n.body.scrollTop||i.scrollY||o.scrollTop||0,c=-s.left||n.body.scrollLeft||i.scrollX||o.scrollLeft||0;return{top:a,left:c}}change(n=W_){return n>0?this._change.pipe((0,r.x)(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=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Yi={},ql=(()=>{class t{_appId=(0,r.K)(r._);getId(n){return this._appId!=="ng"&&(n+=this._appId),Yi.hasOwnProperty(n)||(Yi[n]=0),`${n}${Yi[n]++}`}static \u0275fac=function(n){return new(n||t)};static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Zl(t){return Array.isArray(t)?t:[t]}function Yl(t){let e=t.cloneNode(!0),n=e.querySelectorAll("[id]"),i=t.nodeName.toLowerCase();e.removeAttribute("id");for(let o=0;o<n.length;o++)n[o].removeAttribute("id");return i==="canvas"?ia(t,e):(i==="input"||i==="select"||i==="textarea")&&na(t,e),ea("canvas",t,e,ia),ea("input, textarea, select",t,e,na),e}function ea(t,e,n,i){let o=e.querySelectorAll(t);if(o.length){let s=n.querySelectorAll(t);for(let a=0;a<o.length;a++)i(o[a],s[a])}}var G_=0;function na(t,e){e.type!=="file"&&(e.value=t.value),e.type==="radio"&&e.name&&(e.name=`mat-clone-${e.name}-${G_++}`)}function ia(t,e){let n=e.getContext("2d");if(n)try{n.drawImage(t,0,0)}catch{}}function So(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 Lr(t,e,n){let{top:i,bottom:o,left:s,right:a}=t;return n>=i&&n<=o&&e>=s&&e<=a}function wn(t,e,n){t.top+=e,t.bottom=t.top+t.height,t.left+=n,t.right=t.left+t.width}function ra(t,e,n,i){let{top:o,right:s,bottom:a,left:c,width:h,height:f}=t,_=h*e,d=f*e;return i>o-d&&i<a+d&&n>c-_&&n<s+_}var Kl=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:So(e)})})}handleScroll(t){let e=ce(t),n=this.positions.get(e);if(!n)return null;let i=n.scrollPosition,o,s;if(e===this._document){let h=this.getViewportScrollPosition();o=h.top,s=h.left}else o=e.scrollTop,s=e.scrollLeft;let a=i.top-o,c=i.left-s;return this.positions.forEach((h,f)=>{h.clientRect&&e!==f&&e.contains(f)&&wn(h.clientRect,a,c)}),i.top=o,i.left=s,{top:a,left:c}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Jl(t,e){let n=t.rootNodes;if(n.length===1&&n[0].nodeType===e.ELEMENT_NODE)return n[0];let i=e.createElement("div");return n.forEach(o=>i.appendChild(o)),i}function Co(t,e,n){for(let i in e)if(e.hasOwnProperty(i)){let o=e[i];o?t.setProperty(i,o,n?.has(i)?"important":""):t.removeProperty(i)}return t}function Ke(t,e){let n=e?"":"none";Co(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 oa(t,e,n){Co(t.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},n)}function li(t,e){return e&&e!="none"?t+" "+e:t}function sa(t,e){t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.transform=ci(e.left,e.top)}function ci(t,e){return`translate3d(${Math.round(t)}px, ${Math.round(e)}px, 0)`}function aa(t){let e=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*e}function q_(t){let e=getComputedStyle(t),n=Ki(e,"transition-property"),i=n.find(c=>c==="transform"||c==="all");if(!i)return 0;let o=n.indexOf(i),s=Ki(e,"transition-duration"),a=Ki(e,"transition-delay");return aa(s[o])+aa(a[o])}function Ki(t,e){return t.getPropertyValue(e).split(",").map(n=>n.trim())}var Z_=new Set(["position"]),Y_=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(t,e,n,i,o,s,a,c,h,f){this._document=t,this._rootElement=e,this._direction=n,this._initialDomRect=i,this._previewTemplate=o,this._previewClass=s,this._pickupPositionOnPage=a,this._initialTransform=c,this._zIndex=h,this._renderer=f}attach(t){this._preview=this._createPreview(),t.appendChild(this._preview),la(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 q_(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,i;if(n&&t){let o=t.matchSize?this._initialDomRect:null,s=t.viewContainer.createEmbeddedView(n,t.context);s.detectChanges(),i=Jl(s,this._document),this._previewEmbeddedView=s,t.matchSize?sa(i,o):i.style.transform=ci(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else i=Yl(this._rootElement),sa(i,this._initialDomRect),this._initialTransform&&(i.style.transform=this._initialTransform);return Co(i.style,{"pointer-events":"none",margin:la(i)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},Z_),Ke(i,!1),i.classList.add("cdk-drag-preview"),i.setAttribute("popover","manual"),i.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(o=>i.classList.add(o)):i.classList.add(e)),i}};function la(t){return"showPopover"in t}var K_={passive:!0},ca={passive:!1},J_={passive:!1,capture:!0},X_=800,ua=new Set(["position"]),Q_=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=(0,r.Y)(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new r.j;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=r.h.EMPTY;_pointerUpSubscription=r.h.EMPTY;_scrollSubscription=r.h.EMPTY;_resizeSubscription=r.h.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=>Ke(e,t)))}_disabled=!1;beforeStarted=new r.j;started=new r.j;released=new r.j;ended=new r.j;entered=new r.j;exited=new r.j;dropped=new r.j;moved=this._moveEvents;data;constrainPosition;constructor(t,e,n,i,o,s,a){this._config=e,this._document=n,this._ngZone=i,this._viewportRuler=o,this._dragDropRegistry=s,this._renderer=a,this.withRootElement(t).withParent(e.parentDragRef||null),this._parentPositions=new Kl(n),s.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=>se(n)),this._handles.forEach(n=>Ke(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=se(t);return e!==this._rootElement&&(this._removeRootElementListeners(),this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[Gt(this._renderer,e,"mousedown",this._pointerDown,ca),Gt(this._renderer,e,"touchstart",this._pointerDown,K_),Gt(this._renderer,e,"dragstart",this._nativeDragStart,ca)]),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?se(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),Ke(t,!0))}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),Ke(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 i=Math.abs(e.x-this._pickupPositionOnPage.x),o=Math.abs(e.y-this._pickupPositionOnPage.y);if(i+o>=this._config.dragStartThreshold){let s=Date.now()>=this._dragStartTime+this._getDragStartDelay(t),a=this._dropContainer;if(!s){this._endDragSequence(t);return}(!a||!a.isDragging()&&!a.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 i=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,o=this._activeTransform;o.x=n.x-i.x+this._passiveTransform.x,o.y=n.y-i.y+this._passiveTransform.y,this._applyRootElementTransform(o.x,o.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){gn(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),n=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=Gt(this._renderer,e,"selectstart",tm,J_)}),n){let i=this._rootElement,o=i.parentNode,s=this._placeholder=this._createPlaceholderElement(),a=this._anchor=this._anchor||this._document.createComment("");o.insertBefore(a,i),this._initialTransform=i.style.transform||"",this._preview=new Y_(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(o,e)),oa(i,!1,ua),this._document.body.appendChild(o.replaceChild(s,i)),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(),i=gn(e),o=!i&&e.button!==0,s=this._rootElement,a=ce(e),c=!i&&this._lastTouchEventTime&&this._lastTouchEventTime+X_>Date.now(),h=i?Gl(e):Wl(e);if(a&&a.draggable&&e.type==="mousedown"&&e.preventDefault(),n||o||c||h)return;if(this._handles.length){let d=s.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=So(this._boundaryElement));let f=this._previewTemplate;this._pickupPositionInElement=f&&f.template&&!f.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,t,e);let _=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:_.x,y:_.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){oa(this._rootElement,!0,ua),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),i=this._getPointerPositionOnPage(t),o=this._getDragDistance(i),s=e._isOverContainer(i.x,i.y);this.ended.next({source:this,distance:o,dropPoint:i,event:t}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:o,dropPoint:i,event:t}),e.drop(this,n,this._initialIndex,this._initialContainer,s,o,i,t),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:n,y:i}){let o=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(o=this._initialContainer),o&&o!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=o,this._dropContainer.enter(this,t,e,o===this._initialContainer&&o.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:o,currentIndex:o.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,i),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 i=a=>{(!a||this._preview&&ce(a)===this._preview.element&&a.propertyName==="transform")&&(s(),n(),clearTimeout(o))},o=setTimeout(i,e*1.5),s=this._preview.addEventListener("transitionend",i)}))}_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=Jl(this._placeholderRef,this._document)):n=Yl(this._rootElement),n.style.pointerEvents="none",n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(t,e,n){let i=e===this._rootElement?null:e,o=i?i.getBoundingClientRect():t,s=gn(n)?n.targetTouches[0]:n,a=this._getViewportScrollPosition(),c=s.pageX-o.left-a.left,h=s.pageY-o.top-a.top;return{x:o.left-t.left+c,y:o.top-t.top+h}}_getPointerPositionOnPage(t){let e=this._getViewportScrollPosition(),n=gn(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,i=n.pageX-e.left,o=n.pageY-e.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let a=this._ownerSVGElement.createSVGPoint();return a.x=i,a.y=o,a.matrixTransform(s.inverse())}}return{x:i,y:o}}_getConstrainedPointerPosition(t){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:n,y:i}=this.constrainPosition?this.constrainPosition(t,this,this._initialDomRect,this._pickupPositionInElement):t;if(this.lockAxis==="x"||e==="x"?i=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:o,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:c,height:h}=this._getPreviewRect(),f=a.top+s,_=a.bottom-(h-s),d=a.left+o,E=a.right-(c-o);n=ha(n,d,E),i=ha(i,f,_)}return{x:n,y:i}}_updatePointerDirectionDelta(t){let{x:e,y:n}=t,i=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,s=Math.abs(e-o.x),a=Math.abs(n-o.y);return s>this._config.pointerDirectionChangeThreshold&&(i.x=e>o.x?1:-1,o.x=e),a>this._config.pointerDirectionChangeThreshold&&(i.y=n>o.y?1:-1,o.y=n),i}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,Ke(this._rootElement,t))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(t=>t()),this._rootElementCleanups=void 0}_applyRootElementTransform(t,e){let n=1/this.scale,i=ci(t*n,e*n),o=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=o.transform&&o.transform!="none"?o.transform:""),o.transform=li(i,this._initialTransform)}_applyPreviewTransform(t,e){let n=this._previewTemplate?.template?void 0:this._initialTransform,i=ci(t,e);this._preview.setTransform(li(i,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(),i=this._boundaryElement.getBoundingClientRect();if(i.width===0&&i.height===0||n.width===0&&n.height===0)return;let o=i.left-n.left,s=n.right-i.right,a=i.top-n.top,c=n.bottom-i.bottom;i.width>n.width?(o>0&&(t+=o),s>0&&(t-=s)):t=0,i.height>n.height?(a>0&&(e+=a),c>0&&(e-=c)):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:gn(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){let e=this._parentPositions.handleScroll(t);if(e){let n=ce(t);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&wn(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=Si(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(t,e){let n=this._previewContainer||"global";if(n==="parent")return t;if(n==="global"){let i=this._document;return e||i.fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.msFullscreenElement||i.body}return se(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 ha(t,e,n){return Math.max(e,Math.min(n,t))}function gn(t){return t.type[0]==="t"}function tm(t){t.preventDefault()}function Xl(t,e,n){let i=da(e,t.length-1),o=da(n,t.length-1);if(i===o)return;let s=t[i],a=o<i?-1:1;for(let c=i;c!==o;c+=a)t[c]=t[c+a];t[o]=s}function da(t,e){return Math.max(0,Math.min(e,t))}var pa=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,i){let o=this._itemPositions,s=this._getItemIndexFromPointerPosition(t,e,n,i);if(s===-1&&o.length>0)return null;let a=this.orientation==="horizontal",c=o.findIndex(D=>D.drag===t),h=o[s],f=o[c].clientRect,_=h.clientRect,d=c>s?1:-1,E=this._getItemOffsetPx(f,_,d),I=this._getSiblingOffsetPx(c,o,d),S=o.slice();return Xl(o,c,s),o.forEach((D,M)=>{if(S[M]===D)return;let L=D.drag===t,z=L?E:I,X=L?t.getPlaceholderElement():D.drag.getRootElement();D.offset+=z;let H=Math.round(D.offset*(1/D.drag.scale));a?(X.style.transform=li(`translate3d(${H}px, 0, 0)`,D.initialTransform),wn(D.clientRect,0,z)):(X.style.transform=li(`translate3d(0, ${H}px, 0)`,D.initialTransform),wn(D.clientRect,z,0))}),this._previousSwap.overlaps=Lr(_,e,n),this._previousSwap.drag=h.drag,this._previousSwap.delta=a?i.x:i.y,{previousIndex:c,currentIndex:s}}enter(t,e,n,i){let o=i==null||i<0?this._getItemIndexFromPointerPosition(t,e,n):i,s=this._activeDraggables,a=s.indexOf(t),c=t.getPlaceholderElement(),h=s[o];if(h===t&&(h=s[o+1]),!h&&(o==null||o===-1||o<s.length-1)&&this._shouldEnterAsFirstChild(e,n)&&(h=s[0]),a>-1&&s.splice(a,1),h&&!this._dragDropRegistry.isDragging(h)){let f=h.getRootElement();f.parentElement.insertBefore(c,f),s.splice(o,0,t)}else this._element.appendChild(c),s.push(t);c.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(i=>i.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})=>{wn(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:So(n)}}).sort((e,n)=>t?e.clientRect.left-n.clientRect.left:e.clientRect.top-n.clientRect.top)}_getItemOffsetPx(t,e,n){let i=this.orientation==="horizontal",o=i?e.left-t.left:e.top-t.top;return n===-1&&(o+=i?e.width-t.width:e.height-t.height),o}_getSiblingOffsetPx(t,e,n){let i=this.orientation==="horizontal",o=e[t].clientRect,s=e[t+n*-1],a=o[i?"width":"height"]*n;if(s){let c=i?"left":"top",h=i?"right":"bottom";n===-1?a-=s.clientRect[c]-o[h]:a+=o[c]-s.clientRect[h]}return a}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return!1;let n=this._itemPositions,i=this.orientation==="horizontal";if(n[0].drag!==this._activeDraggables[0]){let o=n[n.length-1].clientRect;return i?t>=o.right:e>=o.bottom}else{let o=n[0].clientRect;return i?t<=o.left:e<=o.top}}_getItemIndexFromPointerPosition(t,e,n,i){let o=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:a,clientRect:c})=>{if(a===t)return!1;if(i){let h=o?i.x:i.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&h===this._previousSwap.delta)return!1}return o?e>=Math.floor(c.left)&&e<Math.floor(c.right):n>=Math.floor(c.top)&&n<Math.floor(c.bottom)});return s===-1||!this._sortPredicate(s,t)?-1:s}},em=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 i=e[n];this._relatedNodes.push([i,i.nextSibling])}this.withItems(t)}sort(t,e,n,i){let o=this._getItemIndexFromPointerPosition(t,e,n),s=this._previousSwap;if(o===-1||this._activeItems[o]===t)return null;let a=this._activeItems[o];if(s.drag===a&&s.overlaps&&s.deltaX===i.x&&s.deltaY===i.y)return null;let c=this.getItemIndex(t),h=t.getPlaceholderElement(),f=a.getRootElement();o>c?f.after(h):f.before(h),Xl(this._activeItems,c,o);let _=this._getRootNode().elementFromPoint(e,n);return s.deltaX=i.x,s.deltaY=i.y,s.drag=a,s.overlaps=f===_||f.contains(_),{previousIndex:c,currentIndex:o}}enter(t,e,n,i){let o=i==null||i<0?this._getItemIndexFromPointerPosition(t,e,n):i;o===-1&&(o=this._getClosestItemIndexToPointer(t,e,n));let s=this._activeItems[o],a=this._activeItems.indexOf(t);a>-1&&this._activeItems.splice(a,1),s&&!this._dragDropRegistry.isDragging(s)?(this._activeItems.splice(o,0,t),s.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[i,o]=this._relatedNodes[n];i.parentNode===t&&i.nextSibling!==o&&(o===null?t.appendChild(i):o.parentNode===t&&t.insertBefore(i,o))}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 i=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(n)),o=i?this._activeItems.findIndex(s=>{let a=s.getRootElement();return i===a||a.contains(i)}):-1;return o===-1||!this._sortPredicate(o,t)?-1:o}_getRootNode(){return this._rootNode||(this._rootNode=Si(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 i=1/0,o=-1;for(let s=0;s<this._activeItems.length;s++){let a=this._activeItems[s];if(a!==t){let{x:c,y:h}=a.getRootElement().getBoundingClientRect(),f=Math.hypot(e-c,n-h);f<i&&(i=f,o=s)}}return o}},fa=.05,Ql=.05,ee=function(t){return t[t.NONE=0]="NONE",t[t.UP=1]="UP",t[t.DOWN=2]="DOWN",t}(ee||{}),zt=function(t){return t[t.NONE=0]="NONE",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t}(zt||{}),nm=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new r.j;entered=new r.j;exited=new r.j;dropped=new r.j;sorted=new r.j;receivingStarted=new r.j;receivingStopped=new r.j;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=r.h.EMPTY;_verticalScrollDirection=ee.NONE;_horizontalScrollDirection=zt.NONE;_scrollNode;_stopScrollTimers=new r.j;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(t,e,n,i,o){this._dragDropRegistry=e,this._ngZone=i,this._viewportRuler=o;let s=this.element=se(t);this._document=n,this.withOrientation("vertical").withElementContainer(s),e.registerDropContainer(this),this._parentPositions=new Kl(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,i){this._draggingStarted(),i==null&&this.sortingDisabled&&(i=this._draggables.indexOf(t)),this._sortStrategy.enter(t,e,n,i),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,i,o,s,a,c={}){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:n,container:this,previousContainer:i,isPointerOverContainer:o,distance:s,dropPoint:a,event:c})}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 pa&&(this._sortStrategy.direction=t),this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){if(t==="mixed")this._sortStrategy=new em(this._document,this._dragDropRegistry);else{let e=new pa(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=se(this.element),n=this._scrollableElements.indexOf(this._container),i=this._scrollableElements.indexOf(t);return n>-1&&this._scrollableElements.splice(n,1),i>-1&&this._scrollableElements.splice(i,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,i){if(this.sortingDisabled||!this._domRect||!ra(this._domRect,fa,e,n))return;let o=this._sortStrategy.sort(t,e,n,i);o&&this.sorted.next({previousIndex:o.previousIndex,currentIndex:o.currentIndex,container:this,item:t})}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let n,i=ee.NONE,o=zt.NONE;if(this._parentPositions.positions.forEach((s,a)=>{a===this._document||!s.clientRect||n||ra(s.clientRect,fa,t,e)&&([i,o]=im(a,s.clientRect,this._direction,t,e),(i||o)&&(n=a))}),!i&&!o){let{width:s,height:a}=this._viewportRuler.getViewportSize(),c={width:s,height:a,top:0,right:s,bottom:a,left:0};i=tc(c,e),o=ec(c,t),n=window}n&&(i!==this._verticalScrollDirection||o!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=i,this._horizontalScrollDirection=o,this._scrollNode=n,(i||o)&&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(),(0,r.u)(0,r.m).pipe((0,r.D)(this._stopScrollTimers)).subscribe(()=>{let t=this._scrollNode,e=this.autoScrollStep;this._verticalScrollDirection===ee.UP?t.scrollBy(0,-e):this._verticalScrollDirection===ee.DOWN&&t.scrollBy(0,e),this._horizontalScrollDirection===zt.LEFT?t.scrollBy(-e,0):this._horizontalScrollDirection===zt.RIGHT&&t.scrollBy(e,0)})};_isOverContainer(t,e){return this._domRect!=null&&Lr(this._domRect,t,e)}_getSiblingContainerFromPosition(t,e,n){return this._siblings.find(i=>i._canReceive(t,e,n))}_canReceive(t,e,n){if(!this._domRect||!Lr(this._domRect,e,n)||!this.enterPredicate(t,this))return!1;let i=this._getShadowRoot().elementFromPoint(e,n);return i?i===this._container||this._container.contains(i):!1}_startReceiving(t,e){let n=this._activeSiblings;!n.has(t)&&e.every(i=>this.enterPredicate(i,this)||this._draggables.indexOf(i)>-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=Si(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 tc(t,e){let{top:n,bottom:i,height:o}=t,s=o*Ql;return e>=n-s&&e<=n+s?ee.UP:e>=i-s&&e<=i+s?ee.DOWN:ee.NONE}function ec(t,e){let{left:n,right:i,width:o}=t,s=o*Ql;return e>=n-s&&e<=n+s?zt.LEFT:e>=i-s&&e<=i+s?zt.RIGHT:zt.NONE}function im(t,e,n,i,o){let s=tc(e,o),a=ec(e,i),c=ee.NONE,h=zt.NONE;if(s){let f=t.scrollTop;s===ee.UP?f>0&&(c=ee.UP):t.scrollHeight-f>t.clientHeight&&(c=ee.DOWN)}if(a){let f=t.scrollLeft;n==="rtl"?a===zt.RIGHT?f<0&&(h=zt.RIGHT):t.scrollWidth+f>t.clientWidth&&(h=zt.LEFT):a===zt.LEFT?f>0&&(h=zt.LEFT):t.scrollWidth-f>t.clientWidth&&(h=zt.RIGHT)}return[c,h]}var _n={capture:!0},Ji={passive:!1,capture:!0},rm=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=(0,r.na)({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(n,i){},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}
|
|
35
|
-
`],encapsulation:2,changeDetection:0})}return t})(),nc=(()=>{class t{_ngZone=(0,r.K)(r.V);_document=(0,r.K)(r.lb);_styleLoader=(0,r.K)(Ci);_renderer=(0,r.K)(r.ia).createRenderer(null,null);_cleanupDocumentTouchmove;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=(0,r.Y)([]);_globalListeners;_draggingPredicate=n=>n.isDragging();_domNodesToDirectives=null;pointerMove=new r.j;pointerUp=new r.j;scroll=new r.j;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=Gt(this._renderer,this._document,"touchmove",this._persistentTouchmoveListener,Ji)})}removeDropContainer(n){this._dropInstances.delete(n)}removeDragItem(n){this._dragInstances.delete(n),this.stopDragging(n),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(n,i){if(!(this._activeDragInstances().indexOf(n)>-1)&&(this._styleLoader.load(rm),this._activeDragInstances.update(o=>[...o,n]),this._activeDragInstances().length===1)){let o=i.type.startsWith("touch"),s=c=>this.pointerUp.next(c),a=[["scroll",c=>this.scroll.next(c),_n],["selectstart",this._preventDefaultWhileDragging,Ji]];o?a.push(["touchend",s,_n],["touchcancel",s,_n]):a.push(["mouseup",s,_n]),o||a.push(["mousemove",c=>this.pointerMove.next(c),Ji]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=a.map(([c,h,f])=>Gt(this._renderer,this._document,c,h,f))})}}stopDragging(n){this._activeDragInstances.update(i=>{let o=i.indexOf(n);return o>-1?(i.splice(o,1),[...i]):i}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(n){return this._activeDragInstances().indexOf(n)>-1}scrolled(n){let i=[this.scroll];return n&&n!==this._document&&i.push(new r.i(o=>this._ngZone.runOutsideAngular(()=>{let s=Gt(this._renderer,n,"scroll",a=>{this._activeDragInstances().length&&o.next(a)},_n);return()=>{s()}}))),(0,r.v)(...i)}registerDirectiveNode(n,i){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(n,i)}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=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),om={dragStartThreshold:5,pointerDirectionChangeThreshold:5},sm=(()=>{class t{_document=(0,r.K)(r.lb);_ngZone=(0,r.K)(r.V);_viewportRuler=(0,r.K)(xo);_dragDropRegistry=(0,r.K)(nc);_renderer=(0,r.K)(r.ia).createRenderer(null,null);constructor(){}createDrag(n,i=om){return new Q_(n,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(n){return new nm(n,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ga=new r.I("CDK_DRAG_PARENT"),am=new r.I("CdkDragHandle"),lm=new r.I("CDK_DRAG_CONFIG"),cm=new r.I("CdkDropList"),um=(()=>{class t{element=(0,r.K)(r.X);dropContainer=(0,r.K)(cm,{optional:!0,skipSelf:!0});_ngZone=(0,r.K)(r.V);_viewContainerRef=(0,r.K)(r.la);_dir=(0,r.K)(ai,{optional:!0});_changeDetectorRef=(0,r.K)(r.eb);_selfHandle=(0,r.K)(am,{optional:!0,self:!0});_parentDrag=(0,r.K)(ga,{optional:!0,skipSelf:!0});_dragDropRegistry=(0,r.K)(nc);_destroyed=new r.j;_handles=new r.k([]);_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 r.U;released=new r.U;ended=new r.U;entered=new r.U;exited=new r.U;dropped=new r.U;moved=new r.i(n=>{let i=this._dragRef.moved.pipe((0,r.q)(o=>({source:this,pointerPosition:o.pointerPosition,event:o.event,delta:o.delta,distance:o.distance}))).subscribe(n);return()=>{i.unsubscribe()}});_injector=(0,r.K)(r.S);constructor(){let n=this.dropContainer,i=(0,r.K)(lm,{optional:!0}),o=(0,r.K)(sm);this._dragRef=o.createDrag(this.element,{dragStartThreshold:i&&i.dragStartThreshold!=null?i.dragStartThreshold:5,pointerDirectionChangeThreshold:i&&i.pointerDirectionChangeThreshold!=null?i.pointerDirectionChangeThreshold:5,zIndex:i?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),i&&this._assignDefaults(i),n&&(this._dragRef._withDropContainer(n._dropListRef),n.addItem(this),n._dropListRef.beforeStarted.pipe((0,r.D)(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(){(0,r.ca)(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(n){let i=n.rootElementSelector,o=n.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,o&&!o.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 i=this._handles.getValue();i.push(n),this._handles.next(i)}_removeHandle(n){let i=this._handles.getValue(),o=i.indexOf(n);o>-1&&(i.splice(o,1),this._handles.next(i))}_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,i=n;this.rootElementSelector&&(i=n.closest!==void 0?n.closest(this.rootElementSelector):n.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||n)}_getBoundaryElement(){let n=this.boundaryElement;return n?typeof n=="string"?this.element.nativeElement.closest(n):se(n):null}_syncInputs(n){n.beforeStarted.subscribe(()=>{if(!n.isDragging()){let i=this._dir,o=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,a=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 o=="object"&&o?o:L_(o),n.constrainPosition=this.constrainPosition,n.previewClass=this.previewClass,n.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(a).withPreviewContainer(this.previewContainer||"global"),i&&n.withDirection(i.value)}}),n.beforeStarted.pipe((0,r.y)(1)).subscribe(()=>{if(this._parentDrag){n.withParent(this._parentDrag._dragRef);return}let i=this.element.nativeElement.parentElement;for(;i;){let o=this._dragDropRegistry.getDragDirectiveForNode(i);if(o){n.withParent(o._dragRef);break}i=i.parentElement}})}_handleEvents(n){n.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),n.released.subscribe(i=>{this.released.emit({source:this,event:i.event})}),n.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),n.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),n.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),n.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(n){let{lockAxis:i,dragStartDelay:o,constrainPosition:s,previewClass:a,boundaryElement:c,draggingDisabled:h,rootElementSelector:f,previewContainer:_}=n;this.disabled=h??!1,this.dragStartDelay=o||0,i&&(this.lockAxis=i),s&&(this.constrainPosition=s),a&&(this.previewClass=a),c&&(this.boundaryElement=c),f&&(this.rootElementSelector=f),_&&(this.previewContainer=_)}_setupHandlesListener(){this._handles.pipe((0,r.E)(n=>{let i=n.map(o=>o.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),(0,r.C)(n=>(0,r.v)(...n.map(i=>i._stateChanges.pipe((0,r.B)(i))))),(0,r.D)(this._destroyed)).subscribe(n=>{let i=this._dragRef,o=n.element.nativeElement;n.disabled?i.disableHandle(o):i.enableHandle(o)})}static \u0275fac=function(n){return new(n||t)};static \u0275dir=(0,r.pa)({type:t,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(n,i){n&2&&(0,r.xa)("cdk-drag-disabled",i.disabled)("cdk-drag-dragging",i._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",r.fb],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",r.gb]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[(0,r.Wa)([{provide:ga,useExisting:t}]),r.M]})}return t})(),hm=t=>({"lc:cursor-grab":t}),dm=(t,e)=>e.url;function pm(t,e){if(t&1&&(0,r.Ga)(0,"source",11),t&2){let n=e.$implicit;(0,r.La)("type",n.mimeType),(0,r.va)("src",n.url,r.ea)}}var fm=class Br{constructor(e){this.elementRef=e}video;closeClicked=new r.U;videoClicked=new r.U;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||Br)((0,r.ka)(r.X))};static \u0275cmp=(0,r.na)({type:Br,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&&((0,r.Ea)(0,"div",0),(0,r.Ja)("click",function(){return n.onVideoClick()})("keyup",function(){return n.onVideoClick()})("cdkDragMoved",function(){return n.isDragging=!0}),(0,r.Ea)(1,"button",1),(0,r.Ja)("click",function(i){return i.stopPropagation(),n.close()}),(0,r.P)(),(0,r.Ea)(2,"svg",2),(0,r.Ga)(3,"path",3)(4,"path",4),(0,r.Fa)()(),(0,r.Q)(),(0,r.Ea)(5,"div",5)(6,"div",6),(0,r.P)(),(0,r.Ea)(7,"svg",7),(0,r.Ga)(8,"path",8),(0,r.Fa)()(),(0,r.Q)(),(0,r.Ea)(9,"div",9),(0,r.Qa)(10,"Tap to unmute"),(0,r.Fa)()(),(0,r.Ea)(11,"video",10),(0,r.Ca)(12,pm,1,2,"source",11,dm),(0,r.Fa)()()),e&2&&((0,r.va)("ngClass",(0,r.Xa)(3,hm,n.isDragging))("cdkDragBoundary","body"),(0,r.fa)(11),(0,r.va)("muted",!0),(0,r.fa)(),(0,r.Da)(n.video.sources))},dependencies:[r.nb,um],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}"]})},To=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}},jr=class extends To{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(t,e,n,i,o){super(),this.component=t,this.viewContainerRef=e,this.injector=n,this.projectableNodes=o}},ic=class extends To{templateRef;viewContainerRef;context;injector;constructor(t,e,n,i){super(),this.templateRef=t,this.viewContainerRef=e,this.context=n,this.injector=i}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()}},gm=class extends To{element;constructor(t){super(),this.element=t instanceof r.X?t.nativeElement:t}},Oo=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(t){if(t instanceof jr)return this._attachedPortal=t,this.attachComponentPortal(t);if(t instanceof ic)return this._attachedPortal=t,this.attachTemplatePortal(t);if(this.attachDomPortal&&t instanceof gm)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)}},_m=class extends Oo{outletElement;_appRef;_defaultInjector;_document;constructor(t,e,n,i,o){super(),this.outletElement=t,this._appRef=n,this._defaultInjector=i,this._document=o}attachComponentPortal(t){let e;if(t.viewContainerRef){let n=t.injector||t.viewContainerRef.injector,i=n.get(r.ma,null,{optional:!0})||void 0;e=t.viewContainerRef.createComponent(t.component,{index:t.viewContainerRef.length,injector:n,ngModuleRef:i,projectableNodes:t.projectableNodes||void 0}),this.setDisposeFn(()=>e.destroy())}else{let n=this._appRef,i=t.injector||this._defaultInjector||r.S.NULL,o=i.get(r.L,n.injector);e=(0,r.kb)(t.component,{elementInjector:i,environmentInjector:o,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(i=>this.outletElement.appendChild(i)),n.detectChanges(),this.setDisposeFn(()=>{let i=e.indexOf(n);i!==-1&&e.remove(i)}),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]}},_a=(()=>{class t extends Oo{_moduleRef=(0,r.K)(r.ma,{optional:!0});_document=(0,r.K)(r.lb);_viewContainerRef=(0,r.K)(r.la);_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 r.U;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(n){n.setAttachedHost(this);let i=n.viewContainerRef!=null?n.viewContainerRef:this._viewContainerRef,o=i.createComponent(n.component,{index:i.length,injector:n.injector||i.injector,projectableNodes:n.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return i!==this._viewContainerRef&&this._getRootNode().appendChild(o.hostView.rootNodes[0]),super.setDisposeFn(()=>o.destroy()),this._attachedPortal=n,this._attachedRef=o,this.attached.emit(o),o}attachTemplatePortal(n){n.setAttachedHost(this);let i=this._viewContainerRef.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=n,this._attachedRef=i,this.attached.emit(i),i}attachDomPortal=n=>{let i=n.element;i.parentNode;let o=this._document.createComment("dom-portal");n.setAttachedHost(this),i.parentNode.insertBefore(o,i),this._getRootNode().appendChild(i),this._attachedPortal=n,super.setDisposeFn(()=>{o.parentNode&&o.parentNode.replaceChild(i,o)})};_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=(0,r.pa)({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[r.ra]})}return t})(),mn;function mm(){if(mn==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>mn=!0}))}finally{mn=mn||!1}return mn}function vm(t){return mm()?t:!!t.capture}var ym=new r.I("cdk-input-modality-detector-options"),bm={ignoreKeys:[18,17,224,91,16]},rc=650,Xi={passive:!0,capture:!0},wm=(()=>{class t{_platform=(0,r.K)(be);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new r.k(null);_options;_lastTouchMs=0;_onKeydown=n=>{this._options?.ignoreKeys?.some(i=>i===n.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=ce(n))};_onMousedown=n=>{Date.now()-this._lastTouchMs<rc||(this._modality.next(Wl(n)?"keyboard":"mouse"),this._mostRecentTarget=ce(n))};_onTouchstart=n=>{if(Gl(n)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=ce(n)};constructor(){let n=(0,r.K)(r.V),i=(0,r.K)(r.lb),o=(0,r.K)(ym,{optional:!0});if(this._options=(0,r.a)((0,r.a)({},bm),o),this.modalityDetected=this._modality.pipe((0,r.A)(1)),this.modalityChanged=this.modalityDetected.pipe((0,r.z)()),this._platform.isBrowser){let s=(0,r.K)(r.ia).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[Gt(s,i,"keydown",this._onKeydown,Xi),Gt(s,i,"mousedown",this._onMousedown,Xi),Gt(s,i,"touchstart",this._onTouchstart,Xi)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(n=>n())}static \u0275fac=function(n){return new(n||t)};static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Jn=function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t}(Jn||{}),Em=new r.I("cdk-focus-monitor-default-options"),Gn=vm({passive:!0,capture:!0}),xm=(()=>{class t{_ngZone=(0,r.K)(r.V);_platform=(0,r.K)(be);_inputModalityDetector=(0,r.K)(wm);_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=(0,r.K)(r.lb,{optional:!0});_stopInputModalityDetector=new r.j;constructor(){let n=(0,r.K)(Em,{optional:!0});this._detectionMode=n?.detectionMode||Jn.IMMEDIATE}_rootNodeFocusAndBlurListener=n=>{let i=ce(n);for(let o=i;o;o=o.parentElement)n.type==="focus"?this._onFocus(n,o):this._onBlur(n,o)};monitor(n,i=!1){let o=se(n);if(!this._platform.isBrowser||o.nodeType!==1)return(0,r.p)();let s=Si(o)||this._getDocument(),a=this._elementInfo.get(o);if(a)return i&&(a.checkChildren=!0),a.subject;let c={checkChildren:i,subject:new r.j,rootNode:s};return this._elementInfo.set(o,c),this._registerGlobalListeners(c),c.subject}stopMonitoring(n){let i=se(n),o=this._elementInfo.get(i);o&&(o.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(o))}focusVia(n,i,o){let s=se(n),a=this._getDocument().activeElement;s===a?this._getClosestElementsInfo(s).forEach(([c,h])=>this._originChanged(c,i,h)):(this._setOrigin(i),typeof s.focus=="function"&&s.focus(o))}ngOnDestroy(){this._elementInfo.forEach((n,i)=>this.stopMonitoring(i))}_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===Jn.EVENTUAL||!!n?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(n,i){n.classList.toggle("cdk-focused",!!i),n.classList.toggle("cdk-touch-focused",i==="touch"),n.classList.toggle("cdk-keyboard-focused",i==="keyboard"),n.classList.toggle("cdk-mouse-focused",i==="mouse"),n.classList.toggle("cdk-program-focused",i==="program")}_setOrigin(n,i=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=n,this._originFromTouchInteraction=n==="touch"&&i,this._detectionMode===Jn.IMMEDIATE){clearTimeout(this._originTimeoutId);let o=this._originFromTouchInteraction?rc:1;this._originTimeoutId=setTimeout(()=>this._origin=null,o)}})}_onFocus(n,i){let o=this._elementInfo.get(i),s=ce(n);!o||!o.checkChildren&&i!==s||this._originChanged(i,this._getFocusOrigin(s),o)}_onBlur(n,i){let o=this._elementInfo.get(i);!o||o.checkChildren&&n.relatedTarget instanceof Node&&i.contains(n.relatedTarget)||(this._setClasses(i),this._emitOrigin(o,null))}_emitOrigin(n,i){n.subject.observers.length&&this._ngZone.run(()=>n.subject.next(i))}_registerGlobalListeners(n){if(!this._platform.isBrowser)return;let i=n.rootNode,o=this._rootNodeFocusListenerCount.get(i)||0;o||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,Gn),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,Gn)}),this._rootNodeFocusListenerCount.set(i,o+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe((0,r.D)(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(n){let i=n.rootNode;if(this._rootNodeFocusListenerCount.has(i)){let o=this._rootNodeFocusListenerCount.get(i);o>1?this._rootNodeFocusListenerCount.set(i,o-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Gn),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Gn),this._rootNodeFocusListenerCount.delete(i))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(n,i,o){this._setClasses(n,i),this._emitOrigin(o,i),this._lastFocusOrigin=i}_getClosestElementsInfo(n){let i=[];return this._elementInfo.forEach((o,s)=>{(s===n||o.checkChildren&&s.contains(n))&&i.push([s,o])}),i}_isLastInteractionFromInputLabel(n){let{_mostRecentTarget:i,mostRecentModality:o}=this._inputModalityDetector;if(o!=="mouse"||!i||i===n||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA"||n.disabled)return!1;let s=n.labels;if(s){for(let a=0;a<s.length;a++)if(s[a].contains(i))return!0}return!1}static \u0275fac=function(n){return new(n||t)};static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Sm=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=(0,r.na)({type:t,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(n,i){},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}
|
|
34
|
+
`)+" ".concat(h,"\\").concat(f,"/"))}e.seenObjects[e.seenObjects.length-1].obj=t}if(Array.isArray(t))return I_(t,e);if(t===void 0)return null;if(t instanceof Date||s_(t)){var _=t.getTime(),d=_>-1&&_<2534023188e5;return e.legacy?e.relaxed&&d?{$date:t.getTime()}:{$date:Js(t)}:e.relaxed&&d?{$date:Js(t)}:{$date:{$numberLong:t.getTime().toString()}}}if(typeof t=="number"&&(!e.relaxed||!isFinite(t))){if(Math.floor(t)===t){var E=t>=Vl&&t<=Fl,I=t>=$l&&t<=Ul;if(E)return{$numberInt:t.toString()};if(I)return{$numberLong:t.toString()}}return{$numberDouble:t.toString()}}if(t instanceof RegExp||o_(t)){var S=t.flags;if(S===void 0){var D=t.toString().match(/[gimuy]*$/);D&&(S=D[0])}var M=new Cn(t.source,S);return M.toExtendedJSON(e)}return t!=null&&typeof t=="object"?R_(t,e):t}var D_={Binary:function(t){return new Fe(t.value(),t.sub_type)},Code:function(t){return new wi(t.code,t.scope)},DBRef:function(t){return new Sn(t.collection||t.namespace,t.oid,t.db,t.fields)},Decimal128:function(t){return new yo(t.bytes)},Double:function(t){return new Ei(t.value)},Int32:function(t){return new xi(t.value)},Long:function(t){return et.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 bo},MinKey:function(){return new wo},ObjectID:function(t){return new qt(t)},ObjectId:function(t){return new qt(t)},BSONRegExp:function(t){return new Cn(t.pattern,t.options)},Symbol:function(t){return new Eo(t.value)},Timestamp:function(t){return jl.fromBits(t.low,t.high)}};function R_(t,e){if(t==null||typeof t!="object")throw new je("not an object instance");var n=t._bsontype;if(typeof n>"u"){var i={};for(var o in t){e.seenObjects.push({propertyName:o,obj:null});try{var s=Ce(t[o],e);o==="__proto__"?Object.defineProperty(i,o,{value:s,writable:!0,enumerable:!0,configurable:!0}):i[o]=s}finally{e.seenObjects.pop()}}return i}else if(T_(t)){var a=t;if(typeof a.toExtendedJSON!="function"){var c=D_[t._bsontype];if(!c)throw new Nt("Unrecognized or invalid _bsontype: "+t._bsontype);a=c(a)}return n==="Code"&&a.scope?a=new wi(a.code,Ce(a.scope,e)):n==="DBRef"&&a.oid&&(a=new Sn(Ce(a.collection,e),Ce(a.oid,e),Ce(a.db,e),Ce(a.fields,e))),a.toExtendedJSON(e)}else throw new je("_bsontype must be a string, but was: "+typeof n)}var Xs;(function(t){function e(s,a){var c=Object.assign({},{relaxed:!0,legacy:!1},a);return typeof c.relaxed=="boolean"&&(c.strict=!c.relaxed),typeof c.strict=="boolean"&&(c.relaxed=!c.strict),JSON.parse(s,function(h,f){if(h.indexOf("\0")!==-1)throw new je("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(h)));return Hl(f,c)})}t.parse=e;function n(s,a,c,h){c!=null&&typeof c=="object"&&(h=c,c=0),a!=null&&typeof a=="object"&&!Array.isArray(a)&&(h=a,a=void 0,c=0);var f=Object.assign({relaxed:!0,legacy:!1},h,{seenObjects:[{propertyName:"(root)",obj:null}]}),_=Ce(s,f);return JSON.stringify(_,a,c)}t.stringify=n;function i(s,a){return a=a||{},JSON.parse(n(s,a))}t.serialize=i;function o(s,a){return a=a||{},e(JSON.stringify(s),a)}t.deserialize=o})(Xs||(Xs={}));var Qs,ta=Nl();ta.Map?Qs=ta.Map:Qs=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 i=e[n],o=i[0],s=i[1];this._keys.push(o),this._values[o]={v:s,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 i=e._keys[n++];return{value:i!==void 0?[i,e._values[i].v]:void 0,done:i===void 0}}}},t.prototype.forEach=function(e,n){n=n||this;for(var i=0;i<this._keys.length;i++){var o=this._keys[i];e.call(n,this._values[o].v,o,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 i=e._keys[n++];return{value:i!==void 0?i:void 0,done:i===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 i=e._keys[n++];return{value:i!==void 0?e._values[i].v:void 0,done:i===void 0}}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),t}();var _y=et.fromNumber(l_),my=et.fromNumber(c_),Wi=new Uint8Array(8),vy=new DataView(Wi.buffer,Wi.byteOffset,Wi.byteLength),P_=1024*1024*17,yy=wt.alloc(P_),k_=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}},Gi=class{constructor(t,e={},n,i){this.name=t,this.properties=e,this.id=i?new qt(i):new qt,this.occurred=new Date,n&&(this.trigger=new k_(n)),this.newEvent=!i}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale};function N_(t,e){t&1&&((0,r.P)(),(0,r.Ga)(0,"path",3))}function A_(t,e){t&1&&((0,r.P)(),(0,r.Ga)(0,"path",4))}var zl=class Ar{muted;videoEl;toggled=new r.U;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||Ar)};static \u0275cmp=(0,r.na)({type:Ar,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&&((0,r.Ea)(0,"button",0),(0,r.Ja)("click",function(i){return n.toggleMute(i)}),(0,r.P)(),(0,r.Ea)(1,"svg",1),(0,r.Ga)(2,"path",2),(0,r.sa)(3,N_,1,0,":svg:path",3)(4,A_,1,0,":svg:path",4),(0,r.Fa)()()),e&2&&((0,r.fa)(3),(0,r.Aa)(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%}"]})},qi;function M_(){if(qi==null){let t=typeof document<"u"?document.head:null;qi=!!(t&&(t.createShadowRoot||t.attachShadow))}return qi}function Si(t){if(M_()){let e=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}function Zi(){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 ce(t){return t.composedPath?t.composedPath()[0]:t.target}function Wl(t){return t.buttons===0||t.detail===0}function Gl(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 L_(t,e=0){return B_(t)?Number(t):arguments.length===2?e:0}function B_(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function se(t){return t instanceof r.X?t.nativeElement:t}function Gt(t,e,n,i,o){let s=parseInt(r.cb.major),a=parseInt(r.cb.minor);return s>19||s===19&&a>0||s===0&&a===0?t.listen(e,n,i,o):(e.addEventListener(n,i,o),()=>{e.removeEventListener(n,i,o)})}var Wn=new WeakMap,Ci=(()=>{class t{_appRef;_injector=(0,r.K)(r.S);_environmentInjector=(0,r.K)(r.L);load(n){let i=this._appRef=this._appRef||this._injector.get(r.ta),o=Wn.get(i);o||(o={loaders:new Set,refs:[]},Wn.set(i,o),i.onDestroy(()=>{Wn.get(i)?.refs.forEach(s=>s.destroy()),Wn.delete(i)})),o.loaders.has(n)||(o.loaders.add(n),o.refs.push((0,r.kb)(n,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Mr;try{Mr=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Mr=!1}var be=(()=>{class t{_platformId=(0,r.K)(r.$);isBrowser=this._platformId?(0,r.sb)(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||Mr)&&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=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),j_=new r.I("cdk-dir-doc",{providedIn:"root",factory:F_});function F_(){return(0,r.K)(r.lb)}var V_=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function U_(t){let e=t?.toLowerCase()||"";return e==="auto"&&typeof navigator<"u"&&navigator?.language?V_.test(navigator.language)?"rtl":"ltr":e==="rtl"?"rtl":"ltr"}var ai=(()=>{class t{value="ltr";change=new r.U;constructor(){let n=(0,r.K)(j_,{optional:!0});if(n){let i=n.body?n.body.dir:null,o=n.documentElement?n.documentElement.dir:null;this.value=U_(i||o||"ltr")}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Pe;function $_(){if(Pe==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Pe=!1,Pe;if("scrollBehavior"in document.documentElement.style)Pe=!0;else{let t=Element.prototype.scrollTo;t?Pe=!/\{\s*\[native code\]\s*\}/.test(t.toString()):Pe=!1}}return Pe}var H_=20,z_=(()=>{class t{_ngZone=(0,r.K)(r.V);_platform=(0,r.K)(be);_renderer=(0,r.K)(r.ia).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new r.j;_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 i=this.scrollContainers.get(n);i&&(i.unsubscribe(),this.scrollContainers.delete(n))}scrolled(n=H_){return this._platform.isBrowser?new r.i(i=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let o=n>0?this._scrolled.pipe((0,r.x)(n)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{o.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):(0,r.p)()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((n,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(n,i){let o=this.getAncestorScrollContainers(n);return this.scrolled(i).pipe((0,r.w)(s=>!s||o.indexOf(s)>-1))}getAncestorScrollContainers(n){let i=[];return this.scrollContainers.forEach((o,s)=>{this._scrollableContainsElement(s,n)&&i.push(s)}),i}_scrollableContainsElement(n,i){let o=se(i),s=n.getElementRef().nativeElement;do if(o==s)return!0;while(o=o.parentElement);return!1}static \u0275fac=function(n){return new(n||t)};static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),W_=20,xo=(()=>{class t{_platform=(0,r.K)(be);_listeners;_viewportSize;_change=new r.j;_document=(0,r.K)(r.lb,{optional:!0});constructor(){let n=(0,r.K)(r.V),i=(0,r.K)(r.ia).createRenderer(null,null);n.runOutsideAngular(()=>{if(this._platform.isBrowser){let o=s=>this._change.next(s);this._listeners=[i.listen("window","resize",o),i.listen("window","orientationchange",o)]}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:i,height:o}=this.getViewportSize();return{top:n.top,left:n.left,bottom:n.top+o,right:n.left+i,height:o,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let n=this._document,i=this._getWindow(),o=n.documentElement,s=o.getBoundingClientRect(),a=-s.top||n.body.scrollTop||i.scrollY||o.scrollTop||0,c=-s.left||n.body.scrollLeft||i.scrollX||o.scrollLeft||0;return{top:a,left:c}}change(n=W_){return n>0?this._change.pipe((0,r.x)(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=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Yi={},ql=(()=>{class t{_appId=(0,r.K)(r._);getId(n){return this._appId!=="ng"&&(n+=this._appId),Yi.hasOwnProperty(n)||(Yi[n]=0),`${n}${Yi[n]++}`}static \u0275fac=function(n){return new(n||t)};static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Zl(t){return Array.isArray(t)?t:[t]}function Yl(t){let e=t.cloneNode(!0),n=e.querySelectorAll("[id]"),i=t.nodeName.toLowerCase();e.removeAttribute("id");for(let o=0;o<n.length;o++)n[o].removeAttribute("id");return i==="canvas"?ia(t,e):(i==="input"||i==="select"||i==="textarea")&&na(t,e),ea("canvas",t,e,ia),ea("input, textarea, select",t,e,na),e}function ea(t,e,n,i){let o=e.querySelectorAll(t);if(o.length){let s=n.querySelectorAll(t);for(let a=0;a<o.length;a++)i(o[a],s[a])}}var G_=0;function na(t,e){e.type!=="file"&&(e.value=t.value),e.type==="radio"&&e.name&&(e.name=`mat-clone-${e.name}-${G_++}`)}function ia(t,e){let n=e.getContext("2d");if(n)try{n.drawImage(t,0,0)}catch{}}function So(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 Lr(t,e,n){let{top:i,bottom:o,left:s,right:a}=t;return n>=i&&n<=o&&e>=s&&e<=a}function bn(t,e,n){t.top+=e,t.bottom=t.top+t.height,t.left+=n,t.right=t.left+t.width}function ra(t,e,n,i){let{top:o,right:s,bottom:a,left:c,width:h,height:f}=t,_=h*e,d=f*e;return i>o-d&&i<a+d&&n>c-_&&n<s+_}var Kl=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:So(e)})})}handleScroll(t){let e=ce(t),n=this.positions.get(e);if(!n)return null;let i=n.scrollPosition,o,s;if(e===this._document){let h=this.getViewportScrollPosition();o=h.top,s=h.left}else o=e.scrollTop,s=e.scrollLeft;let a=i.top-o,c=i.left-s;return this.positions.forEach((h,f)=>{h.clientRect&&e!==f&&e.contains(f)&&bn(h.clientRect,a,c)}),i.top=o,i.left=s,{top:a,left:c}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Jl(t,e){let n=t.rootNodes;if(n.length===1&&n[0].nodeType===e.ELEMENT_NODE)return n[0];let i=e.createElement("div");return n.forEach(o=>i.appendChild(o)),i}function Co(t,e,n){for(let i in e)if(e.hasOwnProperty(i)){let o=e[i];o?t.setProperty(i,o,n?.has(i)?"important":""):t.removeProperty(i)}return t}function Ke(t,e){let n=e?"":"none";Co(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 oa(t,e,n){Co(t.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},n)}function li(t,e){return e&&e!="none"?t+" "+e:t}function sa(t,e){t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.transform=ci(e.left,e.top)}function ci(t,e){return`translate3d(${Math.round(t)}px, ${Math.round(e)}px, 0)`}function aa(t){let e=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*e}function q_(t){let e=getComputedStyle(t),n=Ki(e,"transition-property"),i=n.find(c=>c==="transform"||c==="all");if(!i)return 0;let o=n.indexOf(i),s=Ki(e,"transition-duration"),a=Ki(e,"transition-delay");return aa(s[o])+aa(a[o])}function Ki(t,e){return t.getPropertyValue(e).split(",").map(n=>n.trim())}var Z_=new Set(["position"]),Y_=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(t,e,n,i,o,s,a,c,h,f){this._document=t,this._rootElement=e,this._direction=n,this._initialDomRect=i,this._previewTemplate=o,this._previewClass=s,this._pickupPositionOnPage=a,this._initialTransform=c,this._zIndex=h,this._renderer=f}attach(t){this._preview=this._createPreview(),t.appendChild(this._preview),la(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 q_(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,i;if(n&&t){let o=t.matchSize?this._initialDomRect:null,s=t.viewContainer.createEmbeddedView(n,t.context);s.detectChanges(),i=Jl(s,this._document),this._previewEmbeddedView=s,t.matchSize?sa(i,o):i.style.transform=ci(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else i=Yl(this._rootElement),sa(i,this._initialDomRect),this._initialTransform&&(i.style.transform=this._initialTransform);return Co(i.style,{"pointer-events":"none",margin:la(i)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},Z_),Ke(i,!1),i.classList.add("cdk-drag-preview"),i.setAttribute("popover","manual"),i.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(o=>i.classList.add(o)):i.classList.add(e)),i}};function la(t){return"showPopover"in t}var K_={passive:!0},ca={passive:!1},J_={passive:!1,capture:!0},X_=800,ua=new Set(["position"]),Q_=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=(0,r.Y)(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new r.j;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=r.h.EMPTY;_pointerUpSubscription=r.h.EMPTY;_scrollSubscription=r.h.EMPTY;_resizeSubscription=r.h.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=>Ke(e,t)))}_disabled=!1;beforeStarted=new r.j;started=new r.j;released=new r.j;ended=new r.j;entered=new r.j;exited=new r.j;dropped=new r.j;moved=this._moveEvents;data;constrainPosition;constructor(t,e,n,i,o,s,a){this._config=e,this._document=n,this._ngZone=i,this._viewportRuler=o,this._dragDropRegistry=s,this._renderer=a,this.withRootElement(t).withParent(e.parentDragRef||null),this._parentPositions=new Kl(n),s.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=>se(n)),this._handles.forEach(n=>Ke(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=se(t);return e!==this._rootElement&&(this._removeRootElementListeners(),this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[Gt(this._renderer,e,"mousedown",this._pointerDown,ca),Gt(this._renderer,e,"touchstart",this._pointerDown,K_),Gt(this._renderer,e,"dragstart",this._nativeDragStart,ca)]),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?se(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),Ke(t,!0))}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),Ke(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 i=Math.abs(e.x-this._pickupPositionOnPage.x),o=Math.abs(e.y-this._pickupPositionOnPage.y);if(i+o>=this._config.dragStartThreshold){let s=Date.now()>=this._dragStartTime+this._getDragStartDelay(t),a=this._dropContainer;if(!s){this._endDragSequence(t);return}(!a||!a.isDragging()&&!a.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 i=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,o=this._activeTransform;o.x=n.x-i.x+this._passiveTransform.x,o.y=n.y-i.y+this._passiveTransform.y,this._applyRootElementTransform(o.x,o.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){fn(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),n=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=Gt(this._renderer,e,"selectstart",tm,J_)}),n){let i=this._rootElement,o=i.parentNode,s=this._placeholder=this._createPlaceholderElement(),a=this._anchor=this._anchor||this._document.createComment("");o.insertBefore(a,i),this._initialTransform=i.style.transform||"",this._preview=new Y_(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(o,e)),oa(i,!1,ua),this._document.body.appendChild(o.replaceChild(s,i)),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(),i=fn(e),o=!i&&e.button!==0,s=this._rootElement,a=ce(e),c=!i&&this._lastTouchEventTime&&this._lastTouchEventTime+X_>Date.now(),h=i?Gl(e):Wl(e);if(a&&a.draggable&&e.type==="mousedown"&&e.preventDefault(),n||o||c||h)return;if(this._handles.length){let d=s.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=So(this._boundaryElement));let f=this._previewTemplate;this._pickupPositionInElement=f&&f.template&&!f.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,t,e);let _=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:_.x,y:_.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){oa(this._rootElement,!0,ua),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),i=this._getPointerPositionOnPage(t),o=this._getDragDistance(i),s=e._isOverContainer(i.x,i.y);this.ended.next({source:this,distance:o,dropPoint:i,event:t}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:o,dropPoint:i,event:t}),e.drop(this,n,this._initialIndex,this._initialContainer,s,o,i,t),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:n,y:i}){let o=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(o=this._initialContainer),o&&o!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=o,this._dropContainer.enter(this,t,e,o===this._initialContainer&&o.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:o,currentIndex:o.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,i),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 i=a=>{(!a||this._preview&&ce(a)===this._preview.element&&a.propertyName==="transform")&&(s(),n(),clearTimeout(o))},o=setTimeout(i,e*1.5),s=this._preview.addEventListener("transitionend",i)}))}_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=Jl(this._placeholderRef,this._document)):n=Yl(this._rootElement),n.style.pointerEvents="none",n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(t,e,n){let i=e===this._rootElement?null:e,o=i?i.getBoundingClientRect():t,s=fn(n)?n.targetTouches[0]:n,a=this._getViewportScrollPosition(),c=s.pageX-o.left-a.left,h=s.pageY-o.top-a.top;return{x:o.left-t.left+c,y:o.top-t.top+h}}_getPointerPositionOnPage(t){let e=this._getViewportScrollPosition(),n=fn(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,i=n.pageX-e.left,o=n.pageY-e.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let a=this._ownerSVGElement.createSVGPoint();return a.x=i,a.y=o,a.matrixTransform(s.inverse())}}return{x:i,y:o}}_getConstrainedPointerPosition(t){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:n,y:i}=this.constrainPosition?this.constrainPosition(t,this,this._initialDomRect,this._pickupPositionInElement):t;if(this.lockAxis==="x"||e==="x"?i=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:o,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:c,height:h}=this._getPreviewRect(),f=a.top+s,_=a.bottom-(h-s),d=a.left+o,E=a.right-(c-o);n=ha(n,d,E),i=ha(i,f,_)}return{x:n,y:i}}_updatePointerDirectionDelta(t){let{x:e,y:n}=t,i=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,s=Math.abs(e-o.x),a=Math.abs(n-o.y);return s>this._config.pointerDirectionChangeThreshold&&(i.x=e>o.x?1:-1,o.x=e),a>this._config.pointerDirectionChangeThreshold&&(i.y=n>o.y?1:-1,o.y=n),i}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,Ke(this._rootElement,t))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(t=>t()),this._rootElementCleanups=void 0}_applyRootElementTransform(t,e){let n=1/this.scale,i=ci(t*n,e*n),o=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=o.transform&&o.transform!="none"?o.transform:""),o.transform=li(i,this._initialTransform)}_applyPreviewTransform(t,e){let n=this._previewTemplate?.template?void 0:this._initialTransform,i=ci(t,e);this._preview.setTransform(li(i,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(),i=this._boundaryElement.getBoundingClientRect();if(i.width===0&&i.height===0||n.width===0&&n.height===0)return;let o=i.left-n.left,s=n.right-i.right,a=i.top-n.top,c=n.bottom-i.bottom;i.width>n.width?(o>0&&(t+=o),s>0&&(t-=s)):t=0,i.height>n.height?(a>0&&(e+=a),c>0&&(e-=c)):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:fn(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){let e=this._parentPositions.handleScroll(t);if(e){let n=ce(t);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&bn(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=Si(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(t,e){let n=this._previewContainer||"global";if(n==="parent")return t;if(n==="global"){let i=this._document;return e||i.fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.msFullscreenElement||i.body}return se(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 ha(t,e,n){return Math.max(e,Math.min(n,t))}function fn(t){return t.type[0]==="t"}function tm(t){t.preventDefault()}function Xl(t,e,n){let i=da(e,t.length-1),o=da(n,t.length-1);if(i===o)return;let s=t[i],a=o<i?-1:1;for(let c=i;c!==o;c+=a)t[c]=t[c+a];t[o]=s}function da(t,e){return Math.max(0,Math.min(e,t))}var pa=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,i){let o=this._itemPositions,s=this._getItemIndexFromPointerPosition(t,e,n,i);if(s===-1&&o.length>0)return null;let a=this.orientation==="horizontal",c=o.findIndex(D=>D.drag===t),h=o[s],f=o[c].clientRect,_=h.clientRect,d=c>s?1:-1,E=this._getItemOffsetPx(f,_,d),I=this._getSiblingOffsetPx(c,o,d),S=o.slice();return Xl(o,c,s),o.forEach((D,M)=>{if(S[M]===D)return;let L=D.drag===t,z=L?E:I,X=L?t.getPlaceholderElement():D.drag.getRootElement();D.offset+=z;let H=Math.round(D.offset*(1/D.drag.scale));a?(X.style.transform=li(`translate3d(${H}px, 0, 0)`,D.initialTransform),bn(D.clientRect,0,z)):(X.style.transform=li(`translate3d(0, ${H}px, 0)`,D.initialTransform),bn(D.clientRect,z,0))}),this._previousSwap.overlaps=Lr(_,e,n),this._previousSwap.drag=h.drag,this._previousSwap.delta=a?i.x:i.y,{previousIndex:c,currentIndex:s}}enter(t,e,n,i){let o=i==null||i<0?this._getItemIndexFromPointerPosition(t,e,n):i,s=this._activeDraggables,a=s.indexOf(t),c=t.getPlaceholderElement(),h=s[o];if(h===t&&(h=s[o+1]),!h&&(o==null||o===-1||o<s.length-1)&&this._shouldEnterAsFirstChild(e,n)&&(h=s[0]),a>-1&&s.splice(a,1),h&&!this._dragDropRegistry.isDragging(h)){let f=h.getRootElement();f.parentElement.insertBefore(c,f),s.splice(o,0,t)}else this._element.appendChild(c),s.push(t);c.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(i=>i.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})=>{bn(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:So(n)}}).sort((e,n)=>t?e.clientRect.left-n.clientRect.left:e.clientRect.top-n.clientRect.top)}_getItemOffsetPx(t,e,n){let i=this.orientation==="horizontal",o=i?e.left-t.left:e.top-t.top;return n===-1&&(o+=i?e.width-t.width:e.height-t.height),o}_getSiblingOffsetPx(t,e,n){let i=this.orientation==="horizontal",o=e[t].clientRect,s=e[t+n*-1],a=o[i?"width":"height"]*n;if(s){let c=i?"left":"top",h=i?"right":"bottom";n===-1?a-=s.clientRect[c]-o[h]:a+=o[c]-s.clientRect[h]}return a}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return!1;let n=this._itemPositions,i=this.orientation==="horizontal";if(n[0].drag!==this._activeDraggables[0]){let o=n[n.length-1].clientRect;return i?t>=o.right:e>=o.bottom}else{let o=n[0].clientRect;return i?t<=o.left:e<=o.top}}_getItemIndexFromPointerPosition(t,e,n,i){let o=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:a,clientRect:c})=>{if(a===t)return!1;if(i){let h=o?i.x:i.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&h===this._previousSwap.delta)return!1}return o?e>=Math.floor(c.left)&&e<Math.floor(c.right):n>=Math.floor(c.top)&&n<Math.floor(c.bottom)});return s===-1||!this._sortPredicate(s,t)?-1:s}},em=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 i=e[n];this._relatedNodes.push([i,i.nextSibling])}this.withItems(t)}sort(t,e,n,i){let o=this._getItemIndexFromPointerPosition(t,e,n),s=this._previousSwap;if(o===-1||this._activeItems[o]===t)return null;let a=this._activeItems[o];if(s.drag===a&&s.overlaps&&s.deltaX===i.x&&s.deltaY===i.y)return null;let c=this.getItemIndex(t),h=t.getPlaceholderElement(),f=a.getRootElement();o>c?f.after(h):f.before(h),Xl(this._activeItems,c,o);let _=this._getRootNode().elementFromPoint(e,n);return s.deltaX=i.x,s.deltaY=i.y,s.drag=a,s.overlaps=f===_||f.contains(_),{previousIndex:c,currentIndex:o}}enter(t,e,n,i){let o=i==null||i<0?this._getItemIndexFromPointerPosition(t,e,n):i;o===-1&&(o=this._getClosestItemIndexToPointer(t,e,n));let s=this._activeItems[o],a=this._activeItems.indexOf(t);a>-1&&this._activeItems.splice(a,1),s&&!this._dragDropRegistry.isDragging(s)?(this._activeItems.splice(o,0,t),s.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[i,o]=this._relatedNodes[n];i.parentNode===t&&i.nextSibling!==o&&(o===null?t.appendChild(i):o.parentNode===t&&t.insertBefore(i,o))}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 i=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(n)),o=i?this._activeItems.findIndex(s=>{let a=s.getRootElement();return i===a||a.contains(i)}):-1;return o===-1||!this._sortPredicate(o,t)?-1:o}_getRootNode(){return this._rootNode||(this._rootNode=Si(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 i=1/0,o=-1;for(let s=0;s<this._activeItems.length;s++){let a=this._activeItems[s];if(a!==t){let{x:c,y:h}=a.getRootElement().getBoundingClientRect(),f=Math.hypot(e-c,n-h);f<i&&(i=f,o=s)}}return o}},fa=.05,Ql=.05,ee=function(t){return t[t.NONE=0]="NONE",t[t.UP=1]="UP",t[t.DOWN=2]="DOWN",t}(ee||{}),zt=function(t){return t[t.NONE=0]="NONE",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t}(zt||{}),nm=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new r.j;entered=new r.j;exited=new r.j;dropped=new r.j;sorted=new r.j;receivingStarted=new r.j;receivingStopped=new r.j;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=r.h.EMPTY;_verticalScrollDirection=ee.NONE;_horizontalScrollDirection=zt.NONE;_scrollNode;_stopScrollTimers=new r.j;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(t,e,n,i,o){this._dragDropRegistry=e,this._ngZone=i,this._viewportRuler=o;let s=this.element=se(t);this._document=n,this.withOrientation("vertical").withElementContainer(s),e.registerDropContainer(this),this._parentPositions=new Kl(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,i){this._draggingStarted(),i==null&&this.sortingDisabled&&(i=this._draggables.indexOf(t)),this._sortStrategy.enter(t,e,n,i),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,i,o,s,a,c={}){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:n,container:this,previousContainer:i,isPointerOverContainer:o,distance:s,dropPoint:a,event:c})}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 pa&&(this._sortStrategy.direction=t),this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){if(t==="mixed")this._sortStrategy=new em(this._document,this._dragDropRegistry);else{let e=new pa(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=se(this.element),n=this._scrollableElements.indexOf(this._container),i=this._scrollableElements.indexOf(t);return n>-1&&this._scrollableElements.splice(n,1),i>-1&&this._scrollableElements.splice(i,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,i){if(this.sortingDisabled||!this._domRect||!ra(this._domRect,fa,e,n))return;let o=this._sortStrategy.sort(t,e,n,i);o&&this.sorted.next({previousIndex:o.previousIndex,currentIndex:o.currentIndex,container:this,item:t})}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let n,i=ee.NONE,o=zt.NONE;if(this._parentPositions.positions.forEach((s,a)=>{a===this._document||!s.clientRect||n||ra(s.clientRect,fa,t,e)&&([i,o]=im(a,s.clientRect,this._direction,t,e),(i||o)&&(n=a))}),!i&&!o){let{width:s,height:a}=this._viewportRuler.getViewportSize(),c={width:s,height:a,top:0,right:s,bottom:a,left:0};i=tc(c,e),o=ec(c,t),n=window}n&&(i!==this._verticalScrollDirection||o!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=i,this._horizontalScrollDirection=o,this._scrollNode=n,(i||o)&&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(),(0,r.u)(0,r.m).pipe((0,r.D)(this._stopScrollTimers)).subscribe(()=>{let t=this._scrollNode,e=this.autoScrollStep;this._verticalScrollDirection===ee.UP?t.scrollBy(0,-e):this._verticalScrollDirection===ee.DOWN&&t.scrollBy(0,e),this._horizontalScrollDirection===zt.LEFT?t.scrollBy(-e,0):this._horizontalScrollDirection===zt.RIGHT&&t.scrollBy(e,0)})};_isOverContainer(t,e){return this._domRect!=null&&Lr(this._domRect,t,e)}_getSiblingContainerFromPosition(t,e,n){return this._siblings.find(i=>i._canReceive(t,e,n))}_canReceive(t,e,n){if(!this._domRect||!Lr(this._domRect,e,n)||!this.enterPredicate(t,this))return!1;let i=this._getShadowRoot().elementFromPoint(e,n);return i?i===this._container||this._container.contains(i):!1}_startReceiving(t,e){let n=this._activeSiblings;!n.has(t)&&e.every(i=>this.enterPredicate(i,this)||this._draggables.indexOf(i)>-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=Si(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 tc(t,e){let{top:n,bottom:i,height:o}=t,s=o*Ql;return e>=n-s&&e<=n+s?ee.UP:e>=i-s&&e<=i+s?ee.DOWN:ee.NONE}function ec(t,e){let{left:n,right:i,width:o}=t,s=o*Ql;return e>=n-s&&e<=n+s?zt.LEFT:e>=i-s&&e<=i+s?zt.RIGHT:zt.NONE}function im(t,e,n,i,o){let s=tc(e,o),a=ec(e,i),c=ee.NONE,h=zt.NONE;if(s){let f=t.scrollTop;s===ee.UP?f>0&&(c=ee.UP):t.scrollHeight-f>t.clientHeight&&(c=ee.DOWN)}if(a){let f=t.scrollLeft;n==="rtl"?a===zt.RIGHT?f<0&&(h=zt.RIGHT):t.scrollWidth+f>t.clientWidth&&(h=zt.LEFT):a===zt.LEFT?f>0&&(h=zt.LEFT):t.scrollWidth-f>t.clientWidth&&(h=zt.RIGHT)}return[c,h]}var gn={capture:!0},Ji={passive:!1,capture:!0},rm=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=(0,r.na)({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(n,i){},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}
|
|
35
|
+
`],encapsulation:2,changeDetection:0})}return t})(),nc=(()=>{class t{_ngZone=(0,r.K)(r.V);_document=(0,r.K)(r.lb);_styleLoader=(0,r.K)(Ci);_renderer=(0,r.K)(r.ia).createRenderer(null,null);_cleanupDocumentTouchmove;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=(0,r.Y)([]);_globalListeners;_draggingPredicate=n=>n.isDragging();_domNodesToDirectives=null;pointerMove=new r.j;pointerUp=new r.j;scroll=new r.j;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=Gt(this._renderer,this._document,"touchmove",this._persistentTouchmoveListener,Ji)})}removeDropContainer(n){this._dropInstances.delete(n)}removeDragItem(n){this._dragInstances.delete(n),this.stopDragging(n),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(n,i){if(!(this._activeDragInstances().indexOf(n)>-1)&&(this._styleLoader.load(rm),this._activeDragInstances.update(o=>[...o,n]),this._activeDragInstances().length===1)){let o=i.type.startsWith("touch"),s=c=>this.pointerUp.next(c),a=[["scroll",c=>this.scroll.next(c),gn],["selectstart",this._preventDefaultWhileDragging,Ji]];o?a.push(["touchend",s,gn],["touchcancel",s,gn]):a.push(["mouseup",s,gn]),o||a.push(["mousemove",c=>this.pointerMove.next(c),Ji]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=a.map(([c,h,f])=>Gt(this._renderer,this._document,c,h,f))})}}stopDragging(n){this._activeDragInstances.update(i=>{let o=i.indexOf(n);return o>-1?(i.splice(o,1),[...i]):i}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(n){return this._activeDragInstances().indexOf(n)>-1}scrolled(n){let i=[this.scroll];return n&&n!==this._document&&i.push(new r.i(o=>this._ngZone.runOutsideAngular(()=>{let s=Gt(this._renderer,n,"scroll",a=>{this._activeDragInstances().length&&o.next(a)},gn);return()=>{s()}}))),(0,r.v)(...i)}registerDirectiveNode(n,i){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(n,i)}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=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),om={dragStartThreshold:5,pointerDirectionChangeThreshold:5},sm=(()=>{class t{_document=(0,r.K)(r.lb);_ngZone=(0,r.K)(r.V);_viewportRuler=(0,r.K)(xo);_dragDropRegistry=(0,r.K)(nc);_renderer=(0,r.K)(r.ia).createRenderer(null,null);constructor(){}createDrag(n,i=om){return new Q_(n,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(n){return new nm(n,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ga=new r.I("CDK_DRAG_PARENT"),am=new r.I("CdkDragHandle"),lm=new r.I("CDK_DRAG_CONFIG"),cm=new r.I("CdkDropList"),um=(()=>{class t{element=(0,r.K)(r.X);dropContainer=(0,r.K)(cm,{optional:!0,skipSelf:!0});_ngZone=(0,r.K)(r.V);_viewContainerRef=(0,r.K)(r.la);_dir=(0,r.K)(ai,{optional:!0});_changeDetectorRef=(0,r.K)(r.eb);_selfHandle=(0,r.K)(am,{optional:!0,self:!0});_parentDrag=(0,r.K)(ga,{optional:!0,skipSelf:!0});_dragDropRegistry=(0,r.K)(nc);_destroyed=new r.j;_handles=new r.k([]);_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 r.U;released=new r.U;ended=new r.U;entered=new r.U;exited=new r.U;dropped=new r.U;moved=new r.i(n=>{let i=this._dragRef.moved.pipe((0,r.q)(o=>({source:this,pointerPosition:o.pointerPosition,event:o.event,delta:o.delta,distance:o.distance}))).subscribe(n);return()=>{i.unsubscribe()}});_injector=(0,r.K)(r.S);constructor(){let n=this.dropContainer,i=(0,r.K)(lm,{optional:!0}),o=(0,r.K)(sm);this._dragRef=o.createDrag(this.element,{dragStartThreshold:i&&i.dragStartThreshold!=null?i.dragStartThreshold:5,pointerDirectionChangeThreshold:i&&i.pointerDirectionChangeThreshold!=null?i.pointerDirectionChangeThreshold:5,zIndex:i?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),i&&this._assignDefaults(i),n&&(this._dragRef._withDropContainer(n._dropListRef),n.addItem(this),n._dropListRef.beforeStarted.pipe((0,r.D)(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(){(0,r.ca)(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(n){let i=n.rootElementSelector,o=n.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,o&&!o.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 i=this._handles.getValue();i.push(n),this._handles.next(i)}_removeHandle(n){let i=this._handles.getValue(),o=i.indexOf(n);o>-1&&(i.splice(o,1),this._handles.next(i))}_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,i=n;this.rootElementSelector&&(i=n.closest!==void 0?n.closest(this.rootElementSelector):n.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||n)}_getBoundaryElement(){let n=this.boundaryElement;return n?typeof n=="string"?this.element.nativeElement.closest(n):se(n):null}_syncInputs(n){n.beforeStarted.subscribe(()=>{if(!n.isDragging()){let i=this._dir,o=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,a=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 o=="object"&&o?o:L_(o),n.constrainPosition=this.constrainPosition,n.previewClass=this.previewClass,n.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(a).withPreviewContainer(this.previewContainer||"global"),i&&n.withDirection(i.value)}}),n.beforeStarted.pipe((0,r.y)(1)).subscribe(()=>{if(this._parentDrag){n.withParent(this._parentDrag._dragRef);return}let i=this.element.nativeElement.parentElement;for(;i;){let o=this._dragDropRegistry.getDragDirectiveForNode(i);if(o){n.withParent(o._dragRef);break}i=i.parentElement}})}_handleEvents(n){n.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),n.released.subscribe(i=>{this.released.emit({source:this,event:i.event})}),n.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),n.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),n.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),n.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(n){let{lockAxis:i,dragStartDelay:o,constrainPosition:s,previewClass:a,boundaryElement:c,draggingDisabled:h,rootElementSelector:f,previewContainer:_}=n;this.disabled=h??!1,this.dragStartDelay=o||0,i&&(this.lockAxis=i),s&&(this.constrainPosition=s),a&&(this.previewClass=a),c&&(this.boundaryElement=c),f&&(this.rootElementSelector=f),_&&(this.previewContainer=_)}_setupHandlesListener(){this._handles.pipe((0,r.E)(n=>{let i=n.map(o=>o.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),(0,r.C)(n=>(0,r.v)(...n.map(i=>i._stateChanges.pipe((0,r.B)(i))))),(0,r.D)(this._destroyed)).subscribe(n=>{let i=this._dragRef,o=n.element.nativeElement;n.disabled?i.disableHandle(o):i.enableHandle(o)})}static \u0275fac=function(n){return new(n||t)};static \u0275dir=(0,r.pa)({type:t,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(n,i){n&2&&(0,r.xa)("cdk-drag-disabled",i.disabled)("cdk-drag-dragging",i._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",r.fb],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",r.gb]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[(0,r.Wa)([{provide:ga,useExisting:t}]),r.M]})}return t})(),hm=t=>({"lc:cursor-grab":t}),dm=(t,e)=>e.url;function pm(t,e){if(t&1&&(0,r.Ga)(0,"source",11),t&2){let n=e.$implicit;(0,r.La)("type",n.mimeType),(0,r.va)("src",n.url,r.ea)}}var fm=class Br{constructor(e){this.elementRef=e}video;closeClicked=new r.U;videoClicked=new r.U;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||Br)((0,r.ka)(r.X))};static \u0275cmp=(0,r.na)({type:Br,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&&((0,r.Ea)(0,"div",0),(0,r.Ja)("click",function(){return n.onVideoClick()})("keyup",function(){return n.onVideoClick()})("cdkDragMoved",function(){return n.isDragging=!0}),(0,r.Ea)(1,"button",1),(0,r.Ja)("click",function(i){return i.stopPropagation(),n.close()}),(0,r.P)(),(0,r.Ea)(2,"svg",2),(0,r.Ga)(3,"path",3)(4,"path",4),(0,r.Fa)()(),(0,r.Q)(),(0,r.Ea)(5,"div",5)(6,"div",6),(0,r.P)(),(0,r.Ea)(7,"svg",7),(0,r.Ga)(8,"path",8),(0,r.Fa)()(),(0,r.Q)(),(0,r.Ea)(9,"div",9),(0,r.Qa)(10,"Tap to unmute"),(0,r.Fa)()(),(0,r.Ea)(11,"video",10),(0,r.Ca)(12,pm,1,2,"source",11,dm),(0,r.Fa)()()),e&2&&((0,r.va)("ngClass",(0,r.Xa)(3,hm,n.isDragging))("cdkDragBoundary","body"),(0,r.fa)(11),(0,r.va)("muted",!0),(0,r.fa)(),(0,r.Da)(n.video.sources))},dependencies:[r.nb,um],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}"]})},To=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}},jr=class extends To{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(t,e,n,i,o){super(),this.component=t,this.viewContainerRef=e,this.injector=n,this.projectableNodes=o}},ic=class extends To{templateRef;viewContainerRef;context;injector;constructor(t,e,n,i){super(),this.templateRef=t,this.viewContainerRef=e,this.context=n,this.injector=i}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()}},gm=class extends To{element;constructor(t){super(),this.element=t instanceof r.X?t.nativeElement:t}},Oo=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(t){if(t instanceof jr)return this._attachedPortal=t,this.attachComponentPortal(t);if(t instanceof ic)return this._attachedPortal=t,this.attachTemplatePortal(t);if(this.attachDomPortal&&t instanceof gm)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)}},_m=class extends Oo{outletElement;_appRef;_defaultInjector;_document;constructor(t,e,n,i,o){super(),this.outletElement=t,this._appRef=n,this._defaultInjector=i,this._document=o}attachComponentPortal(t){let e;if(t.viewContainerRef){let n=t.injector||t.viewContainerRef.injector,i=n.get(r.ma,null,{optional:!0})||void 0;e=t.viewContainerRef.createComponent(t.component,{index:t.viewContainerRef.length,injector:n,ngModuleRef:i,projectableNodes:t.projectableNodes||void 0}),this.setDisposeFn(()=>e.destroy())}else{let n=this._appRef,i=t.injector||this._defaultInjector||r.S.NULL,o=i.get(r.L,n.injector);e=(0,r.kb)(t.component,{elementInjector:i,environmentInjector:o,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(i=>this.outletElement.appendChild(i)),n.detectChanges(),this.setDisposeFn(()=>{let i=e.indexOf(n);i!==-1&&e.remove(i)}),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]}},_a=(()=>{class t extends Oo{_moduleRef=(0,r.K)(r.ma,{optional:!0});_document=(0,r.K)(r.lb);_viewContainerRef=(0,r.K)(r.la);_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 r.U;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(n){n.setAttachedHost(this);let i=n.viewContainerRef!=null?n.viewContainerRef:this._viewContainerRef,o=i.createComponent(n.component,{index:i.length,injector:n.injector||i.injector,projectableNodes:n.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return i!==this._viewContainerRef&&this._getRootNode().appendChild(o.hostView.rootNodes[0]),super.setDisposeFn(()=>o.destroy()),this._attachedPortal=n,this._attachedRef=o,this.attached.emit(o),o}attachTemplatePortal(n){n.setAttachedHost(this);let i=this._viewContainerRef.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=n,this._attachedRef=i,this.attached.emit(i),i}attachDomPortal=n=>{let i=n.element;i.parentNode;let o=this._document.createComment("dom-portal");n.setAttachedHost(this),i.parentNode.insertBefore(o,i),this._getRootNode().appendChild(i),this._attachedPortal=n,super.setDisposeFn(()=>{o.parentNode&&o.parentNode.replaceChild(i,o)})};_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=(0,r.pa)({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[r.ra]})}return t})(),_n;function mm(){if(_n==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>_n=!0}))}finally{_n=_n||!1}return _n}function vm(t){return mm()?t:!!t.capture}var ym=new r.I("cdk-input-modality-detector-options"),bm={ignoreKeys:[18,17,224,91,16]},rc=650,Xi={passive:!0,capture:!0},wm=(()=>{class t{_platform=(0,r.K)(be);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new r.k(null);_options;_lastTouchMs=0;_onKeydown=n=>{this._options?.ignoreKeys?.some(i=>i===n.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=ce(n))};_onMousedown=n=>{Date.now()-this._lastTouchMs<rc||(this._modality.next(Wl(n)?"keyboard":"mouse"),this._mostRecentTarget=ce(n))};_onTouchstart=n=>{if(Gl(n)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=ce(n)};constructor(){let n=(0,r.K)(r.V),i=(0,r.K)(r.lb),o=(0,r.K)(ym,{optional:!0});if(this._options=(0,r.a)((0,r.a)({},bm),o),this.modalityDetected=this._modality.pipe((0,r.A)(1)),this.modalityChanged=this.modalityDetected.pipe((0,r.z)()),this._platform.isBrowser){let s=(0,r.K)(r.ia).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[Gt(s,i,"keydown",this._onKeydown,Xi),Gt(s,i,"mousedown",this._onMousedown,Xi),Gt(s,i,"touchstart",this._onTouchstart,Xi)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(n=>n())}static \u0275fac=function(n){return new(n||t)};static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Jn=function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t}(Jn||{}),Em=new r.I("cdk-focus-monitor-default-options"),Gn=vm({passive:!0,capture:!0}),xm=(()=>{class t{_ngZone=(0,r.K)(r.V);_platform=(0,r.K)(be);_inputModalityDetector=(0,r.K)(wm);_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=(0,r.K)(r.lb,{optional:!0});_stopInputModalityDetector=new r.j;constructor(){let n=(0,r.K)(Em,{optional:!0});this._detectionMode=n?.detectionMode||Jn.IMMEDIATE}_rootNodeFocusAndBlurListener=n=>{let i=ce(n);for(let o=i;o;o=o.parentElement)n.type==="focus"?this._onFocus(n,o):this._onBlur(n,o)};monitor(n,i=!1){let o=se(n);if(!this._platform.isBrowser||o.nodeType!==1)return(0,r.p)();let s=Si(o)||this._getDocument(),a=this._elementInfo.get(o);if(a)return i&&(a.checkChildren=!0),a.subject;let c={checkChildren:i,subject:new r.j,rootNode:s};return this._elementInfo.set(o,c),this._registerGlobalListeners(c),c.subject}stopMonitoring(n){let i=se(n),o=this._elementInfo.get(i);o&&(o.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(o))}focusVia(n,i,o){let s=se(n),a=this._getDocument().activeElement;s===a?this._getClosestElementsInfo(s).forEach(([c,h])=>this._originChanged(c,i,h)):(this._setOrigin(i),typeof s.focus=="function"&&s.focus(o))}ngOnDestroy(){this._elementInfo.forEach((n,i)=>this.stopMonitoring(i))}_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===Jn.EVENTUAL||!!n?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(n,i){n.classList.toggle("cdk-focused",!!i),n.classList.toggle("cdk-touch-focused",i==="touch"),n.classList.toggle("cdk-keyboard-focused",i==="keyboard"),n.classList.toggle("cdk-mouse-focused",i==="mouse"),n.classList.toggle("cdk-program-focused",i==="program")}_setOrigin(n,i=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=n,this._originFromTouchInteraction=n==="touch"&&i,this._detectionMode===Jn.IMMEDIATE){clearTimeout(this._originTimeoutId);let o=this._originFromTouchInteraction?rc:1;this._originTimeoutId=setTimeout(()=>this._origin=null,o)}})}_onFocus(n,i){let o=this._elementInfo.get(i),s=ce(n);!o||!o.checkChildren&&i!==s||this._originChanged(i,this._getFocusOrigin(s),o)}_onBlur(n,i){let o=this._elementInfo.get(i);!o||o.checkChildren&&n.relatedTarget instanceof Node&&i.contains(n.relatedTarget)||(this._setClasses(i),this._emitOrigin(o,null))}_emitOrigin(n,i){n.subject.observers.length&&this._ngZone.run(()=>n.subject.next(i))}_registerGlobalListeners(n){if(!this._platform.isBrowser)return;let i=n.rootNode,o=this._rootNodeFocusListenerCount.get(i)||0;o||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,Gn),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,Gn)}),this._rootNodeFocusListenerCount.set(i,o+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe((0,r.D)(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(n){let i=n.rootNode;if(this._rootNodeFocusListenerCount.has(i)){let o=this._rootNodeFocusListenerCount.get(i);o>1?this._rootNodeFocusListenerCount.set(i,o-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Gn),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Gn),this._rootNodeFocusListenerCount.delete(i))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(n,i,o){this._setClasses(n,i),this._emitOrigin(o,i),this._lastFocusOrigin=i}_getClosestElementsInfo(n){let i=[];return this._elementInfo.forEach((o,s)=>{(s===n||o.checkChildren&&s.contains(n))&&i.push([s,o])}),i}_isLastInteractionFromInputLabel(n){let{_mostRecentTarget:i,mostRecentModality:o}=this._inputModalityDetector;if(o!=="mouse"||!i||i===n||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA"||n.disabled)return!1;let s=n.labels;if(s){for(let a=0;a<s.length;a++)if(s[a].contains(i))return!0}return!1}static \u0275fac=function(n){return new(n||t)};static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Sm=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=(0,r.na)({type:t,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(n,i){},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}
|
|
36
36
|
`],encapsulation:2,changeDetection:0})}return t})(),oc=(()=>{class t{_platform=(0,r.K)(be);constructor(){}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return Tm(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let i=Cm(Am(n));if(i&&(ma(i)===-1||!this.isVisible(i)))return!1;let o=n.nodeName.toLowerCase(),s=ma(n);return n.hasAttribute("contenteditable")?s!==-1:o==="iframe"||o==="object"||this._platform.WEBKIT&&this._platform.IOS&&!km(n)?!1:o==="audio"?n.hasAttribute("controls")?s!==-1:!1:o==="video"?s===-1?!1:s!==null?!0:this._platform.FIREFOX||n.hasAttribute("controls"):n.tabIndex>=0}isFocusable(n,i){return Nm(n)&&!this.isDisabled(n)&&(i?.ignoreVisibility||this.isVisible(n))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Cm(t){try{return t.frameElement}catch{return null}}function Tm(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function Om(t){let e=t.nodeName.toLowerCase();return e==="input"||e==="select"||e==="button"||e==="textarea"}function Im(t){return Rm(t)&&t.type=="hidden"}function Dm(t){return Pm(t)&&t.hasAttribute("href")}function Rm(t){return t.nodeName.toLowerCase()=="input"}function Pm(t){return t.nodeName.toLowerCase()=="a"}function sc(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let e=t.getAttribute("tabindex");return!!(e&&!isNaN(parseInt(e,10)))}function ma(t){if(!sc(t))return null;let e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}function km(t){let e=t.nodeName.toLowerCase(),n=e==="input"&&t.type;return n==="text"||n==="password"||e==="select"||e==="textarea"}function Nm(t){return Im(t)?!1:Om(t)||Dm(t)||t.hasAttribute("contenteditable")||sc(t)}function Am(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var Mm=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,i,o=!1,s){this._element=t,this._checker=e,this._ngZone=n,this._document=i,this._injector=s,o||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 i=e[n].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[n]):null;if(i)return i}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 i=e[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[n]):null;if(i)return i}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?(0,r.ca)(t,{injector:this._injector}):setTimeout(t)}},Lm=(()=>{class t{_checker=(0,r.K)(oc);_ngZone=(0,r.K)(r.V);_document=(0,r.K)(r.lb);_injector=(0,r.K)(r.S);constructor(){(0,r.K)(Ci).load(Sm)}create(n,i=!1){return new Mm(n,this._checker,this._ngZone,this._document,i,this._injector)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function va(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function Lt(t){return t==null?"":typeof t=="string"?t:`${t}px`}function Bm(t,...e){return e.length?e.some(n=>t[n]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var ya=$_(),jm=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=Lt(-this._previousScrollPosition.left),t.style.top=Lt(-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,i=e.style,o=n.scrollBehavior||"",s=i.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),ya&&(n.scrollBehavior=i.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),ya&&(n.scrollBehavior=o,i.scrollBehavior=s)}}_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}},Fm=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(t,e,n,i){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=n,this._config=i}attach(t){this._overlayRef,this._overlayRef=t}enable(){if(this._scrollSubscription)return;let t=this._scrollDispatcher.scrolled(0).pipe((0,r.w)(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())}},ac=class{enable(){}disable(){}attach(){}};function Fr(t,e){return e.some(n=>{let i=t.bottom<n.top,o=t.top>n.bottom,s=t.right<n.left,a=t.left>n.right;return i||o||s||a})}function ba(t,e){return e.some(n=>{let i=t.top<n.top,o=t.bottom>n.bottom,s=t.left<n.left,a=t.right>n.right;return i||o||s||a})}var Vm=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(t,e,n,i){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=n,this._config=i}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:i}=this._viewportRuler.getViewportSize();Fr(e,[{width:n,height:i,bottom:i,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}},Um=(()=>{class t{_scrollDispatcher=(0,r.K)(z_);_viewportRuler=(0,r.K)(xo);_ngZone=(0,r.K)(r.V);_document=(0,r.K)(r.lb);constructor(){}noop=()=>new ac;close=n=>new Fm(this._scrollDispatcher,this._ngZone,this._viewportRuler,n);block=()=>new jm(this._viewportRuler,this._document);reposition=n=>new Vm(this._scrollDispatcher,this._viewportRuler,this._ngZone,n);static \u0275fac=function(n){return new(n||t)};static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),lc=class{positionStrategy;scrollStrategy=new ac;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])}}},$m=class{connectionPair;scrollableViewProperties;constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}},cc=(()=>{class t{_attachedOverlays=[];_document=(0,r.K)(r.lb);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(n){this.remove(n),this._attachedOverlays.push(n)}remove(n){let i=this._attachedOverlays.indexOf(n);i>-1&&this._attachedOverlays.splice(i,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Hm=(()=>{class t extends cc{_ngZone=(0,r.K)(r.V);_renderer=(0,r.K)(r.ia).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 i=this._attachedOverlays;for(let o=i.length-1;o>-1;o--)if(i[o]._keydownEvents.observers.length>0){this._ngZone.run(()=>i[o]._keydownEvents.next(n));break}};static \u0275fac=(()=>{let n;return function(i){return(n||(n=(0,r.R)(t)))(i||t)}})();static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),zm=(()=>{class t extends cc{_platform=(0,r.K)(be);_ngZone=(0,r.K)(r.V);_renderer=(0,r.K)(r.ia).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(n){if(super.add(n),!this._isAttached){let i=this._document.body,o={capture:!0};this._cleanups=this._ngZone.runOutsideAngular(()=>[Gt(this._renderer,i,"pointerdown",this._pointerDownListener,o),Gt(this._renderer,i,"click",this._clickListener,o),Gt(this._renderer,i,"auxclick",this._clickListener,o),Gt(this._renderer,i,"contextmenu",this._clickListener,o)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=i.style.cursor,i.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=ce(n)};_clickListener=n=>{let i=ce(n),o=n.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:i;this._pointerDownEventTarget=null;let s=this._attachedOverlays.slice();for(let a=s.length-1;a>-1;a--){let c=s[a];if(c._outsidePointerEvents.observers.length<1||!c.hasAttached())continue;if(wa(c.overlayElement,i)||wa(c.overlayElement,o))break;let h=c._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>h.next(n)):h.next(n)}};static \u0275fac=(()=>{let n;return function(i){return(n||(n=(0,r.R)(t)))(i||t)}})();static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function wa(t,e){let n=typeof ShadowRoot<"u"&&ShadowRoot,i=e;for(;i;){if(i===t)return!0;i=n&&i instanceof ShadowRoot?i.host:i.parentNode}return!1}var uc=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=(0,r.na)({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(n,i){},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}
|
|
37
37
|
`],encapsulation:2,changeDetection:0})}return t})(),Io=(()=>{class t{_platform=(0,r.K)(be);_containerElement;_document=(0,r.K)(r.lb);_styleLoader=(0,r.K)(Ci);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||va()){let o=this._document.querySelectorAll(`.${n}[platform="server"], .${n}[platform="test"]`);for(let s=0;s<o.length;s++)o[s].remove()}let i=this._document.createElement("div");i.classList.add(n),va()?i.setAttribute("platform","test"):this._platform.isBrowser||i.setAttribute("platform","server"),this._document.body.appendChild(i),this._containerElement=i}_loadStyles(){this._styleLoader.load(uc)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Wm=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(t,e,n,i){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",i)}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()}},Do=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new r.j;_attachments=new r.j;_detachments=new r.j;_positionStrategy;_scrollStrategy;_locationChanges=r.h.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new r.j;_outsidePointerEvents=new r.j;_renders=new r.j;_afterRenderRef;_afterNextRenderRef;constructor(t,e,n,i,o,s,a,c,h,f=!1,_,d){this._portalOutlet=t,this._host=e,this._pane=n,this._config=i,this._ngZone=o,this._keyboardDispatcher=s,this._document=a,this._location=c,this._outsideClickDispatcher=h,this._animationsDisabled=f,this._injector=_,this._renderer=d,i.scrollStrategy&&(this._scrollStrategy=i.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=i.positionStrategy,this._afterRenderRef=(0,r.hb)(()=>(0,r.ba)(()=>{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=(0,r.ca)(()=>{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=(0,r.a)((0,r.a)({},this._config),t),this._updateElementSize()}setDirection(t){this._config=(0,r.b)((0,r.a)({},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=Lt(this._config.width),t.height=Lt(this._config.height),t.minWidth=Lt(this._config.minWidth),t.minHeight=Lt(this._config.minHeight),t.maxWidth=Lt(this._config.maxWidth),t.maxHeight=Lt(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"":"none"}_attachBackdrop(){let t="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Wm(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 i=Zl(e||[]).filter(o=>!!o);i.length&&(n?t.classList.add(...i):t.classList.remove(...i))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let t=this._renders.pipe((0,r.D)((0,r.v)(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?.()}},Ea="cdk-overlay-connected-position-bounding-box",Gm=/([A-Za-z%]+)$/,qm=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 r.j;_resizeSubscription=r.h.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(t,e,n,i,o){this._viewportRuler=e,this._document=n,this._platform=i,this._overlayContainer=o,this.setOrigin(t)}attach(t){this._overlayRef&&this._overlayRef,this._validatePositions(),t.hostElement.classList.add(Ea),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,i=this._containerRect,o=[],s;for(let a of this._preferredPositions){let c=this._getOriginPoint(t,i,a),h=this._getOverlayPoint(c,e,a),f=this._getOverlayFit(h,e,n,a);if(f.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,c);return}if(this._canFitWithFlexibleDimensions(f,h,n)){o.push({position:a,origin:c,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(c,a)});continue}(!s||s.overlayFit.visibleArea<f.visibleArea)&&(s={overlayFit:f,overlayPoint:h,originPoint:c,position:a,overlayRect:e})}if(o.length){let a=null,c=-1;for(let h of o){let f=h.boundingBoxRect.width*h.boundingBoxRect.height*(h.position.weight||1);f>c&&(c=f,a=h)}this._isPushed=!1,this._applyPosition(a.position,a.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&ke(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Ea),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 i;if(n.originX=="center")i=t.left+t.width/2;else{let s=this._isRtl()?t.right:t.left,a=this._isRtl()?t.left:t.right;i=n.originX=="start"?s:a}e.left<0&&(i-=e.left);let o;return n.originY=="center"?o=t.top+t.height/2:o=n.originY=="top"?t.top:t.bottom,e.top<0&&(o-=e.top),{x:i,y:o}}_getOverlayPoint(t,e,n){let i;n.overlayX=="center"?i=-e.width/2:n.overlayX==="start"?i=this._isRtl()?-e.width:0:i=this._isRtl()?0:-e.width;let o;return n.overlayY=="center"?o=-e.height/2:o=n.overlayY=="top"?0:-e.height,{x:t.x+i,y:t.y+o}}_getOverlayFit(t,e,n,i){let o=Sa(e),{x:s,y:a}=t,c=this._getOffset(i,"x"),h=this._getOffset(i,"y");c&&(s+=c),h&&(a+=h);let f=0-s,_=s+o.width-n.width,d=0-a,E=a+o.height-n.height,I=this._subtractOverflows(o.width,f,_),S=this._subtractOverflows(o.height,d,E),D=I*S;return{visibleArea:D,isCompletelyWithinViewport:o.width*o.height===D,fitsInViewportVertically:S===o.height,fitsInViewportHorizontally:I==o.width}}_canFitWithFlexibleDimensions(t,e,n){if(this._hasFlexibleDimensions){let i=n.bottom-e.y,o=n.right-e.x,s=xa(this._overlayRef.getConfig().minHeight),a=xa(this._overlayRef.getConfig().minWidth),c=t.fitsInViewportVertically||s!=null&&s<=i,h=t.fitsInViewportHorizontally||a!=null&&a<=o;return c&&h}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 i=Sa(e),o=this._viewportRect,s=Math.max(t.x+i.width-o.width,0),a=Math.max(t.y+i.height-o.height,0),c=Math.max(o.top-n.top-t.y,0),h=Math.max(o.left-n.left-t.x,0),f=0,_=0;return i.width<=o.width?f=h||-s:f=t.x<this._viewportMargin?o.left-n.left-t.x:0,i.height<=o.height?_=c||-a:_=t.y<this._viewportMargin?o.top-n.top-t.y:0,this._previousPushAmount={x:f,y:_},{x:t.x+f,y:t.y+_}}_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||!Zm(this._lastScrollVisibility,n)){let i=new $m(t,n);this._positionChanges.next(i)}this._lastScrollVisibility=n}this._lastPosition=t,this._isInitialRender=!1}_setTransformOrigin(t){if(!this._transformOriginSelector)return;let e=this._boundingBox.querySelectorAll(this._transformOriginSelector),n,i=t.overlayY;t.overlayX==="center"?n="center":this._isRtl()?n=t.overlayX==="start"?"right":"left":n=t.overlayX==="start"?"left":"right";for(let o=0;o<e.length;o++)e[o].style.transformOrigin=`${n} ${i}`}_calculateBoundingBoxRect(t,e){let n=this._viewportRect,i=this._isRtl(),o,s,a;if(e.overlayY==="top")s=t.y,o=n.height-s+this._viewportMargin;else if(e.overlayY==="bottom")a=n.height-t.y+this._viewportMargin*2,o=n.height-a+this._viewportMargin;else{let E=Math.min(n.bottom-t.y+n.top,t.y),I=this._lastBoundingBoxSize.height;o=E*2,s=t.y-E,o>I&&!this._isInitialRender&&!this._growAfterOpen&&(s=t.y-I/2)}let c=e.overlayX==="start"&&!i||e.overlayX==="end"&&i,h=e.overlayX==="end"&&!i||e.overlayX==="start"&&i,f,_,d;if(h)d=n.width-t.x+this._viewportMargin*2,f=t.x-this._viewportMargin;else if(c)_=t.x,f=n.right-t.x;else{let E=Math.min(n.right-t.x+n.left,t.x),I=this._lastBoundingBoxSize.width;f=E*2,_=t.x-E,f>I&&!this._isInitialRender&&!this._growAfterOpen&&(_=t.x-I/2)}return{top:s,left:_,bottom:a,right:d,width:f,height:o}}_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 i={};if(this._hasExactPosition())i.top=i.left="0",i.bottom=i.right=i.maxHeight=i.maxWidth="",i.width=i.height="100%";else{let o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;i.height=Lt(n.height),i.top=Lt(n.top),i.bottom=Lt(n.bottom),i.width=Lt(n.width),i.left=Lt(n.left),i.right=Lt(n.right),e.overlayX==="center"?i.alignItems="center":i.alignItems=e.overlayX==="end"?"flex-end":"flex-start",e.overlayY==="center"?i.justifyContent="center":i.justifyContent=e.overlayY==="bottom"?"flex-end":"flex-start",o&&(i.maxHeight=Lt(o)),s&&(i.maxWidth=Lt(s))}this._lastBoundingBoxSize=n,ke(this._boundingBox.style,i)}_resetBoundingBoxStyles(){ke(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){ke(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){let n={},i=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(i){let f=this._viewportRuler.getViewportScrollPosition();ke(n,this._getExactOverlayY(e,t,f)),ke(n,this._getExactOverlayX(e,t,f))}else n.position="static";let a="",c=this._getOffset(e,"x"),h=this._getOffset(e,"y");c&&(a+=`translateX(${c}px) `),h&&(a+=`translateY(${h}px)`),n.transform=a.trim(),s.maxHeight&&(i?n.maxHeight=Lt(s.maxHeight):o&&(n.maxHeight="")),s.maxWidth&&(i?n.maxWidth=Lt(s.maxWidth):o&&(n.maxWidth="")),ke(this._pane.style,n)}_getExactOverlayY(t,e,n){let i={top:"",bottom:""},o=this._getOverlayPoint(e,this._overlayRect,t);if(this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,n)),t.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;i.bottom=`${s-(o.y+this._overlayRect.height)}px`}else i.top=Lt(o.y);return i}_getExactOverlayX(t,e,n){let i={left:"",right:""},o=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,n));let s;if(this._isRtl()?s=t.overlayX==="end"?"left":"right":s=t.overlayX==="end"?"right":"left",s==="right"){let a=this._document.documentElement.clientWidth;i.right=`${a-(o.x+this._overlayRect.width)}px`}else i.left=Lt(o.x);return i}_getScrollVisibility(){let t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(i=>i.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:ba(t,n),isOriginOutsideView:Fr(t,n),isOverlayClipped:ba(e,n),isOverlayOutsideView:Fr(e,n)}}_subtractOverflows(t,...e){return e.reduce((n,i)=>n-Math.max(i,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&&Zl(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 r.X)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 ke(t,e){for(let n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function xa(t){if(typeof t!="number"&&t!=null){let[e,n]=t.split(Gm);return!n||n==="px"?parseFloat(e):null}return t||null}function Sa(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 Zm(t,e){return t===e?!0:t.isOriginClipped===e.isOriginClipped&&t.isOriginOutsideView===e.isOriginOutsideView&&t.isOverlayClipped===e.isOverlayClipped&&t.isOverlayOutsideView===e.isOverlayOutsideView}var Ca="cdk-global-overlay-wrapper",Ym=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(Ca),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:i,height:o,maxWidth:s,maxHeight:a}=n,c=(i==="100%"||i==="100vw")&&(!s||s==="100%"||s==="100vw"),h=(o==="100%"||o==="100vh")&&(!a||a==="100%"||a==="100vh"),f=this._xPosition,_=this._xOffset,d=this._overlayRef.getConfig().direction==="rtl",E="",I="",S="";c?S="flex-start":f==="center"?(S="center",d?I=_:E=_):d?f==="left"||f==="end"?(S="flex-end",E=_):(f==="right"||f==="start")&&(S="flex-start",I=_):f==="left"||f==="start"?(S="flex-start",E=_):(f==="right"||f==="end")&&(S="flex-end",I=_),t.position=this._cssPosition,t.marginLeft=c?"0":E,t.marginTop=h?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=c?"0":I,e.justifyContent=S,e.alignItems=h?"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(Ca),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}},Km=(()=>{class t{_viewportRuler=(0,r.K)(xo);_document=(0,r.K)(r.lb);_platform=(0,r.K)(be);_overlayContainer=(0,r.K)(Io);constructor(){}global(){return new Ym}flexibleConnectedTo(n){return new qm(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),hc=(()=>{class t{scrollStrategies=(0,r.K)(Um);_overlayContainer=(0,r.K)(Io);_positionBuilder=(0,r.K)(Km);_keyboardDispatcher=(0,r.K)(Hm);_injector=(0,r.K)(r.S);_ngZone=(0,r.K)(r.V);_document=(0,r.K)(r.lb);_directionality=(0,r.K)(ai);_location=(0,r.K)(r.mb);_outsideClickDispatcher=(0,r.K)(zm);_animationsModuleType=(0,r.K)(r.aa,{optional:!0});_idGenerator=(0,r.K)(ql);_renderer=(0,r.K)(r.ia).createRenderer(null,null);_appRef;_styleLoader=(0,r.K)(Ci);constructor(){}create(n){this._styleLoader.load(uc);let i=this._createHostElement(),o=this._createPaneElement(i),s=this._createPortalOutlet(o),a=new lc(n);return a.direction=a.direction||this._directionality.value,new Do(s,i,o,a,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(r.L),this._renderer)}position(){return this._positionBuilder}_createPaneElement(n){let i=this._document.createElement("div");return i.id=this._idGenerator.getId("cdk-overlay-"),i.classList.add("cdk-overlay-pane"),n.appendChild(i),i}_createHostElement(){let n=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalOutlet(n){return this._appRef||(this._appRef=this._injector.get(r.ta)),new _m(n,null,this._appRef,this._injector,this._document)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Jm(t,e){}var ui=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},Xm=(()=>{class t extends Oo{_elementRef=(0,r.K)(r.X);_focusTrapFactory=(0,r.K)(Lm);_config;_interactivityChecker=(0,r.K)(oc);_ngZone=(0,r.K)(r.V);_overlayRef=(0,r.K)(Do);_focusMonitor=(0,r.K)(xm);_renderer=(0,r.K)(r.ja);_platform=(0,r.K)(be);_document=(0,r.K)(r.lb,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=(0,r.K)(r.eb);_injector=(0,r.K)(r.S);_isDestroyed=!1;constructor(){super(),this._config=(0,r.K)(ui,{optional:!0})||new ui,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(n){this._ariaLabelledByQueue.push(n),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(n){let i=this._ariaLabelledByQueue.indexOf(n);i>-1&&(this._ariaLabelledByQueue.splice(i,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 i=this._portalOutlet.attachComponentPortal(n);return this._contentAttached(),i}attachTemplatePortal(n){this._portalOutlet.hasAttached();let i=this._portalOutlet.attachTemplatePortal(n);return this._contentAttached(),i}attachDomPortal=n=>{this._portalOutlet.hasAttached();let i=this._portalOutlet.attachDomPortal(n);return this._contentAttached(),i};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(n,i){this._interactivityChecker.isFocusable(n)||(n.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let o=()=>{s(),a(),n.removeAttribute("tabindex")},s=this._renderer.listen(n,"blur",o),a=this._renderer.listen(n,"mousedown",o)})),n.focus(i)}_focusByCssSelector(n,i){let o=this._elementRef.nativeElement.querySelector(n);o&&this._forceFocus(o,i)}_trapFocus(n){this._isDestroyed||(0,r.ca)(()=>{let i=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||i.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,i=null;if(typeof n=="string"?i=this._document.querySelector(n):typeof n=="boolean"?i=n?this._elementFocusedBeforeDialogWasOpened:null:n&&(i=n),this._config.restoreFocus&&i&&typeof i.focus=="function"){let o=Zi(),s=this._elementRef.nativeElement;(!o||o===this._document.body||o===s||s.contains(o))&&(this._focusMonitor?(this._focusMonitor.focusVia(i,this._closeInteractionType),this._closeInteractionType=null):i.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(n){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus(n)}_containsFocus(){let n=this._elementRef.nativeElement,i=Zi();return n===i||n.contains(i)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Zi()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=(0,r.na)({type:t,selectors:[["cdk-dialog-container"]],viewQuery:function(n,i){if(n&1&&(0,r.Ma)(_a,7),n&2){let o;(0,r.Na)(o=(0,r.Oa)())&&(i._portalOutlet=o.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(n,i){n&2&&(0,r.ua)("id",i._config.id||null)("role",i._config.role)("aria-modal",i._config.ariaModal)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledByQueue[0])("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null)},features:[r.ra],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(n,i){n&1&&(0,r.sa)(0,Jm,0,0,"ng-template",0)},dependencies:[_a],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
|
|
38
38
|
`],encapsulation:2})}return t})(),Xn=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new r.j;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&&!Bm(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}},Qm=new r.I("DialogScrollStrategy",{providedIn:"root",factory:()=>{let t=(0,r.K)(hc);return()=>t.scrollStrategies.block()}}),dc=new r.I("DialogData"),tv=new r.I("DefaultDialogConfig"),ev=(()=>{class t{_overlay=(0,r.K)(hc);_injector=(0,r.K)(r.S);_defaultOptions=(0,r.K)(tv,{optional:!0});_parentDialog=(0,r.K)(t,{optional:!0,skipSelf:!0});_overlayContainer=(0,r.K)(Io);_idGenerator=(0,r.K)(ql);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new r.j;_afterOpenedAtThisLevel=new r.j;_ariaHiddenElements=new Map;_scrollStrategy=(0,r.K)(Qm);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=(0,r.s)(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe((0,r.B)(void 0)));constructor(){}open(n,i){let o=this._defaultOptions||new ui;i=(0,r.a)((0,r.a)({},o),i),i.id=i.id||this._idGenerator.getId("cdk-dialog-"),i.id&&this.getDialogById(i.id);let s=this._getOverlayConfig(i),a=this._overlay.create(s),c=new Xn(a,i),h=this._attachContainer(a,c,i);return c.containerInstance=h,this._attachDialogContent(n,c,h,i),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(c),c.closed.subscribe(()=>this._removeOpenDialog(c,!0)),this.afterOpened.next(c),c}closeAll(){Qi(this.openDialogs,n=>n.close())}getDialogById(n){return this.openDialogs.find(i=>i.id===n)}ngOnDestroy(){Qi(this._openDialogsAtThisLevel,n=>{n.config.closeOnDestroy===!1&&this._removeOpenDialog(n,!1)}),Qi(this._openDialogsAtThisLevel,n=>n.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(n){let i=new lc({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&&(i.backdropClass=n.backdropClass),i}_attachContainer(n,i,o){let s=o.injector||o.viewContainerRef?.injector,a=[{provide:ui,useValue:o},{provide:Xn,useValue:i},{provide:Do,useValue:n}],c;o.container?typeof o.container=="function"?c=o.container:(c=o.container.type,a.push(...o.container.providers(o))):c=Xm;let h=new jr(c,o.viewContainerRef,r.S.create({parent:s||this._injector,providers:a}));return n.attach(h).instance}_attachDialogContent(n,i,o,s){if(n instanceof r.ga){let a=this._createInjector(s,i,o,void 0),c={$implicit:s.data,dialogRef:i};s.templateContext&&(c=(0,r.a)((0,r.a)({},c),typeof s.templateContext=="function"?s.templateContext():s.templateContext)),o.attachTemplatePortal(new ic(n,null,c,a))}else{let a=this._createInjector(s,i,o,this._injector),c=o.attachComponentPortal(new jr(n,s.viewContainerRef,a));i.componentRef=c,i.componentInstance=c.instance}}_createInjector(n,i,o,s){let a=n.injector||n.viewContainerRef?.injector,c=[{provide:dc,useValue:n.data},{provide:Xn,useValue:i}];return n.providers&&(typeof n.providers=="function"?c.push(...n.providers(i,n,o)):c.push(...n.providers)),n.direction&&(!a||!a.get(ai,null,{optional:!0}))&&c.push({provide:ai,useValue:{value:n.direction,change:(0,r.p)()}}),r.S.create({parent:a||s,providers:c})}_removeOpenDialog(n,i){let o=this.openDialogs.indexOf(n);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((s,a)=>{s?a.setAttribute("aria-hidden",s):a.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),i&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let n=this._overlayContainer.getContainerElement();if(n.parentElement){let i=n.parentElement.children;for(let o=i.length-1;o>-1;o--){let s=i[o];s!==n&&s.nodeName!=="SCRIPT"&&s.nodeName!=="STYLE"&&!s.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(s,s.getAttribute("aria-hidden")),s.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=(0,r.G)({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Qi(t,e){let n=t.length;for(;n--;)e(t[n])}var nv=class{lastWidth;lastHeight;resizeTimeout=null;debounceDelay=200;onResizeCallback;constructor(t){this.onResizeCallback=t,this.lastWidth=window.innerWidth,this.lastHeight=window.innerHeight,window.addEventListener("resize",this.debouncedResize),window.addEventListener("orientationchange",this.handleImmediateResize)}destroy(){window.removeEventListener("resize",this.debouncedResize),window.removeEventListener("orientationchange",this.handleImmediateResize)}handleImmediateResize=()=>{this.triggerResize()};debouncedResize=()=>{this.resizeTimeout!==null&&clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(()=>{this.triggerResize()},this.debounceDelay)};triggerResize(){let t=window.innerWidth,e=window.innerHeight;(e!==this.lastHeight||t!==this.lastWidth)&&(this.onResizeCallback(),this.lastWidth=t,this.lastHeight=e)}},iv=r.J;function rv(t){return!!t[iv]}var ov=Symbol("__destroy"),pc=Symbol("__decoratorApplied");function fc(t){return typeof t=="string"?Symbol(`__destroy__${t}`):ov}function sv(t){t.prototype[pc]=!0}function gc(t,e){t[e]||(t[e]=new r.j)}function _c(t,e){t[e]&&(t[e].next(),t[e].complete(),t[e]=null)}function mc(t){t instanceof r.h&&t.unsubscribe()}function av(t){Array.isArray(t)&&t.forEach(mc)}function vc(t,e){return function(){if(t&&t.call(this),_c(this,fc()),e.arrayName&&av(this[e.arrayName]),e.checkProperties)for(let n in this)e.blackList?.includes(n)||mc(this[n])}}function lv(t,e){t.prototype.ngOnDestroy=vc(t.prototype.ngOnDestroy,e)}function cv(t,e){let n=t.\u0275pipe;n.onDestroy=vc(n.onDestroy,e)}function uv(t={}){return e=>{rv(e)?cv(e,t):lv(e,t),sv(e)}}var Ta=7,Oa=Symbol("CheckerHasBeenSet");function hv(t,e){t[Oa]||dv()||(Ia(()=>(0,r.o)(Promise.resolve()).pipe((0,r.r)(()=>{let n;try{n=(0,r.Z)(t)}catch{n=null}let i=n?.lView;if(i==null)return r.n;let o=i[Ta]||(i[Ta]=[]),s=new r.j;return o.push(function(){Ia(()=>{s.next(),s.complete()})}),s}),(0,r.r)(()=>Promise.resolve())).subscribe(()=>{(e.observed??e.observers.length>0)&&console.warn(pv(t))})),t[Oa]=!0)}function dv(){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 Ia(t){let e=r.F.Zone;return e&&typeof e.root?.run=="function"?e.root.run(t):t()}function pv(t){return`
|
|
@@ -72,5 +72,5 @@ Url: ${ni(t)}`),!0)}function sp(t,e){return t.type||!e||!e.length?!1:up(t).some(
|
|
|
72
72
|
super.ngOnDestroy();
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
`}var Vr=!1;function fv(t,e,n){let i=t[e];if(Vr&&typeof i!="function")throw new Error(`${t.constructor.name} is using untilDestroyed but doesn't implement ${e}`);gc(t,n),t[e]=function(){i.apply(this,arguments),_c(this,n),t[e]=i}}function gv(t,e){return n=>{let i=fc(e);typeof e=="string"?fv(t,e,i):(Vr&&_v(t),gc(t,i));let o=t[i];return Vr&&hv(t,o),n.pipe((0,r.D)(o))}}function _v(t){let e=Object.getPrototypeOf(t);if(!(pc in e))throw new Error("untilDestroyed operator cannot be used inside directives or components or providers that are not decorated with UntilDestroy decorator")}var mv=class Ur{engagementTrigger;isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";ngOnInit(){this.engagementTrigger=this.triggerContext?.triggerData}static \u0275fac=function(e){return new(e||Ur)};static \u0275cmp=(0,r.na)({type:Ur,selectors:[["cooee-base-video"]],inputs:{triggerContext:"triggerContext"},decls:0,vars:0,template:function(e,n){},encapsulation:2})},vv=t=>({active:t}),yv=(t,e)=>e.mID;function bv(t,e){if(t&1&&(0,r.Ga)(0,"img",9),t&2){let n=e.$implicit,i=(0,r.Ka)(2);(0,r.va)("src",n.url,r.ea)("alt",i.selectedItem.name)}}function wv(t,e){if(t&1&&(0,r.Ca)(0,bv,1,2,"img",9,r.Ba),t&2){let n=(0,r.Ka)();(0,r.Da)(n.selectedItem.imgs)}}function Ev(t,e){if(t&1&&(0,r.Ga)(0,"img",9),t&2){let n=(0,r.Ka)();(0,r.va)("src",n.selectedItem.imageURL,r.ea)("alt",n.selectedItem.name)}}function xv(t,e){if(t&1){let n=(0,r.Ia)();(0,r.Ea)(0,"a",18),(0,r.Ja)("click",function(i){let o=(0,r.N)(n).$implicit;return(0,r.Ka)(2).changeItem(o),i.stopPropagation(),(0,r.O)(i.preventDefault())}),(0,r.Ga)(1,"img",19),(0,r.Fa)()}if(t&2){let n=e.$implicit,i=(0,r.Ka)(2);(0,r.fa)(),(0,r.va)("src",n.imageURL,r.ea)("alt",n.name)("ngClass",(0,r.Xa)(3,vv,n.mID===i.selectedItem.mID+""))}}function Sv(t,e){if(t&1&&((0,r.Ea)(0,"span",16),(0,r.Qa)(1,"Selected Product"),(0,r.Fa)(),(0,r.Ea)(2,"div",8),(0,r.Ca)(3,xv,2,5,"a",17,r.Ba),(0,r.Fa)()),t&2){let n=(0,r.Ka)();(0,r.fa)(3),(0,r.Da)(n.items)}}function Cv(t,e){if(t&1){let n=(0,r.Ia)();(0,r.Ea)(0,"a",23),(0,r.Ja)("click",function(i){let o=(0,r.N)(n).$implicit,s=(0,r.Ka)(2);return(0,r.O)(s.changeVariant(i,o))}),(0,r.Ea)(1,"span",24),(0,r.Qa)(2),(0,r.Fa)()()}if(t&2){let n=e.$implicit,i=(0,r.Ka)(2);(0,r.xa)("lc-selected-variant",(i.selectedVariant==null?null:i.selectedVariant.mID)===n.mID),(0,r.fa)(2),(0,r.Ra)(n.name)}}function Tv(t,e){if(t&1&&((0,r.Ea)(0,"span",20),(0,r.Qa)(1,"Select Variant"),(0,r.Fa)(),(0,r.Ea)(2,"div",21),(0,r.Ca)(3,Cv,3,3,"a",22,yv),(0,r.Fa)()),t&2){let n=(0,r.Ka)();(0,r.fa)(3),(0,r.Da)(n.selectedItem.vars)}}function Ov(t,e){if(t&1&&((0,r.Ea)(0,"div",25),(0,r.Qa)(1,"Description"),(0,r.Fa)(),(0,r.Ga)(2,"div",26),(0,r._a)(3,"safeHtml")),t&2){let n=(0,r.Ka)();(0,r.fa)(2),(0,r.va)("innerHTML",(0,r.$a)(3,1,n.selectedItem.desc),r.da)}}function Iv(t,e){t&1&&(0,r.Qa)(0," Open Cart ")}function Dv(t,e){t&1&&(0,r.Qa)(0," Add To Cart ")}var Rv=class $r{selectedItem;items;closeModel=new r.U;performCTA=new r.U;atcClicked=!1;selectedVariant=null;ClickActionType=fe;ngOnInit(){this.updateSelectedVariant()}closeDialog(){this.closeModel.emit()}clickAddToCart(e){this.performCTA.emit({item:e,cta:this.atcClicked?fe.OPEN_CART:fe.ADD_TO_CART}),this.atcClicked=!0}async changeItem(e){this.selectedItem=e,this.updateSelectedVariant()}changeVariant(e,n){e.stopPropagation(),e.preventDefault(),this.selectedVariant=n,this.selectedItem.selectedOrFirstVariant.value=this.selectedVariant}updateSelectedVariant(){this.selectedVariant=this.selectedItem.selectedOrFirstVariant.value}static \u0275fac=function(e){return new(e||$r)};static \u0275cmp=(0,r.na)({type:$r,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(e,n){e&1&&((0,r.Ea)(0,"div",0)(1,"div",1)(2,"div",2),(0,r.Qa)(3,"Shop Now"),(0,r.Fa)(),(0,r.Ea)(4,"button",3),(0,r.Ja)("click",function(){return n.closeDialog()}),(0,r.P)(),(0,r.Ea)(5,"svg",4),(0,r.Ga)(6,"path",5)(7,"path",6),(0,r.Fa)()()(),(0,r.Q)(),(0,r.Ea)(8,"div",7)(9,"div",8),(0,r.sa)(10,wv,2,0)(11,Ev,1,2,"img",9),(0,r.Fa)(),(0,r.Ea)(12,"div",10)(13,"div",11),(0,r.Qa)(14),(0,r.Fa)(),(0,r.Ga)(15,"span",12),(0,r._a)(16,"cooeeCurrency"),(0,r._a)(17,"safeHtml"),(0,r.sa)(18,Sv,5,0)(19,Tv,5,0)(20,Ov,4,3),(0,r.Fa)()(),(0,r.Ea)(21,"div",13)(22,"button",14),(0,r.Ja)("click",function(){return n.clickAddToCart(n.selectedItem)}),(0,r.sa)(23,Iv,1,0)(24,Dv,1,0),(0,r.Fa)(),(0,r.Ea)(25,"button",15),(0,r.Ja)("click",function(){return n.performCTA.emit({item:n.selectedItem,cta:n.ClickActionType.GO_TO_PRODUCT})}),(0,r.Qa)(26," More Info "),(0,r.Fa)()()()),e&2&&((0,r.fa)(10),(0,r.Aa)(n.selectedItem.imgs!=null&&n.selectedItem.imgs.length?10:11),(0,r.fa)(4),(0,r.Ra)(n.selectedItem.name),(0,r.fa)(),(0,r.va)("innerHTML",(0,r.$a)(17,9,(0,r.$a)(16,7,n.selectedVariant==null||n.selectedVariant.price==null?null:n.selectedVariant.price.d)),r.da),(0,r.fa)(3),(0,r.Aa)(n.items.length>1?18:-1),(0,r.fa)(),(0,r.Aa)(n.selectedItem.vars[0]!=null&&n.selectedItem.vars[0].name!=="Default Title"?19:-1),(0,r.fa)(),(0,r.Aa)(n.selectedItem.desc?20:-1),(0,r.fa)(3),(0,r.Aa)(n.atcClicked?23:24))},dependencies:[r.ub,mi,r.nb],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;overscroll-behavior:contain}.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}"]})},Pv=class Hr{width;static \u0275fac=function(e){return new(e||Hr)};static \u0275cmp=(0,r.na)({type:Hr,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&&((0,r.Ea)(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),(0,r.Ga)(4,"div"),(0,r.Fa)()()()()),e&2&&((0,r.fa)(3),(0,r.wa)("width",n.width,"%"))},encapsulation:2})};function kv(t,e){t&1&&(0,r.Qa)(0," Open Cart ")}function Nv(t,e){t&1&&(0,r.Qa)(0," Add To Cart ")}var Av=class zr{item;performCTA=new r.U;atcClicked=!1;clickAddToCart(e){e.stopPropagation(),this.performCTA.emit({item:this.item,cta:this.atcClicked?fe.OPEN_CART:fe.ADD_TO_CART}),this.atcClicked=!0}static \u0275fac=function(e){return new(e||zr)};static \u0275cmp=(0,r.na)({type:zr,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(e,n){if(e&1){let i=(0,r.Ia)();(0,r.Ea)(0,"div",0)(1,"div",1),(0,r.Ga)(2,"img",2),(0,r.Ea)(3,"div",3)(4,"div",4),(0,r.Qa)(5),(0,r.Fa)(),(0,r.Ta)(6),(0,r.Ga)(7,"div",5),(0,r._a)(8,"cooeeCurrency"),(0,r._a)(9,"safeHtml"),(0,r.Fa)()(),(0,r.Ea)(10,"button",6),(0,r.Ja)("click",function(o){return(0,r.N)(i),(0,r.O)(n.clickAddToCart(o))}),(0,r.sa)(11,kv,1,0)(12,Nv,1,0),(0,r.Fa)()()}if(e&2){(0,r.fa)(2),(0,r.La)("alt",n.item.name),(0,r.va)("src",n.item.imageURL,r.ea),(0,r.fa)(3),(0,r.Sa)(" ",n.item.name," ");let i=n.item.selectedOrFirstVariant.value.price.d;(0,r.fa)(2),(0,r.va)("innerHTML",(0,r.$a)(9,9,(0,r.$a)(8,7,i)),r.da),(0,r.fa)(3),(0,r.xa)("atc-clicked",n.atcClicked),(0,r.fa)(),(0,r.Aa)(n.atcClicked?11:12)}},dependencies:[mi,r.ub],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}"]})},Mv=["swiperContainer"],Lv=["videoEl"],Bv=(t,e)=>e.url,jv=(t,e)=>e.mID;function Fv(t,e){if(t&1&&(0,r.Ga)(0,"source",14),t&2){let n=e.$implicit;(0,r.La)("type",n.mimeType),(0,r.va)("src",n.url,r.ea)}}function Vv(t,e){t&1&&(0,r.Ha)(0)}function Uv(t,e){if(t&1){let n=(0,r.Ia)();(0,r.Ga)(0,"cooee-video-progress-bar",17),(0,r.Ea)(1,"div",18)(2,"cooee-mute-toggle",19),(0,r.Ja)("toggled",function(){(0,r.N)(n);let i=(0,r.Ka)(2);return(0,r.O)(i.toggleMute())}),(0,r.Fa)(),(0,r.sa)(3,Vv,1,0,"ng-container",10),(0,r.Fa)()}if(t&2){let n=(0,r.Ka)().$index,i=(0,r.Pa)(4),o=(0,r.Ka)(),s=(0,r.Pa)(11);(0,r.va)("width",o.videoProgress[n]||0),(0,r.fa)(2),(0,r.va)("muted",o.muted)("videoEl",i),(0,r.fa)(),(0,r.va)("ngTemplateOutlet",s)}}function $v(t,e){if(t&1){let n=(0,r.Ia)();(0,r.Ea)(0,"cooee-product-card",22),(0,r.Ja)("performCTA",function(i){(0,r.N)(n);let o=(0,r.Ka)(2).$implicit,s=(0,r.Ka)();return(0,r.O)(s.performClickToAction(i,o))})("click",function(){let i=(0,r.N)(n).$implicit,o=(0,r.Ka)(2).$implicit,s=(0,r.Ka)();return(0,r.O)(s.productCardClicked(i,o))}),(0,r.Fa)()}if(t&2){let n=e.$implicit;(0,r.va)("item",n)}}function Hv(t,e){if(t&1&&((0,r.Ea)(0,"div",15)(1,"div",20),(0,r.Ca)(2,$v,1,1,"cooee-product-card",21,jv),(0,r.Fa)()()),t&2){let n=(0,r.Ka)().$implicit;(0,r.fa)(2),(0,r.Da)(n.items)}}function zv(t,e){if(t&1){let n=(0,r.Ia)();(0,r.Ea)(0,"cooee-product-modal",23),(0,r.Ja)("performCTA",function(i){(0,r.N)(n);let o=(0,r.Ka)(2);return(0,r.O)(o.performClickToAction(i,o.selectedVideo))})("closeModel",function(){(0,r.N)(n);let i=(0,r.Ka)(2);return(0,r.O)(i.productModalClosed())}),(0,r.Fa)()}if(t&2){let n=(0,r.Ka)(2);(0,r.va)("selectedItem",n.selectedItem)("items",n.selectedVideo.items)}}function Wv(t,e){if(t&1){let n=(0,r.Ia)();(0,r.Ea)(0,"div",6)(1,"div",11)(2,"div",12)(3,"video",13,2),(0,r.Ja)("timeupdate",function(i){let o=(0,r.N)(n).$index,s=(0,r.Ka)();return(0,r.O)(s.updateProgress(i,o))})("click",function(){let i=(0,r.N)(n).$index,o=(0,r.Ka)();return(0,r.O)(o.currentIndex===i&&o.toggleMute())})("ended",function(){(0,r.N)(n);let i=(0,r.Pa)(4),o=(0,r.Ka)();return(0,r.O)(o.onVideoEnded(i))}),(0,r.Ca)(5,Fv,1,2,"source",14,Bv),(0,r.Fa)(),(0,r.sa)(7,Uv,4,4)(8,Hv,4,0,"div",15),(0,r.Fa)(),(0,r.sa)(9,zv,1,2,"cooee-product-modal",16),(0,r.Fa)()()}if(t&2){let n=e.$implicit,i=e.$index,o=(0,r.Ka)();(0,r.fa)(3),(0,r.va)("ngClass",o.viewTemplateClassName)("autoplay",o.currentIndex===i)("muted",o.muted)("poster",n.thumbnail,r.ea),(0,r.ua)("data-video-id",n.id),(0,r.fa)(2),(0,r.Da)(n.sources),(0,r.fa)(2),(0,r.Aa)(o.currentIndex===i?7:-1),(0,r.fa)(),(0,r.Aa)(n.items.length&&o.currentIndex===i?8:-1),(0,r.fa)(),(0,r.Aa)(o.selectedItem&&o.currentIndex===i?9:-1)}}function Gv(t,e){t&1&&(0,r.Ha)(0)}function qv(t,e){if(t&1){let n=(0,r.Ia)();(0,r.Ea)(0,"button",24),(0,r.Ja)("click",function(){(0,r.N)(n);let i=(0,r.Ka)();return(0,r.O)(i.close())}),(0,r.P)(),(0,r.Ea)(1,"svg",25),(0,r.Ga)(2,"path",26)(3,"path",27),(0,r.Fa)()()}}var Ae=class extends mv{constructor(t,e,n,i){super(),this.cdr=t,this.elementRef=e,this.dialogRef=n,this.data=i,this.videos=i.videos,this.currentIndex=i.currentIndex,this.triggerContext=i.triggerContext}videos=[];currentIndex=0;swiperContainerRef;videoElements;muted=!1;videoProgress=[];selectedItem=null;selectedVideo;swiperInstance;detailPopupTemplate;viewTemplateClassName="lc-video-only-view";resizeDebouncer=new nv(this.onResize.bind(this));onResize(){this.swiperInstance?.destroy?.(),this.reInitSwiper()}ngOnInit(){super.ngOnInit(),this.detailPopupTemplate=this.engagementTrigger?.content?.videoConfig?.detailPopup.template??"VIDEO_ONLY_VIEW";let t=this.elementRef.nativeElement.shadowRoot,e=Aa.get().website.commonCSS;switch(Le.injectRawCSS(e,t),Le.injectStylesheet(en.styleURL,t),Le.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(){(0,r.t)(this.getCurrentVideoElement(),"loadeddata").pipe(gv(this)).subscribe(()=>{this.initSwiper()})}ngOnDestroy(){this.swiperInstance?.destroy?.(),this.resizeDebouncer.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?Ft.EVENT_VIDEO_MUTED:Ft.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(t),await xs.set(ws.MUTED,this.muted),this.cdr.detectChanges()}playActiveVideo(){this.pauseAll();let t=this.getCurrentVideoElement();t&&(t.currentTime=1,t.play().then(async()=>{this.muted=await xs.get(ws.MUTED,!1),t.muted=this.muted}))}onVideoEnded(t){if(this.currentIndex<this.videos.length-1)this.selectedItem?(t.currentTime=0,t.play()):this.moveToNextVideo();else{let e=this.getPreviousVideoDataForEvent(),n=[Ft.EVENT_LAST_VIDEO_ENDED,{previous:e},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(n),t.currentTime=0,t.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(),i={previous:e,current:n},o=[Ft.EVENT_VIDEO_CHANGE,i,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(o)}productCardClicked(t,e){let n={videoID:e.id,videoIndex:this.currentIndex},i=[Ft.EVENT_MORE_ITEM_INFO_CLICKED,{current:n},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(i),this.selectedItem=t,this.selectedVideo=e,this.swiperInstance.disable()}reInitSwiper(){this.initSwiper(),this.selectedItem&&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.CooeeSDK.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(i=>i.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}};(0,r.g)(Ae,"\u0275fac",function(t){return new(t||Ae)((0,r.ka)(r.eb),(0,r.ka)(r.X),(0,r.ka)(Xn),(0,r.ka)(dc))}),(0,r.g)(Ae,"\u0275cmp",(0,r.na)({type:Ae,selectors:[["cooee-video-swiper-dialog"]],viewQuery:function(t,e){if(t&1&&((0,r.Ma)(Mv,5),(0,r.Ma)(Lv,5)),t&2){let n;(0,r.Na)(n=(0,r.Oa)())&&(e.swiperContainerRef=n.first),(0,r.Na)(n=(0,r.Oa)())&&(e.videoElements=n)}},inputs:{videos:"videos",currentIndex:"currentIndex"},features:[r.ra],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&&((0,r.Ea)(0,"div",3)(1,"div",4,0)(3,"div",5),(0,r.Ca)(4,Wv,10,8,"div",6,r.Ba),(0,r.Fa)(),(0,r.Ga)(6,"div",7)(7,"div",8),(0,r.Fa)(),(0,r.Ea)(8,"div",9),(0,r.sa)(9,Gv,1,0,"ng-container",10),(0,r.Fa)()(),(0,r.sa)(10,qv,4,0,"ng-template",null,1,r.bb)),t&2){let n=(0,r.Pa)(11);(0,r.va)("ngClass",e.viewTemplateClassName),(0,r.fa)(4),(0,r.Da)(e.videos),(0,r.fa)(5),(0,r.va)("ngTemplateOutlet",n)}},dependencies:[Av,Rv,zl,Pv,r.pb,r.nb],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}
|
|
75
|
+
`}var Vr=!1;function fv(t,e,n){let i=t[e];if(Vr&&typeof i!="function")throw new Error(`${t.constructor.name} is using untilDestroyed but doesn't implement ${e}`);gc(t,n),t[e]=function(){i.apply(this,arguments),_c(this,n),t[e]=i}}function gv(t,e){return n=>{let i=fc(e);typeof e=="string"?fv(t,e,i):(Vr&&_v(t),gc(t,i));let o=t[i];return Vr&&hv(t,o),n.pipe((0,r.D)(o))}}function _v(t){let e=Object.getPrototypeOf(t);if(!(pc in e))throw new Error("untilDestroyed operator cannot be used inside directives or components or providers that are not decorated with UntilDestroy decorator")}var mv=class Ur{engagementTrigger;isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";ngOnInit(){this.engagementTrigger=this.triggerContext?.triggerData}static \u0275fac=function(e){return new(e||Ur)};static \u0275cmp=(0,r.na)({type:Ur,selectors:[["cooee-base-video"]],inputs:{triggerContext:"triggerContext"},decls:0,vars:0,template:function(e,n){},encapsulation:2})},vv=t=>({active:t}),yv=(t,e)=>e.mID;function bv(t,e){if(t&1&&(0,r.Ga)(0,"img",9),t&2){let n=e.$implicit,i=(0,r.Ka)(2);(0,r.va)("src",n.url,r.ea)("alt",i.selectedItem.name)}}function wv(t,e){if(t&1&&(0,r.Ca)(0,bv,1,2,"img",9,r.Ba),t&2){let n=(0,r.Ka)();(0,r.Da)(n.selectedItem.imgs)}}function Ev(t,e){if(t&1&&(0,r.Ga)(0,"img",9),t&2){let n=(0,r.Ka)();(0,r.va)("src",n.selectedItem.imageURL,r.ea)("alt",n.selectedItem.name)}}function xv(t,e){if(t&1){let n=(0,r.Ia)();(0,r.Ea)(0,"a",18),(0,r.Ja)("click",function(i){let o=(0,r.N)(n).$implicit;return(0,r.Ka)(2).changeItem(o),i.stopPropagation(),(0,r.O)(i.preventDefault())}),(0,r.Ga)(1,"img",19),(0,r.Fa)()}if(t&2){let n=e.$implicit,i=(0,r.Ka)(2);(0,r.fa)(),(0,r.va)("src",n.imageURL,r.ea)("alt",n.name)("ngClass",(0,r.Xa)(3,vv,n.mID===i.selectedItem.mID+""))}}function Sv(t,e){if(t&1&&((0,r.Ea)(0,"span",16),(0,r.Qa)(1,"Selected Product"),(0,r.Fa)(),(0,r.Ea)(2,"div",8),(0,r.Ca)(3,xv,2,5,"a",17,r.Ba),(0,r.Fa)()),t&2){let n=(0,r.Ka)();(0,r.fa)(3),(0,r.Da)(n.items)}}function Cv(t,e){if(t&1){let n=(0,r.Ia)();(0,r.Ea)(0,"a",23),(0,r.Ja)("click",function(i){let o=(0,r.N)(n).$implicit,s=(0,r.Ka)(2);return(0,r.O)(s.changeVariant(i,o))}),(0,r.Ea)(1,"span",24),(0,r.Qa)(2),(0,r.Fa)()()}if(t&2){let n=e.$implicit,i=(0,r.Ka)(2);(0,r.xa)("lc-selected-variant",(i.selectedVariant==null?null:i.selectedVariant.mID)===n.mID),(0,r.fa)(2),(0,r.Ra)(n.name)}}function Tv(t,e){if(t&1&&((0,r.Ea)(0,"span",20),(0,r.Qa)(1,"Select Variant"),(0,r.Fa)(),(0,r.Ea)(2,"div",21),(0,r.Ca)(3,Cv,3,3,"a",22,yv),(0,r.Fa)()),t&2){let n=(0,r.Ka)();(0,r.fa)(3),(0,r.Da)(n.selectedItem.vars)}}function Ov(t,e){if(t&1&&((0,r.Ea)(0,"div",25),(0,r.Qa)(1,"Description"),(0,r.Fa)(),(0,r.Ga)(2,"div",26),(0,r._a)(3,"safeHtml")),t&2){let n=(0,r.Ka)();(0,r.fa)(2),(0,r.va)("innerHTML",(0,r.$a)(3,1,n.selectedItem.desc),r.da)}}function Iv(t,e){t&1&&(0,r.Qa)(0," Open Cart ")}function Dv(t,e){t&1&&(0,r.Qa)(0," Add To Cart ")}var Rv=class $r{selectedItem;items;closeModel=new r.U;performCTA=new r.U;atcClicked=!1;selectedVariant=null;ClickActionType=fe;ngOnInit(){this.updateSelectedVariant()}closeDialog(){this.closeModel.emit()}clickAddToCart(e){this.performCTA.emit({item:e,cta:this.atcClicked?fe.OPEN_CART:fe.ADD_TO_CART}),this.atcClicked=!0}async changeItem(e){this.selectedItem=e,this.updateSelectedVariant()}changeVariant(e,n){e.stopPropagation(),e.preventDefault(),this.selectedVariant=n,this.selectedItem.selectedOrFirstVariant.value=this.selectedVariant}updateSelectedVariant(){this.selectedVariant=this.selectedItem.selectedOrFirstVariant.value}static \u0275fac=function(e){return new(e||$r)};static \u0275cmp=(0,r.na)({type:$r,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(e,n){e&1&&((0,r.Ea)(0,"div",0)(1,"div",1)(2,"div",2),(0,r.Qa)(3,"Shop Now"),(0,r.Fa)(),(0,r.Ea)(4,"button",3),(0,r.Ja)("click",function(){return n.closeDialog()}),(0,r.P)(),(0,r.Ea)(5,"svg",4),(0,r.Ga)(6,"path",5)(7,"path",6),(0,r.Fa)()()(),(0,r.Q)(),(0,r.Ea)(8,"div",7)(9,"div",8),(0,r.sa)(10,wv,2,0)(11,Ev,1,2,"img",9),(0,r.Fa)(),(0,r.Ea)(12,"div",10)(13,"div",11),(0,r.Qa)(14),(0,r.Fa)(),(0,r.Ga)(15,"span",12),(0,r._a)(16,"cooeeCurrency"),(0,r._a)(17,"safeHtml"),(0,r.sa)(18,Sv,5,0)(19,Tv,5,0)(20,Ov,4,3),(0,r.Fa)()(),(0,r.Ea)(21,"div",13)(22,"button",14),(0,r.Ja)("click",function(){return n.clickAddToCart(n.selectedItem)}),(0,r.sa)(23,Iv,1,0)(24,Dv,1,0),(0,r.Fa)(),(0,r.Ea)(25,"button",15),(0,r.Ja)("click",function(){return n.performCTA.emit({item:n.selectedItem,cta:n.ClickActionType.GO_TO_PRODUCT})}),(0,r.Qa)(26," More Info "),(0,r.Fa)()()()),e&2&&((0,r.fa)(10),(0,r.Aa)(n.selectedItem.imgs!=null&&n.selectedItem.imgs.length?10:11),(0,r.fa)(4),(0,r.Ra)(n.selectedItem.name),(0,r.fa)(),(0,r.va)("innerHTML",(0,r.$a)(17,9,(0,r.$a)(16,7,n.selectedVariant==null||n.selectedVariant.price==null?null:n.selectedVariant.price.d)),r.da),(0,r.fa)(3),(0,r.Aa)(n.items.length>1?18:-1),(0,r.fa)(),(0,r.Aa)(n.selectedItem.vars[0]!=null&&n.selectedItem.vars[0].name!=="Default Title"?19:-1),(0,r.fa)(),(0,r.Aa)(n.selectedItem.desc?20:-1),(0,r.fa)(3),(0,r.Aa)(n.atcClicked?23:24))},dependencies:[r.ub,mi,r.nb],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;overscroll-behavior:contain}.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}"]})},Pv=class Hr{width;static \u0275fac=function(e){return new(e||Hr)};static \u0275cmp=(0,r.na)({type:Hr,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&&((0,r.Ea)(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),(0,r.Ga)(4,"div"),(0,r.Fa)()()()()),e&2&&((0,r.fa)(3),(0,r.wa)("width",n.width,"%"))},encapsulation:2})};function kv(t,e){t&1&&(0,r.Qa)(0," Open Cart ")}function Nv(t,e){t&1&&(0,r.Qa)(0," Add To Cart ")}var Av=class zr{item;performCTA=new r.U;atcClicked=!1;clickAddToCart(e){e.stopPropagation(),this.performCTA.emit({item:this.item,cta:this.atcClicked?fe.OPEN_CART:fe.ADD_TO_CART}),this.atcClicked=!0}static \u0275fac=function(e){return new(e||zr)};static \u0275cmp=(0,r.na)({type:zr,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(e,n){if(e&1){let i=(0,r.Ia)();(0,r.Ea)(0,"div",0)(1,"div",1),(0,r.Ga)(2,"img",2),(0,r.Ea)(3,"div",3)(4,"div",4),(0,r.Qa)(5),(0,r.Fa)(),(0,r.Ta)(6),(0,r.Ga)(7,"div",5),(0,r._a)(8,"cooeeCurrency"),(0,r._a)(9,"safeHtml"),(0,r.Fa)()(),(0,r.Ea)(10,"button",6),(0,r.Ja)("click",function(o){return(0,r.N)(i),(0,r.O)(n.clickAddToCart(o))}),(0,r.sa)(11,kv,1,0)(12,Nv,1,0),(0,r.Fa)()()}if(e&2){(0,r.fa)(2),(0,r.La)("alt",n.item.name),(0,r.va)("src",n.item.imageURL,r.ea),(0,r.fa)(3),(0,r.Sa)(" ",n.item.name," ");let i=n.item.selectedOrFirstVariant.value.price.d;(0,r.fa)(2),(0,r.va)("innerHTML",(0,r.$a)(9,9,(0,r.$a)(8,7,i)),r.da),(0,r.fa)(3),(0,r.xa)("atc-clicked",n.atcClicked),(0,r.fa)(),(0,r.Aa)(n.atcClicked?11:12)}},dependencies:[mi,r.ub],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}"]})},Mv=["swiperContainer"],Lv=["videoEl"],Bv=(t,e)=>e.url,jv=(t,e)=>e.mID;function Fv(t,e){if(t&1&&(0,r.Ga)(0,"source",14),t&2){let n=e.$implicit;(0,r.La)("type",n.mimeType),(0,r.va)("src",n.url,r.ea)}}function Vv(t,e){t&1&&(0,r.Ha)(0)}function Uv(t,e){if(t&1){let n=(0,r.Ia)();(0,r.Ga)(0,"cooee-video-progress-bar",17),(0,r.Ea)(1,"div",18)(2,"cooee-mute-toggle",19),(0,r.Ja)("toggled",function(){(0,r.N)(n);let i=(0,r.Ka)(2);return(0,r.O)(i.toggleMute())}),(0,r.Fa)(),(0,r.sa)(3,Vv,1,0,"ng-container",10),(0,r.Fa)()}if(t&2){let n=(0,r.Ka)().$index,i=(0,r.Pa)(4),o=(0,r.Ka)(),s=(0,r.Pa)(11);(0,r.va)("width",o.videoProgress[n]||0),(0,r.fa)(2),(0,r.va)("muted",o.muted)("videoEl",i),(0,r.fa)(),(0,r.va)("ngTemplateOutlet",s)}}function $v(t,e){if(t&1){let n=(0,r.Ia)();(0,r.Ea)(0,"cooee-product-card",22),(0,r.Ja)("performCTA",function(i){(0,r.N)(n);let o=(0,r.Ka)(2).$implicit,s=(0,r.Ka)();return(0,r.O)(s.performClickToAction(i,o))})("click",function(){let i=(0,r.N)(n).$implicit,o=(0,r.Ka)(2).$implicit,s=(0,r.Ka)();return(0,r.O)(s.productCardClicked(i,o))}),(0,r.Fa)()}if(t&2){let n=e.$implicit;(0,r.va)("item",n)}}function Hv(t,e){if(t&1&&((0,r.Ea)(0,"div",15)(1,"div",20),(0,r.Ca)(2,$v,1,1,"cooee-product-card",21,jv),(0,r.Fa)()()),t&2){let n=(0,r.Ka)().$implicit;(0,r.fa)(2),(0,r.Da)(n.items)}}function zv(t,e){if(t&1){let n=(0,r.Ia)();(0,r.Ea)(0,"cooee-product-modal",23),(0,r.Ja)("performCTA",function(i){(0,r.N)(n);let o=(0,r.Ka)(2);return(0,r.O)(o.performClickToAction(i,o.selectedVideo))})("closeModel",function(){(0,r.N)(n);let i=(0,r.Ka)(2);return(0,r.O)(i.productModalClosed())}),(0,r.Fa)()}if(t&2){let n=(0,r.Ka)(2);(0,r.va)("selectedItem",n.selectedItem)("items",n.selectedVideo.items)}}function Wv(t,e){if(t&1){let n=(0,r.Ia)();(0,r.Ea)(0,"div",6)(1,"div",11)(2,"div",12)(3,"video",13,2),(0,r.Ja)("timeupdate",function(i){let o=(0,r.N)(n).$index,s=(0,r.Ka)();return(0,r.O)(s.updateProgress(i,o))})("click",function(){let i=(0,r.N)(n).$index,o=(0,r.Ka)();return(0,r.O)(o.currentIndex===i&&o.toggleMute())})("ended",function(){(0,r.N)(n);let i=(0,r.Pa)(4),o=(0,r.Ka)();return(0,r.O)(o.onVideoEnded(i))}),(0,r.Ca)(5,Fv,1,2,"source",14,Bv),(0,r.Fa)(),(0,r.sa)(7,Uv,4,4)(8,Hv,4,0,"div",15),(0,r.Fa)(),(0,r.sa)(9,zv,1,2,"cooee-product-modal",16),(0,r.Fa)()()}if(t&2){let n=e.$implicit,i=e.$index,o=(0,r.Ka)();(0,r.fa)(3),(0,r.va)("ngClass",o.viewTemplateClassName)("autoplay",o.currentIndex===i)("muted",o.muted)("poster",n.thumbnail,r.ea),(0,r.ua)("data-video-id",n.id),(0,r.fa)(2),(0,r.Da)(n.sources),(0,r.fa)(2),(0,r.Aa)(o.currentIndex===i?7:-1),(0,r.fa)(),(0,r.Aa)(n.items.length&&o.currentIndex===i?8:-1),(0,r.fa)(),(0,r.Aa)(o.selectedItem&&o.currentIndex===i?9:-1)}}function Gv(t,e){t&1&&(0,r.Ha)(0)}function qv(t,e){if(t&1){let n=(0,r.Ia)();(0,r.Ea)(0,"button",24),(0,r.Ja)("click",function(){(0,r.N)(n);let i=(0,r.Ka)();return(0,r.O)(i.close())}),(0,r.P)(),(0,r.Ea)(1,"svg",25),(0,r.Ga)(2,"path",26)(3,"path",27),(0,r.Fa)()()}}var Ae=class extends mv{constructor(t,e,n,i){super(),this.cdr=t,this.elementRef=e,this.dialogRef=n,this.data=i,this.videos=i.videos,this.currentIndex=i.currentIndex,this.triggerContext=i.triggerContext}videos=[];currentIndex=0;swiperContainerRef;videoElements;muted=!1;videoProgress=[];selectedItem=null;selectedVideo;swiperInstance;detailPopupTemplate;viewTemplateClassName="lc-video-only-view";resizeDebouncer=new nv(this.onResize.bind(this));onResize(){this.swiperInstance?.destroy?.(),this.reInitSwiper()}ngOnInit(){super.ngOnInit(),this.detailPopupTemplate=this.engagementTrigger?.content?.videoConfig?.detailPopup.template??"VIDEO_ONLY_VIEW";let t=this.elementRef.nativeElement.shadowRoot,e=Aa.get().website.commonCSS;switch(Le.injectRawCSS(e,t),Le.injectStylesheet(wn.styleURL,t),Le.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(){(0,r.t)(this.getCurrentVideoElement(),"loadeddata").pipe(gv(this)).subscribe(()=>{this.initSwiper()})}ngOnDestroy(){this.swiperInstance?.destroy?.(),this.resizeDebouncer.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?Ft.EVENT_VIDEO_MUTED:Ft.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(t),await xs.set(ws.MUTED,this.muted),this.cdr.detectChanges()}playActiveVideo(){this.pauseAll();let t=this.getCurrentVideoElement();t&&(t.currentTime=1,t.play().then(async()=>{this.muted=await xs.get(ws.MUTED,!1),t.muted=this.muted}))}onVideoEnded(t){if(this.currentIndex<this.videos.length-1)this.selectedItem?(t.currentTime=0,t.play()):this.moveToNextVideo();else{let e=this.getPreviousVideoDataForEvent(),n=[Ft.EVENT_LAST_VIDEO_ENDED,{previous:e},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(n),t.currentTime=0,t.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(),i={previous:e,current:n},o=[Ft.EVENT_VIDEO_CHANGE,i,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(o)}productCardClicked(t,e){let n={videoID:e.id,videoIndex:this.currentIndex},i=[Ft.EVENT_MORE_ITEM_INFO_CLICKED,{current:n},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(i),this.selectedItem=t,this.selectedVideo=e,this.swiperInstance.disable()}reInitSwiper(){this.initSwiper(),this.selectedItem&&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.CooeeSDK.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(i=>i.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}};(0,r.g)(Ae,"\u0275fac",function(t){return new(t||Ae)((0,r.ka)(r.eb),(0,r.ka)(r.X),(0,r.ka)(Xn),(0,r.ka)(dc))}),(0,r.g)(Ae,"\u0275cmp",(0,r.na)({type:Ae,selectors:[["cooee-video-swiper-dialog"]],viewQuery:function(t,e){if(t&1&&((0,r.Ma)(Mv,5),(0,r.Ma)(Lv,5)),t&2){let n;(0,r.Na)(n=(0,r.Oa)())&&(e.swiperContainerRef=n.first),(0,r.Na)(n=(0,r.Oa)())&&(e.videoElements=n)}},inputs:{videos:"videos",currentIndex:"currentIndex"},features:[r.ra],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&&((0,r.Ea)(0,"div",3)(1,"div",4,0)(3,"div",5),(0,r.Ca)(4,Wv,10,8,"div",6,r.Ba),(0,r.Fa)(),(0,r.Ga)(6,"div",7)(7,"div",8),(0,r.Fa)(),(0,r.Ea)(8,"div",9),(0,r.sa)(9,Gv,1,0,"ng-container",10),(0,r.Fa)()(),(0,r.sa)(10,qv,4,0,"ng-template",null,1,r.bb)),t&2){let n=(0,r.Pa)(11);(0,r.va)("ngClass",e.viewTemplateClassName),(0,r.fa)(4),(0,r.Da)(e.videos),(0,r.fa)(5),(0,r.va)("ngTemplateOutlet",n)}},dependencies:[Av,Rv,zl,Pv,r.pb,r.nb],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}
|
|
76
76
|
`],encapsulation:3})),Ae=(0,r.f)([uv()],Ae);var Zv=["videoEl"],yc=(t,e)=>e.url;function Yv(t,e){if(t&1&&((0,r.Ea)(0,"div",1),(0,r.Qa)(1),(0,r.Fa)()),t&2){let n=(0,r.Ka)();(0,r.fa)(),(0,r.Sa)(" ",n.videoConfig.heading," ")}}function Kv(t,e){if(t&1&&(0,r.Ga)(0,"source",7),t&2){let n=e.$implicit;(0,r.La)("type",n.mimeType),(0,r.va)("src",n.url,r.ea)}}function Jv(t,e){if(t&1){let n=(0,r.Ia)();(0,r.Ea)(0,"cooee-mute-toggle",12),(0,r.Ja)("toggled",function(i){(0,r.N)(n),(0,r.Ka)();let o=(0,r.Pa)(5),s=(0,r.Ka)(2);return(0,r.O)(s.onMuteToggled(i,o))}),(0,r.Fa)()}if(t&2){(0,r.Ka)();let n=(0,r.Pa)(5);(0,r.va)("muted",n.muted)("videoEl",n)}}function Xv(t,e){if(t&1&&(0,r.Ga)(0,"img",13),t&2){(0,r.Ka)(2);let n=(0,r.Va)(0);(0,r.va)("src",n.imageURL,r.ea)("alt",n.name)}}function Qv(t,e){if(t&1&&((0,r.Ea)(0,"div",10),(0,r.sa)(1,Xv,1,2,"img",13),(0,r.Ea)(2,"div",14)(3,"span",15),(0,r.Qa)(4),(0,r.Fa)(),(0,r.Ta)(5),(0,r.Ga)(6,"span",16),(0,r._a)(7,"cooeeCurrency"),(0,r._a)(8,"safeHtml"),(0,r.Fa)()()),t&2){(0,r.Ka)();let n=(0,r.Va)(0),i=(0,r.Ka)(2);(0,r.fa)(),(0,r.Aa)(i.showImage?1:-1),(0,r.fa)(3),(0,r.Sa)(" ",n.name," ");let o=n.selectedOrFirstVariant.value.price.d;(0,r.fa)(2),(0,r.va)("innerHTML",(0,r.$a)(8,5,(0,r.$a)(7,3,o)),r.da)}}function ty(t,e){if(t&1){let n=(0,r.Ia)();(0,r.Ea)(0,"button",17),(0,r.Ja)("click",function(){(0,r.N)(n);let i=(0,r.Ka)().$implicit,o=(0,r.Va)(0),s=(0,r.Ka)(2);return(0,r.O)(s.addToCartClicked(i,o))}),(0,r.Qa)(1," Add to cart "),(0,r.Fa)()}}function ey(t,e){if(t&1){let n=(0,r.Ia)();(0,r.Ta)(0)(1),(0,r.Ea)(2,"div",4)(3,"a",5),(0,r.Ja)("click",function(i){let o=(0,r.N)(n),s=o.$implicit,a=o.$index,c=(0,r.Pa)(5),h=(0,r.Ka)(2);return(0,r.O)(h.onVideoTap(i,s,a,c))}),(0,r.Ea)(4,"video",6,0),(0,r.Ja)("mouseenter",function(){(0,r.N)(n);let i=(0,r.Pa)(5);(0,r.Ka)(2);let o=(0,r.Va)(2);return(0,r.O)(o&&i.play())})("mouseleave",function(){(0,r.N)(n);let i=(0,r.Pa)(5);(0,r.Ka)(2);let o=(0,r.Va)(2);return(0,r.O)(o&&i.pause())}),(0,r.Ca)(6,Kv,1,2,"source",7,yc),(0,r.Fa)(),(0,r.Ea)(8,"div",8),(0,r.sa)(9,Jv,1,2,"cooee-mute-toggle",9),(0,r.Fa)(),(0,r.sa)(10,Qv,9,7,"div",10),(0,r.Fa)(),(0,r.sa)(11,ty,2,0,"button",11),(0,r.Fa)()}if(t&2){let n=e.$implicit,i=(0,r.Ka)(2),o=(0,r.Va)(1),s=(0,r.Ua)(n.items[0])&&i.videoConfig.footerContent==i.VideoConfigFooterContent.FIRST_ITEM;(0,r.fa)(4),(0,r.va)("poster",n.thumbnail,r.ea)("muted",!0),(0,r.ua)("autoplay",o||null),(0,r.fa)(2),(0,r.Da)(n.sources),(0,r.fa)(3),(0,r.Aa)(i.videoConfig.showMuteButton?9:-1),(0,r.fa)(),(0,r.Aa)(s?10:-1),(0,r.fa)(),(0,r.Aa)(s?11:-1)}}function ny(t,e){if(t&1&&((0,r.Ea)(0,"div",2),(0,r.Ca)(1,ey,12,7,"div",4,r.Ba),(0,r.Fa)()),t&2){let n=(0,r.Ka)();(0,r.fa)(),(0,r.Da)(n.videos)}}function iy(t,e){if(t&1&&(0,r.Ga)(0,"source",7),t&2){let n=e.$implicit;(0,r.La)("type",n.mimeType),(0,r.va)("src",n.url,r.ea)}}function ry(t,e){if(t&1){let n=(0,r.Ia)();(0,r.Ea)(0,"div",18),(0,r.P)(),(0,r.Ea)(1,"svg",19),(0,r.Ga)(2,"circle",20)(3,"circle",21),(0,r.Fa)(),(0,r.Q)(),(0,r.Ea)(4,"div",22)(5,"video",23),(0,r.Ja)("click",function(i){let o=(0,r.N)(n),s=o.$implicit,a=o.$index,c=(0,r.Ka)(2);return(0,r.O)(c.onVideoTap(i,s,a))}),(0,r.Ca)(6,iy,1,2,"source",7,yc),(0,r.Fa)()()()}if(t&2){let n=e.$implicit;(0,r.fa)(5),(0,r.va)("muted",!0),(0,r.fa)(),(0,r.Da)(n.sources)}}function oy(t,e){if(t&1&&((0,r.Ea)(0,"div",3),(0,r.Ca)(1,ry,8,1,"div",18,r.Ba),(0,r.Fa)()),t&2){let n=(0,r.Ka)();(0,r.fa)(),(0,r.Da)(n.videos)}}function sy(t,e){if(t&1){let n=(0,r.Ia)();(0,r.Ea)(0,"cooee-draggable-video-popup",25),(0,r.Ja)("videoClicked",function(){(0,r.N)(n),(0,r.Ka)();let i=(0,r.Va)(0),o=(0,r.Ka)();return(0,r.O)(o.onPopupVideoClicked(i,0))})("closeClicked",function(){(0,r.N)(n);let i=(0,r.Ka)(2);return(0,r.O)(i.onPopupVideoClosed())}),(0,r.Fa)()}if(t&2){(0,r.Ka)();let n=(0,r.Va)(0);(0,r.va)("video",n)}}function ay(t,e){if(t&1&&((0,r.Ta)(0),(0,r.sa)(1,sy,1,1,"cooee-draggable-video-popup",24)),t&2){let n=(0,r.Ka)();(0,r.Ua)(n.videos[0]),(0,r.fa)(),(0,r.Aa)(n.hidePopupVideo?-1:1)}}var ly=class Wr extends hi{constructor(e,n){super(),this.dialog=e,this.cdr=n}videoElements;videos;VideoConfigTemplate=Dl;VideoConfigFooterContent=Pl;VideoConfigAutoPlay=Rl;isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";hidePopupVideo;videoConfig;showImage;dialogRef=null;ngOnInit(){super.ngOnInit(),Le.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 i=new Gi(Ft.EVENT_TRIGGER_CLICKED,{},this.triggerContext?.triggerData);i.videos=[e.id],n&&(i.items=[n]),this.sendEventToRenderer(i)}onVideoTap(e,n,i,o){e?.stopPropagation(),e?.preventDefault();let s=n.items?.[0];if(this.sendTriggerClicked(n,s?.toEmbed()),this.videoConfig.footerContent!=="FIRST_ITEM"){o&&(o.muted=!1,o.play(),this.onMuteToggled(!1,o));return}Le.loadSwiperScript().then(()=>this.openDialog(n,i))}async performCTA(e){let n,i=this.triggerContext;if(e.cta===fe.ADD_TO_CART)n=Ft.EVENT_ADD_TO_CART_CLICKED;else if(e.cta===fe.GO_TO_PRODUCT)n=Ft.EVENT_VIEW_ITEM_CLICKED;else if(e.cta===fe.OPEN_CART)n=Ft.EVENT_OPEN_CART_CLICKED,i.triggerData.redirectBehaviour=ka.CART_DRAWER;else{me.warn(`Unsupported CTA type: ${e.cta}`);return}let o={at:e.cta},s={videoID:e.video.id};this.sendEvent(n,{current:s},e.video,e.item),this.executeCTAViaRenderer({clickAction:o,embeddedItem:e.item.toEmbed()})}addToCartClicked(e,n){this.performCTA({cta:fe.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(Ft.EVENT_TRIGGER_CLOSED,{duration:e})}update(){}onMuteToggled(e,n){e||this.videoElements.forEach(i=>{i.nativeElement!==n&&(i.nativeElement.muted=!0,i.nativeElement.pause())})}playFirstVideo(){this.videoConfig.autoPlay==="ON_HOVER"&&this.isMobile&&this.videoElements.first?.nativeElement.play()}sendEvent(e,n,i,o){let s=new Gi(e,n,this.engagementTrigger);i&&(s.videos=[i.id]),o&&(s.items=[o.toEmbed()]),this.sendEventToRenderer(s)}openDialog(e,n){let i={videos:this.videos,currentIndex:n,triggerContext:this.triggerContext,onCTAPerformed:s=>this.performCTA(s)};this.dialogRef&&this.dialogRef.close(),this.dialogRef=this.dialog.open(Ae,{width:"100vw",height:"100vh",data:i});let o={videoID:e.id,videoIndex:n};this.sendEvent(Ft.EVENT_VIDEO_DIALOG_OPENED,{current:o},e),this.dialogRef.closed.subscribe(s=>{if(!s)return;let a=s.lastVideoDuration*1e3,c={videoID:s.lastVideo.id,videoIndex:s.lastVideoIndex,playedTillMS:a,playedTillPercent:a/e.durationMS},h=new Gi(Ft.EVENT_VIDEO_DIALOG_CLOSED,{current:c},this.triggerContext?.triggerData);h.videos=[s.lastVideo.id],this.sendEventToRenderer(h),this.dialogRef=null})}static \u0275fac=function(e){return new(e||Wr)((0,r.ka)(ev),(0,r.ka)(r.eb))};static \u0275cmp=(0,r.na)({type:Wr,selectors:[["cooee-shoppable-videos"]],viewQuery:function(e,n){if(e&1&&(0,r.Ma)(Zv,5),e&2){let i;(0,r.Na)(i=(0,r.Oa)())&&(n.videoElements=i)}},features:[r.ra],decls:7,vars:4,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:w-full","lc:h-auto","lc:text-center","lc:z-4","lc:p-4"],[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:w-full","lc:h-auto","lc:text-center","lc:z-4","lc:p-4",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&&((0,r.Ta)(0)(1)(2),(0,r.sa)(3,Yv,2,1,"div",1)(4,ny,3,0,"div",2)(5,oy,3,0,"div",3)(6,ay,2,2)),e&2){let i=n.videoConfig.template;(0,r.fa)(),(0,r.Ua)(!n.videoConfig.autoPlay||n.videoConfig.autoPlay===n.VideoConfigAutoPlay.ON),(0,r.fa)(),(0,r.Ua)(n.videoConfig.autoPlay===n.VideoConfigAutoPlay.ON_HOVER),(0,r.fa)(),(0,r.Aa)(n.videoConfig.heading?3:-1),(0,r.fa)(),(0,r.Aa)(i===n.VideoConfigTemplate.SIMPLE||i===n.VideoConfigTemplate.SWIPER?4:i===n.VideoConfigTemplate.STORY?5:i===n.VideoConfigTemplate.FLOATING_POPUP?6:-1)}},dependencies:[mi,fm,r.ub,zl],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%]{cursor:pointer;background:rgb(var(--lc-color-button));color:rgb(var(--lc-color-button-text));border-radius:var(--lc-button-radius)}.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}"]})};Cu("CooeeWidgetSDK");(async()=>{let t=await(0,r.tb)(Ou),e=(n,i)=>{let o=xu(n,{injector:t.injector});customElements.define(i,o)};e(Cg,"cooee-sticky-atc"),e(mg,"cooee-progressbar"),e(ly,"cooee-shoppable-videos"),e(Lu,"cooee-product-options-picker"),sessionStorage.cooeeDebug&&import("./chunk-7OOIPWXD.js").then(n=>{e(n.DebuggerComponent,"cooee-debugger")}),An.filters.define("default",function(n){return n??""}),An.defaultConfig.defaultFilter="default",An.defaultConfig.useWith=!0,An.defaultConfig.autoTrim="slurp"})();})();
|