whatmore-react-assets 1.0.1843 → 1.0.1844

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.
Files changed (35) hide show
  1. package/package.json +1 -1
  2. package/static/js/{12.2ff87af4.chunk.js → 12.e23e4099.chunk.js} +2 -2
  3. package/static/js/415.0c774e04.chunk.js +1 -0
  4. package/static/js/799.a1a2604a.chunk.js +1 -0
  5. package/static/js/{event-click-component.02d03131.chunk.js → event-click-component.9141709d.chunk.js} +3 -3
  6. package/static/js/homepage-carousel-view.d75fe339.chunk.js +15 -0
  7. package/static/js/react-main-app.0c1b64cb.chunk.js +1 -0
  8. package/static/js/{wht-neo-atc.280795ae.chunk.js → wht-neo-atc.c2de104b.chunk.js} +1 -1
  9. package/static/js/{wht-neo-banner.59332c80.chunk.js → wht-neo-banner.b779a272.chunk.js} +1 -1
  10. package/static/js/wht-neo-floating.568873a6.chunk.js +1 -0
  11. package/static/js/wht-neo-shopper.da8de2d8.chunk.js +2 -0
  12. package/static/js/wht-neo-stories.50cda412.chunk.js +1 -0
  13. package/static/js/wht-neo.9070aa69.chunk.js +1 -0
  14. package/static/js/wht-skin-product-multi-product.44390641.chunk.js +1 -0
  15. package/static/js/wht-skin-product-premium.afbea9c2.chunk.js +1 -0
  16. package/static/js/wht-skin-product-thumbnail-strip.35f78252.chunk.js +1 -0
  17. package/static/js/{wht-skin-shared-circle.4516194e.chunk.js → wht-skin-shared-circle.c166ece5.chunk.js} +1 -1
  18. package/static/js/wht-skin-shared-coverflow.8816605c.chunk.js +1 -0
  19. package/static/js/wht-skin-shared-info-strip.52270c1d.chunk.js +1 -0
  20. package/static/js/wht-skin-shared-standard.6c49790a.chunk.js +1 -0
  21. package/whatmore.js +2 -2
  22. package/static/js/415.41c9c5d5.chunk.js +0 -1
  23. package/static/js/79.35d8bfe8.chunk.js +0 -1
  24. package/static/js/homepage-carousel-view.70b0a882.chunk.js +0 -15
  25. package/static/js/react-main-app.539f06d4.chunk.js +0 -1
  26. package/static/js/wht-neo-floating.4deeae80.chunk.js +0 -1
  27. package/static/js/wht-neo-shopper.85587cd5.chunk.js +0 -2
  28. package/static/js/wht-neo-stories.a3e4fd3c.chunk.js +0 -1
  29. package/static/js/wht-neo.0058f891.chunk.js +0 -1
  30. package/static/js/wht-skin-product-multi-product.9283860a.chunk.js +0 -1
  31. package/static/js/wht-skin-product-premium.890a272c.chunk.js +0 -1
  32. package/static/js/wht-skin-product-thumbnail-strip.46e96e39.chunk.js +0 -1
  33. package/static/js/wht-skin-shared-coverflow.19f003d3.chunk.js +0 -1
  34. package/static/js/wht-skin-shared-info-strip.6c0d316e.chunk.js +0 -1
  35. package/static/js/wht-skin-shared-standard.0ed7d073.chunk.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[268],{221:function(e,t,n){n.d(t,{N:function(){return o}});const o={BANNER:"banner",CAROUSEL_EVENT_OPENED:"carousel_event_opened",CAROUSEL_THUMBNAIL_VIEW:"carousel_thumbnail_view",STORY_EVENT_OPENED:"story_event_opened",STORY_THUMBNAIL_VIEW:"story_thumbnail_view"}},428:function(e,t,n){n.d(t,{Sn:function(){return o}});const o=Array.from(document.getElementsByClassName("whatmore-base"))},564:function(){},621:function(){},878:function(){},897:function(){},2058:function(e,t,n){n(1477);var o=n(9263),i=n(1214),r=n(5547),a=n(9383),s=n(481);const l=function(e,t){return(0,r.BLb)(t)?e+"?"+(0,r.VCz)(t)+"&"+(0,r.Spk)(t)+"&"+(0,r.yD5)(t):e};t.A=function(e){var t;const[n,d,c,u]=(0,o.A)(),h=(0,i.Xd)("isInDesignMode"),m=(0,i.Xd)("isDemoBrand"),p=(0,i.Xd)("whatmoreSecondaryColor"),v=(0,i.Xd)("whatmorePrimaryFont"),f=(0,i.Xd)("whatmoreShopId"),w=e.cta,g=.06*u,y=.03*u+"px",b=.06*u+"px";return(0,s.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,s.jsx)("div",{style:{display:"flex",flexDirection:"row",height:"fit-content",width:"100%",justifyContent:"center",marginBottom:y,marginTop:y},children:(0,s.jsx)("a",{href:l(w.cta_link,f),style:{color:"white",textDecoration:"none"},onClick:()=>{h||m||(async()=>{(0,a.increaseCustomCtaCount)(e)})()},children:(0,s.jsx)("span",{className:"whatmore-cta-tile-text",style:{fontSize:g*(null!==(t=e.fontFactor)&&void 0!==t?t:1)+"px",color:e.isBanner?p:"#fff",backgroundColor:e.isBanner?"#fff":p,borderRadius:"round"===(0,r.hep)(f)?"5px":"0",boxShadow:"1px 1px #0000001a",fontFamily:v,fontWeight:e.isBanner?"bold":void 0,padding:"10px",paddingLeft:b,paddingRight:b,display:"inline-block"},children:w.cta_title})})})})}},2169:function(e,t,n){var o=n(481);t.A=({size:e,color:t="rgba(255, 255, 255, 0.95)",showBackground:n=!0})=>(0,o.jsxs)("svg",{width:.7*e,height:.7*e,viewBox:"0 0 80 80",fill:"none",style:{filter:n?"drop-shadow(0 8px 24px rgba(0,0,0,0.5))":"drop-shadow(0 3px 10px rgba(0,0,0,0.45))",transition:"all 0.4s cubic-bezier(0.4, 0, 0.2, 1)",cursor:"pointer"},className:"premium-play-icon",children:[n&&(0,o.jsx)("circle",{cx:"40",cy:"40",r:"28",fill:"url(#playGradient)",stroke:"rgba(255, 255, 255, 0.2)",strokeWidth:"1.5",style:{backdropFilter:"blur(20px)"}}),(0,o.jsx)("path",{d:n?"M34 28 L34 52 L54 40 Z":"M30 24 L30 56 L62 40 Z",fill:n?t:"white",stroke:n?t:"white",strokeWidth:n?"5":"6",strokeLinejoin:"round",strokeLinecap:"round",style:{filter:"drop-shadow(0 2px 8px rgba(0,0,0,0.35))"}}),(0,o.jsxs)("defs",{children:[(0,o.jsxs)("radialGradient",{id:"playGradient",cx:"0.3",cy:"0.3",r:"0.8",children:[(0,o.jsx)("stop",{offset:"0%",stopColor:"rgba(255, 255, 255, 0.25)"}),(0,o.jsx)("stop",{offset:"70%",stopColor:"rgba(255, 255, 255, 0.08)"}),(0,o.jsx)("stop",{offset:"100%",stopColor:"rgba(255, 255, 255, 0.02)"})]}),(0,o.jsxs)("radialGradient",{id:"playGradientHover",cx:"0.3",cy:"0.3",r:"0.8",children:[(0,o.jsx)("stop",{offset:"0%",stopColor:"rgba(255, 255, 255, 0.4)"}),(0,o.jsx)("stop",{offset:"70%",stopColor:"rgba(255, 255, 255, 0.15)"}),(0,o.jsx)("stop",{offset:"100%",stopColor:"rgba(255, 255, 255, 0.05)"})]})]}),(0,o.jsx)("style",{jsx:!0,children:"\n .premium-play-icon:hover { transform: scale(1.1); filter: drop-shadow(0 12px 32px rgba(0,0,0,0.6)); }\n .premium-play-icon:hover circle { fill: url(#playGradientHover); stroke: rgba(255, 255, 255, 0.4); transform: scale(1.05); }\n .premium-play-icon:hover path { fill: white; stroke: white; transform: translateX(1px); }\n .premium-play-icon:active { transform: scale(0.95); }\n "})]})},2211:function(e,t,n){var o=n(1477),i=(n(5497),n(1214)),r=n(7066),a=n(481);t.A=function(e){return(0,o.useEffect)(()=>{const e=(0,r.E2)((0,i.Xd)("whatmoreSecondaryColor"));!function(e,t,n,o){const i=`rgba(${e},${t},${n},${o})`,r=`\n @keyframes whatmore-loading-indicator-keyframe {\n 0%,\n 100% {\n box-shadow: 0em -2.6em 0em 0em ${i}, 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.5), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.7);\n }\n 12.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.7), 1.8em -1.8em 0 0em ${i}, 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.5);\n }\n 25% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.5), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.7), 2.5em 0em 0 0em ${i}, 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2);\n }\n 37.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.5), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.7), 1.75em 1.75em 0 0em ${i}, 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2);\n }\n 50% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.5), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.7), 0em 2.5em 0 0em ${i}, -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2);\n }\n 62.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.5), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.7), -1.8em 1.8em 0 0em ${i}, -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2);\n }\n 75% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.5), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.7), -2.6em 0em 0 0em ${i}, -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2);\n }\n 87.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.5), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.7), -1.8em -1.8em 0 0em ${i};\n }\n }\n `,a=document.createElement("style");a.type="text/css",a.innerHTML=r,document.head.appendChild(a)}(e[0],e[1],e[2],.2)},[]),(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("span",{className:"whatmore-loading-indicator"})})}},2446:function(){},3168:function(e,t,n){n.d(t,{At:function(){return o},MN:function(){return i}});const o=()=>"undefined"!==typeof navigator&&(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream),i=()=>o()||"undefined"!==typeof navigator&&/Macintosh/.test(navigator.userAgent)},3299:function(e,t,n){n.d(t,{Hl:function(){return i},Np:function(){return a},Po:function(){return s},Z_:function(){return o},Zf:function(){return d},d8:function(){return l},zJ:function(){return r}});const o=function(e,t){return!((void 0==e.products||0==e.products.length)&&(void 0==e.cta||0==e.cta.length))},i=function(e,t){return!(void 0==e.products||0==e.products.length)},r=function(e){if(null!=e)return e.filter(e=>{var t;return null===(t=null===e||void 0===e?void 0:e.in_stock)||void 0===t||t})},a=function(e,t=!1){var n,o;if(null!=e)return t?{events:e.events[0].events,all_events:null!==(o=null===e||void 0===e?void 0:e.all_events)&&void 0!==o?o:[]}:{events:null===e||void 0===e?void 0:e.events,all_events:null!==(n=null===e||void 0===e?void 0:e.all_events)&&void 0!==n?n:[]}};const s=function(e,t){var n,o;let i=[];if(null==e)return[];if("eventsets"in e&&e.eventsets[t]){const n=function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach(e=>{t=t.concat(e.events)}),t}(e.eventsets[t]);i=[...n]}return{events:i,all_events:null!==(n=null===(o=i)||void 0===o?void 0:o.all_events)&&void 0!==n?n:[]}};function l(e){if(null!=e){var t=0;return e.forEach(e=>{e.index=t++}),e}}function d(e){if(null==e)return;let t=0;return e.reduce((e,n)=>{var o;return(null===(o=null===n||void 0===n?void 0:n.in_stock)||void 0===o||o)&&(n.index=t++,e.push(n)),e},[])}},3391:function(e,t,n){n.d(t,{$S:function(){return s},_:function(){return o},b4:function(){return r},dl:function(){return i},nN:function(){return d},tn:function(){return l},vF:function(){return a}});const o="device_type",i="device_mode",r="mobile",a="tablet",s="desktop",l="portrait",d="landscape"},3477:function(e,t,n){n.d(t,{p:function(){return o}});const o=(0,n(1477).createContext)({isIOS:!1,totalEvents:0,closeClickComponent:null,setCloseClickComponent:e=>{},showVideoPlayingData:!0,slideDirection:"vertical",showSwipeIndicator:!0,questionList:[]})},3647:function(e,t,n){n.r(t),n.d(t,{initiateCartSliderEvent:function(){return l}});var o=n(1214),i=n(8513),r=n(5566),a=n(6080),s=n(5547);const l=async function(e,t,n,l,d="",c="",u="",h="",m="",p="",v=null){(0,o.Xd)("whatmoreLandingLocationType");const f=e=>{(0,i.getCartDetailsShopifyAsync)().then(e=>e.json()).then(t=>{const n=t.items.find(t=>t.id==e);if(!n)return;const o=n.key,r=n.quantity,a=n.properties;(0,i.updateCartLineItemPropertiesDirect)(o,r,a,u,h,m,!0,!0,!0)}).catch(e=>{console.error("[Whatmore] updateATCLineItemProperties error:",e)})};if("STRNV8MHJTF"==e||"STR6HU283UZ"==e||"STR9T3LLEJB"==e||"STRWJMIOJNX"==e||"STRUDQ36YAC"==e||"STR1D5ONOZX"==e){console.log("Executing cart refresh script..");return void(document.getElementById("whatsmorecart").value=Math.random())}if("57217876118"===e){async function C(e,t=1){const n=new FormData;n.append("id",e),n.append("quantity",t),n.append("sections","side-cart");const o=await fetch("/cart/add.js",{method:"POST",body:n,headers:{"X-Requested-With":"XMLHttpRequest",Accept:"application/javascript"}}).then(e=>e.json());o.status?console.error("atc failed",o.description):(window.ajaxCart.load(o),setTimeout(()=>{f(e)},500))}return void C(d,1).then(()=>{setTimeout(t,n)}).catch(e=>{console.error("[Whatmore] ATC 57217876118 error:",e)})}if("75310563627"===e){async function T(e,t=1){const n=new FormData;n.append("id",e),n.append("quantity",t),n.append("sections","cart-drawer,cart-icon-bubble");const o=await fetch("/cart/add.js",{method:"POST",body:n,headers:{Accept:"application/javascript"}}).then(e=>e.json());if(o.status)return void console.error("atc failed",o.description);const i=document.querySelector("cart-drawer");i&&(i.renderContents(o),i.classList.remove("is-empty"),i.open())}return T(d,1).then(()=>{setTimeout(()=>{f(d)},500)}).catch(e=>{console.error("[Whatmore] ATC 75310563627 error:",e)}),void setTimeout(t,n)}if("81308287252"===e)return(async()=>{const t={};(0,s.CpV)(e)||(t[a.B_]=`${(0,r.wm)()}#${u}:direct`);const n=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:Number(d),quantity:1,properties:t})}).then(e=>e.json()).catch(()=>null);n&&!n.status?setTimeout(()=>{const e=document.querySelector(".iCartBtnToggle")||document.querySelector("#iCartBtnToggle");e?e.click():console.warn("[Whatmore] iCart toggle not found for 81308287252")},250):console.error("[Whatmore] ATC 81308287252 failed:",n&&n.description)})(),void setTimeout(t,n);if("67841720509"===e){async function E(e,t=1){const n=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:Number(e),quantity:t})});n.ok?(document.dispatchEvent(new CustomEvent("on:cart:change",{bubbles:!0,cancelable:!1})),document.dispatchEvent(new CustomEvent("dispatch:cart-drawer:refresh",{bubbles:!0}))):console.error("[Whatmore] ATC 67841720509 failed:",await n.text())}return E(d,1).then(()=>{setTimeout(()=>{f(d)},500)}).catch(e=>{console.error("[Whatmore] ATC 67841720509 error:",e)}),void setTimeout(t,n)}if("72603631788"===e||"5220302897"===e){const A=new FormData;A.append("id",d),A.append("quantity","1"),v&&A.append("properties[Size]",v);try{const P=await fetch("/cart/add.js",{method:"POST",body:A}),I=await P.json();I.id?setTimeout(()=>{f(d),window.location.href="/cart"},500):console.error("Afrozeh ATC failed:",I)}catch(j){console.error("Afrozeh ATC error:",j)}return void setTimeout(t,n)}if("67083239728"===e){try{const k=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:d,quantity:1}]})});k.ok||console.error("[ATC] Add to cart failed:",k.status)}catch(j){console.error("[ATC] Error while adding to cart:",j)}return setTimeout(()=>{f(d)},1e3),void setTimeout(t,n)}if("61442818186"===e){async function N(e,t=1){const n=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:e,quantity:t}]})});if(!n.ok)return void console.error("[ATC] Add to cart failed:",n.status);document.dispatchEvent(new CustomEvent("cart:build"));const o=document.querySelector(".js-drawer-open-cart");o&&o.click()}return N(d,1).then(()=>{setTimeout(()=>{f(d)},500)}).catch(e=>{console.error("[Whatmore] ATC 61442818186 error:",e)}),void setTimeout(t,n)}if("62226792677"===e){async function L(e,t=1){const n=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:e,quantity:t}]})});var o;n.ok?("function"===typeof(null===(o=window.cleverSopify)||void 0===o?void 0:o.onCartUpdate)&&window.cleverSopify.onCartUpdate(1,1,c),setTimeout(()=>{f(e)},500)):console.error("[ATC] Add to cart failed:",n.status)}return L(d).catch(e=>{console.error("[Whatmore] Error:",e)}),void setTimeout(t,n)}if("60595503283"===e){async function W(e,t=1){try{const n=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,quantity:t})});n.ok?setTimeout(()=>{f(e),window.location.href="/cart"},500):console.error("Failed to add item to cart:",n.status)}catch(j){console.error("Error adding to cart:",j)}}return W(d,1),void setTimeout(t,n)}if("72915616066"===e){function O(){var e,t;const n=window.customElements.get("cart-drawer")&&document.querySelector("cart-drawer");let o=[];const i=new CustomEvent("cart:prepare-bundled-sections",{bubbles:!0,detail:{sections:o}});document.documentElement.dispatchEvent(i);const r=o.length>0,a="string"===typeof(null===(e=window.themeVariables)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.cartType);return(!a||"page"!==window.themeVariables.settings.cartType)&&(n&&r&&a)}async function D(e,t){document.documentElement.dispatchEvent(new CustomEvent("theme:loading:start",{bubbles:!0}));let n=[];document.documentElement.dispatchEvent(new CustomEvent("cart:prepare-bundled-sections",{bubbles:!0,detail:{sections:n}}));const o=await fetch(`${window.Shopify.routes.root}cart/add.js`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:e,quantity:t}],sections:n.join(",")})});if(document.documentElement.dispatchEvent(new CustomEvent("theme:loading:end",{bubbles:!0})),!o.ok)return console.error("[ATC] Add to cart failed:",o.status),document.dispatchEvent(new CustomEvent("cart:refresh")),!1;const i=await o.json(),r=await(await fetch(`${window.Shopify.routes.root}cart.js`)).json();return r.sections=i.sections,document.documentElement.dispatchEvent(new CustomEvent("cart:change",{bubbles:!0,detail:{baseEvent:"variant:add",cart:r}})),setTimeout(()=>{f(e)},500),!0}async function R(e,t=1){return O()?D(e,t):async function(e,t,n){const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:e,quantity:t}]})});return o.ok?(setTimeout(()=>{n(e)},500),setTimeout(()=>{var e,t;window.location.href=`${(null===(e=window.Shopify)||void 0===e||null===(t=e.routes)||void 0===t?void 0:t.root)||"/"}cart`},1e3),!0):(console.error("[ATC Fallback] Add to cart failed:",o.status),!1)}(e,t,f)}return R(d).catch(e=>{console.error("[Whatmore] Error:",e)}),void setTimeout(t,n)}if("44061622423"===e){async function q(e,t=1){const n=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:e,quantity:t}]})});n.ok?window.cart&&"function"===typeof window.cart.getCart?(window.cart.getCart(),setTimeout(()=>{f(e)},500)):fetch("/cart?section_id=api-cart-items").then(e=>e.text()).then(t=>{const n=document.createElement("div");if(n.innerHTML=t,window.cart&&"function"===typeof window.cart.build){const e=n.querySelector("[data-api-content]");e&&window.cart.build(e)}document.dispatchEvent(new CustomEvent("theme:product:added",{bubbles:!0})),setTimeout(()=>{f(e)},500)}).catch(()=>{const t=document.querySelector('[href="/cart"], [data-cart-toggle], a[href*="/cart"]');t&&t.click(),setTimeout(()=>{f(e)},500)}):console.error("[ATC] Add to cart failed:",n.status)}return q(d).catch(e=>{console.error("[Whatmore] Error:",e)}),void setTimeout(t,n)}if("60183445561"===e){async function M(e,t=1,n="/cart"){const o=new URLSearchParams;o.append("id",e),o.append("quantity",t.toString()),o.append("return_to",n);const i=await fetch("https://tapee.in/cart/add",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:o.toString(),credentials:"include"}),r=await i.text();return i.ok&&setTimeout(()=>{f(e),window.location.href="https://tapee.in/cart"},500),r}return M(d).catch(e=>{console.error("Error:",e)}),void setTimeout(t,n)}if("22907887"===e){async function F(e,t=1){const n=new FormData;n.append("id",e),n.append("quantity",t.toString());const o=document.querySelector("cart-notification, cart-drawer");if(o){const e=o.getSectionsToRender();n.append("sections",e.map(e=>e.id).join(","))}n.append("sections_url",window.location.pathname);const i=await fetch("/cart/add.js",{method:"POST",body:n});if(!i.ok){const e=await i.text();throw new Error(`Failed to add to cart: ${e}`)}const r=await i.json();return o&&o.renderContents&&o.renderContents(r),document.body.classList.remove("overflow-hidden"),document.querySelectorAll(".atc-container.active, .atc-variant-container.active, .pdp-atc-container.active").forEach(e=>e.classList.remove("active")),window.dispatchEvent(new CustomEvent("cart:added",{detail:{variantId:e,quantity:t,data:r}})),r}return F(d).then(e=>{setTimeout(()=>{f(d)},500)}).catch(e=>{console.error("Error:",e)}),void setTimeout(t,n)}if("28575536"===e||"64287408360"===e||"8473575520"===e||"65972830359"===e||"75000480020"===e)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:d,quantity:1})}).then(e=>{if(!e.ok)throw new Error("Add to cart failed");return e.json()}).then(e=>{"function"===typeof window.handleFloCartBtn&&window.handleFloCartBtn(),setTimeout(()=>{f(d)},500)}).catch(e=>console.error("[Whatmore] Ripped Up Nutrition ATC error:",e)),void setTimeout(t,n);if("58692075703"===e)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:d,quantity:1})}).then(e=>{if(!e.ok)throw new Error("Add to cart failed");return e.json()}).then(e=>{"function"===typeof window.openGokwikSideCart&&window.openGokwikSideCart(),setTimeout(()=>{f(d)},500)}).catch(e=>console.error("[Whatmore] Lakshita ATC error:",e)),void setTimeout(t,n);if("22907887"===e)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:d,quantity:1})}).then(e=>e.json()).then(e=>{setTimeout(()=>{f(d)},500)}).catch(e=>console.error("Add to cart error:",e)),void setTimeout(t,n);if("56444977250"===e){const z=document.querySelector('button[data-pf-type="ProductATC2"]');return z?(c&&z.setAttribute("data-product-id",c),z.click(),setTimeout(()=>{(0,i.getCartDetailsShopifyAsync)().then(e=>e.json()).then(e=>{const t=e.items.find(e=>String(e.id)===String(d));if(t){const e=t.key,n=t.quantity,o=t.properties;(0,i.updateCartLineItemPropertiesDirect)(e,n,o,u,h,m,!0,!0,!0)}})},500),void setTimeout(t,n)):(fetch(null===p||void 0===p||null===(w=p.split("?"))||void 0===w?void 0:w[0]).then(e=>e.text()).then(e=>{const t=(new DOMParser).parseFromString(e,"text/html").querySelector('button[data-pf-type="ProductATC2"]');t&&c&&t.setAttribute("data-product-id",c)}),void setTimeout(t,n));var w}if("64379584700"===e)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:d,quantity:1})}).then(e=>e.json()).then(e=>fetch("/cart.js")).then(e=>e.json()).then(e=>{$(".paira-cart-item-count").text(e.item_count),$(".paira-cartEmpty").hide(),$(".paira-cartNotEmpty").show(),$(".paira-cart-total-price .money").text("Rs. "+e.total_price/100),$(".cart-drop").addClass("open"),$(".cart-icon").trigger("mouseenter"),setTimeout(()=>{f(d)},500)}).catch(e=>console.error("Add to cart error:",e)),void setTimeout(t,n);if("66947219508"===e)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:Number(d),quantity:1}]})}).then(async()=>{const e=document.getElementById("mini-cart");e&&"function"===typeof e._rerenderCart&&await e._rerenderCart({detail:{openMiniCart:!0}}),setTimeout(()=>{f(d)},500)}).catch(e=>console.error("[Whatmore] ATC 66947219508 error:",e)),void setTimeout(t,n);if("76767920441"===e)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:d,quantity:1})}).then(e=>e.json()).then(e=>{"function"===typeof window.openGokwikSideCart&&window.openGokwikSideCart(),setTimeout(()=>{f(d)},500)}).catch(e=>console.error("Add to cart error:",e)),void setTimeout(t,n);if("70840582336"===e){const B=d,V=1,X=document.querySelector('product-form form.product-form, form[action*="/cart/add"]');if(X){let Q=X.querySelector('input[name="id"]');Q||(Q=document.createElement("input"),Q.type="hidden",Q.name="id",X.appendChild(Q)),Q.disabled=!1,Q.value=B;const U=X.querySelector('input[name="quantity"]');U&&(U.value=V);const H=X.querySelector('button[data-add-to-cart], button[type="submit"]');return H?(H.dispatchEvent(new MouseEvent("pointerdown",{bubbles:!0})),H.click(),H.dispatchEvent(new MouseEvent("pointerup",{bubbles:!0}))):console.warn("[ATC] button not found"),setTimeout(()=>{f(B)},500),void setTimeout(t,n)}return void fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:B,quantity:V}),credentials:"same-origin"}).then(()=>{setTimeout(()=>{f(B)},500),setTimeout(t,n)}).catch(e=>{console.error("[ATC] error for 70840582336:",e),setTimeout(t,n)})}if("64683278550"===e){try{const J=document.querySelector('form[action="/cart/add"]');if(!J)return console.warn("[ATC 64683278550] form not found"),void setTimeout(t,n);const G=J.querySelector('input[name="id"]');if(!G)return console.warn("[ATC 64683278550] id input not found"),void setTimeout(t,n);G.value=d;const Y=J.querySelector('button[type="submit"]');if(!Y)return console.warn("[ATC 64683278550] submit button not found"),void setTimeout(t,n);Y.click(),setTimeout(()=>{f(d)},500),setTimeout(t,n)}catch(_){console.error("[ATC 64683278550] error:",_),setTimeout(t,n)}return}if("95562924310"===e||"61810999367"===e){try{const Z=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:d,quantity:1}]})});if(Z.ok){const K=await Z.json();document.dispatchEvent(new CustomEvent("cart:update",{detail:{cart:K}})),document.dispatchEvent(new CustomEvent("theme:cart:refresh",{detail:{target:"product_flood_atc"},bubbles:!0})),setTimeout(()=>{f(d)},500)}else console.error("[ATC 95562924310] Add to cart failed:",Z.status)}catch(j){console.error("[ATC 95562924310] error:",j)}return void setTimeout(t,n)}if("45050691744"===e)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:d,quantity:1})}).then(e=>e.json()).then(e=>{jQuery.ajax({type:"GET",url:"/",dataType:"html",success:function(e){jQuery(".drawer__inner.cart-drawer-content").html(jQuery(e).find(".drawer__inner.cart-drawer-content").html()),jQuery(".custom_doscunt_bar").html(jQuery(e).find(".custom_doscunt_bar").html()),jQuery(".some_js_items").html(jQuery(e).find(".some_js_items").html()),jQuery(".header-cart-icon__count").html(jQuery(e).find(".header-cart-icon__count").html());try{jQuery("#FreeShippingText").slick({dots:!0,autoplay:!0,autoplaySpeed:2500,arrows:!0})}catch(t){}jQuery("div#HeaderCartIcon button").trigger("click"),setTimeout(()=>{f(d)},500)}})}).catch(e=>console.error("Add to cart error:",e)),void setTimeout(t,n);if("55337746621"===e){async function ee(e,t=1){var n;await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:e,quantity:t}]})});const o=await fetch("/cart.js").then(e=>e.json());document.querySelectorAll("[data-cart-count]").forEach(e=>{const t=e.querySelector(":scope > span:last-of-type");t&&(t.textContent=o.item_count)});const i=document.querySelector("[data-cart-container]");if(!i)return;const r=((null===(n=i.parentElement)||void 0===n?void 0:n.id)||"").replace("shopify-section-","");let a=null;if(r){const e=await fetch(`/?sections=${encodeURIComponent(r)}`).then(e=>e.json()).catch(()=>null);if(null!==e&&void 0!==e&&e[r]){const t=document.createElement("div");t.innerHTML=e[r];const n=t.querySelector("[data-cart-container]");n&&(a=n.innerHTML)}}if(!a){const e=await fetch("/cart").then(e=>e.text()),t=(new DOMParser).parseFromString(e,"text/html").querySelector("[data-cart-container]");t&&(a=t.innerHTML)}if(!a)return;i.innerHTML=a,i.classList.add("is-drawer-open"),document.body.classList.add("is-scroll-disabled");const s=()=>{i.classList.remove("is-drawer-open"),document.body.classList.remove("is-scroll-disabled")};i.querySelectorAll("[data-cart-drawer-toggle]").forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),s()})}),document.addEventListener("keydown",e=>{"Escape"===e.key&&s()},{once:!0})}return ee(d,1).then(()=>{setTimeout(()=>{f(d)},500)}).catch(e=>{console.error("[Whatmore] ATC 55337746621 error:",e)}),void setTimeout(t,n)}if("12175954"===e){async function te(e,t=1){const n=await fetch(theme.routes.cart_add_url,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:e,quantity:t}]})});return n.ok?(document.dispatchEvent(new CustomEvent("theme:cartchanged",{bubbles:!0,cancelable:!1,detail:{openDrawer:!0}})),setTimeout(()=>{f(e)},500),!0):(console.error("[ATC] Add to cart failed:",n.status),!1)}return te(d).catch(e=>{console.error("[Whatmore] ATC 12175954 error:",e)}),void setTimeout(t,n)}if("2754609263"===e){const ne=()=>{const e=["cart:open","CartDrawer:open","drawerOpen"],t=[document,window];try{window.parent&&window.parent!==window&&window.parent.document&&t.push(window.parent.document)}catch(o){}const n=e=>t.forEach(t=>{try{t.dispatchEvent(new CustomEvent(e,{bubbles:!0}))}catch(o){console.error(`[Whatmore] ATC 2754609263 dispatch ${e} failed:`,o)}});["cart:refresh","cart:build","cart:updated"].forEach(n),setTimeout(()=>e.forEach(n),150)};async function oe(e,t=1){var n,o,i;const r=(null===(n=window.Shopify)||void 0===n||null===(o=n.routes)||void 0===o?void 0:o.root)||"/",a={"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest",Accept:"application/javascript"},s=Number(t)||1,l=()=>fetch(`${r}cart/add.js`,{method:"POST",headers:a,body:JSON.stringify({items:[{id:e,quantity:s}]})}).then(e=>e.json()),d=await fetch(`${r}cart.js`,{headers:{Accept:"application/json"},cache:"no-store"}).then(e=>e.json()).catch(()=>null),c=null===d||void 0===d||null===(i=d.items)||void 0===i?void 0:i.find(t=>t.id==e);let u;var h,m;(c?(u=await fetch(`${r}cart/change.js`,{method:"POST",headers:a,body:JSON.stringify({id:c.key,quantity:c.quantity+s})}).then(e=>e.json()).catch(()=>null),u&&!u.status||(console.warn("[Whatmore] ATC 2754609263 change.js rejected, falling back to add.js"),u=await l())):u=await l(),u&&!u.status)?(ne(),setTimeout(()=>{f(e)},500)):console.error("[Whatmore] ATC 2754609263 failed:",(null===(h=u)||void 0===h?void 0:h.description)||(null===(m=u)||void 0===m?void 0:m.message))}return oe(d).catch(e=>{console.error("[Whatmore] ATC 2754609263 error:",e)}),void setTimeout(t,n)}if("25786679341"===e)return(async(t,n)=>{const o={};(0,s.CpV)(e)||(o[a.B_]=`${(0,r.wm)()}#${u}:direct`);const i=await fetch(`${(null===(t=window.Shopify)||void 0===t||null===(n=t.routes)||void 0===n?void 0:n.root)||"/"}cart/add.js`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:Number(d),quantity:1,properties:o}]})}).then(e=>e.json()).catch(()=>null);if(i&&!i.status)if(document.dispatchEvent(new CustomEvent("vd:cart:added",{bubbles:!0,detail:{items:i.items||[i]}})),"function"===typeof window.vdOpenCart)window.vdOpenCart();else{const e=document.querySelector("a.vd-bag");e?e.click():console.warn("[Whatmore] vdOpenCart missing and no .vd-bag for 25786679341")}else console.error("[Whatmore] ATC 25786679341 failed:",i&&i.description)})().catch(e=>{console.error("[Whatmore] ATC 25786679341 error:",e)}),void setTimeout(t,n);if("8111554613"===e)return(async()=>{const e=()=>{const e=document.querySelector("cart-drawer#CartDrawer");e?(document.querySelectorAll(".add-to-cart-popup, .exit-intent-popup").forEach(e=>e.classList.add("hide")),e.removeAttribute("hidden"),e.removeAttribute("inert"),"function"!==typeof e.show||e.open?(e.setAttribute("open","true"),e.setAttribute("active","true")):e.show()):console.warn("[Whatmore] cart-drawer#CartDrawer not found for 8111554613")},t=()=>{const t=document.querySelector("cart-drawer#CartDrawer");let n=!1;const o=()=>{n||(n=!0,i.disconnect(),clearTimeout(r),e())},i=new MutationObserver(()=>{const e=document.querySelector("cart-drawer#CartDrawer");e&&e!==t&&o()});i.observe(document.body,{childList:!0,subtree:!0});const r=setTimeout(o,3e3)};if("function"!==typeof window.cartGiftUpdate){console.warn("[Whatmore] cartGiftUpdate missing for 8111554613, falling back to /cart/add.js");const t=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:Number(d),quantity:1}]})}).then(e=>e.json()).catch(()=>null);return!t||t.status?void console.error("[Whatmore] ATC 8111554613 fallback failed:",t&&t.description):void setTimeout(()=>{f(d),document.dispatchEvent(new CustomEvent("cart:updated",{detail:{cart:t}})),e()},500)}const{price:n,productType:o}=await(async()=>{try{var e,t;const n=await fetch("/cart.js",{headers:{Accept:"application/json"},cache:"no-store"}).then(e=>e.json()),o=null===n||void 0===n||null===(e=n.items)||void 0===e?void 0:e.find(e=>String(e.variant_id)===String(d));if(o)return{price:o.price,productType:null!==(t=o.product_type)&&void 0!==t?t:""}}catch(i){}try{var n,o;const e=(p||window.location.href).split(/[?#]/)[0],t=await fetch(`${e}.js`,{headers:{Accept:"application/json"}}).then(e=>e.json()),i=null===t||void 0===t||null===(n=t.variants)||void 0===n?void 0:n.find(e=>String(e.id)===String(d));if(i)return{price:i.price,productType:null!==(o=t.product_type)&&void 0!==o?o:""}}catch(i){}return{price:0,productType:""}})(),i=()=>{document.removeEventListener("cart:updated",i),clearTimeout(r),f(d),t()},r=setTimeout(()=>{document.removeEventListener("cart:updated",i),f(d),t()},2500);document.addEventListener("cart:updated",i,{once:!1}),window.cartGiftUpdate(String(d),n,1,o,"ADD_TO_CART")})().catch(e=>{console.error("[Whatmore] ATC 8111554613 error:",e)}),void setTimeout(t,n);if("58501496967"===e){async function ie(e,t=1){const n=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:e,quantity:t}]})});n.ok?(window.ajaxCart&&"function"===typeof window.ajaxCart.load&&window.ajaxCart.load(),window.jQuery&&window.jQuery("body").trigger("drawer.open"),setTimeout(()=>{f(e)},500)):console.error("[Whatmore] ATC 58501496967 failed:",n.status)}return ie(d,1).catch(e=>{console.error("[Whatmore] ATC 58501496967 error:",e)}),void setTimeout(t,n)}if("5801421"===e)return(async()=>{const t={};(0,s.CpV)(e)||(t[a.B_]=`${(0,r.wm)()}#${u}:direct`);const n=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:Number(d),quantity:1,properties:t})}).then(e=>e.json()).catch(()=>null);if(!n||n.status)return void console.error("[Whatmore] ATC 5801421 failed:",n&&n.description);let o=!1;const i=()=>{if(o)return!0;const e=window.Rebuy&&window.Rebuy.SmartCart;if(!e||"function"!==typeof e.show)return!1;if("ready"!==e.status&&!e.hasBoundEvents&&!document.querySelector("#rebuy-cart"))return!1;o=!0;try{window.Rebuy.Cart&&window.Rebuy.Cart.fetchCart()}catch(t){}return e.show(),!0};document.addEventListener("rebuy:smartcart.ready",i,{once:!0});const l=(e=0)=>{if(i())return;if(e<40)return void setTimeout(()=>l(e+1),150);const t=window.Rebuy&&window.Rebuy.SmartCart;if(t&&"function"===typeof t.show)return o=!0,void t.show();const n=document.querySelector('[data-cart-open], a[href$="/cart"]:not([disable-rebuy], .disable-rebuy)');n?n.click():console.warn("[Whatmore] Rebuy SmartCart unavailable for 5801421")};l()})().catch(e=>{console.error("[Whatmore] ATC 5801421 error:",e)}),void setTimeout(t,n);const g=t=>{if("61126934766"==e){let e=t.querySelector(".productView-buttons").querySelector('form[action*="/cart/add"]');if(e)return e}let n=Array.from(t.querySelectorAll("product-form")).find(e=>e.querySelector('form > input[name="id"]')&&e.querySelector('form button[type="submit"]'));return n||(n=Array.from(t.querySelectorAll('form[action*="/cart/add"]')).find(e=>e.querySelector('button[type="submit"]'))),n},y=(t,n,o)=>{const i=t.cloneNode(!0);if(i){i.hasAttribute("data-product-variant-id")&&i.setAttribute("data-product-variant-id",n),i.hasAttribute("data-product-id")&&i.setAttribute("data-product-id",o);let t=i.querySelector('input[name="id"]');if(t)t.setAttribute("value",n),t.hasAttribute("disabled")&&t.removeAttribute("disabled");else{const e=i.querySelector('select[name="id"]');if(e){const t=e.querySelector('option[selected="selected"]');t&&t.setAttribute("value",n)}}const r=i.querySelector('input[name="product-id"]');r&&r.setAttribute("value",o);const a=document.createElement("div");return a.className="whatmore-atc",a.appendChild(i),document.body.appendChild(a),console.log(a,"formElement"),"92319318403"===e&&((e,t,n)=>{var o;const i=null!==(o=e.matches)&&void 0!==o&&o.call(e,"form")?e:e.querySelector("form");if(!i)return;let r=i.querySelector('input[name="id"]');r||(r=document.createElement("input"),r.type="hidden",r.name="id",i.prepend(r)),r.value=String(t),r.removeAttribute("disabled");const a=i.querySelector('select[name="id"]');a&&([...a.options].some(e=>e.value===String(t))?(a.value=String(t),[...a.options].forEach(e=>e.selected=e.value===String(t)),a.dispatchEvent(new Event("change",{bubbles:!0}))):a.removeAttribute("name"));const s=i.querySelector('input[name="product-id"]');s&&(s.value=String(n))})(a,n,o),a}},b=e=>{const t=null===e||void 0===e?void 0:e.querySelector('button[type="submit"]');t&&t.click()},x=g(document);if(x||(null===x||void 0===x?void 0:x.length)>0){const re=y(x,d,c);b(re),setTimeout(()=>{f(d)},500),re.remove()}else{var S;fetch(null===p||void 0===p||null===(S=p.split("?"))||void 0===S?void 0:S[0]).then(e=>e.text()).then(e=>{const t=(new DOMParser).parseFromString(e,"text/html"),n=g(t);if(n||(null===n||void 0===n?void 0:n.length)>0){const e=y(n,d,c);b(e),setTimeout(()=>{f(d)},500),e.remove()}})}setTimeout(t,n)}},4018:function(e,t,n){n.d(t,{Cr:function(){return l},cb:function(){return a},lP:function(){return r},tQ:function(){return s},yD:function(){return d}});var o=n(5547);const i=(0,n(1214).Xd)("whatmoreShopId"),r=function(e){var t,n;return"event_media_urls"in e?"image"===e.event_type?e.event_media_urls.primary.portrait.content_image_original:"secondary"in e.event_media_urls&&e.event_media_urls.secondary.portrait.content_video_1080p?e.event_media_urls.secondary.portrait.content_video_1080p:null!==(t=e.event_media_urls.primary.portrait.content_video_1080p)&&void 0!==t?t:null===(n=e.event_media_urls.primary.landscape)||void 0===n?void 0:n.content_video_1080p:function(e){return null!=e.event_m3u8_url&&""!==e.event_m3u8_url?e.event_m3u8_url:e.event_hls_url}(e)},a=function(e){var t;return"event_media_urls"in e?"image"===e.event_type?e.event_media_urls.primary.landscape.content_image_original:"secondary"in e.event_media_urls&&e.event_media_urls.secondary.landscape.content_video_1080p?e.event_media_urls.secondary.landscape.content_video_1080p:null!==(t=e.event_media_urls.primary.landscape.content_video_1080p)&&void 0!==t?t:e.event_media_urls.primary.portrait.content_video_1080p:e.event_hls_url},s=function(e,t="portrait"){var n,o,i,r;return"event_media_urls"in e?"landscape"===t?e.event_media_urls.primary.landscape.poster_image||(null===(i=e.event_media_urls.secondary)||void 0===i||null===(r=i.landscape)||void 0===r?void 0:r.poster_image)||e.poster_image:e.event_media_urls.primary.portrait.poster_image||(null===(n=e.event_media_urls.secondary)||void 0===n||null===(o=n.portrait)||void 0===o?void 0:o.poster_image)||e.poster_image:e.poster_image},l=function(e){if(e.startsWith("https://cdn.shopify.com")&&e.includes("whatmore_")){const t=(0,o.ath)(i);if(!t)return e;return`https://whatmore-brand-video-assets-720p.b-cdn.net/${t}/${e.split("whatmore_")[1].split("?")[0]}`}return e},d=function(e){if(e.startsWith("https://cdn.shopify.com")&&e.includes("whatmore_")){const t=(0,o.ath)(i);if(!t)return e;return`https://whatmore-brand-thumbnail-video-assets.b-cdn.net/${t}/${e.split("whatmore_")[1].split("?")[0]}`}return e}},4040:function(e,t,n){n.d(t,{n:function(){return o}});const o=()=>{if("undefined"!==typeof window){const e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")&&navigator.vendor.includes("Apple")}return!1}},4234:function(e,t,n){n.r(t),n.d(t,{AppContext:function(){return pe},initializeReactApp:function(){return be},isTemplateTypeBanner:function(){return ve},isTemplateTypeCollections:function(){return fe},isTemplateTypeStories:function(){return we},mountNeoFullscreen:function(){return ye}});var o=n(1477),i=n(5741),r=n(1214),a=n(5547),s=n(6441),l=n(2873),d=n(7900),c=n(8513),u=n(481);const h=o.lazy(()=>Promise.all([n.e(252),n.e(12),n.e(760)]).then(n.bind(n,3269)));var m,p=()=>(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(h,{})});const v=null!==(m="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==m&&m;class f extends o.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){console.error("[Chunk Loading Error]",e,t);const{whatmoreRootId:n}=this.props,o=document.querySelector(`.whatmore-shimmer-container[data-widget-id="${n}"]`);o&&(o.remove(),v&&console.log(`[Chunk Error] Removed shimmer for widget ${n}`));const i=document.querySelector(`.whatmore-render-root[data-widget-id="${n}"]`);if(i){i.style.opacity="0",i.removeAttribute("data-shimmer-active");const e=i.closest(".whatmore-base");e&&(e.style.minHeight="0px",v&&console.log(`[Chunk Error] Reset minHeight to 0px for widget ${n}`))}}render(){return this.state.hasError?null:this.props.children}}var w=f,g=n(1637),y=n(9383),b=n(5566),x=n(3299),S=n(7777),j=n(7372),_=n(3168),C=n(7939),T=(n(3647),n(426)),E=n(3161),$=n(9128),A=n(9888),P=n(7156),I=n(6694),k=n(256),N=n(6984),L=n(6380),W=n(8762),O=n(8888),D=n(5534),R=n(9759),q=n(8060);const M=(0,E.A)({key:"whatmore-css-ppv"});function F(e){return e.split(/[?#]/)[0]}var z=function(e){var t,n;const[i,s]=(0,o.useState)(),[l,c]=(0,o.useState)(),[h]=(0,r.QN)("isInDesignMode"),[m]=(0,r.QN)("isDemoBrand"),[p]=(0,r.QN)("whatmoreEmbedAppUseVariant"),[v,f]=(0,o.useState)(-2),[w]=(0,r.QN)("whatmoreVariantId"),[E]=(0,r.QN)("whatmoreShopId");var[z]=(0,r.QN)("whatmoreProductId");const B=(0,r.Xd)("isLandingSharedLink"),V=(0,r.Xd)("whatmoreShareTemplateId"),X=(0,r.Xd)("whatmoreShareEventId"),Q=B&&"template-embed"===(0,d.Mm)(V),[U,H]=(0,o.useState)(Q);z=(0,a.BcY)(E)?function(e){if("STRR72TX6AT"==e){var t;const e=null===(t=window.location.pathname)||void 0===t?void 0:t.split("/");return e[e.length-1]}return"STR6HARJ3QY"==e||"STRI4V3OYCH"==e||"STRGZ9TGDEQ"==e||"STRJ2T2QPKI"==e||"STROXKHHO98"==e?F(window.location.href).replace(/\/+$/,"").split("/").pop():F(window.location.href)}(E):z;const[J,G]=(0,o.useState)(()=>"true"===p?w:z),[Y,Z]=(0,o.useState)(!1);var K=((0,a.jpW)(E)?g.$$:g.MT)+"/v2/brand/"+E+"/product-events",ee="upcoming";const{whatmoreWidgetSourceDetails:te}=(0,o.useContext)(pe),ne=(0,o.useRef)(!1),oe=(0,o.useRef)(window.location.pathname);(0,o.useEffect)(()=>{(0,C.initializeGA)(E),(0,k.Fk)("Video shopping powered by Whatmore!"),(0,b.wm)()},[]),(0,o.useEffect)(()=>{null==i||0==i.length||l||!(0,_.MN)()||(0,r.Xd)("whatmoreVideoPlayerPoolInitiated")||((0,L._)()?(0,j.Pc)(j.F5):(0,W.bi)())},[i]),(0,o.useEffect)(()=>{if((0,a.fDZ)(E))if(f(-1),(0,a.TOK)(E)){const e=(0,O.f)(E);fetch(`${e}?client_product_id=${J}&limit=50&status=live,upcoming&event_type=video,image`).then(e=>e.json()).then(e=>{var t;let n=null!==(t=null===e||void 0===e?void 0:e.events)&&void 0!==t?t:[];(0,a.xku)(E)||(n=(0,x.Zf)(n)),s(n)}).catch(e=>c(e.message))}else if((0,a.WH1)(E)){const e=(0,O.B)(E),t=(0,a.buK)(E);fetch(`${e}?client_product_id=${J}&limit=10&recommended=${!t}&origin=${window.location.hostname}&status=live,upcoming&event_type=video,image`).then(e=>e.json()).then(e=>{const n=null===e||void 0===e?void 0:e.events;if((null===n||void 0===n?void 0:n.length)>0){var o;const i=t?null===e||void 0===e?void 0:e.all_events:null===e||void 0===e||null===(o=e.related_events)||void 0===o?void 0:o.map(e=>({...e,isRelatedEvent:!0}));let r=[...n,...i];(0,a.xku)(E)||(r=(0,x.Zf)(r)),s(r)}else s([])}).catch(e=>c(e.message))}else fetch(K.toString()+"?client_product_id="+J.toString()+"&status="+ee.toString()+"&event_type=video,image").then(e=>e.json()).then(e=>{const t=e.events;if((null==t||0===t.length)&&"STROXKHHO98"===E){const e=F(window.location.href);if(e!==J)return fetch(K.toString()+"?client_product_id="+encodeURIComponent(e)+"&status="+ee.toString()+"&event_type=video,image").then(e=>e.json()).then(e=>e.events)}return t}).then(e=>(null!=e&&0!=e.length&&(0,a.vfi)(E)&&(0,a.YOR)(e),(0,a.xku)(E)||(e=(0,x.Zf)(e)),s(e),e)).then(e=>((0,a.Uht)(E)&&function(e,t){setTimeout(async()=>{const n=e.reduce((e,t)=>[...e,...t.products],[]).filter(e=>e.client_product_id==t)[0];if(!n||n.product_link==F(window.location.href))return;const o={product_id:n.product_id,product_link:F(window.location.href)};fetch(g.$$+"/product",{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(o)})},500)}(e,J),e)).catch(e=>{c(e.message)})},[J]),(0,o.useEffect)(()=>{f(-2)},[i]),(0,o.useEffect)(()=>{const e=F(window.location.href);"8111554613"===E&&setTimeout(()=>{const e=new Event("change",{bubbles:!0}),t=document.querySelector('[name="id"]')||document.querySelector("[data-variant-picker]")||document.querySelector(".variant-selector");t&&t.dispatchEvent(e)},100);let t=history.pushState;history.pushState=function(){let e=t.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),e};let n=history.replaceState;history.replaceState=function(){let e=n.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),e},window.addEventListener("popstate",()=>{window.dispatchEvent(new Event("locationchange"))}),window.addEventListener("locationchange",function(){if("24950997070"==E&&window.location.origin+window.location.pathname!=e&&fetch(window.location.origin+window.location.pathname+".json").then(e=>e.json()).then(e=>{var t;return G(null===e||void 0===e||null===(t=e.product)||void 0===t?void 0:t.id)}),"80505864496"==E&&window.location.pathname!==oe.current){const e=window.location.pathname;oe.current=e,fetch(window.location.origin+e+".json").then(e=>e.json()).then(e=>{var t;null!==e&&void 0!==e&&null!==(t=e.product)&&void 0!==t&&t.id&&G(e.product.id)}).catch(()=>{})}if("true"===p){const e=function(e){for(var t=window.location.search.substring(1).split("&"),n=0;n<t.length;n++){var o=t[n].split("=");if(o[0]==e)return o[1]}return!1}("variant");e&&""!==e&&G(e)}})},[]),(0,o.useEffect)(()=>{if(null!=i&&0!==i.length&&!l&&Q&&((0,N.H)("whatmore-video-player",()=>{H(!1)}),null!=X)){const e=i.find(e=>X==e.event_id);if(e)return void ae(e,!0,i.indexOf(e))}},[i]);const ie=te.landingLocationType,re=te.templateType,ae=async(e,t=!1,n=0)=>{if((0,_.MN)()&&!t){(0,r.Xd)("whatmoreVideoPlayerPoolBlessed")||await((0,L._)()?(0,j.bo)():(0,W.bi)())}if((0,$.i)(e)||(0,$.I)(e))return h||m||(async()=>{const t=(0,d.Wd)(ie)+(0,d.gf)(re)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,y.increaseViewCount)(e),(0,C.sendVideoViewEventToGA)(E,g.DK,g.K1),(0,b.Ch)(e.event_id,e.products,"product_page","video_popup",t)})(),(0,a.YE3)(E)&&Z(!0),void f(n)};function se(){return(0,u.jsx)(u.Fragment,{})}return null==i||0==i.length||l||(0,d.Ig)(te.templateType)||!(0,a.fDZ)(E)?(0,u.jsx)("div",{}):(0,u.jsxs)(T.C,{value:M,children:[U&&(0,u.jsx)(R.A,{}),"no-product"===J||-1===v||0===i.length?(0,u.jsx)(se,{}):-2===v&&i.length>0?(0,u.jsx)("div",{onMouseEnter:()=>(0,D.h)(),children:(0,u.jsx)("div",{style:{height:"100%"},children:(0,u.jsx)(S.A,{event:i[0],inVideoClick:ae,closeClick:e=>{var t;e.stopPropagation(),f(-1),(0,A.registerClickEvent)({userInteractionType:P.O.PDP_POPUP_CLOSED,widgetSourceDetails:te,event:null===i||void 0===i?void 0:i[0],productList:null===i||void 0===i||null===(t=i[0])||void 0===t?void 0:t.products})},onImpression:()=>{var e;ne.current||h||m||(ne.current=!0,(0,I.trackWhatmoreAnalyticsEvent)({userInteractionType:P.O.PDP_POPUP_WIDGET_VIEW,widgetSourceDetails:te,event:i[0],productList:i[0].products,ctaList:null!==(e=i[0].cta)&&void 0!==e?e:[]}))}})})}):(0,u.jsx)("div",{children:(0,u.jsx)(o.Suspense,{fallback:(0,u.jsx)(q.A,{posterUrl:(null===i||void 0===i||null===(t=i[v])||void 0===t?void 0:t.poster_image)||(null===i||void 0===i||null===(n=i[v])||void 0===n?void 0:n.thumbnail_image)}),children:(0,u.jsx)(D.A,{events:i,index:v,onBack:function(){f(Y?-1:-2),H(!1)},template:"template-product-page"})})})]})};const B=(0,E.A)({key:"whatmore-css-wsv"});var V=function(e){var t,n;const[i,s]=(0,o.useState)(),[l,c]=(0,o.useState)(),[h]=(0,r.QN)("isInDesignMode"),[m]=(0,r.QN)("isDemoBrand"),[p,v]=(0,o.useState)(-2),[f]=(0,r.QN)("whatmoreShopId"),w=(0,r.Xd)("isLandingSharedLink"),E=(0,r.Xd)("whatmoreShareTemplateId"),A=((0,r.Xd)("whatmoreShareStoryId"),(0,r.Xd)("whatmoreShareEventId")),N=((0,r.Xd)("whatmoreLandingLocationType")||"index").split(".")[0],O=(0,r.Xd)("whatmoreLoggingActive"),R=(0,r.Xd)("isWhatmorePreviewMode"),{whatmoreWidgetSourceDetails:M}=(0,o.useContext)(pe),F=(0,o.useRef)(!1);var z=(0,a.SOt)(f)?g.aD+"/get_eventset/":g.$$+"/get_eventset/",V=(0,a.SOt)(f)?g.aD+"/get_eventset_v1/":g.$$+"/get_eventset_v1/",X=(0,a.SOt)(f)?g.aD+"/v2/collection":g.$$+"/v2/collection",Q=(0,a.SOt)(f)?g.aD+"/v5/collection":g.$$+"/v5/collection";(0,o.useEffect)(()=>{(0,b.wm)()},[]),(0,o.useEffect)(()=>{(0,C.initializeGA)(f)},[]),(0,o.useEffect)(()=>{null==i||0==i.length||l||!(0,_.MN)()||(0,r.Xd)("whatmoreVideoPlayerPoolInitiated")||((0,L._)()?(0,j.Pc)(j.F5):(0,W.bi)())},[i]),(0,o.useEffect)(()=>{v(-1);const e=d.JA,t=(0,d.t6)(N),n=(N||"").startsWith("collection");let o=(0,r.Xd)("whatmoreCollectionId");null!=o&&"0"!==o&&o||(o=window.location.href.split(/[?#]/)[0]);const i=!0===(0,a.dLE)(f)?`${Q.toString()}?store_id=${f}&client_collection_id=${o}&sync_products=true`:`${X.toString()}?store_id=${f}&client_collection_id=${o}`,l=n?i:"78232846646"===f.toString()?V.toString()+f.toString()+"?eventset_type="+e+"&event_type=video&source="+t+"&source_id="+f:z.toString()+f.toString()+"?eventset_type="+e+"&source="+t+"&source_id="+f;fetch(l).then(e=>e.json()).then(t=>n?(0,x.Np)(t,!0):(0,x.Po)(t,e)).then(async e=>{if(R&&(null==e||e&&0==(null===e||void 0===e?void 0:e.length))){const{pdpData:e}=await(await fetch("https://api.whatmore.live/vs/mock-data")).json();return s(e),e}let t=[...null===e||void 0===e?void 0:e.events,...null===e||void 0===e?void 0:e.all_events];return(0,a.xku)(f)||(t=(0,x.zJ)(t)),t=t.map(e=>{if(!e.poster_image&&e.event_media_urls){var t,n,o,i,r,a;const s=(null===(t=e.event_media_urls)||void 0===t||null===(n=t.primary)||void 0===n||null===(o=n.portrait)||void 0===o?void 0:o.poster_image)||(null===(i=e.event_media_urls)||void 0===i||null===(r=i.secondary)||void 0===r||null===(a=r.portrait)||void 0===a?void 0:a.poster_image)||"";return{...e,poster_image:s}}return e}),s(t),t}).catch(e=>{c(e.message)})},[]),(0,o.useEffect)(()=>{v(-2)},[i]),(0,o.useEffect)(()=>{null==i||0==i.length||l||w&&"template-embed"==(0,d.Mm)(E)&&null!=A&&i.forEach((e,t)=>{A==e.event_id&&J(e,!0,t)})},[i]);const U=M.landingLocationType,H=M.templateType,J=(e,t=!1,n=0)=>{if((0,_.MN)()&&!t){(0,r.Xd)("whatmoreVideoPlayerPoolBlessed")||((0,L._)()?(0,j.bo)():(0,W.Ij)())}if((0,$.i)(e)||(0,$.I)(e))return h||m||(async()=>{const t=(0,d.Wd)(U)+(0,d.gf)(H)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,y.increaseViewCount)(e),(0,C.sendVideoViewEventToGA)(f,g.DK,g.K1),(0,b.Ch)(e.event_id,e.products,"spotlight","video_popup",t)})(),void v(n)};function G(){return(0,u.jsx)(u.Fragment,{})}return null==i||0==i.length||l?(0,u.jsx)("div",{}):(O&&(0,k.xv)(i),(0,a.ALN)(f)&&p<0&&null!==localStorage.getItem("_whatmore_spotlight_viewed")?(0,u.jsx)(u.Fragment,{}):(localStorage.setItem("_whatmore_spotlight_viewed",!0),(0,u.jsx)(T.C,{value:B,children:-1===p||0===i.length?(0,u.jsx)(G,{}):-2===p&&i.length>0?(0,u.jsx)("div",{onMouseEnter:()=>(0,D.h)(),children:(0,u.jsx)("div",{style:{height:"100%"},children:(0,u.jsx)(S.A,{event:i[0],inVideoClick:J,closeClick:e=>{e.stopPropagation(),v(-1)},isSpotlight:!0,onImpression:()=>{var e;F.current||h||m||(F.current=!0,(0,I.trackWhatmoreAnalyticsEvent)({userInteractionType:P.O.SPOTLIGHT_WIDGET_VIEW,widgetSourceDetails:M,event:i[0],productList:i[0].products,ctaList:null!==(e=i[0].cta)&&void 0!==e?e:[]}))}})})}):(0,u.jsx)("div",{children:(0,u.jsx)(o.Suspense,{fallback:(0,u.jsx)(q.A,{posterUrl:(null===i||void 0===i||null===(t=i[p])||void 0===t?void 0:t.poster_image)||(null===i||void 0===i||null===(n=i[p])||void 0===n?void 0:n.thumbnail_image)}),children:(0,u.jsx)(D.A,{events:i,index:p,onBack:function(){v(-2)},template:"template-embed",eventsStories:null})})})})))};var X=function(){return(0,u.jsx)(u.Fragment,{})},Q=n(4694),U=n(428),H=n(6126);var J=function(){const[e,t]=(0,o.useState)(),[n,i]=(0,o.useState)(),[s,l]=(0,o.useState)(!1),[c]=(0,r.QN)("whatmoreShopId"),[h]=(0,r.QN)("isInDesignMode"),[m]=(0,r.QN)("isDemoBrand"),p=(0,r.Xd)("isWhatmorePreviewMode"),v=(0,r.Xd)("whatmoreLoggingActive"),{whatmoreRootId:f,whatmoreWidgetIdentity:w}=(0,o.useContext)(pe),y=((0,r.Xd)("whatmoreLandingLocationType"),(0,a.SOt)(c)?g.aD+"/get_eventset/":g.$$+"/get_eventset/");return(0,o.useEffect)(()=>{(0,b.wm)()},[]),(0,o.useEffect)(()=>{(0,C.initializeGA)(c)},[]),(0,o.useEffect)(()=>{null!=e&&0!=e.length&&!n&&(0,_.MN)()&&!(0,r.Xd)("whatmoreVideoPlayerPoolInitiated")&&(0,L._)()&&(0,j.Pc)(j.F5)},[e]),(0,o.useEffect)(()=>{const e=d.Jh;let n;if(w&&"wgt_default"!==w){n=`${g.$$}/brand/${c}/eventset?widget_id=${w}&source_type=homepage&source_id=${c}&eventset_type=${e}&status=active,active`,v&&console.log("[Banner Widget System] Using new API:",n)}else n=y.toString()+c.toString()+"?eventset_type="+e+"&source=homepage&source_id="+c,v&&console.log("[Banner Default] Using old API:",n);fetch(n).then(e=>e.json()).then(t=>(0,x.Po)(t,e)).then(async e=>{var n,o;let i=[...null!==(n=null===e||void 0===e?void 0:e.events)&&void 0!==n?n:[],...null!==(o=null===e||void 0===e?void 0:e.all_events)&&void 0!==o?o:[]];if((m||h||p)&&0===i.length){const{bannerData:e}=await(await fetch("https://api.whatmore.live/vs/mock-data")).json();return void t(e)}t(i),l(!0)}).catch(e=>{i(e.message),l(!0)})},[]),(0,o.useEffect)(()=>{e&&e.length>0&&U.Sn.forEach(e=>{const t=e.querySelector(`.whatmore-shimmer-container[data-widget-id="${f}"]`);t&&(t.remove(),v&&console.log(`[Banner Success] Removed shimmer for widget ${f}`));const n=e.querySelector(`.whatmore-render-root[data-widget-id="${f}"]`);n&&(n.style.opacity="1",n.style.pointerEvents="auto",n.removeAttribute("data-shimmer-active"),v&&console.log(`[Banner Success] Showing render root for widget ${f}`))})},[e]),s&&(null==e||0===e.length||n)?(U.Sn.forEach(e=>{var t;if(!(null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-banner-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-banner-a"]')))return;const n=e.querySelector(`.whatmore-shimmer-container[data-widget-id="${f}"]`);n&&(n.remove(),v&&console.log(`[Banner API Error] Removed shimmer for widget ${f}`));const o=e.querySelector(`.whatmore-render-root[data-widget-id="${f}"]`);o&&(o.style.opacity="1",o.style.pointerEvents="auto",o.removeAttribute("data-shimmer-active"),v&&console.log(`[Banner API Error] Reset render root for widget ${f}`)),m||h||e.style.setProperty("min-height","0px","important")}),(0,u.jsx)("div",{})):null==e||0===e.length||n?(0,u.jsx)("div",{}):(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(Q.S,{userInteractionType:P.O.BANNER_WIDGET_VIEW,event:e[0],triggerFlag:!h&&!m,children:(0,u.jsx)(H.A,{events:e})})})},G=n(5677),Y=(n(8584),n(2446),n(6267),n(4475)),Z=n(4540),K=n(5405);var ee=function(e){var t,n;const i=(0,r.Xd)("whatmorePrimaryFont"),s=(0,r.Xd)("whatmoreSecondaryColor"),l=(0,r.Xd)("whatmoreShopId"),[d,c]=(0,o.useState)(!1),h=e.mode,m=e.storyId,p=(0,Y.s)(e.imageUrl),v=e.title,f=e.onClick,w=e.template,g=e.event,y=(0,a.ivI)(l),b="template-stories-a"===w?"50%":"30%",x=e.tileSize,S=.12*x*(0,a.cYm)(l),j=null!==(t=(0,a.Pjz)(l))&&void 0!==t?t:i;let _=null!==(n=(0,a.qAx)(l))&&void 0!==n?n:[s,y,s,y,s];Array.isArray(_)||(_=Array(5).fill(_));const C=(0,o.useRef)(0),T=(0,o.useRef)(null),E=(0,o.useRef)(null);return(0,o.useEffect)(()=>{E.current&&E.current.play();const e=document.querySelector('.whatmore-base:has(.whatmore-widget[data-wh="stories"])');e&&function t(n=0){const o=e.querySelector("#storiesLoader");o?o.style.display="none":n<10&&setTimeout(()=>t(n+1),100)}()},[]),(0,o.useEffect)(()=>{const e=T.current,t=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(e.isIntersecting){const n=e.target;n.src=n.dataset.src,t.unobserve(n)}})},{rootMargin:"0px 100px 0px 0px",threshold:0});return e&&t.observe(e),()=>{e&&t.unobserve(e)}},[p]),(0,u.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignItems:"center",flexShrink:0,height:"fit-content",width:x*(0,a.rMH)(l)+"px",marginLeft:"10px",marginRight:"10px",marginTop:"10px",marginBottom:"10px",cursor:"pointer"},onClick:()=>{c(!0),f(m)},className:[d?"whatmore-scale-on-tap":""].join(" "),children:[(0,u.jsx)("div",{style:{display:"flex",boxSizing:"border-box",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:b,boxShadow:"87857266990"===l?"none":"0px 2px 1px 0px "+_[0]+"50, 0px -2px 1px 0px "+_[1]+"50, 2px 0px 1px 0px "+_[2]+"50, -2px 0px 1px 0px "+_[3]+"80, 2px -2px 1px 0px "+_[4]+"80, -2px 2px 1px 0px "+_[0]+"DA, 2px 2px 1px 0px "+_[1]+"DA, -2px -2px 1px 0px "+_[2]+"DA"},children:(0,u.jsx)("div",{className:"whatmore-story-thumbnail-wrapper",style:{flexShrink:0,objectFit:"cover",height:x+"px",width:x+"px",borderRadius:b,border:"87857266990"===l?"none":"3px solid white",backgroundColor:"#343434"===s?"#d3d3d3":s,overflow:"hidden"},children:"video"==(0,Z.B)(p)?(0,u.jsx)(K.A,{height:"100%",width:"100%",url:p,isPlaying:!0,event:g||{event_type:"video"},borderRadius:b}):(0,u.jsx)("img",{ref:T,className:"whatmore-story-thumbnail","data-src":p.startsWith("https://cdn.shopify.com")?p.split("?")[0]+"?width=400&height=400":p,loading:"lazy",style:{objectFit:"cover",width:"100%",height:"100%",backgroundColor:"white"},alt:"story",onError:function(){if(C.current<3){let t=(0,Y.s)(e.imageUrl);T.current.src="",T.current.src=t,C.current=C.current+1}else console.log("Failed to load image after several attempts"),T.current.src="https://d2oouab8j9eigo.cloudfront.net/background_white.png"}})})}),(0,u.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"100%",marginTop:"10px"},children:(0,u.jsx)("p",{className:"wht-story-title "+("landscape"===h?"wst-landscape":"wst-portrait"),style:{textAlign:"center",color:(0,a.o9q)(l),fontFamily:j,fontWeight:"normal",lineHeight:"110%",margin:0,padding:0,overflow:"hidden",textOverflow:"ellipsis",width:"auto",fontSize:S+"px"},children:null===v||void 0===v?void 0:v.substring(0,24)})})]})};const te=e=>(0,u.jsx)("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",style:e.style,children:(0,u.jsx)("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),ne=e=>(0,u.jsx)("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",style:e.style,children:(0,u.jsx)("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),oe=(0,E.A)({key:"whatmore-stories-css"});var ie=function(e){const[t,n,i]=(0,G.A)(),[s]=(0,r.QN)("whatmoreStoryTileSize"),[l]=(0,r.QN)("whatmoreStoryTileSizeDesktop"),[d]=(0,r.QN)("whatmoreShopId"),[c,h]=(0,o.useState)("portrait"===t?"flex-start":"center"),[m,p]=(0,o.useState)(!1),[v,f]=(0,o.useState)(!1),w=(0,o.useRef)(null),g=(0,o.useRef)(null);var y=e.eventsStories;const b=e.onClick,x=e.template,S="landscape"===t&&(0,a.lDJ)(d);function j(){if(!S||!w.current)return;const{scrollLeft:e,scrollWidth:t,clientWidth:n}=w.current;p(e>0),f(e<t-n-1)}(0,o.useEffect)(()=>{U.Sn.forEach(e=>{var t;if(!(null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-stories-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-stories-a"]')))return;e&&(e.style.minHeight="0px")})},[]);const _=e=>{if(w.current){const t="left"===e?4*-$:4*$;w.current.scrollBy({left:t,behavior:"smooth"})}};(0,o.useEffect)(()=>{!function(){if(w.current){const e=w.current.scrollWidth,t=w.current.offsetWidth;h(e>t?"flex-start":"center")}}()},[c,i]),(0,o.useEffect)(()=>{if(!S)return;const e=()=>{j()},t=()=>{j()},n=w.current;return n?(n.addEventListener("scroll",e),window.addEventListener("resize",t),j(),()=>{n.removeEventListener("scroll",e),window.removeEventListener("resize",t)}):void 0},[S]);const[C,E]=(0,o.useState)([]);(0,o.useEffect)(()=>{E(y.map(e=>e.storyset_dynamic_thumbnail?Math.floor(Math.random()*(e.events.length-1)):0))},[]);const $="landscape"===t?n*(l/340):i*(s/200);return(0,u.jsx)(T.C,{value:oe,children:"landscape"==t&&!(0,a.AFg)(d)||"portrait"==t&&!(0,a.rC6)(d)?(0,u.jsx)(u.Fragment,{}):(0,u.jsxs)("div",{ref:g,style:{position:"relative",width:"100%",height:"fit-content"},className:"whatmore-story-container",children:[(0,u.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:c,height:"fit-content",width:"100%",overflowX:"auto",scrollbarWidth:"none",msOverflowStyle:"none"},className:"whatmore-story-horizontal-flex",ref:w,children:y.map((e,n)=>{var o,i,r,a,s;const l=e.storyset_dynamic_thumbnail?C[n]:0,d=null===(o=e.events)||void 0===o?void 0:o[l],c=e.storyset_dynamic_thumbnail?null!==(i=null===d||void 0===d?void 0:d.poster_image)&&void 0!==i?i:e.thumbnail_image:null!==(r=e.thumbnail_image)&&void 0!==r?r:null===e||void 0===e||null===(a=e.events)||void 0===a||null===(s=a[0])||void 0===s?void 0:s.thumbnail_image;return(0,u.jsx)(ee,{storyId:e.id,tileSize:$,onClick:e=>{b(n)},template:x,imageUrl:c,fallbackUrl:e.thumbnail_image,title:e.title,mode:t,event:d},"whatmore-story-"+e.id)})}),S&&(0,u.jsxs)(u.Fragment,{children:[m&&(0,u.jsx)("button",{onClick:()=>_("left"),style:{width:"48px",height:"48px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.7)",border:"none",position:"absolute",top:"40%",left:"16px",transform:"translateY(-50%)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"all 0.2s ease-in-out",backdropFilter:"blur(4px)",color:"white",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.2)"},onMouseEnter:e=>{e.target.style.backgroundColor="rgba(0, 0, 0, 0.8)"},onMouseLeave:e=>{e.target.style.backgroundColor="rgba(0, 0, 0, 0.7)"},children:(0,u.jsx)(te,{style:{fontSize:"32px",display:"flex",alignItems:"center",justifyContent:"center"}})}),v&&(0,u.jsx)("button",{onClick:()=>_("right"),style:{width:"48px",height:"48px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.7)",border:"none",position:"absolute",top:"40%",right:"16px",transform:"translateY(-50%)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"all 0.2s ease-in-out",backdropFilter:"blur(4px)",color:"white",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.2)"},onMouseEnter:e=>{e.target.style.backgroundColor="rgba(0, 0, 0, 0.8)"},onMouseLeave:e=>{e.target.style.backgroundColor="rgba(0, 0, 0, 0.7)"},children:(0,u.jsx)(ne,{style:{fontSize:"32px",display:"flex",alignItems:"center",justifyContent:"center"}})})]})]})})};var re=function(){var e,t,i,s,l,c;const[h,m]=(0,o.useState)(),[p,v]=(0,o.useState)(),[f,w]=(0,o.useState)(),[S,T]=(0,o.useState)(!1),[E,$]=(0,o.useState)(-1),[A,I]=(0,o.useState)(null),[k]=(0,r.QN)("whatmoreShopId"),[N]=(0,r.QN)("isInDesignMode"),[W]=(0,r.QN)("isDemoBrand"),[O]=(0,r.QN)("whatmoreStoriesTopBottomPadding"),{whatmoreRootId:R,whatmoreWidgetSourceDetails:M,whatmoreUserInfo:F}=((0,r.Xd)("isWhatmorePreviewMode"),(0,r.Xd)("whatmoreLoggingActive"),(0,o.useContext)(pe)),z=(0,r.Xd)("whatmoreLandingLocationType"),B=(null===M||void 0===M?void 0:M.templateType)||"template-stories-a";(0,o.useEffect)(()=>{(0,b.wm)()},[]),(0,o.useEffect)(()=>{(0,C.initializeGA)(k)},[]),(0,o.useEffect)(()=>{null!=h&&0!=h.length&&!f&&(0,_.MN)()&&!(0,r.Xd)("whatmoreVideoPlayerPoolInitiated")&&(0,L._)()&&(0,j.Pc)(j.F5)},[h]),(0,o.useEffect)(()=>{var e,t,n;const o=null===(e=window)||void 0===e||null===(t=e.whatmore)||void 0===t||null===(n=t.storyEvents)||void 0===n?void 0:n.events;if(z.startsWith("index")&&"object"==typeof o&&(null===o||void 0===o?void 0:o.length)>0)m(o),v(o),T(!0);else{let e;const t="live,upcoming",n="true";if(z.startsWith("product")){const n=(0,r.Xd)("whatmoreProductId");e=g.$$+"/v2/brand/"+k+"/product-events"+"?client_product_id="+n+"&status="+t+"&event_type=video,image"}else{e=((0,a.SOt)(k)?g.aD+"/v2/events/":g.$$+"/v2/events/")+k+"?status="+t+"&is_active="+n+"&template_type=stories"}fetch(e).then(e=>e.json()).then(e=>(0,x.Np)(e,!1)).then(e=>{let t=[...null===e||void 0===e?void 0:e.events,...null===e||void 0===e?void 0:e.all_events];t=(0,a.xku)(k)?(0,x.d8)(t):(0,x.Zf)(t),m(t),v(t),T(!0)}).catch(e=>{console.error("[WhatmoreStoriesView] API Error:",e),w(e),T(!0)})}},[]);const V=h?function(e){var t=e.reduce((e,t,n)=>{var o,i=t.storyset_id;i in e?(e[i].total_events=e[i].total_events+1,e[i].events.push(t)):e[i]={id:t.storyset_id,title:t.storyset_name,thumbnail_image:t.storyset_thumbnail_image,total_events:1,start_event_index:n,storyset_dynamic_thumbnail:null!==(o=null===t||void 0===t?void 0:t.storyset_dynamic_thumbnail)&&void 0!==o&&o,events:[t]};return e},{}),n=Object.values(t);return n.sort((e,t)=>e.start_event_index-t.start_event_index),n}(h):[];return S&&(null==h||0===h.length||f)?(W||N||U.Sn.forEach(e=>{var t,n,o;(null!==(t=null!==(n=null!==(o=e.querySelector('.whatmore-template-type[data-wh="template-stories-a"]'))&&void 0!==o?o:e.querySelector('.whatmore-template-type[data="template-stories-a"]'))&&void 0!==n?n:e.querySelector('.whatmore-template-type[data-wh="template-stories-b"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-stories-b"]'))&&e.style.setProperty("min-height","0px","important")}),(0,u.jsx)("div",{})):null==h||0===h.length||f?(0,u.jsx)("div",{}):(0,u.jsxs)(u.Fragment,{children:[-1!==E&&null!==A&&(0,u.jsx)(o.Suspense,{fallback:(0,u.jsx)(q.A,{posterUrl:(null===V||void 0===V||null===(e=V[A])||void 0===e||null===(t=e.events)||void 0===t||null===(i=t[E])||void 0===i?void 0:i.poster_image)||(null===V||void 0===V||null===(s=V[A])||void 0===s||null===(l=s.events)||void 0===l||null===(c=l[E])||void 0===c?void 0:c.thumbnail_image)}),children:(0,u.jsx)(D.A,{events:p,index:E,onBack:async function(){$(-1)},slideDirection:"horizontal",eventsStories:V,initialStoryIndex:A,template:B})}),(0,u.jsx)("div",{className:"whatmore-widget-container",onMouseEnter:()=>(0,D.h)(),style:{height:"100%",marginTop:O+"px",marginBottom:O+"px"},children:(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(Q.S,{userInteractionType:P.O.STORIES_WIDGET_VIEW,triggerFlag:!N&&!W,children:(0,u.jsx)(ie,{eventsStories:V,onClick:async function(e,t=!1,o=null){if((0,_.MN)()&&(0,L._)()&&!t){(0,r.Xd)("whatmoreVideoPlayerPoolBlessed")||await(0,j.bo)()}N||W||(async()=>{const{initializeGA:t,sendVideoViewEventToGA:o}=await Promise.resolve().then(n.bind(n,7939));t();const i=V[e].events[0],r=(null===M||void 0===M?void 0:M.landingLocationType)||"index",a=(null===M||void 0===M?void 0:M.templateType)||"template-stories-a",s=(0,d.Wd)(r)+(0,d.gf)(a)+(null!==i&&void 0!==i&&i.isRelatedEvent?"R":"E")+"_"+(null===i||void 0===i?void 0:i.event_id);(0,y.increaseViewCount)(i),o(k,g.TB,g.OL),(0,b.Ch)(i.event_id,i.products,"homepage","stories",s,null===i||void 0===i?void 0:i.location,null===F||void 0===F?void 0:F.userType)})();var i=0;null!=o&&V[e].events.map((e,t)=>{e.event_id==o&&(i=t)}),$(i),I(e)},template:B})})})})]})},ae=n(5e3),se=n(6287),le=n(4018);var de,ce=function({events:e,index:t,eventsStories:n,storyIndex:i,onClose:s}){const l=(0,r.Xd)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:d,whatmoreIsStoriesTemplate:c}=(0,o.useContext)(pe),h=(0,o.useMemo)(()=>(Array.isArray(e)?e:[]).map(e=>{var t;return null!==e&&void 0!==e&&null!==(t=e.poster_image)&&void 0!==t&&t.startsWith("https://cdn.shopify.com")?{...e,poster_image:e.poster_image.split("?")[0]+"?width=400&height=400"}:e}),[e]);if((0,o.useEffect)(()=>{(0,se.B)();const e=(0,ae.k5)();e&&(0,ae.YJ)()&&((0,r.t2)("whatmoreVideoPlayerPool",e),(0,r.t2)("whatmoreVideoPlayerPoolInitiated",!0),(0,r.t2)("whatmoreVideoPlayerPoolBlessed",!0))},[]),null==t||t<0||!h.length)return null;const m=c||"horizontal"===(0,a.br0)(l)?"horizontal":"vertical";return(0,u.jsx)(o.Suspense,{fallback:(0,u.jsx)(q.A,{posterUrl:h[t]?(0,le.tQ)(h[t]):void 0}),children:(0,u.jsx)(D.A,{events:h,index:t,onBack:s,slideDirection:m,template:d,eventsStories:n,initialStoryIndex:i})})};const ue=null!==(de="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==de&&de;var he=function(e){const{whatmoreEventsBrowsingTemplate:t,whatmoreIsStoriesTemplate:i,whatmoreIsCollectionsTemplate:h,whatmoreIsBannerTemplate:m,whatmoreCollectionId:v,whatmoreRootId:f,whatmoreWidgetSourceDetails:g,whatmoreIsPreviewMode:y,whatmoreUserInfo:b}=(0,o.useContext)(pe),x=(null===g||void 0===g?void 0:g.landingLocationType)||"index",[S]=(0,r.QN)("whatmoreShopId"),[j]=(0,r.QN)("isInDesignMode"),[_]=(0,r.QN)("isDemoBrand"),[C]=(0,r.QN)("whatmoreEmbedAppUseVariant"),[T,E]=(0,r.QN)("brandCustomizationsLoaded");function $(){const e=v;return j||(0,l.W)({enableSpotlight:(0,a.hbj)(S),enableOnHP:(0,a.R2w)(S),pageIdSet:(0,a.Idi)(S),enableAllPages:(0,a.isL)(S)},x,e)}if((0,o.useEffect)(()=>{if(!T)try{const e=localStorage.getItem("whatmore_brand_customizations");if(e){const{customizations:t}=JSON.parse(e);(0,a.Tzr)(t,S),E(!0),ue&&console.debug("Whatmore: Customizations loaded from cache in App.js")}}catch(e){console.error("Whatmore: Error loading customizations in App.js:",e)}},[T,S,E]),(0,o.useEffect)(()=>{null==localStorage.getItem("_user_wh_lc")&&"72201044272"==S&&n.e(259).then(n.bind(n,6027)).then(({getLocationDetails:e})=>e()).then(e=>{localStorage.setItem("_user_wh_lc",JSON.stringify(e))}).catch(e=>{localStorage.setItem("_user_wh_lc",JSON.stringify({latitude:"",longitude:""})),console.error(`Whatmore: Error fetching location: ${e}`)})},[S]),null!==e&&void 0!==e&&e.neoFullscreen)return(0,u.jsx)(ce,{events:e.neoFullscreen.events,index:e.neoFullscreen.index,eventsStories:e.neoFullscreen.eventsStories,storyIndex:e.neoFullscreen.storyIndex,onClose:e.neoFullscreen.onClose});if((0,s.U)()){if((0,d.S0)(t))return(0,u.jsx)(u.Fragment,{});if("index"===x||"collection"===x||x.startsWith("collection")||x.startsWith("page")||x.startsWith("blog")||x.startsWith("article")){if(m)return ue&&console.debug(`Whatmore: Shopify, rendering banner: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(J,{})});if(i)return ue&&console.debug(`Whatmore: Shopify, rendering stories: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(re,{})});if(!(0,d.io)(t))return ue&&console.debug(`Whatmore: Shopify, rendering index/collection page carousels: ${t}`),(0,u.jsx)(w,{whatmoreRootId:f,children:(0,u.jsx)(p,{})});if($()&&!x.startsWith("collection"))return ue&&console.debug(`Whatmore: Shopify, rendering index/page spotlight: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(V,{})});if(x.startsWith("collection")&&(0,d.io)(t)&&!0===(0,a.Vwo)(S))return ue&&console.debug(`Whatmore: Shopify, rendering collection page floating popup: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(V,{})});if(x.startsWith("collection")&&(0,d.io)(t))return(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(X,{})})}var A,P,I,k,N,L;return x.startsWith("product")?m?(ue&&console.debug(`Whatmore: Shopify, rendering PDP-page banner: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(J,{})})):i?(ue&&console.debug(`Whatmore: Shopify, rendering PDP-page stories: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(re,{})})):(0,d.io)(t)||(0,d.Ig)(t)?null!==(A=window)&&void 0!==A&&null!==(P=A.Shopify)&&void 0!==P&&null!==(I=P.theme)&&void 0!==I&&I.role&&"main"===window.Shopify.theme.role||window.location.href.includes("localhost:")?(ue&&console.debug(`Whatmore: Shopify, rendering PDP-page popup: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(z,{})})):(null!==(k=window)&&void 0!==k&&null!==(N=k.Shopify)&&void 0!==N&&null!==(L=N.theme)&&void 0!==L&&L.role&&"main"!==window.Shopify.theme.role||j)&&(0,a.C1J)(S)?(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(z,{})}):(ue&&console.debug("Whatmore: Shopify, PDP-page popup disabled."),(0,u.jsx)(u.Fragment,{})):(ue&&console.debug(`Whatmore: Shopify, rendering PDP-page carousels: ${t}`),(0,u.jsx)(w,{whatmoreRootId:f,children:(0,u.jsx)(p,{})})):((0,a.dnh)(S)&&(0,a.bQo)(S)&&"cart"===x&&(ue&&console.debug("Whatmore: initiating whatmore attribution from cart page."),(0,c.addWhatmoreAttributeToCart)("true"===C)),(0,u.jsx)(u.Fragment,{}))}return"index"===x||"collection"===x||x.startsWith("page")?m?(ue&&console.debug(`Whatmore: External, rendering banner: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(J,{})})):i?(ue&&console.debug(`Whatmore: External, rendering stories: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(re,{})})):(0,d.io)(t)?(0,d.io)(t)&&$()&&!x.startsWith("collection")?(ue&&console.debug(`Whatmore: External, rendering index/page spotlight: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(V,{})})):x.startsWith("collection")&&(0,d.io)(t)&&!0===(0,a.Vwo)(S)?(ue&&console.debug(`Whatmore: External, rendering collection page floating popup: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(V,{})})):(ue&&console.debug(`Whatmore: External, rendering index/collection page popup: ${t}`),(0,u.jsx)(u.Fragment,{})):(ue&&console.debug(`Whatmore: External, rendering index/collection page carousels: ${t}`),(0,u.jsx)(w,{whatmoreRootId:f,children:(0,u.jsx)(p,{})})):x.startsWith("product")||"embed"===x?m?(ue&&console.debug(`Whatmore: External, rendering PDP-page banner: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(J,{})})):i?(ue&&console.debug(`Whatmore: External, rendering PDP-page stories: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(re,{})})):(0,d.Ig)(t)||(0,d.io)(t)?(0,a.fDZ)(S)?(ue&&console.debug(`Whatmore: External, rendering PDP-page popup: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(z,{})})):(ue&&console.debug("Whatmore: External, PDP-page popup disabled."),(0,u.jsx)(u.Fragment,{})):(ue&&console.debug(`Whatmore: External, rendering PDP-page carousels: ${t}`),(0,u.jsx)(w,{whatmoreRootId:f,children:(0,u.jsx)(p,{})})):(0,u.jsx)(u.Fragment,{})};const me=["80505864496","26077888559"],pe=o.createContext({whatmoreEventsBrowsingTemplate:"non-existent-template",whatmoreIsStoriesTemplate:!1,whatmoreIsCollectionsTemplate:!1,whatmoreCollectionId:"",whatmoreCollectionHeading:"",whatmoreHeadingCarousel:"",whatmoreWidgetIdentity:"wgt_default",whatmoreIsBannerTemplate:!1,whatmoreRootId:"whatmoreRoot-template-a",whatmoreWidgetSourceDetails:{landingLocationType:"index",templateType:"non-existent-template"},whatmoreIsPreviewMode:"invalid",whatmoreUserInfo:{userType:null}}),ve=function(e){return"template-banner-a"===e||"template-banner-neo"===e},fe=function(e){return"template-collections-a"==e||"template-collections-b"==e||"template-collections-c"==e||"template-collections-d"==e||"template-collections-e"==e||"template-collections-stories"==e||"template-collections-f"==e||"template-collections-g"==e||"template-collections-h"==e||"template-collections-i"==e||"template-collections-feed-a"==e||"template-collections-j"==e||"template-collections-a-1"==e||"template-collections-neo"==e},we=function(e){return"template-stories-a"===e||"template-stories-b"===e||"template-stories-neo"===e};function ge(e){return{whatmoreEventsBrowsingTemplate:e.templateType,whatmoreIsStoriesTemplate:e.isStoriesTemplate,whatmoreIsCollectionsTemplate:e.isCollectionsTemplate,whatmoreCollectionId:e.whatmoreCollectionId,whatmoreCollectionHeading:e.whatmoreCollectionHeading,whatmoreHeadingCarousel:e.whatmoreHeadingCarousel,whatmoreWidgetIdentity:e.whatmoreWidgetIdentity,whatmoreIsBannerTemplate:e._isTemplateTypeBanner,whatmoreRootId:e.whatmoreRootId,whatmoreWidgetSourceDetails:{landingLocationType:e.landingLocationType,templateType:e.templateType},whatmoreIsPreviewMode:e.isInPreviewMode,whatmoreUserInfo:{userType:e.userType}}}function ye(e,t){const n=ge(e),o=document.createElement("div");o.className="whatmore-neo-fullscreen-root",document.body.appendChild(o);const r=i.createRoot(o);r.render((0,u.jsx)(pe.Provider,{value:n,children:(0,u.jsx)(he,{neoFullscreen:{events:t.events,index:t.eventIndex,eventsStories:t.eventsStories,storyIndex:t.storyIndex,onClose:()=>{try{r.unmount()}catch(e){}o.remove()}}})}))}function be(e){const{rootElement:t,templateType:n,whatmoreRootId:o}=e,a=ge(e),s=i.createRoot(t);s.render((0,u.jsx)(pe.Provider,{value:a,children:(0,u.jsx)("div",{style:{display:"block",height:"100%"},id:o,className:"whatmore-root",children:(0,u.jsx)(he,{})})})),"template-embed"!==n&&me.includes(String((0,r.Xd)("whatmoreShopId")))&&function(e,t,n,o){var a;const s=(null===(a=e.closest)||void 0===a?void 0:a.call(e,".whatmore-base"))||e.parentElement;if(!s)return;const l=()=>{var e,t;const n=s.querySelector("#whatmoreProductId");return null!==(e=null!==(t=null===n||void 0===n?void 0:n.getAttribute("data-wh"))&&void 0!==t?t:null===n||void 0===n?void 0:n.getAttribute("data"))&&void 0!==e?e:null};let d=l(),c=t;new MutationObserver(()=>{const t=l();if(!t||t===d)return;if(d=t,(0,r.t2)("whatmoreProductId",t),c)try{c.unmount()}catch(s){}e.textContent="";const a=document.createElement("div");a.id=o,a.className="whatmore-root",a.style.display="block",a.style.height="100%",e.appendChild(a),c=i.createRoot(a),c.render((0,u.jsx)(pe.Provider,{value:n,children:(0,u.jsx)(he,{})}))}).observe(s,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-wh","data"]})}(t,s,a,o)}},4475:function(e,t,n){n.d(t,{s:function(){return s}});var o=n(5547),i=n(1214);const r={"https://d3syezql093hs1.cloudfront.net":"https://whatmore-brand-video-assets.azureedge.net","https://d2r0bijhs9mx1s.cloudfront.net":"https://whatmore-brand-thumbnail-video-assets.azureedge.net","https://d2oouab8j9eigo.cloudfront.net":"https://whatmore-brand-story-assets.azureedge.net","https://d28nus7q7qajdn.cloudfront.net":"https://whatmore-video-assets.azureedge.net","https://d1zl4k1t5o4s75.cloudfront.net":"https://whatmore-brand-video-assets-720p.azureedge.net"},a={"https://d3syezql093hs1.cloudfront.net":"https://whatmore-brand-video-assets.b-cdn.net","https://d2r0bijhs9mx1s.cloudfront.net":"https://whatmore-brand-thumbnail-video-assets.b-cdn.net","https://d2oouab8j9eigo.cloudfront.net":"https://whatmore-brand-story-assets.b-cdn.net","https://d28nus7q7qajdn.cloudfront.net":"https://whatmore-video-assets-old.b-cdn.net","https://d1zl4k1t5o4s75.cloudfront.net":"https://whatmore-brand-video-assets-720p.b-cdn.net"},s=function(e){const t=(0,i.Xd)("whatmoreShopId");if(!e)return e;if(e.startsWith("https://cdn.shopify.com"))return e;if("AWSCDN"==(0,o.CfJ)(t))return e;if("AZURECDN"==(0,o.CfJ)(t)){if(e.includes(".azureedge.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(r))if(e.includes(t))return e.replace(t,r[t]);return e}}if("BUNNYCDN"==(0,o.CfJ)(t)){if(e.includes(".b-cdn.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(a))if(e.includes(t))return e.replace(t,a[t]);return e}}return e}},4540:function(e,t,n){n.d(t,{B:function(){return a},b:function(){return r}});var o=n(5547),i=n(1214);function r(e,t=""){const n=(0,i.Xd)("whatmoreShopId");return"shopify"!=(0,o.NCy)(n)?"STRNV8MHJTF"==n?e+"?format=webp":e:e+t}function a(e){var t;if(null!==e&&void 0!==e&&e.includes("https://w-media.b-cdn.net/process-media"))return"image";const n=null===e||void 0===e||null===(t=e.trim())||void 0===t?void 0:t.split("?")[0],o=/\.(jpeg|jpg|gif|png|svg|webp)$/i,i=/\.(mp4|mov|wmv|avi|flv|mkv)$/i;return null!==o&&void 0!==o&&o.test(n)?"image":null!==i&&void 0!==i&&i.test(n)?"video":void 0}},4548:function(){},4694:function(e,t,n){n.d(t,{S:function(){return c}});var o=n(5660),i=n(4234),r=n(1477),a=n(6694),s=n(7156),l=n(481);const d=new Set([s.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,s.O.BANNER_WIDGET_VIEW,s.O.STORIES_WIDGET_VIEW,s.O.COLLECTION_WIDGET_VIEW,s.O.SPOTLIGHT_WIDGET_VIEW,s.O.PDP_POPUP_WIDGET_VIEW]),c=function(e){var t,n;const s=d.has(e.userInteractionType),c=null!==(t=e.threshold)&&void 0!==t?t:s?0:1,u=null!==(n=e.triggerOnce)&&void 0!==n?n:s,[h,m,p]=(0,o.A)({triggerOnce:u,threshold:c}),{whatmoreWidgetSourceDetails:v}=(0,r.useContext)(i.AppContext);return(0,r.useEffect)(()=>{var t;const n=null===p||void 0===p?void 0:p.boundingClientRect;var o,i,r;(u||!n||0!==n.width&&0!==n.height)&&(m&&null!==(t=e.triggerFlag)&&void 0!==t&&t&&(0,a.trackWhatmoreAnalyticsEvent)({userInteractionType:e.userInteractionType,userInteractionMetadata:null!==(o=e.userInteractionMetadata)&&void 0!==o?o:{},widgetSourceDetails:v,event:e.event,productList:null!==(i=e.productList)&&void 0!==i?i:[],ctaList:null!==(r=e.ctaList)&&void 0!==r?r:[]}))},[m,e.triggerFlag]),(0,l.jsx)("div",{style:{height:"100%"},ref:h,children:e.children})}},5129:function(e,t,n){var o=n(1477),i=n(9258),r=n(4475),a=n(481);t.A=function(e){var t,n,s;const[l,d]=(0,o.useState)(!1),c=o.useRef(0),u=(0,o.useRef)(null),h=null!==(t=e.timeUpdateCallback)&&void 0!==t?t:()=>{},m=null!==(n=e.height)&&void 0!==n?n:"100%",p=null!==(s=e.width)&&void 0!==s?s:"100%";return(0,o.useEffect)(()=>{c.current=0;const e=setInterval(()=>{c.current=c.current+.03,u.current&&h(c.current,5),c.current>=5&&(c.current=0)},30);return()=>{clearInterval(e)}},[e.isPlaying]),(0,a.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:p,height:"100%",overflow:"hidden"},children:[(0,a.jsx)("div",{style:{width:l?"100%":"0px",height:l?"100%":"0px"},children:(0,a.jsx)("img",{ref:u,src:(0,r.s)(e.url),style:{objectFit:"cover",height:"100%",width:p,backgroundColor:"white"},alt:"image player",onLoad:()=>{d(!0)}})}),l?(0,a.jsx)(a.Fragment,{}):(0,a.jsx)(i.A,{width:p,height:m})]})}},5277:function(){},5405:function(e,t,n){n.d(t,{A:function(){return p}});var o=n(1477),i=n(5660),r=n(4475),a=n(3168),s=n(9128),l=n(5129),d=n(4040),c=n(1214),u=n(4018),h=n(481);var m=function(e){var t,n,r,s,l,m,p,v,f,w,g,y,b,x,S,j,_,C,T,E,$,A,P;const I=(0,o.useRef)(null),[k,N,L]=(0,i.A)({triggerOnce:!0}),W=(0,c.Xd)("whatmoreShopId"),O=null!==(t=e.height)&&void 0!==t?t:"100%",D=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,o.useEffect)(()=>{if(I.current)if(e.isPlaying){if("99423519085"===W){var t;const n=I.current;n.muted=null===(t=e.isVideoMuted)||void 0===t||t,n.playsInline=!0,n.autoplay=!0;const o=()=>{n.paused&&n.play().catch(()=>{})};return o(),n.addEventListener("loadeddata",o),n.addEventListener("canplay",o),()=>{n.removeEventListener("loadeddata",o),n.removeEventListener("canplay",o)}}I.current.paused&&I.current.play().catch(e=>{"NotAllowedError"!==e.name?console.error("Muted video play error:",e):console.warn("Muted play blocked by iOS autoplay policy")})}else"57939755089"==W?(I.current.paused&&((0,d.n)()||(0,a.At)())&&I.current.play().catch(()=>{}),setTimeout(()=>{I.current&&I.current.pause()},300)):I.current.pause()},[e.isPlaying,N]),(0,h.jsx)("div",{ref:k,style:{width:O,height:D,overflow:"hidden",display:"flex",alignItems:"center"},children:N||"51394281658"==W||"8968077397"==W?(0,h.jsxs)("div",{itemScope:!0,itemtype:"https://schema.org/VideoObject",style:{width:D,height:O},children:[(0,h.jsx)("meta",{itemprop:"name",content:null!==(r=null!==(s=null===e||void 0===e||null===(l=e.event)||void 0===l||null===(m=l.products)||void 0===m||null===(p=m[0])||void 0===p?void 0:p.title)&&void 0!==s?s:null===e||void 0===e||null===(v=e.event)||void 0===v?void 0:v.event_id)&&void 0!==r?r:"0"}),(0,h.jsx)("meta",{itemprop:"description",content:null!==(f=null===e||void 0===e||null===(w=e.event)||void 0===w||null===(g=w.products)||void 0===g||null===(y=g[0])||void 0===y?void 0:y.title)&&void 0!==f?f:"whatmore-event"}),(0,h.jsx)("meta",{itemprop:"thumbnailUrl",content:null!==(b=null===e||void 0===e||null===(x=e.event)||void 0===x?void 0:x.poster_image)&&void 0!==b?b:""}),(0,h.jsx)("meta",{itemprop:"contentUrl",content:null!==(S=null===e||void 0===e||null===(j=e.event)||void 0===j?void 0:j.thumbnail_image)&&void 0!==S?S:""}),(0,h.jsx)("meta",{itemprop:"uploadDate",content:null!==(_=`${null===e||void 0===e||null===(C=e.event)||void 0===C?void 0:C.scheduled_date}T00:00:00Z`)&&void 0!==_?_:""}),(0,h.jsx)("meta",{itemprop:"duration",content:"PT3S"}),(0,h.jsx)("meta",{itemprop:"embedUrl",content:null!==(T=null===e||void 0===e||null===(E=e.event)||void 0===E?void 0:E.thumbnail_image)&&void 0!==T?T:""}),(0,h.jsx)("meta",{itemprop:"interactionCount",content:null!==($=null===e||void 0===e||null===(A=e.event)||void 0===A?void 0:A.total_views)&&void 0!==$?$:0}),(0,h.jsxs)("video",{ref:I,className:"whatmore-video-player-muted",width:D,height:O,preload:"metadata",loop:!0,playsInline:!0,poster:"57939755089"==W?"":e.poster,muted:null===(P=e.isVideoMuted)||void 0===P||P,style:{backgroundColor:"white",borderRadius:e.borderRadius,objectFit:"cover"},children:[(0,h.jsx)("track",{src:"data:,",kind:"captions",srclang:"en",label:"english_captions"}),(0,h.jsx)("source",{src:e.url,type:"video/mp4"}),(0,h.jsx)("source",{src:(0,u.yD)(e.url),type:"video/mp4"})]})]}):(0,h.jsx)("div",{width:D,height:O,ref:e=>{e&&e.style.setProperty("display","block","important")}})})};var p=function(e){var t,n,d,p,v,f,w,g,y,b,x,S,j,_,C,T,E,$,A,P,I,k,N,L;const[W,O,D]=(0,i.A)({triggerOnce:!0}),R=(0,c.Xd)("whatmoreShopId"),q=(0,o.useRef)(null),M=(0,o.useRef)(null);if((0,o.useEffect)(()=>{if(M.current&&clearTimeout(M.current),q.current)if(e.isPlaying){if("99423519085"===R){var t;const n=q.current;n.muted=null===(t=e.isVideoMuted)||void 0===t||t,n.playsInline=!0,n.autoplay=!0;const o=()=>{n.paused&&n.play().catch(()=>{})};return o(),n.addEventListener("loadeddata",o),n.addEventListener("canplay",o),()=>{n.removeEventListener("loadeddata",o),n.removeEventListener("canplay",o)}}if("81308287252"===R){if(!navigator.getAutoplayPolicy||"disallowed"!==navigator.getAutoplayPolicy("mediaelement")){const t=q.current.play();void 0!==t&&t.catch(()=>{M.current=setTimeout(()=>{q.current&&e.isPlaying&&q.current.play().catch(()=>{})},500)})}}else q.current.play()}else q.current.pause();return()=>{M.current&&clearTimeout(M.current)}},[e.isPlaying,O,R]),(0,s.I)(e.event))return(0,h.jsx)(l.A,{height:e.height,width:e.width,url:e.url,isPlaying:e.isPlaying,timeUpdateCallback:e.timeUpdateCallback});if("75649450207"===R)return(0,h.jsx)(l.A,{height:e.height,width:e.width,url:(0,u.tQ)(e.event),isPlaying:e.isPlaying,timeUpdateCallback:e.timeUpdateCallback});const F=null!==(t=e.pauseFromPlayTimeInMs)&&void 0!==t?t:200,z=(0,r.s)(null!==e&&void 0!==e&&e.event?(0,u.tQ)(e.event):void 0);if((0,a.MN)())return(0,h.jsx)(m,{isVideoMuted:e.isVideoMuted,event:null===e||void 0===e?void 0:e.event,borderRadius:e.borderRadius,height:"100%",width:"100%",poster:z,url:(0,r.s)(e.url),isPlaying:e.isPlaying,pauseFromPlayTimeInMs:F});const B=null!==(n=e.height)&&void 0!==n?n:"100%",V=null!==(d=e.width)&&void 0!==d?d:"100%";return(0,h.jsx)("div",{ref:W,style:{width:B,height:V,overflow:"hidden",display:"flex",alignItems:"center"},children:O||e.eagerLoad||"51394281658"==R||"8968077397"==R?(0,h.jsxs)("div",{itemScope:!0,itemtype:"https://schema.org/VideoObject",style:{width:B,height:V},children:[(0,h.jsx)("meta",{itemprop:"name",content:null!==(p=null!==(v=null===e||void 0===e||null===(f=e.event)||void 0===f||null===(w=f.products)||void 0===w||null===(g=w[0])||void 0===g?void 0:g.title)&&void 0!==v?v:null===e||void 0===e||null===(y=e.event)||void 0===y?void 0:y.event_id)&&void 0!==p?p:"0"}),(0,h.jsx)("meta",{itemprop:"description",content:null!==(b=null===e||void 0===e||null===(x=e.event)||void 0===x||null===(S=x.products)||void 0===S||null===(j=S[0])||void 0===j?void 0:j.title)&&void 0!==b?b:"whatmore-event"}),(0,h.jsx)("meta",{itemprop:"thumbnailUrl",content:null!==(_=null===e||void 0===e||null===(C=e.event)||void 0===C?void 0:C.poster_image)&&void 0!==_?_:""}),(0,h.jsx)("meta",{itemprop:"contentUrl",content:null!==(T=null===e||void 0===e||null===(E=e.event)||void 0===E?void 0:E.thumbnail_image)&&void 0!==T?T:""}),(0,h.jsx)("meta",{itemprop:"uploadDate",content:null!==($=`${null===e||void 0===e||null===(A=e.event)||void 0===A?void 0:A.scheduled_date}T00:00:00Z`)&&void 0!==$?$:""}),(0,h.jsx)("meta",{itemprop:"duration",content:"PT3S"}),(0,h.jsx)("meta",{itemprop:"embedUrl",content:null!==(P=null===e||void 0===e||null===(I=e.event)||void 0===I?void 0:I.thumbnail_image)&&void 0!==P?P:""}),(0,h.jsx)("meta",{itemprop:"interactionCount",content:null!==(k=null===e||void 0===e||null===(N=e.event)||void 0===N?void 0:N.total_views)&&void 0!==k?k:0}),(0,h.jsxs)("video",{ref:q,className:"whatmore-video-player-muted",width:V,height:B,preload:"metadata",loop:!0,playsInline:!0,autoPlay:!0,muted:null===(L=e.isVideoMuted)||void 0===L||L,poster:"57939755089"==R?"":z,style:{backgroundColor:"white",objectFit:"cover"},children:[(0,h.jsx)("track",{src:"data:,",kind:"captions",srclang:"en",label:"english_captions"}),(0,h.jsx)("source",{src:(0,r.s)(e.url),type:"video/mp4"}),(0,h.jsx)("source",{src:(0,u.yD)(e.url),type:"video/mp4"})]})]}):(0,h.jsx)("div",{width:V,height:B,ref:e=>{e&&e.style.setProperty("display","block","important")}})})}},5497:function(){},5534:function(e,t,n){n.d(t,{h:function(){return d}});var o,i=n(1477),r=n(481);const a=null!==(o="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==o&&o,s=(0,i.lazy)(()=>(a&&console.log(`[${(new Date).toLocaleTimeString()}] \ud83c\udfac EventClickComponent chunk loading...`),Promise.all([n.e(252),n.e(712),n.e(12),n.e(260)]).then(n.bind(n,8258))));let l=null;function d(){return l?a&&console.log(`[${(new Date).toLocaleTimeString()}] \u26a1 EventClickComponent already preloaded/preloading`):(a&&console.log(`[${(new Date).toLocaleTimeString()}] \ud83d\udd04 Preloading EventClickComponent on hover...`),l=Promise.all([n.e(252),n.e(712),n.e(12),n.e(260)]).then(n.bind(n,8258)).then(e=>(a&&console.log(`[${(new Date).toLocaleTimeString()}] \u2705 EventClickComponent preload complete`,e),e)).catch(e=>{throw console.error(`[${(new Date).toLocaleTimeString()}] \u274c EventClickComponent preload failed:`,e),e})),l}t.A=function(e){return(0,r.jsx)(s,{...e})}},5568:function(e,t,n){var o=n(1477);function i(){return[window.innerHeight,window.innerWidth]}t.A=function(){var[e,t]=i();const[n,r]=(0,o.useState)([e>t?"portrait":"landscape",e,t]);return(0,o.useLayoutEffect)(()=>{function e(){var[e,t]=i();r(e>t?["portrait",e,t]:["landscape",e,t])}return window.addEventListener("resize",e),window.addEventListener("orientationchange",e),screen.orientation&&screen.orientation.addEventListener("change",e),e(),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e),screen.orientation&&screen.orientation.removeEventListener("change",e)}},[]),n}},5660:function(e,t,n){var o=n(1477);t.A=({triggerOnce:e=!1,root:t=null,rootMargin:n="0px",threshold:i=0}={})=>{const[r,a]=(0,o.useState)(!1),[s,l]=(0,o.useState)(null),d=(0,o.useRef)(null);return(0,o.useEffect)(()=>{const o=new IntersectionObserver((t,n)=>{t.forEach(t=>{l(t),t.isIntersecting?(a(!0),e&&n.disconnect()):e||a(!1)})},{root:t,rootMargin:n,threshold:i});return d.current&&o.observe(d.current),()=>{o.disconnect()}},[e,t,n,i]),[d,r,s]}},5677:function(e,t,n){n.d(t,{A:function(){return h}});var o=n(1214),i=n(1477);function r(e){if(!e)return{};var t={};return Array.from(e.attributes).forEach(e=>{var n;t[e.name]=(n=e.value,isNaN(+n)?n:+n)}),t}function a(...e){try{var t;const n=document.getElementById("whatmorePreviewMode");if(!n)return null;const o=null===e||void 0===e?void 0:e[0];if(!o)return!0;let i={};return i=o.includes("function")?{}:r(n),null!==(t=i)&&void 0!==t&&t[o]?i[o]:null}catch(n){return null}}var s=function({disablePreview:e=!1}={}){var t,n,o=e?window.innerHeight:null!==(t=a("height-wh"))&&void 0!==t?t:window.innerHeight,r=e?window.innerWidth:null!==(n=a("width-wh"))&&void 0!==n?n:window.innerWidth,[s,l]=[o,r];const[d,c]=(0,i.useState)([s>l?"portrait":"landscape",s,l]);return(0,i.useLayoutEffect)(()=>{function t(){var t,n,o=e?window.innerHeight:null!==(t=a("height-wh"))&&void 0!==t?t:window.innerHeight,i=e?window.innerWidth:null!==(n=a("width-wh"))&&void 0!==n?n:window.innerWidth,[r,s]=[o,i];c(r>s?["portrait",r,s]:["landscape",r,s])}return window.addEventListener("resize",t),window.addEventListener("orientationchange",t),screen.orientation&&screen.orientation.addEventListener("change",t),t(),()=>{window.removeEventListener("resize",t),window.removeEventListener("orientationchange",t),screen.orientation&&screen.orientation.removeEventListener("change",t)}},[]),d},l=(n(5547),n(4234));const d=(0,o.Xd)("whatmoreShopId");(0,o.Xd)("whatmoreLoggingActive");function c(e){const t="true"==localStorage.getItem("whatmoreActivateLogs");if("51273072796"==d||"64967540952"==d)return[document.documentElement.clientHeight,document.documentElement.clientWidth];let n=null;if(e){const t=document.getElementById(e);t&&(n=t.closest(".whatmore-base"))}n||(n=document.querySelector('.whatmore-base:has(.whatmore-widget[data-wh="carousel"])'),n||(n=document.querySelector('.whatmore-base:has(.whatmore-widget[data-wh="collection"])')));let o=n;for(;o&&o!==document;)if(o=o.parentElement,o&&!o.classList.contains("whatmore-base")){t&&console.log("currentElement : ",o);break}let i=window.innerWidth;if(o){const e=o.getBoundingClientRect().width;if(t&&console.log("parentWidth : ",e),e>0){t&&console.log("good case");const n=window.getComputedStyle(o);i=e-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0)}o&&0==e&&(o.style.setProperty("width","100%","important"),t&&console.log("Set currElement width to 100% !important"))}return t&&console.log("final width : ",i),[window.innerHeight,i]}var u=function(){const{whatmoreRootId:e}=(0,i.useContext)(l.AppContext)||{};var[t,n]=c(e);const[o,r]=(0,i.useState)([t>n?"portrait":"landscape",t,n]);return(0,i.useLayoutEffect)(()=>{function t(){var[t,n]=c(e);r(t>n?["portrait",t,n]:["landscape",t,n])}return window.addEventListener("resize",t),window.addEventListener("orientationchange",t),screen.orientation&&screen.orientation.addEventListener("change",t),t(),()=>{window.removeEventListener("resize",t),window.removeEventListener("orientationchange",t),screen.orientation&&screen.orientation.removeEventListener("change",t)}},[]),o};var h=function(e){var t;const n=(0,o.Xd)("isWhatmorePreviewMode"),i=u(),r=s({disablePreview:null!==(t=null===e||void 0===e?void 0:e.disablePreview)&&void 0!==t&&t});return(0,o.Xd)("whatmoreLoggingActive")&&console.log("mode : ",i),n?r:i}},6126:function(e,t,n){n.d(t,{A:function(){return N}});var o=n(1477),i=n(5677),r=n(1214),a=(n(564),n(5277),n(4548),n(6376),n(2446),n(878),n(621),n(6374)),s=n(4234),l=(n(897),n(3358)),d=n(6884),c=n(5547),u=n(5660),h=n(4475),m=n(4018),p=n(6532),v=n(4338),f=n(7900),w=n(481);var g=function(e){var t;const[n]=(0,r.QN)("whatmoreShopId"),i=e.isMuted,{whatmoreWidgetSourceDetails:a}=(0,o.useContext)(s.AppContext),l=a.templateType,d=(0,f.l2)(l),u=null!==(t=e.iconSize)&&void 0!==t?t:30;function h(t){e.onToggle(t)}return!0===(0,c.GZ2)(n)?(0,w.jsx)(w.Fragment,{}):(0,w.jsx)("div",{style:{height:"fit-content",cursor:"pointer"},children:i?(0,w.jsx)(v.A,{sx:{color:"white",fontSize:d?1.3*u:u,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:e=>{h(e)}}):(0,w.jsx)(p.A,{sx:{color:"white",fontSize:d?1.3*u:u,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:e=>{h(e)}})})},y=n(6720),b=n(3168),x=n(7372),S=n(6431),j=n(2058),_=n(428),C=n(9888),T=n(7156),E=n(221),$=n(5405),A=n(6380),P=n(8762);function I(e){const[t,n]=(0,o.useState)(e.initialMuteState),i=e.events,a=e.activeEventIndex,s=e.setActiveEventIndex,u=(0,r.Xd)("whatmoreShopId"),h="portrait"===e.mode;function m(o){o.stopPropagation(),n(!t),(0,b.MN)()&&((0,A._)()?(0,x.bo)():(0,P.bi)()),e.onMuteToggle()}const p=e.event;return(0,w.jsxs)("div",{style:{position:(0,c.D7t)(u)?"absolute":"relative",top:(0,c.D7t)(u)?0:"",zIndex:1,bottom:(0,c.D7t)(u)?"":"100%",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:[(0,w.jsxs)("div",{className:"banner-event-overlay",style:{display:"flex",position:"relative",height:"100%",paddingRight:"1%",paddingLeft:"1%",paddingTop:"1%",backgroundImage:"linear-gradient(to top, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0.3))"},children:["video"==p.event_type&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("div",{style:{width:"100%"},onClick:e=>{(0,c.OC6)(u)||m(e)}}),(0,c.qLA)(u)&&(0,w.jsx)(g,{isMuted:t,onToggle:e=>{m(e)}})]}),i.length>1&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("div",{classname:"banner-navigation-overlay-left",style:{position:"absolute",left:"10px",top:"50%",transform:"translateY(-50%)",backgroundColor:"transparent",borderRadius:"50%",zIndex:2,border:"2px solid white",padding:"2px",cursor:"pointer"},onClick:e=>{e.stopPropagation(),s(0===a?i.length-1:a-1)},children:(0,w.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:"6px"},children:(0,w.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"20px",color:"#252525",height:"20px"},children:(0,w.jsx)(l.A,{})})})}),(0,w.jsx)("div",{classname:"banner-navigation-overlay-right",style:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)",backgroundColor:"transparent",borderRadius:"50%",zIndex:2,border:"2px solid white",padding:"2px",cursor:"pointer"},onClick:e=>{e.stopPropagation(),s(a===i.length-1?0:a+1)},children:(0,w.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:"6px"},children:(0,w.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"20px",color:"#252525",height:"20px",textAlign:"center"},children:(0,w.jsx)(d.A,{})})})}),(0,c.JiT)(u)&&(0,w.jsx)("div",{style:{display:"flex",position:"absolute",bottom:"7%",left:"50%",transform:"translateX(-50%)",gap:"24px",zIndex:1},children:i.map((e,t)=>{const n=t===a;return(0,w.jsx)("button",{onClick:e=>{e.stopPropagation(),s(t)},style:{width:n?"25px":h?"12px":"14px",height:h?"12px":"14px",borderRadius:n?"10px":"50%",backgroundColor:n?(0,c.z1s)(u):"#f8eeec",boxShadow:"0px 0px 8px rgba(0, 0, 0, 0.3)"}},t)})})]})]}),!(0,c.OC6)(u)&&(0,w.jsx)("div",{style:{width:"100%",height:"100%"},onClick:m})]})}var k=function(e){var t;const[n,a,l]=(0,i.A)(),[d,p]=(0,o.useState)(!0),v=(0,r.Xd)("whatmoreVideoTileSize"),[f,g,b]=(0,u.A)({triggerOnce:!1}),{whatmoreWidgetSourceDetails:x,whatmoreWidgetIdentity:A}=(0,o.useContext)(s.AppContext),P=(0,r.Xd)("whatmoreShopId"),k=e.events,N=e.activeEventIndex,L=e.setActiveEventIndex,W=k[N],O=(0,m.lP)(W),D=(0,m.cb)(W),R=(0,m.tQ)(W,n);if((0,o.useEffect)(()=>{_.Sn.forEach(e=>{var t;if(!(null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-banner-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-banner-a"]')))return;e&&(e.style.minHeight="0px")})},[]),"portrait"===n&&!O)return(0,w.jsx)(w.Fragment,{});if("landscape"===n&&!D)return(0,w.jsx)(w.Fragment,{});const q=(0,h.s)("portrait"===n?O:D),M=v/100*(0,c.igk)(P),F=v/100*(0,c.Y_l)(P),z=(0,S.i)((0,c.gcj)(P),A,"portrait"===n),B=null!==z&&void 0!==z?z:"portrait"===n?(0,c.G0Q)(P):(0,c.ga9)(P),V="portrait"===n?l*M:l*F,X=(0,c.D7t)(P),Q=X?l*B:V*B,U=(W.cta||[]).filter(e=>(null===e||void 0===e?void 0:e.cta_link)&&!/whatmore\.ai/i.test(e.cta_link)).sort((e,t)=>{var n,o;return(null!==(n=e.cta_id)&&void 0!==n?n:0)-(null!==(o=t.cta_id)&&void 0!==o?o:0)})[0]||null,H=null!=(null===U||void 0===U?void 0:U.cta_link);return(0,w.jsxs)("div",{ref:f,onClick:()=>{(0,C.registerClickEvent)({userInteractionType:T.O.BANNER_WIDGET_CLICKED,widgetSourceDetails:x,event:k[N]}),(0,c.OC6)(P)&&null!==U&&void 0!==U&&U.cta_link&&window.open(U.cta_link,"_self")},className:"wht-banner-event-tile",style:{position:"relative",margin:"0 auto",width:X?"100%":V,height:Q,borderWidth:(0,c.YcK)(P),borderColor:(0,c.Fwt)(P),overflow:"hidden",cursor:"pointer"},children:["28273541192"===P?(0,w.jsx)($.A,{height:"100%",width:"100%",url:q,isPlaying:g,event:{...W,poster_image:R},isVideoMuted:!g||d,source:E.N.BANNER}):(0,w.jsx)(y.A,{height:"100%",width:"100%",url:q,isPlaying:g,event:{...W,poster_image:R},isVideoMuted:!g||d,setDuration:e.setDuration,source:E.N.BANNER}),(0,w.jsx)(I,{isCTAPresent:H,events:k,activeEventIndex:N,setActiveEventIndex:L,event:W,mode:n,onMuteToggle:()=>p(!d),initialMuteState:d}),(0,c.XYM)(P)&&(null===W||void 0===W||null===(t=W.cta)||void 0===t?void 0:t.length)>1&&U&&(0,w.jsx)("div",{style:{position:"absolute",zIndex:1,bottom:"10%",left:"50%",transform:"translateX(-50%)"},className:"whatmore-ios-css-relative-fix",children:(0,w.jsx)(j.A,{isBanner:!0,event:W,cta:U,fontFactor:.6})})]})};var N=function(e){const{whatmoreRootId:t}=(0,o.useContext)(s.AppContext),[n,l]=(0,o.useState)(0),d=e.events,[c,u]=(0,o.useState)(-1),[h]=(0,r.QN)("whatmoreShopId"),[m]=(0,i.A)();let p;return(0,o.useEffect)(()=>{p&&clearInterval(p);const e="video"===d[n].event_type,t=e?1e3*c:6e3;return e?-1!=c&&(p=setInterval(()=>{l(e=>e===d.length-1?0:e+1)},t)):p=setInterval(()=>{l(e=>e===d.length-1?0:e+1)},t),()=>{clearInterval(p)}},[c,n]),(0,w.jsx)("div",{className:"whatmore-banner-events",style:{height:"60183543963"===h&&"portrait"==m?"200px":void 0},children:(0,w.jsx)(a.h.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:(0,w.jsx)(k,{activeEventIndex:n,events:d,setActiveEventIndex:l,setDuration:u})})})}},6267:function(){},6374:function(e,t,n){n.d(t,{h:function(){return o}});const o=(0,n(1477).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},6376:function(){},6380:function(e,t,n){function o(){const e=navigator.userAgent||navigator.vendor||window.opera;if(!/iPhone/.test(e))return!1;const{width:t,height:n}=window.screen;return[{width:320,height:480},{width:320,height:568},{width:375,height:667},{width:414,height:736},{width:375,height:812},{width:414,height:896},{width:360,height:780},{width:390,height:844},{width:428,height:926},{width:393,height:852},{width:430,height:932},{width:402,height:874},{width:440,height:956},{width:402,height:874},{width:440,height:956}].some(e=>e.width===t&&e.height===n||e.width===n&&e.height===t)}n.d(t,{_:function(){return o}})},6441:function(e,t,n){n.d(t,{U:function(){return i}});var o=n(1214);function i(){const e=(0,o.Xd)("whatmoreShopId");return!!(void 0!=window.Shopify||window.location.href.includes("shopify")||window.location.href.includes("localhost:")||window.location.href.includes("dashboard.whatmore.live")||window.location.href.includes("app.whatmore.live")||window.location.href.includes("consumer.whatmore.live")||window.location.href.includes("trycloudflare.com"))&&!e.includes("STR")}},6720:function(e,t,n){n.d(t,{A:function(){return x}});var o=n(1477),i=n(9128),r=n(9795),a=n(3477),s=n(9258),l=n(4475),d=n(481);var c=function(e){var t,n,i;const[r,a]=(0,o.useState)(!1),c=o.useRef(0),u=(0,o.useRef)(null),h=null!==(t=e.timeUpdateCallback)&&void 0!==t?t:()=>{},m=(0,l.s)((null===e||void 0===e?void 0:e.posterImage)||e.url),p=null!==(n=e.height)&&void 0!==n?n:"100%",v=null!==(i=e.width)&&void 0!==i?i:"100%";return(0,o.useEffect)(()=>{c.current=0;const e=setInterval(()=>{c.current=c.current+.03,u.current&&h(c.current,5),c.current>=5&&(c.current=0)},30);return()=>{clearInterval(e)}},[e.isPlaying]),(0,d.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:v,height:"100%",overflow:"hidden"},children:[(0,d.jsx)("div",{style:{width:r?"100%":"0px",height:r?"100%":"0px"},children:(0,d.jsx)("img",{ref:u,src:(0,l.s)(e.url),style:{objectFit:"cover",height:"100%",width:v,backgroundColor:"white"},alt:"image player",onLoad:()=>{a(!0)}})}),!r&&m?(0,d.jsx)("img",{src:m,style:{height:"100%",width:v,objectFit:"cover"},alt:"Loading preview"}):r?(0,d.jsx)(d.Fragment,{}):(0,d.jsx)(s.A,{width:v,height:p})]})},u=n(1214),h=n(7372),m=n(221),p=n(5547),v=n(4040),f=(n(5497),n(4234)),w=n(4018);function g(e){var t,n,i;const[a,l]=(0,r.A)(),[c,g]=(0,o.useState)(o.useRef()),y=e.posterImage,[b,x]=(0,u.QN)("whatmoreVideoPlayerPoolBlessed"),[S,j]=(0,o.useState)(!0),[_,C]=(0,o.useState)(!1),T=e.timeUpdateCallback,{whatmoreIsPreviewMode:E}=(0,o.useContext)(f.AppContext),$=null!==(t=e.isVideoMuted)&&void 0!==t?t:a,A=null!==(n=e.height)&&void 0!==n?n:"100%",P=null!==(i=e.width)&&void 0!==i?i:"100%",I=(0,u.Xd)("whatmoreShopId");(0,o.useLayoutEffect)(()=>{if(c.current&&b)if(0==c.current.children.length){const n=(0,w.Cr)(e.url);(t=(0,h.Z4)(c.current,e.url,$||!e.isPlaying,e.isPlaying,n)).setAttribute("playsinline","true"),t.setAttribute("preload","auto"),t.addEventListener("loadeddata",()=>{j(!1)}),T&&t.addEventListener("timeupdate",e=>{if(!t)return;const n=t.currentTime,o=t.duration;T(Number.isFinite(n)?n:0,Number.isFinite(o)?o:0)})}else{var t;(t=c.current.children[0]).muted=$||!e.isPlaying,e.isPlaying?t.play():(t.pause(),(0,p.fwF)(I)&&e.source==m.N.CAROUSEL_EVENT_OPENED&&(!e.isPlaying&&t.play(),setTimeout(()=>{!e.isPlaying&&t.pause()},(0,v.n)()?1900:800)))}},[$,e.isPlaying,b,S]),(0,o.useLayoutEffect)(()=>()=>{c.current&&0!=c.current.children.length&&(0,h.rq)(c.current)},[]);const k=(0,u.Xd)("whatmoreLandingLocationType");return(0,d.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:P,height:A,overflow:"hidden",backgroundColor:E?(0,p.KVz)(I):(0,p.QSX)(I),filter:e.showQuestion?"blur(24px)":""},children:[(0,d.jsx)("div",{ref:c,style:{width:S?"0px":"100%",height:S?"0px":E?(0,p.tbf)(I):(0,p.CBm)(I)&&"product"==k?"auto":(0,p.R7q)(I)},className:"whatmore-video-player-ios-holder"}),"40273707171"!==I&&S&&_?(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("div",{style:{width:"100%",height:"100%",position:"relative"},children:(0,d.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,d.jsx)("img",{src:y,style:{height:"100%",width:P,animation:e.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})})})}):S&&!_&&(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)("div",{style:{width:"100%",height:"100%",position:"relative"},children:[(0,d.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,d.jsx)("img",{src:y,height:"100%",width:P,onLoad:()=>{C(!0)},style:{animation:e.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})}),(0,d.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,d.jsx)(s.A,{width:P,height:A,style:{position:"absolute",top:"50%",left:"50%",opacity:"0.6"}})})]})})]})}var y=function(e){var t;return(0,d.jsx)(g,{height:e.height,width:e.width,url:e.url,isPlaying:e.isPlaying,timeUpdateCallback:e.timeUpdateCallback,isVideoMuted:null!==(t=e.isVideoMuted)&&void 0!==t?t:null,source:e.source,posterImage:e.posterImage,showQuestion:e.showQuestion})};function b(e){var t,n,i;const[a,c]=(0,r.A)(),[h,g]=(0,o.useState)(!1),[y,b]=(0,o.useState)(!1),x=e.setDuration,S=(0,o.useRef)(null),j=(0,u.Xd)("whatmoreShopId"),_=e.timeUpdateCallback,{whatmoreIsPreviewMode:C}=(0,o.useContext)(f.AppContext),T=(0,u.Xd)("whatmoreLandingLocationType"),E=null!==(t=e.height)&&void 0!==t?t:"100%",$=null!==(n=e.width)&&void 0!==n?n:"100%",A=null!==(i=e.isVideoMuted)&&void 0!==i?i:a,P=null===e||void 0===e?void 0:e.posterImage;return(0,o.useEffect)(()=>{const t=S.current;if(t&&(e.isPlaying?t.paused&&t.play():t.pause(),_)){const e=()=>{if(!S.current)return;const e=S.current.currentTime,t=S.current.duration;_(Number.isFinite(e)?e:0,Number.isFinite(t)?t:0)};return t.addEventListener("timeupdate",e),()=>t.removeEventListener("timeupdate",e)}},[e.isPlaying,e.url]),(0,d.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:$,height:E,overflow:"hidden",backgroundColor:C?(0,p.KVz)(j):(0,p.QSX)(j),filter:null!==e&&void 0!==e&&e.showQuestion?"blur(24px)":""},children:[(0,d.jsx)("div",{style:{width:h?"100%":"0px",height:h?C?(0,p.tbf)(j):(0,p.CBm)(j)&&"product"==T?"auto":(0,p.R7q)(j):"0px"},children:(0,d.jsxs)("video",{ref:S,className:"whatmore-video-player",preload:"auto",loop:!0,src:"banner"==e.source?e.url:void 0,playsInline:!0,muted:!(!A&&e.isPlaying),onLoadedData:()=>{g(!0),e.isPlaying&&S.current&&S.current.play(),(0,p.fwF)(j)&&e.source==m.N.CAROUSEL_EVENT_OPENED&&(!e.isPlaying&&S.current&&S.current.play(),setTimeout(()=>{!e.isPlaying&&S.current&&S.current.pause()},(0,v.n)()?1900:800))},onLoadedMetadata:()=>{S.current&&x&&x(S.current.duration)},poster:P,children:[(0,d.jsx)("track",{src:"data:,",kind:"captions",srclang:"en",label:"english_captions"}),(0,d.jsx)("source",{src:(0,l.s)(e.url),type:"video/mp4"}),(0,d.jsx)("source",{src:(0,w.Cr)(e.url),type:"video/mp4"})]})}),"40273707171"!==j&&!h&&y?(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("div",{style:{width:"100%",height:"100%",position:"relative"},children:(0,d.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,d.jsx)("img",{src:P,style:{height:"100%",width:$,objectFit:"cover",animation:e.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})})})}):!h&&!y&&(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)("div",{style:{width:"100%",height:"100%",position:"relative"},children:[(0,d.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,d.jsx)("img",{src:P,height:"100%",width:$,onLoad:()=>{b(!0)},style:{animation:e.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})}),(0,d.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,d.jsx)(s.A,{width:$,height:E,style:{position:"absolute",top:"50%",left:"50%",opacity:"0.6"}})})]})})]})}var x=function(e){var t,n,r,s,l;return(0,i.I)(e.event)?(0,d.jsx)(c,{height:e.height,width:e.width,url:e.url,isPlaying:e.isPlaying,timeUpdateCallback:e.timeUpdateCallback,posterImage:null===(r=e.event)||void 0===r?void 0:r.poster_image}):1==(0,o.useContext)(a.p).isIOS&&1==(0,u.Xd)("whatmoreVideoPlayerPoolBlessed")&&"banner"!=e.source?(0,d.jsx)(y,{height:e.height,width:e.width,url:e.url,isPlaying:e.isPlaying,timeUpdateCallback:e.timeUpdateCallback,isVideoMuted:null!==(s=e.isVideoMuted)&&void 0!==s?s:null,source:e.source,posterImage:null===(l=e.event)||void 0===l?void 0:l.poster_image,showQuestion:null===e||void 0===e?void 0:e.question}):(0,d.jsx)(b,{height:e.height,width:e.width,url:e.url,isPlaying:e.isPlaying,timeUpdateCallback:e.timeUpdateCallback,isVideoMuted:null!==(t=e.isVideoMuted)&&void 0!==t?t:null,setDuration:e.setDuration,source:e.source,posterImage:null===(n=e.event)||void 0===n?void 0:n.poster_image,showQuestion:null===e||void 0===e?void 0:e.question})}},6775:function(e,t,n){var o=n(1214),i=n(5677),r=n(3391),a=n(5547);t.A=function(e){const[t,n,s]=(0,i.A)(),[l]=(0,o.QN)("whatmoreLandscapePadding"),[d]=(0,o.QN)("whatmoreShopId"),[c]=(0,o.QN)("whatmoreVideoTileSize"),[u]=(0,o.QN)("whatmoreVideoTileSizePortrait"),h=s>n,m=s>=481,p=null!==e&&void 0!==e&&e.isEmbed?60:"portrait"==t?u:c,v=!("portrait"!=t||!m),f=p/100*1.3*.5,w=p/100;var g=Math.min(s,n),[y,b,x,S]=[.6*g*(16/9),.6*g,1.4,0];function j(e){return Math.round(10*e)/10}var _={DEVICE_TYPE:r.b4,DEVICE_MODE:r.tn};if(h){const e=b*f,t=y*f;[y,b,x,S]=[t,e,(s-2*l-2*(0,a.$du)(d))/(1.1*e),l],_[r._]=r.$S,_[r.dl]=r.nN}else if(v){var C=.8*b,T=.8*y;"portrait"==t?(C*=w,T*=w,[y,b,x,S]=[T,C,j(s/(1.2*C)),0],_[r._]=r.vF,_[r.dl]=r.tn):([y,b,x,S]=[T,C,(s-2*l)/(1.1*C),l],_[r._]=r.vF,_[r.dl]=r.nN)}else{C=b,T=y;"portrait"==t?(C=C*w*.9,T=T*w*.9,[y,b,x,S]=[T,C,j(s/(1.15*C)),0],_[r._]=r.b4,_[r.dl]=r.tn):(C=.7*b,T=.7*y,[y,b,x,S]=[T,C,(s-2*l)/(1.1*C),l],_[r._]=r.b4,_[r.dl]=r.nN)}return[y,b,x,S,_]}},6984:function(e,t,n){function o(e,t){let n=0;let o=new MutationObserver(function(){document.querySelector("."+e)?(t(),o.disconnect()):0==n&&(n=1,setTimeout(()=>{t(),o.disconnect()},8e3))});o.observe(document.body,{childList:!0,subtree:!0})}n.d(t,{H:function(){return o}})},7372:function(e,t,n){n.d(t,{F5:function(){return i},Pc:function(){return a},Z4:function(){return s},bo:function(){return l},rq:function(){return d}});var o=n(1214);const i=6;function r(){const e=(0,o.Xd)("whatmoreVideoPlayerPool");var t=document.createElement("video");return t.setAttribute("class","whatmore-video-player whatmore-main-video-player-from-pool"),t.setAttribute("width","100%"),t.setAttribute("src","https://whatmore-other-assets.b-cdn.net/whatmore/dummy_for_video_pool_3s_muted_11kb.mp4"),t.muted=!0,t.setAttribute("height","100%"),t.setAttribute("preload","auto"),t.setAttribute("loop",""),t.setAttribute("playsinline",""),t.setAttribute("x-webkit-airplay","allow"),t.controls=!1,e.appendChild(t),t}const a=function(e){for(let t=1;t<=e;t++)r();(0,o.t2)("whatmoreVideoPlayerPoolInitiated",!0)};const s=function(e,t,n,i,r){(0,o.Xd)("whatmoreVideoPlayerPool");const a=function(e,t,n){var i=(r=(0,o.Xd)("whatmoreVideoPlayerPool").children,r.length>0?r[0]:null);var r;if(!i)throw new Error("Whatmore :: not enough blessed videos available in video pool.");return e&&(e.includes(".m3u8")||e.includes("m3u8"))?i.canPlayType("application/vnd.apple.mpegurl")&&i.setAttribute("src",e):i.setAttribute("src",e),i.muted=t,n||i.pause(),i}(t,n,i);return e.innerHTML="",e.appendChild(a),a},l=async function(){const e=(0,o.Xd)("whatmoreVideoPlayerPool");(0,o.Xd)("whatmoreVideoPlayerPoolInitiated")||a(i);var t=[];for(let o=0;o<e.children.length;o++){let i=e.children[o];i.muted=!0,i.setAttribute("playsinline","true"),i.setAttribute("webkit-playsinline","true"),i.setAttribute("playsInline","true");var n=i.play().then(e=>(i.pause(),e)).catch(e=>(console.warn("Whatmore :: Blessing failed for video element, retrying...",e),i.volume=0,i.play().then(()=>{i.pause()}).catch(e=>{throw console.error("Whatmore :: Retry blessing failed",e),e})));t.push(n)}await Promise.all(t).then(e=>{(0,o.t2)("whatmoreVideoPlayerPoolBlessed",!0)}).catch(e=>{console.error("Whatmore :: Error while blessing "+e.message),(0,o.t2)("whatmoreVideoPlayerPoolBlessed",!0)})},d=function(e){const t=(0,o.Xd)("whatmoreVideoPlayerPool"),n=e.children[0];n.muted=!0,!n.paused&&n.pause(),t.appendChild(n)}},7462:function(e,t,n){var o=n(481);t.A=function(e){var t,n,i;const r=null!==(t=e.height)&&void 0!==t?t:"100%",a=null!==(n=e.width)&&void 0!==n?n:"100%",s=null!==(i=e.borderRadius)&&void 0!==i?i:"10px";return(0,o.jsx)("div",{style:{height:r,width:r,borderRadius:s,overflow:"hidden",minHeight:r,minWidth:a,maxHeight:r,maxWidth:a},children:(0,o.jsx)("div",{style:{minHeight:r,minWidth:a},height:"100%",width:"100%",className:"whatmore-shimmer"})})}},7777:function(e,t,n){n.d(t,{A:function(){return _}});var o=n(4362),i=n(1477),r=n(9252),a=n(5405),s=n(3391),l=n(1214),d=n(6775);var c=function(e){const[t,n,o,i,r]=(0,d.A)({isEmbed:!0}),[a]=(0,l.QN)("whatmoreEmbedAppVideoPlayerSizePortrait"),[c]=(0,l.QN)("whatmoreEmbedAppVideoPlayerSizeLandscape"),u=r[s.dl]===s.nN?c/100:a/100*1.2;return[t*u,n*u,r]},u=n(1395),h=n.n(u),m=n(9611),p=(n(6376),n(2446),n(5547)),v=n(481);var f=({size:e,color:t="rgba(255, 255, 255, 0.9)"})=>(0,v.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",style:{cursor:"pointer",transition:"all 0.3s ease",filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.5))"},className:"premium-close-icon",children:[(0,v.jsx)("circle",{cx:"12",cy:"12",r:"10",fill:"rgba(0, 0, 0, 0.6)",stroke:"rgba(255, 255, 255, 0.3)",strokeWidth:"1.5",style:{transition:"all 0.3s ease"}}),(0,v.jsx)("path",{d:"M15 9l-6 6M9 9l6 6",stroke:t,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"all 0.3s ease"}})]}),w=n(2169);const g={67841720509:["button.add-to-cart","button[name='add']","#gokwik-buy-now",".shopify-payment-button",".product-dynamic-payment-button"]},y=["#pageheader","page-header",".navigation__tier-1-container",".navigation__tier-1"];function b(e){if(!e)return!1;const t=window.getComputedStyle(e);return"none"!==t.display&&"hidden"!==t.visibility&&0!==parseFloat(t.opacity||"1")&&(e.offsetWidth>0&&e.offsetHeight>0)}function x({whatmoreShopId:e,baseBottom:t,widgetWidth:n,widgetHeight:o,side:r,horizontalPadding:a}){const s=g[e],[l,d]=(0,i.useState)(t),c=(0,i.useRef)({});return c.current={baseBottom:t,widgetWidth:n,widgetHeight:o,side:r,horizontalPadding:a},(0,i.useEffect)(()=>{if(!s||"undefined"===typeof window)return void d(t);let e=null;const n=()=>{e=null;const{baseBottom:t,widgetWidth:n,widgetHeight:o,side:i,horizontalPadding:r}=c.current,a=window.innerWidth,l=window.innerHeight,u="left"===i?r:a-r-n,h=u+n,m=function(e,t){let n=0;for(const o of y)for(const i of document.querySelectorAll(o)){if(!b(i))continue;const o=i.getBoundingClientRect();o.top>.3*t||o.width<.5*e||o.bottom<=0||o.bottom>=.6*t||o.bottom>n&&(n=o.bottom)}return n}(a,l)+8,p=l-t-o,v=l-t;let f,w=null,g=!1;for(const e of s){const t=document.querySelectorAll(e);for(const e of t){if(!b(e))continue;const t=e.getBoundingClientRect();t.width<=0||t.height<=0||(t.right<=u||t.left>=h||t.bottom<=0||t.top>=l||(w=null===w?t.top:Math.min(w,t.top),t.top<v&&t.bottom>p&&(g=!0)))}}f=g&&null!==w&&w-12-o>=m?Math.max(t,l-w+12):t,d(e=>Math.round(e)===Math.round(f)?e:f)},o=()=>{null===e&&(e=window.requestAnimationFrame(n))};o(),window.addEventListener("scroll",o,{passive:!0}),window.addEventListener("resize",o);const i=window.setInterval(o,300);return()=>{null!==e&&window.cancelAnimationFrame(e),window.removeEventListener("scroll",o),window.removeEventListener("resize",o),window.clearInterval(i)}},[s,t]),s?l:t}const S=["65972830359"];function j(){return 8e3+Math.floor(7001*Math.random())}var _=function(e){var t;const n=i.useRef(null);var[d,u,g]=c();(0,l.Xd)("whatmoreUITheme");const[y]=(0,l.QN)("whatmorePrimaryFont"),[b]=(0,l.QN)("whatmoreEmbedAppVideoTitle"),[_]=(0,l.QN)("whatmoreEmbedAppPositionPortrait"),[C]=(0,l.QN)("whatmoreEmbedAppHorizontalPaddingPortrait"),[T]=(0,l.QN)("whatmoreEmbedAppVerticalPaddingPortrait"),[E]=(0,l.QN)("whatmoreEmbedAppPositionLandscape"),[$]=(0,l.QN)("whatmoreEmbedAppHorizontalPaddingLandscape"),[A]=(0,l.QN)("whatmoreEmbedAppVerticalPaddingLandscape"),P=(0,l.Xd)("whatmoreShopId"),I=(0,l.Xd)("isWhatmorePreviewMode");var k=_,N=C,L=T;g[s.dl]===s.nN&&(k=E,N=$,L=A);const[W,O]=(0,i.useState)(["initial",window.pageYOffset]),[D,R]=(0,i.useState)(!1),[q]=(0,i.useState)(j),M=null!==(t=e.isSpotlight)&&void 0!==t&&t,F=g[s.dl]===s.nN?1.3*(0,p.O86)(P):1.1*(0,p.O86)(P),z=M?F:1.1;d*=z,u*=z;const B=M?(0,p.LrK)(P):k,V=M?(0,p._2D)(P):(0,p.GSq)(P),[X,Q]=(0,i.useState)(!M&&(0,p.n8Q)(P)),U=!M&&(0,p.YE3)(P);function H(e,t){O(e),e[1]<=500?R(!1):t!=D&&(R(t),Q(!1))}(0,i.useEffect)(()=>{if(!!(X&&!V))return;const t=requestAnimationFrame(()=>{var t;const o=n.current;if(!o)return;("function"===typeof o.checkVisibility?o.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0}):o.offsetWidth>0||o.offsetHeight>0)&&(null===(t=e.onImpression)||void 0===t||t.call(e))});return()=>cancelAnimationFrame(t)},[X]),(0,i.useEffect)(()=>{let e=window.pageYOffset,t=!1;const n=()=>{const n=window.pageYOffset;Math.abs(n-e)<500||(H([n>e?"scrolled-down":"scrolled-up",n],!0),e=n>0?n:0),t=!1},o=()=>{t||(window.requestAnimationFrame(n),t=!0)};return window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)},[W]),(0,o.j)({ref:n,handler:()=>{H(["scrolled-up",W[1]],!0)}});const J=e.event,G=e.inVideoClick,Y=e.closeClick,Z=.25*u,K=.5*u,ee=S.includes(P),te=Math.max(10,.075*u),ne=1.2*te,oe=(q/1e3).toFixed(1).replace(/\.0$/,"")+"K",ie=.6*u,re="20px",ae=(0,p.GvQ)(P),se=Number(M?(0,p.pUQ)(P):L)||0,le=!(X&&!V)&&D&&V,de=x({whatmoreShopId:P,baseBottom:se,widgetWidth:le?ie:u,widgetHeight:le?ie*(16/9):d,side:B,horizontalPadding:le?16:Number(M?(0,p.D2A)(P):N)||0});var ce=!1,ue=0,he=0;function me(e){ce=e}const pe=(0,v.jsx)("div",{className:"73490825529"==P?"whatmore-root wht-popup":"wht-popup",children:X&&!V?(0,v.jsx)(v.Fragment,{}):D&&V?(0,v.jsx)("div",{style:"left"===B?{left:"16px",bottom:de+"px",position:"fixed",zIndex:ae}:{right:"16px",bottom:de+"px",position:"fixed",zIndex:ae},children:(0,v.jsxs)("div",{onClick:()=>{H(["initial",W[1]],!1)},style:{width:ie+"px",height:ie*(16/9)+"px",borderRadius:re,overflow:"hidden",backgroundColor:"transparent",boxShadow:"0 12px 24px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.2)",backdropFilter:"blur(15px)",cursor:"pointer",transition:"all 0.3s ease",transformStyle:"preserve-3d"},className:"left"===B?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,v.jsx)("div",{style:{overflow:"hidden",borderRadius:re,background:"linear-gradient(145deg, rgba(0,0,0,0.1), rgba(0,0,0,0.2))"},children:(0,v.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:16/9},children:(0,v.jsx)(a.A,{url:J.thumbnail_image,isPlaying:!1,event:J})})}),(0,v.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,v.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,v.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content",padding:"2px",position:"absolute",top:"0",right:"0",zIndex:10},children:(0,v.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",onClick:e=>{e.stopPropagation(),Y()},children:(0,v.jsx)(f,{size:.8*Z})})}),(0,v.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,v.jsx)(m.A,{sx:{color:"white",fontSize:2*Z+"px",filter:"drop-shadow(0 0 2px black);"}})})]})})]})}):(0,v.jsx)(h(),{nodeRef:n,cancel:".activate-button,.close-btn",bounds:I?"parent":"html",defaultClassName:"whatmore-react-draggable",defaultClassNameDragging:"whatmore-react-draggable-dragging",defaultClassNameDragged:"whatmore-react-draggable-dragged",onStart:(e,t)=>{var n,o;n=t.x,o=t.y,ue=n,he=o},onDrag:(e,t)=>{me(!0)},onStop:(e,t)=>{ce&&(Math.abs(t.x-ue)>5||Math.abs(t.y-he)>5)?me(!1):(U&&Y(e),G(J))},children:(0,v.jsx)("div",{ref:n,style:"left"===B?{left:M?(0,p.D2A)(P)+"px":N+"px",bottom:de+"px",position:"fixed",zIndex:ae}:{right:M?(0,p.D2A)(P)+"px":N+"px",bottom:de+"px",position:"fixed",zIndex:ae},children:(0,v.jsxs)("div",{style:{boxSizing:"border-box",width:e.isSpotlight&&"60122562760"==P?d+"px":u+"px",height:e.isSpotlight&&"60122562760"==P?u+"px":d+"px",borderRadius:re,overflow:"hidden",backgroundColor:"transparent",boxShadow:"0 20px 40px rgba(0, 0, 0, 0.3), 0 8px 16px rgba(0, 0, 0, 0.2)",backdropFilter:"blur(20px)",transition:"all 0.3s ease"},className:"left"===B?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,v.jsx)("div",{style:{overflow:"hidden",position:"relative",borderRadius:re,background:"linear-gradient(145deg, rgba(0,0,0,0.1), rgba(0,0,0,0.3))"},children:(0,v.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:e.isSpotlight&&"60122562760"==P?16/9:9/16},children:(0,v.jsx)(a.A,{url:J.thumbnail_image,isMuted:!0,isPlaying:!0,event:J})})}),(0,v.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,v.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%",position:"relative"},children:[ee&&(0,v.jsxs)("div",{style:{position:"absolute",left:"10px",bottom:"10px",zIndex:11,display:"flex",alignItems:"center",gap:"5px",padding:"4px 9px",borderRadius:"999px",background:"rgba(0,0,0,0.5)",backdropFilter:"blur(4px)",WebkitBackdropFilter:"blur(4px)"},children:[(0,v.jsxs)("svg",{width:ne,height:ne,viewBox:"0 0 24 24",fill:"none",children:[(0,v.jsx)("path",{d:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,v.jsx)("circle",{cx:"12",cy:"12",r:"3",fill:"#fff"})]}),(0,v.jsxs)("span",{style:{color:"#fff",fontSize:te+"px",fontWeight:600,fontFamily:y,lineHeight:1,whiteSpace:"nowrap",textShadow:"0 1px 2px rgba(0,0,0,0.4)"},children:[oe," views"]})]}),(0,v.jsx)("div",{style:{position:"absolute",top:"2px",right:"2px",zIndex:10},children:(0,v.jsx)("div",{className:"close-btn",onClick:Y,children:(0,v.jsx)(f,{size:Z})})}),(0,v.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto",marginTop:"auto",marginBottom:"auto"},children:(0,v.jsx)(w.A,{size:K})}),(0,v.jsx)("div",{style:{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px",borderBottomLeftRadius:re,borderBottomRightRadius:re,background:b?"linear-gradient(to bottom, transparent, rgba(0,0,0,0.8))":"transparent"},children:(0,v.jsx)("p",{style:{textAlign:"center",color:"white",fontFamily:y,fontWeight:"600",fontSize:.35*Z+"px",margin:0,padding:0,lineHeight:"125%",letterSpacing:"0.3px",textShadow:"0 2px 4px rgba(0,0,0,0.5)"},children:b})})]})})]})})})}),ve="73490825529"==P||"67211264052"==P;if(ve&&"undefined"!==typeof document){var fe;const e=null===(fe=document.querySelector('.whatmore-widget[data-wh="embed"]'))||void 0===fe?void 0:fe.closest(".whatmore-base");if(e&&"none"===getComputedStyle(e).display)return null}return ve&&"undefined"!==typeof document&&document.body?r.createPortal(pe,document.body):pe}},7939:function(e,t,n){n.d(t,{initializeGA:function(){return h},sendVideoViewEventToGA:function(){return m}});var o,i=n(3405),r=n(2385),a=n(5547);const s="Whatmore Video Shopping",l=null!==(o="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==o&&o,d={video_view:"Video View",add_to_cart:"Add to Cart",buy_now:"Buy Now"},c={carousel:"Carousel",stories:"Stories",video_popup:"Video Popup"},u={homepage:"Home Page",product_page:"Product Page"};async function h(e){if((0,a.M$H)(e)&&null!==(0,a.xIo)(e)&&(r.Ay.initialize((0,a.xIo)(e)),l&&console.debug("Whatmore: initialized GA4")),(0,a.B6P)(e)&&null!==(0,a.jWS)(e)){const t=(0,a.Gc6)(e);i.Ay.initialize((0,a.jWS)(e),{useExistingGa:t}),l&&console.debug("Whatmore: initialized GA3")}}async function m(e,t,n){(0,a.B6P)(e)&&null!==(0,a.jWS)(e)&&(i.Ay.event({category:s,action:d.video_view,label:u[t]+":"+c[n]}),l&&console.debug("Whatmore: pushed view event to GA3")),(0,a.M$H)(e)&&null!==(0,a.xIo)(e)&&(r.Ay.event({category:s,action:d.video_view+":"+u[t]+":"+c[n],value:1,nonInteraction:!1}),l&&console.debug("Whatmore: pushed view event to GA4"))}},8060:function(e,t,n){n(1477);var o=n(9252),i=(n(8584),n(4475)),r=n(481);let a=null;t.A=function({posterUrl:e}){if(!e)return null;if(window.innerWidth>window.innerHeight)return null;e=(0,i.s)(e);const t=[];for(let n=0;n<8;n++){const e=45*n;t.push((0,r.jsx)("span",{style:{transform:`rotate(${e}deg) translate(0, -22px)`,animationDelay:`${(n/8-1).toFixed(3)}s`}},n))}return(0,o.createPortal)((0,r.jsxs)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"#000",zIndex:2147483648,pointerEvents:"none"},children:[(0,r.jsx)("img",{src:e,alt:"",style:{width:"100%",height:"100%",objectFit:"cover",pointerEvents:"none"}}),(0,r.jsx)("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"},children:(0,r.jsx)("div",{className:"whatmore-sfp-spinner",children:t})})]}),(a&&document.documentElement.contains(a)||(a=document.createElement("div"),a.id="whatmore-suspense-portal-root",document.documentElement.appendChild(a)),a))}},8513:function(e,t,n){n.r(t),n.d(t,{addToCartShopify:function(){return m},addWhatmoreAttributeToCart:function(){return c},cartPageShopify:function(){return v},checkoutPageShopify:function(){return p},getCartDetailsShopify:function(){return l},getCartDetailsShopifyAsync:function(){return d},productDetailsShopifyJS:function(){return f},productDetailsShopifyJSON:function(){return w},shopfloCheckoutButtonFormInject:function(){return y},updateCartLineItemPropertiesDirect:function(){return g},updateCartLineProperties:function(){return u}});var o=n(1214),i=n(5547),r=n(6080),a=n(5616),s=n(5566);function l(){const e="https://"+window.location.hostname+"/cart.json";return fetch(e,{method:"GET"})}async function d(){const e="https://"+window.location.hostname+"/cart.json";return await fetch(e,{method:"GET"})}async function c(e){var t;let n,l=(0,a.Ak)(),c=null,m=null,p={},v=null,f=null,w=null,g={};const y=(0,o.Xd)("whatmoreShopId");let b=(0,s.CK)(),x=null===(t=localStorage)||void 0===t?void 0:t.wht_is_impression,S=b.length>0;b.forEach(e=>{g.hasOwnProperty(null===e||void 0===e?void 0:e.product_id)||(g[null===e||void 0===e?void 0:e.product_id]={widgetInfo:null===e||void 0===e?void 0:e.widget_info,location:null===e||void 0===e?void 0:e.location,userType:null===e||void 0===e?void 0:e.user_type})});const j=localStorage.getItem("_whatmore_session_id"),_=localStorage.getItem("wht_user_group"),C=window.whatmore&&window.whatmore.abTestConfig&&window.whatmore.abTestConfig.ab_test_id||null,T=window.whatmore&&window.whatmore.abTestConfig&&null!=window.whatmore.abTestConfig.version?window.whatmore.abTestConfig.version:null,E=localStorage.getItem("_whatmore_user_id"),$=localStorage.getItem("_whatmore_last_video_view_session"),A=(()=>{try{var e;return JSON.parse(null!==(e=localStorage.getItem("_whatmore_add_to_cart_products"))&&void 0!==e?e:"[]")}catch(t){return[]}})(),P=new Set(A.map(e=>String(null===e||void 0===e?void 0:e.product_id))),I=(()=>{try{var e;return JSON.parse(null!==(e=localStorage.getItem("_whatmore_buynow_products"))&&void 0!==e?e:"[]")}catch(t){return[]}})(),k=new Set(I.map(e=>String(null===e||void 0===e?void 0:e.variant_id))),N={buynow:3,direct:2,indirect:1};await d().then(e=>e.json()).then(t=>{l=t.token,n=t.attributes;let o={};try{var a,d;const e=null===(a=n)||void 0===a?void 0:a._wtot;o="string"===typeof e?JSON.parse(e):null!==e&&void 0!==e?e:{};const i=new Set((null!==(d=t.items)&&void 0!==d?d:[]).map(e=>String(null===e||void 0===e?void 0:e.product_id)));o=Object.fromEntries(Object.entries(o).filter(([e])=>i.has(String(e))))}catch(L){o={}}let b=[];if(b=!0===e?t.items.map(e=>{const t=g[null===e||void 0===e?void 0:e.variant_id];return{...e,location:null===t||void 0===t?void 0:t.location,userType:null===t||void 0===t?void 0:t.userType,widget_info:null===t||void 0===t?void 0:t.widgetInfo}}):t.items.map(e=>{const t=g[null===e||void 0===e?void 0:e.product_id];return{...e,location:null===t||void 0===t?void 0:t.location,userType:null===t||void 0===t?void 0:t.userType,widget_info:null===t||void 0===t?void 0:t.widgetInfo}}),0==b.length)return console.debug("Whatmore :: no cart items available for view products"),null;let A={},I={};if(null!=j){const e={wht_session_id:null!==$&&void 0!==$?$:j,wht_user_id:E,..._&&{wht_user_group:_},...C&&{wht_ab_test_id:C},...null!=T&&{wht_ab_test_version:T}};I={[r.Uv]:(0,r.dK)(y)?JSON.stringify(e):e,[r.Um]:""}}if(x||S){const e="1";I[S?r.Rm:r.AG]=e,I[S?r.bZ:r.SW]=""}!(0,i.tSy)(y)&&(I.hasOwnProperty(r.Uv)||I.hasOwnProperty(r.Rm)&&!n.hasOwnProperty(r.Rm)||I.hasOwnProperty(r.AG)&&!n.hasOwnProperty(r.AG))&&h(I),b.map((t,n)=>{if(c=t.key,m=t.quantity,p=t.properties,v=t.widget_info,f=t.location,w=t.userType,("63330517149"==y||"77604192550"==y||"64157352183"==y||"62758289602"==y||"65972830359"==y||"75310563627"==y||(0,i.CpV)(y))&&g.hasOwnProperty(JSON.stringify(!0===e?t.variant_id:t.product_id))){const e="65972830359"==y||"75310563627"==y||(0,i.CpV)(y),n=e?"_wtot":"wtot";let r=(0,s.wm)()+`#${v}`;if(e){var a;const e=k.has(String(null===t||void 0===t?void 0:t.variant_id))?"buynow":P.has(String(null===t||void 0===t?void 0:t.product_id))?"direct":"indirect",n=o[null===t||void 0===t?void 0:t.product_id];r=(null!==(a=N[("string"===typeof n?n:"").split(":")[1]])&&void 0!==a?a:0)>=N[e]?n:r+`:${e}`}A={...A,[null===t||void 0===t?void 0:t.product_id]:r};h({[n]:e?{...o,...A}:A})}null!==p&&r.B_ in p||!g.hasOwnProperty(JSON.stringify(!0===e?t.variant_id:t.product_id))||u(c,m,p,v,f,w,!0,x,S)})}).catch(e=>{console.error("Whatmore :: Error while fetching cart_token for cart attribute update.",e)})}async function u(e,t,n,a,l="default",d,c,u,h){const m=(0,o.Xd)("whatmoreShopId"),p=c?(0,s.wm)()+("72201044272"==m?`#${a}#${l}#${d?"olduser":"newuser"}`:`#${a}`):h?"_wt_vs":u?"_wt_vi":"";if(""==p||"_wt_vs"==p||"_wt_vi"==p||"77604192550"==m||"64157352183"==m||"80856187185"==m||"86486974743"==m||"62758289602"==m||"63046287536"==m||"65972830359"==m||"75310563627"==m||"86968402213"==m||(0,i.CpV)(m))return;let v={id:e,quantity:t,properties:{...p?{[r.B_]:p}:{},...n}};return await fetch("https://"+window.location.hostname+"/cart/change.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(v)}).then(e=>e.json()).catch(e=>{console.error("Whatmore :: Error while updating cart line item properties.",e)})}async function h(e){return await fetch("https://"+window.location.hostname+"/cart/update.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:e})}).then(e=>e.json()).catch(e=>{console.error("Whatmore :: Error while updating cart attribute.",e)})}async function m(e,t,n,o,a="default",l){if("24366857"==n||"68234805419"==n||"86879863060"==n)return Promise.resolve({ok:!0,json:()=>{}});let d;if((0,i.dnh)(n)){const i=(0,s.wm)()+("72201044272"==n?`#${o}#${a}#${l?"olduser":"newuser"}:direct`:`#${o}:direct`);d={items:e.map(e=>({id:e,quantity:t,properties:{[r.B_]:i}}))}}else d={items:e.map(e=>({id:e,quantity:t}))};const c=localStorage.getItem("_whatmore_session_id"),u=localStorage.getItem("wht_user_group"),m=window.whatmore&&window.whatmore.abTestConfig&&window.whatmore.abTestConfig.ab_test_id||null,p=window.whatmore&&window.whatmore.abTestConfig&&null!=window.whatmore.abTestConfig.version?window.whatmore.abTestConfig.version:null,v=localStorage.getItem("_whatmore_user_id");if(null!=c&&!(0,i.tSy)(n)){const e={wht_session_id:c,wht_user_id:v,...u&&{wht_user_group:u},...m&&{wht_ab_test_id:m},...null!=p&&{wht_ab_test_version:p}},t={[r.Uv]:(0,r.dK)(n)?JSON.stringify(e):e,[r.Um]:""};await h(t)}return Promise.resolve({ok:!0,json:()=>{}})}function p(e,t,n,o,r="default",a){const s="https://"+window.location.hostname;var l;const d="72201044272"==n?`came-from-whatmore-live_${o}_${r}_${a?"olduser":"newuser"}`:`came-from-whatmore-live_${o}`;(0,i.BLb)(n)?(l=`${s}/cart/${e}:${t}?`+(0,i.VCz)(n)+"&"+(0,i.Spk)(n)+"&"+(0,i.KMo)(n),(0,i.dnh)(n)&&(l=`${l}&ref=`+d)):(l=`${s}/cart/${e}:${t}`,(0,i.dnh)(n)&&(l=`${l}?ref=`+d)),window.location.href=l}function v(e){const t="https://"+window.location.hostname+"/cart";(0,i.BLb)(e)?window.location.href=t+"?"+(0,i.VCz)(e)+"&"+(0,i.Spk)(e)+"&"+(0,i.yD5)(e):window.location.href=t}async function f(e,t=""){let n;if("27303477337"===t){var o,i;const t="https://"+window.location.hostname,r=window.location.pathname.split("/");n=t+"/"+(null!==r&&void 0!==r&&null!==(o=r[1])&&void 0!==o&&o.startsWith("en-")?(null===r||void 0===r?void 0:r[1])+"/":"")+(null===e||void 0===e||null===(i=e.product_link)||void 0===i?void 0:i.split(".co")[1])+".js"}else n=(null===e||void 0===e?void 0:e.product_link)+".js";const r=await fetch(n,{method:"GET"});if(!r.ok)throw new Error(`Error! status: ${r.status}`);return await r.json()}async function w(e){const t=e.product_link+".json",n=await fetch(t,{method:"GET"});if(!n.ok)throw new Error(`Error! status: ${n.status}`);return await n.json()}async function g(e,t,n,a,l="default",d,c,u,h){const m=(0,o.Xd)("whatmoreShopId"),p=c?(0,s.wm)()+("72201044272"==m?`#${a}#${l}#${d?"olduser":"newuser"}:direct`:`#${a}:direct`):h?"_wt_vs":u?"_wt_vi":"";if(""==p||"_wt_vs"==p||"_wt_vi"==p||"77604192550"==m||"64157352183"==m||"80856187185"==m||"86486974743"==m||"62758289602"==m||"65972830359"==m||"75310563627"==m||"86968402213"==m||(0,i.CpV)(m))return;let v={id:e,quantity:t,properties:{...p?{[r.B_]:p}:{},...n}};return await fetch("https://"+window.location.hostname+"/cart/change.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(v)}).then(e=>e.json()).catch(e=>{console.error("Whatmore :: Error while updating cart line item properties direct.",e)})}function y(e,t){const n=(0,s.wm)()+`#${t}:buynow`;try{var o;const n=JSON.parse(null!==(o=localStorage.getItem("_whatmore_buynow_products"))&&void 0!==o?o:"[]").filter(e=>{var t;return(null!==(t=null===e||void 0===e?void 0:e.timestamp)&&void 0!==t?t:0)+864e5>Date.now()});n.push({variant_id:String(e),widget_info:t,timestamp:Date.now()}),localStorage.setItem("_whatmore_buynow_products",JSON.stringify(n))}catch(d){console.error("Whatmore :: failed to record buy-now marker.",d)}const i=`\n <form method="post" action="/cart/add" accept-charset="UTF-8" class="form" enctype="multipart/form-data" is="product-form">\n <input type="hidden" name="form_type" value="product" />\n <input type="hidden" name="utf8" value="\u2713" />\n <input name=properties[${r.B_}] type="hidden" value=${n}></input>\n <input type="hidden" name="id" value="${e}" />\n </form> `,a=(new DOMParser).parseFromString(i,"text/html").querySelector('form[action*="/cart/add"]'),l=document.createElement("div");l.appendChild(a),document.body.prepend(l),"function"==typeof handleFloBuyNowBtn&&handleFloBuyNowBtn()}},8584:function(){},8762:function(e,t,n){n.d(t,{Ij:function(){return r},bi:function(){return a}});let o,i=!1;function r(){return o?o.play().then(()=>{i=!0,console.debug("iOS autoplay restrictions bypassed."),o.pause()}).catch(e=>{console.error("Failed to bless videos:",e.message)}):Promise.reject(new Error("Blessing video not initialized."))}function a(){o||(o=document.createElement("video"),o.src="https://whatmore-other-assets.b-cdn.net/whatmore/dummy_for_video_pool_3s_muted_11kb.mp4",o.muted=!0,o.playsInline=!0,o.style.display="none",document.body.appendChild(o));const e=()=>{i||r()};document.addEventListener("click",e,{once:!0}),document.addEventListener("touchstart",e,{once:!0})}},8888:function(e,t,n){n.d(t,{B:function(){return r},f:function(){return a}});var o=n(5547),i=n(1637);function r(e){return`${(0,o.jpW)(e)?i.$$:i.MT}/v2/brand/${e}/product-events/recommendation/cdn`}function a(e){return`${(0,o.jpW)(e)?i.$$:i.MT}/v2/brand/${e}/product-events/collection/cdn`}},9258:function(e,t,n){var o=n(2211),i=n(7462),r=n(481);t.A=function(e){var t,n;const a=null!==(t=e.height)&&void 0!==t?t:"100%",s=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,r.jsxs)("div",{style:{width:s,height:a,overflow:"hidden",minHeight:a,minWidth:s},children:[(0,r.jsx)(i.A,{height:a,width:s}),(0,r.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignContent:"center",width:"100%",height:"100%",position:"relative",zIndex:1,bottom:"100%",className:"whatmore-ios-css-relative-fix"},children:(0,r.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",width:"100%",height:"fit-content"},children:(0,r.jsx)(o.A,{})})})]})}},9263:function(e,t,n){var o=n(5568);t.A=function(e){const[t,n,i]=(0,o.A)();var r="landscape"==t?n*(9/16):i;if("landscape"==t){const e=.85;return[n,r,n*e,r*e]}return[n,r,n,r]}},9759:function(e,t,n){var o=n(1477),i=n(5677),r=n(1214),a=n(481);const s=o.memo(()=>{if(!(0,r.Xd)("isLandingSharedLink"))return(0,a.jsx)(a.Fragment,{});const[e]=(0,i.A)();return(0,a.jsxs)("div",{className:`shimmer-container ${e}`,children:["portrait"===e?(0,a.jsx)("div",{className:"shimmer-item portrait-full",children:(0,a.jsx)("div",{className:"shimmer-effect"})}):Array(3).fill().map((e,t)=>(0,a.jsx)("div",{className:"shimmer-item landscape-item "+(1===t?"center-item":""),children:(0,a.jsx)("div",{className:"shimmer-effect"})},t)),(0,a.jsx)("style",{children:"\n .shimmer-container {\n display: flex;\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n scroll-behavior: smooth;\n z-index: 1000;\n }\n\n .portrait {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.6);\n }\n\n .landscape {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.8);\n }\n\n .shimmer-item {\n scroll-snap-align: start;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n transition: transform 0.3s ease;\n }\n\n .portrait-full {\n width: 100vw;\n height: 100vh;\n margin: 0; \n }\n\n .landscape-item {\n width: 250px;\n height: 450px;\n background: #D3D3D3;\n border-radius: 8px;\n margin-left: -50px; \n }\n\n .center-item {\n width: 360px;\n height: 620px;\n box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.5); \n z-index: 10; \n }\n\n .shimmer-effect {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.3) 75%);\n animation: shimmer 2s infinite;\n background-size: 200% 100%;\n }\n\n @keyframes shimmer {\n 0% {\n background-position: -200% 0;\n }\n 100% {\n background-position: 200% 0;\n }\n }\n "})]})});t.A=s},9795:function(e,t,n){var o=n(1477),i=n(1214);t.A=function(e){const[t,n]=(0,i.QN)("muted");return(0,o.useEffect)(()=>{},[]),[t,n]}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[310],{1839:function(t,e,o){function n(t,e){let o=document.getElementById(t);o||(o=document.createElement("style"),o.id=t,document.head.appendChild(o)),o.textContent=e}function i(t,e){if(!t)return null;const o=t[e];if(!o||"object"!==typeof o)return Object.assign({},t,{brandCss:""});const n="string"===typeof t.customCss?t.customCss:"";return Object.assign({},o,{brandCss:n})}o.d(e,{R:function(){return i},f:function(){return n}})},5e3:function(t,e,o){o.d(e,{Au:function(){return l},YJ:function(){return c},k5:function(){return s}});const n=6,i="https://whatmore-other-assets.b-cdn.net/whatmore/dummy_for_video_pool_3s_muted_11kb.mp4",a="whatmore-video-player whatmore-main-video-player-from-pool";function r(){return"undefined"===typeof window?{}:(window.__whatmoreNeoVideoPool||(window.__whatmoreNeoVideoPool={}),window.__whatmoreNeoVideoPool)}function l(){const t=r();if(t.armed||"undefined"===typeof document)return;t.armed=!0,function(){const t=r();if(t.pool||"undefined"===typeof document)return;const e=document.createDocumentFragment();for(let o=0;o<n;o++){const t=document.createElement("video");t.setAttribute("class",a),t.setAttribute("src",i),t.muted=!0,t.setAttribute("width","100%"),t.setAttribute("height","100%"),t.setAttribute("preload","auto"),t.setAttribute("loop",""),t.setAttribute("playsinline",""),t.setAttribute("webkit-playsinline",""),t.setAttribute("x-webkit-airplay","allow"),t.controls=!1,e.appendChild(t)}t.pool=e}();const e=()=>{document.removeEventListener("click",e),document.removeEventListener("touchstart",e),function(){const t=r();if(t.blessed||!t.pool)return;const e=t.pool.childNodes;for(let o=0;o<e.length;o++){const t=e[o];t.muted=!0;const n=t.play();n&&n.then&&n.then(()=>t.pause()).catch(()=>{})}t.blessed=!0}()};document.addEventListener("click",e,{passive:!0}),document.addEventListener("touchstart",e,{passive:!0})}function s(){return r().pool||null}function c(){return!!r().blessed}},6387:function(t,e,o){o.d(e,{P:function(){return i}});const n={standard:()=>o.e(508).then(o.t.bind(o,5071,17)),card:()=>o.e(545).then(o.t.bind(o,9362,17)),"mosaic-ring":()=>o.e(457).then(o.t.bind(o,8171,17)),"mosaic-plain":()=>o.e(764).then(o.t.bind(o,5635,17)),hoverplay:()=>o.e(781).then(o.t.bind(o,787,17)),"info-strip":()=>o.e(94).then(o.t.bind(o,2109,17)),"text-overlay":()=>o.e(833).then(o.t.bind(o,3930,17)),focused:()=>o.e(506).then(o.t.bind(o,1987,17)),coverflow:()=>o.e(172).then(o.t.bind(o,9033,17)),minimal:()=>o.e(244).then(o.t.bind(o,6362,17)),feed:()=>o.e(315).then(o.t.bind(o,7456,17)),circle:()=>o.e(31).then(o.t.bind(o,5112,17)),viewmore:()=>o.e(343).then(o.t.bind(o,7672,17)),overlay:()=>o.e(936).then(o.t.bind(o,75,17)),"stories-b":()=>o.e(565).then(o.t.bind(o,1958,17)),"product-broad-no-cta":()=>o.e(838).then(o.t.bind(o,5955,17)),"product-broad-atc":()=>o.e(648).then(o.t.bind(o,2699,17)),"product-narrow":()=>o.e(594).then(o.t.bind(o,4859,17)),"product-premium":()=>o.e(566).then(o.t.bind(o,2529,17)),"product-navigation":()=>o.e(45).then(o.t.bind(o,4368,17)),"product-multi-product":()=>o.e(856).then(o.t.bind(o,6084,17)),"product-thumbnail-strip":()=>o.e(620).then(o.t.bind(o,4383,17)),"product-link-only":()=>o.e(750).then(o.t.bind(o,3365,17)),"product-minimal-atc":()=>o.e(685).then(o.t.bind(o,1890,17))};async function i(t,e){const o=n["carousel"===t||"collections"===t?e:t+"-"+e];if(!o)return"";try{return(await o()).default||""}catch(i){return""}}},7119:function(t,e,o){o.r(e),o.d(e,{REGISTRY:function(){return w},renderNeoFloating:function(){return N}});var n=o(7983),i=o(6287),a=o(5e3),r=o(6387),l=o(1839),s=o(9439),c=".wht-neo-float-frame{animation:wht-neo-float-pop .4s cubic-bezier(.06,.92,.59,1.32) both;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);background:linear-gradient(145deg,rgba(0,0,0,.1),rgba(0,0,0,.3));box-shadow:var(--wht-neo-float-shadow,0 20px 40px rgba(0,0,0,.3),0 8px 16px rgba(0,0,0,.2));transition:all .3s ease}@keyframes wht-neo-float-pop{0%{transform:scale(0)}to{transform:scale(1)}}.wht-neo-float-close svg{filter:drop-shadow(0 1px 2px rgba(0,0,0,.4))}.wht-neo-float-play svg{filter:drop-shadow(0 2px 6px rgba(0,0,0,.35))}.wht-neo-float-title{background:linear-gradient(180deg,transparent,rgba(0,0,0,.8));bottom:0;display:block;left:0;padding:16px;position:absolute;right:0}.wht-neo-float-title p{color:#fff;font-size:calc(var(--wht-neo-float-w, 140px)*.25*.35);font-weight:600;letter-spacing:.3px;line-height:125%;margin:0;text-shadow:0 2px 4px rgba(0,0,0,.5)}";const d="https://consumer.whatmore.live",p="floating",u="wht-neo-floating-css",h="wht-neo-floating-critical",f='.wht-neo-float{position:fixed;z-index:var(--wht-neo-float-z,2147483000);bottom:var(--wht-neo-float-vpad,10px)}.wht-neo-float[data-wht-pos="left"]{left:var(--wht-neo-float-hpad,10px)}.wht-neo-float[data-wht-pos="right"]{right:var(--wht-neo-float-hpad,10px)}.wht-neo-float-frame{position:relative;width:var(--wht-neo-float-w,140px);height:var(--wht-neo-float-h,249px);border-radius:var(--wht-neo-float-radius,20px);overflow:hidden;background:transparent;cursor:pointer}.wht-neo-float-video{width:100%;height:100%;object-fit:cover;display:block;background:#fff}.wht-neo-float-overlay{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:space-between}.wht-neo-float-close{position:absolute;top:2px;right:2px;z-index:10;display:flex;border:none;padding:4px;background:transparent;cursor:pointer;color:#fff}.wht-neo-float-close svg{width:calc(var(--wht-neo-float-w,140px) * 0.25);height:calc(var(--wht-neo-float-w,140px) * 0.25)}.wht-neo-float-play{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none;color:#fff}.wht-neo-float-play svg{width:calc(var(--wht-neo-float-w,140px) * 0.35);height:calc(var(--wht-neo-float-w,140px) * 0.35)}.wht-neo-float-title{display:none}.wht-neo-float[data-wht-hidden]{display:none}.wht-neo-float[data-wht-ultra][data-wht-pos="left"]{left:16px}.wht-neo-float[data-wht-ultra][data-wht-pos="right"]{right:16px}.wht-neo-float[data-wht-ultra] .wht-neo-float-frame{width:calc(var(--wht-neo-float-w,140px) * 0.6);height:calc(var(--wht-neo-float-h,249px) * 0.6)}';async function m(t){let e=null;try{e=new URLSearchParams(window.location.search).get("neoskin")}catch(d){}let o="";const n=e||t&&t.skin;n&&"default"!==n&&"a"!==n&&(o=await(0,r.P)(p,n));const i=n&&"default"!==n?n:"a",a=t&&t.customCss,s="string"===typeof a?a:a&&"object"===typeof a&&"string"===typeof a[i]?a[i]:"";return(0,l.f)(u,c+"\n"+o+(t&&t.brandCss?"\n"+t.brandCss:"")+(s?"\n"+s:"")),!0}const w={floatVideo:{data:{source:"backend",field:"event.thumbnail_image"},action:"openFullscreen"},closeButton:{data:{source:"runtime",field:"bubble.visible"},action:"close"},playIcon:{data:{source:"runtime",field:"video.paused"},action:null},titleStrip:{data:{source:"embed",field:"whatmoreEmbedAppVideoTitle"},action:null}};const g=(t,e=null)=>{const o=function(){try{return JSON.parse(localStorage.getItem("whatmore_brand_customizations")).customizations}catch(t){return null}}(),n=t.split(".").reduce((t,e)=>null==t?void 0:t[e],o);return null==n?e:n};function v(t,e,o){var n;const i=t&&t.querySelector("#"+e),a=i&&(null!==(n=i.getAttribute("data-wh"))&&void 0!==n?n:i.getAttribute("data"));return null!=a&&""!==a?a:o}function b(t,e,o){const n=parseFloat(v(t,e,NaN));return isFinite(n)?n:o}async function _({mode:t,shopId:e,landingLocationType:o,widgetContainer:i}){let a;if("pdp"===t){let t=v(i,"whatmoreProductId","");"true"===String(v(i,"whatmoreEmbedAppUseVariant","false"))&&(t=v(i,"whatmoreVariantId",t));const o=!0===g("recommendation_config.show_collection_events")?`${d}/v2/brand/${e}/product-events/collection/cdn?client_product_id=${encodeURIComponent(t)}&limit=50&status=live,upcoming&event_type=video`:!0===g("recommendation_config.show_recommended_events")?`${d}/v2/brand/${e}/product-events/recommendation/cdn?client_product_id=${encodeURIComponent(t)}&limit=10&recommended=${!g("product_page_popup_config.show_all_events")}&origin=${window.location.hostname}&status=live,upcoming&event_type=video`:`${d}/v2/brand/${e}/product-events?client_product_id=${encodeURIComponent(t)}&status=upcoming&event_type=video`,{events:r,all_events:l}=(0,n.Np)(await fetch(o).then(t=>t.json()),!1);a=[...r,...l]}else if(o.startsWith("collection")){const t=v(i,"whatmoreCollectionId",e)||e,o=!0===g("collection_product_sync")?`${d}/v5/collection?store_id=${e}&client_collection_id=${t}&sync_products=true`:`${d}/v2/collection?store_id=${e}&client_collection_id=${t}`,{events:r}=(0,n.Np)(await fetch(o).then(t=>t.json()),!0);a=r}else{const t=`${d}/get_eventset/${e}?eventset_type=spotlight&source=homepage&source_id=${e}`,{events:o}=(0,n.Po)(await fetch(t).then(t=>t.json()),"spotlight");a=o}return g("oos_config.show_oos_videos")||(a=a.filter(t=>t&&!1!==t.in_stock)),a}function y(t){var e,o,n,i;const a=t.event_media_urls;let r=a?(null===(e=a.primary)||void 0===e||null===(o=e.portrait)||void 0===o?void 0:o.poster_image)||(null===(n=a.secondary)||void 0===n||null===(i=n.portrait)||void 0===i?void 0:i.poster_image)||t.poster_image||"":t.poster_image||"";return r&&r.startsWith("https://cdn.shopify.com")&&(r=r.split("?")[0]+"?width=400&height=400"),r}function x(t,e,o){const n=(0,s.vC)(),i=n.h>=n.w,a=i?"Portrait":"Landscape",r=function(t,e){const{w:o,h:n}=(0,s.vC)(),i=Math.min(o,n),a=n>=o,r=.6*i,l=a?o>=481?.48:.54:i<500?.7:.39,c=a?b(t,"whatmoreEmbedAppVideoPlayerSizePortrait",40)/100*1.2:b(t,"whatmoreEmbedAppVideoPlayerSizeLandscape",60)/100,d="spotlight"===e?Number(g("spotlight_config.size_factor",1))*(a?1.1:1.3):1.1;return Math.round(r*l*c*d)}(e,o);t.style.setProperty("--wht-neo-float-w",r+"px"),t.style.setProperty("--wht-neo-float-h",Math.round(16*r/9)+"px");const l=v(e,"whatmoreEmbedAppPosition"+a,"left"),c=b(e,"whatmoreEmbedAppHorizontalPadding"+a,i?10:20),d=b(e,"whatmoreEmbedAppVerticalPadding"+a,i?10:20),p="spotlight"===o?g("spotlight_config.position",l):l,u="spotlight"===o?Number(g("spotlight_config.horizontal_padding",c)):c,h="spotlight"===o?Number(g("spotlight_config.vertical_padding",d)):d;t.setAttribute("data-wht-pos","right"===p?"right":"left"),t.style.setProperty("--wht-neo-float-hpad",u+"px"),t.style.setProperty("--wht-neo-float-vpad",h+"px");const f=g("product_page_popup_config.popUpZindex");return null!=f&&t.style.setProperty("--wht-neo-float-z",String(f)),h}const A=500,C=12,k=8,E=300,P=["#pageheader","page-header",".navigation__tier-1-container",".navigation__tier-1"];function L(t){if(!t)return!1;const e=window.getComputedStyle(t);return"none"!==e.display&&"hidden"!==e.visibility&&0!==parseFloat(e.opacity||"1")&&(t.offsetWidth>0&&t.offsetHeight>0)}function $(t,e,o){let n=null;const i=()=>{n=null;const{w:i,h:a}=(0,s.vC)(),r=t.getBoundingClientRect();if(!r.width||!r.height)return;const l=o(),c=r.left,d=r.right,p=function(t,e){let o=0;for(const n of P)for(const i of document.querySelectorAll(n)){if(!L(i))continue;const n=i.getBoundingClientRect();n.top>.3*e||n.width<.5*t||n.bottom<=0||n.bottom>=.6*e||n.bottom>o&&(o=n.bottom)}return o}(i,a)+k,u=a-l-r.height,h=a-l;let f,m=null,w=!1;for(const t of e)for(const e of document.querySelectorAll(t)){if(!L(e))continue;const t=e.getBoundingClientRect();t.width<=0||t.height<=0||(t.right<=c||t.left>=d||t.bottom<=0||t.top>=a||(m=null===m?t.top:Math.min(m,t.top),t.top<h&&t.bottom>u&&(w=!0)))}f=w&&null!==m&&m-C-r.height>=p?Math.max(l,a-m+C):l;const g=parseFloat(t.style.bottom||"")||l;Math.round(g)!==Math.round(f)&&(t.style.bottom=Math.round(f)===Math.round(l)?"":f+"px")},a=()=>{null===n&&(n=window.requestAnimationFrame(i))};a(),window.addEventListener("scroll",a,{passive:!0}),window.addEventListener("resize",a),window.setInterval(a,E)}async function N(t){const{widgetContainer:e,shopId:o,landingLocationType:n="index",floatingMode:r,onWidgetView:s,onClose:c,onOpenEvent:d}=t;if(!o)return!1;const u=r||(n.startsWith("product")||"embed"===n?"pdp":"spotlight");if("spotlight"===u&&g("spotlight_config.show_once_to_user"))try{if(window.localStorage.getItem("_whatmore_spotlight_viewed"))return!0;window.localStorage.setItem("_whatmore_spotlight_viewed","true")}catch(U){}let w;(0,l.f)(h,f);try{[w]=await Promise.all([_({mode:u,shopId:o,landingLocationType:n,widgetContainer:e}),m((0,l.R)(t.neoJson,p))])}catch(U){return!1}if(!w||!w.length)return!0;const b=w[0],C="pdp"===u,k=!!g(C?"product_page_popup_config.ultra_minimize_on_scroll":"spotlight_config.ultraminimize_on_scroll"),E=C&&!k&&!!g("product_page_popup_config.show_popup_on_scroll"),P=C&&!!g("product_page_popup_config.auto_close_on_open"),L=g((C?"product_page_popup_config":"spotlight_config")+".atc_aware_selectors"),N=document.createElement("div");N.className="wht-neo-float",N.dataset.role="floatVideo",N.setAttribute("data-wht-mode",u),o&&N.setAttribute("data-wht-shop",o),N.setAttribute("data-wht-widget","spotlight"===u?"wgt_spotlight":"wgt_embed");const I={vPad:x(N,e,u)};E&&N.setAttribute("data-wht-hidden","");const z=document.createElement("div");z.className="wht-neo-float-frame";const M=document.createElement("video");M.className="wht-neo-float-video",M.muted=!0,M.loop=!0,M.playsInline=!0,M.autoplay=!0,M.preload="metadata",M.setAttribute("muted",""),M.setAttribute("playsinline",""),M.setAttribute("webkit-playsinline","");const S=y(b);if(S&&(M.poster=S),b.thumbnail_image){const t=document.createElement("source");t.src=b.thumbnail_image,t.type="video/mp4",M.appendChild(t)}z.appendChild(M);const V=document.createElement("div");V.className="wht-neo-float-overlay";const F=document.createElement("button");F.type="button",F.className="wht-neo-float-close",F.dataset.role="closeButton",F.setAttribute("aria-label","Close video"),F.innerHTML='<svg viewBox="0 0 24 24" fill="none" aria-hidden="true"><circle cx="12" cy="12" r="10" fill="rgba(0,0,0,0.6)" stroke="rgba(255,255,255,0.3)" stroke-width="1.5"/><path d="M9 9l6 6M15 9l-6 6" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg>',F.addEventListener("click",t=>{t.stopPropagation(),N.remove(),null===c||void 0===c||c(b)}),V.appendChild(F);const R=document.createElement("span");R.className="wht-neo-float-play",R.dataset.role="playIcon",R.innerHTML='<svg viewBox="0 0 64 64" aria-hidden="true"><circle cx="32" cy="32" r="28" fill="rgba(255,255,255,0.25)" stroke="rgba(255,255,255,0.5)" stroke-width="1.5"/><path d="M26 21l18 11-18 11z" fill="#fff"/></svg>',V.appendChild(R);const j=v(e,"whatmoreEmbedAppVideoTitle","");if(j){const t=document.createElement("div");t.className="wht-neo-float-title",t.dataset.role="titleStrip";const o=document.createElement("p");o.textContent=j;const n=v(e,"whatmorePrimaryFont","");n&&(o.style.fontFamily=n),t.appendChild(o),V.appendChild(t)}z.appendChild(V),N.appendChild(z),document.body.appendChild(N);const B=M.play&&M.play();B&&B.catch&&B.catch(()=>{}),(0,a.Au)();const O=t=>{if(t!==N.hasAttribute("data-wht-ultra"))if(t){N.setAttribute("data-wht-ultra","");try{M.pause()}catch(U){}}else{N.removeAttribute("data-wht-ultra");const t=M.play&&M.play();t&&t.catch&&t.catch(()=>{})}};!function(t,e){let o=0,n=0,i=0,a=0,r=!1,l=!1;t.addEventListener("pointerdown",e=>{if(e.target.closest(".wht-neo-float-close"))return;l=!0,r=!1,o=e.clientX,n=e.clientY;const s=/translate\((-?[\d.]+)px,\s*(-?[\d.]+)px\)/.exec(t.style.transform||"");i=s?parseFloat(s[1]):0,a=s?parseFloat(s[2]):0,t.setPointerCapture(e.pointerId)}),t.addEventListener("pointermove",e=>{if(!l)return;const s=e.clientX-o,c=e.clientY-n;(Math.abs(s)>5||Math.abs(c)>5)&&(r=!0),r&&(t.style.transform=`translate(${i+s}px, ${a+c}px)`)}),t.addEventListener("pointerup",o=>{if(l){l=!1;try{t.releasePointerCapture(o.pointerId)}catch(n){}r||e()}}),t.addEventListener("pointercancel",()=>{l=!1})}(N,()=>{N.hasAttribute("data-wht-ultra")?O(!1):(P&&(N.remove(),null===c||void 0===c||c(b)),(0,i.w)(y(b)),null===d||void 0===d||d(b,0,w))});let T=!1;window.addEventListener("resize",()=>{T||(T=!0,requestAnimationFrame(()=>{T=!1,I.vPad=x(N,e,u)}))},{passive:!0});let q=!1;const Y=()=>{!q&&s&&(q=!0,requestAnimationFrame(()=>{(N.checkVisibility?N.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0}):N.offsetWidth>0&&N.offsetHeight>0)&&s()}))};if(E||Y(),k||E){let t=window.pageYOffset,e=!1;window.addEventListener("scroll",()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;const o=window.pageYOffset;Math.abs(o-t)<A||(t=o>0?o:0,o<=A?O(!1):(E&&N.hasAttribute("data-wht-hidden")&&(N.removeAttribute("data-wht-hidden"),Y()),k&&O(!0)))}))},{passive:!0}),k&&document.addEventListener("pointerdown",t=>{!N.contains(t.target)&&N.isConnected&&window.pageYOffset>A&&O(!0)},{capture:!0,passive:!0})}return Array.isArray(L)&&L.length&&$(N,L,()=>I.vPad),!0}},7983:function(t,e,o){function n(t,e=!1){if(null==t)return{events:[],all_events:[]};if(e){return{events:t.events&&t.events[0]&&t.events[0].events||[],all_events:t.all_events||[]}}return{events:t.events||[],all_events:t.all_events||[]}}function i(t,e){if(null==t||!t.eventsets||!t.eventsets[e])return{events:[],all_events:[]};return{events:(Array.isArray(t.eventsets[e])?t.eventsets[e]:[]).reduce((t,e)=>t.concat(e&&e.events||[]),[]),all_events:[]}}o.d(e,{Np:function(){return n},Po:function(){return i}})}}]);