whatmore-react-assets 1.0.559 → 1.0.561
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/static/js/358.0c94a912.chunk.js +1 -0
- package/static/js/554.8b92d541.chunk.js +1 -0
- package/static/js/607.64350891.chunk.js +1 -0
- package/static/js/708.da13f965.chunk.js +1 -0
- package/static/js/891.f41fc04f.chunk.js +1 -0
- package/static/js/959.96e77024.chunk.js +1 -0
- package/static/js/972.e734a089.chunk.js +1 -0
- package/whatmore.js +2 -2
- package/static/js/358.a78346d5.chunk.js +0 -1
- package/static/js/554.29047215.chunk.js +0 -1
- package/static/js/607.ff7ca3d6.chunk.js +0 -1
- package/static/js/708.58b7b24e.chunk.js +0 -1
- package/static/js/891.0ee60c18.chunk.js +0 -1
- package/static/js/959.1b8a2543.chunk.js +0 -1
- package/static/js/972.930ec16e.chunk.js +0 -1
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[358],{3827:function(e,t,n){n.r(t);var o=n(7313),i=n(6090),r=n(7616),l=(n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811),n(9302)),a=n(2575),s=n(8866),d=n(7753),p=n(7129),x=n(9039),c=n(8631),h=n(6066),u=n(8782),m=n(9821),f=(n(8984),n(7381)),v=n(6417);const g=(0,a.Z)({key:"whatmore-css-cv"});t.default=function(e){const t=e.events,[n,a,w]=(0,s.Z)(),[y,j,b,C,E]=(0,m.Z)(),[S,k]=(0,o.useState)(Array(t.length).fill(0).map((()=>Math.random()))),L=(0,d.MO)("whatmoreCollectionsTileSize"),R="portrait"==n?0:(0,d.MO)("whatmoreLandscapePadding"),M=(0,d.MO)("whatmoreCollectionsTilesSpacing"),{whatmoreRootId:Z}=(0,o.useContext)(x.I),B=e.onClick;function A(e){B(e)}(0,o.useEffect)((()=>{(0,f.Oo)("Video shopping powered by Whatmore!")}),[]),delete r.ZP.styles.global;var P=[];for(let o=0,i=!1;o<t.length;)i&&o!=t.length-1&&S[o]>.2?(P.push((0,v.jsx)(h.Z,{event1:t[o],event2:t[o+1],onClick:()=>{A(t[o-1])}},"collections-tile-"+o)),o+=2,i=!i):(P.push((0,v.jsx)(c.Z,{event:t[o],onClick:()=>{A(t[o-1])},borderRadius:"10%",removeBorders:!1},"collections-tile-"+o)),o+=1,i=!i);return(0,o.useEffect)((()=>{x.$.forEach((e=>{var t;if(!(null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-collections-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-collections-a"]')))return;const n=e.querySelector(".whatmore-render-root");n&&(n.style.minHeight="0px")}))}),[]),(0,v.jsx)(l.C,{value:g,children:(0,v.jsx)("div",{children:(0,v.jsx)(i.x,{theme:r.ZP,cssVarsRoot:Z,resetCSS:!1,children:(0,v.jsx)(p.V.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:(0,v.jsx)("div",{style:{marginLeft:R+"px",marginRight:R+"px"},children:(0,v.jsx)(u.P,{renderElement:e=>(0,v.jsx)(v.Fragment,{children:e.eventData}),dataList:P,spacing:M,defaultHeight:y*L*.01+"px",defaultWidth:j*L*.01+"px",retainAlreadyRenderedElements:!0})})})})})})}},7129:function(e,t,n){n.d(t,{V:function(){return o}});const o=(0,n(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},8631:function(e,t,n){var o=n(7313),i=n(9854),r=n(7753),l=(n(9111),n(123),n(9778),n(4892)),a=n(7129),s=n(9821),d=n(6417);t.Z=function(e){var t;const[n,p,x,c,h]=(0,s.Z)(),[u]=(0,r.j1)("whatmoreSecondaryColor"),[m]=(0,r.j1)("whatmoreShopId"),[f]=(0,r.j1)("whatmoreCollectionsTileSize"),[v,g]=(0,o.useState)(!1),w=(0,i.f63)(m);(0,o.useContext)(a.V);const y=e.event,j=e.onClick,b=e.removeBorders,C=n*f*.01,E=p*f*.01,S=null!==(t=e.borderRadius)&&void 0!==t?t:"0%";return(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:E+"px",marginLeft:b?"2px":"5px",marginRight:b?"2px":"5px",marginTop:b?"2px":"5px",marginBottom:b?"2px":"5px",cursor:"pointer"},onClick:()=>{g(!0),j(y)},className:[v?"whatmore-scale-on-tap":""].join(" "),children:(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:S,overflow:"hidden",boxShadow:b?"":"0px 1px 1px 0px "+u+"50, 0px -1px 1px 0px "+w+"50, 1px 0px 1px 0px "+u+"50, -1px 0px 1px 0px "+w+"80, 1px -1px 1px 0px "+u+"80, -1px 1px 1px 0px "+w+"DA, 1px 1px 1px 0px "+u+"DA, -1px -1px 1px 0px "+w+"DA"},children:(0,d.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:C+"px",width:E+"px",borderRadius:S,backgroundColor:"gray",overflow:"hidden"},children:(0,d.jsx)(l.Z,{height:"100%",width:"100%",url:y.thumbnail_image,isPlaying:!0,event:y})})})})}},6066:function(e,t,n){var o=n(7313),i=n(9854),r=n(7753),l=(n(9111),n(123),n(9778),n(4892)),a=n(7129),s=n(9821),d=n(6417);t.Z=function(e){var t;const[n,p,x,c,h]=(0,s.Z)(),[u]=(0,r.j1)("whatmoreSecondaryColor"),[m]=(0,r.j1)("whatmoreShopId"),[f]=(0,r.j1)("whatmoreCollectionsTileSize"),[v,g]=(0,o.useState)(!1),w=(0,i.f63)(m);(0,o.useContext)(a.V);const y=e.event1,j=e.event2,b=e.onClick,C=.01*f,E=n*C,S=n*C*.5,k=p*C,L=null!==(t=e.borderRadius)&&void 0!==t?t:"10%",R="15%",M=e.removeBorders;return(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",flexShrink:0,height:E+"px",width:k+"px",marginLeft:M?"2px":"5px",marginRight:M?"2px":"5px",marginTop:M?"2px":"5px",marginBottom:M?"2px":"5px",cursor:"pointer"},children:(0,d.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:M?"0px":L,boxShadow:M?"":"0px 1px 1px 0px "+u+"50, 0px -1px 1px 0px "+w+"50, 1px 0px 1px 0px "+u+"50, -1px 0px 1px 0px "+w+"80, 1px -1px 1px 0px "+u+"80, -1px 1px 1px 0px "+w+"DA, 1px 1px 1px 0px "+u+"DA, -1px -1px 1px 0px "+w+"DA"},onClick:()=>{g(!0),b(y)},className:[v?"whatmore-scale-on-tap":""].join(" "),children:[(0,d.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:S+"px",width:k+"px",borderTopLeftRadius:M?"0px":R,borderTopRightRadius:M?"0px":R,borderBottom:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,d.jsx)(l.Z,{height:"100%",width:"100%",url:y.thumbnail_image,isPlaying:!0,event:y})}),(0,d.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:S+"px",width:k+"px",borderBottomLeftRadius:M?"0px":R,borderBottomRightRadius:M?"0px":R,borderTop:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,d.jsx)(l.Z,{height:"100%",width:"100%",url:j.thumbnail_image,isPlaying:!0,event:j})})]})})}},8782:function(e,t,n){n.d(t,{P:function(){return a}});var o=n(3933),i=n(7313),r=(n(123),n(6417));function l(e){const{ref:t,inView:n,entry:i}=(0,o.YD)({triggerOnce:e.retainAlreadyRenderedElements});return(0,r.jsx)("div",{ref:t,children:n?e.renderElement({eventData:e.data}):(0,r.jsx)("div",{style:{minWidth:e.defaultHeight,minHeight:e.defaultWidth}})})}function a(e){var t;return(0,i.useEffect)((()=>{const e=document.querySelector(".whatmore-carousel-horizontal-flex");let t,n=!1;function o(e){e.touches&&(null===e||void 0===e?void 0:e.touches.length)>0?(n=!0,t=e.touches[0].clientX):(n=!0,t=e.clientX)}function i(o){if(!n)return;const i=o.touches?o.touches[0].clientX:o.clientX;e.style.pointerEvents="none";const r=2*(t-i);e.scrollLeft+=r,t=i}function r(t){e.style.pointerEvents="auto",n=!1}return e&&("ontouchstart"in window&&(e.addEventListener("touchstart",o),e.addEventListener("touchmove",i),e.addEventListener("touchend",r)),e.addEventListener("mousedown",o),document.addEventListener("mousemove",i),document.addEventListener("mouseup",r)),()=>{e&&("ontouchstart"in window&&(e.removeEventListener("touchstart",o),e.removeEventListener("touchmove",i),e.removeEventListener("touchend",r)),e.removeEventListener("mousedown",o),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",r))}}),[]),(0,r.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",height:"fit-content",width:"100%",gap:null!==(t=e.spacing)&&void 0!==t?t:3},className:"whatmore-carousel-horizontal-flex",children:e.dataList.map(((t,n)=>(0,r.jsx)(l,{renderElement:e.renderElement,data:t,defaultHeight:e.defaultHeight,defaultWidth:e.defaultWidth,retainAlreadyRenderedElements:e.retainAlreadyRenderedElements},"key-"+n)))})}},9111:function(){},5892:function(){},4444:function(){},1811:function(){},6143:function(){},7850:function(){},9778:function(){}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[554],{9085:function(t,e,o){o.r(e),o.d(e,{default:function(){return I}});var n=o(7313),r=(o(3439),o(6090)),i=o(9039),l=o(7616),s=(o(6143),o(7850),o(4444),o(7244),o(123),o(5892),o(1811),o(9302)),a=o(2575),c=o(9821),d=o(8866),p=o(2279),h=o.n(p),u=o(7753),x=o(7129),m=o(1855),y=o(9854),f=o(7376),v=o(778),g=o(4892),w=o(5945),j=o(9219),M=o(6805),P=o(8984),C=o(6417);var S=function(t){var e,o,r,l,s,a,d,p,h,m;const[f,v,S,b,O]=(0,c.Z)(),k=(0,u.MO)("whatmoreShopId"),E="portrait"===O[M.YP],I=(E?1.076*v*(0,y.pEd)(k):v*(0,y.H4g)(k))+"px",N=(E?1.076*v*(0,y.pEd)(k):v*(0,y.H4g)(k))+"px",T=(E?.965*v*(0,y.pEd)(k):.859*v*(0,y.H4g)(k))+"px",[W,Z]=(0,n.useState)(t.event),F=(0,u.MO)("whatmoreSecondaryColor");var R=(0,n.useContext)(x.V);const z=null===(e=t.isOnFocus)||void 0===e||e,_=null!==(o=t.playOnUnfocus)&&void 0!==o&&o,D=t.onClick,{whatmoreUITheme:L}=(0,n.useContext)(i.I),U=null!==(r=t.animateOnFocus&&(0,y.iWI)(k))&&void 0!==r&&r,[Y,A]=(0,n.useState)(!(0,y.N8M)(k)),B=(0,u.MO)("whatmorePrimaryFont"),H=Math.round(+(null===(l=W.products[0])||void 0===l?void 0:l.price)),X=Math.round(+(null===(s=W.products[0])||void 0===s?void 0:s.compare_price)),G=X&&0!=X&&X>H?Math.ceil((X-H)/X*100):NaN,[V,q]=(0,n.useState)(G);return(0,n.useEffect)((()=>{(0,y.N8M)(k)&&(0,j.p_)(W,(0,y.Ipo)(k),k).then((t=>{var e,o,n;Z(t),(null===t||void 0===t||null===(e=t.products)||void 0===e||null===(o=e[0])||void 0===o?void 0:o.discount)&&q(null===t||void 0===t||null===(n=t.products[0])||void 0===n?void 0:n.discount),A(!0)}))}),[]),(0,C.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top",R.tileTopMargin+"px","important"),t.style.setProperty("margin-bottom",R.tileBottomMMargin+"px","important"))},className:U&&!E?z?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",style:{margin:"0 auto",cursor:"pointer",width:v},onClick:()=>{D(W)},children:[(0,C.jsx)("div",{style:{borderRadius:"round"==L?"5%":"0px",boxShadow:"round"==L?"0px 0px 5px 0px #B0B0B0":null,height:f,borderWidth:(0,y.alU)(k),borderColor:(0,y.qPe)(k),overflow:"hidden"},children:(0,C.jsx)(g.Z,{height:"100%",width:"100%",url:W.thumbnail_image,isPlaying:z||_||(0,P.gE)(),event:W})}),(0,C.jsxs)("div",{style:{display:"flex",flexDirection:"column",padding:"12px 4px",gap:"5px"},children:[(0,C.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-size",I,"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",B,"important"),t.style.setProperty("-webkit-line-clamp",1,"important"),t.style.setProperty("line-clamp",1,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},children:(0,w.s)(null===(a=W.products[0])||void 0===a?void 0:a.title)}),Y&&(0,C.jsxs)("div",{style:{display:"flex",gap:"12px",flexDirection:(0,y.$zZ)(k)?"row":"row-reverse",justifyContent:(0,y.$zZ)(k)?"flex-start":"flex-end"},children:[(0,C.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y.Uyp)(k),"important"),t.style.setProperty("font-size",N,"important"),t.style.setProperty("font-family",B,"important"),t.style.setProperty("overflow","hidden","important"))},style:{textAlign:"left",fontWeight:"bold"},children:(0,j.jx)(parseFloat(null===(d=W.products[0])||void 0===d?void 0:d.price)," ",k,null===(p=W.products[0])||void 0===p?void 0:p.currency)}),!isNaN(X)&&X>H&&(0,C.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y.kPs)(k),"important"),t.style.setProperty("font-size",N,"important"),t.style.setProperty("font-family",B,"important"),t.style.setProperty("overflow","hidden","important"))},style:{textDecoration:"line-through"},children:(0,j.jx)(parseFloat(null===(h=W.products[0])||void 0===h?void 0:h.compare_price)," ",k,null===(m=W.products[0])||void 0===m?void 0:m.currency)})]}),!isNaN(V)&&0!=V&&Y&&(0,C.jsx)("div",{style:{display:"flex",backgroundColor:"#343434"==F?(0,y.ZJm)(k):F,alignItems:"center",borderRadius:"4px",width:"fit-content",padding:"3px 6px"},children:(0,C.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y.mso)(k),"important"),t.style.setProperty("font-size",T,"important"),t.style.setProperty("font-family",B,"important"))},children:"".concat(V,"% Off")})})]})]})},b=o(7381);const O=(0,a.Z)({key:"whatmore-css-hv"});function k(t){const[e,o,r]=(0,c.Z)(),l=(0,u.MO)("whatmoreShopId"),s=t.events,a=t.onClick,{whatmoreWidgetSourceDetails:d}=(0,n.useContext)(i.I),p=Math.ceil(r),h=2*p,[x,g]=(0,n.useState)(h),[w,j]=(0,n.useState)(2*p),M=0===(0,y.WGf)(l)?24:(0,y.WGf)(l),[P,b]=(0,n.useState)({touchX:0,touchY:0}),O=t=>{if("next"===t){const t=2;j((t=>Math.min(t+Math.floor(r),s.length+p+1))),g((e=>Math.min(e+t,s.length+p+1)))}else j((t=>Math.max(t-Math.floor(r),h)));(0,f.y4)({userInteractionType:v.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:d})};return(0,C.jsx)("div",{className:"whatmore-events-carousel-portrait",style:{display:"flex",justifyContent:"flex-start",paddingLeft:"12px",overflow:"hidden"},onTouchStart:t=>{b({touchX:t.touches[0].clientX,touchY:t.touches[0].clientY})},onTouchEnd:t=>{var e,o,n,r;const i=(null===(e=t.changedTouches)||void 0===e||null===(o=e[0])||void 0===o?void 0:o.clientX)-P.touchX,l=(null===(n=t.changedTouches)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.clientY)-P.touchY;Math.sqrt(i**2+l**2)>10&&Math.abs(i)>Math.abs(l)&&O(i>0?"prev":"next")},children:(0,C.jsx)("div",{style:{display:"flex",gap:M,transform:"translateX(-".concat((w-h)*(o+M),"px)"),transition:"transform 0.4s ease-in-out"},children:s.map(((t,e)=>e<x?(0,C.jsx)("div",{children:(0,C.jsx)(S,{isOnFocus:e<=w-p-1&&e>=Math.max(0,w-h),playOnUnfocus:!1,animateOnFocus:!0,event:t,onClick:()=>a(t)})},"whatmore-carousel-tile-".concat(e)):(0,C.jsx)(m.Z,{})))})})}function E(t){const[e,o,r,l]=(0,c.Z)(),[s,a]=(0,n.useState)(-1),d=(0,u.MO)("whatmoreShopId"),[p,x]=(0,n.useState)("next"),m=t.onClick,g=t.events,{whatmoreWidgetSourceDetails:w}=(0,n.useContext)(i.I),j=Math.min(Math.ceil(r),g.length),[M,P]=(0,n.useState)(0),b=0===(0,y.WGf)(d)?24:(0,y.WGf)(d),O=()=>(0,C.jsx)("div",{children:(0,C.jsx)("button",{onClick:N,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,C.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-right"})})}),k=()=>(0,C.jsx)("div",{children:(0,C.jsx)("button",{onClick:I,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,C.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-left"})})});(0,n.useEffect)((()=>{M<=j&&P((t=>t+j))}),[j]);const E=()=>{a(-1)},I=()=>{M!==j&&(x("prev"),P((t=>Math.max(Math.ceil(t-r),j))),(0,f.y4)({userInteractionType:v.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:w}))},N=()=>{M>g.length+r||(x("next"),P((t=>Math.floor(t+r))),(0,f.y4)({userInteractionType:v.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:w}))},T=M>g.length?g.length-j+1:M-j,W=M>=g.length?g.length:T+j,Z=g.slice(T,W);return(0,C.jsxs)("div",{className:"whatmore-events-carousel-landscape",style:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"".concat(l,"px"),paddingRight:"".concat(l,"px")},children:[g.length>=r-1&&(0,C.jsx)("div",{style:{position:"absolute",left:"0",zIndex:100,top:"50%",transform:"translateX(50%) translateY(-65%)"},children:M!==j&&(0,C.jsx)(k,{})}),(0,C.jsx)("div",{style:{display:"flex",gap:b+"px",width:"".concat(o*r*(0,y.Su5)(d),"px"),paddingLeft:"8px",justifyContent:g.length<=r-1?"center":"flex-start",overflow:"hidden"},children:Z.map(((t,e)=>{const o="whatmore-event-tile-landscape-".concat(t.index).concat(e===j-1?"-last":""),n=e===s;return(0,C.jsx)("div",{className:"whatmore-event-tile-horizontal-swipe-animation-".concat("next"===p?"next":"prev"),onMouseEnter:()=>(t=>{const e=h()((()=>a(t)),300);return e(),e.cancel})(e),onMouseLeave:E,children:(0,C.jsx)(S,{isOnFocus:n,playOnUnfocus:!0,animateOnFocus:!0,event:t,onClick:()=>(t=>{m(t)})(t)})},o)}))}),g.length>=r-1&&(0,C.jsx)("div",{style:{position:"absolute",zIndex:100,top:"50%",right:l+"px",transform:"translateY(-65%)"},children:M<=g.length&&(0,C.jsx)(O,{})})]})}var I=function(t){var e;const[o,a,c]=(0,d.Z)(),[p]=(0,u.j1)("whatmoreShopId"),[h]=(0,u.j1)("whatmorePrimaryColor"),[m]=(0,u.j1)("whatmoreSecondaryColor"),[f]=(0,u.j1)("whatmoreTitleFont"),v="portrait"==o?(0,u.MO)("whatmoreTitleFontSizePortrait"):(0,u.MO)("whatmoreTitleFontSize"),{whatmoreRootId:g}=(0,n.useContext)(i.I),w=t.events,j=t.onClick,M=null!==(e=(0,y.aRS)(p))&&void 0!==e?e:f;function P(t){j(t)}return(0,n.useEffect)((()=>{(0,b.Oo)("Video shopping powered by Whatmore!")}),[]),(0,n.useEffect)((()=>{i.$.forEach((t=>{var e;const o=null!==(e=t.querySelector('.whatmore-template-type[data-wh="template-f"]'))&&void 0!==e?e:t.querySelector('.whatmore-template-type[data="template-f"]');if(!o)return;const n=t.querySelector(".whatmore-render-root");o&&n&&(n.style.minHeight="0px")}))}),[]),delete l.ZP.styles.global,(0,C.jsx)(s.C,{value:O,children:(0,C.jsx)("div",{children:(0,C.jsx)(r.x,{theme:l.ZP,cssVarsRoot:g,resetCSS:!1,children:(0,C.jsxs)(x.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[t.heading.trim().length>0?(0,C.jsx)("div",{className:"whatmore-events-carousel",style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,C.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",M,"important"),t.style.setProperty("font-size",v+"px","important"))},style:{color:h,backgroundClip:"text",textAlign:"center",fontWeight:(0,y.wOV)(p),lineHeight:(0,y.vY4)(p),letterSpacing:(0,y.X2K)(p)},children:t.heading})}):(0,C.jsx)(C.Fragment,{}),"landscape"===o?(0,C.jsx)(E,{events:w,onClick:P}):(0,C.jsx)(k,{events:w,onClick:P})]})})})})}},7129:function(t,e,o){o.d(e,{V:function(){return n}});const n=(0,o(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},1855:function(t,e,o){var n=o(7313),r=o(9821),i=o(7129),l=o(6417);e.Z=function(t){var[e,o]=(0,r.Z)();return(0,n.useContext)(i.V),t.event,(0,l.jsx)("div",{style:{margin:"0 auto",width:o,height:e,overflow:"hidden"}})}},3439:function(){},5892:function(){},4444:function(){},1811:function(){},7850:function(){}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[607],{6071:function(e,t,n){n.r(t);var o=n(7313),i=n(6090),r=n(7616),l=(n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811),n(9302)),a=n(2575),s=(n(8984),n(8866)),d=n(7753),p=n(7129),x=n(9039),c=n(8631),h=n(6066),u=n(8782),m=n(9821),f=(n(4862),n(7381)),v=n(6417);const g=(0,a.Z)({key:"whatmore-css-cv"});t.default=function(e){const t=e.events,[n,a,w]=(0,s.Z)(),[y,j]=(0,o.useState)(Array(t.length).fill(0).map((()=>Math.random()))),[b,C,E,S,k]=(0,m.Z)(),L=(0,d.MO)("whatmoreCollectionsTileSize"),R="portrait"==n?0:(0,d.MO)("whatmoreLandscapePadding"),M=(0,d.MO)("whatmoreCollectionsTilesSpacing"),{whatmoreRootId:Z}=(0,o.useContext)(x.I),B=e.onClick;function A(e){B(e)}delete r.ZP.styles.global;var P=[];for(let o=0,i=!1;o<t.length;)i&&o!=t.length-1&&y[o]>.2?(P.push((0,v.jsx)(h.Z,{event1:t[o],event2:t[o+1],onClick:()=>{A(t[o-1])},removeBorders:!0},"collections-tile-"+o)),o+=2,i=!i):(P.push((0,v.jsx)(c.Z,{event:t[o],onClick:()=>{A(t[o-1])},removeBorders:!0,borderRadius:"0%"},"collections-tile-"+o)),o+=1,i=!i);return(0,o.useEffect)((()=>{(0,f.Oo)("Video shopping powered by Whatmore!")}),[]),(0,o.useEffect)((()=>{x.$.forEach((e=>{var t;if(!(null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-collections-b"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-collections-b"]')))return;const n=e.querySelector(".whatmore-render-root");n&&(n.style.minHeight="0px")}))}),[]),(0,v.jsx)(l.C,{value:g,children:(0,v.jsx)("div",{children:(0,v.jsx)(i.x,{theme:r.ZP,cssVarsRoot:Z,resetCSS:!1,children:(0,v.jsx)(p.V.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:(0,v.jsx)("div",{style:{marginLeft:R+"px",marginRight:R+"px"},children:(0,v.jsx)(u.P,{renderElement:e=>(0,v.jsx)(v.Fragment,{children:e.eventData}),dataList:P,spacing:M,defaultHeight:b*L*.01+"px",defaultWidth:C*L*.01+"px",retainAlreadyRenderedElements:!0})})})})})})}},7129:function(e,t,n){n.d(t,{V:function(){return o}});const o=(0,n(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},8631:function(e,t,n){var o=n(7313),i=n(9854),r=n(7753),l=(n(9111),n(123),n(9778),n(4892)),a=n(7129),s=n(9821),d=n(6417);t.Z=function(e){var t;const[n,p,x,c,h]=(0,s.Z)(),[u]=(0,r.j1)("whatmoreSecondaryColor"),[m]=(0,r.j1)("whatmoreShopId"),[f]=(0,r.j1)("whatmoreCollectionsTileSize"),[v,g]=(0,o.useState)(!1),w=(0,i.f63)(m);(0,o.useContext)(a.V);const y=e.event,j=e.onClick,b=e.removeBorders,C=n*f*.01,E=p*f*.01,S=null!==(t=e.borderRadius)&&void 0!==t?t:"0%";return(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:E+"px",marginLeft:b?"2px":"5px",marginRight:b?"2px":"5px",marginTop:b?"2px":"5px",marginBottom:b?"2px":"5px",cursor:"pointer"},onClick:()=>{g(!0),j(y)},className:[v?"whatmore-scale-on-tap":""].join(" "),children:(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:S,overflow:"hidden",boxShadow:b?"":"0px 1px 1px 0px "+u+"50, 0px -1px 1px 0px "+w+"50, 1px 0px 1px 0px "+u+"50, -1px 0px 1px 0px "+w+"80, 1px -1px 1px 0px "+u+"80, -1px 1px 1px 0px "+w+"DA, 1px 1px 1px 0px "+u+"DA, -1px -1px 1px 0px "+w+"DA"},children:(0,d.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:C+"px",width:E+"px",borderRadius:S,backgroundColor:"gray",overflow:"hidden"},children:(0,d.jsx)(l.Z,{height:"100%",width:"100%",url:y.thumbnail_image,isPlaying:!0,event:y})})})})}},6066:function(e,t,n){var o=n(7313),i=n(9854),r=n(7753),l=(n(9111),n(123),n(9778),n(4892)),a=n(7129),s=n(9821),d=n(6417);t.Z=function(e){var t;const[n,p,x,c,h]=(0,s.Z)(),[u]=(0,r.j1)("whatmoreSecondaryColor"),[m]=(0,r.j1)("whatmoreShopId"),[f]=(0,r.j1)("whatmoreCollectionsTileSize"),[v,g]=(0,o.useState)(!1),w=(0,i.f63)(m);(0,o.useContext)(a.V);const y=e.event1,j=e.event2,b=e.onClick,C=.01*f,E=n*C,S=n*C*.5,k=p*C,L=null!==(t=e.borderRadius)&&void 0!==t?t:"10%",R="15%",M=e.removeBorders;return(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",flexShrink:0,height:E+"px",width:k+"px",marginLeft:M?"2px":"5px",marginRight:M?"2px":"5px",marginTop:M?"2px":"5px",marginBottom:M?"2px":"5px",cursor:"pointer"},children:(0,d.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:M?"0px":L,boxShadow:M?"":"0px 1px 1px 0px "+u+"50, 0px -1px 1px 0px "+w+"50, 1px 0px 1px 0px "+u+"50, -1px 0px 1px 0px "+w+"80, 1px -1px 1px 0px "+u+"80, -1px 1px 1px 0px "+w+"DA, 1px 1px 1px 0px "+u+"DA, -1px -1px 1px 0px "+w+"DA"},onClick:()=>{g(!0),b(y)},className:[v?"whatmore-scale-on-tap":""].join(" "),children:[(0,d.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:S+"px",width:k+"px",borderTopLeftRadius:M?"0px":R,borderTopRightRadius:M?"0px":R,borderBottom:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,d.jsx)(l.Z,{height:"100%",width:"100%",url:y.thumbnail_image,isPlaying:!0,event:y})}),(0,d.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:S+"px",width:k+"px",borderBottomLeftRadius:M?"0px":R,borderBottomRightRadius:M?"0px":R,borderTop:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,d.jsx)(l.Z,{height:"100%",width:"100%",url:j.thumbnail_image,isPlaying:!0,event:j})})]})})}},8782:function(e,t,n){n.d(t,{P:function(){return a}});var o=n(3933),i=n(7313),r=(n(123),n(6417));function l(e){const{ref:t,inView:n,entry:i}=(0,o.YD)({triggerOnce:e.retainAlreadyRenderedElements});return(0,r.jsx)("div",{ref:t,children:n?e.renderElement({eventData:e.data}):(0,r.jsx)("div",{style:{minWidth:e.defaultHeight,minHeight:e.defaultWidth}})})}function a(e){var t;return(0,i.useEffect)((()=>{const e=document.querySelector(".whatmore-carousel-horizontal-flex");let t,n=!1;function o(e){e.touches&&(null===e||void 0===e?void 0:e.touches.length)>0?(n=!0,t=e.touches[0].clientX):(n=!0,t=e.clientX)}function i(o){if(!n)return;const i=o.touches?o.touches[0].clientX:o.clientX;e.style.pointerEvents="none";const r=2*(t-i);e.scrollLeft+=r,t=i}function r(t){e.style.pointerEvents="auto",n=!1}return e&&("ontouchstart"in window&&(e.addEventListener("touchstart",o),e.addEventListener("touchmove",i),e.addEventListener("touchend",r)),e.addEventListener("mousedown",o),document.addEventListener("mousemove",i),document.addEventListener("mouseup",r)),()=>{e&&("ontouchstart"in window&&(e.removeEventListener("touchstart",o),e.removeEventListener("touchmove",i),e.removeEventListener("touchend",r)),e.removeEventListener("mousedown",o),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",r))}}),[]),(0,r.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",height:"fit-content",width:"100%",gap:null!==(t=e.spacing)&&void 0!==t?t:3},className:"whatmore-carousel-horizontal-flex",children:e.dataList.map(((t,n)=>(0,r.jsx)(l,{renderElement:e.renderElement,data:t,defaultHeight:e.defaultHeight,defaultWidth:e.defaultWidth,retainAlreadyRenderedElements:e.retainAlreadyRenderedElements},"key-"+n)))})}},9111:function(){},5892:function(){},4444:function(){},1811:function(){},6143:function(){},7850:function(){},9778:function(){}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[708],{1291:function(e,t,n){n.r(t);var o=n(7313),r=n(6090),i=n(7616),l=n(9039),a=(n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811),n(9302)),s=n(2575),c=n(8866),d=n(7753),h=n(7129),u=n(8631),p=n(9821),m=n(8782),x=n(7381),f=n(9854),v=n(6417);const g=(0,s.Z)({key:"whatmore-css-cv"});t.default=function(e){var t;const[n,s,w]=(0,c.Z)(),[y,j,E,C,S]=(0,p.Z)(),L=(0,d.MO)("whatmoreCollectionsTileSize"),M="portrait"==n?0:(0,d.MO)("whatmoreLandscapePadding"),k=(0,d.MO)("whatmoreCollectionsTilesSpacing"),R=(0,d.MO)("whatmoreShopId"),[b]=(0,d.MO)("whatmorePrimaryColor"),{whatmoreRootId:P}=(0,o.useContext)(l.I),O=e.events,F=e.onClick,T=(0,d.MO)("whatmoreTitleFont"),Z="portrait"==n?(0,d.MO)("whatmoreTitleFontSizePortrait"):(0,d.MO)("whatmoreTitleFontSize"),A=null!==(t=(0,f.aRS)(R))&&void 0!==t?t:T;delete i.ZP.styles.global;var z=[];for(let o=0;o<O.length;)z.push((0,v.jsx)(u.Z,{event:O[o],onClick:()=>{var e;e=O[o-1],F(e)},removeBorders:!0,borderRadius:"5%"},"collections-tile-"+o)),o+=1;return(0,o.useEffect)((()=>{(0,x.Oo)("Video shopping powered by Whatmore!")}),[]),(0,o.useEffect)((()=>{l.$.forEach((e=>{var t;const n=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-collections-c"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-collections-c"]');if(!n)return;const o=e.querySelector(".whatmore-render-root");n&&o&&(o.style.minHeight="0px")}))}),[]),(0,v.jsx)(a.C,{value:g,children:(0,v.jsx)("div",{children:(0,v.jsx)(r.x,{theme:i.ZP,cssVarsRoot:P,resetCSS:!1,children:(0,v.jsxs)(h.V.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:[e.heading.trim().length>0?(0,v.jsx)("div",{className:"whatmore-events-carousel",style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,v.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-family",A,"important"),e.style.setProperty("font-size",Z+"px","important"))},style:{color:b,backgroundClip:"text",textAlign:"center",fontWeight:(0,f.wOV)(R),lineHeight:(0,f.vY4)(R),letterSpacing:(0,f.X2K)(R)},children:e.heading})}):(0,v.jsx)(v.Fragment,{}),(0,v.jsx)("div",{style:{marginLeft:M+"px",marginRight:M+"px"},children:(0,v.jsx)(m.P,{renderElement:e=>(0,v.jsx)(v.Fragment,{children:e.eventData}),dataList:z,spacing:k,defaultHeight:y*L*.01+"px",defaultWidth:j*L*.01+"px",retainAlreadyRenderedElements:!0})})]})})})})}},7129:function(e,t,n){n.d(t,{V:function(){return o}});const o=(0,n(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},8631:function(e,t,n){var o=n(7313),r=n(9854),i=n(7753),l=(n(9111),n(123),n(9778),n(4892)),a=n(7129),s=n(9821),c=n(6417);t.Z=function(e){var t;const[n,d,h,u,p]=(0,s.Z)(),[m]=(0,i.j1)("whatmoreSecondaryColor"),[x]=(0,i.j1)("whatmoreShopId"),[f]=(0,i.j1)("whatmoreCollectionsTileSize"),[v,g]=(0,o.useState)(!1),w=(0,r.f63)(x);(0,o.useContext)(a.V);const y=e.event,j=e.onClick,E=e.removeBorders,C=n*f*.01,S=d*f*.01,L=null!==(t=e.borderRadius)&&void 0!==t?t:"0%";return(0,c.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:S+"px",marginLeft:E?"2px":"5px",marginRight:E?"2px":"5px",marginTop:E?"2px":"5px",marginBottom:E?"2px":"5px",cursor:"pointer"},onClick:()=>{g(!0),j(y)},className:[v?"whatmore-scale-on-tap":""].join(" "),children:(0,c.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:L,overflow:"hidden",boxShadow:E?"":"0px 1px 1px 0px "+m+"50, 0px -1px 1px 0px "+w+"50, 1px 0px 1px 0px "+m+"50, -1px 0px 1px 0px "+w+"80, 1px -1px 1px 0px "+m+"80, -1px 1px 1px 0px "+w+"DA, 1px 1px 1px 0px "+m+"DA, -1px -1px 1px 0px "+w+"DA"},children:(0,c.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:C+"px",width:S+"px",borderRadius:L,backgroundColor:"gray",overflow:"hidden"},children:(0,c.jsx)(l.Z,{height:"100%",width:"100%",url:y.thumbnail_image,isPlaying:!0,event:y})})})})}},8782:function(e,t,n){n.d(t,{P:function(){return a}});var o=n(3933),r=n(7313),i=(n(123),n(6417));function l(e){const{ref:t,inView:n,entry:r}=(0,o.YD)({triggerOnce:e.retainAlreadyRenderedElements});return(0,i.jsx)("div",{ref:t,children:n?e.renderElement({eventData:e.data}):(0,i.jsx)("div",{style:{minWidth:e.defaultHeight,minHeight:e.defaultWidth}})})}function a(e){var t;return(0,r.useEffect)((()=>{const e=document.querySelector(".whatmore-carousel-horizontal-flex");let t,n=!1;function o(e){e.touches&&(null===e||void 0===e?void 0:e.touches.length)>0?(n=!0,t=e.touches[0].clientX):(n=!0,t=e.clientX)}function r(o){if(!n)return;const r=o.touches?o.touches[0].clientX:o.clientX;e.style.pointerEvents="none";const i=2*(t-r);e.scrollLeft+=i,t=r}function i(t){e.style.pointerEvents="auto",n=!1}return e&&("ontouchstart"in window&&(e.addEventListener("touchstart",o),e.addEventListener("touchmove",r),e.addEventListener("touchend",i)),e.addEventListener("mousedown",o),document.addEventListener("mousemove",r),document.addEventListener("mouseup",i)),()=>{e&&("ontouchstart"in window&&(e.removeEventListener("touchstart",o),e.removeEventListener("touchmove",r),e.removeEventListener("touchend",i)),e.removeEventListener("mousedown",o),document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",i))}}),[]),(0,i.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",height:"fit-content",width:"100%",gap:null!==(t=e.spacing)&&void 0!==t?t:3},className:"whatmore-carousel-horizontal-flex",children:e.dataList.map(((t,n)=>(0,i.jsx)(l,{renderElement:e.renderElement,data:t,defaultHeight:e.defaultHeight,defaultWidth:e.defaultWidth,retainAlreadyRenderedElements:e.retainAlreadyRenderedElements},"key-"+n)))})}},9111:function(){},5892:function(){},4444:function(){},1811:function(){},6143:function(){},7850:function(){},9778:function(){}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[891],{3867:function(t,e,o){var i=o(8816),n=o(417),r=o(4885),l=o(7753),s=o(9039),a=o(7313),d=o(6417);e.Z=function(t){var e;const{whatmoreUITheme:o}=(0,a.useContext)(s.I),[p]=(0,l.j1)("whatmoreSecondaryColor"),[c,h]=(0,l.j1)("productRatings"),x=(0,l.MO)("whatmorePrimaryFont"),y=(t.storeId,t.productId),u=(t.productLink,t.fontSize),m=null!==(e=t.fontColor)&&void 0!==e?e:"gray";if(null===c||"undefined"==typeof c||!(y in c)||c[y].avgRating>5)return(0,d.jsx)(d.Fragment,{});const f=c[y].avgRating,g=c[y].totalRatings;return(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,d.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center",gap:"0px"},children:[[...Array(Math.floor(f))].map(((t,e)=>(0,d.jsx)(i.Z,{sx:{color:p,fontSize:u+"px"}},"star-icon"+e))),f-Math.floor(f)>.2?(0,d.jsx)(n.Z,{sx:{color:p,fontSize:u+"px"}},"star-half-icon"):f-Math.floor(f)==0?(0,d.jsx)(d.Fragment,{}):(0,d.jsx)(r.Z,{sx:{color:p,fontSize:u+"px"}},"star-outline-icon"),[...Array(Math.floor(5-f))].map(((t,e)=>(0,d.jsx)(r.Z,{sx:{color:p,fontSize:u+"px"}},"star-outline-icon-"+e))),(0,d.jsx)("div",{children:(0,d.jsx)("div",{width:"2px"})}),(0,d.jsx)("div",{children:(0,d.jsx)("div",{style:{backgroundColor:p,borderRadius:"round"==o?"2px":"0px",padding:"1px",overflow:"hidden"},children:(0,d.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color","white","important"),t.style.setProperty("font-size",.8*u+"px","important"),t.style.setProperty("font-family",x,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"medium"},children:["\xa0",f,"\xa0"]})})}),(0,d.jsx)("div",{children:(0,d.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color",m,"important"),t.style.setProperty("font-size",.8*u+"px","important"),t.style.setProperty("font-family",x,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"medium"},children:["\xa0","("+g+")"]})})]})})}},4095:function(t,e,o){o.r(e),o.d(e,{default:function(){return E}});var i=o(7313),n=o(6090),r=o(7616),l=o(9039),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),h=o(8866),x=o(2279),y=o.n(x),u=o(7753),m=o(7129),f=o(9854),g=o(1855),w=o(4892),v=o(3933),j=o(1092),P=o(5945),C=o(5456),b=o(3867),I=o(9219),S=o(9363),k=o(6417);const O=i.lazy((()=>Promise.all([o.e(576),o.e(955),o.e(209),o.e(12)]).then(o.bind(o,6163))));var F=function(t){const{whatmoreUITheme:e}=(0,i.useContext)(l.I);var[o,n]=(0,c.Z)();const[r]=(0,u.j1)("whatmorePrimaryFont"),[s]=(0,u.j1)("whatmoreSecondaryColorShade900"),[a]=(0,u.j1)("whatmoreShopId"),[d,p]=(0,i.useState)(0),[h,x]=(0,i.useState)(t.event),y=t.onClick;if(0==h.products.length)return(0,k.jsx)(k.Fragment,{});(0,i.useEffect)((()=>{(0,f.N8M)(a)&&(0,I.p_)(h,(0,f.Ipo)(a),a).then((t=>{x(t)}))}),[]);const m=.3*n,g=m+"px",w=m+"px",v=.05*n+"px",j=.07*n,F=j+"px",M=.05*n;return(0,k.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-around",alignItems:"center",marginTop:"2px",marginBottom:"2px",gap:"0px"},children:[(0,k.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:.95*n,height:"fit-content",paddingLeft:"4px",paddingRight:"4px",justifyContent:"space-between",alignItems:"center",gap:"4px"},className:"whatmore-event-tile-product-scale-in-and-out-animation",onClick:y,children:[(0,k.jsx)("div",{style:{width:g,height:w,overflow:"hidden",backgroundColor:s,borderRadius:"round"==e?"5px":"0px",borderWidth:"0px"==(0,f.alU)(a)?"2px":(0,f.alU)(a),borderColor:"white"==(0,f.qPe)(a)?s:(0,f.qPe)(a)},children:(0,k.jsx)("img",{ref:t=>{t&&t.style.setProperty("object-fit",(0,f.yOX)(a),"important")},src:(0,S.s)(h.products[d].thumbnail_image,"&width=".concat(400,"&height=",400)),style:{width:g,height:g,borderRadius:"round"==e?"5px":"0px",backgroundColor:s},alt:"product image"})}),(0,k.jsx)("div",{style:{width:.7*n+"px",height:"100%",overflow:"visible",marginBottom:"2px",marginRight:"2px",borderRadius:"round"==e?"5px":"0px"},children:(0,k.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",paddingTop:"5px"},children:[(0,k.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,k.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",v,"important"),t.style.setProperty("line-height","140%","important"),t.style.setProperty("font-family",r,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"medium"},children:(0,P.s)(h.products[d].title)})}),(0,k.jsxs)("div",{style:{display:"flex",flexFlow:(0,f.$zZ)(a)?"row nowrap":"row-reverse nowrap",width:"100%",height:"fit-content",justifyContent:(0,f.$zZ)(a)?"flex-start":"flex-end",alignItems:"center",gap:"4px"},children:[(0,k.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,f.Uyp)(a),"important"),t.style.setProperty("font-size",F,"important"),t.style.setProperty("line-height","140%","important"),t.style.setProperty("font-family",r,"important"))},style:{textAlign:"left",fontWeight:"medium",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:1,overflow:"hidden",textOverflow:"ellipsis"},children:[" ",(0,I.jx)(parseFloat(h.products[d].price),"",a,h.products[d].currency)]}),(0,C.B)(h.products[d].price,h.products[d].compare_price)?(0,k.jsxs)("strike",{ref:t=>{t&&(t.style.setProperty("color",(0,f.kPs)(a),"important"),t.style.setProperty("font-size",.9*j+"px","important"),t.style.setProperty("line-height","140%","important"),t.style.setProperty("font-family",r,"important"),t.style.setProperty("text-decoration","line-through","important"))},style:{textAlign:"left",fontWeight:"medium",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:1,overflow:"hidden",textOverflow:"ellipsis"},children:[" ",(0,I.jx)(parseFloat(h.products[d].compare_price),"",a,h.products[d].currency)]}):(0,k.jsx)(k.Fragment,{})]}),(0,k.jsx)(b.Z,{storeId:a,productId:h.products[d].client_product_id,productLink:h.products[d].product_link,fontSize:M})]})})]},d),(0,f.IXJ)(a)?(0,k.jsx)(i.Suspense,{children:(0,k.jsx)(O,{baseFontSize:.05*n,event:h,product:h.products[0],width:.9*n,height:"fit-content"})}):(0,k.jsx)(k.Fragment,{})]})},M=o(3388),_=o(8984);function R(t){const[e,o,n,r,s]=(0,c.Z)(),{whatmoreUITheme:a}=(0,i.useContext)(l.I),d=(0,u.MO)("whatmoreShowViews"),p=(0,u.MO)("whatmoreShopId"),h=((0,u.MO)("whatmoreSecondaryColorShade600"),t.PRODUCT_BOX_HEIGHT),x=t.PRODUCT_BOX_HEIGHT_IN_PX,y=t.PRODUCT_BOX_MARGIN,[m,g,w]=(0,v.YD)({triggerOnce:!0}),P=t.event;t.isOnFocus;return(0,k.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,k.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between",alignItems:"center"},children:[(0,k.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"flex-start",alignItems:"center",width:"100%"},onClick:()=>{t.onClick(P)},children:"show"===d?(0,k.jsx)("div",{style:{width:"100%",marginLeft:"5px",marginRight:"5px",marginTop:"10px"},children:(0,k.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",paddingLeft:"5px",width:"fit-content",height:"fit-content",justifyContent:"space-between",alignItems:"center"},children:(0,k.jsx)(j.Z,{event:P,fontSize:.07*o+"px"})})}):(0,k.jsx)(k.Fragment,{})}),(0,k.jsx)("div",{style:{display:"flex",width:"100%",height:e-h+"px"},onClick:()=>{t.onClick(P)}}),(0,M.xg)(P,p)?(0,k.jsx)("div",{style:{position:"relative",zIndex:1,bottom:y+"px",display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignItems:"center",width:.95*o,height:x,marginLeft:y+"px",marginRight:y+"px",backgroundColor:"white",borderRadius:"round"==a?"5px":"0px",borderWidth:(0,f.alU)(p),borderColor:(0,f.qPe)(p),paddingLeft:"5px",paddingRight:"5px",overflow:"hidden"},children:(0,k.jsx)("div",{ref:m,children:g&&(0,f.PWD)(p)?(0,k.jsx)(F,{event:P,onClick:()=>{var t,e;window.location.href=(e=null===(t=P.products)||void 0===t?void 0:t[0],(0,f.lj5)(p)?e.product_link+"?"+(0,f.awP)(p)+"&"+(0,f.n9s)(p)+"&"+(0,f.vaK)(p):e.product_link)}}):(0,k.jsx)("div",{height:"20px"})})}):(0,k.jsx)(k.Fragment,{})]})})}var z=function(t){var e,o,n;const[r,s,a,d,p]=(0,c.Z)();var h=(0,i.useContext)(m.V);const{whatmoreUITheme:x}=(0,i.useContext)(l.I),y=(0,u.MO)("whatmoreShopId"),g=(0,u.MO)("whatmoreSecondaryColorShade600"),v=t.event,j=t.onClick,P=null===(e=t.isOnFocus)||void 0===e||e,C=null!==(o=t.playOnUnfocus)&&void 0!==o&&o,b=null!==(n=t.animateOnFocus&&(0,f.iWI)(y))&&void 0!==n&&n,I=(0,f.IXJ)(y)?.7:.8,S=r*I+"px",O=1-I,F=r*O,z=r*O+"px",L=r*O*.1,Z=(0,f.nzC)(y);return(0,k.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top",h.tileTopMargin+"px","important"),t.style.setProperty("margin-bottom",h.tileBottomMMargin+"px","important"))},style:{margin:"0 auto",width:s+"px",height:1.2*r+"px",borderRadius:"round"==x?"5px":"0px",boxShadow:"round"==x?Z:null,borderWidth:(0,f.alU)(y),borderColor:(0,f.qPe)(y),overflow:"hidden",cursor:"pointer",position:"relative"},className:b?P?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",children:[(0,k.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"flex-start",alignItems:"center"},className:"whatmore-template-b-event-tile",onClick:()=>{j(v)},children:[(0,k.jsx)(w.Z,{height:S,width:"100%",url:v.thumbnail_image,isPlaying:P||C||(0,_.gE)(),event:v}),(0,M.xg)(v,y)?(0,k.jsx)("div",{style:{width:"100%",height:z,backgroundColor:g}}):(0,k.jsx)(k.Fragment,{})]}),(0,k.jsx)(R,{event:v,isOnFocus:P,PRODUCT_BOX_HEIGHT:F,PRODUCT_BOX_HEIGHT_IN_PX:z,PRODUCT_BOX_MARGIN:L,onClick:j})]})},L=o(778),Z=o(7376),W=o(7381);const T=(0,a.Z)({key:"whatmore-css-hv"});function U(t){const[e,o,n]=(0,c.Z)(),r=(0,u.MO)("whatmoreShopId"),s=t.events,a=t.onClick,p=n*(0,f.u6l)(r),{whatmoreWidgetSourceDetails:h}=(0,i.useContext)(l.I);return(0,k.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,k.jsx)("div",{style:{width:window.innerWidth,height:"fit-content"},children:(0,k.jsx)(d.tq,{slidesPerView:s.length>1?p:1,initialSlide:s.length>1?1:0,centeredSlides:!0,centeredSlidesBounds:!0,watchSlidesProgress:!0,touchRatio:.5,onSlideChange:t=>{(0,Z.y4)({userInteractionType:L.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:h})},children:s.map((t=>!((null===t||void 0===t?void 0:t.products.length)>0&&(null===t||void 0===t?void 0:t.products.every((t=>"oos"===(null===t||void 0===t?void 0:t.product_status)))))&&(0,k.jsx)(d.o5,{children:e=>{let{isActive:o,isPrev:i,isNext:n,isVisible:r}=e;return i||n||o?(0,k.jsx)(z,{isOnFocus:o&&r,playOnUnfocus:!1,animateOnFocus:!0,event:t,onClick:()=>{a(t)}}):(0,k.jsx)(g.Z,{})}},"whatmore-event-tile-portrait-"+t.index)))})})})}function B(t){const[e,o,n,r]=(0,c.Z)(),[s,a]=(0,i.useState)(-1),h=(0,u.MO)("whatmoreShopId"),x=t.onClick,m=t.events,w=Math.min(n,m.length),{whatmoreWidgetSourceDetails:v}=(0,i.useContext)(l.I);return(0,k.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:r+"px",paddingRight:r+"px"},children:(0,k.jsx)("div",{style:{width:o*w*1.1+"px"},children:(0,k.jsx)(d.tq,{slidesPerView:w,watchSlidesProgress:!0,modules:[p.W_],navigation:!0,slidesPerGroup:parseInt(w),onSlideChange:()=>{(0,Z.y4)({userInteractionType:L.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:v})},spaceBetween:(0,f.WGf)(h),children:m.map(((t,e)=>{const o=y()((()=>a(e)),300);return!((null===t||void 0===t?void 0:t.products.length)>0&&(null===t||void 0===t?void 0:t.products.every((t=>"oos"===(null===t||void 0===t?void 0:t.product_status)))))&&(0,k.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,k.jsx)(z,{isOnFocus:e==s,playOnUnfocus:!0,animateOnFocus:!0,event:t,onClick:()=>{x(t)}}):(0,k.jsx)(g.Z,{})}},"whatmore-event-tile-landscape-"+t.index)}))})})})}var E=function(t){var e;const[o,a,d]=(0,h.Z)(),[p]=(0,u.j1)("whatmorePrimaryColor"),[c]=(0,u.j1)("whatmoreShopId"),[x]=(0,u.j1)("whatmoreSecondaryColor"),[y]=(0,u.j1)("whatmoreTitleFont"),g="portrait"==o?(0,u.MO)("whatmoreTitleFontSizePortrait"):(0,u.MO)("whatmoreTitleFontSize"),{whatmoreRootId:w}=(0,i.useContext)(l.I),v=t.events,j=t.onClick,P=null!==(e=(0,f.aRS)(c))&&void 0!==e?e:y;function C(t){j(t)}return(0,i.useEffect)((()=>{(0,W.Oo)("Video shopping powered by Whatmore!")}),[]),(0,i.useEffect)((()=>{l.$.forEach((t=>{var e;const o=null!==(e=t.querySelector('.whatmore-template-type[data-wh="template-b"]'))&&void 0!==e?e:t.querySelector('.whatmore-template-type[data="template-b"]');if(!o)return;const i=t.querySelector(".whatmore-render-root");o&&i&&(i.style.minHeight="0px")}))}),[]),delete r.ZP.styles.global,(0,k.jsx)(s.C,{value:T,children:(0,k.jsx)("div",{children:(0,k.jsx)(n.x,{theme:r.ZP,cssVarsRoot:w,resetCSS:!1,children:(0,k.jsxs)(m.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!1},children:[t.heading.trim().length>0?(0,k.jsx)("div",{className:"whatmore-events-carousel",style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,k.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",P,"important"),t.style.setProperty("font-size",g+"px","important"))},style:{color:p,backgroundClip:"text",textAlign:"center"},children:t.heading})}):(0,k.jsx)(k.Fragment,{}),"landscape"===o?(0,k.jsx)(B,{events:v,onClick:C}):(0,k.jsx)(U,{events:v,onClick:C})]})})})})}},1092:function(t,e,o){var i=o(237),n=o(9854),r=o(7753),l=o(9039),s=o(7313),a=o(6417);function d(t){return t<1e3?t:t<1e5?(t/1e3).toFixed(0)+"K":(t/1e5).toFixed(0)+"L"}e.Z=function(t){const{whatmoreUITheme:e}=(0,s.useContext)(l.I),o=(0,r.MO)("whatmoreShopId"),p=(0,r.MO)("whatmorePrimaryFont"),c=t.event,h=t.fontSize;if(c.total_views<=0)return(0,a.jsx)(a.Fragment,{});const x=(0,n.S_M)(o);return"template-icon"==x?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,n.XCH)(o),color:"white",borderRadius:"round"==e?"5px":"0px",borderWidth:(0,n.alU)(o),borderColor:(0,n.qPe)(o)},children:(0,a.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:[(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)(i.Z,{sx:{color:(0,n.aLw)(o)+" !important",fontSize:h,fontWeight:"normal"}})}),(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,n.aLw)(o),"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",p,"important"),t.style.setProperty("font-size",h,"important"),t.style.setProperty("min-height","0","important"),t.style.setProperty("display","inline","important"),t.style.setProperty("width","auto","important"))},style:{fontWeight:"normal"},children:" "+d(c.total_views)+" "})})]})})}):"template-text"==x?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,n.XCH)(o),color:"white",borderRadius:"round"==e?"5px":"0px",borderWidth:(0,n.alU)(o),borderColor:(0,n.qPe)(o)},children:(0,a.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,n.aLw)(o),"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",p,"important"))},style:{fontSize:h,fontWeight:"bold"},children:" "+d(c.total_views)+" views"})})})})}):void 0}},7129:function(t,e,o){o.d(e,{V:function(){return i}});const i=(0,o(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},1855:function(t,e,o){var i=o(7313),n=o(9821),r=o(7129),l=o(6417);e.Z=function(t){var[e,o]=(0,n.Z)();return(0,i.useContext)(r.V),t.event,(0,l.jsx)("div",{style:{margin:"0 auto",width:o,height:e,overflow:"hidden"}})}},9363:function(t,e,o){o.d(e,{s:function(){return r}});var i=o(9854),n=o(7753);function r(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const o=(0,n.MO)("whatmoreShopId");return"shopify"!=(0,i.Ipo)(o)?t:t+e}},5456:function(t,e,o){o.d(e,{B:function(){return i}});const i=function(t,e){return!(isNaN(e)||!e||("string"===typeof e||e instanceof String)&&!e.trim().length)&&!(parseInt(e)<=parseInt(t))}},8816:function(t,e,o){var i=o(5318);e.Z=void 0;var n=i(o(5045)),r=o(6417),l=(0,n.default)((0,r.jsx)("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star");e.Z=l},417:function(t,e,o){var i=o(5318);e.Z=void 0;var n=i(o(5045)),r=o(6417),l=(0,n.default)((0,r.jsx)("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarHalf");e.Z=l},4885:function(t,e,o){var i=o(5318);e.Z=void 0;var n=i(o(5045)),r=o(6417),l=(0,n.default)((0,r.jsx)("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarOutline");e.Z=l},237:function(t,e,o){var i=o(5318);e.Z=void 0;var n=i(o(5045)),r=o(6417),l=(0,n.default)((0,r.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");e.Z=l},5892:function(){},4444:function(){},1811:function(){},7850:function(){}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[959],{4048:function(e,t,n){n.r(t);var i=n(7313),o=n(6090),r=n(7616),s=n(9039),l=(n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811),n(9302)),a=n(2575),d=n(2210),c=n(8486),h=n(9821),p=n(8866),u=n(2279),x=n.n(u),m=n(7753),f=n(7129),y=n(1855),g=n(9854),v=n(4920),w=n(7376),j=n(778),b=n(7381),C=n(6417);const P=(0,a.Z)({key:"whatmore-css-hv"});function I(e){const[t,n,o]=(0,h.Z)(),r=(0,m.MO)("whatmoreShopId"),l=e.events,a=e.onClick,c=o*(0,g.u6l)(r),[p,u]=(0,i.useState)(c),{whatmoreWidgetSourceDetails:x}=(0,i.useContext)(s.I);return(0,i.useEffect)((()=>{p<=c&&u((e=>e+c))}),[c]),(0,C.jsx)("div",{className:"whatmore-events-carousel-portrait",style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,C.jsx)("div",{style:{width:window.innerWidth,height:"fit-content"},children:(0,C.jsx)(d.tq,{slidesPerView:l.length>1?c:1,initialSlide:l.length>1?1:0,centeredSlides:!0,centeredSlidesBounds:!0,watchSlidesProgress:!0,touchRatio:.5,onSlideChange:e=>{(0,w.y4)({userInteractionType:j.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:x}),e.realIndex>e.previousIndex&&u((e=>e+c))},children:l.map(((e,t)=>{const n=(null===e||void 0===e?void 0:e.products.length)>0&&(null===e||void 0===e?void 0:e.products.every((e=>"oos"===(null===e||void 0===e?void 0:e.product_status))));return t<=p&&!n&&(0,C.jsx)(d.o5,{children:t=>{let{isActive:n,isPrev:i,isNext:o,isVisible:r}=t;return i||o||n?(0,C.jsx)(v.Z,{isOnFocus:n&&r,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{a(e)}}):(0,C.jsx)(y.Z,{})}},"whatmore-event-tile-portrait-"+e.index)}))})})})}function S(e){const[t,n,o,r]=(0,h.Z)(),[l,a]=(0,i.useState)(-1),p=(0,m.MO)("whatmoreShopId"),[u,f]=(0,i.useState)(o),b=e.onClick,P=e.events,I=Math.min(o,P.length),{whatmoreWidgetSourceDetails:S}=(0,i.useContext)(s.I);return(0,i.useEffect)((()=>{u<=o&&f((e=>e+o))}),[o]),(0,C.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:r+"px",paddingRight:r+"px"},className:"whatmore-events-carousel-landscape",children:(0,C.jsx)("div",{style:{width:n*I*(0,g.Su5)(p)+"px"},children:(0,C.jsx)(d.tq,{slidesPerView:I,watchSlidesProgress:!0,modules:[c.W_],navigation:!0,slidesPerGroup:parseInt(I),onSlideChange:e=>{(0,w.y4)({userInteractionType:j.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:S}),e.realIndex>e.previousIndex&&f((e=>e+o))},spaceBetween:(0,g.WGf)(p),children:P.map(((e,t)=>{const n=(null===e||void 0===e?void 0:e.products.length)>0&&(null===e||void 0===e?void 0:e.products.every((e=>"oos"===(null===e||void 0===e?void 0:e.product_status)))),i=x()((()=>a(t)),300);return t<=u&&!n&&(0,C.jsx)(d.o5,{onMouseEnter:()=>{i()},onMouseLeave:()=>{i.cancel(),a(-1)},children:n=>{let{isActive:i,isPrev:o,isNext:r,isVisible:s}=n;return s?(0,C.jsx)(v.Z,{isOnFocus:t==l,playOnUnfocus:!0,animateOnFocus:!0,event:e,onClick:()=>{b(e)}}):(0,C.jsx)(y.Z,{})}},"whatmore-event-tile-landscape-"+e.index)}))})})})}t.default=function(e){var t;const[n,a,d]=(0,p.Z)(),[c]=(0,m.j1)("whatmoreShopId"),[h]=(0,m.j1)("whatmorePrimaryColor"),[u]=(0,m.j1)("whatmoreTitleFont"),x="portrait"==n?(0,m.MO)("whatmoreTitleFontSizePortrait"):(0,m.MO)("whatmoreTitleFontSize"),{whatmoreRootId:y}=(0,i.useContext)(s.I),v=e.events,w=e.onClick,j=null!==(t=(0,g.aRS)(c))&&void 0!==t?t:u;function F(e){w(e)}return(0,i.useEffect)((()=>{(0,b.Oo)("Video shopping powered by Whatmore!")}),[]),(0,i.useEffect)((()=>{s.$.forEach((e=>{var t;const n=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-a"]');if(!n)return;const i=e.querySelector(".whatmore-render-root");n&&i&&(i.style.minHeight="0px")}))}),[]),delete r.ZP.styles.global,(0,C.jsx)(l.C,{value:P,children:(0,C.jsx)("div",{children:(0,C.jsx)(o.x,{theme:r.ZP,cssVarsRoot:y,resetCSS:!1,children:(0,C.jsxs)(f.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[e.heading.trim().length>0?(0,C.jsx)("div",{className:"whatmore-events-carousel",style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,C.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-family",j,"important"),e.style.setProperty("font-size",x+"px","important"))},style:{color:h,backgroundClip:"text",textAlign:"center",fontWeight:(0,g.wOV)(c),lineHeight:(0,g.vY4)(c),letterSpacing:(0,g.X2K)(c)},children:e.heading})}):(0,C.jsx)(C.Fragment,{}),"landscape"===n?(0,C.jsx)(S,{events:v,onClick:F}):(0,C.jsx)(I,{events:v,onClick:F})]})})})})}},1092:function(e,t,n){var i=n(237),o=n(9854),r=n(7753),s=n(9039),l=n(7313),a=n(6417);function d(e){return e<1e3?e:e<1e5?(e/1e3).toFixed(0)+"K":(e/1e5).toFixed(0)+"L"}t.Z=function(e){const{whatmoreUITheme:t}=(0,l.useContext)(s.I),n=(0,r.MO)("whatmoreShopId"),c=(0,r.MO)("whatmorePrimaryFont"),h=e.event,p=e.fontSize;if(h.total_views<=0)return(0,a.jsx)(a.Fragment,{});const u=(0,o.S_M)(n);return"template-icon"==u?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,o.XCH)(n),color:"white",borderRadius:"round"==t?"5px":"0px",borderWidth:(0,o.alU)(n),borderColor:(0,o.qPe)(n)},children:(0,a.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:[(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)(i.Z,{sx:{color:(0,o.aLw)(n)+" !important",fontSize:p,fontWeight:"normal"}})}),(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,o.aLw)(n),"important"),e.style.setProperty("line-height","120%","important"),e.style.setProperty("font-family",c,"important"),e.style.setProperty("font-size",p,"important"),e.style.setProperty("min-height","0","important"),e.style.setProperty("display","inline","important"),e.style.setProperty("width","auto","important"))},style:{fontWeight:"normal"},children:" "+d(h.total_views)+" "})})]})})}):"template-text"==u?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,o.XCH)(n),color:"white",borderRadius:"round"==t?"5px":"0px",borderWidth:(0,o.alU)(n),borderColor:(0,o.qPe)(n)},children:(0,a.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,o.aLw)(n),"important"),e.style.setProperty("line-height","120%","important"),e.style.setProperty("font-family",c,"important"))},style:{fontSize:p,fontWeight:"bold"},children:" "+d(h.total_views)+" views"})})})})}):void 0}},7129:function(e,t,n){n.d(t,{V:function(){return i}});const i=(0,n(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},5945:function(e,t,n){function i(e){return"undefined"==typeof e||"undefined"==e||null==e?"":e.replace(/\w\S*/g,(function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}))}n.d(t,{s:function(){return i}})},1855:function(e,t,n){var i=n(7313),o=n(9821),r=n(7129),s=n(6417);t.Z=function(e){var[t,n]=(0,o.Z)();return(0,i.useContext)(r.V),e.event,(0,s.jsx)("div",{style:{margin:"0 auto",width:n,height:t,overflow:"hidden"}})}},4920:function(e,t,n){n.d(t,{Z:function(){return b}});var i=n(7313),o=n(9821),r=(n(3439),n(9723)),s=n(7753),l=n(4892),a=n(7129),d=n(6805),c=n(9854),h=n(1092),p=n(5945),u=n(9039),x=n(9363),m=n(6417);var f=function(e){var[t,n]=(0,o.Z)();const{whatmoreUITheme:r}=(0,i.useContext)(u.I),[l]=(0,s.j1)("whatmorePrimaryFont"),[a,d]=(0,i.useState)(0),h=(0,s.MO)("whatmoreShopId"),f=e.event;if(0==f.products.length)return(0,m.jsx)(m.Fragment,{});const y=.3*n,g=y+"px",v=y+"px",w=.07*n+"px";return(0,m.jsx)("div",{style:{width:n+"px",height:"fit-content",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0.3)"},children:(0,m.jsxs)("div",{ref:e=>{e&&e.style.setProperty("height","fit-content","important")},style:{display:"flex",flexFlow:"row nowrap",width:"100%",justifyContent:"space-between",alignItems:"center",paddingLeft:"5px",paddingRight:"5px",paddingTop:"5px",paddingBottom:"5px",gap:"5px"},className:"whatmore-event-tile-product-scale-in-and-out-animation",children:[(0,m.jsx)("div",{ref:e=>{e&&e.style.setProperty("height",v,"important")},style:{width:g,boxShadow:"round"==r?"0px 0px 5px 2px #B0B0B0":null,borderRadius:"round"==r?"5px":"0px",borderWidth:(0,c.alU)(h),borderColor:(0,c.qPe)(h),overflow:"hidden",backgroundColor:"rgb(220, 220, 220, 1)"},children:(0,m.jsx)("img",{ref:e=>{e&&e.style.setProperty("object-fit",(0,c.yOX)(h),"important")},src:(0,x.s)(f.products[a].thumbnail_image,"&width=".concat(400,"&height=",400)),style:{width:"100%",height:"100%",borderRadius:"round"==r?"5px":"0px"},alt:"product image"})}),(0,m.jsx)("div",{style:{width:n-5-y+"px",height:v,borderRadius:"round"==r?"5px":"0px",overflow:"visible"},children:(0,m.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"fit-content",height:"100%",justifyContent:"center",alignItems:"center"},children:(0,m.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color","white","important"),e.style.setProperty("font-size",w,"important"),e.style.setProperty("line-height","120%","important"),e.style.setProperty("font-family",l,"important"),e.style.setProperty("-webkit-line-clamp",3,"important"),e.style.setProperty("line-clamp",3,"important"),e.style.setProperty("-webkit-box-orient","vertical","important"),e.style.setProperty("display","-webkit-box","important"),e.style.setProperty("overflow","hidden","important"),e.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"normal"},children:(0,p.s)(f.products[a].title)})})})]},a)})},y=n(3933),g=n(8984);function v(e){var t,[n,l]=(0,o.Z)();const[d]=(0,s.j1)("whatmoreShopId"),[h,p,u]=(0,y.YD)({triggerOnce:!0});var x=(0,i.useContext)(a.V);const v=e.event,w=null!==(t=e.unfocusedDisplay)&&void 0!==t&&t,j=.5*l,b=(0,g.gE)()?e.isOnFocus:p;return(0,m.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"200%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",alignItems:"center",height:"100%",width:"100%"},children:[(0,m.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,m.jsx)("p",{children:" "})}),x.showPlayButton&&!w?(0,m.jsx)("div",{style:{position:"relative",top:"10%",overflow:"hidden",marginLeft:"5px",marginRight:"5px",width:"100%"},children:(0,m.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",alignItems:"center"},children:(0,m.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:"video"==v.event_type&&(0,m.jsx)(r.Z,{sx:{color:(0,c.Ya_)(d)+" !important",opacity:.8,fontSize:j,filter:"drop-shadow(0 0 15px black);"}})})})}):(0,m.jsx)(m.Fragment,{}),(0,m.jsx)("div",{ref:h,children:b&&(0,c.PWD)(d)?(0,m.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,m.jsx)(f,{event:v})}):(0,m.jsx)("div",{height:"20px"})})]})})}function w(e){var[t,n]=(0,o.Z)();const[i]=(0,s.j1)("whatmorePrimaryFont"),r=e.event;return r.title.trim().length?(0,m.jsx)("div",{style:{width:"100%",height:"fit-content",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))"},children:(0,m.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"flex-end",alignContent:"center",width:"100%",height:"100%"},children:(0,m.jsx)("div",{style:{width:"100%",padding:"2px"},children:(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",alignItems:"flex-start",marginLeft:"5px",marginRight:"5px",marginBottom:"2px"},children:[(0,m.jsx)("p",{style:{color:"white",fontSize:.08*n+"px",fontWeight:"normal",textAlign:"left"},children:" "}),(0,m.jsx)("p",{ref:e=>{e&&e.style.setProperty("font-family",i,"important")},style:{color:"white",fontSize:.08*n+"px",fontWeight:"normal",textAlign:"left"},children:r.title.substring(0,60)})]})})})}):(0,m.jsx)(m.Fragment,{})}function j(e){const[t,n,i,r,l]=(0,o.Z)(),[a]=(0,s.j1)("whatmoreShowViews"),p=(0,s.MO)("whatmoreShopId"),u=e.event,x=e.isOnFocus;return(0,m.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between",alignItems:"center"},children:[(0,m.jsx)("div",{style:{width:"100%",backgroundImage:"linear-gradient(to top, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0.3))"},children:(0,m.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"flex-start",alignItems:"center"},children:"show"===a&&"show"===(0,c.qcC)(p)?(0,m.jsx)("div",{style:{width:"100%",marginLeft:"5px",marginRight:"5px",marginTop:"10px"},children:(0,m.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",paddingLeft:"5px",width:"fit-content",height:"fit-content",justifyContent:"space-between",alignItems:"center"},children:(0,m.jsx)(h.Z,{event:u,fontSize:.07*n+"px"})})}):(0,m.jsx)(m.Fragment,{})})}),d.$w===l[d.YP]?(0,m.jsx)(m.Fragment,{}):x?(0,m.jsx)("div",{className:"whatmore-event-tile-component-fade-out-animation",children:(0,m.jsx)(w,{event:u})}):(0,m.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,m.jsx)(w,{event:u})})]})})}var b=function(e){var t,n,r;const[h,p,x,f,y]=(0,o.Z)();var w=(0,i.useContext)(a.V);const{whatmoreUITheme:b}=(0,i.useContext)(u.I),C=(0,s.MO)("whatmoreShopId"),P=e.event,I=e.onClick,S=null===(t=e.isOnFocus)||void 0===t||t,F=null!==(n=e.playOnUnfocus)&&void 0!==n&&n,M=null!==(r=e.animateOnFocus&&(0,c.iWI)(C))&&void 0!==r&&r,O=(0,c.nzC)(C);return(0,m.jsxs)("div",{ref:e=>{e&&(e.style.setProperty("margin-top",w.tileTopMargin+"px","important"),e.style.setProperty("margin-bottom",w.tileBottomMMargin+"px","important"))},style:{margin:"0 auto",width:p,height:h,borderRadius:"round"==b?"5px":"0px",boxShadow:"round"==b?O:null,borderWidth:(0,c.alU)(C),borderColor:(0,c.qPe)(C),overflow:"hidden",cursor:"pointer"},className:M?S?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",onClick:()=>{I(P)},children:[(0,m.jsx)(l.Z,{height:"100%",width:"100%",url:P.thumbnail_image,isPlaying:S||F||(0,g.gE)(),event:P}),(0,m.jsxs)("div",{style:{width:p,height:h},children:[(0,m.jsx)(j,{event:P,isOnFocus:S}),S||d.$w===y[d.YP]?(0,m.jsx)(v,{event:P,unfocusedDisplay:!S,isOnFocus:S}):null]})]})}},9363:function(e,t,n){n.d(t,{s:function(){return r}});var i=n(9854),o=n(7753);function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=(0,o.MO)("whatmoreShopId");return"shopify"!=(0,i.Ipo)(n)?e:e+t}},9723:function(e,t,n){var i=n(5318);t.Z=void 0;var o=i(n(5045)),r=n(6417),s=(0,o.default)((0,r.jsx)("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82z"}),"PlayArrowRounded");t.Z=s},237:function(e,t,n){var i=n(5318);t.Z=void 0;var o=i(n(5045)),r=n(6417),s=(0,o.default)((0,r.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");t.Z=s},3439:function(){},5892:function(){},4444:function(){},1811:function(){},6143:function(){},7850:function(){}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[972],{3972:function(e,t,n){n.r(t),n.d(t,{default:function(){return R}});var a=n(7753),r=n(7313),i=n(2860),o=n(499),s=n(4897),l=n(5160),c=n(9854),u=n(6967),d=n(8984),h=n(58),m=n(4669),p=n(941),g=n(9039),v=n(7300),I=n(6524),f=n(7643),S=n(778),w=n(6417);const y=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(210),n.e(926),n.e(950),n.e(303),n.e(891)]).then(n.bind(n,4095)))),E=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(576),n.e(950),n.e(364),n.e(530)]).then(n.bind(n,5523)))),T=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(358)]).then(n.bind(n,3827)))),x=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(607)]).then(n.bind(n,6071)))),_=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(708)]).then(n.bind(n,1291)))),j=r.lazy((()=>Promise.all([n.e(302),n.e(580)]).then(n.bind(n,3580)))),M=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(576),n.e(210),n.e(955),n.e(926),n.e(303),n.e(209),n.e(790)]).then(n.bind(n,4209)))),O=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(210),n.e(926),n.e(950),n.e(959)]).then(n.bind(n,4048)))),L=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(303),n.e(554)]).then(n.bind(n,9085)))),C=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(576),n.e(950),n.e(303),n.e(364),n.e(67)]).then(n.bind(n,4362)))),b=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(576),n.e(210),n.e(955),n.e(926),n.e(303),n.e(209),n.e(196)]).then(n.bind(n,4658))));var D=function(e){const[t]=(0,a.j1)("isInDesignMode"),[n]=(0,a.j1)("isDemoBrand"),[D]=(0,a.j1)("whatmoreTopBottomPadding"),[P]=(0,a.j1)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:G}=(0,r.useContext)(g.I),[W]=(0,a.j1)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:V}=(0,r.useContext)(g.I),k=(0,a.MO)("isLandingSharedLink"),z=(0,a.MO)("whatmoreShareTemplateId"),N=(0,a.MO)("whatmoreShareStoryId"),R=(0,a.MO)("whatmoreShareEventId"),[U,q]=(0,r.useState)(-1),[F,A]=(0,r.useState)(null);var K=e.events,Z=null;function B(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,d.KE)()&&!a&&(0,h.QV)(),t||n||(async()=>{const t=Z[e].events[0];(0,l.wh)(t),(0,m.Tc)(W,i.Xh,i.OW),(0,u.H4)(t.event_id,t.products,"homepage","stories")})();var o=0;null!=r&&Z[e].events.map(((e,t)=>{e.event_id==r&&(o=t)})),q(o),A(e)}function H(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,d.KE)()&&!a&&(0,h.QV)(),(0,v.B6)(e)||(0,v.WJ)(e))return t||n||(async()=>{(0,l.wh)(e),(0,m.Tc)(W,i.Xh,i.pR),(0,u.H4)(e.event_id,e.products,"homepage","carousel")})(),void q(e.index);const r=20;var{status:c,bannerText:p,timeToStartInMins:g}=s.Z.getEventStatus(e);g<=r&&c.name!==o.Z.LIVE.name?console.debug(" TODO : show toast on upcoming live event."):q(e.index)}function Y(e){return(0,w.jsx)(w.Fragment,{})}return G&&!Z&&(Z=function(e){var t=e.reduce(((e,t,n)=>{var a=t.storyset_id;return a in e?(e[a].total_events=e[a].total_events+1,e[a].events.push(t)):e[a]={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}(K)),(0,r.useEffect)((()=>{k&&V==(0,I.zv)(z)&&(null!=N&&G?Z.forEach(((e,t)=>{N==e.id&&B(t,!0,R)})):null!=R&&K.forEach(((e,t)=>{R==e.event_id&&H(e,!0)})))}),[]),(0,w.jsxs)("div",{children:[(0,w.jsx)("div",{style:{marginTop:(G?P:D)+"px",marginBottom:(G?P:D)+"px"},children:"template-b"===V?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(y,{events:K,onClick:H,heading:e.heading})}):"template-a-1"===V?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(E,{events:K,onClick:H,heading:e.heading})}):"template-feed-a"===V?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(C,{events:K,onClick:H,heading:e.heading})}):"template-collections-a"===V||"template-c"===V?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(f.u,{userInteractionType:S.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,w.jsx)(T,{events:K,onClick:H,heading:e.heading})})}):"template-collections-b"===V||"template-d"===V?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(f.u,{userInteractionType:S.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,w.jsx)(x,{events:K,onClick:H,heading:e.heading})})}):"template-collections-c"===V||"template-e"===V?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(f.u,{userInteractionType:S.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,w.jsx)(_,{events:K,onClick:H,heading:e.heading})})}):"template-collections-d"===V?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(f.u,{userInteractionType:S.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,w.jsx)(y,{events:K,onClick:H,heading:e.heading})})}):"template-collections-e"===V?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(f.u,{userInteractionType:S.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,w.jsx)(O,{events:K,onClick:H,heading:e.heading})})}):"template-f"===V?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(f.u,{userInteractionType:S.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,w.jsx)(L,{events:K,onClick:H,heading:e.heading})})}):"template-banner-a"===V?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(f.u,{userInteractionType:S.K.BANNER_WIDGET_VIEW,event:K[0],triggerFlag:!t&&!n,children:(0,w.jsx)(b,{events:K})})}):G?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(f.u,{userInteractionType:S.K.STORIES_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,w.jsx)(j,{eventsStories:Z,onClick:B,template:V})})}):(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(f.u,{userInteractionType:S.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,w.jsx)(O,{events:K,onClick:H,heading:e.heading})})})}),-1==U?(0,w.jsx)(Y,{}):(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(f.u,{userInteractionType:S.K.EVENT_VIEW,event:K[U],productList:K[U].products,cta:K[U].cta,triggerFlag:!t&&!n,children:(0,w.jsx)(M,{events:K,index:U,onBack:function(e){(0,c.n2L)(W)&&(0,a.MO)("whatmoreAddedToCart")&&(0,p.D)(W,(()=>{}),100,window.location.hostname),q(-1)},slideDirection:G||"horizontal"===(0,c.e8z)(W)?"horizontal":"vertical",eventsStories:Z,initialStoryIndex:F,template:V})})})]})};const P=function(e,t,n){const r=(0,a.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)),{}),o=Object.keys(i);if("60960964855"==r&&"undefined"!=typeof fera&&"function"===typeof fera.getRatings){var s={};fera.getRatings(o,(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]="+o.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 G=n(3388),W=n(7381),V=n(7376),k=n(7008);var z=function(e){const[t,n]=(0,r.useState)(),[o,s]=(0,r.useState)(),{whatmoreIsStoriesTemplate:l}=(0,r.useContext)(g.I),{whatmoreIsCollectionsTemplate:m}=(0,r.useContext)(g.I),{whatmoreIsBannerTemplate:p}=(0,r.useContext)(g.I),[v]=(0,a.j1)("whatmoreShopId"),[f]=(0,a.j1)("whatmoreCollectionId"),y=(0,a.MO)("whatmoreLandingLocationType"),E=(0,a.MO)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:T}=(0,r.useContext)(g.I),{whatmoreCollectionUrl:x}=(0,r.useContext)(g.I),_=(0,c.cZT)(v)?(0,c._uv)(v)?x:window.location.href.split(/[?#]/)[0]:f,[j,M]=(0,a.j1)("productRatings"),[O,L]=(0,r.useState)(!1);var C=(0,c.efR)(v)?i.Dm+"/v2/events/":i.Gc+"/v2/events/",b=(0,c.efR)(v)?i.Dm+"/get_eventset/":i.Gc+"/get_eventset/",z=(0,c.efR)(v)?i.Dm+"/v2/collection":i.Gc+"/v2/collection",N=(0,c.efR)(v)?i.Dm+"/v2/brand/"+v+"/product-events":i.Gc+"/v2/brand/"+v+"/product-events",R=e.shopId,U="live,upcoming";return(0,r.useEffect)((()=>{(0,u.hb)();const e=()=>{const e="_whatmore_bulk_events",t=JSON.parse(localStorage.getItem(e))||[];t&&t.length>0&&((0,k.K)(t),localStorage.removeItem(e))};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[]),(0,r.useEffect)((()=>{null==t||0==t.length||o||!(0,d.KE)()||(0,a.MO)("whatmoreVideoPlayerPoolInitiated")||(0,h.b5)(h.UD)}),[t]),(0,r.useEffect)((()=>{var e;if(y.startsWith("product")){var t=(0,a.MO)("whatmoreProductId");t=(0,c.iXA)(v)?function(e){return e.split(/[?#]/)[0]}(window.location.href):t,e=N.toString()+"?client_product_id="+t.toString()+"&status="+U.toString()+"&event_type=video"}else if(m||"invalid-url"!==x)e=z.toString()+"?store_id="+R.toString()+"&client_collection_id="+_;else if(p){const t=I.ls,n=(0,I.H1)(y);e=b.toString()+R.toString()+"?eventset_type="+t+"&source="+n+"&source_id="+v}else e=C.toString()+R.toString()+"?status="+U.toString()+"&is_active="+"true".toString()+(l?"&template_type=stories":"");fetch(e).then((e=>e.json())).then((e=>{if(p){const t=I.ls;return(0,G.OC)(e,t)}return(0,G.kW)(e,m||"invalid-url"!==x)})).then((e=>(E&&console.debug("initial received events size : "+e.length),l||p?e:(0,G.e8)(e,R)))).then((e=>(null!=e&&0!=e.length&&(0,c.LUY)(v)&&function(e,t,n){const r=setInterval((()=>{null===(0,a.MO)("productRatings")&&P(e,t,n)}),1e3);setTimeout((()=>{clearInterval(r)}),1e4)}(v,e,(e=>{M(e)})),e))).then((e=>{null==e||0==e.length||l||p||(0,c.NOv)(R,e),n(e),L(!0)})).catch((e=>{s(e.message)}))}),[]),(0,r.useEffect)((()=>{"index"===y?t&&t.length>0&&(0,V.PB)({userInteractionType:S.K.HOMEPAGE_VISITED,widgetSourceDetails:T}):"collection"===y&&(t&&t.length>0||(0,c.miB)(v))&&(0,V.PB)({userInteractionType:S.K.COLLECTION_PAGE_VISITED,widgetSourceDetails:T})}),[t]),(O&&(null==t||0==t.length)||o)&&g.$.forEach((e=>{var t,n,a,r;const i=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"]'),o=null!==(n=e.querySelector('.whatmore-template-type[data-wh="template-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-f"]')||e.querySelector('.whatmore-template-type[data-wh="template-b"]'))&&void 0!==n?n:e.querySelector('.whatmore-template-type[data="template-a"]')||e.querySelector('.whatmore-template-type[data="template-f"]')||e.querySelector('.whatmore-template-type[data="template-b"]'),s=null!==(a=e.querySelector('.whatmore-template-type[data-wh="template-collections-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-c"]'))&&void 0!==a?a:e.querySelector('.whatmore-template-type[data="template-collections-a"]')||e.querySelector('.whatmore-template-type[data="template-collections-b"]')||e.querySelector('.whatmore-template-type[data="template-collections-c"]'),l=null!==(r=e.querySelector('.whatmore-template-type[data-wh="template-banner-a"]'))&&void 0!==r?r:e.querySelector('.whatmore-template-type[data="template-banner-a"]'),c=e.querySelector(".whatmore-render-root");(l||s||o||i)&&(o&&c||i&&c||l&&c||s&&c)&&(c.style.minHeight="0px")})),null==t||0==t.length||o?(0,w.jsx)("div",{}):(E&&(0,W.EI)(t),function(e){if(null!=e){var t=0;e.forEach((e=>{e.index=t++}))}}(t),E&&console.debug("final transformed events data : "+JSON.stringify(t)),E&&console.debug("valid events size : "+t.length),(0,w.jsx)("div",{children:(0,w.jsx)(D,{heading:e.heading,events:t})},"whatmore-main-coponent"))},N=n(3933);var R=function(e){const[t]=(0,a.j1)("isInDesignMode"),[n]=(0,a.j1)("isDemoBrand"),[o]=(0,a.j1)("whatmoreShopId"),[s]=(0,a.j1)("whatmoreHeading"),[l,u]=(0,r.useState)(["initial",window.pageYOffset]),[d,h]=(0,r.useState)(!1),p=(0,a.MO)("isLandingSharedLink");(0,r.useEffect)((()=>{if((0,m.ll)(o),!(0,c.wc0)(o))return;let e=window.pageYOffset,t=!1;const n=()=>{const n=window.pageYOffset;var a,r;Math.abs(n-e)<100?t=!1:(r=!0,u(a=[n>e?"scrolled-down":"scrolled-up",n]),a[1]>100&&h(r),e=n>0?n:0,t=!1)},a=()=>{t||(window.requestAnimationFrame(n),t=!0)};return window.addEventListener("scroll",a),()=>window.removeEventListener("scroll",a)}),[]);const[g,v,I]=(0,N.YD)({triggerOnce:!0});return(0,w.jsx)("div",{ref:g,children:d||v||p||!(0,c.wc0)(o)?(0,w.jsx)("div",{children:t||n?(0,w.jsx)("div",{children:(0,w.jsx)(z,{heading:s,shopId:i.aA})}):(0,w.jsx)("div",{children:(0,w.jsx)(z,{heading:s,shopId:o})})}):(0,w.jsx)(w.Fragment,{})})}},499:function(e,t){t.Z={LIVE:{name:"LIVE",color:"gray.600"},UPCOMING:{name:"UPCOMING",color:"gray.600"},DEFAULT:{name:"LIVE EVENT",color:"gray.600"},COMPLETED:{name:"ENDED",color:"gray.600"}}},4897:function(e,t,n){var a=n(499);t.Z=class{static getEventStatus(e){e.time_zone="GMT+5:30";var t=e.start_time+":00",n=e.end_time,r=e.scheduled_date,i=e.status,o=e.time_zone;if(i.toUpperCase()==a.Z.LIVE.name)return{status:a.Z.LIVE,bannerText:" "+a.Z.LIVE.name+" ",timeToStartInMins:0};if(i.toUpperCase()==a.Z.UPCOMING.name){var s=new Date(r+" "+t+" "+o),l=(new Date(r+" "+n+" "+o),function(e){var t=new Date,n=(e.getTime()-t.getTime())/1e3,r=n/60,i=r/60,o=i/24;return n<=0?{status:a.Z.COMPLETED,bannerText:" "+a.Z.COMPLETED.name+" ",timeToStartInMins:0}:n>=1&&n<=30?{status:a.Z.UPCOMING,bannerText:"Starts in "+Math.round(n)+" sec ",timeToStartInMins:n/60}:r<60?{status:a.Z.UPCOMING,bannerText:"Starts in "+Math.round(r)+" min ",timeToStartInMins:r}:i<24?{status:a.Z.UPCOMING,bannerText:"Starts in "+Math.round(i)+" hr ",timeToStartInMins:60*i}:o<7?{status:a.Z.UPCOMING,bannerText:" "+["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()]+" ",timeToStartInMins:60*o*24}:{status:a.Z.UPCOMING,bannerText:"Upcoming",timeToStartInMins:2880}}(s));return{status:l.status,bannerText:l.bannerText,timeToStartInMins:l.timeToStartInMins}}return console.error("invalid status for event :: id : "+e.event_id+", status : "+e.status),{status:a.Z.DEFAULT,bannerText:"live event",timeToStartInMins:2880}}}},3388:function(e,t,n){n.d(t,{OC:function(){return s},e8:function(){return i},kT:function(){return a},kW:function(){return o},xg:function(){return r}});const a=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==a(e)))},o=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null!=e)return t?e.events[0].events:e.events};const s=function(e,t){var n;if(null==e)return[];if(!("eventsets"in e))return[];const a=null!==(n=e.eventsets[t])&&void 0!==n?n:null;return a?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(a):[]}},7376:function(e,t,n){n.d(t,{GF:function(){return r},PB:function(){return s},Z2:function(){return i},y4:function(){return o}});var a=n(733);function r(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s}=e;(0,a.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s})}function i(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s}=e;(0,a.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s})}function o(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s}=e;(0,a.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s})}function s(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s}=e;(0,a.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s})}}}]);
|