whatmore-react-assets 1.0.802 → 1.0.804
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/{189.21c39a5b.chunk.js → 189.5550010c.chunk.js} +2 -2
- package/static/js/{218.23a34873.chunk.js → 218.fc60bd36.chunk.js} +1 -1
- package/static/js/{436.e39707ff.chunk.js → 436.5f362224.chunk.js} +1 -1
- package/static/js/{891.b369d529.chunk.js → 891.72848548.chunk.js} +1 -1
- package/whatmore.js +2 -2
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 189.
|
|
2
|
-
(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[189],{9085:function(t,e,o){"use strict";o.r(e),o.d(e,{default:function(){return O}});var r=o(7313),n=(o(3439),o(6090)),i=o(9852),s=o(7616),a=(o(6143),o(7850),o(4444),o(7244),o(123),o(5892),o(1811),o(9302)),l=o(2575),c=o(9821),d=o(8866),p=o(2279),u=o.n(p),h=o(7753),x=o(7129),f=o(1855),m=o(9854),y=o(7376),v=o(778),g=o(4892),C=o(5945),M=o(9219),S=o(6805),P=o(8984),w=o(6417);var D=function(t){var e,o,n,s,a,l,d,p,u,f;const[y,v,D,j,R]=(0,c.Z)(),b=(0,h.MO)("whatmoreShopId"),T="portrait"===R[S.YP],O=(T?1.076*v*(0,m.pEd)(b):v*(0,m.H4g)(b))+"px",B=(T?1.076*v*(0,m.pEd)(b):v*(0,m.H4g)(b))+"px",N=(T?.965*v*(0,m.pEd)(b):.859*v*(0,m.H4g)(b))+"px",[I,U]=(0,r.useState)(t.event),E=(0,h.MO)("whatmoreSecondaryColor");var F=(0,r.useContext)(x.V);const L=null===(e=t.isOnFocus)||void 0===e||e,$=null!==(o=t.playOnUnfocus)&&void 0!==o&&o,A=t.onClick,{whatmoreUITheme:K}=(0,r.useContext)(i.I),k=null!==(n=t.animateOnFocus&&(0,m.iWI)(b))&&void 0!==n&&n,[G,Z]=(0,r.useState)(!(0,m.N8M)(b)),Y=(0,h.MO)("whatmorePrimaryFont"),W=Math.round(+(null===(s=I.products[0])||void 0===s?void 0:s.price)),H=Math.round(+(null===(a=I.products[0])||void 0===a?void 0:a.compare_price)),V=H&&0!=H&&H>W?Math.round((H-W)/H*100):NaN,[X,z]=(0,r.useState)(V);return(0,r.useEffect)((()=>{(0,m.N8M)(b)&&(0,M.p_)(I,(0,m.Ipo)(b),b).then((t=>{var e,o,r;U(t),(null===t||void 0===t||null===(e=t.products)||void 0===e||null===(o=e[0])||void 0===o?void 0:o.discount)&&z(null===t||void 0===t||null===(r=t.products[0])||void 0===r?void 0:r.discount),Z(!0)}))}),[]),(0,w.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top",F.tileTopMargin+"px","important"),t.style.setProperty("margin-bottom",F.tileBottomMMargin+"px","important"))},className:k&&!T?L?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",style:{margin:"0 auto",cursor:"pointer",width:v},onClick:()=>{A(I)},children:[(0,w.jsx)("div",{style:{borderRadius:"round"==K?"5%":"0px",boxShadow:"round"==K?"0px 0px 5px 0px #B0B0B0":null,height:y,borderWidth:(0,m.alU)(b),borderColor:(0,m.qPe)(b),overflow:"hidden"},children:(0,w.jsx)(g.Z,{height:"100%",width:"100%",url:I.thumbnail_image,isPlaying:L||$||(0,P.gE)(),event:I})}),(0,w.jsxs)("div",{style:{display:(0,m.pvY)(b)?"flex":"none",flexDirection:"column",padding:"12px 4px",gap:"5px"},children:[(0,w.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-size",O,"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",Y,"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,C.s)(null===(l=I.products[0])||void 0===l?void 0:l.title)}),G&&(0,m.QaY)(b)&&(0,w.jsxs)("div",{style:{display:"flex",gap:"12px",flexDirection:(0,m.$zZ)(b)?"row":"row-reverse",justifyContent:(0,m.$zZ)(b)?"flex-start":"flex-end"},children:[(0,w.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,m.Uyp)(b),"important"),t.style.setProperty("font-size",B,"important"),t.style.setProperty("font-family",Y,"important"),t.style.setProperty("overflow","hidden","important"))},style:{textAlign:"left",fontWeight:"normal"==(0,m.rPP)(b)?"normal":"bold"},children:(0,M.jx)(parseFloat(null===(d=I.products[0])||void 0===d?void 0:d.price)," ",b,null===(p=I.products[0])||void 0===p?void 0:p.currency)}),!isNaN(H)&&H>W&&(0,w.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,m.kPs)(b),"important"),t.style.setProperty("font-size",B,"important"),t.style.setProperty("font-family",Y,"important"),t.style.setProperty("overflow","hidden","important"))},style:{textDecoration:"line-through"},children:(0,M.jx)(parseFloat(null===(u=I.products[0])||void 0===u?void 0:u.compare_price)," ",b,null===(f=I.products[0])||void 0===f?void 0:f.currency)})]}),(0,m.QaY)(b)&&!isNaN(X)&&0!=X&&G&&(0,w.jsx)("div",{style:{display:(0,m.aKo)(b)?"flex":"none",backgroundColor:"green"==(0,m.ZJm)(b)?"#343434"==E?(0,m.ZJm)(b):E:(0,m.ZJm)(b),alignItems:"center",borderRadius:(0,m.CF_)(b)+"px",width:"fit-content",padding:(0,m.Spx)(b)?"3px 6px":"0px"},children:(0,m.Spx)(b)?(0,w.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,m.mso)(b),"important"),t.style.setProperty("font-size",N,"important"),t.style.setProperty("font-family",Y,"important"))},children:"".concat(X,"% Off")}):(0,w.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,m.aUT)(b),"important"),t.style.setProperty("font-size",N,"important"),t.style.setProperty("font-family",(0,m.V3Y)(b),"important"))},children:(0,m.sG7)(b)})})]})]})},j=o(7381);const R=(0,l.Z)({key:"whatmore-css-hv"});function b(t){const[e,o,n]=(0,c.Z)(),s=(0,h.MO)("whatmoreShopId"),a=t.events,l=t.onClick,{whatmoreWidgetSourceDetails:d}=(0,r.useContext)(i.I),p=Math.ceil(n),u=2*p,[x,g]=(0,r.useState)(u),[C,M]=(0,r.useState)(2*p),S=0===(0,m.WGf)(s)?24:(0,m.WGf)(s),[P,j]=(0,r.useState)({touchX:0,touchY:0}),R=()=>(0,w.jsx)("div",{style:{width:"50px",borderRadius:"50%",height:"50px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,w.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-right-portrait"})}),b=()=>(0,w.jsx)("div",{style:{width:"50px",borderRadius:"50%",height:"50px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,w.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-left-portrait"})}),T=t=>{if("next"===t){const t=2;M((t=>Math.min(t+Math.floor(n),a.length+p+1))),g((e=>Math.min(e+t,a.length+p+1)))}else M((t=>Math.max(t-Math.floor(n),u)));(0,y.y4)({userInteractionType:v.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:d})};return(0,w.jsxs)("div",{className:"whatmore-events-carousel-portrait",style:{display:"flex",justifyContent:"flex-start",paddingLeft:"12px",overflow:"hidden",position:"relative"},onTouchStart:t=>{j({touchX:t.touches[0].clientX,touchY:t.touches[0].clientY})},onTouchEnd:t=>{var e,o,r,n;const i=(null===(e=t.changedTouches)||void 0===e||null===(o=e[0])||void 0===o?void 0:o.clientX)-P.touchX,s=(null===(r=t.changedTouches)||void 0===r||null===(n=r[0])||void 0===n?void 0:n.clientY)-P.touchY;Math.sqrt(i**2+s**2)>10&&Math.abs(i)>Math.abs(s)&&T(i>0?"prev":"next")},children:[(0,m.Yxs)(s)&&(0,w.jsxs)(w.Fragment,{children:[C<=a.length+p&&(0,w.jsx)("div",{onClick:()=>T("next"),style:{position:"absolute",zIndex:1,top:"50%",right:"0",transform:"translateY(-100%)"},children:(0,w.jsx)(R,{})}),C>2*p&&(0,w.jsx)("div",{onClick:()=>T("prev"),style:{position:"absolute",left:"0",zIndex:1,top:"50%",transform:"translateY(-100%)"},children:(0,w.jsx)(b,{})})]}),(0,w.jsx)("div",{style:{display:"flex",gap:S,transform:"translateX(-".concat((C-u)*(o+S),"px)"),transition:"transform 0.4s ease-in-out"},children:a.map(((t,e)=>e<x?(0,w.jsx)("div",{children:(0,w.jsx)(D,{isOnFocus:e<=C-p-1&&e>=Math.max(0,C-u),playOnUnfocus:!1,animateOnFocus:!0,event:t,onClick:()=>l(t)})},"whatmore-carousel-tile-".concat(e)):(0,w.jsx)(f.Z,{})))})]})}function T(t){const[e,o,n,s]=(0,c.Z)(),[a,l]=(0,r.useState)(-1),d=(0,h.MO)("whatmoreShopId"),[p,x]=(0,r.useState)("next"),f=t.onClick,g=t.events,{whatmoreWidgetSourceDetails:C}=(0,r.useContext)(i.I),M=Math.min(Math.ceil(n),g.length),[S,P]=(0,r.useState)(0),j=0===(0,m.WGf)(d)?24:(0,m.WGf)(d),R=()=>(0,w.jsx)("div",{children:(0,w.jsx)("button",{onClick:B,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,w.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-right"})})}),b=()=>(0,w.jsx)("div",{children:(0,w.jsx)("button",{onClick:O,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,w.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-left"})})});(0,r.useEffect)((()=>{S<=M&&P((t=>t+M))}),[M]);const T=()=>{l(-1)},O=()=>{S!==M&&(x("prev"),P((t=>Math.max(Math.ceil(t-n),M))),(0,y.y4)({userInteractionType:v.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:C}))},B=()=>{S>g.length+n||(x("next"),P((t=>Math.floor(t+n))),(0,y.y4)({userInteractionType:v.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:C}))},N=S>g.length?g.length-M+1:S-M,I=S>=g.length?g.length:N+M,U=g.slice(N,I);return(0,w.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>=n-1&&(0,w.jsx)("div",{style:{position:"absolute",left:"0",zIndex:1,top:"50%",transform:"translateX(50%) translateY(-65%)"},children:S!==M&&(0,w.jsx)(b,{})}),(0,w.jsx)("div",{style:{display:"flex",gap:j+"px",width:"".concat(o*n*(0,m.Su5)(d),"px"),paddingLeft:"8px",justifyContent:g.length<=n-1?"center":"flex-start",overflow:"hidden"},children:U.map(((t,e)=>{const o="whatmore-event-tile-landscape-".concat(t.index).concat(e===M-1?"-last":""),r=e===a;return(0,w.jsx)("div",{className:"whatmore-event-tile-horizontal-swipe-animation-".concat("next"===p?"next":"prev"),onMouseEnter:()=>(t=>{const e=u()((()=>l(t)),300);return e(),e.cancel})(e),onMouseLeave:T,children:(0,w.jsx)(D,{isOnFocus:r,playOnUnfocus:!0,animateOnFocus:!0,event:t,onClick:()=>(t=>{f(t)})(t)})},o)}))}),g.length>=n-1&&(0,w.jsx)("div",{style:{position:"absolute",zIndex:1,top:"50%",right:s+"px",transform:"translateY(-65%)"},children:S<=g.length&&(0,w.jsx)(R,{})})]})}var O=function(t){const[e,o,l]=(0,d.Z)(),[c]=(0,h.j1)("whatmoreShopId"),[p]=(0,h.j1)("whatmorePrimaryColor"),[u]=(0,h.j1)("whatmoreSecondaryColor"),[f]=(0,h.j1)("whatmoreTitleFont"),y="portrait"==e?(0,h.MO)("whatmoreTitleFontSizePortrait"):(0,h.MO)("whatmoreTitleFontSize"),{whatmoreRootId:v}=(0,r.useContext)(i.I),g=((0,h.MO)("isInDesignMode"),(0,h.MO)("whatmoreCollectionHeading")),{whatmoreIsCollectionsTemplate:C}=(0,r.useContext)(i.I),M=t.events,S=t.onClick,P=(0,m.aRS)(c)?(0,m.aRS)(c):f;function D(t){S(t)}return(0,r.useEffect)((()=>{(0,j.Oo)("Video shopping powered by Whatmore!")}),[]),(0,r.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;o&&t&&(t.style.minHeight="0px")}))}),[]),delete s.ZP.styles.global,(0,w.jsx)(a.C,{value:R,children:(0,w.jsx)("div",{children:(0,w.jsx)(n.x,{theme:s.ZP,cssVarsRoot:v,resetCSS:!1,children:(0,w.jsxs)(x.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[t.heading.trim().length>0||C?(0,w.jsx)("div",{className:"whatmore-events-carousel",style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:(0,w.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",P,"important"),t.style.setProperty("font-size",y+"px","important"))},style:{color:p,backgroundClip:"text",textAlign:"center",fontWeight:(0,m.wOV)(c),lineHeight:(0,m.vY4)(c),letterSpacing:(0,m.X2K)(c)},children:C?"W"!==g?g:"":t.heading})}):(0,w.jsx)(w.Fragment,{}),"landscape"===e?(0,w.jsx)(T,{events:M,onClick:D}):(0,w.jsx)(b,{events:M,onClick:D})]})})})})}},7129:function(t,e,o){"use strict";o.d(e,{V:function(){return r}});const r=(0,o(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},1855:function(t,e,o){"use strict";var r=o(7313),n=o(9821),i=o(7129),s=o(6417);e.Z=function(t){var[e,o]=(0,n.Z)();return(0,r.useContext)(i.V),t.event,(0,s.jsx)("div",{style:{margin:"0 auto",width:o,height:e,overflow:"hidden"}})}},6040:function(t,e,o){const r=o(500);t.exports=function(t){if("string"!==typeof t)return;const e=t.toUpperCase();return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0},t.exports.currencySymbolMap=r},500:function(t){t.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(){},1811:function(){},7850:function(){},8507:function(t,e){"use strict";function o(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var r in o)t[r]=o[r]}return t}var r=function t(e,r){function n(t,n,i){if("undefined"!==typeof document){"number"===typeof(i=o({},r,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in i)i[a]&&(s+="; "+a,!0!==i[a]&&(s+="="+i[a].split(";")[0]));return document.cookie=t+"="+e.write(n,t)+s}}return Object.create({set:n,get:function(t){if("undefined"!==typeof document&&(!arguments.length||t)){for(var o=document.cookie?document.cookie.split("; "):[],r={},n=0;n<o.length;n++){var i=o[n].split("="),s=i.slice(1).join("=");try{var a=decodeURIComponent(i[0]);if(r[a]=e.read(s,a),t===a)break}catch(l){}}return t?r[t]:r}},remove:function(t,e){n(t,"",o({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,o({},this.attributes,e))},withConverter:function(e){return t(o({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});e.Z=r}}]);
|
|
1
|
+
/*! For license information please see 189.5550010c.chunk.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[189],{9085:function(t,e,o){"use strict";o.r(e),o.d(e,{default:function(){return O}});var r=o(7313),n=(o(3439),o(6090)),i=o(9852),s=o(7616),a=(o(6143),o(7850),o(4444),o(7244),o(123),o(5892),o(1811),o(9302)),l=o(2575),c=o(9821),d=o(8866),p=o(2279),u=o.n(p),h=o(7753),x=o(7129),f=o(1855),m=o(9854),y=o(7376),v=o(778),g=o(4892),C=o(5945),M=o(9219),S=o(6805),P=o(8984),w=o(6417);var D=function(t){var e,o,n,s,a,l,d,p,u,f;const[y,v,D,j,R]=(0,c.Z)(),b=(0,h.MO)("whatmoreShopId"),T="portrait"===R[S.YP],O=(T?1.076*v*(0,m.pEd)(b):v*(0,m.H4g)(b))+"px",B=(T?1.076*v*(0,m.pEd)(b):v*(0,m.H4g)(b))+"px",N=(T?.965*v*(0,m.pEd)(b):.859*v*(0,m.H4g)(b))+"px",[I,U]=(0,r.useState)(t.event),E=(0,h.MO)("whatmoreSecondaryColor");var F=(0,r.useContext)(x.V);const L=null===(e=t.isOnFocus)||void 0===e||e,$=null!==(o=t.playOnUnfocus)&&void 0!==o&&o,A=t.onClick,{whatmoreUITheme:K}=(0,r.useContext)(i.I),k=null!==(n=t.animateOnFocus&&(0,m.iWI)(b))&&void 0!==n&&n,[G,Z]=(0,r.useState)(!(0,m.N8M)(b)),Y=(0,h.MO)("whatmorePrimaryFont"),W=Math.round(+(null===(s=I.products[0])||void 0===s?void 0:s.price)),H=Math.round(+(null===(a=I.products[0])||void 0===a?void 0:a.compare_price)),V=H&&0!=H&&H>W?Math.round((H-W)/H*100):NaN,[X,z]=(0,r.useState)(V);return(0,r.useEffect)((()=>{(0,m.N8M)(b)&&(0,M.p_)(I,(0,m.Ipo)(b),b).then((t=>{var e,o,r;U(t),(null===t||void 0===t||null===(e=t.products)||void 0===e||null===(o=e[0])||void 0===o?void 0:o.discount)&&z(null===t||void 0===t||null===(r=t.products[0])||void 0===r?void 0:r.discount),Z(!0)}))}),[]),(0,w.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top",F.tileTopMargin+"px","important"),t.style.setProperty("margin-bottom",F.tileBottomMMargin+"px","important"))},className:k&&!T?L?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",style:{margin:"0 auto",cursor:"pointer",width:v},onClick:()=>{A(I)},children:[(0,w.jsx)("div",{style:{borderRadius:"round"==K?"5%":"0px",boxShadow:"round"==K?"0px 0px 5px 0px #B0B0B0":null,height:y,borderWidth:(0,m.alU)(b),borderColor:(0,m.qPe)(b),overflow:"hidden"},children:(0,w.jsx)(g.Z,{height:"100%",width:"100%",url:I.thumbnail_image,isPlaying:L||$||(0,P.gE)(),event:I})}),(0,w.jsxs)("div",{style:{display:(0,m.pvY)(b)?"flex":"none",flexDirection:"column",padding:"12px 4px",gap:"5px"},children:[(0,w.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-size",O,"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",Y,"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,C.s)(null===(l=I.products[0])||void 0===l?void 0:l.title)}),G&&(0,m.QaY)(b)&&(0,w.jsxs)("div",{style:{display:"flex",gap:"12px",flexDirection:(0,m.$zZ)(b)?"row":"row-reverse",justifyContent:(0,m.$zZ)(b)?"flex-start":"flex-end"},children:[(0,w.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,m.Uyp)(b),"important"),t.style.setProperty("font-size",B,"important"),t.style.setProperty("font-family",Y,"important"),t.style.setProperty("overflow","hidden","important"))},style:{textAlign:"left",fontWeight:"normal"==(0,m.rPP)(b)?"normal":"bold"},children:(0,M.jx)(parseFloat(null===(d=I.products[0])||void 0===d?void 0:d.price)," ",b,null===(p=I.products[0])||void 0===p?void 0:p.currency)}),!isNaN(H)&&H>W&&(0,w.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,m.kPs)(b),"important"),t.style.setProperty("font-size",B,"important"),t.style.setProperty("font-family",Y,"important"),t.style.setProperty("overflow","hidden","important"))},style:{textDecoration:"line-through"},children:(0,M.jx)(parseFloat(null===(u=I.products[0])||void 0===u?void 0:u.compare_price)," ",b,null===(f=I.products[0])||void 0===f?void 0:f.currency)})]}),(0,m.QaY)(b)&&!isNaN(X)&&0!=X&&G&&(0,w.jsx)("div",{style:{display:(0,m.aKo)(b)?"flex":"none",backgroundColor:"green"==(0,m.ZJm)(b)?"#343434"==E?(0,m.ZJm)(b):E:(0,m.ZJm)(b),alignItems:"center",borderRadius:(0,m.CF_)(b)+"px",width:"fit-content",padding:(0,m.Spx)(b)?"3px 6px":"0px"},children:(0,m.Spx)(b)?(0,w.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,m.mso)(b),"important"),t.style.setProperty("font-size",N,"important"),t.style.setProperty("font-family",Y,"important"))},children:"".concat(X,"% Off")}):(0,w.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,m.aUT)(b),"important"),t.style.setProperty("font-size",N,"important"),t.style.setProperty("font-family",(0,m.V3Y)(b),"important"))},children:(0,m.sG7)(b)})})]})]})},j=o(7381);const R=(0,l.Z)({key:"whatmore-css-hv"});function b(t){const[e,o,n]=(0,c.Z)(),s=(0,h.MO)("whatmoreShopId"),a=t.events,l=t.onClick,{whatmoreWidgetSourceDetails:d}=(0,r.useContext)(i.I),p=Math.ceil(n),u=2*p,[x,g]=(0,r.useState)(u),[C,M]=(0,r.useState)(2*p),S=0===(0,m.WGf)(s)?24:(0,m.WGf)(s),[P,j]=(0,r.useState)({touchX:0,touchY:0}),R=()=>(0,w.jsx)("div",{style:{width:"50px",borderRadius:"50%",height:"50px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,w.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-right-portrait"})}),b=()=>(0,w.jsx)("div",{style:{width:"50px",borderRadius:"50%",height:"50px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,w.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-left-portrait"})}),T=t=>{if("next"===t){const t=2;M((t=>Math.min(t+Math.floor(n),a.length+p+1))),g((e=>Math.min(e+t,a.length+p+1)))}else M((t=>Math.max(t-Math.floor(n),u)));(0,y.y4)({userInteractionType:v.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:d})};return(0,w.jsxs)("div",{className:"whatmore-events-carousel-portrait",style:{display:"flex",justifyContent:"flex-start",paddingLeft:"12px",overflow:"hidden",position:"relative"},onTouchStart:t=>{j({touchX:t.touches[0].clientX,touchY:t.touches[0].clientY})},onTouchEnd:t=>{var e,o,r,n;const i=(null===(e=t.changedTouches)||void 0===e||null===(o=e[0])||void 0===o?void 0:o.clientX)-P.touchX,s=(null===(r=t.changedTouches)||void 0===r||null===(n=r[0])||void 0===n?void 0:n.clientY)-P.touchY;Math.sqrt(i**2+s**2)>10&&Math.abs(i)>Math.abs(s)&&T(i>0?"prev":"next")},children:[(0,m.Yxs)(s)&&(0,w.jsxs)(w.Fragment,{children:[C<=a.length+p&&(0,w.jsx)("div",{onClick:()=>T("next"),style:{position:"absolute",zIndex:1,top:"50%",right:"0",transform:"translateY(-100%)"},children:(0,w.jsx)(R,{})}),C>2*p&&(0,w.jsx)("div",{onClick:()=>T("prev"),style:{position:"absolute",left:"0",zIndex:1,top:"50%",transform:"translateY(-100%)"},children:(0,w.jsx)(b,{})})]}),(0,w.jsx)("div",{style:{display:"flex",gap:S,transform:"translateX(-".concat((C-u)*(o+S),"px)"),transition:"transform 0.4s ease-in-out"},children:a.map(((t,e)=>e<x?(0,w.jsx)("div",{children:(0,w.jsx)(D,{isOnFocus:e<=C-p-1&&e>=Math.max(0,C-u),playOnUnfocus:!1,animateOnFocus:!0,event:t,onClick:()=>l(t)})},"whatmore-carousel-tile-".concat(e)):(0,w.jsx)(f.Z,{})))})]})}function T(t){const[e,o,n,s]=(0,c.Z)(),[a,l]=(0,r.useState)(-1),d=(0,h.MO)("whatmoreShopId"),[p,x]=(0,r.useState)("next"),f=t.onClick,g=t.events,{whatmoreWidgetSourceDetails:C}=(0,r.useContext)(i.I),M=Math.min(Math.ceil(n),g.length),[S,P]=(0,r.useState)(0),j=0===(0,m.WGf)(d)?24:(0,m.WGf)(d),R=()=>(0,w.jsx)("div",{children:(0,w.jsx)("button",{onClick:B,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,w.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-right"})})}),b=()=>(0,w.jsx)("div",{children:(0,w.jsx)("button",{onClick:O,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,w.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-left"})})});(0,r.useEffect)((()=>{S<=M&&P((t=>t+M))}),[M]);const T=()=>{l(-1)},O=()=>{S!==M&&(x("prev"),P((t=>Math.max(Math.ceil(t-n),M))),(0,y.y4)({userInteractionType:v.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:C}))},B=()=>{S>g.length+n||(x("next"),P((t=>Math.floor(t+n))),(0,y.y4)({userInteractionType:v.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:C}))},N=S>g.length?g.length-M+1:S-M,I=S>=g.length?g.length:N+M,U=g.slice(N,I);return(0,w.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>=n-1&&(0,w.jsx)("div",{style:{position:"absolute",left:"0",zIndex:1,top:"50%",transform:"translateX(50%) translateY(-65%)"},children:S!==M&&(0,w.jsx)(b,{})}),(0,w.jsx)("div",{style:{display:"flex",gap:j+"px",width:"".concat(o*n*(0,m.Su5)(d),"px"),paddingLeft:"8px",justifyContent:g.length<=n-1?"center":"flex-start",overflow:"hidden"},children:U.map(((t,e)=>{const o="whatmore-event-tile-landscape-".concat(t.index).concat(e===M-1?"-last":""),r=e===a;return(0,w.jsx)("div",{className:"whatmore-event-tile-horizontal-swipe-animation-".concat("next"===p?"next":"prev"),onMouseEnter:()=>(t=>{const e=u()((()=>l(t)),300);return e(),e.cancel})(e),onMouseLeave:T,children:(0,w.jsx)(D,{isOnFocus:r,playOnUnfocus:!0,animateOnFocus:!0,event:t,onClick:()=>(t=>{f(t)})(t)})},o)}))}),g.length>=n-1&&(0,w.jsx)("div",{style:{position:"absolute",zIndex:1,top:"50%",right:s+"px",transform:"translateY(-65%)"},children:S<=g.length&&(0,w.jsx)(R,{})})]})}var O=function(t){const[e,o,l]=(0,d.Z)(),[c]=(0,h.j1)("whatmoreShopId"),[p]=(0,h.j1)("whatmorePrimaryColor"),[u]=(0,h.j1)("whatmoreSecondaryColor"),[f]=(0,h.j1)("whatmoreTitleFont"),y="portrait"==e?(0,h.MO)("whatmoreTitleFontSizePortrait"):(0,h.MO)("whatmoreTitleFontSize"),{whatmoreRootId:v}=(0,r.useContext)(i.I),g=((0,h.MO)("isInDesignMode"),(0,h.MO)("whatmoreCollectionHeading")),{whatmoreIsCollectionsTemplate:C}=(0,r.useContext)(i.I),M=t.events,S=t.onClick,P=f;function D(t){S(t)}return(0,r.useEffect)((()=>{(0,j.Oo)("Video shopping powered by Whatmore!")}),[]),(0,r.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;o&&t&&(t.style.minHeight="0px")}))}),[]),delete s.ZP.styles.global,(0,w.jsx)(a.C,{value:R,children:(0,w.jsx)("div",{children:(0,w.jsx)(n.x,{theme:s.ZP,cssVarsRoot:v,resetCSS:!1,children:(0,w.jsxs)(x.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[t.heading.trim().length>0||C?(0,w.jsx)("div",{className:"whatmore-events-carousel",style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:(0,w.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",P,"important"),t.style.setProperty("font-size",y+"px","important"))},style:{color:p,backgroundClip:"text",textAlign:"center",fontWeight:(0,m.wOV)(c),lineHeight:(0,m.vY4)(c),letterSpacing:(0,m.X2K)(c)},children:C?"W"!==g?g:"":t.heading})}):(0,w.jsx)(w.Fragment,{}),"landscape"===e?(0,w.jsx)(T,{events:M,onClick:D}):(0,w.jsx)(b,{events:M,onClick:D})]})})})})}},7129:function(t,e,o){"use strict";o.d(e,{V:function(){return r}});const r=(0,o(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},1855:function(t,e,o){"use strict";var r=o(7313),n=o(9821),i=o(7129),s=o(6417);e.Z=function(t){var[e,o]=(0,n.Z)();return(0,r.useContext)(i.V),t.event,(0,s.jsx)("div",{style:{margin:"0 auto",width:o,height:e,overflow:"hidden"}})}},6040:function(t,e,o){const r=o(500);t.exports=function(t){if("string"!==typeof t)return;const e=t.toUpperCase();return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0},t.exports.currencySymbolMap=r},500:function(t){t.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(){},1811:function(){},7850:function(){},8507:function(t,e){"use strict";function o(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var r in o)t[r]=o[r]}return t}var r=function t(e,r){function n(t,n,i){if("undefined"!==typeof document){"number"===typeof(i=o({},r,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in i)i[a]&&(s+="; "+a,!0!==i[a]&&(s+="="+i[a].split(";")[0]));return document.cookie=t+"="+e.write(n,t)+s}}return Object.create({set:n,get:function(t){if("undefined"!==typeof document&&(!arguments.length||t)){for(var o=document.cookie?document.cookie.split("; "):[],r={},n=0;n<o.length;n++){var i=o[n].split("="),s=i.slice(1).join("=");try{var a=decodeURIComponent(i[0]);if(r[a]=e.read(s,a),t===a)break}catch(l){}}return t?r[t]:r}},remove:function(t,e){n(t,"",o({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,o({},this.attributes,e))},withConverter:function(e){return t(o({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});e.Z=r}}]);
|