@letscooee/web-sdk 13.1.3 → 13.1.4
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-HZQME353.js → chunk-DW2ZR6PP.js} +1 -1
- package/dist/chunk-PWK7G4X5.js +24 -0
- package/dist/{chunk-UGPL2NMF.js → chunk-VXM7BEHN.js} +1 -1
- package/dist/{chunk-FE5VYO2C.js → chunk-WEQ5X6SZ.js} +1 -1
- package/dist/{debug-logs-BU65RSYO.js → debug-logs-DR46MP5N.js} +1 -1
- package/dist/main.min.js +20 -20
- package/dist/{share-dialog.component-SVORYMIG.js → share-dialog.component-2CWK5QNR.js} +1 -1
- package/dist/{video-detail-dialog.component-2HBYKRGD.js → video-detail-dialog.component-4EBLIDP7.js} +1 -1
- package/dist/widget.min.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-OAZIKL6G.js +0 -24
package/dist/chunk-OAZIKL6G.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import{a as ta,b as Kt,c as Ce,e as Cn,f as nr,g as na,h as ra,l as Xt}from"./chunk-UGPL2NMF.js";import{a as rr}from"./chunk-T6RU7RSX.js";import{$ as vi,$a as Lt,Aa as Gs,Ba as be,Ca as $s,D as Ot,Da as L,E as ct,Ea as js,Fa as Ws,I as Rt,Ja as zs,K as Mt,Ka as Ys,L as St,La as _e,Na as Sn,O as D,Oa as Qn,Pa as Zn,Qa as ne,Ra as lt,Sa as Pt,Wa as Be,X as Se,Xa as He,Y as _i,Ya as Ie,Za as qs,_ as Vs,_a as er,ab as tr,b as Rs,ba as Ue,bb as Ks,ca as En,cb as Ge,db as $e,fb as It,ga as Fs,ha as qt,hb as dt,ia as X,ib as ft,ja as J,jb as Ke,ka as ks,kb as he,lb as Xs,ma as bt,mb as bn,na as Ct,o as Ms,oa as $,pa as P,q as Ps,qa as U,ra as te,s as hi,sa as qe,sb as Js,t as gi,ta as ut,tb as Qs,u as Ls,ua as Jn,ub as Zs,v as ae,va as Us,wa as Bs,wb as ea,x as ye,xa as ge,y as Ee,ya as Hs,za as Le}from"./chunk-K77Q3IPF.js";import{a as _,b as k,c as yn,d as Os,e as jl,f as Wl,g as Xn}from"./chunk-V7UGKYBN.js";var da=jl((la,Ei)=>{"use strict";(function(e){if(typeof la=="object"&&typeof Ei<"u")Ei.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var t;typeof window<"u"?t=window:typeof global<"u"?t=global:typeof self<"u"?t=self:t=this,t.localforage=e()}})(function(){var e,t,n;return(function r(i,o,s){function c(y,f){if(!o[y]){if(!i[y]){var E=typeof yn=="function"&&yn;if(!f&&E)return E(y,!0);if(l)return l(y,!0);var v=new Error("Cannot find module '"+y+"'");throw v.code="MODULE_NOT_FOUND",v}var N=o[y]={exports:{}};i[y][0].call(N.exports,function(G){var M=i[y][1][G];return c(M||G)},N,N.exports,r,i,o,s)}return o[y].exports}for(var l=typeof yn=="function"&&yn,h=0;h<s.length;h++)c(s[h]);return c})({1:[function(r,i,o){(function(s){"use strict";var c=s.MutationObserver||s.WebKitMutationObserver,l;if(c){var h=0,y=new c(G),f=s.document.createTextNode("");y.observe(f,{characterData:!0}),l=function(){f.data=h=++h%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var E=new s.MessageChannel;E.port1.onmessage=G,l=function(){E.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?l=function(){var O=s.document.createElement("script");O.onreadystatechange=function(){G(),O.onreadystatechange=null,O.parentNode.removeChild(O),O=null},s.document.documentElement.appendChild(O)}:l=function(){setTimeout(G,0)};var v,N=[];function G(){v=!0;for(var O,B,Z=N.length;Z;){for(B=N,N=[],O=-1;++O<Z;)B[O]();Z=N.length}v=!1}i.exports=M;function M(O){N.push(O)===1&&!v&&l()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(r,i,o){"use strict";var s=r(1);function c(){}var l={},h=["REJECTED"],y=["FULFILLED"],f=["PENDING"];i.exports=E;function E(x){if(typeof x!="function")throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,x!==c&&M(this,x)}E.prototype.catch=function(x){return this.then(null,x)},E.prototype.then=function(x,j){if(typeof x!="function"&&this.state===y||typeof j!="function"&&this.state===h)return this;var F=new this.constructor(c);if(this.state!==f){var W=this.state===y?x:j;N(F,W,this.outcome)}else this.queue.push(new v(F,x,j));return F};function v(x,j,F){this.promise=x,typeof j=="function"&&(this.onFulfilled=j,this.callFulfilled=this.otherCallFulfilled),typeof F=="function"&&(this.onRejected=F,this.callRejected=this.otherCallRejected)}v.prototype.callFulfilled=function(x){l.resolve(this.promise,x)},v.prototype.otherCallFulfilled=function(x){N(this.promise,this.onFulfilled,x)},v.prototype.callRejected=function(x){l.reject(this.promise,x)},v.prototype.otherCallRejected=function(x){N(this.promise,this.onRejected,x)};function N(x,j,F){s(function(){var W;try{W=j(F)}catch(ie){return l.reject(x,ie)}W===x?l.reject(x,new TypeError("Cannot resolve promise with itself")):l.resolve(x,W)})}l.resolve=function(x,j){var F=O(G,j);if(F.status==="error")return l.reject(x,F.value);var W=F.value;if(W)M(x,W);else{x.state=y,x.outcome=j;for(var ie=-1,ee=x.queue.length;++ie<ee;)x.queue[ie].callFulfilled(j)}return x},l.reject=function(x,j){x.state=h,x.outcome=j;for(var F=-1,W=x.queue.length;++F<W;)x.queue[F].callRejected(j);return x};function G(x){var j=x&&x.then;if(x&&(typeof x=="object"||typeof x=="function")&&typeof j=="function")return function(){j.apply(x,arguments)}}function M(x,j){var F=!1;function W(Me){F||(F=!0,l.reject(x,Me))}function ie(Me){F||(F=!0,l.resolve(x,Me))}function ee(){j(ie,W)}var me=O(ee);me.status==="error"&&W(me.value)}function O(x,j){var F={};try{F.value=x(j),F.status="success"}catch(W){F.status="error",F.value=W}return F}E.resolve=B;function B(x){return x instanceof this?x:l.resolve(new this(c),x)}E.reject=Z;function Z(x){var j=new this(c);return l.reject(j,x)}E.all=Oe;function Oe(x){var j=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var F=x.length,W=!1;if(!F)return this.resolve([]);for(var ie=new Array(F),ee=0,me=-1,Me=new this(c);++me<F;)st(x[me],me);return Me;function st(gn,Yn){j.resolve(gn).then(oi,function(zt){W||(W=!0,l.reject(Me,zt))});function oi(zt){ie[Yn]=zt,++ee===F&&!W&&(W=!0,l.resolve(Me,ie))}}}E.race=Re;function Re(x){var j=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var F=x.length,W=!1;if(!F)return this.resolve([]);for(var ie=-1,ee=new this(c);++ie<F;)me(x[ie]);return ee;function me(Me){j.resolve(Me).then(function(st){W||(W=!0,l.resolve(ee,st))},function(st){W||(W=!0,l.reject(ee,st))})}}},{1:1}],3:[function(r,i,o){(function(s){"use strict";typeof s.Promise!="function"&&(s.Promise=r(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(r,i,o){"use strict";var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function c(a,d){if(!(a instanceof d))throw new TypeError("Cannot call a class as a function")}function l(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var h=l();function y(){try{if(!h||!h.open)return!1;var a=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),d=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!a||d)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function f(a,d){a=a||[],d=d||{};try{return new Blob(a,d)}catch(p){if(p.name!=="TypeError")throw p;for(var u=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,m=new u,g=0;g<a.length;g+=1)m.append(a[g]);return m.getBlob(d.type)}}typeof Promise>"u"&&r(3);var E=Promise;function v(a,d){d&&a.then(function(u){d(null,u)},function(u){d(u)})}function N(a,d,u){typeof d=="function"&&a.then(d),typeof u=="function"&&a.catch(u)}function G(a){return typeof a!="string"&&(console.warn(a+" used as a key, but it is not a string."),a=String(a)),a}function M(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var O="local-forage-detect-blob-support",B=void 0,Z={},Oe=Object.prototype.toString,Re="readonly",x="readwrite";function j(a){for(var d=a.length,u=new ArrayBuffer(d),m=new Uint8Array(u),g=0;g<d;g++)m[g]=a.charCodeAt(g);return u}function F(a){return new E(function(d){var u=a.transaction(O,x),m=f([""]);u.objectStore(O).put(m,"key"),u.onabort=function(g){g.preventDefault(),g.stopPropagation(),d(!1)},u.oncomplete=function(){var g=navigator.userAgent.match(/Chrome\/(\d+)/),p=navigator.userAgent.match(/Edge\//);d(p||!g||parseInt(g[1],10)>=43)}}).catch(function(){return!1})}function W(a){return typeof B=="boolean"?E.resolve(B):F(a).then(function(d){return B=d,B})}function ie(a){var d=Z[a.name],u={};u.promise=new E(function(m,g){u.resolve=m,u.reject=g}),d.deferredOperations.push(u),d.dbReady?d.dbReady=d.dbReady.then(function(){return u.promise}):d.dbReady=u.promise}function ee(a){var d=Z[a.name],u=d.deferredOperations.pop();if(u)return u.resolve(),u.promise}function me(a,d){var u=Z[a.name],m=u.deferredOperations.pop();if(m)return m.reject(d),m.promise}function Me(a,d){return new E(function(u,m){if(Z[a.name]=Z[a.name]||ds(),a.db)if(d)ie(a),a.db.close();else return u(a.db);var g=[a.name];d&&g.push(a.version);var p=h.open.apply(h,g);d&&(p.onupgradeneeded=function(S){var b=p.result;try{b.createObjectStore(a.storeName),S.oldVersion<=1&&b.createObjectStore(O)}catch(C){if(C.name==="ConstraintError")console.warn('The database "'+a.name+'" has been upgraded from version '+S.oldVersion+" to version "+S.newVersion+', but the storage "'+a.storeName+'" already exists.');else throw C}}),p.onerror=function(S){S.preventDefault(),m(p.error)},p.onsuccess=function(){var S=p.result;S.onversionchange=function(b){b.target.close()},u(S),ee(a)}})}function st(a){return Me(a,!1)}function gn(a){return Me(a,!0)}function Yn(a,d){if(!a.db)return!0;var u=!a.db.objectStoreNames.contains(a.storeName),m=a.version<a.db.version,g=a.version>a.db.version;if(m&&(a.version!==d&&console.warn('The database "'+a.name+`" can't be downgraded from version `+a.db.version+" to version "+a.version+"."),a.version=a.db.version),g||u){if(u){var p=a.db.version+1;p>a.version&&(a.version=p)}return!0}return!1}function oi(a){return new E(function(d,u){var m=new FileReader;m.onerror=u,m.onloadend=function(g){var p=btoa(g.target.result||"");d({__local_forage_encoded_blob:!0,data:p,type:a.type})},m.readAsBinaryString(a)})}function zt(a){var d=j(atob(a.data));return f([d],{type:a.type})}function ls(a){return a&&a.__local_forage_encoded_blob}function Wu(a){var d=this,u=d._initReady().then(function(){var m=Z[d._dbInfo.name];if(m&&m.dbReady)return m.dbReady});return N(u,a,a),u}function zu(a){ie(a);for(var d=Z[a.name],u=d.forages,m=0;m<u.length;m++){var g=u[m];g._dbInfo.db&&(g._dbInfo.db.close(),g._dbInfo.db=null)}return a.db=null,st(a).then(function(p){return a.db=p,Yn(a)?gn(a):p}).then(function(p){a.db=d.db=p;for(var S=0;S<u.length;S++)u[S]._dbInfo.db=p}).catch(function(p){throw me(a,p),p})}function at(a,d,u,m){m===void 0&&(m=1);try{var g=a.db.transaction(a.storeName,d);u(null,g)}catch(p){if(m>0&&(!a.db||p.name==="InvalidStateError"||p.name==="NotFoundError"))return E.resolve().then(function(){if(!a.db||p.name==="NotFoundError"&&!a.db.objectStoreNames.contains(a.storeName)&&a.version<=a.db.version)return a.db&&(a.version=a.db.version+1),gn(a)}).then(function(){return zu(a).then(function(){at(a,d,u,m-1)})}).catch(u);u(p)}}function ds(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Yu(a){var d=this,u={db:null};if(a)for(var m in a)u[m]=a[m];var g=Z[u.name];g||(g=ds(),Z[u.name]=g),g.forages.push(d),d._initReady||(d._initReady=d.ready,d.ready=Wu);var p=[];function S(){return E.resolve()}for(var b=0;b<g.forages.length;b++){var C=g.forages[b];C!==d&&p.push(C._initReady().catch(S))}var I=g.forages.slice(0);return E.all(p).then(function(){return u.db=g.db,st(u)}).then(function(T){return u.db=T,Yn(u,d._defaultConfig.version)?gn(u):T}).then(function(T){u.db=g.db=T,d._dbInfo=u;for(var A=0;A<I.length;A++){var H=I[A];H!==d&&(H._dbInfo.db=u.db,H._dbInfo.version=u.version)}})}function qu(a,d){var u=this;a=G(a);var m=new E(function(g,p){u.ready().then(function(){at(u._dbInfo,Re,function(S,b){if(S)return p(S);try{var C=b.objectStore(u._dbInfo.storeName),I=C.get(a);I.onsuccess=function(){var T=I.result;T===void 0&&(T=null),ls(T)&&(T=zt(T)),g(T)},I.onerror=function(){p(I.error)}}catch(T){p(T)}})}).catch(p)});return v(m,d),m}function Ku(a,d){var u=this,m=new E(function(g,p){u.ready().then(function(){at(u._dbInfo,Re,function(S,b){if(S)return p(S);try{var C=b.objectStore(u._dbInfo.storeName),I=C.openCursor(),T=1;I.onsuccess=function(){var A=I.result;if(A){var H=A.value;ls(H)&&(H=zt(H));var z=a(H,A.key,T++);z!==void 0?g(z):A.continue()}else g()},I.onerror=function(){p(I.error)}}catch(A){p(A)}})}).catch(p)});return v(m,d),m}function Xu(a,d,u){var m=this;a=G(a);var g=new E(function(p,S){var b;m.ready().then(function(){return b=m._dbInfo,Oe.call(d)==="[object Blob]"?W(b.db).then(function(C){return C?d:oi(d)}):d}).then(function(C){at(m._dbInfo,x,function(I,T){if(I)return S(I);try{var A=T.objectStore(m._dbInfo.storeName);C===null&&(C=void 0);var H=A.put(C,a);T.oncomplete=function(){C===void 0&&(C=null),p(C)},T.onabort=T.onerror=function(){var z=H.error?H.error:H.transaction.error;S(z)}}catch(z){S(z)}})}).catch(S)});return v(g,u),g}function Ju(a,d){var u=this;a=G(a);var m=new E(function(g,p){u.ready().then(function(){at(u._dbInfo,x,function(S,b){if(S)return p(S);try{var C=b.objectStore(u._dbInfo.storeName),I=C.delete(a);b.oncomplete=function(){g()},b.onerror=function(){p(I.error)},b.onabort=function(){var T=I.error?I.error:I.transaction.error;p(T)}}catch(T){p(T)}})}).catch(p)});return v(m,d),m}function Qu(a){var d=this,u=new E(function(m,g){d.ready().then(function(){at(d._dbInfo,x,function(p,S){if(p)return g(p);try{var b=S.objectStore(d._dbInfo.storeName),C=b.clear();S.oncomplete=function(){m()},S.onabort=S.onerror=function(){var I=C.error?C.error:C.transaction.error;g(I)}}catch(I){g(I)}})}).catch(g)});return v(u,a),u}function Zu(a){var d=this,u=new E(function(m,g){d.ready().then(function(){at(d._dbInfo,Re,function(p,S){if(p)return g(p);try{var b=S.objectStore(d._dbInfo.storeName),C=b.count();C.onsuccess=function(){m(C.result)},C.onerror=function(){g(C.error)}}catch(I){g(I)}})}).catch(g)});return v(u,a),u}function el(a,d){var u=this,m=new E(function(g,p){if(a<0){g(null);return}u.ready().then(function(){at(u._dbInfo,Re,function(S,b){if(S)return p(S);try{var C=b.objectStore(u._dbInfo.storeName),I=!1,T=C.openKeyCursor();T.onsuccess=function(){var A=T.result;if(!A){g(null);return}a===0||I?g(A.key):(I=!0,A.advance(a))},T.onerror=function(){p(T.error)}}catch(A){p(A)}})}).catch(p)});return v(m,d),m}function tl(a){var d=this,u=new E(function(m,g){d.ready().then(function(){at(d._dbInfo,Re,function(p,S){if(p)return g(p);try{var b=S.objectStore(d._dbInfo.storeName),C=b.openKeyCursor(),I=[];C.onsuccess=function(){var T=C.result;if(!T){m(I);return}I.push(T.key),T.continue()},C.onerror=function(){g(C.error)}}catch(T){g(T)}})}).catch(g)});return v(u,a),u}function nl(a,d){d=M.apply(this,arguments);var u=this.config();a=typeof a!="function"&&a||{},a.name||(a.name=a.name||u.name,a.storeName=a.storeName||u.storeName);var m=this,g;if(!a.name)g=E.reject("Invalid arguments");else{var p=a.name===u.name&&m._dbInfo.db,S=p?E.resolve(m._dbInfo.db):st(a).then(function(b){var C=Z[a.name],I=C.forages;C.db=b;for(var T=0;T<I.length;T++)I[T]._dbInfo.db=b;return b});a.storeName?g=S.then(function(b){if(b.objectStoreNames.contains(a.storeName)){var C=b.version+1;ie(a);var I=Z[a.name],T=I.forages;b.close();for(var A=0;A<T.length;A++){var H=T[A];H._dbInfo.db=null,H._dbInfo.version=C}var z=new E(function(Y,se){var oe=h.open(a.name,C);oe.onerror=function(Pe){var vn=oe.result;vn.close(),se(Pe)},oe.onupgradeneeded=function(){var Pe=oe.result;Pe.deleteObjectStore(a.storeName)},oe.onsuccess=function(){var Pe=oe.result;Pe.close(),Y(Pe)}});return z.then(function(Y){I.db=Y;for(var se=0;se<T.length;se++){var oe=T[se];oe._dbInfo.db=Y,ee(oe._dbInfo)}}).catch(function(Y){throw(me(a,Y)||E.resolve()).catch(function(){}),Y})}}):g=S.then(function(b){ie(a);var C=Z[a.name],I=C.forages;b.close();for(var T=0;T<I.length;T++){var A=I[T];A._dbInfo.db=null}var H=new E(function(z,Y){var se=h.deleteDatabase(a.name);se.onerror=function(){var oe=se.result;oe&&oe.close(),Y(se.error)},se.onblocked=function(){console.warn('dropInstance blocked for database "'+a.name+'" until all open connections are closed')},se.onsuccess=function(){var oe=se.result;oe&&oe.close(),z(oe)}});return H.then(function(z){C.db=z;for(var Y=0;Y<I.length;Y++){var se=I[Y];ee(se._dbInfo)}}).catch(function(z){throw(me(a,z)||E.resolve()).catch(function(){}),z})})}return v(g,d),g}var rl={_driver:"asyncStorage",_initStorage:Yu,_support:y(),iterate:Ku,getItem:qu,setItem:Xu,removeItem:Ju,clear:Qu,length:Zu,key:el,keys:tl,dropInstance:nl};function il(){return typeof openDatabase=="function"}var yt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ol="~~local_forage_type~",fs=/^~~local_forage_type~([^~]+)~/,qn="__lfsc__:",si=qn.length,ai="arbf",ci="blob",ps="si08",ms="ui08",hs="uic8",gs="si16",_s="si32",vs="ur16",ys="ui32",Es="fl32",Ss="fl64",bs=si+ai.length,Cs=Object.prototype.toString;function Is(a){var d=a.length*.75,u=a.length,m,g=0,p,S,b,C;a[a.length-1]==="="&&(d--,a[a.length-2]==="="&&d--);var I=new ArrayBuffer(d),T=new Uint8Array(I);for(m=0;m<u;m+=4)p=yt.indexOf(a[m]),S=yt.indexOf(a[m+1]),b=yt.indexOf(a[m+2]),C=yt.indexOf(a[m+3]),T[g++]=p<<2|S>>4,T[g++]=(S&15)<<4|b>>2,T[g++]=(b&3)<<6|C&63;return I}function ui(a){var d=new Uint8Array(a),u="",m;for(m=0;m<d.length;m+=3)u+=yt[d[m]>>2],u+=yt[(d[m]&3)<<4|d[m+1]>>4],u+=yt[(d[m+1]&15)<<2|d[m+2]>>6],u+=yt[d[m+2]&63];return d.length%3===2?u=u.substring(0,u.length-1)+"=":d.length%3===1&&(u=u.substring(0,u.length-2)+"=="),u}function sl(a,d){var u="";if(a&&(u=Cs.call(a)),a&&(u==="[object ArrayBuffer]"||a.buffer&&Cs.call(a.buffer)==="[object ArrayBuffer]")){var m,g=qn;a instanceof ArrayBuffer?(m=a,g+=ai):(m=a.buffer,u==="[object Int8Array]"?g+=ps:u==="[object Uint8Array]"?g+=ms:u==="[object Uint8ClampedArray]"?g+=hs:u==="[object Int16Array]"?g+=gs:u==="[object Uint16Array]"?g+=vs:u==="[object Int32Array]"?g+=_s:u==="[object Uint32Array]"?g+=ys:u==="[object Float32Array]"?g+=Es:u==="[object Float64Array]"?g+=Ss:d(new Error("Failed to get type for BinaryArray"))),d(g+ui(m))}else if(u==="[object Blob]"){var p=new FileReader;p.onload=function(){var S=ol+a.type+"~"+ui(this.result);d(qn+ci+S)},p.readAsArrayBuffer(a)}else try{d(JSON.stringify(a))}catch(S){console.error("Couldn't convert value into a JSON string: ",a),d(null,S)}}function al(a){if(a.substring(0,si)!==qn)return JSON.parse(a);var d=a.substring(bs),u=a.substring(si,bs),m;if(u===ci&&fs.test(d)){var g=d.match(fs);m=g[1],d=d.substring(g[0].length)}var p=Is(d);switch(u){case ai:return p;case ci:return f([p],{type:m});case ps:return new Int8Array(p);case ms:return new Uint8Array(p);case hs:return new Uint8ClampedArray(p);case gs:return new Int16Array(p);case vs:return new Uint16Array(p);case _s:return new Int32Array(p);case ys:return new Uint32Array(p);case Es:return new Float32Array(p);case Ss:return new Float64Array(p);default:throw new Error("Unkown type: "+u)}}var li={serialize:sl,deserialize:al,stringToBuffer:Is,bufferToString:ui};function Ts(a,d,u,m){a.executeSql("CREATE TABLE IF NOT EXISTS "+d.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],u,m)}function cl(a){var d=this,u={db:null};if(a)for(var m in a)u[m]=typeof a[m]!="string"?a[m].toString():a[m];var g=new E(function(p,S){try{u.db=openDatabase(u.name,String(u.version),u.description,u.size)}catch(b){return S(b)}u.db.transaction(function(b){Ts(b,u,function(){d._dbInfo=u,p()},function(C,I){S(I)})},S)});return u.serializer=li,g}function Et(a,d,u,m,g,p){a.executeSql(u,m,g,function(S,b){b.code===b.SYNTAX_ERR?S.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[d.storeName],function(C,I){I.rows.length?p(C,b):Ts(C,d,function(){C.executeSql(u,m,g,p)},p)},p):p(S,b)},p)}function ul(a,d){var u=this;a=G(a);var m=new E(function(g,p){u.ready().then(function(){var S=u._dbInfo;S.db.transaction(function(b){Et(b,S,"SELECT * FROM "+S.storeName+" WHERE key = ? LIMIT 1",[a],function(C,I){var T=I.rows.length?I.rows.item(0).value:null;T&&(T=S.serializer.deserialize(T)),g(T)},function(C,I){p(I)})})}).catch(p)});return v(m,d),m}function ll(a,d){var u=this,m=new E(function(g,p){u.ready().then(function(){var S=u._dbInfo;S.db.transaction(function(b){Et(b,S,"SELECT * FROM "+S.storeName,[],function(C,I){for(var T=I.rows,A=T.length,H=0;H<A;H++){var z=T.item(H),Y=z.value;if(Y&&(Y=S.serializer.deserialize(Y)),Y=a(Y,z.key,H+1),Y!==void 0){g(Y);return}}g()},function(C,I){p(I)})})}).catch(p)});return v(m,d),m}function xs(a,d,u,m){var g=this;a=G(a);var p=new E(function(S,b){g.ready().then(function(){d===void 0&&(d=null);var C=d,I=g._dbInfo;I.serializer.serialize(d,function(T,A){A?b(A):I.db.transaction(function(H){Et(H,I,"INSERT OR REPLACE INTO "+I.storeName+" (key, value) VALUES (?, ?)",[a,T],function(){S(C)},function(z,Y){b(Y)})},function(H){if(H.code===H.QUOTA_ERR){if(m>0){S(xs.apply(g,[a,C,u,m-1]));return}b(H)}})})}).catch(b)});return v(p,u),p}function dl(a,d,u){return xs.apply(this,[a,d,u,1])}function fl(a,d){var u=this;a=G(a);var m=new E(function(g,p){u.ready().then(function(){var S=u._dbInfo;S.db.transaction(function(b){Et(b,S,"DELETE FROM "+S.storeName+" WHERE key = ?",[a],function(){g()},function(C,I){p(I)})})}).catch(p)});return v(m,d),m}function pl(a){var d=this,u=new E(function(m,g){d.ready().then(function(){var p=d._dbInfo;p.db.transaction(function(S){Et(S,p,"DELETE FROM "+p.storeName,[],function(){m()},function(b,C){g(C)})})}).catch(g)});return v(u,a),u}function ml(a){var d=this,u=new E(function(m,g){d.ready().then(function(){var p=d._dbInfo;p.db.transaction(function(S){Et(S,p,"SELECT COUNT(key) as c FROM "+p.storeName,[],function(b,C){var I=C.rows.item(0).c;m(I)},function(b,C){g(C)})})}).catch(g)});return v(u,a),u}function hl(a,d){var u=this,m=new E(function(g,p){u.ready().then(function(){var S=u._dbInfo;S.db.transaction(function(b){Et(b,S,"SELECT key FROM "+S.storeName+" WHERE id = ? LIMIT 1",[a+1],function(C,I){var T=I.rows.length?I.rows.item(0).key:null;g(T)},function(C,I){p(I)})})}).catch(p)});return v(m,d),m}function gl(a){var d=this,u=new E(function(m,g){d.ready().then(function(){var p=d._dbInfo;p.db.transaction(function(S){Et(S,p,"SELECT key FROM "+p.storeName,[],function(b,C){for(var I=[],T=0;T<C.rows.length;T++)I.push(C.rows.item(T).key);m(I)},function(b,C){g(C)})})}).catch(g)});return v(u,a),u}function _l(a){return new E(function(d,u){a.transaction(function(m){m.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(g,p){for(var S=[],b=0;b<p.rows.length;b++)S.push(p.rows.item(b).name);d({db:a,storeNames:S})},function(g,p){u(p)})},function(m){u(m)})})}function vl(a,d){d=M.apply(this,arguments);var u=this.config();a=typeof a!="function"&&a||{},a.name||(a.name=a.name||u.name,a.storeName=a.storeName||u.storeName);var m=this,g;return a.name?g=new E(function(p){var S;a.name===u.name?S=m._dbInfo.db:S=openDatabase(a.name,"","",0),a.storeName?p({db:S,storeNames:[a.storeName]}):p(_l(S))}).then(function(p){return new E(function(S,b){p.db.transaction(function(C){function I(z){return new E(function(Y,se){C.executeSql("DROP TABLE IF EXISTS "+z,[],function(){Y()},function(oe,Pe){se(Pe)})})}for(var T=[],A=0,H=p.storeNames.length;A<H;A++)T.push(I(p.storeNames[A]));E.all(T).then(function(){S()}).catch(function(z){b(z)})},function(C){b(C)})})}):g=E.reject("Invalid arguments"),v(g,d),g}var yl={_driver:"webSQLStorage",_initStorage:cl,_support:il(),iterate:ll,getItem:ul,setItem:dl,removeItem:fl,clear:pl,length:ml,key:hl,keys:gl,dropInstance:vl};function El(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function Ds(a,d){var u=a.name+"/";return a.storeName!==d.storeName&&(u+=a.storeName+"/"),u}function Sl(){var a="_localforage_support_test";try{return localStorage.setItem(a,!0),localStorage.removeItem(a),!1}catch{return!0}}function bl(){return!Sl()||localStorage.length>0}function Cl(a){var d=this,u={};if(a)for(var m in a)u[m]=a[m];return u.keyPrefix=Ds(a,d._defaultConfig),bl()?(d._dbInfo=u,u.serializer=li,E.resolve()):E.reject()}function Il(a){var d=this,u=d.ready().then(function(){for(var m=d._dbInfo.keyPrefix,g=localStorage.length-1;g>=0;g--){var p=localStorage.key(g);p.indexOf(m)===0&&localStorage.removeItem(p)}});return v(u,a),u}function Tl(a,d){var u=this;a=G(a);var m=u.ready().then(function(){var g=u._dbInfo,p=localStorage.getItem(g.keyPrefix+a);return p&&(p=g.serializer.deserialize(p)),p});return v(m,d),m}function xl(a,d){var u=this,m=u.ready().then(function(){for(var g=u._dbInfo,p=g.keyPrefix,S=p.length,b=localStorage.length,C=1,I=0;I<b;I++){var T=localStorage.key(I);if(T.indexOf(p)===0){var A=localStorage.getItem(T);if(A&&(A=g.serializer.deserialize(A)),A=a(A,T.substring(S),C++),A!==void 0)return A}}});return v(m,d),m}function Dl(a,d){var u=this,m=u.ready().then(function(){var g=u._dbInfo,p;try{p=localStorage.key(a)}catch{p=null}return p&&(p=p.substring(g.keyPrefix.length)),p});return v(m,d),m}function wl(a){var d=this,u=d.ready().then(function(){for(var m=d._dbInfo,g=localStorage.length,p=[],S=0;S<g;S++){var b=localStorage.key(S);b.indexOf(m.keyPrefix)===0&&p.push(b.substring(m.keyPrefix.length))}return p});return v(u,a),u}function Al(a){var d=this,u=d.keys().then(function(m){return m.length});return v(u,a),u}function Nl(a,d){var u=this;a=G(a);var m=u.ready().then(function(){var g=u._dbInfo;localStorage.removeItem(g.keyPrefix+a)});return v(m,d),m}function Ol(a,d,u){var m=this;a=G(a);var g=m.ready().then(function(){d===void 0&&(d=null);var p=d;return new E(function(S,b){var C=m._dbInfo;C.serializer.serialize(d,function(I,T){if(T)b(T);else try{localStorage.setItem(C.keyPrefix+a,I),S(p)}catch(A){(A.name==="QuotaExceededError"||A.name==="NS_ERROR_DOM_QUOTA_REACHED")&&b(A),b(A)}})})});return v(g,u),g}function Rl(a,d){if(d=M.apply(this,arguments),a=typeof a!="function"&&a||{},!a.name){var u=this.config();a.name=a.name||u.name,a.storeName=a.storeName||u.storeName}var m=this,g;return a.name?g=new E(function(p){a.storeName?p(Ds(a,m._defaultConfig)):p(a.name+"/")}).then(function(p){for(var S=localStorage.length-1;S>=0;S--){var b=localStorage.key(S);b.indexOf(p)===0&&localStorage.removeItem(b)}}):g=E.reject("Invalid arguments"),v(g,d),g}var Ml={_driver:"localStorageWrapper",_initStorage:Cl,_support:El(),iterate:xl,getItem:Tl,setItem:Ol,removeItem:Nl,clear:Il,length:Al,key:Dl,keys:wl,dropInstance:Rl},Pl=function(d,u){return d===u||typeof d=="number"&&typeof u=="number"&&isNaN(d)&&isNaN(u)},Ll=function(d,u){for(var m=d.length,g=0;g<m;){if(Pl(d[g],u))return!0;g++}return!1},ws=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},_n={},As={},Yt={INDEXEDDB:rl,WEBSQL:yl,LOCALSTORAGE:Ml},Vl=[Yt.INDEXEDDB._driver,Yt.WEBSQL._driver,Yt.LOCALSTORAGE._driver],Kn=["dropInstance"],di=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Kn),Fl={description:"",driver:Vl.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function kl(a,d){a[d]=function(){var u=arguments;return a.ready().then(function(){return a[d].apply(a,u)})}}function fi(){for(var a=1;a<arguments.length;a++){var d=arguments[a];if(d)for(var u in d)d.hasOwnProperty(u)&&(ws(d[u])?arguments[0][u]=d[u].slice():arguments[0][u]=d[u])}return arguments[0]}var Ul=(function(){function a(d){c(this,a);for(var u in Yt)if(Yt.hasOwnProperty(u)){var m=Yt[u],g=m._driver;this[u]=g,_n[g]||this.defineDriver(m)}this._defaultConfig=fi({},Fl),this._config=fi({},this._defaultConfig,d),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return a.prototype.config=function(u){if((typeof u>"u"?"undefined":s(u))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var m in u){if(m==="storeName"&&(u[m]=u[m].replace(/\W/g,"_")),m==="version"&&typeof u[m]!="number")return new Error("Database version must be a number.");this._config[m]=u[m]}return"driver"in u&&u.driver?this.setDriver(this._config.driver):!0}else return typeof u=="string"?this._config[u]:this._config},a.prototype.defineDriver=function(u,m,g){var p=new E(function(S,b){try{var C=u._driver,I=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!u._driver){b(I);return}for(var T=di.concat("_initStorage"),A=0,H=T.length;A<H;A++){var z=T[A],Y=!Ll(Kn,z);if((Y||u[z])&&typeof u[z]!="function"){b(I);return}}var se=function(){for(var vn=function(Gl){return function(){var $l=new Error("Method "+Gl+" is not implemented by the current driver"),Ns=E.reject($l);return v(Ns,arguments[arguments.length-1]),Ns}},pi=0,Hl=Kn.length;pi<Hl;pi++){var mi=Kn[pi];u[mi]||(u[mi]=vn(mi))}};se();var oe=function(vn){_n[C]&&console.info("Redefining LocalForage driver: "+C),_n[C]=u,As[C]=vn,S()};"_support"in u?u._support&&typeof u._support=="function"?u._support().then(oe,b):oe(!!u._support):oe(!0)}catch(Pe){b(Pe)}});return N(p,m,g),p},a.prototype.driver=function(){return this._driver||null},a.prototype.getDriver=function(u,m,g){var p=_n[u]?E.resolve(_n[u]):E.reject(new Error("Driver not found."));return N(p,m,g),p},a.prototype.getSerializer=function(u){var m=E.resolve(li);return N(m,u),m},a.prototype.ready=function(u){var m=this,g=m._driverSet.then(function(){return m._ready===null&&(m._ready=m._initDriver()),m._ready});return N(g,u,u),g},a.prototype.setDriver=function(u,m,g){var p=this;ws(u)||(u=[u]);var S=this._getSupportedDrivers(u);function b(){p._config.driver=p.driver()}function C(A){return p._extend(A),b(),p._ready=p._initStorage(p._config),p._ready}function I(A){return function(){var H=0;function z(){for(;H<A.length;){var Y=A[H];return H++,p._dbInfo=null,p._ready=null,p.getDriver(Y).then(C).catch(z)}b();var se=new Error("No available storage method found.");return p._driverSet=E.reject(se),p._driverSet}return z()}}var T=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=T.then(function(){var A=S[0];return p._dbInfo=null,p._ready=null,p.getDriver(A).then(function(H){p._driver=H._driver,b(),p._wrapLibraryMethodsWithReady(),p._initDriver=I(S)})}).catch(function(){b();var A=new Error("No available storage method found.");return p._driverSet=E.reject(A),p._driverSet}),N(this._driverSet,m,g),this._driverSet},a.prototype.supports=function(u){return!!As[u]},a.prototype._extend=function(u){fi(this,u)},a.prototype._getSupportedDrivers=function(u){for(var m=[],g=0,p=u.length;g<p;g++){var S=u[g];this.supports(S)&&m.push(S)}return m},a.prototype._wrapLibraryMethodsWithReady=function(){for(var u=0,m=di.length;u<m;u++)kl(this,di[u])},a.prototype.createInstance=function(u){return new a(u)},a})(),Bl=new Ul;i.exports=Bl},{3:3}]},{},[4])(4)})});var Xe=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;currency;static get(){return window.CooeeSDK.config}update(t){return t??={},this.gaEnabled=t.gaEnabled,this.gaMeasurementID=t.gaMeasurementID,this.pixelPush=t.pixelPush,this.website=t.website??{},this.currencyCount=t.currencyCount??0,this.money=t.money,this.currency=t.currency,this.storefrontToken=t.storefrontToken,this.skipItemAttribute=t.skipItemAttribute,this}};var ia=0;function zl(e=document.head){return oa(Kt.styleURL,e,"cooee-global-styles")}function Yl(e=document.head){return oa(Kt.swiperStyleURL,e,"cooee-swiper-styles")}function oa(e,t=document.head,n){return new Promise(r=>{if(t.querySelector(`#${n}`)){r();return}let o=document.createElement("link");o.rel="stylesheet",o.href=e,o.id=n,o.onload=()=>{r()},o.onerror=()=>{console.error("Failed to load stylesheet:",e),r()},t.appendChild(o)})}function In(e,t=document.head){if(!e)return;ia++;let n=document.createElement("style");n.id=`cooee-app-css-${ia}`,n.textContent=e,t.appendChild(n)}async function ir(){let e=(await import("./swiper-bundle-WHJS64TU.js")).default;return window.CooeeSDK.Swiper=e}async function or(e,t=!0){if(!e)return;let n=[];t&&n.push(Yl(e)),n.push(zl(e)),await Promise.all(n);let r=Xe.get().website.commonCSS;In(r,e)}var Xl={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},sg=k(_({},Xl),{"[class.ng-submitted]":"isSubmitted"});var Jl=new Ls("",{providedIn:"root",factory:()=>sa}),sa="always";var Ql=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=_i({type:e});static \u0275inj=gi({})}return e})();var aa=(()=>{class e{static withConfig(n){return{ngModule:e,providers:[{provide:Jl,useValue:n.callSetDisabledState??sa}]}}static \u0275fac=function(r){return new(r||e)};static \u0275mod=_i({type:e});static \u0275inj=gi({imports:[Ql]})}return e})();var yi=(function(e){return e.SHOPIFY_CHECKOUT="shopify_checkout",e.THIRD_PARTY_CHECKOUT="third_party_checkout",e.CART_PAGE="cart_page",e.CART_DRAWER="cart_drawer",e})(yi||{});var je=(function(e){return e[e.NONE=0]="NONE",e[e.REJECT_POPUP=1]="REJECT_POPUP",e[e.ACCEPT_POPUP=2]="ACCEPT_POPUP",e[e.GO_TO_URL=4]="GO_TO_URL",e[e.SHARE=5]="SHARE",e[e.KEY_VALUE=100]="KEY_VALUE",e[e.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",e[e.ADD_TO_CART=102]="ADD_TO_CART",e[e.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",e[e.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",e[e.OPEN_CART=105]="OPEN_CART",e[e.SUBMIT_FORM=106]="SUBMIT_FORM",e[e.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",e[e.ADD_BUNDLE=108]="ADD_BUNDLE",e[e.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",e[e.BUY_NOW=110]="BUY_NOW",e[e.QUICK_VIEW=111]="QUICK_VIEW",e})(je||{});var Zl=(function(e){return e.FREE_SHIPPING="FREE_SHIPPING",e.DISCOUNT="DISCOUNT",e.FREE_AUTO_GIFT="FREE_AUTO_GIFT",e.FREE_GIFT_SELECT="FREE_GIFT_SELECT",e.UI_ONLY="UI_ONLY",e})(Zl||{});var We=class e{engagementContext=ae(Cn);eventData=ae(nr);constructor(){}executeCTA(t,n){let r,i=this.engagementContext();if(!i){Ce.error("Engagement context is not available; aborting executeCTA.");return}if(t===je.ADD_TO_CART)r="CE Add To Cart Clicked";else if(t===je.GO_TO_PRODUCT)r="CE View Item Clicked";else if(t===je.OPEN_CART)r="CE Open Cart Clicked",i.triggerData.redirectBehaviour=yi.CART_DRAWER;else{Ce.warn(`Unsupported CTA type: ${t}`);return}window.CooeeSDK.executeCTA(i,_({clickAction:{at:t}},n));let o=new na(r,this.eventData.props,i.triggerData);n?.video?o.setVideos(n.video):this.eventData.video&&o.setVideos(this.eventData.video),window.CooeeSDK.sendEvent(o)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=hi({token:e,factory:e.\u0275fac})};function ca(e,t){return[We,...ed(e,t)]}function ed(e,t){return[{provide:Cn,useValue:ct(e)},{provide:nr,useValue:_({},t)}]}var sr=class e{elementRef=ae(Rt);engagementService=ae(We);hasSwiper=!1;_engagementTrigger=ct(null);_triggerContext=ae(Cn);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get classes(){let t=["letscooee-widget"],n=this._engagementTrigger();return t.push(`widget-${n?.shortID}`),t}get triggerContext(){return this._triggerContext()}set triggerContext(t){this._triggerContext.set(t),this._engagementTrigger.set(t.triggerData),this.engagementTriggerReceived(t.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){Ce.verbose("Init",this.constructor.name);let t=this.elementRef.nativeElement.shadowRoot;t&&(or(t,this.hasSwiper),In(this.engagementTrigger?.content?.innerCSS,t))}ngOnDestroy(){Ce.verbose("Destroying",this.constructor.name)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Se({type:e,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,r){n&2&&Zn(r.classes)},inputs:{triggerContext:"triggerContext"},decls:1,vars:0,template:function(n,r){n&1&&Hs(0)},encapsulation:2})};var ua=(e,t)=>t.id;function td(e,t){if(e&1&&(P(0,"span",6),ne(1),U()),e&2){L();let n=Ie(0);D(),lt(n)}}function nd(e,t){if(e&1){let n=Le();Be(0),P(1,"button",5),be("click",function(){let i=ye(n).$implicit,o=L().$implicit,s=L();return Ee(s.onOptionChange(o,i))}),X(2,td,2,1,"span",6),U()}if(e&2){let n=t.$implicit,r=L().$implicit,i=Ie(1),o=L(),s=n.name,c=He(n.displayName||n.name),l=n.swatch,h=i?n.hexColor??s:"",y=o.selectedOptions()[r.name]===s,f=!!(l!=null&&l.color),E=!!(!(l==null||l.image==null)&&l.image.url);D(),Sn("swatch-color-type",f)("swatch-image-type",E)("selected",y)("disabled",n.disabled),$("title",c)("ngStyle",o.getSwatchStyles(l,h)),qt("aria-checked",y?"true":"false")("data-value",s)("aria-disabled",n.disabled?"true":null)("aria-label",c),D(),J(!i&&!f&&!E?2:-1)}}function rd(e,t){if(e&1&&(P(0,"div"),Be(1),P(2,"div",1),ne(3),U(),P(4,"div",2),ne(5),U(),P(6,"div",3),bt(7,nd,3,16,"button",4,ua),U()()),e&2){let n=t.$implicit,r=L();Zn(er("option-group ",n.name.toLowerCase())),D(),He(r.hasHexColors(n)),D(2),Pt("",n.name,":"),D(2),lt(r.selectedOptions()[n.name]),D(),qt("aria-label",n.name),D(),Ct(n.optionValues)}}var Tn=e=>e.trim().toLowerCase(),ar=class e extends sr{selectedVariant=new En;item=he.required();selectedOptions=ct({});options=dt(()=>{let t=this.item();if(!t.options||t.vars.length===1)return[];if(window.cooeeManipulateProduct)try{window.cooeeManipulateProduct(t,this.engagementTrigger)}catch(n){Ce.error(n)}return t.options.forEach(n=>{n.optionValues.forEach(r=>{r.disabled=this.isOptionValueDisabledFast(n,r)})}),t.options});matchedVariant=dt(()=>{let t=this.item(),n=this.selectedOptions();return t.vars.find(r=>t.options.every(i=>{let o=r.selectedOptions.find(s=>s.name===i.name)?.value;return n[i.name]===o}))});availabilityIndex=dt(()=>{let t=this.item(),n=new Map;return t?.vars?.length&&t.vars.forEach((r,i)=>{if(r.isAvailable)for(let o of r.selectedOptions){let s=Tn(o.name),c=o.value,l=n.get(s);l||n.set(s,l=new Map);let h=l.get(c);h||l.set(c,h=new Set),h.add(i)}}),n});constructor(){super(),ft(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let t=ft(()=>{let n=this.item();if(!n?.options)return;let r=_({},this.selectedOptions()),i=n.vars.find(o=>o.isAvailable)??n.vars[0];n.options.forEach(o=>{let s=i?.selectedOptions.find(c=>c.name===o.name)?.value;s&&(r[o.name]=s)}),this.selectedOptions.set(r),t.destroy()})}ngOnInit(){super.ngOnInit();let t=this.elementRef.nativeElement.shadowRoot;if(!t)return;let n=Xe.get().website?.itemSwatchMapping;n&&In(n,t)}onOptionChange(t,n){let r=_({},this.selectedOptions());r[t.name]=n.name,this.selectedOptions.set(r)}engagementTriggerReceived(){}update(){}hasHexColors(t){return!!t.optionValues[0]?.name.match(/#[a-f0-9]{6}\b/i)}getSwatchStyles(t,n){let r={};return!t&&n?(r["--option-color"]=n,r["background-color"]=n,r):(t?.image?.url?r["background-image"]=`url("${t.image.url}")`:t?.color&&(r["--option-color"]=t.color,r["background-color"]=t.color),r)}getCandidateVariantsExcluding(t){let n=this.item(),r=this.availabilityIndex(),i=new Set;n.vars.forEach((s,c)=>{s.isAvailable&&i.add(c)});let o=i;for(let[s,c]of Object.entries(this.selectedOptions())){if(Tn(s)===Tn(t))continue;let l=r.get(Tn(s));if(!l)return new Set;let h=l.get(String(c));if(!h)return new Set;if(o=new Set([...o].filter(y=>h.has(y))),o.size===0)return o}return o}isOptionValueDisabledFast(t,n){let i=this.availabilityIndex().get(Tn(t.name));if(!i)return!0;let o=n.name,s=i.get(o);if(!s||s.size===0)return!0;let c=this.getCandidateVariantsExcluding(t.name);if(c.size===0)return!0;for(let l of c)if(s.has(l))return!1;return!0}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Se({type:e,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[Lt(ca()),vi],decls:2,vars:0,consts:[[3,"class"],[1,"name"],[1,"selected-value"],["role","radiogroup",1,"option-values"],["type","button","role","radio",1,"option-value",3,"swatch-color-type","swatch-image-type","selected","disabled","title","ngStyle"],["type","button","role","radio",1,"option-value",3,"click","title","ngStyle"],[1,"title"]],template:function(n,r){n&1&&bt(0,rd,9,7,"div",0,ua),n&2&&Ct(r.options())},dependencies:[ea,Qs,aa],styles:[`.option-group{display:flex;gap:4px;align-items:center}.option-group+.option-group{margin-top:8px}.option-values{display:flex;flex-wrap:nowrap;overflow-x:auto;padding:6px;gap:4px;scrollbar-gutter:stable both-edges;scrollbar-width:none}.option-values::-webkit-scrollbar{display:none}.selected-value{display:none}.option-value{padding:5px 10px;border:1px solid #ccc;cursor:pointer;border-radius:4px;min-width:32px;min-height:32px;text-align:center;position:relative;flex-shrink:0;--selected-color: var(--option-color, rgba(var(--lc-primary-button-bg-color, 0 0 0)));background-size:cover;background-position:center;background-repeat:no-repeat}.option-value.selected{box-shadow:#fff 0 0 0 2px,var(--selected-color) 0 0 0 4px}.option-value.disabled{opacity:.5;pointer-events:none}
|
|
2
|
-
`],encapsulation:3})};var Si=Wl(da());function cr(e){return Si.default.createInstance({name:"lc",storeName:e,driver:Si.default.LOCALSTORAGE})}var Jt=class{static storage;static async get(t,n){return await this.storage?.getItem(t)??n}static set(t,n){return this.storage?.setItem(t,n)}static remove(t){return this.storage?.removeItem(t)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}};var xn=class xn extends Jt{};Xn(xn,"storeName","usr"),xn.storage=cr(xn.storeName);var bi=xn;function Ci(){return window.CooeeSDK?.uaParser.getDevice().type==="mobile"}var r_=()=>typeof navigator<"u"&&"share"in navigator;var Qt=class{lastWidth;lastHeight;resizeTimeout=null;debounceDelay=200;onResizeCallback;constructor(t){this.onResizeCallback=t,this.lastWidth=window.innerWidth,this.lastHeight=window.innerHeight,window.addEventListener("resize",this.debouncedResize),window.addEventListener("orientationchange",this.handleImmediateResize)}destroy(){window.removeEventListener("resize",this.debouncedResize),window.removeEventListener("orientationchange",this.handleImmediateResize)}handleImmediateResize=()=>{this.triggerResize()};debouncedResize=()=>{this.resizeTimeout!==null&&clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(()=>{this.triggerResize()},this.debounceDelay)};triggerResize(){let t=window.innerWidth,n=window.innerHeight;(n!==this.lastHeight||t!==this.lastWidth)&&(this.onResizeCallback(),this.lastWidth=t,this.lastHeight=n)}};var Dn=class Dn extends Jt{};Xn(Dn,"storeName","ses"),Dn.storage=cr(Dn.storeName);var Ii=Dn;var R=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var V=globalThis;var Qe="9.42.0";function Ft(){return kt(V),V}function kt(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Qe,t[Qe]=t[Qe]||{}}function pt(e,t,n=V){let r=n.__SENTRY__=n.__SENTRY__||{},i=r[Qe]=r[Qe]||{};return i[e]||(i[e]=t())}var Ti=["debug","info","warn","error","log","assert","trace"],id="Sentry Logger ",Zt={};function Tt(e){if(!("console"in V))return e();let t=V.console,n={},r=Object.keys(Zt);r.forEach(i=>{let o=Zt[i];n[i]=t[i],t[i]=o});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function od(){Di().enabled=!0}function sd(){Di().enabled=!1}function fa(){return Di().enabled}function ad(...e){xi("log",...e)}function cd(...e){xi("warn",...e)}function ud(...e){xi("error",...e)}function xi(e,...t){R&&fa()&&Tt(()=>{V.console[e](`${id}[${e}]:`,...t)})}function Di(){return R?pt("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var w={enable:od,disable:sd,isEnabled:fa,log:ad,warn:cd,error:ud};var pa=/\(error: (.*)\)/,ma=/captureMessage|captureException/;function Ai(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{let o=[],s=n.split(`
|
|
3
|
-
`);for(let c=r;c<s.length;c++){let l=s[c];if(l.length>1024)continue;let h=pa.test(l)?l.replace(pa,"$1"):l;if(!h.match(/\S*Error: /)){for(let y of t){let f=y(h);if(f){o.push(f);break}}if(o.length>=50+i)break}}return ha(o.slice(i))}}function ha(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(ur(t).function||"")&&t.pop(),t.reverse(),ma.test(ur(t).function||"")&&(t.pop(),ma.test(ur(t).function||"")&&t.pop()),t.slice(0,50).map(n=>k(_({},n),{filename:n.filename||ur(t).filename,function:n.function||"?"}))}function ur(e){return e[e.length-1]||{}}var wi="<anonymous>";function Ve(e){try{return!e||typeof e!="function"?wi:e.name||wi}catch{return wi}}function lr(e){let t=e.exception;if(t){let n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}var dr={},ga={};function Te(e,t){dr[e]=dr[e]||[],dr[e].push(t)}function xe(e,t){if(!ga[e]){ga[e]=!0;try{t()}catch(n){R&&w.error(`Error while instrumenting ${e}`,n)}}}function ce(e,t){let n=e&&dr[e];if(n)for(let r of n)try{r(t)}catch(i){R&&w.error(`Error while triggering instrumentation handler.
|
|
4
|
-
Type: ${e}
|
|
5
|
-
Name: ${Ve(r)}
|
|
6
|
-
Error:`,i)}}var Ni=null;function Oi(e){let t="error";Te(t,e),xe(t,ld)}function ld(){Ni=V.onerror,V.onerror=function(e,t,n,r,i){return ce("error",{column:r,error:i,line:n,msg:e,url:t}),Ni?Ni.apply(this,arguments):!1},V.onerror.__SENTRY_INSTRUMENTED__=!0}var Ri=null;function Mi(e){let t="unhandledrejection";Te(t,e),xe(t,dd)}function dd(){Ri=V.onunhandledrejection,V.onunhandledrejection=function(e){return ce("unhandledrejection",e),Ri?Ri.apply(this,arguments):!0},V.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var _a=Object.prototype.toString;function Ut(e){switch(_a.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return ze(e,Error)}}function en(e,t){return _a.call(e)===`[object ${t}]`}function fr(e){return en(e,"ErrorEvent")}function pr(e){return en(e,"DOMError")}function Pi(e){return en(e,"DOMException")}function De(e){return en(e,"String")}function tn(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Bt(e){return e===null||tn(e)||typeof e!="object"&&typeof e!="function"}function mt(e){return en(e,"Object")}function Ht(e){return typeof Event<"u"&&ze(e,Event)}function Li(e){return typeof Element<"u"&&ze(e,Element)}function Vi(e){return en(e,"RegExp")}function ht(e){return!!(e?.then&&typeof e.then=="function")}function Fi(e){return mt(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function ze(e,t){try{return e instanceof t}catch{return!1}}function wn(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function va(e){return typeof Request<"u"&&ze(e,Request)}var ki=V,fd=80;function An(e,t={}){if(!e)return"<unknown>";try{let n=e,r=5,i=[],o=0,s=0,c=" > ",l=c.length,h,y=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||fd;for(;n&&o++<r&&(h=pd(n,y),!(h==="html"||o>1&&s+i.length*l+h.length>=f));)i.push(h),s+=h.length,n=n.parentNode;return i.reverse().join(c)}catch{return"<unknown>"}}function pd(e,t){let n=e,r=[];if(!n?.tagName)return"";if(ki.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=t?.length?t.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(i?.length)i.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let s=n.className;if(s&&De(s)){let c=s.split(/\s+/);for(let l of c)r.push(`.${l}`)}}let o=["aria-label","type","name","title","alt"];for(let s of o){let c=n.getAttribute(s);c&&r.push(`[${s}="${c}"]`)}return r.join("")}function Nn(){try{return ki.document.location.href}catch{return""}}function Ui(e){if(!ki.HTMLElement)return null;let t=e,n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function xt(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function mr(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let i=e[r];try{wn(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function ya(e,t,n=!1){return De(e)?Vi(t)?t.test(e):De(t)?n?e===t:e.includes(t):!1:!1}function nn(e,t=[],n=!1){return t.some(r=>ya(e,r,n))}function ue(e,t,n){if(!(t in e))return;let r=e[t];if(typeof r!="function")return;let i=n(r);typeof i=="function"&&hr(i,r);try{e[t]=i}catch{R&&w.log(`Failed to replace method "${t}" in object`,e)}}function Ae(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{R&&w.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function hr(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,Ae(e,"__sentry_original__",t)}catch{}}function Gt(e){return e.__sentry_original__}function gr(e){if(Ut(e))return _({message:e.message,name:e.name,stack:e.stack},Sa(e));if(Ht(e)){let t=_({type:e.type,target:Ea(e.target),currentTarget:Ea(e.currentTarget)},Sa(e));return typeof CustomEvent<"u"&&ze(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Ea(e){try{return Li(e)?An(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Sa(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function Bi(e,t=40){let n=Object.keys(gr(e));n.sort();let r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return xt(r,t);for(let i=n.length;i>0;i--){let o=n.slice(0,i).join(", ");if(!(o.length>t))return i===n.length?o:xt(o,t)}return""}function md(){let e=V;return e.crypto||e.msCrypto}function le(e=md()){let t=()=>Math.random()*16;try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,"");e?.getRandomValues&&(t=()=>{let n=new Uint8Array(1);return e.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(t()&15)>>n/4).toString(16))}function ba(e){return e.exception?.values?.[0]}function Ze(e){let{message:t,event_id:n}=e;if(t)return t;let r=ba(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function rn(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function et(e,t){let n=ba(e);if(!n)return;let r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism=_(_(_({},r),i),t),t&&"data"in t){let o=_(_({},i?.data),t.data);n.mechanism.data=o}}function _r(e){if(hd(e))return!0;try{Ae(e,"__sentry_captured__",!0)}catch{}return!1}function hd(e){try{return e.__sentry_captured__}catch{}}var Ia=1e3;function tt(){return Date.now()/Ia}function gd(){let{performance:e}=V;if(!e?.now||!e.timeOrigin)return tt;let t=e.timeOrigin;return()=>(t+e.now())/Ia}var Ca;function we(){return(Ca??(Ca=gd()))()}function Ta(e){let t=we(),n={sid:le(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>_d(n)};return e&>(n,e),n}function gt(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||we(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:le()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function xa(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),gt(e,n)}function _d(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function Dt(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r=_({},e);for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=Dt(r[i],t[i],n-1));return r}function Hi(){return le()}function vr(){return le().substring(16)}var Gi="_sentrySpan";function $i(e,t){t?Ae(e,Gi,t):delete e[Gi]}function ji(e){return e[Gi]}var vd=100,ve=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Hi(),sampleRand:Math.random()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags=_({},this._tags),t._extra=_({},this._extra),t._contexts=_({},this._contexts),this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata=_({},this._sdkProcessingMetadata),t._propagationContext=_({},this._propagationContext),t._client=this._client,t._lastEventId=this._lastEventId,$i(t,ji(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&>(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags=_(_({},this._tags),t),this._notifyScopeListeners(),this}setTag(t,n){return this._tags=k(_({},this._tags),{[t]:n}),this._notifyScopeListeners(),this}setExtras(t){return this._extra=_(_({},this._extra),t),this._notifyScopeListeners(),this}setExtra(t,n){return this._extra=k(_({},this._extra),{[t]:n}),this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t=="function"?t(this):t,r=n instanceof e?n.getScopeData():mt(n)?t:void 0,{tags:i,extra:o,user:s,contexts:c,level:l,fingerprint:h=[],propagationContext:y}=r||{};return this._tags=_(_({},this._tags),i),this._extra=_(_({},this._extra),o),this._contexts=_(_({},this._contexts),c),s&&Object.keys(s).length&&(this._user=s),l&&(this._level=l),h.length&&(this._fingerprint=h),y&&(this._propagationContext=y),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,$i(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Hi(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:vd;if(r<=0)return this;let i=k(_({timestamp:tt()},t),{message:t.message?xt(t.message,2048):t.message});return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:ji(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Dt(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n?.event_id||le();if(!this._client)return R&&w.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(t,k(_({originalException:t,syntheticException:i},n),{event_id:r}),this),r}captureMessage(t,n,r){let i=r?.event_id||le();if(!this._client)return R&&w.warn("No client configured on scope - will not capture message!"),i;let o=new Error(t);return this._client.captureMessage(t,n,k(_({originalException:t,syntheticException:o},r),{event_id:i}),this),i}captureEvent(t,n){let r=n?.event_id||le();return this._client?(this._client.captureEvent(t,k(_({},n),{event_id:r}),this),r):(R&&w.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}};function Da(){return pt("defaultCurrentScope",()=>new ve)}function wa(){return pt("defaultIsolationScope",()=>new ve)}var Wi=class{constructor(t,n){let r;t?r=t:r=new ve;let i;n?i=n:i=new ve,this._stack=[{scope:r}],this._isolationScope=i}withScope(t){let n=this._pushScope(),r;try{r=t(n)}catch(i){throw this._popScope(),i}return ht(r)?r.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function on(){let e=Ft(),t=kt(e);return t.stack=t.stack||new Wi(Da(),wa())}function yd(e){return on().withScope(e)}function Ed(e,t){let n=on();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Aa(e){return on().withScope(()=>e(on().getIsolationScope()))}function Na(){return{withIsolationScope:Aa,withScope:yd,withSetScope:Ed,withSetIsolationScope:(e,t)=>Aa(t),getCurrentScope:()=>on().getScope(),getIsolationScope:()=>on().getIsolationScope()}}function yr(e){let t=kt(e);return t.acs?t.acs:Na()}function nt(){let e=Ft();return yr(e).getCurrentScope()}function rt(){let e=Ft();return yr(e).getIsolationScope()}function Er(){return pt("globalScope",()=>new ve)}function On(...e){let t=Ft(),n=yr(t);if(e.length===2){let[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function Q(){return nt().getClient()}function zi(e){let t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=t,o={trace_id:n,span_id:i||vr()};return r&&(o.parent_span_id=r),o}var Sr="sentry.source",Yi="sentry.sample_rate",Oa="sentry.previous_trace_sample_rate",qi="sentry.op",Ki="sentry.origin";var Xi="sentry.profile_id",Ji="sentry.exclusive_time";var Sd="_sentryScope",bd="_sentryIsolationScope";function br(e){return{scope:e[Sd],isolationScope:e[bd]}}var Cd="sentry-",Id=/^sentry-/;function Ma(e){let t=Td(e);if(!t)return;let n=Object.entries(t).reduce((r,[i,o])=>{if(i.match(Id)){let s=i.slice(Cd.length);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function Td(e){if(!(!e||!De(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{let r=Ra(n);return Object.entries(r).forEach(([i,o])=>{t[i]=o}),t},{}):Ra(e)}function Ra(e){return e.split(",").map(t=>t.split("=").map(n=>{try{return decodeURIComponent(n.trim())}catch{return}})).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function Pa(e){if(typeof e=="boolean")return Number(e);let t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}var ka=1,La=!1;function Qi(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:sn(e).parent_span_id,o=br(e).scope,s=r?o?.getPropagationContext().propagationSpanId||vr():t;return{parent_span_id:i,span_id:s,trace_id:n}}function xd(e){if(e&&e.length>0)return e.map(s=>{var c=s,{context:l}=c,h=l,{spanId:t,traceId:n,traceFlags:r}=h,i=Os(h,["spanId","traceId","traceFlags"]),{attributes:o}=c;return _({span_id:t,trace_id:n,sampled:r===ka,attributes:o},i)})}function Va(e){return typeof e=="number"?Fa(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Fa(e.getTime()):we()}function Fa(e){return e>9999999999?e/1e3:e}function sn(e){if(wd(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Dd(e)){let{attributes:r,startTime:i,name:o,endTime:s,status:c,links:l}=e,h="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:o,parent_span_id:h,start_timestamp:Va(i),timestamp:Va(s)||void 0,status:Ad(c),op:r[qi],origin:r[Ki],links:xd(l)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Dd(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function wd(e){return typeof e.getSpanJSON=="function"}function Ua(e){let{traceFlags:t}=e.spanContext();return t===ka}function Ad(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"unknown_error"}var Nd="_sentryRootSpan";function Rn(e){return e[Nd]||e}function Zi(){La||(Tt(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),La=!0)}function Ba(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=e||Q()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}var an="production";var Od=/^o(\d+)\./,Rd=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Md(e){return e==="http"||e==="https"}function wt(e,t=!1){let{host:n,path:r,pass:i,port:o,projectId:s,protocol:c,publicKey:l}=e;return`${c}://${l}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${s}`}function Pd(e){let t=Rd.exec(e);if(!t){Tt(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i="",o="",s="",c=""]=t.slice(1),l="",h=c,y=h.split("/");if(y.length>1&&(l=y.slice(0,-1).join("/"),h=y.pop()),h){let f=h.match(/^\d+/);f&&(h=f[0])}return Ha({host:o,pass:i,path:l,projectId:h,port:s,protocol:n,publicKey:r})}function Ha(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Ld(e){if(!R)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(w.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?Md(r)?t&&isNaN(parseInt(t,10))?(w.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(w.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(w.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Ga(e){return e.match(Od)?.[1]}function $a(e){let t=typeof e=="string"?Pd(e):Ha(e);if(!(!t||!Ld(t)))return t}var Vd="_frozenDsc";function ja(e,t){let n=t.getOptions(),{publicKey:r,host:i}=t.getDsn()||{},o;n.orgId?o=String(n.orgId):i&&(o=Ga(i));let s={environment:n.environment||an,release:n.release,public_key:r,trace_id:e,org_id:o};return t.emit("createDsc",s),s}function Wa(e,t){let n=t.getPropagationContext();return n.dsc||ja(n.traceId,e)}function eo(e){let t=Q();if(!t)return{};let n=Rn(e),r=sn(n),i=r.data,o=n.spanContext().traceState,s=o?.get("sentry.sample_rate")??i[Yi]??i[Oa];function c(N){return(typeof s=="number"||typeof s=="string")&&(N.sample_rate=`${s}`),N}let l=n[Vd];if(l)return c(l);let h=o?.get("sentry.dsc"),y=h&&Ma(h);if(y)return c(y);let f=ja(e.spanContext().traceId,t),E=i[Sr],v=r.description;return E!=="url"&&v&&(f.transaction=v),Ba()&&(f.sampled=String(Ua(n)),f.sample_rand=o?.get("sentry.sample_rand")??br(n).scope?.getPropagationContext().sampleRand.toString()),c(f),t.emit("createDsc",f,n),f}function Fe(e,t=100,n=1/0){try{return to("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Cr(e,t=3,n=100*1024){let r=Fe(e,t);return Bd(r)>n?Cr(e,t-1,n):r}function to(e,t,n=1/0,r=1/0,i=Hd()){let[o,s]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;let c=Fd(e,t);if(!c.startsWith("[object "))return c;if(t.__sentry_skip_normalization__)return t;let l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(l===0)return c.replace("object ","");if(o(t))return"[Circular ~]";let h=t;if(h&&typeof h.toJSON=="function")try{let v=h.toJSON();return to("",v,l-1,r,i)}catch{}let y=Array.isArray(t)?[]:{},f=0,E=gr(t);for(let v in E){if(!Object.prototype.hasOwnProperty.call(E,v))continue;if(f>=r){y[v]="[MaxProperties ~]";break}let N=E[v];y[v]=to(v,N,l-1,r,i),f++}return s(t),y}function Fd(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(wn(t))return"[VueViewModel]";if(Fi(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Ve(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=kd(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function kd(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function Ud(e){return~-encodeURI(e).split(/%..|./).length}function Bd(e){return Ud(JSON.stringify(e))}function Hd(){let e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function _t(e,t=[]){return[e,t]}function za(e,t){let[n,r]=e;return[n,[...r,t]]}function ro(e,t){let n=e[1];for(let r of n){let i=r[0].type;if(t(r,i))return!0}return!1}function no(e){let t=kt(V);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Ya(e){let[t,n]=e,r=JSON.stringify(t);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[no(r),o]:r.push(typeof o=="string"?no(o):o)}for(let o of n){let[s,c]=o;if(i(`
|
|
7
|
-
${JSON.stringify(s)}
|
|
8
|
-
`),typeof c=="string"||c instanceof Uint8Array)i(c);else{let l;try{l=JSON.stringify(c)}catch{l=JSON.stringify(Fe(c))}i(l)}}return typeof r=="string"?r:Gd(r)}function Gd(e){let t=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(t),r=0;for(let i of e)n.set(i,r),r+=i.length;return n}function qa(e){let t=typeof e.data=="string"?no(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var $d={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function io(e){return $d[e]}function oo(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Ka(e,t,n,r){let i=e.sdkProcessingMetadata?.dynamicSamplingContext;return _(_(_({event_id:e.event_id,sent_at:new Date().toISOString()},t&&{sdk:t}),!!n&&r&&{dsn:wt(r)}),i&&{trace:i})}function jd(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function Xa(e,t,n,r){let i=oo(n),o=_(_({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&t&&{dsn:wt(t)}),s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return _t(o,[s])}function Ja(e,t,n,r){let i=oo(n),o=e.type&&e.type!=="replay_event"?e.type:"event";jd(e,n?.sdk);let s=Ka(e,i,r,t);return delete e.sdkProcessingMetadata,_t(s,[[{type:o},e]])}var so=0,Qa=1,Za=2;function ke(e){return new Ye(t=>{t(e)})}function At(e){return new Ye((t,n)=>{n(e)})}var Ye=class e{constructor(t){this._state=so,this._handlers=[],this._runExecutor(t)}then(t,n){return new e((r,i)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(s){i(s)}},o=>{if(!n)i(o);else try{r(n(o))}catch(s){i(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,r)=>{let i,o;return this.then(s=>{o=!1,i=s,t&&t()},s=>{o=!0,i=s,t&&t()}).then(()=>{if(o){r(i);return}n(i)})})}_executeHandlers(){if(this._state===so)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Qa&&n[1](this._value),this._state===Za&&n[2](this._value),n[0]=!0)})}_runExecutor(t){let n=(o,s)=>{if(this._state===so){if(ht(s)){s.then(r,i);return}this._state=o,this._value=s,this._executeHandlers()}},r=o=>{n(Qa,o)},i=o=>{n(Za,o)};try{t(r,i)}catch(o){i(o)}}};function Ir(e,t,n,r=0){return new Ye((i,o)=>{let s=e[r];if(t===null||typeof s!="function")i(t);else{let c=s(_({},t),n);R&&s.id&&c===null&&w.log(`Event processor "${s.id}" dropped event`),ht(c)?c.then(l=>Ir(e,l,n,r+1).then(i)).then(null,o):Ir(e,c,n,r+1).then(i).then(null,o)}})}function ec(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;Wd(e,t),r&&qd(e,r),Kd(e,n),zd(e,i),Yd(e,o)}function ao(e,t){let{extra:n,tags:r,user:i,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:h,eventProcessors:y,attachments:f,propagationContext:E,transactionName:v,span:N}=t;Tr(e,"extra",n),Tr(e,"tags",r),Tr(e,"user",i),Tr(e,"contexts",o),e.sdkProcessingMetadata=Dt(e.sdkProcessingMetadata,c,2),s&&(e.level=s),v&&(e.transactionName=v),N&&(e.span=N),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),h.length&&(e.fingerprint=[...e.fingerprint,...h]),y.length&&(e.eventProcessors=[...e.eventProcessors,...y]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext=_(_({},e.propagationContext),E)}function Tr(e,t,n){e[t]=Dt(e[t],n,1)}function Wd(e,t){let{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:c}=t;Object.keys(n).length&&(e.extra=_(_({},n),e.extra)),Object.keys(r).length&&(e.tags=_(_({},r),e.tags)),Object.keys(i).length&&(e.user=_(_({},i),e.user)),Object.keys(o).length&&(e.contexts=_(_({},o),e.contexts)),s&&(e.level=s),c&&e.type!=="transaction"&&(e.transaction=c)}function zd(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Yd(e,t){e.sdkProcessingMetadata=_(_({},e.sdkProcessingMetadata),t)}function qd(e,t){e.contexts=_({trace:Qi(t)},e.contexts),e.sdkProcessingMetadata=_({dynamicSamplingContext:eo(t)},e.sdkProcessingMetadata);let n=Rn(t),r=sn(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function Kd(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}var xr,tc,Dr;function nc(e){let t=V._sentryDebugIds;if(!t)return{};let n=Object.keys(t);return Dr&&n.length===tc||(tc=n.length,Dr=n.reduce((r,i)=>{xr||(xr={});let o=xr[i];if(o)r[o[0]]=o[1];else{let s=e(i);for(let c=s.length-1;c>=0;c--){let h=s[c]?.filename,y=t[i];if(h&&y){r[h]=y,xr[i]=[h,y];break}}}return r},{})),Dr}function rc(e,t,n,r,i,o){let{normalizeDepth:s=3,normalizeMaxBreadth:c=1e3}=e,l=k(_({},t),{event_id:t.event_id||n.event_id||le(),timestamp:t.timestamp||tt()}),h=n.integrations||e.integrations.map(M=>M.name);Xd(l,e),Zd(l,h),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&Jd(l,e.stackParser);let y=tf(r,n.captureContext);n.mechanism&&et(l,n.mechanism);let f=i?i.getEventProcessors():[],E=Er().getScopeData();if(o){let M=o.getScopeData();ao(E,M)}if(y){let M=y.getScopeData();ao(E,M)}let v=[...n.attachments||[],...E.attachments];v.length&&(n.attachments=v),ec(l,E);let N=[...f,...E.eventProcessors];return Ir(N,l,n).then(M=>(M&&Qd(M),typeof s=="number"&&s>0?ef(M,s,c):M))}function Xd(e,t){let{environment:n,release:r,dist:i,maxValueLength:o=250}=t;e.environment=e.environment||n||an,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);let s=e.request;s?.url&&(s.url=xt(s.url,o))}function Jd(e,t){let n=nc(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.filename&&(i.debug_id=n[i.filename])})})}function Qd(e){let t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function Zd(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function ef(e,t,n){if(!e)return null;let r=_(_(_(_(_({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>_(_({},i),i.data&&{data:Fe(i.data,t,n)}))}),e.user&&{user:Fe(e.user,t,n)}),e.contexts&&{contexts:Fe(e.contexts,t,n)}),e.extra&&{extra:Fe(e.extra,t,n)});return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Fe(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>_(_({},i),i.data&&{data:Fe(i.data,t,n)}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Fe(e.contexts.flags,3,n)),r}function tf(e,t){if(!t)return e;let n=e?e.clone():new ve;return n.update(t),n}function ic(e){if(e)return nf(e)?{captureContext:e}:of(e)?{captureContext:e}:e}function nf(e){return e instanceof ve||typeof e=="function"}var rf=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function of(e){return Object.keys(e).some(t=>rf.includes(t))}function wr(e,t){return nt().captureException(e,ic(t))}function Mn(e,t){return nt().captureEvent(e,t)}function Pn(e){let t=rt(),n=nt(),{userAgent:r}=V.navigator||{},i=Ta(_(_({user:n.getUser()||t.getUser()},r&&{userAgent:r}),e)),o=t.getSession();return o?.status==="ok"&>(o,{status:"exited"}),Ar(),t.setSession(i),i}function Ar(){let e=rt(),n=nt().getSession()||e.getSession();n&&xa(n),sc(),e.setSession()}function sc(){let e=rt(),t=Q(),n=e.getSession();n&&t&&t.captureSession(n)}function Ln(e=!1){if(e){Ar();return}sc()}var sf="7";function af(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function cf(e){return`${af(e)}${e.projectId}/envelope/`}function uf(e,t){let n={sentry_version:sf};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function ac(e,t,n){return t||`${cf(e)}?${uf(e,n)}`}var cc=[];function uc(e,t){let n={};return t.forEach(r=>{r&&uo(e,r,n)}),n}function co(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function uo(e,t,n){if(n[t.name]){R&&w.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,cc.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),cc.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,o)=>r(i,o,e))}if(typeof t.processEvent=="function"){let r=t.processEvent.bind(t),i=Object.assign((o,s)=>r(o,s,e),{id:t.name});e.addEventProcessor(i)}R&&w.log(`Integration installed: ${t.name}`)}function lc(e,t,n){let r=[{type:"client_report"},{timestamp:n||tt(),discarded_events:e}];return _t(t?{dsn:t}:{},[r])}function Nr(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function dc(e){let{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:o,data:s,op:c}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:c,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??"",origin:o,profile_id:s?.[Xi],exclusive_time:s?.[Ji],measurements:e.measurements,is_segment:!0}}function fc(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:_(_(_({},e.data),e.profile_id&&{[Xi]:e.profile_id}),e.exclusive_time&&{[Ji]:e.exclusive_time})}},measurements:e.measurements}}var pc="Not capturing exception because it's already been captured.",mc="Discarded session because of missing or non-string release",_c=Symbol.for("SentryInternalError"),vc=Symbol.for("SentryDoNotSendEventError");function Or(e){return{message:e,[_c]:!0}}function lo(e){return{message:e,[vc]:!0}}function hc(e){return!!e&&typeof e=="object"&&_c in e}function gc(e){return!!e&&typeof e=="object"&&vc in e}var Vn=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=$a(t.dsn):R&&w.warn("No DSN provided, client will not send events."),this._dsn){let n=ac(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport(k(_({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},t.transportOptions),{url:n}))}}captureException(t,n,r){let i=le();if(_r(t))return R&&w.log(pc),i;let o=_({event_id:i},n);return this._process(this.eventFromException(t,o).then(s=>this._captureEvent(s,o,r))),o.event_id}captureMessage(t,n,r,i){let o=_({event_id:le()},r),s=tn(t)?t:String(t),c=Bt(t)?this.eventFromMessage(s,n,o):this.eventFromException(t,o);return this._process(c.then(l=>this._captureEvent(l,o,i))),o.event_id}captureEvent(t,n,r){let i=le();if(n?.originalException&&_r(n.originalException))return R&&w.log(pc),i;let o=_({event_id:i},n),s=t.sdkProcessingMetadata||{},c=s.capturedSpanScope,l=s.capturedSpanIsolationScope;return this._process(this._captureEvent(t,o,c||r,l)),o.event_id}captureSession(t){this.sendSession(t),gt(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){let n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(i=>r&&i))):ke(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){let n=this._integrations[t.name];uo(this,t,this._integrations),n||co(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Ja(t,this._dsn,this._options._metadata,this._options.tunnel);for(let o of n.attachments||[])r=za(r,qa(o));let i=this.sendEnvelope(r);i&&i.then(o=>this.emit("afterSendEvent",t,o),null)}sendSession(t){let{release:n,environment:r=an}=this._options;if("aggregates"in t){let o=t.attrs||{};if(!o.release&&!n){R&&w.warn(mc);return}o.release=o.release||n,o.environment=o.environment||r,t.attrs=o}else{if(!t.release&&!n){R&&w.warn(mc);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);let i=Xa(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){let i=`${t}:${n}`;R&&w.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(t,n){let r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{let i=r.indexOf(n);i>-1&&r.splice(i,1)}}emit(t,...n){let r=this._hooks[t];r&&r.forEach(i=>i(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(R&&w.error("Error while sending envelope:",n),n)):(R&&w.error("Transport disabled"),ke({}))}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=uc(this,t),co(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",i=!1,o=n.exception?.values;if(o){i=!0;for(let l of o)if(l.mechanism?.handled===!1){r=!0;break}}let s=t.status==="ok";(s&&t.errors===0||s&&r)&&(gt(t,k(_({},r&&{status:"crashed"}),{errors:t.errors||Number(i||r)})),this.captureSession(t))}_isClientDoneProcessing(t){return new Ye(n=>{let r=0,i=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),n(!0)):(r+=i,t&&r>=t&&(clearInterval(o),n(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,i){let o=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s?.length&&(n.integrations=s),this.emit("preprocessEvent",t,n),t.type||i.setLastEventId(t.event_id||n.event_id),rc(o,t,n,r,this,i).then(c=>{if(c===null)return c;this.emit("postprocessEvent",c,n),c.contexts=_({trace:zi(r)},c.contexts);let l=Wa(this,r);return c.sdkProcessingMetadata=_({dynamicSamplingContext:l},c.sdkProcessingMetadata),c})}_captureEvent(t,n={},r=nt(),i=rt()){return R&&fo(t)&&w.log(`Captured error event \`${Nr(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,i).then(o=>o.event_id,o=>{R&&(gc(o)?w.log(o.message):hc(o)?w.warn(o.message):w.warn(o))})}_processEvent(t,n,r,i){let o=this.getOptions(),{sampleRate:s}=o,c=yc(t),l=fo(t),h=t.type||"error",y=`before send for type \`${h}\``,f=typeof s>"u"?void 0:Pa(s);if(l&&typeof f=="number"&&Math.random()>f)return this.recordDroppedEvent("sample_rate","error"),At(lo(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));let E=h==="replay_event"?"replay":h;return this._prepareEvent(t,n,r,i).then(v=>{if(v===null)throw this.recordDroppedEvent("event_processor",E),lo("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return v;let G=ff(this,o,v,n);return df(G,y)}).then(v=>{if(v===null){if(this.recordDroppedEvent("before_send",E),c){let O=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",O)}throw lo(`${y} returned \`null\`, will not send event.`)}let N=r.getSession()||i.getSession();if(l&&N&&this._updateSessionFromEvent(N,v),c){let M=v.sdkProcessingMetadata?.spanCountBeforeProcessing||0,O=v.spans?v.spans.length:0,B=M-O;B>0&&this.recordDroppedEvent("before_send","span",B)}let G=v.transaction_info;if(c&&G&&v.transaction!==t.transaction){let M="custom";v.transaction_info=k(_({},G),{source:M})}return this.sendEvent(v,n),v}).then(null,v=>{throw gc(v)||hc(v)?v:(this.captureException(v,{data:{__sentry__:!0},originalException:v}),Or(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
9
|
-
Reason: ${v}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{let[i,o]=n.split(":");return{reason:i,category:o,quantity:r}})}_flushOutcomes(){R&&w.log("Flushing outcomes...");let t=this._clearOutcomes();if(t.length===0){R&&w.log("No outcomes to send");return}if(!this._dsn){R&&w.log("No dsn provided, will not send outcomes");return}R&&w.log("Sending outcomes:",t);let n=lc(t,this._options.tunnel&&wt(this._dsn));this.sendEnvelope(n)}};function df(e,t){let n=`${t} must return \`null\` or a valid event.`;if(ht(e))return e.then(r=>{if(!mt(r)&&r!==null)throw Or(n);return r},r=>{throw Or(`${t} rejected with ${r}`)});if(!mt(e)&&e!==null)throw Or(n);return e}function ff(e,t,n,r){let{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:s}=t,c=n;if(fo(c)&&i)return i(c,r);if(yc(c)){if(s){let l=s(dc(c));if(l?c=Dt(n,fc(l)):Zi(),c.spans){let h=[];for(let y of c.spans){let f=s(y);f?h.push(f):(Zi(),h.push(y))}c.spans=h}}if(o){if(c.spans){let l=c.spans.length;c.sdkProcessingMetadata=k(_({},n.sdkProcessingMetadata),{spanCountBeforeProcessing:l})}return o(c,r)}}return c}function fo(e){return e.type===void 0}function yc(e){return e.type==="transaction"}function pf(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function Ec(e,t,n,r){let i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=wt(r)),_t(i,[pf(e)])}function Fn(e,t){let n=t??mf(e)??[];if(n.length===0)return;let r=e.getOptions(),i=Ec(n,r._metadata,r.tunnel,e.getDsn());Sc().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(i)}function mf(e){return Sc().get(e)}function Sc(){return pt("clientToLogBufferMap",()=>new WeakMap)}var po=Symbol.for("SentryBufferFullError");function bc(e){let t=[];function n(){return e===void 0||t.length<e}function r(s){return t.splice(t.indexOf(s),1)[0]||Promise.resolve(void 0)}function i(s){if(!n())return At(po);let c=s();return t.indexOf(c)===-1&&t.push(c),c.then(()=>r(c)).then(null,()=>r(c).then(null,()=>{})),c}function o(s){return new Ye((c,l)=>{let h=t.length;if(!h)return c(!0);let y=setTimeout(()=>{s&&s>0&&c(!1)},s);t.forEach(f=>{ke(f).then(()=>{--h||(clearTimeout(y),c(!0))},l)})})}return{$:t,add:i,drain:o}}function hf(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function gf(e,t){return e[t]||e.all||0}function Cc(e,t,n=Date.now()){return gf(e,t)>n}function Ic(e,{statusCode:t,headers:n},r=Date.now()){let i=_({},e),o=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(o)for(let c of o.trim().split(",")){let[l,h,,,y]=c.split(":",5),f=parseInt(l,10),E=(isNaN(f)?60:f)*1e3;if(!h)i.all=r+E;else for(let v of h.split(";"))v==="metric_bucket"?(!y||y.split(";").includes("custom"))&&(i[v]=r+E):i[v]=r+E}else s?i.all=r+hf(s,r):t===429&&(i.all=r+60*1e3);return i}var _f=64;function Rr(e,t,n=bc(e.bufferSize||_f)){let r={},i=s=>n.drain(s);function o(s){let c=[];if(ro(s,(f,E)=>{let v=io(E);Cc(r,v)?e.recordDroppedEvent("ratelimit_backoff",v):c.push(f)}),c.length===0)return ke({});let l=_t(s[0],c),h=f=>{ro(l,(E,v)=>{e.recordDroppedEvent(f,io(v))})},y=()=>t({body:Ya(l)}).then(f=>(f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&R&&w.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),r=Ic(r,f),f),f=>{throw h("network_error"),R&&w.error("Encountered error running transport request:",f),f});return n.add(y).then(f=>f,f=>{if(f===po)return R&&w.error("Skipped sending event because buffer is full."),h("queue_overflow"),ke({});throw f})}return{send:o,flush:i}}function mo(e){e.user?.ip_address===void 0&&(e.user=k(_({},e.user),{ip_address:"{{auto}}"}))}function ho(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs=k(_({},e.attrs),{ip_address:"{{auto}}"})):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function go(e,t,n=[t],r="npm"){let i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:Qe})),version:Qe}),e._metadata=i}var vf=100;function it(e,t){let n=Q(),r=rt();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=vf}=n.getOptions();if(o<=0)return;let s=tt(),c=_({timestamp:s},e),l=i?Tt(()=>i(c,t)):c;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,o))}var Tc,yf="FunctionToString",xc=new WeakMap,Ef=()=>({name:yf,setupOnce(){Tc=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Gt(this),n=xc.has(Q())&&t!==void 0?t:this;return Tc.apply(n,e)}}catch{}},setup(e){xc.set(e,!0)}}),Mr=Ef;var Sf=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],bf="EventFilters",_o=(e={})=>{let t;return{name:bf,setup(n){let r=n.getOptions();t=Dc(e,r)},processEvent(n,r,i){if(!t){let o=i.getOptions();t=Dc(e,o)}return Cf(n,t)?null:n}}},Lr=(e={})=>k(_({},_o(e)),{name:"InboundFilters"});function Dc(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Sf],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Cf(e,t){if(e.type){if(e.type==="transaction"&&Tf(e,t.ignoreTransactions))return R&&w.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
10
|
-
Event: ${Ze(e)}`),!0}else{if(If(e,t.ignoreErrors))return R&&w.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
11
|
-
Event: ${Ze(e)}`),!0;if(Af(e))return R&&w.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
12
|
-
Event: ${Ze(e)}`),!0;if(xf(e,t.denyUrls))return R&&w.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
13
|
-
Event: ${Ze(e)}.
|
|
14
|
-
Url: ${Pr(e)}`),!0;if(!Df(e,t.allowUrls))return R&&w.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
15
|
-
Event: ${Ze(e)}.
|
|
16
|
-
Url: ${Pr(e)}`),!0}return!1}function If(e,t){return t?.length?Nr(e).some(n=>nn(n,t)):!1}function Tf(e,t){if(!t?.length)return!1;let n=e.transaction;return n?nn(n,t):!1}function xf(e,t){if(!t?.length)return!1;let n=Pr(e);return n?nn(n,t):!1}function Df(e,t){if(!t?.length)return!0;let n=Pr(e);return n?nn(n,t):!0}function wf(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Pr(e){try{let n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?wf(n):null}catch{return R&&w.error(`Cannot extract url for event ${Ze(e)}`),null}}function Af(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function yo(e,t,n,r,i,o){if(!i.exception?.values||!o||!ze(o.originalException,Error))return;let s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=vo(e,t,r,o.originalException,n,i.exception.values,s,0))}function vo(e,t,n,r,i,o,s,c){if(o.length>=n+1)return o;let l=[...o];if(ze(r[i],Error)){wc(s,c);let h=e(t,r[i]),y=l.length;Ac(h,i,y,c),l=vo(e,t,n,r[i],i,[h,...l],h,y)}return Array.isArray(r.errors)&&r.errors.forEach((h,y)=>{if(ze(h,Error)){wc(s,c);let f=e(t,h),E=l.length;Ac(f,`errors[${y}]`,E,c),l=vo(e,t,n,h,i,[f,...l],f,E)}}),l}function wc(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=k(_(_({},e.mechanism),e.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:t})}function Ac(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=k(_({},e.mechanism),{type:"chained",source:t,exception_id:n,parent_id:r})}function Eo(e){let t="console";Te(t,e),xe(t,Nf)}function Nf(){"console"in V&&Ti.forEach(function(e){e in V.console&&ue(V.console,e,function(t){return Zt[e]=t,function(...n){ce("console",{args:n,level:e}),Zt[e]?.apply(V.console,n)}})})}function So(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var Of="Dedupe",Rf=()=>{let e;return{name:Of,processEvent(t){if(t.type)return t;try{if(Mf(t,e))return R&&w.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Vr=Rf;function Mf(e,t){return t?!!(Pf(e,t)||Lf(e,t)):!1}function Pf(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Rc(e,t)||!Oc(e,t))}function Lf(e,t){let n=Nc(t),r=Nc(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Rc(e,t)||!Oc(e,t))}function Oc(e,t){let n=lr(e),r=lr(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){let o=r[i],s=n[i];if(o.filename!==s.filename||o.lineno!==s.lineno||o.colno!==s.colno||o.function!==s.function)return!1}return!0}function Rc(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Nc(e){return e.exception?.values?.[0]}function kn(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Fr(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}var Un=V;function bo(){return"history"in Un&&!!Un.history}function Vf(){if(!("fetch"in Un))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Bn(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Co(){if(typeof EdgeRuntime=="string")return!0;if(!Vf())return!1;if(Bn(Un.fetch))return!0;let e=!1,t=Un.document;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Bn(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){R&&w.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function To(e,t){let n="fetch";Te(n,e),xe(n,()=>Ff(void 0,t))}function Ff(e,t=!1){t&&!Co()||ue(V,"fetch",function(n){return function(...r){let i=new Error,{method:o,url:s}=kf(r),c={args:r,fetchData:{method:o,url:s},startTimestamp:we()*1e3,virtualError:i,headers:Uf(r)};return e||ce("fetch",_({},c)),n.apply(V,r).then(async l=>(e?e(l):ce("fetch",k(_({},c),{endTimestamp:we()*1e3,response:l})),l),l=>{if(ce("fetch",k(_({},c),{endTimestamp:we()*1e3,error:l})),Ut(l)&&l.stack===void 0&&(l.stack=i.stack,Ae(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 h=new URL(c.fetchData.url);l.message=`${l.message} (${h.host})`}catch{}throw l})}})}function Io(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Mc(e){return typeof e=="string"?e:e?Io(e,"url")?e.url:e.toString?e.toString():"":""}function kf(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[n,r]=e;return{url:Mc(n),method:Io(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:Mc(t),method:Io(t,"method")?String(t.method).toUpperCase():"GET"}}function Uf(e){let[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(va(t))return new Headers(t.headers)}catch{}}function xo(){return"npm"}var re=V,Do=0;function wo(){return Do>0}function ep(){Do++,setTimeout(()=>{Do--})}function $t(e,t={}){function n(i){return typeof i=="function"}if(!n(e))return e;try{let i=e.__sentry_wrapped__;if(i)return typeof i=="function"?i:e;if(Gt(e))return e}catch{return e}let r=function(...i){try{let o=i.map(s=>$t(s,t));return e.apply(this,o)}catch(o){throw ep(),On(s=>{s.addEventProcessor(c=>(t.mechanism&&(rn(c,void 0,void 0),et(c,t.mechanism)),c.extra=k(_({},c.extra),{arguments:i}),c)),wr(o)}),o}};try{for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}hr(r,e),Ae(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function Pc(){let e=Nn(),{referrer:t}=re.document||{},{userAgent:n}=re.navigator||{},r=_(_({},t&&{Referer:t}),n&&{"User-Agent":n});return{url:e,headers:r}}function kr(e,t){let n=Oo(e,t),r={type:op(t),value:sp(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function tp(e,t,n,r){let o=Q()?.getOptions().normalizeDepth,s=up(t),c={__serialized__:Cr(t,o)};if(s)return{exception:{values:[kr(e,s)]},extra:c};let l={exception:{values:[{type:Ht(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:ap(t,{isUnhandledRejection:r})}]},extra:c};if(n){let h=Oo(e,n);h.length&&(l.exception.values[0].stacktrace={frames:h})}return l}function Ao(e,t){return{exception:{values:[kr(e,t)]}}}function Oo(e,t){let n=t.stacktrace||t.stack||"",r=rp(t),i=ip(t);try{return e(n,r,i)}catch{}return[]}var np=/Minified React error #\d+;/i;function rp(e){return e&&np.test(e.message)?1:0}function ip(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Lc(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function op(e){let t=e?.name;return!t&&Lc(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function sp(e){let t=e?.message;return Lc(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function Vc(e,t,n,r){let i=n?.syntheticException||void 0,o=Ur(e,t,i,r);return et(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),ke(o)}function Fc(e,t,n="info",r,i){let o=r?.syntheticException||void 0,s=No(e,t,o,i);return s.level=n,r?.event_id&&(s.event_id=r.event_id),ke(s)}function Ur(e,t,n,r,i){let o;if(fr(t)&&t.error)return Ao(e,t.error);if(pr(t)||Pi(t)){let s=t;if("stack"in t)o=Ao(e,t);else{let c=s.name||(pr(s)?"DOMError":"DOMException"),l=s.message?`${c}: ${s.message}`:c;o=No(e,l,n,r),rn(o,l)}return"code"in s&&(o.tags=k(_({},o.tags),{"DOMException.code":`${s.code}`})),o}return Ut(t)?Ao(e,t):mt(t)||Ht(t)?(o=tp(e,t,n,i),et(o,{synthetic:!0}),o):(o=No(e,t,n,r),rn(o,`${t}`,void 0),et(o,{synthetic:!0}),o)}function No(e,t,n,r){let i={};if(r&&n){let o=Oo(e,n);o.length&&(i.exception={values:[{value:t,stacktrace:{frames:o}}]}),et(i,{synthetic:!0})}if(tn(t)){let{__sentry_template_string__:o,__sentry_template_values__:s}=t;return i.logentry={message:o,params:s},i}return i.message=t,i}function ap(e,{isUnhandledRejection:t}){let n=Bi(e),r=t?"promise rejection":"exception";return fr(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Ht(e)?`Event \`${cp(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function cp(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function up(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}var lp=5e3,Hn=class extends Vn{constructor(t){let n=dp(t),r=re.SENTRY_SDK_SOURCE||xo();go(n,"browser",["browser"],r),super(n);let{sendDefaultPii:i,sendClientReports:o,enableLogs:s,_experiments:c}=this._options,l=s??c?.enableLogs;re.document&&(o||l)&&re.document.addEventListener("visibilitychange",()=>{re.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),l&&Fn(this))}),l&&(this.on("flush",()=>{Fn(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{Fn(this)},lp)})),i&&(this.on("postprocessEvent",mo),this.on("beforeSendSession",ho))}eventFromException(t,n){return Vc(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Fc(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,i){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,i)}};function dp(e){return _({release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:re.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0},e)}var kc=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var de=V;var fp=1e3,Uc,Ro,Mo;function Po(e){Te("dom",e),xe("dom",pp)}function pp(){if(!de.document)return;let e=ce.bind(null,"dom"),t=Bc(e,!0);de.document.addEventListener("click",t,!1),de.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{let i=de[n]?.prototype;i?.hasOwnProperty?.("addEventListener")&&(ue(i,"addEventListener",function(o){return function(s,c,l){if(s==="click"||s=="keypress")try{let h=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},y=h[s]=h[s]||{refCount:0};if(!y.handler){let f=Bc(e);y.handler=f,o.call(this,s,f,l)}y.refCount++}catch{}return o.call(this,s,c,l)}}),ue(i,"removeEventListener",function(o){return function(s,c,l){if(s==="click"||s=="keypress")try{let h=this.__sentry_instrumentation_handlers__||{},y=h[s];y&&(y.refCount--,y.refCount<=0&&(o.call(this,s,y.handler,l),y.handler=void 0,delete h[s]),Object.keys(h).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,s,c,l)}}))})}function mp(e){if(e.type!==Ro)return!1;try{if(!e.target||e.target._sentryId!==Mo)return!1}catch{}return!0}function hp(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function Bc(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=gp(n);if(hp(n.type,r))return;Ae(n,"_sentryCaptured",!0),r&&!r._sentryId&&Ae(r,"_sentryId",le());let i=n.type==="keypress"?"input":n.type;mp(n)||(e({event:n,name:i,global:t}),Ro=n.type,Mo=r?r._sentryId:void 0),clearTimeout(Uc),Uc=de.setTimeout(()=>{Mo=void 0,Ro=void 0},fp)}}function gp(e){try{return e.target}catch{return null}}var Br;function Gn(e){let t="history";Te(t,e),xe(t,_p)}function _p(){if(de.addEventListener("popstate",()=>{let t=de.location.href,n=Br;if(Br=t,n===t)return;ce("history",{from:n,to:t})}),!bo())return;function e(t){return function(...n){let r=n.length>2?n[2]:void 0;if(r){let i=Br,o=vp(String(r));if(Br=o,i===o)return t.apply(this,n);ce("history",{from:i,to:o})}return t.apply(this,n)}}ue(de.history,"pushState",e),ue(de.history,"replaceState",e)}function vp(e){try{return new URL(e,de.location.origin).toString()}catch{return e}}var Hr={};function Lo(e){let t=Hr[e];if(t)return t;let n=de[e];if(Bn(n))return Hr[e]=n.bind(de);let r=de.document;if(r&&typeof r.createElement=="function")try{let i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);let o=i.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(i)}catch(i){kc&&w.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(Hr[e]=n.bind(de))}function Gr(e){Hr[e]=void 0}var jt="__sentry_xhr_v3__";function Vo(e){Te("xhr",e),xe("xhr",yp)}function yp(){if(!de.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){let i=new Error,o=we()*1e3,s=De(r[0])?r[0].toUpperCase():void 0,c=Ep(r[1]);if(!s||!c)return t.apply(n,r);n[jt]={method:s,url:c,request_headers:{}},s==="POST"&&c.match(/sentry_key/)&&(n.__sentry_own_request__=!0);let l=()=>{let h=n[jt];if(h&&n.readyState===4){try{h.status_code=n.status}catch{}let y={endTimestamp:we()*1e3,startTimestamp:o,xhr:n,virtualError:i};ce("xhr",y)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(h,y,f){return l(),h.apply(y,f)}}):n.addEventListener("readystatechange",l),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(h,y,f){let[E,v]=f,N=y[jt];return N&&De(E)&&De(v)&&(N.request_headers[E.toLowerCase()]=v),h.apply(y,f)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){let i=n[jt];if(!i)return t.apply(n,r);r[0]!==void 0&&(i.body=r[0]);let o={startTimestamp:we()*1e3,xhr:n};return ce("xhr",o),t.apply(n,r)}})}function Ep(e){if(De(e))return e;try{return e.toString()}catch{}}function Fo(e,t=Lo("fetch")){let n=0,r=0;function i(o){let s=o.body.length;n+=s,r++;let c=_({body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15},e.fetchOptions);if(!t)return Gr("fetch"),At("No fetch implementation available");try{return t(e.url,c).then(l=>(n-=s,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return Gr("fetch"),n-=s,r--,At(l)}}return Rr(e,i)}var Sp=30;var bp=50;function ko(e,t,n,r){let i={filename:e,function:t==="<anonymous>"?"?":t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var Cp=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ip=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Tp=/\((\S*)(?::(\d+))(?::(\d+))\)/,xp=e=>{let t=Cp.exec(e);if(t){let[,r,i,o]=t;return ko(r,"?",+i,+o)}let n=Ip.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){let s=Tp.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}let[i,o]=jc(n[1]||"?",n[2]);return ko(o,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},Hc=[Sp,xp],Dp=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,wp=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ap=e=>{let t=Dp.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let o=wp.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],i=t[1]||"?";return[i,r]=jc(i,r),ko(r,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Gc=[bp,Ap];var $c=[Hc,Gc],Uo=Ai(...$c),jc=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:"?",n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};var cn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var $r=1024,Np="Breadcrumbs",Op=(e={})=>{let t=_({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e);return{name:Np,setup(n){t.console&&Eo(Pp(n)),t.dom&&Po(Mp(n,t.dom)),t.xhr&&Vo(Lp(n)),t.fetch&&To(Vp(n)),t.history&&Gn(Fp(n)),t.sentry&&n.on("beforeSendEvent",Rp(n))}}},Wc=Op;function Rp(e){return function(n){Q()===e&&it({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Ze(n)},{event:n})}}function Mp(e,t){return function(r){if(Q()!==e)return;let i,o,s=typeof t=="object"?t.serializeAttribute:void 0,c=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;c&&c>$r&&(cn&&w.warn(`\`dom.maxStringLength\` cannot exceed ${$r}, but a value of ${c} was configured. Sentry will use ${$r} instead.`),c=$r),typeof s=="string"&&(s=[s]);try{let h=r.event,y=kp(h)?h.target:h;i=An(y,{keyAttrs:s,maxStringLength:c}),o=Ui(y)}catch{i="<unknown>"}if(i.length===0)return;let l={category:`ui.${r.name}`,message:i};o&&(l.data={"ui.component_name":o}),it(l,{event:r.event,name:r.name,global:r.global})}}function Pp(e){return function(n){if(Q()!==e)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:So(n.level),message:mr(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${mr(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;it(r,{input:n.args,level:n.level})}}function Lp(e){return function(n){if(Q()!==e)return;let{startTimestamp:r,endTimestamp:i}=n,o=n.xhr[jt];if(!r||!i||!o)return;let{method:s,url:c,status_code:l,body:h}=o,y={method:s,url:c,status_code:l},f={xhr:n.xhr,input:h,startTimestamp:r,endTimestamp:i},E={category:"xhr",data:y,type:"http",level:Fr(l)};e.emit("beforeOutgoingRequestBreadcrumb",E,f),it(E,f)}}function Vp(e){return function(n){if(Q()!==e)return;let{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){let o=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i},c={category:"fetch",data:o,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",c,s),it(c,s)}else{let o=n.response,s=k(_({},n.fetchData),{status_code:o?.status});n.fetchData.request_body_size,n.fetchData.response_body_size,o?.status;let c={input:n.args,response:o,startTimestamp:r,endTimestamp:i},l={category:"fetch",data:s,type:"http",level:Fr(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",l,c),it(l,c)}}}function Fp(e){return function(n){if(Q()!==e)return;let r=n.from,i=n.to,o=kn(re.location.href),s=r?kn(r):void 0,c=kn(i);s?.path||(s=o),o.protocol===c.protocol&&o.host===c.host&&(i=c.relative),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),it({category:"navigation",data:{from:r,to:i}})}}function kp(e){return!!e&&!!e.target}var Up=["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"],Bp="BrowserApiErrors",Hp=(e={})=>{let t=_({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1},e);return{name:Bp,setupOnce(){t.setTimeout&&ue(re,"setTimeout",zc),t.setInterval&&ue(re,"setInterval",zc),t.requestAnimationFrame&&ue(re,"requestAnimationFrame",Gp),t.XMLHttpRequest&&"XMLHttpRequest"in re&&ue(XMLHttpRequest.prototype,"send",$p);let n=t.eventTarget;n&&(Array.isArray(n)?n:Up).forEach(i=>jp(i,t))}}},Yc=Hp;function zc(e){return function(...t){let n=t[0];return t[0]=$t(n,{mechanism:{data:{function:Ve(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Gp(e){return function(t){return e.apply(this,[$t(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Ve(e)},handled:!1,type:"instrument"}})])}}function $p(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&ue(n,i,function(o){let s={mechanism:{data:{function:i,handler:Ve(o)},handled:!1,type:"instrument"}},c=Gt(o);return c&&(s.mechanism.data.handler=Ve(c)),$t(o,s)})}),e.apply(this,t)}}function jp(e,t){let r=re[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(ue(r,"addEventListener",function(i){return function(o,s,c){try{Wp(s)&&(s.handleEvent=$t(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ve(s),target:e},handled:!1,type:"instrument"}}))}catch{}return t.unregisterOriginalCallbacks&&zp(this,o,s),i.apply(this,[o,$t(s,{mechanism:{data:{function:"addEventListener",handler:Ve(s),target:e},handled:!1,type:"instrument"}}),c])}}),ue(r,"removeEventListener",function(i){return function(o,s,c){try{let l=s.__sentry_wrapped__;l&&i.call(this,o,l,c)}catch{}return i.call(this,o,s,c)}}))}function Wp(e){return typeof e.handleEvent=="function"}function zp(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}var qc=()=>({name:"BrowserSession",setupOnce(){if(typeof re.document>"u"){cn&&w.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Pn({ignoreDuration:!0}),Ln(),Gn(({from:e,to:t})=>{e!==void 0&&e!==t&&(Pn({ignoreDuration:!0}),Ln())})}});var Yp="GlobalHandlers",qp=(e={})=>{let t=_({onerror:!0,onunhandledrejection:!0},e);return{name:Yp,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Kp(n),Kc("onerror")),t.onunhandledrejection&&(Xp(n),Kc("onunhandledrejection"))}}},Xc=qp;function Kp(e){Oi(t=>{let{stackParser:n,attachStacktrace:r}=Jc();if(Q()!==e||wo())return;let{msg:i,url:o,line:s,column:c,error:l}=t,h=Zp(Ur(n,l||i,void 0,r,!1),o,s,c);h.level="error",Mn(h,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function Xp(e){Mi(t=>{let{stackParser:n,attachStacktrace:r}=Jc();if(Q()!==e||wo())return;let i=Jp(t),o=Bt(i)?Qp(i):Ur(n,i,void 0,r,!0);o.level="error",Mn(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Jp(e){if(Bt(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function Qp(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Zp(e,t,n,r){let i=e.exception=e.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},c=s.stacktrace=s.stacktrace||{},l=c.frames=c.frames||[],h=r,y=n,f=De(t)&&t.length>0?t:Nn();return l.length===0&&l.push({colno:h,filename:f,function:"?",in_app:!0,lineno:y}),e}function Kc(e){cn&&w.log(`Global Handler attached: ${e}`)}function Jc(){return Q()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var Qc=()=>({name:"HttpContext",preprocessEvent(e){if(!re.navigator&&!re.location&&!re.document)return;let t=Pc(),n=_(_({},t.headers),e.request?.headers);e.request=k(_(_({},t),e.request),{headers:n})}});var em="cause",tm=5,nm="LinkedErrors",rm=(e={})=>{let t=e.limit||tm,n=e.key||em;return{name:nm,preprocessEvent(r,i,o){let s=o.getOptions();yo(kr,s.stackParser,n,t,r,i)}}},Zc=rm;function Bo(e){return[Lr(),Mr(),Yc(),Wc(),Xc(),Zc(),Vr(),Qc(),qc()]}var eu={},tu,Ho,im;(()=>{let e=Bo({}).filter(t=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(t.name));Ho=new Hn({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:Fo,stackParser:Uo,integrations:e,environment:Kt.mode,release:`web-sdk@${ta}`,debug:Kt.debug,sampleRate:.5}),Ho.init()})();function nu(e,t,n){Ce.error(`${t}:`,e);let r=am(n);if(r.setTag("operation",t),e instanceof ra){om(r,e,t);return}r.captureException(e)}function om(e,t,n){if(sm(e,t),t.response){let r=t.response,i=t.responseText;e.setTag("error.message",t.message),r.status!=null&&e.setTag("http.status_code",r.status),r.statusText&&e.setTag("http.status_text",r.statusText),i&&typeof i=="object"&&"error"in i&&(e.setTag("http.error_code",i.error.code),e.setTag("http.error_message",i.error.message)),e.setExtras({responseText:t.responseText,statusText:r.statusText,responseType:r.type,redirected:r.redirected,responseUrl:r.url,originalError:t.message}),e.captureMessage(`${n} failed with ${r.status}`,"error");return}if(t.request){e.captureMessage(`No response was received for ${n}`,"error");return}}function sm(e,t){let n=t.request;if(!n)return;e.setExtras({body:t.requestBody,headers:n.headers,method:n.method,url:n.url});let r=n.headers?.get("Cooee-Retry-Attempt");r!==null&&e.setTag("retry.attempt",r)}function am(e){e??={};let{extra:t,tags:n}=e,r=new ve;if(r.setClient(Ho),r.setUser(im),e.triggerContext&&!e.engagementTrigger&&(e.engagementTrigger=e.triggerContext.triggerData),e.engagementTrigger){let i=e.engagementTrigger;r.setTags({"engagement.id":i.engagementID,"engagement.short_id":i.shortID,"engagement.objective":i.objective,"engagement.delivery_type":i.onsiteDeliveryType,"engagement.content_id":i.contentID,"engagement.variation":i.variation,"engagement.currency":i.currency})}return t&&r.setExtras(t),n&&r.setTags(n),tu&&r.setTags(tu),Object.keys(eu).forEach(i=>{r.setContext(i,eu[i])}),r.setTag("language",navigator.language),r.setTag("timezone",ru()),cm(r),r}function cm(e){window.Shopify&&(e.setTag("shopify.shop",window.Shopify.shop),e.setTag("shopify.currency",window.Shopify.currency?.active),e.setTag("shopify.locale",window.Shopify.locale),e.setTag("theme.schema_name",window.Shopify.theme?.schema_name),e.setTag("theme.schema_version",window.Shopify.theme?.schema_version))}var Wr=class{static format(t,n){let r=/{{\s*(\w+)\s*}}/;return n.replace(r,(i,o)=>{switch(o){case"amount":return this.formatWithDelimiters(t,2);case"amount_no_decimals":return this.formatWithDelimiters(t,0);case"amount_with_comma_separator":return this.formatWithDelimiters(t,2,".",",");case"amount_no_decimals_with_comma_separator":return this.formatWithDelimiters(t,0,".",",");case"amount_with_apostrophe_separator":return this.formatWithDelimiters(t,2,"'",".");case"amount_no_decimals_with_space_separator":return this.formatWithDelimiters(t,0," ");case"amount_with_space_separator":return this.formatWithDelimiters(t,2," ",",");case"amount_with_period_and_space_separator":return this.formatWithDelimiters(t,2," ",".");default:return i}})}static formatWithDelimiters(t,n=2,r=",",i="."){if(isNaN(t)||t==null)return"0";let s=(t/100).toFixed(n).split("."),c=s[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+r),l=s[1]?i+s[1]:"";return c+l}};function iu(){return window.CooeeSDK.runtimeData}function $n(e,t,n){return{[e]:Go(t,n),[e+"_wo_currency"]:t}}function Go(e,t){if(e==0&&t)return"Free";let n=iu(),r=Xe.get(),i=n.shopCurrencyCode||r.currency,o=n.currencyCode;o||Ce.warn("Currency code is not set in RuntimeData");let s=r.money?.format??n.moneyFormat,c;if(s&&i===o)c=Wr.format(e*100,s);else{let l;try{l=new Intl.NumberFormat(um(),{style:"currency",currency:o||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(h){return nu(h,"format-currency",{extra:{currentCurrency:o,shopCurrency:i}}),""}c=l.format(e),c=c.replace("\u20B9","Rs. "),r.money?.showCurrency&&o!=="INR"&&(c=c.concat(` ${o}`))}return c}function um(){let e="en";return typeof navigator<"u"&&(navigator.languages!==void 0&&navigator.languages.length>0?e=navigator.languages[0]:navigator.language&&(e=navigator.language)),e=e.split(";")[0],e=e.split("-")[0],e||"en"}var zr;function ru(){if(zr)return zr;try{return zr=Intl.DateTimeFormat().resolvedOptions().timeZone,zr}catch{return""}}var uu,q,lu,Yo,Wt,ou,du,fu,pu,qo,jo,Wo,lm,zo={},mu=[],dm=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Kr=Array.isArray;function vt(e,t){for(var n in t)e[n]=t[n];return e}function Ko(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function $o(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++lu,__i:-1,__u:0};return i==null&&q.vnode!=null&&q.vnode(o),o}function Xo(e){return e.children}function un(e,t){this.props=e,this.context=t}function ln(e,t){if(t==null)return e.__?ln(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?ln(e):null}function hu(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return hu(e)}}function su(e){(!e.__d&&(e.__d=!0)&&Wt.push(e)&&!qr.__r++||ou!=q.debounceRendering)&&((ou=q.debounceRendering)||du)(qr)}function qr(){for(var e,t,n,r,i,o,s,c=1;Wt.length;)Wt.length>c&&Wt.sort(fu),e=Wt.shift(),c=Wt.length,e.__d&&(n=void 0,i=(r=(t=e).__v).__e,o=[],s=[],t.__P&&((n=vt({},r)).__v=r.__v+1,q.vnode&&q.vnode(n),vu(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[i]:null,o,i??ln(r),!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,mm(o,n,s),n.__e!=i&&hu(n)));qr.__r=0}function gu(e,t,n,r,i,o,s,c,l,h,y){var f,E,v,N,G,M,O=r&&r.__k||mu,B=t.length;for(l=fm(n,t,O,l,B),f=0;f<B;f++)(v=n.__k[f])!=null&&(E=v.__i==-1?zo:O[v.__i]||zo,v.__i=f,M=vu(e,v,E,i,o,s,c,l,h,y),N=v.__e,v.ref&&E.ref!=v.ref&&(E.ref&&Jo(E.ref,null,v),y.push(v.ref,v.__c||N,v)),G==null&&N!=null&&(G=N),4&v.__u||E.__k===v.__k?l=_u(v,l,e):typeof v.type=="function"&&M!==void 0?l=M:N&&(l=N.nextSibling),v.__u&=-7);return n.__e=G,l}function fm(e,t,n,r,i){var o,s,c,l,h,y=n.length,f=y,E=0;for(e.__k=new Array(i),o=0;o<i;o++)(s=t[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(l=o+E,(s=e.__k[o]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?$o(null,s,null,null,null):Kr(s)?$o(Xo,{children:s},null,null,null):s.constructor==null&&s.__b>0?$o(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=e,s.__b=e.__b+1,c=null,(h=s.__i=pm(s,n,l,f))!=-1&&(f--,(c=n[h])&&(c.__u|=2)),c==null||c.__v==null?(h==-1&&(i>y?E--:i<y&&E++),typeof s.type!="function"&&(s.__u|=4)):h!=l&&(h==l-1?E--:h==l+1?E++:(h>l?E--:E++,s.__u|=4))):e.__k[o]=null;if(f)for(o=0;o<y;o++)(c=n[o])!=null&&(2&c.__u)==0&&(c.__e==r&&(r=ln(c)),Eu(c,c));return r}function _u(e,t,n){var r,i;if(typeof e.type=="function"){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=_u(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=ln(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function pm(e,t,n,r){var i,o,s=e.key,c=e.type,l=t[n];if(l===null&&e.key==null||l&&s==l.key&&c==l.type&&(2&l.__u)==0)return n;if(r>(l!=null&&(2&l.__u)==0?1:0))for(i=n-1,o=n+1;i>=0||o<t.length;){if(i>=0){if((l=t[i])&&(2&l.__u)==0&&s==l.key&&c==l.type)return i;i--}if(o<t.length){if((l=t[o])&&(2&l.__u)==0&&s==l.key&&c==l.type)return o;o++}}return-1}function au(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||dm.test(t)?n:n+"px"}function Yr(e,t,n,r,i){var o,s;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||au(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||au(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(pu,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=qo,e.addEventListener(t,o?Wo:jo,o)):e.removeEventListener(t,o?Wo:jo,o);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function cu(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=qo++;else if(t.t<n.u)return;return n(q.event?q.event(t):t)}}}function vu(e,t,n,r,i,o,s,c,l,h){var y,f,E,v,N,G,M,O,B,Z,Oe,Re,x,j,F,W,ie,ee=t.type;if(t.constructor!=null)return null;128&n.__u&&(l=!!(32&n.__u),o=[c=t.__e=n.__e]),(y=q.__b)&&y(t);e:if(typeof ee=="function")try{if(O=t.props,B="prototype"in ee&&ee.prototype.render,Z=(y=ee.contextType)&&r[y.__c],Oe=y?Z?Z.props.value:y.__:r,n.__c?M=(f=t.__c=n.__c).__=f.__E:(B?t.__c=f=new ee(O,Oe):(t.__c=f=new un(O,Oe),f.constructor=ee,f.render=gm),Z&&Z.sub(f),f.props=O,f.state||(f.state={}),f.context=Oe,f.__n=r,E=f.__d=!0,f.__h=[],f._sb=[]),B&&f.__s==null&&(f.__s=f.state),B&&ee.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=vt({},f.__s)),vt(f.__s,ee.getDerivedStateFromProps(O,f.__s))),v=f.props,N=f.state,f.__v=t,E)B&&ee.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),B&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(B&&ee.getDerivedStateFromProps==null&&O!==v&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(O,Oe),!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(O,f.__s,Oe)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(f.props=O,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(me){me&&(me.__=t)}),Re=0;Re<f._sb.length;Re++)f.__h.push(f._sb[Re]);f._sb=[],f.__h.length&&s.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(O,f.__s,Oe),B&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(v,N,G)})}if(f.context=Oe,f.props=O,f.__P=e,f.__e=!1,x=q.__r,j=0,B){for(f.state=f.__s,f.__d=!1,x&&x(t),y=f.render(f.props,f.state,f.context),F=0;F<f._sb.length;F++)f.__h.push(f._sb[F]);f._sb=[]}else do f.__d=!1,x&&x(t),y=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++j<25);f.state=f.__s,f.getChildContext!=null&&(r=vt(vt({},r),f.getChildContext())),B&&!E&&f.getSnapshotBeforeUpdate!=null&&(G=f.getSnapshotBeforeUpdate(v,N)),W=y,y!=null&&y.type===Xo&&y.key==null&&(W=yu(y.props.children)),c=gu(e,Kr(W)?W:[W],t,n,r,i,o,s,c,l,h),f.base=t.__e,t.__u&=-161,f.__h.length&&s.push(f),M&&(f.__E=f.__=null)}catch(me){if(t.__v=null,l||o!=null)if(me.then){for(t.__u|=l?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o[o.indexOf(c)]=null,t.__e=c}else for(ie=o.length;ie--;)Ko(o[ie]);else t.__e=n.__e,t.__k=n.__k;q.__e(me,t,n)}else o==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):c=t.__e=hm(n.__e,t,n,r,i,o,s,l,h);return(y=q.diffed)&&y(t),128&t.__u?void 0:c}function mm(e,t,n){for(var r=0;r<n.length;r++)Jo(n[r],n[++r],n[++r]);q.__c&&q.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){q.__e(o,i.__v)}})}function yu(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Kr(e)?e.map(yu):vt({},e)}function hm(e,t,n,r,i,o,s,c,l){var h,y,f,E,v,N,G,M=n.props,O=t.props,B=t.type;if(B=="svg"?i="http://www.w3.org/2000/svg":B=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(h=0;h<o.length;h++)if((v=o[h])&&"setAttribute"in v==!!B&&(B?v.localName==B:v.nodeType==3)){e=v,o[h]=null;break}}if(e==null){if(B==null)return document.createTextNode(O);e=document.createElementNS(i,B,O.is&&O),c&&(q.__m&&q.__m(t,o),c=!1),o=null}if(B==null)M===O||c&&e.data==O||(e.data=O);else{if(o=o&&uu.call(e.childNodes),M=n.props||zo,!c&&o!=null)for(M={},h=0;h<e.attributes.length;h++)M[(v=e.attributes[h]).name]=v.value;for(h in M)if(v=M[h],h!="children"){if(h=="dangerouslySetInnerHTML")f=v;else if(!(h in O)){if(h=="value"&&"defaultValue"in O||h=="checked"&&"defaultChecked"in O)continue;Yr(e,h,null,v,i)}}for(h in O)v=O[h],h=="children"?E=v:h=="dangerouslySetInnerHTML"?y=v:h=="value"?N=v:h=="checked"?G=v:c&&typeof v!="function"||M[h]===v||Yr(e,h,v,M[h],i);if(y)c||f&&(y.__html==f.__html||y.__html==e.innerHTML)||(e.innerHTML=y.__html),t.__k=[];else if(f&&(e.innerHTML=""),gu(t.type=="template"?e.content:e,Kr(E)?E:[E],t,n,r,B=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&ln(n,0),c,l),o!=null)for(h=o.length;h--;)Ko(o[h]);c||(h="value",B=="progress"&&N==null?e.removeAttribute("value"):N!=null&&(N!==e[h]||B=="progress"&&!N||B=="option"&&N!=M[h])&&Yr(e,h,N,M[h],i),h="checked",G!=null&&G!=e[h]&&Yr(e,h,G,M[h],i))}return e}function Jo(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(i){q.__e(i,n)}}function Eu(e,t,n){var r,i;if(q.unmount&&q.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Jo(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){q.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Eu(r[i],t,n||typeof e.type!="function");n||Ko(e.__e),e.__c=e.__=e.__e=void 0}function gm(e,t,n){return this.constructor(e,n)}uu=mu.slice,q={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(c){e=c}throw e}},lu=0,Yo=function(e){return e!=null&&e.constructor==null},un.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=vt({},this.state),typeof e=="function"&&(e=e(vt({},n),this.props)),e&&vt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),su(this))},un.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),su(this))},un.prototype.render=Xo,Wt=[],du=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,fu=function(e,t){return e.__v.__b-t.__v.__b},qr.__r=0,pu=/(PointerCapture)$|Capture$/i,qo=0,jo=cu(!1),Wo=cu(!0),lm=0;var Zo,Ne,Qo,Su,bu=0,Nu=[],fe=q,Cu=fe.__b,Iu=fe.__r,Tu=fe.diffed,xu=fe.__c,Du=fe.unmount,wu=fe.__;function _m(e,t){fe.__h&&fe.__h(Ne,e,bu||t),bu=0;var n=Ne.__H||(Ne.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ts(e,t){var n=_m(Zo++,7);return Em(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function vm(){for(var e;e=Nu.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Xr),e.__H.__h.forEach(es),e.__H.__h=[]}catch(t){e.__H.__h=[],fe.__e(t,e.__v)}}fe.__b=function(e){Ne=null,Cu&&Cu(e)},fe.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),wu&&wu(e,t)},fe.__r=function(e){Iu&&Iu(e),Zo=0;var t=(Ne=e.__c).__H;t&&(Qo===Ne?(t.__h=[],Ne.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(Xr),t.__h.forEach(es),t.__h=[],Zo=0)),Qo=Ne},fe.diffed=function(e){Tu&&Tu(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Nu.push(t)!==1&&Su===fe.requestAnimationFrame||((Su=fe.requestAnimationFrame)||ym)(vm)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Qo=Ne=null},fe.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Xr),n.__h=n.__h.filter(function(r){return!r.__||es(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],fe.__e(r,n.__v)}}),xu&&xu(e,t)},fe.unmount=function(e){Du&&Du(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Xr(r)}catch(i){t=i}}),n.__H=void 0,t&&fe.__e(t,n.__v))};var Au=typeof requestAnimationFrame=="function";function ym(e){var t,n=function(){clearTimeout(r),Au&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Au&&(t=requestAnimationFrame(n))}function Xr(e){var t=Ne,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Ne=t}function es(e){var t=Ne;e.__c=e.__(),Ne=t}function Em(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}var Sm=Symbol.for("preact-signals");function rs(){if(dn>1)dn--;else{for(var e,t=!1;jn!==void 0;){var n=jn;for(jn=void 0,ns++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Ru(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(ns=0,dn--,t)throw e}}var K=void 0;var jn=void 0,dn=0,ns=0,Jr=0;function Ou(e){if(K!==void 0){var t=e.n;if(t===void 0||t.t!==K)return t={i:0,S:e,p:K.s,n:void 0,t:K,e:void 0,x:void 0,r:t},K.s!==void 0&&(K.s.n=t),K.s=t,e.n=t,32&K.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=K.s,t.n=void 0,K.s.n=t,K.s=t),t}}function pe(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}pe.prototype.brand=Sm;pe.prototype.h=function(){return!0};pe.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};pe.prototype.U=function(e){if(this.t!==void 0){var t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}};pe.prototype.subscribe=function(e){var t=this;return zn(function(){var n=t.value,r=K;K=void 0;try{e(n)}finally{K=r}})};pe.prototype.valueOf=function(){return this.value};pe.prototype.toString=function(){return this.value+""};pe.prototype.toJSON=function(){return this.value};pe.prototype.peek=function(){var e=K;K=void 0;try{return this.value}finally{K=e}};Object.defineProperty(pe.prototype,"value",{get:function(){var e=Ou(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(ns>100)throw new Error("Cycle detected");this.v=e,this.i++,Jr++,dn++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{rs()}}}});function ot(e){return new pe(e)}function Ru(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Mu(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Pu(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function fn(e){pe.call(this,void 0),this.x=e,this.s=void 0,this.g=Jr-1,this.f=4}(fn.prototype=new pe).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Jr))return!0;if(this.g=Jr,this.f|=1,this.i>0&&!Ru(this))return this.f&=-2,!0;var e=K;try{Mu(this),K=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return K=e,Pu(this),this.f&=-2,!0};fn.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}pe.prototype.S.call(this,e)};fn.prototype.U=function(e){if(this.t!==void 0&&(pe.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};fn.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(fn.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Ou(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function is(e){return new fn(e)}function Lu(e){var t=e.u;if(e.u=void 0,typeof t=="function"){dn++;var n=K;K=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,os(e),r}finally{K=n,rs()}}}function os(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Lu(e)}function bm(e){if(K!==this)throw new Error("Out-of-order effect");Pu(this),K=e,this.f&=-2,8&this.f&&os(this),rs()}function Wn(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Wn.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};Wn.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Lu(this),Mu(this),dn++;var e=K;return K=this,bm.bind(this,e)};Wn.prototype.N=function(){2&this.f||(this.f|=2,this.o=jn,jn=this)};Wn.prototype.d=function(){this.f|=8,1&this.f||os(this)};function zn(e){var t=new Wn(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var as,ss;function pn(e,t){q[e]=t.bind(null,q[e]||function(){})}function Qr(e){ss&&ss(),ss=e&&e.S()}function Vu(e){var t=this,n=e.data,r=Im(n);r.value=n;var i=ts(function(){for(var o=t.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return t.__$u.c=function(){var s,c=t.__$u.S(),l=i.value;c(),Yo(l)||((s=t.base)==null?void 0:s.nodeType)!==3?(t.__$f|=1,t.setState({})):t.base.data=l},is(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}Vu.displayName="_st";Object.defineProperties(pe.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Vu},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});pn("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var i in r)if(i!=="children"){var o=r[i];o instanceof pe&&(n||(t.__np=n={}),n[i]=o,r[i]=o.peek())}}e(t)});pn("__r",function(e,t){Qr();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=(function(i){var o;return zn(function(){o=this}),o.c=function(){r.__$f|=1,r.setState({})},o})())),as=r,Qr(n),e(t)});pn("__e",function(e,t,n,r){Qr(),as=void 0,e(t,n,r)});pn("diffed",function(e,t){Qr(),as=void 0;var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,i=t.props;if(r){var o=n.U;if(o)for(var s in o){var c=o[s];c!==void 0&&!(s in r)&&(c.d(),o[s]=void 0)}else n.U=o={};for(var l in r){var h=o[l],y=r[l];h===void 0?(h=Cm(n,l,y,i),o[l]=h):h.o(y,i)}}}e(t)});function Cm(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,o=ot(n);return{o:function(s,c){o.value=s,r=c},d:zn(function(){var s=o.value.value;r[t]!==s&&(r[t]=s,i?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}pn("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var i in r){var o=r[i];o&&o.d()}}}}else{var s=t.__c;if(s){var c=s.__$u;c&&(s.__$u=void 0,c.d())}}e(t)});pn("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)});un.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u,r=n&&n.s!==void 0;for(var i in t)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){if(!(r||2&this.__$f||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var s in this.props)if(!(s in e))return!0;return!1};function Im(e){return ts(function(){return ot(e)},[])}var Zr=class{id;mID;vID;vName;imageURL;name;link;quantity;price;finalPrice;constructor(t){this.id=t.id,this.mID=t.mID,this.vID=t.vID,this.vName=t.vName,this.imageURL=t.imageURL,this.name=t.name,this.link=t.link,this.quantity=t.quantity,this.price=t.price,this.finalPrice=t.finalPrice??t.price}};var ei=class{url;alt;constructor(t){t.alt&&(this.alt=t.alt),this.url=t.url}};var ti=class{d;cmp;effective;constructor(t={}){this.d=t.d,this.cmp=t.cmp,this.effective=this.d}};var cs=class{id;mID;name;groupID;groupName;isSelected;constructor(t){t??={},this.id=t.id,this.mID=t.mID,this.name=t.name,this.groupID=t.groupID,this.groupName=t.groupName,this.isSelected=t.isSelected??!1}},ni=class{mID;name;imgs;link;price;sku;isAvailable;quantity;sellingPlans;selectedOptions;selectedSellingPlan;effectivePrice;constructor(t){t=t??{},this.mID=t.mID,this.name=t.name,this.imgs=t.imgs?.map(n=>new ei(n))??[],this.link=t.link,this.price=new ti(t.price),this.sku=t.sku,this.isAvailable=t.isAvailable,this.quantity=t.quantity,this.selectedOptions=t.selectedOptions??[],this.effectivePrice=ot(this.price.effective),t.sellingPlans?.length&&(this.selectedSellingPlan=ot(void 0)),this.sellingPlans=t.sellingPlans?.map(n=>{let r=new cs(n);return r.isSelected&&(this.selectedSellingPlan.value=r),r})}getOneImage(){return this.imgs[0]?.url}changeSellingPlan(t){this.selectedSellingPlan.value=t}hasEffectivePrice(){return this.effectivePrice.value!==this.price.d}};var ri=class{id;mID;name;options;imgs;vars;desc;link;slug;quantity;category;meta;reviews;tags;templateSuffix;selectedOrFirstVariant;selected=ot(!0);constructor(t){this.update(t),this.selectedOrFirstVariant=ot(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(t){this.vars=t,this.selectedOrFirstVariant.value=this.selectedVariant}get selectedVariant(){return this.vars.find(t=>t.isAvailable)??this.vars[0]}hasVariants(){return this.vars?.length>1}setSelectedVariant(t){this.selectedOrFirstVariant.value=t}setSelectedVariantByID(t){if(!t)return;let n=this.vars.find(r=>r.mID===t.toString());n&&this.setSelectedVariant(n)}update(t){return this.id=t.id??this.id,this.mID=t.mID??this.mID,this.name=t.name??this.name,this.imgs=t.imgs??this.imgs,this.desc=t.desc??this.desc,this.link=t.link??this.link,this.slug=t.slug??this.slug,this.quantity=t.quantity??this.quantity,this.meta=t.meta??this.meta,this.category=t.category??this.category,this.reviews=t.reviews??this.reviews,this.options=t.options??this.options,this.tags=t.tags??this.tags,this.templateSuffix=t.templateSuffix??this.templateSuffix,t.vars&&(this.vars=t.vars.map(n=>new ni(n))),this}toEmbed(t){return t=t??this.selectedOrFirstVariant.value,new Zr({id:this.id,mID:this.mID,vID:t.mID,vName:t.name,name:this.name,link:this.link,slug:this.slug,price:t.price.d,imageURL:t.getOneImage()??this.imgs?.[0].url})}getTemplateVariables(){let t=this.selectedOrFirstVariant.value,n=t.price,r=this.name,i=this.category,o=this.variantImage??this.firstImageURL,s=this.meta,c=this.tags?.join(",")??"",l=this.reviews?.rating,h=this.reviews?.totalReviews,y=n.cmp&&n.cmp>n.d,f=k(_({name:r},$n("price",n.d,!0)),{image_url:o,meta:s,category:i,rating:l,reviews:h,tags:c});if(t.hasEffectivePrice()){let v=$n("effective_price",t.effectivePrice.value,!0);Object.assign(f,v)}if(y){let v=n.cmp-n.d,N={discount_percent:(v/n.cmp*100).toFixed(0)};Object.assign(f,N),Object.assign(f,$n("compare_price",n.cmp)),Object.assign(f,$n("discount_price",v))}let E={name:t.name,quantity:t.quantity};return{product:f,variant:E}}};var ii=class{id;alt;shortID;sources;items;durationMS;thumbnail;card;bestSource;highSource;goodSource;lowSource;m3u8Source;constructor(t={}){if(this.id=t.id,this.alt=t.alt,this.shortID=t.shortID,this.sources=t.sources?.sort((n,r)=>r.height-n.height),this.durationMS=t.durationMS,this.thumbnail=t.thumbnail,this.items=t.items?t.items.map(n=>new ri(n)):[],this.card=t.card,this.sources){let n=[];for(let r of this.sources)r.format==="mp4"?n.push(r):r.format==="m3u8"&&!this.m3u8Source&&(this.m3u8Source=r);n.length>0&&(this.bestSource=n[0],this.highSource=n.length>1?n[1]:n[0],this.lowSource=n.length>2?n[n.length-1]:n[0])}}};var us=(n=>(n.CLASSIC="CLASSIC",n.ITEM_CARD_HEADER="ITEM_CARD_HEADER",n))(us||{});var Tm=(r=>(r.ON="ON",r.OFF="OFF",r.ON_HOVER="ON_HOVER",r))(Tm||{}),xm=(i=>(i.FIRST_ITEM="FIRST_ITEM",i.ITEM_SWIPER="ITEM_SWIPER",i.CARD="CARD",i.NONE="NONE",i))(xm||{});var Fu=class{videos;source;template;heading;autoPlay;showMuteButton;footerContent;detailPopup;playlistConfig;itemDetailConfig;constructor(t={}){this.videos=t.videos?.map(n=>new ii(n))??[],this.source=t.source,this.template=t.template,this.detailPopup=t.detailPopup??{template:"VIDEO_ONLY_VIEW"},this.heading=t.heading,this.showMuteButton=t.showMuteButton,this.autoPlay=t.autoPlay??"ON",this.footerContent=t.footerContent??"FIRST_ITEM",this.playlistConfig={videoSwiper:t.playlistConfig?.videoSwiper??void 0,itemCardClickBehavior:t.playlistConfig?.itemCardClickBehavior??"OPEN_VIDEO_DETAIL"},this.itemDetailConfig={template:t.itemDetailConfig?.template??"CLASSIC"}}showItems(){return this.footerContent==="FIRST_ITEM"||this.footerContent==="ITEM_SWIPER"}};function ku(e){e||(e=ae(Ot));let t=new Rs(n=>{if(e.destroyed){n.next();return}return e.onDestroy(n.next.bind(n))});return n=>n.pipe(Ps(t))}var Uu=(n=>(n.SINGLE_PANE="SINGLE_PANE",n.TWO_PANE="TWO_PANE",n))(Uu||{});var mn=class e{transform(t){return t==null?null:Go(t)}static \u0275fac=function(n){return new(n||e)};static \u0275pipe=Vs({name:"cooeeCurrency",type:e,pure:!0})};function Dm(e,t){if(e&1&&(te(0,"span",6),Ge(1,"cooeeCurrency"),Ge(2,"safeHtml")),e&2){L();let n=Ie(7);$("innerHTML",$e(2,3,$e(1,1,n.cmp)),Mt)}}function wm(e,t){if(e&1&&(P(0,"span",8),ne(1),U()),e&2){L();let n=Ie(14);D(),Pt(" ",n,"% off ")}}function Am(e,t){e&1&&(ne(0," Out of Stock "),te(1,"cooee-icon",15))}function Nm(e,t){e&1&&(ne(0," Add To Cart "),te(1,"cooee-icon",16))}var hn=class e{buttonClick=Ke();item=he.required();isButtonDisabled=dt(()=>{let t=this.item();return t.hasVariants()?!t.vars.some(n=>n.isAvailable):!t.selectedOrFirstVariant.value.isAvailable});addToCartClicked(t){t.stopPropagation(),this.buttonClick.emit(this.item())}getDiscountPercentage(t){return t.cmp&&t.cmp>t.d?Math.round((1-t.d/t.cmp)*100):0}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Se({type:e,selectors:[["cooee-item-card"]],inputs:{item:[1,"item"]},outputs:{buttonClick:"buttonClick"},decls:24,vars:18,consts:[[1,"card-body"],[1,"item-image",3,"alt","src"],[1,"item-info"],[1,"item-name"],[1,"prices"],[1,"item-price",3,"innerHTML"],[1,"item-cmp-price",3,"innerHTML"],["type","button",1,"shop-now-button",3,"click","href"],[1,"item-discount-percentage"],["type","button",1,"item-detail-button",3,"aria-label"],["name","open"],[1,"card-footer"],["type","button",1,"cta-button",3,"click","disabled"],["href","/cart","title","View Cart",1,"view-cart-button"],["width","32","height","32","src","https://img.icons8.com/material-sharp/48/shopping-cart.png","alt","shopping-cart"],["name","unavailable","aria-hidden","true"],["name","add","aria-hidden","true"]],template:function(n,r){if(n&1){let i=Le();Us(0),P(1,"div",0),te(2,"img",1),P(3,"div",2)(4,"div",3),ne(5),U(),P(6,"div",4),Be(7),te(8,"span",5),Ge(9,"cooeeCurrency"),Ge(10,"safeHtml"),X(11,Dm,3,5,"span",6),U(),P(12,"a",7),be("click",function(s){return ye(i),Ee(s.stopPropagation())}),ne(13," Shop now "),U(),Be(14),X(15,wm,2,1,"span",8),U(),P(16,"button",9),te(17,"cooee-icon",10),U()(),P(18,"div",11)(19,"button",12),be("click",function(s){return ye(i),Ee(r.addToCartClicked(s))}),X(20,Am,2,0)(21,Nm,2,0),U(),P(22,"a",13),te(23,"img",14),U()(),Bs()}if(n&2){let i=r.item().selectedOrFirstVariant.value;D(2),$("alt",qs(r.item().name))("src",r.item().firstImageURL,St),D(3),Pt(" ",r.item().name," "),D(2);let o=He(i.price);D(),$("innerHTML",$e(10,15,$e(9,13,o.d)),Mt),D(3),J(o.cmp?11:-1),D(),$("href","/products/"+r.item().slug,St),D(2);let s=He(r.getDiscountPercentage(i.price));D(),J(s>0?15:-1),D(),Fs("aria-label",er("View product details for ",r.item().name)),D(3),$("disabled",r.isButtonDisabled()),D(),J(r.isButtonDisabled()?20:21)}},dependencies:[Xt,mn,rr],styles:["[_nghost-%COMP%]{max-width:100%;position:relative;display:flex;flex-direction:column;gap:8px;padding:8px}.card-body[_ngcontent-%COMP%]{display:flex;gap:8px;width:100%;align-items:flex-start}.item-image[_ngcontent-%COMP%]{width:70px;height:70px;object-fit:cover;box-sizing:border-box;border-radius:var(--lc-media-radius)}.item-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3.5px;font-size:10.5px;margin-right:20px}.item-name[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.card-footer[_ngcontent-%COMP%]{display:flex;gap:6px;align-items:center}.cta-button[_ngcontent-%COMP%]{padding:10px;border:none;width:100%;text-align:center}.shop-now-button[_ngcontent-%COMP%], .item-discount-percentage[_ngcontent-%COMP%]{display:none;background:rgb(var(--lc-primary-button-bg-color));color:rgb(var(--lc-primary-button-color));border-radius:var(--lc-button-radius);font-size:12px;width:fit-content;height:auto;text-align:center;z-index:4;padding:2px 8px;text-decoration:none}.item-detail-button[_ngcontent-%COMP%]{position:absolute;top:8px;right:8px;cursor:pointer}.item-detail-button[_ngcontent-%COMP%] cooee-icon[name=open][_ngcontent-%COMP%]{color:#000;width:20px;height:20px;transition-duration:.2s}.item-detail-button[_ngcontent-%COMP%] cooee-icon[name=open][_ngcontent-%COMP%]:hover{color:rgba(var(--lc-primary-color))}.view-cart-button[_ngcontent-%COMP%]{display:none}"]})};var Om=e=>({active:e}),Rm=(e,t)=>t.mID;function Mm(e,t){e&1&&ge(0)}function Pm(e,t){e&1&&ge(0)}function Lm(e,t){e&1&&ge(0)}function Vm(e,t){if(e&1&&(P(0,"div",11)(1,"div",12),ne(2,"Shop Now"),U(),Ue(3,Mm,1,0,"ng-container",10),U(),P(4,"div",13),Ue(5,Pm,1,0,"ng-container",10),P(6,"div",14),Ue(7,Lm,1,0,"ng-container",10),U()()),e&2){L(2);let n=_e(4),r=_e(6),i=_e(8);D(3),$("ngTemplateOutlet",n),D(2),$("ngTemplateOutlet",r),D(2),$("ngTemplateOutlet",i)}}function Fm(e,t){e&1&&ge(0)}function km(e,t){e&1&&ge(0)}function Um(e,t){e&1&&ge(0)}function Bm(e,t){e&1&&ge(0)}function Hm(e,t){e&1&&ge(0)}function Gm(e,t){if(e&1&&(P(0,"div",15),te(1,"cooee-item-card",16),Ue(2,Fm,1,0,"ng-container",10),U(),P(3,"div",13)(4,"div",17),Ue(5,km,1,0,"ng-container",10)(6,Um,1,0,"ng-container",10)(7,Bm,1,0,"ng-container",10)(8,Hm,1,0,"ng-container",10),U()()),e&2){let n=L(2),r=_e(4),i=_e(6),o=_e(10),s=_e(12),c=_e(14);D(),$("item",n.item()),D(),$("ngTemplateOutlet",r),D(3),$("ngTemplateOutlet",c),D(),$("ngTemplateOutlet",i),D(),$("ngTemplateOutlet",s),D(),$("ngTemplateOutlet",o)}}function $m(e,t){e&1&&ge(0)}function jm(e,t){if(e&1&&(P(0,"div",7),X(1,Vm,8,3)(2,Gm,9,6),P(3,"div",9),Ue(4,$m,1,0,"ng-container",10),U()()),e&2){let n=L(),r=_e(16),i=n.template()===n.ItemDetailTemplate.CLASSIC;D(),J(i?1:2),D(3),$("ngTemplateOutlet",r)}}function Wm(e,t){e&1&&ge(0)}function zm(e,t){e&1&&ge(0)}function Ym(e,t){e&1&&ge(0)}function qm(e,t){e&1&&ge(0)}function Km(e,t){if(e&1&&(P(0,"div",8)(1,"div",18),Ue(2,Wm,1,0,"ng-container",10),U(),P(3,"div",17),Ue(4,zm,1,0,"ng-container",10)(5,Ym,1,0,"ng-container",10)(6,qm,1,0,"ng-container",10),U()()),e&2){L();let n=_e(4),r=_e(6),i=_e(8),o=_e(16);D(2),$("ngTemplateOutlet",r),D(2),$("ngTemplateOutlet",n),D(),$("ngTemplateOutlet",i),D(),$("ngTemplateOutlet",o)}}function Xm(e,t){if(e&1){let n=Le();P(0,"button",19),be("click",function(){ye(n);let i=L();return Ee(i.close())}),te(1,"cooee-icon",20),U()}}function Jm(e,t){if(e&1&&te(0,"img",22),e&2){let n=t.$implicit,r=L(2);$("src",n.url,St)("alt",n.alt??r.item().name)}}function Qm(e,t){if(e&1&&(P(0,"div",21),bt(1,Jm,1,2,"img",22,ks),U()),e&2){let n=L();D(),Ct(n.item().imgs)}}function Zm(e,t){if(e&1&&(te(0,"span",25),Ge(1,"cooeeCurrency"),Ge(2,"safeHtml")),e&2){L(2);let n=Ie(2);$("innerHTML",$e(2,3,$e(1,1,n.d)),Mt)}}function eh(e,t){if(e&1&&(te(0,"span",26),Ge(1,"cooeeCurrency"),Ge(2,"safeHtml")),e&2){L(2);let n=Ie(2);$("innerHTML",$e(2,3,$e(1,1,n.cmp)),Mt)}}function th(e,t){if(e&1&&(P(0,"div",24),X(1,Zm,3,5,"span",25),X(2,eh,3,5,"span",26),U()),e&2){L();let n=Ie(2);D(),J(n.d?1:-1),D(),J(n.cmp?2:-1)}}function nh(e,t){e&1&&ge(0)}function rh(e,t){e&1&&ge(0)}function ih(e,t){e&1&&ge(0)}function oh(e,t){if(e&1&&(P(0,"div",23),ne(1),U(),Be(2),X(3,th,3,2,"div",24),Ue(4,nh,1,0,"ng-container",10)(5,rh,1,0,"ng-container",10)(6,ih,1,0,"ng-container",10)),e&2){let n=L(),r=_e(10),i=_e(12),o=_e(14),s=Ie(0);D(),lt(n.item().name),D();let c=He(s.price);D(),J(c?3:-1),D(),$("ngTemplateOutlet",i),D(),$("ngTemplateOutlet",o),D(),$("ngTemplateOutlet",r)}}function sh(e,t){if(e&1&&(P(0,"div",27),ne(1,"Description"),U(),te(2,"div",28),Ge(3,"safeHtml")),e&2){let n=L(2);D(2),$("innerHTML",$e(3,1,n.item().desc),Mt)}}function ah(e,t){if(e&1&&X(0,sh,4,3),e&2){let n=L();J(n.item().desc?0:-1)}}function ch(e,t){if(e&1){let n=Le();P(0,"a",32),be("click",function(i){let o=ye(n).$implicit,s=L(3);return Ee(s.changeItem(i,o))}),te(1,"img",22),U()}if(e&2){let n=t.$implicit,r=L(3);$("ngClass",tr(3,Om,n.mID===r.item().mID+"")),D(),$("src",n.firstImageURL,St)("alt",r.item().name)}}function uh(e,t){if(e&1&&(P(0,"span",29),ne(1,"Select product"),U(),P(2,"div",30),bt(3,ch,2,5,"a",31,Rm),U()),e&2){let n=L(2);D(3),Ct(n.similarItems())}}function lh(e,t){if(e&1&&X(0,uh,5,0),e&2){let n=L();J(n.similarItems().length>1?0:-1)}}function dh(e,t){if(e&1&&(P(0,"span",33),ne(1,"Select variant"),U(),te(2,"cooee-item-options-picker",16)),e&2){let n=L(2);D(2),$("item",n.item())}}function fh(e,t){if(e&1&&X(0,dh,3,1),e&2){let n=L();J(n.item().hasVariants()?0:-1)}}function ph(e,t){e&1&&(ne(0," Add To Cart "),te(1,"cooee-icon",41))}function mh(e,t){e&1&&(ne(0," Out of stock "),te(1,"cooee-icon",42))}function hh(e,t){if(e&1&&(P(0,"span",40),ne(1),U()),e&2){let n=L(2);D(),lt(n.currentVideoCartItemsCount())}}function gh(e,t){if(e&1){let n=Le();P(0,"div",34)(1,"button",35),be("click",function(){ye(n);let i=L();return Ee(i.clickAddToCart())}),X(2,ph,2,0)(3,mh,2,0),U(),P(4,"button",36),be("click",function(){ye(n);let i=L();return Ee(i.goToPDP())}),ne(5," More Info "),te(6,"cooee-icon",37),U(),P(7,"button",38),be("click",function(){ye(n);let i=L();return Ee(i.openCart())}),te(8,"img",39),X(9,hh,2,1,"span",40),U()()}if(e&2){let n=L(),r=Ie(0);D(),$("disabled",!r.isAvailable),D(),J(r.isAvailable?2:3),D(7),J(n.currentVideoCartItemsCount()?9:-1)}}var Bu=class e{closeClick=new En;layout=bn("SINGLE_PANE");item=bn.required();similarItems=he([]);template=he("CLASSIC");cartItems=ct([]);currentVideoCartItemsCount=dt(()=>{let t=this.item(),n=this.cartItems();return!t||!n.length?0:n.filter(r=>r.mID===t.mID).reduce((r,i)=>r+i.quantity,0)});ItemDetailTemplate=us;engagementService=ae(We);destroyRef=ae(Ot);lastLayout=null;resizeObserver=new Qt(()=>{Ci()?(this.lastLayout===null&&(this.lastLayout=this.layout()),this.layout.set("SINGLE_PANE")):this.lastLayout!==null&&(this.layout.set(this.lastLayout),this.lastLayout=null)});ngOnInit(){this.subscribeToCartChanges()}ngOnDestroy(){this.resizeObserver.destroy()}close(){this.closeClick.emit()}clickAddToCart(){this.engagementService.executeCTA(je.ADD_TO_CART,{item:this.item()}),this.close()}openCart(){this.engagementService.executeCTA(je.OPEN_CART)}changeItem(t,n){t.stopPropagation(),t.preventDefault(),this.item.set(n)}goToPDP(){this.engagementService.executeCTA(je.GO_TO_PRODUCT,{item:this.item()})}isSinglePane(){return this.layout()!=="TWO_PANE"||Ci()}subscribeToCartChanges(){window.CooeeSDK.cartChange$.pipe(Ms({cart:window.CooeeSDK.cart.getCooeeCart()}),ku(this.destroyRef)).subscribe(t=>{this.cartItems.set(t.cart?.items??[])})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Se({type:e,selectors:[["cooee-item-detail"]],hostAttrs:[1,"letscooee-widget"],inputs:{layout:[1,"layout"],item:[1,"item"],similarItems:[1,"similarItems"],template:[1,"template"]},outputs:{closeClick:"closeClick",layout:"layoutChange",item:"itemChange"},features:[Lt([We])],decls:17,vars:2,consts:[["closeButtonTemplate",""],["imageStripTemplate",""],["bodyTemplate",""],["descriptionTemplate",""],["productSelectorTemplate",""],["variantSelectorTemplate",""],["footerButtonsTemplate",""],[1,"lc-card-wrapper","card-wrapper","single-pane"],[1,"card-wrapper","two-pane"],[1,"lc-card-footer","card-footer"],[4,"ngTemplateOutlet"],[1,"lc-card-header","card-header"],[1,"lc-header","header"],[1,"card-content"],[1,"lc-inner-body","inner-body"],[1,"card-header"],[3,"item"],[1,"inner-body"],[1,"images-container"],["type","button","aria-label","Close product details",1,"lc-close-button","close-button",3,"click"],["name","close","aria-hidden","true"],[1,"image-strip"],[3,"src","alt"],[1,"lc-item-name","item-name"],[1,"lc-prices","prices"],[1,"lc-item-price","item-price",3,"innerHTML"],[1,"lc-item-cmp-price","item-cmp-price",3,"innerHTML"],[1,"lc-description-title","description-title"],[1,"lc-description","description",3,"innerHTML"],[1,"lc-selected-product-title","selected-product-title"],[1,"lc-image-strip","image-strip"],["href","#",1,"product-selector",3,"ngClass"],["href","#",1,"product-selector",3,"click","ngClass"],[1,"selected-variant-title"],[1,"footer-buttons"],["type","button",1,"lc-cta-button","cta-button",3,"click","disabled"],["type","button",1,"lc-more-info-button","more-info-button",3,"click"],["name","info","aria-hidden","true",1,"more-info-icon"],["type","button","aria-label","View cart","title","View Cart",1,"view-cart-button",3,"click"],["width","32","height","32","src","https://img.icons8.com/material-sharp/48/shopping-cart.png","alt","shopping-cart"],["aria-live","polite","aria-atomic","true",1,"cart-icon-badge"],["name","add","aria-hidden","true",1,"add-to-cart-icon"],["name","unavailable","aria-hidden","true"]],template:function(n,r){n&1&&(Be(0),X(1,jm,5,2,"div",7)(2,Km,7,4,"div",8),Ue(3,Xm,2,0,"ng-template",null,0,It)(5,Qm,3,0,"ng-template",null,1,It)(7,oh,7,6,"ng-template",null,2,It)(9,ah,1,1,"ng-template",null,3,It)(11,lh,1,1,"ng-template",null,4,It)(13,fh,1,1,"ng-template",null,5,It)(15,gh,10,3,"ng-template",null,6,It)),n&2&&(He(r.item().selectedOrFirstVariant.value),D(),J(r.isSinglePane()?1:2))},dependencies:[Js,ar,Xt,Zs,hn,rr,mn],styles:["[_nghost-%COMP%]{display:block;background:#fff}.card-wrapper[_ngcontent-%COMP%]{position:relative}.card-wrapper.single-pane[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:auto}.card-wrapper.two-pane[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr}.card-header[_ngcontent-%COMP%]{display:var(--header-display, flex);flex-direction:row;justify-content:space-between;align-items:start;padding:8px 16px;border-bottom:1px solid var(--lc-color-gray-300)}.header[_ngcontent-%COMP%]{font-size:24px;font-weight:var(--lc-subheading-weight);color:rgba(var(--lc-subheading-color))}.close-button[_ngcontent-%COMP%]{background:transparent;border:none;width:36px;height:36px}.close-button[_ngcontent-%COMP%] cooee-icon[_ngcontent-%COMP%]{color:#000000b3}.two-pane[_ngcontent-%COMP%] .close-button[_ngcontent-%COMP%]{position:absolute;top:8px;right:4px}.card-content[_ngcontent-%COMP%]{flex:1;overflow-y:auto;overscroll-behavior:contain} cooee-item-card .item-info{margin-right:0!important} cooee-item-card .item-detail-button{display:none!important} cooee-item-card .card-footer{display:none!important}.inner-body[_ngcontent-%COMP%]{padding:16px;display:flex;flex-direction:column;gap:8px}.images-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:start}.image-strip[_ngcontent-%COMP%]{width:100%;display:flex;overflow-x:auto;gap:8px;flex-wrap:nowrap}.image-strip[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:auto;height:200px}.two-pane[_ngcontent-%COMP%] .image-strip[_ngcontent-%COMP%]{padding:16px}.product-selector[_ngcontent-%COMP%]{height:100px;flex-shrink:0;border-radius:var(--lc-media-radius);padding:2px}.product-selector.active[_ngcontent-%COMP%]{border:1px solid rgba(var(--lc-primary-color))}.product-selector[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-height:100%;border-radius:var(--lc-media-radius)}.description-title[_ngcontent-%COMP%], .selected-product-title[_ngcontent-%COMP%], .selected-variant-title[_ngcontent-%COMP%]{font-size:var(--lc-subheading-size);font-weight:var(--lc-subheading-weight);color:rgba(var(--lc-subheading-color));margin-top:8px;line-height:normal}.description[_ngcontent-%COMP%]{line-height:normal;color:#000;font-size:var(--lc-description-size);font-weight:var(--lc-description-weight)}.card-footer[_ngcontent-%COMP%]{padding:var(--lc-item-detail-footer-padding);background-color:rgba(var(--lc-item-detail-footer-bg-color));box-shadow:var(--lc-item-detail-footer-box-shadow)}.footer-buttons[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:12px}.two-pane[_ngcontent-%COMP%] .footer-buttons[_ngcontent-%COMP%]{margin-top:16px}.cta-button[_ngcontent-%COMP%], .more-info-button[_ngcontent-%COMP%]{width:50%;padding:12px;display:flex;justify-content:center;align-items:center}.more-info-button[_ngcontent-%COMP%]{background-color:rgba(var(--lc-secondary-button-bg-color));color:rgba(var(--lc-secondary-button-color));font-weight:var(--lc-secondary-button-weight);text-transform:var(--lc-secondary-button-transform);border-radius:var(--lc-button-radius);font-size:var(--lc-button-size);font-family:var(--lc-button-family),serif;height:var(--lc-button-height);letter-spacing:var(--lc-button-letter-spacing);transition:filter .12s ease,background-color .2s ease,color .2s ease;border-width:1px;border-style:solid;border-color:rgba(var(--lc-secondary-button-border-color));display:flex;align-items:center;justify-content:center;gap:8px}.more-info-button[_ngcontent-%COMP%] cooee-icon[_ngcontent-%COMP%]{display:var(--lc-button-icon-display);width:var(--lc-button-icon-size, 20px)!important;height:var(--lc-button-icon-size, 20px)!important;color:inherit}.more-info-button[_ngcontent-%COMP%]:hover{filter:brightness(.95)}.more-info-button[_ngcontent-%COMP%]:active{filter:brightness(.9)}.more-info-button[_ngcontent-%COMP%]:focus-visible{outline:2px solid rgba(var(--lc-primary-color, 0, 0, 0));outline-offset:2px}.view-cart-button[_ngcontent-%COMP%]{position:relative}.view-cart-button[_ngcontent-%COMP%] .cart-icon-badge[_ngcontent-%COMP%]{position:absolute;top:-6px;right:-6px;background-color:rgba(var(--lc-primary-color));color:#fff;border-radius:50%;width:18px;height:18px;font-size:12px;display:flex;align-items:center;justify-content:center}"]})};var _h=[[["swiper-slides"]]],vh=["swiper-slides"],yh=(e,t)=>({"--swiper-navigation-size":e,color:t}),Eh=e=>({color:e,bottom:0,top:"unset",position:"relative"});function Sh(e,t){if(e&1&&(qe(0,"div",2),Jn(1,"span"),ut(),qe(2,"div",3),Jn(3,"span"),ut()),e&2){let n,r,i=L(),o=((n=i.navigationConfig())==null?null:n.size)??50,s=((r=i.navigationConfig())==null||r.color==null?null:r.color.rgba)??"white",c=Ks(4,yh,o+"px",s);Qn(c),D(2),Qn(c)}}function bh(e,t){if(e&1&&(qe(0,"div",4),Jn(1,"span"),ut()),e&2){let n,r=((n=L().paginationConfig())==null||n.color==null?null:n.color.rgba)??"white",i=tr(2,Eh,r);Qn(i)}}var Hu=class e{options=he.required();navigationConfig=he();paginationConfig=he();slideChange=Ke();elementRef=ae(Rt);swiperInstance;initToken=0;resizeDebouncer=new Qt(this.onResize.bind(this));constructor(){ft(()=>{this.options()&&this.reInitSwiper()})}get swiper(){return this.swiperInstance}ngOnDestroy(){this.resizeDebouncer?.destroy(),this.swiperInstance?.destroy?.(),this.swiperInstance=void 0}async initSwiper(t=this.initToken){if(await ir(),t!==this.initToken){Ce.warn("Swiper token not matching");return}let n=this.elementRef.nativeElement,r={nextEl:n.querySelector(".swiper-button-next"),prevEl:n.querySelector(".swiper-button-prev"),enabled:this.navigationConfig()?.enabled},i=this.paginationConfig(),o={el:n.querySelector(".swiper-pagination"),enabled:this.paginationConfig()?.enabled,type:this.paginationConfig()?.type,clickable:!0,renderBullet:function(s,c){return`
|
|
17
|
-
<span class="${c}"
|
|
18
|
-
style="background-color: ${i?.color?.rgba};"></span>
|
|
19
|
-
`},renderProgressbar:s=>`
|
|
20
|
-
<span class="${s}"
|
|
21
|
-
style="background-color: ${i?.color?.rgba};">
|
|
22
|
-
</span>
|
|
23
|
-
`};this.swiperInstance=new window.CooeeSDK.Swiper(n,_({navigation:r,pagination:o},this.options())),this.swiperInstance.on("slideChange",s=>{this.slideChange.emit(s)})}onResize(){this.swiperInstance?(Ce.verbose("Updating swiper"),this.swiperInstance.update()):(Ce.verbose("Reinitialising swiper"),this.reInitSwiper())}reInitSwiper(){this.initToken++;let t=this.initToken;this.swiperInstance?.destroy?.(),this.swiperInstance=void 0,this.initSwiper(t)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Se({type:e,selectors:[["cooee-swiper"]],hostAttrs:[1,"swiper"],inputs:{options:[1,"options"],navigationConfig:[1,"navigationConfig"],paginationConfig:[1,"paginationConfig"]},outputs:{slideChange:"slideChange"},ngContentSelectors:vh,decls:4,vars:2,consts:[[1,"swiper-wrapper"],[1,"swiper-pagination",3,"style"],[1,"swiper-button-prev"],[1,"swiper-button-next"],[1,"swiper-pagination"]],template:function(n,r){if(n&1&&(js(_h),qe(0,"div",0),Ws(1),ut(),X(2,Sh,4,7),X(3,bh,2,4,"div",1)),n&2){let i,o;D(2),J((i=r.navigationConfig())!=null&&i.enabled?2:-1),D(),J((o=r.paginationConfig())!=null&&o.enabled?3:-1)}},styles:[`:host{display:block}.swiper-wrapper{scrollbar-width:none;display:flex}.swiper-wrapper::-webkit-scrollbar{display:none}.swiper .swiper-button-prev,.swiper .swiper-button-next{background:rgba(var(--lc-icon-button-bg-color));width:var(--lc-icon-button-size);height:var(--lc-icon-button-size);border-radius:100%}.swiper .swiper-button-prev:after,.swiper .swiper-button-next:after{font-size:20px;color:rgba(var(--lc-icon-button-color))}
|
|
24
|
-
`],encapsulation:2})};function Ch(e,t){if(e&1&&(qe(0,"span",1),ne(1),ut()),e&2){L();let n=Ie(0);D(),lt(n.heading)}}function Ih(e,t){if(e&1&&(qe(0,"span",2),ne(1),ut()),e&2){L();let n=Ie(0);D(),lt(n.subHeading)}}var Gu=class e{card=he.required();linkClicked=Ke();linkAfterSanity(){return this.card()?.buttonLink?.startsWith("https")?this.card().buttonLink:null}clickLink(t){t.stopPropagation(),this.linkClicked.emit()}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Se({type:e,selectors:[["cooee-video-card"]],inputs:{card:[1,"card"]},outputs:{linkClicked:"linkClicked"},decls:6,vars:6,consts:[[1,"video-card-details"],[1,"heading"],[1,"subheading"],["rel","noopener noreferrer",1,"cta-button",3,"click","href","target"]],template:function(n,r){if(n&1){let i=Le();Be(0),qe(1,"div",0),X(2,Ch,2,1,"span",1),X(3,Ih,2,1,"span",2),qe(4,"a",3),$s("click",function(s){return ye(i),Ee(r.clickLink(s))}),ne(5),ut()()}if(n&2){let i=He(r.card());D(2),J(i!=null&&i.heading?2:-1),D(),J(i!=null&&i.subHeading?3:-1),D(),Gs("href",r.linkAfterSanity(),St)("target",i.newTab?"_blank":"_self"),D(),Pt(" ",i==null?null:i.buttonTitle," ")}},styles:["[_nghost-%COMP%]{display:block}.video-card-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3.75px;font-size:14px;line-height:normal}.video-card-details[_ngcontent-%COMP%] .cta-button[_ngcontent-%COMP%]{text-align:center;background-color:#fff;border-radius:var(--lc-button-radius);padding:7.5px 15px;font-weight:var(--lc-primary-button-weight);color:rgba(var(--lc-primary-button-bg-color));font-size:var(--lc-button-size);border-width:var(--lc-primary-button-border-width, 0);text-decoration:none}.video-card-details[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%], .video-card-details[_ngcontent-%COMP%] .subheading[_ngcontent-%COMP%]{text-align:start;color:#000;font-weight:600;overflow:hidden}.video-card-details[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%]{font-size:18px}.video-card-details[_ngcontent-%COMP%] .subheading[_ngcontent-%COMP%]{font-size:16px}"],changeDetection:0})};function Th(e,t){e&1&&te(0,"cooee-icon",1)}function xh(e,t){e&1&&te(0,"cooee-icon",2)}var $u=class e{muted=bn.required();videoEl=he.required();toggled=Ke();constructor(){ft(()=>{this.videoEl().muted=this.muted(),this.muted()||this.videoEl().play()})}toggle(t){t.stopPropagation(),t.preventDefault(),this.muted.update(n=>!n),this.toggled.emit(this.muted())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Se({type:e,selectors:[["cooee-mute-toggle"]],inputs:{muted:[1,"muted"],videoEl:[1,"videoEl"]},outputs:{muted:"mutedChange",toggled:"toggled"},decls:3,vars:5,consts:[["type","button",3,"click"],["name","unmute"],["name","mute"]],template:function(n,r){n&1&&(P(0,"button",0),be("click",function(o){return r.toggle(o)}),X(1,Th,1,0,"cooee-icon",1)(2,xh,1,0,"cooee-icon",2),U()),n&2&&(Sn("unmute",!r.muted()),qt("aria-label",r.muted()?"Unmute video":"Mute video")("aria-pressed",r.muted()),D(),J(r.muted()?1:2))},dependencies:[Xt],styles:["button[_ngcontent-%COMP%]{width:var(--lc-icon-button-size, 44px);height:var(--lc-icon-button-size, 44px);display:flex;justify-content:center;align-items:center;border:none;border-radius:100%;background:#00000080;background:color-mix(in oklab,#000 50%,transparent)}"]})};var Dh=["swiperContainer"],wh=(e,t)=>t.id;function Ah(e,t){if(e&1){let n=Le();P(0,"div",3)(1,"cooee-item-card",4),be("buttonClick",function(i){ye(n);let o=L();return Ee(o.onButtonClick(i))})("click",function(){let i=ye(n).$implicit,o=L();return Ee(o.cardClick.emit(i))}),U()()}if(e&2){let n=t.$implicit;D(),$("item",n)}}var ju=class e{items=he.required();centeredSlides=he(!0);cardClick=Ke();destroyRef=ae(Ot);elementRef=ae(Rt);engagementService=ae(We);swiperContainerRef=Xs.required("swiperContainer");swiperInstance;constructor(){ft(()=>{this.swiperContainerRef()&&this.initSwiper()}),this.destroyRef.onDestroy(()=>{this.swiperInstance?.destroy()})}ngOnInit(){or(this.elementRef.nativeElement.shadowRoot)}onButtonClick(t){let n=Xe.get().website?.canChangeVariantInCart;if(this.items()?.length>1||t.hasVariants()&&!n){this.cardClick.emit(t);return}this.engagementService.executeCTA(je.ADD_TO_CART,{item:t})}async initSwiper(){await ir(),this.swiperInstance=new window.CooeeSDK.Swiper(this.swiperContainerRef().nativeElement,{direction:"horizontal",effect:"slide",slidesPerView:1.2,nested:!0,centeredSlides:this.centeredSlides(),spaceBetween:12,mousewheel:{enabled:!0,thresholdDelta:10,thresholdTime:200}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Se({type:e,selectors:[["cooee-video-promoted-items"]],viewQuery:function(n,r){n&1&&zs(r.swiperContainerRef,Dh,5),n&2&&Ys()},hostAttrs:[1,"letscooee-widget"],inputs:{items:[1,"items"],centeredSlides:[1,"centeredSlides"]},outputs:{cardClick:"cardClick"},features:[Lt([We])],decls:5,vars:0,consts:[["swiperContainer",""],[1,"swiper-container"],[1,"swiper-wrapper"],[1,"swiper-slide"],["tabindex","0",3,"buttonClick","click","item"]],template:function(n,r){n&1&&(P(0,"div",1,0)(2,"div",2),bt(3,Ah,2,1,"div",3,wh),U()()),n&2&&(D(3),Ct(r.items()))},dependencies:[hn],styles:["[_nghost-%COMP%]{display:block;width:100%}cooee-item-card[_ngcontent-%COMP%]{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background-color:rgba(var(--lc-card-bg-color));cursor:pointer;border-radius:var(--lc-card-radius)}"]})};export{Xe as a,ir as b,or as c,je as d,Zl as e,ca as f,ed as g,sr as h,ar as i,bi as j,nu as k,$n as l,Go as m,mn as n,Uu as o,ku as p,Ci as q,r_ as r,Qt as s,hn as t,Tm as u,xm as v,Fu as w,Bu as x,Hu as y,Gu as z,$u as A,ju as B};
|