@letscooee/web-sdk 13.1.8 → 13.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-3FC4J3DE.js +1 -0
- package/dist/{chunk-KUJLM34F.js → chunk-6BNGPIT6.js} +1 -1
- package/dist/{chunk-GHCPCH3Z.js → chunk-EJH6GSNR.js} +1 -1
- package/dist/chunk-I2DJTZ62.js +8 -0
- package/dist/{chunk-ATKGM3L5.js → chunk-KJQW3WFK.js} +1 -1
- package/dist/{chunk-5FB5YTNU.js → chunk-ODA4FRXD.js} +1 -1
- package/dist/chunk-T263X3DM.js +1 -0
- package/dist/chunk-U4XWPFUW.js +1 -0
- package/dist/chunk-WTCNMWSD.js +6 -0
- package/dist/debug-logs-J2VHCTDA.js +1 -0
- package/dist/{debugger.component-2XKXO7DM.js → debugger.component-KKAN5FYA.js} +2 -2
- package/dist/esm-EYV26LOR.js +498 -0
- package/dist/main.min.js +20 -34
- package/dist/resource-metrics-EW2N36H5.js +1 -0
- package/dist/share-dialog.component-4S4XKPRU.js +1 -0
- package/dist/video-detail-dialog.component-76UPZ4UM.js +2 -0
- package/dist/widget.min.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-LNL5UDTE.js +0 -8
- package/dist/chunk-NOAE4XN4.js +0 -1
- package/dist/chunk-QWX3XRW5.js +0 -6
- package/dist/chunk-YMH5BOKD.js +0 -15
- package/dist/debug-logs-7RWEVJWE.js +0 -1
- package/dist/resource-metrics-SHWGKIXI.js +0 -1
- package/dist/share-dialog.component-FV55JWQI.js +0 -1
- package/dist/video-detail-dialog.component-G5OSYKHX.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as et,v as Ze,yb as tt,zb as nt}from"./chunk-6BNGPIT6.js";import{a as rt,c as De,d as ce}from"./chunk-T263X3DM.js";import{c as ne,e as mr,g as hr,h as fe}from"./chunk-U4XWPFUW.js";var it=mr((ot,Ce)=>{"use strict";(function(m){if(typeof ot=="object"&&typeof Ce<"u")Ce.exports=m();else if(typeof define=="function"&&define.amd)define([],m);else{var l;typeof window<"u"?l=window:typeof global<"u"?l=global:typeof self<"u"?l=self:l=this,l.localforage=m()}})(function(){var m,l,w;return(function g(y,R,S){function C(M,V){if(!R[M]){if(!y[M]){var h=typeof ne=="function"&≠if(!V&&h)return h(M,!0);if(E)return E(M,!0);var p=new Error("Cannot find module '"+M+"'");throw p.code="MODULE_NOT_FOUND",p}var N=R[M]={exports:{}};y[M][0].call(N.exports,function(P){var Y=y[M][1][P];return C(Y||P)},N,N.exports,g,y,R,S)}return R[M].exports}for(var E=typeof ne=="function"&&ne,O=0;O<S.length;O++)C(S[O]);return C})({1:[function(g,y,R){(function(S){"use strict";var C=S.MutationObserver||S.WebKitMutationObserver,E;if(C){var O=0,M=new C(P),V=S.document.createTextNode("");M.observe(V,{characterData:!0}),E=function(){V.data=O=++O%2}}else if(!S.setImmediate&&typeof S.MessageChannel<"u"){var h=new S.MessageChannel;h.port1.onmessage=P,E=function(){h.port2.postMessage(0)}}else"document"in S&&"onreadystatechange"in S.document.createElement("script")?E=function(){var B=S.document.createElement("script");B.onreadystatechange=function(){P(),B.onreadystatechange=null,B.parentNode.removeChild(B),B=null},S.document.documentElement.appendChild(B)}:E=function(){setTimeout(P,0)};var p,N=[];function P(){p=!0;for(var B,k,F=N.length;F;){for(k=N,N=[],B=-1;++B<F;)k[B]();F=N.length}p=!1}y.exports=Y;function Y(B){N.push(B)===1&&!p&&E()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(g,y,R){"use strict";var S=g(1);function C(){}var E={},O=["REJECTED"],M=["FULFILLED"],V=["PENDING"];y.exports=h;function h(d){if(typeof d!="function")throw new TypeError("resolver must be a function");this.state=V,this.queue=[],this.outcome=void 0,d!==C&&Y(this,d)}h.prototype.catch=function(d){return this.then(null,d)},h.prototype.then=function(d,T){if(typeof d!="function"&&this.state===M||typeof T!="function"&&this.state===O)return this;var _=new this.constructor(C);if(this.state!==V){var D=this.state===M?d:T;N(_,D,this.outcome)}else this.queue.push(new p(_,d,T));return _};function p(d,T,_){this.promise=d,typeof T=="function"&&(this.onFulfilled=T,this.callFulfilled=this.otherCallFulfilled),typeof _=="function"&&(this.onRejected=_,this.callRejected=this.otherCallRejected)}p.prototype.callFulfilled=function(d){E.resolve(this.promise,d)},p.prototype.otherCallFulfilled=function(d){N(this.promise,this.onFulfilled,d)},p.prototype.callRejected=function(d){E.reject(this.promise,d)},p.prototype.otherCallRejected=function(d){N(this.promise,this.onRejected,d)};function N(d,T,_){S(function(){var D;try{D=T(_)}catch(U){return E.reject(d,U)}D===d?E.reject(d,new TypeError("Cannot resolve promise with itself")):E.resolve(d,D)})}E.resolve=function(d,T){var _=B(P,T);if(_.status==="error")return E.reject(d,_.value);var D=_.value;if(D)Y(d,D);else{d.state=M,d.outcome=T;for(var U=-1,W=d.queue.length;++U<W;)d.queue[U].callFulfilled(T)}return d},E.reject=function(d,T){d.state=O,d.outcome=T;for(var _=-1,D=d.queue.length;++_<D;)d.queue[_].callRejected(T);return d};function P(d){var T=d&&d.then;if(d&&(typeof d=="object"||typeof d=="function")&&typeof T=="function")return function(){T.apply(d,arguments)}}function Y(d,T){var _=!1;function D(H){_||(_=!0,E.reject(d,H))}function U(H){_||(_=!0,E.resolve(d,H))}function W(){T(U,D)}var $=B(W);$.status==="error"&&D($.value)}function B(d,T){var _={};try{_.value=d(T),_.status="success"}catch(D){_.status="error",_.value=D}return _}h.resolve=k;function k(d){return d instanceof this?d:E.resolve(new this(C),d)}h.reject=F;function F(d){var T=new this(C);return E.reject(T,d)}h.all=ge;function ge(d){var T=this;if(Object.prototype.toString.call(d)!=="[object Array]")return this.reject(new TypeError("must be an array"));var _=d.length,D=!1;if(!_)return this.resolve([]);for(var U=new Array(_),W=0,$=-1,H=new this(C);++$<_;)G(d[$],$);return H;function G(ee,ae){T.resolve(ee).then(pe,function(J){D||(D=!0,E.reject(H,J))});function pe(J){U[ae]=J,++W===_&&!D&&(D=!0,E.resolve(H,U))}}}h.race=q;function q(d){var T=this;if(Object.prototype.toString.call(d)!=="[object Array]")return this.reject(new TypeError("must be an array"));var _=d.length,D=!1;if(!_)return this.resolve([]);for(var U=-1,W=new this(C);++U<_;)$(d[U]);return W;function $(H){T.resolve(H).then(function(G){D||(D=!0,E.resolve(W,G))},function(G){D||(D=!0,E.reject(W,G))})}}},{1:1}],3:[function(g,y,R){(function(S){"use strict";typeof S.Promise!="function"&&(S.Promise=g(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(g,y,R){"use strict";var S=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function C(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function E(){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 O=E();function M(){try{if(!O||!O.open)return!1;var e=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),r=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!e||r)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function V(e,r){e=e||[],r=r||{};try{return new Blob(e,r)}catch(n){if(n.name!=="TypeError")throw n;for(var t=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,o=new t,i=0;i<e.length;i+=1)o.append(e[i]);return o.getBlob(r.type)}}typeof Promise>"u"&&g(3);var h=Promise;function p(e,r){r&&e.then(function(t){r(null,t)},function(t){r(t)})}function N(e,r,t){typeof r=="function"&&e.then(r),typeof t=="function"&&e.catch(t)}function P(e){return typeof e!="string"&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function Y(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var B="local-forage-detect-blob-support",k=void 0,F={},ge=Object.prototype.toString,q="readonly",d="readwrite";function T(e){for(var r=e.length,t=new ArrayBuffer(r),o=new Uint8Array(t),i=0;i<r;i++)o[i]=e.charCodeAt(i);return t}function _(e){return new h(function(r){var t=e.transaction(B,d),o=V([""]);t.objectStore(B).put(o,"key"),t.onabort=function(i){i.preventDefault(),i.stopPropagation(),r(!1)},t.oncomplete=function(){var i=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);r(n||!i||parseInt(i[1],10)>=43)}}).catch(function(){return!1})}function D(e){return typeof k=="boolean"?h.resolve(k):_(e).then(function(r){return k=r,k})}function U(e){var r=F[e.name],t={};t.promise=new h(function(o,i){t.resolve=o,t.reject=i}),r.deferredOperations.push(t),r.dbReady?r.dbReady=r.dbReady.then(function(){return t.promise}):r.dbReady=t.promise}function W(e){var r=F[e.name],t=r.deferredOperations.pop();if(t)return t.resolve(),t.promise}function $(e,r){var t=F[e.name],o=t.deferredOperations.pop();if(o)return o.reject(r),o.promise}function H(e,r){return new h(function(t,o){if(F[e.name]=F[e.name]||Pe(),e.db)if(r)U(e),e.db.close();else return t(e.db);var i=[e.name];r&&i.push(e.version);var n=O.open.apply(O,i);r&&(n.onupgradeneeded=function(a){var s=n.result;try{s.createObjectStore(e.storeName),a.oldVersion<=1&&s.createObjectStore(B)}catch(u){if(u.name==="ConstraintError")console.warn('The database "'+e.name+'" has been upgraded from version '+a.oldVersion+" to version "+a.newVersion+', but the storage "'+e.storeName+'" already exists.');else throw u}}),n.onerror=function(a){a.preventDefault(),o(n.error)},n.onsuccess=function(){var a=n.result;a.onversionchange=function(s){s.target.close()},t(a),W(e)}})}function G(e){return H(e,!1)}function ee(e){return H(e,!0)}function ae(e,r){if(!e.db)return!0;var t=!e.db.objectStoreNames.contains(e.storeName),o=e.version<e.db.version,i=e.version>e.db.version;if(o&&(e.version!==r&&console.warn('The database "'+e.name+`" can't be downgraded from version `+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||t){if(t){var n=e.db.version+1;n>e.version&&(e.version=n)}return!0}return!1}function pe(e){return new h(function(r,t){var o=new FileReader;o.onerror=t,o.onloadend=function(i){var n=btoa(i.target.result||"");r({__local_forage_encoded_blob:!0,data:n,type:e.type})},o.readAsBinaryString(e)})}function J(e){var r=T(atob(e.data));return V([r],{type:e.type})}function Le(e){return e&&e.__local_forage_encoded_blob}function ht(e){var r=this,t=r._initReady().then(function(){var o=F[r._dbInfo.name];if(o&&o.dbReady)return o.dbReady});return N(t,e,e),t}function vt(e){U(e);for(var r=F[e.name],t=r.forages,o=0;o<t.length;o++){var i=t[o];i._dbInfo.db&&(i._dbInfo.db.close(),i._dbInfo.db=null)}return e.db=null,G(e).then(function(n){return e.db=n,ae(e)?ee(e):n}).then(function(n){e.db=r.db=n;for(var a=0;a<t.length;a++)t[a]._dbInfo.db=n}).catch(function(n){throw $(e,n),n})}function j(e,r,t,o){o===void 0&&(o=1);try{var i=e.db.transaction(e.storeName,r);t(null,i)}catch(n){if(o>0&&(!e.db||n.name==="InvalidStateError"||n.name==="NotFoundError"))return h.resolve().then(function(){if(!e.db||n.name==="NotFoundError"&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),ee(e)}).then(function(){return vt(e).then(function(){j(e,r,t,o-1)})}).catch(t);t(n)}}function Pe(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function gt(e){var r=this,t={db:null};if(e)for(var o in e)t[o]=e[o];var i=F[t.name];i||(i=Pe(),F[t.name]=i),i.forages.push(r),r._initReady||(r._initReady=r.ready,r.ready=ht);var n=[];function a(){return h.resolve()}for(var s=0;s<i.forages.length;s++){var u=i.forages[s];u!==r&&n.push(u._initReady().catch(a))}var f=i.forages.slice(0);return h.all(n).then(function(){return t.db=i.db,G(t)}).then(function(c){return t.db=c,ae(t,r._defaultConfig.version)?ee(t):c}).then(function(c){t.db=i.db=c,r._dbInfo=t;for(var v=0;v<f.length;v++){var b=f[v];b!==r&&(b._dbInfo.db=t.db,b._dbInfo.version=t.version)}})}function pt(e,r){var t=this;e=P(e);var o=new h(function(i,n){t.ready().then(function(){j(t._dbInfo,q,function(a,s){if(a)return n(a);try{var u=s.objectStore(t._dbInfo.storeName),f=u.get(e);f.onsuccess=function(){var c=f.result;c===void 0&&(c=null),Le(c)&&(c=J(c)),i(c)},f.onerror=function(){n(f.error)}}catch(c){n(c)}})}).catch(n)});return p(o,r),o}function yt(e,r){var t=this,o=new h(function(i,n){t.ready().then(function(){j(t._dbInfo,q,function(a,s){if(a)return n(a);try{var u=s.objectStore(t._dbInfo.storeName),f=u.openCursor(),c=1;f.onsuccess=function(){var v=f.result;if(v){var b=v.value;Le(b)&&(b=J(b));var I=e(b,v.key,c++);I!==void 0?i(I):v.continue()}else i()},f.onerror=function(){n(f.error)}}catch(v){n(v)}})}).catch(n)});return p(o,r),o}function bt(e,r,t){var o=this;e=P(e);var i=new h(function(n,a){var s;o.ready().then(function(){return s=o._dbInfo,ge.call(r)==="[object Blob]"?D(s.db).then(function(u){return u?r:pe(r)}):r}).then(function(u){j(o._dbInfo,d,function(f,c){if(f)return a(f);try{var v=c.objectStore(o._dbInfo.storeName);u===null&&(u=void 0);var b=v.put(u,e);c.oncomplete=function(){u===void 0&&(u=null),n(u)},c.onabort=c.onerror=function(){var I=b.error?b.error:b.transaction.error;a(I)}}catch(I){a(I)}})}).catch(a)});return p(i,t),i}function _t(e,r){var t=this;e=P(e);var o=new h(function(i,n){t.ready().then(function(){j(t._dbInfo,d,function(a,s){if(a)return n(a);try{var u=s.objectStore(t._dbInfo.storeName),f=u.delete(e);s.oncomplete=function(){i()},s.onerror=function(){n(f.error)},s.onabort=function(){var c=f.error?f.error:f.transaction.error;n(c)}}catch(c){n(c)}})}).catch(n)});return p(o,r),o}function wt(e){var r=this,t=new h(function(o,i){r.ready().then(function(){j(r._dbInfo,d,function(n,a){if(n)return i(n);try{var s=a.objectStore(r._dbInfo.storeName),u=s.clear();a.oncomplete=function(){o()},a.onabort=a.onerror=function(){var f=u.error?u.error:u.transaction.error;i(f)}}catch(f){i(f)}})}).catch(i)});return p(t,e),t}function Et(e){var r=this,t=new h(function(o,i){r.ready().then(function(){j(r._dbInfo,q,function(n,a){if(n)return i(n);try{var s=a.objectStore(r._dbInfo.storeName),u=s.count();u.onsuccess=function(){o(u.result)},u.onerror=function(){i(u.error)}}catch(f){i(f)}})}).catch(i)});return p(t,e),t}function St(e,r){var t=this,o=new h(function(i,n){if(e<0){i(null);return}t.ready().then(function(){j(t._dbInfo,q,function(a,s){if(a)return n(a);try{var u=s.objectStore(t._dbInfo.storeName),f=!1,c=u.openKeyCursor();c.onsuccess=function(){var v=c.result;if(!v){i(null);return}e===0||f?i(v.key):(f=!0,v.advance(e))},c.onerror=function(){n(c.error)}}catch(v){n(v)}})}).catch(n)});return p(o,r),o}function Tt(e){var r=this,t=new h(function(o,i){r.ready().then(function(){j(r._dbInfo,q,function(n,a){if(n)return i(n);try{var s=a.objectStore(r._dbInfo.storeName),u=s.openKeyCursor(),f=[];u.onsuccess=function(){var c=u.result;if(!c){o(f);return}f.push(c.key),c.continue()},u.onerror=function(){i(u.error)}}catch(c){i(c)}})}).catch(i)});return p(t,e),t}function It(e,r){r=Y.apply(this,arguments);var t=this.config();e=typeof e!="function"&&e||{},e.name||(e.name=e.name||t.name,e.storeName=e.storeName||t.storeName);var o=this,i;if(!e.name)i=h.reject("Invalid arguments");else{var n=e.name===t.name&&o._dbInfo.db,a=n?h.resolve(o._dbInfo.db):G(e).then(function(s){var u=F[e.name],f=u.forages;u.db=s;for(var c=0;c<f.length;c++)f[c]._dbInfo.db=s;return s});e.storeName?i=a.then(function(s){if(s.objectStoreNames.contains(e.storeName)){var u=s.version+1;U(e);var f=F[e.name],c=f.forages;s.close();for(var v=0;v<c.length;v++){var b=c[v];b._dbInfo.db=null,b._dbInfo.version=u}var I=new h(function(x,L){var A=O.open(e.name,u);A.onerror=function(z){var re=A.result;re.close(),L(z)},A.onupgradeneeded=function(){var z=A.result;z.deleteObjectStore(e.storeName)},A.onsuccess=function(){var z=A.result;z.close(),x(z)}});return I.then(function(x){f.db=x;for(var L=0;L<c.length;L++){var A=c[L];A._dbInfo.db=x,W(A._dbInfo)}}).catch(function(x){throw($(e,x)||h.resolve()).catch(function(){}),x})}}):i=a.then(function(s){U(e);var u=F[e.name],f=u.forages;s.close();for(var c=0;c<f.length;c++){var v=f[c];v._dbInfo.db=null}var b=new h(function(I,x){var L=O.deleteDatabase(e.name);L.onerror=function(){var A=L.result;A&&A.close(),x(L.error)},L.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},L.onsuccess=function(){var A=L.result;A&&A.close(),I(A)}});return b.then(function(I){u.db=I;for(var x=0;x<f.length;x++){var L=f[x];W(L._dbInfo)}}).catch(function(I){throw($(e,I)||h.resolve()).catch(function(){}),I})})}return p(i,r),i}var xt={_driver:"asyncStorage",_initStorage:gt,_support:M(),iterate:yt,getItem:pt,setItem:bt,removeItem:_t,clear:wt,length:Et,key:St,keys:Tt,dropInstance:It};function Dt(){return typeof openDatabase=="function"}var Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ct="~~local_forage_type~",Be=/^~~local_forage_type~([^~]+)~/,se="__lfsc__:",ye=se.length,be="arbf",_e="blob",Oe="si08",Fe="ui08",Me="uic8",Ue="si16",We="si32",$e="ur16",He="ui32",ze="fl32",Ve="fl64",Ye=ye+be.length,ke=Object.prototype.toString;function Ge(e){var r=e.length*.75,t=e.length,o,i=0,n,a,s,u;e[e.length-1]==="="&&(r--,e[e.length-2]==="="&&r--);var f=new ArrayBuffer(r),c=new Uint8Array(f);for(o=0;o<t;o+=4)n=Q.indexOf(e[o]),a=Q.indexOf(e[o+1]),s=Q.indexOf(e[o+2]),u=Q.indexOf(e[o+3]),c[i++]=n<<2|a>>4,c[i++]=(a&15)<<4|s>>2,c[i++]=(s&3)<<6|u&63;return f}function we(e){var r=new Uint8Array(e),t="",o;for(o=0;o<r.length;o+=3)t+=Q[r[o]>>2],t+=Q[(r[o]&3)<<4|r[o+1]>>4],t+=Q[(r[o+1]&15)<<2|r[o+2]>>6],t+=Q[r[o+2]&63];return r.length%3===2?t=t.substring(0,t.length-1)+"=":r.length%3===1&&(t=t.substring(0,t.length-2)+"=="),t}function At(e,r){var t="";if(e&&(t=ke.call(e)),e&&(t==="[object ArrayBuffer]"||e.buffer&&ke.call(e.buffer)==="[object ArrayBuffer]")){var o,i=se;e instanceof ArrayBuffer?(o=e,i+=be):(o=e.buffer,t==="[object Int8Array]"?i+=Oe:t==="[object Uint8Array]"?i+=Fe:t==="[object Uint8ClampedArray]"?i+=Me:t==="[object Int16Array]"?i+=Ue:t==="[object Uint16Array]"?i+=$e:t==="[object Int32Array]"?i+=We:t==="[object Uint32Array]"?i+=He:t==="[object Float32Array]"?i+=ze:t==="[object Float64Array]"?i+=Ve:r(new Error("Failed to get type for BinaryArray"))),r(i+we(o))}else if(t==="[object Blob]"){var n=new FileReader;n.onload=function(){var a=Ct+e.type+"~"+we(this.result);r(se+_e+a)},n.readAsArrayBuffer(e)}else try{r(JSON.stringify(e))}catch(a){console.error("Couldn't convert value into a JSON string: ",e),r(null,a)}}function Rt(e){if(e.substring(0,ye)!==se)return JSON.parse(e);var r=e.substring(Ye),t=e.substring(ye,Ye),o;if(t===_e&&Be.test(r)){var i=r.match(Be);o=i[1],r=r.substring(i[0].length)}var n=Ge(r);switch(t){case be:return n;case _e:return V([n],{type:o});case Oe:return new Int8Array(n);case Fe:return new Uint8Array(n);case Me:return new Uint8ClampedArray(n);case Ue:return new Int16Array(n);case $e:return new Uint16Array(n);case We:return new Int32Array(n);case He:return new Uint32Array(n);case ze:return new Float32Array(n);case Ve:return new Float64Array(n);default:throw new Error("Unkown type: "+t)}}var Ee={serialize:At,deserialize:Rt,stringToBuffer:Ge,bufferToString:we};function je(e,r,t,o){e.executeSql("CREATE TABLE IF NOT EXISTS "+r.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],t,o)}function Nt(e){var r=this,t={db:null};if(e)for(var o in e)t[o]=typeof e[o]!="string"?e[o].toString():e[o];var i=new h(function(n,a){try{t.db=openDatabase(t.name,String(t.version),t.description,t.size)}catch(s){return a(s)}t.db.transaction(function(s){je(s,t,function(){r._dbInfo=t,n()},function(u,f){a(f)})},a)});return t.serializer=Ee,i}function X(e,r,t,o,i,n){e.executeSql(t,o,i,function(a,s){s.code===s.SYNTAX_ERR?a.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[r.storeName],function(u,f){f.rows.length?n(u,s):je(u,r,function(){u.executeSql(t,o,i,n)},n)},n):n(a,s)},n)}function Lt(e,r){var t=this;e=P(e);var o=new h(function(i,n){t.ready().then(function(){var a=t._dbInfo;a.db.transaction(function(s){X(s,a,"SELECT * FROM "+a.storeName+" WHERE key = ? LIMIT 1",[e],function(u,f){var c=f.rows.length?f.rows.item(0).value:null;c&&(c=a.serializer.deserialize(c)),i(c)},function(u,f){n(f)})})}).catch(n)});return p(o,r),o}function Pt(e,r){var t=this,o=new h(function(i,n){t.ready().then(function(){var a=t._dbInfo;a.db.transaction(function(s){X(s,a,"SELECT * FROM "+a.storeName,[],function(u,f){for(var c=f.rows,v=c.length,b=0;b<v;b++){var I=c.item(b),x=I.value;if(x&&(x=a.serializer.deserialize(x)),x=e(x,I.key,b+1),x!==void 0){i(x);return}}i()},function(u,f){n(f)})})}).catch(n)});return p(o,r),o}function Qe(e,r,t,o){var i=this;e=P(e);var n=new h(function(a,s){i.ready().then(function(){r===void 0&&(r=null);var u=r,f=i._dbInfo;f.serializer.serialize(r,function(c,v){v?s(v):f.db.transaction(function(b){X(b,f,"INSERT OR REPLACE INTO "+f.storeName+" (key, value) VALUES (?, ?)",[e,c],function(){a(u)},function(I,x){s(x)})},function(b){if(b.code===b.QUOTA_ERR){if(o>0){a(Qe.apply(i,[e,u,t,o-1]));return}s(b)}})})}).catch(s)});return p(n,t),n}function Bt(e,r,t){return Qe.apply(this,[e,r,t,1])}function Ot(e,r){var t=this;e=P(e);var o=new h(function(i,n){t.ready().then(function(){var a=t._dbInfo;a.db.transaction(function(s){X(s,a,"DELETE FROM "+a.storeName+" WHERE key = ?",[e],function(){i()},function(u,f){n(f)})})}).catch(n)});return p(o,r),o}function Ft(e){var r=this,t=new h(function(o,i){r.ready().then(function(){var n=r._dbInfo;n.db.transaction(function(a){X(a,n,"DELETE FROM "+n.storeName,[],function(){o()},function(s,u){i(u)})})}).catch(i)});return p(t,e),t}function Mt(e){var r=this,t=new h(function(o,i){r.ready().then(function(){var n=r._dbInfo;n.db.transaction(function(a){X(a,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],function(s,u){var f=u.rows.item(0).c;o(f)},function(s,u){i(u)})})}).catch(i)});return p(t,e),t}function Ut(e,r){var t=this,o=new h(function(i,n){t.ready().then(function(){var a=t._dbInfo;a.db.transaction(function(s){X(s,a,"SELECT key FROM "+a.storeName+" WHERE id = ? LIMIT 1",[e+1],function(u,f){var c=f.rows.length?f.rows.item(0).key:null;i(c)},function(u,f){n(f)})})}).catch(n)});return p(o,r),o}function Wt(e){var r=this,t=new h(function(o,i){r.ready().then(function(){var n=r._dbInfo;n.db.transaction(function(a){X(a,n,"SELECT key FROM "+n.storeName,[],function(s,u){for(var f=[],c=0;c<u.rows.length;c++)f.push(u.rows.item(c).key);o(f)},function(s,u){i(u)})})}).catch(i)});return p(t,e),t}function $t(e){return new h(function(r,t){e.transaction(function(o){o.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(i,n){for(var a=[],s=0;s<n.rows.length;s++)a.push(n.rows.item(s).name);r({db:e,storeNames:a})},function(i,n){t(n)})},function(o){t(o)})})}function Ht(e,r){r=Y.apply(this,arguments);var t=this.config();e=typeof e!="function"&&e||{},e.name||(e.name=e.name||t.name,e.storeName=e.storeName||t.storeName);var o=this,i;return e.name?i=new h(function(n){var a;e.name===t.name?a=o._dbInfo.db:a=openDatabase(e.name,"","",0),e.storeName?n({db:a,storeNames:[e.storeName]}):n($t(a))}).then(function(n){return new h(function(a,s){n.db.transaction(function(u){function f(I){return new h(function(x,L){u.executeSql("DROP TABLE IF EXISTS "+I,[],function(){x()},function(A,z){L(z)})})}for(var c=[],v=0,b=n.storeNames.length;v<b;v++)c.push(f(n.storeNames[v]));h.all(c).then(function(){a()}).catch(function(I){s(I)})},function(u){s(u)})})}):i=h.reject("Invalid arguments"),p(i,r),i}var zt={_driver:"webSQLStorage",_initStorage:Nt,_support:Dt(),iterate:Pt,getItem:Lt,setItem:Bt,removeItem:Ot,clear:Ft,length:Mt,key:Ut,keys:Wt,dropInstance:Ht};function Vt(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function Xe(e,r){var t=e.name+"/";return e.storeName!==r.storeName&&(t+=e.storeName+"/"),t}function Yt(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch{return!0}}function kt(){return!Yt()||localStorage.length>0}function Gt(e){var r=this,t={};if(e)for(var o in e)t[o]=e[o];return t.keyPrefix=Xe(e,r._defaultConfig),kt()?(r._dbInfo=t,t.serializer=Ee,h.resolve()):h.reject()}function jt(e){var r=this,t=r.ready().then(function(){for(var o=r._dbInfo.keyPrefix,i=localStorage.length-1;i>=0;i--){var n=localStorage.key(i);n.indexOf(o)===0&&localStorage.removeItem(n)}});return p(t,e),t}function Qt(e,r){var t=this;e=P(e);var o=t.ready().then(function(){var i=t._dbInfo,n=localStorage.getItem(i.keyPrefix+e);return n&&(n=i.serializer.deserialize(n)),n});return p(o,r),o}function Xt(e,r){var t=this,o=t.ready().then(function(){for(var i=t._dbInfo,n=i.keyPrefix,a=n.length,s=localStorage.length,u=1,f=0;f<s;f++){var c=localStorage.key(f);if(c.indexOf(n)===0){var v=localStorage.getItem(c);if(v&&(v=i.serializer.deserialize(v)),v=e(v,c.substring(a),u++),v!==void 0)return v}}});return p(o,r),o}function qt(e,r){var t=this,o=t.ready().then(function(){var i=t._dbInfo,n;try{n=localStorage.key(e)}catch{n=null}return n&&(n=n.substring(i.keyPrefix.length)),n});return p(o,r),o}function Jt(e){var r=this,t=r.ready().then(function(){for(var o=r._dbInfo,i=localStorage.length,n=[],a=0;a<i;a++){var s=localStorage.key(a);s.indexOf(o.keyPrefix)===0&&n.push(s.substring(o.keyPrefix.length))}return n});return p(t,e),t}function Kt(e){var r=this,t=r.keys().then(function(o){return o.length});return p(t,e),t}function Zt(e,r){var t=this;e=P(e);var o=t.ready().then(function(){var i=t._dbInfo;localStorage.removeItem(i.keyPrefix+e)});return p(o,r),o}function er(e,r,t){var o=this;e=P(e);var i=o.ready().then(function(){r===void 0&&(r=null);var n=r;return new h(function(a,s){var u=o._dbInfo;u.serializer.serialize(r,function(f,c){if(c)s(c);else try{localStorage.setItem(u.keyPrefix+e,f),a(n)}catch(v){(v.name==="QuotaExceededError"||v.name==="NS_ERROR_DOM_QUOTA_REACHED")&&s(v),s(v)}})})});return p(i,t),i}function tr(e,r){if(r=Y.apply(this,arguments),e=typeof e!="function"&&e||{},!e.name){var t=this.config();e.name=e.name||t.name,e.storeName=e.storeName||t.storeName}var o=this,i;return e.name?i=new h(function(n){e.storeName?n(Xe(e,o._defaultConfig)):n(e.name+"/")}).then(function(n){for(var a=localStorage.length-1;a>=0;a--){var s=localStorage.key(a);s.indexOf(n)===0&&localStorage.removeItem(s)}}):i=h.reject("Invalid arguments"),p(i,r),i}var rr={_driver:"localStorageWrapper",_initStorage:Gt,_support:Vt(),iterate:Xt,getItem:Qt,setItem:er,removeItem:Zt,clear:jt,length:Kt,key:qt,keys:Jt,dropInstance:tr},nr=function(r,t){return r===t||typeof r=="number"&&typeof t=="number"&&isNaN(r)&&isNaN(t)},or=function(r,t){for(var o=r.length,i=0;i<o;){if(nr(r[i],t))return!0;i++}return!1},qe=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"},te={},Je={},K={INDEXEDDB:xt,WEBSQL:zt,LOCALSTORAGE:rr},ir=[K.INDEXEDDB._driver,K.WEBSQL._driver,K.LOCALSTORAGE._driver],ue=["dropInstance"],Se=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ue),ar={description:"",driver:ir.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function sr(e,r){e[r]=function(){var t=arguments;return e.ready().then(function(){return e[r].apply(e,t)})}}function Te(){for(var e=1;e<arguments.length;e++){var r=arguments[e];if(r)for(var t in r)r.hasOwnProperty(t)&&(qe(r[t])?arguments[0][t]=r[t].slice():arguments[0][t]=r[t])}return arguments[0]}var ur=(function(){function e(r){C(this,e);for(var t in K)if(K.hasOwnProperty(t)){var o=K[t],i=o._driver;this[t]=i,te[i]||this.defineDriver(o)}this._defaultConfig=Te({},ar),this._config=Te({},this._defaultConfig,r),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return e.prototype.config=function(t){if((typeof t>"u"?"undefined":S(t))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var o in t){if(o==="storeName"&&(t[o]=t[o].replace(/\W/g,"_")),o==="version"&&typeof t[o]!="number")return new Error("Database version must be a number.");this._config[o]=t[o]}return"driver"in t&&t.driver?this.setDriver(this._config.driver):!0}else return typeof t=="string"?this._config[t]:this._config},e.prototype.defineDriver=function(t,o,i){var n=new h(function(a,s){try{var u=t._driver,f=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!t._driver){s(f);return}for(var c=Se.concat("_initStorage"),v=0,b=c.length;v<b;v++){var I=c[v],x=!or(ue,I);if((x||t[I])&&typeof t[I]!="function"){s(f);return}}var L=function(){for(var re=function(lr){return function(){var dr=new Error("Method "+lr+" is not implemented by the current driver"),Ke=h.reject(dr);return p(Ke,arguments[arguments.length-1]),Ke}},Ie=0,cr=ue.length;Ie<cr;Ie++){var xe=ue[Ie];t[xe]||(t[xe]=re(xe))}};L();var A=function(re){te[u]&&console.info("Redefining LocalForage driver: "+u),te[u]=t,Je[u]=re,a()};"_support"in t?t._support&&typeof t._support=="function"?t._support().then(A,s):A(!!t._support):A(!0)}catch(z){s(z)}});return N(n,o,i),n},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(t,o,i){var n=te[t]?h.resolve(te[t]):h.reject(new Error("Driver not found."));return N(n,o,i),n},e.prototype.getSerializer=function(t){var o=h.resolve(Ee);return N(o,t),o},e.prototype.ready=function(t){var o=this,i=o._driverSet.then(function(){return o._ready===null&&(o._ready=o._initDriver()),o._ready});return N(i,t,t),i},e.prototype.setDriver=function(t,o,i){var n=this;qe(t)||(t=[t]);var a=this._getSupportedDrivers(t);function s(){n._config.driver=n.driver()}function u(v){return n._extend(v),s(),n._ready=n._initStorage(n._config),n._ready}function f(v){return function(){var b=0;function I(){for(;b<v.length;){var x=v[b];return b++,n._dbInfo=null,n._ready=null,n.getDriver(x).then(u).catch(I)}s();var L=new Error("No available storage method found.");return n._driverSet=h.reject(L),n._driverSet}return I()}}var c=this._driverSet!==null?this._driverSet.catch(function(){return h.resolve()}):h.resolve();return this._driverSet=c.then(function(){var v=a[0];return n._dbInfo=null,n._ready=null,n.getDriver(v).then(function(b){n._driver=b._driver,s(),n._wrapLibraryMethodsWithReady(),n._initDriver=f(a)})}).catch(function(){s();var v=new Error("No available storage method found.");return n._driverSet=h.reject(v),n._driverSet}),N(this._driverSet,o,i),this._driverSet},e.prototype.supports=function(t){return!!Je[t]},e.prototype._extend=function(t){Te(this,t)},e.prototype._getSupportedDrivers=function(t){for(var o=[],i=0,n=t.length;i<n;i++){var a=t[i];this.supports(a)&&o.push(a)}return o},e.prototype._wrapLibraryMethodsWithReady=function(){for(var t=0,o=Se.length;t<o;t++)sr(this,Se[t])},e.prototype.createInstance=function(t){return new e(t)},e})(),fr=new ur;y.exports=fr},{3:3}]},{},[4])(4)})});var Ae=hr(it());function le(m){return Ae.default.createInstance({name:"lc",storeName:m,driver:Ae.default.LOCALSTORAGE})}var Z=class{static storage;static async get(l,w){return await this.storage?.getItem(l)??w}static set(l,w){return this.storage?.setItem(l,w)}static remove(l){return this.storage?.removeItem(l)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}};var oe=class oe extends Z{};fe(oe,"storeName","usr"),oe.storage=le(oe.storeName);var Re=oe;var de=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;widgetCustomisation;currency;static get(){return window.CooeeSDK.config}update(l){return l??={},this.gaEnabled=l.gaEnabled,this.gaMeasurementID=l.gaMeasurementID,this.pixelPush=l.pixelPush,this.website=l.website??{},this.currencyCount=l.currencyCount??0,this.money=l.money,this.currency=l.currency,this.storefrontToken=l.storefrontToken,this.skipItemAttribute=l.skipItemAttribute,this.widgetCustomisation=l.widgetCustomisation,this}};var ie=class ie extends Z{};fe(ie,"storeName","ses"),ie.storage=le(ie.storeName);var Ne=ie;var at={},st,me,vr,ft,ut;async function gr(){if(!me)return ut??=pr(),ut}async function pr(){let{BrowserClient:m,Scope:l,defaultStackParser:w,getDefaultIntegrations:g,makeFetchTransport:y}=await import("./esm-EYV26LOR.js");ft=l;let R=g({}).filter(S=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(S.name));me=new m({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:y,stackParser:w,integrations:R,environment:De.mode,release:`web-sdk@${rt}`,debug:De.debug,sampleRate:.5}),me.init()}function ct(m,l,w){ce.error(`${l}:`,m),gr().then(()=>{let g=_r(w);if(g.setTag("operation",l),m instanceof nt){yr(g,m,l);return}g.captureException(m)})}function yr(m,l,w){if(br(m,l),l.response){let g=l.response,y=l.responseText;m.setTag("error.message",l.message),g.status!=null&&m.setTag("http.status_code",g.status),g.statusText&&m.setTag("http.status_text",g.statusText),y&&typeof y=="object"&&"error"in y&&(m.setTag("http.error_code",y.error.code),m.setTag("http.error_message",y.error.message)),m.setExtras({responseText:l.responseText,statusText:g.statusText,responseType:g.type,redirected:g.redirected,responseUrl:g.url,originalError:l.message}),m.captureMessage(`${w} failed with ${g.status}`,"error");return}if(l.request){m.captureMessage(`No response was received for ${w}`,"error");return}}function br(m,l){let w=l.request;if(!w)return;m.setExtras({body:l.requestBody,headers:w.headers,method:w.method,url:w.url});let g=w.headers?.get("Cooee-Retry-Attempt");g!==null&&m.setTag("retry.attempt",g)}function _r(m){m??={};let{extra:l,tags:w}=m,g=new ft;if(g.setClient(me),g.setUser(vr),m.triggerContext&&!m.engagementTrigger&&(m.engagementTrigger=m.triggerContext.triggerData),m.engagementTrigger){let y=m.engagementTrigger;g.setTags({"engagement.id":y.engagementID,"engagement.short_id":y.shortID,"engagement.objective":y.objective,"engagement.delivery_type":y.onsiteDeliveryType,"engagement.content_id":y.contentID,"engagement.variation":y.variation,"engagement.currency":y.currency})}return l&&g.setExtras(l),w&&g.setTags(w),st&&g.setTags(st),Object.keys(at).forEach(y=>{g.setContext(y,at[y])}),g.setTag("language",navigator.language),g.setTag("timezone",lt()),wr(g),g}function wr(m){window.Shopify&&(m.setTag("shopify.shop",window.Shopify.shop),m.setTag("shopify.currency",window.Shopify.currency?.active),m.setTag("shopify.locale",window.Shopify.locale),m.setTag("theme.schema_name",window.Shopify.theme?.schema_name),m.setTag("theme.schema_version",window.Shopify.theme?.schema_version))}var he=class{static format(l,w){let g=/{{\s*(\w+)\s*}}/;return w.replace(g,(y,R)=>{switch(R){case"amount":return this.formatWithDelimiters(l,2);case"amount_no_decimals":return this.formatWithDelimiters(l,0);case"amount_with_comma_separator":return this.formatWithDelimiters(l,2,".",",");case"amount_no_decimals_with_comma_separator":return this.formatWithDelimiters(l,0,".",",");case"amount_with_apostrophe_separator":return this.formatWithDelimiters(l,2,"'",".");case"amount_no_decimals_with_space_separator":return this.formatWithDelimiters(l,0," ");case"amount_with_space_separator":return this.formatWithDelimiters(l,2," ",",");case"amount_with_period_and_space_separator":return this.formatWithDelimiters(l,2," ",".");default:return y}})}static formatWithDelimiters(l,w=2,g=",",y="."){if(isNaN(l)||l==null)return"0";let S=(l/100).toFixed(w).split("."),C=S[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+g),E=S[1]?y+S[1]:"";return C+E}};function dt(){return window.CooeeSDK.runtimeData}function rn(m,l,w){return{[m]:Er(l,w),[m+"_wo_currency"]:l}}function Er(m,l){if(m==0&&l)return"Free";let w=dt(),g=de.get(),y=w.shopCurrencyCode||g.currency,R=w.currencyCode;R||ce.warn("Currency code is not set in RuntimeData");let S=g.money?.format??w.moneyFormat,C;if(S&&y===R)C=he.format(m*100,S);else{let E;try{E=new Intl.NumberFormat(Sr(),{style:"currency",currency:R||y,minimumFractionDigits:0,maximumFractionDigits:2})}catch(O){return ct(O,"format-currency",{extra:{currentCurrency:R,shopCurrency:y}}),""}C=E.format(m),C=C.replace("\u20B9","Rs. "),g.money?.showCurrency&&R!=="INR"&&(C=C.concat(` ${R}`))}return C}function Sr(){let m="en";return typeof navigator<"u"&&(navigator.languages!==void 0&&navigator.languages.length>0?m=navigator.languages[0]:navigator.language&&(m=navigator.language)),m=m.split(";")[0],m=m.split("-")[0],m||"en"}var ve;function lt(){if(ve)return ve;try{return ve=Intl.DateTimeFormat().resolvedOptions().timeZone,ve}catch{return""}}function nn(m){let l=document.createElement("span");l.id="snackbar",l.innerText=m,document.body.appendChild(l),l.className="show",setTimeout(()=>{l.classList.remove("show"),document.body.removeChild(l)},5e3)}var mt=class m{sanitizer=Ze(tt);transform(l){return l?this.sanitizer.bypassSecurityTrustHtml(l):""}static \u0275fac=function(w){return new(w||m)};static \u0275pipe=et({name:"safeHtml",type:m,pure:!0})};function mn(){return window.CooeeSDK?.uaParser.getDevice().type==="mobile"}var hn=()=>typeof navigator<"u"&&"share"in navigator;export{de as a,Re as b,ct as c,rn as d,Er as e,nn as f,mt as g,mn as h,hn as i};
|