whatmore-react-assets 1.0.1690 → 1.0.1692
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[262,485,939],{22:function(t,e,o){o.d(e,{$S:function(){return s},_:function(){return i},b4:function(){return r},dl:function(){return n},nN:function(){return d},tn:function(){return a},vF:function(){return l}});const i="device_type",n="device_mode",r="mobile",l="tablet",s="desktop",a="portrait",d="landscape"},932:function(t,e,o){var i=o(5830),n=o(1941),r=o(22),l=o(1348);e.A=function(t){const[e,o,s]=(0,n.A)(),[a]=(0,i.QN)("whatmoreLandscapePadding"),[d]=(0,i.QN)("whatmoreShopId"),[c]=(0,i.QN)("whatmoreVideoTileSize"),[p]=(0,i.QN)("whatmoreVideoTileSizePortrait"),u=s>o,h="portrait"==e?p:c,m=!("portrait"!=e||!(s>=481)),f=h/100*1.3*.5,y=h/100;var v=Math.min(s,o),[x,g,w,b]=[.6*v*(16/9),.6*v,1.4,0];function j(t){return Math.round(10*t)/10}var S={DEVICE_TYPE:r.b4,DEVICE_MODE:r.tn};if(u){const t=g*f,e=x*f;[x,g,w,b]=[e,t,(s-2*a-2*(0,l.$du)(d))/(1.1*t),a],S[r._]=r.$S,S[r.dl]=r.nN}else if(m){var C=.8*g,P=.8*x;"portrait"==e?(C*=y,P*=y,[x,g,w,b]=[P,C,j(s/(1.2*C)),0],S[r._]=r.vF,S[r.dl]=r.tn):([x,g,w,b]=[P,C,(s-2*a)/(1.1*C),a],S[r._]=r.vF,S[r.dl]=r.nN)}else{C=g,P=x;"portrait"==e?(C=C*y*.9,P=P*y*.9,[x,g,w,b]=[P,C,j(s/(1.15*C)),0],S[r._]=r.b4,S[r.dl]=r.tn):(C=.7*g,P=.7*x,[x,g,w,b]=[P,C,(s-2*a)/(1.1*C),a],S[r._]=r.b4,S[r.dl]=r.nN)}return[x,g,w,b,S]}},2835:function(t,e,o){var i=o(7891),n=o(8454),r=o(3781),l=o(5830),s=o(4414);e.A=function(t){var e;const o=(0,l.Xd)("whatmoreUITheme"),[a]=(0,l.QN)("whatmoreSecondaryColor"),[d,c]=(0,l.QN)("productRatings"),p=(0,l.Xd)("whatmorePrimaryFont"),u=t.productId,h=t.fontSize,m=null!==(e=t.fontColor)&&void 0!==e?e:"gray";if(null===d||"undefined"==typeof d||!(u in d)||d[u].avgRating>5)return(0,s.jsx)(s.Fragment,{});const f=d[u].avgRating,y=d[u].totalRatings;return(0,s.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,s.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,s.jsx)(i.A,{sx:{color:a,fontSize:h+"px"}},"star-icon"+e)),f-Math.floor(f)>.2?(0,s.jsx)(n.A,{sx:{color:a,fontSize:h+"px"}},"star-half-icon"):f-Math.floor(f)==0?(0,s.jsx)(s.Fragment,{}):(0,s.jsx)(r.A,{sx:{color:a,fontSize:h+"px"}},"star-outline-icon"),[...Array(Math.floor(5-f))].map((t,e)=>(0,s.jsx)(r.A,{sx:{color:a,fontSize:h+"px"}},"star-outline-icon-"+e)),(0,s.jsx)("div",{children:(0,s.jsx)("div",{width:"2px"})}),(0,s.jsx)("div",{children:(0,s.jsx)("div",{style:{backgroundColor:a,borderRadius:"round"==o?"2px":"0px",padding:"1px",overflow:"hidden"},children:(0,s.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color","white","important"),t.style.setProperty("font-size",.8*h+"px","important"),t.style.setProperty("font-family",p,"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,s.jsx)("div",{children:(0,s.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color",m,"important"),t.style.setProperty("font-size",.8*h+"px","important"),t.style.setProperty("font-family",p,"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","("+y+")"]})})]})})}},3262:function(t,e,o){o.r(e),o.d(e,{initiateCartSliderEvent:function(){return r}});var i=o(5830),n=o(1745);const r=async function(t,e,o,r,l="",s="",a="",d="",c="",p=""){(0,i.Xd)("whatmoreLandingLocationType");if("STRNV8MHJTF"==t||"STR6HU283UZ"==t||"STR9T3LLEJB"==t||"STRWJMIOJNX"==t||"STRUDQ36YAC"==t||"STR1D5ONOZX"==t){console.log("Executing cart refresh script..");return void(document.getElementById("whatsmorecart").value=Math.random())}if("56444977250"===t){const t=document.querySelector('button[data-pf-type="ProductATC2"]');return t?(s&&t.setAttribute("data-product-id",s),t.click(),setTimeout(()=>{(0,n.js)().then(t=>t.json()).then(t=>{const e=t.items.find(t=>String(t.id)===String(l));if(e){const t=e.key,o=e.quantity,i=e.properties;(0,n.CP)(t,o,i,a,d,c,!0,!0,!0)}})},500),void setTimeout(e,o)):(fetch(null===p||void 0===p||null===(u=p.split("?"))||void 0===u?void 0:u[0]).then(t=>t.text()).then(t=>{const e=(new DOMParser).parseFromString(t,"text/html").querySelector('button[data-pf-type="ProductATC2"]');e&&s&&e.setAttribute("data-product-id",s)}),void setTimeout(e,o));var u}const h=e=>{if("61126934766"==t){let t=e.querySelector(".productView-buttons").querySelector('form[action*="/cart/add"]');if(t)return t}let o=Array.from(e.querySelectorAll("product-form")).find(t=>t.querySelector('form > input[name="id"]')&&t.querySelector('form button[type="submit"]'));return o||(o=Array.from(e.querySelectorAll('form[action*="/cart/add"]')).find(t=>t.querySelector('button[type="submit"]'))),o},m=(t,e,o)=>{const i=t.cloneNode(!0);if(i){i.hasAttribute("data-product-variant-id")&&i.setAttribute("data-product-variant-id",e),i.hasAttribute("data-product-id")&&i.setAttribute("data-product-id",o);let t=i.querySelector('input[name="id"]');if(t)t.setAttribute("value",e),t.hasAttribute("disabled")&&t.removeAttribute("disabled");else{const t=i.querySelector('select[name="id"]');if(t){const o=t.querySelector('option[selected="selected"]');o&&o.setAttribute("value",e)}}const n=i.querySelector('input[name="product-id"]');n&&n.setAttribute("value",o);const r=document.createElement("div");return r.className="whatmore-atc",r.appendChild(i),document.body.appendChild(r),console.log(r,"formElement"),r}},f=t=>{const e=null===t||void 0===t?void 0:t.querySelector('button[type="submit"]');e&&e.click()},y=t=>{(0,n.js)().then(t=>t.json()).then(e=>{const o=e.items.find(e=>e.id==t),i=o.key,r=o.quantity,l=o.properties;(0,n.CP)(i,r,l,a,d,c,!0,!0,!0)})},v=h(document);if(v||(null===v||void 0===v?void 0:v.length)>0){const t=m(v,l,s);f(t),setTimeout(()=>{y(l)},500),t.remove()}else{var x;fetch(null===p||void 0===p||null===(x=p.split("?"))||void 0===x?void 0:x[0]).then(t=>t.text()).then(t=>{const e=(new DOMParser).parseFromString(t,"text/html"),o=h(e);if(o||(null===o||void 0===o?void 0:o.length)>0){const t=m(o,l,s);f(t),setTimeout(()=>{y(l)},500),t.remove()}})}setTimeout(e,o)}},4063:function(t,e,o){var i=o(9950),n=o(3731),r=o(3247),l=o(5830),s=o(5144),a=o(4414);e.A=function(t){var e,o;const[d,c]=(0,i.useState)(!1),[p,u]=(0,i.useState)(!1),[h]=(0,l.QN)("whatmoreSecondaryColor"),[m]=(0,l.QN)("whatmoreSecondaryColorShade600"),[f]=(0,l.QN)("whatmoreSecondaryColorShade300"),[y]=(0,l.QN)("whatmorePrimaryFont"),v=t.onClick,x=t.icon,g=null!==(e=t.borderRadius)&&void 0!==e?e:"sm",w=null!==(o=t.baseFontSize)&&void 0!==o?o:12;return(0,a.jsxs)(r.az,{display:"flex",alignItems:"center",width:"fit-content",height:"fit-content",boxShadow:"lg",borderRadius:g,backgroundColor:d?f:h,animation:p?s.jd:null,padding:"6px 12px",cursor:"pointer",gap:"6px",onClick:t=>{t.stopPropagation(),u(!0),v()},onMouseEnter:()=>{c(!0)},onMouseLeave:()=>{c(!1)},children:[(0,a.jsx)(n.E,{fontSize:w+"px !important",fontWeight:"normal",sx:{fontFamily:y+" !important",color:"white !important"},children:"VIEW MORE"}),x]})}},4431:function(t,e,o){o.r(e),o.d(e,{default:function(){return $}});var i=o(9950),n=(o(4826),o(340)),r=o(5873),l=o(5089),s=(o(3997),o(4669),o(9733),o(4365),o(7229),o(572)),a=o(8603),d=o(932),c=o(1941),p=o(5491),u=o.n(p),h=o(5830),m=o(7509),f=o(7136),y=o(1348),v=o(5551),x=o(1351),g=o(6157),w=o(9879),b=o(6663),j=o(8538),S=o(6594),C=o(22),P=o(6613),k=o(8149),A=o(7740),M=o(7035),N=o(6305),T=o(4833),I=o(4533),R=o(63),_=o(7973),z=o(4414);var E=function({productList:t,firstAvailableProduct:e,setFirstAvailableProduct:o,tileWidth:i}){const n=.06*i,r=n+"px",[l]=(0,h.QN)("whatmorePrimaryFont");return(0,z.jsxs)("div",{onClick:t=>{t.stopPropagation()},style:{display:"flex",flexDirection:"column",borderTopLeftRadius:"12px",borderTopRightRadius:"12px",backgroundColor:"#fff",height:"fit-content",padding:"14px",boxShadow:"0px 0px 6px 0px rgba(0, 0, 0, 0.7)"},children:[(0,z.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-size",r,"important"),t.style.setProperty("font-weight","600","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"))},children:"Select Product"}),(0,z.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"4px",paddingTop:"8px",maxHeight:.9*i,overflowY:"auto",paddingBottom:"12px"},children:t.map((t,i)=>(0,z.jsxs)("div",{onClick:e=>{e.stopPropagation(),(t=>{o(t)})(t)},style:{WebkitTapHighlightColor:"transparent",cursor:"pointer",padding:"8px",display:"flex",alignItems:"center",gap:"8px",borderRadius:"6px",backgroundColor:(null===e||void 0===e?void 0:e.client_product_id)==(null===t||void 0===t?void 0:t.client_product_id)?"#f0f0f0":"white",border:(null===e||void 0===e?void 0:e.client_product_id)==(null===t||void 0===t?void 0:t.client_product_id)?"1px solid #343434":"none"},children:[(0,z.jsx)("img",{src:(0,_.b)(null===t||void 0===t?void 0:t.thumbnail_image),alt:null===t||void 0===t?void 0:t.title,style:{width:2*n,height:2*n}}),(0,z.jsx)("p",{style:{fontSize:.8*n+"px",fontFamily:l,textTransform:"uppercase",backgroundColor:"inherit"},children:null===t||void 0===t?void 0:t.title})]},i))})]})};var F=function(t){var e,o,n,r,l,s,a,c,p,u,f,_,F,O,L,D,W,X;const[$,B,q,Q,U]=(0,d.A)(),H=(0,h.Xd)("whatmoreShopId"),Y=(0,h.Xd)("whatmoreLandingLocationType"),V="portrait"===U[C.dl],J=V?1.076*B*(0,y.HWj)(H):B*(0,y.N_4)(H),G=J+"px",K=(V?1.076*B*(0,y.HWj)(H):B*(0,y.N_4)(H))+"px",Z=(V?.965*B*(0,y.HWj)(H):.859*B*(0,y.N_4)(H))+"px",[tt,et]=(0,i.useState)(t.event),[ot,it]=(0,i.useState)(!1),nt=(0,h.Xd)("whatmoreSecondaryColor");var rt=(0,i.useContext)(m.h);const lt=null===(e=t.isOnFocus)||void 0===e||e,st=null!==(o=t.playOnUnfocus)&&void 0!==o&&o,at=t.onClick,dt=(0,h.Xd)("whatmoreUITheme"),ct=(0,h.Xd)("websiteLanguage"),pt=null!==(n=t.animateOnFocus&&(0,y.n5O)(H))&&void 0!==n&&n,[ut,ht]=(0,i.useState)(!1),mt=(0,h.Xd)("whatmorePrimaryFont"),[ft,yt]=(0,i.useState)(null!==(r=null===(l=tt.products)||void 0===l?void 0:l.find(t=>"active"==t.product_status))&&void 0!==r?r:null===(s=tt.products)||void 0===s?void 0:s[0]),vt=ft&&Object.keys(ft).length>0,xt=Math.round(+(null===ft||void 0===ft?void 0:ft.price)),gt=Math.round(+(null===ft||void 0===ft?void 0:ft.compare_price)),wt=gt&&0!=gt&>>xt?Math.round((gt-xt)/gt*100):NaN,[bt,jt]=(0,i.useState)(wt),[St,Ct]=(0,i.useState)(),{whatmoreIsPreviewMode:Pt,whatmoreWidgetSourceDetails:kt,whatmoreUserInfo:At}=(0,i.useContext)(v.B),[Mt,Nt]=(0,i.useState)(!1),[Tt,It,Rt,_t,zt,Et]=(0,N.A)(0,ft,tt),Ft=vt&&(0,y.mRH)(H),Ot=vt&&(0,y.VhI)(H),Lt=(0,y.WRx)(H)||nt,Dt=(0,y.jsS)(H)||"white",[Wt,Xt]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(vt&&(0,y.w4b)(H)&&(0,S.fu)(tt,(0,y.NCy)(H),H).then(t=>{var e,o,i;et(t),(null===t||void 0===t||null===(e=t.products)||void 0===e||null===(o=e[0])||void 0===o?void 0:o.discount)&&jt(null===t||void 0===t||null===(i=t.products[0])||void 0===i?void 0:i.discount),ht(!0)}),vt){(async()=>{let t=ft;for(let i=0;i<(null===tt||void 0===tt||null===(e=tt.products)||void 0===e?void 0:e.length);i++){var e;const o=await(0,k.M)(null===tt||void 0===tt?void 0:tt.products[i],(0,y.NCy)(H),H);if(null!==o&&void 0!==o&&o.available){yt(null===tt||void 0===tt?void 0:tt.products[i]),t=null===tt||void 0===tt?void 0:tt.products[i];break}}const o=await(0,k.M)(t,(0,y.NCy)(H),H);Ct(o),ht(!0)})()}},[vt]),(0,i.useEffect)(()=>{if(vt){(async()=>{const t=await(0,k.M)(ft,(0,y.NCy)(H),H);Ct(t),ht(!0)})()}},[ft]);const $t=async t=>{if(t.stopPropagation(),!vt)return;it(!0);const e=kt.landingLocationType,o=kt.templateType,i=(0,T.Wd)(e)+(0,T.gf)(o)+(null!==tt&&void 0!==tt&&tt.isRelatedEvent?"R":"E")+"_"+(null===tt||void 0===tt?void 0:tt.event_id);(0,I.Ch)(tt.event_id,tt.products,"homepage","carousel",i,null===tt||void 0===tt?void 0:tt.location,null===At||void 0===At?void 0:At.userType),"init"==Tt.state?(zt(i,!0),(0,x.kz)({userInteractionType:g.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:kt,event:tt,productList:[ft],ctaList:tt.cta})):"awaitingVariantSelection"==Tt.state&&Et(null,i),setTimeout(()=>{it(!1),Xt(!1)},3e3)},Bt=V?"36px":"44px";return(0,z.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top",rt.tileTopMargin+"px"),t.style.setProperty("margin-bottom",rt.tileBottomMMargin+"px"))},className:pt&&!V?lt?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",style:{margin:"0 auto",cursor:"pointer",width:B},onClick:()=>{at(tt)},onMouseEnter:()=>Nt(!0),onMouseLeave:()=>Nt(!1),children:[(0,z.jsxs)("div",{style:{borderRadius:"round"==dt?"5%":"0px",boxShadow:"round"==dt?"0px 0px 5px 0px #B0B0B0":null,height:$,borderWidth:(0,y.YcK)(H),borderColor:(0,y.Fwt)(H),overflow:"hidden",position:"relative"},children:[(0,z.jsx)(w.A,{height:(0,y.u06)(H)+" !important",width:"100%",url:tt.thumbnail_image,isPlaying:lt||st||(0,P.At)(),event:tt}),Ot&&vt&&(Mt||V)&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("div",{style:{position:"absolute",bottom:Bt,left:0,right:0,display:Wt?"block":"none"},children:(0,z.jsx)(E,{productList:tt.products,firstAvailableProduct:ft,setFirstAvailableProduct:yt,tileWidth:B})}),(0,z.jsxs)("div",{style:{position:"absolute",bottom:0,left:0,right:0,background:Lt||"rgba(0, 0, 0, 0.75)",height:Bt,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease",cursor:"pointer",transform:Mt||V?"translateY(0)":"translateY(100%)",opacity:Mt||V?1:0,WebkitTapHighlightColor:"transparent",WebkitTouchCallout:"none"},onClick:$t,children:[(0,z.jsx)("div",{style:{flex:1,textAlign:"center",color:Dt,fontSize:"12px",fontFamily:mt,fontWeight:"500",letterSpacing:"0.5px"},children:ot?(0,z.jsx)(R.y,{size:"sm",color:"white"}):"ADD TO CART"}),(0,z.jsx)("span",{style:{height:"100%",borderRight:`1px solid ${Dt}`,opacity:.5}}),(0,z.jsx)("div",{onClick:t=>{t.stopPropagation(),Xt(!Wt)},style:{padding:"0 5%",display:"flex",alignItems:"center",justifyContent:"center",color:Dt,transform:Wt?"rotate(180deg)":"rotate(0deg)",transition:"all 0.25s ease"},children:(0,z.jsx)(b.A,{sx:{fontSize:2*J}})})]})]})]}),(0,z.jsxs)("div",{className:"wht-prod-info",style:{display:(0,y.AmR)(H)?"flex":"none",flexDirection:"column",padding:"12px 4px",gap:"5px",alignItems:"flex-start",minHeight:Ft?"110px":"auto",justifyContent:Ft?"space-between":"flex-start"},children:[vt&&(0,z.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y.m5c)(H),"important"),t.style.setProperty("font-size","45034766485"==H&&"product"==Y?"9px":G),t.style.setProperty("line-height","120%"),t.style.setProperty("font-family",mt,"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,j.v)(null===ft||void 0===ft?void 0:ft.title)}),vt&&ut&&(0,y.Nzx)(H)&&(0,z.jsxs)("div",{style:{display:"flex",gap:"12px",flexDirection:(0,y.vw2)(H)?"row":"row-reverse",justifyContent:(0,y.vw2)(H)?"flex-start":"flex-end",alignItems:"center"},children:[(0,z.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y.m5c)(H),"important"),t.style.setProperty("font-size","45034766485"==H&&"product"==Y?"8px":K),t.style.setProperty("font-family",mt,"important"),t.style.setProperty("overflow","hidden","important"))},style:{textAlign:"left",fontWeight:"normal"==(0,y.i6j)(H)?"normal":"bold"},children:(0,S.Sb)(parseFloat((0,A.U)()?(null!==(a=null===St||void 0===St||null===(c=St.variants)||void 0===c||null===(p=c[0])||void 0===p?void 0:p.price)&&void 0!==a?a:null===St||void 0===St?void 0:St.price)/100:(null===ft||void 0===ft?void 0:ft.price)>0?null===ft||void 0===ft?void 0:ft.price:null===ft||void 0===ft?void 0:ft.price_max)," ",H,null===(u=tt.products[0])||void 0===u?void 0:u.currency)}),!isNaN(gt)&>>xt&&(0,z.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y.gld)(H),"important"),t.style.setProperty("font-size",K),t.style.setProperty("font-family",mt,"important"),t.style.setProperty("overflow","hidden","important"))},style:{textDecoration:"line-through"},children:(0,S.Sb)(parseFloat((0,A.U)()?(null!==(f=null===St||void 0===St||null===(_=St.variants)||void 0===_||null===(F=_[0])||void 0===F?void 0:F.compare_at_price)&&void 0!==f?f:null===St||void 0===St?void 0:St.compare_at_price)/100:null===ft||void 0===ft?void 0:ft.compare_price)," ",H,null===(O=tt.products[0])||void 0===O?void 0:O.currency)}),(0,y.Nzx)(H)&&!isNaN(bt)&&0!=bt&&ut&&Ft&&(0,z.jsx)("div",{style:{display:(0,y.QNr)(H)?"flex":"none",backgroundColor:"green"===(0,y.ub$)(H)?"#343434"===nt?(0,y.ub$)(H):nt:(0,y.ub$)(H),alignItems:"center",borderRadius:(0,y.v8m)(H)+"px",width:"fit-content",padding:(0,y.Cf)(H)?"3px 6px":"0px"},children:(0,y.Cf)(H)?(0,z.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y.BRY)(H),"important"),t.style.setProperty("font-size",Z,"important"),t.style.setProperty("font-family",mt,"important"),t.style.setProperty("font-weight","normal","important"))},children:`${bt}% ${null!==(L=null===M.m||void 0===M.m||null===(D=M.m[ct])||void 0===D?void 0:D.off)&&void 0!==L?L:"off"}`}):(0,z.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y._zx)(H),"important"),t.style.setProperty("font-size",Z,"important"),t.style.setProperty("font-family",(0,y.ogW)(H),"important"))},children:(0,y.rsz)(H)})})]}),vt&&(0,y.Nzx)(H)&&!isNaN(bt)&&0!=bt&&ut&&!Ft&&(0,z.jsx)("div",{style:{display:(0,y.QNr)(H)?"flex":"none",backgroundColor:"green"===(0,y.ub$)(H)?"#343434"===nt?(0,y.ub$)(H):nt:(0,y.ub$)(H),alignItems:"center",borderRadius:(0,y.v8m)(H)+"px",width:"fit-content",padding:(0,y.Cf)(H)?"3px 6px":"0px"},children:(0,y.Cf)(H)?(0,z.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y.BRY)(H),"important"),t.style.setProperty("font-size",Z,"important"),t.style.setProperty("font-family",mt,"important"),t.style.setProperty("font-weight","normal","important"))},children:`${bt}% ${null!==(W=null===M.m||void 0===M.m||null===(X=M.m[ct])||void 0===X?void 0:X.off)&&void 0!==W?W:"off"}`}):(0,z.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y._zx)(H),"important"),t.style.setProperty("font-size",Z,"important"),t.style.setProperty("font-family",(0,y.ogW)(H),"important"))},children:(0,y.rsz)(H)})}),Ft&&(0,z.jsx)("button",{style:{backgroundColor:nt,display:"flex",justifyContent:"center",color:"white",borderRadius:"4px",padding:"8px 16px",fontSize:G,fontFamily:mt,fontWeight:"500",cursor:"pointer",textAlign:"center",letterSpacing:"0.5px",transition:"opacity 0.2s ease",width:V?"90%":"70%",marginTop:"auto",alignSelf:"flex-start"},onClick:$t,onMouseEnter:t=>{t.target.style.opacity="0.8"},onMouseLeave:t=>{t.target.style.opacity="1"},children:ot?(0,z.jsx)(R.y,{size:"sm",display:"flex !important",color:"white"}):"ADD TO CART"})]})]})},O=o(6641),L=o(4063);const D=(0,a.A)({key:"whatmore-css-hv"});function W(t){const[e,o,n]=(0,d.A)(),r=(0,h.Xd)("whatmoreShopId"),l=(0,h.Xd)("whatmoreLandingLocationType"),s=t.events,a=t.onClick,{whatmoreWidgetSourceDetails:c}=(0,i.useContext)(v.B),p=Math.ceil(n),u=2*p,[m,w]=(0,i.useState)(u),[b,j]=(0,i.useState)(2*p),S=0===(0,y.If9)(r)?24:(0,y.If9)(r),[C,P]=(0,i.useState)({touchX:0,touchY:0}),k=()=>(0,z.jsx)("div",{className:"navigation-button-next-container",style:{width:"50px",borderRadius:"50%",height:"50px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,z.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-right-portrait"})}),A=()=>(0,z.jsx)("div",{className:"navigation-button-prev-container",style:{width:"50px",borderRadius:"50%",height:"50px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,z.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-left-portrait"})}),M=t=>{if("next"===t){const t=2;j(t=>Math.min(t+Math.floor(n),s.length+p+1)),w(e=>Math.min(e+t,s.length+p+1))}else j(t=>Math.max(t-Math.floor(n),u));(0,x.UM)({userInteractionType:g.O.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:c})};return(0,z.jsxs)("div",{className:"whatmore-events-carousel-portrait",style:{display:"flex",justifyContent:"45034766485"==r&&"product"==l?"center":"flex-start",paddingLeft:"12px",overflow:"hidden",position:"relative"},onTouchStart:t=>{P({touchX:t.touches[0].clientX,touchY:t.touches[0].clientY})},onTouchEnd:t=>{var e,o,i,n;const r=(null===(e=t.changedTouches)||void 0===e||null===(o=e[0])||void 0===o?void 0:o.clientX)-C.touchX,l=(null===(i=t.changedTouches)||void 0===i||null===(n=i[0])||void 0===n?void 0:n.clientY)-C.touchY;Math.sqrt(r**2+l**2)>10&&Math.abs(r)>Math.abs(l)&&M(r>0?"prev":"next")},children:[(0,y.JSQ)(r)&&(0,z.jsxs)(z.Fragment,{children:[b<=s.length+p&&(0,z.jsx)("div",{onClick:()=>M("next"),style:{position:"absolute",zIndex:1,top:"50%",right:"0",transform:"translateY(-100%)"},children:(0,z.jsx)(k,{})}),b>2*p&&(0,z.jsx)("div",{onClick:()=>M("prev"),style:{position:"absolute",left:"0",zIndex:1,top:"50%",transform:"translateY(-100%)"},children:(0,z.jsx)(A,{})})]}),(0,z.jsx)("div",{style:{display:"flex",gap:S,transform:`translateX(-${(b-u)*(o+S)}px)`,transition:"transform 0.4s ease-in-out"},children:s.map((t,e)=>e<m?(0,z.jsx)("div",{children:(0,z.jsx)(F,{isOnFocus:e<=b-p-1&&e>=Math.max(0,b-u),playOnUnfocus:!1,animateOnFocus:!0,event:t,onClick:()=>a(t)})},`whatmore-carousel-tile-${e}`):(0,z.jsx)(f.A,{}))})]})}function X(t){const[e,o,n,r]=(0,d.A)(),[l,s]=(0,i.useState)(-1),a=(0,h.Xd)("whatmoreShopId"),[c,p]=(0,i.useState)("next"),m=t.onClick,f=t.events,{whatmoreWidgetSourceDetails:w}=(0,i.useContext)(v.B),b=Math.min(Math.ceil(n),f.length),[j,S]=(0,i.useState)(0),C=0===(0,y.If9)(a)?24:(0,y.If9)(a),P=()=>(0,z.jsx)("div",{children:(0,z.jsx)("button",{onClick:N,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,z.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-right"})})}),k=()=>(0,z.jsx)("div",{children:(0,z.jsx)("button",{onClick:M,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,z.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-left"})})});(0,i.useEffect)(()=>{j<=b&&S(t=>t+b)},[b]);const A=()=>{s(-1)},M=()=>{j!==b&&(p("prev"),S(t=>Math.max(Math.ceil(t-n),b)),(0,x.UM)({userInteractionType:g.O.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:w}))},N=()=>{j>f.length+n||(p("next"),S(t=>Math.floor(t+n)),(0,x.UM)({userInteractionType:g.O.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:w}))},T=j>f.length?f.length-b+1:j-b,I=j>=f.length?f.length:T+b,R=f.slice(T,I);return(0,z.jsxs)("div",{className:"whatmore-events-carousel-landscape",style:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:`${r}px`,paddingRight:`${r}px`},children:[j!==b&&(0,z.jsx)("div",{className:"wht-vst-button-prev",style:{position:"absolute",left:r+"px",zIndex:1,top:"50%",transform:"translateY(-65%)"},children:(0,z.jsx)(k,{})}),(0,z.jsx)("div",{className:"wht-hide-scrollbar",style:{display:"flex",gap:C+"px",width:o*n*(0,y.fHt)(a)+"px",justifyContent:f.length>b?"flex-start":"center",overflow:"auto"},children:R.map((t,e)=>{const o=`whatmore-event-tile-landscape-${t.index}${e===b-1?"-last":""}`,i=e===l;return(0,z.jsx)("div",{className:"whatmore-event-tile-horizontal-swipe-animation-"+("next"===c?"next":"prev"),onMouseEnter:()=>(t=>{const e=u()(()=>s(t),300);return e(),e.cancel})(e),onMouseLeave:A,children:(0,z.jsx)(F,{isOnFocus:i,playOnUnfocus:!(0,y.aO7)(a)||e==parseInt(b/2)&&-1==l,animateOnFocus:!0,event:t,onClick:()=>(t=>{m(t)})(t)})},o)})}),j<f.length&&(0,z.jsx)("div",{className:"wht-vst-button-next",style:{position:"absolute",zIndex:1,top:"50%",right:r+"px",transform:"translateY(-65%)"},children:(0,z.jsx)(P,{})})]})}var $=function(t){const[e,o,a]=(0,c.A)(),[d]=(0,h.QN)("whatmoreShopId"),[p]=(0,h.QN)("whatmorePrimaryColor"),[u]=(0,h.QN)("whatmoreSecondaryColor"),[f]=(0,h.QN)("whatmoreTitleFont"),x="portrait"==e?(0,h.Xd)("whatmoreTitleFontSizePortrait"):(0,h.Xd)("whatmoreTitleFontSize"),{whatmoreRootId:g}=(0,i.useContext)(v.B),{whatmoreCollectionHeading:w}=((0,h.Xd)("isInDesignMode"),(0,i.useContext)(v.B)),{whatmoreIsCollectionsTemplate:b}=(0,i.useContext)(v.B),j=t.events,S=t.onClick,C=f;function P(t){S(t)}return(0,i.useEffect)(()=>{(0,O.Fk)("Video shopping powered by Whatmore!")},[]),(0,i.useEffect)(()=>{r.Sn.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 l.Ay.styles.global,(0,z.jsx)(s.C,{value:D,children:(0,z.jsx)("div",{className:"whatmore-carousel-events",children:(0,z.jsx)(n.s,{theme:l.Ay,cssVarsRoot:g,resetCSS:!1,children:(0,z.jsxs)(m.h.Provider,{value:{tileTopMargin:25,tileBottomMMargin:10,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[t.heading.trim().length>0||b?(0,z.jsx)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"62636458233"==d?"flex-start":"center"},children:(0,z.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",C,"important"),t.style.setProperty("font-size",x+"px"))},style:{color:p,backgroundClip:"text",textAlign:"center",fontWeight:(0,y.Odx)(d),lineHeight:(0,y.L0y)(d),letterSpacing:(0,y.l3V)(d)},children:b?"W"!==w?w:"":t.heading})}):(0,z.jsx)(z.Fragment,{}),"landscape"===e?(0,z.jsx)(X,{events:j,onClick:P}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(W,{events:"45034766485"==d?j.slice(0,5):j,onClick:P}),"45034766485"==d&&(0,z.jsx)("div",{className:"wht-tf-view-cta",style:{display:"flex",justifyContent:"center",margin:"8px 0px"},children:(0,z.jsx)(L.A,{baseFontSize:.5*x,onClick:()=>P(null===j||void 0===j?void 0:j[5])})})]})]})})})})}},4826:function(){},7136:function(t,e,o){var i=o(9950),n=o(932),r=o(7509),l=o(5830),s=o(4414);e.A=function(t){var[e,o]=(0,n.A)();(0,i.useContext)(r.h);const a=(0,l.Xd)("whatmoreShopId");return t.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%":e,overflow:"hidden"}})}},7458:function(t,e,o){o.d(e,{P: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))}},7509:function(t,e,o){o.d(e,{h:function(){return i}});const i=(0,o(9950).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},7973:function(t,e,o){o.d(e,{B:function(){return l},b:function(){return r}});var i=o(1348),n=o(5830);function r(t,e=""){const o=(0,n.Xd)("whatmoreShopId");return"shopify"!=(0,i.NCy)(o)?"STRNV8MHJTF"==o?t+"?format=webp":t:t+e}function l(t){var e;if(null!==t&&void 0!==t&&t.includes("https://w-media.b-cdn.net/process-media"))return"image";const o=null===t||void 0===t||null===(e=t.trim())||void 0===e?void 0:e.split("?")[0],i=/\.(jpeg|jpg|gif|png|svg|webp)$/i,n=/\.(mp4|mov|wmv|avi|flv|mkv)$/i;return null!==i&&void 0!==i&&i.test(o)?"image":null!==n&&void 0!==n&&n.test(o)?"video":void 0}},8538:function(t,e,o){o.d(e,{v:function(){return n}});var i=o(5830);function n(t,e){const o=(0,i.Xd)("whatmoreShopId");return"undefined"==typeof t||"undefined"==t||null==t?"":"6873415750"==o||"72442478904"==o||"58562281529"==o?t:"66168324332"==o&&"prod-tile"!=e?null===t||void 0===t||null===(n=t.split("- "))||void 0===n?void 0:n[0]:t.replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()});var n}},9733:function(){}}]);
|