whatmore-react-assets 1.0.930 → 1.0.931

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- /*! For license information please see 678.90bf28d6.chunk.js.LICENSE.txt */
2
- (self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[678],{9085:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return I}});var n=o(7313),r=(o(3439),o(6090)),i=o(5572),s=o(7616),l=(o(6143),o(4444),o(7244),o(123),o(5892),o(9302)),a=o(2575),c=o(9821),d=o(8866),p=o(2279),u=o.n(p),h=o(7753),x=o(7129),m=o(1855),f=o(9854),v=o(4522),y=o(778),g=o(4892),S=o(5945),C=o(9219),M=o(6805),P=o(8984),w=o(7053),D=o(6417);var R=function(e){var t,o,r,s,l,a,d,p,u,m,v,y,R,j;const[T,O,b,I,B]=(0,c.Z)(),F=(0,h.MO)("whatmoreShopId"),N="portrait"===B[M.YP],U=(N?1.076*O*(0,f.pEd)(F):O*(0,f.H4g)(F))+"px",E=(N?1.076*O*(0,f.pEd)(F):O*(0,f.H4g)(F))+"px",L=(N?.965*O*(0,f.pEd)(F):.859*O*(0,f.H4g)(F))+"px",[$,A]=(0,n.useState)(e.event),G=(0,h.MO)("whatmoreSecondaryColor");var K=(0,n.useContext)(x.V);const k=null===(t=e.isOnFocus)||void 0===t||t,Z=null!==(o=e.playOnUnfocus)&&void 0!==o&&o,Y=e.onClick,{whatmoreUITheme:W}=(0,n.useContext)(i.I),H=null!==(r=e.animateOnFocus&&(0,f.iWI)(F))&&void 0!==r&&r,[V,X]=(0,n.useState)(!1),z=(0,h.MO)("whatmorePrimaryFont"),J=Math.round(+(null===(s=$.products[0])||void 0===s?void 0:s.price)),_=Math.round(+(null===(l=$.products[0])||void 0===l?void 0:l.compare_price)),Q=_&&0!=_&&_>J?Math.round((_-J)/_*100):NaN,[q,ee]=(0,n.useState)(Q),[te,oe]=(0,n.useState)();return(0,n.useEffect)((()=>{(0,f.N8M)(F)&&(0,C.p_)($,(0,f.Ipo)(F),F).then((e=>{var t,o,n;A(e),(null===e||void 0===e||null===(t=e.products)||void 0===t||null===(o=t[0])||void 0===o?void 0:o.discount)&&ee(null===e||void 0===e||null===(n=e.products[0])||void 0===n?void 0:n.discount),X(!0)}));(async()=>{var e;const t=await(0,w.p)(null===$||void 0===$||null===(e=$.products)||void 0===e?void 0:e[0],(0,f.Ipo)(F),F);oe(t),X(!0)})()}),[]),(0,D.jsxs)("div",{ref:e=>{e&&(e.style.setProperty("margin-top",K.tileTopMargin+"px","important"),e.style.setProperty("margin-bottom",K.tileBottomMMargin+"px","important"))},className:H&&!N?k?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",style:{margin:"0 auto",cursor:"pointer",width:O},onClick:()=>{Y($)},children:[(0,D.jsx)("div",{style:{borderRadius:"round"==W?"5%":"0px",boxShadow:"round"==W?"0px 0px 5px 0px #B0B0B0":null,height:T,borderWidth:(0,f.alU)(F),borderColor:(0,f.qPe)(F),overflow:"hidden"},children:(0,D.jsx)(g.Z,{height:"100%",width:"100%",url:$.thumbnail_image,isPlaying:k||Z||(0,P.gE)(),event:$})}),(0,D.jsxs)("div",{style:{display:(0,f.pvY)(F)?"flex":"none",flexDirection:"column",padding:"12px 4px",gap:"5px"},children:[(0,D.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-size",U,"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,S.s)(null===(a=$.products[0])||void 0===a?void 0:a.title)}),V&&(0,f.QaY)(F)&&(0,D.jsxs)("div",{style:{display:"flex",gap:"12px",flexDirection:(0,f.$zZ)(F)?"row":"row-reverse",justifyContent:(0,f.$zZ)(F)?"flex-start":"flex-end"},children:[(0,D.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.Uyp)(F),"important"),e.style.setProperty("font-size",E,"important"),e.style.setProperty("font-family",z,"important"),e.style.setProperty("overflow","hidden","important"))},style:{textAlign:"left",fontWeight:"normal"==(0,f.rPP)(F)?"normal":"bold"},children:(0,C.jx)(parseFloat(null!==(d=null===te||void 0===te?void 0:te.price)&&void 0!==d?d:null===$||void 0===$||null===(p=$.products)||void 0===p||null===(u=p[0])||void 0===u?void 0:u.price)," ",F,null===(m=$.products[0])||void 0===m?void 0:m.currency)}),!isNaN(_)&&_>J&&(0,D.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.kPs)(F),"important"),e.style.setProperty("font-size",E,"important"),e.style.setProperty("font-family",z,"important"),e.style.setProperty("overflow","hidden","important"))},style:{textDecoration:"line-through"},children:(0,C.jx)(parseFloat(null!==(v=null===te||void 0===te?void 0:te.compare_at_price)&&void 0!==v?v:null===$||void 0===$||null===(y=$.products)||void 0===y||null===(R=y[0])||void 0===R?void 0:R.compare_price)," ",F,null===(j=$.products[0])||void 0===j?void 0:j.currency)})]}),(0,f.QaY)(F)&&!isNaN(q)&&0!=q&&V&&(0,D.jsx)("div",{style:{display:(0,f.aKo)(F)?"flex":"none",backgroundColor:"green"==(0,f.ZJm)(F)?"#343434"==G?(0,f.ZJm)(F):G:(0,f.ZJm)(F),alignItems:"center",borderRadius:(0,f.CF_)(F)+"px",width:"fit-content",padding:(0,f.Spx)(F)?"3px 6px":"0px"},children:(0,f.Spx)(F)?(0,D.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.mso)(F),"important"),e.style.setProperty("font-size",L,"important"),e.style.setProperty("font-family",z,"important"))},children:"".concat(q,"% Off")}):(0,D.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.aUT)(F),"important"),e.style.setProperty("font-size",L,"important"),e.style.setProperty("font-family",(0,f.V3Y)(F),"important"))},children:(0,f.sG7)(F)})})]})]})},j=o(7381);const T=(0,a.Z)({key:"whatmore-css-hv"});function O(e){const[t,o,r]=(0,c.Z)(),s=(0,h.MO)("whatmoreShopId"),l=e.events,a=e.onClick,{whatmoreWidgetSourceDetails:d}=(0,n.useContext)(i.I),p=Math.ceil(r),u=2*p,[x,g]=(0,n.useState)(u),[S,C]=(0,n.useState)(2*p),M=0===(0,f.WGf)(s)?24:(0,f.WGf)(s),[P,w]=(0,n.useState)({touchX:0,touchY:0}),j=()=>(0,D.jsx)("div",{style:{width:"50px",borderRadius:"50%",height:"50px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,D.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-right-portrait"})}),T=()=>(0,D.jsx)("div",{style:{width:"50px",borderRadius:"50%",height:"50px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,D.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-left-portrait"})}),O=e=>{if("next"===e){const e=2;C((e=>Math.min(e+Math.floor(r),l.length+p+1))),g((t=>Math.min(t+e,l.length+p+1)))}else C((e=>Math.max(e-Math.floor(r),u)));(0,v.y4)({userInteractionType:y.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:d})};return(0,D.jsxs)("div",{className:"whatmore-events-carousel-portrait",style:{display:"flex",justifyContent:"flex-start",paddingLeft:"12px",overflow:"hidden",position:"relative"},onTouchStart:e=>{w({touchX:e.touches[0].clientX,touchY:e.touches[0].clientY})},onTouchEnd:e=>{var t,o,n,r;const i=(null===(t=e.changedTouches)||void 0===t||null===(o=t[0])||void 0===o?void 0:o.clientX)-P.touchX,s=(null===(n=e.changedTouches)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.clientY)-P.touchY;Math.sqrt(i**2+s**2)>10&&Math.abs(i)>Math.abs(s)&&O(i>0?"prev":"next")},children:[(0,f.Yxs)(s)&&(0,D.jsxs)(D.Fragment,{children:[S<=l.length+p&&(0,D.jsx)("div",{onClick:()=>O("next"),style:{position:"absolute",zIndex:1,top:"50%",right:"0",transform:"translateY(-100%)"},children:(0,D.jsx)(j,{})}),S>2*p&&(0,D.jsx)("div",{onClick:()=>O("prev"),style:{position:"absolute",left:"0",zIndex:1,top:"50%",transform:"translateY(-100%)"},children:(0,D.jsx)(T,{})})]}),(0,D.jsx)("div",{style:{display:"flex",gap:M,transform:"translateX(-".concat((S-u)*(o+M),"px)"),transition:"transform 0.4s ease-in-out"},children:l.map(((e,t)=>t<x?(0,D.jsx)("div",{children:(0,D.jsx)(R,{isOnFocus:t<=S-p-1&&t>=Math.max(0,S-u),playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>a(e)})},"whatmore-carousel-tile-".concat(t)):(0,D.jsx)(m.Z,{})))})]})}function b(e){const[t,o,r,s]=(0,c.Z)(),[l,a]=(0,n.useState)(-1),d=(0,h.MO)("whatmoreShopId"),[p,x]=(0,n.useState)("next"),m=e.onClick,g=e.events,{whatmoreWidgetSourceDetails:S}=(0,n.useContext)(i.I),C=Math.min(Math.ceil(r),g.length),[M,P]=(0,n.useState)(0),w=0===(0,f.WGf)(d)?24:(0,f.WGf)(d),j=()=>(0,D.jsx)("div",{children:(0,D.jsx)("button",{onClick:I,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,D.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-right"})})}),T=()=>(0,D.jsx)("div",{children:(0,D.jsx)("button",{onClick:b,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,D.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-left"})})});(0,n.useEffect)((()=>{M<=C&&P((e=>e+C))}),[C]);const O=()=>{a(-1)},b=()=>{M!==C&&(x("prev"),P((e=>Math.max(Math.ceil(e-r),C))),(0,v.y4)({userInteractionType:y.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:S}))},I=()=>{M>g.length+r||(x("next"),P((e=>Math.floor(e+r))),(0,v.y4)({userInteractionType:y.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:S}))},B=M>g.length?g.length-C+1:M-C,F=M>=g.length?g.length:B+C,N=g.slice(B,F);return"STRSJFOP1GI"==d&&console.log(r,"ssv"),(0,D.jsxs)("div",{className:"whatmore-events-carousel-landscape",style:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"".concat(s,"px"),paddingRight:"".concat(s,"px")},children:["STRSJFOP1GI"==d&&g.length>5||g.length>=r-1&&(0,D.jsx)("div",{style:{position:"absolute",left:"0",zIndex:1,top:"50%",transform:"translateX(50%) translateY(-65%)"},children:M!==C&&(0,D.jsx)(T,{})}),(0,D.jsx)("div",{style:{display:"flex",gap:w+"px",width:"".concat(o*r*(0,f.Su5)(d),"px"),paddingLeft:"8px",justifyContent:g.length<=r-1||"STRSJFOP1GI"==d&&g.length<=5?"center":"flex-start",overflow:"hidden"},children:N.map(((e,t)=>{const o="whatmore-event-tile-landscape-".concat(e.index).concat(t===C-1?"-last":""),n=t===l;return(0,D.jsx)("div",{className:"whatmore-event-tile-horizontal-swipe-animation-".concat("next"===p?"next":"prev"),onMouseEnter:()=>(e=>{const t=u()((()=>a(e)),300);return t(),t.cancel})(t),onMouseLeave:O,children:(0,D.jsx)(R,{isOnFocus:n,playOnUnfocus:!0,animateOnFocus:!0,event:e,onClick:()=>(e=>{m(e)})(e)})},o)}))}),"STRSJFOP1GI"==d&&g.length>5||g.length>=r-1&&(0,D.jsx)("div",{style:{position:"absolute",zIndex:1,top:"50%",right:s+"px",transform:"translateY(-65%)"},children:M<=g.length&&(0,D.jsx)(j,{})})]})}var I=function(e){const[t,o,a]=(0,d.Z)(),[c]=(0,h.j1)("whatmoreShopId"),[p]=(0,h.j1)("whatmorePrimaryColor"),[u]=(0,h.j1)("whatmoreSecondaryColor"),[m]=(0,h.j1)("whatmoreTitleFont"),v="portrait"==t?(0,h.MO)("whatmoreTitleFontSizePortrait"):(0,h.MO)("whatmoreTitleFontSize"),{whatmoreRootId:y}=(0,n.useContext)(i.I),g=((0,h.MO)("isInDesignMode"),(0,h.MO)("whatmoreCollectionHeading")),{whatmoreIsCollectionsTemplate:S}=(0,n.useContext)(i.I),C=e.events,M=e.onClick,P=m;function w(e){M(e)}return(0,n.useEffect)((()=>{(0,j.Oo)("Video shopping powered by Whatmore!")}),[]),(0,n.useEffect)((()=>{i.$.forEach((e=>{var t;const o=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-f"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-f"]');if(!o)return;o&&e&&(e.style.minHeight="0px")}))}),[]),delete s.ZP.styles.global,(0,D.jsx)(l.C,{value:T,children:(0,D.jsx)("div",{className:"whatmore-carousel-events",children:(0,D.jsx)(r.x,{theme:s.ZP,cssVarsRoot:y,resetCSS:!1,children:(0,D.jsxs)(x.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[e.heading.trim().length>0||S?(0,D.jsx)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:(0,D.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-family",P,"important"),e.style.setProperty("font-size",v+"px","important"))},style:{color:p,backgroundClip:"text",textAlign:"center",fontWeight:(0,f.wOV)(c),lineHeight:(0,f.vY4)(c),letterSpacing:(0,f.X2K)(c)},children:S?"W"!==g?g:"":e.heading})}):(0,D.jsx)(D.Fragment,{}),"landscape"===t?(0,D.jsx)(b,{events:C,onClick:w}):(0,D.jsx)(O,{events:C,onClick:w})]})})})})}},7129:function(e,t,o){"use strict";o.d(t,{V:function(){return n}});const n=(0,o(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},1855:function(e,t,o){"use strict";var n=o(7313),r=o(9821),i=o(7129),s=o(6417);t.Z=function(e){var[t,o]=(0,r.Z)();return(0,n.useContext)(i.V),e.event,(0,s.jsx)("div",{style:{margin:"0 auto",width:o,height:t,overflow:"hidden"}})}},6040:function(e,t,o){const n=o(500);e.exports=function(e){if("string"!==typeof e)return;const t=e.toUpperCase();return Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0},e.exports.currencySymbolMap=n},500:function(e){e.exports={AED:"\u062f.\u0625",AFN:"\u060b",ALL:"L",AMD:"\u058f",ANG:"\u0192",AOA:"Kz",ARS:"$",AUD:"$",AWG:"\u0192",AZN:"\u20bc",BAM:"KM",BBD:"$",BDT:"\u09f3",BGN:"\u043b\u0432",BHD:".\u062f.\u0628",BIF:"FBu",BMD:"$",BND:"$",BOB:"$b",BOV:"BOV",BRL:"R$",BSD:"$",BTC:"\u20bf",BTN:"Nu.",BWP:"P",BYN:"Br",BYR:"Br",BZD:"BZ$",CAD:"$",CDF:"FC",CHE:"CHE",CHF:"CHF",CHW:"CHW",CLF:"CLF",CLP:"$",CNH:"\xa5",CNY:"\xa5",COP:"$",COU:"COU",CRC:"\u20a1",CUC:"$",CUP:"\u20b1",CVE:"$",CZK:"K\u010d",DJF:"Fdj",DKK:"kr",DOP:"RD$",DZD:"\u062f\u062c",EEK:"kr",EGP:"\xa3",ERN:"Nfk",ETB:"Br",ETH:"\u039e",EUR:"\u20ac",FJD:"$",FKP:"\xa3",GBP:"\xa3",GEL:"\u20be",GGP:"\xa3",GHC:"\u20b5",GHS:"GH\u20b5",GIP:"\xa3",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"\u20aa",IMP:"\xa3",INR:"\u20b9",IQD:"\u0639.\u062f",IRR:"\ufdfc",ISK:"kr",JEP:"\xa3",JMD:"J$",JOD:"JD",JPY:"\xa5",KES:"KSh",KGS:"\u043b\u0432",KHR:"\u17db",KMF:"CF",KPW:"\u20a9",KRW:"\u20a9",KWD:"KD",KYD:"$",KZT:"\u20b8",LAK:"\u20ad",LBP:"\xa3",LKR:"\u20a8",LRD:"$",LSL:"M",LTC:"\u0141",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"lei",MGA:"Ar",MKD:"\u0434\u0435\u043d",MMK:"K",MNT:"\u20ae",MOP:"MOP$",MRO:"UM",MRU:"UM",MUR:"\u20a8",MVR:"Rf",MWK:"MK",MXN:"$",MXV:"MXV",MYR:"RM",MZN:"MT",NAD:"$",NGN:"\u20a6",NIO:"C$",NOK:"kr",NPR:"\u20a8",NZD:"$",OMR:"\ufdfc",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"\u20b1",PKR:"\u20a8",PLN:"z\u0142",PYG:"Gs",QAR:"\ufdfc",RMB:"\uffe5",RON:"lei",RSD:"\u0414\u0438\u043d.",RUB:"\u20bd",RWF:"R\u20a3",SAR:"\ufdfc",SBD:"$",SCR:"\u20a8",SDG:"\u062c.\u0633.",SEK:"kr",SGD:"S$",SHP:"\xa3",SLL:"Le",SOS:"S",SRD:"$",SSP:"\xa3",STD:"Db",STN:"Db",SVC:"$",SYP:"\xa3",SZL:"E",THB:"\u0e3f",TJS:"SM",TMT:"T",TND:"\u062f.\u062a",TOP:"T$",TRL:"\u20a4",TRY:"\u20ba",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"\u20b4",UGX:"USh",USD:"$",UYI:"UYI",UYU:"$U",UYW:"UYW",UZS:"\u043b\u0432",VEF:"Bs",VES:"Bs.S",VND:"\u20ab",VUV:"VT",WST:"WS$",XAF:"FCFA",XBT:"\u0243",XCD:"$",XOF:"CFA",XPF:"\u20a3",XSU:"Sucre",XUA:"XUA",YER:"\ufdfc",ZAR:"R",ZMW:"ZK",ZWD:"Z$",ZWL:"$"}},3439:function(){},5892:function(){},4444:function(){},8507:function(e,t){"use strict";function o(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)e[n]=o[n]}return e}var n=function e(t,n){function r(e,r,i){if("undefined"!==typeof document){"number"===typeof(i=o({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var l in i)i[l]&&(s+="; "+l,!0!==i[l]&&(s+="="+i[l].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+s}}return Object.create({set:r,get:function(e){if("undefined"!==typeof document&&(!arguments.length||e)){for(var o=document.cookie?document.cookie.split("; "):[],n={},r=0;r<o.length;r++){var i=o[r].split("="),s=i.slice(1).join("=");try{var l=decodeURIComponent(i[0]);if(n[l]=t.read(s,l),e===l)break}catch(a){}}return e?n[e]:n}},remove:function(e,t){r(e,"",o({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,o({},this.attributes,t))},withConverter:function(t){return e(o({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});t.Z=n}}]);
1
+ /*! For license information please see 678.0bc96807.chunk.js.LICENSE.txt */
2
+ (self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[678],{9085:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return I}});var n=o(7313),r=(o(3439),o(6090)),i=o(5572),s=o(7616),l=(o(6143),o(4444),o(7244),o(123),o(5892),o(9302)),a=o(2575),c=o(9821),d=o(8866),p=o(2279),u=o.n(p),h=o(7753),x=o(7129),m=o(1855),f=o(9854),v=o(4522),y=o(778),g=o(4892),S=o(5945),C=o(9219),M=o(6805),P=o(8984),w=o(7053),D=o(6417);var R=function(e){var t,o,r,s,l,a,d,p,u,m,v,y,R,j;const[T,O,b,I,B]=(0,c.Z)(),F=(0,h.MO)("whatmoreShopId"),N="portrait"===B[M.YP],U=(N?1.076*O*(0,f.pEd)(F):O*(0,f.H4g)(F))+"px",E=(N?1.076*O*(0,f.pEd)(F):O*(0,f.H4g)(F))+"px",L=(N?.965*O*(0,f.pEd)(F):.859*O*(0,f.H4g)(F))+"px",[$,A]=(0,n.useState)(e.event),G=(0,h.MO)("whatmoreSecondaryColor");var K=(0,n.useContext)(x.V);const k=null===(t=e.isOnFocus)||void 0===t||t,Z=null!==(o=e.playOnUnfocus)&&void 0!==o&&o,Y=e.onClick,{whatmoreUITheme:W}=(0,n.useContext)(i.I),H=null!==(r=e.animateOnFocus&&(0,f.iWI)(F))&&void 0!==r&&r,[V,X]=(0,n.useState)(!1),z=(0,h.MO)("whatmorePrimaryFont"),J=Math.round(+(null===(s=$.products[0])||void 0===s?void 0:s.price)),_=Math.round(+(null===(l=$.products[0])||void 0===l?void 0:l.compare_price)),Q=_&&0!=_&&_>J?Math.round((_-J)/_*100):NaN,[q,ee]=(0,n.useState)(Q),[te,oe]=(0,n.useState)();return(0,n.useEffect)((()=>{(0,f.N8M)(F)&&(0,C.p_)($,(0,f.Ipo)(F),F).then((e=>{var t,o,n;A(e),(null===e||void 0===e||null===(t=e.products)||void 0===t||null===(o=t[0])||void 0===o?void 0:o.discount)&&ee(null===e||void 0===e||null===(n=e.products[0])||void 0===n?void 0:n.discount),X(!0)}));(async()=>{var e;const t=await(0,w.p)(null===$||void 0===$||null===(e=$.products)||void 0===e?void 0:e[0],(0,f.Ipo)(F),F);oe(t),X(!0)})()}),[]),(0,D.jsxs)("div",{ref:e=>{e&&(e.style.setProperty("margin-top",K.tileTopMargin+"px","important"),e.style.setProperty("margin-bottom",K.tileBottomMMargin+"px","important"))},className:H&&!N?k?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",style:{margin:"0 auto",cursor:"pointer",width:O},onClick:()=>{Y($)},children:[(0,D.jsx)("div",{style:{borderRadius:"round"==W?"5%":"0px",boxShadow:"round"==W?"0px 0px 5px 0px #B0B0B0":null,height:T,borderWidth:(0,f.alU)(F),borderColor:(0,f.qPe)(F),overflow:"hidden"},children:(0,D.jsx)(g.Z,{height:"100%",width:"100%",url:$.thumbnail_image,isPlaying:k||Z||(0,P.gE)(),event:$})}),(0,D.jsxs)("div",{style:{display:(0,f.pvY)(F)?"flex":"none",flexDirection:"column",padding:"12px 4px",gap:"5px"},children:[(0,D.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-size",U,"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,S.s)(null===(a=$.products[0])||void 0===a?void 0:a.title)}),V&&(0,f.QaY)(F)&&(0,D.jsxs)("div",{style:{display:"flex",gap:"12px",flexDirection:(0,f.$zZ)(F)?"row":"row-reverse",justifyContent:(0,f.$zZ)(F)?"flex-start":"flex-end"},children:[(0,D.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.Uyp)(F),"important"),e.style.setProperty("font-size",E,"important"),e.style.setProperty("font-family",z,"important"),e.style.setProperty("overflow","hidden","important"))},style:{textAlign:"left",fontWeight:"normal"==(0,f.rPP)(F)?"normal":"bold"},children:(0,C.jx)(parseFloat(null!==(d=null===te||void 0===te?void 0:te.price)&&void 0!==d?d:null===$||void 0===$||null===(p=$.products)||void 0===p||null===(u=p[0])||void 0===u?void 0:u.price)," ",F,null===(m=$.products[0])||void 0===m?void 0:m.currency)}),!isNaN(_)&&_>J&&(0,D.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.kPs)(F),"important"),e.style.setProperty("font-size",E,"important"),e.style.setProperty("font-family",z,"important"),e.style.setProperty("overflow","hidden","important"))},style:{textDecoration:"line-through"},children:(0,C.jx)(parseFloat(null!==(v=null===te||void 0===te?void 0:te.compare_at_price)&&void 0!==v?v:null===$||void 0===$||null===(y=$.products)||void 0===y||null===(R=y[0])||void 0===R?void 0:R.compare_price)," ",F,null===(j=$.products[0])||void 0===j?void 0:j.currency)})]}),(0,f.QaY)(F)&&!isNaN(q)&&0!=q&&V&&(0,D.jsx)("div",{style:{display:(0,f.aKo)(F)?"flex":"none",backgroundColor:"green"==(0,f.ZJm)(F)?"#343434"==G?(0,f.ZJm)(F):G:(0,f.ZJm)(F),alignItems:"center",borderRadius:(0,f.CF_)(F)+"px",width:"fit-content",padding:(0,f.Spx)(F)?"3px 6px":"0px"},children:(0,f.Spx)(F)?(0,D.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.mso)(F),"important"),e.style.setProperty("font-size",L,"important"),e.style.setProperty("font-family",z,"important"))},children:"".concat(q,"% Off")}):(0,D.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.aUT)(F),"important"),e.style.setProperty("font-size",L,"important"),e.style.setProperty("font-family",(0,f.V3Y)(F),"important"))},children:(0,f.sG7)(F)})})]})]})},j=o(7381);const T=(0,a.Z)({key:"whatmore-css-hv"});function O(e){const[t,o,r]=(0,c.Z)(),s=(0,h.MO)("whatmoreShopId"),l=e.events,a=e.onClick,{whatmoreWidgetSourceDetails:d}=(0,n.useContext)(i.I),p=Math.ceil(r),u=2*p,[x,g]=(0,n.useState)(u),[S,C]=(0,n.useState)(2*p),M=0===(0,f.WGf)(s)?24:(0,f.WGf)(s),[P,w]=(0,n.useState)({touchX:0,touchY:0}),j=()=>(0,D.jsx)("div",{style:{width:"50px",borderRadius:"50%",height:"50px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,D.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-right-portrait"})}),T=()=>(0,D.jsx)("div",{style:{width:"50px",borderRadius:"50%",height:"50px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,D.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-left-portrait"})}),O=e=>{if("next"===e){const e=2;C((e=>Math.min(e+Math.floor(r),l.length+p+1))),g((t=>Math.min(t+e,l.length+p+1)))}else C((e=>Math.max(e-Math.floor(r),u)));(0,v.y4)({userInteractionType:y.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:d})};return(0,D.jsxs)("div",{className:"whatmore-events-carousel-portrait",style:{display:"flex",justifyContent:"flex-start",paddingLeft:"12px",overflow:"hidden",position:"relative"},onTouchStart:e=>{w({touchX:e.touches[0].clientX,touchY:e.touches[0].clientY})},onTouchEnd:e=>{var t,o,n,r;const i=(null===(t=e.changedTouches)||void 0===t||null===(o=t[0])||void 0===o?void 0:o.clientX)-P.touchX,s=(null===(n=e.changedTouches)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.clientY)-P.touchY;Math.sqrt(i**2+s**2)>10&&Math.abs(i)>Math.abs(s)&&O(i>0?"prev":"next")},children:[(0,f.Yxs)(s)&&(0,D.jsxs)(D.Fragment,{children:[S<=l.length+p&&(0,D.jsx)("div",{onClick:()=>O("next"),style:{position:"absolute",zIndex:1,top:"50%",right:"0",transform:"translateY(-100%)"},children:(0,D.jsx)(j,{})}),S>2*p&&(0,D.jsx)("div",{onClick:()=>O("prev"),style:{position:"absolute",left:"0",zIndex:1,top:"50%",transform:"translateY(-100%)"},children:(0,D.jsx)(T,{})})]}),(0,D.jsx)("div",{style:{display:"flex",gap:M,transform:"translateX(-".concat((S-u)*(o+M),"px)"),transition:"transform 0.4s ease-in-out"},children:l.map(((e,t)=>t<x?(0,D.jsx)("div",{children:(0,D.jsx)(R,{isOnFocus:t<=S-p-1&&t>=Math.max(0,S-u),playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>a(e)})},"whatmore-carousel-tile-".concat(t)):(0,D.jsx)(m.Z,{})))})]})}function b(e){const[t,o,r,s]=(0,c.Z)(),[l,a]=(0,n.useState)(-1),d=(0,h.MO)("whatmoreShopId"),[p,x]=(0,n.useState)("next"),m=e.onClick,g=e.events,{whatmoreWidgetSourceDetails:S}=(0,n.useContext)(i.I),C=Math.min(Math.ceil(r),g.length),[M,P]=(0,n.useState)(0),w=0===(0,f.WGf)(d)?24:(0,f.WGf)(d),j=()=>(0,D.jsx)("div",{children:(0,D.jsx)("button",{onClick:I,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,D.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-right"})})}),T=()=>(0,D.jsx)("div",{children:(0,D.jsx)("button",{onClick:b,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,D.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-left"})})});(0,n.useEffect)((()=>{M<=C&&P((e=>e+C))}),[C]);const O=()=>{a(-1)},b=()=>{M!==C&&(x("prev"),P((e=>Math.max(Math.ceil(e-r),C))),(0,v.y4)({userInteractionType:y.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:S}))},I=()=>{M>g.length+r||(x("next"),P((e=>Math.floor(e+r))),(0,v.y4)({userInteractionType:y.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:S}))},B=M>g.length?g.length-C+1:M-C,F=M>=g.length?g.length:B+C,N=g.slice(B,F);return"STRSJFOP1GI"==d&&console.log(r,"ssv"),(0,D.jsxs)("div",{className:"whatmore-events-carousel-landscape",style:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"".concat(s,"px"),paddingRight:"".concat(s,"px")},children:[g.length>=r-1&&(0,D.jsx)("div",{style:{position:"absolute",left:"0",zIndex:1,top:"50%",transform:"translateX(50%) translateY(-65%)"},children:M!==C&&!("STRSJFOP1GI"==d&&g.length<=5)&&(0,D.jsx)(T,{})}),(0,D.jsx)("div",{style:{display:"flex",gap:w+"px",width:"".concat(o*r*(0,f.Su5)(d),"px"),paddingLeft:"8px",justifyContent:g.length<=r-1||"STRSJFOP1GI"==d&&g.length<=5?"center":"flex-start",overflow:"hidden"},children:N.map(((e,t)=>{const o="whatmore-event-tile-landscape-".concat(e.index).concat(t===C-1?"-last":""),n=t===l;return(0,D.jsx)("div",{className:"whatmore-event-tile-horizontal-swipe-animation-".concat("next"===p?"next":"prev"),onMouseEnter:()=>(e=>{const t=u()((()=>a(e)),300);return t(),t.cancel})(t),onMouseLeave:O,children:(0,D.jsx)(R,{isOnFocus:n,playOnUnfocus:!0,animateOnFocus:!0,event:e,onClick:()=>(e=>{m(e)})(e)})},o)}))}),g.length>=r-1&&(0,D.jsx)("div",{style:{position:"absolute",zIndex:1,top:"50%",right:s+"px",transform:"translateY(-65%)"},children:M<=g.length&&!("STRSJFOP1GI"==d&&g.length<=5)&&(0,D.jsx)(j,{})})]})}var I=function(e){const[t,o,a]=(0,d.Z)(),[c]=(0,h.j1)("whatmoreShopId"),[p]=(0,h.j1)("whatmorePrimaryColor"),[u]=(0,h.j1)("whatmoreSecondaryColor"),[m]=(0,h.j1)("whatmoreTitleFont"),v="portrait"==t?(0,h.MO)("whatmoreTitleFontSizePortrait"):(0,h.MO)("whatmoreTitleFontSize"),{whatmoreRootId:y}=(0,n.useContext)(i.I),g=((0,h.MO)("isInDesignMode"),(0,h.MO)("whatmoreCollectionHeading")),{whatmoreIsCollectionsTemplate:S}=(0,n.useContext)(i.I),C=e.events,M=e.onClick,P=m;function w(e){M(e)}return(0,n.useEffect)((()=>{(0,j.Oo)("Video shopping powered by Whatmore!")}),[]),(0,n.useEffect)((()=>{i.$.forEach((e=>{var t;const o=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-f"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-f"]');if(!o)return;o&&e&&(e.style.minHeight="0px")}))}),[]),delete s.ZP.styles.global,(0,D.jsx)(l.C,{value:T,children:(0,D.jsx)("div",{className:"whatmore-carousel-events",children:(0,D.jsx)(r.x,{theme:s.ZP,cssVarsRoot:y,resetCSS:!1,children:(0,D.jsxs)(x.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[e.heading.trim().length>0||S?(0,D.jsx)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:(0,D.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-family",P,"important"),e.style.setProperty("font-size",v+"px","important"))},style:{color:p,backgroundClip:"text",textAlign:"center",fontWeight:(0,f.wOV)(c),lineHeight:(0,f.vY4)(c),letterSpacing:(0,f.X2K)(c)},children:S?"W"!==g?g:"":e.heading})}):(0,D.jsx)(D.Fragment,{}),"landscape"===t?(0,D.jsx)(b,{events:C,onClick:w}):(0,D.jsx)(O,{events:C,onClick:w})]})})})})}},7129:function(e,t,o){"use strict";o.d(t,{V:function(){return n}});const n=(0,o(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},1855:function(e,t,o){"use strict";var n=o(7313),r=o(9821),i=o(7129),s=o(6417);t.Z=function(e){var[t,o]=(0,r.Z)();return(0,n.useContext)(i.V),e.event,(0,s.jsx)("div",{style:{margin:"0 auto",width:o,height:t,overflow:"hidden"}})}},6040:function(e,t,o){const n=o(500);e.exports=function(e){if("string"!==typeof e)return;const t=e.toUpperCase();return Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0},e.exports.currencySymbolMap=n},500:function(e){e.exports={AED:"\u062f.\u0625",AFN:"\u060b",ALL:"L",AMD:"\u058f",ANG:"\u0192",AOA:"Kz",ARS:"$",AUD:"$",AWG:"\u0192",AZN:"\u20bc",BAM:"KM",BBD:"$",BDT:"\u09f3",BGN:"\u043b\u0432",BHD:".\u062f.\u0628",BIF:"FBu",BMD:"$",BND:"$",BOB:"$b",BOV:"BOV",BRL:"R$",BSD:"$",BTC:"\u20bf",BTN:"Nu.",BWP:"P",BYN:"Br",BYR:"Br",BZD:"BZ$",CAD:"$",CDF:"FC",CHE:"CHE",CHF:"CHF",CHW:"CHW",CLF:"CLF",CLP:"$",CNH:"\xa5",CNY:"\xa5",COP:"$",COU:"COU",CRC:"\u20a1",CUC:"$",CUP:"\u20b1",CVE:"$",CZK:"K\u010d",DJF:"Fdj",DKK:"kr",DOP:"RD$",DZD:"\u062f\u062c",EEK:"kr",EGP:"\xa3",ERN:"Nfk",ETB:"Br",ETH:"\u039e",EUR:"\u20ac",FJD:"$",FKP:"\xa3",GBP:"\xa3",GEL:"\u20be",GGP:"\xa3",GHC:"\u20b5",GHS:"GH\u20b5",GIP:"\xa3",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"\u20aa",IMP:"\xa3",INR:"\u20b9",IQD:"\u0639.\u062f",IRR:"\ufdfc",ISK:"kr",JEP:"\xa3",JMD:"J$",JOD:"JD",JPY:"\xa5",KES:"KSh",KGS:"\u043b\u0432",KHR:"\u17db",KMF:"CF",KPW:"\u20a9",KRW:"\u20a9",KWD:"KD",KYD:"$",KZT:"\u20b8",LAK:"\u20ad",LBP:"\xa3",LKR:"\u20a8",LRD:"$",LSL:"M",LTC:"\u0141",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"lei",MGA:"Ar",MKD:"\u0434\u0435\u043d",MMK:"K",MNT:"\u20ae",MOP:"MOP$",MRO:"UM",MRU:"UM",MUR:"\u20a8",MVR:"Rf",MWK:"MK",MXN:"$",MXV:"MXV",MYR:"RM",MZN:"MT",NAD:"$",NGN:"\u20a6",NIO:"C$",NOK:"kr",NPR:"\u20a8",NZD:"$",OMR:"\ufdfc",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"\u20b1",PKR:"\u20a8",PLN:"z\u0142",PYG:"Gs",QAR:"\ufdfc",RMB:"\uffe5",RON:"lei",RSD:"\u0414\u0438\u043d.",RUB:"\u20bd",RWF:"R\u20a3",SAR:"\ufdfc",SBD:"$",SCR:"\u20a8",SDG:"\u062c.\u0633.",SEK:"kr",SGD:"S$",SHP:"\xa3",SLL:"Le",SOS:"S",SRD:"$",SSP:"\xa3",STD:"Db",STN:"Db",SVC:"$",SYP:"\xa3",SZL:"E",THB:"\u0e3f",TJS:"SM",TMT:"T",TND:"\u062f.\u062a",TOP:"T$",TRL:"\u20a4",TRY:"\u20ba",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"\u20b4",UGX:"USh",USD:"$",UYI:"UYI",UYU:"$U",UYW:"UYW",UZS:"\u043b\u0432",VEF:"Bs",VES:"Bs.S",VND:"\u20ab",VUV:"VT",WST:"WS$",XAF:"FCFA",XBT:"\u0243",XCD:"$",XOF:"CFA",XPF:"\u20a3",XSU:"Sucre",XUA:"XUA",YER:"\ufdfc",ZAR:"R",ZMW:"ZK",ZWD:"Z$",ZWL:"$"}},3439:function(){},5892:function(){},4444:function(){},8507:function(e,t){"use strict";function o(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)e[n]=o[n]}return e}var n=function e(t,n){function r(e,r,i){if("undefined"!==typeof document){"number"===typeof(i=o({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var l in i)i[l]&&(s+="; "+l,!0!==i[l]&&(s+="="+i[l].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+s}}return Object.create({set:r,get:function(e){if("undefined"!==typeof document&&(!arguments.length||e)){for(var o=document.cookie?document.cookie.split("; "):[],n={},r=0;r<o.length;r++){var i=o[r].split("="),s=i.slice(1).join("=");try{var l=decodeURIComponent(i[0]);if(n[l]=t.read(s,l),e===l)break}catch(a){}}return e?n[e]:n}},remove:function(e,t){r(e,"",o({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,o({},this.attributes,t))},withConverter:function(t){return e(o({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});t.Z=n}}]);