whatmore-react-assets 1.0.321 → 1.0.322

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.
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[602],{9262:function(n,t,e){e(7313),e(9821),e(2634),e(6417)},8091:function(n,t,e){e.r(t),e.d(t,{default:function(){return y}});var i=e(7313),o=e(8675),r=(e(9262),e(4664)),a=e(7616),l=(e(6143),e(7244),e(123),e(9302)),s=e(2575),d=e(3271),c=e(8866),h=e(7753),u=e(7129),f=e(9854),x=e(4136),m=e(9821),g=e(3933),p=e(6417);function v(n){var t;const{ref:e,inView:i,entry:o}=(0,g.YD)({triggerOnce:!1}),r=null!==(t=n.defaultHeight)&&void 0!==t?t:"fit-content";return(0,p.jsx)(d.Kq,{ref:e,direction:"row",minHeight:r,height:r,width:"100%",justifyContent:"center",alignItems:"center",children:i?n.data.map(((t,e)=>(0,p.jsx)("div",{children:n.renderElement({eventData:t})},"key"+e))):(0,p.jsx)("div",{style:{minHeight:{rowHeight:r},minWidth:"100%"}})})}function j(n){var t;const[e,i,o]=(0,m.Z)(),r=null!==(t=n.elementsPerRow)&&void 0!==t?t:Math.floor(Math.min(o,n.dataList.length)),a=function(n,t){var e=[];const i=t;for(let o=0;o<n.length;o+=i){const t=n.slice(o,o+i);e.push(t)}return e}(n.dataList,r);return(0,p.jsx)(d.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-start",alignItems:"center",spacing:.2*e,children:a.map(((t,o)=>(0,p.jsx)(v,{renderElement:n.renderElement,data:t,defaultHeight:e,defaultWidth:i},"key-"+o)))})}var w=e(7300),b=e(7148);const C=(0,s.Z)({key:"whatmore-css-hv"});var y=function(n){var t;const[e,s,g]=(0,c.Z)(),[v,y,R]=(0,m.Z)(),[k]=(0,h.j1)("whatmoreShopId"),[F]=(0,h.j1)("whatmorePrimaryColor"),[Z]=(0,h.j1)("whatmoreSecondaryColor"),[M]=(0,h.j1)("whatmoreTitleFont"),S="portrait"==e?(0,h.MO)("whatmoreTitleFontSizePortrait"):(0,h.MO)("whatmoreTitleFontSize"),{whatmoreRootId:O}=(0,i.useContext)(x.I),L=n.events,W=n.onClick,z=null!==(t=(0,f.aR)(k))&&void 0!==t?t:M;function P(n){W(n)}const q=parseInt(Math.floor(R));return delete a.ZP.styles.global,(0,p.jsx)(l.C,{value:C,children:(0,p.jsx)("div",{children:(0,p.jsx)(r.x,{theme:a.ZP,cssVarsRoot:O,resetCSS:!1,children:(0,p.jsxs)(u.V.Provider,{value:{tileTopMargin:3,tileBottomMMargin:3,tileLeftMargin:3,tileRightMargin:3,showPlayButton:!1},children:[n.heading.trim().length>0?(0,p.jsx)(d.M5,{children:(0,p.jsx)(d.xv,{bgColor:F,bgClip:"text",fontSize:S,sx:{fontFamily:z+" !important"},align:"center",children:n.heading})}):(0,p.jsx)(p.Fragment,{}),"landscape"===e?(0,p.jsx)(j,{renderElement:n=>{const t=n.eventData;return(0,p.jsx)("div",{style:{margin:"10px"},children:(0,w.B6)(t)||(0,w.WJ)(t)?(0,p.jsx)(b.Z,{isOnFocus:!0,playOnUnfocus:!1,animateOnFocus:!0,event:t,onClick:()=>{P(t)}}):(0,p.jsx)(o.Z,{isOnFocus:!0,playOnUnfocus:!1,animateOnFocus:!0,event:t,onClick:()=>{P(t)}})})},dataList:L,elementsPerRow:q}):(0,p.jsx)(j,{renderElement:n=>{const t=n.eventData;return(0,p.jsx)("div",{style:{margin:"10px"},children:(0,p.jsx)(b.Z,{isOnFocus:!0,playOnUnfocus:!1,animateOnFocus:!0,event:t,onClick:()=>{P(t)}})})},dataList:L,elementsPerRow:q})]})})})})}},8675:function(n,t,e){e.d(t,{Z:function(){return w}});var i,o,r=e(3271),a=e(5098),l=e(7313),s=e(9821),d=e(2634),c=e(5180),h=e(168),u=e(686);const f=(0,u.F4)(i||(i=(0,h.Z)(["\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(1.05);\n }\n"]))),x=(0,u.F4)(o||(o=(0,h.Z)(["\n 0% {\n transform: scale(1.05);\n }\n 100% {\n transform: scale(1);\n }\n"]))),m="\n ".concat(f,"; \n infinite;\n animation-duration:0.2s; \n animation-direction: linear ;\n animation-timing-function: ease-in;\n animation-fill-mode: forwards;\n"),g="\n ".concat(x,"; \n infinite;\n animation-duration:0.2s; \n animation-direction: linear ;\n animation-timing-function: ease-in;\n animation-fill-mode: forwards;\n");var p=e(7753),v=e(7129),j=e(6417);var w=function(n){var t,e,[i,o]=(0,s.Z)();const[h]=(0,p.j1)("whatmorePrimaryFont");var u=(0,l.useContext)(v.V);const f=n.event,x=n.onClick,w=null===(t=n.isOnFocus)||void 0===t||t,b=(n.playOnUnfocus,null!==(e=n.animateOnFocus)&&void 0!==e&&e);return(0,j.jsxs)(r.xu,{animation:b?w?m:g:"none",marginTop:u.tileTopMargin,marginBottom:u.tileBottomMMargin,marginLeft:u.tileLeftMargin,marginRight:u.tileRightMargin,width:o,height:i,borderRadius:"lg",sx:{boxShadow:"0px 0px 10px 3px #B0B0B0"},overflow:"hidden",onClick:()=>{x(f)},cursor:"pointer",children:[(0,j.jsx)(a.Ee,{width:"full",height:"full",src:f.thumbnail_image,objectFit:"cover",fallback:(0,j.jsx)(c.Z,{width:o,height:i}),borderRadius:"lg"}),(0,j.jsx)(r.xu,{style:{position:"relative",zIndex:1,bottom:"100%",overflow:"hidden"},width:"full",height:"full",borderRadius:"lg",overflow:"hidden",className:"whatmore-ios-css-relative-fix",children:(0,j.jsxs)(r.Kq,{direction:"column",height:"full",width:"full",justifyContent:"space-between",children:[(0,j.jsx)(r.xu,{w:"100%",borderRadius:"lg",bgGradient:"linear(to-t, transparent, blackAlpha.200, blackAlpha.400, blackAlpha.600)",children:(0,j.jsx)(r.Kq,{direction:"column",justifyContent:"flex-start",children:(0,j.jsx)(r.xu,{width:"100%",marginLeft:"5px",marginRight:"5px",marginTop:"10px",children:(0,j.jsx)(r.Kq,{direction:"row",justifyContent:"space-between",children:(0,j.jsx)(d.Z,{event:f,fontSize:.05*i+"px",maxWidth:.8*o})})})})}),(0,j.jsx)(r.xu,{w:"100%",borderRadius:"lg",bgGradient:"linear(to-b, transparent, blackAlpha.300, blackAlpha.400, blackAlpha.500, blackAlpha.600)",children:(0,j.jsx)(r.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",alignContent:"center",children:(0,j.jsx)(r.xu,{width:"full",borderRadius:"lg",children:(0,j.jsxs)(r.Kq,{direction:"column",justifyContent:"space-between",alignContent:"flex-start",marginLeft:"5px",marginRight:"5px",marginBottom:"2px",children:[(0,j.jsx)(r.xv,{color:"white",fontSize:.08*o+"px",fontWeight:"normal",align:"left",children:" "}),(0,j.jsx)(r.xv,{fontSize:.08*o+"px",fontWeight:"normal",align:"left",sx:{fontFamily:h+" !important",color:"white !important"},children:f.title.substring(0,40)}),(0,j.jsx)(r.xv,{fontSize:.08*o+"px",fontWeight:"bold",align:"left",sx:{fontFamily:h+" !important",color:"white !important"},children:f.presenter_name.substring(0,15)})]})})})})]})})]})}},2634:function(n,t,e){var i=e(3271),o=e(4897),r=e(499),a=e(6417);t.Z=function(n){var t,e=n.event,l=n.fontSize,s=null!==(t=n.maxWidth)&&void 0!==t?t:"100%",{status:d,bannerText:c,timeToStartInMins:h}=o.Z.getEventStatus(e);return d.name===r.Z.LIVE.name?(0,a.jsx)(i.xu,{maxWidth:s,width:"fit-content",borderRadius:"md",paddingLeft:"2px",paddingRight:"2px",backgroundColor:"tomato",color:d.color,children:(0,a.jsx)(i.Kq,{direction:"row",justifyContent:"flex-start",width:"fit-content",alignContent:"center",paddingLeft:"2px",paddingRight:"2px",children:(0,a.jsx)(i.xv,{fontSize:l,fontWeight:"bold",color:"white",children:c})})}):(0,a.jsx)(i.xu,{maxWidth:s,borderRadius:"md",paddingLeft:"2px",paddingRight:"2px",backgroundColor:"white",color:d.color,children:(0,a.jsx)(i.Kq,{direction:"row",justifyContent:"flex-start",width:"fit-content",alignContent:"center",children:(0,a.jsx)(i.xv,{fontSize:l,fontWeight:"medium",children:c})})})}},5180:function(n,t,e){var i=e(3271),o=e(208),r=e(6417);t.Z=function(n){var t,e,a;const l=null!==(t=n.height)&&void 0!==t?t:"100%",s=null!==(e=n.width)&&void 0!==e?e:"100%",d=null!==(a=n.borderRadius)&&void 0!==a?a:"lg";return(0,r.jsx)(i.xu,{borderRadius:d,overflow:"hidden",children:(0,r.jsx)(o.Od,{height:l,width:s,speed:.5,startColor:"gray.400",endColor:"white"})})}}}]);
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[602],{8091:function(n,t,e){e.r(t),e.d(t,{default:function(){return y}});var i=e(7313),r=e(8675),o=e(4664),a=e(7616),l=(e(6143),e(7244),e(123),e(9302)),s=e(2575),d=e(3271),c=e(8866),h=e(7753),u=e(7129),x=e(9854),f=e(4136),m=e(9821),g=e(3933),p=e(6417);function v(n){var t;const{ref:e,inView:i,entry:r}=(0,g.YD)({triggerOnce:!1}),o=null!==(t=n.defaultHeight)&&void 0!==t?t:"fit-content";return(0,p.jsx)(d.Kq,{ref:e,direction:"row",minHeight:o,height:o,width:"100%",justifyContent:"center",alignItems:"center",children:i?n.data.map(((t,e)=>(0,p.jsx)("div",{children:n.renderElement({eventData:t})},"key"+e))):(0,p.jsx)("div",{style:{minHeight:{rowHeight:o},minWidth:"100%"}})})}function j(n){var t;const[e,i,r]=(0,m.Z)(),o=null!==(t=n.elementsPerRow)&&void 0!==t?t:Math.floor(Math.min(r,n.dataList.length)),a=function(n,t){var e=[];const i=t;for(let r=0;r<n.length;r+=i){const t=n.slice(r,r+i);e.push(t)}return e}(n.dataList,o);return(0,p.jsx)(d.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-start",alignItems:"center",spacing:.2*e,children:a.map(((t,r)=>(0,p.jsx)(v,{renderElement:n.renderElement,data:t,defaultHeight:e,defaultWidth:i},"key-"+r)))})}var w=e(7300),b=e(4920);const C=(0,s.Z)({key:"whatmore-css-hv"});var y=function(n){var t;const[e,s,g]=(0,c.Z)(),[v,y,R]=(0,m.Z)(),[k]=(0,h.j1)("whatmoreShopId"),[F]=(0,h.j1)("whatmorePrimaryColor"),[Z]=(0,h.j1)("whatmoreSecondaryColor"),[M]=(0,h.j1)("whatmoreTitleFont"),S="portrait"==e?(0,h.MO)("whatmoreTitleFontSizePortrait"):(0,h.MO)("whatmoreTitleFontSize"),{whatmoreRootId:O}=(0,i.useContext)(f.I),L=n.events,W=n.onClick,z=null!==(t=(0,x.aR)(k))&&void 0!==t?t:M;function P(n){W(n)}const q=parseInt(Math.floor(R));return delete a.ZP.styles.global,(0,p.jsx)(l.C,{value:C,children:(0,p.jsx)("div",{children:(0,p.jsx)(o.x,{theme:a.ZP,cssVarsRoot:O,resetCSS:!1,children:(0,p.jsxs)(u.V.Provider,{value:{tileTopMargin:3,tileBottomMMargin:3,tileLeftMargin:3,tileRightMargin:3,showPlayButton:!1},children:[n.heading.trim().length>0?(0,p.jsx)(d.M5,{children:(0,p.jsx)(d.xv,{bgColor:F,bgClip:"text",fontSize:S,sx:{fontFamily:z+" !important"},align:"center",children:n.heading})}):(0,p.jsx)(p.Fragment,{}),"landscape"===e?(0,p.jsx)(j,{renderElement:n=>{const t=n.eventData;return(0,p.jsx)("div",{style:{margin:"10px"},children:(0,w.B6)(t)||(0,w.WJ)(t)?(0,p.jsx)(b.Z,{isOnFocus:!0,playOnUnfocus:!1,animateOnFocus:!0,event:t,onClick:()=>{P(t)}}):(0,p.jsx)(r.Z,{isOnFocus:!0,playOnUnfocus:!1,animateOnFocus:!0,event:t,onClick:()=>{P(t)}})})},dataList:L,elementsPerRow:q}):(0,p.jsx)(j,{renderElement:n=>{const t=n.eventData;return(0,p.jsx)("div",{style:{margin:"10px"},children:(0,p.jsx)(b.Z,{isOnFocus:!0,playOnUnfocus:!1,animateOnFocus:!0,event:t,onClick:()=>{P(t)}})})},dataList:L,elementsPerRow:q})]})})})})}},8675:function(n,t,e){e.d(t,{Z:function(){return w}});var i,r,o=e(3271),a=e(5098),l=e(7313),s=e(9821),d=e(2634),c=e(5180),h=e(168),u=e(686);const x=(0,u.F4)(i||(i=(0,h.Z)(["\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(1.05);\n }\n"]))),f=(0,u.F4)(r||(r=(0,h.Z)(["\n 0% {\n transform: scale(1.05);\n }\n 100% {\n transform: scale(1);\n }\n"]))),m="\n ".concat(x,"; \n infinite;\n animation-duration:0.2s; \n animation-direction: linear ;\n animation-timing-function: ease-in;\n animation-fill-mode: forwards;\n"),g="\n ".concat(f,"; \n infinite;\n animation-duration:0.2s; \n animation-direction: linear ;\n animation-timing-function: ease-in;\n animation-fill-mode: forwards;\n");var p=e(7753),v=e(7129),j=e(6417);var w=function(n){var t,e,[i,r]=(0,s.Z)();const[h]=(0,p.j1)("whatmorePrimaryFont");var u=(0,l.useContext)(v.V);const x=n.event,f=n.onClick,w=null===(t=n.isOnFocus)||void 0===t||t,b=(n.playOnUnfocus,null!==(e=n.animateOnFocus)&&void 0!==e&&e);return(0,j.jsxs)(o.xu,{animation:b?w?m:g:"none",marginTop:u.tileTopMargin,marginBottom:u.tileBottomMMargin,marginLeft:u.tileLeftMargin,marginRight:u.tileRightMargin,width:r,height:i,borderRadius:"lg",sx:{boxShadow:"0px 0px 10px 3px #B0B0B0"},overflow:"hidden",onClick:()=>{f(x)},cursor:"pointer",children:[(0,j.jsx)(a.Ee,{width:"full",height:"full",src:x.thumbnail_image,objectFit:"cover",fallback:(0,j.jsx)(c.Z,{width:r,height:i}),borderRadius:"lg"}),(0,j.jsx)(o.xu,{style:{position:"relative",zIndex:1,bottom:"100%",overflow:"hidden"},width:"full",height:"full",borderRadius:"lg",overflow:"hidden",className:"whatmore-ios-css-relative-fix",children:(0,j.jsxs)(o.Kq,{direction:"column",height:"full",width:"full",justifyContent:"space-between",children:[(0,j.jsx)(o.xu,{w:"100%",borderRadius:"lg",bgGradient:"linear(to-t, transparent, blackAlpha.200, blackAlpha.400, blackAlpha.600)",children:(0,j.jsx)(o.Kq,{direction:"column",justifyContent:"flex-start",children:(0,j.jsx)(o.xu,{width:"100%",marginLeft:"5px",marginRight:"5px",marginTop:"10px",children:(0,j.jsx)(o.Kq,{direction:"row",justifyContent:"space-between",children:(0,j.jsx)(d.Z,{event:x,fontSize:.05*i+"px",maxWidth:.8*r})})})})}),(0,j.jsx)(o.xu,{w:"100%",borderRadius:"lg",bgGradient:"linear(to-b, transparent, blackAlpha.300, blackAlpha.400, blackAlpha.500, blackAlpha.600)",children:(0,j.jsx)(o.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",alignContent:"center",children:(0,j.jsx)(o.xu,{width:"full",borderRadius:"lg",children:(0,j.jsxs)(o.Kq,{direction:"column",justifyContent:"space-between",alignContent:"flex-start",marginLeft:"5px",marginRight:"5px",marginBottom:"2px",children:[(0,j.jsx)(o.xv,{color:"white",fontSize:.08*r+"px",fontWeight:"normal",align:"left",children:" "}),(0,j.jsx)(o.xv,{fontSize:.08*r+"px",fontWeight:"normal",align:"left",sx:{fontFamily:h+" !important",color:"white !important"},children:x.title.substring(0,40)}),(0,j.jsx)(o.xv,{fontSize:.08*r+"px",fontWeight:"bold",align:"left",sx:{fontFamily:h+" !important",color:"white !important"},children:x.presenter_name.substring(0,15)})]})})})})]})})]})}},2634:function(n,t,e){var i=e(3271),r=e(4897),o=e(499),a=e(6417);t.Z=function(n){var t,e=n.event,l=n.fontSize,s=null!==(t=n.maxWidth)&&void 0!==t?t:"100%",{status:d,bannerText:c,timeToStartInMins:h}=r.Z.getEventStatus(e);return d.name===o.Z.LIVE.name?(0,a.jsx)(i.xu,{maxWidth:s,width:"fit-content",borderRadius:"md",paddingLeft:"2px",paddingRight:"2px",backgroundColor:"tomato",color:d.color,children:(0,a.jsx)(i.Kq,{direction:"row",justifyContent:"flex-start",width:"fit-content",alignContent:"center",paddingLeft:"2px",paddingRight:"2px",children:(0,a.jsx)(i.xv,{fontSize:l,fontWeight:"bold",color:"white",children:c})})}):(0,a.jsx)(i.xu,{maxWidth:s,borderRadius:"md",paddingLeft:"2px",paddingRight:"2px",backgroundColor:"white",color:d.color,children:(0,a.jsx)(i.Kq,{direction:"row",justifyContent:"flex-start",width:"fit-content",alignContent:"center",children:(0,a.jsx)(i.xv,{fontSize:l,fontWeight:"medium",children:c})})})}},5180:function(n,t,e){var i=e(3271),r=e(208),o=e(6417);t.Z=function(n){var t,e,a;const l=null!==(t=n.height)&&void 0!==t?t:"100%",s=null!==(e=n.width)&&void 0!==e?e:"100%",d=null!==(a=n.borderRadius)&&void 0!==a?a:"lg";return(0,o.jsx)(i.xu,{borderRadius:d,overflow:"hidden",children:(0,o.jsx)(r.Od,{height:l,width:s,speed:.5,startColor:"gray.400",endColor:"white"})})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[723],{51:function(e,t,n){n.d(t,{Z:function(){return i}});n(7313);var r=n(6417);var i=function(e){return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("span",{className:"whatmore-loading-indicator"})})}},7723:function(e,t,n){n.r(t),n.d(t,{default:function(){return x}});var r=n(7313),i=n(4664),o=n(7616),s=(n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811),n(9302)),a=n(2575),d=n(8866),l=n(7753),u=n(7129),c=n(4136),h=(n(3439),n(4892)),f=n(9854),v=n(3933),p=n(868),w=n(342),g=n(6417);var m=function(e){const[t,n,r]=(0,d.Z)(),i=(0,l.MO)("whatmoreBannerVideoTileSize"),{ref:o,inView:s,entry:a}=(0,v.YD)({triggerOnce:!1}),u=(0,l.MO)("whatmoreShopId"),c=(0,l.MO)("whatmoreUITheme"),m=e.event,y=(0,f.nz)(u),x=(0,p.V)("portrait"===t?(0,w.uv)(m):(0,w.WN)(m)),b="portrait"===t?r*(i/100):r*(i/100*.8),j="portrait"===t?b*(16/9):b*(9/16);return(0,g.jsx)("div",{ref:o,style:{margin:"0 auto",width:b,height:j,padding:"0px",borderRadius:"round"==c?"5px":"0px",boxShadow:"round"==c?y:null,borderWidth:(0,f.al)(u),borderColor:(0,f.qP)(u),overflow:"hidden",cursor:"pointer"},children:(0,g.jsx)(h.Z,{height:"100%",width:"100%",url:x,isPlaying:s,event:m})})};const y=(0,a.Z)({key:"whatmore-css-bv"});var x=function(e){const[t,n,a]=(0,d.Z)(),{whatmoreRootId:h}=((0,l.MO)("whatmorePrimaryColor"),(0,l.MO)("whatmoreShopId"),(0,l.MO)("whatmoreSecondaryColor"),(0,l.MO)("whatmoreTitleFont"),(0,r.useContext)(c.I)),f=e.events;return delete o.ZP.styles.global,(0,g.jsx)(s.C,{value:y,children:(0,g.jsx)("div",{children:(0,g.jsx)(i.x,{theme:o.ZP,cssVarsRoot:h,resetCSS:!1,children:(0,g.jsx)(u.V.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:(0,g.jsx)(m,{event:f[0]})})})})})}},7129:function(e,t,n){n.d(t,{V:function(){return r}});const r=(0,n(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},3175:function(e,t,n){var r=n(208),i=n(51),o=n(6417);t.Z=function(e){var t,n;const s=null!==(t=e.height)&&void 0!==t?t:"100%",a=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,o.jsxs)("div",{style:{width:a,height:s,overflow:"hidden"},children:[(0,o.jsx)(r.Od,{height:"100%",width:"100%",speed:0,startColor:"#202020",endColor:"#606060"}),(0,o.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignContent:"center",width:"100%",height:"100%",position:"relative",zIndex:1,bottom:"100%",className:"whatmore-ios-css-relative-fix"},children:(0,o.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",width:"100%",height:"fit-content"},children:(0,o.jsx)(i.Z,{})})})]})}},2887:function(e,t,n){var r=n(7313),i=(n(6422),n(3175)),o=n(6417);t.Z=function(e){var t,n,s;const[a,d]=(0,r.useState)(!1),l=r.useRef(0),u=(0,r.useRef)(null),c=null!==(t=e.timeUpdateCallback)&&void 0!==t?t:()=>{},h=null!==(n=e.height)&&void 0!==n?n:"100%",f=null!==(s=e.width)&&void 0!==s?s:"100%";return(0,r.useEffect)((()=>{l.current=0;const e=setInterval((()=>{l.current=l.current+.03,u.current&&c(l.current,5),l.current>=5&&(l.current=0)}),30);return()=>{clearInterval(e)}}),[e.isPlaying]),(0,o.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:f,height:h,overflow:"hidden"},children:[(0,o.jsx)("div",{style:{width:a?"100%":"0px",height:a?"100%":"0px"},children:(0,o.jsx)("img",{ref:u,src:e.url,style:{objectFit:"cover",height:h,width:f,backgroundColor:"white"},alt:"image player",onLoad:()=>{d(!0)}})}),a?(0,o.jsx)(o.Fragment,{}):(0,o.jsx)(i.Z,{width:"100%",height:"100%"})]})}},4892:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(7313),i=n(3933),o=n(868),s=n(8984),a=n(7300),d=(n(6422),n(2887)),l=n(6417);var u=function(e){var t,n;const o=(0,r.useRef)(null),[s,a,d]=(0,i.YD)({triggerOnce:!0}),u=null!==(t=e.height)&&void 0!==t?t:"100%",c=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,r.useEffect)((()=>{o.current&&(e.isPlaying?o.current.play():o.current.pause())}),[e.isPlaying,a]),(0,l.jsx)("div",{ref:s,style:{width:u,height:c,overflow:"hidden"},children:a?(0,l.jsx)("video",{ref:o,className:"whatmore-video-player",width:c,height:u,preload:"auto",loop:!0,playsInline:!0,muted:!0,autoPlay:!0,src:e.url,style:{backgroundColor:"white"}}):(0,l.jsx)("div",{width:c,height:u,ref:e=>{e&&e.style.setProperty("display","block","important")}})})};var c=function(e){var t,n,c;const[h,f,v]=(0,i.YD)({triggerOnce:!0});if((0,a.WJ)(e.event))return(0,l.jsx)(d.Z,{height:e.height,width:e.width,url:e.url,isPlaying:e.isPlaying,timeUpdateCallback:e.timeUpdateCallback});const p=null!==(t=e.pauseFromPlayTimeInMs)&&void 0!==t?t:200;if((0,s.KE)())return(0,l.jsx)(u,{height:"100%",width:"100%",url:(0,o.V)(e.url),isPlaying:e.isPlaying,pauseFromPlayTimeInMs:p});const w=(0,r.useRef)(null),g=null!==(n=e.height)&&void 0!==n?n:"100%",m=null!==(c=e.width)&&void 0!==c?c:"100%";return(0,r.useEffect)((()=>{w.current&&(e.isPlaying?w.current.play():w.current.pause())}),[e.isPlaying,f]),(0,l.jsx)("div",{ref:h,style:{width:g,height:m,overflow:"hidden"},children:f?(0,l.jsx)("video",{ref:w,className:"whatmore-video-player",width:m,height:g,preload:"auto",loop:!0,playsInline:!0,muted:!0,src:(0,o.V)(e.url),style:{backgroundColor:"white"}}):(0,l.jsx)("div",{width:m,height:g,ref:e=>{e&&e.style.setProperty("display","block","important")}})})}},868:function(e,t,n){n.d(t,{V:function(){return a}});var r=n(9854),i=n(7753);const o={"https://d3syezql093hs1.cloudfront.net":"https://whatmore-brand-video-assets.azureedge.net","https://d2r0bijhs9mx1s.cloudfront.net":"https://whatmore-brand-thumbnail-video-assets.azureedge.net","https://d2oouab8j9eigo.cloudfront.net":"https://whatmore-brand-story-assets.azureedge.net","https://d28nus7q7qajdn.cloudfront.net":"https://whatmore-video-assets.azureedge.net","https://d1zl4k1t5o4s75.cloudfront.net":"https://whatmore-brand-video-assets-720p.azureedge.net"},s={"https://d3syezql093hs1.cloudfront.net":"https://whatmore-brand-video-assets.b-cdn.net","https://d2r0bijhs9mx1s.cloudfront.net":"https://whatmore-brand-thumbnail-video-assets.b-cdn.net","https://d2oouab8j9eigo.cloudfront.net":"https://whatmore-brand-story-assets.b-cdn.net","https://d28nus7q7qajdn.cloudfront.net":"https://whatmore-video-assets-old.b-cdn.net","https://d1zl4k1t5o4s75.cloudfront.net":"https://whatmore-brand-video-assets-720p.b-cdn.net"},a=function(e){const t=(0,i.MO)("whatmoreShopId");if(e.startsWith("https://cdn.shopify.com"))return e;if("AWSCDN"==(0,r.zp)(t))return e;if("AZURECDN"==(0,r.zp)(t)){if(e.includes(".azureedge.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(o))if(e.includes(t))return e.replace(t,o[t]);return e}}if("BUNNYCDN"==(0,r.zp)(t)){if(e.includes(".b-cdn.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(s))if(e.includes(t))return e.replace(t,s[t]);return e}}return e}},342:function(e,t,n){n.d(t,{WN:function(){return i},uv:function(){return r}});const r=function(e){return"event_media_urls"in e?"secondary"in e.event_media_urls?e.event_media_urls.secondary.portrait[720]:e.event_media_urls.primary.portrait[720]:e.event_hls_url},i=function(e){return"event_media_urls"in e?"secondary"in e.event_media_urls?e.event_media_urls.secondary.landscape[720]:e.event_media_urls.primary.landscape[720]:e.event_hls_url}},6422:function(e,t,n){var r=n(7313),i=n(7753);t.Z=function(e){const[t,n]=(0,i.j1)("muted");return(0,r.useEffect)((()=>{}),[]),[t,n]}},8866:function(e,t,n){var r=n(7313);function i(){return[window.innerHeight,window.innerWidth]}t.Z=function(e){var[t,n]=i();const[o,s]=(0,r.useState)(["portrait",t,n]);return(0,r.useLayoutEffect)((()=>{function e(){var[e,t]=i();s(e>t?["portrait",e,t]:["landscape",e,t])}return window.addEventListener("resize",e),window.addEventListener("orientationchange",e),screen.orientation&&screen.orientation.addEventListener("change",e),e(),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e),screen.orientation&&screen.orientation.removeEventListener("change",e)}}),[]),o}},3439:function(){},123:function(){},7244:function(){},5892:function(){},4444:function(){},1811:function(){},6143:function(){},7850:function(){}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[850],{4048:function(e,t,n){n.r(t);var i=n(7313),s=n(4664),r=n(7616),o=(n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811),n(9302)),l=n(2575),a=n(2210),c=n(8486),d=n(9821),h=n(8866),u=n(2279),x=n.n(u),v=n(7753),f=n(7129),m=n(1855),p=n(9854),j=n(4136),g=n(7148),w=n(6417);const y=(0,l.Z)({key:"whatmore-css-hv"});function C(e){const[t,n,i]=(0,d.Z)(),s=(0,v.MO)("whatmoreShopId"),r=e.events,o=e.onClick;return(0,w.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,w.jsx)("div",{style:{width:window.innerWidth,height:"fit-content"},children:(0,w.jsx)(a.tq,{slidesPerView:i*(0,p.u6)(s),initialSlide:r.length>1?1:0,centeredSlides:!0,centeredSlidesBounds:!0,watchSlidesProgress:!0,touchRatio:.5,children:r.map((e=>(0,w.jsx)(a.o5,{children:t=>{let{isActive:n,isPrev:i,isNext:s,isVisible:r}=t;return i||s||n?(0,w.jsx)(g.Z,{isOnFocus:n&&r,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{o(e)}}):(0,w.jsx)(m.Z,{})}},"whatmore-event-tile-portrait-"+e.index)))})})})}function P(e){const[t,n,s,r]=(0,d.Z)(),[o,l]=(0,i.useState)((h=s,Math.floor(Math.random()*Math.floor(h))));var h;const u=e.onClick,v=e.events,f=Math.min(s,v.length);return(0,w.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:r+"px",paddingRight:r+"px"},children:(0,w.jsx)("div",{style:{width:n*f*1.1+"px"},children:(0,w.jsx)(a.tq,{slidesPerView:f,watchSlidesProgress:!0,modules:[c.W_],navigation:!0,slidesPerGroup:parseInt(f),children:v.map(((e,t)=>{const n=x()((()=>l(t)),300);return(0,w.jsx)(a.o5,{onMouseEnter:()=>{n()},onMouseLeave:()=>{n.cancel()},children:n=>{let{isActive:i,isPrev:s,isNext:r,isVisible:l}=n;return l?(0,w.jsx)(g.Z,{isOnFocus:t==o,playOnUnfocus:!0,animateOnFocus:!0,event:e,onClick:()=>{u(e)}}):(0,w.jsx)(m.Z,{})}},"whatmore-event-tile-landscape-"+e.index)}))})})})}t.default=function(e){var t;const[n,l,a]=(0,h.Z)(),[c]=(0,v.j1)("whatmoreShopId"),[d]=(0,v.j1)("whatmorePrimaryColor"),[u]=(0,v.j1)("whatmoreSecondaryColor"),[x]=(0,v.j1)("whatmoreTitleFont"),m="portrait"==n?(0,v.MO)("whatmoreTitleFontSizePortrait"):(0,v.MO)("whatmoreTitleFontSize"),{whatmoreRootId:g}=(0,i.useContext)(j.I),M=e.events,k=e.onClick,S=null!==(t=(0,p.aR)(c))&&void 0!==t?t:x;function Z(e){k(e)}return delete r.ZP.styles.global,(0,w.jsx)(o.C,{value:y,children:(0,w.jsx)("div",{children:(0,w.jsx)(s.x,{theme:r.ZP,cssVarsRoot:g,resetCSS:!1,children:(0,w.jsxs)(f.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[e.heading.trim().length>0?(0,w.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,w.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-family",S,"important"),e.style.setProperty("font-size",m+"px","important"))},style:{color:d,backgroundClip:"text",textAlign:"center"},children:e.heading})}):(0,w.jsx)(w.Fragment,{}),"landscape"===n?(0,w.jsx)(P,{events:M,onClick:Z}):(0,w.jsx)(C,{events:M,onClick:Z})]})})})})}},1855:function(e,t,n){var i=n(7313),s=n(9821),r=n(7129),o=n(6417);t.Z=function(e){var[t,n]=(0,s.Z)();return(0,i.useContext)(r.V),e.event,(0,o.jsx)("div",{style:{margin:"0 auto",width:n,height:t,overflow:"hidden"}})}},5892:function(){},4444:function(){},1811:function(){},7850:function(){}}]);
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[850],{4048:function(e,t,n){n.r(t);var i=n(7313),s=n(4664),r=n(7616),o=(n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811),n(9302)),l=n(2575),a=n(2210),c=n(8486),d=n(9821),h=n(8866),u=n(2279),x=n.n(u),v=n(7753),f=n(7129),m=n(1855),p=n(9854),j=n(4136),g=n(4920),w=n(6417);const y=(0,l.Z)({key:"whatmore-css-hv"});function C(e){const[t,n,i]=(0,d.Z)(),s=(0,v.MO)("whatmoreShopId"),r=e.events,o=e.onClick;return(0,w.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,w.jsx)("div",{style:{width:window.innerWidth,height:"fit-content"},children:(0,w.jsx)(a.tq,{slidesPerView:i*(0,p.u6)(s),initialSlide:r.length>1?1:0,centeredSlides:!0,centeredSlidesBounds:!0,watchSlidesProgress:!0,touchRatio:.5,children:r.map((e=>(0,w.jsx)(a.o5,{children:t=>{let{isActive:n,isPrev:i,isNext:s,isVisible:r}=t;return i||s||n?(0,w.jsx)(g.Z,{isOnFocus:n&&r,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{o(e)}}):(0,w.jsx)(m.Z,{})}},"whatmore-event-tile-portrait-"+e.index)))})})})}function P(e){const[t,n,s,r]=(0,d.Z)(),[o,l]=(0,i.useState)((h=s,Math.floor(Math.random()*Math.floor(h))));var h;const u=e.onClick,v=e.events,f=Math.min(s,v.length);return(0,w.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:r+"px",paddingRight:r+"px"},children:(0,w.jsx)("div",{style:{width:n*f*1.1+"px"},children:(0,w.jsx)(a.tq,{slidesPerView:f,watchSlidesProgress:!0,modules:[c.W_],navigation:!0,slidesPerGroup:parseInt(f),children:v.map(((e,t)=>{const n=x()((()=>l(t)),300);return(0,w.jsx)(a.o5,{onMouseEnter:()=>{n()},onMouseLeave:()=>{n.cancel()},children:n=>{let{isActive:i,isPrev:s,isNext:r,isVisible:l}=n;return l?(0,w.jsx)(g.Z,{isOnFocus:t==o,playOnUnfocus:!0,animateOnFocus:!0,event:e,onClick:()=>{u(e)}}):(0,w.jsx)(m.Z,{})}},"whatmore-event-tile-landscape-"+e.index)}))})})})}t.default=function(e){var t;const[n,l,a]=(0,h.Z)(),[c]=(0,v.j1)("whatmoreShopId"),[d]=(0,v.j1)("whatmorePrimaryColor"),[u]=(0,v.j1)("whatmoreSecondaryColor"),[x]=(0,v.j1)("whatmoreTitleFont"),m="portrait"==n?(0,v.MO)("whatmoreTitleFontSizePortrait"):(0,v.MO)("whatmoreTitleFontSize"),{whatmoreRootId:g}=(0,i.useContext)(j.I),M=e.events,k=e.onClick,S=null!==(t=(0,p.aR)(c))&&void 0!==t?t:x;function Z(e){k(e)}return delete r.ZP.styles.global,(0,w.jsx)(o.C,{value:y,children:(0,w.jsx)("div",{children:(0,w.jsx)(s.x,{theme:r.ZP,cssVarsRoot:g,resetCSS:!1,children:(0,w.jsxs)(f.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[e.heading.trim().length>0?(0,w.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,w.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-family",S,"important"),e.style.setProperty("font-size",m+"px","important"))},style:{color:d,backgroundClip:"text",textAlign:"center"},children:e.heading})}):(0,w.jsx)(w.Fragment,{}),"landscape"===n?(0,w.jsx)(P,{events:M,onClick:Z}):(0,w.jsx)(C,{events:M,onClick:Z})]})})})})}},1855:function(e,t,n){var i=n(7313),s=n(9821),r=n(7129),o=n(6417);t.Z=function(e){var[t,n]=(0,s.Z)();return(0,i.useContext)(r.V),e.event,(0,o.jsx)("div",{style:{margin:"0 auto",width:n,height:t,overflow:"hidden"}})}},5892:function(){},4444:function(){},1811:function(){},7850:function(){}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[972],{7381:function(e,t,n){function o(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"200";const o=null!==(t=localStorage.getItem("whatmoreActivateLogs"))&&void 0!==t&&t;o&&(console.debug("###=======Whatmore Log start.======####"),console.debug("Fetched Events from Whatmore"),console.debug("response status code : "+n.status),console.debug("total events received : "+(e&&e.length)),o&&console.debug("events data : "+JSON.stringify(e)),console.debug("###=======Whatmore Log end.======####"))}n.d(t,{E:function(){return o}})},3972:function(e,t,n){n.r(t),n.d(t,{default:function(){return L}});var o=n(7753),r=n(7313),i=n(2860),a=n(499),s=n(4897),c=n(5160),d=n(9854),u=n(6967),l=n(8984),h=n(58),p=n(4669),v=n(941),m=n(4136),g=n(7300),f=n(6524),b=n(6417);const y=r.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(367),n.e(240),n.e(853),n.e(926),n.e(282),n.e(95)]).then(n.bind(n,4095)))),S=r.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(367),n.e(240),n.e(576),n.e(516),n.e(517)]).then(n.bind(n,5523)))),_=r.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(367),n.e(926),n.e(642),n.e(136)]).then(n.bind(n,3827)))),T=r.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(367),n.e(926),n.e(642),n.e(92)]).then(n.bind(n,6071)))),w=r.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(367),n.e(926),n.e(642),n.e(245)]).then(n.bind(n,1291)))),j=r.lazy((()=>Promise.all([n.e(302),n.e(580)]).then(n.bind(n,3580)))),x=r.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(240),n.e(576),n.e(853),n.e(843),n.e(926),n.e(310),n.e(282),n.e(166)]).then(n.bind(n,1862)))),I=r.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(367),n.e(240),n.e(853),n.e(926),n.e(516),n.e(850)]).then(n.bind(n,4048)))),C=r.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(367),n.e(240),n.e(576),n.e(516),n.e(602)]).then(n.bind(n,8091)))),E=r.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(926),n.e(723)]).then(n.bind(n,7723))));var O=function(e){const[t]=(0,o.j1)("isInDesignMode"),[n]=(0,o.j1)("isDemoBrand"),[O]=(0,o.j1)("whatmoreTopBottomPadding"),[P]=(0,o.j1)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:M}=(0,r.useContext)(m.I),[k]=(0,o.j1)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:D}=(0,r.useContext)(m.I),L=(0,o.MO)("isLandingSharedLink"),N=(0,o.MO)("whatmoreShareTemplateId"),A=(0,o.MO)("whatmoreShareStoryId"),G=(0,o.MO)("whatmoreShareEventId"),[J,Z]=(0,r.useState)(-1),[z,H]=(0,r.useState)(null);var U=e.events,B=null;function R(e){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,l.KE)()&&!o&&(0,h.QV)(),t||n||(async()=>{const t=B[e].events[0];(0,c.wh)(t),(0,p.Tc)(k,i.Xh,i.OW),(0,u.H4)(t.event_id,t.products,"homepage","stories")})();var a=0;null!=r&&B[e].events.map(((e,t)=>{e.event_id==r&&(a=t)})),Z(a),H(e)}function V(e){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,l.KE)()&&!o&&(0,h.QV)(),(0,g.B6)(e)||(0,g.WJ)(e))return t||n||(async()=>{(0,c.wh)(e),(0,p.Tc)(k,i.Xh,i.pR),(0,u.H4)(e.event_id,e.products,"homepage","carousel")})(),void Z(e.index);const r=20;var{status:d,bannerText:v,timeToStartInMins:m}=s.Z.getEventStatus(e);m<=r&&d.name!==a.Z.LIVE.name?console.debug(" TODO : show toast on upcoming live event."):Z(e.index)}function W(e){return(0,b.jsx)(b.Fragment,{})}return M&&!B&&(B=function(e){var t=e.reduce(((e,t,n)=>{var o=t.storyset_id;return o in e?(e[o].total_events=e[o].total_events+1,e[o].events.push(t)):e[o]={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}(U)),(0,r.useEffect)((()=>{L&&D==(0,f.zv)(N)&&(null!=A&&M?B.forEach(((e,t)=>{A==e.id&&R(t,!0,G)})):null!=G&&U.forEach(((e,t)=>{G==e.event_id&&V(e,!0)})))}),[]),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:{marginTop:(M?P:O)+"px",marginBottom:(M?P:O)+"px"},children:"template-b"===D?(0,b.jsx)(r.Suspense,{children:(0,b.jsx)(y,{events:U,onClick:V,heading:e.heading})}):"template-a-1"===D?(0,b.jsx)(r.Suspense,{children:(0,b.jsx)(S,{events:U,onClick:V,heading:e.heading})}):"template-feed-a"===D?(0,b.jsx)(r.Suspense,{children:(0,b.jsx)(C,{events:U,onClick:V,heading:e.heading})}):"template-collections-a"===D||"template-c"===D?(0,b.jsx)(r.Suspense,{children:(0,b.jsx)(_,{events:U,onClick:V,heading:e.heading})}):"template-collections-b"===D||"template-d"===D?(0,b.jsx)(r.Suspense,{children:(0,b.jsx)(T,{events:U,onClick:V,heading:e.heading})}):"template-collections-c"===D||"template-e"===D?(0,b.jsx)(r.Suspense,{children:(0,b.jsx)(w,{events:U,onClick:V,heading:e.heading})}):"template-collections-d"===D?(0,b.jsx)(r.Suspense,{children:(0,b.jsx)(y,{events:U,onClick:V,heading:e.heading})}):"template-collections-e"===D?(0,b.jsx)(r.Suspense,{children:(0,b.jsx)(I,{events:U,onClick:V,heading:e.heading})}):"template-banner-a"===D?(0,b.jsx)(r.Suspense,{children:(0,b.jsx)(E,{events:U})}):M?(0,b.jsx)(r.Suspense,{children:(0,b.jsx)(j,{eventsStories:B,onClick:R,template:D})}):(0,b.jsx)(r.Suspense,{children:(0,b.jsx)(I,{events:U,onClick:V,heading:e.heading})})}),-1==J?(0,b.jsx)(W,{}):(0,b.jsx)(r.Suspense,{children:(0,b.jsx)(x,{events:U,index:J,onBack:function(e){(0,d.n2)(k)&&(0,o.MO)("whatmoreAddedToCart")&&(0,v.D)(k,(()=>{}),100,window.location.hostname),Z(-1)},slideDirection:M||"horizontal"===(0,d.e8)(k)?"horizontal":"vertical",eventsStories:B,initialStoryIndex:z,template:D})})]})};const P=function(e,t,n){const r=(0,o.MO)("whatmoreShopId");var i=t.reduce(((e,t,n)=>(t.products.map((e=>e.client_product_id)).forEach((t=>{t in e||(e[t]=!0)})),e)),{}),a=Object.keys(i);if("60960964855"==r&&"undefined"!=typeof fera&&"function"===typeof fera.getRatings){var s={};fera.getRatings(a,(e=>{new Promise(((t,n)=>{e.forEach((e=>{s[e.external_product_id]={avgRating:e.average,totalRatings:e.count}})),t(s)})).then((e=>n(e)))}))}if("23114481744"==r){const e="1e6MQXxzYR19mpw9Km6Dcm86";s={};fetch("https://api.juniphq.com/v1/products?filter[remote_ids]="+a.toString(),{headers:{"Junip-Store-Key":e}}).then((e=>e.json())).then((e=>(e.products.forEach((e=>{s[e.remote_id]={avgRating:parseFloat(e.rating_average).toFixed(1),totalRatings:e.rating_count}})),s))).then((e=>n(e))).catch((e=>console.error(e)))}};var M=n(3388),k=n(7381);var D=function(e){const[t,n]=(0,r.useState)(),[a,s]=(0,r.useState)(),{whatmoreIsStoriesTemplate:c}=(0,r.useContext)(m.I),{whatmoreIsCollectionsTemplate:p}=(0,r.useContext)(m.I),{whatmoreIsBannerTemplate:v}=(0,r.useContext)(m.I),[g]=(0,o.j1)("whatmoreShopId"),[y]=(0,o.j1)("whatmoreCollectionId"),S=(0,o.MO)("whatmoreLandingLocationType"),_=(0,o.MO)("whatmoreLoggingActive"),T=(0,d.cZ)(g)?window.location.href.split(/[?#]/)[0]:y,[w,j]=(0,o.j1)("productRatings");var x=(0,d.ef)(g)?i.Dm+"/v1/events/":i.Gc+"/v1/events/",I=(0,d.ef)(g)?i.Dm+"/get_eventset/":i.Gc+"/get_eventset/",C=(0,d.ef)(g)?i.Dm+"/collection/":i.Gc+"/collection/",E=(0,d.ef)(g)?i.Dm+"/v1/brand/"+g+"/product-events":i.Gc+"/v1/brand/"+g+"/product-events",D=e.shopId,L="live,upcoming";return(0,r.useEffect)((()=>{(0,u.hb)()}),[]),(0,r.useEffect)((()=>{null==t||0==t.length||a||!(0,l.KE)()||(0,o.MO)("whatmoreVideoPlayerPoolInitiated")||(0,h.b5)(h.UD)}),[t]),(0,r.useEffect)((()=>{var e;if(S.startsWith("product")){const t=(0,o.MO)("whatmoreProductId");e=E.toString()+"?client_product_id="+t.toString()+"&status="+L.toString()+"&event_type=video"}else if(p)e=C.toString()+"?store_id="+D.toString()+"&client_collection_id="+T;else if(v){const t=f.ls,n=(0,f.H1)(S);e=I.toString()+D.toString()+"?eventset_type="+t+"&source="+n+"&source_id="+g}else e=x.toString()+D.toString()+"?status="+L.toString()+"&is_active="+"true".toString()+(c?"&template_type=stories":"");fetch(e).then((e=>e.json())).then((e=>{if(v){const t=f.ls;return(0,M.OC)(e,t)}return(0,M.kW)(e,p)})).then((e=>(_&&console.debug("initial received events size : "+e.length),c||v?e:(0,M.e8)(e,D)))).then((e=>(null!=e&&0!=e.length&&(0,d.LU)(g)&&function(e,t,n){const r=setInterval((()=>{null===(0,o.MO)("productRatings")&&P(e,t,n)}),1e3);setTimeout((()=>{clearInterval(r)}),1e4)}(g,e,(e=>{j(e)})),e))).then((e=>{null==e||0==e.length||c||(0,d.NO)(D,e),n(e)})).catch((e=>{s(e.message)}))}),[]),null==t||0==t.length||a?(0,b.jsx)("div",{}):(_&&(0,k.E)(t),function(e,t){if(null!=e){var n=0;e.forEach((e=>{e.index=n++}))}}(t),_&&console.debug("final transformed events data : "+JSON.stringify(t)),_&&console.debug("valid events size : "+t.length),(0,b.jsx)("div",{children:(0,b.jsx)(O,{heading:e.heading,events:t})},"whatmore-main-coponent"))};var L=function(e){const[t]=(0,o.j1)("isInDesignMode"),[n]=(0,o.j1)("isDemoBrand"),[a]=(0,o.j1)("whatmoreShopId"),[s]=(0,o.j1)("whatmoreHeading"),[c]=(0,o.j1)("whatmorePrimaryColor"),[d]=(0,o.j1)("whatmoreSecondaryColor");return(0,r.useEffect)((()=>{(0,p.ll)(a)}),[]),(0,b.jsx)(b.Fragment,{children:(0,b.jsx)("div",{children:t||n?(0,b.jsx)("div",{children:(0,b.jsx)(D,{heading:s,shopId:i.aA})}):(0,b.jsx)("div",{children:(0,b.jsx)(D,{heading:s,shopId:a})})})})}},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 o=n(499);t.Z=class{static getEventStatus(e){e.time_zone="GMT+5:30";var t=e.start_time+":00",n=e.end_time,r=e.scheduled_date,i=e.status,a=e.time_zone;if(i.toUpperCase()==o.Z.LIVE.name)return{status:o.Z.LIVE,bannerText:" "+o.Z.LIVE.name+" ",timeToStartInMins:0};if(i.toUpperCase()==o.Z.UPCOMING.name){var s=new Date(r+" "+t+" "+a),c=(new Date(r+" "+n+" "+a),function(e){var t=new Date,n=(e.getTime()-t.getTime())/1e3,r=n/60,i=r/60,a=i/24;return n<=0?{status:o.Z.COMPLETED,bannerText:" "+o.Z.COMPLETED.name+" ",timeToStartInMins:0}:n>=1&&n<=30?{status:o.Z.UPCOMING,bannerText:"Starts in "+Math.round(n)+" sec ",timeToStartInMins:n/60}:r<60?{status:o.Z.UPCOMING,bannerText:"Starts in "+Math.round(r)+" min ",timeToStartInMins:r}:i<24?{status:o.Z.UPCOMING,bannerText:"Starts in "+Math.round(i)+" hr ",timeToStartInMins:60*i}:a<7?{status:o.Z.UPCOMING,bannerText:" "+["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()]+" ",timeToStartInMins:60*a*24}:{status:o.Z.UPCOMING,bannerText:"Upcoming",timeToStartInMins:2880}}(s));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:o.Z.DEFAULT,bannerText:"live event",timeToStartInMins:2880}}}},941:function(e,t,n){n.d(t,{D:function(){return o}});const o=async function(e,t,n,o){if("STRNV8MHJTF"!=e&&"STR6HU283UZ"!=e&&"STR9T3LLEJB"!=e&&"STRWJMIOJNX"!=e&&"STRUDQ36YAC"!=e&&"STR1D5ONOZX"!=e){var r=await fetch("https://"+window.location.hostname+"/cart.js",{cache:"reload"}).then((e=>e.json()));if("27358003275"==e||"63748341981"==e||"68237558034"==e)document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0,detail:{cart:r,openMiniCart:!0}}));else if("19506115"==e)window.PXUTheme.jsAjaxCart.showDrawer(),window.PXUTheme.jsAjaxCart.updateView();else if("54465429691"==e)refreshCart(r),window.setTimeout((function(){$.fancybox.close(),$(".cart-button").click()}),500);else if("25427564"==e||"4243849314"==e){(new theme.CartDrawer).open()}else"62602182872"==e||"57362710572"==e?(CartJS.getCart(),$(".block-cart").addClass("active")):"60492578980"==e||"12183765088"==e||"58546946211"==e||"42070737058"==e||"71321583919"==e||"68492624171"==e||"74541891876"==e?(document.documentElement.dispatchEvent(new CustomEvent("ajaxProduct:added",{bubbles:!0,detail:{}})),document.documentElement.dispatchEvent(new CustomEvent("cart:open",{bubbles:!0,detail:{}}))):"36300750986"==e||"2665447536"==e?fetch("/?section_id=cart-drawer").then((e=>e.text())).then((e=>{const t=(new DOMParser).parseFromString(e,"text/html").getElementById("cart-drawer").innerHTML;$("#cart-drawer").html(t),$('[aria-controls="cart-drawer"]')[0].click(),$(".header__cart-count .count-bubble ").html(cart.item_count).css("opacity",1)})):"57824805033"==e?fetch("/cart.json").then((e=>e.json())).then((e=>{fetch("/cart?view=item").then((e=>e.text())).then((t=>{const n=(new DOMParser).parseFromString(t,"text/html"),o=n.getElementById("CartDrawer"),r=document.getElementById("CartDrawer");o&&r&&(r.innerHTML=o.innerHTML),n.querySelector("#CartDrawer .totals__subtotal-value");const i=document.querySelector("cart-drawer");i&&i.classList.remove("is-empty");const a=document.querySelector("cart-drawer-items");a&&a.classList.remove("is-empty");const s=document.getElementById("cart-icon-bubble");if(s.querySelector(".cart-count-bubble"))s.querySelectorAll('.cart-count-bubble span[aria-hidden="true"]').forEach((t=>{t.textContent=e.item_count}));else{const t=document.createElement("div");t.className="cart-count-bubble",t.innerHTML='\n <span aria-hidden="true">'.concat(e.item_count,'</span>\n <span class="visually-hidden">').concat(e.item_count," items</span>\n "),s.appendChild(t)}s.click(),document.getElementById("CartDrawer-Overlay").addEventListener("click",(()=>{const e=document.querySelector("cart-drawer");e&&e.classList.remove("active"),document.body.classList.remove("overflow-hidden")}))}))})):"61094723750"==e?SLIDECART&&(SLIDECART_UPDATE(),SLIDECART_OPEN()):document.documentElement.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{}}));setTimeout(t,n)}else{console.log("Executing cart refresh script..");document.getElementById("whatsmorecart").value=Math.random()}}},3388:function(e,t,n){n.d(t,{OC:function(){return s},e8:function(){return i},kT:function(){return o},kW:function(){return a},xg:function(){return r}});const o=function(e,t){return!((void 0==e.products||0==e.products.length)&&(void 0==e.cta||0==e.cta.length))},r=function(e,t){return!(void 0==e.products||0==e.products.length)},i=function(e,t){if(null!=e)return e.filter((e=>1==o(e)))},a=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null!=e)return t?e[0].events:e};const s=function(e,t){var n;if(null==e)return[];if(!("eventsets"in e))return[];const o=null!==(n=e.eventsets[t])&&void 0!==n?n:null;return o?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(o):[]}},7300:function(e,t,n){n.d(t,{B6:function(){return o},WJ:function(){return r},yC:function(){return i}});const o=function(e){return"video"===e.event_type},r=function(e){return"image"===e.event_type},i=function(e){return"livestream"===e.event_type}},5160:function(e,t,n){n.d(t,{$L:function(){return d},JX:function(){return c},Z6:function(){return i},rp:function(){return u},wh:function(){return r},wz:function(){return s},x0:function(){return a}});var o=n(2860);n(7753);function r(e){console.debug("updating user view count for event.");const t={event_id:e.event_id,increase_by:1};fetch(o.Gc+"/event/metrics/views",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(console.debug("updating user view count response : HTTP "+e.status),e.json()))).then((e=>{console.debug("updating user view count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating user view count user for event : ",e)}))}function i(e,t){console.debug("updating like count for event.");const n={event_id:e.event_id,increase_by:t};fetch(o.Gc+"/event/metrics/like",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(console.debug("updating like count response : HTTP "+e.status),e.json()))).then((e=>{console.debug("updating like count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating like count user for event : ",e)}))}function a(e){console.debug("updating share count for event.");const t={event_id:e.event_id,increase_by:1};fetch(o.Gc+"/event/metrics/share",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(console.debug("updating share count response : HTTP "+e.status),e.json()))).then((e=>{console.debug("updating share count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating share count user for event : ",e)}))}function s(e,t){console.debug("updating event-product click count for event {} and product {}.",e.event_id,t.product_id);const n={event_id:e.event_id,product_id:t.product_id,increase_by:1};fetch(o.Gc+"/event/metrics/clicks",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(console.debug("updating user event-product click count response : HTTP "+e.status),e.json()))).then((e=>{console.debug("updating user event-product click count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product click count for event {} : ",e.event_id,t)}))}function c(e,t,n){console.debug("updating event-product add to cart count for event {} and product {}.",e.event_id,t.product_id);const r={event_id:e.event_id,product_id:t.product_id,increase_by:n};fetch(o.Gc+"/event/metrics/add_to_cart",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(r)}).then((e=>(console.debug("updating user event-product add to cart count response : HTTP "+e.status),e.json()))).then((e=>{console.debug("updating user event-product add to cart count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product add to cart count for event {} : ",e.event_id,t)}))}function d(e,t){console.debug("updating event-product buy now count for event {} and product {}.",e.event_id,t.product_id);const n={event_id:e.event_id,product_id:t.product_id,increase_by:1};fetch(o.Gc+"/event/metrics/buy_now",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(console.debug("updating user event-product buy now count response : HTTP "+e.status),e.json()))).then((e=>{console.debug("updating user event-product buy now count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product buy now count for event {} : ",e.event_id,t)}))}async function u(){let{storeId:e="",eventId:t=0,productId:n="",variantId:r="",cartToken:i="",checkoutToken:a="",quantity:s=0,price:c="",actionType:d="",trackingId:u=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l={event_id:t,product_id:n,cart_token:i,checkout_token:a,quantity:s,price:c,variant_id:r,action_type:d,tracking_id:u};console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} ",t,n,r);const h=await fetch(o.Gc+"/cart-metadata/"+e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(l)}).then((e=>(console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} : HTTP "+e.status),e.json()))).catch((e=>{console.error("error initiating ATC metadata event for eventId {}, productId {}, variantId {} : ",t,n,r)}));return h}},4669:function(e,t,n){n.d(t,{Tc:function(){return l},ll:function(){return u}});var o=n(1824),r=n(7786),i=n(9854);n(7753);const a="Whatmore Video Shopping",s="Video View",c={carousel:"Carousel",stories:"Stories",video_popup:"Video Popup"},d={homepage:"Home Page",product_page:"Product Page"};async function u(e){if((0,i.Dv)(e)&&null!==(0,i.hf)(e)&&(r.ZP.initialize((0,i.hf)(e)),console.debug("Whatmore: initialized GA4")),(0,i.hv)(e)&&null!==(0,i.BH)(e)){const t=(0,i.OQ)(e);o.ZP.initialize((0,i.BH)(e),{useExistingGa:t}),console.debug("Whatmore: initialized GA3")}}async function l(e,t,n){(0,i.hv)(e)&&null!==(0,i.BH)(e)&&(o.ZP.event({category:a,action:s,label:d[t]+":"+c[n]}),console.debug("Whatmore: pushed view event to GA3")),(0,i.Dv)(e)&&null!==(0,i.hf)(e)&&(r.ZP.event({category:a,action:s+":"+d[t]+":"+c[n],value:1,nonInteraction:!1}),console.debug("Whatmore: pushed view event to GA4"))}}}]);