whatmore-react-assets 1.0.1423 → 1.0.1424
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/static/js/13.b216da25.chunk.js +1 -0
- package/static/js/154.77527b19.chunk.js +2 -0
- package/static/js/210.d4c6f9a4.chunk.js +1 -0
- package/static/js/219.a0c7f0d6.chunk.js +1 -0
- package/static/js/240.9c510ae9.chunk.js +2 -0
- package/static/js/302.41f7dffe.chunk.js +1 -0
- package/static/js/348.1667d3ab.chunk.js +117 -0
- package/static/js/423.4d5ac85a.chunk.js +1 -0
- package/static/js/561.95fd0242.chunk.js +1 -0
- package/static/js/577.646fa55d.chunk.js +1 -0
- package/static/js/731.4a524607.chunk.js +1 -0
- package/static/js/733.b0e46e99.chunk.js +1 -0
- package/static/js/751.4f97aaf7.chunk.js +1 -0
- package/static/js/819.c2077f1e.chunk.js +2 -0
- package/static/js/824.d0a74da1.chunk.js +2 -0
- package/static/js/app-main.d4733527.chunk.js +1 -0
- package/static/js/atc-with-form.c6e794f2.chunk.js +1 -0
- package/static/js/banner-template-a.87707e64.chunk.js +1 -0
- package/static/js/carousel-template-a.9bab2855.chunk.js +1 -0
- package/static/js/carousel-template-b.d52ffc0b.chunk.js +1 -0
- package/static/js/carousel-template-f.bd001127.chunk.js +1 -0
- package/static/js/carousel-template-feed.ad73c3ed.chunk.js +15 -0
- package/static/js/carousel-template-g.d874fad3.chunk.js +1 -0
- package/static/js/carousel-template-h.eada0967.chunk.js +1 -0
- package/static/js/carousel-template-view-more.4b1e8a28.chunk.js +45 -0
- package/static/js/collections-template-a.d79da3e9.chunk.js +1 -0
- package/static/js/collections-template-b.d191151d.chunk.js +1 -0
- package/static/js/collections-template-c.6aadef97.chunk.js +1 -0
- package/static/js/collections-template-stories.9696a048.chunk.js +1 -0
- package/static/js/event-click-main.e9e26fc2.chunk.js +1 -0
- package/static/js/event-click-product.60b5a8fa.chunk.js +1 -0
- package/static/js/event-click-spotlight.929fb915.chunk.js +1 -0
- package/static/js/homepage-carousel-view.40bb7c8e.chunk.js +1 -0
- package/static/js/{location-details.b14d3704.chunk.js → location-details.c0431f85.chunk.js} +1 -1
- package/static/js/product-page-view.1baa0964.chunk.js +1 -0
- package/static/js/recommended-carousel.9a69fdec.chunk.js +2 -0
- package/static/js/spotlight-view.0d1ff2a1.chunk.js +1 -0
- package/static/js/stories-template-a.69cd6742.chunk.js +1 -0
- package/whatmore.js +2 -2
- package/static/js/2.a6e5564f.chunk.js +0 -1
- package/static/js/286.4d801177.chunk.js +0 -1
- package/static/js/296.25439eea.chunk.js +0 -1
- package/static/js/311.96c6c80a.chunk.js +0 -1
- package/static/js/378.bce12c1d.chunk.js +0 -1
- package/static/js/461.28347fc7.chunk.js +0 -1
- package/static/js/497.5bfb4d06.chunk.js +0 -2
- package/static/js/620.e23ff8de.chunk.js +0 -1
- package/static/js/650.44faf770.chunk.js +0 -117
- package/static/js/669.fcb5e7c7.chunk.js +0 -2
- package/static/js/682.d59c82bd.chunk.js +0 -1
- package/static/js/732.252d2132.chunk.js +0 -2
- package/static/js/756.7523a583.chunk.js +0 -2
- package/static/js/859.7a919acd.chunk.js +0 -1
- package/static/js/920.298a46d6.chunk.js +0 -1
- package/static/js/app-main.b8b5ba23.chunk.js +0 -1
- package/static/js/atc-with-form.43621d03.chunk.js +0 -1
- package/static/js/banner-template-a.9d6666d6.chunk.js +0 -1
- package/static/js/carousel-template-a.1173f55c.chunk.js +0 -1
- package/static/js/carousel-template-b.97c5133d.chunk.js +0 -1
- package/static/js/carousel-template-f.52aade62.chunk.js +0 -1
- package/static/js/carousel-template-feed.cc5f97a1.chunk.js +0 -15
- package/static/js/carousel-template-g.6375c2a4.chunk.js +0 -1
- package/static/js/carousel-template-h.264e373e.chunk.js +0 -1
- package/static/js/carousel-template-view-more.f32e33c2.chunk.js +0 -45
- package/static/js/collections-template-a.daea1564.chunk.js +0 -1
- package/static/js/collections-template-b.22c9d294.chunk.js +0 -1
- package/static/js/collections-template-c.ba832b97.chunk.js +0 -1
- package/static/js/collections-template-stories.57f85909.chunk.js +0 -1
- package/static/js/event-click-main.0c383ac3.chunk.js +0 -1
- package/static/js/event-click-product.21e6f6d4.chunk.js +0 -1
- package/static/js/event-click-spotlight.fab8b156.chunk.js +0 -1
- package/static/js/homepage-carousel-view.57ea90f2.chunk.js +0 -1
- package/static/js/product-page-view.3aa9a4ce.chunk.js +0 -1
- package/static/js/recommended-carousel.22249e9e.chunk.js +0 -2
- package/static/js/spotlight-view.864358a9.chunk.js +0 -1
- package/static/js/stories-template-a.a97215e7.chunk.js +0 -1
- /package/static/css/{139.a9bfc3e2.chunk.css → 926.a9bfc3e2.chunk.css} +0 -0
@@ -0,0 +1,117 @@
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[348],{6348:function(t,e,i){i.r(e),i.d(e,{EventClickComponentContext:function(){return fi},default:function(){return wi}});var n=i(7313),o=i(2210),r=i(8486),l=i(5160),a=i(499),d=i(4897),s=i(3271),c=i(9854),u=i(7753),h=i(7789),p=i(7053),v=i(1896),x=i(6417);var m=function(t){return(0,x.jsx)(v.Z,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,event:t.event})},g=i(5098),f=i(3437),w=i(3455),j=i(6422);var y=function(t){const[e,i]=(0,j.Z)(),[n,o,r,l]=(0,h.Z)(),a=.08*l;function d(){i(!e)}return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{cursor:"pointer",children:e?(0,x.jsx)(w.Z,{sx:{color:"white",fontSize:1.2*a,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:()=>{d()}}):(0,x.jsx)(f.Z,{sx:{color:"white",fontSize:1.2*a,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:()=>{d()}})})})},C=i(8449),b=i(686);const S=`${b.F4`
|
2
|
+
0%,10%,15% {
|
3
|
+
opacity: 0;
|
4
|
+
}
|
5
|
+
25%{
|
6
|
+
opacity: 0.25;
|
7
|
+
transform: translateY(-25%);
|
8
|
+
}
|
9
|
+
50%{
|
10
|
+
opacity: 0.5;
|
11
|
+
transform: translateY(0%);
|
12
|
+
}
|
13
|
+
75% {
|
14
|
+
opacity: 0.75;
|
15
|
+
transform: translateY(-8%)
|
16
|
+
}
|
17
|
+
100%{
|
18
|
+
opacity: 1;
|
19
|
+
transform: translateY(0%)
|
20
|
+
}
|
21
|
+
`} 0.5s linear`,I=`\n ${b.F4`
|
22
|
+
30% { transform: scale(1.2); }
|
23
|
+
40%, 60% { transform: rotate(-20deg) scale(1.2); }
|
24
|
+
50% { transform: rotate(20deg) scale(1.2); }
|
25
|
+
70% { transform: rotate(0deg) scale(1.2); }
|
26
|
+
100% { transform: scale(1); }
|
27
|
+
`} 1.5s linear;\n`;b.F4`
|
28
|
+
3% { transform: scale(1.2); }
|
29
|
+
4%, 6% { transform: rotate(-20deg) scale(1.2); }
|
30
|
+
5%,7% { transform: rotate(20deg) scale(1.2); }
|
31
|
+
8% { transform: rotate(0deg) scale(1.2); }
|
32
|
+
10% { transform: scale(1); }
|
33
|
+
`,b.F4`
|
34
|
+
0% { transform: scale(1); }
|
35
|
+
10% { transform: scale(1.2); }
|
36
|
+
20% { transform: scale(1); }
|
37
|
+
`;var k=i(4937);const _=`\n ${b.F4`
|
38
|
+
0% {
|
39
|
+
opacity: 0;
|
40
|
+
}
|
41
|
+
10%{
|
42
|
+
opacity: 0.5;
|
43
|
+
}
|
44
|
+
20%{
|
45
|
+
opacity: 1;
|
46
|
+
}
|
47
|
+
|
48
|
+
`} 3s ease-in-out;\n`;function T(t){const[e,i,o,r]=(0,h.Z)(),[l]=(0,u.j1)("whatmoreSecondaryColor"),[a,d]=(0,n.useState)(0),[p]=(0,u.j1)("whatmoreShopId"),v=t.event,m=t.onClick,f=v.products.length;t.isFirstProductsIconClickDone;(0,n.useEffect)((()=>{const t=setInterval((()=>{d((t=>(t+1)%f))}),3e3);return()=>{clearInterval(t)}}),[]);const w=.24,j=.024;var y=r*w+"px",C=r*w+"px",b=r*j*1.5+"px",I=r*j+"px",T=r*j*1.5+"px";if(void 0==v.products||0==v.products.length)return(0,x.jsx)(x.Fragment,{});var F=v.products;return(0,x.jsx)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",height:"fit-content",width:"fit-content",borderRadius:"lg",children:(0,x.jsxs)(s.xu,{margin:"10px",width:y,height:C,boxShadow:"dark-lg",borderColor:"white",borderWidth:"2px",borderRadius:"lg",overflow:"visible",backgroundColor:"gray.100",animation:S,onClick:()=>m(),children:[(0,x.jsx)(g.Ee,{width:"100%",height:"100%",src:F[a].thumbnail_image,objectFit:"cover",sx:{objectFit:(0,c.yOX)(p)+" !important"},borderRadius:"lg",animation:_},a),(0,x.jsx)(s.xu,{width:"100%",height:"100%",style:{position:"relative",zIndex:2,bottom:"100%"},className:"whatmore-ios-css-relative-fix",borderRadius:"lg",children:(0,x.jsx)(s.Kq,{direction:"column",width:"100%",height:"100%",justifyContent:"flex-end",children:(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",backgroundColor:l,borderRadius:"lg",marginX:"5px",marginY:"5px",paddingX:"2px",paddingY:"2px",children:[(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:I,fontFamily:"sans-serif",fontWeight:"semibold",textAlign:"center",lineHeight:"100%",sx:{color:"white !important"},children:["\xa0","Shop Now","\xa0"]}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(k.Z,{sx:{color:"white",fontSize:T}})})]})})})}),(0,x.jsx)(s.Kq,{direction:"row",height:"fit-content",width:y,justifyContent:"flex-end",style:{position:"relative",zIndex:3,bottom:"210%",left:"5%"},className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.Ct,{fontSize:b,variant:"subtle",textColor:l,bgColor:"gray.100",borderRadius:"md",boxShadow:"dark-lg",children:f>1?f:""})})]})})}var F=function(t){const[e,i]=(0,u.j1)("isProductSwiperCatalogOpen"),[o,r,l,a]=(0,h.Z)(),[d,c]=(0,n.useState)(!1),p=t.onToggle,v=t.event,m=.07*a,g=.15*l,f=.05*a;return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.bK,{style:{marginTop:"10px"},children:e?(0,x.jsx)(C.Z,{sx:{color:"white",fontSize:m,filter:"drop-shadow(0 0 5px black);",position:"absolute",bottom:g,right:f,zIndex:10},onClick:()=>{p("minimize-button")}}):(0,x.jsx)(T,{event:v,onClick:()=>{p("products-button"),c(!0)},isFirstProductsIconClickDone:d})})})},E=i(2634),P=i(6159),O=i(6336),z=i(5428),L=i(8022);var D=function(t){var e,i;const[o,r,l,a]=(0,h.Z)(),[d,c]=(0,n.useState)(!0),{slideDirection:p}=(0,n.useContext)(fi),v=((0,u.MO)("whatmoreShopId"),null!==(e=t.showForSeconds)&&void 0!==e?e:3),m=null!==(i=t.delayInSeconds)&&void 0!==i?i:1;t.swipeUp,(0,n.useEffect)((()=>{const t=setTimeout((()=>{c(!1)}),1e3*v);return()=>{clearTimeout(t)}}),[]);const g=.15*a,f=.07*a,w=`${b.F4`
|
49
|
+
0% {
|
50
|
+
transform: translateY(0%) rotate(0deg);
|
51
|
+
}
|
52
|
+
50% {
|
53
|
+
transform: translateY(-100%) translateX(+10%) rotate(+30deg);
|
54
|
+
}
|
55
|
+
100% {
|
56
|
+
transform: translateY(0%) rotate(0deg);
|
57
|
+
}
|
58
|
+
`} infinite 1.5s linear`,j=`${b.F4`
|
59
|
+
0% {
|
60
|
+
transform: translateY(0%) rotate(0deg);
|
61
|
+
}
|
62
|
+
50% {
|
63
|
+
transform: translateX(30%) translateY(20%) rotate(-30deg);
|
64
|
+
}
|
65
|
+
100% {
|
66
|
+
transform: translateY(0%) rotate(0deg);
|
67
|
+
}
|
68
|
+
`} infinite 1.5s linear`;return(0,x.jsx)(O.MT,{unmountOnExit:!0,initialScale:.2,in:d,reverse:!0,delay:m,children:(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",paddingTop:100,borderRadius:"3xl",children:(0,x.jsxs)(s.Kq,{direction:"column",width:"100%",height:"fit-content",justifyContent:"flex-end",children:[(0,x.jsx)(s.M5,{animation:"vertical"===p?w:j,children:"vertical"===p?(0,x.jsx)(z.Z,{sx:{color:"white !important",fontSize:g,filter:"drop-shadow(0 0 20px black);"}}):(0,x.jsx)(L.Z,{sx:{color:"white !important",fontSize:g,filter:"drop-shadow(0 0 20px black);"}})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{textShadow:"dark-lg",fontSize:f+"px",fontWeight:"semibold",sx:{color:"white !important",textShadow:"0px 0px 20px black !important;"},children:"swipe for more"})})]})})})};var R=function(t){const[e,i]=(0,u.j1)("isFirstIndicatorRenderDone"),[o]=(0,u.j1)("indicatorRenderSeconds"),r=o,l=t.swipeUp;return(0,n.useEffect)((()=>{const t=setTimeout((()=>{i(!0)}),3e3+1e3*r);return()=>{clearTimeout(t)}}),[]),e?null:(0,x.jsx)(D,{showForSeconds:.8*r,delayInSeconds:3,swipeUp:l})},M=i(5180),A=i(9316),K=i(5254);const W="15px";var q=i(4522),N=i(778),V=i(364);var Z=function(t){const[e]=(0,u.j1)("isInDesignMode"),[i]=(0,u.j1)("isDemoBrand"),[o]=(0,u.j1)("whatmoreSecondaryColor"),[r]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d,p,v,m]=(0,h.Z)(),[g,f]=(0,n.useState)(!1),w=t.product,j=t.event,{whatmoreWidgetSourceDetails:y}=(0,n.useContext)(V.I),C=.1*v,b=.95*m,S=.05*m;return(0,x.jsx)(s.Kq,{direction:"row",height:C,justifyContent:"center",alignItems:"center",alignContent:"center",bgGradient:"linear(to-b, transparent, blackAlpha.400, blackAlpha.600)",children:(0,x.jsx)(s.Kq,{direction:"column",width:"fit-content",height:C,justifyContent:"center",alignItems:"center",alignContent:"center",children:(0,x.jsx)(s.xu,{width:b+"px",height:"fit-content",padding:"6px",marginTop:W,backgroundColor:o,borderRadius:"5px",animation:g?A.mT:null,onAnimationEnd:()=>{f(!1)},marginBottom:(0,c.pq5)(a),onClick:()=>{f(!0),function(t,n){e||i||(async()=>{(0,l.wz)(t,n),(0,q.GF)({userInteractionType:N.K.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:y,event:t,productList:[n],ctaList:t.cta})})()}(j,w),window.location.href=function(t){return(0,c.lj5)(a)?t.product_link+"?"+(0,c.awP)(a)+"&"+(0,c.n9s)(a)+"&"+(0,c.vaK)(a):t.product_link}(w)},_hover:{backgroundColor:(0,K.lA)(o,8)},cursor:"pointer",children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*S+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:r+" !important",color:"white !important"},children:(0,c.Pvx)(a)})})})})})},H=i(7009),U=i(5945),B=i(5456),Y=i(6984),X=i(6227),G=i(7329),$=(i(9111),i(9748));const Q={en:{add_to_cart:"ADD TO CART",buy_now:"BUY NOW",more_info:"MORE INFO",size:"Size",color:"Color",description:"Description",like:"Like",share:"Share",talk_to_us:"Talk to Us",done:"Done",cancel:"Cancel",view_product:"View Product",go_to_cart:"Go to Cart"},ar:{add_to_cart:"\u0623\u0636\u0641 \u0625\u0644\u0649 \u0627\u0644\u0633\u0644\u0629",buy_now:"\u0627\u0634\u062a\u0631\u0650 \u0627\u0644\u0622\u0646",more_info:"\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a",size:"\u0627\u0644\u062d\u062c\u0645",color:"\u0627\u0644\u0644\u0648\u0646",description:"\u0627\u0644\u0648\u0635\u0641",like:"\u0623\u0639\u062c\u0628\u0646\u064a",share:"\u0645\u0634\u0627\u0631\u0643\u0629",talk_to_us:"\u062a\u062d\u062f\u062b \u0625\u0644\u064a\u0646\u0627",done:"\u062a\u0645",cancel:"\u0625\u0644\u063a\u0627\u0621",view_product:"\u0639\u0631\u0636 \u0627\u0644\u0645\u0646\u062a\u062c",go_to_cart:"\u0627\u0630\u0647\u0628 \u0625\u0644\u0649 \u0627\u0644\u0633\u0644\u0629",watch_and_buy:"\u0634\u0627\u0647\u062f \u0648\u0627\u0634\u062a\u0631\u064a"},da:{add_to_cart:"In den Warenkorb",buy_now:"Jetzt kaufen",more_info:"Mehr Infos",size:"Gr\xf6\xdfe",color:"Farbe",description:"Beschreibung",like:"Gef\xe4llt mir",share:"Teilen",talk_to_us:"Sprechen Sie mit uns",done:"Fertig",cancel:"Abbrechen",view_product:"Produkt ansehen",go_to_cart:"Zum Warenkorb",watch_and_buy:"Ansehen und kaufen"},de:{add_to_cart:"In den Warenkorb",buy_now:"Jetzt kaufen",more_info:"Mehr Infos",size:"Gr\xf6\xdfe",color:"Farbe",description:"Beschreibung",like:"Gef\xe4llt mir",share:"Teilen",talk_to_us:"Sprechen Sie mit uns",done:"Fertig",cancel:"Abbrechen",view_product:"Produkt ansehen",go_to_cart:"Zum Warenkorb",watch_and_buy:"Ansehen und kaufen"},es:{add_to_cart:"A\xf1adir al carrito",buy_now:"Comprar ahora",more_info:"M\xe1s informaci\xf3n",size:"Tama\xf1o",color:"Color",description:"Descripci\xf3n",like:"Me gusta",share:"Compartir",talk_to_us:"Habla con nosotros",done:"Hecho",cancel:"Cancelar",view_product:"Ver producto",go_to_cart:"Ir al carrito",watch_and_buy:"Ver y comprar"},fr:{add_to_cart:"Ajouter au panier",buy_now:"Acheter maintenant",more_info:"Plus d'infos",size:"Taille",color:"Couleur",description:"Description",like:"J'aime",share:"Partager",talk_to_us:"Parlez-nous",done:"Valider",cancel:"Annuler",view_product:"Voir le produit",go_to_cart:"Aller au panier",watch_and_buy:"Regarder et acheter"},ja:{add_to_cart:"\u30ab\u30fc\u30c8\u306b\u8ffd\u52a0",buy_now:"\u4eca\u3059\u3050\u8cfc\u5165",more_info:"\u8a73\u7d30\u60c5\u5831",size:"\u30b5\u30a4\u30ba",color:"\u8272",description:"\u8aac\u660e",like:"\u3044\u3044\u306d",share:"\u5171\u6709",talk_to_us:"\u304a\u554f\u3044\u5408\u308f\u305b",done:"\u5b8c\u4e86",cancel:"\u30ad\u30e3\u30f3\u30bb\u30eb",view_product:"\u5546\u54c1\u3092\u898b\u308b",go_to_cart:"\u30ab\u30fc\u30c8\u306b\u9032\u3080",watch_and_buy:"\u8996\u8074\u3057\u3066\u8cfc\u5165"},nl:{add_to_cart:"Aan winkelwagentje toevoegen",buy_now:"Nu kopen",more_info:"Meer informatie",size:"Maat",color:"Kleur",description:"Beschrijving",like:"Vind ik leuk",share:"Delen",talk_to_us:"Praat met ons",done:"Klaar",cancel:"Annuleren",view_product:"Bekijk product",go_to_cart:"Ga naar winkelwagentje",watch_and_buy:"Kijk en koop"},pt:{add_to_cart:"Adicionar ao carrinho",buy_now:"Comprar agora",more_info:"Mais informa\xe7\xf5es",size:"Tamanho",color:"Cor",description:"Descri\xe7\xe3o",like:"Curtir",share:"Compartilhar",talk_to_us:"Fale conosco",done:"Conclu\xeddo",cancel:"Cancelar",view_product:"Ver produto",go_to_cart:"Ir para o carrinho",watch_and_buy:"Assistir e comprar"},zh:{add_to_cart:"\u52a0\u5165\u8d2d\u7269\u8f66",buy_now:"\u7acb\u5373\u8d2d\u4e70",more_info:"\u66f4\u591a\u4fe1\u606f",size:"\u5c3a\u5bf8",color:"\u989c\u8272",description:"\u63cf\u8ff0",like:"\u559c\u6b22",share:"\u5206\u4eab",talk_to_us:"\u8054\u7cfb\u6211\u4eec",done:"\u5b8c\u6210",cancel:"\u53d6\u6d88",view_product:"\u67e5\u770b\u5546\u54c1",go_to_cart:"\u524d\u5f80\u8d2d\u7269\u8f66",watch_and_buy:"\u89c2\u770b\u5e76\u8d2d\u4e70"}};function J(t){var e,i,o;const[r]=(0,u.j1)("whatmoreSecondaryColor"),[l]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d,h]=(0,n.useState)(!1),p=null!==(e=t.baseFontSize)&&void 0!==e?e:10,v=t.onClick,m=t.width,g=t.height,f=t.title,w=t.showInProgressIcon;return(0,x.jsxs)(s.xu,{display:"flex",width:m,height:g,padding:"2x",boxShadow:"lg",animation:d?A.mT:null,onAnimationEnd:()=>{h(!1)},cursor:"pointer",children:["awaitingVariantSelection"==t.cartState&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",backgroundColor:"white",onClick:e=>{e.stopPropagation(),t.updateCartState("init"),t.setProductVariantTitle(t.productTitle),h(!0)},children:(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*p+"px !important",fontWeight:"semibold !important",sx:{fontFamily:l+" !important",color:"#343434 !important"},children:["\xa0",null!==(i=null===Q||void 0===Q||null===(o=Q[null===t||void 0===t?void 0:t.websiteLanguage])||void 0===o?void 0:o.cancel)&&void 0!==i?i:"Cancel","\xa0"]})}),(0,x.jsxs)(s.Kq,{direction:"row",backgroundColor:w?(0,K.lA)(r,8):r,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",onClick:t=>{t.stopPropagation(),v(),h(!0)},children:[(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*p+"px !important",fontWeight:"semibold !important",sx:{fontFamily:l+" !important",color:(0,c.KCy)(a)+" !important"},children:["\xa0",f,"\xa0"]}),w?(0,x.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,x.jsx)(G.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*p+"px"}})}):(0,x.jsx)(x.Fragment,{})]})]})}function tt(t){var e,i,o;const[r]=(0,u.j1)("whatmoreSecondaryColor"),[l]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d,h]=(0,n.useState)(!1),p=null!==(e=t.baseFontSize)&&void 0!==e?e:10,v=t.onClick,m=t.width,g=t.height;return(0,x.jsx)(s.xu,{width:m,height:g,padding:"2x",boxShadow:"lg",backgroundColor:"#000000"==(0,c.hmr)(a)?r:(0,c.hmr)(a),onClick:t=>{t.stopPropagation(),v(),h(!0)},animation:d?A.mT:null,onAnimationEnd:()=>{h(!1)},cursor:"pointer",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",children:(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*p+"px !important",fontWeight:"semibold !important",sx:{fontFamily:l+" !important",color:(0,c.KCy)(a)+" !important"},children:["\xa0","ADD TO CART"!=(0,c.tan)(a)?(0,c.tan)(a):null!==(i=null===Q||void 0===Q||null===(o=Q[null===t||void 0===t?void 0:t.websiteLanguage])||void 0===o?void 0:o.add_to_cart)&&void 0!==i?i:(0,c.tan)(a),"\xa0"]})})})})}function et(t){var e;const[i]=(0,u.j1)("whatmorePrimaryFont"),n=null!==(e=t.baseFontSize)&&void 0!==e?e:10,o=t.width,r=t.height;return(0,x.jsx)(s.xu,{width:o,height:r,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:"gray",borderWidth:"1px",onClick:t=>{t.stopPropagation()},children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:(0,x.jsxs)(s.xv,{color:"gray",lineHeight:"100%",fontSize:1.3*n+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:"gray !important"},children:["\xa0"," Sold Out ","\xa0"]})})})}function it(t){var e;const[i]=(0,u.j1)("whatmoreSecondaryColor"),[n]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),r=null!==(e=t.baseFontSize)&&void 0!==e?e:10,l=t.onClick,a=t.cartCount,d=t.width,h=t.height,p=t.onCartIconClick;return(0,x.jsx)(s.xu,{width:d,height:h,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:i,borderWidth:"1px",onClick:t=>{t.stopPropagation()},cursor:"pointer",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:[(0,x.jsx)(s.M5,{paddingX:"5px",onClick:()=>{p()},children:(0,c.ijd)(o)?(0,x.jsx)($.zx,{size:"sm",_hover:{bg:i},sx:{bg:i},children:(0,x.jsx)(s.xv,{paddingX:"6px",color:"white",sx:{fontSize:.85*r},children:"GO TO CART"})}):(0,x.jsx)(X.Z,{sx:{color:i,fontSize:1.6*r}})}),(0,x.jsx)(s.xv,{color:i,fontSize:1.3*r+"px !important",fontWeight:"semibold !important",sx:{fontFamily:n+" !important"},children:a}),(0,x.jsx)(s.M5,{paddingX:"5px",onClick:t=>{t.stopPropagation(),l()},children:(0,x.jsx)(Y.Z,{sx:{color:i,fontSize:1.6*r}})})]})})}var nt=function(t){var e,i,n,o,r,l,a;const[d]=(0,u.j1)("websiteLanguage"),s=null!==(e=t.baseFontSize)&&void 0!==e?e:10,c=null===(i=t.showAddedToCart)||void 0===i||i,h=t.cartState,p=t.cartCount,v=t.onClickAtc,m=t.onCartIconClick;function g(){v()}const f=null!==(n=t.width)&&void 0!==n?n:"100%",w=null!==(o=t.height)&&void 0!==o?o:"100%";return"errored"==h?(0,x.jsx)(O.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:w,width:f},children:(0,x.jsx)(et,{baseFontSize:s,width:f,height:w})}):"init"==h?0==p?(0,x.jsx)(tt,{onClick:g,baseFontSize:s,width:f,height:w,websiteLanguage:d}):c?(0,x.jsx)(O.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:w,width:f},children:(0,x.jsx)(it,{onClick:g,baseFontSize:s,cartCount:p,width:f,height:w,onCartIconClick:m})}):(0,x.jsx)(tt,{onClick:g,baseFontSize:s,width:f,height:w,websiteLanguage:d}):(0,x.jsx)(J,{onClick:g,setProductVariantTitle:t.setProductVariantTitle,cartState:h,productTitle:null===(r=t.product)||void 0===r?void 0:r.title,updateCartState:t.updateCartState,baseFontSize:s,width:f,height:w,title:"awaitingVariantSelection"==h?null!==(l=null===Q||void 0===Q||null===(a=Q[d])||void 0===a?void 0:a.done)&&void 0!==l?l:"Done":"",showInProgressIcon:"atcApiCallInProgress"==h||"productVariantDetailsApiCallInProgress"==h,websiteLanguage:d})},ot=i(6967),rt=i(873),lt=i(4844);const at=(0,u.MO)("isInDesignMode"),dt=(0,u.MO)("isDemoBrand");async function st(t,e,i,n,o,r,l,a,d){return"shopify"==i?(0,lt.wW)(t,e,n,l,a,d,r):(at||dt||(async()=>{(0,ot.FF)(o,r,l,a,d)})(),(0,rt.jg)(t,e,n))}function ct(t,e){return"shopify"==t?(0,lt.JL)(e):(0,rt.TE)(e)}var ut=i(513);var ht=function(t,e,i){const[o]=(0,u.j1)("whatmoreShopId"),[r]=(0,u.j1)("isInDesignMode"),[a]=(0,u.j1)("isDemoBrand"),[d,s]=(0,n.useState)(null),h=(0,n.useRef)(null),{closeClickComponent:v}=(0,n.useContext)(fi),{whatmoreUserInfo:x}=(0,n.useContext)(V.I),[m,g]=(0,n.useState)({state:"init",cart_count:t});function f(t,e){g({state:t,cart_count:null!==e&&void 0!==e?e:m.cart_count}),"init"!=t&&"errored"!=t?(0,u.bU)("whatmoreAllowAutoSlide",!1):(0,u.bU)("whatmoreAllowAutoSlide",!0)}function w(t){var e=[],i=[],n=[];return t.variants.forEach((o=>{var r,l,a;o.option1&&e.push({option:o.option1,available:null===(r=o.available)||void 0===r||r,type:t.options[0].name}),o.option2&&i.push({option:o.option2,available:null===(l=o.available)||void 0===l||l,type:t.options[1].name}),o.option3&&n.push({option:o.option3,available:null===(a=o.available)||void 0===a||a,type:t.options[2].name})})),e=e.reduce(((t,e,i)=>{var n=t.filter((t=>t.option==e.option));return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)}),[]),i=i.reduce(((t,e,i)=>{var n=t.filter((t=>t.option==e.option));return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)}),[]),n=n.reduce(((t,e,i)=>{var n=t.filter((t=>t.option==e.option));return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)}),[]),[e,i,n]}function j(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}function y(t){return t[0].length<=1&&t[1].length<=1&&t[2].length<=1}function C(){if(h.current&&h.current.length>=1){return h.current.filter((t=>t.available)).length>=1}return!1}function b(t,n){const d=function(t){const e=h.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));return 0==e.length?null:e[0].id}(t);if(!d)return void f("init",m.cart_count);f("atcApiCallInProgress",null);st(d,1,(0,c.Ipo)(o),o,i,e,n,null===i||void 0===i?void 0:i.location,null===x||void 0===x?void 0:x.userType).then((t=>{if(!t.ok)throw new Error(t.status);return t.json()})).then((t=>(function(t,e,i){r||a||(async()=>{(0,l.JX)(t,e,i)})()}(i,e,1),f("init",m.cart_count+1),(0,u.bU)("whatmoreAddedToCart",!0),"72550089015"==o&&(0,u.MO)("whatmoreAddedToCart")&&(0,ut.D)(o,(()=>{}),100,window.location.hostname),(0,c.IKD)(o)&&setTimeout((()=>function(){const t=window.location.origin+"/cart";window.location.href=t}()),500),t))).catch((t=>{f("errored",null),console.error("Error while adding to cart:",t)}))}return[m,f,d,function(t){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];f("productVariantDetailsApiCallInProgress",null),(0,p.p)(e,(0,c.Ipo)(o),o).then((e=>{h.current=e.variants;const n=w(e);s(n),y(n)||i?C()?b([j(n[0]),j(n[1]),j(n[2])],t):f("errored",null):f("awaitingVariantSelection",null)})).catch((t=>{f("errored",null)}))},b,function(t){var e,i,n,r;const l=h.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));if(0==l.length)return null;const a=null!==(e=l[0].price)&&void 0!==e?e:0,d=null!==(i=l[0].compare_at_price)&&void 0!==i?i:0;return{price:((0,c.Ipo)(o),a),compare_price:((0,c.Ipo)(o),d),title:null!==(n=null===(r=l[0])||void 0===r?void 0:r.title)&&void 0!==n?n:""}},function(){"do_nothing"!==(0,c.v9M)(o)&&("go_to_cart_page"!==(0,c.v9M)(o)?"open_cart_slider"!==(0,c.v9M)(o)||null!==v&&v():ct((0,c.Ipo)(o),o))}]},pt=i(9363);var vt=function(t){var e,i,o,r;const l=t.productVariantOptions,a=null!==(e=t.width)&&void 0!==e?e:"100%",d=null!==(i=t.height)&&void 0!==i?i:"fit-content",c=null!==(o=t.baseFontSize)&&void 0!==o?o:10,h=t.onOptionSelected,p=null!==(r=t.optionTitleColor)&&void 0!==r?r:"black",v=t.data,[m]=(0,u.j1)("whatmorePrimaryFont");function f(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}const[w,j]=(0,n.useState)([f(l[0]),f(l[1]),f(l[2])]);return(0,n.useEffect)((()=>{h(w)}),[w]),(0,x.jsx)(s.Kq,{direction:"column",width:a,height:d,justifyContent:"flex-start",alignItems:"center",spacing:"2px",paddingY:"2px",children:l.map(((e,i)=>{var n;if(0==e.length||"mlveda_country"==(null===e||void 0===e||null===(n=e[0])||void 0===n?void 0:n.type))return;const o=e.every((e=>{var i,n,o,r,l,a;return(null===t||void 0===t||null===(i=t.finalArr)||void 0===i||null===(n=i.finalArr)||void 0===n||null===(o=n.find((t=>(null===t||void 0===t?void 0:t.color)===(null===e||void 0===e?void 0:e.option))))||void 0===o?void 0:o.src)||(null===t||void 0===t||null===(r=t.finalArr)||void 0===r||null===(l=r.finalArrExternal)||void 0===l||null===(a=l.find((t=>(null===t||void 0===t?void 0:t.color)===(null===e||void 0===e?void 0:e.option))))||void 0===a?void 0:a.optionsrc)}));return(0,x.jsxs)(s.Kq,{width:"100%",direction:"column",alignItems:"center",justifyContent:"flex-start",paddingY:"2px",children:[(0,x.jsx)(s.M5,{width:"100%",children:(0,x.jsx)(s.iz,{color:"blackAlpha.500",size:"1px",width:"20%"})}),(0,x.jsxs)(s.xv,{as:"b",fontSize:1.2*c+"px",sx:{color:p+" !important",fontFamily:m+" !important"},align:"center",marginY:"2px",children:["\xa0",e[0].type,"\xa0"]}),(0,x.jsx)(s.kC,{gap:"6px",wrap:"wrap",justify:"center",paddingY:"2px",children:e.map(((e,n)=>{var r,l,a,d,u,h,p,f;return(0==i||(null===v||void 0===v||null===(r=v.variants)||void 0===r?void 0:r.find((t=>t[`option${i}`]==(null===w||void 0===w?void 0:w[i-1])&&t[`option${i+1}`]==(null===e||void 0===e?void 0:e.option)))))&&(0,x.jsxs)(s.xu,{onClick:t=>{t.stopPropagation(),e.available&&function(t,e){if(2==e)j([w[0],w[1],t]);else if(1==e){var i,n;j([w[0],t,null===v||void 0===v||null===(i=v.variants)||void 0===i||null===(n=i.find((e=>(null===e||void 0===e?void 0:e.option2)==t)))||void 0===n?void 0:n.option3])}else{var o,r,l,a,d,s;const e=null===v||void 0===v||null===(o=v.variants)||void 0===o||null===(r=o.find((e=>(null===e||void 0===e?void 0:e.option1)==t)))||void 0===r?void 0:r.option2;j([t,null===v||void 0===v||null===(l=v.variants)||void 0===l||null===(a=l.find((e=>(null===e||void 0===e?void 0:e.option1)==t)))||void 0===a?void 0:a.option2,null===v||void 0===v||null===(d=v.variants)||void 0===d||null===(s=d.find((t=>(null===t||void 0===t?void 0:t.option2)==e)))||void 0===s?void 0:s.option3])}}(e.option,i)},backgroundColor:e.option===w[i]?"rgba(0, 0, 0, 0.7)":"white",border:e.option===w[i]?"1px solid #ffffff":"1px solid black",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:e.option===w[i]?"0 0 8px rgba(0, 0, 0, 0.8)":"none",marginY:"2px",width:"fit-content",padding:o?"0px":"8px",borderRadius:o?"50%":"0",children:[!o&&(0,x.jsxs)(s.xv,{as:e.available?"samp":"s",fontSize:.8*c+"px",sx:{color:e.option===w[i]?"white":(e.available?"black":"gray")+" !important",fontFamily:m+" !important"},align:"center",paddingX:(y=e.option,y.length>=3?"0px":.5*c+"px"),children:["\xa0",e.option,"\xa0"]}),o&&(0,x.jsx)(g.Ee,{width:"58px",height:"58px",style:{cursor:null!==e&&void 0!==e&&e.available?"pointer":"not-allowed",opacity:null!==e&&void 0!==e&&e.available?1:.5,filter:null!==e&&void 0!==e&&e.available?"none":"grayscale(100%)",borderRadius:o?"50%":"100%"},src:(0,pt.s)(null!==(l=null===t||void 0===t||null===(a=t.finalArr)||void 0===a||null===(d=a.finalArr)||void 0===d||null===(u=d.find((t=>(null===t||void 0===t?void 0:t.color)==(null===e||void 0===e?void 0:e.option))))||void 0===u?void 0:u.src)&&void 0!==l?l:null===t||void 0===t||null===(h=t.finalArr)||void 0===h||null===(p=h.finalArrExternal)||void 0===p||null===(f=p.find((t=>(null===t||void 0===t?void 0:t.color)==(null===e||void 0===e?void 0:e.option))))||void 0===f?void 0:f.optionsrc,"?width=400&height=400")})]});var y}))},i)]},i)}))})},xt=i(9219),mt=i(6524);var gt=function(t){var e,i,o,r,a,d;const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[f]=(0,u.j1)("whatmoreSecondaryColor"),w=(0,u.MO)("whatmoreSecondaryColorShade900"),[j]=(0,u.j1)("whatmorePrimaryFont"),[y]=(0,u.j1)("whatmoreShopId"),[C,b,S,I]=(0,h.Z)(),[k,_]=(0,n.useState)(!1),[T,F]=(0,n.useState)(t.product),E=(0,u.MO)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:P}=(0,n.useContext)(V.I),[z,L,D,R,M,Z,Y]=ht(0,T,t.event),[X,G]=(0,n.useState)(null),[Q,J]=(0,n.useState)(parseFloat(T.price)),[tt,et]=(0,n.useState)(parseFloat(T.compare_price)),[it,ot]=(0,n.useState)(null===T||void 0===T?void 0:T.title),[rt,lt]=(0,n.useState)(T.currency),[at,dt]=(0,n.useState)(null),st=t.event,ct=t.productClickHandler,{whatmoreIsPreviewMode:ut}=(0,n.useContext)(V.I),[gt,ft]=(0,n.useState)(null),[wt,jt]=(0,n.useState)(!1);(0,n.useEffect)((()=>{(0,c.N8M)(y)&&(0,xt.Rb)(T,(0,c.Ipo)(y),y).then((t=>{F(t),J(parseFloat(t.price)),et(parseFloat(t.compare_price)),lt(t.currency),jt(!0)}));(async()=>{var t,e,i,n,o,r;const l=await(0,p.p)(T,(0,c.Ipo)(y),y);dt(l),J("61916709004"==y&&null!==(t=null===l||void 0===l||null===(e=l.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.price)&&void 0!==t?t:null===l||void 0===l?void 0:l.price),et("61916709004"==y&&null!==(n=null===l||void 0===l||null===(o=l.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.compare_at_price)&&void 0!==n?n:null===l||void 0===l?void 0:l.compare_at_price),jt(!0)})()}),[]),(0,n.useEffect)((()=>{var t,e;const i=null!=at?null===at||void 0===at||null===(t=at.options)||void 0===t?void 0:t.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))})):-1,n=-1!==i?null===at||void 0===at||null===(e=at.variants)||void 0===e?void 0:e.map((t=>{var e,n;const o=null===t||void 0===t?void 0:t[`option${i+1}`];return null!==t&&void 0!==t&&null!==(e=t.featured_image)&&void 0!==e&&e.src?{color:o,src:null===t||void 0===t||null===(n=t.featured_image)||void 0===n?void 0:n.src}:null})):[];let o=[];var r;-1!==i&&(o=null===at||void 0===at||null===(r=at.images)||void 0===r?void 0:r.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc}))));ft({position:i,finalArr:n,finalArrExternal:o})}),[at]);var yt=.68*I,Ct=.55*yt,bt=.4*yt,St=yt*(.55-.4),It=yt+"px",kt=bt+"px",_t=St+"px",Tt=.12*bt;const Ft=(0,c.ITD)(y);function Et(){window.location.href=function(t){return(0,c.lj5)(y)?t.product_link+"?"+(0,c.awP)(y)+"&"+(0,c.n9s)(y)+"&"+(0,c.vaK)(y):t.product_link}(T)}const Pt=P.landingLocationType,Ot=P.templateType,zt=(0,mt.NY)(Pt)+(0,mt.dS)(Ot)+(null!==st&&void 0!==st&&st.isRelatedEvent?"R":"E")+"_"+(null===st||void 0===st?void 0:st.event_id);return(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:W,marginBottom:(0,c.pq5)(y),width:It,height:"fit-content",boxShadow:"round"==E?"dark-lg":null,onClick:()=>{!function(t,e){v||m||(async()=>{(0,l.wz)(t,e)})(),"72550089015"==y?Et():ct(e),_(!0)}(st,T)},backgroundColor:(0,K.lA)("#ffffff",(0,c.U5_)(y)),animation:k?A.mT:null,borderRadius:"round"==E?"xl":null,overflow:"hidden",onAnimationEnd:()=>{_(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(y),borderColor:(0,c.qPe)(y)},children:[(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,x.jsx)(s.xu,{height:kt,width:kt,bgColor:"STRDOIDF6O7"==y?"#f7f7f7":w,children:(0,x.jsx)(g.Ee,{width:kt,height:kt,src:(0,pt.s)(null!==(e=null!==(i=null===gt||void 0===gt||null===(o=gt.finalArr)||void 0===o||null===(r=o.find((t=>(null===t||void 0===t?void 0:t.color)==(null===X||void 0===X?void 0:X[null===gt||void 0===gt?void 0:gt.position]))))||void 0===r?void 0:r.src)&&void 0!==i?i:null===gt||void 0===gt||null===(a=gt.finalArrExternal)||void 0===a||null===(d=a.find((t=>(null===t||void 0===t?void 0:t.color)==(null===X||void 0===X?void 0:X[null===gt||void 0===gt?void 0:gt.position]))))||void 0===d?void 0:d.src)&&void 0!==e?e:T.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(y)+" !important"}})}),(0,x.jsxs)(s.xu,{height:kt,width:yt-bt+"px",children:[(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:(0,c.Fr)(y)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"4px",paddingY:"10px",children:[(0,x.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",1.1*Tt+"px","important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",j,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"),t.style.setProperty("padding","0","important"),t.style.setProperty("margin-bottom","4px","important"),t.style.setProperty("font-weight","normal","important"))},children:(0,U.s)(it,"prod-tile")}),(0,c.QaY)(y)?(0,x.jsxs)(s.Kq,{className:"whatmore-product-atc-price",direction:(0,c.$zZ)(y)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",borderRadius:"round"==E?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"4px",sx:{margin:"0px !important",marginBottom:"4px !important"},children:[wt&&(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*Tt*(0,c.Rqt)(y)+"px !important",fontWeight:"semibold !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:j+" !important",color:(0,c.Uyp)(y)+" !important",padding:"0px !important",letterSpacing:"normal !important",margin:"0px !important"},children:["\xa0"," "+(0,xt.jx)(null!==Q&&void 0!==Q?Q:null===T||void 0===T?void 0:T.price,"",y,rt)," \xa0"]}),(0,B.B)(Q,tt)&&wt?(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*Tt*(0,c.Rqt)(y)+"px !important",fontWeight:"medium !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:j+" !important",color:(0,c.kPs)(y)+" !important",margin:"0px !important",letterSpacing:"normal !important",textDecoration:"line-through !important"},children:[" ",(0,xt.jx)(null!==tt&&void 0!==tt?tt:null===T||void 0===T?void 0:T.compare_price,"",y,rt)]}):(0,x.jsx)(x.Fragment,{})]}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xv,{fontSize:.82*Tt*(0,c.Rqt)(y)+"px",fontWeight:"medium",lineHeight:"110%",sx:{margin:"0px !important",fontFamily:j+" !important",color:(0,c.eod)(y)+" !important"},children:ut?(0,c.qde)(y):(0,c.aTS)(y)})]}),(0,c.Fr)(y)?(0,x.jsx)(s.Kq,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,x.jsx)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:w,sx:{borderRadius:"round"==E?"5px":"0px",padding:"2px"},spacing:"0px",children:(0,c.ML$)(y)?(0,x.jsx)($.zx,{size:"sm",_hover:{bg:f},sx:{bg:f},children:(0,x.jsx)(s.xv,{color:"white",paddingX:"6px",fontSize:.8*Tt+"px",children:"VIEW PRODUCT"})}):(0,x.jsx)(H.Z,{sx:{color:f,fontSize:1.3*Tt+"px"}})}),(0,x.jsx)(s.xu,{width:"2px"})]})}):(0,x.jsx)(x.Fragment,{})]})]}),(0,x.jsx)(O.Rg,{unmountOnExit:!0,initialScale:.5,in:"awaitingVariantSelection"==z.state,style:{height:"fit-content",width:"100%"},children:"awaitingVariantSelection"==z.state&&null!=D?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",marginTop:.1*Ct+"px",marginBottom:.1*Ct+"px",overflowY:"auto",overflowX:"hidden",maxHeight:Ct*Ft+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,x.jsx)(vt,{width:It,height:"fit-content",event:st,product:T,finalArr:gt,data:at,productVariantOptions:D,baseFontSize:1.2*Tt,onOptionSelected:t=>{!function(t){G(t);const e=Z(t);e&&(J(e.price),et(e.compare_price),e.title.includes(" ")&&ot(e.title))}(t)}})}):(0,x.jsx)(x.Fragment,{})}),(0,x.jsx)(s.Kq,{className:"whatmore-add-to-cart",direction:"row",width:"100%",height:_t,justifyContent:"center",alignItems:"center",children:(0,x.jsx)(nt,{baseFontSize:.3*St,setProductVariantTitle:ot,product:T,cartState:z.state,cartCount:z.cart_count,updateCartState:L,onClickAtc:t=>{"init"==z.state?(R(zt),(0,q.GF)({userInteractionType:N.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:P,event:st,productList:[T],ctaList:st.cta})):"awaitingVariantSelection"==z.state&&(M(X,zt),ot(null===T||void 0===T?void 0:T.title))},onCartIconClick:()=>{Y()}})})]})},ft=i(3867);var wt=function(t){var e,i,n,o,r;const[a]=(0,u.j1)("isInDesignMode"),[d]=(0,u.j1)("isDemoBrand"),[h]=(0,u.j1)("whatmoreSecondaryColor"),[p]=(0,u.j1)("whatmorePrimaryFont"),[v]=(0,u.j1)("whatmoreShopId"),[m]=(0,u.j1)("websiteLanguage"),g=t.event,f=t.product,w=null!==(e=t.baseFontSize)&&void 0!==e?e:10,j=null!==(i=t.width)&&void 0!==i?i:"fit-content",y=null!==(n=t.height)&&void 0!==n?n:"fit-content";return(0,x.jsx)(s.rU,{href:f.product_link,color:h,onClick:()=>{!function(t,e){a||d||(async()=>{(0,l.$L)(t,e)})()}(g,f)},children:(0,x.jsx)(s.xu,{width:j,height:y,padding:"2x",boxShadow:"lg",borderRadius:"md",backgroundColor:"white",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",spacing:"5px",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{lineHeight:"100%",fontSize:1.4*w,fontWeight:"semibold",sx:{fontFamily:p+" !important",color:h+" !important"},children:"MORE INFO"!=(0,c.Z59)(v)?(0,c.Z59)(v):null!==(o=null===Q||void 0===Q||null===(r=Q[m])||void 0===r?void 0:r.more_info)&&void 0!==o?o:(0,c.Z59)(v)})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(H.Z,{sx:{color:h,fontSize:1.4*w}})})]})})})},jt=i(6163);function yt(t){var e;const[i]=(0,u.j1)("whatmoreSecondaryColor"),[o]=(0,u.j1)("whatmorePrimaryFont"),[r]=(0,u.j1)("whatmoreShopId"),[l,a]=(0,n.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),h=t.onClick,p=t.width,v=t.height,m=t.title;return(0,x.jsx)(s.xu,{width:p,height:v,padding:"2x",boxShadow:"lg",backgroundColor:"#000000"==(0,c.hmr)(r)?i:(0,c.hmr)(r),onClick:t=>{t.stopPropagation(),h(),a(!0)},animation:l?A.mT:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",children:(0,x.jsxs)(s.xv,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},lineHeight:"100%",fontSize:1.4*d+"px",fontWeight:"semibold",sx:{fontFamily:o+" !important",color:(0,c.KCy)(r)+" !important"},children:["\xa0",m,"\xa0"]})})})}var Ct=function(t){var e,i,n;const[o]=(0,u.j1)("whatmoreShopId"),r=t.event,l=t.product,a=null!==(e=t.baseFontSize)&&void 0!==e?e:10,d=t.onShopNowClick,s=null!==(i=t.width)&&void 0!==i?i:"100%",h=null!==(n=t.height)&&void 0!==n?n:"100%";return(0,x.jsx)(yt,{onClick:function(){d()},event:r,product:l,baseFontSize:a,width:s,height:h,title:(0,c.Pvx)(o)})};var bt=function(t){var e;const[i]=(0,u.j1)("isInDesignMode"),[o]=(0,u.j1)("isDemoBrand"),[r]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d,v,m,f]=(0,h.Z)(),[w,j]=(0,n.useState)(!1),[y,C]=(0,n.useState)(t.product),{whatmoreWidgetSourceDetails:b}=(0,n.useContext)(V.I),[S,I,k,_,T,F,E]=ht(0,y,t.event),[P,z]=(0,n.useState)(null),[L,D]=(0,n.useState)(parseFloat(y.price)),[R,M]=(0,n.useState)(parseFloat(y.compare_price)),[K,Z]=(0,n.useState)(y.currency),[H,Y]=(0,n.useState)(!1),X=t.event,G=t.productClickHandler,$=null!==(e=t.tileWidthFactor)&&void 0!==e?e:1,Q=b.landingLocationType,J=b.templateType,tt=(0,mt.NY)(Q)+(0,mt.dS)(J)+(null!==X&&void 0!==X&&X.isRelatedEvent?"R":"E")+"_"+(null===X||void 0===X?void 0:X.event_id);(0,n.useEffect)((()=>{(0,c.N8M)(a)&&(0,xt.Rb)(y,(0,c.Ipo)(a),a).then((t=>{C(t),D(parseFloat(t.price)),M(parseFloat(t.compare_price)),Z(t.currency)}));(async()=>{const t=await(0,p.p)(y,(0,c.Ipo)(a),a);D(null===t||void 0===t?void 0:t.price),M(null===t||void 0===t?void 0:t.compare_at_price),Y(!0)})()}),[]);var et=f*$,it=.3*et,ot=et+"px",rt=.7*it,lt=.9*rt,at=.12*it;const dt=(0,c.ITD)(a);function st(t,e){i||o||(async()=>{(0,l.wz)(t,e)})(),G(e),j(!0)}return(0,x.jsx)(s.Kq,{direction:"row",width:ot,height:"fit-content",justifyContent:"center",children:(0,x.jsx)(s.xu,{marginTop:W,marginBottom:(0,c.pq5)(a),width:ot,onClick:t=>{},animation:w?A.mT:null,borderRadius:"lg",onAnimationEnd:()=>{j(!1)},children:(0,x.jsxs)(s.Kq,{direction:"column",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",spacing:"0px",children:[(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"70%",justifyContent:"space-around",alignItems:"center",borderTopRadius:"lg",overflow:"hidden",onClick:()=>{st(X,y)},children:[(0,x.jsx)(s.xu,{height:rt+"px",width:rt+"px",children:(0,x.jsx)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",children:(0,x.jsx)(s.xu,{height:lt+"px",width:lt+"px",borderRadius:"lg",bgColor:"gray.100",overflow:"hidden",children:(0,x.jsx)(g.Ee,{width:lt+"px",height:lt+"px",src:y.thumbnail_image,objectFit:"cover"})})})}),(0,x.jsx)(s.xu,{height:rt+"px",width:et-rt+"px",children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"space-between",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingY:"10px",spacing:"2px",children:[(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*at+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:r+" !important",color:"white !important"},children:(0,U.s)(y.title.toString())}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",marginTop:"5px",children:[(0,c.QaY)(a)?(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignItems:"center",borderRadius:"lg",backgroundColor:"blackAlpha.500",paddingX:"10px",paddingY:"5px",children:[H&&(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:1*at+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:r+" !important",color:"white !important"},children:["\xa0"," "+(0,xt.jx)(null!==L&&void 0!==L?L:null===y||void 0===y?void 0:y.price,"",a,K)," \xa0"]}),(0,x.jsx)(s.M5,{children:(0,B.B)(y.price,y.compare_price)&&H?(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.8*at+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:r+" !important",color:"#F9F6EE !important",textDecoration:"line-through !important"},children:[" ",(0,xt.jx)(null!==R&&void 0!==R?R:null===y||void 0===y?void 0:y.compare_price,"",a,K)]}):(0,x.jsx)(x.Fragment,{})})]}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(ft.Z,{storeId:a,productId:y.client_product_id,productLink:y.product_link,fontSize:1*at,fontColor:"white"})})]})]})})]}),(0,x.jsx)(O.Rg,{unmountOnExit:!0,initialScale:.5,in:"awaitingVariantSelection"==S.state,style:{height:"fit-content",width:"100%"},children:"awaitingVariantSelection"==S.state&&null!=k?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",marginTop:.1*it+"px",marginBottom:.1*it+"px",overflowY:"auto",overflowX:"hidden",maxHeight:it*dt+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,x.jsx)(vt,{width:ot,height:"fit-content",event:X,product:y,productVariantOptions:k,baseFontSize:1*at,onOptionSelected:t=>{!function(t){z(t);const e=F(t);e&&(D(e.price),M(e.compare_price))}(t)},optionTitleColor:"white"})}):(0,x.jsx)(x.Fragment,{})}),(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"30%",justifyContent:"center",alignItems:"center",paddingBottom:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,x.jsx)(s.xu,{width:"100%",height:"100%",children:(0,x.jsx)(wt,{baseFontSize:.8*at,event:X,product:y,width:"100%",height:"100%"})}),(0,x.jsx)(s.xu,{width:"100%",height:"100%",borderRadius:"md",overflow:"hidden",children:(0,c.Ib9)(a)?(0,x.jsx)(Ct,{baseFontSize:.8*at,event:X,product:y,borderRadius:"md",onShopNowClick:t=>{st(X,y)}}):(0,x.jsx)(x.Fragment,{children:"form"===(0,c._5p)(a)?(0,x.jsx)(jt.default,{baseFontSize:.8*at,event:X,product:y,width:"100%",height:"100%",showAddedToCart:!0}):(0,x.jsx)(nt,{baseFontSize:.8*at,event:X,product:y,cartState:S.state,cartCount:S.cart_count,borderRadius:"md",onClickAtc:t=>{"init"==S.state?(_(tt),(0,q.GF)({userInteractionType:N.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:b,event:X,productList:[y],ctaList:X.cta})):"awaitingVariantSelection"==S.state&&T(P,tt)},onCartIconClick:()=>{E()}})})})]})]})})})};var St=function(t){var e,i,o,r,a,d,v,m,f,w;const[j]=(0,u.j1)("isInDesignMode"),[y]=(0,u.j1)("isDemoBrand"),[C]=(0,u.j1)("whatmoreSecondaryColor"),b=(0,u.MO)("whatmoreSecondaryColorShade900"),[S]=(0,u.j1)("whatmorePrimaryFont"),[I]=(0,u.j1)("whatmoreShopId"),[k,_,T,F]=(0,h.Z)(),[E,P]=(0,n.useState)(!1),[O,z]=(0,n.useState)(t.product),L=(0,u.MO)("whatmoreUITheme"),[D,R]=(0,n.useState)(!1),[M,Z]=(0,n.useState)(parseFloat(O.price)),[Y,X]=(0,n.useState)(parseFloat(O.compare_price)),[G,$]=(0,n.useState)(O.currency),Q=t.event,[J,tt]=(0,n.useState)();(0,n.useEffect)((()=>{(0,c.N8M)(I)&&(0,xt.Rb)(O,(0,c.Ipo)(I),I).then((t=>{z(t),Z(parseFloat(t.price)),X(parseFloat(t.compare_price)),$(t.currency),R(!0)}));(async()=>{const t=await(0,p.p)(O,(0,c.Ipo)(I),I);tt(t),R(!0)})()}),[]);var et=.68*F,it=.4*et,nt=et+"px",ot=it+"px",rt=et*(.55-.4)+"px",lt=.12*it;(0,c.ITD)(I);const{whatmoreWidgetSourceDetails:at}=(0,n.useContext)(V.I);function dt(t){return(0,c.lj5)(I)?t.product_link+"?"+(0,c.awP)(I)+"&"+(0,c.n9s)(I)+"&"+(0,c.vaK)(I):t.product_link}function st(t,e){j||y||(async()=>{(0,l.wz)(t,e),(0,q.GF)({userInteractionType:N.K.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:at,event:t,productList:[e],ctaList:t.cta})})(),P(!0)}return(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:W,marginBottom:(0,c.pq5)(I),width:nt,height:"fit-content",boxShadow:"round"==L?"dark-lg":null,onClick:()=>{st(Q,O),window.location.href=dt(O)},backgroundColor:(0,K.lA)("#ffffff",(0,c.U5_)(I)),animation:E?A.mT:null,borderRadius:"round"==L?"xl":null,overflow:"hidden",onAnimationEnd:()=>{P(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(I),borderColor:(0,c.qPe)(I)},children:[(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,x.jsx)(s.xu,{height:ot,width:ot,children:(0,x.jsx)(g.Ee,{width:ot,height:ot,src:(0,pt.s)(O.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(I)+" !important"}})}),(0,x.jsxs)(s.xu,{height:ot,width:et-it+"px",children:[(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:(0,c.Fr)(I)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingTop:"10px",paddingBottom:"16px",children:[(0,x.jsx)(s.xv,{as:"p",ref:t=>{t&&(t.style.setProperty("min-height","0","important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("-webkit-box-orient","vertical","important"))},sx:{paddingLeft:"8px",fontFamily:S+" !important",color:"black !important",lineHeight:"120% !important",fontWeight:"medium !important",fontSize:1.1*lt+"px !important"},children:(0,U.s)(null==O.title?"":O.title.toString(),"prod-tile")}),(0,c.QaY)(I)?(0,x.jsxs)(s.Kq,{className:"whatmore-product-shopnow-price",direction:(0,c.$zZ)(I)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",marginTop:"5px",borderRadius:"round"==L?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"5px",children:[D&&(0,x.jsxs)(s.xv,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},noOfLines:1,fontSize:.9*lt+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:S+" !important",color:(0,c.Uyp)(I)+" !important",margin:"0px !important"},children:[" "+(0,xt.jx)(parseFloat("77948879170"===I?(null===J||void 0===J?void 0:J.price)>0?null===J||void 0===J?void 0:J.price:(null===J||void 0===J||null===(e=J.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.price)||((null===Q||void 0===Q||null===(o=Q.products)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.price)>0?null===Q||void 0===Q||null===(a=Q.products)||void 0===a||null===(d=a[0])||void 0===d?void 0:d.price:null===Q||void 0===Q||null===(v=Q.products)||void 0===v||null===(m=v[0])||void 0===m?void 0:m.price_max):null!==(f=null===J||void 0===J?void 0:J.price)&&void 0!==f?f:M),"",I,G)," \xa0"]}),(0,B.B)(M,Y)&&D?(0,x.jsxs)(s.xv,{as:"s",style:{minHeight:0,textDecoration:"line-through"},noOfLines:1,fontSize:.9*lt+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:S+" !important",color:(0,c.kPs)(I)+" !important",margin:"0px !important"},children:[" ",(0,xt.jx)(null!==(w=null===J||void 0===J?void 0:J.compare_at_price)&&void 0!==w?w:Y,"",I,G)]}):(0,x.jsx)(x.Fragment,{})]}):(0,x.jsx)(x.Fragment,{}),""!=(0,c.sG7)(I)&&(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*lt+"px",lineHeight:"100%",paddingTop:"6px",sx:{fontFamily:(0,c.V3Y)(I)+" !important",color:(0,c.aUT)(I)+" !important",margin:"0px !important"},children:["\xa0",(0,c.sG7)(I)," \xa0"]})]}),(0,c.Fr)(I)?(0,x.jsx)(s.Kq,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,x.jsx)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:b,sx:{borderRadius:"round"==L?"5px":"0px",padding:"2px"},spacing:"0px",children:(0,x.jsx)(H.Z,{sx:{color:C,fontSize:1.3*lt+"px"}})}),(0,x.jsx)(s.xu,{width:"2px"})]})}):(0,x.jsx)(x.Fragment,{})]})]}),(0,c.pp3)(I)&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:rt,justifyContent:"center",alignItems:"center",children:(0,x.jsx)(Ct,{baseFontSize:.8*lt,event:Q,product:O,borderRadius:"md",onShopNowClick:t=>{st(Q,O),window.location.href=dt(O)}})})]})};function It(t){var e;const[i]=(0,u.j1)("whatmoreSecondaryColor"),[o]=(0,u.j1)("whatmorePrimaryFont"),[r]=(0,u.j1)("whatmoreShopId"),[l,a]=(0,n.useState)(!1),d=null!==(e=t.baseFontSize)&&void 0!==e?e:10,h=t.onClick,p=t.width,v=t.height,m=t.title,g=t.showInProgressIcon;return"awaitingVariantSelection"==t.cartState||"productVariantDetailsApiCallInProgress"==t.cartState?(0,x.jsx)(kt,{onClick:()=>t.onClick(),event:t.event,product:t.product,baseFontSize:d,width:p,height:v}):(0,x.jsxs)(s.xu,{display:"flex",width:"fit-content",minWidth:"75%",padding:"2x",boxShadow:"lg",animation:l?A.mT:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:["awaitingVariantSelection"==t.cartState&&(0,x.jsx)(s.Kq,{direction:"row",alignItems:"center",justifyContent:"center",paddingY:"2px",backgroundColor:"white",onClick:e=>{e.stopPropagation(),t.updateCartState("init"),a(!0)},children:(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:o+" !important",color:"#343434 !important"},children:["\xa0","63064310011"==r?"Annuler":"Cancel","\xa0"]})}),(0,x.jsxs)(s.Kq,{direction:"row",backgroundColor:g?(0,K.lA)(i,8):i,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",onClick:t=>{t.stopPropagation(),h(),a(!0)},children:[(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:o+" !important",color:(0,c.KCy)(r)+" !important"},children:["\xa0",m,"\xa0"]}),g?(0,x.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,x.jsx)(G.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*d+"px"}})}):(0,x.jsx)(x.Fragment,{})]})]})}function kt(t){const[e]=(0,u.j1)("whatmoreSecondaryColor"),[i]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),[r,l]=(0,n.useState)(!1),a=t.onClick,d=t.baseFontSize;return(0,x.jsx)(s.Kq,{direction:"row",paddingBottom:"3%",position:"relative",children:(0,x.jsx)(s.xu,{width:"fit-content",minWidth:"75%",boxShadow:"lg",padding:"6px 12px",borderRadius:"6px",backgroundColor:e,onClick:t=>{t.stopPropagation(),a(),l(!0)},animation:r?A.mT:null,onAnimationEnd:()=>{l(!1)},cursor:"pointer",zIndex:"1000",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{lineHeight:"100%",fontSize:1.3*d+"px",fontWeight:"semibold",sx:{fontFamily:`${i} !important`,color:`${(0,c.KCy)(o)} !important`},children:(0,c.tan)(o)})})})})})}function _t(t){var e;const[i]=(0,u.j1)("whatmorePrimaryFont"),n=null!==(e=t.baseFontSize)&&void 0!==e?e:10;t.width,t.height;return(0,x.jsx)(s.xu,{width:"fit-content",height:"fit-content !important",minWidth:"75%",boxShadow:"lg",backgroundColor:"white",borderRadius:"6px",borderColor:"gray",borderWidth:"1px",onClick:t=>{t.stopPropagation()},children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",alignItems:"center",paddingX:"4px",paddingY:"3px",justifyContent:"center",children:(0,x.jsxs)(s.xv,{color:"gray",lineHeight:"100%",fontSize:1.2*n+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:"gray !important"},children:["\xa0"," Sold Out ","\xa0"]})})})}function Tt(t){var e;const[i]=(0,u.j1)("whatmoreSecondaryColor"),[n]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),r=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),l=t.onClick,a=t.cartCount,d=(t.width,t.height,t.onCartIconClick);return(0,x.jsx)(s.xu,{width:"fit-content",minWidth:"75%",borderRadius:"6px",padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:i,borderWidth:"1px",onClick:t=>{t.stopPropagation()},cursor:"pointer",children:(0,x.jsxs)(s.Kq,{direction:"row",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:[(0,x.jsx)(s.M5,{paddingX:"5px",onClick:()=>{d()},children:"1972174947"!=o&&"55194878152"!=o&&"12181504100"!=o?(0,x.jsx)(X.Z,{sx:{color:i,fontSize:1.6*r}}):(0,x.jsx)($.zx,{size:"sm",_hover:{bg:i},sx:{bg:i},children:(0,x.jsx)(s.xv,{paddingX:"6px",color:"white",sx:{fontSize:.85*r},children:"GO TO CART"})})}),(0,x.jsx)(s.xv,{color:i,fontSize:1.3*r+"px !important",fontWeight:"semibold !important",sx:{fontFamily:n+" !important"},children:a}),(0,x.jsx)(s.M5,{paddingX:"5px",onClick:t=>{t.stopPropagation(),l()},children:(0,x.jsx)(Y.Z,{sx:{color:i,fontSize:1.6*r}})})]})})}var Ft=function(t){var e,i,n,o;const[r]=(0,u.j1)("whatmoreShopId"),l=t.event,a=t.product,d=null!==(e=t.baseFontSize)&&void 0!==e?e:10,s=null===(i=t.showAddedToCart)||void 0===i||i,c=t.cartState,h=t.cartCount,p=t.onClickAtc,v=t.onCartIconClick;function m(){p()}const g=null!==(n=t.width)&&void 0!==n?n:"100%",f=null!==(o=t.height)&&void 0!==o?o:"100%";return"errored"==c?(0,x.jsx)(O.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{},children:(0,x.jsx)(_t,{event:l,product:a,baseFontSize:d,width:g,height:f})}):"init"==c?0==h?(0,x.jsx)(kt,{onClick:m,event:l,product:a,baseFontSize:d,width:g,height:f}):s?(0,x.jsx)(O.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,children:(0,x.jsx)(Tt,{onClick:m,event:l,product:a,baseFontSize:d,cartCount:h,width:g,height:f,onCartIconClick:v})}):(0,x.jsx)(kt,{onClick:m,event:l,product:a,baseFontSize:d,width:g,height:f}):(0,x.jsx)(It,{onClick:m,cartState:c,updateCartState:t.updateCartState,event:l,product:a,baseFontSize:d,width:g,height:f,title:"awaitingVariantSelection"==c?"63064310011"==r?"Valider":"Done":"",showInProgressIcon:"atcApiCallInProgress"==c||"productVariantDetailsApiCallInProgress"==c})};var Et=function(t){var e,i,o,r,a,d;const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[f]=(0,u.j1)("whatmorePrimaryFont"),[w]=(0,u.j1)("whatmoreShopId"),[j,y,C,b]=(0,h.Z)(),[S,I]=(0,n.useState)(!1),[k,_]=(0,n.useState)(t.product),T=(0,u.MO)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:F}=(0,n.useContext)(V.I),[E,P,O,z,L,D,R]=ht(0,k,t.event),[M,Z]=(0,n.useState)(null),[H,Y]=(0,n.useState)(parseFloat(k.price)),[X,G]=(0,n.useState)(parseFloat(k.compare_price)),[$,Q]=(0,n.useState)(k.currency),[J,tt]=(0,n.useState)(null),et=t.event,it=t.productClickHandler,[nt,ot]=(0,n.useState)(null),[rt,lt]=(0,n.useState)(!1),at=F.landingLocationType,dt=F.templateType,st=(0,mt.NY)(at)+(0,mt.dS)(dt)+"_"+(null===et||void 0===et?void 0:et.event_id);(0,n.useEffect)((()=>{(0,c.N8M)(w)&&(0,xt.Rb)(k,(0,c.Ipo)(w),w).then((t=>{_(t),Y(parseFloat(t.price)),G(parseFloat(t.compare_price)),Q(t.currency),lt(!0)}));(async()=>{const t=await(0,p.p)(k,(0,c.Ipo)(w),w);tt(t),Y(null===t||void 0===t?void 0:t.price),G(null===t||void 0===t?void 0:t.compare_at_price),lt(!0)})()}),[]),(0,n.useEffect)((()=>{var t,e;const i=null!=J?null===J||void 0===J||null===(t=J.options)||void 0===t?void 0:t.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))})):-1,n=-1!==i?null===J||void 0===J||null===(e=J.variants)||void 0===e?void 0:e.map((t=>{var e,n;const o=null===t||void 0===t?void 0:t[`option${i+1}`];return null!==t&&void 0!==t&&null!==(e=t.featured_image)&&void 0!==e&&e.src?{color:o,src:null===t||void 0===t||null===(n=t.featured_image)||void 0===n?void 0:n.src}:null})):[];let o=[];var r;-1!==i&&(o=null===J||void 0===J||null===(r=J.images)||void 0===r?void 0:r.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc}))));ot({position:i,finalArr:n,finalArrExternal:o})}),[J]);var ct=.72*b,ut=.37*ct,vt=ct*(.48-.37),gt=.95*ct+"px",ft=ut+"px",wt=.12*ut;function jt(){window.location.href=function(t){return(0,c.lj5)(w)?t.product_link+"?"+(0,c.awP)(w)+"&"+(0,c.n9s)(w)+"&"+(0,c.vaK)(w):t.product_link}(k)}return(0,x.jsx)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:W,marginBottom:"24px",width:gt,boxShadow:"round"==T?"dark-lg":null,onClick:()=>{!function(t,e){v||m||(async()=>{(0,l.wz)(t,e)})(),"72550089015"==w?jt():it(e),I(!0)}(et,k)},backgroundColor:(0,K.lA)("#ffffff",(0,c.U5_)(w)),animation:S?A.mT:null,borderRadius:"round"==T?"xl":null,overflow:"hidden",onAnimationEnd:()=>{I(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(w),borderColor:(0,c.qPe)(w)},children:(0,x.jsxs)(s.Kq,{display:"flex",direction:"row",width:"full",height:"fit-content",justifyContent:"center",alignContent:"center",cursor:"pointer",alignItems:"center",gap:"8px",children:[(0,x.jsx)(s.xu,{height:ft,width:ft,children:(0,x.jsx)(g.Ee,{width:"100%",height:"100%",src:(0,pt.s)(null!==(e=null!==(i=null===nt||void 0===nt||null===(o=nt.finalArr)||void 0===o||null===(r=o.find((t=>(null===t||void 0===t?void 0:t.color)==(null===M||void 0===M?void 0:M[null===nt||void 0===nt?void 0:nt.position]))))||void 0===r?void 0:r.src)&&void 0!==i?i:null===nt||void 0===nt||null===(a=nt.finalArrExternal)||void 0===a||null===(d=a.find((t=>(null===t||void 0===t?void 0:t.color)==(null===M||void 0===M?void 0:M[null===nt||void 0===nt?void 0:nt.position]))))||void 0===d?void 0:d.src)&&void 0!==e?e:k.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(w)+" !important"}})}),(0,x.jsx)(s.xu,{height:ft,width:ct-ut+"px",children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",height:"100%",gap:"4px",paddingTop:"12px",width:"100%",children:[(0,x.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",wt+"px","important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",f,"important"),t.style.setProperty("white-space","nowrap","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"),t.style.setProperty("padding","0","important"),t.style.setProperty("font-weight","normal","important"))},children:(0,U.s)(null==k.title?"":k.title.toString())}),(0,c.QaY)(w)?(0,x.jsxs)(s.Kq,{direction:(0,c.$zZ)(w)?"row":"row-reverse",sx:{margin:"0px !important",minHeight:1.1*wt+"px"},children:[rt&&(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*wt*(0,c.Rqt)(w)+"px !important",lineHeight:"100%",sx:{fontFamily:f+" !important",color:(0,c.Uyp)(w)+" !important",fontWeight:"bold"},children:[" "+(0,xt.jx)(null!==H&&void 0!==H?H:null===k||void 0===k?void 0:k.price,"",w,$)," \xa0"]}),(0,B.B)(H,X)&&rt?(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*wt*(0,c.Rqt)(w)+"px !important",fontWeight:"medium !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:f+" !important",color:(0,c.kPs)(w)+" !important",margin:"0px !important",letterSpacing:"normal !important",textDecoration:"line-through !important"},children:[" ",(0,xt.jx)(null!==X&&void 0!==X?X:null===k||void 0===k?void 0:k.compare_price,"",w,$)]}):(0,x.jsx)(x.Fragment,{})]}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(Ft,{baseFontSize:.3*vt,event:et,product:k,cartState:E.state,cartCount:E.cart_count,updateCartState:P,onClickAtc:t=>{"init"===E.state?(z(st,!0),(0,q.GF)({userInteractionType:N.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:F,event:et,productList:[k],ctaList:et.cta})):"awaitingVariantSelection"===E.state&&it(k)},onCartIconClick:t=>{R()}})]})})]})})};var Pt=function(t){const[e]=(0,u.j1)("whatmoreShopId"),[i]=(0,u.j1)("isWhatmoreWebsite"),n=(0,c.eyg)(e),o=t.event,r=t.product;return i?(0,x.jsx)(St,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"broad-tile"==n?(0,x.jsx)(gt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"broad-tile-no-cta"==n?(0,x.jsx)(St,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"broad-tile-new-atc"==n?(0,x.jsx)(Et,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"link_only"==n?(0,x.jsx)(Z,{product:t.product,event:t.event}):"narrow-tile"==n?(0,x.jsx)(bt,{event:o,product:r,productClickHandler:t.productClickHandler,tileWidthFactor:o.products.length>1?.68:void 0}):(0,x.jsx)(x.Fragment,{})},Ot=i(6119),zt=i(3388),Lt=i(7643);var Dt=function(t){const[e,i,n,l]=(0,h.Z)(),[a]=(0,u.j1)("whatmoreShopId"),d=(0,u.MO)("isInDesignMode"),p=(0,u.MO)("isDemoBrand"),v=t.event,m=t.productClickHandler,g=(0,c.eyg)(a);if(!(0,zt.kT)(v))return(0,x.jsx)(x.Fragment,{});if(1==v.products.length&&(void 0==v.cta||0==v.cta.length)){const t=v.products[0];return(0,c.rnv)(a)?(0,x.jsx)(s.Kq,{direction:"horizontal",width:l,height:"fit-content",justifyContent:"center",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))",children:(0,x.jsx)(Lt.u,{userInteractionType:N.K.PRODUCT_CTA_VIEW,event:v,productList:[t],triggerFlag:!d&&!p,children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(bt,{event:v,product:t,productClickHandler:m},v.event_id+t.product_id)})})}):(0,x.jsx)(s.Kq,{direction:"horizontal",width:l,height:"fit-content",justifyContent:"center",backgroundImage:"narrow-tile"==g?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))":null,children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(Lt.u,{userInteractionType:N.K.PRODUCT_CTA_VIEW,event:v,productList:[t],triggerFlag:!d&&!p,children:(0,x.jsx)(Pt,{event:v,product:t,productClickHandler:m},v.event_id+t.product_id)})})})}return(0,x.jsx)(s.M5,{children:(0,x.jsx)("div",{onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,x.jsx)(s.xu,{width:l+"px",backgroundImage:"narrow-tile"==g?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))":null,children:(0,x.jsxs)(o.tq,{className:"product-tile swiper-slide",slidesPerView:1==v.products.length?1:1.4,initialSlide:v.products.length<=2||(0,c.VqZ)(a)?0:1,centeredSlides:!(0,c.VqZ)(a),modules:[r.Gk],mousewheel:{invert:!1,thresholdDelta:20},nested:!0,children:[("STRDOIDF6O7"===a?[v.products[0]]:v.products).map((t=>"oos"!=t.product_status&&(0,x.jsx)(o.o5,{children:(0,x.jsx)(Lt.u,{userInteractionType:N.K.PRODUCT_CTA_VIEW,event:v,productList:[t],triggerFlag:!d&&!p,children:(0,x.jsx)(s.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",alignItems:"center",children:(0,x.jsx)(Pt,{event:v,product:t,productClickHandler:m},v.event_id+t.product_id)})})},v.event_id+t.product_id))),(0,c.pp3)(a)&&void 0!=v.cta&&v.cta.map((t=>(0,x.jsx)(x.Fragment,{children:""!==t.cta_title.trim()&&(0,x.jsx)(o.o5,{children:(0,x.jsx)(s.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",paddingBottom:"12px",alignItems:"center",children:(0,x.jsx)(Ot.Z,{fontFactor:.75,cta:t},v.event_id+t.cta_id)})},v.event_id+t.cta_id)})))]})})})})};var Rt=function(t){const[e,i]=(0,u.j1)("isProductSwiperCatalogOpen"),o=t.event,r=t.productClickHandler;return(0,n.useContext)(fi).isIOS&&e?(0,x.jsx)(Dt,{event:o,productClickHandler:r},o.event_id):(0,x.jsx)(O.MT,{unmountOnExit:!0,initialScale:.2,in:e,children:(0,x.jsx)(Dt,{event:o,productClickHandler:r},o.event_id)})};function Mt(t){const e=t.event,[i,n,o,r]=(0,h.Z)(),[l]=(0,u.j1)("whatmorePrimaryFont");return(0,x.jsx)(s.xu,{width:"fit-content",height:"fit-content",padding:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{overflow:"hidden",size:.15*r+"px",children:(0,x.jsx)(g.Ee,{width:"100%",height:"100%",src:e.thumbnail_image})})}),(0,x.jsx)(s.xu,{width:"fit-content",height:"fit-content",children:(0,x.jsxs)(s.Kq,{direction:"column",width:"fit-content",height:"fit-content",children:[(0,x.jsx)(s.xv,{color:"white",fontSize:.05*r+"px",fontWeight:"bold",fontFamily:"sans-serif",align:"left",sx:{fontFamily:l+" !important"},children:e.presenter_name.substring(0,15)}),(0,x.jsx)(E.Z,{event:e,fontSize:.03*r+"px"})]})})]})})}var At=function(t){const[e]=(0,u.j1)("isInDesignMode"),[i]=(0,u.j1)("isDemoBrand"),[o,r]=(0,u.j1)("isProductSwiperCatalogOpen"),[l,a]=(0,j.Z)(),[d,h]=(0,u.j1)("isFirstIndicatorRenderDone"),p=(0,n.useContext)(fi),[v]=(0,u.j1)("whatmoreShopId"),m=t.event,g=t.isLast,f=t.onCloseCallback,w=t.focusRef,C=t.productClickHandler;return(0,x.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",children:(0,x.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,x.jsx)(s.xu,{width:"full",margin:"2px",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"space-between",paddingRight:"10px",paddingLeft:"10px",children:[(0,x.jsx)(Mt,{event:m}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,x.jsx)(y,{focusRef:w}),(0,x.jsx)(P.Z,{event:m,onCloseCallback:f})]})]})}),(0,x.jsx)(s.xu,{width:"100%",height:"100%",onClick:()=>{a(!l)}}),(0,x.jsxs)(s.xu,{width:"full",height:"fit-content",children:[p.totalEvents>1&&!d&&p.showSwipeIndicator?(0,x.jsx)(s.xu,{width:"full",margin:"2px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,x.jsx)(R,{swipeUp:!g})})}):null,void 0!=m.products&&m.products.length>0?(0,x.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(v)?(0,x.jsx)(s.xu,{w:"100%",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(F,{event:m,onToggle:t=>{r("minimize-button"!==t)}})})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,x.jsx)(Rt,{event:m,productClickHandler:C})})]}):(0,x.jsx)("div",{})]})]})})},Kt=i(8302);function Wt(t){const[e,i,o,r]=(0,h.Z)(),[l]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d,p]=(0,n.useState)(""),v=t.data,m=(t.event,t.product,t.setShowOptionsChart);var f=.4*r*.8*.13;(0,n.useEffect)((()=>{let t="vanyaclothing.myshopify.com";"1972174947"===a?t="vanyaclothing.myshopify.com":"57415434338"===a&&(t="usvanya.myshopify.com");const e=`https://app.kiwisizing.com/api/getSizingChart?shop=${t}&product=${null===v||void 0===v?void 0:v.id}&title=${null===v||void 0===v?void 0:v.title}&tags=&cacheSettingsUpdateAt=2020-08-11T15%3A19%3A49.000Z&settingsVersion=19`;fetch(e).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>{var e,i,n,o,r,l;p(null===t||void 0===t||null===(e=t.sizings)||void 0===e||null===(i=e[0])||void 0===i||null===(n=i.layout)||void 0===n||null===(o=n.data)||void 0===o||null===(r=o[0])||void 0===r||null===(l=r.data)||void 0===l?void 0:l.url)})).catch((t=>{console.error("Error fetching data:",t)}))}),[]);const w=`${b.F4`
|
69
|
+
0% {
|
70
|
+
transform: translateY(100%);
|
71
|
+
}
|
72
|
+
`} 0.5s`;return(0,x.jsx)(s.Kq,{bg:"black",height:"100%",opacity:"100%",width:"100%",borderTopRadius:"xl",animation:w,justifyContent:"center",alignItems:"center",children:(0,x.jsxs)(s.xu,{width:"100%",height:"100%",children:[(0,x.jsx)(g.Ee,{width:"100%",height:"auto",src:(0,c.Zb8)(a)?d:(0,c.KM)(a),objectFit:"contain",borderTopRadius:"xl"}),(0,x.jsx)(s.Kq,{width:"100%",height:"100%",direction:"column",justifyContent:"flex-start",style:{position:"relative",zIndex:1,bottom:"90%"},className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",onClick:t=>{t.stopPropagation(),m(!1)},cursor:"pointer",padding:"4px",children:(0,x.jsx)(Kt.Z,{sx:{boxShadow:3,color:"white !important",fontSize:1.6*f,filter:"drop-shadow(0 0 5px black);"}})})})]})})}var qt=i(5630),Nt=i(6665);function Vt(t){var e;const[i,o]=(0,n.useState)(null),r=t.product;return(0,n.useEffect)((()=>{(0,lt.bN)(r).then((t=>{o(t.variants)}))}),[]),null==i?(0,x.jsx)(x.Fragment,{}):(0,x.jsx)("div",{style:{width:null!==(e=t.width)&&void 0!==e?e:"100%",borderRadius:"6px",height:1.5*t.height,backgroundColor:"white"},children:(0,x.jsxs)("form",{method:"post",action:"/cart/add","accept-charset":"UTF-8",class:"shopify-product-form",enctype:"multipart/form-data",is:"product-form",children:[(0,x.jsx)("input",{type:"hidden",name:"form_type",value:"product"}),(0,x.jsx)("input",{type:"hidden",name:"utf8",value:"\u2713"}),(0,x.jsx)("input",{type:"hidden",name:"id",value:t.variantId}),(0,x.jsx)("input",{type:"hidden",value:t.product.product_link,name:"productUrl"}),(0,x.jsx)("div",{class:"shiprocket-headless","data-type":"product"}),(0,x.jsx)("textarea",{"data-variant-json":"",class:"hide","aria-hidden":"true","aria-label":"Product JSON",children:JSON.stringify(i).toString()})]})})}function Zt(t){const e=t.product;return(0,x.jsx)(Vt,{product:e,variantId:t.variantId,height:t.height,width:t.width})}function Ht(t){var e,i,o,r,a,d,h,p;const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[g]=(0,u.j1)("whatmoreShopId"),[f]=(0,u.j1)("whatmorePrimaryFont"),[w]=(0,u.j1)("whatmoreSecondaryColor"),[j]=(0,u.j1)("websiteLanguage"),y=(0,u.MO)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:C,whatmoreUserInfo:b}=(0,n.useContext)(V.I),[S,k]=(0,n.useState)(!1),{closeClickComponent:_}=(0,n.useContext)(fi),[T,F]=(0,n.useState)(!1),E=t.FONT_SIZE,P=t.data,O=t.event,z=t.selectedVariantId,L=t.product,D=t.itemQuantity,R=t.PRODUCT_TILE_WIDTH,M=t.cartItemCount,A=t.addToCartFlag,K=t.setAddToCartFlag,W=t.soldOutFlag,Z=t.setSoldOutFlag,H=C.landingLocationType,U=C.templateType,B=(0,mt.NY)(H)+(0,mt.dS)(U)+(null!==O&&void 0!==O&&O.isRelatedEvent?"R":"E")+"_"+(null===O||void 0===O?void 0:O.event_id);const Y=t=>{var e,i;(function(t,e){v||m||(async()=>{(0,l.$L)(t,e)})()}(O,L),"buy-now"==t)&&(!function(t,e,i,n,o,r,l){"shopify"==i?(0,lt.bj)(t,e,n,o,r,l):(0,rt.rY)(t,e,n)}(void 0!==z?z:null===P||void 0===P||null===(e=P.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.id,D,(0,c.Ipo)(g),g,B,null===O||void 0===O?void 0:O.location,null===b||void 0===b?void 0:b.userType),(0,q.GF)({userInteractionType:N.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:C,event:O,productList:[L],ctaList:O.cta}));"view-more"==t&&((0,c.lj5)(g)?window.location.href=L.product_link+"?"+(0,c.awP)(g)+"&"+(0,c.n9s)(g)+"&"+(0,c.vaK)(g)+((0,c.C0m)(g)?"¤cy="+L.currency:""):window.location.href=L.product_link+((0,c.C0m)(g)?"?currency="+L.currency:""))};return(0,x.jsxs)(s.Kq,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.2) 0px 4px 6px -2px",position:t.position,bg:"27951333450"==g?"#fff":"#D3D3D3",borderRadius:"10px",bottom:"10px",left:"50%",zIndex:"1",transform:"translateX(-50%)",direction:"row",width:"95%",paddingX:"20px",paddingTop:"15px",paddingBottom:"15px",spacing:"15px",fontSize:.9*E,children:[" ",W?(0,x.jsx)($.zx,{width:"90%",bg:"#252324",variant:"outline",opacity:4,_hover:{bg:"#252324"},height:2.5*E,disabled:!0,sx:{borderRadius:"round"==y?"5px":"0px",borderWidth:(0,c.alU)(g),borderColor:(0,c.qPe)(g)},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"white !important",fontFamily:f+" !important"},children:"Sold Out"})}):(0,x.jsxs)(s.Kq,{direction:"vertical"==(0,c.rc3)(g)?"column":"row",width:"100%",spacing:"15px",fontSize:.9*E,justifyContent:"center",children:[(0,c.$bv)(g)?(0,x.jsx)($.zx,{width:"fit-content",height:2.5*E,onClick:async t=>{var e,i;t.stopPropagation(),k(!0),function(t,e,i){v||m||(async()=>{(0,l.JX)(t,e,i)})()}(O,L,D),(0,q.GF)({userInteractionType:N.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:C,event:O,productList:[L],ctaList:O.cta});const n=null!==z&&void 0!==z?z:null===P||void 0===P||null===(e=P.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.id;if(!n)return console.log("ERROR! No variants available."),void k(!1);st(n,D,(0,c.Ipo)(g),g,O,L,B,null===O||void 0===O?void 0:O.location,null===b||void 0===b?void 0:b.userType).then((t=>{if(!t.ok)throw new Error(t.status);return t.json()})).then((t=>(k(!1),K(!0),(0,u.bU)("whatmoreAddedToCart",!0),(0,c.kad)(g)&&(v||(async()=>{await(0,lt.Mj)().then((t=>t.json())).catch((t=>{console.error("Whatmore :: Error while fetching cart_token for initiateOrderTrackingEvent.",t)}))})()),t))).catch((t=>{k(!1),Z(!0),console.error("Error:",t)}))},sx:{minWidth:"50%",paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:"#343434"===(0,c.hmr)(g)?w+" !important":(0,c.hmr)(g)+" !important",borderRadius:"round"==y?"27951333450"==g?"50px":"5px":"0px",borderWidth:(0,c.p5R)(g),borderColor:"#343434"===(0,c.hmr)(g)?w:(0,c.hmr)(g),_hover:{backgroundColor:"transparent !important",borderWidth:(0,c.p5R)(g),borderColor:"#343434"===(0,c.yxc)(g)?w:(0,c.yxc)(g)}},children:S?(0,x.jsx)(qt.$,{display:"flex !important",color:"white"}):(0,x.jsx)(s.xv,{fontWeight:"extrabold !important",sx:{color:(0,c.KCy)(g)+" !important",fontFamily:f+" !important"},fontSize:E+"px !important",children:"ADD TO CART"!=(0,c.tan)(g)?(0,c.tan)(g):null!==(e=null===Q||void 0===Q||null===(i=Q[j])||void 0===i?void 0:i.add_to_cart)&&void 0!==e?e:(0,c.tan)(g)})}):(0,x.jsx)(x.Fragment,{}),(0,c.cDD)(g)?(0,x.jsx)(x.Fragment,{children:(0,c.H$w)(g)?(0,x.jsx)(Zt,{variantId:void 0!==z?z:null===P||void 0===P||null===(o=P.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.id,product:L,height:2.5*E,width:"90%",fontSize:E,fontFamily:f}):(0,x.jsx)(x.Fragment,{children:(0,c.Stj)(g)?(0,x.jsx)($.zx,{variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*E,onClick:()=>Y("view-more"),sx:{width:"fit-content",minWidth:"50%",paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:(0,c.IIW)(g)+" !important",borderRadius:"round"==y?"27951333450"==g?"50px":"5px":"0px",borderWidth:(0,c.alU)(g),borderColor:(0,c.qPe)(g)},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"#343434"===(0,c.iKW)(g)?w+" !important":(0,c.iKW)(g)+" !important",fontFamily:f+" !important"},fontSize:E,children:"MORE INFO"!=(0,c.Z59)(g)?(0,c.Z59)(g):null!==(a=null===Q||void 0===Q||null===(d=Q[j])||void 0===d?void 0:d.more_info)&&void 0!==a?a:(0,c.Z59)(g)})}):(0,x.jsx)($.zx,{variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*E,onClick:t=>{Y("buy-now")},sx:{width:"fit-content",minWidth:"50%",paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:(0,c.IIW)(g)+" !important",borderRadius:"round"==y?"27951333450"==g?"50px":"5px":"0px",borderWidth:(0,c.p5R)(g),borderColor:"#343434"===(0,c.yxc)(g)?w:(0,c.yxc)(g),_hover:{backgroundColor:"transparent !important"}},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold !important",sx:{color:"#343434"===(0,c.iKW)(g)?w+" !important":(0,c.iKW)(g)+" !important",fontFamily:f+" !important"},fontSize:E+"px !important",children:"BUY NOW"!=(0,c.ZuH)(g)?(0,c.ZuH)(g):null!==(h=null===Q||void 0===Q||null===(p=Q[j])||void 0===p?void 0:p.buy_now)&&void 0!==h?h:(0,c.ZuH)(g)})})})}):(0,x.jsx)(x.Fragment,{})]}),(0,x.jsx)(x.Fragment,{children:(0,c.$bv)(g)?(0,x.jsx)(x.Fragment,{children:T?(0,x.jsx)(s.kC,{width:"10%",spacing:"0",right:0,children:(0,x.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,x.jsx)(Nt.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*E}})})}):(0,x.jsxs)(s.kC,{animation:A?I:"none",onAnimationEnd:()=>K(!1),width:"10%",spacing:"0",right:0,onClick:()=>{"do_nothing"!==(0,c.v9M)(g)&&("go_to_cart_page"!==(0,c.v9M)(g)?(F(!0),function(t){"open_cart_slider"!==(0,c.v9M)(t)||null!==_&&_()}(g)):ct((0,c.Ipo)(g),g))},cursor:"pointer",children:[(0,x.jsx)(X.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*E}}),M>0?(0,x.jsx)(s.Cd,{padding:"2px",bg:"white",size:1.1*E,top:.03*-R,verticalAlign:"top",position:"relative",left:.11*-R,zIndex:"1",children:(0,x.jsx)(s.xv,{sx:{color:"black !important",fontFamily:f+" !important"},fontWeight:"bold !important",fontSize:.7*E+"px !important",children:M})}):(0,x.jsx)(x.Fragment,{})]})}):(0,x.jsx)(x.Fragment,{})})]})}function Ut(t){const[e]=(0,u.j1)("whatmorePrimaryFont"),i=((0,u.MO)("whatmoreShopId"),t.setOpenShopNow),n=t.FONT_SIZE,o=t.setLockSwiper;return(0,x.jsxs)(s.kC,{justifyContent:"center",paddingTop:"10px",paddingBottom:"8px",width:"100%",children:[(0,x.jsx)(s.kC,{width:"10%",display:"flex !important"}),(0,x.jsx)(s.kC,{width:"90%",justifyContent:"center",children:(0,x.jsx)(s.xv,{align:"center",fontSize:1.25*n,fontWeight:"semibold",sx:{color:"black !important",fontFamily:e+" !important"},as:"b",children:"Shop Now"})}),(0,x.jsx)(s.kC,{justifyContent:"center",width:"10%",alignItems:"center",onClick:t=>{t.stopPropagation(),i(!1),o(!1)},cursor:"pointer",children:(0,x.jsx)(Kt.Z,{sx:{boxShadow:3,color:"black !important",fontSize:1.2*n,filter:"drop-shadow(0 0 5px black);"}})})]})}function Bt(t){var e;const[i]=(0,u.j1)("whatmorePrimaryFont"),n=((0,u.MO)("whatmoreShopId"),t.FONT_SIZE),o=t.data;return(0,x.jsxs)(s.Kq,{direction:"column",paddingX:"20px",height:"fit-content",children:[(0,x.jsx)(s.Kq,{children:(0,x.jsx)(s.xv,{fontSize:n+"px !important",fontWeight:"bold !important",justifyContent:"center",sx:{color:"black !important",fontFamily:i+" !important"},children:"Description"})}),(0,x.jsx)(s.Kq,{children:(0,x.jsx)(s.xu,{overflowY:"auto",scrollBehavior:"smooth",sx:{"::-webkit-scrollbar":{display:"none"}},children:(0,x.jsx)(s.xv,{fontSize:.8*n+"px !important",justifyContent:"normal",fontWeight:"normal !important",dangerouslySetInnerHTML:{__html:(r=null!==(e=null===o||void 0===o?void 0:o.description)&&void 0!==e?e:null===o||void 0===o?void 0:o.body_html,r.replace(/style="[^"]*color[^"]*"/gi,""))},sx:{fontFamily:i+" !important",lineHeight:"140% !important"}})})})]});var r}const Yt=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{color:"black",paddingTop:"2px"},children:(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-box-arrow-up-right",viewBox:"0 0 16 16",style:{stroke:"black",strokeWidth:"0.4"},children:[(0,x.jsx)("path",{"fill-rule":"evenodd",d:"M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5"}),(0,x.jsx)("path",{"fill-rule":"evenodd",d:"M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0z"})]})})};function Xt(t){var e;const[i,o]=(0,n.useState)(t.product),[r]=(0,u.j1)("whatmorePrimaryFont"),[l]=(0,u.j1)("whatmoreShopId"),[a]=(0,u.j1)("whatmoreSecondaryColor");(0,n.useEffect)((()=>{(0,c.N8M)(l)&&(0,xt.Rb)(i,(0,c.Ipo)(l),l).then((t=>{o(t)}))}),[]);const d=t.FONT_SIZE,h=t.data,p=t.itemPrice;let v,m,g;var f,w,j;"STRDOIDF6O7"==l&&(v=null===h||void 0===h||null===(f=h.variants)||void 0===f?void 0:f.find((e=>e.id==t.selectedVariantId)),m=null===(w=v)||void 0===w?void 0:w.title,g=null===(j=v)||void 0===j?void 0:j.productLink);const y=(()=>{var e;const i=null===h||void 0===h||null===(e=h.variants)||void 0===e?void 0:e.find((e=>e.id==t.selectedVariantId));return null!==i&&void 0!==i&&i.compare_at_price&&parseFloat(i.compare_at_price)>0?i.compare_at_price:null})(),C=y&&0!=y&&y>p?Math.round((y-p)/y*100):NaN;return(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)(s.kC,{direction:"column",paddingLeft:"20px",paddingRight:"20px",paddingY:"5px",children:[(0,x.jsx)(s.rU,{href:function(t){return(0,c.lj5)(l)?("STRDOIDF6O7"==l?g:t.product_link)+"?"+(0,c.awP)(l)+"&"+(0,c.n9s)(l)+"&"+(0,c.vaK)(l)+((0,c.C0m)(l)?"¤cy="+t.currency:""):("STRDOIDF6O7"==l?g:t.product_link)+((0,c.C0m)(l)?"?currency="+t.currency:"")}(i),color:"white",width:"fit-content",children:(0,x.jsxs)(s.kC,{sx:{display:"flex",gap:"6px"},children:[(0,x.jsx)(s.xv,{isTruncated:!0,noOfLines:2,padding:"2px",fontSize:d,sx:{color:"black !important",lineHeight:"140% !important",fontFamily:r+" !important"},as:"b",children:"STRDOIDF6O7"==l&&null!==(e=m)&&void 0!==e?e:null===h||void 0===h?void 0:h.title}),(0,x.jsx)(Yt,{iconSize:1.1*d})]})}),(0,x.jsxs)(s.kC,{direction:"row",gap:"6px",paddingTop:"4px",children:[y&&y>p&&(0,x.jsx)(s.xv,{as:"s",padding:"2px",fontSize:1.2*d,fontWeight:"semibold",sx:{color:"gray !important",fontFamily:r+" !important"},children:(0,xt.jx)(parseFloat(y)," ",l,i.currency,!0)}),(0,x.jsx)(s.xv,{as:"b",padding:"2px",fontSize:1.2*d,fontWeight:"semibold !important",sx:{color:"black !important",fontFamily:r+" !important"},children:(0,xt.jx)(parseFloat(p),"",l,i.currency,!0)}),!isNaN(C)&&0!=C&&(0,x.jsx)(s.xu,{display:"flex",backgroundColor:"green"==(0,c.ZJm)(l)?"#343434"==a?(0,c.ZJm)(l):a:(0,c.ZJm)(l),alignItems:"center",borderRadius:"4px",width:"fit-content",px:"6px",children:(0,x.jsx)(s.xv,{fontSize:(0,c.sTg)(l)?"14px !important":1.1*d,fontWeight:"normal !important",sx:{color:(0,c.mso)(l)+" !important",fontFamily:r+" !important"},children:(0,c.sTg)(l)?`${C}% off`:`Save ${(0,xt.jx)(parseFloat(y/100-p/100)," ",l,i.currency)}`})})]})]})})}function Gt(t){var e,i;const[o]=(0,u.j1)("whatmorePrimaryFont"),[r]=(0,u.j1)("whatmoreShopId"),{setShowOptionsChart:l}=(0,n.useContext)(ie),[a,d]=(0,n.useState)({}),h=(0,u.MO)("whatmoreSecondaryColorShade300"),p=t.setSelectedColor,v=t.selectOptionFirstHandler,m=t.selectOptionSecondHandler,f=t.selectOptionThirdHandler,w=t.isVariantAvailable,j=t.FONT_SIZE,y=t.data,C=(t,e,i)=>{if(2==i)d((i=>({...i,[t]:e})));else if(1==i)d((i=>{var n,o,r,l;return{...i,[t]:e,[null===y||void 0===y||null===(n=y.options)||void 0===n||null===(o=n[2])||void 0===o?void 0:o.name]:null===y||void 0===y||null===(r=y.variants)||void 0===r||null===(l=r.find((t=>(null===t||void 0===t?void 0:t.option2)==e)))||void 0===l?void 0:l.option3}}));else{var n,o;const i=null===y||void 0===y||null===(n=y.variants)||void 0===n||null===(o=n.find((t=>(null===t||void 0===t?void 0:t.option1)==e)))||void 0===o?void 0:o.option2;d((n=>{var o,r,l,a,d,s,c,u;return{...n,[null===y||void 0===y||null===(o=y.options)||void 0===o||null===(r=o[1])||void 0===r?void 0:r.name]:null===y||void 0===y||null===(l=y.variants)||void 0===l||null===(a=l.find((t=>(null===t||void 0===t?void 0:t.option1)==e)))||void 0===a?void 0:a.option2,[null===y||void 0===y||null===(d=y.options)||void 0===d||null===(s=d[2])||void 0===s?void 0:s.name]:null===y||void 0===y||null===(c=y.variants)||void 0===c||null===(u=c.find((t=>(null===t||void 0===t?void 0:t.option2)==i)))||void 0===u?void 0:u.option3,[t]:e}}))}};return(0,n.useEffect)((()=>{d((t=>{var e,i,n,o,r,l,a,d,s,c,u,h;return{...t,[null===y||void 0===y||null===(e=y.options)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.name]:null===y||void 0===y||null===(n=y.variants)||void 0===n||null===(o=n.find((t=>{var e,i,n;return(null===y||void 0===y||null===(e=y.options)||void 0===e||null===(i=e[0])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option1))&&(null===t||void 0===t?void 0:t.available)})))||void 0===o?void 0:o.option1,[null===y||void 0===y||null===(r=y.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name]:null===y||void 0===y||null===(a=y.variants)||void 0===a||null===(d=a.find((t=>{var e,i,n;return(null===y||void 0===y||null===(e=y.options)||void 0===e||null===(i=e[1])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option2))&&(null===t||void 0===t?void 0:t.available)})))||void 0===d?void 0:d.option2,[null===y||void 0===y||null===(s=y.options)||void 0===s||null===(c=s[2])||void 0===c?void 0:c.name]:null===y||void 0===y||null===(u=y.variants)||void 0===u||null===(h=u.find((t=>{var e,i,n;return(null===y||void 0===y||null===(e=y.options)||void 0===e||null===(i=e[2])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option3))&&(null===t||void 0===t?void 0:t.available)})))||void 0===h?void 0:h.option3}}))}),[]),(0,x.jsx)(s.kC,{direction:"row",paddingLeft:"20px",paddingRight:"20px",paddingY:"10px",children:(null===y||void 0===y||null===(e=y.options)||void 0===e?void 0:e.length)>0&&(0,x.jsx)(s.kC,{direction:"column",width:"100%",gap:"4px",children:null===y||void 0===y||null===(i=y.options)||void 0===i?void 0:i.map(((e,i)=>{var n,d,u,b,S,I;return(0,x.jsx)(x.Fragment,{children:"mlveda_country"!==(null===e||void 0===e?void 0:e.name)&&((null===e||void 0===e||null===(n=e.values)||void 0===n?void 0:n.length)>1||"Colour"===(null===e||void 0===e?void 0:e.name)||(null===e||void 0===e||null===(d=e.name)||void 0===d?void 0:d.toLowerCase().includes("color"))||1==(null===e||void 0===e||null===(u=e.values)||void 0===u?void 0:u.length)&&(null===e||void 0===e?void 0:e.position)>1&&(null===e||void 0===e?void 0:e.position)==(null===y||void 0===y||null===(b=y.options)||void 0===b?void 0:b.length))&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(s.kC,{justifyContent:"space-between",alignItems:"center",children:[(0,x.jsx)(s.xv,{fontSize:1*j+"px !important",sx:{color:"black !important",fontFamily:o+" !important",fontWeight:"bold !important"},children:null===e||void 0===e?void 0:e.name}),"Size"===e.name&&(0,c.Ip6)(r)?(0,x.jsx)(s.kC,{marginTop:"4px",whiteSpace:"nowrap",cursor:"pointer",children:(0,x.jsx)(s.xv,{fontSize:.7*j,as:"u",sx:{color:"black !important",fontFamily:o+" !important"},onClick:()=>{null!==l&&l(!0)},children:(0,c.meb)(r)})}):(0,x.jsx)(x.Fragment,{})]}),(0,x.jsx)(s.Ug,{spacing:0,flexWrap:"wrap",alignContent:"flex-start",alignItems:"center",justifyContent:"flex-start",children:null===e||void 0===e||null===(S=e.values)||void 0===S?void 0:S.map((n=>{var l,d,u,b,S,I,k,_,T;const F=w(n,i),E=0==i||y.variants.find((t=>{var e,o;return t[`option${i}`]==(null===(e=Object.entries(a))||void 0===e||null===(o=e[i-1])||void 0===o?void 0:o[1])&&t[`option${i+1}`]==n}));return("Colour"===(null===e||void 0===e?void 0:e.name)||null!==e&&void 0!==e&&e.name.toLowerCase().includes("color"))&&E&&((null===t||void 0===t||null===(l=t.finalArr)||void 0===l?void 0:l.length)>0&&(null===t||void 0===t||null===(d=t.finalArr)||void 0===d||!d.includes(null))||(null===t||void 0===t||null===(u=t.finalArrExternal)||void 0===u?void 0:u.length)>0)?(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(s.kC,{paddingBottom:"8px",px:"2px",paddingRight:"8px",children:(0,x.jsx)(s.xu,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px",borderRadius:(0,c.lmH)(r),size:"sm",border:a[null===e||void 0===e?void 0:e.name]===n?`2px solid ${(0,c.ua_)(r)} !important`:"",cursor:"pointer",width:"fit-content !important",onClick:()=>{C(null===e||void 0===e?void 0:e.name,n,i),p(n),0===i&&v(n),1===i&&m(n),2===i&&f(n)},children:(0,x.jsx)(g.Ee,{padding:"2px",borderRadius:(0,c.lmH)(r),width:"58px",height:"58px",src:(0,pt.s)(null!==(b=null===t||void 0===t||null===(S=t.finalArr)||void 0===S||null===(I=S.find((t=>(null===t||void 0===t?void 0:t.color)==n)))||void 0===I?void 0:I.src)&&void 0!==b?b:null===t||void 0===t||null===(k=t.finalArrExternal)||void 0===k||null===(_=k.find((t=>(null===t||void 0===t?void 0:t.color)==n)))||void 0===_?void 0:_.optionsrc,"?width=400&height=400")})})},n)}):E&&(0,x.jsx)(s.kC,{paddingBottom:"8px",paddingRight:"8px",children:(0,x.jsx)($.zx,{isDisabled:!F,size:"sm",px:"8px !important",bg:a[null===e||void 0===e?void 0:e.name]===n&&F?(null!==(T=(0,c.CPm)(r))&&void 0!==T?T:h)+" !important":(0,c.bC3)(r)+" !important",width:"fit-content !important",onClick:()=>{"76408193304"!=r||"Size"!=(null===e||void 0===e?void 0:e.name)||"Customize"!=n?(C(null===e||void 0===e?void 0:e.name,n,i),0===i&&v(n),1===i&&m(n),2===i&&f(n)):window.location.href=t.product.product_link},children:(0,x.jsx)(s.xv,{as:F?"p":"s",textDecoration:F?"none":"line-through",fontSize:.9*j+"px !important",sx:{fontFamily:o+" !important",fontWeight:"normal !important",color:a[null===e||void 0===e?void 0:e.name]===n&&F?(0,c.cY_)(r)+" !important":(0,c.FbM)(r)+" !important"},children:n})})},n)}))}),i===(null===y||void 0===y||null===(I=y.options)||void 0===I?void 0:I.length)-1&&(0,x.jsx)(s.M5,{paddingTop:"8px",width:"100%",children:(0,x.jsx)(s.iz,{color:t.dividerColor,size:"xs"})})]})})}))})})}var $t=i(8782);function Qt(t){var e,i,o,r,l,a,d,p,v,m,f,w,j,y,C,S,I,k,_,T,F;const[E,P,O,z]=(0,h.Z)();var L=.4*z*.8,D=L*(16/9)*.6*.8;const R=1.1*L,A=R*(16/9)*.8;var K=.12*L;const[W,q]=(0,n.useState)(!1),N=t.data,V=t.event,Z=t.product,H=t.setOpenShopNow,U=t.setLockSwiper,[B,Y]=(0,n.useState)({});(0,n.useEffect)((()=>{Y((t=>{var e,i,n,o,r,l,a,d,s,c,u,h;return{...t,[null===N||void 0===N||null===(e=N.options)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.name]:null===N||void 0===N||null===(n=N.variants)||void 0===n||null===(o=n.find((t=>{var e,i,n;return(null===N||void 0===N||null===(e=N.options)||void 0===e||null===(i=e[0])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option1))&&(null===t||void 0===t?void 0:t.available)})))||void 0===o?void 0:o.option1,[null===N||void 0===N||null===(r=N.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name]:null===N||void 0===N||null===(a=N.variants)||void 0===a||null===(d=a.find((t=>{var e,i,n;return(null===N||void 0===N||null===(e=N.options)||void 0===e||null===(i=e[1])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option2))&&(null===t||void 0===t?void 0:t.available)})))||void 0===d?void 0:d.option2,[null===N||void 0===N||null===(s=N.options)||void 0===s||null===(c=s[2])||void 0===c?void 0:c.name]:null===N||void 0===N||null===(u=N.variants)||void 0===u||null===(h=u.find((t=>{var e,i,n;return(null===N||void 0===N||null===(e=N.options)||void 0===e||null===(i=e[2])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option3))&&(null===t||void 0===t?void 0:t.available)})))||void 0===h?void 0:h.option3}}))}),[]);const X=(t,e)=>{var i,n,o,r,l,a,d,s,c,u;if(null===N||void 0===N||null===(i=N.options)||void 0===i||!i.length)return!1;const h=null===N||void 0===N||null===(n=N.options)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.name,p=null===N||void 0===N||null===(r=N.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name;null===N||void 0===N||null===(a=N.options)||void 0===a||null===(d=a[2])||void 0===d||d.name;switch(null===N||void 0===N||null===(s=N.options)||void 0===s?void 0:s.length){case 1:return null===N||void 0===N||null===(c=N.variants)||void 0===c?void 0:c.some((e=>e.option1===t&&e.available));case 2:var v;return 0===e?null===N||void 0===N||null===(v=N.variants)||void 0===v?void 0:v.some((e=>e.option1===t&&e.available)):null===N||void 0===N||null===(u=N.variants)||void 0===u?void 0:u.some((e=>e.option2===t&&e.option1===B[h]&&e.available));case 3:var x,m,g;if(0===e)return null===N||void 0===N||null===(x=N.variants)||void 0===x?void 0:x.some((e=>e.option1===t&&e.available));if(1===e)return null===N||void 0===N||null===(m=N.variants)||void 0===m?void 0:m.some((e=>e.option2===t&&e.option1===B[h]&&e.available));if(2===e)return null===N||void 0===N||null===(g=N.variants)||void 0===g?void 0:g.some((e=>e.option3===t&&e.option1===B[h]&&e.option2===B[p]&&e.available));default:return!1}},[G,$]=(0,n.useState)((()=>{var t,e;for(let r=0;r<(null===N||void 0===N||null===(i=N.variants)||void 0===i?void 0:i.length);r++){var i,n,o;const t=null===N||void 0===N||null===(n=N.variants)||void 0===n||null===(o=n[r])||void 0===o?void 0:o.option1;if(t&&X(t,0))return t}return(null===N||void 0===N||null===(t=N.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.option1)||""})),[Q,J]=(0,n.useState)((()=>{var t,e;for(let r=0;r<(null===N||void 0===N||null===(i=N.variants)||void 0===i?void 0:i.length);r++){var i,n,o;const t=null===N||void 0===N||null===(n=N.variants)||void 0===n||null===(o=n[r])||void 0===o?void 0:o.option2;if(t&&X(t,1))return t}return(null===N||void 0===N||null===(t=N.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.option2)||""})),[tt,et]=(0,n.useState)((()=>{var t,e;for(let r=0;r<(null===N||void 0===N||null===(i=N.variants)||void 0===i?void 0:i.length);r++){var i,n,o;const t=null===N||void 0===N||null===(n=N.variants)||void 0===n||null===(o=n[r])||void 0===o?void 0:o.option3;if(t&&X(t,2))return t}return(null===N||void 0===N||null===(t=N.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.option3)||""})),[it,nt]=(0,n.useState)(),[ot,at]=(0,n.useState)(1),[dt,st]=(0,n.useState)(),[ct,ut]=(0,n.useState)(0),[ht,vt]=(0,n.useState)(!1),[xt,mt]=(0,n.useState)(!1),[gt,ft]=(0,n.useState)(Z.thumbnail_image),wt=(0,u.MO)("whatmoreUITheme"),jt=(0,u.MO)("whatmoreShopId"),yt=(0,n.useCallback)((t=>{$(t)}),[]),Ct=(0,n.useCallback)((t=>{J(t)}),[]),bt=(0,n.useCallback)((t=>{et(t)}),[]);(0,n.useEffect)((()=>{var t,e;const i=Jt(N,G,Q,tt);nt(null!==i&&void 0!==i?i:null===N||void 0===N||null===(t=N.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.id),st(te(N,i)),at(1),mt(!1);const n=ee(N,i);null!==n&&ft(n)}),[G,Q,tt]),(0,n.useEffect)((()=>{var t,e;const i=void 0===it?null===N||void 0===N||null===(t=N.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.price:te(N,it);st(i*ot)}),[ot]),(0,n.useEffect)((()=>{function t(t){const e=document.getElementById("whatmore-shopnow-view"),i=document.getElementById("whatmore-size-chart");i&&i.contains(t.target)||!e||e.contains(t.target)||(H(!1),U(!1))}function e(t){t.stopPropagation(),i.scrollTop+=t.deltaY}document.addEventListener("click",t);const i=document.getElementById("whatmore-shopnow-view");return null===i||void 0===i||i.addEventListener("wheel",e),()=>{document.removeEventListener("click",t),i.removeEventListener("wheel",e)}}),[]),(0,n.useEffect)((()=>{const t=async function(t,e){return"shopify"==t?(0,lt.Bi)():(0,rt.OM)(e)}((0,c.Ipo)(jt),jt);t.then((t=>t.json())).then((t=>{ut(t.item_count)})).catch((t=>{console.error("Cart Add Error:",t)}))}),[ht]);const St=`${b.F4`
|
73
|
+
0% {
|
74
|
+
transform: translateY(100%);
|
75
|
+
}
|
76
|
+
`} 0.5s`,It=null===N||void 0===N||null===(e=N.options)||void 0===e?void 0:e.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))})),[kt,_t]=(0,n.useState)(-1!==It?null===(i=N.options)||void 0===i||null===(o=i[It])||void 0===o||null===(r=o.values)||void 0===r?void 0:r[0]:""),[Tt,Ft]=(0,n.useState)({});(0,n.useEffect)((()=>{-1!==It&&"whatmore"!==(0,c.Ipo)(jt)&&async function(){const t=await(0,lt.m3)(Z);Ft(t)}()}),[]);let Et=-1,Pt=-1!==It&&null!==Tt&&void 0!==Tt&&Tt.product&&(null===Tt||void 0===Tt||null===(l=Tt.product)||void 0===l||null===(a=l.images)||void 0===a?void 0:a.length)>=(null===Tt||void 0===Tt||null===(d=Tt.product)||void 0===d||null===(p=d.options)||void 0===p||null===(v=p[It])||void 0===v||null===(m=v.values)||void 0===m?void 0:m.length)?null===Tt||void 0===Tt||null===(f=Tt.product)||void 0===f||null===(w=f.images)||void 0===w?void 0:w.map((t=>{var e,i,n,o,r,l,a,d,s,c,u,h,p,v;const x=null===Tt||void 0===Tt||null===(e=Tt.product)||void 0===e||null===(i=e.options)||void 0===i?void 0:i.findIndex((t=>"Color"==(null===t||void 0===t?void 0:t.name)||"Colour"==(null===t||void 0===t?void 0:t.name)||"COLOR"==(null===t||void 0===t?void 0:t.name)));return{color:(null===t||void 0===t?void 0:t.variant_ids.length)>0?null===Tt||void 0===Tt||null===(n=Tt.product)||void 0===n||null===(o=n.options)||void 0===o||null===(r=o[x])||void 0===r||null===(l=r.values)||void 0===l?void 0:l[Math.min(++Et,(null===Tt||void 0===Tt||null===(a=Tt.product)||void 0===a||null===(d=a.options)||void 0===d||null===(s=d[It])||void 0===s||null===(c=s.values)||void 0===c?void 0:c.length)-1)]:null===Tt||void 0===Tt||null===(u=Tt.product)||void 0===u||null===(h=u.options)||void 0===h||null===(p=h[x])||void 0===p||null===(v=p.values)||void 0===v?void 0:v[Math.max(0,Et)],src:null===t||void 0===t?void 0:t.src}})):[],Ot=[];if("whatmore"==(0,c.Ipo)(jt)&&(null===N||void 0===N||null===(j=N.images)||void 0===j?void 0:j.length)>0){var zt;var Lt;if(-1!==(null===N||void 0===N||null===(zt=N.options)||void 0===zt?void 0:zt.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))}))))Ot=null===N||void 0===N||null===(Lt=N.images)||void 0===Lt?void 0:Lt.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc})))}return Et+1<(null===Tt||void 0===Tt||null===(y=Tt.product)||void 0===y||null===(C=y.options)||void 0===C||null===(S=C[It])||void 0===S||null===(I=S.values)||void 0===I?void 0:I.length)&&(Pt=[]),(0,x.jsxs)(s.kC,{sx:{"&::-webkit-scrollbar":{width:"0px"}},id:"whatmore-shopnow-view",position:"relative",maxHeight:"75vh",overflowY:"scroll",direction:"column",bg:"#FFF",height:"fit-content",opacity:"100%",borderTopRadius:"round"==(null===wt||void 0===wt?void 0:wt.whatmoreUITheme)?"xl":null,animation:St,children:[(0,x.jsx)(Ut,{setOpenShopNow:H,setLockSwiper:U,FONT_SIZE:K}),(0,x.jsx)(s.M5,{marginBottom:"10px",px:"20px",py:"5px",children:(0,x.jsx)(s.kC,{bg:"whiteAlpha.900",width:"fit-content",height:"fit-content",borderRadius:"round"==(null===wt||void 0===wt?void 0:wt.whatmoreUITheme)?"lg":null,overflow:"hidden",sx:{borderWidth:(0,c.alU)(jt),borderColor:(0,c.qPe)(jt)},children:(0,x.jsx)(s.kC,{width:"100%",children:(0,x.jsx)($t.P,{renderElement:t=>(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(s.xu,{width:R+"px",height:A+"px",children:(0,x.jsx)(g.Ee,{width:R+"px",height:A+"px",borderRadius:"round"==(null===wt||void 0===wt?void 0:wt.whatmoreUITheme)?"lg":null,src:(0,pt.s)(t.eventData.src,"&width=400&height=400"),alt:Z.handle,sx:{objectFit:(0,c.yOX)(jt)+" !important"},fallback:(0,x.jsx)(M.Z,{width:R+"px",height:A+"px",borderRadius:"round"==(null===wt||void 0===wt?void 0:wt.whatmoreUITheme)?"10px":"0px"})})})}),dataList:Pt.length>0&&!Pt.includes(null)?null===(k=Pt)||void 0===k?void 0:k.filter((t=>(null===t||void 0===t?void 0:t.color)==kt)):Ot.length>0?[null===(_=Ot)||void 0===_?void 0:_.find((t=>(null===t||void 0===t?void 0:t.color)==kt))]:null===N||void 0===N||null===(T=N.images)||void 0===T?void 0:T.map((t=>({src:t.includes("https")?t:"https:"+t}))),spacing:10,defaultHeight:R+"px",defaultWidth:A+"px",retainAlreadyRenderedElements:!0,isScroll:!0})})})}),(0,x.jsx)(Xt,{data:N,product:Z,PRODUCT_TILE_HEIGHT:D,PRODUCT_TILE_WIDTH:L,FONT_SIZE:K,getVariantPrice:te,selectedVariantId:it,itemPrice:dt,itemQuantity:ot,setItemQuantity:at,thumbnailImage:gt}),(null===N||void 0===N||null===(F=N.variants)||void 0===F?void 0:F.length)>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s.M5,{paddingTop:"4px",width:"100%",children:(0,x.jsx)(s.iz,{color:(0,c.W8U)(jt),size:"xs",width:"90%"})}),(0,x.jsx)(Gt,{data:N,dividerColor:(0,c.W8U)(jt),setSelectedColor:_t,finalArr:Pt,finalArrExternal:Ot,product:Z,PRODUCT_TILE_HEIGHT:D,PRODUCT_TILE_WIDTH:L,FONT_SIZE:K,selectOptionFirstHandler:yt,selectOptionSecondHandler:Ct,selectOptionThirdHandler:bt,getVariantPrice:te,selectedOptionFirst:G,selectedOptionSecond:Q,selectedOptionThird:tt,selectedVariantId:it,isVariantAvailable:X})]}),c.$2G&&((null===N||void 0===N?void 0:N.description)||(null===N||void 0===N?void 0:N.body_html))&&(0,x.jsx)(Bt,{PRODUCT_TILE_HEIGHT:D,FONT_SIZE:K,data:N,handleToggle:()=>q(!W),show:W}),(0,x.jsx)(s.xu,{sx:{pointerEvents:"none"},paddingTop:"20px",opacity:0,children:(0,x.jsx)(Ht,{position:"relative",data:N,FONT_SIZE:K,product:Z})}),(0,x.jsx)(Ht,{position:"fixed",selectedVariantId:it,data:N,FONT_SIZE:K,PRODUCT_TILE_WIDTH:L,product:Z,itemQuantity:ot,cartItemCount:ct,addToCartFlag:ht,setAddToCartFlag:vt,soldOutFlag:xt,setSoldOutFlag:mt,event:V})]})}const Jt=(t,e,i,n)=>{var o;if(!e&&!i&&!n)return;const r=null===t||void 0===t||null===(o=t.variants)||void 0===o?void 0:o.find((t=>(!e||t.option1===e)&&(!i||t.option2===i)&&(!n||t.option3===n)));return r?r.id:void 0},te=(t,e)=>{var i,n;return null===t||void 0===t||null===(i=t.variants)||void 0===i||null===(n=i.find((t=>t.id===e)))||void 0===n?void 0:n.price},ee=(t,e)=>{var i;const n=null===t||void 0===t||null===(i=t.variants)||void 0===i?void 0:i.find((t=>t.id==e));return void 0===n?null:null===n||void 0===n||null===(o=n.featured_image)||void 0===o?void 0:o.src;var o},ie=(0,n.createContext)({setShowOptionsChart:null});var ne=function(t){const e=t.event,i=t.data,o=t.currentProduct,r=t.setOpenShopNow,l=t.setLockSwiper,[a,d]=(0,n.useState)(!1);return(0,x.jsx)(ie.Provider,{value:{setShowOptionsChart:d},children:(0,x.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[(0,x.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",children:(0,x.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,x.jsx)(Qt,{data:i,event:e,product:o,setOpenShopNow:r,setLockSwiper:l})})}),a?(0,x.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",style:{position:"relative",zIndex:1,bottom:"100%"},className:"whatmore-ios-css-relative-fix",id:"whatmore-size-chart",children:(0,x.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,x.jsx)(Wt,{data:i,event:e,product:o,setShowOptionsChart:()=>{d(!1)}})})}):(0,x.jsx)(x.Fragment,{})]})})};var oe=function(t){var e,[i,o,r,l]=(0,h.Z)();const[a,d]=(0,n.useState)(!1),[v,g]=(0,n.useState)(),[f,w]=(0,n.useState)(),j=(0,u.MO)("whatmoreShopId"),y=t.event,C=t.onBack,b=n.useRef(),S=t.isPlaying,I=t.isLast,k=t.setLockSwiper,_=t.selectedVariantId,T=null===(e=t.showOverlay)||void 0===e||e,F="center";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:l,height:r,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:F,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:l/r,children:(0,x.jsx)(m,{height:"100%",width:"100%",url:y.event_hls_url,isPlaying:S,event:y})})})}),T?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:F,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(At,{focusRef:b,event:t.event,isLast:I,onCloseCallback:C,productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(j),j);w(t),g(e),d(!0),k(!0)}})})}):(0,x.jsx)(x.Fragment,{}),!0===a?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:F,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(ne,{focusRef:b,event:t.event,isLast:I,onCloseCallback:()=>C(),setLockSwiper:k,data:v,currentProduct:f,setOpenShopNow:d,selectedVariantId:_})})}):(0,x.jsx)("div",{})]})})};const re=function(t,e){return isNaN(t)||isNaN(e)||e<=0||t>e?0:Math.ceil(t/e*100)};function le(t){var e,i,[n,o,r,l]=(0,h.Z)();const[a]=(0,u.j1)("whatmoreSecondaryColor"),[d]=(0,u.j1)("whatmoreSecondaryColorShade900"),c=t.progress,p=null!==(e=t.totalSiblings)&&void 0!==e?e:1,v=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0;return(0,x.jsx)(s.Kq,{width:"96%",height:"fit-content",direction:"row",justifyContent:"center",alignItems:"center",spacing:"1px",children:[...Array(p).keys()].map((t=>(0,x.jsx)(s.Kq,{width:"100%",height:.004*r+"px",backgroundColor:t<v?a:d+"99",borderRightRadius:"lg",borderLeftRadius:"lg",direction:"row",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",sx:{display:"block !important"},children:t==v?(0,x.jsx)(s.xu,{height:"100%",width:c+"%",bgColor:a,borderRightRadius:"lg",borderLeftRadius:"lg",sx:{display:"block !important"}}):(0,x.jsx)(x.Fragment,{})},"event-progress-bar-slab-"+t)))})}var ae=i(868),de=i(3238);const se=t=>t>=1e3?(t/1e3).toFixed(1)+"k":t,ce=()=>"undefined"!==typeof window&&window.innerWidth>=1024;var ue=function(t){var e,i,o,r,a,d=t.whatmoreShareTemplateId;const p=t.whatmoreShareStoryId,v=t.whatmoreShareEventId,m=t.event,g=null===(e=t.showShareText)||void 0===e||e,f=null!==(i=t.shareButtonBottomMargin)&&void 0!==i?i:0,w=(0,u.MO)("whatmoreShopId"),j=(0,u.MO)("isInDesignMode"),y=(0,u.MO)("isDemoBrand"),C=(0,u.MO)("whatmorePrimaryFont"),b=(0,u.MO)("websiteLanguage"),{whatmoreWidgetSourceDetails:S}=(0,n.useContext)(V.I),[I,k,_,T]=(0,h.Z)(),F=null!==(o=t.iconSize)&&void 0!==o?o:.1*T*(0,c.r5f)(w);function E(){const e=(0,u.MO)("whatmoreLandingLocationType");var i;!function(t){j||y||(async()=>{(0,l.x0)(t)})()}(m),(e.startsWith("product")||"embed"===e)&&(d="te"),i="event_product_link"===(0,c.EEC)(w)?m.products[0].product_link||"":window.location.pathname,i=("event_product_link"===(0,c.EEC)(w)?"":window.location.hostname)+i+"?wtt="+d+"&wsid="+p+"&weid="+v,(0,c.lj5)(w)&&(i=i+"&"+(0,c.awP)(w)+"&utm_campaign=video-share&utm_medium="+e);const n={title:(0,c.JNF)(w),text:`${(0,c.Qa8)(w)} \n ${i} ${(0,c.AWG)(w)?"\n \n -via Whatmore":""}`};navigator.share&&!ce?navigator.share(n):(t.setIsModalOpen(!0),t.setShareText([n,i]))}return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{cursor:"pointer",style:{marginBottom:f+"px"},children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[(0,x.jsx)(de.Z,{sx:{transform:"scaleX(-1)",color:"white",fontSize:F,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),E(),(0,q.GF)({userInteractionType:N.K.VIDEO_SHARE_CTA_CLICKED,widgetSourceDetails:S,event:m,productList:m.products,ctaList:m.cta})}}),g&&(0,c.u8S)(w)?(0,x.jsxs)(s.xv,{fontSize:.3*F+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:C+" !important",color:"white !important",paddingRight:"10%",maxWidth:"48px",wordWrap:"break-word"},children:["\xa0",m.total_share>(0,c.LWl)(w)?se(m.total_share):null!==(r=null===Q||void 0===Q||null===(a=Q[b])||void 0===a?void 0:a.share)&&void 0!==r?r:"Share","\xa0"]}):(0,x.jsx)(x.Fragment,{})]})})})},he=i(7933),pe=i(2785);var ve=function(t){var e,i,o;const r=(0,u.MO)("whatmoreShopId"),a=(0,u.MO)("whatmorePrimaryFont"),d=(0,u.MO)("whatmoreLikedEvents"),p=(0,u.MO)("isInDesignMode"),v=(0,u.MO)("isDemoBrand"),m=(0,u.MO)("websiteLanguage"),{whatmoreWidgetSourceDetails:g}=(0,n.useContext)(V.I),f=t.event,[w,j]=(0,n.useState)(null!==(e=d[f.event_id])&&void 0!==e&&e),[y,C,b,S]=(0,h.Z)(),I=.1*S*(0,c.r5f)(r);function k(t,e){p||v||(async()=>{(0,l.Z6)(t,e)})()}function _(){(0,u.bU)("whatmoreLikedEvents",{...d,[f.event_id]:!w}),w?(k(f,-1),(0,q.GF)({userInteractionType:N.K.VIDEO_UNLIKED,widgetSourceDetails:g,event:f,productList:f.products,ctaList:f.cta})):(k(f,1),(0,q.GF)({userInteractionType:N.K.VIDEO_LIKED,widgetSourceDetails:g,event:f,productList:f.products,ctaList:f.cta})),j(!w)}const T=f.total_like+(w?1:0);return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{cursor:"pointer",children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[w?(0,x.jsx)(pe.Z,{sx:{boxShadow:3,color:(0,c.dmX)(r),fontSize:I,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),_()}}):(0,x.jsx)(he.Z,{sx:{boxShadow:3,color:"white",fontSize:I,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),_()}}),(0,x.jsx)(x.Fragment,{children:(0,c.CEM)(r)?(0,x.jsxs)(s.xv,{fontSize:.3*I+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:a+" !important",color:"white !important",position:"relative",bottom:"5px"},children:["\xa0",T>=(0,c.zKg)(r)?se(T):null!==(i=null===Q||void 0===Q||null===(o=Q[m])||void 0===o?void 0:o.like)&&void 0!==i?i:"Like","\xa0"]}):(0,x.jsx)(x.Fragment,{})})]})})})};const xe=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#25D366",borderRadius:"50%",padding:.3*e},children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"white",class:"bi bi-whatsapp",viewBox:"0 0 16 16",children:(0,x.jsx)("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})})})};var me=i(8866);const ge=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-twitter-x",viewBox:"0 0 16 16",children:(0,x.jsx)("path",{d:"M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865z"})})})},fe=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-copy",viewBox:"0 0 16 16",children:(0,x.jsx)("path",{"fill-rule":"evenodd",d:"M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z"})})})};var we=t=>{const e=t.shareText,[i,o]=(0,n.useState)("Copy link"),[r,l]=(0,n.useState)("");return(0,x.jsx)(x.Fragment,{children:t.isModalOpen&&(0,x.jsxs)("div",{className:"modal-overlay",style:{backgroundColor:"white",borderRadius:"10px",padding:"12px 12px 20px 12px"},children:[(0,x.jsxs)("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",paddingBottom:"6px"},children:[(0,x.jsx)("img",{onClick:()=>{window.location.href="https://www.whatmore.ai"},src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",backgroundColor:"transparent",borderRadius:"0px",width:Math.min(t.iconSize,28)+"px"}}),(0,x.jsx)(Kt.Z,{onClick:e=>{e.stopPropagation(),t.setIsModalOpen(!1)}})]}),(0,x.jsx)("div",{}),(0,x.jsx)(s.iz,{color:"blackAlpha.500",size:"1px",width:"100%"}),(0,x.jsxs)("div",{className:"social-icons",style:{display:"flex",gap:"20px",justifyContent:"center",paddingTop:"12px"},children:[(0,x.jsxs)("div",{onClick:t=>{var i;t.stopPropagation();const n=encodeURIComponent(null===(i=e[0])||void 0===i?void 0:i.text);window.open(`https://wa.me/?text=${n}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(xe,{iconSize:Math.min(t.iconSize,30)}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"Whatsapp"})]}),(0,x.jsxs)("div",{onClick:t=>{var i;t.stopPropagation();const n=encodeURIComponent(null===(i=e[0])||void 0===i?void 0:i.text);window.open(`https://twitter.com/intent/tweet?text=${n}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(ge,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"X"})]}),(0,x.jsxs)("div",{onClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(e[1]),o("Link copied"),l("green")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(fe,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14),color:r},children:i})]})]})]})})};var je=function(t){var e,i;const n=null===(e=t.brandName)||void 0===e?void 0:e.replace(/\s+/g,"_"),o=(0,u.MO)("whatmorePrimaryFont"),r=(0,u.MO)("whatmoreShopId"),l=null!==(i=t.fontSize)&&void 0!==i?i:"8",[a]=(0,me.Z)(),d=`https://www.whatmore.ai/shoppable-videos?utm_source=${n}&utm_medium=referral&utm_campaign=${"landscape"===a?"customer_referral_desktop":"customer_referral_mobile"}`;return(0,x.jsx)(s.rU,{href:d,isExternal:!0,children:(0,c.XFt)(r)&&(0,x.jsxs)(s.Kq,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content",spacing:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,x.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",o,"important"),t.style.setProperty("font-size",1.1*l+"px","important"),t.style.setProperty("text-align","center","important"),t.style.setProperty("color","white"))},children:"powered by Whatmore"}),(0,x.jsx)(s.xu,{width:"10px"}),(0,x.jsx)("img",{src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",width:1.7*l,backgroundColor:"transparent",borderRadius:"0px"}})]})})},ye=i(4892),Ce=i(1195);var be=()=>(0,x.jsxs)(s.xu,{as:"svg",width:"46px",height:"46px",viewBox:"0 0 24 24",fill:"none",className:"tick-animation",marginBottom:"20px",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"11",stroke:"gray",strokeWidth:"2",fill:"none"}),(0,x.jsx)("path",{d:"M7 12l3 3 7-7",stroke:"gray",strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]});var Se=t=>{var e;const i={text:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.title,options:(null===t||void 0===t?void 0:t.options)||[]},[o,r]=(0,n.useState)(!1),[l,a]=(0,n.useState)(null),[d,c]=(0,n.useState)(null),u=(0,n.useRef)(null),h=(0,n.useContext)(V.I);return(0,n.useEffect)((()=>{if(o){const e=setTimeout((()=>{t.setIsQuestionVisible(!1)}),1e3);return()=>clearTimeout(e)}}),[o]),(0,n.useEffect)((()=>{!o&&u.current&&c(u.current.offsetHeight)}),[o]),(0,x.jsxs)(s.xu,{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",minWidth:"320px",width:"fit-content",bg:"white",borderRadius:"lg",boxShadow:"md",display:"flex",flexDirection:"column",maxWidth:"90%",maxHeight:"90%",overflowY:"visible",ref:u,height:d?`${d}px`:"auto",children:[(0,x.jsx)(s.xu,{position:"absolute",top:"-10px",right:"-10px",bg:"rgba(255, 255, 255, 0.8)",borderRadius:"full",padding:1,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:"10",onClick:()=>{var e;t.setIsQuestionVisible(!1),(0,q.GF)({userInteractionType:N.K.QUESTION_CLOSED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id},widgetSourceDetails:h})},children:(0,x.jsx)(Ce.Z,{})}),(0,x.jsx)(s.xu,{bg:"gray.700",borderTopRadius:"lg",py:3,px:6,display:"flex",flexDirection:"column",justifyContent:"center",width:"100%",children:(0,x.jsx)(s.X6,{py:6,as:"h2",textAlign:"center",style:{fontWeight:"bold",fontSize:"18px",color:"white"},children:null===i||void 0===i?void 0:i.text})}),(0,x.jsx)(s.xu,{flex:"1",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",py:5,px:6,width:"100%",children:o?(0,x.jsxs)(s.xu,{flex:"1",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",children:[(0,x.jsx)(be,{}),(0,x.jsx)(s.X6,{as:"h3",size:"md",color:"gray.700",fontWeight:"medium",textAlign:"center",mt:4,fontSize:"lg",children:"Thank you for your response!"})]}):(0,x.jsx)(s.Kq,{spacing:5,width:"100%",align:"center",children:i.options.map(((e,i)=>(0,x.jsx)(s.xu,{px:4,borderWidth:2,borderRadius:"md",cursor:"pointer",bg:l===e?"gray.200":"white",borderColor:l===e?"gray.400":"gray.200",_hover:{bg:"gray.200"},onClick:()=>(e=>{var i;a(e),r(!0),(0,q.GF)({userInteractionType:N.K.QUESTION_ANSWERED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(i=t.question)||void 0===i?void 0:i.id,response:e},widgetSourceDetails:h})})(e),transition:"background-color 0.2s, border-color 0.2s",display:"flex",alignItems:"center",width:"100%",children:(0,x.jsx)(s.xv,{py:5,color:"gray.800",children:e})},i)))})})]})},Ie=i(2586);var ke=t=>{var e,i;const[o,r]=(0,n.useState)(""),[l,a]=(0,n.useState)(""),[d,h]=(0,n.useState)(!1),[p,v]=(0,n.useState)(!1),m=(0,u.MO)("whatmoreShopId"),g=(0,u.MO)("whatmoreSecondaryColor"),f=(0,u.MO)("whatmorePrimaryFont"),w=null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.title,j=(0,n.useContext)(V.I),y=()=>{var e,i;(()=>{const{type:e}=(null===t||void 0===t?void 0:t.question)||{};return"number"===e?/^\d{10}$/.test(o):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o)})()?(h(!0),(0,q.GF)({userInteractionType:N.K.QUESTION_ANSWERED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id,response:o,type:"number"===(null===t||void 0===t||null===(i=t.question)||void 0===i?void 0:i.type)?"leadgen:number":"leadgen:email"},widgetSourceDetails:j})):a("Please enter valid contact info.")},C=()=>{var e;t.setIsQuestionVisible(!1),(0,q.GF)({userInteractionType:N.K.QUESTION_CLOSED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id},widgetSourceDetails:j})};return(0,x.jsx)(s.kC,{bg:g,p:"6%",borderRadius:"md",boxShadow:"md",width:"90vw",mx:"auto",minH:"40vh",maxH:"80vh",position:"fixed",top:"30%",left:"50%",transform:"translateX(-50%)",direction:"column",align:"center",justify:"center",zIndex:100,overflow:"hidden",children:d?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(s.xu,{textAlign:"center",color:"white",children:[(0,x.jsx)(s.xu,{fontSize:"2xl",fontWeight:"bold",children:"CONGRATULATIONS!"}),(0,x.jsx)(s.xu,{my:"4%",fontSize:"xl",children:"Claim Now"})]}),(0,x.jsx)(s.xu,{position:"absolute",top:"2%",right:"2%",zIndex:20,children:(0,x.jsx)(P.Z,{onCloseCallback:C})}),(0,x.jsxs)(s.xu,{position:"relative",width:"70%",onClick:()=>{const t=(0,c.dKN)(m);navigator.clipboard.writeText(t).then((()=>{v(!0),setTimeout((()=>{C()}),1e3),setTimeout((()=>v(!1)),2e3)}),(()=>{console.error("Failed to copy the coupon code")}))},cursor:"pointer",children:[(0,x.jsxs)(s.xu,{bg:"white",border:"2px dashed black",borderRadius:"md",p:"2%",display:"flex",alignItems:"center",justifyContent:"space-between",mt:"4%",children:[(0,x.jsx)(s.xu,{as:"span",fontWeight:"bold",color:"black",children:(0,c.dKN)(m)}),(0,x.jsx)(Ie.Z,{sx:{color:p?{whatmoreSecondaryColor:g}:"gray",cursor:"pointer",marginLeft:"2%"}})]}),p&&(0,x.jsx)(s.xu,{padding:"4%",position:"absolute",left:"50%",transform:"translateX(-50%)",bg:g,color:"white",fontSize:"12px",borderRadius:"md",px:"2%",py:"0.5%",textAlign:"center",children:"Copied!"})]})]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(s.xu,{textAlign:"center",color:"white",children:[(0,x.jsx)(s.xu,{children:(0,x.jsx)(s.xv,{fontFamily:f,fontSize:"22px",fontWeight:"bold",children:w})}),(0,x.jsx)(s.xu,{marginBottom:"10%",fontSize:"md",children:(0,c.ewB)(m)})]}),(0,x.jsx)(s.xu,{position:"fixed",top:"2%",right:"2%",zIndex:20,children:(0,x.jsx)(P.Z,{onCloseCallback:C})}),(0,x.jsxs)(s.kC,{mt:"4%",align:"center",direction:"column",width:"80%",children:[(0,x.jsx)(s.xu,{sx:{bg:"white",border:"2px solid #4A4A4A",borderRadius:"8px",paddingLeft:"4%",display:"flex",alignItems:"center",marginBottom:"6%",width:"100%",height:"auto",minH:"48px"},children:(0,x.jsx)("input",{fontFamily:f,type:"number"===(null===(i=t.question)||void 0===i?void 0:i.type)?"tel":"email",placeholder:t.placeholder,value:o,onChange:t=>{r(t.target.value),l&&a("")},onKeyDown:t=>{"Enter"===t.key&&y()},style:{fontSize:"1em",border:"none",outline:"none",width:"100%"}})}),l&&(0,x.jsx)(s.xv,{color:"red.500",mb:"4% !important",fontSize:"md",textAlign:"center",width:"100%",children:l}),(0,x.jsx)(s.xu,{as:"button",bg:"#D3D3D3",color:"#343434",borderRadius:"md",fontWeight:"bold",height:"35px",display:"flex",alignItems:"center",justifyContent:"center",onClick:y,width:"50%",children:(0,x.jsx)(s.xv,{fontFamily:f,fontSize:"0.8em",padding:"2%",color:g,children:"SUBMIT"})})]})]})})};var _e=t=>{const[e,i]=(0,n.useState)(null);return(0,x.jsx)(s.xu,{children:!e&&(0,x.jsx)(ke,{question:t.question,onEmailSubmit:t=>{i(t)},setIsQuestionVisible:t.setIsQuestionVisible,placeholder:t.placeholder})})};var Te=t=>{var e;const[i,o]=(0,n.useState)(null),r=t.questionIndex,l=t.questionList;if((0,n.useEffect)((()=>{if(!(r>=l.length))return()=>(0,ot.xw)()}),[]),r>=l.length)return;const a=null===l||void 0===l?void 0:l[r];return"string"===(null===a||void 0===a?void 0:a.type)||"number"===(null===a||void 0===a?void 0:a.type)?(0,x.jsx)(s.xu,{children:(0,x.jsx)(_e,{setIsQuestionVisible:t.setIsQuestionVisible,question:a,placeholder:"number"===(null===a||void 0===a?void 0:a.type)?"Enter your phone number":"Enter your email"})}):(0,x.jsx)(s.xu,{children:(0,x.jsx)(Se,{question:a,options:null===a||void 0===a||null===(e=a.answers)||void 0===e?void 0:e.values.map((t=>null===t||void 0===t?void 0:t.value)),onAnswerSelect:t=>{o(t)},selectedAnswer:i,onClose:()=>{t.setIsQuestionVisible(!1)},setIsQuestionVisible:t.setIsQuestionVisible})})},Fe=i(2882);function Ee(t){var e;const i=t.event,[o,r,l,a]=(0,h.Z)(),[d]=(0,u.j1)("whatmorePrimaryFont"),{whatmoreIsStoriesTemplate:p}=(0,n.useContext)(V.I),[v]=(0,u.j1)("whatmoreSecondaryColor"),[m]=(0,u.j1)("whatmoreShopId"),g=(0,c.f63)(m),f=null!==(e=(0,c.u2W)(m))&&void 0!==e?e:[v,g,v,g,v],w=(0,n.useRef)(null);(0,n.useEffect)((()=>{w.current&&w.current.play()}),[]);const j=(0,ae.V)(null===i||void 0===i?void 0:i.storyset_thumbnail_image);return(0,x.jsx)(x.Fragment,{children:p?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",padding:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-start",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{overflow:"hidden",size:.14*t.width+"px",sx:{boxShadow:"0px 2px 1px 0px "+f[0]+"50, 0px -2px 1px 0px "+f[1]+"50, 2px 0px 1px 0px "+f[2]+"50, -2px 0px 1px 0px "+f[3]+"80, 2px -2px 1px 0px "+f[4]+"80, -2px 2px 1px 0px "+f[0]+"DA, 2px 2px 1px 0px "+f[1]+"DA, -2px -2px 1px 0px "+f[2]+"DA"},children:"video"==(0,pt.$)(j)?(0,x.jsx)(ye.Z,{height:"100%",width:"100%",poster:null===i||void 0===i?void 0:i.thumbnail_image,url:j,isPlaying:!0,event:{event_type:"video"},borderRadius:"50%"}):(0,x.jsx)("img",{src:j,style:{objectFit:"cover",height:"100%",width:"100%",backgroundColor:"white"}})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:.05*t.width+"px",fontWeight:"medium",lineHeight:"100%",sx:{fontFamily:d+" !important",color:"white !important",textShadow:"0px 0px 4px black !important;"},children:i.storyset_name})})]})}):(0,x.jsx)(x.Fragment,{})})}var Pe=function(t){var e,i,o;const[r,a,d]=(0,me.Z)(),[p]=(0,u.j1)("isInDesignMode"),[v]=(0,u.j1)("isDemoBrand"),[m,g]=(0,u.j1)("isProductSwiperCatalogOpen"),[f,w]=(0,u.j1)("isFirstIndicatorRenderDone"),[j]=(0,u.j1)("whatmoreShopId"),C=(0,n.useContext)(fi),{whatmoreEventsBrowsingTemplate:b}=(0,n.useContext)(V.I),[S,I,k,_]=(0,h.Z)(),T=(0,u.MO)("whatmorePrimaryFont"),E=t.event,O=t.storySetId,z=t.isLast,L=t.onCloseCallback,D=t.focusRef,M=t.productClickHandler,A=t.videoPlayingData,K=t.totalSiblingEvents,W=t.indexAmongSiblings,Z=t.leftOpenSpaceClickHandler,H=t.midOpenSpaceClickHandler,U=t.rightOpenSpaceClickHandler,{whatmoreWidgetSourceDetails:B}=(0,n.useContext)(V.I),Y=.1*_,[X,G]=(0,n.useState)(!1),[$,Q]=(0,n.useState)([]),J=t=>{tt.current&&!tt.current.contains(t.target)&&G(!1)},tt=(0,n.useRef)(null);(0,n.useEffect)((()=>(X?document.addEventListener("click",J):document.removeEventListener("click",J),()=>{document.removeEventListener("click",J)})),[X]);const et="Free"==(0,c.Svj)(j)&&"portrait"==r;return(0,x.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[t.isQuestionVisible&&(0,x.jsx)(Lt.u,{userInteractionType:N.K.QUESTION_VIEWED,userInteractionMetadata:{questionId:null===(e=t.questionList)||void 0===e||null===(i=e[t.qIndex])||void 0===i?void 0:i.id},triggerFlag:!p&&!v,children:(0,x.jsx)(Te,{questionList:t.questionList,questionIndex:t.qIndex,setIsQuestionVisible:t.setIsQuestionVisible})}),X&&(0,x.jsx)("div",{ref:tt,className:"whatmore-share-modal",style:{zIndex:100,position:"absolute",boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.6)",width:"75%",top:"45%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},children:(0,x.jsx)(we,{shareText:$,setShareText:Q,iconSize:Y,isModalOpen:X,setIsModalOpen:G})}),"55194878152"==j&&(0,x.jsx)("div",{style:{position:"absolute",boxShadow:"dark-lg",transform:"scale(1.2) translateY(10%) translateX(5%)"},children:(0,x.jsx)("img",{src:"https://s3.ap-south-1.amazonaws.com/whatmorelive.brand.other.assets/nureh/Shop_by_Sale_50_-removebg-preview.png"})}),(!t.isQuestionVisible||t.qIndex>=(null===t||void 0===t||null===(o=t.questionList)||void 0===o?void 0:o.length))&&(0,x.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,x.jsxs)(s.Kq,{width:"full",height:"fit-content",direction:"column",justifyContent:"flex-start",alignItems:"center",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:[C.showVideoPlayingData?(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",marginTop:"5px",justifyContent:"center",children:(0,x.jsx)(le,{progress:re(A.current_time,A.video_duration),totalSiblings:K,indexAmongSiblings:W})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{width:"full",margin:"2px",marginTop:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",paddingRight:"10px",paddingLeft:"10px",children:[(0,x.jsx)(Ee,{event:E,width:_}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,mt.ZK)(b)?(0,x.jsx)(ue,{whatmoreShareTemplateId:(0,mt.QN)(b),whatmoreShareStoryId:O,whatmoreShareEventId:E.event_id,event:E,showShareText:!1,iconSize:.098*_,setIsModalOpen:G,setShareText:Q}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(y,{focusRef:D}),("landscape"!==r||t.showCloseOverlay)&&(0,x.jsx)(P.Z,{event:E,onCloseCallback:L})]})]})})]}),"78232846646"===j&&"portrait"===r&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s.xu,{position:"absolute",top:.49*window.innerHeight+"px",left:.92*window.innerWidth+"px",transform:"translate(-50%, -50%)",zIndex:101,children:(0,x.jsx)(Fe.Z,{style:{fontSize:1.3*Y+"px",transform:"rotate(180deg)",color:"white",cursor:"pointer",filter:"drop-shadow(0 0 5px black)"},onClick:()=>{t.changeSlide(E,"right")}})}),(0,x.jsx)(s.xu,{position:"absolute",top:.42*window.innerHeight+"px",left:.92*window.innerWidth+"px",transform:"translate(-50%, -50%)",zIndex:101,children:(0,x.jsx)(Fe.Z,{style:{fontSize:1.3*Y+"px",color:"white",cursor:"pointer",filter:"drop-shadow(0 0 5px black)"},onClick:()=>{t.changeSlide(E,"left")}})})]}),(0,x.jsxs)(s.Kq,{width:"100%",height:"100%",direction:"row",justifyContent:"center",children:[(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{Z()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"34%",height:"100%",onClick:()=>{H()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{U()},sx:{display:"block !important"}})]}),(0,x.jsxs)(s.xu,{width:"full",height:"fit-content",children:[C.totalEvents>1&&!f&&C.showSwipeIndicator?(0,x.jsx)(s.xu,{width:"full",margin:"2px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,x.jsx)(R,{swipeUp:!z})})}):null,(0,x.jsxs)(s.xu,{width:"fit-content",height:"fit-content",position:"absolute",right:0,bottom:"25%",children:[(0,c.slY)(j)&&!(0,mt.ZK)(b)?(0,x.jsx)(s.xu,{ml:"auto",width:"fit-content",paddingY:"12px",paddingX:"8px",position:"relative",top:"-30px",children:(0,x.jsxs)(s.Kq,{gap:"4px",direction:"column",alignItems:"center",cursor:"pointer",onClick:function(){var t;p||v||(async()=>{(0,l.lY)(E,1)})(),(0,q.GF)({userInteractionType:N.K.WHATSAPP_ICON_CLICKED,widgetSourceDetails:B,event:E,productList:null===E||void 0===E?void 0:E.products,ctaList:null===E||void 0===E?void 0:E.cta});const e=E.products.map((t=>`${t.product_link} \n`)),i=(0,c.gtK)(j),n=`Hey, I am interested in ${E.products.length>1?"these products":"this product"} I saw on ${null===(t=E.products[0])||void 0===t?void 0:t.brand} store: \n${e}. Could you please help me with some queries?`;window.open(i+`&text=${n}&type=phone_number`,"_blank")},children:[(0,x.jsx)(xe,{iconSize:.7*Y,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)(s.xv,{fontSize:Y*(0,c.Xod)(j)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:T+" !important",color:"white !important"},children:(0,c.UiZ)(j)})]})}):(0,x.jsx)(x.Fragment,{}),(0,c.jY3)(j)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",position:"relative",top:"-30px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(ve,{event:E})})}):(0,x.jsx)(x.Fragment,{}),(0,c.ROU)(j)&&!(0,mt.ZK)(b)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",position:"relative",top:"-30px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(ue,{whatmoreShareTemplateId:(0,mt.QN)(b),whatmoreShareStoryId:O,whatmoreShareEventId:E.event_id,event:E,setIsModalOpen:G,setShareText:Q})})}):(0,x.jsx)(x.Fragment,{})]}),(0,zt.kT)(E)?(0,x.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(j)?(0,x.jsx)(s.xu,{w:"100%",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(F,{event:E,onToggle:t=>{g("minimize-button"!==t)}})})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,x.jsx)(Rt,{event:E,productClickHandler:M})})]}):(0,x.jsx)(x.Fragment,{})]}),et&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",bg:"rgba(52, 52, 52, 0.9)",py:"3px",justifyContent:"center",children:(0,x.jsx)(je,{brandName:null===E||void 0===E?void 0:E.brand,fontSize:.033*_})})]})]})},Oe=i(2279),ze=i.n(Oe),Le=i(342);var De=function(t){var e,i,o,r,l,a,[d,m,g,f]=(0,h.Z)();const[w,j]=(0,n.useState)(!1),[y,C]=(0,n.useState)(),[b,S]=(0,n.useState)(),[I,k]=(0,n.useState)({current_time:0,video_duration:0,is_video_ended:!1}),_=(0,u.MO)("whatmoreShopId"),T=t.event,F=t.storyId,E=t.onBack,P=n.useRef(),O=t.changeSlide,z=t.isPlaying,L=t.isLast,D=t.setLockSwiper,R=t.onVideoEndedCallback,M=t.progressUpdateCallback,A=null!==(e=t.totalSiblingEvents)&&void 0!==e?e:0,K=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0,W=null===(o=t.showOverlay)||void 0===o||o,Z=null!==(r=t.leftOpenSpaceClickHandler)&&void 0!==r?r:()=>{},H=null!==(l=t.midOpenSpaceClickHandler)&&void 0!==l?l:()=>{},U=null!==(a=t.rightOpenSpaceClickHandler)&&void 0!==a?a:()=>{},{whatmoreWidgetSourceDetails:B}=(0,n.useContext)(V.I),{questionList:Y}=(0,n.useContext)(fi),X=(null===Y||void 0===Y?void 0:Y.length)>0?parseInt(localStorage.getItem("_whatmore_qview_index")):1e4,[G,$]=(0,n.useState)();(0,n.useEffect)((()=>{$(t.showQuestion)}),[t.showQuestion]);const Q="center";let J;try{J=ze()((()=>{R()}),1e3,{leading:!0,trailing:!1})}catch(tt){console.log(tt)}return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:f,height:g,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:Q,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:f/g,children:(0,x.jsx)(v.Z,{height:"100%",width:"100%",url:(0,ae.V)((0,Le.uv)(T)),isPlaying:z&&(!G||X>=Y.length),timeUpdateCallback:function(t,e){const i=re(t,e);M({watch_time:t,video_duration:e});const n=I.is_video_ended;i>=99&&z&&!n?(J(),k({current_time:t,video_duration:e,is_video_ended:!0})):k({current_time:t,video_duration:e,is_video_ended:n})},event:T,question:G&&X<(null===Y||void 0===Y?void 0:Y.length),source:t.source})})})}),W?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:Q,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(Pe,{focusRef:P,event:t.event,isLast:L,onCloseCallback:t=>{E(t),(0,q.Z2)({userInteractionType:N.K.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:I.current_time,video_duration:I.video_duration},widgetSourceDetails:B,event:T,productList:T.products,ctaList:T.cta})},productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(_),_);S(t),C(e),j(!0),D(!0),(0,q.GF)({userInteractionType:N.K.SHOPNOW_CLICKED,widgetSourceDetails:B,event:T,productList:T.products,ctaList:T.cta}),(0,u.bU)("whatmoreAllowAutoSlide",!1)},videoPlayingData:I,totalSiblingEvents:A,indexAmongSiblings:K,questionList:Y,isQuestionVisible:G&&X<(null===Y||void 0===Y?void 0:Y.length),qIndex:X,setIsQuestionVisible:$,leftOpenSpaceClickHandler:Z,midOpenSpaceClickHandler:H,rightOpenSpaceClickHandler:U,storySetId:F,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:O})})}):(0,x.jsx)(x.Fragment,{}),!0===w?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:Q,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(ne,{focusRef:P,event:t.event,isLast:L,onCloseCallback:()=>E(),setLockSwiper:D,data:y,currentProduct:b,setOpenShopNow:t=>{j(t),(0,u.bU)("whatmoreAllowAutoSlide",!t)}})})}):(0,x.jsx)("div",{})]})})},Re=i(7300),Me=i(8984),Ae=i(58),Ke=i(9723);var We=function(t){var[e,i,n,o]=(0,h.Z)();const r=(0,u.MO)("whatmoreShopId"),l=t.event,a=t.isPlaying,d="center";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:o,height:n,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:d,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:o/n,children:(0,x.jsx)(v.Z,{height:"100%",width:"100%",url:(0,ae.V)((0,Le.uv)(l)),isPlaying:a,timeUpdateCallback:function(t,e){},event:l,source:t.source})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:d,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",backdropFilter:"auto",backdropBlur:"10px",onClick:t=>{(0,Ae.QV)()},children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"full",width:"full",children:[(0,x.jsx)(Ke.Z,{sx:{boxShadow:3,color:(0,c.Ya_)(r),fontSize:.4*o,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{(0,Ae.QV)()}}),(0,x.jsx)(s.xv,{color:"white",fontSize:.05*o+"px",fontWeight:"bold",align:"left",children:"Please click to play video.."})]})})})]})})},qe=i(3433),Ne=i(653);const Ve=n.lazy((()=>i.e(258).then(i.bind(i,5824))));var Ze=function(t){var e,i;const n=t.changeSlide,o=t.event,r=null===(e=t.isPlaying)||void 0===e||e,l=t.onBack,s=t.isLast,c=t.setLockSwiper,h=(t.heightFactor,t.widthFactor,t.onVideoEndedCallback),p=t.progressUpdateCallback,[v,m]=(0,j.Z)(),[g]=(0,u.j1)("whatmoreVideoPlayerPoolBlessed"),f=null===(i=t.showOverlay)||void 0===i||i;function w(){m(!v)}if((0,Me.KE)()&&0==g&&"recommended_images"!=(null===o||void 0===o?void 0:o.event_type))return(0,Ne.j)()?(0,x.jsx)(We,{event:o,onBack:l,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:h,progressUpdateCallback:p,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:f,source:qe.j.CAROUSEL_EVENT_OPENED},"shopping-video-view"+o.event_id):(0,x.jsx)(De,{event:o,onBack:l,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:h,progressUpdateCallback:p,showQuestion:t.showQuestion,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:f,source:qe.j.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:n},"shopping-video-view"+o.event_id);if((0,Re.B6)(o)||(0,Re.WJ)(o))return(0,x.jsx)(De,{event:o,onBack:l,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:h,progressUpdateCallback:p,showQuestion:t.showQuestion,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:f,source:qe.j.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:n},"shopping-video-view"+o.event_id);if("recommended_images"==(null===o||void 0===o?void 0:o.event_type))return(0,x.jsx)(Ve,{onBack:l,mode:t.mode,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,imageUrls:null===o||void 0===o?void 0:o.product_list});if((0,Re.yC)(o)){var{status:y,bannerText:C,timeToStartInMins:b}=d.Z.getEventStatus(o);if(y.name===a.Z.LIVE.name)return(0,x.jsx)(oe,{event:o,onBack:l,isPlaying:r,isLast:s,showOverlay:f},"shopping-live-view"+o.event_id)}return console.error("Can't render event which is neither video or a currently-live-event"),(0,x.jsx)("div",{})},He=i(9284),Ue=i.n(He),Be=i(7463),Ye=i(2154);function Xe(t){var e;const[i,o]=(0,n.useState)(!1),r=t.onClick,l=null!==(e=t.fontSize)&&void 0!==e?e:50;return(0,x.jsx)("div",{style:{height:"fit-content",width:"fit-content",backgroundColor:"black",opacity:.4,borderRadius:"50%"},className:[i?"whatmore-scale-on-tap":""].join(" "),children:"left"===t.type?(0,x.jsx)(Ye.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{o(!0),setTimeout((()=>{o(!1)}),500),r(t,"up")}}):(0,x.jsx)(Be.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{o(!0),setTimeout((()=>{o(!1)}),500),r(t,"down")}})})}var Ge=function(t){var e,i,n;const o=null!==(e=t.relativeBottomPercentage)&&void 0!==e?e:"30%",r=null!==(i=t.width)&&void 0!==i?i:"100%",l=null!==(n=t.fontSize)&&void 0!==n?n:50,a=t.handleClick;return(0,x.jsx)("div",{style:{position:"relative",zIndex:1,bottom:o,width:"100%",height:"fit-content",display:"flex",flexFlow:"row nowrap",justifyContent:"center"},id:"here",children:(0,x.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:r,height:"fit-content",paddingRight:"5px",paddingLeft:"5px",paddingTop:"5px",paddingBottom:"5px",justifyContent:"space-between",alignContent:"center"},children:[(0,x.jsx)(Xe,{type:"left",onClick:a,fontSize:l}),(0,x.jsx)(Xe,{type:"right",onClick:a,fontSize:l})]})})},$e=i(2860),Qe=i(4669);var Je=function(t,e){function i(t,e){return 1==e?0:t<0?e+t:t>=e?t-e:t}const o=(0,n.useRef)({prevIndex:i(t-1,e),activeIndex:t,nextIndex:i(t+1,e)});return[function(){return o.current},function(t){o.current="right"==t?{prevIndex:i(o.current.activeIndex,e),activeIndex:i(o.current.activeIndex+1,e),nextIndex:i(o.current.activeIndex+2,e)}:{prevIndex:i(o.current.activeIndex-2,e),activeIndex:i(o.current.activeIndex-1,e),nextIndex:i(o.current.activeIndex,e)}},function(t){return i(o.current.activeIndex+t)}]};var ti=function(t,e){const i=(0,n.useRef)({clientX:0,clientY:0});return[function(t){i.current.clientX=t.changedTouches[0].clientX,i.current.clientY=t.changedTouches[0].clientY},function(n){const o=i.current.clientX,r=i.current.clientY;var l=o-n.changedTouches[0].clientX,a=r-n.changedTouches[0].clientY;return"vertical"==t&&Math.abs(a)>e||"horizontal"==t&&Math.abs(l)>e?"vertical"==t?a>0?"right":"left":l>0?"right":"left":null}]};var ei=function(t,e){const i=(0,n.useRef)(ze()(((t,e)=>{t(e)}),300,{leading:!0,trailing:!1}));return[function(n,o){var r=0;if(r="vertical"==t?n.deltaY:n.deltaX,Math.abs(r)<=e)return;const l=r>0?"right":"left";i.current(o,l)}]},ii=i(5173);var ni=function(t){const e=t.events,i=t.eventIndex,a=t.onBack;var[d,p,v,m]=(0,h.Z)();const[g]=(0,u.j1)("isInDesignMode"),[f]=(0,u.j1)("isDemoBrand"),[w,j]=(0,n.useState)(!0),[y,C]=(0,u.j1)("isFirstIndicatorRenderDone"),[b,S]=(0,n.useState)(!1),[I,k]=(0,n.useState)({}),{setCloseClickComponent:_}=(0,n.useContext)(fi),{slideDirection:T}=(0,n.useContext)(fi),[F]=(0,u.j1)("whatmoreShopId"),[E]=(0,u.j1)("whatmoreLandingLocationType"),[P,O]=Je(i,e.length),[z,L]=ti(T,50),[D]=ei("vertical",30),[R,M]=(0,n.useState)(!1),[A,W]=(0,n.useState)(null),{whatmoreWidgetSourceDetails:Z,whatmoreUserInfo:H}=(0,n.useContext)(V.I);function U(){M(!1)}function B(t){U(),setTimeout((()=>{a(t)}),500)}(0,n.useEffect)((()=>(M(!0),()=>{})),[]);const Y=Z.landingLocationType,X=Z.templateType;_(B);let G=i;const{questionList:$}=(0,n.useContext)(fi);function Q(){(0,u.MO)("whatmoreAllowAutoSlide")&&(O("right"),A.slideNext())}function J(t,e){O(e),function(t,e){A&&("left"===e?A.slidePrev():A.slideNext())}(0,e)}const tt=Math.round(.05*v);return(0,x.jsx)(Ue(),{isOpen:R,onAfterOpen:function(){},onRequestClose:U,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)(ii.Z,{children:(0,x.jsxs)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:(0,K.lA)("#000000",13)},onTouchStart:t=>{z(t)},onTouchEnd:t=>{if(b)return;const e=L(t);e&&J(0,e)},onWheel:t=>{b||D(t,(t=>{J(0,t)}))},children:[(0,x.jsx)(o.tq,{speed:400,threshold:tt,slidesPerView:1,direction:T,modules:[r.tl,r.Gk],initialSlide:i,loop:1!=e.length,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,allowSlideNext:!b,allowSlidePrev:!b,allowTouchMove:!1,onSwiper:t=>{W(t),(0,q.GF)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:Z,event:e[P().activeIndex],productList:e[P().activeIndex].products})},onSlideChange:t=>{var i;w?j(!1):(y||C(!0),(0,q.Z2)({userInteractionType:N.K.VIDEO_PLAYBACK,userInteractionMetadata:I,widgetSourceDetails:Z,event:e[P().activeIndex],productList:e[P().activeIndex].products}),i=e[P().activeIndex],g||f||null===i||void 0===i||!i.event_id||(async()=>{const t=(0,mt.NY)(Y)+(0,mt.dS)(X)+(null!==i&&void 0!==i&&i.isRelatedEvent?"R":"E")+"_"+(null===i||void 0===i?void 0:i.event_id);(0,l.wh)(i),"index"===E?((0,Qe.Tc)(F,$e.Xh,$e.pR),(0,ot.H4)(i.event_id,i.products,$e.Xh,$e.pR,t,null===i||void 0===i?void 0:i.location,null===H||void 0===H?void 0:H.userType)):E.startsWith("product")||"embed"===E?((0,Qe.Tc)(F,$e.h7,$e.dU),(0,ot.H4)(i.event_id,i.products,$e.h7,$e.dU,t)):E.startsWith("collection")?((0,Qe.Tc)(F,$e.U$,$e.Pk),(0,ot.H4)(i.event_id,i.products,$e.U$,$e.Pk,t)):((0,Qe.Tc)(F,$e.Xh,$e.pR),(0,ot.H4)(i.event_id,i.products,$e.Xh,$e.pR,t))})(),(0,q.y4)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:Z,event:e[P().activeIndex],productList:e[P().activeIndex].products}))},children:[...Array(Math.min(e.length,3)).keys()].map((n=>(0,x.jsx)(o.o5,{children:n=>{let{isActive:o,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=n;const u=o?"activeIndex":r?"prevIndex":"nextIndex",h=P()[u];"activeIndex"==u&&(G=Math.max(G,h),0==h&&(G=0));const p=(null===$||void 0===$?void 0:$.length)>0&&o&&a&&(h>i||G<i&&h>0)&&h>=G&&h%(0,c.rFm)(F)==i%(0,c.rFm)(F);return(0,x.jsx)(s.Kq,{direction:"column",height:window.innerHeight,justifyContent:"center",children:(0,x.jsx)(Ze,{event:e[h],showQuestion:p,onBack:B,isPlaying:1==e.length||o&&a,isLast:!1,setLockSwiper:S,onVideoEndedCallback:Q,progressUpdateCallback:t=>{k(t)},showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,mode:"portrait",changeSlide:J})})}},"event-vertical-scroll-slide-"+n)))}),e.length>1&&!b&&(0,c.h6H)(F)&&"horizontal"===(0,c.e8z)(F)&&"horizontal"===T?(0,x.jsx)(Ge,{relativeBottomPercentage:"50%",width:m,handleClick:(t,e)=>{J(0,"down"==e?"right":"left")},fontSize:parseInt(.12*m)}):(0,x.jsx)(x.Fragment,{})]})})})},oi=i(1168);i(6143),i(7850),i(4444),i(7244),i(123),i(5892),i(1811);const ri=t=>{let{children:e,customClass:i,show:n,closeCallback:o}=t;return oi.createPortal((0,x.jsxs)("div",{className:`whatmore-landscape-modal whatmore-root ${i}`,style:{display:n?"block":"none"},children:[(0,x.jsx)("div",{className:"whatmore-landscape-modal-overlay",onClick:o}),(0,x.jsx)("div",{className:"whatmore-landscape-modal-content",children:e})]}),document.body)};ri.defaultProps={children:(0,x.jsx)("div",{children:"Empty Modal"}),customClass:"",show:!1,closeCallback:()=>!1};var li=ri;var ai=function(t){var e,[i,a,d,p]=(0,h.Z)();const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[g,f]=(0,u.j1)("isFirstIndicatorRenderDone"),[w,j]=(0,n.useState)(0!=t.eventIndex),{setCloseClickComponent:y}=(0,n.useContext)(fi),[C,b]=(0,n.useState)(!1),[S]=(0,u.j1)("whatmoreShopId"),[I]=(0,u.j1)("whatmoreLandingLocationType"),k=(0,u.MO)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:_,whatmoreUserInfo:T}=(0,n.useContext)(V.I),[F,E]=(0,n.useState)(!1),[O,z]=(0,n.useState)(null);function L(){E(!1)}const D=t.events,R=t.eventIndex,M=t.onBack,A=D.concat(D),W=D.length,Z=null===D||void 0===D||null===(e=D[0])||void 0===e?void 0:e.brand,H=(0,n.useRef)(0);function U(t){L(),setTimeout((()=>{M(t)}),500)}function B(){O&&!O.isEnd&&(0,u.MO)("whatmoreAllowAutoSlide")&&O.slideNext()}(0,n.useEffect)((()=>(E(!0),()=>{})),[]),y(U);const Y=_.landingLocationType,X=_.templateType,[G,$]=(0,n.useState)({}),Q=parseInt(Math.min(5,D.length));return(0,x.jsx)(li,{show:F,closeCallback:L,customClass:"whatmore-landscape-modal-swipe-view",children:(0,x.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",alignItems:"center",backgroundColor:(0,K.lA)("#000000",13),children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:p*Q,children:(0,x.jsxs)(o.tq,{onInit:t=>{z(t),(0,q.GF)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:_,event:D[t.activeIndex],productList:D[t.activeIndex].products,ctaList:D[t.activeIndex].cta})},slidesPerView:Q,centeredSlides:!0,allowTouchMove:!1,initialSlide:R,modules:[r.lI,r.W_,r.Gk,r.pt,r.tl],navigation:Q>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*d),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:p*Q,watchSlidesProgress:!0,onSlideChange:t=>{var e;w?j(!1):(g||f(!0),e=D[t.activeIndex],v||m||null===e||void 0===e||!e.event_id||(async()=>{const t=(0,mt.NY)(Y)+(0,mt.dS)(X)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,l.wh)(e),"index"===I?((0,Qe.Tc)(S,$e.Xh,$e.pR),(0,ot.H4)(e.event_id,e.products,$e.Xh,$e.pR,t,null===e||void 0===e?void 0:e.location,null===T||void 0===T?void 0:T.userType)):I.startsWith("product")||"embed"===I?((0,Qe.Tc)(S,$e.h7,$e.dU),(0,ot.H4)(e.event_id,e.products,$e.h7,$e.dU,t)):I.startsWith("collection")?((0,Qe.Tc)(S,$e.U$,$e.Pk),(0,ot.H4)(e.event_id,e.products,$e.U$,$e.Pk,t)):((0,Qe.Tc)(S,$e.Xh,$e.pR),(0,ot.H4)(e.event_id,e.products,$e.Xh,$e.pR,t))})(),(0,q.Z2)({userInteractionType:N.K.VIDEO_PLAYBACK,userInteractionMetadata:G,widgetSourceDetails:_,event:D[t.activeIndex],productList:D[t.activeIndex].products,ctaList:D[t.activeIndex].cta}),(0,q.y4)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:_,event:D[t.activeIndex],productList:D[t.activeIndex].products,ctaList:D[t.activeIndex].cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[D.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(P.Z,{onCloseCallback:M})}),A.slice(R,D.length+R).map(((t,e)=>(0,x.jsx)(o.o5,{children:t=>{let{isActive:i,isPrev:n,isNext:o,isVisible:r,isDuplicate:l}=t;if(i)return(0,x.jsx)(s.Kq,{direction:"column",height:d,width:1*p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==k?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Ze,{event:D[e%W],onBack:U,isPlaying:!0,isLast:e%W===D.length-1,setLockSwiper:b,widthFactor:1,heightFactor:1,onVideoEndedCallback:B,progressUpdateCallback:t=>{$(t)},showCloseOverlay:(null===D||void 0===D?void 0:D.length)<=2,mode:"landscape"})})});if(o)return(0,x.jsx)(s.Kq,{direction:"column",height:d,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{O.slideTo(e%W,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==k?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Ze,{event:D[e%W],onBack:U,isPlaying:!1,isLast:e%W===D.length-1,setLockSwiper:b,widthFactor:1,heightFactor:1,onVideoEndedCallback:B,progressUpdateCallback:t=>{$(t)},showOverlay:!1,mode:"landscape"})})});if(n&&1===H.current)return(0,x.jsx)(s.Kq,{direction:"column",height:d,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{O.slideTo(e%W,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==k?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Ze,{event:D[e%W],onBack:U,isPlaying:!1,isLast:e%W===D.length-1,setLockSwiper:b,widthFactor:1,heightFactor:1,onVideoEndedCallback:B,progressUpdateCallback:t=>{$(t)},showOverlay:!1,mode:"landscape"})})});try{R+e>=W-1&&(H.current=1)}catch(a){console.log(a)}return(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide"+t.event_id)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(je,{brandName:Z,height:.04*d,width:.1*p,fontSize:.02*d})})]})})},di=i(6090),si=i(7616),ci=i(9302),ui=i(2575);var hi=function(t){const[e,i,n,o]=(0,h.Z)(),[r]=(0,u.j1)("whatmorePrimaryColor"),[l]=(0,u.j1)("whatmoreSecondaryColor"),a="flex-end";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:o,height:n,backgroundColor:"whiteAlpha.200",backdropBlur:"10px",children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:a,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.oM,{width:"full",ratio:o/n,children:(0,x.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+r+", gray, "+l+")"})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:a,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{padding:"2px",margin:"5px",borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,x.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",backdropFilter:"auto",backdropBlur:"5px"})})})})]})})};var pi=function(t){var e;const i=t.stories,r=t.onBack,a=t.onStoryCompleteCallback,d=t.isActive,c=null!==(e=t.initialEventIndex)&&void 0!==e?e:0,p=i.events;var[v,m,g,f]=(0,h.Z)();const[w,y]=(0,j.Z)(),[C]=(0,u.j1)("isInDesignMode"),[b]=(0,u.j1)("isDemoBrand"),[S]=(0,u.j1)("whatmoreShopId"),[I,k]=(0,n.useState)(!0),[_,T]=(0,u.j1)("isFirstIndicatorRenderDone"),[F,E]=(0,n.useState)(null),[P,O]=(0,n.useState)(!1),{whatmoreWidgetSourceDetails:z,whatmoreUserInfo:L}=(0,n.useContext)(V.I),[D,R]=Je(c,p.length);function M(t){r(t)}const A=z.landingLocationType,K=z.templateType;function W(){if(!(0,u.MO)("whatmoreAllowAutoSlide"))return;D().activeIndex+1>=p.length?a("right"):(R("right"),F&&F.slideNext())}function Z(t){const e=D().activeIndex;"right"==t&&e+1>=p.length||"left"==t&&e-1<0?a(t):(R(t),F&&("left"==t?F.slidePrev():F.slideNext()))}const[H,U]=(0,n.useState)({});return p[D().activeIndex],(0,x.jsx)("div",{children:(0,x.jsx)(o.tq,{speed:1,slidesPerView:1,direction:"horizontal",initialSlide:0,loop:!0,height:g,width:f,watchSlidesProgress:!0,allowTouchMove:!1,onSwiper:t=>{E(t)},onSlideChange:t=>{I?k(!1):(_||T(!0),(0,q.Z2)({userInteractionType:N.K.VIDEO_PLAYBACK,userInteractionMetadata:H,widgetSourceDetails:z,event:p[D().activeIndex],productList:p[D().activeIndex].products,ctaList:p[D().activeIndex].cta}),function(t){const e=(0,mt.NY)(A)+(0,mt.dS)(K)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);C||b||(async()=>{(0,l.wh)(t),(0,Qe.Tc)(S,$e.Xh,$e.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===L||void 0===L?void 0:L.userType)})()}(p[D().activeIndex]),(0,q.GF)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:z,event:p[D().activeIndex],productList:p[D().activeIndex].products,ctaList:p[D().activeIndex].cta}))},children:[...Array(Math.min(p.length,3)).keys()].map((e=>(0,x.jsx)(o.o5,{children:e=>{let{isActive:n,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=e;if(d){const e=n?"activeIndex":o?"prevIndex":"nextIndex",r=p[D()[e]];return(0,x.jsx)(s.Kq,{direction:"column",height:g,justifyContent:"center",children:(0,Re.B6)(r)||(0,Re.WJ)(r)?(0,x.jsx)(De,{event:r,totalSiblingEvents:p.length,indexAmongSiblings:D()[e],onBack:M,isPlaying:d&&n&&l,isLast:!1,setLockSwiper:O,onVideoEndedCallback:W,progressUpdateCallback:t=>{U(t)},leftOpenSpaceClickHandler:()=>{Z("left")},midOpenSpaceClickHandler:()=>{y(!w)},rightOpenSpaceClickHandler:()=>{Z("right")},storyId:i.id,source:qe.j.STORY_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id):(0,x.jsx)(x.Fragment,{})})}return(0,x.jsx)(s.Kq,{direction:"column",height:v,justifyContent:"center",children:(0,x.jsx)(hi,{})})}},"event-story-view-slide-"+e)))})})};var vi=function(t){const e=t.onBack,i=t.eventsStories,a=t.initialStoryIndex;var[d,c,p,v]=(0,h.Z)();const[m]=(0,u.j1)("isInDesignMode"),[g]=(0,u.j1)("isDemoBrand"),[f,w]=(0,n.useState)(!0),[j,y]=(0,u.j1)("isFirstIndicatorRenderDone"),[C,b]=(0,n.useState)(!1),{setCloseClickComponent:S}=(0,n.useContext)(fi),{slideDirection:I}=(0,n.useContext)(fi),[k]=(0,u.j1)("whatmoreShopId"),[_,T]=Je(a,i.length),[F,E]=ti("horizontal",50),[P]=ei("vertical",30),O=t.eventIndex,[z,L]=(0,n.useState)(!1),[D,R]=(0,n.useState)(null),{whatmoreWidgetSourceDetails:M,whatmoreUserInfo:A}=(0,n.useContext)(V.I);function K(){L(!1)}function W(t){K(),setTimeout((()=>{e(t)}),500)}(0,n.useEffect)((()=>(L(!0),()=>{})),[]),S(W);const Z=M.landingLocationType,H=M.templateType;function U(t){D&&(0,u.MO)("whatmoreAllowAutoSlide")&&(T(t),"right"==t?D.slideNext():D.slidePrev())}function B(t,e){U(e)}return(0,x.jsx)(Ue(),{isOpen:z,onAfterOpen:function(){},onRequestClose:K,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:"#00000088"},onTouchStart:t=>{F(t)},onTouchEnd:t=>{const e=E(t);e&&B(0,e)},onWheel:t=>{P(t,(t=>{B(0,t)}))},children:(0,x.jsx)(o.tq,{speed:1,slidesPerView:1,direction:"horizontal",modules:[r.SH,r.Gk],initialSlide:a,loop:i.length>1,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,onSwiper:t=>{var e,n;R(t),(0,q.GF)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:M,event:i[_().activeIndex].events[0],productList:null===(e=i[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[_().activeIndex].events[0])||void 0===n?void 0:n.cta})},onSlideChange:t=>{var e,n;f?w(!1):(!function(t){const e=(0,mt.NY)(Z)+(0,mt.dS)(H)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);m||g||(async()=>{(0,l.wh)(t),(0,Qe.Tc)(k,$e.Xh,$e.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===A||void 0===A?void 0:A.userType)})()}(i[_().activeIndex].events[0]),(0,q.GF)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:M,event:i[_().activeIndex].events[0],productList:null===(e=i[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[_().activeIndex].events[0])||void 0===n?void 0:n.cta}))},allowTouchMove:!1,cubeEffect:{shadow:!0,slideShadows:!0,shadowOffset:20,shadowScale:.94},children:[...Array(Math.min(i.length,3)).keys()].map((t=>(0,x.jsx)(o.o5,{children:t=>{let{isActive:e,isPrev:n,isNext:o,isVisible:r,isDuplicate:l}=t;const c=e?"activeIndex":n?"prevIndex":"nextIndex";return(0,x.jsx)(s.Kq,{direction:"column",height:d,justifyContent:"center",children:(0,x.jsx)(pi,{stories:i[_()[c]],onBack:W,isActive:e&&r,isNext:o,isPrev:n,onStoryCompleteCallback:U,nextStories:i[_().nextIndex],prevStories:i[_().prevIndex],initialEventIndex:a==_()[c]?O:0},"event-story-view-"+i[_()[c]].id)})}},"event-vertical-scroll-slide-"+t)))})})})};var xi=function(t){var e,i,o,[r,l,a,d]=(0,h.Z)();const[c]=(0,u.j1)("whatmorePrimaryColor"),[p]=(0,u.j1)("whatmoreSecondaryColor"),v=t.event,m=(t.onBack,n.useRef(),null!==(e=t.showPausedVideo)&&void 0!==e&&e),f=null!==(i=t.heightFactor)&&void 0!==i?i:1,w="flex-end";return d*=null!==(o=t.widthFactor)&&void 0!==o?o:1,a*=f,(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:d,height:a,children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:w,height:"full",width:"full",children:(0,x.jsx)(s.xu,{children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:m?(0,Re.B6)(v)||(0,Re.WJ)(v)?(0,x.jsx)(ye.Z,{height:"100%",width:"100%",url:v.thumbnail_image,isPlaying:!1,pauseFromPlayTimeInMs:1e3,event:v}):(0,x.jsx)(g.Ee,{width:"full",height:"full",src:v.thumbnail_image,objectFit:"cover",borderRadius:"lg"}):(0,x.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+c+", gray, "+p+")"})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:w,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,x.jsx)(s.xu,{width:"full",height:"full",backgroundColor:"blackAlpha.400"})})})})]})})};var mi=function(t){var e,i,[a,d,c,p]=(0,h.Z)();const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[g,f]=(0,u.j1)("isFirstIndicatorRenderDone"),[w,j]=(0,n.useState)(0!=t.eventIndex),{setCloseClickComponent:y}=(0,n.useContext)(fi),[C,b]=(0,n.useState)(!1),[S]=(0,u.j1)("whatmoreShopId"),{whatmoreWidgetSourceDetails:I,whatmoreUserInfo:k}=(0,n.useContext)(V.I),[_,T]=(0,n.useState)(!1),[F,E]=(0,n.useState)(null);function O(){T(!1)}t.events;const z=t.eventIndex,L=t.onBack,D=t.eventsStories,R=t.initialStoryIndex,M=null===(e=D[0])||void 0===e||null===(i=e.events[0])||void 0===i?void 0:i.brand;function A(t){O(),setTimeout((()=>{L(t)}),500)}(0,n.useEffect)((()=>(T(!0),()=>{})),[]),y(A);const K=I.landingLocationType,W=I.templateType;function Z(t){F&&!F.isEnd&&("right"==t?F.slideNext():F.slidePrev())}const H=parseInt(Math.min(5,D.length));return(0,x.jsx)(li,{show:_,closeCallback:O,customClass:"whatmore-landscape-modal-stories-view",children:(0,x.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",alignItems:"center",backgroundColor:"blackAlpha.800",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:p*H,children:(0,x.jsxs)(o.tq,{onInit:t=>{var e,i;E(t),(0,q.GF)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:I,event:D[t.activeIndex].events[0],productList:null===(e=D[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=D[t.activeIndex].events[0])||void 0===i?void 0:i.cta})},slidesPerView:H,centeredSlides:!0,allowTouchMove:!1,initialSlide:R,modules:[r.lI,r.W_,r.Gk],navigation:H>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*c),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:p*H,watchSlidesProgress:!0,onSlideChange:t=>{var e,i;w?j(!1):(g||f(!0),function(t){const e=(0,mt.NY)(K)+(0,mt.dS)(W)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);v||m||(async()=>{(0,l.wh)(t),(0,Qe.Tc)(S,$e.Xh,$e.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===k||void 0===k?void 0:k.userType)})()}(D[t.activeIndex].events[0]),(0,q.GF)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:I,event:D[t.activeIndex].events[0],productList:null===(e=D[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=D[t.activeIndex].events[0])||void 0===i?void 0:i.cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[D.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(P.Z,{onCloseCallback:L})}),D.map(((t,e)=>(0,x.jsx)(o.o5,{children:i=>{let{isActive:n,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=i;if(n){const i=1;return(0,x.jsx)(s.Kq,{direction:"column",height:c,width:p*i,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(pi,{stories:t,onBack:A,isActive:n&&l,isNext:!1,isPrev:!1,onStoryCompleteCallback:Z,initialEventIndex:R==e?z:0,showCloseOverlay:(null===D||void 0===D?void 0:D.length)<=2},"event-story-view-"+t.id)})})}return o||r?(0,x.jsx)(s.Kq,{direction:"column",height:c,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{F.slideTo(e,300)},children:(0,x.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(xi,{showPausedVideo:!0,event:D[e].events[0],onBack:A,isPlaying:!1,setLockSwiper:b})})}):(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide-"+e)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(je,{brandName:M,height:.04*c,width:.1*p,fontSize:.02*c})})]})})};const gi=(0,ui.Z)({key:"whatmore-css-sv"}),fi=(0,n.createContext)({isIOS:!1,totalEvents:0,closeClickComponent:null,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:"vertical",showSwipeIndicator:!0,questionList:[]});var wi=function(t){var e,i,o;const[r,l,a]=(0,me.Z)(),[d]=(0,u.j1)("whatmoreShopId"),{whatmoreRootId:s}=(0,n.useContext)(V.I),{whatmoreIsStoriesTemplate:h}=(0,n.useContext)(V.I);var p=t.events,v=t.index,m=t.onBack,g=t.eventsStories,f=t.initialStoryIndex,w=(0,c.cX2)(d),j="portrait"===r?null!==(e=t.slideDirection)&&void 0!==e?e:"vertical":null!==(i=t.slideDirection)&&void 0!==i?i:p.length>1?"horizontal":"vertical",y="portrait"===r?!(0,c.h6H)(d)&&!h:(0,c.n89)(d);return(0,n.useLayoutEffect)((()=>{(0,c.TLG)(d)&&(window.location.href.includes(w)?history.replaceState(null,"","#"+w):history.pushState(null,"","#"+w),window.addEventListener("popstate",(()=>{window.location.href.includes(w)||m()})))}),[]),delete si.ZP.styles.global,h?(0,x.jsx)(ci.C,{value:gi,children:(0,x.jsx)(di.x,{theme:si.ZP,cssVarsRoot:s,resetCSS:!1,children:(0,x.jsx)(fi.Provider,{value:{isIOS:(0,Me.KE)(),totalEvents:p.length,closeClickComponent:m,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:j,showSwipeIndicator:y},children:"portrait"===r?(0,x.jsx)(vi,{eventsStories:g,initialStoryIndex:f,onBack:m,eventIndex:v}):(0,c.Bbr)(d)?(0,x.jsx)(mi,{eventsStories:g,initialStoryIndex:f,onBack:m,eventIndex:v}):(0,x.jsx)(vi,{eventsStories:g,initialStoryIndex:f,onBack:m,eventIndex:v})})})}):(0,x.jsx)(ci.C,{value:gi,children:(0,x.jsx)(di.x,{theme:si.ZP,cssVarsRoot:s,resetCSS:!1,children:(0,x.jsx)(fi.Provider,{value:{isIOS:(0,Me.KE)(),totalEvents:p.length,closeClickComponent:m,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:j,showSwipeIndicator:y,questionList:(0,c.YGB)(d)?null===(o=JSON.parse(localStorage.getItem("_whatmore_brand_questions")))||void 0===o?void 0:o.questionList:[]},children:"portrait"===r?(0,x.jsx)(ni,{events:p,eventIndex:v,onBack:m}):(0,x.jsx)(ai,{events:p,eventIndex:v,onBack:m})})})})}},9316:function(t,e,i){i.d(e,{mT:function(){return o}});var n=i(686);const o=`\n ${n.F4`
|
77
|
+
0% { transform: scale(1); }
|
78
|
+
50%, { transform: scale(0.95); }
|
79
|
+
100% { transform: scale(1); }
|
80
|
+
`} 0.2s linear;\n`;n.F4`
|
81
|
+
100% {
|
82
|
+
-webkit-transform: rotate(360deg);
|
83
|
+
transform:rotate(360deg);
|
84
|
+
}
|
85
|
+
`,n.F4`
|
86
|
+
0% {
|
87
|
+
opacity: 1;
|
88
|
+
transform: translateY(100%);
|
89
|
+
}
|
90
|
+
10%{
|
91
|
+
transform: translateY(0%);
|
92
|
+
}
|
93
|
+
12%{
|
94
|
+
transform: translateY(-5%);
|
95
|
+
}
|
96
|
+
20%{
|
97
|
+
transform: translateY(0%);
|
98
|
+
}
|
99
|
+
95%{
|
100
|
+
opacity: 1;
|
101
|
+
transform: scale(1);
|
102
|
+
}
|
103
|
+
100%{
|
104
|
+
opacity: 0;
|
105
|
+
}
|
106
|
+
`},6163:function(t,e,i){i.r(e),i.d(e,{default:function(){return w}});var n=i(3271),o=i(5427),r=i(7313),l=i(7753),a=i(6336),d=i(5160);var s=i(9316),c=i(9748),u=i(6348),h=i(9854),p=i(7053),v=i(364),x=i(4522),m=i(778),g=i(6417);function f(t){var e;const[i]=(0,l.j1)("whatmoreSecondaryColor"),[r]=(0,l.j1)("whatmorePrimaryFont"),a=null!==(e=t.baseFontSize)&&void 0!==e?e:10,d=t.width,s=t.height;return(0,g.jsx)(n.xu,{width:d,height:s,padding:"0px",boxShadow:"lg",borderRadius:"md",backgroundColor:"white",borderColor:i,borderWidth:"1px",children:(0,g.jsxs)(n.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"2px",justifyContent:"center",children:[(0,g.jsxs)(n.xv,{color:i,fontSize:1.3*a,fontWeight:"semibold",sx:{fontFamily:r+" !important"},children:["\xa0"," In Cart ","\xa0"]}),(0,g.jsx)(n.M5,{paddingX:"5px",children:(0,g.jsx)(o.Z,{sx:{color:i,fontSize:1.5*a}})})]})})}var w=function(t){var e,i,o,w;const[j]=(0,l.j1)("whatmorePrimaryFont"),[y]=(0,l.j1)("isInDesignMode"),[C]=(0,l.j1)("isDemoBrand"),[b,S]=(0,l.j1)("appCartData"),[I]=(0,l.j1)("whatmoreShopId"),[k]=[(0,h.hmr)(I)],_=(0,h.hmr)(I),[T,F]=(0,r.useState)(!1),[E,P]=(0,r.useState)({state:"initial"}),[O,z]=(0,r.useState)({loaded:!1,client_product_id:"",variant_id:"",variant_price:""}),{closeClickComponent:L}=(0,r.useContext)(u.EventClickComponentContext),{whatmoreWidgetSourceDetails:D}=(0,r.useContext)(v.I),R=t.event,M=t.product,A=null!==(e=t.baseFontSize)&&void 0!==e?e:10;function K(t,e,i){y||C||(async()=>{(0,d.JX)(t,e,i)})()}(0,r.useEffect)((()=>{!async function(){var t,e,i,n;const o=await(0,p.p)(M,(0,h.Ipo)(I),I);z({loaded:!0,client_product_id:M.client_product_id,variant_id:null===o||void 0===o||null===(t=o.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.id,variant_price:null===o||void 0===o||null===(i=o.variants)||void 0===i||null===(n=i[0])||void 0===n?void 0:n.price})}()}),[]);const W=null!==(i=t.width)&&void 0!==i?i:"fit-content",q=null!==(o=t.height)&&void 0!==o?o:"fit-content",N=(null!==(w=(0,h.Jb1)(I))&&void 0!==w?w:2)+"px";return O.loaded?(0,g.jsx)("div",{style:{width:W,height:q},children:(0,g.jsx)("a",{href:"javascript:void(0)","data-variant-id":O.variant_id,"data-action-atc":"",rel:"nofollow","aria-describedby":"a11y-external-message",children:(0,g.jsx)(c.zx,{type:"submit",className:(0,h.Sl8)(I),sx:{width:W,height:q,minHeight:q},onClick:t=>{F(!0),K(R,M,1),(0,x.GF)({userInteractionType:m.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:D,event:R,productList:[M],ctaList:R.cta}),null!==L&&setTimeout((()=>{L()}),2e3)},children:"initial"===E.state?(0,g.jsx)(a.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:q,width:W},children:(0,g.jsx)(n.xu,{width:"100%",height:"100%",padding:N,boxShadow:"lg",borderRadius:"md",backgroundColor:_,borderColor:_,borderWidth:"1px",animation:T?s.mT:null,onAnimationEnd:()=>{F(!1)},children:(0,g.jsx)(n.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",children:(0,g.jsx)(n.M5,{children:(0,g.jsxs)(n.xv,{lineHeight:"100%",fontSize:1.3*A,fontWeight:"semibold",sx:{fontFamily:j+" !important",color:(0,h.KCy)(I)+" !important"},children:["\xa0"," ADD TO CART ","\xa0"]})})})})}):(0,g.jsx)(a.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:q,width:W},children:(0,g.jsx)(f,{event:R,product:M,baseFontSize:A,cartState:E,width:W,height:q})})})})}):(0,g.jsx)(g.Fragment,{})}},2634:function(t,e,i){var n=i(3271),o=i(4897),r=i(499),l=i(6417);e.Z=function(t){var e,i=t.event,a=t.fontSize,d=null!==(e=t.maxWidth)&&void 0!==e?e:"100%",{status:s,bannerText:c,timeToStartInMins:u}=o.Z.getEventStatus(i);return s.name===r.Z.LIVE.name?(0,l.jsx)(n.xu,{maxWidth:d,width:"fit-content",borderRadius:"md",paddingLeft:"2px",paddingRight:"2px",backgroundColor:"tomato",color:s.color,children:(0,l.jsx)(n.Kq,{direction:"row",justifyContent:"flex-start",width:"fit-content",alignContent:"center",paddingLeft:"2px",paddingRight:"2px",children:(0,l.jsx)(n.xv,{fontSize:a,fontWeight:"bold",color:"white",children:c})})}):(0,l.jsx)(n.xu,{maxWidth:d,borderRadius:"md",paddingLeft:"2px",paddingRight:"2px",backgroundColor:"white",color:s.color,children:(0,l.jsx)(n.Kq,{direction:"row",justifyContent:"flex-start",width:"fit-content",alignContent:"center",children:(0,l.jsx)(n.xv,{fontSize:a,fontWeight:"medium",children:c})})})}},499:function(t,e){e.Z={LIVE:{name:"LIVE",color:"gray.600"},UPCOMING:{name:"UPCOMING",color:"gray.600"},DEFAULT:{name:"LIVE EVENT",color:"gray.600"},COMPLETED:{name:"ENDED",color:"gray.600"}}},4897:function(t,e,i){var n=i(499);e.Z=class{static getEventStatus(t){t.time_zone="GMT+5:30";var e=t.start_time+":00",i=t.end_time,o=t.scheduled_date,r=t.status,l=t.time_zone;if(r.toUpperCase()==n.Z.LIVE.name)return{status:n.Z.LIVE,bannerText:" "+n.Z.LIVE.name+" ",timeToStartInMins:0};if(r.toUpperCase()==n.Z.UPCOMING.name){var a=new Date(o+" "+e+" "+l),d=(new Date(o+" "+i+" "+l),function(t){var e=new Date,i=(t.getTime()-e.getTime())/1e3,o=i/60,r=o/60,l=r/24;return i<=0?{status:n.Z.COMPLETED,bannerText:" "+n.Z.COMPLETED.name+" ",timeToStartInMins:0}:i>=1&&i<=30?{status:n.Z.UPCOMING,bannerText:"Starts in "+Math.round(i)+" sec ",timeToStartInMins:i/60}:o<60?{status:n.Z.UPCOMING,bannerText:"Starts in "+Math.round(o)+" min ",timeToStartInMins:o}:r<24?{status:n.Z.UPCOMING,bannerText:"Starts in "+Math.round(r)+" hr ",timeToStartInMins:60*r}:l<7?{status:n.Z.UPCOMING,bannerText:" "+["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][t.getDay()]+" ",timeToStartInMins:60*l*24}:{status:n.Z.UPCOMING,bannerText:"Upcoming",timeToStartInMins:2880}}(a));return{status:d.status,bannerText:d.bannerText,timeToStartInMins:d.timeToStartInMins}}return console.error("invalid status for event :: id : "+t.event_id+", status : "+t.status),{status:n.Z.DEFAULT,bannerText:"live event",timeToStartInMins:2880}}}},6159:function(t,e,i){var n=i(3271),o=i(8302),r=i(7789),l=i(6417);e.Z=function(t){const e=t.onCloseCallback,[i,a,d,s]=(0,r.Z)(),c=.08*s;return(0,l.jsx)(n.M5,{children:(0,l.jsx)(n.Cd,{cursor:"pointer",children:(0,l.jsx)(o.Z,{sx:{boxShadow:3,color:"white",fontSize:c,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),e("close-button")}})})})}},1896:function(t,e,i){i.d(e,{Z:function(){return j}});var n=i(7313),o=i(7300),r=i(6422),l=i(6348),a=i(3317),d=i(2887),s=i(7753),c=i(58),u=i(3433),h=i(9854),p=i(6932),v=(i(8743),i(364)),x=i(342),m=i(6417);function g(t){var e,i,o;const[l,d]=(0,r.Z)(),[g,f]=(0,n.useState)(n.useRef()),w=t.posterImage,[j,y]=(0,s.j1)("whatmoreVideoPlayerPoolBlessed"),[C,b]=(0,n.useState)(!0),[S,I]=(0,n.useState)(!1),k=t.timeUpdateCallback,{whatmoreIsPreviewMode:_}=(0,n.useContext)(v.I),T=null!==(e=t.isVideoMuted)&&void 0!==e?e:l,F=null!==(i=t.height)&&void 0!==i?i:"100%",E=null!==(o=t.width)&&void 0!==o?o:"100%",P=(0,s.MO)("whatmoreShopId");(0,n.useLayoutEffect)((()=>{if(g.current&&j)if(0==g.current.children.length){const i=(0,x.$W)(t.url);(e=(0,c.Bi)(g.current,t.url,T||!t.isPlaying,t.isPlaying,i)).setAttribute("playsinline","true"),e.setAttribute("preload","auto"),e.addEventListener("loadeddata",(()=>{b(!1)})),k&&e.addEventListener("timeupdate",(t=>{var i,n;e&&k(null!==(i=e.currentTime)&&void 0!==i?i:0,null!==(n=e.duration)&&void 0!==n?n:0)}))}else{var e;(e=g.current.children[0]).muted=T||!t.isPlaying,t.isPlaying?e.play():(e.pause(),(0,h.dF_)(P)&&t.source==u.j.CAROUSEL_EVENT_OPENED&&(!t.isPlaying&&e.play(),setTimeout((()=>{!t.isPlaying&&e.pause()}),(0,p.G)()?1900:800)))}}),[T,t.isPlaying,j,C]),(0,n.useLayoutEffect)((()=>()=>{g.current&&0!=g.current.children.length&&(0,c.P7)(g.current)}),[]);const O=(0,s.MO)("whatmoreLandingLocationType");return(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:E,height:F,overflow:"hidden",backgroundColor:_?(0,h.WNM)(P):(0,h.Gy3)(P),filter:t.showQuestion?"blur(24px)":""},children:[(0,m.jsx)("div",{ref:g,style:{width:C?"0px":"100%",height:C?"0px":_?(0,h.Yiq)(P):(0,h.Gm3)(P)&&"product"==O?"auto":(0,h.MT6)(P)},className:"whatmore-video-player-ios-holder"}),"40273707171"!==P&&C&&S?(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("div",{style:{width:"100%",height:"100%",position:"relative"},children:(0,m.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,m.jsx)("img",{src:w,style:{height:"100%",width:E,animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})})})}):C&&!S&&(0,m.jsx)(m.Fragment,{children:(0,m.jsxs)("div",{style:{width:"100%",height:"100%",position:"relative"},children:[(0,m.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,m.jsx)("img",{src:w,height:"100%",width:E,onLoad:()=>{I(!0)},style:{animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})}),(0,m.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,m.jsx)(a.Z,{width:E,height:F,style:{position:"absolute",top:"50%",left:"50%",opacity:"0.6"}})})]})})]})}var f=function(t){var e;return(0,m.jsx)(g,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,isVideoMuted:null!==(e=t.isVideoMuted)&&void 0!==e?e:null,source:t.source,posterImage:t.posterImage,showQuestion:t.showQuestion})};function w(t){var e,i,o;const[l,d]=(0,r.Z)(),[c,g]=(0,n.useState)(!1),[f,w]=(0,n.useState)(!1),j=t.setDuration,y=(0,n.useRef)(null),C=(0,s.MO)("whatmoreShopId"),b=t.timeUpdateCallback,{whatmoreIsPreviewMode:S}=(0,n.useContext)(v.I),I=(0,s.MO)("whatmoreLandingLocationType"),k=null!==(e=t.height)&&void 0!==e?e:"100%",_=null!==(i=t.width)&&void 0!==i?i:"100%",T=null!==(o=t.isVideoMuted)&&void 0!==o?o:l,F=null===t||void 0===t?void 0:t.posterImage;return(0,n.useEffect)((()=>{y.current&&(t.isPlaying?y.current.paused&&y.current.play():y.current.pause(),b&&y.current.addEventListener("timeupdate",(t=>{var e,i;y.current&&b(null!==(e=y.current.currentTime)&&void 0!==e?e:0,null!==(i=y.current.duration)&&void 0!==i?i:0)})))}),[t.isPlaying,t.url]),(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:_,height:k,overflow:"hidden",backgroundColor:S?(0,h.WNM)(C):(0,h.Gy3)(C),filter:null!==t&&void 0!==t&&t.showQuestion?"blur(24px)":""},children:[(0,m.jsx)("div",{style:{width:c?"100%":"0px",height:c?S?(0,h.Yiq)(C):(0,h.Gm3)(C)&&"product"==I?"auto":(0,h.MT6)(C):"0px"},children:(0,m.jsxs)("video",{ref:y,className:"whatmore-video-player",preload:"auto",loop:!0,src:"banner"==t.source?t.url:void 0,playsInline:!0,muted:!(!T&&t.isPlaying),onLoadedData:()=>{g(!0),t.isPlaying&&y.current&&y.current.play(),(0,h.dF_)(C)&&t.source==u.j.CAROUSEL_EVENT_OPENED&&(!t.isPlaying&&y.current&&y.current.play(),setTimeout((()=>{!t.isPlaying&&y.current&&y.current.pause()}),(0,p.G)()?1900:800))},onLoadedMetadata:()=>{y.current&&j&&j(y.current.duration)},poster:"banner"==t.source?t.url:F,children:[(0,m.jsx)("source",{src:t.url,type:"video/mp4"}),(0,m.jsx)("source",{src:(0,x.$W)(t.url),type:"video/mp4"})]})}),"40273707171"!==C&&!c&&f?(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("div",{style:{width:"100%",height:"100%",position:"relative"},children:(0,m.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,m.jsx)("img",{src:F,style:{height:"100%",width:_,animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})})})}):!c&&!f&&(0,m.jsx)(m.Fragment,{children:(0,m.jsxs)("div",{style:{width:"100%",height:"100%",position:"relative"},children:[(0,m.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,m.jsx)("img",{src:F,height:"100%",width:_,onLoad:()=>{w(!0)},style:{animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})}),(0,m.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,m.jsx)(a.Z,{width:_,height:k,style:{position:"absolute",top:"50%",left:"50%",opacity:"0.6"}})})]})})]})}var j=function(t){var e,i,r,a;return(0,o.WJ)(t.event)?(0,m.jsx)(d.Z,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback}):1==(0,n.useContext)(l.EventClickComponentContext).isIOS&&1==(0,s.MO)("whatmoreVideoPlayerPoolBlessed")&&"banner"!=t.source?(0,m.jsx)(f,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,isVideoMuted:null!==(r=t.isVideoMuted)&&void 0!==r?r:null,source:t.source,posterImage:null===(a=t.event)||void 0===a?void 0:a.poster_image,showQuestion:null===t||void 0===t?void 0:t.question}):(0,m.jsx)(w,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,isVideoMuted:null!==(e=t.isVideoMuted)&&void 0!==e?e:null,setDuration:t.setDuration,source:t.source,posterImage:null===(i=t.event)||void 0===i?void 0:i.poster_image,showQuestion:null===t||void 0===t?void 0:t.question})}},3433:function(t,e,i){i.d(e,{j:function(){return n}});const n={BANNER:"banner",CAROUSEL_EVENT_OPENED:"carousel_event_opened",CAROUSEL_THUMBNAIL_VIEW:"carousel_thumbnail_view",STORY_EVENT_OPENED:"story_event_opened",STORY_THUMBNAIL_VIEW:"story_thumbnail_view"}},6119:function(t,e,i){var n=i(3271),o=(i(7313),i(7789)),r=i(7753),l=i(686),a=i(9854),d=i(5160),s=i(6417);l.F4`
|
107
|
+
0% {
|
108
|
+
opacity: 0;
|
109
|
+
}
|
110
|
+
10%{
|
111
|
+
opacity: 0.5;
|
112
|
+
}
|
113
|
+
20%{
|
114
|
+
opacity: 1;
|
115
|
+
}
|
116
|
+
|
117
|
+
`;const c=function(t,e){return(0,a.lj5)(e)?t+"?"+(0,a.awP)(e)+"&"+(0,a.n9s)(e)+"&"+(0,a.poG)(e):t};e.Z=function(t){var e;const[i,l,u,h]=(0,o.Z)(),p=(0,r.MO)("isInDesignMode"),v=(0,r.MO)("isDemoBrand"),x=(0,r.MO)("whatmoreSecondaryColor"),m=(0,r.MO)("whatmorePrimaryFont"),g=(0,r.MO)("whatmoreShopId"),f=t.cta,w=.06*h;return(0,s.jsx)(n.M5,{children:(0,s.jsx)(n.Kq,{direction:"row",height:"fit-content",width:"100%",justifyContent:"center",marginBottom:.03*h+"px",marginTop:.03*h+"px",children:(0,s.jsx)(n.rU,{href:c(f.cta_link,g),color:"white",onClick:()=>{p||v||(async()=>{(0,d.uD)(t)})()},children:(0,s.jsx)(n.xv,{fontSize:w*(null!==(e=t.fontFactor)&&void 0!==e?e:1)+"px",variant:"subtle",textColor:t.isBanner?x:"#fff",bgColor:t.isBanner?"#fff":x,borderRadius:"round"==(0,a._KP)(g)?"5px":"0",sx:{boxShadow:"1px 1px #0000001a",fontFamily:m+" !important",textAlign:"center!important",fontWeight:t.isBanner?"bold":void 0},padding:"10px",paddingX:.06*h+"px",children:f.cta_title})})})})}},8782:function(t,e,i){i.d(e,{P:function(){return a}});var n=i(6775),o=i(7313),r=(i(123),i(6417));function l(t){const[e,i,o]=(0,n.Z)({triggerOnce:t.retainAlreadyRenderedElements});return(0,r.jsx)("div",{ref:e,children:i?t.renderElement({eventData:null===t||void 0===t?void 0:t.data}):(0,r.jsx)("div",{style:{minWidth:t.defaultHeight,minHeight:t.defaultWidth}})})}function a(t){var e,i;return(0,o.useEffect)((()=>{const t=document.querySelector(".whatmore-carousel-horizontal-flex");let e,i=!1;function n(t){t.touches&&(null===t||void 0===t?void 0:t.touches.length)>0?(i=!0,e=t.touches[0].clientX):(i=!0,e=t.clientX)}function o(n){if(!i)return;const o=n.touches?n.touches[0].clientX:n.clientX;t.style.pointerEvents="none";const r=2*(e-o);t.scrollLeft+=r,e=o}function r(e){t.style.pointerEvents="auto",i=!1}return t&&("ontouchstart"in window&&(t.addEventListener("touchstart",n),t.addEventListener("touchmove",o),t.addEventListener("touchend",r)),t.addEventListener("mousedown",n),document.addEventListener("mousemove",o),document.addEventListener("mouseup",r)),()=>{t&&("ontouchstart"in window&&(t.removeEventListener("touchstart",n),t.removeEventListener("touchmove",o),t.removeEventListener("touchend",r)),t.removeEventListener("mousedown",n),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r))}}),[]),(0,r.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",height:"fit-content",width:"100%",gap:null!==(e=t.spacing)&&void 0!==e?e:3},className:"whatmore-carousel-horizontal-flex",children:null===t||void 0===t||null===(i=t.dataList)||void 0===i?void 0:i.map(((e,i)=>(0,r.jsx)(l,{renderElement:t.renderElement,data:e,defaultHeight:t.defaultHeight,defaultWidth:t.defaultWidth,retainAlreadyRenderedElements:t.retainAlreadyRenderedElements},"key-"+i)))})}},6422:function(t,e,i){var n=i(7313),o=i(7753);e.Z=function(t){const[e,i]=(0,o.j1)("muted");return(0,n.useEffect)((()=>{}),[]),[e,i]}},7789:function(t,e,i){var n=i(8866);e.Z=function(t){const[e,i,o]=(0,n.Z)();var r="landscape"==e?i*(9/16):o;if("landscape"==e){const t=.85;return[i,r,i*t,r*t]}return[i,r,i,r]}},9111:function(){}}]);
|