@letscooee/web-sdk 12.1.12 → 12.1.13
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/{chunk-UMRZBJHI.js → chunk-5ZGV4I76.js} +1 -1
- package/dist/{chunk-CU6RU2HY.js → chunk-OFB2W4JM.js} +1 -1
- package/dist/{chunk-HJQ3HI2N.js → chunk-YSXPPQHX.js} +1 -1
- package/dist/main.min.js +2 -2
- package/dist/{share-dialog.component-7BVLOTJQ.js → share-dialog.component-IJB755UW.js} +1 -1
- package/dist/{video-detail-dialog.component-P2WOOZM6.js → video-detail-dialog.component-K3YHJF5A.js} +1 -1
- package/dist/widget.min.js +2 -2
- package/package.json +1 -1
package/dist/main.min.js
CHANGED
|
@@ -7,7 +7,7 @@ import{a as _,b as Z,c as Ni,d as Im,e as Ys,f as Qr,g as wo}from"./chunk-V7UGKY
|
|
|
7
7
|
|
|
8
8
|
`+ne.message+`
|
|
9
9
|
`+Array(ne.message.length+1).join("=")+`
|
|
10
|
-
`+T(A,k)):ne}}function kt(A,R){var V;return R.cache&&R.name&&R.storage.templates.get(R.name)?R.storage.templates.get(R.name):(V=typeof A=="function"?A:Qe(A,R),R.cache&&R.name&&R.storage.templates.define(R.name,V),V)}Re.l.bind(Re),t.compile=Qe,t.compileScope=B,t.compileScopeIntoFunction=X,t.compileToString=T,t.defaultConfig=Re,t.filters=Te,t.getConfig=Ge,t.helpers=fe,t.nativeHelpers=Le,t.parse=y,t.render=function(A,R,V,k){var H=Ge(V||{});if(!H.async)return kt(A,H)(R,H);if(!k){if(typeof n=="function")return new n(function(ne,he){try{ne(kt(A,H)(R,H))}catch(Ye){he(Ye)}});throw e("Please provide a callback function, this env doesn't support Promises")}try{kt(A,H)(R,H,k)}catch(ne){return k(ne)}},t.templates=se,Object.defineProperty(t,"__esModule",{value:!0})})});var ru="12.1.
|
|
10
|
+
`+T(A,k)):ne}}function kt(A,R){var V;return R.cache&&R.name&&R.storage.templates.get(R.name)?R.storage.templates.get(R.name):(V=typeof A=="function"?A:Qe(A,R),R.cache&&R.name&&R.storage.templates.define(R.name,V),V)}Re.l.bind(Re),t.compile=Qe,t.compileScope=B,t.compileScopeIntoFunction=X,t.compileToString=T,t.defaultConfig=Re,t.filters=Te,t.getConfig=Ge,t.helpers=fe,t.nativeHelpers=Le,t.parse=y,t.render=function(A,R,V,k){var H=Ge(V||{});if(!H.async)return kt(A,H)(R,H);if(!k){if(typeof n=="function")return new n(function(ne,he){try{ne(kt(A,H)(R,H))}catch(Ye){he(Ye)}});throw e("Please provide a callback function, this env doesn't support Promises")}try{kt(A,H)(R,H,k)}catch(ne){return k(ne)}},t.templates=se,Object.defineProperty(t,"__esModule",{value:!0})})});var ru="12.1.13";var _v=ru.split("-")[0].split(".").slice(0,3).map(t=>t.padStart(2,"0")).join(""),qs="WEB",xm="CooeeSDK",Cr=ru,Cm=parseInt(_v,10);var Rm=["collection","product","cart"],Am=[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}],Dm=["View Item","View Cart","View Collection"];var Ks=`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Cr}/dist`,Wt={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",baseURL:Ks,styleURL:`${Ks}/widget.min.css`,widgetURL:`${Ks}/widget.min.js`,swiperStyleURL:`${Ks}/swiper-bundle.min.css`};var jt=Qr(So());var b=class{static debuggerEl;static infoLogs=[];static log(...e){jt.default.info(...e)}static verbose(...e){jt.default.debug(...e)}static error(...e){jt.default.error(...e)}static warn(...e){jt.default.warn(...e)}static info(...e){jt.default.info(...e),this.infoLogs.unshift({time:new Date,message:e.join(" ")}),this.addToDebugger()}static trace(...e){jt.default.trace(...e)}static addToDebugger(){sessionStorage.cooeeDebug&&(this.debuggerEl=this.debuggerEl??document.querySelector("cooee-debugger"),this.debuggerEl&&this.debuggerEl&&(this.debuggerEl.logs=[...this.infoLogs]))}};function Nm(t=xm){jt.default.useDefaults({formatter:function(r){r.unshift(`${t} (v${Cr}):`)}});let e=nu();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?jt.default.setLevel(jt.default[localStorage.cooeeLogLevel]):jt.default.setLevel(Wt.debug?jt.default.TRACE:jt.default.OFF)}function nu(){return new URL(location.href).searchParams?.get("cooee-debug")}function Pm(){let t=["display: inline-block;","font-size: 14px;","background: linear-gradient(90deg, #d52dc8 25%, #2179e2 82%);","color: white;","padding: 4px;","border-radius: 4px;"].join(" "),e=`
|
|
11
11
|
`;e+=`\u{1F4E3} Drive higher conversions with AI-powered onsite engagement
|
|
12
12
|
`,e+=`\u{1F50D} Track real-time visitor intent & optimize engagement
|
|
13
13
|
`,e+=`\u{1F4CA} Improve Meta Ads ROAS with intent-driven campaigns
|
|
@@ -28,7 +28,7 @@ Event: ${Dr(t)}`),!0;if(X_(t,e.denyUrls))return ie&&ee.warn(`Event dropped due t
|
|
|
28
28
|
Event: ${Dr(t)}.
|
|
29
29
|
Url: ${Na(t)}`),!0;if(!J_(t,e.allowUrls))return ie&&ee.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
30
30
|
Event: ${Dr(t)}.
|
|
31
|
-
Url: ${Na(t)}`),!0}return!1}function q_(t,e){return e?.length?Ra(t).some(r=>Oo(r,e)):!1}function K_(t,e){if(!e?.length)return!1;let r=t.transaction;return r?Oo(r,e):!1}function X_(t,e){if(!e?.length)return!1;let r=Na(t);return r?Oo(r,e):!1}function J_(t,e){if(!e?.length)return!0;let r=Na(t);return r?Oo(r,e):!0}function Q_(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 Na(t){try{let r=[...t.exception?.values??[]].reverse().find(n=>n.mechanism?.parent_id===void 0&&n.stacktrace?.frames?.length)?.stacktrace?.frames;return r?Q_(r):null}catch{return ie&&ee.error(`Cannot extract url for event ${Dr(t)}`),null}}function Z_(t){return t.exception?.values?.length?!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value):!1}function ap(t,e,r,n,o,i){if(!o.exception?.values||!i||!vr(i.originalException,Error))return;let s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;s&&(o.exception.values=sp(t,e,n,i.originalException,r,o.exception.values,s,0))}function sp(t,e,r,n,o,i,s,a){if(i.length>=r+1)return i;let l=[...i];if(vr(n[o],Error)){oh(s,a);let p=t(e,n[o]),d=l.length;ih(p,o,d,a),l=sp(t,e,r,n[o],o,[p,...l],p,d)}return Array.isArray(n.errors)&&n.errors.forEach((p,d)=>{if(vr(p,Error)){oh(s,a);let f=t(e,p),v=l.length;ih(f,`errors[${d}]`,v,a),l=sp(t,e,r,p,o,[f,...l],f,v)}}),l}function oh(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Z(_(_({},t.mechanism),t.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:e})}function ih(t,e,r,n){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Z(_({},t.mechanism),{type:"chained",source:e,exception_id:r,parent_id:n})}function cp(t){let e="console";Ot(e,t),Nt(e,eb)}function eb(){"console"in pe&&du.forEach(function(t){t in pe.console&<(pe.console,t,function(e){return Ro[t]=e,function(...r){ct("console",{args:r,level:t}),Ro[t]?.apply(pe.console,r)}})})}function lp(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}var tb="Dedupe",rb=()=>{let t;return{name:tb,processEvent(e){if(e.type)return e;try{if(nb(e,t))return ie&&ee.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},La=rb;function nb(t,e){return e?!!(ob(t,e)||ib(t,e)):!1}function ob(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 ib(t,e){let r=sh(e),n=sh(t);return!(!r||!n||r.type!==n.type||r.value!==n.value||!ch(t,e)||!ah(t,e))}function ah(t,e){let r=aa(t),n=aa(e);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let o=0;o<n.length;o++){let i=n[o],s=r[o];if(i.filename!==s.filename||i.lineno!==s.lineno||i.colno!==s.colno||i.function!==s.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 sh(t){return t.exception?.values?.[0]}function Ji(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let r=e[6]||"",n=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:r,hash:n,relative:e[5]+r+n}}function Ma(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}var Qi=pe;function up(){return"history"in Qi&&!!Qi.history}function sb(){if(!("fetch"in Qi))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Zi(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function pp(){if(typeof EdgeRuntime=="string")return!0;if(!sb())return!1;if(Zi(Qi.fetch))return!0;let t=!1,e=Qi.document;if(e&&typeof e.createElement=="function")try{let r=e.createElement("iframe");r.hidden=!0,e.head.appendChild(r),r.contentWindow?.fetch&&(t=Zi(r.contentWindow.fetch)),e.head.removeChild(r)}catch(r){ie&&ee.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return t}function mp(t,e){let r="fetch";Ot(r,t),Nt(r,()=>ab(void 0,e))}function ab(t,e=!1){e&&!pp()||lt(pe,"fetch",function(r){return function(...n){let o=new Error,{method:i,url:s}=cb(n),a={args:n,fetchData:{method:i,url:s},startTimestamp:Ut()*1e3,virtualError:o,headers:lb(n)};return t||ct("fetch",_({},a)),r.apply(pe,n).then(async l=>(t?t(l):ct("fetch",Z(_({},a),{endTimestamp:Ut()*1e3,response:l})),l),l=>{if(ct("fetch",Z(_({},a),{endTimestamp:Ut()*1e3,error:l})),zn(l)&&l.stack===void 0&&(l.stack=o.stack,Gt(l,"framesToPop",1)),l instanceof TypeError&&(l.message==="Failed to fetch"||l.message==="Load failed"||l.message==="NetworkError when attempting to fetch resource."))try{let p=new URL(a.fetchData.url);l.message=`${l.message} (${p.host})`}catch{}throw l})}})}function fp(t,e){return!!t&&typeof t=="object"&&!!t[e]}function lh(t){return typeof t=="string"?t:t?fp(t,"url")?t.url:t.toString?t.toString():"":""}function cb(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[r,n]=t;return{url:lh(r),method:fp(n,"method")?String(n.method).toUpperCase():"GET"}}let e=t[0];return{url:lh(e),method:fp(e,"method")?String(e.method).toUpperCase():"GET"}}function lb(t){let[e,r]=t;try{if(typeof r=="object"&&r!==null&&"headers"in r&&r.headers)return new Headers(r.headers);if(qm(e))return new Headers(e.headers)}catch{}}function dp(){return"npm"}var Ke=pe,hp=0;function gp(){return hp>0}function Sb(){hp++,setTimeout(()=>{hp--})}function Xn(t,e={}){function r(o){return typeof o=="function"}if(!r(t))return t;try{let o=t.__sentry_wrapped__;if(o)return typeof o=="function"?o:t;if(Kn(t))return t}catch{return t}let n=function(...o){try{let i=o.map(s=>Xn(s,e));return t.apply(this,i)}catch(i){throw Sb(),ji(s=>{s.addEventProcessor(a=>(e.mechanism&&(No(a,void 0,void 0),Or(a,e.mechanism)),a.extra=Z(_({},a.extra),{arguments:o}),a)),Ia(i)}),i}};try{for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o])}catch{}fa(n,t),Gt(t,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return t.name}})}catch{}return n}function uh(){let t=Wi(),{referrer:e}=Ke.document||{},{userAgent:r}=Ke.navigator||{},n=_(_({},e&&{Referer:e}),r&&{"User-Agent":r});return{url:t,headers:n}}function Ba(t,e){let r=vp(t,e),n={type:Rb(e),value:Ab(e)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function Tb(t,e,r,n){let i=We()?.getOptions().normalizeDepth,s=Nb(e),a={__serialized__:_a(e,i)};if(s)return{exception:{values:[Ba(t,s)]},extra:a};let l={exception:{values:[{type:qn(e)?e.constructor.name:n?"UnhandledRejection":"Error",value:Db(e,{isUnhandledRejection:n})}]},extra:a};if(r){let p=vp(t,r);p.length&&(l.exception.values[0].stacktrace={frames:p})}return l}function yp(t,e){return{exception:{values:[Ba(t,e)]}}}function vp(t,e){let r=e.stacktrace||e.stack||"",n=xb(e),o=Cb(e);try{return t(r,n,o)}catch{}return[]}var Ib=/Minified React error #\d+;/i;function xb(t){return t&&Ib.test(t.message)?1:0}function Cb(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function ph(t){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?t instanceof WebAssembly.Exception:!1}function Rb(t){let e=t?.name;return!e&&ph(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function Ab(t){let e=t?.message;return ph(t)?Array.isArray(t.message)&&t.message.length==2?t.message[1]:"wasm exception":e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function fh(t,e,r,n){let o=r?.syntheticException||void 0,i=ka(t,e,o,n);return Or(i),i.level="error",r?.event_id&&(i.event_id=r.event_id),or(i)}function mh(t,e,r="info",n,o){let i=n?.syntheticException||void 0,s=Ep(t,e,i,o);return s.level=r,n?.event_id&&(s.event_id=n.event_id),or(s)}function ka(t,e,r,n,o){let i;if(la(e)&&e.error)return yp(t,e.error);if(ua(e)||Su(e)){let s=e;if("stack"in e)i=yp(t,e);else{let a=s.name||(ua(s)?"DOMError":"DOMException"),l=s.message?`${a}: ${s.message}`:a;i=Ep(t,l,r,n),No(i,l)}return"code"in s&&(i.tags=Z(_({},i.tags),{"DOMException.code":`${s.code}`})),i}return zn(e)?yp(t,e):on(e)||qn(e)?(i=Tb(t,e,r,o),Or(i,{synthetic:!0}),i):(i=Ep(t,e,r,n),No(i,`${e}`,void 0),Or(i,{synthetic:!0}),i)}function Ep(t,e,r,n){let o={};if(n&&r){let i=vp(t,r);i.length&&(o.exception={values:[{value:e,stacktrace:{frames:i}}]}),Or(o,{synthetic:!0})}if(Do(e)){let{__sentry_template_string__:i,__sentry_template_values__:s}=e;return o.logentry={message:i,params:s},o}return o.message=e,o}function Db(t,{isUnhandledRejection:e}){let r=Au(t),n=e?"promise rejection":"exception";return la(t)?`Event \`ErrorEvent\` captured as ${n} with message \`${t.message}\``:qn(t)?`Event \`${Ob(t)}\` (type=${t.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function Ob(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function Nb(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let r=t[e];if(r instanceof Error)return r}}var Pb=5e3,es=class extends Ki{constructor(e){let r=Lb(e),n=Ke.SENTRY_SDK_SOURCE||dp();op(r,"browser",["browser"],n),super(r);let{sendDefaultPii:o,sendClientReports:i,enableLogs:s,_experiments:a}=this._options,l=s??a?.enableLogs;Ke.document&&(i||l)&&Ke.document.addEventListener("visibilitychange",()=>{Ke.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),l&&Xi(this))}),l&&(this.on("flush",()=>{Xi(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{Xi(this)},Pb)})),o&&(this.on("postprocessEvent",rp),this.on("beforeSendSession",np))}eventFromException(e,r){return fh(this._options.stackParser,e,r,this._options.attachStacktrace)}eventFromMessage(e,r="info",n){return mh(this._options.stackParser,e,r,n,this._options.attachStacktrace)}_prepareEvent(e,r,n,o){return e.platform=e.platform||"javascript",super._prepareEvent(e,r,n,o)}};function Lb(t){return _({release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:Ke.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0},t)}var dh=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var pt=pe;var Mb=1e3,hh,_p,bp;function wp(t){Ot("dom",t),Nt("dom",Bb)}function Bb(){if(!pt.document)return;let t=ct.bind(null,"dom"),e=gh(t,!0);pt.document.addEventListener("click",e,!1),pt.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(r=>{let o=pt[r]?.prototype;o?.hasOwnProperty?.("addEventListener")&&(lt(o,"addEventListener",function(i){return function(s,a,l){if(s==="click"||s=="keypress")try{let p=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=p[s]=p[s]||{refCount:0};if(!d.handler){let f=gh(t);d.handler=f,i.call(this,s,f,l)}d.refCount++}catch{}return i.call(this,s,a,l)}}),lt(o,"removeEventListener",function(i){return function(s,a,l){if(s==="click"||s=="keypress")try{let p=this.__sentry_instrumentation_handlers__||{},d=p[s];d&&(d.refCount--,d.refCount<=0&&(i.call(this,s,d.handler,l),d.handler=void 0,delete p[s]),Object.keys(p).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,a,l)}}))})}function kb(t){if(t.type!==_p)return!1;try{if(!t.target||t.target._sentryId!==bp)return!1}catch{}return!0}function Ub(t,e){return t!=="keypress"?!1:e?.tagName?!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable):!0}function gh(t,e=!1){return r=>{if(!r||r._sentryCaptured)return;let n=Fb(r);if(Ub(r.type,n))return;Gt(r,"_sentryCaptured",!0),n&&!n._sentryId&&Gt(n,"_sentryId",ut());let o=r.type==="keypress"?"input":r.type;kb(r)||(t({event:r,name:o,global:e}),_p=r.type,bp=n?n._sentryId:void 0),clearTimeout(hh),hh=pt.setTimeout(()=>{bp=void 0,_p=void 0},Mb)}}function Fb(t){try{return t.target}catch{return null}}var Ua;function ts(t){let e="history";Ot(e,t),Nt(e,Hb)}function Hb(){if(pt.addEventListener("popstate",()=>{let e=pt.location.href,r=Ua;if(Ua=e,r===e)return;ct("history",{from:r,to:e})}),!up())return;function t(e){return function(...r){let n=r.length>2?r[2]:void 0;if(n){let o=Ua,i=$b(String(n));if(Ua=i,o===i)return e.apply(this,r);ct("history",{from:o,to:i})}return e.apply(this,r)}}lt(pt.history,"pushState",t),lt(pt.history,"replaceState",t)}function $b(t){try{return new URL(t,pt.location.origin).toString()}catch{return t}}var Fa={};function Sp(t){let e=Fa[t];if(e)return e;let r=pt[t];if(Zi(r))return Fa[t]=r.bind(pt);let n=pt.document;if(n&&typeof n.createElement=="function")try{let o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);let i=o.contentWindow;i?.[t]&&(r=i[t]),n.head.removeChild(o)}catch(o){dh&&ee.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,o)}return r&&(Fa[t]=r.bind(pt))}function Ha(t){Fa[t]=void 0}var Jn="__sentry_xhr_v3__";function Tp(t){Ot("xhr",t),Nt("xhr",Vb)}function Vb(){if(!pt.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,r,n){let o=new Error,i=Ut()*1e3,s=Pt(n[0])?n[0].toUpperCase():void 0,a=Wb(n[1]);if(!s||!a)return e.apply(r,n);r[Jn]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(r.__sentry_own_request__=!0);let l=()=>{let p=r[Jn];if(p&&r.readyState===4){try{p.status_code=r.status}catch{}let d={endTimestamp:Ut()*1e3,startTimestamp:i,xhr:r,virtualError:o};ct("xhr",d)}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply(p,d,f){return l(),p.apply(d,f)}}):r.addEventListener("readystatechange",l),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(p,d,f){let[v,y]=f,T=d[Jn];return T&&Pt(v)&&Pt(y)&&(T.request_headers[v.toLowerCase()]=y),p.apply(d,f)}}),e.apply(r,n)}}),t.send=new Proxy(t.send,{apply(e,r,n){let o=r[Jn];if(!o)return e.apply(r,n);n[0]!==void 0&&(o.body=n[0]);let i={startTimestamp:Ut()*1e3,xhr:r};return ct("xhr",i),e.apply(r,n)}})}function Wb(t){if(Pt(t))return t;try{return t.toString()}catch{}}function Ip(t,e=Sp("fetch")){let r=0,n=0;function o(i){let s=i.body.length;r+=s,n++;let a=_({body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:r<=6e4&&n<15},t.fetchOptions);if(!e)return Ha("fetch"),In("No fetch implementation available");try{return e(t.url,a).then(l=>(r-=s,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 Ha("fetch"),r-=s,n--,In(l)}}return Da(t,o)}var jb=30;var Gb=50;function xp(t,e,r,n){let o={filename:t,function:e==="<anonymous>"?"?":e,in_app:!0};return r!==void 0&&(o.lineno=r),n!==void 0&&(o.colno=n),o}var zb=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Yb=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,qb=/\((\S*)(?::(\d+))(?::(\d+))\)/,Kb=t=>{let e=zb.exec(t);if(e){let[,n,o,i]=e;return xp(n,"?",+o,+i)}let r=Yb.exec(t);if(r){if(r[2]&&r[2].indexOf("eval")===0){let s=qb.exec(r[2]);s&&(r[2]=s[1],r[3]=s[2],r[4]=s[3])}let[o,i]=_h(r[1]||"?",r[2]);return xp(i,o,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},yh=[jb,Kb],Xb=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Jb=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Qb=t=>{let e=Xb.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let i=Jb.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let n=e[3],o=e[1]||"?";return[o,n]=_h(o,n),xp(n,o,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},Eh=[Gb,Qb];var vh=[yh,Eh],Cp=Eu(...vh),_h=(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]:"?",r?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var Bo=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var $a=1024,Zb="Breadcrumbs",ew=(t={})=>{let e=_({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:Zb,setup(r){e.console&&cp(nw(r)),e.dom&&wp(rw(r,e.dom)),e.xhr&&Tp(ow(r)),e.fetch&&mp(iw(r)),e.history&&ts(sw(r)),e.sentry&&r.on("beforeSendEvent",tw(r))}}},bh=ew;function tw(t){return function(r){We()===t&&Lr({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:Dr(r)},{event:r})}}function rw(t,e){return function(n){if(We()!==t)return;let o,i,s=typeof e=="object"?e.serializeAttribute:void 0,a=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;a&&a>$a&&(Bo&&ee.warn(`\`dom.maxStringLength\` cannot exceed ${$a}, but a value of ${a} was configured. Sentry will use ${$a} instead.`),a=$a),typeof s=="string"&&(s=[s]);try{let p=n.event,d=aw(p)?p.target:p;o=Vi(d,{keyAttrs:s,maxStringLength:a}),i=Ru(d)}catch{o="<unknown>"}if(o.length===0)return;let l={category:`ui.${n.name}`,message:o};i&&(l.data={"ui.component_name":i}),Lr(l,{event:n.event,name:n.name,global:n.global})}}function nw(t){return function(r){if(We()!==t)return;let n={category:"console",data:{arguments:r.args,logger:"console"},level:lp(r.level),message:pa(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)n.message=`Assertion failed: ${pa(r.args.slice(1)," ")||"console.assert"}`,n.data.arguments=r.args.slice(1);else return;Lr(n,{input:r.args,level:r.level})}}function ow(t){return function(r){if(We()!==t)return;let{startTimestamp:n,endTimestamp:o}=r,i=r.xhr[Jn];if(!n||!o||!i)return;let{method:s,url:a,status_code:l,body:p}=i,d={method:s,url:a,status_code:l},f={xhr:r.xhr,input:p,startTimestamp:n,endTimestamp:o},v={category:"xhr",data:d,type:"http",level:Ma(l)};t.emit("beforeOutgoingRequestBreadcrumb",v,f),Lr(v,f)}}function iw(t){return function(r){if(We()!==t)return;let{startTimestamp:n,endTimestamp:o}=r;if(o&&!(r.fetchData.url.match(/sentry_key/)&&r.fetchData.method==="POST"))if(r.fetchData.method,r.fetchData.url,r.error){let i=r.fetchData,s={data:r.error,input:r.args,startTimestamp:n,endTimestamp:o},a={category:"fetch",data:i,level:"error",type:"http"};t.emit("beforeOutgoingRequestBreadcrumb",a,s),Lr(a,s)}else{let i=r.response,s=Z(_({},r.fetchData),{status_code:i?.status});r.fetchData.request_body_size,r.fetchData.response_body_size,i?.status;let a={input:r.args,response:i,startTimestamp:n,endTimestamp:o},l={category:"fetch",data:s,type:"http",level:Ma(s.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",l,a),Lr(l,a)}}}function sw(t){return function(r){if(We()!==t)return;let n=r.from,o=r.to,i=Ji(Ke.location.href),s=n?Ji(n):void 0,a=Ji(o);s?.path||(s=i),i.protocol===a.protocol&&i.host===a.host&&(o=a.relative),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),Lr({category:"navigation",data:{from:n,to:o}})}}function aw(t){return!!t&&!!t.target}var cw=["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"],lw="BrowserApiErrors",uw=(t={})=>{let e=_({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1},t);return{name:lw,setupOnce(){e.setTimeout&<(Ke,"setTimeout",wh),e.setInterval&<(Ke,"setInterval",wh),e.requestAnimationFrame&<(Ke,"requestAnimationFrame",pw),e.XMLHttpRequest&&"XMLHttpRequest"in Ke&<(XMLHttpRequest.prototype,"send",fw);let r=e.eventTarget;r&&(Array.isArray(r)?r:cw).forEach(o=>mw(o,e))}}},Sh=uw;function wh(t){return function(...e){let r=e[0];return e[0]=Xn(r,{mechanism:{data:{function:rr(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function pw(t){return function(e){return t.apply(this,[Xn(e,{mechanism:{data:{function:"requestAnimationFrame",handler:rr(t)},handled:!1,type:"instrument"}})])}}function fw(t){return function(...e){let r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in r&&typeof r[o]=="function"&<(r,o,function(i){let s={mechanism:{data:{function:o,handler:rr(i)},handled:!1,type:"instrument"}},a=Kn(i);return a&&(s.mechanism.data.handler=rr(a)),Xn(i,s)})}),t.apply(this,e)}}function mw(t,e){let n=Ke[t]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(lt(n,"addEventListener",function(o){return function(i,s,a){try{dw(s)&&(s.handleEvent=Xn(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:rr(s),target:t},handled:!1,type:"instrument"}}))}catch{}return e.unregisterOriginalCallbacks&&hw(this,i,s),o.apply(this,[i,Xn(s,{mechanism:{data:{function:"addEventListener",handler:rr(s),target:t},handled:!1,type:"instrument"}}),a])}}),lt(n,"removeEventListener",function(o){return function(i,s,a){try{let l=s.__sentry_wrapped__;l&&o.call(this,i,l,a)}catch{}return o.call(this,i,s,a)}}))}function dw(t){return typeof t.handleEvent=="function"}function hw(t,e,r){t&&typeof t=="object"&&"removeEventListener"in t&&typeof t.removeEventListener=="function"&&t.removeEventListener(e,r)}var Th=()=>({name:"BrowserSession",setupOnce(){if(typeof Ke.document>"u"){Bo&&ee.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Yi({ignoreDuration:!0}),qi(),ts(({from:t,to:e})=>{t!==void 0&&t!==e&&(Yi({ignoreDuration:!0}),qi())})}});var gw="GlobalHandlers",yw=(t={})=>{let e=_({onerror:!0,onunhandledrejection:!0},t);return{name:gw,setupOnce(){Error.stackTraceLimit=50},setup(r){e.onerror&&(Ew(r),Ih("onerror")),e.onunhandledrejection&&(vw(r),Ih("onunhandledrejection"))}}},xh=yw;function Ew(t){_u(e=>{let{stackParser:r,attachStacktrace:n}=Ch();if(We()!==t||gp())return;let{msg:o,url:i,line:s,column:a,error:l}=e,p=ww(ka(r,l||o,void 0,n,!1),i,s,a);p.level="error",zi(p,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function vw(t){wu(e=>{let{stackParser:r,attachStacktrace:n}=Ch();if(We()!==t||gp())return;let o=_w(e),i=Yn(o)?bw(o):ka(r,o,void 0,n,!0);i.level="error",zi(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function _w(t){if(Yn(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 bw(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function ww(t,e,r,n){let o=t.exception=t.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},l=a.frames=a.frames||[],p=n,d=r,f=Pt(e)&&e.length>0?e:Wi();return l.length===0&&l.push({colno:p,filename:f,function:"?",in_app:!0,lineno:d}),t}function Ih(t){Bo&&ee.log(`Global Handler attached: ${t}`)}function Ch(){return We()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var Rh=()=>({name:"HttpContext",preprocessEvent(t){if(!Ke.navigator&&!Ke.location&&!Ke.document)return;let e=uh(),r=_(_({},e.headers),t.request?.headers);t.request=Z(_(_({},e),t.request),{headers:r})}});var Sw="cause",Tw=5,Iw="LinkedErrors",xw=(t={})=>{let e=t.limit||Tw,r=t.key||Sw;return{name:Iw,preprocessEvent(n,o,i){let s=i.getOptions();ap(Ba,s.stackParser,r,e,n,o)}}},Ah=xw;function Rp(t){return[Pa(),Oa(),Sh(),bh(),xh(),Ah(),La(),Rh(),Th()]}var Wa={},ja,Ap,Dh;(()=>{let t=Rp({}).filter(e=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(e.name));Ap=new es({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:Ip,stackParser:Cp,integrations:t,environment:Wt.mode,release:`web-sdk@${Cr}`,debug:Wt.debug}),Ap.init()})();function ae(t,e,r){b.error(`${e}:`,t);let n=Ph(r);if(n.setTag("operation",e),t instanceof Er){Cw(n,t,e);return}n.captureException(t)}function Oh(t,e,r){Ph(r).captureMessage(t,e??"error")}function Cw(t,e,r){if(Rw(t,e),e.response){let n=e.response,o=e.responseText;n.status&&t.setTag("http.status_code",n.status),n.statusText&&t.setTag("http.status_text",n.statusText),o&&typeof o=="object"&&"error"in o&&(t.setTag("http.error_code",o.error.code),t.setTag("http.error_message",o.error.message)),t.setExtras({responseText:e.responseText,statusText:n.statusText,responseType:n.type,redirected:n.redirected,responseUrl:n.url}),t.captureMessage(`${r} failed with ${n.status}`,"error");return}if(e.request){t.captureMessage(`No response was received for ${r}`,"error");return}}function Rw(t,e){let r=e.request;if(!r)return;t.setExtras({body:e.requestBody,headers:r.headers,method:r.method,url:r.url});let n=r.headers?.get("Cooee-Retry-Attempt");n!==null&&t.setTag("retry.attempt",n)}function Nh(t){Dh=t}function Ga(t,e){Wa[t]=_(_({},Wa[t]),e)}function ko(t){ja=_(_({},ja),t)}function Ph(t){t??={};let{extra:e,tags:r}=t,n=new wt;if(n.setClient(Ap),n.setUser(Dh),t.triggerContext&&!t.engagementTrigger&&(t.engagementTrigger=t.triggerContext.triggerData),t.engagementTrigger){let o=t.engagementTrigger;n.setTags({"engagement.id":o.engagementID,"engagement.short_id":o.shortID,"engagement.objective":o.objective,"engagement.delivery_type":o.onsiteDeliveryType,"engagement.content_id":o.contentID,"engagement.variation":o.variation,"engagement.currency":o.currency})}return e&&n.setExtras(e),r&&n.setTags(r),ja&&n.setTags(ja),Object.keys(Wa).forEach(o=>{n.setContext(o,Wa[o])}),n.setTag("language",navigator.language),n.setTag("timezone",Lh()),Aw(n),n}function Aw(t){window.Shopify&&(t.setTag("shopify.shop",window.Shopify.shop),t.setTag("shopify.currency",window.Shopify.currency?.active),t.setTag("shopify.locale",window.Shopify.locale),t.setTag("theme.schema_name",window.Shopify.theme?.schema_name),t.setTag("theme.schema_version",window.Shopify.theme?.schema_version))}var za=class{static format(e,r){let n=/{{\s*(\w+)\s*}}/;return r.replace(n,(o,i)=>{switch(i){case"amount":return this.formatWithDelimiters(e,2);case"amount_no_decimals":return this.formatWithDelimiters(e,0);case"amount_with_comma_separator":return this.formatWithDelimiters(e,2,".",",");case"amount_no_decimals_with_comma_separator":return this.formatWithDelimiters(e,0,".",",");case"amount_with_apostrophe_separator":return this.formatWithDelimiters(e,2,"'",".");case"amount_no_decimals_with_space_separator":return this.formatWithDelimiters(e,0," ");case"amount_with_space_separator":return this.formatWithDelimiters(e,2," ",",");case"amount_with_period_and_space_separator":return this.formatWithDelimiters(e,2," ",".");default:return o}})}static formatWithDelimiters(e,r=2,n=",",o="."){if(isNaN(e)||e==null)return"0";let s=(e/100).toFixed(r).split("."),a=s[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+n),l=s[1]?o+s[1]:"";return a+l}};function Uo(t){try{return new URL(t)}catch{return}}function Dp(t){return!t||t==="null"||t==="undefined"}function Mh(t,e){let r=t.indexOf(e);return r===-1?!1:(t.splice(r,1),!0)}function Lt(t,e,r){return{[t]:Op(e,r),[t+"_wo_currency"]:e}}function Op(t,e){if(t==0&&e)return"Free";let r=ye(),n=qe.get(),o=r.shopCurrencyCode||n.currency,i=r.currencyCode;i||b.warn("Currency code is not set in RuntimeData");let s=n.money?.format??r.moneyFormat,a;if(s&&o===i)a=za.format(t*100,s);else{let l;try{l=new Intl.NumberFormat(kh(),{style:"currency",currency:i||o,minimumFractionDigits:0,maximumFractionDigits:2})}catch(p){return ae(p,"format-currency",{extra:{currentCurrency:i,shopCurrency:o}}),""}a=l.format(t),a=a.replace("\u20B9","Rs. "),n.money?.showCurrency&&i!=="INR"&&(a=a.concat(` ${i}`))}return a}function Bh(t){let e=kh();try{return new Intl.NumberFormat(e,{notation:"compact"}).format(t)}catch(r){return ae(r,"format-number",{extra:{lang:e,value:t}}),t.toString()}}function kh(){let t="en";return typeof navigator<"u"&&(navigator.languages!==void 0&&navigator.languages.length>0?t=navigator.languages[0]:navigator.language&&(t=navigator.language)),t=t.split(";")[0],t=t.split("-")[0],t||"en"}var Ya;function Lh(){if(Ya)return Ya;try{return Ya=Intl.DateTimeFormat().resolvedOptions().timeZone,Ya}catch{return""}}function Fo(t){document.readyState!=="loading"?t():document.addEventListener("DOMContentLoaded",t)}function wr(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)},5e3)}async function Np(t,e=10,r=document){let n=0,o=document.querySelectorAll("nonexistent-tag");for(;n<e;){let i=Math.min(100*2**n,5e3);if(await tr.sleep(i),o=r.querySelectorAll(t),o.length)return b.verbose(`Attempt ${n+1}: ${o.length} elements found with ${t}`),o;b.verbose(`Attempt ${n+1}: Elements not found with ${t}. Retrying after ${i}ms.`),n++}return b.verbose(`\u26A0\uFE0F Max attempts reached. Element not found with ${t}.`),o}async function Ho(t,e=10,r=document){return(await Np(t,e,r)).item(0)}async function Pp(t){let[e,r,n]=await Promise.all([ze.get("did"),xt.get("id",""),ze.get("sessionNumber",1)]),o={letscooee_did:e,letscooee_sid:r,letscooee_sn:n,__letscooee_time:new Date().toLocaleString()};return t&&(o.__letscooee_via=t),o}async function qa(t){let e=await Pp(t);return Object.entries(e).map(([r,n])=>({key:r,value:n.toString()}))}function Mr(t,e,r,n=!1){Object.defineProperty(t,e,{enumerable:!1,configurable:!1,writable:n,value:r})}function Uh(t){if(t%100>=11&&t%100<=13)return t+"th";switch(t%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd";default:return t+"th"}}var Qa,Ie,Wh,Bp,Qn,Fh,jh,Gh,zh,kp,Lp,Mp,Dw,ns={},Yh=[],Ow=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Za=Array.isArray;function ln(t,e){for(var r in e)t[r]=e[r];return t}function Up(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Fp(t,e,r){var n,o,i,s={};for(i in e)i=="key"?n=e[i]:i=="ref"?o=e[i]:s[i]=e[i];if(arguments.length>2&&(s.children=arguments.length>3?Qa.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)s[i]===void 0&&(s[i]=t.defaultProps[i]);return Xa(t,s,n,o,null)}function Xa(t,e,r,n,o){var i={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Wh,__i:-1,__u:0};return o==null&&Ie.vnode!=null&&Ie.vnode(i),i}function kr(t){return t.children}function Br(t,e){this.props=t,this.context=e}function $o(t,e){if(e==null)return t.__?$o(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?$o(t):null}function qh(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return qh(t)}}function Hh(t){(!t.__d&&(t.__d=!0)&&Qn.push(t)&&!Ja.__r++||Fh!=Ie.debounceRendering)&&((Fh=Ie.debounceRendering)||jh)(Ja)}function Ja(){for(var t,e,r,n,o,i,s,a=1;Qn.length;)Qn.length>a&&Qn.sort(Gh),t=Qn.shift(),a=Qn.length,t.__d&&(r=void 0,o=(n=(e=t).__v).__e,i=[],s=[],e.__P&&((r=ln({},n)).__v=n.__v+1,Ie.vnode&&Ie.vnode(r),Hp(e.__P,r,n,e.__n,e.__P.namespaceURI,32&n.__u?[o]:null,i,o??$o(n),!!(32&n.__u),s),r.__v=n.__v,r.__.__k[r.__i]=r,Jh(i,r,s),r.__e!=o&&qh(r)));Ja.__r=0}function Kh(t,e,r,n,o,i,s,a,l,p,d){var f,v,y,T,D,P,U=n&&n.__k||Yh,X=e.length;for(l=Nw(r,e,U,l,X),f=0;f<X;f++)(y=r.__k[f])!=null&&(v=y.__i==-1?ns:U[y.__i]||ns,y.__i=f,P=Hp(t,y,v,o,i,s,a,l,p,d),T=y.__e,y.ref&&v.ref!=y.ref&&(v.ref&&$p(v.ref,null,y),d.push(y.ref,y.__c||T,y)),D==null&&T!=null&&(D=T),4&y.__u||v.__k===y.__k?l=Xh(y,l,t):typeof y.type=="function"&&P!==void 0?l=P:T&&(l=T.nextSibling),y.__u&=-7);return r.__e=D,l}function Nw(t,e,r,n,o){var i,s,a,l,p,d=r.length,f=d,v=0;for(t.__k=new Array(o),i=0;i<o;i++)(s=e[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(l=i+v,(s=t.__k[i]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?Xa(null,s,null,null,null):Za(s)?Xa(kr,{children:s},null,null,null):s.constructor==null&&s.__b>0?Xa(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=t,s.__b=t.__b+1,a=null,(p=s.__i=Pw(s,r,l,f))!=-1&&(f--,(a=r[p])&&(a.__u|=2)),a==null||a.__v==null?(p==-1&&(o>d?v--:o<d&&v++),typeof s.type!="function"&&(s.__u|=4)):p!=l&&(p==l-1?v--:p==l+1?v++:(p>l?v--:v++,s.__u|=4))):t.__k[i]=null;if(f)for(i=0;i<d;i++)(a=r[i])!=null&&(2&a.__u)==0&&(a.__e==n&&(n=$o(a)),Zh(a,a));return n}function Xh(t,e,r){var n,o;if(typeof t.type=="function"){for(n=t.__k,o=0;n&&o<n.length;o++)n[o]&&(n[o].__=t,e=Xh(n[o],e,r));return e}t.__e!=e&&(e&&t.type&&!r.contains(e)&&(e=$o(t)),r.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Pw(t,e,r,n){var o,i,s=t.key,a=t.type,l=e[r];if(l===null&&t.key==null||l&&s==l.key&&a==l.type&&(2&l.__u)==0)return r;if(n>(l!=null&&(2&l.__u)==0?1:0))for(o=r-1,i=r+1;o>=0||i<e.length;){if(o>=0){if((l=e[o])&&(2&l.__u)==0&&s==l.key&&a==l.type)return o;o--}if(i<e.length){if((l=e[i])&&(2&l.__u)==0&&s==l.key&&a==l.type)return i;i++}}return-1}function $h(t,e,r){e[0]=="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||Ow.test(e)?r:r+"px"}function Ka(t,e,r,n,o){var i,s;e:if(e=="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof n=="string"&&(t.style.cssText=n=""),n)for(e in n)r&&e in r||$h(t.style,e,"");if(r)for(e in r)n&&r[e]==n[e]||$h(t.style,e,r[e])}else if(e[0]=="o"&&e[1]=="n")i=e!=(e=e.replace(zh,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=r,r?n?r.u=n.u:(r.u=kp,t.addEventListener(e,i?Mp:Lp,i)):t.removeEventListener(e,i?Mp:Lp,i);else{if(o=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&r==1?"":r))}}function Vh(t){return function(e){if(this.l){var r=this.l[e.type+t];if(e.t==null)e.t=kp++;else if(e.t<r.u)return;return r(Ie.event?Ie.event(e):e)}}}function Hp(t,e,r,n,o,i,s,a,l,p){var d,f,v,y,T,D,P,U,X,B,Q,ve,K,ce,se,fe,Le,Te=e.type;if(e.constructor!=null)return null;128&r.__u&&(l=!!(32&r.__u),i=[a=e.__e=r.__e]),(d=Ie.__b)&&d(e);e:if(typeof Te=="function")try{if(U=e.props,X="prototype"in Te&&Te.prototype.render,B=(d=Te.contextType)&&n[d.__c],Q=d?B?B.props.value:d.__:n,r.__c?P=(f=e.__c=r.__c).__=f.__E:(X?e.__c=f=new Te(U,Q):(e.__c=f=new Br(U,Q),f.constructor=Te,f.render=Mw),B&&B.sub(f),f.props=U,f.state||(f.state={}),f.context=Q,f.__n=n,v=f.__d=!0,f.__h=[],f._sb=[]),X&&f.__s==null&&(f.__s=f.state),X&&Te.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=ln({},f.__s)),ln(f.__s,Te.getDerivedStateFromProps(U,f.__s))),y=f.props,T=f.state,f.__v=e,v)X&&Te.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),X&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(X&&Te.getDerivedStateFromProps==null&&U!==y&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(U,Q),!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(U,f.__s,Q)===!1||e.__v==r.__v){for(e.__v!=r.__v&&(f.props=U,f.state=f.__s,f.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.some(function(Re){Re&&(Re.__=e)}),ve=0;ve<f._sb.length;ve++)f.__h.push(f._sb[ve]);f._sb=[],f.__h.length&&s.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(U,f.__s,Q),X&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(y,T,D)})}if(f.context=Q,f.props=U,f.__P=t,f.__e=!1,K=Ie.__r,ce=0,X){for(f.state=f.__s,f.__d=!1,K&&K(e),d=f.render(f.props,f.state,f.context),se=0;se<f._sb.length;se++)f.__h.push(f._sb[se]);f._sb=[]}else do f.__d=!1,K&&K(e),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++ce<25);f.state=f.__s,f.getChildContext!=null&&(n=ln(ln({},n),f.getChildContext())),X&&!v&&f.getSnapshotBeforeUpdate!=null&&(D=f.getSnapshotBeforeUpdate(y,T)),fe=d,d!=null&&d.type===kr&&d.key==null&&(fe=Qh(d.props.children)),a=Kh(t,Za(fe)?fe:[fe],e,r,n,o,i,s,a,l,p),f.base=e.__e,e.__u&=-161,f.__h.length&&s.push(f),P&&(f.__E=f.__=null)}catch(Re){if(e.__v=null,l||i!=null)if(Re.then){for(e.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;i[i.indexOf(a)]=null,e.__e=a}else for(Le=i.length;Le--;)Up(i[Le]);else e.__e=r.__e,e.__k=r.__k;Ie.__e(Re,e,r)}else i==null&&e.__v==r.__v?(e.__k=r.__k,e.__e=r.__e):a=e.__e=Lw(r.__e,e,r,n,o,i,s,l,p);return(d=Ie.diffed)&&d(e),128&e.__u?void 0:a}function Jh(t,e,r){for(var n=0;n<r.length;n++)$p(r[n],r[++n],r[++n]);Ie.__c&&Ie.__c(e,t),t.some(function(o){try{t=o.__h,o.__h=[],t.some(function(i){i.call(o)})}catch(i){Ie.__e(i,o.__v)}})}function Qh(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:Za(t)?t.map(Qh):ln({},t)}function Lw(t,e,r,n,o,i,s,a,l){var p,d,f,v,y,T,D,P=r.props,U=e.props,X=e.type;if(X=="svg"?o="http://www.w3.org/2000/svg":X=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(p=0;p<i.length;p++)if((y=i[p])&&"setAttribute"in y==!!X&&(X?y.localName==X:y.nodeType==3)){t=y,i[p]=null;break}}if(t==null){if(X==null)return document.createTextNode(U);t=document.createElementNS(o,X,U.is&&U),a&&(Ie.__m&&Ie.__m(e,i),a=!1),i=null}if(X==null)P===U||a&&t.data==U||(t.data=U);else{if(i=i&&Qa.call(t.childNodes),P=r.props||ns,!a&&i!=null)for(P={},p=0;p<t.attributes.length;p++)P[(y=t.attributes[p]).name]=y.value;for(p in P)if(y=P[p],p!="children"){if(p=="dangerouslySetInnerHTML")f=y;else if(!(p in U)){if(p=="value"&&"defaultValue"in U||p=="checked"&&"defaultChecked"in U)continue;Ka(t,p,null,y,o)}}for(p in U)y=U[p],p=="children"?v=y:p=="dangerouslySetInnerHTML"?d=y:p=="value"?T=y:p=="checked"?D=y:a&&typeof y!="function"||P[p]===y||Ka(t,p,y,P[p],o);if(d)a||f&&(d.__html==f.__html||d.__html==t.innerHTML)||(t.innerHTML=d.__html),e.__k=[];else if(f&&(t.innerHTML=""),Kh(e.type=="template"?t.content:t,Za(v)?v:[v],e,r,n,X=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:r.__k&&$o(r,0),a,l),i!=null)for(p=i.length;p--;)Up(i[p]);a||(p="value",X=="progress"&&T==null?t.removeAttribute("value"):T!=null&&(T!==t[p]||X=="progress"&&!T||X=="option"&&T!=P[p])&&Ka(t,p,T,P[p],o),p="checked",D!=null&&D!=t[p]&&Ka(t,p,D,P[p],o))}return t}function $p(t,e,r){try{if(typeof t=="function"){var n=typeof t.__u=="function";n&&t.__u(),n&&e==null||(t.__u=t(e))}else t.current=e}catch(o){Ie.__e(o,r)}}function Zh(t,e,r){var n,o;if(Ie.unmount&&Ie.unmount(t),(n=t.ref)&&(n.current&&n.current!=t.__e||$p(n,null,e)),(n=t.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){Ie.__e(i,e)}n.base=n.__P=null}if(n=t.__k)for(o=0;o<n.length;o++)n[o]&&Zh(n[o],e,r||typeof t.type!="function");r||Up(t.__e),t.__c=t.__=t.__e=void 0}function Mw(t,e,r){return this.constructor(t,r)}function eg(t,e,r){var n,o,i,s;e==document&&(e=document.documentElement),Ie.__&&Ie.__(t,e),o=(n=typeof r=="function")?null:r&&r.__k||e.__k,i=[],s=[],Hp(e,t=(!n&&r||e).__k=Fp(kr,null,[t]),o||ns,ns,e.namespaceURI,!n&&r?[r]:o?null:e.firstChild?Qa.call(e.childNodes):null,i,!n&&r?r:o?o.__e:e.firstChild,n,s),Jh(i,t,s)}Qa=Yh.slice,Ie={__e:function(t,e,r,n){for(var o,i,s;e=e.__;)if((o=e.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(t)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(t,n||{}),s=o.__d),s)return o.__E=o}catch(a){t=a}throw t}},Wh=0,Bp=function(t){return t!=null&&t.constructor==null},Br.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ln({},this.state),typeof t=="function"&&(t=t(ln({},r),this.props)),t&&ln(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),Hh(this))},Br.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Hh(this))},Br.prototype.render=kr,Qn=[],jh=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Gh=function(t,e){return t.__v.__b-e.__v.__b},Ja.__r=0,zh=/(PointerCapture)$|Capture$/i,kp=0,Lp=Vh(!1),Mp=Vh(!0),Dw=0;var Wp,zt,Vp,tg,rg=0,ug=[],ft=Ie,ng=ft.__b,og=ft.__r,ig=ft.diffed,sg=ft.__c,ag=ft.unmount,cg=ft.__;function Bw(t,e){ft.__h&&ft.__h(zt,t,rg||e),rg=0;var r=zt.__H||(zt.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function Gp(t,e){var r=Bw(Wp++,7);return Fw(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function kw(){for(var t;t=ug.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(ec),t.__H.__h.forEach(jp),t.__H.__h=[]}catch(e){t.__H.__h=[],ft.__e(e,t.__v)}}ft.__b=function(t){zt=null,ng&&ng(t)},ft.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),cg&&cg(t,e)},ft.__r=function(t){og&&og(t),Wp=0;var e=(zt=t.__c).__H;e&&(Vp===zt?(e.__h=[],zt.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(e.__h.forEach(ec),e.__h.forEach(jp),e.__h=[],Wp=0)),Vp=zt},ft.diffed=function(t){ig&&ig(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(ug.push(e)!==1&&tg===ft.requestAnimationFrame||((tg=ft.requestAnimationFrame)||Uw)(kw)),e.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Vp=zt=null},ft.__c=function(t,e){e.some(function(r){try{r.__h.forEach(ec),r.__h=r.__h.filter(function(n){return!n.__||jp(n)})}catch(n){e.some(function(o){o.__h&&(o.__h=[])}),e=[],ft.__e(n,r.__v)}}),sg&&sg(t,e)},ft.unmount=function(t){ag&&ag(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{ec(n)}catch(o){e=o}}),r.__H=void 0,e&&ft.__e(e,r.__v))};var lg=typeof requestAnimationFrame=="function";function Uw(t){var e,r=function(){clearTimeout(n),lg&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,35);lg&&(e=requestAnimationFrame(r))}function ec(t){var e=zt,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),zt=e}function jp(t){var e=zt;t.__c=t.__(),zt=e}function Fw(t,e){return!t||t.length!==e.length||e.some(function(r,n){return r!==t[n]})}var Hw=Symbol.for("preact-signals");function Yp(){if(Vo>1)Vo--;else{for(var t,e=!1;os!==void 0;){var r=os;for(os=void 0,zp++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&fg(r))try{r.c()}catch(o){e||(t=o,e=!0)}r=n}}if(zp=0,Vo--,e)throw t}}var Fe=void 0;var os=void 0,Vo=0,zp=0,tc=0;function pg(t){if(Fe!==void 0){var e=t.n;if(e===void 0||e.t!==Fe)return e={i:0,S:t,p:Fe.s,n:void 0,t:Fe,e:void 0,x:void 0,r:e},Fe.s!==void 0&&(Fe.s.n=e),Fe.s=e,t.n=e,32&Fe.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=Fe.s,e.n=void 0,Fe.s.n=e,Fe.s=e),e}}function mt(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}mt.prototype.brand=Hw;mt.prototype.h=function(){return!0};mt.prototype.S=function(t){this.t!==t&&t.e===void 0&&(t.x=this.t,this.t!==void 0&&(this.t.e=t),this.t=t)};mt.prototype.U=function(t){if(this.t!==void 0){var e=t.e,r=t.x;e!==void 0&&(e.x=r,t.e=void 0),r!==void 0&&(r.e=e,t.x=void 0),t===this.t&&(this.t=r)}};mt.prototype.subscribe=function(t){var e=this;return St(function(){var r=e.value,n=Fe;Fe=void 0;try{t(r)}finally{Fe=n}})};mt.prototype.valueOf=function(){return this.value};mt.prototype.toString=function(){return this.value+""};mt.prototype.toJSON=function(){return this.value};mt.prototype.peek=function(){var t=Fe;Fe=void 0;try{return this.value}finally{Fe=t}};Object.defineProperty(mt.prototype,"value",{get:function(){var t=pg(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(zp>100)throw new Error("Cycle detected");this.v=t,this.i++,tc++,Vo++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Yp()}}}});function ir(t){return new mt(t)}function fg(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function mg(t){for(var e=t.s;e!==void 0;e=e.n){var r=e.S.n;if(r!==void 0&&(e.r=r),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function dg(t){for(var e=t.s,r=void 0;e!==void 0;){var n=e.p;e.i===-1?(e.S.U(e),n!==void 0&&(n.n=e.n),e.n!==void 0&&(e.n.p=n)):r=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=n}t.s=r}function Wo(t){mt.call(this,void 0),this.x=t,this.s=void 0,this.g=tc-1,this.f=4}(Wo.prototype=new mt).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===tc))return!0;if(this.g=tc,this.f|=1,this.i>0&&!fg(this))return this.f&=-2,!0;var t=Fe;try{mg(this),Fe=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return Fe=t,dg(this),this.f&=-2,!0};Wo.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}mt.prototype.S.call(this,t)};Wo.prototype.U=function(t){if(this.t!==void 0&&(mt.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}};Wo.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}};Object.defineProperty(Wo.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=pg(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function qp(t){return new Wo(t)}function hg(t){var e=t.u;if(t.u=void 0,typeof e=="function"){Vo++;var r=Fe;Fe=void 0;try{e()}catch(n){throw t.f&=-2,t.f|=8,Kp(t),n}finally{Fe=r,Yp()}}}function Kp(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,hg(t)}function $w(t){if(Fe!==this)throw new Error("Out-of-order effect");dg(this),Fe=t,this.f&=-2,8&this.f&&Kp(this),Yp()}function is(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}is.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}};is.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,hg(this),mg(this),Vo++;var t=Fe;return Fe=this,$w.bind(this,t)};is.prototype.N=function(){2&this.f||(this.f|=2,this.o=os,os=this)};is.prototype.d=function(){this.f|=8,1&this.f||Kp(this)};function St(t){var e=new is(t);try{e.c()}catch(r){throw e.d(),r}return e.d.bind(e)}var Jp,Xp;function jo(t,e){Ie[t]=e.bind(null,Ie[t]||function(){})}function rc(t){Xp&&Xp(),Xp=t&&t.S()}function gg(t){var e=this,r=t.data,n=Ww(r);n.value=r;var o=Gp(function(){for(var i=e.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return e.__$u.c=function(){var s,a=e.__$u.S(),l=o.value;a(),Bp(l)||((s=e.base)==null?void 0:s.nodeType)!==3?(e.__$f|=1,e.setState({})):e.base.data=l},qp(function(){var s=n.value.value;return s===0?0:s===!0?"":s||""})},[]);return o.value}gg.displayName="_st";Object.defineProperties(mt.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:gg},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});jo("__b",function(t,e){if(typeof e.type=="string"){var r,n=e.props;for(var o in n)if(o!=="children"){var i=n[o];i instanceof mt&&(r||(e.__np=r={}),r[o]=i,n[o]=i.peek())}}t(e)});jo("__r",function(t,e){rc();var r,n=e.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=(function(o){var i;return St(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i})())),Jp=n,rc(r),t(e)});jo("__e",function(t,e,r,n){rc(),Jp=void 0,t(e,r,n)});jo("diffed",function(t,e){rc(),Jp=void 0;var r;if(typeof e.type=="string"&&(r=e.__e)){var n=e.__np,o=e.props;if(n){var i=r.U;if(i)for(var s in i){var a=i[s];a!==void 0&&!(s in n)&&(a.d(),i[s]=void 0)}else r.U=i={};for(var l in n){var p=i[l],d=n[l];p===void 0?(p=Vw(r,l,d,o),i[l]=p):p.o(d,o)}}}t(e)});function Vw(t,e,r,n){var o=e in t&&t.ownerSVGElement===void 0,i=ir(r);return{o:function(s,a){i.value=s,n=a},d:St(function(){var s=i.value.value;n[e]!==s&&(n[e]=s,o?t[e]=s:s?t.setAttribute(e,s):t.removeAttribute(e))})}}jo("unmount",function(t,e){if(typeof e.type=="string"){var r=e.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var o in n){var i=n[o];i&&i.d()}}}}else{var s=e.__c;if(s){var a=s.__$u;a&&(s.__$u=void 0,a.d())}}t(e)});jo("__h",function(t,e,r,n){(n<3||n===9)&&(e.__$f|=2),t(e,r,n)});Br.prototype.shouldComponentUpdate=function(t,e){var r=this.__$u,n=r&&r.s!==void 0;for(var o in e)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){if(!(n||2&this.__$f||4&this.__$f)||1&this.__$f)return!0}else if(!(n||4&this.__$f)||3&this.__$f)return!0;for(var i in t)if(i!=="__source"&&t[i]!==this.props[i])return!0;for(var s in this.props)if(!(s in t))return!0;return!1};function Ww(t){return Gp(function(){return ir(t)},[])}var nc=class{url;alt;constructor(e){e.alt&&(this.alt=e.alt),this.url=e.url}};var oc=class{d;cmp;effective;constructor(e={}){this.d=e.d,this.cmp=e.cmp,this.effective=this.d}};var Qp=class{id;mID;name;groupID;groupName;isSelected;constructor(e){e??={},this.id=e.id,this.mID=e.mID,this.name=e.name,this.groupID=e.groupID,this.groupName=e.groupName,this.isSelected=e.isSelected??!1}},Ur=class{mID;name;imgs;link;price;sku;isAvailable;quantity;sellingPlans;selectedOptions;selectedSellingPlan;effectivePrice;constructor(e){e=e??{},this.mID=e.mID,this.name=e.name,this.imgs=e.imgs?.map(r=>new nc(r))??[],this.link=e.link,this.price=new oc(e.price),this.sku=e.sku,this.isAvailable=e.isAvailable,this.quantity=e.quantity,this.selectedOptions=e.selectedOptions??[],this.effectivePrice=ir(this.price.effective),e.sellingPlans?.length&&(this.selectedSellingPlan=ir(void 0)),this.sellingPlans=e.sellingPlans?.map(r=>{let n=new Qp(r);return n.isSelected&&(this.selectedSellingPlan.value=n),n})}getOneImage(){return this.imgs[0]?.url}changeSellingPlan(e){this.selectedSellingPlan.value=e}hasEffectivePrice(){return this.effectivePrice.value!==this.price.d}};var Ct=class{id;mID;name;options;imgs;vars;desc;link;slug;quantity;category;meta;reviews;tags;selectedOrFirstVariant;selected=ir(!0);constructor(e){this.update(e),this.selectedOrFirstVariant=ir(this.selectedVariant)}get firstImageURL(){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(e){this.vars=e,this.selectedOrFirstVariant.value=this.selectedVariant}get selectedVariant(){return this.vars.find(e=>e.isAvailable)??this.vars[0]}hasVariants(){return this.vars?.length>1}setSelectedVariant(e){this.selectedOrFirstVariant.value=e}setSelectedVariantByID(e){if(!e)return;let r=this.vars.find(n=>n.mID===e.toString());r&&this.setSelectedVariant(r)}update(e){return this.id=e.id??this.id,this.mID=e.mID??this.mID,this.name=e.name??this.name,this.imgs=e.imgs??this.imgs,this.desc=e.desc??this.desc,this.link=e.link??this.link,this.slug=e.slug??this.slug,this.quantity=e.quantity??this.quantity,this.meta=e.meta??this.meta,this.category=e.category??this.category,this.reviews=e.reviews??this.reviews,this.options=e.options??this.options,this.tags=e.tags??this.tags,e.vars&&(this.vars=e.vars.map(r=>new Ur(r))),this}toEmbed(e){return e=e??this.selectedOrFirstVariant.value,new Dt({id:this.id,mID:this.mID,vID:e.mID,vName:e.name,name:this.name,link:this.link,slug:this.slug,price:e.price.d,imageURL:e.getOneImage()??this.imgs?.[0].url})}getTemplateVariables(){let e=this.selectedOrFirstVariant.value,r=e.price,n=this.name,o=this.category,i=this.variantImage??this.firstImageURL,s=this.meta,a=this.tags?.join(",")??"",l=this.reviews?.rating,p=this.reviews?.totalReviews,d=r.cmp&&r.cmp>r.d,f=Z(_({name:n},Lt("price",r.d,!0)),{image_url:i,meta:s,category:o,rating:l,reviews:p,tags:a});if(e.hasEffectivePrice()){let y=Lt("effective_price",e.effectivePrice.value,!0);Object.assign(f,y)}if(d){let y=r.cmp-r.d,T={discount_percent:(y/r.cmp*100).toFixed(0)};Object.assign(f,T),Object.assign(f,Lt("compare_price",r.cmp)),Object.assign(f,Lt("discount_price",y))}let v={name:e.name,quantity:e.quantity};return{product:f,variant:v}}};var ic=class{id;alt;shortID;sources;items;durationMS;thumbnail;card;bestSource;highSource;goodSource;lowSource;m3u8Source;constructor(e={}){if(this.id=e.id,this.alt=e.alt,this.shortID=e.shortID,this.sources=e.sources?.sort((r,n)=>n.height-r.height),this.durationMS=e.durationMS,this.thumbnail=e.thumbnail,this.items=e.items?e.items.map(r=>new Ct(r)):[],this.card=e.card,this.sources){let r=[];for(let n of this.sources)n.format==="mp4"?r.push(n):n.format==="m3u8"&&!this.m3u8Source&&(this.m3u8Source=n);r.length>0&&(this.bestSource=r[0],this.highSource=r.length>1?r[1]:r[0],this.lowSource=r.length>2?r[r.length-1]:r[0])}}};var Zp=class{enabled;type;color;constructor(e){e??={},this.enabled=e.enabled,this.type=e.type,this.color=new Ve(e.color)}},ef=class{size;enabled;color;constructor(e){e??={},this.enabled=e.enabled,this.size=e.size,this.color=new Ve(e.color)}},tf=class{enabled;delay;constructor(e={}){this.enabled=e.enabled,e.delay&&(this.delay=e.delay>100?e.delay:e.delay*1e3)}},Cn=class{navigation;pagination;autoplay;loop;maxInRow;gap;maxInRowSm;gapSm;speed;marquee;constructor(e){e??={},this.navigation=new ef(e.navigation),this.pagination=new Zp(e.pagination),this.autoplay=new tf(e.autoplay),this.loop=e.loop??!1,this.maxInRow=e.maxInRow??4,this.gap=e.gap??0,this.maxInRowSm=e.maxInRowSm??this.maxInRow,this.gapSm=e.gapSm??this.gap,e.speed&&(this.speed=e.speed*1e3),this.marquee=e.marquee}};var sc=class{videos;source;template;heading;slidePerViewCount;autoPlay;showMuteButton;footerContent;detailPopup;playlistConfig;constructor(e={}){this.videos=e.videos?.map(r=>new ic(r))??[],this.source=e.source,this.template=e.template,this.detailPopup=e.detailPopup??{template:"VIDEO_ONLY_VIEW"},this.heading=e.heading,this.showMuteButton=e.showMuteButton,this.slidePerViewCount=e.slidePerViewCount??4,this.autoPlay=e.autoPlay??"ON",this.footerContent=e.footerContent??"FIRST_ITEM",this.playlistConfig=e.playlistConfig?.videoSwiper?{videoSwiper:new Cn(e.playlistConfig?.videoSwiper)}:void 0}};var Mt=Qr(Eg());Mt.filters.define("default",function(t){return typeof t>"u"||t==null?"":Gw(t)});+Mt.filters.define("max",(t,e)=>{let r=Number(t),n=Number(e);return isNaN(r)||isNaN(n)?t:r>n?e:t});Mt.filters.define("min",(t,e)=>{let r=Number(t),n=Number(e);return isNaN(r)||isNaN(n)?t:r<n?e:t});Mt.filters.define("fallback",(t,e)=>t==null||t===""?e:t);Mt.filters.define("manipulate_quantity",(t,e,r)=>{if(e??=1,r??=100,e>r)return b.error("Invalid range: min should be less than or equal to max."),t;if(t>=e&&t<=r)return t;let n=t%r;return n<e?e:n});Mt.filters.define("apply_discount_perc",(t,e,r=1/0)=>{if(t=+t,isNaN(t))return b.error("Need value as a number for `apply_discount_perc` filter"),NaN;if(e<0||e>100)return b.error("Invalid percent value for `apply_discount_perc` filter. Must be between 0 and 100."),NaN;let n=t*e/100;return t-Math.min(r,n)});Mt.filters.define("apply_discount_fixed",(t,e)=>(t=+t,isNaN(t)?(b.error("Need value as a number for `apply_discount_fixed` filter"),NaN):Math.max(0,t-e)));Mt.filters.define("currency",t=>(t=+t,isNaN(t)?(b.error("Need value as a number for `currency` filter"),NaN):Op(t)));Mt.defaultConfig.defaultFilter="default";Mt.defaultConfig.useWith=!0;Mt.defaultConfig.autoEscape=!1;var jw={'"':""","\\":"\","\n":"\\n"};function Gw(t){return String(t).replace(/["\\\n]/g,e=>jw[e])}function zw(t){if(!t)return"";let e=/({{{\s*([^}]+?)\s*}}}|{{\s*&\s*([^}]+?)\s*}})/g;return t.replace(e,(r,n,o,i)=>`{{ ${(o||i||"").trim()} }}`)}var Go=(t,e,r)=>{e=_({discount:{},cart:{},product:{},bundle:{},variant:{},customer:{},svg:{},form:{},amount_left:null},e);try{return Mt.render(zw(t),e)}catch(n){throw ae(n,"squirrelly-render",{extra:{template:t,values:e},triggerContext:r}),n}},Zn=(t,e,r)=>{let n=JSON.stringify(t),o=Go(n,e,r);try{return JSON.parse(o)}catch(i){throw ae(i,"variable-replacement",{extra:{before:t,after:o},triggerContext:r}),i}};function ss(){return!!window.Shopify}function cc(){if(ss())return window.Shopify.shop?.split(".")?.[0]}function vg(t){let n=(t.includes("://")?new URL(t).pathname:t).match(/\/products\/([^/]+?)(?:\.html)?$/);return n?n[1]:null}function zo(t){return(window.Shopify?.routes?.root??"/")+t.substring(1)}function lc(t){return zo(t+"?from=cooee")}var me=class t{static CURRENT;token;items=[];total_price=0;original_total_price=0;items_subtotal_price=0;currency;item_count=0;attributes;cart_level_discount_applications;discount_codes;total_discount=0;constructor(){}static getCurrent(){return this.CURRENT||(this.CURRENT=new t),this.CURRENT}async getNormalisedCart(e){return Yw(e)}getCooeeCart(){return rf()}update(e){return this.token=e.token,this.items=e.items,this.total_price=e.total_price,this.original_total_price=e.original_total_price,this.items_subtotal_price=e.items_subtotal_price,this.currency=e.currency,this.item_count=e.item_count,this.attributes=e.attributes,this.cart_level_discount_applications=e.cart_level_discount_applications,this.discount_codes=e.discount_codes,this.total_discount=e.total_discount,ye().currencyCode=this.currency,b.verbose("Updated ShopifyCart",this),this}toString(){return`ShopifyCart(token: ${this.token}, itemCount: ${this.item_count})`}};async function Yw(t){let e=me.getCurrent();await Kw(e,t);let r=_g(e);return t&&await ze.set("cart",r),r}function rf(){return _g(me.getCurrent())}function _g(t){return{amount:t.total_price/100,originalAmount:t.original_total_price/100,itemsSubtotalPrice:t.items_subtotal_price/100,currency:t.currency,itemCount:t.item_count,items:qw(t.items),token:t.token}}function qw(t){if(!t)return b.error("No item received to be sent"),[];Array.isArray(t)||(t=[t]);let e=[];for(let r of t){if(!r.id||!r.title){b.warn("Invalid item received",r);continue}let n={name:r.title,quantity:+r.quantity||1,mID:r.product_id?.toString(),vID:r.id.toString(),price:+r.price/100||0,finalPrice:+r.final_price/100||0,properties:r.properties,key:r.key},o=r.selling_plan_allocation?.selling_plan;if(!o){e.push(n);continue}n.sellingPlanAllocation={sellingPlan:{fixedSellingPlan:o.fixed_selling_plan,id:o.id,name:o.name,recurringDeliveries:o.recurring_deliveries}},e.push(n)}return e}async function Kw(t,e){if(!e&&t.token){b.verbose("Not fetching cart");return}b.verbose("Fetching cart");let r=lc("/cart.js");try{let n=(await rn(r)).data;t.update(n)}catch(n){b.error("Unable to fetch the cart",n)}}var uc=class{id;mID;handle;title;imageURL;constructor(e){e??={},this.id=e.id,this.mID=e.mID,this.handle=e.handle,this.title=e.title,this.imageURL=e.imageURL}};var nf=class{enabled;constructor(e){this.enabled=e.enabled}},of=class extends nf{max;min;constructor(e){e??={},super(e),this.min=e.min,this.max=e.max}},pc=class{productQuantity;constructor(e){e??={},this.productQuantity=new of(e.productQuantity)}};var Yt=class{t;bg;br;clc;shd;spc;trf;a;w;h;x;y;constructor(e){this.t=e.t,e.bg&&(this.bg=new Vn(e.bg)),e.br&&(this.br=new en(e.br)),e.shd&&(this.shd=new Ui(e.shd)),e.spc&&(this.spc=new tn(e.spc)),this.trf=new Wn(e.trf),this.clc=e.clc,this.w=e.w,this.h=e.h,this.x=e.x,this.y=e.y,this.a=e.a}get alpha(){return this.a??100}get type(){return this.t}get typeAsString(){return je[this.t]}get click(){return this.clc}},je=(B=>(B[B.IMAGE=1]="IMAGE",B[B.TEXT=2]="TEXT",B[B.BUTTON=3]="BUTTON",B[B.FLEXBOX=4]="FLEXBOX",B[B.MULTI_COLUMN=5]="MULTI_COLUMN",B[B.CHECKBOX=6]="CHECKBOX",B[B.PRODUCTS=11]="PRODUCTS",B[B.PRODUCT=12]="PRODUCT",B[B.PRODUCT_IMAGE=13]="PRODUCT_IMAGE",B[B.PRODUCT_TITLE=14]="PRODUCT_TITLE",B[B.PRODUCT_VARIATIONS=15]="PRODUCT_VARIATIONS",B[B.PRODUCT_VARIATIONS_SELLING_PLANS=16]="PRODUCT_VARIATIONS_SELLING_PLANS",B[B.PRODUCT_BUTTON=18]="PRODUCT_BUTTON",B[B.PRODUCT_RATING=19]="PRODUCT_RATING",B[B.EMAIL_INPUT=51]="EMAIL_INPUT",B[B.PHONE_INPUT=52]="PHONE_INPUT",B[B.COUNTDOWN_TIMER=61]="COUNTDOWN_TIMER",B[B.CAROUSEL=62]="CAROUSEL",B[B.SHAPE=100]="SHAPE",B))(je||{});var eo=class extends Yt{constructor(e){super(e)}};var un=class extends Yt{src;constructor(e){super(e),this.src=e.src}};var Fr=class extends Yt{typo;constructor(e){super(e);let r=_(_({},e.f),e.typo);e.alg&&(r.ta=e.alg),e.c&&(r.tc=e.c),this.typo=new at(r)}get color(){return this.typography.tc}get typography(){return this.typo}};var Rn=class extends Fr{prs;constructor(e){super(e),this.prs=e.prs}get parts(){return this.prs}};var fc=class extends Yt{o;constructor(e){super(e),this.o=e.o??5,this.w=this.w??1080,this.h=this.h??1920}getOrigin(){return this.o}};var Yo=class{dd;hh;mm;ss;date;constructor(e){e??={},this.dd=e.dd??0,this.hh=e.hh??0,this.mm=e.mm??0,this.ss=e.ss??0,this.date=e.date?new Date(e.date):void 0}start(e,r){let n=new Date;e===2?(n.setSeconds(n.getSeconds()+this.ss),n.setMinutes(n.getMinutes()+this.mm),n.setHours(n.getHours()+this.hh),n.setDate(n.getDate()+this.dd)):n=this.date??new Date;let o=window.setInterval(()=>{let i=new Date().getTime(),s=n.getTime()-i;if(s<1){clearInterval(o);return}let a=Math.floor(s/(1e3*60*60*24)),l=Math.floor(s%(1e3*60*60*24)/(1e3*60*60)),p=Math.floor(s%(1e3*60*60)/(1e3*60)),d=Math.floor(s%(1e3*60)/1e3);r({days:a,hours:l,minutes:p,seconds:d})},1e3);return o}};var qo=class extends Fr{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e),this.gap=e.gap,this.timerType=e.type,this.timer=new Yo(e.timer),this.show=e.show??{day:!0,hour:!0,minute:!0,second:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}};var mc=class{txt;c;constructor(e){e??={},this.txt=e.txt,this.c=new Ve(e.c??{})}get text(){return this.txt}get color(){return this.c}};var An=class extends Fr{ph;constructor(e){super(e),this.ph=new mc(e.ph)}get placeholderText(){return this.ph.text}get placeholderColor(){return this.ph.color.rgba}};var Ko=class extends An{constructor(e){e??={},super(e)}};var Xo=class extends An{};var Jo=class extends An{};var Qo=class extends un{};var dc=class{en;ex;constructor(e){e=e??{},this.en=e.en,this.ex=e.ex}getEnterAnimation(){switch(this.en){case 2:return[{transform:"translateY(-100%)"},{transform:"translateY(0%)"}];case 3:return[{transform:"translateY(100%)"},{transform:"translateY(0%)"}];case 4:return[{transform:"translateX(-100%)"},{transform:"translateX(0%)"}];case 5:return[{transform:"translateX(100%)"},{transform:"translateX(0%)"}];case 6:return[{transform:"translate(-100%, -100%)"},{transform:"translate(0%, 0%)"}];case 7:return[{transform:"translate(100%, -100%)"},{transform:"translate(0%, 0%)"}];case 8:return[{transform:"translate(-100%, 100%)"},{transform:"translate(0%, 0%)"}];case 9:return[{transform:"translate(100%, 100%)"},{transform:"translate(0%, 0%)"}];case 10:return[{transform:"scale(0.1)"},{transform:"scale(1)"}];default:return[]}}getExitAnimation(){switch(this.ex){case 2:return[{transform:"translateY(0%)"},{transform:"translateY(-100%)"}];case 3:return[{transform:"translateY(0%)"},{transform:"translateY(100%)"}];case 4:return[{transform:"translateX(0%)"},{transform:"translateX(-100%)"}];case 5:return[{transform:"translateX(0%)"},{transform:"translateX(100%)"}];case 6:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, -100%)"}];case 7:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, -100%)"}];case 8:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, 100%)"}];case 9:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, 100%)"}];case 10:return[{transform:"scale(1)"},{transform:"scale(0)"}];default:return[]}}};var hc=15,as=class extends Yt{gvt;max;cover;anim;embedded;constructor(e){e=e??{},super(e),this.gvt=e.gvt??5,this.max=e.max,this.cover=e.cover??!0,this.anim=new dc(e.anim),this.spc||(this.spc=new tn({pl:hc,pr:hc,pt:hc,pb:hc}))}};var gc=class extends as{cont;elems=[];mob;constructor(e){e=e??{},super(e),this.cont=new fc(e.cont),this.mob=new as(e.mob),this.bg||(this.bg=this.cont.bg,delete this.cont.bg),e.elems.forEach(r=>{r.t===1?this.elems.push(new un(r)):r.t===2?this.elems.push(new Rn(r)):r.t===3?this.elems.push(new Rn(r)):r.t===100?this.elems.push(new eo(r)):r.t===51?this.elems.push(new Xo(r)):r.t===52?this.elems.push(new Jo(r)):r.t===61?this.elems.push(new qo(r)):r.t===15||r.t===16?this.elems.push(new Ko(r)):r.t===13&&this.elems.push(new Qo(r))})}getStylesForWrapper(){if(this.cover)return{};let e;return this.gvt===1?e={top:0,left:0}:this.gvt===2?e={top:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===3?e={top:0,right:0}:this.gvt===6?e={top:"50%",right:0,transform:"translateY(-50%)"}:this.gvt===9?e={bottom:0,right:0}:this.gvt===8?e={bottom:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===7?e={bottom:0,left:0}:this.gvt===4?e={top:"50%",left:0,transform:"translateY(-50%)"}:e={top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},e.overflow="visible",e}getFlexStylesForContainer(){let e={display:"flex",flexDirection:"row"},r,n;return this.gvt===1?(r="flex-start",n="flex-start"):this.gvt===2?(r="center",n="flex-start"):this.gvt===3?(r="flex-end",n="flex-start"):this.gvt===4?(r="flex-start",n="center"):this.gvt===6?(r="flex-end",n="center"):this.gvt===7?(r="flex-start",n="flex-end"):this.gvt===8?(r="center",n="flex-end"):this.gvt===9?(r="flex-end",n="flex-end"):(r="center",n="center"),e.alignItems=n,e.justifyContent=r,e.overflow="visible",e}overrideForMobileView(){this.max=this.mob.max??this.max,this.cover=this.mob.cover??this.cover,this.gvt=this.mob.gvt??this.gvt,this.bg=this.mob.bg??this.bg,this.spc=this.mob.spc??this.spc,this.anim=this.mob.anim??this.anim}};var Zo=class{gap;dir;wrap;jc;ai;scroll;constructor(e){e??={},this.gap=e.gap??0,this.dir=e.dir??"row",this.wrap=e.wrap??"nowrap",this.jc=e.jc??"flex-start",this.ai=e.ai??"flex-start",this.scroll=e.scroll}};var yc=class{of;disp;pos;top;bottom;left;right;zIndex;constructor(e){e??={},this.of=e.of,this.disp=e.disp,this.pos=e.pos,this.top=e.top,this.bottom=e.bottom,this.left=e.left,this.right=e.right,this.zIndex=e.zIndex}};var Ec=class{w;h;maxW;maxH;minW;minH;constructor(e){e??={},this.w=e.w??"100%",this.h=e.h??"auto",this.maxW=e.maxW,this.maxH=e.maxH,this.minW=e.minW,this.minH=e.minH}};var vc=class{size;bg;br;spc;typo;lout;flex;constructor(e){e??={},this.spc=new tn(e.spc),e.size&&(this.size=new Ec(e.size)),e.bg&&(this.bg=new Vn(e.bg)),e.br&&(this.br=new en(e.br)),e.typo&&(this.typo=new at(e.typo)),e.lout&&(this.lout=new yc(e.lout)),e.flex&&(this.flex=new Zo(e.flex))}},ei=class{sm;lg;constructor(e){e??={},this.sm=new vc(e.sm),this.lg=new vc(e.lg)}};var gt=class{t;style;hide;when;clc;l;constructor(e,r){r??={},this.t=e,this.style=new ei(r.style),this.hide=r.hide,this.l=r.l,r.when?.op&&(this.when=r.when),r.clc&&(this.clc=r.clc)}get stringType(){return je[this.t]}};var yt=class extends gt{text;constructor(e,r){e?.style?.lg?.typo?.s&&delete e.style.lg.typo.s,e?.style?.sm?.typo?.s&&delete e.style.sm.typo.s,super(r??2,e),e??={},this.text=e.text}};var to=class extends yt{constructor(e,r){super(e,r??3)}};var ti=class extends gt{value;constructor(e){super(6,e),e??={},this.value=e.value}};var ri=class extends yt{showChips;optionsConfig;constructor(e=15,r){super(r,e),r??={},this.showChips=r.showChips??!1,this.optionsConfig=r.optionsConfig??{}}};var _c=class extends gt{c;iconSize;showSingleStar;fullStar;halfStart;constructor(e){super(19,e),e??={},this.c=new Ve(e.c),this.iconSize=e.iconSize??24,this.showSingleStar=e.showSingleStar??!1,this.fullStar=e.fullStar,this.halfStart=e.halfStart}};var bg=Qr(So());var bc=class extends gt{conf;slide;formData;values;allowedTypes;constructor(e){super(62,e),e&&this.update(e)}update(e){e??={},this.slide=qt.getParsedElement(e.slide),this.formData=e.formData,this.values=e.values,this.conf=new Cn(e.conf),this.allowedTypes=e.allowedTypes}};var wc=class extends yt{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e,61),this.gap=e.gap,this.timerType=e.type,this.timer=new Yo(e.timer),this.show=e.show??{days:!0,hours:!0,minutes:!0,seconds:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}};var Dn=class extends gt{elems;constructor(e){super(4,e),this.update(e)}update(e){e??={},this.elems??=[],e.elems?.forEach(r=>{let n=qt.getParsedElement(r);n&&this.elems.push(n)})}};var ro=class extends gt{src;sm;lg;constructor(e,r){super(r??1,e),e&&this.update(e)}update(e){this.src=e.src,this.sm=e.sm,this.lg=e.lg}};var qt=class t{static getParsedElements(e){let r=[];return e?.forEach(n=>{let o=t.getParsedElement(n);o&&r.push(o)}),r}static getParsedElement(e){switch(e.t){case 2:return new yt(e);case 3:return new to(e);case 6:return new ti(e);case 11:return new Sc(e);case 12:return new On(e);case 61:return new wc(e);case 4:return new Dn(e);case 1:return new ro(e);case 13:return new ro(e,13);case 14:return new yt(e,14);case 15:case 16:return new ri(e.t,e);case 18:return new to(e,18);case 62:return new bc(e);case 19:return new _c(e);default:bg.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"}}};var On=class extends gt{img;title;desc;price;compareAt;btn;variantDD;show;symbol;cBox;elems;noLinks;constructor(e){if(e??={},super(12,e),this.show=e.show,this.elems=qt.getParsedElements(e.elems),this.noLinks=e.noLinks,!this.elems.length){e.cBox&&this.elems.push(new ti(e.cBox)),this.elems.push(new ro(e.img,13));let r=new yt(e.title,14);r.hide=!e.show?.title,r.text="{{ product.name }}",this.elems.push(r);let n=new yt(e.price);n.text="{{ product.price }}",n.hide=!e.show?.price;let o=new yt(e.compareAt);o.text="{{ product.compare_price }}",o.hide=!e.show?.price,e.compareAt||(o.style=new ei(n.style),o.style.lg.typo=new at(Z(_({},o.style.lg.typo),{td:"line-through"})),o.style.sm.typo=new at(Z(_({},o.style.sm.typo),{td:"line-through"})));let i=new Dn({style:{lg:{spc:{mb:10},flex:{dir:"row",gap:10,ai:"center",jc:qt.parseAlignmentToJustifyContent(n.style.lg.typo?.ta)}}}});i.elems.push(o),i.elems.push(n),this.elems.push(i);let s=new ri(15,e.variantDD);if(s.hide=!e.show?.variantDD,this.elems.push(s),e.btn){let a=new to(e.btn,18);a.hide=!e.show?.btn,this.elems.push(a)}}e.symbol&&(this.symbol=new yt(e.symbol))}};var Sc=class extends gt{conf;prod;constructor(e){super(11,e),e??={},this.conf=new sf(e.conf),this.prod=new On(e.prod)}};var Tc=class extends Cn{disp;maxItems;constructor(e){e??={},super(e),this.disp=e.disp,this.maxItems=e.maxItems}},sf=class{lg;sm;constructor(e){e??={},this.lg=new Tc(e.lg),this.sm=new Tc(e.sm)}};var Ic=class extends Dn{constructor(e){super(e)}};var ni=class{cont;elems=[];constructor(e){e=e??{},this.cont=new Ic(e.cont),e.elems?.forEach(r=>{this.addRawElement(r)})}addRawElement(e){let r=qt.getParsedElement(e);return r&&this.elems.push(r),r}};function xc(t,e){return Xw(t,e,0,5)}function Xw(t,e,r=0,n=50){if(e){if(r>n){console.warn("Maximum recursion depth reached in findFirstElementOfType");return}for(let o of e){if(o.t===t)return o;let i="elems"in o?o.elems:[];if(i?.length>0){let s=xc(t,i);if(s)return s}}}}var af=class{engagementID;shortID;contentType;delay;onsiteDeliveryType;objective;redirectBehaviour;constructor(e){this.shortID=e.shortID,this.contentType=e.contentType,this.engagementID=e.engagementID,this.delay=e.delay??0,this.redirectBehaviour=e.redirectBehaviour,this.onsiteDeliveryType=e.onsiteDeliveryType,this.objective=e.objective}isAnySplit(){return this.isABTesting()||this.isExclusionTesting()}isExclusionTesting(){return this.contentType===Pi.EXCLUSION}isABTesting(){return this.contentType===Pi.ABTESTING}isSingleContent(){return this.contentType===Pi.SINGLE}},cs=class{videoConfig;savingsBarConfig;afterDeleteJS;afterRenderJS;constructor(e){this.update(e)}update(e){e??={},e.videoConfig&&(this.videoConfig=new sc(e.videoConfig)),e.savingsBarConfig&&(this.savingsBarConfig=new ia(e.savingsBarConfig)),e.afterDeleteJS&&(this.afterDeleteJS=e.afterDeleteJS),e.afterRenderJS&&(this.afterRenderJS=e.afterRenderJS)}},Tt=class extends af{contentID;variation;ian;widget;discount;placement;promotionType;contentSource;manipulation;klaviyoFormID;entryAnimation;hasMultiplePlacement;skipSubscribedItems;progressBarConfig;stickyATCConfig;bundleConfig;content;previewType;occurred;id;currency;props;items;nonMutableItems;embeddedItems;bundleFrom;collections;customerData;experimentConfig;discountData=ir({});constructor(e){super(e),this.id=e.id,this.currency=ye().currencyCode??"USD",this.contentID=e.contentID,this.variation=e.variation,e.widget&&(this.widget=new ni(e.widget)),this.previewType=e.previewType,this.occurred=e.occurred??new Date,this.props=e.props,this.entryAnimation=e.entryAnimation??"NONE",this.embeddedItems=e.embeddedItems?.map(r=>new Dt(r)),this.items=e.items?.map(r=>new Ct(r))??[],this.nonMutableItems=e.items?.map(r=>new Ct(r))??[],this.collections=e.collections?.map(r=>new uc(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 pc(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 ra(e.experimentConfig)),e.progressBarConfig&&(this.progressBarConfig=new oa(e.progressBarConfig)),e.bundleConfig&&(this.bundleConfig=new Zs(e.bundleConfig)),e.bundleFrom&&(this.bundleFrom=new Ct(e.bundleFrom)),e.content&&(this.content=new cs(e.content))}shouldDelay(){return this.delay>0}getDelaySeconds(){let e=new Date().getTime()-this.occurred.getTime();return this.delay*1e3-e}isBundle(){return this.objective===yr.BUNDLE_AND_UPSELL}isCartEmbed(){return this.onsiteDeliveryType===Li.CART_EMBED}isPageEmbed(){return this.onsiteDeliveryType===Li.PAGE_EMBED}isProgressBar(){return this.objective===yr.PROGRESS_BAR}isSubscriptionUpsell(){return this.objective===yr.SUBSCRIPTION_UPSELL}isCartRecovery(){return this.objective===yr.CART_RECOVERY}isProductPromotion(){return this.objective===yr.PRODUCT_PROMOTION}isProductPromoted(){return this.isProductPromotion()||this.isBundle()||this.isCartRecovery()}isCollectionPromoted(){return this.isProductPromotion()&&this.collections.length>0&&this.promotionType===su.COLLECTION}isBYOB(){return this.objective===yr.BYOB}isStickyATC(){return this.objective===yr.STICKY_ATC}isShoppableVideo(){return this.objective===yr.SHOPPABLE_VIDEO}isSavingsBar(){return this.objective===yr.SAVINGS_BAR}processPopup(e){let r=this.items[0],n={},o={};if(r){let a=r.selectedOrFirstVariant.value;n=Z(_(_({name:r.name,id:r.mID,link:r.link,vID:a.mID,image:r.variantImage},Lt("price",a.price.d)),Lt("comparePrice",a.price.cmp)),{quantity:r.quantity}),o={quantity:a.quantity}}let i={productCount:me.getCurrent().item_count},s=Go(JSON.stringify(e),{product:n,variant:o,cart:i,discount:this.discount,customer:this.customerData},new Rr(new Date,this));return r&&(s=s.replace(new RegExp("https://cdn.global.letscooee.com/images/placeholders/product.png","gi"),r.variantImage??r.firstImageURL)),new gc(JSON.parse(s))}calculateDiscountData(e,r){let n=Zr.sum(e,s=>s.selectedOrFirstVariant.value.price.d),o=Zr.sum(e,s=>{let a=s.selectedOrFirstVariant.value.price;return a.cmp??a.d}),i={actualPrice:n,totalComparePrice:o,discountAmount:0,discountPercentage:0,discountedPrice:n};if(!e?.length||!r||!this.discount?.type){this.discountData.value=this.formatCurrencyAndNumber(i);return}if(Zt.BXGY===this.discount.type&&this.discount.values?.length)i.discountPercentage=this.discount.values[0],this.updateEffectivePrice(e,i.discountPercentage,!0),i.discountAmount=i.actualPrice-Zr.sum(e,s=>s.selectedOrFirstVariant.value.effectivePrice.value);else if([Zt.UNIQUE_FLAT_ITEMS,Zt.STATIC,Zt.UNIQUE_FLAT].includes(this.discount.type)&&this.discount.values?.length)i.discountPercentage=this.discount.values[0],i.discountAmount=i.actualPrice*i.discountPercentage/100,this.updateEffectivePrice(e,i.discountPercentage);else if(this.discount.type===Zt.UNIQUE_FIXED_ITEMS&&this.discount.values?.length)i.discountAmount=i.actualPrice-this.discount.values[0],i.discountPercentage=i.discountAmount/i.actualPrice*100,this.updateEffectivePrice(e,i.discountPercentage);else if(this.discount.type===Zt.UNIQUE_CHEAPEST_ITEM_FREE){e.sort((a,l)=>l.selectedOrFirstVariant.value.price.d-a.selectedOrFirstVariant.value.price.d);let s=e[e.length-1];s.selectedOrFirstVariant.value.effectivePrice.value=0,i.discountAmount=s.selectedOrFirstVariant.value.price.d,i.discountPercentage=i.discountAmount/i.actualPrice*100}i.discountedPrice=i.actualPrice-i.discountAmount,this.discountData.value=this.formatCurrencyAndNumber(i)}getPrivateAttributesForLineItem(){return qe.get().skipItemAttribute?{}:{_via:"Cooee",_letscooee_campaign:this.shortID,_letscooee_content:this.contentID}}getKVFormatPrivateAttributesForLineItem(){return qe.get().skipItemAttribute?[]:[{key:"_via",value:"Cooee"},{key:"_letscooee_campaign",value:this.shortID},{key:"_letscooee_content",value:this.contentID}]}isBundleOnCartDrawer(){return this.isBundle()&&this.isCartEmbed()}isBundleOnPDP(){return this.isPageEmbed()&&this.isBundle()}hasSwiperElement(){if(xc(62,this.widget?.elems))return!0;let r=xc(11,this.widget?.elems);return r?r.conf.lg.disp===2||r.conf.sm.disp===2:!1}toString(){let e;return this.onsiteDeliveryType===Li.POPUP?e="Popup":e=Fm.toTitle(this.objective),`${e}(id=${this.shortID})`}getCartMagicVariables(){let e=me.getCurrent(),r=Zr.sum(e.items??[],n=>n.discounts?.reduce((o,i)=>o+(i.amount??0),0)??0);return _(_(_(_({productCount:e.item_count,product_count:e.item_count},Lt("amount",e.total_price/100)),Lt("originalAmount",e.original_total_price/100)),Lt("total_line_items_discount",r/100)),Lt("total_discount",e.total_discount/100))}shouldGetVariationImmediately(){return this.hasMultiplePlacement&&!this.isProgressBar()&&!this.isSavingsBar()}shouldSkipVariation(){return this.isSingleContent()||this.isProgressBar()||this.isSavingsBar()||!!this.widget}updateEffectivePrice(e,r,n=!1){let o=ye().currentItem;e.forEach(i=>{let s=i.selectedOrFirstVariant.value,a=s.price;if(n&&i.mID===o.mID)s.effectivePrice.value=a.d;else{let l=a.d*r/100;s.effectivePrice.value=a.d-l}})}formatCurrencyAndNumber(e){if(!e)return{};let r={discountPercentage:Bh(e.discountPercentage??0),discountCode:this.discount?.code};return["actualPrice","discountAmount","discountedPrice","totalComparePrice"].map(n=>{Object.assign(r,Lt(n,e[n]))}),r}};function Qw(t,e){return e={exports:{}},t(e,e.exports),e.exports}var Zw=nS,eS=iS,tS=cS,$r=[],ar=[],rS=typeof Uint8Array<"u"?Uint8Array:Array,cf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(no=0,wg=cf.length;no<wg;++no)$r[no]=cf[no],ar[cf.charCodeAt(no)]=no;var no,wg;ar[45]=62;ar[95]=63;function Ug(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 nS(t){var e=Ug(t),r=e[0],n=e[1];return(r+n)*3/4-n}function oS(t,e,r){return(e+r)*3/4-r}function iS(t){var e,r=Ug(t),n=r[0],o=r[1],i=new rS(oS(t,n,o)),s=0,a=o>0?n-4:n,l;for(l=0;l<a;l+=4)e=ar[t.charCodeAt(l)]<<18|ar[t.charCodeAt(l+1)]<<12|ar[t.charCodeAt(l+2)]<<6|ar[t.charCodeAt(l+3)],i[s++]=e>>16&255,i[s++]=e>>8&255,i[s++]=e&255;return o===2&&(e=ar[t.charCodeAt(l)]<<2|ar[t.charCodeAt(l+1)]>>4,i[s++]=e&255),o===1&&(e=ar[t.charCodeAt(l)]<<10|ar[t.charCodeAt(l+1)]<<4|ar[t.charCodeAt(l+2)]>>2,i[s++]=e>>8&255,i[s++]=e&255),i}function sS(t){return $r[t>>18&63]+$r[t>>12&63]+$r[t>>6&63]+$r[t&63]}function aS(t,e,r){for(var n,o=[],i=e;i<r;i+=3)n=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(t[i+2]&255),o.push(sS(n));return o.join("")}function cS(t){for(var e,r=t.length,n=r%3,o=[],i=16383,s=0,a=r-n;s<a;s+=i)o.push(aS(t,s,s+i>a?a:s+i));return n===1?(e=t[r-1],o.push($r[e>>2]+$r[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],o.push($r[e>>10]+$r[e>>4&63]+$r[e<<2&63]+"=")),o.join("")}var lf={byteLength:Zw,toByteArray:eS,fromByteArray:tS};var lS=function(e,r,n,o,i){var s,a,l=i*8-o-1,p=(1<<l)-1,d=p>>1,f=-7,v=n?i-1:0,y=n?-1:1,T=e[r+v];for(v+=y,s=T&(1<<-f)-1,T>>=-f,f+=l;f>0;s=s*256+e[r+v],v+=y,f-=8);for(a=s&(1<<-f)-1,s>>=-f,f+=o;f>0;a=a*256+e[r+v],v+=y,f-=8);if(s===0)s=1-d;else{if(s===p)return a?NaN:(T?-1:1)*(1/0);a=a+Math.pow(2,o),s=s-d}return(T?-1:1)*a*Math.pow(2,s-o)},uS=function(e,r,n,o,i,s){var a,l,p,d=s*8-i-1,f=(1<<d)-1,v=f>>1,y=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=o?0:s-1,D=o?1:-1,P=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=f):(a=Math.floor(Math.log(r)/Math.LN2),r*(p=Math.pow(2,-a))<1&&(a--,p*=2),a+v>=1?r+=y/p:r+=y*Math.pow(2,1-v),r*p>=2&&(a++,p/=2),a+v>=f?(l=0,a=f):a+v>=1?(l=(r*p-1)*Math.pow(2,i),a=a+v):(l=r*Math.pow(2,v-1)*Math.pow(2,i),a=0));i>=8;e[n+T]=l&255,T+=D,l/=256,i-=8);for(a=a<<i|l,d+=i;d>0;e[n+T]=a&255,T+=D,a/=256,d-=8);e[n+T-D]|=P*128},oi={read:lS,write:uS},Ac=Qw(function(t,e){var r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=U,e.INSPECT_MAX_BYTES=50;var n=2147483647;e.kMaxLength=n,s.TYPED_ARRAY_SUPPORT=o(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{var h=new Uint8Array(1),c={foo:function(){return 42}};return Object.setPrototypeOf(c,Uint8Array.prototype),Object.setPrototypeOf(h,c),h.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function i(h){if(h>n)throw new RangeError('The value "'+h+'" is invalid for option "size"');var c=new Uint8Array(h);return Object.setPrototypeOf(c,s.prototype),c}function s(h,c,u){if(typeof h=="number"){if(typeof c=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(h)}return a(h,c,u)}s.poolSize=8192;function a(h,c,u){if(typeof h=="string")return f(h,c);if(ArrayBuffer.isView(h))return y(h);if(h==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(h));if($e(h,ArrayBuffer)||h&&$e(h.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&($e(h,SharedArrayBuffer)||h&&$e(h.buffer,SharedArrayBuffer)))return T(h,c,u);if(typeof h=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var E=h.valueOf&&h.valueOf();if(E!=null&&E!==h)return s.from(E,c,u);var C=D(h);if(C)return C;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof h[Symbol.toPrimitive]=="function")return s.from(h[Symbol.toPrimitive]("string"),c,u);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(h))}s.from=function(h,c,u){return a(h,c,u)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(h){if(typeof h!="number")throw new TypeError('"size" argument must be of type number');if(h<0)throw new RangeError('The value "'+h+'" is invalid for option "size"')}function p(h,c,u){return l(h),h<=0?i(h):c!==void 0?typeof u=="string"?i(h).fill(c,u):i(h).fill(c):i(h)}s.alloc=function(h,c,u){return p(h,c,u)};function d(h){return l(h),i(h<0?0:P(h)|0)}s.allocUnsafe=function(h){return d(h)},s.allocUnsafeSlow=function(h){return d(h)};function f(h,c){if((typeof c!="string"||c==="")&&(c="utf8"),!s.isEncoding(c))throw new TypeError("Unknown encoding: "+c);var u=X(h,c)|0,E=i(u),C=E.write(h,c);return C!==u&&(E=E.slice(0,C)),E}function v(h){for(var c=h.length<0?0:P(h.length)|0,u=i(c),E=0;E<c;E+=1)u[E]=h[E]&255;return u}function y(h){if($e(h,Uint8Array)){var c=new Uint8Array(h);return T(c.buffer,c.byteOffset,c.byteLength)}return v(h)}function T(h,c,u){if(c<0||h.byteLength<c)throw new RangeError('"offset" is outside of buffer bounds');if(h.byteLength<c+(u||0))throw new RangeError('"length" is outside of buffer bounds');var E;return c===void 0&&u===void 0?E=new Uint8Array(h):u===void 0?E=new Uint8Array(h,c):E=new Uint8Array(h,c,u),Object.setPrototypeOf(E,s.prototype),E}function D(h){if(s.isBuffer(h)){var c=P(h.length)|0,u=i(c);return u.length===0||h.copy(u,0,0,c),u}if(h.length!==void 0)return typeof h.length!="number"||De(h.length)?i(0):v(h);if(h.type==="Buffer"&&Array.isArray(h.data))return v(h.data)}function P(h){if(h>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return h|0}function U(h){return+h!=h&&(h=0),s.alloc(+h)}s.isBuffer=function(c){return c!=null&&c._isBuffer===!0&&c!==s.prototype},s.compare=function(c,u){if($e(c,Uint8Array)&&(c=s.from(c,c.offset,c.byteLength)),$e(u,Uint8Array)&&(u=s.from(u,u.offset,u.byteLength)),!s.isBuffer(c)||!s.isBuffer(u))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===u)return 0;for(var E=c.length,C=u.length,O=0,W=Math.min(E,C);O<W;++O)if(c[O]!==u[O]){E=c[O],C=u[O];break}return E<C?-1:C<E?1:0},s.isEncoding=function(c){switch(String(c).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(c,u){if(!Array.isArray(c))throw new TypeError('"list" argument must be an Array of Buffers');if(c.length===0)return s.alloc(0);var E;if(u===void 0)for(u=0,E=0;E<c.length;++E)u+=c[E].length;var C=s.allocUnsafe(u),O=0;for(E=0;E<c.length;++E){var W=c[E];if($e(W,Uint8Array))O+W.length>C.length?s.from(W).copy(C,O):Uint8Array.prototype.set.call(C,W,O);else if(s.isBuffer(W))W.copy(C,O);else throw new TypeError('"list" argument must be an Array of Buffers');O+=W.length}return C};function X(h,c){if(s.isBuffer(h))return h.length;if(ArrayBuffer.isView(h)||$e(h,ArrayBuffer))return h.byteLength;if(typeof h!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(h));var u=h.length,E=arguments.length>2&&arguments[2]===!0;if(!E&&u===0)return 0;for(var C=!1;;)switch(c){case"ascii":case"latin1":case"binary":return u;case"utf8":case"utf-8":return bt(h).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u*2;case"hex":return u>>>1;case"base64":return He(h).length;default:if(C)return E?-1:bt(h).length;c=(""+c).toLowerCase(),C=!0}}s.byteLength=X;function B(h,c,u){var E=!1;if((c===void 0||c<0)&&(c=0),c>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,c>>>=0,u<=c))return"";for(h||(h="utf8");;)switch(h){case"hex":return V(this,c,u);case"utf8":case"utf-8":return Ge(this,c,u);case"ascii":return A(this,c,u);case"latin1":case"binary":return R(this,c,u);case"base64":return Re(this,c,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,c,u);default:if(E)throw new TypeError("Unknown encoding: "+h);h=(h+"").toLowerCase(),E=!0}}s.prototype._isBuffer=!0;function Q(h,c,u){var E=h[c];h[c]=h[u],h[u]=E}s.prototype.swap16=function(){var c=this.length;if(c%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var u=0;u<c;u+=2)Q(this,u,u+1);return this},s.prototype.swap32=function(){var c=this.length;if(c%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var u=0;u<c;u+=4)Q(this,u,u+3),Q(this,u+1,u+2);return this},s.prototype.swap64=function(){var c=this.length;if(c%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var u=0;u<c;u+=8)Q(this,u,u+7),Q(this,u+1,u+6),Q(this,u+2,u+5),Q(this,u+3,u+4);return this},s.prototype.toString=function(){var c=this.length;return c===0?"":arguments.length===0?Ge(this,0,c):B.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(c){if(!s.isBuffer(c))throw new TypeError("Argument must be a Buffer");return this===c?!0:s.compare(this,c)===0},s.prototype.inspect=function(){var c="",u=e.INSPECT_MAX_BYTES;return c=this.toString("hex",0,u).replace(/(.{2})/g,"$1 ").trim(),this.length>u&&(c+=" ... "),"<Buffer "+c+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(c,u,E,C,O){if($e(c,Uint8Array)&&(c=s.from(c,c.offset,c.byteLength)),!s.isBuffer(c))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(c));if(u===void 0&&(u=0),E===void 0&&(E=c?c.length:0),C===void 0&&(C=0),O===void 0&&(O=this.length),u<0||E>c.length||C<0||O>this.length)throw new RangeError("out of range index");if(C>=O&&u>=E)return 0;if(C>=O)return-1;if(u>=E)return 1;if(u>>>=0,E>>>=0,C>>>=0,O>>>=0,this===c)return 0;for(var W=O-C,ue=E-u,_e=Math.min(W,ue),ge=this.slice(C,O),Me=c.slice(u,E),Ue=0;Ue<_e;++Ue)if(ge[Ue]!==Me[Ue]){W=ge[Ue],ue=Me[Ue];break}return W<ue?-1:ue<W?1:0};function ve(h,c,u,E,C){if(h.length===0)return-1;if(typeof u=="string"?(E=u,u=0):u>2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,De(u)&&(u=C?0:h.length-1),u<0&&(u=h.length+u),u>=h.length){if(C)return-1;u=h.length-1}else if(u<0)if(C)u=0;else return-1;if(typeof c=="string"&&(c=s.from(c,E)),s.isBuffer(c))return c.length===0?-1:K(h,c,u,E,C);if(typeof c=="number")return c=c&255,typeof Uint8Array.prototype.indexOf=="function"?C?Uint8Array.prototype.indexOf.call(h,c,u):Uint8Array.prototype.lastIndexOf.call(h,c,u):K(h,[c],u,E,C);throw new TypeError("val must be string, number or Buffer")}function K(h,c,u,E,C){var O=1,W=h.length,ue=c.length;if(E!==void 0&&(E=String(E).toLowerCase(),E==="ucs2"||E==="ucs-2"||E==="utf16le"||E==="utf-16le")){if(h.length<2||c.length<2)return-1;O=2,W/=2,ue/=2,u/=2}function _e(mr,Jr){return O===1?mr[Jr]:mr.readUInt16BE(Jr*O)}var ge;if(C){var Me=-1;for(ge=u;ge<W;ge++)if(_e(h,ge)===_e(c,Me===-1?0:ge-Me)){if(Me===-1&&(Me=ge),ge-Me+1===ue)return Me*O}else Me!==-1&&(ge-=ge-Me),Me=-1}else for(u+ue>W&&(u=W-ue),ge=u;ge>=0;ge--){for(var Ue=!0,nt=0;nt<ue;nt++)if(_e(h,ge+nt)!==_e(c,nt)){Ue=!1;break}if(Ue)return ge}return-1}s.prototype.includes=function(c,u,E){return this.indexOf(c,u,E)!==-1},s.prototype.indexOf=function(c,u,E){return ve(this,c,u,E,!0)},s.prototype.lastIndexOf=function(c,u,E){return ve(this,c,u,E,!1)};function ce(h,c,u,E){u=Number(u)||0;var C=h.length-u;E?(E=Number(E),E>C&&(E=C)):E=C;var O=c.length;E>O/2&&(E=O/2);for(var W=0;W<E;++W){var ue=parseInt(c.substr(W*2,2),16);if(De(ue))return W;h[u+W]=ue}return W}function se(h,c,u,E){return Ae(bt(c,h.length-u),h,u,E)}function fe(h,c,u,E){return Ae(st(c),h,u,E)}function Le(h,c,u,E){return Ae(He(c),h,u,E)}function Te(h,c,u,E){return Ae(we(c,h.length-u),h,u,E)}s.prototype.write=function(c,u,E,C){if(u===void 0)C="utf8",E=this.length,u=0;else if(E===void 0&&typeof u=="string")C=u,E=this.length,u=0;else if(isFinite(u))u=u>>>0,isFinite(E)?(E=E>>>0,C===void 0&&(C="utf8")):(C=E,E=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var O=this.length-u;if((E===void 0||E>O)&&(E=O),c.length>0&&(E<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");C||(C="utf8");for(var W=!1;;)switch(C){case"hex":return ce(this,c,u,E);case"utf8":case"utf-8":return se(this,c,u,E);case"ascii":case"latin1":case"binary":return fe(this,c,u,E);case"base64":return Le(this,c,u,E);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Te(this,c,u,E);default:if(W)throw new TypeError("Unknown encoding: "+C);C=(""+C).toLowerCase(),W=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Re(h,c,u){return c===0&&u===h.length?lf.fromByteArray(h):lf.fromByteArray(h.slice(c,u))}function Ge(h,c,u){u=Math.min(h.length,u);for(var E=[],C=c;C<u;){var O=h[C],W=null,ue=O>239?4:O>223?3:O>191?2:1;if(C+ue<=u){var _e,ge,Me,Ue;switch(ue){case 1:O<128&&(W=O);break;case 2:_e=h[C+1],(_e&192)===128&&(Ue=(O&31)<<6|_e&63,Ue>127&&(W=Ue));break;case 3:_e=h[C+1],ge=h[C+2],(_e&192)===128&&(ge&192)===128&&(Ue=(O&15)<<12|(_e&63)<<6|ge&63,Ue>2047&&(Ue<55296||Ue>57343)&&(W=Ue));break;case 4:_e=h[C+1],ge=h[C+2],Me=h[C+3],(_e&192)===128&&(ge&192)===128&&(Me&192)===128&&(Ue=(O&15)<<18|(_e&63)<<12|(ge&63)<<6|Me&63,Ue>65535&&Ue<1114112&&(W=Ue))}}W===null?(W=65533,ue=1):W>65535&&(W-=65536,E.push(W>>>10&1023|55296),W=56320|W&1023),E.push(W),C+=ue}return kt(E)}var Qe=4096;function kt(h){var c=h.length;if(c<=Qe)return String.fromCharCode.apply(String,h);for(var u="",E=0;E<c;)u+=String.fromCharCode.apply(String,h.slice(E,E+=Qe));return u}function A(h,c,u){var E="";u=Math.min(h.length,u);for(var C=c;C<u;++C)E+=String.fromCharCode(h[C]&127);return E}function R(h,c,u){var E="";u=Math.min(h.length,u);for(var C=c;C<u;++C)E+=String.fromCharCode(h[C]);return E}function V(h,c,u){var E=h.length;(!c||c<0)&&(c=0),(!u||u<0||u>E)&&(u=E);for(var C="",O=c;O<u;++O)C+=Vt[h[O]];return C}function k(h,c,u){for(var E=h.slice(c,u),C="",O=0;O<E.length-1;O+=2)C+=String.fromCharCode(E[O]+E[O+1]*256);return C}s.prototype.slice=function(c,u){var E=this.length;c=~~c,u=u===void 0?E:~~u,c<0?(c+=E,c<0&&(c=0)):c>E&&(c=E),u<0?(u+=E,u<0&&(u=0)):u>E&&(u=E),u<c&&(u=c);var C=this.subarray(c,u);return Object.setPrototypeOf(C,s.prototype),C};function H(h,c,u){if(h%1!==0||h<0)throw new RangeError("offset is not uint");if(h+c>u)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(c,u,E){c=c>>>0,u=u>>>0,E||H(c,u,this.length);for(var C=this[c],O=1,W=0;++W<u&&(O*=256);)C+=this[c+W]*O;return C},s.prototype.readUintBE=s.prototype.readUIntBE=function(c,u,E){c=c>>>0,u=u>>>0,E||H(c,u,this.length);for(var C=this[c+--u],O=1;u>0&&(O*=256);)C+=this[c+--u]*O;return C},s.prototype.readUint8=s.prototype.readUInt8=function(c,u){return c=c>>>0,u||H(c,1,this.length),this[c]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(c,u){return c=c>>>0,u||H(c,2,this.length),this[c]|this[c+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(c,u){return c=c>>>0,u||H(c,2,this.length),this[c]<<8|this[c+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(c,u){return c=c>>>0,u||H(c,4,this.length),(this[c]|this[c+1]<<8|this[c+2]<<16)+this[c+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(c,u){return c=c>>>0,u||H(c,4,this.length),this[c]*16777216+(this[c+1]<<16|this[c+2]<<8|this[c+3])},s.prototype.readIntLE=function(c,u,E){c=c>>>0,u=u>>>0,E||H(c,u,this.length);for(var C=this[c],O=1,W=0;++W<u&&(O*=256);)C+=this[c+W]*O;return O*=128,C>=O&&(C-=Math.pow(2,8*u)),C},s.prototype.readIntBE=function(c,u,E){c=c>>>0,u=u>>>0,E||H(c,u,this.length);for(var C=u,O=1,W=this[c+--C];C>0&&(O*=256);)W+=this[c+--C]*O;return O*=128,W>=O&&(W-=Math.pow(2,8*u)),W},s.prototype.readInt8=function(c,u){return c=c>>>0,u||H(c,1,this.length),this[c]&128?(255-this[c]+1)*-1:this[c]},s.prototype.readInt16LE=function(c,u){c=c>>>0,u||H(c,2,this.length);var E=this[c]|this[c+1]<<8;return E&32768?E|4294901760:E},s.prototype.readInt16BE=function(c,u){c=c>>>0,u||H(c,2,this.length);var E=this[c+1]|this[c]<<8;return E&32768?E|4294901760:E},s.prototype.readInt32LE=function(c,u){return c=c>>>0,u||H(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},s.prototype.readInt32BE=function(c,u){return c=c>>>0,u||H(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},s.prototype.readFloatLE=function(c,u){return c=c>>>0,u||H(c,4,this.length),oi.read(this,c,!0,23,4)},s.prototype.readFloatBE=function(c,u){return c=c>>>0,u||H(c,4,this.length),oi.read(this,c,!1,23,4)},s.prototype.readDoubleLE=function(c,u){return c=c>>>0,u||H(c,8,this.length),oi.read(this,c,!0,52,8)},s.prototype.readDoubleBE=function(c,u){return c=c>>>0,u||H(c,8,this.length),oi.read(this,c,!1,52,8)};function ne(h,c,u,E,C,O){if(!s.isBuffer(h))throw new TypeError('"buffer" argument must be a Buffer instance');if(c>C||c<O)throw new RangeError('"value" argument is out of bounds');if(u+E>h.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(c,u,E,C){if(c=+c,u=u>>>0,E=E>>>0,!C){var O=Math.pow(2,8*E)-1;ne(this,c,u,E,O,0)}var W=1,ue=0;for(this[u]=c&255;++ue<E&&(W*=256);)this[u+ue]=c/W&255;return u+E},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(c,u,E,C){if(c=+c,u=u>>>0,E=E>>>0,!C){var O=Math.pow(2,8*E)-1;ne(this,c,u,E,O,0)}var W=E-1,ue=1;for(this[u+W]=c&255;--W>=0&&(ue*=256);)this[u+W]=c/ue&255;return u+E},s.prototype.writeUint8=s.prototype.writeUInt8=function(c,u,E){return c=+c,u=u>>>0,E||ne(this,c,u,1,255,0),this[u]=c&255,u+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(c,u,E){return c=+c,u=u>>>0,E||ne(this,c,u,2,65535,0),this[u]=c&255,this[u+1]=c>>>8,u+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(c,u,E){return c=+c,u=u>>>0,E||ne(this,c,u,2,65535,0),this[u]=c>>>8,this[u+1]=c&255,u+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(c,u,E){return c=+c,u=u>>>0,E||ne(this,c,u,4,4294967295,0),this[u+3]=c>>>24,this[u+2]=c>>>16,this[u+1]=c>>>8,this[u]=c&255,u+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(c,u,E){return c=+c,u=u>>>0,E||ne(this,c,u,4,4294967295,0),this[u]=c>>>24,this[u+1]=c>>>16,this[u+2]=c>>>8,this[u+3]=c&255,u+4},s.prototype.writeIntLE=function(c,u,E,C){if(c=+c,u=u>>>0,!C){var O=Math.pow(2,8*E-1);ne(this,c,u,E,O-1,-O)}var W=0,ue=1,_e=0;for(this[u]=c&255;++W<E&&(ue*=256);)c<0&&_e===0&&this[u+W-1]!==0&&(_e=1),this[u+W]=(c/ue>>0)-_e&255;return u+E},s.prototype.writeIntBE=function(c,u,E,C){if(c=+c,u=u>>>0,!C){var O=Math.pow(2,8*E-1);ne(this,c,u,E,O-1,-O)}var W=E-1,ue=1,_e=0;for(this[u+W]=c&255;--W>=0&&(ue*=256);)c<0&&_e===0&&this[u+W+1]!==0&&(_e=1),this[u+W]=(c/ue>>0)-_e&255;return u+E},s.prototype.writeInt8=function(c,u,E){return c=+c,u=u>>>0,E||ne(this,c,u,1,127,-128),c<0&&(c=255+c+1),this[u]=c&255,u+1},s.prototype.writeInt16LE=function(c,u,E){return c=+c,u=u>>>0,E||ne(this,c,u,2,32767,-32768),this[u]=c&255,this[u+1]=c>>>8,u+2},s.prototype.writeInt16BE=function(c,u,E){return c=+c,u=u>>>0,E||ne(this,c,u,2,32767,-32768),this[u]=c>>>8,this[u+1]=c&255,u+2},s.prototype.writeInt32LE=function(c,u,E){return c=+c,u=u>>>0,E||ne(this,c,u,4,2147483647,-2147483648),this[u]=c&255,this[u+1]=c>>>8,this[u+2]=c>>>16,this[u+3]=c>>>24,u+4},s.prototype.writeInt32BE=function(c,u,E){return c=+c,u=u>>>0,E||ne(this,c,u,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[u]=c>>>24,this[u+1]=c>>>16,this[u+2]=c>>>8,this[u+3]=c&255,u+4};function he(h,c,u,E,C,O){if(u+E>h.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function Ye(h,c,u,E,C){return c=+c,u=u>>>0,C||he(h,c,u,4),oi.write(h,c,u,E,23,4),u+4}s.prototype.writeFloatLE=function(c,u,E){return Ye(this,c,u,!0,E)},s.prototype.writeFloatBE=function(c,u,E){return Ye(this,c,u,!1,E)};function tt(h,c,u,E,C){return c=+c,u=u>>>0,C||he(h,c,u,8),oi.write(h,c,u,E,52,8),u+8}s.prototype.writeDoubleLE=function(c,u,E){return tt(this,c,u,!0,E)},s.prototype.writeDoubleBE=function(c,u,E){return tt(this,c,u,!1,E)},s.prototype.copy=function(c,u,E,C){if(!s.isBuffer(c))throw new TypeError("argument should be a Buffer");if(E||(E=0),!C&&C!==0&&(C=this.length),u>=c.length&&(u=c.length),u||(u=0),C>0&&C<E&&(C=E),C===E||c.length===0||this.length===0)return 0;if(u<0)throw new RangeError("targetStart out of bounds");if(E<0||E>=this.length)throw new RangeError("Index out of range");if(C<0)throw new RangeError("sourceEnd out of bounds");C>this.length&&(C=this.length),c.length-u<C-E&&(C=c.length-u+E);var O=C-E;return this===c&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(u,E,C):Uint8Array.prototype.set.call(c,this.subarray(E,C),u),O},s.prototype.fill=function(c,u,E,C){if(typeof c=="string"){if(typeof u=="string"?(C=u,u=0,E=this.length):typeof E=="string"&&(C=E,E=this.length),C!==void 0&&typeof C!="string")throw new TypeError("encoding must be a string");if(typeof C=="string"&&!s.isEncoding(C))throw new TypeError("Unknown encoding: "+C);if(c.length===1){var O=c.charCodeAt(0);(C==="utf8"&&O<128||C==="latin1")&&(c=O)}}else typeof c=="number"?c=c&255:typeof c=="boolean"&&(c=Number(c));if(u<0||this.length<u||this.length<E)throw new RangeError("Out of range index");if(E<=u)return this;u=u>>>0,E=E===void 0?this.length:E>>>0,c||(c=0);var W;if(typeof c=="number")for(W=u;W<E;++W)this[W]=c;else{var ue=s.isBuffer(c)?c:s.from(c,C),_e=ue.length;if(_e===0)throw new TypeError('The value "'+c+'" is invalid for argument "value"');for(W=0;W<E-u;++W)this[W+u]=ue[W%_e]}return this};var rt=/[^+/0-9A-Za-z-_]/g;function _t(h){if(h=h.split("=")[0],h=h.trim().replace(rt,""),h.length<2)return"";for(;h.length%4!==0;)h=h+"=";return h}function bt(h,c){c=c||1/0;for(var u,E=h.length,C=null,O=[],W=0;W<E;++W){if(u=h.charCodeAt(W),u>55295&&u<57344){if(!C){if(u>56319){(c-=3)>-1&&O.push(239,191,189);continue}else if(W+1===E){(c-=3)>-1&&O.push(239,191,189);continue}C=u;continue}if(u<56320){(c-=3)>-1&&O.push(239,191,189),C=u;continue}u=(C-55296<<10|u-56320)+65536}else C&&(c-=3)>-1&&O.push(239,191,189);if(C=null,u<128){if((c-=1)<0)break;O.push(u)}else if(u<2048){if((c-=2)<0)break;O.push(u>>6|192,u&63|128)}else if(u<65536){if((c-=3)<0)break;O.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((c-=4)<0)break;O.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return O}function st(h){for(var c=[],u=0;u<h.length;++u)c.push(h.charCodeAt(u)&255);return c}function we(h,c){for(var u,E,C,O=[],W=0;W<h.length&&!((c-=2)<0);++W)u=h.charCodeAt(W),E=u>>8,C=u%256,O.push(C),O.push(E);return O}function He(h){return lf.toByteArray(_t(h))}function Ae(h,c,u,E){for(var C=0;C<E&&!(C+u>=c.length||C>=h.length);++C)c[C+u]=h[C];return C}function $e(h,c){return h instanceof c||h!=null&&h.constructor!=null&&h.constructor.name!=null&&h.constructor.name===c.name}function De(h){return h!==h}var Vt=(function(){for(var h="0123456789abcdef",c=new Array(256),u=0;u<16;++u)for(var E=u*16,C=0;C<16;++C)c[E+C]=h[u]+h[C];return c})()}),xe=Ac.Buffer;Ac.SlowBuffer;Ac.INSPECT_MAX_BYTES;Ac.kMaxLength;var df=function(e,r){return df=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},df(e,r)};function Dc(t,e){df(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var io=(function(t){Dc(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),Xe=(function(t){Dc(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 Cc(t){return t&&t.Math==Math&&t}function Fg(){return Cc(typeof globalThis=="object"&&globalThis)||Cc(typeof window=="object"&&window)||Cc(typeof self=="object"&&self)||Cc(typeof global=="object"&&global)||Function("return this")()}function pS(){var t=Fg();return typeof t.navigator=="object"&&t.navigator.product==="ReactNative"}var fS=function(e){var r=pS()?"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(r);for(var n=xe.alloc(e),o=0;o<e;++o)n[o]=Math.floor(Math.random()*256);return n},mS=function(){{if(typeof window<"u"){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(xe.alloc(e))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(e){return global.crypto.getRandomValues(xe.alloc(e))}:fS}},Hg=mS();function dS(t){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(t))}function gf(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function hS(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function gS(t){return fs(t)&&Object.prototype.toString.call(t)==="[object Date]"}function fs(t){return typeof t=="object"&&t!==null}function Oc(t,e){var r=!1;function n(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return r||(console.warn(e),r=!0),t.apply(this,o)}return n}function Rc(t){if(ArrayBuffer.isView(t))return xe.from(t.buffer,t.byteOffset,t.byteLength);if(dS(t))return xe.from(t);throw new Xe("Must use either Buffer or TypedArray")}var yS=/^(?:[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,$g=function(t){return typeof t=="string"&&yS.test(t)},hf=function(t){if(!$g(t))throw new Xe('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 xe.from(e,"hex")},Sg=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")};var jk=Math.pow(2,63)-1,Gk=-Math.pow(2,63),ES=Math.pow(2,53),vS=-Math.pow(2,53);var Vg=4;var so=(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 Xe("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=xe.alloc(t.BUFFER_SIZE),this.position=0):(typeof e=="string"?this.buffer=xe.from(e,"binary"):Array.isArray(e)?this.buffer=xe.from(e):this.buffer=Rc(e),this.position=this.buffer.byteLength)}return t.prototype.put=function(e){if(typeof e=="string"&&e.length!==1)throw new Xe("only accepts single character String");if(typeof e!="number"&&e.length!==1)throw new Xe("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 Xe("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=xe.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=xe.alloc(this.buffer.length+e.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n}ArrayBuffer.isView(e)?(this.buffer.set(Rc(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 Tg(this.buffer.slice(0,this.position));throw new io('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,o;if("$binary"in e?r.legacy&&typeof e.$binary=="string"&&"$type"in e?(o=e.$type?parseInt(e.$type,16):0,n=xe.from(e.$binary,"base64")):typeof e.$binary!="string"&&(o=e.$binary.subType?parseInt(e.$binary.subType,16):0,n=xe.from(e.$binary.base64,"base64")):"$uuid"in e&&(o=4,n=hf(e.$uuid)),!n)throw new Xe("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return o===Vg?new Tg(n):new t(n,o)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},t.BSON_BINARY_SUBTYPE_DEFAULT=0,t.BUFFER_SIZE=256,t.SUBTYPE_DEFAULT=0,t.SUBTYPE_FUNCTION=1,t.SUBTYPE_BYTE_ARRAY=2,t.SUBTYPE_UUID_OLD=3,t.SUBTYPE_UUID=4,t.SUBTYPE_MD5=5,t.SUBTYPE_ENCRYPTED=6,t.SUBTYPE_COLUMN=7,t.SUBTYPE_USER_DEFINED=128,t})();Object.defineProperty(so.prototype,"_bsontype",{value:"Binary"});var uf=16,Tg=(function(t){Dc(e,t);function e(r){var n=this,o,i;if(r==null)o=e.generate();else if(r instanceof e)o=xe.from(r.buffer),i=r.__id;else if(ArrayBuffer.isView(r)&&r.byteLength===uf)o=Rc(r);else if(typeof r=="string")o=hf(r);else throw new Xe("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,o,Vg)||this,n.__id=i,n}return Object.defineProperty(e.prototype,"id",{get:function(){return this.buffer},set:function(r){this.buffer=r,e.cacheHexString&&(this.__id=Sg(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=Sg(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 so(this.id,so.SUBTYPE_UUID)},e.generate=function(){var r=Hg(uf);return r[6]=r[6]&15|64,r[8]=r[8]&63|128,xe.from(r)},e.isValid=function(r){return r?r instanceof e?!0:typeof r=="string"?$g(r):gf(r)?r.length!==uf?!1:(r[6]&240)===64&&(r[8]&128)===128:!1:!1},e.createFromHexString=function(r){var n=hf(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})(so),Nc=(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(Nc.prototype,"_bsontype",{value:"Code"});function _S(t){return fs(t)&&t.$id!=null&&typeof t.$ref=="string"&&(t.$db==null||typeof t.$db=="string")}var us=(function(){function t(e,r,n,o){if(!(this instanceof t))return new t(e,r,n,o);var i=e.split(".");i.length===2&&(n=i.shift(),e=i.shift()),this.collection=e,this.oid=r,this.db=n,this.fields=o||{}}return Object.defineProperty(t.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(e.$db=this.db),e},t.prototype.toExtendedJSON=function(e){e=e||{};var 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(us.prototype,"_bsontype",{value:"DBRef"});var sr=void 0;try{sr=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 Ig=65536,bS=1<<24,si=Ig*Ig,Wg=si*si,xg=Wg/2,Cg={},Rg={},oe=(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,o,i;return r?(e>>>=0,(i=0<=e&&e<256)&&(o=Rg[e],o)?o:(n=t.fromBits(e,(e|0)<0?-1:0,!0),i&&(Rg[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(o=Cg[e],o)?o:(n=t.fromBits(e,e<0?-1:0,!1),i&&(Cg[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>=Wg)return t.MAX_UNSIGNED_VALUE}else{if(e<=-xg)return t.MIN_VALUE;if(e+1>=xg)return t.MAX_VALUE}return e<0?t.fromNumber(-e,r).neg():t.fromBits(e%si|0,e/si|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 o;if((o=e.indexOf("-"))>0)throw Error("interior hyphen");if(o===0)return t.fromString(e.substring(1),r,n).neg();for(var i=t.fromNumber(Math.pow(n,8)),s=t.ZERO,a=0;a<e.length;a+=8){var l=Math.min(8,e.length-a),p=parseInt(e.substring(a,a+l),n);if(l<8){var d=t.fromNumber(Math.pow(n,l));s=s.mul(d).add(t.fromNumber(p))}else s=s.mul(i),s=s.add(t.fromNumber(p))}return s.unsigned=r,s},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 fs(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,o=this.low>>>16,i=this.low&65535,s=e.high>>>16,a=e.high&65535,l=e.low>>>16,p=e.low&65535,d=0,f=0,v=0,y=0;return y+=i+p,v+=y>>>16,y&=65535,v+=o+l,f+=v>>>16,v&=65535,f+=n+a,d+=f>>>16,f&=65535,d+=r+s,d&=65535,t.fromBits(v<<16|y,d<<16|f,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(sr){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var r=(this.unsigned?sr.div_u:sr.div_s)(this.low,this.high,e.low,e.high);return t.fromBits(r,sr.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?t.UZERO:t.ZERO;var n,o,i;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return t.UZERO;if(e.gt(this.shru(1)))return t.UONE;i=t.UZERO}else{if(this.eq(t.MIN_VALUE)){if(e.eq(t.ONE)||e.eq(t.NEG_ONE))return t.MIN_VALUE;if(e.eq(t.MIN_VALUE))return t.ONE;var s=this.shr(1);return n=s.div(e).shl(1),n.eq(t.ZERO)?e.isNegative()?t.ONE:t.NEG_ONE:(o=this.sub(e.mul(n)),i=n.add(o.div(e)),i)}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();i=t.ZERO}for(o=this;o.gte(e);){n=Math.max(1,Math.floor(o.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(n)/Math.LN2),l=a<=48?1:Math.pow(2,a-48),p=t.fromNumber(n),d=p.mul(e);d.isNegative()||d.gt(o);)n-=l,p=t.fromNumber(n,this.unsigned),d=p.mul(e);p.isZero()&&(p=t.ONE),i=i.add(p),o=o.sub(d)}return i},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)),sr){var r=(this.unsigned?sr.rem_u:sr.rem_s)(this.low,this.high,e.low,e.high);return t.fromBits(r,sr.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)),sr){var r=sr.mul(this.low,this.high,e.low,e.high);return t.fromBits(r,sr.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,o=this.high&65535,i=this.low>>>16,s=this.low&65535,a=e.high>>>16,l=e.high&65535,p=e.low>>>16,d=e.low&65535,f=0,v=0,y=0,T=0;return T+=s*d,y+=T>>>16,T&=65535,y+=i*d,v+=y>>>16,y&=65535,y+=s*p,v+=y>>>16,y&=65535,v+=o*d,f+=v>>>16,v&=65535,v+=i*p,f+=v>>>16,v&=65535,v+=s*l,f+=v>>>16,v&=65535,f+=n*d+o*p+i*l+s*a,f&=65535,t.fromBits(y<<16|T,f<<16|v,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)*si+(this.low>>>0):this.high*si+(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),o=n.mul(r).sub(this);return n.toString(e)+o.toInt().toString(e)}else return"-"+this.neg().toString(e);for(var i=t.fromNumber(Math.pow(e,6),this.unsigned),s=this,a="";;){var l=s.div(i),p=s.sub(l.mul(i)).toInt()>>>0,d=p.toString(e);if(s=l,s.isZero())return d+a;for(;d.length<6;)d="0"+d;a=""+d+a}},t.prototype.toUnsigned=function(){return this.unsigned?this:t.fromBits(this.low,this.high,!0)},t.prototype.xor=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low^e.low,this.high^e.high,this.unsigned)},t.prototype.eqz=function(){return this.isZero()},t.prototype.le=function(e){return this.lessThanOrEqual(e)},t.prototype.toExtendedJSON=function(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}},t.fromExtendedJSON=function(e,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(bS),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(oe.prototype,"__isLong__",{value:!0});Object.defineProperty(oe.prototype,"_bsontype",{value:"Long"});var wS=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,SS=/^(\+|-)?(Infinity|inf)$/i,TS=/^(\+|-)?NaN$/i,ls=6111,pf=-6176,Ag=6176,IS=34,ff=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Dg=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Og=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),xS=/^([-+])?(\d+)?$/,CS=31,Ng=16383,RS=30,AS=31;function Pg(t){return!isNaN(parseInt(t,10))}function DS(t){var e=oe.fromNumber(1e9),r=oe.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 oe(t.parts[n],0)),t.parts[n]=r.div(e).low,r=r.modulo(e);return{quotient:t,rem:r}}function OS(t,e){if(!t&&!e)return{high:oe.fromNumber(0),low:oe.fromNumber(0)};var r=t.shiftRightUnsigned(32),n=new oe(t.getLowBits(),0),o=e.shiftRightUnsigned(32),i=new oe(e.getLowBits(),0),s=r.multiply(o),a=r.multiply(i),l=n.multiply(o),p=n.multiply(i);return s=s.add(a.shiftRightUnsigned(32)),a=new oe(a.getLowBits(),0).add(l).add(p.shiftRightUnsigned(32)),s=s.add(a.shiftRightUnsigned(32)),p=a.shiftLeft(32).add(new oe(p.getLowBits(),0)),{high:s,low:p}}function NS(t,e){var r=t.high>>>0,n=e.high>>>0;if(r<n)return!0;if(r===n){var o=t.low>>>0,i=e.low>>>0;if(o<i)return!0}return!1}function ii(t,e){throw new Xe('"'.concat(t,'" is not a valid Decimal128 string - ').concat(e))}var yf=(function(){function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="string")this.bytes=t.fromString(e).bytes;else if(gf(e)){if(e.byteLength!==16)throw new Xe("Decimal128 must take a Buffer of 16 bytes");this.bytes=e}else throw new Xe("Decimal128 must take a Buffer or string")}return t.fromString=function(e){var r=!1,n=!1,o=!1,i=0,s=0,a=0,l=0,p=0,d=[0],f=0,v=0,y=0,T=0,D=0,P=0,U=new oe(0,0),X=new oe(0,0),B=0,Q=0;if(e.length>=7e3)throw new Xe(""+e+" not a valid Decimal128 string");var ve=e.match(wS),K=e.match(SS),ce=e.match(TS);if(!ve&&!K&&!ce||e.length===0)throw new Xe(""+e+" not a valid Decimal128 string");if(ve){var se=ve[2],fe=ve[4],Le=ve[5],Te=ve[6];fe&&Te===void 0&&ii(e,"missing exponent power"),fe&&se===void 0&&ii(e,"missing exponent base"),fe===void 0&&(Le||Te)&&ii(e,"missing e before exponent")}if((e[Q]==="+"||e[Q]==="-")&&(r=e[Q++]==="-"),!Pg(e[Q])&&e[Q]!=="."){if(e[Q]==="i"||e[Q]==="I")return new t(xe.from(r?Dg:Og));if(e[Q]==="N")return new t(xe.from(ff))}for(;Pg(e[Q])||e[Q]===".";){if(e[Q]==="."){n&&ii(e,"contains multiple periods"),n=!0,Q=Q+1;continue}f<34&&(e[Q]!=="0"||o)&&(o||(p=s),o=!0,d[v++]=parseInt(e[Q],10),f=f+1),o&&(a=a+1),n&&(l=l+1),s=s+1,Q=Q+1}if(n&&!s)throw new Xe(""+e+" not a valid Decimal128 string");if(e[Q]==="e"||e[Q]==="E"){var Re=e.substr(++Q).match(xS);if(!Re||!Re[2])return new t(xe.from(ff));D=parseInt(Re[0],10),Q=Q+Re[0].length}if(e[Q])return new t(xe.from(ff));if(y=0,!f)y=0,T=0,d[0]=0,a=1,f=1,i=0;else if(T=f-1,i=a,i!==1)for(;d[p+i-1]===0;)i=i-1;for(D<=l&&l-D>16384?D=pf:D=D-l;D>ls;){if(T=T+1,T-y>IS){var Ge=d.join("");if(Ge.match(/^0+$/)){D=ls;break}ii(e,"overflow")}D=D-1}for(;D<pf||f<a;){if(T===0&&i<f){D=pf,i=0;break}if(f<a?a=a-1:T=T-1,D<ls)D=D+1;else{var Ge=d.join("");if(Ge.match(/^0+$/)){D=ls;break}ii(e,"overflow")}}if(T-y+1<i){var Qe=s;n&&(p=p+1,Qe=Qe+1),r&&(p=p+1,Qe=Qe+1);var kt=parseInt(e[p+T+1],10),A=0;if(kt>=5&&(A=1,kt===5)){for(A=d[T]%2===1?1:0,P=p+T+2;P<Qe;P++)if(parseInt(e[P],10)){A=1;break}}if(A){for(var R=T;R>=0;R--)if(++d[R]>9&&(d[R]=0,R===0))if(D<ls)D=D+1,d[R]=1;else return new t(xe.from(r?Dg:Og))}}if(U=oe.fromNumber(0),X=oe.fromNumber(0),i===0)U=oe.fromNumber(0),X=oe.fromNumber(0);else if(T-y<17){var R=y;for(X=oe.fromNumber(d[R++]),U=new oe(0,0);R<=T;R++)X=X.multiply(oe.fromNumber(10)),X=X.add(oe.fromNumber(d[R]))}else{var R=y;for(U=oe.fromNumber(d[R++]);R<=T-17;R++)U=U.multiply(oe.fromNumber(10)),U=U.add(oe.fromNumber(d[R]));for(X=oe.fromNumber(d[R++]);R<=T;R++)X=X.multiply(oe.fromNumber(10)),X=X.add(oe.fromNumber(d[R]))}var V=OS(U,oe.fromString("100000000000000000"));V.low=V.low.add(X),NS(V.low,X)&&(V.high=V.high.add(oe.fromNumber(1))),B=D+Ag;var k={low:oe.fromNumber(0),high:oe.fromNumber(0)};V.high.shiftRightUnsigned(49).and(oe.fromNumber(1)).equals(oe.fromNumber(1))?(k.high=k.high.or(oe.fromNumber(3).shiftLeft(61)),k.high=k.high.or(oe.fromNumber(B).and(oe.fromNumber(16383).shiftLeft(47))),k.high=k.high.or(V.high.and(oe.fromNumber(0x7fffffffffff)))):(k.high=k.high.or(oe.fromNumber(B&16383).shiftLeft(49)),k.high=k.high.or(V.high.and(oe.fromNumber(562949953421311)))),k.low=V.low,r&&(k.high=k.high.or(oe.fromString("9223372036854775808")));var H=xe.alloc(16);return Q=0,H[Q++]=k.low.low&255,H[Q++]=k.low.low>>8&255,H[Q++]=k.low.low>>16&255,H[Q++]=k.low.low>>24&255,H[Q++]=k.low.high&255,H[Q++]=k.low.high>>8&255,H[Q++]=k.low.high>>16&255,H[Q++]=k.low.high>>24&255,H[Q++]=k.high.low&255,H[Q++]=k.high.low>>8&255,H[Q++]=k.high.low>>16&255,H[Q++]=k.high.low>>24&255,H[Q++]=k.high.high&255,H[Q++]=k.high.high>>8&255,H[Q++]=k.high.high>>16&255,H[Q++]=k.high.high>>24&255,new t(H)},t.prototype.toString=function(){for(var e,r=0,n=new Array(36),o=0;o<n.length;o++)n[o]=0;var i=0,s=!1,a,l={parts:[0,0,0,0]},p,d,f=[];i=0;var v=this.bytes,y=v[i++]|v[i++]<<8|v[i++]<<16|v[i++]<<24,T=v[i++]|v[i++]<<8|v[i++]<<16|v[i++]<<24,D=v[i++]|v[i++]<<8|v[i++]<<16|v[i++]<<24,P=v[i++]|v[i++]<<8|v[i++]<<16|v[i++]<<24;i=0;var U={low:new oe(y,T),high:new oe(D,P)};U.high.lessThan(oe.ZERO)&&f.push("-");var X=P>>26&CS;if(X>>3===3){if(X===RS)return f.join("")+"Infinity";if(X===AS)return"NaN";e=P>>15&Ng,a=8+(P>>14&1)}else a=P>>14&7,e=P>>17&Ng;var B=e-Ag;if(l.parts[0]=(P&16383)+((a&15)<<14),l.parts[1]=D,l.parts[2]=T,l.parts[3]=y,l.parts[0]===0&&l.parts[1]===0&&l.parts[2]===0&&l.parts[3]===0)s=!0;else for(d=3;d>=0;d--){var Q=0,ve=DS(l);if(l=ve.quotient,Q=ve.rem.low,!!Q)for(p=8;p>=0;p--)n[d*9+p]=Q%10,Q=Math.floor(Q/10)}if(s)r=1,n[i]=0;else for(r=36;!n[i];)r=r-1,i=i+1;var K=r-1+B;if(K>=34||K<=-7||B>0){if(r>34)return f.push("".concat(0)),B>0?f.push("E+".concat(B)):B<0&&f.push("E".concat(B)),f.join("");f.push("".concat(n[i++])),r=r-1,r&&f.push(".");for(var o=0;o<r;o++)f.push("".concat(n[i++]));f.push("E"),K>0?f.push("+".concat(K)):f.push("".concat(K))}else if(B>=0)for(var o=0;o<r;o++)f.push("".concat(n[i++]));else{var ce=r+B;if(ce>0)for(var o=0;o<ce;o++)f.push("".concat(n[i++]));else f.push("0");for(f.push(".");ce++<0;)f.push("0");for(var o=0;o<r-Math.max(ce-1,0);o++)f.push("".concat(n[i++]))}return f.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(yf.prototype,"_bsontype",{value:"Decimal128"});var Pc=(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(Pc.prototype,"_bsontype",{value:"Double"});var Lc=(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(Lc.prototype,"_bsontype",{value:"Int32"});var Ef=(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(Ef.prototype,"_bsontype",{value:"MaxKey"});var vf=(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(vf.prototype,"_bsontype",{value:"MinKey"});var PS=new RegExp("^[0-9a-fA-F]{24}$"),oo=null,Hr=Symbol("id"),Et=(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 Xe("Argument passed in must have an id that is of type string or Buffer");"toHexString"in e&&typeof e.toHexString=="function"?r=xe.from(e.toHexString(),"hex"):r=e.id}else r=e;if(r==null||typeof r=="number")this[Hr]=t.generate(typeof r=="number"?r:void 0);else if(ArrayBuffer.isView(r)&&r.byteLength===12)this[Hr]=r instanceof xe?r:Rc(r);else if(typeof r=="string")if(r.length===12){var n=xe.from(r);if(n.byteLength===12)this[Hr]=n;else throw new Xe("Argument passed in must be a string of 12 bytes")}else if(r.length===24&&PS.test(r))this[Hr]=xe.from(r,"hex");else throw new Xe("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new Xe("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[Hr]},set:function(e){this[Hr]=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=xe.alloc(12);return n.writeUInt32BE(e,0),oo===null&&(oo=Hg(5)),n[4]=oo[0],n[5]=oo[1],n[6]=oo[2],n[7]=oo[3],n[8]=oo[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[Hr][11]===e[Hr][11]&&this[Hr].equals(e[Hr]);if(typeof e=="string"&&t.isValid(e)&&e.length===12&&gf(this.id))return e===xe.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 xe.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=xe.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 Xe("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new t(xe.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(Et.prototype,"generate",{value:Oc(function(t){return Et.generate(t)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(Et.prototype,"getInc",{value:Oc(function(){return Et.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Et.prototype,"get_inc",{value:Oc(function(){return Et.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Et,"get_inc",{value:Oc(function(){return Et.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Et.prototype,"_bsontype",{value:"ObjectID"});function LS(t){return t.split("").sort().join("")}var ps=(function(){function t(e,r){if(!(this instanceof t))return new t(e,r);if(this.pattern=e,this.options=LS(r??""),this.pattern.indexOf("\0")!==-1)throw new io("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new io("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 io("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 Xe("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(e)))},t})();Object.defineProperty(ps.prototype,"_bsontype",{value:"BSONRegExp"});var _f=(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(_f.prototype,"_bsontype",{value:"Symbol"});var MS=oe,jg=(function(t){Dc(e,t);function e(r,n){var o=this;return o instanceof e?(oe.isLong(r)?o=t.call(this,r.low,r.high,!0)||this:fs(r)&&typeof r.t<"u"&&typeof r.i<"u"?o=t.call(this,r.i,r.t,!0)||this:o=t.call(this,r,n,!0)||this,Object.defineProperty(o,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),o):new e(r,n)}return e.prototype.toJSON=function(){return{$timestamp:this.toString()}},e.fromInt=function(r){return new e(oe.fromInt(r,!0))},e.fromNumber=function(r){return new e(oe.fromNumber(r,!0))},e.fromBits=function(r,n){return new e(r,n)},e.fromString=function(r,n){return new e(oe.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=oe.MAX_UNSIGNED_VALUE,e})(MS);function BS(t){return fs(t)&&Reflect.has(t,"_bsontype")&&typeof t._bsontype=="string"}var Gg=2147483647,zg=-2147483648,Yg=9223372036854776e3,qg=-9223372036854776e3,kS={$oid:Et,$binary:so,$uuid:so,$symbol:_f,$numberInt:Lc,$numberDecimal:yf,$numberDouble:Pc,$numberLong:oe,$minKey:vf,$maxKey:Ef,$regex:ps,$regularExpression:ps,$timestamp:jg};function Kg(t,e){if(e===void 0&&(e={}),typeof t=="number"){if(e.relaxed||e.legacy)return t;if(Math.floor(t)===t){if(t>=zg&&t<=Gg)return new Lc(t);if(t>=qg&&t<=Yg)return oe.fromNumber(t)}return new Pc(t)}if(t==null||typeof t!="object")return t;if(t.$undefined)return null;for(var r=Object.keys(t).filter(function(f){return f.startsWith("$")&&t[f]!=null}),n=0;n<r.length;n++){var o=kS[r[n]];if(o)return o.fromExtendedJSON(t,e)}if(t.$date!=null){var i=t.$date,s=new Date;return e.legacy?typeof i=="number"?s.setTime(i):typeof i=="string"&&s.setTime(Date.parse(i)):typeof i=="string"?s.setTime(Date.parse(i)):oe.isLong(i)?s.setTime(i.toNumber()):typeof i=="number"&&e.relaxed&&s.setTime(i),s}if(t.$code!=null){var a=Object.assign({},t);return t.$scope&&(a.$scope=Kg(t.$scope)),Nc.fromExtendedJSON(t)}if(_S(t)||t.$dbPointer){var l=t.$ref?t:t.$dbPointer;if(l instanceof us)return l;var p=Object.keys(l).filter(function(f){return f.startsWith("$")}),d=!0;if(p.forEach(function(f){["$ref","$id","$db"].indexOf(f)===-1&&(d=!1)}),d)return us.fromExtendedJSON(l)}return t}function US(t,e){return t.map(function(r,n){e.seenObjects.push({propertyName:"index ".concat(n),obj:null});try{return Nn(r,e)}finally{e.seenObjects.pop()}})}function Lg(t){var e=t.toISOString();return t.getUTCMilliseconds()!==0?e:e.slice(0,-5)+"Z"}function Nn(t,e){if((typeof t=="object"||typeof t=="function")&&t!==null){var r=e.seenObjects.findIndex(function(U){return U.obj===t});if(r!==-1){var n=e.seenObjects.map(function(U){return U.propertyName}),o=n.slice(0,r).map(function(U){return"".concat(U," -> ")}).join(""),i=n[r],s=" -> "+n.slice(r+1,n.length-1).map(function(U){return"".concat(U," -> ")}).join(""),a=n[n.length-1],l=" ".repeat(o.length+i.length/2),p="-".repeat(s.length+(i.length+a.length)/2-1);throw new Xe(`Converting circular structure to EJSON:
|
|
31
|
+
Url: ${Na(t)}`),!0}return!1}function q_(t,e){return e?.length?Ra(t).some(r=>Oo(r,e)):!1}function K_(t,e){if(!e?.length)return!1;let r=t.transaction;return r?Oo(r,e):!1}function X_(t,e){if(!e?.length)return!1;let r=Na(t);return r?Oo(r,e):!1}function J_(t,e){if(!e?.length)return!0;let r=Na(t);return r?Oo(r,e):!0}function Q_(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 Na(t){try{let r=[...t.exception?.values??[]].reverse().find(n=>n.mechanism?.parent_id===void 0&&n.stacktrace?.frames?.length)?.stacktrace?.frames;return r?Q_(r):null}catch{return ie&&ee.error(`Cannot extract url for event ${Dr(t)}`),null}}function Z_(t){return t.exception?.values?.length?!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value):!1}function ap(t,e,r,n,o,i){if(!o.exception?.values||!i||!vr(i.originalException,Error))return;let s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;s&&(o.exception.values=sp(t,e,n,i.originalException,r,o.exception.values,s,0))}function sp(t,e,r,n,o,i,s,a){if(i.length>=r+1)return i;let l=[...i];if(vr(n[o],Error)){oh(s,a);let p=t(e,n[o]),d=l.length;ih(p,o,d,a),l=sp(t,e,r,n[o],o,[p,...l],p,d)}return Array.isArray(n.errors)&&n.errors.forEach((p,d)=>{if(vr(p,Error)){oh(s,a);let f=t(e,p),v=l.length;ih(f,`errors[${d}]`,v,a),l=sp(t,e,r,p,o,[f,...l],f,v)}}),l}function oh(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Z(_(_({},t.mechanism),t.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:e})}function ih(t,e,r,n){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Z(_({},t.mechanism),{type:"chained",source:e,exception_id:r,parent_id:n})}function cp(t){let e="console";Ot(e,t),Nt(e,eb)}function eb(){"console"in pe&&du.forEach(function(t){t in pe.console&<(pe.console,t,function(e){return Ro[t]=e,function(...r){ct("console",{args:r,level:t}),Ro[t]?.apply(pe.console,r)}})})}function lp(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}var tb="Dedupe",rb=()=>{let t;return{name:tb,processEvent(e){if(e.type)return e;try{if(nb(e,t))return ie&&ee.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},La=rb;function nb(t,e){return e?!!(ob(t,e)||ib(t,e)):!1}function ob(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 ib(t,e){let r=sh(e),n=sh(t);return!(!r||!n||r.type!==n.type||r.value!==n.value||!ch(t,e)||!ah(t,e))}function ah(t,e){let r=aa(t),n=aa(e);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let o=0;o<n.length;o++){let i=n[o],s=r[o];if(i.filename!==s.filename||i.lineno!==s.lineno||i.colno!==s.colno||i.function!==s.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 sh(t){return t.exception?.values?.[0]}function Ji(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let r=e[6]||"",n=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:r,hash:n,relative:e[5]+r+n}}function Ma(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}var Qi=pe;function up(){return"history"in Qi&&!!Qi.history}function sb(){if(!("fetch"in Qi))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Zi(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function pp(){if(typeof EdgeRuntime=="string")return!0;if(!sb())return!1;if(Zi(Qi.fetch))return!0;let t=!1,e=Qi.document;if(e&&typeof e.createElement=="function")try{let r=e.createElement("iframe");r.hidden=!0,e.head.appendChild(r),r.contentWindow?.fetch&&(t=Zi(r.contentWindow.fetch)),e.head.removeChild(r)}catch(r){ie&&ee.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return t}function mp(t,e){let r="fetch";Ot(r,t),Nt(r,()=>ab(void 0,e))}function ab(t,e=!1){e&&!pp()||lt(pe,"fetch",function(r){return function(...n){let o=new Error,{method:i,url:s}=cb(n),a={args:n,fetchData:{method:i,url:s},startTimestamp:Ut()*1e3,virtualError:o,headers:lb(n)};return t||ct("fetch",_({},a)),r.apply(pe,n).then(async l=>(t?t(l):ct("fetch",Z(_({},a),{endTimestamp:Ut()*1e3,response:l})),l),l=>{if(ct("fetch",Z(_({},a),{endTimestamp:Ut()*1e3,error:l})),zn(l)&&l.stack===void 0&&(l.stack=o.stack,Gt(l,"framesToPop",1)),l instanceof TypeError&&(l.message==="Failed to fetch"||l.message==="Load failed"||l.message==="NetworkError when attempting to fetch resource."))try{let p=new URL(a.fetchData.url);l.message=`${l.message} (${p.host})`}catch{}throw l})}})}function fp(t,e){return!!t&&typeof t=="object"&&!!t[e]}function lh(t){return typeof t=="string"?t:t?fp(t,"url")?t.url:t.toString?t.toString():"":""}function cb(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[r,n]=t;return{url:lh(r),method:fp(n,"method")?String(n.method).toUpperCase():"GET"}}let e=t[0];return{url:lh(e),method:fp(e,"method")?String(e.method).toUpperCase():"GET"}}function lb(t){let[e,r]=t;try{if(typeof r=="object"&&r!==null&&"headers"in r&&r.headers)return new Headers(r.headers);if(qm(e))return new Headers(e.headers)}catch{}}function dp(){return"npm"}var Ke=pe,hp=0;function gp(){return hp>0}function Sb(){hp++,setTimeout(()=>{hp--})}function Xn(t,e={}){function r(o){return typeof o=="function"}if(!r(t))return t;try{let o=t.__sentry_wrapped__;if(o)return typeof o=="function"?o:t;if(Kn(t))return t}catch{return t}let n=function(...o){try{let i=o.map(s=>Xn(s,e));return t.apply(this,i)}catch(i){throw Sb(),ji(s=>{s.addEventProcessor(a=>(e.mechanism&&(No(a,void 0,void 0),Or(a,e.mechanism)),a.extra=Z(_({},a.extra),{arguments:o}),a)),Ia(i)}),i}};try{for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o])}catch{}fa(n,t),Gt(t,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return t.name}})}catch{}return n}function uh(){let t=Wi(),{referrer:e}=Ke.document||{},{userAgent:r}=Ke.navigator||{},n=_(_({},e&&{Referer:e}),r&&{"User-Agent":r});return{url:t,headers:n}}function Ba(t,e){let r=vp(t,e),n={type:Rb(e),value:Ab(e)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function Tb(t,e,r,n){let i=We()?.getOptions().normalizeDepth,s=Nb(e),a={__serialized__:_a(e,i)};if(s)return{exception:{values:[Ba(t,s)]},extra:a};let l={exception:{values:[{type:qn(e)?e.constructor.name:n?"UnhandledRejection":"Error",value:Db(e,{isUnhandledRejection:n})}]},extra:a};if(r){let p=vp(t,r);p.length&&(l.exception.values[0].stacktrace={frames:p})}return l}function yp(t,e){return{exception:{values:[Ba(t,e)]}}}function vp(t,e){let r=e.stacktrace||e.stack||"",n=xb(e),o=Cb(e);try{return t(r,n,o)}catch{}return[]}var Ib=/Minified React error #\d+;/i;function xb(t){return t&&Ib.test(t.message)?1:0}function Cb(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function ph(t){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?t instanceof WebAssembly.Exception:!1}function Rb(t){let e=t?.name;return!e&&ph(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function Ab(t){let e=t?.message;return ph(t)?Array.isArray(t.message)&&t.message.length==2?t.message[1]:"wasm exception":e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function fh(t,e,r,n){let o=r?.syntheticException||void 0,i=ka(t,e,o,n);return Or(i),i.level="error",r?.event_id&&(i.event_id=r.event_id),or(i)}function mh(t,e,r="info",n,o){let i=n?.syntheticException||void 0,s=Ep(t,e,i,o);return s.level=r,n?.event_id&&(s.event_id=n.event_id),or(s)}function ka(t,e,r,n,o){let i;if(la(e)&&e.error)return yp(t,e.error);if(ua(e)||Su(e)){let s=e;if("stack"in e)i=yp(t,e);else{let a=s.name||(ua(s)?"DOMError":"DOMException"),l=s.message?`${a}: ${s.message}`:a;i=Ep(t,l,r,n),No(i,l)}return"code"in s&&(i.tags=Z(_({},i.tags),{"DOMException.code":`${s.code}`})),i}return zn(e)?yp(t,e):on(e)||qn(e)?(i=Tb(t,e,r,o),Or(i,{synthetic:!0}),i):(i=Ep(t,e,r,n),No(i,`${e}`,void 0),Or(i,{synthetic:!0}),i)}function Ep(t,e,r,n){let o={};if(n&&r){let i=vp(t,r);i.length&&(o.exception={values:[{value:e,stacktrace:{frames:i}}]}),Or(o,{synthetic:!0})}if(Do(e)){let{__sentry_template_string__:i,__sentry_template_values__:s}=e;return o.logentry={message:i,params:s},o}return o.message=e,o}function Db(t,{isUnhandledRejection:e}){let r=Au(t),n=e?"promise rejection":"exception";return la(t)?`Event \`ErrorEvent\` captured as ${n} with message \`${t.message}\``:qn(t)?`Event \`${Ob(t)}\` (type=${t.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function Ob(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function Nb(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let r=t[e];if(r instanceof Error)return r}}var Pb=5e3,es=class extends Ki{constructor(e){let r=Lb(e),n=Ke.SENTRY_SDK_SOURCE||dp();op(r,"browser",["browser"],n),super(r);let{sendDefaultPii:o,sendClientReports:i,enableLogs:s,_experiments:a}=this._options,l=s??a?.enableLogs;Ke.document&&(i||l)&&Ke.document.addEventListener("visibilitychange",()=>{Ke.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),l&&Xi(this))}),l&&(this.on("flush",()=>{Xi(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{Xi(this)},Pb)})),o&&(this.on("postprocessEvent",rp),this.on("beforeSendSession",np))}eventFromException(e,r){return fh(this._options.stackParser,e,r,this._options.attachStacktrace)}eventFromMessage(e,r="info",n){return mh(this._options.stackParser,e,r,n,this._options.attachStacktrace)}_prepareEvent(e,r,n,o){return e.platform=e.platform||"javascript",super._prepareEvent(e,r,n,o)}};function Lb(t){return _({release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:Ke.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0},t)}var dh=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var pt=pe;var Mb=1e3,hh,_p,bp;function wp(t){Ot("dom",t),Nt("dom",Bb)}function Bb(){if(!pt.document)return;let t=ct.bind(null,"dom"),e=gh(t,!0);pt.document.addEventListener("click",e,!1),pt.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(r=>{let o=pt[r]?.prototype;o?.hasOwnProperty?.("addEventListener")&&(lt(o,"addEventListener",function(i){return function(s,a,l){if(s==="click"||s=="keypress")try{let p=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=p[s]=p[s]||{refCount:0};if(!d.handler){let f=gh(t);d.handler=f,i.call(this,s,f,l)}d.refCount++}catch{}return i.call(this,s,a,l)}}),lt(o,"removeEventListener",function(i){return function(s,a,l){if(s==="click"||s=="keypress")try{let p=this.__sentry_instrumentation_handlers__||{},d=p[s];d&&(d.refCount--,d.refCount<=0&&(i.call(this,s,d.handler,l),d.handler=void 0,delete p[s]),Object.keys(p).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,a,l)}}))})}function kb(t){if(t.type!==_p)return!1;try{if(!t.target||t.target._sentryId!==bp)return!1}catch{}return!0}function Ub(t,e){return t!=="keypress"?!1:e?.tagName?!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable):!0}function gh(t,e=!1){return r=>{if(!r||r._sentryCaptured)return;let n=Fb(r);if(Ub(r.type,n))return;Gt(r,"_sentryCaptured",!0),n&&!n._sentryId&&Gt(n,"_sentryId",ut());let o=r.type==="keypress"?"input":r.type;kb(r)||(t({event:r,name:o,global:e}),_p=r.type,bp=n?n._sentryId:void 0),clearTimeout(hh),hh=pt.setTimeout(()=>{bp=void 0,_p=void 0},Mb)}}function Fb(t){try{return t.target}catch{return null}}var Ua;function ts(t){let e="history";Ot(e,t),Nt(e,Hb)}function Hb(){if(pt.addEventListener("popstate",()=>{let e=pt.location.href,r=Ua;if(Ua=e,r===e)return;ct("history",{from:r,to:e})}),!up())return;function t(e){return function(...r){let n=r.length>2?r[2]:void 0;if(n){let o=Ua,i=$b(String(n));if(Ua=i,o===i)return e.apply(this,r);ct("history",{from:o,to:i})}return e.apply(this,r)}}lt(pt.history,"pushState",t),lt(pt.history,"replaceState",t)}function $b(t){try{return new URL(t,pt.location.origin).toString()}catch{return t}}var Fa={};function Sp(t){let e=Fa[t];if(e)return e;let r=pt[t];if(Zi(r))return Fa[t]=r.bind(pt);let n=pt.document;if(n&&typeof n.createElement=="function")try{let o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);let i=o.contentWindow;i?.[t]&&(r=i[t]),n.head.removeChild(o)}catch(o){dh&&ee.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,o)}return r&&(Fa[t]=r.bind(pt))}function Ha(t){Fa[t]=void 0}var Jn="__sentry_xhr_v3__";function Tp(t){Ot("xhr",t),Nt("xhr",Vb)}function Vb(){if(!pt.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,r,n){let o=new Error,i=Ut()*1e3,s=Pt(n[0])?n[0].toUpperCase():void 0,a=Wb(n[1]);if(!s||!a)return e.apply(r,n);r[Jn]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(r.__sentry_own_request__=!0);let l=()=>{let p=r[Jn];if(p&&r.readyState===4){try{p.status_code=r.status}catch{}let d={endTimestamp:Ut()*1e3,startTimestamp:i,xhr:r,virtualError:o};ct("xhr",d)}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply(p,d,f){return l(),p.apply(d,f)}}):r.addEventListener("readystatechange",l),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(p,d,f){let[v,y]=f,T=d[Jn];return T&&Pt(v)&&Pt(y)&&(T.request_headers[v.toLowerCase()]=y),p.apply(d,f)}}),e.apply(r,n)}}),t.send=new Proxy(t.send,{apply(e,r,n){let o=r[Jn];if(!o)return e.apply(r,n);n[0]!==void 0&&(o.body=n[0]);let i={startTimestamp:Ut()*1e3,xhr:r};return ct("xhr",i),e.apply(r,n)}})}function Wb(t){if(Pt(t))return t;try{return t.toString()}catch{}}function Ip(t,e=Sp("fetch")){let r=0,n=0;function o(i){let s=i.body.length;r+=s,n++;let a=_({body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:r<=6e4&&n<15},t.fetchOptions);if(!e)return Ha("fetch"),In("No fetch implementation available");try{return e(t.url,a).then(l=>(r-=s,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 Ha("fetch"),r-=s,n--,In(l)}}return Da(t,o)}var jb=30;var Gb=50;function xp(t,e,r,n){let o={filename:t,function:e==="<anonymous>"?"?":e,in_app:!0};return r!==void 0&&(o.lineno=r),n!==void 0&&(o.colno=n),o}var zb=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Yb=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,qb=/\((\S*)(?::(\d+))(?::(\d+))\)/,Kb=t=>{let e=zb.exec(t);if(e){let[,n,o,i]=e;return xp(n,"?",+o,+i)}let r=Yb.exec(t);if(r){if(r[2]&&r[2].indexOf("eval")===0){let s=qb.exec(r[2]);s&&(r[2]=s[1],r[3]=s[2],r[4]=s[3])}let[o,i]=_h(r[1]||"?",r[2]);return xp(i,o,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},yh=[jb,Kb],Xb=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Jb=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Qb=t=>{let e=Xb.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let i=Jb.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let n=e[3],o=e[1]||"?";return[o,n]=_h(o,n),xp(n,o,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},Eh=[Gb,Qb];var vh=[yh,Eh],Cp=Eu(...vh),_h=(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]:"?",r?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var Bo=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var $a=1024,Zb="Breadcrumbs",ew=(t={})=>{let e=_({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:Zb,setup(r){e.console&&cp(nw(r)),e.dom&&wp(rw(r,e.dom)),e.xhr&&Tp(ow(r)),e.fetch&&mp(iw(r)),e.history&&ts(sw(r)),e.sentry&&r.on("beforeSendEvent",tw(r))}}},bh=ew;function tw(t){return function(r){We()===t&&Lr({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:Dr(r)},{event:r})}}function rw(t,e){return function(n){if(We()!==t)return;let o,i,s=typeof e=="object"?e.serializeAttribute:void 0,a=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;a&&a>$a&&(Bo&&ee.warn(`\`dom.maxStringLength\` cannot exceed ${$a}, but a value of ${a} was configured. Sentry will use ${$a} instead.`),a=$a),typeof s=="string"&&(s=[s]);try{let p=n.event,d=aw(p)?p.target:p;o=Vi(d,{keyAttrs:s,maxStringLength:a}),i=Ru(d)}catch{o="<unknown>"}if(o.length===0)return;let l={category:`ui.${n.name}`,message:o};i&&(l.data={"ui.component_name":i}),Lr(l,{event:n.event,name:n.name,global:n.global})}}function nw(t){return function(r){if(We()!==t)return;let n={category:"console",data:{arguments:r.args,logger:"console"},level:lp(r.level),message:pa(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)n.message=`Assertion failed: ${pa(r.args.slice(1)," ")||"console.assert"}`,n.data.arguments=r.args.slice(1);else return;Lr(n,{input:r.args,level:r.level})}}function ow(t){return function(r){if(We()!==t)return;let{startTimestamp:n,endTimestamp:o}=r,i=r.xhr[Jn];if(!n||!o||!i)return;let{method:s,url:a,status_code:l,body:p}=i,d={method:s,url:a,status_code:l},f={xhr:r.xhr,input:p,startTimestamp:n,endTimestamp:o},v={category:"xhr",data:d,type:"http",level:Ma(l)};t.emit("beforeOutgoingRequestBreadcrumb",v,f),Lr(v,f)}}function iw(t){return function(r){if(We()!==t)return;let{startTimestamp:n,endTimestamp:o}=r;if(o&&!(r.fetchData.url.match(/sentry_key/)&&r.fetchData.method==="POST"))if(r.fetchData.method,r.fetchData.url,r.error){let i=r.fetchData,s={data:r.error,input:r.args,startTimestamp:n,endTimestamp:o},a={category:"fetch",data:i,level:"error",type:"http"};t.emit("beforeOutgoingRequestBreadcrumb",a,s),Lr(a,s)}else{let i=r.response,s=Z(_({},r.fetchData),{status_code:i?.status});r.fetchData.request_body_size,r.fetchData.response_body_size,i?.status;let a={input:r.args,response:i,startTimestamp:n,endTimestamp:o},l={category:"fetch",data:s,type:"http",level:Ma(s.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",l,a),Lr(l,a)}}}function sw(t){return function(r){if(We()!==t)return;let n=r.from,o=r.to,i=Ji(Ke.location.href),s=n?Ji(n):void 0,a=Ji(o);s?.path||(s=i),i.protocol===a.protocol&&i.host===a.host&&(o=a.relative),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),Lr({category:"navigation",data:{from:n,to:o}})}}function aw(t){return!!t&&!!t.target}var cw=["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"],lw="BrowserApiErrors",uw=(t={})=>{let e=_({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1},t);return{name:lw,setupOnce(){e.setTimeout&<(Ke,"setTimeout",wh),e.setInterval&<(Ke,"setInterval",wh),e.requestAnimationFrame&<(Ke,"requestAnimationFrame",pw),e.XMLHttpRequest&&"XMLHttpRequest"in Ke&<(XMLHttpRequest.prototype,"send",fw);let r=e.eventTarget;r&&(Array.isArray(r)?r:cw).forEach(o=>mw(o,e))}}},Sh=uw;function wh(t){return function(...e){let r=e[0];return e[0]=Xn(r,{mechanism:{data:{function:rr(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function pw(t){return function(e){return t.apply(this,[Xn(e,{mechanism:{data:{function:"requestAnimationFrame",handler:rr(t)},handled:!1,type:"instrument"}})])}}function fw(t){return function(...e){let r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in r&&typeof r[o]=="function"&<(r,o,function(i){let s={mechanism:{data:{function:o,handler:rr(i)},handled:!1,type:"instrument"}},a=Kn(i);return a&&(s.mechanism.data.handler=rr(a)),Xn(i,s)})}),t.apply(this,e)}}function mw(t,e){let n=Ke[t]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(lt(n,"addEventListener",function(o){return function(i,s,a){try{dw(s)&&(s.handleEvent=Xn(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:rr(s),target:t},handled:!1,type:"instrument"}}))}catch{}return e.unregisterOriginalCallbacks&&hw(this,i,s),o.apply(this,[i,Xn(s,{mechanism:{data:{function:"addEventListener",handler:rr(s),target:t},handled:!1,type:"instrument"}}),a])}}),lt(n,"removeEventListener",function(o){return function(i,s,a){try{let l=s.__sentry_wrapped__;l&&o.call(this,i,l,a)}catch{}return o.call(this,i,s,a)}}))}function dw(t){return typeof t.handleEvent=="function"}function hw(t,e,r){t&&typeof t=="object"&&"removeEventListener"in t&&typeof t.removeEventListener=="function"&&t.removeEventListener(e,r)}var Th=()=>({name:"BrowserSession",setupOnce(){if(typeof Ke.document>"u"){Bo&&ee.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Yi({ignoreDuration:!0}),qi(),ts(({from:t,to:e})=>{t!==void 0&&t!==e&&(Yi({ignoreDuration:!0}),qi())})}});var gw="GlobalHandlers",yw=(t={})=>{let e=_({onerror:!0,onunhandledrejection:!0},t);return{name:gw,setupOnce(){Error.stackTraceLimit=50},setup(r){e.onerror&&(Ew(r),Ih("onerror")),e.onunhandledrejection&&(vw(r),Ih("onunhandledrejection"))}}},xh=yw;function Ew(t){_u(e=>{let{stackParser:r,attachStacktrace:n}=Ch();if(We()!==t||gp())return;let{msg:o,url:i,line:s,column:a,error:l}=e,p=ww(ka(r,l||o,void 0,n,!1),i,s,a);p.level="error",zi(p,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function vw(t){wu(e=>{let{stackParser:r,attachStacktrace:n}=Ch();if(We()!==t||gp())return;let o=_w(e),i=Yn(o)?bw(o):ka(r,o,void 0,n,!0);i.level="error",zi(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function _w(t){if(Yn(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 bw(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function ww(t,e,r,n){let o=t.exception=t.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},l=a.frames=a.frames||[],p=n,d=r,f=Pt(e)&&e.length>0?e:Wi();return l.length===0&&l.push({colno:p,filename:f,function:"?",in_app:!0,lineno:d}),t}function Ih(t){Bo&&ee.log(`Global Handler attached: ${t}`)}function Ch(){return We()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var Rh=()=>({name:"HttpContext",preprocessEvent(t){if(!Ke.navigator&&!Ke.location&&!Ke.document)return;let e=uh(),r=_(_({},e.headers),t.request?.headers);t.request=Z(_(_({},e),t.request),{headers:r})}});var Sw="cause",Tw=5,Iw="LinkedErrors",xw=(t={})=>{let e=t.limit||Tw,r=t.key||Sw;return{name:Iw,preprocessEvent(n,o,i){let s=i.getOptions();ap(Ba,s.stackParser,r,e,n,o)}}},Ah=xw;function Rp(t){return[Pa(),Oa(),Sh(),bh(),xh(),Ah(),La(),Rh(),Th()]}var Wa={},ja,Ap,Dh;(()=>{let t=Rp({}).filter(e=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(e.name));Ap=new es({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:Ip,stackParser:Cp,integrations:t,environment:Wt.mode,release:`web-sdk@${Cr}`,debug:Wt.debug}),Ap.init()})();function ae(t,e,r){b.error(`${e}:`,t);let n=Ph(r);if(n.setTag("operation",e),t instanceof Er){Cw(n,t,e);return}n.captureException(t)}function Oh(t,e,r){Ph(r).captureMessage(t,e??"error")}function Cw(t,e,r){if(Rw(t,e),e.response){let n=e.response,o=e.responseText;n.status&&t.setTag("http.status_code",n.status),n.statusText&&t.setTag("http.status_text",n.statusText),o&&typeof o=="object"&&"error"in o&&(t.setTag("http.error_code",o.error.code),t.setTag("http.error_message",o.error.message)),t.setExtras({responseText:e.responseText,statusText:n.statusText,responseType:n.type,redirected:n.redirected,responseUrl:n.url}),t.captureMessage(`${r} failed with ${n.status}`,"error");return}if(e.request){t.captureMessage(`No response was received for ${r}`,"error");return}}function Rw(t,e){let r=e.request;if(!r)return;t.setExtras({body:e.requestBody,headers:r.headers,method:r.method,url:r.url});let n=r.headers?.get("Cooee-Retry-Attempt");n!==null&&t.setTag("retry.attempt",n)}function Nh(t){Dh=t}function Ga(t,e){Wa[t]=_(_({},Wa[t]),e)}function ko(t){ja=_(_({},ja),t)}function Ph(t){t??={};let{extra:e,tags:r}=t,n=new wt;if(n.setClient(Ap),n.setUser(Dh),t.triggerContext&&!t.engagementTrigger&&(t.engagementTrigger=t.triggerContext.triggerData),t.engagementTrigger){let o=t.engagementTrigger;n.setTags({"engagement.id":o.engagementID,"engagement.short_id":o.shortID,"engagement.objective":o.objective,"engagement.delivery_type":o.onsiteDeliveryType,"engagement.content_id":o.contentID,"engagement.variation":o.variation,"engagement.currency":o.currency})}return e&&n.setExtras(e),r&&n.setTags(r),ja&&n.setTags(ja),Object.keys(Wa).forEach(o=>{n.setContext(o,Wa[o])}),n.setTag("language",navigator.language),n.setTag("timezone",Lh()),Aw(n),n}function Aw(t){window.Shopify&&(t.setTag("shopify.shop",window.Shopify.shop),t.setTag("shopify.currency",window.Shopify.currency?.active),t.setTag("shopify.locale",window.Shopify.locale),t.setTag("theme.schema_name",window.Shopify.theme?.schema_name),t.setTag("theme.schema_version",window.Shopify.theme?.schema_version))}var za=class{static format(e,r){let n=/{{\s*(\w+)\s*}}/;return r.replace(n,(o,i)=>{switch(i){case"amount":return this.formatWithDelimiters(e,2);case"amount_no_decimals":return this.formatWithDelimiters(e,0);case"amount_with_comma_separator":return this.formatWithDelimiters(e,2,".",",");case"amount_no_decimals_with_comma_separator":return this.formatWithDelimiters(e,0,".",",");case"amount_with_apostrophe_separator":return this.formatWithDelimiters(e,2,"'",".");case"amount_no_decimals_with_space_separator":return this.formatWithDelimiters(e,0," ");case"amount_with_space_separator":return this.formatWithDelimiters(e,2," ",",");case"amount_with_period_and_space_separator":return this.formatWithDelimiters(e,2," ",".");default:return o}})}static formatWithDelimiters(e,r=2,n=",",o="."){if(isNaN(e)||e==null)return"0";let s=(e/100).toFixed(r).split("."),a=s[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+n),l=s[1]?o+s[1]:"";return a+l}};function Uo(t){try{return new URL(t)}catch{return}}function Dp(t){return!t||t==="null"||t==="undefined"}function Mh(t,e){let r=t.indexOf(e);return r===-1?!1:(t.splice(r,1),!0)}function Lt(t,e,r){return{[t]:Op(e,r),[t+"_wo_currency"]:e}}function Op(t,e){if(t==0&&e)return"Free";let r=ye(),n=qe.get(),o=r.shopCurrencyCode||n.currency,i=r.currencyCode;i||b.warn("Currency code is not set in RuntimeData");let s=n.money?.format??r.moneyFormat,a;if(s&&o===i)a=za.format(t*100,s);else{let l;try{l=new Intl.NumberFormat(kh(),{style:"currency",currency:i||o,minimumFractionDigits:0,maximumFractionDigits:2})}catch(p){return ae(p,"format-currency",{extra:{currentCurrency:i,shopCurrency:o}}),""}a=l.format(t),a=a.replace("\u20B9","Rs. "),n.money?.showCurrency&&i!=="INR"&&(a=a.concat(` ${i}`))}return a}function Bh(t){let e=kh();try{return new Intl.NumberFormat(e,{notation:"compact"}).format(t)}catch(r){return ae(r,"format-number",{extra:{lang:e,value:t}}),t.toString()}}function kh(){let t="en";return typeof navigator<"u"&&(navigator.languages!==void 0&&navigator.languages.length>0?t=navigator.languages[0]:navigator.language&&(t=navigator.language)),t=t.split(";")[0],t=t.split("-")[0],t||"en"}var Ya;function Lh(){if(Ya)return Ya;try{return Ya=Intl.DateTimeFormat().resolvedOptions().timeZone,Ya}catch{return""}}function Fo(t){document.readyState!=="loading"?t():document.addEventListener("DOMContentLoaded",t)}function wr(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)},5e3)}async function Np(t,e=10,r=document){let n=0,o=document.querySelectorAll("nonexistent-tag");for(;n<e;){let i=Math.min(100*2**n,5e3);if(await tr.sleep(i),o=r.querySelectorAll(t),o.length)return b.verbose(`Attempt ${n+1}: ${o.length} elements found with ${t}`),o;b.verbose(`Attempt ${n+1}: Elements not found with ${t}. Retrying after ${i}ms.`),n++}return b.verbose(`\u26A0\uFE0F Max attempts reached. Element not found with ${t}.`),o}async function Ho(t,e=10,r=document){return(await Np(t,e,r)).item(0)}async function Pp(t){let[e,r,n]=await Promise.all([ze.get("did"),xt.get("id",""),ze.get("sessionNumber",1)]),o={letscooee_did:e,letscooee_sid:r,letscooee_sn:n,__letscooee_time:new Date().toLocaleString()};return t&&(o.__letscooee_via=t),o}async function qa(t){let e=await Pp(t);return Object.entries(e).map(([r,n])=>({key:r,value:n.toString()}))}function Mr(t,e,r,n=!1){Object.defineProperty(t,e,{enumerable:!1,configurable:!1,writable:n,value:r})}function Uh(t){if(t%100>=11&&t%100<=13)return t+"th";switch(t%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd";default:return t+"th"}}var Qa,Ie,Wh,Bp,Qn,Fh,jh,Gh,zh,kp,Lp,Mp,Dw,ns={},Yh=[],Ow=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Za=Array.isArray;function ln(t,e){for(var r in e)t[r]=e[r];return t}function Up(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Fp(t,e,r){var n,o,i,s={};for(i in e)i=="key"?n=e[i]:i=="ref"?o=e[i]:s[i]=e[i];if(arguments.length>2&&(s.children=arguments.length>3?Qa.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)s[i]===void 0&&(s[i]=t.defaultProps[i]);return Xa(t,s,n,o,null)}function Xa(t,e,r,n,o){var i={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Wh,__i:-1,__u:0};return o==null&&Ie.vnode!=null&&Ie.vnode(i),i}function kr(t){return t.children}function Br(t,e){this.props=t,this.context=e}function $o(t,e){if(e==null)return t.__?$o(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?$o(t):null}function qh(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return qh(t)}}function Hh(t){(!t.__d&&(t.__d=!0)&&Qn.push(t)&&!Ja.__r++||Fh!=Ie.debounceRendering)&&((Fh=Ie.debounceRendering)||jh)(Ja)}function Ja(){for(var t,e,r,n,o,i,s,a=1;Qn.length;)Qn.length>a&&Qn.sort(Gh),t=Qn.shift(),a=Qn.length,t.__d&&(r=void 0,o=(n=(e=t).__v).__e,i=[],s=[],e.__P&&((r=ln({},n)).__v=n.__v+1,Ie.vnode&&Ie.vnode(r),Hp(e.__P,r,n,e.__n,e.__P.namespaceURI,32&n.__u?[o]:null,i,o??$o(n),!!(32&n.__u),s),r.__v=n.__v,r.__.__k[r.__i]=r,Jh(i,r,s),r.__e!=o&&qh(r)));Ja.__r=0}function Kh(t,e,r,n,o,i,s,a,l,p,d){var f,v,y,T,D,P,U=n&&n.__k||Yh,X=e.length;for(l=Nw(r,e,U,l,X),f=0;f<X;f++)(y=r.__k[f])!=null&&(v=y.__i==-1?ns:U[y.__i]||ns,y.__i=f,P=Hp(t,y,v,o,i,s,a,l,p,d),T=y.__e,y.ref&&v.ref!=y.ref&&(v.ref&&$p(v.ref,null,y),d.push(y.ref,y.__c||T,y)),D==null&&T!=null&&(D=T),4&y.__u||v.__k===y.__k?l=Xh(y,l,t):typeof y.type=="function"&&P!==void 0?l=P:T&&(l=T.nextSibling),y.__u&=-7);return r.__e=D,l}function Nw(t,e,r,n,o){var i,s,a,l,p,d=r.length,f=d,v=0;for(t.__k=new Array(o),i=0;i<o;i++)(s=e[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(l=i+v,(s=t.__k[i]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?Xa(null,s,null,null,null):Za(s)?Xa(kr,{children:s},null,null,null):s.constructor==null&&s.__b>0?Xa(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=t,s.__b=t.__b+1,a=null,(p=s.__i=Pw(s,r,l,f))!=-1&&(f--,(a=r[p])&&(a.__u|=2)),a==null||a.__v==null?(p==-1&&(o>d?v--:o<d&&v++),typeof s.type!="function"&&(s.__u|=4)):p!=l&&(p==l-1?v--:p==l+1?v++:(p>l?v--:v++,s.__u|=4))):t.__k[i]=null;if(f)for(i=0;i<d;i++)(a=r[i])!=null&&(2&a.__u)==0&&(a.__e==n&&(n=$o(a)),Zh(a,a));return n}function Xh(t,e,r){var n,o;if(typeof t.type=="function"){for(n=t.__k,o=0;n&&o<n.length;o++)n[o]&&(n[o].__=t,e=Xh(n[o],e,r));return e}t.__e!=e&&(e&&t.type&&!r.contains(e)&&(e=$o(t)),r.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Pw(t,e,r,n){var o,i,s=t.key,a=t.type,l=e[r];if(l===null&&t.key==null||l&&s==l.key&&a==l.type&&(2&l.__u)==0)return r;if(n>(l!=null&&(2&l.__u)==0?1:0))for(o=r-1,i=r+1;o>=0||i<e.length;){if(o>=0){if((l=e[o])&&(2&l.__u)==0&&s==l.key&&a==l.type)return o;o--}if(i<e.length){if((l=e[i])&&(2&l.__u)==0&&s==l.key&&a==l.type)return i;i++}}return-1}function $h(t,e,r){e[0]=="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||Ow.test(e)?r:r+"px"}function Ka(t,e,r,n,o){var i,s;e:if(e=="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof n=="string"&&(t.style.cssText=n=""),n)for(e in n)r&&e in r||$h(t.style,e,"");if(r)for(e in r)n&&r[e]==n[e]||$h(t.style,e,r[e])}else if(e[0]=="o"&&e[1]=="n")i=e!=(e=e.replace(zh,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=r,r?n?r.u=n.u:(r.u=kp,t.addEventListener(e,i?Mp:Lp,i)):t.removeEventListener(e,i?Mp:Lp,i);else{if(o=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&r==1?"":r))}}function Vh(t){return function(e){if(this.l){var r=this.l[e.type+t];if(e.t==null)e.t=kp++;else if(e.t<r.u)return;return r(Ie.event?Ie.event(e):e)}}}function Hp(t,e,r,n,o,i,s,a,l,p){var d,f,v,y,T,D,P,U,X,B,Q,ve,K,ce,se,fe,Le,Te=e.type;if(e.constructor!=null)return null;128&r.__u&&(l=!!(32&r.__u),i=[a=e.__e=r.__e]),(d=Ie.__b)&&d(e);e:if(typeof Te=="function")try{if(U=e.props,X="prototype"in Te&&Te.prototype.render,B=(d=Te.contextType)&&n[d.__c],Q=d?B?B.props.value:d.__:n,r.__c?P=(f=e.__c=r.__c).__=f.__E:(X?e.__c=f=new Te(U,Q):(e.__c=f=new Br(U,Q),f.constructor=Te,f.render=Mw),B&&B.sub(f),f.props=U,f.state||(f.state={}),f.context=Q,f.__n=n,v=f.__d=!0,f.__h=[],f._sb=[]),X&&f.__s==null&&(f.__s=f.state),X&&Te.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=ln({},f.__s)),ln(f.__s,Te.getDerivedStateFromProps(U,f.__s))),y=f.props,T=f.state,f.__v=e,v)X&&Te.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),X&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(X&&Te.getDerivedStateFromProps==null&&U!==y&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(U,Q),!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(U,f.__s,Q)===!1||e.__v==r.__v){for(e.__v!=r.__v&&(f.props=U,f.state=f.__s,f.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.some(function(Re){Re&&(Re.__=e)}),ve=0;ve<f._sb.length;ve++)f.__h.push(f._sb[ve]);f._sb=[],f.__h.length&&s.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(U,f.__s,Q),X&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(y,T,D)})}if(f.context=Q,f.props=U,f.__P=t,f.__e=!1,K=Ie.__r,ce=0,X){for(f.state=f.__s,f.__d=!1,K&&K(e),d=f.render(f.props,f.state,f.context),se=0;se<f._sb.length;se++)f.__h.push(f._sb[se]);f._sb=[]}else do f.__d=!1,K&&K(e),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++ce<25);f.state=f.__s,f.getChildContext!=null&&(n=ln(ln({},n),f.getChildContext())),X&&!v&&f.getSnapshotBeforeUpdate!=null&&(D=f.getSnapshotBeforeUpdate(y,T)),fe=d,d!=null&&d.type===kr&&d.key==null&&(fe=Qh(d.props.children)),a=Kh(t,Za(fe)?fe:[fe],e,r,n,o,i,s,a,l,p),f.base=e.__e,e.__u&=-161,f.__h.length&&s.push(f),P&&(f.__E=f.__=null)}catch(Re){if(e.__v=null,l||i!=null)if(Re.then){for(e.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;i[i.indexOf(a)]=null,e.__e=a}else for(Le=i.length;Le--;)Up(i[Le]);else e.__e=r.__e,e.__k=r.__k;Ie.__e(Re,e,r)}else i==null&&e.__v==r.__v?(e.__k=r.__k,e.__e=r.__e):a=e.__e=Lw(r.__e,e,r,n,o,i,s,l,p);return(d=Ie.diffed)&&d(e),128&e.__u?void 0:a}function Jh(t,e,r){for(var n=0;n<r.length;n++)$p(r[n],r[++n],r[++n]);Ie.__c&&Ie.__c(e,t),t.some(function(o){try{t=o.__h,o.__h=[],t.some(function(i){i.call(o)})}catch(i){Ie.__e(i,o.__v)}})}function Qh(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:Za(t)?t.map(Qh):ln({},t)}function Lw(t,e,r,n,o,i,s,a,l){var p,d,f,v,y,T,D,P=r.props,U=e.props,X=e.type;if(X=="svg"?o="http://www.w3.org/2000/svg":X=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(p=0;p<i.length;p++)if((y=i[p])&&"setAttribute"in y==!!X&&(X?y.localName==X:y.nodeType==3)){t=y,i[p]=null;break}}if(t==null){if(X==null)return document.createTextNode(U);t=document.createElementNS(o,X,U.is&&U),a&&(Ie.__m&&Ie.__m(e,i),a=!1),i=null}if(X==null)P===U||a&&t.data==U||(t.data=U);else{if(i=i&&Qa.call(t.childNodes),P=r.props||ns,!a&&i!=null)for(P={},p=0;p<t.attributes.length;p++)P[(y=t.attributes[p]).name]=y.value;for(p in P)if(y=P[p],p!="children"){if(p=="dangerouslySetInnerHTML")f=y;else if(!(p in U)){if(p=="value"&&"defaultValue"in U||p=="checked"&&"defaultChecked"in U)continue;Ka(t,p,null,y,o)}}for(p in U)y=U[p],p=="children"?v=y:p=="dangerouslySetInnerHTML"?d=y:p=="value"?T=y:p=="checked"?D=y:a&&typeof y!="function"||P[p]===y||Ka(t,p,y,P[p],o);if(d)a||f&&(d.__html==f.__html||d.__html==t.innerHTML)||(t.innerHTML=d.__html),e.__k=[];else if(f&&(t.innerHTML=""),Kh(e.type=="template"?t.content:t,Za(v)?v:[v],e,r,n,X=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:r.__k&&$o(r,0),a,l),i!=null)for(p=i.length;p--;)Up(i[p]);a||(p="value",X=="progress"&&T==null?t.removeAttribute("value"):T!=null&&(T!==t[p]||X=="progress"&&!T||X=="option"&&T!=P[p])&&Ka(t,p,T,P[p],o),p="checked",D!=null&&D!=t[p]&&Ka(t,p,D,P[p],o))}return t}function $p(t,e,r){try{if(typeof t=="function"){var n=typeof t.__u=="function";n&&t.__u(),n&&e==null||(t.__u=t(e))}else t.current=e}catch(o){Ie.__e(o,r)}}function Zh(t,e,r){var n,o;if(Ie.unmount&&Ie.unmount(t),(n=t.ref)&&(n.current&&n.current!=t.__e||$p(n,null,e)),(n=t.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){Ie.__e(i,e)}n.base=n.__P=null}if(n=t.__k)for(o=0;o<n.length;o++)n[o]&&Zh(n[o],e,r||typeof t.type!="function");r||Up(t.__e),t.__c=t.__=t.__e=void 0}function Mw(t,e,r){return this.constructor(t,r)}function eg(t,e,r){var n,o,i,s;e==document&&(e=document.documentElement),Ie.__&&Ie.__(t,e),o=(n=typeof r=="function")?null:r&&r.__k||e.__k,i=[],s=[],Hp(e,t=(!n&&r||e).__k=Fp(kr,null,[t]),o||ns,ns,e.namespaceURI,!n&&r?[r]:o?null:e.firstChild?Qa.call(e.childNodes):null,i,!n&&r?r:o?o.__e:e.firstChild,n,s),Jh(i,t,s)}Qa=Yh.slice,Ie={__e:function(t,e,r,n){for(var o,i,s;e=e.__;)if((o=e.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(t)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(t,n||{}),s=o.__d),s)return o.__E=o}catch(a){t=a}throw t}},Wh=0,Bp=function(t){return t!=null&&t.constructor==null},Br.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ln({},this.state),typeof t=="function"&&(t=t(ln({},r),this.props)),t&&ln(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),Hh(this))},Br.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Hh(this))},Br.prototype.render=kr,Qn=[],jh=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Gh=function(t,e){return t.__v.__b-e.__v.__b},Ja.__r=0,zh=/(PointerCapture)$|Capture$/i,kp=0,Lp=Vh(!1),Mp=Vh(!0),Dw=0;var Wp,zt,Vp,tg,rg=0,ug=[],ft=Ie,ng=ft.__b,og=ft.__r,ig=ft.diffed,sg=ft.__c,ag=ft.unmount,cg=ft.__;function Bw(t,e){ft.__h&&ft.__h(zt,t,rg||e),rg=0;var r=zt.__H||(zt.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function Gp(t,e){var r=Bw(Wp++,7);return Fw(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function kw(){for(var t;t=ug.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(ec),t.__H.__h.forEach(jp),t.__H.__h=[]}catch(e){t.__H.__h=[],ft.__e(e,t.__v)}}ft.__b=function(t){zt=null,ng&&ng(t)},ft.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),cg&&cg(t,e)},ft.__r=function(t){og&&og(t),Wp=0;var e=(zt=t.__c).__H;e&&(Vp===zt?(e.__h=[],zt.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(e.__h.forEach(ec),e.__h.forEach(jp),e.__h=[],Wp=0)),Vp=zt},ft.diffed=function(t){ig&&ig(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(ug.push(e)!==1&&tg===ft.requestAnimationFrame||((tg=ft.requestAnimationFrame)||Uw)(kw)),e.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Vp=zt=null},ft.__c=function(t,e){e.some(function(r){try{r.__h.forEach(ec),r.__h=r.__h.filter(function(n){return!n.__||jp(n)})}catch(n){e.some(function(o){o.__h&&(o.__h=[])}),e=[],ft.__e(n,r.__v)}}),sg&&sg(t,e)},ft.unmount=function(t){ag&&ag(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{ec(n)}catch(o){e=o}}),r.__H=void 0,e&&ft.__e(e,r.__v))};var lg=typeof requestAnimationFrame=="function";function Uw(t){var e,r=function(){clearTimeout(n),lg&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,35);lg&&(e=requestAnimationFrame(r))}function ec(t){var e=zt,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),zt=e}function jp(t){var e=zt;t.__c=t.__(),zt=e}function Fw(t,e){return!t||t.length!==e.length||e.some(function(r,n){return r!==t[n]})}var Hw=Symbol.for("preact-signals");function Yp(){if(Vo>1)Vo--;else{for(var t,e=!1;os!==void 0;){var r=os;for(os=void 0,zp++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&fg(r))try{r.c()}catch(o){e||(t=o,e=!0)}r=n}}if(zp=0,Vo--,e)throw t}}var Fe=void 0;var os=void 0,Vo=0,zp=0,tc=0;function pg(t){if(Fe!==void 0){var e=t.n;if(e===void 0||e.t!==Fe)return e={i:0,S:t,p:Fe.s,n:void 0,t:Fe,e:void 0,x:void 0,r:e},Fe.s!==void 0&&(Fe.s.n=e),Fe.s=e,t.n=e,32&Fe.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=Fe.s,e.n=void 0,Fe.s.n=e,Fe.s=e),e}}function mt(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}mt.prototype.brand=Hw;mt.prototype.h=function(){return!0};mt.prototype.S=function(t){this.t!==t&&t.e===void 0&&(t.x=this.t,this.t!==void 0&&(this.t.e=t),this.t=t)};mt.prototype.U=function(t){if(this.t!==void 0){var e=t.e,r=t.x;e!==void 0&&(e.x=r,t.e=void 0),r!==void 0&&(r.e=e,t.x=void 0),t===this.t&&(this.t=r)}};mt.prototype.subscribe=function(t){var e=this;return St(function(){var r=e.value,n=Fe;Fe=void 0;try{t(r)}finally{Fe=n}})};mt.prototype.valueOf=function(){return this.value};mt.prototype.toString=function(){return this.value+""};mt.prototype.toJSON=function(){return this.value};mt.prototype.peek=function(){var t=Fe;Fe=void 0;try{return this.value}finally{Fe=t}};Object.defineProperty(mt.prototype,"value",{get:function(){var t=pg(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(zp>100)throw new Error("Cycle detected");this.v=t,this.i++,tc++,Vo++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Yp()}}}});function ir(t){return new mt(t)}function fg(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function mg(t){for(var e=t.s;e!==void 0;e=e.n){var r=e.S.n;if(r!==void 0&&(e.r=r),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function dg(t){for(var e=t.s,r=void 0;e!==void 0;){var n=e.p;e.i===-1?(e.S.U(e),n!==void 0&&(n.n=e.n),e.n!==void 0&&(e.n.p=n)):r=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=n}t.s=r}function Wo(t){mt.call(this,void 0),this.x=t,this.s=void 0,this.g=tc-1,this.f=4}(Wo.prototype=new mt).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===tc))return!0;if(this.g=tc,this.f|=1,this.i>0&&!fg(this))return this.f&=-2,!0;var t=Fe;try{mg(this),Fe=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return Fe=t,dg(this),this.f&=-2,!0};Wo.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}mt.prototype.S.call(this,t)};Wo.prototype.U=function(t){if(this.t!==void 0&&(mt.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}};Wo.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}};Object.defineProperty(Wo.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=pg(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function qp(t){return new Wo(t)}function hg(t){var e=t.u;if(t.u=void 0,typeof e=="function"){Vo++;var r=Fe;Fe=void 0;try{e()}catch(n){throw t.f&=-2,t.f|=8,Kp(t),n}finally{Fe=r,Yp()}}}function Kp(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,hg(t)}function $w(t){if(Fe!==this)throw new Error("Out-of-order effect");dg(this),Fe=t,this.f&=-2,8&this.f&&Kp(this),Yp()}function is(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}is.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}};is.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,hg(this),mg(this),Vo++;var t=Fe;return Fe=this,$w.bind(this,t)};is.prototype.N=function(){2&this.f||(this.f|=2,this.o=os,os=this)};is.prototype.d=function(){this.f|=8,1&this.f||Kp(this)};function St(t){var e=new is(t);try{e.c()}catch(r){throw e.d(),r}return e.d.bind(e)}var Jp,Xp;function jo(t,e){Ie[t]=e.bind(null,Ie[t]||function(){})}function rc(t){Xp&&Xp(),Xp=t&&t.S()}function gg(t){var e=this,r=t.data,n=Ww(r);n.value=r;var o=Gp(function(){for(var i=e.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return e.__$u.c=function(){var s,a=e.__$u.S(),l=o.value;a(),Bp(l)||((s=e.base)==null?void 0:s.nodeType)!==3?(e.__$f|=1,e.setState({})):e.base.data=l},qp(function(){var s=n.value.value;return s===0?0:s===!0?"":s||""})},[]);return o.value}gg.displayName="_st";Object.defineProperties(mt.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:gg},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});jo("__b",function(t,e){if(typeof e.type=="string"){var r,n=e.props;for(var o in n)if(o!=="children"){var i=n[o];i instanceof mt&&(r||(e.__np=r={}),r[o]=i,n[o]=i.peek())}}t(e)});jo("__r",function(t,e){rc();var r,n=e.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=(function(o){var i;return St(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i})())),Jp=n,rc(r),t(e)});jo("__e",function(t,e,r,n){rc(),Jp=void 0,t(e,r,n)});jo("diffed",function(t,e){rc(),Jp=void 0;var r;if(typeof e.type=="string"&&(r=e.__e)){var n=e.__np,o=e.props;if(n){var i=r.U;if(i)for(var s in i){var a=i[s];a!==void 0&&!(s in n)&&(a.d(),i[s]=void 0)}else r.U=i={};for(var l in n){var p=i[l],d=n[l];p===void 0?(p=Vw(r,l,d,o),i[l]=p):p.o(d,o)}}}t(e)});function Vw(t,e,r,n){var o=e in t&&t.ownerSVGElement===void 0,i=ir(r);return{o:function(s,a){i.value=s,n=a},d:St(function(){var s=i.value.value;n[e]!==s&&(n[e]=s,o?t[e]=s:s?t.setAttribute(e,s):t.removeAttribute(e))})}}jo("unmount",function(t,e){if(typeof e.type=="string"){var r=e.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var o in n){var i=n[o];i&&i.d()}}}}else{var s=e.__c;if(s){var a=s.__$u;a&&(s.__$u=void 0,a.d())}}t(e)});jo("__h",function(t,e,r,n){(n<3||n===9)&&(e.__$f|=2),t(e,r,n)});Br.prototype.shouldComponentUpdate=function(t,e){var r=this.__$u,n=r&&r.s!==void 0;for(var o in e)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){if(!(n||2&this.__$f||4&this.__$f)||1&this.__$f)return!0}else if(!(n||4&this.__$f)||3&this.__$f)return!0;for(var i in t)if(i!=="__source"&&t[i]!==this.props[i])return!0;for(var s in this.props)if(!(s in t))return!0;return!1};function Ww(t){return Gp(function(){return ir(t)},[])}var nc=class{url;alt;constructor(e){e.alt&&(this.alt=e.alt),this.url=e.url}};var oc=class{d;cmp;effective;constructor(e={}){this.d=e.d,this.cmp=e.cmp,this.effective=this.d}};var Qp=class{id;mID;name;groupID;groupName;isSelected;constructor(e){e??={},this.id=e.id,this.mID=e.mID,this.name=e.name,this.groupID=e.groupID,this.groupName=e.groupName,this.isSelected=e.isSelected??!1}},Ur=class{mID;name;imgs;link;price;sku;isAvailable;quantity;sellingPlans;selectedOptions;selectedSellingPlan;effectivePrice;constructor(e){e=e??{},this.mID=e.mID,this.name=e.name,this.imgs=e.imgs?.map(r=>new nc(r))??[],this.link=e.link,this.price=new oc(e.price),this.sku=e.sku,this.isAvailable=e.isAvailable,this.quantity=e.quantity,this.selectedOptions=e.selectedOptions??[],this.effectivePrice=ir(this.price.effective),e.sellingPlans?.length&&(this.selectedSellingPlan=ir(void 0)),this.sellingPlans=e.sellingPlans?.map(r=>{let n=new Qp(r);return n.isSelected&&(this.selectedSellingPlan.value=n),n})}getOneImage(){return this.imgs[0]?.url}changeSellingPlan(e){this.selectedSellingPlan.value=e}hasEffectivePrice(){return this.effectivePrice.value!==this.price.d}};var Ct=class{id;mID;name;options;imgs;vars;desc;link;slug;quantity;category;meta;reviews;tags;selectedOrFirstVariant;selected=ir(!0);constructor(e){this.update(e),this.selectedOrFirstVariant=ir(this.selectedVariant)}get firstImageURL(){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(e){this.vars=e,this.selectedOrFirstVariant.value=this.selectedVariant}get selectedVariant(){return this.vars.find(e=>e.isAvailable)??this.vars[0]}hasVariants(){return this.vars?.length>1}setSelectedVariant(e){this.selectedOrFirstVariant.value=e}setSelectedVariantByID(e){if(!e)return;let r=this.vars.find(n=>n.mID===e.toString());r&&this.setSelectedVariant(r)}update(e){return this.id=e.id??this.id,this.mID=e.mID??this.mID,this.name=e.name??this.name,this.imgs=e.imgs??this.imgs,this.desc=e.desc??this.desc,this.link=e.link??this.link,this.slug=e.slug??this.slug,this.quantity=e.quantity??this.quantity,this.meta=e.meta??this.meta,this.category=e.category??this.category,this.reviews=e.reviews??this.reviews,this.options=e.options??this.options,this.tags=e.tags??this.tags,e.vars&&(this.vars=e.vars.map(r=>new Ur(r))),this}toEmbed(e){return e=e??this.selectedOrFirstVariant.value,new Dt({id:this.id,mID:this.mID,vID:e.mID,vName:e.name,name:this.name,link:this.link,slug:this.slug,price:e.price.d,imageURL:e.getOneImage()??this.imgs?.[0].url})}getTemplateVariables(){let e=this.selectedOrFirstVariant.value,r=e.price,n=this.name,o=this.category,i=this.variantImage??this.firstImageURL,s=this.meta,a=this.tags?.join(",")??"",l=this.reviews?.rating,p=this.reviews?.totalReviews,d=r.cmp&&r.cmp>r.d,f=Z(_({name:n},Lt("price",r.d,!0)),{image_url:i,meta:s,category:o,rating:l,reviews:p,tags:a});if(e.hasEffectivePrice()){let y=Lt("effective_price",e.effectivePrice.value,!0);Object.assign(f,y)}if(d){let y=r.cmp-r.d,T={discount_percent:(y/r.cmp*100).toFixed(0)};Object.assign(f,T),Object.assign(f,Lt("compare_price",r.cmp)),Object.assign(f,Lt("discount_price",y))}let v={name:e.name,quantity:e.quantity};return{product:f,variant:v}}};var ic=class{id;alt;shortID;sources;items;durationMS;thumbnail;card;bestSource;highSource;goodSource;lowSource;m3u8Source;constructor(e={}){if(this.id=e.id,this.alt=e.alt,this.shortID=e.shortID,this.sources=e.sources?.sort((r,n)=>n.height-r.height),this.durationMS=e.durationMS,this.thumbnail=e.thumbnail,this.items=e.items?e.items.map(r=>new Ct(r)):[],this.card=e.card,this.sources){let r=[];for(let n of this.sources)n.format==="mp4"?r.push(n):n.format==="m3u8"&&!this.m3u8Source&&(this.m3u8Source=n);r.length>0&&(this.bestSource=r[0],this.highSource=r.length>1?r[1]:r[0],this.lowSource=r.length>2?r[r.length-1]:r[0])}}};var Zp=class{enabled;type;color;constructor(e){e??={},this.enabled=e.enabled,this.type=e.type,this.color=new Ve(e.color)}},ef=class{size;enabled;color;constructor(e){e??={},this.enabled=e.enabled,this.size=e.size,this.color=new Ve(e.color)}},tf=class{enabled;delay;constructor(e={}){this.enabled=e.enabled,e.delay&&(this.delay=e.delay>100?e.delay:e.delay*1e3)}},Cn=class{navigation;pagination;autoplay;loop;maxInRow;gap;maxInRowSm;gapSm;speed;marquee;constructor(e){e??={},this.navigation=new ef(e.navigation),this.pagination=new Zp(e.pagination),this.autoplay=new tf(e.autoplay),this.loop=e.loop??!1,this.maxInRow=e.maxInRow??4,this.gap=e.gap??0,this.maxInRowSm=e.maxInRowSm??this.maxInRow,this.gapSm=e.gapSm??this.gap,e.speed&&(this.speed=e.speed*1e3),this.marquee=e.marquee}};var sc=class{videos;source;template;heading;slidePerViewCount;autoPlay;showMuteButton;footerContent;detailPopup;playlistConfig;constructor(e={}){this.videos=e.videos?.map(r=>new ic(r))??[],this.source=e.source,this.template=e.template,this.detailPopup=e.detailPopup??{template:"VIDEO_ONLY_VIEW"},this.heading=e.heading,this.showMuteButton=e.showMuteButton,this.slidePerViewCount=e.slidePerViewCount??4,this.autoPlay=e.autoPlay??"ON",this.footerContent=e.footerContent??"FIRST_ITEM",this.playlistConfig=e.playlistConfig?.videoSwiper?{videoSwiper:new Cn(e.playlistConfig?.videoSwiper)}:void 0}};var Mt=Qr(Eg());Mt.filters.define("default",function(t){return typeof t>"u"||t==null?"":Gw(t)});+Mt.filters.define("max",(t,e)=>{let r=Number(t),n=Number(e);return isNaN(r)||isNaN(n)?t:r>n?e:t});Mt.filters.define("min",(t,e)=>{let r=Number(t),n=Number(e);return isNaN(r)||isNaN(n)?t:r<n?e:t});Mt.filters.define("fallback",(t,e)=>t==null||t===""?e:t);Mt.filters.define("manipulate_quantity",(t,e,r)=>{if(e??=1,r??=100,e>r)return b.error("Invalid range: min should be less than or equal to max."),t;if(t>=e&&t<=r)return t;let n=t%r;return n<e?e:n});Mt.filters.define("apply_discount_perc",(t,e,r=1/0)=>{if(t=+t,isNaN(t))return b.error("Need value as a number for `apply_discount_perc` filter"),NaN;if(e<0||e>100)return b.error("Invalid percent value for `apply_discount_perc` filter. Must be between 0 and 100."),NaN;let n=t*e/100;return t-Math.min(r,n)});Mt.filters.define("apply_discount_fixed",(t,e)=>(t=+t,isNaN(t)?(b.error("Need value as a number for `apply_discount_fixed` filter"),NaN):Math.max(0,t-e)));Mt.filters.define("currency",t=>(t=+t,isNaN(t)?(b.error("Need value as a number for `currency` filter"),NaN):Op(t)));Mt.defaultConfig.defaultFilter="default";Mt.defaultConfig.useWith=!0;Mt.defaultConfig.autoEscape=!1;var jw={'"':""","\\":"\","\n":"\\n"};function Gw(t){return String(t).replace(/["\\\n]/g,e=>jw[e])}function zw(t){if(!t)return"";let e=/({{{\s*([^}]+?)\s*}}}|{{\s*&\s*([^}]+?)\s*}})/g;return t.replace(e,(r,n,o,i)=>`{{ ${(o||i||"").trim()} }}`)}var Go=(t,e,r)=>{e=_({discount:{},cart:{},product:{},bundle:{},variant:{},customer:{},svg:{},form:{},amount_left:null},e);try{return Mt.render(zw(t),e)}catch(n){throw ae(n,"squirrelly-render",{extra:{template:t,values:e},triggerContext:r}),n}},Zn=(t,e,r)=>{let n=JSON.stringify(t),o=Go(n,e,r);try{return JSON.parse(o)}catch(i){throw ae(i,"variable-replacement",{extra:{before:t,after:o},triggerContext:r}),i}};function ss(){return!!window.Shopify}function cc(){if(ss())return window.Shopify.shop?.split(".")?.[0]}function vg(t){let n=(t.includes("://")?new URL(t).pathname:t).match(/\/products\/([^/]+?)(?:\.html)?$/);return n?n[1]:null}function zo(t){return(window.Shopify?.routes?.root??"/")+t.substring(1)}function lc(t){return zo(t+"?from=cooee")}var me=class t{static CURRENT;token;items=[];total_price=0;original_total_price=0;items_subtotal_price=0;currency;item_count=0;attributes;cart_level_discount_applications;discount_codes;total_discount=0;constructor(){}static getCurrent(){return this.CURRENT||(this.CURRENT=new t),this.CURRENT}async getNormalisedCart(e){return Yw(e)}getCooeeCart(){return rf()}update(e){return this.token=e.token,this.items=e.items,this.total_price=e.total_price,this.original_total_price=e.original_total_price,this.items_subtotal_price=e.items_subtotal_price,this.currency=e.currency,this.item_count=e.item_count,this.attributes=e.attributes,this.cart_level_discount_applications=e.cart_level_discount_applications,this.discount_codes=e.discount_codes,this.total_discount=e.total_discount,ye().currencyCode=this.currency,b.verbose("Updated ShopifyCart",this),this}toString(){return`ShopifyCart(token: ${this.token}, itemCount: ${this.item_count})`}};async function Yw(t){let e=me.getCurrent();await Kw(e,t);let r=_g(e);return t&&await ze.set("cart",r),r}function rf(){return _g(me.getCurrent())}function _g(t){return{amount:t.total_price/100,originalAmount:t.original_total_price/100,itemsSubtotalPrice:t.items_subtotal_price/100,currency:t.currency,itemCount:t.item_count,items:qw(t.items),token:t.token}}function qw(t){if(!t)return b.error("No item received to be sent"),[];Array.isArray(t)||(t=[t]);let e=[];for(let r of t){if(!r.id||!r.title){b.warn("Invalid item received",r);continue}let n={name:r.title,quantity:+r.quantity||1,mID:r.product_id?.toString(),vID:r.id.toString(),price:+r.price/100||0,finalPrice:+r.final_price/100||0,properties:r.properties,key:r.key},o=r.selling_plan_allocation?.selling_plan;if(!o){e.push(n);continue}n.sellingPlanAllocation={sellingPlan:{fixedSellingPlan:o.fixed_selling_plan,id:o.id,name:o.name,recurringDeliveries:o.recurring_deliveries}},e.push(n)}return e}async function Kw(t,e){if(!e&&t.token){b.verbose("Not fetching cart");return}b.verbose("Fetching cart");let r=lc("/cart.js");try{let n=(await rn(r)).data;t.update(n)}catch(n){b.error("Unable to fetch the cart",n)}}var uc=class{id;mID;handle;title;imageURL;constructor(e){e??={},this.id=e.id,this.mID=e.mID,this.handle=e.handle,this.title=e.title,this.imageURL=e.imageURL}};var nf=class{enabled;constructor(e){this.enabled=e.enabled}},of=class extends nf{max;min;constructor(e){e??={},super(e),this.min=e.min,this.max=e.max}},pc=class{productQuantity;constructor(e){e??={},this.productQuantity=new of(e.productQuantity)}};var Yt=class{t;bg;br;clc;shd;spc;trf;a;w;h;x;y;constructor(e){this.t=e.t,e.bg&&(this.bg=new Vn(e.bg)),e.br&&(this.br=new en(e.br)),e.shd&&(this.shd=new Ui(e.shd)),e.spc&&(this.spc=new tn(e.spc)),this.trf=new Wn(e.trf),this.clc=e.clc,this.w=e.w,this.h=e.h,this.x=e.x,this.y=e.y,this.a=e.a}get alpha(){return this.a??100}get type(){return this.t}get typeAsString(){return je[this.t]}get click(){return this.clc}},je=(B=>(B[B.IMAGE=1]="IMAGE",B[B.TEXT=2]="TEXT",B[B.BUTTON=3]="BUTTON",B[B.FLEXBOX=4]="FLEXBOX",B[B.MULTI_COLUMN=5]="MULTI_COLUMN",B[B.CHECKBOX=6]="CHECKBOX",B[B.PRODUCTS=11]="PRODUCTS",B[B.PRODUCT=12]="PRODUCT",B[B.PRODUCT_IMAGE=13]="PRODUCT_IMAGE",B[B.PRODUCT_TITLE=14]="PRODUCT_TITLE",B[B.PRODUCT_VARIATIONS=15]="PRODUCT_VARIATIONS",B[B.PRODUCT_VARIATIONS_SELLING_PLANS=16]="PRODUCT_VARIATIONS_SELLING_PLANS",B[B.PRODUCT_BUTTON=18]="PRODUCT_BUTTON",B[B.PRODUCT_RATING=19]="PRODUCT_RATING",B[B.EMAIL_INPUT=51]="EMAIL_INPUT",B[B.PHONE_INPUT=52]="PHONE_INPUT",B[B.COUNTDOWN_TIMER=61]="COUNTDOWN_TIMER",B[B.CAROUSEL=62]="CAROUSEL",B[B.SHAPE=100]="SHAPE",B))(je||{});var eo=class extends Yt{constructor(e){super(e)}};var un=class extends Yt{src;constructor(e){super(e),this.src=e.src}};var Fr=class extends Yt{typo;constructor(e){super(e);let r=_(_({},e.f),e.typo);e.alg&&(r.ta=e.alg),e.c&&(r.tc=e.c),this.typo=new at(r)}get color(){return this.typography.tc}get typography(){return this.typo}};var Rn=class extends Fr{prs;constructor(e){super(e),this.prs=e.prs}get parts(){return this.prs}};var fc=class extends Yt{o;constructor(e){super(e),this.o=e.o??5,this.w=this.w??1080,this.h=this.h??1920}getOrigin(){return this.o}};var Yo=class{dd;hh;mm;ss;date;constructor(e){e??={},this.dd=e.dd??0,this.hh=e.hh??0,this.mm=e.mm??0,this.ss=e.ss??0,this.date=e.date?new Date(e.date):void 0}start(e,r){let n=new Date;e===2?(n.setSeconds(n.getSeconds()+this.ss),n.setMinutes(n.getMinutes()+this.mm),n.setHours(n.getHours()+this.hh),n.setDate(n.getDate()+this.dd)):n=this.date??new Date;let o=window.setInterval(()=>{let i=new Date().getTime(),s=n.getTime()-i;if(s<1){clearInterval(o);return}let a=Math.floor(s/(1e3*60*60*24)),l=Math.floor(s%(1e3*60*60*24)/(1e3*60*60)),p=Math.floor(s%(1e3*60*60)/(1e3*60)),d=Math.floor(s%(1e3*60)/1e3);r({days:a,hours:l,minutes:p,seconds:d})},1e3);return o}};var qo=class extends Fr{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e),this.gap=e.gap,this.timerType=e.type,this.timer=new Yo(e.timer),this.show=e.show??{day:!0,hour:!0,minute:!0,second:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}};var mc=class{txt;c;constructor(e){e??={},this.txt=e.txt,this.c=new Ve(e.c??{})}get text(){return this.txt}get color(){return this.c}};var An=class extends Fr{ph;constructor(e){super(e),this.ph=new mc(e.ph)}get placeholderText(){return this.ph.text}get placeholderColor(){return this.ph.color.rgba}};var Ko=class extends An{constructor(e){e??={},super(e)}};var Xo=class extends An{};var Jo=class extends An{};var Qo=class extends un{};var dc=class{en;ex;constructor(e){e=e??{},this.en=e.en,this.ex=e.ex}getEnterAnimation(){switch(this.en){case 2:return[{transform:"translateY(-100%)"},{transform:"translateY(0%)"}];case 3:return[{transform:"translateY(100%)"},{transform:"translateY(0%)"}];case 4:return[{transform:"translateX(-100%)"},{transform:"translateX(0%)"}];case 5:return[{transform:"translateX(100%)"},{transform:"translateX(0%)"}];case 6:return[{transform:"translate(-100%, -100%)"},{transform:"translate(0%, 0%)"}];case 7:return[{transform:"translate(100%, -100%)"},{transform:"translate(0%, 0%)"}];case 8:return[{transform:"translate(-100%, 100%)"},{transform:"translate(0%, 0%)"}];case 9:return[{transform:"translate(100%, 100%)"},{transform:"translate(0%, 0%)"}];case 10:return[{transform:"scale(0.1)"},{transform:"scale(1)"}];default:return[]}}getExitAnimation(){switch(this.ex){case 2:return[{transform:"translateY(0%)"},{transform:"translateY(-100%)"}];case 3:return[{transform:"translateY(0%)"},{transform:"translateY(100%)"}];case 4:return[{transform:"translateX(0%)"},{transform:"translateX(-100%)"}];case 5:return[{transform:"translateX(0%)"},{transform:"translateX(100%)"}];case 6:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, -100%)"}];case 7:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, -100%)"}];case 8:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, 100%)"}];case 9:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, 100%)"}];case 10:return[{transform:"scale(1)"},{transform:"scale(0)"}];default:return[]}}};var hc=15,as=class extends Yt{gvt;max;cover;anim;embedded;constructor(e){e=e??{},super(e),this.gvt=e.gvt??5,this.max=e.max,this.cover=e.cover??!0,this.anim=new dc(e.anim),this.spc||(this.spc=new tn({pl:hc,pr:hc,pt:hc,pb:hc}))}};var gc=class extends as{cont;elems=[];mob;constructor(e){e=e??{},super(e),this.cont=new fc(e.cont),this.mob=new as(e.mob),this.bg||(this.bg=this.cont.bg,delete this.cont.bg),e.elems.forEach(r=>{r.t===1?this.elems.push(new un(r)):r.t===2?this.elems.push(new Rn(r)):r.t===3?this.elems.push(new Rn(r)):r.t===100?this.elems.push(new eo(r)):r.t===51?this.elems.push(new Xo(r)):r.t===52?this.elems.push(new Jo(r)):r.t===61?this.elems.push(new qo(r)):r.t===15||r.t===16?this.elems.push(new Ko(r)):r.t===13&&this.elems.push(new Qo(r))})}getStylesForWrapper(){if(this.cover)return{};let e;return this.gvt===1?e={top:0,left:0}:this.gvt===2?e={top:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===3?e={top:0,right:0}:this.gvt===6?e={top:"50%",right:0,transform:"translateY(-50%)"}:this.gvt===9?e={bottom:0,right:0}:this.gvt===8?e={bottom:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===7?e={bottom:0,left:0}:this.gvt===4?e={top:"50%",left:0,transform:"translateY(-50%)"}:e={top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},e.overflow="visible",e}getFlexStylesForContainer(){let e={display:"flex",flexDirection:"row"},r,n;return this.gvt===1?(r="flex-start",n="flex-start"):this.gvt===2?(r="center",n="flex-start"):this.gvt===3?(r="flex-end",n="flex-start"):this.gvt===4?(r="flex-start",n="center"):this.gvt===6?(r="flex-end",n="center"):this.gvt===7?(r="flex-start",n="flex-end"):this.gvt===8?(r="center",n="flex-end"):this.gvt===9?(r="flex-end",n="flex-end"):(r="center",n="center"),e.alignItems=n,e.justifyContent=r,e.overflow="visible",e}overrideForMobileView(){this.max=this.mob.max??this.max,this.cover=this.mob.cover??this.cover,this.gvt=this.mob.gvt??this.gvt,this.bg=this.mob.bg??this.bg,this.spc=this.mob.spc??this.spc,this.anim=this.mob.anim??this.anim}};var Zo=class{gap;dir;wrap;jc;ai;scroll;constructor(e){e??={},this.gap=e.gap??0,this.dir=e.dir??"row",this.wrap=e.wrap??"nowrap",this.jc=e.jc??"flex-start",this.ai=e.ai??"flex-start",this.scroll=e.scroll}};var yc=class{of;disp;pos;top;bottom;left;right;zIndex;constructor(e){e??={},this.of=e.of,this.disp=e.disp,this.pos=e.pos,this.top=e.top,this.bottom=e.bottom,this.left=e.left,this.right=e.right,this.zIndex=e.zIndex}};var Ec=class{w;h;maxW;maxH;minW;minH;constructor(e){e??={},this.w=e.w??"100%",this.h=e.h??"auto",this.maxW=e.maxW,this.maxH=e.maxH,this.minW=e.minW,this.minH=e.minH}};var vc=class{size;bg;br;spc;typo;lout;flex;constructor(e){e??={},this.spc=new tn(e.spc),e.size&&(this.size=new Ec(e.size)),e.bg&&(this.bg=new Vn(e.bg)),e.br&&(this.br=new en(e.br)),e.typo&&(this.typo=new at(e.typo)),e.lout&&(this.lout=new yc(e.lout)),e.flex&&(this.flex=new Zo(e.flex))}},ei=class{sm;lg;constructor(e){e??={},this.sm=new vc(e.sm),this.lg=new vc(e.lg)}};var gt=class{t;style;hide;when;clc;l;constructor(e,r){r??={},this.t=e,this.style=new ei(r.style),this.hide=r.hide,this.l=r.l,r.when?.op&&(this.when=r.when),r.clc&&(this.clc=r.clc)}get stringType(){return je[this.t]}};var yt=class extends gt{text;constructor(e,r){e?.style?.lg?.typo?.s&&delete e.style.lg.typo.s,e?.style?.sm?.typo?.s&&delete e.style.sm.typo.s,super(r??2,e),e??={},this.text=e.text}};var to=class extends yt{constructor(e,r){super(e,r??3)}};var ti=class extends gt{value;constructor(e){super(6,e),e??={},this.value=e.value}};var ri=class extends yt{showChips;optionsConfig;constructor(e=15,r){super(r,e),r??={},this.showChips=r.showChips??!1,this.optionsConfig=r.optionsConfig??{}}};var _c=class extends gt{c;iconSize;showSingleStar;fullStar;halfStart;constructor(e){super(19,e),e??={},this.c=new Ve(e.c),this.iconSize=e.iconSize??24,this.showSingleStar=e.showSingleStar??!1,this.fullStar=e.fullStar,this.halfStart=e.halfStart}};var bg=Qr(So());var bc=class extends gt{conf;slide;formData;values;allowedTypes;constructor(e){super(62,e),e&&this.update(e)}update(e){e??={},this.slide=qt.getParsedElement(e.slide),this.formData=e.formData,this.values=e.values,this.conf=new Cn(e.conf),this.allowedTypes=e.allowedTypes}};var wc=class extends yt{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e,61),this.gap=e.gap,this.timerType=e.type,this.timer=new Yo(e.timer),this.show=e.show??{days:!0,hours:!0,minutes:!0,seconds:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}};var Dn=class extends gt{elems;constructor(e){super(4,e),this.update(e)}update(e){e??={},this.elems??=[],e.elems?.forEach(r=>{let n=qt.getParsedElement(r);n&&this.elems.push(n)})}};var ro=class extends gt{src;sm;lg;constructor(e,r){super(r??1,e),e&&this.update(e)}update(e){this.src=e.src,this.sm=e.sm,this.lg=e.lg}};var qt=class t{static getParsedElements(e){let r=[];return e?.forEach(n=>{let o=t.getParsedElement(n);o&&r.push(o)}),r}static getParsedElement(e){switch(e.t){case 2:return new yt(e);case 3:return new to(e);case 6:return new ti(e);case 11:return new Sc(e);case 12:return new On(e);case 61:return new wc(e);case 4:return new Dn(e);case 1:return new ro(e);case 13:return new ro(e,13);case 14:return new yt(e,14);case 15:case 16:return new ri(e.t,e);case 18:return new to(e,18);case 62:return new bc(e);case 19:return new _c(e);default:bg.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"}}};var On=class extends gt{img;title;desc;price;compareAt;btn;variantDD;show;symbol;cBox;elems;noLinks;constructor(e){if(e??={},super(12,e),this.show=e.show,this.elems=qt.getParsedElements(e.elems),this.noLinks=e.noLinks,!this.elems.length){e.cBox&&this.elems.push(new ti(e.cBox)),this.elems.push(new ro(e.img,13));let r=new yt(e.title,14);r.hide=!e.show?.title,r.text="{{ product.name }}",this.elems.push(r);let n=new yt(e.price);n.text="{{ product.price }}",n.hide=!e.show?.price;let o=new yt(e.compareAt);o.text="{{ product.compare_price }}",o.hide=!e.show?.price,e.compareAt||(o.style=new ei(n.style),o.style.lg.typo=new at(Z(_({},o.style.lg.typo),{td:"line-through"})),o.style.sm.typo=new at(Z(_({},o.style.sm.typo),{td:"line-through"})));let i=new Dn({style:{lg:{spc:{mb:10},flex:{dir:"row",gap:10,ai:"center",jc:qt.parseAlignmentToJustifyContent(n.style.lg.typo?.ta)}}}});i.elems.push(o),i.elems.push(n),this.elems.push(i);let s=new ri(15,e.variantDD);if(s.hide=!e.show?.variantDD,this.elems.push(s),e.btn){let a=new to(e.btn,18);a.hide=!e.show?.btn,this.elems.push(a)}}e.symbol&&(this.symbol=new yt(e.symbol))}};var Sc=class extends gt{conf;prod;constructor(e){super(11,e),e??={},this.conf=new sf(e.conf),this.prod=new On(e.prod)}};var Tc=class extends Cn{disp;maxItems;constructor(e){e??={},super(e),this.disp=e.disp,this.maxItems=e.maxItems}},sf=class{lg;sm;constructor(e){e??={},this.lg=new Tc(e.lg),this.sm=new Tc(e.sm)}};var Ic=class extends Dn{constructor(e){super(e)}};var ni=class{cont;elems=[];constructor(e){e=e??{},this.cont=new Ic(e.cont),e.elems?.forEach(r=>{this.addRawElement(r)})}addRawElement(e){let r=qt.getParsedElement(e);return r&&this.elems.push(r),r}};function xc(t,e){return Xw(t,e,0,5)}function Xw(t,e,r=0,n=50){if(e){if(r>n){console.warn("Maximum recursion depth reached in findFirstElementOfType");return}for(let o of e){if(o.t===t)return o;let i="elems"in o?o.elems:[];if(i?.length>0){let s=xc(t,i);if(s)return s}}}}var af=class{engagementID;shortID;contentType;delay;onsiteDeliveryType;objective;redirectBehaviour;constructor(e){this.shortID=e.shortID,this.contentType=e.contentType,this.engagementID=e.engagementID,this.delay=e.delay??0,this.redirectBehaviour=e.redirectBehaviour,this.onsiteDeliveryType=e.onsiteDeliveryType,this.objective=e.objective}isAnySplit(){return this.isABTesting()||this.isExclusionTesting()}isExclusionTesting(){return this.contentType===Pi.EXCLUSION}isABTesting(){return this.contentType===Pi.ABTESTING}isSingleContent(){return this.contentType===Pi.SINGLE}},cs=class{videoConfig;savingsBarConfig;afterDeleteJS;afterRenderJS;constructor(e){this.update(e)}update(e){e??={},e.videoConfig&&(this.videoConfig=new sc(e.videoConfig)),e.savingsBarConfig&&(this.savingsBarConfig=new ia(e.savingsBarConfig)),e.afterDeleteJS&&(this.afterDeleteJS=e.afterDeleteJS),e.afterRenderJS&&(this.afterRenderJS=e.afterRenderJS)}},Tt=class extends af{contentID;variation;ian;widget;discount;placement;promotionType;contentSource;manipulation;klaviyoFormID;entryAnimation;hasMultiplePlacement;skipSubscribedItems;progressBarConfig;stickyATCConfig;bundleConfig;content;previewType;occurred;id;currency;props;items;nonMutableItems;embeddedItems;bundleFrom;collections;customerData;experimentConfig;discountData=ir({});constructor(e){super(e),this.id=e.id,this.currency=ye().currencyCode??"USD",this.contentID=e.contentID,this.variation=e.variation,e.widget&&(this.widget=new ni(e.widget)),this.previewType=e.previewType,this.occurred=e.occurred??new Date,this.props=e.props,this.entryAnimation=e.entryAnimation??"NONE",this.embeddedItems=e.embeddedItems?.map(r=>new Dt(r)),this.items=e.items?.map(r=>new Ct(r))??[],this.nonMutableItems=e.items?.map(r=>new Ct(r))??[],this.collections=e.collections?.map(r=>new uc(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 pc(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 ra(e.experimentConfig)),e.progressBarConfig&&(this.progressBarConfig=new oa(e.progressBarConfig)),e.bundleConfig&&(this.bundleConfig=new Zs(e.bundleConfig)),e.bundleFrom&&(this.bundleFrom=new Ct(e.bundleFrom)),e.content&&(this.content=new cs(e.content))}shouldDelay(){return this.delay>0}getDelaySeconds(){let e=new Date().getTime()-this.occurred.getTime();return this.delay*1e3-e}isBundle(){return this.objective===yr.BUNDLE_AND_UPSELL}isCartEmbed(){return this.onsiteDeliveryType===Li.CART_EMBED}isPageEmbed(){return this.onsiteDeliveryType===Li.PAGE_EMBED}isProgressBar(){return this.objective===yr.PROGRESS_BAR}isSubscriptionUpsell(){return this.objective===yr.SUBSCRIPTION_UPSELL}isCartRecovery(){return this.objective===yr.CART_RECOVERY}isProductPromotion(){return this.objective===yr.PRODUCT_PROMOTION}isProductPromoted(){return this.isProductPromotion()||this.isBundle()||this.isCartRecovery()}isCollectionPromoted(){return this.isProductPromotion()&&this.collections.length>0&&this.promotionType===su.COLLECTION}isBYOB(){return this.objective===yr.BYOB}isStickyATC(){return this.objective===yr.STICKY_ATC}isShoppableVideo(){return this.objective===yr.SHOPPABLE_VIDEO}isSavingsBar(){return this.objective===yr.SAVINGS_BAR}processPopup(e){let r=this.items[0],n={},o={};if(r){let a=r.selectedOrFirstVariant.value;n=Z(_(_({name:r.name,id:r.mID,link:r.link,vID:a.mID,image:r.variantImage},Lt("price",a.price.d)),Lt("comparePrice",a.price.cmp)),{quantity:r.quantity}),o={quantity:a.quantity}}let i={productCount:me.getCurrent().item_count},s=Go(JSON.stringify(e),{product:n,variant:o,cart:i,discount:this.discount,customer:this.customerData},new Rr(new Date,this));return r&&(s=s.replace(new RegExp("https://cdn.global.letscooee.com/images/placeholders/product.png","gi"),r.variantImage??r.firstImageURL)),new gc(JSON.parse(s))}calculateDiscountData(e,r){let n=Zr.sum(e,s=>s.selectedOrFirstVariant.value.price.d),o=Zr.sum(e,s=>{let a=s.selectedOrFirstVariant.value.price;return a.cmp??a.d}),i={actualPrice:n,totalComparePrice:o,discountAmount:0,discountPercentage:0,discountedPrice:n};if(!e?.length||!r||!this.discount?.type){this.discountData.value=this.formatCurrencyAndNumber(i);return}if(Zt.BXGY===this.discount.type&&this.discount.values?.length)i.discountPercentage=this.discount.values[0],this.updateEffectivePrice(e,i.discountPercentage,!0),i.discountAmount=i.actualPrice-Zr.sum(e,s=>s.selectedOrFirstVariant.value.effectivePrice.value);else if([Zt.STATIC,Zt.UNIQUE_FLAT].includes(this.discount.type)&&this.discount.values?.length)i.discountPercentage=this.discount.values[0],i.discountAmount=i.actualPrice*i.discountPercentage/100,this.updateEffectivePrice(e,i.discountPercentage);else if(Zt.UNIQUE_FLAT_ITEMS===this.discount.type&&this.discount.values?.length)this.discount.ruleType==="fixed_amount"?(i.discountAmount=this.discount.values[0],i.discountPercentage=i.actualPrice>0?i.discountAmount*100/i.actualPrice:0):(i.discountPercentage=this.discount.values[0],i.discountAmount=i.actualPrice*i.discountPercentage/100),this.updateEffectivePrice(e,i.discountPercentage);else if(this.discount.type===Zt.UNIQUE_FIXED_ITEMS&&this.discount.values?.length)i.discountAmount=i.actualPrice-this.discount.values[0],i.discountPercentage=i.discountAmount/i.actualPrice*100,this.updateEffectivePrice(e,i.discountPercentage);else if(this.discount.type===Zt.UNIQUE_CHEAPEST_ITEM_FREE){e.sort((a,l)=>l.selectedOrFirstVariant.value.price.d-a.selectedOrFirstVariant.value.price.d);let s=e[e.length-1];s.selectedOrFirstVariant.value.effectivePrice.value=0,i.discountAmount=s.selectedOrFirstVariant.value.price.d,i.discountPercentage=i.discountAmount/i.actualPrice*100}i.discountedPrice=i.actualPrice-i.discountAmount,this.discountData.value=this.formatCurrencyAndNumber(i)}getPrivateAttributesForLineItem(){return qe.get().skipItemAttribute?{}:{_via:"Cooee",_letscooee_campaign:this.shortID,_letscooee_content:this.contentID}}getKVFormatPrivateAttributesForLineItem(){return qe.get().skipItemAttribute?[]:[{key:"_via",value:"Cooee"},{key:"_letscooee_campaign",value:this.shortID},{key:"_letscooee_content",value:this.contentID}]}isBundleOnCartDrawer(){return this.isBundle()&&this.isCartEmbed()}isBundleOnPDP(){return this.isPageEmbed()&&this.isBundle()}hasSwiperElement(){if(xc(62,this.widget?.elems))return!0;let r=xc(11,this.widget?.elems);return r?r.conf.lg.disp===2||r.conf.sm.disp===2:!1}toString(){let e;return this.onsiteDeliveryType===Li.POPUP?e="Popup":e=Fm.toTitle(this.objective),`${e}(id=${this.shortID})`}getCartMagicVariables(){let e=me.getCurrent(),r=Zr.sum(e.items??[],n=>n.discounts?.reduce((o,i)=>o+(i.amount??0),0)??0);return _(_(_(_({productCount:e.item_count,product_count:e.item_count},Lt("amount",e.total_price/100)),Lt("originalAmount",e.original_total_price/100)),Lt("total_line_items_discount",r/100)),Lt("total_discount",e.total_discount/100))}shouldGetVariationImmediately(){return this.hasMultiplePlacement&&!this.isProgressBar()&&!this.isSavingsBar()}shouldSkipVariation(){return this.isSingleContent()||this.isProgressBar()||this.isSavingsBar()||!!this.widget}updateEffectivePrice(e,r,n=!1){let o=ye().currentItem;e.forEach(i=>{let s=i.selectedOrFirstVariant.value,a=s.price;if(n&&i.mID===o.mID)s.effectivePrice.value=a.d;else{let l=a.d*r/100;s.effectivePrice.value=a.d-l}})}formatCurrencyAndNumber(e){if(!e)return{};let r={discountPercentage:Bh(e.discountPercentage??0),discountCode:this.discount?.code};return["actualPrice","discountAmount","discountedPrice","totalComparePrice"].map(n=>{Object.assign(r,Lt(n,e[n]))}),r}};function Qw(t,e){return e={exports:{}},t(e,e.exports),e.exports}var Zw=nS,eS=iS,tS=cS,$r=[],ar=[],rS=typeof Uint8Array<"u"?Uint8Array:Array,cf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(no=0,wg=cf.length;no<wg;++no)$r[no]=cf[no],ar[cf.charCodeAt(no)]=no;var no,wg;ar[45]=62;ar[95]=63;function Ug(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 nS(t){var e=Ug(t),r=e[0],n=e[1];return(r+n)*3/4-n}function oS(t,e,r){return(e+r)*3/4-r}function iS(t){var e,r=Ug(t),n=r[0],o=r[1],i=new rS(oS(t,n,o)),s=0,a=o>0?n-4:n,l;for(l=0;l<a;l+=4)e=ar[t.charCodeAt(l)]<<18|ar[t.charCodeAt(l+1)]<<12|ar[t.charCodeAt(l+2)]<<6|ar[t.charCodeAt(l+3)],i[s++]=e>>16&255,i[s++]=e>>8&255,i[s++]=e&255;return o===2&&(e=ar[t.charCodeAt(l)]<<2|ar[t.charCodeAt(l+1)]>>4,i[s++]=e&255),o===1&&(e=ar[t.charCodeAt(l)]<<10|ar[t.charCodeAt(l+1)]<<4|ar[t.charCodeAt(l+2)]>>2,i[s++]=e>>8&255,i[s++]=e&255),i}function sS(t){return $r[t>>18&63]+$r[t>>12&63]+$r[t>>6&63]+$r[t&63]}function aS(t,e,r){for(var n,o=[],i=e;i<r;i+=3)n=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(t[i+2]&255),o.push(sS(n));return o.join("")}function cS(t){for(var e,r=t.length,n=r%3,o=[],i=16383,s=0,a=r-n;s<a;s+=i)o.push(aS(t,s,s+i>a?a:s+i));return n===1?(e=t[r-1],o.push($r[e>>2]+$r[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],o.push($r[e>>10]+$r[e>>4&63]+$r[e<<2&63]+"=")),o.join("")}var lf={byteLength:Zw,toByteArray:eS,fromByteArray:tS};var lS=function(e,r,n,o,i){var s,a,l=i*8-o-1,p=(1<<l)-1,d=p>>1,f=-7,v=n?i-1:0,y=n?-1:1,T=e[r+v];for(v+=y,s=T&(1<<-f)-1,T>>=-f,f+=l;f>0;s=s*256+e[r+v],v+=y,f-=8);for(a=s&(1<<-f)-1,s>>=-f,f+=o;f>0;a=a*256+e[r+v],v+=y,f-=8);if(s===0)s=1-d;else{if(s===p)return a?NaN:(T?-1:1)*(1/0);a=a+Math.pow(2,o),s=s-d}return(T?-1:1)*a*Math.pow(2,s-o)},uS=function(e,r,n,o,i,s){var a,l,p,d=s*8-i-1,f=(1<<d)-1,v=f>>1,y=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=o?0:s-1,D=o?1:-1,P=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=f):(a=Math.floor(Math.log(r)/Math.LN2),r*(p=Math.pow(2,-a))<1&&(a--,p*=2),a+v>=1?r+=y/p:r+=y*Math.pow(2,1-v),r*p>=2&&(a++,p/=2),a+v>=f?(l=0,a=f):a+v>=1?(l=(r*p-1)*Math.pow(2,i),a=a+v):(l=r*Math.pow(2,v-1)*Math.pow(2,i),a=0));i>=8;e[n+T]=l&255,T+=D,l/=256,i-=8);for(a=a<<i|l,d+=i;d>0;e[n+T]=a&255,T+=D,a/=256,d-=8);e[n+T-D]|=P*128},oi={read:lS,write:uS},Ac=Qw(function(t,e){var r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=U,e.INSPECT_MAX_BYTES=50;var n=2147483647;e.kMaxLength=n,s.TYPED_ARRAY_SUPPORT=o(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{var h=new Uint8Array(1),c={foo:function(){return 42}};return Object.setPrototypeOf(c,Uint8Array.prototype),Object.setPrototypeOf(h,c),h.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function i(h){if(h>n)throw new RangeError('The value "'+h+'" is invalid for option "size"');var c=new Uint8Array(h);return Object.setPrototypeOf(c,s.prototype),c}function s(h,c,u){if(typeof h=="number"){if(typeof c=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(h)}return a(h,c,u)}s.poolSize=8192;function a(h,c,u){if(typeof h=="string")return f(h,c);if(ArrayBuffer.isView(h))return y(h);if(h==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(h));if($e(h,ArrayBuffer)||h&&$e(h.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&($e(h,SharedArrayBuffer)||h&&$e(h.buffer,SharedArrayBuffer)))return T(h,c,u);if(typeof h=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var E=h.valueOf&&h.valueOf();if(E!=null&&E!==h)return s.from(E,c,u);var C=D(h);if(C)return C;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof h[Symbol.toPrimitive]=="function")return s.from(h[Symbol.toPrimitive]("string"),c,u);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(h))}s.from=function(h,c,u){return a(h,c,u)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(h){if(typeof h!="number")throw new TypeError('"size" argument must be of type number');if(h<0)throw new RangeError('The value "'+h+'" is invalid for option "size"')}function p(h,c,u){return l(h),h<=0?i(h):c!==void 0?typeof u=="string"?i(h).fill(c,u):i(h).fill(c):i(h)}s.alloc=function(h,c,u){return p(h,c,u)};function d(h){return l(h),i(h<0?0:P(h)|0)}s.allocUnsafe=function(h){return d(h)},s.allocUnsafeSlow=function(h){return d(h)};function f(h,c){if((typeof c!="string"||c==="")&&(c="utf8"),!s.isEncoding(c))throw new TypeError("Unknown encoding: "+c);var u=X(h,c)|0,E=i(u),C=E.write(h,c);return C!==u&&(E=E.slice(0,C)),E}function v(h){for(var c=h.length<0?0:P(h.length)|0,u=i(c),E=0;E<c;E+=1)u[E]=h[E]&255;return u}function y(h){if($e(h,Uint8Array)){var c=new Uint8Array(h);return T(c.buffer,c.byteOffset,c.byteLength)}return v(h)}function T(h,c,u){if(c<0||h.byteLength<c)throw new RangeError('"offset" is outside of buffer bounds');if(h.byteLength<c+(u||0))throw new RangeError('"length" is outside of buffer bounds');var E;return c===void 0&&u===void 0?E=new Uint8Array(h):u===void 0?E=new Uint8Array(h,c):E=new Uint8Array(h,c,u),Object.setPrototypeOf(E,s.prototype),E}function D(h){if(s.isBuffer(h)){var c=P(h.length)|0,u=i(c);return u.length===0||h.copy(u,0,0,c),u}if(h.length!==void 0)return typeof h.length!="number"||De(h.length)?i(0):v(h);if(h.type==="Buffer"&&Array.isArray(h.data))return v(h.data)}function P(h){if(h>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return h|0}function U(h){return+h!=h&&(h=0),s.alloc(+h)}s.isBuffer=function(c){return c!=null&&c._isBuffer===!0&&c!==s.prototype},s.compare=function(c,u){if($e(c,Uint8Array)&&(c=s.from(c,c.offset,c.byteLength)),$e(u,Uint8Array)&&(u=s.from(u,u.offset,u.byteLength)),!s.isBuffer(c)||!s.isBuffer(u))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===u)return 0;for(var E=c.length,C=u.length,O=0,W=Math.min(E,C);O<W;++O)if(c[O]!==u[O]){E=c[O],C=u[O];break}return E<C?-1:C<E?1:0},s.isEncoding=function(c){switch(String(c).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(c,u){if(!Array.isArray(c))throw new TypeError('"list" argument must be an Array of Buffers');if(c.length===0)return s.alloc(0);var E;if(u===void 0)for(u=0,E=0;E<c.length;++E)u+=c[E].length;var C=s.allocUnsafe(u),O=0;for(E=0;E<c.length;++E){var W=c[E];if($e(W,Uint8Array))O+W.length>C.length?s.from(W).copy(C,O):Uint8Array.prototype.set.call(C,W,O);else if(s.isBuffer(W))W.copy(C,O);else throw new TypeError('"list" argument must be an Array of Buffers');O+=W.length}return C};function X(h,c){if(s.isBuffer(h))return h.length;if(ArrayBuffer.isView(h)||$e(h,ArrayBuffer))return h.byteLength;if(typeof h!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(h));var u=h.length,E=arguments.length>2&&arguments[2]===!0;if(!E&&u===0)return 0;for(var C=!1;;)switch(c){case"ascii":case"latin1":case"binary":return u;case"utf8":case"utf-8":return bt(h).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u*2;case"hex":return u>>>1;case"base64":return He(h).length;default:if(C)return E?-1:bt(h).length;c=(""+c).toLowerCase(),C=!0}}s.byteLength=X;function B(h,c,u){var E=!1;if((c===void 0||c<0)&&(c=0),c>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,c>>>=0,u<=c))return"";for(h||(h="utf8");;)switch(h){case"hex":return V(this,c,u);case"utf8":case"utf-8":return Ge(this,c,u);case"ascii":return A(this,c,u);case"latin1":case"binary":return R(this,c,u);case"base64":return Re(this,c,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,c,u);default:if(E)throw new TypeError("Unknown encoding: "+h);h=(h+"").toLowerCase(),E=!0}}s.prototype._isBuffer=!0;function Q(h,c,u){var E=h[c];h[c]=h[u],h[u]=E}s.prototype.swap16=function(){var c=this.length;if(c%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var u=0;u<c;u+=2)Q(this,u,u+1);return this},s.prototype.swap32=function(){var c=this.length;if(c%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var u=0;u<c;u+=4)Q(this,u,u+3),Q(this,u+1,u+2);return this},s.prototype.swap64=function(){var c=this.length;if(c%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var u=0;u<c;u+=8)Q(this,u,u+7),Q(this,u+1,u+6),Q(this,u+2,u+5),Q(this,u+3,u+4);return this},s.prototype.toString=function(){var c=this.length;return c===0?"":arguments.length===0?Ge(this,0,c):B.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(c){if(!s.isBuffer(c))throw new TypeError("Argument must be a Buffer");return this===c?!0:s.compare(this,c)===0},s.prototype.inspect=function(){var c="",u=e.INSPECT_MAX_BYTES;return c=this.toString("hex",0,u).replace(/(.{2})/g,"$1 ").trim(),this.length>u&&(c+=" ... "),"<Buffer "+c+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(c,u,E,C,O){if($e(c,Uint8Array)&&(c=s.from(c,c.offset,c.byteLength)),!s.isBuffer(c))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(c));if(u===void 0&&(u=0),E===void 0&&(E=c?c.length:0),C===void 0&&(C=0),O===void 0&&(O=this.length),u<0||E>c.length||C<0||O>this.length)throw new RangeError("out of range index");if(C>=O&&u>=E)return 0;if(C>=O)return-1;if(u>=E)return 1;if(u>>>=0,E>>>=0,C>>>=0,O>>>=0,this===c)return 0;for(var W=O-C,ue=E-u,_e=Math.min(W,ue),ge=this.slice(C,O),Me=c.slice(u,E),Ue=0;Ue<_e;++Ue)if(ge[Ue]!==Me[Ue]){W=ge[Ue],ue=Me[Ue];break}return W<ue?-1:ue<W?1:0};function ve(h,c,u,E,C){if(h.length===0)return-1;if(typeof u=="string"?(E=u,u=0):u>2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,De(u)&&(u=C?0:h.length-1),u<0&&(u=h.length+u),u>=h.length){if(C)return-1;u=h.length-1}else if(u<0)if(C)u=0;else return-1;if(typeof c=="string"&&(c=s.from(c,E)),s.isBuffer(c))return c.length===0?-1:K(h,c,u,E,C);if(typeof c=="number")return c=c&255,typeof Uint8Array.prototype.indexOf=="function"?C?Uint8Array.prototype.indexOf.call(h,c,u):Uint8Array.prototype.lastIndexOf.call(h,c,u):K(h,[c],u,E,C);throw new TypeError("val must be string, number or Buffer")}function K(h,c,u,E,C){var O=1,W=h.length,ue=c.length;if(E!==void 0&&(E=String(E).toLowerCase(),E==="ucs2"||E==="ucs-2"||E==="utf16le"||E==="utf-16le")){if(h.length<2||c.length<2)return-1;O=2,W/=2,ue/=2,u/=2}function _e(mr,Jr){return O===1?mr[Jr]:mr.readUInt16BE(Jr*O)}var ge;if(C){var Me=-1;for(ge=u;ge<W;ge++)if(_e(h,ge)===_e(c,Me===-1?0:ge-Me)){if(Me===-1&&(Me=ge),ge-Me+1===ue)return Me*O}else Me!==-1&&(ge-=ge-Me),Me=-1}else for(u+ue>W&&(u=W-ue),ge=u;ge>=0;ge--){for(var Ue=!0,nt=0;nt<ue;nt++)if(_e(h,ge+nt)!==_e(c,nt)){Ue=!1;break}if(Ue)return ge}return-1}s.prototype.includes=function(c,u,E){return this.indexOf(c,u,E)!==-1},s.prototype.indexOf=function(c,u,E){return ve(this,c,u,E,!0)},s.prototype.lastIndexOf=function(c,u,E){return ve(this,c,u,E,!1)};function ce(h,c,u,E){u=Number(u)||0;var C=h.length-u;E?(E=Number(E),E>C&&(E=C)):E=C;var O=c.length;E>O/2&&(E=O/2);for(var W=0;W<E;++W){var ue=parseInt(c.substr(W*2,2),16);if(De(ue))return W;h[u+W]=ue}return W}function se(h,c,u,E){return Ae(bt(c,h.length-u),h,u,E)}function fe(h,c,u,E){return Ae(st(c),h,u,E)}function Le(h,c,u,E){return Ae(He(c),h,u,E)}function Te(h,c,u,E){return Ae(we(c,h.length-u),h,u,E)}s.prototype.write=function(c,u,E,C){if(u===void 0)C="utf8",E=this.length,u=0;else if(E===void 0&&typeof u=="string")C=u,E=this.length,u=0;else if(isFinite(u))u=u>>>0,isFinite(E)?(E=E>>>0,C===void 0&&(C="utf8")):(C=E,E=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var O=this.length-u;if((E===void 0||E>O)&&(E=O),c.length>0&&(E<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");C||(C="utf8");for(var W=!1;;)switch(C){case"hex":return ce(this,c,u,E);case"utf8":case"utf-8":return se(this,c,u,E);case"ascii":case"latin1":case"binary":return fe(this,c,u,E);case"base64":return Le(this,c,u,E);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Te(this,c,u,E);default:if(W)throw new TypeError("Unknown encoding: "+C);C=(""+C).toLowerCase(),W=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Re(h,c,u){return c===0&&u===h.length?lf.fromByteArray(h):lf.fromByteArray(h.slice(c,u))}function Ge(h,c,u){u=Math.min(h.length,u);for(var E=[],C=c;C<u;){var O=h[C],W=null,ue=O>239?4:O>223?3:O>191?2:1;if(C+ue<=u){var _e,ge,Me,Ue;switch(ue){case 1:O<128&&(W=O);break;case 2:_e=h[C+1],(_e&192)===128&&(Ue=(O&31)<<6|_e&63,Ue>127&&(W=Ue));break;case 3:_e=h[C+1],ge=h[C+2],(_e&192)===128&&(ge&192)===128&&(Ue=(O&15)<<12|(_e&63)<<6|ge&63,Ue>2047&&(Ue<55296||Ue>57343)&&(W=Ue));break;case 4:_e=h[C+1],ge=h[C+2],Me=h[C+3],(_e&192)===128&&(ge&192)===128&&(Me&192)===128&&(Ue=(O&15)<<18|(_e&63)<<12|(ge&63)<<6|Me&63,Ue>65535&&Ue<1114112&&(W=Ue))}}W===null?(W=65533,ue=1):W>65535&&(W-=65536,E.push(W>>>10&1023|55296),W=56320|W&1023),E.push(W),C+=ue}return kt(E)}var Qe=4096;function kt(h){var c=h.length;if(c<=Qe)return String.fromCharCode.apply(String,h);for(var u="",E=0;E<c;)u+=String.fromCharCode.apply(String,h.slice(E,E+=Qe));return u}function A(h,c,u){var E="";u=Math.min(h.length,u);for(var C=c;C<u;++C)E+=String.fromCharCode(h[C]&127);return E}function R(h,c,u){var E="";u=Math.min(h.length,u);for(var C=c;C<u;++C)E+=String.fromCharCode(h[C]);return E}function V(h,c,u){var E=h.length;(!c||c<0)&&(c=0),(!u||u<0||u>E)&&(u=E);for(var C="",O=c;O<u;++O)C+=Vt[h[O]];return C}function k(h,c,u){for(var E=h.slice(c,u),C="",O=0;O<E.length-1;O+=2)C+=String.fromCharCode(E[O]+E[O+1]*256);return C}s.prototype.slice=function(c,u){var E=this.length;c=~~c,u=u===void 0?E:~~u,c<0?(c+=E,c<0&&(c=0)):c>E&&(c=E),u<0?(u+=E,u<0&&(u=0)):u>E&&(u=E),u<c&&(u=c);var C=this.subarray(c,u);return Object.setPrototypeOf(C,s.prototype),C};function H(h,c,u){if(h%1!==0||h<0)throw new RangeError("offset is not uint");if(h+c>u)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(c,u,E){c=c>>>0,u=u>>>0,E||H(c,u,this.length);for(var C=this[c],O=1,W=0;++W<u&&(O*=256);)C+=this[c+W]*O;return C},s.prototype.readUintBE=s.prototype.readUIntBE=function(c,u,E){c=c>>>0,u=u>>>0,E||H(c,u,this.length);for(var C=this[c+--u],O=1;u>0&&(O*=256);)C+=this[c+--u]*O;return C},s.prototype.readUint8=s.prototype.readUInt8=function(c,u){return c=c>>>0,u||H(c,1,this.length),this[c]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(c,u){return c=c>>>0,u||H(c,2,this.length),this[c]|this[c+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(c,u){return c=c>>>0,u||H(c,2,this.length),this[c]<<8|this[c+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(c,u){return c=c>>>0,u||H(c,4,this.length),(this[c]|this[c+1]<<8|this[c+2]<<16)+this[c+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(c,u){return c=c>>>0,u||H(c,4,this.length),this[c]*16777216+(this[c+1]<<16|this[c+2]<<8|this[c+3])},s.prototype.readIntLE=function(c,u,E){c=c>>>0,u=u>>>0,E||H(c,u,this.length);for(var C=this[c],O=1,W=0;++W<u&&(O*=256);)C+=this[c+W]*O;return O*=128,C>=O&&(C-=Math.pow(2,8*u)),C},s.prototype.readIntBE=function(c,u,E){c=c>>>0,u=u>>>0,E||H(c,u,this.length);for(var C=u,O=1,W=this[c+--C];C>0&&(O*=256);)W+=this[c+--C]*O;return O*=128,W>=O&&(W-=Math.pow(2,8*u)),W},s.prototype.readInt8=function(c,u){return c=c>>>0,u||H(c,1,this.length),this[c]&128?(255-this[c]+1)*-1:this[c]},s.prototype.readInt16LE=function(c,u){c=c>>>0,u||H(c,2,this.length);var E=this[c]|this[c+1]<<8;return E&32768?E|4294901760:E},s.prototype.readInt16BE=function(c,u){c=c>>>0,u||H(c,2,this.length);var E=this[c+1]|this[c]<<8;return E&32768?E|4294901760:E},s.prototype.readInt32LE=function(c,u){return c=c>>>0,u||H(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},s.prototype.readInt32BE=function(c,u){return c=c>>>0,u||H(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},s.prototype.readFloatLE=function(c,u){return c=c>>>0,u||H(c,4,this.length),oi.read(this,c,!0,23,4)},s.prototype.readFloatBE=function(c,u){return c=c>>>0,u||H(c,4,this.length),oi.read(this,c,!1,23,4)},s.prototype.readDoubleLE=function(c,u){return c=c>>>0,u||H(c,8,this.length),oi.read(this,c,!0,52,8)},s.prototype.readDoubleBE=function(c,u){return c=c>>>0,u||H(c,8,this.length),oi.read(this,c,!1,52,8)};function ne(h,c,u,E,C,O){if(!s.isBuffer(h))throw new TypeError('"buffer" argument must be a Buffer instance');if(c>C||c<O)throw new RangeError('"value" argument is out of bounds');if(u+E>h.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(c,u,E,C){if(c=+c,u=u>>>0,E=E>>>0,!C){var O=Math.pow(2,8*E)-1;ne(this,c,u,E,O,0)}var W=1,ue=0;for(this[u]=c&255;++ue<E&&(W*=256);)this[u+ue]=c/W&255;return u+E},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(c,u,E,C){if(c=+c,u=u>>>0,E=E>>>0,!C){var O=Math.pow(2,8*E)-1;ne(this,c,u,E,O,0)}var W=E-1,ue=1;for(this[u+W]=c&255;--W>=0&&(ue*=256);)this[u+W]=c/ue&255;return u+E},s.prototype.writeUint8=s.prototype.writeUInt8=function(c,u,E){return c=+c,u=u>>>0,E||ne(this,c,u,1,255,0),this[u]=c&255,u+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(c,u,E){return c=+c,u=u>>>0,E||ne(this,c,u,2,65535,0),this[u]=c&255,this[u+1]=c>>>8,u+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(c,u,E){return c=+c,u=u>>>0,E||ne(this,c,u,2,65535,0),this[u]=c>>>8,this[u+1]=c&255,u+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(c,u,E){return c=+c,u=u>>>0,E||ne(this,c,u,4,4294967295,0),this[u+3]=c>>>24,this[u+2]=c>>>16,this[u+1]=c>>>8,this[u]=c&255,u+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(c,u,E){return c=+c,u=u>>>0,E||ne(this,c,u,4,4294967295,0),this[u]=c>>>24,this[u+1]=c>>>16,this[u+2]=c>>>8,this[u+3]=c&255,u+4},s.prototype.writeIntLE=function(c,u,E,C){if(c=+c,u=u>>>0,!C){var O=Math.pow(2,8*E-1);ne(this,c,u,E,O-1,-O)}var W=0,ue=1,_e=0;for(this[u]=c&255;++W<E&&(ue*=256);)c<0&&_e===0&&this[u+W-1]!==0&&(_e=1),this[u+W]=(c/ue>>0)-_e&255;return u+E},s.prototype.writeIntBE=function(c,u,E,C){if(c=+c,u=u>>>0,!C){var O=Math.pow(2,8*E-1);ne(this,c,u,E,O-1,-O)}var W=E-1,ue=1,_e=0;for(this[u+W]=c&255;--W>=0&&(ue*=256);)c<0&&_e===0&&this[u+W+1]!==0&&(_e=1),this[u+W]=(c/ue>>0)-_e&255;return u+E},s.prototype.writeInt8=function(c,u,E){return c=+c,u=u>>>0,E||ne(this,c,u,1,127,-128),c<0&&(c=255+c+1),this[u]=c&255,u+1},s.prototype.writeInt16LE=function(c,u,E){return c=+c,u=u>>>0,E||ne(this,c,u,2,32767,-32768),this[u]=c&255,this[u+1]=c>>>8,u+2},s.prototype.writeInt16BE=function(c,u,E){return c=+c,u=u>>>0,E||ne(this,c,u,2,32767,-32768),this[u]=c>>>8,this[u+1]=c&255,u+2},s.prototype.writeInt32LE=function(c,u,E){return c=+c,u=u>>>0,E||ne(this,c,u,4,2147483647,-2147483648),this[u]=c&255,this[u+1]=c>>>8,this[u+2]=c>>>16,this[u+3]=c>>>24,u+4},s.prototype.writeInt32BE=function(c,u,E){return c=+c,u=u>>>0,E||ne(this,c,u,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[u]=c>>>24,this[u+1]=c>>>16,this[u+2]=c>>>8,this[u+3]=c&255,u+4};function he(h,c,u,E,C,O){if(u+E>h.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function Ye(h,c,u,E,C){return c=+c,u=u>>>0,C||he(h,c,u,4),oi.write(h,c,u,E,23,4),u+4}s.prototype.writeFloatLE=function(c,u,E){return Ye(this,c,u,!0,E)},s.prototype.writeFloatBE=function(c,u,E){return Ye(this,c,u,!1,E)};function tt(h,c,u,E,C){return c=+c,u=u>>>0,C||he(h,c,u,8),oi.write(h,c,u,E,52,8),u+8}s.prototype.writeDoubleLE=function(c,u,E){return tt(this,c,u,!0,E)},s.prototype.writeDoubleBE=function(c,u,E){return tt(this,c,u,!1,E)},s.prototype.copy=function(c,u,E,C){if(!s.isBuffer(c))throw new TypeError("argument should be a Buffer");if(E||(E=0),!C&&C!==0&&(C=this.length),u>=c.length&&(u=c.length),u||(u=0),C>0&&C<E&&(C=E),C===E||c.length===0||this.length===0)return 0;if(u<0)throw new RangeError("targetStart out of bounds");if(E<0||E>=this.length)throw new RangeError("Index out of range");if(C<0)throw new RangeError("sourceEnd out of bounds");C>this.length&&(C=this.length),c.length-u<C-E&&(C=c.length-u+E);var O=C-E;return this===c&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(u,E,C):Uint8Array.prototype.set.call(c,this.subarray(E,C),u),O},s.prototype.fill=function(c,u,E,C){if(typeof c=="string"){if(typeof u=="string"?(C=u,u=0,E=this.length):typeof E=="string"&&(C=E,E=this.length),C!==void 0&&typeof C!="string")throw new TypeError("encoding must be a string");if(typeof C=="string"&&!s.isEncoding(C))throw new TypeError("Unknown encoding: "+C);if(c.length===1){var O=c.charCodeAt(0);(C==="utf8"&&O<128||C==="latin1")&&(c=O)}}else typeof c=="number"?c=c&255:typeof c=="boolean"&&(c=Number(c));if(u<0||this.length<u||this.length<E)throw new RangeError("Out of range index");if(E<=u)return this;u=u>>>0,E=E===void 0?this.length:E>>>0,c||(c=0);var W;if(typeof c=="number")for(W=u;W<E;++W)this[W]=c;else{var ue=s.isBuffer(c)?c:s.from(c,C),_e=ue.length;if(_e===0)throw new TypeError('The value "'+c+'" is invalid for argument "value"');for(W=0;W<E-u;++W)this[W+u]=ue[W%_e]}return this};var rt=/[^+/0-9A-Za-z-_]/g;function _t(h){if(h=h.split("=")[0],h=h.trim().replace(rt,""),h.length<2)return"";for(;h.length%4!==0;)h=h+"=";return h}function bt(h,c){c=c||1/0;for(var u,E=h.length,C=null,O=[],W=0;W<E;++W){if(u=h.charCodeAt(W),u>55295&&u<57344){if(!C){if(u>56319){(c-=3)>-1&&O.push(239,191,189);continue}else if(W+1===E){(c-=3)>-1&&O.push(239,191,189);continue}C=u;continue}if(u<56320){(c-=3)>-1&&O.push(239,191,189),C=u;continue}u=(C-55296<<10|u-56320)+65536}else C&&(c-=3)>-1&&O.push(239,191,189);if(C=null,u<128){if((c-=1)<0)break;O.push(u)}else if(u<2048){if((c-=2)<0)break;O.push(u>>6|192,u&63|128)}else if(u<65536){if((c-=3)<0)break;O.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((c-=4)<0)break;O.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return O}function st(h){for(var c=[],u=0;u<h.length;++u)c.push(h.charCodeAt(u)&255);return c}function we(h,c){for(var u,E,C,O=[],W=0;W<h.length&&!((c-=2)<0);++W)u=h.charCodeAt(W),E=u>>8,C=u%256,O.push(C),O.push(E);return O}function He(h){return lf.toByteArray(_t(h))}function Ae(h,c,u,E){for(var C=0;C<E&&!(C+u>=c.length||C>=h.length);++C)c[C+u]=h[C];return C}function $e(h,c){return h instanceof c||h!=null&&h.constructor!=null&&h.constructor.name!=null&&h.constructor.name===c.name}function De(h){return h!==h}var Vt=(function(){for(var h="0123456789abcdef",c=new Array(256),u=0;u<16;++u)for(var E=u*16,C=0;C<16;++C)c[E+C]=h[u]+h[C];return c})()}),xe=Ac.Buffer;Ac.SlowBuffer;Ac.INSPECT_MAX_BYTES;Ac.kMaxLength;var df=function(e,r){return df=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},df(e,r)};function Dc(t,e){df(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var io=(function(t){Dc(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),Xe=(function(t){Dc(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 Cc(t){return t&&t.Math==Math&&t}function Fg(){return Cc(typeof globalThis=="object"&&globalThis)||Cc(typeof window=="object"&&window)||Cc(typeof self=="object"&&self)||Cc(typeof global=="object"&&global)||Function("return this")()}function pS(){var t=Fg();return typeof t.navigator=="object"&&t.navigator.product==="ReactNative"}var fS=function(e){var r=pS()?"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(r);for(var n=xe.alloc(e),o=0;o<e;++o)n[o]=Math.floor(Math.random()*256);return n},mS=function(){{if(typeof window<"u"){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(xe.alloc(e))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(e){return global.crypto.getRandomValues(xe.alloc(e))}:fS}},Hg=mS();function dS(t){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(t))}function gf(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function hS(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function gS(t){return fs(t)&&Object.prototype.toString.call(t)==="[object Date]"}function fs(t){return typeof t=="object"&&t!==null}function Oc(t,e){var r=!1;function n(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return r||(console.warn(e),r=!0),t.apply(this,o)}return n}function Rc(t){if(ArrayBuffer.isView(t))return xe.from(t.buffer,t.byteOffset,t.byteLength);if(dS(t))return xe.from(t);throw new Xe("Must use either Buffer or TypedArray")}var yS=/^(?:[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,$g=function(t){return typeof t=="string"&&yS.test(t)},hf=function(t){if(!$g(t))throw new Xe('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 xe.from(e,"hex")},Sg=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")};var jk=Math.pow(2,63)-1,Gk=-Math.pow(2,63),ES=Math.pow(2,53),vS=-Math.pow(2,53);var Vg=4;var so=(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 Xe("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=xe.alloc(t.BUFFER_SIZE),this.position=0):(typeof e=="string"?this.buffer=xe.from(e,"binary"):Array.isArray(e)?this.buffer=xe.from(e):this.buffer=Rc(e),this.position=this.buffer.byteLength)}return t.prototype.put=function(e){if(typeof e=="string"&&e.length!==1)throw new Xe("only accepts single character String");if(typeof e!="number"&&e.length!==1)throw new Xe("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 Xe("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=xe.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=xe.alloc(this.buffer.length+e.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n}ArrayBuffer.isView(e)?(this.buffer.set(Rc(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 Tg(this.buffer.slice(0,this.position));throw new io('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,o;if("$binary"in e?r.legacy&&typeof e.$binary=="string"&&"$type"in e?(o=e.$type?parseInt(e.$type,16):0,n=xe.from(e.$binary,"base64")):typeof e.$binary!="string"&&(o=e.$binary.subType?parseInt(e.$binary.subType,16):0,n=xe.from(e.$binary.base64,"base64")):"$uuid"in e&&(o=4,n=hf(e.$uuid)),!n)throw new Xe("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return o===Vg?new Tg(n):new t(n,o)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},t.BSON_BINARY_SUBTYPE_DEFAULT=0,t.BUFFER_SIZE=256,t.SUBTYPE_DEFAULT=0,t.SUBTYPE_FUNCTION=1,t.SUBTYPE_BYTE_ARRAY=2,t.SUBTYPE_UUID_OLD=3,t.SUBTYPE_UUID=4,t.SUBTYPE_MD5=5,t.SUBTYPE_ENCRYPTED=6,t.SUBTYPE_COLUMN=7,t.SUBTYPE_USER_DEFINED=128,t})();Object.defineProperty(so.prototype,"_bsontype",{value:"Binary"});var uf=16,Tg=(function(t){Dc(e,t);function e(r){var n=this,o,i;if(r==null)o=e.generate();else if(r instanceof e)o=xe.from(r.buffer),i=r.__id;else if(ArrayBuffer.isView(r)&&r.byteLength===uf)o=Rc(r);else if(typeof r=="string")o=hf(r);else throw new Xe("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,o,Vg)||this,n.__id=i,n}return Object.defineProperty(e.prototype,"id",{get:function(){return this.buffer},set:function(r){this.buffer=r,e.cacheHexString&&(this.__id=Sg(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=Sg(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 so(this.id,so.SUBTYPE_UUID)},e.generate=function(){var r=Hg(uf);return r[6]=r[6]&15|64,r[8]=r[8]&63|128,xe.from(r)},e.isValid=function(r){return r?r instanceof e?!0:typeof r=="string"?$g(r):gf(r)?r.length!==uf?!1:(r[6]&240)===64&&(r[8]&128)===128:!1:!1},e.createFromHexString=function(r){var n=hf(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})(so),Nc=(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(Nc.prototype,"_bsontype",{value:"Code"});function _S(t){return fs(t)&&t.$id!=null&&typeof t.$ref=="string"&&(t.$db==null||typeof t.$db=="string")}var us=(function(){function t(e,r,n,o){if(!(this instanceof t))return new t(e,r,n,o);var i=e.split(".");i.length===2&&(n=i.shift(),e=i.shift()),this.collection=e,this.oid=r,this.db=n,this.fields=o||{}}return Object.defineProperty(t.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(e.$db=this.db),e},t.prototype.toExtendedJSON=function(e){e=e||{};var 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(us.prototype,"_bsontype",{value:"DBRef"});var sr=void 0;try{sr=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 Ig=65536,bS=1<<24,si=Ig*Ig,Wg=si*si,xg=Wg/2,Cg={},Rg={},oe=(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,o,i;return r?(e>>>=0,(i=0<=e&&e<256)&&(o=Rg[e],o)?o:(n=t.fromBits(e,(e|0)<0?-1:0,!0),i&&(Rg[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(o=Cg[e],o)?o:(n=t.fromBits(e,e<0?-1:0,!1),i&&(Cg[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>=Wg)return t.MAX_UNSIGNED_VALUE}else{if(e<=-xg)return t.MIN_VALUE;if(e+1>=xg)return t.MAX_VALUE}return e<0?t.fromNumber(-e,r).neg():t.fromBits(e%si|0,e/si|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 o;if((o=e.indexOf("-"))>0)throw Error("interior hyphen");if(o===0)return t.fromString(e.substring(1),r,n).neg();for(var i=t.fromNumber(Math.pow(n,8)),s=t.ZERO,a=0;a<e.length;a+=8){var l=Math.min(8,e.length-a),p=parseInt(e.substring(a,a+l),n);if(l<8){var d=t.fromNumber(Math.pow(n,l));s=s.mul(d).add(t.fromNumber(p))}else s=s.mul(i),s=s.add(t.fromNumber(p))}return s.unsigned=r,s},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 fs(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,o=this.low>>>16,i=this.low&65535,s=e.high>>>16,a=e.high&65535,l=e.low>>>16,p=e.low&65535,d=0,f=0,v=0,y=0;return y+=i+p,v+=y>>>16,y&=65535,v+=o+l,f+=v>>>16,v&=65535,f+=n+a,d+=f>>>16,f&=65535,d+=r+s,d&=65535,t.fromBits(v<<16|y,d<<16|f,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(sr){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var r=(this.unsigned?sr.div_u:sr.div_s)(this.low,this.high,e.low,e.high);return t.fromBits(r,sr.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?t.UZERO:t.ZERO;var n,o,i;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return t.UZERO;if(e.gt(this.shru(1)))return t.UONE;i=t.UZERO}else{if(this.eq(t.MIN_VALUE)){if(e.eq(t.ONE)||e.eq(t.NEG_ONE))return t.MIN_VALUE;if(e.eq(t.MIN_VALUE))return t.ONE;var s=this.shr(1);return n=s.div(e).shl(1),n.eq(t.ZERO)?e.isNegative()?t.ONE:t.NEG_ONE:(o=this.sub(e.mul(n)),i=n.add(o.div(e)),i)}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();i=t.ZERO}for(o=this;o.gte(e);){n=Math.max(1,Math.floor(o.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(n)/Math.LN2),l=a<=48?1:Math.pow(2,a-48),p=t.fromNumber(n),d=p.mul(e);d.isNegative()||d.gt(o);)n-=l,p=t.fromNumber(n,this.unsigned),d=p.mul(e);p.isZero()&&(p=t.ONE),i=i.add(p),o=o.sub(d)}return i},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)),sr){var r=(this.unsigned?sr.rem_u:sr.rem_s)(this.low,this.high,e.low,e.high);return t.fromBits(r,sr.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)),sr){var r=sr.mul(this.low,this.high,e.low,e.high);return t.fromBits(r,sr.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,o=this.high&65535,i=this.low>>>16,s=this.low&65535,a=e.high>>>16,l=e.high&65535,p=e.low>>>16,d=e.low&65535,f=0,v=0,y=0,T=0;return T+=s*d,y+=T>>>16,T&=65535,y+=i*d,v+=y>>>16,y&=65535,y+=s*p,v+=y>>>16,y&=65535,v+=o*d,f+=v>>>16,v&=65535,v+=i*p,f+=v>>>16,v&=65535,v+=s*l,f+=v>>>16,v&=65535,f+=n*d+o*p+i*l+s*a,f&=65535,t.fromBits(y<<16|T,f<<16|v,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)*si+(this.low>>>0):this.high*si+(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),o=n.mul(r).sub(this);return n.toString(e)+o.toInt().toString(e)}else return"-"+this.neg().toString(e);for(var i=t.fromNumber(Math.pow(e,6),this.unsigned),s=this,a="";;){var l=s.div(i),p=s.sub(l.mul(i)).toInt()>>>0,d=p.toString(e);if(s=l,s.isZero())return d+a;for(;d.length<6;)d="0"+d;a=""+d+a}},t.prototype.toUnsigned=function(){return this.unsigned?this:t.fromBits(this.low,this.high,!0)},t.prototype.xor=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low^e.low,this.high^e.high,this.unsigned)},t.prototype.eqz=function(){return this.isZero()},t.prototype.le=function(e){return this.lessThanOrEqual(e)},t.prototype.toExtendedJSON=function(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}},t.fromExtendedJSON=function(e,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(bS),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(oe.prototype,"__isLong__",{value:!0});Object.defineProperty(oe.prototype,"_bsontype",{value:"Long"});var wS=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,SS=/^(\+|-)?(Infinity|inf)$/i,TS=/^(\+|-)?NaN$/i,ls=6111,pf=-6176,Ag=6176,IS=34,ff=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Dg=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Og=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),xS=/^([-+])?(\d+)?$/,CS=31,Ng=16383,RS=30,AS=31;function Pg(t){return!isNaN(parseInt(t,10))}function DS(t){var e=oe.fromNumber(1e9),r=oe.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 oe(t.parts[n],0)),t.parts[n]=r.div(e).low,r=r.modulo(e);return{quotient:t,rem:r}}function OS(t,e){if(!t&&!e)return{high:oe.fromNumber(0),low:oe.fromNumber(0)};var r=t.shiftRightUnsigned(32),n=new oe(t.getLowBits(),0),o=e.shiftRightUnsigned(32),i=new oe(e.getLowBits(),0),s=r.multiply(o),a=r.multiply(i),l=n.multiply(o),p=n.multiply(i);return s=s.add(a.shiftRightUnsigned(32)),a=new oe(a.getLowBits(),0).add(l).add(p.shiftRightUnsigned(32)),s=s.add(a.shiftRightUnsigned(32)),p=a.shiftLeft(32).add(new oe(p.getLowBits(),0)),{high:s,low:p}}function NS(t,e){var r=t.high>>>0,n=e.high>>>0;if(r<n)return!0;if(r===n){var o=t.low>>>0,i=e.low>>>0;if(o<i)return!0}return!1}function ii(t,e){throw new Xe('"'.concat(t,'" is not a valid Decimal128 string - ').concat(e))}var yf=(function(){function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="string")this.bytes=t.fromString(e).bytes;else if(gf(e)){if(e.byteLength!==16)throw new Xe("Decimal128 must take a Buffer of 16 bytes");this.bytes=e}else throw new Xe("Decimal128 must take a Buffer or string")}return t.fromString=function(e){var r=!1,n=!1,o=!1,i=0,s=0,a=0,l=0,p=0,d=[0],f=0,v=0,y=0,T=0,D=0,P=0,U=new oe(0,0),X=new oe(0,0),B=0,Q=0;if(e.length>=7e3)throw new Xe(""+e+" not a valid Decimal128 string");var ve=e.match(wS),K=e.match(SS),ce=e.match(TS);if(!ve&&!K&&!ce||e.length===0)throw new Xe(""+e+" not a valid Decimal128 string");if(ve){var se=ve[2],fe=ve[4],Le=ve[5],Te=ve[6];fe&&Te===void 0&&ii(e,"missing exponent power"),fe&&se===void 0&&ii(e,"missing exponent base"),fe===void 0&&(Le||Te)&&ii(e,"missing e before exponent")}if((e[Q]==="+"||e[Q]==="-")&&(r=e[Q++]==="-"),!Pg(e[Q])&&e[Q]!=="."){if(e[Q]==="i"||e[Q]==="I")return new t(xe.from(r?Dg:Og));if(e[Q]==="N")return new t(xe.from(ff))}for(;Pg(e[Q])||e[Q]===".";){if(e[Q]==="."){n&&ii(e,"contains multiple periods"),n=!0,Q=Q+1;continue}f<34&&(e[Q]!=="0"||o)&&(o||(p=s),o=!0,d[v++]=parseInt(e[Q],10),f=f+1),o&&(a=a+1),n&&(l=l+1),s=s+1,Q=Q+1}if(n&&!s)throw new Xe(""+e+" not a valid Decimal128 string");if(e[Q]==="e"||e[Q]==="E"){var Re=e.substr(++Q).match(xS);if(!Re||!Re[2])return new t(xe.from(ff));D=parseInt(Re[0],10),Q=Q+Re[0].length}if(e[Q])return new t(xe.from(ff));if(y=0,!f)y=0,T=0,d[0]=0,a=1,f=1,i=0;else if(T=f-1,i=a,i!==1)for(;d[p+i-1]===0;)i=i-1;for(D<=l&&l-D>16384?D=pf:D=D-l;D>ls;){if(T=T+1,T-y>IS){var Ge=d.join("");if(Ge.match(/^0+$/)){D=ls;break}ii(e,"overflow")}D=D-1}for(;D<pf||f<a;){if(T===0&&i<f){D=pf,i=0;break}if(f<a?a=a-1:T=T-1,D<ls)D=D+1;else{var Ge=d.join("");if(Ge.match(/^0+$/)){D=ls;break}ii(e,"overflow")}}if(T-y+1<i){var Qe=s;n&&(p=p+1,Qe=Qe+1),r&&(p=p+1,Qe=Qe+1);var kt=parseInt(e[p+T+1],10),A=0;if(kt>=5&&(A=1,kt===5)){for(A=d[T]%2===1?1:0,P=p+T+2;P<Qe;P++)if(parseInt(e[P],10)){A=1;break}}if(A){for(var R=T;R>=0;R--)if(++d[R]>9&&(d[R]=0,R===0))if(D<ls)D=D+1,d[R]=1;else return new t(xe.from(r?Dg:Og))}}if(U=oe.fromNumber(0),X=oe.fromNumber(0),i===0)U=oe.fromNumber(0),X=oe.fromNumber(0);else if(T-y<17){var R=y;for(X=oe.fromNumber(d[R++]),U=new oe(0,0);R<=T;R++)X=X.multiply(oe.fromNumber(10)),X=X.add(oe.fromNumber(d[R]))}else{var R=y;for(U=oe.fromNumber(d[R++]);R<=T-17;R++)U=U.multiply(oe.fromNumber(10)),U=U.add(oe.fromNumber(d[R]));for(X=oe.fromNumber(d[R++]);R<=T;R++)X=X.multiply(oe.fromNumber(10)),X=X.add(oe.fromNumber(d[R]))}var V=OS(U,oe.fromString("100000000000000000"));V.low=V.low.add(X),NS(V.low,X)&&(V.high=V.high.add(oe.fromNumber(1))),B=D+Ag;var k={low:oe.fromNumber(0),high:oe.fromNumber(0)};V.high.shiftRightUnsigned(49).and(oe.fromNumber(1)).equals(oe.fromNumber(1))?(k.high=k.high.or(oe.fromNumber(3).shiftLeft(61)),k.high=k.high.or(oe.fromNumber(B).and(oe.fromNumber(16383).shiftLeft(47))),k.high=k.high.or(V.high.and(oe.fromNumber(0x7fffffffffff)))):(k.high=k.high.or(oe.fromNumber(B&16383).shiftLeft(49)),k.high=k.high.or(V.high.and(oe.fromNumber(562949953421311)))),k.low=V.low,r&&(k.high=k.high.or(oe.fromString("9223372036854775808")));var H=xe.alloc(16);return Q=0,H[Q++]=k.low.low&255,H[Q++]=k.low.low>>8&255,H[Q++]=k.low.low>>16&255,H[Q++]=k.low.low>>24&255,H[Q++]=k.low.high&255,H[Q++]=k.low.high>>8&255,H[Q++]=k.low.high>>16&255,H[Q++]=k.low.high>>24&255,H[Q++]=k.high.low&255,H[Q++]=k.high.low>>8&255,H[Q++]=k.high.low>>16&255,H[Q++]=k.high.low>>24&255,H[Q++]=k.high.high&255,H[Q++]=k.high.high>>8&255,H[Q++]=k.high.high>>16&255,H[Q++]=k.high.high>>24&255,new t(H)},t.prototype.toString=function(){for(var e,r=0,n=new Array(36),o=0;o<n.length;o++)n[o]=0;var i=0,s=!1,a,l={parts:[0,0,0,0]},p,d,f=[];i=0;var v=this.bytes,y=v[i++]|v[i++]<<8|v[i++]<<16|v[i++]<<24,T=v[i++]|v[i++]<<8|v[i++]<<16|v[i++]<<24,D=v[i++]|v[i++]<<8|v[i++]<<16|v[i++]<<24,P=v[i++]|v[i++]<<8|v[i++]<<16|v[i++]<<24;i=0;var U={low:new oe(y,T),high:new oe(D,P)};U.high.lessThan(oe.ZERO)&&f.push("-");var X=P>>26&CS;if(X>>3===3){if(X===RS)return f.join("")+"Infinity";if(X===AS)return"NaN";e=P>>15&Ng,a=8+(P>>14&1)}else a=P>>14&7,e=P>>17&Ng;var B=e-Ag;if(l.parts[0]=(P&16383)+((a&15)<<14),l.parts[1]=D,l.parts[2]=T,l.parts[3]=y,l.parts[0]===0&&l.parts[1]===0&&l.parts[2]===0&&l.parts[3]===0)s=!0;else for(d=3;d>=0;d--){var Q=0,ve=DS(l);if(l=ve.quotient,Q=ve.rem.low,!!Q)for(p=8;p>=0;p--)n[d*9+p]=Q%10,Q=Math.floor(Q/10)}if(s)r=1,n[i]=0;else for(r=36;!n[i];)r=r-1,i=i+1;var K=r-1+B;if(K>=34||K<=-7||B>0){if(r>34)return f.push("".concat(0)),B>0?f.push("E+".concat(B)):B<0&&f.push("E".concat(B)),f.join("");f.push("".concat(n[i++])),r=r-1,r&&f.push(".");for(var o=0;o<r;o++)f.push("".concat(n[i++]));f.push("E"),K>0?f.push("+".concat(K)):f.push("".concat(K))}else if(B>=0)for(var o=0;o<r;o++)f.push("".concat(n[i++]));else{var ce=r+B;if(ce>0)for(var o=0;o<ce;o++)f.push("".concat(n[i++]));else f.push("0");for(f.push(".");ce++<0;)f.push("0");for(var o=0;o<r-Math.max(ce-1,0);o++)f.push("".concat(n[i++]))}return f.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(yf.prototype,"_bsontype",{value:"Decimal128"});var Pc=(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(Pc.prototype,"_bsontype",{value:"Double"});var Lc=(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(Lc.prototype,"_bsontype",{value:"Int32"});var Ef=(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(Ef.prototype,"_bsontype",{value:"MaxKey"});var vf=(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(vf.prototype,"_bsontype",{value:"MinKey"});var PS=new RegExp("^[0-9a-fA-F]{24}$"),oo=null,Hr=Symbol("id"),Et=(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 Xe("Argument passed in must have an id that is of type string or Buffer");"toHexString"in e&&typeof e.toHexString=="function"?r=xe.from(e.toHexString(),"hex"):r=e.id}else r=e;if(r==null||typeof r=="number")this[Hr]=t.generate(typeof r=="number"?r:void 0);else if(ArrayBuffer.isView(r)&&r.byteLength===12)this[Hr]=r instanceof xe?r:Rc(r);else if(typeof r=="string")if(r.length===12){var n=xe.from(r);if(n.byteLength===12)this[Hr]=n;else throw new Xe("Argument passed in must be a string of 12 bytes")}else if(r.length===24&&PS.test(r))this[Hr]=xe.from(r,"hex");else throw new Xe("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new Xe("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[Hr]},set:function(e){this[Hr]=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=xe.alloc(12);return n.writeUInt32BE(e,0),oo===null&&(oo=Hg(5)),n[4]=oo[0],n[5]=oo[1],n[6]=oo[2],n[7]=oo[3],n[8]=oo[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[Hr][11]===e[Hr][11]&&this[Hr].equals(e[Hr]);if(typeof e=="string"&&t.isValid(e)&&e.length===12&&gf(this.id))return e===xe.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 xe.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=xe.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 Xe("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new t(xe.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(Et.prototype,"generate",{value:Oc(function(t){return Et.generate(t)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(Et.prototype,"getInc",{value:Oc(function(){return Et.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Et.prototype,"get_inc",{value:Oc(function(){return Et.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Et,"get_inc",{value:Oc(function(){return Et.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Et.prototype,"_bsontype",{value:"ObjectID"});function LS(t){return t.split("").sort().join("")}var ps=(function(){function t(e,r){if(!(this instanceof t))return new t(e,r);if(this.pattern=e,this.options=LS(r??""),this.pattern.indexOf("\0")!==-1)throw new io("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new io("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 io("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 Xe("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(e)))},t})();Object.defineProperty(ps.prototype,"_bsontype",{value:"BSONRegExp"});var _f=(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(_f.prototype,"_bsontype",{value:"Symbol"});var MS=oe,jg=(function(t){Dc(e,t);function e(r,n){var o=this;return o instanceof e?(oe.isLong(r)?o=t.call(this,r.low,r.high,!0)||this:fs(r)&&typeof r.t<"u"&&typeof r.i<"u"?o=t.call(this,r.i,r.t,!0)||this:o=t.call(this,r,n,!0)||this,Object.defineProperty(o,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),o):new e(r,n)}return e.prototype.toJSON=function(){return{$timestamp:this.toString()}},e.fromInt=function(r){return new e(oe.fromInt(r,!0))},e.fromNumber=function(r){return new e(oe.fromNumber(r,!0))},e.fromBits=function(r,n){return new e(r,n)},e.fromString=function(r,n){return new e(oe.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=oe.MAX_UNSIGNED_VALUE,e})(MS);function BS(t){return fs(t)&&Reflect.has(t,"_bsontype")&&typeof t._bsontype=="string"}var Gg=2147483647,zg=-2147483648,Yg=9223372036854776e3,qg=-9223372036854776e3,kS={$oid:Et,$binary:so,$uuid:so,$symbol:_f,$numberInt:Lc,$numberDecimal:yf,$numberDouble:Pc,$numberLong:oe,$minKey:vf,$maxKey:Ef,$regex:ps,$regularExpression:ps,$timestamp:jg};function Kg(t,e){if(e===void 0&&(e={}),typeof t=="number"){if(e.relaxed||e.legacy)return t;if(Math.floor(t)===t){if(t>=zg&&t<=Gg)return new Lc(t);if(t>=qg&&t<=Yg)return oe.fromNumber(t)}return new Pc(t)}if(t==null||typeof t!="object")return t;if(t.$undefined)return null;for(var r=Object.keys(t).filter(function(f){return f.startsWith("$")&&t[f]!=null}),n=0;n<r.length;n++){var o=kS[r[n]];if(o)return o.fromExtendedJSON(t,e)}if(t.$date!=null){var i=t.$date,s=new Date;return e.legacy?typeof i=="number"?s.setTime(i):typeof i=="string"&&s.setTime(Date.parse(i)):typeof i=="string"?s.setTime(Date.parse(i)):oe.isLong(i)?s.setTime(i.toNumber()):typeof i=="number"&&e.relaxed&&s.setTime(i),s}if(t.$code!=null){var a=Object.assign({},t);return t.$scope&&(a.$scope=Kg(t.$scope)),Nc.fromExtendedJSON(t)}if(_S(t)||t.$dbPointer){var l=t.$ref?t:t.$dbPointer;if(l instanceof us)return l;var p=Object.keys(l).filter(function(f){return f.startsWith("$")}),d=!0;if(p.forEach(function(f){["$ref","$id","$db"].indexOf(f)===-1&&(d=!1)}),d)return us.fromExtendedJSON(l)}return t}function US(t,e){return t.map(function(r,n){e.seenObjects.push({propertyName:"index ".concat(n),obj:null});try{return Nn(r,e)}finally{e.seenObjects.pop()}})}function Lg(t){var e=t.toISOString();return t.getUTCMilliseconds()!==0?e:e.slice(0,-5)+"Z"}function Nn(t,e){if((typeof t=="object"||typeof t=="function")&&t!==null){var r=e.seenObjects.findIndex(function(U){return U.obj===t});if(r!==-1){var n=e.seenObjects.map(function(U){return U.propertyName}),o=n.slice(0,r).map(function(U){return"".concat(U," -> ")}).join(""),i=n[r],s=" -> "+n.slice(r+1,n.length-1).map(function(U){return"".concat(U," -> ")}).join(""),a=n[n.length-1],l=" ".repeat(o.length+i.length/2),p="-".repeat(s.length+(i.length+a.length)/2-1);throw new Xe(`Converting circular structure to EJSON:
|
|
32
32
|
`+" ".concat(o).concat(i).concat(s).concat(a,`
|
|
33
33
|
`)+" ".concat(l,"\\").concat(p,"/"))}e.seenObjects[e.seenObjects.length-1].obj=t}if(Array.isArray(t))return US(t,e);if(t===void 0)return null;if(t instanceof Date||gS(t)){var d=t.getTime(),f=d>-1&&d<2534023188e5;return e.legacy?e.relaxed&&f?{$date:t.getTime()}:{$date:Lg(t)}:e.relaxed&&f?{$date:Lg(t)}:{$date:{$numberLong:t.getTime().toString()}}}if(typeof t=="number"&&(!e.relaxed||!isFinite(t))){if(Math.floor(t)===t){var v=t>=zg&&t<=Gg,y=t>=qg&&t<=Yg;if(v)return{$numberInt:t.toString()};if(y)return{$numberLong:t.toString()}}return{$numberDouble:t.toString()}}if(t instanceof RegExp||hS(t)){var T=t.flags;if(T===void 0){var D=t.toString().match(/[gimuy]*$/);D&&(T=D[0])}var P=new ps(t.source,T);return P.toExtendedJSON(e)}return t!=null&&typeof t=="object"?HS(t,e):t}var FS={Binary:function(t){return new so(t.value(),t.sub_type)},Code:function(t){return new Nc(t.code,t.scope)},DBRef:function(t){return new us(t.collection||t.namespace,t.oid,t.db,t.fields)},Decimal128:function(t){return new yf(t.bytes)},Double:function(t){return new Pc(t.value)},Int32:function(t){return new Lc(t.value)},Long:function(t){return oe.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 Ef},MinKey:function(){return new vf},ObjectID:function(t){return new Et(t)},ObjectId:function(t){return new Et(t)},BSONRegExp:function(t){return new ps(t.pattern,t.options)},Symbol:function(t){return new _f(t.value)},Timestamp:function(t){return jg.fromBits(t.low,t.high)}};function HS(t,e){if(t==null||typeof t!="object")throw new io("not an object instance");var r=t._bsontype;if(typeof r>"u"){var n={};for(var o in t){e.seenObjects.push({propertyName:o,obj:null});try{var i=Nn(t[o],e);o==="__proto__"?Object.defineProperty(n,o,{value:i,writable:!0,enumerable:!0,configurable:!0}):n[o]=i}finally{e.seenObjects.pop()}}return n}else if(BS(t)){var s=t;if(typeof s.toExtendedJSON!="function"){var a=FS[t._bsontype];if(!a)throw new Xe("Unrecognized or invalid _bsontype: "+t._bsontype);s=a(s)}return r==="Code"&&s.scope?s=new Nc(s.code,Nn(s.scope,e)):r==="DBRef"&&s.oid&&(s=new us(Nn(s.collection,e),Nn(s.oid,e),Nn(s.db,e),Nn(s.fields,e))),s.toExtendedJSON(e)}else throw new io("_bsontype must be a string, but was: "+typeof r)}var Mg;(function(t){function e(i,s){var a=Object.assign({},{relaxed:!0,legacy:!1},s);return typeof a.relaxed=="boolean"&&(a.strict=!a.relaxed),typeof a.strict=="boolean"&&(a.relaxed=!a.strict),JSON.parse(i,function(l,p){if(l.indexOf("\0")!==-1)throw new io("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(l)));return Kg(p,a)})}t.parse=e;function r(i,s,a,l){a!=null&&typeof a=="object"&&(l=a,a=0),s!=null&&typeof s=="object"&&!Array.isArray(s)&&(l=s,s=void 0,a=0);var p=Object.assign({relaxed:!0,legacy:!1},l,{seenObjects:[{propertyName:"(root)",obj:null}]}),d=Nn(i,p);return JSON.stringify(d,s,a)}t.stringify=r;function n(i,s){return s=s||{},JSON.parse(r(i,s))}t.serialize=n;function o(i,s){return s=s||{},e(JSON.stringify(i),s)}t.deserialize=o})(Mg||(Mg={}));var Bg,kg=Fg();kg.Map?Bg=kg.Map:Bg=(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],o=n[0],i=n[1];this._keys.push(o),this._values[o]={v:i,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 o=this._keys[n];e.call(r,this._values[o].v,o,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 zk=oe.fromNumber(ES),Yk=oe.fromNumber(vS);var mf=new Uint8Array(8),qk=new DataView(mf.buffer,mf.byteOffset,mf.byteLength);var $S=1024*1024*17,Kk=xe.alloc($S);var Pn=class{triggerID;nudgeID;engagementID;contentID;shortID;contentType;variation;props;objective;onsiteDeliveryType;holdout;constructor(e){e=e||{},this.triggerID=e.id||e.triggerID,this.nudgeID=e.nudgeID,this.shortID=e.shortID,this.contentType=e.contentType,this.engagementID=e.engagementID,this.contentID=e.contentID,this.variation=e.variation,this.props=e.props,this.objective=e.objective,this.onsiteDeliveryType=e.onsiteDeliveryType,this.holdout=e.holdout}};var Se=class{constructor(e,r={},n,o){this.name=e;this.properties=r;this.id=o?new Et(o):new Et,this.occurred=new Date,n&&(this.trigger=new Pn(n)),this.newEvent=!o}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale;setVideos(e){e&&(this.videos=[e.id])}};var Xg=0;function Jg(t,e){if(!t)return;let r=document.createElement("script");r.id=e??"",r.src=t,r.type="module",document.head.appendChild(r)}function bf(t=document.head){return Qg(Wt.styleURL,t,"cooee-global-styles")}function VS(t=document.head){return Qg(Wt.swiperStyleURL,t,"cooee-swiper-styles")}function Qg(t,e=document.head,r){return new Promise(n=>{if(e.querySelector(`#${r}`)){n();return}let i=document.createElement("link");i.rel="stylesheet",i.href=t,i.id=r,i.onload=()=>{n()},i.onerror=()=>{console.error("Failed to load stylesheet:",t),n()},e.appendChild(i)})}function wf(t,e=document.head){if(!t)return;Xg++;let r=document.createElement("style");r.id=`cooee-app-css-${Xg}`,r.textContent=t,e.appendChild(r)}function Zg(t){if(!t)return;let e=document.createElement("script");e.id="cooee-app-script",e.innerHTML=t,document.head.appendChild(e)}function Sf(t){if(t)try{(0,eval)(t)}catch(e){console.error("Failed to execute script:",e)}}async function Mc(){let t=(await import("./swiper-bundle-WHJS64TU.js")).default;return window.CooeeSDK.Swiper=t}async function Tf(t,e=!0){if(!t)return;let r=[];e&&r.push(VS(t)),r.push(bf(t)),await Promise.all(r);let n=qe.get().website.commonCSS;wf(n,t)}var Bc=class{lastWidth;lastHeight;resizeTimeout=null;debounceDelay=200;onResizeCallback;constructor(e){this.onResizeCallback=e,this.lastWidth=window.innerWidth,this.lastHeight=window.innerHeight,window.addEventListener("resize",this.debouncedResize),window.addEventListener("orientationchange",this.handleImmediateResize)}destroy(){window.removeEventListener("resize",this.debouncedResize),window.removeEventListener("orientationchange",this.handleImmediateResize)}handleImmediateResize=()=>{this.triggerResize()};debouncedResize=()=>{this.resizeTimeout!==null&&clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(()=>{this.triggerResize()},this.debounceDelay)};triggerResize(){let e=window.innerWidth,r=window.innerHeight;(r!==this.lastHeight||e!==this.lastWidth)&&(this.onResizeCallback(),this.lastWidth=e,this.lastHeight=r)}};var WS="2.0.4",Bf=500,ey="user-agent",pi="",ty="?",Vc="function",Bn="undefined",fi="object",kf="string",Ft="browser",pn="cpu",jr="device",Sr="engine",cr="os",li="result",$="name",N="type",F="vendor",j="version",Ht="architecture",ws="major",M="model",_s="console",le="mobile",Be="tablet",it="smarttv",Vr="wearable",kc="xr",bs="embedded",ms="inapp",Hf="brands",co="formFactors",$f="fullVersionList",ui="platform",Vf="platformVersion",Gc="bitness",kn="sec-ch-ua",jS=kn+"-full-version-list",GS=kn+"-arch",zS=kn+"-"+Gc,YS=kn+"-form-factors",qS=kn+"-"+le,KS=kn+"-"+M,hy=kn+"-"+ui,XS=hy+"-version",gy=[Hf,$f,le,M,ui,Vf,Ht,co,Gc],Uc="Amazon",ai="Apple",ry="ASUS",ny="BlackBerry",ao="Google",oy="Huawei",If="Lenovo",iy="Honor",Fc="LG",xf="Microsoft",Cf="Motorola",Rf="Nvidia",sy="OnePlus",Af="OPPO",ds="Samsung",ay="Sharp",hs="Sony",Df="Xiaomi",Of="Zebra",cy="Chrome",ly="Chromium",Ln="Chromecast",$c="Edge",gs="Firefox",ys="Opera",Nf="Facebook",uy="Sogou",ci="Mobile ",Es=" Browser",Uf="Windows",JS=typeof window!==Bn,$t=JS&&window.navigator?window.navigator:void 0,Mn=$t&&$t.userAgentData?$t.userAgentData:void 0,QS=function(t,e){var r={},n=e;if(!Wc(e)){n={};for(var o in e)for(var i in e[o])n[i]=e[o][i].concat(n[i]?n[i]:[])}for(var s in t)r[s]=n[s]&&n[s].length%2===0?n[s].concat(t[s]):t[s];return r},zc=function(t){for(var e={},r=0;r<t.length;r++)e[t[r].toUpperCase()]=t[r];return e},Ff=function(t,e){if(typeof t===fi&&t.length>0){for(var r in t)if(fn(e)==fn(t[r]))return!0;return!1}return di(t)?fn(e)==fn(t):!1},Wc=function(t,e){for(var r in t)return/^(browser|cpu|device|engine|os)$/.test(r)||(e?Wc(t[r]):!1)},di=function(t){return typeof t===kf},Pf=function(t){if(t){for(var e=[],r=mi(/\\?\"/g,t).split(","),n=0;n<r.length;n++)if(r[n].indexOf(";")>-1){var o=jc(r[n]).split(";v=");e[n]={brand:o[0],version:o[1]}}else e[n]=jc(r[n]);return e}},fn=function(t){return di(t)?t.toLowerCase():t},Lf=function(t){return di(t)?mi(/[^\d\.]/g,t).split(".")[0]:void 0},mn=function(t){for(var e in t){var r=t[e];typeof r==fi&&r.length==2?this[r[0]]=r[1]:this[r]=void 0}return this},mi=function(t,e){return di(e)?e.replace(t,pi):e},vs=function(t){return mi(/\\?\"/g,t)},jc=function(t,e){if(di(t))return t=mi(/^\s\s*/,t),typeof e===Bn?t:t.substring(0,Bf)},Mf=function(t,e){if(!(!t||!e))for(var r=0,n,o,i,s,a,l;r<e.length&&!a;){var p=e[r],d=e[r+1];for(n=o=0;n<p.length&&!a&&p[n];)if(a=p[n++].exec(t),a)for(i=0;i<d.length;i++)l=a[++o],s=d[i],typeof s===fi&&s.length>0?s.length===2?typeof s[1]==Vc?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:s.length>=3&&(typeof s[1]===Vc&&!(s[1].exec&&s[1].test)?s.length>3?this[s[0]]=l?s[1].apply(this,s.slice(2)):void 0:this[s[0]]=l?s[1].call(this,l,s[2]):void 0:s.length==3?this[s[0]]=l?l.replace(s[1],s[2]):void 0:s.length==4?this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):void 0:s.length>4&&(this[s[0]]=l?s[3].apply(this,[l.replace(s[1],s[2])].concat(s.slice(4))):void 0)):this[s]=l||void 0;r+=2}},Wr=function(t,e){for(var r in e)if(typeof e[r]===fi&&e[r].length>0){for(var n=0;n<e[r].length;n++)if(Ff(e[r][n],t))return r===ty?void 0:r}else if(Ff(e[r],t))return r===ty?void 0:r;return e.hasOwnProperty("*")?e["*"]:t},py={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:""},fy={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},ZS={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"},my={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[j,[$,ci+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[j,[$,$c+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[j,[$,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[$,j],[/opios[\/ ]+([\w\.]+)/i],[j,[$,ys+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[j,[$,ys+" GX"]],[/\bopr\/([\w\.]+)/i],[j,[$,ys]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[j,[$,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[j,[$,"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],[$,j],[/quark(?:pc)?\/([-\w\.]+)/i],[j,[$,"Quark"]],[/\bddg\/([\w\.]+)/i],[j,[$,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[j,[$,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[j,[$,"WeChat"]],[/konqueror\/([\w\.]+)/i],[j,[$,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[j,[$,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[j,[$,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[j,[$,"Smart "+If+Es]],[/(avast|avg)\/([\w\.]+)/i],[[$,/(.+)/,"$1 Secure"+Es],j],[/\bfocus\/([\w\.]+)/i],[j,[$,gs+" Focus"]],[/\bopt\/([\w\.]+)/i],[j,[$,ys+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[j,[$,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[j,[$,"Dolphin"]],[/coast\/([\w\.]+)/i],[j,[$,ys+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[j,[$,"MIUI"+Es]],[/fxios\/([\w\.-]+)/i],[j,[$,ci+gs]],[/\bqihoobrowser\/?([\w\.]*)/i],[j,[$,"360"]],[/\b(qq)\/([\w\.]+)/i],[[$,/(.+)/,"$1Browser"],j],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[$,/(.+)/,"$1"+Es],j],[/samsungbrowser\/([\w\.]+)/i],[j,[$,ds+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[j,[$,uy+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[$,uy+" Mobile"],j],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[$,j],[/(lbbrowser|rekonq)/i],[$],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[j,$],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[$,Nf],j,[N,ms]],[/(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],[$,j,[N,ms]],[/\bgsa\/([\w\.]+) .*safari\//i],[j,[$,"GSA"],[N,ms]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[j,[$,"TikTok"],[N,ms]],[/\[(linkedin)app\]/i],[$,[N,ms]],[/(chromium)[\/ ]([-\w\.]+)/i],[$,j],[/headlesschrome(?:\/([\w\.]+)| )/i],[j,[$,cy+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[j,[$,$c+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[$,cy+" WebView"],j],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[j,[$,"Android"+Es]],[/chrome\/([\w\.]+) mobile/i],[j,[$,ci+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[$,j],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[j,[$,ci+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[$,ci+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[j,$],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[$,[j,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[$,j],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[$,ci+gs],j],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[$,"Netscape"],j],[/(wolvic|librewolf)\/([\w\.]+)/i],[$,j],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[j,[$,gs+" 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],[$,[j,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[$,[j,/[^\d\.]+./,pi]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[Ht,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[Ht,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[Ht,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[Ht,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[Ht,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[Ht,/ower/,pi,fn]],[/ sun4\w[;\)]/i],[[Ht,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[Ht,fn]]],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],[M,[F,ds],[N,Be]],[/\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],[M,[F,ds],[N,le]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[M,[F,ai],[N,le]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[M,[F,ai],[N,Be]],[/(macintosh);/i],[M,[F,ai]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[M,[F,ay],[N,le]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[M,[F,iy],[N,Be]],[/honor([-\w ]+)[;\)]/i],[M,[F,iy],[N,le]],[/\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],[M,[F,oy],[N,Be]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[M,[F,oy],[N,le]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[M,/_/g," "],[F,Df],[N,Be]],[/\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],[[M,/_/g," "],[F,Df],[N,le]],[/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],[M,[F,sy],[N,le]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[M,[F,Af],[N,le]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[M,[F,Wr,{OnePlus:["203","304","403","404","413","415"],"*":Af}],[N,Be]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[M,[F,"BLU"],[N,le]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[M,[F,"Vivo"],[N,le]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[M,[F,"Realme"],[N,le]],[/(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],[M,[F,If],[N,Be]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[M,[F,If],[N,le]],[/\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],[M,[F,Cf],[N,le]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[M,[F,Cf],[N,Be]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[M,[F,Fc],[N,Be]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[M,[F,Fc],[N,le]],[/(nokia) (t[12][01])/i],[F,M,[N,Be]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[M,/_/g," "],[N,le],[F,"Nokia"]],[/(pixel (c|tablet))\b/i],[M,[F,ao],[N,Be]],[/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],[M,[F,ao],[N,le]],[/(google) (pixelbook( go)?)/i],[F,M],[/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],[M,[F,hs],[N,le]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[M,"Xperia Tablet"],[F,hs],[N,Be]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[M,[F,Uc],[N,Be]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[M,/(.+)/g,"Fire Phone $1"],[F,Uc],[N,le]],[/(playbook);[-\w\),; ]+(rim)/i],[M,F,[N,Be]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[M,[F,ny],[N,le]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[M,[F,ry],[N,Be]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[M,[F,ry],[N,le]],[/(nexus 9)/i],[M,[F,"HTC"],[N,Be]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[F,[M,/_/g," "],[N,le]],[/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],[M,[F,"TCL"],[N,Be]],[/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],[M,[F,"TCL"],[N,le]],[/(itel) ((\w+))/i],[[F,fn],M,[N,Wr,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[M,[F,"Acer"],[N,Be]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[M,[F,"Meizu"],[N,le]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[M,[F,"Ulefone"],[N,le]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[M,[F,"Energizer"],[N,le]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[M,[F,"Cat"],[N,le]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[M,[F,"Smartfren"],[N,le]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[M,[F,"Nothing"],[N,le]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[M,[F,"Archos"],[N,Be]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[M,[F,"Archos"],[N,le]],[/; (n159v)/i],[M,[F,"HMD"],[N,le]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[F,M,[N,Be]],[/(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],[F,M,[N,le]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[F,M,[N,Be]],[/(surface duo)/i],[M,[F,xf],[N,Be]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[M,[F,"Fairphone"],[N,le]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[M,[F,Rf],[N,Be]],[/(sprint) (\w+)/i],[F,M,[N,le]],[/(kin\.[onetw]{3})/i],[[M,/\./g," "],[F,xf],[N,le]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[M,[F,Of],[N,Be]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[M,[F,Of],[N,le]],[/smart-tv.+(samsung)/i],[F,[N,it]],[/hbbtv.+maple;(\d+)/i],[[M,/^/,"SmartTV"],[F,ds],[N,it]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[F,M,[N,it]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[F,Fc],[N,it]],[/(apple) ?tv/i],[F,[M,ai+" TV"],[N,it]],[/crkey.*devicetype\/chromecast/i],[[M,Ln+" Third Generation"],[F,ao],[N,it]],[/crkey.*devicetype\/([^/]*)/i],[[M,/^/,"Chromecast "],[F,ao],[N,it]],[/fuchsia.*crkey/i],[[M,Ln+" Nest Hub"],[F,ao],[N,it]],[/crkey/i],[[M,Ln],[F,ao],[N,it]],[/(portaltv)/i],[M,[F,Nf],[N,it]],[/droid.+aft(\w+)( bui|\))/i],[M,[F,Uc],[N,it]],[/(shield \w+ tv)/i],[M,[F,Rf],[N,it]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[M,[F,ay],[N,it]],[/(bravia[\w ]+)( bui|\))/i],[M,[F,hs],[N,it]],[/(mi(tv|box)-?\w+) bui/i],[M,[F,Df],[N,it]],[/Hbbtv.*(technisat) (.*);/i],[F,M,[N,it]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[F,/.+\/(\w+)/,"$1",Wr,{LG:"lge"}],[M,jc],[N,it]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[M,[N,it]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:|large screen[\w ]+safari)\b/i],[[N,it]],[/(playstation \w+)/i],[M,[F,hs],[N,_s]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[M,[F,xf],[N,_s]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[F,M,[N,_s]],[/droid.+; (shield)( bui|\))/i],[M,[F,Rf],[N,_s]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[M,[F,ds],[N,Vr]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[F,M,[N,Vr]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[M,[F,Af],[N,Vr]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[M,[F,ai],[N,Vr]],[/(opwwe\d{3})/i],[M,[F,sy],[N,Vr]],[/(moto 360)/i],[M,[F,Cf],[N,Vr]],[/(smartwatch 3)/i],[M,[F,hs],[N,Vr]],[/(g watch r)/i],[M,[F,Fc],[N,Vr]],[/droid.+; (wt63?0{2,3})\)/i],[M,[F,Of],[N,Vr]],[/droid.+; (glass) \d/i],[M,[F,ao],[N,kc]],[/(pico) (4|neo3(?: link|pro)?)/i],[F,M,[N,kc]],[/(quest( \d| pro)?s?).+vr/i],[M,[F,Nf],[N,kc]],[/mobile vr; rv.+firefox/i],[[N,kc]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[F,[N,bs]],[/(aeobc)\b/i],[M,[F,Uc],[N,bs]],[/(homepod).+mac os/i],[M,[F,ai],[N,bs]],[/windows iot/i],[[N,bs]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[M,[N,Wr,{mobile:"Mobile",xr:"VR","*":Be}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[N,Be]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[N,le]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[M,[F,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[j,[$,$c+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[$,j],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[j,[$,"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],[$,j],[/ladybird\//i],[[$,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[j,$]],os:[[/(windows nt) (6\.[23]); arm/i],[[$,/N/,"R"],[j,Wr,py]],[/(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],[$,j],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[j,/(;|\))/g,"",Wr,py],[$,Uf]],[/(windows ce)\/?([\d\.]*)/i],[$,j],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[j,/_/g,"."],[$,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[$,"macOS"],[j,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[j,[$,Ln+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[j,[$,Ln+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[j,[$,Ln+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[j,[$,Ln+" Linux"]],[/crkey\/([\d\.]+)/i],[j,[$,Ln]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[j,$],[/(ubuntu) ([\w\.]+) like android/i],[[$,/(.+)/,"$1 Touch"],j],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[$,j],[/\(bb(10);/i],[j,[$,ny]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[j,[$,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[j,[$,gs+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[j,[$,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[j,Wr,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[$,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[j,[$,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[$,"Chrome OS"],j],[/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],[$,j],[/(sunos) ?([\d\.]*)/i],[[$,"Solaris"],j],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[$,j]]},Hc=(function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return mn.call(t.init,[[Ft,[$,j,ws,N]],[pn,[Ht]],[jr,[N,M,F]],[Sr,[$,j]],[cr,[$,j]]]),mn.call(t.isIgnore,[[Ft,[j,ws]],[Sr,[j]],[cr,[j]]]),mn.call(t.isIgnoreRgx,[[Ft,/ ?browser$/i],[cr,/ ?os$/i]]),mn.call(t.toString,[[Ft,[$,j]],[pn,[Ht]],[jr,[F,M]],[Sr,[$,j]],[cr,[$,j]]]),t})(),e0=function(t,e){var r=Hc.init[e],n=Hc.isIgnore[e]||0,o=Hc.isIgnoreRgx[e]||0,i=Hc.toString[e]||0;function s(){mn.call(this,r)}return s.prototype.getItem=function(){return t},s.prototype.withClientHints=function(){return Mn?Mn.getHighEntropyValues(gy).then(function(a){return t.setCH(new yy(a,!1)).parseCH().get()}):t.parseCH().get()},s.prototype.withFeatureCheck=function(){return t.detectFeature().get()},e!=li&&(s.prototype.is=function(a){var l=!1;for(var p in this)if(this.hasOwnProperty(p)&&!Ff(n,p)&&fn(o?mi(o,this[p]):this[p])==fn(o?mi(o,a):a)){if(l=!0,a!=Bn)break}else if(a==Bn&&l){l=!l;break}return l},s.prototype.toString=function(){var a=pi;for(var l in i)typeof this[i[l]]!==Bn&&(a+=(a?" ":pi)+this[i[l]]);return a||Bn}),Mn||(s.prototype.then=function(a){var l=this,p=function(){for(var f in l)l.hasOwnProperty(f)&&(this[f]=l[f])};p.prototype={is:s.prototype.is,toString:s.prototype.toString};var d=new p;return a(d),d}),new s};function yy(t,e){if(t=t||{},mn.call(this,gy),e)mn.call(this,[[Hf,Pf(t[kn])],[$f,Pf(t[jS])],[le,/\?1/.test(t[qS])],[M,vs(t[KS])],[ui,vs(t[hy])],[Vf,vs(t[XS])],[Ht,vs(t[GS])],[co,Pf(t[YS])],[Gc,vs(t[zS])]]);else for(var r in t)this.hasOwnProperty(r)&&typeof t[r]!==Bn&&(this[r]=t[r])}function dy(t,e,r,n){return this.get=function(o){return o?this.data.hasOwnProperty(o)?this.data[o]:void 0:this.data},this.set=function(o,i){return this.data[o]=i,this},this.setCH=function(o){return this.uaCH=o,this},this.detectFeature=function(){if($t&&$t.userAgent==this.ua)switch(this.itemType){case Ft:$t.brave&&typeof $t.brave.isBrave==Vc&&this.set($,"Brave");break;case jr:!this.get(N)&&Mn&&Mn[le]&&this.set(N,le),this.get(M)=="Macintosh"&&$t&&typeof $t.standalone!==Bn&&$t.maxTouchPoints&&$t.maxTouchPoints>2&&this.set(M,"iPad").set(N,Be);break;case cr:!this.get($)&&Mn&&Mn[ui]&&this.set($,Mn[ui]);break;case li:var o=this.data,i=function(s){return o[s].getItem().detectFeature().get()};this.set(Ft,i(Ft)).set(pn,i(pn)).set(jr,i(jr)).set(Sr,i(Sr)).set(cr,i(cr))}return this},this.parseUA=function(){return this.itemType!=li&&Mf.call(this.data,this.ua,this.rgxMap),this.itemType==Ft&&this.set(ws,Lf(this.get(j))),this},this.parseCH=function(){var o=this.uaCH,i=this.rgxMap;switch(this.itemType){case Ft:case Sr:var s=o[$f]||o[Hf],a;if(s)for(var l in s){var p=s[l].brand||s[l],d=s[l].version;this.itemType==Ft&&!/not.a.brand/i.test(p)&&(!a||/Chrom/.test(a)&&p!=ly||a==$c&&/WebView2/.test(p))&&(p=Wr(p,ZS),a=this.get($),a&&!/Chrom/.test(a)&&/Chrom/.test(p)||this.set($,p).set(j,d).set(ws,Lf(d)),a=p),this.itemType==Sr&&p==ly&&this.set(j,d)}break;case pn:var f=o[Ht];f&&(f&&o[Gc]=="64"&&(f+="64"),Mf.call(this.data,f+";",i));break;case jr:if(o[le]&&this.set(N,le),o[M]&&(this.set(M,o[M]),!this.get(N)||!this.get(F))){var v={};Mf.call(v,"droid 9; "+o[M]+")",i),!this.get(N)&&v.type&&this.set(N,v.type),!this.get(F)&&v.vendor&&this.set(F,v.vendor)}if(o[co]){var y;if(typeof o[co]!="string")for(var T=0;!y&&T<o[co].length;)y=Wr(o[co][T++],fy);else y=Wr(o[co],fy);this.set(N,y)}break;case cr:var D=o[ui];if(D){var P=o[Vf];D==Uf&&(P=parseInt(Lf(P),10)>=13?"11":"10"),this.set($,D).set(j,P)}this.get($)==Uf&&o[M]=="Xbox"&&this.set($,"Xbox").set(j,void 0);break;case li:var U=this.data,X=function(B){return U[B].getItem().setCH(o).parseCH().get()};this.set(Ft,X(Ft)).set(pn,X(pn)).set(jr,X(jr)).set(Sr,X(Sr)).set(cr,X(cr))}return this},mn.call(this,[["itemType",t],["ua",e],["uaCH",n],["rgxMap",r],["data",e0(this,t)]]),this}function Tr(t,e,r){if(typeof t===fi?(Wc(t,!0)?(typeof e===fi&&(r=e),e=t):(r=t,e=void 0),t=void 0):typeof t===kf&&!Wc(e,!0)&&(r=e,e=void 0),r&&typeof r.append===Vc){var n={};r.forEach(function(l,p){n[p]=l}),r=n}if(!(this instanceof Tr))return new Tr(t,e,r).getResult();var o=typeof t===kf?t:r&&r[ey]?r[ey]:$t&&$t.userAgent?$t.userAgent:pi,i=new yy(r,!0),s=e?QS(my,e):my,a=function(l){return l==li?function(){return new dy(l,o,s,i).set("ua",o).set(Ft,this.getBrowser()).set(pn,this.getCPU()).set(jr,this.getDevice()).set(Sr,this.getEngine()).set(cr,this.getOS()).get()}:function(){return new dy(l,o,s[l],i).parseUA().get()}};return mn.call(this,[["getBrowser",a(Ft)],["getCPU",a(pn)],["getDevice",a(jr)],["getEngine",a(Sr)],["getOS",a(cr)],["getResult",a(li)],["getUA",function(){return o}],["setUA",function(l){return di(l)&&(o=l.length>Bf?jc(l,Bf):l),this}]]).setUA(o),this}Tr.VERSION=WS;Tr.BROWSER=zc([$,j,ws,N]);Tr.CPU=zc([Ht]);Tr.DEVICE=zc([M,F,N,_s,le,it,Be,Vr,bs]);Tr.ENGINE=Tr.OS=zc([$,j]);function Yc(){let t=ye();return Z(_({},t.customContext),{page:Qs(),locale:t.locale,currentItem:t.currentItem,previewIDs:t.previewIDs,previewVariant:t.previewVariant,engagementIDs:t0(),cart:rf()})}function t0(){let t=document.querySelectorAll(".letscooee-engagement"),e=[];return t.forEach(r=>{let n=r.dataset.engagementId;n&&+n&&e.push(n)}),e}function de(t){return typeof t=="function"}function hi(t){let r=t(n=>{Error.call(n),n.stack=new Error().stack});return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var qc=hi(t=>function(r){t(this),this.message=r?`${r.length} errors occurred during unsubscription:
|
|
34
34
|
${r.map((n,o)=>`${o+1}) ${n.toString()}`).join(`
|