whatmore-react-assets 1.0.1827 → 1.0.1829

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,76 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[260],{5677:function(t,e,i){i.r(e),i.d(e,{default:function(){return Vi}});var o=i(7119),n=i(9950),r=i(9946),l=i(9094),a=i(140),d=(i(5388),i(7239),i(1348)),s=i(7483),c=i(3080),u=i(8149),p=i(6493),h=i(2039),v=i(6670),x=i(314),g=i(3887),m=i(9098),f=i(1085),w=i(3294),C=i(4033),y=(i(5410),i(1592)),b=i(3788),j=i(3441),S=i(4414);function k(t){var e,i,o;const[r,l]=(0,v.A)(),[a,c]=(0,n.useState)(n.useRef()),u=t.posterImage,[h,x]=(0,s.QN)("whatmoreVideoPlayerPoolBlessed"),m=(0,n.useRef)(null),[k,I]=(0,n.useState)(!1),[z,_]=(0,n.useState)(!0),[F,E]=(0,n.useState)(!1),T=t.timeUpdateCallback,{whatmoreIsPreviewMode:A}=(0,n.useContext)(y.AppContext),N=null!==(e=t.isVideoMuted)&&void 0!==e?e:r,P=null!==(i=t.height)&&void 0!==i?i:"100%",L=null!==(o=t.width)&&void 0!==o?o:"100%",B=(0,s.Xd)("whatmoreShopId");(0,n.useEffect)(()=>{if(!a.current||!t.url||!h)return;const e=a.current.children[0];if(!e)return;let i=!0;const o="banner"===t.source?t.url:(0,b.s)(t.url),n=o&&(o.includes(".m3u8")||o.includes("m3u8")),r=o&&o.toLowerCase().includes(".mp4");if(m.current&&(m.current.destroy(),m.current=null,I(!1)),n&&!r&&j.Ay.isSupported()){const n=new j.Ay({enableWorker:!0,lowLatencyMode:!0,maxBufferLength:30,maxMaxBufferLength:60,capLevelToPlayerSize:!0,startLevel:-1,autoStartLoad:!0});m.current=n,n.loadSource(o),n.attachMedia(e),n.on(j.Ay.Events.MANIFEST_PARSED,()=>{i&&I(!0)}),n.on(j.Ay.Events.ERROR,(o,r)=>{if(r.fatal&&i)switch(console.error("HLS.js error:",r),r.type){case j.Ay.ErrorTypes.NETWORK_ERROR:console.log("HLS Network error, trying to recover..."),n.startLoad();break;case j.Ay.ErrorTypes.MEDIA_ERROR:console.log("HLS Media error, trying to recover..."),n.recoverMediaError();break;default:console.log("HLS Fatal error, falling back to native playback");const i=(0,p.Cr)(t.url);e.src=i,I(!0)}})}else n&&!j.Ay.isSupported()?(console.log("Using native HLS support"),I(!0)):I(!0);return()=>{i=!1,m.current&&(m.current.destroy(),m.current=null)}},[t.url,t.source,h,a.current]),(0,n.useLayoutEffect)(()=>{if(a.current&&h)if(0==a.current.children.length){const i=(0,p.Cr)(t.url),o="banner"===t.source?t.url:(0,b.s)(t.url);(e=(0,f.Z4)(a.current,o,N||!t.isPlaying,t.isPlaying,i)).setAttribute("playsinline","true"),e.setAttribute("preload","auto"),e.addEventListener("loadeddata",()=>{_(!1)}),T&&e.addEventListener("timeupdate",t=>{var i,o;e&&T(null!==(i=e.currentTime)&&void 0!==i?i:0,null!==(o=e.duration)&&void 0!==o?o:0)})}else{var e;(e=a.current.children[0]).muted=N||!t.isPlaying;const i="banner"===t.source?t.url:(0,b.s)(t.url),o=i&&(i.includes(".m3u8")||i.includes("m3u8"));if(t.isPlaying&&(!o||k)){const t=()=>{e.paused&&e.play().catch(t=>{"NotAllowedError"!==t.name?console.error("Play error:",t):console.warn("Play blocked by iOS autoplay policy:",t.message)})};!1===z||o?setTimeout(t,100):t()}else e.pause(),(0,d.fwF)(B)&&t.source==w.N.CAROUSEL_EVENT_OPENED&&(!t.isPlaying&&e.paused&&e.play().catch(()=>{}),setTimeout(()=>{!t.isPlaying&&e.pause()},(0,C.n)()?1900:800))}},[N,t.isPlaying,h,z,k]),(0,n.useLayoutEffect)(()=>()=>{m.current&&(m.current.destroy(),m.current=null),a.current&&0!=a.current.children.length&&(0,f.rq)(a.current)},[]);const R=(0,s.Xd)("whatmoreLandingLocationType");return(0,S.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:L,height:P,overflow:"hidden",backgroundColor:A?(0,d.KVz)(B):(0,d.QSX)(B),filter:t.showQuestion?"blur(24px)":""},children:[(0,S.jsx)("div",{ref:a,style:{width:z?"0px":"100%",height:z?"0px":A?(0,d.tbf)(B):(0,d.CBm)(B)&&"product"==R?"auto":(0,d.R7q)(B)},className:"whatmore-video-player-ios-holder"}),"40273707171"!==B&&z&&F?(0,S.jsx)(S.Fragment,{children:(0,S.jsx)("div",{style:{width:"100%",height:"100%",position:"relative"},children:(0,S.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,S.jsx)("img",{src:u,style:{height:"100%",width:"100%",objectFit:"cover"}})})})}):z&&!F&&(0,S.jsx)(S.Fragment,{children:(0,S.jsxs)("div",{style:{width:"100%",height:"100%",position:"relative"},children:[(0,S.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,S.jsx)("img",{src:u,style:{height:"100%",width:"100%",objectFit:"cover"},onLoad:()=>{E(!0)}})}),(0,S.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,S.jsx)(g.A,{width:L,height:P,style:{position:"absolute",top:"50%",left:"50%",opacity:"0.6"}})})]})})]})}var I=function(t){var e;return(0,S.jsx)(k,{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 z(t){var e,i,o;const[r,l]=(0,v.A)(),[a,c]=(0,n.useState)(!1),[u,h]=(0,n.useState)(!1),[x,m]=(0,n.useState)(!1),f=t.setDuration,k=(0,n.useRef)(null),I=(0,n.useRef)(null),z=(0,s.Xd)("whatmoreShopId"),_=t.timeUpdateCallback,{whatmoreIsPreviewMode:F}=(0,n.useContext)(y.AppContext),E=(0,s.Xd)("whatmoreLandingLocationType"),T=null!==(e=t.height)&&void 0!==e?e:"100%",A=null!==(i=t.width)&&void 0!==i?i:"100%",N=null!==(o=t.isVideoMuted)&&void 0!==o?o:r,P=null===t||void 0===t?void 0:t.posterImage;return(0,n.useEffect)(()=>{if(!k.current||!t.url)return;let e=!0;const i=k.current,o="banner"==t.source?t.url:(0,b.s)(t.url),n=o&&(o.includes(".m3u8")||o.includes("m3u8")),r=o&&o.toLowerCase().includes(".mp4");if(I.current&&(I.current.destroy(),I.current=null,m(!1)),n&&!r&&j.Ay.isSupported()){const n=new j.Ay({enableWorker:!0,lowLatencyMode:!0,maxBufferLength:30,maxMaxBufferLength:60});I.current=n,n.loadSource(o),n.attachMedia(i),n.on(j.Ay.Events.MANIFEST_PARSED,()=>{e&&(m(!0),t.isPlaying&&i.play().catch(t=>console.error("HLS playback error:",t)))}),n.on(j.Ay.Events.ERROR,(t,r)=>{if(r.fatal&&e)switch(r.type){case j.Ay.ErrorTypes.NETWORK_ERROR:console.log("HLS Network error, trying to recover..."),n.startLoad();break;case j.Ay.ErrorTypes.MEDIA_ERROR:console.log("HLS Media error, trying to recover..."),n.recoverMediaError();break;default:console.log("HLS Fatal error, falling back to native playback"),i.src=o,m(!0)}})}else!n||!r&&j.Ay.isSupported()||(i.src=r?o:(0,p.Cr)(t.url)),m(!0);return()=>{e=!1,I.current&&(I.current.destroy(),I.current=null)}},[t.url,t.source]),(0,n.useEffect)(()=>{k.current&&x&&(t.isPlaying?k.current.paused&&k.current.play().catch(t=>console.error("Play error:",t)):k.current.pause(),_&&k.current.addEventListener("timeupdate",t=>{var e,i;k.current&&_(null!==(e=k.current.currentTime)&&void 0!==e?e:0,null!==(i=k.current.duration)&&void 0!==i?i:0)}))},[t.isPlaying,t.url,x]),(0,S.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:A,height:T,overflow:"hidden",backgroundColor:F?(0,d.KVz)(z):(0,d.QSX)(z),filter:null!==t&&void 0!==t&&t.showQuestion?"blur(24px)":""},children:[(0,S.jsx)("div",{style:{width:a?"100%":"0px",height:a?F?(0,d.tbf)(z):(0,d.CBm)(z)&&"product"==E?"auto":(0,d.R7q)(z):"0px"},children:(0,S.jsxs)("video",{ref:k,className:"whatmore-video-player",preload:"auto",loop:!0,src:"banner"==t.source?t.url:void 0,playsInline:!0,muted:!(!N&&t.isPlaying),onLoadedData:()=>{c(!0),t.isPlaying&&k.current&&k.current.play(),(0,d.fwF)(z)&&t.source==w.N.CAROUSEL_EVENT_OPENED&&(!t.isPlaying&&k.current&&k.current.play(),setTimeout(()=>{!t.isPlaying&&k.current&&k.current.pause()},(0,C.n)()?1900:800))},onLoadedMetadata:()=>{k.current&&f&&f(k.current.duration)},poster:"banner"==t.source?t.url:P,children:[(0,S.jsx)("track",{src:"data:,",kind:"captions",srclang:"en",label:"english_captions"}),(0,S.jsx)("source",{src:(0,b.s)(t.url),type:"video/mp4"}),(0,S.jsx)("source",{src:(0,p.Cr)(t.url),type:"video/mp4"})]})}),"40273707171"!==z&&!a&&u?(0,S.jsx)(S.Fragment,{children:(0,S.jsx)("div",{style:{width:"100%",height:"100%",position:"relative"},children:(0,S.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,S.jsx)("img",{src:P,style:{height:"100%",width:"100%",objectFit:"cover"}})})})}):!a&&!u&&(0,S.jsx)(S.Fragment,{children:(0,S.jsxs)("div",{style:{width:"100%",height:"100%",position:"relative"},children:[(0,S.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,S.jsx)("img",{src:P,style:{height:"100%",width:"100%",objectFit:"cover"},onLoad:()=>{h(!0)}})}),(0,S.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,S.jsx)(g.A,{width:A,height:T,style:{position:"absolute",top:"50%",left:"50%",opacity:"0.6"}})})]})})]})}var _=function(t){var e,i,o,r;return(0,h.I)(t.event)?(0,S.jsx)(m.A,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback}):1==(0,n.useContext)(x.p).isIOS&&1==(0,s.Xd)("whatmoreVideoPlayerPoolBlessed")&&"banner"!=t.source?(0,S.jsx)(I,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,isVideoMuted:null!==(o=t.isVideoMuted)&&void 0!==o?o:null,source:t.source,posterImage:null===(r=t.event)||void 0===r?void 0:r.poster_image,showQuestion:null===t||void 0===t?void 0:t.question}):(0,S.jsx)(z,{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,thumbnail_image:t.thumbnail_image})};var F=i(6086),E=i(3247),T=i(4895),A=i(5375);var N=function(t){const[e]=(0,s.QN)("whatmoreShopId"),[i,o]=(0,v.A)(),[n,r,l,a]=(0,c.A)(),u=.1*a;function p(){o(!i)}return!0===(0,d.GZ2)(e)?(0,S.jsx)(S.Fragment,{}):(0,S.jsx)(F.o,{children:(0,S.jsx)(E.jl,{cursor:"pointer",children:i?(0,S.jsx)(A.A,{sx:{color:"white",fontSize:u,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:()=>{p()}}):(0,S.jsx)(T.A,{sx:{color:"white",fontSize:u,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:()=>{p()}})})})},P=i(1422),L=i(3731),B=i(677),R=i(211),O=i(645),D=i(8283);const W=`${D.i7`
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`,M=`\n ${D.i7`
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`;D.i7`
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
+ `,D.i7`
34
+ 0% { transform: scale(1); }
35
+ 10% { transform: scale(1.2); }
36
+ 20% { transform: scale(1); }
37
+ `;var Q=i(8544);const H=`\n ${D.i7`
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 V(t){const[e,i,o,r]=(0,c.A)(),[l]=(0,s.QN)("whatmoreSecondaryColor"),[a,u]=(0,n.useState)(0),[p]=(0,s.QN)("whatmoreShopId"),h=t.event,v=t.onClick,x=h.products.length;t.isFirstProductsIconClickDone;(0,n.useEffect)(()=>{const t=setInterval(()=>{u(t=>(t+1)%x)},3e3);return()=>{clearInterval(t)}},[]);const g=.24,m=.024;var f=r*g+"px",w=r*g+"px",C=r*m*1.5+"px",y=r*m+"px",b=r*m*1.5+"px";if(void 0==h.products||0==h.products.length)return(0,S.jsx)(S.Fragment,{});var j=h.products;return(0,S.jsx)(P.B,{direction:"column",justifyContent:"flex-start",alignContent:"center",height:"fit-content",width:"fit-content",borderRadius:"lg",children:(0,S.jsxs)(E.az,{margin:"10px",width:f,height:w,boxShadow:"dark-lg",borderColor:"white",borderWidth:"2px",borderRadius:"lg",overflow:"visible",backgroundColor:"gray.100",animation:W,onClick:()=>v(),children:[(0,S.jsx)(R._,{width:"100%",height:"100%",src:j[a].thumbnail_image,objectFit:"cover",sx:{objectFit:(0,d.KZe)(p)+" !important"},borderRadius:"lg",animation:H},a),(0,S.jsx)(E.az,{width:"100%",height:"100%",style:{position:"relative",zIndex:2,bottom:"100%"},className:"whatmore-ios-css-relative-fix",borderRadius:"lg",children:(0,S.jsx)(P.B,{direction:"column",width:"100%",height:"100%",justifyContent:"flex-end",children:(0,S.jsx)(F.o,{children:(0,S.jsxs)(P.B,{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,S.jsxs)(L.E,{noOfLines:1,fontSize:y,fontFamily:"sans-serif",fontWeight:"semibold",textAlign:"center",lineHeight:"100%",sx:{color:"white !important"},children:["\xa0","Shop Now","\xa0"]}),(0,S.jsx)(F.o,{children:(0,S.jsx)(Q.A,{sx:{color:"white",fontSize:b}})})]})})})}),(0,S.jsx)(P.B,{direction:"row",height:"fit-content",width:f,justifyContent:"flex-end",style:{position:"relative",zIndex:3,bottom:"210%",left:"5%"},className:"whatmore-ios-css-relative-fix",children:(0,S.jsx)(B.E,{fontSize:C,variant:"subtle",textColor:l,bgColor:"gray.100",borderRadius:"md",boxShadow:"dark-lg",children:x>1?x:""})})]})})}var X=function(t){const[e,i]=(0,s.QN)("isProductSwiperCatalogOpen"),[o,r,l,a]=(0,c.A)(),[d,u]=(0,n.useState)(!1),p=t.onToggle,h=t.event,v=.07*a,x=.15*l,g=.05*a;return(0,S.jsx)(F.o,{children:(0,S.jsx)(E.M6,{style:{marginTop:"10px"},children:e?(0,S.jsx)(O.A,{sx:{color:"white",fontSize:v,filter:"drop-shadow(0 0 5px black);",position:"absolute",bottom:x,right:g,zIndex:10},onClick:()=>{p("minimize-button")}}):(0,S.jsx)(V,{event:h,onClick:()=>{p("products-button"),u(!0)},isFirstProductsIconClickDone:d})})})},Y=(i(5242),i(7642));var U=function(t){const e=t.onCloseCallback,[i,o,n,r]=(0,c.A)(),l=.08*r;return(0,S.jsx)(F.o,{children:(0,S.jsx)(E.jl,{cursor:"pointer",children:(0,S.jsx)(Y.A,{sx:{boxShadow:3,color:"white",fontSize:l,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),e("close-button")}})})})},$=i(5078),q=i(731),K=i(7035);var G=function(t){var e,i;const[o,r,l,a]=(0,c.A)(),{slideDirection:d}=(0,n.useContext)(x.p),u=(0,s.Xd)("websiteLanguage"),p=.15*a,h=.07*a,v=`${D.i7`
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`,g=`${D.i7`
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,S.jsx)(E.az,{width:"100%",height:"fit-content",paddingTop:100,borderRadius:"3xl",children:(0,S.jsxs)(P.B,{direction:"column",width:"100%",height:"0px",justifyContent:"flex-end",children:[(0,S.jsx)(F.o,{animation:"vertical"===d?v:g,children:"vertical"===d?(0,S.jsx)($.A,{sx:{color:"white !important",fontSize:p,filter:"drop-shadow(0 0 20px black);"}}):(0,S.jsx)(q.A,{sx:{color:"white !important",fontSize:p,filter:"drop-shadow(0 0 20px black);"}})}),(0,S.jsx)(F.o,{children:(0,S.jsx)(L.E,{textShadow:"dark-lg",fontSize:h+"px",fontWeight:"semibold",sx:{color:"white !important",textShadow:"0px 0px 20px black !important;"},children:null!==(e=null===K.m||void 0===K.m||null===(i=K.m[u])||void 0===i?void 0:i.swipe_more)&&void 0!==e?e:"swipe for more"})})]})})};var Z=function(t){const[e,i]=(0,s.QN)("isFirstIndicatorRenderDone"),[o]=(0,s.QN)("indicatorRenderSeconds"),r=o,l=t.swipeUp;return(0,n.useEffect)(()=>{const t=setTimeout(()=>{i(!0)},3e3+1e3*r);return()=>{clearTimeout(t)}},[]),e?null:(0,S.jsx)(G,{showForSeconds:.8*r,delayInSeconds:3,swipeUp:l})},J=i(8781),tt=i(5144),et=i(4459);const it="15px";var ot=i(1351),nt=i(6157);var rt=function(t){const[e]=(0,s.QN)("isInDesignMode"),[i]=(0,s.QN)("isDemoBrand"),[o]=(0,s.QN)("whatmoreSecondaryColor"),[r]=(0,s.QN)("whatmorePrimaryFont"),[l]=(0,s.QN)("whatmoreShopId"),[u,p,h,v]=(0,c.A)(),[x,g]=(0,n.useState)(!1),m=t.product,f=t.event,{whatmoreWidgetSourceDetails:w}=(0,n.useContext)(y.AppContext),C=.1*h,b=.95*v,j=.05*v;return(0,S.jsx)(P.B,{direction:"row",height:C,justifyContent:"center",alignItems:"center",alignContent:"center",bgGradient:"linear(to-b, transparent, blackAlpha.400, blackAlpha.600)",children:(0,S.jsx)(P.B,{direction:"column",width:"fit-content",height:C,justifyContent:"center",alignItems:"center",alignContent:"center",children:(0,S.jsx)(E.az,{width:b+"px",height:"fit-content",padding:"6px",marginTop:it,backgroundColor:o,borderRadius:"5px",animation:x?tt.jd:null,onAnimationEnd:()=>{g(!1)},marginBottom:(0,d.qw1)(l),onClick:()=>{g(!0),function(t,o){e||i||(async()=>{(0,a.Pb)(t,o),(0,ot.kz)({userInteractionType:nt.O.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:w,event:t,productList:[o],ctaList:t.cta})})()}(f,m),window.location.href=function(t){return(0,d.BLb)(l)?t.product_link+"?"+(0,d.VCz)(l)+"&"+(0,d.Spk)(l)+"&"+(0,d.$lz)(l):t.product_link}(m)},_hover:{backgroundColor:(0,et.YU)(o,8)},cursor:"pointer",children:(0,S.jsx)(F.o,{children:(0,S.jsx)(L.E,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*j+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:r+" !important",color:"white !important"},children:(0,d.Qed)(l)})})})})})},lt=i(4892),at=i(8538),dt=i(7458),st=i(2159),ct=i(9537),ut=i(173),pt=(i(6125),i(4905));function ht(t){var e,i,o;const[r]=(0,s.QN)("whatmoreSecondaryColor"),[l]=(0,s.QN)("whatmorePrimaryFont"),[a]=(0,s.QN)("whatmoreShopId"),[c,u]=(0,n.useState)(!1),p=null!==(e=t.baseFontSize)&&void 0!==e?e:10,h=t.onClick,v=t.width,x=t.height,g=t.title,m=t.showInProgressIcon;return(0,S.jsxs)(E.az,{display:"flex",width:v,height:x,padding:"2x",boxShadow:"lg",animation:c?tt.jd:null,onAnimationEnd:()=>{u(!1)},cursor:"pointer",children:["awaitingVariantSelection"==t.cartState&&(0,S.jsx)(P.B,{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),u(!0)},children:(0,S.jsxs)(L.E,{lineHeight:"100%",fontSize:1.4*p+"px !important",fontWeight:"semibold !important",sx:{fontFamily:l+" !important",color:"#343434 !important"},children:["\xa0",null!==(i=null===K.m||void 0===K.m||null===(o=K.m[null===t||void 0===t?void 0:t.websiteLanguage])||void 0===o?void 0:o.cancel)&&void 0!==i?i:"Cancel","\xa0"]})}),(0,S.jsxs)(P.B,{direction:"row",backgroundColor:m?(0,et.YU)(r,8):r,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",onClick:t=>{t.stopPropagation(),h(),u(!0)},children:[(0,S.jsxs)(L.E,{lineHeight:"100%",fontSize:1.4*p+"px !important",fontWeight:"semibold !important",sx:{fontFamily:l+" !important",color:(0,d.Hfu)(a)+" !important"},children:["\xa0",g,"\xa0"]}),m?(0,S.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,S.jsx)(ut.A,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*p+"px"}})}):(0,S.jsx)(S.Fragment,{})]})]})}function vt(t){var e,i,o;const[r]=(0,s.QN)("whatmoreSecondaryColor"),[l]=(0,s.QN)("whatmorePrimaryFont"),[a]=(0,s.QN)("whatmoreShopId"),[c,u]=(0,n.useState)(!1),p=null!==(e=t.baseFontSize)&&void 0!==e?e:10,h=t.onClick,v=t.width,x=t.height;return(0,S.jsx)(E.az,{width:v,height:x,padding:"2x",boxShadow:"lg",backgroundColor:"#000000"==(0,d.Wc_)(a)?r:(0,d.Wc_)(a),onClick:t=>{t.stopPropagation(),h(),u(!0)},animation:c?tt.jd:null,onAnimationEnd:()=>{u(!1)},cursor:"pointer",children:(0,S.jsx)(P.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",children:(0,S.jsx)(F.o,{maxWidth:"90%",children:(0,S.jsxs)(L.E,{lineHeight:"100%",fontSize:1.4*p+"px !important",fontWeight:"semibold !important",sx:{fontFamily:l+" !important",color:(0,d.Hfu)(a)+" !important",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["\xa0","ADD TO CART"!=(0,d.KPq)(a)?(0,d.KPq)(a):null!==(i=null===K.m||void 0===K.m||null===(o=K.m[null===t||void 0===t?void 0:t.websiteLanguage])||void 0===o?void 0:o.add_to_cart)&&void 0!==i?i:(0,d.KPq)(a),"\xa0"]})})})})}function xt(t){var e;const[i]=(0,s.QN)("whatmorePrimaryFont"),o=null!==(e=t.baseFontSize)&&void 0!==e?e:10,n=t.width,r=t.height;return(0,S.jsx)(E.az,{width:n,height:r,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:"gray",borderWidth:"1px",onClick:t=>{t.stopPropagation()},children:(0,S.jsx)(P.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:(0,S.jsxs)(L.E,{color:"gray",lineHeight:"100%",fontSize:1.3*o+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:"gray !important"},children:["\xa0"," Sold Out ","\xa0"]})})})}function gt(t){var e;const[i]=(0,s.QN)("whatmoreSecondaryColor"),[o]=(0,s.QN)("whatmorePrimaryFont"),[n]=(0,s.QN)("whatmoreShopId"),r=null!==(e=t.baseFontSize)&&void 0!==e?e:10,l=t.onClick,a=t.cartCount,c=t.width,u=t.height,p=t.onCartIconClick;return(0,S.jsx)(E.az,{width:c,height:u,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:i,borderWidth:"1px",onClick:t=>{t.stopPropagation()},cursor:"pointer",children:(0,S.jsxs)(P.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:[(0,S.jsx)(F.o,{paddingX:"5px",onClick:()=>{p()},children:(0,d.DiI)(n)?(0,S.jsx)(pt.$,{size:"sm",_hover:{bg:i},sx:{bg:i},children:(0,S.jsx)(L.E,{paddingX:"6px",color:"white",sx:{fontSize:.85*r},children:"GO TO CART"})}):(0,S.jsx)(ct.A,{sx:{color:i,fontSize:1.6*r}})}),(0,S.jsx)(L.E,{color:i,fontSize:1.3*r+"px !important",fontWeight:"semibold !important",sx:{fontFamily:o+" !important"},children:a}),(0,S.jsx)(F.o,{paddingX:"5px",onClick:t=>{t.stopPropagation(),l()},children:(0,S.jsx)(st.A,{sx:{color:i,fontSize:1.6*r}})})]})})}var mt=function(t){var e,i,o,n,r,l,a;const[d]=(0,s.QN)("websiteLanguage"),c=null!==(e=t.baseFontSize)&&void 0!==e?e:10,u=null===(i=t.showAddedToCart)||void 0===i||i,p=t.cartState,h=t.cartCount,v=t.onClickAtc,x=t.onCartIconClick;function g(){v()}const m=null!==(o=t.width)&&void 0!==o?o:"100%",f=null!==(n=t.height)&&void 0!==n?n:"100%";return"errored"==p?(0,S.jsx)(xt,{baseFontSize:c,width:m,height:f}):"init"==p?0==h?(0,S.jsx)(vt,{onClick:g,baseFontSize:c,width:m,height:f,websiteLanguage:d}):u?(0,S.jsx)(gt,{onClick:g,baseFontSize:c,cartCount:h,width:m,height:f,onCartIconClick:x}):(0,S.jsx)(vt,{onClick:g,baseFontSize:c,width:m,height:f,websiteLanguage:d}):(0,S.jsx)(ht,{onClick:g,setProductVariantTitle:t.setProductVariantTitle,cartState:p,productTitle:null===(r=t.product)||void 0===r?void 0:r.title,updateCartState:t.updateCartState,baseFontSize:c,width:m,height:f,title:"awaitingVariantSelection"==p?null!==(l=null===K.m||void 0===K.m||null===(a=K.m[d])||void 0===a?void 0:a.done)&&void 0!==l?l:"Done":"",showInProgressIcon:"atcApiCallInProgress"==p||"productVariantDetailsApiCallInProgress"==p,websiteLanguage:d})},ft=i(6305),wt=i(7973),Ct=i(1615);var yt=function(t){var e,i;const o=t.productVariantOptions,r=null!==(e=t.width)&&void 0!==e?e:"100%",l=t.maxHeight,a=null!==(i=t.baseFontSize)&&void 0!==i?i:10,d=t.onOptionSelected,c=t.data,[u]=(0,s.QN)("whatmorePrimaryFont"),[p]=(0,s.QN)("websiteLanguage"),h=(0,n.useRef)(null);function v(t){if(!t||0==t.length)return null;const e=t.filter(t=>t.available);return 0==e.length?null:e[0].option}const[x,g]=(0,n.useState)([v(o[0]),v(o[1]),v(o[2])]);function m(t,e){if(2==e)g([x[0],x[1],t]);else if(1==e){var i,o;g([x[0],t,null===c||void 0===c||null===(i=c.variants)||void 0===i||null===(o=i.find(e=>(null===e||void 0===e?void 0:e.option2)==t))||void 0===o?void 0:o.option3])}else{var n,r,l,a,d,s;const e=null===c||void 0===c||null===(n=c.variants)||void 0===n||null===(r=n.find(e=>(null===e||void 0===e?void 0:e.option1)==t))||void 0===r?void 0:r.option2;g([t,null===c||void 0===c||null===(l=c.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===c||void 0===c||null===(d=c.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])}}(0,n.useEffect)(()=>{d(x)},[x]);const f=Math.max(10,.8*a),w=Math.max(11,.92*a);return(0,S.jsx)("div",{ref:h,style:{width:r,maxHeight:l,overflowY:"auto",overflowX:"hidden",overscrollBehavior:"contain",WebkitOverflowScrolling:"touch",display:"flex",flexDirection:"column",gap:"12px"},onTouchStart:t=>{t.stopPropagation()},onTouchMove:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},onWheel:t=>{t.stopPropagation()},children:o.map((e,i)=>{var o,n,r,l;if(!e||0==e.length||"mlveda_country"==(null===e||void 0===e||null===(o=e[0])||void 0===o?void 0:o.type))return null;const a=e.every(e=>{var i,o,n,r,l,a;return(null===t||void 0===t||null===(i=t.finalArr)||void 0===i||null===(o=i.finalArr)||void 0===o||null===(n=o.find(t=>(null===t||void 0===t?void 0:t.color)===(null===e||void 0===e?void 0:e.option)))||void 0===n?void 0:n.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,S.jsxs)("div",{style:{width:"100%"},children:[(0,S.jsx)("div",{style:{fontFamily:u,fontSize:f+"px",letterSpacing:"1.6px",textTransform:"uppercase",color:"#9a9a9a",fontWeight:400,marginBottom:"6px"},children:null!==(n=null===K.m||void 0===K.m||null===(r=K.m[p])||void 0===r?void 0:r[null===(l=e[0].type)||void 0===l?void 0:l.toLowerCase()])&&void 0!==n?n:e[0].type}),(0,S.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:e.map((e,o)=>{if(!(0==i||!(null!==c&&void 0!==c&&c.variants)||c.variants.find(t=>t[`option${i}`]==(null===x||void 0===x?void 0:x[i-1])&&t[`option${i+1}`]==(null===e||void 0===e?void 0:e.option))))return null;const n=e.option===x[i],r=e.available;var l,d,s,p,h,v,g;return a?(0,S.jsx)("div",{onClick:t=>{t.stopPropagation(),r&&m(e.option,i)},style:{width:"52px",height:"52px",borderRadius:"50%",overflow:"hidden",cursor:r?"pointer":"not-allowed",border:n?"2px solid #1a1a1a":"1px solid #e0e0e0",padding:n?"2px":"0",boxSizing:"border-box",opacity:r?1:.4,filter:r?"none":"grayscale(100%)",transition:"border 0.15s ease"},...r?(0,Ct.i)(e.option):{"aria-label":e.option+" (unavailable)","aria-disabled":!0},children:(0,S.jsx)("img",{alt:e.option,style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"50%",display:"block"},src:(0,wt.b)(null!==(l=null===t||void 0===t||null===(d=t.finalArr)||void 0===d||null===(s=d.finalArr)||void 0===s||null===(p=s.find(t=>(null===t||void 0===t?void 0:t.color)==(null===e||void 0===e?void 0:e.option)))||void 0===p?void 0:p.src)&&void 0!==l?l:null===t||void 0===t||null===(h=t.finalArr)||void 0===h||null===(v=h.finalArrExternal)||void 0===v||null===(g=v.find(t=>(null===t||void 0===t?void 0:t.color)==(null===e||void 0===e?void 0:e.option)))||void 0===g?void 0:g.optionsrc,"?width=400&height=400")})},o):(0,S.jsx)("div",{onClick:t=>{t.stopPropagation(),r&&m(e.option,i)},style:{fontFamily:u,fontSize:w+"px",lineHeight:"1",padding:"7px 12px",border:n?"1px solid #1a1a1a":"1px solid #dcdcdc",backgroundColor:n?"#1a1a1a":"transparent",color:n?"#ffffff":r?"#1a1a1a":"#c4c4c4",textDecoration:r?"none":"line-through",cursor:r?"pointer":"not-allowed",borderRadius:"2px",transition:"border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease",whiteSpace:"nowrap",userSelect:"none"},...r?(0,Ct.i)(e.option):{"aria-label":e.option+" (unavailable)","aria-disabled":!0},children:e.option},o)})})]},i)})})},bt=i(6594),jt=i(4833),St=i(3161);var kt=function(t){var e,i,o,r,l,p,h,v;const[x]=(0,s.QN)("isInDesignMode"),[g]=(0,s.QN)("isDemoBrand"),[m]=(0,s.QN)("whatmoreSecondaryColor"),f=(0,s.Xd)("whatmoreSecondaryColorShade900"),[w]=(0,s.QN)("whatmorePrimaryFont"),[C]=(0,s.QN)("whatmoreShopId"),[b,j,k,I]=(0,c.A)(),[z,_]=(0,n.useState)(!1),[F,T]=(0,n.useState)(t.product),A=(0,s.Xd)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:N}=(0,n.useContext)(y.AppContext),[B,O]=(0,n.useState)(null),[D,W]=(0,n.useState)(parseFloat(F.price)),[M,Q]=(0,n.useState)(parseFloat(F.compare_price)),[H,V]=(0,n.useState)(null===F||void 0===F?void 0:F.title),[X,Y]=(0,n.useState)(F.currency),[U,$]=(0,n.useState)(null),q=t.event,K=t.productClickHandler,{whatmoreIsPreviewMode:G}=(0,n.useContext)(y.AppContext),[Z,J]=(0,n.useState)(null),[rt,st]=(0,n.useState)(!1),[ct,ht]=(0,n.useState)(!1),[vt,xt,gt,ft,Ct,kt,It,zt]=t.useAddToCartStatesInstance,_t=t.productCartCounts&&t.productCartCounts[F.product_id]?t.productCartCounts[F.product_id]:vt.cart_count;if((0,n.useEffect)(()=>{(0,d.w4b)(C)?(0,bt.ck)(F,(0,d.NCy)(C),C).then(t=>{T(t),W(parseFloat(t.price)),Q(parseFloat(t.compare_price)),Y(t.currency),st(!0)}).catch(t=>{st(!0)}):(async()=>{try{var t,e,i,o,n,r;const l=await(0,u.M)(F,(0,d.NCy)(C),C);$(l),W((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)/100),Q((null!==(o=null===l||void 0===l||null===(n=l.variants)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.compare_at_price)&&void 0!==o?o:null===l||void 0===l?void 0:l.compare_at_price)/100),st(!0)}catch(l){st(!0)}})(),!(0,d.E8r)(C)||!("in_stock"in q)||null!==q&&void 0!==q&&q.in_stock||gt("errored")},[]),(0,n.useEffect)(()=>{var t,e;const i=null!=U?null===U||void 0===U||null===(t=U.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,o=-1!==i?null===U||void 0===U||null===(e=U.variants)||void 0===e?void 0:e.map(t=>{var e,o;const n=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:n,src:null===t||void 0===t||null===(o=t.featured_image)||void 0===o?void 0:o.src}:null}):[];let n=[];var r;-1!==i&&(n=null===U||void 0===U||null===(r=U.images)||void 0===r?void 0:r.map(t=>({color:t.color,src:t.src,optionsrc:t.optionsrc})));J({position:i,finalArr:o,finalArrExternal:n})},[U]),!rt)return(0,S.jsx)(S.Fragment,{});var Ft=.68*I,Et=.55*Ft,Tt=.4*Ft,At=Ft*(.55-.4),Nt=Ft+"px",Pt=Tt+"px",Lt=At+"px",Bt=.12*Tt;const Rt=(0,d.XQu)(C);function Ot(){window.location.href=function(t){return(0,d.BLb)(C)?t.product_link+"?"+(0,d.VCz)(C)+"&"+(0,d.Spk)(C)+"&"+(0,d.$lz)(C):t.product_link}(F)}function Dt(t,e){x||g||(async()=>{(0,a.Pb)(t,e)})(),"72550089015"==C?Ot():K(e),_(!0)}const Wt=(null===N||void 0===N?void 0:N.landingLocationType)||"index",Mt=(null===N||void 0===N?void 0:N.templateType)||"template-a",Qt=(0,jt.Wd)(Wt)+(0,jt.gf)(Mt)+(null!==q&&void 0!==q&&q.isRelatedEvent?"R":"E")+"_"+(null===q||void 0===q?void 0:q.event_id),Ht=(0,d.HKH)(C)&&t.activeProductsCount>1&&"init"==vt.state&&0==vt.cart_count;return(0,S.jsxs)(P.B,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:it,marginBottom:(0,d.qw1)(C),width:Nt,height:"fit-content",boxShadow:"round"==A?"dark-lg":null,onClick:()=>{Dt(q,F)},backgroundColor:(0,et.YU)("#ffffff",(0,d.p2R)(C)),animation:z?tt.jd:tt.so,borderRadius:"round"==A?"xl":null,overflow:"hidden",spacing:0,sx:{borderWidth:(0,d.YcK)(C),borderColor:(0,d.Fwt)(C)},children:[(0,S.jsxs)(P.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,S.jsx)(E.az,{height:Pt,width:Pt,children:(0,S.jsx)(R._,{className:"product-tile-image",width:Pt,height:Pt,src:(0,wt.b)(null!==(e=null!==(i=null===Z||void 0===Z||null===(o=Z.finalArr)||void 0===o||null===(r=o.find(t=>(null===t||void 0===t?void 0:t.color)==(null===B||void 0===B?void 0:B[null===Z||void 0===Z?void 0:Z.position])))||void 0===r?void 0:r.src)&&void 0!==i?i:null===Z||void 0===Z||null===(l=Z.finalArrExternal)||void 0===l||null===(p=l.find(t=>(null===t||void 0===t?void 0:t.color)==(null===B||void 0===B?void 0:B[null===Z||void 0===Z?void 0:Z.position])))||void 0===p?void 0:p.src)&&void 0!==e?e:F.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,d.KZe)(C)+" !important"}})}),(0,S.jsxs)(E.az,{height:Pt,width:Ft-Tt+"px",children:[(0,S.jsxs)(P.B,{direction:"column",className:"wht-pr-title",justifyContent:(0,d.UlM)(C)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"4px",paddingY:"10px",children:[(0,S.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,d.uoB)(C),"important"),t.style.setProperty("font-size",1.1*Bt*(0,d.rh$)(C)+"px","important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",w,"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"))},children:(0,at.v)("58396311733"===C?(0,St.$)(H):H,"prod-tile")}),(0,d.Nzx)(C)?(0,S.jsxs)(P.B,{className:"whatmore-product-atc-price",direction:(0,d.vw2)(C)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",borderRadius:"round"==A?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"4px",sx:{margin:"0px !important",marginBottom:"4px !important"},children:[rt&&(0,S.jsxs)(L.E,{noOfLines:1,fontSize:.9*Bt*(0,d.rh$)(C)+"px !important",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:w+" !important",color:(0,d.uoB)(C)+" !important",padding:"0px !important",letterSpacing:"normal !important",margin:"0px !important"},children:["\xa0"," "+(0,bt.Sb)("70756368633"===C?parseFloat(null===q||void 0===q||null===(h=q.products)||void 0===h||null===(v=h[0])||void 0===v?void 0:v.price):null!==D&&void 0!==D?D:null===F||void 0===F?void 0:F.price,"",C,X)," \xa0"]}),(0,dt.P)(D,M)&&rt?(0,S.jsxs)(L.E,{noOfLines:1,fontSize:.9*Bt*(0,d.rh$)(C)+"px !important",fontWeight:"medium !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:w+" !important",color:(0,d.gld)(C)+" !important",margin:"0px !important",letterSpacing:"normal !important",textDecoration:0===D?"":"line-through !important"},children:[" ",(0,bt.Sb)(null!==M&&void 0!==M?M:null===F||void 0===F?void 0:F.compare_price,"",C,X)]}):(0,S.jsx)(S.Fragment,{})]}):(0,S.jsx)(S.Fragment,{}),(0,S.jsx)(L.E,{fontSize:.82*Bt*(0,d.rh$)(C)+"px",fontWeight:"medium",lineHeight:"110%",sx:{margin:"0px !important",fontFamily:w+" !important",color:(0,d.Br1)(C)+" !important"},children:G?(0,d.p6A)(C):(0,d.i2h)(C)})]}),(0,d.UlM)(C)?(0,S.jsx)(P.B,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,S.jsxs)(P.B,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,S.jsx)(P.B,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:f,sx:{borderRadius:"round"==A?"5px":"0px",padding:"2px"},spacing:"0px",children:(0,d.SK$)(C)?(0,S.jsx)(pt.$,{size:"sm",_hover:{bg:m},sx:{bg:m},children:(0,S.jsx)(L.E,{color:"white",paddingX:"6px",fontSize:.8*Bt+"px",children:"VIEW PRODUCT"})}):(0,S.jsx)(lt.A,{sx:{color:m,fontSize:1.3*Bt+"px"}})}),(0,S.jsx)(E.az,{width:"2px"})]})}):(0,S.jsx)(S.Fragment,{})]})]}),"awaitingVariantSelection"==vt.state&&null!=ft?(0,S.jsx)(E.az,{width:"100%",height:"fit-content",marginTop:.1*Et+"px",marginBottom:.1*Et+"px",overflowY:"auto",overflowX:"hidden",maxHeight:Et*Rt+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,S.jsx)(yt,{maxHeight:Et*Rt*.5+"px",width:Nt,height:"fit-content",event:q,product:F,finalArr:Z,data:U,productVariantOptions:ft,baseFontSize:1.2*Bt,onOptionSelected:t=>{!function(t){O(t);const e=It(t);e&&(W(e.price/100),Q(e.compare_price/100),e.title.includes(" ")&&V(e.title))}(t)}})}):(0,S.jsx)(S.Fragment,{}),(0,S.jsxs)(P.B,{direction:"row",width:"100%",height:Lt,spacing:0,children:[(0,S.jsx)(P.B,{className:"whatmore-add-to-cart",direction:"row",width:"100%",height:Lt,children:(0,S.jsx)(mt,{baseFontSize:Ht?.2*At:.3*At,setProductVariantTitle:V,product:F,cartState:vt.state,cartCount:_t,updateCartState:gt,onClickAtc:t=>{"72603631788"!==C&&"5220302897"!==C||"init"!=vt.state?"init"==vt.state?(Ct(Qt),(0,ot.kz)({userInteractionType:nt.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:N,event:q,productList:[F],ctaList:q.cta})):"awaitingVariantSelection"==vt.state&&(kt(B,Qt),V(null===F||void 0===F?void 0:F.title)):Dt(q,F)},onCartIconClick:()=>{zt()}})}),Ht&&(0,S.jsx)(P.B,{width:"100%",className:"wht-all-atc",sx:{fontSize:.28*At,flexDirection:"row",height:"100%",justifyContent:"center",alignItems:"center",bg:"white"},children:(0,S.jsx)(pt.$,{disabled:ct,sx:{cursor:"pointer",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",fontFamily:`${w} !important`,color:"black"},onClick:async t=>{t.stopPropagation();try{ht(!0),xt(Qt),(0,ot.kz)({userInteractionType:nt.O.PRODUCT_TILE_ALL_ATC_CLICKED,widgetSourceDetails:N,event:q,productList:q.products,ctaList:q.cta}),ht(!1)}catch(e){console.error("Failed to add items:",e),ht(!1)}},children:ct?(0,S.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,S.jsx)(ut.A,{sx:{filter:"drop-shadow(0 0 15px black)",color:"#F5F5F5",fontSize:.3*At*2.5+"px"}})}):(0,S.jsx)(L.E,{fontFamily:w,children:"ADD ALL ITEMS"})})})]})]})},It=i(2835),zt=i(8397);var _t=function(t){var e,i,o,n,r;const[l]=(0,s.QN)("isInDesignMode"),[c]=(0,s.QN)("isDemoBrand"),[u]=(0,s.QN)("whatmoreSecondaryColor"),[p]=(0,s.QN)("whatmorePrimaryFont"),[h]=(0,s.QN)("whatmoreShopId"),[v]=(0,s.QN)("websiteLanguage"),x=t.event,g=t.product,m=null!==(e=t.baseFontSize)&&void 0!==e?e:10,f=null!==(i=t.width)&&void 0!==i?i:"fit-content",w=null!==(o=t.height)&&void 0!==o?o:"fit-content";return(0,S.jsx)(zt.N,{href:g.product_link,color:u,onClick:()=>{!function(t,e){l||c||(async()=>{(0,a.TJ)(t,e)})()}(x,g)},children:(0,S.jsx)(E.az,{width:f,height:w,padding:"2x",boxShadow:"lg",borderRadius:"md",backgroundColor:"white",children:(0,S.jsxs)(P.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",spacing:"5px",children:[(0,S.jsx)(F.o,{children:(0,S.jsx)(L.E,{lineHeight:"100%",fontSize:1.4*m,fontWeight:"semibold",sx:{fontFamily:p+" !important",color:u+" !important"},children:"MORE INFO"!=(0,d.KnH)(h)?(0,d.KnH)(h):null!==(n=null===K.m||void 0===K.m||null===(r=K.m[v])||void 0===r?void 0:r.more_info)&&void 0!==n?n:(0,d.KnH)(h)})}),(0,S.jsx)(F.o,{children:(0,S.jsx)(lt.A,{sx:{color:u,fontSize:1.4*m}})})]})})})},Ft=i(9408);function Et(t){var e,i,o;const[r]=(0,s.QN)("whatmoreSecondaryColor"),[l]=(0,s.QN)("whatmorePrimaryFont"),[a]=(0,s.QN)("whatmoreShopId"),[c]=(0,s.QN)("websiteLanguage"),[u,p]=(0,n.useState)(!1),h=null!==(e=t.baseFontSize)&&void 0!==e?e:10,v=t.onClick,x=t.width,g=t.height,m=t.title;return(0,S.jsx)(E.az,{width:x,height:g,padding:"2x",boxShadow:"lg",backgroundColor:"#000000"==(0,d.Wc_)(a)?r:(0,d.Wc_)(a),onClick:t=>{t.stopPropagation(),v(),p(!0)},animation:u?tt.jd:null,onAnimationEnd:()=>{p(!1)},cursor:"pointer",children:(0,S.jsx)(P.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",children:(0,S.jsxs)(L.E,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},lineHeight:"100%",fontSize:1.4*h+"px",fontWeight:"semibold",sx:{fontFamily:l+" !important",color:(0,d.Hfu)(a)+" !important"},children:["\xa0","SHOP NOW"==m&&null!==(i=null===K.m||void 0===K.m||null===(o=K.m[c])||void 0===o?void 0:o.shop_now)&&void 0!==i?i:m,"\xa0"]})})})}var Tt=function(t){var e,i,o;const[n]=(0,s.QN)("whatmoreShopId"),r=t.event,l=t.product,a=null!==(e=t.baseFontSize)&&void 0!==e?e:10,c=t.onShopNowClick,u=null!==(i=t.width)&&void 0!==i?i:"100%",p=null!==(o=t.height)&&void 0!==o?o:"100%";return(0,S.jsx)(Et,{onClick:function(){c()},event:r,product:l,baseFontSize:a,width:u,height:p,title:(0,d.Qed)(n)})};var At=function(t){var e,i,o,r,l;const[p]=(0,s.QN)("isInDesignMode"),[h]=(0,s.QN)("isDemoBrand"),[v]=(0,s.QN)("whatmorePrimaryFont"),[x]=(0,s.QN)("whatmoreShopId"),[g,m,f,w]=(0,c.A)(),[C,b]=(0,n.useState)(!1),[j,k]=(0,n.useState)(t.product),{whatmoreWidgetSourceDetails:I}=(0,n.useContext)(y.AppContext),[z,_]=(0,n.useState)(null),[T,A,N,B,O,D,W,M]=t.useAddToCartStatesInstance,[Q,H]=(0,n.useState)(parseFloat(j.price)),[V,X]=(0,n.useState)(parseFloat(j.compare_price)),[Y,U]=(0,n.useState)(j.currency),[$,q]=(0,n.useState)(!1),K=t.productCartCounts&&t.productCartCounts[j.product_id]?t.productCartCounts[j.product_id]:T.cart_count,G=t.event,Z=t.productClickHandler,J=null!==(e=t.tileWidthFactor)&&void 0!==e?e:1,et=(null===I||void 0===I?void 0:I.landingLocationType)||"index",rt=(null===I||void 0===I?void 0:I.templateType)||"template-a",lt=(0,jt.Wd)(et)+(0,jt.gf)(rt)+(null!==G&&void 0!==G&&G.isRelatedEvent?"R":"E")+"_"+(null===G||void 0===G?void 0:G.event_id);(0,n.useEffect)(()=>{(0,d.w4b)(x)?(0,bt.ck)(j,(0,d.NCy)(x),x).then(t=>{k(t),H(parseFloat(t.price)),X(parseFloat(t.compare_price)),U(t.currency)}):(async()=>{var t,e,i,o,n,r;const l=await(0,u.M)(j,(0,d.NCy)(x),x);H((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)/100),X((null!==(o=null===l||void 0===l||null===(n=l.variants)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.compare_at_price)&&void 0!==o?o:null===l||void 0===l?void 0:l.compare_at_price)/100),q(!0)})()},[]);var st=w*J,ct=.3*st,ut=st+"px",pt=.7*ct,ht=.9*pt,vt=.12*ct;const xt=(0,d.XQu)(x);function gt(t,e){p||h||(async()=>{(0,a.Pb)(t,e)})(),Z(e),b(!0)}return(0,S.jsx)(P.B,{direction:"row",width:ut,height:"fit-content",justifyContent:"center",children:(0,S.jsx)(E.az,{marginTop:it,marginBottom:(0,d.qw1)(x),width:ut,onClick:t=>{},animation:C?tt.jd:null,borderRadius:"lg",onAnimationEnd:()=>{b(!1)},children:(0,S.jsxs)(P.B,{direction:"column",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",spacing:"0px",children:[(0,S.jsxs)(P.B,{direction:"row",width:"100%",height:"70%",justifyContent:"space-around",alignItems:"center",borderTopRadius:"lg",overflow:"hidden",onClick:()=>{gt(G,j)},children:[(0,S.jsx)(E.az,{height:pt+"px",width:pt+"px",children:(0,S.jsx)(P.B,{direction:"column",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",children:(0,S.jsx)(E.az,{height:ht+"px",width:ht+"px",borderRadius:"lg",bgColor:"gray.100",overflow:"hidden",children:(0,S.jsx)(R._,{width:ht+"px",height:ht+"px",src:j.thumbnail_image,objectFit:"cover"})})})}),(0,S.jsx)(E.az,{height:pt+"px",width:st-pt+"px",children:(0,S.jsxs)(P.B,{direction:"column",justifyContent:"space-between",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingY:"10px",spacing:"2px",children:[(0,S.jsx)(L.E,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*vt+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:v+" !important",color:"white !important"},children:(0,at.v)(j.title.toString())}),(0,S.jsxs)(P.B,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",marginTop:"5px",children:[(0,d.Nzx)(x)?(0,S.jsxs)(P.B,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignItems:"center",borderRadius:"lg",backgroundColor:"blackAlpha.500",paddingX:"10px",paddingY:"5px",children:[$&&(0,S.jsx)(L.E,{noOfLines:1,fontSize:1*vt+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:v+" !important",color:"white !important"},children:" "+(0,bt.Sb)("28849832033"===x?parseFloat(null===G||void 0===G||null===(i=G.products)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.price):null!==Q&&void 0!==Q?Q:null===j||void 0===j?void 0:j.price,"",x,Y)}),(0,S.jsx)(F.o,{children:(0,dt.P)(j.price,j.compare_price)&&$?(0,S.jsxs)(L.E,{noOfLines:1,fontSize:.8*vt+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:v+" !important",color:"#F9F6EE !important",textDecoration:"line-through !important"},children:[" ",(0,bt.Sb)("28849832033"===x?parseFloat(null===G||void 0===G||null===(r=G.products)||void 0===r||null===(l=r[0])||void 0===l?void 0:l.compare_price):null!==V&&void 0!==V?V:null===j||void 0===j?void 0:j.compare_price,"",x,Y)]}):(0,S.jsx)(S.Fragment,{})})]}):(0,S.jsx)(S.Fragment,{}),(0,S.jsx)(F.o,{children:(0,S.jsx)(It.A,{storeId:x,productId:j.client_product_id,productLink:j.product_link,fontSize:1*vt,fontColor:"white"})})]})]})})]}),"awaitingVariantSelection"==T.state&&null!=B?(0,S.jsx)(E.az,{width:"100%",height:"fit-content",marginTop:.1*ct+"px",marginBottom:.1*ct+"px",overflowY:"auto",overflowX:"hidden",maxHeight:ct*xt+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,S.jsx)(yt,{width:ut,height:"fit-content",event:G,product:j,productVariantOptions:B,baseFontSize:1*vt,onOptionSelected:t=>{!function(t){_(t);const e=W(t);e&&(H(e.price/100),X(e.compare_price/100))}(t)},optionTitleColor:"white"})}):(0,S.jsx)(S.Fragment,{}),(0,S.jsxs)(P.B,{direction:"row",width:"100%",height:"30%",justifyContent:"center",alignItems:"center",paddingBottom:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,S.jsx)(E.az,{width:"100%",height:"100%",children:(0,S.jsx)(_t,{baseFontSize:.8*vt,event:G,product:j,width:"100%",height:"100%"})}),(0,S.jsx)(E.az,{width:"100%",height:"100%",borderRadius:"md",overflow:"hidden",children:(0,d.ZzM)(x)?(0,S.jsx)(Tt,{baseFontSize:.8*vt,event:G,product:j,borderRadius:"md",onShopNowClick:t=>{gt(G,j)}}):(0,S.jsx)(S.Fragment,{children:"form"===(0,d.nWM)(x)?(0,S.jsx)(Ft.default,{baseFontSize:.8*vt,event:G,product:j,width:"100%",height:"100%",showAddedToCart:!0}):(0,S.jsx)(mt,{baseFontSize:.8*vt,event:G,product:j,cartState:T.state,cartCount:K,borderRadius:"md",onClickAtc:t=>{"72603631788"!==x&&"5220302897"!==x||"init"!=T.state?"init"==T.state?(O(lt),(0,ot.kz)({userInteractionType:nt.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:I,event:G,productList:[j],ctaList:G.cta})):"awaitingVariantSelection"==T.state&&D(z,lt):gt(G,j)},onCartIconClick:()=>{M()}})})})]})]})})})};var Nt=function(t){const[e]=(0,s.QN)("isInDesignMode"),[i]=(0,s.QN)("isDemoBrand"),[o]=(0,s.QN)("whatmoreSecondaryColor"),r=(0,s.Xd)("whatmoreSecondaryColorShade900"),[l]=(0,s.QN)("whatmorePrimaryFont"),[p]=(0,s.QN)("whatmoreShopId"),[h,v,x,g]=(0,c.A)(),[m,f]=(0,n.useState)(!1),[w,C]=(0,n.useState)(t.product),b=(0,s.Xd)("whatmoreUITheme"),[j,k]=(0,n.useState)(!1),[I,z]=(0,n.useState)(parseFloat(w.price)),[_,F]=(0,n.useState)(parseFloat(w.compare_price)),[T,A]=(0,n.useState)(w.currency),[N,B]=(0,n.useState)(!0),O=t.event,[D,W]=(0,n.useState)();if((0,n.useEffect)(()=>{if("6573064236"===p&&null!==w&&void 0!==w&&w.product_link){const t=Math.ceil(parseFloat(w.price)),e=Math.ceil(parseFloat(w.compare_price));return z(t),F(e),void k(!0)}(0,d.w4b)(p)?(0,bt.ck)(w,(0,d.NCy)(p),p).then(t=>{C(t),z(parseFloat(t.price)),F(parseFloat(t.compare_price)),A(t.currency),k(!0)}).catch(t=>k(!0)):(async()=>{try{var t,e,i,o,n,r;const l=await(0,u.M)(w,(0,d.NCy)(p),p);W(l),z((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)/100),F((null!==(o=null===l||void 0===l||null===(n=l.variants)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.compare_at_price)&&void 0!==o?o:null===l||void 0===l?void 0:l.compare_at_price)/100),k(!0)}catch(l){k(!0)}})()},[]),!j)return(0,S.jsx)(S.Fragment,{});var M=.68*g,Q=.4*M,H=M+"px",V=Q+"px",X=M*(.55-.4)+"px",U=.12*Q;(0,d.XQu)(p);const{whatmoreWidgetSourceDetails:$}=(0,n.useContext)(y.AppContext),q=null!==I&&void 0!==I?I:null===w||void 0===w?void 0:w.price,K="STR0IIHZXKW"!==p&&"STRU4RO77D5"!==p||q?" "+(0,bt.Sb)(q,"",p,T)+" ":"Price on request";function G(t){return(0,d.BLb)(p)?t.product_link+"?"+(0,d.VCz)(p)+"&"+(0,d.Spk)(p)+"&"+(0,d.$lz)(p):t.product_link}function Z(t,o){e||i||(async()=>{(0,a.Pb)(t,o),(0,ot.kz)({userInteractionType:nt.O.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:$,event:t,productList:[o],ctaList:t.cta})})(),f(!0)}return N?(0,S.jsxs)(P.B,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:it,marginBottom:(0,d.qw1)(p),width:H,height:"fit-content",boxShadow:"round"==b?"dark-lg":null,onClick:()=>{Z(O,w),window.location.href=G(w)},backgroundColor:(0,et.YU)("#ffffff",(0,d.p2R)(p)),animation:m?tt.jd:tt.so,borderRadius:"round"==b?"xl":null,overflow:"hidden",spacing:0,sx:{borderWidth:(0,d.YcK)(p),borderColor:(0,d.Fwt)(p)},children:[(0,S.jsxs)(P.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,S.jsx)(E.az,{height:V,width:V,children:(0,S.jsx)(R._,{width:V,height:V,src:(0,wt.b)(w.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,d.KZe)(p)+" !important"}})}),(0,S.jsxs)(E.az,{height:V,width:M-Q+"px",children:[(0,S.jsxs)(P.B,{direction:"column",justifyContent:(0,d.UlM)(p)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingTop:"10px",paddingBottom:"16px",children:[(0,S.jsx)(L.E,{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:l+" !important",color:"black !important",lineHeight:"120% !important",fontWeight:"medium !important",fontSize:1.1*U+"px !important"},children:(0,at.v)(null==w.title?"":w.title.toString(),"prod-tile")}),(0,d.Nzx)(p)?(0,S.jsxs)(P.B,{className:"whatmore-product-shopnow-price",direction:(0,d.vw2)(p)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",marginTop:"5px",borderRadius:"round"==b?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"5px",children:[j&&(0,S.jsx)(L.E,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},noOfLines:1,fontSize:.9*U+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:l+" !important",color:(0,d.uoB)(p)+" !important",margin:"0px !important"},children:K}),(0,dt.P)(I,_)&&j?(0,S.jsxs)(L.E,{as:"s",style:{minHeight:0,textDecoration:"line-through"},noOfLines:1,fontSize:.9*U+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:l+" !important",color:(0,d.gld)(p)+" !important",margin:"0px !important"},children:[" ",(0,bt.Sb)(null!==_&&void 0!==_?_:null===w||void 0===w?void 0:w.compare_price,"",p,T)]}):(0,S.jsx)(S.Fragment,{})]}):(0,S.jsx)(S.Fragment,{}),""!=(0,d.rsz)(p)&&(0,S.jsxs)(L.E,{noOfLines:1,fontSize:.9*U+"px",lineHeight:"100%",paddingTop:"6px",sx:{fontFamily:(0,d.ogW)(p)+" !important",color:(0,d._zx)(p)+" !important",margin:"0px !important"},children:["\xa0",(0,d.rsz)(p)," \xa0"]})]}),(0,d.UlM)(p)?(0,S.jsx)(P.B,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,S.jsxs)(P.B,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,S.jsx)(P.B,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:r,sx:{borderRadius:"round"==b?"5px":"0px",padding:"2px"},spacing:"0px",children:"STRI2XC0BMX"==p||"STRNUBH0VYQ"==p||"STRAPB3KXSR"==p?(0,S.jsx)(Y.A,{sx:{boxShadow:3,fontSize:1.3*U,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),B(!1)}}):(0,S.jsx)(lt.A,{sx:{color:o,fontSize:1.3*U+"px"}})}),(0,S.jsx)(E.az,{width:"2px"})]})}):(0,S.jsx)(S.Fragment,{})]})]}),(0,d.Woi)(p)&&(0,S.jsx)(P.B,{direction:"row",width:"100%",height:X,justifyContent:"center",alignItems:"center",children:(0,S.jsx)(Tt,{baseFontSize:.8*U,event:O,product:w,borderRadius:"md",onShopNowClick:t=>{Z(O,w),window.location.href=G(w)}})})]}):(0,S.jsx)(S.Fragment,{})};function Pt(t){var e;const[i]=(0,s.QN)("whatmoreSecondaryColor"),[o]=(0,s.QN)("whatmorePrimaryFont"),[r]=(0,s.QN)("whatmoreShopId"),[l,a]=(0,n.useState)(!1),c=null!==(e=t.baseFontSize)&&void 0!==e?e:10,u=t.onClick,p=t.width,h=t.height,v=t.title,x=t.showInProgressIcon;return"awaitingVariantSelection"==t.cartState||"productVariantDetailsApiCallInProgress"==t.cartState?(0,S.jsx)(Lt,{onClick:()=>t.onClick(),event:t.event,product:t.product,baseFontSize:c,width:p,height:h}):(0,S.jsxs)(E.az,{display:"flex",width:"fit-content",minWidth:"75%",padding:"2x",boxShadow:"lg",animation:l?tt.jd:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:["awaitingVariantSelection"==t.cartState&&(0,S.jsx)(P.B,{direction:"row",alignItems:"center",justifyContent:"center",paddingY:"2px",backgroundColor:"white",onClick:e=>{e.stopPropagation(),t.updateCartState("init"),a(!0)},children:(0,S.jsxs)(L.E,{lineHeight:"100%",fontSize:1.4*c+"px !important",fontWeight:"semibold !important",sx:{fontFamily:o+" !important",color:"#343434 !important"},children:["\xa0","63064310011"==r?"Annuler":"Cancel","\xa0"]})}),(0,S.jsxs)(P.B,{direction:"row",backgroundColor:x?(0,et.YU)(i,8):i,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",onClick:t=>{t.stopPropagation(),u(),a(!0)},children:[(0,S.jsxs)(L.E,{lineHeight:"100%",fontSize:1.4*c+"px !important",fontWeight:"semibold !important",sx:{fontFamily:o+" !important",color:(0,d.Hfu)(r)+" !important"},children:["\xa0",v,"\xa0"]}),x?(0,S.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,S.jsx)(ut.A,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*c+"px"}})}):(0,S.jsx)(S.Fragment,{})]})]})}function Lt(t){const[e]=(0,s.QN)("whatmoreSecondaryColor"),[i]=(0,s.QN)("whatmorePrimaryFont"),[o]=(0,s.QN)("whatmoreShopId"),[r,l]=(0,n.useState)(!1),a=t.onClick,c=t.baseFontSize;return(0,S.jsx)(P.B,{direction:"row",paddingBottom:"3%",position:"relative",children:(0,S.jsx)(E.az,{className:"whatmore-add-to-cart-initial-button",width:"fit-content",minWidth:"75%",boxShadow:"lg",padding:"6px 12px",borderRadius:"6px",backgroundColor:e,onClick:t=>{t.stopPropagation(),a(),l(!0)},animation:r?tt.jd:null,onAnimationEnd:()=>{l(!1)},cursor:"pointer",zIndex:"1000",children:(0,S.jsx)(P.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",children:(0,S.jsx)(F.o,{children:(0,S.jsx)(L.E,{lineHeight:"100%",fontSize:1.3*c+"px",fontWeight:"semibold",sx:{fontFamily:`${i} !important`,color:`${(0,d.Hfu)(o)} !important`},children:(0,d.KPq)(o)})})})})})}function Bt(t){var e;const[i]=(0,s.QN)("whatmorePrimaryFont"),o=null!==(e=t.baseFontSize)&&void 0!==e?e:10;t.width,t.height;return(0,S.jsx)(E.az,{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,S.jsx)(P.B,{direction:"row",width:"100%",alignItems:"center",paddingX:"4px",paddingY:"3px",justifyContent:"center",children:(0,S.jsxs)(L.E,{color:"gray",lineHeight:"100%",fontSize:1.2*o+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:"gray !important"},children:["\xa0"," Sold Out ","\xa0"]})})})}function Rt(t){var e;const[i]=(0,s.QN)("whatmoreSecondaryColor"),[o]=(0,s.QN)("whatmorePrimaryFont"),[n]=(0,s.QN)("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,S.jsx)(E.az,{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,S.jsxs)(P.B,{direction:"row",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:[(0,S.jsx)(F.o,{paddingX:"5px",onClick:()=>{d()},children:"1972174947"!=n&&"55194878152"!=n&&"12181504100"!=n?(0,S.jsx)(ct.A,{sx:{color:i,fontSize:1.6*r}}):(0,S.jsx)(pt.$,{size:"sm",_hover:{bg:i},sx:{bg:i},children:(0,S.jsx)(L.E,{paddingX:"6px",color:"white",sx:{fontSize:.85*r},children:"GO TO CART"})})}),(0,S.jsx)(L.E,{color:i,fontSize:1.3*r+"px !important",fontWeight:"semibold !important",sx:{fontFamily:o+" !important"},children:a}),(0,S.jsx)(F.o,{paddingX:"5px",onClick:t=>{t.stopPropagation(),l()},children:(0,S.jsx)(st.A,{sx:{color:i,fontSize:1.6*r}})})]})})}var Ot=function(t){var e,i,o,n;const[r]=(0,s.QN)("whatmoreShopId"),l=t.event,a=t.product,d=null!==(e=t.baseFontSize)&&void 0!==e?e:10,c=null===(i=t.showAddedToCart)||void 0===i||i,u=t.cartState,p=t.cartCount,h=t.onClickAtc,v=t.onCartIconClick;function x(){h()}const g=null!==(o=t.width)&&void 0!==o?o:"100%",m=null!==(n=t.height)&&void 0!==n?n:"100%";return"errored"==u?(0,S.jsx)(Bt,{event:l,product:a,baseFontSize:d,width:g,height:m}):"init"==u?0==p?(0,S.jsx)(Lt,{onClick:x,event:l,product:a,baseFontSize:d,width:g,height:m}):c?(0,S.jsx)(Rt,{onClick:x,event:l,product:a,baseFontSize:d,cartCount:p,width:g,height:m,onCartIconClick:v}):(0,S.jsx)(Lt,{onClick:x,event:l,product:a,baseFontSize:d,width:g,height:m}):(0,S.jsx)(Pt,{onClick:x,cartState:u,updateCartState:t.updateCartState,event:l,product:a,baseFontSize:d,width:g,height:m,title:"awaitingVariantSelection"==u?"63064310011"==r?"Valider":"Done":"",showInProgressIcon:"atcApiCallInProgress"==u||"productVariantDetailsApiCallInProgress"==u})};var Dt=function(t){var e,i,o,r,l,p;const[h]=(0,s.QN)("isInDesignMode"),[v]=(0,s.QN)("isDemoBrand"),[x]=(0,s.QN)("whatmorePrimaryFont"),[g]=(0,s.QN)("whatmoreShopId"),[m,f,w,C]=(0,c.A)(),[b,j]=(0,n.useState)(!1),[k,I]=(0,n.useState)(t.product),z=(0,s.Xd)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:_}=(0,n.useContext)(y.AppContext),[F,T]=(0,n.useState)(null),[A,N]=(0,n.useState)(parseFloat(k.price)),[B,O]=(0,n.useState)(parseFloat(k.compare_price)),[D,W]=(0,n.useState)(k.currency),[M,Q]=(0,n.useState)(null),H=t.event,V=t.productClickHandler,[X,Y]=(0,n.useState)(null),[U,$]=(0,n.useState)(!1),[q,K,G,Z,J,rt,lt,st]=t.useAddToCartStatesInstance,ct=t.productCartCounts&&t.productCartCounts[k.product_id]?t.productCartCounts[k.product_id]:q.cart_count,ut=(null===_||void 0===_?void 0:_.landingLocationType)||"index",pt=(null===_||void 0===_?void 0:_.templateType)||"template-a",ht=(0,jt.Wd)(ut)+(0,jt.gf)(pt)+"_"+(null===H||void 0===H?void 0:H.event_id);(0,n.useEffect)(()=>{(0,d.w4b)(g)?(0,bt.ck)(k,(0,d.NCy)(g),g).then(t=>{I(t),N(parseFloat(t.price)),O(parseFloat(t.compare_price)),W(t.currency),$(!0)}):(async()=>{var t,e,i,o,n,r;const l=await(0,u.M)(k,(0,d.NCy)(g),g);Q(l),N((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)/100),O((null!==(o=null===l||void 0===l||null===(n=l.variants)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.compare_at_price)&&void 0!==o?o:null===l||void 0===l?void 0:l.compare_at_price)/100),$(!0)})(),!(0,d.E8r)(g)||null!==H&&void 0!==H&&H.in_stock||G("errored")},[]),(0,n.useEffect)(()=>{var t,e;const i=null!=M?null===M||void 0===M||null===(t=M.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,o=-1!==i?null===M||void 0===M||null===(e=M.variants)||void 0===e?void 0:e.map(t=>{var e,o;const n=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:n,src:null===t||void 0===t||null===(o=t.featured_image)||void 0===o?void 0:o.src}:null}):[];let n=[];var r;-1!==i&&(n=null===M||void 0===M||null===(r=M.images)||void 0===r?void 0:r.map(t=>({color:t.color,src:t.src,optionsrc:t.optionsrc})));Y({position:i,finalArr:o,finalArrExternal:n})},[M]);var vt=.72*C,xt=.37*vt,gt=vt*(.48-.37),mt=.95*vt+"px",ft=xt+"px",Ct=.12*xt;function yt(){window.location.href=function(t){return(0,d.BLb)(g)?t.product_link+"?"+(0,d.VCz)(g)+"&"+(0,d.Spk)(g)+"&"+(0,d.$lz)(g):t.product_link}(k)}return(0,S.jsx)(P.B,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:it,marginBottom:"24px",width:mt,boxShadow:"round"==z?"dark-lg":null,onClick:()=>{!function(t,e){h||v||(async()=>{(0,a.Pb)(t,e)})(),"72550089015"==g?yt():V(e),j(!0)}(H,k)},backgroundColor:(0,et.YU)("#ffffff",(0,d.p2R)(g)),animation:b?tt.jd:null,borderRadius:"round"==z?"xl":null,overflow:"hidden",onAnimationEnd:()=>{j(!1)},spacing:0,sx:{borderWidth:(0,d.YcK)(g),borderColor:(0,d.Fwt)(g)},children:(0,S.jsxs)(P.B,{display:"flex",direction:"row",width:"full",height:"fit-content",justifyContent:"center",alignContent:"center",cursor:"pointer",alignItems:"center",gap:"8px",children:[(0,S.jsx)(E.az,{height:ft,width:ft,children:(0,S.jsx)(R._,{width:"100%",height:"100%",src:(0,wt.b)(null!==(e=null!==(i=null===X||void 0===X||null===(o=X.finalArr)||void 0===o||null===(r=o.find(t=>(null===t||void 0===t?void 0:t.color)==(null===F||void 0===F?void 0:F[null===X||void 0===X?void 0:X.position])))||void 0===r?void 0:r.src)&&void 0!==i?i:null===X||void 0===X||null===(l=X.finalArrExternal)||void 0===l||null===(p=l.find(t=>(null===t||void 0===t?void 0:t.color)==(null===F||void 0===F?void 0:F[null===X||void 0===X?void 0:X.position])))||void 0===p?void 0:p.src)&&void 0!==e?e:k.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,d.KZe)(g)+" !important"}})}),(0,S.jsx)(E.az,{height:ft,width:vt-xt+"px",children:(0,S.jsxs)(P.B,{direction:"column",justifyContent:"flex-start",height:"100%",gap:"4px",paddingTop:"12px",width:"100%",children:[(0,S.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",Ct+"px","important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",x,"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,at.v)(null==k.title?"":k.title.toString())}),(0,d.Nzx)(g)?(0,S.jsxs)(P.B,{direction:(0,d.vw2)(g)?"row":"row-reverse",sx:{margin:"0px !important",minHeight:1.1*Ct+"px"},children:[U&&(0,S.jsxs)(L.E,{noOfLines:1,fontSize:.9*Ct*(0,d.rh$)(g)+"px !important",lineHeight:"100%",sx:{fontFamily:x+" !important",color:(0,d.uoB)(g)+" !important",fontWeight:"bold"},children:[" "+(0,bt.Sb)(null!==A&&void 0!==A?A:null===k||void 0===k?void 0:k.price,"",g,D)," \xa0"]}),(0,dt.P)(A,B)&&U?(0,S.jsxs)(L.E,{noOfLines:1,fontSize:.9*Ct*(0,d.rh$)(g)+"px !important",fontWeight:"medium !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:x+" !important",color:(0,d.gld)(g)+" !important",margin:"0px !important",letterSpacing:"normal !important",textDecoration:"line-through !important"},children:[" ",(0,bt.Sb)(null!==B&&void 0!==B?B:null===k||void 0===k?void 0:k.compare_price,"",g,D)]}):(0,S.jsx)(S.Fragment,{})]}):(0,S.jsx)(S.Fragment,{}),(0,S.jsx)(Ot,{baseFontSize:.3*gt,event:H,product:k,cartState:q.state,cartCount:ct,updateCartState:G,onClickAtc:t=>{"init"===q.state?(J(ht,!0),(0,ot.kz)({userInteractionType:nt.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:_,event:H,productList:[k],ctaList:H.cta})):"awaitingVariantSelection"===q.state&&V(k)},onCartIconClick:t=>{st()}})]})})]})})};function Wt(t){var e,i,o;const[r]=(0,s.QN)("whatmoreSecondaryColor"),[l]=(0,s.QN)("whatmorePrimaryFont"),[a]=(0,s.QN)("whatmoreShopId"),[d,c]=(0,n.useState)(!1),u=null!==(e=t.baseFontSize)&&void 0!==e?e:10,p=t.onClick,h=t.width,v=t.height,x=t.title,g=t.showInProgressIcon;return(0,S.jsxs)(E.az,{display:"flex",width:h,height:v,gap:"8px",animation:d?tt.jd:null,onAnimationEnd:()=>{c(!1)},cursor:"pointer",children:["awaitingVariantSelection"==t.cartState&&(0,S.jsx)(P.B,{direction:"row",flex:"1",alignItems:"center",justifyContent:"center",paddingY:"11px",paddingX:"12px",backgroundColor:"transparent",border:"1px solid #b5b5b5",borderRadius:"8px",onClick:e=>{e.stopPropagation(),t.updateCartState("init"),t.setProductVariantTitle(t.productTitle),c(!0)},children:(0,S.jsxs)(L.E,{lineHeight:"100%",fontSize:1.2*u+"px !important",fontWeight:"500 !important",sx:{fontFamily:l+" !important",color:"#1a1a1a !important"},children:["\xa0",null!==(i=null===K.m||void 0===K.m||null===(o=K.m[null===t||void 0===t?void 0:t.websiteLanguage])||void 0===o?void 0:o.cancel)&&void 0!==i?i:"Cancel","\xa0"]})}),(0,S.jsxs)(P.B,{direction:"row",flex:"1",backgroundColor:g?"#3a3a3a":"#1a1a1a",alignItems:"center",justifyContent:"center",paddingY:"11px",paddingX:"12px",borderRadius:"8px",onClick:t=>{t.stopPropagation(),p(),c(!0)},children:[(0,S.jsxs)(L.E,{lineHeight:"100%",fontSize:1.2*u+"px !important",fontWeight:"500 !important",sx:{fontFamily:l+" !important",color:"#ffffff !important"},children:["\xa0",x,"\xa0"]}),g?(0,S.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,S.jsx)(ut.A,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*u+"px"}})}):(0,S.jsx)(S.Fragment,{})]})]})}function Mt(t){var e,i,o,r,l;const[a]=(0,s.QN)("whatmoreSecondaryColor"),[c]=(0,s.QN)("whatmorePrimaryFont"),[u]=(0,s.QN)("whatmoreShopId"),[p,h]=(0,n.useState)(!1),v=null!==(e=t.baseFontSize)&&void 0!==e?e:10,x=t.onClick,g=t.width,m=t.height,f=null!==(i=t.borderRadius)&&void 0!==i?i:"7px",w=null!==(o=t.paddingY)&&void 0!==o?o:"10px";return(0,S.jsx)(E.az,{width:g,height:m,padding:"2x",boxShadow:"lg",backgroundColor:"#000000"==(0,d.Wc_)(u)?a:(0,d.Wc_)(u),borderRadius:f,onClick:t=>{t.stopPropagation(),x(),h(!0)},animation:p?tt.jd:null,onAnimationEnd:()=>{h(!1)},cursor:"pointer",children:(0,S.jsx)(P.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:w,children:(0,S.jsx)(F.o,{maxWidth:"90%",children:(0,S.jsxs)(L.E,{lineHeight:"100%",fontSize:1.2*v+"px !important",fontWeight:"semibold !important",sx:{fontFamily:c+" !important",color:(0,d.Hfu)(u)+" !important",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["\xa0","ADD TO CART"!=(0,d.KPq)(u)?(0,d.KPq)(u):null!==(r=null===K.m||void 0===K.m||null===(l=K.m[null===t||void 0===t?void 0:t.websiteLanguage])||void 0===l?void 0:l.add_to_cart)&&void 0!==r?r:(0,d.KPq)(u),"\xa0"]})})})})}function Qt(t){var e;const[i]=(0,s.QN)("whatmorePrimaryFont"),o=null!==(e=t.baseFontSize)&&void 0!==e?e:10,n=t.width,r=t.height;return(0,S.jsx)(E.az,{width:n,height:r,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:"gray",borderWidth:"1px",onClick:t=>{t.stopPropagation()},children:(0,S.jsx)(P.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:(0,S.jsxs)(L.E,{color:"gray",lineHeight:"100%",fontSize:1.3*o+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:"gray !important"},children:["\xa0"," Sold Out ","\xa0"]})})})}function Ht(t){var e;const[i]=(0,s.QN)("whatmoreSecondaryColor"),[o]=(0,s.QN)("whatmorePrimaryFont"),[n]=(0,s.QN)("whatmoreShopId"),r=null!==(e=t.baseFontSize)&&void 0!==e?e:10,l=t.onClick,a=t.cartCount,c=t.width,u=t.height,p=t.onCartIconClick;return(0,S.jsx)(E.az,{width:c,height:u,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:i,borderWidth:"1px",onClick:t=>{t.stopPropagation()},cursor:"pointer",children:(0,S.jsxs)(P.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:[(0,S.jsx)(F.o,{paddingX:"5px",onClick:(0,d.DiI)(n)?()=>{p()}:void 0,children:(0,d.DiI)(n)?(0,S.jsx)(pt.$,{size:"sm",_hover:{bg:i},sx:{bg:i},children:(0,S.jsx)(L.E,{paddingX:"6px",color:"white",sx:{fontSize:.85*r},children:"GO TO CART"})}):(0,S.jsx)(ct.A,{sx:{color:i,fontSize:1.6*r}})}),(0,S.jsx)(L.E,{color:i,fontSize:1.3*r+"px !important",fontWeight:"semibold !important",sx:{fontFamily:o+" !important"},children:a}),(0,S.jsx)(F.o,{paddingX:"5px",onClick:t=>{t.stopPropagation(),l()},children:(0,S.jsx)(st.A,{sx:{color:i,fontSize:1.6*r}})})]})})}var Vt=function(t){var e,i,o,n,r,l,a;const[d]=(0,s.QN)("websiteLanguage"),c=null!==(e=t.baseFontSize)&&void 0!==e?e:10,u=null===(i=t.showAddedToCart)||void 0===i||i,p=t.cartState,h=t.cartCount,v=t.onClickAtc,x=t.onCartIconClick;function g(){v()}const m=null!==(o=t.width)&&void 0!==o?o:"100%",f=null!==(n=t.height)&&void 0!==n?n:"100%";return"errored"==p?(0,S.jsx)(Qt,{baseFontSize:c,width:m,height:f}):"init"==p?0==h?(0,S.jsx)(Mt,{onClick:g,baseFontSize:c,width:m,height:f,websiteLanguage:d,borderRadius:t.borderRadius,paddingY:t.paddingY}):u?(0,S.jsx)(Ht,{onClick:g,baseFontSize:c,cartCount:h,width:m,height:f,onCartIconClick:x}):(0,S.jsx)(Mt,{onClick:g,baseFontSize:c,width:m,height:f,websiteLanguage:d,borderRadius:t.borderRadius,paddingY:t.paddingY}):(0,S.jsx)(Wt,{onClick:g,setProductVariantTitle:t.setProductVariantTitle,cartState:p,productTitle:null===(r=t.product)||void 0===r?void 0:r.title,updateCartState:t.updateCartState,baseFontSize:c,width:m,height:f,title:"awaitingVariantSelection"==p?null!==(l=null===K.m||void 0===K.m||null===(a=K.m[d])||void 0===a?void 0:a.done)&&void 0!==l?l:"Done":"",showInProgressIcon:"atcApiCallInProgress"==p||"productVariantDetailsApiCallInProgress"==p,websiteLanguage:d})};var Xt=function(t){var e;const[i]=(0,s.QN)("isInDesignMode"),[o]=(0,s.QN)("isDemoBrand"),[r]=(0,s.QN)("whatmorePrimaryFont"),[l]=(0,s.QN)("whatmoreShopId"),[p,h,v,x]=(0,c.A)(),[g,m]=(0,n.useState)(t.product),{whatmoreWidgetSourceDetails:f}=(0,n.useContext)(y.AppContext),[w,C]=(0,n.useState)(null),[b,j]=(0,n.useState)(parseFloat(g.price)),[k,I]=(0,n.useState)(parseFloat(g.compare_price)),[z,_]=(0,n.useState)(null===g||void 0===g?void 0:g.title),[F,E]=(0,n.useState)(g.currency),[T,A]=(0,n.useState)(!1),[N,P]=(0,n.useState)(!1),[L]=(0,s.QN)("whatmoreSecondaryColor"),[B,R,O,D,W,M,Q,H]=t.useAddToCartStatesInstance,V=t.productCartCounts&&t.productCartCounts[g.product_id]?t.productCartCounts[g.product_id]:B.cart_count,X=t.event,Y=t.productClickHandler;if((0,n.useEffect)(()=>{(0,d.w4b)(l)?(0,bt.ck)(g,(0,d.NCy)(l),l).then(t=>{m(t),j(parseFloat(t.price)),I(parseFloat(t.compare_price)),E(t.currency),A(!0)}).catch(t=>{A(!0)}):(async()=>{try{var t,e,i,o,n,r,a,s;const c=await(0,u.M)(g,(0,d.NCy)(l),l);j((null!==(t=null===c||void 0===c||null===(e=c.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.price)&&void 0!==t?t:null===c||void 0===c?void 0:c.price)/100),I(("63836192926"===l?null!==(o=null!==c&&void 0!==c&&null!==(n=c.variants)&&void 0!==n&&n[0]?c.variants[0].compare_at_price:null===c||void 0===c?void 0:c.compare_at_price)&&void 0!==o?o:0:null!==(r=null===c||void 0===c||null===(a=c.variants)||void 0===a||null===(s=a[0])||void 0===s?void 0:s.compare_at_price)&&void 0!==r?r:null===c||void 0===c?void 0:c.compare_at_price)/100),A(!0)}catch(c){A(!0)}})()},[]),!T)return(0,S.jsx)(S.Fragment,{});const U=.765*x,$=(null===X||void 0===X||null===(e=X.products)||void 0===e?void 0:e.length)>1?.85*U:U,q=.198*$,K=.0315*x,G=1.05*K,Z=Number((0,d.rh$)(l)),J=.85*K*(isNaN(Z)||0===Z?1:Z),tt=.75*K,et=(0,d.XQu)(l),it=(()=>{if((0,dt.P)(b,k)){const t=(k-b)/k*100;return Math.round(t)}return null})(),rt=(0,d.fpt)(l),lt=rt||L,st=(ct=lt,ut=.15,`rgba(${parseInt(ct.slice(1,3),16)}, ${parseInt(ct.slice(3,5),16)}, ${parseInt(ct.slice(5,7),16)}, ${ut})`);var ct,ut;function pt(){window.location.href=function(t){return(0,d.BLb)(l)?t.product_link+"?"+(0,d.VCz)(l)+"&"+(0,d.Spk)(l)+"&"+(0,d.$lz)(l):t.product_link}(g)}function ht(t,e){i||o||(async()=>{(0,a.Pb)(t,e)})(),"72550089015"==l?pt():Y(e)}const vt=(null===f||void 0===f?void 0:f.landingLocationType)||"index",xt=(null===f||void 0===f?void 0:f.templateType)||"template-a",gt=(0,jt.Wd)(vt)+(0,jt.gf)(xt)+(null!==X&&void 0!==X&&X.isRelatedEvent?"R":"E")+"_"+(null===X||void 0===X?void 0:X.event_id);return(0,S.jsx)("div",{style:{width:$+"px",marginTop:"7.2px",marginBottom:"7.2px",marginLeft:"4px",marginRight:"4px",cursor:"pointer",backgroundColor:"rgba(255, 255, 255, 0.98)",backdropFilter:"blur(12px)",border:"none",borderRadius:"14.4px",overflow:"hidden",transition:"all 0.2s ease-out",transform:N?"translateY(-1.7px)":"translateY(0)",boxShadow:"0 3.6px 13.5px rgba(0, 0, 0, 0.1)",padding:"12px 18px 18px 18px",position:"relative",zIndex:10},onClick:()=>{if("22907887"===l)return console.log("product.product_link : ",g.product_link),void(window.location.href=g.product_link);ht(X,g)},onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:(0,S.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch",width:"100%",gap:"14.4px"},children:[(0,S.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"14.4px",width:"100%"},children:[(0,S.jsx)("div",{style:{width:q+"px",height:q+"px",flexShrink:0,overflow:"hidden",backgroundColor:"#f8f8f8",borderRadius:"10.8px",border:"1px solid #f0f0f0"},children:(0,S.jsx)("img",{src:(0,wt.b)(g.thumbnail_image),alt:g.title,style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"10.8px"}})}),(0,S.jsxs)("div",{style:{flex:1},children:[(0,S.jsx)("h3",{ref:t=>{t&&t.style.setProperty("font-family",r,"important")},style:{fontSize:1*G+"px",fontWeight:"500",lineHeight:"1.3",color:"#1a1a1a",margin:0,marginBottom:"7.2px",letterSpacing:"0.3px",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:(0,at.v)(z,"prod-tile")}),(0,d.Nzx)(l)&&(0,S.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"5px",flexWrap:"wrap"},children:[T&&(0,S.jsx)("span",{ref:t=>{t&&(t.style.setProperty("color",(0,d.uoB)(l),"important"),t.style.setProperty("font-family",r,"important"))},style:{fontSize:1.2*J+"px",fontWeight:"700",letterSpacing:"0.3px"},children:(0,bt.Sb)(null!==b&&void 0!==b?b:null===g||void 0===g?void 0:g.price,"",l,F)}),(0,dt.P)(b,k)&&T&&(0,S.jsx)("span",{ref:t=>{t&&(t.style.setProperty("color",(0,d.gld)(l),"important"),t.style.setProperty("font-family",r,"important"))},style:{fontSize:J+"px",fontWeight:"400",textDecoration:"line-through",letterSpacing:"0.2px"},children:(0,bt.Sb)(null!==k&&void 0!==k?k:null===g||void 0===g?void 0:g.compare_price,"",l,F)}),it&&(0,d.mOK)(l)&&(0,S.jsxs)("span",{ref:t=>{t&&(t.style.setProperty("font-family",r,"important"),t.style.setProperty("color",lt,"important"),t.style.setProperty("background-color",st,"important"))},style:{fontSize:.9*J+"px",fontWeight:"600",padding:"2px 6px",borderRadius:"4px",letterSpacing:"0.2px"},children:[it,"% OFF"]})]})]})]}),"awaitingVariantSelection"==B.state&&null!=D&&(0,S.jsx)("div",{style:{width:"100%",maxHeight:.3*$*et+"px",overflowY:"auto",overflowX:"hidden",marginTop:"10px",marginBottom:"10px",padding:"8px",backgroundColor:"rgba(248, 248, 248, 0.8)",borderRadius:"8px",border:"1px solid #e0e0e0"},children:(0,S.jsx)(yt,{width:"100%",height:"fit-content",event:X,product:g,productVariantOptions:D,baseFontSize:.9*K,onOptionSelected:t=>{!function(t){C(t);const e=Q(t);e&&(j(e.price/100),I(e.compare_price/100),e.title.includes(" ")&&_(e.title))}(t)},optionTitleColor:"#1a1a1a"})}),(0,S.jsx)("div",{style:{width:"100%"},children:(0,S.jsx)(Vt,{baseFontSize:1.1*tt,setProductVariantTitle:_,product:g,cartState:B.state,cartCount:V,updateCartState:O,isPremium:!0,onClickAtc:t=>{t&&t.stopPropagation&&t.stopPropagation(),"22907887"!==l&&"72603631788"!==l&&"5220302897"!==l&&"57217876118"!==l?"init"==B.state?(W(gt),(0,ot.kz)({userInteractionType:nt.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:f,event:X,productList:[g],ctaList:X.cta})):"awaitingVariantSelection"==B.state&&(M(w,gt),_(null===g||void 0===g?void 0:g.title)):ht(X,g)},onCartIconClick:()=>{H()}})})]})})};var Yt=function(t){var e;const[i]=(0,s.QN)("isInDesignMode"),[o]=(0,s.QN)("isDemoBrand"),[r]=(0,s.QN)("whatmorePrimaryFont"),[l]=(0,s.QN)("whatmoreShopId"),[p,h,v,x]=(0,c.A)(),[g,m]=(0,n.useState)(t.product),{whatmoreWidgetSourceDetails:f}=(0,n.useContext)(y.AppContext),[w,C]=(0,n.useState)(null),[b,j]=(0,n.useState)(parseFloat(g.price)),[k,I]=(0,n.useState)(parseFloat(g.compare_price)),[z,_]=(0,n.useState)(null===g||void 0===g?void 0:g.title),[F,E]=(0,n.useState)(g.currency),[T,A]=(0,n.useState)(!1),[N,P]=(0,n.useState)(!1),[L]=(0,s.QN)("whatmoreSecondaryColor"),[B,R,O,D,W,M,Q,H]=t.useAddToCartStatesInstance,V=t.productCartCounts&&t.productCartCounts[g.product_id]?t.productCartCounts[g.product_id]:B.cart_count,X=t.event,Y=t.productClickHandler;if((0,n.useEffect)(()=>{(0,d.w4b)(l)?(0,bt.ck)(g,(0,d.NCy)(l),l).then(t=>{m(t),j(parseFloat(t.price)),I(parseFloat(t.compare_price)),E(t.currency),A(!0)}).catch(t=>{A(!0)}):(async()=>{try{var t,e,i,o,n,r;const a=await(0,u.M)(g,(0,d.NCy)(l),l);j((null!==(t=null===a||void 0===a||null===(e=a.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.price)&&void 0!==t?t:null===a||void 0===a?void 0:a.price)/100),I((null!==(o=null===a||void 0===a||null===(n=a.variants)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.compare_at_price)&&void 0!==o?o:null===a||void 0===a?void 0:a.compare_at_price)/100),A(!0)}catch(a){A(!0)}})()},[]),!T)return(0,S.jsx)(S.Fragment,{});const U=.765*x,$=(null===X||void 0===X||null===(e=X.products)||void 0===e?void 0:e.length)>1?.85*U:U,q=.0315*x,K=1.05*q,G=Number((0,d.rh$)(l)),Z=.85*q*(isNaN(G)||0===G?1:G),J=.75*q,tt=(0,d.XQu)(l),et=Number(tt),it=Math.max(240,Number.isFinite(et)?.3*$*et:0),rt=(()=>{if((0,dt.P)(b,k)){const t=(k-b)/k*100;return Math.round(t)}return null})(),lt=(0,d.fpt)(l),st=lt||L,ct=(ut=st,pt=.15,`rgba(${parseInt(ut.slice(1,3),16)}, ${parseInt(ut.slice(3,5),16)}, ${parseInt(ut.slice(5,7),16)}, ${pt})`);var ut,pt;function ht(){window.location.href=function(t){return(0,d.BLb)(l)?t.product_link+"?"+(0,d.VCz)(l)+"&"+(0,d.Spk)(l)+"&"+(0,d.$lz)(l):t.product_link}(g)}function vt(t,e){i||o||(async()=>{(0,a.Pb)(t,e)})(),"72550089015"==l?ht():Y(e)}const xt=(null===f||void 0===f?void 0:f.landingLocationType)||"index",gt=(null===f||void 0===f?void 0:f.templateType)||"template-a",mt=(0,jt.Wd)(xt)+(0,jt.gf)(gt)+(null!==X&&void 0!==X&&X.isRelatedEvent?"R":"E")+"_"+(null===X||void 0===X?void 0:X.event_id),ft=Math.min($,480),Ct=.3*ft,St=.46*ft,kt=(0,S.jsx)(Vt,{baseFontSize:1.1*J,setProductVariantTitle:_,product:g,cartState:B.state,cartCount:V,updateCartState:O,isPremium:!0,borderRadius:"2px",paddingY:"6px",onClickAtc:t=>{t&&t.stopPropagation&&t.stopPropagation(),"22907887"!==l&&"72603631788"!==l&&"5220302897"!==l&&"57217876118"!==l?"init"==B.state?(W(mt),(0,ot.kz)({userInteractionType:nt.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:f,event:X,productList:[g],ctaList:X.cta})):"awaitingVariantSelection"==B.state&&(M(w,mt),_(null===g||void 0===g?void 0:g.title)):vt(X,g)},onCartIconClick:()=>{H()}});return(0,S.jsxs)("div",{style:{width:$+"px",maxWidth:"480px",marginTop:"7.2px",marginBottom:"7.2px",marginLeft:"4px",marginRight:"4px",cursor:"pointer",backgroundColor:"rgba(255, 255, 255, 0.4)",backdropFilter:"blur(12px)",border:"none",borderRadius:"4px",overflow:"hidden",transition:"all 0.2s ease-out",transform:N?"translateY(-1.7px)":"translateY(0)",boxShadow:"0 3.6px 13.5px rgba(0, 0, 0, 0.1)",position:"relative",zIndex:10},onClick:()=>{if("22907887"===l)return console.log("product.product_link : ",g.product_link),void(window.location.href=g.product_link);vt(X,g)},onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:[(0,S.jsxs)("div",{style:{display:"flex",alignItems:"stretch",width:"100%"},children:[(0,S.jsx)("div",{style:{width:Ct+"px",flexShrink:0,overflow:"hidden",backgroundColor:"#f8f8f8"},children:(0,S.jsx)("img",{src:(0,wt.b)(g.thumbnail_image),alt:g.title,style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})}),(0,S.jsxs)("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",justifyContent:"space-between",gap:"12px",padding:"16px 18px"},children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("h3",{ref:t=>{t&&t.style.setProperty("font-family",r,"important")},style:{fontSize:1*K+"px",fontWeight:"500",lineHeight:"1.3",color:"#1a1a1a",margin:0,marginBottom:"7.2px",letterSpacing:"0.3px",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical"},children:(0,at.v)(z,"prod-tile")}),(0,d.Nzx)(l)&&(0,S.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"5px",flexWrap:"nowrap",minWidth:0,overflow:"hidden",whiteSpace:"nowrap"},children:[T&&(0,S.jsx)("span",{ref:t=>{t&&(t.style.setProperty("color",(0,d.uoB)(l),"important"),t.style.setProperty("font-family",r,"important"))},style:{fontSize:1.2*Z+"px",fontWeight:"700",letterSpacing:"0.3px"},children:(0,bt.Sb)(null!==b&&void 0!==b?b:null===g||void 0===g?void 0:g.price,"",l,F)}),(0,dt.P)(b,k)&&T&&(0,S.jsx)("span",{ref:t=>{t&&(t.style.setProperty("color",(0,d.gld)(l),"important"),t.style.setProperty("font-family",r,"important"))},style:{fontSize:Z+"px",fontWeight:"400",textDecoration:"line-through",letterSpacing:"0.2px"},children:(0,bt.Sb)(null!==k&&void 0!==k?k:null===g||void 0===g?void 0:g.compare_price,"",l,F)}),rt&&(0,d.mOK)(l)&&(0,S.jsxs)("span",{ref:t=>{t&&(t.style.setProperty("font-family",r,"important"),t.style.setProperty("color",st,"important"),t.style.setProperty("background-color",ct,"important"))},style:{fontSize:.9*Z+"px",fontWeight:"600",padding:"2px 6px",borderRadius:"4px",letterSpacing:"0.2px"},children:[rt,"% OFF"]})]})]}),"awaitingVariantSelection"!=B.state&&(0,S.jsx)("div",{style:{display:"flex",justifyContent:"flex-end"},children:(0,S.jsx)("div",{style:{width:St+"px",maxWidth:"100%"},children:kt})})]})]}),"awaitingVariantSelection"==B.state&&null!=D&&(0,S.jsxs)("div",{style:{width:"100%",backgroundColor:"rgba(248, 248, 248, 0.8)",borderTop:"1px solid #e0e0e0",boxSizing:"border-box"},children:[(0,S.jsx)("div",{style:{width:"100%",padding:"4px 16px 0",boxSizing:"border-box"},onTouchStart:t=>{t.stopPropagation()},onTouchMove:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},onWheel:t=>{t.stopPropagation()},children:(0,S.jsx)(yt,{width:"100%",height:"fit-content",maxHeight:it+"px",event:X,product:g,productVariantOptions:D,baseFontSize:.9*q,onOptionSelected:t=>{!function(t){C(t);const e=Q(t);e&&(j(e.price/100),I(e.compare_price/100),e.title.includes(" ")&&_(e.title))}(t)},optionTitleColor:"#1a1a1a"})}),(0,S.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"10px 16px 12px",boxSizing:"border-box"},children:(0,S.jsx)("div",{style:{width:St+"px",maxWidth:"100%"},children:kt})})]})]})};var Ut=function(t){const[e]=(0,s.QN)("isInDesignMode"),[i]=(0,s.QN)("isDemoBrand"),[o]=(0,s.QN)("whatmoreShopId"),[r,l,u,p]=(0,c.A)(),h=t.product,v=t.event,{whatmoreWidgetSourceDetails:x}=(0,n.useContext)(y.AppContext),[g,m,f,w,C,b,j,k]=t.useAddToCartStatesInstance,I=t.productCartCounts&&t.productCartCounts[h.product_id]?t.productCartCounts[h.product_id]:g.cart_count,z=(null===x||void 0===x?void 0:x.landingLocationType)||"index",_=(null===x||void 0===x?void 0:x.templateType)||"template-a",F=(0,jt.Wd)(z)+(0,jt.gf)(_)+"_"+(null===v||void 0===v?void 0:v.event_id);(0,n.useEffect)(()=>{!(0,d.E8r)(o)||null!==v&&void 0!==v&&v.in_stock||f("errored")},[]);const T=.1*u,A=.95*p,N=.04*p;return(0,S.jsx)(P.B,{direction:"row",height:T,justifyContent:"center",alignItems:"center",alignContent:"center",bgGradient:"linear(to-b, transparent, blackAlpha.400, blackAlpha.600)",className:"chakra-stack whatmore-minimal-atc-outer",children:(0,S.jsx)(P.B,{direction:"column",width:"fit-content",height:T,justifyContent:"center",alignItems:"center",alignContent:"center",className:"chakra-stack whatmore-minimal-atc-inner",children:(0,S.jsx)(E.az,{width:A+"px",height:"fit-content",marginTop:"35px",marginBottom:"10px",display:"flex",justifyContent:"center",alignItems:"center",className:"whatmore-minimal-atc-button-container",children:(0,S.jsx)(Ot,{baseFontSize:N,event:v,product:h,cartState:g.state,cartCount:I,updateCartState:f,onClickAtc:t=>{"init"===g.state&&(e||i||(async()=>{(0,a.Pb)(v,h),(0,ot.kz)({userInteractionType:nt.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:x,event:v,productList:[h],ctaList:v.cta})})(),C(F,!0))},onCartIconClick:t=>{k()}})})})})};var $t=function(t){const[e]=(0,s.QN)("whatmoreShopId"),[i]=(0,s.QN)("isWhatmoreWebsite"),o=(0,d.Vpi)(e),r=t.event,l=t.product,a=t.productCartCounts,c=t.onCartCountChange,[u,...p]=(0,ft.A)(0,l,t.event),h=[u,...p];return(0,n.useEffect)(()=>{let t=u.cart_count;a>u.cart_count&&(t=a+1),c&&c(l.product_id,t)},[u.cart_count]),i?(0,S.jsx)(Nt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"premium-tile"==o?(0,S.jsx)(Xt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler,activeProductsCount:t.activeProductsCount,productCartCounts:a,onCartCountChange:c,useAddToCartStatesInstance:h}):"navigation-tile"==o?(0,S.jsx)(Yt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler,activeProductsCount:t.activeProductsCount,productCartCounts:a,onCartCountChange:c,useAddToCartStatesInstance:h}):"broad-tile"==o?(0,S.jsx)(kt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler,activeProductsCount:t.activeProductsCount,productCartCounts:a,onCartCountChange:c,useAddToCartStatesInstance:h}):"broad-tile-no-cta"==o?(0,S.jsx)(Nt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"broad-tile-new-atc"==o?(0,S.jsx)(Dt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler,productCartCounts:a,onCartCountChange:c,useAddToCartStatesInstance:h}):"link_only"==o?(0,S.jsx)(rt,{product:t.product,event:t.event}):"minimal_atc_button"==o?(0,S.jsx)(Ut,{product:t.product,event:t.event,productCartCounts:a,onCartCountChange:c,useAddToCartStatesInstance:h}):"narrow-tile"==o?(0,S.jsx)(At,{event:r,product:l,productClickHandler:t.productClickHandler,tileWidthFactor:r.products.length>1?.68:void 0,productCartCounts:a,onCartCountChange:c,useAddToCartStatesInstance:h}):(0,S.jsx)(S.Fragment,{})},qt=i(1079),Kt=i(7802),Gt=i(2979);var Zt=function(t){var e,i,o;const[a,u,p,h]=(0,c.A)(),[v]=(0,s.QN)("whatmoreShopId"),x=(0,s.Xd)("isInDesignMode"),g=(0,s.Xd)("isDemoBrand"),m=t.event,f=t.productClickHandler,w=t.productCartCounts,C=t.onCartCountChange,y=t.onActiveProductChange,b=(0,d.Vpi)(v),j="navigation-tile"==b,k=(0,n.useRef)(null),I=(0,n.useRef)(null),[z,_]=(0,n.useState)(80);(0,n.useEffect)(()=>{const t=requestAnimationFrame(()=>{if(I.current){const t=I.current.getBoundingClientRect().height;t>0&&_(t)}});return()=>cancelAnimationFrame(t)},[]);const T=20+z+"px",A=("STRDOIDF6O7"===v?[t.event.products[0]]:t.event.products).filter(t=>"oos"!=t.product_status||(0,d.$7F)(v)).length,N=(0,d.Woi)(v)&&void 0!=t.event.cta?t.event.cta.filter(t=>{var e;return""!==(null!==(e=t.cta_title)&&void 0!==e?e:"").trim()}).length:0,L=j&&A+N>1,B=null!==(e=null===(i=m.products)||void 0===i||null===(o=i.filter(t=>"active"==(null===t||void 0===t?void 0:t.product_status)))||void 0===o?void 0:o.length)&&void 0!==e?e:0;if(!(0,Kt.Z_)(m))return(0,S.jsx)(S.Fragment,{});if(1==m.products.length&&(void 0==m.cta||0==m.cta.length)){const t=m.products[0];return(0,d.uJl)(v)?(0,S.jsx)(P.B,{direction:"horizontal",width:h,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,S.jsx)(Gt.S,{userInteractionType:nt.O.PRODUCT_CTA_VIEW,event:m,productList:[t],triggerFlag:!x&&!g,children:(0,S.jsx)(F.o,{children:(0,S.jsx)(At,{event:m,product:t,productClickHandler:f,productCartCounts:w,onCartCountChange:C},m.event_id+t.product_id)})})}):(0,S.jsx)(P.B,{direction:"horizontal",width:h,height:"fit-content",justifyContent:"center",backgroundImage:"narrow-tile"==b?"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,S.jsx)(F.o,{children:(0,S.jsx)(Gt.S,{userInteractionType:nt.O.PRODUCT_CTA_VIEW,event:m,productList:[t],triggerFlag:!x&&!g,children:(0,S.jsx)($t,{activeProductsCount:1,event:m,product:t,productClickHandler:f,productCartCounts:w,onCartCountChange:C},m.event_id+t.product_id)})})})}return(0,S.jsx)(F.o,{children:(0,S.jsx)("div",{onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,S.jsxs)(E.az,{width:h+"px",position:"relative",display:"flex",alignItems:"flex-end",backgroundImage:"narrow-tile"==b?"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:[L&&(0,S.jsx)("div",{onClick:t=>{var e;t.stopPropagation(),null===(e=k.current)||void 0===e||e.slidePrev()},style:{flex:"0 0 auto",width:"44px",alignSelf:"flex-end",height:T,marginBottom:"30px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",opacity:1,paddingBottom:"20px",zIndex:20},"aria-label":"Previous product",children:(0,S.jsx)("svg",{width:"14",height:"26",viewBox:"0 0 12 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,S.jsx)("path",{d:"M9 3L3 12L9 21",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,S.jsx)("div",{style:{flex:"1 1 auto",minWidth:0,overflow:"hidden"},children:(0,S.jsxs)(r.RC,{className:"product-tile swiper-slide",slidesPerView:1==m.products.length?1:L?1.15:1.4,spaceBetween:L?12:0,initialSlide:0,centeredSlides:!L&&!(0,d.TYM)(v),modules:[l.s3,l.Jq,l.FJ],mousewheel:{invert:!1,thresholdDelta:20},nested:!0,onSwiper:t=>{k.current=t},onSlideChange:t=>{y&&y(t.activeIndex)},children:[("STRDOIDF6O7"===v?[m.products[0]]:m.products).map((t,e)=>("oos"!=t.product_status||(0,d.$7F)(v))&&(0,S.jsx)(r.qr,{children:(0,S.jsx)(Gt.S,{userInteractionType:nt.O.PRODUCT_CTA_VIEW,event:m,productList:[t],triggerFlag:!x&&!g,children:(0,S.jsx)(P.B,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",alignItems:"center",paddingBottom:L?"20px":"0",children:(0,S.jsx)("div",{ref:0===e?I:null,children:(0,S.jsx)($t,{activeProductsCount:B,event:m,product:t,productClickHandler:f,productCartCounts:w,onCartCountChange:C},m.event_id+t.product_id)})})})},m.event_id+t.product_id)),(0,d.Woi)(v)&&void 0!=m.cta&&m.cta.map(t=>{var e;return(0,S.jsx)(S.Fragment,{children:""!==(null!==(e=t.cta_title)&&void 0!==e?e:"").trim()&&(0,S.jsx)(r.qr,{children:(0,S.jsx)(P.B,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",paddingBottom:"12px",alignItems:"center",children:(0,S.jsx)(qt.A,{fontFactor:.75,cta:t},m.event_id+t.cta_id)})},m.event_id+t.cta_id)})})]})}),L&&(0,S.jsx)("div",{onClick:t=>{var e;t.stopPropagation(),null===(e=k.current)||void 0===e||e.slideNext()},style:{flex:"0 0 auto",width:"44px",alignSelf:"flex-end",height:T,marginBottom:"30px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",opacity:1,paddingBottom:"20px",zIndex:20},"aria-label":"Next product",children:(0,S.jsx)("svg",{width:"14",height:"26",viewBox:"0 0 12 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,S.jsx)("path",{d:"M3 3L9 12L3 21",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})})})};var Jt=function(t){const[e,i]=(0,s.QN)("isProductSwiperCatalogOpen"),o=t.event,r=t.productClickHandler,l=t.productCartCounts,a=t.onCartCountChange,d=t.onActiveProductChange;return(0,n.useContext)(x.p).isIOS,(0,S.jsx)(Zt,{event:o,productClickHandler:r,productCartCounts:l,onCartCountChange:a,onActiveProductChange:d},o.event_id)};function te(t){const[e,i,o,r]=(0,c.A)(),[l]=(0,s.QN)("whatmorePrimaryFont"),[a]=(0,s.QN)("whatmoreShopId"),[u,p]=(0,n.useState)(""),h=t.data,v=(t.event,t.product,t.setShowOptionsChart);var x=.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===h||void 0===h?void 0:h.id}&title=${null===h||void 0===h?void 0:h.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,o,n,r,l;p(null===t||void 0===t||null===(e=t.sizings)||void 0===e||null===(i=e[0])||void 0===i||null===(o=i.layout)||void 0===o||null===(n=o.data)||void 0===n||null===(r=n[0])||void 0===r||null===(l=r.data)||void 0===l?void 0:l.url)}).catch(t=>{console.error("Error fetching data:",t)})},[]);const g=`${D.i7`
69
+ 0% {
70
+ transform: translateY(100%);
71
+ }
72
+ `} 0.5s`;return(0,S.jsx)(P.B,{bg:"black",height:"100%",opacity:"100%",width:"100%",borderTopRadius:"xl",animation:g,justifyContent:"center",alignItems:"center",children:(0,S.jsxs)(E.az,{width:"100%",height:"100%",children:[(0,S.jsx)(R._,{width:"100%",height:"auto",src:(0,d.JAc)(a)?u:(0,d.OSd)(a),objectFit:"contain",borderTopRadius:"xl"}),(0,S.jsx)(P.B,{width:"100%",height:"100%",direction:"column",justifyContent:"flex-start",style:{position:"relative",zIndex:1,bottom:"90%"},className:"whatmore-ios-css-relative-fix",children:(0,S.jsx)(P.B,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",onClick:t=>{t.stopPropagation(),v(!1)},cursor:"pointer",padding:"4px",children:(0,S.jsx)(Y.A,{sx:{boxShadow:3,color:"white !important",fontSize:1.6*x,filter:"drop-shadow(0 0 5px black);"}})})})]})})}var ee=i(3755),ie=i(63),oe=i(6112),ne=i(6677),re=i(1745);function le(t){var e;const[i,o]=(0,n.useState)(null),r=t.product;return(0,n.useEffect)(()=>{(0,re.tN)(r).then(t=>{o(t.variants)})},[]),null==i?(0,S.jsx)(S.Fragment,{}):(0,S.jsx)("div",{style:{width:null!==(e=t.width)&&void 0!==e?e:"100%",borderRadius:"6px",height:1.5*t.height,backgroundColor:"white"},children:(0,S.jsxs)("form",{method:"post",action:"/cart/add","accept-charset":"UTF-8",class:"shopify-product-form",enctype:"multipart/form-data",is:"product-form",children:[(0,S.jsx)("input",{type:"hidden",name:"form_type",value:"product"}),(0,S.jsx)("input",{type:"hidden",name:"utf8",value:"\u2713"}),(0,S.jsx)("input",{type:"hidden",name:"id",value:t.variantId}),(0,S.jsx)("input",{type:"hidden",value:t.product.product_link,name:"productUrl"}),(0,S.jsx)("div",{class:"shiprocket-headless","data-type":"product"}),(0,S.jsx)("textarea",{"data-variant-json":"",class:"hide","aria-hidden":"true","aria-label":"Product JSON",children:JSON.stringify(i).toString()})]})})}function ae(t){const e=t.product;return(0,S.jsx)(le,{product:e,variantId:t.variantId,height:t.height,width:t.width})}var de=i(1052),se=i(3262);function ce(t){var e,i,o,r,l,c,u,p;const[h]=(0,s.QN)("isInDesignMode"),[v]=(0,s.QN)("isDemoBrand"),[g]=(0,s.QN)("whatmoreShopId"),[m]=(0,s.QN)("whatmorePrimaryFont"),[f]=(0,s.QN)("whatmoreSecondaryColor"),[w]=(0,s.QN)("websiteLanguage"),{whatmoreWidgetSourceDetails:C,whatmoreUserInfo:b}=((0,s.Xd)("whatmoreUITheme"),(0,n.useContext)(y.AppContext)),[j,k]=(0,n.useState)(!1),{closeClickComponent:I}=(0,n.useContext)(x.p),[z,_]=(0,n.useState)(!1),T=t.FONT_SIZE,A=t.data,N=t.event,B=t.selectedVariantId,R=t.product,O=t.itemQuantity,D=(t.PRODUCT_TILE_WIDTH,t.cartItemCount),W=t.addToCartFlag,Q=t.setAddToCartFlag,H=t.soldOutFlag,V=t.setSoldOutFlag,X=t.selectedSize,Y=t.productCartCounts&&t.productCartCounts[R.product_id]?t.productCartCounts[R.product_id]:0,U=C.landingLocationType,$=C.templateType,q=(0,jt.Wd)(U)+(0,jt.gf)($)+(null!==N&&void 0!==N&&N.isRelatedEvent?"R":"E")+"_"+(null===N||void 0===N?void 0:N.event_id);const G=async e=>{var i,o;e.stopPropagation(),k(!0),function(t,e,i){h||v||(async()=>{(0,a.tO)(t,e,i)})()}(N,R,O),(0,ot.kz)({userInteractionType:nt.O.SHOPNOW_ATC_CLICKED,widgetSourceDetails:C,event:N,productList:[R],ctaList:N.cta});const n=null!==B&&void 0!==B?B:null===A||void 0===A||null===(i=A.variants)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.id;if(!n)return console.log("ERROR! No variants available."),void k(!1);(0,de.cF)([n],O,(0,d.NCy)(g),g,N,R,q,null===N||void 0===N?void 0:N.location,null===b||void 0===b?void 0:b.userType).then(t=>{if(!t.ok)throw new Error(t.status);return t.json()}).then(e=>{if(k(!1),Q(!0),(0,s.t2)("whatmoreAddedToCart",!0),t.onCartCountChange){const e=(t.productCartCounts&&t.productCartCounts[R.product_id]?t.productCartCounts[R.product_id]:0)+O;t.onCartCountChange(R.product_id,e)}return(0,s.Xd)("whatmoreAddedToCart")&&(0,se.initiateCartSliderEvent)(g,()=>{},100,window.location.hostname,n,R.client_product_id,q,null===N||void 0===N?void 0:N.location,null===b||void 0===b?void 0:b.userType,R.product_link,X),(0,d.rEM)(g)&&(h||(async()=>{await(0,re.js)().then(t=>t.json()).catch(t=>{console.error("Whatmore :: Error while fetching cart_token for initiateOrderTrackingEvent.",t)})})()),e}).catch(t=>{k(!1),V(!0),console.error("Error:",t)})},Z=e=>{if(function(t,e){h||v||(async()=>{(0,a.TJ)(t,e)})()}(N,R),"buy-now"==e){var i,o,n,r;if((0,ot.kz)({userInteractionType:nt.O.SHOPNOW_ATC_CLICKED,widgetSourceDetails:C,event:N,productList:[R],ctaList:N.cta}),"78881718575"==g)return"function"==typeof gokwikBuyNowClickFn&&window.gokwikBuyNowClickFn(),void t.onCloseCallback();if((0,d.R8W)(g))return(0,re.R3)(null!==B&&void 0!==B?B:null===A||void 0===A||null===(n=A.variants)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.id,q),void t.onCloseCallback();if("55207264298"===g)return void(window.location.href=R.product_link+((0,d.N0t)(g)?"?currency="+R.currency:""));if("75026858234"===g)return void(0,de.Le)((0,d.NCy)(g),g);(0,de.Dr)(void 0!==B?B:null===A||void 0===A||null===(i=A.variants)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.id,O,(0,d.NCy)(g),g,q,null===N||void 0===N?void 0:N.location,null===b||void 0===b?void 0:b.userType)}"view-more"==e&&((0,ot.kz)({userInteractionType:nt.O.SHOPNOW_VIEWMORE_CLICKED,widgetSourceDetails:C,event:N,productList:[R],ctaList:N.cta}),(0,d.BLb)(g)?window.location.href=R.product_link+"?"+(0,d.VCz)(g)+"&"+(0,d.Spk)(g)+"&"+(0,d.$lz)(g)+((0,d.N0t)(g)?"&currency="+R.currency:""):window.location.href=R.product_link+((0,d.N0t)(g)?"?currency="+R.currency:""))},J=()=>{(0,de.Le)((0,d.NCy)(g),g)};function tt(t){"open_cart_slider"!==(0,d.m4S)(t)||null!==I&&I()}const et=2.4*T;return(0,S.jsxs)(P.B,{position:t.position,className:"wht-shn-cta",backdropFilter:"blur(10px)",borderRadius:"12px",bottom:"12px",left:"50%",zIndex:"1",transform:"translateX(-50%)",direction:"row",width:"94%",paddingX:"10px",paddingY:"8px",spacing:"8px",fontSize:.9*T,alignItems:"center",children:[H?(0,S.jsx)(pt.$,{width:"90%",bg:"rgba(71, 85, 105, 0.9)",variant:"solid",opacity:.8,_hover:{bg:"rgba(71, 85, 105, 0.9)"},height:et,disabled:!0,borderRadius:"8px",display:"flex",alignItems:"center",justifyContent:"center",children:(0,S.jsx)(L.E,{fontWeight:"600",fontSize:T+"px",sx:{color:"white !important",fontFamily:m+" !important"},children:"Sold Out"})}):(0,S.jsxs)(P.B,{direction:"vertical"==(0,d.z00)(g)?"column":"row",width:"90%",spacing:"6px",fontSize:.9*T,justifyContent:"center",children:[(0,d.gvj)(g)?Y>0?(0,S.jsx)(E.az,{height:et,backgroundColor:"white",borderColor:f,borderWidth:"1px",cursor:"pointer",borderRadius:"8px",sx:{flex:1,minWidth:"100px"},children:(0,S.jsxs)(P.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"10px",paddingY:"5px",justifyContent:"center",spacing:"8px",children:[(0,S.jsx)(F.o,{paddingX:"5px",onClick:()=>{"go_to_cart_page"===(0,d.m4S)(g)?J():tt(g)},children:(0,S.jsx)(ct.A,{sx:{color:f,fontSize:1.2*T}})}),(0,S.jsx)(L.E,{color:f,fontSize:1.1*T+"px !important",fontWeight:"semibold !important",sx:{fontFamily:m+" !important"},children:Y}),(0,S.jsx)(F.o,{paddingX:"5px",onClick:G,children:j?(0,S.jsx)(ie.y,{size:"sm",color:f}):(0,S.jsx)(st.A,{sx:{color:f,fontSize:1.2*T}})})]})}):(0,S.jsx)(pt.$,{className:"add-to-cart-button",height:et,onClick:G,display:"flex",alignItems:"center",justifyContent:"center",sx:{flex:1,minWidth:"100px",paddingX:"12px",backgroundColor:"#000000"===(0,d.Wc_)(g)?f:(0,d.Wc_)(g),borderRadius:"8px",border:"none",_hover:{filter:"brightness(0.95)",transform:"translateY(-2px)",backgroundColor:"#000000"===(0,d.Wc_)(g)?f:(0,d.Wc_)(g)},transition:"all 0.2s ease-in-out"},children:j?(0,S.jsx)(ie.y,{size:"sm",color:"white"}):(0,S.jsx)(L.E,{fontWeight:"600",textAlign:"center",sx:{color:(0,d.Hfu)(g),fontFamily:m+" !important",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},fontSize:.7*T+"px",children:`${"ADD TO CART"!=(0,d.KPq)(g)?(0,d.KPq)(g):null!==(e=null===K.m||void 0===K.m||null===(i=K.m[w])||void 0===i?void 0:i.add_to_cart)&&void 0!==e?e:(0,d.KPq)(g)}`})}):(0,S.jsx)(S.Fragment,{}),(0,d.oB_)(g)?(0,S.jsx)(S.Fragment,{children:(0,d.pbJ)(g)?(0,S.jsx)(ae,{variantId:void 0!==B?B:null===A||void 0===A||null===(o=A.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.id,product:R,height:2.8*T,width:"100%",fontSize:T,fontFamily:m}):(0,S.jsx)(S.Fragment,{children:!(0,d.naM)(g)||"78881718575"===g&&null!==U&&void 0!==U&&U.includes("product")?(0,S.jsx)(pt.$,{className:"buy-now-button-custom",variant:"outline",height:et,onClick:t=>{Z("buy-now")},display:"flex",alignItems:"center",justifyContent:"center",sx:{flex:1,minWidth:"100px",paddingX:"12px",backgroundColor:"transparent",borderRadius:"8px",border:`1px solid ${f}`,color:f,_hover:{backgroundColor:`${f}10`,borderColor:f,transform:"translateY(-2px)"},transition:"all 0.2s ease-in-out"},children:(0,S.jsx)(L.E,{fontWeight:"600",textAlign:"center",sx:{fontFamily:m+" !important"},fontSize:.9*T+"px",children:"BUY NOW"!=(0,d.GX0)(g)?(0,d.GX0)(g):null!==(u=null===K.m||void 0===K.m||null===(p=K.m[w])||void 0===p?void 0:p.buy_now)&&void 0!==u?u:(0,d.GX0)(g)})}):(0,S.jsx)(pt.$,{variant:"outline",rightIcon:(0,S.jsx)(ne.A,{sx:{fontSize:14}}),height:et,onClick:()=>Z("view-more"),display:"flex",alignItems:"center",justifyContent:"center",sx:{flex:1,minWidth:"100px",paddingX:"12px",backgroundColor:"transparent",borderRadius:"8px",border:`1px solid ${f}`,color:f,_hover:{backgroundColor:`${f}10`,borderColor:f,transform:"translateY(-2px)"},transition:"all 0.2s ease-in-out"},children:(0,S.jsx)(L.E,{fontWeight:"600",textAlign:"center",sx:{fontFamily:m+" !important"},fontSize:.9*T,children:"MORE INFO"!=(0,d.KnH)(g)?(0,d.KnH)(g):null!==(l=null===K.m||void 0===K.m||null===(c=K.m[w])||void 0===c?void 0:c.more_info)&&void 0!==l?l:(0,d.KnH)(g)})})})}):(0,S.jsx)(S.Fragment,{})]}),(0,d.gvj)(g)&&(0,S.jsx)(S.Fragment,{children:z?(0,S.jsx)(ee.s,{width:"40px",height:et,alignItems:"center",justifyContent:"center",bg:"rgba(255, 255, 255, 0.8)",borderRadius:"8px",children:(0,S.jsx)(ie.y,{size:"sm",color:f||"#4a5568"})}):(0,S.jsx)(ee.s,{animation:W?M:"none",onAnimationEnd:()=>Q(!1),width:"40px",height:et,alignItems:"center",justifyContent:"center",bg:"rgba(255, 255, 255, 0.8)",borderRadius:"8px",border:"1px solid rgba(226, 232, 240, 0.8)",cursor:"pointer",_hover:{bg:"rgba(255, 255, 255, 0.9)",borderColor:"rgba(226, 232, 240, 1)",transform:"translateY(-2px)"},transition:"all 0.2s ease-in-out",onClick:()=>{"do_nothing"!==(0,d.m4S)(g)&&("go_to_cart_page"!==(0,d.m4S)(g)?(_(!0),tt(g)):J())},children:(0,S.jsxs)("div",{style:{position:"relative"},children:[(0,S.jsx)(oe.A,{sx:{fontSize:18,color:f||"#4a5568"}}),D>0&&(0,S.jsx)(E.jl,{bg:f||"#4a5568",size:"16px",position:"absolute",top:"-6px",right:"-6px",zIndex:"1",children:(0,S.jsx)(L.E,{sx:{color:"white !important",fontFamily:m+" !important"},fontWeight:"600",fontSize:"9px",children:D>99?"99+":D})})]})})})]})}function ue(t){var e,i;const[o]=(0,s.QN)("whatmorePrimaryFont"),[n]=((0,s.Xd)("whatmoreShopId"),(0,s.QN)("websiteLanguage")),r=t.setOpenShopNow,l=t.FONT_SIZE,a=t.setLockSwiper,d=null!==(e=null===K.m||void 0===K.m||null===(i=K.m[n])||void 0===i?void 0:i.shop_now)&&void 0!==e?e:"Shop Now";return(0,S.jsxs)(ee.s,{justifyContent:"center",paddingTop:"15px",width:"100%",className:"wht-shn-head",children:[(0,S.jsx)(ee.s,{width:"10%",display:"flex !important"}),(0,S.jsx)(ee.s,{width:"90%",justifyContent:"center",children:(0,S.jsx)(L.E,{align:"center",fontSize:1.25*l,fontWeight:"semibold",sx:{color:"black",fontFamily:o+" !important"},as:"b",children:d})}),(0,S.jsx)(ee.s,{justifyContent:"center",width:"10%",alignItems:"center",onClick:t=>{t.stopPropagation(),r(!1),a(!1)},cursor:"pointer",children:(0,S.jsx)(Y.A,{sx:{color:"black",fontSize:1.2*l}})})]})}const pe=({iconSize:t})=>(0,S.jsx)("div",{style:{color:"black",paddingTop:"2px"},children:(0,S.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"currentColor",class:"bi bi-box-arrow-up-right",viewBox:"0 0 16 16",style:{stroke:"black",strokeWidth:"0.4"},children:[(0,S.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,S.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"})]})});var he=i(7740);function ve(t){var e,i,o;const[r,l]=(0,n.useState)(t.product),[a]=(0,s.QN)("whatmorePrimaryFont"),[c]=(0,s.QN)("whatmoreShopId"),[u]=(0,s.QN)("whatmoreSecondaryColor"),[p]=(0,s.QN)("websiteLanguage"),{whatmoreWidgetSourceDetails:h}=(0,n.useContext)(y.AppContext),v=t.event;(0,n.useEffect)(()=>{(0,d.w4b)(c)&&(0,bt.ck)(r,(0,d.NCy)(c),c).then(t=>{l(t)})},[]);const x=t.FONT_SIZE,g=t.data,m=t.itemPrice;let f,w,C;var b,j,k;"STRDOIDF6O7"==c&&(f=null===g||void 0===g||null===(b=g.variants)||void 0===b?void 0:b.find(e=>e.id==t.selectedVariantId),w=null===(j=f)||void 0===j?void 0:j.title,C=null===(k=f)||void 0===k?void 0:k.productLink);const I=(e=>{const i=null===g||void 0===g||null===(e=g.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})(),z=I&&0!=I&&I>m?Math.round((I-m)/I*100):NaN;return(0,S.jsx)(S.Fragment,{children:(0,S.jsxs)(ee.s,{className:"wht-shn-title",direction:"column",paddingLeft:"18px",paddingRight:"18px",children:[(0,S.jsxs)(ee.s,{cursor:"pointer",onClick:function(){(0,ot.kz)({userInteractionType:nt.O.SHOPNOW_PRODUCT_TITLE_CLICKED,widgetSourceDetails:h,event:v,productList:[r],ctaList:null===v||void 0===v?void 0:v.cta}),window.location.href=function(t){return(0,d.BLb)(c)?("STRDOIDF6O7"==c?C:t.product_link)+"?"+(0,d.VCz)(c)+"&"+(0,d.Spk)(c)+"&"+(0,d.$lz)(c)+((0,d.N0t)(c)?"&currency="+t.currency:""):("STRDOIDF6O7"==c?C:t.product_link)+((0,d.N0t)(c)?"?currency="+t.currency:"")}(r)},marginBottom:"2px",sx:{display:"flex",alignItems:"flex-start",gap:"8px",transition:"all 0.2s ease"},children:[(0,S.jsx)(L.E,{isTruncated:!0,noOfLines:2,fontSize:x,sx:{color:"#2d2d2d",lineHeight:"1.4",fontFamily:a,fontWeight:"500",letterSpacing:"-0.005em",flex:1,transition:"all 0.2s ease",textDecoration:"none","&:hover":{textDecoration:"underline",textUnderlineOffset:"3px"}},children:"STRDOIDF6O7"===c?null!==(e=w)&&void 0!==e?e:null===g||void 0===g?void 0:g.title:"58396311733"===c?(0,St.$)(null===g||void 0===g?void 0:g.title):null===g||void 0===g?void 0:g.title}),(0,S.jsx)(E.az,{mt:"1px",opacity:"0.6",children:(0,S.jsx)(pe,{iconSize:.9*x})})]}),(0,S.jsxs)(ee.s,{direction:"row",gap:"6px",paddingTop:"4px",children:[I&&I>m&&(0,S.jsx)(L.E,{as:"s",padding:"2px",fontSize:1.2*x,fontWeight:"semibold",sx:{color:"gray !important",fontFamily:a+" !important"},children:(0,bt.Sb)(parseFloat((0,he.U)()?I/100:I)," ",c,r.currency,!0)}),(0,S.jsx)(L.E,{as:"b",padding:"2px",fontSize:1.2*x,fontWeight:"semibold !important",sx:{color:"black",fontFamily:a+" !important"},children:(0,bt.Sb)(parseFloat((0,he.U)()?m/100:m),"",c,r.currency,!0)}),!isNaN(z)&&0!=z&&(0,S.jsx)(E.az,{display:"flex",backgroundColor:"green"==(0,d.ub$)(c)?"#343434"==u?(0,d.ub$)(c):u:(0,d.ub$)(c),alignItems:"center",borderRadius:"4px",width:"fit-content",px:"6px",children:(0,S.jsx)(L.E,{fontSize:(0,d.mOK)(c)?"14px !important":1.1*x,fontWeight:"normal !important",sx:{color:(0,d.BRY)(c)+" !important",fontFamily:a+" !important"},children:(0,d.mOK)(c)?`${z}% ${null!==(i=null===K.m||void 0===K.m||null===(o=K.m[p])||void 0===o?void 0:o.off)&&void 0!==i?i:"off"}`:`Save ${(0,bt.Sb)(parseFloat(I/100-m/100)," ",c,r.currency)}`})})]}),"61412737206"==c&&(0,S.jsx)(L.E,{fontSize:"11px",color:"#f4f4ec",children:"Tax included. Free shipping on all orders."})]})})}var xe=i(4418),ge=i(2720);function me(t){var e,i;const[o]=(0,s.QN)("whatmorePrimaryFont"),[r]=(0,s.QN)("whatmoreShopId"),{setShowOptionsChart:l}=(0,n.useContext)(Se),[a,c]=(0,n.useState)({}),[u]=(0,s.QN)("whatmoreUITheme"),[p]=(0,s.QN)("websiteLanguage"),h=((0,s.Xd)("whatmoreSecondaryColorShade300"),(0,s.Xd)("whatmoreSecondaryColor")),v=t.setSelectedColor,x=t.selectOptionFirstHandler,g=t.selectOptionSecondHandler,m=t.selectOptionThirdHandler,f=t.isVariantAvailable,w=t.selectedSize,C=t.setSelectedSize,y=t.FONT_SIZE,b=t.data,j=("72603631788"===r||"5220302897"===r)&&Object.values(a).some(t=>"Stitched"===t),k=(t,e,i)=>{if(2==i)c(i=>({...i,[t]:e}));else if(1==i)c(i=>{var o,n,r,l;return{...i,[t]:e,[null===b||void 0===b||null===(o=b.options)||void 0===o||null===(n=o[2])||void 0===n?void 0:n.name]:null===b||void 0===b||null===(r=b.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 o,n;const i=null===b||void 0===b||null===(o=b.variants)||void 0===o||null===(n=o.find(t=>(null===t||void 0===t?void 0:t.option1)==e))||void 0===n?void 0:n.option2;c(o=>{var n,r,l,a,d,s,c,u;return{...o,[null===b||void 0===b||null===(n=b.options)||void 0===n||null===(r=n[1])||void 0===r?void 0:r.name]:null===b||void 0===b||null===(l=b.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===b||void 0===b||null===(d=b.options)||void 0===d||null===(s=d[2])||void 0===s?void 0:s.name]:null===b||void 0===b||null===(c=b.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)(()=>{c(t=>{var e,i,o,n,r,l,a,d,s,c,u,p;return{...t,[null===b||void 0===b||null===(e=b.options)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.name]:null===b||void 0===b||null===(o=b.variants)||void 0===o||null===(n=o.find(t=>{var e,i,o;return(null===b||void 0===b||null===(e=b.options)||void 0===e||null===(i=e[0])||void 0===i||null===(o=i.values)||void 0===o?void 0:o.includes(null===t||void 0===t?void 0:t.option1))&&(null===t||void 0===t?void 0:t.available)}))||void 0===n?void 0:n.option1,[null===b||void 0===b||null===(r=b.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name]:null===b||void 0===b||null===(a=b.variants)||void 0===a||null===(d=a.find(t=>{var e,i,o;return(null===b||void 0===b||null===(e=b.options)||void 0===e||null===(i=e[1])||void 0===i||null===(o=i.values)||void 0===o?void 0:o.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===b||void 0===b||null===(s=b.options)||void 0===s||null===(c=s[2])||void 0===c?void 0:c.name]:null===b||void 0===b||null===(u=b.variants)||void 0===u||null===(p=u.find(t=>{var e,i,o;return(null===b||void 0===b||null===(e=b.options)||void 0===e||null===(i=e[2])||void 0===i||null===(o=i.values)||void 0===o?void 0:o.includes(null===t||void 0===t?void 0:t.option3))&&(null===t||void 0===t?void 0:t.available)}))||void 0===p?void 0:p.option3}})},[]),(0,S.jsx)(ee.s,{direction:"row",paddingLeft:"20px",paddingRight:"20px",paddingBottom:6,paddingTop:4,children:(null===b||void 0===b||null===(e=b.options)||void 0===e?void 0:e.length)>0&&(0,S.jsxs)(ee.s,{direction:"column",width:"100%",gap:"4px",children:[null===b||void 0===b||null===(i=b.options)||void 0===i?void 0:i.map((e,i)=>{var n,s,c,w,C,j,I,z;return(0,S.jsx)(S.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===(s=e.name)||void 0===s?void 0:s.toLowerCase().includes("color"))||1==(null===e||void 0===e||null===(c=e.values)||void 0===c?void 0:c.length)&&(null===e||void 0===e?void 0:e.position)>1&&(null===e||void 0===e?void 0:e.position)==(null===b||void 0===b||null===(w=b.options)||void 0===w?void 0:w.length))&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(ee.s,{className:"wht-shn-optype",justifyContent:"space-between",alignItems:"center",children:[(0,S.jsx)(L.E,{fontSize:1*y+"px !important",sx:{color:"black",fontFamily:o+" !important",fontWeight:"bold !important"},children:null!==(C=null===K.m||void 0===K.m||null===(j=K.m[p])||void 0===j?void 0:j[null===e||void 0===e||null===(I=e.name)||void 0===I?void 0:I.toLowerCase()])&&void 0!==C?C:null===e||void 0===e?void 0:e.name}),"Size"===e.name&&(0,d.u1b)(r)?(0,S.jsx)(ee.s,{marginTop:"4px",whiteSpace:"nowrap",cursor:"pointer",children:(0,S.jsx)(L.E,{fontSize:.7*y,as:"u",sx:{color:"black !important",fontFamily:o+" !important"},onClick:()=>{null!==l&&l(!0)},children:(0,d.A5I)(r)})}):(0,S.jsx)(S.Fragment,{})]}),(0,S.jsx)(xe.z,{spacing:0,flexWrap:"wrap",alignContent:"flex-start",alignItems:"center",justifyContent:"flex-start",children:null===e||void 0===e||null===(z=e.values)||void 0===z?void 0:z.map(n=>{var l,s,c,p,w,C,j,I,z;const _=f(n,i),F=0==i||1==i&&b.variants.find(t=>{var e,i;return t.option1==(null===(e=Object.entries(a))||void 0===e||null===(i=e[0])||void 0===i?void 0:i[1])&&t.option2==n})||2==i&&b.variants.find(t=>{var e,i,o,r;return t.option1==(null===(e=Object.entries(a))||void 0===e||null===(i=e[0])||void 0===i?void 0:i[1])&&t.option2==(null===(o=Object.entries(a))||void 0===o||null===(r=o[1])||void 0===r?void 0:r[1])&&t.option3==n}),T=a[null===e||void 0===e?void 0:e.name]===n;return("Colour"===(null===e||void 0===e?void 0:e.name)||null!==e&&void 0!==e&&null!==(l=e.name)&&void 0!==l&&l.toLowerCase().includes("color"))&&F&&((null===t||void 0===t||null===(s=t.finalArr)||void 0===s?void 0:s.length)>0&&(null===t||void 0===t||null===(c=t.finalArr)||void 0===c||!c.includes(null))||(null===t||void 0===t||null===(p=t.finalArrExternal)||void 0===p?void 0:p.length)>0)?(0,S.jsx)(S.Fragment,{children:(0,S.jsx)(ee.s,{paddingBottom:"4px",px:"2px",paddingRight:"8px",children:(0,S.jsx)(E.az,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px",borderRadius:(0,d.tM2)(r),size:"sm",border:a[null===e||void 0===e?void 0:e.name]===n?`2px solid ${(0,d.Usu)(r)} !important`:"",cursor:"pointer",width:"fit-content !important",onClick:()=>{k(null===e||void 0===e?void 0:e.name,n,i),v(n),0===i&&x(n),1===i&&g(n),2===i&&m(n)},children:(0,S.jsx)(R._,{padding:"2px",borderRadius:(0,d.tM2)(r),width:"58px",height:"58px",src:(0,wt.b)(null!==(w=null===t||void 0===t||null===(C=t.finalArr)||void 0===C||null===(j=C.find(t=>(null===t||void 0===t?void 0:t.color)==n))||void 0===j?void 0:j.src)&&void 0!==w?w:null===t||void 0===t||null===(I=t.finalArrExternal)||void 0===I||null===(z=I.find(t=>(null===t||void 0===t?void 0:t.color)==n))||void 0===z?void 0:z.optionsrc,"?width=400&height=400")})})},n)}):F&&(0,S.jsx)(ee.s,{className:"wht-shn-opt",paddingBottom:"8px",paddingRight:"8px",children:(0,S.jsx)(pt.$,{isDisabled:!_,size:"sm",borderRadius:"round"==u?"5px":0,bg:T&&_?h+" !important":"transparent !important",border:T&&_?`2px solid ${h} !important`:`1px solid ${h||"#e2e8f0"} !important`,width:"fit-content !important",height:"fit-content !important",style:{padding:"4px 8px"},_hover:{bg:T&&_?h+" !important":(h||"#f7fafc")+"20 !important"},onClick:()=>{"76408193304"!=r||"Size"!=(null===e||void 0===e?void 0:e.name)||"Customize"!=n?(k(null===e||void 0===e?void 0:e.name,n,i),0===i&&x(n),1===i&&g(n),2===i&&m(n)):window.location.href=t.product.product_link},children:(0,S.jsx)(L.E,{as:_?"p":"s",textDecoration:_?"none":"line-through",fontSize:.9*y+"px !important",sx:{fontFamily:o+" !important",fontWeight:"normal !important",color:T&&_?"white !important":(h||"#4a5568")+" !important"},children:n})})},n)})})]})})}),j&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(ge.c,{my:"8px",borderColor:"gray.200"}),(0,S.jsx)(ee.s,{className:"wht-shn-optype",justifyContent:"space-between",alignItems:"center",children:(0,S.jsx)(L.E,{fontSize:1*y+"px !important",sx:{color:"black",fontFamily:o+" !important",fontWeight:"bold !important"},children:"Size"})}),(0,S.jsx)(xe.z,{spacing:0,flexWrap:"wrap",alignContent:"flex-start",alignItems:"center",justifyContent:"flex-start",children:["XS","S","M","L","XL"].map(t=>{const e=w===t;return(0,S.jsx)(ee.s,{className:"wht-shn-opt",paddingBottom:"8px",paddingRight:"8px",children:(0,S.jsx)(pt.$,{size:"sm",borderRadius:"round"==u?"5px":0,bg:e?h+" !important":"transparent !important",border:e?`2px solid ${h} !important`:`1px solid ${h||"#e2e8f0"} !important`,width:"fit-content !important",height:"fit-content !important",style:{padding:"4px 8px"},_hover:{bg:e?h+" !important":(h||"#f7fafc")+"20 !important"},onClick:e=>{e.stopPropagation(),C(t)},children:(0,S.jsx)(L.E,{fontSize:.9*y+"px !important",sx:{fontFamily:o+" !important",fontWeight:"normal !important",color:e?"white !important":(h||"#4a5568")+" !important"},children:t})})},t)})})]})]})})}function fe(t){const{liveScreenWidth:e}=t;var i=.12*(.4*e*.8);const[o]=(0,s.QN)("whatmorePrimaryFont");return(0,S.jsxs)(ee.s,{id:"wht-custom-discount-content",direction:"column",mt:1,mb:0,px:"1.1em",py:"0.15em",align:"flex-start",width:"100%",gap:"0.2em",children:[(0,S.jsx)(E.az,{width:"98%",alignSelf:"flex-start",borderRadius:"0.3em",background:"linear-gradient(rgba(196,210,193,1), rgba(193,210,198,1))",boxShadow:"0 1px 4px rgba(0,0,0,0.03)",py:"0.3em",px:"0",display:"flex",justifyContent:"center",children:(0,S.jsxs)(L.E,{fontWeight:400,fontSize:.8*i,lineHeight:"1.35",textAlign:"center",color:"#2d2d2d",fontFamily:o,width:"100%",children:["FLAT \u20b9400 OFF\xa0\xa0\xa0",(0,S.jsx)(E.az,{as:"span",color:"black",fontWeight:500,display:"inline",px:"0.1em",fontSize:1.1*i,children:"|"}),"\xa0\xa0ON ORDERS \u20b94000+"]})}),(0,S.jsx)(E.az,{width:"98%",alignSelf:"flex-start",borderRadius:"0.3em",background:"linear-gradient(rgba(196,210,193,1), rgba(193,210,198,1))",boxShadow:"0 1px 4px rgba(0,0,0,0.03)",py:"0.3em",px:"0",display:"flex",justifyContent:"center",children:(0,S.jsxs)(L.E,{fontWeight:400,fontSize:.8*i,lineHeight:"1.35",textAlign:"center",color:"#2d2d2d",fontFamily:o,width:"100%",children:["FLAT \u20b91500 OFF\xa0",(0,S.jsx)(E.az,{as:"span",color:"black",fontWeight:500,display:"inline",px:"0.1em",fontSize:1.1*i,children:"|"}),"\xa0\xa0ON ORDERS \u20b99000+"]})})]})}var we=i(8385);function Ce(t){var e,i,o,r,l,a,u,p,h,v,x,g,m,f,w,C,y,b,j,k,I,z;const[_,T,A,N]=(0,c.A)();var P=.4*N*.8,L=P*(16/9)*.6*.8;const B=1.1*P,O=B*(16/9)*.8;var W=.12*P;const[M,Q]=(0,n.useState)(!1),H=t.data,V=t.event,X=t.product,Y=t.setOpenShopNow,U=t.setLockSwiper,[$,q]=(0,n.useState)({});(0,n.useEffect)(()=>{q(t=>{var e,i,o,n,r,l,a,d,s,c,u,p;return{...t,[null===H||void 0===H||null===(e=H.options)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.name]:null===H||void 0===H||null===(o=H.variants)||void 0===o||null===(n=o.find(t=>{var e,i,o;return(null===H||void 0===H||null===(e=H.options)||void 0===e||null===(i=e[0])||void 0===i||null===(o=i.values)||void 0===o?void 0:o.includes(null===t||void 0===t?void 0:t.option1))&&(null===t||void 0===t?void 0:t.available)}))||void 0===n?void 0:n.option1,[null===H||void 0===H||null===(r=H.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name]:null===H||void 0===H||null===(a=H.variants)||void 0===a||null===(d=a.find(t=>{var e,i,o;return(null===H||void 0===H||null===(e=H.options)||void 0===e||null===(i=e[1])||void 0===i||null===(o=i.values)||void 0===o?void 0:o.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===H||void 0===H||null===(s=H.options)||void 0===s||null===(c=s[2])||void 0===c?void 0:c.name]:null===H||void 0===H||null===(u=H.variants)||void 0===u||null===(p=u.find(t=>{var e,i,o;return(null===H||void 0===H||null===(e=H.options)||void 0===e||null===(i=e[2])||void 0===i||null===(o=i.values)||void 0===o?void 0:o.includes(null===t||void 0===t?void 0:t.option3))&&(null===t||void 0===t?void 0:t.available)}))||void 0===p?void 0:p.option3}})},[]);const K=(t,e)=>{var i,o,n,r,l,a,d,s,c,u;if(null===H||void 0===H||null===(i=H.options)||void 0===i||!i.length)return!1;const p=null===H||void 0===H||null===(o=H.options)||void 0===o||null===(n=o[0])||void 0===n?void 0:n.name,h=null===H||void 0===H||null===(r=H.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name;null===H||void 0===H||null===(a=H.options)||void 0===a||null===(d=a[2])||void 0===d||d.name;switch(null===H||void 0===H||null===(s=H.options)||void 0===s?void 0:s.length){case 1:return null===H||void 0===H||null===(c=H.variants)||void 0===c?void 0:c.some(e=>e.option1===t&&e.available);case 2:var v;return 0===e?null===H||void 0===H||null===(v=H.variants)||void 0===v?void 0:v.some(e=>e.option1===t&&e.available):null===H||void 0===H||null===(u=H.variants)||void 0===u?void 0:u.some(e=>e.option2===t&&e.option1===$[p]&&e.available);case 3:var x,g,m;if(0===e)return null===H||void 0===H||null===(x=H.variants)||void 0===x?void 0:x.some(e=>e.option1===t&&e.available);if(1===e)return null===H||void 0===H||null===(g=H.variants)||void 0===g?void 0:g.some(e=>e.option2===t&&e.option1===$[p]&&e.available);if(2===e)return null===H||void 0===H||null===(m=H.variants)||void 0===m?void 0:m.some(e=>e.option3===t&&e.option1===$[p]&&e.option2===$[h]&&e.available);default:return!1}},[G,Z]=(0,n.useState)(()=>{var t,e;for(let r=0;r<(null===H||void 0===H||null===(i=H.variants)||void 0===i?void 0:i.length);r++){var i,o,n;const t=null===H||void 0===H||null===(o=H.variants)||void 0===o||null===(n=o[r])||void 0===n?void 0:n.option1;if(t&&K(t,0))return t}return(null===H||void 0===H||null===(t=H.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.option1)||""}),[tt,et]=(0,n.useState)(()=>{var t,e;for(let r=0;r<(null===H||void 0===H||null===(i=H.variants)||void 0===i?void 0:i.length);r++){var i,o,n;const t=null===H||void 0===H||null===(o=H.variants)||void 0===o||null===(n=o[r])||void 0===n?void 0:n.option2;if(t&&K(t,1))return t}return(null===H||void 0===H||null===(t=H.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.option2)||""}),[it,ot]=(0,n.useState)(()=>{var t,e;for(let r=0;r<(null===H||void 0===H||null===(i=H.variants)||void 0===i?void 0:i.length);r++){var i,o,n;const t=null===H||void 0===H||null===(o=H.variants)||void 0===o||null===(n=o[r])||void 0===n?void 0:n.option3;if(t&&K(t,2))return t}return(null===H||void 0===H||null===(t=H.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.option3)||""}),[nt,rt]=(0,n.useState)(()=>{var t;const e=null===H||void 0===H||null===(t=H.variants)||void 0===t?void 0:t.find(t=>t.available);return null===e||void 0===e?void 0:e.id}),[lt,at]=(0,n.useState)(1),[dt,st]=(0,n.useState)(()=>{var t;const e=null===H||void 0===H||null===(t=H.variants)||void 0===t?void 0:t.find(t=>t.available);return null===e||void 0===e?void 0:e.price}),[ct,ut]=(0,n.useState)(0),[pt,ht]=(0,n.useState)(!1),[vt,xt]=(0,n.useState)(!1),[gt,mt]=(0,n.useState)(X.thumbnail_image),[ft,Ct]=(0,n.useState)("XS"),yt=((0,s.Xd)("whatmoreUITheme"),(0,s.Xd)("whatmoreShopId")),bt=(0,n.useCallback)(t=>{Z(t)},[]),jt=(0,n.useCallback)(t=>{et(t)},[]),St=(0,n.useCallback)(t=>{ot(t)},[]);(0,n.useEffect)(()=>{var t,e;const i=ye(H,G,tt,it),o=null!==i&&void 0!==i?i:null===H||void 0===H||null===(t=H.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.id;rt(o),st(be(H,o)),at(1),xt(!1);const n=je(H,i);if(null!==n&&mt(n),"72603631788"===yt||"5220302897"===yt){Ct("Stitched"===G||"Stitched"===tt||"Stitched"===it?"XS":null)}},[G,tt,it]),(0,n.useEffect)(()=>{var t,e;const i=void 0===nt?null===H||void 0===H||null===(t=H.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.price:be(H,nt);st(i*lt)},[lt]),(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)||(Y(!1),U(!1))}function e(t){t.stopPropagation();const e=document.getElementById("whatmore-shopnow-scrollable-content");e&&(e.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),null===i||void 0===i||i.removeEventListener("wheel",e)}},[]),(0,n.useEffect)(()=>{(0,de.Eo)((0,d.NCy)(yt),yt).then(t=>t.json()).then(t=>{ut(t.item_count)}).catch(t=>{console.error("Cart Add Error:",t)})},[pt]);const kt=`${D.i7`
73
+ 0% {
74
+ transform: translateY(100%);
75
+ }
76
+ `} 0.5s`,It=null===H||void 0===H||null===(e=H.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"))}),[zt,_t]=(0,n.useState)(-1!==It?null===(i=H.options)||void 0===i||null===(o=i[It])||void 0===o||null===(r=o.values)||void 0===r?void 0:r[0]:""),[Ft,Et]=(0,n.useState)({});(0,n.useEffect)(()=>{-1!==It&&"whatmore"!==(0,d.NCy)(yt)&&async function(){const t=await(0,re._N)(X);Et(t)}()},[]);let Tt=-1,At=-1!==It&&null!==Ft&&void 0!==Ft&&Ft.product&&(null===Ft||void 0===Ft||null===(l=Ft.product)||void 0===l||null===(a=l.images)||void 0===a?void 0:a.length)>=(null===Ft||void 0===Ft||null===(u=Ft.product)||void 0===u||null===(p=u.options)||void 0===p||null===(h=p[It])||void 0===h||null===(v=h.values)||void 0===v?void 0:v.length)?null===Ft||void 0===Ft||null===(x=Ft.product)||void 0===x||null===(g=x.images)||void 0===g?void 0:g.map(t=>{var e,i,o,n,r,l,a,d,s,c,u,p,h,v;const x=null===Ft||void 0===Ft||null===(e=Ft.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===Ft||void 0===Ft||null===(o=Ft.product)||void 0===o||null===(n=o.options)||void 0===n||null===(r=n[x])||void 0===r||null===(l=r.values)||void 0===l?void 0:l[Math.min(++Tt,(null===Ft||void 0===Ft||null===(a=Ft.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===Ft||void 0===Ft||null===(u=Ft.product)||void 0===u||null===(p=u.options)||void 0===p||null===(h=p[x])||void 0===h||null===(v=h.values)||void 0===v?void 0:v[Math.max(0,Tt)],src:null===t||void 0===t?void 0:t.src}}):[],Nt=[];if("whatmore"==(0,d.NCy)(yt)&&(null===H||void 0===H||null===(m=H.images)||void 0===m?void 0:m.length)>0){var Pt;var Lt;if(-1!==(null===H||void 0===H||null===(Pt=H.options)||void 0===Pt?void 0:Pt.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"))})))Nt=null===H||void 0===H||null===(Lt=H.images)||void 0===Lt?void 0:Lt.map(t=>({color:t.color,src:t.src,optionsrc:t.optionsrc}))}return Tt+1<(null===Ft||void 0===Ft||null===(f=Ft.product)||void 0===f||null===(w=f.options)||void 0===w||null===(C=w[It])||void 0===C||null===(y=C.values)||void 0===y?void 0:y.length)&&(At=[]),(0,S.jsxs)(ee.s,{id:"whatmore-shopnow-view",className:"wht-shn-view",position:"relative",direction:"column",bg:"linear-gradient(135deg, #fafafa 0%, #ffffff 100%)",maxHeight:"100%",opacity:"100%",borderTopRadius:"24px",animation:kt,boxShadow:"0 -8px 32px rgba(0, 0, 0, 0.08), 0 -2px 8px rgba(0, 0, 0, 0.04)",border:"1px solid rgba(255, 255, 255, 0.6)",backdropFilter:"blur(8px)",overflow:"hidden",children:[(0,S.jsx)(E.az,{position:"sticky",top:"0",bg:"linear-gradient(135deg, #fafafa 0%, #ffffff 100%)",backdropFilter:"blur(8px)",zIndex:"20",flexShrink:0,children:(0,S.jsx)(ue,{setOpenShopNow:Y,setLockSwiper:U,FONT_SIZE:W})}),(0,S.jsx)(E.az,{height:"fit-content",minHeight:O+20+"px",flexShrink:0,position:"relative",children:(0,S.jsx)(F.o,{marginBottom:"1px",px:"0px",py:"10px",children:(0,S.jsx)(ee.s,{width:"fit-content",height:"fit-content",overflow:"hidden",position:"relative",children:(0,S.jsx)(ee.s,{width:"100%",children:(0,S.jsx)(we.c,{renderElement:t=>(0,S.jsx)(S.Fragment,{children:(0,S.jsx)(E.az,{width:B+"px",height:O+"px",position:"relative",children:(0,S.jsx)(R._,{width:B+"px",height:O+"px",borderRadius:"16px",src:(0,wt.b)(t.eventData.src,"&width=400&height=400"),alt:X.handle,sx:{objectFit:"cover !important",filter:"saturate(1.1) contrast(1.05)",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"},_hover:{transform:"scale(1.02)",filter:"saturate(1.15) contrast(1.1)"},fallback:(0,S.jsx)(J.A,{width:B+"px",height:O+"px",borderRadius:"16px"})})})}),dataList:At.length>0&&!At.includes(null)?null===(b=At)||void 0===b?void 0:b.filter(t=>(null===t||void 0===t?void 0:t.color)==zt):Nt.length>0?[null===(j=Nt)||void 0===j?void 0:j.find(t=>(null===t||void 0===t?void 0:t.color)==zt)]:null===H||void 0===H||null===(k=H.images)||void 0===k?void 0:k.map(t=>({src:t.includes("https")?t:"https:"+t})),spacing:10,defaultHeight:B+"px",defaultWidth:O+"px",retainAlreadyRenderedElements:!0,isScroll:!0})})})})}),(0,S.jsxs)(ee.s,{id:"wht-shopnow-title-content",direction:"column",flex:"1",minHeight:"0",overflowY:"auto",sx:{"&::-webkit-scrollbar":{width:"0px"}},children:[(0,S.jsx)(ve,{data:H,product:X,event:V,PRODUCT_TILE_HEIGHT:L,PRODUCT_TILE_WIDTH:P,FONT_SIZE:W,getVariantPrice:be,selectedVariantId:nt,itemPrice:dt,itemQuantity:lt,setItemQuantity:at,thumbnailImage:gt}),"11829268"===yt&&(0,S.jsx)(fe,{liveScreenWidth:N}),(null===H||void 0===H||null===(I=H.variants)||void 0===I?void 0:I.length)>0&&(0,S.jsx)(me,{data:"22907887"===yt?{...H,options:null===H||void 0===H||null===(z=H.options)||void 0===z?void 0:z.filter(t=>!("Season"===(null===t||void 0===t?void 0:t.name)&&1===new Set(null===t||void 0===t?void 0:t.values).size))}:H,dividerColor:(0,d.R6d)(yt),setSelectedColor:_t,finalArr:At,finalArrExternal:Nt,product:X,PRODUCT_TILE_HEIGHT:L,PRODUCT_TILE_WIDTH:P,FONT_SIZE:W,selectOptionFirstHandler:bt,selectOptionSecondHandler:jt,selectOptionThirdHandler:St,getVariantPrice:be,selectedOptionFirst:G,selectedOptionSecond:tt,selectedOptionThird:it,selectedVariantId:nt,isVariantAvailable:K,selectedSize:ft,setSelectedSize:Ct})]}),(0,S.jsx)(E.az,{position:"sticky",bottom:"0",left:"0",right:"0",zIndex:"10",flexShrink:0,children:(0,S.jsx)(ce,{position:"relative",selectedVariantId:nt,data:H,FONT_SIZE:W,PRODUCT_TILE_WIDTH:P,product:X,itemQuantity:lt,cartItemCount:ct,addToCartFlag:pt,setAddToCartFlag:ht,soldOutFlag:vt,setSoldOutFlag:xt,onCloseCallback:t.onCloseCallback,event:V,productCartCounts:t.productCartCounts,onCartCountChange:t.onCartCountChange,selectedSize:ft})})]})}const ye=(t,e,i,o)=>{var n;if(!e&&!i&&!o)return;const r=null===t||void 0===t||null===(n=t.variants)||void 0===n?void 0:n.find(t=>(!e||t.option1===e)&&(!i||t.option2===i)&&(!o||t.option3===o));return r?r.id:void 0},be=(t,e)=>{var i,o;return null===t||void 0===t||null===(i=t.variants)||void 0===i||null===(o=i.find(t=>t.id===e))||void 0===o?void 0:o.price},je=(t,e)=>{var i;const o=null===t||void 0===t||null===(i=t.variants)||void 0===i?void 0:i.find(t=>t.id==e);return void 0===o?null:null===o||void 0===o||null===(n=o.featured_image)||void 0===n?void 0:n.src;var n},Se=(0,n.createContext)({setShowOptionsChart:null});var ke=function(t){const e=t.event,i=t.data,o=t.currentProduct,r=t.setOpenShopNow,l=t.setLockSwiper,a=t.onCloseCallback,[d,s]=(0,n.useState)(!1);return(0,S.jsx)(Se.Provider,{value:{setShowOptionsChart:s},children:(0,S.jsxs)(E.az,{width:"full",height:"full",borderRadius:"md",children:[(0,S.jsx)(P.B,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",children:(0,S.jsx)(E.az,{width:"full",maxHeight:"100%",overflow:"hidden",children:(0,S.jsx)(Ce,{data:i,event:e,product:o,setOpenShopNow:r,setLockSwiper:l,onCloseCallback:a,productCartCounts:t.productCartCounts,onCartCountChange:t.onCartCountChange})})}),d?(0,S.jsx)(P.B,{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,S.jsx)(E.az,{width:"full",height:"fit-content",children:(0,S.jsx)(te,{data:i,event:e,product:o,setShowOptionsChart:()=>{s(!1)}})})}):(0,S.jsx)(S.Fragment,{})]})})};var Ie=i(195);const ze=function(t,e){return isNaN(t)||isNaN(e)||e<=0||t>e?0:Math.ceil(t/e*100)};function _e(t){var e,i,[o,r,l,a]=(0,c.A)();const[d]=(0,s.QN)("whatmoreSecondaryColor"),[u]=(0,s.QN)("whatmoreSecondaryColorShade900"),[p,h]=(0,n.useState)(0),v=null!==(e=t.totalSiblings)&&void 0!==e?e:1,x=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0;return(0,n.useEffect)(()=>{const e=setInterval(()=>{h(ze(t.videoPlayingData.current.current_time,t.videoPlayingData.current.video_duration))},100);return()=>clearInterval(e)},[]),(0,S.jsx)(P.B,{width:"96%",height:"fit-content",direction:"row",justifyContent:"center",alignItems:"center",spacing:"1px",children:[...Array(v).keys()].map(t=>(0,S.jsx)(P.B,{width:"100%",height:.004*l+"px",backgroundColor:t<x?d:u+"99",borderRightRadius:"lg",borderLeftRadius:"lg",direction:"row",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",sx:{display:"block !important"},children:t==x?(0,S.jsx)(E.az,{height:"100%",width:p+"%",bgColor:d,borderRightRadius:"lg",borderLeftRadius:"lg",sx:{display:"block !important"}}):(0,S.jsx)(S.Fragment,{})},"event-progress-bar-slab-"+t))})}var Fe=i(758);const Ee=t=>t>=1e3?(t/1e3).toFixed(1)+"k":t,Te=()=>"undefined"!==typeof window&&window.innerWidth>=1024;var Ae=function(t){var e,i,o,r,l,u=t.whatmoreShareTemplateId;const p=t.whatmoreShareStoryId,h=t.whatmoreShareEventId,v=t.event,x=null===(e=t.showShareText)||void 0===e||e,g=null!==(i=t.shareButtonBottomMargin)&&void 0!==i?i:0,m=(0,s.Xd)("whatmoreShopId"),f=(0,s.Xd)("isInDesignMode"),w=(0,s.Xd)("isDemoBrand"),C=(0,s.Xd)("whatmorePrimaryFont"),b=(0,s.Xd)("websiteLanguage"),{whatmoreWidgetSourceDetails:j}=(0,n.useContext)(y.AppContext),[k,I,z,_]=(0,c.A)(),T=null!==(o=t.iconSize)&&void 0!==o?o:.1*_*(0,d.xkB)(m);function A(){const e=(0,s.Xd)("whatmoreLandingLocationType");var i;!function(t){f||w||(async()=>{(0,a.Zh)(t)})()}(v),i="event_product_link"===(0,d.moP)(m)?v.products[0].product_link||"":window.location.pathname,i=("event_product_link"===(0,d.moP)(m)?"":window.location.hostname)+i+"?wtt="+u+"&wsid="+p+"&weid="+h,(0,d.BLb)(m)&&(i=i+"&"+(0,d.VCz)(m)+"&utm_campaign=video-share&utm_medium="+e);const o={title:(0,d.kZI)(m),text:`${(0,d.dmA)(m)} \n ${i} ${"50529403072"!==m&&(0,d.ZX9)(m)?"\n \n -via Whatmore":""}`};navigator.share&&!Te?navigator.share(o):(t.setIsModalOpen(!0),t.setShareText([o,i]))}return"63046287536"==m?(0,S.jsx)(S.Fragment,{}):(0,S.jsx)(F.o,{children:(0,S.jsx)(E.jl,{cursor:"pointer",style:{marginBottom:g+"px"},children:(0,S.jsxs)(P.B,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[(0,S.jsx)(Fe.A,{sx:{transform:"scaleX(1)",color:"white",fontSize:T,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),A(),(0,ot.kz)({userInteractionType:nt.O.VIDEO_SHARE_CTA_CLICKED,widgetSourceDetails:j,event:v,productList:v.products,ctaList:v.cta})}}),x&&(0,d.ViG)(m)?(0,S.jsxs)(L.E,{fontSize:.3*T*(0,d.ol5)(m)+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:C+" !important",color:"white !important",maxWidth:"48px",wordWrap:"break-word"},children:["\xa0",v.total_share>(0,d.vDV)(m)?Ee(v.total_share):null!==(r=null===K.m||void 0===K.m||null===(l=K.m[b])||void 0===l?void 0:l.share)&&void 0!==r?r:"Share","\xa0"]}):(0,S.jsx)(S.Fragment,{})]})})})},Ne=i(3420),Pe=i(7170);var Le=function(t){var e,i,o,r,l;const u=(0,s.Xd)("whatmoreShopId"),p=(0,s.Xd)("whatmorePrimaryFont"),h=(0,s.Xd)("whatmoreLikedEvents"),v=(0,s.Xd)("isInDesignMode"),x=(0,s.Xd)("isDemoBrand"),g=(0,s.Xd)("websiteLanguage"),{whatmoreWidgetSourceDetails:m}=(0,n.useContext)(y.AppContext),[f]=(0,n.useState)(()=>Math.floor(50*Math.random()+100)),w=t.event,[C,b]=(0,n.useState)(null!==(e=h[w.event_id])&&void 0!==e&&e),[j,k,I,z]=(0,c.A)(),_=.1*z*(0,d.xkB)(u);function T(t,e){v||x||(async()=>{(0,a.$B)(t,e)})()}function A(){(0,s.t2)("whatmoreLikedEvents",{...h,[w.event_id]:!C}),C?(T(w,-1),(0,ot.kz)({userInteractionType:nt.O.VIDEO_UNLIKED,widgetSourceDetails:m,event:w,productList:w.products,ctaList:w.cta})):(T(w,1),(0,ot.kz)({userInteractionType:nt.O.VIDEO_LIKED,widgetSourceDetails:m,event:w,productList:w.products,ctaList:w.cta})),b(!C)}const N=("78232846646"==u?null!==(i=w.total_like)&&void 0!==i?i:f:null!==(o=w.total_like)&&void 0!==o?o:0)+(C?1:0);return(0,S.jsx)(F.o,{children:(0,S.jsx)(E.jl,{cursor:"pointer",children:(0,S.jsxs)(P.B,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[C?(0,S.jsx)(Pe.A,{sx:{boxShadow:3,color:(0,d.MJ6)(u),fontSize:_,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),A()}}):(0,S.jsx)(Ne.A,{sx:{boxShadow:3,color:"white",fontSize:_,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),A()}}),(0,S.jsx)(S.Fragment,{children:(0,d.FlI)(u)?(0,S.jsxs)(L.E,{fontSize:.3*_*(0,d.ol5)(u)+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:p+" !important",color:"white !important",position:"relative",bottom:"5px"},children:["\xa0",N>=(0,d.LGx)(u)?Ee(N):null!==(r=null===K.m||void 0===K.m||null===(l=K.m[g])||void 0===l?void 0:l.like)&&void 0!==r?r:"Like","\xa0"]}):(0,S.jsx)(S.Fragment,{})})]})})})};const Be=({iconSize:t})=>(0,S.jsx)("div",{style:{backgroundColor:"#25D366",borderRadius:"50%",padding:.3*t},children:(0,S.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"white",class:"bi bi-whatsapp",viewBox:"0 0 16 16",children:(0,S.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"})})}),Re=({iconSize:t})=>(0,S.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*t},children:(0,S.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"currentColor",class:"bi bi-twitter-x",viewBox:"0 0 16 16",children:(0,S.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"})})}),Oe=({iconSize:t})=>(0,S.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*t},children:(0,S.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"currentColor",class:"bi bi-copy",viewBox:"0 0 16 16",children:(0,S.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"})})}),De=({iconSize:t})=>(0,S.jsx)("div",{style:{backgroundColor:"#E0E0E0",borderRadius:"50%",padding:.3*t,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,S.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"black",viewBox:"0 0 16 16",children:[(0,S.jsx)("circle",{cx:"3.5",cy:"8",r:"1.5"}),(0,S.jsx)("circle",{cx:"8",cy:"8",r:"1.5"}),(0,S.jsx)("circle",{cx:"12.5",cy:"8",r:"1.5"})]})});var We=t=>{const e=(0,s.Xd)("whatmoreShopId"),i=t.shareText,[o,r]=(0,n.useState)("Copy link"),[l,a]=(0,n.useState)(""),[u,p]=(0,n.useState)(window.innerWidth),[h,v,x,g]=(0,c.A)(),m=.1*g*(0,d.xkB)(e)*.5,f=!0===(0,d.SGs)(e);(0,n.useEffect)(()=>{const t=()=>p(window.innerWidth);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]);const w=u<380,C=w?Math.min(t.iconSize,22):Math.min(t.iconSize,28),y=w?Math.min(t.iconSize,10):Math.min(t.iconSize,12);return(0,S.jsx)(S.Fragment,{children:t.isModalOpen&&(0,S.jsxs)("div",{className:"modal-overlay",style:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",backgroundColor:"white",borderRadius:"10px",padding:"12px 16px 20px 16px",width:"90%",maxWidth:"420px",boxShadow:"0 4px 8px rgba(0, 0, 0, 0.1)"},children:[(0,S.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingBottom:"6px"},children:[(0,S.jsxs)("div",{onClick:()=>{f&&(window.location.href="https://www.whatmore.ai")},style:{display:"flex",alignItems:"center",cursor:"pointer",gap:"6px"},children:[f?(0,S.jsx)("img",{className:"whatmore-label",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,S.jsx)(Fe.A,{sx:{color:"#595959",fontSize:m,backgroundColor:"transparent",borderRadius:0,padding:0}}),(0,S.jsx)("span",{style:{fontWeight:"bold",fontSize:"16px",color:"#1a1a1a"},children:f?"Whatmore":"Share On"})]}),(0,S.jsx)(Y.A,{className:"close-rounded-icon",style:{cursor:"pointer"},onClick:e=>{e.stopPropagation(),t.setIsModalOpen(!1)}})]}),(0,S.jsx)(ge.c,{color:"blackAlpha.500",size:"1px",width:"100%"}),(0,S.jsxs)("div",{className:"social-icons",style:{display:"flex",justifyContent:"space-around",alignItems:"flex-start",paddingTop:"12px"},children:[(0,S.jsxs)("div",{onClick:t=>{var e;t.stopPropagation();const o=encodeURIComponent(null===(e=i[0])||void 0===e?void 0:e.text);window.open(`https://wa.me/?text=${o}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center",flex:1},children:[(0,S.jsx)(Be,{iconSize:C}),(0,S.jsx)("p",{style:{fontSize:y,margin:0,textAlign:"center"},children:"Whatsapp"})]}),f&&(0,S.jsxs)("div",{onClick:t=>{var e;t.stopPropagation();const o=encodeURIComponent(null===(e=i[0])||void 0===e?void 0:e.text);window.open(`https://twitter.com/intent/tweet?text=${o}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center",flex:1},children:[(0,S.jsx)(Re,{iconSize:C}),(0,S.jsx)("p",{style:{fontSize:y,margin:0,textAlign:"center"},children:"X"})]}),(0,S.jsxs)("div",{onClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(i[1]),r("Copied"),a("green")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center",flex:1},children:[(0,S.jsx)(Oe,{iconSize:C}),(0,S.jsx)("p",{style:{fontSize:y,color:l,margin:0,textAlign:"center"},children:o})]}),(0,S.jsxs)("div",{onClick:async t=>{var e;t.stopPropagation();const o=(null===i||void 0===i||null===(e=i[0])||void 0===e?void 0:e.text)||"",n=null===i||void 0===i?void 0:i[1];try{navigator.share?await navigator.share({title:"Check this out",text:o,url:n}):(await navigator.clipboard.writeText(n),alert("Link copied. You can paste it anywhere!"))}catch(r){console.error("Share failed:",r)}},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center",flex:1},children:[(0,S.jsx)(De,{iconSize:C}),(0,S.jsx)("p",{style:{fontSize:y,margin:0,textAlign:"center"},children:"More"})]})]})]})})},Me=i(1941);var Qe=function(t){var e,i;const o=null===(e=t.brandName)||void 0===e?void 0:e.replace(/\s+/g,"_"),n=(0,s.Xd)("whatmorePrimaryFont"),r=(0,s.Xd)("whatmoreShopId"),l=null!==(i=t.fontSize)&&void 0!==i?i:"8",[a]=(0,Me.A)(),c="landscape"===a?"customer_referral_desktop":"customer_referral_mobile",u="60183543963"==r,p=(0,s.Xd)("whatmoreLandingLocationType"),h=t.isOutside||!p.includes("index")||r.includes("STR")?`https://www.whatmore.ai/shoppable-videos?utm_source=${o}&utm_medium=referral&utm_campaign=${c}`:`https://apps.shopify.com/whatmore-live?utm_source=${o}&utm_medium=referral&utm_campaign=${c}`,v=u?"https://www.letsmapit.in/":h;return(0,S.jsx)(zt.N,{href:v,isExternal:!0,textDecoration:"none",children:(0,d.SGs)(r)&&(0,S.jsxs)(P.B,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content",spacing:"6px",paddingLeft:"2px",paddingRight:"2px",children:[(0,S.jsx)("p",{ref:e=>{var i;e&&(e.style.setProperty("font-family",n,"important"),e.style.setProperty("font-size",l+"px","important"),e.style.setProperty("text-align","center","important"),e.style.setProperty("color",null!==(i=t.color)&&void 0!==i?i:"white"))},children:u?"marketed by":"Powered By"}),u?(0,S.jsx)(E.az,{padding:"1px 4px",bg:"#fff",width:"fit-content",children:(0,S.jsx)("img",{src:"https://whatmore-other-assets.b-cdn.net/gudworld/Letsmapit_Logo.png",style:{objectFit:"contain",width:1.7*l,backgroundColor:"transparent",borderRadius:"0px"},alt:"letsmapit"})}):(0,S.jsxs)(E.az,{display:"flex",alignItems:"center",gap:"4px",children:[(0,S.jsx)("img",{src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",width:1.3*l,backgroundColor:"transparent",borderRadius:"0px"},alt:"whatmore"}),(0,S.jsx)("p",{ref:e=>{var i;e&&(e.style.setProperty("font-family",n,"important"),e.style.setProperty("font-size",l+"px","important"),e.style.setProperty("text-align","center","important"),e.style.setProperty("color",null!==(i=t.color)&&void 0!==i?i:"white"))},children:"Whatmore"})]})]})})},He=i(9879),Ve=i(9556),Xe=i(2209);var Ye=()=>(0,S.jsxs)(E.az,{as:"svg",width:"46px",height:"46px",viewBox:"0 0 24 24",fill:"none",className:"tick-animation",marginBottom:"20px",children:[(0,S.jsx)("circle",{cx:"12",cy:"12",r:"11",stroke:"gray",strokeWidth:"2",fill:"none"}),(0,S.jsx)("path",{d:"M7 12l3 3 7-7",stroke:"gray",strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]}),Ue=i(4533);var $e=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,s]=(0,n.useState)(null),c=(0,n.useRef)(null),u=(0,n.useContext)(y.AppContext);(0,n.useEffect)(()=>{var e;null!==t&&void 0!==t&&null!==(e=t.question)&&void 0!==e&&e.id&&(0,Ue.NF)(t.question.id)},[]);return(0,n.useEffect)(()=>{if(o){const e=setTimeout(()=>{t.setIsQuestionVisible(!1)},1e3);return()=>clearTimeout(e)}},[o]),(0,n.useEffect)(()=>{!o&&c.current&&s(c.current.offsetHeight)},[o]),(0,S.jsxs)(E.az,{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:c,height:d?`${d}px`:"auto",children:[(0,S.jsx)(E.az,{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,ot.kz)({userInteractionType:nt.O.QUESTION_CLOSED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id},widgetSourceDetails:u})},children:(0,S.jsx)(Xe.A,{})}),(0,S.jsx)(E.az,{bg:"gray.700",borderTopRadius:"lg",py:3,px:6,display:"flex",flexDirection:"column",justifyContent:"center",width:"100%",children:(0,S.jsx)(Ve.D,{py:6,as:"h2",textAlign:"center",style:{fontWeight:"bold",fontSize:"18px",color:"white"},children:null===i||void 0===i?void 0:i.text})}),(0,S.jsx)(E.az,{flex:"1",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",py:5,px:6,width:"100%",children:o?(0,S.jsxs)(E.az,{flex:"1",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",children:[(0,S.jsx)(Ye,{}),(0,S.jsx)(Ve.D,{as:"h3",size:"md",color:"gray.700",fontWeight:"medium",textAlign:"center",mt:4,fontSize:"lg",children:"Thank you for your response!"})]}):(0,S.jsx)(P.B,{spacing:5,width:"100%",align:"center",children:i.options.map((e,i)=>(0,S.jsx)(E.az,{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,ot.kz)({userInteractionType:nt.O.QUESTION_ANSWERED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(i=t.question)||void 0===i?void 0:i.id,response:e},widgetSourceDetails:u})})(e),transition:"background-color 0.2s, border-color 0.2s",display:"flex",alignItems:"center",width:"100%",children:(0,S.jsx)(L.E,{py:5,color:"gray.800",children:e})},i))})})]})},qe=i(9935);var Ke=t=>{var e,i;const[o,r]=(0,n.useState)(""),[l,a]=(0,n.useState)(""),[c,u]=(0,n.useState)(!1),[p,h]=(0,n.useState)(!1),v=(0,s.Xd)("whatmoreShopId"),x=(0,s.Xd)("whatmoreSecondaryColor"),g=(0,s.Xd)("whatmorePrimaryFont"),m=null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.title,f=(0,n.useContext)(y.AppContext);(0,n.useEffect)(()=>{var e;null!==t&&void 0!==t&&null!==(e=t.question)&&void 0!==e&&e.id&&(0,Ue.NF)(t.question.id)},[]);const w=()=>{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)})()?(u(!0),(0,ot.kz)({userInteractionType:nt.O.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:f})):a("Please enter valid contact info.")},C=()=>{var e;t.setIsQuestionVisible(!1),(0,ot.kz)({userInteractionType:nt.O.QUESTION_CLOSED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id},widgetSourceDetails:f})};return(0,S.jsx)(ee.s,{bg:x,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:c?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(E.az,{textAlign:"center",color:"white",children:[(0,S.jsx)(E.az,{fontSize:"2xl",fontWeight:"bold",children:"CONGRATULATIONS!"}),(0,S.jsx)(E.az,{my:"4%",fontSize:"xl",children:"Claim Now"})]}),(0,S.jsx)(E.az,{position:"absolute",top:"2%",right:"2%",zIndex:20,children:(0,S.jsx)(U,{onCloseCallback:C})}),(0,S.jsxs)(E.az,{position:"relative",width:"70%",onClick:()=>{const t=(0,d.TH)(v);navigator.clipboard.writeText(t).then(()=>{h(!0),setTimeout(()=>{C()},1e3),setTimeout(()=>h(!1),2e3)},()=>{console.error("Failed to copy the coupon code")})},cursor:"pointer",children:[(0,S.jsxs)(E.az,{bg:"white",border:"2px dashed black",borderRadius:"md",p:"2%",display:"flex",alignItems:"center",justifyContent:"space-between",mt:"4%",children:[(0,S.jsx)(E.az,{as:"span",fontWeight:"bold",color:"black",children:(0,d.TH)(v)}),(0,S.jsx)(qe.A,{sx:{color:p?{whatmoreSecondaryColor:x}:"gray",cursor:"pointer",marginLeft:"2%"}})]}),p&&(0,S.jsx)(E.az,{padding:"4%",position:"absolute",left:"50%",transform:"translateX(-50%)",bg:x,color:"white",fontSize:"12px",borderRadius:"md",px:"2%",py:"0.5%",textAlign:"center",children:"Copied!"})]})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(E.az,{textAlign:"center",color:"white",children:[(0,S.jsx)(E.az,{children:(0,S.jsx)(L.E,{fontFamily:g,fontSize:"22px",fontWeight:"bold",children:m})}),(0,S.jsx)(E.az,{marginBottom:"10%",fontSize:"md",children:(0,d.aRV)(v)})]}),(0,S.jsx)(E.az,{position:"fixed",top:"2%",right:"2%",zIndex:20,children:(0,S.jsx)(U,{onCloseCallback:C})}),(0,S.jsxs)(ee.s,{mt:"4%",align:"center",direction:"column",width:"80%",children:[(0,S.jsx)(E.az,{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,S.jsx)("input",{fontFamily:g,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&&w()},style:{fontSize:"1em",border:"none",outline:"none",width:"100%"}})}),l&&(0,S.jsx)(L.E,{color:"red.500",mb:"4% !important",fontSize:"md",textAlign:"center",width:"100%",children:l}),(0,S.jsx)(E.az,{as:"button",bg:"#D3D3D3",color:"#343434",borderRadius:"md",fontWeight:"bold",height:"35px",display:"flex",alignItems:"center",justifyContent:"center",onClick:w,width:"50%",children:(0,S.jsx)(L.E,{fontFamily:g,fontSize:"0.8em",padding:"2%",color:x,children:"SUBMIT"})})]})]})})};var Ge=t=>{const[e,i]=(0,n.useState)(null);return(0,S.jsx)(E.az,{children:!e&&(0,S.jsx)(Ke,{question:t.question,onEmailSubmit:t=>{i(t)},setIsQuestionVisible:t.setIsQuestionVisible,placeholder:t.placeholder})})},Ze=i(6319);const Je=(t={},e,i,o=void 0)=>{var n,r,l,a,d,s,c,u,p,h,v,x,g,m,f,w,C,y,b,j,S,k,I,z,_,F,E,T,A,N,P,L,B,R,O,D,W,M,Q,H,V,X,Y,U,$,q,K,G,Z,J,tt,et,it,ot,nt,rt,lt,at,dt,st,ct,ut,pt,ht,vt,xt,gt,mt;const ft={heightMultiplier:10},wt={fontSizeMultiplier:8.3},Ct={fontSizeMultiplier:3},yt={fontSizeMultiplier:2.8,paddingMultiplier:3.5},bt={fontSizeMultiplier:3.5,paddingYMultiplier:3.5,paddingXMultiplier:4},jt={widthMultiplier:100,paddingMultiplier:5,borderRadiusMultiplier:1.2},St={logoTopMultiplier:0,logoBottomMultiplier:4,headingTopMultiplier:4,headingBottomMultiplier:2,subHeadingTopMultiplier:2,subHeadingBottomMultiplier:2,textFieldTopMultiplier:10,textFieldBottomMultiplier:6,ctaButtonBottomMultiplier:4};let kt="Email";return"number"===o?kt="Phone Number":"string"===o&&(kt="Email"),{logo:{url:(null===t||void 0===t||null===(n=t.logo)||void 0===n?void 0:n.url)||"",show:!(null===t||void 0===t||!t.logo||null===t||void 0===t||null===(r=t.logo)||void 0===r||!r.url),height:i(null!==(l=null===t||void 0===t||null===(a=t.logo)||void 0===a?void 0:a.heightMultiplier)&&void 0!==l?l:ft.heightMultiplier)},heading:{text:(null===t||void 0===t||null===(d=t.heading)||void 0===d?void 0:d.text)||"Bought You Christmas Present!",show:!(null===t||void 0===t||null===(s=t.heading)||void 0===s||!s.text),color:(null===t||void 0===t||null===(c=t.heading)||void 0===c?void 0:c.color)||"black",fontSize:i(null!==(u=null===t||void 0===t||null===(p=t.heading)||void 0===p?void 0:p.fontSizeMultiplier)&&void 0!==u?u:wt.fontSizeMultiplier),fontWeight:(null===t||void 0===t||null===(h=t.heading)||void 0===h?void 0:h.fontWeight)||"bold",textAlign:(null===t||void 0===t||null===(v=t.heading)||void 0===v?void 0:v.textAlign)||"center"},subHeading:{text:(null===t||void 0===t||null===(x=t.subHeading)||void 0===x?void 0:x.text)||"Drop you email for the amazing offers!",show:!(null===t||void 0===t||null===(g=t.subHeading)||void 0===g||!g.text),color:(null===t||void 0===t||null===(m=t.subHeading)||void 0===m?void 0:m.color)||"black",fontSize:i(null!==(f=null===t||void 0===t||null===(w=t.subHeading)||void 0===w?void 0:w.fontSizeMultiplier)&&void 0!==f?f:Ct.fontSizeMultiplier),fontWeight:(null===t||void 0===t||null===(C=t.subHeading)||void 0===C?void 0:C.fontWeight)||"normal",textAlign:(null===t||void 0===t||null===(y=t.subHeading)||void 0===y?void 0:y.textAlign)||"center"},textField:{placeholder:(null===t||void 0===t||null===(b=t.textField)||void 0===b?void 0:b.placeholder)||kt,backgroundColor:(null===t||void 0===t||null===(j=t.textField)||void 0===j?void 0:j.backgroundColor)||"#FFFFFF",borderColor:(null===t||void 0===t||null===(S=t.textField)||void 0===S?void 0:S.borderColor)||"#CCCCCC",borderWidth:(null===t||void 0===t||null===(k=t.textField)||void 0===k?void 0:k.borderWidth)||"1px",borderRadius:(null===t||void 0===t||null===(I=t.textField)||void 0===I?void 0:I.borderRadius)||"10px",textColor:(null===t||void 0===t||null===(z=t.textField)||void 0===z?void 0:z.textColor)||"#000000",fontSize:i(null!==(_=null===t||void 0===t||null===(F=t.textField)||void 0===F?void 0:F.fontSizeMultiplier)&&void 0!==_?_:yt.fontSizeMultiplier),padding:i(null!==(E=null===t||void 0===t||null===(T=t.textField)||void 0===T?void 0:T.paddingMultiplier)&&void 0!==E?E:yt.paddingMultiplier)},ctaButton:{text:(null===t||void 0===t||null===(A=t.ctaButton)||void 0===A?void 0:A.text)||"Submit",backgroundColor:(null===t||void 0===t||null===(N=t.ctaButton)||void 0===N?void 0:N.backgroundColor)||"#4A4A4A",textColor:(null===t||void 0===t||null===(P=t.ctaButton)||void 0===P?void 0:P.textColor)||"#FFFFFF",fontSize:i(null!==(L=null===t||void 0===t||null===(B=t.ctaButton)||void 0===B?void 0:B.fontSizeMultiplier)&&void 0!==L?L:bt.fontSizeMultiplier),fontWeight:(null===t||void 0===t||null===(R=t.ctaButton)||void 0===R?void 0:R.fontWeight)||"bold",borderRadius:(null===t||void 0===t||null===(O=t.ctaButton)||void 0===O?void 0:O.borderRadius)||"10px",paddingY:i(null!==(D=null===t||void 0===t||null===(W=t.ctaButton)||void 0===W?void 0:W.paddingYMultiplier)&&void 0!==D?D:bt.paddingYMultiplier),paddingX:i(null!==(M=null===t||void 0===t||null===(Q=t.ctaButton)||void 0===Q?void 0:Q.paddingXMultiplier)&&void 0!==M?M:bt.paddingXMultiplier)},closeButton:{backgroundColor:(null===t||void 0===t||null===(H=t.closeButton)||void 0===H?void 0:H.backgroundColor)||"#4A4A4A"},container:{backgroundGradient:(null===t||void 0===t||null===(V=t.container)||void 0===V?void 0:V.backgroundGradient)||"linear-gradient(135deg, #e0ded9 0%, #bab8b0 60%, #f4f3f0 100%)",frameColor:(null===t||void 0===t||null===(X=t.container)||void 0===X?void 0:X.frameColor)||"#CCCCCC",frameWidth:(null===t||void 0===t||null===(Y=t.container)||void 0===Y?void 0:Y.frameWidth)||"2px",borderRadius:i(null!==(U=null===t||void 0===t||null===($=t.container)||void 0===$?void 0:$.borderRadiusMultiplier)&&void 0!==U?U:jt.borderRadiusMultiplier),boxShadow:(null===t||void 0===t||null===(q=t.container)||void 0===q?void 0:q.boxShadow)||"0px 4px 12px rgba(0, 0, 0, 0.15)",padding:i(null!==(K=null===t||void 0===t||null===(G=t.container)||void 0===G?void 0:G.paddingMultiplier)&&void 0!==K?K:jt.paddingMultiplier),width:i(null!==(Z=null===t||void 0===t||null===(J=t.container)||void 0===J?void 0:J.widthMultiplier)&&void 0!==Z?Z:jt.widthMultiplier)},spacing:{logoTop:i(null!==(tt=null===t||void 0===t||null===(et=t.spacing)||void 0===et?void 0:et.logoTopMultiplier)&&void 0!==tt?tt:St.logoTopMultiplier),logoBottom:i(null!==(it=null===t||void 0===t||null===(ot=t.spacing)||void 0===ot?void 0:ot.logoBottomMultiplier)&&void 0!==it?it:St.logoBottomMultiplier),headingTop:i(null!==(nt=null===t||void 0===t||null===(rt=t.spacing)||void 0===rt?void 0:rt.headingTopMultiplier)&&void 0!==nt?nt:St.headingTopMultiplier),headingBottom:i(null!==(lt=null===t||void 0===t||null===(at=t.spacing)||void 0===at?void 0:at.headingBottomMultiplier)&&void 0!==lt?lt:St.headingBottomMultiplier),subHeadingTop:i(null!==(dt=null===t||void 0===t||null===(st=t.spacing)||void 0===st?void 0:st.subHeadingTopMultiplier)&&void 0!==dt?dt:St.subHeadingTopMultiplier),subHeadingBottom:i(null!==(ct=null===t||void 0===t||null===(ut=t.spacing)||void 0===ut?void 0:ut.subHeadingBottomMultiplier)&&void 0!==ct?ct:St.subHeadingBottomMultiplier),textFieldTop:i(null!==(pt=null===t||void 0===t||null===(ht=t.spacing)||void 0===ht?void 0:ht.textFieldTopMultiplier)&&void 0!==pt?pt:St.textFieldTopMultiplier),textFieldBottom:i(null!==(vt=null===t||void 0===t||null===(xt=t.spacing)||void 0===xt?void 0:xt.textFieldBottomMultiplier)&&void 0!==vt?vt:St.textFieldBottomMultiplier),ctaButtonBottom:i(null!==(gt=null===t||void 0===t||null===(mt=t.spacing)||void 0===mt?void 0:mt.ctaButtonBottomMultiplier)&&void 0!==gt?gt:St.ctaButtonBottomMultiplier)}}};var ti=t=>{var e,i,o,r,l;const[a,d]=(0,n.useState)(""),[u,p]=(0,n.useState)(!1),[h,v]=(0,n.useState)(!1),x=(0,n.useContext)(y.AppContext),[g]=(0,s.QN)("whatmorePrimaryFont"),[m,f,w,C]=(0,c.A)(),b=.01*C,j=null===(e=t.question)||void 0===e?void 0:e.type,k=Je(null===(i=t.question)||void 0===i?void 0:i.template_config,b,t=>b*t+"px",j),I=null===(o=t.question)||void 0===o||null===(r=o.answers)||void 0===r?void 0:r.coupon_code;(0,n.useEffect)(()=>{var e;null!==(e=t.question)&&void 0!==e&&e.id&&(0,Ue.NF)(t.question.id)},[]);const z=()=>{var e,i;p(!0),(0,ot.kz)({userInteractionType:nt.O.QUESTION_ANSWERED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id,response:a,type:"number"===(null===t||void 0===t||null===(i=t.question)||void 0===i?void 0:i.type)?"leadgen:number":"leadgen:email"},widgetSourceDetails:x}),I||setTimeout(()=>{t.setIsQuestionVisible(!1)},1500)};return(0,S.jsxs)("div",{className:"whatmore-lead-capture-container",style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:k.container.backgroundGradient,padding:k.container.padding,zIndex:100,fontFamily:g},children:[(0,S.jsx)("div",{style:{position:"absolute",top:"16px",right:"16px",zIndex:20,cursor:"pointer"},onClick:()=>{var e;t.setIsQuestionVisible(!1),(0,ot.kz)({userInteractionType:nt.O.QUESTION_CLOSED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id},widgetSourceDetails:x})},children:(0,S.jsx)("div",{style:{width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"white",boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,S.jsx)("div",{style:{width:"32px",height:"32px",borderRadius:"50%",backgroundColor:k.closeButton.backgroundColor,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,S.jsx)(Ze.A,{style:{color:"white",fontSize:"18px"}})})})}),u?(0,S.jsxs)("div",{className:"whatmore-lead-capture-success",style:{textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",width:"85%"},children:[(0,S.jsx)(Ye,{}),(0,S.jsx)("p",{style:{fontSize:k.heading.fontSize,fontWeight:"bold",color:k.heading.color,margin:"16px 0"},children:"Thank you for your response!"}),I&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)("div",{onClick:()=>{navigator.clipboard.writeText(I).then(()=>{v(!0),setTimeout(()=>{t.setIsQuestionVisible(!1)},800)},()=>{console.error("Failed to copy coupon code")})},style:{position:"relative",width:"100%",cursor:"pointer",marginBottom:"12px"},children:[(0,S.jsxs)("div",{style:{backgroundColor:"white",border:"2px dashed black",borderRadius:"8px",padding:"16px",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,S.jsx)("span",{style:{fontWeight:"bold",fontSize:k.ctaButton.fontSize,color:"black"},children:I}),(0,S.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:h?"#4CAF50":"#666",strokeWidth:"2",children:[(0,S.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,S.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})]}),h&&(0,S.jsx)("div",{style:{position:"absolute",left:"50%",transform:"translateX(-50%)",bottom:"-30px",backgroundColor:"#4CAF50",color:"white",fontSize:"12px",borderRadius:"4px",padding:"4px 12px"},children:"Copied!"})]}),(0,S.jsx)("p",{style:{fontSize:k.subHeading.fontSize,color:k.subHeading.color,margin:0,fontStyle:"italic"},children:"Tap to copy"})]})]}):(0,S.jsxs)(S.Fragment,{children:[k.logo.show&&(0,S.jsx)("div",{className:"whatmore-lead-capture-logo",style:{marginBottom:k.spacing.logoBottom,marginTop:k.spacing.logoTop},children:(0,S.jsx)("img",{src:k.logo.url,alt:"Logo",style:{height:k.logo.height,objectFit:"contain"}})}),k.heading.show&&(0,S.jsx)("div",{className:"whatmore-lead-capture-heading",style:{marginTop:k.spacing.headingTop,marginBottom:k.spacing.headingBottom},children:(0,S.jsx)("p",{style:{fontSize:k.heading.fontSize,fontWeight:k.heading.fontWeight,color:k.heading.color,textAlign:k.heading.textAlign,margin:0},children:k.heading.text})}),k.subHeading.show&&(0,S.jsx)("div",{className:"whatmore-lead-capture-subheading",style:{marginTop:k.spacing.subHeadingTop,marginBottom:k.spacing.subHeadingBottom},children:(0,S.jsx)("p",{style:{fontSize:k.subHeading.fontSize,fontWeight:k.subHeading.fontWeight,color:k.subHeading.color,textAlign:k.subHeading.textAlign,margin:0},children:k.subHeading.text})}),(0,S.jsx)("div",{className:"whatmore-lead-capture-textfield",style:{marginTop:k.spacing.textFieldTop,marginBottom:k.spacing.textFieldBottom,width:"85%"},children:(0,S.jsx)("div",{style:{backgroundColor:k.textField.backgroundColor,border:`${k.textField.borderWidth} solid ${k.textField.borderColor}`,borderRadius:k.textField.borderRadius,padding:k.textField.padding,width:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,S.jsx)("input",{type:"number"===(null===(l=t.question)||void 0===l?void 0:l.type)?"tel":"email",placeholder:k.textField.placeholder,value:a,onChange:t=>d(t.target.value),onKeyDown:t=>{"Enter"===t.key&&z()},style:{fontSize:k.textField.fontSize,color:k.textField.textColor,border:"none",outline:"none",width:"100%",backgroundColor:"transparent",height:"100%"}})})}),(0,S.jsx)("button",{className:"whatmore-lead-capture-cta-button",onClick:z,style:{minWidth:"35%",maxWidth:"70%",width:"auto",backgroundColor:k.ctaButton.backgroundColor,color:k.ctaButton.textColor,fontSize:k.ctaButton.fontSize,fontWeight:k.ctaButton.fontWeight,borderRadius:k.ctaButton.borderRadius,padding:`${k.ctaButton.paddingY} ${k.ctaButton.paddingX}`,marginBottom:k.spacing.ctaButtonBottom,border:"none",outline:"none",cursor:"pointer",whiteSpace:"normal",textAlign:"center"},onMouseEnter:t=>t.target.style.opacity="0.9",onMouseLeave:t=>t.target.style.opacity="1",children:k.ctaButton.text})]})]})};var ei=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,Ue.Hm)()},[]),r>=l.length)return;const a=null===l||void 0===l?void 0:l[r];return"lead_capture"===(null===a||void 0===a?void 0:a.template_type)?(0,S.jsx)(E.az,{children:(0,S.jsx)(ti,{question:a,setIsQuestionVisible:t.setIsQuestionVisible})}):"string"===(null===a||void 0===a?void 0:a.type)||"number"===(null===a||void 0===a?void 0:a.type)?(0,S.jsx)(E.az,{children:(0,S.jsx)(Ge,{setIsQuestionVisible:t.setIsQuestionVisible,question:a,placeholder:"number"===(null===a||void 0===a?void 0:a.type)?"Enter your phone number":"Enter your email"})}):(0,S.jsx)(E.az,{children:(0,S.jsx)($e,{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})})},ii=i(6118);const oi=({iconSize:t})=>(0,S.jsx)("div",{style:{color:"white",paddingTop:"2px"},children:(0,S.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"currentColor",class:"bi bi-download",viewBox:"0 0 16 16",children:[(0,S.jsx)("path",{d:"M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5"}),(0,S.jsx)("path",{d:"M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708z"})]})});var ni=function(t){const e=(0,s.Xd)("whatmoreShopId"),i=t.event,[o,n,r,l]=(0,c.A)(),a=.09*l*(0,d.xkB)(e);return(0,S.jsx)(F.o,{children:(0,S.jsx)(E.jl,{onClick:async function(){const t=(0,b.s)(null===i||void 0===i?void 0:i.event_hls_url);if(t)try{const e=await fetch(t),o=await e.blob(),n=window.URL.createObjectURL(o),r=document.createElement("a");r.href=n,r.download=`whatmore-video-${i.event_id}.mp4`,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(n)}catch(e){console.error("Video download failed:",e)}},cursor:"pointer",children:(0,S.jsx)(P.B,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:(0,S.jsx)(oi,{iconSize:a})})})})},ri=i(3305),li=i(9258);function ai(t){var e;const i=t.event,[o,r,l,a]=(0,c.A)(),[u]=(0,s.QN)("whatmorePrimaryFont"),{whatmoreIsStoriesTemplate:p}=(0,n.useContext)(y.AppContext),[h]=(0,s.QN)("whatmoreSecondaryColor"),[v]=(0,s.QN)("whatmoreShopId"),x=(0,d.ivI)(v),g=null!==(e=(0,d.qAx)(v))&&void 0!==e?e:[h,x,h,x,h],m=(0,n.useRef)(null);(0,n.useEffect)(()=>{m.current&&m.current.play()},[]);const f=(0,b.s)(null===i||void 0===i?void 0:i.storyset_thumbnail_image);return(0,S.jsx)(S.Fragment,{children:p?(0,S.jsx)(E.az,{width:"100%",height:"fit-content",padding:"5px",children:(0,S.jsxs)(P.B,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-start",children:[(0,S.jsx)(F.o,{children:(0,S.jsx)(E.jl,{overflow:"hidden",size:.14*t.width+"px",sx:{boxShadow:"0px 2px 1px 0px "+g[0]+"50, 0px -2px 1px 0px "+g[1]+"50, 2px 0px 1px 0px "+g[2]+"50, -2px 0px 1px 0px "+g[3]+"80, 2px -2px 1px 0px "+g[4]+"80, -2px 2px 1px 0px "+g[0]+"DA, 2px 2px 1px 0px "+g[1]+"DA, -2px -2px 1px 0px "+g[2]+"DA"},children:"video"==(0,wt.B)(f)?(0,S.jsx)(He.A,{height:"100%",width:"100%",poster:null===i||void 0===i?void 0:i.thumbnail_image,url:f,isPlaying:!0,event:{event_type:"video"},borderRadius:"50%"}):(0,S.jsx)("img",{src:f,style:{objectFit:"cover",height:"100%",width:"100%",backgroundColor:"white"}})})}),(0,S.jsx)(F.o,{children:(0,S.jsx)(L.E,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:.05*t.width+"px",fontWeight:"medium",lineHeight:"100%",sx:{fontFamily:u+" !important",color:"white !important",textShadow:"0px 0px 4px black !important;"},children:i.storyset_name})})]})}):(0,S.jsx)(S.Fragment,{})})}var di=function(t){var e,i,o;const[r,l,u]=(0,ri.A)(),[p]=(0,s.QN)("isInDesignMode"),[h]=(0,s.QN)("isDemoBrand"),[v,g]=(0,s.QN)("isProductSwiperCatalogOpen"),[m,f]=(0,s.QN)("isFirstIndicatorRenderDone"),[w]=(0,s.QN)("whatmoreShopId"),[C]=(0,s.QN)("whatmoreShowViews"),b=(0,n.useContext)(x.p),{whatmoreEventsBrowsingTemplate:j,whatmoreIsStoriesTemplate:k}=(0,n.useContext)(y.AppContext),[I,z,_,F]=(0,c.A)(),T=(0,s.Xd)("whatmorePrimaryFont"),[A,B]=(0,n.useState)(0),R=t.event,O=t.storySetId,D=t.isLast,W=t.onCloseCallback,M=t.focusRef,Q=t.productClickHandler,H=t.videoPlayingData,V=t.totalSiblingEvents,Y=t.indexAmongSiblings,$=t.leftOpenSpaceClickHandler,q=t.midOpenSpaceClickHandler,K=t.rightOpenSpaceClickHandler,{whatmoreWidgetSourceDetails:G}=(0,n.useContext)(y.AppContext),J=.1*F,[tt,et]=(0,n.useState)(!1),[it,rt]=(0,n.useState)([]);function lt(){p||h||(async()=>{(0,a.A9)(R,1)})();const t=R.products[A]||R.products[0];(0,ot.kz)({userInteractionType:nt.O.WHATSAPP_ICON_CLICKED,widgetSourceDetails:G,event:R,productList:null===R||void 0===R?void 0:R.products,ctaList:null===R||void 0===R?void 0:R.cta});const e=t.product_link,i=(0,d.dzp)(w),o="50529403072"==w?`Hey, I saw a video on your website, need more info about this: \n${e}`:`Hey, I am interested in this product I saw on ${null===t||void 0===t?void 0:t.brand} store: \n${e}. Could you please help me with some queries?`;window.open(i+`&text=${o}&type=phone_number`,"_blank")}(0,n.useEffect)(()=>{B(0)},[null===R||void 0===R?void 0:R.event_id]);const at=t=>{dt.current&&!dt.current.contains(t.target)&&et(!1)},dt=(0,n.useRef)(null);(0,n.useEffect)(()=>(tt?document.addEventListener("click",at):document.removeEventListener("click",at),()=>{document.removeEventListener("click",at)}),[tt]);const st=(()=>{const t=(0,s.Xd)("whatmoreShopId");return"Free"==(0,d.yt9)(t)})()&&"portrait"==r;return(0,S.jsxs)(E.az,{width:"full",height:"full",borderRadius:"md",children:[t.isQuestionVisible&&(0,S.jsx)(Gt.S,{userInteractionType:nt.O.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&&!h,children:(0,S.jsx)(ei,{questionList:t.questionList,questionIndex:t.qIndex,setIsQuestionVisible:t.setIsQuestionVisible})}),tt&&(0,S.jsx)("div",{ref:dt,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,S.jsx)(We,{shareText:it,setShareText:rt,iconSize:J,isModalOpen:tt,setIsModalOpen:et})}),(!t.isQuestionVisible||t.qIndex>=(null===t||void 0===t||null===(o=t.questionList)||void 0===o?void 0:o.length))&&(0,S.jsxs)(P.B,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,S.jsxs)(P.B,{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:[b.showVideoPlayingData?(0,S.jsx)(P.B,{direction:"row",width:"100%",height:"fit-content",marginTop:"5px",justifyContent:"center",children:(0,S.jsx)(_e,{videoPlayingData:H,totalSiblings:V,indexAmongSiblings:Y})}):(0,S.jsx)(S.Fragment,{}),(0,S.jsx)(E.az,{width:"full",margin:"2px",marginTop:"5px",children:(0,S.jsxs)(P.B,{direction:"row",width:"full",height:"fit-content",paddingRight:"10px",paddingLeft:"10px",children:[(0,S.jsxs)(P.B,{className:"wht-overlay-left-group",direction:"row",alignItems:"center",gap:"10px",style:{flexGrow:1,minWidth:0},children:[(0,S.jsx)("span",{"aria-hidden":"true",style:{display:"inline-block",width:0,height:0}}),(0,S.jsx)(ai,{event:R,width:F}),(0,jt.Yt)(j)||"show"!==C||"61415948468"!==w||"show"!==(0,d.klK)(w)?(0,S.jsx)(S.Fragment,{}):(0,S.jsx)(E.az,{children:(0,S.jsx)(li.A,{event:R,fontSize:.035*F+"px"})})]}),(0,S.jsxs)(P.B,{className:"wht-overlay-right-group",direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,jt.Yt)(j)?(0,S.jsx)(Ae,{whatmoreShareTemplateId:(0,jt.Gy)(j),whatmoreShareStoryId:O,whatmoreShareEventId:R.event_id,event:R,showShareText:!1,iconSize:.098*F,setIsModalOpen:et,setShareText:rt}):(0,S.jsx)(S.Fragment,{}),(0,S.jsx)(N,{focusRef:M}),("landscape"!==r||t.showCloseOverlay)&&(0,S.jsx)(U,{event:R,onCloseCallback:W})]})]})})]}),(0,S.jsxs)(P.B,{width:"100%",height:"100%",direction:"row",justifyContent:"center",children:[(0,S.jsx)(E.az,{width:"33%",height:"100%",onClick:()=>{$&&$()},sx:{display:"block !important"}}),(0,S.jsx)(E.az,{width:"34%",height:"100%",onClick:()=>{q&&q()},sx:{display:"block !important"}}),(0,S.jsx)(E.az,{width:"33%",height:"100%",onClick:()=>{K&&K()},sx:{display:"block !important"}})]}),(0,S.jsxs)(E.az,{width:"full",height:"fit-content",children:[b.totalEvents>1&&!m&&b.showSwipeIndicator?(0,S.jsx)(E.az,{width:"full",margin:"2px",children:(0,S.jsx)(P.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,S.jsx)(Z,{swipeUp:!D})})}):null,(0,S.jsx)(E.az,{width:"fit-content",height:"fit-content",position:"absolute",right:4,bottom:"30%",children:(0,S.jsxs)(E.az,{display:"flex",flexDirection:"column",alignItems:"center",children:["78232846646"==w&&(0,S.jsxs)(S.Fragment,{children:[" ","portrait"==r&&b.totalEvents>1&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(E.az,{children:(0,S.jsx)(ii.A,{style:{fontSize:1.3*J+"px",color:"white",cursor:"pointer",filter:"drop-shadow(0 0 5px black)"},onClick:()=>{t.changeSlide(R,"left")}})}),(0,S.jsx)(E.az,{children:(0,S.jsx)(ii.A,{style:{fontSize:1.3*J+"px",transform:"rotate(180deg)",color:"white",cursor:"pointer",filter:"drop-shadow(0 0 5px black)"},onClick:()=>{t.changeSlide(R,"right")}})})]}),(0,S.jsx)(E.az,{height:"fit-content",position:"relative",marginBottom:"18px",children:(0,S.jsx)(P.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,S.jsx)(ni,{event:R})})})]}),(0,d.oZc)(w)&&(0,d.dzp)(w)&&!(0,jt.Yt)(j)?(0,S.jsx)(E.az,{width:"fit-content",paddingY:"12px",position:"relative",children:(0,S.jsxs)(P.B,{gap:"4px",direction:"column",alignItems:"center",cursor:"pointer",onClick:lt,children:[(0,S.jsx)(Be,{iconSize:.7*J,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,S.jsx)(L.E,{fontSize:J*(0,d.LOH)(w)+"px",fontWeight:"bold",align:"center",maxWidth:"55px",style:{marginTop:"2px"},sx:{fontFamily:T+" !important",color:"white !important"},children:(0,d.wtw)(w)})]})}):(0,S.jsx)(S.Fragment,{}),(0,d.MdM)(w)&&(0,S.jsxs)(E.az,{height:"fit-content",position:"relative",children:[(0,S.jsx)(P.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,S.jsx)(Le,{event:R})}),(0,jt.Yt)(j)&&"50529403072"===w&&(0,S.jsx)(E.az,{ml:"auto",width:"fit-content",paddingY:"12px",children:(0,S.jsxs)(P.B,{gap:"4px",marginRight:"-3px",direction:"column",justifyContent:"flex-end",alignItems:"center",cursor:"pointer",onClick:lt,children:[(0,S.jsx)(Be,{iconSize:.6*J,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,S.jsx)(L.E,{fontSize:J*(0,d.LOH)(w)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:T+" !important",color:"white !important"},children:(0,d.wtw)(w)})]})})]}),(0,d.iQ5)(w)&&!(0,jt.Yt)(j)?(0,S.jsx)(E.az,{height:"fit-content",paddingY:"2px",position:"relative",children:(0,S.jsx)(P.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,S.jsx)(Ae,{whatmoreShareTemplateId:(0,jt.Gy)(j),whatmoreShareStoryId:O,whatmoreShareEventId:R.event_id,event:R,setIsModalOpen:et,setShareText:rt})})}):(0,S.jsx)(S.Fragment,{})]})}),(0,Kt.Z_)(R)?(0,S.jsxs)(E.az,{width:"full",children:[(0,d.ek9)(w)?(0,S.jsx)(E.az,{w:"100%",children:(0,S.jsx)(P.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,S.jsx)(X,{event:R,onToggle:t=>{g("minimize-button"!==t)}})})}):(0,S.jsx)(S.Fragment,{}),v&&(0,S.jsx)(E.az,{display:"flex",width:"100%",height:"fit-content",children:(0,S.jsx)(Jt,{event:R,productClickHandler:Q,productCartCounts:t.productCartCounts,onCartCountChange:t.onCartCountChange,onActiveProductChange:B})})]}):(0,S.jsx)(S.Fragment,{})]}),st&&(0,S.jsx)(P.B,{direction:"row",width:"100%",height:"fit-content",bg:"rgba(52, 52, 52, 0.9)",py:"3px",justifyContent:"center",children:(0,S.jsx)(Qe,{brandName:null===R||void 0===R?void 0:R.brand,fontSize:.033*F})})]})]})},si=i(5491),ci=i.n(si);var ui=function(t){var e,i,o,r,l,a,[h,v,g,m]=(0,c.A)();const[f,w]=(0,n.useState)(!1),[C,j]=(0,n.useState)(),[k,I]=(0,n.useState)(),z=(0,n.useRef)({current_time:0,video_duration:0,is_video_ended:!1}),T=(0,s.Xd)("whatmoreShopId"),A=t.event,N=t.storyId,L=t.onBack,B=n.useRef(),R=t.changeSlide,O=t.isPlaying,D=t.isLast,W=t.setLockSwiper,M=t.onVideoEndedCallback,Q=t.progressUpdateCallback,H=null!==(e=t.totalSiblingEvents)&&void 0!==e?e:0,V=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0,X=null===(o=t.showOverlay)||void 0===o||o,Y=null!==(r=t.leftOpenSpaceClickHandler)&&void 0!==r?r:()=>{},U=null!==(l=t.midOpenSpaceClickHandler)&&void 0!==l?l:()=>{},$=null!==(a=t.rightOpenSpaceClickHandler)&&void 0!==a?a:()=>{},{whatmoreWidgetSourceDetails:q,whatmoreIsStoriesTemplate:K}=(0,n.useContext)(y.AppContext),{questionList:G}=(0,n.useContext)(x.p),Z=(null===G||void 0===G?void 0:G.length)>0?parseInt(localStorage.getItem("_whatmore_qview_index")):1e4,[J,tt]=(0,n.useState)(),[et,it]=(0,n.useState)({}),rt=(t,e)=>{it(i=>({...i,[t]:e}))};(0,n.useEffect)(()=>{tt(t.showQuestion)},[t.showQuestion]);const lt="center",at=async t=>{const e=await(0,u.M)(t,(0,d.NCy)(T),T);I(t),j(e),w(!0),W(!0),(0,ot.kz)({userInteractionType:nt.O.SHOPNOW_CLICKED,widgetSourceDetails:q,event:A,productList:A.products,ctaList:A.cta}),(0,s.t2)("whatmoreAllowAutoSlide",!1)};let dt;try{dt=ci()(()=>{M()},1e3,{leading:!0,trailing:!1})}catch(st){console.log(st)}return(0,S.jsx)(F.o,{children:(0,S.jsxs)(E.az,{width:m,height:g,sx:{overflow:"hidden"},children:[(0,S.jsx)(P.B,{direction:"column",justifyContent:lt,height:"full",width:"full",children:(0,S.jsx)(E.az,{borderRadius:"md",backgroundColor:"white",children:(0,S.jsx)(Ie.g,{width:"full",ratio:m/g,children:(0,S.jsx)(_,{height:"100%",width:"100%",url:(0,b.s)((0,p.lP)(A)),isPlaying:O&&(!J||Z>=G.length),timeUpdateCallback:function(t,e){const i=ze(t,e);Q({watch_time:t,video_duration:e});const o=z.is_video_ended;i>=99&&O&&!o?(dt(),z.current={current_time:t,video_duration:e,is_video_ended:!0}):z.current={current_time:t,video_duration:e,is_video_ended:o}},event:A,question:J&&Z<(null===G||void 0===G?void 0:G.length),source:t.source})})})}),X?(0,S.jsx)(P.B,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:lt,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,S.jsx)(E.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:K?(0,S.jsx)(di,{focusRef:B,event:t.event,isLast:D,onCloseCallback:t=>{L(t),(0,ot.DG)({userInteractionType:nt.O.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:z.current.current_time,video_duration:z.current.video_duration},widgetSourceDetails:q,event:A,productList:A.products,ctaList:A.cta})},productClickHandler:at,videoPlayingData:z,totalSiblingEvents:H,indexAmongSiblings:V,questionList:G,isQuestionVisible:J&&Z<(null===G||void 0===G?void 0:G.length),qIndex:Z,setIsQuestionVisible:tt,leftOpenSpaceClickHandler:Y,midOpenSpaceClickHandler:U,rightOpenSpaceClickHandler:$,storySetId:N,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:R,productCartCounts:et,onCartCountChange:rt}):(0,S.jsx)(di,{focusRef:B,event:t.event,isLast:D,onCloseCallback:t=>{L(t),(0,ot.DG)({userInteractionType:nt.O.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:z.current.current_time,video_duration:z.current.video_duration},widgetSourceDetails:q,event:A,productList:A.products,ctaList:A.cta})},productClickHandler:at,videoPlayingData:z,totalSiblingEvents:H,indexAmongSiblings:V,questionList:G,isQuestionVisible:J&&Z<(null===G||void 0===G?void 0:G.length),qIndex:Z,setIsQuestionVisible:tt,storySetId:N,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:R,productCartCounts:et,onCartCountChange:rt})})}):(0,S.jsx)(S.Fragment,{}),!0===f?(0,S.jsx)(P.B,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:lt,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,S.jsx)(E.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,S.jsx)(ke,{focusRef:B,event:t.event,isLast:D,onCloseCallback:()=>L(),setLockSwiper:W,data:C,currentProduct:k,setOpenShopNow:t=>{w(t),(0,s.t2)("whatmoreAllowAutoSlide",!t)},productCartCounts:et,onCartCountChange:rt})})}):(0,S.jsx)("div",{})]})})},pi=i(6613),hi=i(5727);var vi=function(t){var[e,i,o,n]=(0,c.A)();const r=(0,s.Xd)("whatmoreShopId"),l=t.event,a=t.isPlaying,u="center";return(0,S.jsx)(F.o,{children:(0,S.jsxs)(E.az,{width:n,height:o,sx:{overflow:"hidden"},children:[(0,S.jsx)(P.B,{direction:"column",justifyContent:u,height:"full",width:"full",children:(0,S.jsx)(E.az,{borderRadius:"md",backgroundColor:"white",children:(0,S.jsx)(Ie.g,{width:"full",ratio:n/o,children:(0,S.jsx)(_,{height:"100%",width:"100%",url:(0,b.s)((0,p.lP)(l)),isPlaying:a,timeUpdateCallback:function(t,e){},event:l,source:t.source})})})}),(0,S.jsx)(P.B,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:u,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,S.jsx)(E.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",backdropFilter:"auto",backdropBlur:"10px",onClick:t=>{(0,f.bo)()},children:(0,S.jsxs)(P.B,{direction:"column",justifyContent:"center",alignItems:"center",height:"full",width:"full",children:[(0,S.jsx)(hi.A,{sx:{boxShadow:3,color:(0,d.KFN)(r),fontSize:.4*n,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{(0,f.bo)()}}),(0,S.jsx)(L.E,{color:"white",fontSize:.05*n+"px",fontWeight:"bold",align:"left",children:"Please click to play video.."})]})})})]})})},xi=i(9821);var gi=function(t){var e,i;const o=t.changeSlide,n=t.event,r=null===(e=t.isPlaying)||void 0===e||e,l=t.onBack,a=t.isLast,c=t.setLockSwiper,u=(t.heightFactor,t.widthFactor,t.onVideoEndedCallback),p=t.progressUpdateCallback,[x,g]=(0,v.A)(),[m]=(0,s.QN)("whatmoreVideoPlayerPoolBlessed"),f=null===(i=t.showOverlay)||void 0===i||i;function C(){!0!==(0,d.GZ2)((0,s.Xd)("whatmoreShopId"))&&g(!x)}return(0,pi.MN)()&&0==m?(0,xi._)()?(0,S.jsx)(vi,{event:n,onBack:l,isPlaying:r,isLast:a,setLockSwiper:c,onVideoEndedCallback:u,progressUpdateCallback:p,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{C()},midOpenSpaceClickHandler:()=>{C()},rightOpenSpaceClickHandler:()=>{C()},showOverlay:f,source:w.N.CAROUSEL_EVENT_OPENED},"shopping-video-view"+n.event_id):(0,S.jsx)(ui,{event:n,onBack:l,isPlaying:r,isLast:a,setLockSwiper:c,onVideoEndedCallback:u,progressUpdateCallback:p,showQuestion:t.showQuestion,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{C()},midOpenSpaceClickHandler:()=>{C()},rightOpenSpaceClickHandler:()=>{C()},showOverlay:f,source:w.N.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:o},"shopping-video-view"+n.event_id):(0,h.i)(n)||(0,h.I)(n)?(0,S.jsx)(ui,{event:n,onBack:l,isPlaying:r,isLast:a,setLockSwiper:c,onVideoEndedCallback:u,progressUpdateCallback:p,showQuestion:t.showQuestion,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{C()},midOpenSpaceClickHandler:()=>{C()},rightOpenSpaceClickHandler:()=>{C()},showOverlay:f,source:w.N.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:o},"shopping-video-view"+n.event_id):(console.error("Can't render event which is neither video or image"),(0,S.jsx)("div",{}))},mi=i(4806),fi=i.n(mi),wi=i(2804),Ci=i(6834);function yi(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,S.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,S.jsx)(Ci.A,{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,S.jsx)(wi.A,{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 bi=function(t){var e,i,o;const n=null!==(e=t.relativeBottomPercentage)&&void 0!==e?e:"30%",r=null!==(i=t.width)&&void 0!==i?i:"100%",l=null!==(o=t.fontSize)&&void 0!==o?o:50,a=t.handleClick;return(0,S.jsx)("div",{style:{position:"relative",zIndex:1,bottom:n,width:"100%",height:"fit-content",display:"flex",flexFlow:"row nowrap",justifyContent:"center"},id:"here",children:(0,S.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,S.jsx)(yi,{type:"left",onClick:a,fontSize:l}),(0,S.jsx)(yi,{type:"right",onClick:a,fontSize:l})]})})},ji=i(964),Si=i(3330);var ki=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 Ii=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(o){const n=i.current.clientX,r=i.current.clientY;var l=n-o.changedTouches[0].clientX,a=r-o.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 zi=function(t,e){const i=(0,n.useRef)(ci()((t,e)=>{t(e)},300,{leading:!0,trailing:!1}));return[function(o,n){var r=0;if(r="vertical"==t?o.deltaY:o.deltaX,Math.abs(r)<=e)return;const l=r>0?"right":"left";i.current(n,l)}]},_i=i(4638);var Fi=function(t){const e=t.events,i=t.eventIndex,o=t.onBack;var[u,p,h,v]=(0,c.A)();const[g]=(0,s.QN)("isInDesignMode"),[m]=(0,s.QN)("isDemoBrand"),[f,w]=(0,n.useState)(!0),[C,b]=(0,s.QN)("isFirstIndicatorRenderDone"),[j,k]=(0,n.useState)(!1),I=(0,n.useRef)({}),{setCloseClickComponent:z}=(0,n.useContext)(x.p),{slideDirection:_}=(0,n.useContext)(x.p),[F]=(0,s.QN)("whatmoreShopId"),[E]=(0,s.QN)("whatmoreLandingLocationType"),[T,A]=ki(i,e.length),[N,L]=Ii(_,10),[B]=zi("vertical",10),[R,O]=(0,n.useState)(!0),[D,W]=(0,n.useState)(null),{whatmoreWidgetSourceDetails:M,whatmoreUserInfo:Q}=(0,n.useContext)(y.AppContext),H=M.landingLocationType,V=M.templateType,X=Math.round(.05*h);let Y=i;const{questionList:U}=(0,n.useContext)(x.p);function $(){O(!1)}function q(t){$(),setTimeout(()=>{o(t)},500)}function K(){(0,s.Xd)("whatmoreAllowAutoSlide")&&(A("right"),D.slideNext())}function G(t,e){A(e),function(t,e){D&&("left"===e?D.slidePrev():D.slideNext())}(0,e)}return(0,n.useEffect)(()=>{z(q)},[]),(0,n.useEffect)(()=>{if("horizontal"===_)return;const t=t=>{if("ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;const e=document.activeElement;e&&("INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName||e.isContentEditable)||!j&&D&&G(t,"ArrowLeft"===t.key?"left":"right")};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[_,j,D]),(0,S.jsx)(fi(),{isOpen:R,onRequestClose:$,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,S.jsx)(_i.A,{children:(0,S.jsxs)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:(0,et.YU)("#000000",13),touchAction:"pan-y",transform:"translateZ(0)",willChange:"transform"},onTouchStart:t=>{N(t)},onTouchEnd:t=>{if(j)return;const e=L(t);e&&G(0,e)},onWheel:t=>{j||B(t,t=>{G(0,t)})},children:[(0,S.jsx)(r.RC,{speed:300,threshold:X,slidesPerView:1,direction:_,modules:[l.s3,l.Jq,l.dK,l.FJ,l.AV],keyboard:{enabled:!0},initialSlide:i,loop:1!=e.length,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,allowSlideNext:!j,allowSlidePrev:!j,allowTouchMove:!1,onSwiper:t=>{W(t),(0,ot.kz)({userInteractionType:nt.O.EVENT_VIEW,widgetSourceDetails:M,event:e[T().activeIndex],productList:e[T().activeIndex].products})},onSlideChange:t=>{var i;f?w(!1):(C||b(!0),(0,ot.DG)({userInteractionType:nt.O.VIDEO_PLAYBACK,userInteractionMetadata:I.current,widgetSourceDetails:M,event:e[T().activeIndex],productList:e[T().activeIndex].products}),i=e[T().activeIndex],g||m||null===i||void 0===i||!i.event_id||(async()=>{const t=(0,jt.Wd)(H)+(0,jt.gf)(V)+(null!==i&&void 0!==i&&i.isRelatedEvent?"R":"E")+"_"+(null===i||void 0===i?void 0:i.event_id);(0,a.lB)(i),"index"===E?((0,Si.sendVideoViewEventToGA)(F,ji.TB,ji.Dk),(0,Ue.Ch)(i.event_id,i.products,ji.TB,ji.Dk,t,null===i||void 0===i?void 0:i.location,null===Q||void 0===Q?void 0:Q.userType)):E.startsWith("product")||"embed"===E?((0,Si.sendVideoViewEventToGA)(F,ji.DK,ji.K1),(0,Ue.Ch)(i.event_id,i.products,ji.DK,ji.K1,t)):E.startsWith("collection")?((0,Si.sendVideoViewEventToGA)(F,ji.Sx,ji.rz),(0,Ue.Ch)(i.event_id,i.products,ji.Sx,ji.rz,t)):((0,Si.sendVideoViewEventToGA)(F,ji.TB,ji.Dk),(0,Ue.Ch)(i.event_id,i.products,ji.TB,ji.Dk,t))})(),(0,ot.UM)({userInteractionType:nt.O.EVENT_VIEW,widgetSourceDetails:M,event:e[T().activeIndex],productList:e[T().activeIndex].products}))},children:[...Array(Math.min(e.length,3)).keys()].map(o=>(0,S.jsx)(r.qr,{virtualIndex:o,children:({isActive:o,isPrev:n,isNext:r,isVisible:l,isDuplicate:a})=>{const s=o?"activeIndex":n?"prevIndex":"nextIndex",c=T()[s];"activeIndex"==s&&(Y=Math.max(Y,c),0==c&&(Y=0));const u=(null===U||void 0===U?void 0:U.length)>0&&o&&l&&(c>i||Y<i&&c>0)&&c>=Y&&c%(0,d.uSp)(F)==i%(0,d.uSp)(F);return(0,S.jsx)(P.B,{direction:"column",height:window.innerHeight,justifyContent:"center",children:(0,S.jsx)(gi,{event:e[c],showQuestion:u,onBack:q,isPlaying:1==e.length||o&&l,isLast:!1,setLockSwiper:k,onVideoEndedCallback:K,progressUpdateCallback:t=>{I.current=t},showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,mode:"portrait",changeSlide:G})})}},"event-vertical-scroll-slide-"+o))}),e.length>1&&!j&&(0,d.kb)(F)&&"horizontal"===(0,d.br0)(F)&&"horizontal"===_?(0,S.jsx)(bi,{relativeBottomPercentage:"50%",width:v,handleClick:(t,e)=>{G(0,"down"==e?"right":"left")},fontSize:parseInt(.12*v)}):(0,S.jsx)(S.Fragment,{})]})})})};i(3997),i(9130),i(4669),i(9733),i(4365),i(7229),i(6042);const Ei=({children:t,customClass:e,show:i,closeCallback:n})=>o.createPortal((0,S.jsxs)("div",{className:`whatmore-landscape-modal whatmore-root ${e}`,style:{display:i?"block":"none"},children:[(0,S.jsx)("div",{className:"whatmore-landscape-modal-overlay",onClick:n}),(0,S.jsx)("div",{className:"whatmore-landscape-modal-content",children:t})]}),document.body);Ei.defaultProps={children:(0,S.jsx)("div",{children:"Empty Modal"}),customClass:"",show:!1,closeCallback:()=>!1};var Ti=Ei;i(1012);var Ai=function(t){var e,[i,o,u,p]=(0,c.A)();const[h]=(0,s.QN)("isInDesignMode"),[v]=(0,s.QN)("isDemoBrand"),[g,m]=(0,s.QN)("isFirstIndicatorRenderDone"),[f,w]=(0,n.useState)(0!=t.eventIndex),{setCloseClickComponent:C}=(0,n.useContext)(x.p),[b,j]=(0,n.useState)(!1),[k]=(0,s.QN)("whatmoreShopId"),[I]=(0,s.QN)("whatmoreLandingLocationType"),z=(0,s.Xd)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:_,whatmoreUserInfo:T}=(0,n.useContext)(y.AppContext),[A,N]=(0,n.useState)(!1),[L,B]=(0,n.useState)(null);function R(){N(!1)}const O=t.events,D=t.eventIndex,W=t.onBack,M=O.concat(O),Q=O.length,H=null===O||void 0===O||null===(e=O[0])||void 0===e?void 0:e.brand,V=(0,n.useRef)(0);function X(t){R(),setTimeout(()=>{W(t)},500)}function Y(){L&&!L.isEnd&&(0,s.Xd)("whatmoreAllowAutoSlide")&&L.slideNext()}(0,n.useEffect)(()=>(N(!0),()=>{}),[]),C(X);const $=_.landingLocationType,q=_.templateType,K=(0,n.useRef)({}),G=parseInt(Math.min(5,O.length)),Z=("90518552861"===k||"63512346790"===k)&&G>=5?{nextEl:".whatmore-swiper-button-next-event-click-view",prevEl:".whatmore-swiper-button-prev-event-click-view"}:G>=2;return(0,S.jsx)(Ti,{show:A,closeCallback:R,customClass:"whatmore-landscape-modal-swipe-view"+(G<5?" whatmore-nav":""),children:(0,S.jsxs)(P.B,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",alignItems:"center",backgroundColor:(0,et.YU)("#000000",13),children:[(0,S.jsx)(F.o,{children:(0,S.jsxs)(E.az,{height:"fit-content",width:p*G,position:("90518552861"===k||"63512346790"===k)&&G>=5?"relative":void 0,style:{"--whatmore-active-edge-offset":(G-1)*p/2+"px"},children:[("90518552861"===k||"63512346790"===k)&&G>=5&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("div",{className:"whatmore-swiper-button-prev-event-click-view"}),(0,S.jsx)("div",{className:"whatmore-swiper-button-next-event-click-view"})]}),(0,S.jsxs)(r.RC,{onInit:t=>{B(t),(0,ot.kz)({userInteractionType:nt.O.EVENT_VIEW,widgetSourceDetails:_,event:O[t.activeIndex],productList:O[t.activeIndex].products,ctaList:O[t.activeIndex].cta})},slidesPerView:G,centeredSlides:!0,allowTouchMove:!1,initialSlide:D,modules:[l.s3,l.Jq,l.t9,l.Vx,l.FJ,l.Ij,l.dK],keyboard:{enabled:!0,onlyInViewport:!1},navigation:Z,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*u),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:p*G,watchSlidesProgress:!0,onSlideChange:t=>{var e;f?w(!1):(g||m(!0),e=O[t.activeIndex],h||v||null===e||void 0===e||!e.event_id||(async()=>{const t=(0,jt.Wd)($)+(0,jt.gf)(q)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,a.lB)(e),"index"===I?((0,Si.sendVideoViewEventToGA)(k,ji.TB,ji.Dk),(0,Ue.Ch)(e.event_id,e.products,ji.TB,ji.Dk,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,Si.sendVideoViewEventToGA)(k,ji.DK,ji.K1),(0,Ue.Ch)(e.event_id,e.products,ji.DK,ji.K1,t)):I.startsWith("collection")?((0,Si.sendVideoViewEventToGA)(k,ji.Sx,ji.rz),(0,Ue.Ch)(e.event_id,e.products,ji.Sx,ji.rz,t)):((0,Si.sendVideoViewEventToGA)(k,ji.TB,ji.Dk),(0,Ue.Ch)(e.event_id,e.products,ji.TB,ji.Dk,t))})(),(0,ot.DG)({userInteractionType:nt.O.VIDEO_PLAYBACK,userInteractionMetadata:K.current,widgetSourceDetails:_,event:O[t.activeIndex],productList:O[t.activeIndex].products,ctaList:O[t.activeIndex].cta}),(0,ot.UM)({userInteractionType:nt.O.EVENT_VIEW,widgetSourceDetails:_,event:O[t.activeIndex],productList:O[t.activeIndex].products,ctaList:O[t.activeIndex].cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[O.length>2&&(0,S.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,S.jsx)(U,{onCloseCallback:W})}),M.slice(D,O.length+D).map((t,e)=>(0,S.jsx)(r.qr,{children:({isActive:t,isPrev:i,isNext:o,isVisible:n,isDuplicate:r})=>{if(t)return(0,S.jsx)(P.B,{direction:"column",height:u,width:1*p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,S.jsx)(E.az,{overflow:"hidden",sx:{borderRadius:"round"==z?"10px":"0px",borderWidth:(0,d.YcK)(k),borderColor:(0,d.Fwt)(k)},children:(0,S.jsx)(gi,{event:O[e%Q],onBack:X,isPlaying:!0,isLast:e%Q===O.length-1,setLockSwiper:j,widthFactor:1,heightFactor:1,onVideoEndedCallback:Y,progressUpdateCallback:t=>{K.current=t},showCloseOverlay:(null===O||void 0===O?void 0:O.length)<=2,mode:"landscape"})})});if(o)return(0,S.jsx)(P.B,{direction:"column",height:u,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{L.slideTo(e%Q,300)},children:(0,S.jsx)(E.az,{overflow:"hidden",sx:{borderRadius:"round"==z?"10px":"0px",borderWidth:(0,d.YcK)(k),borderColor:(0,d.Fwt)(k)},children:(0,S.jsx)(gi,{event:O[e%Q],onBack:X,isPlaying:!1,isLast:e%Q===O.length-1,setLockSwiper:j,widthFactor:1,heightFactor:1,onVideoEndedCallback:Y,progressUpdateCallback:t=>{K.current=t},showOverlay:!1,mode:"landscape"})})});if(i&&1===V.current)return(0,S.jsx)(P.B,{direction:"column",height:u,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{L.slideTo(e%Q,300)},children:(0,S.jsx)(E.az,{overflow:"hidden",sx:{borderRadius:"round"==z?"10px":"0px",borderWidth:(0,d.YcK)(k),borderColor:(0,d.Fwt)(k)},children:(0,S.jsx)(gi,{event:O[e%Q],onBack:X,isPlaying:!1,isLast:e%Q===O.length-1,setLockSwiper:j,widthFactor:1,heightFactor:1,onVideoEndedCallback:Y,progressUpdateCallback:t=>{K.current=t},showOverlay:!1,mode:"landscape"})})});try{D+e>=Q-1&&(V.current=1)}catch(l){console.log(l)}return(0,S.jsx)(S.Fragment,{})}},"event-horizontal-scroll-slide"+t.event_id))]})]})}),(0,S.jsx)(F.o,{children:(0,S.jsx)(Qe,{brandName:H,height:.04*u,width:.1*p,fontSize:.02*u})})]})})},Ni=i(340),Pi=i(5089),Li=i(4958),Bi=i(572),Ri=i(8603);var Oi=function(t){const[e,i,o,n]=(0,c.A)(),[r]=(0,s.QN)("whatmorePrimaryColor"),[l]=(0,s.QN)("whatmoreSecondaryColor"),a="flex-end";return(0,S.jsx)(F.o,{children:(0,S.jsxs)(E.az,{width:n,height:o,backgroundColor:"whiteAlpha.200",backdropBlur:"10px",children:[(0,S.jsx)(P.B,{direction:"column",justifyContent:a,height:"full",width:"full",children:(0,S.jsx)(E.az,{borderRadius:"md",backgroundColor:"transparent",children:(0,S.jsx)(Ie.g,{width:"full",ratio:n/o,children:(0,S.jsx)(E.az,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+r+", gray, "+l+")"})})})}),(0,S.jsx)(P.B,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:a,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,S.jsx)(E.az,{padding:"2px",margin:"5px",borderRadius:"md",backgroundColor:"transparent",children:(0,S.jsx)(Ie.g,{width:"full",ratio:9/16,children:(0,S.jsx)(E.az,{width:"full",height:"full",borderRadius:"md",backdropFilter:"auto",backdropBlur:"5px"})})})})]})})};var Di=function(t){var e;const i=t.stories,o=t.onBack,l=t.onStoryCompleteCallback,u=t.isActive,p=null!==(e=t.initialEventIndex)&&void 0!==e?e:0,x=i.events;var[g,m,f,C]=(0,c.A)();const[b,j]=(0,v.A)(),[k]=(0,s.QN)("isInDesignMode"),[I]=(0,s.QN)("isDemoBrand"),[z]=(0,s.QN)("whatmoreShopId"),[_,F]=(0,n.useState)(!0),[E,T]=(0,s.QN)("isFirstIndicatorRenderDone"),[A,N]=(0,n.useState)(null),[L,B]=(0,n.useState)(!1),{whatmoreWidgetSourceDetails:R,whatmoreUserInfo:O}=(0,n.useContext)(y.AppContext),[D,W]=ki(p,x.length);function M(t){o(t)}const Q=R.landingLocationType,H=R.templateType;function V(){if(!(0,s.Xd)("whatmoreAllowAutoSlide"))return;D().activeIndex+1>=x.length?l("right"):(W("right"),A&&A.slideNext())}function X(t){const e=D().activeIndex;"right"==t&&e+1>=x.length||"left"==t&&e-1<0?l(t):(W(t),A&&("left"==t?A.slidePrev():A.slideNext()))}const Y=(0,n.useRef)({});return x[D().activeIndex],(0,S.jsx)("div",{children:(0,S.jsx)(r.RC,{speed:1,slidesPerView:1,direction:"horizontal",initialSlide:0,loop:!0,height:f,width:C,watchSlidesProgress:!0,allowTouchMove:!1,onSwiper:t=>{N(t)},onSlideChange:t=>{_?F(!1):(E||T(!0),(0,ot.DG)({userInteractionType:nt.O.VIDEO_PLAYBACK,userInteractionMetadata:Y.current,widgetSourceDetails:R,event:x[D().activeIndex],productList:x[D().activeIndex].products,ctaList:x[D().activeIndex].cta}),function(t){const e=(0,jt.Wd)(Q)+(0,jt.gf)(H)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);k||I||(async()=>{(0,a.lB)(t),(0,Si.sendVideoViewEventToGA)(z,ji.TB,ji.OL),(0,Ue.Ch)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===O||void 0===O?void 0:O.userType)})()}(x[D().activeIndex]),(0,ot.kz)({userInteractionType:nt.O.EVENT_VIEW,widgetSourceDetails:R,event:x[D().activeIndex],productList:x[D().activeIndex].products,ctaList:x[D().activeIndex].cta}))},children:[...Array(Math.min(x.length,3)).keys()].map(e=>(0,S.jsx)(r.qr,{children:({isActive:e,isPrev:o,isNext:n,isVisible:r,isDuplicate:l})=>{if(u){const n=e?"activeIndex":o?"prevIndex":"nextIndex",l=x[D()[n]];return(0,S.jsx)(P.B,{direction:"column",height:f,justifyContent:"center",children:(0,h.i)(l)||(0,h.I)(l)?(0,S.jsx)(ui,{event:l,totalSiblingEvents:x.length,indexAmongSiblings:D()[n],onBack:M,isPlaying:u&&e&&r,isLast:!1,setLockSwiper:B,onVideoEndedCallback:V,progressUpdateCallback:t=>{Y.current=t},leftOpenSpaceClickHandler:()=>{X("left")},midOpenSpaceClickHandler:()=>{!0!==(0,d.GZ2)((0,s.Xd)("whatmoreShopId"))&&j(!b)},rightOpenSpaceClickHandler:()=>{X("right")},storyId:i.id,source:w.N.STORY_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+l.event_id):(0,S.jsx)(S.Fragment,{})})}return(0,S.jsx)(P.B,{direction:"column",height:g,justifyContent:"center",children:(0,S.jsx)(Oi,{})})}},"event-story-view-slide-"+e))})})};var Wi=function(t){const e=t.onBack,i=t.eventsStories,o=t.initialStoryIndex,[d]=(0,s.QN)("isInDesignMode"),[c]=(0,s.QN)("isDemoBrand"),[u,p]=(0,n.useState)(!0),{setCloseClickComponent:h}=(0,n.useContext)(x.p),[v]=(0,s.QN)("whatmoreShopId"),[g,m]=ki(o,i.length),[f,w]=Ii("horizontal",50),[C]=zi("vertical",30),b=t.eventIndex,[j,k]=(0,n.useState)(!0),[I,z]=(0,n.useState)(null),{whatmoreWidgetSourceDetails:_,whatmoreUserInfo:F}=(0,n.useContext)(y.AppContext);function E(){k(!1)}function T(t){E(),setTimeout(()=>{e(t)},500)}h(T);const A=_.landingLocationType,N=_.templateType;function L(t){I&&(0,s.Xd)("whatmoreAllowAutoSlide")&&(m(t),"right"==t?I.slideNext():I.slidePrev())}function B(t,e){L(e)}return(0,S.jsx)(fi(),{isOpen:j,onRequestClose:E,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,S.jsx)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:"#00000088"},onTouchStart:t=>{f(t)},onTouchEnd:t=>{const e=w(t);e&&B(0,e)},onWheel:t=>{C(t,t=>{B(0,t)})},children:(0,S.jsx)(r.RC,{speed:1,slidesPerView:1,direction:"horizontal",modules:[l.s3,l.Jq,l.hw,l.FJ],keyboard:{enabled:!0},initialSlide:o,loop:i.length>1,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,onSwiper:t=>{var e,o;z(t),(0,ot.kz)({userInteractionType:nt.O.EVENT_VIEW,widgetSourceDetails:_,event:i[g().activeIndex].events[0],productList:null===(e=i[g().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(o=i[g().activeIndex].events[0])||void 0===o?void 0:o.cta})},onSlideChange:t=>{var e,o;u?p(!1):(!function(t){const e=(0,jt.Wd)(A)+(0,jt.gf)(N)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);d||c||(async()=>{(0,a.lB)(t),(0,Si.sendVideoViewEventToGA)(v,ji.TB,ji.OL),(0,Ue.Ch)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===F||void 0===F?void 0:F.userType)})()}(i[g().activeIndex].events[0]),(0,ot.kz)({userInteractionType:nt.O.EVENT_VIEW,widgetSourceDetails:_,event:i[g().activeIndex].events[0],productList:null===(e=i[g().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(o=i[g().activeIndex].events[0])||void 0===o?void 0:o.cta}))},allowTouchMove:!1,cubeEffect:{shadow:!0,slideShadows:!0,shadowOffset:20,shadowScale:.94},children:[...Array(Math.min(i.length,3)).keys()].map(t=>(0,S.jsx)(r.qr,{children:({isActive:t,isPrev:e,isNext:n,isVisible:r,isDuplicate:l})=>{const a=t?"activeIndex":e?"prevIndex":"nextIndex";return(0,S.jsx)(P.B,{direction:"column",height:window.innerHeight,justifyContent:"center",children:(0,S.jsx)(Di,{stories:i[g()[a]],onBack:T,isActive:t&&r,isNext:n,isPrev:e,onStoryCompleteCallback:L,nextStories:i[g().nextIndex],prevStories:i[g().prevIndex],initialEventIndex:o==g()[a]?b:0},"event-story-view-"+i[g()[a]].id)})}},"event-vertical-scroll-slide-"+t))})})})};var Mi=function(t){var e,i,o,[r,l,a,d]=(0,c.A)();const[u]=(0,s.QN)("whatmorePrimaryColor"),[p]=(0,s.QN)("whatmoreSecondaryColor"),v=t.event,x=(t.onBack,n.useRef(),null!==(e=t.showPausedVideo)&&void 0!==e&&e),g=null!==(i=t.heightFactor)&&void 0!==i?i:1,m="flex-end";return d*=null!==(o=t.widthFactor)&&void 0!==o?o:1,a*=g,(0,S.jsx)(F.o,{children:(0,S.jsxs)(E.az,{width:d,height:a,children:[(0,S.jsx)(P.B,{direction:"column",justifyContent:m,height:"full",width:"full",children:(0,S.jsx)(E.az,{children:(0,S.jsx)(Ie.g,{width:"full",ratio:9/16,children:x?(0,h.i)(v)||(0,h.I)(v)?(0,S.jsx)(He.A,{height:"100%",width:"100%",url:v.thumbnail_image,isPlaying:!1,pauseFromPlayTimeInMs:1e3,event:v}):(0,S.jsx)(R._,{width:"full",height:"full",src:v.thumbnail_image,objectFit:"cover",borderRadius:"lg"}):(0,S.jsx)(E.az,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+u+", gray, "+p+")"})})})}),(0,S.jsx)(P.B,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:m,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,S.jsx)(E.az,{children:(0,S.jsx)(Ie.g,{width:"full",ratio:9/16,children:(0,S.jsx)(E.az,{width:"full",height:"full",backgroundColor:"blackAlpha.400"})})})})]})})};var Qi=function(t){var e,i,[o,d,u,p]=(0,c.A)();const[h]=(0,s.QN)("isInDesignMode"),[v]=(0,s.QN)("isDemoBrand"),[g,m]=(0,s.QN)("isFirstIndicatorRenderDone"),[f,w]=(0,n.useState)(0!=t.eventIndex),{setCloseClickComponent:C}=(0,n.useContext)(x.p),[b,j]=(0,n.useState)(!1),[k]=(0,s.QN)("whatmoreShopId"),{whatmoreWidgetSourceDetails:I,whatmoreUserInfo:z}=(0,n.useContext)(y.AppContext),[_,T]=(0,n.useState)(!1),[A,N]=(0,n.useState)(null);function L(){T(!1)}t.events;const B=t.eventIndex,R=t.onBack,O=t.eventsStories,D=t.initialStoryIndex,W=null===(e=O[0])||void 0===e||null===(i=e.events[0])||void 0===i?void 0:i.brand;function M(t){L(),setTimeout(()=>{R(t)},500)}(0,n.useEffect)(()=>(T(!0),()=>{}),[]),C(M);const Q=I.landingLocationType,H=I.templateType;function V(t){A&&!A.isEnd&&("right"==t?A.slideNext():A.slidePrev())}const X=parseInt(Math.min(5,O.length));return(0,S.jsx)(Ti,{show:_,closeCallback:L,customClass:"whatmore-landscape-modal-stories-view",children:(0,S.jsxs)(P.B,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",alignItems:"center",backgroundColor:"blackAlpha.800",children:[(0,S.jsx)(F.o,{children:(0,S.jsx)(E.az,{height:"fit-content",width:p*X,children:(0,S.jsxs)(r.RC,{onInit:t=>{var e,i;N(t),(0,ot.kz)({userInteractionType:nt.O.EVENT_VIEW,widgetSourceDetails:I,event:O[t.activeIndex].events[0],productList:null===(e=O[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=O[t.activeIndex].events[0])||void 0===i?void 0:i.cta})},slidesPerView:X,centeredSlides:!0,allowTouchMove:!1,initialSlide:D,modules:[l.s3,l.Jq,l.t9,l.Vx,l.FJ],keyboard:{enabled:!0,onlyInViewport:!1},navigation:X>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*u),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:p*X,watchSlidesProgress:!0,onSlideChange:t=>{var e,i;f?w(!1):(g||m(!0),function(t){const e=(0,jt.Wd)(Q)+(0,jt.gf)(H)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);h||v||(async()=>{(0,a.lB)(t),(0,Si.sendVideoViewEventToGA)(k,ji.TB,ji.OL),(0,Ue.Ch)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===z||void 0===z?void 0:z.userType)})()}(O[t.activeIndex].events[0]),(0,ot.kz)({userInteractionType:nt.O.EVENT_VIEW,widgetSourceDetails:I,event:O[t.activeIndex].events[0],productList:null===(e=O[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=O[t.activeIndex].events[0])||void 0===i?void 0:i.cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[O.length>2&&(0,S.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,S.jsx)(U,{onCloseCallback:R})}),O.map((t,e)=>(0,S.jsx)(r.qr,{children:({isActive:i,isPrev:o,isNext:n,isVisible:r,isDuplicate:l})=>{if(i){const o=1;return(0,S.jsx)(P.B,{direction:"column",height:u,width:p*o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,S.jsx)(E.az,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,S.jsx)(Di,{stories:t,onBack:M,isActive:i&&r,isNext:!1,isPrev:!1,onStoryCompleteCallback:V,initialEventIndex:D==e?B:0,showCloseOverlay:(null===O||void 0===O?void 0:O.length)<=2},"event-story-view-"+t.id)})})}return o||n?(0,S.jsx)(P.B,{direction:"column",height:u,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{A.slideTo(e,300)},children:(0,S.jsx)(E.az,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,S.jsx)(Mi,{showPausedVideo:!0,event:O[e].events[0],onBack:M,isPlaying:!1,setLockSwiper:j})})}):(0,S.jsx)(S.Fragment,{})}},"event-horizontal-scroll-slide-"+e))]})})}),(0,S.jsx)(F.o,{children:(0,S.jsx)(Qe,{brandName:W,height:.04*u,width:.1*p,fontSize:.02*u})})]})})};const Hi=(0,Ri.A)({key:"whatmore-css-sv"});var Vi=function(t){var e,i,r;const[l,a]=(0,n.useState)(!1),[c,u,p]=(0,ri.A)(),[h]=(0,s.QN)("whatmoreShopId"),{whatmoreRootId:v}=(0,n.useContext)(y.AppContext),{whatmoreIsStoriesTemplate:g}=(0,n.useContext)(y.AppContext),[m]=(0,s.QN)("isWhatmorePreviewMode");var f=t.events,w=t.index,C=t.onBack,b=t.eventsStories,j=t.initialStoryIndex,k=(0,d.M3_)(h);(0,n.useEffect)(()=>{if(!C)return;const t=t=>{"Escape"!==t.key&&"Esc"!==t.key||C()};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[C]),(0,n.useEffect)(()=>{const t=setTimeout(()=>{a(!0)},100);return()=>clearTimeout(t)},[]);var I="portrait"===c?null!==(e=t.slideDirection)&&void 0!==e?e:"vertical":null!==(i=t.slideDirection)&&void 0!==i?i:f.length>1?"horizontal":"vertical",z="portrait"===c?!(0,d.kb)(h)&&!g:(0,d.DNc)(h);if((0,n.useLayoutEffect)(()=>{if(!(0,d.hpk)(h))return;let t=!1;window.location.href.includes(k)?history.replaceState(null,"","#"+k):(history.pushState(null,"","#"+k),t=!0);const e=()=>{window.location.href.includes(k)||C()};return window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e),window.location.href.includes(k)&&(t?history.back():history.replaceState(null,"",window.location.pathname+window.location.search))}},[]),delete Pi.Ay.styles.global,!l&&"portrait"===c){var _,F;const t=g&&b&&null!==j?null===(_=b[j])||void 0===_||null===(F=_.events)||void 0===F?void 0:F[0]:f[w];return(0,o.createPortal)((0,S.jsx)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#000",zIndex:2147483647},children:(0,S.jsxs)("div",{style:{width:p,height:u,overflow:"hidden",position:"relative"},children:[(0,S.jsx)("img",{src:(null===t||void 0===t?void 0:t.poster_image)||(null===t||void 0===t?void 0:t.thumbnail_image),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"}}),(0,S.jsx)("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},children:(0,S.jsx)(Li.A,{})})]})}),document.body)}return g?(0,S.jsx)(Bi.C,{value:Hi,children:(0,S.jsx)(Ni.s,{theme:Pi.Ay,cssVarsRoot:v,resetCSS:!1,children:(0,S.jsx)(x.p.Provider,{value:{isIOS:(0,pi.MN)(),totalEvents:f.length,closeClickComponent:C,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:I,showSwipeIndicator:z},children:("portrait"!==c||m)&&(0,d.Rdb)(h)?(0,S.jsx)(Qi,{eventsStories:b,initialStoryIndex:j,onBack:C,eventIndex:w}):(0,S.jsx)(Wi,{eventsStories:b,initialStoryIndex:j,onBack:C,eventIndex:w})})})}):(0,S.jsx)(Bi.C,{value:Hi,children:(0,S.jsx)(Ni.s,{theme:Pi.Ay,cssVarsRoot:v,resetCSS:!1,children:(0,S.jsx)(x.p.Provider,{value:{isIOS:(0,pi.MN)(),totalEvents:f.length,closeClickComponent:C,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:I,showSwipeIndicator:z,questionList:(0,d.JwJ)(h)?null===(r=JSON.parse(localStorage.getItem("_whatmore_brand_questions")))||void 0===r?void 0:r.questionList:[]},children:"portrait"===c?(0,S.jsx)(Fi,{events:f,eventIndex:w,onBack:C}):(0,S.jsx)(Ai,{events:f,eventIndex:w,onBack:C})})})})}},9408:function(t,e,i){i.r(e),i.d(e,{default:function(){return y}});var o=i(3247),n=i(1422),r=i(3731),l=i(6086),a=i(9810),d=i(9950),s=i(7483),c=i(140);var u=i(5144),p=i(4905),h=i(314),v=i(1348),x=i(8149),g=i(1592),m=i(1351),f=i(6157),w=i(4414);function C(t){var e;const[i]=(0,s.QN)("whatmoreSecondaryColor"),[d]=(0,s.QN)("whatmorePrimaryFont"),c=null!==(e=t.baseFontSize)&&void 0!==e?e:10,u=t.width,p=t.height;return(0,w.jsx)(o.az,{width:u,height:p,padding:"0px",boxShadow:"lg",borderRadius:"md",backgroundColor:"white",borderColor:i,borderWidth:"1px",children:(0,w.jsxs)(n.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"2px",justifyContent:"center",children:[(0,w.jsxs)(r.E,{color:i,fontSize:1.3*c,fontWeight:"semibold",sx:{fontFamily:d+" !important"},children:["\xa0"," In Cart ","\xa0"]}),(0,w.jsx)(l.o,{paddingX:"5px",children:(0,w.jsx)(a.A,{sx:{color:i,fontSize:1.5*c}})})]})})}var y=function(t){var e,i,a,y;const[b]=(0,s.QN)("whatmorePrimaryFont"),[j]=(0,s.QN)("isInDesignMode"),[S]=(0,s.QN)("isDemoBrand"),[k,I]=(0,s.QN)("appCartData"),[z]=(0,s.QN)("whatmoreShopId"),[_]=[(0,v.Wc_)(z)],F=(0,v.Wc_)(z),[E,T]=(0,d.useState)(!1),[A,N]=(0,d.useState)({state:"initial"}),[P,L]=(0,d.useState)({loaded:!1,client_product_id:"",variant_id:"",variant_price:""}),{closeClickComponent:B}=(0,d.useContext)(h.p),{whatmoreWidgetSourceDetails:R}=(0,d.useContext)(g.AppContext),O=t.event,D=t.product,W=null!==(e=t.baseFontSize)&&void 0!==e?e:10;function M(t,e,i){j||S||(async()=>{(0,c.tO)(t,e,i)})()}(0,d.useEffect)(()=>{!async function(){var t,e,i,o;const n=await(0,x.M)(D,(0,v.NCy)(z),z);L({loaded:!0,client_product_id:D.client_product_id,variant_id:null===n||void 0===n||null===(t=n.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.id,variant_price:null===n||void 0===n||null===(i=n.variants)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.price})}()},[]);const Q=null!==(i=t.width)&&void 0!==i?i:"fit-content",H=null!==(a=t.height)&&void 0!==a?a:"fit-content",V=(null!==(y=(0,v.FyB)(z))&&void 0!==y?y:2)+"px";return P.loaded?(0,w.jsx)("div",{style:{width:Q,height:H},children:(0,w.jsx)("a",{href:"javascript:void(0)","data-variant-id":P.variant_id,"data-action-atc":"",rel:"nofollow","aria-describedby":"a11y-external-message",children:(0,w.jsx)(p.$,{type:"submit",className:(0,v.AJI)(z),sx:{width:Q,height:H,minHeight:H},onClick:t=>{T(!0),M(O,D,1),(0,m.kz)({userInteractionType:f.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:R,event:O,productList:[D],ctaList:O.cta}),null!==B&&setTimeout(()=>{B()},2e3)},children:"initial"===A.state?(0,w.jsx)(o.az,{width:"100%",height:"100%",padding:V,boxShadow:"lg",borderRadius:"md",backgroundColor:F,borderColor:F,borderWidth:"1px",animation:E?u.jd:null,onAnimationEnd:()=>{T(!1)},children:(0,w.jsx)(n.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",children:(0,w.jsx)(l.o,{children:(0,w.jsxs)(r.E,{lineHeight:"100%",fontSize:1.3*W,fontWeight:"semibold",sx:{fontFamily:b+" !important",color:(0,v.Hfu)(z)+" !important"},children:["\xa0"," ADD TO CART ","\xa0"]})})})}):(0,w.jsx)(C,{event:O,product:D,baseFontSize:W,cartState:A,width:Q,height:H})})})}):(0,w.jsx)(w.Fragment,{})}}}]);