whatmore-react-assets 1.0.944 → 1.0.946

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whatmore-react-assets",
3
- "version": "1.0.944",
3
+ "version": "1.0.946",
4
4
  "description": "public repo for all whatmore js and css assets",
5
5
  "main": "whatmore.js",
6
6
  "scripts": {
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[436],{1492:function(e,t,o){o.r(t),o.d(t,{default:function(){return _}});var i=o(7313),n=o(6090),r=o(7616),l=o(5572),s=(o(6143),o(7850),o(4444),o(7244),o(123),o(5892),o(1811),o(9302)),a=o(2575),d=o(2210),p=o(8486),c=o(9821),u=o(8866),h=o(2279),m=o.n(h),y=o(7753),v=o(7129),x=o(1855),f=o(9854),g=o(4920),w=o(4522),P=o(778),j=o(7381),C=(o(3439),o(4892)),S=o(6805),I=o(9219),O=o(5945),M=o(7053),b=o(6417);var k=function(e){var t,o,n,r,s,a,d,p,u,h,m,x,g,w,P,j,k,E,F;const[Z,_,W,N,U]=(0,c.Z)();var z=(0,i.useContext)(v.V);const{whatmoreUITheme:D}=(0,i.useContext)(l.I),R=(0,y.MO)("whatmoreShopId"),T=(0,y.MO)("whatmorePrimaryFont"),V=(0,y.MO)("whatmoreSecondaryColor"),H=e.onClick,A=null===(t=e.isOnFocus)||void 0===t||t,$=null!==(o=e.playOnUnfocus)&&void 0!==o&&o,G=null!==(n=e.animateOnFocus&&(0,f.iWI)(R))&&void 0!==n&&n,q="portrait"===U[S.YP],B=(q?1.076*_*(0,f.pEd)(R):_*(0,f.H4g)(R))+"px",L=(q?1.076*_*(0,f.pEd)(R):_*(0,f.H4g)(R))+"px",Y=(q?.965*_*(0,f.pEd)(R):.859*_*(0,f.H4g)(R))+"px",K=(0,f.nzC)(R),{whatmoreIsPreviewMode:X}=(0,i.useContext)(l.I),J=.25*_,Q=J+"px",ee=1.1*J+"px",[te,oe]=(0,i.useState)(e.event),[ie,ne]=(0,i.useState)(),re=Math.round(+(null===(r=te.products)||void 0===r||null===(s=r[0])||void 0===s?void 0:s.price)),le=Math.round(+(null===te||void 0===te||null===(a=te.products[0])||void 0===a?void 0:a.compare_price)),se=le&&0!=le&&le>re?Math.round((le-re)/le*100):NaN,[ae,de]=(0,i.useState)(se);return(0,i.useEffect)((()=>{(0,f.N8M)(R)&&(0,I.p_)(te,(0,f.Ipo)(R),R).then((e=>{var t,o,i,n;oe(e),(null===e||void 0===e||null===(t=e.products)||void 0===t||null===(o=t[0])||void 0===o?void 0:o.discount)&&de(null===e||void 0===e||null===(i=e.products)||void 0===i||null===(n=i[0])||void 0===n?void 0:n.discount)}));(async()=>{var e;const t=await(0,M.p)(null===te||void 0===te||null===(e=te.products)||void 0===e?void 0:e[0],(0,f.Ipo)(R),R);ne(t)})()}),[]),(0,b.jsxs)("div",{ref:e=>{e&&(e.style.setProperty("margin-top",z.tileTopMargin+"px","important"),e.style.setProperty("margin-bottom",z.tileBottomMMargin+"px","important"))},children:[(0,b.jsx)("div",{style:{margin:"0 auto",width:_,height:q&&A?"STR2FOC6KG9"==R?Z:1.1*Z:Z,borderRadius:"round"==D?"5px":"0px",boxShadow:"round"==D?K:null,borderWidth:(0,f.alU)(R),borderColor:(0,f.qPe)(R),overflow:"hidden",cursor:"pointer"},className:G?A?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",onClick:()=>{H(te)},children:(0,b.jsx)(C.Z,{height:"100%",width:"100%",url:te.thumbnail_image,isPlaying:A||$,event:te})}),(0,b.jsxs)("div",{onClick:()=>{H(te)},style:{cursor:"pointer",display:"flex",gap:"6px",padding:"14px 8px"},children:[(X?(0,f.uU$)(R):(0,f.EIj)(R))&&(0,b.jsx)("div",{ref:e=>{e&&e.style.setProperty("height",ee,"important")},style:{maxWidth:Q,minWidth:null!==(d=te.products)&&void 0!==d&&null!==(p=d[0])&&void 0!==p&&p.thumbnail_image?Q:"0",borderRadius:"round"==D?"5px":"0px",overflow:"hidden",backgroundColor:"rgb(220, 220, 220, 1)"},children:(0,b.jsx)("img",{ref:e=>{e&&e.style.setProperty("object-fit",(0,f.yOX)(R),"important")},src:null===(u=te.products)||void 0===u||null===(h=u[0])||void 0===h?void 0:h.thumbnail_image})}),(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"5px"},children:[(0,b.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-size",B,"important"),e.style.setProperty("line-height","120%","important"),e.style.setProperty("font-family",T,"important"),e.style.setProperty("-webkit-line-clamp",1,"important"),e.style.setProperty("line-clamp",1,"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"))},children:(0,O.s)(null===(m=te.products[0])||void 0===m?void 0:m.title)}),(0,f.QaY)(R)&&(0,b.jsxs)("div",{style:{display:"flex",gap:"12px",flexDirection:(0,f.$zZ)(R)?"row":"row-reverse",justifyContent:(0,f.$zZ)(R)?"flex-start":"flex-end"},children:[(0,b.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.Uyp)(R),"important"),e.style.setProperty("font-size",L,"important"),e.style.setProperty("font-family",T,"important"),e.style.setProperty("overflow","hidden","important"))},style:{textAlign:"left",fontWeight:"normal"==(0,f.rPP)(R)?"normal":"bold"},children:(0,I.jx)(parseFloat(null!==(x=null===ie||void 0===ie?void 0:ie.price)&&void 0!==x?x:null===te||void 0===te||null===(g=te.products)||void 0===g||null===(w=g[0])||void 0===w?void 0:w.price)," ",R,null===(P=te.products[0])||void 0===P?void 0:P.currency)}),!isNaN(le)&&le>re&&(0,b.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.kPs)(R),"important"),e.style.setProperty("font-size",L,"important"),e.style.setProperty("font-family",T,"important"),e.style.setProperty("overflow","hidden","important"))},style:{textDecoration:"line-through"},children:(0,I.jx)(parseFloat(null!==(j=null===ie||void 0===ie?void 0:ie.compare_at_price)&&void 0!==j?j:null===te||void 0===te||null===(k=te.products)||void 0===k||null===(E=k[0])||void 0===E?void 0:E.compare_price)," ",R,null===(F=te.products[0])||void 0===F?void 0:F.currency)})]}),(0,f.QaY)(R)&&!isNaN(ae)&&0!=ae&&(0,b.jsx)("div",{style:{display:"flex",backgroundColor:"green"==(0,f.ZJm)(R)?"#343434"==V?(0,f.ZJm)(R):V:(0,f.ZJm)(R),alignItems:"center",borderRadius:(0,f.CF_)(R)+"px",width:"fit-content",padding:(0,f.Spx)(R)?"3px 6px":"0px"},children:(0,f.Spx)(R)?(0,b.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.mso)(R),"important"),e.style.setProperty("font-size",Y,"important"),e.style.setProperty("font-family",T,"important"))},children:"".concat(ae,"% Off")}):(0,b.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.aUT)(R),"important"),e.style.setProperty("font-size",Y,"important"),e.style.setProperty("font-family",(0,f.V3Y)(R),"important"))},children:(0,f.sG7)(R)})})]})]})]})};const E=(0,a.Z)({key:"whatmore-css-hv"});function F(e){const[t,o,n]=(0,c.Z)(),r=(0,y.MO)("whatmoreShopId"),s=e.events,a=e.onClick,u=n*(0,f.u6l)(r),h="32365904011"==r,[m,v]=(0,i.useState)(h?s.length:u),{whatmoreWidgetSourceDetails:j}=(0,i.useContext)(l.I);return(0,i.useEffect)((()=>{m<=u&&v((e=>e+u))}),[u]),(0,b.jsx)("div",{className:"whatmore-events-carousel-portrait",style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,b.jsx)("div",{style:{width:window.innerWidth,height:"fit-content"},children:(0,b.jsx)(d.tq,{slidesPerView:s.length>1?u:1,initialSlide:s.length>1?1:0,centeredSlides:!0,centeredSlidesBounds:!1,watchSlidesProgress:!0,touchRatio:.5,onSlideChange:e=>{(0,w.y4)({userInteractionType:P.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:j}),e.realIndex>e.previousIndex&&v((e=>e+u))},loop:h,navigation:h,modules:[p.W_],children:s.map(((e,t)=>t<=m&&(0,b.jsx)(d.o5,{children:t=>{let{isActive:o,isPrev:i,isNext:n,isVisible:l}=t;return i||n||o?(0,f.$X$)(r)?(0,b.jsx)(k,{isOnFocus:o&&l,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{a(e)}}):(0,b.jsx)(g.Z,{isOnFocus:o&&l,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{a(e)}}):(0,b.jsx)(x.Z,{})}},"whatmore-event-tile-portrait-"+e.index)))})})})}function Z(e){const[t,o,n,r]=(0,c.Z)(),[s,a]=(0,i.useState)(-1),u=(0,y.MO)("whatmoreShopId"),h=e.onClick,v=e.events,j="32365904011"==u,[C,S]=(0,i.useState)(j?v.length:n),I=Math.min(n,v.length),{whatmoreWidgetSourceDetails:O}=(0,i.useContext)(l.I);return(0,i.useEffect)((()=>{C<=n&&S((e=>e+n))}),[n]),(0,b.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:r+"px",paddingRight:r+"px"},className:"whatmore-events-carousel-landscape",children:(0,b.jsx)("div",{style:{width:o*I*(0,f.Su5)(u)+"px"},children:(0,b.jsx)(d.tq,{slidesPerView:I,watchSlidesProgress:!0,modules:[p.W_],navigation:!0,slidesPerGroup:parseInt(I),onSlideChange:e=>{(0,w.y4)({userInteractionType:P.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:O}),e.realIndex>e.previousIndex&&S((e=>e+n))},spaceBetween:(0,f.WGf)(u),loop:j,children:v.map(((e,t)=>{const o=m()((()=>a(t)),300);return t<=C&&(0,b.jsx)(d.o5,{onMouseEnter:()=>{o()},onMouseLeave:()=>{o.cancel(),a(-1)},children:o=>{let{isActive:i,isPrev:n,isNext:r,isVisible:l}=o;return l?(0,f.$X$)(u)?(0,b.jsx)(k,{isOnFocus:t==s,playOnUnfocus:!0,animateOnFocus:!0,event:e,onClick:()=>{h(e)}}):(0,b.jsx)(g.Z,{isOnFocus:t==s,playOnUnfocus:!(0,f.dHy)(u)||t==parseInt(I/2)&&-1==s,animateOnFocus:!0,event:e,onClick:()=>{h(e)}}):(0,b.jsx)(x.Z,{})}},"whatmore-event-tile-landscape-"+e.index)}))})})})}var _=function(e){const[t,o,a]=(0,u.Z)(),[d]=(0,y.j1)("whatmoreShopId"),[p]=(0,y.j1)("whatmorePrimaryColor"),[c]=(0,y.j1)("whatmoreTitleFont"),h="portrait"==t?(0,y.MO)("whatmoreTitleFontSizePortrait"):(0,y.MO)("whatmoreTitleFontSize"),{whatmoreRootId:m}=(0,i.useContext)(l.I),x=((0,y.MO)("isInDesignMode"),(0,y.MO)("whatmoreCollectionHeading")),{whatmoreIsCollectionsTemplate:g}=(0,i.useContext)(l.I),w=e.events,P=e.onClick,C=c;function S(e){P(e)}return(0,i.useEffect)((()=>{(0,j.Oo)("Video shopping powered by Whatmore!")}),[]),(0,i.useEffect)((()=>{l.$.forEach((e=>{var t;const o=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-a"]');if(!o)return;o&&e&&(e.style.minHeight="0px")}))}),[]),delete r.ZP.styles.global,(0,b.jsx)(s.C,{value:E,children:(0,b.jsx)("div",{className:"whatmore-carousel-events",children:(0,b.jsx)(n.x,{theme:r.ZP,cssVarsRoot:m,resetCSS:!1,children:(0,b.jsxs)(v.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[e.heading.trim().length>0||g?(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:(0,b.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-family",C,"important"),e.style.setProperty("font-size",h+"px","important"))},style:{color:p,backgroundClip:"text",textAlign:"center",fontWeight:(0,f.wOV)(d),lineHeight:(0,f.vY4)(d),letterSpacing:(0,f.X2K)(d)},children:g?"W"!==x?x:"":e.heading})}):(0,b.jsx)(b.Fragment,{}),"landscape"===t?(0,b.jsx)(Z,{events:w,onClick:S}):(0,b.jsx)(F,{events:w,onClick:S})]})})})})}},1855:function(e,t,o){var i=o(7313),n=o(9821),r=o(7129),l=o(6417);t.Z=function(e){var[t,o]=(0,n.Z)();return(0,i.useContext)(r.V),e.event,(0,l.jsx)("div",{style:{margin:"0 auto",width:o,height:t,overflow:"hidden"}})}},5892:function(){},4444:function(){},1811:function(){},7850:function(){}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[580],{1332:function(e,t,n){var o=n(7313),c=(n(8743),n(7753)),a=n(5254),r=n(6417);t.Z=function(e){return(0,o.useEffect)((()=>{const e=(0,a.oo)((0,c.MO)("whatmoreSecondaryColor"));!function(e,t,n,o){const c="rgba(".concat(e,",").concat(t,",").concat(n,",").concat(o,")"),a="\n @keyframes whatmore-loading-indicator-keyframe {\n 0%,\n 100% {\n box-shadow: 0em -2.6em 0em 0em ".concat(c,", 1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5), -1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7);\n }\n 12.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7), 1.8em -1.8em 0 0em ").concat(c,", 2.5em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5);\n }\n 25% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5), 1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7), 2.5em 0em 0 0em ").concat(c,", 1.75em 1.75em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2);\n }\n 37.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5), 2.5em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7), 1.75em 1.75em 0 0em ").concat(c,", 0em 2.5em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2);\n }\n 50% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5), 1.75em 1.75em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7), 0em 2.5em 0 0em ").concat(c,", -1.8em 1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2);\n }\n 62.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5), 0em 2.5em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7), -1.8em 1.8em 0 0em ").concat(c,", -2.6em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2);\n }\n 75% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5), -1.8em 1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7), -2.6em 0em 0 0em ").concat(c,", -1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2);\n }\n 87.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5), -2.6em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7), -1.8em -1.8em 0 0em ").concat(c,";\n }\n }\n "),r=document.createElement("style");r.type="text/css",r.innerHTML=a,document.head.appendChild(r)}(e[0],e[1],e[2],.2)}),[]),(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("span",{className:"whatmore-loading-indicator"})})}},3580:function(e,t,n){n.r(t),n.d(t,{default:function(){return f}});var o=n(7313),c=n(8866),a=n(7753),r=(n(9111),n(123),n(9778),n(9854)),i=n(868),s=n(9363),l=(n(8984),n(4892)),m=n(6417);var d=function(e){var t,n;const[d,u,h]=(0,c.Z)(),p=(0,a.MO)("whatmorePrimaryFont"),f=(0,a.MO)("whatmoreSecondaryColor"),g=(0,a.MO)("whatmoreShopId"),[v,b]=(0,o.useState)(!1),x=e.storyId,w=(0,i.V)(e.imageUrl),y=e.title,j=e.onClick,_=e.template,k=(0,r.f63)(g),S="template-stories-a"===_?"50%":"30%",C="portrait"==d?1:(0,r.Zyc)(g),F=Math.floor(e.tileSize*C),R=.12*F*(0,r.LM2)(g),z=null!==(t=(0,r.QaQ)(g))&&void 0!==t?t:p,P=null!==(n=(0,r.u2W)(g))&&void 0!==n?n:[f,k,f,k,f],W=(0,o.useRef)(0),I=(0,o.useRef)(null),M=(0,o.useRef)(null);return(0,o.useEffect)((()=>{M.current&&M.current.play()}),[]),(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignItems:"center",flexShrink:0,height:"fit-content",width:F*(0,r.jJ6)(g)+"px",marginLeft:"10px",marginRight:"10px",marginTop:"10px",marginBottom:"10px",cursor:"pointer"},onClick:()=>{b(!0),j(x)},className:[v?"whatmore-scale-on-tap":""].join(" "),children:[(0,m.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:S,boxShadow:"0px 2px 1px 0px "+P[0]+"50, 0px -2px 1px 0px "+P[1]+"50, 2px 0px 1px 0px "+P[2]+"50, -2px 0px 1px 0px "+P[3]+"80, 2px -2px 1px 0px "+P[4]+"80, -2px 2px 1px 0px "+P[0]+"DA, 2px 2px 1px 0px "+P[1]+"DA, -2px -2px 1px 0px "+P[2]+"DA"},children:(0,m.jsx)("div",{className:"whatmore-story-thumbnail-wrapper",style:{flexShrink:0,objectFit:"cover",height:F+"px",width:F+"px",borderRadius:S,border:"3px solid white",backgroundColor:"#343434"===f?"#d3d3d3":f,overflow:"hidden"},children:"video"==(0,s.$)(w)?(0,m.jsx)(l.Z,{height:"100%",width:"100%",url:w,isPlaying:!0,event:{event_type:"video"},borderRadius:S}):(0,m.jsx)("img",{ref:I,className:"whatmore-story-thumbnail",src:w,loading:"lazy",style:{objectFit:"cover",height:F+"px",width:F+"px",backgroundColor:"white"},alt:"story image",onError:function(){if(W.current<3){let t=(0,i.V)(e.imageUrl);I.current.src="",I.current.src=t,W.current=W.current+1}else console.log("Failed to load image after several attempts"),I.current.src="https://d2oouab8j9eigo.cloudfront.net/background_white.png"}})})}),(0,m.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"100%",marginTop:"10px"},children:(0,m.jsx)("p",{ref:e=>{e&&e.style.setProperty("font-size",R+"px","important")},style:{textAlign:"center",color:(0,r.WS3)(g),fontFamily:z,fontWeight:"normal",lineHeight:"110%",margin:0,padding:0,overflow:"hidden",textOverflow:"ellipsis",width:"auto"},children:null===y||void 0===y?void 0:y.substring(0,24)})})]})},u=n(5572),h=n(9302);const p=(0,n(2575).Z)({key:"whatmore-stories-css"});var f=function(e){const[t,n,i]=(0,c.Z)(),[s]=(0,a.j1)("whatmoreLandscapePadding"),[l]=(0,a.j1)("whatmoreStoryTileSize"),[f]=(0,a.j1)("whatmoreStoryTileSizeDesktop"),[g]=(0,a.j1)("whatmoreShopId"),[v,b]=(0,o.useState)("portrait"===t?"flex-start":"center"),x=(0,o.useRef)(null);var w=e.eventsStories;const y=e.onClick,j=e.template;(0,o.useEffect)((()=>{u.$.forEach((e=>{var t;if(!(null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-stories-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-stories-a"]')))return;e&&(e.style.minHeight="0px")}))}),[]);const _=e=>{if(x.current){const t="left"===e?4*-C:4*C;x.current.scrollBy({left:t,behavior:"smooth"})}};(0,o.useEffect)((()=>{!function(){if(x.current){const e=x.current.scrollWidth,t=x.current.offsetWidth;b(e>t?"flex-start":"center")}}()}),[v,i]);const[k,S]=(0,o.useState)([]);(0,o.useEffect)((()=>{S(w.map((e=>e.storyset_dynamic_thumbnail?Math.floor(Math.random()*(e.events.length-1)):0)))}),[]);const C="landscape"===t?n*(f/100)*.3:i*(l/100)*.5;return(0,m.jsx)(h.C,{value:p,children:"landscape"==t&&!(0,r.DF0)(g)||"portrait"==t&&!(0,r.JaA)(g)?(0,m.jsx)(m.Fragment,{}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:v,height:"fit-content",width:"100%"},className:"whatmore-story-horizontal-flex",ref:x,children:w.map(((e,t)=>{var n,o;const c=e.storyset_dynamic_thumbnail&&null!==(n=null===(o=e.events[k[t]])||void 0===o?void 0:o.poster_image)&&void 0!==n?n:e.thumbnail_image;return(0,m.jsx)(d,{storyId:e.id,tileSize:(0,r.OFP)(g)?100:C,onClick:e=>{y(t)},template:j,imageUrl:c,fallbackUrl:e.thumbnail_image,title:e.title},"whatmore-story-"+e.id)}))}),"landscape"===t&&(0,r.sMW)(g)&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("button",{onClick:()=>_("left"),style:{borderRadius:"4px",backgroundColor:"rgba(0, 0, 0, 0.4)",position:"absolute",top:"40%",transform:"translateY(-50%)",left:0},children:(0,m.jsx)("p",{style:{fontSize:"22px",color:"white",padding:"8px"},children:"<"})}),(0,m.jsx)("button",{onClick:()=>_("right"),style:{borderRadius:"4px",backgroundColor:"rgba(0, 0, 0, 0.4)",position:"absolute",top:"40%",transform:"translateY(-50%)",right:0},children:(0,m.jsx)("p",{style:{fontSize:"22px",color:"white",padding:"8px"},children:">"})})]})]})})}},3175:function(e,t,n){var o=n(1332),c=n(5180),a=n(6417);t.Z=function(e){var t,n;const r=null!==(t=e.height)&&void 0!==t?t:"100%",i=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,a.jsxs)("div",{style:{width:i,height:r,overflow:"hidden",minHeight:r,minWidth:i},children:[(0,a.jsx)(c.Z,{height:r,width:i}),(0,a.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,a.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",width:"100%",height:"fit-content"},children:(0,a.jsx)(o.Z,{})})})]})}},5180:function(e,t,n){var o=n(6417);t.Z=function(e){var t,n,c;const a=null!==(t=e.height)&&void 0!==t?t:"100%",r=null!==(n=e.width)&&void 0!==n?n:"100%",i=null!==(c=e.borderRadius)&&void 0!==c?c:"10px";return(0,o.jsx)("div",{style:{height:a,width:a,borderRadius:i,overflow:"hidden",minHeight:a,minWidth:r,maxHeight:a,maxWidth:r},children:(0,o.jsx)("div",{style:{minHeight:a,minWidth:r},height:"100%",width:"100%",className:"whatmore-shimmer"})})}},2887:function(e,t,n){var o=n(7313),c=n(3175),a=n(6417);t.Z=function(e){var t,n,r;const[i,s]=(0,o.useState)(!1),l=o.useRef(0),m=(0,o.useRef)(null),d=null!==(t=e.timeUpdateCallback)&&void 0!==t?t:()=>{},u=null!==(n=e.height)&&void 0!==n?n:"100%",h=null!==(r=e.width)&&void 0!==r?r:"100%";return(0,o.useEffect)((()=>{l.current=0;const e=setInterval((()=>{l.current=l.current+.03,m.current&&d(l.current,5),l.current>=5&&(l.current=0)}),30);return()=>{clearInterval(e)}}),[e.isPlaying]),(0,a.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:h,height:u,overflow:"hidden"},children:[(0,a.jsx)("div",{style:{width:i?"100%":"0px",height:i?"100%":"0px"},children:(0,a.jsx)("img",{ref:m,src:e.url,style:{objectFit:"cover",height:u,width:h,backgroundColor:"white"},alt:"image player",onLoad:()=>{s(!0)}})}),i?(0,a.jsx)(a.Fragment,{}):(0,a.jsx)(c.Z,{width:h,height:u})]})}},4892:function(e,t,n){n.d(t,{Z:function(){return p}});var o=n(7313),c=n(3933),a=n(868),r=n(8984),i=n(7300),s=n(2887),l=n(4862),m=n(7753),d=n(342),u=n(6417);var h=function(e){var t,n;const a=(0,o.useRef)(null),[i,s,h]=(0,c.YD)({triggerOnce:!0}),p=(0,m.MO)("whatmoreShopId"),f=null!==(t=e.height)&&void 0!==t?t:"100%",g=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,o.useEffect)((()=>{a.current&&(e.isPlaying?a.current.play():((l.G6||(0,r.gE)())&&a.current.play(),a.current.pause()))}),[e.isPlaying,s]),(0,u.jsx)("div",{ref:i,style:{width:f,height:g,overflow:"hidden"},children:s?(0,u.jsxs)("video",{ref:a,className:"whatmore-video-player-muted",width:g,height:f,preload:"metadata",loop:!0,playsInline:!0,poster:e.isPlaying&&"STRTFEDEDAP"!==p&&"STRY2V4XO5L"!==p?e.url:e.poster,muted:!0,style:{backgroundColor:"white",borderRadius:e.borderRadius},children:[(0,u.jsx)("source",{src:e.url,type:"video/mp4"}),(0,u.jsx)("source",{src:(0,d.vW)(e.url),type:"video/mp4"})]}):(0,u.jsx)("div",{width:g,height:f,ref:e=>{e&&e.style.setProperty("display","block","important")}})})};var p=function(e){var t,n,l,m;const[p,f,g]=(0,c.YD)({triggerOnce:!0});if((0,i.WJ)(e.event))return(0,u.jsx)(s.Z,{height:e.height,width:e.width,url:e.url,isPlaying:e.isPlaying,timeUpdateCallback:e.timeUpdateCallback});const v=null!==(t=e.pauseFromPlayTimeInMs)&&void 0!==t?t:200;var b;if((0,r.KE)())return(0,u.jsx)(h,{borderRadius:e.borderRadius,height:"100%",width:"100%",poster:null===e||void 0===e||null===(b=e.event)||void 0===b?void 0:b.poster_image,url:(0,a.V)(e.url),isPlaying:e.isPlaying,pauseFromPlayTimeInMs:v});const x=(0,o.useRef)(null),w=null!==(n=e.height)&&void 0!==n?n:"100%",y=null!==(l=e.width)&&void 0!==l?l:"100%";return(0,o.useEffect)((()=>{x.current&&(e.isPlaying?x.current.play():x.current.pause())}),[e.isPlaying,f]),(0,u.jsx)("div",{ref:p,style:{width:w,height:y,overflow:"hidden"},children:f?(0,u.jsxs)("video",{ref:x,className:"whatmore-video-player-muted",width:y,height:w,preload:"metadata",loop:!0,playsInline:!0,muted:!0,poster:null===e||void 0===e||null===(m=e.event)||void 0===m?void 0:m.poster_image,style:{backgroundColor:"white"},children:[(0,u.jsx)("source",{src:(0,a.V)(e.url),type:"video/mp4"}),(0,u.jsx)("source",{src:(0,d.vW)(e.url),type:"video/mp4"})]}):(0,u.jsx)("div",{width:y,height:w,ref:e=>{e&&e.style.setProperty("display","block","important")}})})}},868:function(e,t,n){n.d(t,{V:function(){return i}});var o=n(9854),c=n(7753);const a={"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"},r={"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"},i=function(e){const t=(0,c.MO)("whatmoreShopId");if(!e)return e;if(e.startsWith("https://cdn.shopify.com"))return e;if("AWSCDN"==(0,o.zpr)(t))return e;if("AZURECDN"==(0,o.zpr)(t)){if(e.includes(".azureedge.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(a))if(e.includes(t))return e.replace(t,a[t]);return e}}if("BUNNYCDN"==(0,o.zpr)(t)){if(e.includes(".b-cdn.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(r))if(e.includes(t))return e.replace(t,r[t]);return e}}return e}},342:function(e,t,n){n.d(t,{$W:function(){return i},WN:function(){return r},uv:function(){return a},vW:function(){return s}});var o=n(9854);const c=(0,n(7753).MO)("whatmoreShopId"),a=function(e){var t;return"event_media_urls"in e?"image"===e.event_type?e.event_media_urls.primary.portrait.content_image_original:"secondary"in e.event_media_urls&&e.event_media_urls.secondary.portrait.content_video_1080p?e.event_media_urls.secondary.portrait.content_video_1080p:null!==(t=e.event_media_urls.primary.portrait.content_video_1080p)&&void 0!==t?t:null:e.event_hls_url},r=function(e){return"event_media_urls"in e?"image"===e.event_type?e.event_media_urls.primary.landscape.content_image_original:"secondary"in e.event_media_urls&&e.event_media_urls.secondary.landscape.content_video_1080p?e.event_media_urls.secondary.landscape.content_video_1080p:e.event_media_urls.primary.landscape.content_video_1080p:e.event_hls_url},i=function(e){if(e.startsWith("https://cdn.shopify.com")&&e.includes("whatmore_")){const t=(0,o.QFt)(c);if(!t)return e;const n=e.split("whatmore_")[1].split("?")[0];return"https://whatmore-brand-video-assets-720p.b-cdn.net/".concat(t,"/").concat(n)}return e},s=function(e){if(e.startsWith("https://cdn.shopify.com")&&e.includes("whatmore_")){const t=(0,o.QFt)(c);if(!t)return e;const n=e.split("whatmore_")[1].split("?")[0];return"https://whatmore-brand-thumbnail-video-assets.b-cdn.net/".concat(t,"/").concat(n)}return e}},9363:function(e,t,n){n.d(t,{$:function(){return r},s:function(){return a}});var o=n(9854),c=n(7753);function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=(0,c.MO)("whatmoreShopId");return"shopify"!=(0,o.Ipo)(n)?"STRNV8MHJTF"==n?e+"?format=webp":e:e+t}function r(e){var t;if(null!==e&&void 0!==e&&e.includes("https://w-media.b-cdn.net/process-media"))return"image";const n=null===e||void 0===e||null===(t=e.trim())||void 0===t?void 0:t.split("?")[0],o=/\.(jpeg|jpg|gif|png|svg|webp)$/i,c=/\.(mp4|mov|wmv|avi|flv|mkv)$/i;return null!==o&&void 0!==o&&o.test(n)?"image":null!==c&&void 0!==c&&c.test(n)?"video":void 0}},8743:function(){},9111:function(){},123:function(){},9778:function(){}}]);
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[580],{1332:function(e,t,n){var o=n(7313),c=(n(8743),n(7753)),a=n(5254),r=n(6417);t.Z=function(e){return(0,o.useEffect)((()=>{const e=(0,a.oo)((0,c.MO)("whatmoreSecondaryColor"));!function(e,t,n,o){const c="rgba(".concat(e,",").concat(t,",").concat(n,",").concat(o,")"),a="\n @keyframes whatmore-loading-indicator-keyframe {\n 0%,\n 100% {\n box-shadow: 0em -2.6em 0em 0em ".concat(c,", 1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5), -1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7);\n }\n 12.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7), 1.8em -1.8em 0 0em ").concat(c,", 2.5em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5);\n }\n 25% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5), 1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7), 2.5em 0em 0 0em ").concat(c,", 1.75em 1.75em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2);\n }\n 37.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5), 2.5em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7), 1.75em 1.75em 0 0em ").concat(c,", 0em 2.5em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2);\n }\n 50% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5), 1.75em 1.75em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7), 0em 2.5em 0 0em ").concat(c,", -1.8em 1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2);\n }\n 62.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5), 0em 2.5em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7), -1.8em 1.8em 0 0em ").concat(c,", -2.6em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2);\n }\n 75% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5), -1.8em 1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7), -2.6em 0em 0 0em ").concat(c,", -1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2);\n }\n 87.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5), -2.6em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7), -1.8em -1.8em 0 0em ").concat(c,";\n }\n }\n "),r=document.createElement("style");r.type="text/css",r.innerHTML=a,document.head.appendChild(r)}(e[0],e[1],e[2],.2)}),[]),(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("span",{className:"whatmore-loading-indicator"})})}},3580:function(e,t,n){n.r(t),n.d(t,{default:function(){return f}});var o=n(7313),c=n(8866),a=n(7753),r=(n(9111),n(123),n(9778),n(9854)),i=n(868),s=n(9363),l=(n(8984),n(4892)),m=n(6417);var d=function(e){var t,n;const[d,u,h]=(0,c.Z)(),p=(0,a.MO)("whatmorePrimaryFont"),f=(0,a.MO)("whatmoreSecondaryColor"),g=(0,a.MO)("whatmoreShopId"),[v,b]=(0,o.useState)(!1),x=e.storyId,w=(0,i.V)(e.imageUrl),y=e.title,j=e.onClick,_=e.template,k=(0,r.f63)(g),S="template-stories-a"===_?"50%":"30%",C="portrait"==d?1:(0,r.Zyc)(g),F=Math.floor(e.tileSize*C),R=.12*F*(0,r.LM2)(g),z=null!==(t=(0,r.QaQ)(g))&&void 0!==t?t:p,P=null!==(n=(0,r.u2W)(g))&&void 0!==n?n:[f,k,f,k,f],W=(0,o.useRef)(0),I=(0,o.useRef)(null),M=(0,o.useRef)(null);return(0,o.useEffect)((()=>{M.current&&M.current.play()}),[]),(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignItems:"center",flexShrink:0,height:"fit-content",width:F*(0,r.jJ6)(g)+"px",marginLeft:"10px",marginRight:"10px",marginTop:"10px",marginBottom:"10px",cursor:"pointer"},onClick:()=>{b(!0),j(x)},className:[v?"whatmore-scale-on-tap":""].join(" "),children:[(0,m.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:S,boxShadow:"0px 2px 1px 0px "+P[0]+"50, 0px -2px 1px 0px "+P[1]+"50, 2px 0px 1px 0px "+P[2]+"50, -2px 0px 1px 0px "+P[3]+"80, 2px -2px 1px 0px "+P[4]+"80, -2px 2px 1px 0px "+P[0]+"DA, 2px 2px 1px 0px "+P[1]+"DA, -2px -2px 1px 0px "+P[2]+"DA"},children:(0,m.jsx)("div",{className:"whatmore-story-thumbnail-wrapper",style:{flexShrink:0,objectFit:"cover",height:F+"px",width:F+"px",borderRadius:S,border:"3px solid white",backgroundColor:"#343434"===f?"#d3d3d3":f,overflow:"hidden"},children:"video"==(0,s.$)(w)?(0,m.jsx)(l.Z,{height:"100%",width:"100%",url:w,isPlaying:!0,event:{event_type:"video"},borderRadius:S}):(0,m.jsx)("img",{ref:I,className:"whatmore-story-thumbnail",src:w,loading:"lazy",style:{objectFit:"cover",height:F+"px",width:F+"px",backgroundColor:"white"},alt:"story image",onError:function(){if(W.current<3){let t=(0,i.V)(e.imageUrl);I.current.src="",I.current.src=t,W.current=W.current+1}else console.log("Failed to load image after several attempts"),I.current.src="https://d2oouab8j9eigo.cloudfront.net/background_white.png"}})})}),(0,m.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"100%",marginTop:"10px"},children:(0,m.jsx)("p",{ref:e=>{e&&e.style.setProperty("font-size",R+"px","important")},style:{textAlign:"center",color:(0,r.WS3)(g),fontFamily:z,fontWeight:"normal",lineHeight:"110%",margin:0,padding:0,overflow:"hidden",textOverflow:"ellipsis",width:"auto"},children:null===y||void 0===y?void 0:y.substring(0,24)})})]})},u=n(5572),h=n(9302);const p=(0,n(2575).Z)({key:"whatmore-stories-css"});var f=function(e){const[t,n,i]=(0,c.Z)(),[s]=(0,a.j1)("whatmoreLandscapePadding"),[l]=(0,a.j1)("whatmoreStoryTileSize"),[f]=(0,a.j1)("whatmoreStoryTileSizeDesktop"),[g]=(0,a.j1)("whatmoreShopId"),[v,b]=(0,o.useState)("portrait"===t?"flex-start":"center"),x=(0,o.useRef)(null);var w=e.eventsStories;const y=e.onClick,j=e.template;(0,o.useEffect)((()=>{u.$.forEach((e=>{var t;if(!(null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-stories-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-stories-a"]')))return;e&&(e.style.minHeight="0px")}))}),[]);const _=e=>{if(x.current){const t="left"===e?4*-C:4*C;x.current.scrollBy({left:t,behavior:"smooth"})}};(0,o.useEffect)((()=>{!function(){if(x.current){const e=x.current.scrollWidth,t=x.current.offsetWidth;b(e>t?"flex-start":"center")}}()}),[v,i]);const[k,S]=(0,o.useState)([]);(0,o.useEffect)((()=>{S(w.map((e=>e.storyset_dynamic_thumbnail?Math.floor(Math.random()*(e.events.length-1)):0)))}),[]);const C="landscape"===t?n*(f/100)*.3:i*(l/100)*.5;return(0,m.jsx)(h.C,{value:p,children:"landscape"==t&&!(0,r.DF0)(g)||"portrait"==t&&!(0,r.JaA)(g)?(0,m.jsx)(m.Fragment,{}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:v,height:"fit-content",width:"100%"},className:"whatmore-story-horizontal-flex",ref:x,children:w.map(((e,t)=>{var n,o,c,a,i;const s=e.storyset_dynamic_thumbnail?null!==(n=null===(o=e.events[k[t]])||void 0===o?void 0:o.poster_image)&&void 0!==n?n:e.thumbnail_image:null!==(c=e.thumbnail_image)&&void 0!==c?c:null===e||void 0===e||null===(a=e.events)||void 0===a||null===(i=a[0])||void 0===i?void 0:i.thumbnail_image;return(0,m.jsx)(d,{storyId:e.id,tileSize:(0,r.OFP)(g)?100:C,onClick:e=>{y(t)},template:j,imageUrl:s,fallbackUrl:e.thumbnail_image,title:e.title},"whatmore-story-"+e.id)}))}),"landscape"===t&&(0,r.sMW)(g)&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("button",{onClick:()=>_("left"),style:{borderRadius:"4px",backgroundColor:"rgba(0, 0, 0, 0.4)",position:"absolute",top:"40%",transform:"translateY(-50%)",left:0},children:(0,m.jsx)("p",{style:{fontSize:"22px",color:"white",padding:"8px"},children:"<"})}),(0,m.jsx)("button",{onClick:()=>_("right"),style:{borderRadius:"4px",backgroundColor:"rgba(0, 0, 0, 0.4)",position:"absolute",top:"40%",transform:"translateY(-50%)",right:0},children:(0,m.jsx)("p",{style:{fontSize:"22px",color:"white",padding:"8px"},children:">"})})]})]})})}},3175:function(e,t,n){var o=n(1332),c=n(5180),a=n(6417);t.Z=function(e){var t,n;const r=null!==(t=e.height)&&void 0!==t?t:"100%",i=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,a.jsxs)("div",{style:{width:i,height:r,overflow:"hidden",minHeight:r,minWidth:i},children:[(0,a.jsx)(c.Z,{height:r,width:i}),(0,a.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,a.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",width:"100%",height:"fit-content"},children:(0,a.jsx)(o.Z,{})})})]})}},5180:function(e,t,n){var o=n(6417);t.Z=function(e){var t,n,c;const a=null!==(t=e.height)&&void 0!==t?t:"100%",r=null!==(n=e.width)&&void 0!==n?n:"100%",i=null!==(c=e.borderRadius)&&void 0!==c?c:"10px";return(0,o.jsx)("div",{style:{height:a,width:a,borderRadius:i,overflow:"hidden",minHeight:a,minWidth:r,maxHeight:a,maxWidth:r},children:(0,o.jsx)("div",{style:{minHeight:a,minWidth:r},height:"100%",width:"100%",className:"whatmore-shimmer"})})}},2887:function(e,t,n){var o=n(7313),c=n(3175),a=n(6417);t.Z=function(e){var t,n,r;const[i,s]=(0,o.useState)(!1),l=o.useRef(0),m=(0,o.useRef)(null),d=null!==(t=e.timeUpdateCallback)&&void 0!==t?t:()=>{},u=null!==(n=e.height)&&void 0!==n?n:"100%",h=null!==(r=e.width)&&void 0!==r?r:"100%";return(0,o.useEffect)((()=>{l.current=0;const e=setInterval((()=>{l.current=l.current+.03,m.current&&d(l.current,5),l.current>=5&&(l.current=0)}),30);return()=>{clearInterval(e)}}),[e.isPlaying]),(0,a.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:h,height:u,overflow:"hidden"},children:[(0,a.jsx)("div",{style:{width:i?"100%":"0px",height:i?"100%":"0px"},children:(0,a.jsx)("img",{ref:m,src:e.url,style:{objectFit:"cover",height:u,width:h,backgroundColor:"white"},alt:"image player",onLoad:()=>{s(!0)}})}),i?(0,a.jsx)(a.Fragment,{}):(0,a.jsx)(c.Z,{width:h,height:u})]})}},4892:function(e,t,n){n.d(t,{Z:function(){return p}});var o=n(7313),c=n(3933),a=n(868),r=n(8984),i=n(7300),s=n(2887),l=n(4862),m=n(7753),d=n(342),u=n(6417);var h=function(e){var t,n;const a=(0,o.useRef)(null),[i,s,h]=(0,c.YD)({triggerOnce:!0}),p=(0,m.MO)("whatmoreShopId"),f=null!==(t=e.height)&&void 0!==t?t:"100%",g=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,o.useEffect)((()=>{a.current&&(e.isPlaying?a.current.play():((l.G6||(0,r.gE)())&&a.current.play(),a.current.pause()))}),[e.isPlaying,s]),(0,u.jsx)("div",{ref:i,style:{width:f,height:g,overflow:"hidden"},children:s?(0,u.jsxs)("video",{ref:a,className:"whatmore-video-player-muted",width:g,height:f,preload:"metadata",loop:!0,playsInline:!0,poster:e.isPlaying&&"STRTFEDEDAP"!==p&&"STRY2V4XO5L"!==p?e.url:e.poster,muted:!0,style:{backgroundColor:"white",borderRadius:e.borderRadius},children:[(0,u.jsx)("source",{src:e.url,type:"video/mp4"}),(0,u.jsx)("source",{src:(0,d.vW)(e.url),type:"video/mp4"})]}):(0,u.jsx)("div",{width:g,height:f,ref:e=>{e&&e.style.setProperty("display","block","important")}})})};var p=function(e){var t,n,l,m;const[p,f,g]=(0,c.YD)({triggerOnce:!0});if((0,i.WJ)(e.event))return(0,u.jsx)(s.Z,{height:e.height,width:e.width,url:e.url,isPlaying:e.isPlaying,timeUpdateCallback:e.timeUpdateCallback});const v=null!==(t=e.pauseFromPlayTimeInMs)&&void 0!==t?t:200;var b;if((0,r.KE)())return(0,u.jsx)(h,{borderRadius:e.borderRadius,height:"100%",width:"100%",poster:null===e||void 0===e||null===(b=e.event)||void 0===b?void 0:b.poster_image,url:(0,a.V)(e.url),isPlaying:e.isPlaying,pauseFromPlayTimeInMs:v});const x=(0,o.useRef)(null),w=null!==(n=e.height)&&void 0!==n?n:"100%",y=null!==(l=e.width)&&void 0!==l?l:"100%";return(0,o.useEffect)((()=>{x.current&&(e.isPlaying?x.current.play():x.current.pause())}),[e.isPlaying,f]),(0,u.jsx)("div",{ref:p,style:{width:w,height:y,overflow:"hidden"},children:f?(0,u.jsxs)("video",{ref:x,className:"whatmore-video-player-muted",width:y,height:w,preload:"metadata",loop:!0,playsInline:!0,muted:!0,poster:null===e||void 0===e||null===(m=e.event)||void 0===m?void 0:m.poster_image,style:{backgroundColor:"white"},children:[(0,u.jsx)("source",{src:(0,a.V)(e.url),type:"video/mp4"}),(0,u.jsx)("source",{src:(0,d.vW)(e.url),type:"video/mp4"})]}):(0,u.jsx)("div",{width:y,height:w,ref:e=>{e&&e.style.setProperty("display","block","important")}})})}},868:function(e,t,n){n.d(t,{V:function(){return i}});var o=n(9854),c=n(7753);const a={"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"},r={"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"},i=function(e){const t=(0,c.MO)("whatmoreShopId");if(!e)return e;if(e.startsWith("https://cdn.shopify.com"))return e;if("AWSCDN"==(0,o.zpr)(t))return e;if("AZURECDN"==(0,o.zpr)(t)){if(e.includes(".azureedge.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(a))if(e.includes(t))return e.replace(t,a[t]);return e}}if("BUNNYCDN"==(0,o.zpr)(t)){if(e.includes(".b-cdn.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(r))if(e.includes(t))return e.replace(t,r[t]);return e}}return e}},342:function(e,t,n){n.d(t,{$W:function(){return i},WN:function(){return r},uv:function(){return a},vW:function(){return s}});var o=n(9854);const c=(0,n(7753).MO)("whatmoreShopId"),a=function(e){var t;return"event_media_urls"in e?"image"===e.event_type?e.event_media_urls.primary.portrait.content_image_original:"secondary"in e.event_media_urls&&e.event_media_urls.secondary.portrait.content_video_1080p?e.event_media_urls.secondary.portrait.content_video_1080p:null!==(t=e.event_media_urls.primary.portrait.content_video_1080p)&&void 0!==t?t:null:e.event_hls_url},r=function(e){return"event_media_urls"in e?"image"===e.event_type?e.event_media_urls.primary.landscape.content_image_original:"secondary"in e.event_media_urls&&e.event_media_urls.secondary.landscape.content_video_1080p?e.event_media_urls.secondary.landscape.content_video_1080p:e.event_media_urls.primary.landscape.content_video_1080p:e.event_hls_url},i=function(e){if(e.startsWith("https://cdn.shopify.com")&&e.includes("whatmore_")){const t=(0,o.QFt)(c);if(!t)return e;const n=e.split("whatmore_")[1].split("?")[0];return"https://whatmore-brand-video-assets-720p.b-cdn.net/".concat(t,"/").concat(n)}return e},s=function(e){if(e.startsWith("https://cdn.shopify.com")&&e.includes("whatmore_")){const t=(0,o.QFt)(c);if(!t)return e;const n=e.split("whatmore_")[1].split("?")[0];return"https://whatmore-brand-thumbnail-video-assets.b-cdn.net/".concat(t,"/").concat(n)}return e}},9363:function(e,t,n){n.d(t,{$:function(){return r},s:function(){return a}});var o=n(9854),c=n(7753);function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=(0,c.MO)("whatmoreShopId");return"shopify"!=(0,o.Ipo)(n)?"STRNV8MHJTF"==n?e+"?format=webp":e:e+t}function r(e){var t;if(null!==e&&void 0!==e&&e.includes("https://w-media.b-cdn.net/process-media"))return"image";const n=null===e||void 0===e||null===(t=e.trim())||void 0===t?void 0:t.split("?")[0],o=/\.(jpeg|jpg|gif|png|svg|webp)$/i,c=/\.(mp4|mov|wmv|avi|flv|mkv)$/i;return null!==o&&void 0!==o&&o.test(n)?"image":null!==c&&void 0!==c&&c.test(n)?"video":void 0}},8743:function(){},9111:function(){},123:function(){},9778:function(){}}]);