whatmore-react-assets 1.0.917 → 1.0.918
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
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
100% {
|
|
66
66
|
transform: translateY(0%) rotate(0deg);
|
|
67
67
|
}
|
|
68
|
-
`} infinite 1.5s linear`;return(0,x.jsx)(L.MT,{unmountOnExit:!0,initialScale:.2,in:d,reverse:!0,delay:m,children:(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",paddingTop:100,borderRadius:"3xl",children:(0,x.jsxs)(s.Kq,{direction:"column",width:"100%",height:"fit-content",justifyContent:"flex-end",children:[(0,x.jsx)(s.M5,{animation:"vertical"===p?w:j,children:"vertical"===p?(0,x.jsx)(z.Z,{sx:{color:"white !important",fontSize:g,filter:"drop-shadow(0 0 20px black);"}}):(0,x.jsx)(R.Z,{sx:{color:"white !important",fontSize:g,filter:"drop-shadow(0 0 20px black);"}})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{textShadow:"dark-lg",fontSize:f+"px",fontWeight:"semibold",sx:{color:"white !important",textShadow:"0px 0px 20px black !important;"},children:"swipe for more"})})]})})})};var D=function(t){const[e,i]=(0,u.j1)("isFirstIndicatorRenderDone"),[n]=(0,u.j1)("indicatorRenderSeconds"),o=n,l=t.swipeUp;return(0,r.useEffect)((()=>{const t=setTimeout((()=>{i(!0)}),3e3+1e3*o);return()=>{clearTimeout(t)}}),[]),e?null:(0,x.jsx)(M,{showForSeconds:.8*o,delayInSeconds:3,swipeUp:l})},K=i(5180),A=i(9316),W=i(5254);const N="15px";var q=i(4522),H=i(778),V=i(8811);var Z=function(t){const[e]=(0,u.j1)("isInDesignMode"),[i]=(0,u.j1)("isDemoBrand"),[n]=(0,u.j1)("whatmoreSecondaryColor"),[o]=(0,u.j1)("whatmorePrimaryFont"),[l]=(0,u.j1)("whatmoreShopId"),[a,p,v,m]=(0,h.Z)(),[g,f]=(0,r.useState)(!1),w=t.product,j=t.event,{whatmoreWidgetSourceDetails:y}=(0,r.useContext)(V.I),C=.1*v,S=.95*m,b=.05*m;return(0,x.jsx)(s.Kq,{direction:"row",height:C,justifyContent:"center",aligntItems:"center",alignContent:"center",bgGradient:"linear(to-b, transparent, blackAlpha.400, blackAlpha.600)",children:(0,x.jsx)(s.Kq,{direction:"column",width:"fit-content",height:C,justifyContent:"center",aligntItems:"center",alignContent:"center",children:(0,x.jsx)(s.xu,{width:S+"px",height:"fit-content",padding:"6px",marginTop:N,backgroundColor:n,borderRadius:"5px",animation:g?A.mT:null,onAnimationEnd:()=>{f(!1)},marginBottom:(0,c.pq5)(l),onClick:()=>{f(!0),function(t,n){e||i||(async()=>{(0,d.wz)(t,n),(0,q.GF)({userInteractionType:H.K.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:y,event:t,productList:[n],ctaList:t.cta})})()}(j,w),window.location.href=function(t){return(0,c.lj5)(l)?t.product_link+"?"+(0,c.awP)(l)+"&"+(0,c.n9s)(l)+"&"+(0,c.vaK)(l):t.product_link}(w)},_hover:{backgroundColor:(0,W.lA)(n,8)},cursor:"pointer",children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*b+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:o+" !important",color:"white !important"},children:(0,c.Pvx)(l)})})})})})},U=i(7009),B=i(5945),Y=i(5456),X=i(6984),$=i(6227),G=i(7329),J=(i(9111),i(9748));function Q(t){var e;const[i]=(0,u.j1)("whatmoreSecondaryColor"),[n]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),[l,a]=(0,r.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),h=t.onClick,p=t.width,v=t.height,m=t.title,g=t.showInProgressIcon;return(0,x.jsxs)(s.xu,{display:"flex",width:p,height:v,padding:"2x",boxShadow:"lg",animation:l?A.mT:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:["awaitingVariantSelection"==t.cartState&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",backgroundColor:"white",onClick:e=>{e.stopPropagation(),t.updateCartState("init"),a(!0)},children:(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:n+" !important",color:"#343434 !important"},children:["\xa0","Cancel","\xa0"]})}),(0,x.jsxs)(s.Kq,{direction:"row",backgroundColor:g?(0,W.lA)(i,8):i,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",onClick:t=>{t.stopPropagation(),h(),a(!0)},children:[(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:n+" !important",color:(0,c.KCy)(o)+" !important"},children:["\xa0",m,"\xa0"]}),g?(0,x.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,x.jsx)(G.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*d+"px"}})}):(0,x.jsx)(x.Fragment,{})]})]})}function tt(t){var e;const[i]=(0,u.j1)("whatmoreSecondaryColor"),[n]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),[l,a]=(0,r.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),h=t.onClick,p=t.width,v=t.height;return(0,x.jsx)(s.xu,{width:p,height:v,padding:"2x",boxShadow:"lg",backgroundColor:i,onClick:t=>{t.stopPropagation(),h(),a(!0)},animation:l?A.mT:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",children:(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:n+" !important",color:(0,c.KCy)(o)+" !important"},children:["\xa0",(0,c.tan)(o),"\xa0"]})})})})}function et(t){var e;const[i]=(0,u.j1)("whatmorePrimaryFont"),[n]=(0,u.j1)("whatmoreShopId"),o=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),r=t.width,l=t.height;return(0,x.jsx)(s.xu,{width:r,height:l,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:"gray",borderWidth:"1px",onClick:t=>{t.stopPropagation()},children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:(0,x.jsxs)(s.xv,{color:"gray",lineHeight:"100%",fontSize:1.3*o+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:"gray !important"},children:["\xa0"," Sold Out ","\xa0"]})})})}function it(t){var e;const[i]=(0,u.j1)("whatmoreSecondaryColor"),[n]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),r=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),l=t.onClick,a=t.cartCount,d=t.width,c=t.height,h=t.onCartIconClick;return(0,x.jsx)(s.xu,{width:d,height:c,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:i,borderWidth:"1px",onClick:t=>{t.stopPropagation()},cursor:"pointer",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:[(0,x.jsx)(s.M5,{paddingX:"5px",onClick:()=>{h()},children:"1972174947"!=o&&"55194878152"!=o?(0,x.jsx)($.Z,{sx:{color:i,fontSize:1.6*r}}):(0,x.jsx)(J.zx,{size:"sm",_hover:{bg:i},sx:{bg:i},children:(0,x.jsx)(s.xv,{paddingX:"6px",color:"white",sx:{fontSize:.85*r},children:"GO TO CART"})})}),(0,x.jsx)(s.xv,{color:i,fontSize:1.3*r+"px !important",fontWeight:"semibold !important",sx:{fontFamily:n+" !important"},children:a}),(0,x.jsx)(s.M5,{paddingX:"5px",onClick:t=>{t.stopPropagation(),l()},children:(0,x.jsx)(X.Z,{sx:{color:i,fontSize:1.6*r}})})]})})}var nt=function(t){var e,i,n,o;const[r]=(0,u.j1)("whatmoreShopId"),l=t.event,a=t.product,d=null!==(e=t.baseFontSize)&&void 0!==e?e:10,s=null===(i=t.showAddedToCart)||void 0===i||i,c=t.cartState,h=t.cartCount,p=t.onClickAtc,v=t.onCartIconClick;function m(){p()}const g=null!==(n=t.width)&&void 0!==n?n:"100%",f=null!==(o=t.height)&&void 0!==o?o:"100%";return"errored"==c?(0,x.jsx)(L.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:f,width:g},children:(0,x.jsx)(et,{event:l,product:a,baseFontSize:d,width:g,height:f})}):"init"==c?0==h?(0,x.jsx)(tt,{onClick:m,event:l,product:a,baseFontSize:d,width:g,height:f}):s?(0,x.jsx)(L.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:f,width:g},children:(0,x.jsx)(it,{onClick:m,event:l,product:a,baseFontSize:d,cartCount:h,width:g,height:f,onCartIconClick:v})}):(0,x.jsx)(tt,{onClick:m,event:l,product:a,baseFontSize:d,width:g,height:f}):(0,x.jsx)(Q,{onClick:m,cartState:c,updateCartState:t.updateCartState,event:l,product:a,baseFontSize:d,width:g,height:f,title:"awaitingVariantSelection"==c?"Done":"",showInProgressIcon:"atcApiCallInProgress"==c||"productVariantDetailsApiCallInProgress"==c})},ot=i(6967),rt=i(6230),lt=i(4844);const at=(0,u.MO)("isInDesignMode"),dt=(0,u.MO)("isDemoBrand");async function st(t,e,i,n,o,r,l,a,d){return"shopify"==i?(0,lt.wW)(t,e,n,l,a,d):(at||dt||(async()=>{(0,ot.FF)(o,r)})(),(0,rt.jg)(t,e,n))}function ct(t,e){return"shopify"==t?(0,lt.JL)(e):(0,rt.TE)(e)}var ut=i(513);var ht=function(t,e,i){const[n]=(0,u.j1)("whatmoreShopId"),[o]=(0,u.j1)("isInDesignMode"),[l]=(0,u.j1)("isDemoBrand"),[a,s]=(0,r.useState)(null),h=(0,r.useRef)(null),{closeClickComponent:v}=(0,r.useContext)(ri),{whatmoreUserInfo:x}=(0,r.useContext)(V.I),[m,g]=(0,r.useState)({state:"init",cart_count:t});function f(t,e){g({state:t,cart_count:null!==e&&void 0!==e?e:m.cart_count}),"init"!=t&&"errored"!=t?(0,u.bU)("whatmoreAllowAutoSlide",!1):(0,u.bU)("whatmoreAllowAutoSlide",!0)}function w(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}function j(t,r){const a=function(t){const e=h.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));return 0==e.length?null:e[0].id}(t);if(!a)return void f("init",m.cart_count);f("atcApiCallInProgress",null);st(a,1,(0,c.Ipo)(n),n,i,e,r,null===i||void 0===i?void 0:i.location,null===x||void 0===x?void 0:x.userType).then((t=>{if(!t.ok)throw new Error(t.status);return t.json()})).then((t=>(function(t,e,i){o||l||(async()=>{(0,d.JX)(t,e,i)})()}(i,e,1),f("init",m.cart_count+1),(0,u.bU)("whatmoreAddedToCart",!0),"72550089015"==n&&(0,u.MO)("whatmoreAddedToCart")&&(0,ut.D)(n,(()=>{}),100,window.location.hostname),(0,c.IKD)(n)&&setTimeout((()=>function(){const t=window.location.origin+"/cart";window.location.href=t}()),500),t))).catch((t=>{f("errored",null),console.error("Error while adding to cart:",t)}))}return[m,f,a,function(t){f("productVariantDetailsApiCallInProgress",null),(0,p.p)(e,(0,c.Ipo)(n),n).then((e=>{h.current=e.variants;const i=function(t){var e=[],i=[],n=[];return t.variants.forEach((o=>{var r,l,a;o.option1&&e.push({option:o.option1,available:null===(r=o.available)||void 0===r||r,type:t.options[0].name}),o.option2&&i.push({option:o.option2,available:null===(l=o.available)||void 0===l||l,type:t.options[1].name}),o.option3&&n.push({option:o.option3,available:null===(a=o.available)||void 0===a||a,type:t.options[2].name})})),e=e.reduce(((t,e,i)=>{var n=t.filter((t=>t.option==e.option));return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)}),[]),i=i.reduce(((t,e,i)=>{var n=t.filter((t=>t.option==e.option));return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)}),[]),n=n.reduce(((t,e,i)=>{var n=t.filter((t=>t.option==e.option));return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)}),[]),[e,i,n]}(e);s(i),!function(t){return t[0].length<=1&&t[1].length<=1&&t[2].length<=1}(i)?f("awaitingVariantSelection",null):!function(){if(h.current&&h.current.length>=1)return h.current.filter((t=>t.available)).length>=1;return!1}()?f("errored",null):j([w(i[0]),w(i[1]),w(i[2])],t)})).catch((t=>{f("errored",null)}))},j,function(t){var e,i;const o=h.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));if(0==o.length)return null;const r=null!==(e=o[0].price)&&void 0!==e?e:0,l=null!==(i=o[0].compare_at_price)&&void 0!==i?i:0;return{price:"whatmore"==(0,c.Ipo)(n)?r:r/100,compare_price:"whatmore"==(0,c.Ipo)(n)?l:l/100}},function(){"do_nothing"!==(0,c.v9M)(n)&&("go_to_cart_page"!==(0,c.v9M)(n)?"open_cart_slider"!==(0,c.v9M)(n)||null!==v&&v():ct((0,c.Ipo)(n),n))}]},pt=i(9363);var vt=function(t){var e,i,n,o;const l=t.productVariantOptions,a=null!==(e=t.width)&&void 0!==e?e:"100%",d=null!==(i=t.height)&&void 0!==i?i:"fit-content",h=null!==(n=t.baseFontSize)&&void 0!==n?n:10,p=t.onOptionSelected,v=null!==(o=t.optionTitleColor)&&void 0!==o?o:"black",m=t.data,[f]=(0,u.j1)("whatmoreSecondaryColor"),[w]=(0,u.j1)("whatmorePrimaryFont"),[j]=(0,u.j1)("whatmoreShopId");function y(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}const[C,S]=(0,r.useState)([y(l[0]),y(l[1]),y(l[2])]);return(0,r.useEffect)((()=>{p(C)}),[C]),(0,x.jsx)(s.Kq,{direction:"column",width:a,height:d,justifyContent:"flex-start",alignItems:"center",spacing:"5px",children:l.map(((e,i)=>{if(0!=e.length)return(0,x.jsxs)(s.Kq,{width:"100%",direction:"column",alignItems:"center",justifyContent:"flex-start",children:[(0,x.jsx)(s.M5,{width:"100%",children:(0,x.jsx)(s.iz,{color:"blackAlpha.500",size:"1px",width:"20%"})}),(0,x.jsxs)(s.xv,{as:"b",fontSize:1.2*h+"px",sx:{color:v+" !important",fontFamily:w+" !important"},align:"center",children:["\xa0",e[0].type,"\xa0"]}),(0,x.jsx)(s.kC,{gap:"6px",wrap:"wrap",justify:"center",children:e.map(((e,n)=>{var o,r,l,a,d,u,p,v,f,y,b,I,k,_,F,T;const E=0==i||(null===m||void 0===m||null===(o=m.variants)||void 0===o?void 0:o.find((t=>t[`option${i}`]==(null===C||void 0===C?void 0:C[i-1])&&t[`option${i+1}`]==(null===e||void 0===e?void 0:e.option))));return(0,x.jsx)(x.Fragment,{children:E&&(0,x.jsx)(s.xu,{borderRadius:"Colour"===(null===e||void 0===e?void 0:e.type)||null!==e&&void 0!==e&&e.type.toLowerCase().includes("color")?"50%":"2px",onClick:t=>{t.stopPropagation(),e.available&&function(t,e){if(2==e)S([C[0],C[1],t]);else if(1==e){var i,n;S([C[0],t,null===m||void 0===m||null===(i=m.variants)||void 0===i||null===(n=i.find((e=>(null===e||void 0===e?void 0:e.option2)==t)))||void 0===n?void 0:n.option3])}else{var o,r,l,a,d,s;const e=null===m||void 0===m||null===(o=m.variants)||void 0===o||null===(r=o.find((e=>(null===e||void 0===e?void 0:e.option1)==t)))||void 0===r?void 0:r.option2;S([t,null===m||void 0===m||null===(l=m.variants)||void 0===l||null===(a=l.find((e=>(null===e||void 0===e?void 0:e.option1)==t)))||void 0===a?void 0:a.option2,null===m||void 0===m||null===(d=m.variants)||void 0===d||null===(s=d.find((t=>(null===t||void 0===t?void 0:t.option2)==e)))||void 0===s?void 0:s.option3])}}(e.option,i)},backgroundColor:e.option==C[i]?"black":"white",cursor:"pointer",children:("Colour"===(null===e||void 0===e?void 0:e.type)||null!==e&&void 0!==e&&e.type.toLowerCase().includes("color"))&&((null===t||void 0===t||null===(r=t.finalArr)||void 0===r||null===(l=r.finalArr)||void 0===l?void 0:l.length)>0&&(null===t||void 0===t||null===(a=t.finalArr)||void 0===a||null===(d=a.finalArr)||void 0===d||!d.includes(null))||(null===t||void 0===t||null===(u=t.finalArr)||void 0===u||null===(p=u.finalArrExternal)||void 0===p?void 0:p.length)>0&&(null===t||void 0===t||null===(v=t.finalArr)||void 0===v||null===(f=v.finalArrExternal)||void 0===f||!f.includes(null)))?(0,x.jsx)(g.Ee,{padding:"2px",borderRadius:(0,c.lmH)(j),width:"58px",height:"58px",style:{cursor:null!==e&&void 0!==e&&e.available?"pointer":"not-allowed",opacity:null!==e&&void 0!==e&&e.available?1:.5,filter:null!==e&&void 0!==e&&e.available?"none":"grayscale(100%)"},src:(0,pt.s)(null!==(y=null===t||void 0===t||null===(b=t.finalArr)||void 0===b||null===(I=b.finalArr)||void 0===I||null===(k=I.find((t=>(null===t||void 0===t?void 0:t.color)==(null===e||void 0===e?void 0:e.option))))||void 0===k?void 0:k.src)&&void 0!==y?y:null===t||void 0===t||null===(_=t.finalArr)||void 0===_||null===(F=_.finalArrExternal)||void 0===F||null===(T=F.find((t=>(null===t||void 0===t?void 0:t.color)==(null===e||void 0===e?void 0:e.option))))||void 0===T?void 0:T.optionsrc,"?width=400&height=400")}):(0,x.jsxs)(s.xv,{as:e.available?"samp":"s",fontSize:h+"px",sx:{color:(e.available?e.option==C[i]?"white":"black":"gray")+" !important",fontFamily:w+" !important"},align:"center",paddingX:(P=e.option,P.length>=3?"0px":.5*h+"px"),children:["\xa0",e.option,"\xa0"]})})});var P}))},i)]},i)}))})},xt=i(9219),mt=i(6524);var gt=function(t){var e,i,n,o,l,a;const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[f]=(0,u.j1)("whatmoreSecondaryColor"),w=(0,u.MO)("whatmoreSecondaryColorShade900"),[j]=(0,u.j1)("whatmorePrimaryFont"),[y]=(0,u.j1)("whatmoreShopId"),[C,S,b,I]=(0,h.Z)(),[k,_]=(0,r.useState)(!1),[F,T]=(0,r.useState)(t.product),{whatmoreUITheme:E}=(0,r.useContext)(V.I),{whatmoreWidgetSourceDetails:P}=(0,r.useContext)(V.I),[O,z,R,M,D,K,Z]=ht(0,F,t.event),[X,$]=(0,r.useState)(null),[G,Q]=(0,r.useState)(parseFloat(F.price)),[tt,et]=(0,r.useState)(parseFloat(F.compare_price)),[it,ot]=(0,r.useState)(F.currency),[rt,lt]=(0,r.useState)(null),at=t.event,dt=t.productClickHandler,{whatmoreIsPreviewMode:st}=(0,r.useContext)(V.I),[ct,ut]=(0,r.useState)(null);(0,r.useEffect)((()=>{(0,c.N8M)(y)&&(0,xt.Rb)(F,(0,c.Ipo)(y),y).then((t=>{T(t),Q(parseFloat(t.price)),et(parseFloat(t.compare_price)),ot(t.currency)}));(async()=>{const t=await(0,p.p)(F,(0,c.Ipo)(y),y);lt(t)})()}),[]),(0,r.useEffect)((()=>{var t,e;const i=null!=rt?null===rt||void 0===rt||null===(t=rt.options)||void 0===t?void 0:t.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))})):-1,n=-1!==i?null===rt||void 0===rt||null===(e=rt.variants)||void 0===e?void 0:e.map((t=>{var e,n;const o=null===t||void 0===t?void 0:t[`option${i+1}`];return null!==t&&void 0!==t&&null!==(e=t.featured_image)&&void 0!==e&&e.src?{color:o,src:null===t||void 0===t||null===(n=t.featured_image)||void 0===n?void 0:n.src}:null})):[];let o=[];var r;-1!==i&&(o=null===rt||void 0===rt||null===(r=rt.images)||void 0===r?void 0:r.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc}))));ut({position:i,finalArr:n,finalArrExternal:o})}),[rt]);var gt=.68*I,ft=.55*gt,wt=.4*gt,jt=gt*(.55-.4),yt=gt+"px",Ct=wt+"px",St=jt+"px",bt=.12*wt;const It=(0,c.ITD)(y);function kt(){window.location.href=function(t){return(0,c.lj5)(y)?t.product_link+"?"+(0,c.awP)(y)+"&"+(0,c.n9s)(y)+"&"+(0,c.vaK)(y):t.product_link}(F)}const _t=P.landingLocationType,Ft=P.templateType,Tt=(0,mt.NY)(_t)+(0,mt.dS)(Ft)+"_"+(null===at||void 0===at?void 0:at.event_id);return(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:N,marginBottom:(0,c.pq5)(y),width:yt,height:"fit-content",boxShadow:"round"==E?"dark-lg":null,onClick:()=>{!function(t,e){v||m||(async()=>{(0,d.wz)(t,e)})(),"72550089015"==y?kt():dt(e),_(!0)}(at,F)},backgroundColor:(0,W.lA)("#ffffff",(0,c.U5_)(y)),animation:k?A.mT:null,borderRadius:"round"==E?"xl":null,overflow:"hidden",onAnimationEnd:()=>{_(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(y),borderColor:(0,c.qPe)(y)},children:[(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,x.jsx)(s.xu,{height:Ct,width:Ct,bgColor:w,children:(0,x.jsx)(g.Ee,{width:Ct,height:Ct,src:(0,pt.s)(null!==(e=null!==(i=null===ct||void 0===ct||null===(n=ct.finalArr)||void 0===n||null===(o=n.find((t=>(null===t||void 0===t?void 0:t.color)==(null===X||void 0===X?void 0:X[null===ct||void 0===ct?void 0:ct.position]))))||void 0===o?void 0:o.src)&&void 0!==i?i:null===ct||void 0===ct||null===(l=ct.finalArrExternal)||void 0===l||null===(a=l.find((t=>(null===t||void 0===t?void 0:t.color)==(null===X||void 0===X?void 0:X[null===ct||void 0===ct?void 0:ct.position]))))||void 0===a?void 0:a.src)&&void 0!==e?e:F.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(y)+" !important"}})}),(0,x.jsxs)(s.xu,{height:Ct,width:gt-wt+"px",children:[(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:(0,c.Fr)(y)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"4px",paddingY:"10px",children:[(0,x.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",1.1*bt+"px","important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",j,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"),t.style.setProperty("padding","0","important"),t.style.setProperty("margin-bottom","4px","important"),t.style.setProperty("font-weight","normal","important"))},children:(0,B.s)(null==F.title?"":F.title.toString())}),(0,c.QaY)(y)?(0,x.jsxs)(s.Kq,{direction:(0,c.$zZ)(y)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",borderRadius:"round"==E?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"4px",sx:{margin:"0px !important",marginBottom:"4px !important"},children:[(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*bt*(0,c.Rqt)(y)+"px !important",fontWeight:"semibold !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:j+" !important",color:(0,c.Uyp)(y)+" !important",padding:"0px !important",letterSpacing:"normal !important",margin:"0px !important"},children:["\xa0"," "+(0,xt.jx)("10588815418"==y||"88566890817"==y?(null===rt||void 0===rt?void 0:rt.price)/100:G,"",y,it)," \xa0"]}),(0,Y.B)(G,tt)?(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*bt*(0,c.Rqt)(y)+"px !important",fontWeight:"medium !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:j+" !important",color:(0,c.kPs)(y)+" !important",margin:"0px !important",letterSpacing:"normal !important",textDecoration:"line-through !important"},children:[" ",(0,xt.jx)("10588815418"==y||"88566890817"==y?(null===rt||void 0===rt?void 0:rt.compare_at_price)/100:tt,"",y,it)]}):(0,x.jsx)(x.Fragment,{})]}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xv,{fontSize:.82*bt*(0,c.Rqt)(y)+"px",fontWeight:"medium",lineHeight:"110%",sx:{margin:"0px !important",fontFamily:j+" !important",color:(0,c.eod)(y)+" !important"},children:st?(0,c.qde)(y):(0,c.aTS)(y)})]}),(0,c.Fr)(y)?(0,x.jsx)(s.Kq,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,x.jsx)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:w,sx:{borderRadius:"round"==E?"5px":"0px",padding:"2px"},spacing:"0px",children:"1972174947"!=y&&"55194878152"!=y?(0,x.jsx)(U.Z,{sx:{color:f,fontSize:1.3*bt+"px"}}):(0,x.jsx)(J.zx,{size:"sm",_hover:{bg:f},sx:{bg:f},children:(0,x.jsx)(s.xv,{color:"white",paddingX:"6px",fontSize:.8*bt+"px",children:"VIEW PRODUCT"})})}),(0,x.jsx)(s.xu,{width:"2px"})]})}):(0,x.jsx)(x.Fragment,{})]})]}),(0,x.jsx)(L.Rg,{unmountOnExit:!0,initialScale:.5,in:"awaitingVariantSelection"==O.state,style:{height:"fit-content",width:"100%"},children:"awaitingVariantSelection"==O.state&&null!=R?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",marginTop:.1*ft+"px",marginBottom:.1*ft+"px",overflowY:"auto",overflowX:"hidden",maxHeight:ft*It+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,x.jsx)(vt,{width:yt,height:"fit-conten",event:at,product:F,finalArr:ct,data:rt,productVariantOptions:R,baseFontSize:1.2*bt,onOptionSelected:t=>{!function(t){$(t);const e=K(t);e&&(Q(e.price),et(e.compare_price))}(t)}})}):(0,x.jsx)(x.Fragment,{})}),(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:St,justifyContent:"center",alignItems:"center",children:(0,x.jsx)(nt,{baseFontSize:.3*jt,event:at,product:F,cartState:O.state,cartCount:O.cart_count,updateCartState:z,onClickAtc:t=>{"init"==O.state?(M(Tt),(0,q.GF)({userInteractionType:H.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:P,event:at,productList:[F],ctaList:at.cta})):"awaitingVariantSelection"==O.state&&D(X,Tt)},onCartIconClick:()=>{Z()}})})]})},ft=i(3867);var wt=function(t){var e,i,n;const[o]=(0,u.j1)("isInDesignMode"),[r]=(0,u.j1)("isDemoBrand"),[l]=(0,u.j1)("whatmoreSecondaryColor"),[a]=(0,u.j1)("whatmorePrimaryFont"),c=t.event,h=t.product,p=null!==(e=t.baseFontSize)&&void 0!==e?e:10,v=null!==(i=t.width)&&void 0!==i?i:"fit-content",m=null!==(n=t.height)&&void 0!==n?n:"fit-content";return(0,x.jsx)(s.rU,{href:h.product_link,color:l,onClick:()=>{!function(t,e){o||r||(async()=>{(0,d.$L)(t,e)})()}(c,h)},children:(0,x.jsx)(s.xu,{width:v,height:m,padding:"2x",boxShadow:"lg",borderRadius:"md",backgroundColor:"white",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",spacing:"5px",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{lineHeight:"100%",fontSize:1.4*p,fontWeight:"semibold",sx:{fontFamily:a+" !important",color:l+" !important"},children:" VIEW MORE "})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(U.Z,{sx:{color:l,fontSize:1.4*p}})})]})})})},jt=i(6163);function yt(t){var e;const[i]=(0,u.j1)("whatmoreSecondaryColor"),[n]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),[l,a]=(0,r.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),h=t.onClick,p=t.width,v=t.height,m=t.title;return(0,x.jsx)(s.xu,{width:p,height:v,padding:"2x",boxShadow:"lg",backgroundColor:i,onClick:t=>{t.stopPropagation(),h(),a(!0)},animation:l?A.mT:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",children:(0,x.jsxs)(s.xv,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},lineHeight:"100%",fontSize:1.4*d+"px",fontWeight:"semibold",sx:{fontFamily:n+" !important",color:(0,c.KCy)(o)+" !important"},children:["\xa0",m,"\xa0"]})})})}var Ct=function(t){var e,i,n;const[o]=(0,u.j1)("whatmoreShopId"),r=t.event,l=t.product,a=null!==(e=t.baseFontSize)&&void 0!==e?e:10,d=t.onShopNowClick,s=null!==(i=t.width)&&void 0!==i?i:"100%",h=null!==(n=t.height)&&void 0!==n?n:"100%";return(0,x.jsx)(yt,{onClick:function(){d()},event:r,product:l,baseFontSize:a,width:s,height:h,title:(0,c.Pvx)(o)})};var St=function(t){var e;const[i]=(0,u.j1)("isInDesignMode"),[n]=(0,u.j1)("isDemoBrand"),[o]=(0,u.j1)("whatmorePrimaryFont"),[l]=(0,u.j1)("whatmoreShopId"),[a,p,v,m]=(0,h.Z)(),[f,w]=(0,r.useState)(!1),[j,y]=(0,r.useState)(t.product),{whatmoreWidgetSourceDetails:C}=(0,r.useContext)(V.I),[S,b,I,k,_,F,T]=ht(0,j,t.event),[E,P]=(0,r.useState)(null),[O,z]=(0,r.useState)(parseFloat(j.price)),[R,M]=(0,r.useState)(parseFloat(j.compare_price)),[D,K]=(0,r.useState)(j.currency),W=t.event,Z=t.productClickHandler,U=null!==(e=t.tileWidthFactor)&&void 0!==e?e:1,X=C.landingLocationType,$=C.templateType,G=(0,mt.NY)(X)+(0,mt.dS)($)+"_"+(null===W||void 0===W?void 0:W.event_id);(0,r.useEffect)((()=>{(0,c.N8M)(l)&&(0,xt.Rb)(j,brandDomainContext(l),l).then((t=>{y(t),z(parseFloat(t.price)),M(parseFloat(t.compare_price)),K(t.currency)}))}),[]);var J=m*U,Q=.3*J,tt=J+"px",et=.7*Q,it=.9*et,ot=.12*Q;const rt=(0,c.ITD)(l);function lt(t,e){i||n||(async()=>{(0,d.wz)(t,e)})(),Z(e),w(!0)}return(0,x.jsx)(s.Kq,{direction:"row",width:tt,height:"fit-content",justifyContent:"center",children:(0,x.jsx)(s.xu,{marginTop:N,marginBottom:(0,c.pq5)(l),width:tt,onClick:t=>{},animation:f?A.mT:null,borderRadius:"lg",onAnimationEnd:()=>{w(!1)},children:(0,x.jsxs)(s.Kq,{direction:"column",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",spacing:"0px",children:[(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"70%",justifyContent:"space-around",alignItems:"center",borderTopRadius:"lg",overflow:"hidden",onClick:()=>{lt(W,j)},children:[(0,x.jsx)(s.xu,{height:et+"px",width:et+"px",children:(0,x.jsx)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",children:(0,x.jsx)(s.xu,{height:it+"px",width:it+"px",borderRadius:"lg",bgColor:"gray.100",overflow:"hidden",children:(0,x.jsx)(g.Ee,{width:it+"px",height:it+"px",src:j.thumbnail_image,objectFit:"cover"})})})}),(0,x.jsx)(s.xu,{height:et+"px",width:J-et+"px",children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"space-between",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingY:"10px",spacing:"2px",children:[(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*ot+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:o+" !important",color:"white !important"},children:(0,B.s)(j.title.toString())}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",aligntItems:"center",marginTop:"5px",children:[(0,c.QaY)(l)?(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"flex-start",aligntItems:"center",borderRadius:"lg",backgroundColor:"blackAlpha.500",paddingX:"10px",paddingY:"5px",children:[(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:1*ot+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:o+" !important",color:"white !important"},children:["\xa0"," ",(0,xt.jx)(parseFloat(O),"",l,D)," \xa0"]}),(0,x.jsx)(s.M5,{children:(0,Y.B)(j.price,j.compare_price)?(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.8*ot+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:o+" !important",color:"#F9F6EE !important",textDecoration:"line-through !important"},children:[" ",(0,xt.jx)(parseFloat(R),"",l,D)]}):(0,x.jsx)(x.Fragment,{})})]}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(ft.Z,{storeId:l,productId:j.client_product_id,productLink:j.product_link,fontSize:1*ot,fontColor:"white"})})]})]})})]}),(0,x.jsx)(L.Rg,{unmountOnExit:!0,initialScale:.5,in:"awaitingVariantSelection"==S.state,style:{height:"fit-content",width:"100%"},children:"awaitingVariantSelection"==S.state&&null!=I?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",marginTop:.1*Q+"px",marginBottom:.1*Q+"px",overflowY:"auto",overflowX:"hidden",maxHeight:Q*rt+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,x.jsx)(vt,{width:tt,height:"fit-content",event:W,product:j,productVariantOptions:I,baseFontSize:1*ot,onOptionSelected:t=>{!function(t){P(t);const e=F(t);e&&(z(e.price),M(e.compare_price))}(t)},optionTitleColor:"white"})}):(0,x.jsx)(x.Fragment,{})}),(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"30%",justifyContent:"center",alignItems:"center",paddingBottom:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,x.jsx)(s.xu,{width:"100%",height:"100%",children:(0,x.jsx)(wt,{baseFontSize:.8*ot,event:W,product:j,width:"100%",height:"100%"})}),(0,x.jsx)(s.xu,{width:"100%",height:"100%",borderRadius:"md",overflow:"hidden",children:(0,c.Ib9)(l)?(0,x.jsx)(Ct,{baseFontSize:.8*ot,event:W,product:j,borderRadius:"md",onShopNowClick:t=>{lt(W,j)}}):(0,x.jsx)(x.Fragment,{children:"form"===(0,c._5p)(l)?(0,x.jsx)(jt.default,{baseFontSize:.8*ot,event:W,product:j,width:"100%",height:"100%",showAddedToCart:!0}):(0,x.jsx)(nt,{baseFontSize:.8*ot,event:W,product:j,cartState:S.state,cartCount:S.cart_count,borderRadius:"md",onClickAtc:t=>{"init"==S.state?(k(G),(0,q.GF)({userInteractionType:H.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:C,event:W,productList:[j],ctaList:W.cta})):"awaitingVariantSelection"==S.state&&_(E,G)},onCartIconClick:()=>{T()}})})})]})]})})})};var bt=function(t){const[e]=(0,u.j1)("isInDesignMode"),[i]=(0,u.j1)("isDemoBrand"),[n]=(0,u.j1)("whatmoreSecondaryColor"),o=(0,u.MO)("whatmoreSecondaryColorShade900"),[l]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[p,v,m,f]=(0,h.Z)(),[w,j]=(0,r.useState)(!1),[y,C]=(0,r.useState)(t.product),{whatmoreUITheme:S}=(0,r.useContext)(V.I),[b,I]=(0,r.useState)(!(0,c.N8M)(a)),[k,_]=(0,r.useState)(parseFloat(y.price)),[F,T]=(0,r.useState)(parseFloat(y.compare_price)),[E,P]=(0,r.useState)(y.currency),O=t.event;t.productClickHandler,(0,r.useEffect)((()=>{(0,c.N8M)(a)&&(0,xt.Rb)(y,(0,c.Ipo)(a),a).then((t=>{C(t),_(parseFloat(t.price)),T(parseFloat(t.compare_price)),P(t.currency),I(!0)}))}),[]);var L=.68*f,z=.4*L,R=L+"px",M=z+"px",D=L*(.55-.4)+"px",K=.12*z;(0,c.ITD)(a);const{whatmoreWidgetSourceDetails:Z}=(0,r.useContext)(V.I);function X(t){return(0,c.lj5)(a)?t.product_link+"?"+(0,c.awP)(a)+"&"+(0,c.n9s)(a)+"&"+(0,c.vaK)(a):t.product_link}function $(t,n){e||i||(async()=>{(0,d.wz)(t,n),(0,q.GF)({userInteractionType:H.K.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:Z,event:t,productList:[n],ctaList:t.cta})})(),j(!0)}return(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:N,marginBottom:(0,c.pq5)(a),width:R,height:"fit-content",boxShadow:"round"==S?"dark-lg":null,onClick:()=>{$(O,y),window.location.href=X(y)},backgroundColor:(0,W.lA)("#ffffff",(0,c.U5_)(a)),animation:w?A.mT:null,borderRadius:"round"==S?"xl":null,overflow:"hidden",onAnimationEnd:()=>{j(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(a),borderColor:(0,c.qPe)(a)},children:[(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,x.jsx)(s.xu,{height:M,width:M,bgColor:o,children:(0,x.jsx)(g.Ee,{width:M,height:M,src:(0,pt.s)(y.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(a)+" !important"}})}),(0,x.jsxs)(s.xu,{height:M,width:L-z+"px",children:[(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:(0,c.Fr)(a)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingTop:"10px",paddingBottom:"16px",children:[(0,x.jsx)(s.xv,{as:"p",ref:t=>{t&&(t.style.setProperty("min-height","0","important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("-webkit-box-orient","vertical","important"))},sx:{paddingLeft:"8px",fontFamily:l+" !important",color:"black !important",lineHeight:"120% !important",fontWeight:"medium !important",fontSize:1.1*K+"px !important"},children:(0,B.s)(null==y.title?"":y.title.toString())}),(0,c.QaY)(a)?(0,x.jsxs)(s.Kq,{direction:(0,c.$zZ)(a)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",marginTop:"5px",borderRadius:"round"==S?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"5px",children:[b&&(0,x.jsxs)(s.xv,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},noOfLines:1,fontSize:.9*K+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:l+" !important",color:(0,c.Uyp)(a)+" !important",margin:"0px !important"},children:[" "+(0,xt.jx)(k,"",a,E)," \xa0"]}),(0,Y.B)(k,F)&&b?(0,x.jsxs)(s.xv,{as:"s",style:{minHeight:0,textDecoration:"line-through"},noOfLines:1,fontSize:.9*K+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:l+" !important",color:(0,c.kPs)(a)+" !important",margin:"0px !important"},children:[" ",(0,xt.jx)(F,"",a,E)]}):(0,x.jsx)(x.Fragment,{})]}):(0,x.jsx)(x.Fragment,{}),""!=(0,c.sG7)(a)&&(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*K+"px",lineHeight:"100%",paddingTop:"6px",sx:{fontFamily:(0,c.V3Y)(a)+" !important",color:(0,c.aUT)(a)+" !important",margin:"0px !important"},children:["\xa0",(0,c.sG7)(a)," \xa0"]})]}),(0,c.Fr)(a)?(0,x.jsx)(s.Kq,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,x.jsx)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:o,sx:{borderRadius:"round"==S?"5px":"0px",padding:"2px"},spacing:"0px",children:(0,x.jsx)(U.Z,{sx:{color:n,fontSize:1.3*K+"px"}})}),(0,x.jsx)(s.xu,{width:"2px"})]})}):(0,x.jsx)(x.Fragment,{})]})]}),(0,c.pp3)(a)&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:D,justifyContent:"center",alignItems:"center",children:(0,x.jsx)(Ct,{baseFontSize:.8*K,event:O,product:y,borderRadius:"md",onShopNowClick:t=>{$(O,y),window.location.href=X(y)}})})]})};var It=function(t){const[e]=(0,u.j1)("whatmoreShopId"),i=(0,c.eyg)(e),n=t.event,o=t.product;return"broad-tile"==i?(0,x.jsx)(gt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"broad-tile-no-cta"==i?(0,x.jsx)(bt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"link_only"==i?(0,x.jsx)(Z,{product:t.product,event:t.event}):"narrow-tile"==i?(0,x.jsx)(St,{event:n,product:o,productClickHandler:t.productClickHandler,tileWidthFactor:n.products.length>1?.68:void 0}):(0,x.jsx)(gt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler})},kt=i(6119),_t=i(3388),Ft=i(7643);var Tt=function(t){const[e,i,n,o]=(0,h.Z)(),[r]=(0,u.j1)("whatmoreShopId"),d=(0,u.MO)("isInDesignMode"),p=(0,u.MO)("isDemoBrand"),v=t.event,m=t.productClickHandler,g=(0,c.eyg)(r);if(!(0,_t.kT)(v))return(0,x.jsx)(x.Fragment,{});if(1==v.products.length&&(void 0==v.cta||0==v.cta.length)){const t=v.products[0];return(0,c.rnv)(r)?(0,x.jsx)(s.Kq,{direction:"horizontal",width:o,height:"fit-content",justifyContent:"center",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))",children:(0,x.jsx)(Ft.u,{userInteractionType:H.K.PRODUCT_CTA_VIEW,event:v,productList:[t],triggerFlag:!d&&!p,children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(St,{event:v,product:t,productClickHandler:m},v.event_id+t.product_id)})})}):(0,x.jsx)(s.Kq,{direction:"horizontal",width:o,height:"fit-content",justifyContent:"center",backgroundImage:"narrow-tile"==g?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))":null,children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(Ft.u,{userInteractionType:H.K.PRODUCT_CTA_VIEW,event:v,productList:[t],triggerFlag:!d&&!p,children:(0,x.jsx)(It,{event:v,product:t,productClickHandler:m},v.event_id+t.product_id)})})})}return(0,x.jsx)(s.M5,{children:(0,x.jsx)("div",{onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,x.jsx)(s.xu,{width:o+"px",backgroundImage:"narrow-tile"==g?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))":null,children:(0,x.jsxs)(l.tq,{className:"product-tile swiper-slide",slidesPerView:1==v.products.length?1:1.4,initialSlide:v.products.length<=2||(0,c.VqZ)(r)?0:1,centeredSlides:!(0,c.VqZ)(r),modules:[a.Gk],mousewheel:{invert:!1,thresholdDelta:20},nested:!0,children:[v.products.map((t=>"oos"!=t.product_status&&(0,x.jsx)(l.o5,{children:(0,x.jsx)(Ft.u,{userInteractionType:H.K.PRODUCT_CTA_VIEW,event:v,productList:[t],triggerFlag:!d&&!p,children:(0,x.jsx)(s.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",alignItems:"center",children:(0,x.jsx)(It,{event:v,product:t,productClickHandler:m},v.event_id+t.product_id)})})},v.event_id+t.product_id))),(0,c.pp3)(r)&&void 0!=v.cta&&v.cta.map((t=>(0,x.jsx)(x.Fragment,{children:""!==t.cta_title.trim()&&(0,x.jsx)(l.o5,{children:(0,x.jsx)(s.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",alignItems:"center",children:(0,x.jsx)(kt.Z,{cta:t},v.event_id+t.cta_id)})},v.event_id+t.cta_id)})))]})})})})};var Et=function(t){const[e,i]=(0,u.j1)("isProductSwiperCatalogOpen"),n=t.event,o=t.productClickHandler;return(0,r.useContext)(ri).isIOS&&e?(0,x.jsx)(Tt,{event:n,productClickHandler:o},n.event_id):(0,x.jsx)(L.MT,{unmountOnExit:!0,initialScale:.2,in:e,children:(0,x.jsx)(Tt,{event:n,productClickHandler:o},n.event_id)})};function Pt(t){const e=t.event,[i,n,o,r]=(0,h.Z)(),[l]=(0,u.j1)("whatmorePrimaryFont");return(0,x.jsx)(s.xu,{width:"fit-content",height:"fit-content",padding:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{overflow:"hidden",size:.15*r+"px",children:(0,x.jsx)(g.Ee,{width:"100%",height:"100%",src:e.thumbnail_image})})}),(0,x.jsx)(s.xu,{width:"fit-content",height:"fit-content",children:(0,x.jsxs)(s.Kq,{direction:"column",width:"fit-content",height:"fit-content",children:[(0,x.jsx)(s.xv,{color:"white",fontSize:.05*r+"px",fontWeight:"bold",fontFamily:"sans-serif",align:"left",sx:{fontFamily:l+" !important"},children:e.presenter_name.substring(0,15)}),(0,x.jsx)(E.Z,{event:e,fontSize:.03*r+"px"})]})})]})})}var Ot=function(t){const[e]=(0,u.j1)("isInDesignMode"),[i]=(0,u.j1)("isDemoBrand"),[n,o]=(0,u.j1)("isProductSwiperCatalogOpen"),[l,a]=(0,j.Z)(),[d,h]=(0,u.j1)("isFirstIndicatorRenderDone"),p=(0,r.useContext)(ri),[v]=(0,u.j1)("whatmoreShopId"),m=t.event,g=t.isLast,f=t.onCloseCallback,w=t.focusRef,C=t.productClickHandler;return(0,x.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",children:(0,x.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,x.jsx)(s.xu,{width:"full",margin:"2px",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"space-between",paddingRight:"10px",paddingLeft:"10px",children:[(0,x.jsx)(Pt,{event:m}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,x.jsx)(y,{focusRef:w}),(0,x.jsx)(O,{event:m,onCloseCallback:f})]})]})}),(0,x.jsx)(s.xu,{width:"100%",height:"100%",onClick:()=>{a(!l)}}),(0,x.jsxs)(s.xu,{width:"full",height:"fit-content",children:[p.totalEvents>1&&!d&&p.showSwipeIndicator?(0,x.jsx)(s.xu,{width:"full",margin:"2px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,x.jsx)(D,{swipeUp:!g})})}):null,void 0!=m.products&&m.products.length>0?(0,x.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(v)?(0,x.jsx)(s.xu,{w:"100%",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(T,{event:m,onToggle:t=>{o("minimize-button"!==t)}})})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,x.jsx)(Et,{event:m,productClickHandler:C})})]}):(0,x.jsx)("div",{})]})]})})};function Lt(t){const[e,i,n,o]=(0,h.Z)(),[l]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d,p]=(0,r.useState)(""),v=t.data,m=(t.event,t.product,t.setShowOptionsChart);var f=.4*o*.8*.13;(0,r.useEffect)((()=>{let t="vanyaclothing.myshopify.com";"1972174947"===a&&(t="vanyaclothing.myshopify.com");const e=`https://app.kiwisizing.com/api/getSizingChart?shop=${t}&product=${null===v||void 0===v?void 0:v.id}&title=${null===v||void 0===v?void 0:v.title}&tags=&cacheSettingsUpdateAt=2020-08-11T15%3A19%3A49.000Z&settingsVersion=19`;fetch(e).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>{var e,i,n,o,r,l;p(null===t||void 0===t||null===(e=t.sizings)||void 0===e||null===(i=e[0])||void 0===i||null===(n=i.layout)||void 0===n||null===(o=n.data)||void 0===o||null===(r=o[0])||void 0===r||null===(l=r.data)||void 0===l?void 0:l.url)})).catch((t=>{console.error("Error fetching data:",t)}))}),[]);const w=`${S.F4`
|
|
68
|
+
`} infinite 1.5s linear`;return(0,x.jsx)(L.MT,{unmountOnExit:!0,initialScale:.2,in:d,reverse:!0,delay:m,children:(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",paddingTop:100,borderRadius:"3xl",children:(0,x.jsxs)(s.Kq,{direction:"column",width:"100%",height:"fit-content",justifyContent:"flex-end",children:[(0,x.jsx)(s.M5,{animation:"vertical"===p?w:j,children:"vertical"===p?(0,x.jsx)(z.Z,{sx:{color:"white !important",fontSize:g,filter:"drop-shadow(0 0 20px black);"}}):(0,x.jsx)(R.Z,{sx:{color:"white !important",fontSize:g,filter:"drop-shadow(0 0 20px black);"}})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{textShadow:"dark-lg",fontSize:f+"px",fontWeight:"semibold",sx:{color:"white !important",textShadow:"0px 0px 20px black !important;"},children:"swipe for more"})})]})})})};var D=function(t){const[e,i]=(0,u.j1)("isFirstIndicatorRenderDone"),[n]=(0,u.j1)("indicatorRenderSeconds"),o=n,l=t.swipeUp;return(0,r.useEffect)((()=>{const t=setTimeout((()=>{i(!0)}),3e3+1e3*o);return()=>{clearTimeout(t)}}),[]),e?null:(0,x.jsx)(M,{showForSeconds:.8*o,delayInSeconds:3,swipeUp:l})},K=i(5180),A=i(9316),W=i(5254);const N="15px";var q=i(4522),H=i(778),V=i(8811);var Z=function(t){const[e]=(0,u.j1)("isInDesignMode"),[i]=(0,u.j1)("isDemoBrand"),[n]=(0,u.j1)("whatmoreSecondaryColor"),[o]=(0,u.j1)("whatmorePrimaryFont"),[l]=(0,u.j1)("whatmoreShopId"),[a,p,v,m]=(0,h.Z)(),[g,f]=(0,r.useState)(!1),w=t.product,j=t.event,{whatmoreWidgetSourceDetails:y}=(0,r.useContext)(V.I),C=.1*v,S=.95*m,b=.05*m;return(0,x.jsx)(s.Kq,{direction:"row",height:C,justifyContent:"center",aligntItems:"center",alignContent:"center",bgGradient:"linear(to-b, transparent, blackAlpha.400, blackAlpha.600)",children:(0,x.jsx)(s.Kq,{direction:"column",width:"fit-content",height:C,justifyContent:"center",aligntItems:"center",alignContent:"center",children:(0,x.jsx)(s.xu,{width:S+"px",height:"fit-content",padding:"6px",marginTop:N,backgroundColor:n,borderRadius:"5px",animation:g?A.mT:null,onAnimationEnd:()=>{f(!1)},marginBottom:(0,c.pq5)(l),onClick:()=>{f(!0),function(t,n){e||i||(async()=>{(0,d.wz)(t,n),(0,q.GF)({userInteractionType:H.K.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:y,event:t,productList:[n],ctaList:t.cta})})()}(j,w),window.location.href=function(t){return(0,c.lj5)(l)?t.product_link+"?"+(0,c.awP)(l)+"&"+(0,c.n9s)(l)+"&"+(0,c.vaK)(l):t.product_link}(w)},_hover:{backgroundColor:(0,W.lA)(n,8)},cursor:"pointer",children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*b+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:o+" !important",color:"white !important"},children:(0,c.Pvx)(l)})})})})})},U=i(7009),B=i(5945),Y=i(5456),X=i(6984),$=i(6227),G=i(7329),J=(i(9111),i(9748));function Q(t){var e;const[i]=(0,u.j1)("whatmoreSecondaryColor"),[n]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),[l,a]=(0,r.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),h=t.onClick,p=t.width,v=t.height,m=t.title,g=t.showInProgressIcon;return(0,x.jsxs)(s.xu,{display:"flex",width:p,height:v,padding:"2x",boxShadow:"lg",animation:l?A.mT:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:["awaitingVariantSelection"==t.cartState&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",backgroundColor:"white",onClick:e=>{e.stopPropagation(),t.updateCartState("init"),a(!0)},children:(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:n+" !important",color:"#343434 !important"},children:["\xa0","Cancel","\xa0"]})}),(0,x.jsxs)(s.Kq,{direction:"row",backgroundColor:g?(0,W.lA)(i,8):i,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",onClick:t=>{t.stopPropagation(),h(),a(!0)},children:[(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:n+" !important",color:(0,c.KCy)(o)+" !important"},children:["\xa0",m,"\xa0"]}),g?(0,x.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,x.jsx)(G.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*d+"px"}})}):(0,x.jsx)(x.Fragment,{})]})]})}function tt(t){var e;const[i]=(0,u.j1)("whatmoreSecondaryColor"),[n]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),[l,a]=(0,r.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),h=t.onClick,p=t.width,v=t.height;return(0,x.jsx)(s.xu,{width:p,height:v,padding:"2x",boxShadow:"lg",backgroundColor:i,onClick:t=>{t.stopPropagation(),h(),a(!0)},animation:l?A.mT:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",children:(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:n+" !important",color:(0,c.KCy)(o)+" !important"},children:["\xa0",(0,c.tan)(o),"\xa0"]})})})})}function et(t){var e;const[i]=(0,u.j1)("whatmorePrimaryFont"),[n]=(0,u.j1)("whatmoreShopId"),o=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),r=t.width,l=t.height;return(0,x.jsx)(s.xu,{width:r,height:l,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:"gray",borderWidth:"1px",onClick:t=>{t.stopPropagation()},children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:(0,x.jsxs)(s.xv,{color:"gray",lineHeight:"100%",fontSize:1.3*o+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:"gray !important"},children:["\xa0"," Sold Out ","\xa0"]})})})}function it(t){var e;const[i]=(0,u.j1)("whatmoreSecondaryColor"),[n]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),r=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),l=t.onClick,a=t.cartCount,d=t.width,c=t.height,h=t.onCartIconClick;return(0,x.jsx)(s.xu,{width:d,height:c,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:i,borderWidth:"1px",onClick:t=>{t.stopPropagation()},cursor:"pointer",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:[(0,x.jsx)(s.M5,{paddingX:"5px",onClick:()=>{h()},children:"1972174947"!=o&&"55194878152"!=o?(0,x.jsx)($.Z,{sx:{color:i,fontSize:1.6*r}}):(0,x.jsx)(J.zx,{size:"sm",_hover:{bg:i},sx:{bg:i},children:(0,x.jsx)(s.xv,{paddingX:"6px",color:"white",sx:{fontSize:.85*r},children:"GO TO CART"})})}),(0,x.jsx)(s.xv,{color:i,fontSize:1.3*r+"px !important",fontWeight:"semibold !important",sx:{fontFamily:n+" !important"},children:a}),(0,x.jsx)(s.M5,{paddingX:"5px",onClick:t=>{t.stopPropagation(),l()},children:(0,x.jsx)(X.Z,{sx:{color:i,fontSize:1.6*r}})})]})})}var nt=function(t){var e,i,n,o;const[r]=(0,u.j1)("whatmoreShopId"),l=t.event,a=t.product,d=null!==(e=t.baseFontSize)&&void 0!==e?e:10,s=null===(i=t.showAddedToCart)||void 0===i||i,c=t.cartState,h=t.cartCount,p=t.onClickAtc,v=t.onCartIconClick;function m(){p()}const g=null!==(n=t.width)&&void 0!==n?n:"100%",f=null!==(o=t.height)&&void 0!==o?o:"100%";return"errored"==c?(0,x.jsx)(L.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:f,width:g},children:(0,x.jsx)(et,{event:l,product:a,baseFontSize:d,width:g,height:f})}):"init"==c?0==h?(0,x.jsx)(tt,{onClick:m,event:l,product:a,baseFontSize:d,width:g,height:f}):s?(0,x.jsx)(L.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:f,width:g},children:(0,x.jsx)(it,{onClick:m,event:l,product:a,baseFontSize:d,cartCount:h,width:g,height:f,onCartIconClick:v})}):(0,x.jsx)(tt,{onClick:m,event:l,product:a,baseFontSize:d,width:g,height:f}):(0,x.jsx)(Q,{onClick:m,cartState:c,updateCartState:t.updateCartState,event:l,product:a,baseFontSize:d,width:g,height:f,title:"awaitingVariantSelection"==c?"Done":"",showInProgressIcon:"atcApiCallInProgress"==c||"productVariantDetailsApiCallInProgress"==c})},ot=i(6967),rt=i(6230),lt=i(4844);const at=(0,u.MO)("isInDesignMode"),dt=(0,u.MO)("isDemoBrand");async function st(t,e,i,n,o,r,l,a,d){return"shopify"==i?(0,lt.wW)(t,e,n,l,a,d):(at||dt||(async()=>{(0,ot.FF)(o,r)})(),(0,rt.jg)(t,e,n))}function ct(t,e){return"shopify"==t?(0,lt.JL)(e):(0,rt.TE)(e)}var ut=i(513);var ht=function(t,e,i){const[n]=(0,u.j1)("whatmoreShopId"),[o]=(0,u.j1)("isInDesignMode"),[l]=(0,u.j1)("isDemoBrand"),[a,s]=(0,r.useState)(null),h=(0,r.useRef)(null),{closeClickComponent:v}=(0,r.useContext)(ri),{whatmoreUserInfo:x}=(0,r.useContext)(V.I),[m,g]=(0,r.useState)({state:"init",cart_count:t});function f(t,e){g({state:t,cart_count:null!==e&&void 0!==e?e:m.cart_count}),"init"!=t&&"errored"!=t?(0,u.bU)("whatmoreAllowAutoSlide",!1):(0,u.bU)("whatmoreAllowAutoSlide",!0)}function w(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}function j(t,r){const a=function(t){const e=h.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));return 0==e.length?null:e[0].id}(t);if(!a)return void f("init",m.cart_count);f("atcApiCallInProgress",null);st(a,1,(0,c.Ipo)(n),n,i,e,r,null===i||void 0===i?void 0:i.location,null===x||void 0===x?void 0:x.userType).then((t=>{if(!t.ok)throw new Error(t.status);return t.json()})).then((t=>(function(t,e,i){o||l||(async()=>{(0,d.JX)(t,e,i)})()}(i,e,1),f("init",m.cart_count+1),(0,u.bU)("whatmoreAddedToCart",!0),"72550089015"==n&&(0,u.MO)("whatmoreAddedToCart")&&(0,ut.D)(n,(()=>{}),100,window.location.hostname),(0,c.IKD)(n)&&setTimeout((()=>function(){const t=window.location.origin+"/cart";window.location.href=t}()),500),t))).catch((t=>{f("errored",null),console.error("Error while adding to cart:",t)}))}return[m,f,a,function(t){f("productVariantDetailsApiCallInProgress",null),(0,p.p)(e,(0,c.Ipo)(n),n).then((e=>{h.current=e.variants;const i=function(t){var e=[],i=[],n=[];return t.variants.forEach((o=>{var r,l,a;o.option1&&e.push({option:o.option1,available:null===(r=o.available)||void 0===r||r,type:t.options[0].name}),o.option2&&i.push({option:o.option2,available:null===(l=o.available)||void 0===l||l,type:t.options[1].name}),o.option3&&n.push({option:o.option3,available:null===(a=o.available)||void 0===a||a,type:t.options[2].name})})),e=e.reduce(((t,e,i)=>{var n=t.filter((t=>t.option==e.option));return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)}),[]),i=i.reduce(((t,e,i)=>{var n=t.filter((t=>t.option==e.option));return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)}),[]),n=n.reduce(((t,e,i)=>{var n=t.filter((t=>t.option==e.option));return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)}),[]),[e,i,n]}(e);s(i),!function(t){return t[0].length<=1&&t[1].length<=1&&t[2].length<=1}(i)?f("awaitingVariantSelection",null):!function(){if(h.current&&h.current.length>=1)return h.current.filter((t=>t.available)).length>=1;return!1}()?f("errored",null):j([w(i[0]),w(i[1]),w(i[2])],t)})).catch((t=>{f("errored",null)}))},j,function(t){var e,i;const o=h.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));if(0==o.length)return null;const r=null!==(e=o[0].price)&&void 0!==e?e:0,l=null!==(i=o[0].compare_at_price)&&void 0!==i?i:0;return{price:"whatmore"==(0,c.Ipo)(n)?r:r/100,compare_price:"whatmore"==(0,c.Ipo)(n)?l:l/100}},function(){"do_nothing"!==(0,c.v9M)(n)&&("go_to_cart_page"!==(0,c.v9M)(n)?"open_cart_slider"!==(0,c.v9M)(n)||null!==v&&v():ct((0,c.Ipo)(n),n))}]},pt=i(9363);var vt=function(t){var e,i,n,o;const l=t.productVariantOptions,a=null!==(e=t.width)&&void 0!==e?e:"100%",d=null!==(i=t.height)&&void 0!==i?i:"fit-content",h=null!==(n=t.baseFontSize)&&void 0!==n?n:10,p=t.onOptionSelected,v=null!==(o=t.optionTitleColor)&&void 0!==o?o:"black",m=t.data,[f]=(0,u.j1)("whatmoreSecondaryColor"),[w]=(0,u.j1)("whatmorePrimaryFont"),[j]=(0,u.j1)("whatmoreShopId");function y(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}const[C,S]=(0,r.useState)([y(l[0]),y(l[1]),y(l[2])]);return(0,r.useEffect)((()=>{p(C)}),[C]),(0,x.jsx)(s.Kq,{direction:"column",width:a,height:d,justifyContent:"flex-start",alignItems:"center",spacing:"5px",children:l.map(((e,i)=>{if(0!=e.length)return(0,x.jsxs)(s.Kq,{width:"100%",direction:"column",alignItems:"center",justifyContent:"flex-start",children:[(0,x.jsx)(s.M5,{width:"100%",children:(0,x.jsx)(s.iz,{color:"blackAlpha.500",size:"1px",width:"20%"})}),(0,x.jsxs)(s.xv,{as:"b",fontSize:1.2*h+"px",sx:{color:v+" !important",fontFamily:w+" !important"},align:"center",children:["\xa0",e[0].type,"\xa0"]}),(0,x.jsx)(s.kC,{gap:"6px",wrap:"wrap",justify:"center",children:e.map(((e,n)=>{var o,r,l,a,d,u,p,v,f,y,b,I,k,_,F,T;const E=0==i||(null===m||void 0===m||null===(o=m.variants)||void 0===o?void 0:o.find((t=>t[`option${i}`]==(null===C||void 0===C?void 0:C[i-1])&&t[`option${i+1}`]==(null===e||void 0===e?void 0:e.option))));return(0,x.jsx)(x.Fragment,{children:E&&(0,x.jsx)(s.xu,{borderRadius:"Colour"===(null===e||void 0===e?void 0:e.type)||null!==e&&void 0!==e&&e.type.toLowerCase().includes("color")?"50%":"2px",onClick:t=>{t.stopPropagation(),e.available&&function(t,e){if(2==e)S([C[0],C[1],t]);else if(1==e){var i,n;S([C[0],t,null===m||void 0===m||null===(i=m.variants)||void 0===i||null===(n=i.find((e=>(null===e||void 0===e?void 0:e.option2)==t)))||void 0===n?void 0:n.option3])}else{var o,r,l,a,d,s;const e=null===m||void 0===m||null===(o=m.variants)||void 0===o||null===(r=o.find((e=>(null===e||void 0===e?void 0:e.option1)==t)))||void 0===r?void 0:r.option2;S([t,null===m||void 0===m||null===(l=m.variants)||void 0===l||null===(a=l.find((e=>(null===e||void 0===e?void 0:e.option1)==t)))||void 0===a?void 0:a.option2,null===m||void 0===m||null===(d=m.variants)||void 0===d||null===(s=d.find((t=>(null===t||void 0===t?void 0:t.option2)==e)))||void 0===s?void 0:s.option3])}}(e.option,i)},backgroundColor:e.option==C[i]?"black":"white",cursor:"pointer",children:("Colour"===(null===e||void 0===e?void 0:e.type)||null!==e&&void 0!==e&&e.type.toLowerCase().includes("color"))&&((null===t||void 0===t||null===(r=t.finalArr)||void 0===r||null===(l=r.finalArr)||void 0===l?void 0:l.length)>0&&(null===t||void 0===t||null===(a=t.finalArr)||void 0===a||null===(d=a.finalArr)||void 0===d||!d.includes(null))||(null===t||void 0===t||null===(u=t.finalArr)||void 0===u||null===(p=u.finalArrExternal)||void 0===p?void 0:p.length)>0&&(null===t||void 0===t||null===(v=t.finalArr)||void 0===v||null===(f=v.finalArrExternal)||void 0===f||!f.includes(null)))?(0,x.jsx)(g.Ee,{padding:"2px",borderRadius:(0,c.lmH)(j),width:"58px",height:"58px",style:{cursor:null!==e&&void 0!==e&&e.available?"pointer":"not-allowed",opacity:null!==e&&void 0!==e&&e.available?1:.5,filter:null!==e&&void 0!==e&&e.available?"none":"grayscale(100%)"},src:(0,pt.s)(null!==(y=null===t||void 0===t||null===(b=t.finalArr)||void 0===b||null===(I=b.finalArr)||void 0===I||null===(k=I.find((t=>(null===t||void 0===t?void 0:t.color)==(null===e||void 0===e?void 0:e.option))))||void 0===k?void 0:k.src)&&void 0!==y?y:null===t||void 0===t||null===(_=t.finalArr)||void 0===_||null===(F=_.finalArrExternal)||void 0===F||null===(T=F.find((t=>(null===t||void 0===t?void 0:t.color)==(null===e||void 0===e?void 0:e.option))))||void 0===T?void 0:T.optionsrc,"?width=400&height=400")}):(0,x.jsxs)(s.xv,{as:e.available?"samp":"s",fontSize:h+"px",sx:{color:(e.available?e.option==C[i]?"white":"black":"gray")+" !important",fontFamily:w+" !important"},align:"center",paddingX:(P=e.option,P.length>=3?"0px":.5*h+"px"),children:["\xa0",e.option,"\xa0"]})})});var P}))},i)]},i)}))})},xt=i(9219),mt=i(6524);var gt=function(t){var e,i,n,o,l,a;const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[f]=(0,u.j1)("whatmoreSecondaryColor"),w=(0,u.MO)("whatmoreSecondaryColorShade900"),[j]=(0,u.j1)("whatmorePrimaryFont"),[y]=(0,u.j1)("whatmoreShopId"),[C,S,b,I]=(0,h.Z)(),[k,_]=(0,r.useState)(!1),[F,T]=(0,r.useState)(t.product),{whatmoreUITheme:E}=(0,r.useContext)(V.I),{whatmoreWidgetSourceDetails:P}=(0,r.useContext)(V.I),[O,z,R,M,D,K,Z]=ht(0,F,t.event),[X,$]=(0,r.useState)(null),[G,Q]=(0,r.useState)(parseFloat(F.price)),[tt,et]=(0,r.useState)(parseFloat(F.compare_price)),[it,ot]=(0,r.useState)(F.currency),[rt,lt]=(0,r.useState)(null),at=t.event,dt=t.productClickHandler,{whatmoreIsPreviewMode:st}=(0,r.useContext)(V.I),[ct,ut]=(0,r.useState)(null);(0,r.useEffect)((()=>{(0,c.N8M)(y)&&(0,xt.Rb)(F,(0,c.Ipo)(y),y).then((t=>{T(t),Q(parseFloat(t.price)),et(parseFloat(t.compare_price)),ot(t.currency)}));(async()=>{const t=await(0,p.p)(F,(0,c.Ipo)(y),y);lt(t)})()}),[]),(0,r.useEffect)((()=>{var t,e;const i=null!=rt?null===rt||void 0===rt||null===(t=rt.options)||void 0===t?void 0:t.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))})):-1,n=-1!==i?null===rt||void 0===rt||null===(e=rt.variants)||void 0===e?void 0:e.map((t=>{var e,n;const o=null===t||void 0===t?void 0:t[`option${i+1}`];return null!==t&&void 0!==t&&null!==(e=t.featured_image)&&void 0!==e&&e.src?{color:o,src:null===t||void 0===t||null===(n=t.featured_image)||void 0===n?void 0:n.src}:null})):[];let o=[];var r;-1!==i&&(o=null===rt||void 0===rt||null===(r=rt.images)||void 0===r?void 0:r.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc}))));ut({position:i,finalArr:n,finalArrExternal:o})}),[rt]);var gt=.68*I,ft=.55*gt,wt=.4*gt,jt=gt*(.55-.4),yt=gt+"px",Ct=wt+"px",St=jt+"px",bt=.12*wt;const It=(0,c.ITD)(y);function kt(){window.location.href=function(t){return(0,c.lj5)(y)?t.product_link+"?"+(0,c.awP)(y)+"&"+(0,c.n9s)(y)+"&"+(0,c.vaK)(y):t.product_link}(F)}const _t=P.landingLocationType,Ft=P.templateType,Tt=(0,mt.NY)(_t)+(0,mt.dS)(Ft)+"_"+(null===at||void 0===at?void 0:at.event_id);return(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:N,marginBottom:(0,c.pq5)(y),width:yt,height:"fit-content",boxShadow:"round"==E?"dark-lg":null,onClick:()=>{!function(t,e){v||m||(async()=>{(0,d.wz)(t,e)})(),"72550089015"==y?kt():dt(e),_(!0)}(at,F)},backgroundColor:(0,W.lA)("#ffffff",(0,c.U5_)(y)),animation:k?A.mT:null,borderRadius:"round"==E?"xl":null,overflow:"hidden",onAnimationEnd:()=>{_(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(y),borderColor:(0,c.qPe)(y)},children:[(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,x.jsx)(s.xu,{height:Ct,width:Ct,bgColor:w,children:(0,x.jsx)(g.Ee,{width:Ct,height:Ct,src:(0,pt.s)(null!==(e=null!==(i=null===ct||void 0===ct||null===(n=ct.finalArr)||void 0===n||null===(o=n.find((t=>(null===t||void 0===t?void 0:t.color)==(null===X||void 0===X?void 0:X[null===ct||void 0===ct?void 0:ct.position]))))||void 0===o?void 0:o.src)&&void 0!==i?i:null===ct||void 0===ct||null===(l=ct.finalArrExternal)||void 0===l||null===(a=l.find((t=>(null===t||void 0===t?void 0:t.color)==(null===X||void 0===X?void 0:X[null===ct||void 0===ct?void 0:ct.position]))))||void 0===a?void 0:a.src)&&void 0!==e?e:F.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(y)+" !important"}})}),(0,x.jsxs)(s.xu,{height:Ct,width:gt-wt+"px",children:[(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:(0,c.Fr)(y)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"4px",paddingY:"10px",children:[(0,x.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",1.1*bt+"px","important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",j,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"),t.style.setProperty("padding","0","important"),t.style.setProperty("margin-bottom","4px","important"),t.style.setProperty("font-weight","normal","important"))},children:(0,B.s)(null==F.title?"":F.title.toString())}),(0,c.QaY)(y)?(0,x.jsxs)(s.Kq,{direction:(0,c.$zZ)(y)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",borderRadius:"round"==E?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"4px",sx:{margin:"0px !important",marginBottom:"4px !important"},children:[(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*bt*(0,c.Rqt)(y)+"px !important",fontWeight:"semibold !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:j+" !important",color:(0,c.Uyp)(y)+" !important",padding:"0px !important",letterSpacing:"normal !important",margin:"0px !important"},children:["\xa0"," "+(0,xt.jx)("10588815418"==y||"88566890817"==y||"27303477337"==y?(null===rt||void 0===rt?void 0:rt.price)/100:G,"",y,it)," \xa0"]}),(0,Y.B)(G,tt)?(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*bt*(0,c.Rqt)(y)+"px !important",fontWeight:"medium !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:j+" !important",color:(0,c.kPs)(y)+" !important",margin:"0px !important",letterSpacing:"normal !important",textDecoration:"line-through !important"},children:[" ",(0,xt.jx)("10588815418"==y||"88566890817"==y||"27303477337"==y?(null===rt||void 0===rt?void 0:rt.compare_at_price)/100:tt,"",y,it)]}):(0,x.jsx)(x.Fragment,{})]}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xv,{fontSize:.82*bt*(0,c.Rqt)(y)+"px",fontWeight:"medium",lineHeight:"110%",sx:{margin:"0px !important",fontFamily:j+" !important",color:(0,c.eod)(y)+" !important"},children:st?(0,c.qde)(y):(0,c.aTS)(y)})]}),(0,c.Fr)(y)?(0,x.jsx)(s.Kq,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,x.jsx)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:w,sx:{borderRadius:"round"==E?"5px":"0px",padding:"2px"},spacing:"0px",children:"1972174947"!=y&&"55194878152"!=y?(0,x.jsx)(U.Z,{sx:{color:f,fontSize:1.3*bt+"px"}}):(0,x.jsx)(J.zx,{size:"sm",_hover:{bg:f},sx:{bg:f},children:(0,x.jsx)(s.xv,{color:"white",paddingX:"6px",fontSize:.8*bt+"px",children:"VIEW PRODUCT"})})}),(0,x.jsx)(s.xu,{width:"2px"})]})}):(0,x.jsx)(x.Fragment,{})]})]}),(0,x.jsx)(L.Rg,{unmountOnExit:!0,initialScale:.5,in:"awaitingVariantSelection"==O.state,style:{height:"fit-content",width:"100%"},children:"awaitingVariantSelection"==O.state&&null!=R?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",marginTop:.1*ft+"px",marginBottom:.1*ft+"px",overflowY:"auto",overflowX:"hidden",maxHeight:ft*It+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,x.jsx)(vt,{width:yt,height:"fit-conten",event:at,product:F,finalArr:ct,data:rt,productVariantOptions:R,baseFontSize:1.2*bt,onOptionSelected:t=>{!function(t){$(t);const e=K(t);e&&(Q(e.price),et(e.compare_price))}(t)}})}):(0,x.jsx)(x.Fragment,{})}),(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:St,justifyContent:"center",alignItems:"center",children:(0,x.jsx)(nt,{baseFontSize:.3*jt,event:at,product:F,cartState:O.state,cartCount:O.cart_count,updateCartState:z,onClickAtc:t=>{"init"==O.state?(M(Tt),(0,q.GF)({userInteractionType:H.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:P,event:at,productList:[F],ctaList:at.cta})):"awaitingVariantSelection"==O.state&&D(X,Tt)},onCartIconClick:()=>{Z()}})})]})},ft=i(3867);var wt=function(t){var e,i,n;const[o]=(0,u.j1)("isInDesignMode"),[r]=(0,u.j1)("isDemoBrand"),[l]=(0,u.j1)("whatmoreSecondaryColor"),[a]=(0,u.j1)("whatmorePrimaryFont"),c=t.event,h=t.product,p=null!==(e=t.baseFontSize)&&void 0!==e?e:10,v=null!==(i=t.width)&&void 0!==i?i:"fit-content",m=null!==(n=t.height)&&void 0!==n?n:"fit-content";return(0,x.jsx)(s.rU,{href:h.product_link,color:l,onClick:()=>{!function(t,e){o||r||(async()=>{(0,d.$L)(t,e)})()}(c,h)},children:(0,x.jsx)(s.xu,{width:v,height:m,padding:"2x",boxShadow:"lg",borderRadius:"md",backgroundColor:"white",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",spacing:"5px",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{lineHeight:"100%",fontSize:1.4*p,fontWeight:"semibold",sx:{fontFamily:a+" !important",color:l+" !important"},children:" VIEW MORE "})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(U.Z,{sx:{color:l,fontSize:1.4*p}})})]})})})},jt=i(6163);function yt(t){var e;const[i]=(0,u.j1)("whatmoreSecondaryColor"),[n]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),[l,a]=(0,r.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),h=t.onClick,p=t.width,v=t.height,m=t.title;return(0,x.jsx)(s.xu,{width:p,height:v,padding:"2x",boxShadow:"lg",backgroundColor:i,onClick:t=>{t.stopPropagation(),h(),a(!0)},animation:l?A.mT:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",children:(0,x.jsxs)(s.xv,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},lineHeight:"100%",fontSize:1.4*d+"px",fontWeight:"semibold",sx:{fontFamily:n+" !important",color:(0,c.KCy)(o)+" !important"},children:["\xa0",m,"\xa0"]})})})}var Ct=function(t){var e,i,n;const[o]=(0,u.j1)("whatmoreShopId"),r=t.event,l=t.product,a=null!==(e=t.baseFontSize)&&void 0!==e?e:10,d=t.onShopNowClick,s=null!==(i=t.width)&&void 0!==i?i:"100%",h=null!==(n=t.height)&&void 0!==n?n:"100%";return(0,x.jsx)(yt,{onClick:function(){d()},event:r,product:l,baseFontSize:a,width:s,height:h,title:(0,c.Pvx)(o)})};var St=function(t){var e;const[i]=(0,u.j1)("isInDesignMode"),[n]=(0,u.j1)("isDemoBrand"),[o]=(0,u.j1)("whatmorePrimaryFont"),[l]=(0,u.j1)("whatmoreShopId"),[a,p,v,m]=(0,h.Z)(),[f,w]=(0,r.useState)(!1),[j,y]=(0,r.useState)(t.product),{whatmoreWidgetSourceDetails:C}=(0,r.useContext)(V.I),[S,b,I,k,_,F,T]=ht(0,j,t.event),[E,P]=(0,r.useState)(null),[O,z]=(0,r.useState)(parseFloat(j.price)),[R,M]=(0,r.useState)(parseFloat(j.compare_price)),[D,K]=(0,r.useState)(j.currency),W=t.event,Z=t.productClickHandler,U=null!==(e=t.tileWidthFactor)&&void 0!==e?e:1,X=C.landingLocationType,$=C.templateType,G=(0,mt.NY)(X)+(0,mt.dS)($)+"_"+(null===W||void 0===W?void 0:W.event_id);(0,r.useEffect)((()=>{(0,c.N8M)(l)&&(0,xt.Rb)(j,brandDomainContext(l),l).then((t=>{y(t),z(parseFloat(t.price)),M(parseFloat(t.compare_price)),K(t.currency)}))}),[]);var J=m*U,Q=.3*J,tt=J+"px",et=.7*Q,it=.9*et,ot=.12*Q;const rt=(0,c.ITD)(l);function lt(t,e){i||n||(async()=>{(0,d.wz)(t,e)})(),Z(e),w(!0)}return(0,x.jsx)(s.Kq,{direction:"row",width:tt,height:"fit-content",justifyContent:"center",children:(0,x.jsx)(s.xu,{marginTop:N,marginBottom:(0,c.pq5)(l),width:tt,onClick:t=>{},animation:f?A.mT:null,borderRadius:"lg",onAnimationEnd:()=>{w(!1)},children:(0,x.jsxs)(s.Kq,{direction:"column",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",spacing:"0px",children:[(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"70%",justifyContent:"space-around",alignItems:"center",borderTopRadius:"lg",overflow:"hidden",onClick:()=>{lt(W,j)},children:[(0,x.jsx)(s.xu,{height:et+"px",width:et+"px",children:(0,x.jsx)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",children:(0,x.jsx)(s.xu,{height:it+"px",width:it+"px",borderRadius:"lg",bgColor:"gray.100",overflow:"hidden",children:(0,x.jsx)(g.Ee,{width:it+"px",height:it+"px",src:j.thumbnail_image,objectFit:"cover"})})})}),(0,x.jsx)(s.xu,{height:et+"px",width:J-et+"px",children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"space-between",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingY:"10px",spacing:"2px",children:[(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*ot+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:o+" !important",color:"white !important"},children:(0,B.s)(j.title.toString())}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",aligntItems:"center",marginTop:"5px",children:[(0,c.QaY)(l)?(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"flex-start",aligntItems:"center",borderRadius:"lg",backgroundColor:"blackAlpha.500",paddingX:"10px",paddingY:"5px",children:[(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:1*ot+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:o+" !important",color:"white !important"},children:["\xa0"," ",(0,xt.jx)(parseFloat(O),"",l,D)," \xa0"]}),(0,x.jsx)(s.M5,{children:(0,Y.B)(j.price,j.compare_price)?(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.8*ot+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:o+" !important",color:"#F9F6EE !important",textDecoration:"line-through !important"},children:[" ",(0,xt.jx)(parseFloat(R),"",l,D)]}):(0,x.jsx)(x.Fragment,{})})]}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(ft.Z,{storeId:l,productId:j.client_product_id,productLink:j.product_link,fontSize:1*ot,fontColor:"white"})})]})]})})]}),(0,x.jsx)(L.Rg,{unmountOnExit:!0,initialScale:.5,in:"awaitingVariantSelection"==S.state,style:{height:"fit-content",width:"100%"},children:"awaitingVariantSelection"==S.state&&null!=I?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",marginTop:.1*Q+"px",marginBottom:.1*Q+"px",overflowY:"auto",overflowX:"hidden",maxHeight:Q*rt+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,x.jsx)(vt,{width:tt,height:"fit-content",event:W,product:j,productVariantOptions:I,baseFontSize:1*ot,onOptionSelected:t=>{!function(t){P(t);const e=F(t);e&&(z(e.price),M(e.compare_price))}(t)},optionTitleColor:"white"})}):(0,x.jsx)(x.Fragment,{})}),(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"30%",justifyContent:"center",alignItems:"center",paddingBottom:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,x.jsx)(s.xu,{width:"100%",height:"100%",children:(0,x.jsx)(wt,{baseFontSize:.8*ot,event:W,product:j,width:"100%",height:"100%"})}),(0,x.jsx)(s.xu,{width:"100%",height:"100%",borderRadius:"md",overflow:"hidden",children:(0,c.Ib9)(l)?(0,x.jsx)(Ct,{baseFontSize:.8*ot,event:W,product:j,borderRadius:"md",onShopNowClick:t=>{lt(W,j)}}):(0,x.jsx)(x.Fragment,{children:"form"===(0,c._5p)(l)?(0,x.jsx)(jt.default,{baseFontSize:.8*ot,event:W,product:j,width:"100%",height:"100%",showAddedToCart:!0}):(0,x.jsx)(nt,{baseFontSize:.8*ot,event:W,product:j,cartState:S.state,cartCount:S.cart_count,borderRadius:"md",onClickAtc:t=>{"init"==S.state?(k(G),(0,q.GF)({userInteractionType:H.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:C,event:W,productList:[j],ctaList:W.cta})):"awaitingVariantSelection"==S.state&&_(E,G)},onCartIconClick:()=>{T()}})})})]})]})})})};var bt=function(t){const[e]=(0,u.j1)("isInDesignMode"),[i]=(0,u.j1)("isDemoBrand"),[n]=(0,u.j1)("whatmoreSecondaryColor"),o=(0,u.MO)("whatmoreSecondaryColorShade900"),[l]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[p,v,m,f]=(0,h.Z)(),[w,j]=(0,r.useState)(!1),[y,C]=(0,r.useState)(t.product),{whatmoreUITheme:S}=(0,r.useContext)(V.I),[b,I]=(0,r.useState)(!(0,c.N8M)(a)),[k,_]=(0,r.useState)(parseFloat(y.price)),[F,T]=(0,r.useState)(parseFloat(y.compare_price)),[E,P]=(0,r.useState)(y.currency),O=t.event;t.productClickHandler,(0,r.useEffect)((()=>{(0,c.N8M)(a)&&(0,xt.Rb)(y,(0,c.Ipo)(a),a).then((t=>{C(t),_(parseFloat(t.price)),T(parseFloat(t.compare_price)),P(t.currency),I(!0)}))}),[]);var L=.68*f,z=.4*L,R=L+"px",M=z+"px",D=L*(.55-.4)+"px",K=.12*z;(0,c.ITD)(a);const{whatmoreWidgetSourceDetails:Z}=(0,r.useContext)(V.I);function X(t){return(0,c.lj5)(a)?t.product_link+"?"+(0,c.awP)(a)+"&"+(0,c.n9s)(a)+"&"+(0,c.vaK)(a):t.product_link}function $(t,n){e||i||(async()=>{(0,d.wz)(t,n),(0,q.GF)({userInteractionType:H.K.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:Z,event:t,productList:[n],ctaList:t.cta})})(),j(!0)}return(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:N,marginBottom:(0,c.pq5)(a),width:R,height:"fit-content",boxShadow:"round"==S?"dark-lg":null,onClick:()=>{$(O,y),window.location.href=X(y)},backgroundColor:(0,W.lA)("#ffffff",(0,c.U5_)(a)),animation:w?A.mT:null,borderRadius:"round"==S?"xl":null,overflow:"hidden",onAnimationEnd:()=>{j(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(a),borderColor:(0,c.qPe)(a)},children:[(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,x.jsx)(s.xu,{height:M,width:M,bgColor:o,children:(0,x.jsx)(g.Ee,{width:M,height:M,src:(0,pt.s)(y.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(a)+" !important"}})}),(0,x.jsxs)(s.xu,{height:M,width:L-z+"px",children:[(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:(0,c.Fr)(a)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingTop:"10px",paddingBottom:"16px",children:[(0,x.jsx)(s.xv,{as:"p",ref:t=>{t&&(t.style.setProperty("min-height","0","important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("-webkit-box-orient","vertical","important"))},sx:{paddingLeft:"8px",fontFamily:l+" !important",color:"black !important",lineHeight:"120% !important",fontWeight:"medium !important",fontSize:1.1*K+"px !important"},children:(0,B.s)(null==y.title?"":y.title.toString())}),(0,c.QaY)(a)?(0,x.jsxs)(s.Kq,{direction:(0,c.$zZ)(a)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",marginTop:"5px",borderRadius:"round"==S?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"5px",children:[b&&(0,x.jsxs)(s.xv,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},noOfLines:1,fontSize:.9*K+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:l+" !important",color:(0,c.Uyp)(a)+" !important",margin:"0px !important"},children:[" "+(0,xt.jx)(k,"",a,E)," \xa0"]}),(0,Y.B)(k,F)&&b?(0,x.jsxs)(s.xv,{as:"s",style:{minHeight:0,textDecoration:"line-through"},noOfLines:1,fontSize:.9*K+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:l+" !important",color:(0,c.kPs)(a)+" !important",margin:"0px !important"},children:[" ",(0,xt.jx)(F,"",a,E)]}):(0,x.jsx)(x.Fragment,{})]}):(0,x.jsx)(x.Fragment,{}),""!=(0,c.sG7)(a)&&(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*K+"px",lineHeight:"100%",paddingTop:"6px",sx:{fontFamily:(0,c.V3Y)(a)+" !important",color:(0,c.aUT)(a)+" !important",margin:"0px !important"},children:["\xa0",(0,c.sG7)(a)," \xa0"]})]}),(0,c.Fr)(a)?(0,x.jsx)(s.Kq,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,x.jsx)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:o,sx:{borderRadius:"round"==S?"5px":"0px",padding:"2px"},spacing:"0px",children:(0,x.jsx)(U.Z,{sx:{color:n,fontSize:1.3*K+"px"}})}),(0,x.jsx)(s.xu,{width:"2px"})]})}):(0,x.jsx)(x.Fragment,{})]})]}),(0,c.pp3)(a)&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:D,justifyContent:"center",alignItems:"center",children:(0,x.jsx)(Ct,{baseFontSize:.8*K,event:O,product:y,borderRadius:"md",onShopNowClick:t=>{$(O,y),window.location.href=X(y)}})})]})};var It=function(t){const[e]=(0,u.j1)("whatmoreShopId"),i=(0,c.eyg)(e),n=t.event,o=t.product;return"broad-tile"==i?(0,x.jsx)(gt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"broad-tile-no-cta"==i?(0,x.jsx)(bt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"link_only"==i?(0,x.jsx)(Z,{product:t.product,event:t.event}):"narrow-tile"==i?(0,x.jsx)(St,{event:n,product:o,productClickHandler:t.productClickHandler,tileWidthFactor:n.products.length>1?.68:void 0}):(0,x.jsx)(gt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler})},kt=i(6119),_t=i(3388),Ft=i(7643);var Tt=function(t){const[e,i,n,o]=(0,h.Z)(),[r]=(0,u.j1)("whatmoreShopId"),d=(0,u.MO)("isInDesignMode"),p=(0,u.MO)("isDemoBrand"),v=t.event,m=t.productClickHandler,g=(0,c.eyg)(r);if(!(0,_t.kT)(v))return(0,x.jsx)(x.Fragment,{});if(1==v.products.length&&(void 0==v.cta||0==v.cta.length)){const t=v.products[0];return(0,c.rnv)(r)?(0,x.jsx)(s.Kq,{direction:"horizontal",width:o,height:"fit-content",justifyContent:"center",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))",children:(0,x.jsx)(Ft.u,{userInteractionType:H.K.PRODUCT_CTA_VIEW,event:v,productList:[t],triggerFlag:!d&&!p,children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(St,{event:v,product:t,productClickHandler:m},v.event_id+t.product_id)})})}):(0,x.jsx)(s.Kq,{direction:"horizontal",width:o,height:"fit-content",justifyContent:"center",backgroundImage:"narrow-tile"==g?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))":null,children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(Ft.u,{userInteractionType:H.K.PRODUCT_CTA_VIEW,event:v,productList:[t],triggerFlag:!d&&!p,children:(0,x.jsx)(It,{event:v,product:t,productClickHandler:m},v.event_id+t.product_id)})})})}return(0,x.jsx)(s.M5,{children:(0,x.jsx)("div",{onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,x.jsx)(s.xu,{width:o+"px",backgroundImage:"narrow-tile"==g?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))":null,children:(0,x.jsxs)(l.tq,{className:"product-tile swiper-slide",slidesPerView:1==v.products.length?1:1.4,initialSlide:v.products.length<=2||(0,c.VqZ)(r)?0:1,centeredSlides:!(0,c.VqZ)(r),modules:[a.Gk],mousewheel:{invert:!1,thresholdDelta:20},nested:!0,children:[v.products.map((t=>"oos"!=t.product_status&&(0,x.jsx)(l.o5,{children:(0,x.jsx)(Ft.u,{userInteractionType:H.K.PRODUCT_CTA_VIEW,event:v,productList:[t],triggerFlag:!d&&!p,children:(0,x.jsx)(s.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",alignItems:"center",children:(0,x.jsx)(It,{event:v,product:t,productClickHandler:m},v.event_id+t.product_id)})})},v.event_id+t.product_id))),(0,c.pp3)(r)&&void 0!=v.cta&&v.cta.map((t=>(0,x.jsx)(x.Fragment,{children:""!==t.cta_title.trim()&&(0,x.jsx)(l.o5,{children:(0,x.jsx)(s.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",alignItems:"center",children:(0,x.jsx)(kt.Z,{cta:t},v.event_id+t.cta_id)})},v.event_id+t.cta_id)})))]})})})})};var Et=function(t){const[e,i]=(0,u.j1)("isProductSwiperCatalogOpen"),n=t.event,o=t.productClickHandler;return(0,r.useContext)(ri).isIOS&&e?(0,x.jsx)(Tt,{event:n,productClickHandler:o},n.event_id):(0,x.jsx)(L.MT,{unmountOnExit:!0,initialScale:.2,in:e,children:(0,x.jsx)(Tt,{event:n,productClickHandler:o},n.event_id)})};function Pt(t){const e=t.event,[i,n,o,r]=(0,h.Z)(),[l]=(0,u.j1)("whatmorePrimaryFont");return(0,x.jsx)(s.xu,{width:"fit-content",height:"fit-content",padding:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{overflow:"hidden",size:.15*r+"px",children:(0,x.jsx)(g.Ee,{width:"100%",height:"100%",src:e.thumbnail_image})})}),(0,x.jsx)(s.xu,{width:"fit-content",height:"fit-content",children:(0,x.jsxs)(s.Kq,{direction:"column",width:"fit-content",height:"fit-content",children:[(0,x.jsx)(s.xv,{color:"white",fontSize:.05*r+"px",fontWeight:"bold",fontFamily:"sans-serif",align:"left",sx:{fontFamily:l+" !important"},children:e.presenter_name.substring(0,15)}),(0,x.jsx)(E.Z,{event:e,fontSize:.03*r+"px"})]})})]})})}var Ot=function(t){const[e]=(0,u.j1)("isInDesignMode"),[i]=(0,u.j1)("isDemoBrand"),[n,o]=(0,u.j1)("isProductSwiperCatalogOpen"),[l,a]=(0,j.Z)(),[d,h]=(0,u.j1)("isFirstIndicatorRenderDone"),p=(0,r.useContext)(ri),[v]=(0,u.j1)("whatmoreShopId"),m=t.event,g=t.isLast,f=t.onCloseCallback,w=t.focusRef,C=t.productClickHandler;return(0,x.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",children:(0,x.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,x.jsx)(s.xu,{width:"full",margin:"2px",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"space-between",paddingRight:"10px",paddingLeft:"10px",children:[(0,x.jsx)(Pt,{event:m}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,x.jsx)(y,{focusRef:w}),(0,x.jsx)(O,{event:m,onCloseCallback:f})]})]})}),(0,x.jsx)(s.xu,{width:"100%",height:"100%",onClick:()=>{a(!l)}}),(0,x.jsxs)(s.xu,{width:"full",height:"fit-content",children:[p.totalEvents>1&&!d&&p.showSwipeIndicator?(0,x.jsx)(s.xu,{width:"full",margin:"2px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,x.jsx)(D,{swipeUp:!g})})}):null,void 0!=m.products&&m.products.length>0?(0,x.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(v)?(0,x.jsx)(s.xu,{w:"100%",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(T,{event:m,onToggle:t=>{o("minimize-button"!==t)}})})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,x.jsx)(Et,{event:m,productClickHandler:C})})]}):(0,x.jsx)("div",{})]})]})})};function Lt(t){const[e,i,n,o]=(0,h.Z)(),[l]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d,p]=(0,r.useState)(""),v=t.data,m=(t.event,t.product,t.setShowOptionsChart);var f=.4*o*.8*.13;(0,r.useEffect)((()=>{let t="vanyaclothing.myshopify.com";"1972174947"===a&&(t="vanyaclothing.myshopify.com");const e=`https://app.kiwisizing.com/api/getSizingChart?shop=${t}&product=${null===v||void 0===v?void 0:v.id}&title=${null===v||void 0===v?void 0:v.title}&tags=&cacheSettingsUpdateAt=2020-08-11T15%3A19%3A49.000Z&settingsVersion=19`;fetch(e).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>{var e,i,n,o,r,l;p(null===t||void 0===t||null===(e=t.sizings)||void 0===e||null===(i=e[0])||void 0===i||null===(n=i.layout)||void 0===n||null===(o=n.data)||void 0===o||null===(r=o[0])||void 0===r||null===(l=r.data)||void 0===l?void 0:l.url)})).catch((t=>{console.error("Error fetching data:",t)}))}),[]);const w=`${S.F4`
|
|
69
69
|
0% {
|
|
70
70
|
transform: translateY(100%);
|
|
71
71
|
}
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
0% {
|
|
74
74
|
transform: translateY(100%);
|
|
75
75
|
}
|
|
76
|
-
`} 0.5s`,bt=null===q||void 0===q||null===(e=q.options)||void 0===e?void 0:e.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))})),[It,kt]=(0,r.useState)(-1!==bt?null===(i=q.options)||void 0===i||null===(n=i[bt])||void 0===n||null===(o=n.values)||void 0===o?void 0:o[0]:""),[_t,Ft]=(0,r.useState)({});(0,r.useEffect)((()=>{-1!==bt&&"whatmore"!==(0,c.Ipo)(wt)&&async function(){const t=await(0,lt.m3)(Z);Ft(t)}()}),[]);let Tt=-1,Et=-1!==bt&&null!==_t&&void 0!==_t&&_t.product&&(null===_t||void 0===_t||null===(l=_t.product)||void 0===l||null===(a=l.images)||void 0===a?void 0:a.length)>=(null===_t||void 0===_t||null===(d=_t.product)||void 0===d||null===(p=d.options)||void 0===p||null===(v=p[bt])||void 0===v||null===(m=v.values)||void 0===m?void 0:m.length)?null===_t||void 0===_t||null===(f=_t.product)||void 0===f||null===(w=f.images)||void 0===w?void 0:w.map((t=>{var e,i,n,o,r,l,a,d,s,c,u,h,p,v;const x=null===_t||void 0===_t||null===(e=_t.product)||void 0===e||null===(i=e.options)||void 0===i?void 0:i.findIndex((t=>"Color"==(null===t||void 0===t?void 0:t.name)||"Colour"==(null===t||void 0===t?void 0:t.name)||"COLOR"==(null===t||void 0===t?void 0:t.name)));return{color:(null===t||void 0===t?void 0:t.variant_ids.length)>0?null===_t||void 0===_t||null===(n=_t.product)||void 0===n||null===(o=n.options)||void 0===o||null===(r=o[x])||void 0===r||null===(l=r.values)||void 0===l?void 0:l[Math.min(++Tt,(null===_t||void 0===_t||null===(a=_t.product)||void 0===a||null===(d=a.options)||void 0===d||null===(s=d[bt])||void 0===s||null===(c=s.values)||void 0===c?void 0:c.length)-1)]:null===_t||void 0===_t||null===(u=_t.product)||void 0===u||null===(h=u.options)||void 0===h||null===(p=h[x])||void 0===p||null===(v=p.values)||void 0===v?void 0:v[Math.max(0,Tt)],src:null===t||void 0===t?void 0:t.src}})):[],Pt=[];if("whatmore"==(0,c.Ipo)(wt)&&(null===q||void 0===q||null===(j=q.images)||void 0===j?void 0:j.length)>0){var Ot;var Lt;if(-1!==(null===q||void 0===q||null===(Ot=q.options)||void 0===Ot?void 0:Ot.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))}))))Pt=null===q||void 0===q||null===(Lt=q.images)||void 0===Lt?void 0:Lt.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc})))}return Tt+1<(null===_t||void 0===_t||null===(y=_t.product)||void 0===y||null===(C=y.options)||void 0===C||null===(b=C[bt])||void 0===b||null===(I=b.values)||void 0===I?void 0:I.length)&&(Et=[]),(0,x.jsxs)(s.kC,{sx:{"&::-webkit-scrollbar":{width:"0px"}},id:"whatmore-shopnow-view",position:"relative",maxHeight:"75vh",overflowY:"scroll",direction:"column",bg:"#FFF",height:"fit-content",opacity:"100%",borderTopRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"xl":null,animation:St,children:[(0,x.jsx)(At,{setOpenShopNow:U,setLockSwiper:B,FONT_SIZE:A}),(0,x.jsx)(s.M5,{marginBottom:"10px",px:"20px",py:"5px",children:(0,x.jsx)(s.kC,{bg:"whiteAlpha.900",width:"fit-content",height:"fit-content",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"lg":null,overflow:"hidden",sx:{borderWidth:(0,c.alU)(wt),borderColor:(0,c.qPe)(wt)},children:(0,x.jsx)(s.kC,{width:"100%",children:(0,x.jsx)(Zt.P,{renderElement:t=>(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(s.xu,{width:M+"px",height:D+"px",children:(0,x.jsx)(g.Ee,{width:M+"px",height:D+"px",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"lg":null,src:(0,pt.s)(t.eventData.src,"&width=400&height=400"),alt:Z.handle,sx:{objectFit:(0,c.yOX)(wt)+" !important"},fallback:(0,x.jsx)(K.Z,{width:M+"px",height:D+"px",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"10px":"0px"})})})}),dataList:Et.length>0&&!Et.includes(null)?null===(k=Et)||void 0===k?void 0:k.filter((t=>(null===t||void 0===t?void 0:t.color)==It)):Pt.length>0?[null===(_=Pt)||void 0===_?void 0:_.find((t=>(null===t||void 0===t?void 0:t.color)==It))]:null===q||void 0===q||null===(F=q.images)||void 0===F?void 0:F.map((t=>({src:t.includes("https")?t:"https:"+t}))),spacing:10,defaultHeight:M+"px",defaultWidth:D+"px",retainAlreadyRenderedElements:!0,isScroll:!0})})})}),(0,x.jsx)(Ht,{data:q,product:Z,PRODUCT_TILE_HEIGHT:R,PRODUCT_TILE_WIDTH:z,FONT_SIZE:A,getVariantPrice:Yt,selectedVariantId:et,itemPrice:at,itemQuantity:nt,setItemQuantity:ot,thumbnailImage:mt}),(null===q||void 0===q||null===(T=q.variants)||void 0===T?void 0:T.length)>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s.M5,{paddingTop:"4px",width:"100%",children:(0,x.jsx)(s.iz,{color:(0,c.W8U)(wt),size:"xs",width:"90%"})}),(0,x.jsx)(Vt,{data:q,dividerColor:(0,c.W8U)(wt),setSelectedColor:kt,finalArr:Et,finalArrExternal:Pt,product:Z,PRODUCT_TILE_HEIGHT:R,PRODUCT_TILE_WIDTH:z,FONT_SIZE:A,selectOptionFirstHandler:jt,selectOptionSecondHandler:yt,selectOptionThirdHandler:Ct,getVariantPrice:Yt,selectedOptionFirst:X,selectedOptionSecond:G,selectedOptionThird:Q,selectedVariantId:et})]}),c.$2G&&((null===q||void 0===q?void 0:q.description)||(null===q||void 0===q?void 0:q.body_html))&&(0,x.jsx)(Wt,{PRODUCT_TILE_HEIGHT:R,FONT_SIZE:A,data:q,handleToggle:()=>N(!W),show:W}),(0,x.jsx)(s.xu,{sx:{pointerEvents:"none"},paddingTop:"20px",opacity:0,children:(0,x.jsx)(Kt,{position:"relative",data:q,FONT_SIZE:A,product:Z})}),(0,x.jsx)(Kt,{position:"fixed",selectedVariantId:et,data:q,FONT_SIZE:A,PRODUCT_TILE_WIDTH:z,product:Z,itemQuantity:nt,cartItemCount:st,addToCartFlag:ut,setAddToCartFlag:ht,soldOutFlag:vt,setSoldOutFlag:xt,event:H})]})}const Bt=(t,e,i,n)=>{var o,r,l,a,d,s,c,u,h,p;if(void 0===e&&void 0===i&&void 0===n)return null===t||void 0===t||null===(o=t.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.id;if(void 0===n&&void 0===i)return null===(l=t.variants.find((t=>t.option1===e)))||void 0===l?void 0:l.id;if(void 0===n&&void 0===e)return null===(a=t.variants.find((t=>t.option2===i)))||void 0===a?void 0:a.id;if(void 0===i&&void 0===e)return null===(d=t.variants.find((t=>t.option3===n)))||void 0===d?void 0:d.id;if(void 0===i)return null===(s=t.variants.find((t=>t.option1===e&&t.option3===n)))||void 0===s?void 0:s.id;if(void 0===n)return null===(c=t.variants.find((t=>t.option1===e&&t.option2===i)))||void 0===c?void 0:c.id;if(void 0===e)return null===(u=t.variants.find((t=>t.option2===i&&t.option3===n)))||void 0===u?void 0:u.id;const v=null===t||void 0===t?void 0:t.variants.find((t=>t.option1===e&&t.option2===i&&t.option3===n));return void 0===v?null===t||void 0===t||null===(h=t.variants)||void 0===h||null===(p=h[0])||void 0===p?void 0:p.id:v.id},Yt=(t,e)=>{var i,n;return null===t||void 0===t||null===(i=t.variants)||void 0===i||null===(n=i.find((t=>t.id===e)))||void 0===n?void 0:n.price},Xt=(t,e)=>{var i,n;return null===t||void 0===t||null===(i=t.variants)||void 0===i||null===(n=i.find((t=>t.id.toString()===e)))||void 0===n?void 0:n.option1},$t=(t,e)=>{var i,n;return null===t||void 0===t||null===(i=t.variants)||void 0===i||null===(n=i.find((t=>t.id.toString()===e)))||void 0===n?void 0:n.option2},Gt=(t,e)=>{var i,n;return null===t||void 0===t||null===(i=t.variants)||void 0===i||null===(n=i.find((t=>t.id.toString()===e)))||void 0===n?void 0:n.option3},Jt=(t,e)=>{var i;const n=null===t||void 0===t||null===(i=t.variants)||void 0===i?void 0:i.find((t=>t.id==e));return void 0===n?null:null===n||void 0===n||null===(o=n.featured_image)||void 0===o?void 0:o.src;var o},Qt=(0,r.createContext)({setShowOptionsChart:null});var te=function(t){const e=t.event,i=t.data,n=t.currentProduct,o=t.setOpenShopNow,l=t.setLockSwiper,[a,d]=(0,r.useState)(!1);return(0,x.jsx)(Qt.Provider,{value:{setShowOptionsChart:d},children:(0,x.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[(0,x.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",children:(0,x.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,x.jsx)(Ut,{data:i,event:e,product:n,setOpenShopNow:o,setLockSwiper:l})})}),a?(0,x.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",style:{position:"relative",zIndex:1,bottom:"100%"},className:"whatmore-ios-css-relative-fix",id:"whatmore-size-chart",children:(0,x.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,x.jsx)(Lt,{data:i,event:e,product:n,setShowOptionsChart:()=>{d(!1)}})})}):(0,x.jsx)(x.Fragment,{})]})})};var ee=function(t){var e,[i,n,o,l]=(0,h.Z)();const[a,d]=(0,r.useState)(!1),[v,g]=(0,r.useState)(),[f,w]=(0,r.useState)(),j=(0,u.MO)("whatmoreShopId"),y=t.event,C=t.onBack,S=r.useRef(),b=t.isPlaying,I=t.isLast,k=t.setLockSwiper,_=t.selectedVariantId,F=null===(e=t.showOverlay)||void 0===e||e,T="center";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:l,height:o,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:T,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:l/o,children:(0,x.jsx)(m,{height:"100%",width:"100%",url:y.event_hls_url,isPlaying:b,event:y})})})}),F?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:T,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(Ot,{focusRef:S,event:t.event,isLast:I,onCloseCallback:C,productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(j),j);w(t),g(e),d(!0),k(!0)}})})}):(0,x.jsx)(x.Fragment,{}),!0===a?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:T,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(te,{focusRef:S,event:t.event,isLast:I,onCloseCallback:()=>C(),setLockSwiper:k,data:v,currentProduct:f,setOpenShopNow:d,selectedVariantId:_})})}):(0,x.jsx)("div",{})]})})};const ie=function(t,e){return isNaN(t)||isNaN(e)||e<=0||t>e?0:Math.ceil(t/e*100)};function ne(t){var e,i,[n,o,r,l]=(0,h.Z)();const[a]=(0,u.j1)("whatmoreSecondaryColor"),[d]=(0,u.j1)("whatmoreSecondaryColorShade900"),c=t.progress,p=null!==(e=t.totalSiblings)&&void 0!==e?e:1,v=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0;return(0,x.jsx)(s.Kq,{width:"96%",height:"fit-content",direction:"row",justifyContent:"center",alignItems:"center",spacing:"1px",children:[...Array(p).keys()].map((t=>(0,x.jsx)(s.Kq,{width:"100%",height:.004*r+"px",backgroundColor:t<v?a:d+"99",borderRightRadius:"lg",borderLeftRadius:"lg",direction:"row",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",sx:{display:"block !important"},children:t==v?(0,x.jsx)(s.xu,{height:"100%",width:c+"%",bgColor:a,borderRightRadius:"lg",borderLeftRadius:"lg",sx:{display:"block !important"}}):(0,x.jsx)(x.Fragment,{})},"event-progress-bar-slab-"+t)))})}var oe=i(868),re=i(2630);const le=t=>t>=1e3?(t/1e3).toFixed(1)+"k":t;var ae=i(4862);var de=function(t){var e,i,n,o=t.whatmoreShareTemplateId;const l=t.whatmoreShareStoryId,a=t.whatmoreShareEventId,p=t.event,v=null===(e=t.showShareText)||void 0===e||e,m=null!==(i=t.shareButtonBottomMargin)&&void 0!==i?i:0,g=(0,u.MO)("whatmoreShopId"),f=(0,u.MO)("isInDesignMode"),w=(0,u.MO)("isDemoBrand"),j=(0,u.MO)("whatmorePrimaryFont"),{whatmoreWidgetSourceDetails:y}=(0,r.useContext)(V.I),[C,S,b,I]=(0,h.Z)(),k=null!==(n=t.iconSize)&&void 0!==n?n:.1*I;function _(){const e=(0,u.MO)("whatmoreLandingLocationType");var i;!function(t){f||w||(async()=>{(0,d.x0)(t)})()}(p),(e.startsWith("product")||"embed"===e)&&(o="te"),i="event_product_link"===(0,c.EEC)(g)?p.products[0].product_link||"":window.location.pathname,i=("event_product_link"===(0,c.EEC)(g)?"":window.location.hostname)+i+"?wtt="+o+"&wsid="+l+"&weid="+a,(0,c.lj5)(g)&&(i=i+"&"+(0,c.awP)(g)+"&utm_campaign=video-share&utm_medium="+e);const n={title:(0,c.JNF)(g),text:`${(0,c.Qa8)(g)} \n ${i} ${(0,c.AWG)(g)?"\n \n -via Whatmore":""}`};navigator.share&&!ae.nI?navigator.share(n):(t.setIsModalOpen(!0),t.setShareText([n,i]))}return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{cursor:"pointer",style:{marginBottom:m+"px"},children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[(0,x.jsx)(re.Z,{sx:{boxShadow:3,transform:"scaleX(-1)",color:"white",fontSize:k,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),_(),(0,q.GF)({userInteractionType:H.K.VIDEO_SHARE_CTA_CLICKED,widgetSourceDetails:y,event:p,productList:p.products,ctaList:p.cta})}}),v&&(0,c.u8S)(g)?(0,x.jsxs)(s.xv,{fontSize:.3*k+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:j+" !important",color:"white !important",paddingRight:"10%"},children:["\xa0",p.total_share>(0,c.LWl)(g)?le(p.total_share):"Share","\xa0"]}):(0,x.jsx)(x.Fragment,{})]})})})},se=i(7933),ce=i(2785);var ue=function(t){var e;const i=(0,u.MO)("whatmoreShopId"),n=(0,u.MO)("whatmorePrimaryFont"),o=(0,u.MO)("whatmoreLikedEvents"),l=((0,u.MO)("whatmoreSecondaryColor"),(0,u.MO)("isInDesignMode")),a=(0,u.MO)("isDemoBrand"),{whatmoreWidgetSourceDetails:p}=(0,r.useContext)(V.I),v=t.event,[m,g]=(0,r.useState)(null!==(e=o[v.event_id])&&void 0!==e&&e),[f,w,j,y]=(0,h.Z)(),C=.1*y;function S(t,e){l||a||(async()=>{(0,d.Z6)(t,e)})()}function b(){(0,u.bU)("whatmoreLikedEvents",{...o,[v.event_id]:!m}),m?(S(v,-1),(0,q.GF)({userInteractionType:H.K.VIDEO_UNLIKED,widgetSourceDetails:p,event:v,productList:v.products,ctaList:v.cta})):(S(v,1),(0,q.GF)({userInteractionType:H.K.VIDEO_LIKED,widgetSourceDetails:p,event:v,productList:v.products,ctaList:v.cta})),g(!m)}const I=v.total_like+(m?1:0);return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{cursor:"pointer",children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[m?(0,x.jsx)(ce.Z,{sx:{boxShadow:3,color:(0,c.dmX)(i),fontSize:C,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}):(0,x.jsx)(se.Z,{sx:{boxShadow:3,color:"white",fontSize:C,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}),(0,x.jsx)(x.Fragment,{children:(0,c.CEM)(i)?(0,x.jsxs)(s.xv,{fontSize:.3*C+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:n+" !important",color:"white !important",position:"relative",bottom:"5px"},children:["\xa0",I>=(0,c.zKg)(i)?le(I):"Like","\xa0"]}):(0,x.jsx)(x.Fragment,{})})]})})})};const he=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#25D366",borderRadius:"50%",padding:.3*e},children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"white",class:"bi bi-whatsapp",viewBox:"0 0 16 16",children:(0,x.jsx)("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})})})};var pe=i(8866);const ve=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-twitter-x",viewBox:"0 0 16 16",children:(0,x.jsx)("path",{d:"M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865z"})})})},xe=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-copy",viewBox:"0 0 16 16",children:(0,x.jsx)("path",{"fill-rule":"evenodd",d:"M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z"})})})};var me=t=>{const e=t.shareText,[i,n]=(0,r.useState)("Copy link"),[o,l]=(0,r.useState)("");return(0,x.jsx)(x.Fragment,{children:t.isModalOpen&&(0,x.jsxs)("div",{className:"modal-overlay",style:{backgroundColor:"white",borderRadius:"10px",padding:"12px 12px 20px 12px"},children:[(0,x.jsxs)("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",paddingBottom:"6px"},children:[(0,x.jsx)("img",{onClick:()=>{window.location.href="https://whatmore.ai"},src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",backgroundColor:"transparent",borderRadius:"0px",width:Math.min(t.iconSize,28)+"px"}}),(0,x.jsx)(P.Z,{onClick:e=>{e.stopPropagation(),t.setIsModalOpen(!1)}})]}),(0,x.jsx)("div",{}),(0,x.jsx)(s.iz,{color:"blackAlpha.500",size:"1px",width:"100%"}),(0,x.jsxs)("div",{className:"social-icons",style:{display:"flex",gap:"20px",justifyContent:"center",paddingTop:"12px"},children:[(0,x.jsxs)("div",{onClick:t=>{var i;t.stopPropagation();const n=encodeURIComponent(null===(i=e[0])||void 0===i?void 0:i.text);window.open(`https://wa.me/?text=${n}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(he,{iconSize:Math.min(t.iconSize,30)}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"Whatsapp"})]}),(0,x.jsxs)("div",{onClick:t=>{var i;t.stopPropagation();const n=encodeURIComponent(null===(i=e[0])||void 0===i?void 0:i.text);window.open(`https://twitter.com/intent/tweet?text=${n}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(ve,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"X"})]}),(0,x.jsxs)("div",{onClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(e[1]),n("Link copied"),l("green")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(xe,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14),color:o},children:i})]})]})]})})};var ge=function(t){var e,i;const n=null===(e=t.brandName)||void 0===e?void 0:e.replace(/\s+/g,"_"),o=(0,u.MO)("whatmorePrimaryFont"),r=(0,u.MO)("whatmoreShopId"),l=null!==(i=t.fontSize)&&void 0!==i?i:"8",[a]=(0,pe.Z)(),d=`https://www.whatmore.ai/shoppable-videos?utm_source=${n}&utm_medium=referral&utm_campaign=${"landscape"===a?"customer_referral_desktop":"customer_referral_mobile"}`;return(0,x.jsx)(s.rU,{href:d,isExternal:!0,children:(0,c.XFt)(r)&&(0,x.jsxs)(s.Kq,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content",spacing:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,x.jsx)("p",{style:{textAlign:"center",color:"white",fontFamily:o,fontWeight:"normal",fontSize:1.1*l+"px"},children:"powered by Whatmore"}),(0,x.jsx)(s.xu,{width:"10px"}),(0,x.jsx)("img",{src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",width:1.7*l,backgroundColor:"transparent",borderRadius:"0px"}})]})})};function fe(t){var e;const i=t.event,[n,o,l,a]=(0,h.Z)(),[d]=(0,u.j1)("whatmorePrimaryFont"),{whatmoreIsStoriesTemplate:p}=(0,r.useContext)(V.I),[v]=(0,u.j1)("whatmoreSecondaryColor"),[m]=(0,u.j1)("whatmoreShopId"),g=(0,c.f63)(m),f=null!==(e=(0,c.u2W)(m))&&void 0!==e?e:[v,g,v,g,v],w=(0,r.useRef)(null);return(0,r.useEffect)((()=>{w.current&&w.current.play()}),[]),(0,x.jsx)(x.Fragment,{children:p?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",padding:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-start",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{overflow:"hidden",size:.14*a+"px",sx:{boxShadow:"0px 2px 1px 0px "+f[0]+"50, 0px -2px 1px 0px "+f[1]+"50, 2px 0px 1px 0px "+f[2]+"50, -2px 0px 1px 0px "+f[3]+"80, 2px -2px 1px 0px "+f[4]+"80, -2px 2px 1px 0px "+f[0]+"DA, 2px 2px 1px 0px "+f[1]+"DA, -2px -2px 1px 0px "+f[2]+"DA"},children:"video"==(0,pt.$)((0,oe.V)(i.storyset_thumbnail_image))?(0,x.jsx)("video",{className:"whatmore-story-thumbnail",ref:w,preload:"metadata",loop:!0,playsInline:!0,src:(0,oe.V)(i.storyset_thumbnail_image),muted:!0,alt:"story image"}):(0,x.jsx)("img",{src:(0,oe.V)(i.storyset_thumbnail_image),style:{objectFit:"cover",height:"100%",width:"100%",backgroundColor:"white"}})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:.05*a+"px",fontWeight:"medium",lineHeight:"100%",sx:{fontFamily:d+" !important",color:"white !important",textShadow:"0px 0px 4px black !important;"},children:i.storyset_name})})]})}):(0,x.jsx)(x.Fragment,{})})}var we=function(t){const[e,i,n]=(0,pe.Z)(),[o]=(0,u.j1)("isInDesignMode"),[l]=(0,u.j1)("isDemoBrand"),[a,p]=(0,u.j1)("isProductSwiperCatalogOpen"),[v,m]=(0,u.j1)("isFirstIndicatorRenderDone"),[g]=(0,u.j1)("whatmoreShopId"),f=(0,r.useContext)(ri),{whatmoreEventsBrowsingTemplate:w}=(0,r.useContext)(V.I),[j,C,S,b]=(0,h.Z)(),I=(0,u.MO)("whatmorePrimaryFont"),k=t.event,_=t.storySetId,F=t.isLast,E=t.onCloseCallback,P=t.focusRef,L=t.productClickHandler,z=t.videoPlayingData,R=t.totalSiblingEvents,M=t.indexAmongSiblings,K=t.leftOpenSpaceClickHandler,A=t.midOpenSpaceClickHandler,W=t.rightOpenSpaceClickHandler,{whatmoreWidgetSourceDetails:N}=(0,r.useContext)(V.I),Z=.1*b,[U,B]=(0,r.useState)(!1),[Y,X]=(0,r.useState)([]),$=t=>{G.current&&!G.current.contains(t.target)&&B(!1)},G=(0,r.useRef)(null);(0,r.useEffect)((()=>(U?document.addEventListener("click",$):document.removeEventListener("click",$),()=>{document.removeEventListener("click",$)})),[U]);const J="Free"==(0,c.Svj)(g)&&"portrait"==e;return(0,x.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[U&&(0,x.jsx)("div",{ref:G,className:"whatmore-share-modal",style:{zIndex:100,position:"absolute",boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.6)",width:"75%",top:"45%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},children:(0,x.jsx)(me,{shareText:Y,setShareText:X,iconSize:Z,isModalOpen:U,setIsModalOpen:B})}),(0,x.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,x.jsxs)(s.Kq,{width:"full",height:"fit-content",direction:"column",justifyContent:"flex-start",alignItems:"center",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:[f.showVideoPlayingData?(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",marginTop:"5px",justifyContent:"center",children:(0,x.jsx)(ne,{progress:ie(z.current_time,z.video_duration),totalSiblings:R,indexAmongSiblings:M})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{width:"full",margin:"2px",marginTop:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",paddingRight:"10px",paddingLeft:"10px",children:[(0,x.jsx)(fe,{event:k}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,mt.ZK)(w)?(0,x.jsx)(de,{whatmoreShareTemplateId:(0,mt.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:k.event_id,event:k,showShareText:!1,iconSize:.07*b,shareButtonBottomMargin:6,setIsModalOpen:B,setShareText:X}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(y,{focusRef:P}),("landscape"!==e||t.showCloseOverlay)&&(0,x.jsx)(O,{event:k,onCloseCallback:E})]})]})})]}),(0,x.jsxs)(s.Kq,{width:"100%",height:"100%",direction:"row",justifyContent:"center",children:[(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{K()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"34%",height:"100%",onClick:()=>{A()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{W()},sx:{display:"block !important"}})]}),(0,x.jsxs)(s.xu,{width:"full",height:"fit-content",children:[f.totalEvents>1&&!v&&f.showSwipeIndicator?(0,x.jsx)(s.xu,{width:"full",margin:"2px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,x.jsx)(D,{swipeUp:!F})})}):null,(0,x.jsxs)(s.xu,{width:"fit-content",height:"fit-content",position:"absolute",right:0,bottom:"25%",children:[(0,c.slY)(g)&&!(0,mt.ZK)(w)?(0,x.jsx)(s.xu,{ml:"auto",width:"fit-content",paddingY:"12px",paddingX:"8px",children:(0,x.jsxs)(s.Kq,{gap:"4px",direction:"column",alignItems:"center",cursor:"pointer",onClick:function(){var t;o||l||(async()=>{(0,d.lY)(k,1)})(),(0,q.GF)({userInteractionType:H.K.WHATSAPP_ICON_CLICKED,widgetSourceDetails:N,event:k,productList:null===k||void 0===k?void 0:k.products,ctaList:null===k||void 0===k?void 0:k.cta});const e=k.products.map((t=>`${t.product_link} \n`)),i=(0,c.gtK)(g),n=`Hey, I am interested in ${k.products.length>1?"these products":"this product"} I saw on ${null===(t=k.products[0])||void 0===t?void 0:t.brand} store: \n${e}. Could you please help me with some queries?`;window.open(i+`&text=${n}&type=phone_number`,"_blank")},children:[(0,x.jsx)(he,{iconSize:.7*Z,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)(s.xv,{fontSize:Z*(0,c.Xod)(g)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:I+" !important",color:"white !important"},children:(0,c.UiZ)(g)})]})}):(0,x.jsx)(x.Fragment,{}),(0,c.jY3)(g)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(ue,{event:k})})}):(0,x.jsx)(x.Fragment,{}),(0,c.ROU)(g)&&!(0,mt.ZK)(w)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(de,{whatmoreShareTemplateId:(0,mt.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:k.event_id,event:k,setIsModalOpen:B,setShareText:X})})}):(0,x.jsx)(x.Fragment,{})]}),(0,_t.kT)(k)?(0,x.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(g)?(0,x.jsx)(s.xu,{w:"100%",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(T,{event:k,onToggle:t=>{p("minimize-button"!==t)}})})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,x.jsx)(Et,{event:k,productClickHandler:L})})]}):(0,x.jsx)(x.Fragment,{})]}),J&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",bg:"gray",py:"3px",justifyContent:"center",children:(0,x.jsx)(ge,{brandName:null===k||void 0===k?void 0:k.brand,fontSize:.033*b})})]})]})},je=i(2279),ye=i.n(je),Ce=i(342);var Se=function(t){var e,i,n,o,l,a,[d,m,g,f]=(0,h.Z)();const[w,j]=(0,r.useState)(!1),[y,C]=(0,r.useState)(),[S,b]=(0,r.useState)(),[I,k]=(0,r.useState)({current_time:0,video_duration:0,is_video_ended:!1}),_=(0,u.MO)("whatmoreShopId"),F=t.event,T=t.storyId,E=t.onBack,P=r.useRef(),O=t.isPlaying,L=t.isLast,z=t.setLockSwiper,R=t.onVideoEndedCallback,M=t.progressUpdateCallback,D=null!==(e=t.totalSiblingEvents)&&void 0!==e?e:0,K=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0,A=null===(n=t.showOverlay)||void 0===n||n,W=null!==(o=t.leftOpenSpaceClickHandler)&&void 0!==o?o:()=>{},N=null!==(l=t.midOpenSpaceClickHandler)&&void 0!==l?l:()=>{},Z=null!==(a=t.rightOpenSpaceClickHandler)&&void 0!==a?a:()=>{},{whatmoreWidgetSourceDetails:U}=(0,r.useContext)(V.I),B="center";let Y;try{Y=ye()((()=>{R()}),1e3,{leading:!0,trailing:!1})}catch(X){console.log(X)}return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:f,height:g,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:B,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:f/g,children:(0,x.jsx)(v.Z,{height:"100%",width:"100%",url:(0,oe.V)((0,Ce.uv)(F)),isPlaying:O,timeUpdateCallback:function(t,e){const i=ie(t,e);M(i);const n=I.is_video_ended;i>=99&&O&&!n?(Y(),k({current_time:t,video_duration:e,is_video_ended:!0})):k({current_time:t,video_duration:e,is_video_ended:n})},event:F,source:t.source})})})}),A?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:B,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(we,{focusRef:P,event:t.event,isLast:L,onCloseCallback:t=>{E(t),(0,q.Z2)({userInteractionType:H.K.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:I.current_time},widgetSourceDetails:U,event:F,productList:F.products,ctaList:F.cta})},productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(_),_);b(t),C(e),j(!0),z(!0),(0,q.GF)({userInteractionType:H.K.SHOPNOW_CLICKED,widgetSourceDetails:U,event:F,productList:F.products,ctaList:F.cta}),(0,u.bU)("whatmoreAllowAutoSlide",!1)},videoPlayingData:I,totalSiblingEvents:D,indexAmongSiblings:K,leftOpenSpaceClickHandler:W,midOpenSpaceClickHandler:N,rightOpenSpaceClickHandler:Z,storySetId:T,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay})})}):(0,x.jsx)(x.Fragment,{}),!0===w?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:B,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(te,{focusRef:P,event:t.event,isLast:L,onCloseCallback:()=>E(),setLockSwiper:z,data:y,currentProduct:S,setOpenShopNow:t=>{j(t),(0,u.bU)("whatmoreAllowAutoSlide",!t)}})})}):(0,x.jsx)("div",{})]})})},be=i(7300),Ie=i(8984),ke=i(58),_e=i(9723);var Fe=function(t){var[e,i,n,o]=(0,h.Z)();const r=(0,u.MO)("whatmoreShopId"),l=t.event,a=t.isPlaying,d="center";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:o,height:n,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:d,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:o/n,children:(0,x.jsx)(v.Z,{height:"100%",width:"100%",url:(0,oe.V)((0,Ce.uv)(l)),isPlaying:a,timeUpdateCallback:function(t,e){},event:l,source:t.source})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:d,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",backdropFilter:"auto",backdropBlur:"10px",onClick:t=>{(0,ke.QV)()},children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"full",width:"full",children:[(0,x.jsx)(_e.Z,{sx:{boxShadow:3,color:(0,c.Ya_)(r),fontSize:.4*o,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{(0,ke.QV)()}}),(0,x.jsx)(s.xv,{color:"white",fontSize:.05*o+"px",fontWeight:"bold",align:"left",children:"Please click to play video.."})]})})})]})})},Te=i(3433);var Ee=function(t){var e,i;const r=t.event,l=null===(e=t.isPlaying)||void 0===e||e,a=t.onBack,d=t.isLast,s=t.setLockSwiper,c=(t.heightFactor,t.widthFactor,t.onVideoEndedCallback),h=t.progressUpdateCallback,[p,v]=(0,j.Z)(),[m]=(0,u.j1)("whatmoreVideoPlayerPoolBlessed"),g=null===(i=t.showOverlay)||void 0===i||i;function f(){v(!p)}if((0,Ie.KE)()&&0==m)return(0,x.jsx)(Fe,{event:r,onBack:a,isPlaying:l,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:h,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:g,source:Te.j.CAROUSEL_EVENT_OPENED},"shopping-video-view"+r.event_id);if((0,be.B6)(r)||(0,be.WJ)(r))return(0,x.jsx)(Se,{event:r,onBack:a,isPlaying:l,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:h,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:g,source:Te.j.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id);if((0,be.yC)(r)){var{status:w,bannerText:y,timeToStartInMins:C}=n.Z.getEventStatus(r);if(w.name===o.Z.LIVE.name)return(0,x.jsx)(ee,{event:r,onBack:a,isPlaying:l,isLast:d,showOverlay:g},"shopping-live-view"+r.event_id)}return console.error("Can't render event which is neither video or a currently-live-event"),(0,x.jsx)("div",{})},Pe=i(9284),Oe=i.n(Pe),Le=i(7463),ze=i(2154);function Re(t){var e;const[i,n]=(0,r.useState)(!1),o=t.onClick,l=null!==(e=t.fontSize)&&void 0!==e?e:50;return(0,x.jsx)("div",{style:{height:"fit-content",width:"fit-content",backgroundColor:"black",opacity:.4,borderRadius:"50%"},className:[i?"whatmore-scale-on-tap":""].join(" "),children:"left"===t.type?(0,x.jsx)(ze.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{n(!0),setTimeout((()=>{n(!1)}),500),o(t,"up")}}):(0,x.jsx)(Le.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{n(!0),setTimeout((()=>{n(!1)}),500),o(t,"down")}})})}var Me=function(t){var e,i,n;const o=null!==(e=t.relativeBottomPercentage)&&void 0!==e?e:"30%",r=null!==(i=t.width)&&void 0!==i?i:"100%",l=null!==(n=t.fontSize)&&void 0!==n?n:50,a=t.handleClick;return(0,x.jsx)("div",{style:{position:"relative",zIndex:1,bottom:o,width:"100%",height:"fit-content",display:"flex",flexFlow:"row nowrap",justifyContent:"center"},id:"here",children:(0,x.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:r,height:"fit-content",paddingRight:"5px",paddingLeft:"5px",paddingTop:"5px",paddingBottom:"5px",justifyContent:"space-between",alignContent:"center"},children:[(0,x.jsx)(Re,{type:"left",onClick:a,fontSize:l}),(0,x.jsx)(Re,{type:"right",onClick:a,fontSize:l})]})})},De=i(2860),Ke=i(4669);var Ae=function(t,e){function i(t,e){return 1==e?0:t<0?e+t:t>=e?t-e:t}const n=(0,r.useRef)({prevIndex:i(t-1,e),activeIndex:t,nextIndex:i(t+1,e)});return[function(){return n.current},function(t){n.current="right"==t?{prevIndex:i(n.current.activeIndex,e),activeIndex:i(n.current.activeIndex+1,e),nextIndex:i(n.current.activeIndex+2,e)}:{prevIndex:i(n.current.activeIndex-2,e),activeIndex:i(n.current.activeIndex-1,e),nextIndex:i(n.current.activeIndex,e)}},function(t){return i(n.current.activeIndex+t)}]};var We=function(t,e){const i=(0,r.useRef)({clientX:0,clientY:0});return[function(t){i.current.clientX=t.changedTouches[0].clientX,i.current.clientY=t.changedTouches[0].clientY},function(n){const o=i.current.clientX,r=i.current.clientY;var l=o-n.changedTouches[0].clientX,a=r-n.changedTouches[0].clientY;return"vertical"==t&&Math.abs(a)>e||"horizontal"==t&&Math.abs(l)>e?"vertical"==t?a>0?"right":"left":l>0?"right":"left":null}]};var Ne=function(t,e){const i=(0,r.useRef)(ye()(((t,e)=>{t(e)}),300,{leading:!0,trailing:!1}));return[function(n,o){var r=0;if(r="vertical"==t?n.deltaY:n.deltaX,Math.abs(r)<=e)return;const l=r>0?"right":"left";i.current(o,l)}]},qe=i(5173);var He=function(t){const e=t.events,i=t.eventIndex,n=t.onBack;var[o,p,v,m]=(0,h.Z)();const[g]=(0,u.j1)("isInDesignMode"),[f]=(0,u.j1)("isDemoBrand"),[w,j]=(0,r.useState)(!0),[y,C]=(0,u.j1)("isFirstIndicatorRenderDone"),[S,b]=(0,r.useState)(!1),{setCloseClickComponent:I}=(0,r.useContext)(ri),{slideDirection:k}=(0,r.useContext)(ri),[_]=(0,u.j1)("whatmoreShopId"),[F]=(0,u.j1)("whatmoreLandingLocationType"),[T,E]=Ae(i,e.length),[P,O]=We(k,50),[L]=Ne("vertical",30),[z,R]=(0,r.useState)(!1),[M,D]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:K,whatmoreUserInfo:A}=(0,r.useContext)(V.I);function N(){R(!1)}function Z(t){N(),setTimeout((()=>{n(t)}),500)}(0,r.useEffect)((()=>(R(!0),()=>{})),[]);const U=K.landingLocationType,B=K.templateType;function Y(){(0,u.MO)("whatmoreAllowAutoSlide")&&(E("right"),M.slideNext())}function X(t,e){E(e),function(t,e){M&&("left"===e?M.slidePrev():M.slideNext())}(0,e)}I(Z);const $=Math.round(.05*v);return(0,x.jsx)(Oe(),{isOpen:z,onAfterOpen:function(){},onRequestClose:N,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)(qe.Z,{children:(0,x.jsxs)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:(0,W.lA)("#000000",13)},onTouchStart:t=>{P(t)},onTouchEnd:t=>{if(S)return;const e=O(t);e&&X(0,e)},onWheel:t=>{S||L(t,(t=>{X(0,t)}))},children:[(0,x.jsx)(l.tq,{speed:400,threshold:$,slidesPerView:1,direction:k,modules:[a.tl,a.Gk],initialSlide:i,loop:1!=e.length,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,allowSlideNext:!S,allowSlidePrev:!S,allowTouchMove:!1,onSwiper:t=>{D(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:K,event:e[T().activeIndex],productList:e[T().activeIndex].products})},onSlideChange:t=>{var i;w?j(!1):(y||C(!0),i=e[T().activeIndex],g||f||(async()=>{const t=(0,mt.NY)(U)+(0,mt.dS)(B)+"_"+(null===i||void 0===i?void 0:i.event_id);(0,d.wh)(i),"index"===F?((0,Ke.Tc)(_,De.Xh,De.pR),(0,ot.H4)(i.event_id,i.products,De.Xh,De.pR,t,null===i||void 0===i?void 0:i.location,null===A||void 0===A?void 0:A.userType)):F.startsWith("product")||"embed"===F?((0,Ke.Tc)(_,De.h7,De.dU),(0,ot.H4)(i.event_id,i.products,De.h7,De.dU,t)):F.startsWith("collection")?((0,Ke.Tc)(_,De.U$,De.Pk),(0,ot.H4)(i.event_id,i.products,De.U$,De.Pk,t)):((0,Ke.Tc)(_,De.Xh,De.pR),(0,ot.H4)(i.event_id,i.products,De.Xh,De.pR,t))})(),(0,q.y4)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:K,event:e[T().activeIndex],productList:e[T().activeIndex].products}))},children:[...Array(Math.min(e.length,3)).keys()].map((i=>(0,x.jsx)(l.o5,{children:i=>{let{isActive:n,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=i;const d=n?"activeIndex":o?"prevIndex":"nextIndex";return(0,x.jsx)(s.Kq,{direction:"column",height:window.innerHeight,justifyContent:"center",children:(0,x.jsx)(Ee,{event:e[T()[d]],onBack:Z,isPlaying:1==e.length||n&&l,isLast:!1,setLockSwiper:b,onVideoEndedCallback:Y,progressUpdateCallback:t=>{},showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay})})}},"event-vertical-scroll-slide-"+i)))}),e.length>1&&!S&&(0,c.h6H)(_)&&"horizontal"===(0,c.e8z)(_)&&"horizontal"===k?(0,x.jsx)(Me,{relativeBottomPercentage:"50%",width:m,handleClick:(t,e)=>{X(0,"down"==e?"right":"left")},fontSize:parseInt(.12*m)}):(0,x.jsx)(x.Fragment,{})]})})})},Ve=i(1168);i(6143),i(7850),i(4444),i(7244),i(123),i(5892),i(1811);const Ze=t=>{let{children:e,customClass:i,show:n,closeCallback:o}=t;return Ve.createPortal((0,x.jsxs)("div",{className:`whatmore-landscape-modal whatmore-root ${i}`,style:{display:n?"block":"none"},children:[(0,x.jsx)("div",{className:"whatmore-landscape-modal-overlay",onClick:o}),(0,x.jsx)("div",{className:"whatmore-landscape-modal-content",children:e})]}),document.body)};Ze.defaultProps={children:(0,x.jsx)("div",{children:"Empty Modal"}),customClass:"",show:!1,closeCallback:()=>!1};var Ue=Ze;var Be=function(t){var e,[i,n,o,p]=(0,h.Z)();const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[g,f]=(0,u.j1)("isFirstIndicatorRenderDone"),[w,j]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:y}=(0,r.useContext)(ri),[C,S]=(0,r.useState)(!1),[b]=(0,u.j1)("whatmoreShopId"),[I]=(0,u.j1)("whatmoreLandingLocationType"),{whatmoreUITheme:k}=(0,r.useContext)(V.I),{whatmoreWidgetSourceDetails:_,whatmoreUserInfo:F}=(0,r.useContext)(V.I),[T,E]=(0,r.useState)(!1),[P,L]=(0,r.useState)(null);function z(){E(!1)}const R=t.events,M=t.eventIndex,D=t.onBack,K=R.concat(R),A=R.length,N=null===R||void 0===R||null===(e=R[0])||void 0===e?void 0:e.brand,Z=(0,r.useRef)(0);function U(t){z(),setTimeout((()=>{D(t)}),500)}function B(){P&&!P.isEnd&&(0,u.MO)("whatmoreAllowAutoSlide")&&P.slideNext()}(0,r.useEffect)((()=>(E(!0),()=>{})),[]),y(U);const Y=_.landingLocationType,X=_.templateType,$=parseInt(Math.min(5,R.length));return(0,x.jsx)(Ue,{show:T,closeCallback:z,customClass:"whatmore-landscape-modal-swipe-view",children:(0,x.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",aligntItems:"center",backgroundColor:(0,W.lA)("#000000",13),children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:p*$,children:(0,x.jsxs)(l.tq,{onInit:t=>{L(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:_,event:R[t.activeIndex],productList:R[t.activeIndex].products,ctaList:R[t.activeIndex].cta})},slidesPerView:$,centeredSlides:!0,allowTouchMove:!1,initialSlide:M,modules:[a.lI,a.W_,a.Gk,a.pt,a.tl],navigation:$>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*o),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:p*$,watchSlidesProgress:!0,onSlideChange:t=>{var e;w?j(!1):(g||f(!0),e=R[t.activeIndex],v||m||(async()=>{const t=(0,mt.NY)(Y)+(0,mt.dS)(X)+"_"+(null===e||void 0===e?void 0:e.event_id);(0,d.wh)(e),"index"===I?((0,Ke.Tc)(b,De.Xh,De.pR),(0,ot.H4)(e.event_id,e.products,De.Xh,De.pR,t,null===e||void 0===e?void 0:e.location,null===F||void 0===F?void 0:F.userType)):I.startsWith("product")||"embed"===I?((0,Ke.Tc)(b,De.h7,De.dU),(0,ot.H4)(e.event_id,e.products,De.h7,De.dU,t)):I.startsWith("collection")?((0,Ke.Tc)(b,De.U$,De.Pk),(0,ot.H4)(e.event_id,e.products,De.U$,De.Pk,t)):((0,Ke.Tc)(b,De.Xh,De.pR),(0,ot.H4)(e.event_id,e.products,De.Xh,De.pR,t))})(),(0,q.y4)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:_,event:R[t.activeIndex],productList:R[t.activeIndex].products,ctaList:R[t.activeIndex].cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[R.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(O,{onCloseCallback:D})}),K.slice(M,R.length+M).map(((t,e)=>(0,x.jsx)(l.o5,{children:t=>{let{isActive:i,isPrev:n,isNext:r,isVisible:l,isDuplicate:a}=t;if(i)return(0,x.jsx)(s.Kq,{direction:"column",height:o,width:1*p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==k?"10px":"0px",borderWidth:(0,c.alU)(b),borderColor:(0,c.qPe)(b)},children:(0,x.jsx)(Ee,{event:R[e%A],onBack:U,isPlaying:!0,isLast:e%A===R.length-1,setLockSwiper:S,widthFactor:1,heightFactor:1,onVideoEndedCallback:B,progressUpdateCallback:t=>{},showCloseOverlay:(null===R||void 0===R?void 0:R.length)<=2})})});if(r)return(0,x.jsx)(s.Kq,{direction:"column",height:o,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{P.slideTo(e%A,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==k?"10px":"0px",borderWidth:(0,c.alU)(b),borderColor:(0,c.qPe)(b)},children:(0,x.jsx)(Ee,{event:R[e%A],onBack:U,isPlaying:!1,isLast:e%A===R.length-1,setLockSwiper:S,widthFactor:1,heightFactor:1,onVideoEndedCallback:B,progressUpdateCallback:t=>{},showOverlay:!1})})});if(n&&1===Z.current)return(0,x.jsx)(s.Kq,{direction:"column",height:o,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{P.slideTo(e%A,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==k?"10px":"0px",borderWidth:(0,c.alU)(b),borderColor:(0,c.qPe)(b)},children:(0,x.jsx)(Ee,{event:R[e%A],onBack:U,isPlaying:!1,isLast:e%A===R.length-1,setLockSwiper:S,widthFactor:1,heightFactor:1,onVideoEndedCallback:B,progressUpdateCallback:t=>{},showOverlay:!1})})});try{M+e>=A-1&&(Z.current=1)}catch(d){console.log(d)}return(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide"+t.event_id)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(ge,{brandName:N,height:.04*o,width:.1*p,fontSize:.02*o})})]})})},Ye=i(6090),Xe=i(7616),$e=i(9302),Ge=i(2575);var Je=function(t){const[e,i,n,o]=(0,h.Z)(),[r]=(0,u.j1)("whatmorePrimaryColor"),[l]=(0,u.j1)("whatmoreSecondaryColor"),a="flex-end";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:o,height:n,backgroundColor:"whiteAlpha.200",backdropBlur:"10px",children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:a,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.oM,{width:"full",ratio:o/n,children:(0,x.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+r+", gray, "+l+")"})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:a,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{padding:"2px",margin:"5px",borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,x.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",backdropFilter:"auto",backdropBlur:"5px"})})})})]})})};var Qe=function(t){var e;const i=t.stories,n=t.onBack,o=t.onStoryCompleteCallback,a=t.isActive,c=null!==(e=t.initialEventIndex)&&void 0!==e?e:0,p=i.events;var[v,m,g,f]=(0,h.Z)();const[w,y]=(0,j.Z)(),[C]=(0,u.j1)("isInDesignMode"),[S]=(0,u.j1)("isDemoBrand"),[b]=(0,u.j1)("whatmoreShopId"),[I,k]=(0,r.useState)(!0),[_,F]=(0,u.j1)("isFirstIndicatorRenderDone"),[T,E]=(0,r.useState)(null),[P,O]=(0,r.useState)(!1),{whatmoreWidgetSourceDetails:L,whatmoreUserInfo:z}=(0,r.useContext)(V.I),[R,M]=Ae(c,p.length);function D(t){n(t)}const K=L.landingLocationType,A=L.templateType;function W(){if(!(0,u.MO)("whatmoreAllowAutoSlide"))return;R().activeIndex+1>=p.length?o("right"):(M("right"),T&&T.slideNext())}function N(t){const e=R().activeIndex;"right"==t&&e+1>=p.length||"left"==t&&e-1<0?o(t):(M(t),T&&("left"==t?T.slidePrev():T.slideNext()))}return p[R().activeIndex],(0,x.jsx)("div",{children:(0,x.jsx)(l.tq,{speed:1,slidesPerView:1,direction:"horizontal",initialSlide:0,loop:!0,height:g,width:f,watchSlidesProgress:!0,allowTouchMove:!1,onSwiper:t=>{E(t)},onSlideChange:t=>{I?k(!1):(_||F(!0),function(t){const e=(0,mt.NY)(K)+(0,mt.dS)(A)+"_"+(null===t||void 0===t?void 0:t.event_id);C||S||(async()=>{(0,d.wh)(t),(0,Ke.Tc)(b,De.Xh,De.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===z||void 0===z?void 0:z.userType)})()}(p[R().activeIndex]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:L,event:p[R().activeIndex],productList:p[R().activeIndex].products,ctaList:p[R().activeIndex].cta}))},children:[...Array(Math.min(p.length,3)).keys()].map((e=>(0,x.jsx)(l.o5,{children:e=>{let{isActive:n,isPrev:o,isNext:r,isVisible:l,isDuplicate:d}=e;if(a){const e=n?"activeIndex":o?"prevIndex":"nextIndex",r=p[R()[e]];return(0,x.jsx)(s.Kq,{direction:"column",height:g,justifyContent:"center",children:(0,be.B6)(r)||(0,be.WJ)(r)?(0,x.jsx)(Se,{event:r,totalSiblingEvents:p.length,indexAmongSiblings:R()[e],onBack:D,isPlaying:a&&n&&l,isLast:!1,setLockSwiper:O,onVideoEndedCallback:W,progressUpdateCallback:t=>{},leftOpenSpaceClickHandler:()=>{N("left")},midOpenSpaceClickHandler:()=>{y(!w)},rightOpenSpaceClickHandler:()=>{N("right")},storyId:i.id,source:Te.j.STORY_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id):(0,x.jsx)(x.Fragment,{})})}return(0,x.jsx)(s.Kq,{direction:"column",height:v,justifyContent:"center",children:(0,x.jsx)(Je,{})})}},"event-story-view-slide-"+e)))})})};var ti=function(t){const e=t.onBack,i=t.eventsStories,n=t.initialStoryIndex;var[o,c,p,v]=(0,h.Z)();const[m]=(0,u.j1)("isInDesignMode"),[g]=(0,u.j1)("isDemoBrand"),[f,w]=(0,r.useState)(!0),[j,y]=(0,u.j1)("isFirstIndicatorRenderDone"),[C,S]=(0,r.useState)(!1),{setCloseClickComponent:b}=(0,r.useContext)(ri),{slideDirection:I}=(0,r.useContext)(ri),[k]=(0,u.j1)("whatmoreShopId"),[_,F]=Ae(n,i.length),[T,E]=We("horizontal",50),[P]=Ne("vertical",30),O=t.eventIndex,[L,z]=(0,r.useState)(!1),[R,M]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:D,whatmoreUserInfo:K}=(0,r.useContext)(V.I);function A(){z(!1)}function W(t){A(),setTimeout((()=>{e(t)}),500)}(0,r.useEffect)((()=>(z(!0),()=>{})),[]),b(W);const N=D.landingLocationType,Z=D.templateType;function U(t){R&&(0,u.MO)("whatmoreAllowAutoSlide")&&(F(t),"right"==t?R.slideNext():R.slidePrev())}function B(t,e){U(e)}return(0,x.jsx)(Oe(),{isOpen:L,onAfterOpen:function(){},onRequestClose:A,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:"#00000088"},onTouchStart:t=>{T(t)},onTouchEnd:t=>{const e=E(t);e&&B(0,e)},onWheel:t=>{P(t,(t=>{B(0,t)}))},children:(0,x.jsx)(l.tq,{speed:1,slidesPerView:1,direction:"horizontal",modules:[a.SH,a.Gk],initialSlide:n,loop:i.length>1,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,onSwiper:t=>{var e,n;M(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:D,event:i[_().activeIndex].events[0],productList:null===(e=i[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[_().activeIndex].events[0])||void 0===n?void 0:n.cta})},onSlideChange:t=>{var e,n;f?w(!1):(!function(t){const e=(0,mt.NY)(N)+(0,mt.dS)(Z)+"_"+(null===t||void 0===t?void 0:t.event_id);m||g||(async()=>{(0,d.wh)(t),(0,Ke.Tc)(k,De.Xh,De.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===K||void 0===K?void 0:K.userType)})()}(i[_().activeIndex].events[0]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:D,event:i[_().activeIndex].events[0],productList:null===(e=i[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[_().activeIndex].events[0])||void 0===n?void 0:n.cta}))},allowTouchMove:!1,cubeEffect:{shadow:!0,slideShadows:!0,shadowOffset:20,shadowScale:.94},children:[...Array(Math.min(i.length,3)).keys()].map((t=>(0,x.jsx)(l.o5,{children:t=>{let{isActive:e,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=t;const c=e?"activeIndex":r?"prevIndex":"nextIndex";return(0,x.jsx)(s.Kq,{direction:"column",height:o,justifyContent:"center",children:(0,x.jsx)(Qe,{stories:i[_()[c]],onBack:W,isActive:e&&a,isNext:l,isPrev:r,onStoryCompleteCallback:U,nextStories:i[_().nextIndex],prevStories:i[_().prevIndex],initialEventIndex:n==_()[c]?O:0},"event-story-view-"+i[_()[c]].id)})}},"event-vertical-scroll-slide-"+t)))})})})},ei=i(4892);var ii=function(t){var e,i,n,[o,l,a,d]=(0,h.Z)();const[c]=(0,u.j1)("whatmorePrimaryColor"),[p]=(0,u.j1)("whatmoreSecondaryColor"),v=t.event,m=(t.onBack,r.useRef(),null!==(e=t.showPausedVideo)&&void 0!==e&&e),f=null!==(i=t.heightFactor)&&void 0!==i?i:1,w="flex-end";return d*=null!==(n=t.widthFactor)&&void 0!==n?n:1,a*=f,(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:d,height:a,children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:w,height:"full",width:"full",children:(0,x.jsx)(s.xu,{children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:m?(0,be.B6)(v)||(0,be.WJ)(v)?(0,x.jsx)(ei.Z,{height:"100%",width:"100%",url:v.thumbnail_image,isPlaying:!1,pauseFromPlayTimeInMs:1e3,event:v}):(0,x.jsx)(g.Ee,{width:"full",height:"full",src:v.thumbnail_image,objectFit:"cover",borderRadius:"lg"}):(0,x.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+c+", gray, "+p+")"})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:w,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,x.jsx)(s.xu,{width:"full",height:"full",backgroundColor:"blackAlpha.400"})})})})]})})};var ni=function(t){var e,i,[n,o,c,p]=(0,h.Z)();const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[g,f]=(0,u.j1)("isFirstIndicatorRenderDone"),[w,j]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:y}=(0,r.useContext)(ri),[C,S]=(0,r.useState)(!1),[b]=(0,u.j1)("whatmoreShopId"),{whatmoreWidgetSourceDetails:I,whatmoreUserInfo:k}=(0,r.useContext)(V.I),[_,F]=(0,r.useState)(!1),[T,E]=(0,r.useState)(null);function P(){F(!1)}t.events;const L=t.eventIndex,z=t.onBack,R=t.eventsStories,M=t.initialStoryIndex,D=null===(e=R[0])||void 0===e||null===(i=e.events[0])||void 0===i?void 0:i.brand;function K(t){P(),setTimeout((()=>{z(t)}),500)}(0,r.useEffect)((()=>(F(!0),()=>{})),[]),y(K);const A=I.landingLocationType,W=I.templateType;function N(t){T&&!T.isEnd&&("right"==t?T.slideNext():T.slidePrev())}const Z=parseInt(Math.min(5,R.length));return(0,x.jsx)(Ue,{show:_,closeCallback:P,customClass:"whatmore-landscape-modal-stories-view",children:(0,x.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",aligntItems:"center",backgroundColor:"blackAlpha.800",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:p*Z,children:(0,x.jsxs)(l.tq,{onInit:t=>{var e,i;E(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:I,event:R[t.activeIndex].events[0],productList:null===(e=R[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=R[t.activeIndex].events[0])||void 0===i?void 0:i.cta})},slidesPerView:Z,centeredSlides:!0,allowTouchMove:!1,initialSlide:M,modules:[a.lI,a.W_,a.Gk],navigation:Z>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*c),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:p*Z,watchSlidesProgress:!0,onSlideChange:t=>{var e,i;w?j(!1):(g||f(!0),function(t){const e=(0,mt.NY)(A)+(0,mt.dS)(W)+"_"+(null===t||void 0===t?void 0:t.event_id);v||m||(async()=>{(0,d.wh)(t),(0,Ke.Tc)(b,De.Xh,De.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===k||void 0===k?void 0:k.userType)})()}(R[t.activeIndex].events[0]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:I,event:R[t.activeIndex].events[0],productList:null===(e=R[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=R[t.activeIndex].events[0])||void 0===i?void 0:i.cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[R.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(O,{onCloseCallback:z})}),R.map(((t,e)=>(0,x.jsx)(l.o5,{children:i=>{let{isActive:n,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=i;if(n){const i=1;return(0,x.jsx)(s.Kq,{direction:"column",height:c,width:p*i,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(Qe,{stories:t,onBack:K,isActive:n&&l,isNext:!1,isPrev:!1,onStoryCompleteCallback:N,initialEventIndex:M==e?L:0,showCloseOverlay:(null===R||void 0===R?void 0:R.length)<=2},"event-story-view-"+t.id)})})}return o||r?(0,x.jsx)(s.Kq,{direction:"column",height:c,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{T.slideTo(e,300)},children:(0,x.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(ii,{showPausedVideo:!0,event:R[e].events[0],onBack:K,isPlaying:!1,setLockSwiper:S})})}):(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide-"+e)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(ge,{brandName:D,height:.04*c,width:.1*p,fontSize:.02*c})})]})})};const oi=(0,Ge.Z)({key:"whatmore-css-sv"}),ri=(0,r.createContext)({isIOS:!1,totalEvents:0,closeClickComponent:null,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:"vertical",showSwipeIndicator:!0});var li=function(t){var e,i;const[n,o,l]=(0,pe.Z)(),[a]=(0,u.j1)("whatmoreShopId"),{whatmoreRootId:d}=(0,r.useContext)(V.I),{whatmoreIsStoriesTemplate:s}=(0,r.useContext)(V.I);var h=t.events,p=t.index,v=t.onBack,m=t.eventsStories,g=t.initialStoryIndex,f=(0,c.cX2)(a),w=(h[p],"portrait"===n?null!==(e=t.slideDirection)&&void 0!==e?e:"vertical":null!==(i=t.slideDirection)&&void 0!==i?i:h.length>1?"horizontal":"vertical"),j="portrait"===n?!(0,c.h6H)(a)&&!s:(0,c.n89)(a);return h[p],(0,r.useLayoutEffect)((()=>{(0,c.TLG)(a)&&(window.location.href.includes(f)?history.replaceState(null,"","#"+f):history.pushState(null,"","#"+f),window.addEventListener("popstate",(()=>{window.location.href.includes(f)||v()})))}),[]),delete Xe.ZP.styles.global,s?(0,x.jsx)($e.C,{value:oi,children:(0,x.jsx)(Ye.x,{theme:Xe.ZP,cssVarsRoot:d,resetCSS:!1,children:(0,x.jsx)(ri.Provider,{value:{isIOS:(0,Ie.KE)(),totalEvents:h.length,closeClickComponent:v,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:w,showSwipeIndicator:j},children:"portrait"===n?(0,x.jsx)(ti,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p}):(0,c.Bbr)(a)?(0,x.jsx)(ni,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p}):(0,x.jsx)(ti,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p})})})}):(0,x.jsx)($e.C,{value:oi,children:(0,x.jsx)(Ye.x,{theme:Xe.ZP,cssVarsRoot:d,resetCSS:!1,children:(0,x.jsx)(ri.Provider,{value:{isIOS:(0,Ie.KE)(),totalEvents:h.length,closeClickComponent:v,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:w,showSwipeIndicator:j},children:"portrait"===n?(0,x.jsx)(He,{events:h,eventIndex:p,onBack:v}):(0,x.jsx)(Be,{events:h,eventIndex:p,onBack:v})})})})}},9316:function(t,e,i){i.d(e,{mT:function(){return o}});var n=i(686);const o=`\n ${n.F4`
|
|
76
|
+
`} 0.5s`,bt=null===q||void 0===q||null===(e=q.options)||void 0===e?void 0:e.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))})),[It,kt]=(0,r.useState)(-1!==bt?null===(i=q.options)||void 0===i||null===(n=i[bt])||void 0===n||null===(o=n.values)||void 0===o?void 0:o[0]:""),[_t,Ft]=(0,r.useState)({});(0,r.useEffect)((()=>{-1!==bt&&"whatmore"!==(0,c.Ipo)(wt)&&async function(){const t=await(0,lt.m3)(Z);Ft(t)}()}),[]);let Tt=-1,Et=-1!==bt&&null!==_t&&void 0!==_t&&_t.product&&(null===_t||void 0===_t||null===(l=_t.product)||void 0===l||null===(a=l.images)||void 0===a?void 0:a.length)>=(null===_t||void 0===_t||null===(d=_t.product)||void 0===d||null===(p=d.options)||void 0===p||null===(v=p[bt])||void 0===v||null===(m=v.values)||void 0===m?void 0:m.length)?null===_t||void 0===_t||null===(f=_t.product)||void 0===f||null===(w=f.images)||void 0===w?void 0:w.map((t=>{var e,i,n,o,r,l,a,d,s,c,u,h,p,v;const x=null===_t||void 0===_t||null===(e=_t.product)||void 0===e||null===(i=e.options)||void 0===i?void 0:i.findIndex((t=>"Color"==(null===t||void 0===t?void 0:t.name)||"Colour"==(null===t||void 0===t?void 0:t.name)||"COLOR"==(null===t||void 0===t?void 0:t.name)));return{color:(null===t||void 0===t?void 0:t.variant_ids.length)>0?null===_t||void 0===_t||null===(n=_t.product)||void 0===n||null===(o=n.options)||void 0===o||null===(r=o[x])||void 0===r||null===(l=r.values)||void 0===l?void 0:l[Math.min(++Tt,(null===_t||void 0===_t||null===(a=_t.product)||void 0===a||null===(d=a.options)||void 0===d||null===(s=d[bt])||void 0===s||null===(c=s.values)||void 0===c?void 0:c.length)-1)]:null===_t||void 0===_t||null===(u=_t.product)||void 0===u||null===(h=u.options)||void 0===h||null===(p=h[x])||void 0===p||null===(v=p.values)||void 0===v?void 0:v[Math.max(0,Tt)],src:null===t||void 0===t?void 0:t.src}})):[],Pt=[];if("whatmore"==(0,c.Ipo)(wt)&&(null===q||void 0===q||null===(j=q.images)||void 0===j?void 0:j.length)>0){var Ot;var Lt;if(-1!==(null===q||void 0===q||null===(Ot=q.options)||void 0===Ot?void 0:Ot.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))}))))Pt=null===q||void 0===q||null===(Lt=q.images)||void 0===Lt?void 0:Lt.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc})))}return Tt+1<(null===_t||void 0===_t||null===(y=_t.product)||void 0===y||null===(C=y.options)||void 0===C||null===(b=C[bt])||void 0===b||null===(I=b.values)||void 0===I?void 0:I.length)&&(Et=[]),(0,x.jsxs)(s.kC,{sx:{"&::-webkit-scrollbar":{width:"0px"}},id:"whatmore-shopnow-view",position:"relative",maxHeight:"75vh",overflowY:"scroll",direction:"column",bg:"#FFF",height:"fit-content",opacity:"100%",borderTopRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"xl":null,animation:St,children:[(0,x.jsx)(At,{setOpenShopNow:U,setLockSwiper:B,FONT_SIZE:A}),(0,x.jsx)(s.M5,{marginBottom:"10px",px:"20px",py:"5px",children:(0,x.jsx)(s.kC,{bg:"whiteAlpha.900",width:"fit-content",height:"fit-content",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"lg":null,overflow:"hidden",sx:{borderWidth:(0,c.alU)(wt),borderColor:(0,c.qPe)(wt)},children:(0,x.jsx)(s.kC,{width:"100%",children:(0,x.jsx)(Zt.P,{renderElement:t=>(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(s.xu,{width:M+"px",height:D+"px",children:(0,x.jsx)(g.Ee,{width:M+"px",height:D+"px",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"lg":null,src:(0,pt.s)(t.eventData.src,"&width=400&height=400"),alt:Z.handle,sx:{objectFit:(0,c.yOX)(wt)+" !important"},fallback:(0,x.jsx)(K.Z,{width:M+"px",height:D+"px",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"10px":"0px"})})})}),dataList:Et.length>0&&!Et.includes(null)?null===(k=Et)||void 0===k?void 0:k.filter((t=>(null===t||void 0===t?void 0:t.color)==It)):Pt.length>0?[null===(_=Pt)||void 0===_?void 0:_.find((t=>(null===t||void 0===t?void 0:t.color)==It))]:null===q||void 0===q||null===(F=q.images)||void 0===F?void 0:F.map((t=>({src:t.includes("https")?t:"https:"+t}))),spacing:10,defaultHeight:M+"px",defaultWidth:D+"px",retainAlreadyRenderedElements:!0,isScroll:!0})})})}),(0,x.jsx)(Ht,{data:q,product:Z,PRODUCT_TILE_HEIGHT:R,PRODUCT_TILE_WIDTH:z,FONT_SIZE:A,getVariantPrice:Yt,selectedVariantId:et,itemPrice:at,itemQuantity:nt,setItemQuantity:ot,thumbnailImage:mt}),(null===q||void 0===q||null===(T=q.variants)||void 0===T?void 0:T.length)>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s.M5,{paddingTop:"4px",width:"100%",children:(0,x.jsx)(s.iz,{color:(0,c.W8U)(wt),size:"xs",width:"90%"})}),(0,x.jsx)(Vt,{data:q,dividerColor:(0,c.W8U)(wt),setSelectedColor:kt,finalArr:Et,finalArrExternal:Pt,product:Z,PRODUCT_TILE_HEIGHT:R,PRODUCT_TILE_WIDTH:z,FONT_SIZE:A,selectOptionFirstHandler:jt,selectOptionSecondHandler:yt,selectOptionThirdHandler:Ct,getVariantPrice:Yt,selectedOptionFirst:X,selectedOptionSecond:G,selectedOptionThird:Q,selectedVariantId:et})]}),c.$2G&&((null===q||void 0===q?void 0:q.description)||(null===q||void 0===q?void 0:q.body_html))&&(0,x.jsx)(Wt,{PRODUCT_TILE_HEIGHT:R,FONT_SIZE:A,data:q,handleToggle:()=>N(!W),show:W}),(0,x.jsx)(s.xu,{sx:{pointerEvents:"none"},paddingTop:"20px",opacity:0,children:(0,x.jsx)(Kt,{position:"relative",data:q,FONT_SIZE:A,product:Z})}),(0,x.jsx)(Kt,{position:"fixed",selectedVariantId:et,data:q,FONT_SIZE:A,PRODUCT_TILE_WIDTH:z,product:Z,itemQuantity:nt,cartItemCount:st,addToCartFlag:ut,setAddToCartFlag:ht,soldOutFlag:vt,setSoldOutFlag:xt,event:H})]})}const Bt=(t,e,i,n)=>{var o,r,l,a,d,s,c,u,h,p;if(void 0===e&&void 0===i&&void 0===n)return null===t||void 0===t||null===(o=t.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.id;if(void 0===n&&void 0===i)return null===(l=t.variants.find((t=>t.option1===e)))||void 0===l?void 0:l.id;if(void 0===n&&void 0===e)return null===(a=t.variants.find((t=>t.option2===i)))||void 0===a?void 0:a.id;if(void 0===i&&void 0===e)return null===(d=t.variants.find((t=>t.option3===n)))||void 0===d?void 0:d.id;if(void 0===i)return null===(s=t.variants.find((t=>t.option1===e&&t.option3===n)))||void 0===s?void 0:s.id;if(void 0===n)return null===(c=t.variants.find((t=>t.option1===e&&t.option2===i)))||void 0===c?void 0:c.id;if(void 0===e)return null===(u=t.variants.find((t=>t.option2===i&&t.option3===n)))||void 0===u?void 0:u.id;const v=null===t||void 0===t?void 0:t.variants.find((t=>t.option1===e&&t.option2===i&&t.option3===n));return void 0===v?null===t||void 0===t||null===(h=t.variants)||void 0===h||null===(p=h[0])||void 0===p?void 0:p.id:v.id},Yt=(t,e)=>{var i,n;return null===t||void 0===t||null===(i=t.variants)||void 0===i||null===(n=i.find((t=>t.id===e)))||void 0===n?void 0:n.price},Xt=(t,e)=>{var i,n;return null===t||void 0===t||null===(i=t.variants)||void 0===i||null===(n=i.find((t=>t.id.toString()===e)))||void 0===n?void 0:n.option1},$t=(t,e)=>{var i,n;return null===t||void 0===t||null===(i=t.variants)||void 0===i||null===(n=i.find((t=>t.id.toString()===e)))||void 0===n?void 0:n.option2},Gt=(t,e)=>{var i,n;return null===t||void 0===t||null===(i=t.variants)||void 0===i||null===(n=i.find((t=>t.id.toString()===e)))||void 0===n?void 0:n.option3},Jt=(t,e)=>{var i;const n=null===t||void 0===t||null===(i=t.variants)||void 0===i?void 0:i.find((t=>t.id==e));return void 0===n?null:null===n||void 0===n||null===(o=n.featured_image)||void 0===o?void 0:o.src;var o},Qt=(0,r.createContext)({setShowOptionsChart:null});var te=function(t){const e=t.event,i=t.data,n=t.currentProduct,o=t.setOpenShopNow,l=t.setLockSwiper,[a,d]=(0,r.useState)(!1);return(0,x.jsx)(Qt.Provider,{value:{setShowOptionsChart:d},children:(0,x.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[(0,x.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",children:(0,x.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,x.jsx)(Ut,{data:i,event:e,product:n,setOpenShopNow:o,setLockSwiper:l})})}),a?(0,x.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",style:{position:"relative",zIndex:1,bottom:"100%"},className:"whatmore-ios-css-relative-fix",id:"whatmore-size-chart",children:(0,x.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,x.jsx)(Lt,{data:i,event:e,product:n,setShowOptionsChart:()=>{d(!1)}})})}):(0,x.jsx)(x.Fragment,{})]})})};var ee=function(t){var e,[i,n,o,l]=(0,h.Z)();const[a,d]=(0,r.useState)(!1),[v,g]=(0,r.useState)(),[f,w]=(0,r.useState)(),j=(0,u.MO)("whatmoreShopId"),y=t.event,C=t.onBack,S=r.useRef(),b=t.isPlaying,I=t.isLast,k=t.setLockSwiper,_=t.selectedVariantId,F=null===(e=t.showOverlay)||void 0===e||e,T="center";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:l,height:o,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:T,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:l/o,children:(0,x.jsx)(m,{height:"100%",width:"100%",url:y.event_hls_url,isPlaying:b,event:y})})})}),F?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:T,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(Ot,{focusRef:S,event:t.event,isLast:I,onCloseCallback:C,productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(j),j);w(t),g(e),d(!0),k(!0)}})})}):(0,x.jsx)(x.Fragment,{}),!0===a?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:T,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(te,{focusRef:S,event:t.event,isLast:I,onCloseCallback:()=>C(),setLockSwiper:k,data:v,currentProduct:f,setOpenShopNow:d,selectedVariantId:_})})}):(0,x.jsx)("div",{})]})})};const ie=function(t,e){return isNaN(t)||isNaN(e)||e<=0||t>e?0:Math.ceil(t/e*100)};function ne(t){var e,i,[n,o,r,l]=(0,h.Z)();const[a]=(0,u.j1)("whatmoreSecondaryColor"),[d]=(0,u.j1)("whatmoreSecondaryColorShade900"),c=t.progress,p=null!==(e=t.totalSiblings)&&void 0!==e?e:1,v=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0;return(0,x.jsx)(s.Kq,{width:"96%",height:"fit-content",direction:"row",justifyContent:"center",alignItems:"center",spacing:"1px",children:[...Array(p).keys()].map((t=>(0,x.jsx)(s.Kq,{width:"100%",height:.004*r+"px",backgroundColor:t<v?a:d+"99",borderRightRadius:"lg",borderLeftRadius:"lg",direction:"row",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",sx:{display:"block !important"},children:t==v?(0,x.jsx)(s.xu,{height:"100%",width:c+"%",bgColor:a,borderRightRadius:"lg",borderLeftRadius:"lg",sx:{display:"block !important"}}):(0,x.jsx)(x.Fragment,{})},"event-progress-bar-slab-"+t)))})}var oe=i(868),re=i(2630);const le=t=>t>=1e3?(t/1e3).toFixed(1)+"k":t;var ae=i(4862);var de=function(t){var e,i,n,o=t.whatmoreShareTemplateId;const l=t.whatmoreShareStoryId,a=t.whatmoreShareEventId,p=t.event,v=null===(e=t.showShareText)||void 0===e||e,m=null!==(i=t.shareButtonBottomMargin)&&void 0!==i?i:0,g=(0,u.MO)("whatmoreShopId"),f=(0,u.MO)("isInDesignMode"),w=(0,u.MO)("isDemoBrand"),j=(0,u.MO)("whatmorePrimaryFont"),{whatmoreWidgetSourceDetails:y}=(0,r.useContext)(V.I),[C,S,b,I]=(0,h.Z)(),k=null!==(n=t.iconSize)&&void 0!==n?n:.1*I;function _(){const e=(0,u.MO)("whatmoreLandingLocationType");var i;!function(t){f||w||(async()=>{(0,d.x0)(t)})()}(p),(e.startsWith("product")||"embed"===e)&&(o="te"),i="event_product_link"===(0,c.EEC)(g)?p.products[0].product_link||"":window.location.pathname,i=("event_product_link"===(0,c.EEC)(g)?"":window.location.hostname)+i+"?wtt="+o+"&wsid="+l+"&weid="+a,(0,c.lj5)(g)&&(i=i+"&"+(0,c.awP)(g)+"&utm_campaign=video-share&utm_medium="+e);const n={title:(0,c.JNF)(g),text:`${(0,c.Qa8)(g)} \n ${i} ${(0,c.AWG)(g)?"\n \n -via Whatmore":""}`};navigator.share&&!ae.nI?navigator.share(n):(t.setIsModalOpen(!0),t.setShareText([n,i]))}return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{cursor:"pointer",style:{marginBottom:m+"px"},children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[(0,x.jsx)(re.Z,{sx:{boxShadow:3,transform:"scaleX(-1)",color:"white",fontSize:k,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),_(),(0,q.GF)({userInteractionType:H.K.VIDEO_SHARE_CTA_CLICKED,widgetSourceDetails:y,event:p,productList:p.products,ctaList:p.cta})}}),v&&(0,c.u8S)(g)?(0,x.jsxs)(s.xv,{fontSize:.3*k+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:j+" !important",color:"white !important",paddingRight:"10%"},children:["\xa0",p.total_share>(0,c.LWl)(g)?le(p.total_share):"Share","\xa0"]}):(0,x.jsx)(x.Fragment,{})]})})})},se=i(7933),ce=i(2785);var ue=function(t){var e;const i=(0,u.MO)("whatmoreShopId"),n=(0,u.MO)("whatmorePrimaryFont"),o=(0,u.MO)("whatmoreLikedEvents"),l=((0,u.MO)("whatmoreSecondaryColor"),(0,u.MO)("isInDesignMode")),a=(0,u.MO)("isDemoBrand"),{whatmoreWidgetSourceDetails:p}=(0,r.useContext)(V.I),v=t.event,[m,g]=(0,r.useState)(null!==(e=o[v.event_id])&&void 0!==e&&e),[f,w,j,y]=(0,h.Z)(),C=.1*y;function S(t,e){l||a||(async()=>{(0,d.Z6)(t,e)})()}function b(){(0,u.bU)("whatmoreLikedEvents",{...o,[v.event_id]:!m}),m?(S(v,-1),(0,q.GF)({userInteractionType:H.K.VIDEO_UNLIKED,widgetSourceDetails:p,event:v,productList:v.products,ctaList:v.cta})):(S(v,1),(0,q.GF)({userInteractionType:H.K.VIDEO_LIKED,widgetSourceDetails:p,event:v,productList:v.products,ctaList:v.cta})),g(!m)}const I=v.total_like+(m?1:0);return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{cursor:"pointer",children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[m?(0,x.jsx)(ce.Z,{sx:{boxShadow:3,color:(0,c.dmX)(i),fontSize:C,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}):(0,x.jsx)(se.Z,{sx:{boxShadow:3,color:"white",fontSize:C,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}),(0,x.jsx)(x.Fragment,{children:(0,c.CEM)(i)?(0,x.jsxs)(s.xv,{fontSize:.3*C+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:n+" !important",color:"white !important",position:"relative",bottom:"5px"},children:["\xa0",I>=(0,c.zKg)(i)?le(I):"Like","\xa0"]}):(0,x.jsx)(x.Fragment,{})})]})})})};const he=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#25D366",borderRadius:"50%",padding:.3*e},children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"white",class:"bi bi-whatsapp",viewBox:"0 0 16 16",children:(0,x.jsx)("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})})})};var pe=i(8866);const ve=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-twitter-x",viewBox:"0 0 16 16",children:(0,x.jsx)("path",{d:"M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865z"})})})},xe=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-copy",viewBox:"0 0 16 16",children:(0,x.jsx)("path",{"fill-rule":"evenodd",d:"M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z"})})})};var me=t=>{const e=t.shareText,[i,n]=(0,r.useState)("Copy link"),[o,l]=(0,r.useState)("");return(0,x.jsx)(x.Fragment,{children:t.isModalOpen&&(0,x.jsxs)("div",{className:"modal-overlay",style:{backgroundColor:"white",borderRadius:"10px",padding:"12px 12px 20px 12px"},children:[(0,x.jsxs)("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",paddingBottom:"6px"},children:[(0,x.jsx)("img",{onClick:()=>{window.location.href="https://whatmore.ai"},src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",backgroundColor:"transparent",borderRadius:"0px",width:Math.min(t.iconSize,28)+"px"}}),(0,x.jsx)(P.Z,{onClick:e=>{e.stopPropagation(),t.setIsModalOpen(!1)}})]}),(0,x.jsx)("div",{}),(0,x.jsx)(s.iz,{color:"blackAlpha.500",size:"1px",width:"100%"}),(0,x.jsxs)("div",{className:"social-icons",style:{display:"flex",gap:"20px",justifyContent:"center",paddingTop:"12px"},children:[(0,x.jsxs)("div",{onClick:t=>{var i;t.stopPropagation();const n=encodeURIComponent(null===(i=e[0])||void 0===i?void 0:i.text);window.open(`https://wa.me/?text=${n}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(he,{iconSize:Math.min(t.iconSize,30)}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"Whatsapp"})]}),(0,x.jsxs)("div",{onClick:t=>{var i;t.stopPropagation();const n=encodeURIComponent(null===(i=e[0])||void 0===i?void 0:i.text);window.open(`https://twitter.com/intent/tweet?text=${n}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(ve,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"X"})]}),(0,x.jsxs)("div",{onClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(e[1]),n("Link copied"),l("green")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(xe,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14),color:o},children:i})]})]})]})})};var ge=function(t){var e,i;const n=null===(e=t.brandName)||void 0===e?void 0:e.replace(/\s+/g,"_"),o=(0,u.MO)("whatmorePrimaryFont"),r=(0,u.MO)("whatmoreShopId"),l=null!==(i=t.fontSize)&&void 0!==i?i:"8",[a]=(0,pe.Z)(),d=`https://www.whatmore.ai/shoppable-videos?utm_source=${n}&utm_medium=referral&utm_campaign=${"landscape"===a?"customer_referral_desktop":"customer_referral_mobile"}`;return(0,x.jsx)(s.rU,{href:d,isExternal:!0,children:(0,c.XFt)(r)&&(0,x.jsxs)(s.Kq,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content",spacing:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,x.jsx)("p",{style:{textAlign:"center",color:"white",fontFamily:o,fontWeight:"normal",fontSize:1.1*l+"px"},children:"powered by Whatmore"}),(0,x.jsx)(s.xu,{width:"10px"}),(0,x.jsx)("img",{src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",width:1.7*l,backgroundColor:"transparent",borderRadius:"0px"}})]})})};function fe(t){var e;const i=t.event,[n,o,l,a]=(0,h.Z)(),[d]=(0,u.j1)("whatmorePrimaryFont"),{whatmoreIsStoriesTemplate:p}=(0,r.useContext)(V.I),[v]=(0,u.j1)("whatmoreSecondaryColor"),[m]=(0,u.j1)("whatmoreShopId"),g=(0,c.f63)(m),f=null!==(e=(0,c.u2W)(m))&&void 0!==e?e:[v,g,v,g,v],w=(0,r.useRef)(null);return(0,r.useEffect)((()=>{w.current&&w.current.play()}),[]),(0,x.jsx)(x.Fragment,{children:p?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",padding:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-start",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{overflow:"hidden",size:.14*a+"px",sx:{boxShadow:"0px 2px 1px 0px "+f[0]+"50, 0px -2px 1px 0px "+f[1]+"50, 2px 0px 1px 0px "+f[2]+"50, -2px 0px 1px 0px "+f[3]+"80, 2px -2px 1px 0px "+f[4]+"80, -2px 2px 1px 0px "+f[0]+"DA, 2px 2px 1px 0px "+f[1]+"DA, -2px -2px 1px 0px "+f[2]+"DA"},children:"video"==(0,pt.$)((0,oe.V)(i.storyset_thumbnail_image))?(0,x.jsx)("video",{className:"whatmore-story-thumbnail",ref:w,preload:"metadata",loop:!0,playsInline:!0,src:(0,oe.V)(i.storyset_thumbnail_image),muted:!0,alt:"story image"}):(0,x.jsx)("img",{src:(0,oe.V)(i.storyset_thumbnail_image),style:{objectFit:"cover",height:"100%",width:"100%",backgroundColor:"white"}})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:.05*a+"px",fontWeight:"medium",lineHeight:"100%",sx:{fontFamily:d+" !important",color:"white !important",textShadow:"0px 0px 4px black !important;"},children:i.storyset_name})})]})}):(0,x.jsx)(x.Fragment,{})})}var we=function(t){const[e,i,n]=(0,pe.Z)(),[o]=(0,u.j1)("isInDesignMode"),[l]=(0,u.j1)("isDemoBrand"),[a,p]=(0,u.j1)("isProductSwiperCatalogOpen"),[v,m]=(0,u.j1)("isFirstIndicatorRenderDone"),[g]=(0,u.j1)("whatmoreShopId"),f=(0,r.useContext)(ri),{whatmoreEventsBrowsingTemplate:w}=(0,r.useContext)(V.I),[j,C,S,b]=(0,h.Z)(),I=(0,u.MO)("whatmorePrimaryFont"),k=t.event,_=t.storySetId,F=t.isLast,E=t.onCloseCallback,P=t.focusRef,L=t.productClickHandler,z=t.videoPlayingData,R=t.totalSiblingEvents,M=t.indexAmongSiblings,K=t.leftOpenSpaceClickHandler,A=t.midOpenSpaceClickHandler,W=t.rightOpenSpaceClickHandler,{whatmoreWidgetSourceDetails:N}=(0,r.useContext)(V.I),Z=.1*b,[U,B]=(0,r.useState)(!1),[Y,X]=(0,r.useState)([]),$=t=>{G.current&&!G.current.contains(t.target)&&B(!1)},G=(0,r.useRef)(null);(0,r.useEffect)((()=>(U?document.addEventListener("click",$):document.removeEventListener("click",$),()=>{document.removeEventListener("click",$)})),[U]);const J="Free"==(0,c.Svj)(g)&&"portrait"==e;return(0,x.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[U&&(0,x.jsx)("div",{ref:G,className:"whatmore-share-modal",style:{zIndex:100,position:"absolute",boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.6)",width:"75%",top:"45%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},children:(0,x.jsx)(me,{shareText:Y,setShareText:X,iconSize:Z,isModalOpen:U,setIsModalOpen:B})}),(0,x.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,x.jsxs)(s.Kq,{width:"full",height:"fit-content",direction:"column",justifyContent:"flex-start",alignItems:"center",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:[f.showVideoPlayingData?(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",marginTop:"5px",justifyContent:"center",children:(0,x.jsx)(ne,{progress:ie(z.current_time,z.video_duration),totalSiblings:R,indexAmongSiblings:M})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{width:"full",margin:"2px",marginTop:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",paddingRight:"10px",paddingLeft:"10px",children:[(0,x.jsx)(fe,{event:k}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,mt.ZK)(w)?(0,x.jsx)(de,{whatmoreShareTemplateId:(0,mt.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:k.event_id,event:k,showShareText:!1,iconSize:.07*b,shareButtonBottomMargin:6,setIsModalOpen:B,setShareText:X}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(y,{focusRef:P}),("landscape"!==e||t.showCloseOverlay)&&(0,x.jsx)(O,{event:k,onCloseCallback:E})]})]})})]}),(0,x.jsxs)(s.Kq,{width:"100%",height:"100%",direction:"row",justifyContent:"center",children:[(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{K()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"34%",height:"100%",onClick:()=>{A()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{W()},sx:{display:"block !important"}})]}),(0,x.jsxs)(s.xu,{width:"full",height:"fit-content",children:[f.totalEvents>1&&!v&&f.showSwipeIndicator?(0,x.jsx)(s.xu,{width:"full",margin:"2px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,x.jsx)(D,{swipeUp:!F})})}):null,(0,x.jsxs)(s.xu,{width:"fit-content",height:"fit-content",position:"absolute",right:0,bottom:"25%",children:[(0,c.slY)(g)&&!(0,mt.ZK)(w)?(0,x.jsx)(s.xu,{ml:"auto",width:"fit-content",paddingY:"12px",paddingX:"8px",children:(0,x.jsxs)(s.Kq,{gap:"4px",direction:"column",alignItems:"center",cursor:"pointer",onClick:function(){var t;o||l||(async()=>{(0,d.lY)(k,1)})(),(0,q.GF)({userInteractionType:H.K.WHATSAPP_ICON_CLICKED,widgetSourceDetails:N,event:k,productList:null===k||void 0===k?void 0:k.products,ctaList:null===k||void 0===k?void 0:k.cta});const e=k.products.map((t=>`${t.product_link} \n`)),i=(0,c.gtK)(g),n=`Hey, I am interested in ${k.products.length>1?"these products":"this product"} I saw on ${null===(t=k.products[0])||void 0===t?void 0:t.brand} store: \n${e}. Could you please help me with some queries?`;window.open(i+`&text=${n}&type=phone_number`,"_blank")},children:[(0,x.jsx)(he,{iconSize:.7*Z,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)(s.xv,{fontSize:Z*(0,c.Xod)(g)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:I+" !important",color:"white !important"},children:(0,c.UiZ)(g)})]})}):(0,x.jsx)(x.Fragment,{}),(0,c.jY3)(g)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(ue,{event:k})})}):(0,x.jsx)(x.Fragment,{}),(0,c.ROU)(g)&&!(0,mt.ZK)(w)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(de,{whatmoreShareTemplateId:(0,mt.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:k.event_id,event:k,setIsModalOpen:B,setShareText:X})})}):(0,x.jsx)(x.Fragment,{})]}),(0,_t.kT)(k)?(0,x.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(g)?(0,x.jsx)(s.xu,{w:"100%",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(T,{event:k,onToggle:t=>{p("minimize-button"!==t)}})})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,x.jsx)(Et,{event:k,productClickHandler:L})})]}):(0,x.jsx)(x.Fragment,{})]}),J&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",bg:"gray",py:"3px",justifyContent:"center",children:(0,x.jsx)(ge,{brandName:null===k||void 0===k?void 0:k.brand,fontSize:.033*b})})]})]})},je=i(2279),ye=i.n(je),Ce=i(342);var Se=function(t){var e,i,n,o,l,a,[d,m,g,f]=(0,h.Z)();const[w,j]=(0,r.useState)(!1),[y,C]=(0,r.useState)(),[S,b]=(0,r.useState)(),[I,k]=(0,r.useState)({current_time:0,video_duration:0,is_video_ended:!1}),_=(0,u.MO)("whatmoreShopId"),F=t.event,T=t.storyId,E=t.onBack,P=r.useRef(),O=t.isPlaying,L=t.isLast,z=t.setLockSwiper,R=t.onVideoEndedCallback,M=t.progressUpdateCallback,D=null!==(e=t.totalSiblingEvents)&&void 0!==e?e:0,K=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0,A=null===(n=t.showOverlay)||void 0===n||n,W=null!==(o=t.leftOpenSpaceClickHandler)&&void 0!==o?o:()=>{},N=null!==(l=t.midOpenSpaceClickHandler)&&void 0!==l?l:()=>{},Z=null!==(a=t.rightOpenSpaceClickHandler)&&void 0!==a?a:()=>{},{whatmoreWidgetSourceDetails:U}=(0,r.useContext)(V.I),B="center";let Y;try{Y=ye()((()=>{R()}),1e3,{leading:!0,trailing:!1})}catch(X){console.log(X)}return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:f,height:g,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:B,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:f/g,children:(0,x.jsx)(v.Z,{height:"100%",width:"100%",url:(0,oe.V)((0,Ce.uv)(F)),isPlaying:O,timeUpdateCallback:function(t,e){const i=ie(t,e);M(i);const n=I.is_video_ended;i>=99&&O&&!n?(Y(),k({current_time:t,video_duration:e,is_video_ended:!0})):k({current_time:t,video_duration:e,is_video_ended:n})},event:F,source:t.source})})})}),A?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:B,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(we,{focusRef:P,event:t.event,isLast:L,onCloseCallback:t=>{E(t),(0,q.Z2)({userInteractionType:H.K.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:I.current_time},widgetSourceDetails:U,event:F,productList:F.products,ctaList:F.cta})},productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(_),_);console.log(e,"rr"),b(t),C(e),j(!0),z(!0),(0,q.GF)({userInteractionType:H.K.SHOPNOW_CLICKED,widgetSourceDetails:U,event:F,productList:F.products,ctaList:F.cta}),(0,u.bU)("whatmoreAllowAutoSlide",!1)},videoPlayingData:I,totalSiblingEvents:D,indexAmongSiblings:K,leftOpenSpaceClickHandler:W,midOpenSpaceClickHandler:N,rightOpenSpaceClickHandler:Z,storySetId:T,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay})})}):(0,x.jsx)(x.Fragment,{}),!0===w?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:B,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(te,{focusRef:P,event:t.event,isLast:L,onCloseCallback:()=>E(),setLockSwiper:z,data:y,currentProduct:S,setOpenShopNow:t=>{j(t),(0,u.bU)("whatmoreAllowAutoSlide",!t)}})})}):(0,x.jsx)("div",{})]})})},be=i(7300),Ie=i(8984),ke=i(58),_e=i(9723);var Fe=function(t){var[e,i,n,o]=(0,h.Z)();const r=(0,u.MO)("whatmoreShopId"),l=t.event,a=t.isPlaying,d="center";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:o,height:n,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:d,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:o/n,children:(0,x.jsx)(v.Z,{height:"100%",width:"100%",url:(0,oe.V)((0,Ce.uv)(l)),isPlaying:a,timeUpdateCallback:function(t,e){},event:l,source:t.source})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:d,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",backdropFilter:"auto",backdropBlur:"10px",onClick:t=>{(0,ke.QV)()},children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"full",width:"full",children:[(0,x.jsx)(_e.Z,{sx:{boxShadow:3,color:(0,c.Ya_)(r),fontSize:.4*o,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{(0,ke.QV)()}}),(0,x.jsx)(s.xv,{color:"white",fontSize:.05*o+"px",fontWeight:"bold",align:"left",children:"Please click to play video.."})]})})})]})})},Te=i(3433);var Ee=function(t){var e,i;const r=t.event,l=null===(e=t.isPlaying)||void 0===e||e,a=t.onBack,d=t.isLast,s=t.setLockSwiper,c=(t.heightFactor,t.widthFactor,t.onVideoEndedCallback),h=t.progressUpdateCallback,[p,v]=(0,j.Z)(),[m]=(0,u.j1)("whatmoreVideoPlayerPoolBlessed"),g=null===(i=t.showOverlay)||void 0===i||i;function f(){v(!p)}if((0,Ie.KE)()&&0==m)return(0,x.jsx)(Fe,{event:r,onBack:a,isPlaying:l,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:h,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:g,source:Te.j.CAROUSEL_EVENT_OPENED},"shopping-video-view"+r.event_id);if((0,be.B6)(r)||(0,be.WJ)(r))return(0,x.jsx)(Se,{event:r,onBack:a,isPlaying:l,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:h,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:g,source:Te.j.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id);if((0,be.yC)(r)){var{status:w,bannerText:y,timeToStartInMins:C}=n.Z.getEventStatus(r);if(w.name===o.Z.LIVE.name)return(0,x.jsx)(ee,{event:r,onBack:a,isPlaying:l,isLast:d,showOverlay:g},"shopping-live-view"+r.event_id)}return console.error("Can't render event which is neither video or a currently-live-event"),(0,x.jsx)("div",{})},Pe=i(9284),Oe=i.n(Pe),Le=i(7463),ze=i(2154);function Re(t){var e;const[i,n]=(0,r.useState)(!1),o=t.onClick,l=null!==(e=t.fontSize)&&void 0!==e?e:50;return(0,x.jsx)("div",{style:{height:"fit-content",width:"fit-content",backgroundColor:"black",opacity:.4,borderRadius:"50%"},className:[i?"whatmore-scale-on-tap":""].join(" "),children:"left"===t.type?(0,x.jsx)(ze.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{n(!0),setTimeout((()=>{n(!1)}),500),o(t,"up")}}):(0,x.jsx)(Le.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{n(!0),setTimeout((()=>{n(!1)}),500),o(t,"down")}})})}var Me=function(t){var e,i,n;const o=null!==(e=t.relativeBottomPercentage)&&void 0!==e?e:"30%",r=null!==(i=t.width)&&void 0!==i?i:"100%",l=null!==(n=t.fontSize)&&void 0!==n?n:50,a=t.handleClick;return(0,x.jsx)("div",{style:{position:"relative",zIndex:1,bottom:o,width:"100%",height:"fit-content",display:"flex",flexFlow:"row nowrap",justifyContent:"center"},id:"here",children:(0,x.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:r,height:"fit-content",paddingRight:"5px",paddingLeft:"5px",paddingTop:"5px",paddingBottom:"5px",justifyContent:"space-between",alignContent:"center"},children:[(0,x.jsx)(Re,{type:"left",onClick:a,fontSize:l}),(0,x.jsx)(Re,{type:"right",onClick:a,fontSize:l})]})})},De=i(2860),Ke=i(4669);var Ae=function(t,e){function i(t,e){return 1==e?0:t<0?e+t:t>=e?t-e:t}const n=(0,r.useRef)({prevIndex:i(t-1,e),activeIndex:t,nextIndex:i(t+1,e)});return[function(){return n.current},function(t){n.current="right"==t?{prevIndex:i(n.current.activeIndex,e),activeIndex:i(n.current.activeIndex+1,e),nextIndex:i(n.current.activeIndex+2,e)}:{prevIndex:i(n.current.activeIndex-2,e),activeIndex:i(n.current.activeIndex-1,e),nextIndex:i(n.current.activeIndex,e)}},function(t){return i(n.current.activeIndex+t)}]};var We=function(t,e){const i=(0,r.useRef)({clientX:0,clientY:0});return[function(t){i.current.clientX=t.changedTouches[0].clientX,i.current.clientY=t.changedTouches[0].clientY},function(n){const o=i.current.clientX,r=i.current.clientY;var l=o-n.changedTouches[0].clientX,a=r-n.changedTouches[0].clientY;return"vertical"==t&&Math.abs(a)>e||"horizontal"==t&&Math.abs(l)>e?"vertical"==t?a>0?"right":"left":l>0?"right":"left":null}]};var Ne=function(t,e){const i=(0,r.useRef)(ye()(((t,e)=>{t(e)}),300,{leading:!0,trailing:!1}));return[function(n,o){var r=0;if(r="vertical"==t?n.deltaY:n.deltaX,Math.abs(r)<=e)return;const l=r>0?"right":"left";i.current(o,l)}]},qe=i(5173);var He=function(t){const e=t.events,i=t.eventIndex,n=t.onBack;var[o,p,v,m]=(0,h.Z)();const[g]=(0,u.j1)("isInDesignMode"),[f]=(0,u.j1)("isDemoBrand"),[w,j]=(0,r.useState)(!0),[y,C]=(0,u.j1)("isFirstIndicatorRenderDone"),[S,b]=(0,r.useState)(!1),{setCloseClickComponent:I}=(0,r.useContext)(ri),{slideDirection:k}=(0,r.useContext)(ri),[_]=(0,u.j1)("whatmoreShopId"),[F]=(0,u.j1)("whatmoreLandingLocationType"),[T,E]=Ae(i,e.length),[P,O]=We(k,50),[L]=Ne("vertical",30),[z,R]=(0,r.useState)(!1),[M,D]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:K,whatmoreUserInfo:A}=(0,r.useContext)(V.I);function N(){R(!1)}function Z(t){N(),setTimeout((()=>{n(t)}),500)}(0,r.useEffect)((()=>(R(!0),()=>{})),[]);const U=K.landingLocationType,B=K.templateType;function Y(){(0,u.MO)("whatmoreAllowAutoSlide")&&(E("right"),M.slideNext())}function X(t,e){E(e),function(t,e){M&&("left"===e?M.slidePrev():M.slideNext())}(0,e)}I(Z);const $=Math.round(.05*v);return(0,x.jsx)(Oe(),{isOpen:z,onAfterOpen:function(){},onRequestClose:N,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)(qe.Z,{children:(0,x.jsxs)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:(0,W.lA)("#000000",13)},onTouchStart:t=>{P(t)},onTouchEnd:t=>{if(S)return;const e=O(t);e&&X(0,e)},onWheel:t=>{S||L(t,(t=>{X(0,t)}))},children:[(0,x.jsx)(l.tq,{speed:400,threshold:$,slidesPerView:1,direction:k,modules:[a.tl,a.Gk],initialSlide:i,loop:1!=e.length,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,allowSlideNext:!S,allowSlidePrev:!S,allowTouchMove:!1,onSwiper:t=>{D(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:K,event:e[T().activeIndex],productList:e[T().activeIndex].products})},onSlideChange:t=>{var i;w?j(!1):(y||C(!0),i=e[T().activeIndex],g||f||(async()=>{const t=(0,mt.NY)(U)+(0,mt.dS)(B)+"_"+(null===i||void 0===i?void 0:i.event_id);(0,d.wh)(i),"index"===F?((0,Ke.Tc)(_,De.Xh,De.pR),(0,ot.H4)(i.event_id,i.products,De.Xh,De.pR,t,null===i||void 0===i?void 0:i.location,null===A||void 0===A?void 0:A.userType)):F.startsWith("product")||"embed"===F?((0,Ke.Tc)(_,De.h7,De.dU),(0,ot.H4)(i.event_id,i.products,De.h7,De.dU,t)):F.startsWith("collection")?((0,Ke.Tc)(_,De.U$,De.Pk),(0,ot.H4)(i.event_id,i.products,De.U$,De.Pk,t)):((0,Ke.Tc)(_,De.Xh,De.pR),(0,ot.H4)(i.event_id,i.products,De.Xh,De.pR,t))})(),(0,q.y4)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:K,event:e[T().activeIndex],productList:e[T().activeIndex].products}))},children:[...Array(Math.min(e.length,3)).keys()].map((i=>(0,x.jsx)(l.o5,{children:i=>{let{isActive:n,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=i;const d=n?"activeIndex":o?"prevIndex":"nextIndex";return(0,x.jsx)(s.Kq,{direction:"column",height:window.innerHeight,justifyContent:"center",children:(0,x.jsx)(Ee,{event:e[T()[d]],onBack:Z,isPlaying:1==e.length||n&&l,isLast:!1,setLockSwiper:b,onVideoEndedCallback:Y,progressUpdateCallback:t=>{},showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay})})}},"event-vertical-scroll-slide-"+i)))}),e.length>1&&!S&&(0,c.h6H)(_)&&"horizontal"===(0,c.e8z)(_)&&"horizontal"===k?(0,x.jsx)(Me,{relativeBottomPercentage:"50%",width:m,handleClick:(t,e)=>{X(0,"down"==e?"right":"left")},fontSize:parseInt(.12*m)}):(0,x.jsx)(x.Fragment,{})]})})})},Ve=i(1168);i(6143),i(7850),i(4444),i(7244),i(123),i(5892),i(1811);const Ze=t=>{let{children:e,customClass:i,show:n,closeCallback:o}=t;return Ve.createPortal((0,x.jsxs)("div",{className:`whatmore-landscape-modal whatmore-root ${i}`,style:{display:n?"block":"none"},children:[(0,x.jsx)("div",{className:"whatmore-landscape-modal-overlay",onClick:o}),(0,x.jsx)("div",{className:"whatmore-landscape-modal-content",children:e})]}),document.body)};Ze.defaultProps={children:(0,x.jsx)("div",{children:"Empty Modal"}),customClass:"",show:!1,closeCallback:()=>!1};var Ue=Ze;var Be=function(t){var e,[i,n,o,p]=(0,h.Z)();const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[g,f]=(0,u.j1)("isFirstIndicatorRenderDone"),[w,j]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:y}=(0,r.useContext)(ri),[C,S]=(0,r.useState)(!1),[b]=(0,u.j1)("whatmoreShopId"),[I]=(0,u.j1)("whatmoreLandingLocationType"),{whatmoreUITheme:k}=(0,r.useContext)(V.I),{whatmoreWidgetSourceDetails:_,whatmoreUserInfo:F}=(0,r.useContext)(V.I),[T,E]=(0,r.useState)(!1),[P,L]=(0,r.useState)(null);function z(){E(!1)}const R=t.events,M=t.eventIndex,D=t.onBack,K=R.concat(R),A=R.length,N=null===R||void 0===R||null===(e=R[0])||void 0===e?void 0:e.brand,Z=(0,r.useRef)(0);function U(t){z(),setTimeout((()=>{D(t)}),500)}function B(){P&&!P.isEnd&&(0,u.MO)("whatmoreAllowAutoSlide")&&P.slideNext()}(0,r.useEffect)((()=>(E(!0),()=>{})),[]),y(U);const Y=_.landingLocationType,X=_.templateType,$=parseInt(Math.min(5,R.length));return(0,x.jsx)(Ue,{show:T,closeCallback:z,customClass:"whatmore-landscape-modal-swipe-view",children:(0,x.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",aligntItems:"center",backgroundColor:(0,W.lA)("#000000",13),children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:p*$,children:(0,x.jsxs)(l.tq,{onInit:t=>{L(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:_,event:R[t.activeIndex],productList:R[t.activeIndex].products,ctaList:R[t.activeIndex].cta})},slidesPerView:$,centeredSlides:!0,allowTouchMove:!1,initialSlide:M,modules:[a.lI,a.W_,a.Gk,a.pt,a.tl],navigation:$>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*o),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:p*$,watchSlidesProgress:!0,onSlideChange:t=>{var e;w?j(!1):(g||f(!0),e=R[t.activeIndex],v||m||(async()=>{const t=(0,mt.NY)(Y)+(0,mt.dS)(X)+"_"+(null===e||void 0===e?void 0:e.event_id);(0,d.wh)(e),"index"===I?((0,Ke.Tc)(b,De.Xh,De.pR),(0,ot.H4)(e.event_id,e.products,De.Xh,De.pR,t,null===e||void 0===e?void 0:e.location,null===F||void 0===F?void 0:F.userType)):I.startsWith("product")||"embed"===I?((0,Ke.Tc)(b,De.h7,De.dU),(0,ot.H4)(e.event_id,e.products,De.h7,De.dU,t)):I.startsWith("collection")?((0,Ke.Tc)(b,De.U$,De.Pk),(0,ot.H4)(e.event_id,e.products,De.U$,De.Pk,t)):((0,Ke.Tc)(b,De.Xh,De.pR),(0,ot.H4)(e.event_id,e.products,De.Xh,De.pR,t))})(),(0,q.y4)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:_,event:R[t.activeIndex],productList:R[t.activeIndex].products,ctaList:R[t.activeIndex].cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[R.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(O,{onCloseCallback:D})}),K.slice(M,R.length+M).map(((t,e)=>(0,x.jsx)(l.o5,{children:t=>{let{isActive:i,isPrev:n,isNext:r,isVisible:l,isDuplicate:a}=t;if(i)return(0,x.jsx)(s.Kq,{direction:"column",height:o,width:1*p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==k?"10px":"0px",borderWidth:(0,c.alU)(b),borderColor:(0,c.qPe)(b)},children:(0,x.jsx)(Ee,{event:R[e%A],onBack:U,isPlaying:!0,isLast:e%A===R.length-1,setLockSwiper:S,widthFactor:1,heightFactor:1,onVideoEndedCallback:B,progressUpdateCallback:t=>{},showCloseOverlay:(null===R||void 0===R?void 0:R.length)<=2})})});if(r)return(0,x.jsx)(s.Kq,{direction:"column",height:o,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{P.slideTo(e%A,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==k?"10px":"0px",borderWidth:(0,c.alU)(b),borderColor:(0,c.qPe)(b)},children:(0,x.jsx)(Ee,{event:R[e%A],onBack:U,isPlaying:!1,isLast:e%A===R.length-1,setLockSwiper:S,widthFactor:1,heightFactor:1,onVideoEndedCallback:B,progressUpdateCallback:t=>{},showOverlay:!1})})});if(n&&1===Z.current)return(0,x.jsx)(s.Kq,{direction:"column",height:o,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{P.slideTo(e%A,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==k?"10px":"0px",borderWidth:(0,c.alU)(b),borderColor:(0,c.qPe)(b)},children:(0,x.jsx)(Ee,{event:R[e%A],onBack:U,isPlaying:!1,isLast:e%A===R.length-1,setLockSwiper:S,widthFactor:1,heightFactor:1,onVideoEndedCallback:B,progressUpdateCallback:t=>{},showOverlay:!1})})});try{M+e>=A-1&&(Z.current=1)}catch(d){console.log(d)}return(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide"+t.event_id)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(ge,{brandName:N,height:.04*o,width:.1*p,fontSize:.02*o})})]})})},Ye=i(6090),Xe=i(7616),$e=i(9302),Ge=i(2575);var Je=function(t){const[e,i,n,o]=(0,h.Z)(),[r]=(0,u.j1)("whatmorePrimaryColor"),[l]=(0,u.j1)("whatmoreSecondaryColor"),a="flex-end";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:o,height:n,backgroundColor:"whiteAlpha.200",backdropBlur:"10px",children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:a,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.oM,{width:"full",ratio:o/n,children:(0,x.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+r+", gray, "+l+")"})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:a,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{padding:"2px",margin:"5px",borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,x.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",backdropFilter:"auto",backdropBlur:"5px"})})})})]})})};var Qe=function(t){var e;const i=t.stories,n=t.onBack,o=t.onStoryCompleteCallback,a=t.isActive,c=null!==(e=t.initialEventIndex)&&void 0!==e?e:0,p=i.events;var[v,m,g,f]=(0,h.Z)();const[w,y]=(0,j.Z)(),[C]=(0,u.j1)("isInDesignMode"),[S]=(0,u.j1)("isDemoBrand"),[b]=(0,u.j1)("whatmoreShopId"),[I,k]=(0,r.useState)(!0),[_,F]=(0,u.j1)("isFirstIndicatorRenderDone"),[T,E]=(0,r.useState)(null),[P,O]=(0,r.useState)(!1),{whatmoreWidgetSourceDetails:L,whatmoreUserInfo:z}=(0,r.useContext)(V.I),[R,M]=Ae(c,p.length);function D(t){n(t)}const K=L.landingLocationType,A=L.templateType;function W(){if(!(0,u.MO)("whatmoreAllowAutoSlide"))return;R().activeIndex+1>=p.length?o("right"):(M("right"),T&&T.slideNext())}function N(t){const e=R().activeIndex;"right"==t&&e+1>=p.length||"left"==t&&e-1<0?o(t):(M(t),T&&("left"==t?T.slidePrev():T.slideNext()))}return p[R().activeIndex],(0,x.jsx)("div",{children:(0,x.jsx)(l.tq,{speed:1,slidesPerView:1,direction:"horizontal",initialSlide:0,loop:!0,height:g,width:f,watchSlidesProgress:!0,allowTouchMove:!1,onSwiper:t=>{E(t)},onSlideChange:t=>{I?k(!1):(_||F(!0),function(t){const e=(0,mt.NY)(K)+(0,mt.dS)(A)+"_"+(null===t||void 0===t?void 0:t.event_id);C||S||(async()=>{(0,d.wh)(t),(0,Ke.Tc)(b,De.Xh,De.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===z||void 0===z?void 0:z.userType)})()}(p[R().activeIndex]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:L,event:p[R().activeIndex],productList:p[R().activeIndex].products,ctaList:p[R().activeIndex].cta}))},children:[...Array(Math.min(p.length,3)).keys()].map((e=>(0,x.jsx)(l.o5,{children:e=>{let{isActive:n,isPrev:o,isNext:r,isVisible:l,isDuplicate:d}=e;if(a){const e=n?"activeIndex":o?"prevIndex":"nextIndex",r=p[R()[e]];return(0,x.jsx)(s.Kq,{direction:"column",height:g,justifyContent:"center",children:(0,be.B6)(r)||(0,be.WJ)(r)?(0,x.jsx)(Se,{event:r,totalSiblingEvents:p.length,indexAmongSiblings:R()[e],onBack:D,isPlaying:a&&n&&l,isLast:!1,setLockSwiper:O,onVideoEndedCallback:W,progressUpdateCallback:t=>{},leftOpenSpaceClickHandler:()=>{N("left")},midOpenSpaceClickHandler:()=>{y(!w)},rightOpenSpaceClickHandler:()=>{N("right")},storyId:i.id,source:Te.j.STORY_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id):(0,x.jsx)(x.Fragment,{})})}return(0,x.jsx)(s.Kq,{direction:"column",height:v,justifyContent:"center",children:(0,x.jsx)(Je,{})})}},"event-story-view-slide-"+e)))})})};var ti=function(t){const e=t.onBack,i=t.eventsStories,n=t.initialStoryIndex;var[o,c,p,v]=(0,h.Z)();const[m]=(0,u.j1)("isInDesignMode"),[g]=(0,u.j1)("isDemoBrand"),[f,w]=(0,r.useState)(!0),[j,y]=(0,u.j1)("isFirstIndicatorRenderDone"),[C,S]=(0,r.useState)(!1),{setCloseClickComponent:b}=(0,r.useContext)(ri),{slideDirection:I}=(0,r.useContext)(ri),[k]=(0,u.j1)("whatmoreShopId"),[_,F]=Ae(n,i.length),[T,E]=We("horizontal",50),[P]=Ne("vertical",30),O=t.eventIndex,[L,z]=(0,r.useState)(!1),[R,M]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:D,whatmoreUserInfo:K}=(0,r.useContext)(V.I);function A(){z(!1)}function W(t){A(),setTimeout((()=>{e(t)}),500)}(0,r.useEffect)((()=>(z(!0),()=>{})),[]),b(W);const N=D.landingLocationType,Z=D.templateType;function U(t){R&&(0,u.MO)("whatmoreAllowAutoSlide")&&(F(t),"right"==t?R.slideNext():R.slidePrev())}function B(t,e){U(e)}return(0,x.jsx)(Oe(),{isOpen:L,onAfterOpen:function(){},onRequestClose:A,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:"#00000088"},onTouchStart:t=>{T(t)},onTouchEnd:t=>{const e=E(t);e&&B(0,e)},onWheel:t=>{P(t,(t=>{B(0,t)}))},children:(0,x.jsx)(l.tq,{speed:1,slidesPerView:1,direction:"horizontal",modules:[a.SH,a.Gk],initialSlide:n,loop:i.length>1,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,onSwiper:t=>{var e,n;M(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:D,event:i[_().activeIndex].events[0],productList:null===(e=i[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[_().activeIndex].events[0])||void 0===n?void 0:n.cta})},onSlideChange:t=>{var e,n;f?w(!1):(!function(t){const e=(0,mt.NY)(N)+(0,mt.dS)(Z)+"_"+(null===t||void 0===t?void 0:t.event_id);m||g||(async()=>{(0,d.wh)(t),(0,Ke.Tc)(k,De.Xh,De.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===K||void 0===K?void 0:K.userType)})()}(i[_().activeIndex].events[0]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:D,event:i[_().activeIndex].events[0],productList:null===(e=i[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[_().activeIndex].events[0])||void 0===n?void 0:n.cta}))},allowTouchMove:!1,cubeEffect:{shadow:!0,slideShadows:!0,shadowOffset:20,shadowScale:.94},children:[...Array(Math.min(i.length,3)).keys()].map((t=>(0,x.jsx)(l.o5,{children:t=>{let{isActive:e,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=t;const c=e?"activeIndex":r?"prevIndex":"nextIndex";return(0,x.jsx)(s.Kq,{direction:"column",height:o,justifyContent:"center",children:(0,x.jsx)(Qe,{stories:i[_()[c]],onBack:W,isActive:e&&a,isNext:l,isPrev:r,onStoryCompleteCallback:U,nextStories:i[_().nextIndex],prevStories:i[_().prevIndex],initialEventIndex:n==_()[c]?O:0},"event-story-view-"+i[_()[c]].id)})}},"event-vertical-scroll-slide-"+t)))})})})},ei=i(4892);var ii=function(t){var e,i,n,[o,l,a,d]=(0,h.Z)();const[c]=(0,u.j1)("whatmorePrimaryColor"),[p]=(0,u.j1)("whatmoreSecondaryColor"),v=t.event,m=(t.onBack,r.useRef(),null!==(e=t.showPausedVideo)&&void 0!==e&&e),f=null!==(i=t.heightFactor)&&void 0!==i?i:1,w="flex-end";return d*=null!==(n=t.widthFactor)&&void 0!==n?n:1,a*=f,(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:d,height:a,children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:w,height:"full",width:"full",children:(0,x.jsx)(s.xu,{children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:m?(0,be.B6)(v)||(0,be.WJ)(v)?(0,x.jsx)(ei.Z,{height:"100%",width:"100%",url:v.thumbnail_image,isPlaying:!1,pauseFromPlayTimeInMs:1e3,event:v}):(0,x.jsx)(g.Ee,{width:"full",height:"full",src:v.thumbnail_image,objectFit:"cover",borderRadius:"lg"}):(0,x.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+c+", gray, "+p+")"})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:w,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,x.jsx)(s.xu,{width:"full",height:"full",backgroundColor:"blackAlpha.400"})})})})]})})};var ni=function(t){var e,i,[n,o,c,p]=(0,h.Z)();const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[g,f]=(0,u.j1)("isFirstIndicatorRenderDone"),[w,j]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:y}=(0,r.useContext)(ri),[C,S]=(0,r.useState)(!1),[b]=(0,u.j1)("whatmoreShopId"),{whatmoreWidgetSourceDetails:I,whatmoreUserInfo:k}=(0,r.useContext)(V.I),[_,F]=(0,r.useState)(!1),[T,E]=(0,r.useState)(null);function P(){F(!1)}t.events;const L=t.eventIndex,z=t.onBack,R=t.eventsStories,M=t.initialStoryIndex,D=null===(e=R[0])||void 0===e||null===(i=e.events[0])||void 0===i?void 0:i.brand;function K(t){P(),setTimeout((()=>{z(t)}),500)}(0,r.useEffect)((()=>(F(!0),()=>{})),[]),y(K);const A=I.landingLocationType,W=I.templateType;function N(t){T&&!T.isEnd&&("right"==t?T.slideNext():T.slidePrev())}const Z=parseInt(Math.min(5,R.length));return(0,x.jsx)(Ue,{show:_,closeCallback:P,customClass:"whatmore-landscape-modal-stories-view",children:(0,x.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",aligntItems:"center",backgroundColor:"blackAlpha.800",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:p*Z,children:(0,x.jsxs)(l.tq,{onInit:t=>{var e,i;E(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:I,event:R[t.activeIndex].events[0],productList:null===(e=R[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=R[t.activeIndex].events[0])||void 0===i?void 0:i.cta})},slidesPerView:Z,centeredSlides:!0,allowTouchMove:!1,initialSlide:M,modules:[a.lI,a.W_,a.Gk],navigation:Z>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*c),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:p*Z,watchSlidesProgress:!0,onSlideChange:t=>{var e,i;w?j(!1):(g||f(!0),function(t){const e=(0,mt.NY)(A)+(0,mt.dS)(W)+"_"+(null===t||void 0===t?void 0:t.event_id);v||m||(async()=>{(0,d.wh)(t),(0,Ke.Tc)(b,De.Xh,De.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===k||void 0===k?void 0:k.userType)})()}(R[t.activeIndex].events[0]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:I,event:R[t.activeIndex].events[0],productList:null===(e=R[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=R[t.activeIndex].events[0])||void 0===i?void 0:i.cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[R.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(O,{onCloseCallback:z})}),R.map(((t,e)=>(0,x.jsx)(l.o5,{children:i=>{let{isActive:n,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=i;if(n){const i=1;return(0,x.jsx)(s.Kq,{direction:"column",height:c,width:p*i,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(Qe,{stories:t,onBack:K,isActive:n&&l,isNext:!1,isPrev:!1,onStoryCompleteCallback:N,initialEventIndex:M==e?L:0,showCloseOverlay:(null===R||void 0===R?void 0:R.length)<=2},"event-story-view-"+t.id)})})}return o||r?(0,x.jsx)(s.Kq,{direction:"column",height:c,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{T.slideTo(e,300)},children:(0,x.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(ii,{showPausedVideo:!0,event:R[e].events[0],onBack:K,isPlaying:!1,setLockSwiper:S})})}):(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide-"+e)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(ge,{brandName:D,height:.04*c,width:.1*p,fontSize:.02*c})})]})})};const oi=(0,Ge.Z)({key:"whatmore-css-sv"}),ri=(0,r.createContext)({isIOS:!1,totalEvents:0,closeClickComponent:null,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:"vertical",showSwipeIndicator:!0});var li=function(t){var e,i;const[n,o,l]=(0,pe.Z)(),[a]=(0,u.j1)("whatmoreShopId"),{whatmoreRootId:d}=(0,r.useContext)(V.I),{whatmoreIsStoriesTemplate:s}=(0,r.useContext)(V.I);var h=t.events,p=t.index,v=t.onBack,m=t.eventsStories,g=t.initialStoryIndex,f=(0,c.cX2)(a),w=(h[p],"portrait"===n?null!==(e=t.slideDirection)&&void 0!==e?e:"vertical":null!==(i=t.slideDirection)&&void 0!==i?i:h.length>1?"horizontal":"vertical"),j="portrait"===n?!(0,c.h6H)(a)&&!s:(0,c.n89)(a);return h[p],(0,r.useLayoutEffect)((()=>{(0,c.TLG)(a)&&(window.location.href.includes(f)?history.replaceState(null,"","#"+f):history.pushState(null,"","#"+f),window.addEventListener("popstate",(()=>{window.location.href.includes(f)||v()})))}),[]),delete Xe.ZP.styles.global,s?(0,x.jsx)($e.C,{value:oi,children:(0,x.jsx)(Ye.x,{theme:Xe.ZP,cssVarsRoot:d,resetCSS:!1,children:(0,x.jsx)(ri.Provider,{value:{isIOS:(0,Ie.KE)(),totalEvents:h.length,closeClickComponent:v,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:w,showSwipeIndicator:j},children:"portrait"===n?(0,x.jsx)(ti,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p}):(0,c.Bbr)(a)?(0,x.jsx)(ni,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p}):(0,x.jsx)(ti,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p})})})}):(0,x.jsx)($e.C,{value:oi,children:(0,x.jsx)(Ye.x,{theme:Xe.ZP,cssVarsRoot:d,resetCSS:!1,children:(0,x.jsx)(ri.Provider,{value:{isIOS:(0,Ie.KE)(),totalEvents:h.length,closeClickComponent:v,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:w,showSwipeIndicator:j},children:"portrait"===n?(0,x.jsx)(He,{events:h,eventIndex:p,onBack:v}):(0,x.jsx)(Be,{events:h,eventIndex:p,onBack:v})})})})}},9316:function(t,e,i){i.d(e,{mT:function(){return o}});var n=i(686);const o=`\n ${n.F4`
|
|
77
77
|
0% { transform: scale(1); }
|
|
78
78
|
50%, { transform: scale(0.95); }
|
|
79
79
|
100% { transform: scale(1); }
|