whatmore-react-assets 1.0.1722 → 1.0.1723

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whatmore-react-assets",
3
- "version": "1.0.1722",
3
+ "version": "1.0.1723",
4
4
  "description": "public repo for all whatmore js and css assets",
5
5
  "main": "whatmore.js",
6
6
  "scripts": {
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[142,262,939],{22:function(t,e,o){o.d(e,{$S:function(){return a},_:function(){return r},b4:function(){return i},dl:function(){return n},nN:function(){return d},tn:function(){return s},vF:function(){return l}});const r="device_type",n="device_mode",i="mobile",l="tablet",a="desktop",s="portrait",d="landscape"},932:function(t,e,o){var r=o(5830),n=o(1941),i=o(22),l=o(1348);e.A=function(t){const[e,o,a]=(0,n.A)(),[s]=(0,r.QN)("whatmoreLandscapePadding"),[d]=(0,r.QN)("whatmoreShopId"),[p]=(0,r.QN)("whatmoreVideoTileSize"),[c]=(0,r.QN)("whatmoreVideoTileSizePortrait"),u=a>o,m="portrait"==e?c:p,y=!("portrait"!=e||!(a>=481)),f=m/100*1.3*.5,v=m/100;var h=Math.min(a,o),[x,g,w,b]=[.6*h*(16/9),.6*h,1.4,0];function S(t){return Math.round(10*t)/10}var P={DEVICE_TYPE:i.b4,DEVICE_MODE:i.tn};if(u){const t=g*f,e=x*f;[x,g,w,b]=[e,t,(a-2*s-2*(0,l.$du)(d))/(1.1*t),s],P[i._]=i.$S,P[i.dl]=i.nN}else if(y){var j=.8*g,T=.8*x;"portrait"==e?(j*=v,T*=v,[x,g,w,b]=[T,j,S(a/(1.2*j)),0],P[i._]=i.vF,P[i.dl]=i.tn):([x,g,w,b]=[T,j,(a-2*s)/(1.1*j),s],P[i._]=i.vF,P[i.dl]=i.nN)}else{j=g,T=x;"portrait"==e?(j=j*v*.9,T=T*v*.9,[x,g,w,b]=[T,j,S(a/(1.15*j)),0],P[i._]=i.b4,P[i.dl]=i.tn):(j=.7*g,T=.7*x,[x,g,w,b]=[T,j,(a-2*s)/(1.1*j),s],P[i._]=i.b4,P[i.dl]=i.nN)}return[x,g,w,b,P]}},1957:function(t,e,o){var r=o(9950),n=o(932),i=(o(4826),o(5830)),l=o(9879),a=o(7509),s=o(22),d=o(1348),p=o(5551),c=o(6594),u=o(8538),m=o(8149),y=o(5727),f=o(7740),v=o(7035),h=o(6305),x=o(4833),g=o(1351),w=o(6157),b=o(4414);e.A=function(t){var e,o,S,P,j,T,C,A,N,k,_,M,E,q,I,R,z,O,F,$,D;const[L,W,X,U,J]=(0,n.A)(),V=.5*W;(0,r.useContext)(a.h);const B=(0,i.Xd)("whatmoreUITheme"),Y=(0,i.Xd)("whatmoreShopId"),H=(0,i.Xd)("whatmorePrimaryFont"),Q=(0,i.Xd)("whatmoreSecondaryColor"),G=(0,i.Xd)("websiteLanguage"),K=t.onClick,Z=null===(e=t.isOnFocus)||void 0===e||e,tt=null!==(o=t.playOnUnfocus)&&void 0!==o&&o,et=null!==(S=t.animateOnFocus&&(0,d.n5O)(Y))&&void 0!==S&&S,ot="portrait"===J[s.dl],rt=(ot?1.076*W*(0,d.HWj)(Y):W*(0,d.N_4)(Y))+"px",nt=(ot?1.076*W*(0,d.HWj)(Y):W*(0,d.N_4)(Y))+"px",it=(ot?.965*W*(0,d.HWj)(Y):.859*W*(0,d.N_4)(Y))+"px",lt=(0,d.VYo)(Y),{whatmoreIsPreviewMode:at,whatmoreWidgetSourceDetails:st}=(0,r.useContext)(p.B),dt=.25*W,pt=dt+"px",ct=1.25*dt+"px",[ut,mt]=(0,r.useState)(t.event),[yt,ft]=(0,r.useState)(),[vt,ht]=(0,r.useState)(!1),xt=null!==(P=null===(j=ut.products)||void 0===j?void 0:j.find(t=>"active"==t.product_status))&&void 0!==P?P:null===(T=ut.products)||void 0===T?void 0:T[0],gt=Math.round(+(null===xt||void 0===xt?void 0:xt.price)),wt=Math.round(+(null===xt||void 0===xt?void 0:xt.compare_price)),bt=wt&&0!=wt&&wt>gt?Math.round((wt-gt)/wt*100):NaN,[St,Pt]=(0,r.useState)(bt),[jt,Tt]=(0,r.useState)(!1),[Ct,At,Nt,kt,_t,Mt]=(0,h.A)(0,xt,ut);return(0,r.useEffect)(()=>{(0,d.w4b)(Y)?(0,c.fu)(ut,(0,d.NCy)(Y),Y).then(t=>{var e,o,r;mt(t);const n=Math.round(null===(e=t.products)||void 0===e||null===(o=e[0])||void 0===o?void 0:o.price),i=Math.round(null===t||void 0===t||null===(r=t.products[0])||void 0===r?void 0:r.compare_price),l=i&&0!=i&&i>n?Math.round((i-n)/i*100):NaN;Pt(l),Tt(!0)}):(async()=>{const t=await(0,m.M)(xt,(0,d.NCy)(Y),Y);ft(t),Tt(!0)})()},[]),(0,b.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top","12px"),t.style.setProperty("margin-bottom","12px"))},className:et&&!ot?Z?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",style:{width:W,margin:"0 auto",cursor:"pointer"},onClick:()=>{K(ut)},onMouseEnter:()=>ht(!0),onMouseLeave:()=>ht(!1),children:["video"===ut.event_type&&"55076552858"===Y&&!ot&&(0,b.jsx)("div",{className:"video-event-tile",style:{position:"fixed",marginTop:1.2*V,marginLeft:V/2},children:(0,b.jsx)(y.A,{sx:{color:(0,d.KFN)(ut.whatmoreShopId)+" !important",opacity:.8,fontSize:V,filter:"drop-shadow(0 0 15px black);"}})}),(0,b.jsxs)("div",{style:{width:W,height:ot&&Z?"STR2FOC6KG9"==Y||"STRDOIDF6O7"==Y?L:1.1*L:L,borderRadius:"round"==B?"5px":"0px",boxShadow:"round"==B?lt:null,borderWidth:(0,d.YcK)(Y),borderColor:(0,d.Fwt)(Y),overflow:"hidden",position:"relative"},children:[(0,b.jsx)(l.A,{height:(0,d.u06)(Y)+" !important",width:"100%",url:ut.thumbnail_image,isPlaying:Z||tt,event:ut}),"70946685152"===Y&&(0,b.jsx)("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2,pointerEvents:"none"},children:(0,b.jsx)("div",{style:{transform:"scale(2.25)"},children:(0,b.jsx)("img",{src:"https://s3.ap-south-1.amazonaws.com/whatmorelive.brand.other.assets/heeras/heeras.png",alt:"overlay"})})}),"9238315068"===Y&&(vt||ot)&&(0,b.jsx)("div",{style:{position:"absolute",bottom:0,left:0,right:0,background:vt||ot?"rgba(0, 0, 0, 0.75)":"rgba(0, 0, 0, 0.6)",padding:"12px",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease",cursor:"pointer",transform:vt||ot?"translateY(0)":"translateY(100%)",opacity:vt||ot?1:0},onClick:t=>{t.stopPropagation();const e=st.landingLocationType,o=st.templateType,r=(0,x.Wd)(e)+(0,x.gf)(o)+(null!==ut&&void 0!==ut&&ut.isRelatedEvent?"R":"E")+"_"+(null===ut||void 0===ut?void 0:ut.event_id);"init"==Ct.state?(_t(r),(0,g.kz)({userInteractionType:w.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:st,event:ut,productList:[xt],ctaList:ut.cta})):"awaitingVariantSelection"==Ct.state&&Mt(null,r)},onMouseEnter:t=>{t.target.style.background="rgba(0, 0, 0, 0.85)"},onMouseLeave:t=>{t.target.style.background="rgba(0, 0, 0, 0.75)"},children:(0,b.jsx)("span",{style:{color:"white",fontSize:rt,fontFamily:H,fontWeight:"500",textAlign:"center",letterSpacing:"0.5px"},children:"ADD TO CART"})})]}),(0,b.jsxs)("div",{style:{cursor:"pointer",display:"flex",gap:"6px",padding:"12px 4px"},children:[(at?(0,d.Tr1)(Y):(0,d.UmS)(Y))&&(null===ut||void 0===ut||null===(C=ut.products)||void 0===C?void 0:C.length)>0&&(0,b.jsx)("div",{style:{maxHeight:ct,maxWidth:pt,minWidth:null!==xt&&void 0!==xt&&xt.thumbnail_image?pt:"0",overflow:"hidden"},children:(0,b.jsx)("img",{ref:t=>{t&&t.style.setProperty("object-fit",(0,d.KZe)(Y),"important")},style:{height:"100%"},src:(null===xt||void 0===xt||null===(A=xt.thumbnail_image)||void 0===A||null===(N=A.split("?"))||void 0===N?void 0:N[0])+"?width=400&height=400",alt:"thumbnail"})}),(0,b.jsxs)("div",{className:"wht-prod-info",style:{display:"flex",flexDirection:"column",gap:"5px"},children:[(0,b.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,d.m5c)(Y),"important"),t.style.setProperty("font-size",rt,"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",H,"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,u.v)(null===xt||void 0===xt?void 0:xt.title)}),jt&&(0,d.Nzx)(Y)&&(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px",flexDirection:(0,d.vw2)(Y)?"row":"row-reverse",justifyContent:(0,d.vw2)(Y)?"flex-start":"flex-end"},children:[(0,b.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,d.m5c)(Y),"important"),t.style.setProperty("font-size",nt,"important"),t.style.setProperty("font-family",H,"important"),t.style.setProperty("white-space","nowrap","important"),t.style.setProperty("width","fit-content","important"))},style:{textAlign:"left",fontWeight:"normal"==(0,d.i6j)(Y)?"normal":"bold"},children:(0,c.Sb)(parseFloat((0,f.U)()?(null!==(k=null===yt||void 0===yt||null===(_=yt.variants)||void 0===_||null===(M=_[0])||void 0===M?void 0:M.price)&&void 0!==k?k:null===yt||void 0===yt?void 0:yt.price)/100:null===xt||void 0===xt?void 0:xt.price)," ",Y,null===(E=ut.products[0])||void 0===E?void 0:E.currency)}),!isNaN(wt)&&wt>gt&&(0,b.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,d.gld)(Y),"important"),t.style.setProperty("font-size",nt,"important"),t.style.setProperty("font-family",H,"important"),t.style.setProperty("width","fit-content","important"),t.style.setProperty("white-space","nowrap","important"))},style:{textDecoration:"line-through"},children:(0,c.Sb)(parseFloat((0,f.U)()?(null!==(q=null===yt||void 0===yt||null===(I=yt.variants)||void 0===I||null===(R=I[0])||void 0===R?void 0:R.compare_at_price)&&void 0!==q?q:null===yt||void 0===yt?void 0:yt.compare_at_price)/100:null===xt||void 0===xt?void 0:xt.compare_price)," ",Y,null===(z=ut.products[0])||void 0===z?void 0:z.currency)}),"56352899156"==Y&&(0,d.Nzx)(Y)&&jt&&!isNaN(St)&&0!=St&&(0,b.jsx)("div",{style:{display:"flex",backgroundColor:"green"==(0,d.ub$)(Y)?"#343434"==Q?(0,d.ub$)(Y):Q:(0,d.ub$)(Y),alignItems:"center",borderRadius:(0,d.v8m)(Y)+"px",width:"fit-content",padding:"3px 4px"},children:(0,b.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,d.BRY)(Y),"important"),t.style.setProperty("font-size",it,"important"),t.style.setProperty("font-family",H,"important"),t.style.setProperty("width","fit-content","important"),t.style.setProperty("white-space","nowrap","important"))},children:`${St}% ${null!==(O=null===v.m||void 0===v.m||null===(F=v.m[G])||void 0===F?void 0:F.off)&&void 0!==O?O:"off"}`})})]}),(0,d.Nzx)(Y)&&jt&&!isNaN(St)&&0!=St&&(0,b.jsx)("div",{style:{display:"flex",backgroundColor:"green"==(0,d.ub$)(Y)?"#343434"==Q?(0,d.ub$)(Y):Q:(0,d.ub$)(Y),alignItems:"center",borderRadius:(0,d.v8m)(Y)+"px",width:"fit-content",padding:(0,d.Cf)(Y)?"3px 6px":"0px"},children:(0,d.Cf)(Y)?(0,b.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,d.BRY)(Y),"important"),t.style.setProperty("font-size",it,"important"),t.style.setProperty("font-family",H,"important"))},children:`${St}% ${null!==($=null===v.m||void 0===v.m||null===(D=v.m[G])||void 0===D?void 0:D.off)&&void 0!==$?$:"off"}`}):(0,b.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,d._zx)(Y),"important"),t.style.setProperty("font-size",it,"important"),t.style.setProperty("font-family",(0,d.ogW)(Y),"important"))},children:(0,d.rsz)(Y)})})]}),""!=(null===ut||void 0===ut?void 0:ut.title)&&(window.location.pathname.includes("/categories/")||window.location.pathname.includes("/products/"))&&(0,b.jsx)("div",{className:"wht-video-title",style:{display:"none",justifyContent:"center",borderRadius:"5px",alignItems:"center",padding:"6px 8px"},children:(0,b.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","#343434"),t.style.setProperty("font-size",rt,"important"),t.style.setProperty("font-family",H,"important"),t.style.setProperty("font-weight","bold","important"),t.style.setProperty("text-align","center","important"))},children:null===ut||void 0===ut?void 0:ut.title})})]})]})}},2835:function(t,e,o){var r=o(7891),n=o(8454),i=o(3781),l=o(5830),a=o(4414);e.A=function(t){var e;const o=(0,l.Xd)("whatmoreUITheme"),[s]=(0,l.QN)("whatmoreSecondaryColor"),[d,p]=(0,l.QN)("productRatings"),c=(0,l.Xd)("whatmorePrimaryFont"),u=t.productId,m=t.fontSize,y=null!==(e=t.fontColor)&&void 0!==e?e:"gray";if(null===d||"undefined"==typeof d||!(u in d)||d[u].avgRating>5)return(0,a.jsx)(a.Fragment,{});const f=d[u].avgRating,v=d[u].totalRatings;return(0,a.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,a.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,a.jsx)(r.A,{sx:{color:s,fontSize:m+"px"}},"star-icon"+e)),f-Math.floor(f)>.2?(0,a.jsx)(n.A,{sx:{color:s,fontSize:m+"px"}},"star-half-icon"):f-Math.floor(f)==0?(0,a.jsx)(a.Fragment,{}):(0,a.jsx)(i.A,{sx:{color:s,fontSize:m+"px"}},"star-outline-icon"),[...Array(Math.floor(5-f))].map((t,e)=>(0,a.jsx)(i.A,{sx:{color:s,fontSize:m+"px"}},"star-outline-icon-"+e)),(0,a.jsx)("div",{children:(0,a.jsx)("div",{width:"2px"})}),(0,a.jsx)("div",{children:(0,a.jsx)("div",{style:{backgroundColor:s,borderRadius:"round"==o?"2px":"0px",padding:"1px",overflow:"hidden"},children:(0,a.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color","white","important"),t.style.setProperty("font-size",.8*m+"px","important"),t.style.setProperty("font-family",c,"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,a.jsx)("div",{children:(0,a.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color",y,"important"),t.style.setProperty("font-size",.8*m+"px","important"),t.style.setProperty("font-family",c,"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","("+v+")"]})})]})})}},3161:function(t,e,o){function r(t){if(!t)return"";return(new DOMParser).parseFromString(t,"text/html").body.textContent||""}o.d(e,{$:function(){return r}})},3262:function(t,e,o){o.d(e,{initiateCartSliderEvent:function(){return i}});var r=o(5830),n=o(1745);const i=async function(t,e,o,i,l="",a="",s="",d="",p="",c=""){(0,r.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("58692075703"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:l,quantity:1})}).then(t=>{if(!t.ok)throw new Error("Add to cart failed");return t.json()}).then(t=>{"function"===typeof window.openGokwikSideCart&&window.openGokwikSideCart(),setTimeout(()=>{v(l)},500)}).catch(t=>console.error("[Whatmore] Lakshita ATC error:",t)),void setTimeout(e,o);if("56444977250"===t){const t=document.querySelector('button[data-pf-type="ProductATC2"]');return t?(a&&t.setAttribute("data-product-id",a),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,r=e.properties;(0,n.CP)(t,o,r,s,d,p,!0,!0,!0)}})},500),void setTimeout(e,o)):(fetch(null===c||void 0===c||null===(u=c.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&&a&&e.setAttribute("data-product-id",a)}),void setTimeout(e,o));var u}if("64379584700"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:l,quantity:1})}).then(t=>t.json()).then(t=>fetch("/cart.js")).then(t=>t.json()).then(t=>{$(".paira-cart-item-count").text(t.item_count),$(".paira-cartEmpty").hide(),$(".paira-cartNotEmpty").show(),$(".paira-cart-total-price .money").text("Rs. "+t.total_price/100),$(".cart-drop").addClass("open"),$(".cart-icon").trigger("mouseenter"),setTimeout(()=>{v(l)},500)}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("76767920441"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:l,quantity:1})}).then(t=>t.json()).then(t=>{"function"===typeof window.openGokwikSideCart&&window.openGokwikSideCart(),setTimeout(()=>{v(l)},500)}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("70840582336"===t){const t=l,r=1,n=document.querySelector('product-form form.product-form, form[action*="/cart/add"]');if(n){let i=n.querySelector('input[name="id"]');i||(i=document.createElement("input"),i.type="hidden",i.name="id",n.appendChild(i)),i.disabled=!1,i.value=t;const l=n.querySelector('input[name="quantity"]');l&&(l.value=r);const a=n.querySelector('button[data-add-to-cart], button[type="submit"]');return a?(a.dispatchEvent(new MouseEvent("pointerdown",{bubbles:!0})),a.click(),a.dispatchEvent(new MouseEvent("pointerup",{bubbles:!0}))):console.warn("[ATC] button not found"),setTimeout(()=>{v(t)},500),void setTimeout(e,o)}return void fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:t,quantity:r}),credentials:"same-origin"}).then(()=>{setTimeout(()=>{v(t)},500),setTimeout(e,o)}).catch(t=>{console.error("[ATC] error for 70840582336:",t),setTimeout(e,o)})}const m=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},y=(e,o,r)=>{const n=e.cloneNode(!0);if(n){n.hasAttribute("data-product-variant-id")&&n.setAttribute("data-product-variant-id",o),n.hasAttribute("data-product-id")&&n.setAttribute("data-product-id",r);let e=n.querySelector('input[name="id"]');if(e)e.setAttribute("value",o),e.hasAttribute("disabled")&&e.removeAttribute("disabled");else{const t=n.querySelector('select[name="id"]');if(t){const e=t.querySelector('option[selected="selected"]');e&&e.setAttribute("value",o)}}const i=n.querySelector('input[name="product-id"]');i&&i.setAttribute("value",r);const l=document.createElement("div");return l.className="whatmore-atc",l.appendChild(n),document.body.appendChild(l),console.log(l,"formElement"),"92319318403"===t&&((t,e,o)=>{var r;const n=null!==(r=t.matches)&&void 0!==r&&r.call(t,"form")?t:t.querySelector("form");if(!n)return;let i=n.querySelector('input[name="id"]');i||(i=document.createElement("input"),i.type="hidden",i.name="id",n.prepend(i)),i.value=String(e),i.removeAttribute("disabled");const l=n.querySelector('select[name="id"]');l&&([...l.options].some(t=>t.value===String(e))?(l.value=String(e),[...l.options].forEach(t=>t.selected=t.value===String(e)),l.dispatchEvent(new Event("change",{bubbles:!0}))):l.removeAttribute("name"));const a=n.querySelector('input[name="product-id"]');a&&(a.value=String(o))})(l,o,r),l}},f=t=>{const e=null===t||void 0===t?void 0:t.querySelector('button[type="submit"]');e&&e.click()},v=t=>{(0,n.js)().then(t=>t.json()).then(e=>{const o=e.items.find(e=>e.id==t),r=o.key,i=o.quantity,l=o.properties;(0,n.CP)(r,i,l,s,d,p,!0,!0,!0)})},h=m(document);if(h||(null===h||void 0===h?void 0:h.length)>0){const t=y(h,l,a);f(t),setTimeout(()=>{v(l)},500),t.remove()}else{var x;fetch(null===c||void 0===c||null===(x=c.split("?"))||void 0===x?void 0:x[0]).then(t=>t.text()).then(t=>{const e=(new DOMParser).parseFromString(t,"text/html"),o=m(e);if(o||(null===o||void 0===o?void 0:o.length)>0){const t=y(o,l,a);f(t),setTimeout(()=>{v(l)},500),t.remove()}})}setTimeout(e,o)}},4826:function(){},7136:function(t,e,o){var r=o(9950),n=o(932),i=o(7509),l=o(5830),a=o(4414);e.A=function(t){var[e,o]=(0,n.A)();(0,r.useContext)(i.h);const s=(0,l.Xd)("whatmoreShopId");return t.event,(0,a.jsx)("div",{style:{margin:"0 auto",width:"8968077397"==s?void 0:o,aspectRatio:"8968077397"==s?9/16:void 0,height:"8968077397"==s?"100%":e,overflow:"hidden"}})}},7458:function(t,e,o){o.d(e,{P:function(){return r}});const r=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 r}});const r=(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 i}});var r=o(1348),n=o(5830);function i(t,e=""){const o=(0,n.Xd)("whatmoreShopId");return"shopify"!=(0,r.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],r=/\.(jpeg|jpg|gif|png|svg|webp)$/i,n=/\.(mp4|mov|wmv|avi|flv|mkv)$/i;return null!==r&&void 0!==r&&r.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 r=o(5830);function n(t,e){const o=(0,r.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(){}}]);