@letscooee/web-sdk 13.1.2 → 13.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{g as p,o as d,p as g}from"./chunk-4P2RSDKV.js";var f=(t,e,o,r)=>{if(!e)return;let n={videoID:e.id,videoIndex:o},i=new p("CE Video Shared",{current:n,platform:r},t);window.CooeeSDK.sendEvent(i)},l=(t,e,o=!0)=>{let r=o?encodeURIComponent(m(t,e)):m(t,e),n="Hey! Check out this video for an amazing product -",i=o?encodeURIComponent(n):n;return{url:r,text:i}},m=(t,e)=>{let o=d(window.location.href,t);return g(o,e)};export{f as a,l as b};
1
+ import{g as p,o as d,p as g}from"./chunk-UGPL2NMF.js";var f=(t,e,o,r)=>{if(!e)return;let n={videoID:e.id,videoIndex:o},i=new p("CE Video Shared",{current:n,platform:r},t);window.CooeeSDK.sendEvent(i)},l=(t,e,o=!0)=>{let r=o?encodeURIComponent(m(t,e)):m(t,e),n="Hey! Check out this video for an amazing product -",i=o?encodeURIComponent(n):n;return{url:r,text:i}},m=(t,e)=>{let o=d(window.location.href,t);return g(o,e)};export{f as a,l as b};
@@ -1,4 +1,4 @@
1
- import{e as D,f as A}from"./chunk-V7UGKYBN.js";var V=D((C,m)=>{"use strict";(function(r){"use strict";var e={};e.VERSION="1.6.1";var s,f={},E=function(o,t){return function(){return t.apply(o,arguments)}},h=function(){var o=arguments,t=o[0],u,n;for(n=1;n<o.length;n++)for(u in o[n])!(u in t)&&o[n].hasOwnProperty(u)&&(t[u]=o[n][u]);return t},g=function(o,t){return{value:o,name:t}};e.TRACE=g(1,"TRACE"),e.DEBUG=g(2,"DEBUG"),e.INFO=g(3,"INFO"),e.TIME=g(4,"TIME"),e.WARN=g(5,"WARN"),e.ERROR=g(8,"ERROR"),e.OFF=g(99,"OFF");var _=function(o){this.context=o,this.setLevel(o.filterLevel),this.log=this.info};_.prototype={setLevel:function(o){o&&"value"in o&&(this.context.filterLevel=o)},getLevel:function(){return this.context.filterLevel},enabledFor:function(o){var t=this.context.filterLevel;return o.value>=t.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(o){typeof o=="string"&&o.length>0&&this.invoke(e.TIME,[o,"start"])},timeEnd:function(o){typeof o=="string"&&o.length>0&&this.invoke(e.TIME,[o,"end"])},invoke:function(o,t){s&&this.enabledFor(o)&&s(t,h({level:o},this.context))}};var i=new _({filterLevel:e.OFF});(function(){var o=e;o.enabledFor=E(i,i.enabledFor),o.trace=E(i,i.trace),o.debug=E(i,i.debug),o.time=E(i,i.time),o.timeEnd=E(i,i.timeEnd),o.info=E(i,i.info),o.warn=E(i,i.warn),o.error=E(i,i.error),o.log=o.info})(),e.setHandler=function(o){s=o},e.setLevel=function(o){i.setLevel(o);for(var t in f)f.hasOwnProperty(t)&&f[t].setLevel(o)},e.getLevel=function(){return i.getLevel()},e.get=function(o){return f[o]||(f[o]=new _(h({name:o},i.context)))},e.createDefaultHandler=function(o){o=o||{},o.formatter=o.formatter||function(l,c){c.name&&l.unshift("["+c.name+"]")};var t={},u=function(n,l){Function.prototype.apply.call(n,console,l)};return typeof console>"u"?function(){}:function(n,l){n=Array.prototype.slice.call(n);var c=console.log,d;l.level===e.TIME?(d=(l.name?"["+l.name+"] ":"")+n[0],n[1]==="start"?console.time?console.time(d):t[d]=new Date().getTime():console.timeEnd?console.timeEnd(d):u(c,[d+": "+(new Date().getTime()-t[d])+"ms"])):(l.level===e.WARN&&console.warn?c=console.warn:l.level===e.ERROR&&console.error?c=console.error:l.level===e.INFO&&console.info?c=console.info:l.level===e.DEBUG&&console.debug?c=console.debug:l.level===e.TRACE&&console.trace&&(c=console.trace),o.formatter(n,l),u(c,n))}},e.useDefaults=function(o){e.setLevel(o&&o.defaultLevel||e.DEBUG),e.setHandler(e.createDefaultHandler(o))},e.setDefaults=e.useDefaults,typeof define=="function"&&define.amd?define(e):typeof m<"u"&&m.exports?m.exports=e:(e._prevLogger=r.Logger,e.noConflict=function(){return r.Logger=e._prevLogger,e},r.Logger=e)})(C)});var I="13.1.2";var b=I.split("-")[0].split(".").slice(0,3).map(r=>r.padStart(2,"0")).join(""),S="WEB",N="CooeeSDK",p=I,M=parseInt(b,10);var P=["collection","product","cart"],U=[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}],x=["View Item","View Cart","View Collection"],F=["CE Screen View","View Collection","View Item","View Cart"];var T=`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${p}/dist`,L={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",baseURL:T,styleURL:`${T}/widget.min.css`,widgetURL:`${T}/widget.min.js`,swiperStyleURL:`${T}/swiper-bundle.min.css`};var a=A(V());var v=class{static debuggerEl;static infoLogs=[];static log(...e){a.default.info(...e)}static verbose(...e){a.default.debug(...e)}static error(...e){a.default.error(...e)}static warn(...e){a.default.warn(...e)}static info(...e){a.default.info(...e),this.infoLogs.push({time:new Date,message:e.join(" ")}),this.addToDebugger()}static trace(...e){a.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 K(r=N){a.default.useDefaults({formatter:function(e){e.unshift(`${r} (v${p}):`)}}),w()&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?a.default.setLevel(a.default[localStorage.cooeeLogLevel]):a.default.setLevel(L.debug?a.default.TRACE:a.default.OFF)}function w(){let r=O();return r==="1"||r==="on"}function O(){return new URL(location.href).searchParams?.get("cooee-debug")}function $(){let r=["display: inline-block;","font-size: 14px;","background: linear-gradient(90deg, #d52dc8 25%, #2179e2 82%);","color: white;","padding: 4px;","border-radius: 4px;"].join(" "),e=`
1
+ import{e as D,f as A}from"./chunk-V7UGKYBN.js";var V=D((C,m)=>{"use strict";(function(r){"use strict";var e={};e.VERSION="1.6.1";var s,f={},E=function(o,t){return function(){return t.apply(o,arguments)}},h=function(){var o=arguments,t=o[0],u,n;for(n=1;n<o.length;n++)for(u in o[n])!(u in t)&&o[n].hasOwnProperty(u)&&(t[u]=o[n][u]);return t},g=function(o,t){return{value:o,name:t}};e.TRACE=g(1,"TRACE"),e.DEBUG=g(2,"DEBUG"),e.INFO=g(3,"INFO"),e.TIME=g(4,"TIME"),e.WARN=g(5,"WARN"),e.ERROR=g(8,"ERROR"),e.OFF=g(99,"OFF");var _=function(o){this.context=o,this.setLevel(o.filterLevel),this.log=this.info};_.prototype={setLevel:function(o){o&&"value"in o&&(this.context.filterLevel=o)},getLevel:function(){return this.context.filterLevel},enabledFor:function(o){var t=this.context.filterLevel;return o.value>=t.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(o){typeof o=="string"&&o.length>0&&this.invoke(e.TIME,[o,"start"])},timeEnd:function(o){typeof o=="string"&&o.length>0&&this.invoke(e.TIME,[o,"end"])},invoke:function(o,t){s&&this.enabledFor(o)&&s(t,h({level:o},this.context))}};var i=new _({filterLevel:e.OFF});(function(){var o=e;o.enabledFor=E(i,i.enabledFor),o.trace=E(i,i.trace),o.debug=E(i,i.debug),o.time=E(i,i.time),o.timeEnd=E(i,i.timeEnd),o.info=E(i,i.info),o.warn=E(i,i.warn),o.error=E(i,i.error),o.log=o.info})(),e.setHandler=function(o){s=o},e.setLevel=function(o){i.setLevel(o);for(var t in f)f.hasOwnProperty(t)&&f[t].setLevel(o)},e.getLevel=function(){return i.getLevel()},e.get=function(o){return f[o]||(f[o]=new _(h({name:o},i.context)))},e.createDefaultHandler=function(o){o=o||{},o.formatter=o.formatter||function(l,c){c.name&&l.unshift("["+c.name+"]")};var t={},u=function(n,l){Function.prototype.apply.call(n,console,l)};return typeof console>"u"?function(){}:function(n,l){n=Array.prototype.slice.call(n);var c=console.log,d;l.level===e.TIME?(d=(l.name?"["+l.name+"] ":"")+n[0],n[1]==="start"?console.time?console.time(d):t[d]=new Date().getTime():console.timeEnd?console.timeEnd(d):u(c,[d+": "+(new Date().getTime()-t[d])+"ms"])):(l.level===e.WARN&&console.warn?c=console.warn:l.level===e.ERROR&&console.error?c=console.error:l.level===e.INFO&&console.info?c=console.info:l.level===e.DEBUG&&console.debug?c=console.debug:l.level===e.TRACE&&console.trace&&(c=console.trace),o.formatter(n,l),u(c,n))}},e.useDefaults=function(o){e.setLevel(o&&o.defaultLevel||e.DEBUG),e.setHandler(e.createDefaultHandler(o))},e.setDefaults=e.useDefaults,typeof define=="function"&&define.amd?define(e):typeof m<"u"&&m.exports?m.exports=e:(e._prevLogger=r.Logger,e.noConflict=function(){return r.Logger=e._prevLogger,e},r.Logger=e)})(C)});var I="13.1.3";var b=I.split("-")[0].split(".").slice(0,3).map(r=>r.padStart(2,"0")).join(""),S="WEB",N="CooeeSDK",p=I,M=parseInt(b,10);var P=["collection","product","cart"],U=[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}],x=["View Item","View Cart","View Collection"],F=["CE Screen View","View Collection","View Item","View Cart"];var T=`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${p}/dist`,L={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",baseURL:T,styleURL:`${T}/widget.min.css`,widgetURL:`${T}/widget.min.js`,swiperStyleURL:`${T}/swiper-bundle.min.css`};var a=A(V());var v=class{static debuggerEl;static infoLogs=[];static log(...e){a.default.info(...e)}static verbose(...e){a.default.debug(...e)}static error(...e){a.default.error(...e)}static warn(...e){a.default.warn(...e)}static info(...e){a.default.info(...e),this.infoLogs.push({time:new Date,message:e.join(" ")}),this.addToDebugger()}static trace(...e){a.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 K(r=N){a.default.useDefaults({formatter:function(e){e.unshift(`${r} (v${p}):`)}}),w()&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?a.default.setLevel(a.default[localStorage.cooeeLogLevel]):a.default.setLevel(L.debug?a.default.TRACE:a.default.OFF)}function w(){let r=O();return r==="1"||r==="on"}function O(){return new URL(location.href).searchParams?.get("cooee-debug")}function $(){let r=["display: inline-block;","font-size: 14px;","background: linear-gradient(90deg, #d52dc8 25%, #2179e2 82%);","color: white;","padding: 4px;","border-radius: 4px;"].join(" "),e=`
2
2
  `;e+=`\u{1F4E3} Drive higher conversions with AI-powered onsite engagement
3
3
  `,e+=`\u{1F50D} Track real-time visitor intent & optimize engagement
4
4
  `,e+=`\u{1F4CA} Improve Meta Ads ROAS with intent-driven campaigns
@@ -1,4 +1,4 @@
1
- import{a as ta,b as Kt,c as Ce,e as Cn,f as nr,g as na,h as ra,l as Xt}from"./chunk-4P2RSDKV.js";import{a as rr}from"./chunk-T6RU7RSX.js";import{$ as vi,$a as Lt,Aa as Gs,Ba as be,Ca as $s,D as Ot,Da as L,E as ct,Ea as js,Fa as Ws,I as Rt,Ja as zs,K as Mt,Ka as Ys,L as St,La as _e,Na as Sn,O as D,Oa as Qn,Pa as Zn,Qa as ne,Ra as lt,Sa as Pt,Wa as Be,X as Se,Xa as He,Y as _i,Ya as Ie,Za as qs,_ as Vs,_a as er,ab as tr,b as Rs,ba as Ue,bb as Ks,ca as En,cb as Ge,db as $e,fb as It,ga as Fs,ha as qt,hb as dt,ia as X,ib as ft,ja as J,jb as Ke,ka as ks,kb as he,lb as Xs,ma as bt,mb as bn,na as Ct,o as Ms,oa as $,pa as P,q as Ps,qa as U,ra as te,s as hi,sa as qe,sb as Js,t as gi,ta as ut,tb as Qs,u as Ls,ua as Jn,ub as Zs,v as ae,va as Us,wa as Bs,wb as ea,x as ye,xa as ge,y as Ee,ya as Hs,za as Le}from"./chunk-K77Q3IPF.js";import{a as _,b as k,c as yn,d as Os,e as jl,f as Wl,g as Xn}from"./chunk-V7UGKYBN.js";var da=jl((la,Ei)=>{"use strict";(function(e){if(typeof la=="object"&&typeof Ei<"u")Ei.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var t;typeof window<"u"?t=window:typeof global<"u"?t=global:typeof self<"u"?t=self:t=this,t.localforage=e()}})(function(){var e,t,n;return(function r(i,o,s){function c(y,f){if(!o[y]){if(!i[y]){var E=typeof yn=="function"&&yn;if(!f&&E)return E(y,!0);if(l)return l(y,!0);var v=new Error("Cannot find module '"+y+"'");throw v.code="MODULE_NOT_FOUND",v}var N=o[y]={exports:{}};i[y][0].call(N.exports,function(G){var M=i[y][1][G];return c(M||G)},N,N.exports,r,i,o,s)}return o[y].exports}for(var l=typeof yn=="function"&&yn,h=0;h<s.length;h++)c(s[h]);return c})({1:[function(r,i,o){(function(s){"use strict";var c=s.MutationObserver||s.WebKitMutationObserver,l;if(c){var h=0,y=new c(G),f=s.document.createTextNode("");y.observe(f,{characterData:!0}),l=function(){f.data=h=++h%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var E=new s.MessageChannel;E.port1.onmessage=G,l=function(){E.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?l=function(){var O=s.document.createElement("script");O.onreadystatechange=function(){G(),O.onreadystatechange=null,O.parentNode.removeChild(O),O=null},s.document.documentElement.appendChild(O)}:l=function(){setTimeout(G,0)};var v,N=[];function G(){v=!0;for(var O,B,Z=N.length;Z;){for(B=N,N=[],O=-1;++O<Z;)B[O]();Z=N.length}v=!1}i.exports=M;function M(O){N.push(O)===1&&!v&&l()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(r,i,o){"use strict";var s=r(1);function c(){}var l={},h=["REJECTED"],y=["FULFILLED"],f=["PENDING"];i.exports=E;function E(x){if(typeof x!="function")throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,x!==c&&M(this,x)}E.prototype.catch=function(x){return this.then(null,x)},E.prototype.then=function(x,j){if(typeof x!="function"&&this.state===y||typeof j!="function"&&this.state===h)return this;var F=new this.constructor(c);if(this.state!==f){var W=this.state===y?x:j;N(F,W,this.outcome)}else this.queue.push(new v(F,x,j));return F};function v(x,j,F){this.promise=x,typeof j=="function"&&(this.onFulfilled=j,this.callFulfilled=this.otherCallFulfilled),typeof F=="function"&&(this.onRejected=F,this.callRejected=this.otherCallRejected)}v.prototype.callFulfilled=function(x){l.resolve(this.promise,x)},v.prototype.otherCallFulfilled=function(x){N(this.promise,this.onFulfilled,x)},v.prototype.callRejected=function(x){l.reject(this.promise,x)},v.prototype.otherCallRejected=function(x){N(this.promise,this.onRejected,x)};function N(x,j,F){s(function(){var W;try{W=j(F)}catch(ie){return l.reject(x,ie)}W===x?l.reject(x,new TypeError("Cannot resolve promise with itself")):l.resolve(x,W)})}l.resolve=function(x,j){var F=O(G,j);if(F.status==="error")return l.reject(x,F.value);var W=F.value;if(W)M(x,W);else{x.state=y,x.outcome=j;for(var ie=-1,ee=x.queue.length;++ie<ee;)x.queue[ie].callFulfilled(j)}return x},l.reject=function(x,j){x.state=h,x.outcome=j;for(var F=-1,W=x.queue.length;++F<W;)x.queue[F].callRejected(j);return x};function G(x){var j=x&&x.then;if(x&&(typeof x=="object"||typeof x=="function")&&typeof j=="function")return function(){j.apply(x,arguments)}}function M(x,j){var F=!1;function W(Me){F||(F=!0,l.reject(x,Me))}function ie(Me){F||(F=!0,l.resolve(x,Me))}function ee(){j(ie,W)}var me=O(ee);me.status==="error"&&W(me.value)}function O(x,j){var F={};try{F.value=x(j),F.status="success"}catch(W){F.status="error",F.value=W}return F}E.resolve=B;function B(x){return x instanceof this?x:l.resolve(new this(c),x)}E.reject=Z;function Z(x){var j=new this(c);return l.reject(j,x)}E.all=Oe;function Oe(x){var j=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var F=x.length,W=!1;if(!F)return this.resolve([]);for(var ie=new Array(F),ee=0,me=-1,Me=new this(c);++me<F;)st(x[me],me);return Me;function st(gn,Yn){j.resolve(gn).then(oi,function(zt){W||(W=!0,l.reject(Me,zt))});function oi(zt){ie[Yn]=zt,++ee===F&&!W&&(W=!0,l.resolve(Me,ie))}}}E.race=Re;function Re(x){var j=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var F=x.length,W=!1;if(!F)return this.resolve([]);for(var ie=-1,ee=new this(c);++ie<F;)me(x[ie]);return ee;function me(Me){j.resolve(Me).then(function(st){W||(W=!0,l.resolve(ee,st))},function(st){W||(W=!0,l.reject(ee,st))})}}},{1:1}],3:[function(r,i,o){(function(s){"use strict";typeof s.Promise!="function"&&(s.Promise=r(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(r,i,o){"use strict";var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function c(a,d){if(!(a instanceof d))throw new TypeError("Cannot call a class as a function")}function l(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var h=l();function y(){try{if(!h||!h.open)return!1;var a=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),d=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!a||d)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function f(a,d){a=a||[],d=d||{};try{return new Blob(a,d)}catch(p){if(p.name!=="TypeError")throw p;for(var u=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,m=new u,g=0;g<a.length;g+=1)m.append(a[g]);return m.getBlob(d.type)}}typeof Promise>"u"&&r(3);var E=Promise;function v(a,d){d&&a.then(function(u){d(null,u)},function(u){d(u)})}function N(a,d,u){typeof d=="function"&&a.then(d),typeof u=="function"&&a.catch(u)}function G(a){return typeof a!="string"&&(console.warn(a+" used as a key, but it is not a string."),a=String(a)),a}function M(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var O="local-forage-detect-blob-support",B=void 0,Z={},Oe=Object.prototype.toString,Re="readonly",x="readwrite";function j(a){for(var d=a.length,u=new ArrayBuffer(d),m=new Uint8Array(u),g=0;g<d;g++)m[g]=a.charCodeAt(g);return u}function F(a){return new E(function(d){var u=a.transaction(O,x),m=f([""]);u.objectStore(O).put(m,"key"),u.onabort=function(g){g.preventDefault(),g.stopPropagation(),d(!1)},u.oncomplete=function(){var g=navigator.userAgent.match(/Chrome\/(\d+)/),p=navigator.userAgent.match(/Edge\//);d(p||!g||parseInt(g[1],10)>=43)}}).catch(function(){return!1})}function W(a){return typeof B=="boolean"?E.resolve(B):F(a).then(function(d){return B=d,B})}function ie(a){var d=Z[a.name],u={};u.promise=new E(function(m,g){u.resolve=m,u.reject=g}),d.deferredOperations.push(u),d.dbReady?d.dbReady=d.dbReady.then(function(){return u.promise}):d.dbReady=u.promise}function ee(a){var d=Z[a.name],u=d.deferredOperations.pop();if(u)return u.resolve(),u.promise}function me(a,d){var u=Z[a.name],m=u.deferredOperations.pop();if(m)return m.reject(d),m.promise}function Me(a,d){return new E(function(u,m){if(Z[a.name]=Z[a.name]||ds(),a.db)if(d)ie(a),a.db.close();else return u(a.db);var g=[a.name];d&&g.push(a.version);var p=h.open.apply(h,g);d&&(p.onupgradeneeded=function(S){var b=p.result;try{b.createObjectStore(a.storeName),S.oldVersion<=1&&b.createObjectStore(O)}catch(C){if(C.name==="ConstraintError")console.warn('The database "'+a.name+'" has been upgraded from version '+S.oldVersion+" to version "+S.newVersion+', but the storage "'+a.storeName+'" already exists.');else throw C}}),p.onerror=function(S){S.preventDefault(),m(p.error)},p.onsuccess=function(){var S=p.result;S.onversionchange=function(b){b.target.close()},u(S),ee(a)}})}function st(a){return Me(a,!1)}function gn(a){return Me(a,!0)}function Yn(a,d){if(!a.db)return!0;var u=!a.db.objectStoreNames.contains(a.storeName),m=a.version<a.db.version,g=a.version>a.db.version;if(m&&(a.version!==d&&console.warn('The database "'+a.name+`" can't be downgraded from version `+a.db.version+" to version "+a.version+"."),a.version=a.db.version),g||u){if(u){var p=a.db.version+1;p>a.version&&(a.version=p)}return!0}return!1}function oi(a){return new E(function(d,u){var m=new FileReader;m.onerror=u,m.onloadend=function(g){var p=btoa(g.target.result||"");d({__local_forage_encoded_blob:!0,data:p,type:a.type})},m.readAsBinaryString(a)})}function zt(a){var d=j(atob(a.data));return f([d],{type:a.type})}function ls(a){return a&&a.__local_forage_encoded_blob}function Wu(a){var d=this,u=d._initReady().then(function(){var m=Z[d._dbInfo.name];if(m&&m.dbReady)return m.dbReady});return N(u,a,a),u}function zu(a){ie(a);for(var d=Z[a.name],u=d.forages,m=0;m<u.length;m++){var g=u[m];g._dbInfo.db&&(g._dbInfo.db.close(),g._dbInfo.db=null)}return a.db=null,st(a).then(function(p){return a.db=p,Yn(a)?gn(a):p}).then(function(p){a.db=d.db=p;for(var S=0;S<u.length;S++)u[S]._dbInfo.db=p}).catch(function(p){throw me(a,p),p})}function at(a,d,u,m){m===void 0&&(m=1);try{var g=a.db.transaction(a.storeName,d);u(null,g)}catch(p){if(m>0&&(!a.db||p.name==="InvalidStateError"||p.name==="NotFoundError"))return E.resolve().then(function(){if(!a.db||p.name==="NotFoundError"&&!a.db.objectStoreNames.contains(a.storeName)&&a.version<=a.db.version)return a.db&&(a.version=a.db.version+1),gn(a)}).then(function(){return zu(a).then(function(){at(a,d,u,m-1)})}).catch(u);u(p)}}function ds(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Yu(a){var d=this,u={db:null};if(a)for(var m in a)u[m]=a[m];var g=Z[u.name];g||(g=ds(),Z[u.name]=g),g.forages.push(d),d._initReady||(d._initReady=d.ready,d.ready=Wu);var p=[];function S(){return E.resolve()}for(var b=0;b<g.forages.length;b++){var C=g.forages[b];C!==d&&p.push(C._initReady().catch(S))}var I=g.forages.slice(0);return E.all(p).then(function(){return u.db=g.db,st(u)}).then(function(T){return u.db=T,Yn(u,d._defaultConfig.version)?gn(u):T}).then(function(T){u.db=g.db=T,d._dbInfo=u;for(var A=0;A<I.length;A++){var H=I[A];H!==d&&(H._dbInfo.db=u.db,H._dbInfo.version=u.version)}})}function qu(a,d){var u=this;a=G(a);var m=new E(function(g,p){u.ready().then(function(){at(u._dbInfo,Re,function(S,b){if(S)return p(S);try{var C=b.objectStore(u._dbInfo.storeName),I=C.get(a);I.onsuccess=function(){var T=I.result;T===void 0&&(T=null),ls(T)&&(T=zt(T)),g(T)},I.onerror=function(){p(I.error)}}catch(T){p(T)}})}).catch(p)});return v(m,d),m}function Ku(a,d){var u=this,m=new E(function(g,p){u.ready().then(function(){at(u._dbInfo,Re,function(S,b){if(S)return p(S);try{var C=b.objectStore(u._dbInfo.storeName),I=C.openCursor(),T=1;I.onsuccess=function(){var A=I.result;if(A){var H=A.value;ls(H)&&(H=zt(H));var z=a(H,A.key,T++);z!==void 0?g(z):A.continue()}else g()},I.onerror=function(){p(I.error)}}catch(A){p(A)}})}).catch(p)});return v(m,d),m}function Xu(a,d,u){var m=this;a=G(a);var g=new E(function(p,S){var b;m.ready().then(function(){return b=m._dbInfo,Oe.call(d)==="[object Blob]"?W(b.db).then(function(C){return C?d:oi(d)}):d}).then(function(C){at(m._dbInfo,x,function(I,T){if(I)return S(I);try{var A=T.objectStore(m._dbInfo.storeName);C===null&&(C=void 0);var H=A.put(C,a);T.oncomplete=function(){C===void 0&&(C=null),p(C)},T.onabort=T.onerror=function(){var z=H.error?H.error:H.transaction.error;S(z)}}catch(z){S(z)}})}).catch(S)});return v(g,u),g}function Ju(a,d){var u=this;a=G(a);var m=new E(function(g,p){u.ready().then(function(){at(u._dbInfo,x,function(S,b){if(S)return p(S);try{var C=b.objectStore(u._dbInfo.storeName),I=C.delete(a);b.oncomplete=function(){g()},b.onerror=function(){p(I.error)},b.onabort=function(){var T=I.error?I.error:I.transaction.error;p(T)}}catch(T){p(T)}})}).catch(p)});return v(m,d),m}function Qu(a){var d=this,u=new E(function(m,g){d.ready().then(function(){at(d._dbInfo,x,function(p,S){if(p)return g(p);try{var b=S.objectStore(d._dbInfo.storeName),C=b.clear();S.oncomplete=function(){m()},S.onabort=S.onerror=function(){var I=C.error?C.error:C.transaction.error;g(I)}}catch(I){g(I)}})}).catch(g)});return v(u,a),u}function Zu(a){var d=this,u=new E(function(m,g){d.ready().then(function(){at(d._dbInfo,Re,function(p,S){if(p)return g(p);try{var b=S.objectStore(d._dbInfo.storeName),C=b.count();C.onsuccess=function(){m(C.result)},C.onerror=function(){g(C.error)}}catch(I){g(I)}})}).catch(g)});return v(u,a),u}function el(a,d){var u=this,m=new E(function(g,p){if(a<0){g(null);return}u.ready().then(function(){at(u._dbInfo,Re,function(S,b){if(S)return p(S);try{var C=b.objectStore(u._dbInfo.storeName),I=!1,T=C.openKeyCursor();T.onsuccess=function(){var A=T.result;if(!A){g(null);return}a===0||I?g(A.key):(I=!0,A.advance(a))},T.onerror=function(){p(T.error)}}catch(A){p(A)}})}).catch(p)});return v(m,d),m}function tl(a){var d=this,u=new E(function(m,g){d.ready().then(function(){at(d._dbInfo,Re,function(p,S){if(p)return g(p);try{var b=S.objectStore(d._dbInfo.storeName),C=b.openKeyCursor(),I=[];C.onsuccess=function(){var T=C.result;if(!T){m(I);return}I.push(T.key),T.continue()},C.onerror=function(){g(C.error)}}catch(T){g(T)}})}).catch(g)});return v(u,a),u}function nl(a,d){d=M.apply(this,arguments);var u=this.config();a=typeof a!="function"&&a||{},a.name||(a.name=a.name||u.name,a.storeName=a.storeName||u.storeName);var m=this,g;if(!a.name)g=E.reject("Invalid arguments");else{var p=a.name===u.name&&m._dbInfo.db,S=p?E.resolve(m._dbInfo.db):st(a).then(function(b){var C=Z[a.name],I=C.forages;C.db=b;for(var T=0;T<I.length;T++)I[T]._dbInfo.db=b;return b});a.storeName?g=S.then(function(b){if(b.objectStoreNames.contains(a.storeName)){var C=b.version+1;ie(a);var I=Z[a.name],T=I.forages;b.close();for(var A=0;A<T.length;A++){var H=T[A];H._dbInfo.db=null,H._dbInfo.version=C}var z=new E(function(Y,se){var oe=h.open(a.name,C);oe.onerror=function(Pe){var vn=oe.result;vn.close(),se(Pe)},oe.onupgradeneeded=function(){var Pe=oe.result;Pe.deleteObjectStore(a.storeName)},oe.onsuccess=function(){var Pe=oe.result;Pe.close(),Y(Pe)}});return z.then(function(Y){I.db=Y;for(var se=0;se<T.length;se++){var oe=T[se];oe._dbInfo.db=Y,ee(oe._dbInfo)}}).catch(function(Y){throw(me(a,Y)||E.resolve()).catch(function(){}),Y})}}):g=S.then(function(b){ie(a);var C=Z[a.name],I=C.forages;b.close();for(var T=0;T<I.length;T++){var A=I[T];A._dbInfo.db=null}var H=new E(function(z,Y){var se=h.deleteDatabase(a.name);se.onerror=function(){var oe=se.result;oe&&oe.close(),Y(se.error)},se.onblocked=function(){console.warn('dropInstance blocked for database "'+a.name+'" until all open connections are closed')},se.onsuccess=function(){var oe=se.result;oe&&oe.close(),z(oe)}});return H.then(function(z){C.db=z;for(var Y=0;Y<I.length;Y++){var se=I[Y];ee(se._dbInfo)}}).catch(function(z){throw(me(a,z)||E.resolve()).catch(function(){}),z})})}return v(g,d),g}var rl={_driver:"asyncStorage",_initStorage:Yu,_support:y(),iterate:Ku,getItem:qu,setItem:Xu,removeItem:Ju,clear:Qu,length:Zu,key:el,keys:tl,dropInstance:nl};function il(){return typeof openDatabase=="function"}var yt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ol="~~local_forage_type~",fs=/^~~local_forage_type~([^~]+)~/,qn="__lfsc__:",si=qn.length,ai="arbf",ci="blob",ps="si08",ms="ui08",hs="uic8",gs="si16",_s="si32",vs="ur16",ys="ui32",Es="fl32",Ss="fl64",bs=si+ai.length,Cs=Object.prototype.toString;function Is(a){var d=a.length*.75,u=a.length,m,g=0,p,S,b,C;a[a.length-1]==="="&&(d--,a[a.length-2]==="="&&d--);var I=new ArrayBuffer(d),T=new Uint8Array(I);for(m=0;m<u;m+=4)p=yt.indexOf(a[m]),S=yt.indexOf(a[m+1]),b=yt.indexOf(a[m+2]),C=yt.indexOf(a[m+3]),T[g++]=p<<2|S>>4,T[g++]=(S&15)<<4|b>>2,T[g++]=(b&3)<<6|C&63;return I}function ui(a){var d=new Uint8Array(a),u="",m;for(m=0;m<d.length;m+=3)u+=yt[d[m]>>2],u+=yt[(d[m]&3)<<4|d[m+1]>>4],u+=yt[(d[m+1]&15)<<2|d[m+2]>>6],u+=yt[d[m+2]&63];return d.length%3===2?u=u.substring(0,u.length-1)+"=":d.length%3===1&&(u=u.substring(0,u.length-2)+"=="),u}function sl(a,d){var u="";if(a&&(u=Cs.call(a)),a&&(u==="[object ArrayBuffer]"||a.buffer&&Cs.call(a.buffer)==="[object ArrayBuffer]")){var m,g=qn;a instanceof ArrayBuffer?(m=a,g+=ai):(m=a.buffer,u==="[object Int8Array]"?g+=ps:u==="[object Uint8Array]"?g+=ms:u==="[object Uint8ClampedArray]"?g+=hs:u==="[object Int16Array]"?g+=gs:u==="[object Uint16Array]"?g+=vs:u==="[object Int32Array]"?g+=_s:u==="[object Uint32Array]"?g+=ys:u==="[object Float32Array]"?g+=Es:u==="[object Float64Array]"?g+=Ss:d(new Error("Failed to get type for BinaryArray"))),d(g+ui(m))}else if(u==="[object Blob]"){var p=new FileReader;p.onload=function(){var S=ol+a.type+"~"+ui(this.result);d(qn+ci+S)},p.readAsArrayBuffer(a)}else try{d(JSON.stringify(a))}catch(S){console.error("Couldn't convert value into a JSON string: ",a),d(null,S)}}function al(a){if(a.substring(0,si)!==qn)return JSON.parse(a);var d=a.substring(bs),u=a.substring(si,bs),m;if(u===ci&&fs.test(d)){var g=d.match(fs);m=g[1],d=d.substring(g[0].length)}var p=Is(d);switch(u){case ai:return p;case ci:return f([p],{type:m});case ps:return new Int8Array(p);case ms:return new Uint8Array(p);case hs:return new Uint8ClampedArray(p);case gs:return new Int16Array(p);case vs:return new Uint16Array(p);case _s:return new Int32Array(p);case ys:return new Uint32Array(p);case Es:return new Float32Array(p);case Ss:return new Float64Array(p);default:throw new Error("Unkown type: "+u)}}var li={serialize:sl,deserialize:al,stringToBuffer:Is,bufferToString:ui};function Ts(a,d,u,m){a.executeSql("CREATE TABLE IF NOT EXISTS "+d.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],u,m)}function cl(a){var d=this,u={db:null};if(a)for(var m in a)u[m]=typeof a[m]!="string"?a[m].toString():a[m];var g=new E(function(p,S){try{u.db=openDatabase(u.name,String(u.version),u.description,u.size)}catch(b){return S(b)}u.db.transaction(function(b){Ts(b,u,function(){d._dbInfo=u,p()},function(C,I){S(I)})},S)});return u.serializer=li,g}function Et(a,d,u,m,g,p){a.executeSql(u,m,g,function(S,b){b.code===b.SYNTAX_ERR?S.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[d.storeName],function(C,I){I.rows.length?p(C,b):Ts(C,d,function(){C.executeSql(u,m,g,p)},p)},p):p(S,b)},p)}function ul(a,d){var u=this;a=G(a);var m=new E(function(g,p){u.ready().then(function(){var S=u._dbInfo;S.db.transaction(function(b){Et(b,S,"SELECT * FROM "+S.storeName+" WHERE key = ? LIMIT 1",[a],function(C,I){var T=I.rows.length?I.rows.item(0).value:null;T&&(T=S.serializer.deserialize(T)),g(T)},function(C,I){p(I)})})}).catch(p)});return v(m,d),m}function ll(a,d){var u=this,m=new E(function(g,p){u.ready().then(function(){var S=u._dbInfo;S.db.transaction(function(b){Et(b,S,"SELECT * FROM "+S.storeName,[],function(C,I){for(var T=I.rows,A=T.length,H=0;H<A;H++){var z=T.item(H),Y=z.value;if(Y&&(Y=S.serializer.deserialize(Y)),Y=a(Y,z.key,H+1),Y!==void 0){g(Y);return}}g()},function(C,I){p(I)})})}).catch(p)});return v(m,d),m}function xs(a,d,u,m){var g=this;a=G(a);var p=new E(function(S,b){g.ready().then(function(){d===void 0&&(d=null);var C=d,I=g._dbInfo;I.serializer.serialize(d,function(T,A){A?b(A):I.db.transaction(function(H){Et(H,I,"INSERT OR REPLACE INTO "+I.storeName+" (key, value) VALUES (?, ?)",[a,T],function(){S(C)},function(z,Y){b(Y)})},function(H){if(H.code===H.QUOTA_ERR){if(m>0){S(xs.apply(g,[a,C,u,m-1]));return}b(H)}})})}).catch(b)});return v(p,u),p}function dl(a,d,u){return xs.apply(this,[a,d,u,1])}function fl(a,d){var u=this;a=G(a);var m=new E(function(g,p){u.ready().then(function(){var S=u._dbInfo;S.db.transaction(function(b){Et(b,S,"DELETE FROM "+S.storeName+" WHERE key = ?",[a],function(){g()},function(C,I){p(I)})})}).catch(p)});return v(m,d),m}function pl(a){var d=this,u=new E(function(m,g){d.ready().then(function(){var p=d._dbInfo;p.db.transaction(function(S){Et(S,p,"DELETE FROM "+p.storeName,[],function(){m()},function(b,C){g(C)})})}).catch(g)});return v(u,a),u}function ml(a){var d=this,u=new E(function(m,g){d.ready().then(function(){var p=d._dbInfo;p.db.transaction(function(S){Et(S,p,"SELECT COUNT(key) as c FROM "+p.storeName,[],function(b,C){var I=C.rows.item(0).c;m(I)},function(b,C){g(C)})})}).catch(g)});return v(u,a),u}function hl(a,d){var u=this,m=new E(function(g,p){u.ready().then(function(){var S=u._dbInfo;S.db.transaction(function(b){Et(b,S,"SELECT key FROM "+S.storeName+" WHERE id = ? LIMIT 1",[a+1],function(C,I){var T=I.rows.length?I.rows.item(0).key:null;g(T)},function(C,I){p(I)})})}).catch(p)});return v(m,d),m}function gl(a){var d=this,u=new E(function(m,g){d.ready().then(function(){var p=d._dbInfo;p.db.transaction(function(S){Et(S,p,"SELECT key FROM "+p.storeName,[],function(b,C){for(var I=[],T=0;T<C.rows.length;T++)I.push(C.rows.item(T).key);m(I)},function(b,C){g(C)})})}).catch(g)});return v(u,a),u}function _l(a){return new E(function(d,u){a.transaction(function(m){m.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(g,p){for(var S=[],b=0;b<p.rows.length;b++)S.push(p.rows.item(b).name);d({db:a,storeNames:S})},function(g,p){u(p)})},function(m){u(m)})})}function vl(a,d){d=M.apply(this,arguments);var u=this.config();a=typeof a!="function"&&a||{},a.name||(a.name=a.name||u.name,a.storeName=a.storeName||u.storeName);var m=this,g;return a.name?g=new E(function(p){var S;a.name===u.name?S=m._dbInfo.db:S=openDatabase(a.name,"","",0),a.storeName?p({db:S,storeNames:[a.storeName]}):p(_l(S))}).then(function(p){return new E(function(S,b){p.db.transaction(function(C){function I(z){return new E(function(Y,se){C.executeSql("DROP TABLE IF EXISTS "+z,[],function(){Y()},function(oe,Pe){se(Pe)})})}for(var T=[],A=0,H=p.storeNames.length;A<H;A++)T.push(I(p.storeNames[A]));E.all(T).then(function(){S()}).catch(function(z){b(z)})},function(C){b(C)})})}):g=E.reject("Invalid arguments"),v(g,d),g}var yl={_driver:"webSQLStorage",_initStorage:cl,_support:il(),iterate:ll,getItem:ul,setItem:dl,removeItem:fl,clear:pl,length:ml,key:hl,keys:gl,dropInstance:vl};function El(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function Ds(a,d){var u=a.name+"/";return a.storeName!==d.storeName&&(u+=a.storeName+"/"),u}function Sl(){var a="_localforage_support_test";try{return localStorage.setItem(a,!0),localStorage.removeItem(a),!1}catch{return!0}}function bl(){return!Sl()||localStorage.length>0}function Cl(a){var d=this,u={};if(a)for(var m in a)u[m]=a[m];return u.keyPrefix=Ds(a,d._defaultConfig),bl()?(d._dbInfo=u,u.serializer=li,E.resolve()):E.reject()}function Il(a){var d=this,u=d.ready().then(function(){for(var m=d._dbInfo.keyPrefix,g=localStorage.length-1;g>=0;g--){var p=localStorage.key(g);p.indexOf(m)===0&&localStorage.removeItem(p)}});return v(u,a),u}function Tl(a,d){var u=this;a=G(a);var m=u.ready().then(function(){var g=u._dbInfo,p=localStorage.getItem(g.keyPrefix+a);return p&&(p=g.serializer.deserialize(p)),p});return v(m,d),m}function xl(a,d){var u=this,m=u.ready().then(function(){for(var g=u._dbInfo,p=g.keyPrefix,S=p.length,b=localStorage.length,C=1,I=0;I<b;I++){var T=localStorage.key(I);if(T.indexOf(p)===0){var A=localStorage.getItem(T);if(A&&(A=g.serializer.deserialize(A)),A=a(A,T.substring(S),C++),A!==void 0)return A}}});return v(m,d),m}function Dl(a,d){var u=this,m=u.ready().then(function(){var g=u._dbInfo,p;try{p=localStorage.key(a)}catch{p=null}return p&&(p=p.substring(g.keyPrefix.length)),p});return v(m,d),m}function wl(a){var d=this,u=d.ready().then(function(){for(var m=d._dbInfo,g=localStorage.length,p=[],S=0;S<g;S++){var b=localStorage.key(S);b.indexOf(m.keyPrefix)===0&&p.push(b.substring(m.keyPrefix.length))}return p});return v(u,a),u}function Al(a){var d=this,u=d.keys().then(function(m){return m.length});return v(u,a),u}function Nl(a,d){var u=this;a=G(a);var m=u.ready().then(function(){var g=u._dbInfo;localStorage.removeItem(g.keyPrefix+a)});return v(m,d),m}function Ol(a,d,u){var m=this;a=G(a);var g=m.ready().then(function(){d===void 0&&(d=null);var p=d;return new E(function(S,b){var C=m._dbInfo;C.serializer.serialize(d,function(I,T){if(T)b(T);else try{localStorage.setItem(C.keyPrefix+a,I),S(p)}catch(A){(A.name==="QuotaExceededError"||A.name==="NS_ERROR_DOM_QUOTA_REACHED")&&b(A),b(A)}})})});return v(g,u),g}function Rl(a,d){if(d=M.apply(this,arguments),a=typeof a!="function"&&a||{},!a.name){var u=this.config();a.name=a.name||u.name,a.storeName=a.storeName||u.storeName}var m=this,g;return a.name?g=new E(function(p){a.storeName?p(Ds(a,m._defaultConfig)):p(a.name+"/")}).then(function(p){for(var S=localStorage.length-1;S>=0;S--){var b=localStorage.key(S);b.indexOf(p)===0&&localStorage.removeItem(b)}}):g=E.reject("Invalid arguments"),v(g,d),g}var Ml={_driver:"localStorageWrapper",_initStorage:Cl,_support:El(),iterate:xl,getItem:Tl,setItem:Ol,removeItem:Nl,clear:Il,length:Al,key:Dl,keys:wl,dropInstance:Rl},Pl=function(d,u){return d===u||typeof d=="number"&&typeof u=="number"&&isNaN(d)&&isNaN(u)},Ll=function(d,u){for(var m=d.length,g=0;g<m;){if(Pl(d[g],u))return!0;g++}return!1},ws=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},_n={},As={},Yt={INDEXEDDB:rl,WEBSQL:yl,LOCALSTORAGE:Ml},Vl=[Yt.INDEXEDDB._driver,Yt.WEBSQL._driver,Yt.LOCALSTORAGE._driver],Kn=["dropInstance"],di=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Kn),Fl={description:"",driver:Vl.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function kl(a,d){a[d]=function(){var u=arguments;return a.ready().then(function(){return a[d].apply(a,u)})}}function fi(){for(var a=1;a<arguments.length;a++){var d=arguments[a];if(d)for(var u in d)d.hasOwnProperty(u)&&(ws(d[u])?arguments[0][u]=d[u].slice():arguments[0][u]=d[u])}return arguments[0]}var Ul=(function(){function a(d){c(this,a);for(var u in Yt)if(Yt.hasOwnProperty(u)){var m=Yt[u],g=m._driver;this[u]=g,_n[g]||this.defineDriver(m)}this._defaultConfig=fi({},Fl),this._config=fi({},this._defaultConfig,d),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return a.prototype.config=function(u){if((typeof u>"u"?"undefined":s(u))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var m in u){if(m==="storeName"&&(u[m]=u[m].replace(/\W/g,"_")),m==="version"&&typeof u[m]!="number")return new Error("Database version must be a number.");this._config[m]=u[m]}return"driver"in u&&u.driver?this.setDriver(this._config.driver):!0}else return typeof u=="string"?this._config[u]:this._config},a.prototype.defineDriver=function(u,m,g){var p=new E(function(S,b){try{var C=u._driver,I=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!u._driver){b(I);return}for(var T=di.concat("_initStorage"),A=0,H=T.length;A<H;A++){var z=T[A],Y=!Ll(Kn,z);if((Y||u[z])&&typeof u[z]!="function"){b(I);return}}var se=function(){for(var vn=function(Gl){return function(){var $l=new Error("Method "+Gl+" is not implemented by the current driver"),Ns=E.reject($l);return v(Ns,arguments[arguments.length-1]),Ns}},pi=0,Hl=Kn.length;pi<Hl;pi++){var mi=Kn[pi];u[mi]||(u[mi]=vn(mi))}};se();var oe=function(vn){_n[C]&&console.info("Redefining LocalForage driver: "+C),_n[C]=u,As[C]=vn,S()};"_support"in u?u._support&&typeof u._support=="function"?u._support().then(oe,b):oe(!!u._support):oe(!0)}catch(Pe){b(Pe)}});return N(p,m,g),p},a.prototype.driver=function(){return this._driver||null},a.prototype.getDriver=function(u,m,g){var p=_n[u]?E.resolve(_n[u]):E.reject(new Error("Driver not found."));return N(p,m,g),p},a.prototype.getSerializer=function(u){var m=E.resolve(li);return N(m,u),m},a.prototype.ready=function(u){var m=this,g=m._driverSet.then(function(){return m._ready===null&&(m._ready=m._initDriver()),m._ready});return N(g,u,u),g},a.prototype.setDriver=function(u,m,g){var p=this;ws(u)||(u=[u]);var S=this._getSupportedDrivers(u);function b(){p._config.driver=p.driver()}function C(A){return p._extend(A),b(),p._ready=p._initStorage(p._config),p._ready}function I(A){return function(){var H=0;function z(){for(;H<A.length;){var Y=A[H];return H++,p._dbInfo=null,p._ready=null,p.getDriver(Y).then(C).catch(z)}b();var se=new Error("No available storage method found.");return p._driverSet=E.reject(se),p._driverSet}return z()}}var T=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=T.then(function(){var A=S[0];return p._dbInfo=null,p._ready=null,p.getDriver(A).then(function(H){p._driver=H._driver,b(),p._wrapLibraryMethodsWithReady(),p._initDriver=I(S)})}).catch(function(){b();var A=new Error("No available storage method found.");return p._driverSet=E.reject(A),p._driverSet}),N(this._driverSet,m,g),this._driverSet},a.prototype.supports=function(u){return!!As[u]},a.prototype._extend=function(u){fi(this,u)},a.prototype._getSupportedDrivers=function(u){for(var m=[],g=0,p=u.length;g<p;g++){var S=u[g];this.supports(S)&&m.push(S)}return m},a.prototype._wrapLibraryMethodsWithReady=function(){for(var u=0,m=di.length;u<m;u++)kl(this,di[u])},a.prototype.createInstance=function(u){return new a(u)},a})(),Bl=new Ul;i.exports=Bl},{3:3}]},{},[4])(4)})});var Xe=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;currency;static get(){return window.CooeeSDK.config}update(t){return t??={},this.gaEnabled=t.gaEnabled,this.gaMeasurementID=t.gaMeasurementID,this.pixelPush=t.pixelPush,this.website=t.website??{},this.currencyCount=t.currencyCount??0,this.money=t.money,this.currency=t.currency,this.storefrontToken=t.storefrontToken,this.skipItemAttribute=t.skipItemAttribute,this}};var ia=0;function zl(e=document.head){return oa(Kt.styleURL,e,"cooee-global-styles")}function Yl(e=document.head){return oa(Kt.swiperStyleURL,e,"cooee-swiper-styles")}function oa(e,t=document.head,n){return new Promise(r=>{if(t.querySelector(`#${n}`)){r();return}let o=document.createElement("link");o.rel="stylesheet",o.href=e,o.id=n,o.onload=()=>{r()},o.onerror=()=>{console.error("Failed to load stylesheet:",e),r()},t.appendChild(o)})}function In(e,t=document.head){if(!e)return;ia++;let n=document.createElement("style");n.id=`cooee-app-css-${ia}`,n.textContent=e,t.appendChild(n)}async function ir(){let e=(await import("./swiper-bundle-WHJS64TU.js")).default;return window.CooeeSDK.Swiper=e}async function or(e,t=!0){if(!e)return;let n=[];t&&n.push(Yl(e)),n.push(zl(e)),await Promise.all(n);let r=Xe.get().website.commonCSS;In(r,e)}var Xl={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},sg=k(_({},Xl),{"[class.ng-submitted]":"isSubmitted"});var Jl=new Ls("",{providedIn:"root",factory:()=>sa}),sa="always";var Ql=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=_i({type:e});static \u0275inj=gi({})}return e})();var aa=(()=>{class e{static withConfig(n){return{ngModule:e,providers:[{provide:Jl,useValue:n.callSetDisabledState??sa}]}}static \u0275fac=function(r){return new(r||e)};static \u0275mod=_i({type:e});static \u0275inj=gi({imports:[Ql]})}return e})();var yi=(function(e){return e.SHOPIFY_CHECKOUT="shopify_checkout",e.THIRD_PARTY_CHECKOUT="third_party_checkout",e.CART_PAGE="cart_page",e.CART_DRAWER="cart_drawer",e})(yi||{});var je=(function(e){return e[e.NONE=0]="NONE",e[e.REJECT_POPUP=1]="REJECT_POPUP",e[e.ACCEPT_POPUP=2]="ACCEPT_POPUP",e[e.GO_TO_URL=4]="GO_TO_URL",e[e.SHARE=5]="SHARE",e[e.KEY_VALUE=100]="KEY_VALUE",e[e.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",e[e.ADD_TO_CART=102]="ADD_TO_CART",e[e.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",e[e.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",e[e.OPEN_CART=105]="OPEN_CART",e[e.SUBMIT_FORM=106]="SUBMIT_FORM",e[e.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",e[e.ADD_BUNDLE=108]="ADD_BUNDLE",e[e.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",e[e.BUY_NOW=110]="BUY_NOW",e[e.QUICK_VIEW=111]="QUICK_VIEW",e})(je||{});var Zl=(function(e){return e.FREE_SHIPPING="FREE_SHIPPING",e.DISCOUNT="DISCOUNT",e.FREE_AUTO_GIFT="FREE_AUTO_GIFT",e.FREE_GIFT_SELECT="FREE_GIFT_SELECT",e.UI_ONLY="UI_ONLY",e})(Zl||{});var We=class e{engagementContext=ae(Cn);eventData=ae(nr);constructor(){}executeCTA(t,n){let r,i=this.engagementContext();if(!i){Ce.error("Engagement context is not available; aborting executeCTA.");return}if(t===je.ADD_TO_CART)r="CE Add To Cart Clicked";else if(t===je.GO_TO_PRODUCT)r="CE View Item Clicked";else if(t===je.OPEN_CART)r="CE Open Cart Clicked",i.triggerData.redirectBehaviour=yi.CART_DRAWER;else{Ce.warn(`Unsupported CTA type: ${t}`);return}window.CooeeSDK.executeCTA(i,_({clickAction:{at:t}},n));let o=new na(r,this.eventData.props,i.triggerData);n?.video?o.setVideos(n.video):this.eventData.video&&o.setVideos(this.eventData.video),window.CooeeSDK.sendEvent(o)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=hi({token:e,factory:e.\u0275fac})};function ca(e,t){return[We,...ed(e,t)]}function ed(e,t){return[{provide:Cn,useValue:ct(e)},{provide:nr,useValue:_({},t)}]}var sr=class e{elementRef=ae(Rt);engagementService=ae(We);hasSwiper=!1;_engagementTrigger=ct(null);_triggerContext=ae(Cn);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get classes(){let t=["letscooee-widget"],n=this._engagementTrigger();return t.push(`widget-${n?.shortID}`),t}get triggerContext(){return this._triggerContext()}set triggerContext(t){this._triggerContext.set(t),this._engagementTrigger.set(t.triggerData),this.engagementTriggerReceived(t.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){Ce.verbose("Init",this.constructor.name);let t=this.elementRef.nativeElement.shadowRoot;t&&(or(t,this.hasSwiper),In(this.engagementTrigger?.content?.innerCSS,t))}ngOnDestroy(){Ce.verbose("Destroying",this.constructor.name)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Se({type:e,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,r){n&2&&Zn(r.classes)},inputs:{triggerContext:"triggerContext"},decls:1,vars:0,template:function(n,r){n&1&&Hs(0)},encapsulation:2})};var ua=(e,t)=>t.id;function td(e,t){if(e&1&&(P(0,"span",6),ne(1),U()),e&2){L();let n=Ie(0);D(),lt(n)}}function nd(e,t){if(e&1){let n=Le();Be(0),P(1,"button",5),be("click",function(){let i=ye(n).$implicit,o=L().$implicit,s=L();return Ee(s.onOptionChange(o,i))}),X(2,td,2,1,"span",6),U()}if(e&2){let n=t.$implicit,r=L().$implicit,i=Ie(1),o=L(),s=n.name,c=He(n.displayName||n.name),l=n.swatch,h=i?n.hexColor??s:"",y=o.selectedOptions()[r.name]===s,f=!!(l!=null&&l.color),E=!!(!(l==null||l.image==null)&&l.image.url);D(),Sn("swatch-color-type",f)("swatch-image-type",E)("selected",y)("disabled",n.disabled),$("title",c)("ngStyle",o.getSwatchStyles(l,h)),qt("aria-checked",y?"true":"false")("data-value",s)("aria-disabled",n.disabled?"true":null)("aria-label",c),D(),J(!i&&!f&&!E?2:-1)}}function rd(e,t){if(e&1&&(P(0,"div"),Be(1),P(2,"div",1),ne(3),U(),P(4,"div",2),ne(5),U(),P(6,"div",3),bt(7,nd,3,16,"button",4,ua),U()()),e&2){let n=t.$implicit,r=L();Zn(er("option-group ",n.name.toLowerCase())),D(),He(r.hasHexColors(n)),D(2),Pt("",n.name,":"),D(2),lt(r.selectedOptions()[n.name]),D(),qt("aria-label",n.name),D(),Ct(n.optionValues)}}var Tn=e=>e.trim().toLowerCase(),ar=class e extends sr{selectedVariant=new En;item=he.required();selectedOptions=ct({});options=dt(()=>{let t=this.item();if(!t.options||t.vars.length===1)return[];if(window.cooeeManipulateProduct)try{window.cooeeManipulateProduct(t,this.engagementTrigger)}catch(n){Ce.error(n)}return t.options.forEach(n=>{n.optionValues.forEach(r=>{r.disabled=this.isOptionValueDisabledFast(n,r)})}),t.options});matchedVariant=dt(()=>{let t=this.item(),n=this.selectedOptions();return t.vars.find(r=>t.options.every(i=>{let o=r.selectedOptions.find(s=>s.name===i.name)?.value;return n[i.name]===o}))});availabilityIndex=dt(()=>{let t=this.item(),n=new Map;return t?.vars?.length&&t.vars.forEach((r,i)=>{if(r.isAvailable)for(let o of r.selectedOptions){let s=Tn(o.name),c=o.value,l=n.get(s);l||n.set(s,l=new Map);let h=l.get(c);h||l.set(c,h=new Set),h.add(i)}}),n});constructor(){super(),ft(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let t=ft(()=>{let n=this.item();if(!n?.options)return;let r=_({},this.selectedOptions()),i=n.vars.find(o=>o.isAvailable)??n.vars[0];n.options.forEach(o=>{let s=i?.selectedOptions.find(c=>c.name===o.name)?.value;s&&(r[o.name]=s)}),this.selectedOptions.set(r),t.destroy()})}ngOnInit(){super.ngOnInit();let t=this.elementRef.nativeElement.shadowRoot;if(!t)return;let n=Xe.get().website?.itemSwatchMapping;n&&In(n,t)}onOptionChange(t,n){let r=_({},this.selectedOptions());r[t.name]=n.name,this.selectedOptions.set(r)}engagementTriggerReceived(){}update(){}hasHexColors(t){return!!t.optionValues[0]?.name.match(/#[a-f0-9]{6}\b/i)}getSwatchStyles(t,n){let r={};return!t&&n?(r["--option-color"]=n,r["background-color"]=n,r):(t?.image?.url?r["background-image"]=`url("${t.image.url}")`:t?.color&&(r["--option-color"]=t.color,r["background-color"]=t.color),r)}getCandidateVariantsExcluding(t){let n=this.item(),r=this.availabilityIndex(),i=new Set;n.vars.forEach((s,c)=>{s.isAvailable&&i.add(c)});let o=i;for(let[s,c]of Object.entries(this.selectedOptions())){if(Tn(s)===Tn(t))continue;let l=r.get(Tn(s));if(!l)return new Set;let h=l.get(String(c));if(!h)return new Set;if(o=new Set([...o].filter(y=>h.has(y))),o.size===0)return o}return o}isOptionValueDisabledFast(t,n){let i=this.availabilityIndex().get(Tn(t.name));if(!i)return!0;let o=n.name,s=i.get(o);if(!s||s.size===0)return!0;let c=this.getCandidateVariantsExcluding(t.name);if(c.size===0)return!0;for(let l of c)if(s.has(l))return!1;return!0}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Se({type:e,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[Lt(ca()),vi],decls:2,vars:0,consts:[[3,"class"],[1,"name"],[1,"selected-value"],["role","radiogroup",1,"option-values"],["type","button","role","radio",1,"option-value",3,"swatch-color-type","swatch-image-type","selected","disabled","title","ngStyle"],["type","button","role","radio",1,"option-value",3,"click","title","ngStyle"],[1,"title"]],template:function(n,r){n&1&&bt(0,rd,9,7,"div",0,ua),n&2&&Ct(r.options())},dependencies:[ea,Qs,aa],styles:[`.option-group{display:flex;gap:4px;align-items:center}.option-group+.option-group{margin-top:8px}.option-values{display:flex;flex-wrap:nowrap;overflow-x:auto;padding:6px;gap:4px;scrollbar-gutter:stable both-edges;scrollbar-width:none}.option-values::-webkit-scrollbar{display:none}.selected-value{display:none}.option-value{padding:5px 10px;border:1px solid #ccc;cursor:pointer;border-radius:4px;min-width:32px;min-height:32px;text-align:center;position:relative;flex-shrink:0;--selected-color: var(--option-color, rgba(var(--lc-primary-button-bg-color, 0 0 0)));background-size:cover;background-position:center;background-repeat:no-repeat}.option-value.selected{box-shadow:#fff 0 0 0 2px,var(--selected-color) 0 0 0 4px}.option-value.disabled{opacity:.5;pointer-events:none}
1
+ import{a as ta,b as Kt,c as Ce,e as Cn,f as nr,g as na,h as ra,l as Xt}from"./chunk-UGPL2NMF.js";import{a as rr}from"./chunk-T6RU7RSX.js";import{$ as vi,$a as Lt,Aa as Gs,Ba as be,Ca as $s,D as Ot,Da as L,E as ct,Ea as js,Fa as Ws,I as Rt,Ja as zs,K as Mt,Ka as Ys,L as St,La as _e,Na as Sn,O as D,Oa as Qn,Pa as Zn,Qa as ne,Ra as lt,Sa as Pt,Wa as Be,X as Se,Xa as He,Y as _i,Ya as Ie,Za as qs,_ as Vs,_a as er,ab as tr,b as Rs,ba as Ue,bb as Ks,ca as En,cb as Ge,db as $e,fb as It,ga as Fs,ha as qt,hb as dt,ia as X,ib as ft,ja as J,jb as Ke,ka as ks,kb as he,lb as Xs,ma as bt,mb as bn,na as Ct,o as Ms,oa as $,pa as P,q as Ps,qa as U,ra as te,s as hi,sa as qe,sb as Js,t as gi,ta as ut,tb as Qs,u as Ls,ua as Jn,ub as Zs,v as ae,va as Us,wa as Bs,wb as ea,x as ye,xa as ge,y as Ee,ya as Hs,za as Le}from"./chunk-K77Q3IPF.js";import{a as _,b as k,c as yn,d as Os,e as jl,f as Wl,g as Xn}from"./chunk-V7UGKYBN.js";var da=jl((la,Ei)=>{"use strict";(function(e){if(typeof la=="object"&&typeof Ei<"u")Ei.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var t;typeof window<"u"?t=window:typeof global<"u"?t=global:typeof self<"u"?t=self:t=this,t.localforage=e()}})(function(){var e,t,n;return(function r(i,o,s){function c(y,f){if(!o[y]){if(!i[y]){var E=typeof yn=="function"&&yn;if(!f&&E)return E(y,!0);if(l)return l(y,!0);var v=new Error("Cannot find module '"+y+"'");throw v.code="MODULE_NOT_FOUND",v}var N=o[y]={exports:{}};i[y][0].call(N.exports,function(G){var M=i[y][1][G];return c(M||G)},N,N.exports,r,i,o,s)}return o[y].exports}for(var l=typeof yn=="function"&&yn,h=0;h<s.length;h++)c(s[h]);return c})({1:[function(r,i,o){(function(s){"use strict";var c=s.MutationObserver||s.WebKitMutationObserver,l;if(c){var h=0,y=new c(G),f=s.document.createTextNode("");y.observe(f,{characterData:!0}),l=function(){f.data=h=++h%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var E=new s.MessageChannel;E.port1.onmessage=G,l=function(){E.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?l=function(){var O=s.document.createElement("script");O.onreadystatechange=function(){G(),O.onreadystatechange=null,O.parentNode.removeChild(O),O=null},s.document.documentElement.appendChild(O)}:l=function(){setTimeout(G,0)};var v,N=[];function G(){v=!0;for(var O,B,Z=N.length;Z;){for(B=N,N=[],O=-1;++O<Z;)B[O]();Z=N.length}v=!1}i.exports=M;function M(O){N.push(O)===1&&!v&&l()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(r,i,o){"use strict";var s=r(1);function c(){}var l={},h=["REJECTED"],y=["FULFILLED"],f=["PENDING"];i.exports=E;function E(x){if(typeof x!="function")throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,x!==c&&M(this,x)}E.prototype.catch=function(x){return this.then(null,x)},E.prototype.then=function(x,j){if(typeof x!="function"&&this.state===y||typeof j!="function"&&this.state===h)return this;var F=new this.constructor(c);if(this.state!==f){var W=this.state===y?x:j;N(F,W,this.outcome)}else this.queue.push(new v(F,x,j));return F};function v(x,j,F){this.promise=x,typeof j=="function"&&(this.onFulfilled=j,this.callFulfilled=this.otherCallFulfilled),typeof F=="function"&&(this.onRejected=F,this.callRejected=this.otherCallRejected)}v.prototype.callFulfilled=function(x){l.resolve(this.promise,x)},v.prototype.otherCallFulfilled=function(x){N(this.promise,this.onFulfilled,x)},v.prototype.callRejected=function(x){l.reject(this.promise,x)},v.prototype.otherCallRejected=function(x){N(this.promise,this.onRejected,x)};function N(x,j,F){s(function(){var W;try{W=j(F)}catch(ie){return l.reject(x,ie)}W===x?l.reject(x,new TypeError("Cannot resolve promise with itself")):l.resolve(x,W)})}l.resolve=function(x,j){var F=O(G,j);if(F.status==="error")return l.reject(x,F.value);var W=F.value;if(W)M(x,W);else{x.state=y,x.outcome=j;for(var ie=-1,ee=x.queue.length;++ie<ee;)x.queue[ie].callFulfilled(j)}return x},l.reject=function(x,j){x.state=h,x.outcome=j;for(var F=-1,W=x.queue.length;++F<W;)x.queue[F].callRejected(j);return x};function G(x){var j=x&&x.then;if(x&&(typeof x=="object"||typeof x=="function")&&typeof j=="function")return function(){j.apply(x,arguments)}}function M(x,j){var F=!1;function W(Me){F||(F=!0,l.reject(x,Me))}function ie(Me){F||(F=!0,l.resolve(x,Me))}function ee(){j(ie,W)}var me=O(ee);me.status==="error"&&W(me.value)}function O(x,j){var F={};try{F.value=x(j),F.status="success"}catch(W){F.status="error",F.value=W}return F}E.resolve=B;function B(x){return x instanceof this?x:l.resolve(new this(c),x)}E.reject=Z;function Z(x){var j=new this(c);return l.reject(j,x)}E.all=Oe;function Oe(x){var j=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var F=x.length,W=!1;if(!F)return this.resolve([]);for(var ie=new Array(F),ee=0,me=-1,Me=new this(c);++me<F;)st(x[me],me);return Me;function st(gn,Yn){j.resolve(gn).then(oi,function(zt){W||(W=!0,l.reject(Me,zt))});function oi(zt){ie[Yn]=zt,++ee===F&&!W&&(W=!0,l.resolve(Me,ie))}}}E.race=Re;function Re(x){var j=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var F=x.length,W=!1;if(!F)return this.resolve([]);for(var ie=-1,ee=new this(c);++ie<F;)me(x[ie]);return ee;function me(Me){j.resolve(Me).then(function(st){W||(W=!0,l.resolve(ee,st))},function(st){W||(W=!0,l.reject(ee,st))})}}},{1:1}],3:[function(r,i,o){(function(s){"use strict";typeof s.Promise!="function"&&(s.Promise=r(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(r,i,o){"use strict";var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function c(a,d){if(!(a instanceof d))throw new TypeError("Cannot call a class as a function")}function l(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var h=l();function y(){try{if(!h||!h.open)return!1;var a=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),d=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!a||d)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function f(a,d){a=a||[],d=d||{};try{return new Blob(a,d)}catch(p){if(p.name!=="TypeError")throw p;for(var u=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,m=new u,g=0;g<a.length;g+=1)m.append(a[g]);return m.getBlob(d.type)}}typeof Promise>"u"&&r(3);var E=Promise;function v(a,d){d&&a.then(function(u){d(null,u)},function(u){d(u)})}function N(a,d,u){typeof d=="function"&&a.then(d),typeof u=="function"&&a.catch(u)}function G(a){return typeof a!="string"&&(console.warn(a+" used as a key, but it is not a string."),a=String(a)),a}function M(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var O="local-forage-detect-blob-support",B=void 0,Z={},Oe=Object.prototype.toString,Re="readonly",x="readwrite";function j(a){for(var d=a.length,u=new ArrayBuffer(d),m=new Uint8Array(u),g=0;g<d;g++)m[g]=a.charCodeAt(g);return u}function F(a){return new E(function(d){var u=a.transaction(O,x),m=f([""]);u.objectStore(O).put(m,"key"),u.onabort=function(g){g.preventDefault(),g.stopPropagation(),d(!1)},u.oncomplete=function(){var g=navigator.userAgent.match(/Chrome\/(\d+)/),p=navigator.userAgent.match(/Edge\//);d(p||!g||parseInt(g[1],10)>=43)}}).catch(function(){return!1})}function W(a){return typeof B=="boolean"?E.resolve(B):F(a).then(function(d){return B=d,B})}function ie(a){var d=Z[a.name],u={};u.promise=new E(function(m,g){u.resolve=m,u.reject=g}),d.deferredOperations.push(u),d.dbReady?d.dbReady=d.dbReady.then(function(){return u.promise}):d.dbReady=u.promise}function ee(a){var d=Z[a.name],u=d.deferredOperations.pop();if(u)return u.resolve(),u.promise}function me(a,d){var u=Z[a.name],m=u.deferredOperations.pop();if(m)return m.reject(d),m.promise}function Me(a,d){return new E(function(u,m){if(Z[a.name]=Z[a.name]||ds(),a.db)if(d)ie(a),a.db.close();else return u(a.db);var g=[a.name];d&&g.push(a.version);var p=h.open.apply(h,g);d&&(p.onupgradeneeded=function(S){var b=p.result;try{b.createObjectStore(a.storeName),S.oldVersion<=1&&b.createObjectStore(O)}catch(C){if(C.name==="ConstraintError")console.warn('The database "'+a.name+'" has been upgraded from version '+S.oldVersion+" to version "+S.newVersion+', but the storage "'+a.storeName+'" already exists.');else throw C}}),p.onerror=function(S){S.preventDefault(),m(p.error)},p.onsuccess=function(){var S=p.result;S.onversionchange=function(b){b.target.close()},u(S),ee(a)}})}function st(a){return Me(a,!1)}function gn(a){return Me(a,!0)}function Yn(a,d){if(!a.db)return!0;var u=!a.db.objectStoreNames.contains(a.storeName),m=a.version<a.db.version,g=a.version>a.db.version;if(m&&(a.version!==d&&console.warn('The database "'+a.name+`" can't be downgraded from version `+a.db.version+" to version "+a.version+"."),a.version=a.db.version),g||u){if(u){var p=a.db.version+1;p>a.version&&(a.version=p)}return!0}return!1}function oi(a){return new E(function(d,u){var m=new FileReader;m.onerror=u,m.onloadend=function(g){var p=btoa(g.target.result||"");d({__local_forage_encoded_blob:!0,data:p,type:a.type})},m.readAsBinaryString(a)})}function zt(a){var d=j(atob(a.data));return f([d],{type:a.type})}function ls(a){return a&&a.__local_forage_encoded_blob}function Wu(a){var d=this,u=d._initReady().then(function(){var m=Z[d._dbInfo.name];if(m&&m.dbReady)return m.dbReady});return N(u,a,a),u}function zu(a){ie(a);for(var d=Z[a.name],u=d.forages,m=0;m<u.length;m++){var g=u[m];g._dbInfo.db&&(g._dbInfo.db.close(),g._dbInfo.db=null)}return a.db=null,st(a).then(function(p){return a.db=p,Yn(a)?gn(a):p}).then(function(p){a.db=d.db=p;for(var S=0;S<u.length;S++)u[S]._dbInfo.db=p}).catch(function(p){throw me(a,p),p})}function at(a,d,u,m){m===void 0&&(m=1);try{var g=a.db.transaction(a.storeName,d);u(null,g)}catch(p){if(m>0&&(!a.db||p.name==="InvalidStateError"||p.name==="NotFoundError"))return E.resolve().then(function(){if(!a.db||p.name==="NotFoundError"&&!a.db.objectStoreNames.contains(a.storeName)&&a.version<=a.db.version)return a.db&&(a.version=a.db.version+1),gn(a)}).then(function(){return zu(a).then(function(){at(a,d,u,m-1)})}).catch(u);u(p)}}function ds(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Yu(a){var d=this,u={db:null};if(a)for(var m in a)u[m]=a[m];var g=Z[u.name];g||(g=ds(),Z[u.name]=g),g.forages.push(d),d._initReady||(d._initReady=d.ready,d.ready=Wu);var p=[];function S(){return E.resolve()}for(var b=0;b<g.forages.length;b++){var C=g.forages[b];C!==d&&p.push(C._initReady().catch(S))}var I=g.forages.slice(0);return E.all(p).then(function(){return u.db=g.db,st(u)}).then(function(T){return u.db=T,Yn(u,d._defaultConfig.version)?gn(u):T}).then(function(T){u.db=g.db=T,d._dbInfo=u;for(var A=0;A<I.length;A++){var H=I[A];H!==d&&(H._dbInfo.db=u.db,H._dbInfo.version=u.version)}})}function qu(a,d){var u=this;a=G(a);var m=new E(function(g,p){u.ready().then(function(){at(u._dbInfo,Re,function(S,b){if(S)return p(S);try{var C=b.objectStore(u._dbInfo.storeName),I=C.get(a);I.onsuccess=function(){var T=I.result;T===void 0&&(T=null),ls(T)&&(T=zt(T)),g(T)},I.onerror=function(){p(I.error)}}catch(T){p(T)}})}).catch(p)});return v(m,d),m}function Ku(a,d){var u=this,m=new E(function(g,p){u.ready().then(function(){at(u._dbInfo,Re,function(S,b){if(S)return p(S);try{var C=b.objectStore(u._dbInfo.storeName),I=C.openCursor(),T=1;I.onsuccess=function(){var A=I.result;if(A){var H=A.value;ls(H)&&(H=zt(H));var z=a(H,A.key,T++);z!==void 0?g(z):A.continue()}else g()},I.onerror=function(){p(I.error)}}catch(A){p(A)}})}).catch(p)});return v(m,d),m}function Xu(a,d,u){var m=this;a=G(a);var g=new E(function(p,S){var b;m.ready().then(function(){return b=m._dbInfo,Oe.call(d)==="[object Blob]"?W(b.db).then(function(C){return C?d:oi(d)}):d}).then(function(C){at(m._dbInfo,x,function(I,T){if(I)return S(I);try{var A=T.objectStore(m._dbInfo.storeName);C===null&&(C=void 0);var H=A.put(C,a);T.oncomplete=function(){C===void 0&&(C=null),p(C)},T.onabort=T.onerror=function(){var z=H.error?H.error:H.transaction.error;S(z)}}catch(z){S(z)}})}).catch(S)});return v(g,u),g}function Ju(a,d){var u=this;a=G(a);var m=new E(function(g,p){u.ready().then(function(){at(u._dbInfo,x,function(S,b){if(S)return p(S);try{var C=b.objectStore(u._dbInfo.storeName),I=C.delete(a);b.oncomplete=function(){g()},b.onerror=function(){p(I.error)},b.onabort=function(){var T=I.error?I.error:I.transaction.error;p(T)}}catch(T){p(T)}})}).catch(p)});return v(m,d),m}function Qu(a){var d=this,u=new E(function(m,g){d.ready().then(function(){at(d._dbInfo,x,function(p,S){if(p)return g(p);try{var b=S.objectStore(d._dbInfo.storeName),C=b.clear();S.oncomplete=function(){m()},S.onabort=S.onerror=function(){var I=C.error?C.error:C.transaction.error;g(I)}}catch(I){g(I)}})}).catch(g)});return v(u,a),u}function Zu(a){var d=this,u=new E(function(m,g){d.ready().then(function(){at(d._dbInfo,Re,function(p,S){if(p)return g(p);try{var b=S.objectStore(d._dbInfo.storeName),C=b.count();C.onsuccess=function(){m(C.result)},C.onerror=function(){g(C.error)}}catch(I){g(I)}})}).catch(g)});return v(u,a),u}function el(a,d){var u=this,m=new E(function(g,p){if(a<0){g(null);return}u.ready().then(function(){at(u._dbInfo,Re,function(S,b){if(S)return p(S);try{var C=b.objectStore(u._dbInfo.storeName),I=!1,T=C.openKeyCursor();T.onsuccess=function(){var A=T.result;if(!A){g(null);return}a===0||I?g(A.key):(I=!0,A.advance(a))},T.onerror=function(){p(T.error)}}catch(A){p(A)}})}).catch(p)});return v(m,d),m}function tl(a){var d=this,u=new E(function(m,g){d.ready().then(function(){at(d._dbInfo,Re,function(p,S){if(p)return g(p);try{var b=S.objectStore(d._dbInfo.storeName),C=b.openKeyCursor(),I=[];C.onsuccess=function(){var T=C.result;if(!T){m(I);return}I.push(T.key),T.continue()},C.onerror=function(){g(C.error)}}catch(T){g(T)}})}).catch(g)});return v(u,a),u}function nl(a,d){d=M.apply(this,arguments);var u=this.config();a=typeof a!="function"&&a||{},a.name||(a.name=a.name||u.name,a.storeName=a.storeName||u.storeName);var m=this,g;if(!a.name)g=E.reject("Invalid arguments");else{var p=a.name===u.name&&m._dbInfo.db,S=p?E.resolve(m._dbInfo.db):st(a).then(function(b){var C=Z[a.name],I=C.forages;C.db=b;for(var T=0;T<I.length;T++)I[T]._dbInfo.db=b;return b});a.storeName?g=S.then(function(b){if(b.objectStoreNames.contains(a.storeName)){var C=b.version+1;ie(a);var I=Z[a.name],T=I.forages;b.close();for(var A=0;A<T.length;A++){var H=T[A];H._dbInfo.db=null,H._dbInfo.version=C}var z=new E(function(Y,se){var oe=h.open(a.name,C);oe.onerror=function(Pe){var vn=oe.result;vn.close(),se(Pe)},oe.onupgradeneeded=function(){var Pe=oe.result;Pe.deleteObjectStore(a.storeName)},oe.onsuccess=function(){var Pe=oe.result;Pe.close(),Y(Pe)}});return z.then(function(Y){I.db=Y;for(var se=0;se<T.length;se++){var oe=T[se];oe._dbInfo.db=Y,ee(oe._dbInfo)}}).catch(function(Y){throw(me(a,Y)||E.resolve()).catch(function(){}),Y})}}):g=S.then(function(b){ie(a);var C=Z[a.name],I=C.forages;b.close();for(var T=0;T<I.length;T++){var A=I[T];A._dbInfo.db=null}var H=new E(function(z,Y){var se=h.deleteDatabase(a.name);se.onerror=function(){var oe=se.result;oe&&oe.close(),Y(se.error)},se.onblocked=function(){console.warn('dropInstance blocked for database "'+a.name+'" until all open connections are closed')},se.onsuccess=function(){var oe=se.result;oe&&oe.close(),z(oe)}});return H.then(function(z){C.db=z;for(var Y=0;Y<I.length;Y++){var se=I[Y];ee(se._dbInfo)}}).catch(function(z){throw(me(a,z)||E.resolve()).catch(function(){}),z})})}return v(g,d),g}var rl={_driver:"asyncStorage",_initStorage:Yu,_support:y(),iterate:Ku,getItem:qu,setItem:Xu,removeItem:Ju,clear:Qu,length:Zu,key:el,keys:tl,dropInstance:nl};function il(){return typeof openDatabase=="function"}var yt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ol="~~local_forage_type~",fs=/^~~local_forage_type~([^~]+)~/,qn="__lfsc__:",si=qn.length,ai="arbf",ci="blob",ps="si08",ms="ui08",hs="uic8",gs="si16",_s="si32",vs="ur16",ys="ui32",Es="fl32",Ss="fl64",bs=si+ai.length,Cs=Object.prototype.toString;function Is(a){var d=a.length*.75,u=a.length,m,g=0,p,S,b,C;a[a.length-1]==="="&&(d--,a[a.length-2]==="="&&d--);var I=new ArrayBuffer(d),T=new Uint8Array(I);for(m=0;m<u;m+=4)p=yt.indexOf(a[m]),S=yt.indexOf(a[m+1]),b=yt.indexOf(a[m+2]),C=yt.indexOf(a[m+3]),T[g++]=p<<2|S>>4,T[g++]=(S&15)<<4|b>>2,T[g++]=(b&3)<<6|C&63;return I}function ui(a){var d=new Uint8Array(a),u="",m;for(m=0;m<d.length;m+=3)u+=yt[d[m]>>2],u+=yt[(d[m]&3)<<4|d[m+1]>>4],u+=yt[(d[m+1]&15)<<2|d[m+2]>>6],u+=yt[d[m+2]&63];return d.length%3===2?u=u.substring(0,u.length-1)+"=":d.length%3===1&&(u=u.substring(0,u.length-2)+"=="),u}function sl(a,d){var u="";if(a&&(u=Cs.call(a)),a&&(u==="[object ArrayBuffer]"||a.buffer&&Cs.call(a.buffer)==="[object ArrayBuffer]")){var m,g=qn;a instanceof ArrayBuffer?(m=a,g+=ai):(m=a.buffer,u==="[object Int8Array]"?g+=ps:u==="[object Uint8Array]"?g+=ms:u==="[object Uint8ClampedArray]"?g+=hs:u==="[object Int16Array]"?g+=gs:u==="[object Uint16Array]"?g+=vs:u==="[object Int32Array]"?g+=_s:u==="[object Uint32Array]"?g+=ys:u==="[object Float32Array]"?g+=Es:u==="[object Float64Array]"?g+=Ss:d(new Error("Failed to get type for BinaryArray"))),d(g+ui(m))}else if(u==="[object Blob]"){var p=new FileReader;p.onload=function(){var S=ol+a.type+"~"+ui(this.result);d(qn+ci+S)},p.readAsArrayBuffer(a)}else try{d(JSON.stringify(a))}catch(S){console.error("Couldn't convert value into a JSON string: ",a),d(null,S)}}function al(a){if(a.substring(0,si)!==qn)return JSON.parse(a);var d=a.substring(bs),u=a.substring(si,bs),m;if(u===ci&&fs.test(d)){var g=d.match(fs);m=g[1],d=d.substring(g[0].length)}var p=Is(d);switch(u){case ai:return p;case ci:return f([p],{type:m});case ps:return new Int8Array(p);case ms:return new Uint8Array(p);case hs:return new Uint8ClampedArray(p);case gs:return new Int16Array(p);case vs:return new Uint16Array(p);case _s:return new Int32Array(p);case ys:return new Uint32Array(p);case Es:return new Float32Array(p);case Ss:return new Float64Array(p);default:throw new Error("Unkown type: "+u)}}var li={serialize:sl,deserialize:al,stringToBuffer:Is,bufferToString:ui};function Ts(a,d,u,m){a.executeSql("CREATE TABLE IF NOT EXISTS "+d.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],u,m)}function cl(a){var d=this,u={db:null};if(a)for(var m in a)u[m]=typeof a[m]!="string"?a[m].toString():a[m];var g=new E(function(p,S){try{u.db=openDatabase(u.name,String(u.version),u.description,u.size)}catch(b){return S(b)}u.db.transaction(function(b){Ts(b,u,function(){d._dbInfo=u,p()},function(C,I){S(I)})},S)});return u.serializer=li,g}function Et(a,d,u,m,g,p){a.executeSql(u,m,g,function(S,b){b.code===b.SYNTAX_ERR?S.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[d.storeName],function(C,I){I.rows.length?p(C,b):Ts(C,d,function(){C.executeSql(u,m,g,p)},p)},p):p(S,b)},p)}function ul(a,d){var u=this;a=G(a);var m=new E(function(g,p){u.ready().then(function(){var S=u._dbInfo;S.db.transaction(function(b){Et(b,S,"SELECT * FROM "+S.storeName+" WHERE key = ? LIMIT 1",[a],function(C,I){var T=I.rows.length?I.rows.item(0).value:null;T&&(T=S.serializer.deserialize(T)),g(T)},function(C,I){p(I)})})}).catch(p)});return v(m,d),m}function ll(a,d){var u=this,m=new E(function(g,p){u.ready().then(function(){var S=u._dbInfo;S.db.transaction(function(b){Et(b,S,"SELECT * FROM "+S.storeName,[],function(C,I){for(var T=I.rows,A=T.length,H=0;H<A;H++){var z=T.item(H),Y=z.value;if(Y&&(Y=S.serializer.deserialize(Y)),Y=a(Y,z.key,H+1),Y!==void 0){g(Y);return}}g()},function(C,I){p(I)})})}).catch(p)});return v(m,d),m}function xs(a,d,u,m){var g=this;a=G(a);var p=new E(function(S,b){g.ready().then(function(){d===void 0&&(d=null);var C=d,I=g._dbInfo;I.serializer.serialize(d,function(T,A){A?b(A):I.db.transaction(function(H){Et(H,I,"INSERT OR REPLACE INTO "+I.storeName+" (key, value) VALUES (?, ?)",[a,T],function(){S(C)},function(z,Y){b(Y)})},function(H){if(H.code===H.QUOTA_ERR){if(m>0){S(xs.apply(g,[a,C,u,m-1]));return}b(H)}})})}).catch(b)});return v(p,u),p}function dl(a,d,u){return xs.apply(this,[a,d,u,1])}function fl(a,d){var u=this;a=G(a);var m=new E(function(g,p){u.ready().then(function(){var S=u._dbInfo;S.db.transaction(function(b){Et(b,S,"DELETE FROM "+S.storeName+" WHERE key = ?",[a],function(){g()},function(C,I){p(I)})})}).catch(p)});return v(m,d),m}function pl(a){var d=this,u=new E(function(m,g){d.ready().then(function(){var p=d._dbInfo;p.db.transaction(function(S){Et(S,p,"DELETE FROM "+p.storeName,[],function(){m()},function(b,C){g(C)})})}).catch(g)});return v(u,a),u}function ml(a){var d=this,u=new E(function(m,g){d.ready().then(function(){var p=d._dbInfo;p.db.transaction(function(S){Et(S,p,"SELECT COUNT(key) as c FROM "+p.storeName,[],function(b,C){var I=C.rows.item(0).c;m(I)},function(b,C){g(C)})})}).catch(g)});return v(u,a),u}function hl(a,d){var u=this,m=new E(function(g,p){u.ready().then(function(){var S=u._dbInfo;S.db.transaction(function(b){Et(b,S,"SELECT key FROM "+S.storeName+" WHERE id = ? LIMIT 1",[a+1],function(C,I){var T=I.rows.length?I.rows.item(0).key:null;g(T)},function(C,I){p(I)})})}).catch(p)});return v(m,d),m}function gl(a){var d=this,u=new E(function(m,g){d.ready().then(function(){var p=d._dbInfo;p.db.transaction(function(S){Et(S,p,"SELECT key FROM "+p.storeName,[],function(b,C){for(var I=[],T=0;T<C.rows.length;T++)I.push(C.rows.item(T).key);m(I)},function(b,C){g(C)})})}).catch(g)});return v(u,a),u}function _l(a){return new E(function(d,u){a.transaction(function(m){m.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(g,p){for(var S=[],b=0;b<p.rows.length;b++)S.push(p.rows.item(b).name);d({db:a,storeNames:S})},function(g,p){u(p)})},function(m){u(m)})})}function vl(a,d){d=M.apply(this,arguments);var u=this.config();a=typeof a!="function"&&a||{},a.name||(a.name=a.name||u.name,a.storeName=a.storeName||u.storeName);var m=this,g;return a.name?g=new E(function(p){var S;a.name===u.name?S=m._dbInfo.db:S=openDatabase(a.name,"","",0),a.storeName?p({db:S,storeNames:[a.storeName]}):p(_l(S))}).then(function(p){return new E(function(S,b){p.db.transaction(function(C){function I(z){return new E(function(Y,se){C.executeSql("DROP TABLE IF EXISTS "+z,[],function(){Y()},function(oe,Pe){se(Pe)})})}for(var T=[],A=0,H=p.storeNames.length;A<H;A++)T.push(I(p.storeNames[A]));E.all(T).then(function(){S()}).catch(function(z){b(z)})},function(C){b(C)})})}):g=E.reject("Invalid arguments"),v(g,d),g}var yl={_driver:"webSQLStorage",_initStorage:cl,_support:il(),iterate:ll,getItem:ul,setItem:dl,removeItem:fl,clear:pl,length:ml,key:hl,keys:gl,dropInstance:vl};function El(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function Ds(a,d){var u=a.name+"/";return a.storeName!==d.storeName&&(u+=a.storeName+"/"),u}function Sl(){var a="_localforage_support_test";try{return localStorage.setItem(a,!0),localStorage.removeItem(a),!1}catch{return!0}}function bl(){return!Sl()||localStorage.length>0}function Cl(a){var d=this,u={};if(a)for(var m in a)u[m]=a[m];return u.keyPrefix=Ds(a,d._defaultConfig),bl()?(d._dbInfo=u,u.serializer=li,E.resolve()):E.reject()}function Il(a){var d=this,u=d.ready().then(function(){for(var m=d._dbInfo.keyPrefix,g=localStorage.length-1;g>=0;g--){var p=localStorage.key(g);p.indexOf(m)===0&&localStorage.removeItem(p)}});return v(u,a),u}function Tl(a,d){var u=this;a=G(a);var m=u.ready().then(function(){var g=u._dbInfo,p=localStorage.getItem(g.keyPrefix+a);return p&&(p=g.serializer.deserialize(p)),p});return v(m,d),m}function xl(a,d){var u=this,m=u.ready().then(function(){for(var g=u._dbInfo,p=g.keyPrefix,S=p.length,b=localStorage.length,C=1,I=0;I<b;I++){var T=localStorage.key(I);if(T.indexOf(p)===0){var A=localStorage.getItem(T);if(A&&(A=g.serializer.deserialize(A)),A=a(A,T.substring(S),C++),A!==void 0)return A}}});return v(m,d),m}function Dl(a,d){var u=this,m=u.ready().then(function(){var g=u._dbInfo,p;try{p=localStorage.key(a)}catch{p=null}return p&&(p=p.substring(g.keyPrefix.length)),p});return v(m,d),m}function wl(a){var d=this,u=d.ready().then(function(){for(var m=d._dbInfo,g=localStorage.length,p=[],S=0;S<g;S++){var b=localStorage.key(S);b.indexOf(m.keyPrefix)===0&&p.push(b.substring(m.keyPrefix.length))}return p});return v(u,a),u}function Al(a){var d=this,u=d.keys().then(function(m){return m.length});return v(u,a),u}function Nl(a,d){var u=this;a=G(a);var m=u.ready().then(function(){var g=u._dbInfo;localStorage.removeItem(g.keyPrefix+a)});return v(m,d),m}function Ol(a,d,u){var m=this;a=G(a);var g=m.ready().then(function(){d===void 0&&(d=null);var p=d;return new E(function(S,b){var C=m._dbInfo;C.serializer.serialize(d,function(I,T){if(T)b(T);else try{localStorage.setItem(C.keyPrefix+a,I),S(p)}catch(A){(A.name==="QuotaExceededError"||A.name==="NS_ERROR_DOM_QUOTA_REACHED")&&b(A),b(A)}})})});return v(g,u),g}function Rl(a,d){if(d=M.apply(this,arguments),a=typeof a!="function"&&a||{},!a.name){var u=this.config();a.name=a.name||u.name,a.storeName=a.storeName||u.storeName}var m=this,g;return a.name?g=new E(function(p){a.storeName?p(Ds(a,m._defaultConfig)):p(a.name+"/")}).then(function(p){for(var S=localStorage.length-1;S>=0;S--){var b=localStorage.key(S);b.indexOf(p)===0&&localStorage.removeItem(b)}}):g=E.reject("Invalid arguments"),v(g,d),g}var Ml={_driver:"localStorageWrapper",_initStorage:Cl,_support:El(),iterate:xl,getItem:Tl,setItem:Ol,removeItem:Nl,clear:Il,length:Al,key:Dl,keys:wl,dropInstance:Rl},Pl=function(d,u){return d===u||typeof d=="number"&&typeof u=="number"&&isNaN(d)&&isNaN(u)},Ll=function(d,u){for(var m=d.length,g=0;g<m;){if(Pl(d[g],u))return!0;g++}return!1},ws=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},_n={},As={},Yt={INDEXEDDB:rl,WEBSQL:yl,LOCALSTORAGE:Ml},Vl=[Yt.INDEXEDDB._driver,Yt.WEBSQL._driver,Yt.LOCALSTORAGE._driver],Kn=["dropInstance"],di=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Kn),Fl={description:"",driver:Vl.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function kl(a,d){a[d]=function(){var u=arguments;return a.ready().then(function(){return a[d].apply(a,u)})}}function fi(){for(var a=1;a<arguments.length;a++){var d=arguments[a];if(d)for(var u in d)d.hasOwnProperty(u)&&(ws(d[u])?arguments[0][u]=d[u].slice():arguments[0][u]=d[u])}return arguments[0]}var Ul=(function(){function a(d){c(this,a);for(var u in Yt)if(Yt.hasOwnProperty(u)){var m=Yt[u],g=m._driver;this[u]=g,_n[g]||this.defineDriver(m)}this._defaultConfig=fi({},Fl),this._config=fi({},this._defaultConfig,d),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return a.prototype.config=function(u){if((typeof u>"u"?"undefined":s(u))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var m in u){if(m==="storeName"&&(u[m]=u[m].replace(/\W/g,"_")),m==="version"&&typeof u[m]!="number")return new Error("Database version must be a number.");this._config[m]=u[m]}return"driver"in u&&u.driver?this.setDriver(this._config.driver):!0}else return typeof u=="string"?this._config[u]:this._config},a.prototype.defineDriver=function(u,m,g){var p=new E(function(S,b){try{var C=u._driver,I=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!u._driver){b(I);return}for(var T=di.concat("_initStorage"),A=0,H=T.length;A<H;A++){var z=T[A],Y=!Ll(Kn,z);if((Y||u[z])&&typeof u[z]!="function"){b(I);return}}var se=function(){for(var vn=function(Gl){return function(){var $l=new Error("Method "+Gl+" is not implemented by the current driver"),Ns=E.reject($l);return v(Ns,arguments[arguments.length-1]),Ns}},pi=0,Hl=Kn.length;pi<Hl;pi++){var mi=Kn[pi];u[mi]||(u[mi]=vn(mi))}};se();var oe=function(vn){_n[C]&&console.info("Redefining LocalForage driver: "+C),_n[C]=u,As[C]=vn,S()};"_support"in u?u._support&&typeof u._support=="function"?u._support().then(oe,b):oe(!!u._support):oe(!0)}catch(Pe){b(Pe)}});return N(p,m,g),p},a.prototype.driver=function(){return this._driver||null},a.prototype.getDriver=function(u,m,g){var p=_n[u]?E.resolve(_n[u]):E.reject(new Error("Driver not found."));return N(p,m,g),p},a.prototype.getSerializer=function(u){var m=E.resolve(li);return N(m,u),m},a.prototype.ready=function(u){var m=this,g=m._driverSet.then(function(){return m._ready===null&&(m._ready=m._initDriver()),m._ready});return N(g,u,u),g},a.prototype.setDriver=function(u,m,g){var p=this;ws(u)||(u=[u]);var S=this._getSupportedDrivers(u);function b(){p._config.driver=p.driver()}function C(A){return p._extend(A),b(),p._ready=p._initStorage(p._config),p._ready}function I(A){return function(){var H=0;function z(){for(;H<A.length;){var Y=A[H];return H++,p._dbInfo=null,p._ready=null,p.getDriver(Y).then(C).catch(z)}b();var se=new Error("No available storage method found.");return p._driverSet=E.reject(se),p._driverSet}return z()}}var T=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=T.then(function(){var A=S[0];return p._dbInfo=null,p._ready=null,p.getDriver(A).then(function(H){p._driver=H._driver,b(),p._wrapLibraryMethodsWithReady(),p._initDriver=I(S)})}).catch(function(){b();var A=new Error("No available storage method found.");return p._driverSet=E.reject(A),p._driverSet}),N(this._driverSet,m,g),this._driverSet},a.prototype.supports=function(u){return!!As[u]},a.prototype._extend=function(u){fi(this,u)},a.prototype._getSupportedDrivers=function(u){for(var m=[],g=0,p=u.length;g<p;g++){var S=u[g];this.supports(S)&&m.push(S)}return m},a.prototype._wrapLibraryMethodsWithReady=function(){for(var u=0,m=di.length;u<m;u++)kl(this,di[u])},a.prototype.createInstance=function(u){return new a(u)},a})(),Bl=new Ul;i.exports=Bl},{3:3}]},{},[4])(4)})});var Xe=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;currency;static get(){return window.CooeeSDK.config}update(t){return t??={},this.gaEnabled=t.gaEnabled,this.gaMeasurementID=t.gaMeasurementID,this.pixelPush=t.pixelPush,this.website=t.website??{},this.currencyCount=t.currencyCount??0,this.money=t.money,this.currency=t.currency,this.storefrontToken=t.storefrontToken,this.skipItemAttribute=t.skipItemAttribute,this}};var ia=0;function zl(e=document.head){return oa(Kt.styleURL,e,"cooee-global-styles")}function Yl(e=document.head){return oa(Kt.swiperStyleURL,e,"cooee-swiper-styles")}function oa(e,t=document.head,n){return new Promise(r=>{if(t.querySelector(`#${n}`)){r();return}let o=document.createElement("link");o.rel="stylesheet",o.href=e,o.id=n,o.onload=()=>{r()},o.onerror=()=>{console.error("Failed to load stylesheet:",e),r()},t.appendChild(o)})}function In(e,t=document.head){if(!e)return;ia++;let n=document.createElement("style");n.id=`cooee-app-css-${ia}`,n.textContent=e,t.appendChild(n)}async function ir(){let e=(await import("./swiper-bundle-WHJS64TU.js")).default;return window.CooeeSDK.Swiper=e}async function or(e,t=!0){if(!e)return;let n=[];t&&n.push(Yl(e)),n.push(zl(e)),await Promise.all(n);let r=Xe.get().website.commonCSS;In(r,e)}var Xl={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},sg=k(_({},Xl),{"[class.ng-submitted]":"isSubmitted"});var Jl=new Ls("",{providedIn:"root",factory:()=>sa}),sa="always";var Ql=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=_i({type:e});static \u0275inj=gi({})}return e})();var aa=(()=>{class e{static withConfig(n){return{ngModule:e,providers:[{provide:Jl,useValue:n.callSetDisabledState??sa}]}}static \u0275fac=function(r){return new(r||e)};static \u0275mod=_i({type:e});static \u0275inj=gi({imports:[Ql]})}return e})();var yi=(function(e){return e.SHOPIFY_CHECKOUT="shopify_checkout",e.THIRD_PARTY_CHECKOUT="third_party_checkout",e.CART_PAGE="cart_page",e.CART_DRAWER="cart_drawer",e})(yi||{});var je=(function(e){return e[e.NONE=0]="NONE",e[e.REJECT_POPUP=1]="REJECT_POPUP",e[e.ACCEPT_POPUP=2]="ACCEPT_POPUP",e[e.GO_TO_URL=4]="GO_TO_URL",e[e.SHARE=5]="SHARE",e[e.KEY_VALUE=100]="KEY_VALUE",e[e.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",e[e.ADD_TO_CART=102]="ADD_TO_CART",e[e.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",e[e.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",e[e.OPEN_CART=105]="OPEN_CART",e[e.SUBMIT_FORM=106]="SUBMIT_FORM",e[e.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",e[e.ADD_BUNDLE=108]="ADD_BUNDLE",e[e.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",e[e.BUY_NOW=110]="BUY_NOW",e[e.QUICK_VIEW=111]="QUICK_VIEW",e})(je||{});var Zl=(function(e){return e.FREE_SHIPPING="FREE_SHIPPING",e.DISCOUNT="DISCOUNT",e.FREE_AUTO_GIFT="FREE_AUTO_GIFT",e.FREE_GIFT_SELECT="FREE_GIFT_SELECT",e.UI_ONLY="UI_ONLY",e})(Zl||{});var We=class e{engagementContext=ae(Cn);eventData=ae(nr);constructor(){}executeCTA(t,n){let r,i=this.engagementContext();if(!i){Ce.error("Engagement context is not available; aborting executeCTA.");return}if(t===je.ADD_TO_CART)r="CE Add To Cart Clicked";else if(t===je.GO_TO_PRODUCT)r="CE View Item Clicked";else if(t===je.OPEN_CART)r="CE Open Cart Clicked",i.triggerData.redirectBehaviour=yi.CART_DRAWER;else{Ce.warn(`Unsupported CTA type: ${t}`);return}window.CooeeSDK.executeCTA(i,_({clickAction:{at:t}},n));let o=new na(r,this.eventData.props,i.triggerData);n?.video?o.setVideos(n.video):this.eventData.video&&o.setVideos(this.eventData.video),window.CooeeSDK.sendEvent(o)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=hi({token:e,factory:e.\u0275fac})};function ca(e,t){return[We,...ed(e,t)]}function ed(e,t){return[{provide:Cn,useValue:ct(e)},{provide:nr,useValue:_({},t)}]}var sr=class e{elementRef=ae(Rt);engagementService=ae(We);hasSwiper=!1;_engagementTrigger=ct(null);_triggerContext=ae(Cn);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get classes(){let t=["letscooee-widget"],n=this._engagementTrigger();return t.push(`widget-${n?.shortID}`),t}get triggerContext(){return this._triggerContext()}set triggerContext(t){this._triggerContext.set(t),this._engagementTrigger.set(t.triggerData),this.engagementTriggerReceived(t.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){Ce.verbose("Init",this.constructor.name);let t=this.elementRef.nativeElement.shadowRoot;t&&(or(t,this.hasSwiper),In(this.engagementTrigger?.content?.innerCSS,t))}ngOnDestroy(){Ce.verbose("Destroying",this.constructor.name)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Se({type:e,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,r){n&2&&Zn(r.classes)},inputs:{triggerContext:"triggerContext"},decls:1,vars:0,template:function(n,r){n&1&&Hs(0)},encapsulation:2})};var ua=(e,t)=>t.id;function td(e,t){if(e&1&&(P(0,"span",6),ne(1),U()),e&2){L();let n=Ie(0);D(),lt(n)}}function nd(e,t){if(e&1){let n=Le();Be(0),P(1,"button",5),be("click",function(){let i=ye(n).$implicit,o=L().$implicit,s=L();return Ee(s.onOptionChange(o,i))}),X(2,td,2,1,"span",6),U()}if(e&2){let n=t.$implicit,r=L().$implicit,i=Ie(1),o=L(),s=n.name,c=He(n.displayName||n.name),l=n.swatch,h=i?n.hexColor??s:"",y=o.selectedOptions()[r.name]===s,f=!!(l!=null&&l.color),E=!!(!(l==null||l.image==null)&&l.image.url);D(),Sn("swatch-color-type",f)("swatch-image-type",E)("selected",y)("disabled",n.disabled),$("title",c)("ngStyle",o.getSwatchStyles(l,h)),qt("aria-checked",y?"true":"false")("data-value",s)("aria-disabled",n.disabled?"true":null)("aria-label",c),D(),J(!i&&!f&&!E?2:-1)}}function rd(e,t){if(e&1&&(P(0,"div"),Be(1),P(2,"div",1),ne(3),U(),P(4,"div",2),ne(5),U(),P(6,"div",3),bt(7,nd,3,16,"button",4,ua),U()()),e&2){let n=t.$implicit,r=L();Zn(er("option-group ",n.name.toLowerCase())),D(),He(r.hasHexColors(n)),D(2),Pt("",n.name,":"),D(2),lt(r.selectedOptions()[n.name]),D(),qt("aria-label",n.name),D(),Ct(n.optionValues)}}var Tn=e=>e.trim().toLowerCase(),ar=class e extends sr{selectedVariant=new En;item=he.required();selectedOptions=ct({});options=dt(()=>{let t=this.item();if(!t.options||t.vars.length===1)return[];if(window.cooeeManipulateProduct)try{window.cooeeManipulateProduct(t,this.engagementTrigger)}catch(n){Ce.error(n)}return t.options.forEach(n=>{n.optionValues.forEach(r=>{r.disabled=this.isOptionValueDisabledFast(n,r)})}),t.options});matchedVariant=dt(()=>{let t=this.item(),n=this.selectedOptions();return t.vars.find(r=>t.options.every(i=>{let o=r.selectedOptions.find(s=>s.name===i.name)?.value;return n[i.name]===o}))});availabilityIndex=dt(()=>{let t=this.item(),n=new Map;return t?.vars?.length&&t.vars.forEach((r,i)=>{if(r.isAvailable)for(let o of r.selectedOptions){let s=Tn(o.name),c=o.value,l=n.get(s);l||n.set(s,l=new Map);let h=l.get(c);h||l.set(c,h=new Set),h.add(i)}}),n});constructor(){super(),ft(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let t=ft(()=>{let n=this.item();if(!n?.options)return;let r=_({},this.selectedOptions()),i=n.vars.find(o=>o.isAvailable)??n.vars[0];n.options.forEach(o=>{let s=i?.selectedOptions.find(c=>c.name===o.name)?.value;s&&(r[o.name]=s)}),this.selectedOptions.set(r),t.destroy()})}ngOnInit(){super.ngOnInit();let t=this.elementRef.nativeElement.shadowRoot;if(!t)return;let n=Xe.get().website?.itemSwatchMapping;n&&In(n,t)}onOptionChange(t,n){let r=_({},this.selectedOptions());r[t.name]=n.name,this.selectedOptions.set(r)}engagementTriggerReceived(){}update(){}hasHexColors(t){return!!t.optionValues[0]?.name.match(/#[a-f0-9]{6}\b/i)}getSwatchStyles(t,n){let r={};return!t&&n?(r["--option-color"]=n,r["background-color"]=n,r):(t?.image?.url?r["background-image"]=`url("${t.image.url}")`:t?.color&&(r["--option-color"]=t.color,r["background-color"]=t.color),r)}getCandidateVariantsExcluding(t){let n=this.item(),r=this.availabilityIndex(),i=new Set;n.vars.forEach((s,c)=>{s.isAvailable&&i.add(c)});let o=i;for(let[s,c]of Object.entries(this.selectedOptions())){if(Tn(s)===Tn(t))continue;let l=r.get(Tn(s));if(!l)return new Set;let h=l.get(String(c));if(!h)return new Set;if(o=new Set([...o].filter(y=>h.has(y))),o.size===0)return o}return o}isOptionValueDisabledFast(t,n){let i=this.availabilityIndex().get(Tn(t.name));if(!i)return!0;let o=n.name,s=i.get(o);if(!s||s.size===0)return!0;let c=this.getCandidateVariantsExcluding(t.name);if(c.size===0)return!0;for(let l of c)if(s.has(l))return!1;return!0}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Se({type:e,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[Lt(ca()),vi],decls:2,vars:0,consts:[[3,"class"],[1,"name"],[1,"selected-value"],["role","radiogroup",1,"option-values"],["type","button","role","radio",1,"option-value",3,"swatch-color-type","swatch-image-type","selected","disabled","title","ngStyle"],["type","button","role","radio",1,"option-value",3,"click","title","ngStyle"],[1,"title"]],template:function(n,r){n&1&&bt(0,rd,9,7,"div",0,ua),n&2&&Ct(r.options())},dependencies:[ea,Qs,aa],styles:[`.option-group{display:flex;gap:4px;align-items:center}.option-group+.option-group{margin-top:8px}.option-values{display:flex;flex-wrap:nowrap;overflow-x:auto;padding:6px;gap:4px;scrollbar-gutter:stable both-edges;scrollbar-width:none}.option-values::-webkit-scrollbar{display:none}.selected-value{display:none}.option-value{padding:5px 10px;border:1px solid #ccc;cursor:pointer;border-radius:4px;min-width:32px;min-height:32px;text-align:center;position:relative;flex-shrink:0;--selected-color: var(--option-color, rgba(var(--lc-primary-button-bg-color, 0 0 0)));background-size:cover;background-position:center;background-repeat:no-repeat}.option-value.selected{box-shadow:#fff 0 0 0 2px,var(--selected-color) 0 0 0 4px}.option-value.disabled{opacity:.5;pointer-events:none}
2
2
  `],encapsulation:3})};var Si=Wl(da());function cr(e){return Si.default.createInstance({name:"lc",storeName:e,driver:Si.default.LOCALSTORAGE})}var Jt=class{static storage;static async get(t,n){return await this.storage?.getItem(t)??n}static set(t,n){return this.storage?.setItem(t,n)}static remove(t){return this.storage?.removeItem(t)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}};var xn=class xn extends Jt{};Xn(xn,"storeName","usr"),xn.storage=cr(xn.storeName);var bi=xn;function Ci(){return window.CooeeSDK?.uaParser.getDevice().type==="mobile"}var r_=()=>typeof navigator<"u"&&"share"in navigator;var Qt=class{lastWidth;lastHeight;resizeTimeout=null;debounceDelay=200;onResizeCallback;constructor(t){this.onResizeCallback=t,this.lastWidth=window.innerWidth,this.lastHeight=window.innerHeight,window.addEventListener("resize",this.debouncedResize),window.addEventListener("orientationchange",this.handleImmediateResize)}destroy(){window.removeEventListener("resize",this.debouncedResize),window.removeEventListener("orientationchange",this.handleImmediateResize)}handleImmediateResize=()=>{this.triggerResize()};debouncedResize=()=>{this.resizeTimeout!==null&&clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(()=>{this.triggerResize()},this.debounceDelay)};triggerResize(){let t=window.innerWidth,n=window.innerHeight;(n!==this.lastHeight||t!==this.lastWidth)&&(this.onResizeCallback(),this.lastWidth=t,this.lastHeight=n)}};var Dn=class Dn extends Jt{};Xn(Dn,"storeName","ses"),Dn.storage=cr(Dn.storeName);var Ii=Dn;var R=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var V=globalThis;var Qe="9.42.0";function Ft(){return kt(V),V}function kt(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Qe,t[Qe]=t[Qe]||{}}function pt(e,t,n=V){let r=n.__SENTRY__=n.__SENTRY__||{},i=r[Qe]=r[Qe]||{};return i[e]||(i[e]=t())}var Ti=["debug","info","warn","error","log","assert","trace"],id="Sentry Logger ",Zt={};function Tt(e){if(!("console"in V))return e();let t=V.console,n={},r=Object.keys(Zt);r.forEach(i=>{let o=Zt[i];n[i]=t[i],t[i]=o});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function od(){Di().enabled=!0}function sd(){Di().enabled=!1}function fa(){return Di().enabled}function ad(...e){xi("log",...e)}function cd(...e){xi("warn",...e)}function ud(...e){xi("error",...e)}function xi(e,...t){R&&fa()&&Tt(()=>{V.console[e](`${id}[${e}]:`,...t)})}function Di(){return R?pt("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var w={enable:od,disable:sd,isEnabled:fa,log:ad,warn:cd,error:ud};var pa=/\(error: (.*)\)/,ma=/captureMessage|captureException/;function Ai(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{let o=[],s=n.split(`
3
3
  `);for(let c=r;c<s.length;c++){let l=s[c];if(l.length>1024)continue;let h=pa.test(l)?l.replace(pa,"$1"):l;if(!h.match(/\S*Error: /)){for(let y of t){let f=y(h);if(f){o.push(f);break}}if(o.length>=50+i)break}}return ha(o.slice(i))}}function ha(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(ur(t).function||"")&&t.pop(),t.reverse(),ma.test(ur(t).function||"")&&(t.pop(),ma.test(ur(t).function||"")&&t.pop()),t.slice(0,50).map(n=>k(_({},n),{filename:n.filename||ur(t).filename,function:n.function||"?"}))}function ur(e){return e[e.length-1]||{}}var wi="<anonymous>";function Ve(e){try{return!e||typeof e!="function"?wi:e.name||wi}catch{return wi}}function lr(e){let t=e.exception;if(t){let n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}var dr={},ga={};function Te(e,t){dr[e]=dr[e]||[],dr[e].push(t)}function xe(e,t){if(!ga[e]){ga[e]=!0;try{t()}catch(n){R&&w.error(`Error while instrumenting ${e}`,n)}}}function ce(e,t){let n=e&&dr[e];if(n)for(let r of n)try{r(t)}catch(i){R&&w.error(`Error while triggering instrumentation handler.
4
4
  Type: ${e}