@letscooee/web-sdk 11.0.0-rc.3 → 11.0.0-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-XPDW2VTU.js → chunk-OX2WTO4K.js} +1 -1
- package/dist/main.min.js +13 -13
- package/dist/svg/close.svg +4 -0
- package/dist/svg/mute.svg +4 -0
- package/dist/svg/unmute.svg +4 -0
- package/dist/swiper-bundle.min.css +1 -0
- package/dist/{video-detail-dialog.component-FPCQEUTC.js → video-detail-dialog.component-QOHPQGXR.js} +2 -2
- package/dist/widget.min.js +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as Ea,$a as On,Aa as Dn,Ab as pr,B as De,Ba as Re,Bb as it,C as me,Ca as Ia,Cb as We,Da as wa,E as Ue,Ea as Da,Eb as mr,Fa as Aa,Fb as Rn,Ga as Oa,Gb as Ga,H as Sn,Hb as Nn,I as Ae,Ib as Wa,J as va,Jb as $a,K as Cn,Kb as _r,L as Tn,La as An,M as $,Ma as hr,Na as ye,Oa as Kt,P as fr,Pa as Xt,R as $t,S as In,T as Ri,Ta as Nt,U as Ni,Ua as Mt,V as ee,Va as gt,W as Ot,Wa as xa,X as Yt,Xa as Ra,Y as ya,Z as xt,_a as Na,a as la,aa as Oe,ab as xn,ba as Fe,c as he,ca as pt,d as ua,da as Mi,ea as mt,eb as nt,fa as He,fb as rt,g as da,ga as je,gb as vt,hb as Ne,i as fa,ia as Pi,ja as ki,jb as Ma,ka as ba,kb as Fi,l as ha,la as tt,m as pa,ma as _t,n as ma,na as Li,nb as Pa,o as _a,oa as _e,ob as ka,pa as xe,q as ga,qa as Rt,qb as La,s as pe,t as wt,tb as Fa,u as Le,ua as Sa,v as R,va as Ca,vb as Va,w as dr,wa as Ta,wb as Ba,x as Dt,xa as zt,xb as Ua,y as At,ya as Ge,yb as Ha,za as wn,zb as ja}from"./chunk-KFBNKCMH.js";import{a as y,b as V,c as bn,d as ca,e as Oi,f as xi,g as ur}from"./chunk-V7UGKYBN.js";var Ka=Oi((za,vr)=>{"use strict";(function(t){"use strict";var e={};e.VERSION="1.6.1";var n,r={},i=function(d,g){return function(){return g.apply(d,arguments)}},o=function(){var d=arguments,g=d[0],f,E;for(E=1;E<d.length;E++)for(f in d[E])!(f in g)&&d[E].hasOwnProperty(f)&&(g[f]=d[E][f]);return g},s=function(d,g){return{value:d,name:g}};e.TRACE=s(1,"TRACE"),e.DEBUG=s(2,"DEBUG"),e.INFO=s(3,"INFO"),e.TIME=s(4,"TIME"),e.WARN=s(5,"WARN"),e.ERROR=s(8,"ERROR"),e.OFF=s(99,"OFF");var a=function(d){this.context=d,this.setLevel(d.filterLevel),this.log=this.info};a.prototype={setLevel:function(d){d&&"value"in d&&(this.context.filterLevel=d)},getLevel:function(){return this.context.filterLevel},enabledFor:function(d){var g=this.context.filterLevel;return d.value>=g.value},trace:function(){this.invoke(e.TRACE,arguments)},debug:function(){this.invoke(e.DEBUG,arguments)},info:function(){this.invoke(e.INFO,arguments)},warn:function(){this.invoke(e.WARN,arguments)},error:function(){this.invoke(e.ERROR,arguments)},time:function(d){typeof d=="string"&&d.length>0&&this.invoke(e.TIME,[d,"start"])},timeEnd:function(d){typeof d=="string"&&d.length>0&&this.invoke(e.TIME,[d,"end"])},invoke:function(d,g){n&&this.enabledFor(d)&&n(g,o({level:d},this.context))}};var l=new a({filterLevel:e.OFF});(function(){var d=e;d.enabledFor=i(l,l.enabledFor),d.trace=i(l,l.trace),d.debug=i(l,l.debug),d.time=i(l,l.time),d.timeEnd=i(l,l.timeEnd),d.info=i(l,l.info),d.warn=i(l,l.warn),d.error=i(l,l.error),d.log=d.info})(),e.setHandler=function(d){n=d},e.setLevel=function(d){l.setLevel(d);for(var g in r)r.hasOwnProperty(g)&&r[g].setLevel(d)},e.getLevel=function(){return l.getLevel()},e.get=function(d){return r[d]||(r[d]=new a(o({name:d},l.context)))},e.createDefaultHandler=function(d){d=d||{},d.formatter=d.formatter||function(v,w){w.name&&v.unshift("["+w.name+"]")};var g={},f=function(E,v){Function.prototype.apply.call(E,console,v)};return typeof console>"u"?function(){}:function(E,v){E=Array.prototype.slice.call(E);var w=console.log,N;v.level===e.TIME?(N=(v.name?"["+v.name+"] ":"")+E[0],E[1]==="start"?console.time?console.time(N):g[N]=new Date().getTime():console.timeEnd?console.timeEnd(N):f(w,[N+": "+(new Date().getTime()-g[N])+"ms"])):(v.level===e.WARN&&console.warn?w=console.warn:v.level===e.ERROR&&console.error?w=console.error:v.level===e.INFO&&console.info?w=console.info:v.level===e.DEBUG&&console.debug?w=console.debug:v.level===e.TRACE&&console.trace&&(w=console.trace),d.formatter(E,v),f(w,E))}},e.useDefaults=function(d){e.setLevel(d&&d.defaultLevel||e.DEBUG),e.setHandler(e.createDefaultHandler(d))},e.setDefaults=e.useDefaults,typeof define=="function"&&define.amd?define(e):typeof vr<"u"&&vr.exports?vr.exports=e:(e._prevLogger=t.Logger,e.noConflict=function(){return t.Logger=e._prevLogger,e},t.Logger=e)})(za)});var sc=Oi((oc,Hi)=>{"use strict";(function(t){if(typeof oc=="object"&&typeof Hi<"u")Hi.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var e;typeof window<"u"?e=window:typeof global<"u"?e=global:typeof self<"u"?e=self:e=this,e.localforage=t()}})(function(){var t,e,n;return(function r(i,o,s){function a(g,f){if(!o[g]){if(!i[g]){var E=typeof bn=="function"&&bn;if(!f&&E)return E(g,!0);if(l)return l(g,!0);var v=new Error("Cannot find module '"+g+"'");throw v.code="MODULE_NOT_FOUND",v}var w=o[g]={exports:{}};i[g][0].call(w.exports,function(N){var x=i[g][1][N];return a(x||N)},w,w.exports,r,i,o,s)}return o[g].exports}for(var l=typeof bn=="function"&&bn,d=0;d<s.length;d++)a(s[d]);return a})({1:[function(r,i,o){(function(s){"use strict";var a=s.MutationObserver||s.WebKitMutationObserver,l;if(a){var d=0,g=new a(N),f=s.document.createTextNode("");g.observe(f,{characterData:!0}),l=function(){f.data=d=++d%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var E=new s.MessageChannel;E.port1.onmessage=N,l=function(){E.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?l=function(){var P=s.document.createElement("script");P.onreadystatechange=function(){N(),P.onreadystatechange=null,P.parentNode.removeChild(P),P=null},s.document.documentElement.appendChild(P)}:l=function(){setTimeout(N,0)};var v,w=[];function N(){v=!0;for(var P,M,U=w.length;U;){for(M=w,w=[],P=-1;++P<U;)M[P]();U=w.length}v=!1}i.exports=x;function x(P){w.push(P)===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 a(){}var l={},d=["REJECTED"],g=["FULFILLED"],f=["PENDING"];i.exports=E;function E(D){if(typeof D!="function")throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,D!==a&&x(this,D)}E.prototype.catch=function(D){return this.then(null,D)},E.prototype.then=function(D,H){if(typeof D!="function"&&this.state===g||typeof H!="function"&&this.state===d)return this;var F=new this.constructor(a);if(this.state!==f){var j=this.state===g?D:H;w(F,j,this.outcome)}else this.queue.push(new v(F,D,H));return F};function v(D,H,F){this.promise=D,typeof H=="function"&&(this.onFulfilled=H,this.callFulfilled=this.otherCallFulfilled),typeof F=="function"&&(this.onRejected=F,this.callRejected=this.otherCallRejected)}v.prototype.callFulfilled=function(D){l.resolve(this.promise,D)},v.prototype.otherCallFulfilled=function(D){w(this.promise,this.onFulfilled,D)},v.prototype.callRejected=function(D){l.reject(this.promise,D)},v.prototype.otherCallRejected=function(D){w(this.promise,this.onRejected,D)};function w(D,H,F){s(function(){var j;try{j=H(F)}catch(Z){return l.reject(D,Z)}j===D?l.reject(D,new TypeError("Cannot resolve promise with itself")):l.resolve(D,j)})}l.resolve=function(D,H){var F=P(N,H);if(F.status==="error")return l.reject(D,F.value);var j=F.value;if(j)x(D,j);else{D.state=g,D.outcome=H;for(var Z=-1,X=D.queue.length;++Z<X;)D.queue[Z].callFulfilled(H)}return D},l.reject=function(D,H){D.state=d,D.outcome=H;for(var F=-1,j=D.queue.length;++F<j;)D.queue[F].callRejected(H);return D};function N(D){var H=D&&D.then;if(D&&(typeof D=="object"||typeof D=="function")&&typeof H=="function")return function(){H.apply(D,arguments)}}function x(D,H){var F=!1;function j(Ie){F||(F=!0,l.reject(D,Ie))}function Z(Ie){F||(F=!0,l.resolve(D,Ie))}function X(){H(Z,j)}var se=P(X);se.status==="error"&&j(se.value)}function P(D,H){var F={};try{F.value=D(H),F.status="success"}catch(j){F.status="error",F.value=j}return F}E.resolve=M;function M(D){return D instanceof this?D:l.resolve(new this(a),D)}E.reject=U;function U(D){var H=new this(a);return l.reject(H,D)}E.all=Ce;function Ce(D){var H=this;if(Object.prototype.toString.call(D)!=="[object Array]")return this.reject(new TypeError("must be an array"));var F=D.length,j=!1;if(!F)return this.resolve([]);for(var Z=new Array(F),X=0,se=-1,Ie=new this(a);++se<F;)Qe(D[se],se);return Ie;function Qe(vn,ar){H.resolve(vn).then(yi,function(Gt){j||(j=!0,l.reject(Ie,Gt))});function yi(Gt){Z[ar]=Gt,++X===F&&!j&&(j=!0,l.resolve(Ie,Z))}}}E.race=Te;function Te(D){var H=this;if(Object.prototype.toString.call(D)!=="[object Array]")return this.reject(new TypeError("must be an array"));var F=D.length,j=!1;if(!F)return this.resolve([]);for(var Z=-1,X=new this(a);++Z<F;)se(D[Z]);return X;function se(Ie){H.resolve(Ie).then(function(Qe){j||(j=!0,l.resolve(X,Qe))},function(Qe){j||(j=!0,l.reject(X,Qe))})}}},{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(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c};function a(c,h){if(!(c instanceof h))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 d=l();function g(){try{if(!d||!d.open)return!1;var c=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),h=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!c||h)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function f(c,h){c=c||[],h=h||{};try{return new Blob(c,h)}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,_=0;_<c.length;_+=1)m.append(c[_]);return m.getBlob(h.type)}}typeof Promise>"u"&&r(3);var E=Promise;function v(c,h){h&&c.then(function(u){h(null,u)},function(u){h(u)})}function w(c,h,u){typeof h=="function"&&c.then(h),typeof u=="function"&&c.catch(u)}function N(c){return typeof c!="string"&&(console.warn(c+" used as a key, but it is not a string."),c=String(c)),c}function x(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var P="local-forage-detect-blob-support",M=void 0,U={},Ce=Object.prototype.toString,Te="readonly",D="readwrite";function H(c){for(var h=c.length,u=new ArrayBuffer(h),m=new Uint8Array(u),_=0;_<h;_++)m[_]=c.charCodeAt(_);return u}function F(c){return new E(function(h){var u=c.transaction(P,D),m=f([""]);u.objectStore(P).put(m,"key"),u.onabort=function(_){_.preventDefault(),_.stopPropagation(),h(!1)},u.oncomplete=function(){var _=navigator.userAgent.match(/Chrome\/(\d+)/),p=navigator.userAgent.match(/Edge\//);h(p||!_||parseInt(_[1],10)>=43)}}).catch(function(){return!1})}function j(c){return typeof M=="boolean"?E.resolve(M):F(c).then(function(h){return M=h,M})}function Z(c){var h=U[c.name],u={};u.promise=new E(function(m,_){u.resolve=m,u.reject=_}),h.deferredOperations.push(u),h.dbReady?h.dbReady=h.dbReady.then(function(){return u.promise}):h.dbReady=u.promise}function X(c){var h=U[c.name],u=h.deferredOperations.pop();if(u)return u.resolve(),u.promise}function se(c,h){var u=U[c.name],m=u.deferredOperations.pop();if(m)return m.reject(h),m.promise}function Ie(c,h){return new E(function(u,m){if(U[c.name]=U[c.name]||js(),c.db)if(h)Z(c),c.db.close();else return u(c.db);var _=[c.name];h&&_.push(c.version);var p=d.open.apply(d,_);h&&(p.onupgradeneeded=function(b){var S=p.result;try{S.createObjectStore(c.storeName),b.oldVersion<=1&&S.createObjectStore(P)}catch(C){if(C.name==="ConstraintError")console.warn('The database "'+c.name+'" has been upgraded from version '+b.oldVersion+" to version "+b.newVersion+', but the storage "'+c.storeName+'" already exists.');else throw C}}),p.onerror=function(b){b.preventDefault(),m(p.error)},p.onsuccess=function(){var b=p.result;b.onversionchange=function(S){S.target.close()},u(b),X(c)}})}function Qe(c){return Ie(c,!1)}function vn(c){return Ie(c,!0)}function ar(c,h){if(!c.db)return!0;var u=!c.db.objectStoreNames.contains(c.storeName),m=c.version<c.db.version,_=c.version>c.db.version;if(m&&(c.version!==h&&console.warn('The database "'+c.name+`" can't be downgraded from version `+c.db.version+" to version "+c.version+"."),c.version=c.db.version),_||u){if(u){var p=c.db.version+1;p>c.version&&(c.version=p)}return!0}return!1}function yi(c){return new E(function(h,u){var m=new FileReader;m.onerror=u,m.onloadend=function(_){var p=btoa(_.target.result||"");h({__local_forage_encoded_blob:!0,data:p,type:c.type})},m.readAsBinaryString(c)})}function Gt(c){var h=H(atob(c.data));return f([h],{type:c.type})}function Hs(c){return c&&c.__local_forage_encoded_blob}function nd(c){var h=this,u=h._initReady().then(function(){var m=U[h._dbInfo.name];if(m&&m.dbReady)return m.dbReady});return w(u,c,c),u}function rd(c){Z(c);for(var h=U[c.name],u=h.forages,m=0;m<u.length;m++){var _=u[m];_._dbInfo.db&&(_._dbInfo.db.close(),_._dbInfo.db=null)}return c.db=null,Qe(c).then(function(p){return c.db=p,ar(c)?vn(c):p}).then(function(p){c.db=h.db=p;for(var b=0;b<u.length;b++)u[b]._dbInfo.db=p}).catch(function(p){throw se(c,p),p})}function et(c,h,u,m){m===void 0&&(m=1);try{var _=c.db.transaction(c.storeName,h);u(null,_)}catch(p){if(m>0&&(!c.db||p.name==="InvalidStateError"||p.name==="NotFoundError"))return E.resolve().then(function(){if(!c.db||p.name==="NotFoundError"&&!c.db.objectStoreNames.contains(c.storeName)&&c.version<=c.db.version)return c.db&&(c.version=c.db.version+1),vn(c)}).then(function(){return rd(c).then(function(){et(c,h,u,m-1)})}).catch(u);u(p)}}function js(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function id(c){var h=this,u={db:null};if(c)for(var m in c)u[m]=c[m];var _=U[u.name];_||(_=js(),U[u.name]=_),_.forages.push(h),h._initReady||(h._initReady=h.ready,h.ready=nd);var p=[];function b(){return E.resolve()}for(var S=0;S<_.forages.length;S++){var C=_.forages[S];C!==h&&p.push(C._initReady().catch(b))}var T=_.forages.slice(0);return E.all(p).then(function(){return u.db=_.db,Qe(u)}).then(function(I){return u.db=I,ar(u,h._defaultConfig.version)?vn(u):I}).then(function(I){u.db=_.db=I,h._dbInfo=u;for(var O=0;O<T.length;O++){var B=T[O];B!==h&&(B._dbInfo.db=u.db,B._dbInfo.version=u.version)}})}function od(c,h){var u=this;c=N(c);var m=new E(function(_,p){u.ready().then(function(){et(u._dbInfo,Te,function(b,S){if(b)return p(b);try{var C=S.objectStore(u._dbInfo.storeName),T=C.get(c);T.onsuccess=function(){var I=T.result;I===void 0&&(I=null),Hs(I)&&(I=Gt(I)),_(I)},T.onerror=function(){p(T.error)}}catch(I){p(I)}})}).catch(p)});return v(m,h),m}function sd(c,h){var u=this,m=new E(function(_,p){u.ready().then(function(){et(u._dbInfo,Te,function(b,S){if(b)return p(b);try{var C=S.objectStore(u._dbInfo.storeName),T=C.openCursor(),I=1;T.onsuccess=function(){var O=T.result;if(O){var B=O.value;Hs(B)&&(B=Gt(B));var G=c(B,O.key,I++);G!==void 0?_(G):O.continue()}else _()},T.onerror=function(){p(T.error)}}catch(O){p(O)}})}).catch(p)});return v(m,h),m}function ad(c,h,u){var m=this;c=N(c);var _=new E(function(p,b){var S;m.ready().then(function(){return S=m._dbInfo,Ce.call(h)==="[object Blob]"?j(S.db).then(function(C){return C?h:yi(h)}):h}).then(function(C){et(m._dbInfo,D,function(T,I){if(T)return b(T);try{var O=I.objectStore(m._dbInfo.storeName);C===null&&(C=void 0);var B=O.put(C,c);I.oncomplete=function(){C===void 0&&(C=null),p(C)},I.onabort=I.onerror=function(){var G=B.error?B.error:B.transaction.error;b(G)}}catch(G){b(G)}})}).catch(b)});return v(_,u),_}function cd(c,h){var u=this;c=N(c);var m=new E(function(_,p){u.ready().then(function(){et(u._dbInfo,D,function(b,S){if(b)return p(b);try{var C=S.objectStore(u._dbInfo.storeName),T=C.delete(c);S.oncomplete=function(){_()},S.onerror=function(){p(T.error)},S.onabort=function(){var I=T.error?T.error:T.transaction.error;p(I)}}catch(I){p(I)}})}).catch(p)});return v(m,h),m}function ld(c){var h=this,u=new E(function(m,_){h.ready().then(function(){et(h._dbInfo,D,function(p,b){if(p)return _(p);try{var S=b.objectStore(h._dbInfo.storeName),C=S.clear();b.oncomplete=function(){m()},b.onabort=b.onerror=function(){var T=C.error?C.error:C.transaction.error;_(T)}}catch(T){_(T)}})}).catch(_)});return v(u,c),u}function ud(c){var h=this,u=new E(function(m,_){h.ready().then(function(){et(h._dbInfo,Te,function(p,b){if(p)return _(p);try{var S=b.objectStore(h._dbInfo.storeName),C=S.count();C.onsuccess=function(){m(C.result)},C.onerror=function(){_(C.error)}}catch(T){_(T)}})}).catch(_)});return v(u,c),u}function dd(c,h){var u=this,m=new E(function(_,p){if(c<0){_(null);return}u.ready().then(function(){et(u._dbInfo,Te,function(b,S){if(b)return p(b);try{var C=S.objectStore(u._dbInfo.storeName),T=!1,I=C.openKeyCursor();I.onsuccess=function(){var O=I.result;if(!O){_(null);return}c===0||T?_(O.key):(T=!0,O.advance(c))},I.onerror=function(){p(I.error)}}catch(O){p(O)}})}).catch(p)});return v(m,h),m}function fd(c){var h=this,u=new E(function(m,_){h.ready().then(function(){et(h._dbInfo,Te,function(p,b){if(p)return _(p);try{var S=b.objectStore(h._dbInfo.storeName),C=S.openKeyCursor(),T=[];C.onsuccess=function(){var I=C.result;if(!I){m(T);return}T.push(I.key),I.continue()},C.onerror=function(){_(C.error)}}catch(I){_(I)}})}).catch(_)});return v(u,c),u}function hd(c,h){h=x.apply(this,arguments);var u=this.config();c=typeof c!="function"&&c||{},c.name||(c.name=c.name||u.name,c.storeName=c.storeName||u.storeName);var m=this,_;if(!c.name)_=E.reject("Invalid arguments");else{var p=c.name===u.name&&m._dbInfo.db,b=p?E.resolve(m._dbInfo.db):Qe(c).then(function(S){var C=U[c.name],T=C.forages;C.db=S;for(var I=0;I<T.length;I++)T[I]._dbInfo.db=S;return S});c.storeName?_=b.then(function(S){if(S.objectStoreNames.contains(c.storeName)){var C=S.version+1;Z(c);var T=U[c.name],I=T.forages;S.close();for(var O=0;O<I.length;O++){var B=I[O];B._dbInfo.db=null,B._dbInfo.version=C}var G=new E(function(W,Q){var J=d.open(c.name,C);J.onerror=function(we){var En=J.result;En.close(),Q(we)},J.onupgradeneeded=function(){var we=J.result;we.deleteObjectStore(c.storeName)},J.onsuccess=function(){var we=J.result;we.close(),W(we)}});return G.then(function(W){T.db=W;for(var Q=0;Q<I.length;Q++){var J=I[Q];J._dbInfo.db=W,X(J._dbInfo)}}).catch(function(W){throw(se(c,W)||E.resolve()).catch(function(){}),W})}}):_=b.then(function(S){Z(c);var C=U[c.name],T=C.forages;S.close();for(var I=0;I<T.length;I++){var O=T[I];O._dbInfo.db=null}var B=new E(function(G,W){var Q=d.deleteDatabase(c.name);Q.onerror=function(){var J=Q.result;J&&J.close(),W(Q.error)},Q.onblocked=function(){console.warn('dropInstance blocked for database "'+c.name+'" until all open connections are closed')},Q.onsuccess=function(){var J=Q.result;J&&J.close(),G(J)}});return B.then(function(G){C.db=G;for(var W=0;W<T.length;W++){var Q=T[W];X(Q._dbInfo)}}).catch(function(G){throw(se(c,G)||E.resolve()).catch(function(){}),G})})}return v(_,h),_}var pd={_driver:"asyncStorage",_initStorage:id,_support:g(),iterate:sd,getItem:od,setItem:ad,removeItem:cd,clear:ld,length:ud,key:dd,keys:fd,dropInstance:hd};function md(){return typeof openDatabase=="function"}var ft="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_d="~~local_forage_type~",Gs=/^~~local_forage_type~([^~]+)~/,cr="__lfsc__:",Ei=cr.length,bi="arbf",Si="blob",Ws="si08",$s="ui08",Ys="uic8",zs="si16",Ks="si32",Xs="ur16",qs="ui32",Zs="fl32",Js="fl64",Qs=Ei+bi.length,ea=Object.prototype.toString;function ta(c){var h=c.length*.75,u=c.length,m,_=0,p,b,S,C;c[c.length-1]==="="&&(h--,c[c.length-2]==="="&&h--);var T=new ArrayBuffer(h),I=new Uint8Array(T);for(m=0;m<u;m+=4)p=ft.indexOf(c[m]),b=ft.indexOf(c[m+1]),S=ft.indexOf(c[m+2]),C=ft.indexOf(c[m+3]),I[_++]=p<<2|b>>4,I[_++]=(b&15)<<4|S>>2,I[_++]=(S&3)<<6|C&63;return T}function Ci(c){var h=new Uint8Array(c),u="",m;for(m=0;m<h.length;m+=3)u+=ft[h[m]>>2],u+=ft[(h[m]&3)<<4|h[m+1]>>4],u+=ft[(h[m+1]&15)<<2|h[m+2]>>6],u+=ft[h[m+2]&63];return h.length%3===2?u=u.substring(0,u.length-1)+"=":h.length%3===1&&(u=u.substring(0,u.length-2)+"=="),u}function gd(c,h){var u="";if(c&&(u=ea.call(c)),c&&(u==="[object ArrayBuffer]"||c.buffer&&ea.call(c.buffer)==="[object ArrayBuffer]")){var m,_=cr;c instanceof ArrayBuffer?(m=c,_+=bi):(m=c.buffer,u==="[object Int8Array]"?_+=Ws:u==="[object Uint8Array]"?_+=$s:u==="[object Uint8ClampedArray]"?_+=Ys:u==="[object Int16Array]"?_+=zs:u==="[object Uint16Array]"?_+=Xs:u==="[object Int32Array]"?_+=Ks:u==="[object Uint32Array]"?_+=qs:u==="[object Float32Array]"?_+=Zs:u==="[object Float64Array]"?_+=Js:h(new Error("Failed to get type for BinaryArray"))),h(_+Ci(m))}else if(u==="[object Blob]"){var p=new FileReader;p.onload=function(){var b=_d+c.type+"~"+Ci(this.result);h(cr+Si+b)},p.readAsArrayBuffer(c)}else try{h(JSON.stringify(c))}catch(b){console.error("Couldn't convert value into a JSON string: ",c),h(null,b)}}function vd(c){if(c.substring(0,Ei)!==cr)return JSON.parse(c);var h=c.substring(Qs),u=c.substring(Ei,Qs),m;if(u===Si&&Gs.test(h)){var _=h.match(Gs);m=_[1],h=h.substring(_[0].length)}var p=ta(h);switch(u){case bi:return p;case Si:return f([p],{type:m});case Ws:return new Int8Array(p);case $s:return new Uint8Array(p);case Ys:return new Uint8ClampedArray(p);case zs:return new Int16Array(p);case Xs:return new Uint16Array(p);case Ks:return new Int32Array(p);case qs:return new Uint32Array(p);case Zs:return new Float32Array(p);case Js:return new Float64Array(p);default:throw new Error("Unkown type: "+u)}}var Ti={serialize:gd,deserialize:vd,stringToBuffer:ta,bufferToString:Ci};function na(c,h,u,m){c.executeSql("CREATE TABLE IF NOT EXISTS "+h.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],u,m)}function yd(c){var h=this,u={db:null};if(c)for(var m in c)u[m]=typeof c[m]!="string"?c[m].toString():c[m];var _=new E(function(p,b){try{u.db=openDatabase(u.name,String(u.version),u.description,u.size)}catch(S){return b(S)}u.db.transaction(function(S){na(S,u,function(){h._dbInfo=u,p()},function(C,T){b(T)})},b)});return u.serializer=Ti,_}function ht(c,h,u,m,_,p){c.executeSql(u,m,_,function(b,S){S.code===S.SYNTAX_ERR?b.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[h.storeName],function(C,T){T.rows.length?p(C,S):na(C,h,function(){C.executeSql(u,m,_,p)},p)},p):p(b,S)},p)}function Ed(c,h){var u=this;c=N(c);var m=new E(function(_,p){u.ready().then(function(){var b=u._dbInfo;b.db.transaction(function(S){ht(S,b,"SELECT * FROM "+b.storeName+" WHERE key = ? LIMIT 1",[c],function(C,T){var I=T.rows.length?T.rows.item(0).value:null;I&&(I=b.serializer.deserialize(I)),_(I)},function(C,T){p(T)})})}).catch(p)});return v(m,h),m}function bd(c,h){var u=this,m=new E(function(_,p){u.ready().then(function(){var b=u._dbInfo;b.db.transaction(function(S){ht(S,b,"SELECT * FROM "+b.storeName,[],function(C,T){for(var I=T.rows,O=I.length,B=0;B<O;B++){var G=I.item(B),W=G.value;if(W&&(W=b.serializer.deserialize(W)),W=c(W,G.key,B+1),W!==void 0){_(W);return}}_()},function(C,T){p(T)})})}).catch(p)});return v(m,h),m}function ra(c,h,u,m){var _=this;c=N(c);var p=new E(function(b,S){_.ready().then(function(){h===void 0&&(h=null);var C=h,T=_._dbInfo;T.serializer.serialize(h,function(I,O){O?S(O):T.db.transaction(function(B){ht(B,T,"INSERT OR REPLACE INTO "+T.storeName+" (key, value) VALUES (?, ?)",[c,I],function(){b(C)},function(G,W){S(W)})},function(B){if(B.code===B.QUOTA_ERR){if(m>0){b(ra.apply(_,[c,C,u,m-1]));return}S(B)}})})}).catch(S)});return v(p,u),p}function Sd(c,h,u){return ra.apply(this,[c,h,u,1])}function Cd(c,h){var u=this;c=N(c);var m=new E(function(_,p){u.ready().then(function(){var b=u._dbInfo;b.db.transaction(function(S){ht(S,b,"DELETE FROM "+b.storeName+" WHERE key = ?",[c],function(){_()},function(C,T){p(T)})})}).catch(p)});return v(m,h),m}function Td(c){var h=this,u=new E(function(m,_){h.ready().then(function(){var p=h._dbInfo;p.db.transaction(function(b){ht(b,p,"DELETE FROM "+p.storeName,[],function(){m()},function(S,C){_(C)})})}).catch(_)});return v(u,c),u}function Id(c){var h=this,u=new E(function(m,_){h.ready().then(function(){var p=h._dbInfo;p.db.transaction(function(b){ht(b,p,"SELECT COUNT(key) as c FROM "+p.storeName,[],function(S,C){var T=C.rows.item(0).c;m(T)},function(S,C){_(C)})})}).catch(_)});return v(u,c),u}function wd(c,h){var u=this,m=new E(function(_,p){u.ready().then(function(){var b=u._dbInfo;b.db.transaction(function(S){ht(S,b,"SELECT key FROM "+b.storeName+" WHERE id = ? LIMIT 1",[c+1],function(C,T){var I=T.rows.length?T.rows.item(0).key:null;_(I)},function(C,T){p(T)})})}).catch(p)});return v(m,h),m}function Dd(c){var h=this,u=new E(function(m,_){h.ready().then(function(){var p=h._dbInfo;p.db.transaction(function(b){ht(b,p,"SELECT key FROM "+p.storeName,[],function(S,C){for(var T=[],I=0;I<C.rows.length;I++)T.push(C.rows.item(I).key);m(T)},function(S,C){_(C)})})}).catch(_)});return v(u,c),u}function Ad(c){return new E(function(h,u){c.transaction(function(m){m.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(_,p){for(var b=[],S=0;S<p.rows.length;S++)b.push(p.rows.item(S).name);h({db:c,storeNames:b})},function(_,p){u(p)})},function(m){u(m)})})}function Od(c,h){h=x.apply(this,arguments);var u=this.config();c=typeof c!="function"&&c||{},c.name||(c.name=c.name||u.name,c.storeName=c.storeName||u.storeName);var m=this,_;return c.name?_=new E(function(p){var b;c.name===u.name?b=m._dbInfo.db:b=openDatabase(c.name,"","",0),c.storeName?p({db:b,storeNames:[c.storeName]}):p(Ad(b))}).then(function(p){return new E(function(b,S){p.db.transaction(function(C){function T(G){return new E(function(W,Q){C.executeSql("DROP TABLE IF EXISTS "+G,[],function(){W()},function(J,we){Q(we)})})}for(var I=[],O=0,B=p.storeNames.length;O<B;O++)I.push(T(p.storeNames[O]));E.all(I).then(function(){b()}).catch(function(G){S(G)})},function(C){S(C)})})}):_=E.reject("Invalid arguments"),v(_,h),_}var xd={_driver:"webSQLStorage",_initStorage:yd,_support:md(),iterate:bd,getItem:Ed,setItem:Sd,removeItem:Cd,clear:Td,length:Id,key:wd,keys:Dd,dropInstance:Od};function Rd(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function ia(c,h){var u=c.name+"/";return c.storeName!==h.storeName&&(u+=c.storeName+"/"),u}function Nd(){var c="_localforage_support_test";try{return localStorage.setItem(c,!0),localStorage.removeItem(c),!1}catch{return!0}}function Md(){return!Nd()||localStorage.length>0}function Pd(c){var h=this,u={};if(c)for(var m in c)u[m]=c[m];return u.keyPrefix=ia(c,h._defaultConfig),Md()?(h._dbInfo=u,u.serializer=Ti,E.resolve()):E.reject()}function kd(c){var h=this,u=h.ready().then(function(){for(var m=h._dbInfo.keyPrefix,_=localStorage.length-1;_>=0;_--){var p=localStorage.key(_);p.indexOf(m)===0&&localStorage.removeItem(p)}});return v(u,c),u}function Ld(c,h){var u=this;c=N(c);var m=u.ready().then(function(){var _=u._dbInfo,p=localStorage.getItem(_.keyPrefix+c);return p&&(p=_.serializer.deserialize(p)),p});return v(m,h),m}function Fd(c,h){var u=this,m=u.ready().then(function(){for(var _=u._dbInfo,p=_.keyPrefix,b=p.length,S=localStorage.length,C=1,T=0;T<S;T++){var I=localStorage.key(T);if(I.indexOf(p)===0){var O=localStorage.getItem(I);if(O&&(O=_.serializer.deserialize(O)),O=c(O,I.substring(b),C++),O!==void 0)return O}}});return v(m,h),m}function Vd(c,h){var u=this,m=u.ready().then(function(){var _=u._dbInfo,p;try{p=localStorage.key(c)}catch{p=null}return p&&(p=p.substring(_.keyPrefix.length)),p});return v(m,h),m}function Bd(c){var h=this,u=h.ready().then(function(){for(var m=h._dbInfo,_=localStorage.length,p=[],b=0;b<_;b++){var S=localStorage.key(b);S.indexOf(m.keyPrefix)===0&&p.push(S.substring(m.keyPrefix.length))}return p});return v(u,c),u}function Ud(c){var h=this,u=h.keys().then(function(m){return m.length});return v(u,c),u}function Hd(c,h){var u=this;c=N(c);var m=u.ready().then(function(){var _=u._dbInfo;localStorage.removeItem(_.keyPrefix+c)});return v(m,h),m}function jd(c,h,u){var m=this;c=N(c);var _=m.ready().then(function(){h===void 0&&(h=null);var p=h;return new E(function(b,S){var C=m._dbInfo;C.serializer.serialize(h,function(T,I){if(I)S(I);else try{localStorage.setItem(C.keyPrefix+c,T),b(p)}catch(O){(O.name==="QuotaExceededError"||O.name==="NS_ERROR_DOM_QUOTA_REACHED")&&S(O),S(O)}})})});return v(_,u),_}function Gd(c,h){if(h=x.apply(this,arguments),c=typeof c!="function"&&c||{},!c.name){var u=this.config();c.name=c.name||u.name,c.storeName=c.storeName||u.storeName}var m=this,_;return c.name?_=new E(function(p){c.storeName?p(ia(c,m._defaultConfig)):p(c.name+"/")}).then(function(p){for(var b=localStorage.length-1;b>=0;b--){var S=localStorage.key(b);S.indexOf(p)===0&&localStorage.removeItem(S)}}):_=E.reject("Invalid arguments"),v(_,h),_}var Wd={_driver:"localStorageWrapper",_initStorage:Pd,_support:Rd(),iterate:Fd,getItem:Ld,setItem:jd,removeItem:Hd,clear:kd,length:Ud,key:Vd,keys:Bd,dropInstance:Gd},$d=function(h,u){return h===u||typeof h=="number"&&typeof u=="number"&&isNaN(h)&&isNaN(u)},Yd=function(h,u){for(var m=h.length,_=0;_<m;){if($d(h[_],u))return!0;_++}return!1},oa=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"},yn={},sa={},Wt={INDEXEDDB:pd,WEBSQL:xd,LOCALSTORAGE:Wd},zd=[Wt.INDEXEDDB._driver,Wt.WEBSQL._driver,Wt.LOCALSTORAGE._driver],lr=["dropInstance"],Ii=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(lr),Kd={description:"",driver:zd.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Xd(c,h){c[h]=function(){var u=arguments;return c.ready().then(function(){return c[h].apply(c,u)})}}function wi(){for(var c=1;c<arguments.length;c++){var h=arguments[c];if(h)for(var u in h)h.hasOwnProperty(u)&&(oa(h[u])?arguments[0][u]=h[u].slice():arguments[0][u]=h[u])}return arguments[0]}var qd=(function(){function c(h){a(this,c);for(var u in Wt)if(Wt.hasOwnProperty(u)){var m=Wt[u],_=m._driver;this[u]=_,yn[_]||this.defineDriver(m)}this._defaultConfig=wi({},Kd),this._config=wi({},this._defaultConfig,h),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return c.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},c.prototype.defineDriver=function(u,m,_){var p=new E(function(b,S){try{var C=u._driver,T=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!u._driver){S(T);return}for(var I=Ii.concat("_initStorage"),O=0,B=I.length;O<B;O++){var G=I[O],W=!Yd(lr,G);if((W||u[G])&&typeof u[G]!="function"){S(T);return}}var Q=function(){for(var En=function(Qd){return function(){var ef=new Error("Method "+Qd+" is not implemented by the current driver"),aa=E.reject(ef);return v(aa,arguments[arguments.length-1]),aa}},Di=0,Jd=lr.length;Di<Jd;Di++){var Ai=lr[Di];u[Ai]||(u[Ai]=En(Ai))}};Q();var J=function(En){yn[C]&&console.info("Redefining LocalForage driver: "+C),yn[C]=u,sa[C]=En,b()};"_support"in u?u._support&&typeof u._support=="function"?u._support().then(J,S):J(!!u._support):J(!0)}catch(we){S(we)}});return w(p,m,_),p},c.prototype.driver=function(){return this._driver||null},c.prototype.getDriver=function(u,m,_){var p=yn[u]?E.resolve(yn[u]):E.reject(new Error("Driver not found."));return w(p,m,_),p},c.prototype.getSerializer=function(u){var m=E.resolve(Ti);return w(m,u),m},c.prototype.ready=function(u){var m=this,_=m._driverSet.then(function(){return m._ready===null&&(m._ready=m._initDriver()),m._ready});return w(_,u,u),_},c.prototype.setDriver=function(u,m,_){var p=this;oa(u)||(u=[u]);var b=this._getSupportedDrivers(u);function S(){p._config.driver=p.driver()}function C(O){return p._extend(O),S(),p._ready=p._initStorage(p._config),p._ready}function T(O){return function(){var B=0;function G(){for(;B<O.length;){var W=O[B];return B++,p._dbInfo=null,p._ready=null,p.getDriver(W).then(C).catch(G)}S();var Q=new Error("No available storage method found.");return p._driverSet=E.reject(Q),p._driverSet}return G()}}var I=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=I.then(function(){var O=b[0];return p._dbInfo=null,p._ready=null,p.getDriver(O).then(function(B){p._driver=B._driver,S(),p._wrapLibraryMethodsWithReady(),p._initDriver=T(b)})}).catch(function(){S();var O=new Error("No available storage method found.");return p._driverSet=E.reject(O),p._driverSet}),w(this._driverSet,m,_),this._driverSet},c.prototype.supports=function(u){return!!sa[u]},c.prototype._extend=function(u){wi(this,u)},c.prototype._getSupportedDrivers=function(u){for(var m=[],_=0,p=u.length;_<p;_++){var b=u[_];this.supports(b)&&m.push(b)}return m},c.prototype._wrapLibraryMethodsWithReady=function(){for(var u=0,m=Ii.length;u<m;u++)Xd(this,Ii[u])},c.prototype.createInstance=function(u){return new c(u)},c})(),Zd=new qd;i.exports=Zd},{3:3}]},{},[4])(4)})});var ac=Oi(($i,Yi)=>{"use strict";(function(t,e){typeof $i=="object"&&typeof Yi<"u"?Yi.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.fetchRetry=e())})($i,function(){"use strict";var t=function(r,i){if(i=i||{},typeof r!="function")throw new n("fetch must be a function");if(typeof i!="object")throw new n("defaults must be an object");if(i.retries!==void 0&&!e(i.retries))throw new n("retries must be a positive integer");if(i.retryDelay!==void 0&&!e(i.retryDelay)&&typeof i.retryDelay!="function")throw new n("retryDelay must be a positive integer or a function returning a positive integer");if(i.retryOn!==void 0&&!Array.isArray(i.retryOn)&&typeof i.retryOn!="function")throw new n("retryOn property expects an array or function");var o={retries:3,retryDelay:1e3,retryOn:[]};return i=Object.assign(o,i),function(a,l){var d=i.retries,g=i.retryDelay,f=i.retryOn;if(l&&l.retries!==void 0)if(e(l.retries))d=l.retries;else throw new n("retries must be a positive integer");if(l&&l.retryDelay!==void 0)if(e(l.retryDelay)||typeof l.retryDelay=="function")g=l.retryDelay;else throw new n("retryDelay must be a positive integer or a function returning a positive integer");if(l&&l.retryOn)if(Array.isArray(l.retryOn)||typeof l.retryOn=="function")f=l.retryOn;else throw new n("retryOn property expects an array or function");return new Promise(function(E,v){var w=function(x){var P=typeof Request<"u"&&a instanceof Request?a.clone():a;r(P,l).then(function(M){if(Array.isArray(f)&&f.indexOf(M.status)===-1)E(M);else if(typeof f=="function")try{return Promise.resolve(f(x,null,M)).then(function(U){U?N(x,null,M):E(M)}).catch(v)}catch(U){v(U)}else x<d?N(x,null,M):E(M)}).catch(function(M){if(typeof f=="function")try{Promise.resolve(f(x,M,null)).then(function(U){U?N(x,M,null):v(M)}).catch(function(U){v(U)})}catch(U){v(U)}else x<d?N(x,M,null):v(M)})};function N(x,P,M){var U=typeof g=="function"?g(x,P,M):g;setTimeout(function(){w(++x)},U)}w(0)})}};function e(r){return Number.isInteger(r)&&r>=0}function n(r){this.name="ArgumentError",this.message=r}return t})});var Vi="11.0.0-rc.3";var nf=Vi.split("-")[0].split(".").slice(0,3).map(t=>t.padStart(2,"0")).join("");var Ya="CooeeSDK",qt=Vi,A_=parseInt(nf,10);var gr=`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${qt}/dist`,$e={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",baseURL:gr,styleURL:`${gr}/widget.min.css`,widgetURL:`${gr}/widget.min.js`,swiperStyleURL:`${gr}/swiper-bundle.min.css`};var Ee=xi(Ka());var ce=class{static debuggerEl;static infoLogs=[];static log(...e){Ee.default.info(...e)}static verbose(...e){Ee.default.debug(...e)}static error(...e){Ee.default.error(...e)}static warn(...e){Ee.default.warn(...e)}static info(...e){Ee.default.info(...e),this.infoLogs.unshift({time:new Date,message:e.join(" ")}),this.addToDebugger()}static trace(...e){Ee.default.trace(...e)}static addToDebugger(){sessionStorage.cooeeDebug&&(this.debuggerEl=this.debuggerEl??document.querySelector("cooee-debugger"),this.debuggerEl&&this.debuggerEl&&(this.debuggerEl.logs=[...this.infoLogs]))}};function P_(t=Ya){Ee.default.useDefaults({formatter:function(n){n.unshift(`${t} (v${qt}):`)}});let e=rf();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Ee.default.setLevel(Ee.default[localStorage.cooeeLogLevel]):Ee.default.setLevel($e.debug?Ee.default.TRACE:Ee.default.OFF)}function rf(){return new URL(location.href).searchParams?.get("cooee-debug")}var yt=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;currency;static get(){return window.CooeeSDK.config}update(e){return e??={},this.gaEnabled=e.gaEnabled,this.gaMeasurementID=e.gaMeasurementID,this.pixelPush=e.pixelPush,this.website=e.website??{},this.currencyCount=e.currencyCount??0,this.money=e.money,this.currency=e.currency,this.storefrontToken=e.storefrontToken,this.skipItemAttribute=e.skipItemAttribute,this}};var Xa=0;function of(t=document.head){return qa($e.styleURL,t,"cooee-global-styles")}function sf(t=document.head){return qa($e.swiperStyleURL,t,"cooee-swiper-styles")}function qa(t,e=document.head,n){return new Promise(r=>{if(e.querySelector(`#${n}`)){r();return}let o=document.createElement("link");o.rel="stylesheet",o.href=t,o.id=n,o.onload=()=>{r()},o.onerror=()=>{console.error("Failed to load stylesheet:",t),r()},e.appendChild(o)})}function Bi(t,e=document.head){if(!t)return;Xa++;let n=document.createElement("style");n.id=`cooee-app-css-${Xa}`,n.textContent=t,e.appendChild(n)}async function Za(){let t=(await import("./swiper-bundle-WHJS64TU.js")).default;return window.CooeeSDK.Swiper=t}async function Ja(t,e=!0){if(!t)return;let n=[];e&&n.push(sf(t)),n.push(of(t)),await Promise.all(n);let r=yt.get().website.commonCSS;Bi(r,t)}var cf={"[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"},og=V(y({},cf),{"[class.ng-submitted]":"isSubmitted"});var lf=new Le("",{providedIn:"root",factory:()=>tc}),tc="always";var uf=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=Ot({type:t});static \u0275inj=wt({})}return t})();var nc=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:lf,useValue:n.callSetDisabledState??tc}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=Ot({type:t});static \u0275inj=wt({imports:[uf]})}return t})();var yr=class t{cooeeEvent=new Oe;cooeeCTA=new Oe;elementRef=R(Ae);hasSwiper=!1;_engagementTrigger=Ue(null);_triggerContext=Ue(null);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get classes(){let e=["letscooee-widget"],n=this._engagementTrigger();return e.push(`widget-${n?.shortID}`),e}get triggerContext(){return this._triggerContext()}set triggerContext(e){this._triggerContext.set(e),this._engagementTrigger.set(e.triggerData),this.engagementTriggerReceived(e.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){ce.verbose("Init",this.constructor.name);let e=this.elementRef.nativeElement.shadowRoot;e&&Ja(e,this.hasSwiper)}ngOnDestroy(){ce.verbose("Destroying",this.constructor.name)}sendEventToRenderer(e){this.cooeeEvent.emit(e)}executeCTAViaRenderer(e){this.cooeeCTA.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=ee({type:t,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,r){n&2&&hr(r.classes)},inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:1,vars:0,template:function(n,r){n&1&&Ta(0)},encapsulation:2})};var df=(t,e)=>({"--option-color":t,"background-color":e}),ic=(t,e)=>e.id;function ff(t,e){if(t&1&&(tt(0,"span",6),ye(1),_t()),t&2){Re();let n=gt(0);$(),Kt(n)}}function hf(t,e){if(t&1){let n=zt();Nt(0),tt(1,"button",5),wn("click",function(){let i=Dt(n).$implicit,o=Re().$implicit,s=Re();return At(s.onOptionChange(o,i))}),He(2,ff,2,1,"span",6),_t()}if(t&2){let n=e.$implicit,r=Re().$implicit,i=gt(1),o=n.name,s=Mt(n.displayName||n.name),a=i?n.hexColor??o:"",l=Re().selectedOptions()[r.name]===o;$(),An("color-type",i)("selected",l)("disabled",n.disabled),ba("title",s)("ngStyle",Na(14,df,a,a)),mt("aria-checked",l?"true":"false")("data-value",o)("aria-disabled",n.disabled?"true":null)("aria-label",s),$(),je(i?-1:2)}}function pf(t,e){if(t&1&&(tt(0,"div"),Nt(1),tt(2,"div",1),ye(3),_t(),tt(4,"div",2),ye(5),_t(),tt(6,"div",3),Pi(7,hf,3,17,"button",4,ic),_t()()),t&2){let n=e.$implicit,r=Re();hr(Ra("option-group ",n.name.toLowerCase())),$(),Mt(r.hasHexColors(n)),$(2),Xt("",n.name,":"),$(2),Kt(r.selectedOptions()[n.name]),$(),mt("aria-label",n.name),$(),ki(n.optionValues)}}var Mn=t=>t.trim().toLowerCase(),rc=class t extends yr{selectedVariant=new Oe;item=Ne.required();selectedOptions=Ue({});options=nt(()=>{let e=this.item();if(!e.options||e.vars.length===1)return[];if(window.cooeeManipulateProduct)try{window.cooeeManipulateProduct(e,this.engagementTrigger)}catch(n){ce.error(n)}return e.options.forEach(n=>{n.optionValues.forEach(r=>{r.disabled=this.isOptionValueDisabledFast(n,r)})}),e.options});matchedVariant=nt(()=>{let e=this.item(),n=this.selectedOptions();return e.vars.find(r=>e.options.every(i=>{let o=r.selectedOptions.find(s=>s.name===i.name)?.value;return n[i.name]===o}))});availabilityIndex=nt(()=>{let e=this.item(),n=new Map;return e?.vars?.length&&e.vars.forEach((r,i)=>{if(r.isAvailable)for(let o of r.selectedOptions){let s=Mn(o.name),a=o.value,l=n.get(s);l||n.set(s,l=new Map);let d=l.get(a);d||l.set(a,d=new Set),d.add(i)}}),n});constructor(){super(),rt(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let e=rt(()=>{let n=this.item();if(!n?.options)return;let r=y({},this.selectedOptions()),i=n.vars.find(o=>o.isAvailable)??n.vars[0];n.options.forEach(o=>{let s=i?.selectedOptions.find(a=>a.name===o.name)?.value;s&&(r[o.name]=s)}),this.selectedOptions.set(r),e.destroy()})}ngOnInit(){super.ngOnInit();let e=this.elementRef.nativeElement.shadowRoot;if(!e)return;let n=yt.get().website?.itemSwatchMapping;n&&Bi(n,e)}onOptionChange(e,n){let r=y({},this.selectedOptions());r[e.name]=n.name,this.selectedOptions.set(r)}engagementTriggerReceived(){}update(){}hasHexColors(e){return!!e.optionValues[0]?.name.match(/#[a-f0-9]{6}\b/i)}getCandidateVariantsExcluding(e){let n=this.item(),r=this.availabilityIndex(),i=new Set;n.vars.forEach((s,a)=>{s.isAvailable&&i.add(a)});let o=i;for(let[s,a]of Object.entries(this.selectedOptions())){if(Mn(s)===Mn(e))continue;let l=r.get(Mn(s));if(!l)return new Set;let d=l.get(String(a));if(!d)return new Set;if(o=new Set([...o].filter(g=>d.has(g))),o.size===0)return o}return o}isOptionValueDisabledFast(e,n){let i=this.availabilityIndex().get(Mn(e.name));if(!i)return!0;let o=n.name,s=i.get(o);if(!s||s.size===0)return!0;let a=this.getCandidateVariantsExcluding(e.name);if(a.size===0)return!0;for(let l of a)if(s.has(l))return!1;return!0}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=ee({type:t,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[xt],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,"color-type","selected","disabled","title","ngStyle"],["type","button","role","radio",1,"option-value",3,"click","title","ngStyle"],[1,"title"]],template:function(n,r){n&1&&Pi(0,pf,9,7,"div",0,ic),n&2&&ki(r.options())},dependencies:[Fa,La,nc],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, rgb(var(--lc-color-button, 0 0 0)))}.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}
|
|
1
|
+
import{$ as Ea,$a as On,Aa as Dn,Ab as pr,B as De,Ba as Re,Bb as it,C as me,Ca as Ia,Cb as We,Da as wa,E as Ue,Ea as Da,Eb as mr,Fa as Aa,Fb as Rn,Ga as Oa,Gb as Ga,H as Sn,Hb as Nn,I as Ae,Ib as Wa,J as va,Jb as $a,K as Cn,Kb as _r,L as Tn,La as An,M as $,Ma as hr,Na as ye,Oa as Kt,P as fr,Pa as Xt,R as $t,S as In,T as Ri,Ta as Nt,U as Ni,Ua as Mt,V as ee,Va as gt,W as Ot,Wa as xa,X as Yt,Xa as Ra,Y as ya,Z as xt,_a as Na,a as la,aa as Oe,ab as xn,ba as Fe,c as he,ca as pt,d as ua,da as Mi,ea as mt,eb as nt,fa as He,fb as rt,g as da,ga as je,gb as vt,hb as Ne,i as fa,ia as Pi,ja as ki,jb as Ma,ka as ba,kb as Fi,l as ha,la as tt,m as pa,ma as _t,n as ma,na as Li,nb as Pa,o as _a,oa as _e,ob as ka,pa as xe,q as ga,qa as Rt,qb as La,s as pe,t as wt,tb as Fa,u as Le,ua as Sa,v as R,va as Ca,vb as Va,w as dr,wa as Ta,wb as Ba,x as Dt,xa as zt,xb as Ua,y as At,ya as Ge,yb as Ha,za as wn,zb as ja}from"./chunk-KFBNKCMH.js";import{a as y,b as V,c as bn,d as ca,e as Oi,f as xi,g as ur}from"./chunk-V7UGKYBN.js";var Ka=Oi((za,vr)=>{"use strict";(function(t){"use strict";var e={};e.VERSION="1.6.1";var n,r={},i=function(d,g){return function(){return g.apply(d,arguments)}},o=function(){var d=arguments,g=d[0],f,E;for(E=1;E<d.length;E++)for(f in d[E])!(f in g)&&d[E].hasOwnProperty(f)&&(g[f]=d[E][f]);return g},s=function(d,g){return{value:d,name:g}};e.TRACE=s(1,"TRACE"),e.DEBUG=s(2,"DEBUG"),e.INFO=s(3,"INFO"),e.TIME=s(4,"TIME"),e.WARN=s(5,"WARN"),e.ERROR=s(8,"ERROR"),e.OFF=s(99,"OFF");var a=function(d){this.context=d,this.setLevel(d.filterLevel),this.log=this.info};a.prototype={setLevel:function(d){d&&"value"in d&&(this.context.filterLevel=d)},getLevel:function(){return this.context.filterLevel},enabledFor:function(d){var g=this.context.filterLevel;return d.value>=g.value},trace:function(){this.invoke(e.TRACE,arguments)},debug:function(){this.invoke(e.DEBUG,arguments)},info:function(){this.invoke(e.INFO,arguments)},warn:function(){this.invoke(e.WARN,arguments)},error:function(){this.invoke(e.ERROR,arguments)},time:function(d){typeof d=="string"&&d.length>0&&this.invoke(e.TIME,[d,"start"])},timeEnd:function(d){typeof d=="string"&&d.length>0&&this.invoke(e.TIME,[d,"end"])},invoke:function(d,g){n&&this.enabledFor(d)&&n(g,o({level:d},this.context))}};var l=new a({filterLevel:e.OFF});(function(){var d=e;d.enabledFor=i(l,l.enabledFor),d.trace=i(l,l.trace),d.debug=i(l,l.debug),d.time=i(l,l.time),d.timeEnd=i(l,l.timeEnd),d.info=i(l,l.info),d.warn=i(l,l.warn),d.error=i(l,l.error),d.log=d.info})(),e.setHandler=function(d){n=d},e.setLevel=function(d){l.setLevel(d);for(var g in r)r.hasOwnProperty(g)&&r[g].setLevel(d)},e.getLevel=function(){return l.getLevel()},e.get=function(d){return r[d]||(r[d]=new a(o({name:d},l.context)))},e.createDefaultHandler=function(d){d=d||{},d.formatter=d.formatter||function(v,w){w.name&&v.unshift("["+w.name+"]")};var g={},f=function(E,v){Function.prototype.apply.call(E,console,v)};return typeof console>"u"?function(){}:function(E,v){E=Array.prototype.slice.call(E);var w=console.log,N;v.level===e.TIME?(N=(v.name?"["+v.name+"] ":"")+E[0],E[1]==="start"?console.time?console.time(N):g[N]=new Date().getTime():console.timeEnd?console.timeEnd(N):f(w,[N+": "+(new Date().getTime()-g[N])+"ms"])):(v.level===e.WARN&&console.warn?w=console.warn:v.level===e.ERROR&&console.error?w=console.error:v.level===e.INFO&&console.info?w=console.info:v.level===e.DEBUG&&console.debug?w=console.debug:v.level===e.TRACE&&console.trace&&(w=console.trace),d.formatter(E,v),f(w,E))}},e.useDefaults=function(d){e.setLevel(d&&d.defaultLevel||e.DEBUG),e.setHandler(e.createDefaultHandler(d))},e.setDefaults=e.useDefaults,typeof define=="function"&&define.amd?define(e):typeof vr<"u"&&vr.exports?vr.exports=e:(e._prevLogger=t.Logger,e.noConflict=function(){return t.Logger=e._prevLogger,e},t.Logger=e)})(za)});var sc=Oi((oc,Hi)=>{"use strict";(function(t){if(typeof oc=="object"&&typeof Hi<"u")Hi.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var e;typeof window<"u"?e=window:typeof global<"u"?e=global:typeof self<"u"?e=self:e=this,e.localforage=t()}})(function(){var t,e,n;return(function r(i,o,s){function a(g,f){if(!o[g]){if(!i[g]){var E=typeof bn=="function"&&bn;if(!f&&E)return E(g,!0);if(l)return l(g,!0);var v=new Error("Cannot find module '"+g+"'");throw v.code="MODULE_NOT_FOUND",v}var w=o[g]={exports:{}};i[g][0].call(w.exports,function(N){var x=i[g][1][N];return a(x||N)},w,w.exports,r,i,o,s)}return o[g].exports}for(var l=typeof bn=="function"&&bn,d=0;d<s.length;d++)a(s[d]);return a})({1:[function(r,i,o){(function(s){"use strict";var a=s.MutationObserver||s.WebKitMutationObserver,l;if(a){var d=0,g=new a(N),f=s.document.createTextNode("");g.observe(f,{characterData:!0}),l=function(){f.data=d=++d%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var E=new s.MessageChannel;E.port1.onmessage=N,l=function(){E.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?l=function(){var P=s.document.createElement("script");P.onreadystatechange=function(){N(),P.onreadystatechange=null,P.parentNode.removeChild(P),P=null},s.document.documentElement.appendChild(P)}:l=function(){setTimeout(N,0)};var v,w=[];function N(){v=!0;for(var P,M,U=w.length;U;){for(M=w,w=[],P=-1;++P<U;)M[P]();U=w.length}v=!1}i.exports=x;function x(P){w.push(P)===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 a(){}var l={},d=["REJECTED"],g=["FULFILLED"],f=["PENDING"];i.exports=E;function E(D){if(typeof D!="function")throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,D!==a&&x(this,D)}E.prototype.catch=function(D){return this.then(null,D)},E.prototype.then=function(D,H){if(typeof D!="function"&&this.state===g||typeof H!="function"&&this.state===d)return this;var F=new this.constructor(a);if(this.state!==f){var j=this.state===g?D:H;w(F,j,this.outcome)}else this.queue.push(new v(F,D,H));return F};function v(D,H,F){this.promise=D,typeof H=="function"&&(this.onFulfilled=H,this.callFulfilled=this.otherCallFulfilled),typeof F=="function"&&(this.onRejected=F,this.callRejected=this.otherCallRejected)}v.prototype.callFulfilled=function(D){l.resolve(this.promise,D)},v.prototype.otherCallFulfilled=function(D){w(this.promise,this.onFulfilled,D)},v.prototype.callRejected=function(D){l.reject(this.promise,D)},v.prototype.otherCallRejected=function(D){w(this.promise,this.onRejected,D)};function w(D,H,F){s(function(){var j;try{j=H(F)}catch(Z){return l.reject(D,Z)}j===D?l.reject(D,new TypeError("Cannot resolve promise with itself")):l.resolve(D,j)})}l.resolve=function(D,H){var F=P(N,H);if(F.status==="error")return l.reject(D,F.value);var j=F.value;if(j)x(D,j);else{D.state=g,D.outcome=H;for(var Z=-1,X=D.queue.length;++Z<X;)D.queue[Z].callFulfilled(H)}return D},l.reject=function(D,H){D.state=d,D.outcome=H;for(var F=-1,j=D.queue.length;++F<j;)D.queue[F].callRejected(H);return D};function N(D){var H=D&&D.then;if(D&&(typeof D=="object"||typeof D=="function")&&typeof H=="function")return function(){H.apply(D,arguments)}}function x(D,H){var F=!1;function j(Ie){F||(F=!0,l.reject(D,Ie))}function Z(Ie){F||(F=!0,l.resolve(D,Ie))}function X(){H(Z,j)}var se=P(X);se.status==="error"&&j(se.value)}function P(D,H){var F={};try{F.value=D(H),F.status="success"}catch(j){F.status="error",F.value=j}return F}E.resolve=M;function M(D){return D instanceof this?D:l.resolve(new this(a),D)}E.reject=U;function U(D){var H=new this(a);return l.reject(H,D)}E.all=Ce;function Ce(D){var H=this;if(Object.prototype.toString.call(D)!=="[object Array]")return this.reject(new TypeError("must be an array"));var F=D.length,j=!1;if(!F)return this.resolve([]);for(var Z=new Array(F),X=0,se=-1,Ie=new this(a);++se<F;)Qe(D[se],se);return Ie;function Qe(vn,ar){H.resolve(vn).then(yi,function(Gt){j||(j=!0,l.reject(Ie,Gt))});function yi(Gt){Z[ar]=Gt,++X===F&&!j&&(j=!0,l.resolve(Ie,Z))}}}E.race=Te;function Te(D){var H=this;if(Object.prototype.toString.call(D)!=="[object Array]")return this.reject(new TypeError("must be an array"));var F=D.length,j=!1;if(!F)return this.resolve([]);for(var Z=-1,X=new this(a);++Z<F;)se(D[Z]);return X;function se(Ie){H.resolve(Ie).then(function(Qe){j||(j=!0,l.resolve(X,Qe))},function(Qe){j||(j=!0,l.reject(X,Qe))})}}},{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(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c};function a(c,h){if(!(c instanceof h))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 d=l();function g(){try{if(!d||!d.open)return!1;var c=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),h=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!c||h)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function f(c,h){c=c||[],h=h||{};try{return new Blob(c,h)}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,_=0;_<c.length;_+=1)m.append(c[_]);return m.getBlob(h.type)}}typeof Promise>"u"&&r(3);var E=Promise;function v(c,h){h&&c.then(function(u){h(null,u)},function(u){h(u)})}function w(c,h,u){typeof h=="function"&&c.then(h),typeof u=="function"&&c.catch(u)}function N(c){return typeof c!="string"&&(console.warn(c+" used as a key, but it is not a string."),c=String(c)),c}function x(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var P="local-forage-detect-blob-support",M=void 0,U={},Ce=Object.prototype.toString,Te="readonly",D="readwrite";function H(c){for(var h=c.length,u=new ArrayBuffer(h),m=new Uint8Array(u),_=0;_<h;_++)m[_]=c.charCodeAt(_);return u}function F(c){return new E(function(h){var u=c.transaction(P,D),m=f([""]);u.objectStore(P).put(m,"key"),u.onabort=function(_){_.preventDefault(),_.stopPropagation(),h(!1)},u.oncomplete=function(){var _=navigator.userAgent.match(/Chrome\/(\d+)/),p=navigator.userAgent.match(/Edge\//);h(p||!_||parseInt(_[1],10)>=43)}}).catch(function(){return!1})}function j(c){return typeof M=="boolean"?E.resolve(M):F(c).then(function(h){return M=h,M})}function Z(c){var h=U[c.name],u={};u.promise=new E(function(m,_){u.resolve=m,u.reject=_}),h.deferredOperations.push(u),h.dbReady?h.dbReady=h.dbReady.then(function(){return u.promise}):h.dbReady=u.promise}function X(c){var h=U[c.name],u=h.deferredOperations.pop();if(u)return u.resolve(),u.promise}function se(c,h){var u=U[c.name],m=u.deferredOperations.pop();if(m)return m.reject(h),m.promise}function Ie(c,h){return new E(function(u,m){if(U[c.name]=U[c.name]||js(),c.db)if(h)Z(c),c.db.close();else return u(c.db);var _=[c.name];h&&_.push(c.version);var p=d.open.apply(d,_);h&&(p.onupgradeneeded=function(b){var S=p.result;try{S.createObjectStore(c.storeName),b.oldVersion<=1&&S.createObjectStore(P)}catch(C){if(C.name==="ConstraintError")console.warn('The database "'+c.name+'" has been upgraded from version '+b.oldVersion+" to version "+b.newVersion+', but the storage "'+c.storeName+'" already exists.');else throw C}}),p.onerror=function(b){b.preventDefault(),m(p.error)},p.onsuccess=function(){var b=p.result;b.onversionchange=function(S){S.target.close()},u(b),X(c)}})}function Qe(c){return Ie(c,!1)}function vn(c){return Ie(c,!0)}function ar(c,h){if(!c.db)return!0;var u=!c.db.objectStoreNames.contains(c.storeName),m=c.version<c.db.version,_=c.version>c.db.version;if(m&&(c.version!==h&&console.warn('The database "'+c.name+`" can't be downgraded from version `+c.db.version+" to version "+c.version+"."),c.version=c.db.version),_||u){if(u){var p=c.db.version+1;p>c.version&&(c.version=p)}return!0}return!1}function yi(c){return new E(function(h,u){var m=new FileReader;m.onerror=u,m.onloadend=function(_){var p=btoa(_.target.result||"");h({__local_forage_encoded_blob:!0,data:p,type:c.type})},m.readAsBinaryString(c)})}function Gt(c){var h=H(atob(c.data));return f([h],{type:c.type})}function Hs(c){return c&&c.__local_forage_encoded_blob}function nd(c){var h=this,u=h._initReady().then(function(){var m=U[h._dbInfo.name];if(m&&m.dbReady)return m.dbReady});return w(u,c,c),u}function rd(c){Z(c);for(var h=U[c.name],u=h.forages,m=0;m<u.length;m++){var _=u[m];_._dbInfo.db&&(_._dbInfo.db.close(),_._dbInfo.db=null)}return c.db=null,Qe(c).then(function(p){return c.db=p,ar(c)?vn(c):p}).then(function(p){c.db=h.db=p;for(var b=0;b<u.length;b++)u[b]._dbInfo.db=p}).catch(function(p){throw se(c,p),p})}function et(c,h,u,m){m===void 0&&(m=1);try{var _=c.db.transaction(c.storeName,h);u(null,_)}catch(p){if(m>0&&(!c.db||p.name==="InvalidStateError"||p.name==="NotFoundError"))return E.resolve().then(function(){if(!c.db||p.name==="NotFoundError"&&!c.db.objectStoreNames.contains(c.storeName)&&c.version<=c.db.version)return c.db&&(c.version=c.db.version+1),vn(c)}).then(function(){return rd(c).then(function(){et(c,h,u,m-1)})}).catch(u);u(p)}}function js(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function id(c){var h=this,u={db:null};if(c)for(var m in c)u[m]=c[m];var _=U[u.name];_||(_=js(),U[u.name]=_),_.forages.push(h),h._initReady||(h._initReady=h.ready,h.ready=nd);var p=[];function b(){return E.resolve()}for(var S=0;S<_.forages.length;S++){var C=_.forages[S];C!==h&&p.push(C._initReady().catch(b))}var T=_.forages.slice(0);return E.all(p).then(function(){return u.db=_.db,Qe(u)}).then(function(I){return u.db=I,ar(u,h._defaultConfig.version)?vn(u):I}).then(function(I){u.db=_.db=I,h._dbInfo=u;for(var O=0;O<T.length;O++){var B=T[O];B!==h&&(B._dbInfo.db=u.db,B._dbInfo.version=u.version)}})}function od(c,h){var u=this;c=N(c);var m=new E(function(_,p){u.ready().then(function(){et(u._dbInfo,Te,function(b,S){if(b)return p(b);try{var C=S.objectStore(u._dbInfo.storeName),T=C.get(c);T.onsuccess=function(){var I=T.result;I===void 0&&(I=null),Hs(I)&&(I=Gt(I)),_(I)},T.onerror=function(){p(T.error)}}catch(I){p(I)}})}).catch(p)});return v(m,h),m}function sd(c,h){var u=this,m=new E(function(_,p){u.ready().then(function(){et(u._dbInfo,Te,function(b,S){if(b)return p(b);try{var C=S.objectStore(u._dbInfo.storeName),T=C.openCursor(),I=1;T.onsuccess=function(){var O=T.result;if(O){var B=O.value;Hs(B)&&(B=Gt(B));var G=c(B,O.key,I++);G!==void 0?_(G):O.continue()}else _()},T.onerror=function(){p(T.error)}}catch(O){p(O)}})}).catch(p)});return v(m,h),m}function ad(c,h,u){var m=this;c=N(c);var _=new E(function(p,b){var S;m.ready().then(function(){return S=m._dbInfo,Ce.call(h)==="[object Blob]"?j(S.db).then(function(C){return C?h:yi(h)}):h}).then(function(C){et(m._dbInfo,D,function(T,I){if(T)return b(T);try{var O=I.objectStore(m._dbInfo.storeName);C===null&&(C=void 0);var B=O.put(C,c);I.oncomplete=function(){C===void 0&&(C=null),p(C)},I.onabort=I.onerror=function(){var G=B.error?B.error:B.transaction.error;b(G)}}catch(G){b(G)}})}).catch(b)});return v(_,u),_}function cd(c,h){var u=this;c=N(c);var m=new E(function(_,p){u.ready().then(function(){et(u._dbInfo,D,function(b,S){if(b)return p(b);try{var C=S.objectStore(u._dbInfo.storeName),T=C.delete(c);S.oncomplete=function(){_()},S.onerror=function(){p(T.error)},S.onabort=function(){var I=T.error?T.error:T.transaction.error;p(I)}}catch(I){p(I)}})}).catch(p)});return v(m,h),m}function ld(c){var h=this,u=new E(function(m,_){h.ready().then(function(){et(h._dbInfo,D,function(p,b){if(p)return _(p);try{var S=b.objectStore(h._dbInfo.storeName),C=S.clear();b.oncomplete=function(){m()},b.onabort=b.onerror=function(){var T=C.error?C.error:C.transaction.error;_(T)}}catch(T){_(T)}})}).catch(_)});return v(u,c),u}function ud(c){var h=this,u=new E(function(m,_){h.ready().then(function(){et(h._dbInfo,Te,function(p,b){if(p)return _(p);try{var S=b.objectStore(h._dbInfo.storeName),C=S.count();C.onsuccess=function(){m(C.result)},C.onerror=function(){_(C.error)}}catch(T){_(T)}})}).catch(_)});return v(u,c),u}function dd(c,h){var u=this,m=new E(function(_,p){if(c<0){_(null);return}u.ready().then(function(){et(u._dbInfo,Te,function(b,S){if(b)return p(b);try{var C=S.objectStore(u._dbInfo.storeName),T=!1,I=C.openKeyCursor();I.onsuccess=function(){var O=I.result;if(!O){_(null);return}c===0||T?_(O.key):(T=!0,O.advance(c))},I.onerror=function(){p(I.error)}}catch(O){p(O)}})}).catch(p)});return v(m,h),m}function fd(c){var h=this,u=new E(function(m,_){h.ready().then(function(){et(h._dbInfo,Te,function(p,b){if(p)return _(p);try{var S=b.objectStore(h._dbInfo.storeName),C=S.openKeyCursor(),T=[];C.onsuccess=function(){var I=C.result;if(!I){m(T);return}T.push(I.key),I.continue()},C.onerror=function(){_(C.error)}}catch(I){_(I)}})}).catch(_)});return v(u,c),u}function hd(c,h){h=x.apply(this,arguments);var u=this.config();c=typeof c!="function"&&c||{},c.name||(c.name=c.name||u.name,c.storeName=c.storeName||u.storeName);var m=this,_;if(!c.name)_=E.reject("Invalid arguments");else{var p=c.name===u.name&&m._dbInfo.db,b=p?E.resolve(m._dbInfo.db):Qe(c).then(function(S){var C=U[c.name],T=C.forages;C.db=S;for(var I=0;I<T.length;I++)T[I]._dbInfo.db=S;return S});c.storeName?_=b.then(function(S){if(S.objectStoreNames.contains(c.storeName)){var C=S.version+1;Z(c);var T=U[c.name],I=T.forages;S.close();for(var O=0;O<I.length;O++){var B=I[O];B._dbInfo.db=null,B._dbInfo.version=C}var G=new E(function(W,Q){var J=d.open(c.name,C);J.onerror=function(we){var En=J.result;En.close(),Q(we)},J.onupgradeneeded=function(){var we=J.result;we.deleteObjectStore(c.storeName)},J.onsuccess=function(){var we=J.result;we.close(),W(we)}});return G.then(function(W){T.db=W;for(var Q=0;Q<I.length;Q++){var J=I[Q];J._dbInfo.db=W,X(J._dbInfo)}}).catch(function(W){throw(se(c,W)||E.resolve()).catch(function(){}),W})}}):_=b.then(function(S){Z(c);var C=U[c.name],T=C.forages;S.close();for(var I=0;I<T.length;I++){var O=T[I];O._dbInfo.db=null}var B=new E(function(G,W){var Q=d.deleteDatabase(c.name);Q.onerror=function(){var J=Q.result;J&&J.close(),W(Q.error)},Q.onblocked=function(){console.warn('dropInstance blocked for database "'+c.name+'" until all open connections are closed')},Q.onsuccess=function(){var J=Q.result;J&&J.close(),G(J)}});return B.then(function(G){C.db=G;for(var W=0;W<T.length;W++){var Q=T[W];X(Q._dbInfo)}}).catch(function(G){throw(se(c,G)||E.resolve()).catch(function(){}),G})})}return v(_,h),_}var pd={_driver:"asyncStorage",_initStorage:id,_support:g(),iterate:sd,getItem:od,setItem:ad,removeItem:cd,clear:ld,length:ud,key:dd,keys:fd,dropInstance:hd};function md(){return typeof openDatabase=="function"}var ft="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_d="~~local_forage_type~",Gs=/^~~local_forage_type~([^~]+)~/,cr="__lfsc__:",Ei=cr.length,bi="arbf",Si="blob",Ws="si08",$s="ui08",Ys="uic8",zs="si16",Ks="si32",Xs="ur16",qs="ui32",Zs="fl32",Js="fl64",Qs=Ei+bi.length,ea=Object.prototype.toString;function ta(c){var h=c.length*.75,u=c.length,m,_=0,p,b,S,C;c[c.length-1]==="="&&(h--,c[c.length-2]==="="&&h--);var T=new ArrayBuffer(h),I=new Uint8Array(T);for(m=0;m<u;m+=4)p=ft.indexOf(c[m]),b=ft.indexOf(c[m+1]),S=ft.indexOf(c[m+2]),C=ft.indexOf(c[m+3]),I[_++]=p<<2|b>>4,I[_++]=(b&15)<<4|S>>2,I[_++]=(S&3)<<6|C&63;return T}function Ci(c){var h=new Uint8Array(c),u="",m;for(m=0;m<h.length;m+=3)u+=ft[h[m]>>2],u+=ft[(h[m]&3)<<4|h[m+1]>>4],u+=ft[(h[m+1]&15)<<2|h[m+2]>>6],u+=ft[h[m+2]&63];return h.length%3===2?u=u.substring(0,u.length-1)+"=":h.length%3===1&&(u=u.substring(0,u.length-2)+"=="),u}function gd(c,h){var u="";if(c&&(u=ea.call(c)),c&&(u==="[object ArrayBuffer]"||c.buffer&&ea.call(c.buffer)==="[object ArrayBuffer]")){var m,_=cr;c instanceof ArrayBuffer?(m=c,_+=bi):(m=c.buffer,u==="[object Int8Array]"?_+=Ws:u==="[object Uint8Array]"?_+=$s:u==="[object Uint8ClampedArray]"?_+=Ys:u==="[object Int16Array]"?_+=zs:u==="[object Uint16Array]"?_+=Xs:u==="[object Int32Array]"?_+=Ks:u==="[object Uint32Array]"?_+=qs:u==="[object Float32Array]"?_+=Zs:u==="[object Float64Array]"?_+=Js:h(new Error("Failed to get type for BinaryArray"))),h(_+Ci(m))}else if(u==="[object Blob]"){var p=new FileReader;p.onload=function(){var b=_d+c.type+"~"+Ci(this.result);h(cr+Si+b)},p.readAsArrayBuffer(c)}else try{h(JSON.stringify(c))}catch(b){console.error("Couldn't convert value into a JSON string: ",c),h(null,b)}}function vd(c){if(c.substring(0,Ei)!==cr)return JSON.parse(c);var h=c.substring(Qs),u=c.substring(Ei,Qs),m;if(u===Si&&Gs.test(h)){var _=h.match(Gs);m=_[1],h=h.substring(_[0].length)}var p=ta(h);switch(u){case bi:return p;case Si:return f([p],{type:m});case Ws:return new Int8Array(p);case $s:return new Uint8Array(p);case Ys:return new Uint8ClampedArray(p);case zs:return new Int16Array(p);case Xs:return new Uint16Array(p);case Ks:return new Int32Array(p);case qs:return new Uint32Array(p);case Zs:return new Float32Array(p);case Js:return new Float64Array(p);default:throw new Error("Unkown type: "+u)}}var Ti={serialize:gd,deserialize:vd,stringToBuffer:ta,bufferToString:Ci};function na(c,h,u,m){c.executeSql("CREATE TABLE IF NOT EXISTS "+h.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],u,m)}function yd(c){var h=this,u={db:null};if(c)for(var m in c)u[m]=typeof c[m]!="string"?c[m].toString():c[m];var _=new E(function(p,b){try{u.db=openDatabase(u.name,String(u.version),u.description,u.size)}catch(S){return b(S)}u.db.transaction(function(S){na(S,u,function(){h._dbInfo=u,p()},function(C,T){b(T)})},b)});return u.serializer=Ti,_}function ht(c,h,u,m,_,p){c.executeSql(u,m,_,function(b,S){S.code===S.SYNTAX_ERR?b.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[h.storeName],function(C,T){T.rows.length?p(C,S):na(C,h,function(){C.executeSql(u,m,_,p)},p)},p):p(b,S)},p)}function Ed(c,h){var u=this;c=N(c);var m=new E(function(_,p){u.ready().then(function(){var b=u._dbInfo;b.db.transaction(function(S){ht(S,b,"SELECT * FROM "+b.storeName+" WHERE key = ? LIMIT 1",[c],function(C,T){var I=T.rows.length?T.rows.item(0).value:null;I&&(I=b.serializer.deserialize(I)),_(I)},function(C,T){p(T)})})}).catch(p)});return v(m,h),m}function bd(c,h){var u=this,m=new E(function(_,p){u.ready().then(function(){var b=u._dbInfo;b.db.transaction(function(S){ht(S,b,"SELECT * FROM "+b.storeName,[],function(C,T){for(var I=T.rows,O=I.length,B=0;B<O;B++){var G=I.item(B),W=G.value;if(W&&(W=b.serializer.deserialize(W)),W=c(W,G.key,B+1),W!==void 0){_(W);return}}_()},function(C,T){p(T)})})}).catch(p)});return v(m,h),m}function ra(c,h,u,m){var _=this;c=N(c);var p=new E(function(b,S){_.ready().then(function(){h===void 0&&(h=null);var C=h,T=_._dbInfo;T.serializer.serialize(h,function(I,O){O?S(O):T.db.transaction(function(B){ht(B,T,"INSERT OR REPLACE INTO "+T.storeName+" (key, value) VALUES (?, ?)",[c,I],function(){b(C)},function(G,W){S(W)})},function(B){if(B.code===B.QUOTA_ERR){if(m>0){b(ra.apply(_,[c,C,u,m-1]));return}S(B)}})})}).catch(S)});return v(p,u),p}function Sd(c,h,u){return ra.apply(this,[c,h,u,1])}function Cd(c,h){var u=this;c=N(c);var m=new E(function(_,p){u.ready().then(function(){var b=u._dbInfo;b.db.transaction(function(S){ht(S,b,"DELETE FROM "+b.storeName+" WHERE key = ?",[c],function(){_()},function(C,T){p(T)})})}).catch(p)});return v(m,h),m}function Td(c){var h=this,u=new E(function(m,_){h.ready().then(function(){var p=h._dbInfo;p.db.transaction(function(b){ht(b,p,"DELETE FROM "+p.storeName,[],function(){m()},function(S,C){_(C)})})}).catch(_)});return v(u,c),u}function Id(c){var h=this,u=new E(function(m,_){h.ready().then(function(){var p=h._dbInfo;p.db.transaction(function(b){ht(b,p,"SELECT COUNT(key) as c FROM "+p.storeName,[],function(S,C){var T=C.rows.item(0).c;m(T)},function(S,C){_(C)})})}).catch(_)});return v(u,c),u}function wd(c,h){var u=this,m=new E(function(_,p){u.ready().then(function(){var b=u._dbInfo;b.db.transaction(function(S){ht(S,b,"SELECT key FROM "+b.storeName+" WHERE id = ? LIMIT 1",[c+1],function(C,T){var I=T.rows.length?T.rows.item(0).key:null;_(I)},function(C,T){p(T)})})}).catch(p)});return v(m,h),m}function Dd(c){var h=this,u=new E(function(m,_){h.ready().then(function(){var p=h._dbInfo;p.db.transaction(function(b){ht(b,p,"SELECT key FROM "+p.storeName,[],function(S,C){for(var T=[],I=0;I<C.rows.length;I++)T.push(C.rows.item(I).key);m(T)},function(S,C){_(C)})})}).catch(_)});return v(u,c),u}function Ad(c){return new E(function(h,u){c.transaction(function(m){m.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(_,p){for(var b=[],S=0;S<p.rows.length;S++)b.push(p.rows.item(S).name);h({db:c,storeNames:b})},function(_,p){u(p)})},function(m){u(m)})})}function Od(c,h){h=x.apply(this,arguments);var u=this.config();c=typeof c!="function"&&c||{},c.name||(c.name=c.name||u.name,c.storeName=c.storeName||u.storeName);var m=this,_;return c.name?_=new E(function(p){var b;c.name===u.name?b=m._dbInfo.db:b=openDatabase(c.name,"","",0),c.storeName?p({db:b,storeNames:[c.storeName]}):p(Ad(b))}).then(function(p){return new E(function(b,S){p.db.transaction(function(C){function T(G){return new E(function(W,Q){C.executeSql("DROP TABLE IF EXISTS "+G,[],function(){W()},function(J,we){Q(we)})})}for(var I=[],O=0,B=p.storeNames.length;O<B;O++)I.push(T(p.storeNames[O]));E.all(I).then(function(){b()}).catch(function(G){S(G)})},function(C){S(C)})})}):_=E.reject("Invalid arguments"),v(_,h),_}var xd={_driver:"webSQLStorage",_initStorage:yd,_support:md(),iterate:bd,getItem:Ed,setItem:Sd,removeItem:Cd,clear:Td,length:Id,key:wd,keys:Dd,dropInstance:Od};function Rd(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function ia(c,h){var u=c.name+"/";return c.storeName!==h.storeName&&(u+=c.storeName+"/"),u}function Nd(){var c="_localforage_support_test";try{return localStorage.setItem(c,!0),localStorage.removeItem(c),!1}catch{return!0}}function Md(){return!Nd()||localStorage.length>0}function Pd(c){var h=this,u={};if(c)for(var m in c)u[m]=c[m];return u.keyPrefix=ia(c,h._defaultConfig),Md()?(h._dbInfo=u,u.serializer=Ti,E.resolve()):E.reject()}function kd(c){var h=this,u=h.ready().then(function(){for(var m=h._dbInfo.keyPrefix,_=localStorage.length-1;_>=0;_--){var p=localStorage.key(_);p.indexOf(m)===0&&localStorage.removeItem(p)}});return v(u,c),u}function Ld(c,h){var u=this;c=N(c);var m=u.ready().then(function(){var _=u._dbInfo,p=localStorage.getItem(_.keyPrefix+c);return p&&(p=_.serializer.deserialize(p)),p});return v(m,h),m}function Fd(c,h){var u=this,m=u.ready().then(function(){for(var _=u._dbInfo,p=_.keyPrefix,b=p.length,S=localStorage.length,C=1,T=0;T<S;T++){var I=localStorage.key(T);if(I.indexOf(p)===0){var O=localStorage.getItem(I);if(O&&(O=_.serializer.deserialize(O)),O=c(O,I.substring(b),C++),O!==void 0)return O}}});return v(m,h),m}function Vd(c,h){var u=this,m=u.ready().then(function(){var _=u._dbInfo,p;try{p=localStorage.key(c)}catch{p=null}return p&&(p=p.substring(_.keyPrefix.length)),p});return v(m,h),m}function Bd(c){var h=this,u=h.ready().then(function(){for(var m=h._dbInfo,_=localStorage.length,p=[],b=0;b<_;b++){var S=localStorage.key(b);S.indexOf(m.keyPrefix)===0&&p.push(S.substring(m.keyPrefix.length))}return p});return v(u,c),u}function Ud(c){var h=this,u=h.keys().then(function(m){return m.length});return v(u,c),u}function Hd(c,h){var u=this;c=N(c);var m=u.ready().then(function(){var _=u._dbInfo;localStorage.removeItem(_.keyPrefix+c)});return v(m,h),m}function jd(c,h,u){var m=this;c=N(c);var _=m.ready().then(function(){h===void 0&&(h=null);var p=h;return new E(function(b,S){var C=m._dbInfo;C.serializer.serialize(h,function(T,I){if(I)S(I);else try{localStorage.setItem(C.keyPrefix+c,T),b(p)}catch(O){(O.name==="QuotaExceededError"||O.name==="NS_ERROR_DOM_QUOTA_REACHED")&&S(O),S(O)}})})});return v(_,u),_}function Gd(c,h){if(h=x.apply(this,arguments),c=typeof c!="function"&&c||{},!c.name){var u=this.config();c.name=c.name||u.name,c.storeName=c.storeName||u.storeName}var m=this,_;return c.name?_=new E(function(p){c.storeName?p(ia(c,m._defaultConfig)):p(c.name+"/")}).then(function(p){for(var b=localStorage.length-1;b>=0;b--){var S=localStorage.key(b);S.indexOf(p)===0&&localStorage.removeItem(S)}}):_=E.reject("Invalid arguments"),v(_,h),_}var Wd={_driver:"localStorageWrapper",_initStorage:Pd,_support:Rd(),iterate:Fd,getItem:Ld,setItem:jd,removeItem:Hd,clear:kd,length:Ud,key:Vd,keys:Bd,dropInstance:Gd},$d=function(h,u){return h===u||typeof h=="number"&&typeof u=="number"&&isNaN(h)&&isNaN(u)},Yd=function(h,u){for(var m=h.length,_=0;_<m;){if($d(h[_],u))return!0;_++}return!1},oa=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"},yn={},sa={},Wt={INDEXEDDB:pd,WEBSQL:xd,LOCALSTORAGE:Wd},zd=[Wt.INDEXEDDB._driver,Wt.WEBSQL._driver,Wt.LOCALSTORAGE._driver],lr=["dropInstance"],Ii=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(lr),Kd={description:"",driver:zd.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Xd(c,h){c[h]=function(){var u=arguments;return c.ready().then(function(){return c[h].apply(c,u)})}}function wi(){for(var c=1;c<arguments.length;c++){var h=arguments[c];if(h)for(var u in h)h.hasOwnProperty(u)&&(oa(h[u])?arguments[0][u]=h[u].slice():arguments[0][u]=h[u])}return arguments[0]}var qd=(function(){function c(h){a(this,c);for(var u in Wt)if(Wt.hasOwnProperty(u)){var m=Wt[u],_=m._driver;this[u]=_,yn[_]||this.defineDriver(m)}this._defaultConfig=wi({},Kd),this._config=wi({},this._defaultConfig,h),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return c.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},c.prototype.defineDriver=function(u,m,_){var p=new E(function(b,S){try{var C=u._driver,T=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!u._driver){S(T);return}for(var I=Ii.concat("_initStorage"),O=0,B=I.length;O<B;O++){var G=I[O],W=!Yd(lr,G);if((W||u[G])&&typeof u[G]!="function"){S(T);return}}var Q=function(){for(var En=function(Qd){return function(){var ef=new Error("Method "+Qd+" is not implemented by the current driver"),aa=E.reject(ef);return v(aa,arguments[arguments.length-1]),aa}},Di=0,Jd=lr.length;Di<Jd;Di++){var Ai=lr[Di];u[Ai]||(u[Ai]=En(Ai))}};Q();var J=function(En){yn[C]&&console.info("Redefining LocalForage driver: "+C),yn[C]=u,sa[C]=En,b()};"_support"in u?u._support&&typeof u._support=="function"?u._support().then(J,S):J(!!u._support):J(!0)}catch(we){S(we)}});return w(p,m,_),p},c.prototype.driver=function(){return this._driver||null},c.prototype.getDriver=function(u,m,_){var p=yn[u]?E.resolve(yn[u]):E.reject(new Error("Driver not found."));return w(p,m,_),p},c.prototype.getSerializer=function(u){var m=E.resolve(Ti);return w(m,u),m},c.prototype.ready=function(u){var m=this,_=m._driverSet.then(function(){return m._ready===null&&(m._ready=m._initDriver()),m._ready});return w(_,u,u),_},c.prototype.setDriver=function(u,m,_){var p=this;oa(u)||(u=[u]);var b=this._getSupportedDrivers(u);function S(){p._config.driver=p.driver()}function C(O){return p._extend(O),S(),p._ready=p._initStorage(p._config),p._ready}function T(O){return function(){var B=0;function G(){for(;B<O.length;){var W=O[B];return B++,p._dbInfo=null,p._ready=null,p.getDriver(W).then(C).catch(G)}S();var Q=new Error("No available storage method found.");return p._driverSet=E.reject(Q),p._driverSet}return G()}}var I=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=I.then(function(){var O=b[0];return p._dbInfo=null,p._ready=null,p.getDriver(O).then(function(B){p._driver=B._driver,S(),p._wrapLibraryMethodsWithReady(),p._initDriver=T(b)})}).catch(function(){S();var O=new Error("No available storage method found.");return p._driverSet=E.reject(O),p._driverSet}),w(this._driverSet,m,_),this._driverSet},c.prototype.supports=function(u){return!!sa[u]},c.prototype._extend=function(u){wi(this,u)},c.prototype._getSupportedDrivers=function(u){for(var m=[],_=0,p=u.length;_<p;_++){var b=u[_];this.supports(b)&&m.push(b)}return m},c.prototype._wrapLibraryMethodsWithReady=function(){for(var u=0,m=Ii.length;u<m;u++)Xd(this,Ii[u])},c.prototype.createInstance=function(u){return new c(u)},c})(),Zd=new qd;i.exports=Zd},{3:3}]},{},[4])(4)})});var ac=Oi(($i,Yi)=>{"use strict";(function(t,e){typeof $i=="object"&&typeof Yi<"u"?Yi.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.fetchRetry=e())})($i,function(){"use strict";var t=function(r,i){if(i=i||{},typeof r!="function")throw new n("fetch must be a function");if(typeof i!="object")throw new n("defaults must be an object");if(i.retries!==void 0&&!e(i.retries))throw new n("retries must be a positive integer");if(i.retryDelay!==void 0&&!e(i.retryDelay)&&typeof i.retryDelay!="function")throw new n("retryDelay must be a positive integer or a function returning a positive integer");if(i.retryOn!==void 0&&!Array.isArray(i.retryOn)&&typeof i.retryOn!="function")throw new n("retryOn property expects an array or function");var o={retries:3,retryDelay:1e3,retryOn:[]};return i=Object.assign(o,i),function(a,l){var d=i.retries,g=i.retryDelay,f=i.retryOn;if(l&&l.retries!==void 0)if(e(l.retries))d=l.retries;else throw new n("retries must be a positive integer");if(l&&l.retryDelay!==void 0)if(e(l.retryDelay)||typeof l.retryDelay=="function")g=l.retryDelay;else throw new n("retryDelay must be a positive integer or a function returning a positive integer");if(l&&l.retryOn)if(Array.isArray(l.retryOn)||typeof l.retryOn=="function")f=l.retryOn;else throw new n("retryOn property expects an array or function");return new Promise(function(E,v){var w=function(x){var P=typeof Request<"u"&&a instanceof Request?a.clone():a;r(P,l).then(function(M){if(Array.isArray(f)&&f.indexOf(M.status)===-1)E(M);else if(typeof f=="function")try{return Promise.resolve(f(x,null,M)).then(function(U){U?N(x,null,M):E(M)}).catch(v)}catch(U){v(U)}else x<d?N(x,null,M):E(M)}).catch(function(M){if(typeof f=="function")try{Promise.resolve(f(x,M,null)).then(function(U){U?N(x,M,null):v(M)}).catch(function(U){v(U)})}catch(U){v(U)}else x<d?N(x,M,null):v(M)})};function N(x,P,M){var U=typeof g=="function"?g(x,P,M):g;setTimeout(function(){w(++x)},U)}w(0)})}};function e(r){return Number.isInteger(r)&&r>=0}function n(r){this.name="ArgumentError",this.message=r}return t})});var Vi="11.0.0-rc.5";var nf=Vi.split("-")[0].split(".").slice(0,3).map(t=>t.padStart(2,"0")).join("");var Ya="CooeeSDK",qt=Vi,A_=parseInt(nf,10);var gr=`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${qt}/dist`,$e={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",baseURL:gr,styleURL:`${gr}/widget.min.css`,widgetURL:`${gr}/widget.min.js`,swiperStyleURL:`${gr}/swiper-bundle.min.css`};var Ee=xi(Ka());var ce=class{static debuggerEl;static infoLogs=[];static log(...e){Ee.default.info(...e)}static verbose(...e){Ee.default.debug(...e)}static error(...e){Ee.default.error(...e)}static warn(...e){Ee.default.warn(...e)}static info(...e){Ee.default.info(...e),this.infoLogs.unshift({time:new Date,message:e.join(" ")}),this.addToDebugger()}static trace(...e){Ee.default.trace(...e)}static addToDebugger(){sessionStorage.cooeeDebug&&(this.debuggerEl=this.debuggerEl??document.querySelector("cooee-debugger"),this.debuggerEl&&this.debuggerEl&&(this.debuggerEl.logs=[...this.infoLogs]))}};function P_(t=Ya){Ee.default.useDefaults({formatter:function(n){n.unshift(`${t} (v${qt}):`)}});let e=rf();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Ee.default.setLevel(Ee.default[localStorage.cooeeLogLevel]):Ee.default.setLevel($e.debug?Ee.default.TRACE:Ee.default.OFF)}function rf(){return new URL(location.href).searchParams?.get("cooee-debug")}var yt=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;currency;static get(){return window.CooeeSDK.config}update(e){return e??={},this.gaEnabled=e.gaEnabled,this.gaMeasurementID=e.gaMeasurementID,this.pixelPush=e.pixelPush,this.website=e.website??{},this.currencyCount=e.currencyCount??0,this.money=e.money,this.currency=e.currency,this.storefrontToken=e.storefrontToken,this.skipItemAttribute=e.skipItemAttribute,this}};var Xa=0;function of(t=document.head){return qa($e.styleURL,t,"cooee-global-styles")}function sf(t=document.head){return qa($e.swiperStyleURL,t,"cooee-swiper-styles")}function qa(t,e=document.head,n){return new Promise(r=>{if(e.querySelector(`#${n}`)){r();return}let o=document.createElement("link");o.rel="stylesheet",o.href=t,o.id=n,o.onload=()=>{r()},o.onerror=()=>{console.error("Failed to load stylesheet:",t),r()},e.appendChild(o)})}function Bi(t,e=document.head){if(!t)return;Xa++;let n=document.createElement("style");n.id=`cooee-app-css-${Xa}`,n.textContent=t,e.appendChild(n)}async function Za(){let t=(await import("./swiper-bundle-WHJS64TU.js")).default;return window.CooeeSDK.Swiper=t}async function Ja(t,e=!0){if(!t)return;let n=[];e&&n.push(sf(t)),n.push(of(t)),await Promise.all(n);let r=yt.get().website.commonCSS;Bi(r,t)}var cf={"[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"},og=V(y({},cf),{"[class.ng-submitted]":"isSubmitted"});var lf=new Le("",{providedIn:"root",factory:()=>tc}),tc="always";var uf=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=Ot({type:t});static \u0275inj=wt({})}return t})();var nc=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:lf,useValue:n.callSetDisabledState??tc}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=Ot({type:t});static \u0275inj=wt({imports:[uf]})}return t})();var yr=class t{cooeeEvent=new Oe;cooeeCTA=new Oe;elementRef=R(Ae);hasSwiper=!1;_engagementTrigger=Ue(null);_triggerContext=Ue(null);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get classes(){let e=["letscooee-widget"],n=this._engagementTrigger();return e.push(`widget-${n?.shortID}`),e}get triggerContext(){return this._triggerContext()}set triggerContext(e){this._triggerContext.set(e),this._engagementTrigger.set(e.triggerData),this.engagementTriggerReceived(e.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){ce.verbose("Init",this.constructor.name);let e=this.elementRef.nativeElement.shadowRoot;e&&Ja(e,this.hasSwiper)}ngOnDestroy(){ce.verbose("Destroying",this.constructor.name)}sendEventToRenderer(e){this.cooeeEvent.emit(e)}executeCTAViaRenderer(e){this.cooeeCTA.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=ee({type:t,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,r){n&2&&hr(r.classes)},inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:1,vars:0,template:function(n,r){n&1&&Ta(0)},encapsulation:2})};var df=(t,e)=>({"--option-color":t,"background-color":e}),ic=(t,e)=>e.id;function ff(t,e){if(t&1&&(tt(0,"span",6),ye(1),_t()),t&2){Re();let n=gt(0);$(),Kt(n)}}function hf(t,e){if(t&1){let n=zt();Nt(0),tt(1,"button",5),wn("click",function(){let i=Dt(n).$implicit,o=Re().$implicit,s=Re();return At(s.onOptionChange(o,i))}),He(2,ff,2,1,"span",6),_t()}if(t&2){let n=e.$implicit,r=Re().$implicit,i=gt(1),o=n.name,s=Mt(n.displayName||n.name),a=i?n.hexColor??o:"",l=Re().selectedOptions()[r.name]===o;$(),An("color-type",i)("selected",l)("disabled",n.disabled),ba("title",s)("ngStyle",Na(14,df,a,a)),mt("aria-checked",l?"true":"false")("data-value",o)("aria-disabled",n.disabled?"true":null)("aria-label",s),$(),je(i?-1:2)}}function pf(t,e){if(t&1&&(tt(0,"div"),Nt(1),tt(2,"div",1),ye(3),_t(),tt(4,"div",2),ye(5),_t(),tt(6,"div",3),Pi(7,hf,3,17,"button",4,ic),_t()()),t&2){let n=e.$implicit,r=Re();hr(Ra("option-group ",n.name.toLowerCase())),$(),Mt(r.hasHexColors(n)),$(2),Xt("",n.name,":"),$(2),Kt(r.selectedOptions()[n.name]),$(),mt("aria-label",n.name),$(),ki(n.optionValues)}}var Mn=t=>t.trim().toLowerCase(),rc=class t extends yr{selectedVariant=new Oe;item=Ne.required();selectedOptions=Ue({});options=nt(()=>{let e=this.item();if(!e.options||e.vars.length===1)return[];if(window.cooeeManipulateProduct)try{window.cooeeManipulateProduct(e,this.engagementTrigger)}catch(n){ce.error(n)}return e.options.forEach(n=>{n.optionValues.forEach(r=>{r.disabled=this.isOptionValueDisabledFast(n,r)})}),e.options});matchedVariant=nt(()=>{let e=this.item(),n=this.selectedOptions();return e.vars.find(r=>e.options.every(i=>{let o=r.selectedOptions.find(s=>s.name===i.name)?.value;return n[i.name]===o}))});availabilityIndex=nt(()=>{let e=this.item(),n=new Map;return e?.vars?.length&&e.vars.forEach((r,i)=>{if(r.isAvailable)for(let o of r.selectedOptions){let s=Mn(o.name),a=o.value,l=n.get(s);l||n.set(s,l=new Map);let d=l.get(a);d||l.set(a,d=new Set),d.add(i)}}),n});constructor(){super(),rt(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let e=rt(()=>{let n=this.item();if(!n?.options)return;let r=y({},this.selectedOptions()),i=n.vars.find(o=>o.isAvailable)??n.vars[0];n.options.forEach(o=>{let s=i?.selectedOptions.find(a=>a.name===o.name)?.value;s&&(r[o.name]=s)}),this.selectedOptions.set(r),e.destroy()})}ngOnInit(){super.ngOnInit();let e=this.elementRef.nativeElement.shadowRoot;if(!e)return;let n=yt.get().website?.itemSwatchMapping;n&&Bi(n,e)}onOptionChange(e,n){let r=y({},this.selectedOptions());r[e.name]=n.name,this.selectedOptions.set(r)}engagementTriggerReceived(){}update(){}hasHexColors(e){return!!e.optionValues[0]?.name.match(/#[a-f0-9]{6}\b/i)}getCandidateVariantsExcluding(e){let n=this.item(),r=this.availabilityIndex(),i=new Set;n.vars.forEach((s,a)=>{s.isAvailable&&i.add(a)});let o=i;for(let[s,a]of Object.entries(this.selectedOptions())){if(Mn(s)===Mn(e))continue;let l=r.get(Mn(s));if(!l)return new Set;let d=l.get(String(a));if(!d)return new Set;if(o=new Set([...o].filter(g=>d.has(g))),o.size===0)return o}return o}isOptionValueDisabledFast(e,n){let i=this.availabilityIndex().get(Mn(e.name));if(!i)return!0;let o=n.name,s=i.get(o);if(!s||s.size===0)return!0;let a=this.getCandidateVariantsExcluding(e.name);if(a.size===0)return!0;for(let l of a)if(s.has(l))return!1;return!0}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=ee({type:t,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[xt],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,"color-type","selected","disabled","title","ngStyle"],["type","button","role","radio",1,"option-value",3,"click","title","ngStyle"],[1,"title"]],template:function(n,r){n&1&&Pi(0,pf,9,7,"div",0,ic),n&2&&ki(r.options())},dependencies:[Fa,La,nc],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, rgb(var(--lc-color-button, 0 0 0)))}.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
2
|
`],encapsulation:3})};var mf=(function(t){return t.SHOPIFY_CHECKOUT="shopify_checkout",t.THIRD_PARTY_CHECKOUT="third_party_checkout",t.CART_PAGE="cart_page",t.CART_DRAWER="cart_drawer",t})(mf||{});var _f=(function(t){return t[t.NONE=0]="NONE",t[t.REJECT_POPUP=1]="REJECT_POPUP",t[t.ACCEPT_POPUP=2]="ACCEPT_POPUP",t[t.GO_TO_URL=4]="GO_TO_URL",t[t.SHARE=5]="SHARE",t[t.KEY_VALUE=100]="KEY_VALUE",t[t.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",t[t.ADD_TO_CART=102]="ADD_TO_CART",t[t.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",t[t.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",t[t.OPEN_CART=105]="OPEN_CART",t[t.SUBMIT_FORM=106]="SUBMIT_FORM",t[t.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",t[t.ADD_BUNDLE=108]="ADD_BUNDLE",t[t.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",t})(_f||{});var gf=(function(t){return t.FREE_SHIPPING="FREE_SHIPPING",t.DISCOUNT="DISCOUNT",t.FREE_AUTO_GIFT="FREE_AUTO_GIFT",t.FREE_GIFT_SELECT="FREE_GIFT_SELECT",t.UI_ONLY="UI_ONLY",t})(gf||{});var Ui=class{static ID="id";static SESSION_LANDING_PAGE="landing";static SESSION_LAST_USED_TIME="lastUsedTime";static SESSION_SYNCED="synced";static APP_CONFIG="conf";static DEVICE_ID="did";static SDK_TOKEN="token";static FIRST_SEEN="firstSeen";static SESSION_NUMBER="sessionNumber";static GA_CLIENT_ID="gacid";static CURRENT_CART="cart";static MUTED="muted"};var ji=xi(sc());function Er(t){return ji.default.createInstance({name:"lc",storeName:t,driver:ji.default.LOCALSTORAGE})}var Jt=class{static storage;static async get(e,n){return await this.storage?.getItem(e)??n}static set(e,n){return this.storage?.setItem(e,n)}static remove(e){return this.storage?.removeItem(e)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}};var Pn=class Pn extends Jt{};ur(Pn,"storeName","usr"),Pn.storage=Er(Pn.storeName);var Gi=Pn;var kn=class kn extends Jt{};ur(kn,"storeName","ses"),kn.storage=Er(kn.storeName);var Wi=kn;var cc=xi(ac());var vf=5,yf=500,Ef=(0,cc.default)(fetch),bf={retryDelay:t=>Math.pow(2,t)*yf,retryOn:(t,e,n)=>t>=vf?!1:!!(e!==null||n?.status&&n?.status>=500)},Ln=class extends Error{request;response;status;requestBody;responseText;constructor(e="Failed to fetch"){super(e),this.name="FetchError",Object.setPrototypeOf(this,new.target.prototype)}is40x(){return!!this.response&&this.response.status>=400&&this.response.status<500}};async function lc(t,e,n){let r=Date.now(),i=new Request(t,e),o;try{o=await Ef(i,y(y({},bf),n))}catch{}if(!o||!o.ok){let g=new Ln;throw g.request=i.clone(),g.response=o?.clone(),g.status=o?.status,g.requestBody=e?.body,g.responseText=await Sf(o),g}let s,a=(o.headers.get("content-type")||"").toLowerCase(),l=o.headers.get("content-length"),d=i.method?.toUpperCase()||"GET";return o.status===204||o.status===205||d==="HEAD"||l==="0"?s=void 0:a.includes("application/json")||a.includes("application/problem+json")||a.includes("text/javascript")?s=await o.json():a.includes("text/")||a.includes("image/svg+xml")?s=await o.text():s=await o.arrayBuffer(),{data:s,status:o.status,statusText:o.statusText,headers:o.headers,timeTakenMs:Date.now()-r,options:e,request:i}}async function Sf(t){if(t){try{return t=t.clone(),await t.json()}catch{}try{return await t.text()}catch{}}}var k=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var L=globalThis;var Ye="9.42.0";function Pt(){return kt(L),L}function kt(t){let e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||Ye,e[Ye]=e[Ye]||{}}function ot(t,e,n=L){let r=n.__SENTRY__=n.__SENTRY__||{},i=r[Ye]=r[Ye]||{};return i[t]||(i[t]=e())}var zi=["debug","info","warn","error","log","assert","trace"],Cf="Sentry Logger ",Qt={};function Et(t){if(!("console"in L))return t();let e=L.console,n={},r=Object.keys(Qt);r.forEach(i=>{let o=Qt[i];n[i]=e[i],e[i]=o});try{return t()}finally{r.forEach(i=>{e[i]=n[i]})}}function Tf(){Xi().enabled=!0}function If(){Xi().enabled=!1}function uc(){return Xi().enabled}function wf(...t){Ki("log",...t)}function Df(...t){Ki("warn",...t)}function Af(...t){Ki("error",...t)}function Ki(t,...e){k&&uc()&&Et(()=>{L.console[t](`${Cf}[${t}]:`,...e)})}function Xi(){return k?ot("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var A={enable:Tf,disable:If,isEnabled:uc,log:wf,warn:Df,error:Af};var dc=/\(error: (.*)\)/,fc=/captureMessage|captureException/;function Zi(...t){let e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{let o=[],s=n.split(`
|
|
3
3
|
`);for(let a=r;a<s.length;a++){let l=s[a];if(l.length>1024)continue;let d=dc.test(l)?l.replace(dc,"$1"):l;if(!d.match(/\S*Error: /)){for(let g of e){let f=g(d);if(f){o.push(f);break}}if(o.length>=50+i)break}}return hc(o.slice(i))}}function hc(t){if(!t.length)return[];let e=Array.from(t);return/sentryWrapped/.test(br(e).function||"")&&e.pop(),e.reverse(),fc.test(br(e).function||"")&&(e.pop(),fc.test(br(e).function||"")&&e.pop()),e.slice(0,50).map(n=>V(y({},n),{filename:n.filename||br(e).filename,function:n.function||"?"}))}function br(t){return t[t.length-1]||{}}var qi="<anonymous>";function Me(t){try{return!t||typeof t!="function"?qi:t.name||qi}catch{return qi}}function Sr(t){let e=t.exception;if(e){let n=[];try{return e.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}var Cr={},pc={};function ue(t,e){Cr[t]=Cr[t]||[],Cr[t].push(e)}function de(t,e){if(!pc[t]){pc[t]=!0;try{e()}catch(n){k&&A.error(`Error while instrumenting ${t}`,n)}}}function te(t,e){let n=t&&Cr[t];if(n)for(let r of n)try{r(e)}catch(i){k&&A.error(`Error while triggering instrumentation handler.
|
|
4
4
|
Type: ${t}
|