whatmore-react-assets 1.0.1641 → 1.0.1643

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.1641",
3
+ "version": "1.0.1643",
4
4
  "description": "public repo for all whatmore js and css assets",
5
5
  "main": "whatmore.js",
6
6
  "scripts": {
@@ -120,7 +120,7 @@
120
120
  0% {
121
121
  transform: translateY(100%);
122
122
  }
123
- `} 0.5s`;return(0,f.jsx)(u.B,{bg:"black",height:"100%",opacity:"100%",width:"100%",borderTopRadius:"xl",animation:w,justifyContent:"center",alignItems:"center",children:(0,f.jsxs)(c.az,{width:"100%",height:"100%",children:[(0,f.jsx)(y._,{width:"100%",height:"auto",src:(0,p.JAc)(a)?d:(0,p.OSd)(a),objectFit:"contain",borderTopRadius:"xl"}),(0,f.jsx)(u.B,{width:"100%",height:"100%",direction:"column",justifyContent:"flex-start",style:{position:"relative",zIndex:1,bottom:"90%"},className:"whatmore-ios-css-relative-fix",children:(0,f.jsx)(u.B,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",onClick:t=>{t.stopPropagation(),m(!1)},cursor:"pointer",padding:"4px",children:(0,f.jsx)(A.A,{sx:{boxShadow:3,color:"white !important",fontSize:1.6*g,filter:"drop-shadow(0 0 5px black);"}})})})]})})}var Yt=i(63),$t=i(8203);function qt(t){var e;const[i,o]=(0,n.useState)(null),r=t.product;return(0,n.useEffect)((()=>{(0,dt.tN)(r).then((t=>{o(t.variants)}))}),[]),null==i?(0,f.jsx)(f.Fragment,{}):(0,f.jsx)("div",{style:{width:null!==(e=t.width)&&void 0!==e?e:"100%",borderRadius:"6px",height:1.5*t.height,backgroundColor:"white"},children:(0,f.jsxs)("form",{method:"post",action:"/cart/add","accept-charset":"UTF-8",class:"shopify-product-form",enctype:"multipart/form-data",is:"product-form",children:[(0,f.jsx)("input",{type:"hidden",name:"form_type",value:"product"}),(0,f.jsx)("input",{type:"hidden",name:"utf8",value:"\u2713"}),(0,f.jsx)("input",{type:"hidden",name:"id",value:t.variantId}),(0,f.jsx)("input",{type:"hidden",value:t.product.product_link,name:"productUrl"}),(0,f.jsx)("div",{class:"shiprocket-headless","data-type":"product"}),(0,f.jsx)("textarea",{"data-variant-json":"",class:"hide","aria-hidden":"true","aria-label":"Product JSON",children:JSON.stringify(i).toString()})]})})}function Kt(t){const e=t.product;return(0,f.jsx)(qt,{product:e,variantId:t.variantId,height:t.height,width:t.width})}function Gt(t){var e,i,o,r,a,d,s,h;const[x]=(0,v.QN)("isInDesignMode"),[m]=(0,v.QN)("isDemoBrand"),[g]=(0,v.QN)("whatmoreShopId"),[w]=(0,v.QN)("whatmorePrimaryFont"),[y]=(0,v.QN)("whatmoreSecondaryColor"),[b]=(0,v.QN)("websiteLanguage"),C=(0,v.Xd)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:S,whatmoreUserInfo:k}=(0,n.useContext)(U.B),[I,z]=(0,n.useState)(!1),{closeClickComponent:E}=(0,n.useContext)(_i),[T,N]=(0,n.useState)(!1),F=t.FONT_SIZE,A=t.data,P=t.event,L=t.selectedVariantId,B=t.product,O=t.itemQuantity,D=t.PRODUCT_TILE_WIDTH,R=t.cartItemCount,W=t.addToCartFlag,V=t.setAddToCartFlag,Q=t.soldOutFlag,X=t.setSoldOutFlag,Y=S.landingLocationType,$=S.templateType,q=(0,jt.Wd)(Y)+(0,jt.gf)($)+(null!==P&&void 0!==P&&P.isRelatedEvent?"R":"E")+"_"+(null===P||void 0===P?void 0:P.event_id);const K=e=>{if(function(t,e){x||m||(async()=>{(0,l.TJ)(t,e)})()}(P,B),"buy-now"==e){var i,n;if((0,M.kz)({userInteractionType:H.O.SHOPNOW_ATC_CLICKED,widgetSourceDetails:S,event:P,productList:[B],ctaList:P.cta}),"78881718575"==g)return"function"==typeof gokwikBuyNowClickFn&&window.gokwikBuyNowClickFn(),void t.onCloseCallback();!function(t,e,i,n,o,r,l){"shopify"==i?(0,dt.oV)(t,e,n,o,r,l):(0,at.fL)(t,e,n)}(void 0!==L?L:null===A||void 0===A||null===(i=A.variants)||void 0===i||null===(n=i[0])||void 0===n?void 0:n.id,O,(0,p.NCy)(g),g,q,null===P||void 0===P?void 0:P.location,null===k||void 0===k?void 0:k.userType)}"view-more"==e&&((0,p.BLb)(g)?window.location.href=B.product_link+"?"+(0,p.VCz)(g)+"&"+(0,p.Spk)(g)+"&"+(0,p.$lz)(g)+((0,p.N0t)(g)?"&currency="+B.currency:""):window.location.href=B.product_link+((0,p.N0t)(g)?"?currency="+B.currency:""))};return(0,f.jsxs)(u.B,{boxShadow:"rgba(255, 255, 255, 0.3) 0px 0px 3px, rgba(255, 255, 255, 0.3) 0px 0px 6px, rgba(0, 0, 0, 0.6) 0px 0px 10px",position:t.position,className:"wht-shn-cta",bg:"#D3D3D3",borderRadius:"10px",bottom:"10px",left:"50%",zIndex:"1",transform:"translateX(-50%)",direction:"row",width:"95%",paddingX:"20px",paddingTop:"15px",paddingBottom:"15px",spacing:"15px",fontSize:.9*F,children:[" ",Q?(0,f.jsx)(J.$,{width:"90%",bg:"#252324",variant:"outline",opacity:4,_hover:{bg:"#252324"},height:2.5*F,disabled:!0,sx:{borderRadius:"round"==C?"5px":"0px",borderWidth:(0,p.YcK)(g),borderColor:(0,p.Fwt)(g)},children:(0,f.jsx)(j.E,{fontWeight:"extrabold",sx:{color:"white !important",fontFamily:w+" !important"},children:"Sold Out"})}):(0,f.jsxs)(u.B,{direction:"vertical"==(0,p.z00)(g)?"column":"row",width:"90%",spacing:"15px",fontSize:.9*F,justifyContent:"center",children:[(0,p.gvj)(g)?(0,f.jsx)(J.$,{className:"add-to-cart-button",height:2.5*F,onClick:async t=>{var e,i;t.stopPropagation(),z(!0),function(t,e,i){x||m||(async()=>{(0,l.tO)(t,e,i)})()}(P,B,O),(0,M.kz)({userInteractionType:H.O.SHOPNOW_ATC_CLICKED,widgetSourceDetails:S,event:P,productList:[B],ctaList:P.cta});const n=null!==L&&void 0!==L?L:null===A||void 0===A||null===(e=A.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.id;if(!n)return console.log("ERROR! No variants available."),void z(!1);ut([n],O,(0,p.NCy)(g),g,P,B,q,null===P||void 0===P?void 0:P.location,null===k||void 0===k?void 0:k.userType).then((t=>{if(!t.ok)throw new Error(t.status);return t.json()})).then((t=>(z(!1),V(!0),(0,v.t2)("whatmoreAddedToCart",!0),(0,p.rEM)(g)&&(x||(async()=>{await(0,dt.js)().then((t=>t.json())).catch((t=>{console.error("Whatmore :: Error while fetching cart_token for initiateOrderTrackingEvent.",t)}))})()),t))).catch((t=>{z(!1),X(!0),console.error("Error:",t)}))},sx:{minWidth:"50%",paddingLeft:"10px !important",paddingRight:"10px !important",backgroundColor:"#343434"===(0,p.Wc_)(g)?y+" !important":(0,p.Wc_)(g)+" !important",borderRadius:"round"==C?"27951333450"==g?"50px":"5px":"0px",borderWidth:(0,p.D3T)(g),borderColor:"#343434"===(0,p.IQN)(g)?"#343434"===(0,p.Wc_)(g)?y:(0,p.Wc_)(g):(0,p.IQN)(g),_hover:{backgroundColor:"transparent !important",borderWidth:(0,p.D3T)(g),borderColor:"#343434"===(0,p.IQN)(g)?y:(0,p.IQN)(g)}},children:I?(0,f.jsx)(Yt.y,{display:"flex !important",color:"white"}):(0,f.jsx)(j.E,{fontWeight:"extrabold !important",sx:{color:(0,p.Hfu)(g)+" !important",fontFamily:w+" !important",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},fontSize:F+"px !important",children:"ADD TO CART"!=(0,p.KPq)(g)?(0,p.KPq)(g):null!==(e=null===tt.m||void 0===tt.m||null===(i=tt.m[b])||void 0===i?void 0:i.add_to_cart)&&void 0!==e?e:(0,p.KPq)(g)})}):(0,f.jsx)(f.Fragment,{}),(0,p.oB_)(g)?(0,f.jsx)(f.Fragment,{children:(0,p.pbJ)(g)?(0,f.jsx)(Kt,{variantId:void 0!==L?L:null===A||void 0===A||null===(o=A.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.id,product:B,height:2.5*F,width:"90%",fontSize:F,fontFamily:w}):(0,f.jsx)(f.Fragment,{children:!(0,p.naM)(g)||"78881718575"===g&&null!==Y&&void 0!==Y&&Y.includes("product")?(0,f.jsx)(J.$,{className:"buy-now-button-custom",variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*F,onClick:t=>{K("buy-now")},sx:{width:"fit-content",minWidth:"50%",paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:(0,p.FHj)(g)+" !important",borderRadius:"round"==C?"27951333450"==g?"50px":"5px":"0px",borderWidth:(0,p.D3T)(g),borderColor:"#343434"===(0,p.IQN)(g)?y:(0,p.IQN)(g),_hover:{backgroundColor:"transparent !important"}},children:(0,f.jsx)(j.E,{fontWeight:"extrabold !important",sx:{color:"#343434"===(0,p.a7e)(g)?y+" !important":(0,p.a7e)(g)+" !important",fontFamily:w+" !important"},fontSize:F+"px !important",children:"BUY NOW"!=(0,p.GX0)(g)?(0,p.GX0)(g):null!==(s=null===tt.m||void 0===tt.m||null===(h=tt.m[b])||void 0===h?void 0:h.buy_now)&&void 0!==s?s:(0,p.GX0)(g)})}):(0,f.jsx)(J.$,{variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*F,onClick:()=>K("view-more"),sx:{width:"fit-content",minWidth:"50%",paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:(0,p.FHj)(g)+" !important",borderRadius:"round"==C?"27951333450"==g?"50px":"5px":"0px",borderWidth:(0,p.YcK)(g),borderColor:(0,p.Fwt)(g)},children:(0,f.jsx)(j.E,{fontWeight:"extrabold",sx:{color:"#343434"===(0,p.a7e)(g)?y+" !important":(0,p.a7e)(g)+" !important",fontFamily:w+" !important"},fontSize:F,children:"MORE INFO"!=(0,p.KnH)(g)?(0,p.KnH)(g):null!==(a=null===tt.m||void 0===tt.m||null===(d=tt.m[b])||void 0===d?void 0:d.more_info)&&void 0!==a?a:(0,p.KnH)(g)})})})}):(0,f.jsx)(f.Fragment,{})]}),(0,f.jsx)(f.Fragment,{children:(0,p.gvj)(g)?(0,f.jsx)(f.Fragment,{children:T?(0,f.jsx)(mt.s,{width:"10%",spacing:"0",right:0,children:(0,f.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,f.jsx)($t.A,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*F}})})}):(0,f.jsxs)(mt.s,{animation:W?_:"none",onAnimationEnd:()=>V(!1),width:"10%",spacing:"0",right:0,onClick:()=>{"do_nothing"!==(0,p.m4S)(g)&&("go_to_cart_page"!==(0,p.m4S)(g)?(N(!0),function(t){"open_cart_slider"!==(0,p.m4S)(t)||null!==E&&E()}(g)):ht((0,p.NCy)(g),g))},cursor:"pointer",children:[(0,f.jsx)(G.A,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*F}}),R>0?(0,f.jsx)(c.jl,{padding:"2px",bg:"white",size:1.1*F,top:.03*-D,verticalAlign:"top",position:"relative",left:.11*-D,zIndex:"1",children:(0,f.jsx)(j.E,{sx:{color:"black !important",fontFamily:w+" !important"},fontWeight:"bold !important",fontSize:.7*F+"px !important",children:R})}):(0,f.jsx)(f.Fragment,{})]})}):(0,f.jsx)(f.Fragment,{})})]})}function Zt(t){const[e]=(0,v.QN)("whatmorePrimaryFont"),i=((0,v.Xd)("whatmoreShopId"),t.setOpenShopNow),n=t.FONT_SIZE,o=t.setLockSwiper;return(0,f.jsxs)(mt.s,{justifyContent:"center",paddingTop:"10px",paddingBottom:"8px",width:"100%",className:"wht-shn-head",children:[(0,f.jsx)(mt.s,{width:"10%",display:"flex !important"}),(0,f.jsx)(mt.s,{width:"90%",justifyContent:"center",children:(0,f.jsx)(j.E,{align:"center",fontSize:1.25*n,fontWeight:"semibold",sx:{color:"black",fontFamily:e+" !important"},as:"b",children:"Shop Now"})}),(0,f.jsx)(mt.s,{justifyContent:"center",width:"10%",alignItems:"center",onClick:t=>{t.stopPropagation(),i(!1),o(!1)},cursor:"pointer",children:(0,f.jsx)(A.A,{sx:{boxShadow:3,color:"black",fontSize:1.2*n,filter:"drop-shadow(0 0 5px black);"}})})]})}function Jt(t){var e;const[i]=(0,v.QN)("whatmorePrimaryFont"),n=((0,v.Xd)("whatmoreShopId"),t.FONT_SIZE),o=t.data;return(0,f.jsxs)(u.B,{className:"wht-prd-des",direction:"column",paddingX:"20px",height:"fit-content",children:[(0,f.jsx)(j.E,{fontSize:n+"px !important",fontWeight:"bold !important",justifyContent:"center",sx:{color:"black",fontFamily:i+" !important"},children:"Description"}),(0,f.jsx)(c.az,{overflowY:"auto",scrollBehavior:"smooth",sx:{"::-webkit-scrollbar":{display:"none"}},children:(0,f.jsx)(j.E,{fontSize:.8*n+"px !important",justifyContent:"normal",fontWeight:"normal !important",dangerouslySetInnerHTML:{__html:(r=null!==(e=null===o||void 0===o?void 0:o.description)&&void 0!==e?e:null===o||void 0===o?void 0:o.body_html,r.replace(/style="[^"]*color[^"]*"/gi,""))},sx:{fontFamily:i+" !important",lineHeight:"140% !important"}})})]});var r}const te=({iconSize:t})=>(0,f.jsx)("div",{style:{color:"black",paddingTop:"2px"},children:(0,f.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"currentColor",class:"bi bi-box-arrow-up-right",viewBox:"0 0 16 16",style:{stroke:"black",strokeWidth:"0.4"},children:[(0,f.jsx)("path",{"fill-rule":"evenodd",d:"M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5"}),(0,f.jsx)("path",{"fill-rule":"evenodd",d:"M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0z"})]})});function ee(t){var e,i,o;const[r,l]=(0,n.useState)(t.product),[a]=(0,v.QN)("whatmorePrimaryFont"),[d]=(0,v.QN)("whatmoreShopId"),[s]=(0,v.QN)("whatmoreSecondaryColor"),[u]=(0,v.QN)("websiteLanguage");(0,n.useEffect)((()=>{(0,p.w4b)(d)&&(0,wt.ck)(r,(0,p.NCy)(d),d).then((t=>{l(t)}))}),[]);const h=t.FONT_SIZE,x=t.data,m=t.itemPrice;let g,w,y;var b,C,S;"STRDOIDF6O7"==d&&(g=null===x||void 0===x||null===(b=x.variants)||void 0===b?void 0:b.find((e=>e.id==t.selectedVariantId)),w=null===(C=g)||void 0===C?void 0:C.title,y=null===(S=g)||void 0===S?void 0:S.productLink);const k=(e=>{const i=null===x||void 0===x||null===(e=x.variants)||void 0===e?void 0:e.find((e=>e.id==t.selectedVariantId));return null!==i&&void 0!==i&&i.compare_at_price&&parseFloat(i.compare_at_price)>0?i.compare_at_price:null})(),I=k&&0!=k&&k>m?Math.round((k-m)/k*100):NaN;return(0,f.jsx)(f.Fragment,{children:(0,f.jsxs)(mt.s,{className:"wht-shn-title",direction:"column",paddingLeft:"20px",paddingRight:"20px",paddingY:"5px",children:[(0,f.jsxs)(mt.s,{cursor:"pointer",onClick:function(){window.location.href=function(t){return(0,p.BLb)(d)?("STRDOIDF6O7"==d?y:t.product_link)+"?"+(0,p.VCz)(d)+"&"+(0,p.Spk)(d)+"&"+(0,p.$lz)(d)+((0,p.N0t)(d)?"&currency="+t.currency:""):("STRDOIDF6O7"==d?y:t.product_link)+((0,p.N0t)(d)?"?currency="+t.currency:"")}(r)},sx:{display:"flex",gap:"6px"},children:[(0,f.jsx)(j.E,{isTruncated:!0,noOfLines:2,padding:"2px",fontSize:h,sx:{color:"black",lineHeight:"140% !important",fontFamily:a+" !important"},as:"b",children:"STRDOIDF6O7"==d&&null!==(e=w)&&void 0!==e?e:null===x||void 0===x?void 0:x.title}),(0,f.jsx)(te,{iconSize:1.1*h})]}),(0,f.jsxs)(mt.s,{direction:"row",gap:"6px",paddingTop:"4px",children:[k&&k>m&&(0,f.jsx)(j.E,{as:"s",padding:"2px",fontSize:1.2*h,fontWeight:"semibold",sx:{color:"gray !important",fontFamily:a+" !important"},children:(0,wt.Sb)(parseFloat((0,Et.U)()?k/100:k)," ",d,r.currency,!0)}),(0,f.jsx)(j.E,{as:"b",padding:"2px",fontSize:1.2*h,fontWeight:"semibold !important",sx:{color:"black",fontFamily:a+" !important"},children:(0,wt.Sb)(parseFloat((0,Et.U)()?m/100:m),"",d,r.currency,!0)}),!isNaN(I)&&0!=I&&(0,f.jsx)(c.az,{display:"flex",backgroundColor:"green"==(0,p.ub$)(d)?"#343434"==s?(0,p.ub$)(d):s:(0,p.ub$)(d),alignItems:"center",borderRadius:"4px",width:"fit-content",px:"6px",children:(0,f.jsx)(j.E,{fontSize:(0,p.mOK)(d)?"14px !important":1.1*h,fontWeight:"normal !important",sx:{color:(0,p.BRY)(d)+" !important",fontFamily:a+" !important"},children:(0,p.mOK)(d)?`${I}% ${null!==(i=null===tt.m||void 0===tt.m||null===(o=tt.m[u])||void 0===o?void 0:o.off)&&void 0!==i?i:"off"}`:`Save ${(0,wt.Sb)(parseFloat(k/100-m/100)," ",d,r.currency)}`})})]}),"61412737206"==d&&(0,f.jsx)(j.E,{fontSize:"11px",color:"#f4f4ec",children:"Tax included. Free shipping on all orders."})]})})}var ie=i(4418);function ne(t){var e,i;const[o]=(0,v.QN)("whatmorePrimaryFont"),[r]=(0,v.QN)("whatmoreShopId"),{setShowOptionsChart:l}=(0,n.useContext)(se),[a,d]=(0,n.useState)({}),[u]=(0,v.QN)("whatmoreUITheme"),h=(0,v.Xd)("whatmoreSecondaryColorShade300"),x=t.setSelectedColor,m=t.selectOptionFirstHandler,g=t.selectOptionSecondHandler,w=t.selectOptionThirdHandler,b=t.isVariantAvailable,C=t.FONT_SIZE,S=t.data,k=(t,e,i)=>{if(2==i)d((i=>({...i,[t]:e})));else if(1==i)d((i=>{var n,o,r,l;return{...i,[t]:e,[null===S||void 0===S||null===(n=S.options)||void 0===n||null===(o=n[2])||void 0===o?void 0:o.name]:null===S||void 0===S||null===(r=S.variants)||void 0===r||null===(l=r.find((t=>(null===t||void 0===t?void 0:t.option2)==e)))||void 0===l?void 0:l.option3}}));else{var n,o;const i=null===S||void 0===S||null===(n=S.variants)||void 0===n||null===(o=n.find((t=>(null===t||void 0===t?void 0:t.option1)==e)))||void 0===o?void 0:o.option2;d((n=>{var o,r,l,a,d,s,c,u;return{...n,[null===S||void 0===S||null===(o=S.options)||void 0===o||null===(r=o[1])||void 0===r?void 0:r.name]:null===S||void 0===S||null===(l=S.variants)||void 0===l||null===(a=l.find((t=>(null===t||void 0===t?void 0:t.option1)==e)))||void 0===a?void 0:a.option2,[null===S||void 0===S||null===(d=S.options)||void 0===d||null===(s=d[2])||void 0===s?void 0:s.name]:null===S||void 0===S||null===(c=S.variants)||void 0===c||null===(u=c.find((t=>(null===t||void 0===t?void 0:t.option2)==i)))||void 0===u?void 0:u.option3,[t]:e}}))}};return(0,n.useEffect)((()=>{d((t=>{var e,i,n,o,r,l,a,d,s,c,u,h;return{...t,[null===S||void 0===S||null===(e=S.options)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.name]:null===S||void 0===S||null===(n=S.variants)||void 0===n||null===(o=n.find((t=>{var e,i,n;return(null===S||void 0===S||null===(e=S.options)||void 0===e||null===(i=e[0])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option1))&&(null===t||void 0===t?void 0:t.available)})))||void 0===o?void 0:o.option1,[null===S||void 0===S||null===(r=S.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name]:null===S||void 0===S||null===(a=S.variants)||void 0===a||null===(d=a.find((t=>{var e,i,n;return(null===S||void 0===S||null===(e=S.options)||void 0===e||null===(i=e[1])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option2))&&(null===t||void 0===t?void 0:t.available)})))||void 0===d?void 0:d.option2,[null===S||void 0===S||null===(s=S.options)||void 0===s||null===(c=s[2])||void 0===c?void 0:c.name]:null===S||void 0===S||null===(u=S.variants)||void 0===u||null===(h=u.find((t=>{var e,i,n;return(null===S||void 0===S||null===(e=S.options)||void 0===e||null===(i=e[2])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option3))&&(null===t||void 0===t?void 0:t.available)})))||void 0===h?void 0:h.option3}}))}),[]),(0,f.jsx)(mt.s,{direction:"row",paddingLeft:"20px",paddingRight:"20px",paddingY:"10px",children:(null===S||void 0===S||null===(e=S.options)||void 0===e?void 0:e.length)>0&&(0,f.jsx)(mt.s,{direction:"column",width:"100%",gap:"4px",children:null===S||void 0===S||null===(i=S.options)||void 0===i?void 0:i.map(((e,i)=>{var n,d,v,I,_,z;return(0,f.jsx)(f.Fragment,{children:"mlveda_country"!==(null===e||void 0===e?void 0:e.name)&&((null===e||void 0===e||null===(n=e.values)||void 0===n?void 0:n.length)>1||"Colour"===(null===e||void 0===e?void 0:e.name)||(null===e||void 0===e||null===(d=e.name)||void 0===d?void 0:d.toLowerCase().includes("color"))||1==(null===e||void 0===e||null===(v=e.values)||void 0===v?void 0:v.length)&&(null===e||void 0===e?void 0:e.position)>1&&(null===e||void 0===e?void 0:e.position)==(null===S||void 0===S||null===(I=S.options)||void 0===I?void 0:I.length))&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(mt.s,{className:"wht-shn-optype",justifyContent:"space-between",alignItems:"center",children:[(0,f.jsx)(j.E,{fontSize:1*C+"px !important",sx:{color:"black",fontFamily:o+" !important",fontWeight:"bold !important"},children:null===e||void 0===e?void 0:e.name}),"Size"===e.name&&(0,p.u1b)(r)?(0,f.jsx)(mt.s,{marginTop:"4px",whiteSpace:"nowrap",cursor:"pointer",children:(0,f.jsx)(j.E,{fontSize:.7*C,as:"u",sx:{color:"black !important",fontFamily:o+" !important"},onClick:()=>{null!==l&&l(!0)},children:(0,p.A5I)(r)})}):(0,f.jsx)(f.Fragment,{})]}),(0,f.jsx)(ie.z,{spacing:0,flexWrap:"wrap",alignContent:"flex-start",alignItems:"center",justifyContent:"flex-start",children:null===e||void 0===e||null===(_=e.values)||void 0===_?void 0:_.map((n=>{var l,d,s,v,I,_,z,E,T,N;const F=b(n,i),A=0==i||S.variants.find((t=>{var e,o;return t[`option${i}`]==(null===(e=Object.entries(a))||void 0===e||null===(o=e[i-1])||void 0===o?void 0:o[1])&&t[`option${i+1}`]==n}));return("Colour"===(null===e||void 0===e?void 0:e.name)||null!==e&&void 0!==e&&null!==(l=e.name)&&void 0!==l&&l.toLowerCase().includes("color"))&&A&&((null===t||void 0===t||null===(d=t.finalArr)||void 0===d?void 0:d.length)>0&&(null===t||void 0===t||null===(s=t.finalArr)||void 0===s||!s.includes(null))||(null===t||void 0===t||null===(v=t.finalArrExternal)||void 0===v?void 0:v.length)>0)?(0,f.jsx)(f.Fragment,{children:(0,f.jsx)(mt.s,{paddingBottom:"8px",px:"2px",paddingRight:"8px",children:(0,f.jsx)(c.az,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px",borderRadius:(0,p.tM2)(r),size:"sm",border:a[null===e||void 0===e?void 0:e.name]===n?`2px solid ${(0,p.Usu)(r)} !important`:"",cursor:"pointer",width:"fit-content !important",onClick:()=>{k(null===e||void 0===e?void 0:e.name,n,i),x(n),0===i&&m(n),1===i&&g(n),2===i&&w(n)},children:(0,f.jsx)(y._,{padding:"2px",borderRadius:(0,p.tM2)(r),width:"58px",height:"58px",src:(0,gt.b)(null!==(I=null===t||void 0===t||null===(_=t.finalArr)||void 0===_||null===(z=_.find((t=>(null===t||void 0===t?void 0:t.color)==n)))||void 0===z?void 0:z.src)&&void 0!==I?I:null===t||void 0===t||null===(E=t.finalArrExternal)||void 0===E||null===(T=E.find((t=>(null===t||void 0===t?void 0:t.color)==n)))||void 0===T?void 0:T.optionsrc,"?width=400&height=400")})})},n)}):A&&(0,f.jsx)(mt.s,{className:"wht-shn-opt",paddingBottom:"8px",paddingRight:"8px",children:(0,f.jsx)(J.$,{isDisabled:!F,size:"sm",borderRadius:"round"==u?"5px":0,bg:a[null===e||void 0===e?void 0:e.name]===n&&F?(null!==(N=(0,p.j2L)(r))&&void 0!==N?N:h)+" !important":(0,p.R25)(r)+" !important",width:"fit-content !important",height:"fit-content !important",style:{padding:"4px 8px"},onClick:()=>{"76408193304"!=r||"Size"!=(null===e||void 0===e?void 0:e.name)||"Customize"!=n?(k(null===e||void 0===e?void 0:e.name,n,i),0===i&&m(n),1===i&&g(n),2===i&&w(n)):window.location.href=t.product.product_link},children:(0,f.jsx)(j.E,{as:F?"p":"s",textDecoration:F?"none":"line-through",fontSize:.9*C+"px !important",sx:{fontFamily:o+" !important",fontWeight:"normal !important",color:a[null===e||void 0===e?void 0:e.name]===n&&F?(0,p.L7T)(r)+" !important":(0,p.Egc)(r)+" !important"},children:n})})},n)}))}),i===(null===S||void 0===S||null===(z=S.options)||void 0===z?void 0:z.length)-1&&(0,f.jsx)(s.o,{paddingTop:"8px",width:"100%",children:(0,f.jsx)(xt.c,{color:t.dividerColor,size:"xs"})})]})})}))})})}var oe=i(8385);function re(t){var e,i,o,r,l,a,d,u,h,m,g,w,j,b,C,S,I,_,z,E,T;const[N,F,A,P]=(0,x.A)();var L=.4*P*.8,B=L*(16/9)*.6*.8;const O=1.1*L,D=O*(16/9)*.8;var W=.12*L;const[V,Q]=(0,n.useState)(!1),M=t.data,H=t.event,U=t.product,X=t.setOpenShopNow,Y=t.setLockSwiper,[$,q]=(0,n.useState)({});(0,n.useEffect)((()=>{q((t=>{var e,i,n,o,r,l,a,d,s,c,u,h;return{...t,[null===M||void 0===M||null===(e=M.options)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.name]:null===M||void 0===M||null===(n=M.variants)||void 0===n||null===(o=n.find((t=>{var e,i,n;return(null===M||void 0===M||null===(e=M.options)||void 0===e||null===(i=e[0])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option1))&&(null===t||void 0===t?void 0:t.available)})))||void 0===o?void 0:o.option1,[null===M||void 0===M||null===(r=M.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name]:null===M||void 0===M||null===(a=M.variants)||void 0===a||null===(d=a.find((t=>{var e,i,n;return(null===M||void 0===M||null===(e=M.options)||void 0===e||null===(i=e[1])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option2))&&(null===t||void 0===t?void 0:t.available)})))||void 0===d?void 0:d.option2,[null===M||void 0===M||null===(s=M.options)||void 0===s||null===(c=s[2])||void 0===c?void 0:c.name]:null===M||void 0===M||null===(u=M.variants)||void 0===u||null===(h=u.find((t=>{var e,i,n;return(null===M||void 0===M||null===(e=M.options)||void 0===e||null===(i=e[2])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option3))&&(null===t||void 0===t?void 0:t.available)})))||void 0===h?void 0:h.option3}}))}),[]);const K=(t,e)=>{var i,n,o,r,l,a,d,s,c,u;if(null===M||void 0===M||null===(i=M.options)||void 0===i||!i.length)return!1;const h=null===M||void 0===M||null===(n=M.options)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.name,p=null===M||void 0===M||null===(r=M.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name;null===M||void 0===M||null===(a=M.options)||void 0===a||null===(d=a[2])||void 0===d||d.name;switch(null===M||void 0===M||null===(s=M.options)||void 0===s?void 0:s.length){case 1:return null===M||void 0===M||null===(c=M.variants)||void 0===c?void 0:c.some((e=>e.option1===t&&e.available));case 2:var v;return 0===e?null===M||void 0===M||null===(v=M.variants)||void 0===v?void 0:v.some((e=>e.option1===t&&e.available)):null===M||void 0===M||null===(u=M.variants)||void 0===u?void 0:u.some((e=>e.option2===t&&e.option1===$[h]&&e.available));case 3:var x,m,g;if(0===e)return null===M||void 0===M||null===(x=M.variants)||void 0===x?void 0:x.some((e=>e.option1===t&&e.available));if(1===e)return null===M||void 0===M||null===(m=M.variants)||void 0===m?void 0:m.some((e=>e.option2===t&&e.option1===$[h]&&e.available));if(2===e)return null===M||void 0===M||null===(g=M.variants)||void 0===g?void 0:g.some((e=>e.option3===t&&e.option1===$[h]&&e.option2===$[p]&&e.available));default:return!1}},[G,Z]=(0,n.useState)((()=>{var t,e;for(let r=0;r<(null===M||void 0===M||null===(i=M.variants)||void 0===i?void 0:i.length);r++){var i,n,o;const t=null===M||void 0===M||null===(n=M.variants)||void 0===n||null===(o=n[r])||void 0===o?void 0:o.option1;if(t&&K(t,0))return t}return(null===M||void 0===M||null===(t=M.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.option1)||""})),[J,tt]=(0,n.useState)((()=>{var t,e;for(let r=0;r<(null===M||void 0===M||null===(i=M.variants)||void 0===i?void 0:i.length);r++){var i,n,o;const t=null===M||void 0===M||null===(n=M.variants)||void 0===n||null===(o=n[r])||void 0===o?void 0:o.option2;if(t&&K(t,1))return t}return(null===M||void 0===M||null===(t=M.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.option2)||""})),[et,it]=(0,n.useState)((()=>{var t,e;for(let r=0;r<(null===M||void 0===M||null===(i=M.variants)||void 0===i?void 0:i.length);r++){var i,n,o;const t=null===M||void 0===M||null===(n=M.variants)||void 0===n||null===(o=n[r])||void 0===o?void 0:o.option3;if(t&&K(t,2))return t}return(null===M||void 0===M||null===(t=M.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.option3)||""})),[nt,ot]=(0,n.useState)(),[rt,lt]=(0,n.useState)(1),[st,ct]=(0,n.useState)(),[ut,ht]=(0,n.useState)(0),[pt,vt]=(0,n.useState)(!1),[ft,wt]=(0,n.useState)(!1),[jt,yt]=(0,n.useState)(U.thumbnail_image),bt=(0,v.Xd)("whatmoreUITheme"),Ct=(0,v.Xd)("whatmoreShopId"),St=(0,n.useCallback)((t=>{Z(t)}),[]),kt=(0,n.useCallback)((t=>{tt(t)}),[]),It=(0,n.useCallback)((t=>{it(t)}),[]);(0,n.useEffect)((()=>{var t,e;const i=le(M,G,J,et);ot(null!==i&&void 0!==i?i:null===M||void 0===M||null===(t=M.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.id),ct(ae(M,i)),lt(1),wt(!1);const n=de(M,i);null!==n&&yt(n)}),[G,J,et]),(0,n.useEffect)((()=>{var t,e;const i=void 0===nt?null===M||void 0===M||null===(t=M.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.price:ae(M,nt);ct(i*rt)}),[rt]),(0,n.useEffect)((()=>{function t(t){const e=document.getElementById("whatmore-shopnow-view"),i=document.getElementById("whatmore-size-chart");i&&i.contains(t.target)||!e||e.contains(t.target)||(X(!1),Y(!1))}function e(t){t.stopPropagation(),i.scrollTop+=t.deltaY}document.addEventListener("click",t);const i=document.getElementById("whatmore-shopnow-view");return null===i||void 0===i||i.addEventListener("wheel",e),()=>{document.removeEventListener("click",t),i.removeEventListener("wheel",e)}}),[]),(0,n.useEffect)((()=>{const t=async function(t,e){return"shopify"==t?(0,dt.Lt)():(0,at.Ii)(e)}((0,p.NCy)(Ct),Ct);t.then((t=>t.json())).then((t=>{ht(t.item_count)})).catch((t=>{console.error("Cart Add Error:",t)}))}),[pt]);const _t=`${k.i7`
123
+ `} 0.5s`;return(0,f.jsx)(u.B,{bg:"black",height:"100%",opacity:"100%",width:"100%",borderTopRadius:"xl",animation:w,justifyContent:"center",alignItems:"center",children:(0,f.jsxs)(c.az,{width:"100%",height:"100%",children:[(0,f.jsx)(y._,{width:"100%",height:"auto",src:(0,p.JAc)(a)?d:(0,p.OSd)(a),objectFit:"contain",borderTopRadius:"xl"}),(0,f.jsx)(u.B,{width:"100%",height:"100%",direction:"column",justifyContent:"flex-start",style:{position:"relative",zIndex:1,bottom:"90%"},className:"whatmore-ios-css-relative-fix",children:(0,f.jsx)(u.B,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",onClick:t=>{t.stopPropagation(),m(!1)},cursor:"pointer",padding:"4px",children:(0,f.jsx)(A.A,{sx:{boxShadow:3,color:"white !important",fontSize:1.6*g,filter:"drop-shadow(0 0 5px black);"}})})})]})})}var Yt=i(63),$t=i(8203);function qt(t){var e;const[i,o]=(0,n.useState)(null),r=t.product;return(0,n.useEffect)((()=>{(0,dt.tN)(r).then((t=>{o(t.variants)}))}),[]),null==i?(0,f.jsx)(f.Fragment,{}):(0,f.jsx)("div",{style:{width:null!==(e=t.width)&&void 0!==e?e:"100%",borderRadius:"6px",height:1.5*t.height,backgroundColor:"white"},children:(0,f.jsxs)("form",{method:"post",action:"/cart/add","accept-charset":"UTF-8",class:"shopify-product-form",enctype:"multipart/form-data",is:"product-form",children:[(0,f.jsx)("input",{type:"hidden",name:"form_type",value:"product"}),(0,f.jsx)("input",{type:"hidden",name:"utf8",value:"\u2713"}),(0,f.jsx)("input",{type:"hidden",name:"id",value:t.variantId}),(0,f.jsx)("input",{type:"hidden",value:t.product.product_link,name:"productUrl"}),(0,f.jsx)("div",{class:"shiprocket-headless","data-type":"product"}),(0,f.jsx)("textarea",{"data-variant-json":"",class:"hide","aria-hidden":"true","aria-label":"Product JSON",children:JSON.stringify(i).toString()})]})})}function Kt(t){const e=t.product;return(0,f.jsx)(qt,{product:e,variantId:t.variantId,height:t.height,width:t.width})}function Gt(t){var e,i,o,r,a,d,s,h;const[x]=(0,v.QN)("isInDesignMode"),[m]=(0,v.QN)("isDemoBrand"),[g]=(0,v.QN)("whatmoreShopId"),[w]=(0,v.QN)("whatmorePrimaryFont"),[y]=(0,v.QN)("whatmoreSecondaryColor"),[b]=(0,v.QN)("websiteLanguage"),C=(0,v.Xd)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:S,whatmoreUserInfo:k}=(0,n.useContext)(U.B),[I,z]=(0,n.useState)(!1),{closeClickComponent:E}=(0,n.useContext)(_i),[T,N]=(0,n.useState)(!1),F=t.FONT_SIZE,A=t.data,P=t.event,L=t.selectedVariantId,B=t.product,O=t.itemQuantity,D=t.PRODUCT_TILE_WIDTH,R=t.cartItemCount,W=t.addToCartFlag,V=t.setAddToCartFlag,Q=t.soldOutFlag,X=t.setSoldOutFlag,Y=S.landingLocationType,$=S.templateType,q=(0,jt.Wd)(Y)+(0,jt.gf)($)+(null!==P&&void 0!==P&&P.isRelatedEvent?"R":"E")+"_"+(null===P||void 0===P?void 0:P.event_id);const K=e=>{if(function(t,e){x||m||(async()=>{(0,l.TJ)(t,e)})()}(P,B),"buy-now"==e){var i,n;if((0,M.kz)({userInteractionType:H.O.SHOPNOW_ATC_CLICKED,widgetSourceDetails:S,event:P,productList:[B],ctaList:P.cta}),"78881718575"==g)return"function"==typeof gokwikBuyNowClickFn&&window.gokwikBuyNowClickFn(),void t.onCloseCallback();!function(t,e,i,n,o,r,l){"shopify"==i?(0,dt.oV)(t,e,n,o,r,l):(0,at.fL)(t,e,n)}(void 0!==L?L:null===A||void 0===A||null===(i=A.variants)||void 0===i||null===(n=i[0])||void 0===n?void 0:n.id,O,(0,p.NCy)(g),g,q,null===P||void 0===P?void 0:P.location,null===k||void 0===k?void 0:k.userType)}"view-more"==e&&((0,p.BLb)(g)?window.location.href=B.product_link+"?"+(0,p.VCz)(g)+"&"+(0,p.Spk)(g)+"&"+(0,p.$lz)(g)+((0,p.N0t)(g)?"&currency="+B.currency:""):window.location.href=B.product_link+((0,p.N0t)(g)?"?currency="+B.currency:""))};return(0,f.jsxs)(u.B,{boxShadow:"rgba(255, 255, 255, 0.3) 0px 0px 3px, rgba(255, 255, 255, 0.3) 0px 0px 6px, rgba(0, 0, 0, 0.6) 0px 0px 10px",position:t.position,className:"wht-shn-cta",bg:"#D3D3D3",borderRadius:"10px",bottom:"10px",left:"50%",zIndex:"1",transform:"translateX(-50%)",direction:"row",width:"95%",paddingX:"20px",paddingTop:"15px",paddingBottom:"15px",spacing:"15px",fontSize:.9*F,children:[" ",Q?(0,f.jsx)(J.$,{width:"90%",bg:"#252324",variant:"outline",opacity:4,_hover:{bg:"#252324"},height:2.5*F,disabled:!0,sx:{borderRadius:"round"==C?"5px":"0px",borderWidth:(0,p.YcK)(g),borderColor:(0,p.Fwt)(g)},children:(0,f.jsx)(j.E,{fontWeight:"extrabold",sx:{color:"white !important",fontFamily:w+" !important"},children:"Sold Out"})}):(0,f.jsxs)(u.B,{direction:"vertical"==(0,p.z00)(g)?"column":"row",width:"90%",spacing:"15px",fontSize:.9*F,justifyContent:"center",children:[(0,p.gvj)(g)?(0,f.jsx)(J.$,{className:"add-to-cart-button",height:2.5*F,onClick:async t=>{var e,i;t.stopPropagation(),z(!0),function(t,e,i){x||m||(async()=>{(0,l.tO)(t,e,i)})()}(P,B,O),(0,M.kz)({userInteractionType:H.O.SHOPNOW_ATC_CLICKED,widgetSourceDetails:S,event:P,productList:[B],ctaList:P.cta});const n=null!==L&&void 0!==L?L:null===A||void 0===A||null===(e=A.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.id;if(!n)return console.log("ERROR! No variants available."),void z(!1);ut([n],O,(0,p.NCy)(g),g,P,B,q,null===P||void 0===P?void 0:P.location,null===k||void 0===k?void 0:k.userType).then((t=>{if(!t.ok)throw new Error(t.status);return t.json()})).then((t=>(z(!1),V(!0),(0,v.t2)("whatmoreAddedToCart",!0),(0,v.Xd)("whatmoreAddedToCart")&&(0,pt.initiateCartSliderEvent)(g,(()=>{}),100,window.location.hostname,n,B.client_product_id,q,null===P||void 0===P?void 0:P.location,null===k||void 0===k?void 0:k.userType,B.product_link),(0,p.rEM)(g)&&(x||(async()=>{await(0,dt.js)().then((t=>t.json())).catch((t=>{console.error("Whatmore :: Error while fetching cart_token for initiateOrderTrackingEvent.",t)}))})()),t))).catch((t=>{z(!1),X(!0),console.error("Error:",t)}))},sx:{minWidth:"50%",paddingLeft:"10px !important",paddingRight:"10px !important",backgroundColor:"#343434"===(0,p.Wc_)(g)?y+" !important":(0,p.Wc_)(g)+" !important",borderRadius:"round"==C?"27951333450"==g?"50px":"5px":"0px",borderWidth:(0,p.D3T)(g),borderColor:"#343434"===(0,p.IQN)(g)?"#343434"===(0,p.Wc_)(g)?y:(0,p.Wc_)(g):(0,p.IQN)(g),_hover:{backgroundColor:"transparent !important",borderWidth:(0,p.D3T)(g),borderColor:"#343434"===(0,p.IQN)(g)?y:(0,p.IQN)(g)}},children:I?(0,f.jsx)(Yt.y,{display:"flex !important",color:"white"}):(0,f.jsx)(j.E,{fontWeight:"extrabold !important",sx:{color:(0,p.Hfu)(g)+" !important",fontFamily:w+" !important",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},fontSize:F+"px !important",children:"ADD TO CART"!=(0,p.KPq)(g)?(0,p.KPq)(g):null!==(e=null===tt.m||void 0===tt.m||null===(i=tt.m[b])||void 0===i?void 0:i.add_to_cart)&&void 0!==e?e:(0,p.KPq)(g)})}):(0,f.jsx)(f.Fragment,{}),(0,p.oB_)(g)?(0,f.jsx)(f.Fragment,{children:(0,p.pbJ)(g)?(0,f.jsx)(Kt,{variantId:void 0!==L?L:null===A||void 0===A||null===(o=A.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.id,product:B,height:2.5*F,width:"90%",fontSize:F,fontFamily:w}):(0,f.jsx)(f.Fragment,{children:!(0,p.naM)(g)||"78881718575"===g&&null!==Y&&void 0!==Y&&Y.includes("product")?(0,f.jsx)(J.$,{className:"buy-now-button-custom",variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*F,onClick:t=>{K("buy-now")},sx:{width:"fit-content",minWidth:"50%",paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:(0,p.FHj)(g)+" !important",borderRadius:"round"==C?"27951333450"==g?"50px":"5px":"0px",borderWidth:(0,p.D3T)(g),borderColor:"#343434"===(0,p.IQN)(g)?y:(0,p.IQN)(g),_hover:{backgroundColor:"transparent !important"}},children:(0,f.jsx)(j.E,{fontWeight:"extrabold !important",sx:{color:"#343434"===(0,p.a7e)(g)?y+" !important":(0,p.a7e)(g)+" !important",fontFamily:w+" !important"},fontSize:F+"px !important",children:"BUY NOW"!=(0,p.GX0)(g)?(0,p.GX0)(g):null!==(s=null===tt.m||void 0===tt.m||null===(h=tt.m[b])||void 0===h?void 0:h.buy_now)&&void 0!==s?s:(0,p.GX0)(g)})}):(0,f.jsx)(J.$,{variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*F,onClick:()=>K("view-more"),sx:{width:"fit-content",minWidth:"50%",paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:(0,p.FHj)(g)+" !important",borderRadius:"round"==C?"27951333450"==g?"50px":"5px":"0px",borderWidth:(0,p.YcK)(g),borderColor:(0,p.Fwt)(g)},children:(0,f.jsx)(j.E,{fontWeight:"extrabold",sx:{color:"#343434"===(0,p.a7e)(g)?y+" !important":(0,p.a7e)(g)+" !important",fontFamily:w+" !important"},fontSize:F,children:"MORE INFO"!=(0,p.KnH)(g)?(0,p.KnH)(g):null!==(a=null===tt.m||void 0===tt.m||null===(d=tt.m[b])||void 0===d?void 0:d.more_info)&&void 0!==a?a:(0,p.KnH)(g)})})})}):(0,f.jsx)(f.Fragment,{})]}),(0,f.jsx)(f.Fragment,{children:(0,p.gvj)(g)?(0,f.jsx)(f.Fragment,{children:T?(0,f.jsx)(mt.s,{width:"10%",spacing:"0",right:0,children:(0,f.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,f.jsx)($t.A,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*F}})})}):(0,f.jsxs)(mt.s,{animation:W?_:"none",onAnimationEnd:()=>V(!1),width:"10%",spacing:"0",right:0,onClick:()=>{"do_nothing"!==(0,p.m4S)(g)&&("go_to_cart_page"!==(0,p.m4S)(g)?(N(!0),function(t){"open_cart_slider"!==(0,p.m4S)(t)||null!==E&&E()}(g)):ht((0,p.NCy)(g),g))},cursor:"pointer",children:[(0,f.jsx)(G.A,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*F}}),R>0?(0,f.jsx)(c.jl,{padding:"2px",bg:"white",size:1.1*F,top:.03*-D,verticalAlign:"top",position:"relative",left:.11*-D,zIndex:"1",children:(0,f.jsx)(j.E,{sx:{color:"black !important",fontFamily:w+" !important"},fontWeight:"bold !important",fontSize:.7*F+"px !important",children:R})}):(0,f.jsx)(f.Fragment,{})]})}):(0,f.jsx)(f.Fragment,{})})]})}function Zt(t){const[e]=(0,v.QN)("whatmorePrimaryFont"),i=((0,v.Xd)("whatmoreShopId"),t.setOpenShopNow),n=t.FONT_SIZE,o=t.setLockSwiper;return(0,f.jsxs)(mt.s,{justifyContent:"center",paddingTop:"10px",paddingBottom:"8px",width:"100%",className:"wht-shn-head",children:[(0,f.jsx)(mt.s,{width:"10%",display:"flex !important"}),(0,f.jsx)(mt.s,{width:"90%",justifyContent:"center",children:(0,f.jsx)(j.E,{align:"center",fontSize:1.25*n,fontWeight:"semibold",sx:{color:"black",fontFamily:e+" !important"},as:"b",children:"Shop Now"})}),(0,f.jsx)(mt.s,{justifyContent:"center",width:"10%",alignItems:"center",onClick:t=>{t.stopPropagation(),i(!1),o(!1)},cursor:"pointer",children:(0,f.jsx)(A.A,{sx:{boxShadow:3,color:"black",fontSize:1.2*n,filter:"drop-shadow(0 0 5px black);"}})})]})}function Jt(t){var e;const[i]=(0,v.QN)("whatmorePrimaryFont"),n=((0,v.Xd)("whatmoreShopId"),t.FONT_SIZE),o=t.data;return(0,f.jsxs)(u.B,{className:"wht-prd-des",direction:"column",paddingX:"20px",height:"fit-content",children:[(0,f.jsx)(j.E,{fontSize:n+"px !important",fontWeight:"bold !important",justifyContent:"center",sx:{color:"black",fontFamily:i+" !important"},children:"Description"}),(0,f.jsx)(c.az,{overflowY:"auto",scrollBehavior:"smooth",sx:{"::-webkit-scrollbar":{display:"none"}},children:(0,f.jsx)(j.E,{fontSize:.8*n+"px !important",justifyContent:"normal",fontWeight:"normal !important",dangerouslySetInnerHTML:{__html:(r=null!==(e=null===o||void 0===o?void 0:o.description)&&void 0!==e?e:null===o||void 0===o?void 0:o.body_html,r.replace(/style="[^"]*color[^"]*"/gi,""))},sx:{fontFamily:i+" !important",lineHeight:"140% !important"}})})]});var r}const te=({iconSize:t})=>(0,f.jsx)("div",{style:{color:"black",paddingTop:"2px"},children:(0,f.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"currentColor",class:"bi bi-box-arrow-up-right",viewBox:"0 0 16 16",style:{stroke:"black",strokeWidth:"0.4"},children:[(0,f.jsx)("path",{"fill-rule":"evenodd",d:"M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5"}),(0,f.jsx)("path",{"fill-rule":"evenodd",d:"M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0z"})]})});function ee(t){var e,i,o;const[r,l]=(0,n.useState)(t.product),[a]=(0,v.QN)("whatmorePrimaryFont"),[d]=(0,v.QN)("whatmoreShopId"),[s]=(0,v.QN)("whatmoreSecondaryColor"),[u]=(0,v.QN)("websiteLanguage");(0,n.useEffect)((()=>{(0,p.w4b)(d)&&(0,wt.ck)(r,(0,p.NCy)(d),d).then((t=>{l(t)}))}),[]);const h=t.FONT_SIZE,x=t.data,m=t.itemPrice;let g,w,y;var b,C,S;"STRDOIDF6O7"==d&&(g=null===x||void 0===x||null===(b=x.variants)||void 0===b?void 0:b.find((e=>e.id==t.selectedVariantId)),w=null===(C=g)||void 0===C?void 0:C.title,y=null===(S=g)||void 0===S?void 0:S.productLink);const k=(e=>{const i=null===x||void 0===x||null===(e=x.variants)||void 0===e?void 0:e.find((e=>e.id==t.selectedVariantId));return null!==i&&void 0!==i&&i.compare_at_price&&parseFloat(i.compare_at_price)>0?i.compare_at_price:null})(),I=k&&0!=k&&k>m?Math.round((k-m)/k*100):NaN;return(0,f.jsx)(f.Fragment,{children:(0,f.jsxs)(mt.s,{className:"wht-shn-title",direction:"column",paddingLeft:"20px",paddingRight:"20px",paddingY:"5px",children:[(0,f.jsxs)(mt.s,{cursor:"pointer",onClick:function(){window.location.href=function(t){return(0,p.BLb)(d)?("STRDOIDF6O7"==d?y:t.product_link)+"?"+(0,p.VCz)(d)+"&"+(0,p.Spk)(d)+"&"+(0,p.$lz)(d)+((0,p.N0t)(d)?"&currency="+t.currency:""):("STRDOIDF6O7"==d?y:t.product_link)+((0,p.N0t)(d)?"?currency="+t.currency:"")}(r)},sx:{display:"flex",gap:"6px"},children:[(0,f.jsx)(j.E,{isTruncated:!0,noOfLines:2,padding:"2px",fontSize:h,sx:{color:"black",lineHeight:"140% !important",fontFamily:a+" !important"},as:"b",children:"STRDOIDF6O7"==d&&null!==(e=w)&&void 0!==e?e:null===x||void 0===x?void 0:x.title}),(0,f.jsx)(te,{iconSize:1.1*h})]}),(0,f.jsxs)(mt.s,{direction:"row",gap:"6px",paddingTop:"4px",children:[k&&k>m&&(0,f.jsx)(j.E,{as:"s",padding:"2px",fontSize:1.2*h,fontWeight:"semibold",sx:{color:"gray !important",fontFamily:a+" !important"},children:(0,wt.Sb)(parseFloat((0,Et.U)()?k/100:k)," ",d,r.currency,!0)}),(0,f.jsx)(j.E,{as:"b",padding:"2px",fontSize:1.2*h,fontWeight:"semibold !important",sx:{color:"black",fontFamily:a+" !important"},children:(0,wt.Sb)(parseFloat((0,Et.U)()?m/100:m),"",d,r.currency,!0)}),!isNaN(I)&&0!=I&&(0,f.jsx)(c.az,{display:"flex",backgroundColor:"green"==(0,p.ub$)(d)?"#343434"==s?(0,p.ub$)(d):s:(0,p.ub$)(d),alignItems:"center",borderRadius:"4px",width:"fit-content",px:"6px",children:(0,f.jsx)(j.E,{fontSize:(0,p.mOK)(d)?"14px !important":1.1*h,fontWeight:"normal !important",sx:{color:(0,p.BRY)(d)+" !important",fontFamily:a+" !important"},children:(0,p.mOK)(d)?`${I}% ${null!==(i=null===tt.m||void 0===tt.m||null===(o=tt.m[u])||void 0===o?void 0:o.off)&&void 0!==i?i:"off"}`:`Save ${(0,wt.Sb)(parseFloat(k/100-m/100)," ",d,r.currency)}`})})]}),"61412737206"==d&&(0,f.jsx)(j.E,{fontSize:"11px",color:"#f4f4ec",children:"Tax included. Free shipping on all orders."})]})})}var ie=i(4418);function ne(t){var e,i;const[o]=(0,v.QN)("whatmorePrimaryFont"),[r]=(0,v.QN)("whatmoreShopId"),{setShowOptionsChart:l}=(0,n.useContext)(se),[a,d]=(0,n.useState)({}),[u]=(0,v.QN)("whatmoreUITheme"),h=(0,v.Xd)("whatmoreSecondaryColorShade300"),x=t.setSelectedColor,m=t.selectOptionFirstHandler,g=t.selectOptionSecondHandler,w=t.selectOptionThirdHandler,b=t.isVariantAvailable,C=t.FONT_SIZE,S=t.data,k=(t,e,i)=>{if(2==i)d((i=>({...i,[t]:e})));else if(1==i)d((i=>{var n,o,r,l;return{...i,[t]:e,[null===S||void 0===S||null===(n=S.options)||void 0===n||null===(o=n[2])||void 0===o?void 0:o.name]:null===S||void 0===S||null===(r=S.variants)||void 0===r||null===(l=r.find((t=>(null===t||void 0===t?void 0:t.option2)==e)))||void 0===l?void 0:l.option3}}));else{var n,o;const i=null===S||void 0===S||null===(n=S.variants)||void 0===n||null===(o=n.find((t=>(null===t||void 0===t?void 0:t.option1)==e)))||void 0===o?void 0:o.option2;d((n=>{var o,r,l,a,d,s,c,u;return{...n,[null===S||void 0===S||null===(o=S.options)||void 0===o||null===(r=o[1])||void 0===r?void 0:r.name]:null===S||void 0===S||null===(l=S.variants)||void 0===l||null===(a=l.find((t=>(null===t||void 0===t?void 0:t.option1)==e)))||void 0===a?void 0:a.option2,[null===S||void 0===S||null===(d=S.options)||void 0===d||null===(s=d[2])||void 0===s?void 0:s.name]:null===S||void 0===S||null===(c=S.variants)||void 0===c||null===(u=c.find((t=>(null===t||void 0===t?void 0:t.option2)==i)))||void 0===u?void 0:u.option3,[t]:e}}))}};return(0,n.useEffect)((()=>{d((t=>{var e,i,n,o,r,l,a,d,s,c,u,h;return{...t,[null===S||void 0===S||null===(e=S.options)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.name]:null===S||void 0===S||null===(n=S.variants)||void 0===n||null===(o=n.find((t=>{var e,i,n;return(null===S||void 0===S||null===(e=S.options)||void 0===e||null===(i=e[0])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option1))&&(null===t||void 0===t?void 0:t.available)})))||void 0===o?void 0:o.option1,[null===S||void 0===S||null===(r=S.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name]:null===S||void 0===S||null===(a=S.variants)||void 0===a||null===(d=a.find((t=>{var e,i,n;return(null===S||void 0===S||null===(e=S.options)||void 0===e||null===(i=e[1])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option2))&&(null===t||void 0===t?void 0:t.available)})))||void 0===d?void 0:d.option2,[null===S||void 0===S||null===(s=S.options)||void 0===s||null===(c=s[2])||void 0===c?void 0:c.name]:null===S||void 0===S||null===(u=S.variants)||void 0===u||null===(h=u.find((t=>{var e,i,n;return(null===S||void 0===S||null===(e=S.options)||void 0===e||null===(i=e[2])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option3))&&(null===t||void 0===t?void 0:t.available)})))||void 0===h?void 0:h.option3}}))}),[]),(0,f.jsx)(mt.s,{direction:"row",paddingLeft:"20px",paddingRight:"20px",paddingY:"10px",children:(null===S||void 0===S||null===(e=S.options)||void 0===e?void 0:e.length)>0&&(0,f.jsx)(mt.s,{direction:"column",width:"100%",gap:"4px",children:null===S||void 0===S||null===(i=S.options)||void 0===i?void 0:i.map(((e,i)=>{var n,d,v,I,_,z;return(0,f.jsx)(f.Fragment,{children:"mlveda_country"!==(null===e||void 0===e?void 0:e.name)&&((null===e||void 0===e||null===(n=e.values)||void 0===n?void 0:n.length)>1||"Colour"===(null===e||void 0===e?void 0:e.name)||(null===e||void 0===e||null===(d=e.name)||void 0===d?void 0:d.toLowerCase().includes("color"))||1==(null===e||void 0===e||null===(v=e.values)||void 0===v?void 0:v.length)&&(null===e||void 0===e?void 0:e.position)>1&&(null===e||void 0===e?void 0:e.position)==(null===S||void 0===S||null===(I=S.options)||void 0===I?void 0:I.length))&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(mt.s,{className:"wht-shn-optype",justifyContent:"space-between",alignItems:"center",children:[(0,f.jsx)(j.E,{fontSize:1*C+"px !important",sx:{color:"black",fontFamily:o+" !important",fontWeight:"bold !important"},children:null===e||void 0===e?void 0:e.name}),"Size"===e.name&&(0,p.u1b)(r)?(0,f.jsx)(mt.s,{marginTop:"4px",whiteSpace:"nowrap",cursor:"pointer",children:(0,f.jsx)(j.E,{fontSize:.7*C,as:"u",sx:{color:"black !important",fontFamily:o+" !important"},onClick:()=>{null!==l&&l(!0)},children:(0,p.A5I)(r)})}):(0,f.jsx)(f.Fragment,{})]}),(0,f.jsx)(ie.z,{spacing:0,flexWrap:"wrap",alignContent:"flex-start",alignItems:"center",justifyContent:"flex-start",children:null===e||void 0===e||null===(_=e.values)||void 0===_?void 0:_.map((n=>{var l,d,s,v,I,_,z,E,T,N;const F=b(n,i),A=0==i||S.variants.find((t=>{var e,o;return t[`option${i}`]==(null===(e=Object.entries(a))||void 0===e||null===(o=e[i-1])||void 0===o?void 0:o[1])&&t[`option${i+1}`]==n}));return("Colour"===(null===e||void 0===e?void 0:e.name)||null!==e&&void 0!==e&&null!==(l=e.name)&&void 0!==l&&l.toLowerCase().includes("color"))&&A&&((null===t||void 0===t||null===(d=t.finalArr)||void 0===d?void 0:d.length)>0&&(null===t||void 0===t||null===(s=t.finalArr)||void 0===s||!s.includes(null))||(null===t||void 0===t||null===(v=t.finalArrExternal)||void 0===v?void 0:v.length)>0)?(0,f.jsx)(f.Fragment,{children:(0,f.jsx)(mt.s,{paddingBottom:"8px",px:"2px",paddingRight:"8px",children:(0,f.jsx)(c.az,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px",borderRadius:(0,p.tM2)(r),size:"sm",border:a[null===e||void 0===e?void 0:e.name]===n?`2px solid ${(0,p.Usu)(r)} !important`:"",cursor:"pointer",width:"fit-content !important",onClick:()=>{k(null===e||void 0===e?void 0:e.name,n,i),x(n),0===i&&m(n),1===i&&g(n),2===i&&w(n)},children:(0,f.jsx)(y._,{padding:"2px",borderRadius:(0,p.tM2)(r),width:"58px",height:"58px",src:(0,gt.b)(null!==(I=null===t||void 0===t||null===(_=t.finalArr)||void 0===_||null===(z=_.find((t=>(null===t||void 0===t?void 0:t.color)==n)))||void 0===z?void 0:z.src)&&void 0!==I?I:null===t||void 0===t||null===(E=t.finalArrExternal)||void 0===E||null===(T=E.find((t=>(null===t||void 0===t?void 0:t.color)==n)))||void 0===T?void 0:T.optionsrc,"?width=400&height=400")})})},n)}):A&&(0,f.jsx)(mt.s,{className:"wht-shn-opt",paddingBottom:"8px",paddingRight:"8px",children:(0,f.jsx)(J.$,{isDisabled:!F,size:"sm",borderRadius:"round"==u?"5px":0,bg:a[null===e||void 0===e?void 0:e.name]===n&&F?(null!==(N=(0,p.j2L)(r))&&void 0!==N?N:h)+" !important":(0,p.R25)(r)+" !important",width:"fit-content !important",height:"fit-content !important",style:{padding:"4px 8px"},onClick:()=>{"76408193304"!=r||"Size"!=(null===e||void 0===e?void 0:e.name)||"Customize"!=n?(k(null===e||void 0===e?void 0:e.name,n,i),0===i&&m(n),1===i&&g(n),2===i&&w(n)):window.location.href=t.product.product_link},children:(0,f.jsx)(j.E,{as:F?"p":"s",textDecoration:F?"none":"line-through",fontSize:.9*C+"px !important",sx:{fontFamily:o+" !important",fontWeight:"normal !important",color:a[null===e||void 0===e?void 0:e.name]===n&&F?(0,p.L7T)(r)+" !important":(0,p.Egc)(r)+" !important"},children:n})})},n)}))}),i===(null===S||void 0===S||null===(z=S.options)||void 0===z?void 0:z.length)-1&&(0,f.jsx)(s.o,{paddingTop:"8px",width:"100%",children:(0,f.jsx)(xt.c,{color:t.dividerColor,size:"xs"})})]})})}))})})}var oe=i(8385);function re(t){var e,i,o,r,l,a,d,u,h,m,g,w,j,b,C,S,I,_,z,E,T;const[N,F,A,P]=(0,x.A)();var L=.4*P*.8,B=L*(16/9)*.6*.8;const O=1.1*L,D=O*(16/9)*.8;var W=.12*L;const[V,Q]=(0,n.useState)(!1),M=t.data,H=t.event,U=t.product,X=t.setOpenShopNow,Y=t.setLockSwiper,[$,q]=(0,n.useState)({});(0,n.useEffect)((()=>{q((t=>{var e,i,n,o,r,l,a,d,s,c,u,h;return{...t,[null===M||void 0===M||null===(e=M.options)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.name]:null===M||void 0===M||null===(n=M.variants)||void 0===n||null===(o=n.find((t=>{var e,i,n;return(null===M||void 0===M||null===(e=M.options)||void 0===e||null===(i=e[0])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option1))&&(null===t||void 0===t?void 0:t.available)})))||void 0===o?void 0:o.option1,[null===M||void 0===M||null===(r=M.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name]:null===M||void 0===M||null===(a=M.variants)||void 0===a||null===(d=a.find((t=>{var e,i,n;return(null===M||void 0===M||null===(e=M.options)||void 0===e||null===(i=e[1])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option2))&&(null===t||void 0===t?void 0:t.available)})))||void 0===d?void 0:d.option2,[null===M||void 0===M||null===(s=M.options)||void 0===s||null===(c=s[2])||void 0===c?void 0:c.name]:null===M||void 0===M||null===(u=M.variants)||void 0===u||null===(h=u.find((t=>{var e,i,n;return(null===M||void 0===M||null===(e=M.options)||void 0===e||null===(i=e[2])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option3))&&(null===t||void 0===t?void 0:t.available)})))||void 0===h?void 0:h.option3}}))}),[]);const K=(t,e)=>{var i,n,o,r,l,a,d,s,c,u;if(null===M||void 0===M||null===(i=M.options)||void 0===i||!i.length)return!1;const h=null===M||void 0===M||null===(n=M.options)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.name,p=null===M||void 0===M||null===(r=M.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name;null===M||void 0===M||null===(a=M.options)||void 0===a||null===(d=a[2])||void 0===d||d.name;switch(null===M||void 0===M||null===(s=M.options)||void 0===s?void 0:s.length){case 1:return null===M||void 0===M||null===(c=M.variants)||void 0===c?void 0:c.some((e=>e.option1===t&&e.available));case 2:var v;return 0===e?null===M||void 0===M||null===(v=M.variants)||void 0===v?void 0:v.some((e=>e.option1===t&&e.available)):null===M||void 0===M||null===(u=M.variants)||void 0===u?void 0:u.some((e=>e.option2===t&&e.option1===$[h]&&e.available));case 3:var x,m,g;if(0===e)return null===M||void 0===M||null===(x=M.variants)||void 0===x?void 0:x.some((e=>e.option1===t&&e.available));if(1===e)return null===M||void 0===M||null===(m=M.variants)||void 0===m?void 0:m.some((e=>e.option2===t&&e.option1===$[h]&&e.available));if(2===e)return null===M||void 0===M||null===(g=M.variants)||void 0===g?void 0:g.some((e=>e.option3===t&&e.option1===$[h]&&e.option2===$[p]&&e.available));default:return!1}},[G,Z]=(0,n.useState)((()=>{var t,e;for(let r=0;r<(null===M||void 0===M||null===(i=M.variants)||void 0===i?void 0:i.length);r++){var i,n,o;const t=null===M||void 0===M||null===(n=M.variants)||void 0===n||null===(o=n[r])||void 0===o?void 0:o.option1;if(t&&K(t,0))return t}return(null===M||void 0===M||null===(t=M.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.option1)||""})),[J,tt]=(0,n.useState)((()=>{var t,e;for(let r=0;r<(null===M||void 0===M||null===(i=M.variants)||void 0===i?void 0:i.length);r++){var i,n,o;const t=null===M||void 0===M||null===(n=M.variants)||void 0===n||null===(o=n[r])||void 0===o?void 0:o.option2;if(t&&K(t,1))return t}return(null===M||void 0===M||null===(t=M.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.option2)||""})),[et,it]=(0,n.useState)((()=>{var t,e;for(let r=0;r<(null===M||void 0===M||null===(i=M.variants)||void 0===i?void 0:i.length);r++){var i,n,o;const t=null===M||void 0===M||null===(n=M.variants)||void 0===n||null===(o=n[r])||void 0===o?void 0:o.option3;if(t&&K(t,2))return t}return(null===M||void 0===M||null===(t=M.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.option3)||""})),[nt,ot]=(0,n.useState)(),[rt,lt]=(0,n.useState)(1),[st,ct]=(0,n.useState)(),[ut,ht]=(0,n.useState)(0),[pt,vt]=(0,n.useState)(!1),[ft,wt]=(0,n.useState)(!1),[jt,yt]=(0,n.useState)(U.thumbnail_image),bt=(0,v.Xd)("whatmoreUITheme"),Ct=(0,v.Xd)("whatmoreShopId"),St=(0,n.useCallback)((t=>{Z(t)}),[]),kt=(0,n.useCallback)((t=>{tt(t)}),[]),It=(0,n.useCallback)((t=>{it(t)}),[]);(0,n.useEffect)((()=>{var t,e;const i=le(M,G,J,et);ot(null!==i&&void 0!==i?i:null===M||void 0===M||null===(t=M.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.id),ct(ae(M,i)),lt(1),wt(!1);const n=de(M,i);null!==n&&yt(n)}),[G,J,et]),(0,n.useEffect)((()=>{var t,e;const i=void 0===nt?null===M||void 0===M||null===(t=M.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.price:ae(M,nt);ct(i*rt)}),[rt]),(0,n.useEffect)((()=>{function t(t){const e=document.getElementById("whatmore-shopnow-view"),i=document.getElementById("whatmore-size-chart");i&&i.contains(t.target)||!e||e.contains(t.target)||(X(!1),Y(!1))}function e(t){t.stopPropagation(),i.scrollTop+=t.deltaY}document.addEventListener("click",t);const i=document.getElementById("whatmore-shopnow-view");return null===i||void 0===i||i.addEventListener("wheel",e),()=>{document.removeEventListener("click",t),i.removeEventListener("wheel",e)}}),[]),(0,n.useEffect)((()=>{const t=async function(t,e){return"shopify"==t?(0,dt.Lt)():(0,at.Ii)(e)}((0,p.NCy)(Ct),Ct);t.then((t=>t.json())).then((t=>{ht(t.item_count)})).catch((t=>{console.error("Cart Add Error:",t)}))}),[pt]);const _t=`${k.i7`
124
124
  0% {
125
125
  transform: translateY(100%);
126
126
  }
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[774,907],{22:function(e,t,n){n.d(t,{$S:function(){return d},_:function(){return i},b4:function(){return r},dl:function(){return o},nN:function(){return s},tn:function(){return c},vF:function(){return a}});const i="device_type",o="device_mode",r="mobile",a="tablet",d="desktop",c="portrait",s="landscape"},69:function(e,t,n){n.d(t,{Ij:function(){return r},bi:function(){return a}});let i,o=!1;function r(){return i?i.play().then((()=>{o=!0,console.debug("iOS autoplay restrictions bypassed."),i.pause()})).catch((e=>{console.error("Failed to bless videos:",e.message)})):Promise.reject(new Error("Blessing video not initialized."))}function a(){i||(i=document.createElement("video"),i.src="https://whatmore-other-assets.b-cdn.net/whatmore/dummy_for_video_pool_3s_muted_11kb.mp4",i.muted=!0,i.playsInline=!0,i.style.display="none",document.body.appendChild(i));const e=()=>{o||r()};document.addEventListener("click",e,{once:!0}),document.addEventListener("touchstart",e,{once:!0})}},932:function(e,t,n){var i=n(5830),o=n(1941),r=n(22),a=n(1348);t.A=function(e){const[t,n,d]=(0,o.A)(),[c]=(0,i.QN)("whatmoreLandscapePadding"),[s]=(0,i.QN)("whatmoreShopId"),[l]=(0,i.QN)("whatmoreVideoTileSize"),[u]=(0,i.QN)("whatmoreVideoTileSizePortrait"),p=d>=1025,v="portrait"==t?u:l,h=!("portrait"!=t||!(d>=481)),m=v/100*1.3*.5,f=v/100;var w=Math.min(d,n),[g,_,x,b]=[.6*w*(16/9),.6*w,1.4,0];function y(e){return Math.round(10*e)/10}var E={DEVICE_TYPE:r.b4,DEVICE_MODE:r.tn};if(p){const e=_*m,t=g*m;[g,_,x,b]=[t,e,(d-2*c-2*(0,a.$du)(s))/(1.1*e),c],E[r._]=r.$S,E[r.dl]=r.nN}else if(h){var S=.8*_,I=.8*g;"portrait"==t?(S*=f,I*=f,[g,_,x,b]=[I,S,y(d/(1.2*S)),0],E[r._]=r.vF,E[r.dl]=r.tn):([g,_,x,b]=[I,S,(d-2*c)/(1.1*S),c],E[r._]=r.vF,E[r.dl]=r.nN)}else{S=_,I=g;"portrait"==t?(S=S*f*.9,I=I*f*.9,[g,_,x,b]=[I,S,y(d/(1.15*S)),0],E[r._]=r.b4,E[r.dl]=r.tn):(S=.7*_,I=.7*g,[g,_,x,b]=[I,S,(d-2*c)/(1.1*S),c],E[r._]=r.b4,E[r.dl]=r.nN)}return[g,_,x,b,E]}},1351:function(e,t,n){n.d(t,{PG:function(){return d},kz:function(){return c},UM:function(){return l},yP:function(){return u},DG:function(){return s}});var i=n(1348),o=n(6157);function r(e,t,n={},i){var r;const a=d[e];if(!a)return;const c=a.isActionEnabled(),s=null===i||void 0===i||null===(r=i.meta_actions)||void 0===r?void 0:r[a.customAction];(c||s)&&"function"==typeof fbq&&(async()=>{const i={id:null===t||void 0===t?void 0:t.client_product_id,product_url:null===t||void 0===t?void 0:t.product_link,...e===o.O.VIDEO_PLAYBACK&&{watch_time:n.watch_time,video_duration:n.video_duration}};fbq("trackCustom",a.action,i),s&&setTimeout((()=>{null===s||void 0===s||s.forEach((e=>{fbq("trackCustom",e,i)}))}),500)})()}var a=n(7145);const d={[o.O.EVENT_VIEW]:{isActionEnabled:i.NFF,action:"whatmore_video_click_event",customAction:"video_clicked"},[o.O.VIDEO_PLAYBACK]:{isActionEnabled:i.Eel,action:"whatmore_video_watch_event",customAction:"video_watched"},[o.O.VIDEO_LIKED]:{isActionEnabled:i.Mz3,action:"whatmore_video_like_event",customAction:"video_liked"},[o.O.VIDEO_SHARE_CTA_CLICKED]:{isActionEnabled:i.OLZ,action:"whatmore_video_share_event",customAction:"video_shared"},[o.O.SHOPNOW_ATC_CLICKED]:{isActionEnabled:i.T9r,action:"whatmore_video_atc_event",customAction:"video_atc_clicked"},[o.O.PRODUCT_TILE_ATC_CLICKED]:{isActionEnabled:i.T9r,action:"whatmore_video_atc_event",customAction:"video_atc_clicked"},[o.O.SHOPNOW_CLICKED]:{isActionEnabled:i.nEf,action:"whatmore_product_tile_click_event",customAction:"video_product_tile_clicked"},[o.O.PRODUCT_TILE_SHOPNOW_CLICKED]:{isActionEnabled:i.nEf,action:"whatmore_product_tile_click_event",customAction:"video_product_tile_clicked"}};function c({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:c}){var s;(0,a.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:c}),e in d&&r(e,null!==(s=null===o||void 0===o?void 0:o[1])&&void 0!==s?s:null===o||void 0===o?void 0:o[0],t,i)}function s({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:c}){var s;(0,a.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:c}),e in d&&r(e,null!==(s=null===o||void 0===o?void 0:o[1])&&void 0!==s?s:null===o||void 0===o?void 0:o[0],t,i)}function l({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:r}){(0,a.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:r})}function u({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:r}){(0,a.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:r})}},3330:function(e,t,n){n.d(t,{initializeGA:function(){return p},sendVideoViewEventToGA:function(){return v}});var i,o=n(2595),r=n(7732),a=n(1348);const d="Whatmore Video Shopping",c=null!==(i="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==i&&i,s={video_view:"Video View",add_to_cart:"Add to Cart",buy_now:"Buy Now"},l={carousel:"Carousel",stories:"Stories",video_popup:"Video Popup"},u={homepage:"Home Page",product_page:"Product Page"};async function p(e){if((0,a.M$H)(e)&&null!==(0,a.xIo)(e)&&(r.Ay.initialize((0,a.xIo)(e)),c&&console.debug("Whatmore: initialized GA4")),(0,a.B6P)(e)&&null!==(0,a.jWS)(e)){const t=(0,a.Gc6)(e);o.Ay.initialize((0,a.jWS)(e),{useExistingGa:t}),c&&console.debug("Whatmore: initialized GA3")}}async function v(e,t,n){(0,a.B6P)(e)&&null!==(0,a.jWS)(e)&&(o.Ay.event({category:d,action:s.video_view,label:u[t]+":"+l[n]}),c&&console.debug("Whatmore: pushed view event to GA3")),(0,a.M$H)(e)&&null!==(0,a.xIo)(e)&&(r.Ay.event({category:d,action:s.video_view+":"+u[t]+":"+l[n],value:1,nonInteraction:!1}),c&&console.debug("Whatmore: pushed view event to GA4"))}},3389:function(e,t,n){n.r(t);var i=n(9950),o=n(1348),r=n(964),a=n(5830),d=n(140),c=n(4533),s=n(5901),l=n(1085),u=n(6613),p=n(3330),v=(n(3262),n(572)),h=n(8603),m=n(2039),f=n(4833),w=n(5551),g=n(1351),_=n(6157),x=n(2979),b=n(6641),y=n(8945),E=n(9821),S=n(69),I=n(4414);const A=(0,h.A)({key:"whatmore-css-ppv"}),j=i.lazy((()=>Promise.all([n.e(304),n.e(946),n.e(437),n.e(451),n.e(987),n.e(669),n.e(413),n.e(592)]).then(n.bind(n,6413)))),P=i.lazy((()=>n.e(374).then(n.bind(n,5100))));function L(e){return e.split(/[?#]/)[0]}t.default=function(e){const[t,n]=(0,i.useState)(),[h,C]=(0,i.useState)(),[N]=(0,a.QN)("isInDesignMode"),[T]=(0,a.QN)("isDemoBrand"),[O]=(0,a.QN)("whatmoreEmbedAppUseVariant"),[D,k]=(0,i.useState)(-2),[z]=(0,a.QN)("whatmoreVariantId"),[V]=(0,a.QN)("whatmoreShopId");var[M]=(0,a.QN)("whatmoreProductId");const Q=(0,a.Xd)("isLandingSharedLink"),W=(0,a.Xd)("whatmoreShareTemplateId"),R=(0,a.Xd)("whatmoreShareEventId"),F=Q&&"template-embed"===(0,f.Mm)(W),[B,$]=(0,i.useState)(F);M=(0,o.BcY)(V)?function(e){if("STRR72TX6AT"==e){var t;const e=null===(t=window.location.pathname)||void 0===t?void 0:t.split("/");return e[e.length-1]}return"STR6HARJ3QY"==e?L(window.location.href).split("/").pop():L(window.location.href)}(V):M;const[G,H]=(0,i.useState)((()=>"true"===O?z:M));var K=r.$$+"/v2/brand/"+V+"/product-events";const{whatmoreWidgetSourceDetails:U}=(0,i.useContext)(w.B);(0,i.useEffect)((()=>{(0,p.initializeGA)(V),(0,b.Fk)("Video shopping powered by Whatmore!"),(0,c.wm)()}),[]),(0,i.useEffect)((()=>{null==t||0==t.length||h||!(0,u.MN)()||(0,a.Xd)("whatmoreVideoPlayerPoolInitiated")||((0,E._)()?(0,l.Pc)(l.F5):(0,S.bi)())}),[t]),(0,i.useEffect)((()=>{if(k(-1),(0,o.WH1)(V)){const e=`${r.$$}/v2/brand/${V}/product-events/recommendation`,t=(0,o.buK)(V);fetch(`${e}?client_product_id=${G}&limit=10&recommended=${!t}&origin=${window.location.hostname}&status=live,upcoming&event_type=video`).then((e=>e.json())).then((e=>{const i=null===e||void 0===e?void 0:e.events;if((null===i||void 0===i?void 0:i.length)>0){var o;const r=t?null===e||void 0===e?void 0:e.all_events:null===e||void 0===e||null===(o=e.related_events)||void 0===o?void 0:o.map((e=>({...e,isRelatedEvent:!0})));n([...i,...r])}else n([])})).catch((e=>C(e.message)))}else fetch(K.toString()+"?client_product_id="+G.toString()+"&status="+"upcoming".toString()+"&event_type=video").then((e=>e.json())).then((e=>e.events)).then((e=>(null!=e&&0!=e.length&&(0,o.vfi)(V)&&(0,o.YOR)(e),n(e),e))).then((e=>((0,o.Uht)(V)&&function(e,t){setTimeout((async()=>{const n=e.reduce(((e,t)=>[...e,...t.products]),[]).filter((e=>e.client_product_id==t))[0];if(!n||n.product_link==L(window.location.href))return;const i={product_id:n.product_id,product_link:L(window.location.href)};fetch(r.$$+"/product",{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)})}),500)}(e,G),e))).catch((e=>{C(e.message)}))}),[G]),(0,i.useEffect)((()=>{var e,n;k(-2),(t&&t.length>0||(0,o.WKl)(V))&&(0,g.yP)({userInteractionType:_.O.PDP_VISITED,widgetSourceDetails:U,event:null===t||void 0===t?void 0:t[0],productList:null===t||void 0===t||null===(e=t[0])||void 0===e?void 0:e.products,ctaList:null===t||void 0===t||null===(n=t[0])||void 0===n?void 0:n.cta})}),[t]),(0,i.useEffect)((()=>{const e=L(window.location.href);let t=history.pushState;history.pushState=function(){let e=t.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),e};let n=history.replaceState;history.replaceState=function(){let e=n.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),e},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))})),window.addEventListener("locationchange",(function(){if("24950997070"==V&&window.location.origin+window.location.pathname!=e&&fetch(window.location.origin+window.location.pathname+".json").then((e=>e.json())).then((e=>{var t;return H(null===e||void 0===e||null===(t=e.product)||void 0===t?void 0:t.id)})),"true"===O){const e=function(e){for(var t=window.location.search.substring(1).split("&"),n=0;n<t.length;n++){var i=t[n].split("=");if(i[0]==e)return i[1]}return!1}("variant");e&&""!==e&&H(e)}}))}),[]),(0,i.useEffect)((()=>{if(null!=t&&0!==t.length&&!h&&F&&((0,y.H)("whatmore-video-player",(()=>{$(!1)})),null!=R)){const e=t.find((e=>R==e.event_id));if(e)return void q(e,!0,t.indexOf(e))}}),[t]);const Y=U.landingLocationType,X=U.templateType,q=async(e,t=!1,n=0)=>{if((0,u.MN)()&&!t&&await((0,E._)()?(0,l.bo)():(0,S.bi)()),(0,m.ij)(e)||(0,m.Il)(e))return N||T||(async()=>{const t=(0,f.Wd)(Y)+(0,f.gf)(X)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,d.lB)(e),(0,p.sendVideoViewEventToGA)(V,r.DK,r.K1),(0,c.Ch)(e.event_id,e.products,"product_page","video_popup",t)})(),void k(n)};function J(){return(0,I.jsx)(I.Fragment,{})}return null==t||0==t.length||h||(0,f.Ig)(U.templateType)?(0,I.jsx)("div",{}):(0,I.jsxs)(v.C,{value:A,children:[B&&(0,I.jsx)(P,{}),"no-product"===G||-1===D||0===t.length?(0,I.jsx)(J,{}):-2===D&&t.length>0?(0,I.jsx)("div",{children:(0,I.jsx)(x.S,{userInteractionType:_.O.PDP_POPUP_WIDGET_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!N&&!T,children:(0,I.jsx)(s.A,{event:t[0],inVideoClick:q,closeClick:e=>{var n;e.stopPropagation(),k(-1),(0,g.kz)({userInteractionType:_.O.PDP_POPUP_CLOSED,widgetSourceDetails:U,event:null===t||void 0===t?void 0:t[0],productList:null===t||void 0===t||null===(n=t[0])||void 0===n?void 0:n.products})}})})}):(0,I.jsx)("div",{children:(0,I.jsx)(i.Suspense,{children:(0,I.jsx)(x.S,{userInteractionType:_.O.EVENT_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!N&&!T,children:(0,I.jsx)(j,{events:t,index:D,onBack:function(){k(-2),$(!1)},template:"template-product-page"})})})})]})}},5901:function(e,t,n){n.d(t,{A:function(){return w}});var i=n(1005),o=n(9950),r=n(9879),a=n(22),d=n(5830),c=n(932);var s=function(e){const[t,n,i,o,r]=(0,c.A)(),[s]=(0,d.QN)("whatmoreEmbedAppVideoPlayerSizePortrait"),[l]=(0,d.QN)("whatmoreEmbedAppVideoPlayerSizeLandscape"),u=r[a.dl]===a.nN?l/100:s/100*1.2;return[t*u,n*u,r]},l=n(5727),u=n(1628),p=n.n(u),v=n(2209),h=n(6702),m=(n(9733),n(4365),n(1348)),f=n(4414);var w=function(e){var t;const n=o.useRef(null);var[c,u,w]=s();const g=(0,d.Xd)("whatmoreUITheme"),[_]=(0,d.QN)("whatmoreEmbedAppVideoTitle"),[x]=(0,d.QN)("whatmoreEmbedAppPositionPortrait"),[b]=(0,d.QN)("whatmoreEmbedAppHorizontalPaddingPortrait"),[y]=(0,d.QN)("whatmoreEmbedAppVerticalPaddingPortrait"),[E]=(0,d.QN)("whatmoreEmbedAppPositionLandscape"),[S]=(0,d.QN)("whatmoreEmbedAppHorizontalPaddingLandscape"),[I]=(0,d.QN)("whatmoreEmbedAppVerticalPaddingLandscape"),A=(0,d.Xd)("whatmoreShopId"),j=(0,d.Xd)("isWhatmorePreviewMode");var P=x,L=b,C=y;w[a.dl]===a.nN&&(P=E,L=S,C=I);const[N,T]=(0,o.useState)(["initial",window.pageYOffset]),[O,D]=(0,o.useState)(!1),k=null!==(t=e.isSpotlight)&&void 0!==t&&t,z=w[a.dl]===a.nN?.7*(0,m.O86)(A):(0,m.O86)(A),V=k?z:1;c*=V,u*=V;const M=k?(0,m.LrK)(A):P,Q=k?(0,m._2D)(A):(0,m.GSq)(A),[W,R]=(0,o.useState)(!k&&(0,m.n8Q)(A));function F(e,t){T(e),e[1]<=100?D(!1):t!=O&&(D(t),R(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const n=()=>{const n=window.pageYOffset;Math.abs(n-e)<100||(F([n>e?"scrolled-down":"scrolled-up",n],!0),e=n>0?n:0),t=!1},i=()=>{t||(window.requestAnimationFrame(n),t=!0)};return window.addEventListener("scroll",i),()=>window.removeEventListener("scroll",i)}),[N]),(0,i.j)({ref:n,handler:()=>{F(["scrolled-up",N[1]],!0)}});const B=e.event,$=e.inVideoClick,G=e.closeClick,H=.3*u,K=.6*u,U=.1*u,Y=.1*(.5*u),X="round"==g?"10px":"0px",q=(0,m.GvQ)(A);var J=!1,Z=0,ee=0;function te(e){J=e}return(0,f.jsx)("div",{className:"wht-popup",children:W&&!Q?(0,f.jsx)(f.Fragment,{}):O&&Q?(0,f.jsx)("div",{style:"left"===M?{left:"1px",bottom:k?(0,m.pUQ)(A)+"px":C+"px",position:"fixed",zIndex:q}:{right:"5px",bottom:k?(0,m.pUQ)(A)+"px":C+"px",position:"fixed",zIndex:q},children:(0,f.jsxs)("div",{onClick:()=>{F(["initial",N[1]],!1)},style:{margin:"1px",width:u+"px",height:c+"px"},className:"left"===M?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,f.jsx)("div",{style:{overflow:"hidden"},children:(0,f.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,f.jsx)(r.A,{url:B.thumbnail_image,isPlaying:!1,event:B})})}),(0,f.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,f.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,f.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,f.jsx)(v.A,{sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:H+"px"},style:{position:"relative",zIndex:1,left:Y+"px",bottom:Y+"px"},onClick:G})})}),(0,f.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,f.jsx)(h.A,{sx:{color:"white",fontSize:2*H+"px",filter:"drop-shadow(0 0 2px black);"}})})]})})]})}):(0,f.jsx)(p(),{nodeRef:n,cancel:".activate-button,.close-btn",bounds:j?"parent":"html",defaultClassName:"whatmore-react-draggable",defaultClassNameDragging:"whatmore-react-draggable-dragging",defaultClassNameDragged:"whatmore-react-draggable-dragged",onStart:(e,t)=>{var n,i;n=t.x,i=t.y,Z=n,ee=i},onDrag:(e,t)=>{te(!0)},onStop:(e,t)=>{J&&(Math.abs(t.x-Z)>5||Math.abs(t.y-ee)>5)?te(!1):$(B)},children:(0,f.jsx)("div",{ref:n,style:"left"===M?{left:k?(0,m.D2A)(A)+"px":L+"px",bottom:k?(0,m.pUQ)(A)+"px":C+"px",position:"fixed",zIndex:q}:{right:k?(0,m.D2A)(A)+"px":L+"px",bottom:k?(0,m.pUQ)(A)+"px":C+"px",position:"fixed",zIndex:q},children:(0,f.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:e.isSpotlight&&"60122562760"==A?c+"px":u+"px",height:e.isSpotlight&&"60122562760"==A?u+"px":c+"px"}),className:"left"===M?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,f.jsx)("div",{style:{overflow:"hidden",position:"relative"},children:(0,f.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:e.isSpotlight&&"60122562760"==A?16/9:9/16},children:(0,f.jsx)(r.A,{url:B.thumbnail_image,isMuted:!0,isPlaying:!0,event:B})})}),(0,f.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,f.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,f.jsx)(v.A,{className:"close-btn",sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:H+"px"},onClick:G,style:{position:"relative",zIndex:1,left:U+"px",bottom:U+"px"}})}),(0,f.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,f.jsx)(l.A,{sx:{color:(0,m.KFN)(A),fontSize:K+"px",filter:"drop-shadow(0 0 2px black);"}})}),(0,f.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:X,borderBottomRightRadius:X,backgroundImage:_?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))":""},children:(0,f.jsxs)("p",{style:{textAlign:"center",color:"white",fontFamily:"Sans-serif",fontWeight:"semi-bold",fontSize:.4*H+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",_]})})]})})]})})})})}},6649:function(e,t,n){var i=n(9950);t.A=({triggerOnce:e=!1,root:t=null,rootMargin:n="0px",threshold:o=0}={})=>{const[r,a]=(0,i.useState)(!1),[d,c]=(0,i.useState)(null),s=(0,i.useRef)(null);return(0,i.useEffect)((()=>{const i=new IntersectionObserver(((t,n)=>{t.forEach((t=>{c(t),t.isIntersecting?(a(!0),e&&n.disconnect()):e||a(!1)}))}),{root:t,rootMargin:n,threshold:o});return s.current&&i.observe(s.current),()=>{i.disconnect()}}),[e,t,n,o]),[s,r,d]}},8945:function(e,t,n){function i(e,t){let n=0;let i=new MutationObserver((function(){document.querySelector("."+e)?(t(),i.disconnect()):0==n&&(n=1,setTimeout((()=>{t(),i.disconnect()}),8e3))}));i.observe(document.body,{childList:!0,subtree:!0})}n.d(t,{H:function(){return i}})},9733:function(){}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[199],{1351:function(e,t,n){n.d(t,{PG:function(){return r},kz:function(){return s},UM:function(){return d},yP:function(){return u},DG:function(){return c}});var i=n(1348),o=n(6157);function l(e,t,n={},i){var l;const a=r[e];if(!a)return;const s=a.isActionEnabled(),c=null===i||void 0===i||null===(l=i.meta_actions)||void 0===l?void 0:l[a.customAction];(s||c)&&"function"==typeof fbq&&(async()=>{const i={id:null===t||void 0===t?void 0:t.client_product_id,product_url:null===t||void 0===t?void 0:t.product_link,...e===o.O.VIDEO_PLAYBACK&&{watch_time:n.watch_time,video_duration:n.video_duration}};fbq("trackCustom",a.action,i),c&&setTimeout((()=>{null===c||void 0===c||c.forEach((e=>{fbq("trackCustom",e,i)}))}),500)})()}var a=n(7145);const r={[o.O.EVENT_VIEW]:{isActionEnabled:i.NFF,action:"whatmore_video_click_event",customAction:"video_clicked"},[o.O.VIDEO_PLAYBACK]:{isActionEnabled:i.Eel,action:"whatmore_video_watch_event",customAction:"video_watched"},[o.O.VIDEO_LIKED]:{isActionEnabled:i.Mz3,action:"whatmore_video_like_event",customAction:"video_liked"},[o.O.VIDEO_SHARE_CTA_CLICKED]:{isActionEnabled:i.OLZ,action:"whatmore_video_share_event",customAction:"video_shared"},[o.O.SHOPNOW_ATC_CLICKED]:{isActionEnabled:i.T9r,action:"whatmore_video_atc_event",customAction:"video_atc_clicked"},[o.O.PRODUCT_TILE_ATC_CLICKED]:{isActionEnabled:i.T9r,action:"whatmore_video_atc_event",customAction:"video_atc_clicked"},[o.O.SHOPNOW_CLICKED]:{isActionEnabled:i.nEf,action:"whatmore_product_tile_click_event",customAction:"video_product_tile_clicked"},[o.O.PRODUCT_TILE_SHOPNOW_CLICKED]:{isActionEnabled:i.nEf,action:"whatmore_product_tile_click_event",customAction:"video_product_tile_clicked"}};function s({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:s}){var c;(0,a.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:s}),e in r&&l(e,null!==(c=null===o||void 0===o?void 0:o[1])&&void 0!==c?c:null===o||void 0===o?void 0:o[0],t,i)}function c({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:s}){var c;(0,a.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:s}),e in r&&l(e,null!==(c=null===o||void 0===o?void 0:o[1])&&void 0!==c?c:null===o||void 0===o?void 0:o[0],t,i)}function d({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:l}){(0,a.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:l})}function u({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:l}){(0,a.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:l})}},3350:function(e,t,n){n.r(t),n.d(t,{default:function(){return B}});var i=n(9950),o=n(964),l=n(140),a=n(5830),r=n(1348),s=n(4533),c=n(6613),d=n(1085),u=n(5551),v=n(2039),p=n(4833),m=n(2979),h=n(6157),g=n(8945),_=n(9821),S=n(4414);const y=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(946),n.e(340),n.e(571),n.e(987),n.e(669),n.e(665)]).then(n.bind(n,7206)))),w=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(437),n.e(571),n.e(516),n.e(620),n.e(116)]).then(n.bind(n,7144)))),f=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(879),n.e(571),n.e(987),n.e(703),n.e(423)]).then(n.bind(n,517)))),I=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(879),n.e(571),n.e(987),n.e(703),n.e(412)]).then(n.bind(n,7646)))),E=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(879),n.e(571),n.e(987),n.e(703),n.e(221)]).then(n.bind(n,5451)))),x=i.lazy((()=>Promise.all([n.e(317),n.e(59),n.e(571),n.e(491)]).then(n.bind(n,4295)))),O=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(946),n.e(57),n.e(571),n.e(987),n.e(669),n.e(988),n.e(620),n.e(474)]).then(n.bind(n,6945)))),T=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(475),n.e(571),n.e(669),n.e(485)]).then(n.bind(n,9418)))),C=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(946),n.e(571),n.e(987),n.e(676)]).then(n.bind(n,3369)))),b=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(946),n.e(57),n.e(571),n.e(987),n.e(669),n.e(988),n.e(891)]).then(n.bind(n,7178)))),D=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(946),n.e(437),n.e(286),n.e(451),n.e(57),n.e(571),n.e(987),n.e(669),n.e(262),n.e(413),n.e(988),n.e(306)]).then(n.bind(n,9406)))),j=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(437),n.e(571),n.e(669),n.e(516),n.e(933)]).then(n.bind(n,6989)))),L=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(946),n.e(437),n.e(286),n.e(451),n.e(438),n.e(571),n.e(987),n.e(669),n.e(262),n.e(413),n.e(806)]).then(n.bind(n,3278)))),q=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(879),n.e(571),n.e(987),n.e(1)]).then(n.bind(n,4596)))),P=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(946),n.e(437),n.e(286),n.e(451),n.e(571),n.e(987),n.e(669),n.e(262),n.e(413),n.e(906)]).then(n.bind(n,6413)))),A=i.lazy((()=>n.e(374).then(n.bind(n,5100))));var W=function(e){var t,W;const[k]=(0,a.QN)("isInDesignMode"),[$]=(0,a.QN)("isDemoBrand"),[N]=(0,a.QN)("whatmoreTopBottomPadding"),[G]=(0,a.QN)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:V}=(0,i.useContext)(u.B),[B]=(0,a.QN)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:F}=(0,i.useContext)(u.B),M=(0,a.Xd)("isLandingSharedLink"),z=(0,a.Xd)("whatmoreShareTemplateId"),R=(0,a.Xd)("whatmoreShareStoryId"),H=(0,a.Xd)("whatmoreShareEventId"),{whatmoreWidgetSourceDetails:K,whatmoreUserInfo:J}=(0,i.useContext)(u.B),U=M&&F===(0,p.Mm)(z),[Q,X]=(0,i.useState)(U),[Z,Y]=(0,i.useState)(-1),[ee,te]=(0,i.useState)(null);let ne=e.events;const ie=e.allEvents;var oe=null;V&&!oe&&(oe=function(e){var t=e.reduce(((e,t,n)=>{var i,o=t.storyset_id;return o in e?(e[o].total_events=e[o].total_events+1,e[o].events.push(t)):e[o]={id:t.storyset_id,title:t.storyset_name,thumbnail_image:t.storyset_thumbnail_image,total_events:1,start_event_index:n,storyset_dynamic_thumbnail:null!==(i=null===t||void 0===t?void 0:t.storyset_dynamic_thumbnail)&&void 0!==i&&i,events:[t]},e}),{}),n=Object.values(t);return n.sort(((e,t)=>e.start_event_index-t.start_event_index)),n}(ne));const le=K.landingLocationType,ae=K.templateType;function re(e,t=!1,i=null){(0,c.MN)()&&(0,_._)()&&!t&&(0,d.bo)(),k||$||(async()=>{const{initializeGA:t,sendVideoViewEventToGA:i}=await Promise.all([n.e(286),n.e(907)]).then(n.bind(n,3330));t();const a=oe[e].events[0],r=(0,p.Wd)(le)+(0,p.gf)(ae)+(null!==a&&void 0!==a&&a.isRelatedEvent?"R":"E")+"_"+(null===a||void 0===a?void 0:a.event_id);(0,l.lB)(a),i(B,o.TB,o.OL),(0,s.Ch)(a.event_id,a.products,"homepage","stories",r,null===a||void 0===a?void 0:a.location,null===J||void 0===J?void 0:J.userType)})();var a=0;null!=i&&oe[e].events.map(((e,t)=>{e.event_id==i&&(a=t)})),Y(a),te(e)}async function se(e,t=!1){(0,c.MN)()&&(0,_._)()&&!t&&await(0,d.bo)(),Y(e.index),((0,v.ij)(e)||(0,v.Il)(e))&&(k||$||(async()=>{const{initializeGA:t,sendVideoViewEventToGA:i}=await Promise.all([n.e(286),n.e(907)]).then(n.bind(n,3330));t();const a=(0,p.Wd)(le)+(0,p.gf)(ae)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,l.lB)(e),i(B,o.TB,o.Dk),(0,s.Ch)(e.event_id,e.products,"homepage","carousel",a)})())}function ce(e){return(0,S.jsx)(S.Fragment,{})}return(0,i.useEffect)((()=>{if(U)if((0,g.H)("whatmore-video-player",(()=>{X(!1)})),null!=R&&V){const e=oe.find((e=>R==e.id));if(e)return void re(oe.indexOf(e),!0,H)}else if(null!=H){const e=ne.find((e=>H==e.event_id));if(e)return void se(e,!0)}}),[]),(0,S.jsxs)(S.Fragment,{children:[Q&&(0,S.jsx)(A,{}),-1==Z||-2==Z?(0,S.jsx)(ce,{}):(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(m.S,{userInteractionType:h.O.EVENT_VIEW,event:ne[Z],productList:null===(t=ne[Z])||void 0===t?void 0:t.products,cta:null===(W=ne[Z])||void 0===W?void 0:W.cta,triggerFlag:!k&&!$,children:(0,S.jsx)(P,{events:ie,index:Z,onBack:async function(){Y(-1),X(!1)},slideDirection:V||"horizontal"===(0,r.br0)(B)?"horizontal":"vertical",eventsStories:oe,initialStoryIndex:ee,template:F})})}),(0,S.jsx)("div",{className:"whatmore-widget-container",style:{height:"100%",marginTop:(V?G:N)+"px",marginBottom:(V?G:N)+"px"},children:"template-b"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(m.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(y,{events:ne,onClick:se,heading:e.heading})})}):"template-a-1"===F||"template-collections-a-1"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(w,{events:ne,onClick:se,heading:e.heading})}):"template-feed-a"===F||"template-collections-feed-a"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(j,{events:ne,onClick:se,heading:e.heading})}):"template-collections-a"===F||"template-c"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(m.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(f,{events:ne,index:Z,setScreen:Y,onClick:se,heading:e.heading})})}):"template-collections-b"===F||"template-d"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(m.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(I,{events:ne,index:Z,setScreen:Y,onClick:se,heading:e.heading})})}):"template-collections-c"===F||"template-e"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(m.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(E,{events:ne,index:Z,setScreen:Y,onClick:se,heading:e.heading})})}):"template-collections-d"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(m.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(y,{events:ne,index:Z,setScreen:Y,onClick:se,heading:e.heading})})}):"template-collections-e"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(m.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(O,{events:ne,index:Z,setScreen:Y,onClick:se,heading:e.heading})})}):"template-collections-stories"===F||"template-stories"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(m.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(q,{events:ne,index:Z,setScreen:Y,onClick:se,heading:e.heading})})}):"template-f"===F||"template-collections-f"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(m.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(T,{events:ne,onClick:se,heading:e.heading})})}):"template-g"===F||"template-collections-g"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(m.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(C,{events:ne,onClick:se,heading:e.heading})})}):"template-h"===F||"template-collections-h"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(m.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(b,{events:ne,onClick:se,heading:e.heading})})}):"template-i"===F||"template-collections-i"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(m.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(D,{index:Z,events:ne,onClick:se,heading:e.heading})})}):"template-banner-a"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(m.S,{userInteractionType:h.O.BANNER_WIDGET_VIEW,event:ne[0],triggerFlag:!k&&!$,children:(0,S.jsx)(L,{events:ne})})}):V?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(m.S,{userInteractionType:h.O.STORIES_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(x,{eventsStories:oe,onClick:re,template:F})})}):(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(m.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(O,{events:ne,onClick:se,heading:e.heading})})})})]})},k=n(7802),$=n(6641),N=n(1351),G=n(5873);function V(e){return e.split(/[?#]/)[0]}var B=function(e){const[t,l]=(0,i.useState)(),[v,m]=(0,i.useState)(),[g,y]=(0,i.useState)(),{whatmoreIsStoriesTemplate:w}=(0,i.useContext)(u.B),{whatmoreIsCollectionsTemplate:f}=(0,i.useContext)(u.B),{whatmoreIsBannerTemplate:I}=(0,i.useContext)(u.B),[E]=(0,a.QN)("whatmoreShopId"),[x]=(0,a.QN)("whatmoreCollectionId"),O=(0,a.Xd)("whatmoreLandingLocationType"),T=(0,a.Xd)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:C}=(0,i.useContext)(u.B),{whatmoreUserInfo:b,whatmoreIsPreviewMode:D}=(0,i.useContext)(u.B),j=(0,a.Xd)("whatmoreCollectionUrl"),[L]=(0,a.QN)("isInDesignMode"),[q]=(0,a.QN)("isDemoBrand"),P=(0,r.mJ$)(E)?(0,r.jLA)(E)?j:window.location.href.split(/[?#]/)[0]:x,[A,B]=(0,a.QN)("productRatings"),[F,M]=(0,i.useState)(!1);var z=(0,r.SOt)(E)?o.aD+"/v2/events/":o.$$+"/v2/events/",R=(0,r.SOt)(E)?o.aD+"/v3/events/":o.$$+"/v3/events/",H=(0,r.SOt)(E)?o.aD+"/v4/events/":o.$$+"/v4/events/",K=(0,r.SOt)(E)?o.aD+"/v5/events/":o.$$+"/v5/events/",J=((0,r.SOt)(E)?o.aD:o.$$,(0,r.SOt)(E)?o.aD+"/get_eventset/":o.$$+"/get_eventset/"),U=(0,r.SOt)(E)?o.aD+"/v2/collection":o.$$+"/v2/collection",Q=(0,r.SOt)(E)?o.aD+"/v3/collection":o.$$+"/v3/collection",X=(0,r.SOt)(E)?o.aD+"/v4/collection":o.$$+"/v4/collection",Z=(0,r.SOt)(E)?o.aD+"/v2/brand/"+E+"/product-events":o.$$+"/v2/brand/"+E+"/product-events",Y=e.shopId,ee="live,upcoming",te="true";return(0,i.useEffect)((()=>{null!=t&&0!=t.length&&!g&&(0,c.MN)()&&!(0,a.Xd)("whatmoreVideoPlayerPoolInitiated")&&(0,_._)()&&(0,d.Pc)(d.F5)}),[t]),(0,i.useEffect)((()=>{var e,t,i,c;if((0,s.wm)(),O.startsWith("product")){var d=(0,a.Xd)("whatmoreProductId");if(d=(0,r.BcY)(E)?function(e){return"STRQMPNF7QK"==e?encodeURIComponent(window.location.href):"STR6HARJ3QY"==e?V(window.location.href).split("/").pop():V(window.location.href)}(E):d,(0,r.vvU)(E))c=z.toString()+Y.toString()+"?status="+ee.toString()+"&is_active="+te.toString()+(w?"&template_type=stories":"");else if((0,r.WH1)(E)){c=`${c=`${o.$$}/v2/brand/${E}/product-events/recommendation`}?client_product_id=${d}&limit=10&recommended=${!(0,r.buK)(E)}&origin=${window.location.hostname}&status=live,upcoming&event_type=video`}else c=Z.toString()+"?client_product_id="+d.toString()+"&status="+ee.toString()+"&event_type=video"}else if(f||"invalid-url"!==j)c=(0,r.JwJ)(E)?`${Q.toString()}?store_id=${Y.toString()}&client_collection_id=${"index"==O&&(0,r.FKG)(E).length>0?(0,r.FKG)(E)[0]:P}`:"78232846646"==E?`${X.toString()}?store_id=${Y.toString()}&client_collection_id=${"index"==O&&(0,r.FKG)(E).length>0?(0,r.FKG)(E)[0]:P}`:`${U.toString()}?store_id=${Y.toString()}&client_collection_id=${"index"==O&&(0,r.FKG)(E).length>0?(0,r.FKG)(E)[0]:P}`;else if(I){const e=p.Jh,t=(0,p.t6)(O);c=J.toString()+Y.toString()+"?eventset_type="+e+"&source="+t+"&source_id="+E}else{var u,v,h,g;if(("72201044272"==E||"2665447536"==E&&D)&&!w)c=R.toString()+Y.toString()+"?status="+ee.toString()+"&is_active="+te.toString()+"&latitude="+(null!==(u=null===(v=JSON.parse(localStorage.getItem("_user_wh_lc")))||void 0===v?void 0:v.latitude)&&void 0!==u?u:"")+"&longitude="+(null!==(h=null===(g=JSON.parse(localStorage.getItem("_user_wh_lc")))||void 0===g?void 0:g.longitude)&&void 0!==h?h:"")+"&user_type="+(null!==b&&void 0!==b&&b.userType?"olduser":"newuser");else c=(0,r.JwJ)(E)&&!w?H.toString()+Y.toString()+"?status="+ee.toString()+"&is_active="+te.toString():"78232846646"!=E||w?z.toString()+Y.toString()+"?status="+ee.toString()+"&is_active="+te.toString()+(w?"&template_type=stories":""):K.toString()+Y.toString()+"?status="+ee.toString()+"&is_active="+te.toString()}const _=null===(e=window)||void 0===e||null===(t=e.whatmore)||void 0===t||null===(i=t.storyEvents)||void 0===i?void 0:i.events;w&&O.startsWith("index")&&"object"==typeof _&&(null===_||void 0===_?void 0:_.length)>0?(l(_),m(_),M(!0)):fetch(c).then((e=>e.json())).then((e=>{var t;if(I){const t=p.Jh;return(0,k.Po)(e,t)}return(0,r.JwJ)(E)&&(null===e||void 0===e||null===(t=e.questions)||void 0===t?void 0:t.length)>0&&(null==localStorage.getItem("_whatmore_qview_index")&&localStorage.setItem("_whatmore_qview_index",0),(0,s.d3)(null===e||void 0===e?void 0:e.questions)),(0,k.Np)(e,f||"invalid-url"!==j)})).then((e=>{var t,n;T&&console.debug("initial received events size : "+e.length);let i=[...null===e||void 0===e?void 0:e.events,...null===e||void 0===e?void 0:e.all_events];i=(0,r.xku)(E)?(0,k.d8)(i):(0,k.Zf)(i),m(i);const o=null!==(t=null===e||void 0===e||null===(n=e.events)||void 0===n?void 0:n.length)&&void 0!==t?t:0;return i.slice(0,o)})).then((e=>{if((q||L)&&(null==e||e&&0==(null===e||void 0===e?void 0:e.length))){const e=async()=>{const{eventsData:e,storiesData:t,bannerData:i}=await n.e(365).then(n.bind(n,6018));l(w?t:I?i:e)};e()}else l(e);M(!0)})).catch((e=>{y(e.message),M(!0)}))}),[]),(0,i.useEffect)((()=>{"index"===O?t&&t.length>0&&(0,N.yP)({userInteractionType:h.O.HOMEPAGE_VISITED,widgetSourceDetails:C}):"collection"===O?(t&&t.length>0||(0,r.BZ$)(E))&&(0,N.yP)({userInteractionType:h.O.COLLECTION_PAGE_VISITED,widgetSourceDetails:C}):"product"===O&&(t&&t.length>0||(0,r.WKl)(E))&&(0,N.yP)({userInteractionType:h.O.PDP_VISITED,widgetSourceDetails:C})}),[t]),F&&(null==t||0==t.length||g)&&G.Sn.forEach((e=>{var t,n,i,o;const l=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-stories-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-stories-a"]'),a=null!==(n=e.querySelector('.whatmore-template-type[data-wh="template-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-feed-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-f"]')||e.querySelector('.whatmore-template-type[data-wh="template-stories"]')||e.querySelector('.whatmore-template-type[data-wh="template-e"]')||e.querySelector('.whatmore-template-type[data-wh="template-a-1"]')||e.querySelector('.whatmore-template-type[data-wh="template-g"]')||e.querySelector('.whatmore-template-type[data-wh="template-h"]'))&&void 0!==n?n:e.querySelector('.whatmore-template-type[data="template-a"]')||e.querySelector('.whatmore-template-type[data="template-b"]')||e.querySelector('.whatmore-template-type[data="template-f"]')||e.querySelector('.whatmore-template-type[data="template-stories"]')||e.querySelector('.whatmore-template-type[data="template-e"]')||e.querySelector('.whatmore-template-type[data="template-a-1"]')||e.querySelector('.whatmore-template-type[data="template-g"]')||e.querySelector('.whatmore-template-type[data="template-h"]'),r=null!==(i=e.querySelector('.whatmore-template-type[data-wh="template-collections-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-c"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-stories"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-d"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-e"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-f"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-g"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-h"]'))&&void 0!==i?i:e.querySelector('.whatmore-template-type[data="template-collections-a"]')||e.querySelector('.whatmore-template-type[data="template-collections-b"]')||e.querySelector('.whatmore-template-type[data="template-collections-c"]')||e.querySelector('.whatmore-template-type[data="template-collections-stories"]')||e.querySelector('.whatmore-template-type[data="template-collections-e"]')||e.querySelector('.whatmore-template-type[data="template-collections-d"]')||e.querySelector('.whatmore-template-type[data="template-collections-f"]')||e.querySelector('.whatmore-template-type[data="template-collections-g"]')||e.querySelector('.whatmore-template-type[data="template-collections-h"]'),s=null!==(o=e.querySelector('.whatmore-template-type[data-wh="template-banner-a"]'))&&void 0!==o?o:e.querySelector('.whatmore-template-type[data="template-banner-a"]'),c=e;if(w){const t=e.querySelector(".whatmore-shimmer-stories");t&&(t.style.display="none")}else if(!f){const t=e.querySelector(".loading-skeleton-wrapper");t&&(t.style.display="none")}(s||r||a||l)&&(a&&c||l&&c||s&&c||r&&c)&&(c.style.minHeight="0px")})),null==t||0==t.length||g?(0,S.jsx)("div",{}):(T&&(0,$.xv)(t),T&&console.debug("final transformed events data : "+JSON.stringify(t)),T&&console.debug("valid events size : "+t.length),(0,S.jsx)(W,{heading:e.heading,events:t,allEvents:v}))}},7802:function(e,t,n){n.d(t,{Hl:function(){return o},Np:function(){return a},Po:function(){return r},Z_:function(){return i},Zf:function(){return c},d8:function(){return s},zJ:function(){return l}});const i=function(e,t){return!((void 0==e.products||0==e.products.length)&&(void 0==e.cta||0==e.cta.length))},o=function(e,t){return!(void 0==e.products||0==e.products.length)},l=function(e){if(null!=e)return e.filter((e=>{var t;return null===(t=null===e||void 0===e?void 0:e.in_stock)||void 0===t||t}))},a=function(e,t=!1){var n,i;if(null!=e)return t?{events:e.events[0].events,all_events:null!==(i=null===e||void 0===e?void 0:e.all_events)&&void 0!==i?i:[]}:{events:null===e||void 0===e?void 0:e.events,all_events:null!==(n=null===e||void 0===e?void 0:e.all_events)&&void 0!==n?n:[]}};const r=function(e,t){var n,i;let o=[];if(null==e)return[];if("eventsets"in e&&e.eventsets[t]){const n=function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{t=t.concat(e.events)})),t}(e.eventsets[t]);o=[...n]}return{events:o,all_events:null!==(n=null===(i=o)||void 0===i?void 0:i.all_events)&&void 0!==n?n:[]}};function s(e){if(null!=e){var t=0;return e.forEach((e=>{e.index=t++})),e}}function c(e){if(null==e)return;let t=0;return e.reduce(((e,n)=>{var i;return(null===(i=null===n||void 0===n?void 0:n.in_stock)||void 0===i||i)&&(n.index=t++,e.push(n)),e}),[])}},8945:function(e,t,n){function i(e,t){let n=0;let i=new MutationObserver((function(){document.querySelector("."+e)?(t(),i.disconnect()):0==n&&(n=1,setTimeout((()=>{t(),i.disconnect()}),8e3))}));i.observe(document.body,{childList:!0,subtree:!0})}n.d(t,{H:function(){return i}})}}]);