whatmore-react-assets 1.0.1289 → 1.0.1291
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/static/js/{348.7ab930f3.chunk.js → 348.b4d983e5.chunk.js} +1 -1
- package/static/js/{751.a6abe3c2.chunk.js → 751.cd07d863.chunk.js} +1 -1
- package/static/js/carousel-template-a.87a7b40b.chunk.js +1 -0
- package/static/js/{carousel-template-b.66807bbf.chunk.js → carousel-template-b.c007bd37.chunk.js} +1 -1
- package/whatmore.js +2 -2
- package/static/js/carousel-template-a.62fd1af8.chunk.js +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[978],{4048:function(e,t,o){o.r(t);var n=o(7313),i=o(6090),r=o(7616),l=o(32),s=(o(6143),o(7850),o(4444),o(7244),o(123),o(5892),o(1811),o(9302)),a=o(2575),d=o(2210),c=o(8486),p=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(364),w=o(6381),P=o(4522),j=o(778),S=o(7381),C=o(9069),O=o(6417);const I=(0,a.Z)({key:"whatmore-css-hv"});function M(e){const[t,o,i]=(0,p.Z)(),r=(0,y.MO)("whatmoreShopId"),l=e.events,s=e.onClick,a=i*(0,f.u6l)(r),c=(0,f.yBw)(r),[u,h]=(0,n.useState)(c?l.length:a),{whatmoreWidgetSourceDetails:m}=(0,n.useContext)(g.I);return(0,n.useEffect)((()=>{u<=a&&h((e=>e+a))}),[a]),(0,O.jsx)("div",{className:"whatmore-events-carousel-portrait",style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,O.jsx)("div",{style:{width:"8968077397"===r&&l.length<4?"200px":window.innerWidth,height:"fit-content"},children:(0,O.jsx)(d.tq,{slidesPerView:l.length>1?"51394281658"==r||"55820812447"==r?2:a:1,initialSlide:l.length>1&&"51394281658"!=r&&"55820812447"!=r?1:0,centeredSlides:"51394281658"!=r&&"55820812447"!=r,centeredSlidesBounds:!1,watchSlidesProgress:!0,touchRatio:"51394281658"==r?1:.5,onSlideChange:e=>{(0,P.y4)({userInteractionType:j.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:m}),e.realIndex>e.previousIndex&&h((e=>e+a))},loop:c&&l.length>2,children:l.map(((e,t)=>t<=u&&(0,O.jsx)(d.o5,{children:t=>{let{isActive:o,isPrev:n,isNext:i,isVisible:l}=t;return n||i||o||"51394281658"==r||"8968077397"==r?(0,f.$X$)(r)?(0,O.jsx)(C.Z,{isOnFocus:o&&l,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{s(e)}}):(0,O.jsx)(w.Z,{isOnFocus:("51394281658"==r||"55820812447"==r||o)&&l,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{s(e)}}):(0,O.jsx)(x.Z,{})}},"whatmore-event-tile-portrait-"+e.index)))})})})}function b(e){const[t,o,i,r]=(0,p.Z)(),[l,s]=(0,n.useState)(-1),a=(0,y.MO)("whatmoreShopId"),u=e.onClick,h=e.events,v=(0,f.yBw)(a),[S,I]=(0,n.useState)(v?h.length:i),M="8968077397"==a||"19501891"==a?Math.floor(Math.min(i,h.length)):Math.min(i,h.length),b=Math.floor(Math.min(4,h.length)),{whatmoreWidgetSourceDetails:k}=(0,n.useContext)(g.I),Z=(0,n.useRef)(null);return(0,n.useEffect)((()=>{if(Z.current){const e="8968077397"===a&&h.length>=4?.7:(0,f.Su5)(a),t=o*M*e+"px";h.length<4||"8968077397"===a?Z.current.style.setProperty("width",t,"important"):Z.current.style.width=t}}),[o,M,a,S,h.length]),(0,n.useEffect)((()=>{S<=i&&I((e=>e+i))}),[i]),(0,O.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",paddingLeft:r+"px",paddingRight:r+"px"},className:"whatmore-events-carousel-landscape",children:(0,O.jsx)("div",{ref:Z,style:{height:"100%"},children:(0,O.jsx)(d.tq,{slidesPerView:"8968077397"==a?b:M,watchSlidesProgress:!0,modules:[c.W_],navigation:!0,slidesPerGroup:"8968077397"==a||"19501891"==a?Math.min(2,h.length):parseInt(M),onSlideChange:e=>{(0,P.y4)({userInteractionType:j.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:k}),e.realIndex>e.previousIndex&&I((e=>e+i))},spaceBetween:0,loop:(v||"8968077397"==a||"19501891"==a)&&h.length>4,style:{height:"100%"},children:h.map(((e,t)=>{const o=m()((()=>s(t)),300);return t<=S&&(0,O.jsx)(d.o5,{onMouseEnter:()=>{o()},onMouseLeave:()=>{o.cancel(),s(-1)},style:{height:"100%"},children:o=>{let{isActive:n,isPrev:i,isNext:r,isVisible:s}=o;return s||"8968077397"==a||"19501891"==a&&(i||r)?(0,f.$X$)(a)?(0,O.jsx)(C.Z,{isOnFocus:t==l,playOnUnfocus:!(0,f.dHy)(a)||t==parseInt(M/2)&&-1==l,animateOnFocus:!0,event:e,onClick:()=>{u(e)}}):(0,O.jsx)(w.Z,{isOnFocus:t==l,playOnUnfocus:!(0,f.dHy)(a)||t==parseInt(M/2)&&-1==l,animateOnFocus:!0,event:e,onClick:()=>{u(e)}}):(0,O.jsx)(x.Z,{})}},"whatmore-event-tile-landscape-"+e.index)}))})})})}t.default=function(e){const[t,o,a]=(0,u.Z)(),[d]=(0,y.j1)("whatmoreShopId"),[c]=(0,y.j1)("whatmorePrimaryColor"),[p]=(0,y.j1)("whatmoreTitleFont"),h="portrait"==t?(0,y.MO)("whatmoreTitleFontSizePortrait"):(0,y.MO)("whatmoreTitleFontSize"),{whatmoreRootId:m}=(0,n.useContext)(g.I),x=(0,y.MO)("whatmoreCollectionHeading"),{whatmoreIsCollectionsTemplate:w}=(0,n.useContext)(g.I),P=e.events,j=e.onClick,C=p;function k(e){j(e)}return(0,n.useEffect)((()=>{(0,S.Oo)("Video shopping powered by Whatmore!")}),[]),(0,n.useEffect)((()=>{l.IR.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,O.jsx)(s.C,{value:I,children:(0,O.jsx)("div",{className:"whatmore-carousel-events",style:{height:"100%"},children:(0,O.jsx)(i.x,{theme:r.ZP,cssVarsRoot:m,resetCSS:!1,children:(0,O.jsxs)(v.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[e.heading.trim().length>0||w?(0,O.jsx)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:(0,O.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-family",C,"important"),e.style.setProperty("font-size",h+"px","important"))},style:{color:c,backgroundClip:"text",textAlign:"center",fontWeight:(0,f.wOV)(d),lineHeight:(0,f.vY4)(d),letterSpacing:(0,f.X2K)(d)},children:w?"W"!==x?x:"":e.heading})}):(0,O.jsx)(O.Fragment,{}),"landscape"===t?(0,O.jsx)(b,{events:P,onClick:k}):(0,O.jsx)(M,{events:P,onClick:k})]})})})})}},1855:function(e,t,o){var n=o(7313),i=o(9821),r=o(7129),l=o(7753),s=o(6417);t.Z=function(e){var[t,o]=(0,i.Z)();(0,n.useContext)(r.V);const a=(0,l.MO)("whatmoreShopId");return e.event,(0,s.jsx)("div",{style:{margin:"0 auto",width:"8968077397"==a?void 0:o,aspectRatio:"8968077397"==a?9/16:void 0,height:"8968077397"==a?"100%":t,overflow:"hidden"}})}},9069:function(e,t,o){var n=o(7313),i=o(9821),r=(o(3439),o(7753)),l=o(4892),s=o(7129),a=o(6805),d=o(9854),c=o(364),p=o(9219),u=o(5945),h=o(7053),m=o(6417);t.Z=function(e){var t,o,y,v,x,f,g,w,P,j,S,C,O,I,M,b,k,Z,F;const[E,_,N,R,W]=(0,i.Z)();var T=(0,n.useContext)(s.V);const D=(0,r.MO)("whatmoreUITheme"),U=(0,r.MO)("whatmoreShopId"),z=(0,r.MO)("whatmorePrimaryFont"),V=(0,r.MO)("whatmoreSecondaryColor"),H=e.onClick,A=null===(t=e.isOnFocus)||void 0===t||t,B=null!==(o=e.playOnUnfocus)&&void 0!==o&&o,$=null!==(y=e.animateOnFocus&&(0,d.iWI)(U))&&void 0!==y&&y,G="portrait"===W[a.YP],q=(G?1.076*_*(0,d.pEd)(U):_*(0,d.H4g)(U))+"px",L=(G?1.076*_*(0,d.pEd)(U):_*(0,d.H4g)(U))+"px",X=(G?.965*_*(0,d.pEd)(U):.859*_*(0,d.H4g)(U))+"px",Y=(0,d.nzC)(U),{whatmoreIsPreviewMode:J}=(0,n.useContext)(c.I),K=.25*_,Q=K+"px",[ee,te]=(0,n.useState)(e.event),[oe,ne]=(0,n.useState)(),ie=Math.round(+(null===(v=ee.products)||void 0===v||null===(x=v[0])||void 0===x?void 0:x.price)),re=Math.round(+(null===ee||void 0===ee||null===(f=ee.products[0])||void 0===f?void 0:f.compare_price)),le=re&&0!=re&&re>ie?Math.round((re-ie)/re*100):NaN,[se,ae]=(0,n.useState)(le);return(0,n.useEffect)((()=>{(0,d.N8M)(U)&&(0,p.p_)(ee,(0,d.Ipo)(U),U).then((e=>{var t,o,n;te(e);const i=Math.round(null===(t=e.products)||void 0===t||null===(o=t[0])||void 0===o?void 0:o.price),r=Math.round(null===e||void 0===e||null===(n=e.products[0])||void 0===n?void 0:n.compare_price),l=r&&0!=r&&r>i?Math.round((r-i)/r*100):NaN;ae(l)}));(async()=>{var e;const t=await(0,h.p)(null===ee||void 0===ee||null===(e=ee.products)||void 0===e?void 0:e[0],(0,d.Ipo)(U),U);ne(t)})()}),[]),(0,m.jsxs)("div",{ref:e=>{e&&(e.style.setProperty("margin-top",T.tileTopMargin+"px","important"),e.style.setProperty("margin-bottom",T.tileBottomMMargin+"px","important"))},children:[(0,m.jsx)("div",{style:{margin:"0 auto",width:_,height:G&&A?"STR2FOC6KG9"==U||"STRDOIDF6O7"==U?E:1.1*E:E,borderRadius:"round"==D?"5px":"0px",boxShadow:"round"==D?Y:null,borderWidth:(0,d.alU)(U),borderColor:(0,d.qPe)(U),overflow:"hidden",cursor:"pointer"},className:$?A?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",onClick:()=>{H(ee)},children:(0,m.jsx)(l.Z,{height:(0,d.dXm)(U)+" !important",width:"100%",url:ee.thumbnail_image,isPlaying:A||B,event:ee})}),"STRSJFOP1GI"!=U&&(0,m.jsxs)("div",{onClick:()=>{H(ee)},className:$?A?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",style:{cursor:"pointer",display:"flex",gap:"6px",padding:"16px 12px"},children:[(J?(0,d.uU$)(U):(0,d.EIj)(U))&&(0,m.jsx)("div",{style:{maxWidth:Q,minWidth:null!==(g=ee.products)&&void 0!==g&&null!==(w=g[0])&&void 0!==w&&w.thumbnail_image?Q:"0",overflow:"hidden"},children:(0,m.jsx)("img",{ref:e=>{e&&e.style.setProperty("object-fit",(0,d.yOX)(U),"important")},src:null===(P=ee.products)||void 0===P||null===(j=P[0])||void 0===j?void 0:j.thumbnail_image})}),(0,m.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"5px"},children:[(0,m.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-size",q,"important"),e.style.setProperty("line-height","120%","important"),e.style.setProperty("font-family",z,"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,u.s)(null===(S=ee.products[0])||void 0===S?void 0:S.title)}),(0,d.QaY)(U)&&(0,m.jsxs)("div",{style:{display:"flex",gap:"12px",flexDirection:(0,d.$zZ)(U)?"row":"row-reverse",justifyContent:(0,d.$zZ)(U)?"flex-start":"flex-end"},children:[(0,m.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,d.Uyp)(U),"important"),e.style.setProperty("font-size",L,"important"),e.style.setProperty("font-family",z,"important"),e.style.setProperty("overflow","hidden","important"))},style:{textAlign:"left",fontWeight:"normal"==(0,d.rPP)(U)?"normal":"bold"},children:(0,p.jx)(parseFloat(null!==(C=null===oe||void 0===oe?void 0:oe.price)&&void 0!==C?C:null===ee||void 0===ee||null===(O=ee.products)||void 0===O||null===(I=O[0])||void 0===I?void 0:I.price)," ",U,null===(M=ee.products[0])||void 0===M?void 0:M.currency)}),!isNaN(re)&&re>ie&&(0,m.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,d.kPs)(U),"important"),e.style.setProperty("font-size",L,"important"),e.style.setProperty("font-family",z,"important"),e.style.setProperty("overflow","hidden","important"))},style:{textDecoration:"line-through"},children:(0,p.jx)(parseFloat(null!==(b=null===oe||void 0===oe?void 0:oe.compare_at_price)&&void 0!==b?b:null===ee||void 0===ee||null===(k=ee.products)||void 0===k||null===(Z=k[0])||void 0===Z?void 0:Z.compare_price)," ",U,null===(F=ee.products[0])||void 0===F?void 0:F.currency)})]}),(0,d.QaY)(U)&&!isNaN(se)&&0!=se&&(0,m.jsx)("div",{style:{display:"flex",backgroundColor:"green"==(0,d.ZJm)(U)?"#343434"==V?(0,d.ZJm)(U):V:(0,d.ZJm)(U),alignItems:"center",borderRadius:(0,d.CF_)(U)+"px",width:"fit-content",padding:(0,d.Spx)(U)?"3px 6px":"0px"},children:(0,d.Spx)(U)?(0,m.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,d.mso)(U),"important"),e.style.setProperty("font-size",X,"important"),e.style.setProperty("font-family",z,"important"))},children:"".concat(se,"% Off")}):(0,m.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,d.aUT)(U),"important"),e.style.setProperty("font-size",X,"important"),e.style.setProperty("font-family",(0,d.V3Y)(U),"important"))},children:(0,d.sG7)(U)})})]})]})]})}},5892:function(){},4444:function(){},1811:function(){},7850:function(){}}]);
|