whatmore-react-assets 1.0.1844 → 1.0.1845
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/static/js/{12.e23e4099.chunk.js → 12.9d30adf6.chunk.js} +1 -1
- package/static/js/event-click-component.76e29bea.chunk.js +76 -0
- package/static/js/react-main-app.dd6eccfd.chunk.js +1 -0
- package/static/js/wht-neo-atc.43d10ef7.chunk.js +1 -0
- package/static/js/wht-neo-floating.f7eafb0a.chunk.js +1 -0
- package/static/js/wht-neo-shopper.c25c5ed1.chunk.js +2 -0
- package/whatmore.js +2 -2
- package/static/js/event-click-component.9141709d.chunk.js +0 -76
- package/static/js/react-main-app.0c1b64cb.chunk.js +0 -1
- package/static/js/wht-neo-atc.c2de104b.chunk.js +0 -1
- package/static/js/wht-neo-floating.568873a6.chunk.js +0 -1
- package/static/js/wht-neo-shopper.da8de2d8.chunk.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
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.js)().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.CP)(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 I=await fetch("/cart/add.js",{method:"POST",body:A}),P=await I.json();P.id?setTimeout(()=>{f(d),window.location.href="/cart"},500):console.error("Afrozeh ATC failed:",P)}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 R(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 D(e,t=1){return O()?R(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 D(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 V=document.querySelector('button[data-pf-type="ProductATC2"]');return V?(c&&V.setAttribute("data-product-id",c),V.click(),setTimeout(()=>{(0,i.js)().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.CP)(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 z=d,B=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=z;const U=X.querySelector('input[name="quantity"]');U&&(U.value=B);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(z)},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:z,quantity:B}),credentials:"same-origin"}).then(()=>{setTimeout(()=>{f(z)},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 d},cb:function(){return s},lP:function(){return a},tQ:function(){return l},yD:function(){return c}});var o=n(5547);const i=(0,n(1214).Xd)("whatmoreShopId"),r=function(e){const t=e.event_hls_url;return t&&t.startsWith("https://cdn.shopify.com")&&t.includes(".mp4")?t:null},a=function(e){var t,n;if(!("event_media_urls"in e))return function(e){return null!=e.event_m3u8_url&&""!==e.event_m3u8_url?e.event_m3u8_url:e.event_hls_url}(e);if("image"===e.event_type)return e.event_media_urls.primary.portrait.content_image_original;if("secondary"in e.event_media_urls&&e.event_media_urls.secondary.portrait.content_video_1080p)return e.event_media_urls.secondary.portrait.content_video_1080p;const o=r(e);return o||(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)},s=function(e){var t,n;if(!("event_media_urls"in e))return e.event_hls_url;if("image"===e.event_type)return e.event_media_urls.primary.landscape.content_image_original;if("secondary"in e.event_media_urls&&e.event_media_urls.secondary.landscape.content_video_1080p)return e.event_media_urls.secondary.landscape.content_video_1080p;const o=null===(t=e.event_media_urls.primary.landscape)||void 0===t?void 0:t.content_video_1080p,i=null===(n=e.event_media_urls.primary.portrait)||void 0===n?void 0:n.content_video_1080p,a=r(e);return!a||o&&o!==i?null!==o&&void 0!==o?o:i:a},l=function(e,t="portrait"){var n,o,i,r;return"event_media_urls"in e?"landscape"===t?(null===(i=e.event_media_urls.secondary)||void 0===i||null===(r=i.landscape)||void 0===r?void 0:r.poster_image)||e.event_media_urls.primary.landscape.poster_image||e.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.event_media_urls.primary.portrait.poster_image||e.poster_image:e.poster_image},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-video-assets-720p.b-cdn.net/${t}/${e.split("whatmore_")[1].split("?")[0]}`}return e},c=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 ve},initializeReactApp:function(){return xe},isTemplateTypeBanner:function(){return fe},isTemplateTypeCollections:function(){return we},isTemplateTypeStories:function(){return ge},mountNeoFullscreen:function(){return be}});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),I=n(7156),P=n(6694),k=n(256),N=n(6984),L=n(6380),W=n(8762),O=n(8888),R=n(5534),D=n(8802),q=n(9759),M=n(8060);const F=(0,E.A)({key:"whatmore-css-ppv"});function V(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"),X=(0,r.Xd)("whatmoreShareTemplateId"),Q=(0,r.Xd)("whatmoreShareEventId"),U=B&&"template-embed"===(0,d.Mm)(X),[H,J]=(0,o.useState)(U);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?V(window.location.href).replace(/\/+$/,"").split("/").pop():V(window.location.href)}(E):z;const[G,Y]=(0,o.useState)(()=>"true"===p?w:z),[Z,K]=(0,o.useState)(!1);var ee=((0,a.jpW)(E)?g.$$:g.MT)+"/v2/brand/"+E+"/product-events",te="upcoming";const{whatmoreRootId:ne,whatmoreWidgetSourceDetails:oe}=(0,o.useContext)(ve),ie=(0,o.useRef)(!1),re=(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=${G}&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=${G}&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(ee.toString()+"?client_product_id="+G.toString()+"&status="+te.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=V(window.location.href);if(e!==G)return fetch(ee.toString()+"?client_product_id="+encodeURIComponent(e)+"&status="+te.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==V(window.location.href))return;const o={product_id:n.product_id,product_link:V(window.location.href)};fetch(g.$$+"/product",{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(o)})},500)}(e,G),e)).catch(e=>{c(e.message)})},[G]),(0,o.useEffect)(()=>{f(-2)},[i]),(0,o.useEffect)(()=>{const e=V(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 Y(null===e||void 0===e||null===(t=e.product)||void 0===t?void 0:t.id)}),"80505864496"==E&&window.location.pathname!==re.current){const e=window.location.pathname;re.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&&Y(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&&Y(e)}})},[]),(0,o.useEffect)(()=>{if(null!=i&&0!==i.length&&!l&&U&&((0,N.H)("whatmore-video-player",()=>{J(!1)}),null!=Q)){const e=i.find(e=>Q==e.event_id);if(e)return void le(e,!0,i.indexOf(e))}},[i]);const ae=oe.landingLocationType,se=oe.templateType,le=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)(ae)+(0,d.gf)(se)+(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)&&K(!0),void(e=>{if(g.LV&&"number"===typeof e&&e>=0){const t=(0,D.b)(ne);if(t)return J(!1),void t({events:i,eventIndex:e})}f(e)})(n)};function de(){return(0,u.jsx)(u.Fragment,{})}return null==i||0==i.length||l||(0,d.Ig)(oe.templateType)||!(0,a.fDZ)(E)?(0,u.jsx)("div",{}):(0,u.jsxs)(T.C,{value:F,children:[H&&(0,u.jsx)(q.A,{}),"no-product"===G||-1===v||0===i.length?(0,u.jsx)(de,{}):-2===v&&i.length>0?(0,u.jsx)("div",{onMouseEnter:()=>(0,R.h)(),children:(0,u.jsx)("div",{style:{height:"100%"},children:(0,u.jsx)(S.A,{event:i[0],inVideoClick:le,closeClick:e=>{var t;e.stopPropagation(),f(-1),(0,A.registerClickEvent)({userInteractionType:I.O.PDP_POPUP_CLOSED,widgetSourceDetails:oe,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;ie.current||h||m||(ie.current=!0,(0,P.trackWhatmoreAnalyticsEvent)({userInteractionType:I.O.PDP_POPUP_WIDGET_VIEW,widgetSourceDetails:oe,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)(M.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)(R.A,{events:i,index:v,onBack:function(){f(Z?-1:-2),J(!1)},template:"template-product-page"})})})]})};const B=(0,E.A)({key:"whatmore-css-wsv"});var X=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"),q=(0,r.Xd)("isWhatmorePreviewMode"),{whatmoreRootId:F,whatmoreWidgetSourceDetails:V}=(0,o.useContext)(ve),z=(0,o.useRef)(!1);var X=(0,a.SOt)(f)?g.aD+"/get_eventset/":g.$$+"/get_eventset/",Q=(0,a.SOt)(f)?g.aD+"/get_eventset_v1/":g.$$+"/get_eventset_v1/",U=(0,a.SOt)(f)?g.aD+"/v2/collection":g.$$+"/v2/collection",H=(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)?`${H.toString()}?store_id=${f}&client_collection_id=${o}&sync_products=true`:`${U.toString()}?store_id=${f}&client_collection_id=${o}`,l=n?i:"78232846646"===f.toString()?Q.toString()+f.toString()+"?eventset_type="+e+"&event_type=video&source="+t+"&source_id="+f:X.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(q&&(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&&Y(e,!0,t)})},[i]);const J=V.landingLocationType,G=V.templateType,Y=(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)(J)+(0,d.gf)(G)+(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(e=>{if(g.LV&&"number"===typeof e&&e>=0){const t=(0,D.b)(F);if(t)return void t({events:i,eventIndex:e})}v(e)})(n)};function Z(){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)(Z,{}):-2===p&&i.length>0?(0,u.jsx)("div",{onMouseEnter:()=>(0,R.h)(),children:(0,u.jsx)("div",{style:{height:"100%"},children:(0,u.jsx)(S.A,{event:i[0],inVideoClick:Y,closeClick:e=>{e.stopPropagation(),v(-1)},isSpotlight:!0,onImpression:()=>{var e;z.current||h||m||(z.current=!0,(0,P.trackWhatmoreAnalyticsEvent)({userInteractionType:I.O.SPOTLIGHT_WIDGET_VIEW,widgetSourceDetails:V,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)(M.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)(R.A,{events:i,index:p,onBack:function(){v(-2)},template:"template-embed",eventsStories:null})})})})))};var Q=function(){return(0,u.jsx)(u.Fragment,{})},U=n(4694),H=n(428),J=n(6126);var G=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)(ve),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&&H.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)?(H.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)(U.S,{userInteractionType:I.O.BANNER_WIDGET_VIEW,event:e[0],triggerFlag:!h&&!m,children:(0,u.jsx)(J.A,{events:e})})})},Y=n(5677),Z=(n(8584),n(2446),n(6267),n(4475)),K=n(4540),ee=n(5405);var te=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,Z.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:"none"},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,K.B)(p)?(0,u.jsx)(ee.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,Z.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 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:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),oe=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"})}),ie=(0,E.A)({key:"whatmore-stories-css"});var re=function(e){const[t,n,i]=(0,Y.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)(()=>{H.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:ie,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)(te,{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)(ne,{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)(oe,{style:{fontSize:"32px",display:"flex",alignItems:"center",justifyContent:"center"}})})]})]})})};var ae=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,P]=(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:q,whatmoreWidgetSourceDetails:F,whatmoreUserInfo:V}=((0,r.Xd)("isWhatmorePreviewMode"),(0,r.Xd)("whatmoreLoggingActive"),(0,o.useContext)(ve)),z=(0,r.Xd)("whatmoreLandingLocationType"),B=(null===F||void 0===F?void 0:F.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 X=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||H.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)(M.A,{posterUrl:(null===X||void 0===X||null===(e=X[A])||void 0===e||null===(t=e.events)||void 0===t||null===(i=t[E])||void 0===i?void 0:i.poster_image)||(null===X||void 0===X||null===(s=X[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)(R.A,{events:p,index:E,onBack:async function(){$(-1)},slideDirection:"horizontal",eventsStories:X,initialStoryIndex:A,template:B})}),(0,u.jsx)("div",{className:"whatmore-widget-container",onMouseEnter:()=>(0,R.h)(),style:{height:"100%",marginTop:O+"px",marginBottom:O+"px"},children:(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(U.S,{userInteractionType:I.O.STORIES_WIDGET_VIEW,triggerFlag:!N&&!W,children:(0,u.jsx)(re,{eventsStories:X,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=X[e].events[0],r=(null===F||void 0===F?void 0:F.landingLocationType)||"index",a=(null===F||void 0===F?void 0:F.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===V||void 0===V?void 0:V.userType)})();var i=0;null!=o&&X[e].events.map((e,t)=>{e.event_id==o&&(i=t)}),((e,t)=>{if(g.LV&&"number"===typeof e&&e>=0){const n=(0,D.b)(q);if(n)return void n(Object.assign({events:p,eventIndex:e},t))}$(e)})(i,{eventsStories:X,storyIndex:e}),P(e)},template:B})})})})]})},se=n(5e3),le=n(6287),de=n(4018);var ce,ue=function({events:e,index:t,eventsStories:n,storyIndex:i,onClose:s}){const l=(0,r.Xd)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:d,whatmoreIsStoriesTemplate:c}=(0,o.useContext)(ve),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,le.B)();const e=(0,se.k5)();e&&(0,se.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)(M.A,{posterUrl:h[t]?(0,de.tQ)(h[t]):void 0}),children:(0,u.jsx)(R.A,{events:h,index:t,onBack:s,slideDirection:m,template:d,eventsStories:n,initialStoryIndex:i})})};const he=null!==(ce="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==ce&&ce;var me=function(e){const{whatmoreEventsBrowsingTemplate:t,whatmoreIsStoriesTemplate:i,whatmoreIsCollectionsTemplate:h,whatmoreIsBannerTemplate:m,whatmoreCollectionId:v,whatmoreRootId:f,whatmoreWidgetSourceDetails:g,whatmoreIsPreviewMode:y,whatmoreUserInfo:b}=(0,o.useContext)(ve),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),he&&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)(ue,{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 he&&console.debug(`Whatmore: Shopify, rendering banner: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(G,{})});if(i)return he&&console.debug(`Whatmore: Shopify, rendering stories: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(ae,{})});if(!(0,d.io)(t))return he&&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 he&&console.debug(`Whatmore: Shopify, rendering index/page spotlight: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(X,{})});if(x.startsWith("collection")&&(0,d.io)(t)&&!0===(0,a.Vwo)(S))return he&&console.debug(`Whatmore: Shopify, rendering collection page floating popup: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(X,{})});if(x.startsWith("collection")&&(0,d.io)(t))return(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(Q,{})})}var A,I,P,k,N,L;return x.startsWith("product")?m?(he&&console.debug(`Whatmore: Shopify, rendering PDP-page banner: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(G,{})})):i?(he&&console.debug(`Whatmore: Shopify, rendering PDP-page stories: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(ae,{})})):(0,d.io)(t)||(0,d.Ig)(t)?null!==(A=window)&&void 0!==A&&null!==(I=A.Shopify)&&void 0!==I&&null!==(P=I.theme)&&void 0!==P&&P.role&&"main"===window.Shopify.theme.role||window.location.href.includes("localhost:")?(he&&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,{})}):(he&&console.debug("Whatmore: Shopify, PDP-page popup disabled."),(0,u.jsx)(u.Fragment,{})):(he&&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&&(he&&console.debug("Whatmore: initiating whatmore attribution from cart page."),(0,c.sw)("true"===C)),(0,u.jsx)(u.Fragment,{}))}return"index"===x||"collection"===x||x.startsWith("page")?m?(he&&console.debug(`Whatmore: External, rendering banner: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(G,{})})):i?(he&&console.debug(`Whatmore: External, rendering stories: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(ae,{})})):(0,d.io)(t)?(0,d.io)(t)&&$()&&!x.startsWith("collection")?(he&&console.debug(`Whatmore: External, rendering index/page spotlight: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(X,{})})):x.startsWith("collection")&&(0,d.io)(t)&&!0===(0,a.Vwo)(S)?(he&&console.debug(`Whatmore: External, rendering collection page floating popup: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(X,{})})):(he&&console.debug(`Whatmore: External, rendering index/collection page popup: ${t}`),(0,u.jsx)(u.Fragment,{})):(he&&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?(he&&console.debug(`Whatmore: External, rendering PDP-page banner: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(G,{})})):i?(he&&console.debug(`Whatmore: External, rendering PDP-page stories: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(ae,{})})):(0,d.Ig)(t)||(0,d.io)(t)?(0,a.fDZ)(S)?(he&&console.debug(`Whatmore: External, rendering PDP-page popup: ${t}`),(0,u.jsx)(o.Suspense,{fallback:null,children:(0,u.jsx)(z,{})})):(he&&console.debug("Whatmore: External, PDP-page popup disabled."),(0,u.jsx)(u.Fragment,{})):(he&&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 pe=["80505864496","26077888559"],ve=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}}),fe=function(e){return"template-banner-a"===e||"template-banner-neo"===e},we=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},ge=function(e){return"template-stories-a"===e||"template-stories-b"===e||"template-stories-neo"===e};function ye(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 be(e,t){const n=ye(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)(ve.Provider,{value:n,children:(0,u.jsx)(me,{neoFullscreen:{events:t.events,index:t.eventIndex,eventsStories:t.eventsStories,storyIndex:t.storyIndex,onClose:()=>{try{r.unmount()}catch(t){}o.remove();try{e&&e.onFullscreenClose&&e.onFullscreenClose()}catch(t){}}}})}))}function xe(e){const{rootElement:t,templateType:n,whatmoreRootId:o}=e,a=ye(e),s=i.createRoot(t);s.render((0,u.jsx)(ve.Provider,{value:a,children:(0,u.jsx)("div",{style:{display:"block",height:"100%"},id:o,className:"whatmore-root",children:(0,u.jsx)(me,{})})})),"template-embed"!==n&&pe.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)(ve.Provider,{value:n,children:(0,u.jsx)(me,{})}))}).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,I;const P=(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%",R=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,o.useEffect)(()=>{if(P.current)if(e.isPlaying){if("99423519085"===W){var t;const n=P.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)}}P.current.paused&&P.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?(P.current.paused&&((0,d.n)()||(0,a.At)())&&P.current.play().catch(()=>{}),setTimeout(()=>{P.current&&P.current.pause()},300)):P.current.pause()},[e.isPlaying,N]),(0,h.jsx)("div",{ref:k,style:{width:O,height:R,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:R,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:P,className:"whatmore-video-player-muted",width:R,height:O,preload:"metadata",loop:!0,playsInline:!0,poster:"57939755089"==W?"":e.poster,muted:null===(I=e.isVideoMuted)||void 0===I||I,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:R,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,I,P,k,N,L;const[W,O,R]=(0,i.A)({triggerOnce:!0}),D=(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"===D){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"===D){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,D]),(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"===D)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,V=(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:V,url:(0,r.s)(e.url),isPlaying:e.isPlaying,pauseFromPlayTimeInMs:F});const z=null!==(n=e.height)&&void 0!==n?n:"100%",B=null!==(d=e.width)&&void 0!==d?d:"100%";return(0,h.jsx)("div",{ref:W,style:{width:z,height:B,overflow:"hidden",display:"flex",alignItems:"center"},children:O||e.eagerLoad||"51394281658"==D||"8968077397"==D?(0,h.jsxs)("div",{itemScope:!0,itemtype:"https://schema.org/VideoObject",style:{width:z,height:B},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!==(I=null===e||void 0===e||null===(P=e.event)||void 0===P?void 0:P.thumbnail_image)&&void 0!==I?I:""}),(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:B,height:z,preload:"metadata",loop:!0,playsInline:!0,autoPlay:!0,muted:null===(L=e.isVideoMuted)||void 0===L||L,poster:"57939755089"==D?"":V,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:B,height:z,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),I=n(8762);function P(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,I.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),I=(0,r.Xd)("whatmoreShopId"),k=e.events,N=e.activeEventIndex,L=e.setActiveEventIndex,W=k[N],O=(0,m.lP)(W),R=(0,m.cb)(W),D=(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&&!R)return(0,w.jsx)(w.Fragment,{});const q=(0,h.s)("portrait"===n?O:R),M=v/100*(0,c.igk)(I),F=v/100*(0,c.Y_l)(I),V=(0,S.i)((0,c.gcj)(I),A,"portrait"===n),z=null!==V&&void 0!==V?V:"portrait"===n?(0,c.G0Q)(I):(0,c.ga9)(I),B="portrait"===n?l*M:l*F,X=(0,c.D7t)(I),Q=X?l*z:B*z,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)(I)&&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%":B,height:Q,borderWidth:(0,c.YcK)(I),borderColor:(0,c.Fwt)(I),overflow:"hidden",cursor:"pointer"},children:["28273541192"===I?(0,w.jsx)($.A,{height:"100%",width:"100%",url:q,isPlaying:g,event:{...W,poster_image:D},isVideoMuted:!g||d,source:E.N.BANNER}):(0,w.jsx)(y.A,{height:"100%",width:"100%",url:q,isPlaying:g,event:{...W,poster_image:D},isVideoMuted:!g||d,setDuration:e.setDuration,source:E.N.BANNER}),(0,w.jsx)(P,{isCTAPresent:H,events:k,activeEventIndex:N,setActiveEventIndex:L,event:W,mode:n,onMuteToggle:()=>p(!d),initialMuteState:d}),(0,c.XYM)(I)&&(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%",I=null!==(i=e.width)&&void 0!==i?i:"100%",P=(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)(P)&&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:I,height:A,overflow:"hidden",backgroundColor:E?(0,p.KVz)(P):(0,p.QSX)(P),filter:e.showQuestion?"blur(24px)":""},children:[(0,d.jsx)("div",{ref:c,style:{width:S?"0px":"100%",height:S?"0px":E?(0,p.tbf)(P):(0,p.CBm)(P)&&"product"==k?"auto":(0,p.R7q)(P)},className:"whatmore-video-player-ios-holder"}),"40273707171"!==P&&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:I,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:I,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:I,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,I=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:I,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:I,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:I,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"),I=(0,l.Xd)("whatmoreShopId"),P=(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]),[R,D]=(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)(I):1.1*(0,p.O86)(I),V=M?F:1.1;d*=V,u*=V;const z=M?(0,p.LrK)(I):k,B=M?(0,p._2D)(I):(0,p.GSq)(I),[X,Q]=(0,i.useState)(!M&&(0,p.n8Q)(I)),U=!M&&(0,p.YE3)(I);function H(e,t){O(e),e[1]<=500?D(!1):t!=R&&(D(t),Q(!1))}(0,i.useEffect)(()=>{if(!!(X&&!B))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(I),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)(I),se=Number(M?(0,p.pUQ)(I):L)||0,le=!(X&&!B)&&R&&B,de=x({whatmoreShopId:I,baseBottom:se,widgetWidth:le?ie:u,widgetHeight:le?ie*(16/9):d,side:z,horizontalPadding:le?16:Number(M?(0,p.D2A)(I):N)||0});var ce=!1,ue=0,he=0;function me(e){ce=e}const pe=(0,v.jsx)("div",{className:"73490825529"==I?"whatmore-root wht-popup":"wht-popup",children:X&&!B?(0,v.jsx)(v.Fragment,{}):R&&B?(0,v.jsx)("div",{style:"left"===z?{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"===z?"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:P?"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"===z?{left:M?(0,p.D2A)(I)+"px":N+"px",bottom:de+"px",position:"fixed",zIndex:ae}:{right:M?(0,p.D2A)(I)+"px":N+"px",bottom:de+"px",position:"fixed",zIndex:ae},children:(0,v.jsxs)("div",{style:{boxSizing:"border-box",width:e.isSpotlight&&"60122562760"==I?d+"px":u+"px",height:e.isSpotlight&&"60122562760"==I?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"===z?"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"==I?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"==I||"67211264052"==I;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.d(t,{CP:function(){return w},Lt:function(){return l},R3:function(){return g},RX:function(){return h},_N:function(){return f},iL:function(){return p},js:function(){return d},oV:function(){return m},sw:function(){return c},tN:function(){return v}});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,h=null,m={},p=null,v=null,f=null,w={};const g=(0,o.Xd)("whatmoreShopId");let y=(0,s.CK)(),b=null===(t=localStorage)||void 0===t?void 0:t.wht_is_impression,x=y.length>0;y.forEach(e=>{w.hasOwnProperty(null===e||void 0===e?void 0:e.product_id)||(w[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 S=localStorage.getItem("_whatmore_session_id"),j=localStorage.getItem("wht_user_group"),_=window.whatmore&&window.whatmore.abTestConfig&&window.whatmore.abTestConfig.ab_test_id||null,C=window.whatmore&&window.whatmore.abTestConfig&&null!=window.whatmore.abTestConfig.version?window.whatmore.abTestConfig.version:null,T=localStorage.getItem("_whatmore_user_id"),E=localStorage.getItem("_whatmore_last_video_view_session"),$=(()=>{try{var e;return JSON.parse(null!==(e=localStorage.getItem("_whatmore_add_to_cart_products"))&&void 0!==e?e:"[]")}catch(t){return[]}})(),A=new Set($.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[]}})(),P=new Set(I.map(e=>String(null===e||void 0===e?void 0:e.variant_id))),k={buynow:3,direct:2,indirect:1};await d().then(e=>e.json()).then(t=>{l=t.token,n=t.attributes;let a={};try{var d,y;const e=null===(d=n)||void 0===d?void 0:d._wtot;a="string"===typeof e?JSON.parse(e):null!==e&&void 0!==e?e:{};const o=new Set((null!==(y=t.items)&&void 0!==y?y:[]).map(e=>String(null===e||void 0===e?void 0:e.product_id)));a=Object.fromEntries(Object.entries(a).filter(([e])=>o.has(String(e))))}catch(L){a={}}let $=[];if($=!0===e?t.items.map(e=>{const t=w[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=w[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==$.length)return console.debug("Whatmore :: no cart items available for view products"),null;let I={},N={};if(null!=S){const e={wht_session_id:null!==E&&void 0!==E?E:S,wht_user_id:T,...j&&{wht_user_group:j},..._&&{wht_ab_test_id:_},...null!=C&&{wht_ab_test_version:C}};N={[r.Uv]:(0,r.dK)(g)?JSON.stringify(e):e,[r.Um]:""}}if(b||x){const e="1";N[x?r.Rm:r.AG]=e,N[x?r.bZ:r.SW]=""}!(0,i.tSy)(g)&&(N.hasOwnProperty(r.Uv)||N.hasOwnProperty(r.Rm)&&!n.hasOwnProperty(r.Rm)||N.hasOwnProperty(r.AG)&&!n.hasOwnProperty(r.AG))&&u(N),$.map((t,n)=>{if(c=t.key,h=t.quantity,m=t.properties,p=t.widget_info,v=t.location,f=t.userType,("63330517149"==g||"77604192550"==g||"64157352183"==g||"62758289602"==g||"65972830359"==g||"75310563627"==g||(0,i.CpV)(g))&&w.hasOwnProperty(JSON.stringify(!0===e?t.variant_id:t.product_id))){const e="65972830359"==g||"75310563627"==g||(0,i.CpV)(g),n=e?"_wtot":"wtot";let o=(0,s.wm)()+`#${p}`;if(e){var l;const e=P.has(String(null===t||void 0===t?void 0:t.variant_id))?"buynow":A.has(String(null===t||void 0===t?void 0:t.product_id))?"direct":"indirect",n=a[null===t||void 0===t?void 0:t.product_id];o=(null!==(l=k[("string"===typeof n?n:"").split(":")[1]])&&void 0!==l?l:0)>=k[e]?n:o+`:${e}`}I={...I,[null===t||void 0===t?void 0:t.product_id]:o};u({[n]:e?{...a,...I}:I})}null!==m&&r.B_ in m||!w.hasOwnProperty(JSON.stringify(!0===e?t.variant_id:t.product_id))||async function(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}};const f=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)})}(c,h,m,p,v,f,!0,b,x)})}).catch(e=>{console.error("Whatmore :: Error while fetching cart_token for cart attribute update.",e)})}async function u(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 h(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"),h=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,...h&&{wht_user_group:h},...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 u(t)}return Promise.resolve({ok:!0,json:()=>{}})}function m(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 p(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 v(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 f(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 w(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 g(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]}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[866],{1518:function(t,e,o){o.r(e),o.d(e,{fireNeoAtcClick:function(){return n.fireNeoAtcClick},fireNeoBuyNowMetric:function(){return n.fireNeoBuyNowMetric},fireNeoOutsideAtcFunnel:function(){return n.fireNeoOutsideAtcFunnel},fireNeoProductClick:function(){return n.fireNeoProductClick},neoAddAllToCart:function(){return l},neoAddToCart:function(){return u}});var n=o(3297),r=o(5118),i=o(4563),a=o(5443),c=o(2567);function d(t){return(0,a.hG)(t,"brand_metadata->domain_context")}async function s(t,e,o){const{product:d,event:s,customizations:u,widget:l,userType:p,closeClickComponent:h,onState:m}=t,f=(0,c.Ry)(),v=(0,r.getVariantIdFromSelectedOption)(o,e);if(!v)return m&&m("init"),{status:"noop"};m&&m("atcApiCallInProgress");try{const t="55586586685"===f&&"function"===typeof h;await(0,i.rH)(f,t?h:()=>{},t?400:100,window.location.hostname,v,d.client_product_id,l,s&&s.location,p,d.product_link),(0,n.fireNeoAtcMetric)(s,d,1),(0,a.hG)(u,"product_config->navigate_to_cart_page")&&setTimeout(()=>{window.location.href=`${window.Shopify&&window.Shopify.routes&&window.Shopify.routes.root||"/"}cart`},500);const e=o.filter(t=>t&&"Default Title"!==t).join(" \xb7 ");return m&&m("added",e),{status:"added",variantId:v,variantLabel:e}}catch(w){return m&&m("errored"),console.error("Whatmore :: neo ATC add failed",w),{status:"errored"}}}async function u(t){const{product:e,event:o,customizations:n,mode:i="direct",selectedOptions:a,variants:u,onState:l}=t;if(!e||!o)return{status:"noop"};const p=(0,c.Ry)();if(a&&u)return s(t,u,a);let h;l&&l("productVariantDetailsApiCallInProgress");try{h=await(0,r.productDetailsDetailed)(e,d(n),p)}catch(v){return l&&l("errored"),{status:"errored"}}const m=h&&h.variants||[],f=(0,r.getVariantOptions)(h);if((0,r.isSingleVariantProduct)(f)||"direct"===i){if(!(0,r.atleastOneVariantAvailableInStock)(m))return l&&l("errored"),{status:"errored"};return s(t,m,[(0,r.getFirstAvailableOption)(f[0]),(0,r.getFirstAvailableOption)(f[1]),(0,r.getFirstAvailableOption)(f[2])])}return l&&l("awaitingVariantSelection"),{status:"needs_selection",variantOptions:f,variants:m}}async function l(t){const{products:e,event:o,customizations:a,widget:s,userType:u,onState:l}=t;if(!e||0===e.length||!o)return{status:"noop",added:0};const p=(0,c.Ry)();l&&l("productVariantDetailsApiCallInProgress");const h=(await Promise.all(e.map(async t=>{try{const e=await(0,r.productDetailsDetailed)(t,d(a),p),o=e&&e.variants||[],n=(0,r.getVariantOptions)(e);if(!(0,r.isSingleVariantProduct)(n))return null;if(!(0,r.atleastOneVariantAvailableInStock)(o))return null;const i=(0,r.getVariantIdFromSelectedOption)([(0,r.getFirstAvailableOption)(n[0]),(0,r.getFirstAvailableOption)(n[1]),(0,r.getFirstAvailableOption)(n[2])],o);return i?{product:t,variantId:i}:null}catch(e){return null}}))).filter(Boolean);if(0===h.length)return l&&l("init"),{status:"noop",added:0};l&&l("atcApiCallInProgress");try{const t=h.slice(0,-1),e=h[h.length-1];if(t.length){if(!await(0,i.ME)(t.map(t=>t.variantId),1))for(const{product:e,variantId:n}of t)await(0,i.rH)(p,()=>{},100,window.location.hostname,n,e.client_product_id,s,o&&o.location,u,e.product_link)}return await(0,i.rH)(p,()=>{},100,window.location.hostname,e.variantId,e.product.client_product_id,s,o&&o.location,u,e.product.product_link),h.forEach(({product:t})=>(0,n.fireNeoAtcMetric)(o,t,1)),l&&l("added"),{status:"added",added:h.length}}catch(m){return l&&l("errored"),console.error("Whatmore :: neo bulk ATC failed",m),{status:"errored",added:0}}}},3297:function(t,e,o){o.r(e),o.d(e,{fireNeoAtcClick:function(){return h},fireNeoAtcMetric:function(){return w},fireNeoBuyNowMetric:function(){return v},fireNeoOutsideAtcFunnel:function(){return m},fireNeoProductClick:function(){return f}});var n=o(6694),r=o(9383),i=o(5443),a=o(2567),c=o(1637),d=o(7156);const s=["56352899156"];function u(t){if(t)return t.startsWith("index")?"home":t.startsWith("product")?"product_page":t.startsWith("collection")||t.startsWith("page")?"collection_page":void 0}const l={[d.O.EVENT_VIEW]:{gate:"meta_pixel_events->video_click_event",action:"whatmore_video_click_event",custom:"video_clicked"},[d.O.PRODUCT_TILE_SHOPNOW_CLICKED]:{gate:"meta_pixel_events->video_product_tile_click_event",action:"whatmore_product_tile_click_event",custom:"video_product_tile_clicked"}};function p(t,e,o,n,r){const c=l[t];if(c){if("function"===typeof fbq){var d;const t=!!(0,i.hG)(n,c.gate),r=null===o||void 0===o||null===(d=o.meta_actions)||void 0===d?void 0:d[c.custom];if(t||r){const t={id:null===e||void 0===e?void 0:e.client_product_id,product_url:null===e||void 0===e?void 0:e.product_link};fbq("trackCustom",c.action,t),r&&setTimeout(()=>{r.forEach(e=>fbq("trackCustom",e,t))},500)}}var p,h,m;if(s.includes((0,a.Ry)())&&"object"===typeof window.dataLayer)window.dataLayer.push({event:"video_interaction",page_type:null!==(p=u(null===r||void 0===r?void 0:r.landingLocationType))&&void 0!==p?p:"NA",selection_type:c.action,video_name:null!==(h=null===o||void 0===o?void 0:o.event_id)&&void 0!==h?h:"NA",video_percentage:"NA",product_name:null!==(m=null===e||void 0===e?void 0:e.title)&&void 0!==m?m:"NA"})}}function h({event:t,productList:e,ctaList:o=[],customizations:r,widgetSourceDetails:c,interactionType:l}){var p;if(!t||!e||0===e.length)return;const h=(0,a.Ry)();(0,n.trackWhatmoreAnalyticsEvent)({userInteractionType:l||d.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:c,event:t,productList:e,ctaList:o}),function(t,e,o){var n;if("function"!==typeof fbq)return;const r=!!(0,i.hG)(o,"meta_pixel_events->video_atc_event"),a=null===e||void 0===e||null===(n=e.meta_actions)||void 0===n?void 0:n.video_atc_clicked;if(!r&&!a)return;const c={id:null===t||void 0===t?void 0:t.client_product_id,product_url:null===t||void 0===t?void 0:t.product_link};fbq("trackCustom","whatmore_video_atc_event",c),a&&setTimeout(()=>{a.forEach(t=>fbq("trackCustom",t,c))},500)}(null!==(p=e[1])&&void 0!==p?p:e[0],t,r),function(t,e,o,n){var r,i,a,c,d,l;s.includes(t)&&"object"===typeof window.dataLayer&&window.dataLayer.push({event:"video_interaction",page_type:null!==(r=u(null===e||void 0===e?void 0:e.landingLocationType))&&void 0!==r?r:"NA",selection_type:"whatmore_video_atc_event",video_name:null!==(i=null===o||void 0===o?void 0:o.event_id)&&void 0!==i?i:"NA",video_percentage:"NA",product_name:null!==(a=null!==(c=null===n||void 0===n||null===(d=n[1])||void 0===d?void 0:d.title)&&void 0!==c?c:null===n||void 0===n||null===(l=n[0])||void 0===l?void 0:l.title)&&void 0!==a?a:"NA"})}(h,c,t,e)}function m({event:t,product:e,customizations:o,widgetSourceDetails:i}){var a,c;if(!t)return;(0,r.increaseViewCount)(t);const s=e?[e]:null!==(a=t.products)&&void 0!==a?a:[];(0,n.trackWhatmoreAnalyticsEvent)({userInteractionType:d.O.EVENT_VIEW,widgetSourceDetails:i,event:t,productList:s,ctaList:t.cta}),p(d.O.EVENT_VIEW,null!==(c=s[1])&&void 0!==c?c:s[0],t,o,i),(0,n.trackWhatmoreAnalyticsEvent)({userInteractionType:d.O.PRODUCT_CTA_VIEW,widgetSourceDetails:i,event:t,productList:s,ctaList:t.cta})}function f({event:t,product:e,kind:o,customizations:r,widgetSourceDetails:i}){if(!t||!e)return;const a="thumbnail"===o?d.O.VIDEO_TILE_PRODUCT_THUMBNAIL_CLICKED:d.O.PRODUCT_TILE_SHOPNOW_CLICKED;(0,n.trackWhatmoreAnalyticsEvent)({userInteractionType:a,widgetSourceDetails:i,event:t,productList:[e],ctaList:t.cta}),p(a,e,t,r,i)}function v(t,e){t&&e&&((0,a.U)()||(0,a.Ry)()===c.YZ||(0,r.increaseEventProductBuyNowCount)(t,e))}function w(t,e,o=1){t&&e&&((0,a.U)()||(0,a.Ry)()===c.YZ||(0,r.increaseEventProductAddToCartCount)(t,e,o))}},4563:function(t,e,o){o.d(e,{ME:function(){return s},js:function(){return c},rH:function(){return u}});var n=o(5566),r=o(6080),i=o(2567),a=o(5443);async function c(){const t="https://"+window.location.hostname+"/cart.json";return await fetch(t,{method:"GET"})}async function d(t,e,o,c,d="default",s,u,l,p){const h=(0,i.Ry)(),m=u?(0,n.wm)()+("72201044272"==h?`#${c}#${d}#${s?"olduser":"newuser"}:direct`:`#${c}:direct`):p?"_wt_vs":l?"_wt_vi":"";if(""==m||"_wt_vs"==m||"_wt_vi"==m||"77604192550"==h||"64157352183"==h||"80856187185"==h||"86486974743"==h||"62758289602"==h||"65972830359"==h||"75310563627"==h||"86968402213"==h||(0,a.hG)((0,a.VA)(),"order_tracking->track_using_wtot"))return;let f={id:t,quantity:e,properties:{...m?{[r.B_]:m}:{},...o}};return await fetch("https://"+window.location.hostname+"/cart/change.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)}).then(t=>t.json()).catch(t=>{console.error("Whatmore :: Error while updating cart line item properties direct.",t)})}async function s(t,e=1){if(!t||0===t.length)return!0;try{return(await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:t.map(t=>({id:t,quantity:e}))})})).ok}catch(o){return!1}}async function u(t,e,o,s,u="",l="",p="",h="",m="",f="",v=null){(0,i.yI)();const w=t=>{c().then(t=>t.json()).then(e=>{const o=e.items.find(e=>e.id==t);if(!o)return;d(o.key,o.quantity,o.properties,p,h,m,!0,!0,!0)}).catch(t=>{console.error("[Whatmore] updateATCLineItemProperties error:",t)})};if("STRNV8MHJTF"==t||"STR6HU283UZ"==t||"STR9T3LLEJB"==t||"STRWJMIOJNX"==t||"STRUDQ36YAC"==t||"STR1D5ONOZX"==t){console.log("Executing cart refresh script..");return void(document.getElementById("whatsmorecart").value=Math.random())}if("57217876118"===t){async function j(t,e=1){const o=new FormData;o.append("id",t),o.append("quantity",e),o.append("sections","side-cart");const n=await fetch("/cart/add.js",{method:"POST",body:o,headers:{"X-Requested-With":"XMLHttpRequest",Accept:"application/javascript"}}).then(t=>t.json());n.status?console.error("atc failed",n.description):(window.ajaxCart.load(n),setTimeout(()=>{w(t)},500))}return void j(u,1).then(()=>{setTimeout(e,o)}).catch(t=>{console.error("[Whatmore] ATC 57217876118 error:",t)})}if("75310563627"===t){async function O(t,e=1){const o=new FormData;o.append("id",t),o.append("quantity",e),o.append("sections","cart-drawer,cart-icon-bubble");const n=await fetch("/cart/add.js",{method:"POST",body:o,headers:{Accept:"application/javascript"}}).then(t=>t.json());if(n.status)return void console.error("atc failed",n.description);const r=document.querySelector("cart-drawer");r&&(r.renderContents(n),r.classList.remove("is-empty"),r.open())}return O(u,1).then(()=>{setTimeout(()=>{w(u)},500)}).catch(t=>{console.error("[Whatmore] ATC 75310563627 error:",t)}),void setTimeout(e,o)}if("81308287252"===t)return(async()=>{const t={};(0,a.hG)((0,a.VA)(),"order_tracking->track_using_wtot")||(t[r.B_]=`${(0,n.wm)()}#${p}:direct`);const e=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:Number(u),quantity:1,properties:t})}).then(t=>t.json()).catch(()=>null);e&&!e.status?setTimeout(()=>{const t=document.querySelector(".iCartBtnToggle")||document.querySelector("#iCartBtnToggle");t?t.click():console.warn("[Whatmore] iCart toggle not found for 81308287252")},250):console.error("[Whatmore] ATC 81308287252 failed:",e&&e.description)})(),void setTimeout(e,o);if("67841720509"===t){async function E(t,e=1){const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:Number(t),quantity:e})});o.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 o.text())}return E(u,1).then(()=>{setTimeout(()=>{w(u)},500)}).catch(t=>{console.error("[Whatmore] ATC 67841720509 error:",t)}),void setTimeout(e,o)}if("72603631788"===t||"5220302897"===t){const k=new FormData;k.append("id",u),k.append("quantity","1"),v&&k.append("properties[Size]",v);try{const q=await fetch("/cart/add.js",{method:"POST",body:k}),N=await q.json();N.id?setTimeout(()=>{w(u),window.location.href="/cart"},500):console.error("Afrozeh ATC failed:",N)}catch(C){console.error("Afrozeh ATC error:",C)}return void setTimeout(e,o)}if("67083239728"===t){try{const P=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:u,quantity:1}]})});P.ok||console.error("[ATC] Add to cart failed:",P.status)}catch(C){console.error("[ATC] Error while adding to cart:",C)}return setTimeout(()=>{w(u)},1e3),void setTimeout(e,o)}if("61442818186"===t){async function W(t,e=1){const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}]})});if(!o.ok)return void console.error("[ATC] Add to cart failed:",o.status);document.dispatchEvent(new CustomEvent("cart:build"));const n=document.querySelector(".js-drawer-open-cart");n&&n.click()}return W(u,1).then(()=>{setTimeout(()=>{w(u)},500)}).catch(t=>{console.error("[Whatmore] ATC 61442818186 error:",t)}),void setTimeout(e,o)}if("62226792677"===t){async function L(t,e=1){const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}]})});var n;o.ok?("function"===typeof(null===(n=window.cleverSopify)||void 0===n?void 0:n.onCartUpdate)&&window.cleverSopify.onCartUpdate(1,1,l),setTimeout(()=>{w(t)},500)):console.error("[ATC] Add to cart failed:",o.status)}return L(u).catch(t=>{console.error("[Whatmore] Error:",t)}),void setTimeout(e,o)}if("60595503283"===t){async function I(t,e=1){try{const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:t,quantity:e})});o.ok?setTimeout(()=>{w(t),window.location.href="/cart"},500):console.error("Failed to add item to cart:",o.status)}catch(C){console.error("Error adding to cart:",C)}}return I(u,1),void setTimeout(e,o)}if("72915616066"===t){function D(){var t,e;const o=window.customElements.get("cart-drawer")&&document.querySelector("cart-drawer");let n=[];const r=new CustomEvent("cart:prepare-bundled-sections",{bubbles:!0,detail:{sections:n}});document.documentElement.dispatchEvent(r);const i=n.length>0,a="string"===typeof(null===(t=window.themeVariables)||void 0===t||null===(e=t.settings)||void 0===e?void 0:e.cartType);return(!a||"page"!==window.themeVariables.settings.cartType)&&(o&&i&&a)}async function J(t,e){document.documentElement.dispatchEvent(new CustomEvent("theme:loading:start",{bubbles:!0}));let o=[];document.documentElement.dispatchEvent(new CustomEvent("cart:prepare-bundled-sections",{bubbles:!0,detail:{sections:o}}));const n=await fetch(`${window.Shopify.routes.root}cart/add.js`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}],sections:o.join(",")})});if(document.documentElement.dispatchEvent(new CustomEvent("theme:loading:end",{bubbles:!0})),!n.ok)return console.error("[ATC] Add to cart failed:",n.status),document.dispatchEvent(new CustomEvent("cart:refresh")),!1;const r=await n.json(),i=await(await fetch(`${window.Shopify.routes.root}cart.js`)).json();return i.sections=r.sections,document.documentElement.dispatchEvent(new CustomEvent("cart:change",{bubbles:!0,detail:{baseEvent:"variant:add",cart:i}})),setTimeout(()=>{w(t)},500),!0}async function R(t,e=1){return D()?J(t,e):async function(t,e,o){const n=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}]})});return n.ok?(setTimeout(()=>{o(t)},500),setTimeout(()=>{var t,e;window.location.href=`${(null===(t=window.Shopify)||void 0===t||null===(e=t.routes)||void 0===e?void 0:e.root)||"/"}cart`},1e3),!0):(console.error("[ATC Fallback] Add to cart failed:",n.status),!1)}(t,e,w)}return R(u).catch(t=>{console.error("[Whatmore] Error:",t)}),void setTimeout(e,o)}if("44061622423"===t){async function V(t,e=1){const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}]})});o.ok?window.cart&&"function"===typeof window.cart.getCart?(window.cart.getCart(),setTimeout(()=>{w(t)},500)):fetch("/cart?section_id=api-cart-items").then(t=>t.text()).then(e=>{const o=document.createElement("div");if(o.innerHTML=e,window.cart&&"function"===typeof window.cart.build){const t=o.querySelector("[data-api-content]");t&&window.cart.build(t)}document.dispatchEvent(new CustomEvent("theme:product:added",{bubbles:!0})),setTimeout(()=>{w(t)},500)}).catch(()=>{const e=document.querySelector('[href="/cart"], [data-cart-toggle], a[href*="/cart"]');e&&e.click(),setTimeout(()=>{w(t)},500)}):console.error("[ATC] Add to cart failed:",o.status)}return V(u).catch(t=>{console.error("[Whatmore] Error:",t)}),void setTimeout(e,o)}if("60183445561"===t){async function x(t,e=1,o="/cart"){const n=new URLSearchParams;n.append("id",t),n.append("quantity",e.toString()),n.append("return_to",o);const r=await fetch("https://tapee.in/cart/add",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:n.toString(),credentials:"include"}),i=await r.text();return r.ok&&setTimeout(()=>{w(t),window.location.href="https://tapee.in/cart"},500),i}return x(u).catch(t=>{console.error("Error:",t)}),void setTimeout(e,o)}if("22907887"===t){async function F(t,e=1){const o=new FormData;o.append("id",t),o.append("quantity",e.toString());const n=document.querySelector("cart-notification, cart-drawer");if(n){const t=n.getSectionsToRender();o.append("sections",t.map(t=>t.id).join(","))}o.append("sections_url",window.location.pathname);const r=await fetch("/cart/add.js",{method:"POST",body:o});if(!r.ok){const t=await r.text();throw new Error(`Failed to add to cart: ${t}`)}const i=await r.json();return n&&n.renderContents&&n.renderContents(i),document.body.classList.remove("overflow-hidden"),document.querySelectorAll(".atc-container.active, .atc-variant-container.active, .pdp-atc-container.active").forEach(t=>t.classList.remove("active")),window.dispatchEvent(new CustomEvent("cart:added",{detail:{variantId:t,quantity:e,data:i}})),i}return F(u).then(t=>{setTimeout(()=>{w(u)},500)}).catch(t=>{console.error("Error:",t)}),void setTimeout(e,o)}if("28575536"===t||"64287408360"===t||"8473575520"===t||"65972830359"===t||"75000480020"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:u,quantity:1})}).then(t=>{if(!t.ok)throw new Error("Add to cart failed");return t.json()}).then(t=>{"function"===typeof window.handleFloCartBtn&&window.handleFloCartBtn(),setTimeout(()=>{w(u)},500)}).catch(t=>console.error("[Whatmore] Ripped Up Nutrition ATC error:",t)),void setTimeout(e,o);if("58692075703"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:u,quantity:1})}).then(t=>{if(!t.ok)throw new Error("Add to cart failed");return t.json()}).then(t=>{"function"===typeof window.openGokwikSideCart&&window.openGokwikSideCart(),setTimeout(()=>{w(u)},500)}).catch(t=>console.error("[Whatmore] Lakshita ATC error:",t)),void setTimeout(e,o);if("22907887"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:u,quantity:1})}).then(t=>t.json()).then(t=>{setTimeout(()=>{w(u)},500)}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("58501496967"===t)return(async()=>{const t=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:u,quantity:1}]})});t.ok?(window.ajaxCart&&"function"===typeof window.ajaxCart.load&&window.ajaxCart.load(),window.jQuery&&window.jQuery("body").trigger("drawer.open"),setTimeout(()=>{w(u)},500)):console.error("[Whatmore] ATC 58501496967 failed:",t.status)})().catch(t=>console.error("[Whatmore] ATC 58501496967 error:",t)),void setTimeout(e,o);if("56444977250"===t){const G=document.querySelector('button[data-pf-type="ProductATC2"]');return G?(l&&G.setAttribute("data-product-id",l),G.click(),setTimeout(()=>{c().then(t=>t.json()).then(t=>{const e=t.items.find(t=>String(t.id)===String(u));if(e){d(e.key,e.quantity,e.properties,p,h,m,!0,!0,!0)}})},500),void setTimeout(e,o)):(fetch(null===f||void 0===f||null===(y=f.split("?"))||void 0===y?void 0:y[0]).then(t=>t.text()).then(t=>{const e=(new DOMParser).parseFromString(t,"text/html").querySelector('button[data-pf-type="ProductATC2"]');e&&l&&e.setAttribute("data-product-id",l)}),void setTimeout(e,o));var y}if("64379584700"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:u,quantity:1})}).then(t=>t.json()).then(t=>fetch("/cart.js")).then(t=>t.json()).then(t=>{$(".paira-cart-item-count").text(t.item_count),$(".paira-cartEmpty").hide(),$(".paira-cartNotEmpty").show(),$(".paira-cart-total-price .money").text("Rs. "+t.total_price/100),$(".cart-drop").addClass("open"),$(".cart-icon").trigger("mouseenter"),setTimeout(()=>{w(u)},500)}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("66947219508"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:Number(u),quantity:1}]})}).then(async()=>{const t=document.getElementById("mini-cart");t&&"function"===typeof t._rerenderCart&&await t._rerenderCart({detail:{openMiniCart:!0}}),setTimeout(()=>{w(u)},500)}).catch(t=>console.error("[Whatmore] ATC 66947219508 error:",t)),void setTimeout(e,o);if("76767920441"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:u,quantity:1})}).then(t=>t.json()).then(t=>{"function"===typeof window.openGokwikSideCart&&window.openGokwikSideCart(),setTimeout(()=>{w(u)},500)}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("70840582336"===t){const M=u,U=1,B=document.querySelector('product-form form.product-form, form[action*="/cart/add"]');if(B){let H=B.querySelector('input[name="id"]');H||(H=document.createElement("input"),H.type="hidden",H.name="id",B.appendChild(H)),H.disabled=!1,H.value=M;const Q=B.querySelector('input[name="quantity"]');Q&&(Q.value=U);const z=B.querySelector('button[data-add-to-cart], button[type="submit"]');return z?(z.dispatchEvent(new MouseEvent("pointerdown",{bubbles:!0})),z.click(),z.dispatchEvent(new MouseEvent("pointerup",{bubbles:!0}))):console.warn("[ATC] button not found"),setTimeout(()=>{w(M)},500),void setTimeout(e,o)}return void fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:M,quantity:U}),credentials:"same-origin"}).then(()=>{setTimeout(()=>{w(M)},500),setTimeout(e,o)}).catch(t=>{console.error("[ATC] error for 70840582336:",t),setTimeout(e,o)})}if("64683278550"===t){try{const K=document.querySelector('form[action="/cart/add"]');if(!K)return console.warn("[ATC 64683278550] form not found"),void setTimeout(e,o);const X=K.querySelector('input[name="id"]');if(!X)return console.warn("[ATC 64683278550] id input not found"),void setTimeout(e,o);X.value=u;const Z=K.querySelector('button[type="submit"]');if(!Z)return console.warn("[ATC 64683278550] submit button not found"),void setTimeout(e,o);Z.click(),setTimeout(()=>{w(u)},500),setTimeout(e,o)}catch(A){console.error("[ATC 64683278550] error:",A),setTimeout(e,o)}return}if("95562924310"===t||"61810999367"===t){try{const Y=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:u,quantity:1}]})});if(Y.ok){const tt=await Y.json();document.dispatchEvent(new CustomEvent("cart:update",{detail:{cart:tt}})),document.dispatchEvent(new CustomEvent("theme:cart:refresh",{detail:{target:"product_flood_atc"},bubbles:!0})),setTimeout(()=>{w(u)},500)}else console.error("[ATC 95562924310] Add to cart failed:",Y.status)}catch(C){console.error("[ATC 95562924310] error:",C)}return void setTimeout(e,o)}if("45050691744"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:u,quantity:1})}).then(t=>t.json()).then(t=>{jQuery.ajax({type:"GET",url:"/",dataType:"html",success:function(t){jQuery(".drawer__inner.cart-drawer-content").html(jQuery(t).find(".drawer__inner.cart-drawer-content").html()),jQuery(".custom_doscunt_bar").html(jQuery(t).find(".custom_doscunt_bar").html()),jQuery(".some_js_items").html(jQuery(t).find(".some_js_items").html()),jQuery(".header-cart-icon__count").html(jQuery(t).find(".header-cart-icon__count").html());try{jQuery("#FreeShippingText").slick({dots:!0,autoplay:!0,autoplaySpeed:2500,arrows:!0})}catch(e){}jQuery("div#HeaderCartIcon button").trigger("click"),setTimeout(()=>{w(u)},500)}})}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("55337746621"===t){async function et(t,e=1){var o;await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}]})});const n=await fetch("/cart.js").then(t=>t.json());document.querySelectorAll("[data-cart-count]").forEach(t=>{const e=t.querySelector(":scope > span:last-of-type");e&&(e.textContent=n.item_count)});const r=document.querySelector("[data-cart-container]");if(!r)return;const i=((null===(o=r.parentElement)||void 0===o?void 0:o.id)||"").replace("shopify-section-","");let a=null;if(i){const t=await fetch(`/?sections=${encodeURIComponent(i)}`).then(t=>t.json()).catch(()=>null);if(null!==t&&void 0!==t&&t[i]){const e=document.createElement("div");e.innerHTML=t[i];const o=e.querySelector("[data-cart-container]");o&&(a=o.innerHTML)}}if(!a){const t=await fetch("/cart").then(t=>t.text()),e=(new DOMParser).parseFromString(t,"text/html").querySelector("[data-cart-container]");e&&(a=e.innerHTML)}if(!a)return;r.innerHTML=a,r.classList.add("is-drawer-open"),document.body.classList.add("is-scroll-disabled");const c=()=>{r.classList.remove("is-drawer-open"),document.body.classList.remove("is-scroll-disabled")};r.querySelectorAll("[data-cart-drawer-toggle]").forEach(t=>{t.addEventListener("click",t=>{t.preventDefault(),c()})}),document.addEventListener("keydown",t=>{"Escape"===t.key&&c()},{once:!0})}return et(u,1).then(()=>{setTimeout(()=>{w(u)},500)}).catch(t=>{console.error("[Whatmore] ATC 55337746621 error:",t)}),void setTimeout(e,o)}if("12175954"===t){async function ot(t,e=1){const o=await fetch(theme.routes.cart_add_url,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}]})});return o.ok?(document.dispatchEvent(new CustomEvent("theme:cartchanged",{bubbles:!0,cancelable:!1,detail:{openDrawer:!0}})),setTimeout(()=>{w(t)},500),!0):(console.error("[ATC] Add to cart failed:",o.status),!1)}return ot(u).catch(t=>{console.error("[Whatmore] ATC 12175954 error:",t)}),void setTimeout(e,o)}if("2754609263"===t){const nt=()=>{const t=["cart:open","CartDrawer:open","drawerOpen"],e=[document,window];try{window.parent&&window.parent!==window&&window.parent.document&&e.push(window.parent.document)}catch(n){}const o=t=>e.forEach(e=>{try{e.dispatchEvent(new CustomEvent(t,{bubbles:!0}))}catch(n){console.error(`[Whatmore] ATC 2754609263 dispatch ${t} failed:`,n)}});["cart:refresh","cart:build","cart:updated"].forEach(o),setTimeout(()=>t.forEach(o),150)};async function rt(t,e=1){var o,n,r;const i=(null===(o=window.Shopify)||void 0===o||null===(n=o.routes)||void 0===n?void 0:n.root)||"/",a={"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest",Accept:"application/javascript"},c=Number(e)||1,d=()=>fetch(`${i}cart/add.js`,{method:"POST",headers:a,body:JSON.stringify({items:[{id:t,quantity:c}]})}).then(t=>t.json()),s=await fetch(`${i}cart.js`,{headers:{Accept:"application/json"},cache:"no-store"}).then(t=>t.json()).catch(()=>null),u=null===s||void 0===s||null===(r=s.items)||void 0===r?void 0:r.find(e=>e.id==t);let l;var p,h;(u?(l=await fetch(`${i}cart/change.js`,{method:"POST",headers:a,body:JSON.stringify({id:u.key,quantity:u.quantity+c})}).then(t=>t.json()).catch(()=>null),l&&!l.status||(console.warn("[Whatmore] ATC 2754609263 change.js rejected, falling back to add.js"),l=await d())):l=await d(),l&&!l.status)?(nt(),setTimeout(()=>{w(t)},500)):console.error("[Whatmore] ATC 2754609263 failed:",(null===(p=l)||void 0===p?void 0:p.description)||(null===(h=l)||void 0===h?void 0:h.message))}return rt(u).catch(t=>{console.error("[Whatmore] ATC 2754609263 error:",t)}),void setTimeout(e,o)}if("25786679341"===t)return(async(t,e)=>{const o={};(0,a.hG)((0,a.VA)(),"order_tracking->track_using_wtot")||(o[r.B_]=`${(0,n.wm)()}#${p}:direct`);const i=await fetch(`${(null===(t=window.Shopify)||void 0===t||null===(e=t.routes)||void 0===e?void 0:e.root)||"/"}cart/add.js`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:Number(u),quantity:1,properties:o}]})}).then(t=>t.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 t=document.querySelector("a.vd-bag");t?t.click():console.warn("[Whatmore] vdOpenCart missing and no .vd-bag for 25786679341")}else console.error("[Whatmore] ATC 25786679341 failed:",i&&i.description)})().catch(t=>{console.error("[Whatmore] ATC 25786679341 error:",t)}),void setTimeout(e,o);if("8111554613"===t)return(async()=>{const t=()=>{const t=document.querySelector("cart-drawer#CartDrawer");t?(document.querySelectorAll(".add-to-cart-popup, .exit-intent-popup").forEach(t=>t.classList.add("hide")),t.removeAttribute("hidden"),t.removeAttribute("inert"),"function"!==typeof t.show||t.open?(t.setAttribute("open","true"),t.setAttribute("active","true")):t.show()):console.warn("[Whatmore] cart-drawer#CartDrawer not found for 8111554613")},e=()=>{const e=document.querySelector("cart-drawer#CartDrawer");let o=!1;const n=()=>{o||(o=!0,r.disconnect(),clearTimeout(i),t())},r=new MutationObserver(()=>{const t=document.querySelector("cart-drawer#CartDrawer");t&&t!==e&&n()});r.observe(document.body,{childList:!0,subtree:!0});const i=setTimeout(n,3e3)};if("function"!==typeof window.cartGiftUpdate){console.warn("[Whatmore] cartGiftUpdate missing for 8111554613, falling back to /cart/add.js");const e=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:Number(u),quantity:1}]})}).then(t=>t.json()).catch(()=>null);return!e||e.status?void console.error("[Whatmore] ATC 8111554613 fallback failed:",e&&e.description):void setTimeout(()=>{w(u),document.dispatchEvent(new CustomEvent("cart:updated",{detail:{cart:e}})),t()},500)}const{price:o,productType:n}=await(async()=>{try{var t,e;const o=await fetch("/cart.js",{headers:{Accept:"application/json"},cache:"no-store"}).then(t=>t.json()),n=null===o||void 0===o||null===(t=o.items)||void 0===t?void 0:t.find(t=>String(t.variant_id)===String(u));if(n)return{price:n.price,productType:null!==(e=n.product_type)&&void 0!==e?e:""}}catch(r){}try{var o,n;const t=(f||window.location.href).split(/[?#]/)[0],e=await fetch(`${t}.js`,{headers:{Accept:"application/json"}}).then(t=>t.json()),r=null===e||void 0===e||null===(o=e.variants)||void 0===o?void 0:o.find(t=>String(t.id)===String(u));if(r)return{price:r.price,productType:null!==(n=e.product_type)&&void 0!==n?n:""}}catch(r){}return{price:0,productType:""}})(),r=()=>{document.removeEventListener("cart:updated",r),clearTimeout(i),w(u),e()},i=setTimeout(()=>{document.removeEventListener("cart:updated",r),w(u),e()},2500);document.addEventListener("cart:updated",r,{once:!1}),window.cartGiftUpdate(String(u),o,1,n,"ADD_TO_CART")})().catch(t=>{console.error("[Whatmore] ATC 8111554613 error:",t)}),void setTimeout(e,o);if("5801421"===t)return(async()=>{const t={};(0,a.hG)((0,a.VA)(),"order_tracking->track_using_wtot")||(t[r.B_]=`${(0,n.wm)()}#${p}:direct`);const e=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:Number(u),quantity:1,properties:t})}).then(t=>t.json()).catch(()=>null);if(!e||e.status)return void console.error("[Whatmore] ATC 5801421 failed:",e&&e.description);let o=!1;const i=()=>{if(o)return!0;const t=window.Rebuy&&window.Rebuy.SmartCart;if(!t||"function"!==typeof t.show)return!1;if("ready"!==t.status&&!t.hasBoundEvents&&!document.querySelector("#rebuy-cart"))return!1;o=!0;try{window.Rebuy.Cart&&window.Rebuy.Cart.fetchCart()}catch(e){}return t.show(),!0};document.addEventListener("rebuy:smartcart.ready",i,{once:!0});const c=(t=0)=>{if(i())return;if(t<40)return void setTimeout(()=>c(t+1),150);const e=window.Rebuy&&window.Rebuy.SmartCart;if(e&&"function"===typeof e.show)return o=!0,void e.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")};c()})().catch(t=>{console.error("[Whatmore] ATC 5801421 error:",t)}),void setTimeout(e,o);const T=e=>{if("61126934766"==t){let t=e.querySelector(".productView-buttons").querySelector('form[action*="/cart/add"]');if(t)return t}let o=Array.from(e.querySelectorAll("product-form")).find(t=>t.querySelector('form > input[name="id"]')&&t.querySelector('form button[type="submit"]'));return o||(o=Array.from(e.querySelectorAll('form[action*="/cart/add"]')).find(t=>t.querySelector('button[type="submit"]'))),o},_=(e,o,n)=>{const r=e.cloneNode(!0);if(r){r.hasAttribute("data-product-variant-id")&&r.setAttribute("data-product-variant-id",o),r.hasAttribute("data-product-id")&&r.setAttribute("data-product-id",n);let e=r.querySelector('input[name="id"]');if(e)e.setAttribute("value",o),e.hasAttribute("disabled")&&e.removeAttribute("disabled");else{const t=r.querySelector('select[name="id"]');if(t){const e=t.querySelector('option[selected="selected"]');e&&e.setAttribute("value",o)}}const i=r.querySelector('input[name="product-id"]');i&&i.setAttribute("value",n);const a=document.createElement("div");return a.className="whatmore-atc",a.appendChild(r),document.body.appendChild(a),console.log(a,"formElement"),"92319318403"===t&&((t,e,o)=>{var n;const r=null!==(n=t.matches)&&void 0!==n&&n.call(t,"form")?t:t.querySelector("form");if(!r)return;let i=r.querySelector('input[name="id"]');i||(i=document.createElement("input"),i.type="hidden",i.name="id",r.prepend(i)),i.value=String(e),i.removeAttribute("disabled");const a=r.querySelector('select[name="id"]');a&&([...a.options].some(t=>t.value===String(e))?(a.value=String(e),[...a.options].forEach(t=>t.selected=t.value===String(e)),a.dispatchEvent(new Event("change",{bubbles:!0}))):a.removeAttribute("name"));const c=r.querySelector('input[name="product-id"]');c&&(c.value=String(o))})(a,o,n),a}},b=t=>{const e=null===t||void 0===t?void 0:t.querySelector('button[type="submit"]');e&&e.click()},g=T(document);if(g||(null===g||void 0===g?void 0:g.length)>0){const it=_(g,u,l);b(it),setTimeout(()=>{w(u)},500),it.remove()}else{var S;fetch(null===f||void 0===f||null===(S=f.split("?"))||void 0===S?void 0:S[0]).then(t=>t.text()).then(t=>{const e=(new DOMParser).parseFromString(t,"text/html"),o=T(e);if(o||(null===o||void 0===o?void 0:o.length)>0){const t=_(o,u,l);b(t),setTimeout(()=>{w(u)},500),t.remove()}})}setTimeout(e,o)}},5118:function(t,e,o){async function n(t,e=""){let o;if("27303477337"===e){var n,r;const e="https://"+window.location.hostname,i=window.location.pathname.split("/");o=e+"/"+(null!==i&&void 0!==i&&null!==(n=i[1])&&void 0!==n&&n.startsWith("en-")?(null===i||void 0===i?void 0:i[1])+"/":"")+(null===t||void 0===t||null===(r=t.product_link)||void 0===r?void 0:r.split(".co")[1])+".js"}else o=(null===t||void 0===t?void 0:t.product_link)+".js";const i=await fetch(o,{method:"GET"});if(!i.ok)throw new Error(`Error! status: ${i.status}`);return await i.json()}async function r(t){if(!t||!t.product_link)return null;const e=await fetch(t.product_link+".json",{method:"GET"});if(!e.ok)throw new Error("Error! status: "+e.status);return e.json()}async function i(t,e,o){if(t)return n(t,o)}function a(t){var e=[],o=[],n=[];const r=t&&t.variants||[],i=t&&t.options||[];return r.forEach(t=>{var r,a,c;t.option1&&e.push({option:t.option1,available:null===(r=t.available)||void 0===r||r,type:i[0]&&i[0].name}),t.option2&&o.push({option:t.option2,available:null===(a=t.available)||void 0===a||a,type:i[1]&&i[1].name}),t.option3&&n.push({option:t.option3,available:null===(c=t.available)||void 0===c||c,type:i[2]&&i[2].name})}),e=e.reduce((t,e,o)=>{var n=t.filter(t=>t.option==e.option);return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)},[]),o=o.reduce((t,e,o)=>{var n=t.filter(t=>t.option==e.option);return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)},[]),n=n.reduce((t,e,o)=>{var n=t.filter(t=>t.option==e.option);return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)},[]),[e,o,n]}function c(t){if(0==t.length)return null;const e=t.filter(t=>t.available);return 0==e.length?null:e[0].option}function d(t){return t[0].length<=1&&t[1].length<=1&&t[2].length<=1}function s(t,e){const o=e.filter(e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]);return 0==o.length?null:o[0].id}function u(t){if(t&&t.length>=1){return t.filter(t=>t.available).length>=1}return!1}o.r(e),o.d(e,{atleastOneVariantAvailableInStock:function(){return u},getFirstAvailableOption:function(){return c},getVariantIdFromSelectedOption:function(){return s},getVariantOptions:function(){return a},isSingleVariantProduct:function(){return d},productDetailsDetailed:function(){return i},productDetailsShopifyJS:function(){return n},productDetailsShopifyJSON:function(){return r}})},8847:function(t,e,o){o.r(e),o.d(e,{addWhatmoreAttributeToCart:function(){return u}});var n=o(5616),r=o(4563),i=o(2567),a=o(5443),c=o(5566),d=o(6080);async function s(t){return await fetch("https://"+window.location.hostname+"/cart/update.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:t})}).then(t=>t.json()).catch(t=>{console.error("Whatmore :: Error while updating cart attribute.",t)})}async function u(t){var e;let o,u=(0,n.Ak)(),l=null,p=null,h={},m=null,f=null,v=null,w={};const y=(0,i.Ry)();let T=(0,c.CK)(),_=null===(e=localStorage)||void 0===e?void 0:e.wht_is_impression,b=T.length>0;T.forEach(t=>{w.hasOwnProperty(null===t||void 0===t?void 0:t.product_id)||(w[null===t||void 0===t?void 0:t.product_id]={widgetInfo:null===t||void 0===t?void 0:t.widget_info,location:null===t||void 0===t?void 0:t.location,userType:null===t||void 0===t?void 0:t.user_type})});const g=localStorage.getItem("_whatmore_session_id"),S=localStorage.getItem("wht_user_group"),C=window.whatmore&&window.whatmore.abTestConfig&&window.whatmore.abTestConfig.ab_test_id||null,A=window.whatmore&&window.whatmore.abTestConfig&&null!=window.whatmore.abTestConfig.version?window.whatmore.abTestConfig.version:null,j=localStorage.getItem("_whatmore_user_id"),O=localStorage.getItem("_whatmore_last_video_view_session"),E=(()=>{try{var t;return JSON.parse(null!==(t=localStorage.getItem("_whatmore_add_to_cart_products"))&&void 0!==t?t:"[]")}catch(e){return[]}})(),k=new Set(E.map(t=>String(null===t||void 0===t?void 0:t.product_id))),q=(()=>{try{var t;return JSON.parse(null!==(t=localStorage.getItem("_whatmore_buynow_products"))&&void 0!==t?t:"[]")}catch(e){return[]}})(),N=new Set(q.map(t=>String(null===t||void 0===t?void 0:t.variant_id))),P={buynow:3,direct:2,indirect:1};await(0,r.js)().then(t=>t.json()).then(e=>{u=e.token,o=e.attributes;let n={};try{var r,T;const t=null===(r=o)||void 0===r?void 0:r._wtot;n="string"===typeof t?JSON.parse(t):null!==t&&void 0!==t?t:{};const i=new Set((null!==(T=e.items)&&void 0!==T?T:[]).map(t=>String(null===t||void 0===t?void 0:t.product_id)));n=Object.fromEntries(Object.entries(n).filter(([t])=>i.has(String(t))))}catch(L){n={}}let E=[];if(E=!0===t?e.items.map(t=>{const e=w[null===t||void 0===t?void 0:t.variant_id];return{...t,location:null===e||void 0===e?void 0:e.location,userType:null===e||void 0===e?void 0:e.userType,widget_info:null===e||void 0===e?void 0:e.widgetInfo}}):e.items.map(t=>{const e=w[null===t||void 0===t?void 0:t.product_id];return{...t,location:null===e||void 0===e?void 0:e.location,userType:null===e||void 0===e?void 0:e.userType,widget_info:null===e||void 0===e?void 0:e.widgetInfo}}),0==E.length)return console.debug("Whatmore :: no cart items available for view products"),null;let q={},W={};if(null!=g){const t={wht_session_id:null!==O&&void 0!==O?O:g,wht_user_id:j,...S&&{wht_user_group:S},...C&&{wht_ab_test_id:C},...null!=A&&{wht_ab_test_version:A}};W={[d.Uv]:(0,d.dK)(y)?JSON.stringify(t):t,[d.Um]:""}}if(_||b){const t="1";W[b?d.Rm:d.AG]=t,W[b?d.bZ:d.SW]=""}!(0,a.hG)((0,a.VA)(),"order_tracking->disable_impression_order_tracking")&&(W.hasOwnProperty(d.Uv)||W.hasOwnProperty(d.Rm)&&!o.hasOwnProperty(d.Rm)||W.hasOwnProperty(d.AG)&&!o.hasOwnProperty(d.AG))&&s(W),E.map((e,o)=>{if(l=e.key,p=e.quantity,h=e.properties,m=e.widget_info,f=e.location,v=e.userType,("63330517149"==y||"77604192550"==y||"64157352183"==y||"62758289602"==y||"65972830359"==y||"75310563627"==y||(0,a.hG)((0,a.VA)(),"order_tracking->track_using_wtot"))&&w.hasOwnProperty(JSON.stringify(!0===t?e.variant_id:e.product_id))){const t="65972830359"==y||"75310563627"==y||(0,a.hG)((0,a.VA)(),"order_tracking->track_using_wtot"),o=t?"_wtot":"wtot";let i=(0,c.wm)()+`#${m}`;if(t){var r;const t=N.has(String(null===e||void 0===e?void 0:e.variant_id))?"buynow":k.has(String(null===e||void 0===e?void 0:e.product_id))?"direct":"indirect",o=n[null===e||void 0===e?void 0:e.product_id];i=(null!==(r=P[("string"===typeof o?o:"").split(":")[1]])&&void 0!==r?r:0)>=P[t]?o:i+`:${t}`}q={...q,[null===e||void 0===e?void 0:e.product_id]:i};s({[o]:t?{...n,...q}:q})}null!==h&&d.B_ in h||!w.hasOwnProperty(JSON.stringify(!0===t?e.variant_id:e.product_id))||async function(t,e,o,n,r="default",s,u,l,p){const h=(0,i.Ry)(),m=u?(0,c.wm)()+("72201044272"==h?`#${n}#${r}#${s?"olduser":"newuser"}`:`#${n}`):p?"_wt_vs":l?"_wt_vi":"";if(""==m||"_wt_vs"==m||"_wt_vi"==m||"77604192550"==h||"64157352183"==h||"80856187185"==h||"86486974743"==h||"62758289602"==h||"63046287536"==h||"65972830359"==h||"75310563627"==h||"86968402213"==h||(0,a.hG)((0,a.VA)(),"order_tracking->track_using_wtot"))return;let f={id:t,quantity:e,properties:{...m?{[d.B_]:m}:{},...o}};await fetch("https://"+window.location.hostname+"/cart/change.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)}).then(t=>t.json()).catch(t=>{console.error("Whatmore :: Error while updating cart line item properties.",t)})}(l,p,h,m,f,v,!0,_,b)})}).catch(t=>{console.error("Whatmore :: Error while fetching cart_token for cart attribute update.",t)})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[310],{1839:function(t,e,n){function o(t,e){let n=document.getElementById(t);n||(n=document.createElement("style"),n.id=t,document.head.appendChild(n)),n.textContent=e}function i(t,e){if(!t)return null;const n=t[e];if(!n||"object"!==typeof n)return Object.assign({},t,{brandCss:""});const o="string"===typeof t.customCss?t.customCss:"";return Object.assign({},n,{brandCss:o})}n.d(e,{R:function(){return i},f:function(){return o}})},5e3:function(t,e,n){n.d(e,{Au:function(){return s},YJ:function(){return c},k5:function(){return l}});const o=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 s(){const t=r();if(t.armed||"undefined"===typeof document)return;if(!function(){if("undefined"===typeof navigator||"undefined"===typeof document)return!1;const t=navigator.userAgent||"";return!(!/iPad|iPhone|iPod/.test(t)||window.MSStream)||/Macintosh/.test(t)&&"ontouchend"in document}())return;t.armed=!0,function(){const t=r();if(t.pool||"undefined"===typeof document)return;const e=document.createDocumentFragment();for(let n=0;n<o;n++){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 n=0;n<e.length;n++){const t=e[n];t.muted=!0;const o=t.play();o&&o.then&&o.then(()=>t.pause()).catch(()=>{})}t.blessed=!0}()};document.addEventListener("click",e,{passive:!0}),document.addEventListener("touchstart",e,{passive:!0})}function l(){return r().pool||null}function c(){return!!r().blessed}},6387:function(t,e,n){n.d(e,{P:function(){return i}});const o={standard:()=>n.e(508).then(n.t.bind(n,5071,17)),card:()=>n.e(545).then(n.t.bind(n,9362,17)),"mosaic-ring":()=>n.e(457).then(n.t.bind(n,8171,17)),"mosaic-plain":()=>n.e(764).then(n.t.bind(n,5635,17)),hoverplay:()=>n.e(781).then(n.t.bind(n,787,17)),"info-strip":()=>n.e(94).then(n.t.bind(n,2109,17)),"text-overlay":()=>n.e(833).then(n.t.bind(n,3930,17)),focused:()=>n.e(506).then(n.t.bind(n,1987,17)),coverflow:()=>n.e(172).then(n.t.bind(n,9033,17)),minimal:()=>n.e(244).then(n.t.bind(n,6362,17)),feed:()=>n.e(315).then(n.t.bind(n,7456,17)),circle:()=>n.e(31).then(n.t.bind(n,5112,17)),viewmore:()=>n.e(343).then(n.t.bind(n,7672,17)),overlay:()=>n.e(936).then(n.t.bind(n,75,17)),"stories-b":()=>n.e(565).then(n.t.bind(n,1958,17)),"product-broad-no-cta":()=>n.e(838).then(n.t.bind(n,5955,17)),"product-broad-atc":()=>n.e(648).then(n.t.bind(n,2699,17)),"product-narrow":()=>n.e(594).then(n.t.bind(n,4859,17)),"product-premium":()=>n.e(566).then(n.t.bind(n,2529,17)),"product-navigation":()=>n.e(45).then(n.t.bind(n,4368,17)),"product-multi-product":()=>n.e(856).then(n.t.bind(n,6084,17)),"product-thumbnail-strip":()=>n.e(620).then(n.t.bind(n,4383,17)),"product-link-only":()=>n.e(750).then(n.t.bind(n,3365,17)),"product-minimal-atc":()=>n.e(685).then(n.t.bind(n,1890,17))};async function i(t,e){const n=o["carousel"===t||"collections"===t?e:t+"-"+e];if(!n)return"";try{return(await n()).default||""}catch(i){return""}}},7119:function(t,e,n){n.r(e),n.d(e,{REGISTRY:function(){return v},renderNeoFloating:function(){return N}});var o=n(7983),i=n(6287),a=n(5e3),r=n(6387),s=n(1839),l=n(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="https://cdn-consumer.whatmore.live",u="https://whatmore-api-cdn-cache.azureedge.net",h="floating",f="wht-neo-floating-css",m="wht-neo-floating-critical",w='.wht-neo-float{position:fixed;z-index:var(--wht-neo-float-z,2147482000);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-fs]{display:none}.wht-neo-float[data-wht-ultra] .wht-neo-float-frame{width:0 !important;height:0 !important;opacity:0;pointer-events:none}';async function g(t){let e=null;try{e=new URLSearchParams(window.location.search).get("neoskin")}catch(d){}let n="";const o=e||t&&t.skin;o&&"default"!==o&&"a"!==o&&(n=await(0,r.P)(h,o));const i=o&&"default"!==o?o:"a",a=t&&t.customCss,l="string"===typeof a?a:a&&"object"===typeof a&&"string"===typeof a[i]?a[i]:"";return(0,s.f)(f,c+"\n"+n+(t&&t.brandCss?"\n"+t.brandCss:"")+(l?"\n"+l:"")),!0}const v={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 b=(t,e=null)=>{const n=function(){try{return JSON.parse(localStorage.getItem("whatmore_brand_customizations")).customizations}catch(t){return null}}(),o=t.split(".").reduce((t,e)=>null==t?void 0:t[e],n);return null==o?e:o};function _(t,e,n){var o;const i=t&&t.querySelector("#"+e),a=i&&(null!==(o=i.getAttribute("data-wh"))&&void 0!==o?o:i.getAttribute("data"));return null!=a&&""!==a?a:n}function y(t,e,n){const o=parseFloat(_(t,e,NaN));return isFinite(o)?o:n}function x(){return!0===b("backend_config.use_cdn_cache_endpoint")?u:d}async function A({mode:t,shopId:e,landingLocationType:n,widgetContainer:i,storeFlags:a}){let r;if("pdp"===t){const t=function(t,e){let n=_(t,"whatmoreProductId","");if(!0===b("product_config.use_product_page_link_as_client_product_id")){const t=window.location.href.split(/[?#]/)[0],o=e&&e.clientProductIdMode;if("pathLastSeg"===o){const t=window.location.pathname.split("/");n=t[t.length-1]}else n="hrefLastSeg"===o?t.replace(/\/+$/,"").split("/").pop():t}return"true"===String(_(t,"whatmoreEmbedAppUseVariant","false"))?_(t,"whatmoreVariantId",n):n}(i,a),n=function(t){return!0===b("backend_config.use_instance_endpoint_for_product_events")||t&&t.productEventsUseInstance?d:p}(a),s=!0===b("recommendation_config.show_collection_events")?`${n}/v2/brand/${e}/product-events/collection/cdn?client_product_id=${encodeURIComponent(t)}&limit=50&status=live,upcoming&event_type=video,image`:!0===b("recommendation_config.show_recommended_events")?`${n}/v2/brand/${e}/product-events/recommendation/cdn?client_product_id=${encodeURIComponent(t)}&limit=10&recommended=${!b("product_page_popup_config.show_all_events")}&origin=${window.location.hostname}&status=live,upcoming&event_type=video,image`:`${n}/v2/brand/${e}/product-events?client_product_id=${encodeURIComponent(t)}&status=upcoming&event_type=video,image`,{events:l,all_events:c}=(0,o.Np)(await fetch(s).then(t=>t.json()),!1);r=[...l,...c]}else if(n.startsWith("collection")){let t=_(i,"whatmoreCollectionId","");t&&"0"!==t||(t=window.location.href.split(/[?#]/)[0]);const n=x(),a=!0===b("collection_product_sync")?`${n}/v5/collection?store_id=${e}&client_collection_id=${t}&sync_products=true`:`${n}/v2/collection?store_id=${e}&client_collection_id=${t}`,{events:s,all_events:l}=(0,o.Np)(await fetch(a).then(t=>t.json()),!0);r=[...s,...l||[]]}else{const t=x(),n=a&&a.spotlightInfiniteEvents?`${t}/get_eventset_v1/${e}?eventset_type=spotlight&event_type=video&source=homepage&source_id=${e}`:`${t}/get_eventset/${e}?eventset_type=spotlight&source=homepage&source_id=${e}`,{events:i,all_events:s}=(0,o.Po)(await fetch(n).then(t=>t.json()),"spotlight");r=[...i,...s||[]]}return b("oos_config.show_oos_videos")||(r=r.filter(t=>t&&!1!==t.in_stock)),r}function C(t){var e,n,o,i;const a=t.event_media_urls;let r=a?(null===(e=a.primary)||void 0===e||null===(n=e.portrait)||void 0===n?void 0:n.poster_image)||(null===(o=a.secondary)||void 0===o||null===(i=o.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 k(t,e,n){const o=(0,l.vC)(),i=o.h>=o.w,a=i?"Portrait":"Landscape",r=function(t,e){const{w:n,h:o}=(0,l.vC)(),i=Math.min(n,o),a=o>=n,r=.6*i,s=a?n>=481?.48:.54:i<500?.7:.39,c=a?y(t,"whatmoreEmbedAppVideoPlayerSizePortrait",40)/100*1.2:y(t,"whatmoreEmbedAppVideoPlayerSizeLandscape",60)/100,d="spotlight"===e?Number(b("spotlight_config.size_factor",1))*(a?1.1:1.3):1.1;return Math.round(r*s*c*d)}(e,n);t.style.setProperty("--wht-neo-float-w",r+"px"),t.style.setProperty("--wht-neo-float-h",Math.round(16*r/9)+"px");const s=_(e,"whatmoreEmbedAppPosition"+a,"left"),c=y(e,"whatmoreEmbedAppHorizontalPadding"+a,i?10:20),d=y(e,"whatmoreEmbedAppVerticalPadding"+a,i?10:20),p="spotlight"===n?b("spotlight_config.position",s):s,u="spotlight"===n?Number(b("spotlight_config.horizontal_padding",c)):c,h="spotlight"===n?Number(b("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=b("product_page_popup_config.popUpZindex");return null!=f&&t.style.setProperty("--wht-neo-float-z",String(f)),h}const E=250,P=12,$=8,L=300,M=["#pageheader","page-header",".navigation__tier-1-container",".navigation__tier-1"];function I(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 S(t,e,n){let o=null;const i=()=>{o=null;const{w:i,h:a}=(0,l.vC)(),r=t.getBoundingClientRect();if(!r.width||!r.height)return;const s=n(),c=r.left,d=r.right,p=function(t,e){let n=0;for(const o of M)for(const i of document.querySelectorAll(o)){if(!I(i))continue;const o=i.getBoundingClientRect();o.top>.3*e||o.width<.5*t||o.bottom<=0||o.bottom>=.6*e||o.bottom>n&&(n=o.bottom)}return n}(i,a)+$,u=a-s-r.height,h=a-s;let f,m=null,w=!1;for(const t of e)for(const e of document.querySelectorAll(t)){if(!I(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-P-r.height>=p?Math.max(s,a-m+P):s;const g=parseFloat(t.style.bottom||"")||s;Math.round(g)!==Math.round(f)&&(t.style.bottom=Math.round(f)===Math.round(s)?"":f+"px")},a=()=>{null===o&&(o=window.requestAnimationFrame(i))};a(),window.addEventListener("scroll",a,{passive:!0}),window.addEventListener("resize",a),window.setInterval(a,L)}async function N(t){const{widgetContainer:e,shopId:n,landingLocationType:o="index",floatingMode:r,onWidgetView:c,onClose:d,onOpenEvent:p}=t;if(!n)return!1;const u=r||(o.startsWith("product")||"embed"===o?"pdp":"spotlight");if("spotlight"===u&&b("spotlight_config.show_once_to_user"))try{if(window.localStorage.getItem("_whatmore_spotlight_viewed"))return!0;window.localStorage.setItem("_whatmore_spotlight_viewed","true")}catch(Y){}let f;(0,s.f)(m,w);try{[f]=await Promise.all([A({mode:u,shopId:n,landingLocationType:o,widgetContainer:e,storeFlags:t.storeFlags}),g((0,s.R)(t.neoJson,h))])}catch(Y){return!1}if(!f||!f.length)return!0;const v=f[0],y="pdp"===u,x=!!b(y?"product_page_popup_config.ultra_minimize_on_scroll":"spotlight_config.ultraminimize_on_scroll"),P=y&&!x&&!!b("product_page_popup_config.show_popup_on_scroll"),$=y&&!!b("product_page_popup_config.auto_close_on_open"),L=b((y?"product_page_popup_config":"spotlight_config")+".atc_aware_selectors"),M=document.createElement("div");M.className="wht-neo-float",M.dataset.role="floatVideo",M.setAttribute("data-wht-mode",u),n&&M.setAttribute("data-wht-shop",n),M.setAttribute("data-wht-widget","spotlight"===u?"wgt_spotlight":"wgt_embed");const I={vPad:k(M,e,u)};P&&M.setAttribute("data-wht-hidden","");const N=document.createElement("div");N.className="wht-neo-float-frame";const z=document.createElement("video");z.className="wht-neo-float-video",z.muted=!0,z.loop=!0,z.playsInline=!0,z.autoplay=!0,z.preload="metadata",z.setAttribute("muted",""),z.setAttribute("playsinline",""),z.setAttribute("webkit-playsinline","");const F=C(v);if(F&&(z.poster=F),v.thumbnail_image){const t=document.createElement("source");t.src=v.thumbnail_image,t.type="video/mp4",z.appendChild(t)}N.appendChild(z);const V=document.createElement("div");V.className="wht-neo-float-overlay";const R=document.createElement("button");R.type="button",R.className="wht-neo-float-close",R.dataset.role="closeButton",R.setAttribute("aria-label","Close video"),R.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>',R.addEventListener("click",t=>{t.stopPropagation(),M.remove(),null===d||void 0===d||d(v)}),V.appendChild(R);const j=document.createElement("span");j.className="wht-neo-float-play",j.dataset.role="playIcon",j.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(j);const B=_(e,"whatmoreEmbedAppVideoTitle","");if(B){const t=document.createElement("div");t.className="wht-neo-float-title",t.dataset.role="titleStrip";const n=document.createElement("p");n.textContent=B;const o=_(e,"whatmorePrimaryFont","");o&&(n.style.fontFamily=o),t.appendChild(n),V.appendChild(t)}N.appendChild(V),M.appendChild(N),document.body.appendChild(M);const T=z.play&&z.play();T&&T.catch&&T.catch(()=>{}),(0,a.Au)();const q=t=>{if(t!==M.hasAttribute("data-wht-ultra"))if(t){M.setAttribute("data-wht-ultra","");try{z.pause()}catch(Y){}}else{M.removeAttribute("data-wht-ultra");const t=z.play&&z.play();t&&t.catch&&t.catch(()=>{})}};!function(t,e){let n=0,o=0,i=0,a=0,r=!1,s=!1,c=null;t.addEventListener("pointerdown",e=>{if(e.target.closest(".wht-neo-float-close"))return;s=!0,r=!1,n=e.clientX,o=e.clientY;const l=/translate\((-?[\d.]+)px,\s*(-?[\d.]+)px\)/.exec(t.style.transform||"");i=l?parseFloat(l[1]):0,a=l?parseFloat(l[2]):0,c=t.getBoundingClientRect(),t.setPointerCapture(e.pointerId)}),t.addEventListener("pointermove",e=>{if(!s)return;let d=e.clientX-n,p=e.clientY-o;if((Math.abs(d)>5||Math.abs(p)>5)&&(r=!0),r){if(c){const{w:t,h:e}=(0,l.vC)();d=Math.max(-c.left,Math.min(d,t-c.right)),p=Math.max(-c.top,Math.min(p,e-c.bottom))}t.style.transform=`translate(${i+d}px, ${a+p}px)`}}),t.addEventListener("pointerup",n=>{if(s){s=!1;try{t.releasePointerCapture(n.pointerId)}catch(o){}r||e()}}),t.addEventListener("pointercancel",()=>{s=!1})}(M,()=>{M.hasAttribute("data-wht-ultra")?q(!1):($?(M.remove(),null===d||void 0===d||d(v)):M.setAttribute("data-wht-fs",""),(0,i.w)(C(v)),null===p||void 0===p||p(v,0,f,{onFullscreenClose:()=>M.removeAttribute("data-wht-fs")}))});let O=!1;window.addEventListener("resize",()=>{O||(O=!0,requestAnimationFrame(()=>{O=!1,I.vPad=k(M,e,u)}))},{passive:!0});let U=!1;const W=()=>{!U&&c&&(U=!0,requestAnimationFrame(()=>{(M.checkVisibility?M.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0}):M.offsetWidth>0&&M.offsetHeight>0)&&c(v)}))};if(P||W(),x||P){let t=!1;window.addEventListener("scroll",()=>{t||(t=!0,requestAnimationFrame(()=>{t=!1;window.pageYOffset<=E?q(!1):(P&&M.hasAttribute("data-wht-hidden")&&(M.removeAttribute("data-wht-hidden"),W()),x&&q(!0))}))},{passive:!0}),x&&document.addEventListener("pointerdown",t=>{!M.contains(t.target)&&M.isConnected&&window.pageYOffset>E&&q(!0)},{capture:!0,passive:!0})}return Array.isArray(L)&&L.length&&S(M,L,()=>I.vPad),!0}},7983:function(t,e,n){function o(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:[]}}n.d(e,{Np:function(){return o},Po:function(){return i}})}}]);
|