whatmore-react-assets 1.0.1867 → 1.0.1869
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/{event-click-component.5c063589.chunk.js → event-click-component.e759b154.chunk.js} +3 -3
- package/static/js/react-main-app.1e496da1.chunk.js +1 -0
- package/static/js/wht-neo-atc.05d114f2.chunk.js +1 -0
- package/static/js/{wht-neo-banner.68201608.chunk.js → wht-neo-banner.c6c665ab.chunk.js} +1 -1
- package/static/js/wht-neo-floating.d0ba11de.chunk.js +1 -0
- package/static/js/wht-neo-shopper.8f4a9a4b.chunk.js +1 -0
- package/static/js/wht-neo-stories.ac9f5adc.chunk.js +1 -0
- package/static/js/wht-neo.c74d27e3.chunk.js +1 -0
- package/static/js/wht-skin-carousel-overlay.22e26e17.chunk.js +1 -0
- package/static/js/wht-skin-shared-card.671592db.chunk.js +1 -0
- package/static/js/wht-skin-shared-coverflow.2d8f84c3.chunk.js +1 -0
- package/static/js/{wht-skin-shared-feed.a3f86c52.chunk.js → wht-skin-shared-feed.12fab133.chunk.js} +1 -1
- package/static/js/wht-skin-shared-focused.6cfe66ae.chunk.js +1 -0
- package/static/js/wht-skin-shared-hoverplay.a2ab6a0f.chunk.js +1 -0
- package/static/js/wht-skin-shared-info-strip.08547b7b.chunk.js +1 -0
- package/static/js/wht-skin-shared-minimal.77cb852d.chunk.js +1 -0
- package/static/js/{wht-skin-shared-mosaic-plain.3fd5f04f.chunk.js → wht-skin-shared-mosaic-plain.1c15dea8.chunk.js} +1 -1
- package/static/js/{wht-skin-shared-mosaic-ring.da431ec3.chunk.js → wht-skin-shared-mosaic-ring.2e50520a.chunk.js} +1 -1
- package/static/js/wht-skin-shared-standard.45f1c7e9.chunk.js +1 -0
- package/static/js/wht-skin-shared-text-overlay.77fb596d.chunk.js +1 -0
- package/whatmore.js +2 -2
- package/static/js/react-main-app.fdda753d.chunk.js +0 -1
- package/static/js/wht-neo-atc.618b89e4.chunk.js +0 -1
- package/static/js/wht-neo-floating.1d58b506.chunk.js +0 -1
- package/static/js/wht-neo-shopper.5257b65c.chunk.js +0 -1
- package/static/js/wht-neo-stories.d1654c2f.chunk.js +0 -1
- package/static/js/wht-neo.d77af369.chunk.js +0 -1
- package/static/js/wht-skin-carousel-overlay.05a75658.chunk.js +0 -1
- package/static/js/wht-skin-shared-card.07eb908a.chunk.js +0 -1
- package/static/js/wht-skin-shared-coverflow.f495a910.chunk.js +0 -1
- package/static/js/wht-skin-shared-focused.20689a27.chunk.js +0 -1
- package/static/js/wht-skin-shared-hoverplay.9959051a.chunk.js +0 -1
- package/static/js/wht-skin-shared-info-strip.52270c1d.chunk.js +0 -1
- package/static/js/wht-skin-shared-minimal.2e8a077b.chunk.js +0 -1
- package/static/js/wht-skin-shared-standard.eb2b6e78.chunk.js +0 -1
- package/static/js/wht-skin-shared-text-overlay.b9343045.chunk.js +0 -1
|
@@ -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.U},fireNeoProductClick:function(){return n.y},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)(),y=(0,r.Xr)(o,e);if(!y)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,y,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:y,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(y){return l&&l("errored"),{status:"errored"}}const m=h&&h.variants||[],f=(0,r.WR)(h);if((0,r.pA)(f)||"direct"===i){if(!(0,r.Wb)(m))return l&&l("errored"),{status:"errored"};return s(t,m,[(0,r.bA)(f[0]),(0,r.bA)(f[1]),(0,r.bA)(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.WR)(e);if(!(0,r.pA)(n))return null;if(!(0,r.Wb)(o))return null;const i=(0,r.Xr)([(0,r.bA)(n[0]),(0,r.bA)(n[1]),(0,r.bA)(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.d(e,{U:function(){return m},fireNeoAtcClick:function(){return h},fireNeoAtcMetric:function(){return w},fireNeoBuyNowMetric:function(){return y},y: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 y(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},openNeoCartDrawer:function(){return h},rH:function(){return m},removeOneFromNeoCart: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){if(!t)return null;try{const o=await c().then(t=>t.ok?t.json():null),n=o&&Array.isArray(o.items)&&o.items.find(e=>String(e.id)===String(t));if(!n)return null;const r=Math.max(0,(n.quantity||0)-1);if(!(await fetch("/cart/change.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:n.key,quantity:r})})).ok)return null;try{window.Rebuy&&window.Rebuy.Cart&&window.Rebuy.Cart.fetchCart()}catch(e){}return document.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0})),r}catch(o){return console.error("[Whatmore] neo cart decrement failed:",o),null}}function l(){const t=document.querySelectorAll("[data-minicart-input]");for(let e=0;e<t.length;e++){const o=t[e],n=o.id&&document.querySelector('label.minicart__label[for="'+o.id+'"]');if(n&&n.clientHeight>0&&n.clientWidth>0)return o.checked=!0,!0}return!!t.length&&(t[0].checked=!0,!0)}function p(t){const e=window.gsCartDrawerCore||window.gsCartDrawerManager;return!!e&&(t&&t.length?(window.dispatchEvent(new CustomEvent("cart_changed_gs",{detail:{added:t}})),!0):"function"===typeof e.open&&(e.open(),!0))}async function h(t){const e=window.Rebuy&&window.Rebuy.SmartCart;if(e&&"function"===typeof e.show&&("ready"===e.status||e.hasBoundEvents||document.querySelector("#rebuy-cart"))){try{window.Rebuy.Cart&&window.Rebuy.Cart.fetchCart()}catch(n){}return e.show(),!0}if(p(null))return!0;const o=["[data-cart-open]",'[data-drawer-open="cart"]','[data-action="open-drawer"][data-drawer="cart"]','[data-action="open-drawer"][data-drawer-id="sidebar-cart"]',".js-drawer-open-cart",'a[href$="/cart"]:not([disable-rebuy]):not(.disable-rebuy)'];for(let r=0;r<o.length;r++){const t=document.querySelectorAll(o[r]);for(let e=0;e<t.length;e++)if(!t[e].closest('#CartDrawer, #sidebar-cart, cart-drawer, .gs_cart_drawer, .minicart__holder, .Drawer, .cart-drawer, [data-section-type="cart"]'))return t[e].click(),!0}return!!l()}async function m(t,e,o,s,u="",h="",m="",f="",y="",w="",v=null){(0,i.yI)();const T=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,m,f,y,!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("38678331531"===t){const O="In stock \u2014 ship now";async function q(t,e=1){const o=[...document.querySelectorAll('form[action*="/cart/add"]')].find(e=>{var o;return String(null===(o=e.querySelector('[name="id"]'))||void 0===o?void 0:o.value)===String(t)});if(o)return o.requestSubmit(o.querySelector('[type="submit"]')),setTimeout(()=>T(t),1500),!0;const n=await fetch("/cart/add.js?app=upez",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:t,quantity:e,properties:{Fulfilment:O}}]}),_isAddon:!0});if(!n.ok)return console.error("[ATC] Add to cart failed:",n.status),!1;const r=document.querySelector("[data-upez-cart]");return r?r.click():window.location.href="/cart",setTimeout(()=>T(t),500),!0}return void q(u,1).then(()=>{setTimeout(e,o)}).catch(t=>{console.error("[Whatmore] ATC 38678331531 error:",t)})}if("75026858234"===t){try{const k=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:u,quantity:1}]})}),N=await k.json();k.ok?setTimeout(()=>{T(u),window.location.href="/cart"},500):console.error("[Whatmore] ATC 75026858234 failed:",N)}catch(j){console.error("[Whatmore] ATC 75026858234 error:",j)}return void setTimeout(e,o)}if("65606910124"===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 console.error("[ATC] Add to cart failed:",o.status),!1;document.dispatchEvent(new CustomEvent("cart:build"));const n=document.querySelector("cart-drawer");if(!n)return window.location.href="/cart",!0;const r=await(await fetch("/?section_id=cart-drawer")).text(),i=(new DOMParser).parseFromString(r,"text/html");return n.innerHTML=i.querySelector("cart-drawer").innerHTML,n.classList.remove("is-empty"),n.open(),setTimeout(()=>T(t),500),!0}return void W(u,1).then(()=>{setTimeout(e,o)}).catch(t=>{console.error("[Whatmore] ATC 65606910124 error:",t)})}if("17994587"===t||"68660855106"===t){async function P(t,e=1){const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest"},body:JSON.stringify({items:[{id:t,quantity:e}]})});if(!o.ok)return console.error("[ATC] Add to cart failed:",o.status),!1;document.dispatchEvent(new CustomEvent("cart:build"));const n=document.querySelector("cart-drawer");return n&&"function"===typeof n.open?n.open():document.dispatchEvent(new CustomEvent("cart:open")),setTimeout(()=>T(t),500),!0}return void P(u,1).then(()=>{setTimeout(e,o)}).catch(t=>{console.error("[Whatmore] ATC 17994587/68660855106 error:",t)})}if("57217876118"===t){async function L(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(()=>{T(t)},500))}return void L(u,1).then(()=>{setTimeout(e,o)}).catch(t=>{console.error("[Whatmore] ATC 57217876118 error:",t)})}if("75310563627"===t){async function R(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 R(u,1).then(()=>{setTimeout(()=>{T(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)()}#${m}: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 D(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 D(u,1).then(()=>{setTimeout(()=>{T(u)},500)}).catch(t=>{console.error("[Whatmore] ATC 67841720509 error:",t)}),void setTimeout(e,o)}if("72603631788"===t||"5220302897"===t){const J=new FormData;J.append("id",u),J.append("quantity","1"),v&&J.append("properties[Size]",v);try{const I=await fetch("/cart/add.js",{method:"POST",body:J}),M=await I.json();M.id?setTimeout(()=>{T(u),window.location.href="/cart"},500):console.error("Afrozeh ATC failed:",M)}catch(j){console.error("Afrozeh ATC error:",j)}return void setTimeout(e,o)}if("67083239728"===t){try{const x=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:u,quantity:1}]})});x.ok||console.error("[ATC] Add to cart failed:",x.status)}catch(j){console.error("[ATC] Error while adding to cart:",j)}return setTimeout(()=>{T(u)},1e3),void setTimeout(e,o)}if("61442818186"===t){async function G(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 G(u,1).then(()=>{setTimeout(()=>{T(u)},500)}).catch(t=>{console.error("[Whatmore] ATC 61442818186 error:",t)}),void setTimeout(e,o)}if("62226792677"===t){async function H(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,h),setTimeout(()=>{T(t)},500)):console.error("[ATC] Add to cart failed:",o.status)}return H(u).catch(t=>{console.error("[Whatmore] Error:",t)}),void setTimeout(e,o)}if("64655163636"===t){async function V(t,e=1){const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},body:JSON.stringify({items:[{id:t,quantity:e}]})});return o.ok?(setTimeout(()=>T(t),500),document.getElementById("CartDrawer")?document.dispatchEvent(new CustomEvent("ajaxProduct:added")):setTimeout(()=>{window.location.href="/cart"},500),!0):(console.error("[Whatmore] ATC 64655163636 failed:",o.status),!1)}return V(u,1).catch(t=>{console.error("[Whatmore] ATC 64655163636 error:",t)}),void setTimeout(e,o)}if("3065315386"===t){async function U(t,e=1){const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},body:JSON.stringify({items:[{id:t,quantity:e}]})});return o.ok?(setTimeout(()=>T(t),500),p([{id:t,quantity:e}])||setTimeout(()=>{window.location.href="/cart"},500),!0):(console.error("[Whatmore] ATC 3065315386 failed:",o.status),!1)}return U(u,1).catch(t=>{console.error("[Whatmore] ATC 3065315386 error:",t)}),void setTimeout(e,o)}if("78393540856"===t){async function B(t,e=1){const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},body:JSON.stringify({items:[{id:t,quantity:e}]})});return o.ok?(setTimeout(()=>T(t),500),l()||setTimeout(()=>{window.location.href="/cart"},500),!0):(console.error("[Whatmore] ATC 78393540856 failed:",o.status),!1)}return B(u,1).catch(t=>{console.error("[Whatmore] ATC 78393540856 error:",t)}),void setTimeout(e,o)}if("60595503283"===t){async function X(t,e=1){const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},body:JSON.stringify({items:[{id:t,quantity:e}]})});if(!o.ok)return console.error("[Whatmore] ATC 60595503283 failed:",o.status),!1;setTimeout(()=>T(t),500);return document.querySelector('#sidebar-cart[data-section-type="cart"]')?(document.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{quantity:e}})),!0):(setTimeout(()=>{window.location.href="/cart"},500),!0)}return X(u,1).catch(t=>{console.error("[Whatmore] ATC 60595503283 error:",t)}),void setTimeout(e,o)}if("72915616066"===t||"84966080805"===t){function F(){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 Q(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(()=>{T(t)},500),!0}async function z(t,e=1){return F()?Q(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,T)}return z(u).catch(t=>{console.error("[Whatmore] Error:",t)}),void setTimeout(e,o)}if("44061622423"===t){async function K(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(()=>{T(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(()=>{T(t)},500)}).catch(()=>{const e=document.querySelector('[href="/cart"], [data-cart-toggle], a[href*="/cart"]');e&&e.click(),setTimeout(()=>{T(t)},500)}):console.error("[ATC] Add to cart failed:",o.status)}return K(u).catch(t=>{console.error("[Whatmore] Error:",t)}),void setTimeout(e,o)}if("60183445561"===t){async function Z(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(()=>{T(t),window.location.href="https://tapee.in/cart"},500),i}return Z(u).catch(t=>{console.error("Error:",t)}),void setTimeout(e,o)}if("22907887"===t){async function Y(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 Y(u).then(t=>{setTimeout(()=>{T(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(()=>{T(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(()=>{T(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(()=>{T(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(()=>{T(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 tt=document.querySelector('button[data-pf-type="ProductATC2"]');return tt?(h&&tt.setAttribute("data-product-id",h),tt.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,m,f,y,!0,!0,!0)}})},500),void setTimeout(e,o)):(fetch(null===w||void 0===w||null===(b=w.split("?"))||void 0===b?void 0:b[0]).then(t=>t.text()).then(t=>{const e=(new DOMParser).parseFromString(t,"text/html").querySelector('button[data-pf-type="ProductATC2"]');e&&h&&e.setAttribute("data-product-id",h)}),void setTimeout(e,o));var b}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(()=>{T(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(()=>{T(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(()=>{T(u)},500)}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("70840582336"===t){const et=u,ot=1,nt=document.querySelector('product-form form.product-form, form[action*="/cart/add"]');if(nt){let rt=nt.querySelector('input[name="id"]');rt||(rt=document.createElement("input"),rt.type="hidden",rt.name="id",nt.appendChild(rt)),rt.disabled=!1,rt.value=et;const it=nt.querySelector('input[name="quantity"]');it&&(it.value=ot);const at=nt.querySelector('button[data-add-to-cart], button[type="submit"]');return at?(at.dispatchEvent(new MouseEvent("pointerdown",{bubbles:!0})),at.click(),at.dispatchEvent(new MouseEvent("pointerup",{bubbles:!0}))):console.warn("[ATC] button not found"),setTimeout(()=>{T(et)},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:et,quantity:ot}),credentials:"same-origin"}).then(()=>{setTimeout(()=>{T(et)},500),setTimeout(e,o)}).catch(t=>{console.error("[ATC] error for 70840582336:",t),setTimeout(e,o)})}if("64683278550"===t){try{const ct=document.querySelector('form[action="/cart/add"]');if(!ct)return console.warn("[ATC 64683278550] form not found"),void setTimeout(e,o);const dt=ct.querySelector('input[name="id"]');if(!dt)return console.warn("[ATC 64683278550] id input not found"),void setTimeout(e,o);dt.value=u;const st=ct.querySelector('button[type="submit"]');if(!st)return console.warn("[ATC 64683278550] submit button not found"),void setTimeout(e,o);st.click(),setTimeout(()=>{T(u)},500),setTimeout(e,o)}catch(E){console.error("[ATC 64683278550] error:",E),setTimeout(e,o)}return}if("95562924310"===t||"61810999367"===t){try{const ut=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:u,quantity:1}]})});if(ut.ok){const lt=await ut.json();document.dispatchEvent(new CustomEvent("cart:update",{detail:{cart:lt}})),document.dispatchEvent(new CustomEvent("theme:cart:refresh",{detail:{target:"product_flood_atc"},bubbles:!0})),setTimeout(()=>{T(u)},500)}else console.error("[ATC 95562924310] Add to cart failed:",ut.status)}catch(j){console.error("[ATC 95562924310] error:",j)}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(()=>{T(u)},500)}})}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("55337746621"===t){async function pt(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 pt(u,1).then(()=>{setTimeout(()=>{T(u)},500)}).catch(t=>{console.error("[Whatmore] ATC 55337746621 error:",t)}),void setTimeout(e,o)}if("12175954"===t){async function ht(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(()=>{T(t)},500),!0):(console.error("[ATC] Add to cart failed:",o.status),!1)}return ht(u).catch(t=>{console.error("[Whatmore] ATC 12175954 error:",t)}),void setTimeout(e,o)}if("2754609263"===t){const mt=()=>{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 ft(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)?(mt(),setTimeout(()=>{T(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 ft(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)()}#${m}: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(()=>{T(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=(w||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),T(u),e()},i=setTimeout(()=>{document.removeEventListener("cart:updated",r),T(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)()}#${m}: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;if(!0===t.isOpen||!0===t.isVisible)return o=!0,!0;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 _=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},g=(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}},S=t=>{const e=null===t||void 0===t?void 0:t.querySelector('button[type="submit"]');e&&e.click()},C=_(document);if(C||(null===C||void 0===C?void 0:C.length)>0){const yt=g(C,u,h);S(yt),setTimeout(()=>{T(u)},500),yt.remove()}else{var A;fetch(null===w||void 0===w||null===(A=w.split("?"))||void 0===A?void 0:A[0]).then(t=>t.text()).then(t=>{const e=(new DOMParser).parseFromString(t,"text/html"),o=_(e);if(o||(null===o||void 0===o?void 0:o.length)>0){const t=g(o,u,h);S(t),setTimeout(()=>{T(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.d(e,{WR:function(){return a},Wb:function(){return u},Xr:function(){return s},bA:function(){return c},pA:function(){return d},productDetailsDetailed:function(){return i},productDetailsShopifyJSON:function(){return r},tN:function(){return n}})},8847:function(t,e,o){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,y=null,w={};const v=(0,i.Ry)();let T=(0,c.CK)(),b=null===(e=localStorage)||void 0===e?void 0:e.wht_is_impression,_=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"),E=localStorage.getItem("_whatmore_last_video_view_session"),O=(()=>{try{var t;return JSON.parse(null!==(t=localStorage.getItem("_whatmore_add_to_cart_products"))&&void 0!==t?t:"[]")}catch(e){return[]}})(),q=new Set(O.map(t=>String(null===t||void 0===t?void 0:t.product_id))),k=(()=>{try{var t;return JSON.parse(null!==(t=localStorage.getItem("_whatmore_buynow_products"))&&void 0!==t?t:"[]")}catch(e){return[]}})(),N=new Set(k.map(t=>String(null===t||void 0===t?void 0:t.variant_id))),W={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 O=[];if(O=!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==O.length)return console.debug("Whatmore :: no cart items available for view products"),null;let k={},P={};if(null!=g){const t={wht_session_id:null!==E&&void 0!==E?E:g,wht_user_id:j,...S&&{wht_user_group:S},...C&&{wht_ab_test_id:C},...null!=A&&{wht_ab_test_version:A}};P={[d.Uv]:(0,d.dK)(v)?JSON.stringify(t):t,[d.Um]:""}}if(b||_){const t="1";P[_?d.Rm:d.AG]=t,P[_?d.bZ:d.SW]=""}!(0,a.hG)((0,a.VA)(),"order_tracking->disable_impression_order_tracking")&&(P.hasOwnProperty(d.Uv)||P.hasOwnProperty(d.Rm)&&!o.hasOwnProperty(d.Rm)||P.hasOwnProperty(d.AG)&&!o.hasOwnProperty(d.AG))&&s(P),O.map((e,o)=>{if(l=e.key,p=e.quantity,h=e.properties,m=e.widget_info,f=e.location,y=e.userType,("63330517149"==v||"77604192550"==v||"64157352183"==v||"62758289602"==v||"65972830359"==v||"75310563627"==v||(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"==v||"75310563627"==v||(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":q.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=W[("string"===typeof o?o:"").split(":")[1]])&&void 0!==r?r:0)>=W[t]?o:i+`:${t}`}k={...k,[null===e||void 0===e?void 0:e.product_id]:i};s({[o]:t?{...n,...k}:k})}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,y,!0,b,_)})}).catch(t=>{console.error("Whatmore :: Error while fetching cart_token for cart attribute update.",t)})}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[126],{1839:function(e,t,n){function r(e,t){let n=document.getElementById(e);n||(n=document.createElement("style"),n.id=e,document.head.appendChild(n)),n.textContent=t}function a(e,t){if(!e||!t)return e||"";const n=document.createElement("style");n.media="not all",n.textContent=e,document.head.appendChild(n);let r=e;try{const e=n.sheet;e&&(o(e.cssRules,t),r=function(e){let t="";for(let n=0;n<e.length;n++)t+=e[n].cssText+"\n";return t}(e.cssRules))}catch(a){}return n.remove(),r}function o(e,t){for(let n=0;n<e.length;n++){const r=e[n];void 0!==r.selectorText&&void 0!==r.style?r.selectorText=i(r.selectorText,t):!r.cssRules||"undefined"!==typeof CSSKeyframesRule&&r instanceof CSSKeyframesRule||o(r.cssRules,t)}}function i(e,t){return function(e){const t=[];let n=0,r="";for(let a=0;a<e.length;a++){const o=e[a];"("===o||"["===o?n++:")"!==o&&"]"!==o||n--,","===o&&0===n?(t.push(r),r=""):r+=o}return t.push(r),t}(e).map(e=>{const n=e.trim();return n?t+" "+n:n}).join(", ")}function s(e,t,n){if(!e)return null;const r=e[t];if(!r||"object"!==typeof r)return Object.assign({},e,{brandCss:""});const a="string"===typeof e.customCss?e.customCss:"",o=e.shopper&&e.shopper.widgets&&e.shopper.widgets[t],i=c(r.widgets,n)||c(o,n),s=i?Object.assign({},r,i):r;return Object.assign({},s,{brandCss:a,perInstance:!!i})}function c(e,t){if(!e||"object"!==typeof e||!t)return null;const n=Array.isArray(t)?t:[t];for(let r=0;r<n.length;r++){const t=n[r];if(null==t||""===t)continue;const a=e[t];if(a&&"object"===typeof a)return a}return null}n.d(t,{GJ:function(){return a},RO:function(){return s},fz:function(){return r}})},5348:function(e,t,n){n.d(t,{renderNeoBanner:function(){return g}});var r=n(7983),a=n(6387),o=n(1839),i=n(9439),s=".wht-neo-banner-overlay{background:var(--wht-neo-banner-overlay,linear-gradient(to top,transparent 70%,rgba(0,0,0,.3)))}.wht-neo-banner[data-wht-mutebtn] .wht-neo-banner-mute{align-items:center;background:var(--wht-neo-banner-mute-bg,rgba(0,0,0,.4));border:none;border-radius:50%;color:#fff;cursor:pointer;display:flex;height:var(--wht-neo-banner-mute-size,39px);justify-content:center;padding:0;position:absolute;right:10px;top:10px;width:var(--wht-neo-banner-mute-size,39px);z-index:2}.wht-neo-banner-mute svg{height:55%;width:55%}.wht-neo-banner[data-wht-sound] .wht-neo-banner-mute{opacity:.7}.wht-neo-banner-nav{align-items:center;background:var(--wht-neo-banner-nav-bg,#fff);border:none;border-radius:50%;box-shadow:0 1px 4px rgba(0,0,0,.18);color:var(--wht-neo-banner-nav-color,#090a0b);cursor:pointer;display:flex;height:var(--wht-neo-banner-nav-size,36px);justify-content:center;padding:0;position:absolute;top:50%;transform:translateY(-50%);width:var(--wht-neo-banner-nav-size,36px);z-index:2}.wht-neo-banner-nav-prev{left:10px}.wht-neo-banner-nav-next{right:10px}.wht-neo-banner-nav svg{display:block;height:42%;width:42%}.wht-neo-banner[data-wht-dots] .wht-neo-banner-dots{align-items:center;bottom:7%;display:flex;gap:var(--wht-neo-banner-dot-gap,24px);justify-content:center;left:0;position:absolute;right:0;z-index:2}.wht-neo-banner-dot{background:var(--wht-neo-banner-dot,#f8eeec);border:none;border-radius:999px;cursor:pointer;height:12px;padding:0;transition:width .2s ease,background .2s ease;width:12px}.wht-neo-banner-dot[data-wht-active]{background:var(--wht-neo-banner-dot-active,#343434);width:25px}.wht-neo-banner[data-wht-cta] .wht-neo-banner-cta{background:var(--wht-neo-banner-cta-bg,#fff);border-radius:var(--wht-neo-banner-cta-radius,5px);bottom:10%;color:var(--wht-neo-banner-cta-color,#343434);display:inline-block;font-size:var(--wht-neo-banner-cta-size,15px);font-weight:700;left:50%;padding:10px 22px;position:absolute;text-decoration:none;transform:translateX(-50%);white-space:nowrap;z-index:2}.wht-neo-banner[data-wht-cta] .wht-neo-banner-cta[data-wht-empty]{display:none}";const c="https://consumer.whatmore.live",d="banner",l=6e3,u="wht-neo-banner-css",h="wht-neo-banner-critical",p=".wht-neo-banner-widget{width:100%}.wht-neo-banner{position:relative;margin:0 auto;overflow:hidden;cursor:pointer;width:var(--wht-neo-banner-w,var(--wht-neo-banner-w-auto,100%));height:var(--wht-neo-banner-h,var(--wht-neo-banner-h-auto,220px))}.wht-neo-banner-video,.wht-neo-banner-img{width:100%;height:100%;object-fit:cover;display:block;background:#ececec}.wht-neo-banner-overlay{position:absolute;inset:0}.wht-neo-banner-mute,.wht-neo-banner-nav,.wht-neo-banner-dots,.wht-neo-banner-cta{display:none}";async function b(e){let t=null;try{t=new URLSearchParams(window.location.search).get("neoskin")}catch(h){}let n="";const r=t||e&&e.skin;r&&"default"!==r&&"a"!==r&&(n=await(0,a.P)(d,r));const i=r&&"default"!==r?r:"a",c=e&&e.customCss,l="string"===typeof c?c:c&&"object"===typeof c&&"string"===typeof c[i]?c[i]:"";return(0,o.fz)(u,s+"\n"+n+(e&&e.brandCss?"\n"+e.brandCss:"")+(l?"\n"+l:"")),!0}const m=(e,t=null)=>{const n=function(){try{return JSON.parse(localStorage.getItem("whatmore_brand_customizations")).customizations}catch(e){return null}}(),r=e.split(".").reduce((e,t)=>null==e?void 0:e[t],n);return null==r?t:r};async function w({shopId:e,widgetIdentity:t}){const n=t&&"wgt_default"!==t?`${c}/brand/${e}/eventset?widget_id=${t}&source_type=homepage&source_id=${e}&eventset_type=banner&status=active,active`:`${c}/get_eventset/${e}?eventset_type=banner&source=homepage&source_id=${e}`,{events:a}=(0,r.Po)(await fetch(n).then(e=>e.json()),"banner");return a}const v=e=>"image"===e.event_type;function f(e,t,n,r){var a,o;const s=(0,i.vC)(),c=null!==(a=(0,i.eG)(t))&&void 0!==a?a:s.w,d=s.h>c,l=function(e,t,n){var r;const a=e&&e.querySelector("#"+t),o=a&&(null!==(r=a.getAttribute("data-wh"))&&void 0!==r?r:a.getAttribute("data")),i=null!=o?parseFloat(o):NaN;return isFinite(i)?i:n}(document,"whatmoreVideoTileSize",60)/100*Number(m(d?"banner_config.portrait_multiplier":"banner_config.landscape_multiplier",1)),u=m("banner_config.widget_aspect_ratios"),h=null!==(o=u&&u[n]&&u[n][d?"portrait":"landscape"])&&void 0!==o?o:r&&r[d?"portrait":"landscape"],p=Number(null!==h&&void 0!==h?h:m(d?"banner_config.portrait_aspect_ratio":"banner_config.landscape_aspect_ratio",d?1:.5625)),b=!!m("banner_config.is_full_screen"),w=c,v=w*l;return e.style.setProperty("--wht-neo-banner-w-auto",b?"100%":Math.round(v)+"px"),e.style.setProperty("--wht-neo-banner-h-auto",Math.round((b?w:v)*p)+"px"),d}async function g(e){const{rootElement:t,widgetContainer:n,shopId:r,widgetIdentity:a,bannerArOverride:s,whatmoreRootId:c,onWidgetView:u,onBannerClick:g,onBannerCtaClick:y}=e;if((0,i.V2)(e.storeFlags&&e.storeFlags.viewportSizedTiles),!t||!r)return!1;let _;(0,o.fz)(h,p);try{[_]=await Promise.all([w({shopId:r,widgetIdentity:a}),b((0,o.RO)(e.neoJson,d))])}catch(U){return!1}const x=()=>{const e=document.querySelector(`.whatmore-shimmer-container[data-widget-id="${c}"]`);e&&e.remove(),t.removeAttribute("data-shimmer-active"),n&&(n.style.minHeight="0px")};if(!_||!_.length)return x(),!0;const k=document.createElement("div");k.className="wht-neo-banner-widget";const C=document.createElement("div");C.className="wht-neo-banner",C.dataset.role="bannerMedia",r&&C.setAttribute("data-wht-shop",r),a&&C.setAttribute("data-wht-widget",a),m("banner_config.show_mute_button")&&C.setAttribute("data-wht-mutebtn","1"),m("banner_config.show_navigation_dots")&&C.setAttribute("data-wht-dots","1"),m("banner_config.show_cta")&&C.setAttribute("data-wht-cta","1");const E=!!m("banner_config.is_banner_clickable"),A=m("banner_config.selected_dot_color");A&&C.style.setProperty("--wht-neo-banner-dot-active",A);let z=f(C,n,a,s);const N=document.createElement("video");N.className="wht-neo-banner-video",N.muted=!0,N.loop=!0,N.playsInline=!0,N.preload="auto",N.setAttribute("muted",""),N.setAttribute("playsinline",""),N.setAttribute("webkit-playsinline","");const I=document.createElement("img");I.className="wht-neo-banner-img",I.alt="",C.appendChild(N),C.appendChild(I);const P=document.createElement("div");P.className="wht-neo-banner-overlay";const j=document.createElement("button");j.type="button",j.className="wht-neo-banner-mute",j.dataset.role="muteButton",j.setAttribute("aria-label","Toggle sound"),j.innerHTML='<svg viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M11 5 6 9H2v6h4l5 4V5z" fill="currentColor"/><path d="M16 9l5 6M21 9l-5 6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>';const L=e=>{const t=document.createElement("button");t.type="button",t.className="wht-neo-banner-nav wht-neo-banner-nav-"+e,t.dataset.role="navArrows",t.setAttribute("aria-label","prev"===e?"Previous":"Next");const n="prev"===e?"M15 5l-7 7 7 7":"M9 5l7 7-7 7";return t.innerHTML='<svg viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="'+n+'" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/></svg>',t},S=L("prev"),T=L("next"),M=document.createElement("div");M.className="wht-neo-banner-dots",M.dataset.role="dots";const O=_.map((e,t)=>{const n=document.createElement("button");return n.type="button",n.className="wht-neo-banner-dot",n.setAttribute("aria-label","Slide "+(t+1)),M.appendChild(n),n}),R=document.createElement("a");R.className="wht-neo-banner-cta",R.dataset.role="ctaButton",P.appendChild(j),_.length>1&&(P.appendChild(S),P.appendChild(T),P.appendChild(M)),P.appendChild(R),C.appendChild(P),k.appendChild(C);let B=-1,$=null,F=!0,H=!1;const V=()=>{N.muted=!H||!F},q=e=>(e.cta||[]).filter(e=>e&&e.cta_link&&!/whatmore\.ai/i.test(e.cta_link)).sort((e,t)=>{var n,r;return(null!==(n=e.cta_id)&&void 0!==n?n:0)-(null!==(r=t.cta_id)&&void 0!==r?r:0)})[0]||null,J=e=>{clearTimeout($),$=setTimeout(()=>G((B+1)%_.length),e)},G=e=>{B=(e%_.length+_.length)%_.length,clearTimeout($);const t=_[B],n=function(e,t){const n=e.event_media_urls,r=t?"portrait":"landscape",a=t?"landscape":"portrait";if(n){if(v(e))return n.primary&&n.primary[r]&&n.primary[r].content_image_original||"";const o=(e,t)=>{const r=n[e]&&n[e][t];return r&&(r.content_video_1080p||r.content_video_original)||""},i=o("secondary",r);if(i)return i;const s=e.event_hls_url,c=s&&s.startsWith("https://cdn.shopify.com")&&s.includes(".mp4")?s:"";return!c||!t&&o("primary",r)&&o("primary",r)!==o("primary",a)?o("primary",r)||o("primary",a):c}return e.event_m3u8_url||e.event_hls_url||""}(t,z),r=function(e,t){const n=e.event_media_urls,r=t?"portrait":"landscape";return n?n.secondary&&n.secondary[r]&&n.secondary[r].poster_image||n.primary&&n.primary[r]&&n.primary[r].poster_image||e.poster_image||"":e.poster_image||""}(t,z);O.forEach((e,t)=>e.toggleAttribute("data-wht-active",t===B));const a=q(t);if(a&&a.cta_link&&(t.cta||[]).length>1?(R.href=(e=>e&&m("utm.activate_utm")?e+"?"+m("utm.utm_source","")+"&"+m("utm.utm_campaign","")+"&"+m("utm.utm_medium_cart_page",""):e)(a.cta_link),R.textContent=a.cta_title||"Shop now",R.removeAttribute("data-wht-empty")):R.setAttribute("data-wht-empty","1"),!n)return N.style.display="none",void(I.style.display="none");if(v(t))N.pause(),N.style.display="none",I.style.display="",I.src=n,J(l);else{if(I.style.display="none",N.style.display="",r&&(N.poster=r),V(),N.src=n,N.load(),F){const e=N.play();e&&e.catch&&e.catch(()=>{})}const e=()=>{isFinite(N.duration)&&N.duration>0&&J(1e3*N.duration)};N.removeEventListener("loadedmetadata",e),N.addEventListener("loadedmetadata",e,{once:!0})}};S.addEventListener("click",e=>{e.stopPropagation(),G(B-1)}),T.addEventListener("click",e=>{e.stopPropagation(),G(B+1)}),O.forEach((e,t)=>e.addEventListener("click",e=>{e.stopPropagation(),G(t)}));const K=e=>{e.stopPropagation(),H=!H,V(),C.toggleAttribute("data-wht-sound",H)};if(j.addEventListener("click",K),R.addEventListener("click",e=>{e.stopPropagation(),null===g||void 0===g||g(_[B]),null===y||void 0===y||y(_[B],q(_[B]))}),C.addEventListener("click",e=>{null===g||void 0===g||g(_[B]);const t=q(_[B]);E&&t&&t.cta_link?window.open(t.cta_link,"_self"):K(e)}),"IntersectionObserver"in window){new IntersectionObserver(e=>{e.forEach(e=>{if(F=e.isIntersecting,V(),!v(_[B]||{}))if(F){const e=N.play();e&&e.catch&&e.catch(()=>{})}else N.pause()})},{threshold:.01}).observe(C)}let W=!1;if(window.addEventListener("resize",()=>{W||(W=!0,requestAnimationFrame(()=>{W=!1;const e=z;z=f(C,n,a,s),z!==e&&G(B)}))},{passive:!0}),t.innerHTML="",t.appendChild(k),t.style.opacity="1",G(0),u)if("IntersectionObserver"in window){new IntersectionObserver((e,t)=>{e.some(e=>e.isIntersecting)&&(u(),t.disconnect())},{threshold:0}).observe(C)}else u();return x(),!0}},6387:function(e,t,n){n.d(t,{P:function(){return a}});const r={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 a(e,t){const n=r["carousel"===e||"collections"===e?t:e+"-"+t];if(!n)return"";try{return(await n()).default||""}catch(a){return""}}},7983:function(e,t,n){function r(e,t=!1){if(null==e)return{events:[],all_events:[]};if(t){return{events:e.events&&e.events[0]&&e.events[0].events||[],all_events:e.all_events||[]}}return{events:e.events||[],all_events:e.all_events||[]}}function a(e,t){if(null==e||!e.eventsets||!e.eventsets[t])return{events:[],all_events:[]};return{events:(Array.isArray(e.eventsets[t])?e.eventsets[t]:[]).reduce((e,t)=>e.concat(t&&t.events||[]),[]),all_events:[]}}n.d(t,{Np:function(){return r},Po:function(){return a}})}}]);
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[126],{1839:function(e,t,n){function r(e,t){let n=document.getElementById(e);n||(n=document.createElement("style"),n.id=e,document.head.appendChild(n)),n.textContent=t}function a(e,t){if(!e||!t)return e||"";const n=document.createElement("style");n.media="not all",n.textContent=e,document.head.appendChild(n);let r=e;try{const e=n.sheet;e&&(o(e.cssRules,t),r=function(e){let t="";for(let n=0;n<e.length;n++)t+=e[n].cssText+"\n";return t}(e.cssRules))}catch(a){}return n.remove(),r}function o(e,t){for(let n=0;n<e.length;n++){const r=e[n];void 0!==r.selectorText&&void 0!==r.style?r.selectorText=i(r.selectorText,t):!r.cssRules||"undefined"!==typeof CSSKeyframesRule&&r instanceof CSSKeyframesRule||o(r.cssRules,t)}}function i(e,t){return function(e){const t=[];let n=0,r="";for(let a=0;a<e.length;a++){const o=e[a];"("===o||"["===o?n++:")"!==o&&"]"!==o||n--,","===o&&0===n?(t.push(r),r=""):r+=o}return t.push(r),t}(e).map(e=>{const n=e.trim();return n?t+" "+n:n}).join(", ")}function s(e,t,n){if(!e)return null;const r=e[t];if(!r||"object"!==typeof r)return Object.assign({},e,{brandCss:""});const a="string"===typeof e.customCss?e.customCss:"",o=e.shopper&&e.shopper.widgets&&e.shopper.widgets[t],i=c(r.widgets,n)||c(o,n),s=i?Object.assign({},r,i):r;return Object.assign({},s,{brandCss:a,perInstance:!!i})}function c(e,t){if(!e||"object"!==typeof e||!t)return null;const n=Array.isArray(t)?t:[t];for(let r=0;r<n.length;r++){const t=n[r];if(null==t||""===t)continue;const a=e[t];if(a&&"object"===typeof a)return a}return null}n.d(t,{GJ:function(){return a},RO:function(){return s},fz:function(){return r}})},5348:function(e,t,n){n.d(t,{renderNeoBanner:function(){return g}});var r=n(7983),a=n(6387),o=n(1839),i=n(9439),s=".wht-neo-banner-overlay{background:var(--wht-neo-banner-overlay,linear-gradient(to top,transparent 70%,rgba(0,0,0,.3)))}.wht-neo-banner[data-wht-mutebtn] .wht-neo-banner-mute{align-items:center;background:var(--wht-neo-banner-mute-bg,rgba(0,0,0,.4));border:none;border-radius:50%;color:#fff;cursor:pointer;display:flex;height:var(--wht-neo-banner-mute-size,39px);justify-content:center;padding:0;position:absolute;right:10px;top:10px;width:var(--wht-neo-banner-mute-size,39px);z-index:2}.wht-neo-banner-mute svg{height:55%;width:55%}.wht-neo-banner[data-wht-sound] .wht-neo-banner-mute{opacity:.7}.wht-neo-banner-nav{align-items:center;background:var(--wht-neo-banner-nav-bg,#fff);border:none;border-radius:50%;box-shadow:0 1px 4px rgba(0,0,0,.18);color:var(--wht-neo-banner-nav-color,#090a0b);cursor:pointer;display:flex;height:var(--wht-neo-banner-nav-size,36px);justify-content:center;padding:0;position:absolute;top:50%;transform:translateY(-50%);width:var(--wht-neo-banner-nav-size,36px);z-index:2}.wht-neo-banner-nav-prev{left:10px}.wht-neo-banner-nav-next{right:10px}.wht-neo-banner-nav svg{display:block;height:42%;width:42%}.wht-neo-banner[data-wht-dots] .wht-neo-banner-dots{align-items:center;bottom:7%;display:flex;gap:var(--wht-neo-banner-dot-gap,24px);justify-content:center;left:0;position:absolute;right:0;z-index:2}.wht-neo-banner-dot{background:var(--wht-neo-banner-dot,#f8eeec);border:none;border-radius:999px;cursor:pointer;height:12px;padding:0;transition:width .2s ease,background .2s ease;width:12px}.wht-neo-banner-dot[data-wht-active]{background:var(--wht-neo-banner-dot-active,#343434);width:25px}.wht-neo-banner[data-wht-cta] .wht-neo-banner-cta{background:var(--wht-neo-banner-cta-bg,#fff);border-radius:var(--wht-neo-banner-cta-radius,5px);bottom:10%;color:var(--wht-neo-banner-cta-color,#343434);display:inline-block;font-size:var(--wht-neo-banner-cta-size,15px);font-weight:700;left:50%;padding:10px 22px;position:absolute;text-decoration:none;transform:translateX(-50%);white-space:nowrap;z-index:2}.wht-neo-banner[data-wht-cta] .wht-neo-banner-cta[data-wht-empty]{display:none}";const c="https://consumer.whatmore.live",d="banner",l=6e3,u="wht-neo-banner-css",h="wht-neo-banner-critical",p=".wht-neo-banner-widget{width:100%}.wht-neo-banner{position:relative;margin:0 auto;overflow:hidden;cursor:pointer;width:var(--wht-neo-banner-w,var(--wht-neo-banner-w-auto,100%));height:var(--wht-neo-banner-h,var(--wht-neo-banner-h-auto,220px))}.wht-neo-banner-video,.wht-neo-banner-img{width:100%;height:100%;object-fit:cover;display:block;background:#ececec}.wht-neo-banner-overlay{position:absolute;inset:0}.wht-neo-banner-mute,.wht-neo-banner-nav,.wht-neo-banner-dots,.wht-neo-banner-cta{display:none}";async function b(e){let t=null;try{t=new URLSearchParams(window.location.search).get("neoskin")}catch(h){}let n="";const r=t||e&&e.skin;r&&"default"!==r&&"a"!==r&&(n=await(0,a.P)(d,r));const i=r&&"default"!==r?r:"a",c=e&&e.customCss,l="string"===typeof c?c:c&&"object"===typeof c&&"string"===typeof c[i]?c[i]:"";return(0,o.fz)(u,s+"\n"+n+(e&&e.brandCss?"\n"+e.brandCss:"")+(l?"\n"+l:"")),!0}const m=(e,t=null)=>{const n=function(){try{return JSON.parse(localStorage.getItem("whatmore_brand_customizations")).customizations}catch(e){return null}}(),r=e.split(".").reduce((e,t)=>null==e?void 0:e[t],n);return null==r?t:r};async function v({shopId:e,widgetIdentity:t}){const n=t&&"wgt_default"!==t?`${c}/brand/${e}/eventset?widget_id=${t}&source_type=homepage&source_id=${e}&eventset_type=banner&status=active,active`:`${c}/get_eventset/${e}?eventset_type=banner&source=homepage&source_id=${e}`,{events:a}=(0,r.Po)(await fetch(n).then(e=>e.json()),"banner");return a}const w=e=>"image"===e.event_type;function f(e,t,n,r){var a,o;const s=(0,i.vC)(),c=null!==(a=(0,i.eG)(t))&&void 0!==a?a:s.w,d=s.h>c,l=function(e,t,n){var r;const a=e&&e.querySelector("#"+t),o=a&&(null!==(r=a.getAttribute("data-wh"))&&void 0!==r?r:a.getAttribute("data")),i=null!=o?parseFloat(o):NaN;return isFinite(i)?i:n}(document,"whatmoreVideoTileSize",60)/100*Number(m(d?"banner_config.portrait_multiplier":"banner_config.landscape_multiplier",1)),u=m("banner_config.widget_aspect_ratios"),h=null!==(o=u&&u[n]&&u[n][d?"portrait":"landscape"])&&void 0!==o?o:r&&r[d?"portrait":"landscape"],p=Number(null!==h&&void 0!==h?h:m(d?"banner_config.portrait_aspect_ratio":"banner_config.landscape_aspect_ratio",d?1:.5625)),b=!!m("banner_config.is_full_screen"),v=c,w=v*l;return e.style.setProperty("--wht-neo-banner-w-auto",b?"100%":Math.round(w)+"px"),e.style.setProperty("--wht-neo-banner-h-auto",Math.round((b?v:w)*p)+"px"),d}async function g(e){const{rootElement:t,widgetContainer:n,shopId:r,widgetIdentity:a,bannerArOverride:s,whatmoreRootId:c,onWidgetView:u,onBannerClick:g,onBannerCtaClick:y}=e;if((0,i.V2)(e.storeFlags&&e.storeFlags.viewportSizedTiles),!t||!r)return!1;let _;(0,o.fz)(h,p);try{[_]=await Promise.all([v({shopId:r,widgetIdentity:a}),b((0,o.RO)(e.neoJson,d))])}catch(U){return!1}const x=()=>{const e=document.querySelector(`.whatmore-shimmer-container[data-widget-id="${c}"]`);e&&e.remove(),t.removeAttribute("data-shimmer-active"),n&&(n.style.minHeight="0px")};if(!_||!_.length)return x(),!0;const k=document.createElement("div");k.className="wht-neo-banner-widget";const C=document.createElement("div");C.className="wht-neo-banner",C.dataset.role="bannerMedia",r&&C.setAttribute("data-wht-shop",r),a&&C.setAttribute("data-wht-widget",a),m("banner_config.show_mute_button")&&C.setAttribute("data-wht-mutebtn","1"),m("banner_config.show_navigation_dots")&&C.setAttribute("data-wht-dots","1"),m("banner_config.show_cta")&&C.setAttribute("data-wht-cta","1");const E=!!m("banner_config.is_banner_clickable"),A=m("banner_config.selected_dot_color");A&&C.style.setProperty("--wht-neo-banner-dot-active",A);let z=f(C,n,a,s);const N=document.createElement("video");N.className="wht-neo-banner-video",N.muted=!0,N.loop=!0,N.playsInline=!0,N.preload="auto",N.setAttribute("muted",""),N.setAttribute("playsinline",""),N.setAttribute("webkit-playsinline","");const I=document.createElement("img");I.className="wht-neo-banner-img",I.alt="",C.appendChild(N),C.appendChild(I);const P=document.createElement("div");P.className="wht-neo-banner-overlay";const j=document.createElement("button");j.type="button",j.className="wht-neo-banner-mute",j.dataset.role="muteButton",j.setAttribute("aria-label","Toggle sound"),j.innerHTML='<svg viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M11 5 6 9H2v6h4l5 4V5z" fill="currentColor"/><path d="M16 9l5 6M21 9l-5 6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>';const L=e=>{const t=document.createElement("button");t.type="button",t.className="wht-neo-banner-nav wht-neo-banner-nav-"+e,t.dataset.role="navArrows",t.setAttribute("aria-label","prev"===e?"Previous":"Next");const n="prev"===e?"M15 5l-7 7 7 7":"M9 5l7 7-7 7";return t.innerHTML='<svg viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="'+n+'" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/></svg>',t},S=L("prev"),T=L("next"),M=document.createElement("div");M.className="wht-neo-banner-dots",M.dataset.role="dots";const O=_.map((e,t)=>{const n=document.createElement("button");return n.type="button",n.className="wht-neo-banner-dot",n.setAttribute("aria-label","Slide "+(t+1)),M.appendChild(n),n}),R=document.createElement("a");R.className="wht-neo-banner-cta",R.dataset.role="ctaButton",P.appendChild(j),_.length>1&&(P.appendChild(S),P.appendChild(T),P.appendChild(M)),P.appendChild(R),C.appendChild(P),k.appendChild(C);let B=-1,$=null,F=!0,H=!1;const V=()=>{N.muted=!H||!F},q=e=>(e.cta||[]).filter(e=>e&&e.cta_link&&!/whatmore\.ai/i.test(e.cta_link)).sort((e,t)=>{var n,r;return(null!==(n=e.cta_id)&&void 0!==n?n:0)-(null!==(r=t.cta_id)&&void 0!==r?r:0)})[0]||null,J=e=>{clearTimeout($),$=setTimeout(()=>G((B+1)%_.length),e)},G=e=>{B=(e%_.length+_.length)%_.length,clearTimeout($);const t=_[B],n=function(e,t){const n=e.event_media_urls,r=t?"portrait":"landscape",a=t?"landscape":"portrait";if(n){if(w(e))return n.primary&&n.primary[r]&&n.primary[r].content_image_original||"";const o=(e,t)=>{const r=n[e]&&n[e][t];return r&&(r.content_video_1080p||r.content_video_original)||""},i=o("secondary",r);if(i)return i;const s=e.event_hls_url,c=s&&s.startsWith("https://cdn.shopify.com")&&s.includes(".mp4")?s:"";return!c||!t&&o("primary",r)&&o("primary",r)!==o("primary",a)?o("primary",r)||o("primary",a):c}return e.event_m3u8_url||e.event_hls_url||""}(t,z),r=function(e,t){const n=e.event_media_urls,r=t?"portrait":"landscape";return n?n.secondary&&n.secondary[r]&&n.secondary[r].poster_image||n.primary&&n.primary[r]&&n.primary[r].poster_image||e.poster_image||"":e.poster_image||""}(t,z);O.forEach((e,t)=>e.toggleAttribute("data-wht-active",t===B));const a=q(t);if(a&&a.cta_link&&(t.cta||[]).length>1?(R.href=(e=>e&&m("utm.activate_utm")?e+"?"+m("utm.utm_source","")+"&"+m("utm.utm_campaign","")+"&"+m("utm.utm_medium_cart_page",""):e)(a.cta_link),R.textContent=a.cta_title||"Shop now",R.removeAttribute("data-wht-empty")):R.setAttribute("data-wht-empty","1"),!n)return N.style.display="none",void(I.style.display="none");if(w(t))N.pause(),N.style.display="none",I.style.display="",I.src=n,J(l);else{if(I.style.display="none",N.style.display="",r&&(N.poster=r),V(),N.src=n,N.load(),F){const e=N.play();e&&e.catch&&e.catch(()=>{})}const e=()=>{isFinite(N.duration)&&N.duration>0&&J(1e3*N.duration)};N.removeEventListener("loadedmetadata",e),N.addEventListener("loadedmetadata",e,{once:!0})}};S.addEventListener("click",e=>{e.stopPropagation(),G(B-1)}),T.addEventListener("click",e=>{e.stopPropagation(),G(B+1)}),O.forEach((e,t)=>e.addEventListener("click",e=>{e.stopPropagation(),G(t)}));const K=e=>{e.stopPropagation(),H=!H,V(),C.toggleAttribute("data-wht-sound",H)};if(j.addEventListener("click",K),R.addEventListener("click",e=>{e.stopPropagation(),null===g||void 0===g||g(_[B]),null===y||void 0===y||y(_[B],q(_[B]))}),C.addEventListener("click",e=>{null===g||void 0===g||g(_[B]);const t=q(_[B]);E&&t&&t.cta_link?window.open(t.cta_link,"_self"):K(e)}),"IntersectionObserver"in window){new IntersectionObserver(e=>{e.forEach(e=>{if(F=e.isIntersecting,V(),!w(_[B]||{}))if(F){const e=N.play();e&&e.catch&&e.catch(()=>{})}else N.pause()})},{threshold:.01}).observe(C)}let W=!1;if(window.addEventListener("resize",()=>{W||(W=!0,requestAnimationFrame(()=>{W=!1;const e=z;z=f(C,n,a,s),z!==e&&G(B)}))},{passive:!0}),t.innerHTML="",t.appendChild(k),t.style.opacity="1",G(0),u)if("IntersectionObserver"in window){new IntersectionObserver((e,t)=>{e.some(e=>e.isIntersecting)&&(u(),t.disconnect())},{threshold:0}).observe(C)}else u();return x(),!0}},6387:function(e,t,n){n.d(t,{P:function(){return a}});const r={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 a(e,t){const n=r["carousel"===e||"collections"===e?t:e+"-"+t];if(!n)return"";try{return(await n()).default||""}catch(a){return""}}},7983:function(e,t,n){function r(e,t=!1){if(null==e)return{events:[],all_events:[]};if(t){return{events:e.events&&e.events[0]&&e.events[0].events||[],all_events:e.all_events||[]}}return{events:e.events||[],all_events:e.all_events||[]}}function a(e,t){if(null==e||!e.eventsets||!e.eventsets[t])return{events:[],all_events:[]};return{events:(Array.isArray(e.eventsets[t])?e.eventsets[t]:[]).reduce((e,t)=>e.concat(t&&t.events||[]),[]),all_events:[]}}function o(e){return!(void 0==e.products||0==e.products.length)}n.d(t,{Hl:function(){return o},Np:function(){return r},Po:function(){return a}})}}]);
|
|
@@ -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||!e)return t||"";const n=document.createElement("style");n.media="not all",n.textContent=t,document.head.appendChild(n);let o=t;try{const t=n.sheet;t&&(a(t.cssRules,e),o=function(t){let e="";for(let n=0;n<t.length;n++)e+=t[n].cssText+"\n";return e}(t.cssRules))}catch(i){}return n.remove(),o}function a(t,e){for(let n=0;n<t.length;n++){const o=t[n];void 0!==o.selectorText&&void 0!==o.style?o.selectorText=r(o.selectorText,e):!o.cssRules||"undefined"!==typeof CSSKeyframesRule&&o instanceof CSSKeyframesRule||a(o.cssRules,e)}}function r(t,e){return function(t){const e=[];let n=0,o="";for(let i=0;i<t.length;i++){const a=t[i];"("===a||"["===a?n++:")"!==a&&"]"!==a||n--,","===a&&0===n?(e.push(o),o=""):o+=a}return e.push(o),e}(t).map(t=>{const n=t.trim();return n?e+" "+n:n}).join(", ")}function s(t,e,n){if(!t)return null;const o=t[e];if(!o||"object"!==typeof o)return Object.assign({},t,{brandCss:""});const i="string"===typeof t.customCss?t.customCss:"",a=t.shopper&&t.shopper.widgets&&t.shopper.widgets[e],r=l(o.widgets,n)||l(a,n),s=r?Object.assign({},o,r):o;return Object.assign({},s,{brandCss:i,perInstance:!!r})}function l(t,e){if(!t||"object"!==typeof t||!e)return null;const n=Array.isArray(e)?e:[e];for(let o=0;o<n.length;o++){const e=n[o];if(null==e||""===e)continue;const i=t[e];if(i&&"object"===typeof i)return i}return null}n.d(e,{GJ:function(){return i},RO:function(){return s},fz: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.d(e,{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);touch-action:none;user-select:none;-webkit-user-select:none}.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.fz)(f,c+"\n"+n+(t&&t.brandCss?"\n"+t.brandCss:"")+(l?"\n"+l:"")),!0}const v=(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 b(t,e,n){const o=parseFloat(_(t,e,NaN));return isFinite(o)?o:n}function y(){return!0===v("backend_config.use_cdn_cache_endpoint")?u:d}async function x({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===v("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===v("backend_config.use_instance_endpoint_for_product_events")||t&&t.productEventsUseInstance?d:p}(a),s=!0===v("product_page_popup_config.exclude_image_events")?"video":"video,image";if(!0===v("recommendation_config.show_recommended_events")&&!0!==v("recommendation_config.show_collection_events")){const o=!0===v("product_page_popup_config.show_all_events"),i=`${n}/v2/brand/${e}/product-events/recommendation/cdn?client_product_id=${encodeURIComponent(t)}&limit=10&recommended=${!o}&origin=${window.location.hostname}&status=live,upcoming&event_type=${s}`,a=await fetch(i).then(t=>t.json()),l=a&&a.events||[],c=o?a&&a.all_events||[]:(a&&a.related_events||[]).map(t=>Object.assign({},t,{isRelatedEvent:!0}));r=l.length?l.concat(c):[]}else{const i=!0===v("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=${s}`:`${n}/v2/brand/${e}/product-events?client_product_id=${encodeURIComponent(t)}&status=upcoming&event_type=${s}`,{events:a,all_events:l}=(0,o.Np)(await fetch(i).then(t=>t.json()),!1);r=[...a,...l]}}else if(n.startsWith("collection")){let t=_(i,"whatmoreCollectionId","");t&&"0"!==t||(t=window.location.href.split(/[?#]/)[0]);const n=y(),a=!0===v("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=y(),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 v("oos_config.show_oos_videos")||(r=r.filter(t=>t&&!1!==t.in_stock)),r}const A=t=>!!t&&"image"===t.event_type;function C(t){const e=t&&t.event_media_urls;if(!e)return t&&t.thumbnail_image||"";const n=t=>{var n,o,i,a;return(null===(n=e.secondary)||void 0===n||null===(o=n[t])||void 0===o?void 0:o.content_image_original)||(null===(i=e.primary)||void 0===i||null===(a=i[t])||void 0===a?void 0:a.content_image_original)||""};return n("portrait")||n("landscape")||t.thumbnail_image||""}function k(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&&A(t)?C(t):(r&&r.startsWith("https://cdn.shopify.com")&&(r=r.split("?")[0]+"?width=400&height=400"),r)}function E(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?b(t,"whatmoreEmbedAppVideoPlayerSizePortrait",40)/100*1.2:b(t,"whatmoreEmbedAppVideoPlayerSizeLandscape",60)/100,d="spotlight"===e?Number(v("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=b(e,"whatmoreEmbedAppHorizontalPadding"+a,i?10:20),d=b(e,"whatmoreEmbedAppVerticalPadding"+a,i?10:20),p="spotlight"===n?v("spotlight_config.position",s):s,u="spotlight"===n?Number(v("spotlight_config.horizontal_padding",c)):c,h="spotlight"===n?Number(v("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=v("product_page_popup_config.popUpZindex");return null!=f&&t.style.setProperty("--wht-neo-float-z",String(f)),h}const P=250,$=12,L=8,S=300,M=["#pageheader","page-header",".navigation__tier-1-container",".navigation__tier-1"];function z(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 I(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(!z(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)+L,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(!z(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-$-r.height>=p?Math.max(s,a-m+$):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,S)}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&&v("spotlight_config.show_once_to_user"))try{if(window.localStorage.getItem("_whatmore_spotlight_viewed"))return!0;window.localStorage.setItem("_whatmore_spotlight_viewed","true")}catch(X){}let f;(0,s.fz)(m,w);try{[f]=await Promise.all([x({mode:u,shopId:n,landingLocationType:o,widgetContainer:e,storeFlags:t.storeFlags}),g((0,s.RO)(t.neoJson,h))])}catch(X){return!1}if(!f||!f.length)return!0;const b=f[0],y="pdp"===u,$=!!v(y?"product_page_popup_config.ultra_minimize_on_scroll":"spotlight_config.ultraminimize_on_scroll"),L=y&&!$&&!!v("product_page_popup_config.show_popup_on_scroll"),S=y&&!!v("product_page_popup_config.auto_close_on_open"),M=v((y?"product_page_popup_config":"spotlight_config")+".atc_aware_selectors"),z=document.createElement("div");z.className="wht-neo-float",z.dataset.role="floatVideo",z.setAttribute("data-wht-mode",u),n&&z.setAttribute("data-wht-shop",n),z.setAttribute("data-wht-widget","spotlight"===u?"wgt_spotlight":"wgt_embed");const N={vPad:E(z,e,u)};L&&z.setAttribute("data-wht-hidden","");const F=document.createElement("div");F.className="wht-neo-float-frame";const R=A(b),V=document.createElement(R?"img":"video");V.className="wht-neo-float-video";const j=k(b);if(R){V.alt="",V.decoding="async";const t=C(b)||j;t&&(V.src=t)}else if(V.muted=!0,V.loop=!0,V.playsInline=!0,V.autoplay=!0,V.preload="metadata",V.setAttribute("muted",""),V.setAttribute("playsinline",""),V.setAttribute("webkit-playsinline",""),j&&(V.poster=j),b.thumbnail_image){const t=document.createElement("source");t.src=b.thumbnail_image,t.type="video/mp4",V.appendChild(t)}F.appendChild(V);const T=document.createElement("div");T.className="wht-neo-float-overlay";const O=document.createElement("button");O.type="button",O.className="wht-neo-float-close",O.dataset.role="closeButton",O.setAttribute("aria-label","Close video"),O.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>',O.addEventListener("click",t=>{t.stopPropagation(),z.remove(),null===d||void 0===d||d(b)}),T.appendChild(O);const B=document.createElement("span");B.className="wht-neo-float-play",B.dataset.role="playIcon",B.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>',T.appendChild(B);const q=_(e,"whatmoreEmbedAppVideoTitle","");if(q){const t=document.createElement("div");t.className="wht-neo-float-title",t.dataset.role="titleStrip";const n=document.createElement("p");n.textContent=q;const o=_(e,"whatmorePrimaryFont","");o&&(n.style.fontFamily=o),t.appendChild(n),T.appendChild(t)}F.appendChild(T),z.appendChild(F),document.body.appendChild(z);const U=!R&&V.play&&V.play();U&&U.catch&&U.catch(()=>{}),(0,a.Au)();const H=t=>{if(t!==z.hasAttribute("data-wht-ultra"))if(t){z.setAttribute("data-wht-ultra","");try{R||V.pause()}catch(X){}}else{z.removeAttribute("data-wht-ultra");const t=!R&&V.play&&V.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})}(z,()=>{z.hasAttribute("data-wht-ultra")?H(!1):(S?(z.remove(),null===d||void 0===d||d(b)):z.setAttribute("data-wht-fs",""),(0,i.w)(k(b)),null===p||void 0===p||p(b,0,f,{onFullscreenClose:()=>z.removeAttribute("data-wht-fs")}))});let W=!1;const Y=()=>{W||(W=!0,requestAnimationFrame(()=>{W=!1,N.vPad=E(z,e,u)}))};window.addEventListener("resize",Y,{passive:!0}),window.addEventListener("orientationchange",Y,{passive:!0}),window.visualViewport&&window.visualViewport.addEventListener("resize",Y,{passive:!0}),"complete"===document.readyState?setTimeout(Y,300):window.addEventListener("load",()=>setTimeout(Y,300),{once:!0});let J=!1;const K=()=>{!J&&c&&(J=!0,requestAnimationFrame(()=>{(z.checkVisibility?z.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0}):z.offsetWidth>0&&z.offsetHeight>0)&&c(b)}))};if(L||K(),$||L){let t=!1;window.addEventListener("scroll",()=>{t||(t=!0,requestAnimationFrame(()=>{t=!1;window.pageYOffset<=P?H(!1):(L&&z.hasAttribute("data-wht-hidden")&&(z.removeAttribute("data-wht-hidden"),K()),$&&H(!0))}))},{passive:!0}),$&&document.addEventListener("pointerdown",t=>{!z.contains(t.target)&&z.isConnected&&window.pageYOffset>P&&H(!0)},{capture:!0,passive:!0})}return Array.isArray(M)&&M.length&&I(z,M,()=>N.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:[]}}function a(t){return!(void 0==t.products||0==t.products.length)}n.d(e,{Hl:function(){return a},Np:function(){return o},Po:function(){return i}})}}]);
|