whatmore-react-assets 1.0.1405 → 1.0.1407
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -73,7 +73,7 @@
|
|
73
73
|
0% {
|
74
74
|
transform: translateY(100%);
|
75
75
|
}
|
76
|
-
`} 0.5s`,It=null===N||void 0===N||null===(e=N.options)||void 0===e?void 0:e.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))})),[kt,_t]=(0,n.useState)(-1!==It?null===(i=N.options)||void 0===i||null===(o=i[It])||void 0===o||null===(r=o.values)||void 0===r?void 0:r[0]:""),[Tt,Ft]=(0,n.useState)({});(0,n.useEffect)((()=>{-1!==It&&"whatmore"!==(0,c.Ipo)(jt)&&async function(){const t=await(0,lt.m3)(Z);Ft(t)}()}),[]);let Et=-1,Pt=-1!==It&&null!==Tt&&void 0!==Tt&&Tt.product&&(null===Tt||void 0===Tt||null===(l=Tt.product)||void 0===l||null===(a=l.images)||void 0===a?void 0:a.length)>=(null===Tt||void 0===Tt||null===(d=Tt.product)||void 0===d||null===(p=d.options)||void 0===p||null===(v=p[It])||void 0===v||null===(m=v.values)||void 0===m?void 0:m.length)?null===Tt||void 0===Tt||null===(f=Tt.product)||void 0===f||null===(w=f.images)||void 0===w?void 0:w.map((t=>{var e,i,n,o,r,l,a,d,s,c,u,h,p,v;const x=null===Tt||void 0===Tt||null===(e=Tt.product)||void 0===e||null===(i=e.options)||void 0===i?void 0:i.findIndex((t=>"Color"==(null===t||void 0===t?void 0:t.name)||"Colour"==(null===t||void 0===t?void 0:t.name)||"COLOR"==(null===t||void 0===t?void 0:t.name)));return{color:(null===t||void 0===t?void 0:t.variant_ids.length)>0?null===Tt||void 0===Tt||null===(n=Tt.product)||void 0===n||null===(o=n.options)||void 0===o||null===(r=o[x])||void 0===r||null===(l=r.values)||void 0===l?void 0:l[Math.min(++Et,(null===Tt||void 0===Tt||null===(a=Tt.product)||void 0===a||null===(d=a.options)||void 0===d||null===(s=d[It])||void 0===s||null===(c=s.values)||void 0===c?void 0:c.length)-1)]:null===Tt||void 0===Tt||null===(u=Tt.product)||void 0===u||null===(h=u.options)||void 0===h||null===(p=h[x])||void 0===p||null===(v=p.values)||void 0===v?void 0:v[Math.max(0,Et)],src:null===t||void 0===t?void 0:t.src}})):[],Ot=[];if("whatmore"==(0,c.Ipo)(jt)&&(null===N||void 0===N||null===(j=N.images)||void 0===j?void 0:j.length)>0){var zt;var Lt;if(-1!==(null===N||void 0===N||null===(zt=N.options)||void 0===zt?void 0:zt.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))}))))Ot=null===N||void 0===N||null===(Lt=N.images)||void 0===Lt?void 0:Lt.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc})))}return Et+1<(null===Tt||void 0===Tt||null===(y=Tt.product)||void 0===y||null===(C=y.options)||void 0===C||null===(S=C[It])||void 0===S||null===(I=S.values)||void 0===I?void 0:I.length)&&(Pt=[]),(0,x.jsxs)(s.kC,{sx:{"&::-webkit-scrollbar":{width:"0px"}},id:"whatmore-shopnow-view",position:"relative",maxHeight:"75vh",overflowY:"scroll",direction:"column",bg:"#FFF",height:"fit-content",opacity:"100%",borderTopRadius:"round"==(null===wt||void 0===wt?void 0:wt.whatmoreUITheme)?"xl":null,animation:St,children:[(0,x.jsx)(Ut,{setOpenShopNow:H,setLockSwiper:U,FONT_SIZE:K}),(0,x.jsx)(s.M5,{marginBottom:"10px",px:"20px",py:"5px",children:(0,x.jsx)(s.kC,{bg:"whiteAlpha.900",width:"fit-content",height:"fit-content",borderRadius:"round"==(null===wt||void 0===wt?void 0:wt.whatmoreUITheme)?"lg":null,overflow:"hidden",sx:{borderWidth:(0,c.alU)(jt),borderColor:(0,c.qPe)(jt)},children:(0,x.jsx)(s.kC,{width:"100%",children:(0,x.jsx)($t.P,{renderElement:t=>(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(s.xu,{width:M+"px",height:A+"px",children:(0,x.jsx)(g.Ee,{width:M+"px",height:A+"px",borderRadius:"round"==(null===wt||void 0===wt?void 0:wt.whatmoreUITheme)?"lg":null,src:(0,pt.s)(t.eventData.src,"&width=400&height=400"),alt:Z.handle,sx:{objectFit:(0,c.yOX)(jt)+" !important"},fallback:(0,x.jsx)(R.Z,{width:M+"px",height:A+"px",borderRadius:"round"==(null===wt||void 0===wt?void 0:wt.whatmoreUITheme)?"10px":"0px"})})})}),dataList:Pt.length>0&&!Pt.includes(null)?null===(k=Pt)||void 0===k?void 0:k.filter((t=>(null===t||void 0===t?void 0:t.color)==kt)):Ot.length>0?[null===(_=Ot)||void 0===_?void 0:_.find((t=>(null===t||void 0===t?void 0:t.color)==kt))]:null===N||void 0===N||null===(T=N.images)||void 0===T?void 0:T.map((t=>({src:t.includes("https")?t:"https:"+t}))),spacing:10,defaultHeight:M+"px",defaultWidth:A+"px",retainAlreadyRenderedElements:!0,isScroll:!0})})})}),(0,x.jsx)(Xt,{data:N,product:Z,PRODUCT_TILE_HEIGHT:D,PRODUCT_TILE_WIDTH:L,FONT_SIZE:K,getVariantPrice:te,selectedVariantId:it,itemPrice:dt,itemQuantity:ot,setItemQuantity:at,thumbnailImage:gt}),(null===N||void 0===N||null===(F=N.variants)||void 0===F?void 0:F.length)>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s.M5,{paddingTop:"4px",width:"100%",children:(0,x.jsx)(s.iz,{color:(0,c.W8U)(jt),size:"xs",width:"90%"})}),(0,x.jsx)(Gt,{data:N,dividerColor:(0,c.W8U)(jt),setSelectedColor:_t,finalArr:Pt,finalArrExternal:Ot,product:Z,PRODUCT_TILE_HEIGHT:D,PRODUCT_TILE_WIDTH:L,FONT_SIZE:K,selectOptionFirstHandler:yt,selectOptionSecondHandler:Ct,selectOptionThirdHandler:bt,getVariantPrice:te,selectedOptionFirst:G,selectedOptionSecond:Q,selectedOptionThird:tt,selectedVariantId:it,isVariantAvailable:X})]}),c.$2G&&((null===N||void 0===N?void 0:N.description)||(null===N||void 0===N?void 0:N.body_html))&&(0,x.jsx)(Bt,{PRODUCT_TILE_HEIGHT:D,FONT_SIZE:K,data:N,handleToggle:()=>q(!W),show:W}),(0,x.jsx)(s.xu,{sx:{pointerEvents:"none"},paddingTop:"20px",opacity:0,children:(0,x.jsx)(Ht,{position:"relative",data:N,FONT_SIZE:K,product:Z})}),(0,x.jsx)(Ht,{position:"fixed",selectedVariantId:it,data:N,FONT_SIZE:K,PRODUCT_TILE_WIDTH:L,product:Z,itemQuantity:ot,cartItemCount:ct,addToCartFlag:ht,setAddToCartFlag:vt,soldOutFlag:xt,setSoldOutFlag:mt,event:V})]})}const Jt=(t,e,i,n)=>{var o;if(!e&&!i&&!n)return;const r=null===t||void 0===t||null===(o=t.variants)||void 0===o?void 0:o.find((t=>(!e||t.option1===e)&&(!i||t.option2===i)&&(!n||t.option3===n)));return r?r.id:void 0},te=(t,e)=>{var i,n;return null===t||void 0===t||null===(i=t.variants)||void 0===i||null===(n=i.find((t=>t.id===e)))||void 0===n?void 0:n.price},ee=(t,e)=>{var i;const n=null===t||void 0===t||null===(i=t.variants)||void 0===i?void 0:i.find((t=>t.id==e));return void 0===n?null:null===n||void 0===n||null===(o=n.featured_image)||void 0===o?void 0:o.src;var o},ie=(0,n.createContext)({setShowOptionsChart:null});var ne=function(t){const e=t.event,i=t.data,o=t.currentProduct,r=t.setOpenShopNow,l=t.setLockSwiper,[a,d]=(0,n.useState)(!1);return(0,x.jsx)(ie.Provider,{value:{setShowOptionsChart:d},children:(0,x.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[(0,x.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",children:(0,x.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,x.jsx)(Qt,{data:i,event:e,product:o,setOpenShopNow:r,setLockSwiper:l})})}),a?(0,x.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",style:{position:"relative",zIndex:1,bottom:"100%"},className:"whatmore-ios-css-relative-fix",id:"whatmore-size-chart",children:(0,x.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,x.jsx)(Wt,{data:i,event:e,product:o,setShowOptionsChart:()=>{d(!1)}})})}):(0,x.jsx)(x.Fragment,{})]})})};var oe=function(t){var e,[i,o,r,l]=(0,h.Z)();const[a,d]=(0,n.useState)(!1),[v,g]=(0,n.useState)(),[f,w]=(0,n.useState)(),j=(0,u.MO)("whatmoreShopId"),y=t.event,C=t.onBack,b=n.useRef(),S=t.isPlaying,I=t.isLast,k=t.setLockSwiper,_=t.selectedVariantId,T=null===(e=t.showOverlay)||void 0===e||e,F="center";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:l,height:r,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:F,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:l/r,children:(0,x.jsx)(m,{height:"100%",width:"100%",url:y.event_hls_url,isPlaying:S,event:y})})})}),T?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:F,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(At,{focusRef:b,event:t.event,isLast:I,onCloseCallback:C,productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(j),j);w(t),g(e),d(!0),k(!0)}})})}):(0,x.jsx)(x.Fragment,{}),!0===a?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:F,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(ne,{focusRef:b,event:t.event,isLast:I,onCloseCallback:()=>C(),setLockSwiper:k,data:v,currentProduct:f,setOpenShopNow:d,selectedVariantId:_})})}):(0,x.jsx)("div",{})]})})};const re=function(t,e){return isNaN(t)||isNaN(e)||e<=0||t>e?0:Math.ceil(t/e*100)};function le(t){var e,i,[n,o,r,l]=(0,h.Z)();const[a]=(0,u.j1)("whatmoreSecondaryColor"),[d]=(0,u.j1)("whatmoreSecondaryColorShade900"),c=t.progress,p=null!==(e=t.totalSiblings)&&void 0!==e?e:1,v=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0;return(0,x.jsx)(s.Kq,{width:"96%",height:"fit-content",direction:"row",justifyContent:"center",alignItems:"center",spacing:"1px",children:[...Array(p).keys()].map((t=>(0,x.jsx)(s.Kq,{width:"100%",height:.004*r+"px",backgroundColor:t<v?a:d+"99",borderRightRadius:"lg",borderLeftRadius:"lg",direction:"row",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",sx:{display:"block !important"},children:t==v?(0,x.jsx)(s.xu,{height:"100%",width:c+"%",bgColor:a,borderRightRadius:"lg",borderLeftRadius:"lg",sx:{display:"block !important"}}):(0,x.jsx)(x.Fragment,{})},"event-progress-bar-slab-"+t)))})}var ae=i(868),de=i(2630);const se=t=>t>=1e3?(t/1e3).toFixed(1)+"k":t,ce=()=>"undefined"!==typeof window&&window.innerWidth>=1024;var ue=function(t){var e,i,o,r,a,d=t.whatmoreShareTemplateId;const p=t.whatmoreShareStoryId,v=t.whatmoreShareEventId,m=t.event,g=null===(e=t.showShareText)||void 0===e||e,f=null!==(i=t.shareButtonBottomMargin)&&void 0!==i?i:0,w=(0,u.MO)("whatmoreShopId"),j=(0,u.MO)("isInDesignMode"),y=(0,u.MO)("isDemoBrand"),C=(0,u.MO)("whatmorePrimaryFont"),b=(0,u.MO)("websiteLanguage"),{whatmoreWidgetSourceDetails:S}=(0,n.useContext)(V.I),[I,k,_,T]=(0,h.Z)(),F=null!==(o=t.iconSize)&&void 0!==o?o:.1*T*(0,c.r5f)(w);function E(){const e=(0,u.MO)("whatmoreLandingLocationType");var i;!function(t){j||y||(async()=>{(0,l.x0)(t)})()}(m),(e.startsWith("product")||"embed"===e)&&(d="te"),i="event_product_link"===(0,c.EEC)(w)?m.products[0].product_link||"":window.location.pathname,i=("event_product_link"===(0,c.EEC)(w)?"":window.location.hostname)+i+"?wtt="+d+"&wsid="+p+"&weid="+v,(0,c.lj5)(w)&&(i=i+"&"+(0,c.awP)(w)+"&utm_campaign=video-share&utm_medium="+e);const n={title:(0,c.JNF)(w),text:`${(0,c.Qa8)(w)} \n ${i} ${(0,c.AWG)(w)?"\n \n -via Whatmore":""}`};navigator.share&&!ce?navigator.share(n):(t.setIsModalOpen(!0),t.setShareText([n,i]))}return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{cursor:"pointer",style:{marginBottom:f+"px"},children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[(0,x.jsx)(de.Z,{sx:{boxShadow:3,transform:"scaleX(-1)",color:"white",fontSize:F,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),E(),(0,q.GF)({userInteractionType:N.K.VIDEO_SHARE_CTA_CLICKED,widgetSourceDetails:S,event:m,productList:m.products,ctaList:m.cta})}}),g&&(0,c.u8S)(w)?(0,x.jsxs)(s.xv,{fontSize:.3*F+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:C+" !important",color:"white !important",paddingRight:"10%",maxWidth:"48px",wordWrap:"break-word"},children:["\xa0",m.total_share>(0,c.LWl)(w)?se(m.total_share):null!==(r=null===Q||void 0===Q||null===(a=Q[b])||void 0===a?void 0:a.share)&&void 0!==r?r:"Share","\xa0"]}):(0,x.jsx)(x.Fragment,{})]})})})},he=i(7933),pe=i(2785);var ve=function(t){var e,i,o;const r=(0,u.MO)("whatmoreShopId"),a=(0,u.MO)("whatmorePrimaryFont"),d=(0,u.MO)("whatmoreLikedEvents"),p=(0,u.MO)("isInDesignMode"),v=(0,u.MO)("isDemoBrand"),m=(0,u.MO)("websiteLanguage"),{whatmoreWidgetSourceDetails:g}=(0,n.useContext)(V.I),f=t.event,[w,j]=(0,n.useState)(null!==(e=d[f.event_id])&&void 0!==e&&e),[y,C,b,S]=(0,h.Z)(),I=.1*S*(0,c.r5f)(r);function k(t,e){p||v||(async()=>{(0,l.Z6)(t,e)})()}function _(){(0,u.bU)("whatmoreLikedEvents",{...d,[f.event_id]:!w}),w?(k(f,-1),(0,q.GF)({userInteractionType:N.K.VIDEO_UNLIKED,widgetSourceDetails:g,event:f,productList:f.products,ctaList:f.cta})):(k(f,1),(0,q.GF)({userInteractionType:N.K.VIDEO_LIKED,widgetSourceDetails:g,event:f,productList:f.products,ctaList:f.cta})),j(!w)}const T=f.total_like+(w?1:0);return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{cursor:"pointer",children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[w?(0,x.jsx)(pe.Z,{sx:{boxShadow:3,color:(0,c.dmX)(r),fontSize:I,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),_()}}):(0,x.jsx)(he.Z,{sx:{boxShadow:3,color:"white",fontSize:I,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),_()}}),(0,x.jsx)(x.Fragment,{children:(0,c.CEM)(r)?(0,x.jsxs)(s.xv,{fontSize:.3*I+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:a+" !important",color:"white !important",position:"relative",bottom:"5px"},children:["\xa0",T>=(0,c.zKg)(r)?se(T):null!==(i=null===Q||void 0===Q||null===(o=Q[m])||void 0===o?void 0:o.like)&&void 0!==i?i:"Like","\xa0"]}):(0,x.jsx)(x.Fragment,{})})]})})})};const xe=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#25D366",borderRadius:"50%",padding:.3*e},children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"white",class:"bi bi-whatsapp",viewBox:"0 0 16 16",children:(0,x.jsx)("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})})})};var me=i(8866);const ge=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-twitter-x",viewBox:"0 0 16 16",children:(0,x.jsx)("path",{d:"M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865z"})})})},fe=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-copy",viewBox:"0 0 16 16",children:(0,x.jsx)("path",{"fill-rule":"evenodd",d:"M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z"})})})};var we=t=>{const e=t.shareText,[i,o]=(0,n.useState)("Copy link"),[r,l]=(0,n.useState)("");return(0,x.jsx)(x.Fragment,{children:t.isModalOpen&&(0,x.jsxs)("div",{className:"modal-overlay",style:{backgroundColor:"white",borderRadius:"10px",padding:"12px 12px 20px 12px"},children:[(0,x.jsxs)("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",paddingBottom:"6px"},children:[(0,x.jsx)("img",{onClick:()=>{window.location.href="https://www.whatmore.ai"},src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",backgroundColor:"transparent",borderRadius:"0px",width:Math.min(t.iconSize,28)+"px"}}),(0,x.jsx)(Kt.Z,{onClick:e=>{e.stopPropagation(),t.setIsModalOpen(!1)}})]}),(0,x.jsx)("div",{}),(0,x.jsx)(s.iz,{color:"blackAlpha.500",size:"1px",width:"100%"}),(0,x.jsxs)("div",{className:"social-icons",style:{display:"flex",gap:"20px",justifyContent:"center",paddingTop:"12px"},children:[(0,x.jsxs)("div",{onClick:t=>{var i;t.stopPropagation();const n=encodeURIComponent(null===(i=e[0])||void 0===i?void 0:i.text);window.open(`https://wa.me/?text=${n}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(xe,{iconSize:Math.min(t.iconSize,30)}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"Whatsapp"})]}),(0,x.jsxs)("div",{onClick:t=>{var i;t.stopPropagation();const n=encodeURIComponent(null===(i=e[0])||void 0===i?void 0:i.text);window.open(`https://twitter.com/intent/tweet?text=${n}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(ge,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"X"})]}),(0,x.jsxs)("div",{onClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(e[1]),o("Link copied"),l("green")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(fe,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14),color:r},children:i})]})]})]})})};var je=function(t){var e,i;const n=null===(e=t.brandName)||void 0===e?void 0:e.replace(/\s+/g,"_"),o=(0,u.MO)("whatmorePrimaryFont"),r=(0,u.MO)("whatmoreShopId"),l=null!==(i=t.fontSize)&&void 0!==i?i:"8",[a]=(0,me.Z)(),d=`https://www.whatmore.ai/shoppable-videos?utm_source=${n}&utm_medium=referral&utm_campaign=${"landscape"===a?"customer_referral_desktop":"customer_referral_mobile"}`;return(0,x.jsx)(s.rU,{href:d,isExternal:!0,children:(0,c.XFt)(r)&&(0,x.jsxs)(s.Kq,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content",spacing:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,x.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",o,"important"),t.style.setProperty("font-size",1.1*l+"px","important"),t.style.setProperty("text-align","center","important"),t.style.setProperty("color","white"))},children:"powered by Whatmore"}),(0,x.jsx)(s.xu,{width:"10px"}),(0,x.jsx)("img",{src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",width:1.7*l,backgroundColor:"transparent",borderRadius:"0px"}})]})})},ye=i(4892),Ce=i(1195);var be=()=>(0,x.jsxs)(s.xu,{as:"svg",width:"46px",height:"46px",viewBox:"0 0 24 24",fill:"none",className:"tick-animation",marginBottom:"20px",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"11",stroke:"gray",strokeWidth:"2",fill:"none"}),(0,x.jsx)("path",{d:"M7 12l3 3 7-7",stroke:"gray",strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]});var Se=t=>{var e;const i={text:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.title,options:(null===t||void 0===t?void 0:t.options)||[]},[o,r]=(0,n.useState)(!1),[l,a]=(0,n.useState)(null),[d,c]=(0,n.useState)(null),u=(0,n.useRef)(null),h=(0,n.useContext)(V.I);return(0,n.useEffect)((()=>{if(o){const e=setTimeout((()=>{t.setIsQuestionVisible(!1)}),1e3);return()=>clearTimeout(e)}}),[o]),(0,n.useEffect)((()=>{!o&&u.current&&c(u.current.offsetHeight)}),[o]),(0,x.jsxs)(s.xu,{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",minWidth:"320px",width:"fit-content",bg:"white",borderRadius:"lg",boxShadow:"md",display:"flex",flexDirection:"column",maxWidth:"90%",maxHeight:"90%",overflowY:"visible",ref:u,height:d?`${d}px`:"auto",children:[(0,x.jsx)(s.xu,{position:"absolute",top:"-10px",right:"-10px",bg:"rgba(255, 255, 255, 0.8)",borderRadius:"full",padding:1,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:"10",onClick:()=>{var e;t.setIsQuestionVisible(!1),(0,q.GF)({userInteractionType:N.K.QUESTION_CLOSED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id},widgetSourceDetails:h})},children:(0,x.jsx)(Ce.Z,{})}),(0,x.jsx)(s.xu,{bg:"gray.700",borderTopRadius:"lg",py:3,px:6,display:"flex",flexDirection:"column",justifyContent:"center",width:"100%",children:(0,x.jsx)(s.X6,{py:6,as:"h2",textAlign:"center",style:{fontWeight:"bold",fontSize:"18px",color:"white"},children:null===i||void 0===i?void 0:i.text})}),(0,x.jsx)(s.xu,{flex:"1",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",py:5,px:6,width:"100%",children:o?(0,x.jsxs)(s.xu,{flex:"1",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",children:[(0,x.jsx)(be,{}),(0,x.jsx)(s.X6,{as:"h3",size:"md",color:"gray.700",fontWeight:"medium",textAlign:"center",mt:4,fontSize:"lg",children:"Thank you for your response!"})]}):(0,x.jsx)(s.Kq,{spacing:5,width:"100%",align:"center",children:i.options.map(((e,i)=>(0,x.jsx)(s.xu,{px:4,borderWidth:2,borderRadius:"md",cursor:"pointer",bg:l===e?"gray.200":"white",borderColor:l===e?"gray.400":"gray.200",_hover:{bg:"gray.200"},onClick:()=>(e=>{var i;a(e),r(!0),(0,q.GF)({userInteractionType:N.K.QUESTION_ANSWERED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(i=t.question)||void 0===i?void 0:i.id,response:e},widgetSourceDetails:h})})(e),transition:"background-color 0.2s, border-color 0.2s",display:"flex",alignItems:"center",width:"100%",children:(0,x.jsx)(s.xv,{py:5,color:"gray.800",children:e})},i)))})})]})},Ie=i(2586);var ke=t=>{var e,i;const[o,r]=(0,n.useState)(""),[l,a]=(0,n.useState)(""),[d,h]=(0,n.useState)(!1),[p,v]=(0,n.useState)(!1),m=(0,u.MO)("whatmoreShopId"),g=(0,u.MO)("whatmoreSecondaryColor"),f=(0,u.MO)("whatmorePrimaryFont"),w=null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.title,j=(0,n.useContext)(V.I),y=()=>{var e,i;(()=>{const{type:e}=(null===t||void 0===t?void 0:t.question)||{};return"number"===e?/^\d{10}$/.test(o):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o)})()?(h(!0),(0,q.GF)({userInteractionType:N.K.QUESTION_ANSWERED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id,response:o,type:"number"===(null===t||void 0===t||null===(i=t.question)||void 0===i?void 0:i.type)?"leadgen:number":"leadgen:email"},widgetSourceDetails:j})):a("Please enter valid contact info.")},C=()=>{var e;t.setIsQuestionVisible(!1),(0,q.GF)({userInteractionType:N.K.QUESTION_CLOSED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id},widgetSourceDetails:j})};return(0,x.jsx)(s.kC,{bg:g,p:"6%",borderRadius:"md",boxShadow:"md",width:"90vw",mx:"auto",minH:"40vh",maxH:"80vh",position:"fixed",top:"30%",left:"50%",transform:"translateX(-50%)",direction:"column",align:"center",justify:"center",zIndex:100,overflow:"hidden",children:d?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(s.xu,{textAlign:"center",color:"white",children:[(0,x.jsx)(s.xu,{fontSize:"2xl",fontWeight:"bold",children:"CONGRATULATIONS!"}),(0,x.jsx)(s.xu,{my:"4%",fontSize:"xl",children:"Claim Now"})]}),(0,x.jsx)(s.xu,{position:"absolute",top:"2%",right:"2%",zIndex:20,children:(0,x.jsx)(P.Z,{onCloseCallback:C})}),(0,x.jsxs)(s.xu,{position:"relative",width:"70%",onClick:()=>{const t=(0,c.dKN)(m);navigator.clipboard.writeText(t).then((()=>{v(!0),setTimeout((()=>{C()}),1e3),setTimeout((()=>v(!1)),2e3)}),(()=>{console.error("Failed to copy the coupon code")}))},cursor:"pointer",children:[(0,x.jsxs)(s.xu,{bg:"white",border:"2px dashed black",borderRadius:"md",p:"2%",display:"flex",alignItems:"center",justifyContent:"space-between",mt:"4%",children:[(0,x.jsx)(s.xu,{as:"span",fontWeight:"bold",color:"black",children:(0,c.dKN)(m)}),(0,x.jsx)(Ie.Z,{sx:{color:p?{whatmoreSecondaryColor:g}:"gray",cursor:"pointer",marginLeft:"2%"}})]}),p&&(0,x.jsx)(s.xu,{padding:"4%",position:"absolute",left:"50%",transform:"translateX(-50%)",bg:g,color:"white",fontSize:"12px",borderRadius:"md",px:"2%",py:"0.5%",textAlign:"center",children:"Copied!"})]})]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(s.xu,{textAlign:"center",color:"white",children:[(0,x.jsx)(s.xu,{children:(0,x.jsx)(s.xv,{fontFamily:f,fontSize:"22px",fontWeight:"bold",children:w})}),(0,x.jsx)(s.xu,{marginBottom:"10%",fontSize:"md",children:(0,c.ewB)(m)})]}),(0,x.jsx)(s.xu,{position:"fixed",top:"2%",right:"2%",zIndex:20,children:(0,x.jsx)(P.Z,{onCloseCallback:C})}),(0,x.jsxs)(s.kC,{mt:"4%",align:"center",direction:"column",width:"80%",children:[(0,x.jsx)(s.xu,{sx:{bg:"white",border:"2px solid #4A4A4A",borderRadius:"8px",paddingLeft:"4%",display:"flex",alignItems:"center",marginBottom:"6%",width:"100%",height:"auto",minH:"48px"},children:(0,x.jsx)("input",{fontFamily:f,type:"number"===(null===(i=t.question)||void 0===i?void 0:i.type)?"tel":"email",placeholder:t.placeholder,value:o,onChange:t=>{r(t.target.value),l&&a("")},onKeyDown:t=>{"Enter"===t.key&&y()},style:{fontSize:"1em",border:"none",outline:"none",width:"100%"}})}),l&&(0,x.jsx)(s.xv,{color:"red.500",mb:"4% !important",fontSize:"md",textAlign:"center",width:"100%",children:l}),(0,x.jsx)(s.xu,{as:"button",bg:"#D3D3D3",color:"#343434",borderRadius:"md",fontWeight:"bold",height:"35px",display:"flex",alignItems:"center",justifyContent:"center",onClick:y,width:"50%",children:(0,x.jsx)(s.xv,{fontFamily:f,fontSize:"0.8em",padding:"2%",color:g,children:"SUBMIT"})})]})]})})};var _e=t=>{const[e,i]=(0,n.useState)(null);return(0,x.jsx)(s.xu,{children:!e&&(0,x.jsx)(ke,{question:t.question,onEmailSubmit:t=>{i(t)},setIsQuestionVisible:t.setIsQuestionVisible,placeholder:t.placeholder})})};var Te=t=>{var e;const[i,o]=(0,n.useState)(null),r=t.questionIndex,l=t.questionList;if((0,n.useEffect)((()=>{if(!(r>=l.length))return()=>(0,ot.xw)()}),[]),r>=l.length)return;const a=null===l||void 0===l?void 0:l[r];return"string"===(null===a||void 0===a?void 0:a.type)||"number"===(null===a||void 0===a?void 0:a.type)?(0,x.jsx)(s.xu,{children:(0,x.jsx)(_e,{setIsQuestionVisible:t.setIsQuestionVisible,question:a,placeholder:"number"===(null===a||void 0===a?void 0:a.type)?"Enter your phone number":"Enter your email"})}):(0,x.jsx)(s.xu,{children:(0,x.jsx)(Se,{question:a,options:null===a||void 0===a||null===(e=a.answers)||void 0===e?void 0:e.values.map((t=>null===t||void 0===t?void 0:t.value)),onAnswerSelect:t=>{o(t)},selectedAnswer:i,onClose:()=>{t.setIsQuestionVisible(!1)},setIsQuestionVisible:t.setIsQuestionVisible})})},Fe=i(2882);function Ee(t){var e;const i=t.event,[o,r,l,a]=(0,h.Z)(),[d]=(0,u.j1)("whatmorePrimaryFont"),{whatmoreIsStoriesTemplate:p}=(0,n.useContext)(V.I),[v]=(0,u.j1)("whatmoreSecondaryColor"),[m]=(0,u.j1)("whatmoreShopId"),g=(0,c.f63)(m),f=null!==(e=(0,c.u2W)(m))&&void 0!==e?e:[v,g,v,g,v],w=(0,n.useRef)(null);(0,n.useEffect)((()=>{w.current&&w.current.play()}),[]);const j=(0,ae.V)(null===i||void 0===i?void 0:i.storyset_thumbnail_image);return(0,x.jsx)(x.Fragment,{children:p?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",padding:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-start",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{overflow:"hidden",size:.14*t.width+"px",sx:{boxShadow:"0px 2px 1px 0px "+f[0]+"50, 0px -2px 1px 0px "+f[1]+"50, 2px 0px 1px 0px "+f[2]+"50, -2px 0px 1px 0px "+f[3]+"80, 2px -2px 1px 0px "+f[4]+"80, -2px 2px 1px 0px "+f[0]+"DA, 2px 2px 1px 0px "+f[1]+"DA, -2px -2px 1px 0px "+f[2]+"DA"},children:"video"==(0,pt.$)(j)?(0,x.jsx)(ye.Z,{height:"100%",width:"100%",poster:null===i||void 0===i?void 0:i.thumbnail_image,url:j,isPlaying:!0,event:{event_type:"video"},borderRadius:"50%"}):(0,x.jsx)("img",{src:j,style:{objectFit:"cover",height:"100%",width:"100%",backgroundColor:"white"}})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:.05*t.width+"px",fontWeight:"medium",lineHeight:"100%",sx:{fontFamily:d+" !important",color:"white !important",textShadow:"0px 0px 4px black !important;"},children:i.storyset_name})})]})}):(0,x.jsx)(x.Fragment,{})})}var Pe=function(t){var e,i,o;const[r,a,d]=(0,me.Z)(),[p]=(0,u.j1)("isInDesignMode"),[v]=(0,u.j1)("isDemoBrand"),[m,g]=(0,u.j1)("isProductSwiperCatalogOpen"),[f,w]=(0,u.j1)("isFirstIndicatorRenderDone"),[j]=(0,u.j1)("whatmoreShopId"),C=(0,n.useContext)(fi),{whatmoreEventsBrowsingTemplate:b}=(0,n.useContext)(V.I),[S,I,k,_]=(0,h.Z)(),T=(0,u.MO)("whatmorePrimaryFont"),E=t.event,O=t.storySetId,z=t.isLast,L=t.onCloseCallback,D=t.focusRef,R=t.productClickHandler,A=t.videoPlayingData,K=t.totalSiblingEvents,W=t.indexAmongSiblings,Z=t.leftOpenSpaceClickHandler,H=t.midOpenSpaceClickHandler,U=t.rightOpenSpaceClickHandler,{whatmoreWidgetSourceDetails:B}=(0,n.useContext)(V.I),Y=.1*_,[X,G]=(0,n.useState)(!1),[$,Q]=(0,n.useState)([]),J=t=>{tt.current&&!tt.current.contains(t.target)&&G(!1)},tt=(0,n.useRef)(null);(0,n.useEffect)((()=>(X?document.addEventListener("click",J):document.removeEventListener("click",J),()=>{document.removeEventListener("click",J)})),[X]);const et="Free"==(0,c.Svj)(j)&&"portrait"==r;return(0,x.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[t.isQuestionVisible&&(0,x.jsx)(Lt.u,{userInteractionType:N.K.QUESTION_VIEWED,userInteractionMetadata:{questionId:null===(e=t.questionList)||void 0===e||null===(i=e[t.qIndex])||void 0===i?void 0:i.id},triggerFlag:!p&&!v,children:(0,x.jsx)(Te,{questionList:t.questionList,questionIndex:t.qIndex,setIsQuestionVisible:t.setIsQuestionVisible})}),X&&(0,x.jsx)("div",{ref:tt,className:"whatmore-share-modal",style:{zIndex:100,position:"absolute",boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.6)",width:"75%",top:"45%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},children:(0,x.jsx)(we,{shareText:$,setShareText:Q,iconSize:Y,isModalOpen:X,setIsModalOpen:G})}),(!t.isQuestionVisible||t.qIndex>=(null===t||void 0===t||null===(o=t.questionList)||void 0===o?void 0:o.length))&&(0,x.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,x.jsxs)(s.Kq,{width:"full",height:"fit-content",direction:"column",justifyContent:"flex-start",alignItems:"center",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:[C.showVideoPlayingData?(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",marginTop:"5px",justifyContent:"center",children:(0,x.jsx)(le,{progress:re(A.current_time,A.video_duration),totalSiblings:K,indexAmongSiblings:W})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{width:"full",margin:"2px",marginTop:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",paddingRight:"10px",paddingLeft:"10px",children:[(0,x.jsx)(Ee,{event:E,width:_}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,mt.ZK)(b)?(0,x.jsx)(ue,{whatmoreShareTemplateId:(0,mt.QN)(b),whatmoreShareStoryId:O,whatmoreShareEventId:E.event_id,event:E,showShareText:!1,iconSize:.07*_,shareButtonBottomMargin:6,setIsModalOpen:G,setShareText:Q}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(y,{focusRef:D}),("landscape"!==r||t.showCloseOverlay)&&(0,x.jsx)(P.Z,{event:E,onCloseCallback:L})]})]})})]}),"78232846646"===j&&"portrait"===r&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s.xu,{position:"absolute",top:.49*window.innerHeight+"px",left:.92*window.innerWidth+"px",transform:"translate(-50%, -50%)",zIndex:101,children:(0,x.jsx)(Fe.Z,{style:{fontSize:1.3*Y+"px",transform:"rotate(180deg)",color:"white",cursor:"pointer",filter:"drop-shadow(0 0 5px black)"},onClick:()=>{t.changeSlide(E,"right")}})}),(0,x.jsx)(s.xu,{position:"absolute",top:.42*window.innerHeight+"px",left:.92*window.innerWidth+"px",transform:"translate(-50%, -50%)",zIndex:101,children:(0,x.jsx)(Fe.Z,{style:{fontSize:1.3*Y+"px",color:"white",cursor:"pointer",filter:"drop-shadow(0 0 5px black)"},onClick:()=>{t.changeSlide(E,"left")}})})]}),(0,x.jsxs)(s.Kq,{width:"100%",height:"100%",direction:"row",justifyContent:"center",children:[(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{Z()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"34%",height:"100%",onClick:()=>{H()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{U()},sx:{display:"block !important"}})]}),(0,x.jsxs)(s.xu,{width:"full",height:"fit-content",children:[C.totalEvents>1&&!f&&C.showSwipeIndicator?(0,x.jsx)(s.xu,{width:"full",margin:"2px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,x.jsx)(M,{swipeUp:!z})})}):null,(0,x.jsxs)(s.xu,{width:"fit-content",height:"fit-content",position:"absolute",right:0,bottom:"25%",children:[(0,c.slY)(j)&&!(0,mt.ZK)(b)?(0,x.jsx)(s.xu,{ml:"auto",width:"fit-content",paddingY:"12px",paddingX:"8px",position:"relative",top:"-30px",children:(0,x.jsxs)(s.Kq,{gap:"4px",direction:"column",alignItems:"center",cursor:"pointer",onClick:function(){var t;p||v||(async()=>{(0,l.lY)(E,1)})(),(0,q.GF)({userInteractionType:N.K.WHATSAPP_ICON_CLICKED,widgetSourceDetails:B,event:E,productList:null===E||void 0===E?void 0:E.products,ctaList:null===E||void 0===E?void 0:E.cta});const e=E.products.map((t=>`${t.product_link} \n`)),i=(0,c.gtK)(j),n=`Hey, I am interested in ${E.products.length>1?"these products":"this product"} I saw on ${null===(t=E.products[0])||void 0===t?void 0:t.brand} store: \n${e}. Could you please help me with some queries?`;window.open(i+`&text=${n}&type=phone_number`,"_blank")},children:[(0,x.jsx)(xe,{iconSize:.7*Y,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)(s.xv,{fontSize:Y*(0,c.Xod)(j)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:T+" !important",color:"white !important"},children:(0,c.UiZ)(j)})]})}):(0,x.jsx)(x.Fragment,{}),(0,c.jY3)(j)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",position:"relative",top:"-30px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(ve,{event:E})})}):(0,x.jsx)(x.Fragment,{}),(0,c.ROU)(j)&&!(0,mt.ZK)(b)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",position:"relative",top:"-30px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(ue,{whatmoreShareTemplateId:(0,mt.QN)(b),whatmoreShareStoryId:O,whatmoreShareEventId:E.event_id,event:E,setIsModalOpen:G,setShareText:Q})})}):(0,x.jsx)(x.Fragment,{})]}),(0,zt.kT)(E)?(0,x.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(j)?(0,x.jsx)(s.xu,{w:"100%",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(F,{event:E,onToggle:t=>{g("minimize-button"!==t)}})})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,x.jsx)(Mt,{event:E,productClickHandler:R})})]}):(0,x.jsx)(x.Fragment,{})]}),et&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",bg:"rgba(52, 52, 52, 0.9)",py:"3px",justifyContent:"center",children:(0,x.jsx)(je,{brandName:null===E||void 0===E?void 0:E.brand,fontSize:.033*_})})]})]})},Oe=i(2279),ze=i.n(Oe),Le=i(342);var De=function(t){var e,i,o,r,l,a,[d,m,g,f]=(0,h.Z)();const[w,j]=(0,n.useState)(!1),[y,C]=(0,n.useState)(),[b,S]=(0,n.useState)(),[I,k]=(0,n.useState)({current_time:0,video_duration:0,is_video_ended:!1}),_=(0,u.MO)("whatmoreShopId"),T=t.event,F=t.storyId,E=t.onBack,P=n.useRef(),O=t.changeSlide,z=t.isPlaying,L=t.isLast,D=t.setLockSwiper,M=t.onVideoEndedCallback,R=t.progressUpdateCallback,A=null!==(e=t.totalSiblingEvents)&&void 0!==e?e:0,K=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0,W=null===(o=t.showOverlay)||void 0===o||o,Z=null!==(r=t.leftOpenSpaceClickHandler)&&void 0!==r?r:()=>{},H=null!==(l=t.midOpenSpaceClickHandler)&&void 0!==l?l:()=>{},U=null!==(a=t.rightOpenSpaceClickHandler)&&void 0!==a?a:()=>{},{whatmoreWidgetSourceDetails:B}=(0,n.useContext)(V.I),{questionList:Y}=(0,n.useContext)(fi),X=(null===Y||void 0===Y?void 0:Y.length)>0?parseInt(localStorage.getItem("_whatmore_qview_index")):1e4,[G,$]=(0,n.useState)();(0,n.useEffect)((()=>{$(t.showQuestion)}),[t.showQuestion]);const Q="center";let J;try{J=ze()((()=>{M()}),1e3,{leading:!0,trailing:!1})}catch(tt){console.log(tt)}return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:f,height:g,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:Q,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:f/g,children:(0,x.jsx)(v.Z,{height:"100%",width:"100%",url:(0,ae.V)((0,Le.uv)(T)),isPlaying:z&&(!G||X>=Y.length),timeUpdateCallback:function(t,e){const i=re(t,e);R({watch_time:t,video_duration:e});const n=I.is_video_ended;i>=99&&z&&!n?(J(),k({current_time:t,video_duration:e,is_video_ended:!0})):k({current_time:t,video_duration:e,is_video_ended:n})},event:T,question:G&&X<(null===Y||void 0===Y?void 0:Y.length),source:t.source})})})}),W?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:Q,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(Pe,{focusRef:P,event:t.event,isLast:L,onCloseCallback:t=>{E(t),(0,q.Z2)({userInteractionType:N.K.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:I.current_time,video_duration:I.video_duration},widgetSourceDetails:B,event:T,productList:T.products,ctaList:T.cta})},productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(_),_);S(t),C(e),j(!0),D(!0),(0,q.GF)({userInteractionType:N.K.SHOPNOW_CLICKED,widgetSourceDetails:B,event:T,productList:T.products,ctaList:T.cta}),(0,u.bU)("whatmoreAllowAutoSlide",!1)},videoPlayingData:I,totalSiblingEvents:A,indexAmongSiblings:K,questionList:Y,isQuestionVisible:G&&X<(null===Y||void 0===Y?void 0:Y.length),qIndex:X,setIsQuestionVisible:$,leftOpenSpaceClickHandler:Z,midOpenSpaceClickHandler:H,rightOpenSpaceClickHandler:U,storySetId:F,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:O})})}):(0,x.jsx)(x.Fragment,{}),!0===w?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:Q,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(ne,{focusRef:P,event:t.event,isLast:L,onCloseCallback:()=>E(),setLockSwiper:D,data:y,currentProduct:b,setOpenShopNow:t=>{j(t),(0,u.bU)("whatmoreAllowAutoSlide",!t)}})})}):(0,x.jsx)("div",{})]})})},Me=i(7300),Re=i(8984),Ae=i(58),Ke=i(9723);var We=function(t){var[e,i,n,o]=(0,h.Z)();const r=(0,u.MO)("whatmoreShopId"),l=t.event,a=t.isPlaying,d="center";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:o,height:n,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:d,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:o/n,children:(0,x.jsx)(v.Z,{height:"100%",width:"100%",url:(0,ae.V)((0,Le.uv)(l)),isPlaying:a,timeUpdateCallback:function(t,e){},event:l,source:t.source})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:d,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",backdropFilter:"auto",backdropBlur:"10px",onClick:t=>{(0,Ae.QV)()},children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"full",width:"full",children:[(0,x.jsx)(Ke.Z,{sx:{boxShadow:3,color:(0,c.Ya_)(r),fontSize:.4*o,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{(0,Ae.QV)()}}),(0,x.jsx)(s.xv,{color:"white",fontSize:.05*o+"px",fontWeight:"bold",align:"left",children:"Please click to play video.."})]})})})]})})},qe=i(3433),Ne=i(653);const Ve=n.lazy((()=>i.e(258).then(i.bind(i,5824))));var Ze=function(t){var e,i;const n=t.changeSlide,o=t.event,r=null===(e=t.isPlaying)||void 0===e||e,l=t.onBack,s=t.isLast,c=t.setLockSwiper,h=(t.heightFactor,t.widthFactor,t.onVideoEndedCallback),p=t.progressUpdateCallback,[v,m]=(0,j.Z)(),[g]=(0,u.j1)("whatmoreVideoPlayerPoolBlessed"),f=null===(i=t.showOverlay)||void 0===i||i;function w(){m(!v)}if((0,Re.KE)()&&0==g&&"recommended_images"!=(null===o||void 0===o?void 0:o.event_type))return(0,Ne.j)()?(0,x.jsx)(We,{event:o,onBack:l,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:h,progressUpdateCallback:p,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:f,source:qe.j.CAROUSEL_EVENT_OPENED},"shopping-video-view"+o.event_id):(0,x.jsx)(De,{event:o,onBack:l,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:h,progressUpdateCallback:p,showQuestion:t.showQuestion,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:f,source:qe.j.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:n},"shopping-video-view"+o.event_id);if((0,Me.B6)(o)||(0,Me.WJ)(o))return(0,x.jsx)(De,{event:o,onBack:l,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:h,progressUpdateCallback:p,showQuestion:t.showQuestion,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:f,source:qe.j.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:n},"shopping-video-view"+o.event_id);if("recommended_images"==(null===o||void 0===o?void 0:o.event_type))return(0,x.jsx)(Ve,{onBack:l,mode:t.mode,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,imageUrls:null===o||void 0===o?void 0:o.product_list});if((0,Me.yC)(o)){var{status:y,bannerText:C,timeToStartInMins:b}=d.Z.getEventStatus(o);if(y.name===a.Z.LIVE.name)return(0,x.jsx)(oe,{event:o,onBack:l,isPlaying:r,isLast:s,showOverlay:f},"shopping-live-view"+o.event_id)}return console.error("Can't render event which is neither video or a currently-live-event"),(0,x.jsx)("div",{})},He=i(9284),Ue=i.n(He),Be=i(7463),Ye=i(2154);function Xe(t){var e;const[i,o]=(0,n.useState)(!1),r=t.onClick,l=null!==(e=t.fontSize)&&void 0!==e?e:50;return(0,x.jsx)("div",{style:{height:"fit-content",width:"fit-content",backgroundColor:"black",opacity:.4,borderRadius:"50%"},className:[i?"whatmore-scale-on-tap":""].join(" "),children:"left"===t.type?(0,x.jsx)(Ye.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{o(!0),setTimeout((()=>{o(!1)}),500),r(t,"up")}}):(0,x.jsx)(Be.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{o(!0),setTimeout((()=>{o(!1)}),500),r(t,"down")}})})}var Ge=function(t){var e,i,n;const o=null!==(e=t.relativeBottomPercentage)&&void 0!==e?e:"30%",r=null!==(i=t.width)&&void 0!==i?i:"100%",l=null!==(n=t.fontSize)&&void 0!==n?n:50,a=t.handleClick;return(0,x.jsx)("div",{style:{position:"relative",zIndex:1,bottom:o,width:"100%",height:"fit-content",display:"flex",flexFlow:"row nowrap",justifyContent:"center"},id:"here",children:(0,x.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:r,height:"fit-content",paddingRight:"5px",paddingLeft:"5px",paddingTop:"5px",paddingBottom:"5px",justifyContent:"space-between",alignContent:"center"},children:[(0,x.jsx)(Xe,{type:"left",onClick:a,fontSize:l}),(0,x.jsx)(Xe,{type:"right",onClick:a,fontSize:l})]})})},$e=i(2860),Qe=i(4669);var Je=function(t,e){function i(t,e){return 1==e?0:t<0?e+t:t>=e?t-e:t}const o=(0,n.useRef)({prevIndex:i(t-1,e),activeIndex:t,nextIndex:i(t+1,e)});return[function(){return o.current},function(t){o.current="right"==t?{prevIndex:i(o.current.activeIndex,e),activeIndex:i(o.current.activeIndex+1,e),nextIndex:i(o.current.activeIndex+2,e)}:{prevIndex:i(o.current.activeIndex-2,e),activeIndex:i(o.current.activeIndex-1,e),nextIndex:i(o.current.activeIndex,e)}},function(t){return i(o.current.activeIndex+t)}]};var ti=function(t,e){const i=(0,n.useRef)({clientX:0,clientY:0});return[function(t){i.current.clientX=t.changedTouches[0].clientX,i.current.clientY=t.changedTouches[0].clientY},function(n){const o=i.current.clientX,r=i.current.clientY;var l=o-n.changedTouches[0].clientX,a=r-n.changedTouches[0].clientY;return"vertical"==t&&Math.abs(a)>e||"horizontal"==t&&Math.abs(l)>e?"vertical"==t?a>0?"right":"left":l>0?"right":"left":null}]};var ei=function(t,e){const i=(0,n.useRef)(ze()(((t,e)=>{t(e)}),300,{leading:!0,trailing:!1}));return[function(n,o){var r=0;if(r="vertical"==t?n.deltaY:n.deltaX,Math.abs(r)<=e)return;const l=r>0?"right":"left";i.current(o,l)}]},ii=i(5173);var ni=function(t){const e=t.events,i=t.eventIndex,a=t.onBack;var[d,p,v,m]=(0,h.Z)();const[g]=(0,u.j1)("isInDesignMode"),[f]=(0,u.j1)("isDemoBrand"),[w,j]=(0,n.useState)(!0),[y,C]=(0,u.j1)("isFirstIndicatorRenderDone"),[b,S]=(0,n.useState)(!1),[I,k]=(0,n.useState)({}),{setCloseClickComponent:_}=(0,n.useContext)(fi),{slideDirection:T}=(0,n.useContext)(fi),[F]=(0,u.j1)("whatmoreShopId"),[E]=(0,u.j1)("whatmoreLandingLocationType"),[P,O]=Je(i,e.length),[z,L]=ti(T,50),[D]=ei("vertical",30),[M,R]=(0,n.useState)(!1),[A,W]=(0,n.useState)(null),{whatmoreWidgetSourceDetails:Z,whatmoreUserInfo:H}=(0,n.useContext)(V.I);function U(){R(!1)}function B(t){U(),setTimeout((()=>{a(t)}),500)}(0,n.useEffect)((()=>(R(!0),()=>{})),[]);const Y=Z.landingLocationType,X=Z.templateType;_(B);let G=i;const{questionList:$}=(0,n.useContext)(fi);function Q(){(0,u.MO)("whatmoreAllowAutoSlide")&&(O("right"),A.slideNext())}function J(t,e){O(e),function(t,e){A&&("left"===e?A.slidePrev():A.slideNext())}(0,e)}const tt=Math.round(.05*v);return(0,x.jsx)(Ue(),{isOpen:M,onAfterOpen:function(){},onRequestClose:U,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)(ii.Z,{children:(0,x.jsxs)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:(0,K.lA)("#000000",13)},onTouchStart:t=>{z(t)},onTouchEnd:t=>{if(b)return;const e=L(t);e&&J(0,e)},onWheel:t=>{b||D(t,(t=>{J(0,t)}))},children:[(0,x.jsx)(o.tq,{speed:400,threshold:tt,slidesPerView:1,direction:T,modules:[r.tl,r.Gk],initialSlide:i,loop:1!=e.length,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,allowSlideNext:!b,allowSlidePrev:!b,allowTouchMove:!1,onSwiper:t=>{W(t),(0,q.GF)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:Z,event:e[P().activeIndex],productList:e[P().activeIndex].products})},onSlideChange:t=>{var i;w?j(!1):(y||C(!0),(0,q.Z2)({userInteractionType:N.K.VIDEO_PLAYBACK,userInteractionMetadata:I,widgetSourceDetails:Z,event:e[P().activeIndex],productList:e[P().activeIndex].products}),i=e[P().activeIndex],g||f||null===i||void 0===i||!i.event_id||(async()=>{const t=(0,mt.NY)(Y)+(0,mt.dS)(X)+(null!==i&&void 0!==i&&i.isRelatedEvent?"R":"E")+"_"+(null===i||void 0===i?void 0:i.event_id);(0,l.wh)(i),"index"===E?((0,Qe.Tc)(F,$e.Xh,$e.pR),(0,ot.H4)(i.event_id,i.products,$e.Xh,$e.pR,t,null===i||void 0===i?void 0:i.location,null===H||void 0===H?void 0:H.userType)):E.startsWith("product")||"embed"===E?((0,Qe.Tc)(F,$e.h7,$e.dU),(0,ot.H4)(i.event_id,i.products,$e.h7,$e.dU,t)):E.startsWith("collection")?((0,Qe.Tc)(F,$e.U$,$e.Pk),(0,ot.H4)(i.event_id,i.products,$e.U$,$e.Pk,t)):((0,Qe.Tc)(F,$e.Xh,$e.pR),(0,ot.H4)(i.event_id,i.products,$e.Xh,$e.pR,t))})(),(0,q.y4)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:Z,event:e[P().activeIndex],productList:e[P().activeIndex].products}))},children:[...Array(Math.min(e.length,3)).keys()].map((n=>(0,x.jsx)(o.o5,{children:n=>{let{isActive:o,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=n;const u=o?"activeIndex":r?"prevIndex":"nextIndex",h=P()[u];"activeIndex"==u&&(G=Math.max(G,h),0==h&&(G=0));const p=(null===$||void 0===$?void 0:$.length)>0&&o&&a&&(h>i||G<i&&h>0)&&h>=G&&h%(0,c.rFm)(F)==i%(0,c.rFm)(F);return(0,x.jsx)(s.Kq,{direction:"column",height:window.innerHeight,justifyContent:"center",children:(0,x.jsx)(Ze,{event:e[h],showQuestion:p,onBack:B,isPlaying:1==e.length||o&&a,isLast:!1,setLockSwiper:S,onVideoEndedCallback:Q,progressUpdateCallback:t=>{k(t)},showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,mode:"portrait",changeSlide:J})})}},"event-vertical-scroll-slide-"+n)))}),e.length>1&&!b&&(0,c.h6H)(F)&&"horizontal"===(0,c.e8z)(F)&&"horizontal"===T?(0,x.jsx)(Ge,{relativeBottomPercentage:"50%",width:m,handleClick:(t,e)=>{J(0,"down"==e?"right":"left")},fontSize:parseInt(.12*m)}):(0,x.jsx)(x.Fragment,{})]})})})},oi=i(1168);i(6143),i(7850),i(4444),i(7244),i(123),i(5892),i(1811);const ri=t=>{let{children:e,customClass:i,show:n,closeCallback:o}=t;return oi.createPortal((0,x.jsxs)("div",{className:`whatmore-landscape-modal whatmore-root ${i}`,style:{display:n?"block":"none"},children:[(0,x.jsx)("div",{className:"whatmore-landscape-modal-overlay",onClick:o}),(0,x.jsx)("div",{className:"whatmore-landscape-modal-content",children:e})]}),document.body)};ri.defaultProps={children:(0,x.jsx)("div",{children:"Empty Modal"}),customClass:"",show:!1,closeCallback:()=>!1};var li=ri;var ai=function(t){var e,[i,a,d,p]=(0,h.Z)();const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[g,f]=(0,u.j1)("isFirstIndicatorRenderDone"),[w,j]=(0,n.useState)(0!=t.eventIndex),{setCloseClickComponent:y}=(0,n.useContext)(fi),[C,b]=(0,n.useState)(!1),[S]=(0,u.j1)("whatmoreShopId"),[I]=(0,u.j1)("whatmoreLandingLocationType"),k=(0,u.MO)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:_,whatmoreUserInfo:T}=(0,n.useContext)(V.I),[F,E]=(0,n.useState)(!1),[O,z]=(0,n.useState)(null);function L(){E(!1)}const D=t.events,M=t.eventIndex,R=t.onBack,A=D.concat(D),W=D.length,Z=null===D||void 0===D||null===(e=D[0])||void 0===e?void 0:e.brand,H=(0,n.useRef)(0);function U(t){L(),setTimeout((()=>{R(t)}),500)}function B(){O&&!O.isEnd&&(0,u.MO)("whatmoreAllowAutoSlide")&&O.slideNext()}(0,n.useEffect)((()=>(E(!0),()=>{})),[]),y(U);const Y=_.landingLocationType,X=_.templateType,[G,$]=(0,n.useState)({}),Q=parseInt(Math.min(5,D.length));return(0,x.jsx)(li,{show:F,closeCallback:L,customClass:"whatmore-landscape-modal-swipe-view",children:(0,x.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",alignItems:"center",backgroundColor:(0,K.lA)("#000000",13),children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:p*Q,children:(0,x.jsxs)(o.tq,{onInit:t=>{z(t),(0,q.GF)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:_,event:D[t.activeIndex],productList:D[t.activeIndex].products,ctaList:D[t.activeIndex].cta})},slidesPerView:Q,centeredSlides:!0,allowTouchMove:!1,initialSlide:M,modules:[r.lI,r.W_,r.Gk,r.pt,r.tl],navigation:Q>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*d),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:p*Q,watchSlidesProgress:!0,onSlideChange:t=>{var e;w?j(!1):(g||f(!0),e=D[t.activeIndex],v||m||null===e||void 0===e||!e.event_id||(async()=>{const t=(0,mt.NY)(Y)+(0,mt.dS)(X)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,l.wh)(e),"index"===I?((0,Qe.Tc)(S,$e.Xh,$e.pR),(0,ot.H4)(e.event_id,e.products,$e.Xh,$e.pR,t,null===e||void 0===e?void 0:e.location,null===T||void 0===T?void 0:T.userType)):I.startsWith("product")||"embed"===I?((0,Qe.Tc)(S,$e.h7,$e.dU),(0,ot.H4)(e.event_id,e.products,$e.h7,$e.dU,t)):I.startsWith("collection")?((0,Qe.Tc)(S,$e.U$,$e.Pk),(0,ot.H4)(e.event_id,e.products,$e.U$,$e.Pk,t)):((0,Qe.Tc)(S,$e.Xh,$e.pR),(0,ot.H4)(e.event_id,e.products,$e.Xh,$e.pR,t))})(),(0,q.Z2)({userInteractionType:N.K.VIDEO_PLAYBACK,userInteractionMetadata:G,widgetSourceDetails:_,event:D[t.activeIndex],productList:D[t.activeIndex].products,ctaList:D[t.activeIndex].cta}),(0,q.y4)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:_,event:D[t.activeIndex],productList:D[t.activeIndex].products,ctaList:D[t.activeIndex].cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[D.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(P.Z,{onCloseCallback:R})}),A.slice(M,D.length+M).map(((t,e)=>(0,x.jsx)(o.o5,{children:t=>{let{isActive:i,isPrev:n,isNext:o,isVisible:r,isDuplicate:l}=t;if(i)return(0,x.jsx)(s.Kq,{direction:"column",height:d,width:1*p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==k?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Ze,{event:D[e%W],onBack:U,isPlaying:!0,isLast:e%W===D.length-1,setLockSwiper:b,widthFactor:1,heightFactor:1,onVideoEndedCallback:B,progressUpdateCallback:t=>{$(t)},showCloseOverlay:(null===D||void 0===D?void 0:D.length)<=2,mode:"landscape"})})});if(o)return(0,x.jsx)(s.Kq,{direction:"column",height:d,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{O.slideTo(e%W,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==k?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Ze,{event:D[e%W],onBack:U,isPlaying:!1,isLast:e%W===D.length-1,setLockSwiper:b,widthFactor:1,heightFactor:1,onVideoEndedCallback:B,progressUpdateCallback:t=>{$(t)},showOverlay:!1,mode:"landscape"})})});if(n&&1===H.current)return(0,x.jsx)(s.Kq,{direction:"column",height:d,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{O.slideTo(e%W,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==k?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Ze,{event:D[e%W],onBack:U,isPlaying:!1,isLast:e%W===D.length-1,setLockSwiper:b,widthFactor:1,heightFactor:1,onVideoEndedCallback:B,progressUpdateCallback:t=>{$(t)},showOverlay:!1,mode:"landscape"})})});try{M+e>=W-1&&(H.current=1)}catch(a){console.log(a)}return(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide"+t.event_id)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(je,{brandName:Z,height:.04*d,width:.1*p,fontSize:.02*d})})]})})},di=i(6090),si=i(7616),ci=i(9302),ui=i(2575);var hi=function(t){const[e,i,n,o]=(0,h.Z)(),[r]=(0,u.j1)("whatmorePrimaryColor"),[l]=(0,u.j1)("whatmoreSecondaryColor"),a="flex-end";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:o,height:n,backgroundColor:"whiteAlpha.200",backdropBlur:"10px",children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:a,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.oM,{width:"full",ratio:o/n,children:(0,x.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+r+", gray, "+l+")"})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:a,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{padding:"2px",margin:"5px",borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,x.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",backdropFilter:"auto",backdropBlur:"5px"})})})})]})})};var pi=function(t){var e;const i=t.stories,r=t.onBack,a=t.onStoryCompleteCallback,d=t.isActive,c=null!==(e=t.initialEventIndex)&&void 0!==e?e:0,p=i.events;var[v,m,g,f]=(0,h.Z)();const[w,y]=(0,j.Z)(),[C]=(0,u.j1)("isInDesignMode"),[b]=(0,u.j1)("isDemoBrand"),[S]=(0,u.j1)("whatmoreShopId"),[I,k]=(0,n.useState)(!0),[_,T]=(0,u.j1)("isFirstIndicatorRenderDone"),[F,E]=(0,n.useState)(null),[P,O]=(0,n.useState)(!1),{whatmoreWidgetSourceDetails:z,whatmoreUserInfo:L}=(0,n.useContext)(V.I),[D,M]=Je(c,p.length);function R(t){r(t)}const A=z.landingLocationType,K=z.templateType;function W(){if(!(0,u.MO)("whatmoreAllowAutoSlide"))return;D().activeIndex+1>=p.length?a("right"):(M("right"),F&&F.slideNext())}function Z(t){const e=D().activeIndex;"right"==t&&e+1>=p.length||"left"==t&&e-1<0?a(t):(M(t),F&&("left"==t?F.slidePrev():F.slideNext()))}const[H,U]=(0,n.useState)({});return p[D().activeIndex],(0,x.jsx)("div",{children:(0,x.jsx)(o.tq,{speed:1,slidesPerView:1,direction:"horizontal",initialSlide:0,loop:!0,height:g,width:f,watchSlidesProgress:!0,allowTouchMove:!1,onSwiper:t=>{E(t)},onSlideChange:t=>{I?k(!1):(_||T(!0),(0,q.Z2)({userInteractionType:N.K.VIDEO_PLAYBACK,userInteractionMetadata:H,widgetSourceDetails:z,event:p[D().activeIndex],productList:p[D().activeIndex].products,ctaList:p[D().activeIndex].cta}),function(t){const e=(0,mt.NY)(A)+(0,mt.dS)(K)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);C||b||(async()=>{(0,l.wh)(t),(0,Qe.Tc)(S,$e.Xh,$e.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===L||void 0===L?void 0:L.userType)})()}(p[D().activeIndex]),(0,q.GF)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:z,event:p[D().activeIndex],productList:p[D().activeIndex].products,ctaList:p[D().activeIndex].cta}))},children:[...Array(Math.min(p.length,3)).keys()].map((e=>(0,x.jsx)(o.o5,{children:e=>{let{isActive:n,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=e;if(d){const e=n?"activeIndex":o?"prevIndex":"nextIndex",r=p[D()[e]];return(0,x.jsx)(s.Kq,{direction:"column",height:g,justifyContent:"center",children:(0,Me.B6)(r)||(0,Me.WJ)(r)?(0,x.jsx)(De,{event:r,totalSiblingEvents:p.length,indexAmongSiblings:D()[e],onBack:R,isPlaying:d&&n&&l,isLast:!1,setLockSwiper:O,onVideoEndedCallback:W,progressUpdateCallback:t=>{U(t)},leftOpenSpaceClickHandler:()=>{Z("left")},midOpenSpaceClickHandler:()=>{y(!w)},rightOpenSpaceClickHandler:()=>{Z("right")},storyId:i.id,source:qe.j.STORY_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id):(0,x.jsx)(x.Fragment,{})})}return(0,x.jsx)(s.Kq,{direction:"column",height:v,justifyContent:"center",children:(0,x.jsx)(hi,{})})}},"event-story-view-slide-"+e)))})})};var vi=function(t){const e=t.onBack,i=t.eventsStories,a=t.initialStoryIndex;var[d,c,p,v]=(0,h.Z)();const[m]=(0,u.j1)("isInDesignMode"),[g]=(0,u.j1)("isDemoBrand"),[f,w]=(0,n.useState)(!0),[j,y]=(0,u.j1)("isFirstIndicatorRenderDone"),[C,b]=(0,n.useState)(!1),{setCloseClickComponent:S}=(0,n.useContext)(fi),{slideDirection:I}=(0,n.useContext)(fi),[k]=(0,u.j1)("whatmoreShopId"),[_,T]=Je(a,i.length),[F,E]=ti("horizontal",50),[P]=ei("vertical",30),O=t.eventIndex,[z,L]=(0,n.useState)(!1),[D,M]=(0,n.useState)(null),{whatmoreWidgetSourceDetails:R,whatmoreUserInfo:A}=(0,n.useContext)(V.I);function K(){L(!1)}function W(t){K(),setTimeout((()=>{e(t)}),500)}(0,n.useEffect)((()=>(L(!0),()=>{})),[]),S(W);const Z=R.landingLocationType,H=R.templateType;function U(t){D&&(0,u.MO)("whatmoreAllowAutoSlide")&&(T(t),"right"==t?D.slideNext():D.slidePrev())}function B(t,e){U(e)}return(0,x.jsx)(Ue(),{isOpen:z,onAfterOpen:function(){},onRequestClose:K,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:"#00000088"},onTouchStart:t=>{F(t)},onTouchEnd:t=>{const e=E(t);e&&B(0,e)},onWheel:t=>{P(t,(t=>{B(0,t)}))},children:(0,x.jsx)(o.tq,{speed:1,slidesPerView:1,direction:"horizontal",modules:[r.SH,r.Gk],initialSlide:a,loop:i.length>1,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,onSwiper:t=>{var e,n;M(t),(0,q.GF)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:R,event:i[_().activeIndex].events[0],productList:null===(e=i[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[_().activeIndex].events[0])||void 0===n?void 0:n.cta})},onSlideChange:t=>{var e,n;f?w(!1):(!function(t){const e=(0,mt.NY)(Z)+(0,mt.dS)(H)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);m||g||(async()=>{(0,l.wh)(t),(0,Qe.Tc)(k,$e.Xh,$e.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===A||void 0===A?void 0:A.userType)})()}(i[_().activeIndex].events[0]),(0,q.GF)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:R,event:i[_().activeIndex].events[0],productList:null===(e=i[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[_().activeIndex].events[0])||void 0===n?void 0:n.cta}))},allowTouchMove:!1,cubeEffect:{shadow:!0,slideShadows:!0,shadowOffset:20,shadowScale:.94},children:[...Array(Math.min(i.length,3)).keys()].map((t=>(0,x.jsx)(o.o5,{children:t=>{let{isActive:e,isPrev:n,isNext:o,isVisible:r,isDuplicate:l}=t;const c=e?"activeIndex":n?"prevIndex":"nextIndex";return(0,x.jsx)(s.Kq,{direction:"column",height:d,justifyContent:"center",children:(0,x.jsx)(pi,{stories:i[_()[c]],onBack:W,isActive:e&&r,isNext:o,isPrev:n,onStoryCompleteCallback:U,nextStories:i[_().nextIndex],prevStories:i[_().prevIndex],initialEventIndex:a==_()[c]?O:0},"event-story-view-"+i[_()[c]].id)})}},"event-vertical-scroll-slide-"+t)))})})})};var xi=function(t){var e,i,o,[r,l,a,d]=(0,h.Z)();const[c]=(0,u.j1)("whatmorePrimaryColor"),[p]=(0,u.j1)("whatmoreSecondaryColor"),v=t.event,m=(t.onBack,n.useRef(),null!==(e=t.showPausedVideo)&&void 0!==e&&e),f=null!==(i=t.heightFactor)&&void 0!==i?i:1,w="flex-end";return d*=null!==(o=t.widthFactor)&&void 0!==o?o:1,a*=f,(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:d,height:a,children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:w,height:"full",width:"full",children:(0,x.jsx)(s.xu,{children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:m?(0,Me.B6)(v)||(0,Me.WJ)(v)?(0,x.jsx)(ye.Z,{height:"100%",width:"100%",url:v.thumbnail_image,isPlaying:!1,pauseFromPlayTimeInMs:1e3,event:v}):(0,x.jsx)(g.Ee,{width:"full",height:"full",src:v.thumbnail_image,objectFit:"cover",borderRadius:"lg"}):(0,x.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+c+", gray, "+p+")"})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:w,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,x.jsx)(s.xu,{width:"full",height:"full",backgroundColor:"blackAlpha.400"})})})})]})})};var mi=function(t){var e,i,[a,d,c,p]=(0,h.Z)();const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[g,f]=(0,u.j1)("isFirstIndicatorRenderDone"),[w,j]=(0,n.useState)(0!=t.eventIndex),{setCloseClickComponent:y}=(0,n.useContext)(fi),[C,b]=(0,n.useState)(!1),[S]=(0,u.j1)("whatmoreShopId"),{whatmoreWidgetSourceDetails:I,whatmoreUserInfo:k}=(0,n.useContext)(V.I),[_,T]=(0,n.useState)(!1),[F,E]=(0,n.useState)(null);function O(){T(!1)}t.events;const z=t.eventIndex,L=t.onBack,D=t.eventsStories,M=t.initialStoryIndex,R=null===(e=D[0])||void 0===e||null===(i=e.events[0])||void 0===i?void 0:i.brand;function A(t){O(),setTimeout((()=>{L(t)}),500)}(0,n.useEffect)((()=>(T(!0),()=>{})),[]),y(A);const K=I.landingLocationType,W=I.templateType;function Z(t){F&&!F.isEnd&&("right"==t?F.slideNext():F.slidePrev())}const H=parseInt(Math.min(5,D.length));return(0,x.jsx)(li,{show:_,closeCallback:O,customClass:"whatmore-landscape-modal-stories-view",children:(0,x.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",alignItems:"center",backgroundColor:"blackAlpha.800",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:p*H,children:(0,x.jsxs)(o.tq,{onInit:t=>{var e,i;E(t),(0,q.GF)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:I,event:D[t.activeIndex].events[0],productList:null===(e=D[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=D[t.activeIndex].events[0])||void 0===i?void 0:i.cta})},slidesPerView:H,centeredSlides:!0,allowTouchMove:!1,initialSlide:M,modules:[r.lI,r.W_,r.Gk],navigation:H>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*c),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:p*H,watchSlidesProgress:!0,onSlideChange:t=>{var e,i;w?j(!1):(g||f(!0),function(t){const e=(0,mt.NY)(K)+(0,mt.dS)(W)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);v||m||(async()=>{(0,l.wh)(t),(0,Qe.Tc)(S,$e.Xh,$e.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===k||void 0===k?void 0:k.userType)})()}(D[t.activeIndex].events[0]),(0,q.GF)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:I,event:D[t.activeIndex].events[0],productList:null===(e=D[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=D[t.activeIndex].events[0])||void 0===i?void 0:i.cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[D.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(P.Z,{onCloseCallback:L})}),D.map(((t,e)=>(0,x.jsx)(o.o5,{children:i=>{let{isActive:n,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=i;if(n){const i=1;return(0,x.jsx)(s.Kq,{direction:"column",height:c,width:p*i,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(pi,{stories:t,onBack:A,isActive:n&&l,isNext:!1,isPrev:!1,onStoryCompleteCallback:Z,initialEventIndex:M==e?z:0,showCloseOverlay:(null===D||void 0===D?void 0:D.length)<=2},"event-story-view-"+t.id)})})}return o||r?(0,x.jsx)(s.Kq,{direction:"column",height:c,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{F.slideTo(e,300)},children:(0,x.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(xi,{showPausedVideo:!0,event:D[e].events[0],onBack:A,isPlaying:!1,setLockSwiper:b})})}):(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide-"+e)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(je,{brandName:R,height:.04*c,width:.1*p,fontSize:.02*c})})]})})};const gi=(0,ui.Z)({key:"whatmore-css-sv"}),fi=(0,n.createContext)({isIOS:!1,totalEvents:0,closeClickComponent:null,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:"vertical",showSwipeIndicator:!0,questionList:[]});var wi=function(t){var e,i,o;const[r,l,a]=(0,me.Z)(),[d]=(0,u.j1)("whatmoreShopId"),{whatmoreRootId:s}=(0,n.useContext)(V.I),{whatmoreIsStoriesTemplate:h}=(0,n.useContext)(V.I);var p=t.events,v=t.index,m=t.onBack,g=t.eventsStories,f=t.initialStoryIndex,w=(0,c.cX2)(d),j="portrait"===r?null!==(e=t.slideDirection)&&void 0!==e?e:"vertical":null!==(i=t.slideDirection)&&void 0!==i?i:p.length>1?"horizontal":"vertical",y="portrait"===r?!(0,c.h6H)(d)&&!h:(0,c.n89)(d);return(0,n.useLayoutEffect)((()=>{(0,c.TLG)(d)&&(window.location.href.includes(w)?history.replaceState(null,"","#"+w):history.pushState(null,"","#"+w),window.addEventListener("popstate",(()=>{window.location.href.includes(w)||m()})))}),[]),delete si.ZP.styles.global,h?(0,x.jsx)(ci.C,{value:gi,children:(0,x.jsx)(di.x,{theme:si.ZP,cssVarsRoot:s,resetCSS:!1,children:(0,x.jsx)(fi.Provider,{value:{isIOS:(0,Re.KE)(),totalEvents:p.length,closeClickComponent:m,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:j,showSwipeIndicator:y},children:"portrait"===r?(0,x.jsx)(vi,{eventsStories:g,initialStoryIndex:f,onBack:m,eventIndex:v}):(0,c.Bbr)(d)?(0,x.jsx)(mi,{eventsStories:g,initialStoryIndex:f,onBack:m,eventIndex:v}):(0,x.jsx)(vi,{eventsStories:g,initialStoryIndex:f,onBack:m,eventIndex:v})})})}):(0,x.jsx)(ci.C,{value:gi,children:(0,x.jsx)(di.x,{theme:si.ZP,cssVarsRoot:s,resetCSS:!1,children:(0,x.jsx)(fi.Provider,{value:{isIOS:(0,Re.KE)(),totalEvents:p.length,closeClickComponent:m,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:j,showSwipeIndicator:y,questionList:(0,c.YGB)(d)?null===(o=JSON.parse(localStorage.getItem("_whatmore_brand_questions")))||void 0===o?void 0:o.questionList:[]},children:"portrait"===r?(0,x.jsx)(ni,{events:p,eventIndex:v,onBack:m}):(0,x.jsx)(ai,{events:p,eventIndex:v,onBack:m})})})})}},9316:function(t,e,i){i.d(e,{mT:function(){return o}});var n=i(686);const o=`\n ${n.F4`
|
76
|
+
`} 0.5s`,It=null===N||void 0===N||null===(e=N.options)||void 0===e?void 0:e.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))})),[kt,_t]=(0,n.useState)(-1!==It?null===(i=N.options)||void 0===i||null===(o=i[It])||void 0===o||null===(r=o.values)||void 0===r?void 0:r[0]:""),[Tt,Ft]=(0,n.useState)({});(0,n.useEffect)((()=>{-1!==It&&"whatmore"!==(0,c.Ipo)(jt)&&async function(){const t=await(0,lt.m3)(Z);Ft(t)}()}),[]);let Et=-1,Pt=-1!==It&&null!==Tt&&void 0!==Tt&&Tt.product&&(null===Tt||void 0===Tt||null===(l=Tt.product)||void 0===l||null===(a=l.images)||void 0===a?void 0:a.length)>=(null===Tt||void 0===Tt||null===(d=Tt.product)||void 0===d||null===(p=d.options)||void 0===p||null===(v=p[It])||void 0===v||null===(m=v.values)||void 0===m?void 0:m.length)?null===Tt||void 0===Tt||null===(f=Tt.product)||void 0===f||null===(w=f.images)||void 0===w?void 0:w.map((t=>{var e,i,n,o,r,l,a,d,s,c,u,h,p,v;const x=null===Tt||void 0===Tt||null===(e=Tt.product)||void 0===e||null===(i=e.options)||void 0===i?void 0:i.findIndex((t=>"Color"==(null===t||void 0===t?void 0:t.name)||"Colour"==(null===t||void 0===t?void 0:t.name)||"COLOR"==(null===t||void 0===t?void 0:t.name)));return{color:(null===t||void 0===t?void 0:t.variant_ids.length)>0?null===Tt||void 0===Tt||null===(n=Tt.product)||void 0===n||null===(o=n.options)||void 0===o||null===(r=o[x])||void 0===r||null===(l=r.values)||void 0===l?void 0:l[Math.min(++Et,(null===Tt||void 0===Tt||null===(a=Tt.product)||void 0===a||null===(d=a.options)||void 0===d||null===(s=d[It])||void 0===s||null===(c=s.values)||void 0===c?void 0:c.length)-1)]:null===Tt||void 0===Tt||null===(u=Tt.product)||void 0===u||null===(h=u.options)||void 0===h||null===(p=h[x])||void 0===p||null===(v=p.values)||void 0===v?void 0:v[Math.max(0,Et)],src:null===t||void 0===t?void 0:t.src}})):[],Ot=[];if("whatmore"==(0,c.Ipo)(jt)&&(null===N||void 0===N||null===(j=N.images)||void 0===j?void 0:j.length)>0){var zt;var Lt;if(-1!==(null===N||void 0===N||null===(zt=N.options)||void 0===zt?void 0:zt.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))}))))Ot=null===N||void 0===N||null===(Lt=N.images)||void 0===Lt?void 0:Lt.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc})))}return Et+1<(null===Tt||void 0===Tt||null===(y=Tt.product)||void 0===y||null===(C=y.options)||void 0===C||null===(S=C[It])||void 0===S||null===(I=S.values)||void 0===I?void 0:I.length)&&(Pt=[]),(0,x.jsxs)(s.kC,{sx:{"&::-webkit-scrollbar":{width:"0px"}},id:"whatmore-shopnow-view",position:"relative",maxHeight:"75vh",overflowY:"scroll",direction:"column",bg:"#FFF",height:"fit-content",opacity:"100%",borderTopRadius:"round"==(null===wt||void 0===wt?void 0:wt.whatmoreUITheme)?"xl":null,animation:St,children:[(0,x.jsx)(Ut,{setOpenShopNow:H,setLockSwiper:U,FONT_SIZE:K}),(0,x.jsx)(s.M5,{marginBottom:"10px",px:"20px",py:"5px",children:(0,x.jsx)(s.kC,{bg:"whiteAlpha.900",width:"fit-content",height:"fit-content",borderRadius:"round"==(null===wt||void 0===wt?void 0:wt.whatmoreUITheme)?"lg":null,overflow:"hidden",sx:{borderWidth:(0,c.alU)(jt),borderColor:(0,c.qPe)(jt)},children:(0,x.jsx)(s.kC,{width:"100%",children:(0,x.jsx)($t.P,{renderElement:t=>(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(s.xu,{width:M+"px",height:A+"px",children:(0,x.jsx)(g.Ee,{width:M+"px",height:A+"px",borderRadius:"round"==(null===wt||void 0===wt?void 0:wt.whatmoreUITheme)?"lg":null,src:(0,pt.s)(t.eventData.src,"&width=400&height=400"),alt:Z.handle,sx:{objectFit:(0,c.yOX)(jt)+" !important"},fallback:(0,x.jsx)(R.Z,{width:M+"px",height:A+"px",borderRadius:"round"==(null===wt||void 0===wt?void 0:wt.whatmoreUITheme)?"10px":"0px"})})})}),dataList:Pt.length>0&&!Pt.includes(null)?null===(k=Pt)||void 0===k?void 0:k.filter((t=>(null===t||void 0===t?void 0:t.color)==kt)):Ot.length>0?[null===(_=Ot)||void 0===_?void 0:_.find((t=>(null===t||void 0===t?void 0:t.color)==kt))]:null===N||void 0===N||null===(T=N.images)||void 0===T?void 0:T.map((t=>({src:t.includes("https")?t:"https:"+t}))),spacing:10,defaultHeight:M+"px",defaultWidth:A+"px",retainAlreadyRenderedElements:!0,isScroll:!0})})})}),(0,x.jsx)(Xt,{data:N,product:Z,PRODUCT_TILE_HEIGHT:D,PRODUCT_TILE_WIDTH:L,FONT_SIZE:K,getVariantPrice:te,selectedVariantId:it,itemPrice:dt,itemQuantity:ot,setItemQuantity:at,thumbnailImage:gt}),(null===N||void 0===N||null===(F=N.variants)||void 0===F?void 0:F.length)>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s.M5,{paddingTop:"4px",width:"100%",children:(0,x.jsx)(s.iz,{color:(0,c.W8U)(jt),size:"xs",width:"90%"})}),(0,x.jsx)(Gt,{data:N,dividerColor:(0,c.W8U)(jt),setSelectedColor:_t,finalArr:Pt,finalArrExternal:Ot,product:Z,PRODUCT_TILE_HEIGHT:D,PRODUCT_TILE_WIDTH:L,FONT_SIZE:K,selectOptionFirstHandler:yt,selectOptionSecondHandler:Ct,selectOptionThirdHandler:bt,getVariantPrice:te,selectedOptionFirst:G,selectedOptionSecond:Q,selectedOptionThird:tt,selectedVariantId:it,isVariantAvailable:X})]}),c.$2G&&((null===N||void 0===N?void 0:N.description)||(null===N||void 0===N?void 0:N.body_html))&&(0,x.jsx)(Bt,{PRODUCT_TILE_HEIGHT:D,FONT_SIZE:K,data:N,handleToggle:()=>q(!W),show:W}),(0,x.jsx)(s.xu,{sx:{pointerEvents:"none"},paddingTop:"20px",opacity:0,children:(0,x.jsx)(Ht,{position:"relative",data:N,FONT_SIZE:K,product:Z})}),(0,x.jsx)(Ht,{position:"fixed",selectedVariantId:it,data:N,FONT_SIZE:K,PRODUCT_TILE_WIDTH:L,product:Z,itemQuantity:ot,cartItemCount:ct,addToCartFlag:ht,setAddToCartFlag:vt,soldOutFlag:xt,setSoldOutFlag:mt,event:V})]})}const Jt=(t,e,i,n)=>{var o;if(!e&&!i&&!n)return;const r=null===t||void 0===t||null===(o=t.variants)||void 0===o?void 0:o.find((t=>(!e||t.option1===e)&&(!i||t.option2===i)&&(!n||t.option3===n)));return r?r.id:void 0},te=(t,e)=>{var i,n;return null===t||void 0===t||null===(i=t.variants)||void 0===i||null===(n=i.find((t=>t.id===e)))||void 0===n?void 0:n.price},ee=(t,e)=>{var i;const n=null===t||void 0===t||null===(i=t.variants)||void 0===i?void 0:i.find((t=>t.id==e));return void 0===n?null:null===n||void 0===n||null===(o=n.featured_image)||void 0===o?void 0:o.src;var o},ie=(0,n.createContext)({setShowOptionsChart:null});var ne=function(t){const e=t.event,i=t.data,o=t.currentProduct,r=t.setOpenShopNow,l=t.setLockSwiper,[a,d]=(0,n.useState)(!1);return(0,x.jsx)(ie.Provider,{value:{setShowOptionsChart:d},children:(0,x.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[(0,x.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",children:(0,x.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,x.jsx)(Qt,{data:i,event:e,product:o,setOpenShopNow:r,setLockSwiper:l})})}),a?(0,x.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",style:{position:"relative",zIndex:1,bottom:"100%"},className:"whatmore-ios-css-relative-fix",id:"whatmore-size-chart",children:(0,x.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,x.jsx)(Wt,{data:i,event:e,product:o,setShowOptionsChart:()=>{d(!1)}})})}):(0,x.jsx)(x.Fragment,{})]})})};var oe=function(t){var e,[i,o,r,l]=(0,h.Z)();const[a,d]=(0,n.useState)(!1),[v,g]=(0,n.useState)(),[f,w]=(0,n.useState)(),j=(0,u.MO)("whatmoreShopId"),y=t.event,C=t.onBack,b=n.useRef(),S=t.isPlaying,I=t.isLast,k=t.setLockSwiper,_=t.selectedVariantId,T=null===(e=t.showOverlay)||void 0===e||e,F="center";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:l,height:r,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:F,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:l/r,children:(0,x.jsx)(m,{height:"100%",width:"100%",url:y.event_hls_url,isPlaying:S,event:y})})})}),T?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:F,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(At,{focusRef:b,event:t.event,isLast:I,onCloseCallback:C,productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(j),j);w(t),g(e),d(!0),k(!0)}})})}):(0,x.jsx)(x.Fragment,{}),!0===a?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:F,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(ne,{focusRef:b,event:t.event,isLast:I,onCloseCallback:()=>C(),setLockSwiper:k,data:v,currentProduct:f,setOpenShopNow:d,selectedVariantId:_})})}):(0,x.jsx)("div",{})]})})};const re=function(t,e){return isNaN(t)||isNaN(e)||e<=0||t>e?0:Math.ceil(t/e*100)};function le(t){var e,i,[n,o,r,l]=(0,h.Z)();const[a]=(0,u.j1)("whatmoreSecondaryColor"),[d]=(0,u.j1)("whatmoreSecondaryColorShade900"),c=t.progress,p=null!==(e=t.totalSiblings)&&void 0!==e?e:1,v=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0;return(0,x.jsx)(s.Kq,{width:"96%",height:"fit-content",direction:"row",justifyContent:"center",alignItems:"center",spacing:"1px",children:[...Array(p).keys()].map((t=>(0,x.jsx)(s.Kq,{width:"100%",height:.004*r+"px",backgroundColor:t<v?a:d+"99",borderRightRadius:"lg",borderLeftRadius:"lg",direction:"row",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",sx:{display:"block !important"},children:t==v?(0,x.jsx)(s.xu,{height:"100%",width:c+"%",bgColor:a,borderRightRadius:"lg",borderLeftRadius:"lg",sx:{display:"block !important"}}):(0,x.jsx)(x.Fragment,{})},"event-progress-bar-slab-"+t)))})}var ae=i(868),de=i(2630);const se=t=>t>=1e3?(t/1e3).toFixed(1)+"k":t,ce=()=>"undefined"!==typeof window&&window.innerWidth>=1024;var ue=function(t){var e,i,o,r,a,d=t.whatmoreShareTemplateId;const p=t.whatmoreShareStoryId,v=t.whatmoreShareEventId,m=t.event,g=null===(e=t.showShareText)||void 0===e||e,f=null!==(i=t.shareButtonBottomMargin)&&void 0!==i?i:0,w=(0,u.MO)("whatmoreShopId"),j=(0,u.MO)("isInDesignMode"),y=(0,u.MO)("isDemoBrand"),C=(0,u.MO)("whatmorePrimaryFont"),b=(0,u.MO)("websiteLanguage"),{whatmoreWidgetSourceDetails:S}=(0,n.useContext)(V.I),[I,k,_,T]=(0,h.Z)(),F=null!==(o=t.iconSize)&&void 0!==o?o:.1*T*(0,c.r5f)(w);function E(){const e=(0,u.MO)("whatmoreLandingLocationType");var i;!function(t){j||y||(async()=>{(0,l.x0)(t)})()}(m),(e.startsWith("product")||"embed"===e)&&(d="te"),i="event_product_link"===(0,c.EEC)(w)?m.products[0].product_link||"":window.location.pathname,i=("event_product_link"===(0,c.EEC)(w)?"":window.location.hostname)+i+"?wtt="+d+"&wsid="+p+"&weid="+v,(0,c.lj5)(w)&&(i=i+"&"+(0,c.awP)(w)+"&utm_campaign=video-share&utm_medium="+e);const n={title:(0,c.JNF)(w),text:`${(0,c.Qa8)(w)} \n ${i} ${(0,c.AWG)(w)?"\n \n -via Whatmore":""}`};navigator.share&&!ce?navigator.share(n):(t.setIsModalOpen(!0),t.setShareText([n,i]))}return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{cursor:"pointer",style:{marginBottom:f+"px"},children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[(0,x.jsx)(de.Z,{sx:{boxShadow:3,transform:"scaleX(-1)",color:"white",fontSize:F,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),E(),(0,q.GF)({userInteractionType:N.K.VIDEO_SHARE_CTA_CLICKED,widgetSourceDetails:S,event:m,productList:m.products,ctaList:m.cta})}}),g&&(0,c.u8S)(w)?(0,x.jsxs)(s.xv,{fontSize:.3*F+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:C+" !important",color:"white !important",paddingRight:"10%",maxWidth:"48px",wordWrap:"break-word"},children:["\xa0",m.total_share>(0,c.LWl)(w)?se(m.total_share):null!==(r=null===Q||void 0===Q||null===(a=Q[b])||void 0===a?void 0:a.share)&&void 0!==r?r:"Share","\xa0"]}):(0,x.jsx)(x.Fragment,{})]})})})},he=i(7933),pe=i(2785);var ve=function(t){var e,i,o;const r=(0,u.MO)("whatmoreShopId"),a=(0,u.MO)("whatmorePrimaryFont"),d=(0,u.MO)("whatmoreLikedEvents"),p=(0,u.MO)("isInDesignMode"),v=(0,u.MO)("isDemoBrand"),m=(0,u.MO)("websiteLanguage"),{whatmoreWidgetSourceDetails:g}=(0,n.useContext)(V.I),f=t.event,[w,j]=(0,n.useState)(null!==(e=d[f.event_id])&&void 0!==e&&e),[y,C,b,S]=(0,h.Z)(),I=.1*S*(0,c.r5f)(r);function k(t,e){p||v||(async()=>{(0,l.Z6)(t,e)})()}function _(){(0,u.bU)("whatmoreLikedEvents",{...d,[f.event_id]:!w}),w?(k(f,-1),(0,q.GF)({userInteractionType:N.K.VIDEO_UNLIKED,widgetSourceDetails:g,event:f,productList:f.products,ctaList:f.cta})):(k(f,1),(0,q.GF)({userInteractionType:N.K.VIDEO_LIKED,widgetSourceDetails:g,event:f,productList:f.products,ctaList:f.cta})),j(!w)}const T=f.total_like+(w?1:0);return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{cursor:"pointer",children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[w?(0,x.jsx)(pe.Z,{sx:{boxShadow:3,color:(0,c.dmX)(r),fontSize:I,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),_()}}):(0,x.jsx)(he.Z,{sx:{boxShadow:3,color:"white",fontSize:I,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),_()}}),(0,x.jsx)(x.Fragment,{children:(0,c.CEM)(r)?(0,x.jsxs)(s.xv,{fontSize:.3*I+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:a+" !important",color:"white !important",position:"relative",bottom:"5px"},children:["\xa0",T>=(0,c.zKg)(r)?se(T):null!==(i=null===Q||void 0===Q||null===(o=Q[m])||void 0===o?void 0:o.like)&&void 0!==i?i:"Like","\xa0"]}):(0,x.jsx)(x.Fragment,{})})]})})})};const xe=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#25D366",borderRadius:"50%",padding:.3*e},children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"white",class:"bi bi-whatsapp",viewBox:"0 0 16 16",children:(0,x.jsx)("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})})})};var me=i(8866);const ge=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-twitter-x",viewBox:"0 0 16 16",children:(0,x.jsx)("path",{d:"M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865z"})})})},fe=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-copy",viewBox:"0 0 16 16",children:(0,x.jsx)("path",{"fill-rule":"evenodd",d:"M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z"})})})};var we=t=>{const e=t.shareText,[i,o]=(0,n.useState)("Copy link"),[r,l]=(0,n.useState)("");return(0,x.jsx)(x.Fragment,{children:t.isModalOpen&&(0,x.jsxs)("div",{className:"modal-overlay",style:{backgroundColor:"white",borderRadius:"10px",padding:"12px 12px 20px 12px"},children:[(0,x.jsxs)("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",paddingBottom:"6px"},children:[(0,x.jsx)("img",{onClick:()=>{window.location.href="https://www.whatmore.ai"},src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",backgroundColor:"transparent",borderRadius:"0px",width:Math.min(t.iconSize,28)+"px"}}),(0,x.jsx)(Kt.Z,{onClick:e=>{e.stopPropagation(),t.setIsModalOpen(!1)}})]}),(0,x.jsx)("div",{}),(0,x.jsx)(s.iz,{color:"blackAlpha.500",size:"1px",width:"100%"}),(0,x.jsxs)("div",{className:"social-icons",style:{display:"flex",gap:"20px",justifyContent:"center",paddingTop:"12px"},children:[(0,x.jsxs)("div",{onClick:t=>{var i;t.stopPropagation();const n=encodeURIComponent(null===(i=e[0])||void 0===i?void 0:i.text);window.open(`https://wa.me/?text=${n}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(xe,{iconSize:Math.min(t.iconSize,30)}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"Whatsapp"})]}),(0,x.jsxs)("div",{onClick:t=>{var i;t.stopPropagation();const n=encodeURIComponent(null===(i=e[0])||void 0===i?void 0:i.text);window.open(`https://twitter.com/intent/tweet?text=${n}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(ge,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"X"})]}),(0,x.jsxs)("div",{onClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(e[1]),o("Link copied"),l("green")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(fe,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14),color:r},children:i})]})]})]})})};var je=function(t){var e,i;const n=null===(e=t.brandName)||void 0===e?void 0:e.replace(/\s+/g,"_"),o=(0,u.MO)("whatmorePrimaryFont"),r=(0,u.MO)("whatmoreShopId"),l=null!==(i=t.fontSize)&&void 0!==i?i:"8",[a]=(0,me.Z)(),d=`https://www.whatmore.ai/shoppable-videos?utm_source=${n}&utm_medium=referral&utm_campaign=${"landscape"===a?"customer_referral_desktop":"customer_referral_mobile"}`;return(0,x.jsx)(s.rU,{href:d,isExternal:!0,children:(0,c.XFt)(r)&&(0,x.jsxs)(s.Kq,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content",spacing:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,x.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",o,"important"),t.style.setProperty("font-size",1.1*l+"px","important"),t.style.setProperty("text-align","center","important"),t.style.setProperty("color","white"))},children:"powered by Whatmore"}),(0,x.jsx)(s.xu,{width:"10px"}),(0,x.jsx)("img",{src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",width:1.7*l,backgroundColor:"transparent",borderRadius:"0px"}})]})})},ye=i(4892),Ce=i(1195);var be=()=>(0,x.jsxs)(s.xu,{as:"svg",width:"46px",height:"46px",viewBox:"0 0 24 24",fill:"none",className:"tick-animation",marginBottom:"20px",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"11",stroke:"gray",strokeWidth:"2",fill:"none"}),(0,x.jsx)("path",{d:"M7 12l3 3 7-7",stroke:"gray",strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]});var Se=t=>{var e;const i={text:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.title,options:(null===t||void 0===t?void 0:t.options)||[]},[o,r]=(0,n.useState)(!1),[l,a]=(0,n.useState)(null),[d,c]=(0,n.useState)(null),u=(0,n.useRef)(null),h=(0,n.useContext)(V.I);return(0,n.useEffect)((()=>{if(o){const e=setTimeout((()=>{t.setIsQuestionVisible(!1)}),1e3);return()=>clearTimeout(e)}}),[o]),(0,n.useEffect)((()=>{!o&&u.current&&c(u.current.offsetHeight)}),[o]),(0,x.jsxs)(s.xu,{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",minWidth:"320px",width:"fit-content",bg:"white",borderRadius:"lg",boxShadow:"md",display:"flex",flexDirection:"column",maxWidth:"90%",maxHeight:"90%",overflowY:"visible",ref:u,height:d?`${d}px`:"auto",children:[(0,x.jsx)(s.xu,{position:"absolute",top:"-10px",right:"-10px",bg:"rgba(255, 255, 255, 0.8)",borderRadius:"full",padding:1,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:"10",onClick:()=>{var e;t.setIsQuestionVisible(!1),(0,q.GF)({userInteractionType:N.K.QUESTION_CLOSED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id},widgetSourceDetails:h})},children:(0,x.jsx)(Ce.Z,{})}),(0,x.jsx)(s.xu,{bg:"gray.700",borderTopRadius:"lg",py:3,px:6,display:"flex",flexDirection:"column",justifyContent:"center",width:"100%",children:(0,x.jsx)(s.X6,{py:6,as:"h2",textAlign:"center",style:{fontWeight:"bold",fontSize:"18px",color:"white"},children:null===i||void 0===i?void 0:i.text})}),(0,x.jsx)(s.xu,{flex:"1",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",py:5,px:6,width:"100%",children:o?(0,x.jsxs)(s.xu,{flex:"1",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",children:[(0,x.jsx)(be,{}),(0,x.jsx)(s.X6,{as:"h3",size:"md",color:"gray.700",fontWeight:"medium",textAlign:"center",mt:4,fontSize:"lg",children:"Thank you for your response!"})]}):(0,x.jsx)(s.Kq,{spacing:5,width:"100%",align:"center",children:i.options.map(((e,i)=>(0,x.jsx)(s.xu,{px:4,borderWidth:2,borderRadius:"md",cursor:"pointer",bg:l===e?"gray.200":"white",borderColor:l===e?"gray.400":"gray.200",_hover:{bg:"gray.200"},onClick:()=>(e=>{var i;a(e),r(!0),(0,q.GF)({userInteractionType:N.K.QUESTION_ANSWERED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(i=t.question)||void 0===i?void 0:i.id,response:e},widgetSourceDetails:h})})(e),transition:"background-color 0.2s, border-color 0.2s",display:"flex",alignItems:"center",width:"100%",children:(0,x.jsx)(s.xv,{py:5,color:"gray.800",children:e})},i)))})})]})},Ie=i(2586);var ke=t=>{var e,i;const[o,r]=(0,n.useState)(""),[l,a]=(0,n.useState)(""),[d,h]=(0,n.useState)(!1),[p,v]=(0,n.useState)(!1),m=(0,u.MO)("whatmoreShopId"),g=(0,u.MO)("whatmoreSecondaryColor"),f=(0,u.MO)("whatmorePrimaryFont"),w=null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.title,j=(0,n.useContext)(V.I),y=()=>{var e,i;(()=>{const{type:e}=(null===t||void 0===t?void 0:t.question)||{};return"number"===e?/^\d{10}$/.test(o):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o)})()?(h(!0),(0,q.GF)({userInteractionType:N.K.QUESTION_ANSWERED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id,response:o,type:"number"===(null===t||void 0===t||null===(i=t.question)||void 0===i?void 0:i.type)?"leadgen:number":"leadgen:email"},widgetSourceDetails:j})):a("Please enter valid contact info.")},C=()=>{var e;t.setIsQuestionVisible(!1),(0,q.GF)({userInteractionType:N.K.QUESTION_CLOSED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id},widgetSourceDetails:j})};return(0,x.jsx)(s.kC,{bg:g,p:"6%",borderRadius:"md",boxShadow:"md",width:"90vw",mx:"auto",minH:"40vh",maxH:"80vh",position:"fixed",top:"30%",left:"50%",transform:"translateX(-50%)",direction:"column",align:"center",justify:"center",zIndex:100,overflow:"hidden",children:d?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(s.xu,{textAlign:"center",color:"white",children:[(0,x.jsx)(s.xu,{fontSize:"2xl",fontWeight:"bold",children:"CONGRATULATIONS!"}),(0,x.jsx)(s.xu,{my:"4%",fontSize:"xl",children:"Claim Now"})]}),(0,x.jsx)(s.xu,{position:"absolute",top:"2%",right:"2%",zIndex:20,children:(0,x.jsx)(P.Z,{onCloseCallback:C})}),(0,x.jsxs)(s.xu,{position:"relative",width:"70%",onClick:()=>{const t=(0,c.dKN)(m);navigator.clipboard.writeText(t).then((()=>{v(!0),setTimeout((()=>{C()}),1e3),setTimeout((()=>v(!1)),2e3)}),(()=>{console.error("Failed to copy the coupon code")}))},cursor:"pointer",children:[(0,x.jsxs)(s.xu,{bg:"white",border:"2px dashed black",borderRadius:"md",p:"2%",display:"flex",alignItems:"center",justifyContent:"space-between",mt:"4%",children:[(0,x.jsx)(s.xu,{as:"span",fontWeight:"bold",color:"black",children:(0,c.dKN)(m)}),(0,x.jsx)(Ie.Z,{sx:{color:p?{whatmoreSecondaryColor:g}:"gray",cursor:"pointer",marginLeft:"2%"}})]}),p&&(0,x.jsx)(s.xu,{padding:"4%",position:"absolute",left:"50%",transform:"translateX(-50%)",bg:g,color:"white",fontSize:"12px",borderRadius:"md",px:"2%",py:"0.5%",textAlign:"center",children:"Copied!"})]})]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(s.xu,{textAlign:"center",color:"white",children:[(0,x.jsx)(s.xu,{children:(0,x.jsx)(s.xv,{fontFamily:f,fontSize:"22px",fontWeight:"bold",children:w})}),(0,x.jsx)(s.xu,{marginBottom:"10%",fontSize:"md",children:(0,c.ewB)(m)})]}),(0,x.jsx)(s.xu,{position:"fixed",top:"2%",right:"2%",zIndex:20,children:(0,x.jsx)(P.Z,{onCloseCallback:C})}),(0,x.jsxs)(s.kC,{mt:"4%",align:"center",direction:"column",width:"80%",children:[(0,x.jsx)(s.xu,{sx:{bg:"white",border:"2px solid #4A4A4A",borderRadius:"8px",paddingLeft:"4%",display:"flex",alignItems:"center",marginBottom:"6%",width:"100%",height:"auto",minH:"48px"},children:(0,x.jsx)("input",{fontFamily:f,type:"number"===(null===(i=t.question)||void 0===i?void 0:i.type)?"tel":"email",placeholder:t.placeholder,value:o,onChange:t=>{r(t.target.value),l&&a("")},onKeyDown:t=>{"Enter"===t.key&&y()},style:{fontSize:"1em",border:"none",outline:"none",width:"100%"}})}),l&&(0,x.jsx)(s.xv,{color:"red.500",mb:"4% !important",fontSize:"md",textAlign:"center",width:"100%",children:l}),(0,x.jsx)(s.xu,{as:"button",bg:"#D3D3D3",color:"#343434",borderRadius:"md",fontWeight:"bold",height:"35px",display:"flex",alignItems:"center",justifyContent:"center",onClick:y,width:"50%",children:(0,x.jsx)(s.xv,{fontFamily:f,fontSize:"0.8em",padding:"2%",color:g,children:"SUBMIT"})})]})]})})};var _e=t=>{const[e,i]=(0,n.useState)(null);return(0,x.jsx)(s.xu,{children:!e&&(0,x.jsx)(ke,{question:t.question,onEmailSubmit:t=>{i(t)},setIsQuestionVisible:t.setIsQuestionVisible,placeholder:t.placeholder})})};var Te=t=>{var e;const[i,o]=(0,n.useState)(null),r=t.questionIndex,l=t.questionList;if((0,n.useEffect)((()=>{if(!(r>=l.length))return()=>(0,ot.xw)()}),[]),r>=l.length)return;const a=null===l||void 0===l?void 0:l[r];return"string"===(null===a||void 0===a?void 0:a.type)||"number"===(null===a||void 0===a?void 0:a.type)?(0,x.jsx)(s.xu,{children:(0,x.jsx)(_e,{setIsQuestionVisible:t.setIsQuestionVisible,question:a,placeholder:"number"===(null===a||void 0===a?void 0:a.type)?"Enter your phone number":"Enter your email"})}):(0,x.jsx)(s.xu,{children:(0,x.jsx)(Se,{question:a,options:null===a||void 0===a||null===(e=a.answers)||void 0===e?void 0:e.values.map((t=>null===t||void 0===t?void 0:t.value)),onAnswerSelect:t=>{o(t)},selectedAnswer:i,onClose:()=>{t.setIsQuestionVisible(!1)},setIsQuestionVisible:t.setIsQuestionVisible})})},Fe=i(2882);function Ee(t){var e;const i=t.event,[o,r,l,a]=(0,h.Z)(),[d]=(0,u.j1)("whatmorePrimaryFont"),{whatmoreIsStoriesTemplate:p}=(0,n.useContext)(V.I),[v]=(0,u.j1)("whatmoreSecondaryColor"),[m]=(0,u.j1)("whatmoreShopId"),g=(0,c.f63)(m),f=null!==(e=(0,c.u2W)(m))&&void 0!==e?e:[v,g,v,g,v],w=(0,n.useRef)(null);(0,n.useEffect)((()=>{w.current&&w.current.play()}),[]);const j=(0,ae.V)(null===i||void 0===i?void 0:i.storyset_thumbnail_image);return(0,x.jsx)(x.Fragment,{children:p?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",padding:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-start",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{overflow:"hidden",size:.14*t.width+"px",sx:{boxShadow:"0px 2px 1px 0px "+f[0]+"50, 0px -2px 1px 0px "+f[1]+"50, 2px 0px 1px 0px "+f[2]+"50, -2px 0px 1px 0px "+f[3]+"80, 2px -2px 1px 0px "+f[4]+"80, -2px 2px 1px 0px "+f[0]+"DA, 2px 2px 1px 0px "+f[1]+"DA, -2px -2px 1px 0px "+f[2]+"DA"},children:"video"==(0,pt.$)(j)?(0,x.jsx)(ye.Z,{height:"100%",width:"100%",poster:null===i||void 0===i?void 0:i.thumbnail_image,url:j,isPlaying:!0,event:{event_type:"video"},borderRadius:"50%"}):(0,x.jsx)("img",{src:j,style:{objectFit:"cover",height:"100%",width:"100%",backgroundColor:"white"}})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:.05*t.width+"px",fontWeight:"medium",lineHeight:"100%",sx:{fontFamily:d+" !important",color:"white !important",textShadow:"0px 0px 4px black !important;"},children:i.storyset_name})})]})}):(0,x.jsx)(x.Fragment,{})})}var Pe=function(t){var e,i,o;const[r,a,d]=(0,me.Z)(),[p]=(0,u.j1)("isInDesignMode"),[v]=(0,u.j1)("isDemoBrand"),[m,g]=(0,u.j1)("isProductSwiperCatalogOpen"),[f,w]=(0,u.j1)("isFirstIndicatorRenderDone"),[j]=(0,u.j1)("whatmoreShopId"),C=(0,n.useContext)(fi),{whatmoreEventsBrowsingTemplate:b}=(0,n.useContext)(V.I),[S,I,k,_]=(0,h.Z)(),T=(0,u.MO)("whatmorePrimaryFont"),E=t.event,O=t.storySetId,z=t.isLast,L=t.onCloseCallback,D=t.focusRef,R=t.productClickHandler,A=t.videoPlayingData,K=t.totalSiblingEvents,W=t.indexAmongSiblings,Z=t.leftOpenSpaceClickHandler,H=t.midOpenSpaceClickHandler,U=t.rightOpenSpaceClickHandler,{whatmoreWidgetSourceDetails:B}=(0,n.useContext)(V.I),Y=.1*_,[X,G]=(0,n.useState)(!1),[$,Q]=(0,n.useState)([]),J=t=>{tt.current&&!tt.current.contains(t.target)&&G(!1)},tt=(0,n.useRef)(null);(0,n.useEffect)((()=>(X?document.addEventListener("click",J):document.removeEventListener("click",J),()=>{document.removeEventListener("click",J)})),[X]);const et="Free"==(0,c.Svj)(j)&&"portrait"==r;return(0,x.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[t.isQuestionVisible&&(0,x.jsx)(Lt.u,{userInteractionType:N.K.QUESTION_VIEWED,userInteractionMetadata:{questionId:null===(e=t.questionList)||void 0===e||null===(i=e[t.qIndex])||void 0===i?void 0:i.id},triggerFlag:!p&&!v,children:(0,x.jsx)(Te,{questionList:t.questionList,questionIndex:t.qIndex,setIsQuestionVisible:t.setIsQuestionVisible})}),X&&(0,x.jsx)("div",{ref:tt,className:"whatmore-share-modal",style:{zIndex:100,position:"absolute",boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.6)",width:"75%",top:"45%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},children:(0,x.jsx)(we,{shareText:$,setShareText:Q,iconSize:Y,isModalOpen:X,setIsModalOpen:G})}),"55194878152"==j&&(0,x.jsx)("div",{style:{position:"absolute",boxShadow:"dark-lg",transform:"scale(1.2) translateY(10%) translateX(5%)"},children:(0,x.jsx)("img",{src:"https://s3.ap-south-1.amazonaws.com/whatmorelive.brand.other.assets/nureh/Shop_by_Sale_50_-removebg-preview.png"})}),(!t.isQuestionVisible||t.qIndex>=(null===t||void 0===t||null===(o=t.questionList)||void 0===o?void 0:o.length))&&(0,x.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,x.jsxs)(s.Kq,{width:"full",height:"fit-content",direction:"column",justifyContent:"flex-start",alignItems:"center",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:[C.showVideoPlayingData?(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",marginTop:"5px",justifyContent:"center",children:(0,x.jsx)(le,{progress:re(A.current_time,A.video_duration),totalSiblings:K,indexAmongSiblings:W})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{width:"full",margin:"2px",marginTop:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",paddingRight:"10px",paddingLeft:"10px",children:[(0,x.jsx)(Ee,{event:E,width:_}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,mt.ZK)(b)?(0,x.jsx)(ue,{whatmoreShareTemplateId:(0,mt.QN)(b),whatmoreShareStoryId:O,whatmoreShareEventId:E.event_id,event:E,showShareText:!1,iconSize:.07*_,shareButtonBottomMargin:6,setIsModalOpen:G,setShareText:Q}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(y,{focusRef:D}),("landscape"!==r||t.showCloseOverlay)&&(0,x.jsx)(P.Z,{event:E,onCloseCallback:L})]})]})})]}),"78232846646"===j&&"portrait"===r&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s.xu,{position:"absolute",top:.49*window.innerHeight+"px",left:.92*window.innerWidth+"px",transform:"translate(-50%, -50%)",zIndex:101,children:(0,x.jsx)(Fe.Z,{style:{fontSize:1.3*Y+"px",transform:"rotate(180deg)",color:"white",cursor:"pointer",filter:"drop-shadow(0 0 5px black)"},onClick:()=>{t.changeSlide(E,"right")}})}),(0,x.jsx)(s.xu,{position:"absolute",top:.42*window.innerHeight+"px",left:.92*window.innerWidth+"px",transform:"translate(-50%, -50%)",zIndex:101,children:(0,x.jsx)(Fe.Z,{style:{fontSize:1.3*Y+"px",color:"white",cursor:"pointer",filter:"drop-shadow(0 0 5px black)"},onClick:()=>{t.changeSlide(E,"left")}})})]}),(0,x.jsxs)(s.Kq,{width:"100%",height:"100%",direction:"row",justifyContent:"center",children:[(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{Z()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"34%",height:"100%",onClick:()=>{H()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{U()},sx:{display:"block !important"}})]}),(0,x.jsxs)(s.xu,{width:"full",height:"fit-content",children:[C.totalEvents>1&&!f&&C.showSwipeIndicator?(0,x.jsx)(s.xu,{width:"full",margin:"2px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,x.jsx)(M,{swipeUp:!z})})}):null,(0,x.jsxs)(s.xu,{width:"fit-content",height:"fit-content",position:"absolute",right:0,bottom:"25%",children:[(0,c.slY)(j)&&!(0,mt.ZK)(b)?(0,x.jsx)(s.xu,{ml:"auto",width:"fit-content",paddingY:"12px",paddingX:"8px",position:"relative",top:"-30px",children:(0,x.jsxs)(s.Kq,{gap:"4px",direction:"column",alignItems:"center",cursor:"pointer",onClick:function(){var t;p||v||(async()=>{(0,l.lY)(E,1)})(),(0,q.GF)({userInteractionType:N.K.WHATSAPP_ICON_CLICKED,widgetSourceDetails:B,event:E,productList:null===E||void 0===E?void 0:E.products,ctaList:null===E||void 0===E?void 0:E.cta});const e=E.products.map((t=>`${t.product_link} \n`)),i=(0,c.gtK)(j),n=`Hey, I am interested in ${E.products.length>1?"these products":"this product"} I saw on ${null===(t=E.products[0])||void 0===t?void 0:t.brand} store: \n${e}. Could you please help me with some queries?`;window.open(i+`&text=${n}&type=phone_number`,"_blank")},children:[(0,x.jsx)(xe,{iconSize:.7*Y,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)(s.xv,{fontSize:Y*(0,c.Xod)(j)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:T+" !important",color:"white !important"},children:(0,c.UiZ)(j)})]})}):(0,x.jsx)(x.Fragment,{}),(0,c.jY3)(j)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",position:"relative",top:"-30px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(ve,{event:E})})}):(0,x.jsx)(x.Fragment,{}),(0,c.ROU)(j)&&!(0,mt.ZK)(b)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",position:"relative",top:"-30px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(ue,{whatmoreShareTemplateId:(0,mt.QN)(b),whatmoreShareStoryId:O,whatmoreShareEventId:E.event_id,event:E,setIsModalOpen:G,setShareText:Q})})}):(0,x.jsx)(x.Fragment,{})]}),(0,zt.kT)(E)?(0,x.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(j)?(0,x.jsx)(s.xu,{w:"100%",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(F,{event:E,onToggle:t=>{g("minimize-button"!==t)}})})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,x.jsx)(Mt,{event:E,productClickHandler:R})})]}):(0,x.jsx)(x.Fragment,{})]}),et&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",bg:"rgba(52, 52, 52, 0.9)",py:"3px",justifyContent:"center",children:(0,x.jsx)(je,{brandName:null===E||void 0===E?void 0:E.brand,fontSize:.033*_})})]})]})},Oe=i(2279),ze=i.n(Oe),Le=i(342);var De=function(t){var e,i,o,r,l,a,[d,m,g,f]=(0,h.Z)();const[w,j]=(0,n.useState)(!1),[y,C]=(0,n.useState)(),[b,S]=(0,n.useState)(),[I,k]=(0,n.useState)({current_time:0,video_duration:0,is_video_ended:!1}),_=(0,u.MO)("whatmoreShopId"),T=t.event,F=t.storyId,E=t.onBack,P=n.useRef(),O=t.changeSlide,z=t.isPlaying,L=t.isLast,D=t.setLockSwiper,M=t.onVideoEndedCallback,R=t.progressUpdateCallback,A=null!==(e=t.totalSiblingEvents)&&void 0!==e?e:0,K=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0,W=null===(o=t.showOverlay)||void 0===o||o,Z=null!==(r=t.leftOpenSpaceClickHandler)&&void 0!==r?r:()=>{},H=null!==(l=t.midOpenSpaceClickHandler)&&void 0!==l?l:()=>{},U=null!==(a=t.rightOpenSpaceClickHandler)&&void 0!==a?a:()=>{},{whatmoreWidgetSourceDetails:B}=(0,n.useContext)(V.I),{questionList:Y}=(0,n.useContext)(fi),X=(null===Y||void 0===Y?void 0:Y.length)>0?parseInt(localStorage.getItem("_whatmore_qview_index")):1e4,[G,$]=(0,n.useState)();(0,n.useEffect)((()=>{$(t.showQuestion)}),[t.showQuestion]);const Q="center";let J;try{J=ze()((()=>{M()}),1e3,{leading:!0,trailing:!1})}catch(tt){console.log(tt)}return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:f,height:g,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:Q,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:f/g,children:(0,x.jsx)(v.Z,{height:"100%",width:"100%",url:(0,ae.V)((0,Le.uv)(T)),isPlaying:z&&(!G||X>=Y.length),timeUpdateCallback:function(t,e){const i=re(t,e);R({watch_time:t,video_duration:e});const n=I.is_video_ended;i>=99&&z&&!n?(J(),k({current_time:t,video_duration:e,is_video_ended:!0})):k({current_time:t,video_duration:e,is_video_ended:n})},event:T,question:G&&X<(null===Y||void 0===Y?void 0:Y.length),source:t.source})})})}),W?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:Q,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(Pe,{focusRef:P,event:t.event,isLast:L,onCloseCallback:t=>{E(t),(0,q.Z2)({userInteractionType:N.K.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:I.current_time,video_duration:I.video_duration},widgetSourceDetails:B,event:T,productList:T.products,ctaList:T.cta})},productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(_),_);S(t),C(e),j(!0),D(!0),(0,q.GF)({userInteractionType:N.K.SHOPNOW_CLICKED,widgetSourceDetails:B,event:T,productList:T.products,ctaList:T.cta}),(0,u.bU)("whatmoreAllowAutoSlide",!1)},videoPlayingData:I,totalSiblingEvents:A,indexAmongSiblings:K,questionList:Y,isQuestionVisible:G&&X<(null===Y||void 0===Y?void 0:Y.length),qIndex:X,setIsQuestionVisible:$,leftOpenSpaceClickHandler:Z,midOpenSpaceClickHandler:H,rightOpenSpaceClickHandler:U,storySetId:F,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:O})})}):(0,x.jsx)(x.Fragment,{}),!0===w?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:Q,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(ne,{focusRef:P,event:t.event,isLast:L,onCloseCallback:()=>E(),setLockSwiper:D,data:y,currentProduct:b,setOpenShopNow:t=>{j(t),(0,u.bU)("whatmoreAllowAutoSlide",!t)}})})}):(0,x.jsx)("div",{})]})})},Me=i(7300),Re=i(8984),Ae=i(58),Ke=i(9723);var We=function(t){var[e,i,n,o]=(0,h.Z)();const r=(0,u.MO)("whatmoreShopId"),l=t.event,a=t.isPlaying,d="center";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:o,height:n,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:d,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:o/n,children:(0,x.jsx)(v.Z,{height:"100%",width:"100%",url:(0,ae.V)((0,Le.uv)(l)),isPlaying:a,timeUpdateCallback:function(t,e){},event:l,source:t.source})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:d,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",backdropFilter:"auto",backdropBlur:"10px",onClick:t=>{(0,Ae.QV)()},children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"full",width:"full",children:[(0,x.jsx)(Ke.Z,{sx:{boxShadow:3,color:(0,c.Ya_)(r),fontSize:.4*o,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{(0,Ae.QV)()}}),(0,x.jsx)(s.xv,{color:"white",fontSize:.05*o+"px",fontWeight:"bold",align:"left",children:"Please click to play video.."})]})})})]})})},qe=i(3433),Ne=i(653);const Ve=n.lazy((()=>i.e(258).then(i.bind(i,5824))));var Ze=function(t){var e,i;const n=t.changeSlide,o=t.event,r=null===(e=t.isPlaying)||void 0===e||e,l=t.onBack,s=t.isLast,c=t.setLockSwiper,h=(t.heightFactor,t.widthFactor,t.onVideoEndedCallback),p=t.progressUpdateCallback,[v,m]=(0,j.Z)(),[g]=(0,u.j1)("whatmoreVideoPlayerPoolBlessed"),f=null===(i=t.showOverlay)||void 0===i||i;function w(){m(!v)}if((0,Re.KE)()&&0==g&&"recommended_images"!=(null===o||void 0===o?void 0:o.event_type))return(0,Ne.j)()?(0,x.jsx)(We,{event:o,onBack:l,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:h,progressUpdateCallback:p,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:f,source:qe.j.CAROUSEL_EVENT_OPENED},"shopping-video-view"+o.event_id):(0,x.jsx)(De,{event:o,onBack:l,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:h,progressUpdateCallback:p,showQuestion:t.showQuestion,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:f,source:qe.j.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:n},"shopping-video-view"+o.event_id);if((0,Me.B6)(o)||(0,Me.WJ)(o))return(0,x.jsx)(De,{event:o,onBack:l,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:h,progressUpdateCallback:p,showQuestion:t.showQuestion,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:f,source:qe.j.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:n},"shopping-video-view"+o.event_id);if("recommended_images"==(null===o||void 0===o?void 0:o.event_type))return(0,x.jsx)(Ve,{onBack:l,mode:t.mode,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,imageUrls:null===o||void 0===o?void 0:o.product_list});if((0,Me.yC)(o)){var{status:y,bannerText:C,timeToStartInMins:b}=d.Z.getEventStatus(o);if(y.name===a.Z.LIVE.name)return(0,x.jsx)(oe,{event:o,onBack:l,isPlaying:r,isLast:s,showOverlay:f},"shopping-live-view"+o.event_id)}return console.error("Can't render event which is neither video or a currently-live-event"),(0,x.jsx)("div",{})},He=i(9284),Ue=i.n(He),Be=i(7463),Ye=i(2154);function Xe(t){var e;const[i,o]=(0,n.useState)(!1),r=t.onClick,l=null!==(e=t.fontSize)&&void 0!==e?e:50;return(0,x.jsx)("div",{style:{height:"fit-content",width:"fit-content",backgroundColor:"black",opacity:.4,borderRadius:"50%"},className:[i?"whatmore-scale-on-tap":""].join(" "),children:"left"===t.type?(0,x.jsx)(Ye.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{o(!0),setTimeout((()=>{o(!1)}),500),r(t,"up")}}):(0,x.jsx)(Be.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{o(!0),setTimeout((()=>{o(!1)}),500),r(t,"down")}})})}var Ge=function(t){var e,i,n;const o=null!==(e=t.relativeBottomPercentage)&&void 0!==e?e:"30%",r=null!==(i=t.width)&&void 0!==i?i:"100%",l=null!==(n=t.fontSize)&&void 0!==n?n:50,a=t.handleClick;return(0,x.jsx)("div",{style:{position:"relative",zIndex:1,bottom:o,width:"100%",height:"fit-content",display:"flex",flexFlow:"row nowrap",justifyContent:"center"},id:"here",children:(0,x.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:r,height:"fit-content",paddingRight:"5px",paddingLeft:"5px",paddingTop:"5px",paddingBottom:"5px",justifyContent:"space-between",alignContent:"center"},children:[(0,x.jsx)(Xe,{type:"left",onClick:a,fontSize:l}),(0,x.jsx)(Xe,{type:"right",onClick:a,fontSize:l})]})})},$e=i(2860),Qe=i(4669);var Je=function(t,e){function i(t,e){return 1==e?0:t<0?e+t:t>=e?t-e:t}const o=(0,n.useRef)({prevIndex:i(t-1,e),activeIndex:t,nextIndex:i(t+1,e)});return[function(){return o.current},function(t){o.current="right"==t?{prevIndex:i(o.current.activeIndex,e),activeIndex:i(o.current.activeIndex+1,e),nextIndex:i(o.current.activeIndex+2,e)}:{prevIndex:i(o.current.activeIndex-2,e),activeIndex:i(o.current.activeIndex-1,e),nextIndex:i(o.current.activeIndex,e)}},function(t){return i(o.current.activeIndex+t)}]};var ti=function(t,e){const i=(0,n.useRef)({clientX:0,clientY:0});return[function(t){i.current.clientX=t.changedTouches[0].clientX,i.current.clientY=t.changedTouches[0].clientY},function(n){const o=i.current.clientX,r=i.current.clientY;var l=o-n.changedTouches[0].clientX,a=r-n.changedTouches[0].clientY;return"vertical"==t&&Math.abs(a)>e||"horizontal"==t&&Math.abs(l)>e?"vertical"==t?a>0?"right":"left":l>0?"right":"left":null}]};var ei=function(t,e){const i=(0,n.useRef)(ze()(((t,e)=>{t(e)}),300,{leading:!0,trailing:!1}));return[function(n,o){var r=0;if(r="vertical"==t?n.deltaY:n.deltaX,Math.abs(r)<=e)return;const l=r>0?"right":"left";i.current(o,l)}]},ii=i(5173);var ni=function(t){const e=t.events,i=t.eventIndex,a=t.onBack;var[d,p,v,m]=(0,h.Z)();const[g]=(0,u.j1)("isInDesignMode"),[f]=(0,u.j1)("isDemoBrand"),[w,j]=(0,n.useState)(!0),[y,C]=(0,u.j1)("isFirstIndicatorRenderDone"),[b,S]=(0,n.useState)(!1),[I,k]=(0,n.useState)({}),{setCloseClickComponent:_}=(0,n.useContext)(fi),{slideDirection:T}=(0,n.useContext)(fi),[F]=(0,u.j1)("whatmoreShopId"),[E]=(0,u.j1)("whatmoreLandingLocationType"),[P,O]=Je(i,e.length),[z,L]=ti(T,50),[D]=ei("vertical",30),[M,R]=(0,n.useState)(!1),[A,W]=(0,n.useState)(null),{whatmoreWidgetSourceDetails:Z,whatmoreUserInfo:H}=(0,n.useContext)(V.I);function U(){R(!1)}function B(t){U(),setTimeout((()=>{a(t)}),500)}(0,n.useEffect)((()=>(R(!0),()=>{})),[]);const Y=Z.landingLocationType,X=Z.templateType;_(B);let G=i;const{questionList:$}=(0,n.useContext)(fi);function Q(){(0,u.MO)("whatmoreAllowAutoSlide")&&(O("right"),A.slideNext())}function J(t,e){O(e),function(t,e){A&&("left"===e?A.slidePrev():A.slideNext())}(0,e)}const tt=Math.round(.05*v);return(0,x.jsx)(Ue(),{isOpen:M,onAfterOpen:function(){},onRequestClose:U,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)(ii.Z,{children:(0,x.jsxs)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:(0,K.lA)("#000000",13)},onTouchStart:t=>{z(t)},onTouchEnd:t=>{if(b)return;const e=L(t);e&&J(0,e)},onWheel:t=>{b||D(t,(t=>{J(0,t)}))},children:[(0,x.jsx)(o.tq,{speed:400,threshold:tt,slidesPerView:1,direction:T,modules:[r.tl,r.Gk],initialSlide:i,loop:1!=e.length,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,allowSlideNext:!b,allowSlidePrev:!b,allowTouchMove:!1,onSwiper:t=>{W(t),(0,q.GF)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:Z,event:e[P().activeIndex],productList:e[P().activeIndex].products})},onSlideChange:t=>{var i;w?j(!1):(y||C(!0),(0,q.Z2)({userInteractionType:N.K.VIDEO_PLAYBACK,userInteractionMetadata:I,widgetSourceDetails:Z,event:e[P().activeIndex],productList:e[P().activeIndex].products}),i=e[P().activeIndex],g||f||null===i||void 0===i||!i.event_id||(async()=>{const t=(0,mt.NY)(Y)+(0,mt.dS)(X)+(null!==i&&void 0!==i&&i.isRelatedEvent?"R":"E")+"_"+(null===i||void 0===i?void 0:i.event_id);(0,l.wh)(i),"index"===E?((0,Qe.Tc)(F,$e.Xh,$e.pR),(0,ot.H4)(i.event_id,i.products,$e.Xh,$e.pR,t,null===i||void 0===i?void 0:i.location,null===H||void 0===H?void 0:H.userType)):E.startsWith("product")||"embed"===E?((0,Qe.Tc)(F,$e.h7,$e.dU),(0,ot.H4)(i.event_id,i.products,$e.h7,$e.dU,t)):E.startsWith("collection")?((0,Qe.Tc)(F,$e.U$,$e.Pk),(0,ot.H4)(i.event_id,i.products,$e.U$,$e.Pk,t)):((0,Qe.Tc)(F,$e.Xh,$e.pR),(0,ot.H4)(i.event_id,i.products,$e.Xh,$e.pR,t))})(),(0,q.y4)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:Z,event:e[P().activeIndex],productList:e[P().activeIndex].products}))},children:[...Array(Math.min(e.length,3)).keys()].map((n=>(0,x.jsx)(o.o5,{children:n=>{let{isActive:o,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=n;const u=o?"activeIndex":r?"prevIndex":"nextIndex",h=P()[u];"activeIndex"==u&&(G=Math.max(G,h),0==h&&(G=0));const p=(null===$||void 0===$?void 0:$.length)>0&&o&&a&&(h>i||G<i&&h>0)&&h>=G&&h%(0,c.rFm)(F)==i%(0,c.rFm)(F);return(0,x.jsx)(s.Kq,{direction:"column",height:window.innerHeight,justifyContent:"center",children:(0,x.jsx)(Ze,{event:e[h],showQuestion:p,onBack:B,isPlaying:1==e.length||o&&a,isLast:!1,setLockSwiper:S,onVideoEndedCallback:Q,progressUpdateCallback:t=>{k(t)},showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,mode:"portrait",changeSlide:J})})}},"event-vertical-scroll-slide-"+n)))}),e.length>1&&!b&&(0,c.h6H)(F)&&"horizontal"===(0,c.e8z)(F)&&"horizontal"===T?(0,x.jsx)(Ge,{relativeBottomPercentage:"50%",width:m,handleClick:(t,e)=>{J(0,"down"==e?"right":"left")},fontSize:parseInt(.12*m)}):(0,x.jsx)(x.Fragment,{})]})})})},oi=i(1168);i(6143),i(7850),i(4444),i(7244),i(123),i(5892),i(1811);const ri=t=>{let{children:e,customClass:i,show:n,closeCallback:o}=t;return oi.createPortal((0,x.jsxs)("div",{className:`whatmore-landscape-modal whatmore-root ${i}`,style:{display:n?"block":"none"},children:[(0,x.jsx)("div",{className:"whatmore-landscape-modal-overlay",onClick:o}),(0,x.jsx)("div",{className:"whatmore-landscape-modal-content",children:e})]}),document.body)};ri.defaultProps={children:(0,x.jsx)("div",{children:"Empty Modal"}),customClass:"",show:!1,closeCallback:()=>!1};var li=ri;var ai=function(t){var e,[i,a,d,p]=(0,h.Z)();const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[g,f]=(0,u.j1)("isFirstIndicatorRenderDone"),[w,j]=(0,n.useState)(0!=t.eventIndex),{setCloseClickComponent:y}=(0,n.useContext)(fi),[C,b]=(0,n.useState)(!1),[S]=(0,u.j1)("whatmoreShopId"),[I]=(0,u.j1)("whatmoreLandingLocationType"),k=(0,u.MO)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:_,whatmoreUserInfo:T}=(0,n.useContext)(V.I),[F,E]=(0,n.useState)(!1),[O,z]=(0,n.useState)(null);function L(){E(!1)}const D=t.events,M=t.eventIndex,R=t.onBack,A=D.concat(D),W=D.length,Z=null===D||void 0===D||null===(e=D[0])||void 0===e?void 0:e.brand,H=(0,n.useRef)(0);function U(t){L(),setTimeout((()=>{R(t)}),500)}function B(){O&&!O.isEnd&&(0,u.MO)("whatmoreAllowAutoSlide")&&O.slideNext()}(0,n.useEffect)((()=>(E(!0),()=>{})),[]),y(U);const Y=_.landingLocationType,X=_.templateType,[G,$]=(0,n.useState)({}),Q=parseInt(Math.min(5,D.length));return(0,x.jsx)(li,{show:F,closeCallback:L,customClass:"whatmore-landscape-modal-swipe-view",children:(0,x.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",alignItems:"center",backgroundColor:(0,K.lA)("#000000",13),children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:p*Q,children:(0,x.jsxs)(o.tq,{onInit:t=>{z(t),(0,q.GF)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:_,event:D[t.activeIndex],productList:D[t.activeIndex].products,ctaList:D[t.activeIndex].cta})},slidesPerView:Q,centeredSlides:!0,allowTouchMove:!1,initialSlide:M,modules:[r.lI,r.W_,r.Gk,r.pt,r.tl],navigation:Q>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*d),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:p*Q,watchSlidesProgress:!0,onSlideChange:t=>{var e;w?j(!1):(g||f(!0),e=D[t.activeIndex],v||m||null===e||void 0===e||!e.event_id||(async()=>{const t=(0,mt.NY)(Y)+(0,mt.dS)(X)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,l.wh)(e),"index"===I?((0,Qe.Tc)(S,$e.Xh,$e.pR),(0,ot.H4)(e.event_id,e.products,$e.Xh,$e.pR,t,null===e||void 0===e?void 0:e.location,null===T||void 0===T?void 0:T.userType)):I.startsWith("product")||"embed"===I?((0,Qe.Tc)(S,$e.h7,$e.dU),(0,ot.H4)(e.event_id,e.products,$e.h7,$e.dU,t)):I.startsWith("collection")?((0,Qe.Tc)(S,$e.U$,$e.Pk),(0,ot.H4)(e.event_id,e.products,$e.U$,$e.Pk,t)):((0,Qe.Tc)(S,$e.Xh,$e.pR),(0,ot.H4)(e.event_id,e.products,$e.Xh,$e.pR,t))})(),(0,q.Z2)({userInteractionType:N.K.VIDEO_PLAYBACK,userInteractionMetadata:G,widgetSourceDetails:_,event:D[t.activeIndex],productList:D[t.activeIndex].products,ctaList:D[t.activeIndex].cta}),(0,q.y4)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:_,event:D[t.activeIndex],productList:D[t.activeIndex].products,ctaList:D[t.activeIndex].cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[D.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(P.Z,{onCloseCallback:R})}),A.slice(M,D.length+M).map(((t,e)=>(0,x.jsx)(o.o5,{children:t=>{let{isActive:i,isPrev:n,isNext:o,isVisible:r,isDuplicate:l}=t;if(i)return(0,x.jsx)(s.Kq,{direction:"column",height:d,width:1*p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==k?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Ze,{event:D[e%W],onBack:U,isPlaying:!0,isLast:e%W===D.length-1,setLockSwiper:b,widthFactor:1,heightFactor:1,onVideoEndedCallback:B,progressUpdateCallback:t=>{$(t)},showCloseOverlay:(null===D||void 0===D?void 0:D.length)<=2,mode:"landscape"})})});if(o)return(0,x.jsx)(s.Kq,{direction:"column",height:d,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{O.slideTo(e%W,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==k?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Ze,{event:D[e%W],onBack:U,isPlaying:!1,isLast:e%W===D.length-1,setLockSwiper:b,widthFactor:1,heightFactor:1,onVideoEndedCallback:B,progressUpdateCallback:t=>{$(t)},showOverlay:!1,mode:"landscape"})})});if(n&&1===H.current)return(0,x.jsx)(s.Kq,{direction:"column",height:d,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{O.slideTo(e%W,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==k?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Ze,{event:D[e%W],onBack:U,isPlaying:!1,isLast:e%W===D.length-1,setLockSwiper:b,widthFactor:1,heightFactor:1,onVideoEndedCallback:B,progressUpdateCallback:t=>{$(t)},showOverlay:!1,mode:"landscape"})})});try{M+e>=W-1&&(H.current=1)}catch(a){console.log(a)}return(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide"+t.event_id)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(je,{brandName:Z,height:.04*d,width:.1*p,fontSize:.02*d})})]})})},di=i(6090),si=i(7616),ci=i(9302),ui=i(2575);var hi=function(t){const[e,i,n,o]=(0,h.Z)(),[r]=(0,u.j1)("whatmorePrimaryColor"),[l]=(0,u.j1)("whatmoreSecondaryColor"),a="flex-end";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:o,height:n,backgroundColor:"whiteAlpha.200",backdropBlur:"10px",children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:a,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.oM,{width:"full",ratio:o/n,children:(0,x.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+r+", gray, "+l+")"})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:a,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{padding:"2px",margin:"5px",borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,x.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",backdropFilter:"auto",backdropBlur:"5px"})})})})]})})};var pi=function(t){var e;const i=t.stories,r=t.onBack,a=t.onStoryCompleteCallback,d=t.isActive,c=null!==(e=t.initialEventIndex)&&void 0!==e?e:0,p=i.events;var[v,m,g,f]=(0,h.Z)();const[w,y]=(0,j.Z)(),[C]=(0,u.j1)("isInDesignMode"),[b]=(0,u.j1)("isDemoBrand"),[S]=(0,u.j1)("whatmoreShopId"),[I,k]=(0,n.useState)(!0),[_,T]=(0,u.j1)("isFirstIndicatorRenderDone"),[F,E]=(0,n.useState)(null),[P,O]=(0,n.useState)(!1),{whatmoreWidgetSourceDetails:z,whatmoreUserInfo:L}=(0,n.useContext)(V.I),[D,M]=Je(c,p.length);function R(t){r(t)}const A=z.landingLocationType,K=z.templateType;function W(){if(!(0,u.MO)("whatmoreAllowAutoSlide"))return;D().activeIndex+1>=p.length?a("right"):(M("right"),F&&F.slideNext())}function Z(t){const e=D().activeIndex;"right"==t&&e+1>=p.length||"left"==t&&e-1<0?a(t):(M(t),F&&("left"==t?F.slidePrev():F.slideNext()))}const[H,U]=(0,n.useState)({});return p[D().activeIndex],(0,x.jsx)("div",{children:(0,x.jsx)(o.tq,{speed:1,slidesPerView:1,direction:"horizontal",initialSlide:0,loop:!0,height:g,width:f,watchSlidesProgress:!0,allowTouchMove:!1,onSwiper:t=>{E(t)},onSlideChange:t=>{I?k(!1):(_||T(!0),(0,q.Z2)({userInteractionType:N.K.VIDEO_PLAYBACK,userInteractionMetadata:H,widgetSourceDetails:z,event:p[D().activeIndex],productList:p[D().activeIndex].products,ctaList:p[D().activeIndex].cta}),function(t){const e=(0,mt.NY)(A)+(0,mt.dS)(K)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);C||b||(async()=>{(0,l.wh)(t),(0,Qe.Tc)(S,$e.Xh,$e.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===L||void 0===L?void 0:L.userType)})()}(p[D().activeIndex]),(0,q.GF)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:z,event:p[D().activeIndex],productList:p[D().activeIndex].products,ctaList:p[D().activeIndex].cta}))},children:[...Array(Math.min(p.length,3)).keys()].map((e=>(0,x.jsx)(o.o5,{children:e=>{let{isActive:n,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=e;if(d){const e=n?"activeIndex":o?"prevIndex":"nextIndex",r=p[D()[e]];return(0,x.jsx)(s.Kq,{direction:"column",height:g,justifyContent:"center",children:(0,Me.B6)(r)||(0,Me.WJ)(r)?(0,x.jsx)(De,{event:r,totalSiblingEvents:p.length,indexAmongSiblings:D()[e],onBack:R,isPlaying:d&&n&&l,isLast:!1,setLockSwiper:O,onVideoEndedCallback:W,progressUpdateCallback:t=>{U(t)},leftOpenSpaceClickHandler:()=>{Z("left")},midOpenSpaceClickHandler:()=>{y(!w)},rightOpenSpaceClickHandler:()=>{Z("right")},storyId:i.id,source:qe.j.STORY_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id):(0,x.jsx)(x.Fragment,{})})}return(0,x.jsx)(s.Kq,{direction:"column",height:v,justifyContent:"center",children:(0,x.jsx)(hi,{})})}},"event-story-view-slide-"+e)))})})};var vi=function(t){const e=t.onBack,i=t.eventsStories,a=t.initialStoryIndex;var[d,c,p,v]=(0,h.Z)();const[m]=(0,u.j1)("isInDesignMode"),[g]=(0,u.j1)("isDemoBrand"),[f,w]=(0,n.useState)(!0),[j,y]=(0,u.j1)("isFirstIndicatorRenderDone"),[C,b]=(0,n.useState)(!1),{setCloseClickComponent:S}=(0,n.useContext)(fi),{slideDirection:I}=(0,n.useContext)(fi),[k]=(0,u.j1)("whatmoreShopId"),[_,T]=Je(a,i.length),[F,E]=ti("horizontal",50),[P]=ei("vertical",30),O=t.eventIndex,[z,L]=(0,n.useState)(!1),[D,M]=(0,n.useState)(null),{whatmoreWidgetSourceDetails:R,whatmoreUserInfo:A}=(0,n.useContext)(V.I);function K(){L(!1)}function W(t){K(),setTimeout((()=>{e(t)}),500)}(0,n.useEffect)((()=>(L(!0),()=>{})),[]),S(W);const Z=R.landingLocationType,H=R.templateType;function U(t){D&&(0,u.MO)("whatmoreAllowAutoSlide")&&(T(t),"right"==t?D.slideNext():D.slidePrev())}function B(t,e){U(e)}return(0,x.jsx)(Ue(),{isOpen:z,onAfterOpen:function(){},onRequestClose:K,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:"#00000088"},onTouchStart:t=>{F(t)},onTouchEnd:t=>{const e=E(t);e&&B(0,e)},onWheel:t=>{P(t,(t=>{B(0,t)}))},children:(0,x.jsx)(o.tq,{speed:1,slidesPerView:1,direction:"horizontal",modules:[r.SH,r.Gk],initialSlide:a,loop:i.length>1,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,onSwiper:t=>{var e,n;M(t),(0,q.GF)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:R,event:i[_().activeIndex].events[0],productList:null===(e=i[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[_().activeIndex].events[0])||void 0===n?void 0:n.cta})},onSlideChange:t=>{var e,n;f?w(!1):(!function(t){const e=(0,mt.NY)(Z)+(0,mt.dS)(H)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);m||g||(async()=>{(0,l.wh)(t),(0,Qe.Tc)(k,$e.Xh,$e.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===A||void 0===A?void 0:A.userType)})()}(i[_().activeIndex].events[0]),(0,q.GF)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:R,event:i[_().activeIndex].events[0],productList:null===(e=i[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[_().activeIndex].events[0])||void 0===n?void 0:n.cta}))},allowTouchMove:!1,cubeEffect:{shadow:!0,slideShadows:!0,shadowOffset:20,shadowScale:.94},children:[...Array(Math.min(i.length,3)).keys()].map((t=>(0,x.jsx)(o.o5,{children:t=>{let{isActive:e,isPrev:n,isNext:o,isVisible:r,isDuplicate:l}=t;const c=e?"activeIndex":n?"prevIndex":"nextIndex";return(0,x.jsx)(s.Kq,{direction:"column",height:d,justifyContent:"center",children:(0,x.jsx)(pi,{stories:i[_()[c]],onBack:W,isActive:e&&r,isNext:o,isPrev:n,onStoryCompleteCallback:U,nextStories:i[_().nextIndex],prevStories:i[_().prevIndex],initialEventIndex:a==_()[c]?O:0},"event-story-view-"+i[_()[c]].id)})}},"event-vertical-scroll-slide-"+t)))})})})};var xi=function(t){var e,i,o,[r,l,a,d]=(0,h.Z)();const[c]=(0,u.j1)("whatmorePrimaryColor"),[p]=(0,u.j1)("whatmoreSecondaryColor"),v=t.event,m=(t.onBack,n.useRef(),null!==(e=t.showPausedVideo)&&void 0!==e&&e),f=null!==(i=t.heightFactor)&&void 0!==i?i:1,w="flex-end";return d*=null!==(o=t.widthFactor)&&void 0!==o?o:1,a*=f,(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:d,height:a,children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:w,height:"full",width:"full",children:(0,x.jsx)(s.xu,{children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:m?(0,Me.B6)(v)||(0,Me.WJ)(v)?(0,x.jsx)(ye.Z,{height:"100%",width:"100%",url:v.thumbnail_image,isPlaying:!1,pauseFromPlayTimeInMs:1e3,event:v}):(0,x.jsx)(g.Ee,{width:"full",height:"full",src:v.thumbnail_image,objectFit:"cover",borderRadius:"lg"}):(0,x.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+c+", gray, "+p+")"})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:w,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,x.jsx)(s.xu,{width:"full",height:"full",backgroundColor:"blackAlpha.400"})})})})]})})};var mi=function(t){var e,i,[a,d,c,p]=(0,h.Z)();const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[g,f]=(0,u.j1)("isFirstIndicatorRenderDone"),[w,j]=(0,n.useState)(0!=t.eventIndex),{setCloseClickComponent:y}=(0,n.useContext)(fi),[C,b]=(0,n.useState)(!1),[S]=(0,u.j1)("whatmoreShopId"),{whatmoreWidgetSourceDetails:I,whatmoreUserInfo:k}=(0,n.useContext)(V.I),[_,T]=(0,n.useState)(!1),[F,E]=(0,n.useState)(null);function O(){T(!1)}t.events;const z=t.eventIndex,L=t.onBack,D=t.eventsStories,M=t.initialStoryIndex,R=null===(e=D[0])||void 0===e||null===(i=e.events[0])||void 0===i?void 0:i.brand;function A(t){O(),setTimeout((()=>{L(t)}),500)}(0,n.useEffect)((()=>(T(!0),()=>{})),[]),y(A);const K=I.landingLocationType,W=I.templateType;function Z(t){F&&!F.isEnd&&("right"==t?F.slideNext():F.slidePrev())}const H=parseInt(Math.min(5,D.length));return(0,x.jsx)(li,{show:_,closeCallback:O,customClass:"whatmore-landscape-modal-stories-view",children:(0,x.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",alignItems:"center",backgroundColor:"blackAlpha.800",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:p*H,children:(0,x.jsxs)(o.tq,{onInit:t=>{var e,i;E(t),(0,q.GF)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:I,event:D[t.activeIndex].events[0],productList:null===(e=D[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=D[t.activeIndex].events[0])||void 0===i?void 0:i.cta})},slidesPerView:H,centeredSlides:!0,allowTouchMove:!1,initialSlide:M,modules:[r.lI,r.W_,r.Gk],navigation:H>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*c),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:p*H,watchSlidesProgress:!0,onSlideChange:t=>{var e,i;w?j(!1):(g||f(!0),function(t){const e=(0,mt.NY)(K)+(0,mt.dS)(W)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);v||m||(async()=>{(0,l.wh)(t),(0,Qe.Tc)(S,$e.Xh,$e.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===k||void 0===k?void 0:k.userType)})()}(D[t.activeIndex].events[0]),(0,q.GF)({userInteractionType:N.K.EVENT_VIEW,widgetSourceDetails:I,event:D[t.activeIndex].events[0],productList:null===(e=D[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=D[t.activeIndex].events[0])||void 0===i?void 0:i.cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[D.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(P.Z,{onCloseCallback:L})}),D.map(((t,e)=>(0,x.jsx)(o.o5,{children:i=>{let{isActive:n,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=i;if(n){const i=1;return(0,x.jsx)(s.Kq,{direction:"column",height:c,width:p*i,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(pi,{stories:t,onBack:A,isActive:n&&l,isNext:!1,isPrev:!1,onStoryCompleteCallback:Z,initialEventIndex:M==e?z:0,showCloseOverlay:(null===D||void 0===D?void 0:D.length)<=2},"event-story-view-"+t.id)})})}return o||r?(0,x.jsx)(s.Kq,{direction:"column",height:c,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{F.slideTo(e,300)},children:(0,x.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(xi,{showPausedVideo:!0,event:D[e].events[0],onBack:A,isPlaying:!1,setLockSwiper:b})})}):(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide-"+e)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(je,{brandName:R,height:.04*c,width:.1*p,fontSize:.02*c})})]})})};const gi=(0,ui.Z)({key:"whatmore-css-sv"}),fi=(0,n.createContext)({isIOS:!1,totalEvents:0,closeClickComponent:null,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:"vertical",showSwipeIndicator:!0,questionList:[]});var wi=function(t){var e,i,o;const[r,l,a]=(0,me.Z)(),[d]=(0,u.j1)("whatmoreShopId"),{whatmoreRootId:s}=(0,n.useContext)(V.I),{whatmoreIsStoriesTemplate:h}=(0,n.useContext)(V.I);var p=t.events,v=t.index,m=t.onBack,g=t.eventsStories,f=t.initialStoryIndex,w=(0,c.cX2)(d),j="portrait"===r?null!==(e=t.slideDirection)&&void 0!==e?e:"vertical":null!==(i=t.slideDirection)&&void 0!==i?i:p.length>1?"horizontal":"vertical",y="portrait"===r?!(0,c.h6H)(d)&&!h:(0,c.n89)(d);return(0,n.useLayoutEffect)((()=>{(0,c.TLG)(d)&&(window.location.href.includes(w)?history.replaceState(null,"","#"+w):history.pushState(null,"","#"+w),window.addEventListener("popstate",(()=>{window.location.href.includes(w)||m()})))}),[]),delete si.ZP.styles.global,h?(0,x.jsx)(ci.C,{value:gi,children:(0,x.jsx)(di.x,{theme:si.ZP,cssVarsRoot:s,resetCSS:!1,children:(0,x.jsx)(fi.Provider,{value:{isIOS:(0,Re.KE)(),totalEvents:p.length,closeClickComponent:m,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:j,showSwipeIndicator:y},children:"portrait"===r?(0,x.jsx)(vi,{eventsStories:g,initialStoryIndex:f,onBack:m,eventIndex:v}):(0,c.Bbr)(d)?(0,x.jsx)(mi,{eventsStories:g,initialStoryIndex:f,onBack:m,eventIndex:v}):(0,x.jsx)(vi,{eventsStories:g,initialStoryIndex:f,onBack:m,eventIndex:v})})})}):(0,x.jsx)(ci.C,{value:gi,children:(0,x.jsx)(di.x,{theme:si.ZP,cssVarsRoot:s,resetCSS:!1,children:(0,x.jsx)(fi.Provider,{value:{isIOS:(0,Re.KE)(),totalEvents:p.length,closeClickComponent:m,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:j,showSwipeIndicator:y,questionList:(0,c.YGB)(d)?null===(o=JSON.parse(localStorage.getItem("_whatmore_brand_questions")))||void 0===o?void 0:o.questionList:[]},children:"portrait"===r?(0,x.jsx)(ni,{events:p,eventIndex:v,onBack:m}):(0,x.jsx)(ai,{events:p,eventIndex:v,onBack:m})})})})}},9316:function(t,e,i){i.d(e,{mT:function(){return o}});var n=i(686);const o=`\n ${n.F4`
|
77
77
|
0% { transform: scale(1); }
|
78
78
|
50%, { transform: scale(0.95); }
|
79
79
|
100% { transform: scale(1); }
|
package/static/js/{carousel-template-f.26ab7395.chunk.js → carousel-template-f.bd001127.chunk.js}
RENAMED
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[116],{9085:function(t,e,o){o.r(e),o.d(e,{default:function(){return N}});var n=o(7313),i=(o(3439),o(6090)),r=o(32),l=o(7616),a=(o(6143),o(4444),o(7244),o(123),o(5892),o(9302)),s=o(2575),d=o(9821),c=o(8866),p=o(2279),u=o.n(p),h=o(7753),v=o(7129),m=o(1855),x=o(9854),y=o(364),f=o(4522),g=o(778),w=o(4892),j=o(5945),P=o(9219),M=o(6805),C=o(8984),b=o(7053),S=o(5416),I=o(6417);var E=function(t){var e,o,i,r,l,a,s,c,p,u,m,y,f,g,E,O,k,Y,_,N,T,z,Z,A,D;const[L,R,W,F,$]=(0,d.Z)(),V=(0,h.MO)("whatmoreShopId"),U=(0,h.MO)("whatmoreLandingLocationType"),G="portrait"===$[M.YP],B=(G?1.076*R*(0,x.pEd)(V):R*(0,x.H4g)(V))+"px",H=(G?1.076*R*(0,x.pEd)(V):R*(0,x.H4g)(V))+"px",K=(G?.965*R*(0,x.pEd)(V):.859*R*(0,x.H4g)(V))+"px",[X,q]=(0,n.useState)(t.event),J=(0,h.MO)("whatmoreSecondaryColor");var Q=(0,n.useContext)(v.V);const tt=null===(e=t.isOnFocus)||void 0===e||e,et=null!==(o=t.playOnUnfocus)&&void 0!==o&&o,ot=t.onClick,nt=(0,h.MO)("whatmoreUITheme"),it=null!==(i=t.animateOnFocus&&(0,x.iWI)(V))&&void 0!==i&&i,[rt,lt]=(0,n.useState)(!1),at=(0,h.MO)("whatmorePrimaryFont"),st=Math.round(+(null===(r=X.products[0])||void 0===r?void 0:r.price)),dt=Math.round(+(null===(l=X.products[0])||void 0===l?void 0:l.compare_price)),ct=dt&&0!=dt&&dt>st?Math.round((dt-st)/dt*100):NaN,[pt,ut]=(0,n.useState)(ct),[ht,vt]=(0,n.useState)(),mt="55143268394"===V;return(0,n.useEffect)((()=>{(0,x.N8M)(V)&&(0,P.p_)(X,(0,x.Ipo)(V),V).then((t=>{var e,o,n;q(t),(null===t||void 0===t||null===(e=t.products)||void 0===e||null===(o=e[0])||void 0===o?void 0:o.discount)&&ut(null===t||void 0===t||null===(n=t.products[0])||void 0===n?void 0:n.discount),lt(!0)}));(async()=>{var t;const e=await(0,b.p)(null===X||void 0===X||null===(t=X.products)||void 0===t?void 0:t[0],(0,x.Ipo)(V),V);vt(e),lt(!0)})()}),[]),(0,I.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top",Q.tileTopMargin+"px"),t.style.setProperty("margin-bottom",Q.tileBottomMMargin+"px"))},className:it&&!G?tt?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",style:{margin:"0 auto",cursor:"pointer",width:R},onClick:()=>{ot(X)},children:[(0,I.jsx)("div",{style:{borderRadius:"round"==nt?"5%":"0px",boxShadow:"round"==nt?"0px 0px 5px 0px #B0B0B0":null,height:L,borderWidth:(0,x.alU)(V),borderColor:(0,x.qPe)(V),overflow:"hidden"},children:(0,I.jsx)(w.Z,{height:(0,x.dXm)(V)+" !important",width:"100%",url:X.thumbnail_image,isPlaying:tt||et||(0,C.gE)(),event:X})}),(0,I.jsxs)("div",{className:"wht-prod-info",style:{display:(0,x.pvY)(V)?"flex":"none",flexDirection:"column",padding:"12px 4px",gap:mt?"8px":"5px",alignItems:mt?"center":"flex-start"},children:[(0,I.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,x.anz)(V),"important"),t.style.setProperty("font-size","45034766485"==V&&"product"==U?"9px":B),t.style.setProperty("line-height","120%"),t.style.setProperty("font-family",at,"important"),t.style.setProperty("-webkit-line-clamp",1,"important"),t.style.setProperty("line-clamp",1,"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"))},children:(0,j.s)(null===(a=X.products[0])||void 0===a?void 0:a.title)}),rt&&(0,x.QaY)(V)&&(0,I.jsxs)("div",{style:{display:"flex",gap:"12px",flexDirection:(0,x.$zZ)(V)?"row":"row-reverse",justifyContent:mt?"center":(0,x.$zZ)(V)?"flex-start":"flex-end"},children:[(0,I.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,x.anz)(V),"important"),t.style.setProperty("font-size","45034766485"==V&&"product"==U?"8px":H),t.style.setProperty("font-family",at,"important"),t.style.setProperty("overflow","hidden","important"))},style:{textAlign:"left",fontWeight:"normal"==(0,x.rPP)(V)?"normal":"bold"},children:(0,P.jx)(parseFloat((0,S.G)()?"61916709004"==V?(null===ht||void 0===ht||null===(s=ht.variants)||void 0===s||null===(c=s[0])||void 0===c?void 0:c.price)>0?null===ht||void 0===ht||null===(p=ht.variants)||void 0===p||null===(u=p[0])||void 0===u?void 0:u.price:null===ht||void 0===ht?void 0:ht.price:(null===ht||void 0===ht?void 0:ht.price)>0?null===ht||void 0===ht?void 0:ht.price:null===ht||void 0===ht||null===(m=ht.variants)||void 0===m||null===(y=m[0])||void 0===y?void 0:y.price:(null===X||void 0===X||null===(f=X.products)||void 0===f||null===(g=f[0])||void 0===g?void 0:g.price)>0?null===X||void 0===X||null===(E=X.products)||void 0===E||null===(O=E[0])||void 0===O?void 0:O.price:null===X||void 0===X||null===(k=X.products)||void 0===k||null===(Y=k[0])||void 0===Y?void 0:Y.price_max)," ",V,null===(_=X.products[0])||void 0===_?void 0:_.currency)}),!isNaN(dt)&&dt>st&&(0,I.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,x.kPs)(V),"important"),t.style.setProperty("font-size",H),t.style.setProperty("font-family",at,"important"),t.style.setProperty("overflow","hidden","important"))},style:{textDecoration:"line-through",alignItems:mt?"center":void 0},children:(0,P.jx)(parseFloat((0,S.G)()?"61916709004"==V&&null!==(N=null===ht||void 0===ht||null===(T=ht.variants)||void 0===T||null===(z=T[0])||void 0===z?void 0:z.compare_at_price)&&void 0!==N?N:null===ht||void 0===ht?void 0:ht.compare_at_price:null===X||void 0===X||null===(Z=X.products)||void 0===Z||null===(A=Z[0])||void 0===A?void 0:A.compare_price)," ",V,null===(D=X.products[0])||void 0===D?void 0:D.currency)})]}),((0,x.QaY)(V)&&!isNaN(pt)&&0!=pt&&rt||mt)&&(0,I.jsx)("div",{style:{display:(0,x.aKo)(V)?"flex":"none",backgroundColor:mt?J:"green"===(0,x.ZJm)(V)?"#343434"===J?(0,x.ZJm)(V):J:(0,x.ZJm)(V),alignItems:"center",justifyContent:mt?"center":void 0,borderRadius:mt?"25px":(0,x.CF_)(V)+"px",width:mt?.5*R:"fit-content",padding:(0,x.Spx)(V)?mt?"12px 12px":"3px 6px":"0px",margin:mt?"0 auto":void 0,textAlign:mt?"center":void 0,height:mt?"7%":void 0},children:(0,x.Spx)(V)?(0,I.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,x.mso)(V),"important"),t.style.setProperty("font-size",K,"important"),t.style.setProperty("font-family",at,"important"),t.style.setProperty("font-weight",mt?"600":"normal","important"))},children:mt?"BUY NOW":`${pt}% Off`}):(0,I.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,x.aUT)(V),"important"),t.style.setProperty("font-size",K,"important"),t.style.setProperty("font-family",(0,x.V3Y)(V),"important"))},children:(0,x.sG7)(V)})})]})]})},O=o(7381);const k=(0,s.Z)({key:"whatmore-css-hv"});function Y(t){const[e,o,i]=(0,d.Z)(),r=(0,h.MO)("whatmoreShopId"),l=(0,h.MO)("whatmoreLandingLocationType"),a=t.events,s=t.onClick,{whatmoreWidgetSourceDetails:c}=(0,n.useContext)(y.I),p=Math.ceil(i),u=2*p,[v,w]=(0,n.useState)(u),[j,P]=(0,n.useState)(2*p),M=0===(0,x.WGf)(r)?24:(0,x.WGf)(r),[C,b]=(0,n.useState)({touchX:0,touchY:0}),S=()=>(0,I.jsx)("div",{className:"navigation-button-next-container",style:{width:"50px",borderRadius:"50%",height:"50px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,I.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-right-portrait"})}),O=()=>(0,I.jsx)("div",{className:"navigation-button-prev-container",style:{width:"50px",borderRadius:"50%",height:"50px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,I.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-left-portrait"})}),k=t=>{if("next"===t){const t=2;P((t=>Math.min(t+Math.floor(i),a.length+p+1))),w((e=>Math.min(e+t,a.length+p+1)))}else P((t=>Math.max(t-Math.floor(i),u)));(0,f.y4)({userInteractionType:g.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:c})};return(0,I.jsxs)("div",{className:"whatmore-events-carousel-portrait",style:{display:"flex",justifyContent:"45034766485"==r&&"product"==l?"center":"flex-start",paddingLeft:"12px",overflow:"hidden",position:"relative"},onTouchStart:t=>{b({touchX:t.touches[0].clientX,touchY:t.touches[0].clientY})},onTouchEnd:t=>{var e,o,n,i;const r=(null===(e=t.changedTouches)||void 0===e||null===(o=e[0])||void 0===o?void 0:o.clientX)-C.touchX,l=(null===(n=t.changedTouches)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.clientY)-C.touchY;Math.sqrt(r**2+l**2)>10&&Math.abs(r)>Math.abs(l)&&k(r>0?"prev":"next")},children:[(0,x.Yxs)(r)&&(0,I.jsxs)(I.Fragment,{children:[j<=a.length+p&&(0,I.jsx)("div",{onClick:()=>k("next"),style:{position:"absolute",zIndex:1,top:"50%",right:"0",transform:"translateY(-100%)"},children:(0,I.jsx)(S,{})}),j>2*p&&(0,I.jsx)("div",{onClick:()=>k("prev"),style:{position:"absolute",left:"0",zIndex:1,top:"50%",transform:"translateY(-100%)"},children:(0,I.jsx)(O,{})})]}),(0,I.jsx)("div",{style:{display:"flex",gap:M,transform:`translateX(-${(j-u)*(o+M)}px)`,transition:"transform 0.4s ease-in-out"},children:a.map(((t,e)=>e<v?(0,I.jsx)("div",{children:(0,I.jsx)(E,{isOnFocus:e<=j-p-1&&e>=Math.max(0,j-u),playOnUnfocus:!1,animateOnFocus:!0,event:t,onClick:()=>s(t)})},`whatmore-carousel-tile-${e}`):(0,I.jsx)(m.Z,{})))})]})}function _(t){const[e,o,i,r]=(0,d.Z)(),[l,a]=(0,n.useState)(-1),s=(0,h.MO)("whatmoreShopId"),[c,p]=(0,n.useState)("next"),v=t.onClick,m=t.events,{whatmoreWidgetSourceDetails:w}=(0,n.useContext)(y.I),j=Math.min(Math.ceil(i),m.length),[P,M]=(0,n.useState)(0),C=0===(0,x.WGf)(s)?24:(0,x.WGf)(s),b=()=>(0,I.jsx)("div",{children:(0,I.jsx)("button",{onClick:Y,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,I.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-right"})})}),S=()=>(0,I.jsx)("div",{children:(0,I.jsx)("button",{onClick:k,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,I.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-left"})})});(0,n.useEffect)((()=>{P<=j&&M((t=>t+j))}),[j]);const O=()=>{a(-1)},k=()=>{P!==j&&(p("prev"),M((t=>Math.max(Math.ceil(t-i),j))),(0,f.y4)({userInteractionType:g.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:w}))},Y=()=>{P>m.length+i||(p("next"),M((t=>Math.floor(t+i))),(0,f.y4)({userInteractionType:g.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:w}))},_=P>m.length?m.length-j+1:P-j,N=P>=m.length?m.length:_+j,T=m.slice(_,N);return(0,I.jsxs)("div",{className:"whatmore-events-carousel-landscape",style:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:`${r}px`,paddingRight:`${r}px`},children:[P!==j&&(0,I.jsx)("div",{style:{position:"absolute",left:r+"px",zIndex:1,top:"50%",transform:"translateY(-65%)"},children:(0,I.jsx)(S,{})}),(0,I.jsx)("div",{className:"wht-hide-scrollbar",style:{display:"flex",gap:C+"px",width:o*i*(0,x.Su5)(s)+"px",justifyContent:m.length<=j?"center":"flex-start",overflow:"auto"},children:T.map(((t,e)=>{const o=`whatmore-event-tile-landscape-${t.index}${e===j-1?"-last":""}`,n=e===l;return(0,I.jsx)("div",{className:"whatmore-event-tile-horizontal-swipe-animation-"+("next"===c?"next":"prev"),onMouseEnter:()=>(t=>{const e=u()((()=>a(t)),300);return e(),e.cancel})(e),onMouseLeave:O,children:(0,I.jsx)(E,{isOnFocus:n,playOnUnfocus:!0,animateOnFocus:!0,event:t,onClick:()=>(t=>{v(t)})(t)})},o)}))}),P<m.length&&(0,I.jsx)("div",{style:{position:"absolute",zIndex:1,top:"50%",right:r+"px",transform:"translateY(-65%)"},children:(0,I.jsx)(b,{})})]})}var N=function(t){const[e,o,s]=(0,c.Z)(),[d]=(0,h.j1)("whatmoreShopId"),[p]=(0,h.j1)("whatmorePrimaryColor"),[u]=(0,h.j1)("whatmoreSecondaryColor"),[m]=(0,h.j1)("whatmoreTitleFont"),f="portrait"==e?(0,h.MO)("whatmoreTitleFontSizePortrait"):(0,h.MO)("whatmoreTitleFontSize"),{whatmoreRootId:g}=(0,n.useContext)(y.I),w=((0,h.MO)("isInDesignMode"),(0,h.MO)("whatmoreCollectionHeading")),{whatmoreIsCollectionsTemplate:j}=(0,n.useContext)(y.I),P=t.events,M=t.onClick,C=m;function b(t){M(t)}return(0,n.useEffect)((()=>{(0,O.Oo)("Video shopping powered by Whatmore!")}),[]),(0,n.useEffect)((()=>{r.IR.forEach((t=>{var e;const o=null!==(e=t.querySelector('.whatmore-template-type[data-wh="template-f"]'))&&void 0!==e?e:t.querySelector('.whatmore-template-type[data="template-f"]');if(!o)return;o&&t&&(t.style.minHeight="0px")}))}),[]),delete l.ZP.styles.global,(0,I.jsx)(a.C,{value:k,children:(0,I.jsx)("div",{className:"whatmore-carousel-events",children:(0,I.jsx)(i.x,{theme:l.ZP,cssVarsRoot:g,resetCSS:!1,children:(0,I.jsxs)(v.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[t.heading.trim().length>0||j?(0,I.jsx)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"62636458233"==d?"flex-start":"center"},children:(0,I.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",C,"important"),t.style.setProperty("font-size",f+"px","important"))},style:{color:p,backgroundClip:"text",textAlign:"center",fontWeight:(0,x.wOV)(d),lineHeight:(0,x.vY4)(d),letterSpacing:(0,x.X2K)(d)},children:j?"W"!==w?w:"":t.heading})}):(0,I.jsx)(I.Fragment,{}),"landscape"===e?(0,I.jsx)(_,{events:P,onClick:b}):(0,I.jsx)(Y,{events:P,onClick:b})]})})})})}},7129:function(t,e,o){o.d(e,{V:function(){return n}});const n=(0,o(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},1855:function(t,e,o){var n=o(7313),i=o(9821),r=o(7129),l=o(7753),a=o(6417);e.Z=function(t){var[e,o]=(0,i.Z)();(0,n.useContext)(r.V);const s=(0,l.MO)("whatmoreShopId");return t.event,(0,a.jsx)("div",{style:{margin:"0 auto",width:"8968077397"==s?void 0:o,aspectRatio:"8968077397"==s?9/16:void 0,height:"8968077397"==s?"100%":e,overflow:"hidden"}})}},6805:function(t,e,o){o.d(e,{$I:function(){return a},$w:function(){return d},AK:function(){return r},AL:function(){return l},YP:function(){return i},me:function(){return n},rE:function(){return s}});const n="device_type",i="device_mode",r="mobile",l="tablet",a="desktop",s="portrait",d="landscape"},9821:function(t,e,o){var n=o(7753),i=o(8866),r=o(6805),l=o(9854);e.Z=function(t){const[e,o,a]=(0,i.Z)(),[s]=(0,n.j1)("whatmoreLandscapePadding"),[d]=(0,n.j1)("whatmoreShopId"),[c]=(0,n.j1)("whatmoreVideoTileSize"),[p]=(0,n.j1)("whatmoreVideoTileSizePortrait"),u=a>=1025,h="portrait"==e?p:c,v=!("portrait"!=e||!(a>=481)),m=h/100*1.3*.5,x=h/100;var y=Math.min(a,o),[f,g,w,j]=[.6*y*(16/9),.6*y,1.4,0];function P(t){return Math.round(10*t)/10}var M={DEVICE_TYPE:r.AK,DEVICE_MODE:r.rE};if(u){const t=g*m,e=f*m;[f,g,w,j]=[e,t,(a-2*s-2*(0,l.mZU)(d))/(1.1*t),s],M[r.me]=r.$I,M[r.YP]=r.$w}else if(v){var C=.8*g,b=.8*f;"portrait"==e?(C*=x,b*=x,[f,g,w,j]=[b,C,P(a/(1.2*C)),0],M[r.me]=r.AL,M[r.YP]=r.rE):([f,g,w,j]=[b,C,(a-2*s)/(1.1*C),s],M[r.me]=r.AL,M[r.YP]=r.$w)}else{C=g,b=f;"portrait"==e?(C=C*x*.9,b=b*x*.9,[f,g,w,j]=[b,C,P(a/(1.15*C)),0],M[r.me]=r.AK,M[r.YP]=r.rE):(C=.7*g,b=.7*f,[f,g,w,j]=[b,C,(a-2*s)/(1.1*C),s],M[r.me]=r.AK,M[r.YP]=r.$w)}return[f,g,w,j,M]}},3439:function(){},7244:function(){},5892:function(){},4444:function(){}}]);
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[116],{9085:function(t,e,o){o.r(e),o.d(e,{default:function(){return N}});var n=o(7313),i=(o(3439),o(6090)),r=o(32),l=o(7616),a=(o(6143),o(4444),o(7244),o(123),o(5892),o(9302)),s=o(2575),d=o(9821),c=o(8866),p=o(2279),u=o.n(p),h=o(7753),v=o(7129),m=o(1855),x=o(9854),y=o(364),f=o(4522),g=o(778),w=o(4892),j=o(5945),P=o(9219),M=o(6805),C=o(8984),b=o(7053),S=o(5416),I=o(6417);var E=function(t){var e,o,i,r,l,a,s,c,p,u,m,y,f,g,E,O,k,Y,_,N,T,z,Z,A,D;const[L,R,W,F,$]=(0,d.Z)(),V=(0,h.MO)("whatmoreShopId"),U=(0,h.MO)("whatmoreLandingLocationType"),G="portrait"===$[M.YP],B=(G?1.076*R*(0,x.pEd)(V):R*(0,x.H4g)(V))+"px",H=(G?1.076*R*(0,x.pEd)(V):R*(0,x.H4g)(V))+"px",K=(G?.965*R*(0,x.pEd)(V):.859*R*(0,x.H4g)(V))+"px",[X,q]=(0,n.useState)(t.event),J=(0,h.MO)("whatmoreSecondaryColor");var Q=(0,n.useContext)(v.V);const tt=null===(e=t.isOnFocus)||void 0===e||e,et=null!==(o=t.playOnUnfocus)&&void 0!==o&&o,ot=t.onClick,nt=(0,h.MO)("whatmoreUITheme"),it=null!==(i=t.animateOnFocus&&(0,x.iWI)(V))&&void 0!==i&&i,[rt,lt]=(0,n.useState)(!1),at=(0,h.MO)("whatmorePrimaryFont"),st=Math.round(+(null===(r=X.products[0])||void 0===r?void 0:r.price)),dt=Math.round(+(null===(l=X.products[0])||void 0===l?void 0:l.compare_price)),ct=dt&&0!=dt&&dt>st?Math.round((dt-st)/dt*100):NaN,[pt,ut]=(0,n.useState)(ct),[ht,vt]=(0,n.useState)(),mt="55143268394"===V;return(0,n.useEffect)((()=>{(0,x.N8M)(V)&&(0,P.p_)(X,(0,x.Ipo)(V),V).then((t=>{var e,o,n;q(t),(null===t||void 0===t||null===(e=t.products)||void 0===e||null===(o=e[0])||void 0===o?void 0:o.discount)&&ut(null===t||void 0===t||null===(n=t.products[0])||void 0===n?void 0:n.discount),lt(!0)}));(async()=>{var t;const e=await(0,b.p)(null===X||void 0===X||null===(t=X.products)||void 0===t?void 0:t[0],(0,x.Ipo)(V),V);vt(e),lt(!0)})()}),[]),(0,I.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top",Q.tileTopMargin+"px"),t.style.setProperty("margin-bottom",Q.tileBottomMMargin+"px"))},className:it&&!G?tt?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",style:{margin:"0 auto",cursor:"pointer",width:R},onClick:()=>{ot(X)},children:[(0,I.jsx)("div",{style:{borderRadius:"round"==nt?"5%":"0px",boxShadow:"round"==nt?"0px 0px 5px 0px #B0B0B0":null,height:L,borderWidth:(0,x.alU)(V),borderColor:(0,x.qPe)(V),overflow:"hidden"},children:(0,I.jsx)(w.Z,{height:(0,x.dXm)(V)+" !important",width:"100%",url:X.thumbnail_image,isPlaying:tt||et||(0,C.gE)(),event:X})}),(0,I.jsxs)("div",{className:"wht-prod-info",style:{display:(0,x.pvY)(V)?"flex":"none",flexDirection:"column",padding:"12px 4px",gap:mt?"8px":"5px",alignItems:mt?"center":"flex-start"},children:[(0,I.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,x.anz)(V),"important"),t.style.setProperty("font-size","45034766485"==V&&"product"==U?"9px":B),t.style.setProperty("line-height","120%"),t.style.setProperty("font-family",at,"important"),t.style.setProperty("-webkit-line-clamp",1,"important"),t.style.setProperty("line-clamp",1,"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"))},children:(0,j.s)(null===(a=X.products[0])||void 0===a?void 0:a.title)}),rt&&(0,x.QaY)(V)&&(0,I.jsxs)("div",{style:{display:"flex",gap:"12px",flexDirection:(0,x.$zZ)(V)?"row":"row-reverse",justifyContent:mt?"center":(0,x.$zZ)(V)?"flex-start":"flex-end"},children:[(0,I.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,x.anz)(V),"important"),t.style.setProperty("font-size","45034766485"==V&&"product"==U?"8px":H),t.style.setProperty("font-family",at,"important"),t.style.setProperty("overflow","hidden","important"))},style:{textAlign:"left",fontWeight:"normal"==(0,x.rPP)(V)?"normal":"bold"},children:(0,P.jx)(parseFloat((0,S.G)()?"61916709004"==V?(null===ht||void 0===ht||null===(s=ht.variants)||void 0===s||null===(c=s[0])||void 0===c?void 0:c.price)>0?null===ht||void 0===ht||null===(p=ht.variants)||void 0===p||null===(u=p[0])||void 0===u?void 0:u.price:null===ht||void 0===ht?void 0:ht.price:(null===ht||void 0===ht?void 0:ht.price)>0?null===ht||void 0===ht?void 0:ht.price:null===ht||void 0===ht||null===(m=ht.variants)||void 0===m||null===(y=m[0])||void 0===y?void 0:y.price:(null===X||void 0===X||null===(f=X.products)||void 0===f||null===(g=f[0])||void 0===g?void 0:g.price)>0?null===X||void 0===X||null===(E=X.products)||void 0===E||null===(O=E[0])||void 0===O?void 0:O.price:null===X||void 0===X||null===(k=X.products)||void 0===k||null===(Y=k[0])||void 0===Y?void 0:Y.price_max)," ",V,null===(_=X.products[0])||void 0===_?void 0:_.currency)}),!isNaN(dt)&&dt>st&&(0,I.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,x.kPs)(V),"important"),t.style.setProperty("font-size",H),t.style.setProperty("font-family",at,"important"),t.style.setProperty("overflow","hidden","important"))},style:{textDecoration:"line-through",alignItems:mt?"center":void 0},children:(0,P.jx)(parseFloat((0,S.G)()?"61916709004"==V&&null!==(N=null===ht||void 0===ht||null===(T=ht.variants)||void 0===T||null===(z=T[0])||void 0===z?void 0:z.compare_at_price)&&void 0!==N?N:null===ht||void 0===ht?void 0:ht.compare_at_price:null===X||void 0===X||null===(Z=X.products)||void 0===Z||null===(A=Z[0])||void 0===A?void 0:A.compare_price)," ",V,null===(D=X.products[0])||void 0===D?void 0:D.currency)})]}),((0,x.QaY)(V)&&!isNaN(pt)&&0!=pt&&rt||mt)&&(0,I.jsx)("div",{style:{display:(0,x.aKo)(V)?"flex":"none",backgroundColor:mt?J:"green"===(0,x.ZJm)(V)?"#343434"===J?(0,x.ZJm)(V):J:(0,x.ZJm)(V),alignItems:"center",justifyContent:mt?"center":void 0,borderRadius:mt?"25px":(0,x.CF_)(V)+"px",width:mt?.5*R:"fit-content",padding:(0,x.Spx)(V)?mt?"12px 12px":"3px 6px":"0px",margin:mt?"0 auto":void 0,textAlign:mt?"center":void 0,height:mt?"7%":void 0},children:(0,x.Spx)(V)?(0,I.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,x.mso)(V),"important"),t.style.setProperty("font-size",K,"important"),t.style.setProperty("font-family",at,"important"),t.style.setProperty("font-weight",mt?"600":"normal","important"))},children:mt?"BUY NOW":`${pt}% Off`}):(0,I.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,x.aUT)(V),"important"),t.style.setProperty("font-size",K,"important"),t.style.setProperty("font-family",(0,x.V3Y)(V),"important"))},children:(0,x.sG7)(V)})})]})]})},O=o(7381);const k=(0,s.Z)({key:"whatmore-css-hv"});function Y(t){const[e,o,i]=(0,d.Z)(),r=(0,h.MO)("whatmoreShopId"),l=(0,h.MO)("whatmoreLandingLocationType"),a=t.events,s=t.onClick,{whatmoreWidgetSourceDetails:c}=(0,n.useContext)(y.I),p=Math.ceil(i),u=2*p,[v,w]=(0,n.useState)(u),[j,P]=(0,n.useState)(2*p),M=0===(0,x.WGf)(r)?24:(0,x.WGf)(r),[C,b]=(0,n.useState)({touchX:0,touchY:0}),S=()=>(0,I.jsx)("div",{className:"navigation-button-next-container",style:{width:"50px",borderRadius:"50%",height:"50px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,I.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-right-portrait"})}),O=()=>(0,I.jsx)("div",{className:"navigation-button-prev-container",style:{width:"50px",borderRadius:"50%",height:"50px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,I.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-left-portrait"})}),k=t=>{if("next"===t){const t=2;P((t=>Math.min(t+Math.floor(i),a.length+p+1))),w((e=>Math.min(e+t,a.length+p+1)))}else P((t=>Math.max(t-Math.floor(i),u)));(0,f.y4)({userInteractionType:g.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:c})};return(0,I.jsxs)("div",{className:"whatmore-events-carousel-portrait",style:{display:"flex",justifyContent:"45034766485"==r&&"product"==l?"center":"flex-start",paddingLeft:"12px",overflow:"hidden",position:"relative"},onTouchStart:t=>{b({touchX:t.touches[0].clientX,touchY:t.touches[0].clientY})},onTouchEnd:t=>{var e,o,n,i;const r=(null===(e=t.changedTouches)||void 0===e||null===(o=e[0])||void 0===o?void 0:o.clientX)-C.touchX,l=(null===(n=t.changedTouches)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.clientY)-C.touchY;Math.sqrt(r**2+l**2)>10&&Math.abs(r)>Math.abs(l)&&k(r>0?"prev":"next")},children:[(0,x.Yxs)(r)&&(0,I.jsxs)(I.Fragment,{children:[j<=a.length+p&&(0,I.jsx)("div",{onClick:()=>k("next"),style:{position:"absolute",zIndex:1,top:"50%",right:"0",transform:"translateY(-100%)"},children:(0,I.jsx)(S,{})}),j>2*p&&(0,I.jsx)("div",{onClick:()=>k("prev"),style:{position:"absolute",left:"0",zIndex:1,top:"50%",transform:"translateY(-100%)"},children:(0,I.jsx)(O,{})})]}),(0,I.jsx)("div",{style:{display:"flex",gap:M,transform:`translateX(-${(j-u)*(o+M)}px)`,transition:"transform 0.4s ease-in-out"},children:a.map(((t,e)=>e<v?(0,I.jsx)("div",{children:(0,I.jsx)(E,{isOnFocus:e<=j-p-1&&e>=Math.max(0,j-u),playOnUnfocus:!1,animateOnFocus:!0,event:t,onClick:()=>s(t)})},`whatmore-carousel-tile-${e}`):(0,I.jsx)(m.Z,{})))})]})}function _(t){const[e,o,i,r]=(0,d.Z)(),[l,a]=(0,n.useState)(-1),s=(0,h.MO)("whatmoreShopId"),[c,p]=(0,n.useState)("next"),v=t.onClick,m=t.events,{whatmoreWidgetSourceDetails:w}=(0,n.useContext)(y.I),j=Math.min(Math.ceil(i),m.length),[P,M]=(0,n.useState)(0),C=0===(0,x.WGf)(s)?24:(0,x.WGf)(s),b=()=>(0,I.jsx)("div",{children:(0,I.jsx)("button",{onClick:Y,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,I.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-right"})})}),S=()=>(0,I.jsx)("div",{children:(0,I.jsx)("button",{onClick:k,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,I.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-left"})})});(0,n.useEffect)((()=>{P<=j&&M((t=>t+j))}),[j]);const O=()=>{a(-1)},k=()=>{P!==j&&(p("prev"),M((t=>Math.max(Math.ceil(t-i),j))),(0,f.y4)({userInteractionType:g.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:w}))},Y=()=>{P>m.length+i||(p("next"),M((t=>Math.floor(t+i))),(0,f.y4)({userInteractionType:g.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:w}))},_=P>m.length?m.length-j+1:P-j,N=P>=m.length?m.length:_+j,T=m.slice(_,N);return(0,I.jsxs)("div",{className:"whatmore-events-carousel-landscape",style:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:`${r}px`,paddingRight:`${r}px`},children:[P!==j&&(0,I.jsx)("div",{style:{position:"absolute",left:r+"px",zIndex:1,top:"50%",transform:"translateY(-65%)"},children:(0,I.jsx)(S,{})}),(0,I.jsx)("div",{className:"wht-hide-scrollbar",style:{display:"flex",gap:C+"px",width:o*i*(0,x.Su5)(s)+"px",justifyContent:m.length>j?"flex-start":"center",overflow:"auto"},children:T.map(((t,e)=>{const o=`whatmore-event-tile-landscape-${t.index}${e===j-1?"-last":""}`,n=e===l;return(0,I.jsx)("div",{className:"whatmore-event-tile-horizontal-swipe-animation-"+("next"===c?"next":"prev"),onMouseEnter:()=>(t=>{const e=u()((()=>a(t)),300);return e(),e.cancel})(e),onMouseLeave:O,children:(0,I.jsx)(E,{isOnFocus:n,playOnUnfocus:!0,animateOnFocus:!0,event:t,onClick:()=>(t=>{v(t)})(t)})},o)}))}),P<m.length&&(0,I.jsx)("div",{style:{position:"absolute",zIndex:1,top:"50%",right:r+"px",transform:"translateY(-65%)"},children:(0,I.jsx)(b,{})})]})}var N=function(t){const[e,o,s]=(0,c.Z)(),[d]=(0,h.j1)("whatmoreShopId"),[p]=(0,h.j1)("whatmorePrimaryColor"),[u]=(0,h.j1)("whatmoreSecondaryColor"),[m]=(0,h.j1)("whatmoreTitleFont"),f="portrait"==e?(0,h.MO)("whatmoreTitleFontSizePortrait"):(0,h.MO)("whatmoreTitleFontSize"),{whatmoreRootId:g}=(0,n.useContext)(y.I),w=((0,h.MO)("isInDesignMode"),(0,h.MO)("whatmoreCollectionHeading")),{whatmoreIsCollectionsTemplate:j}=(0,n.useContext)(y.I),P=t.events,M=t.onClick,C=m;function b(t){M(t)}return(0,n.useEffect)((()=>{(0,O.Oo)("Video shopping powered by Whatmore!")}),[]),(0,n.useEffect)((()=>{r.IR.forEach((t=>{var e;const o=null!==(e=t.querySelector('.whatmore-template-type[data-wh="template-f"]'))&&void 0!==e?e:t.querySelector('.whatmore-template-type[data="template-f"]');if(!o)return;o&&t&&(t.style.minHeight="0px")}))}),[]),delete l.ZP.styles.global,(0,I.jsx)(a.C,{value:k,children:(0,I.jsx)("div",{className:"whatmore-carousel-events",children:(0,I.jsx)(i.x,{theme:l.ZP,cssVarsRoot:g,resetCSS:!1,children:(0,I.jsxs)(v.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[t.heading.trim().length>0||j?(0,I.jsx)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"62636458233"==d?"flex-start":"center"},children:(0,I.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",C,"important"),t.style.setProperty("font-size",f+"px","important"))},style:{color:p,backgroundClip:"text",textAlign:"center",fontWeight:(0,x.wOV)(d),lineHeight:(0,x.vY4)(d),letterSpacing:(0,x.X2K)(d)},children:j?"W"!==w?w:"":t.heading})}):(0,I.jsx)(I.Fragment,{}),"landscape"===e?(0,I.jsx)(_,{events:P,onClick:b}):(0,I.jsx)(Y,{events:P,onClick:b})]})})})})}},7129:function(t,e,o){o.d(e,{V:function(){return n}});const n=(0,o(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},1855:function(t,e,o){var n=o(7313),i=o(9821),r=o(7129),l=o(7753),a=o(6417);e.Z=function(t){var[e,o]=(0,i.Z)();(0,n.useContext)(r.V);const s=(0,l.MO)("whatmoreShopId");return t.event,(0,a.jsx)("div",{style:{margin:"0 auto",width:"8968077397"==s?void 0:o,aspectRatio:"8968077397"==s?9/16:void 0,height:"8968077397"==s?"100%":e,overflow:"hidden"}})}},6805:function(t,e,o){o.d(e,{$I:function(){return a},$w:function(){return d},AK:function(){return r},AL:function(){return l},YP:function(){return i},me:function(){return n},rE:function(){return s}});const n="device_type",i="device_mode",r="mobile",l="tablet",a="desktop",s="portrait",d="landscape"},9821:function(t,e,o){var n=o(7753),i=o(8866),r=o(6805),l=o(9854);e.Z=function(t){const[e,o,a]=(0,i.Z)(),[s]=(0,n.j1)("whatmoreLandscapePadding"),[d]=(0,n.j1)("whatmoreShopId"),[c]=(0,n.j1)("whatmoreVideoTileSize"),[p]=(0,n.j1)("whatmoreVideoTileSizePortrait"),u=a>=1025,h="portrait"==e?p:c,v=!("portrait"!=e||!(a>=481)),m=h/100*1.3*.5,x=h/100;var y=Math.min(a,o),[f,g,w,j]=[.6*y*(16/9),.6*y,1.4,0];function P(t){return Math.round(10*t)/10}var M={DEVICE_TYPE:r.AK,DEVICE_MODE:r.rE};if(u){const t=g*m,e=f*m;[f,g,w,j]=[e,t,(a-2*s-2*(0,l.mZU)(d))/(1.1*t),s],M[r.me]=r.$I,M[r.YP]=r.$w}else if(v){var C=.8*g,b=.8*f;"portrait"==e?(C*=x,b*=x,[f,g,w,j]=[b,C,P(a/(1.2*C)),0],M[r.me]=r.AL,M[r.YP]=r.rE):([f,g,w,j]=[b,C,(a-2*s)/(1.1*C),s],M[r.me]=r.AL,M[r.YP]=r.$w)}else{C=g,b=f;"portrait"==e?(C=C*x*.9,b=b*x*.9,[f,g,w,j]=[b,C,P(a/(1.15*C)),0],M[r.me]=r.AK,M[r.YP]=r.rE):(C=.7*g,b=.7*f,[f,g,w,j]=[b,C,(a-2*s)/(1.1*C),s],M[r.me]=r.AK,M[r.YP]=r.$w)}return[f,g,w,j,M]}},3439:function(){},7244:function(){},5892:function(){},4444:function(){}}]);
|