whatmore-react-assets 1.0.903 → 1.0.905

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whatmore-react-assets",
3
- "version": "1.0.903",
3
+ "version": "1.0.905",
4
4
  "description": "public repo for all whatmore js and css assets",
5
5
  "main": "whatmore.js",
6
6
  "scripts": {
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[143],{8181:function(t,e,n){var i=n(7313),o=n(8866),r=n(7753),a=n(6417);const s=i.memo((()=>{if(!(0,r.MO)("isLandingSharedLink"))return(0,a.jsx)(a.Fragment,{});const[t]=(0,o.Z)();return(0,a.jsxs)("div",{className:`shimmer-container ${t}`,children:["portrait"===t?(0,a.jsx)("div",{className:"shimmer-item portrait-full",children:(0,a.jsx)("div",{className:"shimmer-effect"})}):Array(3).fill().map(((t,e)=>(0,a.jsx)("div",{className:"shimmer-item landscape-item "+(1===e?"center-item":""),children:(0,a.jsx)("div",{className:"shimmer-effect"})},e))),(0,a.jsx)("style",{children:"\n .shimmer-container {\n display: flex;\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n scroll-behavior: smooth;\n z-index: 1000;\n }\n\n .portrait {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.3);\n }\n\n .landscape {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.8);\n }\n\n .shimmer-item {\n scroll-snap-align: start;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n transition: transform 0.3s ease;\n }\n\n .portrait-full {\n width: 100vw;\n height: 100vh;\n margin: 0; \n }\n\n .landscape-item {\n width: 250px;\n height: 450px;\n background: #D3D3D3;\n border-radius: 8px;\n margin-left: -50px; \n }\n\n .center-item {\n width: 360px;\n height: 620px;\n box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.5); \n z-index: 10; \n }\n\n .shimmer-effect {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.3) 75%);\n animation: shimmer 2s infinite;\n background-size: 200% 100%;\n }\n\n @keyframes shimmer {\n 0% {\n background-position: -200% 0;\n }\n 100% {\n background-position: 200% 0;\n }\n }\n "})]})}));e.Z=s},4284:function(t,e,n){n.r(e);var i=n(7313),o=n(9854),r=n(2860),a=n(7753),s=n(5160),c=n(6967),d=n(5380),l=n(58),u=n(8984),p=n(4669),h=n(513),v=n(9302),m=n(2575),f=n(7300),g=n(6524),w=n(8811),_=n(4522),E=n(778),I=n(7643),y=n(7008),x=n(7381),L=n(8181),S=n(6417);const D=(0,m.Z)({key:"whatmore-css-ppv"}),T=i.lazy((()=>Promise.all([n.e(819),n.e(577),n.e(351),n.e(955),n.e(926),n.e(303),n.e(218),n.e(903)]).then(n.bind(n,3218))));function b(t){return t.split(/[?#]/)[0]}e.default=function(t){const[e,n]=(0,i.useState)(),[m,j]=(0,i.useState)(),[C]=(0,a.j1)("isInDesignMode"),[k]=(0,a.j1)("isDemoBrand"),[K]=(0,a.j1)("whatmoreEmbedAppUseVariant"),[O,P]=(0,i.useState)(-2),[V]=(0,a.j1)("whatmoreVariantId"),[M]=(0,a.j1)("whatmoreShopId");var[A]=(0,a.j1)("whatmoreProductId");const N=(0,a.MO)("isLandingSharedLink"),[W,U]=(0,i.useState)(N),B=(0,a.MO)("whatmoreShareTemplateId"),z=(0,a.MO)("whatmoreShareEventId");A=(0,o.iXA)(M)?b(window.location.href):A;const[H,Z]=(0,i.useState)((()=>"true"===K?V:A));var F=r.Gc+"/v2/brand/"+M+"/product-events";const{whatmoreWidgetSourceDetails:G}=(0,i.useContext)(w.I);(0,i.useEffect)((()=>{(0,x.Oo)("Video shopping powered by Whatmore!"),(0,c.hb)();const t=()=>{const t="_whatmore_bulk_events",e=JSON.parse(localStorage.getItem(t))||[];e&&e.length>0&&((0,y.K)(e),localStorage.removeItem(t))};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}}),[]),(0,i.useEffect)((()=>{(0,p.ll)(M)}),[]),(0,i.useEffect)((()=>{null==e||0==e.length||m||!(0,u.KE)()||(0,a.MO)("whatmoreVideoPlayerPoolInitiated")||(0,l.b5)(l.UD)}),[e]),(0,i.useEffect)((()=>{P(-1),fetch(F.toString()+"?client_product_id="+H.toString()+"&status="+"upcoming".toString()+"&event_type=video").then((t=>t.json())).then((t=>t.events)).then((t=>(null!=t&&0!=t.length&&(0,o.Htz)(M)&&(0,o.d0x)(t),n(t),t))).then((t=>((0,o.yoE)(M)&&function(t,e){setTimeout((async()=>{const n=t.reduce(((t,e)=>[...t,...e.products]),[]).filter((t=>t.client_product_id==e))[0];if(!n||n.product_link==b(window.location.href))return;const i={product_id:n.product_id,product_link:b(window.location.href)};fetch(r.Gc+"/product",{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)})}),500)}(t,H),t))).catch((t=>{j(t.message)}))}),[H]),(0,i.useEffect)((()=>{var t,n;P(-2),(e&&e.length>0||(0,o.uO6)(M))&&(0,_.PB)({userInteractionType:E.K.PDP_VISITED,widgetSourceDetails:G,event:null===e||void 0===e?void 0:e[0],productList:null===e||void 0===e||null===(t=e[0])||void 0===t?void 0:t.products,ctaList:null===e||void 0===e||null===(n=e[0])||void 0===n?void 0:n.cta})}),[e]),(0,i.useEffect)((()=>{let t=history.pushState;history.pushState=function(){let e=t.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),e};let e=history.replaceState;history.replaceState=function(){let t=e.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),t},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))})),window.addEventListener("locationchange",(function(){if("true"===K){const t=function(t){for(var e=window.location.search.substring(1).split("&"),n=0;n<e.length;n++){var i=e[n].split("=");if(i[0]==t)return i[1]}return!1}("variant");t&&""!==t&&Z(t)}}))}),[]),(0,i.useEffect)((()=>{if(null!=e&&0!==e.length&&!m&&N&&"template-embed"===(0,g.zv)(B)&&null!=z){const t=e.find((t=>z==t.event_id));if(t)return q(t,!0,e.indexOf(t)),void U(!1)}U(!1)}),[e]);const R=G.landingLocationType,J=G.templateType,q=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if((0,u.KE)()&&!e&&(0,l.QV)(),(0,f.B6)(t)||(0,f.WJ)(t))return C||k||(async()=>{const e=(0,g.NY)(R)+(0,g.dS)(J)+"_"+(null===t||void 0===t?void 0:t.event_id);(0,s.wh)(t),(0,p.Tc)(M,r.h7,r.dU),(0,c.H4)(t.event_id,t.products,"product_page","video_popup",e)})(),void P(n)};function Y(){return(0,S.jsx)(S.Fragment,{})}return null==e||0==e.length||m?(0,S.jsx)("div",{}):(0,S.jsx)(v.C,{value:D,children:W?(0,S.jsx)(L.Z,{}):"no-product"===H||-1===O||0===e.length?(0,S.jsx)(Y,{}):-2===O&&e.length>0?(0,S.jsx)("div",{children:(0,S.jsx)(I.u,{userInteractionType:E.K.PDP_POPUP_WIDGET_VIEW,event:e[0],productList:e[0].products,cta:e[0].cta,triggerFlag:!C&&!k,children:(0,S.jsx)(d.Z,{event:e[0],inVideoClick:q,closeClick:t=>{t.stopPropagation(),P(-1)}})})}):(0,S.jsx)("div",{children:(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(I.u,{userInteractionType:E.K.EVENT_VIEW,event:e[0],productList:e[0].products,cta:e[0].cta,triggerFlag:!C&&!k,children:(0,S.jsx)(T,{events:e,index:O,onBack:function(t){(0,o.n2L)(M)&&(0,a.MO)("whatmoreAddedToCart")&&(0,h.D)(M,(()=>{}),100,window.location.hostname,t),P(-2),U(!1)},template:"template-product-page"})})})})})}},4522:function(t,e,n){n.d(e,{gW:function(){return s},GF:function(){return c},y4:function(){return l},PB:function(){return u},Z2:function(){return d}});var i=n(9854),o=n(7753),r=n(778);var a=n(733);const s={[r.K.EVENT_VIEW]:"whatmore_video_click_event",[r.K.VIDEO_LIKED]:"whatmore_video_like_event",[r.K.VIDEO_SHARE_CTA_CLICKED]:"whatmore_video_share_event",[r.K.PRODUCT_TILE_ATC_CLICKED]:"whatmore_video_atc_event",[r.K.SHOPNOW_ATC_CLICKED]:"whatmore_video_atc_event"};function c(t){var e;let{userInteractionType:n,userInteractionMetadata:c,widgetSourceDetails:d,event:l,productList:u,ctaList:p}=t;(0,a.s)({userInteractionType:n,userInteractionMetadata:c,widgetSourceDetails:d,event:l,productList:u,ctaList:p}),n in s&&function(t,e){const n=(0,o.MO)("whatmoreShopId");(t!=r.K.EVENT_VIEW||(0,i.UAB)(n))&&(t!=r.K.SHOPNOW_ATC_CLICKED&&t!=r.K.PRODUCT_TILE_ATC_CLICKED||(0,i.Tn_)(n))&&(t!=r.K.VIDEO_LIKED||(0,i.sKB)(n))&&(t!=r.K.VIDEO_SHARE_CTA_CLICKED||(0,i.YOU)(n))&&"function"==typeof fbq&&(async()=>{console.log("hello"),fbq("trackCustom",s[t],{id:null===e||void 0===e?void 0:e.client_product_id,product_url:null===e||void 0===e?void 0:e.product_link})})()}(n,null!==(e=null===u||void 0===u?void 0:u[1])&&void 0!==e?e:null===u||void 0===u?void 0:u[0])}function d(t){let{userInteractionType:e,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:s}=t;(0,a.s)({userInteractionType:e,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:s})}function l(t){let{userInteractionType:e,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:s}=t;(0,a.s)({userInteractionType:e,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:s})}function u(t){let{userInteractionType:e,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:s}=t;(0,a.s)({userInteractionType:e,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:s})}}}]);
@@ -73,7 +73,7 @@
73
73
  0% {
74
74
  transform: translateY(100%);
75
75
  }
76
- `} 0.5s`,bt=null===q||void 0===q||null===(e=q.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"))})),[It,kt]=(0,r.useState)(-1!==bt?null===(n=q.options)||void 0===n||null===(i=n[bt])||void 0===i||null===(o=i.values)||void 0===o?void 0:o[0]:""),[_t,Ft]=(0,r.useState)({});(0,r.useEffect)((()=>{-1!==bt&&"whatmore"!==(0,c.Ipo)(wt)&&async function(){const t=await(0,lt.m3)(Z);Ft(t)}()}),[]);let Tt=-1,Et=-1!==bt&&null!==_t&&void 0!==_t&&_t.product&&(null===_t||void 0===_t||null===(l=_t.product)||void 0===l||null===(a=l.images)||void 0===a?void 0:a.length)>=(null===_t||void 0===_t||null===(d=_t.product)||void 0===d||null===(p=d.options)||void 0===p||null===(v=p[bt])||void 0===v||null===(m=v.values)||void 0===m?void 0:m.length)?null===_t||void 0===_t||null===(f=_t.product)||void 0===f||null===(w=f.images)||void 0===w?void 0:w.map((t=>{var e,n,i,o,r,l,a,d,s,c,u,h,p,v;const x=null===_t||void 0===_t||null===(e=_t.product)||void 0===e||null===(n=e.options)||void 0===n?void 0:n.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===_t||void 0===_t||null===(i=_t.product)||void 0===i||null===(o=i.options)||void 0===o||null===(r=o[x])||void 0===r||null===(l=r.values)||void 0===l?void 0:l[Math.min(++Tt,(null===_t||void 0===_t||null===(a=_t.product)||void 0===a||null===(d=a.options)||void 0===d||null===(s=d[bt])||void 0===s||null===(c=s.values)||void 0===c?void 0:c.length)-1)]:null===_t||void 0===_t||null===(u=_t.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,Tt)],src:null===t||void 0===t?void 0:t.src}})):[],Pt=[];if("whatmore"==(0,c.Ipo)(wt)&&(null===q||void 0===q||null===(j=q.images)||void 0===j?void 0:j.length)>0){var Ot;var Lt;if(-1!==(null===q||void 0===q||null===(Ot=q.options)||void 0===Ot?void 0:Ot.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"))}))))Pt=null===q||void 0===q||null===(Lt=q.images)||void 0===Lt?void 0:Lt.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc})))}return Tt+1<(null===_t||void 0===_t||null===(y=_t.product)||void 0===y||null===(C=y.options)||void 0===C||null===(b=C[bt])||void 0===b||null===(I=b.values)||void 0===I?void 0:I.length)&&(Et=[]),(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===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"xl":null,animation:St,children:[(0,x.jsx)(At,{setOpenShopNow:U,setLockSwiper:B,FONT_SIZE:A}),(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===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"lg":null,overflow:"hidden",sx:{borderWidth:(0,c.alU)(wt),borderColor:(0,c.qPe)(wt)},children:(0,x.jsx)(s.kC,{width:"100%",children:(0,x.jsx)(Zt.P,{renderElement:t=>(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(s.xu,{width:M+"px",height:D+"px",children:(0,x.jsx)(g.Ee,{width:M+"px",height:D+"px",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"lg":null,src:(0,pt.s)(t.eventData.src,"&width=400&height=400"),alt:Z.handle,sx:{objectFit:(0,c.yOX)(wt)+" !important"},fallback:(0,x.jsx)(K.Z,{width:M+"px",height:D+"px",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"10px":"0px"})})})}),dataList:Et.length>0&&!Et.includes(null)?null===(k=Et)||void 0===k?void 0:k.filter((t=>(null===t||void 0===t?void 0:t.color)==It)):Pt.length>0?[null===(_=Pt)||void 0===_?void 0:_.find((t=>(null===t||void 0===t?void 0:t.color)==It))]:null===q||void 0===q||null===(F=q.images)||void 0===F?void 0:F.map((t=>({src:t.includes("https")?t:"https:"+t}))),spacing:10,defaultHeight:M+"px",defaultWidth:D+"px",retainAlreadyRenderedElements:!0,isScroll:!0})})})}),(0,x.jsx)(Ht,{data:q,product:Z,PRODUCT_TILE_HEIGHT:R,PRODUCT_TILE_WIDTH:z,FONT_SIZE:A,getVariantPrice:Yt,selectedVariantId:et,itemPrice:at,itemQuantity:it,setItemQuantity:ot,thumbnailImage:mt}),(null===q||void 0===q||null===(T=q.variants)||void 0===T?void 0:T.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)(wt),size:"xs",width:"90%"})}),(0,x.jsx)(Vt,{data:q,dividerColor:(0,c.W8U)(wt),setSelectedColor:kt,finalArr:Et,finalArrExternal:Pt,product:Z,PRODUCT_TILE_HEIGHT:R,PRODUCT_TILE_WIDTH:z,FONT_SIZE:A,selectOptionFirstHandler:jt,selectOptionSecondHandler:yt,selectOptionThirdHandler:Ct,getVariantPrice:Yt,selectedOptionFirst:X,selectedOptionSecond:$,selectedOptionThird:Q,selectedVariantId:et})]}),c.$2G&&((null===q||void 0===q?void 0:q.description)||(null===q||void 0===q?void 0:q.body_html))&&(0,x.jsx)(Wt,{PRODUCT_TILE_HEIGHT:R,FONT_SIZE:A,data:q,handleToggle:()=>N(!W),show:W}),(0,x.jsx)(s.xu,{sx:{pointerEvents:"none"},paddingTop:"20px",opacity:0,children:(0,x.jsx)(Kt,{position:"relative",data:q,FONT_SIZE:A,product:Z})}),(0,x.jsx)(Kt,{position:"fixed",selectedVariantId:et,data:q,FONT_SIZE:A,PRODUCT_TILE_WIDTH:z,product:Z,itemQuantity:it,cartItemCount:st,addToCartFlag:ut,setAddToCartFlag:ht,soldOutFlag:vt,setSoldOutFlag:xt,event:H})]})}const Bt=(t,e,n,i)=>{var o,r,l,a,d,s,c,u,h,p;if(void 0===e&&void 0===n&&void 0===i)return null===t||void 0===t||null===(o=t.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.id;if(void 0===i&&void 0===n)return null===(l=t.variants.find((t=>t.option1===e)))||void 0===l?void 0:l.id;if(void 0===i&&void 0===e)return null===(a=t.variants.find((t=>t.option2===n)))||void 0===a?void 0:a.id;if(void 0===n&&void 0===e)return null===(d=t.variants.find((t=>t.option3===i)))||void 0===d?void 0:d.id;if(void 0===n)return null===(s=t.variants.find((t=>t.option1===e&&t.option3===i)))||void 0===s?void 0:s.id;if(void 0===i)return null===(c=t.variants.find((t=>t.option1===e&&t.option2===n)))||void 0===c?void 0:c.id;if(void 0===e)return null===(u=t.variants.find((t=>t.option2===n&&t.option3===i)))||void 0===u?void 0:u.id;const v=null===t||void 0===t?void 0:t.variants.find((t=>t.option1===e&&t.option2===n&&t.option3===i));return void 0===v?null===t||void 0===t||null===(h=t.variants)||void 0===h||null===(p=h[0])||void 0===p?void 0:p.id:v.id},Yt=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id===e)))||void 0===i?void 0:i.price},Xt=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id.toString()===e)))||void 0===i?void 0:i.option1},Gt=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id.toString()===e)))||void 0===i?void 0:i.option2},$t=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id.toString()===e)))||void 0===i?void 0:i.option3},Jt=(t,e)=>{var n;const i=null===t||void 0===t||null===(n=t.variants)||void 0===n?void 0:n.find((t=>t.id==e));return void 0===i?null:null===i||void 0===i||null===(o=i.featured_image)||void 0===o?void 0:o.src;var o},Qt=(0,r.createContext)({setShowOptionsChart:null});var te=function(t){const e=t.event,n=t.data,i=t.currentProduct,o=t.setOpenShopNow,l=t.setLockSwiper,[a,d]=(0,r.useState)(!1);return(0,x.jsx)(Qt.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)(Ut,{data:n,event:e,product:i,setOpenShopNow:o,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)(Lt,{data:n,event:e,product:i,setShowOptionsChart:()=>{d(!1)}})})}):(0,x.jsx)(x.Fragment,{})]})})};var ee=function(t){var e,[n,i,o,l]=(0,h.Z)();const[a,d]=(0,r.useState)(!1),[v,g]=(0,r.useState)(),[f,w]=(0,r.useState)(),j=(0,u.MO)("whatmoreShopId"),y=t.event,C=t.onBack,S=r.useRef(),b=t.isPlaying,I=t.isLast,k=t.setLockSwiper,_=t.selectedVariantId,F=null===(e=t.showOverlay)||void 0===e||e,T="center";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:l,height:o,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:T,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:l/o,children:(0,x.jsx)(m,{height:"100%",width:"100%",url:y.event_hls_url,isPlaying:b,event:y})})})}),F?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:T,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)(Ot,{focusRef:S,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:T,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)(te,{focusRef:S,event:t.event,isLast:I,onCloseCallback:()=>C(),setLockSwiper:k,data:v,currentProduct:f,setOpenShopNow:d,selectedVariantId:_})})}):(0,x.jsx)("div",{})]})})};const ne=function(t,e){return isNaN(t)||isNaN(e)||e<=0||t>e?0:Math.ceil(t/e*100)};function ie(t){var e,n,[i,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!==(n=t.indexAmongSiblings)&&void 0!==n?n: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 oe=n(868),re=n(2630);const le=t=>t>=1e3?(t/1e3).toFixed(1)+"k":t;var ae=n(4862);var de=function(t){var e,n,i,o=t.whatmoreShareTemplateId;const l=t.whatmoreShareStoryId,a=t.whatmoreShareEventId,p=t.event,v=null===(e=t.showShareText)||void 0===e||e,m=null!==(n=t.shareButtonBottomMargin)&&void 0!==n?n:0,g=(0,u.MO)("whatmoreShopId"),f=(0,u.MO)("isInDesignMode"),w=(0,u.MO)("isDemoBrand"),j=(0,u.MO)("whatmorePrimaryFont"),{whatmoreWidgetSourceDetails:y}=(0,r.useContext)(V.I),[C,S,b,I]=(0,h.Z)(),k=null!==(i=t.iconSize)&&void 0!==i?i:.1*I;function _(){const e=(0,u.MO)("whatmoreLandingLocationType");var n;!function(t){f||w||(async()=>{(0,d.x0)(t)})()}(p),(e.startsWith("product")||"embed"===e)&&(o="te"),n="event_product_link"===(0,c.EEC)(g)?p.products[0].product_link||"":window.location.pathname,n=("event_product_link"===(0,c.EEC)(g)?"":window.location.hostname)+n+"?wtt="+o+"&wsid="+l+"&weid="+a,(0,c.lj5)(g)&&(n=n+"&"+(0,c.awP)(g)+"&utm_campaign=video-share&utm_medium="+e);const i={title:(0,c.JNF)(g),text:`${(0,c.Qa8)(g)} \n ${n} ${(0,c.AWG)(g)?"\n \n -via Whatmore":""}`};navigator.share&&!ae.nI?navigator.share(i):(t.setIsModalOpen(!0),t.setShareText([i,n]))}return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{cursor:"pointer",style:{marginBottom:m+"px"},children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[(0,x.jsx)(re.Z,{sx:{boxShadow:3,transform:"scaleX(-1)",color:"white",fontSize:k,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),_(),(0,q.GF)({userInteractionType:H.K.VIDEO_SHARE_CTA_CLICKED,widgetSourceDetails:y,event:p,productList:p.products,ctaList:p.cta})}}),v&&(0,c.u8S)(g)?(0,x.jsxs)(s.xv,{fontSize:.3*k+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:j+" !important",color:"white !important",paddingRight:"10%"},children:["\xa0",p.total_share>(0,c.LWl)(g)?le(p.total_share):"Share","\xa0"]}):(0,x.jsx)(x.Fragment,{})]})})})},se=n(7933),ce=n(2785);var ue=function(t){var e;const n=(0,u.MO)("whatmoreShopId"),i=(0,u.MO)("whatmorePrimaryFont"),o=(0,u.MO)("whatmoreLikedEvents"),l=((0,u.MO)("whatmoreSecondaryColor"),(0,u.MO)("isInDesignMode")),a=(0,u.MO)("isDemoBrand"),{whatmoreWidgetSourceDetails:p}=(0,r.useContext)(V.I),v=t.event,[m,g]=(0,r.useState)(null!==(e=o[v.event_id])&&void 0!==e&&e),[f,w,j,y]=(0,h.Z)(),C=.1*y;function S(t,e){l||a||(async()=>{(0,d.Z6)(t,e)})()}function b(){(0,u.bU)("whatmoreLikedEvents",{...o,[v.event_id]:!m}),m?(S(v,-1),(0,q.GF)({userInteractionType:H.K.VIDEO_UNLIKED,widgetSourceDetails:p,event:v,productList:v.products,ctaList:v.cta})):(S(v,1),(0,q.GF)({userInteractionType:H.K.VIDEO_LIKED,widgetSourceDetails:p,event:v,productList:v.products,ctaList:v.cta})),g(!m)}const I=v.total_like+(m?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:[m?(0,x.jsx)(ce.Z,{sx:{boxShadow:3,color:(0,c.dmX)(n),fontSize:C,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}):(0,x.jsx)(se.Z,{sx:{boxShadow:3,color:"white",fontSize:C,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}),(0,x.jsx)(x.Fragment,{children:(0,c.CEM)(n)?(0,x.jsxs)(s.xv,{fontSize:.3*C+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:i+" !important",color:"white !important",position:"relative",bottom:"5px"},children:["\xa0",I>=(0,c.zKg)(n)?le(I):"Like","\xa0"]}):(0,x.jsx)(x.Fragment,{})})]})})})};const he=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 pe=n(8866);const ve=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"})})})},xe=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 me=t=>{const e=t.shareText,[n,i]=(0,r.useState)("Copy link"),[o,l]=(0,r.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://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)(P.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 n;t.stopPropagation();const i=encodeURIComponent(null===(n=e[0])||void 0===n?void 0:n.text);window.open(`https://wa.me/?text=${i}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(he,{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 n;t.stopPropagation();const i=encodeURIComponent(null===(n=e[0])||void 0===n?void 0:n.text);window.open(`https://twitter.com/intent/tweet?text=${i}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(ve,{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]),i("Link copied"),l("green")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(xe,{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:o},children:n})]})]})]})})};function ge(t){var e;const n=t.event,[i,o,l,a]=(0,h.Z)(),[d]=(0,u.j1)("whatmorePrimaryFont"),{whatmoreIsStoriesTemplate:p}=(0,r.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,r.useRef)(null);return(0,r.useEffect)((()=>{w.current&&w.current.play()}),[]),(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*a+"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.$)((0,oe.V)(n.storyset_thumbnail_image))?(0,x.jsx)("video",{className:"whatmore-story-thumbnail",ref:w,preload:"metadata",loop:!0,playsInline:!0,src:(0,oe.V)(n.storyset_thumbnail_image),muted:!0,alt:"story image"}):(0,x.jsx)("img",{src:(0,oe.V)(n.storyset_thumbnail_image),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*a+"px",fontWeight:"medium",lineHeight:"100%",sx:{fontFamily:d+" !important",color:"white !important",textShadow:"0px 0px 4px black !important;"},children:n.storyset_name})})]})}):(0,x.jsx)(x.Fragment,{})})}var fe=function(t){const[e,n,i]=(0,pe.Z)(),[o]=(0,u.j1)("isInDesignMode"),[l]=(0,u.j1)("isDemoBrand"),[a,p]=(0,u.j1)("isProductSwiperCatalogOpen"),[v,m]=(0,u.j1)("isFirstIndicatorRenderDone"),[g]=(0,u.j1)("whatmoreShopId"),f=(0,r.useContext)(ln),{whatmoreEventsBrowsingTemplate:w}=(0,r.useContext)(V.I),[j,C,S,b]=(0,h.Z)(),I=(0,u.MO)("whatmorePrimaryFont"),k=t.event,_=t.storySetId,F=t.isLast,E=t.onCloseCallback,P=t.focusRef,L=t.productClickHandler,z=t.videoPlayingData,R=t.totalSiblingEvents,M=t.indexAmongSiblings,K=t.leftOpenSpaceClickHandler,A=t.midOpenSpaceClickHandler,W=t.rightOpenSpaceClickHandler,{whatmoreWidgetSourceDetails:N}=(0,r.useContext)(V.I),Z=.1*b,[U,B]=(0,r.useState)(!1),[Y,X]=(0,r.useState)([]),G=t=>{$.current&&!$.current.contains(t.target)&&B(!1)},$=(0,r.useRef)(null);return(0,r.useEffect)((()=>(U?document.addEventListener("click",G):document.removeEventListener("click",G),()=>{document.removeEventListener("click",G)})),[U]),(0,x.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[U&&(0,x.jsx)("div",{ref:$,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)(me,{shareText:Y,setShareText:X,iconSize:Z,isModalOpen:U,setIsModalOpen:B})}),(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:[f.showVideoPlayingData?(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",marginTop:"5px",justifyContent:"center",children:(0,x.jsx)(ie,{progress:ne(z.current_time,z.video_duration),totalSiblings:R,indexAmongSiblings:M})}):(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)(ge,{event:k}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,mt.ZK)(w)?(0,x.jsx)(de,{whatmoreShareTemplateId:(0,mt.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:k.event_id,event:k,showShareText:!1,iconSize:.07*b,shareButtonBottomMargin:6,setIsModalOpen:B,setShareText:X}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(y,{focusRef:P}),("landscape"!==e||t.showCloseOverlay)&&(0,x.jsx)(O,{event:k,onCloseCallback:E})]})]})})]}),(0,x.jsxs)(s.Kq,{width:"100%",height:"100%",direction:"row",justifyContent:"center",children:[(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{K()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"34%",height:"100%",onClick:()=>{A()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{W()},sx:{display:"block !important"}})]}),(0,x.jsxs)(s.xu,{width:"full",height:"fit-content",children:[f.totalEvents>1&&!v&&f.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)(D,{swipeUp:!F})})}):null,(0,x.jsxs)(s.xu,{width:"fit-content",height:"fit-content",position:"absolute",right:0,bottom:"25%",children:[(0,c.slY)(g)&&!(0,mt.ZK)(w)?(0,x.jsx)(s.xu,{ml:"auto",width:"fit-content",paddingY:"12px",paddingX:"8px",children:(0,x.jsxs)(s.Kq,{gap:"4px",direction:"column",alignItems:"center",cursor:"pointer",onClick:function(){var t;o||l||(async()=>{(0,d.lY)(k,1)})(),(0,q.GF)({userInteractionType:H.K.WHATSAPP_ICON_CLICKED,widgetSourceDetails:N,event:k,productList:null===k||void 0===k?void 0:k.products,ctaList:null===k||void 0===k?void 0:k.cta});const e=k.products.map((t=>`${t.product_link} \n`)),n=(0,c.gtK)(g),i=`Hey, I am interested in ${k.products.length>1?"these products":"this product"} I saw on ${null===(t=k.products[0])||void 0===t?void 0:t.brand} store: \n${e}. Could you please help me with some queries?`;window.open(n+`&text=${i}&type=phone_number`,"_blank")},children:[(0,x.jsx)(he,{iconSize:.7*Z,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)(s.xv,{fontSize:Z*(0,c.Xod)(g)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:I+" !important",color:"white !important"},children:(0,c.UiZ)(g)})]})}):(0,x.jsx)(x.Fragment,{}),(0,c.jY3)(g)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(ue,{event:k})})}):(0,x.jsx)(x.Fragment,{}),(0,c.ROU)(g)&&!(0,mt.ZK)(w)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(de,{whatmoreShareTemplateId:(0,mt.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:k.event_id,event:k,setIsModalOpen:B,setShareText:X})})}):(0,x.jsx)(x.Fragment,{})]}),(0,_t.kT)(k)?(0,x.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(g)?(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)(T,{event:k,onToggle:t=>{p("minimize-button"!==t)}})})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,x.jsx)(Et,{event:k,productClickHandler:L})})]}):(0,x.jsx)(x.Fragment,{})]})]})]})},we=n(2279),je=n.n(we),ye=n(342);var Ce=function(t){var e,n,i,o,l,a,[d,m,g,f]=(0,h.Z)();const[w,j]=(0,r.useState)(!1),[y,C]=(0,r.useState)(),[S,b]=(0,r.useState)(),[I,k]=(0,r.useState)({current_time:0,video_duration:0,is_video_ended:!1}),_=(0,u.MO)("whatmoreShopId"),F=t.event,T=t.storyId,E=t.onBack,P=r.useRef(),O=t.isPlaying,L=t.isLast,z=t.setLockSwiper,R=t.onVideoEndedCallback,M=t.progressUpdateCallback,D=null!==(e=t.totalSiblingEvents)&&void 0!==e?e:0,K=null!==(n=t.indexAmongSiblings)&&void 0!==n?n:0,A=null===(i=t.showOverlay)||void 0===i||i,W=null!==(o=t.leftOpenSpaceClickHandler)&&void 0!==o?o:()=>{},N=null!==(l=t.midOpenSpaceClickHandler)&&void 0!==l?l:()=>{},Z=null!==(a=t.rightOpenSpaceClickHandler)&&void 0!==a?a:()=>{},{whatmoreWidgetSourceDetails:U}=(0,r.useContext)(V.I),B="center";let Y;try{Y=je()((()=>{R()}),1e3,{leading:!0,trailing:!1})}catch(X){console.log(X)}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:B,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,oe.V)((0,ye.uv)(F)),isPlaying:O,timeUpdateCallback:function(t,e){const n=ne(t,e);M(n);const i=I.is_video_ended;n>=99&&O&&!i?(Y(),k({current_time:t,video_duration:e,is_video_ended:!0})):k({current_time:t,video_duration:e,is_video_ended:i})},event:F,source:t.source})})})}),A?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:B,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)(fe,{focusRef:P,event:t.event,isLast:L,onCloseCallback:t=>{E(t),(0,q.Z2)({userInteractionType:H.K.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:I.current_time},widgetSourceDetails:U,event:F,productList:F.products,ctaList:F.cta})},productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(_),_);b(t),C(e),j(!0),z(!0),(0,q.GF)({userInteractionType:H.K.SHOPNOW_CLICKED,widgetSourceDetails:U,event:F,productList:F.products,ctaList:F.cta}),(0,u.bU)("whatmoreAllowAutoSlide",!1)},videoPlayingData:I,totalSiblingEvents:D,indexAmongSiblings:K,leftOpenSpaceClickHandler:W,midOpenSpaceClickHandler:N,rightOpenSpaceClickHandler:Z,storySetId:T,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay})})}):(0,x.jsx)(x.Fragment,{}),!0===w?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:B,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)(te,{focusRef:P,event:t.event,isLast:L,onCloseCallback:()=>E(),setLockSwiper:z,data:y,currentProduct:S,setOpenShopNow:t=>{j(t),(0,u.bU)("whatmoreAllowAutoSlide",!t)}})})}):(0,x.jsx)("div",{})]})})},Se=n(7300),be=n(8984),Ie=n(58),ke=n(9723);var _e=function(t){var[e,n,i,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:i,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/i,children:(0,x.jsx)(v.Z,{height:"100%",width:"100%",url:(0,oe.V)((0,ye.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,Ie.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,Ie.QV)()}}),(0,x.jsx)(s.xv,{color:"white",fontSize:.05*o+"px",fontWeight:"bold",align:"left",children:"Please click to play video.."})]})})})]})})},Fe=n(3433);var Te=function(t){var e,n;const r=t.event,l=null===(e=t.isPlaying)||void 0===e||e,a=t.onBack,d=t.isLast,s=t.setLockSwiper,c=(t.heightFactor,t.widthFactor,t.onVideoEndedCallback),h=t.progressUpdateCallback,[p,v]=(0,j.Z)(),[m]=(0,u.j1)("whatmoreVideoPlayerPoolBlessed"),g=null===(n=t.showOverlay)||void 0===n||n;function f(){v(!p)}if((0,be.KE)()&&0==m)return(0,x.jsx)(_e,{event:r,onBack:a,isPlaying:l,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:h,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:g,source:Fe.j.CAROUSEL_EVENT_OPENED},"shopping-video-view"+r.event_id);if((0,Se.B6)(r)||(0,Se.WJ)(r))return(0,x.jsx)(Ce,{event:r,onBack:a,isPlaying:l,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:h,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:g,source:Fe.j.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id);if((0,Se.yC)(r)){var{status:w,bannerText:y,timeToStartInMins:C}=i.Z.getEventStatus(r);if(w.name===o.Z.LIVE.name)return(0,x.jsx)(ee,{event:r,onBack:a,isPlaying:l,isLast:d,showOverlay:g},"shopping-live-view"+r.event_id)}return console.error("Can't render event which is neither video or a currently-live-event"),(0,x.jsx)("div",{})},Ee=n(9284),Pe=n.n(Ee),Oe=n(7463),Le=n(2154);function ze(t){var e;const[n,i]=(0,r.useState)(!1),o=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:[n?"whatmore-scale-on-tap":""].join(" "),children:"left"===t.type?(0,x.jsx)(Le.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{i(!0),setTimeout((()=>{i(!1)}),500),o(t,"up")}}):(0,x.jsx)(Oe.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{i(!0),setTimeout((()=>{i(!1)}),500),o(t,"down")}})})}var Re=function(t){var e,n,i;const o=null!==(e=t.relativeBottomPercentage)&&void 0!==e?e:"30%",r=null!==(n=t.width)&&void 0!==n?n:"100%",l=null!==(i=t.fontSize)&&void 0!==i?i: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)(ze,{type:"left",onClick:a,fontSize:l}),(0,x.jsx)(ze,{type:"right",onClick:a,fontSize:l})]})})},Me=n(2860),De=n(4669);var Ke=function(t,e){function n(t,e){return 1==e?0:t<0?e+t:t>=e?t-e:t}const i=(0,r.useRef)({prevIndex:n(t-1,e),activeIndex:t,nextIndex:n(t+1,e)});return[function(){return i.current},function(t){i.current="right"==t?{prevIndex:n(i.current.activeIndex,e),activeIndex:n(i.current.activeIndex+1,e),nextIndex:n(i.current.activeIndex+2,e)}:{prevIndex:n(i.current.activeIndex-2,e),activeIndex:n(i.current.activeIndex-1,e),nextIndex:n(i.current.activeIndex,e)}},function(t){return n(i.current.activeIndex+t)}]};var Ae=function(t,e){const n=(0,r.useRef)({clientX:0,clientY:0});return[function(t){n.current.clientX=t.changedTouches[0].clientX,n.current.clientY=t.changedTouches[0].clientY},function(i){const o=n.current.clientX,r=n.current.clientY;var l=o-i.changedTouches[0].clientX,a=r-i.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 We=function(t,e){const n=(0,r.useRef)(je()(((t,e)=>{t(e)}),300,{leading:!0,trailing:!1}));return[function(i,o){var r=0;if(r="vertical"==t?i.deltaY:i.deltaX,Math.abs(r)<=e)return;const l=r>0?"right":"left";n.current(o,l)}]},Ne=n(5173);var qe=function(t){const e=t.events,n=t.eventIndex,i=t.onBack;var[o,p,v,m]=(0,h.Z)();const[g]=(0,u.j1)("isInDesignMode"),[f]=(0,u.j1)("isDemoBrand"),[w,j]=(0,r.useState)(!0),[y,C]=(0,u.j1)("isFirstIndicatorRenderDone"),[S,b]=(0,r.useState)(!1),{setCloseClickComponent:I}=(0,r.useContext)(ln),{slideDirection:k}=(0,r.useContext)(ln),[_]=(0,u.j1)("whatmoreShopId"),[F]=(0,u.j1)("whatmoreLandingLocationType"),[T,E]=Ke(n,e.length),[P,O]=Ae(k,50),[L]=We("vertical",30),[z,R]=(0,r.useState)(!1),[M,D]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:K,whatmoreUserInfo:A}=(0,r.useContext)(V.I);function N(){R(!1)}function Z(t){N(),setTimeout((()=>{i(t)}),500)}(0,r.useEffect)((()=>(R(!0),()=>{})),[]);const U=K.landingLocationType,B=K.templateType;function Y(){(0,u.MO)("whatmoreAllowAutoSlide")&&(E("right"),M.slideNext())}function X(t,e){E(e),function(t,e){M&&("left"===e?M.slidePrev():M.slideNext())}(0,e)}I(Z);const G=Math.round(.05*v);return(0,x.jsx)(Pe(),{isOpen:z,onAfterOpen:function(){},onRequestClose:N,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)(Ne.Z,{children:(0,x.jsxs)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:(0,W.lA)("#000000",13)},onTouchStart:t=>{P(t)},onTouchEnd:t=>{if(S)return;const e=O(t);e&&X(0,e)},onWheel:t=>{S||L(t,(t=>{X(0,t)}))},children:[(0,x.jsx)(l.tq,{speed:400,threshold:G,slidesPerView:1,direction:k,modules:[a.tl,a.Gk],initialSlide:n,loop:1!=e.length,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,allowSlideNext:!S,allowSlidePrev:!S,allowTouchMove:!1,onSwiper:t=>{D(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:K,event:e[T().activeIndex],productList:e[T().activeIndex].products})},onSlideChange:t=>{var n;w?j(!1):(y||C(!0),n=e[T().activeIndex],g||f||(async()=>{const t=(0,mt.NY)(U)+(0,mt.dS)(B)+"_"+(null===n||void 0===n?void 0:n.event_id);(0,d.wh)(n),"index"===F?((0,De.Tc)(_,Me.Xh,Me.pR),(0,ot.H4)(n.event_id,n.products,Me.Xh,Me.pR,t,null===n||void 0===n?void 0:n.location,null===A||void 0===A?void 0:A.userType)):F.startsWith("product")||"embed"===F?((0,De.Tc)(_,Me.h7,Me.dU),(0,ot.H4)(n.event_id,n.products,Me.h7,Me.dU,t)):F.startsWith("collection")?((0,De.Tc)(_,Me.U$,Me.Pk),(0,ot.H4)(n.event_id,n.products,Me.U$,Me.Pk,t)):((0,De.Tc)(_,Me.Xh,Me.pR),(0,ot.H4)(n.event_id,n.products,Me.Xh,Me.pR,t))})(),(0,q.y4)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:K,event:e[T().activeIndex],productList:e[T().activeIndex].products}))},children:[...Array(Math.min(e.length,3)).keys()].map((n=>(0,x.jsx)(l.o5,{children:n=>{let{isActive:i,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=n;const d=i?"activeIndex":o?"prevIndex":"nextIndex";return(0,x.jsx)(s.Kq,{direction:"column",height:window.innerHeight,justifyContent:"center",children:(0,x.jsx)(Te,{event:e[T()[d]],onBack:Z,isPlaying:1==e.length||i&&l,isLast:!1,setLockSwiper:b,onVideoEndedCallback:Y,progressUpdateCallback:t=>{},showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay})})}},"event-vertical-scroll-slide-"+n)))}),e.length>1&&!S&&(0,c.h6H)(_)&&"horizontal"===(0,c.e8z)(_)&&"horizontal"===k?(0,x.jsx)(Re,{relativeBottomPercentage:"50%",width:m,handleClick:(t,e)=>{X(0,"down"==e?"right":"left")},fontSize:parseInt(.12*m)}):(0,x.jsx)(x.Fragment,{})]})})})},He=n(1168);n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811);const Ve=t=>{let{children:e,customClass:n,show:i,closeCallback:o}=t;return He.createPortal((0,x.jsxs)("div",{className:`whatmore-landscape-modal whatmore-root ${n}`,style:{display:i?"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)};Ve.defaultProps={children:(0,x.jsx)("div",{children:"Empty Modal"}),customClass:"",show:!1,closeCallback:()=>!1};var Ze=Ve;var Ue=function(t){var e;const n=(0,u.MO)("whatmorePrimaryFont"),i=(0,u.MO)("whatmoreShopId"),o=null!==(e=t.fontSize)&&void 0!==e?e:"8";return(0,x.jsx)(s.rU,{href:"https://www.whatmore.ai/shoppable-videos",isExternal:!0,children:(0,c.XFt)(i)&&(0,x.jsxs)(s.Kq,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content",spacing:"2px",paddingLeft:"2px",paddingRight:"2px",paddingBottom:"2px",marginBottom:"2px",children:[(0,x.jsx)("p",{style:{textAlign:"center",color:"white",fontFamily:n,fontWeight:"normal",fontSize:1.1*o+"px",margin:0,padding:0,lineHeight:"110%"},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*o,backgroundColor:"transparent",borderRadius:"0px"}})]})})};var Be=function(t){var[e,n,i,o]=(0,h.Z)();const[p]=(0,u.j1)("isInDesignMode"),[v]=(0,u.j1)("isDemoBrand"),[m,g]=(0,u.j1)("isFirstIndicatorRenderDone"),[f,w]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:j}=(0,r.useContext)(ln),[y,C]=(0,r.useState)(!1),[S]=(0,u.j1)("whatmoreShopId"),[b]=(0,u.j1)("whatmoreLandingLocationType"),{whatmoreUITheme:I}=(0,r.useContext)(V.I),{whatmoreWidgetSourceDetails:k,whatmoreUserInfo:_}=(0,r.useContext)(V.I),[F,T]=(0,r.useState)(!1),[E,P]=(0,r.useState)(null);function L(){T(!1)}const z=t.events,R=t.eventIndex,M=t.onBack,D=z.concat(z),K=z.length,A=(0,r.useRef)(0);function N(t){L(),setTimeout((()=>{M(t)}),500)}function Z(){E&&!E.isEnd&&(0,u.MO)("whatmoreAllowAutoSlide")&&E.slideNext()}(0,r.useEffect)((()=>(T(!0),()=>{})),[]),j(N);const U=k.landingLocationType,B=k.templateType,Y=parseInt(Math.min(5,z.length));return(0,x.jsx)(Ze,{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",aligntItems:"center",backgroundColor:(0,W.lA)("#000000",13),children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:o*Y,children:(0,x.jsxs)(l.tq,{onInit:t=>{P(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:k,event:z[t.activeIndex],productList:z[t.activeIndex].products,ctaList:z[t.activeIndex].cta})},slidesPerView:Y,centeredSlides:!0,allowTouchMove:!1,initialSlide:R,modules:[a.lI,a.W_,a.Gk,a.pt,a.tl],navigation:Y>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*i),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:o*Y,watchSlidesProgress:!0,onSlideChange:t=>{var e;f?w(!1):(m||g(!0),e=z[t.activeIndex],p||v||(async()=>{const t=(0,mt.NY)(U)+(0,mt.dS)(B)+"_"+(null===e||void 0===e?void 0:e.event_id);(0,d.wh)(e),"index"===b?((0,De.Tc)(S,Me.Xh,Me.pR),(0,ot.H4)(e.event_id,e.products,Me.Xh,Me.pR,t,null===e||void 0===e?void 0:e.location,null===_||void 0===_?void 0:_.userType)):b.startsWith("product")||"embed"===b?((0,De.Tc)(S,Me.h7,Me.dU),(0,ot.H4)(e.event_id,e.products,Me.h7,Me.dU,t)):b.startsWith("collection")?((0,De.Tc)(S,Me.U$,Me.Pk),(0,ot.H4)(e.event_id,e.products,Me.U$,Me.Pk,t)):((0,De.Tc)(S,Me.Xh,Me.pR),(0,ot.H4)(e.event_id,e.products,Me.Xh,Me.pR,t))})(),(0,q.y4)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:k,event:z[t.activeIndex],productList:z[t.activeIndex].products,ctaList:z[t.activeIndex].cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[z.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(O,{onCloseCallback:M})}),D.slice(R,z.length+R).map(((t,e)=>(0,x.jsx)(l.o5,{children:t=>{let{isActive:n,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=t;if(n)return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:1*o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Te,{event:z[e%K],onBack:N,isPlaying:!0,isLast:e%K===z.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:Z,progressUpdateCallback:t=>{},showCloseOverlay:(null===z||void 0===z?void 0:z.length)<=2})})});if(l)return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{E.slideTo(e%K,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Te,{event:z[e%K],onBack:N,isPlaying:!1,isLast:e%K===z.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:Z,progressUpdateCallback:t=>{},showOverlay:!1})})});if(r&&1===A.current)return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{E.slideTo(e%K,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Te,{event:z[e%K],onBack:N,isPlaying:!1,isLast:e%K===z.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:Z,progressUpdateCallback:t=>{},showOverlay:!1})})});try{R+e>=K-1&&(A.current=1)}catch(u){console.log(u)}return(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide"+t.event_id)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(Ue,{height:.04*i,width:.1*o,fontSize:.02*i})})]})})},Ye=n(6090),Xe=n(7616),Ge=n(9302),$e=n(2575);var Je=function(t){const[e,n,i,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:i,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/i,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 Qe=function(t){var e;const n=t.stories,i=t.onBack,o=t.onStoryCompleteCallback,a=t.isActive,c=null!==(e=t.initialEventIndex)&&void 0!==e?e:0,p=n.events;var[v,m,g,f]=(0,h.Z)();const[w,y]=(0,j.Z)(),[C]=(0,u.j1)("isInDesignMode"),[S]=(0,u.j1)("isDemoBrand"),[b]=(0,u.j1)("whatmoreShopId"),[I,k]=(0,r.useState)(!0),[_,F]=(0,u.j1)("isFirstIndicatorRenderDone"),[T,E]=(0,r.useState)(null),[P,O]=(0,r.useState)(!1),{whatmoreWidgetSourceDetails:L,whatmoreUserInfo:z}=(0,r.useContext)(V.I),[R,M]=Ke(c,p.length);function D(t){i(t)}const K=L.landingLocationType,A=L.templateType;function W(){if(!(0,u.MO)("whatmoreAllowAutoSlide"))return;R().activeIndex+1>=p.length?o("right"):(M("right"),T&&T.slideNext())}function N(t){const e=R().activeIndex;"right"==t&&e+1>=p.length||"left"==t&&e-1<0?o(t):(M(t),T&&("left"==t?T.slidePrev():T.slideNext()))}return p[R().activeIndex],(0,x.jsx)("div",{children:(0,x.jsx)(l.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):(_||F(!0),function(t){const e=(0,mt.NY)(K)+(0,mt.dS)(A)+"_"+(null===t||void 0===t?void 0:t.event_id);C||S||(async()=>{(0,d.wh)(t),(0,De.Tc)(b,Me.Xh,Me.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===z||void 0===z?void 0:z.userType)})()}(p[R().activeIndex]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:L,event:p[R().activeIndex],productList:p[R().activeIndex].products,ctaList:p[R().activeIndex].cta}))},children:[...Array(Math.min(p.length,3)).keys()].map((e=>(0,x.jsx)(l.o5,{children:e=>{let{isActive:i,isPrev:o,isNext:r,isVisible:l,isDuplicate:d}=e;if(a){const e=i?"activeIndex":o?"prevIndex":"nextIndex",r=p[R()[e]];return(0,x.jsx)(s.Kq,{direction:"column",height:g,justifyContent:"center",children:(0,Se.B6)(r)||(0,Se.WJ)(r)?(0,x.jsx)(Ce,{event:r,totalSiblingEvents:p.length,indexAmongSiblings:R()[e],onBack:D,isPlaying:a&&i&&l,isLast:!1,setLockSwiper:O,onVideoEndedCallback:W,progressUpdateCallback:t=>{},leftOpenSpaceClickHandler:()=>{N("left")},midOpenSpaceClickHandler:()=>{y(!w)},rightOpenSpaceClickHandler:()=>{N("right")},storyId:n.id,source:Fe.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)(Je,{})})}},"event-story-view-slide-"+e)))})})};var tn=function(t){const e=t.onBack,n=t.eventsStories,i=t.initialStoryIndex;var[o,c,p,v]=(0,h.Z)();const[m]=(0,u.j1)("isInDesignMode"),[g]=(0,u.j1)("isDemoBrand"),[f,w]=(0,r.useState)(!0),[j,y]=(0,u.j1)("isFirstIndicatorRenderDone"),[C,S]=(0,r.useState)(!1),{setCloseClickComponent:b}=(0,r.useContext)(ln),{slideDirection:I}=(0,r.useContext)(ln),[k]=(0,u.j1)("whatmoreShopId"),[_,F]=Ke(i,n.length),[T,E]=Ae("horizontal",50),[P]=We("vertical",30),O=t.eventIndex,[L,z]=(0,r.useState)(!1),[R,M]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:D,whatmoreUserInfo:K}=(0,r.useContext)(V.I);function A(){z(!1)}function W(t){A(),setTimeout((()=>{e(t)}),500)}(0,r.useEffect)((()=>(z(!0),()=>{})),[]),b(W);const N=D.landingLocationType,Z=D.templateType;function U(t){R&&(0,u.MO)("whatmoreAllowAutoSlide")&&(F(t),"right"==t?R.slideNext():R.slidePrev())}function B(t,e){U(e)}return(0,x.jsx)(Pe(),{isOpen:L,onAfterOpen:function(){},onRequestClose:A,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=>{T(t)},onTouchEnd:t=>{const e=E(t);e&&B(0,e)},onWheel:t=>{P(t,(t=>{B(0,t)}))},children:(0,x.jsx)(l.tq,{speed:1,slidesPerView:1,direction:"horizontal",modules:[a.SH,a.Gk],initialSlide:i,loop:n.length>1,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,onSwiper:t=>{var e,i;M(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:D,event:n[_().activeIndex].events[0],productList:null===(e=n[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=n[_().activeIndex].events[0])||void 0===i?void 0:i.cta})},onSlideChange:t=>{var e,i;f?w(!1):(!function(t){const e=(0,mt.NY)(N)+(0,mt.dS)(Z)+"_"+(null===t||void 0===t?void 0:t.event_id);m||g||(async()=>{(0,d.wh)(t),(0,De.Tc)(k,Me.Xh,Me.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)})()}(n[_().activeIndex].events[0]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:D,event:n[_().activeIndex].events[0],productList:null===(e=n[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=n[_().activeIndex].events[0])||void 0===i?void 0:i.cta}))},allowTouchMove:!1,cubeEffect:{shadow:!0,slideShadows:!0,shadowOffset:20,shadowScale:.94},children:[...Array(Math.min(n.length,3)).keys()].map((t=>(0,x.jsx)(l.o5,{children:t=>{let{isActive:e,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=t;const c=e?"activeIndex":r?"prevIndex":"nextIndex";return(0,x.jsx)(s.Kq,{direction:"column",height:o,justifyContent:"center",children:(0,x.jsx)(Qe,{stories:n[_()[c]],onBack:W,isActive:e&&a,isNext:l,isPrev:r,onStoryCompleteCallback:U,nextStories:n[_().nextIndex],prevStories:n[_().prevIndex],initialEventIndex:i==_()[c]?O:0},"event-story-view-"+n[_()[c]].id)})}},"event-vertical-scroll-slide-"+t)))})})})},en=n(4892);var nn=function(t){var e,n,i,[o,l,a,d]=(0,h.Z)();const[c]=(0,u.j1)("whatmorePrimaryColor"),[p]=(0,u.j1)("whatmoreSecondaryColor"),v=t.event,m=(t.onBack,r.useRef(),null!==(e=t.showPausedVideo)&&void 0!==e&&e),f=null!==(n=t.heightFactor)&&void 0!==n?n:1,w="flex-end";return d*=null!==(i=t.widthFactor)&&void 0!==i?i: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,Se.B6)(v)||(0,Se.WJ)(v)?(0,x.jsx)(en.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 on=function(t){var[e,n,i,o]=(0,h.Z)();const[c]=(0,u.j1)("isInDesignMode"),[p]=(0,u.j1)("isDemoBrand"),[v,m]=(0,u.j1)("isFirstIndicatorRenderDone"),[g,f]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:w}=(0,r.useContext)(ln),[j,y]=(0,r.useState)(!1),[C]=(0,u.j1)("whatmoreShopId"),{whatmoreWidgetSourceDetails:S,whatmoreUserInfo:b}=(0,r.useContext)(V.I),[I,k]=(0,r.useState)(!1),[_,F]=(0,r.useState)(null);function T(){k(!1)}t.events;const E=t.eventIndex,P=t.onBack,L=t.eventsStories,z=t.initialStoryIndex;function R(t){T(),setTimeout((()=>{P(t)}),500)}(0,r.useEffect)((()=>(k(!0),()=>{})),[]),w(R);const M=S.landingLocationType,D=S.templateType;function K(t){_&&!_.isEnd&&("right"==t?_.slideNext():_.slidePrev())}const A=parseInt(Math.min(5,L.length));return(0,x.jsx)(Ze,{show:I,closeCallback:T,customClass:"whatmore-landscape-modal-stories-view",children:(0,x.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",aligntItems:"center",backgroundColor:"blackAlpha.800",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:o*A,children:(0,x.jsxs)(l.tq,{onInit:t=>{var e,n;F(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:S,event:L[t.activeIndex].events[0],productList:null===(e=L[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=L[t.activeIndex].events[0])||void 0===n?void 0:n.cta})},slidesPerView:A,centeredSlides:!0,allowTouchMove:!1,initialSlide:z,modules:[a.lI,a.W_,a.Gk],navigation:A>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*i),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:o*A,watchSlidesProgress:!0,onSlideChange:t=>{var e,n;g?f(!1):(v||m(!0),function(t){const e=(0,mt.NY)(M)+(0,mt.dS)(D)+"_"+(null===t||void 0===t?void 0:t.event_id);c||p||(async()=>{(0,d.wh)(t),(0,De.Tc)(C,Me.Xh,Me.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===b||void 0===b?void 0:b.userType)})()}(L[t.activeIndex].events[0]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:S,event:L[t.activeIndex].events[0],productList:null===(e=L[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=L[t.activeIndex].events[0])||void 0===n?void 0:n.cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[L.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(O,{onCloseCallback:P})}),L.map(((t,e)=>(0,x.jsx)(l.o5,{children:n=>{let{isActive:r,isPrev:l,isNext:a,isVisible:d,isDuplicate:c}=n;if(r){const n=1;return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o*n,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)(Qe,{stories:t,onBack:R,isActive:r&&d,isNext:!1,isPrev:!1,onStoryCompleteCallback:K,initialEventIndex:z==e?E:0,showCloseOverlay:(null===L||void 0===L?void 0:L.length)<=2},"event-story-view-"+t.id)})})}return l||a?(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{_.slideTo(e,300)},children:(0,x.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(nn,{showPausedVideo:!0,event:L[e].events[0],onBack:R,isPlaying:!1,setLockSwiper:y})})}):(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide-"+e)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(Ue,{height:.04*i,width:.1*o,fontSize:.02*i})})]})})};const rn=(0,$e.Z)({key:"whatmore-css-sv"}),ln=(0,r.createContext)({isIOS:!1,totalEvents:0,closeClickComponent:null,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:"vertical",showSwipeIndicator:!0});var an=function(t){var e,n;const[i,o,l]=(0,pe.Z)(),[a]=(0,u.j1)("whatmoreShopId"),{whatmoreRootId:d}=(0,r.useContext)(V.I),{whatmoreIsStoriesTemplate:s}=(0,r.useContext)(V.I);var h=t.events,p=t.index,v=t.onBack,m=t.eventsStories,g=t.initialStoryIndex,f=(0,c.cX2)(a),w=(h[p],"portrait"===i?null!==(e=t.slideDirection)&&void 0!==e?e:"vertical":null!==(n=t.slideDirection)&&void 0!==n?n:h.length>1?"horizontal":"vertical"),j="portrait"===i?!(0,c.h6H)(a)&&!s:(0,c.n89)(a);return h[p],(0,r.useLayoutEffect)((()=>{(0,c.TLG)(a)&&(window.location.href.includes(f)?history.replaceState(null,"","#"+f):history.pushState(null,"","#"+f),window.addEventListener("popstate",(()=>{window.location.href.includes(f)||v()})))}),[]),delete Xe.ZP.styles.global,s?(0,x.jsx)(Ge.C,{value:rn,children:(0,x.jsx)(Ye.x,{theme:Xe.ZP,cssVarsRoot:d,resetCSS:!1,children:(0,x.jsx)(ln.Provider,{value:{isIOS:(0,be.KE)(),totalEvents:h.length,closeClickComponent:v,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:w,showSwipeIndicator:j},children:"portrait"===i?(0,x.jsx)(tn,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p}):(0,c.Bbr)(a)?(0,x.jsx)(on,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p}):(0,x.jsx)(tn,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p})})})}):(0,x.jsx)(Ge.C,{value:rn,children:(0,x.jsx)(Ye.x,{theme:Xe.ZP,cssVarsRoot:d,resetCSS:!1,children:(0,x.jsx)(ln.Provider,{value:{isIOS:(0,be.KE)(),totalEvents:h.length,closeClickComponent:v,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:w,showSwipeIndicator:j},children:"portrait"===i?(0,x.jsx)(qe,{events:h,eventIndex:p,onBack:v}):(0,x.jsx)(Be,{events:h,eventIndex:p,onBack:v})})})})}},9316:function(t,e,n){n.d(e,{mT:function(){return o}});var i=n(686);const o=`\n ${i.F4`
76
+ `} 0.5s`,bt=null===q||void 0===q||null===(e=q.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"))})),[It,kt]=(0,r.useState)(-1!==bt?null===(n=q.options)||void 0===n||null===(i=n[bt])||void 0===i||null===(o=i.values)||void 0===o?void 0:o[0]:""),[_t,Ft]=(0,r.useState)({});(0,r.useEffect)((()=>{-1!==bt&&"whatmore"!==(0,c.Ipo)(wt)&&async function(){const t=await(0,lt.m3)(Z);Ft(t)}()}),[]);let Tt=-1,Et=-1!==bt&&null!==_t&&void 0!==_t&&_t.product&&(null===_t||void 0===_t||null===(l=_t.product)||void 0===l||null===(a=l.images)||void 0===a?void 0:a.length)>=(null===_t||void 0===_t||null===(d=_t.product)||void 0===d||null===(p=d.options)||void 0===p||null===(v=p[bt])||void 0===v||null===(m=v.values)||void 0===m?void 0:m.length)?null===_t||void 0===_t||null===(f=_t.product)||void 0===f||null===(w=f.images)||void 0===w?void 0:w.map((t=>{var e,n,i,o,r,l,a,d,s,c,u,h,p,v;const x=null===_t||void 0===_t||null===(e=_t.product)||void 0===e||null===(n=e.options)||void 0===n?void 0:n.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===_t||void 0===_t||null===(i=_t.product)||void 0===i||null===(o=i.options)||void 0===o||null===(r=o[x])||void 0===r||null===(l=r.values)||void 0===l?void 0:l[Math.min(++Tt,(null===_t||void 0===_t||null===(a=_t.product)||void 0===a||null===(d=a.options)||void 0===d||null===(s=d[bt])||void 0===s||null===(c=s.values)||void 0===c?void 0:c.length)-1)]:null===_t||void 0===_t||null===(u=_t.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,Tt)],src:null===t||void 0===t?void 0:t.src}})):[],Pt=[];if("whatmore"==(0,c.Ipo)(wt)&&(null===q||void 0===q||null===(j=q.images)||void 0===j?void 0:j.length)>0){var Ot;var Lt;if(-1!==(null===q||void 0===q||null===(Ot=q.options)||void 0===Ot?void 0:Ot.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"))}))))Pt=null===q||void 0===q||null===(Lt=q.images)||void 0===Lt?void 0:Lt.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc})))}return Tt+1<(null===_t||void 0===_t||null===(y=_t.product)||void 0===y||null===(C=y.options)||void 0===C||null===(b=C[bt])||void 0===b||null===(I=b.values)||void 0===I?void 0:I.length)&&(Et=[]),(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===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"xl":null,animation:St,children:[(0,x.jsx)(At,{setOpenShopNow:U,setLockSwiper:B,FONT_SIZE:A}),(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===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"lg":null,overflow:"hidden",sx:{borderWidth:(0,c.alU)(wt),borderColor:(0,c.qPe)(wt)},children:(0,x.jsx)(s.kC,{width:"100%",children:(0,x.jsx)(Zt.P,{renderElement:t=>(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(s.xu,{width:M+"px",height:D+"px",children:(0,x.jsx)(g.Ee,{width:M+"px",height:D+"px",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"lg":null,src:(0,pt.s)(t.eventData.src,"&width=400&height=400"),alt:Z.handle,sx:{objectFit:(0,c.yOX)(wt)+" !important"},fallback:(0,x.jsx)(K.Z,{width:M+"px",height:D+"px",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"10px":"0px"})})})}),dataList:Et.length>0&&!Et.includes(null)?null===(k=Et)||void 0===k?void 0:k.filter((t=>(null===t||void 0===t?void 0:t.color)==It)):Pt.length>0?[null===(_=Pt)||void 0===_?void 0:_.find((t=>(null===t||void 0===t?void 0:t.color)==It))]:null===q||void 0===q||null===(F=q.images)||void 0===F?void 0:F.map((t=>({src:t.includes("https")?t:"https:"+t}))),spacing:10,defaultHeight:M+"px",defaultWidth:D+"px",retainAlreadyRenderedElements:!0,isScroll:!0})})})}),(0,x.jsx)(Ht,{data:q,product:Z,PRODUCT_TILE_HEIGHT:R,PRODUCT_TILE_WIDTH:z,FONT_SIZE:A,getVariantPrice:Yt,selectedVariantId:et,itemPrice:at,itemQuantity:it,setItemQuantity:ot,thumbnailImage:mt}),(null===q||void 0===q||null===(T=q.variants)||void 0===T?void 0:T.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)(wt),size:"xs",width:"90%"})}),(0,x.jsx)(Vt,{data:q,dividerColor:(0,c.W8U)(wt),setSelectedColor:kt,finalArr:Et,finalArrExternal:Pt,product:Z,PRODUCT_TILE_HEIGHT:R,PRODUCT_TILE_WIDTH:z,FONT_SIZE:A,selectOptionFirstHandler:jt,selectOptionSecondHandler:yt,selectOptionThirdHandler:Ct,getVariantPrice:Yt,selectedOptionFirst:X,selectedOptionSecond:$,selectedOptionThird:Q,selectedVariantId:et})]}),c.$2G&&((null===q||void 0===q?void 0:q.description)||(null===q||void 0===q?void 0:q.body_html))&&(0,x.jsx)(Wt,{PRODUCT_TILE_HEIGHT:R,FONT_SIZE:A,data:q,handleToggle:()=>N(!W),show:W}),(0,x.jsx)(s.xu,{sx:{pointerEvents:"none"},paddingTop:"20px",opacity:0,children:(0,x.jsx)(Kt,{position:"relative",data:q,FONT_SIZE:A,product:Z})}),(0,x.jsx)(Kt,{position:"fixed",selectedVariantId:et,data:q,FONT_SIZE:A,PRODUCT_TILE_WIDTH:z,product:Z,itemQuantity:it,cartItemCount:st,addToCartFlag:ut,setAddToCartFlag:ht,soldOutFlag:vt,setSoldOutFlag:xt,event:H})]})}const Bt=(t,e,n,i)=>{var o,r,l,a,d,s,c,u,h,p;if(void 0===e&&void 0===n&&void 0===i)return null===t||void 0===t||null===(o=t.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.id;if(void 0===i&&void 0===n)return null===(l=t.variants.find((t=>t.option1===e)))||void 0===l?void 0:l.id;if(void 0===i&&void 0===e)return null===(a=t.variants.find((t=>t.option2===n)))||void 0===a?void 0:a.id;if(void 0===n&&void 0===e)return null===(d=t.variants.find((t=>t.option3===i)))||void 0===d?void 0:d.id;if(void 0===n)return null===(s=t.variants.find((t=>t.option1===e&&t.option3===i)))||void 0===s?void 0:s.id;if(void 0===i)return null===(c=t.variants.find((t=>t.option1===e&&t.option2===n)))||void 0===c?void 0:c.id;if(void 0===e)return null===(u=t.variants.find((t=>t.option2===n&&t.option3===i)))||void 0===u?void 0:u.id;const v=null===t||void 0===t?void 0:t.variants.find((t=>t.option1===e&&t.option2===n&&t.option3===i));return void 0===v?null===t||void 0===t||null===(h=t.variants)||void 0===h||null===(p=h[0])||void 0===p?void 0:p.id:v.id},Yt=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id===e)))||void 0===i?void 0:i.price},Xt=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id.toString()===e)))||void 0===i?void 0:i.option1},Gt=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id.toString()===e)))||void 0===i?void 0:i.option2},$t=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id.toString()===e)))||void 0===i?void 0:i.option3},Jt=(t,e)=>{var n;const i=null===t||void 0===t||null===(n=t.variants)||void 0===n?void 0:n.find((t=>t.id==e));return void 0===i?null:null===i||void 0===i||null===(o=i.featured_image)||void 0===o?void 0:o.src;var o},Qt=(0,r.createContext)({setShowOptionsChart:null});var te=function(t){const e=t.event,n=t.data,i=t.currentProduct,o=t.setOpenShopNow,l=t.setLockSwiper,[a,d]=(0,r.useState)(!1);return(0,x.jsx)(Qt.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)(Ut,{data:n,event:e,product:i,setOpenShopNow:o,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)(Lt,{data:n,event:e,product:i,setShowOptionsChart:()=>{d(!1)}})})}):(0,x.jsx)(x.Fragment,{})]})})};var ee=function(t){var e,[n,i,o,l]=(0,h.Z)();const[a,d]=(0,r.useState)(!1),[v,g]=(0,r.useState)(),[f,w]=(0,r.useState)(),j=(0,u.MO)("whatmoreShopId"),y=t.event,C=t.onBack,S=r.useRef(),b=t.isPlaying,I=t.isLast,k=t.setLockSwiper,_=t.selectedVariantId,F=null===(e=t.showOverlay)||void 0===e||e,T="center";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:l,height:o,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:T,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:l/o,children:(0,x.jsx)(m,{height:"100%",width:"100%",url:y.event_hls_url,isPlaying:b,event:y})})})}),F?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:T,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)(Ot,{focusRef:S,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:T,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)(te,{focusRef:S,event:t.event,isLast:I,onCloseCallback:()=>C(),setLockSwiper:k,data:v,currentProduct:f,setOpenShopNow:d,selectedVariantId:_})})}):(0,x.jsx)("div",{})]})})};const ne=function(t,e){return isNaN(t)||isNaN(e)||e<=0||t>e?0:Math.ceil(t/e*100)};function ie(t){var e,n,[i,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!==(n=t.indexAmongSiblings)&&void 0!==n?n: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 oe=n(868),re=n(2630);const le=t=>t>=1e3?(t/1e3).toFixed(1)+"k":t;var ae=n(4862);var de=function(t){var e,n,i,o=t.whatmoreShareTemplateId;const l=t.whatmoreShareStoryId,a=t.whatmoreShareEventId,p=t.event,v=null===(e=t.showShareText)||void 0===e||e,m=null!==(n=t.shareButtonBottomMargin)&&void 0!==n?n:0,g=(0,u.MO)("whatmoreShopId"),f=(0,u.MO)("isInDesignMode"),w=(0,u.MO)("isDemoBrand"),j=(0,u.MO)("whatmorePrimaryFont"),{whatmoreWidgetSourceDetails:y}=(0,r.useContext)(V.I),[C,S,b,I]=(0,h.Z)(),k=null!==(i=t.iconSize)&&void 0!==i?i:.1*I;function _(){const e=(0,u.MO)("whatmoreLandingLocationType");var n;!function(t){f||w||(async()=>{(0,d.x0)(t)})()}(p),(e.startsWith("product")||"embed"===e)&&(o="te"),n="event_product_link"===(0,c.EEC)(g)?p.products[0].product_link||"":window.location.pathname,n=("event_product_link"===(0,c.EEC)(g)?"":window.location.hostname)+n+"?wtt="+o+"&wsid="+l+"&weid="+a,(0,c.lj5)(g)&&(n=n+"&"+(0,c.awP)(g)+"&utm_campaign=video-share&utm_medium="+e);const i={title:(0,c.JNF)(g),text:`${(0,c.Qa8)(g)} \n ${n} ${(0,c.AWG)(g)?"\n \n -via Whatmore":""}`};navigator.share&&!ae.nI?navigator.share(i):(t.setIsModalOpen(!0),t.setShareText([i,n]))}return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{cursor:"pointer",style:{marginBottom:m+"px"},children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[(0,x.jsx)(re.Z,{sx:{boxShadow:3,transform:"scaleX(-1)",color:"white",fontSize:k,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),_(),(0,q.GF)({userInteractionType:H.K.VIDEO_SHARE_CTA_CLICKED,widgetSourceDetails:y,event:p,productList:p.products,ctaList:p.cta})}}),v&&(0,c.u8S)(g)?(0,x.jsxs)(s.xv,{fontSize:.3*k+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:j+" !important",color:"white !important",paddingRight:"10%"},children:["\xa0",p.total_share>(0,c.LWl)(g)?le(p.total_share):"Share","\xa0"]}):(0,x.jsx)(x.Fragment,{})]})})})},se=n(7933),ce=n(2785);var ue=function(t){var e;const n=(0,u.MO)("whatmoreShopId"),i=(0,u.MO)("whatmorePrimaryFont"),o=(0,u.MO)("whatmoreLikedEvents"),l=((0,u.MO)("whatmoreSecondaryColor"),(0,u.MO)("isInDesignMode")),a=(0,u.MO)("isDemoBrand"),{whatmoreWidgetSourceDetails:p}=(0,r.useContext)(V.I),v=t.event,[m,g]=(0,r.useState)(null!==(e=o[v.event_id])&&void 0!==e&&e),[f,w,j,y]=(0,h.Z)(),C=.1*y;function S(t,e){l||a||(async()=>{(0,d.Z6)(t,e)})()}function b(){(0,u.bU)("whatmoreLikedEvents",{...o,[v.event_id]:!m}),m?(S(v,-1),(0,q.GF)({userInteractionType:H.K.VIDEO_UNLIKED,widgetSourceDetails:p,event:v,productList:v.products,ctaList:v.cta})):(S(v,1),(0,q.GF)({userInteractionType:H.K.VIDEO_LIKED,widgetSourceDetails:p,event:v,productList:v.products,ctaList:v.cta})),g(!m)}const I=v.total_like+(m?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:[m?(0,x.jsx)(ce.Z,{sx:{boxShadow:3,color:(0,c.dmX)(n),fontSize:C,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}):(0,x.jsx)(se.Z,{sx:{boxShadow:3,color:"white",fontSize:C,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}),(0,x.jsx)(x.Fragment,{children:(0,c.CEM)(n)?(0,x.jsxs)(s.xv,{fontSize:.3*C+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:i+" !important",color:"white !important",position:"relative",bottom:"5px"},children:["\xa0",I>=(0,c.zKg)(n)?le(I):"Like","\xa0"]}):(0,x.jsx)(x.Fragment,{})})]})})})};const he=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 pe=n(8866);const ve=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"})})})},xe=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 me=t=>{const e=t.shareText,[n,i]=(0,r.useState)("Copy link"),[o,l]=(0,r.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://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)(P.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 n;t.stopPropagation();const i=encodeURIComponent(null===(n=e[0])||void 0===n?void 0:n.text);window.open(`https://wa.me/?text=${i}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(he,{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 n;t.stopPropagation();const i=encodeURIComponent(null===(n=e[0])||void 0===n?void 0:n.text);window.open(`https://twitter.com/intent/tweet?text=${i}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(ve,{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]),i("Link copied"),l("green")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(xe,{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:o},children:n})]})]})]})})};var ge=function(t){var e;const n=(0,u.MO)("whatmorePrimaryFont"),i=(0,u.MO)("whatmoreShopId"),o=null!==(e=t.fontSize)&&void 0!==e?e:"8";return(0,x.jsx)(s.rU,{href:"https://www.whatmore.ai/shoppable-videos",isExternal:!0,children:(0,c.XFt)(i)&&(0,x.jsxs)(s.Kq,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content",spacing:"2px",paddingLeft:"2px",paddingRight:"2px",paddingBottom:"2px",marginBottom:"2px",children:[(0,x.jsx)("p",{style:{textAlign:"center",color:"white",fontFamily:n,fontWeight:"normal",fontSize:1.1*o+"px",margin:0,padding:0,lineHeight:"110%"},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*o,backgroundColor:"transparent",borderRadius:"0px"}})]})})};function fe(t){var e;const n=t.event,[i,o,l,a]=(0,h.Z)(),[d]=(0,u.j1)("whatmorePrimaryFont"),{whatmoreIsStoriesTemplate:p}=(0,r.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,r.useRef)(null);return(0,r.useEffect)((()=>{w.current&&w.current.play()}),[]),(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*a+"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.$)((0,oe.V)(n.storyset_thumbnail_image))?(0,x.jsx)("video",{className:"whatmore-story-thumbnail",ref:w,preload:"metadata",loop:!0,playsInline:!0,src:(0,oe.V)(n.storyset_thumbnail_image),muted:!0,alt:"story image"}):(0,x.jsx)("img",{src:(0,oe.V)(n.storyset_thumbnail_image),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*a+"px",fontWeight:"medium",lineHeight:"100%",sx:{fontFamily:d+" !important",color:"white !important",textShadow:"0px 0px 4px black !important;"},children:n.storyset_name})})]})}):(0,x.jsx)(x.Fragment,{})})}var we=function(t){const[e,n,i]=(0,pe.Z)(),[o]=(0,u.j1)("isInDesignMode"),[l]=(0,u.j1)("isDemoBrand"),[a,p]=(0,u.j1)("isProductSwiperCatalogOpen"),[v,m]=(0,u.j1)("isFirstIndicatorRenderDone"),[g]=(0,u.j1)("whatmoreShopId"),f=(0,r.useContext)(ln),{whatmoreEventsBrowsingTemplate:w}=(0,r.useContext)(V.I),[j,C,S,b]=(0,h.Z)(),I=(0,u.MO)("whatmorePrimaryFont"),k=t.event,_=t.storySetId,F=t.isLast,E=t.onCloseCallback,P=t.focusRef,L=t.productClickHandler,z=t.videoPlayingData,R=t.totalSiblingEvents,M=t.indexAmongSiblings,K=t.leftOpenSpaceClickHandler,A=t.midOpenSpaceClickHandler,W=t.rightOpenSpaceClickHandler,{whatmoreWidgetSourceDetails:N}=(0,r.useContext)(V.I),Z=.1*b,[U,B]=(0,r.useState)(!1),[Y,X]=(0,r.useState)([]),G=t=>{$.current&&!$.current.contains(t.target)&&B(!1)},$=(0,r.useRef)(null);(0,r.useEffect)((()=>(U?document.addEventListener("click",G):document.removeEventListener("click",G),()=>{document.removeEventListener("click",G)})),[U]);const J="Free"==(0,c.Svj)(g)&&"portrait"==e;return(0,x.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[U&&(0,x.jsx)("div",{ref:$,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)(me,{shareText:Y,setShareText:X,iconSize:Z,isModalOpen:U,setIsModalOpen:B})}),(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:[f.showVideoPlayingData?(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",marginTop:"5px",justifyContent:"center",children:(0,x.jsx)(ie,{progress:ne(z.current_time,z.video_duration),totalSiblings:R,indexAmongSiblings:M})}):(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)(fe,{event:k}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,mt.ZK)(w)?(0,x.jsx)(de,{whatmoreShareTemplateId:(0,mt.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:k.event_id,event:k,showShareText:!1,iconSize:.07*b,shareButtonBottomMargin:6,setIsModalOpen:B,setShareText:X}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(y,{focusRef:P}),("landscape"!==e||t.showCloseOverlay)&&(0,x.jsx)(O,{event:k,onCloseCallback:E})]})]})})]}),(0,x.jsxs)(s.Kq,{width:"100%",height:"100%",direction:"row",justifyContent:"center",children:[(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{K()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"34%",height:"100%",onClick:()=>{A()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{W()},sx:{display:"block !important"}})]}),(0,x.jsxs)(s.xu,{width:"full",height:"fit-content",children:[f.totalEvents>1&&!v&&f.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)(D,{swipeUp:!F})})}):null,(0,x.jsxs)(s.xu,{width:"fit-content",height:"fit-content",position:"absolute",right:0,bottom:"25%",children:[(0,c.slY)(g)&&!(0,mt.ZK)(w)?(0,x.jsx)(s.xu,{ml:"auto",width:"fit-content",paddingY:"12px",paddingX:"8px",children:(0,x.jsxs)(s.Kq,{gap:"4px",direction:"column",alignItems:"center",cursor:"pointer",onClick:function(){var t;o||l||(async()=>{(0,d.lY)(k,1)})(),(0,q.GF)({userInteractionType:H.K.WHATSAPP_ICON_CLICKED,widgetSourceDetails:N,event:k,productList:null===k||void 0===k?void 0:k.products,ctaList:null===k||void 0===k?void 0:k.cta});const e=k.products.map((t=>`${t.product_link} \n`)),n=(0,c.gtK)(g),i=`Hey, I am interested in ${k.products.length>1?"these products":"this product"} I saw on ${null===(t=k.products[0])||void 0===t?void 0:t.brand} store: \n${e}. Could you please help me with some queries?`;window.open(n+`&text=${i}&type=phone_number`,"_blank")},children:[(0,x.jsx)(he,{iconSize:.7*Z,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)(s.xv,{fontSize:Z*(0,c.Xod)(g)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:I+" !important",color:"white !important"},children:(0,c.UiZ)(g)})]})}):(0,x.jsx)(x.Fragment,{}),(0,c.jY3)(g)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(ue,{event:k})})}):(0,x.jsx)(x.Fragment,{}),(0,c.ROU)(g)&&!(0,mt.ZK)(w)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(de,{whatmoreShareTemplateId:(0,mt.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:k.event_id,event:k,setIsModalOpen:B,setShareText:X})})}):(0,x.jsx)(x.Fragment,{})]}),(0,_t.kT)(k)?(0,x.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(g)?(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)(T,{event:k,onToggle:t=>{p("minimize-button"!==t)}})})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,x.jsx)(Et,{event:k,productClickHandler:L})})]}):(0,x.jsx)(x.Fragment,{})]}),J&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",bg:"gray",py:"2px",justifyContent:"center",children:(0,x.jsx)(ge,{fontSize:.032*b})})]})]})},je=n(2279),ye=n.n(je),Ce=n(342);var Se=function(t){var e,n,i,o,l,a,[d,m,g,f]=(0,h.Z)();const[w,j]=(0,r.useState)(!1),[y,C]=(0,r.useState)(),[S,b]=(0,r.useState)(),[I,k]=(0,r.useState)({current_time:0,video_duration:0,is_video_ended:!1}),_=(0,u.MO)("whatmoreShopId"),F=t.event,T=t.storyId,E=t.onBack,P=r.useRef(),O=t.isPlaying,L=t.isLast,z=t.setLockSwiper,R=t.onVideoEndedCallback,M=t.progressUpdateCallback,D=null!==(e=t.totalSiblingEvents)&&void 0!==e?e:0,K=null!==(n=t.indexAmongSiblings)&&void 0!==n?n:0,A=null===(i=t.showOverlay)||void 0===i||i,W=null!==(o=t.leftOpenSpaceClickHandler)&&void 0!==o?o:()=>{},N=null!==(l=t.midOpenSpaceClickHandler)&&void 0!==l?l:()=>{},Z=null!==(a=t.rightOpenSpaceClickHandler)&&void 0!==a?a:()=>{},{whatmoreWidgetSourceDetails:U}=(0,r.useContext)(V.I),B="center";let Y;try{Y=ye()((()=>{R()}),1e3,{leading:!0,trailing:!1})}catch(X){console.log(X)}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:B,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,oe.V)((0,Ce.uv)(F)),isPlaying:O,timeUpdateCallback:function(t,e){const n=ne(t,e);M(n);const i=I.is_video_ended;n>=99&&O&&!i?(Y(),k({current_time:t,video_duration:e,is_video_ended:!0})):k({current_time:t,video_duration:e,is_video_ended:i})},event:F,source:t.source})})})}),A?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:B,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)(we,{focusRef:P,event:t.event,isLast:L,onCloseCallback:t=>{E(t),(0,q.Z2)({userInteractionType:H.K.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:I.current_time},widgetSourceDetails:U,event:F,productList:F.products,ctaList:F.cta})},productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(_),_);b(t),C(e),j(!0),z(!0),(0,q.GF)({userInteractionType:H.K.SHOPNOW_CLICKED,widgetSourceDetails:U,event:F,productList:F.products,ctaList:F.cta}),(0,u.bU)("whatmoreAllowAutoSlide",!1)},videoPlayingData:I,totalSiblingEvents:D,indexAmongSiblings:K,leftOpenSpaceClickHandler:W,midOpenSpaceClickHandler:N,rightOpenSpaceClickHandler:Z,storySetId:T,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay})})}):(0,x.jsx)(x.Fragment,{}),!0===w?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:B,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)(te,{focusRef:P,event:t.event,isLast:L,onCloseCallback:()=>E(),setLockSwiper:z,data:y,currentProduct:S,setOpenShopNow:t=>{j(t),(0,u.bU)("whatmoreAllowAutoSlide",!t)}})})}):(0,x.jsx)("div",{})]})})},be=n(7300),Ie=n(8984),ke=n(58),_e=n(9723);var Fe=function(t){var[e,n,i,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:i,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/i,children:(0,x.jsx)(v.Z,{height:"100%",width:"100%",url:(0,oe.V)((0,Ce.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,ke.QV)()},children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"full",width:"full",children:[(0,x.jsx)(_e.Z,{sx:{boxShadow:3,color:(0,c.Ya_)(r),fontSize:.4*o,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{(0,ke.QV)()}}),(0,x.jsx)(s.xv,{color:"white",fontSize:.05*o+"px",fontWeight:"bold",align:"left",children:"Please click to play video.."})]})})})]})})},Te=n(3433);var Ee=function(t){var e,n;const r=t.event,l=null===(e=t.isPlaying)||void 0===e||e,a=t.onBack,d=t.isLast,s=t.setLockSwiper,c=(t.heightFactor,t.widthFactor,t.onVideoEndedCallback),h=t.progressUpdateCallback,[p,v]=(0,j.Z)(),[m]=(0,u.j1)("whatmoreVideoPlayerPoolBlessed"),g=null===(n=t.showOverlay)||void 0===n||n;function f(){v(!p)}if((0,Ie.KE)()&&0==m)return(0,x.jsx)(Fe,{event:r,onBack:a,isPlaying:l,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:h,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:g,source:Te.j.CAROUSEL_EVENT_OPENED},"shopping-video-view"+r.event_id);if((0,be.B6)(r)||(0,be.WJ)(r))return(0,x.jsx)(Se,{event:r,onBack:a,isPlaying:l,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:h,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:g,source:Te.j.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id);if((0,be.yC)(r)){var{status:w,bannerText:y,timeToStartInMins:C}=i.Z.getEventStatus(r);if(w.name===o.Z.LIVE.name)return(0,x.jsx)(ee,{event:r,onBack:a,isPlaying:l,isLast:d,showOverlay:g},"shopping-live-view"+r.event_id)}return console.error("Can't render event which is neither video or a currently-live-event"),(0,x.jsx)("div",{})},Pe=n(9284),Oe=n.n(Pe),Le=n(7463),ze=n(2154);function Re(t){var e;const[n,i]=(0,r.useState)(!1),o=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:[n?"whatmore-scale-on-tap":""].join(" "),children:"left"===t.type?(0,x.jsx)(ze.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{i(!0),setTimeout((()=>{i(!1)}),500),o(t,"up")}}):(0,x.jsx)(Le.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{i(!0),setTimeout((()=>{i(!1)}),500),o(t,"down")}})})}var Me=function(t){var e,n,i;const o=null!==(e=t.relativeBottomPercentage)&&void 0!==e?e:"30%",r=null!==(n=t.width)&&void 0!==n?n:"100%",l=null!==(i=t.fontSize)&&void 0!==i?i: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)(Re,{type:"left",onClick:a,fontSize:l}),(0,x.jsx)(Re,{type:"right",onClick:a,fontSize:l})]})})},De=n(2860),Ke=n(4669);var Ae=function(t,e){function n(t,e){return 1==e?0:t<0?e+t:t>=e?t-e:t}const i=(0,r.useRef)({prevIndex:n(t-1,e),activeIndex:t,nextIndex:n(t+1,e)});return[function(){return i.current},function(t){i.current="right"==t?{prevIndex:n(i.current.activeIndex,e),activeIndex:n(i.current.activeIndex+1,e),nextIndex:n(i.current.activeIndex+2,e)}:{prevIndex:n(i.current.activeIndex-2,e),activeIndex:n(i.current.activeIndex-1,e),nextIndex:n(i.current.activeIndex,e)}},function(t){return n(i.current.activeIndex+t)}]};var We=function(t,e){const n=(0,r.useRef)({clientX:0,clientY:0});return[function(t){n.current.clientX=t.changedTouches[0].clientX,n.current.clientY=t.changedTouches[0].clientY},function(i){const o=n.current.clientX,r=n.current.clientY;var l=o-i.changedTouches[0].clientX,a=r-i.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 Ne=function(t,e){const n=(0,r.useRef)(ye()(((t,e)=>{t(e)}),300,{leading:!0,trailing:!1}));return[function(i,o){var r=0;if(r="vertical"==t?i.deltaY:i.deltaX,Math.abs(r)<=e)return;const l=r>0?"right":"left";n.current(o,l)}]},qe=n(5173);var He=function(t){const e=t.events,n=t.eventIndex,i=t.onBack;var[o,p,v,m]=(0,h.Z)();const[g]=(0,u.j1)("isInDesignMode"),[f]=(0,u.j1)("isDemoBrand"),[w,j]=(0,r.useState)(!0),[y,C]=(0,u.j1)("isFirstIndicatorRenderDone"),[S,b]=(0,r.useState)(!1),{setCloseClickComponent:I}=(0,r.useContext)(ln),{slideDirection:k}=(0,r.useContext)(ln),[_]=(0,u.j1)("whatmoreShopId"),[F]=(0,u.j1)("whatmoreLandingLocationType"),[T,E]=Ae(n,e.length),[P,O]=We(k,50),[L]=Ne("vertical",30),[z,R]=(0,r.useState)(!1),[M,D]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:K,whatmoreUserInfo:A}=(0,r.useContext)(V.I);function N(){R(!1)}function Z(t){N(),setTimeout((()=>{i(t)}),500)}(0,r.useEffect)((()=>(R(!0),()=>{})),[]);const U=K.landingLocationType,B=K.templateType;function Y(){(0,u.MO)("whatmoreAllowAutoSlide")&&(E("right"),M.slideNext())}function X(t,e){E(e),function(t,e){M&&("left"===e?M.slidePrev():M.slideNext())}(0,e)}I(Z);const G=Math.round(.05*v);return(0,x.jsx)(Oe(),{isOpen:z,onAfterOpen:function(){},onRequestClose:N,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)(qe.Z,{children:(0,x.jsxs)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:(0,W.lA)("#000000",13)},onTouchStart:t=>{P(t)},onTouchEnd:t=>{if(S)return;const e=O(t);e&&X(0,e)},onWheel:t=>{S||L(t,(t=>{X(0,t)}))},children:[(0,x.jsx)(l.tq,{speed:400,threshold:G,slidesPerView:1,direction:k,modules:[a.tl,a.Gk],initialSlide:n,loop:1!=e.length,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,allowSlideNext:!S,allowSlidePrev:!S,allowTouchMove:!1,onSwiper:t=>{D(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:K,event:e[T().activeIndex],productList:e[T().activeIndex].products})},onSlideChange:t=>{var n;w?j(!1):(y||C(!0),n=e[T().activeIndex],g||f||(async()=>{const t=(0,mt.NY)(U)+(0,mt.dS)(B)+"_"+(null===n||void 0===n?void 0:n.event_id);(0,d.wh)(n),"index"===F?((0,Ke.Tc)(_,De.Xh,De.pR),(0,ot.H4)(n.event_id,n.products,De.Xh,De.pR,t,null===n||void 0===n?void 0:n.location,null===A||void 0===A?void 0:A.userType)):F.startsWith("product")||"embed"===F?((0,Ke.Tc)(_,De.h7,De.dU),(0,ot.H4)(n.event_id,n.products,De.h7,De.dU,t)):F.startsWith("collection")?((0,Ke.Tc)(_,De.U$,De.Pk),(0,ot.H4)(n.event_id,n.products,De.U$,De.Pk,t)):((0,Ke.Tc)(_,De.Xh,De.pR),(0,ot.H4)(n.event_id,n.products,De.Xh,De.pR,t))})(),(0,q.y4)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:K,event:e[T().activeIndex],productList:e[T().activeIndex].products}))},children:[...Array(Math.min(e.length,3)).keys()].map((n=>(0,x.jsx)(l.o5,{children:n=>{let{isActive:i,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=n;const d=i?"activeIndex":o?"prevIndex":"nextIndex";return(0,x.jsx)(s.Kq,{direction:"column",height:window.innerHeight,justifyContent:"center",children:(0,x.jsx)(Ee,{event:e[T()[d]],onBack:Z,isPlaying:1==e.length||i&&l,isLast:!1,setLockSwiper:b,onVideoEndedCallback:Y,progressUpdateCallback:t=>{},showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay})})}},"event-vertical-scroll-slide-"+n)))}),e.length>1&&!S&&(0,c.h6H)(_)&&"horizontal"===(0,c.e8z)(_)&&"horizontal"===k?(0,x.jsx)(Me,{relativeBottomPercentage:"50%",width:m,handleClick:(t,e)=>{X(0,"down"==e?"right":"left")},fontSize:parseInt(.12*m)}):(0,x.jsx)(x.Fragment,{})]})})})},Ve=n(1168);n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811);const Ze=t=>{let{children:e,customClass:n,show:i,closeCallback:o}=t;return Ve.createPortal((0,x.jsxs)("div",{className:`whatmore-landscape-modal whatmore-root ${n}`,style:{display:i?"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)};Ze.defaultProps={children:(0,x.jsx)("div",{children:"Empty Modal"}),customClass:"",show:!1,closeCallback:()=>!1};var Ue=Ze;var Be=function(t){var[e,n,i,o]=(0,h.Z)();const[p]=(0,u.j1)("isInDesignMode"),[v]=(0,u.j1)("isDemoBrand"),[m,g]=(0,u.j1)("isFirstIndicatorRenderDone"),[f,w]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:j}=(0,r.useContext)(ln),[y,C]=(0,r.useState)(!1),[S]=(0,u.j1)("whatmoreShopId"),[b]=(0,u.j1)("whatmoreLandingLocationType"),{whatmoreUITheme:I}=(0,r.useContext)(V.I),{whatmoreWidgetSourceDetails:k,whatmoreUserInfo:_}=(0,r.useContext)(V.I),[F,T]=(0,r.useState)(!1),[E,P]=(0,r.useState)(null);function L(){T(!1)}const z=t.events,R=t.eventIndex,M=t.onBack,D=z.concat(z),K=z.length,A=(0,r.useRef)(0);function N(t){L(),setTimeout((()=>{M(t)}),500)}function Z(){E&&!E.isEnd&&(0,u.MO)("whatmoreAllowAutoSlide")&&E.slideNext()}(0,r.useEffect)((()=>(T(!0),()=>{})),[]),j(N);const U=k.landingLocationType,B=k.templateType,Y=parseInt(Math.min(5,z.length));return(0,x.jsx)(Ue,{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",aligntItems:"center",backgroundColor:(0,W.lA)("#000000",13),children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:o*Y,children:(0,x.jsxs)(l.tq,{onInit:t=>{P(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:k,event:z[t.activeIndex],productList:z[t.activeIndex].products,ctaList:z[t.activeIndex].cta})},slidesPerView:Y,centeredSlides:!0,allowTouchMove:!1,initialSlide:R,modules:[a.lI,a.W_,a.Gk,a.pt,a.tl],navigation:Y>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*i),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:o*Y,watchSlidesProgress:!0,onSlideChange:t=>{var e;f?w(!1):(m||g(!0),e=z[t.activeIndex],p||v||(async()=>{const t=(0,mt.NY)(U)+(0,mt.dS)(B)+"_"+(null===e||void 0===e?void 0:e.event_id);(0,d.wh)(e),"index"===b?((0,Ke.Tc)(S,De.Xh,De.pR),(0,ot.H4)(e.event_id,e.products,De.Xh,De.pR,t,null===e||void 0===e?void 0:e.location,null===_||void 0===_?void 0:_.userType)):b.startsWith("product")||"embed"===b?((0,Ke.Tc)(S,De.h7,De.dU),(0,ot.H4)(e.event_id,e.products,De.h7,De.dU,t)):b.startsWith("collection")?((0,Ke.Tc)(S,De.U$,De.Pk),(0,ot.H4)(e.event_id,e.products,De.U$,De.Pk,t)):((0,Ke.Tc)(S,De.Xh,De.pR),(0,ot.H4)(e.event_id,e.products,De.Xh,De.pR,t))})(),(0,q.y4)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:k,event:z[t.activeIndex],productList:z[t.activeIndex].products,ctaList:z[t.activeIndex].cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[z.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(O,{onCloseCallback:M})}),D.slice(R,z.length+R).map(((t,e)=>(0,x.jsx)(l.o5,{children:t=>{let{isActive:n,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=t;if(n)return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:1*o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Ee,{event:z[e%K],onBack:N,isPlaying:!0,isLast:e%K===z.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:Z,progressUpdateCallback:t=>{},showCloseOverlay:(null===z||void 0===z?void 0:z.length)<=2})})});if(l)return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{E.slideTo(e%K,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Ee,{event:z[e%K],onBack:N,isPlaying:!1,isLast:e%K===z.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:Z,progressUpdateCallback:t=>{},showOverlay:!1})})});if(r&&1===A.current)return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{E.slideTo(e%K,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Ee,{event:z[e%K],onBack:N,isPlaying:!1,isLast:e%K===z.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:Z,progressUpdateCallback:t=>{},showOverlay:!1})})});try{R+e>=K-1&&(A.current=1)}catch(u){console.log(u)}return(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide"+t.event_id)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(ge,{height:.04*i,width:.1*o,fontSize:.02*i})})]})})},Ye=n(6090),Xe=n(7616),Ge=n(9302),$e=n(2575);var Je=function(t){const[e,n,i,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:i,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/i,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 Qe=function(t){var e;const n=t.stories,i=t.onBack,o=t.onStoryCompleteCallback,a=t.isActive,c=null!==(e=t.initialEventIndex)&&void 0!==e?e:0,p=n.events;var[v,m,g,f]=(0,h.Z)();const[w,y]=(0,j.Z)(),[C]=(0,u.j1)("isInDesignMode"),[S]=(0,u.j1)("isDemoBrand"),[b]=(0,u.j1)("whatmoreShopId"),[I,k]=(0,r.useState)(!0),[_,F]=(0,u.j1)("isFirstIndicatorRenderDone"),[T,E]=(0,r.useState)(null),[P,O]=(0,r.useState)(!1),{whatmoreWidgetSourceDetails:L,whatmoreUserInfo:z}=(0,r.useContext)(V.I),[R,M]=Ae(c,p.length);function D(t){i(t)}const K=L.landingLocationType,A=L.templateType;function W(){if(!(0,u.MO)("whatmoreAllowAutoSlide"))return;R().activeIndex+1>=p.length?o("right"):(M("right"),T&&T.slideNext())}function N(t){const e=R().activeIndex;"right"==t&&e+1>=p.length||"left"==t&&e-1<0?o(t):(M(t),T&&("left"==t?T.slidePrev():T.slideNext()))}return p[R().activeIndex],(0,x.jsx)("div",{children:(0,x.jsx)(l.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):(_||F(!0),function(t){const e=(0,mt.NY)(K)+(0,mt.dS)(A)+"_"+(null===t||void 0===t?void 0:t.event_id);C||S||(async()=>{(0,d.wh)(t),(0,Ke.Tc)(b,De.Xh,De.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===z||void 0===z?void 0:z.userType)})()}(p[R().activeIndex]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:L,event:p[R().activeIndex],productList:p[R().activeIndex].products,ctaList:p[R().activeIndex].cta}))},children:[...Array(Math.min(p.length,3)).keys()].map((e=>(0,x.jsx)(l.o5,{children:e=>{let{isActive:i,isPrev:o,isNext:r,isVisible:l,isDuplicate:d}=e;if(a){const e=i?"activeIndex":o?"prevIndex":"nextIndex",r=p[R()[e]];return(0,x.jsx)(s.Kq,{direction:"column",height:g,justifyContent:"center",children:(0,be.B6)(r)||(0,be.WJ)(r)?(0,x.jsx)(Se,{event:r,totalSiblingEvents:p.length,indexAmongSiblings:R()[e],onBack:D,isPlaying:a&&i&&l,isLast:!1,setLockSwiper:O,onVideoEndedCallback:W,progressUpdateCallback:t=>{},leftOpenSpaceClickHandler:()=>{N("left")},midOpenSpaceClickHandler:()=>{y(!w)},rightOpenSpaceClickHandler:()=>{N("right")},storyId:n.id,source:Te.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)(Je,{})})}},"event-story-view-slide-"+e)))})})};var tn=function(t){const e=t.onBack,n=t.eventsStories,i=t.initialStoryIndex;var[o,c,p,v]=(0,h.Z)();const[m]=(0,u.j1)("isInDesignMode"),[g]=(0,u.j1)("isDemoBrand"),[f,w]=(0,r.useState)(!0),[j,y]=(0,u.j1)("isFirstIndicatorRenderDone"),[C,S]=(0,r.useState)(!1),{setCloseClickComponent:b}=(0,r.useContext)(ln),{slideDirection:I}=(0,r.useContext)(ln),[k]=(0,u.j1)("whatmoreShopId"),[_,F]=Ae(i,n.length),[T,E]=We("horizontal",50),[P]=Ne("vertical",30),O=t.eventIndex,[L,z]=(0,r.useState)(!1),[R,M]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:D,whatmoreUserInfo:K}=(0,r.useContext)(V.I);function A(){z(!1)}function W(t){A(),setTimeout((()=>{e(t)}),500)}(0,r.useEffect)((()=>(z(!0),()=>{})),[]),b(W);const N=D.landingLocationType,Z=D.templateType;function U(t){R&&(0,u.MO)("whatmoreAllowAutoSlide")&&(F(t),"right"==t?R.slideNext():R.slidePrev())}function B(t,e){U(e)}return(0,x.jsx)(Oe(),{isOpen:L,onAfterOpen:function(){},onRequestClose:A,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=>{T(t)},onTouchEnd:t=>{const e=E(t);e&&B(0,e)},onWheel:t=>{P(t,(t=>{B(0,t)}))},children:(0,x.jsx)(l.tq,{speed:1,slidesPerView:1,direction:"horizontal",modules:[a.SH,a.Gk],initialSlide:i,loop:n.length>1,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,onSwiper:t=>{var e,i;M(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:D,event:n[_().activeIndex].events[0],productList:null===(e=n[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=n[_().activeIndex].events[0])||void 0===i?void 0:i.cta})},onSlideChange:t=>{var e,i;f?w(!1):(!function(t){const e=(0,mt.NY)(N)+(0,mt.dS)(Z)+"_"+(null===t||void 0===t?void 0:t.event_id);m||g||(async()=>{(0,d.wh)(t),(0,Ke.Tc)(k,De.Xh,De.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)})()}(n[_().activeIndex].events[0]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:D,event:n[_().activeIndex].events[0],productList:null===(e=n[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=n[_().activeIndex].events[0])||void 0===i?void 0:i.cta}))},allowTouchMove:!1,cubeEffect:{shadow:!0,slideShadows:!0,shadowOffset:20,shadowScale:.94},children:[...Array(Math.min(n.length,3)).keys()].map((t=>(0,x.jsx)(l.o5,{children:t=>{let{isActive:e,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=t;const c=e?"activeIndex":r?"prevIndex":"nextIndex";return(0,x.jsx)(s.Kq,{direction:"column",height:o,justifyContent:"center",children:(0,x.jsx)(Qe,{stories:n[_()[c]],onBack:W,isActive:e&&a,isNext:l,isPrev:r,onStoryCompleteCallback:U,nextStories:n[_().nextIndex],prevStories:n[_().prevIndex],initialEventIndex:i==_()[c]?O:0},"event-story-view-"+n[_()[c]].id)})}},"event-vertical-scroll-slide-"+t)))})})})},en=n(4892);var nn=function(t){var e,n,i,[o,l,a,d]=(0,h.Z)();const[c]=(0,u.j1)("whatmorePrimaryColor"),[p]=(0,u.j1)("whatmoreSecondaryColor"),v=t.event,m=(t.onBack,r.useRef(),null!==(e=t.showPausedVideo)&&void 0!==e&&e),f=null!==(n=t.heightFactor)&&void 0!==n?n:1,w="flex-end";return d*=null!==(i=t.widthFactor)&&void 0!==i?i: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,be.B6)(v)||(0,be.WJ)(v)?(0,x.jsx)(en.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 on=function(t){var[e,n,i,o]=(0,h.Z)();const[c]=(0,u.j1)("isInDesignMode"),[p]=(0,u.j1)("isDemoBrand"),[v,m]=(0,u.j1)("isFirstIndicatorRenderDone"),[g,f]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:w}=(0,r.useContext)(ln),[j,y]=(0,r.useState)(!1),[C]=(0,u.j1)("whatmoreShopId"),{whatmoreWidgetSourceDetails:S,whatmoreUserInfo:b}=(0,r.useContext)(V.I),[I,k]=(0,r.useState)(!1),[_,F]=(0,r.useState)(null);function T(){k(!1)}t.events;const E=t.eventIndex,P=t.onBack,L=t.eventsStories,z=t.initialStoryIndex;function R(t){T(),setTimeout((()=>{P(t)}),500)}(0,r.useEffect)((()=>(k(!0),()=>{})),[]),w(R);const M=S.landingLocationType,D=S.templateType;function K(t){_&&!_.isEnd&&("right"==t?_.slideNext():_.slidePrev())}const A=parseInt(Math.min(5,L.length));return(0,x.jsx)(Ue,{show:I,closeCallback:T,customClass:"whatmore-landscape-modal-stories-view",children:(0,x.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",aligntItems:"center",backgroundColor:"blackAlpha.800",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:o*A,children:(0,x.jsxs)(l.tq,{onInit:t=>{var e,n;F(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:S,event:L[t.activeIndex].events[0],productList:null===(e=L[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=L[t.activeIndex].events[0])||void 0===n?void 0:n.cta})},slidesPerView:A,centeredSlides:!0,allowTouchMove:!1,initialSlide:z,modules:[a.lI,a.W_,a.Gk],navigation:A>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*i),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:o*A,watchSlidesProgress:!0,onSlideChange:t=>{var e,n;g?f(!1):(v||m(!0),function(t){const e=(0,mt.NY)(M)+(0,mt.dS)(D)+"_"+(null===t||void 0===t?void 0:t.event_id);c||p||(async()=>{(0,d.wh)(t),(0,Ke.Tc)(C,De.Xh,De.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===b||void 0===b?void 0:b.userType)})()}(L[t.activeIndex].events[0]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:S,event:L[t.activeIndex].events[0],productList:null===(e=L[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=L[t.activeIndex].events[0])||void 0===n?void 0:n.cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[L.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(O,{onCloseCallback:P})}),L.map(((t,e)=>(0,x.jsx)(l.o5,{children:n=>{let{isActive:r,isPrev:l,isNext:a,isVisible:d,isDuplicate:c}=n;if(r){const n=1;return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o*n,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)(Qe,{stories:t,onBack:R,isActive:r&&d,isNext:!1,isPrev:!1,onStoryCompleteCallback:K,initialEventIndex:z==e?E:0,showCloseOverlay:(null===L||void 0===L?void 0:L.length)<=2},"event-story-view-"+t.id)})})}return l||a?(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{_.slideTo(e,300)},children:(0,x.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(nn,{showPausedVideo:!0,event:L[e].events[0],onBack:R,isPlaying:!1,setLockSwiper:y})})}):(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide-"+e)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(ge,{height:.04*i,width:.1*o,fontSize:.02*i})})]})})};const rn=(0,$e.Z)({key:"whatmore-css-sv"}),ln=(0,r.createContext)({isIOS:!1,totalEvents:0,closeClickComponent:null,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:"vertical",showSwipeIndicator:!0});var an=function(t){var e,n;const[i,o,l]=(0,pe.Z)(),[a]=(0,u.j1)("whatmoreShopId"),{whatmoreRootId:d}=(0,r.useContext)(V.I),{whatmoreIsStoriesTemplate:s}=(0,r.useContext)(V.I);var h=t.events,p=t.index,v=t.onBack,m=t.eventsStories,g=t.initialStoryIndex,f=(0,c.cX2)(a),w=(h[p],"portrait"===i?null!==(e=t.slideDirection)&&void 0!==e?e:"vertical":null!==(n=t.slideDirection)&&void 0!==n?n:h.length>1?"horizontal":"vertical"),j="portrait"===i?!(0,c.h6H)(a)&&!s:(0,c.n89)(a);return h[p],(0,r.useLayoutEffect)((()=>{(0,c.TLG)(a)&&(window.location.href.includes(f)?history.replaceState(null,"","#"+f):history.pushState(null,"","#"+f),window.addEventListener("popstate",(()=>{window.location.href.includes(f)||v()})))}),[]),delete Xe.ZP.styles.global,s?(0,x.jsx)(Ge.C,{value:rn,children:(0,x.jsx)(Ye.x,{theme:Xe.ZP,cssVarsRoot:d,resetCSS:!1,children:(0,x.jsx)(ln.Provider,{value:{isIOS:(0,Ie.KE)(),totalEvents:h.length,closeClickComponent:v,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:w,showSwipeIndicator:j},children:"portrait"===i?(0,x.jsx)(tn,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p}):(0,c.Bbr)(a)?(0,x.jsx)(on,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p}):(0,x.jsx)(tn,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p})})})}):(0,x.jsx)(Ge.C,{value:rn,children:(0,x.jsx)(Ye.x,{theme:Xe.ZP,cssVarsRoot:d,resetCSS:!1,children:(0,x.jsx)(ln.Provider,{value:{isIOS:(0,Ie.KE)(),totalEvents:h.length,closeClickComponent:v,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:w,showSwipeIndicator:j},children:"portrait"===i?(0,x.jsx)(He,{events:h,eventIndex:p,onBack:v}):(0,x.jsx)(Be,{events:h,eventIndex:p,onBack:v})})})})}},9316:function(t,e,n){n.d(e,{mT:function(){return o}});var i=n(686);const o=`\n ${i.F4`
77
77
  0% { transform: scale(1); }
78
78
  50%, { transform: scale(0.95); }
79
79
  100% { transform: scale(1); }
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[582],{5582:function(e,t,n){n.r(t),n.d(t,{default:function(){return U}});var a=n(7753),i=n(7313),r=n(2860),s=n(499),o=n(4897),l=n(5160),c=n(9854),d=n(6967),u=n(8984),_=n(58),p=n(4669),m=n(513),h=n(8811),v=n(7300),f=n(6524),g=n(7643),y=n(778),w=n(8181),b=n(6417);const S=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(351),n.e(926),n.e(303),n.e(853),n.e(891)]).then(n.bind(n,4095)))),I=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(577),n.e(853),n.e(364),n.e(530)]).then(n.bind(n,5523)))),k=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(423),n.e(926),n.e(380),n.e(690)]).then(n.bind(n,3827)))),x=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(423),n.e(926),n.e(380),n.e(209)]).then(n.bind(n,6071)))),E=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(423),n.e(926),n.e(380),n.e(248)]).then(n.bind(n,1291)))),T=i.lazy((()=>Promise.all([n.e(302),n.e(580)]).then(n.bind(n,3580)))),j=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(577),n.e(351),n.e(955),n.e(926),n.e(303),n.e(218),n.e(691)]).then(n.bind(n,3218)))),C=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(351),n.e(926),n.e(303),n.e(853),n.e(197)]).then(n.bind(n,1492)))),L=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(303),n.e(411)]).then(n.bind(n,9085)))),D=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(577),n.e(303),n.e(853),n.e(364),n.e(299)]).then(n.bind(n,4362)))),O=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(577),n.e(351),n.e(955),n.e(926),n.e(303),n.e(218),n.e(196)]).then(n.bind(n,4658)))),A=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(423),n.e(926),n.e(380),n.e(47)]).then(n.bind(n,8767))));var M=function(e){const[t]=(0,a.j1)("isInDesignMode"),[n]=(0,a.j1)("isDemoBrand"),[M]=(0,a.j1)("whatmoreTopBottomPadding"),[N]=(0,a.j1)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:R}=(0,i.useContext)(h.I),[P]=(0,a.j1)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:K}=(0,i.useContext)(h.I),q=(0,a.MO)("isLandingSharedLink"),[W,G]=(0,i.useState)(q),V=(0,a.MO)("whatmoreShareTemplateId"),U=(0,a.MO)("whatmoreShareStoryId"),z=(0,a.MO)("whatmoreShareEventId"),{whatmoreWidgetSourceDetails:H,whatmoreUserInfo:B}=(0,i.useContext)(h.I),[F,Z]=(0,i.useState)(-1),[Y,J]=(0,i.useState)(null);let Q=e.events,$=[];if("template-banner-a"!==K){let e=0;for(let t=0;t<(null===Q||void 0===Q?void 0:Q.length);t++){var X,ee,te,ne;const n=(null===Q||void 0===Q||null===(X=Q[t])||void 0===X||null===(ee=X.products)||void 0===ee?void 0:ee.length)>0&&(null===Q||void 0===Q||null===(te=Q[t])||void 0===te||null===(ne=te.products)||void 0===ne?void 0:ne.every((e=>"oos"===(null===e||void 0===e?void 0:e.product_status))));if(!(0,v.B6)(Q[t])&&!(0,v.WJ)(Q[t])||n&&"12326200"!=P){if((0,v.yC)(null===Q||void 0===Q?void 0:Q[t])){var{status:ae,bannerText:ie,timeToStartInMins:re}=o.Z.getEventStatus(Q[t]);ae.name===s.Z.LIVE.name&&($.push({...null===Q||void 0===Q?void 0:Q[t],index:e}),e++)}}else $.push({...null===Q||void 0===Q?void 0:Q[t],index:e}),e++}}var se=null;R&&!se&&(se=function(e){var t=e.reduce(((e,t,n)=>{var a,i=t.storyset_id;return i in e?(e[i].total_events=e[i].total_events+1,e[i].events.push(t)):e[i]={id:t.storyset_id,title:t.storyset_name,thumbnail_image:t.storyset_thumbnail_image,total_events:1,start_event_index:n,storyset_dynamic_thumbnail:null!==(a=null===t||void 0===t?void 0:t.storyset_dynamic_thumbnail)&&void 0!==a&&a,events:[t]},e}),{}),n=Object.values(t);return n.sort(((e,t)=>e.start_event_index-t.start_event_index)),n}($));const oe=H.landingLocationType,le=H.templateType;function ce(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,u.KE)()&&!a&&(0,_.QV)(),t||n||(async()=>{const t=se[e].events[0],n=(0,f.NY)(oe)+(0,f.dS)(le)+"_"+(null===t||void 0===t?void 0:t.event_id);(0,l.wh)(t),(0,p.Tc)(P,r.Xh,r.OW),(0,d.H4)(t.event_id,t.products,"homepage","stories",n,null===t||void 0===t?void 0:t.location,null===B||void 0===B?void 0:B.userType)})();var s=0;null!=i&&se[e].events.map(((e,t)=>{e.event_id==i&&(s=t)})),Z(s),J(e)}function de(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,u.KE)()&&!a&&(0,_.QV)(),(0,v.B6)(e)||(0,v.WJ)(e))return t||n||(async()=>{const t=(0,f.NY)(oe)+(0,f.dS)(le)+"_"+(null===e||void 0===e?void 0:e.event_id);(0,l.wh)(e),(0,p.Tc)(P,r.Xh,r.pR),(0,d.H4)(e.event_id,e.products,"homepage","carousel",t)})(),void Z(e.index);const i=20;var{status:c,bannerText:m,timeToStartInMins:h}=o.Z.getEventStatus(e);h<=i&&c.name!==s.Z.LIVE.name?console.debug(" TODO : show toast on upcoming live event."):Z(e.index)}function ue(e){return(0,b.jsx)(b.Fragment,{})}return(0,i.useEffect)((()=>{if(q&&K===(0,f.zv)(V))if(null!=U&&R){const e=se.find((e=>U==e.id));if(e)return void ce(se.indexOf(e),!0,z)}else if(null!=z){const e=$.find((e=>z==e.event_id));if(e)return void de(e,!0)}G(!1)}),[]),(0,b.jsxs)(b.Fragment,{children:[W?(0,b.jsx)(w.Z,{}):(0,b.jsx)("div",{className:"whatmore-widget-container",style:{marginTop:(R?N:M)+"px",marginBottom:(R?N:M)+"px"},children:"template-b"===K?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(S,{events:$,onClick:de,heading:e.heading})}):"template-a-1"===K?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(I,{events:$,onClick:de,heading:e.heading})}):"template-feed-a"===K?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(D,{events:$,onClick:de,heading:e.heading})}):"template-collections-a"===K||"template-c"===K?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,b.jsx)(k,{events:$,index:F,setScreen:Z,onClick:de,heading:e.heading})})}):"template-collections-b"===K||"template-d"===K?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,b.jsx)(x,{events:$,index:F,setScreen:Z,onClick:de,heading:e.heading})})}):"template-collections-c"===K||"template-e"===K?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,b.jsx)(E,{events:$,index:F,setScreen:Z,onClick:de,heading:e.heading})})}):"template-collections-d"===K?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,b.jsx)(S,{events:$,index:F,setScreen:Z,onClick:de,heading:e.heading})})}):"template-collections-e"===K?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,b.jsx)(C,{events:$,index:F,setScreen:Z,onClick:de,heading:e.heading})})}):"template-collections-stories"===K||"template-stories"===K?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,b.jsx)(A,{events:$,index:F,setScreen:Z,onClick:de,heading:e.heading})})}):"template-f"===K||"template-collections-f"===K?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,b.jsx)(L,{events:$,onClick:de,heading:e.heading})})}):"template-banner-a"===K?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.BANNER_WIDGET_VIEW,event:Q[0],triggerFlag:!t&&!n,children:(0,b.jsx)(O,{events:Q})})}):R?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.STORIES_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,b.jsx)(T,{eventsStories:se,onClick:ce,template:K})})}):(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,b.jsx)(C,{events:$,onClick:de,heading:e.heading})})})}),-1==F||-2==F?(0,b.jsx)(ue,{}):(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.EVENT_VIEW,event:Q[F],productList:Q[F].products,cta:Q[F].cta,triggerFlag:!t&&!n,children:(0,b.jsx)(j,{events:$,index:F,onBack:function(e){(0,c.n2L)(P)&&(0,a.MO)("whatmoreAddedToCart")&&(0,m.D)(P,(()=>{}),100,window.location.hostname,e),Z(-1),G(!1)},slideDirection:R||"horizontal"===(0,c.e8z)(P)?"horizontal":"vertical",eventsStories:se,initialStoryIndex:Y,template:K})})})]})};const N=function(e,t,n){const i=(0,a.MO)("whatmoreShopId");var r=t.reduce(((e,t,n)=>(t.products.map((e=>e.client_product_id)).forEach((t=>{t in e||(e[t]=!0)})),e)),{}),s=Object.keys(r);if("60960964855"==i&&"undefined"!=typeof fera&&"function"===typeof fera.getRatings){var o={};fera.getRatings(s,(e=>{new Promise(((t,n)=>{e.forEach((e=>{o[e.external_product_id]={avgRating:e.average,totalRatings:e.count}})),t(o)})).then((e=>n(e)))}))}if("23114481744"==i){const e="1e6MQXxzYR19mpw9Km6Dcm86";o={};fetch("https://api.juniphq.com/v1/products?filter[remote_ids]="+s.toString(),{headers:{"Junip-Store-Key":e}}).then((e=>e.json())).then((e=>(e.products.forEach((e=>{o[e.remote_id]={avgRating:parseFloat(e.rating_average).toFixed(1),totalRatings:e.rating_count}})),o))).then((e=>n(e))).catch((e=>console.error(e)))}};var R=n(3388),P=n(7381),K=n(4522),q=n(7008);const W=[{event_id:2333,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:204,brand:"whatmore-dev",product_link:"https://www.aachho.com/products/sadabahaar-chanderi-suit-set",client_product_id:"6780183806018",price:"2800.00",currency:"INR",title:"Sadabahaar Chanderi Suit Set",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/2542/7564/products/5_72f81f91-e027-4497-9dfe-20480b862c54.jpg?v=1684509430",compare_price:"6999.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2022-12-27",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_b9c6f02e-6d5e-4250-97f8-71551c18c4e8.mp4",discount_coupon_image:"",event_hls_url:"https://d3syezql093hs1.cloudfront.net/whatmoredev/b9c6f02e-6d5e-4250-97f8-71551c18c4e8.mp4",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:1,event_state:"ready",poster_image:null,total_views:37,total_like:1,total_share:0,total_whatsapp:0},{event_id:2335,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:2108,brand:"whatmore-dev",product_link:"https://www.ordinaree.com/products/grease-black-designer-blackless-long-dress-for-women-online",client_product_id:"7210211311652",price:"5040.00",currency:"INR",title:"Grease Backless Long Dress",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0106/4897/7444/products/DSC_0377_45ee56eb-1240-4a17-9332-841809f132cf.jpg?v=1673001396",compare_price:"5600.00",product_metadata:null,product_status:"active"},{product_id:1955,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/black-anarkali-and-pant-with-dupatta",client_product_id:"7600010723466",price:"4125.00",currency:"INR",title:"BLACK ANARKALI AND PANT WITH DUPATTA",description:"BLACK ANARKALI AND PANT WITH DUPATTA",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/salwarsuitonlineindia-07285.jpg?v=1669434027&width=823",compare_price:"5200.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2022-12-27",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_e433898b-a5ec-4af6-b74f-2153ad609ffb.mp4",discount_coupon_image:"",event_hls_url:"https://d3syezql093hs1.cloudfront.net/whatmoredev/e433898b-a5ec-4af6-b74f-2153ad609ffb.mp4",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:4,event_state:"ready",poster_image:null,total_views:31,total_like:0,total_share:0,total_whatsapp:0},{event_id:2336,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:632,brand:"whatmore-dev",product_link:"https://www.meerasplussizestore.com/products/basil-brick-ajrakh-handblock-printed-kurta",client_product_id:"6864880173194",price:"876.00",currency:"INR",title:"Basil & Brick Ajrakh Handblock Printed Kurta",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0363/0075/0986/products/Dark-Green-Maroon-Pati-Ajrakh-Kurti-SCL_6948.jpg?v=1653729466",compare_price:"2190.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2022-12-27",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_5ddea9a1-4839-4db8-aa1c-843c14dd1cbb.mp4",discount_coupon_image:"",event_hls_url:"https://d3syezql093hs1.cloudfront.net/whatmoredev/5ddea9a1-4839-4db8-aa1c-843c14dd1cbb.mp4",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:5,event_state:"ready",poster_image:null,total_views:21,total_like:0,total_share:0,total_whatsapp:0},{event_id:2338,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:1728,brand:"whatmore-dev",product_link:"https://suta.in/products/ratri-kamal",client_product_id:"6916488003649",price:"4200.00",currency:"INR",title:"Ratri kamal",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0026/6544/7536/products/ratri-kamal-293774.jpg?v=1668084259",compare_price:null,product_metadata:null,product_status:"active"},{product_id:1732,brand:"whatmore-dev",product_link:"https://suta.in/products/kedar-ki-dor-blouse",client_product_id:"6625859502145",price:"4200.00",currency:"INR",title:"Kedar Ki Dor",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0026/6544/7536/files/DSC01009.jpg?v=1712326816",compare_price:null,product_metadata:null,product_status:"active"},{product_id:1736,brand:"whatmore-dev",product_link:"https://suta.in/products/swarna-kamal",client_product_id:"6916483317825",price:"4200.00",currency:"INR",title:"Swarna Kamal",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0026/6544/7536/products/swarna-kamal-472043.jpg?v=1668093054",compare_price:null,product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2022-12-27",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_496a26de-50cd-4823-8731-a97e0757efcf.mp4",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_496a26de-50cd-4823-8731-a97e0757efcf.mp4?v=1677477938",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:6,event_state:"ready",poster_image:null,total_views:28,total_like:0,total_share:0,total_whatsapp:0},{event_id:3255,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:3636,brand:"whatmore-dev",product_link:"https://buysohi.com/products/sohear8383",client_product_id:"7679599771864",price:"543.00",currency:"INR",title:"Gold Plated Pearl Stud",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0626/0218/2872/products/SS22_SOHEAR8383_1.jpg?v=1651755514",compare_price:"1699.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2023-01-24",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_b0045891-f042-47d4-a87a-187c96a1857e.mp4",discount_coupon_image:"",event_hls_url:"https://d3syezql093hs1.cloudfront.net/whatmoredev/b0045891-f042-47d4-a87a-187c96a1857e.mp4",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:7,event_state:"ready",poster_image:null,total_views:36,total_like:1,total_share:3,total_whatsapp:0},{event_id:3877,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:1955,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/black-anarkali-and-pant-with-dupatta",client_product_id:"7600010723466",price:"4125.00",currency:"INR",title:"BLACK ANARKALI AND PANT WITH DUPATTA",description:"BLACK ANARKALI AND PANT WITH DUPATTA",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/salwarsuitonlineindia-07285.jpg?v=1669434027&width=823",compare_price:"5200.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2023-02-03",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_CoH_liSAYOj.mp4",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_CoH_liSAYOj_b1999a62-134d-4301-9808-5d09e64a8979.mp4?v=1677477812",presenter_email:null,presenter_phone:null,room_id:null,event_type:"video",is_active:!0,rank:20,event_state:"ready",poster_image:null,total_views:16,total_like:0,total_share:0,total_whatsapp:0},{event_id:4188,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:4459,brand:"whatmore-dev",product_link:"https://theethnic.co/products/black-ruching-jacket-kurta-set",client_product_id:"8011323769076",price:"7499.00",currency:"INR",title:"Black Ruching Jacket Kurta Set",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0650/7937/8164/products/1_5102cd2e-a419-4682-abf1-d9619e6e96d7.jpg?v=1674275880",compare_price:"9999.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2023-02-07",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_c398aa0e-f0ac-4aba-91f5-4b1bcc5b1d51.mp4",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_7acda7d8-9762-47c7-9ee2-35e14db4c3fb.mp4?v=1677477803",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:23,event_state:"ready",poster_image:null,total_views:8,total_like:0,total_share:1,total_whatsapp:0},{event_id:28701,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[],cta:[{cta_id:364,cta_link:"https://lovechild.in/collections/fragrances",client_cta_id:"https://lovechild.in/collections/fragrances",cta_title:"Explore",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-01-10",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_20c05e5e-43cd-45cd-b1a4-5c942fb732d1.mp4",discount_coupon_image:"",event_hls_url:"https://d1zl4k1t5o4s75.cloudfront.net/whatmoredev/1080p_20c05e5e-43cd-45cd-b1a4-5c942fb732d1.mp4",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:57,event_state:"ready",poster_image:null,total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:28767,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:26392,brand:"whatmore-dev",product_link:"https://www.aachho.com/products/shimmering-mustard-sequin-georgette-suit-set",client_product_id:"6981740691522",price:"4199.00",currency:"INR",title:"Shimmering Mustard Sequin Georgette Suit Set",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/2542/7564/files/0H8A1426.jpg?v=1697874844",compare_price:"5999.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-01-11",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_4820fd98-246f-46b7-8af6-be1e949ff0e2.mp4?v=1704973716",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_4820fd98-246f-46b7-8af6-be1e949ff0e2.mp4?v=1704973708",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:58,event_state:"ready",poster_image:null,total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:48,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:24,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/evil-eye-adjustable-ring-gold",client_product_id:"6923301748874",price:"1250.00",currency:"INR",title:"Evil Eye adjustable ring - Gold",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/WhatsAppImage2020-09-21at11.38.01AM_1_700x_c51dd690-b6d8-4059-b3e0-13a2edf3feea.jpg?v=1656673474",compare_price:"1300",product_metadata:null,product_status:"active"},{product_id:23,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/rose-water-200ml",client_product_id:"6923319771274",price:"250.00",currency:"INR",title:"ROSE WATER 200ML",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/RoseWaterFront-01_250x_2x_c4cd34f3-625d-463a-bf36-3b159322b7ed.png?v=1656673764",compare_price:null,product_metadata:null,product_status:"active"},{product_id:21,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/honey-lemon-face-cleanser-200ml-1",client_product_id:"6923307647114",price:"1300.00",currency:"INR",title:"HONEY & LEMON FACE CLEANSER 200ML",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/C5D_9156-01_250x_2x_2f91ab64-e5a4-42f1-baf3-5f3ecffb2b50_1.png?v=1656673584",compare_price:"1340",product_metadata:null,product_status:"active"},{product_id:22,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/honey-lemon-face-cleanser-200ml-1",client_product_id:"6923317051530",price:"350.00",currency:"INR",title:"HONEY AND ROSE BODY CREAM 200ML",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/2_250x_2x_47ffd4b3-4100-4afb-b4c8-a09867e40ddb.png?v=1656673726",compare_price:null,product_metadata:null,product_status:"active"}],cta:[{cta_id:73,cta_link:"https://honeyandspice.in/collections/central-indian",client_cta_id:"https://honeyandspice.in/collections/central-indian",cta_title:"Shop Now",thumbnail_image:"",cta_type:""}],title:"BTS of HoneyAndSpice",description:"",brand:"whatmore-dev",scheduled_date:"2023-08-10",status:"upcoming",start_time:"19:00",end_time:"20:00",actual_start_time:null,actual_end_time:null,presenter_name:"Honey and Spice",thumbnail_image:"https://d28nus7q7qajdn.cloudfront.net/videos/whatmore-video-01942fec-68a5-4417-aa28-a0bff121a3ec.mp4",discount_coupon_image:"",event_hls_url:"https://d28nus7q7qajdn.cloudfront.net/videos/whatmore-video-2f0d18e6-a519-4e70-b8b3-529b90a04c28.mp4",presenter_email:null,presenter_phone:"+919888988889",room_id:null,event_type:"video",is_active:!0,rank:59,event_state:"ready",poster_image:null,total_views:13,total_like:0,total_share:0,total_whatsapp:0},{event_id:33888,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:26392,brand:"whatmore-dev",product_link:"https://www.aachho.com/products/shimmering-mustard-sequin-georgette-suit-set",client_product_id:"6981740691522",price:"4199.00",currency:"INR",title:"Shimmering Mustard Sequin Georgette Suit Set",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/2542/7564/files/0H8A1426.jpg?v=1697874844",compare_price:"5999.00",product_metadata:null,product_status:"active"}],cta:[{cta_id:402,cta_link:"https://custom.com",client_cta_id:"https://custom.com",cta_title:"custom",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-02-26",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_2b78b138-b18f-45e3-b8dc-6ce59075872f.mp4?v=1708937498",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_2b78b138-b18f-45e3-b8dc-6ce59075872f.mp4?v=1708937490",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:60,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_2b78b138-b18f-45e3-b8dc-6ce59075872f.webp?v=1708937505",total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:33890,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:26392,brand:"whatmore-dev",product_link:"https://www.aachho.com/products/shimmering-mustard-sequin-georgette-suit-set",client_product_id:"6981740691522",price:"4199.00",currency:"INR",title:"Shimmering Mustard Sequin Georgette Suit Set",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/2542/7564/files/0H8A1426.jpg?v=1697874844",compare_price:"5999.00",product_metadata:null,product_status:"active"}],cta:[{cta_id:402,cta_link:"https://custom.com",client_cta_id:"https://custom.com",cta_title:"custom",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-02-26",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_08ec5ed2-3aca-4d32-b51e-d3f88123cca8.mp4?v=1708937809",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_08ec5ed2-3aca-4d32-b51e-d3f88123cca8.mp4?v=1708937801",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:61,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_08ec5ed2-3aca-4d32-b51e-d3f88123cca8.webp?v=1708937816",total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:33947,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[],cta:[{cta_id:403,cta_link:"https://test.com",client_cta_id:"https://test.com",cta_title:"test",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-02-26",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_81844dee-68c7-425e-96bf-d3ac63c664e7.mp4?v=1708947355",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_81844dee-68c7-425e-96bf-d3ac63c664e7.mp4?v=1708947347",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:62,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_81844dee-68c7-425e-96bf-d3ac63c664e7.webp?v=1708947362",total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:41975,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[],cta:[{cta_id:482,cta_link:"https://tests.com",client_cta_id:"https://tests.com",cta_title:"",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-04-25",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_51411814-cff2-491f-aca3-303e84307049.mp4?v=1714033522",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_51411814-cff2-491f-aca3-303e84307049.mp4?v=1714033514",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:69,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_51411814-cff2-491f-aca3-303e84307049.webp?v=1714033531",total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:41976,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[],cta:[{cta_id:481,cta_link:"https://test1231.com",client_cta_id:"https://test1231.com",cta_title:" ",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-04-25",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_c2a47941-cafb-4765-ac6c-d6414679c6bd.mp4?v=1714033522",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_c2a47941-cafb-4765-ac6c-d6414679c6bd.mp4?v=1714033514",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:70,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_c2a47941-cafb-4765-ac6c-d6414679c6bd.webp?v=1714033530",total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:41977,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[],cta:[{cta_id:403,cta_link:"https://test.com",client_cta_id:"https://test.com",cta_title:"test",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-04-25",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_a0f26d1d-462b-4548-848c-806702cf9c95.mp4?v=1714033522",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_a0f26d1d-462b-4548-848c-806702cf9c95.mp4?v=1714033513",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:71,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_a0f26d1d-462b-4548-848c-806702cf9c95.webp?v=1714033530",total_views:0,total_like:0,total_share:0,total_whatsapp:0}];var G=function(e){const[t,n]=(0,i.useState)(),[s,o]=(0,i.useState)(),{whatmoreIsStoriesTemplate:l}=(0,i.useContext)(h.I),{whatmoreIsCollectionsTemplate:p}=(0,i.useContext)(h.I),{whatmoreIsBannerTemplate:m}=(0,i.useContext)(h.I),[v]=(0,a.j1)("whatmoreShopId"),[g]=(0,a.j1)("whatmoreCollectionId"),w=(0,a.MO)("whatmoreLandingLocationType"),S=(0,a.MO)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:I}=(0,i.useContext)(h.I),{whatmoreUserInfo:k,whatmoreIsPreviewMode:x}=(0,i.useContext)(h.I),{whatmoreCollectionUrl:E}=(0,i.useContext)(h.I),[T]=(0,a.j1)("isInDesignMode"),[j]=(0,a.j1)("isDemoBrand"),C=(0,c.cZT)(v)?(0,c._uv)(v)?E:window.location.href.split(/[?#]/)[0]:g,[L,D]=(0,a.j1)("productRatings"),[O,A]=(0,i.useState)(!1);var G=(0,c.efR)(v)?r.Dm+"/v2/events/":r.Gc+"/v2/events/",V=(0,c.efR)(v)?r.Dm+"/v3/events/":r.Gc+"/v3/events/",U=(0,c.efR)(v)?r.Dm+"/get_eventset/":r.Gc+"/get_eventset/",z=(0,c.efR)(v)?r.Dm+"/v2/collection":r.Gc+"/v2/collection",H=(0,c.efR)(v)?r.Dm+"/v2/brand/"+v+"/product-events":r.Gc+"/v2/brand/"+v+"/product-events",B=e.shopId,F="live,upcoming",Z="true";return(0,i.useEffect)((()=>{(0,d.hb)();const e=()=>{const e="_whatmore_bulk_events",t=JSON.parse(localStorage.getItem(e))||[];t&&t.length>0&&((0,q.K)(t),localStorage.removeItem(e))};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[]),(0,i.useEffect)((()=>{null==t||0==t.length||s||!(0,u.KE)()||(0,a.MO)("whatmoreVideoPlayerPoolInitiated")||(0,_.b5)(_.UD)}),[t]),(0,i.useEffect)((()=>{var e;if(w.startsWith("product"))if((0,c.C86)(v))e=G.toString()+B.toString()+"?status="+F.toString()+"&is_active="+Z.toString();else{var t=(0,a.MO)("whatmoreProductId");t=(0,c.iXA)(v)?function(e,t){return"STRQMPNF7QK"==t?encodeURIComponent(e):e.split(/[?#]/)[0]}(window.location.href,v):t,e=H.toString()+"?client_product_id="+t.toString()+"&status="+F.toString()+"&event_type=video"}else if(p||"invalid-url"!==E)e=`${z.toString()}?store_id=${B.toString()}&client_collection_id=${"index"==w&&(0,c.igW)(v).length>0?(0,c.igW)(v)[0]:C}`;else if(m){const t=f.ls,n=(0,f.H1)(w);e=U.toString()+B.toString()+"?eventset_type="+t+"&source="+n+"&source_id="+v}else{var i,r,s,d;if(("72201044272"==v||"2665447536"==v&&x)&&!l)e=V.toString()+B.toString()+"?status="+F.toString()+"&is_active="+Z.toString()+"&latitude="+(null!==(i=null===(r=JSON.parse(localStorage.getItem("_user_wh_lc")))||void 0===r?void 0:r.latitude)&&void 0!==i?i:"")+"&longitude="+(null!==(s=null===(d=JSON.parse(localStorage.getItem("_user_wh_lc")))||void 0===d?void 0:d.longitude)&&void 0!==s?s:"")+"&user_type="+(null!==k&&void 0!==k&&k.userType?"olduser":"newuser");else e=G.toString()+B.toString()+"?status="+F.toString()+"&is_active="+Z.toString()+(l?"&template_type=stories":"")}fetch(e).then((e=>e.json())).then((e=>{if(m){const t=f.ls;return(0,R.OC)(e,t)}return(0,R.kW)(e,p||"invalid-url"!==E)})).then((e=>(S&&console.debug("initial received events size : "+e.length),l||p||m?e:(0,R.e8)(e,B)))).then((e=>(null!=e&&0!=e.length&&(0,c.LUY)(v)&&function(e,t,n){const i=setInterval((()=>{null===(0,a.MO)("productRatings")&&N(e,t,n)}),1e3);setTimeout((()=>{clearInterval(i)}),1e4)}(v,e,(e=>{D(e)})),e))).then((e=>{null==e||0==e.length||l||m||(0,c.NOv)(B,e),n((j||T)&&null==e?W:e),A(!0)})).catch((e=>{o(e.message)}))}),[]),(0,i.useEffect)((()=>{"index"===w?t&&t.length>0&&(0,K.PB)({userInteractionType:y.K.HOMEPAGE_VISITED,widgetSourceDetails:I}):"collection"===w&&(t&&t.length>0||(0,c.miB)(v))&&(0,K.PB)({userInteractionType:y.K.COLLECTION_PAGE_VISITED,widgetSourceDetails:I})}),[t]),(O&&(null==t||0==t.length)||s)&&h.$.forEach((e=>{var t,n,a,i;const r=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-stories-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-stories-a"]'),s=null!==(n=e.querySelector('.whatmore-template-type[data-wh="template-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-f"]')||e.querySelector('.whatmore-template-type[data-wh="template-e"]')||e.querySelector('.whatmore-template-type[data-wh="template-a-1"]'))&&void 0!==n?n:e.querySelector('.whatmore-template-type[data="template-a"]')||e.querySelector('.whatmore-template-type[data="template-b"]')||e.querySelector('.whatmore-template-type[data="template-f"]')||e.querySelector('.whatmore-template-type[data="template-e"]')||e.querySelector('.whatmore-template-type[data="template-a-1"]'),o=null!==(a=e.querySelector('.whatmore-template-type[data-wh="template-collections-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-c"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-stories"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-d"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-e"]'))&&void 0!==a?a:e.querySelector('.whatmore-template-type[data="template-collections-a"]')||e.querySelector('.whatmore-template-type[data="template-collections-b"]')||e.querySelector('.whatmore-template-type[data="template-collections-c"]')||e.querySelector('.whatmore-template-type[data="template-collections-stories"]')||e.querySelector('.whatmore-template-type[data="template-collections-e"]')||e.querySelector('.whatmore-template-type[data="template-collections-d"]'),c=null!==(i=e.querySelector('.whatmore-template-type[data-wh="template-banner-a"]'))&&void 0!==i?i:e.querySelector('.whatmore-template-type[data="template-banner-a"]'),d=e;if(l){const t=e.querySelector(".whatmore-shimmer-stories");t&&(t.style.display="none")}else if(!p){const t=e.querySelector(".whatmore-shimmer");t&&(t.style.display="none")}(c||o||s||r)&&(s&&d||r&&d||c&&d||o&&d)&&(d.style.minHeight="0px")})),null==t||0==t.length||s?(0,b.jsx)("div",{}):(S&&(0,P.EI)(t),function(e){if(null!=e){var t=0;e.forEach((e=>{e.index=t++}))}}(t),S&&console.debug("final transformed events data : "+JSON.stringify(t)),S&&console.debug("valid events size : "+t.length),(0,b.jsx)(M,{heading:e.heading,events:t}))},V=n(3933);var U=function(e){const[t]=(0,a.j1)("whatmoreShopId"),[n]=(0,a.j1)("whatmoreHeading"),[r,s]=(0,i.useState)(["initial",window.pageYOffset]),[o,l]=(0,i.useState)(!1),d="2665447536"==t?30:10,u=(0,a.MO)("isLandingSharedLink");(0,i.useEffect)((()=>{if((0,p.ll)(t),!(0,c.wc0)(t))return;const e=d;let n=window.pageYOffset,a=!1;const i=()=>{const t=window.pageYOffset;var i,r;Math.abs(t-n)<e?a=!1:(r=!0,s(i=[t>n?"scrolled-down":"scrolled-up",t]),i[1]>d&&l(r),n=t>0?t:0,a=!1)},r=()=>{a||(window.requestAnimationFrame(i),a=!0)};return window.addEventListener("scroll",r),()=>window.removeEventListener("scroll",r)}),[]);const[_,m,h]=(0,V.YD)({triggerOnce:!0});return(0,b.jsx)("div",{ref:_,style:{display:"block"},children:o||m||u||!(0,c.wc0)(t)?(0,b.jsx)(G,{heading:n,shopId:t}):(0,b.jsx)("div",{})})}},8181:function(e,t,n){var a=n(7313),i=n(8866),r=n(7753),s=n(6417);const o=a.memo((()=>{if(!(0,r.MO)("isLandingSharedLink"))return(0,s.jsx)(s.Fragment,{});const[e]=(0,i.Z)();return(0,s.jsxs)("div",{className:`shimmer-container ${e}`,children:["portrait"===e?(0,s.jsx)("div",{className:"shimmer-item portrait-full",children:(0,s.jsx)("div",{className:"shimmer-effect"})}):Array(3).fill().map(((e,t)=>(0,s.jsx)("div",{className:"shimmer-item landscape-item "+(1===t?"center-item":""),children:(0,s.jsx)("div",{className:"shimmer-effect"})},t))),(0,s.jsx)("style",{children:"\n .shimmer-container {\n display: flex;\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n scroll-behavior: smooth;\n z-index: 1000;\n }\n\n .portrait {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.3);\n }\n\n .landscape {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.8);\n }\n\n .shimmer-item {\n scroll-snap-align: start;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n transition: transform 0.3s ease;\n }\n\n .portrait-full {\n width: 100vw;\n height: 100vh;\n margin: 0; \n }\n\n .landscape-item {\n width: 250px;\n height: 450px;\n background: #D3D3D3;\n border-radius: 8px;\n margin-left: -50px; \n }\n\n .center-item {\n width: 360px;\n height: 620px;\n box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.5); \n z-index: 10; \n }\n\n .shimmer-effect {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.3) 75%);\n animation: shimmer 2s infinite;\n background-size: 200% 100%;\n }\n\n @keyframes shimmer {\n 0% {\n background-position: -200% 0;\n }\n 100% {\n background-position: 200% 0;\n }\n }\n "})]})}));t.Z=o},499:function(e,t){t.Z={LIVE:{name:"LIVE",color:"gray.600"},UPCOMING:{name:"UPCOMING",color:"gray.600"},DEFAULT:{name:"LIVE EVENT",color:"gray.600"},COMPLETED:{name:"ENDED",color:"gray.600"}}},4897:function(e,t,n){var a=n(499);t.Z=class{static getEventStatus(e){e.time_zone="GMT+5:30";var t=e.start_time+":00",n=e.end_time,i=e.scheduled_date,r=e.status,s=e.time_zone;if(r.toUpperCase()==a.Z.LIVE.name)return{status:a.Z.LIVE,bannerText:" "+a.Z.LIVE.name+" ",timeToStartInMins:0};if(r.toUpperCase()==a.Z.UPCOMING.name){var o=new Date(i+" "+t+" "+s),l=(new Date(i+" "+n+" "+s),function(e){var t=new Date,n=(e.getTime()-t.getTime())/1e3,i=n/60,r=i/60,s=r/24;return n<=0?{status:a.Z.COMPLETED,bannerText:" "+a.Z.COMPLETED.name+" ",timeToStartInMins:0}:n>=1&&n<=30?{status:a.Z.UPCOMING,bannerText:"Starts in "+Math.round(n)+" sec ",timeToStartInMins:n/60}:i<60?{status:a.Z.UPCOMING,bannerText:"Starts in "+Math.round(i)+" min ",timeToStartInMins:i}:r<24?{status:a.Z.UPCOMING,bannerText:"Starts in "+Math.round(r)+" hr ",timeToStartInMins:60*r}:s<7?{status:a.Z.UPCOMING,bannerText:" "+["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()]+" ",timeToStartInMins:60*s*24}:{status:a.Z.UPCOMING,bannerText:"Upcoming",timeToStartInMins:2880}}(o));return{status:l.status,bannerText:l.bannerText,timeToStartInMins:l.timeToStartInMins}}return console.error("invalid status for event :: id : "+e.event_id+", status : "+e.status),{status:a.Z.DEFAULT,bannerText:"live event",timeToStartInMins:2880}}}},3388:function(e,t,n){n.d(t,{OC:function(){return o},e8:function(){return r},kT:function(){return a},kW:function(){return s},xg:function(){return i}});const a=function(e,t){return!((void 0==e.products||0==e.products.length)&&(void 0==e.cta||0==e.cta.length))},i=function(e,t){return!(void 0==e.products||0==e.products.length)},r=function(e,t){if(null!=e)return e.filter((e=>1==a(e)))},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null!=e)return t?e.events[0].events:e.events};const o=function(e,t){var n;if(null==e)return[];if(!("eventsets"in e))return[];const a=null!==(n=e.eventsets[t])&&void 0!==n?n:null;return a?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(a):[]}},4522:function(e,t,n){n.d(t,{gW:function(){return o},GF:function(){return l},y4:function(){return d},PB:function(){return u},Z2:function(){return c}});var a=n(9854),i=n(7753),r=n(778);var s=n(733);const o={[r.K.EVENT_VIEW]:"whatmore_video_click_event",[r.K.VIDEO_LIKED]:"whatmore_video_like_event",[r.K.VIDEO_SHARE_CTA_CLICKED]:"whatmore_video_share_event",[r.K.PRODUCT_TILE_ATC_CLICKED]:"whatmore_video_atc_event",[r.K.SHOPNOW_ATC_CLICKED]:"whatmore_video_atc_event"};function l(e){var t;let{userInteractionType:n,userInteractionMetadata:l,widgetSourceDetails:c,event:d,productList:u,ctaList:_}=e;(0,s.s)({userInteractionType:n,userInteractionMetadata:l,widgetSourceDetails:c,event:d,productList:u,ctaList:_}),n in o&&function(e,t){const n=(0,i.MO)("whatmoreShopId");(e!=r.K.EVENT_VIEW||(0,a.UAB)(n))&&(e!=r.K.SHOPNOW_ATC_CLICKED&&e!=r.K.PRODUCT_TILE_ATC_CLICKED||(0,a.Tn_)(n))&&(e!=r.K.VIDEO_LIKED||(0,a.sKB)(n))&&(e!=r.K.VIDEO_SHARE_CTA_CLICKED||(0,a.YOU)(n))&&"function"==typeof fbq&&(async()=>{console.log("hello"),fbq("trackCustom",o[e],{id:null===t||void 0===t?void 0:t.client_product_id,product_url:null===t||void 0===t?void 0:t.product_link})})()}(n,null!==(t=null===u||void 0===u?void 0:u[1])&&void 0!==t?t:null===u||void 0===u?void 0:u[0])}function c(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:a,event:i,productList:r,ctaList:o}=e;(0,s.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:a,event:i,productList:r,ctaList:o})}function d(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:a,event:i,productList:r,ctaList:o}=e;(0,s.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:a,event:i,productList:r,ctaList:o})}function u(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:a,event:i,productList:r,ctaList:o}=e;(0,s.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:a,event:i,productList:r,ctaList:o})}}}]);