whatmore-react-assets 1.0.400 → 1.0.402
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 +1 -1
- package/static/js/364.5137f4df.chunk.js +1 -0
- package/static/js/{565.3b53d286.chunk.js → 565.80a7719a.chunk.js} +1 -1
- package/static/js/580.bef9c451.chunk.js +1 -0
- package/static/js/{660.35ce195e.chunk.js → 660.0076c026.chunk.js} +1 -1
- package/static/js/{891.80bd94f6.chunk.js → 891.6374affe.chunk.js} +1 -1
- package/static/js/959.488e80e8.chunk.js +1 -0
- package/static/js/{972.3c9e4d89.chunk.js → 972.c80ce1b1.chunk.js} +1 -1
- package/whatmore.js +2 -2
- package/static/js/364.e314471e.chunk.js +0 -1
- package/static/js/580.f7ec3ed9.chunk.js +0 -1
- package/static/js/959.0117bf7b.chunk.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[891],{3867:function(t,e,i){var n=i(8816),r=i(417),o=i(4885),s=i(7753),l=i(4136),a=i(7313),d=i(6417);e.Z=function(t){var e;const{whatmoreUITheme:i}=(0,a.useContext)(l.I),[p]=(0,s.j1)("whatmoreSecondaryColor"),[c,h]=(0,s.j1)("productRatings"),x=(0,s.MO)("whatmorePrimaryFont"),y=(t.storeId,t.productId),m=(t.productLink,t.fontSize),f=null!==(e=t.fontColor)&&void 0!==e?e:"gray";if(null===c||"undefined"==typeof c||!(y in c)||c[y].avgRating>5)return(0,d.jsx)(d.Fragment,{});const u=c[y].avgRating,g=c[y].totalRatings;return(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,d.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center",gap:"0px"},children:[[...Array(Math.floor(u))].map(((t,e)=>(0,d.jsx)(n.Z,{sx:{color:p,fontSize:m+"px"}},"star-icon"+e))),u-Math.floor(u)>.2?(0,d.jsx)(r.Z,{sx:{color:p,fontSize:m+"px"}},"star-half-icon"):u-Math.floor(u)==0?(0,d.jsx)(d.Fragment,{}):(0,d.jsx)(o.Z,{sx:{color:p,fontSize:m+"px"}},"star-outline-icon"),[...Array(Math.floor(5-u))].map(((t,e)=>(0,d.jsx)(o.Z,{sx:{color:p,fontSize:m+"px"}},"star-outline-icon-"+e))),(0,d.jsx)("div",{children:(0,d.jsx)("div",{width:"2px"})}),(0,d.jsx)("div",{children:(0,d.jsx)("div",{style:{backgroundColor:p,borderRadius:"round"==i?"2px":"0px",padding:"1px",overflow:"hidden"},children:(0,d.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color","white","important"),t.style.setProperty("font-size",.8*m+"px","important"),t.style.setProperty("font-family",x,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"medium"},children:["\xa0",u,"\xa0"]})})}),(0,d.jsx)("div",{children:(0,d.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color",f,"important"),t.style.setProperty("font-size",.8*m+"px","important"),t.style.setProperty("font-family",x,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"medium"},children:["\xa0","("+g+")"]})})]})})}},4095:function(t,e,i){i.r(e),i.d(e,{default:function(){return W}});var n=i(7313),r=i(6090),o=i(7616),s=(i(6143),i(7850),i(4444),i(7244),i(123),i(5892),i(1811),i(9302)),l=i(2575),a=i(2210),d=i(8486),p=i(9821),c=i(8866),h=i(2279),x=i.n(h),y=i(7753),m=i(7129),f=i(9854),u=i(4136),g=i(1855),w=i(4892),v=i(3933),j=i(1092),C=i(5945),P=i(5456),b=i(3867),I=i(9219),S=i(6417);const k=n.lazy((()=>Promise.all([i.e(576),i.e(803),i.e(660),i.e(12)]).then(i.bind(i,6163))));var F=function(t){const{whatmoreUITheme:e}=(0,n.useContext)(u.I);var[i,r]=(0,p.Z)();const[o]=(0,y.j1)("whatmorePrimaryFont"),[s]=(0,y.j1)("whatmoreSecondaryColorShade900"),[l]=(0,y.j1)("whatmoreShopId"),[a,d]=(0,n.useState)(0),[c,h]=(0,n.useState)(t.event),x=t.onClick,m=c.products.length;if(0==m)return(0,S.jsx)(S.Fragment,{});(0,n.useEffect)((()=>{const t=setInterval((()=>{d((t=>(t+1)%m))}),4e3);return()=>{clearInterval(t)}}),[]),(0,n.useEffect)((()=>{(0,f.N8)(l)&&(0,I.p_)(c,(0,f.Ip)(l),l).then((t=>{h(t)}))}),[]);const g=.3*r,w=g+"px",v=g+"px",j=.05*r+"px",F=.07*r,O=F+"px",M=.05*r;return(0,S.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-around",alignItems:"center",marginTop:"2px",marginBottom:"2px",gap:"0px"},children:[(0,S.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:.95*r,height:"fit-content",paddingLeft:"4px",paddingRight:"4px",justifyContent:"space-between",alignItems:"center",gap:"4px"},className:"whatmore-event-tile-product-scale-in-and-out-animation",onClick:x,children:[(0,S.jsx)("div",{style:{width:w,height:v,overflow:"hidden",backgroundColor:s,borderRadius:"round"==e?"5px":"0px",borderWidth:"0px"==(0,f.al)(l)?"2px":(0,f.al)(l),borderColor:"white"==(0,f.qP)(l)?s:(0,f.qP)(l)},children:(0,S.jsx)("img",{ref:t=>{t&&t.style.setProperty("object-fit",(0,f.yO)(l),"important")},src:c.products[a].thumbnail_image,style:{width:w,height:w,borderRadius:"round"==e?"5px":"0px",backgroundColor:s},alt:"product image"})}),(0,S.jsx)("div",{style:{width:.7*r+"px",height:"100%",overflow:"visible",marginBottom:"2px",marginRight:"2px",borderRadius:"round"==e?"5px":"0px"},children:(0,S.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",paddingTop:"5px"},children:[(0,S.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,S.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",j,"important"),t.style.setProperty("line-height","140%","important"),t.style.setProperty("font-family",o,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"medium"},children:(0,C.s)(c.products[a].title)})}),(0,S.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center",gap:"4px"},children:[(0,S.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",O,"important"),t.style.setProperty("line-height","140%","important"),t.style.setProperty("font-family",o,"important"))},style:{textAlign:"left",fontWeight:"medium",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:1,overflow:"hidden",textOverflow:"ellipsis"},children:[" ",(0,I.jx)(parseFloat(c.products[a].price),"",l,c.products[a].currency)]}),(0,S.jsx)("div",{children:(0,P.B)(c.products[a].price,c.products[a].compare_price)?(0,S.jsxs)("strike",{ref:t=>{t&&(t.style.setProperty("color","gray","important"),t.style.setProperty("font-size",.9*F+"px","important"),t.style.setProperty("line-height","140%","important"),t.style.setProperty("font-family",o,"important"),t.style.setProperty("text-decoration","line-through","important"))},style:{textAlign:"left",fontWeight:"medium",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:1,overflow:"hidden",textOverflow:"ellipsis"},children:[" ",(0,I.jx)(parseFloat(c.products[a].compare_price),"",l,c.products[a].currency)]}):(0,S.jsx)(S.Fragment,{})})]}),(0,S.jsx)(b.Z,{storeId:l,productId:c.products[a].client_product_id,productLink:c.products[a].product_link,fontSize:M})]})})]},a),(0,f.IX)(l)?(0,S.jsx)(n.Suspense,{children:(0,S.jsx)(k,{baseFontSize:.05*r,event:c,product:c.products[0],width:.9*r,height:"fit-content"})}):(0,S.jsx)(S.Fragment,{})]})},O=i(3388);function M(t){const[e,i,r,o,s]=(0,p.Z)(),{whatmoreUITheme:l}=(0,n.useContext)(u.I),a=(0,y.MO)("whatmoreShowViews"),d=(0,y.MO)("whatmoreShopId"),c=((0,y.MO)("whatmoreSecondaryColorShade600"),t.PRODUCT_BOX_HEIGHT),h=t.PRODUCT_BOX_HEIGHT_IN_PX,x=t.PRODUCT_BOX_MARGIN,[m,g,w]=(0,v.YD)({triggerOnce:!0}),C=t.event;t.isOnFocus;return(0,S.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,S.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between",alignItems:"center"},children:[(0,S.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"flex-start",alignItems:"center",width:"100%"},onClick:()=>{t.onClick(C)},children:"show"===a?(0,S.jsx)("div",{style:{width:"100%",marginLeft:"5px",marginRight:"5px",marginTop:"10px"},children:(0,S.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",paddingLeft:"5px",width:"fit-content",height:"fit-content",justifyContent:"space-between",alignItems:"center"},children:(0,S.jsx)(j.Z,{event:C,fontSize:.07*i+"px"})})}):(0,S.jsx)(S.Fragment,{})}),(0,S.jsx)("div",{style:{display:"flex",width:"100%",height:e-c+"px"},onClick:()=>{t.onClick(C)}}),(0,O.xg)(C,d)?(0,S.jsx)("div",{style:{position:"relative",zIndex:1,bottom:x+"px",display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignItems:"center",width:.95*i,height:h,marginLeft:x+"px",marginRight:x+"px",backgroundColor:"white",borderRadius:"round"==l?"5px":"0px",borderWidth:(0,f.al)(d),borderColor:(0,f.qP)(d),paddingLeft:"5px",paddingRight:"5px",overflow:"hidden"},children:(0,S.jsx)("div",{ref:m,children:g&&(0,f.PW)(d)?(0,S.jsx)(F,{event:C,onClick:()=>{t.onClick(C)}}):(0,S.jsx)("div",{height:"20px"})})}):(0,S.jsx)(S.Fragment,{})]})})}var R=function(t){var e,i,r;const[o,s,l,a,d]=(0,p.Z)();var c=(0,n.useContext)(m.V);const{whatmoreUITheme:h}=(0,n.useContext)(u.I),x=(0,y.MO)("whatmoreShopId"),g=(0,y.MO)("whatmoreSecondaryColorShade600"),v=t.event,j=t.onClick,C=null===(e=t.isOnFocus)||void 0===e||e,P=null!==(i=t.playOnUnfocus)&&void 0!==i&&i,b=null!==(r=t.animateOnFocus&&(0,f.iW)(x))&&void 0!==r&&r,I=(0,f.IX)(x)?.7:.8,k=o*I+"px",F=1-I,R=o*F,L=o*F+"px",_=o*F*.1,z=(0,f.nz)(x);return(0,S.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top",c.tileTopMargin+"px","important"),t.style.setProperty("margin-bottom",c.tileBottomMMargin+"px","important"))},style:{margin:"0 auto",width:s+"px",height:1.2*o+"px",borderRadius:"round"==h?"5px":"0px",boxShadow:"round"==h?z:null,borderWidth:(0,f.al)(x),borderColor:(0,f.qP)(x),overflow:"hidden",cursor:"pointer",position:"relative"},className:b?C?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",onClick:()=>{},children:[(0,S.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"flex-start",alignItems:"center"},children:[(0,S.jsx)(w.Z,{height:k,width:"100%",url:v.thumbnail_image,isPlaying:C||P,event:v}),(0,O.xg)(v,x)?(0,S.jsx)("div",{style:{width:"100%",height:L,backgroundColor:g}}):(0,S.jsx)(S.Fragment,{})]}),(0,S.jsx)(M,{event:v,isOnFocus:C,PRODUCT_BOX_HEIGHT:R,PRODUCT_BOX_HEIGHT_IN_PX:L,PRODUCT_BOX_MARGIN:_,onClick:j})]})},L=i(778),_=i(7376);const z=(0,l.Z)({key:"whatmore-css-hv"});function Z(t){const[e,i,r]=(0,p.Z)(),o=(0,y.MO)("whatmoreShopId"),s=t.events,l=t.onClick,d=r*(0,f.u6)(o),{whatmoreWidgetSourceDetails:c}=(0,n.useContext)(u.I);return(0,S.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,S.jsx)("div",{style:{width:window.innerWidth,height:"fit-content"},children:(0,S.jsx)(a.tq,{slidesPerView:s.length>1?d:1,initialSlide:s.length>1?1:0,centeredSlides:!0,centeredSlidesBounds:!0,watchSlidesProgress:!0,touchRatio:.5,onSlideChange:t=>{(0,_.y4)({userInteractionType:L.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:c,event:s[t.activeIndex],productList:s[t.activeIndex].products})},children:s.map((t=>(0,S.jsx)(a.o5,{children:e=>{let{isActive:i,isPrev:n,isNext:r,isVisible:o}=e;return n||r||i?(0,S.jsx)(R,{isOnFocus:i&&o,playOnUnfocus:!1,animateOnFocus:!0,event:t,onClick:()=>{l(t)}}):(0,S.jsx)(g.Z,{})}},"whatmore-event-tile-portrait-"+t.index)))})})})}function T(t){const[e,i,r,o]=(0,p.Z)(),[s,l]=(0,n.useState)((c=r,Math.floor(Math.random()*Math.floor(c))));var c;const h=t.onClick,y=t.events,m=Math.min(r,y.length),{whatmoreWidgetSourceDetails:f}=(0,n.useContext)(u.I);return(0,S.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:o+"px",paddingRight:o+"px"},children:(0,S.jsx)("div",{style:{width:i*m*1.1+"px"},children:(0,S.jsx)(a.tq,{slidesPerView:m,watchSlidesProgress:!0,modules:[d.W_],navigation:!0,slidesPerGroup:parseInt(m),onSlideChange:()=>{(0,_.y4)({userInteractionType:L.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:f,event:y[s],productList:y[s].products})},children:y.map(((t,e)=>{const i=x()((()=>l(e)),300);return(0,S.jsx)(a.o5,{onMouseEnter:()=>{i()},onMouseLeave:()=>{i.cancel()},children:i=>{let{isActive:n,isPrev:r,isNext:o,isVisible:l}=i;return l?(0,S.jsx)(R,{isOnFocus:e==s,playOnUnfocus:!0,animateOnFocus:!0,event:t,onClick:()=>{h(t)}}):(0,S.jsx)(g.Z,{})}},"whatmore-event-tile-landscape-"+t.index)}))})})})}var W=function(t){var e;const[i,l,a]=(0,c.Z)(),[d]=(0,y.j1)("whatmorePrimaryColor"),[p]=(0,y.j1)("whatmoreShopId"),[h]=(0,y.j1)("whatmoreSecondaryColor"),[x]=(0,y.j1)("whatmoreTitleFont"),g="portrait"==i?(0,y.MO)("whatmoreTitleFontSizePortrait"):(0,y.MO)("whatmoreTitleFontSize"),{whatmoreRootId:w}=(0,n.useContext)(u.I),v=t.events,j=t.onClick,C=null!==(e=(0,f.aR)(p))&&void 0!==e?e:x;function P(t){j(t)}return delete o.ZP.styles.global,(0,S.jsx)(s.C,{value:z,children:(0,S.jsx)("div",{children:(0,S.jsx)(r.x,{theme:o.ZP,cssVarsRoot:w,resetCSS:!1,children:(0,S.jsxs)(m.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!1},children:[t.heading.trim().length>0?(0,S.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,S.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",C,"important"),t.style.setProperty("font-size",g+"px","important"))},style:{color:d,backgroundClip:"text",textAlign:"center"},children:t.heading})}):(0,S.jsx)(S.Fragment,{}),"landscape"===i?(0,S.jsx)(T,{events:v,onClick:P}):(0,S.jsx)(Z,{events:v,onClick:P})]})})})})}},1092:function(t,e,i){var n=i(237),r=i(9854),o=i(7753),s=i(4136),l=i(7313),a=i(6417);function d(t){return t<1e3?t:t<1e5?(t/1e3).toFixed(0)+"K":(t/1e5).toFixed(0)+"L"}e.Z=function(t){const{whatmoreUITheme:e}=(0,l.useContext)(s.I),i=(0,o.MO)("whatmoreShopId"),p=(0,o.MO)("whatmorePrimaryFont"),c=t.event,h=t.fontSize;if(c.total_views<=0)return(0,a.jsx)(a.Fragment,{});const x=(0,r.S_)(i);return"template-icon"==x?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,r.XC)(i),color:"white",borderRadius:"round"==e?"5px":"0px",borderWidth:(0,r.al)(i),borderColor:(0,r.qP)(i)},children:(0,a.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:[(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)(n.Z,{sx:{color:(0,r.aL)(i)+" !important",fontSize:h,fontWeight:"normal"}})}),(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,r.aL)(i),"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",p,"important"),t.style.setProperty("font-size",h,"important"),t.style.setProperty("min-height","0","important"),t.style.setProperty("display","inline","important"))},style:{fontWeight:"normal"},children:" "+d(c.total_views)+" "})})]})})}):"template-text"==x?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,r.XC)(i),color:"white",borderRadius:"round"==e?"5px":"0px",borderWidth:(0,r.al)(i),borderColor:(0,r.qP)(i)},children:(0,a.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,r.aL)(i),"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",p,"important"))},style:{fontSize:h,fontWeight:"bold"},children:" "+d(c.total_views)+" views"})})})})}):void 0}},7129:function(t,e,i){i.d(e,{V:function(){return n}});const n=(0,i(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},1855:function(t,e,i){var n=i(7313),r=i(9821),o=i(7129),s=i(6417);e.Z=function(t){var[e,i]=(0,r.Z)();return(0,n.useContext)(o.V),t.event,(0,s.jsx)("div",{style:{margin:"0 auto",width:i,height:e,overflow:"hidden"}})}},5456:function(t,e,i){i.d(e,{B:function(){return n}});const n=function(t,e){return!(isNaN(e)||!e||("string"===typeof e||e instanceof String)&&!e.trim().length)&&!(parseInt(e)<=parseInt(t))}},8816:function(t,e,i){var n=i(5318);e.Z=void 0;var r=n(i(5045)),o=i(6417),s=(0,r.default)((0,o.jsx)("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star");e.Z=s},417:function(t,e,i){var n=i(5318);e.Z=void 0;var r=n(i(5045)),o=i(6417),s=(0,r.default)((0,o.jsx)("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarHalf");e.Z=s},4885:function(t,e,i){var n=i(5318);e.Z=void 0;var r=n(i(5045)),o=i(6417),s=(0,r.default)((0,o.jsx)("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarOutline");e.Z=s},237:function(t,e,i){var n=i(5318);e.Z=void 0;var r=n(i(5045)),o=i(6417),s=(0,r.default)((0,o.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");e.Z=s},5892:function(){},4444:function(){},1811:function(){},7850:function(){}}]);
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[891],{3867:function(t,e,i){var n=i(8816),r=i(417),o=i(4885),s=i(7753),l=i(4136),a=i(7313),d=i(6417);e.Z=function(t){var e;const{whatmoreUITheme:i}=(0,a.useContext)(l.I),[p]=(0,s.j1)("whatmoreSecondaryColor"),[c,h]=(0,s.j1)("productRatings"),x=(0,s.MO)("whatmorePrimaryFont"),y=(t.storeId,t.productId),m=(t.productLink,t.fontSize),f=null!==(e=t.fontColor)&&void 0!==e?e:"gray";if(null===c||"undefined"==typeof c||!(y in c)||c[y].avgRating>5)return(0,d.jsx)(d.Fragment,{});const u=c[y].avgRating,g=c[y].totalRatings;return(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,d.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center",gap:"0px"},children:[[...Array(Math.floor(u))].map(((t,e)=>(0,d.jsx)(n.Z,{sx:{color:p,fontSize:m+"px"}},"star-icon"+e))),u-Math.floor(u)>.2?(0,d.jsx)(r.Z,{sx:{color:p,fontSize:m+"px"}},"star-half-icon"):u-Math.floor(u)==0?(0,d.jsx)(d.Fragment,{}):(0,d.jsx)(o.Z,{sx:{color:p,fontSize:m+"px"}},"star-outline-icon"),[...Array(Math.floor(5-u))].map(((t,e)=>(0,d.jsx)(o.Z,{sx:{color:p,fontSize:m+"px"}},"star-outline-icon-"+e))),(0,d.jsx)("div",{children:(0,d.jsx)("div",{width:"2px"})}),(0,d.jsx)("div",{children:(0,d.jsx)("div",{style:{backgroundColor:p,borderRadius:"round"==i?"2px":"0px",padding:"1px",overflow:"hidden"},children:(0,d.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color","white","important"),t.style.setProperty("font-size",.8*m+"px","important"),t.style.setProperty("font-family",x,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"medium"},children:["\xa0",u,"\xa0"]})})}),(0,d.jsx)("div",{children:(0,d.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color",f,"important"),t.style.setProperty("font-size",.8*m+"px","important"),t.style.setProperty("font-family",x,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"medium"},children:["\xa0","("+g+")"]})})]})})}},4095:function(t,e,i){i.r(e),i.d(e,{default:function(){return W}});var n=i(7313),r=i(6090),o=i(7616),s=(i(6143),i(7850),i(4444),i(7244),i(123),i(5892),i(1811),i(9302)),l=i(2575),a=i(2210),d=i(8486),p=i(9821),c=i(8866),h=i(2279),x=i.n(h),y=i(7753),m=i(7129),f=i(9854),u=i(4136),g=i(1855),w=i(4892),v=i(3933),j=i(1092),P=i(5945),C=i(5456),b=i(3867),I=i(9219),S=i(6417);const k=n.lazy((()=>Promise.all([i.e(576),i.e(803),i.e(660),i.e(12)]).then(i.bind(i,6163))));var F=function(t){const{whatmoreUITheme:e}=(0,n.useContext)(u.I);var[i,r]=(0,p.Z)();const[o]=(0,y.j1)("whatmorePrimaryFont"),[s]=(0,y.j1)("whatmoreSecondaryColorShade900"),[l]=(0,y.j1)("whatmoreShopId"),[a,d]=(0,n.useState)(0),[c,h]=(0,n.useState)(t.event),x=t.onClick,m=c.products.length;if(0==m)return(0,S.jsx)(S.Fragment,{});(0,n.useEffect)((()=>{const t=setInterval((()=>{d((t=>(t+1)%m))}),4e3);return()=>{clearInterval(t)}}),[]),(0,n.useEffect)((()=>{(0,f.N8)(l)&&(0,I.p_)(c,(0,f.Ip)(l),l).then((t=>{h(t)}))}),[]);const g=.3*r,w=g+"px",v=g+"px",j=.05*r+"px",F=.07*r,O=F+"px",M=.05*r;return(0,S.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-around",alignItems:"center",marginTop:"2px",marginBottom:"2px",gap:"0px"},children:[(0,S.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:.95*r,height:"fit-content",paddingLeft:"4px",paddingRight:"4px",justifyContent:"space-between",alignItems:"center",gap:"4px"},className:"whatmore-event-tile-product-scale-in-and-out-animation",onClick:x,children:[(0,S.jsx)("div",{style:{width:w,height:v,overflow:"hidden",backgroundColor:s,borderRadius:"round"==e?"5px":"0px",borderWidth:"0px"==(0,f.al)(l)?"2px":(0,f.al)(l),borderColor:"white"==(0,f.qP)(l)?s:(0,f.qP)(l)},children:(0,S.jsx)("img",{ref:t=>{t&&t.style.setProperty("object-fit",(0,f.yO)(l),"important")},src:c.products[a].thumbnail_image,style:{width:w,height:w,borderRadius:"round"==e?"5px":"0px",backgroundColor:s},alt:"product image"})}),(0,S.jsx)("div",{style:{width:.7*r+"px",height:"100%",overflow:"visible",marginBottom:"2px",marginRight:"2px",borderRadius:"round"==e?"5px":"0px"},children:(0,S.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",paddingTop:"5px"},children:[(0,S.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,S.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",j,"important"),t.style.setProperty("line-height","140%","important"),t.style.setProperty("font-family",o,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"medium"},children:(0,P.s)(c.products[a].title)})}),(0,S.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center",gap:"4px"},children:[(0,S.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",O,"important"),t.style.setProperty("line-height","140%","important"),t.style.setProperty("font-family",o,"important"))},style:{textAlign:"left",fontWeight:"medium",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:1,overflow:"hidden",textOverflow:"ellipsis"},children:[" ",(0,I.jx)(parseFloat(c.products[a].price),"",l,c.products[a].currency)]}),(0,S.jsx)("div",{children:(0,C.B)(c.products[a].price,c.products[a].compare_price)?(0,S.jsxs)("strike",{ref:t=>{t&&(t.style.setProperty("color","gray","important"),t.style.setProperty("font-size",.9*F+"px","important"),t.style.setProperty("line-height","140%","important"),t.style.setProperty("font-family",o,"important"),t.style.setProperty("text-decoration","line-through","important"))},style:{textAlign:"left",fontWeight:"medium",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:1,overflow:"hidden",textOverflow:"ellipsis"},children:[" ",(0,I.jx)(parseFloat(c.products[a].compare_price),"",l,c.products[a].currency)]}):(0,S.jsx)(S.Fragment,{})})]}),(0,S.jsx)(b.Z,{storeId:l,productId:c.products[a].client_product_id,productLink:c.products[a].product_link,fontSize:M})]})})]},a),(0,f.IX)(l)?(0,S.jsx)(n.Suspense,{children:(0,S.jsx)(k,{baseFontSize:.05*r,event:c,product:c.products[0],width:.9*r,height:"fit-content"})}):(0,S.jsx)(S.Fragment,{})]})},O=i(3388);function M(t){const[e,i,r,o,s]=(0,p.Z)(),{whatmoreUITheme:l}=(0,n.useContext)(u.I),a=(0,y.MO)("whatmoreShowViews"),d=(0,y.MO)("whatmoreShopId"),c=((0,y.MO)("whatmoreSecondaryColorShade600"),t.PRODUCT_BOX_HEIGHT),h=t.PRODUCT_BOX_HEIGHT_IN_PX,x=t.PRODUCT_BOX_MARGIN,[m,g,w]=(0,v.YD)({triggerOnce:!0}),P=t.event;t.isOnFocus;return(0,S.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,S.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between",alignItems:"center"},children:[(0,S.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"flex-start",alignItems:"center",width:"100%"},onClick:()=>{t.onClick(P)},children:"show"===a?(0,S.jsx)("div",{style:{width:"100%",marginLeft:"5px",marginRight:"5px",marginTop:"10px"},children:(0,S.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",paddingLeft:"5px",width:"fit-content",height:"fit-content",justifyContent:"space-between",alignItems:"center"},children:(0,S.jsx)(j.Z,{event:P,fontSize:.07*i+"px"})})}):(0,S.jsx)(S.Fragment,{})}),(0,S.jsx)("div",{style:{display:"flex",width:"100%",height:e-c+"px"},onClick:()=>{t.onClick(P)}}),(0,O.xg)(P,d)?(0,S.jsx)("div",{style:{position:"relative",zIndex:1,bottom:x+"px",display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignItems:"center",width:.95*i,height:h,marginLeft:x+"px",marginRight:x+"px",backgroundColor:"white",borderRadius:"round"==l?"5px":"0px",borderWidth:(0,f.al)(d),borderColor:(0,f.qP)(d),paddingLeft:"5px",paddingRight:"5px",overflow:"hidden"},children:(0,S.jsx)("div",{ref:m,children:g&&(0,f.PW)(d)?(0,S.jsx)(F,{event:P,onClick:()=>{t.onClick(P)}}):(0,S.jsx)("div",{height:"20px"})})}):(0,S.jsx)(S.Fragment,{})]})})}var R=function(t){var e,i,r;const[o,s,l,a,d]=(0,p.Z)();var c=(0,n.useContext)(m.V);const{whatmoreUITheme:h}=(0,n.useContext)(u.I),x=(0,y.MO)("whatmoreShopId"),g=(0,y.MO)("whatmoreSecondaryColorShade600"),v=t.event,j=t.onClick,P=null===(e=t.isOnFocus)||void 0===e||e,C=null!==(i=t.playOnUnfocus)&&void 0!==i&&i,b=null!==(r=t.animateOnFocus&&(0,f.iW)(x))&&void 0!==r&&r,I=(0,f.IX)(x)?.7:.8,k=o*I+"px",F=1-I,R=o*F,L=o*F+"px",_=o*F*.1,z=(0,f.nz)(x);return(0,S.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top",c.tileTopMargin+"px","important"),t.style.setProperty("margin-bottom",c.tileBottomMMargin+"px","important"))},style:{margin:"0 auto",width:s+"px",height:1.2*o+"px",borderRadius:"round"==h?"5px":"0px",boxShadow:"round"==h?z:null,borderWidth:(0,f.al)(x),borderColor:(0,f.qP)(x),overflow:"hidden",cursor:"pointer",position:"relative"},className:b?P?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",onClick:()=>{},children:[(0,S.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"flex-start",alignItems:"center"},children:[(0,S.jsx)(w.Z,{height:k,width:"100%",url:v.thumbnail_image,isPlaying:P||C,event:v}),(0,O.xg)(v,x)?(0,S.jsx)("div",{style:{width:"100%",height:L,backgroundColor:g}}):(0,S.jsx)(S.Fragment,{})]}),(0,S.jsx)(M,{event:v,isOnFocus:P,PRODUCT_BOX_HEIGHT:R,PRODUCT_BOX_HEIGHT_IN_PX:L,PRODUCT_BOX_MARGIN:_,onClick:j})]})},L=i(778),_=i(7376);const z=(0,l.Z)({key:"whatmore-css-hv"});function Z(t){const[e,i,r]=(0,p.Z)(),o=(0,y.MO)("whatmoreShopId"),s=t.events,l=t.onClick,d=r*(0,f.u6)(o),{whatmoreWidgetSourceDetails:c}=(0,n.useContext)(u.I);return(0,S.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,S.jsx)("div",{style:{width:window.innerWidth,height:"fit-content"},children:(0,S.jsx)(a.tq,{slidesPerView:s.length>1?d:1,initialSlide:s.length>1?1:0,centeredSlides:!0,centeredSlidesBounds:!0,watchSlidesProgress:!0,touchRatio:.5,onSlideChange:t=>{(0,_.y4)({userInteractionType:L.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:c,event:s[t.activeIndex],productList:s[t.activeIndex].products})},children:s.map((t=>(0,S.jsx)(a.o5,{children:e=>{let{isActive:i,isPrev:n,isNext:r,isVisible:o}=e;return n||r||i?(0,S.jsx)(R,{isOnFocus:i&&o,playOnUnfocus:!1,animateOnFocus:!0,event:t,onClick:()=>{l(t)}}):(0,S.jsx)(g.Z,{})}},"whatmore-event-tile-portrait-"+t.index)))})})})}function T(t){const[e,i,r,o]=(0,p.Z)(),[s,l]=(0,n.useState)((c=r,Math.floor(Math.random()*Math.floor(c))));var c;const h=t.onClick,y=t.events,m=Math.min(r,y.length),{whatmoreWidgetSourceDetails:f}=(0,n.useContext)(u.I);return(0,S.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:o+"px",paddingRight:o+"px"},children:(0,S.jsx)("div",{style:{width:i*m*1.1+"px"},children:(0,S.jsx)(a.tq,{slidesPerView:m,watchSlidesProgress:!0,modules:[d.W_],navigation:!0,slidesPerGroup:parseInt(m),onSlideChange:()=>{(0,_.y4)({userInteractionType:L.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:f,event:y[s],productList:y[s].products})},children:y.map(((t,e)=>{const i=x()((()=>l(e)),300);return(0,S.jsx)(a.o5,{onMouseEnter:()=>{i()},onMouseLeave:()=>{i.cancel()},children:i=>{let{isActive:n,isPrev:r,isNext:o,isVisible:l}=i;return l?(0,S.jsx)(R,{isOnFocus:e==s,playOnUnfocus:!0,animateOnFocus:!0,event:t,onClick:()=>{h(t)}}):(0,S.jsx)(g.Z,{})}},"whatmore-event-tile-landscape-"+t.index)}))})})})}var W=function(t){var e;const[i,l,a]=(0,c.Z)(),[d]=(0,y.j1)("whatmorePrimaryColor"),[p]=(0,y.j1)("whatmoreShopId"),[h]=(0,y.j1)("whatmoreSecondaryColor"),[x]=(0,y.j1)("whatmoreTitleFont"),g="portrait"==i?(0,y.MO)("whatmoreTitleFontSizePortrait"):(0,y.MO)("whatmoreTitleFontSize"),{whatmoreRootId:w}=(0,n.useContext)(u.I),v=t.events,j=t.onClick,P=null!==(e=(0,f.aR)(p))&&void 0!==e?e:x;function C(t){j(t)}return delete o.ZP.styles.global,(0,S.jsx)(s.C,{value:z,children:(0,S.jsx)("div",{children:(0,S.jsx)(r.x,{theme:o.ZP,cssVarsRoot:w,resetCSS:!1,children:(0,S.jsxs)(m.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!1},children:[t.heading.trim().length>0?(0,S.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,S.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",P,"important"),t.style.setProperty("font-size",g+"px","important"))},style:{color:d,backgroundClip:"text",textAlign:"center"},children:t.heading})}):(0,S.jsx)(S.Fragment,{}),"landscape"===i?(0,S.jsx)(T,{events:v,onClick:C}):(0,S.jsx)(Z,{events:v,onClick:C})]})})})})}},1092:function(t,e,i){var n=i(237),r=i(9854),o=i(7753),s=i(4136),l=i(7313),a=i(6417);function d(t){return t<1e3?t:t<1e5?(t/1e3).toFixed(0)+"K":(t/1e5).toFixed(0)+"L"}e.Z=function(t){const{whatmoreUITheme:e}=(0,l.useContext)(s.I),i=(0,o.MO)("whatmoreShopId"),p=(0,o.MO)("whatmorePrimaryFont"),c=t.event,h=t.fontSize;if(c.total_views<=0)return(0,a.jsx)(a.Fragment,{});const x=(0,r.S_)(i);return"template-icon"==x?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,r.XC)(i),color:"white",borderRadius:"round"==e?"5px":"0px",borderWidth:(0,r.al)(i),borderColor:(0,r.qP)(i)},children:(0,a.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:[(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)(n.Z,{sx:{color:(0,r.aL)(i)+" !important",fontSize:h,fontWeight:"normal"}})}),(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,r.aL)(i),"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",p,"important"),t.style.setProperty("font-size",h,"important"),t.style.setProperty("min-height","0","important"),t.style.setProperty("display","inline","important"),t.style.setProperty("width","auto","important"))},style:{fontWeight:"normal"},children:" "+d(c.total_views)+" "})})]})})}):"template-text"==x?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,r.XC)(i),color:"white",borderRadius:"round"==e?"5px":"0px",borderWidth:(0,r.al)(i),borderColor:(0,r.qP)(i)},children:(0,a.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,r.aL)(i),"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",p,"important"))},style:{fontSize:h,fontWeight:"bold"},children:" "+d(c.total_views)+" views"})})})})}):void 0}},7129:function(t,e,i){i.d(e,{V:function(){return n}});const n=(0,i(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},1855:function(t,e,i){var n=i(7313),r=i(9821),o=i(7129),s=i(6417);e.Z=function(t){var[e,i]=(0,r.Z)();return(0,n.useContext)(o.V),t.event,(0,s.jsx)("div",{style:{margin:"0 auto",width:i,height:e,overflow:"hidden"}})}},5456:function(t,e,i){i.d(e,{B:function(){return n}});const n=function(t,e){return!(isNaN(e)||!e||("string"===typeof e||e instanceof String)&&!e.trim().length)&&!(parseInt(e)<=parseInt(t))}},8816:function(t,e,i){var n=i(5318);e.Z=void 0;var r=n(i(5045)),o=i(6417),s=(0,r.default)((0,o.jsx)("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star");e.Z=s},417:function(t,e,i){var n=i(5318);e.Z=void 0;var r=n(i(5045)),o=i(6417),s=(0,r.default)((0,o.jsx)("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarHalf");e.Z=s},4885:function(t,e,i){var n=i(5318);e.Z=void 0;var r=n(i(5045)),o=i(6417),s=(0,r.default)((0,o.jsx)("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarOutline");e.Z=s},237:function(t,e,i){var n=i(5318);e.Z=void 0;var r=n(i(5045)),o=i(6417),s=(0,r.default)((0,o.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");e.Z=s},5892:function(){},4444:function(){},1811:function(){},7850:function(){}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[959],{4048:function(e,t,n){n.r(t);var i=n(7313),o=n(6090),r=n(7616),s=(n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811),n(9302)),l=n(2575),a=n(2210),d=n(8486),c=n(9821),h=n(8866),p=n(2279),x=n.n(p),m=n(7753),u=n(7129),f=n(1855),y=n(9854),g=n(4136),w=n(4920),v=n(7376),j=n(778),C=n(6417);const b=(0,l.Z)({key:"whatmore-css-hv"});function P(e){const[t,n,o]=(0,c.Z)(),r=(0,m.MO)("whatmoreShopId"),s=e.events,l=e.onClick,d=o*(0,y.u6)(r),{whatmoreWidgetSourceDetails:h}=(0,i.useContext)(g.I);return(0,C.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,C.jsx)("div",{style:{width:window.innerWidth,height:"fit-content"},children:(0,C.jsx)(a.tq,{slidesPerView:s.length>1?d:1,initialSlide:s.length>1?1:0,centeredSlides:!0,centeredSlidesBounds:!0,watchSlidesProgress:!0,touchRatio:.5,onSlideChange:e=>{(0,v.y4)({userInteractionType:j.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:h,event:s[e.activeIndex],productList:s[e.activeIndex].products})},children:s.map((e=>(0,C.jsx)(a.o5,{children:t=>{let{isActive:n,isPrev:i,isNext:o,isVisible:r}=t;return i||o||n?(0,C.jsx)(w.Z,{isOnFocus:n&&r,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{l(e)}}):(0,C.jsx)(f.Z,{})}},"whatmore-event-tile-portrait-"+e.index)))})})})}function I(e){const[t,n,o,r]=(0,c.Z)(),[s,l]=(0,i.useState)((h=o,Math.floor(Math.random()*Math.floor(h))));var h;const p=e.onClick,m=e.events,u=Math.min(o,m.length),{whatmoreWidgetSourceDetails:y}=(0,i.useContext)(g.I);return(0,C.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:r+"px",paddingRight:r+"px"},children:(0,C.jsx)("div",{style:{width:n*u*1.1+"px"},children:(0,C.jsx)(a.tq,{slidesPerView:u,watchSlidesProgress:!0,modules:[d.W_],navigation:!0,slidesPerGroup:parseInt(u),onSlideChange:()=>{(0,v.y4)({userInteractionType:j.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:y,event:m[s],productList:m[s].products})},children:m.map(((e,t)=>{const n=x()((()=>l(t)),300);return(0,C.jsx)(a.o5,{onMouseEnter:()=>{n()},onMouseLeave:()=>{n.cancel()},children:n=>{let{isActive:i,isPrev:o,isNext:r,isVisible:l}=n;return l?(0,C.jsx)(w.Z,{isOnFocus:t==s,playOnUnfocus:!0,animateOnFocus:!0,event:e,onClick:()=>{p(e)}}):(0,C.jsx)(f.Z,{})}},"whatmore-event-tile-landscape-"+e.index)}))})})})}t.default=function(e){var t;const[n,l,a]=(0,h.Z)(),[d]=(0,m.j1)("whatmoreShopId"),[c]=(0,m.j1)("whatmorePrimaryColor"),[p]=(0,m.j1)("whatmoreSecondaryColor"),[x]=(0,m.j1)("whatmoreTitleFont"),f="portrait"==n?(0,m.MO)("whatmoreTitleFontSizePortrait"):(0,m.MO)("whatmoreTitleFontSize"),{whatmoreRootId:w}=(0,i.useContext)(g.I),v=e.events,j=e.onClick,S=null!==(t=(0,y.aR)(d))&&void 0!==t?t:x;function F(e){j(e)}return delete r.ZP.styles.global,(0,C.jsx)(s.C,{value:b,children:(0,C.jsx)("div",{children:(0,C.jsx)(o.x,{theme:r.ZP,cssVarsRoot:w,resetCSS:!1,children:(0,C.jsxs)(u.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[e.heading.trim().length>0?(0,C.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,C.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-family",S,"important"),e.style.setProperty("font-size",f+"px","important"))},style:{color:c,backgroundClip:"text",textAlign:"center"},children:e.heading})}):(0,C.jsx)(C.Fragment,{}),"landscape"===n?(0,C.jsx)(I,{events:v,onClick:F}):(0,C.jsx)(P,{events:v,onClick:F})]})})})})}},1092:function(e,t,n){var i=n(237),o=n(9854),r=n(7753),s=n(4136),l=n(7313),a=n(6417);function d(e){return e<1e3?e:e<1e5?(e/1e3).toFixed(0)+"K":(e/1e5).toFixed(0)+"L"}t.Z=function(e){const{whatmoreUITheme:t}=(0,l.useContext)(s.I),n=(0,r.MO)("whatmoreShopId"),c=(0,r.MO)("whatmorePrimaryFont"),h=e.event,p=e.fontSize;if(h.total_views<=0)return(0,a.jsx)(a.Fragment,{});const x=(0,o.S_)(n);return"template-icon"==x?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,o.XC)(n),color:"white",borderRadius:"round"==t?"5px":"0px",borderWidth:(0,o.al)(n),borderColor:(0,o.qP)(n)},children:(0,a.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:[(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)(i.Z,{sx:{color:(0,o.aL)(n)+" !important",fontSize:p,fontWeight:"normal"}})}),(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,o.aL)(n),"important"),e.style.setProperty("line-height","120%","important"),e.style.setProperty("font-family",c,"important"),e.style.setProperty("font-size",p,"important"),e.style.setProperty("min-height","0","important"),e.style.setProperty("display","inline","important"),e.style.setProperty("width","auto","important"))},style:{fontWeight:"normal"},children:" "+d(h.total_views)+" "})})]})})}):"template-text"==x?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,o.XC)(n),color:"white",borderRadius:"round"==t?"5px":"0px",borderWidth:(0,o.al)(n),borderColor:(0,o.qP)(n)},children:(0,a.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,o.aL)(n),"important"),e.style.setProperty("line-height","120%","important"),e.style.setProperty("font-family",c,"important"))},style:{fontSize:p,fontWeight:"bold"},children:" "+d(h.total_views)+" views"})})})})}):void 0}},7129:function(e,t,n){n.d(t,{V:function(){return i}});const i=(0,n(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},5945:function(e,t,n){function i(e){return"undefined"==typeof e||"undefined"==e||null==e?"":e.replace(/\w\S*/g,(function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}))}n.d(t,{s:function(){return i}})},1855:function(e,t,n){var i=n(7313),o=n(9821),r=n(7129),s=n(6417);t.Z=function(e){var[t,n]=(0,o.Z)();return(0,i.useContext)(r.V),e.event,(0,s.jsx)("div",{style:{margin:"0 auto",width:n,height:t,overflow:"hidden"}})}},4920:function(e,t,n){n.d(t,{Z:function(){return j}});var i=n(7313),o=n(9821),r=(n(3439),n(9723)),s=n(7753),l=n(4892),a=n(7129),d=n(6805),c=n(9854),h=n(1092),p=n(5945),x=n(4136),m=n(6417);var u=function(e){var[t,n]=(0,o.Z)();const{whatmoreUITheme:r}=(0,i.useContext)(x.I),[l]=(0,s.j1)("whatmorePrimaryFont"),[a]=(0,s.j1)("whatmorePrimaryColor"),[d]=(0,s.j1)("whatmoreSecondaryColor"),[h,u]=(0,i.useState)(0),f=(0,s.MO)("whatmoreShopId"),y=e.event,g=y.products.length;if(0==g)return(0,m.jsx)(m.Fragment,{});(0,i.useEffect)((()=>{const e=setInterval((()=>{u((e=>(e+1)%g))}),3e3);return()=>{clearInterval(e)}}),[]);const w=.3*n,v=w+"px",j=w+"px",C=.07*n+"px";return(0,m.jsx)("div",{style:{width:n+"px",height:"fit-content",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0.3)"},children:(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"space-between",alignItems:"center",paddingLeft:"5px",paddingRight:"5px",paddingTop:"5px",paddingBottom:"5px",gap:"5px"},className:"whatmore-event-tile-product-scale-in-and-out-animation",children:[(0,m.jsx)("div",{style:{width:v,height:j,boxShadow:"round"==r?"0px 0px 5px 2px #B0B0B0":null,borderRadius:"round"==r?"5px":"0px",borderWidth:(0,c.al)(f),borderColor:(0,c.qP)(f),overflow:"hidden",backgroundColor:"rgb(220, 220, 220, 1)"},children:(0,m.jsx)("img",{ref:e=>{e&&e.style.setProperty("object-fit",(0,c.yO)(f),"important")},src:y.products[h].thumbnail_image,style:{width:"100%",height:"100%",borderRadius:"round"==r?"5px":"0px"},alt:"product image"})}),(0,m.jsx)("div",{style:{width:n-5-w+"px",height:j,borderRadius:"round"==r?"5px":"0px",overflow:"visible"},children:(0,m.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"fit-content",height:"100%",justifyContent:"center",alignItems:"center"},children:(0,m.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color","white","important"),e.style.setProperty("font-size",C,"important"),e.style.setProperty("line-height","120%","important"),e.style.setProperty("font-family",l,"important"),e.style.setProperty("-webkit-line-clamp",3,"important"),e.style.setProperty("line-clamp",3,"important"),e.style.setProperty("-webkit-box-orient","vertical","important"),e.style.setProperty("display","-webkit-box","important"),e.style.setProperty("overflow","hidden","important"),e.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"normal"},children:(0,p.s)(y.products[h].title)})})})]},h)})},f=n(3933),y=n(8984);function g(e){var t,[n,l]=(0,o.Z)();const[d]=(0,s.j1)("whatmoreShopId"),[h,p,x]=(0,f.YD)({triggerOnce:!0});var g=(0,i.useContext)(a.V);const w=e.event,v=null!==(t=e.unfocusedDisplay)&&void 0!==t&&t,j=.5*l;return(0,m.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"200%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",alignItems:"center",height:"100%",width:"100%"},children:[(0,m.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,m.jsx)("p",{children:" "})}),g.showPlayButton&&!v?(0,m.jsx)("div",{style:{position:"relative",top:"10%",overflow:"hidden",marginLeft:"5px",marginRight:"5px",width:"100%"},children:(0,m.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",alignItems:"center"},children:(0,m.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,m.jsx)(r.Z,{sx:{color:"#F5F5F5 !important",opacity:(0,y.KE)()?0:.8,fontSize:j,filter:"drop-shadow(0 0 15px black);"}})})})}):(0,m.jsx)(m.Fragment,{}),(0,m.jsx)("div",{ref:h,children:p&&(0,c.PW)(d)?(0,m.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,m.jsx)(u,{event:w})}):(0,m.jsx)("div",{height:"20px"})})]})})}function w(e){var[t,n]=(0,o.Z)();const[i]=(0,s.j1)("whatmorePrimaryFont"),r=e.event;return r.title.trim().length?(0,m.jsx)("div",{style:{width:"100%",height:"fit-content",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))"},children:(0,m.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"flex-end",alignContent:"center",width:"100%",height:"100%"},children:(0,m.jsx)("div",{style:{width:"100%",padding:"2px"},children:(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",alignItems:"flex-start",marginLeft:"5px",marginRight:"5px",marginBottom:"2px"},children:[(0,m.jsx)("p",{style:{color:"white",fontSize:.08*n+"px",fontWeight:"normal",textAlign:"left"},children:" "}),(0,m.jsx)("p",{ref:e=>{e&&e.style.setProperty("font-family",i,"important")},style:{color:"white",fontSize:.08*n+"px",fontWeight:"normal",textAlign:"left"},children:r.title.substring(0,60)})]})})})}):(0,m.jsx)(m.Fragment,{})}function v(e){const[t,n,i,r,l]=(0,o.Z)(),[a]=(0,s.j1)("whatmoreShowViews"),c=e.event,p=e.isOnFocus;return(0,m.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between",alignItems:"center"},children:[(0,m.jsx)("div",{style:{width:"100%",backgroundImage:"linear-gradient(to top, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0.3))"},children:(0,m.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"flex-start",alignItems:"center"},children:"show"===a?(0,m.jsx)("div",{style:{width:"100%",marginLeft:"5px",marginRight:"5px",marginTop:"10px"},children:(0,m.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",paddingLeft:"5px",width:"fit-content",height:"fit-content",justifyContent:"space-between",alignItems:"center"},children:(0,m.jsx)(h.Z,{event:c,fontSize:.07*n+"px"})})}):(0,m.jsx)(m.Fragment,{})})}),d.$w===l[d.YP]?(0,m.jsx)(m.Fragment,{}):p?(0,m.jsx)("div",{className:"whatmore-event-tile-component-fade-out-animation",children:(0,m.jsx)(w,{event:c})}):(0,m.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,m.jsx)(w,{event:c})})]})})}var j=function(e){var t,n,r;const[h,p,u,f,y]=(0,o.Z)();var w=(0,i.useContext)(a.V);const{whatmoreUITheme:j}=(0,i.useContext)(x.I),C=(0,s.MO)("whatmoreShopId"),b=e.event,P=e.onClick,I=null===(t=e.isOnFocus)||void 0===t||t,S=null!==(n=e.playOnUnfocus)&&void 0!==n&&n,F=null!==(r=e.animateOnFocus&&(0,c.iW)(C))&&void 0!==r&&r,M=(0,c.nz)(C);return(0,m.jsxs)("div",{ref:e=>{e&&(e.style.setProperty("margin-top",w.tileTopMargin+"px","important"),e.style.setProperty("margin-bottom",w.tileBottomMMargin+"px","important"))},style:{margin:"0 auto",width:p,height:h,borderRadius:"round"==j?"5px":"0px",boxShadow:"round"==j?M:null,borderWidth:(0,c.al)(C),borderColor:(0,c.qP)(C),overflow:"hidden",cursor:"pointer"},className:F?I?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",onClick:()=>{P(b)},children:[(0,m.jsx)(l.Z,{height:"100%",width:"100%",url:b.thumbnail_image,isPlaying:I||S,event:b}),(0,m.jsxs)("div",{style:{width:p,height:h},children:[(0,m.jsx)(v,{event:b,isOnFocus:I}),I||d.$w===y[d.YP]?(0,m.jsx)(g,{event:b,unfocusedDisplay:!I}):null]})]})}},9723:function(e,t,n){var i=n(5318);t.Z=void 0;var o=i(n(5045)),r=n(6417),s=(0,o.default)((0,r.jsx)("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82z"}),"PlayArrowRounded");t.Z=s},237:function(e,t,n){var i=n(5318);t.Z=void 0;var o=i(n(5045)),r=n(6417),s=(0,o.default)((0,r.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");t.Z=s},3439:function(){},5892:function(){},4444:function(){},1811:function(){},6143:function(){},7850:function(){}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[972],{3972:function(e,t,n){n.r(t),n.d(t,{default:function(){return k}});var r=n(7753),i=n(7313),a=n(2860),s=n(499),o=n(4897),c=n(5160),l=n(9854),u=n(6967),d=n(8984),h=n(58),g=n(4669),v=n(941),m=n(4136),p=n(7300),I=n(6524),f=n(7643),T=n(778),S=n(6417);const E=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(210),n.e(926),n.e(950),n.e(303),n.e(891)]).then(n.bind(n,4095)))),x=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(576),n.e(950),n.e(364),n.e(530)]).then(n.bind(n,5523)))),_=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(358)]).then(n.bind(n,3827)))),j=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(607)]).then(n.bind(n,6071)))),y=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(986)]).then(n.bind(n,1291)))),w=i.lazy((()=>Promise.all([n.e(302),n.e(580)]).then(n.bind(n,3580)))),M=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(576),n.e(210),n.e(803),n.e(926),n.e(303),n.e(660),n.e(68)]).then(n.bind(n,1660)))),C=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(210),n.e(926),n.e(950),n.e(959)]).then(n.bind(n,4048)))),O=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(576),n.e(950),n.e(303),n.e(364),n.e(67)]).then(n.bind(n,4362)))),L=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(576),n.e(210),n.e(803),n.e(926),n.e(303),n.e(660),n.e(334)]).then(n.bind(n,4658))));var D=function(e){const[t]=(0,r.j1)("isInDesignMode"),[n]=(0,r.j1)("isDemoBrand"),[D]=(0,r.j1)("whatmoreTopBottomPadding"),[b]=(0,r.j1)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:P}=(0,i.useContext)(m.I),[G]=(0,r.j1)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:W}=(0,i.useContext)(m.I),V=(0,r.MO)("isLandingSharedLink"),k=(0,r.MO)("whatmoreShareTemplateId"),N=(0,r.MO)("whatmoreShareStoryId"),z=(0,r.MO)("whatmoreShareEventId"),[U,Z]=(0,i.useState)(-1),[F,K]=(0,i.useState)(null);var R=e.events,A=null;function B(e){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,d.KE)()&&!r&&(0,h.QV)(),t||n||(async()=>{const t=A[e].events[0];(0,c.wh)(t),(0,g.Tc)(G,a.Xh,a.OW),(0,u.H4)(t.event_id,t.products,"homepage","stories")})();var s=0;null!=i&&A[e].events.map(((e,t)=>{e.event_id==i&&(s=t)})),Z(s),K(e)}function H(e){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,d.KE)()&&!r&&(0,h.QV)(),(0,p.B6)(e)||(0,p.WJ)(e))return t||n||(async()=>{(0,c.wh)(e),(0,g.Tc)(G,a.Xh,a.pR),(0,u.H4)(e.event_id,e.products,"homepage","carousel")})(),void Z(e.index);const i=20;var{status:l,bannerText:v,timeToStartInMins:m}=o.Z.getEventStatus(e);m<=i&&l.name!==s.Z.LIVE.name?console.debug(" TODO : show toast on upcoming live event."):Z(e.index)}function X(e){return(0,S.jsx)(S.Fragment,{})}return P&&!A&&(A=function(e){var t=e.reduce(((e,t,n)=>{var r=t.storyset_id;return r in e?(e[r].total_events=e[r].total_events+1,e[r].events.push(t)):e[r]={id:t.storyset_id,title:t.storyset_name,thumbnail_image:t.storyset_thumbnail_image,total_events:1,start_event_index:n,events:[t]},e}),{}),n=Object.values(t);return n.sort(((e,t)=>e.start_event_index-t.start_event_index)),n}(R)),(0,i.useEffect)((()=>{V&&W==(0,I.zv)(k)&&(null!=N&&P?A.forEach(((e,t)=>{N==e.id&&B(t,!0,z)})):null!=z&&R.forEach(((e,t)=>{z==e.event_id&&H(e,!0)})))}),[]),(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{style:{marginTop:(P?b:D)+"px",marginBottom:(P?b:D)+"px"},children:"template-b"===W?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(E,{events:R,onClick:H,heading:e.heading})}):"template-a-1"===W?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(x,{events:R,onClick:H,heading:e.heading})}):"template-feed-a"===W?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(O,{events:R,onClick:H,heading:e.heading})}):"template-collections-a"===W||"template-c"===W?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(f.u,{userInteractionType:T.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,S.jsx)(_,{events:R,onClick:H,heading:e.heading})})}):"template-collections-b"===W||"template-d"===W?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(f.u,{userInteractionType:T.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,S.jsx)(j,{events:R,onClick:H,heading:e.heading})})}):"template-collections-c"===W||"template-e"===W?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(f.u,{userInteractionType:T.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,S.jsx)(y,{events:R,onClick:H,heading:e.heading})})}):"template-collections-d"===W?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,S.jsx)(E,{events:R,onClick:H,heading:e.heading})})}):"template-collections-e"===W?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,S.jsx)(C,{events:R,onClick:H,heading:e.heading})})}):"template-banner-a"===W?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(f.u,{userInteractionType:T.K.BANNER_WIDGET_VIEW,event:R[0],triggerFlag:!t&&!n,children:(0,S.jsx)(L,{events:R})})}):P?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(f.u,{userInteractionType:T.K.STORIES_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,S.jsx)(w,{eventsStories:A,onClick:B,template:W})})}):(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,S.jsx)(C,{events:R,onClick:H,heading:e.heading})})})}),-1==U?(0,S.jsx)(X,{}):(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(f.u,{userInteractionType:T.K.EVENT_VIEW,event:R[U],productList:R[U].products,cta:R[U].cta,triggerFlag:!t&&!n,children:(0,S.jsx)(M,{events:R,index:U,onBack:function(e){(0,l.n2)(G)&&(0,r.MO)("whatmoreAddedToCart")&&(0,v.D)(G,(()=>{}),100,window.location.hostname),Z(-1)},slideDirection:P||"horizontal"===(0,l.e8)(G)?"horizontal":"vertical",eventsStories:A,initialStoryIndex:F,template:W})})})]})};const b=function(e,t,n){const i=(0,r.MO)("whatmoreShopId");var a=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(a);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 P=n(3388),G=n(7381),W=n(7376);var V=function(e){const[t,n]=(0,i.useState)(),[s,o]=(0,i.useState)(),{whatmoreIsStoriesTemplate:c}=(0,i.useContext)(m.I),{whatmoreIsCollectionsTemplate:g}=(0,i.useContext)(m.I),{whatmoreIsBannerTemplate:v}=(0,i.useContext)(m.I),[p]=(0,r.j1)("whatmoreShopId"),[f]=(0,r.j1)("whatmoreCollectionId"),E=(0,r.MO)("whatmoreLandingLocationType"),x=(0,r.MO)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:_}=(0,i.useContext)(m.I),j=(0,l.cZ)(p)?window.location.href.split(/[?#]/)[0]:f,[y,w]=(0,r.j1)("productRatings");var M=(0,l.ef)(p)?a.Dm+"/v2/events/":a.Gc+"/v2/events/",C=(0,l.ef)(p)?a.Dm+"/get_eventset/":a.Gc+"/get_eventset/",O=(0,l.ef)(p)?a.Dm+"/v2/collection":a.Gc+"/v2/collection",L=(0,l.ef)(p)?a.Dm+"/v2/brand/"+p+"/product-events":a.Gc+"/v2/brand/"+p+"/product-events",V=e.shopId,k="live,upcoming";return(0,i.useEffect)((()=>{(0,u.hb)()}),[]),(0,i.useEffect)((()=>{null==t||0==t.length||s||!(0,d.KE)()||(0,r.MO)("whatmoreVideoPlayerPoolInitiated")||(0,h.b5)(h.UD)}),[t]),(0,i.useEffect)((()=>{var e;if(E.startsWith("product")){var t=(0,r.MO)("whatmoreProductId");t=(0,l.iX)(p)?function(e){return e.split(/[?#]/)[0]}(window.location.href):t,e=L.toString()+"?client_product_id="+t.toString()+"&status="+k.toString()+"&event_type=video"}else if(g)e=O.toString()+"?store_id="+V.toString()+"&client_collection_id="+j;else if(v){const t=I.ls,n=(0,I.H1)(E);e=C.toString()+V.toString()+"?eventset_type="+t+"&source="+n+"&source_id="+p}else e=M.toString()+V.toString()+"?status="+k.toString()+"&is_active="+"true".toString()+(c?"&template_type=stories":"");fetch(e).then((e=>e.json())).then((e=>{if(v){const t=I.ls;return(0,P.OC)(e,t)}return(0,P.kW)(e,g)})).then((e=>(x&&console.debug("initial received events size : "+e.length),c||v?e:(0,P.e8)(e,V)))).then((e=>(null!=e&&0!=e.length&&(0,l.LU)(p)&&function(e,t,n){const i=setInterval((()=>{null===(0,r.MO)("productRatings")&&b(e,t,n)}),1e3);setTimeout((()=>{clearInterval(i)}),1e4)}(p,e,(e=>{w(e)})),e))).then((e=>{null==e||0==e.length||c||(0,l.NO)(V,e),n(e)})).catch((e=>{o(e.message)}))}),[]),(0,i.useEffect)((()=>{"index"===E?t&&(0,W.PB)({userInteractionType:T.K.HOMEPAGE_VISITED,widgetSourceDetails:_}):"collection"===E&&t&&(0,W.PB)({userInteractionType:T.K.COLLECTION_PAGE_VISITED,widgetSourceDetails:_})}),[t]),null==t||0==t.length||s?(0,S.jsx)("div",{}):(x&&(0,G.EI)(t),function(e,t){if(null!=e){var n=0;e.forEach((e=>{e.index=n++}))}}(t),x&&console.debug("final transformed events data : "+JSON.stringify(t)),x&&console.debug("valid events size : "+t.length),(0,S.jsx)("div",{children:(0,S.jsx)(D,{heading:e.heading,events:t})},"whatmore-main-coponent"))};var k=function(e){const[t]=(0,r.j1)("isInDesignMode"),[n]=(0,r.j1)("isDemoBrand"),[s]=(0,r.j1)("whatmoreShopId"),[o]=(0,r.j1)("whatmoreHeading"),[c]=(0,r.j1)("whatmorePrimaryColor"),[l]=(0,r.j1)("whatmoreSecondaryColor");return(0,i.useEffect)((()=>{(0,g.ll)(s)}),[]),(0,S.jsx)(S.Fragment,{children:(0,S.jsx)("div",{children:t||n?(0,S.jsx)("div",{children:(0,S.jsx)(V,{heading:o,shopId:a.aA})}):(0,S.jsx)("div",{children:(0,S.jsx)(V,{heading:o,shopId:s})})})})}},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 r=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,a=e.status,s=e.time_zone;if(a.toUpperCase()==r.Z.LIVE.name)return{status:r.Z.LIVE,bannerText:" "+r.Z.LIVE.name+" ",timeToStartInMins:0};if(a.toUpperCase()==r.Z.UPCOMING.name){var o=new Date(i+" "+t+" "+s),c=(new Date(i+" "+n+" "+s),function(e){var t=new Date,n=(e.getTime()-t.getTime())/1e3,i=n/60,a=i/60,s=a/24;return n<=0?{status:r.Z.COMPLETED,bannerText:" "+r.Z.COMPLETED.name+" ",timeToStartInMins:0}:n>=1&&n<=30?{status:r.Z.UPCOMING,bannerText:"Starts in "+Math.round(n)+" sec ",timeToStartInMins:n/60}:i<60?{status:r.Z.UPCOMING,bannerText:"Starts in "+Math.round(i)+" min ",timeToStartInMins:i}:a<24?{status:r.Z.UPCOMING,bannerText:"Starts in "+Math.round(a)+" hr ",timeToStartInMins:60*a}:s<7?{status:r.Z.UPCOMING,bannerText:" "+["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()]+" ",timeToStartInMins:60*s*24}:{status:r.Z.UPCOMING,bannerText:"Upcoming",timeToStartInMins:2880}}(o));return{status:c.status,bannerText:c.bannerText,timeToStartInMins:c.timeToStartInMins}}return console.error("invalid status for event :: id : "+e.event_id+", status : "+e.status),{status:r.Z.DEFAULT,bannerText:"live event",timeToStartInMins:2880}}}},3388:function(e,t,n){n.d(t,{OC:function(){return o},e8:function(){return a},kT:function(){return r},kW:function(){return s},xg:function(){return i}});const r=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)},a=function(e,t){if(null!=e)return e.filter((e=>1==r(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 r=null!==(n=e.eventsets[t])&&void 0!==n?n:null;return r?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(r):[]}},7376:function(e,t,n){n.d(t,{GF:function(){return i},PB:function(){return o},Z2:function(){return a},y4:function(){return s}});var r=n(795);function i(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:a,productList:s,ctaList:o}=e;(0,r.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:a,productList:s,ctaList:o})}function a(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:a,productList:s,ctaList:o}=e;(0,r.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:a,productList:s,ctaList:o})}function s(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:a,productList:s,ctaList:o}=e;(0,r.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:a,productList:s,ctaList:o})}function o(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:a,productList:s,ctaList:o}=e;(0,r.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:a,productList:s,ctaList:o})}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[972],{3972:function(e,t,n){n.r(t),n.d(t,{default:function(){return k}});var r=n(7753),i=n(7313),a=n(2860),s=n(499),o=n(4897),c=n(5160),l=n(9854),u=n(6967),d=n(8984),h=n(58),g=n(4669),v=n(941),m=n(4136),p=n(7300),I=n(6524),f=n(7643),T=n(778),S=n(6417);const E=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(210),n.e(926),n.e(950),n.e(303),n.e(891)]).then(n.bind(n,4095)))),x=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(576),n.e(950),n.e(364),n.e(530)]).then(n.bind(n,5523)))),_=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(358)]).then(n.bind(n,3827)))),j=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(607)]).then(n.bind(n,6071)))),y=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(986)]).then(n.bind(n,1291)))),w=i.lazy((()=>Promise.all([n.e(302),n.e(580)]).then(n.bind(n,3580)))),M=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(576),n.e(210),n.e(803),n.e(926),n.e(303),n.e(660),n.e(68)]).then(n.bind(n,1660)))),C=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(210),n.e(926),n.e(950),n.e(959)]).then(n.bind(n,4048)))),O=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(576),n.e(950),n.e(303),n.e(364),n.e(67)]).then(n.bind(n,4362)))),L=i.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(576),n.e(210),n.e(803),n.e(926),n.e(303),n.e(660),n.e(334)]).then(n.bind(n,4658))));var D=function(e){const[t]=(0,r.j1)("isInDesignMode"),[n]=(0,r.j1)("isDemoBrand"),[D]=(0,r.j1)("whatmoreTopBottomPadding"),[b]=(0,r.j1)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:P}=(0,i.useContext)(m.I),[G]=(0,r.j1)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:W}=(0,i.useContext)(m.I),V=(0,r.MO)("isLandingSharedLink"),k=(0,r.MO)("whatmoreShareTemplateId"),N=(0,r.MO)("whatmoreShareStoryId"),U=(0,r.MO)("whatmoreShareEventId"),[z,Z]=(0,i.useState)(-1),[F,K]=(0,i.useState)(null);var R=e.events,A=null;function B(e){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,d.KE)()&&!r&&(0,h.QV)(),t||n||(async()=>{const t=A[e].events[0];(0,c.wh)(t),(0,g.Tc)(G,a.Xh,a.OW),(0,u.H4)(t.event_id,t.products,"homepage","stories")})();var s=0;null!=i&&A[e].events.map(((e,t)=>{e.event_id==i&&(s=t)})),Z(s),K(e)}function H(e){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,d.KE)()&&!r&&(0,h.QV)(),(0,p.B6)(e)||(0,p.WJ)(e))return t||n||(async()=>{(0,c.wh)(e),(0,g.Tc)(G,a.Xh,a.pR),(0,u.H4)(e.event_id,e.products,"homepage","carousel")})(),void Z(e.index);const i=20;var{status:l,bannerText:v,timeToStartInMins:m}=o.Z.getEventStatus(e);m<=i&&l.name!==s.Z.LIVE.name?console.debug(" TODO : show toast on upcoming live event."):Z(e.index)}function X(e){return(0,S.jsx)(S.Fragment,{})}return P&&!A&&(A=function(e){var t=e.reduce(((e,t,n)=>{var r=t.storyset_id;return r in e?(e[r].total_events=e[r].total_events+1,e[r].events.push(t)):e[r]={id:t.storyset_id,title:t.storyset_name,thumbnail_image:t.storyset_thumbnail_image,total_events:1,start_event_index:n,events:[t]},e}),{}),n=Object.values(t);return n.sort(((e,t)=>e.start_event_index-t.start_event_index)),n}(R)),(0,i.useEffect)((()=>{V&&W==(0,I.zv)(k)&&(null!=N&&P?A.forEach(((e,t)=>{N==e.id&&B(t,!0,U)})):null!=U&&R.forEach(((e,t)=>{U==e.event_id&&H(e,!0)})))}),[]),(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{style:{marginTop:(P?b:D)+"px",marginBottom:(P?b:D)+"px"},children:"template-b"===W?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(E,{events:R,onClick:H,heading:e.heading})}):"template-a-1"===W?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(x,{events:R,onClick:H,heading:e.heading})}):"template-feed-a"===W?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(O,{events:R,onClick:H,heading:e.heading})}):"template-collections-a"===W||"template-c"===W?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(f.u,{userInteractionType:T.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,S.jsx)(_,{events:R,onClick:H,heading:e.heading})})}):"template-collections-b"===W||"template-d"===W?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(f.u,{userInteractionType:T.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,S.jsx)(j,{events:R,onClick:H,heading:e.heading})})}):"template-collections-c"===W||"template-e"===W?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(f.u,{userInteractionType:T.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,S.jsx)(y,{events:R,onClick:H,heading:e.heading})})}):"template-collections-d"===W?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,S.jsx)(E,{events:R,onClick:H,heading:e.heading})})}):"template-collections-e"===W?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,S.jsx)(C,{events:R,onClick:H,heading:e.heading})})}):"template-banner-a"===W?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(f.u,{userInteractionType:T.K.BANNER_WIDGET_VIEW,event:R[0],triggerFlag:!t&&!n,children:(0,S.jsx)(L,{events:R})})}):P?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(f.u,{userInteractionType:T.K.STORIES_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,S.jsx)(w,{eventsStories:A,onClick:B,template:W})})}):(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,S.jsx)(C,{events:R,onClick:H,heading:e.heading})})})}),-1==z?(0,S.jsx)(X,{}):(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(f.u,{userInteractionType:T.K.EVENT_VIEW,event:R[z],productList:R[z].products,cta:R[z].cta,triggerFlag:!t&&!n,children:(0,S.jsx)(M,{events:R,index:z,onBack:function(e){(0,l.n2)(G)&&(0,r.MO)("whatmoreAddedToCart")&&(0,v.D)(G,(()=>{}),100,window.location.hostname),Z(-1)},slideDirection:P||"horizontal"===(0,l.e8)(G)?"horizontal":"vertical",eventsStories:A,initialStoryIndex:F,template:W})})})]})};const b=function(e,t,n){const i=(0,r.MO)("whatmoreShopId");var a=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(a);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 P=n(3388),G=n(7381),W=n(7376);var V=function(e){const[t,n]=(0,i.useState)(),[s,o]=(0,i.useState)(),{whatmoreIsStoriesTemplate:c}=(0,i.useContext)(m.I),{whatmoreIsCollectionsTemplate:g}=(0,i.useContext)(m.I),{whatmoreIsBannerTemplate:v}=(0,i.useContext)(m.I),[p]=(0,r.j1)("whatmoreShopId"),[f]=(0,r.j1)("whatmoreCollectionId"),E=(0,r.MO)("whatmoreLandingLocationType"),x=(0,r.MO)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:_}=(0,i.useContext)(m.I),{whatmoreCollectionUrl:j}=(0,i.useContext)(m.I),y=(0,l.cZ)(p)?(0,l._u)(p)?j:window.location.href.split(/[?#]/)[0]:f,[w,M]=(0,r.j1)("productRatings");var C=(0,l.ef)(p)?a.Dm+"/v2/events/":a.Gc+"/v2/events/",O=(0,l.ef)(p)?a.Dm+"/get_eventset/":a.Gc+"/get_eventset/",L=(0,l.ef)(p)?a.Dm+"/v2/collection":a.Gc+"/v2/collection",V=(0,l.ef)(p)?a.Dm+"/v2/brand/"+p+"/product-events":a.Gc+"/v2/brand/"+p+"/product-events",k=e.shopId,N="live,upcoming";return(0,i.useEffect)((()=>{(0,u.hb)()}),[]),(0,i.useEffect)((()=>{null==t||0==t.length||s||!(0,d.KE)()||(0,r.MO)("whatmoreVideoPlayerPoolInitiated")||(0,h.b5)(h.UD)}),[t]),(0,i.useEffect)((()=>{var e;if(E.startsWith("product")){var t=(0,r.MO)("whatmoreProductId");t=(0,l.iX)(p)?function(e){return e.split(/[?#]/)[0]}(window.location.href):t,e=V.toString()+"?client_product_id="+t.toString()+"&status="+N.toString()+"&event_type=video"}else if(g||"invalid-url"!==j)e=L.toString()+"?store_id="+k.toString()+"&client_collection_id="+y;else if(v){const t=I.ls,n=(0,I.H1)(E);e=O.toString()+k.toString()+"?eventset_type="+t+"&source="+n+"&source_id="+p}else e=C.toString()+k.toString()+"?status="+N.toString()+"&is_active="+"true".toString()+(c?"&template_type=stories":"");fetch(e).then((e=>e.json())).then((e=>{if(v){const t=I.ls;return(0,P.OC)(e,t)}return(0,P.kW)(e,g||"invalid-url"!==j)})).then((e=>(x&&console.debug("initial received events size : "+e.length),c||v?e:(0,P.e8)(e,k)))).then((e=>(null!=e&&0!=e.length&&(0,l.LU)(p)&&function(e,t,n){const i=setInterval((()=>{null===(0,r.MO)("productRatings")&&b(e,t,n)}),1e3);setTimeout((()=>{clearInterval(i)}),1e4)}(p,e,(e=>{M(e)})),e))).then((e=>{null==e||0==e.length||c||(0,l.NO)(k,e),n(e)})).catch((e=>{o(e.message)}))}),[]),(0,i.useEffect)((()=>{"index"===E?t&&(0,W.PB)({userInteractionType:T.K.HOMEPAGE_VISITED,widgetSourceDetails:_}):"collection"===E&&t&&(0,W.PB)({userInteractionType:T.K.COLLECTION_PAGE_VISITED,widgetSourceDetails:_})}),[t]),null==t||0==t.length||s?(0,S.jsx)("div",{}):(x&&(0,G.EI)(t),function(e,t){if(null!=e){var n=0;e.forEach((e=>{e.index=n++}))}}(t),x&&console.debug("final transformed events data : "+JSON.stringify(t)),x&&console.debug("valid events size : "+t.length),(0,S.jsx)("div",{children:(0,S.jsx)(D,{heading:e.heading,events:t})},"whatmore-main-coponent"))};var k=function(e){const[t]=(0,r.j1)("isInDesignMode"),[n]=(0,r.j1)("isDemoBrand"),[s]=(0,r.j1)("whatmoreShopId"),[o]=(0,r.j1)("whatmoreHeading"),[c]=(0,r.j1)("whatmorePrimaryColor"),[l]=(0,r.j1)("whatmoreSecondaryColor");return(0,i.useEffect)((()=>{(0,g.ll)(s)}),[]),(0,S.jsx)(S.Fragment,{children:(0,S.jsx)("div",{children:t||n?(0,S.jsx)("div",{children:(0,S.jsx)(V,{heading:o,shopId:a.aA})}):(0,S.jsx)("div",{children:(0,S.jsx)(V,{heading:o,shopId:s})})})})}},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 r=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,a=e.status,s=e.time_zone;if(a.toUpperCase()==r.Z.LIVE.name)return{status:r.Z.LIVE,bannerText:" "+r.Z.LIVE.name+" ",timeToStartInMins:0};if(a.toUpperCase()==r.Z.UPCOMING.name){var o=new Date(i+" "+t+" "+s),c=(new Date(i+" "+n+" "+s),function(e){var t=new Date,n=(e.getTime()-t.getTime())/1e3,i=n/60,a=i/60,s=a/24;return n<=0?{status:r.Z.COMPLETED,bannerText:" "+r.Z.COMPLETED.name+" ",timeToStartInMins:0}:n>=1&&n<=30?{status:r.Z.UPCOMING,bannerText:"Starts in "+Math.round(n)+" sec ",timeToStartInMins:n/60}:i<60?{status:r.Z.UPCOMING,bannerText:"Starts in "+Math.round(i)+" min ",timeToStartInMins:i}:a<24?{status:r.Z.UPCOMING,bannerText:"Starts in "+Math.round(a)+" hr ",timeToStartInMins:60*a}:s<7?{status:r.Z.UPCOMING,bannerText:" "+["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()]+" ",timeToStartInMins:60*s*24}:{status:r.Z.UPCOMING,bannerText:"Upcoming",timeToStartInMins:2880}}(o));return{status:c.status,bannerText:c.bannerText,timeToStartInMins:c.timeToStartInMins}}return console.error("invalid status for event :: id : "+e.event_id+", status : "+e.status),{status:r.Z.DEFAULT,bannerText:"live event",timeToStartInMins:2880}}}},3388:function(e,t,n){n.d(t,{OC:function(){return o},e8:function(){return a},kT:function(){return r},kW:function(){return s},xg:function(){return i}});const r=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)},a=function(e,t){if(null!=e)return e.filter((e=>1==r(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 r=null!==(n=e.eventsets[t])&&void 0!==n?n:null;return r?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(r):[]}},7376:function(e,t,n){n.d(t,{GF:function(){return i},PB:function(){return o},Z2:function(){return a},y4:function(){return s}});var r=n(795);function i(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:a,productList:s,ctaList:o}=e;(0,r.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:a,productList:s,ctaList:o})}function a(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:a,productList:s,ctaList:o}=e;(0,r.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:a,productList:s,ctaList:o})}function s(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:a,productList:s,ctaList:o}=e;(0,r.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:a,productList:s,ctaList:o})}function o(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:a,productList:s,ctaList:o}=e;(0,r.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:a,productList:s,ctaList:o})}}}]);
|