@letscooee/web-sdk 11.0.0-rc.0 → 11.0.0-rc.1

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/.release-it.json CHANGED
@@ -10,7 +10,36 @@
10
10
  "@release-it/conventional-changelog": {
11
11
  "infile": "CHANGELOG.md",
12
12
  "writerOpts": {
13
- "groupBy": "scope"
13
+ "groupBy": "type"
14
+ },
15
+ "preset": {
16
+ "name": "conventionalcommits",
17
+ "types": [
18
+ {
19
+ "type": "feat",
20
+ "section": "Features"
21
+ },
22
+ {
23
+ "type": "fix",
24
+ "section": "Bug Fixes"
25
+ },
26
+ {
27
+ "type": "style",
28
+ "section": "Styles"
29
+ },
30
+ {
31
+ "type": "perf",
32
+ "section": "Performance Improvements"
33
+ },
34
+ {
35
+ "type": "refactor",
36
+ "section": "Refactoring"
37
+ },
38
+ {
39
+ "type": "chore",
40
+ "section": "Chores"
41
+ }
42
+ ]
14
43
  }
15
44
  }
16
45
  },
@@ -1,3 +1,3 @@
1
- import{a as I,b as ye,d as Te,f as H,h as De,j as E,l as X,m as Z,q as be,s as Ee,t as ke,u as Me,w as Pe,x as Oe,y as Se,z as Ae}from"./chunk-5EYT2ZXX.js";import{$a as Ce,Aa as q,C as y,Cb as Ie,E as p,Ea as C,F as m,G as M,Ga as u,H as ie,Ia as a,K as oe,L as P,La as K,Ma as W,Na as G,Oa as ce,P as O,Pa as se,Qa as k,R as S,Ra as pe,S as T,T as r,Ua as h,Va as me,Xa as ue,Ya as ge,Za as _e,_a as ve,aa as f,ab as R,bb as he,eb as fe,ga as A,gb as D,ha as Q,hb as b,jb as we,la as F,ma as _,mb as L,na as v,nb as Y,oa as N,ob as z,pa as w,pb as xe,qa as x,qb as J,ra as s,sa as c,ta as d,ua as g,va as ne,wa as re,wb as B,xa as le,ya as ae,yb as Ve,za as de}from"./chunk-S6UU36F3.js";var Ne=i=>({active:i}),Re=(i,t)=>t.mID;function Le(i,t){if(i&1&&g(0,"img",9),i&2){let e=t.$implicit,n=a();s("src",e.url,T)("alt",n.item().name)}}function ze(i,t){if(i&1&&(g(0,"span",18),D(1,"cooeeCurrency"),D(2,"safeHtml")),i&2){a(2);let e=R(15);s("innerHTML",b(2,3,b(1,1,e.d)),S)}}function Be(i,t){if(i&1&&(g(0,"span",19),D(1,"cooeeCurrency"),D(2,"safeHtml")),i&2){a(2);let e=R(15);s("innerHTML",b(2,3,b(1,1,e.cmp)),S)}}function He(i,t){if(i&1&&(c(0,"div",12),_(1,ze,3,5,"span",18),_(2,Be,3,5,"span",19),d()),i&2){a();let e=R(15);r(),v(e.d?1:-1),r(),v(e.cmp?2:-1)}}function je(i,t){if(i&1){let e=C();c(0,"a",22),u("click",function(o){let l=p(e).$implicit,V=a(2);return m(V.changeItem(o,l))}),g(1,"img",23),d()}if(i&2){let e=t.$implicit,n=a(2);r(),s("src",e.firstImageURL,T)("alt",n.item().name)("ngClass",fe(3,Ne,e.mID===n.item().mID+""))}}function $e(i,t){if(i&1&&(c(0,"span",20),h(1,"Select product"),d(),c(2,"div",8),w(3,je,2,5,"a",21,Re),d()),i&2){let e=a();r(3),x(e.similarItems())}}function Ue(i,t){if(i&1&&(c(0,"span",24),h(1,"Select variant"),d(),g(2,"cooee-item-options-picker",25)),i&2){let e=a();r(2),s("item",e.item())}}function Qe(i,t){if(i&1&&(c(0,"div",26),h(1,"Description"),d(),g(2,"div",27),D(3,"safeHtml")),i&2){let e=a();r(2),s("innerHTML",b(3,1,e.item().desc),S)}}function qe(i,t){i&1&&h(0," Add To Cart ")}function Ke(i,t){i&1&&h(0," Out of stock ")}var j=class i{closeModel=new Q;performCTA=new Q;item=J.required();similarItems=J.required();closeDialog(){this.closeModel.emit()}clickAddToCart(){this.performCTA.emit({item:this.item(),cta:E.ADD_TO_CART})}openCart(){this.performCTA.emit({item:this.item(),cta:E.OPEN_CART})}changeItem(t,e){t.stopPropagation(),t.preventDefault(),this.item.set(e)}goToPDP(){this.performCTA.emit({item:this.item(),cta:E.GO_TO_PRODUCT})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=f({type:i,selectors:[["cooee-item-detail"]],hostAttrs:[1,"letscooee-widget"],inputs:{item:[1,"item"],similarItems:[1,"similarItems"]},outputs:{closeModel:"closeModel",performCTA:"performCTA",item:"itemChange",similarItems:"similarItemsChange"},decls:28,vars:8,consts:[[1,"lc-card-wrapper"],[1,"lc-card-header"],[1,"lc-header"],["type","button",1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","fill","#000"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc-card-content"],[1,"lc-image-strip"],[1,"w-28","h-28","object-contain",3,"src","alt"],[1,"lc-inner-body"],[1,"lc-item-name"],[1,"lc-prices"],[1,"lc-card-footer"],["type","button",1,"lc-cta-button",3,"click","disabled"],["type","button",1,"lc-more-info-button",3,"click"],["type","button","title","View Cart",1,"view-cart-button",3,"click"],["width","32","height","32","src","https://img.icons8.com/material-sharp/48/shopping-cart.png","alt","shopping-cart"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-item-cmp-price",3,"innerHTML"],[1,"lc-selected-product-title"],["href","#"],["href","#",3,"click"],[1,"product-selector",3,"src","alt","ngClass"],[1,"lc-selected-variant-title"],[3,"item"],[1,"lc-description-title"],[1,"lc-description",3,"innerHTML"]],template:function(e,n){if(e&1){let o=C();c(0,"div",0)(1,"div",1)(2,"div",2),h(3,"Shop Now"),d(),c(4,"button",3),u("click",function(){return p(o),m(n.closeDialog())}),M(),c(5,"svg",4),g(6,"path",5)(7,"path",6),d()()(),ie(),c(8,"div",7)(9,"div",8),w(10,Le,1,2,"img",9,N),d(),c(12,"div",10)(13,"div",11),h(14),d(),ve(15),_(16,He,3,2,"div",12),_(17,$e,5,0),_(18,Ue,3,1),_(19,Qe,4,3),d()(),c(20,"div",13)(21,"button",14),u("click",function(){return p(o),m(n.clickAddToCart())}),_(22,qe,1,0)(23,Ke,1,0),d(),c(24,"button",15),u("click",function(){return p(o),m(n.goToPDP())}),h(25," More Info "),d(),c(26,"button",16),u("click",function(){return p(o),m(n.openCart())}),g(27,"img",17),d()()()}if(e&2){let o=n.item().selectedOrFirstVariant.value;r(10),x(n.item().imgs),r(4),me(n.item().name),r();let l=Ce(o==null?null:o.price);r(),v(l?16:-1),r(),v(n.similarItems().length>1?17:-1),r(),v(n.item().hasVariants()?18:-1),r(),v(n.item().desc?19:-1),r(2),s("disabled",!o.isAvailable),r(),v(o.isAvailable?22:23)}},dependencies:[B,De,Ie,be],styles:["[_nghost-%COMP%]{display:block;background:#fff}.lc-card-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%;overflow:auto}.lc-card-header[_ngcontent-%COMP%]{display:var(--header-display, flex);flex-direction:row;justify-content:space-between;align-items:center;padding:8px 16px;border-bottom:1px solid var(--lc-color-gray-300)}.lc-header[_ngcontent-%COMP%]{font-size:24px;font-weight:500;color:#000}.lc-close-button[_ngcontent-%COMP%]{background:transparent;border:none;width:36px;height:36px}.lc-close-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:#000000b3}.lc-card-content[_ngcontent-%COMP%]{flex:1;overflow-y:auto;overscroll-behavior:contain}.lc-inner-body[_ngcontent-%COMP%]{padding:16px;display:flex;flex-direction:column;gap:8px}.lc-image-strip[_ngcontent-%COMP%]{width:100%;display:flex;overflow-x:auto;gap:.5rem;flex-wrap:nowrap}.lc-image-strip[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:auto;height:200px}.lc-image-strip[_ngcontent-%COMP%] .product-selector[_ngcontent-%COMP%]{height:100px;flex-shrink:0;padding:2px}.lc-image-strip[_ngcontent-%COMP%] .product-selector.active[_ngcontent-%COMP%]{border:red solid 1px}.lc-item-name[_ngcontent-%COMP%]{font-size:20px;font-weight:600;line-height:normal;color:rgb(var(--lc-color-text))}.lc-item-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500;color:rgb(var(--lc-color-text))}.lc-item-cmp-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500;color:rgba(var(--lc-color-text),.75);margin-left:10px;text-decoration:line-through;display:none}.lc-description-title[_ngcontent-%COMP%], .lc-selected-product-title[_ngcontent-%COMP%], .lc-selected-variant-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;margin-top:8px;line-height:normal;color:#000}.lc-description[_ngcontent-%COMP%]{line-height:normal;color:#000}.lc-card-footer[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;padding:12px;background-color:#0000004d;box-shadow:0 4px 6px #52525b4d;gap:12px}.lc-cta-button[_ngcontent-%COMP%], .lc-more-info-button[_ngcontent-%COMP%]{width:50%;padding:12px;border:none;border-radius:.5rem;font-weight:600;display:flex;justify-content:center;align-items:center;font-size:16px}.lc-cta-button[_ngcontent-%COMP%]{background-color:#000;color:#fff}.lc-cta-button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.lc-more-info-button[_ngcontent-%COMP%]{background-color:#fff;color:#000}.view-cart-button[_ngcontent-%COMP%]{background:transparent;border:none}"]})};var $=class i{video=z.required();progress=P(0);constructor(){L(t=>{let e=this.video(),n=()=>{this.progress.set(e.currentTime/e.duration*100)};e.addEventListener("timeupdate",n),t(()=>{e.removeEventListener("timeupdate",n)})})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=f({type:i,selectors:[["cooee-video-progress-bar"]],inputs:{video:[1,"video"]},decls:3,vars:3,consts:[[1,"video-untracked-path"],["role","progressbar",1,"video-tracked-path"]],template:function(e,n){e&1&&(ne(0,"div",0)(1,"div",1),le(2,"div"),re()()),e&2&&(r(),pe("width",n.progress(),"%"),F("aria-valuenow",n.progress()))},styles:["[_nghost-%COMP%]{display:block;width:100%;position:absolute;z-index:10;top:4px;padding-inline:8px;box-sizing:border-box}.video-untracked-path[_ngcontent-%COMP%]{height:4px;background-color:#374151;width:100%;margin-bottom:2px}.video-tracked-path[_ngcontent-%COMP%]{height:4px;background-color:rgba(var(--lc-color-primary),.1);transition:width .5s ease-in-out}"]})};var We=["swiperContainer"],Ge=(i,t)=>t.id;function Ye(i,t){if(i&1){let e=C();c(0,"div",3)(1,"cooee-item-card",4),u("buttonClick",function(o){p(e);let l=a();return m(l.onButtonClick(o))})("click",function(){let o=p(e).$implicit,l=a();return m(l.cardClick.emit(o))}),d()()}if(i&2){let e=t.$implicit;r(),s("item",e)}}var U=class i{items=z.required();cardClick=Y();buttonClick=Y();destroyRef=y(oe);elementRef=y(O);swiperContainerRef=xe.required("swiperContainer");swiperInstance;constructor(){L(()=>{this.initSwiper()}),this.destroyRef.onDestroy(()=>{this.swiperInstance?.destroy()})}ngOnInit(){H(this.elementRef.nativeElement.shadowRoot)}onButtonClick(t){let e=Te.get().website?.canChangeVariantInCart;if(this.items()?.length>1||t.hasVariants()&&!e){this.cardClick.emit(t);return}this.buttonClick.emit(t)}initSwiper(){this.swiperInstance=new window.CooeeSDK.Swiper(this.swiperContainerRef().nativeElement,{direction:"horizontal",effect:"slide",slidesPerView:1.2,nested:!0,centeredSlides:!0,spaceBetween:12,mousewheel:{enabled:!0,thresholdDelta:10,thresholdTime:200}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=f({type:i,selectors:[["cooee-video-promoted-items"]],viewQuery:function(e,n){e&1&&ce(n.swiperContainerRef,We,5),e&2&&se()},inputs:{items:[1,"items"]},outputs:{cardClick:"cardClick",buttonClick:"buttonClick"},decls:5,vars:0,consts:[["swiperContainer",""],[1,"swiper-container"],[1,"swiper-wrapper"],[1,"swiper-slide"],["tabindex","0",3,"buttonClick","click","item"]],template:function(e,n){e&1&&(c(0,"div",1,0)(2,"div",2),w(3,Ye,2,1,"div",3,Ge),d()()),e&2&&(r(3),x(n.items()))},dependencies:[Ae],styles:[`:host{display:block;width:100%}cooee-item-card{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background-color:#ffffff80;border-radius:7px;cursor:pointer}
1
+ import{a as I,b as ye,d as Te,f as H,h as De,j as E,l as X,m as Z,q as be,s as Ee,t as ke,u as Me,w as Pe,x as Oe,y as Se,z as Ae}from"./chunk-W76YVDW6.js";import{$a as Ce,Aa as q,C as y,Cb as Ie,E as p,Ea as C,F as m,G as M,Ga as u,H as ie,Ia as a,K as oe,L as P,La as K,Ma as W,Na as G,Oa as ce,P as O,Pa as se,Qa as k,R as S,Ra as pe,S as T,T as r,Ua as h,Va as me,Xa as ue,Ya as ge,Za as _e,_a as ve,aa as f,ab as R,bb as he,eb as fe,ga as A,gb as D,ha as Q,hb as b,jb as we,la as F,ma as _,mb as L,na as v,nb as Y,oa as N,ob as z,pa as w,pb as xe,qa as x,qb as J,ra as s,sa as c,ta as d,ua as g,va as ne,wa as re,wb as B,xa as le,ya as ae,yb as Ve,za as de}from"./chunk-S6UU36F3.js";var Ne=i=>({active:i}),Re=(i,t)=>t.mID;function Le(i,t){if(i&1&&g(0,"img",9),i&2){let e=t.$implicit,n=a();s("src",e.url,T)("alt",n.item().name)}}function ze(i,t){if(i&1&&(g(0,"span",18),D(1,"cooeeCurrency"),D(2,"safeHtml")),i&2){a(2);let e=R(15);s("innerHTML",b(2,3,b(1,1,e.d)),S)}}function Be(i,t){if(i&1&&(g(0,"span",19),D(1,"cooeeCurrency"),D(2,"safeHtml")),i&2){a(2);let e=R(15);s("innerHTML",b(2,3,b(1,1,e.cmp)),S)}}function He(i,t){if(i&1&&(c(0,"div",12),_(1,ze,3,5,"span",18),_(2,Be,3,5,"span",19),d()),i&2){a();let e=R(15);r(),v(e.d?1:-1),r(),v(e.cmp?2:-1)}}function je(i,t){if(i&1){let e=C();c(0,"a",22),u("click",function(o){let l=p(e).$implicit,V=a(2);return m(V.changeItem(o,l))}),g(1,"img",23),d()}if(i&2){let e=t.$implicit,n=a(2);r(),s("src",e.firstImageURL,T)("alt",n.item().name)("ngClass",fe(3,Ne,e.mID===n.item().mID+""))}}function $e(i,t){if(i&1&&(c(0,"span",20),h(1,"Select product"),d(),c(2,"div",8),w(3,je,2,5,"a",21,Re),d()),i&2){let e=a();r(3),x(e.similarItems())}}function Ue(i,t){if(i&1&&(c(0,"span",24),h(1,"Select variant"),d(),g(2,"cooee-item-options-picker",25)),i&2){let e=a();r(2),s("item",e.item())}}function Qe(i,t){if(i&1&&(c(0,"div",26),h(1,"Description"),d(),g(2,"div",27),D(3,"safeHtml")),i&2){let e=a();r(2),s("innerHTML",b(3,1,e.item().desc),S)}}function qe(i,t){i&1&&h(0," Add To Cart ")}function Ke(i,t){i&1&&h(0," Out of stock ")}var j=class i{closeModel=new Q;performCTA=new Q;item=J.required();similarItems=J.required();closeDialog(){this.closeModel.emit()}clickAddToCart(){this.performCTA.emit({item:this.item(),cta:E.ADD_TO_CART})}openCart(){this.performCTA.emit({item:this.item(),cta:E.OPEN_CART})}changeItem(t,e){t.stopPropagation(),t.preventDefault(),this.item.set(e)}goToPDP(){this.performCTA.emit({item:this.item(),cta:E.GO_TO_PRODUCT})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=f({type:i,selectors:[["cooee-item-detail"]],hostAttrs:[1,"letscooee-widget"],inputs:{item:[1,"item"],similarItems:[1,"similarItems"]},outputs:{closeModel:"closeModel",performCTA:"performCTA",item:"itemChange",similarItems:"similarItemsChange"},decls:28,vars:8,consts:[[1,"lc-card-wrapper"],[1,"lc-card-header"],[1,"lc-header"],["type","button",1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","fill","#000"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc-card-content"],[1,"lc-image-strip"],[1,"w-28","h-28","object-contain",3,"src","alt"],[1,"lc-inner-body"],[1,"lc-item-name"],[1,"lc-prices"],[1,"lc-card-footer"],["type","button",1,"lc-cta-button",3,"click","disabled"],["type","button",1,"lc-more-info-button",3,"click"],["type","button","title","View Cart",1,"view-cart-button",3,"click"],["width","32","height","32","src","https://img.icons8.com/material-sharp/48/shopping-cart.png","alt","shopping-cart"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-item-cmp-price",3,"innerHTML"],[1,"lc-selected-product-title"],["href","#"],["href","#",3,"click"],[1,"product-selector",3,"src","alt","ngClass"],[1,"lc-selected-variant-title"],[3,"item"],[1,"lc-description-title"],[1,"lc-description",3,"innerHTML"]],template:function(e,n){if(e&1){let o=C();c(0,"div",0)(1,"div",1)(2,"div",2),h(3,"Shop Now"),d(),c(4,"button",3),u("click",function(){return p(o),m(n.closeDialog())}),M(),c(5,"svg",4),g(6,"path",5)(7,"path",6),d()()(),ie(),c(8,"div",7)(9,"div",8),w(10,Le,1,2,"img",9,N),d(),c(12,"div",10)(13,"div",11),h(14),d(),ve(15),_(16,He,3,2,"div",12),_(17,$e,5,0),_(18,Ue,3,1),_(19,Qe,4,3),d()(),c(20,"div",13)(21,"button",14),u("click",function(){return p(o),m(n.clickAddToCart())}),_(22,qe,1,0)(23,Ke,1,0),d(),c(24,"button",15),u("click",function(){return p(o),m(n.goToPDP())}),h(25," More Info "),d(),c(26,"button",16),u("click",function(){return p(o),m(n.openCart())}),g(27,"img",17),d()()()}if(e&2){let o=n.item().selectedOrFirstVariant.value;r(10),x(n.item().imgs),r(4),me(n.item().name),r();let l=Ce(o==null?null:o.price);r(),v(l?16:-1),r(),v(n.similarItems().length>1?17:-1),r(),v(n.item().hasVariants()?18:-1),r(),v(n.item().desc?19:-1),r(2),s("disabled",!o.isAvailable),r(),v(o.isAvailable?22:23)}},dependencies:[B,De,Ie,be],styles:["[_nghost-%COMP%]{display:block;background:#fff}.lc-card-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%;overflow:auto}.lc-card-header[_ngcontent-%COMP%]{display:var(--header-display, flex);flex-direction:row;justify-content:space-between;align-items:center;padding:8px 16px;border-bottom:1px solid var(--lc-color-gray-300)}.lc-header[_ngcontent-%COMP%]{font-size:24px;font-weight:500;color:#000}.lc-close-button[_ngcontent-%COMP%]{background:transparent;border:none;width:36px;height:36px}.lc-close-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:#000000b3}.lc-card-content[_ngcontent-%COMP%]{flex:1;overflow-y:auto;overscroll-behavior:contain}.lc-inner-body[_ngcontent-%COMP%]{padding:16px;display:flex;flex-direction:column;gap:8px}.lc-image-strip[_ngcontent-%COMP%]{width:100%;display:flex;overflow-x:auto;gap:.5rem;flex-wrap:nowrap}.lc-image-strip[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:auto;height:200px}.lc-image-strip[_ngcontent-%COMP%] .product-selector[_ngcontent-%COMP%]{height:100px;flex-shrink:0;padding:2px}.lc-image-strip[_ngcontent-%COMP%] .product-selector.active[_ngcontent-%COMP%]{border:red solid 1px}.lc-item-name[_ngcontent-%COMP%]{font-size:20px;font-weight:600;line-height:normal;color:rgb(var(--lc-color-text))}.lc-item-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500;color:rgb(var(--lc-color-text))}.lc-item-cmp-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500;color:rgba(var(--lc-color-text),.75);margin-left:10px;text-decoration:line-through;display:none}.lc-description-title[_ngcontent-%COMP%], .lc-selected-product-title[_ngcontent-%COMP%], .lc-selected-variant-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;margin-top:8px;line-height:normal;color:#000}.lc-description[_ngcontent-%COMP%]{line-height:normal;color:#000}.lc-card-footer[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;padding:12px;background-color:#0000004d;box-shadow:0 4px 6px #52525b4d;gap:12px}.lc-cta-button[_ngcontent-%COMP%], .lc-more-info-button[_ngcontent-%COMP%]{width:50%;padding:12px;border:none;border-radius:.5rem;font-weight:600;display:flex;justify-content:center;align-items:center;font-size:16px}.lc-cta-button[_ngcontent-%COMP%]{background-color:#000;color:#fff}.lc-cta-button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.lc-more-info-button[_ngcontent-%COMP%]{background-color:#fff;color:#000}.view-cart-button[_ngcontent-%COMP%]{background:transparent;border:none}"]})};var $=class i{video=z.required();progress=P(0);constructor(){L(t=>{let e=this.video(),n=()=>{this.progress.set(e.currentTime/e.duration*100)};e.addEventListener("timeupdate",n),t(()=>{e.removeEventListener("timeupdate",n)})})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=f({type:i,selectors:[["cooee-video-progress-bar"]],inputs:{video:[1,"video"]},decls:3,vars:3,consts:[[1,"video-untracked-path"],["role","progressbar",1,"video-tracked-path"]],template:function(e,n){e&1&&(ne(0,"div",0)(1,"div",1),le(2,"div"),re()()),e&2&&(r(),pe("width",n.progress(),"%"),F("aria-valuenow",n.progress()))},styles:["[_nghost-%COMP%]{display:block;width:100%;position:absolute;z-index:10;top:4px;padding-inline:8px;box-sizing:border-box}.video-untracked-path[_ngcontent-%COMP%]{height:4px;background-color:#374151;width:100%;margin-bottom:2px}.video-tracked-path[_ngcontent-%COMP%]{height:4px;background-color:rgba(var(--lc-color-primary),.1);transition:width .5s ease-in-out}"]})};var We=["swiperContainer"],Ge=(i,t)=>t.id;function Ye(i,t){if(i&1){let e=C();c(0,"div",3)(1,"cooee-item-card",4),u("buttonClick",function(o){p(e);let l=a();return m(l.onButtonClick(o))})("click",function(){let o=p(e).$implicit,l=a();return m(l.cardClick.emit(o))}),d()()}if(i&2){let e=t.$implicit;r(),s("item",e)}}var U=class i{items=z.required();cardClick=Y();buttonClick=Y();destroyRef=y(oe);elementRef=y(O);swiperContainerRef=xe.required("swiperContainer");swiperInstance;constructor(){L(()=>{this.initSwiper()}),this.destroyRef.onDestroy(()=>{this.swiperInstance?.destroy()})}ngOnInit(){H(this.elementRef.nativeElement.shadowRoot)}onButtonClick(t){let e=Te.get().website?.canChangeVariantInCart;if(this.items()?.length>1||t.hasVariants()&&!e){this.cardClick.emit(t);return}this.buttonClick.emit(t)}initSwiper(){this.swiperInstance=new window.CooeeSDK.Swiper(this.swiperContainerRef().nativeElement,{direction:"horizontal",effect:"slide",slidesPerView:1.2,nested:!0,centeredSlides:!0,spaceBetween:12,mousewheel:{enabled:!0,thresholdDelta:10,thresholdTime:200}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=f({type:i,selectors:[["cooee-video-promoted-items"]],viewQuery:function(e,n){e&1&&ce(n.swiperContainerRef,We,5),e&2&&se()},inputs:{items:[1,"items"]},outputs:{cardClick:"cardClick",buttonClick:"buttonClick"},decls:5,vars:0,consts:[["swiperContainer",""],[1,"swiper-container"],[1,"swiper-wrapper"],[1,"swiper-slide"],["tabindex","0",3,"buttonClick","click","item"]],template:function(e,n){e&1&&(c(0,"div",1,0)(2,"div",2),w(3,Ye,2,1,"div",3,Ge),d()()),e&2&&(r(3),x(n.items()))},dependencies:[Ae],styles:[`:host{display:block;width:100%}cooee-item-card{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background-color:#ffffff80;border-radius:7px;cursor:pointer}
2
2
  `],encapsulation:3})};var Je=["swiperComp"],Xe=["videoEl"],Ze=(i,t)=>t.url;function et(i,t){if(i&1&&g(0,"source",12),i&2){let e=t.$implicit;s("type",he(e.mimeType))("src",e.url,T)}}function tt(i,t){i&1&&q(0)}function it(i,t){if(i&1){let e=C();c(0,"cooee-video-promoted-items",20),u("buttonClick",function(o){p(e);let l=a(2).$implicit,V=a();return m(V.itemButtonClicked(o,l))})("cardClick",function(o){p(e);let l=a(2).$implicit,V=a();return m(V.productCardClicked(o,l))}),d()}if(i&2){let e=a(2).$implicit;s("items",e.items)}}function ot(i,t){if(i&1&&g(0,"cooee-video-card",19),i&2){let e=a(2).$implicit;s("card",e.card)}}function nt(i,t){if(i&1){let e=C();g(0,"cooee-video-progress-bar",14),c(1,"div",15)(2,"cooee-mute-toggle",16),_e("mutedChange",function(o){p(e);let l=a(2);return ge(l.muted,o)||(l.muted=o),m(o)}),u("toggled",function(){p(e);let o=a(2);return m(o.muteToggled())}),d(),A(3,tt,1,0,"ng-container",8),d(),c(4,"div",17),_(5,it,1,1,"cooee-video-promoted-items",18)(6,ot,1,1,"cooee-video-card",19),d()}if(i&2){let e=a().$implicit,n=k(4),o=a(),l=k(9);s("video",n),r(2),ue("muted",o.muted),s("videoEl",n),r(),s("ngTemplateOutlet",l),r(2),v(e.items.length&&o.footerContent===o.VideoConfigFooterContent.FIRST_ITEM?5:e.card&&o.footerContent===o.VideoConfigFooterContent.CARD?6:-1)}}function rt(i,t){if(i&1){let e=C();c(0,"cooee-item-detail",21),u("performCTA",function(o){p(e);let l=a(2);return m(l.performClickToAction(o,l.selectedVideo))})("closeModel",function(){p(e);let o=a(2);return m(o.productModalClosed())}),d()}if(i&2){let e=a(2);s("item",e.selectedItem)("similarItems",e.selectedVideo.items)}}function lt(i,t){if(i&1){let e=C();c(0,"div",6)(1,"div",9)(2,"div",10)(3,"video",11,2),u("click",function(){let o=p(e).$index,l=a();return m(l.currentIndex===o&&l.toggleMute())})("ended",function(){p(e);let o=k(4),l=a();return m(l.onVideoEnded(o))}),w(5,et,1,3,"source",12,Ze),d(),_(7,nt,7,5),d(),_(8,rt,1,2,"cooee-item-detail",13),d()()}if(i&2){let e=t.$implicit,n=t.$index,o=a();r(3),s("ngClass",o.viewTemplateClassName)("poster",e.thumbnail,T),F("data-video-id",e.id)("autoplay",o.currentIndex===n||null)("muted",o.muted||null),r(2),x(e.sources),r(2),v(o.currentIndex===n?7:-1),r(),v(o.selectedItem&&o.currentIndex===n?8:-1)}}function at(i,t){i&1&&q(0)}function dt(i,t){if(i&1){let e=C();c(0,"button",22),u("click",function(){p(e);let o=a();return m(o.close())}),M(),c(1,"svg",23),g(2,"path",24)(3,"path",25),d()()}}var Fe=class i{swiperComponent;videoElements;data=y(Me);VideoConfigFooterContent=Ee;currentIndex=0;muted=P(!1);selectedItem=null;selectedVideo;swiperOptions;detailPopupTemplate;footerContent;viewTemplateClassName="lc-video-only-view";videos=[];elementRef=y(O);dialogRef=y(ke);triggerContext;engagementTrigger;isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";constructor(){this.videos=this.data.videos,this.currentIndex=this.data.currentIndex,this.triggerContext=this.data.triggerContext,this.engagementTrigger=this.triggerContext.triggerData}async ngOnInit(){this.muted.set(await Z.get(X.MUTED,!1));let t=this.engagementTrigger?.content?.videoConfig;switch(this.detailPopupTemplate=t?.detailPopup.template??"VIDEO_ONLY_VIEW",this.footerContent=t?.footerContent??"FIRST_ITEM",H(this.elementRef.nativeElement.shadowRoot),this.detailPopupTemplate){case"PRODUCT_DETAIL_VIEW":this.selectItemForDetailView(),this.viewTemplateClassName="lc-product-detail-view";break;case"VIDEO_ONLY_VIEW":this.viewTemplateClassName="lc-video-only-view";break}}ngAfterViewInit(){this.initSwiperOptions(),queueMicrotask(()=>this.playActiveVideo())}close(t=this.videos[this.currentIndex],e=this.currentIndex){let n=this.getCurrentVideoElement();this.dialogRef.close({lastVideo:t,lastVideoIndex:e,lastVideoDuration:n?.currentTime})}itemButtonClicked(t,e){this.performClickToAction({cta:E.ADD_TO_CART,item:t},e)}performClickToAction(t,e){this.data.onCTAPerformed({cta:t.cta,item:t.item,video:e})}getCurrentVideoElement(){return this.videoElements.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.swiperComponent.swiper.slideTo(this.currentIndex+1)}productModalClosed(){this.selectedItem=null,this.selectedVideo=void 0}pauseAll(){this.videoElements.forEach(t=>t.nativeElement.pause())}toggleMute(){this.muted.update(t=>!t)}async muteToggled(){await Z.set(X.MUTED,this.muted());let e=[this.muted()?I.EVENT_VIDEO_MUTED:I.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(e)}playActiveVideo(){this.pauseAll();let t=this.getCurrentVideoElement();t&&this.playVideo(t)}playVideo(t){t.currentTime=1,t.play().catch(e=>ye.error(e))}onVideoEnded(t){if(this.currentIndex<this.videos.length-1)this.selectedItem?this.playVideo(t):this.moveToNextVideo();else{let e=this.getPreviousVideoDataForEvent(),n=[I.EVENT_LAST_VIDEO_ENDED,{previous:e},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(n),this.playVideo(t)}}onSlideChange(t){let e=this.getPreviousVideoDataForEvent();this.currentIndex=t.realIndex,this.playActiveVideo(),this.detailPopupTemplate==="PRODUCT_DETAIL_VIEW"?this.selectItemForDetailView():(this.selectedItem=null,delete this.selectedVideo);let n=this.currentVideoProps(),o={previous:e,current:n},l=[I.EVENT_VIDEO_CHANGE,o,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(l)}productCardClicked(t,e){let n={videoID:e.id,videoIndex:this.currentIndex},o=[I.EVENT_MORE_ITEM_INFO_CLICKED,{current:n},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(o),this.selectedItem=t,this.selectedVideo=e}initSwiperOptions(){let t=this.isMobile?1:"auto",e=0;this.detailPopupTemplate==="PRODUCT_DETAIL_VIEW"&&(t="auto",e=10),this.swiperOptions={direction:this.isMobile?"vertical":"horizontal",effect:this.isMobile?"slide":"coverflow",slidesPerView:t,initialSlide:this.currentIndex,centeredSlides:!0,spaceBetween:e,coverflowEffect:{rotate:0,stretch:0,depth:400,modifier:1,slideShadows:!1},mousewheel:{enabled:!this.isMobile,invert:!1,thresholdDelta:20}}}currentVideoProps(){return{videoID:this.videos[this.currentIndex].id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let t=this.currentVideoProps(),e=this.videoElements.find(o=>o.nativeElement.dataset.videoId===this.videos[this.currentIndex].id)?.nativeElement;t.playedTillMS=Math.ceil(e?.currentTime*1e3);let n=e?.duration*1e3;return t.playedTillPercent=+(t.playedTillMS/n).toFixed(4),t}selectItemForDetailView(){this.selectedVideo=this.videos[this.currentIndex],this.selectedItem=this.isMobile?null:this.selectedVideo?.items?.[0]??null}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=f({type:i,selectors:[["cooee-video-detail-dialog"]],viewQuery:function(e,n){if(e&1&&(K(Je,7),K(Xe,5)),e&2){let o;W(o=G())&&(n.swiperComponent=o.first),W(o=G())&&(n.videoElements=o)}},hostAttrs:[1,"letscooee-widget"],decls:10,vars:3,consts:[["swiperComp",""],["closeButtonTemplate",""],["videoEl",""],[1,"lc-shadow-inner",3,"ngClass"],[1,"video-swiper",3,"slideChange","options"],["ngProjectAs","swiper-slides",5,["swiper-slides"]],[1,"swiper-slide","video-slide"],[1,"lc-desktop-controls"],[4,"ngTemplateOutlet"],[1,"lc-video-modal-row"],[1,"lc-video-container"],["playsinline","","preload","metadata",1,"lc-video-el",3,"click","ended","ngClass","poster"],[3,"src","type"],[1,"swiper-no-swiping","swiper-no-mousewheel",3,"item","similarItems"],[3,"video"],[1,"lc-video-controls"],[3,"mutedChange","toggled","muted","videoEl"],[1,"lc-card-container"],[3,"items"],[3,"card"],[3,"buttonClick","cardClick","items"],[1,"swiper-no-swiping","swiper-no-mousewheel",3,"performCTA","closeModel","item","similarItems"],["type","button",1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"]],template:function(e,n){if(e&1){let o=C();c(0,"div",3)(1,"cooee-swiper",4,0),u("slideChange",function(V){return p(o),m(n.onSlideChange(V))}),ae(3,5),w(4,lt,9,7,"div",6,N),de(),d(),c(6,"div",7),A(7,at,1,0,"ng-container",8),d()(),A(8,dt,4,0,"ng-template",null,1,we)}if(e&2){let o=k(9);s("ngClass",n.viewTemplateClassName),r(),s("options",n.swiperOptions),r(3),x(n.videos),r(3),s("ngTemplateOutlet",o)}},dependencies:[U,j,Se,$,Ve,B,Oe,Pe],styles:[`:host{display:flex}.lc-shadow-inner{position:relative;width:100vw;height:100vh;display:flex}@media (min-width: 768px){.lc-shadow-inner{background-color:color-mix(in oklab,#000 70%,transparent);justify-content:center;align-items:center}}.video-swiper{--swiper-navigation-size: 50px;--swiper-navigation-color: white;width:100dvw;height:100dvh}.lc-product-detail-view .video-swiper{align-items:center}@media (min-width: 768px){.video-swiper{width:100%;height:100%;max-width:90vw;max-height:90vh}}.video-swiper>.swiper-wrapper{max-height:100%}.lc-product-detail-view .video-swiper>.swiper-wrapper{align-items:center}@media (max-width: 768px){.video-swiper>.swiper-button-prev,.video-swiper>.swiper-button-next{display:none!important}}.video-slide{position:relative;display:flex;align-items:center;visibility:hidden}.lc-product-detail-view .video-slide{width:40vw!important;height:70vh!important}@media (min-width: 768px){.lc-product-detail-view .video-slide{min-width:650px!important}}@media (max-width: 768px){.lc-product-detail-view .video-slide{width:100%!important;height:100%!important}}@media (min-width: 768px){.lc-video-only-view .video-slide{width:fit-content!important}}@media (min-width: 768px){.video-slide{border-radius:12px;overflow:hidden}}.video-slide.swiper-slide-active,.video-slide.swiper-slide-prev,.video-slide.swiper-slide-next{visibility:visible}video{width:100%;height:100%;object-fit:cover}.lc-product-detail-view video{width:100%;object-fit:cover;z-index:-1}.lc-desktop-controls{position:absolute;top:2rem;right:4rem;z-index:10;display:flex;gap:.5rem}@media (max-width: 768px){.lc-desktop-controls{display:none}}.lc-video-controls{position:absolute;top:1rem;z-index:10;right:.5rem;display:flex;gap:.25rem}.lc-video-controls .lc-close-button{display:block}@media (min-width: 768px){.lc-video-controls .lc-close-button{display:none}}.lc-close-button{border:none;display:flex;justify-content:center;align-items:center;width:40px;height:40px;background:#00000080;border-radius:100%;cursor:pointer}.lc-close-button svg{width:100%;height:100%}@media (min-width: 768px){.lc-close-button{width:48px;height:48px}}.lc-product-detail-view .lc-video-container{height:100%;position:relative}@media (min-width: 768px){.lc-product-detail-view .lc-video-container{width:50%}}.lc-video-only-view .lc-video-container{height:100%}.lc-card-container{position:absolute;bottom:12px;z-index:10;width:100%;padding-inline:12px;box-sizing:border-box}.lc-product-detail-view .lc-card-container{display:none}@media (max-width: 768px){.lc-product-detail-view .lc-card-container{display:block}}.lc-product-detail-view .lc-video-modal-row{display:flex;justify-content:center;height:100%;width:100%}.lc-video-only-view .lc-video-modal-row{display:block;height:100%}.lc-product-detail-view cooee-item-detail{--header-display: none;width:50%;flex:1}@media (max-width: 768px){.lc-product-detail-view cooee-item-detail{--header-display: flex;width:100%;height:70dvh;position:absolute;bottom:0;z-index:2147483646}}.lc-video-only-view cooee-item-detail{width:100%;height:70dvh;z-index:2147483646;bottom:0;position:absolute}
3
3
  `],encapsulation:3})};export{Fe as VideoDetailDialogComponent};
@@ -1,4 +1,4 @@
1
- import{$ as Ri,$a as Nt,A as Tt,Ab as La,B as ke,Ba as Ea,C as P,Ca as ba,Cb as ka,D as lr,Da as Sa,Db as Fa,E as It,Ea as Jt,Eb as Va,F as wt,Fa as mt,Fb as Ba,G as ur,Ga as Li,Gb as hr,Ha as xt,Hb as rt,I as Oe,Ia as Ne,Ib as $e,J as ge,Ja as Ca,Ka as Ta,Kb as pr,L as ht,La as Ia,Lb as xn,Ma as wa,Mb as Ua,Na as Da,Nb as Rn,O as Tn,Ob as Ha,P as xe,Pb as ja,Q as _a,Qb as mr,R as Oi,S as In,Sa as Dn,T as z,Ta as fr,Ua as Ee,Va as Zt,W as dr,Wa as Qt,Y as zt,Z as wn,_ as xi,_a as Rt,a as y,aa as ce,ab as _t,b as U,ba as Dt,bb as Aa,c as Cn,ca as Kt,cb as Oa,d as sa,da as ga,e as Di,ea as At,f as Ai,fb as xa,g as O,ga as va,gb as An,h as aa,ha as Re,hb as On,ia as Fe,j as me,ja as pt,k as ca,ka as Ni,la as Xt,lb as Mt,ma as je,mb as Pt,n as la,na as Ge,nb as gt,ob as We,p as ua,pa as Mi,qa as Pi,qb as Ra,ra as ya,rb as ki,s as da,sa as Ot,t as fa,ta as qt,u as ha,ub as Na,v as pa,va as ue,vb as Ma,wa as ve,x as ma,xa as Ve,xb as Pa,z as _e}from"./chunk-S6UU36F3.js";var $a=Di((Wa,_r)=>{"use strict";(function(t){"use strict";var e={};e.VERSION="1.6.1";var n,r={},i=function(d,g){return function(){return g.apply(d,arguments)}},o=function(){var d=arguments,g=d[0],f,E;for(E=1;E<d.length;E++)for(f in d[E])!(f in g)&&d[E].hasOwnProperty(f)&&(g[f]=d[E][f]);return g},s=function(d,g){return{value:d,name:g}};e.TRACE=s(1,"TRACE"),e.DEBUG=s(2,"DEBUG"),e.INFO=s(3,"INFO"),e.TIME=s(4,"TIME"),e.WARN=s(5,"WARN"),e.ERROR=s(8,"ERROR"),e.OFF=s(99,"OFF");var a=function(d){this.context=d,this.setLevel(d.filterLevel),this.log=this.info};a.prototype={setLevel:function(d){d&&"value"in d&&(this.context.filterLevel=d)},getLevel:function(){return this.context.filterLevel},enabledFor:function(d){var g=this.context.filterLevel;return d.value>=g.value},trace:function(){this.invoke(e.TRACE,arguments)},debug:function(){this.invoke(e.DEBUG,arguments)},info:function(){this.invoke(e.INFO,arguments)},warn:function(){this.invoke(e.WARN,arguments)},error:function(){this.invoke(e.ERROR,arguments)},time:function(d){typeof d=="string"&&d.length>0&&this.invoke(e.TIME,[d,"start"])},timeEnd:function(d){typeof d=="string"&&d.length>0&&this.invoke(e.TIME,[d,"end"])},invoke:function(d,g){n&&this.enabledFor(d)&&n(g,o({level:d},this.context))}};var l=new a({filterLevel:e.OFF});(function(){var d=e;d.enabledFor=i(l,l.enabledFor),d.trace=i(l,l.trace),d.debug=i(l,l.debug),d.time=i(l,l.time),d.timeEnd=i(l,l.timeEnd),d.info=i(l,l.info),d.warn=i(l,l.warn),d.error=i(l,l.error),d.log=d.info})(),e.setHandler=function(d){n=d},e.setLevel=function(d){l.setLevel(d);for(var g in r)r.hasOwnProperty(g)&&r[g].setLevel(d)},e.getLevel=function(){return l.getLevel()},e.get=function(d){return r[d]||(r[d]=new a(o({name:d},l.context)))},e.createDefaultHandler=function(d){d=d||{},d.formatter=d.formatter||function(v,w){w.name&&v.unshift("["+w.name+"]")};var g={},f=function(E,v){Function.prototype.apply.call(E,console,v)};return typeof console>"u"?function(){}:function(E,v){E=Array.prototype.slice.call(E);var w=console.log,M;v.level===e.TIME?(M=(v.name?"["+v.name+"] ":"")+E[0],E[1]==="start"?console.time?console.time(M):g[M]=new Date().getTime():console.timeEnd?console.timeEnd(M):f(w,[M+": "+(new Date().getTime()-g[M])+"ms"])):(v.level===e.WARN&&console.warn?w=console.warn:v.level===e.ERROR&&console.error?w=console.error:v.level===e.INFO&&console.info?w=console.info:v.level===e.DEBUG&&console.debug?w=console.debug:v.level===e.TRACE&&console.trace&&(w=console.trace),d.formatter(E,v),f(w,E))}},e.useDefaults=function(d){e.setLevel(d&&d.defaultLevel||e.DEBUG),e.setHandler(e.createDefaultHandler(d))},e.setDefaults=e.useDefaults,typeof define=="function"&&define.amd?define(e):typeof _r<"u"&&_r.exports?_r.exports=e:(e._prevLogger=t.Logger,e.noConflict=function(){return t.Logger=e._prevLogger,e},t.Logger=e)})(Wa)});var ic=Di((rc,Bi)=>{"use strict";(function(t){if(typeof rc=="object"&&typeof Bi<"u")Bi.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var e;typeof window<"u"?e=window:typeof global<"u"?e=global:typeof self<"u"?e=self:e=this,e.localforage=t()}})(function(){var t,e,n;return function r(i,o,s){function a(g,f){if(!o[g]){if(!i[g]){var E=typeof Cn=="function"&&Cn;if(!f&&E)return E(g,!0);if(l)return l(g,!0);var v=new Error("Cannot find module '"+g+"'");throw v.code="MODULE_NOT_FOUND",v}var w=o[g]={exports:{}};i[g][0].call(w.exports,function(M){var N=i[g][1][M];return a(N||M)},w,w.exports,r,i,o,s)}return o[g].exports}for(var l=typeof Cn=="function"&&Cn,d=0;d<s.length;d++)a(s[d]);return a}({1:[function(r,i,o){(function(s){"use strict";var a=s.MutationObserver||s.WebKitMutationObserver,l;if(a){var d=0,g=new a(M),f=s.document.createTextNode("");g.observe(f,{characterData:!0}),l=function(){f.data=d=++d%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var E=new s.MessageChannel;E.port1.onmessage=M,l=function(){E.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?l=function(){var k=s.document.createElement("script");k.onreadystatechange=function(){M(),k.onreadystatechange=null,k.parentNode.removeChild(k),k=null},s.document.documentElement.appendChild(k)}:l=function(){setTimeout(M,0)};var v,w=[];function M(){v=!0;for(var k,L,j=w.length;j;){for(L=w,w=[],k=-1;++k<j;)L[k]();j=w.length}v=!1}i.exports=N;function N(k){w.push(k)===1&&!v&&l()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(r,i,o){"use strict";var s=r(1);function a(){}var l={},d=["REJECTED"],g=["FULFILLED"],f=["PENDING"];i.exports=E;function E(D){if(typeof D!="function")throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,D!==a&&N(this,D)}E.prototype.catch=function(D){return this.then(null,D)},E.prototype.then=function(D,G){if(typeof D!="function"&&this.state===g||typeof G!="function"&&this.state===d)return this;var B=new this.constructor(a);if(this.state!==f){var W=this.state===g?D:G;w(B,W,this.outcome)}else this.queue.push(new v(B,D,G));return B};function v(D,G,B){this.promise=D,typeof G=="function"&&(this.onFulfilled=G,this.callFulfilled=this.otherCallFulfilled),typeof B=="function"&&(this.onRejected=B,this.callRejected=this.otherCallRejected)}v.prototype.callFulfilled=function(D){l.resolve(this.promise,D)},v.prototype.otherCallFulfilled=function(D){w(this.promise,this.onFulfilled,D)},v.prototype.callRejected=function(D){l.reject(this.promise,D)},v.prototype.otherCallRejected=function(D){w(this.promise,this.onRejected,D)};function w(D,G,B){s(function(){var W;try{W=G(B)}catch(Q){return l.reject(D,Q)}W===D?l.reject(D,new TypeError("Cannot resolve promise with itself")):l.resolve(D,W)})}l.resolve=function(D,G){var B=k(M,G);if(B.status==="error")return l.reject(D,B.value);var W=B.value;if(W)N(D,W);else{D.state=g,D.outcome=G;for(var Q=-1,J=D.queue.length;++Q<J;)D.queue[Q].callFulfilled(G)}return D},l.reject=function(D,G){D.state=d,D.outcome=G;for(var B=-1,W=D.queue.length;++B<W;)D.queue[B].callRejected(G);return D};function M(D){var G=D&&D.then;if(D&&(typeof D=="object"||typeof D=="function")&&typeof G=="function")return function(){G.apply(D,arguments)}}function N(D,G){var B=!1;function W(De){B||(B=!0,l.reject(D,De))}function Q(De){B||(B=!0,l.resolve(D,De))}function J(){G(Q,W)}var ae=k(J);ae.status==="error"&&W(ae.value)}function k(D,G){var B={};try{B.value=D(G),B.status="success"}catch(W){B.status="error",B.value=W}return B}E.resolve=L;function L(D){return D instanceof this?D:l.resolve(new this(a),D)}E.reject=j;function j(D){var G=new this(a);return l.reject(G,D)}E.all=Ie;function Ie(D){var G=this;if(Object.prototype.toString.call(D)!=="[object Array]")return this.reject(new TypeError("must be an array"));var B=D.length,W=!1;if(!B)return this.resolve([]);for(var Q=new Array(B),J=0,ae=-1,De=new this(a);++ae<B;)tt(D[ae],ae);return De;function tt(En,sr){G.resolve(En).then(gi,function($t){W||(W=!0,l.reject(De,$t))});function gi($t){Q[sr]=$t,++J===B&&!W&&(W=!0,l.resolve(De,Q))}}}E.race=we;function we(D){var G=this;if(Object.prototype.toString.call(D)!=="[object Array]")return this.reject(new TypeError("must be an array"));var B=D.length,W=!1;if(!B)return this.resolve([]);for(var Q=-1,J=new this(a);++Q<B;)ae(D[Q]);return J;function ae(De){G.resolve(De).then(function(tt){W||(W=!0,l.resolve(J,tt))},function(tt){W||(W=!0,l.reject(J,tt))})}}},{1:1}],3:[function(r,i,o){(function(s){"use strict";typeof s.Promise!="function"&&(s.Promise=r(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(r,i,o){"use strict";var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c};function a(c,h){if(!(c instanceof h))throw new TypeError("Cannot call a class as a function")}function l(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var d=l();function g(){try{if(!d||!d.open)return!1;var c=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),h=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!c||h)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function f(c,h){c=c||[],h=h||{};try{return new Blob(c,h)}catch(p){if(p.name!=="TypeError")throw p;for(var u=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,m=new u,_=0;_<c.length;_+=1)m.append(c[_]);return m.getBlob(h.type)}}typeof Promise>"u"&&r(3);var E=Promise;function v(c,h){h&&c.then(function(u){h(null,u)},function(u){h(u)})}function w(c,h,u){typeof h=="function"&&c.then(h),typeof u=="function"&&c.catch(u)}function M(c){return typeof c!="string"&&(console.warn(c+" used as a key, but it is not a string."),c=String(c)),c}function N(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var k="local-forage-detect-blob-support",L=void 0,j={},Ie=Object.prototype.toString,we="readonly",D="readwrite";function G(c){for(var h=c.length,u=new ArrayBuffer(h),m=new Uint8Array(u),_=0;_<h;_++)m[_]=c.charCodeAt(_);return u}function B(c){return new E(function(h){var u=c.transaction(k,D),m=f([""]);u.objectStore(k).put(m,"key"),u.onabort=function(_){_.preventDefault(),_.stopPropagation(),h(!1)},u.oncomplete=function(){var _=navigator.userAgent.match(/Chrome\/(\d+)/),p=navigator.userAgent.match(/Edge\//);h(p||!_||parseInt(_[1],10)>=43)}}).catch(function(){return!1})}function W(c){return typeof L=="boolean"?E.resolve(L):B(c).then(function(h){return L=h,L})}function Q(c){var h=j[c.name],u={};u.promise=new E(function(m,_){u.resolve=m,u.reject=_}),h.deferredOperations.push(u),h.dbReady?h.dbReady=h.dbReady.then(function(){return u.promise}):h.dbReady=u.promise}function J(c){var h=j[c.name],u=h.deferredOperations.pop();if(u)return u.resolve(),u.promise}function ae(c,h){var u=j[c.name],m=u.deferredOperations.pop();if(m)return m.reject(h),m.promise}function De(c,h){return new E(function(u,m){if(j[c.name]=j[c.name]||Us(),c.db)if(h)Q(c),c.db.close();else return u(c.db);var _=[c.name];h&&_.push(c.version);var p=d.open.apply(d,_);h&&(p.onupgradeneeded=function(b){var S=p.result;try{S.createObjectStore(c.storeName),b.oldVersion<=1&&S.createObjectStore(k)}catch(C){if(C.name==="ConstraintError")console.warn('The database "'+c.name+'" has been upgraded from version '+b.oldVersion+" to version "+b.newVersion+', but the storage "'+c.storeName+'" already exists.');else throw C}}),p.onerror=function(b){b.preventDefault(),m(p.error)},p.onsuccess=function(){var b=p.result;b.onversionchange=function(S){S.target.close()},u(b),J(c)}})}function tt(c){return De(c,!1)}function En(c){return De(c,!0)}function sr(c,h){if(!c.db)return!0;var u=!c.db.objectStoreNames.contains(c.storeName),m=c.version<c.db.version,_=c.version>c.db.version;if(m&&(c.version!==h&&console.warn('The database "'+c.name+`" can't be downgraded from version `+c.db.version+" to version "+c.version+"."),c.version=c.db.version),_||u){if(u){var p=c.db.version+1;p>c.version&&(c.version=p)}return!0}return!1}function gi(c){return new E(function(h,u){var m=new FileReader;m.onerror=u,m.onloadend=function(_){var p=btoa(_.target.result||"");h({__local_forage_encoded_blob:!0,data:p,type:c.type})},m.readAsBinaryString(c)})}function $t(c){var h=G(atob(c.data));return f([h],{type:c.type})}function Bs(c){return c&&c.__local_forage_encoded_blob}function Qu(c){var h=this,u=h._initReady().then(function(){var m=j[h._dbInfo.name];if(m&&m.dbReady)return m.dbReady});return w(u,c,c),u}function ed(c){Q(c);for(var h=j[c.name],u=h.forages,m=0;m<u.length;m++){var _=u[m];_._dbInfo.db&&(_._dbInfo.db.close(),_._dbInfo.db=null)}return c.db=null,tt(c).then(function(p){return c.db=p,sr(c)?En(c):p}).then(function(p){c.db=h.db=p;for(var b=0;b<u.length;b++)u[b]._dbInfo.db=p}).catch(function(p){throw ae(c,p),p})}function nt(c,h,u,m){m===void 0&&(m=1);try{var _=c.db.transaction(c.storeName,h);u(null,_)}catch(p){if(m>0&&(!c.db||p.name==="InvalidStateError"||p.name==="NotFoundError"))return E.resolve().then(function(){if(!c.db||p.name==="NotFoundError"&&!c.db.objectStoreNames.contains(c.storeName)&&c.version<=c.db.version)return c.db&&(c.version=c.db.version+1),En(c)}).then(function(){return ed(c).then(function(){nt(c,h,u,m-1)})}).catch(u);u(p)}}function Us(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function td(c){var h=this,u={db:null};if(c)for(var m in c)u[m]=c[m];var _=j[u.name];_||(_=Us(),j[u.name]=_),_.forages.push(h),h._initReady||(h._initReady=h.ready,h.ready=Qu);var p=[];function b(){return E.resolve()}for(var S=0;S<_.forages.length;S++){var C=_.forages[S];C!==h&&p.push(C._initReady().catch(b))}var T=_.forages.slice(0);return E.all(p).then(function(){return u.db=_.db,tt(u)}).then(function(I){return u.db=I,sr(u,h._defaultConfig.version)?En(u):I}).then(function(I){u.db=_.db=I,h._dbInfo=u;for(var R=0;R<T.length;R++){var H=T[R];H!==h&&(H._dbInfo.db=u.db,H._dbInfo.version=u.version)}})}function nd(c,h){var u=this;c=M(c);var m=new E(function(_,p){u.ready().then(function(){nt(u._dbInfo,we,function(b,S){if(b)return p(b);try{var C=S.objectStore(u._dbInfo.storeName),T=C.get(c);T.onsuccess=function(){var I=T.result;I===void 0&&(I=null),Bs(I)&&(I=$t(I)),_(I)},T.onerror=function(){p(T.error)}}catch(I){p(I)}})}).catch(p)});return v(m,h),m}function rd(c,h){var u=this,m=new E(function(_,p){u.ready().then(function(){nt(u._dbInfo,we,function(b,S){if(b)return p(b);try{var C=S.objectStore(u._dbInfo.storeName),T=C.openCursor(),I=1;T.onsuccess=function(){var R=T.result;if(R){var H=R.value;Bs(H)&&(H=$t(H));var $=c(H,R.key,I++);$!==void 0?_($):R.continue()}else _()},T.onerror=function(){p(T.error)}}catch(R){p(R)}})}).catch(p)});return v(m,h),m}function id(c,h,u){var m=this;c=M(c);var _=new E(function(p,b){var S;m.ready().then(function(){return S=m._dbInfo,Ie.call(h)==="[object Blob]"?W(S.db).then(function(C){return C?h:gi(h)}):h}).then(function(C){nt(m._dbInfo,D,function(T,I){if(T)return b(T);try{var R=I.objectStore(m._dbInfo.storeName);C===null&&(C=void 0);var H=R.put(C,c);I.oncomplete=function(){C===void 0&&(C=null),p(C)},I.onabort=I.onerror=function(){var $=H.error?H.error:H.transaction.error;b($)}}catch($){b($)}})}).catch(b)});return v(_,u),_}function od(c,h){var u=this;c=M(c);var m=new E(function(_,p){u.ready().then(function(){nt(u._dbInfo,D,function(b,S){if(b)return p(b);try{var C=S.objectStore(u._dbInfo.storeName),T=C.delete(c);S.oncomplete=function(){_()},S.onerror=function(){p(T.error)},S.onabort=function(){var I=T.error?T.error:T.transaction.error;p(I)}}catch(I){p(I)}})}).catch(p)});return v(m,h),m}function sd(c){var h=this,u=new E(function(m,_){h.ready().then(function(){nt(h._dbInfo,D,function(p,b){if(p)return _(p);try{var S=b.objectStore(h._dbInfo.storeName),C=S.clear();b.oncomplete=function(){m()},b.onabort=b.onerror=function(){var T=C.error?C.error:C.transaction.error;_(T)}}catch(T){_(T)}})}).catch(_)});return v(u,c),u}function ad(c){var h=this,u=new E(function(m,_){h.ready().then(function(){nt(h._dbInfo,we,function(p,b){if(p)return _(p);try{var S=b.objectStore(h._dbInfo.storeName),C=S.count();C.onsuccess=function(){m(C.result)},C.onerror=function(){_(C.error)}}catch(T){_(T)}})}).catch(_)});return v(u,c),u}function cd(c,h){var u=this,m=new E(function(_,p){if(c<0){_(null);return}u.ready().then(function(){nt(u._dbInfo,we,function(b,S){if(b)return p(b);try{var C=S.objectStore(u._dbInfo.storeName),T=!1,I=C.openKeyCursor();I.onsuccess=function(){var R=I.result;if(!R){_(null);return}c===0||T?_(R.key):(T=!0,R.advance(c))},I.onerror=function(){p(I.error)}}catch(R){p(R)}})}).catch(p)});return v(m,h),m}function ld(c){var h=this,u=new E(function(m,_){h.ready().then(function(){nt(h._dbInfo,we,function(p,b){if(p)return _(p);try{var S=b.objectStore(h._dbInfo.storeName),C=S.openKeyCursor(),T=[];C.onsuccess=function(){var I=C.result;if(!I){m(T);return}T.push(I.key),I.continue()},C.onerror=function(){_(C.error)}}catch(I){_(I)}})}).catch(_)});return v(u,c),u}function ud(c,h){h=N.apply(this,arguments);var u=this.config();c=typeof c!="function"&&c||{},c.name||(c.name=c.name||u.name,c.storeName=c.storeName||u.storeName);var m=this,_;if(!c.name)_=E.reject("Invalid arguments");else{var p=c.name===u.name&&m._dbInfo.db,b=p?E.resolve(m._dbInfo.db):tt(c).then(function(S){var C=j[c.name],T=C.forages;C.db=S;for(var I=0;I<T.length;I++)T[I]._dbInfo.db=S;return S});c.storeName?_=b.then(function(S){if(S.objectStoreNames.contains(c.storeName)){var C=S.version+1;Q(c);var T=j[c.name],I=T.forages;S.close();for(var R=0;R<I.length;R++){var H=I[R];H._dbInfo.db=null,H._dbInfo.version=C}var $=new E(function(Y,te){var ee=d.open(c.name,C);ee.onerror=function(Ae){var Sn=ee.result;Sn.close(),te(Ae)},ee.onupgradeneeded=function(){var Ae=ee.result;Ae.deleteObjectStore(c.storeName)},ee.onsuccess=function(){var Ae=ee.result;Ae.close(),Y(Ae)}});return $.then(function(Y){T.db=Y;for(var te=0;te<I.length;te++){var ee=I[te];ee._dbInfo.db=Y,J(ee._dbInfo)}}).catch(function(Y){throw(ae(c,Y)||E.resolve()).catch(function(){}),Y})}}):_=b.then(function(S){Q(c);var C=j[c.name],T=C.forages;S.close();for(var I=0;I<T.length;I++){var R=T[I];R._dbInfo.db=null}var H=new E(function($,Y){var te=d.deleteDatabase(c.name);te.onerror=function(){var ee=te.result;ee&&ee.close(),Y(te.error)},te.onblocked=function(){console.warn('dropInstance blocked for database "'+c.name+'" until all open connections are closed')},te.onsuccess=function(){var ee=te.result;ee&&ee.close(),$(ee)}});return H.then(function($){C.db=$;for(var Y=0;Y<T.length;Y++){var te=T[Y];J(te._dbInfo)}}).catch(function($){throw(ae(c,$)||E.resolve()).catch(function(){}),$})})}return v(_,h),_}var dd={_driver:"asyncStorage",_initStorage:td,_support:g(),iterate:rd,getItem:nd,setItem:id,removeItem:od,clear:sd,length:ad,key:cd,keys:ld,dropInstance:ud};function fd(){return typeof openDatabase=="function"}var dt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hd="~~local_forage_type~",Hs=/^~~local_forage_type~([^~]+)~/,ar="__lfsc__:",vi=ar.length,yi="arbf",Ei="blob",js="si08",Gs="ui08",Ws="uic8",$s="si16",Ys="si32",zs="ur16",Ks="ui32",Xs="fl32",qs="fl64",Js=vi+yi.length,Zs=Object.prototype.toString;function Qs(c){var h=c.length*.75,u=c.length,m,_=0,p,b,S,C;c[c.length-1]==="="&&(h--,c[c.length-2]==="="&&h--);var T=new ArrayBuffer(h),I=new Uint8Array(T);for(m=0;m<u;m+=4)p=dt.indexOf(c[m]),b=dt.indexOf(c[m+1]),S=dt.indexOf(c[m+2]),C=dt.indexOf(c[m+3]),I[_++]=p<<2|b>>4,I[_++]=(b&15)<<4|S>>2,I[_++]=(S&3)<<6|C&63;return T}function bi(c){var h=new Uint8Array(c),u="",m;for(m=0;m<h.length;m+=3)u+=dt[h[m]>>2],u+=dt[(h[m]&3)<<4|h[m+1]>>4],u+=dt[(h[m+1]&15)<<2|h[m+2]>>6],u+=dt[h[m+2]&63];return h.length%3===2?u=u.substring(0,u.length-1)+"=":h.length%3===1&&(u=u.substring(0,u.length-2)+"=="),u}function pd(c,h){var u="";if(c&&(u=Zs.call(c)),c&&(u==="[object ArrayBuffer]"||c.buffer&&Zs.call(c.buffer)==="[object ArrayBuffer]")){var m,_=ar;c instanceof ArrayBuffer?(m=c,_+=yi):(m=c.buffer,u==="[object Int8Array]"?_+=js:u==="[object Uint8Array]"?_+=Gs:u==="[object Uint8ClampedArray]"?_+=Ws:u==="[object Int16Array]"?_+=$s:u==="[object Uint16Array]"?_+=zs:u==="[object Int32Array]"?_+=Ys:u==="[object Uint32Array]"?_+=Ks:u==="[object Float32Array]"?_+=Xs:u==="[object Float64Array]"?_+=qs:h(new Error("Failed to get type for BinaryArray"))),h(_+bi(m))}else if(u==="[object Blob]"){var p=new FileReader;p.onload=function(){var b=hd+c.type+"~"+bi(this.result);h(ar+Ei+b)},p.readAsArrayBuffer(c)}else try{h(JSON.stringify(c))}catch(b){console.error("Couldn't convert value into a JSON string: ",c),h(null,b)}}function md(c){if(c.substring(0,vi)!==ar)return JSON.parse(c);var h=c.substring(Js),u=c.substring(vi,Js),m;if(u===Ei&&Hs.test(h)){var _=h.match(Hs);m=_[1],h=h.substring(_[0].length)}var p=Qs(h);switch(u){case yi:return p;case Ei:return f([p],{type:m});case js:return new Int8Array(p);case Gs:return new Uint8Array(p);case Ws:return new Uint8ClampedArray(p);case $s:return new Int16Array(p);case zs:return new Uint16Array(p);case Ys:return new Int32Array(p);case Ks:return new Uint32Array(p);case Xs:return new Float32Array(p);case qs:return new Float64Array(p);default:throw new Error("Unkown type: "+u)}}var Si={serialize:pd,deserialize:md,stringToBuffer:Qs,bufferToString:bi};function ea(c,h,u,m){c.executeSql("CREATE TABLE IF NOT EXISTS "+h.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],u,m)}function _d(c){var h=this,u={db:null};if(c)for(var m in c)u[m]=typeof c[m]!="string"?c[m].toString():c[m];var _=new E(function(p,b){try{u.db=openDatabase(u.name,String(u.version),u.description,u.size)}catch(S){return b(S)}u.db.transaction(function(S){ea(S,u,function(){h._dbInfo=u,p()},function(C,T){b(T)})},b)});return u.serializer=Si,_}function ft(c,h,u,m,_,p){c.executeSql(u,m,_,function(b,S){S.code===S.SYNTAX_ERR?b.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[h.storeName],function(C,T){T.rows.length?p(C,S):ea(C,h,function(){C.executeSql(u,m,_,p)},p)},p):p(b,S)},p)}function gd(c,h){var u=this;c=M(c);var m=new E(function(_,p){u.ready().then(function(){var b=u._dbInfo;b.db.transaction(function(S){ft(S,b,"SELECT * FROM "+b.storeName+" WHERE key = ? LIMIT 1",[c],function(C,T){var I=T.rows.length?T.rows.item(0).value:null;I&&(I=b.serializer.deserialize(I)),_(I)},function(C,T){p(T)})})}).catch(p)});return v(m,h),m}function vd(c,h){var u=this,m=new E(function(_,p){u.ready().then(function(){var b=u._dbInfo;b.db.transaction(function(S){ft(S,b,"SELECT * FROM "+b.storeName,[],function(C,T){for(var I=T.rows,R=I.length,H=0;H<R;H++){var $=I.item(H),Y=$.value;if(Y&&(Y=b.serializer.deserialize(Y)),Y=c(Y,$.key,H+1),Y!==void 0){_(Y);return}}_()},function(C,T){p(T)})})}).catch(p)});return v(m,h),m}function ta(c,h,u,m){var _=this;c=M(c);var p=new E(function(b,S){_.ready().then(function(){h===void 0&&(h=null);var C=h,T=_._dbInfo;T.serializer.serialize(h,function(I,R){R?S(R):T.db.transaction(function(H){ft(H,T,"INSERT OR REPLACE INTO "+T.storeName+" (key, value) VALUES (?, ?)",[c,I],function(){b(C)},function($,Y){S(Y)})},function(H){if(H.code===H.QUOTA_ERR){if(m>0){b(ta.apply(_,[c,C,u,m-1]));return}S(H)}})})}).catch(S)});return v(p,u),p}function yd(c,h,u){return ta.apply(this,[c,h,u,1])}function Ed(c,h){var u=this;c=M(c);var m=new E(function(_,p){u.ready().then(function(){var b=u._dbInfo;b.db.transaction(function(S){ft(S,b,"DELETE FROM "+b.storeName+" WHERE key = ?",[c],function(){_()},function(C,T){p(T)})})}).catch(p)});return v(m,h),m}function bd(c){var h=this,u=new E(function(m,_){h.ready().then(function(){var p=h._dbInfo;p.db.transaction(function(b){ft(b,p,"DELETE FROM "+p.storeName,[],function(){m()},function(S,C){_(C)})})}).catch(_)});return v(u,c),u}function Sd(c){var h=this,u=new E(function(m,_){h.ready().then(function(){var p=h._dbInfo;p.db.transaction(function(b){ft(b,p,"SELECT COUNT(key) as c FROM "+p.storeName,[],function(S,C){var T=C.rows.item(0).c;m(T)},function(S,C){_(C)})})}).catch(_)});return v(u,c),u}function Cd(c,h){var u=this,m=new E(function(_,p){u.ready().then(function(){var b=u._dbInfo;b.db.transaction(function(S){ft(S,b,"SELECT key FROM "+b.storeName+" WHERE id = ? LIMIT 1",[c+1],function(C,T){var I=T.rows.length?T.rows.item(0).key:null;_(I)},function(C,T){p(T)})})}).catch(p)});return v(m,h),m}function Td(c){var h=this,u=new E(function(m,_){h.ready().then(function(){var p=h._dbInfo;p.db.transaction(function(b){ft(b,p,"SELECT key FROM "+p.storeName,[],function(S,C){for(var T=[],I=0;I<C.rows.length;I++)T.push(C.rows.item(I).key);m(T)},function(S,C){_(C)})})}).catch(_)});return v(u,c),u}function Id(c){return new E(function(h,u){c.transaction(function(m){m.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(_,p){for(var b=[],S=0;S<p.rows.length;S++)b.push(p.rows.item(S).name);h({db:c,storeNames:b})},function(_,p){u(p)})},function(m){u(m)})})}function wd(c,h){h=N.apply(this,arguments);var u=this.config();c=typeof c!="function"&&c||{},c.name||(c.name=c.name||u.name,c.storeName=c.storeName||u.storeName);var m=this,_;return c.name?_=new E(function(p){var b;c.name===u.name?b=m._dbInfo.db:b=openDatabase(c.name,"","",0),c.storeName?p({db:b,storeNames:[c.storeName]}):p(Id(b))}).then(function(p){return new E(function(b,S){p.db.transaction(function(C){function T($){return new E(function(Y,te){C.executeSql("DROP TABLE IF EXISTS "+$,[],function(){Y()},function(ee,Ae){te(Ae)})})}for(var I=[],R=0,H=p.storeNames.length;R<H;R++)I.push(T(p.storeNames[R]));E.all(I).then(function(){b()}).catch(function($){S($)})},function(C){S(C)})})}):_=E.reject("Invalid arguments"),v(_,h),_}var Dd={_driver:"webSQLStorage",_initStorage:_d,_support:fd(),iterate:vd,getItem:gd,setItem:yd,removeItem:Ed,clear:bd,length:Sd,key:Cd,keys:Td,dropInstance:wd};function Ad(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function na(c,h){var u=c.name+"/";return c.storeName!==h.storeName&&(u+=c.storeName+"/"),u}function Od(){var c="_localforage_support_test";try{return localStorage.setItem(c,!0),localStorage.removeItem(c),!1}catch{return!0}}function xd(){return!Od()||localStorage.length>0}function Rd(c){var h=this,u={};if(c)for(var m in c)u[m]=c[m];return u.keyPrefix=na(c,h._defaultConfig),xd()?(h._dbInfo=u,u.serializer=Si,E.resolve()):E.reject()}function Nd(c){var h=this,u=h.ready().then(function(){for(var m=h._dbInfo.keyPrefix,_=localStorage.length-1;_>=0;_--){var p=localStorage.key(_);p.indexOf(m)===0&&localStorage.removeItem(p)}});return v(u,c),u}function Md(c,h){var u=this;c=M(c);var m=u.ready().then(function(){var _=u._dbInfo,p=localStorage.getItem(_.keyPrefix+c);return p&&(p=_.serializer.deserialize(p)),p});return v(m,h),m}function Pd(c,h){var u=this,m=u.ready().then(function(){for(var _=u._dbInfo,p=_.keyPrefix,b=p.length,S=localStorage.length,C=1,T=0;T<S;T++){var I=localStorage.key(T);if(I.indexOf(p)===0){var R=localStorage.getItem(I);if(R&&(R=_.serializer.deserialize(R)),R=c(R,I.substring(b),C++),R!==void 0)return R}}});return v(m,h),m}function Ld(c,h){var u=this,m=u.ready().then(function(){var _=u._dbInfo,p;try{p=localStorage.key(c)}catch{p=null}return p&&(p=p.substring(_.keyPrefix.length)),p});return v(m,h),m}function kd(c){var h=this,u=h.ready().then(function(){for(var m=h._dbInfo,_=localStorage.length,p=[],b=0;b<_;b++){var S=localStorage.key(b);S.indexOf(m.keyPrefix)===0&&p.push(S.substring(m.keyPrefix.length))}return p});return v(u,c),u}function Fd(c){var h=this,u=h.keys().then(function(m){return m.length});return v(u,c),u}function Vd(c,h){var u=this;c=M(c);var m=u.ready().then(function(){var _=u._dbInfo;localStorage.removeItem(_.keyPrefix+c)});return v(m,h),m}function Bd(c,h,u){var m=this;c=M(c);var _=m.ready().then(function(){h===void 0&&(h=null);var p=h;return new E(function(b,S){var C=m._dbInfo;C.serializer.serialize(h,function(T,I){if(I)S(I);else try{localStorage.setItem(C.keyPrefix+c,T),b(p)}catch(R){(R.name==="QuotaExceededError"||R.name==="NS_ERROR_DOM_QUOTA_REACHED")&&S(R),S(R)}})})});return v(_,u),_}function Ud(c,h){if(h=N.apply(this,arguments),c=typeof c!="function"&&c||{},!c.name){var u=this.config();c.name=c.name||u.name,c.storeName=c.storeName||u.storeName}var m=this,_;return c.name?_=new E(function(p){c.storeName?p(na(c,m._defaultConfig)):p(c.name+"/")}).then(function(p){for(var b=localStorage.length-1;b>=0;b--){var S=localStorage.key(b);S.indexOf(p)===0&&localStorage.removeItem(S)}}):_=E.reject("Invalid arguments"),v(_,h),_}var Hd={_driver:"localStorageWrapper",_initStorage:Rd,_support:Ad(),iterate:Pd,getItem:Md,setItem:Bd,removeItem:Vd,clear:Nd,length:Fd,key:Ld,keys:kd,dropInstance:Ud},jd=function(h,u){return h===u||typeof h=="number"&&typeof u=="number"&&isNaN(h)&&isNaN(u)},Gd=function(h,u){for(var m=h.length,_=0;_<m;){if(jd(h[_],u))return!0;_++}return!1},ra=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"},bn={},ia={},Yt={INDEXEDDB:dd,WEBSQL:Dd,LOCALSTORAGE:Hd},Wd=[Yt.INDEXEDDB._driver,Yt.WEBSQL._driver,Yt.LOCALSTORAGE._driver],cr=["dropInstance"],Ci=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(cr),$d={description:"",driver:Wd.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Yd(c,h){c[h]=function(){var u=arguments;return c.ready().then(function(){return c[h].apply(c,u)})}}function Ti(){for(var c=1;c<arguments.length;c++){var h=arguments[c];if(h)for(var u in h)h.hasOwnProperty(u)&&(ra(h[u])?arguments[0][u]=h[u].slice():arguments[0][u]=h[u])}return arguments[0]}var zd=function(){function c(h){a(this,c);for(var u in Yt)if(Yt.hasOwnProperty(u)){var m=Yt[u],_=m._driver;this[u]=_,bn[_]||this.defineDriver(m)}this._defaultConfig=Ti({},$d),this._config=Ti({},this._defaultConfig,h),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return c.prototype.config=function(u){if((typeof u>"u"?"undefined":s(u))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var m in u){if(m==="storeName"&&(u[m]=u[m].replace(/\W/g,"_")),m==="version"&&typeof u[m]!="number")return new Error("Database version must be a number.");this._config[m]=u[m]}return"driver"in u&&u.driver?this.setDriver(this._config.driver):!0}else return typeof u=="string"?this._config[u]:this._config},c.prototype.defineDriver=function(u,m,_){var p=new E(function(b,S){try{var C=u._driver,T=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!u._driver){S(T);return}for(var I=Ci.concat("_initStorage"),R=0,H=I.length;R<H;R++){var $=I[R],Y=!Gd(cr,$);if((Y||u[$])&&typeof u[$]!="function"){S(T);return}}var te=function(){for(var Sn=function(qd){return function(){var Jd=new Error("Method "+qd+" is not implemented by the current driver"),oa=E.reject(Jd);return v(oa,arguments[arguments.length-1]),oa}},Ii=0,Xd=cr.length;Ii<Xd;Ii++){var wi=cr[Ii];u[wi]||(u[wi]=Sn(wi))}};te();var ee=function(Sn){bn[C]&&console.info("Redefining LocalForage driver: "+C),bn[C]=u,ia[C]=Sn,b()};"_support"in u?u._support&&typeof u._support=="function"?u._support().then(ee,S):ee(!!u._support):ee(!0)}catch(Ae){S(Ae)}});return w(p,m,_),p},c.prototype.driver=function(){return this._driver||null},c.prototype.getDriver=function(u,m,_){var p=bn[u]?E.resolve(bn[u]):E.reject(new Error("Driver not found."));return w(p,m,_),p},c.prototype.getSerializer=function(u){var m=E.resolve(Si);return w(m,u),m},c.prototype.ready=function(u){var m=this,_=m._driverSet.then(function(){return m._ready===null&&(m._ready=m._initDriver()),m._ready});return w(_,u,u),_},c.prototype.setDriver=function(u,m,_){var p=this;ra(u)||(u=[u]);var b=this._getSupportedDrivers(u);function S(){p._config.driver=p.driver()}function C(R){return p._extend(R),S(),p._ready=p._initStorage(p._config),p._ready}function T(R){return function(){var H=0;function $(){for(;H<R.length;){var Y=R[H];return H++,p._dbInfo=null,p._ready=null,p.getDriver(Y).then(C).catch($)}S();var te=new Error("No available storage method found.");return p._driverSet=E.reject(te),p._driverSet}return $()}}var I=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=I.then(function(){var R=b[0];return p._dbInfo=null,p._ready=null,p.getDriver(R).then(function(H){p._driver=H._driver,S(),p._wrapLibraryMethodsWithReady(),p._initDriver=T(b)})}).catch(function(){S();var R=new Error("No available storage method found.");return p._driverSet=E.reject(R),p._driverSet}),w(this._driverSet,m,_),this._driverSet},c.prototype.supports=function(u){return!!ia[u]},c.prototype._extend=function(u){Ti(this,u)},c.prototype._getSupportedDrivers=function(u){for(var m=[],_=0,p=u.length;_<p;_++){var b=u[_];this.supports(b)&&m.push(b)}return m},c.prototype._wrapLibraryMethodsWithReady=function(){for(var u=0,m=Ci.length;u<m;u++)Yd(this,Ci[u])},c.prototype.createInstance=function(u){return new c(u)},c}(),Kd=new zd;i.exports=Kd},{3:3}]},{},[4])(4)})});var oc=Di((Gi,Wi)=>{"use strict";(function(t,e){typeof Gi=="object"&&typeof Wi<"u"?Wi.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.fetchRetry=e())})(Gi,function(){"use strict";var t=function(r,i){if(i=i||{},typeof r!="function")throw new n("fetch must be a function");if(typeof i!="object")throw new n("defaults must be an object");if(i.retries!==void 0&&!e(i.retries))throw new n("retries must be a positive integer");if(i.retryDelay!==void 0&&!e(i.retryDelay)&&typeof i.retryDelay!="function")throw new n("retryDelay must be a positive integer or a function returning a positive integer");if(i.retryOn!==void 0&&!Array.isArray(i.retryOn)&&typeof i.retryOn!="function")throw new n("retryOn property expects an array or function");var o={retries:3,retryDelay:1e3,retryOn:[]};return i=Object.assign(o,i),function(a,l){var d=i.retries,g=i.retryDelay,f=i.retryOn;if(l&&l.retries!==void 0)if(e(l.retries))d=l.retries;else throw new n("retries must be a positive integer");if(l&&l.retryDelay!==void 0)if(e(l.retryDelay)||typeof l.retryDelay=="function")g=l.retryDelay;else throw new n("retryDelay must be a positive integer or a function returning a positive integer");if(l&&l.retryOn)if(Array.isArray(l.retryOn)||typeof l.retryOn=="function")f=l.retryOn;else throw new n("retryOn property expects an array or function");return new Promise(function(E,v){var w=function(N){var k=typeof Request<"u"&&a instanceof Request?a.clone():a;r(k,l).then(function(L){if(Array.isArray(f)&&f.indexOf(L.status)===-1)E(L);else if(typeof f=="function")try{return Promise.resolve(f(N,null,L)).then(function(j){j?M(N,null,L):E(L)}).catch(v)}catch(j){v(j)}else N<d?M(N,null,L):E(L)}).catch(function(L){if(typeof f=="function")try{Promise.resolve(f(N,L,null)).then(function(j){j?M(N,L,null):v(L)}).catch(function(j){v(j)})}catch(j){v(j)}else N<d?M(N,L,null):v(L)})};function M(N,k,L){var j=typeof g=="function"?g(N,k,L):g;setTimeout(function(){w(++N)},j)}w(0)})}};function e(r){return Number.isInteger(r)&&r>=0}function n(r){this.name="ArgumentError",this.message=r}return t})});var Ga="11.0.0-rc.0";var A=class A{};O(A,"SDK_VERSION",Ga),O(A,"SDK_VERSION_CODE"),O(A,"SDK","WEB"),O(A,"LOG_PREFIX","CooeeSDK"),O(A,"COOEE","cooee"),O(A,"SESSION_STORAGE_SCROLL_ID","sleid"),O(A,"IDLE_TIME_IN_SECONDS",30*60),O(A,"IN_APP_WRAPPER_NAME","cooee-wrapper"),O(A,"IN_APP_CONTAINER_NAME","cooee-container"),O(A,"IN_APP_DEFAULT_PADDING",15),O(A,"EVENT_SCREEN_VIEW","CE Screen View"),O(A,"EVENT_APP_BACKGROUND","CE App Background"),O(A,"EVENT_TRIGGER_DISPLAYED","CE Trigger Displayed"),O(A,"EVENT_CAMPAIGN_HOLDOUT","CE Campaign Holdout"),O(A,"EVENT_CAMPAIGN_REJECTED","CE Campaign Rejected"),O(A,"EVENT_CAMPAIGN_FAILED","CE Campaign Failed"),O(A,"EVENT_TRIGGER_CLOSED","CE Trigger Closed"),O(A,"EVENT_SCROLL","CE Scroll"),O(A,"EVENT_TRIGGER_CLICKED","CE Trigger Clicked"),O(A,"EVENT_FORM_SUBMITTED","CE Form Submitted"),O(A,"EVENT_EXPERIMENT_START","CE Experiment Start"),O(A,"EVENT_VIDEO_DIALOG_CLOSED","CE Video Dialog Closed"),O(A,"EVENT_VIDEO_DIALOG_OPENED","CE Video Dialog Opened"),O(A,"EVENT_VIDEO_CHANGE","CE Video Changed"),O(A,"EVENT_LAST_VIDEO_ENDED","CE Last Video Ended"),O(A,"EVENT_VIDEO_MUTED","CE Video Muted"),O(A,"EVENT_VIDEO_UNMUTED","CE Video Unmuted"),O(A,"EVENT_ADD_TO_CART_CLICKED","CE Add To Cart Clicked"),O(A,"EVENT_VIEW_ITEM_CLICKED","CE View Item Clicked"),O(A,"EVENT_MORE_ITEM_INFO_CLICKED","CE More Item Info Clicked"),O(A,"EVENT_OPEN_CART_CLICKED","CE Open Cart Clicked"),O(A,"EVENT_ADD_TO_CART","Add To Cart"),O(A,"EVENT_REMOVE_FROM_CART","Remove From Cart"),O(A,"EVENT_VIEW_ITEM","View Item"),O(A,"EVENT_VIEW_CART","View Cart"),O(A,"EVENT_OPEN_CART","Open Cart"),O(A,"EVENT_VIEW_COLLECTION","View Collection"),O(A,"EVENT_BUY_NOW_CLICKED","Buy Now Clicked"),O(A,"EVENT_CHECKOUT_STARTED","Checkout Started"),O(A,"EVENT_REVIEW_CLICKED","Review Clicked"),O(A,"EVENT_ITEM_THUMBNAIL_CLICKED","Item Thumbnail Clicked"),O(A,"JS_LOAD_WHITELIST_EVENTS",[A.EVENT_VIEW_ITEM,A.EVENT_VIEW_CART,A.EVENT_VIEW_COLLECTION]),O(A,"HASH_INITIATE_CHECKOUT","initiate-checkout"),O(A,"HASH_OPEN_CART_DRAWER","open-cart-drawer"),O(A,"ADD_BUNDLE_CTA_INBOUND_EVENT","letscooee:inbound:cta:add-bundle"),O(A,"CTA_OPEN_CART_EVENT","letscooee:outbound:open-cart"),O(A,"CTA_AFTER_REFRESH_UI","letscooee:outbound:refresh-ui"),O(A,"POPUP_ACTIVITY_EVENT","letscooee:outbound:popup-activities"),O(A,"THIRD_PARTY_CHECKOUT_EVENT","letscooee:outbound:third-party-initiate-checkout"),O(A,"CAMPAIGN_DISPLAYED_ACTIVITY","DISPLAYED"),O(A,"CAMPAIGN_CLICKED_ACTIVITY","CLICKED"),O(A,"CAMPAIGN_CLOSED_ACTIVITY","CLOSED"),O(A,"BLACKLISTED_PAGE_NAMES",["collection","product","cart"]),O(A,"PLACEHOLDER_IMAGE","https://cdn.global.letscooee.com/images/placeholders/product.png"),O(A,"SHADOW_SPLITTER",":shadow"),O(A,"CAMPAIGN_ATTRIBUTE","_letscooee_campaign"),O(A,"CONTENT_ATTRIBUTE","_letscooee_content"),O(A,"VIA","_via"),O(A,"PAYMENT_MODAL_DETAILS",[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}]),(()=>{let e=A.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");A.SDK_VERSION_CODE=parseInt(e,10)})();var Ye=A;var Lt={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Ye.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Ye.SDK_VERSION}/dist/widget.min.js`};var be=Ai($a());var Be=class{static debuggerEl;static infoLogs=[];static log(...e){be.default.info(...e)}static verbose(...e){be.default.debug(...e)}static error(...e){be.default.error(...e)}static warn(...e){be.default.warn(...e)}static info(...e){be.default.info(...e),this.infoLogs.unshift({time:new Date,message:e.join(" ")}),this.addToDebugger()}static trace(...e){be.default.trace(...e)}static addToDebugger(){sessionStorage.cooeeDebug&&(this.debuggerEl=this.debuggerEl??document.querySelector("cooee-debugger"),this.debuggerEl&&this.debuggerEl&&(this.debuggerEl.logs=[...this.infoLogs]))}};function T_(t=Ye.LOG_PREFIX){be.default.useDefaults({formatter:function(n){n.unshift(`${t} (v${Ye.SDK_VERSION}):`)}});let e=Qd();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?be.default.setLevel(be.default[localStorage.cooeeLogLevel]):be.default.setLevel(Lt.debug?be.default.TRACE:be.default.OFF)}function Qd(){return new URL(location.href).searchParams?.get("cooee-debug")}var vt=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;currency;static get(){return window.CooeeSDK.config}update(e){return e??={},this.gaEnabled=e.gaEnabled,this.gaMeasurementID=e.gaMeasurementID,this.pixelPush=e.pixelPush,this.website=e.website??{},this.currencyCount=e.currencyCount??0,this.money=e.money,this.currency=e.currency,this.storefrontToken=e.storefrontToken,this.skipItemAttribute=e.skipItemAttribute,this}};var Ya=0,za="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css";function ef(t=document.head){Ka(za,t)}function Ka(t,e=document.head){if(!t)return;let n=document.createElement("link");n.rel="stylesheet",n.href=t,t===za&&(n.crossOrigin="anonymous",n.onload=r=>{let o=r.currentTarget?.sheet?.cssRules;if(o){for(let s of o)if(s.type==CSSRule.FONT_FACE_RULE){let a=t.split("/"),l=a.slice(0,a.length-1).join("/"),d=s.cssText;d=d.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${l}/$4")`);let g=document.createElement("style");g.appendChild(document.createTextNode(d)),document.head.appendChild(g)}}}),e.appendChild(n)}function Fi(t,e=document.head){if(!t)return;Ya++;let n=document.createElement("style");n.id=`cooee-app-css-${Ya}`,n.textContent=t,e.appendChild(n)}async function Xa(){window.CooeeSDK.Swiper||(window.CooeeSDK.Swiper=(await import("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.mjs")).Swiper)}function qa(t,e=!0){if(!t)return;e&&ef(t),Ka(Lt.styleURL,t);let n=vt.get().website.commonCSS;Fi(n,t)}var nf={"[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"},X_=U(y({},nf),{"[class.ng-submitted]":"isSubmitted"});var rf=new ke("",{providedIn:"root",factory:()=>Qa}),Qa="always";var of=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=Dt({type:t});static \u0275inj=Tt({})}return t})();var ec=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:rf,useValue:n.callSetDisabledState??Qa}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=Dt({type:t});static \u0275inj=Tt({imports:[of]})}return t})();var gr=class t{cooeeEvent=new Re;cooeeCTA=new Re;elementRef=P(xe);hasSwiper=!1;_engagementTrigger=ht(null);_triggerContext=ht(null);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get classes(){let e=["letscooee-widget"],n=this._engagementTrigger();return e.push(`widget-${n?.shortID}`),e}get triggerContext(){return this._triggerContext()}set triggerContext(e){this._triggerContext.set(e),this._engagementTrigger.set(e.triggerData),this.engagementTriggerReceived(e.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){Be.verbose("Init",this.constructor.name);let e=this.elementRef.nativeElement.shadowRoot;e&&qa(e,this.hasSwiper)}ngOnDestroy(){Be.verbose("Destroying",this.constructor.name)}sendEventToRenderer(e){this.cooeeEvent.emit(e)}executeCTAViaRenderer(e){this.cooeeCTA.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=ce({type:t,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,r){n&2&&fr(r.classes)},inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:1,vars:0,template:function(n,r){n&1&&Sa(0)},encapsulation:2})};var sf=(t,e)=>({"--option-color":t,"background-color":e}),nc=(t,e)=>e.id;function af(t,e){if(t&1&&(Ot(0,"span",6),Ee(1),qt()),t&2){Ne();let n=_t(0);z(),Zt(n)}}function cf(t,e){if(t&1){let n=Jt();Rt(0),Ot(1,"button",5),Li("click",function(){let i=It(n).$implicit,o=Ne().$implicit,s=Ne();return wt(s.onOptionChange(o,i))}),je(2,af,2,1,"span",6),qt()}if(t&2){let n=e.$implicit,r=Ne().$implicit,i=_t(1),o=n.name,s=Nt(n.displayName||n.name),a=i?n.hexColor??o:"",l=Ne().selectedOptions()[r.name]===o;z(),Dn("color-type",i)("selected",l)("disabled",n.disabled),ya("title",s)("ngStyle",xa(14,sf,a,a)),Xt("aria-checked",l?"true":"false")("data-value",o)("aria-disabled",n.disabled?"true":null)("aria-label",s),z(),Ge(i?-1:2)}}function lf(t,e){if(t&1&&(Ot(0,"div"),Rt(1),Ot(2,"div",1),Ee(3),qt(),Ot(4,"div",2),Ee(5),qt(),Ot(6,"div",3),Mi(7,cf,3,17,"button",4,nc),qt()()),t&2){let n=e.$implicit,r=Ne();fr(Oa("option-group ",n.name.toLowerCase())),z(),Nt(r.hasHexColors(n)),z(2),Qt("",n.name,":"),z(2),Zt(r.selectedOptions()[n.name]),z(),Xt("aria-label",n.name),z(),Pi(n.optionValues)}}var Mn=t=>t.trim().toLowerCase(),tc=class t extends gr{selectedVariant=new Re;item=We.required();selectedOptions=ht({});options=Mt(()=>{let e=this.item();if(!e.options||e.vars.length===1)return[];if(window.cooeeManipulateProduct)try{window.cooeeManipulateProduct(e,this.engagementTrigger)}catch(n){Be.error(n)}return e.options.forEach(n=>{n.optionValues.forEach(r=>{r.disabled=this.isOptionValueDisabledFast(n,r)})}),e.options});matchedVariant=Mt(()=>{let e=this.item(),n=this.selectedOptions();return e.vars.find(r=>e.options.every(i=>{let o=r.selectedOptions.find(s=>s.name===i.name)?.value;return n[i.name]===o}))});availabilityIndex=Mt(()=>{let e=this.item(),n=new Map;return e?.vars?.length&&e.vars.forEach((r,i)=>{if(r.isAvailable)for(let o of r.selectedOptions){let s=Mn(o.name),a=o.value,l=n.get(s);l||n.set(s,l=new Map);let d=l.get(a);d||l.set(a,d=new Set),d.add(i)}}),n});constructor(){super(),Pt(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let e=Pt(()=>{let n=this.item();if(!n?.options)return;let r=y({},this.selectedOptions()),i=n.vars.find(o=>o.isAvailable)??n.vars[0];n.options.forEach(o=>{let s=i?.selectedOptions.find(a=>a.name===o.name)?.value;s&&(r[o.name]=s)}),this.selectedOptions.set(r),e.destroy()})}ngOnInit(){super.ngOnInit();let e=this.elementRef.nativeElement.shadowRoot;if(!e)return;let n=vt.get().website?.itemSwatchMapping;n&&Fi(n,e)}onOptionChange(e,n){let r=y({},this.selectedOptions());r[e.name]=n.name,this.selectedOptions.set(r)}engagementTriggerReceived(){}update(){}hasHexColors(e){return!!e.optionValues[0]?.name.match(/#[a-f0-9]{6}\b/i)}getCandidateVariantsExcluding(e){let n=this.item(),r=this.availabilityIndex(),i=new Set;n.vars.forEach((s,a)=>{s.isAvailable&&i.add(a)});let o=i;for(let[s,a]of Object.entries(this.selectedOptions())){if(Mn(s)===Mn(e))continue;let l=r.get(Mn(s));if(!l)return new Set;let d=l.get(String(a));if(!d)return new Set;if(o=new Set([...o].filter(g=>d.has(g))),o.size===0)return o}return o}isOptionValueDisabledFast(e,n){let i=this.availabilityIndex().get(Mn(e.name));if(!i)return!0;let o=n.name,s=i.get(o);if(!s||s.size===0)return!0;let a=this.getCandidateVariantsExcluding(e.name);if(a.size===0)return!0;for(let l of a)if(s.has(l))return!1;return!0}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=ce({type:t,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[At],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&&Mi(0,lf,9,7,"div",0,nc),n&2&&Pi(r.options())},dependencies:[La,Pa,ec],styles:[`.option-group{display:flex;gap:4px;align-items:center}.option-group+.option-group{margin-top:8px}.option-values{display:flex;flex-wrap:nowrap;overflow-x:auto;padding:6px;gap:4px;scrollbar-gutter:stable both-edges;scrollbar-width:none}.option-values::-webkit-scrollbar{display:none}.selected-value{display:none}.option-value{padding:5px 10px;border:1px solid #ccc;cursor:pointer;border-radius:4px;min-width:32px;min-height:32px;text-align:center;position:relative;flex-shrink:0;--selected-color: var(--option-color, rgb(var(--lc-color-button, 0 0 0)))}.option-value.selected{box-shadow:#fff 0 0 0 2px,var(--selected-color) 0 0 0 4px}.option-value.disabled{opacity:.5;pointer-events:none}
1
+ import{$ as Ri,$a as Nt,A as Tt,Ab as La,B as ke,Ba as Ea,C as P,Ca as ba,Cb as ka,D as lr,Da as Sa,Db as Fa,E as It,Ea as Jt,Eb as Va,F as wt,Fa as mt,Fb as Ba,G as ur,Ga as Li,Gb as hr,Ha as xt,Hb as rt,I as Oe,Ia as Ne,Ib as $e,J as ge,Ja as Ca,Ka as Ta,Kb as pr,L as ht,La as Ia,Lb as xn,Ma as wa,Mb as Ua,Na as Da,Nb as Rn,O as Tn,Ob as Ha,P as xe,Pb as ja,Q as _a,Qb as mr,R as Oi,S as In,Sa as Dn,T as z,Ta as fr,Ua as Ee,Va as Zt,W as dr,Wa as Qt,Y as zt,Z as wn,_ as xi,_a as Rt,a as y,aa as ce,ab as _t,b as U,ba as Dt,bb as Aa,c as Cn,ca as Kt,cb as Oa,d as sa,da as ga,e as Di,ea as At,f as Ai,fb as xa,g as O,ga as va,gb as An,h as aa,ha as Re,hb as On,ia as Fe,j as me,ja as pt,k as ca,ka as Ni,la as Xt,lb as Mt,ma as je,mb as Pt,n as la,na as Ge,nb as gt,ob as We,p as ua,pa as Mi,qa as Pi,qb as Ra,ra as ya,rb as ki,s as da,sa as Ot,t as fa,ta as qt,u as ha,ub as Na,v as pa,va as ue,vb as Ma,wa as ve,x as ma,xa as Ve,xb as Pa,z as _e}from"./chunk-S6UU36F3.js";var $a=Di((Wa,_r)=>{"use strict";(function(t){"use strict";var e={};e.VERSION="1.6.1";var n,r={},i=function(d,g){return function(){return g.apply(d,arguments)}},o=function(){var d=arguments,g=d[0],f,E;for(E=1;E<d.length;E++)for(f in d[E])!(f in g)&&d[E].hasOwnProperty(f)&&(g[f]=d[E][f]);return g},s=function(d,g){return{value:d,name:g}};e.TRACE=s(1,"TRACE"),e.DEBUG=s(2,"DEBUG"),e.INFO=s(3,"INFO"),e.TIME=s(4,"TIME"),e.WARN=s(5,"WARN"),e.ERROR=s(8,"ERROR"),e.OFF=s(99,"OFF");var a=function(d){this.context=d,this.setLevel(d.filterLevel),this.log=this.info};a.prototype={setLevel:function(d){d&&"value"in d&&(this.context.filterLevel=d)},getLevel:function(){return this.context.filterLevel},enabledFor:function(d){var g=this.context.filterLevel;return d.value>=g.value},trace:function(){this.invoke(e.TRACE,arguments)},debug:function(){this.invoke(e.DEBUG,arguments)},info:function(){this.invoke(e.INFO,arguments)},warn:function(){this.invoke(e.WARN,arguments)},error:function(){this.invoke(e.ERROR,arguments)},time:function(d){typeof d=="string"&&d.length>0&&this.invoke(e.TIME,[d,"start"])},timeEnd:function(d){typeof d=="string"&&d.length>0&&this.invoke(e.TIME,[d,"end"])},invoke:function(d,g){n&&this.enabledFor(d)&&n(g,o({level:d},this.context))}};var l=new a({filterLevel:e.OFF});(function(){var d=e;d.enabledFor=i(l,l.enabledFor),d.trace=i(l,l.trace),d.debug=i(l,l.debug),d.time=i(l,l.time),d.timeEnd=i(l,l.timeEnd),d.info=i(l,l.info),d.warn=i(l,l.warn),d.error=i(l,l.error),d.log=d.info})(),e.setHandler=function(d){n=d},e.setLevel=function(d){l.setLevel(d);for(var g in r)r.hasOwnProperty(g)&&r[g].setLevel(d)},e.getLevel=function(){return l.getLevel()},e.get=function(d){return r[d]||(r[d]=new a(o({name:d},l.context)))},e.createDefaultHandler=function(d){d=d||{},d.formatter=d.formatter||function(v,w){w.name&&v.unshift("["+w.name+"]")};var g={},f=function(E,v){Function.prototype.apply.call(E,console,v)};return typeof console>"u"?function(){}:function(E,v){E=Array.prototype.slice.call(E);var w=console.log,M;v.level===e.TIME?(M=(v.name?"["+v.name+"] ":"")+E[0],E[1]==="start"?console.time?console.time(M):g[M]=new Date().getTime():console.timeEnd?console.timeEnd(M):f(w,[M+": "+(new Date().getTime()-g[M])+"ms"])):(v.level===e.WARN&&console.warn?w=console.warn:v.level===e.ERROR&&console.error?w=console.error:v.level===e.INFO&&console.info?w=console.info:v.level===e.DEBUG&&console.debug?w=console.debug:v.level===e.TRACE&&console.trace&&(w=console.trace),d.formatter(E,v),f(w,E))}},e.useDefaults=function(d){e.setLevel(d&&d.defaultLevel||e.DEBUG),e.setHandler(e.createDefaultHandler(d))},e.setDefaults=e.useDefaults,typeof define=="function"&&define.amd?define(e):typeof _r<"u"&&_r.exports?_r.exports=e:(e._prevLogger=t.Logger,e.noConflict=function(){return t.Logger=e._prevLogger,e},t.Logger=e)})(Wa)});var ic=Di((rc,Bi)=>{"use strict";(function(t){if(typeof rc=="object"&&typeof Bi<"u")Bi.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var e;typeof window<"u"?e=window:typeof global<"u"?e=global:typeof self<"u"?e=self:e=this,e.localforage=t()}})(function(){var t,e,n;return function r(i,o,s){function a(g,f){if(!o[g]){if(!i[g]){var E=typeof Cn=="function"&&Cn;if(!f&&E)return E(g,!0);if(l)return l(g,!0);var v=new Error("Cannot find module '"+g+"'");throw v.code="MODULE_NOT_FOUND",v}var w=o[g]={exports:{}};i[g][0].call(w.exports,function(M){var N=i[g][1][M];return a(N||M)},w,w.exports,r,i,o,s)}return o[g].exports}for(var l=typeof Cn=="function"&&Cn,d=0;d<s.length;d++)a(s[d]);return a}({1:[function(r,i,o){(function(s){"use strict";var a=s.MutationObserver||s.WebKitMutationObserver,l;if(a){var d=0,g=new a(M),f=s.document.createTextNode("");g.observe(f,{characterData:!0}),l=function(){f.data=d=++d%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var E=new s.MessageChannel;E.port1.onmessage=M,l=function(){E.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?l=function(){var k=s.document.createElement("script");k.onreadystatechange=function(){M(),k.onreadystatechange=null,k.parentNode.removeChild(k),k=null},s.document.documentElement.appendChild(k)}:l=function(){setTimeout(M,0)};var v,w=[];function M(){v=!0;for(var k,L,j=w.length;j;){for(L=w,w=[],k=-1;++k<j;)L[k]();j=w.length}v=!1}i.exports=N;function N(k){w.push(k)===1&&!v&&l()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(r,i,o){"use strict";var s=r(1);function a(){}var l={},d=["REJECTED"],g=["FULFILLED"],f=["PENDING"];i.exports=E;function E(D){if(typeof D!="function")throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,D!==a&&N(this,D)}E.prototype.catch=function(D){return this.then(null,D)},E.prototype.then=function(D,G){if(typeof D!="function"&&this.state===g||typeof G!="function"&&this.state===d)return this;var B=new this.constructor(a);if(this.state!==f){var W=this.state===g?D:G;w(B,W,this.outcome)}else this.queue.push(new v(B,D,G));return B};function v(D,G,B){this.promise=D,typeof G=="function"&&(this.onFulfilled=G,this.callFulfilled=this.otherCallFulfilled),typeof B=="function"&&(this.onRejected=B,this.callRejected=this.otherCallRejected)}v.prototype.callFulfilled=function(D){l.resolve(this.promise,D)},v.prototype.otherCallFulfilled=function(D){w(this.promise,this.onFulfilled,D)},v.prototype.callRejected=function(D){l.reject(this.promise,D)},v.prototype.otherCallRejected=function(D){w(this.promise,this.onRejected,D)};function w(D,G,B){s(function(){var W;try{W=G(B)}catch(Q){return l.reject(D,Q)}W===D?l.reject(D,new TypeError("Cannot resolve promise with itself")):l.resolve(D,W)})}l.resolve=function(D,G){var B=k(M,G);if(B.status==="error")return l.reject(D,B.value);var W=B.value;if(W)N(D,W);else{D.state=g,D.outcome=G;for(var Q=-1,J=D.queue.length;++Q<J;)D.queue[Q].callFulfilled(G)}return D},l.reject=function(D,G){D.state=d,D.outcome=G;for(var B=-1,W=D.queue.length;++B<W;)D.queue[B].callRejected(G);return D};function M(D){var G=D&&D.then;if(D&&(typeof D=="object"||typeof D=="function")&&typeof G=="function")return function(){G.apply(D,arguments)}}function N(D,G){var B=!1;function W(De){B||(B=!0,l.reject(D,De))}function Q(De){B||(B=!0,l.resolve(D,De))}function J(){G(Q,W)}var ae=k(J);ae.status==="error"&&W(ae.value)}function k(D,G){var B={};try{B.value=D(G),B.status="success"}catch(W){B.status="error",B.value=W}return B}E.resolve=L;function L(D){return D instanceof this?D:l.resolve(new this(a),D)}E.reject=j;function j(D){var G=new this(a);return l.reject(G,D)}E.all=Ie;function Ie(D){var G=this;if(Object.prototype.toString.call(D)!=="[object Array]")return this.reject(new TypeError("must be an array"));var B=D.length,W=!1;if(!B)return this.resolve([]);for(var Q=new Array(B),J=0,ae=-1,De=new this(a);++ae<B;)tt(D[ae],ae);return De;function tt(En,sr){G.resolve(En).then(gi,function($t){W||(W=!0,l.reject(De,$t))});function gi($t){Q[sr]=$t,++J===B&&!W&&(W=!0,l.resolve(De,Q))}}}E.race=we;function we(D){var G=this;if(Object.prototype.toString.call(D)!=="[object Array]")return this.reject(new TypeError("must be an array"));var B=D.length,W=!1;if(!B)return this.resolve([]);for(var Q=-1,J=new this(a);++Q<B;)ae(D[Q]);return J;function ae(De){G.resolve(De).then(function(tt){W||(W=!0,l.resolve(J,tt))},function(tt){W||(W=!0,l.reject(J,tt))})}}},{1:1}],3:[function(r,i,o){(function(s){"use strict";typeof s.Promise!="function"&&(s.Promise=r(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(r,i,o){"use strict";var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c};function a(c,h){if(!(c instanceof h))throw new TypeError("Cannot call a class as a function")}function l(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var d=l();function g(){try{if(!d||!d.open)return!1;var c=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),h=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!c||h)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function f(c,h){c=c||[],h=h||{};try{return new Blob(c,h)}catch(p){if(p.name!=="TypeError")throw p;for(var u=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,m=new u,_=0;_<c.length;_+=1)m.append(c[_]);return m.getBlob(h.type)}}typeof Promise>"u"&&r(3);var E=Promise;function v(c,h){h&&c.then(function(u){h(null,u)},function(u){h(u)})}function w(c,h,u){typeof h=="function"&&c.then(h),typeof u=="function"&&c.catch(u)}function M(c){return typeof c!="string"&&(console.warn(c+" used as a key, but it is not a string."),c=String(c)),c}function N(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var k="local-forage-detect-blob-support",L=void 0,j={},Ie=Object.prototype.toString,we="readonly",D="readwrite";function G(c){for(var h=c.length,u=new ArrayBuffer(h),m=new Uint8Array(u),_=0;_<h;_++)m[_]=c.charCodeAt(_);return u}function B(c){return new E(function(h){var u=c.transaction(k,D),m=f([""]);u.objectStore(k).put(m,"key"),u.onabort=function(_){_.preventDefault(),_.stopPropagation(),h(!1)},u.oncomplete=function(){var _=navigator.userAgent.match(/Chrome\/(\d+)/),p=navigator.userAgent.match(/Edge\//);h(p||!_||parseInt(_[1],10)>=43)}}).catch(function(){return!1})}function W(c){return typeof L=="boolean"?E.resolve(L):B(c).then(function(h){return L=h,L})}function Q(c){var h=j[c.name],u={};u.promise=new E(function(m,_){u.resolve=m,u.reject=_}),h.deferredOperations.push(u),h.dbReady?h.dbReady=h.dbReady.then(function(){return u.promise}):h.dbReady=u.promise}function J(c){var h=j[c.name],u=h.deferredOperations.pop();if(u)return u.resolve(),u.promise}function ae(c,h){var u=j[c.name],m=u.deferredOperations.pop();if(m)return m.reject(h),m.promise}function De(c,h){return new E(function(u,m){if(j[c.name]=j[c.name]||Us(),c.db)if(h)Q(c),c.db.close();else return u(c.db);var _=[c.name];h&&_.push(c.version);var p=d.open.apply(d,_);h&&(p.onupgradeneeded=function(b){var S=p.result;try{S.createObjectStore(c.storeName),b.oldVersion<=1&&S.createObjectStore(k)}catch(C){if(C.name==="ConstraintError")console.warn('The database "'+c.name+'" has been upgraded from version '+b.oldVersion+" to version "+b.newVersion+', but the storage "'+c.storeName+'" already exists.');else throw C}}),p.onerror=function(b){b.preventDefault(),m(p.error)},p.onsuccess=function(){var b=p.result;b.onversionchange=function(S){S.target.close()},u(b),J(c)}})}function tt(c){return De(c,!1)}function En(c){return De(c,!0)}function sr(c,h){if(!c.db)return!0;var u=!c.db.objectStoreNames.contains(c.storeName),m=c.version<c.db.version,_=c.version>c.db.version;if(m&&(c.version!==h&&console.warn('The database "'+c.name+`" can't be downgraded from version `+c.db.version+" to version "+c.version+"."),c.version=c.db.version),_||u){if(u){var p=c.db.version+1;p>c.version&&(c.version=p)}return!0}return!1}function gi(c){return new E(function(h,u){var m=new FileReader;m.onerror=u,m.onloadend=function(_){var p=btoa(_.target.result||"");h({__local_forage_encoded_blob:!0,data:p,type:c.type})},m.readAsBinaryString(c)})}function $t(c){var h=G(atob(c.data));return f([h],{type:c.type})}function Bs(c){return c&&c.__local_forage_encoded_blob}function Qu(c){var h=this,u=h._initReady().then(function(){var m=j[h._dbInfo.name];if(m&&m.dbReady)return m.dbReady});return w(u,c,c),u}function ed(c){Q(c);for(var h=j[c.name],u=h.forages,m=0;m<u.length;m++){var _=u[m];_._dbInfo.db&&(_._dbInfo.db.close(),_._dbInfo.db=null)}return c.db=null,tt(c).then(function(p){return c.db=p,sr(c)?En(c):p}).then(function(p){c.db=h.db=p;for(var b=0;b<u.length;b++)u[b]._dbInfo.db=p}).catch(function(p){throw ae(c,p),p})}function nt(c,h,u,m){m===void 0&&(m=1);try{var _=c.db.transaction(c.storeName,h);u(null,_)}catch(p){if(m>0&&(!c.db||p.name==="InvalidStateError"||p.name==="NotFoundError"))return E.resolve().then(function(){if(!c.db||p.name==="NotFoundError"&&!c.db.objectStoreNames.contains(c.storeName)&&c.version<=c.db.version)return c.db&&(c.version=c.db.version+1),En(c)}).then(function(){return ed(c).then(function(){nt(c,h,u,m-1)})}).catch(u);u(p)}}function Us(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function td(c){var h=this,u={db:null};if(c)for(var m in c)u[m]=c[m];var _=j[u.name];_||(_=Us(),j[u.name]=_),_.forages.push(h),h._initReady||(h._initReady=h.ready,h.ready=Qu);var p=[];function b(){return E.resolve()}for(var S=0;S<_.forages.length;S++){var C=_.forages[S];C!==h&&p.push(C._initReady().catch(b))}var T=_.forages.slice(0);return E.all(p).then(function(){return u.db=_.db,tt(u)}).then(function(I){return u.db=I,sr(u,h._defaultConfig.version)?En(u):I}).then(function(I){u.db=_.db=I,h._dbInfo=u;for(var R=0;R<T.length;R++){var H=T[R];H!==h&&(H._dbInfo.db=u.db,H._dbInfo.version=u.version)}})}function nd(c,h){var u=this;c=M(c);var m=new E(function(_,p){u.ready().then(function(){nt(u._dbInfo,we,function(b,S){if(b)return p(b);try{var C=S.objectStore(u._dbInfo.storeName),T=C.get(c);T.onsuccess=function(){var I=T.result;I===void 0&&(I=null),Bs(I)&&(I=$t(I)),_(I)},T.onerror=function(){p(T.error)}}catch(I){p(I)}})}).catch(p)});return v(m,h),m}function rd(c,h){var u=this,m=new E(function(_,p){u.ready().then(function(){nt(u._dbInfo,we,function(b,S){if(b)return p(b);try{var C=S.objectStore(u._dbInfo.storeName),T=C.openCursor(),I=1;T.onsuccess=function(){var R=T.result;if(R){var H=R.value;Bs(H)&&(H=$t(H));var $=c(H,R.key,I++);$!==void 0?_($):R.continue()}else _()},T.onerror=function(){p(T.error)}}catch(R){p(R)}})}).catch(p)});return v(m,h),m}function id(c,h,u){var m=this;c=M(c);var _=new E(function(p,b){var S;m.ready().then(function(){return S=m._dbInfo,Ie.call(h)==="[object Blob]"?W(S.db).then(function(C){return C?h:gi(h)}):h}).then(function(C){nt(m._dbInfo,D,function(T,I){if(T)return b(T);try{var R=I.objectStore(m._dbInfo.storeName);C===null&&(C=void 0);var H=R.put(C,c);I.oncomplete=function(){C===void 0&&(C=null),p(C)},I.onabort=I.onerror=function(){var $=H.error?H.error:H.transaction.error;b($)}}catch($){b($)}})}).catch(b)});return v(_,u),_}function od(c,h){var u=this;c=M(c);var m=new E(function(_,p){u.ready().then(function(){nt(u._dbInfo,D,function(b,S){if(b)return p(b);try{var C=S.objectStore(u._dbInfo.storeName),T=C.delete(c);S.oncomplete=function(){_()},S.onerror=function(){p(T.error)},S.onabort=function(){var I=T.error?T.error:T.transaction.error;p(I)}}catch(I){p(I)}})}).catch(p)});return v(m,h),m}function sd(c){var h=this,u=new E(function(m,_){h.ready().then(function(){nt(h._dbInfo,D,function(p,b){if(p)return _(p);try{var S=b.objectStore(h._dbInfo.storeName),C=S.clear();b.oncomplete=function(){m()},b.onabort=b.onerror=function(){var T=C.error?C.error:C.transaction.error;_(T)}}catch(T){_(T)}})}).catch(_)});return v(u,c),u}function ad(c){var h=this,u=new E(function(m,_){h.ready().then(function(){nt(h._dbInfo,we,function(p,b){if(p)return _(p);try{var S=b.objectStore(h._dbInfo.storeName),C=S.count();C.onsuccess=function(){m(C.result)},C.onerror=function(){_(C.error)}}catch(T){_(T)}})}).catch(_)});return v(u,c),u}function cd(c,h){var u=this,m=new E(function(_,p){if(c<0){_(null);return}u.ready().then(function(){nt(u._dbInfo,we,function(b,S){if(b)return p(b);try{var C=S.objectStore(u._dbInfo.storeName),T=!1,I=C.openKeyCursor();I.onsuccess=function(){var R=I.result;if(!R){_(null);return}c===0||T?_(R.key):(T=!0,R.advance(c))},I.onerror=function(){p(I.error)}}catch(R){p(R)}})}).catch(p)});return v(m,h),m}function ld(c){var h=this,u=new E(function(m,_){h.ready().then(function(){nt(h._dbInfo,we,function(p,b){if(p)return _(p);try{var S=b.objectStore(h._dbInfo.storeName),C=S.openKeyCursor(),T=[];C.onsuccess=function(){var I=C.result;if(!I){m(T);return}T.push(I.key),I.continue()},C.onerror=function(){_(C.error)}}catch(I){_(I)}})}).catch(_)});return v(u,c),u}function ud(c,h){h=N.apply(this,arguments);var u=this.config();c=typeof c!="function"&&c||{},c.name||(c.name=c.name||u.name,c.storeName=c.storeName||u.storeName);var m=this,_;if(!c.name)_=E.reject("Invalid arguments");else{var p=c.name===u.name&&m._dbInfo.db,b=p?E.resolve(m._dbInfo.db):tt(c).then(function(S){var C=j[c.name],T=C.forages;C.db=S;for(var I=0;I<T.length;I++)T[I]._dbInfo.db=S;return S});c.storeName?_=b.then(function(S){if(S.objectStoreNames.contains(c.storeName)){var C=S.version+1;Q(c);var T=j[c.name],I=T.forages;S.close();for(var R=0;R<I.length;R++){var H=I[R];H._dbInfo.db=null,H._dbInfo.version=C}var $=new E(function(Y,te){var ee=d.open(c.name,C);ee.onerror=function(Ae){var Sn=ee.result;Sn.close(),te(Ae)},ee.onupgradeneeded=function(){var Ae=ee.result;Ae.deleteObjectStore(c.storeName)},ee.onsuccess=function(){var Ae=ee.result;Ae.close(),Y(Ae)}});return $.then(function(Y){T.db=Y;for(var te=0;te<I.length;te++){var ee=I[te];ee._dbInfo.db=Y,J(ee._dbInfo)}}).catch(function(Y){throw(ae(c,Y)||E.resolve()).catch(function(){}),Y})}}):_=b.then(function(S){Q(c);var C=j[c.name],T=C.forages;S.close();for(var I=0;I<T.length;I++){var R=T[I];R._dbInfo.db=null}var H=new E(function($,Y){var te=d.deleteDatabase(c.name);te.onerror=function(){var ee=te.result;ee&&ee.close(),Y(te.error)},te.onblocked=function(){console.warn('dropInstance blocked for database "'+c.name+'" until all open connections are closed')},te.onsuccess=function(){var ee=te.result;ee&&ee.close(),$(ee)}});return H.then(function($){C.db=$;for(var Y=0;Y<T.length;Y++){var te=T[Y];J(te._dbInfo)}}).catch(function($){throw(ae(c,$)||E.resolve()).catch(function(){}),$})})}return v(_,h),_}var dd={_driver:"asyncStorage",_initStorage:td,_support:g(),iterate:rd,getItem:nd,setItem:id,removeItem:od,clear:sd,length:ad,key:cd,keys:ld,dropInstance:ud};function fd(){return typeof openDatabase=="function"}var dt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hd="~~local_forage_type~",Hs=/^~~local_forage_type~([^~]+)~/,ar="__lfsc__:",vi=ar.length,yi="arbf",Ei="blob",js="si08",Gs="ui08",Ws="uic8",$s="si16",Ys="si32",zs="ur16",Ks="ui32",Xs="fl32",qs="fl64",Js=vi+yi.length,Zs=Object.prototype.toString;function Qs(c){var h=c.length*.75,u=c.length,m,_=0,p,b,S,C;c[c.length-1]==="="&&(h--,c[c.length-2]==="="&&h--);var T=new ArrayBuffer(h),I=new Uint8Array(T);for(m=0;m<u;m+=4)p=dt.indexOf(c[m]),b=dt.indexOf(c[m+1]),S=dt.indexOf(c[m+2]),C=dt.indexOf(c[m+3]),I[_++]=p<<2|b>>4,I[_++]=(b&15)<<4|S>>2,I[_++]=(S&3)<<6|C&63;return T}function bi(c){var h=new Uint8Array(c),u="",m;for(m=0;m<h.length;m+=3)u+=dt[h[m]>>2],u+=dt[(h[m]&3)<<4|h[m+1]>>4],u+=dt[(h[m+1]&15)<<2|h[m+2]>>6],u+=dt[h[m+2]&63];return h.length%3===2?u=u.substring(0,u.length-1)+"=":h.length%3===1&&(u=u.substring(0,u.length-2)+"=="),u}function pd(c,h){var u="";if(c&&(u=Zs.call(c)),c&&(u==="[object ArrayBuffer]"||c.buffer&&Zs.call(c.buffer)==="[object ArrayBuffer]")){var m,_=ar;c instanceof ArrayBuffer?(m=c,_+=yi):(m=c.buffer,u==="[object Int8Array]"?_+=js:u==="[object Uint8Array]"?_+=Gs:u==="[object Uint8ClampedArray]"?_+=Ws:u==="[object Int16Array]"?_+=$s:u==="[object Uint16Array]"?_+=zs:u==="[object Int32Array]"?_+=Ys:u==="[object Uint32Array]"?_+=Ks:u==="[object Float32Array]"?_+=Xs:u==="[object Float64Array]"?_+=qs:h(new Error("Failed to get type for BinaryArray"))),h(_+bi(m))}else if(u==="[object Blob]"){var p=new FileReader;p.onload=function(){var b=hd+c.type+"~"+bi(this.result);h(ar+Ei+b)},p.readAsArrayBuffer(c)}else try{h(JSON.stringify(c))}catch(b){console.error("Couldn't convert value into a JSON string: ",c),h(null,b)}}function md(c){if(c.substring(0,vi)!==ar)return JSON.parse(c);var h=c.substring(Js),u=c.substring(vi,Js),m;if(u===Ei&&Hs.test(h)){var _=h.match(Hs);m=_[1],h=h.substring(_[0].length)}var p=Qs(h);switch(u){case yi:return p;case Ei:return f([p],{type:m});case js:return new Int8Array(p);case Gs:return new Uint8Array(p);case Ws:return new Uint8ClampedArray(p);case $s:return new Int16Array(p);case zs:return new Uint16Array(p);case Ys:return new Int32Array(p);case Ks:return new Uint32Array(p);case Xs:return new Float32Array(p);case qs:return new Float64Array(p);default:throw new Error("Unkown type: "+u)}}var Si={serialize:pd,deserialize:md,stringToBuffer:Qs,bufferToString:bi};function ea(c,h,u,m){c.executeSql("CREATE TABLE IF NOT EXISTS "+h.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],u,m)}function _d(c){var h=this,u={db:null};if(c)for(var m in c)u[m]=typeof c[m]!="string"?c[m].toString():c[m];var _=new E(function(p,b){try{u.db=openDatabase(u.name,String(u.version),u.description,u.size)}catch(S){return b(S)}u.db.transaction(function(S){ea(S,u,function(){h._dbInfo=u,p()},function(C,T){b(T)})},b)});return u.serializer=Si,_}function ft(c,h,u,m,_,p){c.executeSql(u,m,_,function(b,S){S.code===S.SYNTAX_ERR?b.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[h.storeName],function(C,T){T.rows.length?p(C,S):ea(C,h,function(){C.executeSql(u,m,_,p)},p)},p):p(b,S)},p)}function gd(c,h){var u=this;c=M(c);var m=new E(function(_,p){u.ready().then(function(){var b=u._dbInfo;b.db.transaction(function(S){ft(S,b,"SELECT * FROM "+b.storeName+" WHERE key = ? LIMIT 1",[c],function(C,T){var I=T.rows.length?T.rows.item(0).value:null;I&&(I=b.serializer.deserialize(I)),_(I)},function(C,T){p(T)})})}).catch(p)});return v(m,h),m}function vd(c,h){var u=this,m=new E(function(_,p){u.ready().then(function(){var b=u._dbInfo;b.db.transaction(function(S){ft(S,b,"SELECT * FROM "+b.storeName,[],function(C,T){for(var I=T.rows,R=I.length,H=0;H<R;H++){var $=I.item(H),Y=$.value;if(Y&&(Y=b.serializer.deserialize(Y)),Y=c(Y,$.key,H+1),Y!==void 0){_(Y);return}}_()},function(C,T){p(T)})})}).catch(p)});return v(m,h),m}function ta(c,h,u,m){var _=this;c=M(c);var p=new E(function(b,S){_.ready().then(function(){h===void 0&&(h=null);var C=h,T=_._dbInfo;T.serializer.serialize(h,function(I,R){R?S(R):T.db.transaction(function(H){ft(H,T,"INSERT OR REPLACE INTO "+T.storeName+" (key, value) VALUES (?, ?)",[c,I],function(){b(C)},function($,Y){S(Y)})},function(H){if(H.code===H.QUOTA_ERR){if(m>0){b(ta.apply(_,[c,C,u,m-1]));return}S(H)}})})}).catch(S)});return v(p,u),p}function yd(c,h,u){return ta.apply(this,[c,h,u,1])}function Ed(c,h){var u=this;c=M(c);var m=new E(function(_,p){u.ready().then(function(){var b=u._dbInfo;b.db.transaction(function(S){ft(S,b,"DELETE FROM "+b.storeName+" WHERE key = ?",[c],function(){_()},function(C,T){p(T)})})}).catch(p)});return v(m,h),m}function bd(c){var h=this,u=new E(function(m,_){h.ready().then(function(){var p=h._dbInfo;p.db.transaction(function(b){ft(b,p,"DELETE FROM "+p.storeName,[],function(){m()},function(S,C){_(C)})})}).catch(_)});return v(u,c),u}function Sd(c){var h=this,u=new E(function(m,_){h.ready().then(function(){var p=h._dbInfo;p.db.transaction(function(b){ft(b,p,"SELECT COUNT(key) as c FROM "+p.storeName,[],function(S,C){var T=C.rows.item(0).c;m(T)},function(S,C){_(C)})})}).catch(_)});return v(u,c),u}function Cd(c,h){var u=this,m=new E(function(_,p){u.ready().then(function(){var b=u._dbInfo;b.db.transaction(function(S){ft(S,b,"SELECT key FROM "+b.storeName+" WHERE id = ? LIMIT 1",[c+1],function(C,T){var I=T.rows.length?T.rows.item(0).key:null;_(I)},function(C,T){p(T)})})}).catch(p)});return v(m,h),m}function Td(c){var h=this,u=new E(function(m,_){h.ready().then(function(){var p=h._dbInfo;p.db.transaction(function(b){ft(b,p,"SELECT key FROM "+p.storeName,[],function(S,C){for(var T=[],I=0;I<C.rows.length;I++)T.push(C.rows.item(I).key);m(T)},function(S,C){_(C)})})}).catch(_)});return v(u,c),u}function Id(c){return new E(function(h,u){c.transaction(function(m){m.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(_,p){for(var b=[],S=0;S<p.rows.length;S++)b.push(p.rows.item(S).name);h({db:c,storeNames:b})},function(_,p){u(p)})},function(m){u(m)})})}function wd(c,h){h=N.apply(this,arguments);var u=this.config();c=typeof c!="function"&&c||{},c.name||(c.name=c.name||u.name,c.storeName=c.storeName||u.storeName);var m=this,_;return c.name?_=new E(function(p){var b;c.name===u.name?b=m._dbInfo.db:b=openDatabase(c.name,"","",0),c.storeName?p({db:b,storeNames:[c.storeName]}):p(Id(b))}).then(function(p){return new E(function(b,S){p.db.transaction(function(C){function T($){return new E(function(Y,te){C.executeSql("DROP TABLE IF EXISTS "+$,[],function(){Y()},function(ee,Ae){te(Ae)})})}for(var I=[],R=0,H=p.storeNames.length;R<H;R++)I.push(T(p.storeNames[R]));E.all(I).then(function(){b()}).catch(function($){S($)})},function(C){S(C)})})}):_=E.reject("Invalid arguments"),v(_,h),_}var Dd={_driver:"webSQLStorage",_initStorage:_d,_support:fd(),iterate:vd,getItem:gd,setItem:yd,removeItem:Ed,clear:bd,length:Sd,key:Cd,keys:Td,dropInstance:wd};function Ad(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function na(c,h){var u=c.name+"/";return c.storeName!==h.storeName&&(u+=c.storeName+"/"),u}function Od(){var c="_localforage_support_test";try{return localStorage.setItem(c,!0),localStorage.removeItem(c),!1}catch{return!0}}function xd(){return!Od()||localStorage.length>0}function Rd(c){var h=this,u={};if(c)for(var m in c)u[m]=c[m];return u.keyPrefix=na(c,h._defaultConfig),xd()?(h._dbInfo=u,u.serializer=Si,E.resolve()):E.reject()}function Nd(c){var h=this,u=h.ready().then(function(){for(var m=h._dbInfo.keyPrefix,_=localStorage.length-1;_>=0;_--){var p=localStorage.key(_);p.indexOf(m)===0&&localStorage.removeItem(p)}});return v(u,c),u}function Md(c,h){var u=this;c=M(c);var m=u.ready().then(function(){var _=u._dbInfo,p=localStorage.getItem(_.keyPrefix+c);return p&&(p=_.serializer.deserialize(p)),p});return v(m,h),m}function Pd(c,h){var u=this,m=u.ready().then(function(){for(var _=u._dbInfo,p=_.keyPrefix,b=p.length,S=localStorage.length,C=1,T=0;T<S;T++){var I=localStorage.key(T);if(I.indexOf(p)===0){var R=localStorage.getItem(I);if(R&&(R=_.serializer.deserialize(R)),R=c(R,I.substring(b),C++),R!==void 0)return R}}});return v(m,h),m}function Ld(c,h){var u=this,m=u.ready().then(function(){var _=u._dbInfo,p;try{p=localStorage.key(c)}catch{p=null}return p&&(p=p.substring(_.keyPrefix.length)),p});return v(m,h),m}function kd(c){var h=this,u=h.ready().then(function(){for(var m=h._dbInfo,_=localStorage.length,p=[],b=0;b<_;b++){var S=localStorage.key(b);S.indexOf(m.keyPrefix)===0&&p.push(S.substring(m.keyPrefix.length))}return p});return v(u,c),u}function Fd(c){var h=this,u=h.keys().then(function(m){return m.length});return v(u,c),u}function Vd(c,h){var u=this;c=M(c);var m=u.ready().then(function(){var _=u._dbInfo;localStorage.removeItem(_.keyPrefix+c)});return v(m,h),m}function Bd(c,h,u){var m=this;c=M(c);var _=m.ready().then(function(){h===void 0&&(h=null);var p=h;return new E(function(b,S){var C=m._dbInfo;C.serializer.serialize(h,function(T,I){if(I)S(I);else try{localStorage.setItem(C.keyPrefix+c,T),b(p)}catch(R){(R.name==="QuotaExceededError"||R.name==="NS_ERROR_DOM_QUOTA_REACHED")&&S(R),S(R)}})})});return v(_,u),_}function Ud(c,h){if(h=N.apply(this,arguments),c=typeof c!="function"&&c||{},!c.name){var u=this.config();c.name=c.name||u.name,c.storeName=c.storeName||u.storeName}var m=this,_;return c.name?_=new E(function(p){c.storeName?p(na(c,m._defaultConfig)):p(c.name+"/")}).then(function(p){for(var b=localStorage.length-1;b>=0;b--){var S=localStorage.key(b);S.indexOf(p)===0&&localStorage.removeItem(S)}}):_=E.reject("Invalid arguments"),v(_,h),_}var Hd={_driver:"localStorageWrapper",_initStorage:Rd,_support:Ad(),iterate:Pd,getItem:Md,setItem:Bd,removeItem:Vd,clear:Nd,length:Fd,key:Ld,keys:kd,dropInstance:Ud},jd=function(h,u){return h===u||typeof h=="number"&&typeof u=="number"&&isNaN(h)&&isNaN(u)},Gd=function(h,u){for(var m=h.length,_=0;_<m;){if(jd(h[_],u))return!0;_++}return!1},ra=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"},bn={},ia={},Yt={INDEXEDDB:dd,WEBSQL:Dd,LOCALSTORAGE:Hd},Wd=[Yt.INDEXEDDB._driver,Yt.WEBSQL._driver,Yt.LOCALSTORAGE._driver],cr=["dropInstance"],Ci=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(cr),$d={description:"",driver:Wd.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Yd(c,h){c[h]=function(){var u=arguments;return c.ready().then(function(){return c[h].apply(c,u)})}}function Ti(){for(var c=1;c<arguments.length;c++){var h=arguments[c];if(h)for(var u in h)h.hasOwnProperty(u)&&(ra(h[u])?arguments[0][u]=h[u].slice():arguments[0][u]=h[u])}return arguments[0]}var zd=function(){function c(h){a(this,c);for(var u in Yt)if(Yt.hasOwnProperty(u)){var m=Yt[u],_=m._driver;this[u]=_,bn[_]||this.defineDriver(m)}this._defaultConfig=Ti({},$d),this._config=Ti({},this._defaultConfig,h),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return c.prototype.config=function(u){if((typeof u>"u"?"undefined":s(u))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var m in u){if(m==="storeName"&&(u[m]=u[m].replace(/\W/g,"_")),m==="version"&&typeof u[m]!="number")return new Error("Database version must be a number.");this._config[m]=u[m]}return"driver"in u&&u.driver?this.setDriver(this._config.driver):!0}else return typeof u=="string"?this._config[u]:this._config},c.prototype.defineDriver=function(u,m,_){var p=new E(function(b,S){try{var C=u._driver,T=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!u._driver){S(T);return}for(var I=Ci.concat("_initStorage"),R=0,H=I.length;R<H;R++){var $=I[R],Y=!Gd(cr,$);if((Y||u[$])&&typeof u[$]!="function"){S(T);return}}var te=function(){for(var Sn=function(qd){return function(){var Jd=new Error("Method "+qd+" is not implemented by the current driver"),oa=E.reject(Jd);return v(oa,arguments[arguments.length-1]),oa}},Ii=0,Xd=cr.length;Ii<Xd;Ii++){var wi=cr[Ii];u[wi]||(u[wi]=Sn(wi))}};te();var ee=function(Sn){bn[C]&&console.info("Redefining LocalForage driver: "+C),bn[C]=u,ia[C]=Sn,b()};"_support"in u?u._support&&typeof u._support=="function"?u._support().then(ee,S):ee(!!u._support):ee(!0)}catch(Ae){S(Ae)}});return w(p,m,_),p},c.prototype.driver=function(){return this._driver||null},c.prototype.getDriver=function(u,m,_){var p=bn[u]?E.resolve(bn[u]):E.reject(new Error("Driver not found."));return w(p,m,_),p},c.prototype.getSerializer=function(u){var m=E.resolve(Si);return w(m,u),m},c.prototype.ready=function(u){var m=this,_=m._driverSet.then(function(){return m._ready===null&&(m._ready=m._initDriver()),m._ready});return w(_,u,u),_},c.prototype.setDriver=function(u,m,_){var p=this;ra(u)||(u=[u]);var b=this._getSupportedDrivers(u);function S(){p._config.driver=p.driver()}function C(R){return p._extend(R),S(),p._ready=p._initStorage(p._config),p._ready}function T(R){return function(){var H=0;function $(){for(;H<R.length;){var Y=R[H];return H++,p._dbInfo=null,p._ready=null,p.getDriver(Y).then(C).catch($)}S();var te=new Error("No available storage method found.");return p._driverSet=E.reject(te),p._driverSet}return $()}}var I=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=I.then(function(){var R=b[0];return p._dbInfo=null,p._ready=null,p.getDriver(R).then(function(H){p._driver=H._driver,S(),p._wrapLibraryMethodsWithReady(),p._initDriver=T(b)})}).catch(function(){S();var R=new Error("No available storage method found.");return p._driverSet=E.reject(R),p._driverSet}),w(this._driverSet,m,_),this._driverSet},c.prototype.supports=function(u){return!!ia[u]},c.prototype._extend=function(u){Ti(this,u)},c.prototype._getSupportedDrivers=function(u){for(var m=[],_=0,p=u.length;_<p;_++){var b=u[_];this.supports(b)&&m.push(b)}return m},c.prototype._wrapLibraryMethodsWithReady=function(){for(var u=0,m=Ci.length;u<m;u++)Yd(this,Ci[u])},c.prototype.createInstance=function(u){return new c(u)},c}(),Kd=new zd;i.exports=Kd},{3:3}]},{},[4])(4)})});var oc=Di((Gi,Wi)=>{"use strict";(function(t,e){typeof Gi=="object"&&typeof Wi<"u"?Wi.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.fetchRetry=e())})(Gi,function(){"use strict";var t=function(r,i){if(i=i||{},typeof r!="function")throw new n("fetch must be a function");if(typeof i!="object")throw new n("defaults must be an object");if(i.retries!==void 0&&!e(i.retries))throw new n("retries must be a positive integer");if(i.retryDelay!==void 0&&!e(i.retryDelay)&&typeof i.retryDelay!="function")throw new n("retryDelay must be a positive integer or a function returning a positive integer");if(i.retryOn!==void 0&&!Array.isArray(i.retryOn)&&typeof i.retryOn!="function")throw new n("retryOn property expects an array or function");var o={retries:3,retryDelay:1e3,retryOn:[]};return i=Object.assign(o,i),function(a,l){var d=i.retries,g=i.retryDelay,f=i.retryOn;if(l&&l.retries!==void 0)if(e(l.retries))d=l.retries;else throw new n("retries must be a positive integer");if(l&&l.retryDelay!==void 0)if(e(l.retryDelay)||typeof l.retryDelay=="function")g=l.retryDelay;else throw new n("retryDelay must be a positive integer or a function returning a positive integer");if(l&&l.retryOn)if(Array.isArray(l.retryOn)||typeof l.retryOn=="function")f=l.retryOn;else throw new n("retryOn property expects an array or function");return new Promise(function(E,v){var w=function(N){var k=typeof Request<"u"&&a instanceof Request?a.clone():a;r(k,l).then(function(L){if(Array.isArray(f)&&f.indexOf(L.status)===-1)E(L);else if(typeof f=="function")try{return Promise.resolve(f(N,null,L)).then(function(j){j?M(N,null,L):E(L)}).catch(v)}catch(j){v(j)}else N<d?M(N,null,L):E(L)}).catch(function(L){if(typeof f=="function")try{Promise.resolve(f(N,L,null)).then(function(j){j?M(N,L,null):v(L)}).catch(function(j){v(j)})}catch(j){v(j)}else N<d?M(N,L,null):v(L)})};function M(N,k,L){var j=typeof g=="function"?g(N,k,L):g;setTimeout(function(){w(++N)},j)}w(0)})}};function e(r){return Number.isInteger(r)&&r>=0}function n(r){this.name="ArgumentError",this.message=r}return t})});var Ga="11.0.0-rc.1";var A=class A{};O(A,"SDK_VERSION",Ga),O(A,"SDK_VERSION_CODE"),O(A,"SDK","WEB"),O(A,"LOG_PREFIX","CooeeSDK"),O(A,"COOEE","cooee"),O(A,"SESSION_STORAGE_SCROLL_ID","sleid"),O(A,"IDLE_TIME_IN_SECONDS",30*60),O(A,"IN_APP_WRAPPER_NAME","cooee-wrapper"),O(A,"IN_APP_CONTAINER_NAME","cooee-container"),O(A,"IN_APP_DEFAULT_PADDING",15),O(A,"EVENT_SCREEN_VIEW","CE Screen View"),O(A,"EVENT_APP_BACKGROUND","CE App Background"),O(A,"EVENT_TRIGGER_DISPLAYED","CE Trigger Displayed"),O(A,"EVENT_CAMPAIGN_HOLDOUT","CE Campaign Holdout"),O(A,"EVENT_CAMPAIGN_REJECTED","CE Campaign Rejected"),O(A,"EVENT_CAMPAIGN_FAILED","CE Campaign Failed"),O(A,"EVENT_TRIGGER_CLOSED","CE Trigger Closed"),O(A,"EVENT_SCROLL","CE Scroll"),O(A,"EVENT_TRIGGER_CLICKED","CE Trigger Clicked"),O(A,"EVENT_FORM_SUBMITTED","CE Form Submitted"),O(A,"EVENT_EXPERIMENT_START","CE Experiment Start"),O(A,"EVENT_VIDEO_DIALOG_CLOSED","CE Video Dialog Closed"),O(A,"EVENT_VIDEO_DIALOG_OPENED","CE Video Dialog Opened"),O(A,"EVENT_VIDEO_CHANGE","CE Video Changed"),O(A,"EVENT_LAST_VIDEO_ENDED","CE Last Video Ended"),O(A,"EVENT_VIDEO_MUTED","CE Video Muted"),O(A,"EVENT_VIDEO_UNMUTED","CE Video Unmuted"),O(A,"EVENT_ADD_TO_CART_CLICKED","CE Add To Cart Clicked"),O(A,"EVENT_VIEW_ITEM_CLICKED","CE View Item Clicked"),O(A,"EVENT_MORE_ITEM_INFO_CLICKED","CE More Item Info Clicked"),O(A,"EVENT_OPEN_CART_CLICKED","CE Open Cart Clicked"),O(A,"EVENT_ADD_TO_CART","Add To Cart"),O(A,"EVENT_REMOVE_FROM_CART","Remove From Cart"),O(A,"EVENT_VIEW_ITEM","View Item"),O(A,"EVENT_VIEW_CART","View Cart"),O(A,"EVENT_OPEN_CART","Open Cart"),O(A,"EVENT_VIEW_COLLECTION","View Collection"),O(A,"EVENT_BUY_NOW_CLICKED","Buy Now Clicked"),O(A,"EVENT_CHECKOUT_STARTED","Checkout Started"),O(A,"EVENT_REVIEW_CLICKED","Review Clicked"),O(A,"EVENT_ITEM_THUMBNAIL_CLICKED","Item Thumbnail Clicked"),O(A,"JS_LOAD_WHITELIST_EVENTS",[A.EVENT_VIEW_ITEM,A.EVENT_VIEW_CART,A.EVENT_VIEW_COLLECTION]),O(A,"HASH_INITIATE_CHECKOUT","initiate-checkout"),O(A,"HASH_OPEN_CART_DRAWER","open-cart-drawer"),O(A,"ADD_BUNDLE_CTA_INBOUND_EVENT","letscooee:inbound:cta:add-bundle"),O(A,"CTA_OPEN_CART_EVENT","letscooee:outbound:open-cart"),O(A,"CTA_AFTER_REFRESH_UI","letscooee:outbound:refresh-ui"),O(A,"POPUP_ACTIVITY_EVENT","letscooee:outbound:popup-activities"),O(A,"THIRD_PARTY_CHECKOUT_EVENT","letscooee:outbound:third-party-initiate-checkout"),O(A,"CAMPAIGN_DISPLAYED_ACTIVITY","DISPLAYED"),O(A,"CAMPAIGN_CLICKED_ACTIVITY","CLICKED"),O(A,"CAMPAIGN_CLOSED_ACTIVITY","CLOSED"),O(A,"BLACKLISTED_PAGE_NAMES",["collection","product","cart"]),O(A,"PLACEHOLDER_IMAGE","https://cdn.global.letscooee.com/images/placeholders/product.png"),O(A,"SHADOW_SPLITTER",":shadow"),O(A,"CAMPAIGN_ATTRIBUTE","_letscooee_campaign"),O(A,"CONTENT_ATTRIBUTE","_letscooee_content"),O(A,"VIA","_via"),O(A,"PAYMENT_MODAL_DETAILS",[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}]),(()=>{let e=A.SDK_VERSION.split("-")[0].split(".").slice(0,3).map(n=>n.padStart(2,"0")).join("");A.SDK_VERSION_CODE=parseInt(e,10)})();var Ye=A;var Lt={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Ye.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Ye.SDK_VERSION}/dist/widget.min.js`};var be=Ai($a());var Be=class{static debuggerEl;static infoLogs=[];static log(...e){be.default.info(...e)}static verbose(...e){be.default.debug(...e)}static error(...e){be.default.error(...e)}static warn(...e){be.default.warn(...e)}static info(...e){be.default.info(...e),this.infoLogs.unshift({time:new Date,message:e.join(" ")}),this.addToDebugger()}static trace(...e){be.default.trace(...e)}static addToDebugger(){sessionStorage.cooeeDebug&&(this.debuggerEl=this.debuggerEl??document.querySelector("cooee-debugger"),this.debuggerEl&&this.debuggerEl&&(this.debuggerEl.logs=[...this.infoLogs]))}};function T_(t=Ye.LOG_PREFIX){be.default.useDefaults({formatter:function(n){n.unshift(`${t} (v${Ye.SDK_VERSION}):`)}});let e=Qd();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?be.default.setLevel(be.default[localStorage.cooeeLogLevel]):be.default.setLevel(Lt.debug?be.default.TRACE:be.default.OFF)}function Qd(){return new URL(location.href).searchParams?.get("cooee-debug")}var vt=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;currency;static get(){return window.CooeeSDK.config}update(e){return e??={},this.gaEnabled=e.gaEnabled,this.gaMeasurementID=e.gaMeasurementID,this.pixelPush=e.pixelPush,this.website=e.website??{},this.currencyCount=e.currencyCount??0,this.money=e.money,this.currency=e.currency,this.storefrontToken=e.storefrontToken,this.skipItemAttribute=e.skipItemAttribute,this}};var Ya=0,za="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css";function ef(t=document.head){Ka(za,t)}function Ka(t,e=document.head){if(!t)return;let n=document.createElement("link");n.rel="stylesheet",n.href=t,t===za&&(n.crossOrigin="anonymous",n.onload=r=>{let o=r.currentTarget?.sheet?.cssRules;if(o){for(let s of o)if(s.type==CSSRule.FONT_FACE_RULE){let a=t.split("/"),l=a.slice(0,a.length-1).join("/"),d=s.cssText;d=d.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${l}/$4")`);let g=document.createElement("style");g.appendChild(document.createTextNode(d)),document.head.appendChild(g)}}}),e.appendChild(n)}function Fi(t,e=document.head){if(!t)return;Ya++;let n=document.createElement("style");n.id=`cooee-app-css-${Ya}`,n.textContent=t,e.appendChild(n)}async function Xa(){window.CooeeSDK.Swiper||(window.CooeeSDK.Swiper=(await import("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.mjs")).Swiper)}function qa(t,e=!0){if(!t)return;e&&ef(t),Ka(Lt.styleURL,t);let n=vt.get().website.commonCSS;Fi(n,t)}var nf={"[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"},X_=U(y({},nf),{"[class.ng-submitted]":"isSubmitted"});var rf=new ke("",{providedIn:"root",factory:()=>Qa}),Qa="always";var of=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=Dt({type:t});static \u0275inj=Tt({})}return t})();var ec=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:rf,useValue:n.callSetDisabledState??Qa}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=Dt({type:t});static \u0275inj=Tt({imports:[of]})}return t})();var gr=class t{cooeeEvent=new Re;cooeeCTA=new Re;elementRef=P(xe);hasSwiper=!1;_engagementTrigger=ht(null);_triggerContext=ht(null);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get classes(){let e=["letscooee-widget"],n=this._engagementTrigger();return e.push(`widget-${n?.shortID}`),e}get triggerContext(){return this._triggerContext()}set triggerContext(e){this._triggerContext.set(e),this._engagementTrigger.set(e.triggerData),this.engagementTriggerReceived(e.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){Be.verbose("Init",this.constructor.name);let e=this.elementRef.nativeElement.shadowRoot;e&&qa(e,this.hasSwiper)}ngOnDestroy(){Be.verbose("Destroying",this.constructor.name)}sendEventToRenderer(e){this.cooeeEvent.emit(e)}executeCTAViaRenderer(e){this.cooeeCTA.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=ce({type:t,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,r){n&2&&fr(r.classes)},inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:1,vars:0,template:function(n,r){n&1&&Sa(0)},encapsulation:2})};var sf=(t,e)=>({"--option-color":t,"background-color":e}),nc=(t,e)=>e.id;function af(t,e){if(t&1&&(Ot(0,"span",6),Ee(1),qt()),t&2){Ne();let n=_t(0);z(),Zt(n)}}function cf(t,e){if(t&1){let n=Jt();Rt(0),Ot(1,"button",5),Li("click",function(){let i=It(n).$implicit,o=Ne().$implicit,s=Ne();return wt(s.onOptionChange(o,i))}),je(2,af,2,1,"span",6),qt()}if(t&2){let n=e.$implicit,r=Ne().$implicit,i=_t(1),o=n.name,s=Nt(n.displayName||n.name),a=i?n.hexColor??o:"",l=Ne().selectedOptions()[r.name]===o;z(),Dn("color-type",i)("selected",l)("disabled",n.disabled),ya("title",s)("ngStyle",xa(14,sf,a,a)),Xt("aria-checked",l?"true":"false")("data-value",o)("aria-disabled",n.disabled?"true":null)("aria-label",s),z(),Ge(i?-1:2)}}function lf(t,e){if(t&1&&(Ot(0,"div"),Rt(1),Ot(2,"div",1),Ee(3),qt(),Ot(4,"div",2),Ee(5),qt(),Ot(6,"div",3),Mi(7,cf,3,17,"button",4,nc),qt()()),t&2){let n=e.$implicit,r=Ne();fr(Oa("option-group ",n.name.toLowerCase())),z(),Nt(r.hasHexColors(n)),z(2),Qt("",n.name,":"),z(2),Zt(r.selectedOptions()[n.name]),z(),Xt("aria-label",n.name),z(),Pi(n.optionValues)}}var Mn=t=>t.trim().toLowerCase(),tc=class t extends gr{selectedVariant=new Re;item=We.required();selectedOptions=ht({});options=Mt(()=>{let e=this.item();if(!e.options||e.vars.length===1)return[];if(window.cooeeManipulateProduct)try{window.cooeeManipulateProduct(e,this.engagementTrigger)}catch(n){Be.error(n)}return e.options.forEach(n=>{n.optionValues.forEach(r=>{r.disabled=this.isOptionValueDisabledFast(n,r)})}),e.options});matchedVariant=Mt(()=>{let e=this.item(),n=this.selectedOptions();return e.vars.find(r=>e.options.every(i=>{let o=r.selectedOptions.find(s=>s.name===i.name)?.value;return n[i.name]===o}))});availabilityIndex=Mt(()=>{let e=this.item(),n=new Map;return e?.vars?.length&&e.vars.forEach((r,i)=>{if(r.isAvailable)for(let o of r.selectedOptions){let s=Mn(o.name),a=o.value,l=n.get(s);l||n.set(s,l=new Map);let d=l.get(a);d||l.set(a,d=new Set),d.add(i)}}),n});constructor(){super(),Pt(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let e=Pt(()=>{let n=this.item();if(!n?.options)return;let r=y({},this.selectedOptions()),i=n.vars.find(o=>o.isAvailable)??n.vars[0];n.options.forEach(o=>{let s=i?.selectedOptions.find(a=>a.name===o.name)?.value;s&&(r[o.name]=s)}),this.selectedOptions.set(r),e.destroy()})}ngOnInit(){super.ngOnInit();let e=this.elementRef.nativeElement.shadowRoot;if(!e)return;let n=vt.get().website?.itemSwatchMapping;n&&Fi(n,e)}onOptionChange(e,n){let r=y({},this.selectedOptions());r[e.name]=n.name,this.selectedOptions.set(r)}engagementTriggerReceived(){}update(){}hasHexColors(e){return!!e.optionValues[0]?.name.match(/#[a-f0-9]{6}\b/i)}getCandidateVariantsExcluding(e){let n=this.item(),r=this.availabilityIndex(),i=new Set;n.vars.forEach((s,a)=>{s.isAvailable&&i.add(a)});let o=i;for(let[s,a]of Object.entries(this.selectedOptions())){if(Mn(s)===Mn(e))continue;let l=r.get(Mn(s));if(!l)return new Set;let d=l.get(String(a));if(!d)return new Set;if(o=new Set([...o].filter(g=>d.has(g))),o.size===0)return o}return o}isOptionValueDisabledFast(e,n){let i=this.availabilityIndex().get(Mn(e.name));if(!i)return!0;let o=n.name,s=i.get(o);if(!s||s.size===0)return!0;let a=this.getCandidateVariantsExcluding(e.name);if(a.size===0)return!0;for(let l of a)if(s.has(l))return!1;return!0}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=ce({type:t,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[At],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&&Mi(0,lf,9,7,"div",0,nc),n&2&&Pi(r.options())},dependencies:[La,Pa,ec],styles:[`.option-group{display:flex;gap:4px;align-items:center}.option-group+.option-group{margin-top:8px}.option-values{display:flex;flex-wrap:nowrap;overflow-x:auto;padding:6px;gap:4px;scrollbar-gutter:stable both-edges;scrollbar-width:none}.option-values::-webkit-scrollbar{display:none}.selected-value{display:none}.option-value{padding:5px 10px;border:1px solid #ccc;cursor:pointer;border-radius:4px;min-width:32px;min-height:32px;text-align:center;position:relative;flex-shrink:0;--selected-color: var(--option-color, rgb(var(--lc-color-button, 0 0 0)))}.option-value.selected{box-shadow:#fff 0 0 0 2px,var(--selected-color) 0 0 0 4px}.option-value.disabled{opacity:.5;pointer-events:none}
2
2
  `],encapsulation:3})};var uf=function(t){return t.SHOPIFY_CHECKOUT="shopify_checkout",t.THIRD_PARTY_CHECKOUT="third_party_checkout",t.CART_PAGE="cart_page",t.CART_DRAWER="cart_drawer",t}(uf||{});var df=function(t){return t[t.NONE=0]="NONE",t[t.REJECT_POPUP=1]="REJECT_POPUP",t[t.ACCEPT_POPUP=2]="ACCEPT_POPUP",t[t.GO_TO_URL=4]="GO_TO_URL",t[t.SHARE=5]="SHARE",t[t.KEY_VALUE=100]="KEY_VALUE",t[t.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",t[t.ADD_TO_CART=102]="ADD_TO_CART",t[t.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",t[t.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",t[t.OPEN_CART=105]="OPEN_CART",t[t.SUBMIT_FORM=106]="SUBMIT_FORM",t[t.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",t[t.ADD_BUNDLE=108]="ADD_BUNDLE",t[t.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",t}(df||{});var ff=function(t){return t.FREE_SHIPPING="FREE_SHIPPING",t.DISCOUNT="DISCOUNT",t.FREE_AUTO_GIFT="FREE_AUTO_GIFT",t.FREE_GIFT_SELECT="FREE_GIFT_SELECT",t.UI_ONLY="UI_ONLY",t}(ff||{});var Vi=class{static ID="id";static SESSION_LANDING_PAGE="landing";static SESSION_LAST_USED_TIME="lastUsedTime";static SESSION_SYNCED="synced";static APP_CONFIG="conf";static DEVICE_ID="did";static SDK_TOKEN="token";static FIRST_SEEN="firstSeen";static SESSION_NUMBER="sessionNumber";static GA_CLIENT_ID="gacid";static CURRENT_CART="cart";static MUTED="muted"};var Ui=Ai(ic());function vr(t){return Ui.default.createInstance({name:"lc",storeName:t,driver:Ui.default.LOCALSTORAGE})}var en=class{static storage;static async get(e,n){return await this.storage?.getItem(e)??n}static set(e,n){return this.storage?.setItem(e,n)}static remove(e){return this.storage?.removeItem(e)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}};var Pn=class Pn extends en{};O(Pn,"storeName","usr"),Pn.storage=vr(Pn.storeName);var Hi=Pn;var Ln=class Ln extends en{};O(Ln,"storeName","ses"),Ln.storage=vr(Ln.storeName);var ji=Ln;var sc=Ai(oc());var Pg=(0,sc.default)(fetch);var yr=class extends Error{request;response;status;requestBody;responseText;constructor(e="Failed to fetch"){super(e),this.name="FetchError",Object.setPrototypeOf(this,new.target.prototype)}is40x(){return!!this.response&&this.response.status>=400&&this.response.status<500}};var F=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var V=globalThis;var ze="9.42.0";function kt(){return Ft(V),V}function Ft(t){let e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||ze,e[ze]=e[ze]||{}}function it(t,e,n=V){let r=n.__SENTRY__=n.__SENTRY__||{},i=r[ze]=r[ze]||{};return i[t]||(i[t]=e())}var $i=["debug","info","warn","error","log","assert","trace"],hf="Sentry Logger ",tn={};function yt(t){if(!("console"in V))return t();let e=V.console,n={},r=Object.keys(tn);r.forEach(i=>{let o=tn[i];n[i]=e[i],e[i]=o});try{return t()}finally{r.forEach(i=>{e[i]=n[i]})}}function pf(){zi().enabled=!0}function mf(){zi().enabled=!1}function ac(){return zi().enabled}function _f(...t){Yi("log",...t)}function gf(...t){Yi("warn",...t)}function vf(...t){Yi("error",...t)}function Yi(t,...e){F&&ac()&&yt(()=>{V.console[t](`${hf}[${t}]:`,...e)})}function zi(){return F?it("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var x={enable:pf,disable:mf,isEnabled:ac,log:_f,warn:gf,error:vf};var Ke="?",cc=/\(error: (.*)\)/,lc=/captureMessage|captureException/;function Xi(...t){let e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{let o=[],s=n.split(`
3
3
  `);for(let a=r;a<s.length;a++){let l=s[a];if(l.length>1024)continue;let d=cc.test(l)?l.replace(cc,"$1"):l;if(!d.match(/\S*Error: /)){for(let g of e){let f=g(d);if(f){o.push(f);break}}if(o.length>=50+i)break}}return uc(o.slice(i))}}function uc(t){if(!t.length)return[];let e=Array.from(t);return/sentryWrapped/.test(Er(e).function||"")&&e.pop(),e.reverse(),lc.test(Er(e).function||"")&&(e.pop(),lc.test(Er(e).function||"")&&e.pop()),e.slice(0,50).map(n=>U(y({},n),{filename:n.filename||Er(e).filename,function:n.function||Ke}))}function Er(t){return t[t.length-1]||{}}var Ki="<anonymous>";function Me(t){try{return!t||typeof t!="function"?Ki:t.name||Ki}catch{return Ki}}function br(t){let e=t.exception;if(e){let n=[];try{return e.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}var Sr={},dc={};function fe(t,e){Sr[t]=Sr[t]||[],Sr[t].push(e)}function he(t,e){if(!dc[t]){dc[t]=!0;try{e()}catch(n){F&&x.error(`Error while instrumenting ${t}`,n)}}}function ne(t,e){let n=t&&Sr[t];if(n)for(let r of n)try{r(e)}catch(i){F&&x.error(`Error while triggering instrumentation handler.
4
4
  Type: ${t}
package/dist/main.min.js CHANGED
@@ -7,7 +7,7 @@ var dv=Object.create;var Gl=Object.defineProperty,hv=Object.defineProperties,gv=
7
7
 
8
8
  `+se.message+`
9
9
  `+Array(se.message.length+1).join("=")+`
10
- `+I(A,F)):se}}function kt(A,R){var j;return R.cache&&R.name&&R.storage.templates.get(R.name)?R.storage.templates.get(R.name):(j=typeof A=="function"?A:tt(A,R),R.cache&&R.name&&R.storage.templates.define(R.name,j),j)}Ne.l.bind(Ne),t.compile=tt,t.compileScope=B,t.compileScopeIntoFunction=$,t.compileToString=I,t.defaultConfig=Ne,t.filters=Re,t.getConfig=Xe,t.helpers=ge,t.nativeHelpers=ke,t.parse=y,t.render=function(A,R,j,F){var V=Xe(j||{});if(!V.async)return kt(A,V)(R,V);if(!F){if(typeof n=="function")return new n(function(se,ye){try{se(kt(A,V)(R,V))}catch(Je){ye(Je)}});throw e("Please provide a callback function, this env doesn't support Promises")}try{kt(A,V)(R,V,F)}catch(se){return F(se)}},t.templates=le,Object.defineProperty(t,"__esModule",{value:!0})})});var tm="11.0.0-rc.0";var te=class te{};ee(te,"SDK_VERSION",tm),ee(te,"SDK_VERSION_CODE"),ee(te,"SDK","WEB"),ee(te,"LOG_PREFIX","CooeeSDK"),ee(te,"COOEE","cooee"),ee(te,"SESSION_STORAGE_SCROLL_ID","sleid"),ee(te,"IDLE_TIME_IN_SECONDS",30*60),ee(te,"IN_APP_WRAPPER_NAME","cooee-wrapper"),ee(te,"IN_APP_CONTAINER_NAME","cooee-container"),ee(te,"IN_APP_DEFAULT_PADDING",15),ee(te,"EVENT_SCREEN_VIEW","CE Screen View"),ee(te,"EVENT_APP_BACKGROUND","CE App Background"),ee(te,"EVENT_TRIGGER_DISPLAYED","CE Trigger Displayed"),ee(te,"EVENT_CAMPAIGN_HOLDOUT","CE Campaign Holdout"),ee(te,"EVENT_CAMPAIGN_REJECTED","CE Campaign Rejected"),ee(te,"EVENT_CAMPAIGN_FAILED","CE Campaign Failed"),ee(te,"EVENT_TRIGGER_CLOSED","CE Trigger Closed"),ee(te,"EVENT_SCROLL","CE Scroll"),ee(te,"EVENT_TRIGGER_CLICKED","CE Trigger Clicked"),ee(te,"EVENT_FORM_SUBMITTED","CE Form Submitted"),ee(te,"EVENT_EXPERIMENT_START","CE Experiment Start"),ee(te,"EVENT_VIDEO_DIALOG_CLOSED","CE Video Dialog Closed"),ee(te,"EVENT_VIDEO_DIALOG_OPENED","CE Video Dialog Opened"),ee(te,"EVENT_VIDEO_CHANGE","CE Video Changed"),ee(te,"EVENT_LAST_VIDEO_ENDED","CE Last Video Ended"),ee(te,"EVENT_VIDEO_MUTED","CE Video Muted"),ee(te,"EVENT_VIDEO_UNMUTED","CE Video Unmuted"),ee(te,"EVENT_ADD_TO_CART_CLICKED","CE Add To Cart Clicked"),ee(te,"EVENT_VIEW_ITEM_CLICKED","CE View Item Clicked"),ee(te,"EVENT_MORE_ITEM_INFO_CLICKED","CE More Item Info Clicked"),ee(te,"EVENT_OPEN_CART_CLICKED","CE Open Cart Clicked"),ee(te,"EVENT_ADD_TO_CART","Add To Cart"),ee(te,"EVENT_REMOVE_FROM_CART","Remove From Cart"),ee(te,"EVENT_VIEW_ITEM","View Item"),ee(te,"EVENT_VIEW_CART","View Cart"),ee(te,"EVENT_OPEN_CART","Open Cart"),ee(te,"EVENT_VIEW_COLLECTION","View Collection"),ee(te,"EVENT_BUY_NOW_CLICKED","Buy Now Clicked"),ee(te,"EVENT_CHECKOUT_STARTED","Checkout Started"),ee(te,"EVENT_REVIEW_CLICKED","Review Clicked"),ee(te,"EVENT_ITEM_THUMBNAIL_CLICKED","Item Thumbnail Clicked"),ee(te,"JS_LOAD_WHITELIST_EVENTS",[te.EVENT_VIEW_ITEM,te.EVENT_VIEW_CART,te.EVENT_VIEW_COLLECTION]),ee(te,"HASH_INITIATE_CHECKOUT","initiate-checkout"),ee(te,"HASH_OPEN_CART_DRAWER","open-cart-drawer"),ee(te,"ADD_BUNDLE_CTA_INBOUND_EVENT","letscooee:inbound:cta:add-bundle"),ee(te,"CTA_OPEN_CART_EVENT","letscooee:outbound:open-cart"),ee(te,"CTA_AFTER_REFRESH_UI","letscooee:outbound:refresh-ui"),ee(te,"POPUP_ACTIVITY_EVENT","letscooee:outbound:popup-activities"),ee(te,"THIRD_PARTY_CHECKOUT_EVENT","letscooee:outbound:third-party-initiate-checkout"),ee(te,"CAMPAIGN_DISPLAYED_ACTIVITY","DISPLAYED"),ee(te,"CAMPAIGN_CLICKED_ACTIVITY","CLICKED"),ee(te,"CAMPAIGN_CLOSED_ACTIVITY","CLOSED"),ee(te,"BLACKLISTED_PAGE_NAMES",["collection","product","cart"]),ee(te,"PLACEHOLDER_IMAGE","https://cdn.global.letscooee.com/images/placeholders/product.png"),ee(te,"SHADOW_SPLITTER",":shadow"),ee(te,"CAMPAIGN_ATTRIBUTE","_letscooee_campaign"),ee(te,"CONTENT_ATTRIBUTE","_letscooee_content"),ee(te,"VIA","_via"),ee(te,"PAYMENT_MODAL_DETAILS",[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}]),(()=>{let e=te.SDK_VERSION.split(".").map(r=>r.padStart(2,"0")).join("");te.SDK_VERSION_CODE=parseInt(e,10)})();var P=te;var Gt={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${P.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${P.SDK_VERSION}/dist/widget.min.js`};var Yt=xr(wi());var w=class{static debuggerEl;static infoLogs=[];static log(...e){Yt.default.info(...e)}static verbose(...e){Yt.default.debug(...e)}static error(...e){Yt.default.error(...e)}static warn(...e){Yt.default.warn(...e)}static info(...e){Yt.default.info(...e),this.infoLogs.unshift({time:new Date,message:e.join(" ")}),this.addToDebugger()}static trace(...e){Yt.default.trace(...e)}static addToDebugger(){sessionStorage.cooeeDebug&&(this.debuggerEl=this.debuggerEl??document.querySelector("cooee-debugger"),this.debuggerEl&&this.debuggerEl&&(this.debuggerEl.logs=[...this.infoLogs]))}};function nm(t=P.LOG_PREFIX){Yt.default.useDefaults({formatter:function(r){r.unshift(`${t} (v${P.SDK_VERSION}):`)}});let e=zl();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Yt.default.setLevel(Yt.default[localStorage.cooeeLogLevel]):Yt.default.setLevel(Gt.debug?Yt.default.TRACE:Yt.default.OFF)}function zl(){return new URL(location.href).searchParams?.get("cooee-debug")}function im(){let t=`
10
+ `+I(A,F)):se}}function kt(A,R){var j;return R.cache&&R.name&&R.storage.templates.get(R.name)?R.storage.templates.get(R.name):(j=typeof A=="function"?A:tt(A,R),R.cache&&R.name&&R.storage.templates.define(R.name,j),j)}Ne.l.bind(Ne),t.compile=tt,t.compileScope=B,t.compileScopeIntoFunction=$,t.compileToString=I,t.defaultConfig=Ne,t.filters=Re,t.getConfig=Xe,t.helpers=ge,t.nativeHelpers=ke,t.parse=y,t.render=function(A,R,j,F){var V=Xe(j||{});if(!V.async)return kt(A,V)(R,V);if(!F){if(typeof n=="function")return new n(function(se,ye){try{se(kt(A,V)(R,V))}catch(Je){ye(Je)}});throw e("Please provide a callback function, this env doesn't support Promises")}try{kt(A,V)(R,V,F)}catch(se){return F(se)}},t.templates=le,Object.defineProperty(t,"__esModule",{value:!0})})});var tm="11.0.0-rc.1";var te=class te{};ee(te,"SDK_VERSION",tm),ee(te,"SDK_VERSION_CODE"),ee(te,"SDK","WEB"),ee(te,"LOG_PREFIX","CooeeSDK"),ee(te,"COOEE","cooee"),ee(te,"SESSION_STORAGE_SCROLL_ID","sleid"),ee(te,"IDLE_TIME_IN_SECONDS",30*60),ee(te,"IN_APP_WRAPPER_NAME","cooee-wrapper"),ee(te,"IN_APP_CONTAINER_NAME","cooee-container"),ee(te,"IN_APP_DEFAULT_PADDING",15),ee(te,"EVENT_SCREEN_VIEW","CE Screen View"),ee(te,"EVENT_APP_BACKGROUND","CE App Background"),ee(te,"EVENT_TRIGGER_DISPLAYED","CE Trigger Displayed"),ee(te,"EVENT_CAMPAIGN_HOLDOUT","CE Campaign Holdout"),ee(te,"EVENT_CAMPAIGN_REJECTED","CE Campaign Rejected"),ee(te,"EVENT_CAMPAIGN_FAILED","CE Campaign Failed"),ee(te,"EVENT_TRIGGER_CLOSED","CE Trigger Closed"),ee(te,"EVENT_SCROLL","CE Scroll"),ee(te,"EVENT_TRIGGER_CLICKED","CE Trigger Clicked"),ee(te,"EVENT_FORM_SUBMITTED","CE Form Submitted"),ee(te,"EVENT_EXPERIMENT_START","CE Experiment Start"),ee(te,"EVENT_VIDEO_DIALOG_CLOSED","CE Video Dialog Closed"),ee(te,"EVENT_VIDEO_DIALOG_OPENED","CE Video Dialog Opened"),ee(te,"EVENT_VIDEO_CHANGE","CE Video Changed"),ee(te,"EVENT_LAST_VIDEO_ENDED","CE Last Video Ended"),ee(te,"EVENT_VIDEO_MUTED","CE Video Muted"),ee(te,"EVENT_VIDEO_UNMUTED","CE Video Unmuted"),ee(te,"EVENT_ADD_TO_CART_CLICKED","CE Add To Cart Clicked"),ee(te,"EVENT_VIEW_ITEM_CLICKED","CE View Item Clicked"),ee(te,"EVENT_MORE_ITEM_INFO_CLICKED","CE More Item Info Clicked"),ee(te,"EVENT_OPEN_CART_CLICKED","CE Open Cart Clicked"),ee(te,"EVENT_ADD_TO_CART","Add To Cart"),ee(te,"EVENT_REMOVE_FROM_CART","Remove From Cart"),ee(te,"EVENT_VIEW_ITEM","View Item"),ee(te,"EVENT_VIEW_CART","View Cart"),ee(te,"EVENT_OPEN_CART","Open Cart"),ee(te,"EVENT_VIEW_COLLECTION","View Collection"),ee(te,"EVENT_BUY_NOW_CLICKED","Buy Now Clicked"),ee(te,"EVENT_CHECKOUT_STARTED","Checkout Started"),ee(te,"EVENT_REVIEW_CLICKED","Review Clicked"),ee(te,"EVENT_ITEM_THUMBNAIL_CLICKED","Item Thumbnail Clicked"),ee(te,"JS_LOAD_WHITELIST_EVENTS",[te.EVENT_VIEW_ITEM,te.EVENT_VIEW_CART,te.EVENT_VIEW_COLLECTION]),ee(te,"HASH_INITIATE_CHECKOUT","initiate-checkout"),ee(te,"HASH_OPEN_CART_DRAWER","open-cart-drawer"),ee(te,"ADD_BUNDLE_CTA_INBOUND_EVENT","letscooee:inbound:cta:add-bundle"),ee(te,"CTA_OPEN_CART_EVENT","letscooee:outbound:open-cart"),ee(te,"CTA_AFTER_REFRESH_UI","letscooee:outbound:refresh-ui"),ee(te,"POPUP_ACTIVITY_EVENT","letscooee:outbound:popup-activities"),ee(te,"THIRD_PARTY_CHECKOUT_EVENT","letscooee:outbound:third-party-initiate-checkout"),ee(te,"CAMPAIGN_DISPLAYED_ACTIVITY","DISPLAYED"),ee(te,"CAMPAIGN_CLICKED_ACTIVITY","CLICKED"),ee(te,"CAMPAIGN_CLOSED_ACTIVITY","CLOSED"),ee(te,"BLACKLISTED_PAGE_NAMES",["collection","product","cart"]),ee(te,"PLACEHOLDER_IMAGE","https://cdn.global.letscooee.com/images/placeholders/product.png"),ee(te,"SHADOW_SPLITTER",":shadow"),ee(te,"CAMPAIGN_ATTRIBUTE","_letscooee_campaign"),ee(te,"CONTENT_ATTRIBUTE","_letscooee_content"),ee(te,"VIA","_via"),ee(te,"PAYMENT_MODAL_DETAILS",[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}]),(()=>{let e=te.SDK_VERSION.split("-")[0].split(".").slice(0,3).map(r=>r.padStart(2,"0")).join("");te.SDK_VERSION_CODE=parseInt(e,10)})();var P=te;var Gt={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${P.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${P.SDK_VERSION}/dist/widget.min.js`};var Yt=xr(wi());var w=class{static debuggerEl;static infoLogs=[];static log(...e){Yt.default.info(...e)}static verbose(...e){Yt.default.debug(...e)}static error(...e){Yt.default.error(...e)}static warn(...e){Yt.default.warn(...e)}static info(...e){Yt.default.info(...e),this.infoLogs.unshift({time:new Date,message:e.join(" ")}),this.addToDebugger()}static trace(...e){Yt.default.trace(...e)}static addToDebugger(){sessionStorage.cooeeDebug&&(this.debuggerEl=this.debuggerEl??document.querySelector("cooee-debugger"),this.debuggerEl&&this.debuggerEl&&(this.debuggerEl.logs=[...this.infoLogs]))}};function nm(t=P.LOG_PREFIX){Yt.default.useDefaults({formatter:function(r){r.unshift(`${t} (v${P.SDK_VERSION}):`)}});let e=zl();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Yt.default.setLevel(Yt.default[localStorage.cooeeLogLevel]):Yt.default.setLevel(Gt.debug?Yt.default.TRACE:Yt.default.OFF)}function zl(){return new URL(location.href).searchParams?.get("cooee-debug")}function im(){let t=`
11
11
  display: inline-block;
12
12
  font-size: 14px;
13
13
  background: linear-gradient(90deg, #d52dc8 25%, #2179e2 82%);
@@ -1,4 +1,4 @@
1
- import{a as Gt,b as vt,c as Zr,d as Gr,e as Xr,g as Qt,h as Kr,i as Qr,j as ie,k as Fe,n as tn,o as en,p as de,q as rn,r as nn,s as sr,v as on,w as sn,x as an,y as cn,z as ln}from"./chunk-5EYT2ZXX.js";import{a as Le}from"./chunk-E3MW7QNG.js";import{$a as ne,Bb as qr,C as ue,Cb as me,E as at,Ea as Yt,F as ct,Fa as _t,G as xe,Ga as Mt,H as Ee,Ha as $r,I as nr,Ia as Z,K as Tr,L as zt,La as Ae,M as Br,Ma as Me,Na as De,O as Ar,Qa as Jt,R as Bt,Ra as or,S as Wt,T as J,Ta as kr,U as Mr,Ua as Dt,V as Dr,Va as Hr,Wa as pe,X as ir,_a as Se,a as Pt,aa as ht,ab as qt,b as er,bb as he,da as Rr,e as Wn,ea as dt,eb as zr,f as Yn,fa as Fr,fb as Wr,gb as Ut,hb as Zt,i as Te,ia as Lr,ib as Yr,ka as Pr,kb as Jr,l as rr,la as Be,ma as mt,na as gt,oa as Vr,pa as Ct,qa as It,r as Ir,ra as yt,sa as rt,ta as nt,ua as re,va as At,w as Nr,wa as Vt,wb as Re,x as Or,xa as Nt,ya as Ur,za as jr}from"./chunk-S6UU36F3.js";var hn=Wn((Pe,pn)=>{"use strict";(function(e,t){typeof Pe=="object"&&typeof pn<"u"?t(Pe):typeof define=="function"&&define.amd?define(["exports"],t):t((e=typeof globalThis<"u"?globalThis:e||self).Sqrl={})})(Pe,function(e){"use strict";function t(g){var m,b,w=new Error(g);return m=w,b=t.prototype,Object.setPrototypeOf?Object.setPrototypeOf(m,b):m.__proto__=b,w}function r(g,m,b){var w=m.slice(0,b).split(/\n/),f=w.length,u=w[f-1].length+1;throw t(g+=" at line "+f+" col "+u+`:
1
+ import{a as Gt,b as vt,c as Zr,d as Gr,e as Xr,g as Qt,h as Kr,i as Qr,j as ie,k as Fe,n as tn,o as en,p as de,q as rn,r as nn,s as sr,v as on,w as sn,x as an,y as cn,z as ln}from"./chunk-W76YVDW6.js";import{a as Le}from"./chunk-E3MW7QNG.js";import{$a as ne,Bb as qr,C as ue,Cb as me,E as at,Ea as Yt,F as ct,Fa as _t,G as xe,Ga as Mt,H as Ee,Ha as $r,I as nr,Ia as Z,K as Tr,L as zt,La as Ae,M as Br,Ma as Me,Na as De,O as Ar,Qa as Jt,R as Bt,Ra as or,S as Wt,T as J,Ta as kr,U as Mr,Ua as Dt,V as Dr,Va as Hr,Wa as pe,X as ir,_a as Se,a as Pt,aa as ht,ab as qt,b as er,bb as he,da as Rr,e as Wn,ea as dt,eb as zr,f as Yn,fa as Fr,fb as Wr,gb as Ut,hb as Zt,i as Te,ia as Lr,ib as Yr,ka as Pr,kb as Jr,l as rr,la as Be,ma as mt,na as gt,oa as Vr,pa as Ct,qa as It,r as Ir,ra as yt,sa as rt,ta as nt,ua as re,va as At,w as Nr,wa as Vt,wb as Re,x as Or,xa as Nt,ya as Ur,za as jr}from"./chunk-S6UU36F3.js";var hn=Wn((Pe,pn)=>{"use strict";(function(e,t){typeof Pe=="object"&&typeof pn<"u"?t(Pe):typeof define=="function"&&define.amd?define(["exports"],t):t((e=typeof globalThis<"u"?globalThis:e||self).Sqrl={})})(Pe,function(e){"use strict";function t(g){var m,b,w=new Error(g);return m=w,b=t.prototype,Object.setPrototypeOf?Object.setPrototypeOf(m,b):m.__proto__=b,w}function r(g,m,b){var w=m.slice(0,b).split(/\n/),f=w.length,u=w[f-1].length+1;throw t(g+=" at line "+f+" col "+u+`:
2
2
 
3
3
  `+m.split(/\n/)[f-1]+`
4
4
  `+Array(u).join(" ")+"^")}t.prototype=Object.create(Error.prototype,{name:{value:"Squirrelly Error",enumerable:!1}});var o=new Function("return this")().Promise,p=!1;try{p=new Function("return (async function(){}).constructor")()}catch(g){if(!(g instanceof SyntaxError))throw g}function l(g,m){return Object.prototype.hasOwnProperty.call(g,m)}function a(g,m,b){for(var w in m)l(m,w)&&(m[w]==null||typeof m[w]!="object"||w!=="storage"&&w!=="prefixes"||b?g[w]=m[w]:g[w]=a({},m[w]));return g}var d=/^async +/,v=/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})*}|(?!\${)[^\\`])*`/g,E=/'(?:\\[\s\w"'\\`]|[^\n\r'\\])*?'/g,C=/"(?:\\[\s\w"'\\`]|[^\n\r"\\])*?"/g,S=/[.*+\-?^${}()|[\]\\]/g;function I(g){return S.test(g)?g.replace(S,"\\$&"):g}function z(g,m){m.rmWhitespace&&(g=g.replace(/[\r\n]+/g,`
@@ -14,7 +14,7 @@ import{a as Gt,b as vt,c as Zr,d as Gr,e as Xr,g as Qt,h as Kr,i as Qr,j as ie,k
14
14
  `),r=t.length===1?null:setInterval(()=>{this.featureSlider.update(o=>er(Pt({},o),{previousIndex:o.currentIndex,currentIndex:(o.currentIndex+1)%o.features.length}))},3e3);this.featureSlider.set({intervalRef:r,currentIndex:0,features:t})}replaceVariables(t){return t?ge(t,this.currentItem.getTemplateVariables(),this.triggerContext):""}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=ht({type:e,selectors:[["cooee-sticky-atc"]],features:[dt],decls:7,vars:3,consts:[[1,"lc-wrapper"],[1,"lc-prices"],[1,"lc-button-wrapper"],["type","button",1,"lc-button","lc-button-atc",3,"click"],[1,"lc-features"],[1,"lc-sale-price"],[1,"lc-additional-text"],[1,"lc-compare-price"],[1,"lc-discount-label"],[1,"lc-feature",3,"ngClass"]],template:function(r,o){if(r&1){let p=Yt();rt(0,"div",0),mt(1,di,5,3,"div",1),rt(2,"div",2)(3,"button",3),Mt("click",function(){return at(p),ct(o.addToCart())}),Dt(4,"Add To Cart"),nt(),Se(5),mt(6,gi,3,0,"div",4),nt()()}if(r&2){J(),gt(o.selectedVariant()&&o.stickyATCConfig.showProductInfo?1:-1),J(4);let p=ne(o.featureSlider());J(),gt(p.features.length?6:-1)}},dependencies:[Re],styles:[`:host{display:flex;justify-content:center;padding:10px;background-color:#fff;width:100%;box-shadow:4px 0 10px #0006;line-height:normal}.lc-wrapper{display:flex;justify-content:space-between;align-items:center;gap:8px;max-width:1100px;width:100%}.lc-prices{flex:1 1 100%;display:flex;flex-wrap:wrap;align-items:center;gap:6px}@media (min-width: 768px){.lc-prices{gap:8px}}.lc-sale-price{font-size:24px;font-weight:600}.lc-compare-price{font-size:18px;font-weight:600;color:red;text-decoration:line-through}.lc-discount-label{font-size:12px;font-weight:500;color:green}.lc-button-wrapper{flex:1 1 100%;display:flex;flex-direction:column;gap:4px;align-items:center}.lc-button{background-color:#000;color:#fff;opacity:1;pointer-events:auto;border-radius:4px;min-width:150px;width:100%;padding:8px}.lc-additional-text,.lc-feature{font-size:12px;color:#666}.lc-features{position:relative;overflow:hidden;height:16px;text-align:center;width:100%}.lc-features .lc-feature{position:absolute;width:100%;opacity:0;transform:translateY(100%);transition:transform .5s ease,opacity .5s ease}.lc-features .lc-feature.enter{opacity:1;transform:translateY(0);z-index:2}.lc-features .lc-feature.exit{opacity:0;transform:translateY(-100%);z-index:1}
15
15
  `],encapsulation:3})};function yi(e,t){return t={exports:{}},e(t,t.exports),t.exports}var vi=xi,wi=Si,_i=Ni,$t=[],Tt=[],bi=typeof Uint8Array<"u"?Uint8Array:Array,hr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(se=0,mn=hr.length;se<mn;++se)$t[se]=hr[se],Tt[hr.charCodeAt(se)]=se;var se,mn;Tt[45]=62;Tt[95]=63;function An(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var o=r===t?0:4-r%4;return[r,o]}function xi(e){var t=An(e),r=t[0],o=t[1];return(r+o)*3/4-o}function Ei(e,t,r){return(t+r)*3/4-r}function Si(e){var t,r=An(e),o=r[0],p=r[1],l=new bi(Ei(e,o,p)),a=0,d=p>0?o-4:o,v;for(v=0;v<d;v+=4)t=Tt[e.charCodeAt(v)]<<18|Tt[e.charCodeAt(v+1)]<<12|Tt[e.charCodeAt(v+2)]<<6|Tt[e.charCodeAt(v+3)],l[a++]=t>>16&255,l[a++]=t>>8&255,l[a++]=t&255;return p===2&&(t=Tt[e.charCodeAt(v)]<<2|Tt[e.charCodeAt(v+1)]>>4,l[a++]=t&255),p===1&&(t=Tt[e.charCodeAt(v)]<<10|Tt[e.charCodeAt(v+1)]<<4|Tt[e.charCodeAt(v+2)]>>2,l[a++]=t>>8&255,l[a++]=t&255),l}function Ci(e){return $t[e>>18&63]+$t[e>>12&63]+$t[e>>6&63]+$t[e&63]}function Ii(e,t,r){for(var o,p=[],l=t;l<r;l+=3)o=(e[l]<<16&16711680)+(e[l+1]<<8&65280)+(e[l+2]&255),p.push(Ci(o));return p.join("")}function Ni(e){for(var t,r=e.length,o=r%3,p=[],l=16383,a=0,d=r-o;a<d;a+=l)p.push(Ii(e,a,a+l>d?d:a+l));return o===1?(t=e[r-1],p.push($t[t>>2]+$t[t<<4&63]+"==")):o===2&&(t=(e[r-2]<<8)+e[r-1],p.push($t[t>>10]+$t[t>>4&63]+$t[t<<2&63]+"=")),p.join("")}var dr={byteLength:vi,toByteArray:wi,fromByteArray:_i};var Oi=function(t,r,o,p,l){var a,d,v=l*8-p-1,E=(1<<v)-1,C=E>>1,S=-7,I=o?l-1:0,z=o?-1:1,P=t[r+I];for(I+=z,a=P&(1<<-S)-1,P>>=-S,S+=v;S>0;a=a*256+t[r+I],I+=z,S-=8);for(d=a&(1<<-S)-1,a>>=-S,S+=p;S>0;d=d*256+t[r+I],I+=z,S-=8);if(a===0)a=1-C;else{if(a===E)return d?NaN:(P?-1:1)*(1/0);d=d+Math.pow(2,p),a=a-C}return(P?-1:1)*d*Math.pow(2,a-p)},Ti=function(t,r,o,p,l,a){var d,v,E,C=a*8-l-1,S=(1<<C)-1,I=S>>1,z=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=p?0:a-1,Y=p?1:-1,k=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(v=isNaN(r)?1:0,d=S):(d=Math.floor(Math.log(r)/Math.LN2),r*(E=Math.pow(2,-d))<1&&(d--,E*=2),d+I>=1?r+=z/E:r+=z*Math.pow(2,1-I),r*E>=2&&(d++,E/=2),d+I>=S?(v=0,d=S):d+I>=1?(v=(r*E-1)*Math.pow(2,l),d=d+I):(v=r*Math.pow(2,I-1)*Math.pow(2,l),d=0));l>=8;t[o+P]=v&255,P+=Y,v/=256,l-=8);for(d=d<<l|v,C+=l;C>0;t[o+P]=d&255,P+=Y,d/=256,C-=8);t[o+P-Y]|=k*128},ve={read:Oi,write:Ti},We=yi(function(e,t){var r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=et,t.INSPECT_MAX_BYTES=50;var o=2147483647;t.kMaxLength=o,a.TYPED_ARRAY_SUPPORT=p(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function p(){try{var s=new Uint8Array(1),n={foo:function(){return 42}};return Object.setPrototypeOf(n,Uint8Array.prototype),Object.setPrototypeOf(s,n),s.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function l(s){if(s>o)throw new RangeError('The value "'+s+'" is invalid for option "size"');var n=new Uint8Array(s);return Object.setPrototypeOf(n,a.prototype),n}function a(s,n,i){if(typeof s=="number"){if(typeof n=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return C(s)}return d(s,n,i)}a.poolSize=8192;function d(s,n,i){if(typeof s=="string")return S(s,n);if(ArrayBuffer.isView(s))return z(s);if(s==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(s));if(U(s,ArrayBuffer)||s&&U(s.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(U(s,SharedArrayBuffer)||s&&U(s.buffer,SharedArrayBuffer)))return P(s,n,i);if(typeof s=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var c=s.valueOf&&s.valueOf();if(c!=null&&c!==s)return a.from(c,n,i);var h=Y(s);if(h)return h;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof s[Symbol.toPrimitive]=="function")return a.from(s[Symbol.toPrimitive]("string"),n,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(s))}a.from=function(s,n,i){return d(s,n,i)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function v(s){if(typeof s!="number")throw new TypeError('"size" argument must be of type number');if(s<0)throw new RangeError('The value "'+s+'" is invalid for option "size"')}function E(s,n,i){return v(s),s<=0?l(s):n!==void 0?typeof i=="string"?l(s).fill(n,i):l(s).fill(n):l(s)}a.alloc=function(s,n,i){return E(s,n,i)};function C(s){return v(s),l(s<0?0:k(s)|0)}a.allocUnsafe=function(s){return C(s)},a.allocUnsafeSlow=function(s){return C(s)};function S(s,n){if((typeof n!="string"||n==="")&&(n="utf8"),!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var i=X(s,n)|0,c=l(i),h=c.write(s,n);return h!==i&&(c=c.slice(0,h)),c}function I(s){for(var n=s.length<0?0:k(s.length)|0,i=l(n),c=0;c<n;c+=1)i[c]=s[c]&255;return i}function z(s){if(U(s,Uint8Array)){var n=new Uint8Array(s);return P(n.buffer,n.byteOffset,n.byteLength)}return I(s)}function P(s,n,i){if(n<0||s.byteLength<n)throw new RangeError('"offset" is outside of buffer bounds');if(s.byteLength<n+(i||0))throw new RangeError('"length" is outside of buffer bounds');var c;return n===void 0&&i===void 0?c=new Uint8Array(s):i===void 0?c=new Uint8Array(s,n):c=new Uint8Array(s,n,i),Object.setPrototypeOf(c,a.prototype),c}function Y(s){if(a.isBuffer(s)){var n=k(s.length)|0,i=l(n);return i.length===0||s.copy(i,0,0,n),i}if(s.length!==void 0)return typeof s.length!="number"||j(s.length)?l(0):I(s);if(s.type==="Buffer"&&Array.isArray(s.data))return I(s.data)}function k(s){if(s>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return s|0}function et(s){return+s!=s&&(s=0),a.alloc(+s)}a.isBuffer=function(n){return n!=null&&n._isBuffer===!0&&n!==a.prototype},a.compare=function(n,i){if(U(n,Uint8Array)&&(n=a.from(n,n.offset,n.byteLength)),U(i,Uint8Array)&&(i=a.from(i,i.offset,i.byteLength)),!a.isBuffer(n)||!a.isBuffer(i))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(n===i)return 0;for(var c=n.length,h=i.length,y=0,_=Math.min(c,h);y<_;++y)if(n[y]!==i[y]){c=n[y],h=i[y];break}return c<h?-1:h<c?1:0},a.isEncoding=function(n){switch(String(n).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(n,i){if(!Array.isArray(n))throw new TypeError('"list" argument must be an Array of Buffers');if(n.length===0)return a.alloc(0);var c;if(i===void 0)for(i=0,c=0;c<n.length;++c)i+=n[c].length;var h=a.allocUnsafe(i),y=0;for(c=0;c<n.length;++c){var _=n[c];if(U(_,Uint8Array))y+_.length>h.length?a.from(_).copy(h,y):Uint8Array.prototype.set.call(h,_,y);else if(a.isBuffer(_))_.copy(h,y);else throw new TypeError('"list" argument must be an Array of Buffers');y+=_.length}return h};function X(s,n){if(a.isBuffer(s))return s.length;if(ArrayBuffer.isView(s)||U(s,ArrayBuffer))return s.byteLength;if(typeof s!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(s));var i=s.length,c=arguments.length>2&&arguments[2]===!0;if(!c&&i===0)return 0;for(var h=!1;;)switch(n){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return O(s).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return i*2;case"hex":return i>>>1;case"base64":return V(s).length;default:if(h)return c?-1:O(s).length;n=(""+n).toLowerCase(),h=!0}}a.byteLength=X;function K(s,n,i){var c=!1;if((n===void 0||n<0)&&(n=0),n>this.length||((i===void 0||i>this.length)&&(i=this.length),i<=0)||(i>>>=0,n>>>=0,i<=n))return"";for(s||(s="utf8");;)switch(s){case"hex":return b(this,n,i);case"utf8":case"utf-8":return xt(this,n,i);case"ascii":return g(this,n,i);case"latin1":case"binary":return m(this,n,i);case"base64":return wt(this,n,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,n,i);default:if(c)throw new TypeError("Unknown encoding: "+s);s=(s+"").toLowerCase(),c=!0}}a.prototype._isBuffer=!0;function T(s,n,i){var c=s[n];s[n]=s[i],s[i]=c}a.prototype.swap16=function(){var n=this.length;if(n%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<n;i+=2)T(this,i,i+1);return this},a.prototype.swap32=function(){var n=this.length;if(n%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<n;i+=4)T(this,i,i+3),T(this,i+1,i+2);return this},a.prototype.swap64=function(){var n=this.length;if(n%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<n;i+=8)T(this,i,i+7),T(this,i+1,i+6),T(this,i+2,i+5),T(this,i+3,i+4);return this},a.prototype.toString=function(){var n=this.length;return n===0?"":arguments.length===0?xt(this,0,n):K.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(n){if(!a.isBuffer(n))throw new TypeError("Argument must be a Buffer");return this===n?!0:a.compare(this,n)===0},a.prototype.inspect=function(){var n="",i=t.INSPECT_MAX_BYTES;return n=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(n+=" ... "),"<Buffer "+n+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(n,i,c,h,y){if(U(n,Uint8Array)&&(n=a.from(n,n.offset,n.byteLength)),!a.isBuffer(n))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(n));if(i===void 0&&(i=0),c===void 0&&(c=n?n.length:0),h===void 0&&(h=0),y===void 0&&(y=this.length),i<0||c>n.length||h<0||y>this.length)throw new RangeError("out of range index");if(h>=y&&i>=c)return 0;if(h>=y)return-1;if(i>=c)return 1;if(i>>>=0,c>>>=0,h>>>=0,y>>>=0,this===n)return 0;for(var _=y-h,H=c-i,q=Math.min(_,H),W=this.slice(h,y),Q=n.slice(i,c),tt=0;tt<q;++tt)if(W[tt]!==Q[tt]){_=W[tt],H=Q[tt];break}return _<H?-1:H<_?1:0};function it(s,n,i,c,h){if(s.length===0)return-1;if(typeof i=="string"?(c=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,j(i)&&(i=h?0:s.length-1),i<0&&(i=s.length+i),i>=s.length){if(h)return-1;i=s.length-1}else if(i<0)if(h)i=0;else return-1;if(typeof n=="string"&&(n=a.from(n,c)),a.isBuffer(n))return n.length===0?-1:ut(s,n,i,c,h);if(typeof n=="number")return n=n&255,typeof Uint8Array.prototype.indexOf=="function"?h?Uint8Array.prototype.indexOf.call(s,n,i):Uint8Array.prototype.lastIndexOf.call(s,n,i):ut(s,[n],i,c,h);throw new TypeError("val must be string, number or Buffer")}function ut(s,n,i,c,h){var y=1,_=s.length,H=n.length;if(c!==void 0&&(c=String(c).toLowerCase(),c==="ucs2"||c==="ucs-2"||c==="utf16le"||c==="utf-16le")){if(s.length<2||n.length<2)return-1;y=2,_/=2,H/=2,i/=2}function q(Ft,Ht){return y===1?Ft[Ht]:Ft.readUInt16BE(Ht*y)}var W;if(h){var Q=-1;for(W=i;W<_;W++)if(q(s,W)===q(n,Q===-1?0:W-Q)){if(Q===-1&&(Q=W),W-Q+1===H)return Q*y}else Q!==-1&&(W-=W-Q),Q=-1}else for(i+H>_&&(i=_-H),W=i;W>=0;W--){for(var tt=!0,st=0;st<H;st++)if(q(s,W+st)!==q(n,st)){tt=!1;break}if(tt)return W}return-1}a.prototype.includes=function(n,i,c){return this.indexOf(n,i,c)!==-1},a.prototype.indexOf=function(n,i,c){return it(this,n,i,c,!0)},a.prototype.lastIndexOf=function(n,i,c){return it(this,n,i,c,!1)};function bt(s,n,i,c){i=Number(i)||0;var h=s.length-i;c?(c=Number(c),c>h&&(c=h)):c=h;var y=n.length;c>y/2&&(c=y/2);for(var _=0;_<c;++_){var H=parseInt(n.substr(_*2,2),16);if(j(H))return _;s[i+_]=H}return _}function Xt(s,n,i,c){return F(O(n,s.length-i),s,i,c)}function Rt(s,n,i,c){return F(R(n),s,i,c)}function Kt(s,n,i,c){return F(V(n),s,i,c)}function kt(s,n,i,c){return F(B(n,s.length-i),s,i,c)}a.prototype.write=function(n,i,c,h){if(i===void 0)h="utf8",c=this.length,i=0;else if(c===void 0&&typeof i=="string")h=i,c=this.length,i=0;else if(isFinite(i))i=i>>>0,isFinite(c)?(c=c>>>0,h===void 0&&(h="utf8")):(h=c,c=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var y=this.length-i;if((c===void 0||c>y)&&(c=y),n.length>0&&(c<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");h||(h="utf8");for(var _=!1;;)switch(h){case"hex":return bt(this,n,i,c);case"utf8":case"utf-8":return Xt(this,n,i,c);case"ascii":case"latin1":case"binary":return Rt(this,n,i,c);case"base64":return Kt(this,n,i,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return kt(this,n,i,c);default:if(_)throw new TypeError("Unknown encoding: "+h);h=(""+h).toLowerCase(),_=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function wt(s,n,i){return n===0&&i===s.length?dr.fromByteArray(s):dr.fromByteArray(s.slice(n,i))}function xt(s,n,i){i=Math.min(s.length,i);for(var c=[],h=n;h<i;){var y=s[h],_=null,H=y>239?4:y>223?3:y>191?2:1;if(h+H<=i){var q,W,Q,tt;switch(H){case 1:y<128&&(_=y);break;case 2:q=s[h+1],(q&192)===128&&(tt=(y&31)<<6|q&63,tt>127&&(_=tt));break;case 3:q=s[h+1],W=s[h+2],(q&192)===128&&(W&192)===128&&(tt=(y&15)<<12|(q&63)<<6|W&63,tt>2047&&(tt<55296||tt>57343)&&(_=tt));break;case 4:q=s[h+1],W=s[h+2],Q=s[h+3],(q&192)===128&&(W&192)===128&&(Q&192)===128&&(tt=(y&15)<<18|(q&63)<<12|(W&63)<<6|Q&63,tt>65535&&tt<1114112&&(_=tt))}}_===null?(_=65533,H=1):_>65535&&(_-=65536,c.push(_>>>10&1023|55296),_=56320|_&1023),c.push(_),h+=H}return Et(c)}var pt=4096;function Et(s){var n=s.length;if(n<=pt)return String.fromCharCode.apply(String,s);for(var i="",c=0;c<n;)i+=String.fromCharCode.apply(String,s.slice(c,c+=pt));return i}function g(s,n,i){var c="";i=Math.min(s.length,i);for(var h=n;h<i;++h)c+=String.fromCharCode(s[h]&127);return c}function m(s,n,i){var c="";i=Math.min(s.length,i);for(var h=n;h<i;++h)c+=String.fromCharCode(s[h]);return c}function b(s,n,i){var c=s.length;(!n||n<0)&&(n=0),(!i||i<0||i>c)&&(i=c);for(var h="",y=n;y<i;++y)h+=$[s[y]];return h}function w(s,n,i){for(var c=s.slice(n,i),h="",y=0;y<c.length-1;y+=2)h+=String.fromCharCode(c[y]+c[y+1]*256);return h}a.prototype.slice=function(n,i){var c=this.length;n=~~n,i=i===void 0?c:~~i,n<0?(n+=c,n<0&&(n=0)):n>c&&(n=c),i<0?(i+=c,i<0&&(i=0)):i>c&&(i=c),i<n&&(i=n);var h=this.subarray(n,i);return Object.setPrototypeOf(h,a.prototype),h};function f(s,n,i){if(s%1!==0||s<0)throw new RangeError("offset is not uint");if(s+n>i)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(n,i,c){n=n>>>0,i=i>>>0,c||f(n,i,this.length);for(var h=this[n],y=1,_=0;++_<i&&(y*=256);)h+=this[n+_]*y;return h},a.prototype.readUintBE=a.prototype.readUIntBE=function(n,i,c){n=n>>>0,i=i>>>0,c||f(n,i,this.length);for(var h=this[n+--i],y=1;i>0&&(y*=256);)h+=this[n+--i]*y;return h},a.prototype.readUint8=a.prototype.readUInt8=function(n,i){return n=n>>>0,i||f(n,1,this.length),this[n]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(n,i){return n=n>>>0,i||f(n,2,this.length),this[n]|this[n+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(n,i){return n=n>>>0,i||f(n,2,this.length),this[n]<<8|this[n+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(n,i){return n=n>>>0,i||f(n,4,this.length),(this[n]|this[n+1]<<8|this[n+2]<<16)+this[n+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(n,i){return n=n>>>0,i||f(n,4,this.length),this[n]*16777216+(this[n+1]<<16|this[n+2]<<8|this[n+3])},a.prototype.readIntLE=function(n,i,c){n=n>>>0,i=i>>>0,c||f(n,i,this.length);for(var h=this[n],y=1,_=0;++_<i&&(y*=256);)h+=this[n+_]*y;return y*=128,h>=y&&(h-=Math.pow(2,8*i)),h},a.prototype.readIntBE=function(n,i,c){n=n>>>0,i=i>>>0,c||f(n,i,this.length);for(var h=i,y=1,_=this[n+--h];h>0&&(y*=256);)_+=this[n+--h]*y;return y*=128,_>=y&&(_-=Math.pow(2,8*i)),_},a.prototype.readInt8=function(n,i){return n=n>>>0,i||f(n,1,this.length),this[n]&128?(255-this[n]+1)*-1:this[n]},a.prototype.readInt16LE=function(n,i){n=n>>>0,i||f(n,2,this.length);var c=this[n]|this[n+1]<<8;return c&32768?c|4294901760:c},a.prototype.readInt16BE=function(n,i){n=n>>>0,i||f(n,2,this.length);var c=this[n+1]|this[n]<<8;return c&32768?c|4294901760:c},a.prototype.readInt32LE=function(n,i){return n=n>>>0,i||f(n,4,this.length),this[n]|this[n+1]<<8|this[n+2]<<16|this[n+3]<<24},a.prototype.readInt32BE=function(n,i){return n=n>>>0,i||f(n,4,this.length),this[n]<<24|this[n+1]<<16|this[n+2]<<8|this[n+3]},a.prototype.readFloatLE=function(n,i){return n=n>>>0,i||f(n,4,this.length),ve.read(this,n,!0,23,4)},a.prototype.readFloatBE=function(n,i){return n=n>>>0,i||f(n,4,this.length),ve.read(this,n,!1,23,4)},a.prototype.readDoubleLE=function(n,i){return n=n>>>0,i||f(n,8,this.length),ve.read(this,n,!0,52,8)},a.prototype.readDoubleBE=function(n,i){return n=n>>>0,i||f(n,8,this.length),ve.read(this,n,!1,52,8)};function u(s,n,i,c,h,y){if(!a.isBuffer(s))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>h||n<y)throw new RangeError('"value" argument is out of bounds');if(i+c>s.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(n,i,c,h){if(n=+n,i=i>>>0,c=c>>>0,!h){var y=Math.pow(2,8*c)-1;u(this,n,i,c,y,0)}var _=1,H=0;for(this[i]=n&255;++H<c&&(_*=256);)this[i+H]=n/_&255;return i+c},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(n,i,c,h){if(n=+n,i=i>>>0,c=c>>>0,!h){var y=Math.pow(2,8*c)-1;u(this,n,i,c,y,0)}var _=c-1,H=1;for(this[i+_]=n&255;--_>=0&&(H*=256);)this[i+_]=n/H&255;return i+c},a.prototype.writeUint8=a.prototype.writeUInt8=function(n,i,c){return n=+n,i=i>>>0,c||u(this,n,i,1,255,0),this[i]=n&255,i+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(n,i,c){return n=+n,i=i>>>0,c||u(this,n,i,2,65535,0),this[i]=n&255,this[i+1]=n>>>8,i+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(n,i,c){return n=+n,i=i>>>0,c||u(this,n,i,2,65535,0),this[i]=n>>>8,this[i+1]=n&255,i+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(n,i,c){return n=+n,i=i>>>0,c||u(this,n,i,4,4294967295,0),this[i+3]=n>>>24,this[i+2]=n>>>16,this[i+1]=n>>>8,this[i]=n&255,i+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(n,i,c){return n=+n,i=i>>>0,c||u(this,n,i,4,4294967295,0),this[i]=n>>>24,this[i+1]=n>>>16,this[i+2]=n>>>8,this[i+3]=n&255,i+4},a.prototype.writeIntLE=function(n,i,c,h){if(n=+n,i=i>>>0,!h){var y=Math.pow(2,8*c-1);u(this,n,i,c,y-1,-y)}var _=0,H=1,q=0;for(this[i]=n&255;++_<c&&(H*=256);)n<0&&q===0&&this[i+_-1]!==0&&(q=1),this[i+_]=(n/H>>0)-q&255;return i+c},a.prototype.writeIntBE=function(n,i,c,h){if(n=+n,i=i>>>0,!h){var y=Math.pow(2,8*c-1);u(this,n,i,c,y-1,-y)}var _=c-1,H=1,q=0;for(this[i+_]=n&255;--_>=0&&(H*=256);)n<0&&q===0&&this[i+_+1]!==0&&(q=1),this[i+_]=(n/H>>0)-q&255;return i+c},a.prototype.writeInt8=function(n,i,c){return n=+n,i=i>>>0,c||u(this,n,i,1,127,-128),n<0&&(n=255+n+1),this[i]=n&255,i+1},a.prototype.writeInt16LE=function(n,i,c){return n=+n,i=i>>>0,c||u(this,n,i,2,32767,-32768),this[i]=n&255,this[i+1]=n>>>8,i+2},a.prototype.writeInt16BE=function(n,i,c){return n=+n,i=i>>>0,c||u(this,n,i,2,32767,-32768),this[i]=n>>>8,this[i+1]=n&255,i+2},a.prototype.writeInt32LE=function(n,i,c){return n=+n,i=i>>>0,c||u(this,n,i,4,2147483647,-2147483648),this[i]=n&255,this[i+1]=n>>>8,this[i+2]=n>>>16,this[i+3]=n>>>24,i+4},a.prototype.writeInt32BE=function(n,i,c){return n=+n,i=i>>>0,c||u(this,n,i,4,2147483647,-2147483648),n<0&&(n=4294967295+n+1),this[i]=n>>>24,this[i+1]=n>>>16,this[i+2]=n>>>8,this[i+3]=n&255,i+4};function x(s,n,i,c,h,y){if(i+c>s.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function N(s,n,i,c,h){return n=+n,i=i>>>0,h||x(s,n,i,4),ve.write(s,n,i,c,23,4),i+4}a.prototype.writeFloatLE=function(n,i,c){return N(this,n,i,!0,c)},a.prototype.writeFloatBE=function(n,i,c){return N(this,n,i,!1,c)};function A(s,n,i,c,h){return n=+n,i=i>>>0,h||x(s,n,i,8),ve.write(s,n,i,c,52,8),i+8}a.prototype.writeDoubleLE=function(n,i,c){return A(this,n,i,!0,c)},a.prototype.writeDoubleBE=function(n,i,c){return A(this,n,i,!1,c)},a.prototype.copy=function(n,i,c,h){if(!a.isBuffer(n))throw new TypeError("argument should be a Buffer");if(c||(c=0),!h&&h!==0&&(h=this.length),i>=n.length&&(i=n.length),i||(i=0),h>0&&h<c&&(h=c),h===c||n.length===0||this.length===0)return 0;if(i<0)throw new RangeError("targetStart out of bounds");if(c<0||c>=this.length)throw new RangeError("Index out of range");if(h<0)throw new RangeError("sourceEnd out of bounds");h>this.length&&(h=this.length),n.length-i<h-c&&(h=n.length-i+c);var y=h-c;return this===n&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(i,c,h):Uint8Array.prototype.set.call(n,this.subarray(c,h),i),y},a.prototype.fill=function(n,i,c,h){if(typeof n=="string"){if(typeof i=="string"?(h=i,i=0,c=this.length):typeof c=="string"&&(h=c,c=this.length),h!==void 0&&typeof h!="string")throw new TypeError("encoding must be a string");if(typeof h=="string"&&!a.isEncoding(h))throw new TypeError("Unknown encoding: "+h);if(n.length===1){var y=n.charCodeAt(0);(h==="utf8"&&y<128||h==="latin1")&&(n=y)}}else typeof n=="number"?n=n&255:typeof n=="boolean"&&(n=Number(n));if(i<0||this.length<i||this.length<c)throw new RangeError("Out of range index");if(c<=i)return this;i=i>>>0,c=c===void 0?this.length:c>>>0,n||(n=0);var _;if(typeof n=="number")for(_=i;_<c;++_)this[_]=n;else{var H=a.isBuffer(n)?n:a.from(n,h),q=H.length;if(q===0)throw new TypeError('The value "'+n+'" is invalid for argument "value"');for(_=0;_<c-i;++_)this[_+i]=H[_%q]}return this};var M=/[^+/0-9A-Za-z-_]/g;function L(s){if(s=s.split("=")[0],s=s.trim().replace(M,""),s.length<2)return"";for(;s.length%4!==0;)s=s+"=";return s}function O(s,n){n=n||1/0;for(var i,c=s.length,h=null,y=[],_=0;_<c;++_){if(i=s.charCodeAt(_),i>55295&&i<57344){if(!h){if(i>56319){(n-=3)>-1&&y.push(239,191,189);continue}else if(_+1===c){(n-=3)>-1&&y.push(239,191,189);continue}h=i;continue}if(i<56320){(n-=3)>-1&&y.push(239,191,189),h=i;continue}i=(h-55296<<10|i-56320)+65536}else h&&(n-=3)>-1&&y.push(239,191,189);if(h=null,i<128){if((n-=1)<0)break;y.push(i)}else if(i<2048){if((n-=2)<0)break;y.push(i>>6|192,i&63|128)}else if(i<65536){if((n-=3)<0)break;y.push(i>>12|224,i>>6&63|128,i&63|128)}else if(i<1114112){if((n-=4)<0)break;y.push(i>>18|240,i>>12&63|128,i>>6&63|128,i&63|128)}else throw new Error("Invalid code point")}return y}function R(s){for(var n=[],i=0;i<s.length;++i)n.push(s.charCodeAt(i)&255);return n}function B(s,n){for(var i,c,h,y=[],_=0;_<s.length&&!((n-=2)<0);++_)i=s.charCodeAt(_),c=i>>8,h=i%256,y.push(h),y.push(c);return y}function V(s){return dr.toByteArray(L(s))}function F(s,n,i,c){for(var h=0;h<c&&!(h+i>=n.length||h>=s.length);++h)n[h+i]=s[h];return h}function U(s,n){return s instanceof n||s!=null&&s.constructor!=null&&s.constructor.name!=null&&s.constructor.name===n.name}function j(s){return s!==s}var $=function(){for(var s="0123456789abcdef",n=new Array(256),i=0;i<16;++i)for(var c=i*16,h=0;h<16;++h)n[c+h]=s[i]+s[h];return n}()}),G=We.Buffer;We.SlowBuffer;We.INSPECT_MAX_BYTES;We.kMaxLength;var wr=function(t,r){return wr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,p){o.__proto__=p}||function(o,p){for(var l in p)p.hasOwnProperty(l)&&(o[l]=p[l])},wr(t,r)};function Ye(e,t){wr(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var ce=function(e){Ye(t,e);function t(r){var o=e.call(this,r)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),t}(Error),ot=function(e){Ye(t,e);function t(r){var o=e.call(this,r)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),t}(TypeError);function He(e){return e&&e.Math==Math&&e}function Mn(){return He(typeof globalThis=="object"&&globalThis)||He(typeof window=="object"&&window)||He(typeof self=="object"&&self)||He(typeof global=="object"&&global)||Function("return this")()}function Bi(){var e=Mn();return typeof e.navigator=="object"&&e.navigator.product==="ReactNative"}var Ai=function(t){var r=Bi()?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(r);for(var o=G.alloc(t),p=0;p<t;++p)o[p]=Math.floor(Math.random()*256);return o},Mi=function(){{if(typeof window<"u"){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues)return function(t){return e.getRandomValues(G.alloc(t))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(t){return global.crypto.getRandomValues(G.alloc(t))}:Ai}},Dn=Mi();function Di(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function br(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function Ri(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function Fi(e){return Oe(e)&&Object.prototype.toString.call(e)==="[object Date]"}function Oe(e){return typeof e=="object"&&e!==null}function Je(e,t){var r=!1;function o(){for(var p=[],l=0;l<arguments.length;l++)p[l]=arguments[l];return r||(console.warn(t),r=!0),e.apply(this,p)}return o}function ze(e){if(ArrayBuffer.isView(e))return G.from(e.buffer,e.byteOffset,e.byteLength);if(Di(e))return G.from(e);throw new ot("Must use either Buffer or TypedArray")}var Li=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,Rn=function(e){return typeof e=="string"&&Li.test(e)},_r=function(e){if(!Rn(e))throw new ot('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var t=e.replace(/-/g,"");return G.from(t,"hex")},gn=function(e,t){return t===void 0&&(t=!0),t?e.toString("hex",0,4)+"-"+e.toString("hex",4,6)+"-"+e.toString("hex",6,8)+"-"+e.toString("hex",8,10)+"-"+e.toString("hex",10,16):e.toString("hex")};var $s=Math.pow(2,63)-1,ks=-Math.pow(2,63),Pi=Math.pow(2,53),Vi=-Math.pow(2,53);var Fn=4;var le=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);if(t!=null&&typeof t!="string"&&!ArrayBuffer.isView(t)&&!(t instanceof ArrayBuffer)&&!Array.isArray(t))throw new ot("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=r??e.BSON_BINARY_SUBTYPE_DEFAULT,t==null?(this.buffer=G.alloc(e.BUFFER_SIZE),this.position=0):(typeof t=="string"?this.buffer=G.from(t,"binary"):Array.isArray(t)?this.buffer=G.from(t):this.buffer=ze(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if(typeof t=="string"&&t.length!==1)throw new ot("only accepts single character String");if(typeof t!="number"&&t.length!==1)throw new ot("only accepts single character Uint8Array or Array");var r;if(typeof t=="string"?r=t.charCodeAt(0):typeof t=="number"?r=t:r=t[0],r<0||r>255)throw new ot("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=r;else{var o=G.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(o,0,0,this.buffer.length),this.buffer=o,this.buffer[this.position++]=r}},e.prototype.write=function(t,r){if(r=typeof r=="number"?r:this.position,this.buffer.length<r+t.length){var o=G.alloc(this.buffer.length+t.length);this.buffer.copy(o,0,0,this.buffer.length),this.buffer=o}ArrayBuffer.isView(t)?(this.buffer.set(ze(t),r),this.position=r+t.byteLength>this.position?r+t.length:this.position):typeof t=="string"&&(this.buffer.write(t,r,t.length,"binary"),this.position=r+t.length>this.position?r+t.length:this.position)},e.prototype.read=function(t,r){return r=r&&r>0?r:this.position,this.buffer.slice(t,t+r)},e.prototype.value=function(t){return t=!!t,t&&this.buffer.length===this.position?this.buffer:t?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},e.prototype.length=function(){return this.position},e.prototype.toJSON=function(){return this.buffer.toString("base64")},e.prototype.toString=function(t){return this.buffer.toString(t)},e.prototype.toExtendedJSON=function(t){t=t||{};var r=this.buffer.toString("base64"),o=Number(this.sub_type).toString(16);return t.legacy?{$binary:r,$type:o.length===1?"0"+o:o}:{$binary:{base64:r,subType:o.length===1?"0"+o:o}}},e.prototype.toUUID=function(){if(this.sub_type===e.SUBTYPE_UUID)return new yn(this.buffer.slice(0,this.position));throw new ce('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(e.SUBTYPE_UUID,'" is currently supported.'))},e.fromExtendedJSON=function(t,r){r=r||{};var o,p;if("$binary"in t?r.legacy&&typeof t.$binary=="string"&&"$type"in t?(p=t.$type?parseInt(t.$type,16):0,o=G.from(t.$binary,"base64")):typeof t.$binary!="string"&&(p=t.$binary.subType?parseInt(t.$binary.subType,16):0,o=G.from(t.$binary.base64,"base64")):"$uuid"in t&&(p=4,o=_r(t.$uuid)),!o)throw new ot("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return p===Fn?new yn(o):new e(o,p)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.value(!0);return'new Binary(Buffer.from("'.concat(t.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},e.BSON_BINARY_SUBTYPE_DEFAULT=0,e.BUFFER_SIZE=256,e.SUBTYPE_DEFAULT=0,e.SUBTYPE_FUNCTION=1,e.SUBTYPE_BYTE_ARRAY=2,e.SUBTYPE_UUID_OLD=3,e.SUBTYPE_UUID=4,e.SUBTYPE_MD5=5,e.SUBTYPE_ENCRYPTED=6,e.SUBTYPE_COLUMN=7,e.SUBTYPE_USER_DEFINED=128,e}();Object.defineProperty(le.prototype,"_bsontype",{value:"Binary"});var mr=16,yn=function(e){Ye(t,e);function t(r){var o=this,p,l;if(r==null)p=t.generate();else if(r instanceof t)p=G.from(r.buffer),l=r.__id;else if(ArrayBuffer.isView(r)&&r.byteLength===mr)p=ze(r);else if(typeof r=="string")p=_r(r);else throw new ot("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");return o=e.call(this,p,Fn)||this,o.__id=l,o}return Object.defineProperty(t.prototype,"id",{get:function(){return this.buffer},set:function(r){this.buffer=r,t.cacheHexString&&(this.__id=gn(r))},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(r){if(r===void 0&&(r=!0),t.cacheHexString&&this.__id)return this.__id;var o=gn(this.id,r);return t.cacheHexString&&(this.__id=o),o},t.prototype.toString=function(r){return r?this.id.toString(r):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(r){if(!r)return!1;if(r instanceof t)return r.id.equals(this.id);try{return new t(r).id.equals(this.id)}catch{return!1}},t.prototype.toBinary=function(){return new le(this.id,le.SUBTYPE_UUID)},t.generate=function(){var r=Dn(mr);return r[6]=r[6]&15|64,r[8]=r[8]&63|128,G.from(r)},t.isValid=function(r){return r?r instanceof t?!0:typeof r=="string"?Rn(r):br(r)?r.length!==mr?!1:(r[6]&240)===64&&(r[8]&128)===128:!1:!1},t.createFromHexString=function(r){var o=_r(r);return new t(o)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},t}(le),qe=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);this.code=t,this.scope=r}return e.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},e.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},e.fromExtendedJSON=function(t){return new e(t.$code,t.$scope)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.toJSON();return'new Code("'.concat(String(t.code),'"').concat(t.scope?", ".concat(JSON.stringify(t.scope)):"",")")},e}();Object.defineProperty(qe.prototype,"_bsontype",{value:"Code"});function Ui(e){return Oe(e)&&e.$id!=null&&typeof e.$ref=="string"&&(e.$db==null||typeof e.$db=="string")}var Ie=function(){function e(t,r,o,p){if(!(this instanceof e))return new e(t,r,o,p);var l=t.split(".");l.length===2&&(o=l.shift(),t=l.shift()),this.collection=t,this.oid=r,this.db=o,this.fields=p||{}}return Object.defineProperty(e.prototype,"namespace",{get:function(){return this.collection},set:function(t){this.collection=t},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){var t=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(t.$db=this.db),t},e.prototype.toExtendedJSON=function(t){t=t||{};var r={$ref:this.collection,$id:this.oid};return t.legacy||(this.db&&(r.$db=this.db),r=Object.assign(r,this.fields)),r},e.fromExtendedJSON=function(t){var r=Object.assign({},t);return delete r.$ref,delete r.$id,delete r.$db,new e(t.$ref,t.$id,t.$db,r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.oid===void 0||this.oid.toString===void 0?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(t),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},e}();Object.defineProperty(Ie.prototype,"_bsontype",{value:"DBRef"});var Ot=void 0;try{Ot=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}var vn=65536,ji=1<<24,_e=vn*vn,Ln=_e*_e,wn=Ln/2,_n={},bn={},D=function(){function e(t,r,o){if(t===void 0&&(t=0),!(this instanceof e))return new e(t,r,o);typeof t=="bigint"?Object.assign(this,e.fromBigInt(t,!!r)):typeof t=="string"?Object.assign(this,e.fromString(t,!!r)):(this.low=t|0,this.high=r|0,this.unsigned=!!o),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return e.fromBits=function(t,r,o){return new e(t,r,o)},e.fromInt=function(t,r){var o,p,l;return r?(t>>>=0,(l=0<=t&&t<256)&&(p=bn[t],p)?p:(o=e.fromBits(t,(t|0)<0?-1:0,!0),l&&(bn[t]=o),o)):(t|=0,(l=-128<=t&&t<128)&&(p=_n[t],p)?p:(o=e.fromBits(t,t<0?-1:0,!1),l&&(_n[t]=o),o))},e.fromNumber=function(t,r){if(isNaN(t))return r?e.UZERO:e.ZERO;if(r){if(t<0)return e.UZERO;if(t>=Ln)return e.MAX_UNSIGNED_VALUE}else{if(t<=-wn)return e.MIN_VALUE;if(t+1>=wn)return e.MAX_VALUE}return t<0?e.fromNumber(-t,r).neg():e.fromBits(t%_e|0,t/_e|0,r)},e.fromBigInt=function(t,r){return e.fromString(t.toString(),r)},e.fromString=function(t,r,o){if(t.length===0)throw Error("empty string");if(t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return e.ZERO;if(typeof r=="number"?(o=r,r=!1):r=!!r,o=o||10,o<2||36<o)throw RangeError("radix");var p;if((p=t.indexOf("-"))>0)throw Error("interior hyphen");if(p===0)return e.fromString(t.substring(1),r,o).neg();for(var l=e.fromNumber(Math.pow(o,8)),a=e.ZERO,d=0;d<t.length;d+=8){var v=Math.min(8,t.length-d),E=parseInt(t.substring(d,d+v),o);if(v<8){var C=e.fromNumber(Math.pow(o,v));a=a.mul(C).add(e.fromNumber(E))}else a=a.mul(l),a=a.add(e.fromNumber(E))}return a.unsigned=r,a},e.fromBytes=function(t,r,o){return o?e.fromBytesLE(t,r):e.fromBytesBE(t,r)},e.fromBytesLE=function(t,r){return new e(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)},e.fromBytesBE=function(t,r){return new e(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)},e.isLong=function(t){return Oe(t)&&t.__isLong__===!0},e.fromValue=function(t,r){return typeof t=="number"?e.fromNumber(t,r):typeof t=="string"?e.fromString(t,r):e.fromBits(t.low,t.high,typeof r=="boolean"?r:t.unsigned)},e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var r=this.high>>>16,o=this.high&65535,p=this.low>>>16,l=this.low&65535,a=t.high>>>16,d=t.high&65535,v=t.low>>>16,E=t.low&65535,C=0,S=0,I=0,z=0;return z+=l+E,I+=z>>>16,z&=65535,I+=p+v,S+=I>>>16,I&=65535,S+=o+d,C+=S>>>16,S&=65535,C+=r+a,C&=65535,e.fromBits(I<<16|z,C<<16|S,this.unsigned)},e.prototype.and=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low&t.low,this.high&t.high,this.unsigned)},e.prototype.compare=function(t){if(e.isLong(t)||(t=e.fromValue(t)),this.eq(t))return 0;var r=this.isNegative(),o=t.isNegative();return r&&!o?-1:!r&&o?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},e.prototype.comp=function(t){return this.compare(t)},e.prototype.divide=function(t){if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())throw Error("division by zero");if(Ot){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var r=(this.unsigned?Ot.div_u:Ot.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(r,Ot.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var o,p,l;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;l=e.UZERO}else{if(this.eq(e.MIN_VALUE)){if(t.eq(e.ONE)||t.eq(e.NEG_ONE))return e.MIN_VALUE;if(t.eq(e.MIN_VALUE))return e.ONE;var a=this.shr(1);return o=a.div(t).shl(1),o.eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(p=this.sub(t.mul(o)),l=o.add(p.div(t)),l)}else if(t.eq(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();l=e.ZERO}for(p=this;p.gte(t);){o=Math.max(1,Math.floor(p.toNumber()/t.toNumber()));for(var d=Math.ceil(Math.log(o)/Math.LN2),v=d<=48?1:Math.pow(2,d-48),E=e.fromNumber(o),C=E.mul(t);C.isNegative()||C.gt(p);)o-=v,E=e.fromNumber(o,this.unsigned),C=E.mul(t);E.isZero()&&(E=e.ONE),l=l.add(E),p=p.sub(C)}return l},e.prototype.div=function(t){return this.divide(t)},e.prototype.equals=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low},e.prototype.eq=function(t){return this.equals(t)},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(e.MIN_VALUE)?64:this.neg().getNumBitsAbs();var t=this.high!==0?this.high:this.low,r;for(r=31;r>0&&(t&1<<r)===0;r--);return this.high!==0?r+33:r+1},e.prototype.greaterThan=function(t){return this.comp(t)>0},e.prototype.gt=function(t){return this.greaterThan(t)},e.prototype.greaterThanOrEqual=function(t){return this.comp(t)>=0},e.prototype.gte=function(t){return this.greaterThanOrEqual(t)},e.prototype.ge=function(t){return this.greaterThanOrEqual(t)},e.prototype.isEven=function(){return(this.low&1)===0},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isOdd=function(){return(this.low&1)===1},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isZero=function(){return this.high===0&&this.low===0},e.prototype.lessThan=function(t){return this.comp(t)<0},e.prototype.lt=function(t){return this.lessThan(t)},e.prototype.lessThanOrEqual=function(t){return this.comp(t)<=0},e.prototype.lte=function(t){return this.lessThanOrEqual(t)},e.prototype.modulo=function(t){if(e.isLong(t)||(t=e.fromValue(t)),Ot){var r=(this.unsigned?Ot.rem_u:Ot.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(r,Ot.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},e.prototype.mod=function(t){return this.modulo(t)},e.prototype.rem=function(t){return this.modulo(t)},e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;if(e.isLong(t)||(t=e.fromValue(t)),Ot){var r=Ot.mul(this.low,this.high,t.low,t.high);return e.fromBits(r,Ot.get_high(),this.unsigned)}if(t.isZero())return e.ZERO;if(this.eq(e.MIN_VALUE))return t.isOdd()?e.MIN_VALUE:e.ZERO;if(t.eq(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(e.TWO_PWR_24)&&t.lt(e.TWO_PWR_24))return e.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var o=this.high>>>16,p=this.high&65535,l=this.low>>>16,a=this.low&65535,d=t.high>>>16,v=t.high&65535,E=t.low>>>16,C=t.low&65535,S=0,I=0,z=0,P=0;return P+=a*C,z+=P>>>16,P&=65535,z+=l*C,I+=z>>>16,z&=65535,z+=a*E,I+=z>>>16,z&=65535,I+=p*C,S+=I>>>16,I&=65535,I+=l*E,S+=I>>>16,I&=65535,I+=a*v,S+=I>>>16,I&=65535,S+=o*C+p*E+l*v+a*d,S&=65535,e.fromBits(z<<16|P,S<<16|I,this.unsigned)},e.prototype.mul=function(t){return this.multiply(t)},e.prototype.negate=function(){return!this.unsigned&&this.eq(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=function(){return this.negate()},e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.notEquals=function(t){return!this.equals(t)},e.prototype.neq=function(t){return this.notEquals(t)},e.prototype.ne=function(t){return this.notEquals(t)},e.prototype.or=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low|t.low,this.high|t.high,this.unsigned)},e.prototype.shiftLeft=function(t){return e.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?e.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):e.fromBits(0,this.low<<t-32,this.unsigned)},e.prototype.shl=function(t){return this.shiftLeft(t)},e.prototype.shiftRight=function(t){return e.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?e.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):e.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=function(t){return this.shiftRight(t)},e.prototype.shiftRightUnsigned=function(t){if(e.isLong(t)&&(t=t.toInt()),t&=63,t===0)return this;var r=this.high;if(t<32){var o=this.low;return e.fromBits(o>>>t|r<<32-t,r>>>t,this.unsigned)}else return t===32?e.fromBits(r,0,this.unsigned):e.fromBits(r>>>t-32,0,this.unsigned)},e.prototype.shr_u=function(t){return this.shiftRightUnsigned(t)},e.prototype.shru=function(t){return this.shiftRightUnsigned(t)},e.prototype.subtract=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.add(t.neg())},e.prototype.sub=function(t){return this.subtract(t)},e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*_e+(this.low>>>0):this.high*_e+(this.low>>>0)},e.prototype.toBigInt=function(){return BigInt(this.toString())},e.prototype.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},e.prototype.toBytesLE=function(){var t=this.high,r=this.low;return[r&255,r>>>8&255,r>>>16&255,r>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]},e.prototype.toBytesBE=function(){var t=this.high,r=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,r>>>24,r>>>16&255,r>>>8&255,r&255]},e.prototype.toSigned=function(){return this.unsigned?e.fromBits(this.low,this.high,!1):this},e.prototype.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(e.MIN_VALUE)){var r=e.fromNumber(t),o=this.div(r),p=o.mul(r).sub(this);return o.toString(t)+p.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var l=e.fromNumber(Math.pow(t,6),this.unsigned),a=this,d="";;){var v=a.div(l),E=a.sub(v.mul(l)).toInt()>>>0,C=E.toString(t);if(a=v,a.isZero())return C+d;for(;C.length<6;)C="0"+C;d=""+C+d}},e.prototype.toUnsigned=function(){return this.unsigned?this:e.fromBits(this.low,this.high,!0)},e.prototype.xor=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low^t.low,this.high^t.high,this.unsigned)},e.prototype.eqz=function(){return this.isZero()},e.prototype.le=function(t){return this.lessThanOrEqual(t)},e.prototype.toExtendedJSON=function(t){return t&&t.relaxed?this.toNumber():{$numberLong:this.toString()}},e.fromExtendedJSON=function(t,r){var o=e.fromString(t.$numberLong);return r&&r.relaxed?o.toNumber():o},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},e.TWO_PWR_24=e.fromInt(ji),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e}();Object.defineProperty(D.prototype,"__isLong__",{value:!0});Object.defineProperty(D.prototype,"_bsontype",{value:"Long"});var $i=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,ki=/^(\+|-)?(Infinity|inf)$/i,Hi=/^(\+|-)?NaN$/i,Ce=6111,gr=-6176,xn=6176,zi=34,yr=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),En=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Sn=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Wi=/^([-+])?(\d+)?$/,Yi=31,Cn=16383,Ji=30,qi=31;function In(e){return!isNaN(parseInt(e,10))}function Zi(e){var t=D.fromNumber(1e9),r=D.fromNumber(0);if(!e.parts[0]&&!e.parts[1]&&!e.parts[2]&&!e.parts[3])return{quotient:e,rem:r};for(var o=0;o<=3;o++)r=r.shiftLeft(32),r=r.add(new D(e.parts[o],0)),e.parts[o]=r.div(t).low,r=r.modulo(t);return{quotient:e,rem:r}}function Gi(e,t){if(!e&&!t)return{high:D.fromNumber(0),low:D.fromNumber(0)};var r=e.shiftRightUnsigned(32),o=new D(e.getLowBits(),0),p=t.shiftRightUnsigned(32),l=new D(t.getLowBits(),0),a=r.multiply(p),d=r.multiply(l),v=o.multiply(p),E=o.multiply(l);return a=a.add(d.shiftRightUnsigned(32)),d=new D(d.getLowBits(),0).add(v).add(E.shiftRightUnsigned(32)),a=a.add(d.shiftRightUnsigned(32)),E=d.shiftLeft(32).add(new D(E.getLowBits(),0)),{high:a,low:E}}function Xi(e,t){var r=e.high>>>0,o=t.high>>>0;if(r<o)return!0;if(r===o){var p=e.low>>>0,l=t.low>>>0;if(p<l)return!0}return!1}function we(e,t){throw new ot('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var xr=function(){function e(t){if(!(this instanceof e))return new e(t);if(typeof t=="string")this.bytes=e.fromString(t).bytes;else if(br(t)){if(t.byteLength!==16)throw new ot("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}else throw new ot("Decimal128 must take a Buffer or string")}return e.fromString=function(t){var r=!1,o=!1,p=!1,l=0,a=0,d=0,v=0,E=0,C=[0],S=0,I=0,z=0,P=0,Y=0,k=0,et=new D(0,0),X=new D(0,0),K=0,T=0;if(t.length>=7e3)throw new ot(""+t+" not a valid Decimal128 string");var it=t.match($i),ut=t.match(ki),bt=t.match(Hi);if(!it&&!ut&&!bt||t.length===0)throw new ot(""+t+" not a valid Decimal128 string");if(it){var Xt=it[2],Rt=it[4],Kt=it[5],kt=it[6];Rt&&kt===void 0&&we(t,"missing exponent power"),Rt&&Xt===void 0&&we(t,"missing exponent base"),Rt===void 0&&(Kt||kt)&&we(t,"missing e before exponent")}if((t[T]==="+"||t[T]==="-")&&(r=t[T++]==="-"),!In(t[T])&&t[T]!=="."){if(t[T]==="i"||t[T]==="I")return new e(G.from(r?En:Sn));if(t[T]==="N")return new e(G.from(yr))}for(;In(t[T])||t[T]===".";){if(t[T]==="."){o&&we(t,"contains multiple periods"),o=!0,T=T+1;continue}S<34&&(t[T]!=="0"||p)&&(p||(E=a),p=!0,C[I++]=parseInt(t[T],10),S=S+1),p&&(d=d+1),o&&(v=v+1),a=a+1,T=T+1}if(o&&!a)throw new ot(""+t+" not a valid Decimal128 string");if(t[T]==="e"||t[T]==="E"){var wt=t.substr(++T).match(Wi);if(!wt||!wt[2])return new e(G.from(yr));Y=parseInt(wt[0],10),T=T+wt[0].length}if(t[T])return new e(G.from(yr));if(z=0,!S)z=0,P=0,C[0]=0,d=1,S=1,l=0;else if(P=S-1,l=d,l!==1)for(;C[E+l-1]===0;)l=l-1;for(Y<=v&&v-Y>16384?Y=gr:Y=Y-v;Y>Ce;){if(P=P+1,P-z>zi){var xt=C.join("");if(xt.match(/^0+$/)){Y=Ce;break}we(t,"overflow")}Y=Y-1}for(;Y<gr||S<d;){if(P===0&&l<S){Y=gr,l=0;break}if(S<d?d=d-1:P=P-1,Y<Ce)Y=Y+1;else{var xt=C.join("");if(xt.match(/^0+$/)){Y=Ce;break}we(t,"overflow")}}if(P-z+1<l){var pt=a;o&&(E=E+1,pt=pt+1),r&&(E=E+1,pt=pt+1);var Et=parseInt(t[E+P+1],10),g=0;if(Et>=5&&(g=1,Et===5)){for(g=C[P]%2===1?1:0,k=E+P+2;k<pt;k++)if(parseInt(t[k],10)){g=1;break}}if(g){for(var m=P;m>=0;m--)if(++C[m]>9&&(C[m]=0,m===0))if(Y<Ce)Y=Y+1,C[m]=1;else return new e(G.from(r?En:Sn))}}if(et=D.fromNumber(0),X=D.fromNumber(0),l===0)et=D.fromNumber(0),X=D.fromNumber(0);else if(P-z<17){var m=z;for(X=D.fromNumber(C[m++]),et=new D(0,0);m<=P;m++)X=X.multiply(D.fromNumber(10)),X=X.add(D.fromNumber(C[m]))}else{var m=z;for(et=D.fromNumber(C[m++]);m<=P-17;m++)et=et.multiply(D.fromNumber(10)),et=et.add(D.fromNumber(C[m]));for(X=D.fromNumber(C[m++]);m<=P;m++)X=X.multiply(D.fromNumber(10)),X=X.add(D.fromNumber(C[m]))}var b=Gi(et,D.fromString("100000000000000000"));b.low=b.low.add(X),Xi(b.low,X)&&(b.high=b.high.add(D.fromNumber(1))),K=Y+xn;var w={low:D.fromNumber(0),high:D.fromNumber(0)};b.high.shiftRightUnsigned(49).and(D.fromNumber(1)).equals(D.fromNumber(1))?(w.high=w.high.or(D.fromNumber(3).shiftLeft(61)),w.high=w.high.or(D.fromNumber(K).and(D.fromNumber(16383).shiftLeft(47))),w.high=w.high.or(b.high.and(D.fromNumber(0x7fffffffffff)))):(w.high=w.high.or(D.fromNumber(K&16383).shiftLeft(49)),w.high=w.high.or(b.high.and(D.fromNumber(562949953421311)))),w.low=b.low,r&&(w.high=w.high.or(D.fromString("9223372036854775808")));var f=G.alloc(16);return T=0,f[T++]=w.low.low&255,f[T++]=w.low.low>>8&255,f[T++]=w.low.low>>16&255,f[T++]=w.low.low>>24&255,f[T++]=w.low.high&255,f[T++]=w.low.high>>8&255,f[T++]=w.low.high>>16&255,f[T++]=w.low.high>>24&255,f[T++]=w.high.low&255,f[T++]=w.high.low>>8&255,f[T++]=w.high.low>>16&255,f[T++]=w.high.low>>24&255,f[T++]=w.high.high&255,f[T++]=w.high.high>>8&255,f[T++]=w.high.high>>16&255,f[T++]=w.high.high>>24&255,new e(f)},e.prototype.toString=function(){for(var t,r=0,o=new Array(36),p=0;p<o.length;p++)o[p]=0;var l=0,a=!1,d,v={parts:[0,0,0,0]},E,C,S=[];l=0;var I=this.bytes,z=I[l++]|I[l++]<<8|I[l++]<<16|I[l++]<<24,P=I[l++]|I[l++]<<8|I[l++]<<16|I[l++]<<24,Y=I[l++]|I[l++]<<8|I[l++]<<16|I[l++]<<24,k=I[l++]|I[l++]<<8|I[l++]<<16|I[l++]<<24;l=0;var et={low:new D(z,P),high:new D(Y,k)};et.high.lessThan(D.ZERO)&&S.push("-");var X=k>>26&Yi;if(X>>3===3){if(X===Ji)return S.join("")+"Infinity";if(X===qi)return"NaN";t=k>>15&Cn,d=8+(k>>14&1)}else d=k>>14&7,t=k>>17&Cn;var K=t-xn;if(v.parts[0]=(k&16383)+((d&15)<<14),v.parts[1]=Y,v.parts[2]=P,v.parts[3]=z,v.parts[0]===0&&v.parts[1]===0&&v.parts[2]===0&&v.parts[3]===0)a=!0;else for(C=3;C>=0;C--){var T=0,it=Zi(v);if(v=it.quotient,T=it.rem.low,!!T)for(E=8;E>=0;E--)o[C*9+E]=T%10,T=Math.floor(T/10)}if(a)r=1,o[l]=0;else for(r=36;!o[l];)r=r-1,l=l+1;var ut=r-1+K;if(ut>=34||ut<=-7||K>0){if(r>34)return S.push("".concat(0)),K>0?S.push("E+".concat(K)):K<0&&S.push("E".concat(K)),S.join("");S.push("".concat(o[l++])),r=r-1,r&&S.push(".");for(var p=0;p<r;p++)S.push("".concat(o[l++]));S.push("E"),ut>0?S.push("+".concat(ut)):S.push("".concat(ut))}else if(K>=0)for(var p=0;p<r;p++)S.push("".concat(o[l++]));else{var bt=r+K;if(bt>0)for(var p=0;p<bt;p++)S.push("".concat(o[l++]));else S.push("0");for(S.push(".");bt++<0;)S.push("0");for(var p=0;p<r-Math.max(bt-1,0);p++)S.push("".concat(o[l++]))}return S.join("")},e.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},e.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},e.fromExtendedJSON=function(t){return e.fromString(t.$numberDecimal)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},e}();Object.defineProperty(xr.prototype,"_bsontype",{value:"Decimal128"});var Ze=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toJSON=function(){return this.value},e.prototype.toString=function(t){return this.value.toString(t)},e.prototype.toExtendedJSON=function(t){return t&&(t.legacy||t.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}},e.fromExtendedJSON=function(t,r){var o=parseFloat(t.$numberDouble);return r&&r.relaxed?o:new e(o)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.toExtendedJSON();return"new Double(".concat(t.$numberDouble,")")},e}();Object.defineProperty(Ze.prototype,"_bsontype",{value:"Double"});var Ge=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t|0}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(t){return this.value.toString(t)},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(t){return t&&(t.relaxed||t.legacy)?this.value:{$numberInt:this.value.toString()}},e.fromExtendedJSON=function(t,r){return r&&r.relaxed?parseInt(t.$numberInt,10):new e(t.$numberInt)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},e}();Object.defineProperty(Ge.prototype,"_bsontype",{value:"Int32"});var Er=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$maxKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MaxKey()"},e}();Object.defineProperty(Er.prototype,"_bsontype",{value:"MaxKey"});var Sr=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$minKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MinKey()"},e}();Object.defineProperty(Sr.prototype,"_bsontype",{value:"MinKey"});var Ki=new RegExp("^[0-9a-fA-F]{24}$"),ae=null,jt=Symbol("id"),ft=function(){function e(t){if(!(this instanceof e))return new e(t);var r;if(typeof t=="object"&&t&&"id"in t){if(typeof t.id!="string"&&!ArrayBuffer.isView(t.id))throw new ot("Argument passed in must have an id that is of type string or Buffer");"toHexString"in t&&typeof t.toHexString=="function"?r=G.from(t.toHexString(),"hex"):r=t.id}else r=t;if(r==null||typeof r=="number")this[jt]=e.generate(typeof r=="number"?r:void 0);else if(ArrayBuffer.isView(r)&&r.byteLength===12)this[jt]=r instanceof G?r:ze(r);else if(typeof r=="string")if(r.length===12){var o=G.from(r);if(o.byteLength===12)this[jt]=o;else throw new ot("Argument passed in must be a string of 12 bytes")}else if(r.length===24&&Ki.test(r))this[jt]=G.from(r,"hex");else throw new ot("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new ot("Argument passed in does not match the accepted types");e.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(e.prototype,"id",{get:function(){return this[jt]},set:function(t){this[jt]=t,e.cacheHexString&&(this.__id=t.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(t){this.id.writeUInt32BE(t,0)},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(){if(e.cacheHexString&&this.__id)return this.__id;var t=this.id.toString("hex");return e.cacheHexString&&!this.__id&&(this.__id=t),t},e.getInc=function(){return e.index=(e.index+1)%16777215},e.generate=function(t){typeof t!="number"&&(t=Math.floor(Date.now()/1e3));var r=e.getInc(),o=G.alloc(12);return o.writeUInt32BE(t,0),ae===null&&(ae=Dn(5)),o[4]=ae[0],o[5]=ae[1],o[6]=ae[2],o[7]=ae[3],o[8]=ae[4],o[11]=r&255,o[10]=r>>8&255,o[9]=r>>16&255,o},e.prototype.toString=function(t){return t?this.id.toString(t):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(t){if(t==null)return!1;if(t instanceof e)return this[jt][11]===t[jt][11]&&this[jt].equals(t[jt]);if(typeof t=="string"&&e.isValid(t)&&t.length===12&&br(this.id))return t===G.prototype.toString.call(this.id,"latin1");if(typeof t=="string"&&e.isValid(t)&&t.length===24)return t.toLowerCase()===this.toHexString();if(typeof t=="string"&&e.isValid(t)&&t.length===12)return G.from(t).equals(this.id);if(typeof t=="object"&&"toHexString"in t&&typeof t.toHexString=="function"){var r=t.toHexString(),o=this.toHexString().toLowerCase();return typeof r=="string"&&r.toLowerCase()===o}return!1},e.prototype.getTimestamp=function(){var t=new Date,r=this.id.readUInt32BE(0);return t.setTime(Math.floor(r)*1e3),t},e.createPk=function(){return new e},e.createFromTime=function(t){var r=G.from([0,0,0,0,0,0,0,0,0,0,0,0]);return r.writeUInt32BE(t,0),new e(r)},e.createFromHexString=function(t){if(typeof t>"u"||t!=null&&t.length!==24)throw new ot("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(G.from(t,"hex"))},e.isValid=function(t){if(t==null)return!1;try{return new e(t),!0}catch{return!1}},e.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},e.fromExtendedJSON=function(t){return new e(t.$oid)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},e.index=Math.floor(Math.random()*16777215),e}();Object.defineProperty(ft.prototype,"generate",{value:Je(function(e){return ft.generate(e)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(ft.prototype,"getInc",{value:Je(function(){return ft.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(ft.prototype,"get_inc",{value:Je(function(){return ft.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(ft,"get_inc",{value:Je(function(){return ft.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(ft.prototype,"_bsontype",{value:"ObjectID"});function Qi(e){return e.split("").sort().join("")}var Ne=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);if(this.pattern=t,this.options=Qi(r??""),this.pattern.indexOf("\0")!==-1)throw new ce("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new ce("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var o=0;o<this.options.length;o++)if(!(this.options[o]==="i"||this.options[o]==="m"||this.options[o]==="x"||this.options[o]==="l"||this.options[o]==="s"||this.options[o]==="u"))throw new ce("The regular expression option [".concat(this.options[o],"] is not supported"))}return e.parseOptions=function(t){return t?t.split("").sort().join(""):""},e.prototype.toExtendedJSON=function(t){return t=t||{},t.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},e.fromExtendedJSON=function(t){if("$regex"in t)if(typeof t.$regex!="string"){if(t.$regex._bsontype==="BSONRegExp")return t}else return new e(t.$regex,e.parseOptions(t.$options));if("$regularExpression"in t)return new e(t.$regularExpression.pattern,e.parseOptions(t.$regularExpression.options));throw new ot("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(Ne.prototype,"_bsontype",{value:"BSONRegExp"});var Cr=function(){function e(t){if(!(this instanceof e))return new e(t);this.value=t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(){return this.value},e.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(){return{$symbol:this.value}},e.fromExtendedJSON=function(t){return new e(t.$symbol)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e}();Object.defineProperty(Cr.prototype,"_bsontype",{value:"Symbol"});var to=D,Pn=function(e){Ye(t,e);function t(r,o){var p=this;return p instanceof t?(D.isLong(r)?p=e.call(this,r.low,r.high,!0)||this:Oe(r)&&typeof r.t<"u"&&typeof r.i<"u"?p=e.call(this,r.i,r.t,!0)||this:p=e.call(this,r,o,!0)||this,Object.defineProperty(p,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),p):new t(r,o)}return t.prototype.toJSON=function(){return{$timestamp:this.toString()}},t.fromInt=function(r){return new t(D.fromInt(r,!0))},t.fromNumber=function(r){return new t(D.fromNumber(r,!0))},t.fromBits=function(r,o){return new t(r,o)},t.fromString=function(r,o){return new t(D.fromString(r,!0,o))},t.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},t.fromExtendedJSON=function(r){return new t(r.$timestamp)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},t.MAX_VALUE=D.MAX_UNSIGNED_VALUE,t}(to);function eo(e){return Oe(e)&&Reflect.has(e,"_bsontype")&&typeof e._bsontype=="string"}var Vn=2147483647,Un=-2147483648,jn=9223372036854776e3,$n=-9223372036854776e3,ro={$oid:ft,$binary:le,$uuid:le,$symbol:Cr,$numberInt:Ge,$numberDecimal:xr,$numberDouble:Ze,$numberLong:D,$minKey:Sr,$maxKey:Er,$regex:Ne,$regularExpression:Ne,$timestamp:Pn};function kn(e,t){if(t===void 0&&(t={}),typeof e=="number"){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=Un&&e<=Vn)return new Ge(e);if(e>=$n&&e<=jn)return D.fromNumber(e)}return new Ze(e)}if(e==null||typeof e!="object")return e;if(e.$undefined)return null;for(var r=Object.keys(e).filter(function(S){return S.startsWith("$")&&e[S]!=null}),o=0;o<r.length;o++){var p=ro[r[o]];if(p)return p.fromExtendedJSON(e,t)}if(e.$date!=null){var l=e.$date,a=new Date;return t.legacy?typeof l=="number"?a.setTime(l):typeof l=="string"&&a.setTime(Date.parse(l)):typeof l=="string"?a.setTime(Date.parse(l)):D.isLong(l)?a.setTime(l.toNumber()):typeof l=="number"&&t.relaxed&&a.setTime(l),a}if(e.$code!=null){var d=Object.assign({},e);return e.$scope&&(d.$scope=kn(e.$scope)),qe.fromExtendedJSON(e)}if(Ui(e)||e.$dbPointer){var v=e.$ref?e:e.$dbPointer;if(v instanceof Ie)return v;var E=Object.keys(v).filter(function(S){return S.startsWith("$")}),C=!0;if(E.forEach(function(S){["$ref","$id","$db"].indexOf(S)===-1&&(C=!1)}),C)return Ie.fromExtendedJSON(v)}return e}function no(e,t){return e.map(function(r,o){t.seenObjects.push({propertyName:"index ".concat(o),obj:null});try{return te(r,t)}finally{t.seenObjects.pop()}})}function Nn(e){var t=e.toISOString();return e.getUTCMilliseconds()!==0?t:t.slice(0,-5)+"Z"}function te(e,t){if((typeof e=="object"||typeof e=="function")&&e!==null){var r=t.seenObjects.findIndex(function(et){return et.obj===e});if(r!==-1){var o=t.seenObjects.map(function(et){return et.propertyName}),p=o.slice(0,r).map(function(et){return"".concat(et," -> ")}).join(""),l=o[r],a=" -> "+o.slice(r+1,o.length-1).map(function(et){return"".concat(et," -> ")}).join(""),d=o[o.length-1],v=" ".repeat(p.length+l.length/2),E="-".repeat(a.length+(l.length+d.length)/2-1);throw new ot(`Converting circular structure to EJSON:
16
16
  `+" ".concat(p).concat(l).concat(a).concat(d,`
17
- `)+" ".concat(v,"\\").concat(E,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return no(e,t);if(e===void 0)return null;if(e instanceof Date||Fi(e)){var C=e.getTime(),S=C>-1&&C<2534023188e5;return t.legacy?t.relaxed&&S?{$date:e.getTime()}:{$date:Nn(e)}:t.relaxed&&S?{$date:Nn(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(typeof e=="number"&&(!t.relaxed||!isFinite(e))){if(Math.floor(e)===e){var I=e>=Un&&e<=Vn,z=e>=$n&&e<=jn;if(I)return{$numberInt:e.toString()};if(z)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||Ri(e)){var P=e.flags;if(P===void 0){var Y=e.toString().match(/[gimuy]*$/);Y&&(P=Y[0])}var k=new Ne(e.source,P);return k.toExtendedJSON(t)}return e!=null&&typeof e=="object"?oo(e,t):e}var io={Binary:function(e){return new le(e.value(),e.sub_type)},Code:function(e){return new qe(e.code,e.scope)},DBRef:function(e){return new Ie(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new xr(e.bytes)},Double:function(e){return new Ze(e.value)},Int32:function(e){return new Ge(e.value)},Long:function(e){return D.fromBits(e.low!=null?e.low:e.low_,e.low!=null?e.high:e.high_,e.low!=null?e.unsigned:e.unsigned_)},MaxKey:function(){return new Er},MinKey:function(){return new Sr},ObjectID:function(e){return new ft(e)},ObjectId:function(e){return new ft(e)},BSONRegExp:function(e){return new Ne(e.pattern,e.options)},Symbol:function(e){return new Cr(e.value)},Timestamp:function(e){return Pn.fromBits(e.low,e.high)}};function oo(e,t){if(e==null||typeof e!="object")throw new ce("not an object instance");var r=e._bsontype;if(typeof r>"u"){var o={};for(var p in e){t.seenObjects.push({propertyName:p,obj:null});try{var l=te(e[p],t);p==="__proto__"?Object.defineProperty(o,p,{value:l,writable:!0,enumerable:!0,configurable:!0}):o[p]=l}finally{t.seenObjects.pop()}}return o}else if(eo(e)){var a=e;if(typeof a.toExtendedJSON!="function"){var d=io[e._bsontype];if(!d)throw new ot("Unrecognized or invalid _bsontype: "+e._bsontype);a=d(a)}return r==="Code"&&a.scope?a=new qe(a.code,te(a.scope,t)):r==="DBRef"&&a.oid&&(a=new Ie(te(a.collection,t),te(a.oid,t),te(a.db,t),te(a.fields,t))),a.toExtendedJSON(t)}else throw new ce("_bsontype must be a string, but was: "+typeof r)}var On;(function(e){function t(l,a){var d=Object.assign({},{relaxed:!0,legacy:!1},a);return typeof d.relaxed=="boolean"&&(d.strict=!d.relaxed),typeof d.strict=="boolean"&&(d.relaxed=!d.strict),JSON.parse(l,function(v,E){if(v.indexOf("\0")!==-1)throw new ce("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(v)));return kn(E,d)})}e.parse=t;function r(l,a,d,v){d!=null&&typeof d=="object"&&(v=d,d=0),a!=null&&typeof a=="object"&&!Array.isArray(a)&&(v=a,a=void 0,d=0);var E=Object.assign({relaxed:!0,legacy:!1},v,{seenObjects:[{propertyName:"(root)",obj:null}]}),C=te(l,E);return JSON.stringify(C,a,d)}e.stringify=r;function o(l,a){return a=a||{},JSON.parse(r(l,a))}e.serialize=o;function p(l,a){return a=a||{},t(JSON.stringify(l),a)}e.deserialize=p})(On||(On={}));var Tn,Bn=Mn();Bn.Map?Tn=Bn.Map:Tn=function(){function e(t){t===void 0&&(t=[]),this._keys=[],this._values={};for(var r=0;r<t.length;r++)if(t[r]!=null){var o=t[r],p=o[0],l=o[1];this._keys.push(p),this._values[p]={v:l,i:this._keys.length-1}}}return e.prototype.clear=function(){this._keys=[],this._values={}},e.prototype.delete=function(t){var r=this._values[t];return r==null?!1:(delete this._values[t],this._keys.splice(r.i,1),!0)},e.prototype.entries=function(){var t=this,r=0;return{next:function(){var o=t._keys[r++];return{value:o!==void 0?[o,t._values[o].v]:void 0,done:o===void 0}}}},e.prototype.forEach=function(t,r){r=r||this;for(var o=0;o<this._keys.length;o++){var p=this._keys[o];t.call(r,this._values[p].v,p,r)}},e.prototype.get=function(t){return this._values[t]?this._values[t].v:void 0},e.prototype.has=function(t){return this._values[t]!=null},e.prototype.keys=function(){var t=this,r=0;return{next:function(){var o=t._keys[r++];return{value:o!==void 0?o:void 0,done:o===void 0}}}},e.prototype.set=function(t,r){return this._values[t]?(this._values[t].v=r,this):(this._keys.push(t),this._values[t]={v:r,i:this._keys.length-1},this)},e.prototype.values=function(){var t=this,r=0;return{next:function(){var o=t._keys[r++];return{value:o!==void 0?t._values[o].v:void 0,done:o===void 0}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e}();var Hs=D.fromNumber(Pi),zs=D.fromNumber(Vi);var vr=new Uint8Array(8),Ws=new DataView(vr.buffer,vr.byteOffset,vr.byteLength);var so=1024*1024*17,Ys=G.alloc(so);var Xe=class{triggerID;nudgeID;engagementID;contentID;shortID;contentType;variation;props;objective;onsiteDeliveryType;holdout;constructor(t){t=t||{},this.triggerID=t.id||t.triggerID,this.nudgeID=t.nudgeID,this.shortID=t.shortID,this.contentType=t.contentType,this.engagementID=t.engagementID,this.contentID=t.contentID,this.variation=t.variation,this.props=t.props,this.objective=t.objective,this.onsiteDeliveryType=t.onsiteDeliveryType,this.holdout=t.holdout}};var be=class{constructor(t,r={},o,p){this.name=t;this.properties=r;this.id=p?new ft(p):new ft,this.occurred=new Date,o&&(this.trigger=new Xe(o)),this.newEvent=!p}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale};var ao=["videoEl"],ee=class e extends Qt{videoElements;videos;videoConfig;dialogRef=null;dialog=ue(on);isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";engagementTriggerReceived(t){this.videoConfig=t.content?.videoConfig,this.videos=this.videoConfig.videos}onMuteToggled(t,r){t||this.videoElements.forEach(o=>{o.nativeElement!==r&&(o.nativeElement.muted=!0,o.nativeElement.pause())})}sendTriggerClicked(t,r){let o=new be(Gt.EVENT_TRIGGER_CLICKED,{},this.triggerContext?.triggerData);o.videos=[t.id],r&&(o.items=[r]),this.sendEventToRenderer(o)}onVideoTap(t,r,o,p){t?.stopPropagation(),t?.preventDefault();let l=r.items?.[0];if(this.sendTriggerClicked(r,l?.toEmbed()),this.videoConfig.footerContent==="NONE"){p&&(p.muted=!1,p.play(),this.onMuteToggled(!1,p));return}Xr().then(()=>this.openDialog(r,o))}async performCTA(t){let r,o=this.triggerContext;if(t.cta===ie.ADD_TO_CART)r=Gt.EVENT_ADD_TO_CART_CLICKED;else if(t.cta===ie.GO_TO_PRODUCT)r=Gt.EVENT_VIEW_ITEM_CLICKED;else if(t.cta===ie.OPEN_CART)r=Gt.EVENT_OPEN_CART_CLICKED,o.triggerData.redirectBehaviour=Qr.CART_DRAWER;else{vt.warn(`Unsupported CTA type: ${t.cta}`);return}let p={at:t.cta},l={videoID:t.video.id};this.sendEvent(r,{current:l},t.video,t.item),this.executeCTAViaRenderer({clickAction:p,embeddedItem:t.item.toEmbed()})}sendEvent(t,r,o,p){let l=new be(t,r,this.engagementTrigger);o&&(l.videos=[o.id]),p&&(l.items=[p.toEmbed()]),this.sendEventToRenderer(l)}onDialogClosed(){}async openDialog(t,r){let o={videos:this.videos,currentIndex:r,triggerContext:this.triggerContext,onCTAPerformed:a=>this.performCTA(a)};this.dialogRef&&this.dialogRef.close();let p=await import("./chunk-2PZEVGOB.js");this.dialogRef=this.dialog.open(p.VideoDetailDialogComponent,{width:"100vw",height:"100vh",data:o});let l={videoID:t.id,videoIndex:r};this.sendEvent(Gt.EVENT_VIDEO_DIALOG_OPENED,{current:l},t),this.dialogRef.closed.subscribe(a=>{if(this.dialogRef=null,!a)return;let d=a.lastVideoDuration*1e3,v={videoID:a.lastVideo.id,videoIndex:a.lastVideoIndex,playedTillMS:d,playedTillPercent:d/a.lastVideo.durationMS},E=new be(Gt.EVENT_VIDEO_DIALOG_CLOSED,{current:v},this.triggerContext?.triggerData);E.videos=[a.lastVideo.id],this.sendEventToRenderer(E),this.onDialogClosed()})}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Ar(e)))(o||e)}})();static \u0275cmp=ht({type:e,selectors:[["cooee-abstract-video"]],viewQuery:function(r,o){if(r&1&&Ae(ao,5),r&2){let p;Me(p=De())&&(o.videoElements=p)}},features:[dt],decls:0,vars:0,template:function(r,o){},encapsulation:2})};var co=(e,t)=>t.id,lo=(e,t)=>t.url;function fo(e,t){if(e&1&&(re(0,"div",1),Ut(1,"safeHtml")),e&2){let r=Z();yt("innerHTML",Zt(1,1,r.videoConfig.heading),Bt)}}function uo(e,t){if(e&1&&re(0,"source",7),e&2){let r=t.$implicit;yt("type",he(r.mimeType))("src",r.url,Wt)}}function po(e,t){if(e&1){let r=Yt();rt(0,"cooee-mute-toggle",12),Mt("toggled",function(p){at(r),Z();let l=Jt(5),a=Z();return ct(a.onMuteToggled(p,l))}),nt()}if(e&2){Z();let r=Jt(5);yt("muted",r.muted)("videoEl",r)}}function ho(e,t){if(e&1){let r=Yt();rt(0,"cooee-item-card",13),Mt("buttonClick",function(){at(r);let p=Z(),l=p.$implicit,a=p.$index,d=Jt(5),v=Z();return ct(v.addToCartClicked(null,l,a,d))}),nt()}if(e&2){Z();let r=qt(0);yt("item",r)}}function mo(e,t){if(e&1){let r=Yt();rt(0,"cooee-video-card",14),Mt("linkClicked",function(){at(r);let p=Z().$implicit,l=Z();return ct(l.sendTriggerClicked(p))}),nt()}if(e&2){Z();let r=qt(1);yt("card",r)}}function go(e,t){if(e&1){let r=Yt();Se(0)(1),rt(2,"div",4)(3,"div",5),Mt("click",function(p){let l=at(r),a=l.$implicit,d=l.$index,v=Jt(5),E=Z();return ct(E.onVideoTap(p,a,d,v))})("keydown.enter",function(p){let l=at(r),a=l.$implicit,d=l.$index,v=Jt(5),E=Z();return ct(E.onVideoTap(p,a,d,v))})("keydown.space",function(p){let l=at(r),a=l.$implicit,d=l.$index,v=Jt(5),E=Z();return ct(E.onVideoTap(p,a,d,v))}),rt(4,"video",6,0),Mt("mouseenter",function(){at(r);let p=Jt(5);Z();let l=qt(1);return ct(l&&p.play())})("mouseleave",function(){at(r);let p=Jt(5);Z();let l=qt(1);return ct(l&&p.pause())}),Ct(6,uo,1,3,"source",7,lo),nt(),rt(8,"div",8),mt(9,po,1,2,"cooee-mute-toggle",9),nt(),mt(10,ho,1,1,"cooee-item-card",10)(11,mo,1,1,"cooee-video-card",11),nt()()}if(e&2){let r=t.$implicit,o=Z(),p=qt(0),l=ne(r.items[0]);J();let a=ne(r.card),d=l&&o.videoConfig.footerContent==o.VideoConfigFooterContent.FIRST_ITEM,v=a&&o.videoConfig.footerContent==o.VideoConfigFooterContent.CARD;J(3),yt("poster",r.thumbnail,Wt)("muted",!0),Be("autoplay",p||null),J(2),It(r.sources),J(3),gt(o.videoConfig.showMuteButton?9:-1),J(),gt(d?10:v?11:-1)}}var Ke=class e extends ee{VideoConfigFooterContent=sr;VideoConfigAutoPlay=nn;swiperOptions;constructor(){super(),this.hasSwiper=!0,this.swiperOptions={direction:"horizontal",effect:"slide",slidesPerView:"auto",spaceBetween:24,mousewheel:{enabled:!0,forceToAxis:!0},navigation:{enabled:!1},freeMode:!0}}ngAfterViewInit(){this.playFirstVideo()}addToCartClicked(t,r,o,p){let l=r.items?.[0],a=Gr.get().website?.canChangeVariantInCart;if(r.items?.length>1||l?.hasVariants()&&!a){this.onVideoTap(t,r,o,p);return}this.performCTA({cta:ie.ADD_TO_CART,item:l,video:r})}goToPDP(t,r){t?.stopPropagation(),t?.preventDefault();let o=r.items?.[0];this.performCTA({cta:ie.GO_TO_PRODUCT,item:o,video:r})}update(){}playFirstVideo(){this.videoConfig.autoPlay==="ON_HOVER"&&this.isMobile&&this.videoElements.first?.nativeElement.play()}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=ht({type:e,selectors:[["cooee-video-playlist"]],features:[dt],decls:7,vars:4,consts:[["videoEl",""],[1,"heading-text",3,"innerHTML"],[3,"options"],["ngProjectAs","swiper-slides",5,["swiper-slides"]],[1,"swiper-slide","video-card"],["role","button","tabindex","0","aria-label","Play video","aria-haspopup","dialog",1,"video-wrapper",3,"click","keydown.enter","keydown.space"],["width","100%","playsinline","","loop","","preload","metadata",3,"mouseenter","mouseleave","poster","muted"],[3,"src","type"],[1,"video-controls"],[3,"muted","videoEl"],[3,"item"],[3,"card"],[3,"toggled","muted","videoEl"],[3,"buttonClick","item"],[3,"linkClicked","card"]],template:function(r,o){r&1&&(Se(0)(1),mt(2,fo,2,3,"div",1),rt(3,"cooee-swiper",2),Ur(4,3),Ct(5,go,12,7,"div",4,co),jr(),nt()),r&2&&(ne(!o.videoConfig.autoPlay||o.videoConfig.autoPlay===o.VideoConfigAutoPlay.ON),J(),ne(o.videoConfig.autoPlay===o.VideoConfigAutoPlay.ON_HOVER),J(),gt(o.videoConfig.heading?2:-1),J(),yt("options",o.swiperOptions),J(2),It(o.videos))},dependencies:[cn,an,sn,ln,me],styles:[`:host{display:block}.heading-text{margin-bottom:.5rem;font-size:1.125rem;text-align:center;font-weight:700}cooee-swiper.swiper{margin:8px;padding-top:25px;padding-bottom:25px}.video-wrapper{position:relative;border-radius:var(--lc-media-radius, 8px)}.video-wrapper video{border-radius:var(--lc-media-radius, 8px)}.video-card{display:flex;flex-direction:column;gap:2.5px;scroll-snap-align:center;min-width:200px;max-width:300px;transition:transform .3s ease}.video-card:hover{transform:scale(1.05)}@media (max-width: 768px),(prefers-reduced-motion: reduce){.video-card{transition:none}.video-card:hover{transform:none}}.video-controls{position:absolute;bottom:8px;z-index:10;right:8px;display:flex;gap:8px}cooee-item-card{padding-left:0!important;padding-right:0!important}cooee-item-card .item-image{width:50px;height:50px;display:none}cooee-item-card .item-info{font-size:14px;line-height:normal}cooee-item-card .item-info .item-name{-webkit-line-clamp:1;overflow:hidden}cooee-item-card .item-info .item-cmp-price{color:rgba(var(--lc-color-text),.75);display:none}
17
+ `)+" ".concat(v,"\\").concat(E,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return no(e,t);if(e===void 0)return null;if(e instanceof Date||Fi(e)){var C=e.getTime(),S=C>-1&&C<2534023188e5;return t.legacy?t.relaxed&&S?{$date:e.getTime()}:{$date:Nn(e)}:t.relaxed&&S?{$date:Nn(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(typeof e=="number"&&(!t.relaxed||!isFinite(e))){if(Math.floor(e)===e){var I=e>=Un&&e<=Vn,z=e>=$n&&e<=jn;if(I)return{$numberInt:e.toString()};if(z)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||Ri(e)){var P=e.flags;if(P===void 0){var Y=e.toString().match(/[gimuy]*$/);Y&&(P=Y[0])}var k=new Ne(e.source,P);return k.toExtendedJSON(t)}return e!=null&&typeof e=="object"?oo(e,t):e}var io={Binary:function(e){return new le(e.value(),e.sub_type)},Code:function(e){return new qe(e.code,e.scope)},DBRef:function(e){return new Ie(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new xr(e.bytes)},Double:function(e){return new Ze(e.value)},Int32:function(e){return new Ge(e.value)},Long:function(e){return D.fromBits(e.low!=null?e.low:e.low_,e.low!=null?e.high:e.high_,e.low!=null?e.unsigned:e.unsigned_)},MaxKey:function(){return new Er},MinKey:function(){return new Sr},ObjectID:function(e){return new ft(e)},ObjectId:function(e){return new ft(e)},BSONRegExp:function(e){return new Ne(e.pattern,e.options)},Symbol:function(e){return new Cr(e.value)},Timestamp:function(e){return Pn.fromBits(e.low,e.high)}};function oo(e,t){if(e==null||typeof e!="object")throw new ce("not an object instance");var r=e._bsontype;if(typeof r>"u"){var o={};for(var p in e){t.seenObjects.push({propertyName:p,obj:null});try{var l=te(e[p],t);p==="__proto__"?Object.defineProperty(o,p,{value:l,writable:!0,enumerable:!0,configurable:!0}):o[p]=l}finally{t.seenObjects.pop()}}return o}else if(eo(e)){var a=e;if(typeof a.toExtendedJSON!="function"){var d=io[e._bsontype];if(!d)throw new ot("Unrecognized or invalid _bsontype: "+e._bsontype);a=d(a)}return r==="Code"&&a.scope?a=new qe(a.code,te(a.scope,t)):r==="DBRef"&&a.oid&&(a=new Ie(te(a.collection,t),te(a.oid,t),te(a.db,t),te(a.fields,t))),a.toExtendedJSON(t)}else throw new ce("_bsontype must be a string, but was: "+typeof r)}var On;(function(e){function t(l,a){var d=Object.assign({},{relaxed:!0,legacy:!1},a);return typeof d.relaxed=="boolean"&&(d.strict=!d.relaxed),typeof d.strict=="boolean"&&(d.relaxed=!d.strict),JSON.parse(l,function(v,E){if(v.indexOf("\0")!==-1)throw new ce("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(v)));return kn(E,d)})}e.parse=t;function r(l,a,d,v){d!=null&&typeof d=="object"&&(v=d,d=0),a!=null&&typeof a=="object"&&!Array.isArray(a)&&(v=a,a=void 0,d=0);var E=Object.assign({relaxed:!0,legacy:!1},v,{seenObjects:[{propertyName:"(root)",obj:null}]}),C=te(l,E);return JSON.stringify(C,a,d)}e.stringify=r;function o(l,a){return a=a||{},JSON.parse(r(l,a))}e.serialize=o;function p(l,a){return a=a||{},t(JSON.stringify(l),a)}e.deserialize=p})(On||(On={}));var Tn,Bn=Mn();Bn.Map?Tn=Bn.Map:Tn=function(){function e(t){t===void 0&&(t=[]),this._keys=[],this._values={};for(var r=0;r<t.length;r++)if(t[r]!=null){var o=t[r],p=o[0],l=o[1];this._keys.push(p),this._values[p]={v:l,i:this._keys.length-1}}}return e.prototype.clear=function(){this._keys=[],this._values={}},e.prototype.delete=function(t){var r=this._values[t];return r==null?!1:(delete this._values[t],this._keys.splice(r.i,1),!0)},e.prototype.entries=function(){var t=this,r=0;return{next:function(){var o=t._keys[r++];return{value:o!==void 0?[o,t._values[o].v]:void 0,done:o===void 0}}}},e.prototype.forEach=function(t,r){r=r||this;for(var o=0;o<this._keys.length;o++){var p=this._keys[o];t.call(r,this._values[p].v,p,r)}},e.prototype.get=function(t){return this._values[t]?this._values[t].v:void 0},e.prototype.has=function(t){return this._values[t]!=null},e.prototype.keys=function(){var t=this,r=0;return{next:function(){var o=t._keys[r++];return{value:o!==void 0?o:void 0,done:o===void 0}}}},e.prototype.set=function(t,r){return this._values[t]?(this._values[t].v=r,this):(this._keys.push(t),this._values[t]={v:r,i:this._keys.length-1},this)},e.prototype.values=function(){var t=this,r=0;return{next:function(){var o=t._keys[r++];return{value:o!==void 0?t._values[o].v:void 0,done:o===void 0}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e}();var Hs=D.fromNumber(Pi),zs=D.fromNumber(Vi);var vr=new Uint8Array(8),Ws=new DataView(vr.buffer,vr.byteOffset,vr.byteLength);var so=1024*1024*17,Ys=G.alloc(so);var Xe=class{triggerID;nudgeID;engagementID;contentID;shortID;contentType;variation;props;objective;onsiteDeliveryType;holdout;constructor(t){t=t||{},this.triggerID=t.id||t.triggerID,this.nudgeID=t.nudgeID,this.shortID=t.shortID,this.contentType=t.contentType,this.engagementID=t.engagementID,this.contentID=t.contentID,this.variation=t.variation,this.props=t.props,this.objective=t.objective,this.onsiteDeliveryType=t.onsiteDeliveryType,this.holdout=t.holdout}};var be=class{constructor(t,r={},o,p){this.name=t;this.properties=r;this.id=p?new ft(p):new ft,this.occurred=new Date,o&&(this.trigger=new Xe(o)),this.newEvent=!p}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale};var ao=["videoEl"],ee=class e extends Qt{videoElements;videos;videoConfig;dialogRef=null;dialog=ue(on);isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";engagementTriggerReceived(t){this.videoConfig=t.content?.videoConfig,this.videos=this.videoConfig.videos}onMuteToggled(t,r){t||this.videoElements.forEach(o=>{o.nativeElement!==r&&(o.nativeElement.muted=!0,o.nativeElement.pause())})}sendTriggerClicked(t,r){let o=new be(Gt.EVENT_TRIGGER_CLICKED,{},this.triggerContext?.triggerData);o.videos=[t.id],r&&(o.items=[r]),this.sendEventToRenderer(o)}onVideoTap(t,r,o,p){t?.stopPropagation(),t?.preventDefault();let l=r.items?.[0];if(this.sendTriggerClicked(r,l?.toEmbed()),this.videoConfig.footerContent==="NONE"){p&&(p.muted=!1,p.play(),this.onMuteToggled(!1,p));return}Xr().then(()=>this.openDialog(r,o))}async performCTA(t){let r,o=this.triggerContext;if(t.cta===ie.ADD_TO_CART)r=Gt.EVENT_ADD_TO_CART_CLICKED;else if(t.cta===ie.GO_TO_PRODUCT)r=Gt.EVENT_VIEW_ITEM_CLICKED;else if(t.cta===ie.OPEN_CART)r=Gt.EVENT_OPEN_CART_CLICKED,o.triggerData.redirectBehaviour=Qr.CART_DRAWER;else{vt.warn(`Unsupported CTA type: ${t.cta}`);return}let p={at:t.cta},l={videoID:t.video.id};this.sendEvent(r,{current:l},t.video,t.item),this.executeCTAViaRenderer({clickAction:p,embeddedItem:t.item.toEmbed()})}sendEvent(t,r,o,p){let l=new be(t,r,this.engagementTrigger);o&&(l.videos=[o.id]),p&&(l.items=[p.toEmbed()]),this.sendEventToRenderer(l)}onDialogClosed(){}async openDialog(t,r){let o={videos:this.videos,currentIndex:r,triggerContext:this.triggerContext,onCTAPerformed:a=>this.performCTA(a)};this.dialogRef&&this.dialogRef.close();let p=await import("./chunk-NOSXWIID.js");this.dialogRef=this.dialog.open(p.VideoDetailDialogComponent,{width:"100vw",height:"100vh",data:o});let l={videoID:t.id,videoIndex:r};this.sendEvent(Gt.EVENT_VIDEO_DIALOG_OPENED,{current:l},t),this.dialogRef.closed.subscribe(a=>{if(this.dialogRef=null,!a)return;let d=a.lastVideoDuration*1e3,v={videoID:a.lastVideo.id,videoIndex:a.lastVideoIndex,playedTillMS:d,playedTillPercent:d/a.lastVideo.durationMS},E=new be(Gt.EVENT_VIDEO_DIALOG_CLOSED,{current:v},this.triggerContext?.triggerData);E.videos=[a.lastVideo.id],this.sendEventToRenderer(E),this.onDialogClosed()})}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Ar(e)))(o||e)}})();static \u0275cmp=ht({type:e,selectors:[["cooee-abstract-video"]],viewQuery:function(r,o){if(r&1&&Ae(ao,5),r&2){let p;Me(p=De())&&(o.videoElements=p)}},features:[dt],decls:0,vars:0,template:function(r,o){},encapsulation:2})};var co=(e,t)=>t.id,lo=(e,t)=>t.url;function fo(e,t){if(e&1&&(re(0,"div",1),Ut(1,"safeHtml")),e&2){let r=Z();yt("innerHTML",Zt(1,1,r.videoConfig.heading),Bt)}}function uo(e,t){if(e&1&&re(0,"source",7),e&2){let r=t.$implicit;yt("type",he(r.mimeType))("src",r.url,Wt)}}function po(e,t){if(e&1){let r=Yt();rt(0,"cooee-mute-toggle",12),Mt("toggled",function(p){at(r),Z();let l=Jt(5),a=Z();return ct(a.onMuteToggled(p,l))}),nt()}if(e&2){Z();let r=Jt(5);yt("muted",r.muted)("videoEl",r)}}function ho(e,t){if(e&1){let r=Yt();rt(0,"cooee-item-card",13),Mt("buttonClick",function(){at(r);let p=Z(),l=p.$implicit,a=p.$index,d=Jt(5),v=Z();return ct(v.addToCartClicked(null,l,a,d))}),nt()}if(e&2){Z();let r=qt(0);yt("item",r)}}function mo(e,t){if(e&1){let r=Yt();rt(0,"cooee-video-card",14),Mt("linkClicked",function(){at(r);let p=Z().$implicit,l=Z();return ct(l.sendTriggerClicked(p))}),nt()}if(e&2){Z();let r=qt(1);yt("card",r)}}function go(e,t){if(e&1){let r=Yt();Se(0)(1),rt(2,"div",4)(3,"div",5),Mt("click",function(p){let l=at(r),a=l.$implicit,d=l.$index,v=Jt(5),E=Z();return ct(E.onVideoTap(p,a,d,v))})("keydown.enter",function(p){let l=at(r),a=l.$implicit,d=l.$index,v=Jt(5),E=Z();return ct(E.onVideoTap(p,a,d,v))})("keydown.space",function(p){let l=at(r),a=l.$implicit,d=l.$index,v=Jt(5),E=Z();return ct(E.onVideoTap(p,a,d,v))}),rt(4,"video",6,0),Mt("mouseenter",function(){at(r);let p=Jt(5);Z();let l=qt(1);return ct(l&&p.play())})("mouseleave",function(){at(r);let p=Jt(5);Z();let l=qt(1);return ct(l&&p.pause())}),Ct(6,uo,1,3,"source",7,lo),nt(),rt(8,"div",8),mt(9,po,1,2,"cooee-mute-toggle",9),nt(),mt(10,ho,1,1,"cooee-item-card",10)(11,mo,1,1,"cooee-video-card",11),nt()()}if(e&2){let r=t.$implicit,o=Z(),p=qt(0),l=ne(r.items[0]);J();let a=ne(r.card),d=l&&o.videoConfig.footerContent==o.VideoConfigFooterContent.FIRST_ITEM,v=a&&o.videoConfig.footerContent==o.VideoConfigFooterContent.CARD;J(3),yt("poster",r.thumbnail,Wt)("muted",!0),Be("autoplay",p||null),J(2),It(r.sources),J(3),gt(o.videoConfig.showMuteButton?9:-1),J(),gt(d?10:v?11:-1)}}var Ke=class e extends ee{VideoConfigFooterContent=sr;VideoConfigAutoPlay=nn;swiperOptions;constructor(){super(),this.hasSwiper=!0,this.swiperOptions={direction:"horizontal",effect:"slide",slidesPerView:"auto",spaceBetween:24,mousewheel:{enabled:!0,forceToAxis:!0},navigation:{enabled:!1},freeMode:!0}}ngAfterViewInit(){this.playFirstVideo()}addToCartClicked(t,r,o,p){let l=r.items?.[0],a=Gr.get().website?.canChangeVariantInCart;if(r.items?.length>1||l?.hasVariants()&&!a){this.onVideoTap(t,r,o,p);return}this.performCTA({cta:ie.ADD_TO_CART,item:l,video:r})}goToPDP(t,r){t?.stopPropagation(),t?.preventDefault();let o=r.items?.[0];this.performCTA({cta:ie.GO_TO_PRODUCT,item:o,video:r})}update(){}playFirstVideo(){this.videoConfig.autoPlay==="ON_HOVER"&&this.isMobile&&this.videoElements.first?.nativeElement.play()}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=ht({type:e,selectors:[["cooee-video-playlist"]],features:[dt],decls:7,vars:4,consts:[["videoEl",""],[1,"heading-text",3,"innerHTML"],[3,"options"],["ngProjectAs","swiper-slides",5,["swiper-slides"]],[1,"swiper-slide","video-card"],["role","button","tabindex","0","aria-label","Play video","aria-haspopup","dialog",1,"video-wrapper",3,"click","keydown.enter","keydown.space"],["width","100%","playsinline","","loop","","preload","metadata",3,"mouseenter","mouseleave","poster","muted"],[3,"src","type"],[1,"video-controls"],[3,"muted","videoEl"],[3,"item"],[3,"card"],[3,"toggled","muted","videoEl"],[3,"buttonClick","item"],[3,"linkClicked","card"]],template:function(r,o){r&1&&(Se(0)(1),mt(2,fo,2,3,"div",1),rt(3,"cooee-swiper",2),Ur(4,3),Ct(5,go,12,7,"div",4,co),jr(),nt()),r&2&&(ne(!o.videoConfig.autoPlay||o.videoConfig.autoPlay===o.VideoConfigAutoPlay.ON),J(),ne(o.videoConfig.autoPlay===o.VideoConfigAutoPlay.ON_HOVER),J(),gt(o.videoConfig.heading?2:-1),J(),yt("options",o.swiperOptions),J(2),It(o.videos))},dependencies:[cn,an,sn,ln,me],styles:[`:host{display:block}.heading-text{margin-bottom:.5rem;font-size:1.125rem;text-align:center;font-weight:700}cooee-swiper.swiper{margin:8px;padding-top:25px;padding-bottom:25px}.video-wrapper{position:relative;border-radius:var(--lc-media-radius, 8px)}.video-wrapper video{border-radius:var(--lc-media-radius, 8px)}.video-card{display:flex;flex-direction:column;gap:2.5px;scroll-snap-align:center;min-width:200px;max-width:300px;transition:transform .3s ease}.video-card:hover{transform:scale(1.05)}@media (max-width: 768px),(prefers-reduced-motion: reduce){.video-card{transition:none}.video-card:hover{transform:none}}.video-controls{position:absolute;bottom:8px;z-index:10;right:8px;display:flex;gap:8px}cooee-item-card{padding-left:0!important;padding-right:0!important}cooee-item-card .item-image{width:50px;height:50px;display:none}cooee-item-card .item-info{font-size:14px;line-height:normal}cooee-item-card .item-info .item-name{-webkit-line-clamp:1;overflow:hidden}cooee-item-card .item-info .item-cmp-price{color:rgba(var(--lc-color-text),.75);display:none}
18
18
  `],encapsulation:3})};function Hn(e){e||(e=ue(Tr));let t=new Te(r=>{if(e.destroyed){r.next();return}return e.onDestroy(r.next.bind(r))});return r=>r.pipe(Or(t))}var yo=e=>({"cursor-grab":e}),vo=(e,t)=>t.url;function wo(e,t){if(e&1&&re(0,"source",11),e&2){let r=t.$implicit;yt("type",he(r.mimeType))("src",r.url,Wt)}}var Qe=class e extends ee{video;isDragging=!1;hidden=!1;cdkDrag=ue(Le,{self:!0});untilDestroyed=Hn();constructor(){super()}get popupClasses(){return this.hidden?["hidden"]:["visible"]}onClick(t){t.stopPropagation(),t.preventDefault(),this.onVideoClick()}ngOnInit(){super.ngOnInit();let t=this.elementRef.nativeElement.closest(".letscooee-engagement");t&&(t.style.zIndex="10000"),this.cdkDrag.moved.pipe(this.untilDestroyed).subscribe(()=>this.isDragging=!0)}onVideoClick(){if(this.isDragging){this.isDragging=!1;return}this.hidden=!0,this.onVideoTap(null,this.video,0)}close(){this.hidden=!0;let t=(new Date().getTime()-this.triggerContext.startTime.getTime())/1e3;this.sendEvent(Gt.EVENT_TRIGGER_CLOSED,{duration:t})}engagementTriggerReceived(t){super.engagementTriggerReceived(t),this.video=this.videos[0]}update(){}onDialogClosed(){this.hidden=!1}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=ht({type:e,selectors:[["cooee-video-popup"]],hostAttrs:["role","button","tabindex","0","aria-label","Open video popup "],hostVars:3,hostBindings:function(r,o){r&1&&Mt("keydown.enter",function(l){return o.onClick(l)})("keydown.space",function(l){return o.onClick(l)})("click",function(l){return o.onClick(l)}),r&2&&(_t("cdkDragBoundary","body"),kr(o.popupClasses))},features:[Fr([{directive:Le,inputs:["cdkDragBoundary","cdkDragBoundary"]}]),dt],decls:14,vars:4,consts:[[1,"popup-inner",3,"ngClass"],["type","button","aria-label","Close video popup",1,"close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"play-button"],[1,"icon"],["viewBox","0 0 28.31 30"],["d","M19.15,1.29A1.24,1.24,0,0,0,17.82.15a1.36,1.36,0,0,0-.35.07,3.2,3.2,0,0,0-.65.46l-5.06,4.6a1.24,1.24,0,0,0,0,1.75l0,0a1.22,1.22,0,0,0,.89.39,1.25,1.25,0,0,0,.85-.32l3-2.78.17-.13v8l2.44,2.62ZM26.79,26.6l-7.64-7.93-2.5-2.58-6-6.34L8.9,8,5.23,4.15a1.17,1.17,0,0,0-1.66,0h0a1.18,1.18,0,0,0,0,1.66h0L6.1,8.47H3.32a2.94,2.94,0,0,0-2.45,3v7.16a3,3,0,0,0,2.86,3.08H8.07a.44.44,0,0,1,.33.13C9.7,23,11,24.19,12.26,25.36L17,29.7a1.24,1.24,0,0,0,2.17-1V22.21l5.95,6.15a1.2,1.2,0,0,0,1.67,0,1.17,1.17,0,0,0,.08-1.66Zm-10.14-.67-.18-.11L9.75,19.67a1.72,1.72,0,0,0-1.16-.45H4c-.48,0-.59-.11-.59-.61V11.55c0-.49,0-.6.59-.6H8.29l8.29,8.55ZM29.09,15.07A9.9,9.9,0,0,1,26.33,22l-.11.13a1.24,1.24,0,0,1-2-.28,1.29,1.29,0,0,1,.24-1.52h0a6.77,6.77,0,0,0,1.32-1.89,7.41,7.41,0,0,0-1.37-8.55,1.24,1.24,0,0,1-.08-1.75,1.33,1.33,0,0,1,.41-.29,1.19,1.19,0,0,1,1.34.2A8.88,8.88,0,0,1,28,10.36a10,10,0,0,1,1.17,4.17A3.35,3.35,0,0,1,29.09,15.07Z","transform","translate(-0.86 -0.14)","fill","#191919"],[1,"text"],["loop","","preload","auto","playsinline","","autoplay","",3,"muted"],[3,"src","type"]],template:function(r,o){r&1&&(rt(0,"div",0)(1,"button",1),Mt("click",function(l){return l.stopPropagation(),o.close()}),xe(),rt(2,"svg",2),re(3,"path",3)(4,"path",4),nt()(),Ee(),rt(5,"div",5)(6,"div",6),xe(),rt(7,"svg",7),re(8,"path",8),nt()(),Ee(),rt(9,"div",9),Dt(10,"Tap to unmute"),nt()(),rt(11,"video",10),Ct(12,wo,1,3,"source",11,vo),nt()()),r&2&&(yt("ngClass",zr(2,yo,o.isDragging)),J(11),yt("muted",!0),J(),It(o.video.sources))},dependencies:[Re],styles:[`:host{position:fixed;display:block;right:24px;bottom:24px;min-height:150px;max-width:150px;box-shadow:0 25px 50px -12px #00000040}:host(.hidden){display:none}.popup-inner{display:flex;justify-content:center;align-items:center;position:relative}video{width:100%;border-radius:8px}.close-button{position:absolute;top:-14px;right:-14px;background-color:#00000080;border-radius:9999px;width:32px;height:32px;border:none;z-index:10;display:flex;justify-content:center;align-items:center}.play-button{display:flex;justify-content:center;align-items:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(1);transition:all .1s ease-in-out;z-index:999;flex-wrap:wrap;width:100%;max-width:130px;border-radius:5px;padding:5px 10px;background-color:#97979761;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.play-button .icon{width:14px;height:14px}.play-button path{fill:#fff}.play-button .text{font-size:11px;line-height:1;color:#fff;font-weight:400;margin-left:5px;text-align:center}
19
19
  `],encapsulation:3})};var _o=(e,t)=>t.id,bo=(e,t)=>t.url;function xo(e,t){if(e&1&&(Nt(0,"div",0),Ut(1,"safeHtml")),e&2){let r=Z();_t("innerHTML",Zt(1,1,r.videoConfig.heading),Bt)}}function Eo(e,t){if(e&1&&Nt(0,"source",9),e&2){let r=t.$implicit;_t("type",he(r.mimeType))("src",r.url,Wt)}}function So(e,t){if(e&1){let r=Yt();At(0,"div",3),$r("click",function(p){let l=at(r),a=l.$implicit,d=l.$index,v=Z();return ct(v.onVideoTap(p,a,d))})("keydown.enter",function(p){let l=at(r),a=l.$implicit,d=l.$index,v=Z();return ct(v.onVideoTap(p,a,d))})("keydown.space",function(p){let l=at(r),a=l.$implicit,d=l.$index,v=Z();return ct(v.onVideoTap(p,a,d))}),xe(),At(1,"svg",4),Nt(2,"circle",5)(3,"circle",6),Vt(),Ee(),At(4,"div",7)(5,"video",8),Ct(6,Eo,1,3,"source",9,bo),Vt()()()}if(e&2){let r=t.$implicit,o=t.$index;Be("aria-label","Open video story "+(o+1)),J(6),It(r.sources)}}var tr=class e extends ee{constructor(){super()}update(){}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=ht({type:e,selectors:[["cooee-video-stories"]],features:[dt],decls:4,vars:1,consts:[[1,"heading-text",3,"innerHTML"],[1,"video-stories"],["role","button","tabindex","0",1,"video-story"],["role","button","tabindex","0",1,"video-story",3,"click","keydown.enter","keydown.space"],["viewBox","0 0 100 100"],["cx","50","cy","50","r","48","fill","none","stroke-width","4"],["cx","50","cy","50","r","48","fill","none","stroke-width","4","stroke-linecap","round","stroke-dasharray","301.6","stroke-dashoffset","301.6",1,"video-story-circle"],[1,"video-wrapper"],["autoplay","","loop","","muted","","playsinline","","preload","metadata"],[3,"src","type"]],template:function(r,o){r&1&&(mt(0,xo,2,3,"div",0),At(1,"div",1),Ct(2,So,8,1,"div",2,_o),Vt()),r&2&&(gt(o.videoConfig.heading?0:-1),J(2),It(o.videos))},dependencies:[me],styles:[`:host{display:block}.heading-text{margin-bottom:.5rem;font-size:1.125rem;text-align:center;font-weight:700}.video-stories{display:flex;overflow:auto;margin:.75rem;gap:.75rem;justify-content:center;align-items:center;scrollbar-width:none}.video-stories::-webkit-scrollbar{display:none}@media (max-width: 768px){.video-stories{justify-content:start!important}}.video-story{position:relative;width:5rem;height:5rem;cursor:pointer;flex-shrink:0}.video-story svg{position:absolute;top:0;left:0;width:100%;height:100%}.video-story svg circle:first-child{stroke:#d1d5db}.video-story svg circle:last-child{stroke:#3b82f6}.video-story .video-wrapper{width:100%;height:100%;border-radius:9999px;overflow:hidden}.video-story .video-wrapper video{width:100%;height:100%;object-fit:cover;border-radius:9999px}
20
20
  `],encapsulation:3})};Zr("CooeeWidgetSDK");(async()=>{let e=await qr(un),t=(r,o)=>{let p=fn(r,{injector:e.injector});customElements.define(o,p)};t(ke,"cooee-sticky-atc"),t($e,"cooee-savings-bar"),t(je,"cooee-progressbar"),t(Ke,"cooee-video-playlist"),t(Qe,"cooee-video-popup"),t(tr,"cooee-video-stories"),t(Kr,"cooee-product-options-picker"),sessionStorage.cooeeDebug&&import("./chunk-X2P3TPAO.js").then(r=>{t(r.DebuggerComponent,"cooee-debugger")})})();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@letscooee/web-sdk",
3
3
  "description": "Engage uniquely and boost conversions with AI-powered customer journeys driven by real-time intent",
4
- "version": "11.0.0-rc.0",
4
+ "version": "11.0.0-rc.1",
5
5
  "scripts": {
6
6
  "lint": "ng lint",
7
7
  "integrity": "./scripts/validate-integrity.sh",