@letscooee/web-sdk 9.12.4 → 9.12.5

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 CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var yd=Object.create;var Ec=Object.defineProperty;var vd=Object.getOwnPropertyDescriptor;var wd=Object.getOwnPropertyNames;var bd=Object.getPrototypeOf,_d=Object.prototype.hasOwnProperty;var Ed=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of wd(e))!_d.call(t,i)&&i!==r&&Ec(t,i,{get:()=>e[i],enumerable:!(n=vd(e,i))||n.enumerable});return t};var Sd=(t,e,r)=>(r=t!=null?yd(bd(t)):{},Ed(e||!t||!t.__esModule?Ec(r,"default",{value:t,enumerable:!0}):r,t));var Id=Object.create,ta=Object.defineProperty,Cd=Object.defineProperties,Td=Object.getOwnPropertyDescriptor,xd=Object.getOwnPropertyDescriptors,Dd=Object.getOwnPropertyNames,Sc=Object.getOwnPropertySymbols,Ad=Object.getPrototypeOf,du=Object.prototype.hasOwnProperty,Nd=Object.prototype.propertyIsEnumerable,Ic=(t,e,r)=>e in t?ta(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,x=(t,e)=>{for(var r in e||={})du.call(e,r)&&Ic(t,r,e[r]);if(Sc)for(var r of Sc(e))Nd.call(e,r)&&Ic(t,r,e[r]);return t},yt=(t,e)=>Cd(t,xd(e)),di=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),rs=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Od=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Dd(e))!du.call(t,i)&&i!==r&&ta(t,i,{get:()=>e[i],enumerable:!(n=Td(e,i))||n.enumerable});return t},ke=(t,e,r)=>(r=t!=null?Id(Ad(t)):{},Od(e||!t||!t.__esModule?ta(r,"default",{value:t,enumerable:!0}):r,t)),sn=rs((t,e)=>{"use strict";(function(r){"use strict";var n={};n.VERSION="1.6.1";var i,s={},o=function(h,b){return function(){return b.apply(h,arguments)}},c=function(){var h=arguments,b=h[0],v,w;for(w=1;w<h.length;w++)for(v in h[w])!(v in b)&&h[w].hasOwnProperty(v)&&(b[v]=h[w][v]);return b},l=function(h,b){return{value:h,name:b}};n.TRACE=l(1,"TRACE"),n.DEBUG=l(2,"DEBUG"),n.INFO=l(3,"INFO"),n.TIME=l(4,"TIME"),n.WARN=l(5,"WARN"),n.ERROR=l(8,"ERROR"),n.OFF=l(99,"OFF");var p=function(h){this.context=h,this.setLevel(h.filterLevel),this.log=this.info};p.prototype={setLevel:function(h){h&&"value"in h&&(this.context.filterLevel=h)},getLevel:function(){return this.context.filterLevel},enabledFor:function(h){var b=this.context.filterLevel;return h.value>=b.value},trace:function(){this.invoke(n.TRACE,arguments)},debug:function(){this.invoke(n.DEBUG,arguments)},info:function(){this.invoke(n.INFO,arguments)},warn:function(){this.invoke(n.WARN,arguments)},error:function(){this.invoke(n.ERROR,arguments)},time:function(h){typeof h=="string"&&h.length>0&&this.invoke(n.TIME,[h,"start"])},timeEnd:function(h){typeof h=="string"&&h.length>0&&this.invoke(n.TIME,[h,"end"])},invoke:function(h,b){i&&this.enabledFor(h)&&i(b,c({level:h},this.context))}};var d=new p({filterLevel:n.OFF});(function(){var h=n;h.enabledFor=o(d,d.enabledFor),h.trace=o(d,d.trace),h.debug=o(d,d.debug),h.time=o(d,d.time),h.timeEnd=o(d,d.timeEnd),h.info=o(d,d.info),h.warn=o(d,d.warn),h.error=o(d,d.error),h.log=h.info})(),n.setHandler=function(h){i=h},n.setLevel=function(h){d.setLevel(h);for(var b in s)s.hasOwnProperty(b)&&s[b].setLevel(h)},n.getLevel=function(){return d.getLevel()},n.get=function(h){return s[h]||(s[h]=new p(c({name:h},d.context)))},n.createDefaultHandler=function(h){h=h||{},h.formatter=h.formatter||function(w,_){_.name&&w.unshift("["+_.name+"]")};var b={},v=function(w,_){Function.prototype.apply.call(w,console,_)};return typeof console>"u"?function(){}:function(w,_){w=Array.prototype.slice.call(w);var k=console.log,A;_.level===n.TIME?(A=(_.name?"["+_.name+"] ":"")+w[0],w[1]==="start"?console.time?console.time(A):b[A]=new Date().getTime():console.timeEnd?console.timeEnd(A):v(k,[A+": "+(new Date().getTime()-b[A])+"ms"])):(_.level===n.WARN&&console.warn?k=console.warn:_.level===n.ERROR&&console.error?k=console.error:_.level===n.INFO&&console.info?k=console.info:_.level===n.DEBUG&&console.debug?k=console.debug:_.level===n.TRACE&&console.trace&&(k=console.trace),h.formatter(w,_),v(k,w))}},n.useDefaults=function(h){n.setLevel(h&&h.defaultLevel||n.DEBUG),n.setHandler(n.createDefaultHandler(h))},n.setDefaults=n.useDefaults,typeof define=="function"&&define.amd?define(n):typeof e<"u"&&e.exports?e.exports=n:(n._prevLogger=r.Logger,n.noConflict=function(){return r.Logger=n._prevLogger,n},r.Logger=n)})(t)}),kd=rs((t,e)=>{"use strict";(function(r){if(typeof t=="object"&&typeof e<"u")e.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var n;typeof window<"u"?n=window:typeof global<"u"?n=global:typeof self<"u"?n=self:n=this,n.localforage=r()}})(function(){var r,n,i;return function s(o,c,l){function p(b,v){if(!c[b]){if(!o[b]){var w=typeof di=="function"&&di;if(!v&&w)return w(b,!0);if(d)return d(b,!0);var _=new Error("Cannot find module '"+b+"'");throw _.code="MODULE_NOT_FOUND",_}var k=c[b]={exports:{}};o[b][0].call(k.exports,function(A){var B=o[b][1][A];return p(B||A)},k,k.exports,s,o,c,l)}return c[b].exports}for(var d=typeof di=="function"&&di,h=0;h<l.length;h++)p(l[h]);return p}({1:[function(s,o,c){(function(l){"use strict";var p=l.MutationObserver||l.WebKitMutationObserver,d;if(p){var h=0,b=new p(A),v=l.document.createTextNode("");b.observe(v,{characterData:!0}),d=function(){v.data=h=++h%2}}else if(!l.setImmediate&&typeof l.MessageChannel<"u"){var w=new l.MessageChannel;w.port1.onmessage=A,d=function(){w.port2.postMessage(0)}}else"document"in l&&"onreadystatechange"in l.document.createElement("script")?d=function(){var G=l.document.createElement("script");G.onreadystatechange=function(){A(),G.onreadystatechange=null,G.parentNode.removeChild(G),G=null},l.document.documentElement.appendChild(G)}:d=function(){setTimeout(A,0)};var _,k=[];function A(){_=!0;for(var G,j,X=k.length;X;){for(j=k,k=[],G=-1;++G<X;)j[G]();X=k.length}_=!1}o.exports=B;function B(G){k.push(G)===1&&!_&&d()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(s,o,c){"use strict";var l=s(1);function p(){}var d={},h=["REJECTED"],b=["FULFILLED"],v=["PENDING"];o.exports=w;function w(q){if(typeof q!="function")throw new TypeError("resolver must be a function");this.state=v,this.queue=[],this.outcome=void 0,q!==p&&B(this,q)}w.prototype.catch=function(q){return this.then(null,q)},w.prototype.then=function(q,rt){if(typeof q!="function"&&this.state===b||typeof rt!="function"&&this.state===h)return this;var Q=new this.constructor(p);if(this.state!==v){var tt=this.state===b?q:rt;k(Q,tt,this.outcome)}else this.queue.push(new _(Q,q,rt));return Q};function _(q,rt,Q){this.promise=q,typeof rt=="function"&&(this.onFulfilled=rt,this.callFulfilled=this.otherCallFulfilled),typeof Q=="function"&&(this.onRejected=Q,this.callRejected=this.otherCallRejected)}_.prototype.callFulfilled=function(q){d.resolve(this.promise,q)},_.prototype.otherCallFulfilled=function(q){k(this.promise,this.onFulfilled,q)},_.prototype.callRejected=function(q){d.reject(this.promise,q)},_.prototype.otherCallRejected=function(q){k(this.promise,this.onRejected,q)};function k(q,rt,Q){l(function(){var tt;try{tt=rt(Q)}catch(lt){return d.reject(q,lt)}tt===q?d.reject(q,new TypeError("Cannot resolve promise with itself")):d.resolve(q,tt)})}d.resolve=function(q,rt){var Q=G(A,rt);if(Q.status==="error")return d.reject(q,Q.value);var tt=Q.value;if(tt)B(q,tt);else{q.state=b,q.outcome=rt;for(var lt=-1,kt=q.queue.length;++lt<kt;)q.queue[lt].callFulfilled(rt)}return q},d.reject=function(q,rt){q.state=h,q.outcome=rt;for(var Q=-1,tt=q.queue.length;++Q<tt;)q.queue[Q].callRejected(rt);return q};function A(q){var rt=q&&q.then;if(q&&(typeof q=="object"||typeof q=="function")&&typeof rt=="function")return function(){rt.apply(q,arguments)}}function B(q,rt){var Q=!1;function tt(jt){Q||(Q=!0,d.reject(q,jt))}function lt(jt){Q||(Q=!0,d.resolve(q,jt))}function kt(){rt(lt,tt)}var At=G(kt);At.status==="error"&&tt(At.value)}function G(q,rt){var Q={};try{Q.value=q(rt),Q.status="success"}catch(tt){Q.status="error",Q.value=tt}return Q}w.resolve=j;function j(q){return q instanceof this?q:d.resolve(new this(p),q)}w.reject=X;function X(q){var rt=new this(p);return d.reject(rt,q)}w.all=_t;function _t(q){var rt=this;if(Object.prototype.toString.call(q)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Q=q.length,tt=!1;if(!Q)return this.resolve([]);for(var lt=new Array(Q),kt=0,At=-1,jt=new this(p);++At<Q;)Wt(q[At],At);return jt;function Wt(ft,Gt){rt.resolve(ft).then(st,function(et){tt||(tt=!0,d.reject(jt,et))});function st(et){lt[Gt]=et,++kt===Q&&!tt&&(tt=!0,d.resolve(jt,lt))}}}w.race=Dt;function Dt(q){var rt=this;if(Object.prototype.toString.call(q)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Q=q.length,tt=!1;if(!Q)return this.resolve([]);for(var lt=-1,kt=new this(p);++lt<Q;)At(q[lt]);return kt;function At(jt){rt.resolve(jt).then(function(Wt){tt||(tt=!0,d.resolve(kt,Wt))},function(Wt){tt||(tt=!0,d.reject(kt,Wt))})}}},{1:1}],3:[function(s,o,c){(function(l){"use strict";typeof l.Promise!="function"&&(l.Promise=s(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(s,o,c){"use strict";var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g};function p(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function d(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var h=d();function b(){try{if(!h||!h.open)return!1;var g=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),m=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!g||m)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function v(g,m){g=g||[],m=m||{};try{return new Blob(g,m)}catch(C){if(C.name!=="TypeError")throw C;for(var y=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,I=new y,S=0;S<g.length;S+=1)I.append(g[S]);return I.getBlob(m.type)}}typeof Promise>"u"&&s(3);var w=Promise;function _(g,m){m&&g.then(function(y){m(null,y)},function(y){m(y)})}function k(g,m,y){typeof m=="function"&&g.then(m),typeof y=="function"&&g.catch(y)}function A(g){return typeof g!="string"&&(console.warn(g+" used as a key, but it is not a string."),g=String(g)),g}function B(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var G="local-forage-detect-blob-support",j=void 0,X={},_t=Object.prototype.toString,Dt="readonly",q="readwrite";function rt(g){for(var m=g.length,y=new ArrayBuffer(m),I=new Uint8Array(y),S=0;S<m;S++)I[S]=g.charCodeAt(S);return y}function Q(g){return new w(function(m){var y=g.transaction(G,q),I=v([""]);y.objectStore(G).put(I,"key"),y.onabort=function(S){S.preventDefault(),S.stopPropagation(),m(!1)},y.oncomplete=function(){var S=navigator.userAgent.match(/Chrome\/(\d+)/),C=navigator.userAgent.match(/Edge\//);m(C||!S||parseInt(S[1],10)>=43)}}).catch(function(){return!1})}function tt(g){return typeof j=="boolean"?w.resolve(j):Q(g).then(function(m){return j=m,j})}function lt(g){var m=X[g.name],y={};y.promise=new w(function(I,S){y.resolve=I,y.reject=S}),m.deferredOperations.push(y),m.dbReady?m.dbReady=m.dbReady.then(function(){return y.promise}):m.dbReady=y.promise}function kt(g){var m=X[g.name],y=m.deferredOperations.pop();if(y)return y.resolve(),y.promise}function At(g,m){var y=X[g.name],I=y.deferredOperations.pop();if(I)return I.reject(m),I.promise}function jt(g,m){return new w(function(y,I){if(X[g.name]=X[g.name]||ui(),g.db)if(m)lt(g),g.db.close();else return y(g.db);var S=[g.name];m&&S.push(g.version);var C=h.open.apply(h,S);m&&(C.onupgradeneeded=function(O){var $=C.result;try{$.createObjectStore(g.storeName),O.oldVersion<=1&&$.createObjectStore(G)}catch(W){if(W.name==="ConstraintError")console.warn('The database "'+g.name+'" has been upgraded from version '+O.oldVersion+" to version "+O.newVersion+', but the storage "'+g.storeName+'" already exists.');else throw W}}),C.onerror=function(O){O.preventDefault(),I(C.error)},C.onsuccess=function(){var O=C.result;O.onversionchange=function($){$.target.close()},y(O),kt(g)}})}function Wt(g){return jt(g,!1)}function ft(g){return jt(g,!0)}function Gt(g,m){if(!g.db)return!0;var y=!g.db.objectStoreNames.contains(g.storeName),I=g.version<g.db.version,S=g.version>g.db.version;if(I&&(g.version!==m&&console.warn('The database "'+g.name+`" can't be downgraded from version `+g.db.version+" to version "+g.version+"."),g.version=g.db.version),S||y){if(y){var C=g.db.version+1;C>g.version&&(g.version=C)}return!0}return!1}function st(g){return new w(function(m,y){var I=new FileReader;I.onerror=y,I.onloadend=function(S){var C=btoa(S.target.result||"");m({__local_forage_encoded_blob:!0,data:C,type:g.type})},I.readAsBinaryString(g)})}function et(g){var m=rt(atob(g.data));return v([m],{type:g.type})}function $t(g){return g&&g.__local_forage_encoded_blob}function ci(g){var m=this,y=m._initReady().then(function(){var I=X[m._dbInfo.name];if(I&&I.dbReady)return I.dbReady});return k(y,g,g),y}function li(g){lt(g);for(var m=X[g.name],y=m.forages,I=0;I<y.length;I++){var S=y[I];S._dbInfo.db&&(S._dbInfo.db.close(),S._dbInfo.db=null)}return g.db=null,Wt(g).then(function(C){return g.db=C,Gt(g)?ft(g):C}).then(function(C){g.db=m.db=C;for(var O=0;O<y.length;O++)y[O]._dbInfo.db=C}).catch(function(C){throw At(g,C),C})}function oe(g,m,y,I){I===void 0&&(I=1);try{var S=g.db.transaction(g.storeName,m);y(null,S)}catch(C){if(I>0&&(!g.db||C.name==="InvalidStateError"||C.name==="NotFoundError"))return w.resolve().then(function(){if(!g.db||C.name==="NotFoundError"&&!g.db.objectStoreNames.contains(g.storeName)&&g.version<=g.db.version)return g.db&&(g.version=g.db.version+1),ft(g)}).then(function(){return li(g).then(function(){oe(g,m,y,I-1)})}).catch(y);y(C)}}function ui(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Es(g){var m=this,y={db:null};if(g)for(var I in g)y[I]=g[I];var S=X[y.name];S||(S=ui(),X[y.name]=S),S.forages.push(m),m._initReady||(m._initReady=m.ready,m.ready=ci);var C=[];function O(){return w.resolve()}for(var $=0;$<S.forages.length;$++){var W=S.forages[$];W!==m&&C.push(W._initReady().catch(O))}var V=S.forages.slice(0);return w.all(C).then(function(){return y.db=S.db,Wt(y)}).then(function(F){return y.db=F,Gt(y,m._defaultConfig.version)?ft(y):F}).then(function(F){y.db=S.db=F,m._dbInfo=y;for(var J=0;J<V.length;J++){var it=V[J];it!==m&&(it._dbInfo.db=y.db,it._dbInfo.version=y.version)}})}function dn(g,m){var y=this;g=A(g);var I=new w(function(S,C){y.ready().then(function(){oe(y._dbInfo,Dt,function(O,$){if(O)return C(O);try{var W=$.objectStore(y._dbInfo.storeName),V=W.get(g);V.onsuccess=function(){var F=V.result;F===void 0&&(F=null),$t(F)&&(F=et(F)),S(F)},V.onerror=function(){C(V.error)}}catch(F){C(F)}})}).catch(C)});return _(I,m),I}function Ss(g,m){var y=this,I=new w(function(S,C){y.ready().then(function(){oe(y._dbInfo,Dt,function(O,$){if(O)return C(O);try{var W=$.objectStore(y._dbInfo.storeName),V=W.openCursor(),F=1;V.onsuccess=function(){var J=V.result;if(J){var it=J.value;$t(it)&&(it=et(it));var vt=g(it,J.key,F++);vt!==void 0?S(vt):J.continue()}else S()},V.onerror=function(){C(V.error)}}catch(J){C(J)}})}).catch(C)});return _(I,m),I}function Is(g,m,y){var I=this;g=A(g);var S=new w(function(C,O){var $;I.ready().then(function(){return $=I._dbInfo,_t.call(m)==="[object Blob]"?tt($.db).then(function(W){return W?m:st(m)}):m}).then(function(W){oe(I._dbInfo,q,function(V,F){if(V)return O(V);try{var J=F.objectStore(I._dbInfo.storeName);W===null&&(W=void 0);var it=J.put(W,g);F.oncomplete=function(){W===void 0&&(W=null),C(W)},F.onabort=F.onerror=function(){var vt=it.error?it.error:it.transaction.error;O(vt)}}catch(vt){O(vt)}})}).catch(O)});return _(S,y),S}function hi(g,m){var y=this;g=A(g);var I=new w(function(S,C){y.ready().then(function(){oe(y._dbInfo,q,function(O,$){if(O)return C(O);try{var W=$.objectStore(y._dbInfo.storeName),V=W.delete(g);$.oncomplete=function(){S()},$.onerror=function(){C(V.error)},$.onabort=function(){var F=V.error?V.error:V.transaction.error;C(F)}}catch(F){C(F)}})}).catch(C)});return _(I,m),I}function Lr(g){var m=this,y=new w(function(I,S){m.ready().then(function(){oe(m._dbInfo,q,function(C,O){if(C)return S(C);try{var $=O.objectStore(m._dbInfo.storeName),W=$.clear();O.oncomplete=function(){I()},O.onabort=O.onerror=function(){var V=W.error?W.error:W.transaction.error;S(V)}}catch(V){S(V)}})}).catch(S)});return _(y,g),y}function ae(g){var m=this,y=new w(function(I,S){m.ready().then(function(){oe(m._dbInfo,Dt,function(C,O){if(C)return S(C);try{var $=O.objectStore(m._dbInfo.storeName),W=$.count();W.onsuccess=function(){I(W.result)},W.onerror=function(){S(W.error)}}catch(V){S(V)}})}).catch(S)});return _(y,g),y}function fn(g,m){var y=this,I=new w(function(S,C){if(g<0){S(null);return}y.ready().then(function(){oe(y._dbInfo,Dt,function(O,$){if(O)return C(O);try{var W=$.objectStore(y._dbInfo.storeName),V=!1,F=W.openKeyCursor();F.onsuccess=function(){var J=F.result;if(!J){S(null);return}g===0||V?S(J.key):(V=!0,J.advance(g))},F.onerror=function(){C(F.error)}}catch(J){C(J)}})}).catch(C)});return _(I,m),I}function Cs(g){var m=this,y=new w(function(I,S){m.ready().then(function(){oe(m._dbInfo,Dt,function(C,O){if(C)return S(C);try{var $=O.objectStore(m._dbInfo.storeName),W=$.openKeyCursor(),V=[];W.onsuccess=function(){var F=W.result;if(!F){I(V);return}V.push(F.key),F.continue()},W.onerror=function(){S(W.error)}}catch(F){S(F)}})}).catch(S)});return _(y,g),y}function a(g,m){m=B.apply(this,arguments);var y=this.config();g=typeof g!="function"&&g||{},g.name||(g.name=g.name||y.name,g.storeName=g.storeName||y.storeName);var I=this,S;if(!g.name)S=w.reject("Invalid arguments");else{var C=g.name===y.name&&I._dbInfo.db,O=C?w.resolve(I._dbInfo.db):Wt(g).then(function($){var W=X[g.name],V=W.forages;W.db=$;for(var F=0;F<V.length;F++)V[F]._dbInfo.db=$;return $});g.storeName?S=O.then(function($){if($.objectStoreNames.contains(g.storeName)){var W=$.version+1;lt(g);var V=X[g.name],F=V.forages;$.close();for(var J=0;J<F.length;J++){var it=F[J];it._dbInfo.db=null,it._dbInfo.version=W}var vt=new w(function(pt,Pt){var It=h.open(g.name,W);It.onerror=function(ce){var Ns=It.result;Ns.close(),Pt(ce)},It.onupgradeneeded=function(){var ce=It.result;ce.deleteObjectStore(g.storeName)},It.onsuccess=function(){var ce=It.result;ce.close(),pt(ce)}});return vt.then(function(pt){V.db=pt;for(var Pt=0;Pt<F.length;Pt++){var It=F[Pt];It._dbInfo.db=pt,kt(It._dbInfo)}}).catch(function(pt){throw(At(g,pt)||w.resolve()).catch(function(){}),pt})}}):S=O.then(function($){lt(g);var W=X[g.name],V=W.forages;$.close();for(var F=0;F<V.length;F++){var J=V[F];J._dbInfo.db=null}var it=new w(function(vt,pt){var Pt=h.deleteDatabase(g.name);Pt.onerror=function(){var It=Pt.result;It&&It.close(),pt(Pt.error)},Pt.onblocked=function(){console.warn('dropInstance blocked for database "'+g.name+'" until all open connections are closed')},Pt.onsuccess=function(){var It=Pt.result;It&&It.close(),vt(It)}});return it.then(function(vt){W.db=vt;for(var pt=0;pt<V.length;pt++){var Pt=V[pt];kt(Pt._dbInfo)}}).catch(function(vt){throw(At(g,vt)||w.resolve()).catch(function(){}),vt})})}return _(S,m),S}var u={_driver:"asyncStorage",_initStorage:Es,_support:b(),iterate:Ss,getItem:dn,setItem:Is,removeItem:hi,clear:Lr,length:ae,key:fn,keys:Cs,dropInstance:a};function f(){return typeof openDatabase=="function"}var E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D="~~local_forage_type~",M=/^~~local_forage_type~([^~]+)~/,Y="__lfsc__:",ut=Y.length,Nt="arbf",gt="blob",St="si08",Ut="ui08",hr="uic8",gn="si16",mn="si32",lc="ur16",uc="ui32",hc="fl32",pc="fl64",dc=ut+Nt.length,fc=Object.prototype.toString;function gc(g){var m=g.length*.75,y=g.length,I,S=0,C,O,$,W;g[g.length-1]==="="&&(m--,g[g.length-2]==="="&&m--);var V=new ArrayBuffer(m),F=new Uint8Array(V);for(I=0;I<y;I+=4)C=E.indexOf(g[I]),O=E.indexOf(g[I+1]),$=E.indexOf(g[I+2]),W=E.indexOf(g[I+3]),F[S++]=C<<2|O>>4,F[S++]=(O&15)<<4|$>>2,F[S++]=($&3)<<6|W&63;return V}function Ts(g){var m=new Uint8Array(g),y="",I;for(I=0;I<m.length;I+=3)y+=E[m[I]>>2],y+=E[(m[I]&3)<<4|m[I+1]>>4],y+=E[(m[I+1]&15)<<2|m[I+2]>>6],y+=E[m[I+2]&63];return m.length%3===2?y=y.substring(0,y.length-1)+"=":m.length%3===1&&(y=y.substring(0,y.length-2)+"=="),y}function Rp(g,m){var y="";if(g&&(y=fc.call(g)),g&&(y==="[object ArrayBuffer]"||g.buffer&&fc.call(g.buffer)==="[object ArrayBuffer]")){var I,S=Y;g instanceof ArrayBuffer?(I=g,S+=Nt):(I=g.buffer,y==="[object Int8Array]"?S+=St:y==="[object Uint8Array]"?S+=Ut:y==="[object Uint8ClampedArray]"?S+=hr:y==="[object Int16Array]"?S+=gn:y==="[object Uint16Array]"?S+=lc:y==="[object Int32Array]"?S+=mn:y==="[object Uint32Array]"?S+=uc:y==="[object Float32Array]"?S+=hc:y==="[object Float64Array]"?S+=pc:m(new Error("Failed to get type for BinaryArray"))),m(S+Ts(I))}else if(y==="[object Blob]"){var C=new FileReader;C.onload=function(){var O=D+g.type+"~"+Ts(this.result);m(Y+gt+O)},C.readAsArrayBuffer(g)}else try{m(JSON.stringify(g))}catch(O){console.error("Couldn't convert value into a JSON string: ",g),m(null,O)}}function Lp(g){if(g.substring(0,ut)!==Y)return JSON.parse(g);var m=g.substring(dc),y=g.substring(ut,dc),I;if(y===gt&&M.test(m)){var S=m.match(M);I=S[1],m=m.substring(S[0].length)}var C=gc(m);switch(y){case Nt:return C;case gt:return v([C],{type:I});case St:return new Int8Array(C);case Ut:return new Uint8Array(C);case hr:return new Uint8ClampedArray(C);case gn:return new Int16Array(C);case lc:return new Uint16Array(C);case mn:return new Int32Array(C);case uc:return new Uint32Array(C);case hc:return new Float32Array(C);case pc:return new Float64Array(C);default:throw new Error("Unkown type: "+y)}}var xs={serialize:Rp,deserialize:Lp,stringToBuffer:gc,bufferToString:Ts};function mc(g,m,y,I){g.executeSql("CREATE TABLE IF NOT EXISTS "+m.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],y,I)}function Mp(g){var m=this,y={db:null};if(g)for(var I in g)y[I]=typeof g[I]!="string"?g[I].toString():g[I];var S=new w(function(C,O){try{y.db=openDatabase(y.name,String(y.version),y.description,y.size)}catch($){return O($)}y.db.transaction(function($){mc($,y,function(){m._dbInfo=y,C()},function(W,V){O(V)})},O)});return y.serializer=xs,S}function Je(g,m,y,I,S,C){g.executeSql(y,I,S,function(O,$){$.code===$.SYNTAX_ERR?O.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[m.storeName],function(W,V){V.rows.length?C(W,$):mc(W,m,function(){W.executeSql(y,I,S,C)},C)},C):C(O,$)},C)}function Up(g,m){var y=this;g=A(g);var I=new w(function(S,C){y.ready().then(function(){var O=y._dbInfo;O.db.transaction(function($){Je($,O,"SELECT * FROM "+O.storeName+" WHERE key = ? LIMIT 1",[g],function(W,V){var F=V.rows.length?V.rows.item(0).value:null;F&&(F=O.serializer.deserialize(F)),S(F)},function(W,V){C(V)})})}).catch(C)});return _(I,m),I}function Bp(g,m){var y=this,I=new w(function(S,C){y.ready().then(function(){var O=y._dbInfo;O.db.transaction(function($){Je($,O,"SELECT * FROM "+O.storeName,[],function(W,V){for(var F=V.rows,J=F.length,it=0;it<J;it++){var vt=F.item(it),pt=vt.value;if(pt&&(pt=O.serializer.deserialize(pt)),pt=g(pt,vt.key,it+1),pt!==void 0){S(pt);return}}S()},function(W,V){C(V)})})}).catch(C)});return _(I,m),I}function yc(g,m,y,I){var S=this;g=A(g);var C=new w(function(O,$){S.ready().then(function(){m===void 0&&(m=null);var W=m,V=S._dbInfo;V.serializer.serialize(m,function(F,J){J?$(J):V.db.transaction(function(it){Je(it,V,"INSERT OR REPLACE INTO "+V.storeName+" (key, value) VALUES (?, ?)",[g,F],function(){O(W)},function(vt,pt){$(pt)})},function(it){if(it.code===it.QUOTA_ERR){if(I>0){O(yc.apply(S,[g,W,y,I-1]));return}$(it)}})})}).catch($)});return _(C,y),C}function jp(g,m,y){return yc.apply(this,[g,m,y,1])}function $p(g,m){var y=this;g=A(g);var I=new w(function(S,C){y.ready().then(function(){var O=y._dbInfo;O.db.transaction(function($){Je($,O,"DELETE FROM "+O.storeName+" WHERE key = ?",[g],function(){S()},function(W,V){C(V)})})}).catch(C)});return _(I,m),I}function Fp(g){var m=this,y=new w(function(I,S){m.ready().then(function(){var C=m._dbInfo;C.db.transaction(function(O){Je(O,C,"DELETE FROM "+C.storeName,[],function(){I()},function($,W){S(W)})})}).catch(S)});return _(y,g),y}function Hp(g){var m=this,y=new w(function(I,S){m.ready().then(function(){var C=m._dbInfo;C.db.transaction(function(O){Je(O,C,"SELECT COUNT(key) as c FROM "+C.storeName,[],function($,W){var V=W.rows.item(0).c;I(V)},function($,W){S(W)})})}).catch(S)});return _(y,g),y}function Vp(g,m){var y=this,I=new w(function(S,C){y.ready().then(function(){var O=y._dbInfo;O.db.transaction(function($){Je($,O,"SELECT key FROM "+O.storeName+" WHERE id = ? LIMIT 1",[g+1],function(W,V){var F=V.rows.length?V.rows.item(0).key:null;S(F)},function(W,V){C(V)})})}).catch(C)});return _(I,m),I}function qp(g){var m=this,y=new w(function(I,S){m.ready().then(function(){var C=m._dbInfo;C.db.transaction(function(O){Je(O,C,"SELECT key FROM "+C.storeName,[],function($,W){for(var V=[],F=0;F<W.rows.length;F++)V.push(W.rows.item(F).key);I(V)},function($,W){S(W)})})}).catch(S)});return _(y,g),y}function Wp(g){return new w(function(m,y){g.transaction(function(I){I.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(S,C){for(var O=[],$=0;$<C.rows.length;$++)O.push(C.rows.item($).name);m({db:g,storeNames:O})},function(S,C){y(C)})},function(I){y(I)})})}function Gp(g,m){m=B.apply(this,arguments);var y=this.config();g=typeof g!="function"&&g||{},g.name||(g.name=g.name||y.name,g.storeName=g.storeName||y.storeName);var I=this,S;return g.name?S=new w(function(C){var O;g.name===y.name?O=I._dbInfo.db:O=openDatabase(g.name,"","",0),g.storeName?C({db:O,storeNames:[g.storeName]}):C(Wp(O))}).then(function(C){return new w(function(O,$){C.db.transaction(function(W){function V(vt){return new w(function(pt,Pt){W.executeSql("DROP TABLE IF EXISTS "+vt,[],function(){pt()},function(It,ce){Pt(ce)})})}for(var F=[],J=0,it=C.storeNames.length;J<it;J++)F.push(V(C.storeNames[J]));w.all(F).then(function(){O()}).catch(function(vt){$(vt)})},function(W){$(W)})})}):S=w.reject("Invalid arguments"),_(S,m),S}var zp={_driver:"webSQLStorage",_initStorage:Mp,_support:f(),iterate:Bp,getItem:Up,setItem:jp,removeItem:$p,clear:Fp,length:Hp,key:Vp,keys:qp,dropInstance:Gp};function Yp(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function vc(g,m){var y=g.name+"/";return g.storeName!==m.storeName&&(y+=g.storeName+"/"),y}function Kp(){var g="_localforage_support_test";try{return localStorage.setItem(g,!0),localStorage.removeItem(g),!1}catch{return!0}}function Jp(){return!Kp()||localStorage.length>0}function Xp(g){var m=this,y={};if(g)for(var I in g)y[I]=g[I];return y.keyPrefix=vc(g,m._defaultConfig),Jp()?(m._dbInfo=y,y.serializer=xs,w.resolve()):w.reject()}function Qp(g){var m=this,y=m.ready().then(function(){for(var I=m._dbInfo.keyPrefix,S=localStorage.length-1;S>=0;S--){var C=localStorage.key(S);C.indexOf(I)===0&&localStorage.removeItem(C)}});return _(y,g),y}function Zp(g,m){var y=this;g=A(g);var I=y.ready().then(function(){var S=y._dbInfo,C=localStorage.getItem(S.keyPrefix+g);return C&&(C=S.serializer.deserialize(C)),C});return _(I,m),I}function td(g,m){var y=this,I=y.ready().then(function(){for(var S=y._dbInfo,C=S.keyPrefix,O=C.length,$=localStorage.length,W=1,V=0;V<$;V++){var F=localStorage.key(V);if(F.indexOf(C)===0){var J=localStorage.getItem(F);if(J&&(J=S.serializer.deserialize(J)),J=g(J,F.substring(O),W++),J!==void 0)return J}}});return _(I,m),I}function ed(g,m){var y=this,I=y.ready().then(function(){var S=y._dbInfo,C;try{C=localStorage.key(g)}catch{C=null}return C&&(C=C.substring(S.keyPrefix.length)),C});return _(I,m),I}function rd(g){var m=this,y=m.ready().then(function(){for(var I=m._dbInfo,S=localStorage.length,C=[],O=0;O<S;O++){var $=localStorage.key(O);$.indexOf(I.keyPrefix)===0&&C.push($.substring(I.keyPrefix.length))}return C});return _(y,g),y}function nd(g){var m=this,y=m.keys().then(function(I){return I.length});return _(y,g),y}function id(g,m){var y=this;g=A(g);var I=y.ready().then(function(){var S=y._dbInfo;localStorage.removeItem(S.keyPrefix+g)});return _(I,m),I}function sd(g,m,y){var I=this;g=A(g);var S=I.ready().then(function(){m===void 0&&(m=null);var C=m;return new w(function(O,$){var W=I._dbInfo;W.serializer.serialize(m,function(V,F){if(F)$(F);else try{localStorage.setItem(W.keyPrefix+g,V),O(C)}catch(J){(J.name==="QuotaExceededError"||J.name==="NS_ERROR_DOM_QUOTA_REACHED")&&$(J),$(J)}})})});return _(S,y),S}function od(g,m){if(m=B.apply(this,arguments),g=typeof g!="function"&&g||{},!g.name){var y=this.config();g.name=g.name||y.name,g.storeName=g.storeName||y.storeName}var I=this,S;return g.name?S=new w(function(C){g.storeName?C(vc(g,I._defaultConfig)):C(g.name+"/")}).then(function(C){for(var O=localStorage.length-1;O>=0;O--){var $=localStorage.key(O);$.indexOf(C)===0&&localStorage.removeItem($)}}):S=w.reject("Invalid arguments"),_(S,m),S}var ad={_driver:"localStorageWrapper",_initStorage:Xp,_support:Yp(),iterate:td,getItem:Zp,setItem:sd,removeItem:id,clear:Qp,length:nd,key:ed,keys:rd,dropInstance:od},cd=function(g,m){return g===m||typeof g=="number"&&typeof m=="number"&&isNaN(g)&&isNaN(m)},ld=function(g,m){for(var y=g.length,I=0;I<y;){if(cd(g[I],m))return!0;I++}return!1},wc=Array.isArray||function(g){return Object.prototype.toString.call(g)==="[object Array]"},yn={},bc={},Mr={INDEXEDDB:u,WEBSQL:zp,LOCALSTORAGE:ad},ud=[Mr.INDEXEDDB._driver,Mr.WEBSQL._driver,Mr.LOCALSTORAGE._driver],pi=["dropInstance"],Ds=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(pi),hd={description:"",driver:ud.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function pd(g,m){g[m]=function(){var y=arguments;return g.ready().then(function(){return g[m].apply(g,y)})}}function As(){for(var g=1;g<arguments.length;g++){var m=arguments[g];if(m)for(var y in m)m.hasOwnProperty(y)&&(wc(m[y])?arguments[0][y]=m[y].slice():arguments[0][y]=m[y])}return arguments[0]}var dd=function(){function g(m){p(this,g);for(var y in Mr)if(Mr.hasOwnProperty(y)){var I=Mr[y],S=I._driver;this[y]=S,yn[S]||this.defineDriver(I)}this._defaultConfig=As({},hd),this._config=As({},this._defaultConfig,m),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(m){if((typeof m>"u"?"undefined":l(m))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var y in m){if(y==="storeName"&&(m[y]=m[y].replace(/\W/g,"_")),y==="version"&&typeof m[y]!="number")return new Error("Database version must be a number.");this._config[y]=m[y]}return"driver"in m&&m.driver?this.setDriver(this._config.driver):!0}else return typeof m=="string"?this._config[m]:this._config},g.prototype.defineDriver=function(m,y,I){var S=new w(function(C,O){try{var $=m._driver,W=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!m._driver){O(W);return}for(var V=Ds.concat("_initStorage"),F=0,J=V.length;F<J;F++){var it=V[F],vt=!ld(pi,it);if((vt||m[it])&&typeof m[it]!="function"){O(W);return}}var pt=function(){for(var It=function(gd){return function(){var md=new Error("Method "+gd+" is not implemented by the current driver"),_c=w.reject(md);return _(_c,arguments[arguments.length-1]),_c}},ce=0,Ns=pi.length;ce<Ns;ce++){var Os=pi[ce];m[Os]||(m[Os]=It(Os))}};pt();var Pt=function(It){yn[$]&&console.info("Redefining LocalForage driver: "+$),yn[$]=m,bc[$]=It,C()};"_support"in m?m._support&&typeof m._support=="function"?m._support().then(Pt,O):Pt(!!m._support):Pt(!0)}catch(It){O(It)}});return k(S,y,I),S},g.prototype.driver=function(){return this._driver||null},g.prototype.getDriver=function(m,y,I){var S=yn[m]?w.resolve(yn[m]):w.reject(new Error("Driver not found."));return k(S,y,I),S},g.prototype.getSerializer=function(m){var y=w.resolve(xs);return k(y,m),y},g.prototype.ready=function(m){var y=this,I=y._driverSet.then(function(){return y._ready===null&&(y._ready=y._initDriver()),y._ready});return k(I,m,m),I},g.prototype.setDriver=function(m,y,I){var S=this;wc(m)||(m=[m]);var C=this._getSupportedDrivers(m);function O(){S._config.driver=S.driver()}function $(F){return S._extend(F),O(),S._ready=S._initStorage(S._config),S._ready}function W(F){return function(){var J=0;function it(){for(;J<F.length;){var vt=F[J];return J++,S._dbInfo=null,S._ready=null,S.getDriver(vt).then($).catch(it)}O();var pt=new Error("No available storage method found.");return S._driverSet=w.reject(pt),S._driverSet}return it()}}var V=this._driverSet!==null?this._driverSet.catch(function(){return w.resolve()}):w.resolve();return this._driverSet=V.then(function(){var F=C[0];return S._dbInfo=null,S._ready=null,S.getDriver(F).then(function(J){S._driver=J._driver,O(),S._wrapLibraryMethodsWithReady(),S._initDriver=W(C)})}).catch(function(){O();var F=new Error("No available storage method found.");return S._driverSet=w.reject(F),S._driverSet}),k(this._driverSet,y,I),this._driverSet},g.prototype.supports=function(m){return!!bc[m]},g.prototype._extend=function(m){As(this,m)},g.prototype._getSupportedDrivers=function(m){for(var y=[],I=0,S=m.length;I<S;I++){var C=m[I];this.supports(C)&&y.push(C)}return y},g.prototype._wrapLibraryMethodsWithReady=function(){for(var m=0,y=Ds.length;m<y;m++)pd(this,Ds[m])},g.prototype.createInstance=function(m){return new g(m)},g}(),fd=new dd;o.exports=fd},{3:3}]},{},[4])(4)})}),fu=rs(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URLBuilder=void 0;var e=function(){function r(n){try{this.base=new URL(n),this.params=new URLSearchParams(this.base.search.slice(1))}catch(i){console.error("Un-parsable URL",i)}}return r.prototype.appendQueryParam=function(n,i){this.params.append(n,i?i.toString():"")},r.prototype.clearQueryParams=function(){return this.params=new URLSearchParams,this},r.prototype.deleteQueryParam=function(n){this.params.delete(n)},r.prototype.getBase=function(){return this.base},r.prototype.getPath=function(){return this.base.pathname},r.prototype.getHostname=function(){return this.base.hostname},r.prototype.getParams=function(){return this.params},r.prototype.getQueryParam=function(n){if(!this.params)return"";var i=this.params.get(n);return!i||i==="undefined"||i==="null"?void 0:i},r.prototype.getQueryString=function(){return this.params.toString()},r.prototype.setPath=function(n){return this.base.pathname=n,this},r.prototype.setQueryParam=function(n,i){return this.params.set(n,i?i.toString():""),this},r.prototype.setQueryString=function(n){if(n)return n[0]==="?"&&(n=n.slice(1)),this.params=new URLSearchParams(n),this},r.prototype.toString=function(){var n=this.params.toString();return n===""?this.base.search="":this.base.search="?"+n,this.base.toString()},r}();t.URLBuilder=e}),Pd=rs((t,e)=>{"use strict";(function(r,n){typeof t=="object"&&typeof e<"u"?e.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self,r.fetchRetry=n())})(t,function(){"use strict";var r=function(s,o){if(o=o||{},typeof s!="function")throw new i("fetch must be a function");if(typeof o!="object")throw new i("defaults must be an object");if(o.retries!==void 0&&!n(o.retries))throw new i("retries must be a positive integer");if(o.retryDelay!==void 0&&!n(o.retryDelay)&&typeof o.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(o.retryOn!==void 0&&!Array.isArray(o.retryOn)&&typeof o.retryOn!="function")throw new i("retryOn property expects an array or function");var c={retries:3,retryDelay:1e3,retryOn:[]};return o=Object.assign(c,o),function(l,p){var d=o.retries,h=o.retryDelay,b=o.retryOn;if(p&&p.retries!==void 0)if(n(p.retries))d=p.retries;else throw new i("retries must be a positive integer");if(p&&p.retryDelay!==void 0)if(n(p.retryDelay)||typeof p.retryDelay=="function")h=p.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(p&&p.retryOn)if(Array.isArray(p.retryOn)||typeof p.retryOn=="function")b=p.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(v,w){var _=function(A){var B=typeof Request<"u"&&l instanceof Request?l.clone():l;s(B,p).then(function(G){if(Array.isArray(b)&&b.indexOf(G.status)===-1)v(G);else if(typeof b=="function")try{return Promise.resolve(b(A,null,G)).then(function(j){j?k(A,null,G):v(G)}).catch(w)}catch(j){w(j)}else A<d?k(A,null,G):v(G)}).catch(function(G){if(typeof b=="function")try{Promise.resolve(b(A,G,null)).then(function(j){j?k(A,G,null):w(G)}).catch(function(j){w(j)})}catch(j){w(j)}else A<d?k(A,G,null):w(G)})};function k(A,B,G){var j=typeof h=="function"?h(A,B,G):h;setTimeout(function(){_(++A)},j)}_(0)})}};function n(s){return Number.isInteger(s)&&s>=0}function i(s){this.name="ArgumentError",this.message=s}return r})}),Rd="9.12.4",H=class co{static SDK_VERSION=Rd;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=co.SDK_VERSION.split(".").map(r=>r.padStart(2,"0")).join("");co.SDK_VERSION_CODE=parseInt(e,10)}},qe={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${H.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${H.SDK_VERSION}/dist/widget.min.js`},he=ke(sn()),T=class{static log(...t){he.default.info(...t)}static debug(...t){he.default.debug(...t)}static error(...t){he.default.error(...t)}static warn(...t){he.default.warn(...t)}static info(...t){he.default.info(...t)}static trace(...t){he.default.trace(...t)}};function Ld(t=H.LOG_PREFIX){he.default.useDefaults({formatter:function(r){r.unshift(`${t} (v${H.SDK_VERSION}):`)}});let e=gu();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?he.default.setLevel(he.default[localStorage.cooeeLogLevel]):he.default.setLevel(qe.debug?he.default.TRACE:he.default.OFF)}function gu(){return new URL(location.href).searchParams?.get("cooee-debug")}function Md(){let t=`
1
+ "use strict";(()=>{var yd=Object.create;var Ec=Object.defineProperty;var vd=Object.getOwnPropertyDescriptor;var wd=Object.getOwnPropertyNames;var bd=Object.getPrototypeOf,_d=Object.prototype.hasOwnProperty;var Ed=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of wd(e))!_d.call(t,i)&&i!==r&&Ec(t,i,{get:()=>e[i],enumerable:!(n=vd(e,i))||n.enumerable});return t};var Sd=(t,e,r)=>(r=t!=null?yd(bd(t)):{},Ed(e||!t||!t.__esModule?Ec(r,"default",{value:t,enumerable:!0}):r,t));var Id=Object.create,ta=Object.defineProperty,Cd=Object.defineProperties,Td=Object.getOwnPropertyDescriptor,xd=Object.getOwnPropertyDescriptors,Dd=Object.getOwnPropertyNames,Sc=Object.getOwnPropertySymbols,Ad=Object.getPrototypeOf,du=Object.prototype.hasOwnProperty,Nd=Object.prototype.propertyIsEnumerable,Ic=(t,e,r)=>e in t?ta(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,x=(t,e)=>{for(var r in e||={})du.call(e,r)&&Ic(t,r,e[r]);if(Sc)for(var r of Sc(e))Nd.call(e,r)&&Ic(t,r,e[r]);return t},yt=(t,e)=>Cd(t,xd(e)),di=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),rs=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Od=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Dd(e))!du.call(t,i)&&i!==r&&ta(t,i,{get:()=>e[i],enumerable:!(n=Td(e,i))||n.enumerable});return t},ke=(t,e,r)=>(r=t!=null?Id(Ad(t)):{},Od(e||!t||!t.__esModule?ta(r,"default",{value:t,enumerable:!0}):r,t)),sn=rs((t,e)=>{"use strict";(function(r){"use strict";var n={};n.VERSION="1.6.1";var i,s={},o=function(h,b){return function(){return b.apply(h,arguments)}},c=function(){var h=arguments,b=h[0],v,w;for(w=1;w<h.length;w++)for(v in h[w])!(v in b)&&h[w].hasOwnProperty(v)&&(b[v]=h[w][v]);return b},l=function(h,b){return{value:h,name:b}};n.TRACE=l(1,"TRACE"),n.DEBUG=l(2,"DEBUG"),n.INFO=l(3,"INFO"),n.TIME=l(4,"TIME"),n.WARN=l(5,"WARN"),n.ERROR=l(8,"ERROR"),n.OFF=l(99,"OFF");var p=function(h){this.context=h,this.setLevel(h.filterLevel),this.log=this.info};p.prototype={setLevel:function(h){h&&"value"in h&&(this.context.filterLevel=h)},getLevel:function(){return this.context.filterLevel},enabledFor:function(h){var b=this.context.filterLevel;return h.value>=b.value},trace:function(){this.invoke(n.TRACE,arguments)},debug:function(){this.invoke(n.DEBUG,arguments)},info:function(){this.invoke(n.INFO,arguments)},warn:function(){this.invoke(n.WARN,arguments)},error:function(){this.invoke(n.ERROR,arguments)},time:function(h){typeof h=="string"&&h.length>0&&this.invoke(n.TIME,[h,"start"])},timeEnd:function(h){typeof h=="string"&&h.length>0&&this.invoke(n.TIME,[h,"end"])},invoke:function(h,b){i&&this.enabledFor(h)&&i(b,c({level:h},this.context))}};var d=new p({filterLevel:n.OFF});(function(){var h=n;h.enabledFor=o(d,d.enabledFor),h.trace=o(d,d.trace),h.debug=o(d,d.debug),h.time=o(d,d.time),h.timeEnd=o(d,d.timeEnd),h.info=o(d,d.info),h.warn=o(d,d.warn),h.error=o(d,d.error),h.log=h.info})(),n.setHandler=function(h){i=h},n.setLevel=function(h){d.setLevel(h);for(var b in s)s.hasOwnProperty(b)&&s[b].setLevel(h)},n.getLevel=function(){return d.getLevel()},n.get=function(h){return s[h]||(s[h]=new p(c({name:h},d.context)))},n.createDefaultHandler=function(h){h=h||{},h.formatter=h.formatter||function(w,_){_.name&&w.unshift("["+_.name+"]")};var b={},v=function(w,_){Function.prototype.apply.call(w,console,_)};return typeof console>"u"?function(){}:function(w,_){w=Array.prototype.slice.call(w);var k=console.log,A;_.level===n.TIME?(A=(_.name?"["+_.name+"] ":"")+w[0],w[1]==="start"?console.time?console.time(A):b[A]=new Date().getTime():console.timeEnd?console.timeEnd(A):v(k,[A+": "+(new Date().getTime()-b[A])+"ms"])):(_.level===n.WARN&&console.warn?k=console.warn:_.level===n.ERROR&&console.error?k=console.error:_.level===n.INFO&&console.info?k=console.info:_.level===n.DEBUG&&console.debug?k=console.debug:_.level===n.TRACE&&console.trace&&(k=console.trace),h.formatter(w,_),v(k,w))}},n.useDefaults=function(h){n.setLevel(h&&h.defaultLevel||n.DEBUG),n.setHandler(n.createDefaultHandler(h))},n.setDefaults=n.useDefaults,typeof define=="function"&&define.amd?define(n):typeof e<"u"&&e.exports?e.exports=n:(n._prevLogger=r.Logger,n.noConflict=function(){return r.Logger=n._prevLogger,n},r.Logger=n)})(t)}),kd=rs((t,e)=>{"use strict";(function(r){if(typeof t=="object"&&typeof e<"u")e.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var n;typeof window<"u"?n=window:typeof global<"u"?n=global:typeof self<"u"?n=self:n=this,n.localforage=r()}})(function(){var r,n,i;return function s(o,c,l){function p(b,v){if(!c[b]){if(!o[b]){var w=typeof di=="function"&&di;if(!v&&w)return w(b,!0);if(d)return d(b,!0);var _=new Error("Cannot find module '"+b+"'");throw _.code="MODULE_NOT_FOUND",_}var k=c[b]={exports:{}};o[b][0].call(k.exports,function(A){var B=o[b][1][A];return p(B||A)},k,k.exports,s,o,c,l)}return c[b].exports}for(var d=typeof di=="function"&&di,h=0;h<l.length;h++)p(l[h]);return p}({1:[function(s,o,c){(function(l){"use strict";var p=l.MutationObserver||l.WebKitMutationObserver,d;if(p){var h=0,b=new p(A),v=l.document.createTextNode("");b.observe(v,{characterData:!0}),d=function(){v.data=h=++h%2}}else if(!l.setImmediate&&typeof l.MessageChannel<"u"){var w=new l.MessageChannel;w.port1.onmessage=A,d=function(){w.port2.postMessage(0)}}else"document"in l&&"onreadystatechange"in l.document.createElement("script")?d=function(){var G=l.document.createElement("script");G.onreadystatechange=function(){A(),G.onreadystatechange=null,G.parentNode.removeChild(G),G=null},l.document.documentElement.appendChild(G)}:d=function(){setTimeout(A,0)};var _,k=[];function A(){_=!0;for(var G,j,X=k.length;X;){for(j=k,k=[],G=-1;++G<X;)j[G]();X=k.length}_=!1}o.exports=B;function B(G){k.push(G)===1&&!_&&d()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(s,o,c){"use strict";var l=s(1);function p(){}var d={},h=["REJECTED"],b=["FULFILLED"],v=["PENDING"];o.exports=w;function w(q){if(typeof q!="function")throw new TypeError("resolver must be a function");this.state=v,this.queue=[],this.outcome=void 0,q!==p&&B(this,q)}w.prototype.catch=function(q){return this.then(null,q)},w.prototype.then=function(q,rt){if(typeof q!="function"&&this.state===b||typeof rt!="function"&&this.state===h)return this;var Q=new this.constructor(p);if(this.state!==v){var tt=this.state===b?q:rt;k(Q,tt,this.outcome)}else this.queue.push(new _(Q,q,rt));return Q};function _(q,rt,Q){this.promise=q,typeof rt=="function"&&(this.onFulfilled=rt,this.callFulfilled=this.otherCallFulfilled),typeof Q=="function"&&(this.onRejected=Q,this.callRejected=this.otherCallRejected)}_.prototype.callFulfilled=function(q){d.resolve(this.promise,q)},_.prototype.otherCallFulfilled=function(q){k(this.promise,this.onFulfilled,q)},_.prototype.callRejected=function(q){d.reject(this.promise,q)},_.prototype.otherCallRejected=function(q){k(this.promise,this.onRejected,q)};function k(q,rt,Q){l(function(){var tt;try{tt=rt(Q)}catch(lt){return d.reject(q,lt)}tt===q?d.reject(q,new TypeError("Cannot resolve promise with itself")):d.resolve(q,tt)})}d.resolve=function(q,rt){var Q=G(A,rt);if(Q.status==="error")return d.reject(q,Q.value);var tt=Q.value;if(tt)B(q,tt);else{q.state=b,q.outcome=rt;for(var lt=-1,kt=q.queue.length;++lt<kt;)q.queue[lt].callFulfilled(rt)}return q},d.reject=function(q,rt){q.state=h,q.outcome=rt;for(var Q=-1,tt=q.queue.length;++Q<tt;)q.queue[Q].callRejected(rt);return q};function A(q){var rt=q&&q.then;if(q&&(typeof q=="object"||typeof q=="function")&&typeof rt=="function")return function(){rt.apply(q,arguments)}}function B(q,rt){var Q=!1;function tt(jt){Q||(Q=!0,d.reject(q,jt))}function lt(jt){Q||(Q=!0,d.resolve(q,jt))}function kt(){rt(lt,tt)}var At=G(kt);At.status==="error"&&tt(At.value)}function G(q,rt){var Q={};try{Q.value=q(rt),Q.status="success"}catch(tt){Q.status="error",Q.value=tt}return Q}w.resolve=j;function j(q){return q instanceof this?q:d.resolve(new this(p),q)}w.reject=X;function X(q){var rt=new this(p);return d.reject(rt,q)}w.all=_t;function _t(q){var rt=this;if(Object.prototype.toString.call(q)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Q=q.length,tt=!1;if(!Q)return this.resolve([]);for(var lt=new Array(Q),kt=0,At=-1,jt=new this(p);++At<Q;)Wt(q[At],At);return jt;function Wt(ft,Gt){rt.resolve(ft).then(st,function(et){tt||(tt=!0,d.reject(jt,et))});function st(et){lt[Gt]=et,++kt===Q&&!tt&&(tt=!0,d.resolve(jt,lt))}}}w.race=Dt;function Dt(q){var rt=this;if(Object.prototype.toString.call(q)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Q=q.length,tt=!1;if(!Q)return this.resolve([]);for(var lt=-1,kt=new this(p);++lt<Q;)At(q[lt]);return kt;function At(jt){rt.resolve(jt).then(function(Wt){tt||(tt=!0,d.resolve(kt,Wt))},function(Wt){tt||(tt=!0,d.reject(kt,Wt))})}}},{1:1}],3:[function(s,o,c){(function(l){"use strict";typeof l.Promise!="function"&&(l.Promise=s(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(s,o,c){"use strict";var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g};function p(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function d(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var h=d();function b(){try{if(!h||!h.open)return!1;var g=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),m=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!g||m)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function v(g,m){g=g||[],m=m||{};try{return new Blob(g,m)}catch(C){if(C.name!=="TypeError")throw C;for(var y=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,I=new y,S=0;S<g.length;S+=1)I.append(g[S]);return I.getBlob(m.type)}}typeof Promise>"u"&&s(3);var w=Promise;function _(g,m){m&&g.then(function(y){m(null,y)},function(y){m(y)})}function k(g,m,y){typeof m=="function"&&g.then(m),typeof y=="function"&&g.catch(y)}function A(g){return typeof g!="string"&&(console.warn(g+" used as a key, but it is not a string."),g=String(g)),g}function B(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var G="local-forage-detect-blob-support",j=void 0,X={},_t=Object.prototype.toString,Dt="readonly",q="readwrite";function rt(g){for(var m=g.length,y=new ArrayBuffer(m),I=new Uint8Array(y),S=0;S<m;S++)I[S]=g.charCodeAt(S);return y}function Q(g){return new w(function(m){var y=g.transaction(G,q),I=v([""]);y.objectStore(G).put(I,"key"),y.onabort=function(S){S.preventDefault(),S.stopPropagation(),m(!1)},y.oncomplete=function(){var S=navigator.userAgent.match(/Chrome\/(\d+)/),C=navigator.userAgent.match(/Edge\//);m(C||!S||parseInt(S[1],10)>=43)}}).catch(function(){return!1})}function tt(g){return typeof j=="boolean"?w.resolve(j):Q(g).then(function(m){return j=m,j})}function lt(g){var m=X[g.name],y={};y.promise=new w(function(I,S){y.resolve=I,y.reject=S}),m.deferredOperations.push(y),m.dbReady?m.dbReady=m.dbReady.then(function(){return y.promise}):m.dbReady=y.promise}function kt(g){var m=X[g.name],y=m.deferredOperations.pop();if(y)return y.resolve(),y.promise}function At(g,m){var y=X[g.name],I=y.deferredOperations.pop();if(I)return I.reject(m),I.promise}function jt(g,m){return new w(function(y,I){if(X[g.name]=X[g.name]||ui(),g.db)if(m)lt(g),g.db.close();else return y(g.db);var S=[g.name];m&&S.push(g.version);var C=h.open.apply(h,S);m&&(C.onupgradeneeded=function(O){var $=C.result;try{$.createObjectStore(g.storeName),O.oldVersion<=1&&$.createObjectStore(G)}catch(W){if(W.name==="ConstraintError")console.warn('The database "'+g.name+'" has been upgraded from version '+O.oldVersion+" to version "+O.newVersion+', but the storage "'+g.storeName+'" already exists.');else throw W}}),C.onerror=function(O){O.preventDefault(),I(C.error)},C.onsuccess=function(){var O=C.result;O.onversionchange=function($){$.target.close()},y(O),kt(g)}})}function Wt(g){return jt(g,!1)}function ft(g){return jt(g,!0)}function Gt(g,m){if(!g.db)return!0;var y=!g.db.objectStoreNames.contains(g.storeName),I=g.version<g.db.version,S=g.version>g.db.version;if(I&&(g.version!==m&&console.warn('The database "'+g.name+`" can't be downgraded from version `+g.db.version+" to version "+g.version+"."),g.version=g.db.version),S||y){if(y){var C=g.db.version+1;C>g.version&&(g.version=C)}return!0}return!1}function st(g){return new w(function(m,y){var I=new FileReader;I.onerror=y,I.onloadend=function(S){var C=btoa(S.target.result||"");m({__local_forage_encoded_blob:!0,data:C,type:g.type})},I.readAsBinaryString(g)})}function et(g){var m=rt(atob(g.data));return v([m],{type:g.type})}function $t(g){return g&&g.__local_forage_encoded_blob}function ci(g){var m=this,y=m._initReady().then(function(){var I=X[m._dbInfo.name];if(I&&I.dbReady)return I.dbReady});return k(y,g,g),y}function li(g){lt(g);for(var m=X[g.name],y=m.forages,I=0;I<y.length;I++){var S=y[I];S._dbInfo.db&&(S._dbInfo.db.close(),S._dbInfo.db=null)}return g.db=null,Wt(g).then(function(C){return g.db=C,Gt(g)?ft(g):C}).then(function(C){g.db=m.db=C;for(var O=0;O<y.length;O++)y[O]._dbInfo.db=C}).catch(function(C){throw At(g,C),C})}function oe(g,m,y,I){I===void 0&&(I=1);try{var S=g.db.transaction(g.storeName,m);y(null,S)}catch(C){if(I>0&&(!g.db||C.name==="InvalidStateError"||C.name==="NotFoundError"))return w.resolve().then(function(){if(!g.db||C.name==="NotFoundError"&&!g.db.objectStoreNames.contains(g.storeName)&&g.version<=g.db.version)return g.db&&(g.version=g.db.version+1),ft(g)}).then(function(){return li(g).then(function(){oe(g,m,y,I-1)})}).catch(y);y(C)}}function ui(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Es(g){var m=this,y={db:null};if(g)for(var I in g)y[I]=g[I];var S=X[y.name];S||(S=ui(),X[y.name]=S),S.forages.push(m),m._initReady||(m._initReady=m.ready,m.ready=ci);var C=[];function O(){return w.resolve()}for(var $=0;$<S.forages.length;$++){var W=S.forages[$];W!==m&&C.push(W._initReady().catch(O))}var V=S.forages.slice(0);return w.all(C).then(function(){return y.db=S.db,Wt(y)}).then(function(F){return y.db=F,Gt(y,m._defaultConfig.version)?ft(y):F}).then(function(F){y.db=S.db=F,m._dbInfo=y;for(var J=0;J<V.length;J++){var it=V[J];it!==m&&(it._dbInfo.db=y.db,it._dbInfo.version=y.version)}})}function dn(g,m){var y=this;g=A(g);var I=new w(function(S,C){y.ready().then(function(){oe(y._dbInfo,Dt,function(O,$){if(O)return C(O);try{var W=$.objectStore(y._dbInfo.storeName),V=W.get(g);V.onsuccess=function(){var F=V.result;F===void 0&&(F=null),$t(F)&&(F=et(F)),S(F)},V.onerror=function(){C(V.error)}}catch(F){C(F)}})}).catch(C)});return _(I,m),I}function Ss(g,m){var y=this,I=new w(function(S,C){y.ready().then(function(){oe(y._dbInfo,Dt,function(O,$){if(O)return C(O);try{var W=$.objectStore(y._dbInfo.storeName),V=W.openCursor(),F=1;V.onsuccess=function(){var J=V.result;if(J){var it=J.value;$t(it)&&(it=et(it));var vt=g(it,J.key,F++);vt!==void 0?S(vt):J.continue()}else S()},V.onerror=function(){C(V.error)}}catch(J){C(J)}})}).catch(C)});return _(I,m),I}function Is(g,m,y){var I=this;g=A(g);var S=new w(function(C,O){var $;I.ready().then(function(){return $=I._dbInfo,_t.call(m)==="[object Blob]"?tt($.db).then(function(W){return W?m:st(m)}):m}).then(function(W){oe(I._dbInfo,q,function(V,F){if(V)return O(V);try{var J=F.objectStore(I._dbInfo.storeName);W===null&&(W=void 0);var it=J.put(W,g);F.oncomplete=function(){W===void 0&&(W=null),C(W)},F.onabort=F.onerror=function(){var vt=it.error?it.error:it.transaction.error;O(vt)}}catch(vt){O(vt)}})}).catch(O)});return _(S,y),S}function hi(g,m){var y=this;g=A(g);var I=new w(function(S,C){y.ready().then(function(){oe(y._dbInfo,q,function(O,$){if(O)return C(O);try{var W=$.objectStore(y._dbInfo.storeName),V=W.delete(g);$.oncomplete=function(){S()},$.onerror=function(){C(V.error)},$.onabort=function(){var F=V.error?V.error:V.transaction.error;C(F)}}catch(F){C(F)}})}).catch(C)});return _(I,m),I}function Lr(g){var m=this,y=new w(function(I,S){m.ready().then(function(){oe(m._dbInfo,q,function(C,O){if(C)return S(C);try{var $=O.objectStore(m._dbInfo.storeName),W=$.clear();O.oncomplete=function(){I()},O.onabort=O.onerror=function(){var V=W.error?W.error:W.transaction.error;S(V)}}catch(V){S(V)}})}).catch(S)});return _(y,g),y}function ae(g){var m=this,y=new w(function(I,S){m.ready().then(function(){oe(m._dbInfo,Dt,function(C,O){if(C)return S(C);try{var $=O.objectStore(m._dbInfo.storeName),W=$.count();W.onsuccess=function(){I(W.result)},W.onerror=function(){S(W.error)}}catch(V){S(V)}})}).catch(S)});return _(y,g),y}function fn(g,m){var y=this,I=new w(function(S,C){if(g<0){S(null);return}y.ready().then(function(){oe(y._dbInfo,Dt,function(O,$){if(O)return C(O);try{var W=$.objectStore(y._dbInfo.storeName),V=!1,F=W.openKeyCursor();F.onsuccess=function(){var J=F.result;if(!J){S(null);return}g===0||V?S(J.key):(V=!0,J.advance(g))},F.onerror=function(){C(F.error)}}catch(J){C(J)}})}).catch(C)});return _(I,m),I}function Cs(g){var m=this,y=new w(function(I,S){m.ready().then(function(){oe(m._dbInfo,Dt,function(C,O){if(C)return S(C);try{var $=O.objectStore(m._dbInfo.storeName),W=$.openKeyCursor(),V=[];W.onsuccess=function(){var F=W.result;if(!F){I(V);return}V.push(F.key),F.continue()},W.onerror=function(){S(W.error)}}catch(F){S(F)}})}).catch(S)});return _(y,g),y}function a(g,m){m=B.apply(this,arguments);var y=this.config();g=typeof g!="function"&&g||{},g.name||(g.name=g.name||y.name,g.storeName=g.storeName||y.storeName);var I=this,S;if(!g.name)S=w.reject("Invalid arguments");else{var C=g.name===y.name&&I._dbInfo.db,O=C?w.resolve(I._dbInfo.db):Wt(g).then(function($){var W=X[g.name],V=W.forages;W.db=$;for(var F=0;F<V.length;F++)V[F]._dbInfo.db=$;return $});g.storeName?S=O.then(function($){if($.objectStoreNames.contains(g.storeName)){var W=$.version+1;lt(g);var V=X[g.name],F=V.forages;$.close();for(var J=0;J<F.length;J++){var it=F[J];it._dbInfo.db=null,it._dbInfo.version=W}var vt=new w(function(pt,Pt){var It=h.open(g.name,W);It.onerror=function(ce){var Ns=It.result;Ns.close(),Pt(ce)},It.onupgradeneeded=function(){var ce=It.result;ce.deleteObjectStore(g.storeName)},It.onsuccess=function(){var ce=It.result;ce.close(),pt(ce)}});return vt.then(function(pt){V.db=pt;for(var Pt=0;Pt<F.length;Pt++){var It=F[Pt];It._dbInfo.db=pt,kt(It._dbInfo)}}).catch(function(pt){throw(At(g,pt)||w.resolve()).catch(function(){}),pt})}}):S=O.then(function($){lt(g);var W=X[g.name],V=W.forages;$.close();for(var F=0;F<V.length;F++){var J=V[F];J._dbInfo.db=null}var it=new w(function(vt,pt){var Pt=h.deleteDatabase(g.name);Pt.onerror=function(){var It=Pt.result;It&&It.close(),pt(Pt.error)},Pt.onblocked=function(){console.warn('dropInstance blocked for database "'+g.name+'" until all open connections are closed')},Pt.onsuccess=function(){var It=Pt.result;It&&It.close(),vt(It)}});return it.then(function(vt){W.db=vt;for(var pt=0;pt<V.length;pt++){var Pt=V[pt];kt(Pt._dbInfo)}}).catch(function(vt){throw(At(g,vt)||w.resolve()).catch(function(){}),vt})})}return _(S,m),S}var u={_driver:"asyncStorage",_initStorage:Es,_support:b(),iterate:Ss,getItem:dn,setItem:Is,removeItem:hi,clear:Lr,length:ae,key:fn,keys:Cs,dropInstance:a};function f(){return typeof openDatabase=="function"}var E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D="~~local_forage_type~",M=/^~~local_forage_type~([^~]+)~/,Y="__lfsc__:",ut=Y.length,Nt="arbf",gt="blob",St="si08",Ut="ui08",hr="uic8",gn="si16",mn="si32",lc="ur16",uc="ui32",hc="fl32",pc="fl64",dc=ut+Nt.length,fc=Object.prototype.toString;function gc(g){var m=g.length*.75,y=g.length,I,S=0,C,O,$,W;g[g.length-1]==="="&&(m--,g[g.length-2]==="="&&m--);var V=new ArrayBuffer(m),F=new Uint8Array(V);for(I=0;I<y;I+=4)C=E.indexOf(g[I]),O=E.indexOf(g[I+1]),$=E.indexOf(g[I+2]),W=E.indexOf(g[I+3]),F[S++]=C<<2|O>>4,F[S++]=(O&15)<<4|$>>2,F[S++]=($&3)<<6|W&63;return V}function Ts(g){var m=new Uint8Array(g),y="",I;for(I=0;I<m.length;I+=3)y+=E[m[I]>>2],y+=E[(m[I]&3)<<4|m[I+1]>>4],y+=E[(m[I+1]&15)<<2|m[I+2]>>6],y+=E[m[I+2]&63];return m.length%3===2?y=y.substring(0,y.length-1)+"=":m.length%3===1&&(y=y.substring(0,y.length-2)+"=="),y}function Rp(g,m){var y="";if(g&&(y=fc.call(g)),g&&(y==="[object ArrayBuffer]"||g.buffer&&fc.call(g.buffer)==="[object ArrayBuffer]")){var I,S=Y;g instanceof ArrayBuffer?(I=g,S+=Nt):(I=g.buffer,y==="[object Int8Array]"?S+=St:y==="[object Uint8Array]"?S+=Ut:y==="[object Uint8ClampedArray]"?S+=hr:y==="[object Int16Array]"?S+=gn:y==="[object Uint16Array]"?S+=lc:y==="[object Int32Array]"?S+=mn:y==="[object Uint32Array]"?S+=uc:y==="[object Float32Array]"?S+=hc:y==="[object Float64Array]"?S+=pc:m(new Error("Failed to get type for BinaryArray"))),m(S+Ts(I))}else if(y==="[object Blob]"){var C=new FileReader;C.onload=function(){var O=D+g.type+"~"+Ts(this.result);m(Y+gt+O)},C.readAsArrayBuffer(g)}else try{m(JSON.stringify(g))}catch(O){console.error("Couldn't convert value into a JSON string: ",g),m(null,O)}}function Lp(g){if(g.substring(0,ut)!==Y)return JSON.parse(g);var m=g.substring(dc),y=g.substring(ut,dc),I;if(y===gt&&M.test(m)){var S=m.match(M);I=S[1],m=m.substring(S[0].length)}var C=gc(m);switch(y){case Nt:return C;case gt:return v([C],{type:I});case St:return new Int8Array(C);case Ut:return new Uint8Array(C);case hr:return new Uint8ClampedArray(C);case gn:return new Int16Array(C);case lc:return new Uint16Array(C);case mn:return new Int32Array(C);case uc:return new Uint32Array(C);case hc:return new Float32Array(C);case pc:return new Float64Array(C);default:throw new Error("Unkown type: "+y)}}var xs={serialize:Rp,deserialize:Lp,stringToBuffer:gc,bufferToString:Ts};function mc(g,m,y,I){g.executeSql("CREATE TABLE IF NOT EXISTS "+m.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],y,I)}function Mp(g){var m=this,y={db:null};if(g)for(var I in g)y[I]=typeof g[I]!="string"?g[I].toString():g[I];var S=new w(function(C,O){try{y.db=openDatabase(y.name,String(y.version),y.description,y.size)}catch($){return O($)}y.db.transaction(function($){mc($,y,function(){m._dbInfo=y,C()},function(W,V){O(V)})},O)});return y.serializer=xs,S}function Je(g,m,y,I,S,C){g.executeSql(y,I,S,function(O,$){$.code===$.SYNTAX_ERR?O.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[m.storeName],function(W,V){V.rows.length?C(W,$):mc(W,m,function(){W.executeSql(y,I,S,C)},C)},C):C(O,$)},C)}function Up(g,m){var y=this;g=A(g);var I=new w(function(S,C){y.ready().then(function(){var O=y._dbInfo;O.db.transaction(function($){Je($,O,"SELECT * FROM "+O.storeName+" WHERE key = ? LIMIT 1",[g],function(W,V){var F=V.rows.length?V.rows.item(0).value:null;F&&(F=O.serializer.deserialize(F)),S(F)},function(W,V){C(V)})})}).catch(C)});return _(I,m),I}function Bp(g,m){var y=this,I=new w(function(S,C){y.ready().then(function(){var O=y._dbInfo;O.db.transaction(function($){Je($,O,"SELECT * FROM "+O.storeName,[],function(W,V){for(var F=V.rows,J=F.length,it=0;it<J;it++){var vt=F.item(it),pt=vt.value;if(pt&&(pt=O.serializer.deserialize(pt)),pt=g(pt,vt.key,it+1),pt!==void 0){S(pt);return}}S()},function(W,V){C(V)})})}).catch(C)});return _(I,m),I}function yc(g,m,y,I){var S=this;g=A(g);var C=new w(function(O,$){S.ready().then(function(){m===void 0&&(m=null);var W=m,V=S._dbInfo;V.serializer.serialize(m,function(F,J){J?$(J):V.db.transaction(function(it){Je(it,V,"INSERT OR REPLACE INTO "+V.storeName+" (key, value) VALUES (?, ?)",[g,F],function(){O(W)},function(vt,pt){$(pt)})},function(it){if(it.code===it.QUOTA_ERR){if(I>0){O(yc.apply(S,[g,W,y,I-1]));return}$(it)}})})}).catch($)});return _(C,y),C}function jp(g,m,y){return yc.apply(this,[g,m,y,1])}function $p(g,m){var y=this;g=A(g);var I=new w(function(S,C){y.ready().then(function(){var O=y._dbInfo;O.db.transaction(function($){Je($,O,"DELETE FROM "+O.storeName+" WHERE key = ?",[g],function(){S()},function(W,V){C(V)})})}).catch(C)});return _(I,m),I}function Fp(g){var m=this,y=new w(function(I,S){m.ready().then(function(){var C=m._dbInfo;C.db.transaction(function(O){Je(O,C,"DELETE FROM "+C.storeName,[],function(){I()},function($,W){S(W)})})}).catch(S)});return _(y,g),y}function Hp(g){var m=this,y=new w(function(I,S){m.ready().then(function(){var C=m._dbInfo;C.db.transaction(function(O){Je(O,C,"SELECT COUNT(key) as c FROM "+C.storeName,[],function($,W){var V=W.rows.item(0).c;I(V)},function($,W){S(W)})})}).catch(S)});return _(y,g),y}function Vp(g,m){var y=this,I=new w(function(S,C){y.ready().then(function(){var O=y._dbInfo;O.db.transaction(function($){Je($,O,"SELECT key FROM "+O.storeName+" WHERE id = ? LIMIT 1",[g+1],function(W,V){var F=V.rows.length?V.rows.item(0).key:null;S(F)},function(W,V){C(V)})})}).catch(C)});return _(I,m),I}function qp(g){var m=this,y=new w(function(I,S){m.ready().then(function(){var C=m._dbInfo;C.db.transaction(function(O){Je(O,C,"SELECT key FROM "+C.storeName,[],function($,W){for(var V=[],F=0;F<W.rows.length;F++)V.push(W.rows.item(F).key);I(V)},function($,W){S(W)})})}).catch(S)});return _(y,g),y}function Wp(g){return new w(function(m,y){g.transaction(function(I){I.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(S,C){for(var O=[],$=0;$<C.rows.length;$++)O.push(C.rows.item($).name);m({db:g,storeNames:O})},function(S,C){y(C)})},function(I){y(I)})})}function Gp(g,m){m=B.apply(this,arguments);var y=this.config();g=typeof g!="function"&&g||{},g.name||(g.name=g.name||y.name,g.storeName=g.storeName||y.storeName);var I=this,S;return g.name?S=new w(function(C){var O;g.name===y.name?O=I._dbInfo.db:O=openDatabase(g.name,"","",0),g.storeName?C({db:O,storeNames:[g.storeName]}):C(Wp(O))}).then(function(C){return new w(function(O,$){C.db.transaction(function(W){function V(vt){return new w(function(pt,Pt){W.executeSql("DROP TABLE IF EXISTS "+vt,[],function(){pt()},function(It,ce){Pt(ce)})})}for(var F=[],J=0,it=C.storeNames.length;J<it;J++)F.push(V(C.storeNames[J]));w.all(F).then(function(){O()}).catch(function(vt){$(vt)})},function(W){$(W)})})}):S=w.reject("Invalid arguments"),_(S,m),S}var zp={_driver:"webSQLStorage",_initStorage:Mp,_support:f(),iterate:Bp,getItem:Up,setItem:jp,removeItem:$p,clear:Fp,length:Hp,key:Vp,keys:qp,dropInstance:Gp};function Yp(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function vc(g,m){var y=g.name+"/";return g.storeName!==m.storeName&&(y+=g.storeName+"/"),y}function Kp(){var g="_localforage_support_test";try{return localStorage.setItem(g,!0),localStorage.removeItem(g),!1}catch{return!0}}function Jp(){return!Kp()||localStorage.length>0}function Xp(g){var m=this,y={};if(g)for(var I in g)y[I]=g[I];return y.keyPrefix=vc(g,m._defaultConfig),Jp()?(m._dbInfo=y,y.serializer=xs,w.resolve()):w.reject()}function Qp(g){var m=this,y=m.ready().then(function(){for(var I=m._dbInfo.keyPrefix,S=localStorage.length-1;S>=0;S--){var C=localStorage.key(S);C.indexOf(I)===0&&localStorage.removeItem(C)}});return _(y,g),y}function Zp(g,m){var y=this;g=A(g);var I=y.ready().then(function(){var S=y._dbInfo,C=localStorage.getItem(S.keyPrefix+g);return C&&(C=S.serializer.deserialize(C)),C});return _(I,m),I}function td(g,m){var y=this,I=y.ready().then(function(){for(var S=y._dbInfo,C=S.keyPrefix,O=C.length,$=localStorage.length,W=1,V=0;V<$;V++){var F=localStorage.key(V);if(F.indexOf(C)===0){var J=localStorage.getItem(F);if(J&&(J=S.serializer.deserialize(J)),J=g(J,F.substring(O),W++),J!==void 0)return J}}});return _(I,m),I}function ed(g,m){var y=this,I=y.ready().then(function(){var S=y._dbInfo,C;try{C=localStorage.key(g)}catch{C=null}return C&&(C=C.substring(S.keyPrefix.length)),C});return _(I,m),I}function rd(g){var m=this,y=m.ready().then(function(){for(var I=m._dbInfo,S=localStorage.length,C=[],O=0;O<S;O++){var $=localStorage.key(O);$.indexOf(I.keyPrefix)===0&&C.push($.substring(I.keyPrefix.length))}return C});return _(y,g),y}function nd(g){var m=this,y=m.keys().then(function(I){return I.length});return _(y,g),y}function id(g,m){var y=this;g=A(g);var I=y.ready().then(function(){var S=y._dbInfo;localStorage.removeItem(S.keyPrefix+g)});return _(I,m),I}function sd(g,m,y){var I=this;g=A(g);var S=I.ready().then(function(){m===void 0&&(m=null);var C=m;return new w(function(O,$){var W=I._dbInfo;W.serializer.serialize(m,function(V,F){if(F)$(F);else try{localStorage.setItem(W.keyPrefix+g,V),O(C)}catch(J){(J.name==="QuotaExceededError"||J.name==="NS_ERROR_DOM_QUOTA_REACHED")&&$(J),$(J)}})})});return _(S,y),S}function od(g,m){if(m=B.apply(this,arguments),g=typeof g!="function"&&g||{},!g.name){var y=this.config();g.name=g.name||y.name,g.storeName=g.storeName||y.storeName}var I=this,S;return g.name?S=new w(function(C){g.storeName?C(vc(g,I._defaultConfig)):C(g.name+"/")}).then(function(C){for(var O=localStorage.length-1;O>=0;O--){var $=localStorage.key(O);$.indexOf(C)===0&&localStorage.removeItem($)}}):S=w.reject("Invalid arguments"),_(S,m),S}var ad={_driver:"localStorageWrapper",_initStorage:Xp,_support:Yp(),iterate:td,getItem:Zp,setItem:sd,removeItem:id,clear:Qp,length:nd,key:ed,keys:rd,dropInstance:od},cd=function(g,m){return g===m||typeof g=="number"&&typeof m=="number"&&isNaN(g)&&isNaN(m)},ld=function(g,m){for(var y=g.length,I=0;I<y;){if(cd(g[I],m))return!0;I++}return!1},wc=Array.isArray||function(g){return Object.prototype.toString.call(g)==="[object Array]"},yn={},bc={},Mr={INDEXEDDB:u,WEBSQL:zp,LOCALSTORAGE:ad},ud=[Mr.INDEXEDDB._driver,Mr.WEBSQL._driver,Mr.LOCALSTORAGE._driver],pi=["dropInstance"],Ds=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(pi),hd={description:"",driver:ud.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function pd(g,m){g[m]=function(){var y=arguments;return g.ready().then(function(){return g[m].apply(g,y)})}}function As(){for(var g=1;g<arguments.length;g++){var m=arguments[g];if(m)for(var y in m)m.hasOwnProperty(y)&&(wc(m[y])?arguments[0][y]=m[y].slice():arguments[0][y]=m[y])}return arguments[0]}var dd=function(){function g(m){p(this,g);for(var y in Mr)if(Mr.hasOwnProperty(y)){var I=Mr[y],S=I._driver;this[y]=S,yn[S]||this.defineDriver(I)}this._defaultConfig=As({},hd),this._config=As({},this._defaultConfig,m),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(m){if((typeof m>"u"?"undefined":l(m))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var y in m){if(y==="storeName"&&(m[y]=m[y].replace(/\W/g,"_")),y==="version"&&typeof m[y]!="number")return new Error("Database version must be a number.");this._config[y]=m[y]}return"driver"in m&&m.driver?this.setDriver(this._config.driver):!0}else return typeof m=="string"?this._config[m]:this._config},g.prototype.defineDriver=function(m,y,I){var S=new w(function(C,O){try{var $=m._driver,W=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!m._driver){O(W);return}for(var V=Ds.concat("_initStorage"),F=0,J=V.length;F<J;F++){var it=V[F],vt=!ld(pi,it);if((vt||m[it])&&typeof m[it]!="function"){O(W);return}}var pt=function(){for(var It=function(gd){return function(){var md=new Error("Method "+gd+" is not implemented by the current driver"),_c=w.reject(md);return _(_c,arguments[arguments.length-1]),_c}},ce=0,Ns=pi.length;ce<Ns;ce++){var Os=pi[ce];m[Os]||(m[Os]=It(Os))}};pt();var Pt=function(It){yn[$]&&console.info("Redefining LocalForage driver: "+$),yn[$]=m,bc[$]=It,C()};"_support"in m?m._support&&typeof m._support=="function"?m._support().then(Pt,O):Pt(!!m._support):Pt(!0)}catch(It){O(It)}});return k(S,y,I),S},g.prototype.driver=function(){return this._driver||null},g.prototype.getDriver=function(m,y,I){var S=yn[m]?w.resolve(yn[m]):w.reject(new Error("Driver not found."));return k(S,y,I),S},g.prototype.getSerializer=function(m){var y=w.resolve(xs);return k(y,m),y},g.prototype.ready=function(m){var y=this,I=y._driverSet.then(function(){return y._ready===null&&(y._ready=y._initDriver()),y._ready});return k(I,m,m),I},g.prototype.setDriver=function(m,y,I){var S=this;wc(m)||(m=[m]);var C=this._getSupportedDrivers(m);function O(){S._config.driver=S.driver()}function $(F){return S._extend(F),O(),S._ready=S._initStorage(S._config),S._ready}function W(F){return function(){var J=0;function it(){for(;J<F.length;){var vt=F[J];return J++,S._dbInfo=null,S._ready=null,S.getDriver(vt).then($).catch(it)}O();var pt=new Error("No available storage method found.");return S._driverSet=w.reject(pt),S._driverSet}return it()}}var V=this._driverSet!==null?this._driverSet.catch(function(){return w.resolve()}):w.resolve();return this._driverSet=V.then(function(){var F=C[0];return S._dbInfo=null,S._ready=null,S.getDriver(F).then(function(J){S._driver=J._driver,O(),S._wrapLibraryMethodsWithReady(),S._initDriver=W(C)})}).catch(function(){O();var F=new Error("No available storage method found.");return S._driverSet=w.reject(F),S._driverSet}),k(this._driverSet,y,I),this._driverSet},g.prototype.supports=function(m){return!!bc[m]},g.prototype._extend=function(m){As(this,m)},g.prototype._getSupportedDrivers=function(m){for(var y=[],I=0,S=m.length;I<S;I++){var C=m[I];this.supports(C)&&y.push(C)}return y},g.prototype._wrapLibraryMethodsWithReady=function(){for(var m=0,y=Ds.length;m<y;m++)pd(this,Ds[m])},g.prototype.createInstance=function(m){return new g(m)},g}(),fd=new dd;o.exports=fd},{3:3}]},{},[4])(4)})}),fu=rs(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URLBuilder=void 0;var e=function(){function r(n){try{this.base=new URL(n),this.params=new URLSearchParams(this.base.search.slice(1))}catch(i){console.error("Un-parsable URL",i)}}return r.prototype.appendQueryParam=function(n,i){this.params.append(n,i?i.toString():"")},r.prototype.clearQueryParams=function(){return this.params=new URLSearchParams,this},r.prototype.deleteQueryParam=function(n){this.params.delete(n)},r.prototype.getBase=function(){return this.base},r.prototype.getPath=function(){return this.base.pathname},r.prototype.getHostname=function(){return this.base.hostname},r.prototype.getParams=function(){return this.params},r.prototype.getQueryParam=function(n){if(!this.params)return"";var i=this.params.get(n);return!i||i==="undefined"||i==="null"?void 0:i},r.prototype.getQueryString=function(){return this.params.toString()},r.prototype.setPath=function(n){return this.base.pathname=n,this},r.prototype.setQueryParam=function(n,i){return this.params.set(n,i?i.toString():""),this},r.prototype.setQueryString=function(n){if(n)return n[0]==="?"&&(n=n.slice(1)),this.params=new URLSearchParams(n),this},r.prototype.toString=function(){var n=this.params.toString();return n===""?this.base.search="":this.base.search="?"+n,this.base.toString()},r}();t.URLBuilder=e}),Pd=rs((t,e)=>{"use strict";(function(r,n){typeof t=="object"&&typeof e<"u"?e.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self,r.fetchRetry=n())})(t,function(){"use strict";var r=function(s,o){if(o=o||{},typeof s!="function")throw new i("fetch must be a function");if(typeof o!="object")throw new i("defaults must be an object");if(o.retries!==void 0&&!n(o.retries))throw new i("retries must be a positive integer");if(o.retryDelay!==void 0&&!n(o.retryDelay)&&typeof o.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(o.retryOn!==void 0&&!Array.isArray(o.retryOn)&&typeof o.retryOn!="function")throw new i("retryOn property expects an array or function");var c={retries:3,retryDelay:1e3,retryOn:[]};return o=Object.assign(c,o),function(l,p){var d=o.retries,h=o.retryDelay,b=o.retryOn;if(p&&p.retries!==void 0)if(n(p.retries))d=p.retries;else throw new i("retries must be a positive integer");if(p&&p.retryDelay!==void 0)if(n(p.retryDelay)||typeof p.retryDelay=="function")h=p.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(p&&p.retryOn)if(Array.isArray(p.retryOn)||typeof p.retryOn=="function")b=p.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(v,w){var _=function(A){var B=typeof Request<"u"&&l instanceof Request?l.clone():l;s(B,p).then(function(G){if(Array.isArray(b)&&b.indexOf(G.status)===-1)v(G);else if(typeof b=="function")try{return Promise.resolve(b(A,null,G)).then(function(j){j?k(A,null,G):v(G)}).catch(w)}catch(j){w(j)}else A<d?k(A,null,G):v(G)}).catch(function(G){if(typeof b=="function")try{Promise.resolve(b(A,G,null)).then(function(j){j?k(A,G,null):w(G)}).catch(function(j){w(j)})}catch(j){w(j)}else A<d?k(A,G,null):w(G)})};function k(A,B,G){var j=typeof h=="function"?h(A,B,G):h;setTimeout(function(){_(++A)},j)}_(0)})}};function n(s){return Number.isInteger(s)&&s>=0}function i(s){this.name="ArgumentError",this.message=s}return r})}),Rd="9.12.5",H=class co{static SDK_VERSION=Rd;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=co.SDK_VERSION.split(".").map(r=>r.padStart(2,"0")).join("");co.SDK_VERSION_CODE=parseInt(e,10)}},qe={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${H.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${H.SDK_VERSION}/dist/widget.min.js`},he=ke(sn()),T=class{static log(...t){he.default.info(...t)}static debug(...t){he.default.debug(...t)}static error(...t){he.default.error(...t)}static warn(...t){he.default.warn(...t)}static info(...t){he.default.info(...t)}static trace(...t){he.default.trace(...t)}};function Ld(t=H.LOG_PREFIX){he.default.useDefaults({formatter:function(r){r.unshift(`${t} (v${H.SDK_VERSION}):`)}});let e=gu();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?he.default.setLevel(he.default[localStorage.cooeeLogLevel]):he.default.setLevel(qe.debug?he.default.TRACE:he.default.OFF)}function gu(){return new URL(location.href).searchParams?.get("cooee-debug")}function Md(){let t=`
2
2
  display: inline-block;
3
3
  font-size: 14px;
4
4
  background: linear-gradient(90deg, #d52dc8 25%, #2179e2 82%);
@@ -31,7 +31,7 @@ Event: ${Qe(t)}`),!0):Wm(t,e.denyUrls)?(Ct&&nt.warn(`Event dropped due to being
31
31
  Event: ${Qe(t)}.
32
32
  Url: ${Wi(t)}`),!0):Gm(t,e.allowUrls)?!1:(Ct&&nt.warn(`Event dropped due to not being matched by \`allowUrls\` option.
33
33
  Event: ${Qe(t)}.
34
- Url: ${Wi(t)}`),!0)}function Vm(t,e){return t.type||!e||!e.length?!1:zm(t).some(r=>os(r,e))}function qm(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;let r=t.transaction;return r?os(r,e):!1}function Wm(t,e){if(!e||!e.length)return!1;let r=Wi(t);return r?os(r,e):!1}function Gm(t,e){if(!e||!e.length)return!0;let r=Wi(t);return r?os(r,e):!0}function zm(t){let e=[];t.message&&e.push(t.message);let r;try{r=t.exception.values[t.exception.values.length-1]}catch{}return r&&r.value&&(e.push(r.value),r.type&&e.push(`${r.type}: ${r.value}`)),e}function Ym(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function Km(t=[]){for(let e=t.length-1;e>=0;e--){let r=t[e];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function Wi(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?Km(e):null}catch{return Ct&&nt.error(`Cannot extract url for event ${Qe(t)}`),null}}function Jm(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 Xm="Dedupe",Qm=()=>{let t;return{name:Xm,processEvent(e){if(e.type)return e;try{if(ty(e,t))return Ct&&nt.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},Zm=Qm;function ty(t,e){return e?!!(ey(t,e)||ry(t,e)):!1}function ey(t,e){let r=t.message,n=e.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!ch(t,e)||!ah(t,e))}function ry(t,e){let r=ml(e),n=ml(t);return!(!r||!n||r.type!==n.type||r.value!==n.value||!ch(t,e)||!ah(t,e))}function ah(t,e){let r=Kc(t),n=Kc(e);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let i=0;i<n.length;i++){let s=n[i],o=r[i];if(s.filename!==o.filename||s.lineno!==o.lineno||s.colno!==o.colno||s.function!==o.function)return!1}return!0}function ch(t,e){let r=t.fingerprint,n=e.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function ml(t){return t.exception&&t.exception.values&&t.exception.values[0]}var Ft=ht,Oo=0;function lh(){return Oo>0}function ny(){Oo++,setTimeout(()=>{Oo--})}function Zr(t,e={},r){if(typeof t!="function")return t;try{let i=t.__sentry_wrapped__;if(i)return i;if(ba(t))return t}catch{return t}let n=function(){let i=Array.prototype.slice.call(arguments);try{r&&typeof r=="function"&&r.apply(this,arguments);let s=i.map(o=>Zr(o,e));return t.apply(this,s)}catch(s){throw ny(),Ug(o=>{o.addEventProcessor(c=>(e.mechanism&&(Io(c,void 0,void 0),qn(c,e.mechanism)),c.extra=yt(x({},c.extra),{arguments:i}),c)),bm(s)}),s}};try{for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}catch{}zu(n,t),Cr(t,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return t.name}})}catch{}return n}var Hr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Ia(t,e){let r=Ca(t,e),n={type:e&&e.name,value:cy(e)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function iy(t,e,r,n){let i=ie(),s=i&&i.getOptions().normalizeDepth,o=dy(e),c={__serialized__:Xu(e,s)};if(o)return{exception:{values:[Ia(t,o)]},extra:c};let l={exception:{values:[{type:is(e)?e.constructor.name:n?"UnhandledRejection":"Error",value:hy(e,{isUnhandledRejection:n})}]},extra:c};if(r){let p=Ca(t,r);p.length&&(l.exception.values[0].stacktrace={frames:p})}return l}function Us(t,e){return{exception:{values:[Ia(t,e)]}}}function Ca(t,e){let r=e.stacktrace||e.stack||"",n=oy(e),i=ay(e);try{return t(r,n,i)}catch{}return[]}var sy=/Minified React error #\d+;/i;function oy(t){return t&&sy.test(t.message)?1:0}function ay(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function cy(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function ly(t,e,r,n){let i=r&&r.syntheticException||void 0,s=Ta(t,e,i,n);return qn(s),s.level="error",r&&r.event_id&&(s.event_id=r.event_id),xr(s)}function uy(t,e,r="info",n,i){let s=n&&n.syntheticException||void 0,o=ko(t,e,s,i);return o.level=r,n&&n.event_id&&(o.event_id=n.event_id),xr(o)}function Ta(t,e,r,n,i){let s;if(Vu(e)&&e.error)return Us(t,e.error);if(Fc(e)||_f(e)){let o=e;if("stack"in e)s=Us(t,e);else{let c=o.name||(Fc(o)?"DOMError":"DOMException"),l=o.message?`${c}: ${o.message}`:c;s=ko(t,l,r,n),Io(s,l)}return"code"in o&&(s.tags=yt(x({},s.tags),{"DOMException.code":`${o.code}`})),s}return fa(e)?Us(t,e):Xr(e)||is(e)?(s=iy(t,e,r,i),qn(s,{synthetic:!0}),s):(s=ko(t,e,r,n),Io(s,`${e}`,void 0),qn(s,{synthetic:!0}),s)}function ko(t,e,r,n){let i={};if(n&&r){let s=Ca(t,r);s.length&&(i.exception={values:[{value:e,stacktrace:{frames:s}}]})}if(ga(e)){let{__sentry_template_string__:s,__sentry_template_values__:o}=e;return i.logentry={message:s,params:o},i}return i.message=e,i}function hy(t,{isUnhandledRejection:e}){let r=$f(t),n=e?"promise rejection":"exception";return Vu(t)?`Event \`ErrorEvent\` captured as ${n} with message \`${t.message}\``:is(t)?`Event \`${py(t)}\` (type=${t.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function py(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function dy(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let r=t[e];if(r instanceof Error)return r}}function fy(t,{metadata:e,tunnel:r,dsn:n}){let i=x(x({event_id:t.event_id,sent_at:new Date().toISOString()},e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}}),!!r&&!!n&&{dsn:as(n)}),s=gy(t);return ri(i,[s])}function gy(t){return[{type:"user_report"},t]}var my=class extends xm{constructor(t){let e=x({parentSpanIsAlwaysRootSpan:!0},t),r=Ft.SENTRY_SDK_SOURCE||rg();km(e,"browser",["browser"],r),super(e),e.sendClientReports&&Ft.document&&Ft.document.addEventListener("visibilitychange",()=>{Ft.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,e){return ly(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t,e="info",r){return uy(this._options.stackParser,t,e,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){Hr&&nt.warn("SDK not enabled, will not capture user feedback.");return}let e=fy(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(e)}_prepareEvent(t,e,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,e,r)}_flushOutcomes(){let t=this._clearOutcomes();if(t.length===0){Hr&&nt.log("No outcomes to send");return}if(!this._dsn){Hr&&nt.log("No dsn provided, will not send outcomes");return}Hr&&nt.log("Sending outcomes:",t);let e=Eg(t,this._options.tunnel&&as(this._dsn));this.sendEnvelope(e)}},yy=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,zt=ht,vy=1e3,yl,Po,Ro;function wy(t){let e="dom";Or(e,t),kr(e,by)}function by(){if(!zt.document)return;let t=be.bind(null,"dom"),e=vl(t,!0);zt.document.addEventListener("click",e,!1),zt.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(r=>{let n=zt[r]&&zt[r].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Ht(n,"addEventListener",function(i){return function(s,o,c){if(s==="click"||s=="keypress")try{let l=this,p=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},d=p[s]=p[s]||{refCount:0};if(!d.handler){let h=vl(t);d.handler=h,i.call(this,s,h,c)}d.refCount++}catch{}return i.call(this,s,o,c)}}),Ht(n,"removeEventListener",function(i){return function(s,o,c){if(s==="click"||s=="keypress")try{let l=this,p=l.__sentry_instrumentation_handlers__||{},d=p[s];d&&(d.refCount--,d.refCount<=0&&(i.call(this,s,d.handler,c),d.handler=void 0,delete p[s]),Object.keys(p).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,o,c)}}))})}function _y(t){if(t.type!==Po)return!1;try{if(!t.target||t.target._sentryId!==Ro)return!1}catch{}return!0}function Ey(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function vl(t,e=!1){return r=>{if(!r||r._sentryCaptured)return;let n=Sy(r);if(Ey(r.type,n))return;Cr(r,"_sentryCaptured",!0),n&&!n._sentryId&&Cr(n,"_sentryId",_e());let i=r.type==="keypress"?"input":r.type;_y(r)||(t({event:r,name:i,global:e}),Po=r.type,Ro=n?n._sentryId:void 0),clearTimeout(yl),yl=zt.setTimeout(()=>{Ro=void 0,Po=void 0},vy)}}function Sy(t){try{return t.target}catch{return null}}var bi;function Iy(t){let e="history";Or(e,t),kr(e,Cy)}function Cy(){if(!xg())return;let t=zt.onpopstate;zt.onpopstate=function(...r){let n=zt.location.href,i=bi;if(bi=n,be("history",{from:i,to:n}),t)try{return t.apply(this,r)}catch{}};function e(r){return function(...n){let i=n.length>2?n[2]:void 0;if(i){let s=bi,o=String(i);bi=o,be("history",{from:s,to:o})}return r.apply(this,n)}}Ht(zt.history,"pushState",e),Ht(zt.history,"replaceState",e)}var Ri={};function Ty(t){let e=Ri[t];if(e)return e;let r=zt[t];if(Eo(r))return Ri[t]=r.bind(zt);let n=zt.document;if(n&&typeof n.createElement=="function")try{let i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);let s=i.contentWindow;s&&s[t]&&(r=s[t]),n.head.removeChild(i)}catch(i){yy&&nt.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,i)}return r&&(Ri[t]=r.bind(zt))}function wl(t){Ri[t]=void 0}var On="__sentry_xhr_v3__";function xy(t){let e="xhr";Or(e,t),kr(e,Dy)}function Dy(){if(!zt.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;Ht(t,"open",function(e){return function(...r){let n=sr()*1e3,i=He(r[0])?r[0].toUpperCase():void 0,s=Ay(r[1]);if(!i||!s)return e.apply(this,r);this[On]={method:i,url:s,request_headers:{}},i==="POST"&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let o=()=>{let c=this[On];if(c&&this.readyState===4){try{c.status_code=this.status}catch{}let l={endTimestamp:sr()*1e3,startTimestamp:n,xhr:this};be("xhr",l)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Ht(this,"onreadystatechange",function(c){return function(...l){return o(),c.apply(this,l)}}):this.addEventListener("readystatechange",o),Ht(this,"setRequestHeader",function(c){return function(...l){let[p,d]=l,h=this[On];return h&&He(p)&&He(d)&&(h.request_headers[p.toLowerCase()]=d),c.apply(this,l)}}),e.apply(this,r)}}),Ht(t,"send",function(e){return function(...r){let n=this[On];if(!n)return e.apply(this,r);r[0]!==void 0&&(n.body=r[0]);let i={startTimestamp:sr()*1e3,xhr:this};return be("xhr",i),e.apply(this,r)}})}function Ay(t){if(He(t))return t;try{return t.toString()}catch{}}function Ny(t,e=Ty("fetch")){let r=0,n=0;function i(s){let o=s.body.length;r+=o,n++;let c=x({body:s.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:r<=6e4&&n<15},t.fetchOptions);if(!e)return wl("fetch"),Vi("No fetch implementation available");try{return e(t.url,c).then(l=>(r-=o,n--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return wl("fetch"),r-=o,n--,Vi(l)}}return Om(t,i)}var Oy=30,ky=50;function Lo(t,e,r,n){let i={filename:t,function:e==="<anonymous>"?Tr:e,in_app:!0};return r!==void 0&&(i.lineno=r),n!==void 0&&(i.colno=n),i}var Py=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ry=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ly=/\((\S*)(?::(\d+))(?::(\d+))\)/,My=t=>{let e=Py.exec(t);if(e){let[,n,i,s]=e;return Lo(n,Tr,+i,+s)}let r=Ry.exec(t);if(r){if(r[2]&&r[2].indexOf("eval")===0){let s=Ly.exec(r[2]);s&&(r[2]=s[1],r[3]=s[2],r[4]=s[3])}let[n,i]=uh(r[1]||Tr,r[2]);return Lo(i,n,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},Uy=[Oy,My],By=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,jy=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,$y=t=>{let e=By.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let i=jy.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],n=e[1]||Tr;return[n,r]=uh(n,r),Lo(r,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},Fy=[ky,$y],Hy=[Uy,Fy],Vy=Hf(...Hy),uh=(t,e)=>{let r=t.indexOf("safari-extension")!==-1,n=t.indexOf("safari-web-extension")!==-1;return r||n?[t.indexOf("@")!==-1?t.split("@")[0]:Tr,r?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},_i=1024,qy="Breadcrumbs",Wy=(t={})=>{let e=x({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:qy,setup(r){e.console&&qf(Ky(r)),e.dom&&wy(Yy(r,e.dom)),e.xhr&&xy(Jy(r)),e.fetch&&Kf(Xy(r)),e.history&&Iy(Qy(r)),e.sentry&&r.on("beforeSendEvent",zy(r))}}},Gy=Wy;function zy(t){return function(e){ie()===t&&Dr({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:Qe(e)},{event:e})}}function Yy(t,e){return function(r){if(ie()!==t)return;let n,i,s=typeof e=="object"?e.serializeAttribute:void 0,o=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;o&&o>_i&&(Hr&&nt.warn(`\`dom.maxStringLength\` cannot exceed ${_i}, but a value of ${o} was configured. Sentry will use ${_i} instead.`),o=_i),typeof s=="string"&&(s=[s]);try{let l=r.event,p=Zy(l)?l.target:l;n=Wu(p,{keyAttrs:s,maxStringLength:o}),i=Of(p)}catch{n="<unknown>"}if(n.length===0)return;let c={category:`ui.${r.name}`,message:n};i&&(c.data={"ui.component_name":i}),Dr(c,{event:r.event,name:r.name,global:r.global})}}function Ky(t){return function(e){if(ie()!==t)return;let r={category:"console",data:{arguments:e.args,logger:"console"},level:hg(e.level),message:Hc(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)r.message=`Assertion failed: ${Hc(e.args.slice(1)," ")||"console.assert"}`,r.data.arguments=e.args.slice(1);else return;Dr(r,{input:e.args,level:e.level})}}function Jy(t){return function(e){if(ie()!==t)return;let{startTimestamp:r,endTimestamp:n}=e,i=e.xhr[On];if(!r||!n||!i)return;let{method:s,url:o,status_code:c,body:l}=i,p={method:s,url:o,status_code:c},d={xhr:e.xhr,input:l,startTimestamp:r,endTimestamp:n};Dr({category:"xhr",data:p,type:"http"},d)}}function Xy(t){return function(e){if(ie()!==t)return;let{startTimestamp:r,endTimestamp:n}=e;if(n&&!(e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"))if(e.error){let i=e.fetchData,s={data:e.error,input:e.args,startTimestamp:r,endTimestamp:n};Dr({category:"fetch",data:i,level:"error",type:"http"},s)}else{let i=e.response,s=yt(x({},e.fetchData),{status_code:i&&i.status}),o={input:e.args,response:i,startTimestamp:r,endTimestamp:n};Dr({category:"fetch",data:s,type:"http"},o)}}}function Qy(t){return function(e){if(ie()!==t)return;let r=e.from,n=e.to,i=Ms(Ft.location.href),s=r?Ms(r):void 0,o=Ms(n);(!s||!s.path)&&(s=i),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),Dr({category:"navigation",data:{from:r,to:n}})}}function Zy(t){return!!t&&!!t.target}var tv=["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"],ev="BrowserApiErrors",rv=(t={})=>{let e=x({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t);return{name:ev,setupOnce(){e.setTimeout&&Ht(Ft,"setTimeout",bl),e.setInterval&&Ht(Ft,"setInterval",bl),e.requestAnimationFrame&&Ht(Ft,"requestAnimationFrame",iv),e.XMLHttpRequest&&"XMLHttpRequest"in Ft&&Ht(XMLHttpRequest.prototype,"send",sv);let r=e.eventTarget;r&&(Array.isArray(r)?r:tv).forEach(ov)}}},nv=rv;function bl(t){return function(...e){let r=e[0];return e[0]=Zr(r,{mechanism:{data:{function:ar(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function iv(t){return function(e){return t.apply(this,[Zr(e,{mechanism:{data:{function:"requestAnimationFrame",handler:ar(t)},handled:!1,type:"instrument"}})])}}function sv(t){return function(...e){let r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(n=>{n in r&&typeof r[n]=="function"&&Ht(r,n,function(i){let s={mechanism:{data:{function:n,handler:ar(i)},handled:!1,type:"instrument"}},o=ba(i);return o&&(s.mechanism.data.handler=ar(o)),Zr(i,s)})}),t.apply(this,e)}}function ov(t){let e=Ft,r=e[t]&&e[t].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Ht(r,"addEventListener",function(n){return function(i,s,o){try{typeof s.handleEvent=="function"&&(s.handleEvent=Zr(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ar(s),target:t},handled:!1,type:"instrument"}}))}catch{}return n.apply(this,[i,Zr(s,{mechanism:{data:{function:"addEventListener",handler:ar(s),target:t},handled:!1,type:"instrument"}}),o])}}),Ht(r,"removeEventListener",function(n){return function(i,s,o){let c=s;try{let l=c&&c.__sentry_wrapped__;l&&n.call(this,i,l,o)}catch{}return n.call(this,i,c,o)}}))}var av="GlobalHandlers",cv=(t={})=>{let e=x({onerror:!0,onunhandledrejection:!0},t);return{name:av,setupOnce(){Error.stackTraceLimit=50},setup(r){e.onerror&&(uv(r),_l("onerror")),e.onunhandledrejection&&(hv(r),_l("onunhandledrejection"))}}},lv=cv;function uv(t){Qf(e=>{let{stackParser:r,attachStacktrace:n}=hh();if(ie()!==t||lh())return;let{msg:i,url:s,line:o,column:c,error:l}=e,p=fv(Ta(r,l||i,void 0,n,!1),s,o,c);p.level="error",ih(p,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function hv(t){tg(e=>{let{stackParser:r,attachStacktrace:n}=hh();if(ie()!==t||lh())return;let i=pv(e),s=ma(i)?dv(i):Ta(r,i,void 0,n,!0);s.level="error",ih(s,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function pv(t){if(ma(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 dv(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function fv(t,e,r,n){let i=t.exception=t.exception||{},s=i.values=i.values||[],o=s[0]=s[0]||{},c=o.stacktrace=o.stacktrace||{},l=c.frames=c.frames||[],p=isNaN(parseInt(n,10))?void 0:n,d=isNaN(parseInt(r,10))?void 0:r,h=He(e)&&e.length>0?e:Nf();return l.length===0&&l.push({colno:p,filename:h,function:Tr,in_app:!0,lineno:d}),t}function _l(t){Hr&&nt.log(`Global Handler attached: ${t}`)}function hh(){let t=ie();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var gv=()=>({name:"HttpContext",preprocessEvent(t){if(!Ft.navigator&&!Ft.location&&!Ft.document)return;let e=t.request&&t.request.url||Ft.location&&Ft.location.href,{referrer:r}=Ft.document||{},{userAgent:n}=Ft.navigator||{},i=x(x(x({},t.request&&t.request.headers),r&&{Referer:r}),n&&{"User-Agent":n}),s=yt(x(x({},t.request),e&&{url:e}),{headers:i});t.request=s}}),mv="cause",yv=5,vv="LinkedErrors",wv=(t={})=>{let e=t.limit||yv,r=t.key||mv;return{name:vv,preprocessEvent(n,i,s){let o=s.getOptions();Tf(Ia,o.stackParser,o.maxValueLength,r,e,n,i)}}},bv=wv;function _v(t){return[$m(),Mm(),nv(),Gy(),lv(),bv(),Zm(),gv()]}var Ev=class extends Error{cause;constructor(t,e){super(t),this.cause=e}},Yt=class ph{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new ph),this.INSTANCE}captureException(e,r,n){T.error(e),this.getNewScope(r,n).captureException(e)}captureMessage(e,r,n,i){this.getNewScope(n,i).captureMessage(e,r??"error")}captureError(e,r,n,i){T.error(e,r);let s=this.getNewScope(n,i),o=new Ev(e,r);s.captureException(o)}setGlobalContext(e,r){this.contexts[e]=x({context:r},this.contexts[e])}setUser(e){this.user=e}setTags(e){this.tags=e}getNewScope(e,r){let n=new We;if(n.setClient(this.client),n.setUser(this.user),e?.triggerContext){let i=e.triggerContext;n.setExtras(i.triggerData.sentryContext()),delete e.triggerContext}return e&&n.setExtras(e),this.tags&&n.setTags(this.tags),r&&n.setTags(r),Object.keys(this.contexts).forEach(i=>{n.setContext(i,this.contexts[i])}),n.setTag("language",navigator.language),n.setTag("timezone",Tv()),n}init(){let e=_v({}).filter(r=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(r.name));this.client=new my({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:Ny,stackParser:Vy,integrations:e,environment:qe.mode,release:`web-sdk@${H.SDK_VERSION}`,debug:qe.debug}),this.client.init()}},Sv=class{static format(t,e){let r=/{{\s*(\w+)\s*}}/;return e.replace(r,(n,i)=>{switch(i){case"amount":return this.formatWithDelimiters(t,2);case"amount_no_decimals":return this.formatWithDelimiters(t,0);case"amount_with_comma_separator":return this.formatWithDelimiters(t,2,".",",");case"amount_no_decimals_with_comma_separator":return this.formatWithDelimiters(t,0,".",",");case"amount_with_apostrophe_separator":return this.formatWithDelimiters(t,2,"'",".");case"amount_no_decimals_with_space_separator":return this.formatWithDelimiters(t,0," ");case"amount_with_space_separator":return this.formatWithDelimiters(t,2," ",",");case"amount_with_period_and_space_separator":return this.formatWithDelimiters(t,2," ",".");default:return n}})}static formatWithDelimiters(t,e=2,r=",",n="."){if(isNaN(t)||t==null)return"0";let i=(t/100).toFixed(e).split("."),s=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+r),o=i[1]?n+i[1]:"";return s+o}};function dh(t){try{return new URL(t)}catch{return}}function El(t){return!t||t==="null"||t==="undefined"}function Iv(t,e){let r=t.indexOf(e);return r===-1?!1:(t.splice(r,1),!0)}function De(t,e){if(t==0&&e)return"Free";let r=Ot.get(),n=ne.get(),i=r.shopCurrencyCode||n.currency,s=r.currencyCode;s||T.warn("Currency code is not set in RuntimeData");let o=n.money?.format??r.moneyFormat,c;if(o&&i===s)c=Sv.format(t*100,o);else{let l;try{l=new Intl.NumberFormat(fh(),{style:"currency",currency:s||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(p){return Yt.getInstance().captureException(p,{currentCurrency:s,shopCurrency:i}),""}c=l.format(t),c=c.replace("\u20B9","Rs. "),n.money?.showCurrency&&s!=="INR"&&(c=c.concat(` ${s}`))}return c}function Cv(t){return new Intl.NumberFormat(fh(),{notation:"compact"}).format(t)}function fh(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}var Ei;function Tv(){if(Ei)return Ei;try{return Ei=Intl.DateTimeFormat().resolvedOptions().timeZone,Ei}catch{return""}}function xa(t){document.readyState==="complete"?t():document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&t()})}function tr(t){let e=document.createElement("span");e.id="snackbar",e.innerText=t,document.body.appendChild(e),e.className="show",setTimeout(()=>{e.classList.remove("show"),document.body.removeChild(e)},3e3)}async function gh(t,e=10,r=document){let n=0,i=document.querySelectorAll("nonexistent-tag");for(;n<e;){let s=Math.min(100*2**n,5e3);if(await Qn.sleep(s),i=r.querySelectorAll(t),i.length)return T.debug(`Attempt ${n+1}: ${i.length} elements found with ${t}`),i;T.debug(`Attempt ${n+1}: Elements not found with ${t}. Retrying after ${s}ms.`),n++}return T.warn(`Max attempts reached. Element not found with ${t}.`),i}async function Gi(t,e=10,r=document){return(await gh(t,e,r)).item(0)}function xv(t,e,r=document.body){let n=new MutationObserver(i=>{i.forEach(s=>{s.removedNodes.forEach(o=>{(o===t||o.contains(t))&&(e(),n.disconnect())})})});n.observe(r,{childList:!0})}async function mh(){let t=await Lt.get(ot.DEVICE_ID),e=await te.get(ot.ID,"");return[{key:"letscooee_did",value:t},{key:"letscooee_sid",value:e},{key:"__letscooee_time",value:new Date().toLocaleString()},{key:"__letscooee_via",value:"Buy Now"}]}function kn(t,e,r){Object.defineProperty(t,e,{enumerable:!1,configurable:!1,writable:!1,value:r})}var Dv=class{url;alt;constructor(t){t.alt&&(this.alt=t.alt),this.url=t.url}},Av=class{d;cmp;effective;constructor(t={}){this.d=t.d,this.cmp=t.cmp,this.effective=this.d}},Nv=class{id;mID;name;groupID;groupName;isSelected;constructor(t){t??={},this.id=t.id,this.mID=t.mID,this.name=t.name,this.groupID=t.groupID,this.groupName=t.groupName,this.isSelected=t.isSelected??!1}},ls=class{mID;name;imgs;link;price;sku;isAvailable;quantity;sellingPlans;selectedOptions;selectedSellingPlan;effectivePrice;constructor(t){t=t??{},this.mID=t.mID,this.name=t.name,this.imgs=t.imgs?.map(e=>new Dv(e))??[],this.link=t.link,this.price=new Av(t.price),this.sku=t.sku,this.isAvailable=t.isAvailable,this.quantity=t.quantity,this.selectedOptions=t.selectedOptions??[],this.effectivePrice=Sr(this.price.effective),t.sellingPlans?.length&&(this.selectedSellingPlan=Sr(void 0)),this.sellingPlans=t.sellingPlans?.map(e=>{let r=new Nv(e);return r.isSelected&&(this.selectedSellingPlan.value=r),r})}getOneImage(){return this.imgs[0]?.url}changeSellingPlan(t){this.selectedSellingPlan.value=t}hasEffectivePrice(){return this.effectivePrice.value!==this.price.d}},Ve=class{id;mID;name;status;ctg;options;imgs;videos;portraitVideos;vars;desc;sDesc;link;slug;quantity;category;meta;reviews;tags;selectedOrFirstVariant;selected=Sr(!0);constructor(t){this.update(t),this.selectedOrFirstVariant=Sr(this.selectedVariant)}get imageURL(){return this.imgs?.[0]?.url}get secondaryImageURL(){return this.imgs?.[1]?.url}get getVariantImages(){return this.selectedOrFirstVariant.value.imgs}get variantImage(){return this.getVariantImages[0]?.url}get variantSecondaryImage(){return this.getVariantImages[1]?.url}set variants(t){this.vars=t,this.selectedOrFirstVariant.value=this.selectedVariant}get selectedVariant(){return this.vars.find(t=>t.isAvailable)??this.vars[0]}setSelectedVariant(t){this.selectedOrFirstVariant.value=t}update(t){return this.id=t.id,this.mID=t.mID,this.name=t.name,this.status=t.status,this.ctg=t.ctg,this.imgs=t.imgs,this.desc=t.desc,this.sDesc=t.sDesc,this.link=t.link,this.slug=t.slug,this.quantity=t.quantity,this.meta=t.meta,this.category=t.category,this.videos=t.videos,this.reviews=t.reviews,this.options=t.options,this.portraitVideos=t.videos?.filter(e=>e.orientation==="PORTRAIT"),this.tags=t.tags,t.vars&&(this.vars=t.vars.map(e=>new ls(e))),this}toEmbed(t){return t=t??this.selectedOrFirstVariant.value,new un({id:this.id,mID:this.mID,vID:t.mID,vName:t.name,name:this.name,link:this.link,slug:this.slug,price:t.price.d,imageURL:t.getOneImage()??this.imgs?.[0].url})}getTemplateVariables(){let t=this.selectedOrFirstVariant.value,e=t.price,r=this.name,n=this.category,i=De(e.d,!0),s=this.variantImage??this.imageURL,o=this.meta,c=this.tags?.join(",")??"",l=this.reviews?.rating,p=this.reviews?.totalReviews,d=e.cmp&&e.cmp>e.d,h={name:r,price:i,image_url:s,meta:o,category:n,rating:l,reviews:p,tags:c};if(t.hasEffectivePrice()&&(h.effective_price=De(t.effectivePrice.value)),d){h.compare_price=De(e.cmp);let v=e.cmp-e.d;h.discount_percent=(v/e.cmp*100).toFixed(0),h.discount_price=De(v)}let b={name:t.name,quantity:t.quantity};return{product:h,variant:b}}},Ov=class{id;mID;handle;title;imageURL;constructor(t){t??={},this.id=t.id,this.mID=t.mID,this.handle=t.handle,this.title=t.title,this.imageURL=t.imageURL}},kv=class{enabled;constructor(t){this.enabled=t.enabled}},Pv=class extends kv{max;min;constructor(t){t??={},super(t),this.min=t.min,this.max=t.max}},Rv=class{productQuantity;constructor(t){t??={},this.productQuantity=new Pv(t.productQuantity)}},yh=class{s;g;i;constructor(t){t.s&&(this.s=new re(t.s)),t.g&&(this.g=new $v(t.g)),this.i=t.i}get solid(){return this.s}get glossy(){return this.g}get img(){return this.i}},Wn="a-f\\d",Lv=`#?[${Wn}]{3}[${Wn}]?`,Mv=`#?[${Wn}]{6}([${Wn}]{2})?`,Uv=new RegExp(`[^#${Wn}]`,"gi"),Bv=new RegExp(`^${Lv}$|^${Mv}$`,"i");function jv(t,e={}){if(typeof t!="string"||Uv.test(t)||!Bv.test(t))throw new TypeError("Expected a valid hex string");t=t.replace(/^#/,"");let r=1;t.length===8&&(r=Number.parseInt(t.slice(6,8),16)/255,t=t.slice(0,6)),t.length===4&&(r=Number.parseInt(t.slice(3,4).repeat(2),16)/255,t=t.slice(0,3)),t.length===3&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);let n=Number.parseInt(t,16),i=n>>16,s=n>>8&255,o=n&255,c=typeof e.alpha=="number"?e.alpha:r;if(e.format==="array")return[i,s,o,c];if(e.format==="css"){let l=c===1?"":` / ${Number((c*100).toFixed(2))}%`;return`rgb(${i} ${s} ${o}${l})`}return{red:i,green:s,blue:o,alpha:c}}var re=class{h;a=100;g;constructor(t){t??={},this.h=t.h,this.a=t.a,this.g=t.g}get hex(){return this.h}get grad(){return this.g}get rgba(){if(!this.hex)return"";try{return jv(this.hex,{format:"css",alpha:this.getAlpha()})}catch(t){return console.error("Invalid hex",t),"#000000"}}getAlpha(){return(this.a??100)/100}},Da=class{s;r;w;c;constructor(t){this.s=t.s,this.r=t.r,this.w=t.w,t.c&&(this.c=new re(t.c))}get radius(){return this.r}get width(){return this.w}get color(){return this.c}get style(){return Aa[this.s??1]}},Aa=(t=>(t[t.SOLID=1]="SOLID",t[t.DASHED=2]="DASHED",t))(Aa||{}),$v=class vh{static DEFAULT_FALLBACK=new re({h:"#000000",a:50});r;c;fb;constructor(e){this.r=e.r,e.c&&(this.c=new re(e.c)),e.fb&&(this.fb=new re(e.fb))}get radius(){return this.r}get color(){return this.c}get fallback(){return this.fb??vh.DEFAULT_FALLBACK}},Fv=class{blur;spr;clr;x;y;constructor(t){t=t??{},this.blur=t.blur??0,this.spr=t.spr??0,this.x=t.x??0,this.y=t.y??0,this.clr=new re(t.clr)}getStyle(t){return`${this.x*t}px ${this.y*t}px ${this.blur*t}px ${this.spr*t}px ${this.clr.rgba}`}},Na=class{pl;pr;pt;pb;ml;mr;mt;mb;cent;constructor(t){t=t??{},this.pl=t.pl??0,this.pr=t.pr??0,this.pt=t.pt??0,this.pb=t.pb??0,this.ml=t.ml??0,this.mr=t.mr??0,this.mt=t.mt??0,this.mb=t.mb??0,this.cent=t.cent??!1}getHorizontal(){return this.pl+this.pr}getVertical(){return this.pt+this.pb}getPaddingCSS(){return`${this.pt}px ${this.pr}px ${this.pb}px ${this.pl}px`}},wh=class{rot;constructor(t){t?.rot&&(this.rot=t.rot)}get rotate(){return this.rot}},ni=class{t;bg;br;clc;shd;spc;trf;a;w;h;x;y;constructor(t){this.t=t.t,t.bg&&(this.bg=new yh(t.bg)),t.br&&(this.br=new Da(t.br)),t.shd&&(this.shd=new Fv(t.shd)),t.spc&&(this.spc=new Na(t.spc)),this.trf=new wh(t.trf),this.clc=t.clc,this.w=t.w,this.h=t.h,this.x=t.x,this.y=t.y,this.a=t.a}get alpha(){return this.a??100}get type(){return this.t}get typeAsString(){return Oa[this.t]}get click(){return this.clc}},Oa=(t=>(t[t.IMAGE=1]="IMAGE",t[t.TEXT=2]="TEXT",t[t.BUTTON=3]="BUTTON",t[t.FLEXBOX=4]="FLEXBOX",t[t.MULTI_COLUMN=5]="MULTI_COLUMN",t[t.CHECKBOX=6]="CHECKBOX",t[t.PRODUCTS=11]="PRODUCTS",t[t.PRODUCT=12]="PRODUCT",t[t.PRODUCT_IMAGE=13]="PRODUCT_IMAGE",t[t.PRODUCT_TITLE=14]="PRODUCT_TITLE",t[t.PRODUCT_VARIATIONS=15]="PRODUCT_VARIATIONS",t[t.PRODUCT_VARIATIONS_SELLING_PLANS=16]="PRODUCT_VARIATIONS_SELLING_PLANS",t[t.PRODUCT_BUTTON=18]="PRODUCT_BUTTON",t[t.PRODUCT_RATING=19]="PRODUCT_RATING",t[t.EMAIL_INPUT=51]="EMAIL_INPUT",t[t.PHONE_INPUT=52]="PHONE_INPUT",t[t.COUNTDOWN_TIMER=61]="COUNTDOWN_TIMER",t[t.CAROUSEL=62]="CAROUSEL",t[t.SHAPE=100]="SHAPE",t))(Oa||{}),bh=class extends ni{constructor(t){super(t)}},ka=class extends ni{src;constructor(t){super(t),this.src=t.src}},Pa=(t=>(t[t.START=0]="START",t[t.CENTER=1]="CENTER",t[t.END=2]="END",t[t.JUSTIFY=3]="JUSTIFY",t))(Pa||{}),Hv=class{name;fonts;constructor(t){t=t??{},t.name&&(t.name=t.name!=="Arial"?t.name:""),this.name=t.name,this.fonts=t.fonts?.map(e=>new Vv(e))}},Vv=class{style;url;constructor(t){t=t??{},this.style=t.style,this.url=t.url}getFontDescriptor(){return{style:this.style===2||this.style===4?"italic":"normal",weight:this.style===4||this.style===3?"700":"400"}}getURL(){return`url('${this.url}') format('truetype')`}},Ge=class{fw;fs;fam;fmly;lh=1.2;ls;s;tc;ta;td;tdc;constructor(t){this.update(t)}get alignment(){return Pa[this.ta]}get letterSpacing(){return this.ls?this.ls+"px":"normal"}update(t){t=t??{},t.lh&&(this.lh=t.lh),t.tdc&&(this.tdc=new re(t.tdc)),this.td=t.td,this.fs=t.s??t.fs??60,this.tc=new re(t.tc),this.ta=t.ta??1,this.fw=t.fw??400,this.ls=t.ls??0,this.tc.h??="#000000",this.fam=new Hv(t.fam??t.fmly)}resize(t){this.s*=t,this.ls*=t}},us=class extends ni{typo;constructor(t){super(t);let e=x(x({},t.f),t.typo);t.alg&&(e.ta=t.alg),t.c&&(e.tc=t.c),this.typo=new Ge(e)}get color(){return this.typography.tc}get typography(){return this.typo}},Mo=class extends us{prs;constructor(t){super(t),this.prs=t.prs}get parts(){return this.prs}},qv=class extends ni{o;constructor(t){super(t),this.o=t.o??5,this.w=this.w??1080,this.h=this.h??1920}getOrigin(){return this.o}},_h=class{dd;hh;mm;ss;date;constructor(t){t??={},this.dd=t.dd??0,this.hh=t.hh??0,this.mm=t.mm??0,this.ss=t.ss??0,this.date=t.date?new Date(t.date):void 0}start(t,e){let r=new Date;t===2?(r.setSeconds(r.getSeconds()+this.ss),r.setMinutes(r.getMinutes()+this.mm),r.setHours(r.getHours()+this.hh),r.setDate(r.getDate()+this.dd)):r=this.date??new Date;let n=window.setInterval(()=>{let i=new Date().getTime(),s=r.getTime()-i;if(s<1){clearInterval(n);return}let o=Math.floor(s/(1e3*60*60*24)),c=Math.floor(s%(1e3*60*60*24)/(1e3*60*60)),l=Math.floor(s%(1e3*60*60)/(1e3*60)),p=Math.floor(s%(1e3*60)/1e3);e({days:o,hours:c,minutes:l,seconds:p})},1e3);return n}},Eh=class extends us{gap;timer;timerType;horizontal;lblPos;show;constructor(t){t??={},super(t),this.gap=t.gap,this.timerType=t.type,this.timer=new _h(t.timer),this.show=t.show??{day:!0,hour:!0,minute:!0,second:!0},this.horizontal=t.horizontal,this.lblPos=t.lblPos}},Wv=class{txt;c;constructor(t){t??={},this.txt=t.txt,this.c=new re(t.c??{})}get text(){return this.txt}get color(){return this.c}},Ra=class extends us{ph;constructor(t){super(t),this.ph=new Wv(t.ph)}get placeholderText(){return this.ph.text}get placeholderColor(){return this.ph.color.rgba}},Sh=class extends Ra{constructor(t){t??={},super(t)}},Ih=class extends Ra{},Ch=class extends Ra{},Th=class extends ka{},hs=(t=>(t[t.LOW=1]="LOW",t[t.MEDIUM=2]="MEDIUM",t[t.HIGH=3]="HIGH",t))(hs||{}),Gv=class{en;ex;constructor(t){t=t??{},this.en=t.en,this.ex=t.ex}getEnterAnimation(){switch(this.en){case 2:return[{transform:"translateY(-100%)"},{transform:"translateY(0%)"}];case 3:return[{transform:"translateY(100%)"},{transform:"translateY(0%)"}];case 4:return[{transform:"translateX(-100%)"},{transform:"translateX(0%)"}];case 5:return[{transform:"translateX(100%)"},{transform:"translateX(0%)"}];case 6:return[{transform:"translate(-100%, -100%)"},{transform:"translate(0%, 0%)"}];case 7:return[{transform:"translate(100%, -100%)"},{transform:"translate(0%, 0%)"}];case 8:return[{transform:"translate(-100%, 100%)"},{transform:"translate(0%, 0%)"}];case 9:return[{transform:"translate(100%, 100%)"},{transform:"translate(0%, 0%)"}];case 10:return[{transform:"scale(0.1)"},{transform:"scale(1)"}];default:return[]}}getExitAnimation(){switch(this.ex){case 2:return[{transform:"translateY(0%)"},{transform:"translateY(-100%)"}];case 3:return[{transform:"translateY(0%)"},{transform:"translateY(100%)"}];case 4:return[{transform:"translateX(0%)"},{transform:"translateX(-100%)"}];case 5:return[{transform:"translateX(0%)"},{transform:"translateX(100%)"}];case 6:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, -100%)"}];case 7:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, -100%)"}];case 8:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, 100%)"}];case 9:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, 100%)"}];case 10:return[{transform:"scale(1)"},{transform:"scale(0)"}];default:return[]}}},Sl=class extends ni{gvt;max;cover;anim;embedded;position;constructor(t){t=t??{},super(t),this.gvt=t.gvt??5,this.max=t.max,this.cover=t.cover??!0,this.anim=new Gv(t.anim),this.embedded=t.embedded,this.position=t.position??1,this.spc||(this.spc=new Na({pl:H.IN_APP_DEFAULT_PADDING,pr:H.IN_APP_DEFAULT_PADDING,pt:H.IN_APP_DEFAULT_PADDING,pb:H.IN_APP_DEFAULT_PADDING}))}isEmbedded(){return this.position===2&&!!this.embedded}getEmbeddedSelector(){return`.letscooee-engagement.container-${this.embedded}`}},zv=class extends Sl{cont;elems=[];mob;constructor(t){t=t??{},super(t),this.cont=new qv(t.cont),this.mob=new Sl(t.mob),this.bg||(this.bg=this.cont.bg,delete this.cont.bg),t.elems.forEach(e=>{e.t===1?this.elems.push(new ka(e)):e.t===2?this.elems.push(new Mo(e)):e.t===3?this.elems.push(new Mo(e)):e.t===100?this.elems.push(new bh(e)):e.t===51?this.elems.push(new Ih(e)):e.t===52?this.elems.push(new Ch(e)):e.t===61?this.elems.push(new Eh(e)):e.t===15||e.t===16?this.elems.push(new Sh(e)):e.t===13&&this.elems.push(new Th(e))})}getStylesForWrapper(){if(this.cover)return{};let t;return this.gvt===1?t={top:0,left:0}:this.gvt===2?t={top:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===3?t={top:0,right:0}:this.gvt===6?t={top:"50%",right:0,transform:"translateY(-50%)"}:this.gvt===9?t={bottom:0,right:0}:this.gvt===8?t={bottom:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===7?t={bottom:0,left:0}:this.gvt===4?t={top:"50%",left:0,transform:"translateY(-50%)"}:t={top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},t.overflow="visible",t}getFlexStylesForContainer(){let t={display:"flex",flexDirection:"row"},e,r;return this.gvt===1?(e="flex-start",r="flex-start"):this.gvt===2?(e="center",r="flex-start"):this.gvt===3?(e="flex-end",r="flex-start"):this.gvt===4?(e="flex-start",r="center"):this.gvt===6?(e="flex-end",r="center"):this.gvt===7?(e="flex-start",r="flex-end"):this.gvt===8?(e="center",r="flex-end"):this.gvt===9?(e="flex-end",r="flex-end"):(e="center",r="center"),t.alignItems=r,t.justifyContent=e,t.overflow="visible",t}overrideForMobileView(){this.max=this.mob.max??this.max,this.cover=this.mob.cover??this.cover,this.gvt=this.mob.gvt??this.gvt,this.bg=this.mob.bg??this.bg,this.spc=this.mob.spc??this.spc,this.anim=this.mob.anim??this.anim,this.position=this.mob.position??this.position,this.embedded=this.mob.embedded??this.embedded}},xh=class{gap;dir;wrap;jc;ai;scroll;constructor(t){t??={},this.gap=t.gap??0,this.dir=t.dir??"row",this.wrap=t.wrap??"nowrap",this.jc=t.jc??"flex-start",this.ai=t.ai??"flex-start",this.scroll=t.scroll}},Yv=class{of;disp;pos;top;bottom;left;right;zIndex;constructor(t){t??={},this.of=t.of,this.disp=t.disp,this.pos=t.pos,this.top=t.top,this.bottom=t.bottom,this.left=t.left,this.right=t.right,this.zIndex=t.zIndex}},Kv=class{w;h;maxW;maxH;minW;minH;constructor(t){t??={},this.w=t.w??"100%",this.h=t.h??"auto",this.maxW=t.maxW,this.maxH=t.maxH,this.minW=t.minW,this.minH=t.minH}},Il=class{size;bg;br;spc;typo;lout;flex;constructor(t){t??={},this.spc=new Na(t.spc),t.size&&(this.size=new Kv(t.size)),t.bg&&(this.bg=new yh(t.bg)),t.br&&(this.br=new Da(t.br)),t.typo&&(this.typo=new Ge(t.typo)),t.lout&&(this.lout=new Yv(t.lout)),t.flex&&(this.flex=new xh(t.flex))}},Dh=class{sm;lg;constructor(t){t??={},this.sm=new Il(t.sm),this.lg=new Il(t.lg)}},lr=class{t;style;hide;when;clc;constructor(t,e){e??={},this.t=t,this.style=new Dh(e.style),this.hide=e.hide,e.when?.op&&(this.when=e.when),e.clc&&(this.clc=e.clc)}get stringType(){return Oa[this.t]}},Ne=class extends lr{text;constructor(t,e){t?.style?.lg?.typo?.s&&delete t.style.lg.typo.s,t?.style?.sm?.typo?.s&&delete t.style.sm.typo.s,super(e??2,t),t??={},this.text=t.text}},Uo=class extends Ne{constructor(t,e){super(t,e??3)}},Ah=class extends lr{value;constructor(t){super(6,t),t??={},this.value=t.value}},Nh=class extends Ne{showChips;optionsConfig;constructor(t=15,e){super(e,t),e??={},this.showChips=e.showChips??!1,this.optionsConfig=e.optionsConfig??{}}},Jv=class extends lr{c;iconSize;showSingleStar;fullStar;halfStart;constructor(t){super(19,t),t??={},this.c=new re(t.c),this.iconSize=t.iconSize??24,this.showSingleStar=t.showSingleStar??!1,this.fullStar=t.fullStar,this.halfStart=t.halfStart}},Xv=ke(sn()),Qv=class{enabled;type;color;constructor(t){t??={},this.enabled=t.enabled,this.type=t.type,this.color=new re(t.color)}},Zv=class{size;enabled;color;constructor(t){t??={},this.enabled=t.enabled,this.size=t.size,this.color=new re(t.color)}},Oh=class{navigation;pagination;autoplay;maxInRow;gap;slidesPerView;constructor(t){t??={},this.navigation=new Zv(t.navigation),this.pagination=new Qv(t.pagination),this.autoplay=t.autoplay,this.slidesPerView=t.slidesPerView??1,this.maxInRow=t.maxInRow??t.slidesPerView??4,this.gap=t.gap??0}},tw=class extends lr{conf;slide;formData;values;allowedTypes;constructor(t){super(62,t),t&&this.update(t)}update(t){t??={},this.slide=tn.getParsedElement(t.slide),this.formData=t.formData,this.values=t.values,this.conf=new Oh(t.conf),this.allowedTypes=t.allowedTypes}},ew=class extends Ne{gap;timer;timerType;horizontal;lblPos;show;constructor(t){t??={},super(t,61),this.gap=t.gap,this.timerType=t.type,this.timer=new _h(t.timer),this.show=t.show??{days:!0,hours:!0,minutes:!0,seconds:!0},this.horizontal=t.horizontal,this.lblPos=t.lblPos}},La=class extends lr{elems;constructor(t){super(4,t),this.update(t)}update(t){t??={},this.elems??=[],t.elems?.forEach(e=>{let r=tn.getParsedElement(e);r&&this.elems.push(r)})}},Bo=class extends lr{src;sm;lg;constructor(t,e){super(e??1,t),t&&this.update(t)}update(t){this.src=t.src,this.sm=t.sm,this.lg=t.lg}},tn=class kh{static getParsedElements(e){let r=[];return e?.forEach(n=>{let i=kh.getParsedElement(n);i&&r.push(i)}),r}static getParsedElement(e){switch(e.t){case 2:return new Ne(e);case 3:return new Uo(e);case 6:return new Ah(e);case 11:return new rw(e);case 12:return new Ma(e);case 61:return new ew(e);case 4:return new La(e);case 1:return new Bo(e);case 13:return new Bo(e,13);case 14:return new Ne(e,14);case 15:case 16:return new Nh(e.t,e);case 18:return new Uo(e,18);case 62:return new tw(e);case 19:return new Jv(e);default:Xv.default.error("Unknown element type",e.t);return}}static parseAlignmentToJustifyContent(e){switch(e){case 1:return"center";case 2:return"flex-end";case 0:return"flex-start";default:return"flex-start"}}},Ma=class extends lr{img;title;desc;price;compareAt;btn;variantDD;show;symbol;cBox;elems;noLinks;constructor(t){if(t??={},super(12,t),this.show=t.show,this.elems=tn.getParsedElements(t.elems),this.noLinks=t.noLinks,!this.elems.length){t.cBox&&this.elems.push(new Ah(t.cBox)),this.elems.push(new Bo(t.img,13));let e=new Ne(t.title,14);e.hide=!t.show?.title,e.text="{{ product.name }}",this.elems.push(e);let r=new Ne(t.price);r.text="{{ product.price }}",r.hide=!t.show?.price;let n=new Ne(t.compareAt);n.text="{{ product.compare_price }}",n.hide=!t.show?.price,t.compareAt||(n.style=new Dh(r.style),n.style.lg.typo=new Ge(yt(x({},n.style.lg.typo),{td:"line-through"})),n.style.sm.typo=new Ge(yt(x({},n.style.sm.typo),{td:"line-through"})));let i=new La({style:{lg:{spc:{mb:10},flex:{dir:"row",gap:10,ai:"center",jc:tn.parseAlignmentToJustifyContent(r.style.lg.typo?.ta)}}}});i.elems.push(n),i.elems.push(r),this.elems.push(i);let s=new Nh(15,t.variantDD);if(s.hide=!t.show?.variantDD,this.elems.push(s),t.btn){let o=new Uo(t.btn,18);o.hide=!t.show?.btn,this.elems.push(o)}}t.symbol&&(this.symbol=new Ne(t.symbol))}},rw=class extends lr{conf;prod;constructor(t){super(11,t),t??={},this.conf=new nw(t.conf),this.prod=new Ma(t.prod)}},Cl=class extends Oh{disp;maxItems;constructor(t){t??={},super(t),this.disp=t.disp,this.maxItems=t.maxItems}},nw=class{lg;sm;constructor(t){t??={},this.lg=new Cl(t.lg),this.sm=new Cl(t.sm)}},iw=class extends La{constructor(t){super(t)}},Ph=class{cont;elems=[];constructor(t){t=t??{},this.cont=new iw(t.cont),t.elems?.forEach(e=>{this.addRawElement(e)})}addRawElement(t){let e=tn.getParsedElement(t);return e&&this.elems.push(e),e}},sw=class{minValue;rewardType;label;reachingText;reachedText;discount;items;reached;calculatedAlignment;constructor(t){this.reached=t.reached??!1,this.calculatedAlignment=t.calculatedAlignment,this.minValue=t.minValue,this.rewardType=t.rewardType,this.label=t.label,this.reachingText=t.reachingText,this.reachedText=t.reachedText,this.discount=t.discount,this.items=t.items?.map(e=>new un(e))}},ow=class{layout;milestones;totalProgress;coupons;reachedAmountOrCount;onlyLatestGift;noConfetti;removeIneligibleItem;restrictToLatestFreebie;rewardBasis;constructor(t){this.layout=t.layout??wu.ICONS,this.onlyLatestGift=t.onlyLatestGift,this.noConfetti=t.noConfetti,this.removeIneligibleItem=t.removeIneligibleItem??!0,this.restrictToLatestFreebie=t.restrictToLatestFreebie,this.rewardBasis=t.rewardBasis??"CART_AMOUNT",this.update(t)}update(t){t=t??{},this.milestones=t.milestones?.map(e=>new sw(e))??[],this.totalProgress=t.totalProgress??0,this.coupons=t.coupons,this.reachedAmountOrCount=t.reachedAmountOrCount}},aw=class{applyDiscountOnMinimum;constructor(t){this.applyDiscountOnMinimum=t.applyDiscountOnMinimum}},cw=class{id;alt;sources;items;durationMS;thumbnail;constructor(t={}){this.id=t.id,this.alt=t.alt,this.sources=t.sources?.sort((e,r)=>r.height-e.height),this.durationMS=t.durationMS,this.thumbnail=t.thumbnail,this.items=t.items?t.items.map(e=>new Ve(e)):[]}},lw=class{videos;source;template;heading;slidePerViewCount;autoPlay;showMuteButton;footerContent;detailPopup;constructor(t={}){this.videos=t.videos?.map(e=>new cw(e))??[],this.source=t.source,this.template=t.template,this.detailPopup=t.detailPopup??{template:"VIDEO_ONLY_VIEW"},this.heading=t.heading,this.showMuteButton=t.showMuteButton,this.slidePerViewCount=t.slidePerViewCount??4,this.autoPlay=t.autoPlay??"ON",this.footerContent=t.footerContent??"FIRST_ITEM"}},uw=class{modifications;constructor(t={}){t.modifications?.length?this.modifications=t.modifications.map(e=>new Tl(e)):t.experiments?.length&&(this.modifications=t.experiments.map(e=>new Tl(e)))}},Tl=class{cssSelector;type;display;bg;typo;br;text;constructor(t={}){this.cssSelector=t.cssSelector??"",this.type=t.type??"OTHER",this.display=t.display,t.bg&&(this.bg=new re(t.bg)),t.typo&&(this.typo=new Ge(t.typo)),t.br&&(this.br=new Da(t.br)),this.text=t.text}get style(){let t={};return this.display==="HIDE"?t.display="none":this.display==="BLOCK"?t.display="block":this.display==="INLINE"&&(t.display="inline"),this.br?.r&&(t.borderRadius=this.br.r+"px"),this.br?.w&&(t.borderWidth=this.br.w+"px"),this.br?.s&&(t.borderStyle=Aa[this.br.s]?.toLowerCase()),this.br?.c?.h&&(t.borderColor=this.br.color?.rgba),this.bg?.h&&(t.backgroundColor=this.bg.rgba),this.type==="TEXT"&&this.typo&&(this.typo.fs&&(t.fontSize=this.typo.fs+"px"),this.typo.lh&&(t.lineHeight=this.typo.lh),this.typo.fw&&(t.fontWeight=this.typo.fw),this.typo.ta&&(t.textAlign=this.typo.alignment),this.typo.tc.h&&(t.color=this.typo.tc.rgba),this.typo.ls&&(t.letterSpacing=this.typo.letterSpacing),this.typo.td&&(t.textDecoration=this.typo.td??"none")),t}toString(){return`Experiment(cssSelector=${this.cssSelector})`}},hw=class{engagementID;shortID;contentType;delay;onsiteDeliveryType;objective;redirectBehaviour;constructor(t){this.shortID=t.shortID,this.contentType=t.contentType,this.engagementID=t.engagementID,this.delay=t.delay??0,this.redirectBehaviour=t.redirectBehaviour,this.onsiteDeliveryType=t.onsiteDeliveryType,this.objective=t.objective}isAnySplit(){return this.isABTesting()||this.isExclusionTesting()}isExclusionTesting(){return this.contentType===Ai.EXCLUSION}isABTesting(){return this.contentType===Ai.ABTESTING}isSingleContent(){return this.contentType===Ai.SINGLE}},Rh=class{videoConfig;constructor(t){t??={},t.videoConfig&&(this.videoConfig=new lw(t.videoConfig))}},Ar=class Lh extends hw{static SWIPER_ELEMENTS=new Set([11,62]);nudgeID;contentID;variation;ian;widget;discount;placement;promotionType;contentSource;manipulation;klaviyoFormID;hasMultiplePlacement;skipSubscribedItems;progressBarConfig;stickyATCConfig;bundleConfig;content;previewType;occurred;id;currency;props;items;nonMutableItems;embeddedItems;bundleFrom;collections;customerData;experimentConfig;discountData=Sr({});constructor(e){super(e),this.id=e.id,this.nudgeID=e.nudgeID,this.currency=Ot.get().currencyCode??"USD",this.contentID=e.contentID,this.variation=e.variation,e.widget&&(this.widget=new Ph(e.widget)),this.previewType=e.previewType,this.occurred=e.occurred??new Date,this.props=e.props,this.embeddedItems=e.embeddedItems?.map(r=>new un(r)),this.items=e.items?.map(r=>new Ve(r))??[],this.nonMutableItems=e.items?.map(r=>new Ve(r))??[],this.collections=e.collections?.map(r=>new Ov(r))??[],this.discount=e.discount,this.placement=e.placement,this.customerData=e.customerData,this.ian=e.ian?this.processPopup(e.ian):void 0,this.promotionType=e.promotionType,this.manipulation=new Rv(e.manipulation),this.contentSource=e.contentSource,this.klaviyoFormID=e.klaviyoFormID,this.hasMultiplePlacement=e.hasMultiplePlacement,this.skipSubscribedItems=e.skipSubscribedItems,this.stickyATCConfig=e.stickyATCConfig,e.experimentConfig&&(this.experimentConfig=new uw(e.experimentConfig)),e.progressBarConfig&&(this.progressBarConfig=new ow(e.progressBarConfig)),e.bundleConfig&&(this.bundleConfig=new aw(e.bundleConfig)),e.bundleFrom&&(this.bundleFrom=new Ve(e.bundleFrom)),e.content&&(this.content=new Rh(e.content))}shouldDelay(){return this.delay>0}sentryContext(){return{id:this.id,shortID:this.shortID,currency:this.currency,contentType:this.contentType,objective:this.objective,onsiteDeliveryType:this.onsiteDeliveryType,engagementID:this.engagementID,contentID:this.contentID,nudgeID:this.nudgeID,variation:this.variation}}getDelaySeconds(){let e=new Date().getTime()-this.occurred.getTime();return this.delay*1e3-e}isBundle(){return this.objective===Re.BUNDLE_AND_UPSELL}isCartEmbed(){return this.onsiteDeliveryType===lo.CART_EMBED}isPageEmbed(){return this.onsiteDeliveryType===lo.PAGE_EMBED}isProgressBar(){return this.objective===Re.PROGRESS_BAR}isSubscriptionUpsell(){return this.objective===Re.SUBSCRIPTION_UPSELL}isCartRecovery(){return this.objective===Re.CART_RECOVERY}isProductPromotion(){return this.objective===Re.PRODUCT_PROMOTION}isProductPromoted(){return this.isProductPromotion()||this.isBundle()||this.isCartRecovery()}isCollectionPromoted(){return this.isProductPromotion()&&this.collections.length>0&&this.promotionType===yu.COLLECTION}isBYOB(){return this.objective===Re.BYOB}isStickyATC(){return this.objective===Re.STICKY_ATC}isShoppableVideo(){return this.objective===Re.SHOPPABLE_VIDEO}processPopup(e){let r=JSON.stringify(e),n=this.items[0],i={},s={};if(n){let l=n.selectedOrFirstVariant.value;i={name:n.name,id:n.mID,link:n.link,vID:l.mID,image:n.variantImage,price:De(l.price.d),comparePrice:De(l.price.cmp),quantity:n.quantity},s={quantity:l.quantity}}let o={productCount:xt.getCurrent().item_count},c=Fe.render(r,{product:i,variant:s,cart:o,discount:this.discount,customer:this.customerData});return n&&(c=c.replace(new RegExp(H.PLACEHOLDER_IMAGE,"gi"),n.variantImage??n.imageURL)),new zv(JSON.parse(c))}calculateDiscountData(e,r){let n=Ni.sum(e,o=>o.selectedOrFirstVariant.value.price.d),i=Ni.sum(e,o=>{let c=o.selectedOrFirstVariant.value.price;return c.cmp??c.d}),s={actualPrice:n,totalComparePrice:i,discountAmount:0,discountPercentage:0,discountedPrice:n};if(!e?.length||!r||!this.discount?.type){this.discountData.value=this.formatCurrencyAndNumber(s);return}if(ge.BXGY===this.discount.type&&this.discount.values?.length)s.discountPercentage=this.discount.values[0],this.updateEffectivePrice(e,s.discountPercentage,!0),s.discountAmount=s.actualPrice-Ni.sum(e,o=>o.selectedOrFirstVariant.value.effectivePrice.value);else if([ge.UNIQUE_FLAT_ITEMS,ge.STATIC,ge.UNIQUE_FLAT].includes(this.discount.type)&&this.discount.values?.length)s.discountPercentage=this.discount.values[0],s.discountAmount=s.actualPrice*s.discountPercentage/100,this.updateEffectivePrice(e,s.discountPercentage);else if(this.discount.type===ge.UNIQUE_FIXED_ITEMS&&this.discount.values?.length)s.discountAmount=s.actualPrice-this.discount.values[0],s.discountPercentage=s.discountAmount/s.actualPrice*100,this.updateEffectivePrice(e,s.discountPercentage);else if(this.discount.type===ge.UNIQUE_CHEAPEST_ITEM_FREE){e.sort((c,l)=>l.selectedOrFirstVariant.value.price.d-c.selectedOrFirstVariant.value.price.d);let o=e[e.length-1];o.selectedOrFirstVariant.value.effectivePrice.value=0,s.discountAmount=o.selectedOrFirstVariant.value.price.d,s.discountPercentage=s.discountAmount/s.actualPrice*100}s.discountedPrice=s.actualPrice-s.discountAmount,this.discountData.value=this.formatCurrencyAndNumber(s)}getPrivateAttributesForLineItem(){return ne.get().skipItemAttribute?{}:{[H.VIA]:"Cooee",[H.CAMPAIGN_ATTRIBUTE]:this.shortID,[H.CONTENT_ATTRIBUTE]:this.contentID}}getKVFormatPrivateAttributesForLineItem(){return ne.get().skipItemAttribute?[]:[{key:H.VIA,value:"Cooee"},{key:H.CAMPAIGN_ATTRIBUTE,value:this.shortID},{key:H.CONTENT_ATTRIBUTE,value:this.contentID}]}isBundleDiscount(){return[ge.UNIQUE_FIXED_ITEMS,ge.UNIQUE_FLAT_ITEMS].includes(this.discount.type)}isBundleOnCartDrawer(){return this.isBundle()&&this.isCartEmbed()}isBundleOnPDP(){return this.isPageEmbed()&&this.isBundle()}hasSwiperElement(){let e=this.widget?.elems.find(n=>Lh.SWIPER_ELEMENTS.has(n.t));if(!e)return!1;if(e.t===62)return!0;let r=Vn.get().isMobile()?"sm":"lg";return e.conf[r].disp===2}toString(){return`Engagement(id=${this.shortID})`}getCartMagicVariables(){let e=xt.getCurrent();return{productCount:e.item_count,amount:De(e.total_price/100),originalAmount:De(e.original_total_price/100)}}updateEffectivePrice(e,r,n=!1){let i=Ot.get().getCurrentItem();e.forEach(s=>{let o=s.selectedOrFirstVariant.value,c=o.price;if(n&&s.mID===i.mID)o.effectivePrice.value=c.d;else{let l=c.d*r/100;o.effectivePrice.value=c.d-l}})}formatCurrencyAndNumber(e){if(!e)return{};let r={discountPercentage:Cv(e.discountPercentage??0),discountCode:this.discount?.code};return["actualPrice","discountAmount","discountedPrice","totalComparePrice"].map(n=>{r[n]=De(e[n])}),r}};function pw(t,e){return e={exports:{}},t(e,e.exports),e.exports}var dw=yw,fw=ww,gw=Ew,Ae=[],ue=[],mw=typeof Uint8Array<"u"?Uint8Array:Array,Bs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(pr=0,xl=Bs.length;pr<xl;++pr)Ae[pr]=Bs[pr],ue[Bs.charCodeAt(pr)]=pr;var pr,xl;ue[45]=62;ue[95]=63;function Mh(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function yw(t){var e=Mh(t),r=e[0],n=e[1];return(r+n)*3/4-n}function vw(t,e,r){return(e+r)*3/4-r}function ww(t){var e,r=Mh(t),n=r[0],i=r[1],s=new mw(vw(t,n,i)),o=0,c=i>0?n-4:n,l;for(l=0;l<c;l+=4)e=ue[t.charCodeAt(l)]<<18|ue[t.charCodeAt(l+1)]<<12|ue[t.charCodeAt(l+2)]<<6|ue[t.charCodeAt(l+3)],s[o++]=e>>16&255,s[o++]=e>>8&255,s[o++]=e&255;return i===2&&(e=ue[t.charCodeAt(l)]<<2|ue[t.charCodeAt(l+1)]>>4,s[o++]=e&255),i===1&&(e=ue[t.charCodeAt(l)]<<10|ue[t.charCodeAt(l+1)]<<4|ue[t.charCodeAt(l+2)]>>2,s[o++]=e>>8&255,s[o++]=e&255),s}function bw(t){return Ae[t>>18&63]+Ae[t>>12&63]+Ae[t>>6&63]+Ae[t&63]}function _w(t,e,r){for(var n,i=[],s=e;s<r;s+=3)n=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),i.push(bw(n));return i.join("")}function Ew(t){for(var e,r=t.length,n=r%3,i=[],s=16383,o=0,c=r-n;o<c;o+=s)i.push(_w(t,o,o+s>c?c:o+s));return n===1?(e=t[r-1],i.push(Ae[e>>2]+Ae[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(Ae[e>>10]+Ae[e>>4&63]+Ae[e<<2&63]+"=")),i.join("")}var js={byteLength:dw,toByteArray:fw,fromByteArray:gw},Sw=function(t,e,r,n,i){var s,o,c=i*8-n-1,l=(1<<c)-1,p=l>>1,d=-7,h=r?i-1:0,b=r?-1:1,v=t[e+h];for(h+=b,s=v&(1<<-d)-1,v>>=-d,d+=c;d>0;s=s*256+t[e+h],h+=b,d-=8);for(o=s&(1<<-d)-1,s>>=-d,d+=n;d>0;o=o*256+t[e+h],h+=b,d-=8);if(s===0)s=1-p;else{if(s===l)return o?NaN:(v?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-p}return(v?-1:1)*o*Math.pow(2,s-n)},Iw=function(t,e,r,n,i,s){var o,c,l,p=s*8-i-1,d=(1<<p)-1,h=d>>1,b=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=n?0:s-1,w=n?1:-1,_=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,o=d):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+h>=1?e+=b/l:e+=b*Math.pow(2,1-h),e*l>=2&&(o++,l/=2),o+h>=d?(c=0,o=d):o+h>=1?(c=(e*l-1)*Math.pow(2,i),o=o+h):(c=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[r+v]=c&255,v+=w,c/=256,i-=8);for(o=o<<i|c,p+=i;p>0;t[r+v]=o&255,v+=w,o/=256,p-=8);t[r+v-w]|=_*128},Ur={read:Sw,write:Iw},ps=pw(function(t,e){var r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=o,e.SlowBuffer=A,e.INSPECT_MAX_BYTES=50;var n=2147483647;e.kMaxLength=n,o.TYPED_ARRAY_SUPPORT=i(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var a=new Uint8Array(1),u={foo:function(){return 42}};return Object.setPrototypeOf(u,Uint8Array.prototype),Object.setPrototypeOf(a,u),a.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function s(a){if(a>n)throw new RangeError('The value "'+a+'" is invalid for option "size"');var u=new Uint8Array(a);return Object.setPrototypeOf(u,o.prototype),u}function o(a,u,f){if(typeof a=="number"){if(typeof u=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(a)}return c(a,u,f)}o.poolSize=8192;function c(a,u,f){if(typeof a=="string")return h(a,u);if(ArrayBuffer.isView(a))return v(a);if(a==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(a));if(ae(a,ArrayBuffer)||a&&ae(a.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ae(a,SharedArrayBuffer)||a&&ae(a.buffer,SharedArrayBuffer)))return w(a,u,f);if(typeof a=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var E=a.valueOf&&a.valueOf();if(E!=null&&E!==a)return o.from(E,u,f);var D=_(a);if(D)return D;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof a[Symbol.toPrimitive]=="function")return o.from(a[Symbol.toPrimitive]("string"),u,f);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(a))}o.from=function(a,u,f){return c(a,u,f)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function l(a){if(typeof a!="number")throw new TypeError('"size" argument must be of type number');if(a<0)throw new RangeError('The value "'+a+'" is invalid for option "size"')}function p(a,u,f){return l(a),a<=0?s(a):u!==void 0?typeof f=="string"?s(a).fill(u,f):s(a).fill(u):s(a)}o.alloc=function(a,u,f){return p(a,u,f)};function d(a){return l(a),s(a<0?0:k(a)|0)}o.allocUnsafe=function(a){return d(a)},o.allocUnsafeSlow=function(a){return d(a)};function h(a,u){if((typeof u!="string"||u==="")&&(u="utf8"),!o.isEncoding(u))throw new TypeError("Unknown encoding: "+u);var f=B(a,u)|0,E=s(f),D=E.write(a,u);return D!==f&&(E=E.slice(0,D)),E}function b(a){for(var u=a.length<0?0:k(a.length)|0,f=s(u),E=0;E<u;E+=1)f[E]=a[E]&255;return f}function v(a){if(ae(a,Uint8Array)){var u=new Uint8Array(a);return w(u.buffer,u.byteOffset,u.byteLength)}return b(a)}function w(a,u,f){if(u<0||a.byteLength<u)throw new RangeError('"offset" is outside of buffer bounds');if(a.byteLength<u+(f||0))throw new RangeError('"length" is outside of buffer bounds');var E;return u===void 0&&f===void 0?E=new Uint8Array(a):f===void 0?E=new Uint8Array(a,u):E=new Uint8Array(a,u,f),Object.setPrototypeOf(E,o.prototype),E}function _(a){if(o.isBuffer(a)){var u=k(a.length)|0,f=s(u);return f.length===0||a.copy(f,0,0,u),f}if(a.length!==void 0)return typeof a.length!="number"||fn(a.length)?s(0):b(a);if(a.type==="Buffer"&&Array.isArray(a.data))return b(a.data)}function k(a){if(a>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return a|0}function A(a){return+a!=a&&(a=0),o.alloc(+a)}o.isBuffer=function(a){return a!=null&&a._isBuffer===!0&&a!==o.prototype},o.compare=function(a,u){if(ae(a,Uint8Array)&&(a=o.from(a,a.offset,a.byteLength)),ae(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),!o.isBuffer(a)||!o.isBuffer(u))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(a===u)return 0;for(var f=a.length,E=u.length,D=0,M=Math.min(f,E);D<M;++D)if(a[D]!==u[D]){f=a[D],E=u[D];break}return f<E?-1:E<f?1:0},o.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(a,u){if(!Array.isArray(a))throw new TypeError('"list" argument must be an Array of Buffers');if(a.length===0)return o.alloc(0);var f;if(u===void 0)for(u=0,f=0;f<a.length;++f)u+=a[f].length;var E=o.allocUnsafe(u),D=0;for(f=0;f<a.length;++f){var M=a[f];if(ae(M,Uint8Array))D+M.length>E.length?o.from(M).copy(E,D):Uint8Array.prototype.set.call(E,M,D);else if(o.isBuffer(M))M.copy(E,D);else throw new TypeError('"list" argument must be an Array of Buffers');D+=M.length}return E};function B(a,u){if(o.isBuffer(a))return a.length;if(ArrayBuffer.isView(a)||ae(a,ArrayBuffer))return a.byteLength;if(typeof a!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(a));var f=a.length,E=arguments.length>2&&arguments[2]===!0;if(!E&&f===0)return 0;for(var D=!1;;)switch(u){case"ascii":case"latin1":case"binary":return f;case"utf8":case"utf-8":return dn(a).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f*2;case"hex":return f>>>1;case"base64":return hi(a).length;default:if(D)return E?-1:dn(a).length;u=(""+u).toLowerCase(),D=!0}}o.byteLength=B;function G(a,u,f){var E=!1;if((u===void 0||u<0)&&(u=0),u>this.length||((f===void 0||f>this.length)&&(f=this.length),f<=0)||(f>>>=0,u>>>=0,f<=u))return"";for(a||(a="utf8");;)switch(a){case"hex":return Gt(this,u,f);case"utf8":case"utf-8":return kt(this,u,f);case"ascii":return Wt(this,u,f);case"latin1":case"binary":return ft(this,u,f);case"base64":return lt(this,u,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return st(this,u,f);default:if(E)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase(),E=!0}}o.prototype._isBuffer=!0;function j(a,u,f){var E=a[u];a[u]=a[f],a[f]=E}o.prototype.swap16=function(){var a=this.length;if(a%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var u=0;u<a;u+=2)j(this,u,u+1);return this},o.prototype.swap32=function(){var a=this.length;if(a%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var u=0;u<a;u+=4)j(this,u,u+3),j(this,u+1,u+2);return this},o.prototype.swap64=function(){var a=this.length;if(a%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var u=0;u<a;u+=8)j(this,u,u+7),j(this,u+1,u+6),j(this,u+2,u+5),j(this,u+3,u+4);return this},o.prototype.toString=function(){var a=this.length;return a===0?"":arguments.length===0?kt(this,0,a):G.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(a){if(!o.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?!0:o.compare(this,a)===0},o.prototype.inspect=function(){var a="",u=e.INSPECT_MAX_BYTES;return a=this.toString("hex",0,u).replace(/(.{2})/g,"$1 ").trim(),this.length>u&&(a+=" ... "),"<Buffer "+a+">"},r&&(o.prototype[r]=o.prototype.inspect),o.prototype.compare=function(a,u,f,E,D){if(ae(a,Uint8Array)&&(a=o.from(a,a.offset,a.byteLength)),!o.isBuffer(a))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(a));if(u===void 0&&(u=0),f===void 0&&(f=a?a.length:0),E===void 0&&(E=0),D===void 0&&(D=this.length),u<0||f>a.length||E<0||D>this.length)throw new RangeError("out of range index");if(E>=D&&u>=f)return 0;if(E>=D)return-1;if(u>=f)return 1;if(u>>>=0,f>>>=0,E>>>=0,D>>>=0,this===a)return 0;for(var M=D-E,Y=f-u,ut=Math.min(M,Y),Nt=this.slice(E,D),gt=a.slice(u,f),St=0;St<ut;++St)if(Nt[St]!==gt[St]){M=Nt[St],Y=gt[St];break}return M<Y?-1:Y<M?1:0};function X(a,u,f,E,D){if(a.length===0)return-1;if(typeof f=="string"?(E=f,f=0):f>2147483647?f=2147483647:f<-2147483648&&(f=-2147483648),f=+f,fn(f)&&(f=D?0:a.length-1),f<0&&(f=a.length+f),f>=a.length){if(D)return-1;f=a.length-1}else if(f<0)if(D)f=0;else return-1;if(typeof u=="string"&&(u=o.from(u,E)),o.isBuffer(u))return u.length===0?-1:_t(a,u,f,E,D);if(typeof u=="number")return u=u&255,typeof Uint8Array.prototype.indexOf=="function"?D?Uint8Array.prototype.indexOf.call(a,u,f):Uint8Array.prototype.lastIndexOf.call(a,u,f):_t(a,[u],f,E,D);throw new TypeError("val must be string, number or Buffer")}function _t(a,u,f,E,D){var M=1,Y=a.length,ut=u.length;if(E!==void 0&&(E=String(E).toLowerCase(),E==="ucs2"||E==="ucs-2"||E==="utf16le"||E==="utf-16le")){if(a.length<2||u.length<2)return-1;M=2,Y/=2,ut/=2,f/=2}function Nt(gn,mn){return M===1?gn[mn]:gn.readUInt16BE(mn*M)}var gt;if(D){var St=-1;for(gt=f;gt<Y;gt++)if(Nt(a,gt)===Nt(u,St===-1?0:gt-St)){if(St===-1&&(St=gt),gt-St+1===ut)return St*M}else St!==-1&&(gt-=gt-St),St=-1}else for(f+ut>Y&&(f=Y-ut),gt=f;gt>=0;gt--){for(var Ut=!0,hr=0;hr<ut;hr++)if(Nt(a,gt+hr)!==Nt(u,hr)){Ut=!1;break}if(Ut)return gt}return-1}o.prototype.includes=function(a,u,f){return this.indexOf(a,u,f)!==-1},o.prototype.indexOf=function(a,u,f){return X(this,a,u,f,!0)},o.prototype.lastIndexOf=function(a,u,f){return X(this,a,u,f,!1)};function Dt(a,u,f,E){f=Number(f)||0;var D=a.length-f;E?(E=Number(E),E>D&&(E=D)):E=D;var M=u.length;E>M/2&&(E=M/2);for(var Y=0;Y<E;++Y){var ut=parseInt(u.substr(Y*2,2),16);if(fn(ut))return Y;a[f+Y]=ut}return Y}function q(a,u,f,E){return Lr(dn(u,a.length-f),a,f,E)}function rt(a,u,f,E){return Lr(Ss(u),a,f,E)}function Q(a,u,f,E){return Lr(hi(u),a,f,E)}function tt(a,u,f,E){return Lr(Is(u,a.length-f),a,f,E)}o.prototype.write=function(a,u,f,E){if(u===void 0)E="utf8",f=this.length,u=0;else if(f===void 0&&typeof u=="string")E=u,f=this.length,u=0;else if(isFinite(u))u=u>>>0,isFinite(f)?(f=f>>>0,E===void 0&&(E="utf8")):(E=f,f=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var D=this.length-u;if((f===void 0||f>D)&&(f=D),a.length>0&&(f<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");E||(E="utf8");for(var M=!1;;)switch(E){case"hex":return Dt(this,a,u,f);case"utf8":case"utf-8":return q(this,a,u,f);case"ascii":case"latin1":case"binary":return rt(this,a,u,f);case"base64":return Q(this,a,u,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return tt(this,a,u,f);default:if(M)throw new TypeError("Unknown encoding: "+E);E=(""+E).toLowerCase(),M=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function lt(a,u,f){return u===0&&f===a.length?js.fromByteArray(a):js.fromByteArray(a.slice(u,f))}function kt(a,u,f){f=Math.min(a.length,f);for(var E=[],D=u;D<f;){var M=a[D],Y=null,ut=M>239?4:M>223?3:M>191?2:1;if(D+ut<=f){var Nt,gt,St,Ut;switch(ut){case 1:M<128&&(Y=M);break;case 2:Nt=a[D+1],(Nt&192)===128&&(Ut=(M&31)<<6|Nt&63,Ut>127&&(Y=Ut));break;case 3:Nt=a[D+1],gt=a[D+2],(Nt&192)===128&&(gt&192)===128&&(Ut=(M&15)<<12|(Nt&63)<<6|gt&63,Ut>2047&&(Ut<55296||Ut>57343)&&(Y=Ut));break;case 4:Nt=a[D+1],gt=a[D+2],St=a[D+3],(Nt&192)===128&&(gt&192)===128&&(St&192)===128&&(Ut=(M&15)<<18|(Nt&63)<<12|(gt&63)<<6|St&63,Ut>65535&&Ut<1114112&&(Y=Ut))}}Y===null?(Y=65533,ut=1):Y>65535&&(Y-=65536,E.push(Y>>>10&1023|55296),Y=56320|Y&1023),E.push(Y),D+=ut}return jt(E)}var At=4096;function jt(a){var u=a.length;if(u<=At)return String.fromCharCode.apply(String,a);for(var f="",E=0;E<u;)f+=String.fromCharCode.apply(String,a.slice(E,E+=At));return f}function Wt(a,u,f){var E="";f=Math.min(a.length,f);for(var D=u;D<f;++D)E+=String.fromCharCode(a[D]&127);return E}function ft(a,u,f){var E="";f=Math.min(a.length,f);for(var D=u;D<f;++D)E+=String.fromCharCode(a[D]);return E}function Gt(a,u,f){var E=a.length;(!u||u<0)&&(u=0),(!f||f<0||f>E)&&(f=E);for(var D="",M=u;M<f;++M)D+=Cs[a[M]];return D}function st(a,u,f){for(var E=a.slice(u,f),D="",M=0;M<E.length-1;M+=2)D+=String.fromCharCode(E[M]+E[M+1]*256);return D}o.prototype.slice=function(a,u){var f=this.length;a=~~a,u=u===void 0?f:~~u,a<0?(a+=f,a<0&&(a=0)):a>f&&(a=f),u<0?(u+=f,u<0&&(u=0)):u>f&&(u=f),u<a&&(u=a);var E=this.subarray(a,u);return Object.setPrototypeOf(E,o.prototype),E};function et(a,u,f){if(a%1!==0||a<0)throw new RangeError("offset is not uint");if(a+u>f)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(a,u,f){a=a>>>0,u=u>>>0,f||et(a,u,this.length);for(var E=this[a],D=1,M=0;++M<u&&(D*=256);)E+=this[a+M]*D;return E},o.prototype.readUintBE=o.prototype.readUIntBE=function(a,u,f){a=a>>>0,u=u>>>0,f||et(a,u,this.length);for(var E=this[a+--u],D=1;u>0&&(D*=256);)E+=this[a+--u]*D;return E},o.prototype.readUint8=o.prototype.readUInt8=function(a,u){return a=a>>>0,u||et(a,1,this.length),this[a]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(a,u){return a=a>>>0,u||et(a,2,this.length),this[a]|this[a+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(a,u){return a=a>>>0,u||et(a,2,this.length),this[a]<<8|this[a+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(a,u){return a=a>>>0,u||et(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+this[a+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(a,u){return a=a>>>0,u||et(a,4,this.length),this[a]*16777216+(this[a+1]<<16|this[a+2]<<8|this[a+3])},o.prototype.readIntLE=function(a,u,f){a=a>>>0,u=u>>>0,f||et(a,u,this.length);for(var E=this[a],D=1,M=0;++M<u&&(D*=256);)E+=this[a+M]*D;return D*=128,E>=D&&(E-=Math.pow(2,8*u)),E},o.prototype.readIntBE=function(a,u,f){a=a>>>0,u=u>>>0,f||et(a,u,this.length);for(var E=u,D=1,M=this[a+--E];E>0&&(D*=256);)M+=this[a+--E]*D;return D*=128,M>=D&&(M-=Math.pow(2,8*u)),M},o.prototype.readInt8=function(a,u){return a=a>>>0,u||et(a,1,this.length),this[a]&128?(255-this[a]+1)*-1:this[a]},o.prototype.readInt16LE=function(a,u){a=a>>>0,u||et(a,2,this.length);var f=this[a]|this[a+1]<<8;return f&32768?f|4294901760:f},o.prototype.readInt16BE=function(a,u){a=a>>>0,u||et(a,2,this.length);var f=this[a+1]|this[a]<<8;return f&32768?f|4294901760:f},o.prototype.readInt32LE=function(a,u){return a=a>>>0,u||et(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},o.prototype.readInt32BE=function(a,u){return a=a>>>0,u||et(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},o.prototype.readFloatLE=function(a,u){return a=a>>>0,u||et(a,4,this.length),Ur.read(this,a,!0,23,4)},o.prototype.readFloatBE=function(a,u){return a=a>>>0,u||et(a,4,this.length),Ur.read(this,a,!1,23,4)},o.prototype.readDoubleLE=function(a,u){return a=a>>>0,u||et(a,8,this.length),Ur.read(this,a,!0,52,8)},o.prototype.readDoubleBE=function(a,u){return a=a>>>0,u||et(a,8,this.length),Ur.read(this,a,!1,52,8)};function $t(a,u,f,E,D,M){if(!o.isBuffer(a))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>D||u<M)throw new RangeError('"value" argument is out of bounds');if(f+E>a.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(a,u,f,E){if(a=+a,u=u>>>0,f=f>>>0,!E){var D=Math.pow(2,8*f)-1;$t(this,a,u,f,D,0)}var M=1,Y=0;for(this[u]=a&255;++Y<f&&(M*=256);)this[u+Y]=a/M&255;return u+f},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(a,u,f,E){if(a=+a,u=u>>>0,f=f>>>0,!E){var D=Math.pow(2,8*f)-1;$t(this,a,u,f,D,0)}var M=f-1,Y=1;for(this[u+M]=a&255;--M>=0&&(Y*=256);)this[u+M]=a/Y&255;return u+f},o.prototype.writeUint8=o.prototype.writeUInt8=function(a,u,f){return a=+a,u=u>>>0,f||$t(this,a,u,1,255,0),this[u]=a&255,u+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(a,u,f){return a=+a,u=u>>>0,f||$t(this,a,u,2,65535,0),this[u]=a&255,this[u+1]=a>>>8,u+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(a,u,f){return a=+a,u=u>>>0,f||$t(this,a,u,2,65535,0),this[u]=a>>>8,this[u+1]=a&255,u+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(a,u,f){return a=+a,u=u>>>0,f||$t(this,a,u,4,4294967295,0),this[u+3]=a>>>24,this[u+2]=a>>>16,this[u+1]=a>>>8,this[u]=a&255,u+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(a,u,f){return a=+a,u=u>>>0,f||$t(this,a,u,4,4294967295,0),this[u]=a>>>24,this[u+1]=a>>>16,this[u+2]=a>>>8,this[u+3]=a&255,u+4},o.prototype.writeIntLE=function(a,u,f,E){if(a=+a,u=u>>>0,!E){var D=Math.pow(2,8*f-1);$t(this,a,u,f,D-1,-D)}var M=0,Y=1,ut=0;for(this[u]=a&255;++M<f&&(Y*=256);)a<0&&ut===0&&this[u+M-1]!==0&&(ut=1),this[u+M]=(a/Y>>0)-ut&255;return u+f},o.prototype.writeIntBE=function(a,u,f,E){if(a=+a,u=u>>>0,!E){var D=Math.pow(2,8*f-1);$t(this,a,u,f,D-1,-D)}var M=f-1,Y=1,ut=0;for(this[u+M]=a&255;--M>=0&&(Y*=256);)a<0&&ut===0&&this[u+M+1]!==0&&(ut=1),this[u+M]=(a/Y>>0)-ut&255;return u+f},o.prototype.writeInt8=function(a,u,f){return a=+a,u=u>>>0,f||$t(this,a,u,1,127,-128),a<0&&(a=255+a+1),this[u]=a&255,u+1},o.prototype.writeInt16LE=function(a,u,f){return a=+a,u=u>>>0,f||$t(this,a,u,2,32767,-32768),this[u]=a&255,this[u+1]=a>>>8,u+2},o.prototype.writeInt16BE=function(a,u,f){return a=+a,u=u>>>0,f||$t(this,a,u,2,32767,-32768),this[u]=a>>>8,this[u+1]=a&255,u+2},o.prototype.writeInt32LE=function(a,u,f){return a=+a,u=u>>>0,f||$t(this,a,u,4,2147483647,-2147483648),this[u]=a&255,this[u+1]=a>>>8,this[u+2]=a>>>16,this[u+3]=a>>>24,u+4},o.prototype.writeInt32BE=function(a,u,f){return a=+a,u=u>>>0,f||$t(this,a,u,4,2147483647,-2147483648),a<0&&(a=4294967295+a+1),this[u]=a>>>24,this[u+1]=a>>>16,this[u+2]=a>>>8,this[u+3]=a&255,u+4};function ci(a,u,f,E,D,M){if(f+E>a.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("Index out of range")}function li(a,u,f,E,D){return u=+u,f=f>>>0,D||ci(a,u,f,4),Ur.write(a,u,f,E,23,4),f+4}o.prototype.writeFloatLE=function(a,u,f){return li(this,a,u,!0,f)},o.prototype.writeFloatBE=function(a,u,f){return li(this,a,u,!1,f)};function oe(a,u,f,E,D){return u=+u,f=f>>>0,D||ci(a,u,f,8),Ur.write(a,u,f,E,52,8),f+8}o.prototype.writeDoubleLE=function(a,u,f){return oe(this,a,u,!0,f)},o.prototype.writeDoubleBE=function(a,u,f){return oe(this,a,u,!1,f)},o.prototype.copy=function(a,u,f,E){if(!o.isBuffer(a))throw new TypeError("argument should be a Buffer");if(f||(f=0),!E&&E!==0&&(E=this.length),u>=a.length&&(u=a.length),u||(u=0),E>0&&E<f&&(E=f),E===f||a.length===0||this.length===0)return 0;if(u<0)throw new RangeError("targetStart out of bounds");if(f<0||f>=this.length)throw new RangeError("Index out of range");if(E<0)throw new RangeError("sourceEnd out of bounds");E>this.length&&(E=this.length),a.length-u<E-f&&(E=a.length-u+f);var D=E-f;return this===a&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(u,f,E):Uint8Array.prototype.set.call(a,this.subarray(f,E),u),D},o.prototype.fill=function(a,u,f,E){if(typeof a=="string"){if(typeof u=="string"?(E=u,u=0,f=this.length):typeof f=="string"&&(E=f,f=this.length),E!==void 0&&typeof E!="string")throw new TypeError("encoding must be a string");if(typeof E=="string"&&!o.isEncoding(E))throw new TypeError("Unknown encoding: "+E);if(a.length===1){var D=a.charCodeAt(0);(E==="utf8"&&D<128||E==="latin1")&&(a=D)}}else typeof a=="number"?a=a&255:typeof a=="boolean"&&(a=Number(a));if(u<0||this.length<u||this.length<f)throw new RangeError("Out of range index");if(f<=u)return this;u=u>>>0,f=f===void 0?this.length:f>>>0,a||(a=0);var M;if(typeof a=="number")for(M=u;M<f;++M)this[M]=a;else{var Y=o.isBuffer(a)?a:o.from(a,E),ut=Y.length;if(ut===0)throw new TypeError('The value "'+a+'" is invalid for argument "value"');for(M=0;M<f-u;++M)this[M+u]=Y[M%ut]}return this};var ui=/[^+/0-9A-Za-z-_]/g;function Es(a){if(a=a.split("=")[0],a=a.trim().replace(ui,""),a.length<2)return"";for(;a.length%4!==0;)a=a+"=";return a}function dn(a,u){u=u||1/0;for(var f,E=a.length,D=null,M=[],Y=0;Y<E;++Y){if(f=a.charCodeAt(Y),f>55295&&f<57344){if(!D){if(f>56319){(u-=3)>-1&&M.push(239,191,189);continue}else if(Y+1===E){(u-=3)>-1&&M.push(239,191,189);continue}D=f;continue}if(f<56320){(u-=3)>-1&&M.push(239,191,189),D=f;continue}f=(D-55296<<10|f-56320)+65536}else D&&(u-=3)>-1&&M.push(239,191,189);if(D=null,f<128){if((u-=1)<0)break;M.push(f)}else if(f<2048){if((u-=2)<0)break;M.push(f>>6|192,f&63|128)}else if(f<65536){if((u-=3)<0)break;M.push(f>>12|224,f>>6&63|128,f&63|128)}else if(f<1114112){if((u-=4)<0)break;M.push(f>>18|240,f>>12&63|128,f>>6&63|128,f&63|128)}else throw new Error("Invalid code point")}return M}function Ss(a){for(var u=[],f=0;f<a.length;++f)u.push(a.charCodeAt(f)&255);return u}function Is(a,u){for(var f,E,D,M=[],Y=0;Y<a.length&&!((u-=2)<0);++Y)f=a.charCodeAt(Y),E=f>>8,D=f%256,M.push(D),M.push(E);return M}function hi(a){return js.toByteArray(Es(a))}function Lr(a,u,f,E){for(var D=0;D<E&&!(D+f>=u.length||D>=a.length);++D)u[D+f]=a[D];return D}function ae(a,u){return a instanceof u||a!=null&&a.constructor!=null&&a.constructor.name!=null&&a.constructor.name===u.name}function fn(a){return a!==a}var Cs=function(){for(var a="0123456789abcdef",u=new Array(256),f=0;f<16;++f)for(var E=f*16,D=0;D<16;++D)u[E+D]=a[f]+a[D];return u}()}),ct=ps.Buffer;ps.SlowBuffer;ps.INSPECT_MAX_BYTES;ps.kMaxLength;var jo=function(t,e){return jo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},jo(t,e)};function ds(t,e){jo(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var _r=function(t){ds(e,t);function e(r){var n=t.call(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),e}(Error),Tt=function(t){ds(e,t);function e(r){var n=t.call(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),e}(TypeError);function Si(t){return t&&t.Math==Math&&t}function Uh(){return Si(typeof globalThis=="object"&&globalThis)||Si(typeof window=="object"&&window)||Si(typeof self=="object"&&self)||Si(typeof global=="object"&&global)||Function("return this")()}function Cw(){var t=Uh();return typeof t.navigator=="object"&&t.navigator.product==="ReactNative"}var Tw=function(t){var e=Cw()?"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 r=ct.alloc(t),n=0;n<t;++n)r[n]=Math.floor(Math.random()*256);return r},xw=function(){{if(typeof window<"u"){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(ct.alloc(e))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(e){return global.crypto.getRandomValues(ct.alloc(e))}:Tw}},Bh=xw();function Dw(t){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(t))}function Ua(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function Aw(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function Nw(t){return ii(t)&&Object.prototype.toString.call(t)==="[object Date]"}function ii(t){return typeof t=="object"&&t!==null}function fs(t,e){var r=!1;function n(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return r||(console.warn(e),r=!0),t.apply(this,i)}return n}function zi(t){if(ArrayBuffer.isView(t))return ct.from(t.buffer,t.byteOffset,t.byteLength);if(Dw(t))return ct.from(t);throw new Tt("Must use either Buffer or TypedArray")}var Ow=/^(?:[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,jh=function(t){return typeof t=="string"&&Ow.test(t)},$o=function(t){if(!jh(t))throw new Tt('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 ct.from(e,"hex")},Dl=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")},yE=Math.pow(2,63)-1,vE=-Math.pow(2,63),kw=Math.pow(2,53),Pw=-Math.pow(2,53),$h=4,Er=function(){function t(e,r){if(!(this instanceof t))return new t(e,r);if(e!=null&&typeof e!="string"&&!ArrayBuffer.isView(e)&&!(e instanceof ArrayBuffer)&&!Array.isArray(e))throw new Tt("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=r??t.BSON_BINARY_SUBTYPE_DEFAULT,e==null?(this.buffer=ct.alloc(t.BUFFER_SIZE),this.position=0):(typeof e=="string"?this.buffer=ct.from(e,"binary"):Array.isArray(e)?this.buffer=ct.from(e):this.buffer=zi(e),this.position=this.buffer.byteLength)}return t.prototype.put=function(e){if(typeof e=="string"&&e.length!==1)throw new Tt("only accepts single character String");if(typeof e!="number"&&e.length!==1)throw new Tt("only accepts single character Uint8Array or Array");var r;if(typeof e=="string"?r=e.charCodeAt(0):typeof e=="number"?r=e:r=e[0],r<0||r>255)throw new Tt("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=r;else{var n=ct.alloc(t.BUFFER_SIZE+this.buffer.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n,this.buffer[this.position++]=r}},t.prototype.write=function(e,r){if(r=typeof r=="number"?r:this.position,this.buffer.length<r+e.length){var n=ct.alloc(this.buffer.length+e.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n}ArrayBuffer.isView(e)?(this.buffer.set(zi(e),r),this.position=r+e.byteLength>this.position?r+e.length:this.position):typeof e=="string"&&(this.buffer.write(e,r,e.length,"binary"),this.position=r+e.length>this.position?r+e.length:this.position)},t.prototype.read=function(e,r){return r=r&&r>0?r:this.position,this.buffer.slice(e,e+r)},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 r=this.buffer.toString("base64"),n=Number(this.sub_type).toString(16);return e.legacy?{$binary:r,$type:n.length===1?"0"+n:n}:{$binary:{base64:r,subType:n.length===1?"0"+n:n}}},t.prototype.toUUID=function(){if(this.sub_type===t.SUBTYPE_UUID)return new Al(this.buffer.slice(0,this.position));throw new _r('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,r){r=r||{};var n,i;if("$binary"in e?r.legacy&&typeof e.$binary=="string"&&"$type"in e?(i=e.$type?parseInt(e.$type,16):0,n=ct.from(e.$binary,"base64")):typeof e.$binary!="string"&&(i=e.$binary.subType?parseInt(e.$binary.subType,16):0,n=ct.from(e.$binary.base64,"base64")):"$uuid"in e&&(i=4,n=$o(e.$uuid)),!n)throw new Tt("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return i===$h?new Al(n):new t(n,i)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},t.BSON_BINARY_SUBTYPE_DEFAULT=0,t.BUFFER_SIZE=256,t.SUBTYPE_DEFAULT=0,t.SUBTYPE_FUNCTION=1,t.SUBTYPE_BYTE_ARRAY=2,t.SUBTYPE_UUID_OLD=3,t.SUBTYPE_UUID=4,t.SUBTYPE_MD5=5,t.SUBTYPE_ENCRYPTED=6,t.SUBTYPE_COLUMN=7,t.SUBTYPE_USER_DEFINED=128,t}();Object.defineProperty(Er.prototype,"_bsontype",{value:"Binary"});var $s=16,Al=function(t){ds(e,t);function e(r){var n=this,i,s;if(r==null)i=e.generate();else if(r instanceof e)i=ct.from(r.buffer),s=r.__id;else if(ArrayBuffer.isView(r)&&r.byteLength===$s)i=zi(r);else if(typeof r=="string")i=$o(r);else throw new Tt("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 n=t.call(this,i,$h)||this,n.__id=s,n}return Object.defineProperty(e.prototype,"id",{get:function(){return this.buffer},set:function(r){this.buffer=r,e.cacheHexString&&(this.__id=Dl(r))},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(r){if(r===void 0&&(r=!0),e.cacheHexString&&this.__id)return this.__id;var n=Dl(this.id,r);return e.cacheHexString&&(this.__id=n),n},e.prototype.toString=function(r){return r?this.id.toString(r):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(r){if(!r)return!1;if(r instanceof e)return r.id.equals(this.id);try{return new e(r).id.equals(this.id)}catch{return!1}},e.prototype.toBinary=function(){return new Er(this.id,Er.SUBTYPE_UUID)},e.generate=function(){var r=Bh($s);return r[6]=r[6]&15|64,r[8]=r[8]&63|128,ct.from(r)},e.isValid=function(r){return r?r instanceof e?!0:typeof r=="string"?jh(r):Ua(r)?r.length!==$s?!1:(r[6]&240)===64&&(r[8]&128)===128:!1:!1},e.createFromHexString=function(r){var n=$o(r);return new e(n)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},e}(Er),gs=function(){function t(e,r){if(!(this instanceof t))return new t(e,r);this.code=e,this.scope=r}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(gs.prototype,"_bsontype",{value:"Code"});function Rw(t){return ii(t)&&t.$id!=null&&typeof t.$ref=="string"&&(t.$db==null||typeof t.$db=="string")}var Gn=function(){function t(e,r,n,i){if(!(this instanceof t))return new t(e,r,n,i);var s=e.split(".");s.length===2&&(n=s.shift(),e=s.shift()),this.collection=e,this.oid=r,this.db=n,this.fields=i||{}}return Object.defineProperty(t.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(e.$db=this.db),e},t.prototype.toExtendedJSON=function(e){e=e||{};var r={$ref:this.collection,$id:this.oid};return e.legacy||(this.db&&(r.$db=this.db),r=Object.assign(r,this.fields)),r},t.fromExtendedJSON=function(e){var r=Object.assign({},e);return delete r.$ref,delete r.$id,delete r.$db,new t(e.$ref,e.$id,e.$db,r)},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(Gn.prototype,"_bsontype",{value:"DBRef"});var le=void 0;try{le=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 Nl=65536,Lw=1<<24,Vr=Nl*Nl,Fh=Vr*Vr,Ol=Fh/2,kl={},Pl={},K=function(){function t(e,r,n){if(e===void 0&&(e=0),!(this instanceof t))return new t(e,r,n);typeof e=="bigint"?Object.assign(this,t.fromBigInt(e,!!r)):typeof e=="string"?Object.assign(this,t.fromString(e,!!r)):(this.low=e|0,this.high=r|0,this.unsigned=!!n),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return t.fromBits=function(e,r,n){return new t(e,r,n)},t.fromInt=function(e,r){var n,i,s;return r?(e>>>=0,(s=0<=e&&e<256)&&(i=Pl[e],i)?i:(n=t.fromBits(e,(e|0)<0?-1:0,!0),s&&(Pl[e]=n),n)):(e|=0,(s=-128<=e&&e<128)&&(i=kl[e],i)?i:(n=t.fromBits(e,e<0?-1:0,!1),s&&(kl[e]=n),n))},t.fromNumber=function(e,r){if(isNaN(e))return r?t.UZERO:t.ZERO;if(r){if(e<0)return t.UZERO;if(e>=Fh)return t.MAX_UNSIGNED_VALUE}else{if(e<=-Ol)return t.MIN_VALUE;if(e+1>=Ol)return t.MAX_VALUE}return e<0?t.fromNumber(-e,r).neg():t.fromBits(e%Vr|0,e/Vr|0,r)},t.fromBigInt=function(e,r){return t.fromString(e.toString(),r)},t.fromString=function(e,r,n){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return t.ZERO;if(typeof r=="number"?(n=r,r=!1):r=!!r,n=n||10,n<2||36<n)throw RangeError("radix");var i;if((i=e.indexOf("-"))>0)throw Error("interior hyphen");if(i===0)return t.fromString(e.substring(1),r,n).neg();for(var s=t.fromNumber(Math.pow(n,8)),o=t.ZERO,c=0;c<e.length;c+=8){var l=Math.min(8,e.length-c),p=parseInt(e.substring(c,c+l),n);if(l<8){var d=t.fromNumber(Math.pow(n,l));o=o.mul(d).add(t.fromNumber(p))}else o=o.mul(s),o=o.add(t.fromNumber(p))}return o.unsigned=r,o},t.fromBytes=function(e,r,n){return n?t.fromBytesLE(e,r):t.fromBytesBE(e,r)},t.fromBytesLE=function(e,r){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,r)},t.fromBytesBE=function(e,r){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],r)},t.isLong=function(e){return ii(e)&&e.__isLong__===!0},t.fromValue=function(e,r){return typeof e=="number"?t.fromNumber(e,r):typeof e=="string"?t.fromString(e,r):t.fromBits(e.low,e.high,typeof r=="boolean"?r:e.unsigned)},t.prototype.add=function(e){t.isLong(e)||(e=t.fromValue(e));var r=this.high>>>16,n=this.high&65535,i=this.low>>>16,s=this.low&65535,o=e.high>>>16,c=e.high&65535,l=e.low>>>16,p=e.low&65535,d=0,h=0,b=0,v=0;return v+=s+p,b+=v>>>16,v&=65535,b+=i+l,h+=b>>>16,b&=65535,h+=n+c,d+=h>>>16,h&=65535,d+=r+o,d&=65535,t.fromBits(b<<16|v,d<<16|h,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 r=this.isNegative(),n=e.isNegative();return r&&!n?-1:!r&&n?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(le){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var r=(this.unsigned?le.div_u:le.div_s)(this.low,this.high,e.low,e.high);return t.fromBits(r,le.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?t.UZERO:t.ZERO;var n,i,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 o=this.shr(1);return n=o.div(e).shl(1),n.eq(t.ZERO)?e.isNegative()?t.ONE:t.NEG_ONE:(i=this.sub(e.mul(n)),s=n.add(i.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(i=this;i.gte(e);){n=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var c=Math.ceil(Math.log(n)/Math.LN2),l=c<=48?1:Math.pow(2,c-48),p=t.fromNumber(n),d=p.mul(e);d.isNegative()||d.gt(i);)n-=l,p=t.fromNumber(n,this.unsigned),d=p.mul(e);p.isZero()&&(p=t.ONE),s=s.add(p),i=i.sub(d)}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,r;for(r=31;r>0&&(e&1<<r)===0;r--);return this.high!==0?r+33:r+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)),le){var r=(this.unsigned?le.rem_u:le.rem_s)(this.low,this.high,e.low,e.high);return t.fromBits(r,le.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)),le){var r=le.mul(this.low,this.high,e.low,e.high);return t.fromBits(r,le.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 n=this.high>>>16,i=this.high&65535,s=this.low>>>16,o=this.low&65535,c=e.high>>>16,l=e.high&65535,p=e.low>>>16,d=e.low&65535,h=0,b=0,v=0,w=0;return w+=o*d,v+=w>>>16,w&=65535,v+=s*d,b+=v>>>16,v&=65535,v+=o*p,b+=v>>>16,v&=65535,b+=i*d,h+=b>>>16,b&=65535,b+=s*p,h+=b>>>16,b&=65535,b+=o*l,h+=b>>>16,b&=65535,h+=n*d+i*p+s*l+o*c,h&=65535,t.fromBits(v<<16|w,h<<16|b,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 r=this.high;if(e<32){var n=this.low;return t.fromBits(n>>>e|r<<32-e,r>>>e,this.unsigned)}else return e===32?t.fromBits(r,0,this.unsigned):t.fromBits(r>>>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)*Vr+(this.low>>>0):this.high*Vr+(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,r=this.low;return[r&255,r>>>8&255,r>>>16&255,r>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]},t.prototype.toBytesBE=function(){var e=this.high,r=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,r>>>24,r>>>16&255,r>>>8&255,r&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 r=t.fromNumber(e),n=this.div(r),i=n.mul(r).sub(this);return n.toString(e)+i.toInt().toString(e)}else return"-"+this.neg().toString(e);for(var s=t.fromNumber(Math.pow(e,6),this.unsigned),o=this,c="";;){var l=o.div(s),p=o.sub(l.mul(s)).toInt()>>>0,d=p.toString(e);if(o=l,o.isZero())return d+c;for(;d.length<6;)d="0"+d;c=""+d+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,r){var n=t.fromString(e.$numberLong);return r&&r.relaxed?n.toNumber():n},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(Lw),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(K.prototype,"__isLong__",{value:!0});Object.defineProperty(K.prototype,"_bsontype",{value:"Long"});var Mw=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,Uw=/^(\+|-)?(Infinity|inf)$/i,Bw=/^(\+|-)?NaN$/i,wn=6111,Fs=-6176,Rl=6176,jw=34,Hs=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Ll=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Ml=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),$w=/^([-+])?(\d+)?$/,Fw=31,Ul=16383,Hw=30,Vw=31;function Bl(t){return!isNaN(parseInt(t,10))}function qw(t){var e=K.fromNumber(1e9),r=K.fromNumber(0);if(!t.parts[0]&&!t.parts[1]&&!t.parts[2]&&!t.parts[3])return{quotient:t,rem:r};for(var n=0;n<=3;n++)r=r.shiftLeft(32),r=r.add(new K(t.parts[n],0)),t.parts[n]=r.div(e).low,r=r.modulo(e);return{quotient:t,rem:r}}function Ww(t,e){if(!t&&!e)return{high:K.fromNumber(0),low:K.fromNumber(0)};var r=t.shiftRightUnsigned(32),n=new K(t.getLowBits(),0),i=e.shiftRightUnsigned(32),s=new K(e.getLowBits(),0),o=r.multiply(i),c=r.multiply(s),l=n.multiply(i),p=n.multiply(s);return o=o.add(c.shiftRightUnsigned(32)),c=new K(c.getLowBits(),0).add(l).add(p.shiftRightUnsigned(32)),o=o.add(c.shiftRightUnsigned(32)),p=c.shiftLeft(32).add(new K(p.getLowBits(),0)),{high:o,low:p}}function Gw(t,e){var r=t.high>>>0,n=e.high>>>0;if(r<n)return!0;if(r===n){var i=t.low>>>0,s=e.low>>>0;if(i<s)return!0}return!1}function Br(t,e){throw new Tt('"'.concat(t,'" is not a valid Decimal128 string - ').concat(e))}var Ba=function(){function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="string")this.bytes=t.fromString(e).bytes;else if(Ua(e)){if(e.byteLength!==16)throw new Tt("Decimal128 must take a Buffer of 16 bytes");this.bytes=e}else throw new Tt("Decimal128 must take a Buffer or string")}return t.fromString=function(e){var r=!1,n=!1,i=!1,s=0,o=0,c=0,l=0,p=0,d=[0],h=0,b=0,v=0,w=0,_=0,k=0,A=new K(0,0),B=new K(0,0),G=0,j=0;if(e.length>=7e3)throw new Tt(""+e+" not a valid Decimal128 string");var X=e.match(Mw),_t=e.match(Uw),Dt=e.match(Bw);if(!X&&!_t&&!Dt||e.length===0)throw new Tt(""+e+" not a valid Decimal128 string");if(X){var q=X[2],rt=X[4],Q=X[5],tt=X[6];rt&&tt===void 0&&Br(e,"missing exponent power"),rt&&q===void 0&&Br(e,"missing exponent base"),rt===void 0&&(Q||tt)&&Br(e,"missing e before exponent")}if((e[j]==="+"||e[j]==="-")&&(r=e[j++]==="-"),!Bl(e[j])&&e[j]!=="."){if(e[j]==="i"||e[j]==="I")return new t(ct.from(r?Ll:Ml));if(e[j]==="N")return new t(ct.from(Hs))}for(;Bl(e[j])||e[j]===".";){if(e[j]==="."){n&&Br(e,"contains multiple periods"),n=!0,j=j+1;continue}h<34&&(e[j]!=="0"||i)&&(i||(p=o),i=!0,d[b++]=parseInt(e[j],10),h=h+1),i&&(c=c+1),n&&(l=l+1),o=o+1,j=j+1}if(n&&!o)throw new Tt(""+e+" not a valid Decimal128 string");if(e[j]==="e"||e[j]==="E"){var lt=e.substr(++j).match($w);if(!lt||!lt[2])return new t(ct.from(Hs));_=parseInt(lt[0],10),j=j+lt[0].length}if(e[j])return new t(ct.from(Hs));if(v=0,!h)v=0,w=0,d[0]=0,c=1,h=1,s=0;else if(w=h-1,s=c,s!==1)for(;d[p+s-1]===0;)s=s-1;for(_<=l&&l-_>16384?_=Fs:_=_-l;_>wn;){if(w=w+1,w-v>jw){var kt=d.join("");if(kt.match(/^0+$/)){_=wn;break}Br(e,"overflow")}_=_-1}for(;_<Fs||h<c;){if(w===0&&s<h){_=Fs,s=0;break}if(h<c?c=c-1:w=w-1,_<wn)_=_+1;else{var kt=d.join("");if(kt.match(/^0+$/)){_=wn;break}Br(e,"overflow")}}if(w-v+1<s){var At=o;n&&(p=p+1,At=At+1),r&&(p=p+1,At=At+1);var jt=parseInt(e[p+w+1],10),Wt=0;if(jt>=5&&(Wt=1,jt===5)){for(Wt=d[w]%2===1?1:0,k=p+w+2;k<At;k++)if(parseInt(e[k],10)){Wt=1;break}}if(Wt){for(var ft=w;ft>=0;ft--)if(++d[ft]>9&&(d[ft]=0,ft===0))if(_<wn)_=_+1,d[ft]=1;else return new t(ct.from(r?Ll:Ml))}}if(A=K.fromNumber(0),B=K.fromNumber(0),s===0)A=K.fromNumber(0),B=K.fromNumber(0);else if(w-v<17){var ft=v;for(B=K.fromNumber(d[ft++]),A=new K(0,0);ft<=w;ft++)B=B.multiply(K.fromNumber(10)),B=B.add(K.fromNumber(d[ft]))}else{var ft=v;for(A=K.fromNumber(d[ft++]);ft<=w-17;ft++)A=A.multiply(K.fromNumber(10)),A=A.add(K.fromNumber(d[ft]));for(B=K.fromNumber(d[ft++]);ft<=w;ft++)B=B.multiply(K.fromNumber(10)),B=B.add(K.fromNumber(d[ft]))}var Gt=Ww(A,K.fromString("100000000000000000"));Gt.low=Gt.low.add(B),Gw(Gt.low,B)&&(Gt.high=Gt.high.add(K.fromNumber(1))),G=_+Rl;var st={low:K.fromNumber(0),high:K.fromNumber(0)};Gt.high.shiftRightUnsigned(49).and(K.fromNumber(1)).equals(K.fromNumber(1))?(st.high=st.high.or(K.fromNumber(3).shiftLeft(61)),st.high=st.high.or(K.fromNumber(G).and(K.fromNumber(16383).shiftLeft(47))),st.high=st.high.or(Gt.high.and(K.fromNumber(0x7fffffffffff)))):(st.high=st.high.or(K.fromNumber(G&16383).shiftLeft(49)),st.high=st.high.or(Gt.high.and(K.fromNumber(562949953421311)))),st.low=Gt.low,r&&(st.high=st.high.or(K.fromString("9223372036854775808")));var et=ct.alloc(16);return j=0,et[j++]=st.low.low&255,et[j++]=st.low.low>>8&255,et[j++]=st.low.low>>16&255,et[j++]=st.low.low>>24&255,et[j++]=st.low.high&255,et[j++]=st.low.high>>8&255,et[j++]=st.low.high>>16&255,et[j++]=st.low.high>>24&255,et[j++]=st.high.low&255,et[j++]=st.high.low>>8&255,et[j++]=st.high.low>>16&255,et[j++]=st.high.low>>24&255,et[j++]=st.high.high&255,et[j++]=st.high.high>>8&255,et[j++]=st.high.high>>16&255,et[j++]=st.high.high>>24&255,new t(et)},t.prototype.toString=function(){for(var e,r=0,n=new Array(36),i=0;i<n.length;i++)n[i]=0;var s=0,o=!1,c,l={parts:[0,0,0,0]},p,d,h=[];s=0;var b=this.bytes,v=b[s++]|b[s++]<<8|b[s++]<<16|b[s++]<<24,w=b[s++]|b[s++]<<8|b[s++]<<16|b[s++]<<24,_=b[s++]|b[s++]<<8|b[s++]<<16|b[s++]<<24,k=b[s++]|b[s++]<<8|b[s++]<<16|b[s++]<<24;s=0;var A={low:new K(v,w),high:new K(_,k)};A.high.lessThan(K.ZERO)&&h.push("-");var B=k>>26&Fw;if(B>>3===3){if(B===Hw)return h.join("")+"Infinity";if(B===Vw)return"NaN";e=k>>15&Ul,c=8+(k>>14&1)}else c=k>>14&7,e=k>>17&Ul;var G=e-Rl;if(l.parts[0]=(k&16383)+((c&15)<<14),l.parts[1]=_,l.parts[2]=w,l.parts[3]=v,l.parts[0]===0&&l.parts[1]===0&&l.parts[2]===0&&l.parts[3]===0)o=!0;else for(d=3;d>=0;d--){var j=0,X=qw(l);if(l=X.quotient,j=X.rem.low,!!j)for(p=8;p>=0;p--)n[d*9+p]=j%10,j=Math.floor(j/10)}if(o)r=1,n[s]=0;else for(r=36;!n[s];)r=r-1,s=s+1;var _t=r-1+G;if(_t>=34||_t<=-7||G>0){if(r>34)return h.push("".concat(0)),G>0?h.push("E+".concat(G)):G<0&&h.push("E".concat(G)),h.join("");h.push("".concat(n[s++])),r=r-1,r&&h.push(".");for(var i=0;i<r;i++)h.push("".concat(n[s++]));h.push("E"),_t>0?h.push("+".concat(_t)):h.push("".concat(_t))}else if(G>=0)for(var i=0;i<r;i++)h.push("".concat(n[s++]));else{var Dt=r+G;if(Dt>0)for(var i=0;i<Dt;i++)h.push("".concat(n[s++]));else h.push("0");for(h.push(".");Dt++<0;)h.push("0");for(var i=0;i<r-Math.max(Dt-1,0);i++)h.push("".concat(n[s++]))}return h.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(Ba.prototype,"_bsontype",{value:"Decimal128"});var ms=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,r){var n=parseFloat(e.$numberDouble);return r&&r.relaxed?n:new t(n)},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(ms.prototype,"_bsontype",{value:"Double"});var ys=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,r){return r&&r.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(ys.prototype,"_bsontype",{value:"Int32"});var ja=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(ja.prototype,"_bsontype",{value:"MaxKey"});var $a=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($a.prototype,"_bsontype",{value:"MinKey"});var zw=new RegExp("^[0-9a-fA-F]{24}$"),dr=null,Se=Symbol("id"),Kt=function(){function t(e){if(!(this instanceof t))return new t(e);var r;if(typeof e=="object"&&e&&"id"in e){if(typeof e.id!="string"&&!ArrayBuffer.isView(e.id))throw new Tt("Argument passed in must have an id that is of type string or Buffer");"toHexString"in e&&typeof e.toHexString=="function"?r=ct.from(e.toHexString(),"hex"):r=e.id}else r=e;if(r==null||typeof r=="number")this[Se]=t.generate(typeof r=="number"?r:void 0);else if(ArrayBuffer.isView(r)&&r.byteLength===12)this[Se]=r instanceof ct?r:zi(r);else if(typeof r=="string")if(r.length===12){var n=ct.from(r);if(n.byteLength===12)this[Se]=n;else throw new Tt("Argument passed in must be a string of 12 bytes")}else if(r.length===24&&zw.test(r))this[Se]=ct.from(r,"hex");else throw new Tt("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new Tt("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[Se]},set:function(e){this[Se]=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 r=t.getInc(),n=ct.alloc(12);return n.writeUInt32BE(e,0),dr===null&&(dr=Bh(5)),n[4]=dr[0],n[5]=dr[1],n[6]=dr[2],n[7]=dr[3],n[8]=dr[4],n[11]=r&255,n[10]=r>>8&255,n[9]=r>>16&255,n},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[Se][11]===e[Se][11]&&this[Se].equals(e[Se]);if(typeof e=="string"&&t.isValid(e)&&e.length===12&&Ua(this.id))return e===ct.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 ct.from(e).equals(this.id);if(typeof e=="object"&&"toHexString"in e&&typeof e.toHexString=="function"){var r=e.toHexString(),n=this.toHexString().toLowerCase();return typeof r=="string"&&r.toLowerCase()===n}return!1},t.prototype.getTimestamp=function(){var e=new Date,r=this.id.readUInt32BE(0);return e.setTime(Math.floor(r)*1e3),e},t.createPk=function(){return new t},t.createFromTime=function(e){var r=ct.from([0,0,0,0,0,0,0,0,0,0,0,0]);return r.writeUInt32BE(e,0),new t(r)},t.createFromHexString=function(e){if(typeof e>"u"||e!=null&&e.length!==24)throw new Tt("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new t(ct.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(Kt.prototype,"generate",{value:fs(function(t){return Kt.generate(t)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(Kt.prototype,"getInc",{value:fs(function(){return Kt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Kt.prototype,"get_inc",{value:fs(function(){return Kt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Kt,"get_inc",{value:fs(function(){return Kt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Kt.prototype,"_bsontype",{value:"ObjectID"});function Yw(t){return t.split("").sort().join("")}var zn=function(){function t(e,r){if(!(this instanceof t))return new t(e,r);if(this.pattern=e,this.options=Yw(r??""),this.pattern.indexOf("\0")!==-1)throw new _r("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new _r("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var n=0;n<this.options.length;n++)if(!(this.options[n]==="i"||this.options[n]==="m"||this.options[n]==="x"||this.options[n]==="l"||this.options[n]==="s"||this.options[n]==="u"))throw new _r("The regular expression option [".concat(this.options[n],"] 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 Tt("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(e)))},t}();Object.defineProperty(zn.prototype,"_bsontype",{value:"BSONRegExp"});var Fa=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(Fa.prototype,"_bsontype",{value:"Symbol"});var Kw=K,Hh=function(t){ds(e,t);function e(r,n){var i=this;return i instanceof e?(K.isLong(r)?i=t.call(this,r.low,r.high,!0)||this:ii(r)&&typeof r.t<"u"&&typeof r.i<"u"?i=t.call(this,r.i,r.t,!0)||this:i=t.call(this,r,n,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new e(r,n)}return e.prototype.toJSON=function(){return{$timestamp:this.toString()}},e.fromInt=function(r){return new e(K.fromInt(r,!0))},e.fromNumber=function(r){return new e(K.fromNumber(r,!0))},e.fromBits=function(r,n){return new e(r,n)},e.fromString=function(r,n){return new e(K.fromString(r,!0,n))},e.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},e.fromExtendedJSON=function(r){return new e(r.$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=K.MAX_UNSIGNED_VALUE,e}(Kw);function Jw(t){return ii(t)&&Reflect.has(t,"_bsontype")&&typeof t._bsontype=="string"}var Vh=2147483647,qh=-2147483648,Wh=9223372036854776e3,Gh=-9223372036854776e3,Xw={$oid:Kt,$binary:Er,$uuid:Er,$symbol:Fa,$numberInt:ys,$numberDecimal:Ba,$numberDouble:ms,$numberLong:K,$minKey:$a,$maxKey:ja,$regex:zn,$regularExpression:zn,$timestamp:Hh};function zh(t,e){if(e===void 0&&(e={}),typeof t=="number"){if(e.relaxed||e.legacy)return t;if(Math.floor(t)===t){if(t>=qh&&t<=Vh)return new ys(t);if(t>=Gh&&t<=Wh)return K.fromNumber(t)}return new ms(t)}if(t==null||typeof t!="object")return t;if(t.$undefined)return null;for(var r=Object.keys(t).filter(function(h){return h.startsWith("$")&&t[h]!=null}),n=0;n<r.length;n++){var i=Xw[r[n]];if(i)return i.fromExtendedJSON(t,e)}if(t.$date!=null){var s=t.$date,o=new Date;return e.legacy?typeof s=="number"?o.setTime(s):typeof s=="string"&&o.setTime(Date.parse(s)):typeof s=="string"?o.setTime(Date.parse(s)):K.isLong(s)?o.setTime(s.toNumber()):typeof s=="number"&&e.relaxed&&o.setTime(s),o}if(t.$code!=null){var c=Object.assign({},t);return t.$scope&&(c.$scope=zh(t.$scope)),gs.fromExtendedJSON(t)}if(Rw(t)||t.$dbPointer){var l=t.$ref?t:t.$dbPointer;if(l instanceof Gn)return l;var p=Object.keys(l).filter(function(h){return h.startsWith("$")}),d=!0;if(p.forEach(function(h){["$ref","$id","$db"].indexOf(h)===-1&&(d=!1)}),d)return Gn.fromExtendedJSON(l)}return t}function Qw(t,e){return t.map(function(r,n){e.seenObjects.push({propertyName:"index ".concat(n),obj:null});try{return er(r,e)}finally{e.seenObjects.pop()}})}function jl(t){var e=t.toISOString();return t.getUTCMilliseconds()!==0?e:e.slice(0,-5)+"Z"}function er(t,e){if((typeof t=="object"||typeof t=="function")&&t!==null){var r=e.seenObjects.findIndex(function(A){return A.obj===t});if(r!==-1){var n=e.seenObjects.map(function(A){return A.propertyName}),i=n.slice(0,r).map(function(A){return"".concat(A," -> ")}).join(""),s=n[r],o=" -> "+n.slice(r+1,n.length-1).map(function(A){return"".concat(A," -> ")}).join(""),c=n[n.length-1],l=" ".repeat(i.length+s.length/2),p="-".repeat(o.length+(s.length+c.length)/2-1);throw new Tt(`Converting circular structure to EJSON:
34
+ Url: ${Wi(t)}`),!0)}function Vm(t,e){return t.type||!e||!e.length?!1:zm(t).some(r=>os(r,e))}function qm(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;let r=t.transaction;return r?os(r,e):!1}function Wm(t,e){if(!e||!e.length)return!1;let r=Wi(t);return r?os(r,e):!1}function Gm(t,e){if(!e||!e.length)return!0;let r=Wi(t);return r?os(r,e):!0}function zm(t){let e=[];t.message&&e.push(t.message);let r;try{r=t.exception.values[t.exception.values.length-1]}catch{}return r&&r.value&&(e.push(r.value),r.type&&e.push(`${r.type}: ${r.value}`)),e}function Ym(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function Km(t=[]){for(let e=t.length-1;e>=0;e--){let r=t[e];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function Wi(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?Km(e):null}catch{return Ct&&nt.error(`Cannot extract url for event ${Qe(t)}`),null}}function Jm(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 Xm="Dedupe",Qm=()=>{let t;return{name:Xm,processEvent(e){if(e.type)return e;try{if(ty(e,t))return Ct&&nt.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},Zm=Qm;function ty(t,e){return e?!!(ey(t,e)||ry(t,e)):!1}function ey(t,e){let r=t.message,n=e.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!ch(t,e)||!ah(t,e))}function ry(t,e){let r=ml(e),n=ml(t);return!(!r||!n||r.type!==n.type||r.value!==n.value||!ch(t,e)||!ah(t,e))}function ah(t,e){let r=Kc(t),n=Kc(e);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let i=0;i<n.length;i++){let s=n[i],o=r[i];if(s.filename!==o.filename||s.lineno!==o.lineno||s.colno!==o.colno||s.function!==o.function)return!1}return!0}function ch(t,e){let r=t.fingerprint,n=e.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function ml(t){return t.exception&&t.exception.values&&t.exception.values[0]}var Ft=ht,Oo=0;function lh(){return Oo>0}function ny(){Oo++,setTimeout(()=>{Oo--})}function Zr(t,e={},r){if(typeof t!="function")return t;try{let i=t.__sentry_wrapped__;if(i)return i;if(ba(t))return t}catch{return t}let n=function(){let i=Array.prototype.slice.call(arguments);try{r&&typeof r=="function"&&r.apply(this,arguments);let s=i.map(o=>Zr(o,e));return t.apply(this,s)}catch(s){throw ny(),Ug(o=>{o.addEventProcessor(c=>(e.mechanism&&(Io(c,void 0,void 0),qn(c,e.mechanism)),c.extra=yt(x({},c.extra),{arguments:i}),c)),bm(s)}),s}};try{for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}catch{}zu(n,t),Cr(t,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return t.name}})}catch{}return n}var Hr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Ia(t,e){let r=Ca(t,e),n={type:e&&e.name,value:cy(e)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function iy(t,e,r,n){let i=ie(),s=i&&i.getOptions().normalizeDepth,o=dy(e),c={__serialized__:Xu(e,s)};if(o)return{exception:{values:[Ia(t,o)]},extra:c};let l={exception:{values:[{type:is(e)?e.constructor.name:n?"UnhandledRejection":"Error",value:hy(e,{isUnhandledRejection:n})}]},extra:c};if(r){let p=Ca(t,r);p.length&&(l.exception.values[0].stacktrace={frames:p})}return l}function Us(t,e){return{exception:{values:[Ia(t,e)]}}}function Ca(t,e){let r=e.stacktrace||e.stack||"",n=oy(e),i=ay(e);try{return t(r,n,i)}catch{}return[]}var sy=/Minified React error #\d+;/i;function oy(t){return t&&sy.test(t.message)?1:0}function ay(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function cy(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function ly(t,e,r,n){let i=r&&r.syntheticException||void 0,s=Ta(t,e,i,n);return qn(s),s.level="error",r&&r.event_id&&(s.event_id=r.event_id),xr(s)}function uy(t,e,r="info",n,i){let s=n&&n.syntheticException||void 0,o=ko(t,e,s,i);return o.level=r,n&&n.event_id&&(o.event_id=n.event_id),xr(o)}function Ta(t,e,r,n,i){let s;if(Vu(e)&&e.error)return Us(t,e.error);if(Fc(e)||_f(e)){let o=e;if("stack"in e)s=Us(t,e);else{let c=o.name||(Fc(o)?"DOMError":"DOMException"),l=o.message?`${c}: ${o.message}`:c;s=ko(t,l,r,n),Io(s,l)}return"code"in o&&(s.tags=yt(x({},s.tags),{"DOMException.code":`${o.code}`})),s}return fa(e)?Us(t,e):Xr(e)||is(e)?(s=iy(t,e,r,i),qn(s,{synthetic:!0}),s):(s=ko(t,e,r,n),Io(s,`${e}`,void 0),qn(s,{synthetic:!0}),s)}function ko(t,e,r,n){let i={};if(n&&r){let s=Ca(t,r);s.length&&(i.exception={values:[{value:e,stacktrace:{frames:s}}]})}if(ga(e)){let{__sentry_template_string__:s,__sentry_template_values__:o}=e;return i.logentry={message:s,params:o},i}return i.message=e,i}function hy(t,{isUnhandledRejection:e}){let r=$f(t),n=e?"promise rejection":"exception";return Vu(t)?`Event \`ErrorEvent\` captured as ${n} with message \`${t.message}\``:is(t)?`Event \`${py(t)}\` (type=${t.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function py(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function dy(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let r=t[e];if(r instanceof Error)return r}}function fy(t,{metadata:e,tunnel:r,dsn:n}){let i=x(x({event_id:t.event_id,sent_at:new Date().toISOString()},e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}}),!!r&&!!n&&{dsn:as(n)}),s=gy(t);return ri(i,[s])}function gy(t){return[{type:"user_report"},t]}var my=class extends xm{constructor(t){let e=x({parentSpanIsAlwaysRootSpan:!0},t),r=Ft.SENTRY_SDK_SOURCE||rg();km(e,"browser",["browser"],r),super(e),e.sendClientReports&&Ft.document&&Ft.document.addEventListener("visibilitychange",()=>{Ft.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,e){return ly(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t,e="info",r){return uy(this._options.stackParser,t,e,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){Hr&&nt.warn("SDK not enabled, will not capture user feedback.");return}let e=fy(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(e)}_prepareEvent(t,e,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,e,r)}_flushOutcomes(){let t=this._clearOutcomes();if(t.length===0){Hr&&nt.log("No outcomes to send");return}if(!this._dsn){Hr&&nt.log("No dsn provided, will not send outcomes");return}Hr&&nt.log("Sending outcomes:",t);let e=Eg(t,this._options.tunnel&&as(this._dsn));this.sendEnvelope(e)}},yy=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,zt=ht,vy=1e3,yl,Po,Ro;function wy(t){let e="dom";Or(e,t),kr(e,by)}function by(){if(!zt.document)return;let t=be.bind(null,"dom"),e=vl(t,!0);zt.document.addEventListener("click",e,!1),zt.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(r=>{let n=zt[r]&&zt[r].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Ht(n,"addEventListener",function(i){return function(s,o,c){if(s==="click"||s=="keypress")try{let l=this,p=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},d=p[s]=p[s]||{refCount:0};if(!d.handler){let h=vl(t);d.handler=h,i.call(this,s,h,c)}d.refCount++}catch{}return i.call(this,s,o,c)}}),Ht(n,"removeEventListener",function(i){return function(s,o,c){if(s==="click"||s=="keypress")try{let l=this,p=l.__sentry_instrumentation_handlers__||{},d=p[s];d&&(d.refCount--,d.refCount<=0&&(i.call(this,s,d.handler,c),d.handler=void 0,delete p[s]),Object.keys(p).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,o,c)}}))})}function _y(t){if(t.type!==Po)return!1;try{if(!t.target||t.target._sentryId!==Ro)return!1}catch{}return!0}function Ey(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function vl(t,e=!1){return r=>{if(!r||r._sentryCaptured)return;let n=Sy(r);if(Ey(r.type,n))return;Cr(r,"_sentryCaptured",!0),n&&!n._sentryId&&Cr(n,"_sentryId",_e());let i=r.type==="keypress"?"input":r.type;_y(r)||(t({event:r,name:i,global:e}),Po=r.type,Ro=n?n._sentryId:void 0),clearTimeout(yl),yl=zt.setTimeout(()=>{Ro=void 0,Po=void 0},vy)}}function Sy(t){try{return t.target}catch{return null}}var bi;function Iy(t){let e="history";Or(e,t),kr(e,Cy)}function Cy(){if(!xg())return;let t=zt.onpopstate;zt.onpopstate=function(...r){let n=zt.location.href,i=bi;if(bi=n,be("history",{from:i,to:n}),t)try{return t.apply(this,r)}catch{}};function e(r){return function(...n){let i=n.length>2?n[2]:void 0;if(i){let s=bi,o=String(i);bi=o,be("history",{from:s,to:o})}return r.apply(this,n)}}Ht(zt.history,"pushState",e),Ht(zt.history,"replaceState",e)}var Ri={};function Ty(t){let e=Ri[t];if(e)return e;let r=zt[t];if(Eo(r))return Ri[t]=r.bind(zt);let n=zt.document;if(n&&typeof n.createElement=="function")try{let i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);let s=i.contentWindow;s&&s[t]&&(r=s[t]),n.head.removeChild(i)}catch(i){yy&&nt.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,i)}return r&&(Ri[t]=r.bind(zt))}function wl(t){Ri[t]=void 0}var On="__sentry_xhr_v3__";function xy(t){let e="xhr";Or(e,t),kr(e,Dy)}function Dy(){if(!zt.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;Ht(t,"open",function(e){return function(...r){let n=sr()*1e3,i=He(r[0])?r[0].toUpperCase():void 0,s=Ay(r[1]);if(!i||!s)return e.apply(this,r);this[On]={method:i,url:s,request_headers:{}},i==="POST"&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let o=()=>{let c=this[On];if(c&&this.readyState===4){try{c.status_code=this.status}catch{}let l={endTimestamp:sr()*1e3,startTimestamp:n,xhr:this};be("xhr",l)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Ht(this,"onreadystatechange",function(c){return function(...l){return o(),c.apply(this,l)}}):this.addEventListener("readystatechange",o),Ht(this,"setRequestHeader",function(c){return function(...l){let[p,d]=l,h=this[On];return h&&He(p)&&He(d)&&(h.request_headers[p.toLowerCase()]=d),c.apply(this,l)}}),e.apply(this,r)}}),Ht(t,"send",function(e){return function(...r){let n=this[On];if(!n)return e.apply(this,r);r[0]!==void 0&&(n.body=r[0]);let i={startTimestamp:sr()*1e3,xhr:this};return be("xhr",i),e.apply(this,r)}})}function Ay(t){if(He(t))return t;try{return t.toString()}catch{}}function Ny(t,e=Ty("fetch")){let r=0,n=0;function i(s){let o=s.body.length;r+=o,n++;let c=x({body:s.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:r<=6e4&&n<15},t.fetchOptions);if(!e)return wl("fetch"),Vi("No fetch implementation available");try{return e(t.url,c).then(l=>(r-=o,n--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return wl("fetch"),r-=o,n--,Vi(l)}}return Om(t,i)}var Oy=30,ky=50;function Lo(t,e,r,n){let i={filename:t,function:e==="<anonymous>"?Tr:e,in_app:!0};return r!==void 0&&(i.lineno=r),n!==void 0&&(i.colno=n),i}var Py=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ry=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ly=/\((\S*)(?::(\d+))(?::(\d+))\)/,My=t=>{let e=Py.exec(t);if(e){let[,n,i,s]=e;return Lo(n,Tr,+i,+s)}let r=Ry.exec(t);if(r){if(r[2]&&r[2].indexOf("eval")===0){let s=Ly.exec(r[2]);s&&(r[2]=s[1],r[3]=s[2],r[4]=s[3])}let[n,i]=uh(r[1]||Tr,r[2]);return Lo(i,n,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},Uy=[Oy,My],By=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,jy=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,$y=t=>{let e=By.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let i=jy.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],n=e[1]||Tr;return[n,r]=uh(n,r),Lo(r,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},Fy=[ky,$y],Hy=[Uy,Fy],Vy=Hf(...Hy),uh=(t,e)=>{let r=t.indexOf("safari-extension")!==-1,n=t.indexOf("safari-web-extension")!==-1;return r||n?[t.indexOf("@")!==-1?t.split("@")[0]:Tr,r?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},_i=1024,qy="Breadcrumbs",Wy=(t={})=>{let e=x({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:qy,setup(r){e.console&&qf(Ky(r)),e.dom&&wy(Yy(r,e.dom)),e.xhr&&xy(Jy(r)),e.fetch&&Kf(Xy(r)),e.history&&Iy(Qy(r)),e.sentry&&r.on("beforeSendEvent",zy(r))}}},Gy=Wy;function zy(t){return function(e){ie()===t&&Dr({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:Qe(e)},{event:e})}}function Yy(t,e){return function(r){if(ie()!==t)return;let n,i,s=typeof e=="object"?e.serializeAttribute:void 0,o=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;o&&o>_i&&(Hr&&nt.warn(`\`dom.maxStringLength\` cannot exceed ${_i}, but a value of ${o} was configured. Sentry will use ${_i} instead.`),o=_i),typeof s=="string"&&(s=[s]);try{let l=r.event,p=Zy(l)?l.target:l;n=Wu(p,{keyAttrs:s,maxStringLength:o}),i=Of(p)}catch{n="<unknown>"}if(n.length===0)return;let c={category:`ui.${r.name}`,message:n};i&&(c.data={"ui.component_name":i}),Dr(c,{event:r.event,name:r.name,global:r.global})}}function Ky(t){return function(e){if(ie()!==t)return;let r={category:"console",data:{arguments:e.args,logger:"console"},level:hg(e.level),message:Hc(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)r.message=`Assertion failed: ${Hc(e.args.slice(1)," ")||"console.assert"}`,r.data.arguments=e.args.slice(1);else return;Dr(r,{input:e.args,level:e.level})}}function Jy(t){return function(e){if(ie()!==t)return;let{startTimestamp:r,endTimestamp:n}=e,i=e.xhr[On];if(!r||!n||!i)return;let{method:s,url:o,status_code:c,body:l}=i,p={method:s,url:o,status_code:c},d={xhr:e.xhr,input:l,startTimestamp:r,endTimestamp:n};Dr({category:"xhr",data:p,type:"http"},d)}}function Xy(t){return function(e){if(ie()!==t)return;let{startTimestamp:r,endTimestamp:n}=e;if(n&&!(e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"))if(e.error){let i=e.fetchData,s={data:e.error,input:e.args,startTimestamp:r,endTimestamp:n};Dr({category:"fetch",data:i,level:"error",type:"http"},s)}else{let i=e.response,s=yt(x({},e.fetchData),{status_code:i&&i.status}),o={input:e.args,response:i,startTimestamp:r,endTimestamp:n};Dr({category:"fetch",data:s,type:"http"},o)}}}function Qy(t){return function(e){if(ie()!==t)return;let r=e.from,n=e.to,i=Ms(Ft.location.href),s=r?Ms(r):void 0,o=Ms(n);(!s||!s.path)&&(s=i),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),Dr({category:"navigation",data:{from:r,to:n}})}}function Zy(t){return!!t&&!!t.target}var tv=["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"],ev="BrowserApiErrors",rv=(t={})=>{let e=x({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t);return{name:ev,setupOnce(){e.setTimeout&&Ht(Ft,"setTimeout",bl),e.setInterval&&Ht(Ft,"setInterval",bl),e.requestAnimationFrame&&Ht(Ft,"requestAnimationFrame",iv),e.XMLHttpRequest&&"XMLHttpRequest"in Ft&&Ht(XMLHttpRequest.prototype,"send",sv);let r=e.eventTarget;r&&(Array.isArray(r)?r:tv).forEach(ov)}}},nv=rv;function bl(t){return function(...e){let r=e[0];return e[0]=Zr(r,{mechanism:{data:{function:ar(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function iv(t){return function(e){return t.apply(this,[Zr(e,{mechanism:{data:{function:"requestAnimationFrame",handler:ar(t)},handled:!1,type:"instrument"}})])}}function sv(t){return function(...e){let r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(n=>{n in r&&typeof r[n]=="function"&&Ht(r,n,function(i){let s={mechanism:{data:{function:n,handler:ar(i)},handled:!1,type:"instrument"}},o=ba(i);return o&&(s.mechanism.data.handler=ar(o)),Zr(i,s)})}),t.apply(this,e)}}function ov(t){let e=Ft,r=e[t]&&e[t].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Ht(r,"addEventListener",function(n){return function(i,s,o){try{typeof s.handleEvent=="function"&&(s.handleEvent=Zr(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ar(s),target:t},handled:!1,type:"instrument"}}))}catch{}return n.apply(this,[i,Zr(s,{mechanism:{data:{function:"addEventListener",handler:ar(s),target:t},handled:!1,type:"instrument"}}),o])}}),Ht(r,"removeEventListener",function(n){return function(i,s,o){let c=s;try{let l=c&&c.__sentry_wrapped__;l&&n.call(this,i,l,o)}catch{}return n.call(this,i,c,o)}}))}var av="GlobalHandlers",cv=(t={})=>{let e=x({onerror:!0,onunhandledrejection:!0},t);return{name:av,setupOnce(){Error.stackTraceLimit=50},setup(r){e.onerror&&(uv(r),_l("onerror")),e.onunhandledrejection&&(hv(r),_l("onunhandledrejection"))}}},lv=cv;function uv(t){Qf(e=>{let{stackParser:r,attachStacktrace:n}=hh();if(ie()!==t||lh())return;let{msg:i,url:s,line:o,column:c,error:l}=e,p=fv(Ta(r,l||i,void 0,n,!1),s,o,c);p.level="error",ih(p,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function hv(t){tg(e=>{let{stackParser:r,attachStacktrace:n}=hh();if(ie()!==t||lh())return;let i=pv(e),s=ma(i)?dv(i):Ta(r,i,void 0,n,!0);s.level="error",ih(s,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function pv(t){if(ma(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 dv(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function fv(t,e,r,n){let i=t.exception=t.exception||{},s=i.values=i.values||[],o=s[0]=s[0]||{},c=o.stacktrace=o.stacktrace||{},l=c.frames=c.frames||[],p=isNaN(parseInt(n,10))?void 0:n,d=isNaN(parseInt(r,10))?void 0:r,h=He(e)&&e.length>0?e:Nf();return l.length===0&&l.push({colno:p,filename:h,function:Tr,in_app:!0,lineno:d}),t}function _l(t){Hr&&nt.log(`Global Handler attached: ${t}`)}function hh(){let t=ie();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var gv=()=>({name:"HttpContext",preprocessEvent(t){if(!Ft.navigator&&!Ft.location&&!Ft.document)return;let e=t.request&&t.request.url||Ft.location&&Ft.location.href,{referrer:r}=Ft.document||{},{userAgent:n}=Ft.navigator||{},i=x(x(x({},t.request&&t.request.headers),r&&{Referer:r}),n&&{"User-Agent":n}),s=yt(x(x({},t.request),e&&{url:e}),{headers:i});t.request=s}}),mv="cause",yv=5,vv="LinkedErrors",wv=(t={})=>{let e=t.limit||yv,r=t.key||mv;return{name:vv,preprocessEvent(n,i,s){let o=s.getOptions();Tf(Ia,o.stackParser,o.maxValueLength,r,e,n,i)}}},bv=wv;function _v(t){return[$m(),Mm(),nv(),Gy(),lv(),bv(),Zm(),gv()]}var Ev=class extends Error{cause;constructor(t,e){super(t),this.cause=e}},Yt=class ph{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new ph),this.INSTANCE}captureException(e,r,n){T.error(e),this.getNewScope(r,n).captureException(e)}captureMessage(e,r,n,i){this.getNewScope(n,i).captureMessage(e,r??"error")}captureError(e,r,n,i){T.error(e,r);let s=this.getNewScope(n,i),o=new Ev(e,r);s.captureException(o)}setGlobalContext(e,r){this.contexts[e]=x({context:r},this.contexts[e])}setUser(e){this.user=e}setTags(e){this.tags=e}getNewScope(e,r){let n=new We;if(n.setClient(this.client),n.setUser(this.user),e?.triggerContext){let i=e.triggerContext;n.setExtras(i.triggerData.sentryContext()),delete e.triggerContext}return e&&n.setExtras(e),this.tags&&n.setTags(this.tags),r&&n.setTags(r),Object.keys(this.contexts).forEach(i=>{n.setContext(i,this.contexts[i])}),n.setTag("language",navigator.language),n.setTag("timezone",Tv()),n}init(){let e=_v({}).filter(r=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(r.name));this.client=new my({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:Ny,stackParser:Vy,integrations:e,environment:qe.mode,release:`web-sdk@${H.SDK_VERSION}`,debug:qe.debug}),this.client.init()}},Sv=class{static format(t,e){let r=/{{\s*(\w+)\s*}}/;return e.replace(r,(n,i)=>{switch(i){case"amount":return this.formatWithDelimiters(t,2);case"amount_no_decimals":return this.formatWithDelimiters(t,0);case"amount_with_comma_separator":return this.formatWithDelimiters(t,2,".",",");case"amount_no_decimals_with_comma_separator":return this.formatWithDelimiters(t,0,".",",");case"amount_with_apostrophe_separator":return this.formatWithDelimiters(t,2,"'",".");case"amount_no_decimals_with_space_separator":return this.formatWithDelimiters(t,0," ");case"amount_with_space_separator":return this.formatWithDelimiters(t,2," ",",");case"amount_with_period_and_space_separator":return this.formatWithDelimiters(t,2," ",".");default:return n}})}static formatWithDelimiters(t,e=2,r=",",n="."){if(isNaN(t)||t==null)return"0";let i=(t/100).toFixed(e).split("."),s=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+r),o=i[1]?n+i[1]:"";return s+o}};function dh(t){try{return new URL(t)}catch{return}}function El(t){return!t||t==="null"||t==="undefined"}function Iv(t,e){let r=t.indexOf(e);return r===-1?!1:(t.splice(r,1),!0)}function De(t,e){if(t==0&&e)return"Free";let r=Ot.get(),n=ne.get(),i=r.shopCurrencyCode||n.currency,s=r.currencyCode;s||T.warn("Currency code is not set in RuntimeData");let o=n.money?.format??r.moneyFormat,c;if(o&&i===s)c=Sv.format(t*100,o);else{let l;try{l=new Intl.NumberFormat(fh(),{style:"currency",currency:s||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(p){return Yt.getInstance().captureException(p,{currentCurrency:s,shopCurrency:i}),""}c=l.format(t),c=c.replace("\u20B9","Rs. "),n.money?.showCurrency&&s!=="INR"&&(c=c.concat(` ${s}`))}return c}function Cv(t){return new Intl.NumberFormat(fh(),{notation:"compact"}).format(t)}function fh(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}var Ei;function Tv(){if(Ei)return Ei;try{return Ei=Intl.DateTimeFormat().resolvedOptions().timeZone,Ei}catch{return""}}function xa(t){document.readyState!=="loading"?t():document.addEventListener("DOMContentLoaded",t)}function tr(t){let e=document.createElement("span");e.id="snackbar",e.innerText=t,document.body.appendChild(e),e.className="show",setTimeout(()=>{e.classList.remove("show"),document.body.removeChild(e)},3e3)}async function gh(t,e=10,r=document){let n=0,i=document.querySelectorAll("nonexistent-tag");for(;n<e;){let s=Math.min(100*2**n,5e3);if(await Qn.sleep(s),i=r.querySelectorAll(t),i.length)return T.debug(`Attempt ${n+1}: ${i.length} elements found with ${t}`),i;T.debug(`Attempt ${n+1}: Elements not found with ${t}. Retrying after ${s}ms.`),n++}return T.warn(`Max attempts reached. Element not found with ${t}.`),i}async function Gi(t,e=10,r=document){return(await gh(t,e,r)).item(0)}function xv(t,e,r=document.body){let n=new MutationObserver(i=>{i.forEach(s=>{s.removedNodes.forEach(o=>{(o===t||o.contains(t))&&(e(),n.disconnect())})})});n.observe(r,{childList:!0})}async function mh(){let t=await Lt.get(ot.DEVICE_ID),e=await te.get(ot.ID,"");return[{key:"letscooee_did",value:t},{key:"letscooee_sid",value:e},{key:"__letscooee_time",value:new Date().toLocaleString()},{key:"__letscooee_via",value:"Buy Now"}]}function kn(t,e,r){Object.defineProperty(t,e,{enumerable:!1,configurable:!1,writable:!1,value:r})}var Dv=class{url;alt;constructor(t){t.alt&&(this.alt=t.alt),this.url=t.url}},Av=class{d;cmp;effective;constructor(t={}){this.d=t.d,this.cmp=t.cmp,this.effective=this.d}},Nv=class{id;mID;name;groupID;groupName;isSelected;constructor(t){t??={},this.id=t.id,this.mID=t.mID,this.name=t.name,this.groupID=t.groupID,this.groupName=t.groupName,this.isSelected=t.isSelected??!1}},ls=class{mID;name;imgs;link;price;sku;isAvailable;quantity;sellingPlans;selectedOptions;selectedSellingPlan;effectivePrice;constructor(t){t=t??{},this.mID=t.mID,this.name=t.name,this.imgs=t.imgs?.map(e=>new Dv(e))??[],this.link=t.link,this.price=new Av(t.price),this.sku=t.sku,this.isAvailable=t.isAvailable,this.quantity=t.quantity,this.selectedOptions=t.selectedOptions??[],this.effectivePrice=Sr(this.price.effective),t.sellingPlans?.length&&(this.selectedSellingPlan=Sr(void 0)),this.sellingPlans=t.sellingPlans?.map(e=>{let r=new Nv(e);return r.isSelected&&(this.selectedSellingPlan.value=r),r})}getOneImage(){return this.imgs[0]?.url}changeSellingPlan(t){this.selectedSellingPlan.value=t}hasEffectivePrice(){return this.effectivePrice.value!==this.price.d}},Ve=class{id;mID;name;status;ctg;options;imgs;videos;portraitVideos;vars;desc;sDesc;link;slug;quantity;category;meta;reviews;tags;selectedOrFirstVariant;selected=Sr(!0);constructor(t){this.update(t),this.selectedOrFirstVariant=Sr(this.selectedVariant)}get imageURL(){return this.imgs?.[0]?.url}get secondaryImageURL(){return this.imgs?.[1]?.url}get getVariantImages(){return this.selectedOrFirstVariant.value.imgs}get variantImage(){return this.getVariantImages[0]?.url}get variantSecondaryImage(){return this.getVariantImages[1]?.url}set variants(t){this.vars=t,this.selectedOrFirstVariant.value=this.selectedVariant}get selectedVariant(){return this.vars.find(t=>t.isAvailable)??this.vars[0]}setSelectedVariant(t){this.selectedOrFirstVariant.value=t}update(t){return this.id=t.id,this.mID=t.mID,this.name=t.name,this.status=t.status,this.ctg=t.ctg,this.imgs=t.imgs,this.desc=t.desc,this.sDesc=t.sDesc,this.link=t.link,this.slug=t.slug,this.quantity=t.quantity,this.meta=t.meta,this.category=t.category,this.videos=t.videos,this.reviews=t.reviews,this.options=t.options,this.portraitVideos=t.videos?.filter(e=>e.orientation==="PORTRAIT"),this.tags=t.tags,t.vars&&(this.vars=t.vars.map(e=>new ls(e))),this}toEmbed(t){return t=t??this.selectedOrFirstVariant.value,new un({id:this.id,mID:this.mID,vID:t.mID,vName:t.name,name:this.name,link:this.link,slug:this.slug,price:t.price.d,imageURL:t.getOneImage()??this.imgs?.[0].url})}getTemplateVariables(){let t=this.selectedOrFirstVariant.value,e=t.price,r=this.name,n=this.category,i=De(e.d,!0),s=this.variantImage??this.imageURL,o=this.meta,c=this.tags?.join(",")??"",l=this.reviews?.rating,p=this.reviews?.totalReviews,d=e.cmp&&e.cmp>e.d,h={name:r,price:i,image_url:s,meta:o,category:n,rating:l,reviews:p,tags:c};if(t.hasEffectivePrice()&&(h.effective_price=De(t.effectivePrice.value)),d){h.compare_price=De(e.cmp);let v=e.cmp-e.d;h.discount_percent=(v/e.cmp*100).toFixed(0),h.discount_price=De(v)}let b={name:t.name,quantity:t.quantity};return{product:h,variant:b}}},Ov=class{id;mID;handle;title;imageURL;constructor(t){t??={},this.id=t.id,this.mID=t.mID,this.handle=t.handle,this.title=t.title,this.imageURL=t.imageURL}},kv=class{enabled;constructor(t){this.enabled=t.enabled}},Pv=class extends kv{max;min;constructor(t){t??={},super(t),this.min=t.min,this.max=t.max}},Rv=class{productQuantity;constructor(t){t??={},this.productQuantity=new Pv(t.productQuantity)}},yh=class{s;g;i;constructor(t){t.s&&(this.s=new re(t.s)),t.g&&(this.g=new $v(t.g)),this.i=t.i}get solid(){return this.s}get glossy(){return this.g}get img(){return this.i}},Wn="a-f\\d",Lv=`#?[${Wn}]{3}[${Wn}]?`,Mv=`#?[${Wn}]{6}([${Wn}]{2})?`,Uv=new RegExp(`[^#${Wn}]`,"gi"),Bv=new RegExp(`^${Lv}$|^${Mv}$`,"i");function jv(t,e={}){if(typeof t!="string"||Uv.test(t)||!Bv.test(t))throw new TypeError("Expected a valid hex string");t=t.replace(/^#/,"");let r=1;t.length===8&&(r=Number.parseInt(t.slice(6,8),16)/255,t=t.slice(0,6)),t.length===4&&(r=Number.parseInt(t.slice(3,4).repeat(2),16)/255,t=t.slice(0,3)),t.length===3&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);let n=Number.parseInt(t,16),i=n>>16,s=n>>8&255,o=n&255,c=typeof e.alpha=="number"?e.alpha:r;if(e.format==="array")return[i,s,o,c];if(e.format==="css"){let l=c===1?"":` / ${Number((c*100).toFixed(2))}%`;return`rgb(${i} ${s} ${o}${l})`}return{red:i,green:s,blue:o,alpha:c}}var re=class{h;a=100;g;constructor(t){t??={},this.h=t.h,this.a=t.a,this.g=t.g}get hex(){return this.h}get grad(){return this.g}get rgba(){if(!this.hex)return"";try{return jv(this.hex,{format:"css",alpha:this.getAlpha()})}catch(t){return console.error("Invalid hex",t),"#000000"}}getAlpha(){return(this.a??100)/100}},Da=class{s;r;w;c;constructor(t){this.s=t.s,this.r=t.r,this.w=t.w,t.c&&(this.c=new re(t.c))}get radius(){return this.r}get width(){return this.w}get color(){return this.c}get style(){return Aa[this.s??1]}},Aa=(t=>(t[t.SOLID=1]="SOLID",t[t.DASHED=2]="DASHED",t))(Aa||{}),$v=class vh{static DEFAULT_FALLBACK=new re({h:"#000000",a:50});r;c;fb;constructor(e){this.r=e.r,e.c&&(this.c=new re(e.c)),e.fb&&(this.fb=new re(e.fb))}get radius(){return this.r}get color(){return this.c}get fallback(){return this.fb??vh.DEFAULT_FALLBACK}},Fv=class{blur;spr;clr;x;y;constructor(t){t=t??{},this.blur=t.blur??0,this.spr=t.spr??0,this.x=t.x??0,this.y=t.y??0,this.clr=new re(t.clr)}getStyle(t){return`${this.x*t}px ${this.y*t}px ${this.blur*t}px ${this.spr*t}px ${this.clr.rgba}`}},Na=class{pl;pr;pt;pb;ml;mr;mt;mb;cent;constructor(t){t=t??{},this.pl=t.pl??0,this.pr=t.pr??0,this.pt=t.pt??0,this.pb=t.pb??0,this.ml=t.ml??0,this.mr=t.mr??0,this.mt=t.mt??0,this.mb=t.mb??0,this.cent=t.cent??!1}getHorizontal(){return this.pl+this.pr}getVertical(){return this.pt+this.pb}getPaddingCSS(){return`${this.pt}px ${this.pr}px ${this.pb}px ${this.pl}px`}},wh=class{rot;constructor(t){t?.rot&&(this.rot=t.rot)}get rotate(){return this.rot}},ni=class{t;bg;br;clc;shd;spc;trf;a;w;h;x;y;constructor(t){this.t=t.t,t.bg&&(this.bg=new yh(t.bg)),t.br&&(this.br=new Da(t.br)),t.shd&&(this.shd=new Fv(t.shd)),t.spc&&(this.spc=new Na(t.spc)),this.trf=new wh(t.trf),this.clc=t.clc,this.w=t.w,this.h=t.h,this.x=t.x,this.y=t.y,this.a=t.a}get alpha(){return this.a??100}get type(){return this.t}get typeAsString(){return Oa[this.t]}get click(){return this.clc}},Oa=(t=>(t[t.IMAGE=1]="IMAGE",t[t.TEXT=2]="TEXT",t[t.BUTTON=3]="BUTTON",t[t.FLEXBOX=4]="FLEXBOX",t[t.MULTI_COLUMN=5]="MULTI_COLUMN",t[t.CHECKBOX=6]="CHECKBOX",t[t.PRODUCTS=11]="PRODUCTS",t[t.PRODUCT=12]="PRODUCT",t[t.PRODUCT_IMAGE=13]="PRODUCT_IMAGE",t[t.PRODUCT_TITLE=14]="PRODUCT_TITLE",t[t.PRODUCT_VARIATIONS=15]="PRODUCT_VARIATIONS",t[t.PRODUCT_VARIATIONS_SELLING_PLANS=16]="PRODUCT_VARIATIONS_SELLING_PLANS",t[t.PRODUCT_BUTTON=18]="PRODUCT_BUTTON",t[t.PRODUCT_RATING=19]="PRODUCT_RATING",t[t.EMAIL_INPUT=51]="EMAIL_INPUT",t[t.PHONE_INPUT=52]="PHONE_INPUT",t[t.COUNTDOWN_TIMER=61]="COUNTDOWN_TIMER",t[t.CAROUSEL=62]="CAROUSEL",t[t.SHAPE=100]="SHAPE",t))(Oa||{}),bh=class extends ni{constructor(t){super(t)}},ka=class extends ni{src;constructor(t){super(t),this.src=t.src}},Pa=(t=>(t[t.START=0]="START",t[t.CENTER=1]="CENTER",t[t.END=2]="END",t[t.JUSTIFY=3]="JUSTIFY",t))(Pa||{}),Hv=class{name;fonts;constructor(t){t=t??{},t.name&&(t.name=t.name!=="Arial"?t.name:""),this.name=t.name,this.fonts=t.fonts?.map(e=>new Vv(e))}},Vv=class{style;url;constructor(t){t=t??{},this.style=t.style,this.url=t.url}getFontDescriptor(){return{style:this.style===2||this.style===4?"italic":"normal",weight:this.style===4||this.style===3?"700":"400"}}getURL(){return`url('${this.url}') format('truetype')`}},Ge=class{fw;fs;fam;fmly;lh=1.2;ls;s;tc;ta;td;tdc;constructor(t){this.update(t)}get alignment(){return Pa[this.ta]}get letterSpacing(){return this.ls?this.ls+"px":"normal"}update(t){t=t??{},t.lh&&(this.lh=t.lh),t.tdc&&(this.tdc=new re(t.tdc)),this.td=t.td,this.fs=t.s??t.fs??60,this.tc=new re(t.tc),this.ta=t.ta??1,this.fw=t.fw??400,this.ls=t.ls??0,this.tc.h??="#000000",this.fam=new Hv(t.fam??t.fmly)}resize(t){this.s*=t,this.ls*=t}},us=class extends ni{typo;constructor(t){super(t);let e=x(x({},t.f),t.typo);t.alg&&(e.ta=t.alg),t.c&&(e.tc=t.c),this.typo=new Ge(e)}get color(){return this.typography.tc}get typography(){return this.typo}},Mo=class extends us{prs;constructor(t){super(t),this.prs=t.prs}get parts(){return this.prs}},qv=class extends ni{o;constructor(t){super(t),this.o=t.o??5,this.w=this.w??1080,this.h=this.h??1920}getOrigin(){return this.o}},_h=class{dd;hh;mm;ss;date;constructor(t){t??={},this.dd=t.dd??0,this.hh=t.hh??0,this.mm=t.mm??0,this.ss=t.ss??0,this.date=t.date?new Date(t.date):void 0}start(t,e){let r=new Date;t===2?(r.setSeconds(r.getSeconds()+this.ss),r.setMinutes(r.getMinutes()+this.mm),r.setHours(r.getHours()+this.hh),r.setDate(r.getDate()+this.dd)):r=this.date??new Date;let n=window.setInterval(()=>{let i=new Date().getTime(),s=r.getTime()-i;if(s<1){clearInterval(n);return}let o=Math.floor(s/(1e3*60*60*24)),c=Math.floor(s%(1e3*60*60*24)/(1e3*60*60)),l=Math.floor(s%(1e3*60*60)/(1e3*60)),p=Math.floor(s%(1e3*60)/1e3);e({days:o,hours:c,minutes:l,seconds:p})},1e3);return n}},Eh=class extends us{gap;timer;timerType;horizontal;lblPos;show;constructor(t){t??={},super(t),this.gap=t.gap,this.timerType=t.type,this.timer=new _h(t.timer),this.show=t.show??{day:!0,hour:!0,minute:!0,second:!0},this.horizontal=t.horizontal,this.lblPos=t.lblPos}},Wv=class{txt;c;constructor(t){t??={},this.txt=t.txt,this.c=new re(t.c??{})}get text(){return this.txt}get color(){return this.c}},Ra=class extends us{ph;constructor(t){super(t),this.ph=new Wv(t.ph)}get placeholderText(){return this.ph.text}get placeholderColor(){return this.ph.color.rgba}},Sh=class extends Ra{constructor(t){t??={},super(t)}},Ih=class extends Ra{},Ch=class extends Ra{},Th=class extends ka{},hs=(t=>(t[t.LOW=1]="LOW",t[t.MEDIUM=2]="MEDIUM",t[t.HIGH=3]="HIGH",t))(hs||{}),Gv=class{en;ex;constructor(t){t=t??{},this.en=t.en,this.ex=t.ex}getEnterAnimation(){switch(this.en){case 2:return[{transform:"translateY(-100%)"},{transform:"translateY(0%)"}];case 3:return[{transform:"translateY(100%)"},{transform:"translateY(0%)"}];case 4:return[{transform:"translateX(-100%)"},{transform:"translateX(0%)"}];case 5:return[{transform:"translateX(100%)"},{transform:"translateX(0%)"}];case 6:return[{transform:"translate(-100%, -100%)"},{transform:"translate(0%, 0%)"}];case 7:return[{transform:"translate(100%, -100%)"},{transform:"translate(0%, 0%)"}];case 8:return[{transform:"translate(-100%, 100%)"},{transform:"translate(0%, 0%)"}];case 9:return[{transform:"translate(100%, 100%)"},{transform:"translate(0%, 0%)"}];case 10:return[{transform:"scale(0.1)"},{transform:"scale(1)"}];default:return[]}}getExitAnimation(){switch(this.ex){case 2:return[{transform:"translateY(0%)"},{transform:"translateY(-100%)"}];case 3:return[{transform:"translateY(0%)"},{transform:"translateY(100%)"}];case 4:return[{transform:"translateX(0%)"},{transform:"translateX(-100%)"}];case 5:return[{transform:"translateX(0%)"},{transform:"translateX(100%)"}];case 6:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, -100%)"}];case 7:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, -100%)"}];case 8:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, 100%)"}];case 9:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, 100%)"}];case 10:return[{transform:"scale(1)"},{transform:"scale(0)"}];default:return[]}}},Sl=class extends ni{gvt;max;cover;anim;embedded;position;constructor(t){t=t??{},super(t),this.gvt=t.gvt??5,this.max=t.max,this.cover=t.cover??!0,this.anim=new Gv(t.anim),this.embedded=t.embedded,this.position=t.position??1,this.spc||(this.spc=new Na({pl:H.IN_APP_DEFAULT_PADDING,pr:H.IN_APP_DEFAULT_PADDING,pt:H.IN_APP_DEFAULT_PADDING,pb:H.IN_APP_DEFAULT_PADDING}))}isEmbedded(){return this.position===2&&!!this.embedded}getEmbeddedSelector(){return`.letscooee-engagement.container-${this.embedded}`}},zv=class extends Sl{cont;elems=[];mob;constructor(t){t=t??{},super(t),this.cont=new qv(t.cont),this.mob=new Sl(t.mob),this.bg||(this.bg=this.cont.bg,delete this.cont.bg),t.elems.forEach(e=>{e.t===1?this.elems.push(new ka(e)):e.t===2?this.elems.push(new Mo(e)):e.t===3?this.elems.push(new Mo(e)):e.t===100?this.elems.push(new bh(e)):e.t===51?this.elems.push(new Ih(e)):e.t===52?this.elems.push(new Ch(e)):e.t===61?this.elems.push(new Eh(e)):e.t===15||e.t===16?this.elems.push(new Sh(e)):e.t===13&&this.elems.push(new Th(e))})}getStylesForWrapper(){if(this.cover)return{};let t;return this.gvt===1?t={top:0,left:0}:this.gvt===2?t={top:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===3?t={top:0,right:0}:this.gvt===6?t={top:"50%",right:0,transform:"translateY(-50%)"}:this.gvt===9?t={bottom:0,right:0}:this.gvt===8?t={bottom:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===7?t={bottom:0,left:0}:this.gvt===4?t={top:"50%",left:0,transform:"translateY(-50%)"}:t={top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},t.overflow="visible",t}getFlexStylesForContainer(){let t={display:"flex",flexDirection:"row"},e,r;return this.gvt===1?(e="flex-start",r="flex-start"):this.gvt===2?(e="center",r="flex-start"):this.gvt===3?(e="flex-end",r="flex-start"):this.gvt===4?(e="flex-start",r="center"):this.gvt===6?(e="flex-end",r="center"):this.gvt===7?(e="flex-start",r="flex-end"):this.gvt===8?(e="center",r="flex-end"):this.gvt===9?(e="flex-end",r="flex-end"):(e="center",r="center"),t.alignItems=r,t.justifyContent=e,t.overflow="visible",t}overrideForMobileView(){this.max=this.mob.max??this.max,this.cover=this.mob.cover??this.cover,this.gvt=this.mob.gvt??this.gvt,this.bg=this.mob.bg??this.bg,this.spc=this.mob.spc??this.spc,this.anim=this.mob.anim??this.anim,this.position=this.mob.position??this.position,this.embedded=this.mob.embedded??this.embedded}},xh=class{gap;dir;wrap;jc;ai;scroll;constructor(t){t??={},this.gap=t.gap??0,this.dir=t.dir??"row",this.wrap=t.wrap??"nowrap",this.jc=t.jc??"flex-start",this.ai=t.ai??"flex-start",this.scroll=t.scroll}},Yv=class{of;disp;pos;top;bottom;left;right;zIndex;constructor(t){t??={},this.of=t.of,this.disp=t.disp,this.pos=t.pos,this.top=t.top,this.bottom=t.bottom,this.left=t.left,this.right=t.right,this.zIndex=t.zIndex}},Kv=class{w;h;maxW;maxH;minW;minH;constructor(t){t??={},this.w=t.w??"100%",this.h=t.h??"auto",this.maxW=t.maxW,this.maxH=t.maxH,this.minW=t.minW,this.minH=t.minH}},Il=class{size;bg;br;spc;typo;lout;flex;constructor(t){t??={},this.spc=new Na(t.spc),t.size&&(this.size=new Kv(t.size)),t.bg&&(this.bg=new yh(t.bg)),t.br&&(this.br=new Da(t.br)),t.typo&&(this.typo=new Ge(t.typo)),t.lout&&(this.lout=new Yv(t.lout)),t.flex&&(this.flex=new xh(t.flex))}},Dh=class{sm;lg;constructor(t){t??={},this.sm=new Il(t.sm),this.lg=new Il(t.lg)}},lr=class{t;style;hide;when;clc;constructor(t,e){e??={},this.t=t,this.style=new Dh(e.style),this.hide=e.hide,e.when?.op&&(this.when=e.when),e.clc&&(this.clc=e.clc)}get stringType(){return Oa[this.t]}},Ne=class extends lr{text;constructor(t,e){t?.style?.lg?.typo?.s&&delete t.style.lg.typo.s,t?.style?.sm?.typo?.s&&delete t.style.sm.typo.s,super(e??2,t),t??={},this.text=t.text}},Uo=class extends Ne{constructor(t,e){super(t,e??3)}},Ah=class extends lr{value;constructor(t){super(6,t),t??={},this.value=t.value}},Nh=class extends Ne{showChips;optionsConfig;constructor(t=15,e){super(e,t),e??={},this.showChips=e.showChips??!1,this.optionsConfig=e.optionsConfig??{}}},Jv=class extends lr{c;iconSize;showSingleStar;fullStar;halfStart;constructor(t){super(19,t),t??={},this.c=new re(t.c),this.iconSize=t.iconSize??24,this.showSingleStar=t.showSingleStar??!1,this.fullStar=t.fullStar,this.halfStart=t.halfStart}},Xv=ke(sn()),Qv=class{enabled;type;color;constructor(t){t??={},this.enabled=t.enabled,this.type=t.type,this.color=new re(t.color)}},Zv=class{size;enabled;color;constructor(t){t??={},this.enabled=t.enabled,this.size=t.size,this.color=new re(t.color)}},Oh=class{navigation;pagination;autoplay;maxInRow;gap;slidesPerView;constructor(t){t??={},this.navigation=new Zv(t.navigation),this.pagination=new Qv(t.pagination),this.autoplay=t.autoplay,this.slidesPerView=t.slidesPerView??1,this.maxInRow=t.maxInRow??t.slidesPerView??4,this.gap=t.gap??0}},tw=class extends lr{conf;slide;formData;values;allowedTypes;constructor(t){super(62,t),t&&this.update(t)}update(t){t??={},this.slide=tn.getParsedElement(t.slide),this.formData=t.formData,this.values=t.values,this.conf=new Oh(t.conf),this.allowedTypes=t.allowedTypes}},ew=class extends Ne{gap;timer;timerType;horizontal;lblPos;show;constructor(t){t??={},super(t,61),this.gap=t.gap,this.timerType=t.type,this.timer=new _h(t.timer),this.show=t.show??{days:!0,hours:!0,minutes:!0,seconds:!0},this.horizontal=t.horizontal,this.lblPos=t.lblPos}},La=class extends lr{elems;constructor(t){super(4,t),this.update(t)}update(t){t??={},this.elems??=[],t.elems?.forEach(e=>{let r=tn.getParsedElement(e);r&&this.elems.push(r)})}},Bo=class extends lr{src;sm;lg;constructor(t,e){super(e??1,t),t&&this.update(t)}update(t){this.src=t.src,this.sm=t.sm,this.lg=t.lg}},tn=class kh{static getParsedElements(e){let r=[];return e?.forEach(n=>{let i=kh.getParsedElement(n);i&&r.push(i)}),r}static getParsedElement(e){switch(e.t){case 2:return new Ne(e);case 3:return new Uo(e);case 6:return new Ah(e);case 11:return new rw(e);case 12:return new Ma(e);case 61:return new ew(e);case 4:return new La(e);case 1:return new Bo(e);case 13:return new Bo(e,13);case 14:return new Ne(e,14);case 15:case 16:return new Nh(e.t,e);case 18:return new Uo(e,18);case 62:return new tw(e);case 19:return new Jv(e);default:Xv.default.error("Unknown element type",e.t);return}}static parseAlignmentToJustifyContent(e){switch(e){case 1:return"center";case 2:return"flex-end";case 0:return"flex-start";default:return"flex-start"}}},Ma=class extends lr{img;title;desc;price;compareAt;btn;variantDD;show;symbol;cBox;elems;noLinks;constructor(t){if(t??={},super(12,t),this.show=t.show,this.elems=tn.getParsedElements(t.elems),this.noLinks=t.noLinks,!this.elems.length){t.cBox&&this.elems.push(new Ah(t.cBox)),this.elems.push(new Bo(t.img,13));let e=new Ne(t.title,14);e.hide=!t.show?.title,e.text="{{ product.name }}",this.elems.push(e);let r=new Ne(t.price);r.text="{{ product.price }}",r.hide=!t.show?.price;let n=new Ne(t.compareAt);n.text="{{ product.compare_price }}",n.hide=!t.show?.price,t.compareAt||(n.style=new Dh(r.style),n.style.lg.typo=new Ge(yt(x({},n.style.lg.typo),{td:"line-through"})),n.style.sm.typo=new Ge(yt(x({},n.style.sm.typo),{td:"line-through"})));let i=new La({style:{lg:{spc:{mb:10},flex:{dir:"row",gap:10,ai:"center",jc:tn.parseAlignmentToJustifyContent(r.style.lg.typo?.ta)}}}});i.elems.push(n),i.elems.push(r),this.elems.push(i);let s=new Nh(15,t.variantDD);if(s.hide=!t.show?.variantDD,this.elems.push(s),t.btn){let o=new Uo(t.btn,18);o.hide=!t.show?.btn,this.elems.push(o)}}t.symbol&&(this.symbol=new Ne(t.symbol))}},rw=class extends lr{conf;prod;constructor(t){super(11,t),t??={},this.conf=new nw(t.conf),this.prod=new Ma(t.prod)}},Cl=class extends Oh{disp;maxItems;constructor(t){t??={},super(t),this.disp=t.disp,this.maxItems=t.maxItems}},nw=class{lg;sm;constructor(t){t??={},this.lg=new Cl(t.lg),this.sm=new Cl(t.sm)}},iw=class extends La{constructor(t){super(t)}},Ph=class{cont;elems=[];constructor(t){t=t??{},this.cont=new iw(t.cont),t.elems?.forEach(e=>{this.addRawElement(e)})}addRawElement(t){let e=tn.getParsedElement(t);return e&&this.elems.push(e),e}},sw=class{minValue;rewardType;label;reachingText;reachedText;discount;items;reached;calculatedAlignment;constructor(t){this.reached=t.reached??!1,this.calculatedAlignment=t.calculatedAlignment,this.minValue=t.minValue,this.rewardType=t.rewardType,this.label=t.label,this.reachingText=t.reachingText,this.reachedText=t.reachedText,this.discount=t.discount,this.items=t.items?.map(e=>new un(e))}},ow=class{layout;milestones;totalProgress;coupons;reachedAmountOrCount;onlyLatestGift;noConfetti;removeIneligibleItem;restrictToLatestFreebie;rewardBasis;constructor(t){this.layout=t.layout??wu.ICONS,this.onlyLatestGift=t.onlyLatestGift,this.noConfetti=t.noConfetti,this.removeIneligibleItem=t.removeIneligibleItem??!0,this.restrictToLatestFreebie=t.restrictToLatestFreebie,this.rewardBasis=t.rewardBasis??"CART_AMOUNT",this.update(t)}update(t){t=t??{},this.milestones=t.milestones?.map(e=>new sw(e))??[],this.totalProgress=t.totalProgress??0,this.coupons=t.coupons,this.reachedAmountOrCount=t.reachedAmountOrCount}},aw=class{applyDiscountOnMinimum;constructor(t){this.applyDiscountOnMinimum=t.applyDiscountOnMinimum}},cw=class{id;alt;sources;items;durationMS;thumbnail;constructor(t={}){this.id=t.id,this.alt=t.alt,this.sources=t.sources?.sort((e,r)=>r.height-e.height),this.durationMS=t.durationMS,this.thumbnail=t.thumbnail,this.items=t.items?t.items.map(e=>new Ve(e)):[]}},lw=class{videos;source;template;heading;slidePerViewCount;autoPlay;showMuteButton;footerContent;detailPopup;constructor(t={}){this.videos=t.videos?.map(e=>new cw(e))??[],this.source=t.source,this.template=t.template,this.detailPopup=t.detailPopup??{template:"VIDEO_ONLY_VIEW"},this.heading=t.heading,this.showMuteButton=t.showMuteButton,this.slidePerViewCount=t.slidePerViewCount??4,this.autoPlay=t.autoPlay??"ON",this.footerContent=t.footerContent??"FIRST_ITEM"}},uw=class{modifications;constructor(t={}){t.modifications?.length?this.modifications=t.modifications.map(e=>new Tl(e)):t.experiments?.length&&(this.modifications=t.experiments.map(e=>new Tl(e)))}},Tl=class{cssSelector;type;display;bg;typo;br;text;constructor(t={}){this.cssSelector=t.cssSelector??"",this.type=t.type??"OTHER",this.display=t.display,t.bg&&(this.bg=new re(t.bg)),t.typo&&(this.typo=new Ge(t.typo)),t.br&&(this.br=new Da(t.br)),this.text=t.text}get style(){let t={};return this.display==="HIDE"?t.display="none":this.display==="BLOCK"?t.display="block":this.display==="INLINE"&&(t.display="inline"),this.br?.r&&(t.borderRadius=this.br.r+"px"),this.br?.w&&(t.borderWidth=this.br.w+"px"),this.br?.s&&(t.borderStyle=Aa[this.br.s]?.toLowerCase()),this.br?.c?.h&&(t.borderColor=this.br.color?.rgba),this.bg?.h&&(t.backgroundColor=this.bg.rgba),this.type==="TEXT"&&this.typo&&(this.typo.fs&&(t.fontSize=this.typo.fs+"px"),this.typo.lh&&(t.lineHeight=this.typo.lh),this.typo.fw&&(t.fontWeight=this.typo.fw),this.typo.ta&&(t.textAlign=this.typo.alignment),this.typo.tc.h&&(t.color=this.typo.tc.rgba),this.typo.ls&&(t.letterSpacing=this.typo.letterSpacing),this.typo.td&&(t.textDecoration=this.typo.td??"none")),t}toString(){return`Experiment(cssSelector=${this.cssSelector})`}},hw=class{engagementID;shortID;contentType;delay;onsiteDeliveryType;objective;redirectBehaviour;constructor(t){this.shortID=t.shortID,this.contentType=t.contentType,this.engagementID=t.engagementID,this.delay=t.delay??0,this.redirectBehaviour=t.redirectBehaviour,this.onsiteDeliveryType=t.onsiteDeliveryType,this.objective=t.objective}isAnySplit(){return this.isABTesting()||this.isExclusionTesting()}isExclusionTesting(){return this.contentType===Ai.EXCLUSION}isABTesting(){return this.contentType===Ai.ABTESTING}isSingleContent(){return this.contentType===Ai.SINGLE}},Rh=class{videoConfig;constructor(t){t??={},t.videoConfig&&(this.videoConfig=new lw(t.videoConfig))}},Ar=class Lh extends hw{static SWIPER_ELEMENTS=new Set([11,62]);nudgeID;contentID;variation;ian;widget;discount;placement;promotionType;contentSource;manipulation;klaviyoFormID;hasMultiplePlacement;skipSubscribedItems;progressBarConfig;stickyATCConfig;bundleConfig;content;previewType;occurred;id;currency;props;items;nonMutableItems;embeddedItems;bundleFrom;collections;customerData;experimentConfig;discountData=Sr({});constructor(e){super(e),this.id=e.id,this.nudgeID=e.nudgeID,this.currency=Ot.get().currencyCode??"USD",this.contentID=e.contentID,this.variation=e.variation,e.widget&&(this.widget=new Ph(e.widget)),this.previewType=e.previewType,this.occurred=e.occurred??new Date,this.props=e.props,this.embeddedItems=e.embeddedItems?.map(r=>new un(r)),this.items=e.items?.map(r=>new Ve(r))??[],this.nonMutableItems=e.items?.map(r=>new Ve(r))??[],this.collections=e.collections?.map(r=>new Ov(r))??[],this.discount=e.discount,this.placement=e.placement,this.customerData=e.customerData,this.ian=e.ian?this.processPopup(e.ian):void 0,this.promotionType=e.promotionType,this.manipulation=new Rv(e.manipulation),this.contentSource=e.contentSource,this.klaviyoFormID=e.klaviyoFormID,this.hasMultiplePlacement=e.hasMultiplePlacement,this.skipSubscribedItems=e.skipSubscribedItems,this.stickyATCConfig=e.stickyATCConfig,e.experimentConfig&&(this.experimentConfig=new uw(e.experimentConfig)),e.progressBarConfig&&(this.progressBarConfig=new ow(e.progressBarConfig)),e.bundleConfig&&(this.bundleConfig=new aw(e.bundleConfig)),e.bundleFrom&&(this.bundleFrom=new Ve(e.bundleFrom)),e.content&&(this.content=new Rh(e.content))}shouldDelay(){return this.delay>0}sentryContext(){return{id:this.id,shortID:this.shortID,currency:this.currency,contentType:this.contentType,objective:this.objective,onsiteDeliveryType:this.onsiteDeliveryType,engagementID:this.engagementID,contentID:this.contentID,nudgeID:this.nudgeID,variation:this.variation}}getDelaySeconds(){let e=new Date().getTime()-this.occurred.getTime();return this.delay*1e3-e}isBundle(){return this.objective===Re.BUNDLE_AND_UPSELL}isCartEmbed(){return this.onsiteDeliveryType===lo.CART_EMBED}isPageEmbed(){return this.onsiteDeliveryType===lo.PAGE_EMBED}isProgressBar(){return this.objective===Re.PROGRESS_BAR}isSubscriptionUpsell(){return this.objective===Re.SUBSCRIPTION_UPSELL}isCartRecovery(){return this.objective===Re.CART_RECOVERY}isProductPromotion(){return this.objective===Re.PRODUCT_PROMOTION}isProductPromoted(){return this.isProductPromotion()||this.isBundle()||this.isCartRecovery()}isCollectionPromoted(){return this.isProductPromotion()&&this.collections.length>0&&this.promotionType===yu.COLLECTION}isBYOB(){return this.objective===Re.BYOB}isStickyATC(){return this.objective===Re.STICKY_ATC}isShoppableVideo(){return this.objective===Re.SHOPPABLE_VIDEO}processPopup(e){let r=JSON.stringify(e),n=this.items[0],i={},s={};if(n){let l=n.selectedOrFirstVariant.value;i={name:n.name,id:n.mID,link:n.link,vID:l.mID,image:n.variantImage,price:De(l.price.d),comparePrice:De(l.price.cmp),quantity:n.quantity},s={quantity:l.quantity}}let o={productCount:xt.getCurrent().item_count},c=Fe.render(r,{product:i,variant:s,cart:o,discount:this.discount,customer:this.customerData});return n&&(c=c.replace(new RegExp(H.PLACEHOLDER_IMAGE,"gi"),n.variantImage??n.imageURL)),new zv(JSON.parse(c))}calculateDiscountData(e,r){let n=Ni.sum(e,o=>o.selectedOrFirstVariant.value.price.d),i=Ni.sum(e,o=>{let c=o.selectedOrFirstVariant.value.price;return c.cmp??c.d}),s={actualPrice:n,totalComparePrice:i,discountAmount:0,discountPercentage:0,discountedPrice:n};if(!e?.length||!r||!this.discount?.type){this.discountData.value=this.formatCurrencyAndNumber(s);return}if(ge.BXGY===this.discount.type&&this.discount.values?.length)s.discountPercentage=this.discount.values[0],this.updateEffectivePrice(e,s.discountPercentage,!0),s.discountAmount=s.actualPrice-Ni.sum(e,o=>o.selectedOrFirstVariant.value.effectivePrice.value);else if([ge.UNIQUE_FLAT_ITEMS,ge.STATIC,ge.UNIQUE_FLAT].includes(this.discount.type)&&this.discount.values?.length)s.discountPercentage=this.discount.values[0],s.discountAmount=s.actualPrice*s.discountPercentage/100,this.updateEffectivePrice(e,s.discountPercentage);else if(this.discount.type===ge.UNIQUE_FIXED_ITEMS&&this.discount.values?.length)s.discountAmount=s.actualPrice-this.discount.values[0],s.discountPercentage=s.discountAmount/s.actualPrice*100,this.updateEffectivePrice(e,s.discountPercentage);else if(this.discount.type===ge.UNIQUE_CHEAPEST_ITEM_FREE){e.sort((c,l)=>l.selectedOrFirstVariant.value.price.d-c.selectedOrFirstVariant.value.price.d);let o=e[e.length-1];o.selectedOrFirstVariant.value.effectivePrice.value=0,s.discountAmount=o.selectedOrFirstVariant.value.price.d,s.discountPercentage=s.discountAmount/s.actualPrice*100}s.discountedPrice=s.actualPrice-s.discountAmount,this.discountData.value=this.formatCurrencyAndNumber(s)}getPrivateAttributesForLineItem(){return ne.get().skipItemAttribute?{}:{[H.VIA]:"Cooee",[H.CAMPAIGN_ATTRIBUTE]:this.shortID,[H.CONTENT_ATTRIBUTE]:this.contentID}}getKVFormatPrivateAttributesForLineItem(){return ne.get().skipItemAttribute?[]:[{key:H.VIA,value:"Cooee"},{key:H.CAMPAIGN_ATTRIBUTE,value:this.shortID},{key:H.CONTENT_ATTRIBUTE,value:this.contentID}]}isBundleDiscount(){return[ge.UNIQUE_FIXED_ITEMS,ge.UNIQUE_FLAT_ITEMS].includes(this.discount.type)}isBundleOnCartDrawer(){return this.isBundle()&&this.isCartEmbed()}isBundleOnPDP(){return this.isPageEmbed()&&this.isBundle()}hasSwiperElement(){let e=this.widget?.elems.find(n=>Lh.SWIPER_ELEMENTS.has(n.t));if(!e)return!1;if(e.t===62)return!0;let r=Vn.get().isMobile()?"sm":"lg";return e.conf[r].disp===2}toString(){return`Engagement(id=${this.shortID})`}getCartMagicVariables(){let e=xt.getCurrent();return{productCount:e.item_count,amount:De(e.total_price/100),originalAmount:De(e.original_total_price/100)}}updateEffectivePrice(e,r,n=!1){let i=Ot.get().getCurrentItem();e.forEach(s=>{let o=s.selectedOrFirstVariant.value,c=o.price;if(n&&s.mID===i.mID)o.effectivePrice.value=c.d;else{let l=c.d*r/100;o.effectivePrice.value=c.d-l}})}formatCurrencyAndNumber(e){if(!e)return{};let r={discountPercentage:Cv(e.discountPercentage??0),discountCode:this.discount?.code};return["actualPrice","discountAmount","discountedPrice","totalComparePrice"].map(n=>{r[n]=De(e[n])}),r}};function pw(t,e){return e={exports:{}},t(e,e.exports),e.exports}var dw=yw,fw=ww,gw=Ew,Ae=[],ue=[],mw=typeof Uint8Array<"u"?Uint8Array:Array,Bs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(pr=0,xl=Bs.length;pr<xl;++pr)Ae[pr]=Bs[pr],ue[Bs.charCodeAt(pr)]=pr;var pr,xl;ue[45]=62;ue[95]=63;function Mh(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function yw(t){var e=Mh(t),r=e[0],n=e[1];return(r+n)*3/4-n}function vw(t,e,r){return(e+r)*3/4-r}function ww(t){var e,r=Mh(t),n=r[0],i=r[1],s=new mw(vw(t,n,i)),o=0,c=i>0?n-4:n,l;for(l=0;l<c;l+=4)e=ue[t.charCodeAt(l)]<<18|ue[t.charCodeAt(l+1)]<<12|ue[t.charCodeAt(l+2)]<<6|ue[t.charCodeAt(l+3)],s[o++]=e>>16&255,s[o++]=e>>8&255,s[o++]=e&255;return i===2&&(e=ue[t.charCodeAt(l)]<<2|ue[t.charCodeAt(l+1)]>>4,s[o++]=e&255),i===1&&(e=ue[t.charCodeAt(l)]<<10|ue[t.charCodeAt(l+1)]<<4|ue[t.charCodeAt(l+2)]>>2,s[o++]=e>>8&255,s[o++]=e&255),s}function bw(t){return Ae[t>>18&63]+Ae[t>>12&63]+Ae[t>>6&63]+Ae[t&63]}function _w(t,e,r){for(var n,i=[],s=e;s<r;s+=3)n=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),i.push(bw(n));return i.join("")}function Ew(t){for(var e,r=t.length,n=r%3,i=[],s=16383,o=0,c=r-n;o<c;o+=s)i.push(_w(t,o,o+s>c?c:o+s));return n===1?(e=t[r-1],i.push(Ae[e>>2]+Ae[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(Ae[e>>10]+Ae[e>>4&63]+Ae[e<<2&63]+"=")),i.join("")}var js={byteLength:dw,toByteArray:fw,fromByteArray:gw},Sw=function(t,e,r,n,i){var s,o,c=i*8-n-1,l=(1<<c)-1,p=l>>1,d=-7,h=r?i-1:0,b=r?-1:1,v=t[e+h];for(h+=b,s=v&(1<<-d)-1,v>>=-d,d+=c;d>0;s=s*256+t[e+h],h+=b,d-=8);for(o=s&(1<<-d)-1,s>>=-d,d+=n;d>0;o=o*256+t[e+h],h+=b,d-=8);if(s===0)s=1-p;else{if(s===l)return o?NaN:(v?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-p}return(v?-1:1)*o*Math.pow(2,s-n)},Iw=function(t,e,r,n,i,s){var o,c,l,p=s*8-i-1,d=(1<<p)-1,h=d>>1,b=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=n?0:s-1,w=n?1:-1,_=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,o=d):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+h>=1?e+=b/l:e+=b*Math.pow(2,1-h),e*l>=2&&(o++,l/=2),o+h>=d?(c=0,o=d):o+h>=1?(c=(e*l-1)*Math.pow(2,i),o=o+h):(c=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[r+v]=c&255,v+=w,c/=256,i-=8);for(o=o<<i|c,p+=i;p>0;t[r+v]=o&255,v+=w,o/=256,p-=8);t[r+v-w]|=_*128},Ur={read:Sw,write:Iw},ps=pw(function(t,e){var r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=o,e.SlowBuffer=A,e.INSPECT_MAX_BYTES=50;var n=2147483647;e.kMaxLength=n,o.TYPED_ARRAY_SUPPORT=i(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var a=new Uint8Array(1),u={foo:function(){return 42}};return Object.setPrototypeOf(u,Uint8Array.prototype),Object.setPrototypeOf(a,u),a.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function s(a){if(a>n)throw new RangeError('The value "'+a+'" is invalid for option "size"');var u=new Uint8Array(a);return Object.setPrototypeOf(u,o.prototype),u}function o(a,u,f){if(typeof a=="number"){if(typeof u=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(a)}return c(a,u,f)}o.poolSize=8192;function c(a,u,f){if(typeof a=="string")return h(a,u);if(ArrayBuffer.isView(a))return v(a);if(a==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(a));if(ae(a,ArrayBuffer)||a&&ae(a.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ae(a,SharedArrayBuffer)||a&&ae(a.buffer,SharedArrayBuffer)))return w(a,u,f);if(typeof a=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var E=a.valueOf&&a.valueOf();if(E!=null&&E!==a)return o.from(E,u,f);var D=_(a);if(D)return D;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof a[Symbol.toPrimitive]=="function")return o.from(a[Symbol.toPrimitive]("string"),u,f);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(a))}o.from=function(a,u,f){return c(a,u,f)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function l(a){if(typeof a!="number")throw new TypeError('"size" argument must be of type number');if(a<0)throw new RangeError('The value "'+a+'" is invalid for option "size"')}function p(a,u,f){return l(a),a<=0?s(a):u!==void 0?typeof f=="string"?s(a).fill(u,f):s(a).fill(u):s(a)}o.alloc=function(a,u,f){return p(a,u,f)};function d(a){return l(a),s(a<0?0:k(a)|0)}o.allocUnsafe=function(a){return d(a)},o.allocUnsafeSlow=function(a){return d(a)};function h(a,u){if((typeof u!="string"||u==="")&&(u="utf8"),!o.isEncoding(u))throw new TypeError("Unknown encoding: "+u);var f=B(a,u)|0,E=s(f),D=E.write(a,u);return D!==f&&(E=E.slice(0,D)),E}function b(a){for(var u=a.length<0?0:k(a.length)|0,f=s(u),E=0;E<u;E+=1)f[E]=a[E]&255;return f}function v(a){if(ae(a,Uint8Array)){var u=new Uint8Array(a);return w(u.buffer,u.byteOffset,u.byteLength)}return b(a)}function w(a,u,f){if(u<0||a.byteLength<u)throw new RangeError('"offset" is outside of buffer bounds');if(a.byteLength<u+(f||0))throw new RangeError('"length" is outside of buffer bounds');var E;return u===void 0&&f===void 0?E=new Uint8Array(a):f===void 0?E=new Uint8Array(a,u):E=new Uint8Array(a,u,f),Object.setPrototypeOf(E,o.prototype),E}function _(a){if(o.isBuffer(a)){var u=k(a.length)|0,f=s(u);return f.length===0||a.copy(f,0,0,u),f}if(a.length!==void 0)return typeof a.length!="number"||fn(a.length)?s(0):b(a);if(a.type==="Buffer"&&Array.isArray(a.data))return b(a.data)}function k(a){if(a>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return a|0}function A(a){return+a!=a&&(a=0),o.alloc(+a)}o.isBuffer=function(a){return a!=null&&a._isBuffer===!0&&a!==o.prototype},o.compare=function(a,u){if(ae(a,Uint8Array)&&(a=o.from(a,a.offset,a.byteLength)),ae(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),!o.isBuffer(a)||!o.isBuffer(u))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(a===u)return 0;for(var f=a.length,E=u.length,D=0,M=Math.min(f,E);D<M;++D)if(a[D]!==u[D]){f=a[D],E=u[D];break}return f<E?-1:E<f?1:0},o.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(a,u){if(!Array.isArray(a))throw new TypeError('"list" argument must be an Array of Buffers');if(a.length===0)return o.alloc(0);var f;if(u===void 0)for(u=0,f=0;f<a.length;++f)u+=a[f].length;var E=o.allocUnsafe(u),D=0;for(f=0;f<a.length;++f){var M=a[f];if(ae(M,Uint8Array))D+M.length>E.length?o.from(M).copy(E,D):Uint8Array.prototype.set.call(E,M,D);else if(o.isBuffer(M))M.copy(E,D);else throw new TypeError('"list" argument must be an Array of Buffers');D+=M.length}return E};function B(a,u){if(o.isBuffer(a))return a.length;if(ArrayBuffer.isView(a)||ae(a,ArrayBuffer))return a.byteLength;if(typeof a!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(a));var f=a.length,E=arguments.length>2&&arguments[2]===!0;if(!E&&f===0)return 0;for(var D=!1;;)switch(u){case"ascii":case"latin1":case"binary":return f;case"utf8":case"utf-8":return dn(a).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f*2;case"hex":return f>>>1;case"base64":return hi(a).length;default:if(D)return E?-1:dn(a).length;u=(""+u).toLowerCase(),D=!0}}o.byteLength=B;function G(a,u,f){var E=!1;if((u===void 0||u<0)&&(u=0),u>this.length||((f===void 0||f>this.length)&&(f=this.length),f<=0)||(f>>>=0,u>>>=0,f<=u))return"";for(a||(a="utf8");;)switch(a){case"hex":return Gt(this,u,f);case"utf8":case"utf-8":return kt(this,u,f);case"ascii":return Wt(this,u,f);case"latin1":case"binary":return ft(this,u,f);case"base64":return lt(this,u,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return st(this,u,f);default:if(E)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase(),E=!0}}o.prototype._isBuffer=!0;function j(a,u,f){var E=a[u];a[u]=a[f],a[f]=E}o.prototype.swap16=function(){var a=this.length;if(a%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var u=0;u<a;u+=2)j(this,u,u+1);return this},o.prototype.swap32=function(){var a=this.length;if(a%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var u=0;u<a;u+=4)j(this,u,u+3),j(this,u+1,u+2);return this},o.prototype.swap64=function(){var a=this.length;if(a%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var u=0;u<a;u+=8)j(this,u,u+7),j(this,u+1,u+6),j(this,u+2,u+5),j(this,u+3,u+4);return this},o.prototype.toString=function(){var a=this.length;return a===0?"":arguments.length===0?kt(this,0,a):G.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(a){if(!o.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?!0:o.compare(this,a)===0},o.prototype.inspect=function(){var a="",u=e.INSPECT_MAX_BYTES;return a=this.toString("hex",0,u).replace(/(.{2})/g,"$1 ").trim(),this.length>u&&(a+=" ... "),"<Buffer "+a+">"},r&&(o.prototype[r]=o.prototype.inspect),o.prototype.compare=function(a,u,f,E,D){if(ae(a,Uint8Array)&&(a=o.from(a,a.offset,a.byteLength)),!o.isBuffer(a))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(a));if(u===void 0&&(u=0),f===void 0&&(f=a?a.length:0),E===void 0&&(E=0),D===void 0&&(D=this.length),u<0||f>a.length||E<0||D>this.length)throw new RangeError("out of range index");if(E>=D&&u>=f)return 0;if(E>=D)return-1;if(u>=f)return 1;if(u>>>=0,f>>>=0,E>>>=0,D>>>=0,this===a)return 0;for(var M=D-E,Y=f-u,ut=Math.min(M,Y),Nt=this.slice(E,D),gt=a.slice(u,f),St=0;St<ut;++St)if(Nt[St]!==gt[St]){M=Nt[St],Y=gt[St];break}return M<Y?-1:Y<M?1:0};function X(a,u,f,E,D){if(a.length===0)return-1;if(typeof f=="string"?(E=f,f=0):f>2147483647?f=2147483647:f<-2147483648&&(f=-2147483648),f=+f,fn(f)&&(f=D?0:a.length-1),f<0&&(f=a.length+f),f>=a.length){if(D)return-1;f=a.length-1}else if(f<0)if(D)f=0;else return-1;if(typeof u=="string"&&(u=o.from(u,E)),o.isBuffer(u))return u.length===0?-1:_t(a,u,f,E,D);if(typeof u=="number")return u=u&255,typeof Uint8Array.prototype.indexOf=="function"?D?Uint8Array.prototype.indexOf.call(a,u,f):Uint8Array.prototype.lastIndexOf.call(a,u,f):_t(a,[u],f,E,D);throw new TypeError("val must be string, number or Buffer")}function _t(a,u,f,E,D){var M=1,Y=a.length,ut=u.length;if(E!==void 0&&(E=String(E).toLowerCase(),E==="ucs2"||E==="ucs-2"||E==="utf16le"||E==="utf-16le")){if(a.length<2||u.length<2)return-1;M=2,Y/=2,ut/=2,f/=2}function Nt(gn,mn){return M===1?gn[mn]:gn.readUInt16BE(mn*M)}var gt;if(D){var St=-1;for(gt=f;gt<Y;gt++)if(Nt(a,gt)===Nt(u,St===-1?0:gt-St)){if(St===-1&&(St=gt),gt-St+1===ut)return St*M}else St!==-1&&(gt-=gt-St),St=-1}else for(f+ut>Y&&(f=Y-ut),gt=f;gt>=0;gt--){for(var Ut=!0,hr=0;hr<ut;hr++)if(Nt(a,gt+hr)!==Nt(u,hr)){Ut=!1;break}if(Ut)return gt}return-1}o.prototype.includes=function(a,u,f){return this.indexOf(a,u,f)!==-1},o.prototype.indexOf=function(a,u,f){return X(this,a,u,f,!0)},o.prototype.lastIndexOf=function(a,u,f){return X(this,a,u,f,!1)};function Dt(a,u,f,E){f=Number(f)||0;var D=a.length-f;E?(E=Number(E),E>D&&(E=D)):E=D;var M=u.length;E>M/2&&(E=M/2);for(var Y=0;Y<E;++Y){var ut=parseInt(u.substr(Y*2,2),16);if(fn(ut))return Y;a[f+Y]=ut}return Y}function q(a,u,f,E){return Lr(dn(u,a.length-f),a,f,E)}function rt(a,u,f,E){return Lr(Ss(u),a,f,E)}function Q(a,u,f,E){return Lr(hi(u),a,f,E)}function tt(a,u,f,E){return Lr(Is(u,a.length-f),a,f,E)}o.prototype.write=function(a,u,f,E){if(u===void 0)E="utf8",f=this.length,u=0;else if(f===void 0&&typeof u=="string")E=u,f=this.length,u=0;else if(isFinite(u))u=u>>>0,isFinite(f)?(f=f>>>0,E===void 0&&(E="utf8")):(E=f,f=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var D=this.length-u;if((f===void 0||f>D)&&(f=D),a.length>0&&(f<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");E||(E="utf8");for(var M=!1;;)switch(E){case"hex":return Dt(this,a,u,f);case"utf8":case"utf-8":return q(this,a,u,f);case"ascii":case"latin1":case"binary":return rt(this,a,u,f);case"base64":return Q(this,a,u,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return tt(this,a,u,f);default:if(M)throw new TypeError("Unknown encoding: "+E);E=(""+E).toLowerCase(),M=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function lt(a,u,f){return u===0&&f===a.length?js.fromByteArray(a):js.fromByteArray(a.slice(u,f))}function kt(a,u,f){f=Math.min(a.length,f);for(var E=[],D=u;D<f;){var M=a[D],Y=null,ut=M>239?4:M>223?3:M>191?2:1;if(D+ut<=f){var Nt,gt,St,Ut;switch(ut){case 1:M<128&&(Y=M);break;case 2:Nt=a[D+1],(Nt&192)===128&&(Ut=(M&31)<<6|Nt&63,Ut>127&&(Y=Ut));break;case 3:Nt=a[D+1],gt=a[D+2],(Nt&192)===128&&(gt&192)===128&&(Ut=(M&15)<<12|(Nt&63)<<6|gt&63,Ut>2047&&(Ut<55296||Ut>57343)&&(Y=Ut));break;case 4:Nt=a[D+1],gt=a[D+2],St=a[D+3],(Nt&192)===128&&(gt&192)===128&&(St&192)===128&&(Ut=(M&15)<<18|(Nt&63)<<12|(gt&63)<<6|St&63,Ut>65535&&Ut<1114112&&(Y=Ut))}}Y===null?(Y=65533,ut=1):Y>65535&&(Y-=65536,E.push(Y>>>10&1023|55296),Y=56320|Y&1023),E.push(Y),D+=ut}return jt(E)}var At=4096;function jt(a){var u=a.length;if(u<=At)return String.fromCharCode.apply(String,a);for(var f="",E=0;E<u;)f+=String.fromCharCode.apply(String,a.slice(E,E+=At));return f}function Wt(a,u,f){var E="";f=Math.min(a.length,f);for(var D=u;D<f;++D)E+=String.fromCharCode(a[D]&127);return E}function ft(a,u,f){var E="";f=Math.min(a.length,f);for(var D=u;D<f;++D)E+=String.fromCharCode(a[D]);return E}function Gt(a,u,f){var E=a.length;(!u||u<0)&&(u=0),(!f||f<0||f>E)&&(f=E);for(var D="",M=u;M<f;++M)D+=Cs[a[M]];return D}function st(a,u,f){for(var E=a.slice(u,f),D="",M=0;M<E.length-1;M+=2)D+=String.fromCharCode(E[M]+E[M+1]*256);return D}o.prototype.slice=function(a,u){var f=this.length;a=~~a,u=u===void 0?f:~~u,a<0?(a+=f,a<0&&(a=0)):a>f&&(a=f),u<0?(u+=f,u<0&&(u=0)):u>f&&(u=f),u<a&&(u=a);var E=this.subarray(a,u);return Object.setPrototypeOf(E,o.prototype),E};function et(a,u,f){if(a%1!==0||a<0)throw new RangeError("offset is not uint");if(a+u>f)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(a,u,f){a=a>>>0,u=u>>>0,f||et(a,u,this.length);for(var E=this[a],D=1,M=0;++M<u&&(D*=256);)E+=this[a+M]*D;return E},o.prototype.readUintBE=o.prototype.readUIntBE=function(a,u,f){a=a>>>0,u=u>>>0,f||et(a,u,this.length);for(var E=this[a+--u],D=1;u>0&&(D*=256);)E+=this[a+--u]*D;return E},o.prototype.readUint8=o.prototype.readUInt8=function(a,u){return a=a>>>0,u||et(a,1,this.length),this[a]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(a,u){return a=a>>>0,u||et(a,2,this.length),this[a]|this[a+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(a,u){return a=a>>>0,u||et(a,2,this.length),this[a]<<8|this[a+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(a,u){return a=a>>>0,u||et(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+this[a+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(a,u){return a=a>>>0,u||et(a,4,this.length),this[a]*16777216+(this[a+1]<<16|this[a+2]<<8|this[a+3])},o.prototype.readIntLE=function(a,u,f){a=a>>>0,u=u>>>0,f||et(a,u,this.length);for(var E=this[a],D=1,M=0;++M<u&&(D*=256);)E+=this[a+M]*D;return D*=128,E>=D&&(E-=Math.pow(2,8*u)),E},o.prototype.readIntBE=function(a,u,f){a=a>>>0,u=u>>>0,f||et(a,u,this.length);for(var E=u,D=1,M=this[a+--E];E>0&&(D*=256);)M+=this[a+--E]*D;return D*=128,M>=D&&(M-=Math.pow(2,8*u)),M},o.prototype.readInt8=function(a,u){return a=a>>>0,u||et(a,1,this.length),this[a]&128?(255-this[a]+1)*-1:this[a]},o.prototype.readInt16LE=function(a,u){a=a>>>0,u||et(a,2,this.length);var f=this[a]|this[a+1]<<8;return f&32768?f|4294901760:f},o.prototype.readInt16BE=function(a,u){a=a>>>0,u||et(a,2,this.length);var f=this[a+1]|this[a]<<8;return f&32768?f|4294901760:f},o.prototype.readInt32LE=function(a,u){return a=a>>>0,u||et(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},o.prototype.readInt32BE=function(a,u){return a=a>>>0,u||et(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},o.prototype.readFloatLE=function(a,u){return a=a>>>0,u||et(a,4,this.length),Ur.read(this,a,!0,23,4)},o.prototype.readFloatBE=function(a,u){return a=a>>>0,u||et(a,4,this.length),Ur.read(this,a,!1,23,4)},o.prototype.readDoubleLE=function(a,u){return a=a>>>0,u||et(a,8,this.length),Ur.read(this,a,!0,52,8)},o.prototype.readDoubleBE=function(a,u){return a=a>>>0,u||et(a,8,this.length),Ur.read(this,a,!1,52,8)};function $t(a,u,f,E,D,M){if(!o.isBuffer(a))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>D||u<M)throw new RangeError('"value" argument is out of bounds');if(f+E>a.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(a,u,f,E){if(a=+a,u=u>>>0,f=f>>>0,!E){var D=Math.pow(2,8*f)-1;$t(this,a,u,f,D,0)}var M=1,Y=0;for(this[u]=a&255;++Y<f&&(M*=256);)this[u+Y]=a/M&255;return u+f},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(a,u,f,E){if(a=+a,u=u>>>0,f=f>>>0,!E){var D=Math.pow(2,8*f)-1;$t(this,a,u,f,D,0)}var M=f-1,Y=1;for(this[u+M]=a&255;--M>=0&&(Y*=256);)this[u+M]=a/Y&255;return u+f},o.prototype.writeUint8=o.prototype.writeUInt8=function(a,u,f){return a=+a,u=u>>>0,f||$t(this,a,u,1,255,0),this[u]=a&255,u+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(a,u,f){return a=+a,u=u>>>0,f||$t(this,a,u,2,65535,0),this[u]=a&255,this[u+1]=a>>>8,u+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(a,u,f){return a=+a,u=u>>>0,f||$t(this,a,u,2,65535,0),this[u]=a>>>8,this[u+1]=a&255,u+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(a,u,f){return a=+a,u=u>>>0,f||$t(this,a,u,4,4294967295,0),this[u+3]=a>>>24,this[u+2]=a>>>16,this[u+1]=a>>>8,this[u]=a&255,u+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(a,u,f){return a=+a,u=u>>>0,f||$t(this,a,u,4,4294967295,0),this[u]=a>>>24,this[u+1]=a>>>16,this[u+2]=a>>>8,this[u+3]=a&255,u+4},o.prototype.writeIntLE=function(a,u,f,E){if(a=+a,u=u>>>0,!E){var D=Math.pow(2,8*f-1);$t(this,a,u,f,D-1,-D)}var M=0,Y=1,ut=0;for(this[u]=a&255;++M<f&&(Y*=256);)a<0&&ut===0&&this[u+M-1]!==0&&(ut=1),this[u+M]=(a/Y>>0)-ut&255;return u+f},o.prototype.writeIntBE=function(a,u,f,E){if(a=+a,u=u>>>0,!E){var D=Math.pow(2,8*f-1);$t(this,a,u,f,D-1,-D)}var M=f-1,Y=1,ut=0;for(this[u+M]=a&255;--M>=0&&(Y*=256);)a<0&&ut===0&&this[u+M+1]!==0&&(ut=1),this[u+M]=(a/Y>>0)-ut&255;return u+f},o.prototype.writeInt8=function(a,u,f){return a=+a,u=u>>>0,f||$t(this,a,u,1,127,-128),a<0&&(a=255+a+1),this[u]=a&255,u+1},o.prototype.writeInt16LE=function(a,u,f){return a=+a,u=u>>>0,f||$t(this,a,u,2,32767,-32768),this[u]=a&255,this[u+1]=a>>>8,u+2},o.prototype.writeInt16BE=function(a,u,f){return a=+a,u=u>>>0,f||$t(this,a,u,2,32767,-32768),this[u]=a>>>8,this[u+1]=a&255,u+2},o.prototype.writeInt32LE=function(a,u,f){return a=+a,u=u>>>0,f||$t(this,a,u,4,2147483647,-2147483648),this[u]=a&255,this[u+1]=a>>>8,this[u+2]=a>>>16,this[u+3]=a>>>24,u+4},o.prototype.writeInt32BE=function(a,u,f){return a=+a,u=u>>>0,f||$t(this,a,u,4,2147483647,-2147483648),a<0&&(a=4294967295+a+1),this[u]=a>>>24,this[u+1]=a>>>16,this[u+2]=a>>>8,this[u+3]=a&255,u+4};function ci(a,u,f,E,D,M){if(f+E>a.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("Index out of range")}function li(a,u,f,E,D){return u=+u,f=f>>>0,D||ci(a,u,f,4),Ur.write(a,u,f,E,23,4),f+4}o.prototype.writeFloatLE=function(a,u,f){return li(this,a,u,!0,f)},o.prototype.writeFloatBE=function(a,u,f){return li(this,a,u,!1,f)};function oe(a,u,f,E,D){return u=+u,f=f>>>0,D||ci(a,u,f,8),Ur.write(a,u,f,E,52,8),f+8}o.prototype.writeDoubleLE=function(a,u,f){return oe(this,a,u,!0,f)},o.prototype.writeDoubleBE=function(a,u,f){return oe(this,a,u,!1,f)},o.prototype.copy=function(a,u,f,E){if(!o.isBuffer(a))throw new TypeError("argument should be a Buffer");if(f||(f=0),!E&&E!==0&&(E=this.length),u>=a.length&&(u=a.length),u||(u=0),E>0&&E<f&&(E=f),E===f||a.length===0||this.length===0)return 0;if(u<0)throw new RangeError("targetStart out of bounds");if(f<0||f>=this.length)throw new RangeError("Index out of range");if(E<0)throw new RangeError("sourceEnd out of bounds");E>this.length&&(E=this.length),a.length-u<E-f&&(E=a.length-u+f);var D=E-f;return this===a&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(u,f,E):Uint8Array.prototype.set.call(a,this.subarray(f,E),u),D},o.prototype.fill=function(a,u,f,E){if(typeof a=="string"){if(typeof u=="string"?(E=u,u=0,f=this.length):typeof f=="string"&&(E=f,f=this.length),E!==void 0&&typeof E!="string")throw new TypeError("encoding must be a string");if(typeof E=="string"&&!o.isEncoding(E))throw new TypeError("Unknown encoding: "+E);if(a.length===1){var D=a.charCodeAt(0);(E==="utf8"&&D<128||E==="latin1")&&(a=D)}}else typeof a=="number"?a=a&255:typeof a=="boolean"&&(a=Number(a));if(u<0||this.length<u||this.length<f)throw new RangeError("Out of range index");if(f<=u)return this;u=u>>>0,f=f===void 0?this.length:f>>>0,a||(a=0);var M;if(typeof a=="number")for(M=u;M<f;++M)this[M]=a;else{var Y=o.isBuffer(a)?a:o.from(a,E),ut=Y.length;if(ut===0)throw new TypeError('The value "'+a+'" is invalid for argument "value"');for(M=0;M<f-u;++M)this[M+u]=Y[M%ut]}return this};var ui=/[^+/0-9A-Za-z-_]/g;function Es(a){if(a=a.split("=")[0],a=a.trim().replace(ui,""),a.length<2)return"";for(;a.length%4!==0;)a=a+"=";return a}function dn(a,u){u=u||1/0;for(var f,E=a.length,D=null,M=[],Y=0;Y<E;++Y){if(f=a.charCodeAt(Y),f>55295&&f<57344){if(!D){if(f>56319){(u-=3)>-1&&M.push(239,191,189);continue}else if(Y+1===E){(u-=3)>-1&&M.push(239,191,189);continue}D=f;continue}if(f<56320){(u-=3)>-1&&M.push(239,191,189),D=f;continue}f=(D-55296<<10|f-56320)+65536}else D&&(u-=3)>-1&&M.push(239,191,189);if(D=null,f<128){if((u-=1)<0)break;M.push(f)}else if(f<2048){if((u-=2)<0)break;M.push(f>>6|192,f&63|128)}else if(f<65536){if((u-=3)<0)break;M.push(f>>12|224,f>>6&63|128,f&63|128)}else if(f<1114112){if((u-=4)<0)break;M.push(f>>18|240,f>>12&63|128,f>>6&63|128,f&63|128)}else throw new Error("Invalid code point")}return M}function Ss(a){for(var u=[],f=0;f<a.length;++f)u.push(a.charCodeAt(f)&255);return u}function Is(a,u){for(var f,E,D,M=[],Y=0;Y<a.length&&!((u-=2)<0);++Y)f=a.charCodeAt(Y),E=f>>8,D=f%256,M.push(D),M.push(E);return M}function hi(a){return js.toByteArray(Es(a))}function Lr(a,u,f,E){for(var D=0;D<E&&!(D+f>=u.length||D>=a.length);++D)u[D+f]=a[D];return D}function ae(a,u){return a instanceof u||a!=null&&a.constructor!=null&&a.constructor.name!=null&&a.constructor.name===u.name}function fn(a){return a!==a}var Cs=function(){for(var a="0123456789abcdef",u=new Array(256),f=0;f<16;++f)for(var E=f*16,D=0;D<16;++D)u[E+D]=a[f]+a[D];return u}()}),ct=ps.Buffer;ps.SlowBuffer;ps.INSPECT_MAX_BYTES;ps.kMaxLength;var jo=function(t,e){return jo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},jo(t,e)};function ds(t,e){jo(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var _r=function(t){ds(e,t);function e(r){var n=t.call(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),e}(Error),Tt=function(t){ds(e,t);function e(r){var n=t.call(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),e}(TypeError);function Si(t){return t&&t.Math==Math&&t}function Uh(){return Si(typeof globalThis=="object"&&globalThis)||Si(typeof window=="object"&&window)||Si(typeof self=="object"&&self)||Si(typeof global=="object"&&global)||Function("return this")()}function Cw(){var t=Uh();return typeof t.navigator=="object"&&t.navigator.product==="ReactNative"}var Tw=function(t){var e=Cw()?"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 r=ct.alloc(t),n=0;n<t;++n)r[n]=Math.floor(Math.random()*256);return r},xw=function(){{if(typeof window<"u"){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(ct.alloc(e))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(e){return global.crypto.getRandomValues(ct.alloc(e))}:Tw}},Bh=xw();function Dw(t){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(t))}function Ua(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function Aw(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function Nw(t){return ii(t)&&Object.prototype.toString.call(t)==="[object Date]"}function ii(t){return typeof t=="object"&&t!==null}function fs(t,e){var r=!1;function n(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return r||(console.warn(e),r=!0),t.apply(this,i)}return n}function zi(t){if(ArrayBuffer.isView(t))return ct.from(t.buffer,t.byteOffset,t.byteLength);if(Dw(t))return ct.from(t);throw new Tt("Must use either Buffer or TypedArray")}var Ow=/^(?:[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,jh=function(t){return typeof t=="string"&&Ow.test(t)},$o=function(t){if(!jh(t))throw new Tt('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 ct.from(e,"hex")},Dl=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")},yE=Math.pow(2,63)-1,vE=-Math.pow(2,63),kw=Math.pow(2,53),Pw=-Math.pow(2,53),$h=4,Er=function(){function t(e,r){if(!(this instanceof t))return new t(e,r);if(e!=null&&typeof e!="string"&&!ArrayBuffer.isView(e)&&!(e instanceof ArrayBuffer)&&!Array.isArray(e))throw new Tt("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=r??t.BSON_BINARY_SUBTYPE_DEFAULT,e==null?(this.buffer=ct.alloc(t.BUFFER_SIZE),this.position=0):(typeof e=="string"?this.buffer=ct.from(e,"binary"):Array.isArray(e)?this.buffer=ct.from(e):this.buffer=zi(e),this.position=this.buffer.byteLength)}return t.prototype.put=function(e){if(typeof e=="string"&&e.length!==1)throw new Tt("only accepts single character String");if(typeof e!="number"&&e.length!==1)throw new Tt("only accepts single character Uint8Array or Array");var r;if(typeof e=="string"?r=e.charCodeAt(0):typeof e=="number"?r=e:r=e[0],r<0||r>255)throw new Tt("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=r;else{var n=ct.alloc(t.BUFFER_SIZE+this.buffer.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n,this.buffer[this.position++]=r}},t.prototype.write=function(e,r){if(r=typeof r=="number"?r:this.position,this.buffer.length<r+e.length){var n=ct.alloc(this.buffer.length+e.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n}ArrayBuffer.isView(e)?(this.buffer.set(zi(e),r),this.position=r+e.byteLength>this.position?r+e.length:this.position):typeof e=="string"&&(this.buffer.write(e,r,e.length,"binary"),this.position=r+e.length>this.position?r+e.length:this.position)},t.prototype.read=function(e,r){return r=r&&r>0?r:this.position,this.buffer.slice(e,e+r)},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 r=this.buffer.toString("base64"),n=Number(this.sub_type).toString(16);return e.legacy?{$binary:r,$type:n.length===1?"0"+n:n}:{$binary:{base64:r,subType:n.length===1?"0"+n:n}}},t.prototype.toUUID=function(){if(this.sub_type===t.SUBTYPE_UUID)return new Al(this.buffer.slice(0,this.position));throw new _r('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,r){r=r||{};var n,i;if("$binary"in e?r.legacy&&typeof e.$binary=="string"&&"$type"in e?(i=e.$type?parseInt(e.$type,16):0,n=ct.from(e.$binary,"base64")):typeof e.$binary!="string"&&(i=e.$binary.subType?parseInt(e.$binary.subType,16):0,n=ct.from(e.$binary.base64,"base64")):"$uuid"in e&&(i=4,n=$o(e.$uuid)),!n)throw new Tt("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return i===$h?new Al(n):new t(n,i)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},t.BSON_BINARY_SUBTYPE_DEFAULT=0,t.BUFFER_SIZE=256,t.SUBTYPE_DEFAULT=0,t.SUBTYPE_FUNCTION=1,t.SUBTYPE_BYTE_ARRAY=2,t.SUBTYPE_UUID_OLD=3,t.SUBTYPE_UUID=4,t.SUBTYPE_MD5=5,t.SUBTYPE_ENCRYPTED=6,t.SUBTYPE_COLUMN=7,t.SUBTYPE_USER_DEFINED=128,t}();Object.defineProperty(Er.prototype,"_bsontype",{value:"Binary"});var $s=16,Al=function(t){ds(e,t);function e(r){var n=this,i,s;if(r==null)i=e.generate();else if(r instanceof e)i=ct.from(r.buffer),s=r.__id;else if(ArrayBuffer.isView(r)&&r.byteLength===$s)i=zi(r);else if(typeof r=="string")i=$o(r);else throw new Tt("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 n=t.call(this,i,$h)||this,n.__id=s,n}return Object.defineProperty(e.prototype,"id",{get:function(){return this.buffer},set:function(r){this.buffer=r,e.cacheHexString&&(this.__id=Dl(r))},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(r){if(r===void 0&&(r=!0),e.cacheHexString&&this.__id)return this.__id;var n=Dl(this.id,r);return e.cacheHexString&&(this.__id=n),n},e.prototype.toString=function(r){return r?this.id.toString(r):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(r){if(!r)return!1;if(r instanceof e)return r.id.equals(this.id);try{return new e(r).id.equals(this.id)}catch{return!1}},e.prototype.toBinary=function(){return new Er(this.id,Er.SUBTYPE_UUID)},e.generate=function(){var r=Bh($s);return r[6]=r[6]&15|64,r[8]=r[8]&63|128,ct.from(r)},e.isValid=function(r){return r?r instanceof e?!0:typeof r=="string"?jh(r):Ua(r)?r.length!==$s?!1:(r[6]&240)===64&&(r[8]&128)===128:!1:!1},e.createFromHexString=function(r){var n=$o(r);return new e(n)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},e}(Er),gs=function(){function t(e,r){if(!(this instanceof t))return new t(e,r);this.code=e,this.scope=r}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(gs.prototype,"_bsontype",{value:"Code"});function Rw(t){return ii(t)&&t.$id!=null&&typeof t.$ref=="string"&&(t.$db==null||typeof t.$db=="string")}var Gn=function(){function t(e,r,n,i){if(!(this instanceof t))return new t(e,r,n,i);var s=e.split(".");s.length===2&&(n=s.shift(),e=s.shift()),this.collection=e,this.oid=r,this.db=n,this.fields=i||{}}return Object.defineProperty(t.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(e.$db=this.db),e},t.prototype.toExtendedJSON=function(e){e=e||{};var r={$ref:this.collection,$id:this.oid};return e.legacy||(this.db&&(r.$db=this.db),r=Object.assign(r,this.fields)),r},t.fromExtendedJSON=function(e){var r=Object.assign({},e);return delete r.$ref,delete r.$id,delete r.$db,new t(e.$ref,e.$id,e.$db,r)},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(Gn.prototype,"_bsontype",{value:"DBRef"});var le=void 0;try{le=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 Nl=65536,Lw=1<<24,Vr=Nl*Nl,Fh=Vr*Vr,Ol=Fh/2,kl={},Pl={},K=function(){function t(e,r,n){if(e===void 0&&(e=0),!(this instanceof t))return new t(e,r,n);typeof e=="bigint"?Object.assign(this,t.fromBigInt(e,!!r)):typeof e=="string"?Object.assign(this,t.fromString(e,!!r)):(this.low=e|0,this.high=r|0,this.unsigned=!!n),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return t.fromBits=function(e,r,n){return new t(e,r,n)},t.fromInt=function(e,r){var n,i,s;return r?(e>>>=0,(s=0<=e&&e<256)&&(i=Pl[e],i)?i:(n=t.fromBits(e,(e|0)<0?-1:0,!0),s&&(Pl[e]=n),n)):(e|=0,(s=-128<=e&&e<128)&&(i=kl[e],i)?i:(n=t.fromBits(e,e<0?-1:0,!1),s&&(kl[e]=n),n))},t.fromNumber=function(e,r){if(isNaN(e))return r?t.UZERO:t.ZERO;if(r){if(e<0)return t.UZERO;if(e>=Fh)return t.MAX_UNSIGNED_VALUE}else{if(e<=-Ol)return t.MIN_VALUE;if(e+1>=Ol)return t.MAX_VALUE}return e<0?t.fromNumber(-e,r).neg():t.fromBits(e%Vr|0,e/Vr|0,r)},t.fromBigInt=function(e,r){return t.fromString(e.toString(),r)},t.fromString=function(e,r,n){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return t.ZERO;if(typeof r=="number"?(n=r,r=!1):r=!!r,n=n||10,n<2||36<n)throw RangeError("radix");var i;if((i=e.indexOf("-"))>0)throw Error("interior hyphen");if(i===0)return t.fromString(e.substring(1),r,n).neg();for(var s=t.fromNumber(Math.pow(n,8)),o=t.ZERO,c=0;c<e.length;c+=8){var l=Math.min(8,e.length-c),p=parseInt(e.substring(c,c+l),n);if(l<8){var d=t.fromNumber(Math.pow(n,l));o=o.mul(d).add(t.fromNumber(p))}else o=o.mul(s),o=o.add(t.fromNumber(p))}return o.unsigned=r,o},t.fromBytes=function(e,r,n){return n?t.fromBytesLE(e,r):t.fromBytesBE(e,r)},t.fromBytesLE=function(e,r){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,r)},t.fromBytesBE=function(e,r){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],r)},t.isLong=function(e){return ii(e)&&e.__isLong__===!0},t.fromValue=function(e,r){return typeof e=="number"?t.fromNumber(e,r):typeof e=="string"?t.fromString(e,r):t.fromBits(e.low,e.high,typeof r=="boolean"?r:e.unsigned)},t.prototype.add=function(e){t.isLong(e)||(e=t.fromValue(e));var r=this.high>>>16,n=this.high&65535,i=this.low>>>16,s=this.low&65535,o=e.high>>>16,c=e.high&65535,l=e.low>>>16,p=e.low&65535,d=0,h=0,b=0,v=0;return v+=s+p,b+=v>>>16,v&=65535,b+=i+l,h+=b>>>16,b&=65535,h+=n+c,d+=h>>>16,h&=65535,d+=r+o,d&=65535,t.fromBits(b<<16|v,d<<16|h,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 r=this.isNegative(),n=e.isNegative();return r&&!n?-1:!r&&n?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(le){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var r=(this.unsigned?le.div_u:le.div_s)(this.low,this.high,e.low,e.high);return t.fromBits(r,le.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?t.UZERO:t.ZERO;var n,i,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 o=this.shr(1);return n=o.div(e).shl(1),n.eq(t.ZERO)?e.isNegative()?t.ONE:t.NEG_ONE:(i=this.sub(e.mul(n)),s=n.add(i.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(i=this;i.gte(e);){n=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var c=Math.ceil(Math.log(n)/Math.LN2),l=c<=48?1:Math.pow(2,c-48),p=t.fromNumber(n),d=p.mul(e);d.isNegative()||d.gt(i);)n-=l,p=t.fromNumber(n,this.unsigned),d=p.mul(e);p.isZero()&&(p=t.ONE),s=s.add(p),i=i.sub(d)}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,r;for(r=31;r>0&&(e&1<<r)===0;r--);return this.high!==0?r+33:r+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)),le){var r=(this.unsigned?le.rem_u:le.rem_s)(this.low,this.high,e.low,e.high);return t.fromBits(r,le.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)),le){var r=le.mul(this.low,this.high,e.low,e.high);return t.fromBits(r,le.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 n=this.high>>>16,i=this.high&65535,s=this.low>>>16,o=this.low&65535,c=e.high>>>16,l=e.high&65535,p=e.low>>>16,d=e.low&65535,h=0,b=0,v=0,w=0;return w+=o*d,v+=w>>>16,w&=65535,v+=s*d,b+=v>>>16,v&=65535,v+=o*p,b+=v>>>16,v&=65535,b+=i*d,h+=b>>>16,b&=65535,b+=s*p,h+=b>>>16,b&=65535,b+=o*l,h+=b>>>16,b&=65535,h+=n*d+i*p+s*l+o*c,h&=65535,t.fromBits(v<<16|w,h<<16|b,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 r=this.high;if(e<32){var n=this.low;return t.fromBits(n>>>e|r<<32-e,r>>>e,this.unsigned)}else return e===32?t.fromBits(r,0,this.unsigned):t.fromBits(r>>>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)*Vr+(this.low>>>0):this.high*Vr+(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,r=this.low;return[r&255,r>>>8&255,r>>>16&255,r>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]},t.prototype.toBytesBE=function(){var e=this.high,r=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,r>>>24,r>>>16&255,r>>>8&255,r&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 r=t.fromNumber(e),n=this.div(r),i=n.mul(r).sub(this);return n.toString(e)+i.toInt().toString(e)}else return"-"+this.neg().toString(e);for(var s=t.fromNumber(Math.pow(e,6),this.unsigned),o=this,c="";;){var l=o.div(s),p=o.sub(l.mul(s)).toInt()>>>0,d=p.toString(e);if(o=l,o.isZero())return d+c;for(;d.length<6;)d="0"+d;c=""+d+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,r){var n=t.fromString(e.$numberLong);return r&&r.relaxed?n.toNumber():n},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(Lw),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(K.prototype,"__isLong__",{value:!0});Object.defineProperty(K.prototype,"_bsontype",{value:"Long"});var Mw=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,Uw=/^(\+|-)?(Infinity|inf)$/i,Bw=/^(\+|-)?NaN$/i,wn=6111,Fs=-6176,Rl=6176,jw=34,Hs=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Ll=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Ml=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),$w=/^([-+])?(\d+)?$/,Fw=31,Ul=16383,Hw=30,Vw=31;function Bl(t){return!isNaN(parseInt(t,10))}function qw(t){var e=K.fromNumber(1e9),r=K.fromNumber(0);if(!t.parts[0]&&!t.parts[1]&&!t.parts[2]&&!t.parts[3])return{quotient:t,rem:r};for(var n=0;n<=3;n++)r=r.shiftLeft(32),r=r.add(new K(t.parts[n],0)),t.parts[n]=r.div(e).low,r=r.modulo(e);return{quotient:t,rem:r}}function Ww(t,e){if(!t&&!e)return{high:K.fromNumber(0),low:K.fromNumber(0)};var r=t.shiftRightUnsigned(32),n=new K(t.getLowBits(),0),i=e.shiftRightUnsigned(32),s=new K(e.getLowBits(),0),o=r.multiply(i),c=r.multiply(s),l=n.multiply(i),p=n.multiply(s);return o=o.add(c.shiftRightUnsigned(32)),c=new K(c.getLowBits(),0).add(l).add(p.shiftRightUnsigned(32)),o=o.add(c.shiftRightUnsigned(32)),p=c.shiftLeft(32).add(new K(p.getLowBits(),0)),{high:o,low:p}}function Gw(t,e){var r=t.high>>>0,n=e.high>>>0;if(r<n)return!0;if(r===n){var i=t.low>>>0,s=e.low>>>0;if(i<s)return!0}return!1}function Br(t,e){throw new Tt('"'.concat(t,'" is not a valid Decimal128 string - ').concat(e))}var Ba=function(){function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="string")this.bytes=t.fromString(e).bytes;else if(Ua(e)){if(e.byteLength!==16)throw new Tt("Decimal128 must take a Buffer of 16 bytes");this.bytes=e}else throw new Tt("Decimal128 must take a Buffer or string")}return t.fromString=function(e){var r=!1,n=!1,i=!1,s=0,o=0,c=0,l=0,p=0,d=[0],h=0,b=0,v=0,w=0,_=0,k=0,A=new K(0,0),B=new K(0,0),G=0,j=0;if(e.length>=7e3)throw new Tt(""+e+" not a valid Decimal128 string");var X=e.match(Mw),_t=e.match(Uw),Dt=e.match(Bw);if(!X&&!_t&&!Dt||e.length===0)throw new Tt(""+e+" not a valid Decimal128 string");if(X){var q=X[2],rt=X[4],Q=X[5],tt=X[6];rt&&tt===void 0&&Br(e,"missing exponent power"),rt&&q===void 0&&Br(e,"missing exponent base"),rt===void 0&&(Q||tt)&&Br(e,"missing e before exponent")}if((e[j]==="+"||e[j]==="-")&&(r=e[j++]==="-"),!Bl(e[j])&&e[j]!=="."){if(e[j]==="i"||e[j]==="I")return new t(ct.from(r?Ll:Ml));if(e[j]==="N")return new t(ct.from(Hs))}for(;Bl(e[j])||e[j]===".";){if(e[j]==="."){n&&Br(e,"contains multiple periods"),n=!0,j=j+1;continue}h<34&&(e[j]!=="0"||i)&&(i||(p=o),i=!0,d[b++]=parseInt(e[j],10),h=h+1),i&&(c=c+1),n&&(l=l+1),o=o+1,j=j+1}if(n&&!o)throw new Tt(""+e+" not a valid Decimal128 string");if(e[j]==="e"||e[j]==="E"){var lt=e.substr(++j).match($w);if(!lt||!lt[2])return new t(ct.from(Hs));_=parseInt(lt[0],10),j=j+lt[0].length}if(e[j])return new t(ct.from(Hs));if(v=0,!h)v=0,w=0,d[0]=0,c=1,h=1,s=0;else if(w=h-1,s=c,s!==1)for(;d[p+s-1]===0;)s=s-1;for(_<=l&&l-_>16384?_=Fs:_=_-l;_>wn;){if(w=w+1,w-v>jw){var kt=d.join("");if(kt.match(/^0+$/)){_=wn;break}Br(e,"overflow")}_=_-1}for(;_<Fs||h<c;){if(w===0&&s<h){_=Fs,s=0;break}if(h<c?c=c-1:w=w-1,_<wn)_=_+1;else{var kt=d.join("");if(kt.match(/^0+$/)){_=wn;break}Br(e,"overflow")}}if(w-v+1<s){var At=o;n&&(p=p+1,At=At+1),r&&(p=p+1,At=At+1);var jt=parseInt(e[p+w+1],10),Wt=0;if(jt>=5&&(Wt=1,jt===5)){for(Wt=d[w]%2===1?1:0,k=p+w+2;k<At;k++)if(parseInt(e[k],10)){Wt=1;break}}if(Wt){for(var ft=w;ft>=0;ft--)if(++d[ft]>9&&(d[ft]=0,ft===0))if(_<wn)_=_+1,d[ft]=1;else return new t(ct.from(r?Ll:Ml))}}if(A=K.fromNumber(0),B=K.fromNumber(0),s===0)A=K.fromNumber(0),B=K.fromNumber(0);else if(w-v<17){var ft=v;for(B=K.fromNumber(d[ft++]),A=new K(0,0);ft<=w;ft++)B=B.multiply(K.fromNumber(10)),B=B.add(K.fromNumber(d[ft]))}else{var ft=v;for(A=K.fromNumber(d[ft++]);ft<=w-17;ft++)A=A.multiply(K.fromNumber(10)),A=A.add(K.fromNumber(d[ft]));for(B=K.fromNumber(d[ft++]);ft<=w;ft++)B=B.multiply(K.fromNumber(10)),B=B.add(K.fromNumber(d[ft]))}var Gt=Ww(A,K.fromString("100000000000000000"));Gt.low=Gt.low.add(B),Gw(Gt.low,B)&&(Gt.high=Gt.high.add(K.fromNumber(1))),G=_+Rl;var st={low:K.fromNumber(0),high:K.fromNumber(0)};Gt.high.shiftRightUnsigned(49).and(K.fromNumber(1)).equals(K.fromNumber(1))?(st.high=st.high.or(K.fromNumber(3).shiftLeft(61)),st.high=st.high.or(K.fromNumber(G).and(K.fromNumber(16383).shiftLeft(47))),st.high=st.high.or(Gt.high.and(K.fromNumber(0x7fffffffffff)))):(st.high=st.high.or(K.fromNumber(G&16383).shiftLeft(49)),st.high=st.high.or(Gt.high.and(K.fromNumber(562949953421311)))),st.low=Gt.low,r&&(st.high=st.high.or(K.fromString("9223372036854775808")));var et=ct.alloc(16);return j=0,et[j++]=st.low.low&255,et[j++]=st.low.low>>8&255,et[j++]=st.low.low>>16&255,et[j++]=st.low.low>>24&255,et[j++]=st.low.high&255,et[j++]=st.low.high>>8&255,et[j++]=st.low.high>>16&255,et[j++]=st.low.high>>24&255,et[j++]=st.high.low&255,et[j++]=st.high.low>>8&255,et[j++]=st.high.low>>16&255,et[j++]=st.high.low>>24&255,et[j++]=st.high.high&255,et[j++]=st.high.high>>8&255,et[j++]=st.high.high>>16&255,et[j++]=st.high.high>>24&255,new t(et)},t.prototype.toString=function(){for(var e,r=0,n=new Array(36),i=0;i<n.length;i++)n[i]=0;var s=0,o=!1,c,l={parts:[0,0,0,0]},p,d,h=[];s=0;var b=this.bytes,v=b[s++]|b[s++]<<8|b[s++]<<16|b[s++]<<24,w=b[s++]|b[s++]<<8|b[s++]<<16|b[s++]<<24,_=b[s++]|b[s++]<<8|b[s++]<<16|b[s++]<<24,k=b[s++]|b[s++]<<8|b[s++]<<16|b[s++]<<24;s=0;var A={low:new K(v,w),high:new K(_,k)};A.high.lessThan(K.ZERO)&&h.push("-");var B=k>>26&Fw;if(B>>3===3){if(B===Hw)return h.join("")+"Infinity";if(B===Vw)return"NaN";e=k>>15&Ul,c=8+(k>>14&1)}else c=k>>14&7,e=k>>17&Ul;var G=e-Rl;if(l.parts[0]=(k&16383)+((c&15)<<14),l.parts[1]=_,l.parts[2]=w,l.parts[3]=v,l.parts[0]===0&&l.parts[1]===0&&l.parts[2]===0&&l.parts[3]===0)o=!0;else for(d=3;d>=0;d--){var j=0,X=qw(l);if(l=X.quotient,j=X.rem.low,!!j)for(p=8;p>=0;p--)n[d*9+p]=j%10,j=Math.floor(j/10)}if(o)r=1,n[s]=0;else for(r=36;!n[s];)r=r-1,s=s+1;var _t=r-1+G;if(_t>=34||_t<=-7||G>0){if(r>34)return h.push("".concat(0)),G>0?h.push("E+".concat(G)):G<0&&h.push("E".concat(G)),h.join("");h.push("".concat(n[s++])),r=r-1,r&&h.push(".");for(var i=0;i<r;i++)h.push("".concat(n[s++]));h.push("E"),_t>0?h.push("+".concat(_t)):h.push("".concat(_t))}else if(G>=0)for(var i=0;i<r;i++)h.push("".concat(n[s++]));else{var Dt=r+G;if(Dt>0)for(var i=0;i<Dt;i++)h.push("".concat(n[s++]));else h.push("0");for(h.push(".");Dt++<0;)h.push("0");for(var i=0;i<r-Math.max(Dt-1,0);i++)h.push("".concat(n[s++]))}return h.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(Ba.prototype,"_bsontype",{value:"Decimal128"});var ms=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,r){var n=parseFloat(e.$numberDouble);return r&&r.relaxed?n:new t(n)},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(ms.prototype,"_bsontype",{value:"Double"});var ys=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,r){return r&&r.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(ys.prototype,"_bsontype",{value:"Int32"});var ja=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(ja.prototype,"_bsontype",{value:"MaxKey"});var $a=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($a.prototype,"_bsontype",{value:"MinKey"});var zw=new RegExp("^[0-9a-fA-F]{24}$"),dr=null,Se=Symbol("id"),Kt=function(){function t(e){if(!(this instanceof t))return new t(e);var r;if(typeof e=="object"&&e&&"id"in e){if(typeof e.id!="string"&&!ArrayBuffer.isView(e.id))throw new Tt("Argument passed in must have an id that is of type string or Buffer");"toHexString"in e&&typeof e.toHexString=="function"?r=ct.from(e.toHexString(),"hex"):r=e.id}else r=e;if(r==null||typeof r=="number")this[Se]=t.generate(typeof r=="number"?r:void 0);else if(ArrayBuffer.isView(r)&&r.byteLength===12)this[Se]=r instanceof ct?r:zi(r);else if(typeof r=="string")if(r.length===12){var n=ct.from(r);if(n.byteLength===12)this[Se]=n;else throw new Tt("Argument passed in must be a string of 12 bytes")}else if(r.length===24&&zw.test(r))this[Se]=ct.from(r,"hex");else throw new Tt("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new Tt("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[Se]},set:function(e){this[Se]=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 r=t.getInc(),n=ct.alloc(12);return n.writeUInt32BE(e,0),dr===null&&(dr=Bh(5)),n[4]=dr[0],n[5]=dr[1],n[6]=dr[2],n[7]=dr[3],n[8]=dr[4],n[11]=r&255,n[10]=r>>8&255,n[9]=r>>16&255,n},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[Se][11]===e[Se][11]&&this[Se].equals(e[Se]);if(typeof e=="string"&&t.isValid(e)&&e.length===12&&Ua(this.id))return e===ct.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 ct.from(e).equals(this.id);if(typeof e=="object"&&"toHexString"in e&&typeof e.toHexString=="function"){var r=e.toHexString(),n=this.toHexString().toLowerCase();return typeof r=="string"&&r.toLowerCase()===n}return!1},t.prototype.getTimestamp=function(){var e=new Date,r=this.id.readUInt32BE(0);return e.setTime(Math.floor(r)*1e3),e},t.createPk=function(){return new t},t.createFromTime=function(e){var r=ct.from([0,0,0,0,0,0,0,0,0,0,0,0]);return r.writeUInt32BE(e,0),new t(r)},t.createFromHexString=function(e){if(typeof e>"u"||e!=null&&e.length!==24)throw new Tt("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new t(ct.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(Kt.prototype,"generate",{value:fs(function(t){return Kt.generate(t)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(Kt.prototype,"getInc",{value:fs(function(){return Kt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Kt.prototype,"get_inc",{value:fs(function(){return Kt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Kt,"get_inc",{value:fs(function(){return Kt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Kt.prototype,"_bsontype",{value:"ObjectID"});function Yw(t){return t.split("").sort().join("")}var zn=function(){function t(e,r){if(!(this instanceof t))return new t(e,r);if(this.pattern=e,this.options=Yw(r??""),this.pattern.indexOf("\0")!==-1)throw new _r("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new _r("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var n=0;n<this.options.length;n++)if(!(this.options[n]==="i"||this.options[n]==="m"||this.options[n]==="x"||this.options[n]==="l"||this.options[n]==="s"||this.options[n]==="u"))throw new _r("The regular expression option [".concat(this.options[n],"] 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 Tt("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(e)))},t}();Object.defineProperty(zn.prototype,"_bsontype",{value:"BSONRegExp"});var Fa=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(Fa.prototype,"_bsontype",{value:"Symbol"});var Kw=K,Hh=function(t){ds(e,t);function e(r,n){var i=this;return i instanceof e?(K.isLong(r)?i=t.call(this,r.low,r.high,!0)||this:ii(r)&&typeof r.t<"u"&&typeof r.i<"u"?i=t.call(this,r.i,r.t,!0)||this:i=t.call(this,r,n,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new e(r,n)}return e.prototype.toJSON=function(){return{$timestamp:this.toString()}},e.fromInt=function(r){return new e(K.fromInt(r,!0))},e.fromNumber=function(r){return new e(K.fromNumber(r,!0))},e.fromBits=function(r,n){return new e(r,n)},e.fromString=function(r,n){return new e(K.fromString(r,!0,n))},e.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},e.fromExtendedJSON=function(r){return new e(r.$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=K.MAX_UNSIGNED_VALUE,e}(Kw);function Jw(t){return ii(t)&&Reflect.has(t,"_bsontype")&&typeof t._bsontype=="string"}var Vh=2147483647,qh=-2147483648,Wh=9223372036854776e3,Gh=-9223372036854776e3,Xw={$oid:Kt,$binary:Er,$uuid:Er,$symbol:Fa,$numberInt:ys,$numberDecimal:Ba,$numberDouble:ms,$numberLong:K,$minKey:$a,$maxKey:ja,$regex:zn,$regularExpression:zn,$timestamp:Hh};function zh(t,e){if(e===void 0&&(e={}),typeof t=="number"){if(e.relaxed||e.legacy)return t;if(Math.floor(t)===t){if(t>=qh&&t<=Vh)return new ys(t);if(t>=Gh&&t<=Wh)return K.fromNumber(t)}return new ms(t)}if(t==null||typeof t!="object")return t;if(t.$undefined)return null;for(var r=Object.keys(t).filter(function(h){return h.startsWith("$")&&t[h]!=null}),n=0;n<r.length;n++){var i=Xw[r[n]];if(i)return i.fromExtendedJSON(t,e)}if(t.$date!=null){var s=t.$date,o=new Date;return e.legacy?typeof s=="number"?o.setTime(s):typeof s=="string"&&o.setTime(Date.parse(s)):typeof s=="string"?o.setTime(Date.parse(s)):K.isLong(s)?o.setTime(s.toNumber()):typeof s=="number"&&e.relaxed&&o.setTime(s),o}if(t.$code!=null){var c=Object.assign({},t);return t.$scope&&(c.$scope=zh(t.$scope)),gs.fromExtendedJSON(t)}if(Rw(t)||t.$dbPointer){var l=t.$ref?t:t.$dbPointer;if(l instanceof Gn)return l;var p=Object.keys(l).filter(function(h){return h.startsWith("$")}),d=!0;if(p.forEach(function(h){["$ref","$id","$db"].indexOf(h)===-1&&(d=!1)}),d)return Gn.fromExtendedJSON(l)}return t}function Qw(t,e){return t.map(function(r,n){e.seenObjects.push({propertyName:"index ".concat(n),obj:null});try{return er(r,e)}finally{e.seenObjects.pop()}})}function jl(t){var e=t.toISOString();return t.getUTCMilliseconds()!==0?e:e.slice(0,-5)+"Z"}function er(t,e){if((typeof t=="object"||typeof t=="function")&&t!==null){var r=e.seenObjects.findIndex(function(A){return A.obj===t});if(r!==-1){var n=e.seenObjects.map(function(A){return A.propertyName}),i=n.slice(0,r).map(function(A){return"".concat(A," -> ")}).join(""),s=n[r],o=" -> "+n.slice(r+1,n.length-1).map(function(A){return"".concat(A," -> ")}).join(""),c=n[n.length-1],l=" ".repeat(i.length+s.length/2),p="-".repeat(o.length+(s.length+c.length)/2-1);throw new Tt(`Converting circular structure to EJSON:
35
35
  `+" ".concat(i).concat(s).concat(o).concat(c,`
36
36
  `)+" ".concat(l,"\\").concat(p,"/"))}e.seenObjects[e.seenObjects.length-1].obj=t}if(Array.isArray(t))return Qw(t,e);if(t===void 0)return null;if(t instanceof Date||Nw(t)){var d=t.getTime(),h=d>-1&&d<2534023188e5;return e.legacy?e.relaxed&&h?{$date:t.getTime()}:{$date:jl(t)}:e.relaxed&&h?{$date:jl(t)}:{$date:{$numberLong:t.getTime().toString()}}}if(typeof t=="number"&&(!e.relaxed||!isFinite(t))){if(Math.floor(t)===t){var b=t>=qh&&t<=Vh,v=t>=Gh&&t<=Wh;if(b)return{$numberInt:t.toString()};if(v)return{$numberLong:t.toString()}}return{$numberDouble:t.toString()}}if(t instanceof RegExp||Aw(t)){var w=t.flags;if(w===void 0){var _=t.toString().match(/[gimuy]*$/);_&&(w=_[0])}var k=new zn(t.source,w);return k.toExtendedJSON(e)}return t!=null&&typeof t=="object"?tb(t,e):t}var Zw={Binary:function(t){return new Er(t.value(),t.sub_type)},Code:function(t){return new gs(t.code,t.scope)},DBRef:function(t){return new Gn(t.collection||t.namespace,t.oid,t.db,t.fields)},Decimal128:function(t){return new Ba(t.bytes)},Double:function(t){return new ms(t.value)},Int32:function(t){return new ys(t.value)},Long:function(t){return K.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 ja},MinKey:function(){return new $a},ObjectID:function(t){return new Kt(t)},ObjectId:function(t){return new Kt(t)},BSONRegExp:function(t){return new zn(t.pattern,t.options)},Symbol:function(t){return new Fa(t.value)},Timestamp:function(t){return Hh.fromBits(t.low,t.high)}};function tb(t,e){if(t==null||typeof t!="object")throw new _r("not an object instance");var r=t._bsontype;if(typeof r>"u"){var n={};for(var i in t){e.seenObjects.push({propertyName:i,obj:null});try{var s=er(t[i],e);i==="__proto__"?Object.defineProperty(n,i,{value:s,writable:!0,enumerable:!0,configurable:!0}):n[i]=s}finally{e.seenObjects.pop()}}return n}else if(Jw(t)){var o=t;if(typeof o.toExtendedJSON!="function"){var c=Zw[t._bsontype];if(!c)throw new Tt("Unrecognized or invalid _bsontype: "+t._bsontype);o=c(o)}return r==="Code"&&o.scope?o=new gs(o.code,er(o.scope,e)):r==="DBRef"&&o.oid&&(o=new Gn(er(o.collection,e),er(o.oid,e),er(o.db,e),er(o.fields,e))),o.toExtendedJSON(e)}else throw new _r("_bsontype must be a string, but was: "+typeof r)}var $l;(function(t){function e(s,o){var c=Object.assign({},{relaxed:!0,legacy:!1},o);return typeof c.relaxed=="boolean"&&(c.strict=!c.relaxed),typeof c.strict=="boolean"&&(c.relaxed=!c.strict),JSON.parse(s,function(l,p){if(l.indexOf("\0")!==-1)throw new _r("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(l)));return zh(p,c)})}t.parse=e;function r(s,o,c,l){c!=null&&typeof c=="object"&&(l=c,c=0),o!=null&&typeof o=="object"&&!Array.isArray(o)&&(l=o,o=void 0,c=0);var p=Object.assign({relaxed:!0,legacy:!1},l,{seenObjects:[{propertyName:"(root)",obj:null}]}),d=er(s,p);return JSON.stringify(d,o,c)}t.stringify=r;function n(s,o){return o=o||{},JSON.parse(r(s,o))}t.serialize=n;function i(s,o){return o=o||{},e(JSON.stringify(s),o)}t.deserialize=i})($l||($l={}));var Fl,Hl=Uh();Hl.Map?Fl=Hl.Map:Fl=function(){function t(e){e===void 0&&(e=[]),this._keys=[],this._values={};for(var r=0;r<e.length;r++)if(e[r]!=null){var n=e[r],i=n[0],s=n[1];this._keys.push(i),this._values[i]={v:s,i:this._keys.length-1}}}return t.prototype.clear=function(){this._keys=[],this._values={}},t.prototype.delete=function(e){var r=this._values[e];return r==null?!1:(delete this._values[e],this._keys.splice(r.i,1),!0)},t.prototype.entries=function(){var e=this,r=0;return{next:function(){var n=e._keys[r++];return{value:n!==void 0?[n,e._values[n].v]:void 0,done:n===void 0}}}},t.prototype.forEach=function(e,r){r=r||this;for(var n=0;n<this._keys.length;n++){var i=this._keys[n];e.call(r,this._values[i].v,i,r)}},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,r=0;return{next:function(){var n=e._keys[r++];return{value:n!==void 0?n:void 0,done:n===void 0}}}},t.prototype.set=function(e,r){return this._values[e]?(this._values[e].v=r,this):(this._keys.push(e),this._values[e]={v:r,i:this._keys.length-1},this)},t.prototype.values=function(){var e=this,r=0;return{next:function(){var n=e._keys[r++];return{value:n!==void 0?e._values[n].v:void 0,done:n===void 0}}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),t}();var wE=K.fromNumber(kw),bE=K.fromNumber(Pw),Vs=new Uint8Array(8),_E=new DataView(Vs.buffer,Vs.byteOffset,Vs.byteLength),eb=1024*1024*17,EE=ct.alloc(eb),Ha=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}},Bt=class{constructor(t,e={},r,n){this.name=t,this.properties=e,this.id=n?new Kt(n):new Kt,this.occurred=new Date,r&&(this.trigger=new Ha(r)),this.newEvent=!n}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale},ye=class{static SWIPER_CSS="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css";static injectScriptURL(t,e){if(!t)return;let r=document.createElement("script");r.id=e??"",r.src=t,r.type="module",document.head.appendChild(r)}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 r=document.createElement("style");r.textContent=t,e.appendChild(r)}static injectSwiperCSS(t=document.head){this.injectStylesheet(this.SWIPER_CSS,t)}static injectStylesheet(t,e=document.head){if(!t)return;let r=document.createElement("link");r.rel="stylesheet",r.href=t,t===this.SWIPER_CSS&&(r.crossOrigin="anonymous",r.onload=n=>{let i=n.currentTarget?.sheet?.cssRules;if(i){for(let s of i)if(s.type==CSSRule.FONT_FACE_RULE){let o=t.split("/"),c=o.slice(0,o.length-1).join("/"),l=s.cssText;l=l.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${c}/$4")`);let p=document.createElement("style");p.appendChild(document.createTextNode(l)),document.head.appendChild(p)}}}),e.appendChild(r)}static async loadSwiperScript(){window.CooeeSDK.Swiper||(window.CooeeSDK.Swiper=(await import("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.mjs")).Swiper)}},rb="2.0.4",Fo=500,Vl="user-agent",en="",ql="?",Yi="function",ir="undefined",rn="object",Ho="string",Xt="browser",Be="cpu",Te="device",me="engine",pe="os",Gr="result",L="name",N="type",R="vendor",U="version",Qt="architecture",Yn="major",P="model",Pn="console",Z="mobile",mt="tablet",Rt="smarttv",Ie="wearable",Ii="xr",Rn="embedded",bn="inapp",Va="brands",yr="formFactors",qa="fullVersionList",zr="platform",Wa="platformVersion",vs="bitness",ur="sec-ch-ua",nb=ur+"-full-version-list",ib=ur+"-arch",sb=ur+"-"+vs,ob=ur+"-form-factors",ab=ur+"-"+Z,cb=ur+"-"+P,Yh=ur+"-"+zr,lb=Yh+"-version",Kh=[Va,qa,Z,P,zr,Wa,Qt,yr,vs],Ci="Amazon",jr="Apple",Wl="ASUS",Gl="BlackBerry",fr="Google",zl="Huawei",qs="Lenovo",Yl="Honor",Ti="LG",Ws="Microsoft",Gs="Motorola",zs="Nvidia",Kl="OnePlus",Ys="OPPO",_n="Samsung",Jl="Sharp",En="Sony",Ks="Xiaomi",Js="Zebra",Xl="Chrome",Ql="Chromium",Xe="Chromecast",Li="Edge",Sn="Firefox",In="Opera",Xs="Facebook",Zl="Sogou",$r="Mobile ",Cn=" Browser",Vo="Windows",ub=typeof window!==ir,Zt=ub&&window.navigator?window.navigator:void 0,rr=Zt&&Zt.userAgentData?Zt.userAgentData:void 0,hb=function(t,e){var r={},n=e;if(!Ki(e)){n={};for(var i in e)for(var s in e[i])n[s]=e[i][s].concat(n[s]?n[s]:[])}for(var o in t)r[o]=n[o]&&n[o].length%2===0?n[o].concat(t[o]):t[o];return r},ws=function(t){for(var e={},r=0;r<t.length;r++)e[t[r].toUpperCase()]=t[r];return e},qo=function(t,e){if(typeof t===rn&&t.length>0){for(var r in t)if(je(e)==je(t[r]))return!0;return!1}return pn(t)?je(e)==je(t):!1},Ki=function(t,e){for(var r in t)return/^(browser|cpu|device|engine|os)$/.test(r)||(e?Ki(t[r]):!1)},pn=function(t){return typeof t===Ho},Qs=function(t){if(t){for(var e=[],r=nn(/\\?\"/g,t).split(","),n=0;n<r.length;n++)if(r[n].indexOf(";")>-1){var i=Ji(r[n]).split(";v=");e[n]={brand:i[0],version:i[1]}}else e[n]=Ji(r[n]);return e}},je=function(t){return pn(t)?t.toLowerCase():t},Zs=function(t){return pn(t)?nn(/[^\d\.]/g,t).split(".")[0]:void 0},$e=function(t){for(var e in t){var r=t[e];typeof r==rn&&r.length==2?this[r[0]]=r[1]:this[r]=void 0}return this},nn=function(t,e){return pn(e)?e.replace(t,en):e},Tn=function(t){return nn(/\\?\"/g,t)},Ji=function(t,e){if(pn(t))return t=nn(/^\s\s*/,t),typeof e===ir?t:t.substring(0,Fo)},to=function(t,e){if(!(!t||!e))for(var r=0,n,i,s,o,c,l;r<e.length&&!c;){var p=e[r],d=e[r+1];for(n=i=0;n<p.length&&!c&&p[n];)if(c=p[n++].exec(t),c)for(s=0;s<d.length;s++)l=c[++i],o=d[s],typeof o===rn&&o.length>0?o.length===2?typeof o[1]==Yi?this[o[0]]=o[1].call(this,l):this[o[0]]=o[1]:o.length>=3&&(typeof o[1]===Yi&&!(o[1].exec&&o[1].test)?o.length>3?this[o[0]]=l?o[1].apply(this,o.slice(2)):void 0:this[o[0]]=l?o[1].call(this,l,o[2]):void 0:o.length==3?this[o[0]]=l?l.replace(o[1],o[2]):void 0:o.length==4?this[o[0]]=l?o[3].call(this,l.replace(o[1],o[2])):void 0:o.length>4&&(this[o[0]]=l?o[3].apply(this,[l.replace(o[1],o[2])].concat(o.slice(4))):void 0)):this[o]=l||void 0;r+=2}},Ce=function(t,e){for(var r in e)if(typeof e[r]===rn&&e[r].length>0){for(var n=0;n<e[r].length;n++)if(qo(e[r][n],t))return r===ql?void 0:r}else if(qo(e[r],t))return r===ql?void 0:r;return e.hasOwnProperty("*")?e["*"]:t},tu={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2","8.1":"6.3",10:["6.4","10.0"],NT:""},eu={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},pb={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},ru={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[U,[L,$r+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[U,[L,Li+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[U,[L,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[L,U],[/opios[\/ ]+([\w\.]+)/i],[U,[L,In+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[U,[L,In+" GX"]],[/\bopr\/([\w\.]+)/i],[U,[L,In]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[U,[L,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[U,[L,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[L,U],[/quark(?:pc)?\/([-\w\.]+)/i],[U,[L,"Quark"]],[/\bddg\/([\w\.]+)/i],[U,[L,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[U,[L,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[U,[L,"WeChat"]],[/konqueror\/([\w\.]+)/i],[U,[L,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[U,[L,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[U,[L,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[U,[L,"Smart "+qs+Cn]],[/(avast|avg)\/([\w\.]+)/i],[[L,/(.+)/,"$1 Secure"+Cn],U],[/\bfocus\/([\w\.]+)/i],[U,[L,Sn+" Focus"]],[/\bopt\/([\w\.]+)/i],[U,[L,In+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[U,[L,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[U,[L,"Dolphin"]],[/coast\/([\w\.]+)/i],[U,[L,In+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[U,[L,"MIUI"+Cn]],[/fxios\/([\w\.-]+)/i],[U,[L,$r+Sn]],[/\bqihoobrowser\/?([\w\.]*)/i],[U,[L,"360"]],[/\b(qq)\/([\w\.]+)/i],[[L,/(.+)/,"$1Browser"],U],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[L,/(.+)/,"$1"+Cn],U],[/samsungbrowser\/([\w\.]+)/i],[U,[L,_n+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[U,[L,Zl+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[L,Zl+" Mobile"],U],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[L,U],[/(lbbrowser|rekonq)/i],[L],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[U,L],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[L,Xs],U,[N,bn]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[L,U,[N,bn]],[/\bgsa\/([\w\.]+) .*safari\//i],[U,[L,"GSA"],[N,bn]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[U,[L,"TikTok"],[N,bn]],[/\[(linkedin)app\]/i],[L,[N,bn]],[/(chromium)[\/ ]([-\w\.]+)/i],[L,U],[/headlesschrome(?:\/([\w\.]+)| )/i],[U,[L,Xl+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[U,[L,Li+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[L,Xl+" WebView"],U],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[U,[L,"Android"+Cn]],[/chrome\/([\w\.]+) mobile/i],[U,[L,$r+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[L,U],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[U,[L,$r+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[L,$r+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[U,L],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[L,[U,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[L,U],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[L,$r+Sn],U],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[L,"Netscape"],U],[/(wolvic|librewolf)\/([\w\.]+)/i],[L,U],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[U,[L,Sn+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[L,[U,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[L,[U,/[^\d\.]+./,en]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[Qt,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[Qt,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[Qt,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[Qt,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[Qt,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[Qt,/ower/,en,je]],[/ sun4\w[;\)]/i],[[Qt,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[Qt,je]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[P,[R,_n],[N,mt]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[P,[R,_n],[N,Z]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[P,[R,jr],[N,Z]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[P,[R,jr],[N,mt]],[/(macintosh);/i],[P,[R,jr]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[P,[R,Jl],[N,Z]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[P,[R,Yl],[N,mt]],[/honor([-\w ]+)[;\)]/i],[P,[R,Yl],[N,Z]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[P,[R,zl],[N,mt]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[P,[R,zl],[N,Z]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[P,/_/g," "],[R,Ks],[N,mt]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[P,/_/g," "],[R,Ks],[N,Z]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[P,[R,Kl],[N,Z]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[P,[R,Ys],[N,Z]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[P,[R,Ce,{OnePlus:["203","304","403","404","413","415"],"*":Ys}],[N,mt]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[P,[R,"BLU"],[N,Z]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[P,[R,"Vivo"],[N,Z]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[P,[R,"Realme"],[N,Z]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[P,[R,qs],[N,mt]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[P,[R,qs],[N,Z]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[P,[R,Gs],[N,Z]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[P,[R,Gs],[N,mt]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[P,[R,Ti],[N,mt]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[P,[R,Ti],[N,Z]],[/(nokia) (t[12][01])/i],[R,P,[N,mt]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[P,/_/g," "],[N,Z],[R,"Nokia"]],[/(pixel (c|tablet))\b/i],[P,[R,fr],[N,mt]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[P,[R,fr],[N,Z]],[/(google) (pixelbook( go)?)/i],[R,P],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[P,[R,En],[N,Z]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[P,"Xperia Tablet"],[R,En],[N,mt]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[P,[R,Ci],[N,mt]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[P,/(.+)/g,"Fire Phone $1"],[R,Ci],[N,Z]],[/(playbook);[-\w\),; ]+(rim)/i],[P,R,[N,mt]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[P,[R,Gl],[N,Z]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[P,[R,Wl],[N,mt]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[P,[R,Wl],[N,Z]],[/(nexus 9)/i],[P,[R,"HTC"],[N,mt]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[R,[P,/_/g," "],[N,Z]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[P,[R,"TCL"],[N,mt]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[P,[R,"TCL"],[N,Z]],[/(itel) ((\w+))/i],[[R,je],P,[N,Ce,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[P,[R,"Acer"],[N,mt]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[P,[R,"Meizu"],[N,Z]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[P,[R,"Ulefone"],[N,Z]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[P,[R,"Energizer"],[N,Z]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[P,[R,"Cat"],[N,Z]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[P,[R,"Smartfren"],[N,Z]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[P,[R,"Nothing"],[N,Z]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[P,[R,"Archos"],[N,mt]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[P,[R,"Archos"],[N,Z]],[/; (n159v)/i],[P,[R,"HMD"],[N,Z]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[R,P,[N,mt]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i],[R,P,[N,Z]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[R,P,[N,mt]],[/(surface duo)/i],[P,[R,Ws],[N,mt]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[P,[R,"Fairphone"],[N,Z]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[P,[R,zs],[N,mt]],[/(sprint) (\w+)/i],[R,P,[N,Z]],[/(kin\.[onetw]{3})/i],[[P,/\./g," "],[R,Ws],[N,Z]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[P,[R,Js],[N,mt]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[P,[R,Js],[N,Z]],[/smart-tv.+(samsung)/i],[R,[N,Rt]],[/hbbtv.+maple;(\d+)/i],[[P,/^/,"SmartTV"],[R,_n],[N,Rt]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[R,P,[N,Rt]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[R,Ti],[N,Rt]],[/(apple) ?tv/i],[R,[P,jr+" TV"],[N,Rt]],[/crkey.*devicetype\/chromecast/i],[[P,Xe+" Third Generation"],[R,fr],[N,Rt]],[/crkey.*devicetype\/([^/]*)/i],[[P,/^/,"Chromecast "],[R,fr],[N,Rt]],[/fuchsia.*crkey/i],[[P,Xe+" Nest Hub"],[R,fr],[N,Rt]],[/crkey/i],[[P,Xe],[R,fr],[N,Rt]],[/(portaltv)/i],[P,[R,Xs],[N,Rt]],[/droid.+aft(\w+)( bui|\))/i],[P,[R,Ci],[N,Rt]],[/(shield \w+ tv)/i],[P,[R,zs],[N,Rt]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[P,[R,Jl],[N,Rt]],[/(bravia[\w ]+)( bui|\))/i],[P,[R,En],[N,Rt]],[/(mi(tv|box)-?\w+) bui/i],[P,[R,Ks],[N,Rt]],[/Hbbtv.*(technisat) (.*);/i],[R,P,[N,Rt]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[R,/.+\/(\w+)/,"$1",Ce,{LG:"lge"}],[P,Ji],[N,Rt]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[P,[N,Rt]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:|large screen[\w ]+safari)\b/i],[[N,Rt]],[/(playstation \w+)/i],[P,[R,En],[N,Pn]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[P,[R,Ws],[N,Pn]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[R,P,[N,Pn]],[/droid.+; (shield)( bui|\))/i],[P,[R,zs],[N,Pn]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[P,[R,_n],[N,Ie]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[R,P,[N,Ie]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[P,[R,Ys],[N,Ie]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[P,[R,jr],[N,Ie]],[/(opwwe\d{3})/i],[P,[R,Kl],[N,Ie]],[/(moto 360)/i],[P,[R,Gs],[N,Ie]],[/(smartwatch 3)/i],[P,[R,En],[N,Ie]],[/(g watch r)/i],[P,[R,Ti],[N,Ie]],[/droid.+; (wt63?0{2,3})\)/i],[P,[R,Js],[N,Ie]],[/droid.+; (glass) \d/i],[P,[R,fr],[N,Ii]],[/(pico) (4|neo3(?: link|pro)?)/i],[R,P,[N,Ii]],[/(quest( \d| pro)?s?).+vr/i],[P,[R,Xs],[N,Ii]],[/mobile vr; rv.+firefox/i],[[N,Ii]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[R,[N,Rn]],[/(aeobc)\b/i],[P,[R,Ci],[N,Rn]],[/(homepod).+mac os/i],[P,[R,jr],[N,Rn]],[/windows iot/i],[[N,Rn]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[P,[N,Ce,{mobile:"Mobile",xr:"VR","*":mt}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[N,mt]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[N,Z]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[P,[R,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[U,[L,Li+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[L,U],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[U,[L,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[L,U],[/ladybird\//i],[[L,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[U,L]],os:[[/(windows nt) (6\.[23]); arm/i],[[L,/N/,"R"],[U,Ce,tu]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[L,U],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[U,/(;|\))/g,"",Ce,tu],[L,Vo]],[/(windows ce)\/?([\d\.]*)/i],[L,U],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[U,/_/g,"."],[L,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[L,"macOS"],[U,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[U,[L,Xe+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[U,[L,Xe+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[U,[L,Xe+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[U,[L,Xe+" Linux"]],[/crkey\/([\d\.]+)/i],[U,[L,Xe]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[U,L],[/(ubuntu) ([\w\.]+) like android/i],[[L,/(.+)/,"$1 Touch"],U],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[L,U],[/\(bb(10);/i],[U,[L,Gl]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[U,[L,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[U,[L,Sn+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[U,[L,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[U,Ce,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[L,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[U,[L,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[L,"Chrome OS"],U],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[L,U],[/(sunos) ?([\d\.]*)/i],[[L,"Solaris"],U],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[L,U]]},xi=function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return $e.call(t.init,[[Xt,[L,U,Yn,N]],[Be,[Qt]],[Te,[N,P,R]],[me,[L,U]],[pe,[L,U]]]),$e.call(t.isIgnore,[[Xt,[U,Yn]],[me,[U]],[pe,[U]]]),$e.call(t.isIgnoreRgx,[[Xt,/ ?browser$/i],[pe,/ ?os$/i]]),$e.call(t.toString,[[Xt,[L,U]],[Be,[Qt]],[Te,[R,P]],[me,[L,U]],[pe,[L,U]]]),t}(),db=function(t,e){var r=xi.init[e],n=xi.isIgnore[e]||0,i=xi.isIgnoreRgx[e]||0,s=xi.toString[e]||0;function o(){$e.call(this,r)}return o.prototype.getItem=function(){return t},o.prototype.withClientHints=function(){return rr?rr.getHighEntropyValues(Kh).then(function(c){return t.setCH(new Jh(c,!1)).parseCH().get()}):t.parseCH().get()},o.prototype.withFeatureCheck=function(){return t.detectFeature().get()},e!=Gr&&(o.prototype.is=function(c){var l=!1;for(var p in this)if(this.hasOwnProperty(p)&&!qo(n,p)&&je(i?nn(i,this[p]):this[p])==je(i?nn(i,c):c)){if(l=!0,c!=ir)break}else if(c==ir&&l){l=!l;break}return l},o.prototype.toString=function(){var c=en;for(var l in s)typeof this[s[l]]!==ir&&(c+=(c?" ":en)+this[s[l]]);return c||ir}),rr||(o.prototype.then=function(c){var l=this,p=function(){for(var h in l)l.hasOwnProperty(h)&&(this[h]=l[h])};p.prototype={is:o.prototype.is,toString:o.prototype.toString};var d=new p;return c(d),d}),new o};function Jh(t,e){if(t=t||{},$e.call(this,Kh),e)$e.call(this,[[Va,Qs(t[ur])],[qa,Qs(t[nb])],[Z,/\?1/.test(t[ab])],[P,Tn(t[cb])],[zr,Tn(t[Yh])],[Wa,Tn(t[lb])],[Qt,Tn(t[ib])],[yr,Qs(t[ob])],[vs,Tn(t[sb])]]);else for(var r in t)this.hasOwnProperty(r)&&typeof t[r]!==ir&&(this[r]=t[r])}function nu(t,e,r,n){return this.get=function(i){return i?this.data.hasOwnProperty(i)?this.data[i]:void 0:this.data},this.set=function(i,s){return this.data[i]=s,this},this.setCH=function(i){return this.uaCH=i,this},this.detectFeature=function(){if(Zt&&Zt.userAgent==this.ua)switch(this.itemType){case Xt:Zt.brave&&typeof Zt.brave.isBrave==Yi&&this.set(L,"Brave");break;case Te:!this.get(N)&&rr&&rr[Z]&&this.set(N,Z),this.get(P)=="Macintosh"&&Zt&&typeof Zt.standalone!==ir&&Zt.maxTouchPoints&&Zt.maxTouchPoints>2&&this.set(P,"iPad").set(N,mt);break;case pe:!this.get(L)&&rr&&rr[zr]&&this.set(L,rr[zr]);break;case Gr:var i=this.data,s=function(o){return i[o].getItem().detectFeature().get()};this.set(Xt,s(Xt)).set(Be,s(Be)).set(Te,s(Te)).set(me,s(me)).set(pe,s(pe))}return this},this.parseUA=function(){return this.itemType!=Gr&&to.call(this.data,this.ua,this.rgxMap),this.itemType==Xt&&this.set(Yn,Zs(this.get(U))),this},this.parseCH=function(){var i=this.uaCH,s=this.rgxMap;switch(this.itemType){case Xt:case me:var o=i[qa]||i[Va],c;if(o)for(var l in o){var p=o[l].brand||o[l],d=o[l].version;this.itemType==Xt&&!/not.a.brand/i.test(p)&&(!c||/Chrom/.test(c)&&p!=Ql||c==Li&&/WebView2/.test(p))&&(p=Ce(p,pb),c=this.get(L),c&&!/Chrom/.test(c)&&/Chrom/.test(p)||this.set(L,p).set(U,d).set(Yn,Zs(d)),c=p),this.itemType==me&&p==Ql&&this.set(U,d)}break;case Be:var h=i[Qt];h&&(h&&i[vs]=="64"&&(h+="64"),to.call(this.data,h+";",s));break;case Te:if(i[Z]&&this.set(N,Z),i[P]&&(this.set(P,i[P]),!this.get(N)||!this.get(R))){var b={};to.call(b,"droid 9; "+i[P]+")",s),!this.get(N)&&b.type&&this.set(N,b.type),!this.get(R)&&b.vendor&&this.set(R,b.vendor)}if(i[yr]){var v;if(typeof i[yr]!="string")for(var w=0;!v&&w<i[yr].length;)v=Ce(i[yr][w++],eu);else v=Ce(i[yr],eu);this.set(N,v)}break;case pe:var _=i[zr];if(_){var k=i[Wa];_==Vo&&(k=parseInt(Zs(k),10)>=13?"11":"10"),this.set(L,_).set(U,k)}this.get(L)==Vo&&i[P]=="Xbox"&&this.set(L,"Xbox").set(U,void 0);break;case Gr:var A=this.data,B=function(G){return A[G].getItem().setCH(i).parseCH().get()};this.set(Xt,B(Xt)).set(Be,B(Be)).set(Te,B(Te)).set(me,B(me)).set(pe,B(pe))}return this},$e.call(this,[["itemType",t],["ua",e],["uaCH",n],["rgxMap",r],["data",db(this,t)]]),this}function ze(t,e,r){if(typeof t===rn?(Ki(t,!0)?(typeof e===rn&&(r=e),e=t):(r=t,e=void 0),t=void 0):typeof t===Ho&&!Ki(e,!0)&&(r=e,e=void 0),r&&typeof r.append===Yi){var n={};r.forEach(function(l,p){n[p]=l}),r=n}if(!(this instanceof ze))return new ze(t,e,r).getResult();var i=typeof t===Ho?t:r&&r[Vl]?r[Vl]:Zt&&Zt.userAgent?Zt.userAgent:en,s=new Jh(r,!0),o=e?hb(ru,e):ru,c=function(l){return l==Gr?function(){return new nu(l,i,o,s).set("ua",i).set(Xt,this.getBrowser()).set(Be,this.getCPU()).set(Te,this.getDevice()).set(me,this.getEngine()).set(pe,this.getOS()).get()}:function(){return new nu(l,i,o[l],s).parseUA().get()}};return $e.call(this,[["getBrowser",c(Xt)],["getCPU",c(Be)],["getDevice",c(Te)],["getEngine",c(me)],["getOS",c(pe)],["getResult",c(Gr)],["getUA",function(){return i}],["setUA",function(l){return pn(l)&&(i=l.length>Fo?Ji(l,Fo):l),this}]]).setUA(i),this}ze.VERSION=rb;ze.BROWSER=ws([L,U,Yn,N]);ze.CPU=ws([Qt]);ze.DEVICE=ws([P,R,N,Pn,Z,Rt,mt,Ie,Rn]);ze.ENGINE=ze.OS=ws([L,U]);var at=class{static storage=new Map;static get(t){return this.storage.has(t)||this.storage.set(t,t.getInstance()),this.storage.get(t)}};function Et(t){return typeof t=="function"}function Xh(t){let e=t(r=>{Error.call(r),r.stack=new Error().stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var eo=Xh(t=>function(e){t(this),this.message=e?`${e.length} errors occurred during unsubscription:
37
37
  ${e.map((r,n)=>`${n+1}) ${r.toString()}`).join(`