@letscooee/web-sdk 11.2.1 → 11.3.0
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-32IK45BI.js → chunk-BULX73XB.js} +1 -1
- package/dist/{chunk-WRON7UOR.js → chunk-CWSTRQ3P.js} +3 -3
- package/dist/{chunk-NQMQZQTJ.js → chunk-D6OCJBIM.js} +1 -1
- package/dist/main.min.js +17 -17
- package/dist/{share-dialog.component-6ZT5Z2R2.js → share-dialog.component-S3BOCRPO.js} +1 -1
- package/dist/{video-detail-dialog.component-64NTQ4F4.js → video-detail-dialog.component-W6V3MMNG.js} +1 -1
- package/dist/widget.min.js +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{a as Us,b as zt,c as he,e as Sn,f as er,g as Bs,h as Hs,l as nr}from"./chunk-32IK45BI.js";import{a as tr}from"./chunk-74XS3G6Q.js";import{$ as fi,$a as pi,Aa as gt,Ba as ke,Ca as vn,Da as B,E as Ht,Ea as Os,Fa as Rs,I as gn,K as Dt,L as mt,La as rt,Na as yn,O as N,Oa as Xn,Pa as Jn,Qa as ee,Ra as _t,Sa as Wt,Wa as je,X as Ee,Xa as We,Y as di,Ya as be,Za as Ms,_ as Ds,_a as Ps,ab as Qn,ba as ht,bb as Zn,ca as _n,cb as Ue,db as Be,fb as En,ga as Gt,ha as Q,hb as wt,ia as Z,ib as At,jb as vt,ka as $t,kb as Se,la as jt,ma as oe,mb as bn,na as W,oa as z,pa as Me,qa as pe,ra as ge,s as ui,sa as tt,sb as Ls,t as li,tb as Fs,u as xs,ub as Vs,v as Re,va as nt,wa as ws,wb as ks,x as Ie,xa as As,y as Te,ya as Ns,za as $e}from"./chunk-KHVPWQ5E.js";import{a as _,b as F,c as hn,d as Ts,e as Al,f as Nl,g as Kn}from"./chunk-V7UGKYBN.js";var Xs=Al((Ks,gi)=>{"use strict";(function(e){if(typeof Ks=="object"&&typeof gi<"u")gi.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 u(y,p){if(!o[y]){if(!i[y]){var E=typeof hn=="function"&&hn;if(!p&&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 A=o[y]={exports:{}};i[y][0].call(A.exports,function(U){var M=i[y][1][U];return u(M||U)},A,A.exports,r,i,o,s)}return o[y].exports}for(var l=typeof hn=="function"&&hn,h=0;h<s.length;h++)u(s[h]);return u})({1:[function(r,i,o){(function(s){"use strict";var u=s.MutationObserver||s.WebKitMutationObserver,l;if(u){var h=0,y=new u(U),p=s.document.createTextNode("");y.observe(p,{characterData:!0}),l=function(){p.data=h=++h%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var E=new s.MessageChannel;E.port1.onmessage=U,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(){U(),O.onreadystatechange=null,O.parentNode.removeChild(O),O=null},s.document.documentElement.appendChild(O)}:l=function(){setTimeout(U,0)};var v,A=[];function U(){v=!0;for(var O,V,X=A.length;X;){for(V=A,A=[],O=-1;++O<X;)V[O]();X=A.length}v=!1}i.exports=M;function M(O){A.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 u(){}var l={},h=["REJECTED"],y=["FULFILLED"],p=["PENDING"];i.exports=E;function E(x){if(typeof x!="function")throw new TypeError("resolver must be a function");this.state=p,this.queue=[],this.outcome=void 0,x!==u&&M(this,x)}E.prototype.catch=function(x){return this.then(null,x)},E.prototype.then=function(x,H){if(typeof x!="function"&&this.state===y||typeof H!="function"&&this.state===h)return this;var L=new this.constructor(u);if(this.state!==p){var G=this.state===y?x:H;A(L,G,this.outcome)}else this.queue.push(new v(L,x,H));return L};function v(x,H,L){this.promise=x,typeof H=="function"&&(this.onFulfilled=H,this.callFulfilled=this.otherCallFulfilled),typeof L=="function"&&(this.onRejected=L,this.callRejected=this.otherCallRejected)}v.prototype.callFulfilled=function(x){l.resolve(this.promise,x)},v.prototype.otherCallFulfilled=function(x){A(this.promise,this.onFulfilled,x)},v.prototype.callRejected=function(x){l.reject(this.promise,x)},v.prototype.otherCallRejected=function(x){A(this.promise,this.onRejected,x)};function A(x,H,L){s(function(){var G;try{G=H(L)}catch(ne){return l.reject(x,ne)}G===x?l.reject(x,new TypeError("Cannot resolve promise with itself")):l.resolve(x,G)})}l.resolve=function(x,H){var L=O(U,H);if(L.status==="error")return l.reject(x,L.value);var G=L.value;if(G)M(x,G);else{x.state=y,x.outcome=H;for(var ne=-1,J=x.queue.length;++ne<J;)x.queue[ne].callFulfilled(H)}return x},l.reject=function(x,H){x.state=h,x.outcome=H;for(var L=-1,G=x.queue.length;++L<G;)x.queue[L].callRejected(H);return x};function U(x){var H=x&&x.then;if(x&&(typeof x=="object"||typeof x=="function")&&typeof H=="function")return function(){H.apply(x,arguments)}}function M(x,H){var L=!1;function G(Ne){L||(L=!0,l.reject(x,Ne))}function ne(Ne){L||(L=!0,l.resolve(x,Ne))}function J(){H(ne,G)}var de=O(J);de.status==="error"&&G(de.value)}function O(x,H){var L={};try{L.value=x(H),L.status="success"}catch(G){L.status="error",L.value=G}return L}E.resolve=V;function V(x){return x instanceof this?x:l.resolve(new this(u),x)}E.reject=X;function X(x){var H=new this(u);return l.reject(H,x)}E.all=we;function we(x){var H=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var L=x.length,G=!1;if(!L)return this.resolve([]);for(var ne=new Array(L),J=0,de=-1,Ne=new this(u);++de<L;)Ze(x[de],de);return Ne;function Ze(fn,zn){H.resolve(fn).then(Zr,function(Ut){G||(G=!0,l.reject(Ne,Ut))});function Zr(Ut){ne[zn]=Ut,++J===L&&!G&&(G=!0,l.resolve(Ne,ne))}}}E.race=Ae;function Ae(x){var H=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var L=x.length,G=!1;if(!L)return this.resolve([]);for(var ne=-1,J=new this(u);++ne<L;)de(x[ne]);return J;function de(Ne){H.resolve(Ne).then(function(Ze){G||(G=!0,l.resolve(J,Ze))},function(Ze){G||(G=!0,l.reject(J,Ze))})}}},{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 u(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 p(a,d){a=a||[],d=d||{};try{return new Blob(a,d)}catch(f){if(f.name!=="TypeError")throw f;for(var c=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,m=new c,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(c){d(null,c)},function(c){d(c)})}function A(a,d,c){typeof d=="function"&&a.then(d),typeof c=="function"&&a.catch(c)}function U(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",V=void 0,X={},we=Object.prototype.toString,Ae="readonly",x="readwrite";function H(a){for(var d=a.length,c=new ArrayBuffer(d),m=new Uint8Array(c),g=0;g<d;g++)m[g]=a.charCodeAt(g);return c}function L(a){return new E(function(d){var c=a.transaction(O,x),m=p([""]);c.objectStore(O).put(m,"key"),c.onabort=function(g){g.preventDefault(),g.stopPropagation(),d(!1)},c.oncomplete=function(){var g=navigator.userAgent.match(/Chrome\/(\d+)/),f=navigator.userAgent.match(/Edge\//);d(f||!g||parseInt(g[1],10)>=43)}}).catch(function(){return!1})}function G(a){return typeof V=="boolean"?E.resolve(V):L(a).then(function(d){return V=d,V})}function ne(a){var d=X[a.name],c={};c.promise=new E(function(m,g){c.resolve=m,c.reject=g}),d.deferredOperations.push(c),d.dbReady?d.dbReady=d.dbReady.then(function(){return c.promise}):d.dbReady=c.promise}function J(a){var d=X[a.name],c=d.deferredOperations.pop();if(c)return c.resolve(),c.promise}function de(a,d){var c=X[a.name],m=c.deferredOperations.pop();if(m)return m.reject(d),m.promise}function Ne(a,d){return new E(function(c,m){if(X[a.name]=X[a.name]||os(),a.db)if(d)ne(a),a.db.close();else return c(a.db);var g=[a.name];d&&g.push(a.version);var f=h.open.apply(h,g);d&&(f.onupgradeneeded=function(b){var S=f.result;try{S.createObjectStore(a.storeName),b.oldVersion<=1&&S.createObjectStore(O)}catch(C){if(C.name==="ConstraintError")console.warn('The database "'+a.name+'" has been upgraded from version '+b.oldVersion+" to version "+b.newVersion+', but the storage "'+a.storeName+'" already exists.');else throw C}}),f.onerror=function(b){b.preventDefault(),m(f.error)},f.onsuccess=function(){var b=f.result;b.onversionchange=function(S){S.target.close()},c(b),J(a)}})}function Ze(a){return Ne(a,!1)}function fn(a){return Ne(a,!0)}function zn(a,d){if(!a.db)return!0;var c=!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||c){if(c){var f=a.db.version+1;f>a.version&&(a.version=f)}return!0}return!1}function Zr(a){return new E(function(d,c){var m=new FileReader;m.onerror=c,m.onloadend=function(g){var f=btoa(g.target.result||"");d({__local_forage_encoded_blob:!0,data:f,type:a.type})},m.readAsBinaryString(a)})}function Ut(a){var d=H(atob(a.data));return p([d],{type:a.type})}function is(a){return a&&a.__local_forage_encoded_blob}function Nu(a){var d=this,c=d._initReady().then(function(){var m=X[d._dbInfo.name];if(m&&m.dbReady)return m.dbReady});return A(c,a,a),c}function Ou(a){ne(a);for(var d=X[a.name],c=d.forages,m=0;m<c.length;m++){var g=c[m];g._dbInfo.db&&(g._dbInfo.db.close(),g._dbInfo.db=null)}return a.db=null,Ze(a).then(function(f){return a.db=f,zn(a)?fn(a):f}).then(function(f){a.db=d.db=f;for(var b=0;b<c.length;b++)c[b]._dbInfo.db=f}).catch(function(f){throw de(a,f),f})}function et(a,d,c,m){m===void 0&&(m=1);try{var g=a.db.transaction(a.storeName,d);c(null,g)}catch(f){if(m>0&&(!a.db||f.name==="InvalidStateError"||f.name==="NotFoundError"))return E.resolve().then(function(){if(!a.db||f.name==="NotFoundError"&&!a.db.objectStoreNames.contains(a.storeName)&&a.version<=a.db.version)return a.db&&(a.version=a.db.version+1),fn(a)}).then(function(){return Ou(a).then(function(){et(a,d,c,m-1)})}).catch(c);c(f)}}function os(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Ru(a){var d=this,c={db:null};if(a)for(var m in a)c[m]=a[m];var g=X[c.name];g||(g=os(),X[c.name]=g),g.forages.push(d),d._initReady||(d._initReady=d.ready,d.ready=Nu);var f=[];function b(){return E.resolve()}for(var S=0;S<g.forages.length;S++){var C=g.forages[S];C!==d&&f.push(C._initReady().catch(b))}var I=g.forages.slice(0);return E.all(f).then(function(){return c.db=g.db,Ze(c)}).then(function(T){return c.db=T,zn(c,d._defaultConfig.version)?fn(c):T}).then(function(T){c.db=g.db=T,d._dbInfo=c;for(var w=0;w<I.length;w++){var k=I[w];k!==d&&(k._dbInfo.db=c.db,k._dbInfo.version=c.version)}})}function Mu(a,d){var c=this;a=U(a);var m=new E(function(g,f){c.ready().then(function(){et(c._dbInfo,Ae,function(b,S){if(b)return f(b);try{var C=S.objectStore(c._dbInfo.storeName),I=C.get(a);I.onsuccess=function(){var T=I.result;T===void 0&&(T=null),is(T)&&(T=Ut(T)),g(T)},I.onerror=function(){f(I.error)}}catch(T){f(T)}})}).catch(f)});return v(m,d),m}function Pu(a,d){var c=this,m=new E(function(g,f){c.ready().then(function(){et(c._dbInfo,Ae,function(b,S){if(b)return f(b);try{var C=S.objectStore(c._dbInfo.storeName),I=C.openCursor(),T=1;I.onsuccess=function(){var w=I.result;if(w){var k=w.value;is(k)&&(k=Ut(k));var $=a(k,w.key,T++);$!==void 0?g($):w.continue()}else g()},I.onerror=function(){f(I.error)}}catch(w){f(w)}})}).catch(f)});return v(m,d),m}function Lu(a,d,c){var m=this;a=U(a);var g=new E(function(f,b){var S;m.ready().then(function(){return S=m._dbInfo,we.call(d)==="[object Blob]"?G(S.db).then(function(C){return C?d:Zr(d)}):d}).then(function(C){et(m._dbInfo,x,function(I,T){if(I)return b(I);try{var w=T.objectStore(m._dbInfo.storeName);C===null&&(C=void 0);var k=w.put(C,a);T.oncomplete=function(){C===void 0&&(C=null),f(C)},T.onabort=T.onerror=function(){var $=k.error?k.error:k.transaction.error;b($)}}catch($){b($)}})}).catch(b)});return v(g,c),g}function Fu(a,d){var c=this;a=U(a);var m=new E(function(g,f){c.ready().then(function(){et(c._dbInfo,x,function(b,S){if(b)return f(b);try{var C=S.objectStore(c._dbInfo.storeName),I=C.delete(a);S.oncomplete=function(){g()},S.onerror=function(){f(I.error)},S.onabort=function(){var T=I.error?I.error:I.transaction.error;f(T)}}catch(T){f(T)}})}).catch(f)});return v(m,d),m}function Vu(a){var d=this,c=new E(function(m,g){d.ready().then(function(){et(d._dbInfo,x,function(f,b){if(f)return g(f);try{var S=b.objectStore(d._dbInfo.storeName),C=S.clear();b.oncomplete=function(){m()},b.onabort=b.onerror=function(){var I=C.error?C.error:C.transaction.error;g(I)}}catch(I){g(I)}})}).catch(g)});return v(c,a),c}function ku(a){var d=this,c=new E(function(m,g){d.ready().then(function(){et(d._dbInfo,Ae,function(f,b){if(f)return g(f);try{var S=b.objectStore(d._dbInfo.storeName),C=S.count();C.onsuccess=function(){m(C.result)},C.onerror=function(){g(C.error)}}catch(I){g(I)}})}).catch(g)});return v(c,a),c}function Uu(a,d){var c=this,m=new E(function(g,f){if(a<0){g(null);return}c.ready().then(function(){et(c._dbInfo,Ae,function(b,S){if(b)return f(b);try{var C=S.objectStore(c._dbInfo.storeName),I=!1,T=C.openKeyCursor();T.onsuccess=function(){var w=T.result;if(!w){g(null);return}a===0||I?g(w.key):(I=!0,w.advance(a))},T.onerror=function(){f(T.error)}}catch(w){f(w)}})}).catch(f)});return v(m,d),m}function Bu(a){var d=this,c=new E(function(m,g){d.ready().then(function(){et(d._dbInfo,Ae,function(f,b){if(f)return g(f);try{var S=b.objectStore(d._dbInfo.storeName),C=S.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(c,a),c}function Hu(a,d){d=M.apply(this,arguments);var c=this.config();a=typeof a!="function"&&a||{},a.name||(a.name=a.name||c.name,a.storeName=a.storeName||c.storeName);var m=this,g;if(!a.name)g=E.reject("Invalid arguments");else{var f=a.name===c.name&&m._dbInfo.db,b=f?E.resolve(m._dbInfo.db):Ze(a).then(function(S){var C=X[a.name],I=C.forages;C.db=S;for(var T=0;T<I.length;T++)I[T]._dbInfo.db=S;return S});a.storeName?g=b.then(function(S){if(S.objectStoreNames.contains(a.storeName)){var C=S.version+1;ne(a);var I=X[a.name],T=I.forages;S.close();for(var w=0;w<T.length;w++){var k=T[w];k._dbInfo.db=null,k._dbInfo.version=C}var $=new E(function(j,ie){var re=h.open(a.name,C);re.onerror=function(Oe){var mn=re.result;mn.close(),ie(Oe)},re.onupgradeneeded=function(){var Oe=re.result;Oe.deleteObjectStore(a.storeName)},re.onsuccess=function(){var Oe=re.result;Oe.close(),j(Oe)}});return $.then(function(j){I.db=j;for(var ie=0;ie<T.length;ie++){var re=T[ie];re._dbInfo.db=j,J(re._dbInfo)}}).catch(function(j){throw(de(a,j)||E.resolve()).catch(function(){}),j})}}):g=b.then(function(S){ne(a);var C=X[a.name],I=C.forages;S.close();for(var T=0;T<I.length;T++){var w=I[T];w._dbInfo.db=null}var k=new E(function($,j){var ie=h.deleteDatabase(a.name);ie.onerror=function(){var re=ie.result;re&&re.close(),j(ie.error)},ie.onblocked=function(){console.warn('dropInstance blocked for database "'+a.name+'" until all open connections are closed')},ie.onsuccess=function(){var re=ie.result;re&&re.close(),$(re)}});return k.then(function($){C.db=$;for(var j=0;j<I.length;j++){var ie=I[j];J(ie._dbInfo)}}).catch(function($){throw(de(a,$)||E.resolve()).catch(function(){}),$})})}return v(g,d),g}var Gu={_driver:"asyncStorage",_initStorage:Ru,_support:y(),iterate:Pu,getItem:Mu,setItem:Lu,removeItem:Fu,clear:Vu,length:ku,key:Uu,keys:Bu,dropInstance:Hu};function $u(){return typeof openDatabase=="function"}var ft="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ju="~~local_forage_type~",ss=/^~~local_forage_type~([^~]+)~/,Yn="__lfsc__:",ei=Yn.length,ti="arbf",ni="blob",as="si08",cs="ui08",us="uic8",ls="si16",ds="si32",fs="ur16",ps="ui32",ms="fl32",hs="fl64",gs=ei+ti.length,_s=Object.prototype.toString;function vs(a){var d=a.length*.75,c=a.length,m,g=0,f,b,S,C;a[a.length-1]==="="&&(d--,a[a.length-2]==="="&&d--);var I=new ArrayBuffer(d),T=new Uint8Array(I);for(m=0;m<c;m+=4)f=ft.indexOf(a[m]),b=ft.indexOf(a[m+1]),S=ft.indexOf(a[m+2]),C=ft.indexOf(a[m+3]),T[g++]=f<<2|b>>4,T[g++]=(b&15)<<4|S>>2,T[g++]=(S&3)<<6|C&63;return I}function ri(a){var d=new Uint8Array(a),c="",m;for(m=0;m<d.length;m+=3)c+=ft[d[m]>>2],c+=ft[(d[m]&3)<<4|d[m+1]>>4],c+=ft[(d[m+1]&15)<<2|d[m+2]>>6],c+=ft[d[m+2]&63];return d.length%3===2?c=c.substring(0,c.length-1)+"=":d.length%3===1&&(c=c.substring(0,c.length-2)+"=="),c}function Wu(a,d){var c="";if(a&&(c=_s.call(a)),a&&(c==="[object ArrayBuffer]"||a.buffer&&_s.call(a.buffer)==="[object ArrayBuffer]")){var m,g=Yn;a instanceof ArrayBuffer?(m=a,g+=ti):(m=a.buffer,c==="[object Int8Array]"?g+=as:c==="[object Uint8Array]"?g+=cs:c==="[object Uint8ClampedArray]"?g+=us:c==="[object Int16Array]"?g+=ls:c==="[object Uint16Array]"?g+=fs:c==="[object Int32Array]"?g+=ds:c==="[object Uint32Array]"?g+=ps:c==="[object Float32Array]"?g+=ms:c==="[object Float64Array]"?g+=hs:d(new Error("Failed to get type for BinaryArray"))),d(g+ri(m))}else if(c==="[object Blob]"){var f=new FileReader;f.onload=function(){var b=ju+a.type+"~"+ri(this.result);d(Yn+ni+b)},f.readAsArrayBuffer(a)}else try{d(JSON.stringify(a))}catch(b){console.error("Couldn't convert value into a JSON string: ",a),d(null,b)}}function zu(a){if(a.substring(0,ei)!==Yn)return JSON.parse(a);var d=a.substring(gs),c=a.substring(ei,gs),m;if(c===ni&&ss.test(d)){var g=d.match(ss);m=g[1],d=d.substring(g[0].length)}var f=vs(d);switch(c){case ti:return f;case ni:return p([f],{type:m});case as:return new Int8Array(f);case cs:return new Uint8Array(f);case us:return new Uint8ClampedArray(f);case ls:return new Int16Array(f);case fs:return new Uint16Array(f);case ds:return new Int32Array(f);case ps:return new Uint32Array(f);case ms:return new Float32Array(f);case hs:return new Float64Array(f);default:throw new Error("Unkown type: "+c)}}var ii={serialize:Wu,deserialize:zu,stringToBuffer:vs,bufferToString:ri};function ys(a,d,c,m){a.executeSql("CREATE TABLE IF NOT EXISTS "+d.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],c,m)}function Yu(a){var d=this,c={db:null};if(a)for(var m in a)c[m]=typeof a[m]!="string"?a[m].toString():a[m];var g=new E(function(f,b){try{c.db=openDatabase(c.name,String(c.version),c.description,c.size)}catch(S){return b(S)}c.db.transaction(function(S){ys(S,c,function(){d._dbInfo=c,f()},function(C,I){b(I)})},b)});return c.serializer=ii,g}function pt(a,d,c,m,g,f){a.executeSql(c,m,g,function(b,S){S.code===S.SYNTAX_ERR?b.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[d.storeName],function(C,I){I.rows.length?f(C,S):ys(C,d,function(){C.executeSql(c,m,g,f)},f)},f):f(b,S)},f)}function qu(a,d){var c=this;a=U(a);var m=new E(function(g,f){c.ready().then(function(){var b=c._dbInfo;b.db.transaction(function(S){pt(S,b,"SELECT * FROM "+b.storeName+" WHERE key = ? LIMIT 1",[a],function(C,I){var T=I.rows.length?I.rows.item(0).value:null;T&&(T=b.serializer.deserialize(T)),g(T)},function(C,I){f(I)})})}).catch(f)});return v(m,d),m}function Ku(a,d){var c=this,m=new E(function(g,f){c.ready().then(function(){var b=c._dbInfo;b.db.transaction(function(S){pt(S,b,"SELECT * FROM "+b.storeName,[],function(C,I){for(var T=I.rows,w=T.length,k=0;k<w;k++){var $=T.item(k),j=$.value;if(j&&(j=b.serializer.deserialize(j)),j=a(j,$.key,k+1),j!==void 0){g(j);return}}g()},function(C,I){f(I)})})}).catch(f)});return v(m,d),m}function Es(a,d,c,m){var g=this;a=U(a);var f=new E(function(b,S){g.ready().then(function(){d===void 0&&(d=null);var C=d,I=g._dbInfo;I.serializer.serialize(d,function(T,w){w?S(w):I.db.transaction(function(k){pt(k,I,"INSERT OR REPLACE INTO "+I.storeName+" (key, value) VALUES (?, ?)",[a,T],function(){b(C)},function($,j){S(j)})},function(k){if(k.code===k.QUOTA_ERR){if(m>0){b(Es.apply(g,[a,C,c,m-1]));return}S(k)}})})}).catch(S)});return v(f,c),f}function Xu(a,d,c){return Es.apply(this,[a,d,c,1])}function Ju(a,d){var c=this;a=U(a);var m=new E(function(g,f){c.ready().then(function(){var b=c._dbInfo;b.db.transaction(function(S){pt(S,b,"DELETE FROM "+b.storeName+" WHERE key = ?",[a],function(){g()},function(C,I){f(I)})})}).catch(f)});return v(m,d),m}function Qu(a){var d=this,c=new E(function(m,g){d.ready().then(function(){var f=d._dbInfo;f.db.transaction(function(b){pt(b,f,"DELETE FROM "+f.storeName,[],function(){m()},function(S,C){g(C)})})}).catch(g)});return v(c,a),c}function Zu(a){var d=this,c=new E(function(m,g){d.ready().then(function(){var f=d._dbInfo;f.db.transaction(function(b){pt(b,f,"SELECT COUNT(key) as c FROM "+f.storeName,[],function(S,C){var I=C.rows.item(0).c;m(I)},function(S,C){g(C)})})}).catch(g)});return v(c,a),c}function el(a,d){var c=this,m=new E(function(g,f){c.ready().then(function(){var b=c._dbInfo;b.db.transaction(function(S){pt(S,b,"SELECT key FROM "+b.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){f(I)})})}).catch(f)});return v(m,d),m}function tl(a){var d=this,c=new E(function(m,g){d.ready().then(function(){var f=d._dbInfo;f.db.transaction(function(b){pt(b,f,"SELECT key FROM "+f.storeName,[],function(S,C){for(var I=[],T=0;T<C.rows.length;T++)I.push(C.rows.item(T).key);m(I)},function(S,C){g(C)})})}).catch(g)});return v(c,a),c}function nl(a){return new E(function(d,c){a.transaction(function(m){m.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(g,f){for(var b=[],S=0;S<f.rows.length;S++)b.push(f.rows.item(S).name);d({db:a,storeNames:b})},function(g,f){c(f)})},function(m){c(m)})})}function rl(a,d){d=M.apply(this,arguments);var c=this.config();a=typeof a!="function"&&a||{},a.name||(a.name=a.name||c.name,a.storeName=a.storeName||c.storeName);var m=this,g;return a.name?g=new E(function(f){var b;a.name===c.name?b=m._dbInfo.db:b=openDatabase(a.name,"","",0),a.storeName?f({db:b,storeNames:[a.storeName]}):f(nl(b))}).then(function(f){return new E(function(b,S){f.db.transaction(function(C){function I($){return new E(function(j,ie){C.executeSql("DROP TABLE IF EXISTS "+$,[],function(){j()},function(re,Oe){ie(Oe)})})}for(var T=[],w=0,k=f.storeNames.length;w<k;w++)T.push(I(f.storeNames[w]));E.all(T).then(function(){b()}).catch(function($){S($)})},function(C){S(C)})})}):g=E.reject("Invalid arguments"),v(g,d),g}var il={_driver:"webSQLStorage",_initStorage:Yu,_support:$u(),iterate:Ku,getItem:qu,setItem:Xu,removeItem:Ju,clear:Qu,length:Zu,key:el,keys:tl,dropInstance:rl};function ol(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function bs(a,d){var c=a.name+"/";return a.storeName!==d.storeName&&(c+=a.storeName+"/"),c}function sl(){var a="_localforage_support_test";try{return localStorage.setItem(a,!0),localStorage.removeItem(a),!1}catch{return!0}}function al(){return!sl()||localStorage.length>0}function cl(a){var d=this,c={};if(a)for(var m in a)c[m]=a[m];return c.keyPrefix=bs(a,d._defaultConfig),al()?(d._dbInfo=c,c.serializer=ii,E.resolve()):E.reject()}function ul(a){var d=this,c=d.ready().then(function(){for(var m=d._dbInfo.keyPrefix,g=localStorage.length-1;g>=0;g--){var f=localStorage.key(g);f.indexOf(m)===0&&localStorage.removeItem(f)}});return v(c,a),c}function ll(a,d){var c=this;a=U(a);var m=c.ready().then(function(){var g=c._dbInfo,f=localStorage.getItem(g.keyPrefix+a);return f&&(f=g.serializer.deserialize(f)),f});return v(m,d),m}function dl(a,d){var c=this,m=c.ready().then(function(){for(var g=c._dbInfo,f=g.keyPrefix,b=f.length,S=localStorage.length,C=1,I=0;I<S;I++){var T=localStorage.key(I);if(T.indexOf(f)===0){var w=localStorage.getItem(T);if(w&&(w=g.serializer.deserialize(w)),w=a(w,T.substring(b),C++),w!==void 0)return w}}});return v(m,d),m}function fl(a,d){var c=this,m=c.ready().then(function(){var g=c._dbInfo,f;try{f=localStorage.key(a)}catch{f=null}return f&&(f=f.substring(g.keyPrefix.length)),f});return v(m,d),m}function pl(a){var d=this,c=d.ready().then(function(){for(var m=d._dbInfo,g=localStorage.length,f=[],b=0;b<g;b++){var S=localStorage.key(b);S.indexOf(m.keyPrefix)===0&&f.push(S.substring(m.keyPrefix.length))}return f});return v(c,a),c}function ml(a){var d=this,c=d.keys().then(function(m){return m.length});return v(c,a),c}function hl(a,d){var c=this;a=U(a);var m=c.ready().then(function(){var g=c._dbInfo;localStorage.removeItem(g.keyPrefix+a)});return v(m,d),m}function gl(a,d,c){var m=this;a=U(a);var g=m.ready().then(function(){d===void 0&&(d=null);var f=d;return new E(function(b,S){var C=m._dbInfo;C.serializer.serialize(d,function(I,T){if(T)S(T);else try{localStorage.setItem(C.keyPrefix+a,I),b(f)}catch(w){(w.name==="QuotaExceededError"||w.name==="NS_ERROR_DOM_QUOTA_REACHED")&&S(w),S(w)}})})});return v(g,c),g}function _l(a,d){if(d=M.apply(this,arguments),a=typeof a!="function"&&a||{},!a.name){var c=this.config();a.name=a.name||c.name,a.storeName=a.storeName||c.storeName}var m=this,g;return a.name?g=new E(function(f){a.storeName?f(bs(a,m._defaultConfig)):f(a.name+"/")}).then(function(f){for(var b=localStorage.length-1;b>=0;b--){var S=localStorage.key(b);S.indexOf(f)===0&&localStorage.removeItem(S)}}):g=E.reject("Invalid arguments"),v(g,d),g}var vl={_driver:"localStorageWrapper",_initStorage:cl,_support:ol(),iterate:dl,getItem:ll,setItem:gl,removeItem:hl,clear:ul,length:ml,key:fl,keys:pl,dropInstance:_l},yl=function(d,c){return d===c||typeof d=="number"&&typeof c=="number"&&isNaN(d)&&isNaN(c)},El=function(d,c){for(var m=d.length,g=0;g<m;){if(yl(d[g],c))return!0;g++}return!1},Ss=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},pn={},Cs={},Bt={INDEXEDDB:Gu,WEBSQL:il,LOCALSTORAGE:vl},bl=[Bt.INDEXEDDB._driver,Bt.WEBSQL._driver,Bt.LOCALSTORAGE._driver],qn=["dropInstance"],oi=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(qn),Sl={description:"",driver:bl.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Cl(a,d){a[d]=function(){var c=arguments;return a.ready().then(function(){return a[d].apply(a,c)})}}function si(){for(var a=1;a<arguments.length;a++){var d=arguments[a];if(d)for(var c in d)d.hasOwnProperty(c)&&(Ss(d[c])?arguments[0][c]=d[c].slice():arguments[0][c]=d[c])}return arguments[0]}var Il=(function(){function a(d){u(this,a);for(var c in Bt)if(Bt.hasOwnProperty(c)){var m=Bt[c],g=m._driver;this[c]=g,pn[g]||this.defineDriver(m)}this._defaultConfig=si({},Sl),this._config=si({},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(c){if((typeof c>"u"?"undefined":s(c))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var m in c){if(m==="storeName"&&(c[m]=c[m].replace(/\W/g,"_")),m==="version"&&typeof c[m]!="number")return new Error("Database version must be a number.");this._config[m]=c[m]}return"driver"in c&&c.driver?this.setDriver(this._config.driver):!0}else return typeof c=="string"?this._config[c]:this._config},a.prototype.defineDriver=function(c,m,g){var f=new E(function(b,S){try{var C=c._driver,I=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!c._driver){S(I);return}for(var T=oi.concat("_initStorage"),w=0,k=T.length;w<k;w++){var $=T[w],j=!El(qn,$);if((j||c[$])&&typeof c[$]!="function"){S(I);return}}var ie=function(){for(var mn=function(Dl){return function(){var wl=new Error("Method "+Dl+" is not implemented by the current driver"),Is=E.reject(wl);return v(Is,arguments[arguments.length-1]),Is}},ai=0,xl=qn.length;ai<xl;ai++){var ci=qn[ai];c[ci]||(c[ci]=mn(ci))}};ie();var re=function(mn){pn[C]&&console.info("Redefining LocalForage driver: "+C),pn[C]=c,Cs[C]=mn,b()};"_support"in c?c._support&&typeof c._support=="function"?c._support().then(re,S):re(!!c._support):re(!0)}catch(Oe){S(Oe)}});return A(f,m,g),f},a.prototype.driver=function(){return this._driver||null},a.prototype.getDriver=function(c,m,g){var f=pn[c]?E.resolve(pn[c]):E.reject(new Error("Driver not found."));return A(f,m,g),f},a.prototype.getSerializer=function(c){var m=E.resolve(ii);return A(m,c),m},a.prototype.ready=function(c){var m=this,g=m._driverSet.then(function(){return m._ready===null&&(m._ready=m._initDriver()),m._ready});return A(g,c,c),g},a.prototype.setDriver=function(c,m,g){var f=this;Ss(c)||(c=[c]);var b=this._getSupportedDrivers(c);function S(){f._config.driver=f.driver()}function C(w){return f._extend(w),S(),f._ready=f._initStorage(f._config),f._ready}function I(w){return function(){var k=0;function $(){for(;k<w.length;){var j=w[k];return k++,f._dbInfo=null,f._ready=null,f.getDriver(j).then(C).catch($)}S();var ie=new Error("No available storage method found.");return f._driverSet=E.reject(ie),f._driverSet}return $()}}var T=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=T.then(function(){var w=b[0];return f._dbInfo=null,f._ready=null,f.getDriver(w).then(function(k){f._driver=k._driver,S(),f._wrapLibraryMethodsWithReady(),f._initDriver=I(b)})}).catch(function(){S();var w=new Error("No available storage method found.");return f._driverSet=E.reject(w),f._driverSet}),A(this._driverSet,m,g),this._driverSet},a.prototype.supports=function(c){return!!Cs[c]},a.prototype._extend=function(c){si(this,c)},a.prototype._getSupportedDrivers=function(c){for(var m=[],g=0,f=c.length;g<f;g++){var b=c[g];this.supports(b)&&m.push(b)}return m},a.prototype._wrapLibraryMethodsWithReady=function(){for(var c=0,m=oi.length;c<m;c++)Cl(this,oi[c])},a.prototype.createInstance=function(c){return new a(c)},a})(),Tl=new Il;i.exports=Tl},{3:3}]},{},[4])(4)})});var yt=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 Gs=0;function Ol(e=document.head){return $s(zt.styleURL,e,"cooee-global-styles")}function Rl(e=document.head){return $s(zt.swiperStyleURL,e,"cooee-swiper-styles")}function $s(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 mi(e,t=document.head){if(!e)return;Gs++;let n=document.createElement("style");n.id=`cooee-app-css-${Gs}`,n.textContent=e,t.appendChild(n)}async function js(){let e=(await import("./swiper-bundle-WHJS64TU.js")).default;return window.CooeeSDK.Swiper=e}async function Ws(e,t=!0){if(!e)return;let n=[];t&&n.push(Rl(e)),n.push(Ol(e)),await Promise.all(n);let r=yt.get().website.commonCSS;mi(r,e)}var Ml={"[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"},Fh=F(_({},Ml),{"[class.ng-submitted]":"isSubmitted"});var Pl=new xs("",{providedIn:"root",factory:()=>zs}),zs="always";var Ll=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=di({type:e});static \u0275inj=li({})}return e})();var Ys=(()=>{class e{static withConfig(n){return{ngModule:e,providers:[{provide:Pl,useValue:n.callSetDisabledState??zs}]}}static \u0275fac=function(r){return new(r||e)};static \u0275mod=di({type:e});static \u0275inj=li({imports:[Ll]})}return e})();var hi=(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})(hi||{});var ot=(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})(ot||{});var Fl=(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})(Fl||{});var Et=class e{engagementContext=Re(Sn);eventData=Re(er);constructor(){}executeCTA(t,n){let r,i=this.engagementContext();if(!i){he.error("Engagement context is not available; aborting executeCTA.");return}if(t===ot.ADD_TO_CART)r="CE Add To Cart Clicked";else if(t===ot.GO_TO_PRODUCT)r="CE View Item Clicked";else if(t===ot.OPEN_CART)r="CE Open Cart Clicked",i.triggerData.redirectBehaviour=hi.CART_DRAWER;else{he.warn(`Unsupported CTA type: ${t}`);return}window.CooeeSDK.executeCTA(i,_({clickAction:{at:t}},n));let o=new Bs(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=ui({token:e,factory:e.\u0275fac})};function lg(e,t){return[Et,...kl(e,t)]}function kl(e,t){return[{provide:Sn,useValue:Ht(e)},{provide:er,useValue:_({},t)}]}var rr=class e{elementRef=Re(gn);engagementService=Re(Et);hasSwiper=!1;_engagementTrigger=Ht(null);_triggerContext=Re(Sn);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(){he.verbose("Init",this.constructor.name);let t=this.elementRef.nativeElement.shadowRoot;t&&Ws(t,this.hasSwiper)}ngOnDestroy(){he.verbose("Destroying",this.constructor.name)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ee({type:e,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,r){n&2&&Jn(r.classes)},inputs:{triggerContext:"triggerContext"},decls:1,vars:0,template:function(n,r){n&1&&Ns(0)},encapsulation:2})};var Ul=(e,t)=>({"--option-color":e,"background-color":t}),qs=(e,t)=>t.id;function Bl(e,t){if(e&1&&(W(0,"span",6),ee(1),z()),e&2){B();let n=be(0);N(),_t(n)}}function Hl(e,t){if(e&1){let n=$e();je(0),W(1,"button",5),ke("click",function(){let i=Ie(n).$implicit,o=B().$implicit,s=B();return Te(s.onOptionChange(o,i))}),Q(2,Bl,2,1,"span",6),z()}if(e&2){let n=t.$implicit,r=B().$implicit,i=be(1),o=n.name,s=We(n.displayName||n.name),u=i?n.hexColor??o:"",l=B().selectedOptions()[r.name]===o;N(),yn("color-type",i)("selected",l)("disabled",n.disabled),oe("title",s)("ngStyle",Zn(14,Ul,u,u)),Gt("aria-checked",l?"true":"false")("data-value",o)("aria-disabled",n.disabled?"true":null)("aria-label",s),N(),Z(i?-1:2)}}function Gl(e,t){if(e&1&&(W(0,"div"),je(1),W(2,"div",1),ee(3),z(),W(4,"div",2),ee(5),z(),W(6,"div",3),$t(7,Hl,3,17,"button",4,qs),z()()),e&2){let n=t.$implicit,r=B();Jn(Ps("option-group ",n.name.toLowerCase())),N(),We(r.hasHexColors(n)),N(2),Wt("",n.name,":"),N(2),_t(r.selectedOptions()[n.name]),N(),Gt("aria-label",n.name),N(),jt(n.optionValues)}}var Cn=e=>e.trim().toLowerCase(),ir=class e extends rr{selectedVariant=new _n;item=Se.required();selectedOptions=Ht({});options=wt(()=>{let t=this.item();if(!t.options||t.vars.length===1)return[];if(window.cooeeManipulateProduct)try{window.cooeeManipulateProduct(t,this.engagementTrigger)}catch(n){he.error(n)}return t.options.forEach(n=>{n.optionValues.forEach(r=>{r.disabled=this.isOptionValueDisabledFast(n,r)})}),t.options});matchedVariant=wt(()=>{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=wt(()=>{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=Cn(o.name),u=o.value,l=n.get(s);l||n.set(s,l=new Map);let h=l.get(u);h||l.set(u,h=new Set),h.add(i)}}),n});constructor(){super(),At(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let t=At(()=>{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(u=>u.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=yt.get().website?.itemSwatchMapping;n&&mi(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)}getCandidateVariantsExcluding(t){let n=this.item(),r=this.availabilityIndex(),i=new Set;n.vars.forEach((s,u)=>{s.isAvailable&&i.add(u)});let o=i;for(let[s,u]of Object.entries(this.selectedOptions())){if(Cn(s)===Cn(t))continue;let l=r.get(Cn(s));if(!l)return new Set;let h=l.get(String(u));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(Cn(t.name));if(!i)return!0;let o=n.name,s=i.get(o);if(!s||s.size===0)return!0;let u=this.getCandidateVariantsExcluding(t.name);if(u.size===0)return!0;for(let l of u)if(s.has(l))return!1;return!0}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ee({type:e,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[fi],decls:2,vars:0,consts:[[3,"class"],[1,"name"],[1,"selected-value"],["role","radiogroup",1,"option-values"],["type","button","role","radio",1,"option-value",3,"color-type","selected","disabled","title","ngStyle"],["type","button","role","radio",1,"option-value",3,"click","title","ngStyle"],[1,"title"]],template:function(n,r){n&1&&$t(0,Gl,9,7,"div",0,qs),n&2&&jt(r.options())},dependencies:[ks,Fs,Ys],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)))}.option-value.selected{box-shadow:#fff 0 0 0 2px,var(--selected-color) 0 0 0 4px}.option-value.disabled{opacity:.5;pointer-events:none}
|
|
2
|
-
`],encapsulation:3})};var _i=Nl(Xs());function or(e){return _i.default.createInstance({name:"lc",storeName:e,driver:_i.default.LOCALSTORAGE})}var qt=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 In=class In extends qt{};Kn(In,"storeName","usr"),In.storage=or(In.storeName);var vi=In;function yi(){return window.CooeeSDK?.uaParser.getDevice().type==="mobile"}var
|
|
1
|
+
import{a as Us,b as zt,c as he,e as Sn,f as er,g as Bs,h as Hs,l as nr}from"./chunk-BULX73XB.js";import{a as tr}from"./chunk-74XS3G6Q.js";import{$ as fi,$a as pi,Aa as gt,Ba as ke,Ca as vn,Da as B,E as Ht,Ea as Os,Fa as Rs,I as gn,K as Dt,L as mt,La as rt,Na as yn,O as N,Oa as Xn,Pa as Jn,Qa as ee,Ra as _t,Sa as Wt,Wa as je,X as Ee,Xa as We,Y as di,Ya as be,Za as Ms,_ as Ds,_a as Ps,ab as Qn,ba as ht,bb as Zn,ca as _n,cb as Ue,db as Be,fb as En,ga as Gt,ha as Q,hb as wt,ia as Z,ib as At,jb as vt,ka as $t,kb as Se,la as jt,ma as oe,mb as bn,na as W,oa as z,pa as Me,qa as pe,ra as ge,s as ui,sa as tt,sb as Ls,t as li,tb as Fs,u as xs,ub as Vs,v as Re,va as nt,wa as ws,wb as ks,x as Ie,xa as As,y as Te,ya as Ns,za as $e}from"./chunk-KHVPWQ5E.js";import{a as _,b as F,c as hn,d as Ts,e as Al,f as Nl,g as Kn}from"./chunk-V7UGKYBN.js";var Xs=Al((Ks,gi)=>{"use strict";(function(e){if(typeof Ks=="object"&&typeof gi<"u")gi.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 u(y,p){if(!o[y]){if(!i[y]){var E=typeof hn=="function"&&hn;if(!p&&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 A=o[y]={exports:{}};i[y][0].call(A.exports,function(U){var M=i[y][1][U];return u(M||U)},A,A.exports,r,i,o,s)}return o[y].exports}for(var l=typeof hn=="function"&&hn,h=0;h<s.length;h++)u(s[h]);return u})({1:[function(r,i,o){(function(s){"use strict";var u=s.MutationObserver||s.WebKitMutationObserver,l;if(u){var h=0,y=new u(U),p=s.document.createTextNode("");y.observe(p,{characterData:!0}),l=function(){p.data=h=++h%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var E=new s.MessageChannel;E.port1.onmessage=U,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(){U(),O.onreadystatechange=null,O.parentNode.removeChild(O),O=null},s.document.documentElement.appendChild(O)}:l=function(){setTimeout(U,0)};var v,A=[];function U(){v=!0;for(var O,V,X=A.length;X;){for(V=A,A=[],O=-1;++O<X;)V[O]();X=A.length}v=!1}i.exports=M;function M(O){A.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 u(){}var l={},h=["REJECTED"],y=["FULFILLED"],p=["PENDING"];i.exports=E;function E(x){if(typeof x!="function")throw new TypeError("resolver must be a function");this.state=p,this.queue=[],this.outcome=void 0,x!==u&&M(this,x)}E.prototype.catch=function(x){return this.then(null,x)},E.prototype.then=function(x,H){if(typeof x!="function"&&this.state===y||typeof H!="function"&&this.state===h)return this;var L=new this.constructor(u);if(this.state!==p){var G=this.state===y?x:H;A(L,G,this.outcome)}else this.queue.push(new v(L,x,H));return L};function v(x,H,L){this.promise=x,typeof H=="function"&&(this.onFulfilled=H,this.callFulfilled=this.otherCallFulfilled),typeof L=="function"&&(this.onRejected=L,this.callRejected=this.otherCallRejected)}v.prototype.callFulfilled=function(x){l.resolve(this.promise,x)},v.prototype.otherCallFulfilled=function(x){A(this.promise,this.onFulfilled,x)},v.prototype.callRejected=function(x){l.reject(this.promise,x)},v.prototype.otherCallRejected=function(x){A(this.promise,this.onRejected,x)};function A(x,H,L){s(function(){var G;try{G=H(L)}catch(ne){return l.reject(x,ne)}G===x?l.reject(x,new TypeError("Cannot resolve promise with itself")):l.resolve(x,G)})}l.resolve=function(x,H){var L=O(U,H);if(L.status==="error")return l.reject(x,L.value);var G=L.value;if(G)M(x,G);else{x.state=y,x.outcome=H;for(var ne=-1,J=x.queue.length;++ne<J;)x.queue[ne].callFulfilled(H)}return x},l.reject=function(x,H){x.state=h,x.outcome=H;for(var L=-1,G=x.queue.length;++L<G;)x.queue[L].callRejected(H);return x};function U(x){var H=x&&x.then;if(x&&(typeof x=="object"||typeof x=="function")&&typeof H=="function")return function(){H.apply(x,arguments)}}function M(x,H){var L=!1;function G(Ne){L||(L=!0,l.reject(x,Ne))}function ne(Ne){L||(L=!0,l.resolve(x,Ne))}function J(){H(ne,G)}var de=O(J);de.status==="error"&&G(de.value)}function O(x,H){var L={};try{L.value=x(H),L.status="success"}catch(G){L.status="error",L.value=G}return L}E.resolve=V;function V(x){return x instanceof this?x:l.resolve(new this(u),x)}E.reject=X;function X(x){var H=new this(u);return l.reject(H,x)}E.all=we;function we(x){var H=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var L=x.length,G=!1;if(!L)return this.resolve([]);for(var ne=new Array(L),J=0,de=-1,Ne=new this(u);++de<L;)Ze(x[de],de);return Ne;function Ze(fn,zn){H.resolve(fn).then(Zr,function(Ut){G||(G=!0,l.reject(Ne,Ut))});function Zr(Ut){ne[zn]=Ut,++J===L&&!G&&(G=!0,l.resolve(Ne,ne))}}}E.race=Ae;function Ae(x){var H=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var L=x.length,G=!1;if(!L)return this.resolve([]);for(var ne=-1,J=new this(u);++ne<L;)de(x[ne]);return J;function de(Ne){H.resolve(Ne).then(function(Ze){G||(G=!0,l.resolve(J,Ze))},function(Ze){G||(G=!0,l.reject(J,Ze))})}}},{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 u(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 p(a,d){a=a||[],d=d||{};try{return new Blob(a,d)}catch(f){if(f.name!=="TypeError")throw f;for(var c=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,m=new c,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(c){d(null,c)},function(c){d(c)})}function A(a,d,c){typeof d=="function"&&a.then(d),typeof c=="function"&&a.catch(c)}function U(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",V=void 0,X={},we=Object.prototype.toString,Ae="readonly",x="readwrite";function H(a){for(var d=a.length,c=new ArrayBuffer(d),m=new Uint8Array(c),g=0;g<d;g++)m[g]=a.charCodeAt(g);return c}function L(a){return new E(function(d){var c=a.transaction(O,x),m=p([""]);c.objectStore(O).put(m,"key"),c.onabort=function(g){g.preventDefault(),g.stopPropagation(),d(!1)},c.oncomplete=function(){var g=navigator.userAgent.match(/Chrome\/(\d+)/),f=navigator.userAgent.match(/Edge\//);d(f||!g||parseInt(g[1],10)>=43)}}).catch(function(){return!1})}function G(a){return typeof V=="boolean"?E.resolve(V):L(a).then(function(d){return V=d,V})}function ne(a){var d=X[a.name],c={};c.promise=new E(function(m,g){c.resolve=m,c.reject=g}),d.deferredOperations.push(c),d.dbReady?d.dbReady=d.dbReady.then(function(){return c.promise}):d.dbReady=c.promise}function J(a){var d=X[a.name],c=d.deferredOperations.pop();if(c)return c.resolve(),c.promise}function de(a,d){var c=X[a.name],m=c.deferredOperations.pop();if(m)return m.reject(d),m.promise}function Ne(a,d){return new E(function(c,m){if(X[a.name]=X[a.name]||os(),a.db)if(d)ne(a),a.db.close();else return c(a.db);var g=[a.name];d&&g.push(a.version);var f=h.open.apply(h,g);d&&(f.onupgradeneeded=function(b){var S=f.result;try{S.createObjectStore(a.storeName),b.oldVersion<=1&&S.createObjectStore(O)}catch(C){if(C.name==="ConstraintError")console.warn('The database "'+a.name+'" has been upgraded from version '+b.oldVersion+" to version "+b.newVersion+', but the storage "'+a.storeName+'" already exists.');else throw C}}),f.onerror=function(b){b.preventDefault(),m(f.error)},f.onsuccess=function(){var b=f.result;b.onversionchange=function(S){S.target.close()},c(b),J(a)}})}function Ze(a){return Ne(a,!1)}function fn(a){return Ne(a,!0)}function zn(a,d){if(!a.db)return!0;var c=!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||c){if(c){var f=a.db.version+1;f>a.version&&(a.version=f)}return!0}return!1}function Zr(a){return new E(function(d,c){var m=new FileReader;m.onerror=c,m.onloadend=function(g){var f=btoa(g.target.result||"");d({__local_forage_encoded_blob:!0,data:f,type:a.type})},m.readAsBinaryString(a)})}function Ut(a){var d=H(atob(a.data));return p([d],{type:a.type})}function is(a){return a&&a.__local_forage_encoded_blob}function Nu(a){var d=this,c=d._initReady().then(function(){var m=X[d._dbInfo.name];if(m&&m.dbReady)return m.dbReady});return A(c,a,a),c}function Ou(a){ne(a);for(var d=X[a.name],c=d.forages,m=0;m<c.length;m++){var g=c[m];g._dbInfo.db&&(g._dbInfo.db.close(),g._dbInfo.db=null)}return a.db=null,Ze(a).then(function(f){return a.db=f,zn(a)?fn(a):f}).then(function(f){a.db=d.db=f;for(var b=0;b<c.length;b++)c[b]._dbInfo.db=f}).catch(function(f){throw de(a,f),f})}function et(a,d,c,m){m===void 0&&(m=1);try{var g=a.db.transaction(a.storeName,d);c(null,g)}catch(f){if(m>0&&(!a.db||f.name==="InvalidStateError"||f.name==="NotFoundError"))return E.resolve().then(function(){if(!a.db||f.name==="NotFoundError"&&!a.db.objectStoreNames.contains(a.storeName)&&a.version<=a.db.version)return a.db&&(a.version=a.db.version+1),fn(a)}).then(function(){return Ou(a).then(function(){et(a,d,c,m-1)})}).catch(c);c(f)}}function os(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Ru(a){var d=this,c={db:null};if(a)for(var m in a)c[m]=a[m];var g=X[c.name];g||(g=os(),X[c.name]=g),g.forages.push(d),d._initReady||(d._initReady=d.ready,d.ready=Nu);var f=[];function b(){return E.resolve()}for(var S=0;S<g.forages.length;S++){var C=g.forages[S];C!==d&&f.push(C._initReady().catch(b))}var I=g.forages.slice(0);return E.all(f).then(function(){return c.db=g.db,Ze(c)}).then(function(T){return c.db=T,zn(c,d._defaultConfig.version)?fn(c):T}).then(function(T){c.db=g.db=T,d._dbInfo=c;for(var w=0;w<I.length;w++){var k=I[w];k!==d&&(k._dbInfo.db=c.db,k._dbInfo.version=c.version)}})}function Mu(a,d){var c=this;a=U(a);var m=new E(function(g,f){c.ready().then(function(){et(c._dbInfo,Ae,function(b,S){if(b)return f(b);try{var C=S.objectStore(c._dbInfo.storeName),I=C.get(a);I.onsuccess=function(){var T=I.result;T===void 0&&(T=null),is(T)&&(T=Ut(T)),g(T)},I.onerror=function(){f(I.error)}}catch(T){f(T)}})}).catch(f)});return v(m,d),m}function Pu(a,d){var c=this,m=new E(function(g,f){c.ready().then(function(){et(c._dbInfo,Ae,function(b,S){if(b)return f(b);try{var C=S.objectStore(c._dbInfo.storeName),I=C.openCursor(),T=1;I.onsuccess=function(){var w=I.result;if(w){var k=w.value;is(k)&&(k=Ut(k));var $=a(k,w.key,T++);$!==void 0?g($):w.continue()}else g()},I.onerror=function(){f(I.error)}}catch(w){f(w)}})}).catch(f)});return v(m,d),m}function Lu(a,d,c){var m=this;a=U(a);var g=new E(function(f,b){var S;m.ready().then(function(){return S=m._dbInfo,we.call(d)==="[object Blob]"?G(S.db).then(function(C){return C?d:Zr(d)}):d}).then(function(C){et(m._dbInfo,x,function(I,T){if(I)return b(I);try{var w=T.objectStore(m._dbInfo.storeName);C===null&&(C=void 0);var k=w.put(C,a);T.oncomplete=function(){C===void 0&&(C=null),f(C)},T.onabort=T.onerror=function(){var $=k.error?k.error:k.transaction.error;b($)}}catch($){b($)}})}).catch(b)});return v(g,c),g}function Fu(a,d){var c=this;a=U(a);var m=new E(function(g,f){c.ready().then(function(){et(c._dbInfo,x,function(b,S){if(b)return f(b);try{var C=S.objectStore(c._dbInfo.storeName),I=C.delete(a);S.oncomplete=function(){g()},S.onerror=function(){f(I.error)},S.onabort=function(){var T=I.error?I.error:I.transaction.error;f(T)}}catch(T){f(T)}})}).catch(f)});return v(m,d),m}function Vu(a){var d=this,c=new E(function(m,g){d.ready().then(function(){et(d._dbInfo,x,function(f,b){if(f)return g(f);try{var S=b.objectStore(d._dbInfo.storeName),C=S.clear();b.oncomplete=function(){m()},b.onabort=b.onerror=function(){var I=C.error?C.error:C.transaction.error;g(I)}}catch(I){g(I)}})}).catch(g)});return v(c,a),c}function ku(a){var d=this,c=new E(function(m,g){d.ready().then(function(){et(d._dbInfo,Ae,function(f,b){if(f)return g(f);try{var S=b.objectStore(d._dbInfo.storeName),C=S.count();C.onsuccess=function(){m(C.result)},C.onerror=function(){g(C.error)}}catch(I){g(I)}})}).catch(g)});return v(c,a),c}function Uu(a,d){var c=this,m=new E(function(g,f){if(a<0){g(null);return}c.ready().then(function(){et(c._dbInfo,Ae,function(b,S){if(b)return f(b);try{var C=S.objectStore(c._dbInfo.storeName),I=!1,T=C.openKeyCursor();T.onsuccess=function(){var w=T.result;if(!w){g(null);return}a===0||I?g(w.key):(I=!0,w.advance(a))},T.onerror=function(){f(T.error)}}catch(w){f(w)}})}).catch(f)});return v(m,d),m}function Bu(a){var d=this,c=new E(function(m,g){d.ready().then(function(){et(d._dbInfo,Ae,function(f,b){if(f)return g(f);try{var S=b.objectStore(d._dbInfo.storeName),C=S.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(c,a),c}function Hu(a,d){d=M.apply(this,arguments);var c=this.config();a=typeof a!="function"&&a||{},a.name||(a.name=a.name||c.name,a.storeName=a.storeName||c.storeName);var m=this,g;if(!a.name)g=E.reject("Invalid arguments");else{var f=a.name===c.name&&m._dbInfo.db,b=f?E.resolve(m._dbInfo.db):Ze(a).then(function(S){var C=X[a.name],I=C.forages;C.db=S;for(var T=0;T<I.length;T++)I[T]._dbInfo.db=S;return S});a.storeName?g=b.then(function(S){if(S.objectStoreNames.contains(a.storeName)){var C=S.version+1;ne(a);var I=X[a.name],T=I.forages;S.close();for(var w=0;w<T.length;w++){var k=T[w];k._dbInfo.db=null,k._dbInfo.version=C}var $=new E(function(j,ie){var re=h.open(a.name,C);re.onerror=function(Oe){var mn=re.result;mn.close(),ie(Oe)},re.onupgradeneeded=function(){var Oe=re.result;Oe.deleteObjectStore(a.storeName)},re.onsuccess=function(){var Oe=re.result;Oe.close(),j(Oe)}});return $.then(function(j){I.db=j;for(var ie=0;ie<T.length;ie++){var re=T[ie];re._dbInfo.db=j,J(re._dbInfo)}}).catch(function(j){throw(de(a,j)||E.resolve()).catch(function(){}),j})}}):g=b.then(function(S){ne(a);var C=X[a.name],I=C.forages;S.close();for(var T=0;T<I.length;T++){var w=I[T];w._dbInfo.db=null}var k=new E(function($,j){var ie=h.deleteDatabase(a.name);ie.onerror=function(){var re=ie.result;re&&re.close(),j(ie.error)},ie.onblocked=function(){console.warn('dropInstance blocked for database "'+a.name+'" until all open connections are closed')},ie.onsuccess=function(){var re=ie.result;re&&re.close(),$(re)}});return k.then(function($){C.db=$;for(var j=0;j<I.length;j++){var ie=I[j];J(ie._dbInfo)}}).catch(function($){throw(de(a,$)||E.resolve()).catch(function(){}),$})})}return v(g,d),g}var Gu={_driver:"asyncStorage",_initStorage:Ru,_support:y(),iterate:Pu,getItem:Mu,setItem:Lu,removeItem:Fu,clear:Vu,length:ku,key:Uu,keys:Bu,dropInstance:Hu};function $u(){return typeof openDatabase=="function"}var ft="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ju="~~local_forage_type~",ss=/^~~local_forage_type~([^~]+)~/,Yn="__lfsc__:",ei=Yn.length,ti="arbf",ni="blob",as="si08",cs="ui08",us="uic8",ls="si16",ds="si32",fs="ur16",ps="ui32",ms="fl32",hs="fl64",gs=ei+ti.length,_s=Object.prototype.toString;function vs(a){var d=a.length*.75,c=a.length,m,g=0,f,b,S,C;a[a.length-1]==="="&&(d--,a[a.length-2]==="="&&d--);var I=new ArrayBuffer(d),T=new Uint8Array(I);for(m=0;m<c;m+=4)f=ft.indexOf(a[m]),b=ft.indexOf(a[m+1]),S=ft.indexOf(a[m+2]),C=ft.indexOf(a[m+3]),T[g++]=f<<2|b>>4,T[g++]=(b&15)<<4|S>>2,T[g++]=(S&3)<<6|C&63;return I}function ri(a){var d=new Uint8Array(a),c="",m;for(m=0;m<d.length;m+=3)c+=ft[d[m]>>2],c+=ft[(d[m]&3)<<4|d[m+1]>>4],c+=ft[(d[m+1]&15)<<2|d[m+2]>>6],c+=ft[d[m+2]&63];return d.length%3===2?c=c.substring(0,c.length-1)+"=":d.length%3===1&&(c=c.substring(0,c.length-2)+"=="),c}function Wu(a,d){var c="";if(a&&(c=_s.call(a)),a&&(c==="[object ArrayBuffer]"||a.buffer&&_s.call(a.buffer)==="[object ArrayBuffer]")){var m,g=Yn;a instanceof ArrayBuffer?(m=a,g+=ti):(m=a.buffer,c==="[object Int8Array]"?g+=as:c==="[object Uint8Array]"?g+=cs:c==="[object Uint8ClampedArray]"?g+=us:c==="[object Int16Array]"?g+=ls:c==="[object Uint16Array]"?g+=fs:c==="[object Int32Array]"?g+=ds:c==="[object Uint32Array]"?g+=ps:c==="[object Float32Array]"?g+=ms:c==="[object Float64Array]"?g+=hs:d(new Error("Failed to get type for BinaryArray"))),d(g+ri(m))}else if(c==="[object Blob]"){var f=new FileReader;f.onload=function(){var b=ju+a.type+"~"+ri(this.result);d(Yn+ni+b)},f.readAsArrayBuffer(a)}else try{d(JSON.stringify(a))}catch(b){console.error("Couldn't convert value into a JSON string: ",a),d(null,b)}}function zu(a){if(a.substring(0,ei)!==Yn)return JSON.parse(a);var d=a.substring(gs),c=a.substring(ei,gs),m;if(c===ni&&ss.test(d)){var g=d.match(ss);m=g[1],d=d.substring(g[0].length)}var f=vs(d);switch(c){case ti:return f;case ni:return p([f],{type:m});case as:return new Int8Array(f);case cs:return new Uint8Array(f);case us:return new Uint8ClampedArray(f);case ls:return new Int16Array(f);case fs:return new Uint16Array(f);case ds:return new Int32Array(f);case ps:return new Uint32Array(f);case ms:return new Float32Array(f);case hs:return new Float64Array(f);default:throw new Error("Unkown type: "+c)}}var ii={serialize:Wu,deserialize:zu,stringToBuffer:vs,bufferToString:ri};function ys(a,d,c,m){a.executeSql("CREATE TABLE IF NOT EXISTS "+d.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],c,m)}function Yu(a){var d=this,c={db:null};if(a)for(var m in a)c[m]=typeof a[m]!="string"?a[m].toString():a[m];var g=new E(function(f,b){try{c.db=openDatabase(c.name,String(c.version),c.description,c.size)}catch(S){return b(S)}c.db.transaction(function(S){ys(S,c,function(){d._dbInfo=c,f()},function(C,I){b(I)})},b)});return c.serializer=ii,g}function pt(a,d,c,m,g,f){a.executeSql(c,m,g,function(b,S){S.code===S.SYNTAX_ERR?b.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[d.storeName],function(C,I){I.rows.length?f(C,S):ys(C,d,function(){C.executeSql(c,m,g,f)},f)},f):f(b,S)},f)}function qu(a,d){var c=this;a=U(a);var m=new E(function(g,f){c.ready().then(function(){var b=c._dbInfo;b.db.transaction(function(S){pt(S,b,"SELECT * FROM "+b.storeName+" WHERE key = ? LIMIT 1",[a],function(C,I){var T=I.rows.length?I.rows.item(0).value:null;T&&(T=b.serializer.deserialize(T)),g(T)},function(C,I){f(I)})})}).catch(f)});return v(m,d),m}function Ku(a,d){var c=this,m=new E(function(g,f){c.ready().then(function(){var b=c._dbInfo;b.db.transaction(function(S){pt(S,b,"SELECT * FROM "+b.storeName,[],function(C,I){for(var T=I.rows,w=T.length,k=0;k<w;k++){var $=T.item(k),j=$.value;if(j&&(j=b.serializer.deserialize(j)),j=a(j,$.key,k+1),j!==void 0){g(j);return}}g()},function(C,I){f(I)})})}).catch(f)});return v(m,d),m}function Es(a,d,c,m){var g=this;a=U(a);var f=new E(function(b,S){g.ready().then(function(){d===void 0&&(d=null);var C=d,I=g._dbInfo;I.serializer.serialize(d,function(T,w){w?S(w):I.db.transaction(function(k){pt(k,I,"INSERT OR REPLACE INTO "+I.storeName+" (key, value) VALUES (?, ?)",[a,T],function(){b(C)},function($,j){S(j)})},function(k){if(k.code===k.QUOTA_ERR){if(m>0){b(Es.apply(g,[a,C,c,m-1]));return}S(k)}})})}).catch(S)});return v(f,c),f}function Xu(a,d,c){return Es.apply(this,[a,d,c,1])}function Ju(a,d){var c=this;a=U(a);var m=new E(function(g,f){c.ready().then(function(){var b=c._dbInfo;b.db.transaction(function(S){pt(S,b,"DELETE FROM "+b.storeName+" WHERE key = ?",[a],function(){g()},function(C,I){f(I)})})}).catch(f)});return v(m,d),m}function Qu(a){var d=this,c=new E(function(m,g){d.ready().then(function(){var f=d._dbInfo;f.db.transaction(function(b){pt(b,f,"DELETE FROM "+f.storeName,[],function(){m()},function(S,C){g(C)})})}).catch(g)});return v(c,a),c}function Zu(a){var d=this,c=new E(function(m,g){d.ready().then(function(){var f=d._dbInfo;f.db.transaction(function(b){pt(b,f,"SELECT COUNT(key) as c FROM "+f.storeName,[],function(S,C){var I=C.rows.item(0).c;m(I)},function(S,C){g(C)})})}).catch(g)});return v(c,a),c}function el(a,d){var c=this,m=new E(function(g,f){c.ready().then(function(){var b=c._dbInfo;b.db.transaction(function(S){pt(S,b,"SELECT key FROM "+b.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){f(I)})})}).catch(f)});return v(m,d),m}function tl(a){var d=this,c=new E(function(m,g){d.ready().then(function(){var f=d._dbInfo;f.db.transaction(function(b){pt(b,f,"SELECT key FROM "+f.storeName,[],function(S,C){for(var I=[],T=0;T<C.rows.length;T++)I.push(C.rows.item(T).key);m(I)},function(S,C){g(C)})})}).catch(g)});return v(c,a),c}function nl(a){return new E(function(d,c){a.transaction(function(m){m.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(g,f){for(var b=[],S=0;S<f.rows.length;S++)b.push(f.rows.item(S).name);d({db:a,storeNames:b})},function(g,f){c(f)})},function(m){c(m)})})}function rl(a,d){d=M.apply(this,arguments);var c=this.config();a=typeof a!="function"&&a||{},a.name||(a.name=a.name||c.name,a.storeName=a.storeName||c.storeName);var m=this,g;return a.name?g=new E(function(f){var b;a.name===c.name?b=m._dbInfo.db:b=openDatabase(a.name,"","",0),a.storeName?f({db:b,storeNames:[a.storeName]}):f(nl(b))}).then(function(f){return new E(function(b,S){f.db.transaction(function(C){function I($){return new E(function(j,ie){C.executeSql("DROP TABLE IF EXISTS "+$,[],function(){j()},function(re,Oe){ie(Oe)})})}for(var T=[],w=0,k=f.storeNames.length;w<k;w++)T.push(I(f.storeNames[w]));E.all(T).then(function(){b()}).catch(function($){S($)})},function(C){S(C)})})}):g=E.reject("Invalid arguments"),v(g,d),g}var il={_driver:"webSQLStorage",_initStorage:Yu,_support:$u(),iterate:Ku,getItem:qu,setItem:Xu,removeItem:Ju,clear:Qu,length:Zu,key:el,keys:tl,dropInstance:rl};function ol(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function bs(a,d){var c=a.name+"/";return a.storeName!==d.storeName&&(c+=a.storeName+"/"),c}function sl(){var a="_localforage_support_test";try{return localStorage.setItem(a,!0),localStorage.removeItem(a),!1}catch{return!0}}function al(){return!sl()||localStorage.length>0}function cl(a){var d=this,c={};if(a)for(var m in a)c[m]=a[m];return c.keyPrefix=bs(a,d._defaultConfig),al()?(d._dbInfo=c,c.serializer=ii,E.resolve()):E.reject()}function ul(a){var d=this,c=d.ready().then(function(){for(var m=d._dbInfo.keyPrefix,g=localStorage.length-1;g>=0;g--){var f=localStorage.key(g);f.indexOf(m)===0&&localStorage.removeItem(f)}});return v(c,a),c}function ll(a,d){var c=this;a=U(a);var m=c.ready().then(function(){var g=c._dbInfo,f=localStorage.getItem(g.keyPrefix+a);return f&&(f=g.serializer.deserialize(f)),f});return v(m,d),m}function dl(a,d){var c=this,m=c.ready().then(function(){for(var g=c._dbInfo,f=g.keyPrefix,b=f.length,S=localStorage.length,C=1,I=0;I<S;I++){var T=localStorage.key(I);if(T.indexOf(f)===0){var w=localStorage.getItem(T);if(w&&(w=g.serializer.deserialize(w)),w=a(w,T.substring(b),C++),w!==void 0)return w}}});return v(m,d),m}function fl(a,d){var c=this,m=c.ready().then(function(){var g=c._dbInfo,f;try{f=localStorage.key(a)}catch{f=null}return f&&(f=f.substring(g.keyPrefix.length)),f});return v(m,d),m}function pl(a){var d=this,c=d.ready().then(function(){for(var m=d._dbInfo,g=localStorage.length,f=[],b=0;b<g;b++){var S=localStorage.key(b);S.indexOf(m.keyPrefix)===0&&f.push(S.substring(m.keyPrefix.length))}return f});return v(c,a),c}function ml(a){var d=this,c=d.keys().then(function(m){return m.length});return v(c,a),c}function hl(a,d){var c=this;a=U(a);var m=c.ready().then(function(){var g=c._dbInfo;localStorage.removeItem(g.keyPrefix+a)});return v(m,d),m}function gl(a,d,c){var m=this;a=U(a);var g=m.ready().then(function(){d===void 0&&(d=null);var f=d;return new E(function(b,S){var C=m._dbInfo;C.serializer.serialize(d,function(I,T){if(T)S(T);else try{localStorage.setItem(C.keyPrefix+a,I),b(f)}catch(w){(w.name==="QuotaExceededError"||w.name==="NS_ERROR_DOM_QUOTA_REACHED")&&S(w),S(w)}})})});return v(g,c),g}function _l(a,d){if(d=M.apply(this,arguments),a=typeof a!="function"&&a||{},!a.name){var c=this.config();a.name=a.name||c.name,a.storeName=a.storeName||c.storeName}var m=this,g;return a.name?g=new E(function(f){a.storeName?f(bs(a,m._defaultConfig)):f(a.name+"/")}).then(function(f){for(var b=localStorage.length-1;b>=0;b--){var S=localStorage.key(b);S.indexOf(f)===0&&localStorage.removeItem(S)}}):g=E.reject("Invalid arguments"),v(g,d),g}var vl={_driver:"localStorageWrapper",_initStorage:cl,_support:ol(),iterate:dl,getItem:ll,setItem:gl,removeItem:hl,clear:ul,length:ml,key:fl,keys:pl,dropInstance:_l},yl=function(d,c){return d===c||typeof d=="number"&&typeof c=="number"&&isNaN(d)&&isNaN(c)},El=function(d,c){for(var m=d.length,g=0;g<m;){if(yl(d[g],c))return!0;g++}return!1},Ss=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},pn={},Cs={},Bt={INDEXEDDB:Gu,WEBSQL:il,LOCALSTORAGE:vl},bl=[Bt.INDEXEDDB._driver,Bt.WEBSQL._driver,Bt.LOCALSTORAGE._driver],qn=["dropInstance"],oi=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(qn),Sl={description:"",driver:bl.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Cl(a,d){a[d]=function(){var c=arguments;return a.ready().then(function(){return a[d].apply(a,c)})}}function si(){for(var a=1;a<arguments.length;a++){var d=arguments[a];if(d)for(var c in d)d.hasOwnProperty(c)&&(Ss(d[c])?arguments[0][c]=d[c].slice():arguments[0][c]=d[c])}return arguments[0]}var Il=(function(){function a(d){u(this,a);for(var c in Bt)if(Bt.hasOwnProperty(c)){var m=Bt[c],g=m._driver;this[c]=g,pn[g]||this.defineDriver(m)}this._defaultConfig=si({},Sl),this._config=si({},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(c){if((typeof c>"u"?"undefined":s(c))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var m in c){if(m==="storeName"&&(c[m]=c[m].replace(/\W/g,"_")),m==="version"&&typeof c[m]!="number")return new Error("Database version must be a number.");this._config[m]=c[m]}return"driver"in c&&c.driver?this.setDriver(this._config.driver):!0}else return typeof c=="string"?this._config[c]:this._config},a.prototype.defineDriver=function(c,m,g){var f=new E(function(b,S){try{var C=c._driver,I=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!c._driver){S(I);return}for(var T=oi.concat("_initStorage"),w=0,k=T.length;w<k;w++){var $=T[w],j=!El(qn,$);if((j||c[$])&&typeof c[$]!="function"){S(I);return}}var ie=function(){for(var mn=function(Dl){return function(){var wl=new Error("Method "+Dl+" is not implemented by the current driver"),Is=E.reject(wl);return v(Is,arguments[arguments.length-1]),Is}},ai=0,xl=qn.length;ai<xl;ai++){var ci=qn[ai];c[ci]||(c[ci]=mn(ci))}};ie();var re=function(mn){pn[C]&&console.info("Redefining LocalForage driver: "+C),pn[C]=c,Cs[C]=mn,b()};"_support"in c?c._support&&typeof c._support=="function"?c._support().then(re,S):re(!!c._support):re(!0)}catch(Oe){S(Oe)}});return A(f,m,g),f},a.prototype.driver=function(){return this._driver||null},a.prototype.getDriver=function(c,m,g){var f=pn[c]?E.resolve(pn[c]):E.reject(new Error("Driver not found."));return A(f,m,g),f},a.prototype.getSerializer=function(c){var m=E.resolve(ii);return A(m,c),m},a.prototype.ready=function(c){var m=this,g=m._driverSet.then(function(){return m._ready===null&&(m._ready=m._initDriver()),m._ready});return A(g,c,c),g},a.prototype.setDriver=function(c,m,g){var f=this;Ss(c)||(c=[c]);var b=this._getSupportedDrivers(c);function S(){f._config.driver=f.driver()}function C(w){return f._extend(w),S(),f._ready=f._initStorage(f._config),f._ready}function I(w){return function(){var k=0;function $(){for(;k<w.length;){var j=w[k];return k++,f._dbInfo=null,f._ready=null,f.getDriver(j).then(C).catch($)}S();var ie=new Error("No available storage method found.");return f._driverSet=E.reject(ie),f._driverSet}return $()}}var T=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=T.then(function(){var w=b[0];return f._dbInfo=null,f._ready=null,f.getDriver(w).then(function(k){f._driver=k._driver,S(),f._wrapLibraryMethodsWithReady(),f._initDriver=I(b)})}).catch(function(){S();var w=new Error("No available storage method found.");return f._driverSet=E.reject(w),f._driverSet}),A(this._driverSet,m,g),this._driverSet},a.prototype.supports=function(c){return!!Cs[c]},a.prototype._extend=function(c){si(this,c)},a.prototype._getSupportedDrivers=function(c){for(var m=[],g=0,f=c.length;g<f;g++){var b=c[g];this.supports(b)&&m.push(b)}return m},a.prototype._wrapLibraryMethodsWithReady=function(){for(var c=0,m=oi.length;c<m;c++)Cl(this,oi[c])},a.prototype.createInstance=function(c){return new a(c)},a})(),Tl=new Il;i.exports=Tl},{3:3}]},{},[4])(4)})});var yt=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 Gs=0;function ah(e,t){if(!e)return;let n=document.createElement("script");n.id=t??"",n.src=e,n.type="module",document.head.appendChild(n)}function Ol(e=document.head){return $s(zt.styleURL,e,"cooee-global-styles")}function Rl(e=document.head){return $s(zt.swiperStyleURL,e,"cooee-swiper-styles")}function $s(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 mi(e,t=document.head){if(!e)return;Gs++;let n=document.createElement("style");n.id=`cooee-app-css-${Gs}`,n.textContent=e,t.appendChild(n)}function ch(e){if(!e)return;let t=document.createElement("script");t.id="cooee-app-script",t.innerHTML=e,document.head.appendChild(t)}function uh(script){if(script)try{eval(script)}catch(e){console.error("Failed to execute script:",e)}}async function js(){let e=(await import("./swiper-bundle-WHJS64TU.js")).default;return window.CooeeSDK.Swiper=e}async function Ws(e,t=!0){if(!e)return;let n=[];t&&n.push(Rl(e)),n.push(Ol(e)),await Promise.all(n);let r=yt.get().website.commonCSS;mi(r,e)}var Ml={"[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"},Uh=F(_({},Ml),{"[class.ng-submitted]":"isSubmitted"});var Pl=new xs("",{providedIn:"root",factory:()=>zs}),zs="always";var Ll=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=di({type:e});static \u0275inj=li({})}return e})();var Ys=(()=>{class e{static withConfig(n){return{ngModule:e,providers:[{provide:Pl,useValue:n.callSetDisabledState??zs}]}}static \u0275fac=function(r){return new(r||e)};static \u0275mod=di({type:e});static \u0275inj=li({imports:[Ll]})}return e})();var hi=(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})(hi||{});var ot=(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})(ot||{});var Fl=(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})(Fl||{});var Et=class e{engagementContext=Re(Sn);eventData=Re(er);constructor(){}executeCTA(t,n){let r,i=this.engagementContext();if(!i){he.error("Engagement context is not available; aborting executeCTA.");return}if(t===ot.ADD_TO_CART)r="CE Add To Cart Clicked";else if(t===ot.GO_TO_PRODUCT)r="CE View Item Clicked";else if(t===ot.OPEN_CART)r="CE Open Cart Clicked",i.triggerData.redirectBehaviour=hi.CART_DRAWER;else{he.warn(`Unsupported CTA type: ${t}`);return}window.CooeeSDK.executeCTA(i,_({clickAction:{at:t}},n));let o=new Bs(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=ui({token:e,factory:e.\u0275fac})};function pg(e,t){return[Et,...kl(e,t)]}function kl(e,t){return[{provide:Sn,useValue:Ht(e)},{provide:er,useValue:_({},t)}]}var rr=class e{elementRef=Re(gn);engagementService=Re(Et);hasSwiper=!1;_engagementTrigger=Ht(null);_triggerContext=Re(Sn);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(){he.verbose("Init",this.constructor.name);let t=this.elementRef.nativeElement.shadowRoot;t&&Ws(t,this.hasSwiper)}ngOnDestroy(){he.verbose("Destroying",this.constructor.name)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ee({type:e,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,r){n&2&&Jn(r.classes)},inputs:{triggerContext:"triggerContext"},decls:1,vars:0,template:function(n,r){n&1&&Ns(0)},encapsulation:2})};var Ul=(e,t)=>({"--option-color":e,"background-color":t}),qs=(e,t)=>t.id;function Bl(e,t){if(e&1&&(W(0,"span",6),ee(1),z()),e&2){B();let n=be(0);N(),_t(n)}}function Hl(e,t){if(e&1){let n=$e();je(0),W(1,"button",5),ke("click",function(){let i=Ie(n).$implicit,o=B().$implicit,s=B();return Te(s.onOptionChange(o,i))}),Q(2,Bl,2,1,"span",6),z()}if(e&2){let n=t.$implicit,r=B().$implicit,i=be(1),o=n.name,s=We(n.displayName||n.name),u=i?n.hexColor??o:"",l=B().selectedOptions()[r.name]===o;N(),yn("color-type",i)("selected",l)("disabled",n.disabled),oe("title",s)("ngStyle",Zn(14,Ul,u,u)),Gt("aria-checked",l?"true":"false")("data-value",o)("aria-disabled",n.disabled?"true":null)("aria-label",s),N(),Z(i?-1:2)}}function Gl(e,t){if(e&1&&(W(0,"div"),je(1),W(2,"div",1),ee(3),z(),W(4,"div",2),ee(5),z(),W(6,"div",3),$t(7,Hl,3,17,"button",4,qs),z()()),e&2){let n=t.$implicit,r=B();Jn(Ps("option-group ",n.name.toLowerCase())),N(),We(r.hasHexColors(n)),N(2),Wt("",n.name,":"),N(2),_t(r.selectedOptions()[n.name]),N(),Gt("aria-label",n.name),N(),jt(n.optionValues)}}var Cn=e=>e.trim().toLowerCase(),ir=class e extends rr{selectedVariant=new _n;item=Se.required();selectedOptions=Ht({});options=wt(()=>{let t=this.item();if(!t.options||t.vars.length===1)return[];if(window.cooeeManipulateProduct)try{window.cooeeManipulateProduct(t,this.engagementTrigger)}catch(n){he.error(n)}return t.options.forEach(n=>{n.optionValues.forEach(r=>{r.disabled=this.isOptionValueDisabledFast(n,r)})}),t.options});matchedVariant=wt(()=>{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=wt(()=>{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=Cn(o.name),u=o.value,l=n.get(s);l||n.set(s,l=new Map);let h=l.get(u);h||l.set(u,h=new Set),h.add(i)}}),n});constructor(){super(),At(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let t=At(()=>{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(u=>u.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=yt.get().website?.itemSwatchMapping;n&&mi(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)}getCandidateVariantsExcluding(t){let n=this.item(),r=this.availabilityIndex(),i=new Set;n.vars.forEach((s,u)=>{s.isAvailable&&i.add(u)});let o=i;for(let[s,u]of Object.entries(this.selectedOptions())){if(Cn(s)===Cn(t))continue;let l=r.get(Cn(s));if(!l)return new Set;let h=l.get(String(u));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(Cn(t.name));if(!i)return!0;let o=n.name,s=i.get(o);if(!s||s.size===0)return!0;let u=this.getCandidateVariantsExcluding(t.name);if(u.size===0)return!0;for(let l of u)if(s.has(l))return!1;return!0}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ee({type:e,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[fi],decls:2,vars:0,consts:[[3,"class"],[1,"name"],[1,"selected-value"],["role","radiogroup",1,"option-values"],["type","button","role","radio",1,"option-value",3,"color-type","selected","disabled","title","ngStyle"],["type","button","role","radio",1,"option-value",3,"click","title","ngStyle"],[1,"title"]],template:function(n,r){n&1&&$t(0,Gl,9,7,"div",0,qs),n&2&&jt(r.options())},dependencies:[ks,Fs,Ys],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)))}.option-value.selected{box-shadow:#fff 0 0 0 2px,var(--selected-color) 0 0 0 4px}.option-value.disabled{opacity:.5;pointer-events:none}
|
|
2
|
+
`],encapsulation:3})};var _i=Nl(Xs());function or(e){return _i.default.createInstance({name:"lc",storeName:e,driver:_i.default.LOCALSTORAGE})}var qt=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 In=class In extends qt{};Kn(In,"storeName","usr"),In.storage=or(In.storeName);var vi=In;function yi(){return window.CooeeSDK?.uaParser.getDevice().type==="mobile"}var Fg=()=>typeof navigator<"u"&&"share"in navigator;var Kt=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 Js=(n=>(n.SINGLE_PANE="SINGLE_PANE",n.TWO_PANE="TWO_PANE",n))(Js||{});var Tn=class Tn extends qt{};Kn(Tn,"storeName","ses"),Tn.storage=or(Tn.storeName);var Ei=Tn;var R=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var P=globalThis;var ze="9.42.0";function Nt(){return Ot(P),P}function Ot(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||ze,t[ze]=t[ze]||{}}function st(e,t,n=P){let r=n.__SENTRY__=n.__SENTRY__||{},i=r[ze]=r[ze]||{};return i[e]||(i[e]=t())}var bi=["debug","info","warn","error","log","assert","trace"],$l="Sentry Logger ",Xt={};function bt(e){if(!("console"in P))return e();let t=P.console,n={},r=Object.keys(Xt);r.forEach(i=>{let o=Xt[i];n[i]=t[i],t[i]=o});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function jl(){Ci().enabled=!0}function Wl(){Ci().enabled=!1}function Qs(){return Ci().enabled}function zl(...e){Si("log",...e)}function Yl(...e){Si("warn",...e)}function ql(...e){Si("error",...e)}function Si(e,...t){R&&Qs()&&bt(()=>{P.console[e](`${$l}[${e}]:`,...t)})}function Ci(){return R?st("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var D={enable:jl,disable:Wl,isEnabled:Qs,log:zl,warn:Yl,error:ql};var Zs=/\(error: (.*)\)/,ea=/captureMessage|captureException/;function Ti(...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 u=r;u<s.length;u++){let l=s[u];if(l.length>1024)continue;let h=Zs.test(l)?l.replace(Zs,"$1"):l;if(!h.match(/\S*Error: /)){for(let y of t){let p=y(h);if(p){o.push(p);break}}if(o.length>=50+i)break}}return ta(o.slice(i))}}function ta(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(sr(t).function||"")&&t.pop(),t.reverse(),ea.test(sr(t).function||"")&&(t.pop(),ea.test(sr(t).function||"")&&t.pop()),t.slice(0,50).map(n=>F(_({},n),{filename:n.filename||sr(t).filename,function:n.function||"?"}))}function sr(e){return e[e.length-1]||{}}var Ii="<anonymous>";function Pe(e){try{return!e||typeof e!="function"?Ii:e.name||Ii}catch{return Ii}}function ar(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 cr={},na={};function _e(e,t){cr[e]=cr[e]||[],cr[e].push(t)}function ve(e,t){if(!na[e]){na[e]=!0;try{t()}catch(n){R&&D.error(`Error while instrumenting ${e}`,n)}}}function se(e,t){let n=e&&cr[e];if(n)for(let r of n)try{r(t)}catch(i){R&&D.error(`Error while triggering instrumentation handler.
|
|
4
4
|
Type: ${e}
|
|
5
5
|
Name: ${Pe(r)}
|
|
@@ -21,4 +21,4 @@ Url: ${Or(e)}`),!0}return!1}function uf(e,t){return t?.length?Dr(e).some(n=>Zt(n
|
|
|
21
21
|
style="background-color: ${i?.color?.rgba};">
|
|
22
22
|
</span>
|
|
23
23
|
`};this.swiperInstance=new window.CooeeSDK.Swiper(n,_({navigation:r,pagination:o},this.options())),this.swiperInstance.on("slideChange",s=>{this.slideChange.emit(s)})}onResize(){this.swiperInstance?(he.verbose("Updating swiper"),this.swiperInstance.update()):(he.verbose("Reinitialising swiper"),this.reInitSwiper())}reInitSwiper(){this.initToken++;let t=this.initToken;this.swiperInstance?.destroy?.(),this.swiperInstance=void 0,this.initSwiper(t)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ee({type:e,selectors:[["cooee-swiper"]],hostAttrs:[1,"swiper"],inputs:{options:[1,"options"],navigationConfig:[1,"navigationConfig"],paginationConfig:[1,"paginationConfig"]},outputs:{slideChange:"slideChange"},ngContentSelectors:Wm,decls:4,vars:2,consts:[[1,"swiper-wrapper"],[1,"swiper-pagination",3,"style"],[1,"swiper-button-prev"],[1,"swiper-button-next"],[1,"swiper-pagination"]],template:function(n,r){if(n&1&&(Os(jm),pe(0,"div",0),Rs(1),ge(),Q(2,qm,4,7),Q(3,Km,2,4,"div",1)),n&2){let i,o;N(2),Z((i=r.navigationConfig())!=null&&i.enabled?2:-1),N(),Z((o=r.paginationConfig())!=null&&o.enabled?3:-1)}},styles:[`:host{display:block}.swiper-wrapper{scrollbar-width:none;display:flex}.swiper-wrapper::-webkit-scrollbar{display:none}.swiper .swiper-button-prev,.swiper .swiper-button-next{background:rgba(var(--lc-icon-button-bg-color));width:var(--lc-icon-button-size);height:var(--lc-icon-button-size);border-radius:100%}.swiper .swiper-button-prev:after,.swiper .swiper-button-next:after{font-size:20px;color:rgba(var(--lc-icon-button-color))}
|
|
24
|
-
`],encapsulation:2})};function Xm(e,t){if(e&1&&(pe(0,"span",1),ee(1),ge()),e&2){B();let n=be(0);N(),_t(n.heading)}}function Jm(e,t){if(e&1&&(pe(0,"span",2),ee(1),ge()),e&2){B();let n=be(0);N(),_t(n.subHeading)}}var Du=class e{card=Se.required();linkClicked=vt();linkAfterSanity(){return this.card()?.buttonLink?.startsWith("https")?this.card().buttonLink:null}clickLink(t){t.stopPropagation(),this.linkClicked.emit()}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ee({type:e,selectors:[["cooee-video-card"]],inputs:{card:[1,"card"]},outputs:{linkClicked:"linkClicked"},decls:6,vars:6,consts:[[1,"video-card-details"],[1,"heading"],[1,"subheading"],["rel","noopener noreferrer",1,"cta-button",3,"click","href","target"]],template:function(n,r){if(n&1){let i=$e();je(0),pe(1,"div",0),Q(2,Xm,2,1,"span",1),Q(3,Jm,2,1,"span",2),pe(4,"a",3),vn("click",function(s){return Ie(i),Te(r.clickLink(s))}),ee(5),ge()()}if(n&2){let i=We(r.card());N(2),Z(i!=null&&i.heading?2:-1),N(),Z(i!=null&&i.subHeading?3:-1),N(),gt("href",r.linkAfterSanity(),mt)("target",i.newTab?"_blank":"_self"),N(),Wt(" ",i==null?null:i.buttonTitle," ")}},styles:["[_nghost-%COMP%]{display:block}.video-card-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3.75px;font-size:14px;line-height:normal}.video-card-details[_ngcontent-%COMP%] .cta-button[_ngcontent-%COMP%]{text-align:center;background-color:#fff;border-radius:var(--lc-button-radius);padding:7.5px 15px;font-weight:500;color:rgba(var(--lc-primary-button-bg-color));font-size:12px;border:0;text-decoration:none}.video-card-details[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%], .video-card-details[_ngcontent-%COMP%] .subheading[_ngcontent-%COMP%]{text-align:start;color:#000;font-weight:600;overflow:hidden}.video-card-details[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%]{font-size:18px}.video-card-details[_ngcontent-%COMP%] .subheading[_ngcontent-%COMP%]{font-size:16px}"],changeDetection:0})};function Qm(e,t){e&1&&Me(0,"cooee-icon",1)}function Zm(e,t){e&1&&Me(0,"cooee-icon",2)}var wu=class e{muted=bn.required();videoEl=Se.required();toggled=vt();constructor(){At(()=>{this.videoEl().muted=this.muted(),this.muted()||this.videoEl().play()})}toggle(t){t.stopPropagation(),t.preventDefault(),this.muted.update(n=>!n),this.toggled.emit(this.muted())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ee({type:e,selectors:[["cooee-mute-toggle"]],inputs:{muted:[1,"muted"],videoEl:[1,"videoEl"]},outputs:{muted:"mutedChange",toggled:"toggled"},decls:3,vars:5,consts:[["type","button",3,"click"],["name","unmute"],["name","mute"]],template:function(n,r){n&1&&(W(0,"button",0),ke("click",function(o){return r.toggle(o)}),Q(1,Qm,1,0,"cooee-icon",1)(2,Zm,1,0,"cooee-icon",2),z()),n&2&&(yn("unmute",!r.muted()),Gt("aria-label",r.muted()?"Unmute video":"Mute video")("aria-pressed",r.muted()),N(),Z(r.muted()?1:2))},dependencies:[nr],styles:["button[_ngcontent-%COMP%]{width:var(--lc-icon-button-size, 44px);height:var(--lc-icon-button-size, 44px);display:flex;justify-content:center;align-items:center;border:none;border-radius:100%;background:#00000080;background:color-mix(in oklab,#000 50%,transparent)}"]})};function eh(e,t){if(e&1&&(tt(0,"span",6),Ue(1,"cooeeCurrency"),Ue(2,"safeHtml")),e&2){B();let n=be(7);gt("innerHTML",Be(2,3,Be(1,1,n.cmp)),Dt)}}function th(e,t){e&1&&ee(0," Out of Stock ")}function nh(e,t){e&1&&ee(0," Add To Cart ")}var Au=class e{buttonClick=vt();item=Se.required();isButtonDisabled=wt(()=>{let t=this.item();return t.hasVariants()?!t.vars.some(n=>n.isAvailable):!t.selectedOrFirstVariant.value.isAvailable});addToCartClicked(t){t.stopPropagation(),this.buttonClick.emit(this.item())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ee({type:e,selectors:[["cooee-item-card"]],inputs:{item:[1,"item"]},outputs:{buttonClick:"buttonClick"},decls:20,vars:14,consts:[[1,"card-body"],[1,"item-image",3,"alt","src"],[1,"item-info"],[1,"item-name"],[1,"prices"],[1,"item-price",3,"innerHTML"],[1,"item-cmp-price",3,"innerHTML"],["type","button",1,"shop-now-button",3,"click","href"],[1,"card-footer"],["type","button",1,"cta-button",3,"click","disabled"],["href","/cart","title","View Cart",1,"view-cart-button"],["width","32","height","32","src","https://img.icons8.com/material-sharp/48/shopping-cart.png","alt","shopping-cart"]],template:function(n,r){if(n&1){let i=$e();ws(0),pe(1,"div",0),tt(2,"img",1),pe(3,"div",2)(4,"div",3),ee(5),ge(),pe(6,"div",4),je(7),tt(8,"span",5),Ue(9,"cooeeCurrency"),Ue(10,"safeHtml"),Q(11,eh,3,5,"span",6),ge(),pe(12,"a",7),vn("click",function(s){return Ie(i),Te(s.stopPropagation())}),ee(13," Shop now "),ge()()(),pe(14,"div",8)(15,"button",9),vn("click",function(s){return Ie(i),Te(r.addToCartClicked(s))}),Q(16,th,1,0)(17,nh,1,0),ge(),pe(18,"a",10),tt(19,"img",11),ge()(),As()}if(n&2){let i=r.item().selectedOrFirstVariant.value;N(2),gt("alt",Ms(r.item().name))("src",r.item().firstImageURL,mt),N(3),Wt(" ",r.item().name," "),N(2);let o=We(i.price);N(),gt("innerHTML",Be(10,12,Be(9,10,o.d)),Dt),N(3),Z(o.cmp?11:-1),N(),gt("href","/products/"+r.item().slug,mt),N(3),gt("disabled",r.isButtonDisabled()),N(),Z(r.isButtonDisabled()?16:17)}},dependencies:[sn,tr],styles:["[_nghost-%COMP%]{max-width:100%;position:relative;display:flex;flex-direction:column;gap:8px;padding:8px}.card-body[_ngcontent-%COMP%]{display:flex;gap:8px;width:100%;align-items:flex-start}.item-image[_ngcontent-%COMP%]{width:70px;height:70px;object-fit:cover;box-sizing:border-box;border-radius:var(--lc-media-radius)}.item-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3.5px;font-size:10.5px}.item-name[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.card-footer[_ngcontent-%COMP%]{display:flex;gap:6px;align-items:center}.cta-button[_ngcontent-%COMP%]{padding:10px;border:none;width:100%;text-align:center}.shop-now-button[_ngcontent-%COMP%]{display:none;background:rgb(var(--lc-primary-button-bg-color));color:rgb(var(--lc-primary-button-color));border-radius:var(--lc-button-radius);font-size:12px;width:fit-content;height:auto;text-align:center;z-index:4;padding:4px 10px;text-decoration:none}.view-cart-button[_ngcontent-%COMP%]{display:none}"]})};export{yt as a,js as b,Ws as c,ot as d,Fl as e,Et as f,
|
|
24
|
+
`],encapsulation:2})};function Xm(e,t){if(e&1&&(pe(0,"span",1),ee(1),ge()),e&2){B();let n=be(0);N(),_t(n.heading)}}function Jm(e,t){if(e&1&&(pe(0,"span",2),ee(1),ge()),e&2){B();let n=be(0);N(),_t(n.subHeading)}}var Du=class e{card=Se.required();linkClicked=vt();linkAfterSanity(){return this.card()?.buttonLink?.startsWith("https")?this.card().buttonLink:null}clickLink(t){t.stopPropagation(),this.linkClicked.emit()}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ee({type:e,selectors:[["cooee-video-card"]],inputs:{card:[1,"card"]},outputs:{linkClicked:"linkClicked"},decls:6,vars:6,consts:[[1,"video-card-details"],[1,"heading"],[1,"subheading"],["rel","noopener noreferrer",1,"cta-button",3,"click","href","target"]],template:function(n,r){if(n&1){let i=$e();je(0),pe(1,"div",0),Q(2,Xm,2,1,"span",1),Q(3,Jm,2,1,"span",2),pe(4,"a",3),vn("click",function(s){return Ie(i),Te(r.clickLink(s))}),ee(5),ge()()}if(n&2){let i=We(r.card());N(2),Z(i!=null&&i.heading?2:-1),N(),Z(i!=null&&i.subHeading?3:-1),N(),gt("href",r.linkAfterSanity(),mt)("target",i.newTab?"_blank":"_self"),N(),Wt(" ",i==null?null:i.buttonTitle," ")}},styles:["[_nghost-%COMP%]{display:block}.video-card-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3.75px;font-size:14px;line-height:normal}.video-card-details[_ngcontent-%COMP%] .cta-button[_ngcontent-%COMP%]{text-align:center;background-color:#fff;border-radius:var(--lc-button-radius);padding:7.5px 15px;font-weight:500;color:rgba(var(--lc-primary-button-bg-color));font-size:12px;border:0;text-decoration:none}.video-card-details[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%], .video-card-details[_ngcontent-%COMP%] .subheading[_ngcontent-%COMP%]{text-align:start;color:#000;font-weight:600;overflow:hidden}.video-card-details[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%]{font-size:18px}.video-card-details[_ngcontent-%COMP%] .subheading[_ngcontent-%COMP%]{font-size:16px}"],changeDetection:0})};function Qm(e,t){e&1&&Me(0,"cooee-icon",1)}function Zm(e,t){e&1&&Me(0,"cooee-icon",2)}var wu=class e{muted=bn.required();videoEl=Se.required();toggled=vt();constructor(){At(()=>{this.videoEl().muted=this.muted(),this.muted()||this.videoEl().play()})}toggle(t){t.stopPropagation(),t.preventDefault(),this.muted.update(n=>!n),this.toggled.emit(this.muted())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ee({type:e,selectors:[["cooee-mute-toggle"]],inputs:{muted:[1,"muted"],videoEl:[1,"videoEl"]},outputs:{muted:"mutedChange",toggled:"toggled"},decls:3,vars:5,consts:[["type","button",3,"click"],["name","unmute"],["name","mute"]],template:function(n,r){n&1&&(W(0,"button",0),ke("click",function(o){return r.toggle(o)}),Q(1,Qm,1,0,"cooee-icon",1)(2,Zm,1,0,"cooee-icon",2),z()),n&2&&(yn("unmute",!r.muted()),Gt("aria-label",r.muted()?"Unmute video":"Mute video")("aria-pressed",r.muted()),N(),Z(r.muted()?1:2))},dependencies:[nr],styles:["button[_ngcontent-%COMP%]{width:var(--lc-icon-button-size, 44px);height:var(--lc-icon-button-size, 44px);display:flex;justify-content:center;align-items:center;border:none;border-radius:100%;background:#00000080;background:color-mix(in oklab,#000 50%,transparent)}"]})};function eh(e,t){if(e&1&&(tt(0,"span",6),Ue(1,"cooeeCurrency"),Ue(2,"safeHtml")),e&2){B();let n=be(7);gt("innerHTML",Be(2,3,Be(1,1,n.cmp)),Dt)}}function th(e,t){e&1&&ee(0," Out of Stock ")}function nh(e,t){e&1&&ee(0," Add To Cart ")}var Au=class e{buttonClick=vt();item=Se.required();isButtonDisabled=wt(()=>{let t=this.item();return t.hasVariants()?!t.vars.some(n=>n.isAvailable):!t.selectedOrFirstVariant.value.isAvailable});addToCartClicked(t){t.stopPropagation(),this.buttonClick.emit(this.item())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ee({type:e,selectors:[["cooee-item-card"]],inputs:{item:[1,"item"]},outputs:{buttonClick:"buttonClick"},decls:20,vars:14,consts:[[1,"card-body"],[1,"item-image",3,"alt","src"],[1,"item-info"],[1,"item-name"],[1,"prices"],[1,"item-price",3,"innerHTML"],[1,"item-cmp-price",3,"innerHTML"],["type","button",1,"shop-now-button",3,"click","href"],[1,"card-footer"],["type","button",1,"cta-button",3,"click","disabled"],["href","/cart","title","View Cart",1,"view-cart-button"],["width","32","height","32","src","https://img.icons8.com/material-sharp/48/shopping-cart.png","alt","shopping-cart"]],template:function(n,r){if(n&1){let i=$e();ws(0),pe(1,"div",0),tt(2,"img",1),pe(3,"div",2)(4,"div",3),ee(5),ge(),pe(6,"div",4),je(7),tt(8,"span",5),Ue(9,"cooeeCurrency"),Ue(10,"safeHtml"),Q(11,eh,3,5,"span",6),ge(),pe(12,"a",7),vn("click",function(s){return Ie(i),Te(s.stopPropagation())}),ee(13," Shop now "),ge()()(),pe(14,"div",8)(15,"button",9),vn("click",function(s){return Ie(i),Te(r.addToCartClicked(s))}),Q(16,th,1,0)(17,nh,1,0),ge(),pe(18,"a",10),tt(19,"img",11),ge()(),As()}if(n&2){let i=r.item().selectedOrFirstVariant.value;N(2),gt("alt",Ms(r.item().name))("src",r.item().firstImageURL,mt),N(3),Wt(" ",r.item().name," "),N(2);let o=We(i.price);N(),gt("innerHTML",Be(10,12,Be(9,10,o.d)),Dt),N(3),Z(o.cmp?11:-1),N(),gt("href","/products/"+r.item().slug,mt),N(3),gt("disabled",r.isButtonDisabled()),N(),Z(r.isButtonDisabled()?16:17)}},dependencies:[sn,tr],styles:["[_nghost-%COMP%]{max-width:100%;position:relative;display:flex;flex-direction:column;gap:8px;padding:8px}.card-body[_ngcontent-%COMP%]{display:flex;gap:8px;width:100%;align-items:flex-start}.item-image[_ngcontent-%COMP%]{width:70px;height:70px;object-fit:cover;box-sizing:border-box;border-radius:var(--lc-media-radius)}.item-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3.5px;font-size:10.5px}.item-name[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.card-footer[_ngcontent-%COMP%]{display:flex;gap:6px;align-items:center}.cta-button[_ngcontent-%COMP%]{padding:10px;border:none;width:100%;text-align:center}.shop-now-button[_ngcontent-%COMP%]{display:none;background:rgb(var(--lc-primary-button-bg-color));color:rgb(var(--lc-primary-button-color));border-radius:var(--lc-button-radius);font-size:12px;width:fit-content;height:auto;text-align:center;z-index:4;padding:4px 10px;text-decoration:none}.view-cart-button[_ngcontent-%COMP%]{display:none}"]})};export{yt as a,js as b,Ws as c,ot as d,Fl as e,Et as f,pg as g,kl as h,rr as i,ir as j,vi as k,Gc as l,qp as m,ko as n,sn as o,Js as p,yi as q,Fg as r,Kt as s,Wc as t,Ve as u,zc as v,Gm as w,$m as x,xu as y,Du as z,wu as A,Au as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as p,o as d,p as g}from"./chunk-
|
|
1
|
+
import{g as p,o as d,p as g}from"./chunk-BULX73XB.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};
|