whatmore-react-assets 1.0.1914 → 1.0.1915
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/wht-neo-atc.897316fe.chunk.js +1 -0
- package/static/js/{wht-neo-buying-guide.d6207c2a.chunk.js → wht-neo-buying-guide.6dd94df2.chunk.js} +1 -1
- package/static/js/wht-neo-shopper.1f6860c4.chunk.js +1 -0
- package/static/js/wht-skin-buying-guide-b.6749c3b8.chunk.js +1 -0
- package/static/js/wht-skin-buying-guide-c.158ad3e6.chunk.js +1 -0
- package/static/js/wht-skin-buying-guide-d.bb919d40.chunk.js +1 -0
- package/static/js/wht-skin-buying-guide-e.f1566ca2.chunk.js +1 -0
- package/whatmore.js +2 -2
- package/static/js/wht-neo-atc.af443820.chunk.js +0 -1
- package/static/js/wht-neo-shopper.3e2946a2.chunk.js +0 -1
- package/static/js/wht-skin-buying-guide-b.1beb074a.chunk.js +0 -1
- package/static/js/wht-skin-buying-guide-c.517c6519.chunk.js +0 -1
- package/static/js/wht-skin-buying-guide-d.9eebaf88.chunk.js +0 -1
- package/static/js/wht-skin-buying-guide-e.c76ca19d.chunk.js +0 -1
- package/static/js/wht-skin-buying-guide-f.d93f8ee9.chunk.js +0 -1
- package/static/js/wht-skin-buying-guide-g.51ea5f9f.chunk.js +0 -1
- package/static/js/wht-skin-buying-guide-h.a1d4d8bf.chunk.js +0 -1
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[5866],{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:m,onState:h}=t,f=(0,c.Ry)(),y=(0,r.Xr)(o,e);if(!y)return h&&h("init"),{status:"noop"};h&&h("atcApiCallInProgress");try{const t="55586586685"===f&&"function"===typeof m;await(0,i.rH)(f,t?m:()=>{},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 h&&h("added",e),{status:"added",variantId:y,variantLabel:e}}catch(w){return h&&h("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 m;l&&l("productVariantDetailsApiCallInProgress");try{m=await(0,r.productDetailsDetailed)(e,d(n),p)}catch(y){return l&&l("errored"),{status:"errored"}}const h=m&&m.variants||[],f=(0,r.WR)(m);if((0,r.pA)(f)||"direct"===i){if(!(0,r.Wb)(h))return l&&l("errored"),{status:"errored"};return s(t,h,[(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:h}}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 m=(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===m.length)return l&&l("init"),{status:"noop",added:0};l&&l("atcApiCallInProgress");try{const t=m.slice(0,-1),e=m[m.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),m.forEach(({product:t})=>(0,n.fireNeoAtcMetric)(o,t,1)),l&&l("added"),{status:"added",added:m.length}}catch(h){return l&&l("errored"),console.error("Whatmore :: neo bulk ATC failed",h),{status:"errored",added:0}}}},3297:function(t,e,o){o.d(e,{U:function(){return h},fireNeoAtcClick:function(){return m},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,m,h;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!==(m=null===o||void 0===o?void 0:o.event_id)&&void 0!==m?m:"NA",video_percentage:"NA",product_name:null!==(h=null===e||void 0===e?void 0:e.title)&&void 0!==h?h:"NA"})}}function m({event:t,productList:e,ctaList:o=[],customizations:r,widgetSourceDetails:c,interactionType:l}){var p;if(!t||!e||0===e.length)return;const m=(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"})}(m,c,t,e)}function h({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 f},removeOneFromNeoCart:function(){return l}});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 m=(0,i.Ry)(),h=u?(0,n.wm)()+("72201044272"==m?`#${c}#${d}#${s?"olduser":"newuser"}:direct`:`#${c}:direct`):p?"_wt_vs":l?"_wt_vi":"";if(""==h||"_wt_vs"==h||"_wt_vi"==h||"77604192550"==m||"64157352183"==m||"80856187185"==m||"86486974743"==m||"62758289602"==m||"65972830359"==m||"75310563627"==m||"86968402213"==m||(0,a.hG)((0,a.VA)(),"order_tracking->track_using_wtot"))return;let f={id:t,quantity:e,properties:{...h?{[r.B_]:h}:{},...o}};return await fetch("https://"+window.location.hostname+"/cart/change.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)}).then(t=>t.json()).catch(t=>{console.error("Whatmore :: Error while updating cart line item properties direct.",t)})}async function s(t,e=1){if(!t||0===t.length)return!0;try{return(await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:t.map(t=>({id:t,quantity:e}))})})).ok}catch(o){return!1}}async function u(t,e,o){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)}async function l(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 p(){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 m(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(m(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!!p()}async function f(t,e,o,s,l="",h="",f="",y="",w="",v="",T=null){(0,i.yI)();const b=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,f,y,w,!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 q="In stock \u2014 ship now";async function k(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(()=>b(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:q}}]}),_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(()=>b(t),500),!0}return void k(l,1).then(()=>{setTimeout(e,o)}).catch(t=>{console.error("[Whatmore] ATC 38678331531 error:",t)})}if("75026858234"===t){try{const N=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:l,quantity:1}]})}),W=await N.json();N.ok?setTimeout(()=>{b(l),window.location.href="/cart"},500):console.error("[Whatmore] ATC 75026858234 failed:",W)}catch(E){console.error("[Whatmore] ATC 75026858234 error:",E)}return void setTimeout(e,o)}if("52398751922"===t){async function P(){var t;const e=window.jQuery;if(!e||!v||"function"!==typeof(null===(t=window.theme)||void 0===t?void 0:t.initAjaxAddToCartForm))return u(l,1,b);const o=await(await fetch(v.split(/[?#]/)[0]+".js")).json();if(!document.querySelector(".ProductJson-"+o.id)){o.options=o.options.map(t=>t.name||t);const t=document.createElement("script");t.type="application/json",t.className="ProductJson-"+o.id,t.textContent=JSON.stringify(o),document.body.appendChild(t)}const n=document.createElement("div");n.style.display="none",n.innerHTML='<form class="ajax-product-form" action="/cart/add" method="post"><input type="hidden" name="id" value="'+l+'"><input type="hidden" name="quantity" value="1"><button type="submit"></button></form>',document.body.appendChild(n);const r=e(n.firstChild);return new Promise(t=>{r.one("cc:addToCart:success cc:addToCart:error",e=>{n.remove();const o="cc:addToCart:success"===e.type;o&&setTimeout(()=>b(l),500),t(o)}),window.theme.initAjaxAddToCartForm(r),r.trigger("submit")})}return void P().then(()=>{setTimeout(e,o)}).catch(t=>{console.error("[Whatmore] ATC 52398751922 error:",t)})}if("65606910124"===t){async function L(t,e=1){const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}]})});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(()=>b(t),500),!0}return void L(l,1).then(()=>{setTimeout(e,o)}).catch(t=>{console.error("[Whatmore] ATC 65606910124 error:",t)})}if("17994587"===t||"68660855106"===t){async function R(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(()=>b(t),500),!0}return void R(l,1).then(()=>{setTimeout(e,o)}).catch(t=>{console.error("[Whatmore] ATC 17994587/68660855106 error:",t)})}if("57217876118"===t){async function J(t,e=1){const o=new FormData;o.append("id",t),o.append("quantity",e),o.append("sections","side-cart");const n=await fetch("/cart/add.js",{method:"POST",body:o,headers:{"X-Requested-With":"XMLHttpRequest",Accept:"application/javascript"}}).then(t=>t.json());n.status?console.error("atc failed",n.description):(window.ajaxCart.load(n),setTimeout(()=>{b(t)},500))}return void J(l,1).then(()=>{setTimeout(e,o)}).catch(t=>{console.error("[Whatmore] ATC 57217876118 error:",t)})}if("75310563627"===t||"72235450550"===t){async function D(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 D(l,1).then(()=>{setTimeout(()=>{b(l)},500)}).catch(e=>{console.error(`[Whatmore] ATC ${t} error:`,e)}),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)()}#${f}:direct`);const e=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:Number(l),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 I(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 I(l,1).then(()=>{setTimeout(()=>{b(l)},500)}).catch(t=>{console.error("[Whatmore] ATC 67841720509 error:",t)}),void setTimeout(e,o)}if("72603631788"===t||"5220302897"===t){const M=new FormData;M.append("id",l),M.append("quantity","1"),T&&M.append("properties[Size]",T);try{const x=await fetch("/cart/add.js",{method:"POST",body:M}),H=await x.json();H.id?setTimeout(()=>{b(l),window.location.href="/cart"},500):console.error("Afrozeh ATC failed:",H)}catch(E){console.error("Afrozeh ATC error:",E)}return void setTimeout(e,o)}if("67083239728"===t){try{const G=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:l,quantity:1}]})});G.ok||console.error("[ATC] Add to cart failed:",G.status)}catch(E){console.error("[ATC] Error while adding to cart:",E)}return setTimeout(()=>{b(l)},1e3),void setTimeout(e,o)}if("61442818186"===t){async function U(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 U(l,1).then(()=>{setTimeout(()=>{b(l)},500)}).catch(t=>{console.error("[Whatmore] ATC 61442818186 error:",t)}),void setTimeout(e,o)}if("9311420495"===t){async function B(t){const e=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:Number(t),quantity:1}]})}),o=await e.json();if(!e.ok||o.status)return console.error("[Whatmore] ATC 9311420495 failed:",o);document.dispatchEvent(new CustomEvent("ajaxProduct:added",{detail:{product:o}})),setTimeout(()=>b(t),500)}return B(l).catch(t=>{console.error("[Whatmore] ATC 9311420495 error:",t)}),void setTimeout(e,o)}if("56352899156"===t){async function V(t,e=1){const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}]})}),n=await o.json();if(!o.ok)throw new Error(n.description||n.message||"Could not add to cart");document.dispatchEvent(new CustomEvent("theme:cart:refresh",{bubbles:!0}));const r=Array.prototype.slice.call(document.querySelectorAll("[data-cart-drawer-toggle]")),i=r.filter(t=>null!==t.offsetParent)[0]||r[0];i?i.click():window.location.href="/cart",setTimeout(()=>b(t),500)}return V(l,1).catch(t=>{console.error("[Whatmore] ATC 56352899156 error:",t)}),void setTimeout(e,o)}if("68833706274"===t){async function F(t,e=1){const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}],sections:"cart-bubble"})}),n=await o.json();if(!o.ok)throw new Error(n.description||n.message||"Could not add to cart");const r=document.getElementById("cart-drawer-toggle");if(!r||!document.getElementById("Cart-Drawer")||"function"!==typeof window.drawerUpateCustom)return void(window.location.href="/cart");await window.drawerUpateCustom();const i=n.sections&&n.sections["cart-bubble"],a=r.querySelector(".thb-item-count"),c=i&&(new DOMParser).parseFromString(i,"text/html").querySelector(".thb-item-count");a&&c&&(a.innerHTML=c.innerHTML),r.click(),setTimeout(()=>b(t),500)}return F(l,1).catch(t=>{console.error("[Whatmore] ATC 68833706274 error:",t)}),void setTimeout(e,o)}if("62226792677"===t){async function X(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(()=>{b(t)},500)):console.error("[ATC] Add to cart failed:",o.status)}return X(l).catch(t=>{console.error("[Whatmore] Error:",t)}),void setTimeout(e,o)}if("64655163636"===t){async function Q(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(()=>b(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 Q(l,1).catch(t=>{console.error("[Whatmore] ATC 64655163636 error:",t)}),void setTimeout(e,o)}if("3065315386"===t){async function z(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(()=>b(t),500),m([{id:t,quantity:e}])||setTimeout(()=>{window.location.href="/cart"},500),!0):(console.error("[Whatmore] ATC 3065315386 failed:",o.status),!1)}return z(l,1).catch(t=>{console.error("[Whatmore] ATC 3065315386 error:",t)}),void setTimeout(e,o)}if("78393540856"===t){async function K(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(()=>b(t),500),p()||setTimeout(()=>{window.location.href="/cart"},500),!0):(console.error("[Whatmore] ATC 78393540856 failed:",o.status),!1)}return K(l,1).catch(t=>{console.error("[Whatmore] ATC 78393540856 error:",t)}),void setTimeout(e,o)}if("60595503283"===t){async function Z(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(()=>b(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 Z(l,1).catch(t=>{console.error("[Whatmore] ATC 60595503283 error:",t)}),void setTimeout(e,o)}if("47682683045"===t){async function Y(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}]})});return o.ok?(b(t),setTimeout(()=>{document.getElementById("CartDrawer")&&!document.body.classList.contains("template-cart")?document.dispatchEvent(new CustomEvent("ajaxProduct:added")):window.location.href="/cart"},1500),!0):(console.error("[ATC] Add to cart failed:",o.status),!1)}return Y(l,1).catch(t=>{console.error("[Whatmore] ATC 47682683045 error:",t)}),void setTimeout(e,o)}if("64188973306"===t){async function tt(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}]})});return o.ok?(b(t),setTimeout(async()=>{if(!document.querySelector("cart-drawer-component"))return void(window.location.href="/cart");const t=await(await fetch("/cart.js")).json();document.dispatchEvent(new CustomEvent("cart:update",{bubbles:!0,detail:{resource:t,sourceId:"whatmore",data:{itemCount:t.item_count,source:"whatmore"}}}))},1500),!0):(console.error("[ATC] Add to cart failed:",o.status),!1)}return tt(l,1).catch(t=>{console.error("[Whatmore] ATC 64188973306 error:",t)}),void setTimeout(e,o)}if("55586586685"===t){async function et(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}]})});return o.ok?(b(t),setTimeout(()=>{const t=document.querySelector("cart-drawer");t?(document.dispatchEvent(new CustomEvent("cart:refresh")),t.show()):window.location.href="/cart"},1500),!0):(console.error("[ATC] Add to cart failed:",o.status),!1)}return et(l,1).catch(t=>{console.error("[Whatmore] ATC 55586586685 error:",t)}),void setTimeout(e,o)}if("72915616066"===t||"84966080805"===t){function ot(){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 nt(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(()=>{b(t)},500),!0}async function rt(t,e=1){return ot()?nt(t,e):u(t,e,b)}return rt(l).catch(t=>{console.error("[Whatmore] Error:",t)}),void setTimeout(e,o)}if("44061622423"===t){async function it(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(()=>{b(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(()=>{b(t)},500)}).catch(()=>{const e=document.querySelector('[href="/cart"], [data-cart-toggle], a[href*="/cart"]');e&&e.click(),setTimeout(()=>{b(t)},500)}):console.error("[ATC] Add to cart failed:",o.status)}return it(l).catch(t=>{console.error("[Whatmore] Error:",t)}),void setTimeout(e,o)}if("60183445561"===t){async function at(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(()=>{b(t),window.location.href="https://tapee.in/cart"},500),i}return at(l).catch(t=>{console.error("Error:",t)}),void setTimeout(e,o)}if("22907887"===t){async function ct(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 ct(l).then(t=>{setTimeout(()=>{b(l)},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:l,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(()=>{b(l)},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:l,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(()=>{b(l)},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:l,quantity:1})}).then(t=>t.json()).then(t=>{setTimeout(()=>{b(l)},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:l,quantity:1}]})});t.ok?(window.ajaxCart&&"function"===typeof window.ajaxCart.load&&window.ajaxCart.load(),window.jQuery&&window.jQuery("body").trigger("drawer.open"),setTimeout(()=>{b(l)},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 dt=document.querySelector('button[data-pf-type="ProductATC2"]');return dt?(h&&dt.setAttribute("data-product-id",h),dt.click(),setTimeout(()=>{c().then(t=>t.json()).then(t=>{const e=t.items.find(t=>String(t.id)===String(l));if(e){d(e.key,e.quantity,e.properties,f,y,w,!0,!0,!0)}})},500),void setTimeout(e,o)):(fetch(null===v||void 0===v||null===(C=v.split("?"))||void 0===C?void 0:C[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 C}if("64379584700"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:l,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(()=>{b(l)},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(l),quantity:1}]})}).then(async()=>{const t=document.getElementById("mini-cart");t&&"function"===typeof t._rerenderCart&&await t._rerenderCart({detail:{openMiniCart:!0}}),setTimeout(()=>{b(l)},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:l,quantity:1})}).then(t=>t.json()).then(t=>{"function"===typeof window.openGokwikSideCart&&window.openGokwikSideCart(),setTimeout(()=>{b(l)},500)}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("26767687757"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:l,quantity:1})}).then(t=>t.json()).then(t=>{"function"===typeof window.openGokwikSideCart&&window.openGokwikSideCart(),setTimeout(()=>{b(l)},500)}).catch(t=>console.error("[Whatmore] CHOSEN ATC error:",t)),void setTimeout(e,o);if("70840582336"===t){const st=l,ut=1,lt=document.querySelector('product-form form.product-form, form[action*="/cart/add"]');if(lt){let pt=lt.querySelector('input[name="id"]');pt||(pt=document.createElement("input"),pt.type="hidden",pt.name="id",lt.appendChild(pt)),pt.disabled=!1,pt.value=st;const mt=lt.querySelector('input[name="quantity"]');mt&&(mt.value=ut);const ht=lt.querySelector('button[data-add-to-cart], button[type="submit"]');return ht?(ht.dispatchEvent(new MouseEvent("pointerdown",{bubbles:!0})),ht.click(),ht.dispatchEvent(new MouseEvent("pointerup",{bubbles:!0}))):console.warn("[ATC] button not found"),setTimeout(()=>{b(st)},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:st,quantity:ut}),credentials:"same-origin"}).then(()=>{setTimeout(()=>{b(st)},500),setTimeout(e,o)}).catch(t=>{console.error("[ATC] error for 70840582336:",t),setTimeout(e,o)})}if("64683278550"===t){try{const ft=document.querySelector('form[action="/cart/add"]');if(!ft)return console.warn("[ATC 64683278550] form not found"),void setTimeout(e,o);const yt=ft.querySelector('input[name="id"]');if(!yt)return console.warn("[ATC 64683278550] id input not found"),void setTimeout(e,o);yt.value=l;const wt=ft.querySelector('button[type="submit"]');if(!wt)return console.warn("[ATC 64683278550] submit button not found"),void setTimeout(e,o);wt.click(),setTimeout(()=>{b(l)},500),setTimeout(e,o)}catch(O){console.error("[ATC 64683278550] error:",O),setTimeout(e,o)}return}if("95562924310"===t||"61810999367"===t){try{const vt=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:l,quantity:1}]})});if(vt.ok){const Tt=await vt.json();document.dispatchEvent(new CustomEvent("cart:update",{detail:{cart:Tt}})),document.dispatchEvent(new CustomEvent("theme:cart:refresh",{detail:{target:"product_flood_atc"},bubbles:!0})),setTimeout(()=>{b(l)},500)}else console.error("[ATC 95562924310] Add to cart failed:",vt.status)}catch(E){console.error("[ATC 95562924310] error:",E)}return void setTimeout(e,o)}if("45050691744"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:l,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(()=>{b(l)},500)}})}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("55337746621"===t){async function bt(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 bt(l,1).then(()=>{setTimeout(()=>{b(l)},500)}).catch(t=>{console.error("[Whatmore] ATC 55337746621 error:",t)}),void setTimeout(e,o)}if("12175954"===t){async function Ct(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(()=>{b(t)},500),!0):(console.error("[ATC] Add to cart failed:",o.status),!1)}return Ct(l).catch(t=>{console.error("[Whatmore] ATC 12175954 error:",t)}),void setTimeout(e,o)}if("2754609263"===t){const gt=()=>{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 St(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,m;(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)?(gt(),setTimeout(()=>{b(t)},500)):console.error("[Whatmore] ATC 2754609263 failed:",(null===(p=l)||void 0===p?void 0:p.description)||(null===(m=l)||void 0===m?void 0:m.message))}return St(l).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)()}#${f}: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(l),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(l),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(()=>{b(l),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(l));if(n)return{price:n.price,productType:null!==(e=n.product_type)&&void 0!==e?e:""}}catch(r){}try{var o,n;const t=(v||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(l));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),b(l),e()},i=setTimeout(()=>{document.removeEventListener("cart:updated",r),b(l),e()},2500);document.addEventListener("cart:updated",r,{once:!1}),window.cartGiftUpdate(String(l),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)()}#${f}:direct`);const e=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:Number(l),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 g=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},S=(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&&"80261644574"!==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}},_=t=>{const e=null===t||void 0===t?void 0:t.querySelector('button[type="submit"]');e&&e.click()},A=g(document);if(A||(null===A||void 0===A?void 0:A.length)>0){const _t=S(A,l,h);_(_t),setTimeout(()=>{b(l)},500),_t.remove()}else{var j;fetch(null===v||void 0===v||null===(j=v.split("?"))||void 0===j?void 0:j[0]).then(t=>t.text()).then(t=>{const e=(new DOMParser).parseFromString(t,"text/html"),o=g(e);if(o||(null===o||void 0===o?void 0:o.length)>0){const t=S(o,l,h);_(t),setTimeout(()=>{b(l)},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,m={},h=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,C=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"),_=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},..._&&{wht_ab_test_id:_},...null!=A&&{wht_ab_test_version:A}};P={[d.Uv]:(0,d.dK)(v)?JSON.stringify(t):t,[d.Um]:""}}if(b||C){const t="1";P[C?d.Rm:d.AG]=t,P[C?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,m=e.properties,h=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)()+`#${h}`;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!==m&&d.B_ in m||!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 m=(0,i.Ry)(),h=u?(0,c.wm)()+("72201044272"==m?`#${n}#${r}#${s?"olduser":"newuser"}`:`#${n}`):p?"_wt_vs":l?"_wt_vi":"";if(""==h||"_wt_vs"==h||"_wt_vi"==h||"77604192550"==m||"64157352183"==m||"80856187185"==m||"86486974743"==m||"62758289602"==m||"63046287536"==m||"65972830359"==m||"75310563627"==m||"86968402213"==m||(0,a.hG)((0,a.VA)(),"order_tracking->track_using_wtot"))return;let f={id:t,quantity:e,properties:{...h?{[d.B_]:h}:{},...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,m,h,f,y,!0,b,C)})}).catch(t=>{console.error("Whatmore :: Error while fetching cart_token for cart attribute update.",t)})}}}]);
|
package/static/js/{wht-neo-buying-guide.d6207c2a.chunk.js → wht-neo-buying-guide.6dd94df2.chunk.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[5883],{1839:function(t,e,i){function n(t,e){let i=document.getElementById(t);i||(i=document.createElement("style"),i.id=t,document.head.appendChild(i)),i.textContent=e}function s(t,e){if(!t||!e)return t||"";const i=document.createElement("style");i.media="not all",i.textContent=t,document.head.appendChild(i);let n=t;try{const t=i.sheet;t&&(o(t.cssRules,e),n=function(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].cssText+"\n";return e}(t.cssRules))}catch(s){}return i.remove(),n}function o(t,e){for(let i=0;i<t.length;i++){const n=t[i];void 0!==n.selectorText&&void 0!==n.style?n.selectorText=r(n.selectorText,e):!n.cssRules||"undefined"!==typeof CSSKeyframesRule&&n instanceof CSSKeyframesRule||o(n.cssRules,e)}}function r(t,e){return function(t){const e=[];let i=0,n="";for(let s=0;s<t.length;s++){const o=t[s];"("===o||"["===o?i++:")"!==o&&"]"!==o||i--,","===o&&0===i?(e.push(n),n=""):n+=o}return e.push(n),e}(t).map(t=>{const i=t.trim();return i?e+" "+i:i}).join(", ")}function a(t,e,i,n){if(!t)return null;const s=t[e];if(!s||"object"!==typeof s)return Object.assign({},t,{brandCss:""});const o="string"===typeof t.customCss?t.customCss:"",r=t.shopper&&t.shopper.widgets&&t.shopper.widgets[e],a=l(s.widgets,i)||l(r,i),c=a?null:function(t){return 0===String(t||"").indexOf("product")?"product":null}(n),d=c&&s[c]&&"object"===typeof s[c]?s[c]:null,h=a?Object.assign({},s,a):d?Object.assign({},s,d):s;return Object.assign({},h,{brandCss:o,perInstance:!!a,pageScoped:!!d})}function l(t,e){if(!t||"object"!==typeof t||!e)return null;const i=Array.isArray(e)?e:[e];for(let n=0;n<i.length;n++){const e=i[n];if(null==e||""===e)continue;const s=t[e];if(s&&"object"===typeof s)return s}return null}i.d(e,{GJ:function(){return s},RO:function(){return a},fz:function(){return n}})},6563:function(t,e,i){i.d(e,{renderNeoBuyingGuide:function(){return ot}});const n=8,s={tested:"Put to the test",compare:"Side by side",question:"Question",how_to:"How to",up_close:"Up close",style_it:"Style it"},o={products:t=>t+(1===t?" product":" products"),styles:t=>t+(1===t?" style":" styles"),readMore:"Read more",showLess:"Show less",view:"View",playing:"Playing",paused:"Paused",replaying:"Replaying",more:t=>t+" more",unavailable:"Clip unavailable",prev:"Previous product",next:"Next product",pause:"Pause",play:"Play",mute:"Mute",unmute:"Unmute",proof:"Who made this clip",list:"Products in these clips",watch:"Watch its clip",again:"Watch this one again",views:"views",likes:"likes"},r={pause:'<svg viewBox="0 0 16 16" fill="currentColor"><rect x="3.5" y="2.5" width="3" height="11" rx="1"/><rect x="9.5" y="2.5" width="3" height="11" rx="1"/></svg>',play:'<svg viewBox="0 0 16 16" fill="currentColor"><path d="M4 2.5v11l9-5.5z"/></svg>',muted:'<svg viewBox="0 0 16 16" fill="currentColor"><path d="M2 6h3l4-3v10l-4-3H2z"/><path d="M11 6l4 4m0-4l-4 4" stroke="currentColor" stroke-width="1.5"/></svg>',sound:'<svg viewBox="0 0 16 16" fill="currentColor"><path d="M2 6h3l4-3v10l-4-3H2z"/><path d="M11 5.5a3.5 3.5 0 010 5M12.8 3.8a6 6 0 010 8.4" fill="none" stroke="currentColor" stroke-width="1.4"/></svg>',loop:'<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6"><path d="M3 8a5 5 0 018.5-3.5L13 6M13 2.5V6H9.5M13 8a5 5 0 01-8.5 3.5L3 10m0 3.5V10h3.5"/></svg>'},a=/\[([^\]]+)\]\(p:([^)\s]+)\)/g,l=t=>String(null==t?"":t).replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"}[t])),c=t=>String(null==t?0:t).split(":").reduce((t,e)=>60*t+(Number(e)||0),0),d=c,h=t=>null!=t&&""!==t&&Number.isFinite(Number(t))?Number(t)>=1e3?(Number(t)/1e3).toFixed(1).replace(/\.0$/,"")+"K":String(t):"";function p(t){const e=new Set,i=[];for(const n of t.clips||[]){const s=String(n.product_id);e.has(s)||(e.add(s),i.push({...n,product_id:s,chip:t.chips&&t.chips[n.id]||n.shows||""}))}const s=[...String(t.body||"").matchAll(a)].map(t=>t[2]),o=t=>s.includes(t.product_id)?s.indexOf(t.product_id):1/0,r=i.map((t,e)=>[t,e]).sort((t,e)=>o(t[0])-o(e[0])||t[1]-e[1]).map(t=>t[0]).slice(0,n),l=Array.isArray(t.order)?t.order:[];if(!l.length)return r;const c=t=>l.indexOf(t.id)+1||1e9;return r.map((t,e)=>[t,e]).sort((t,e)=>c(t[0])-c(e[0])||t[1]-e[1]).map(t=>t[0])}function u(t,e,i,n,s,o){const r=n[t.product_id]||{};return`<div class="bg-tile" role="listitem" data-pid="${l(t.product_id)}">\n <button class="bg-tile-main" type="button" data-tile="${e}" aria-pressed="false" title="${l(s.again)}">\n <span class="bg-tile-img">${r.image?`<img loading="lazy" src="${l(r.image)}" alt="">`:""}${"how_to"===i?`<em>${e+1}</em>`:""}</span>\n <span class="bg-tile-info">\n <span class="bg-tile-state"></span>\n <span class="bg-tile-name">${l(r.style||r.title||"")}</span>\n <span class="bg-tile-print">${l(r.print||"")}</span>\n <span class="bg-tile-value" title="${l(t.answer||"")}">${l(t.chip)}</span>\n </span>\n </button>\n <div class="bg-tile-buy">\n <span class="bg-tile-price">${l(function(t,e){const i=Number(t);if(null==t||""===t||!Number.isFinite(i))return"";const n={style:"currency",currency:e||"USD",maximumFractionDigits:i%1?2:0};try{return new Intl.NumberFormat(void 0,{...n,currencyDisplay:"narrowSymbol"}).format(i)}catch(s){}try{return new Intl.NumberFormat(void 0,n).format(i)}catch(s){return String(t)}}(r.price,r.currency))}</span>\n ${r.link?`<a class="bg-tile-view" href="${l(r.link)}"${o} data-view="${l(t.product_id)}">${l(s.view)}</a>`:""}\n </div>\n <span class="bg-tile-bar"><b></b></span>\n </div>`}function g(t,e,i,n,c){const d=c||{},h=d.newTab?' target="_blank" rel="noopener"':"",p=i.products||{},g=t.format||"question",b=Object.keys(p).some(t=>p[t]&&p[t].print),f=new Set(e.map(t=>(p[t.product_id]||{}).style||t.product_id)).size,m=b?(n.styles||o.styles)(f):n.products(e.length),v="compare"===g&&Array.isArray(t.ends)&&2===t.ends.length?`<div class="bg-axis"><span>${l(t.ends[0])}</span><i></i><span>${l(t.ends[1])}</span></div>`:"",y=`<div class="bg-stage">\n <div class="bg-progress">${e.map(()=>"<i><b></b></i>").join("")}</div>\n <video class="wht-neo-video" muted playsinline preload="none"></video>\n <div class="bg-spinner" aria-hidden="true"></div>\n <button class="bg-nav prev" type="button" data-act="prev" aria-label="${l(n.prev)}"><i>\u2039</i></button>\n <button class="bg-nav next" type="button" data-act="next" aria-label="${l(n.next)}"><i>\u203a</i></button>\n <div class="bg-note" role="status" hidden></div>\n <div class="bg-proof" aria-label="${l(n.proof)}"></div>\n <div class="bg-ctl"><button class="bg-btn" type="button" data-act="play" aria-label="${l(n.pause)}">${r.pause}</button><button class="bg-btn" type="button" data-act="mute" aria-label="${l(n.unmute)}">${r.muted}</button></div>\n </div>`;return`<section class="bg-card fmt-${l(g)}" data-key="${l(t.key)}">\n <div class="bg-head">\n ${d.hideEyebrow?"":`<p class="bg-eyebrow">${l((n.formats||s)[g]||s.question)} \xb7 ${l(m)}</p>`}\n <h3 class="bg-title">${l(t.title)}</h3>\n ${v}\n </div>\n <div class="bg-a">\n <div class="bg-text">\n <div class="bg-body-wrap"><p class="bg-body">${function(t,e,i,n){const s=String(t||""),o=[];let r=0;for(const c of s.matchAll(a)){o.push(l(s.slice(r,c.index)));const t=e.has(c[2])?i[c[2]]:null;o.push(t?`<a class="bg-plink" href="${l(t.link||"#")}" data-pid="${l(c[2])}" title="${l(n.watch)}">${l(c[1])}</a>`:l(c[1])),r=c.index+c[0].length}return o.push(l(s.slice(r))),o.join("")}(t.body,new Set(e.map(t=>t.product_id)),p,n)}</p></div>\n <button class="bg-more" type="button" data-act="more" aria-expanded="false">${l(n.readMore)}</button>\n </div>\n <div class="bg-media">\n <div class="bg-videos">${e.map((t,e)=>function(t,e,i,n,s,o){const a=i[t.product_id]||{},c=((s||{})[t.video_key]||{}).poster||a.image||"";return`<div class="bg-vtile${0===e?" active":""}" data-tile="${e}" data-pid="${l(t.product_id)}" title="${l(n.again)}">${c?`<img loading="lazy" src="${l(c)}" alt="">`:""}<i class="bg-tile-play" aria-hidden="true">${r.play}</i>${o||""}</div>`}(t,e,p,n,i.videos,0===e?y:"")).join("")}</div>\n <div class="bg-rail" role="list" aria-label="${l(n.list)}">${e.map((t,e)=>u(t,e,g,p,n,h)).join("")}</div>\n </div>\n <button class="bg-slide-nav prev" type="button" data-act="prev" aria-label="${l(n.prev)}"><i>\u2039</i></button>\n <button class="bg-slide-nav next" type="button" data-act="next" aria-label="${l(n.next)}"><i>\u203a</i></button>\n </div>\n </section>`}const b=(t,e)=>e.querySelector(t),f=new Set;if("undefined"!==typeof document&&document.addEventListener){const t=()=>f.forEach(t=>t());document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&t()}),"undefined"!==typeof window&&window.addEventListener("pagehide",t)}class m{constructor(t,e,i){m.all.add(this),this.card=t,this.clips=e,this.opts=i||{},this.data=this.opts.data||{},this.labels=this.opts.labels||o,this.v=b("video",t),this.v.muted=!0,this.box=b(".bg-stage",t),this.rail=b(".bg-rail",t),this.tiles=Array.from(t.querySelectorAll(".bg-tile")),this.vtiles=Array.from(t.querySelectorAll(".bg-vtile")),this.bars=Array.from(t.querySelectorAll(".bg-progress b")),this.running=!1,this.started=!1,this.held=!!this.opts.reducedMotion,this.replays=0,this.userScrollAt=0,this.i=0,this.watchFrom=0,this.watchClip=null,this.watchDuration=null,this.startedClips=new Set;const n=this.v;n.addEventListener("playing",()=>this.startWatch()),n.addEventListener("durationchange",()=>this.noteDuration()),["pause","emptied"].forEach(t=>n.addEventListener(t,()=>this.flushWatch())),this.onPageHide=()=>{const t=!!this.watchClip&&!n.paused;this.flushWatch(),t&&this.startWatch()},f.add(this.onPageHide),n.addEventListener("loadedmetadata",()=>{this.fit(),this.seek(),this.running?this.tryPlay():this.setLoading(!1)}),n.addEventListener("timeupdate",()=>this.tick()),n.addEventListener("ended",()=>this.atEnd()),n.addEventListener("error",()=>{this.started&&n.getAttribute("data-src")&&this.fail()}),["waiting","seeking","stalled"].forEach(t=>n.addEventListener(t,()=>this.setLoading(this.running))),["playing","canplay","seeked"].forEach(t=>n.addEventListener(t,()=>this.setLoading(this.running&&n.readyState<3)));const s=b(".bg-media",t)||this.rail;["wheel","touchstart","pointerdown"].forEach(t=>s.addEventListener(t,()=>{this.userScrollAt=Date.now()},{passive:!0})),this.held&&this.setPlayIcon(!1),this.point(0),this.seat(),this.paint(!1)}seat(){const t=this.vtiles[this.i];if(!t||this.box.parentNode===t)return;const e=this.running&&!this.v.paused;t.appendChild(this.box),e&&this.tryPlay()}video(t){return(this.data.videos||{})[this.clips[t].video_key]||{}}tryPlay(){const t=this.v.play();t&&t.catch&&t.catch(()=>{})}seek(){try{this.v.currentTime=this.s}catch(t){}}setPlayIcon(t){const e=b('[data-act="play"]',this.card);e.innerHTML=t?r.pause:r.play,e.setAttribute("aria-label",t?this.labels.pause:this.labels.play)}point(t){const e=this.clips[t];this.i=t,this.s=c(e.start),this.e=Math.max(c(e.end),this.s+5)}noteDuration(){const t=this.v.duration;this.watchClip&&Number.isFinite(t)&&t>0&&(this.watchDuration=Math.round(10*t)/10)}startWatch(){this.watchFrom||(this.watchFrom=Date.now(),this.watchClip=this.clips[this.i],this.noteDuration(),this.startedClips.has(this.watchClip)||(this.startedClips.add(this.watchClip),this.opts.track&&this.opts.track.onClipStarted&&this.opts.track.onClipStarted(this.watchClip)))}flushWatch(){if(!this.watchFrom||!this.watchClip)return;const t=(Date.now()-this.watchFrom)/1e3,e=this.watchClip,i=this.watchDuration;this.watchFrom=0,this.watchClip=null,this.watchDuration=null,t>=1&&this.opts.track&&this.opts.track.onClipWatched&&this.opts.track.onClipWatched(e,{watchTime:Math.round(10*t)/10,duration:i,clipStart:d(e.start),clipEnd:d(e.end)})}go(t){this.flushWatch(),this.point(t),this.seat(),this.started=!0;const e=this.video(t);if(b(".bg-note",this.card).hidden=!0,this.v.getAttribute("data-src")!==(e.url||"")){if(this.v.setAttribute("data-src",e.url||""),e.poster&&(this.v.poster=e.poster),!e.url)return void this.fail();this.opts.setSource?this.opts.setSource(this.v,e.url):this.v.src=e.url,this.setLoading(this.running),this.running&&this.tryPlay()}else this.fit(),this.seek(),this.running&&this.tryPlay(),this.running&&!this.v.paused&&this.startWatch();this.warmNext(),this.paint(!0)}warmNext(){if(!this.running||this.replays>1||!this.opts.warm)return;const t=this.video(this.next()).url;t&&t!==this.v.getAttribute("data-src")&&t!==this.warmed&&(this.warmed=t,this.opts.warm(t))}fit(){const t=this.v.duration;!Number.isFinite(t)||t<=0||this.e<=t||(this.e=t,this.s=Math.max(0,Math.min(this.s,t-5)))}next(t){const e=t||1,i=this.clips.length;for(let n=1;n<=i;n++){const t=((this.i+e*n)%i+i)%i;if(!this.tiles[t].classList.contains("unavailable"))return t}return this.i}tick(){const t=this.v.currentTime;if(!this.started||t<this.s-.5)return;if(t>=this.e)return void this.atEnd();const e=Math.min(100,Math.max(0,100*(t-this.s)/(this.e-this.s)));this.bars.forEach((t,i)=>{t.style.width=i<this.i?"100%":i>this.i?"0":e+"%"});const i=this.tiles[this.i]&&this.tiles[this.i].querySelector(".bg-tile-bar b");i&&(i.style.width=e+"%")}atEnd(){const t=Date.now();if(!(t-(this.endedAt||0)<400)){if(this.endedAt=t,this.replays>1)return this.replays-=1,this.seek(),this.running&&this.tryPlay(),this.paint(!1),void this.warmNext();this.replays=0,this.go(this.next())}}setLoading(t){this.box.classList.toggle("loading",!!t),[this.tiles[this.i],this.vtiles[this.i]].forEach(e=>{e&&e.classList.toggle("loading",!!t)})}paint(t){const e=this.labels;this.tiles.forEach((t,i)=>{const n=i===this.i,s=n&&this.replays>0;t.classList.toggle("active",n),t.classList.toggle("looping",s),t.classList.toggle("paused",n&&!this.running),t.querySelector(".bg-tile-main").setAttribute("aria-pressed",String(s)),n?t.setAttribute("aria-current","true"):t.removeAttribute("aria-current"),n||(t.querySelector(".bg-tile-bar b").style.width="0",t.classList.remove("loading")),t.querySelector(".bg-tile-state").innerHTML=t.classList.contains("unavailable")?l(e.unavailable):s?r.loop+" "+l(e.replaying)+(this.replays>1?" \xb7 "+l(e.more(this.replays-1)):""):n&&this.started?'<i class="eq"><b></b><b></b><b></b></i> '+l(this.running?e.playing:e.paused):""}),this.vtiles.forEach((t,e)=>{const i=e===this.i;t.classList.toggle("active",i),t.classList.toggle("paused",i&&!this.running),t.classList.toggle("unavailable",!!this.tiles[e]&&this.tiles[e].classList.contains("unavailable")),i||t.classList.remove("loading")});const i=this.clips[this.i].product_id;this.card.querySelectorAll(".bg-plink").forEach(t=>t.classList.toggle("watching",this.replays>0&&t.getAttribute("data-pid")===i));const n=this.video(this.i),s=n.handle?"@"+n.handle:this.opts.storeName||"",o=[null!=n.views&&""!==n.views&&h(n.views)+" "+e.views,null!=n.likes&&""!==n.likes&&h(n.likes)+" "+e.likes].filter(Boolean).join(" \xb7 ");b(".bg-proof",this.card).innerHTML=s?`<span class="pf-avatar">${l((n.handle||s)[0].toUpperCase())}</span><span class="pf-text"><b>${l(s)}</b>${o?`<em>${l(o)}</em>`:""}</span>`:"",t&&this.reveal()}reveal(){Date.now()-this.userScrollAt<2500||(this.bringIntoView(this.tiles[this.i]),this.bringIntoView(this.vtiles[this.i]))}bringIntoView(t){if(!t||"function"!==typeof getComputedStyle)return;const e=t.getBoundingClientRect();if(e.width||e.height)for(let i=t.parentElement;i&&i!==this.card;i=i.parentElement){const t=getComputedStyle(i),n=i.scrollWidth>i.clientWidth+1&&/auto|scroll/.test(t.overflowX),s=i.scrollHeight>i.clientHeight+1&&/auto|scroll/.test(t.overflowY);if((n||s)&&"function"===typeof i.scrollTo){const t=i.getBoundingClientRect();return void i.scrollTo({left:n?i.scrollLeft+(e.left-t.left)-(i.clientWidth-e.width)/2:i.scrollLeft,top:s?i.scrollTop+(e.top-t.top)-(i.clientHeight-e.height)/2:i.scrollTop,behavior:"smooth"})}}}watch(t){this.replay(t);const e=this.box.getBoundingClientRect(),i="undefined"!==typeof window&&window.innerHeight||0;(e.top<0||e.bottom>i)&&this.box.scrollIntoView&&this.box.scrollIntoView({block:"nearest",behavior:"smooth"})}replay(t){this.userScrollAt=0,this.replays=3,this.held=!1,this.setPlayIcon(!0),this.running=!0,this.go(t)}step(t){this.userScrollAt=0,this.replays=0,this.held=!1,this.setPlayIcon(!0),this.running=!0,this.go(this.next(t))}fail(){this.tiles[this.i].classList.add("unavailable"),this.vtiles[this.i]&&this.vtiles[this.i].classList.add("unavailable"),this.setLoading(!1);const t=b(".bg-note",this.card);t.textContent=this.labels.unavailable,t.hidden=!1,this.paint(!1),clearTimeout(this.failTimer),this.replays=0,this.failTimer=setTimeout(()=>{this.next()!==this.i&&this.go(this.next())},900)}play(){this.running=!this.held,this.running?this.started?(this.tryPlay(),this.warmNext(),this.paint(!1)):this.go(this.i):this.paint(!1)}pause(){this.running=!1,this.v.pause(),this.flushWatch(),this.setLoading(!1),this.paint(!1)}leave(){this.replays=0,this.pause()}toggle(){this.held=!this.held,this.setPlayIcon(!this.held),this.held?this.pause():this.play()}setMuted(t){this.v.muted=t;const e=b('[data-act="mute"]',this.card);e.innerHTML=t?r.muted:r.sound,e.setAttribute("aria-label",t?this.labels.unmute:this.labels.mute)}mute(){const t=this.v.muted;if(t&&m.all.forEach(t=>{t!==this&&t.setMuted(!0)}),this.setMuted(!t),!t||!this.running)return;const e=this.v.play();e&&e.catch&&e.catch(()=>{this.setMuted(!0),this.running&&this.tryPlay()})}destroy(){m.all.delete(this),clearTimeout(this.failTimer),this.running=!1;try{this.v.pause()}catch(t){}if(this.flushWatch(),f.delete(this.onPageHide),this.opts.releaseSource)this.opts.releaseSource(this.v);else{this.v.removeAttribute("src");try{this.v.load()}catch(t){}}}}m.all=new Set;const v=/recent|recommend|upsell|cross-sell|related/i,y=new Set(["SCRIPT","TEMPLATE","STYLE","LINK","NOSCRIPT"]),x=4,w="data-wht-bg-card",k="data-wht-bg-pad",S=2,E=12,C=1e4,A=[700,2500];function L(t){const e=/\/products\/([^/?#]+)/.exec(String(t||""));if(!e)return"";try{return decodeURIComponent(e[1]).toLowerCase()}catch(i){return e[1].toLowerCase()}}function $(t){const e=new Set;return t.forEach(t=>{(t.matches&&t.matches(M)?[t]:Array.from(t.querySelectorAll(M))).forEach(t=>{const i=L(t.getAttribute("href"));i&&e.add(i)})}),e}const _=t=>!y.has(t.tagName)&&!t.hasAttribute(w)&&"none"!==getComputedStyle(t).display,T=t=>{const e=getComputedStyle(t);return e.float&&"none"!==e.float||"inline-block"===e.display},M='a[href*="/products/"]',R=t=>t.matches&&t.matches(M)||!!t.querySelector(M);function z(t){return t.some(t=>t.offsetHeight>0)?t.filter(t=>R(t)||t.offsetHeight>0&&t.offsetWidth>0):t}function P(t){const e=t||document,i=e.querySelector('main, #MainContent, [role="main"]')||e.body||e,n=e.body||e;if(!i)return null;const s=new Set;let o=null;return i.querySelectorAll('a[href*="/products/"]').forEach(t=>{for(let r=t.parentElement,a=0;r&&r!==i&&a<18;r=r.parentElement,a++){if(s.has(r))continue;s.add(r);const t=Array.from(r.children).filter(_),i=t.filter(R);if(i.length<4||i.length/t.length<.6)continue;if(e.body&&$(i.slice(0,12)).size<4)continue;const a=getComputedStyle(r),l=a.display.includes("grid")||a.display.includes("flex")&&"wrap"===a.flexWrap,c=!l&&/^(block|flow-root|list-item)$/.test(a.display)&&T(i[0])&&T(i[1]);if(!l&&!c)continue;const d=r.scrollWidth-r.clientWidth;if(d>4&&/auto|scroll/.test(a.overflowX)||d>.5*r.clientWidth)continue;if(l&&a.display.includes("grid")&&String(a.gridAutoFlow||"").includes("column"))continue;let h=!1;for(let e=r;e&&e!==n;e=e.parentElement)if(v.test(e.id+" "+("string"===typeof e.className?e.className:"")+" "+e.tagName)){h=!0;break}h||o&&!(i.length>o.items.length)||(o={grid:r,items:i,tiles:z(t),flow:c})}}),o}function I(t){if(!t.length)return[];const e=t.some(e=>e.offsetTop!==t[0].offsetTop),i=t=>e?t.offsetTop:t.getBoundingClientRect().top,n=[0];let s=i(t[0]);for(let o=1;o<t.length;o++){const e=i(t[o]);Math.abs(e-s)>=4&&(n.push(o),s=e)}return n}const N=t=>parseFloat(t)||0,B={marginTop:"0px",marginBottom:"0px",padding:"0px"};function j(t,e,i){const n=(t||document).createElement(e);return n.setAttribute(w,i||""),Object.assign(n.style,{display:"block",gridColumn:"1 / -1",gridRow:"auto",gridTemplateRows:"none",flex:"0 0 100%",width:"100%",maxWidth:"100%",boxSizing:"border-box",listStyle:"none",margin:"0",padding:"0",float:"none",clear:"both"}),n}function O({slots:t,anchor:e=null,mode:i="grid",firstRows:n=2,everyRows:s=3,minBefore:o=x,doc:r,slotProducts:a=null,isFiltered:l=null,onSwap:c=null}){const d=r||document,h=d.ownerDocument||d;let p="none",u=null,g=null,b=!1;const f="function"===typeof ResizeObserver?new ResizeObserver(()=>F()):null,m=t.map(t=>t.firstElementChild),v=t.map(t=>t.getAttribute(w)||"");const y=t=>{const e=[];for(let i=t.nextElementSibling;i&&i.hasAttribute(k);i=i.nextElementSibling)e.push(i);return e},L=t=>{let e=t.nextElementSibling;for(;e&&e.hasAttribute(k);)e=e.nextElementSibling;return e},_=t=>{y(t).forEach(t=>t.remove()),t.remove()};let T=[],M=!1,R=[];const z=h.defaultView||("undefined"!==typeof window?window:null),O=d===h&&z&&"function"===typeof z.scrollBy;function q(t,e){if(!O)return null;const i=function(t){for(let e=t.parentElement;e&&e!==h.body&&e!==h.documentElement;e=e.parentElement){const t=getComputedStyle(e).overflowY;if(("auto"===t||"scroll"===t)&&e.scrollHeight>e.clientHeight+1)return e}return null}(e);if(!((i?i.scrollTop:z.pageYOffset)>0))return null;const n=i?i.getBoundingClientRect().top:0,s=t.find(t=>t.getBoundingClientRect().top>=n);return s?{el:s,top:s.getBoundingClientRect().top,box:i}:null}function W(){const r="grid"!==i||M?null:P(d);if(!r)return R=[],void function(){if(!e)return t.forEach(_),void(p="none");t.forEach((t,i)=>{Object.assign(t.style,B),y(t).forEach(t=>t.remove()),t.parentElement===e&&e.children[i]===t||e.insertBefore(t,e.children[i]||null)}),p="anchor"}();const c=a&&l&&l()?$(r.items):null,g=c?t.filter((t,e)=>(a[e]||[]).filter(t=>c.has(t)).length>=S):t,b=q(r.items,r.grid);t.forEach(t=>{g.includes(t)||_(t)});const m=t.filter(t=>t.parentElement===r.grid);m.forEach(t=>{t.style.position="absolute"});const v=I(r.tiles),x=function(t){const e=I(t);return e.reduce((i,n,s)=>Math.max(i,(s+1<e.length?e[s+1]:t.length)-n),1)}(r.tiles);m.forEach(t=>{t.style.position=""});const w=v.length>1?r.tiles[v[1]]:null,E=function(t){const e=getComputedStyle(t),i=N(e.borderTopWidth)+N(e.borderBottomWidth)>0||!/^(|transparent|rgba\(0, 0, 0, 0\))$/.test(e.backgroundColor||"")||!/^(|none)$/.test(e.boxShadow||""),n=t=>Math.min(120,Math.max(0,Math.round(N(t))))+"px";return{marginTop:n(e.marginTop),marginBottom:n(e.marginBottom),padding:i?"0px":[e.paddingTop,e.paddingRight,e.paddingBottom,e.paddingLeft].map(n).join(" ")}}(w&&r.items.includes(w)?w:r.items[0]);let C=Math.min(n,v.length);for(;C<v.length&&v[C]<o;)C++;R=[],g.forEach((t,e)=>{Object.assign(t.style,E);const i=C+e*s,n=i<v.length?r.tiles[v[i]]:null,o=t.parentElement===r.grid;if(n)o&&L(t)===n||(y(t).forEach(t=>t.remove()),r.grid.insertBefore(t,n));else{if(0!==e)return void _(t);o&&!L(t)||(y(t).forEach(t=>t.remove()),r.grid.appendChild(t))}!function(t,e){const i=y(t);i.slice(e).forEach(t=>t.remove());for(let n=i.length;n<e;n++){const e=h.createElement(t.tagName.toLowerCase());e.setAttribute(k,""),e.setAttribute("aria-hidden","true"),e.hidden=!0,e.style.setProperty("display","none","important"),t.parentElement.insertBefore(e,t.nextSibling)}}(t,x-1),R.push(t)}),function(t){if(!t||!t.el.isConnected)return;const e=t.el.getBoundingClientRect().top-t.top;Math.abs(e)<=1||(t.box?t.box.scrollTop+=e:z.scrollBy(0,e))}(b),f&&u!==r.items[0]&&(f.disconnect(),f.observe(r.items[0]),u=r.items[0]),p="grid"}function D(){if(b)return;if(function(){let e=0;return t.forEach((i,n)=>{const s=m[n];if(!s||i.hasAttribute(w)&&s.parentElement===i)return;const o=j(h,i.tagName.toLowerCase(),v[n]);if(o.appendChild(s),i.hasAttribute(w)&&i.remove(),t[n]=o,e++,c)try{c(i,o)}catch(r){}}),e}()+R.filter(e=>t.includes(e)&&!e.isConnected).length){const t=Date.now();T=T.filter(e=>t-e<C),T.push(t),T.length>E&&(M=!0)}W(),U&&(U.takeRecords(),G&&!G.isConnected&&(U.disconnect(),G=V(),U.observe(G,{childList:!0,subtree:!0})))}let H=[];function F(){clearTimeout(g),H.forEach(clearTimeout),g=setTimeout(()=>{D(),H=A.map(t=>setTimeout(D,t))},120)}const V=()=>d.querySelector("main")||d.body||d;let G=null;const U="function"===typeof MutationObserver?new MutationObserver(()=>F()):null;return U&&(G=V(),U.observe(G,{childList:!0,subtree:!0})),z&&z.addEventListener("resize",F),h.addEventListener("shopify:section:load",F),h.addEventListener("shopify:section:unload",F),D(),H=A.map(t=>setTimeout(D,t)),{placedIn:()=>p,stop(){b=!0,clearTimeout(g),H.forEach(clearTimeout),t.forEach(t=>y(t).forEach(t=>t.remove())),U&&U.disconnect(),f&&f.disconnect(),z&&z.removeEventListener("resize",F),h.removeEventListener("shopify:section:load",F),h.removeEventListener("shopify:section:unload",F)}}}var q=i(1839),W=i(3959),D=i(651),H=i(6387),F=':host{--ink:var(--wht-neo-bg-ink,#1f2421);--ink-2:var(--wht-neo-bg-ink-2,#4a524c);--muted:var(--wht-neo-bg-muted,#7e867f);--accent:var(--wht-neo-bg-accent,#1f2421);--accent-ink:var(--wht-neo-bg-accent-ink,#5b645d);--line:var(--wht-neo-bg-line,#e4e6e3);--soft:var(--wht-neo-bg-soft,#f1f3f0);--card:var(--wht-neo-bg-card,#fff);--radius:var(--wht-neo-bg-radius,14px);--slide:var(--wht-neo-bg-slide,clamp(150px,15cqw,192px));--text-col:var(--wht-neo-bg-text-col,minmax(240px,32%));--list-col:var(--wht-neo-bg-list-col,clamp(232px,23cqw,280px));color:var(--ink);display:block!important;font-size:var(--wht-neo-bg-font-size,15px);line-height:1.4;text-align:left}*{box-sizing:border-box}button{color:inherit;cursor:pointer;font:inherit}[hidden]{display:none!important}.wm-frame{container-type:inline-size;margin:var(--wht-neo-bg-margin,8px auto);max-width:var(--wht-neo-bg-maxw,none)}.bg-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow-anchor:none}.bg-head{padding:24px 28px 18px}.bg-eyebrow{color:var(--accent-ink);font-size:10.8px;font-weight:500;letter-spacing:1.94px;margin:0 0 8px;text-transform:uppercase}.bg-title{color:var(--ink);font-family:var(--wht-neo-bg-title-font,inherit);font-size:18px;font-weight:var(--wht-neo-bg-title-weight,500);letter-spacing:-.18px;line-height:1.35;margin:0}.bg-axis{align-items:center;color:var(--muted);display:flex;font-size:12px;gap:10px;margin-top:12px;max-width:420px}.bg-axis i{background:linear-gradient(90deg,var(--soft),var(--accent));border-radius:2px;flex:1;height:2px}.bg-a{align-items:start;display:grid;gap:24px;grid-template-columns:minmax(0,1fr) 220px 300px;padding:0 28px 26px}.bg-media{display:contents}.bg-text{align-self:stretch;display:flex;flex-direction:column;gap:12px;min-width:0}.bg-body{color:var(--ink-2);font-size:15px;letter-spacing:.2px;line-height:1.7;margin:-6px 0 0}.bg-plink{border-radius:3px;color:var(--ink);cursor:pointer;font-weight:500;text-decoration:underline;text-decoration-color:var(--line);text-decoration-thickness:1.5px;text-underline-offset:3px;transition:background .15s}.bg-plink.watching,.bg-plink:focus-visible,.bg-plink:hover{background:var(--soft);outline:none;text-decoration-color:var(--accent)}.bg-more{align-self:flex-start;background:none;border:0;color:var(--ink);display:none;font-size:13px;font-weight:600;padding:0}.bg-more:after{content:" \u25be"}.bg-text.open .bg-more:after{content:" \u25b4"}.bg-videos{align-self:start;min-width:0;position:relative}.bg-vtile{aspect-ratio:9/16;background:#111;border-radius:12px;cursor:pointer;display:none;overflow:hidden;position:relative}.bg-vtile.active{display:block}.bg-vtile>img{display:block;height:100%;object-fit:cover;width:100%}.bg-vtile.unavailable>img{opacity:.5}.bg-tile-play{background:hsla(0,0%,8%,.55);border-radius:50%;color:#fff;display:grid;height:40px;left:50%;place-items:center;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);width:40px}.bg-tile-play svg{height:16px;margin-left:2px;width:16px}.bg-stage{background:#111;cursor:default;inset:0;position:absolute}.bg-stage video{display:block;height:100%;object-fit:cover;width:100%}.bg-stage:before{background:linear-gradient(rgba(0,0,0,.5),transparent);content:"";height:84px;left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.bg-progress{display:flex;gap:4px;left:8px;position:absolute;right:8px;top:8px;z-index:2}.bg-progress i{background:hsla(0,0%,100%,.35);border-radius:2px;flex:1;height:3px;overflow:hidden}.bg-progress b{background:#fff;display:block;height:100%;width:0}.bg-proof{align-items:center;color:#fff;display:flex;gap:7px;left:10px;pointer-events:none;position:absolute;right:10px;text-shadow:0 1px 2px rgba(0,0,0,.5);top:20px;z-index:2}.bg-proof:empty{display:none}.pf-avatar{background:hsla(0,0%,100%,.92);border-radius:50%;color:#333;display:grid;flex:none;font-size:11px;font-weight:700;height:24px;place-items:center;text-shadow:none;width:24px}.pf-text{display:flex;flex-direction:column;line-height:1.2;min-width:0}.pf-text b{font-size:12px;font-weight:600}.pf-text b,.pf-text em{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pf-text em{font-size:11px;font-style:normal;opacity:.9}.bg-nav{align-items:center;background:transparent;border:0;bottom:60px;display:flex;padding:0 8px;position:absolute;top:28px;width:34%;z-index:2}.bg-nav.prev{justify-content:flex-start;left:0}.bg-nav.next{justify-content:flex-end;right:0}.bg-nav i{background:hsla(0,0%,8%,.45);border-radius:50%;color:#fff;display:grid;font-size:20px;font-style:normal;height:30px;line-height:1;opacity:0;place-items:center;transition:opacity .15s;width:30px}.bg-nav:focus-visible i,.bg-stage:hover .bg-nav i{opacity:1}@media (hover:none){.bg-nav i{opacity:.55}}.bg-spinner{animation:bg-spin .8s linear infinite;border:3px solid hsla(0,0%,100%,.3);border-radius:50%;border-top-color:#fff;height:34px;inset:0;margin:auto;opacity:0;pointer-events:none;position:absolute;transition:opacity .2s;width:34px;z-index:2}.bg-stage.loading .bg-spinner{opacity:1}.bg-note{background:rgba(0,0,0,.65);border-radius:8px;bottom:58px;color:#fff;font-size:12px;left:10px;padding:6px;text-align:center}.bg-ctl,.bg-note{position:absolute;right:10px;z-index:3}.bg-ctl{bottom:10px;display:flex;gap:8px}.bg-btn{background:hsla(0,0%,8%,.7);border:0;border-radius:50%;color:#fff;display:grid;height:34px;padding:0;place-items:center;width:34px}.bg-btn svg{height:14px;width:14px}.bg-rail{display:flex;flex-direction:column;max-height:391.11111px;overflow-y:auto;overscroll-behavior:contain;padding:2px;scroll-snap-type:y proximity;scrollbar-width:thin}.bg-rail,.bg-tile{gap:8px;position:relative}.bg-tile{align-items:center;background:var(--card);border:1px solid var(--line);border-radius:12px;display:grid;flex:none;grid-template-columns:minmax(0,1fr) auto;overflow:hidden;padding:8px 10px 10px 8px;scroll-snap-align:start;transition:border-color .15s,background .15s,box-shadow .15s,opacity .15s}.bg-tile:hover{border-color:var(--muted)}.bg-tile-main{align-items:center;background:none;border:0;display:grid;gap:10px;grid-template-columns:48px minmax(0,1fr);min-width:0;padding:0;text-align:left}.bg-tile-main:focus-visible{border-radius:8px;outline:2px solid var(--accent);outline-offset:3px}.bg-tile-img{background:var(--soft);border-radius:8px;height:62px;overflow:hidden;position:relative;width:48px}.bg-tile-img img{display:block;height:100%;object-fit:cover;width:100%}.bg-tile-img em{background:var(--accent);border-radius:50%;color:#fff;display:grid;font-size:10.5px;font-style:normal;font-weight:600;height:18px;left:4px;place-items:center;position:absolute;top:4px;width:18px}.bg-tile-info{display:flex;flex-direction:column;gap:1px;min-width:0}.bg-tile-state{align-items:center;color:var(--accent-ink);display:inline-flex;font-size:10px;font-weight:600;gap:5px;letter-spacing:.8px;text-transform:uppercase}.bg-tile-state:empty{display:none}.bg-tile-state svg{height:11px;width:11px}.bg-tile-name{-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--ink);display:-webkit-box;font-size:13.5px;font-weight:500;line-height:1.3;overflow:hidden}.bg-tile-print{color:var(--muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bg-tile-print:empty{display:none}.bg-tile-value{color:var(--ink-2);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bg-tile-buy{align-items:flex-end;display:flex;flex-direction:column;gap:6px}.bg-tile-price{color:var(--ink);font-size:13px}.bg-tile-price,.bg-tile-view{font-weight:500;white-space:nowrap}.bg-tile-view{background:var(--wht-neo-bg-cta,var(--accent));border-radius:999px;color:var(--wht-neo-bg-cta-ink,#fff);font-size:12px;padding:5px 12px;text-decoration:none}.bg-tile-view:hover{opacity:.85}.bg-tile-bar{bottom:0;height:3px;left:0;overflow:hidden;position:absolute;right:0}.bg-tile-bar b{background:var(--accent);display:block;height:100%;width:0}.bg-tile.active{border-color:var(--accent);box-shadow:inset 3px 0 0 var(--accent)}.bg-tile.active .bg-tile-bar,.bg-tile.hl,.bg-tile.looping{background:var(--soft)}.bg-tile.hl{border-color:var(--accent)}.bg-tile.loading .bg-tile-bar b{animation:bg-shimmer 1.1s linear infinite;width:30%!important}.bg-tile.unavailable{opacity:.5}.eq{align-items:flex-end;display:inline-flex;gap:1.5px;height:9px}.eq b{animation:bg-eq .9s ease-in-out infinite;background:currentColor;width:2px}.eq b:nth-child(2){animation-delay:.2s}.eq b:nth-child(3){animation-delay:.4s}.paused .eq b{animation:none;height:4px}.bg-slide-nav{display:none}@keyframes bg-spin{to{transform:rotate(1turn)}}@keyframes bg-shimmer{0%{transform:translateX(-100%)}to{transform:translateX(340%)}}@keyframes bg-eq{0%,to{height:3px}50%{height:9px}}@media (prefers-reduced-motion:reduce){.bg-tile.loading .bg-tile-bar b,.eq b{animation:none}}@container (min-width: 901px){.bg-a{grid-template-columns:var(--text-col) minmax(0,1fr) var(--list-col)}.bg-text{grid-column:1;grid-row:1}.bg-videos{display:flex;gap:12px;grid-column:2;grid-row:1;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;padding:2px;scroll-snap-type:x proximity;scrollbar-width:thin}.bg-vtile{display:block;flex:0 0 var(--slide);scroll-snap-align:start}.bg-vtile.active{outline:2px solid var(--accent);outline-offset:0}.bg-stage .bg-nav,.bg-stage .bg-progress{display:none}.bg-stage .bg-proof{top:10px}.bg-rail{grid-column:3;grid-row:1;max-height:calc(var(--slide)*16/9 + 4px)}.bg-slide-nav{align-self:start;background:var(--card);border:1px solid var(--line);border-radius:50%;color:var(--ink);display:grid;grid-column:2;grid-row:1;height:34px;margin-top:calc(var(--slide)*8/9 - 15px);padding:0;place-items:center;transition:border-color .15s;width:34px;z-index:3}.bg-slide-nav:focus-visible,.bg-slide-nav:hover{border-color:var(--ink);outline:none}.bg-slide-nav i{font-size:20px;font-style:normal;line-height:1;margin-top:-2px}.bg-slide-nav.prev{justify-self:start;margin-left:-14px}.bg-slide-nav.next{justify-self:end;margin-right:-14px}}@media (hover:none){.bg-slide-nav{display:none!important}}@container (max-width: 900px){.bg-a{grid-template-columns:220px minmax(0,1fr)}.bg-text{grid-column:1/-1}}@container (max-width: 640px){.bg-head{padding:18px 18px 14px}.bg-title{font-size:16px}.bg-a{gap:14px;grid-template-columns:minmax(0,1fr);padding:0 18px 20px}.bg-videos{justify-self:center;max-width:240px;width:100%}.bg-body-wrap{font-size:15px;-webkit-mask-image:linear-gradient(#000 calc(100% - 2.2em),transparent);mask-image:linear-gradient(#000 calc(100% - 2.2em),transparent);max-height:7.2em;overflow:hidden;position:relative;transition:max-height .35s ease}.bg-text.open .bg-body-wrap{-webkit-mask-image:none;mask-image:none;max-height:60em}.bg-more{display:inline-block}.bg-text{gap:8px}.bg-rail{flex-direction:row;margin:0 -18px;max-height:none;overflow-x:auto;overflow-y:hidden;padding:2px 18px;scroll-snap-type:x mandatory}.bg-tile{flex:0 0 82%;scroll-snap-align:center}}';const V="buyingGuide",G="/v1/brand/{store_id}/buying-guide",U=5,K=3,Y=["a","b","c","d","e","f","g","h"],X="[data-wht-bg-page]",J="whatmoreBuyingGuideDraft";function Q(){try{return JSON.parse(localStorage.getItem("whatmore_brand_customizations")).customizations}catch(t){return null}}const Z=(t,e,i)=>{const n=Number(t);return null!==t&&void 0!==t&&""!==t&&Number.isFinite(n)?Math.min(i,Math.max(e,Math.round(n))):null};let tt=null;function et(t,e){tt||(tt=Promise.all([i.e(1296,"high"),i.e(4071,"high")]).then(i.bind(i,725))),tt.then(i=>{t.getAttribute("data-src")===e&&i.attachSource(t,e,i.PRIORITY.ACTIVE,{bufferAhead:12})}).catch(()=>{t.src=e})}let it=null;function nt(t){tt&&tt.then(e=>{it||(it=document.createElement("video"),it.muted=!0,it.playsInline=!0),e.attachSource(it,t,e.PRIORITY.NEXT)}).catch(()=>{})}function st(t){if(tt)tt.then(e=>e.releaseSource(t)).catch(()=>{});else{t.removeAttribute("src");try{t.load()}catch(e){}}}async function ot(t){const{rootElement:e,widgetContainer:i,shopId:n,collectionId:r,neoJson:a,mode:l="embed",preview:c=!1,designMode:d=!1,onWidgetView:h,onClipStarted:u,onClipWatched:b,onProductView:f}=t;if(!n||!r||"0"===String(r))return!1;const v=i&&i.closest&&i.closest(X)||null,y=!v&&(void 0!==t.pinned?t.pinned:"block"===l),w=v||document,k=function(t){const e=/^\s*(\d)\s*,\s*(\d)\s*$/.exec(t&&t.getAttribute&&t.getAttribute("data-wht-bg-rows")||"");return e&&Number(e[2])>0?{first:Number(e[1]),every:Number(e[2])}:null}(v),S=window.__whtBuyingGuide;if("embed"===l&&S&&"block"===S.mode&&S.collectionId===String(r))return!0;if("embed"===l&&!c&&!function(t,e){const i=t&&t[V];return!(!i||!0!==i.enabled)&&(Array.isArray(i.collections)?i.collections.map(String):[]).includes(String(e))}(a,r))return!1;let E=function(t){const e=t&&t.querySelector("#"+J);if(!e)return null;try{const t=JSON.parse(e.textContent||"");return t&&Array.isArray(t.cards)?t:null}catch(i){return null}}(i);if(!E)try{E=await fetch(function(t,e){return(0,D.y0)(Q(),G,t)+"?client_collection_id="+encodeURIComponent(e)}(n,r)).then(t=>t.ok?t.json():null)}catch(mt){E=null}const C=(E&&E.cards||[]).slice(0,v?U+1:U);if(!C.length)return!1;let A=null;try{A=new URLSearchParams(window.location.search).get("neoskin")}catch(mt){}const{look:$,css:_}=await async function(t,e){const i=(0,q.RO)(t,V)||{},n=String(e||i.skin||"a").toLowerCase(),s=Y.includes(n)?n:"a",o=i.customCss,r="string"===typeof o?o:o&&"object"===typeof o&&"string"===typeof o[s]?o[s]:"",a="a"===s?"":await(0,H.P)(V,s);return{look:s,css:F+(a?"\n"+a:"")+("string"===typeof i.brandCss&&i.brandCss?"\n"+i.brandCss:"")+(r?"\n"+r:"")}}(a,A),T=(0,q.RO)(a,V)||{},M=function(t){const e=Z(t&&t.spaceAbove,0,200),i=Z(t&&t.spaceBelow,0,200),n=Z(t&&t.maxWidth,320,2e3),s={};return null===e&&null===i||(s["--wht-neo-bg-margin"]=(null===e?8:e)+"px auto "+(null===i?8:i)+"px"),null!==n&&(s["--wht-neo-bg-maxw"]=n+"px"),s}(T),R={hideEyebrow:!0===T.hideEyebrow,newTab:!!d||!!v};if("embed"===l&&window.__whtBuyingGuide&&"block"===window.__whtBuyingGuide.mode)return!0;!function(){const t=window.__whtBuyingGuide;if(t){try{t.placer&&t.placer.stop()}catch(mt){}try{t.io&&t.io.disconnect()}catch(mt){}(t.stages||[]).forEach(t=>{try{t.destroy()}catch(mt){}}),(t.slots||[]).forEach(t=>t.remove()),it&&(st(it),it=null),t.around&&t.around.remove(),window.__whtBuyingGuide=null}}();try{const t=window.Shopify&&window.Shopify.currency&&window.Shopify.currency.active;t&&Object.values(E.products||{}).forEach(e=>{e.currency=t})}catch(mt){}const z=function(){const t=Object.assign({},o),e=(t,e)=>(0,W.rB)("buying_guide_"+t,e);return["readMore","showLess","view","playing","paused","replaying","unavailable","prev","next","pause","play","mute","unmute","views","likes"].forEach(i=>{t[i]=e(i.replace(/[A-Z]/g,t=>"_"+t.toLowerCase()),o[i])}),t.formats=Object.fromEntries(Object.keys(s).map(t=>[t,e("format_"+t,s[t])])),t}(),I=Q(),N=E.store_name||(I&&"string"===typeof I.brand_name?I.brand_name:"")||"",B=C.map(t=>p(t).map(t=>L(((E.products||{})[t.product_id]||{}).link)).filter(Boolean)),tt=!(!window.matchMedia||!window.matchMedia("(prefers-reduced-motion: reduce)").matches),ot=t=>(E.products||{})[t.product_id]||null,rt={onClipStarted:u?t=>u(t,ot(t)):null,onClipWatched:b?(t,e)=>b(t,e,ot(t)):null,onProductView:f?t=>f(t,ot(t)):null},at=y?{mode:"pinned",firstRows:2}:function(t){const e=/^after_row_([1-9])$/.exec(String(t||""));return e?{mode:"grid",firstRows:Number(e[1])}:"above"===t||"below"===t?{mode:t,firstRows:2}:{mode:"grid",firstRows:2}}(E.placement),lt=P(w),ct="grid"===at.mode&<&&"LI"===lt.items[0].tagName?"li":"div",dt=[],ht=C.map(t=>{const e=j(document,ct,t.key),i=document.createElement("div");i.className="wht-neo-bg",i.setAttribute("data-wht-look",$),i.style.setProperty("display","block","important"),Object.keys(M).forEach(t=>i.style.setProperty(t,M[t])),e.appendChild(i);const n=i.attachShadow({mode:"open"}),s=p(t);n.innerHTML="<style>"+_+'</style><div class="wm-frame" data-wht-look="'+$+'">'+g(t,s,E,z,R)+"</div>";const o=n.querySelector(".bg-card");return o._stage=new m(o,s,{data:E,labels:z,storeName:N,setSource:et,releaseSource:st,warm:nt,track:rt,reducedMotion:tt}),dt.push(o._stage),function(t){const e=t=>{const e=t&&t.closest(".bg-card");return e?e._stage:null};t.addEventListener("click",t=>{const i=t.target,n=i.closest&&i.closest(".bg-plink");if(n){if(t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;const i=e(n),s=i?i.clips.findIndex(t=>t.product_id===n.getAttribute("data-pid")):-1;if(s<0)return;return t.preventDefault(),void i.watch(s)}const s=i.closest&&i.closest("[data-view]");if(s){const t=e(s),i=t&&t.clips.find(t=>t.product_id===s.getAttribute("data-view"));return void(i&&t.opts.track&&t.opts.track.onProductView&&t.opts.track.onProductView(i))}const o=i.closest&&i.closest("[data-tile],[data-act]"),r=e(o);if(!r)return;if(o.hasAttribute("data-tile")&&i.closest(".bg-stage"))return;const a=o.getAttribute("data-act");if(o.hasAttribute("data-tile"))r.replay(Number(o.getAttribute("data-tile")));else if("play"===a)r.toggle();else if("mute"===a)r.mute();else if("prev"===a)r.step(-1);else if("next"===a)r.step(1);else if("more"===a){const t=o.closest(".bg-text").classList.toggle("open");o.textContent=t?r.labels.showLess:r.labels.readMore,o.setAttribute("aria-expanded",String(t))}}),t.addEventListener("keydown",t=>{const e=t.target.closest&&t.target.closest(".bg-tile-main"),i={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1}[t.key];if(!e||!i)return;t.preventDefault();const n=Array.from(e.closest(".bg-rail").querySelectorAll(".bg-tile-main"));n[(n.indexOf(e)+i+n.length)%n.length].focus()}),[["mouseover",!0],["mouseout",!1],["focusin",!0],["focusout",!1]].forEach(([e,i])=>{t.addEventListener(e,t=>{const e=t.target.closest&&t.target.closest(".bg-plink");e&&e.closest(".bg-card").querySelectorAll(".bg-tile").forEach(t=>{t.getAttribute("data-pid")===e.getAttribute("data-pid")&&t.classList.toggle("hl",i)})})})}(n),e});let pt="block"===l?e:null,ut=null;"above"!==at.mode&&"below"!==at.mode||y||!lt||(ut=document.createElement("div"),ut.setAttribute("data-wht-bg-around",at.mode),lt.grid.parentElement.insertBefore(ut,"above"===at.mode?lt.grid:lt.grid.nextSibling),pt=ut);let gt=!1,bt=null;const ft=O({slots:ht,anchor:pt,mode:"grid"===at.mode?"grid":"anchor",firstRows:k?k.first:at.firstRows,everyRows:k?k.every:K,minBefore:k?0:x,doc:w,slotProducts:v?null:B,isFiltered:v?null:()=>function(t){try{return Array.from(new URLSearchParams(t||"").entries()).some(([t,e])=>0===t.indexOf("filter.")&&""!==e)}catch(mt){return!1}}(window.location.search),onSwap:(t,e)=>{bt&&(bt.unobserve(t),bt.observe(e))}});return"none"===ft.placedIn()?(ft.stop(),dt.forEach(t=>t.destroy()),!1):("function"===typeof IntersectionObserver?(bt=new IntersectionObserver(t=>t.forEach(t=>{const e=dt[ht.indexOf(t.target)];e&&(t.isIntersecting&&t.intersectionRatio>=.25&&!gt&&(gt=!0,h&&h()),t.isIntersecting&&t.intersectionRatio>=.5?e.play():e.leave())}),{threshold:[0,.25,.5]}),ht.forEach(t=>bt.observe(t))):(h&&h(),dt.forEach(t=>t.play())),window.__whtBuyingGuide={mode:l,look:$,collectionId:String(r),placer:ft,io:bt,stages:dt,slots:ht,around:ut,placedIn:()=>ft.placedIn()},"block"===l&&e&&(e.style.opacity="1",e.removeAttribute("data-shimmer-active")),!0)}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[5883],{1839:function(t,e,i){function n(t,e){let i=document.getElementById(t);i||(i=document.createElement("style"),i.id=t,document.head.appendChild(i)),i.textContent=e}function s(t,e){if(!t||!e)return t||"";const i=document.createElement("style");i.media="not all",i.textContent=t,document.head.appendChild(i);let n=t;try{const t=i.sheet;t&&(o(t.cssRules,e),n=function(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].cssText+"\n";return e}(t.cssRules))}catch(s){}return i.remove(),n}function o(t,e){for(let i=0;i<t.length;i++){const n=t[i];void 0!==n.selectorText&&void 0!==n.style?n.selectorText=r(n.selectorText,e):!n.cssRules||"undefined"!==typeof CSSKeyframesRule&&n instanceof CSSKeyframesRule||o(n.cssRules,e)}}function r(t,e){return function(t){const e=[];let i=0,n="";for(let s=0;s<t.length;s++){const o=t[s];"("===o||"["===o?i++:")"!==o&&"]"!==o||i--,","===o&&0===i?(e.push(n),n=""):n+=o}return e.push(n),e}(t).map(t=>{const i=t.trim();return i?e+" "+i:i}).join(", ")}function a(t,e,i,n){if(!t)return null;const s=t[e];if(!s||"object"!==typeof s)return Object.assign({},t,{brandCss:""});const o="string"===typeof t.customCss?t.customCss:"",r=t.shopper&&t.shopper.widgets&&t.shopper.widgets[e],a=l(s.widgets,i)||l(r,i),c=a?null:function(t){return 0===String(t||"").indexOf("product")?"product":null}(n),d=c&&s[c]&&"object"===typeof s[c]?s[c]:null,h=a?Object.assign({},s,a):d?Object.assign({},s,d):s;return Object.assign({},h,{brandCss:o,perInstance:!!a,pageScoped:!!d})}function l(t,e){if(!t||"object"!==typeof t||!e)return null;const i=Array.isArray(e)?e:[e];for(let n=0;n<i.length;n++){const e=i[n];if(null==e||""===e)continue;const s=t[e];if(s&&"object"===typeof s)return s}return null}i.d(e,{GJ:function(){return s},RO:function(){return a},fz:function(){return n}})},6563:function(t,e,i){i.d(e,{renderNeoBuyingGuide:function(){return ot}});const n=8,s={tested:"Put to the test",compare:"Side by side",question:"Question",how_to:"How to",up_close:"Up close",style_it:"Style it"},o={products:t=>t+(1===t?" product":" products"),styles:t=>t+(1===t?" style":" styles"),readMore:"Read more",showLess:"Show less",view:"View",playing:"Playing",paused:"Paused",replaying:"Replaying",more:t=>t+" more",unavailable:"Clip unavailable",prev:"Previous product",next:"Next product",pause:"Pause",play:"Play",mute:"Mute",unmute:"Unmute",proof:"Who made this clip",list:"Products in these clips",watch:"Watch its clip",again:"Watch this one again",views:"views",likes:"likes"},r={pause:'<svg viewBox="0 0 16 16" fill="currentColor"><rect x="3.5" y="2.5" width="3" height="11" rx="1"/><rect x="9.5" y="2.5" width="3" height="11" rx="1"/></svg>',play:'<svg viewBox="0 0 16 16" fill="currentColor"><path d="M4 2.5v11l9-5.5z"/></svg>',muted:'<svg viewBox="0 0 16 16" fill="currentColor"><path d="M2 6h3l4-3v10l-4-3H2z"/><path d="M11 6l4 4m0-4l-4 4" stroke="currentColor" stroke-width="1.5"/></svg>',sound:'<svg viewBox="0 0 16 16" fill="currentColor"><path d="M2 6h3l4-3v10l-4-3H2z"/><path d="M11 5.5a3.5 3.5 0 010 5M12.8 3.8a6 6 0 010 8.4" fill="none" stroke="currentColor" stroke-width="1.4"/></svg>',loop:'<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6"><path d="M3 8a5 5 0 018.5-3.5L13 6M13 2.5V6H9.5M13 8a5 5 0 01-8.5 3.5L3 10m0 3.5V10h3.5"/></svg>'},a=/\[([^\]]+)\]\(p:([^)\s]+)\)/g,l=t=>String(null==t?"":t).replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"}[t])),c=t=>String(null==t?0:t).split(":").reduce((t,e)=>60*t+(Number(e)||0),0),d=c,h=t=>null!=t&&""!==t&&Number.isFinite(Number(t))?Number(t)>=1e3?(Number(t)/1e3).toFixed(1).replace(/\.0$/,"")+"K":String(t):"";function p(t){const e=new Set,i=[];for(const n of t.clips||[]){const s=String(n.product_id);e.has(s)||(e.add(s),i.push({...n,product_id:s,chip:t.chips&&t.chips[n.id]||n.shows||""}))}const s=[...String(t.body||"").matchAll(a)].map(t=>t[2]),o=t=>s.includes(t.product_id)?s.indexOf(t.product_id):1/0,r=i.map((t,e)=>[t,e]).sort((t,e)=>o(t[0])-o(e[0])||t[1]-e[1]).map(t=>t[0]).slice(0,n),l=Array.isArray(t.order)?t.order:[];if(!l.length)return r;const c=t=>l.indexOf(t.id)+1||1e9;return r.map((t,e)=>[t,e]).sort((t,e)=>c(t[0])-c(e[0])||t[1]-e[1]).map(t=>t[0])}function u(t,e,i,n,s,o){const r=n[t.product_id]||{};return`<div class="bg-tile" role="listitem" data-pid="${l(t.product_id)}">\n <button class="bg-tile-main" type="button" data-tile="${e}" aria-pressed="false" title="${l(s.again)}">\n <span class="bg-tile-img">${r.image?`<img loading="lazy" src="${l(r.image)}" alt="">`:""}${"how_to"===i?`<em>${e+1}</em>`:""}</span>\n <span class="bg-tile-info">\n <span class="bg-tile-state"></span>\n <span class="bg-tile-name">${l(r.style||r.title||"")}</span>\n <span class="bg-tile-print">${l(r.print||"")}</span>\n <span class="bg-tile-value" title="${l(t.answer||"")}">${l(t.chip)}</span>\n </span>\n </button>\n <div class="bg-tile-buy">\n <span class="bg-tile-price">${l(function(t,e){const i=Number(t);if(null==t||""===t||!Number.isFinite(i))return"";const n={style:"currency",currency:e||"USD",maximumFractionDigits:i%1?2:0};try{return new Intl.NumberFormat(void 0,{...n,currencyDisplay:"narrowSymbol"}).format(i)}catch(s){}try{return new Intl.NumberFormat(void 0,n).format(i)}catch(s){return String(t)}}(r.price,r.currency))}</span>\n ${r.link?`<a class="bg-tile-view" href="${l(r.link)}"${o} data-view="${l(t.product_id)}">${l(s.view)}</a>`:""}\n </div>\n <span class="bg-tile-bar"><b></b></span>\n </div>`}function g(t,e,i,n,c){const d=c||{},h=d.newTab?' target="_blank" rel="noopener"':"",p=i.products||{},g=t.format||"question",b=Object.keys(p).some(t=>p[t]&&p[t].print),f=new Set(e.map(t=>(p[t.product_id]||{}).style||t.product_id)).size,m=b?(n.styles||o.styles)(f):n.products(e.length),v="compare"===g&&Array.isArray(t.ends)&&2===t.ends.length?`<div class="bg-axis"><span>${l(t.ends[0])}</span><i></i><span>${l(t.ends[1])}</span></div>`:"",y=`<div class="bg-stage">\n <div class="bg-progress">${e.map(()=>"<i><b></b></i>").join("")}</div>\n <video class="wht-neo-video" muted playsinline preload="none"></video>\n <div class="bg-spinner" aria-hidden="true"></div>\n <button class="bg-nav prev" type="button" data-act="prev" aria-label="${l(n.prev)}"><i>\u2039</i></button>\n <button class="bg-nav next" type="button" data-act="next" aria-label="${l(n.next)}"><i>\u203a</i></button>\n <div class="bg-note" role="status" hidden></div>\n <div class="bg-proof" aria-label="${l(n.proof)}"></div>\n <div class="bg-ctl"><button class="bg-btn" type="button" data-act="play" aria-label="${l(n.pause)}">${r.pause}</button><button class="bg-btn" type="button" data-act="mute" aria-label="${l(n.unmute)}">${r.muted}</button></div>\n </div>`;return`<section class="bg-card fmt-${l(g)}" data-key="${l(t.key)}">\n <div class="bg-head">\n ${d.hideEyebrow?"":`<p class="bg-eyebrow">${l((n.formats||s)[g]||s.question)} \xb7 ${l(m)}</p>`}\n <h3 class="bg-title">${l(t.title)}</h3>\n ${v}\n </div>\n <div class="bg-a">\n <div class="bg-text">\n <div class="bg-body-wrap"><p class="bg-body">${function(t,e,i,n){const s=String(t||""),o=[];let r=0;for(const c of s.matchAll(a)){o.push(l(s.slice(r,c.index)));const t=e.has(c[2])?i[c[2]]:null;o.push(t?`<a class="bg-plink" href="${l(t.link||"#")}" data-pid="${l(c[2])}" title="${l(n.watch)}">${l(c[1])}</a>`:l(c[1])),r=c.index+c[0].length}return o.push(l(s.slice(r))),o.join("")}(t.body,new Set(e.map(t=>t.product_id)),p,n)}</p></div>\n <button class="bg-more" type="button" data-act="more" aria-expanded="false">${l(n.readMore)}</button>\n </div>\n <div class="bg-media">\n <div class="bg-videos">${e.map((t,e)=>function(t,e,i,n,s,o){const a=i[t.product_id]||{},c=((s||{})[t.video_key]||{}).poster||a.image||"";return`<div class="bg-vtile${0===e?" active":""}" data-tile="${e}" data-pid="${l(t.product_id)}" title="${l(n.again)}">${c?`<img loading="lazy" src="${l(c)}" alt="">`:""}<i class="bg-tile-play" aria-hidden="true">${r.play}</i>${o||""}</div>`}(t,e,p,n,i.videos,0===e?y:"")).join("")}</div>\n <div class="bg-rail" role="list" aria-label="${l(n.list)}">${e.map((t,e)=>u(t,e,g,p,n,h)).join("")}</div>\n </div>\n <button class="bg-slide-nav prev" type="button" data-act="prev" aria-label="${l(n.prev)}"><i>\u2039</i></button>\n <button class="bg-slide-nav next" type="button" data-act="next" aria-label="${l(n.next)}"><i>\u203a</i></button>\n </div>\n </section>`}const b=(t,e)=>e.querySelector(t),f=new Set;if("undefined"!==typeof document&&document.addEventListener){const t=()=>f.forEach(t=>t());document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&t()}),"undefined"!==typeof window&&window.addEventListener("pagehide",t)}class m{constructor(t,e,i){m.all.add(this),this.card=t,this.clips=e,this.opts=i||{},this.data=this.opts.data||{},this.labels=this.opts.labels||o,this.v=b("video",t),this.v.muted=!0,this.box=b(".bg-stage",t),this.rail=b(".bg-rail",t),this.tiles=Array.from(t.querySelectorAll(".bg-tile")),this.vtiles=Array.from(t.querySelectorAll(".bg-vtile")),this.bars=Array.from(t.querySelectorAll(".bg-progress b")),this.running=!1,this.started=!1,this.held=!!this.opts.reducedMotion,this.replays=0,this.userScrollAt=0,this.i=0,this.watchFrom=0,this.watchClip=null,this.watchDuration=null,this.startedClips=new Set;const n=this.v;n.addEventListener("playing",()=>this.startWatch()),n.addEventListener("durationchange",()=>this.noteDuration()),["pause","emptied"].forEach(t=>n.addEventListener(t,()=>this.flushWatch())),this.onPageHide=()=>{const t=!!this.watchClip&&!n.paused;this.flushWatch(),t&&this.startWatch()},f.add(this.onPageHide),n.addEventListener("loadedmetadata",()=>{this.fit(),this.seek(),this.running?this.tryPlay():this.setLoading(!1)}),n.addEventListener("timeupdate",()=>this.tick()),n.addEventListener("ended",()=>this.atEnd()),n.addEventListener("error",()=>{this.started&&n.getAttribute("data-src")&&this.fail()}),["waiting","seeking","stalled"].forEach(t=>n.addEventListener(t,()=>this.setLoading(this.running))),["playing","canplay","seeked"].forEach(t=>n.addEventListener(t,()=>this.setLoading(this.running&&n.readyState<3)));const s=b(".bg-media",t)||this.rail;["wheel","touchstart","pointerdown"].forEach(t=>s.addEventListener(t,()=>{this.userScrollAt=Date.now()},{passive:!0})),this.held&&this.setPlayIcon(!1),this.point(0),this.seat(),this.paint(!1)}seat(){const t=this.vtiles[this.i];if(!t||this.box.parentNode===t)return;const e=this.running&&!this.v.paused;t.appendChild(this.box),e&&this.tryPlay()}video(t){return(this.data.videos||{})[this.clips[t].video_key]||{}}tryPlay(){const t=this.v.play();t&&t.catch&&t.catch(()=>{})}seek(){try{this.v.currentTime=this.s}catch(t){}}setPlayIcon(t){const e=b('[data-act="play"]',this.card);e.innerHTML=t?r.pause:r.play,e.setAttribute("aria-label",t?this.labels.pause:this.labels.play)}point(t){const e=this.clips[t];this.i=t,this.s=c(e.start),this.e=Math.max(c(e.end),this.s+5)}noteDuration(){const t=this.v.duration;this.watchClip&&Number.isFinite(t)&&t>0&&(this.watchDuration=Math.round(10*t)/10)}startWatch(){this.watchFrom||(this.watchFrom=Date.now(),this.watchClip=this.clips[this.i],this.noteDuration(),this.startedClips.has(this.watchClip)||(this.startedClips.add(this.watchClip),this.opts.track&&this.opts.track.onClipStarted&&this.opts.track.onClipStarted(this.watchClip)))}flushWatch(){if(!this.watchFrom||!this.watchClip)return;const t=(Date.now()-this.watchFrom)/1e3,e=this.watchClip,i=this.watchDuration;this.watchFrom=0,this.watchClip=null,this.watchDuration=null,t>=1&&this.opts.track&&this.opts.track.onClipWatched&&this.opts.track.onClipWatched(e,{watchTime:Math.round(10*t)/10,duration:i,clipStart:d(e.start),clipEnd:d(e.end)})}go(t){this.flushWatch(),this.point(t),this.seat(),this.started=!0;const e=this.video(t);if(b(".bg-note",this.card).hidden=!0,this.v.getAttribute("data-src")!==(e.url||"")){if(this.v.setAttribute("data-src",e.url||""),e.poster&&(this.v.poster=e.poster),!e.url)return void this.fail();this.opts.setSource?this.opts.setSource(this.v,e.url):this.v.src=e.url,this.setLoading(this.running),this.running&&this.tryPlay()}else this.fit(),this.seek(),this.running&&this.tryPlay(),this.running&&!this.v.paused&&this.startWatch();this.warmNext(),this.paint(!0)}warmNext(){if(!this.running||this.replays>1||!this.opts.warm)return;const t=this.video(this.next()).url;t&&t!==this.v.getAttribute("data-src")&&t!==this.warmed&&(this.warmed=t,this.opts.warm(t))}fit(){const t=this.v.duration;!Number.isFinite(t)||t<=0||this.e<=t||(this.e=t,this.s=Math.max(0,Math.min(this.s,t-5)))}next(t){const e=t||1,i=this.clips.length;for(let n=1;n<=i;n++){const t=((this.i+e*n)%i+i)%i;if(!this.tiles[t].classList.contains("unavailable"))return t}return this.i}tick(){const t=this.v.currentTime;if(!this.started||t<this.s-.5)return;if(t>=this.e)return void this.atEnd();const e=Math.min(100,Math.max(0,100*(t-this.s)/(this.e-this.s)));this.bars.forEach((t,i)=>{t.style.width=i<this.i?"100%":i>this.i?"0":e+"%"});const i=this.tiles[this.i]&&this.tiles[this.i].querySelector(".bg-tile-bar b");i&&(i.style.width=e+"%")}atEnd(){const t=Date.now();if(!(t-(this.endedAt||0)<400)){if(this.endedAt=t,this.replays>1)return this.replays-=1,this.seek(),this.running&&this.tryPlay(),this.paint(!1),void this.warmNext();this.replays=0,this.go(this.next())}}setLoading(t){this.box.classList.toggle("loading",!!t),[this.tiles[this.i],this.vtiles[this.i]].forEach(e=>{e&&e.classList.toggle("loading",!!t)})}paint(t){const e=this.labels;this.tiles.forEach((t,i)=>{const n=i===this.i,s=n&&this.replays>0;t.classList.toggle("active",n),t.classList.toggle("looping",s),t.classList.toggle("paused",n&&!this.running),t.querySelector(".bg-tile-main").setAttribute("aria-pressed",String(s)),n?t.setAttribute("aria-current","true"):t.removeAttribute("aria-current"),n||(t.querySelector(".bg-tile-bar b").style.width="0",t.classList.remove("loading")),t.querySelector(".bg-tile-state").innerHTML=t.classList.contains("unavailable")?l(e.unavailable):s?r.loop+" "+l(e.replaying)+(this.replays>1?" \xb7 "+l(e.more(this.replays-1)):""):n&&this.started?'<i class="eq"><b></b><b></b><b></b></i> '+l(this.running?e.playing:e.paused):""}),this.vtiles.forEach((t,e)=>{const i=e===this.i;t.classList.toggle("active",i),t.classList.toggle("paused",i&&!this.running),t.classList.toggle("unavailable",!!this.tiles[e]&&this.tiles[e].classList.contains("unavailable")),i||t.classList.remove("loading")});const i=this.clips[this.i].product_id;this.card.querySelectorAll(".bg-plink").forEach(t=>t.classList.toggle("watching",this.replays>0&&t.getAttribute("data-pid")===i));const n=this.video(this.i),s=n.handle?"@"+n.handle:this.opts.storeName||"",o=[null!=n.views&&""!==n.views&&h(n.views)+" "+e.views,null!=n.likes&&""!==n.likes&&h(n.likes)+" "+e.likes].filter(Boolean).join(" \xb7 ");b(".bg-proof",this.card).innerHTML=s?`<span class="pf-avatar">${l((n.handle||s)[0].toUpperCase())}</span><span class="pf-text"><b>${l(s)}</b>${o?`<em>${l(o)}</em>`:""}</span>`:"",t&&this.reveal()}reveal(){Date.now()-this.userScrollAt<2500||(this.bringIntoView(this.tiles[this.i]),this.bringIntoView(this.vtiles[this.i]))}bringIntoView(t){if(!t||"function"!==typeof getComputedStyle)return;const e=t.getBoundingClientRect();if(e.width||e.height)for(let i=t.parentElement;i&&i!==this.card;i=i.parentElement){const t=getComputedStyle(i),n=i.scrollWidth>i.clientWidth+1&&/auto|scroll/.test(t.overflowX),s=i.scrollHeight>i.clientHeight+1&&/auto|scroll/.test(t.overflowY);if((n||s)&&"function"===typeof i.scrollTo){const t=i.getBoundingClientRect();return void i.scrollTo({left:n?i.scrollLeft+(e.left-t.left)-(i.clientWidth-e.width)/2:i.scrollLeft,top:s?i.scrollTop+(e.top-t.top)-(i.clientHeight-e.height)/2:i.scrollTop,behavior:"smooth"})}}}watch(t){this.replay(t);const e=this.box.getBoundingClientRect(),i="undefined"!==typeof window&&window.innerHeight||0;(e.top<0||e.bottom>i)&&this.box.scrollIntoView&&this.box.scrollIntoView({block:"nearest",behavior:"smooth"})}replay(t){this.userScrollAt=0,this.replays=3,this.held=!1,this.setPlayIcon(!0),this.running=!0,this.go(t)}step(t){this.userScrollAt=0,this.replays=0,this.held=!1,this.setPlayIcon(!0),this.running=!0,this.go(this.next(t))}fail(){this.tiles[this.i].classList.add("unavailable"),this.vtiles[this.i]&&this.vtiles[this.i].classList.add("unavailable"),this.setLoading(!1);const t=b(".bg-note",this.card);t.textContent=this.labels.unavailable,t.hidden=!1,this.paint(!1),clearTimeout(this.failTimer),this.replays=0,this.failTimer=setTimeout(()=>{this.next()!==this.i&&this.go(this.next())},900)}play(){this.running=!this.held,this.running?this.started?(this.tryPlay(),this.warmNext(),this.paint(!1)):this.go(this.i):this.paint(!1)}pause(){this.running=!1,this.v.pause(),this.flushWatch(),this.setLoading(!1),this.paint(!1)}leave(){this.replays=0,this.pause()}toggle(){this.held=!this.held,this.setPlayIcon(!this.held),this.held?this.pause():this.play()}setMuted(t){this.v.muted=t;const e=b('[data-act="mute"]',this.card);e.innerHTML=t?r.muted:r.sound,e.setAttribute("aria-label",t?this.labels.unmute:this.labels.mute)}mute(){const t=this.v.muted;if(t&&m.all.forEach(t=>{t!==this&&t.setMuted(!0)}),this.setMuted(!t),!t||!this.running)return;const e=this.v.play();e&&e.catch&&e.catch(()=>{this.setMuted(!0),this.running&&this.tryPlay()})}destroy(){m.all.delete(this),clearTimeout(this.failTimer),this.running=!1;try{this.v.pause()}catch(t){}if(this.flushWatch(),f.delete(this.onPageHide),this.opts.releaseSource)this.opts.releaseSource(this.v);else{this.v.removeAttribute("src");try{this.v.load()}catch(t){}}}}m.all=new Set;const v=/recent|recommend|upsell|cross-sell|related/i,y=new Set(["SCRIPT","TEMPLATE","STYLE","LINK","NOSCRIPT"]),x=4,w="data-wht-bg-card",k="data-wht-bg-pad",S=2,E=12,C=1e4,A=[700,2500];function L(t){const e=/\/products\/([^/?#]+)/.exec(String(t||""));if(!e)return"";try{return decodeURIComponent(e[1]).toLowerCase()}catch(i){return e[1].toLowerCase()}}function $(t){const e=new Set;return t.forEach(t=>{(t.matches&&t.matches(M)?[t]:Array.from(t.querySelectorAll(M))).forEach(t=>{const i=L(t.getAttribute("href"));i&&e.add(i)})}),e}const _=t=>!y.has(t.tagName)&&!t.hasAttribute(w)&&"none"!==getComputedStyle(t).display,T=t=>{const e=getComputedStyle(t);return e.float&&"none"!==e.float||"inline-block"===e.display},M='a[href*="/products/"]',R=t=>t.matches&&t.matches(M)||!!t.querySelector(M);function z(t){return t.some(t=>t.offsetHeight>0)?t.filter(t=>R(t)||t.offsetHeight>0&&t.offsetWidth>0):t}function P(t){const e=t||document,i=e.querySelector('main, #MainContent, [role="main"]')||e.body||e,n=e.body||e;if(!i)return null;const s=new Set;let o=null;return i.querySelectorAll('a[href*="/products/"]').forEach(t=>{for(let r=t.parentElement,a=0;r&&r!==i&&a<18;r=r.parentElement,a++){if(s.has(r))continue;s.add(r);const t=Array.from(r.children).filter(_),i=t.filter(R);if(i.length<4||i.length/t.length<.6)continue;if(e.body&&$(i.slice(0,12)).size<4)continue;const a=getComputedStyle(r),l=a.display.includes("grid")||a.display.includes("flex")&&"wrap"===a.flexWrap,c=!l&&/^(block|flow-root|list-item)$/.test(a.display)&&T(i[0])&&T(i[1]);if(!l&&!c)continue;const d=r.scrollWidth-r.clientWidth;if(d>4&&/auto|scroll/.test(a.overflowX)||d>.5*r.clientWidth)continue;if(l&&a.display.includes("grid")&&String(a.gridAutoFlow||"").includes("column"))continue;let h=!1;for(let e=r;e&&e!==n;e=e.parentElement)if(v.test(e.id+" "+("string"===typeof e.className?e.className:"")+" "+e.tagName)){h=!0;break}h||o&&!(i.length>o.items.length)||(o={grid:r,items:i,tiles:z(t),flow:c})}}),o}function I(t){if(!t.length)return[];const e=t.some(e=>e.offsetTop!==t[0].offsetTop),i=t=>e?t.offsetTop:t.getBoundingClientRect().top,n=[0];let s=i(t[0]);for(let o=1;o<t.length;o++){const e=i(t[o]);Math.abs(e-s)>=4&&(n.push(o),s=e)}return n}const N=t=>parseFloat(t)||0,B={marginTop:"0px",marginBottom:"0px",padding:"0px"};function j(t,e,i){const n=(t||document).createElement(e);return n.setAttribute(w,i||""),Object.assign(n.style,{display:"block",gridColumn:"1 / -1",gridRow:"auto",gridTemplateRows:"none",flex:"0 0 100%",width:"100%",maxWidth:"100%",boxSizing:"border-box",listStyle:"none",margin:"0",padding:"0",float:"none",clear:"both"}),n}function O({slots:t,anchor:e=null,mode:i="grid",firstRows:n=2,everyRows:s=3,minBefore:o=x,doc:r,slotProducts:a=null,isFiltered:l=null,onSwap:c=null}){const d=r||document,h=d.ownerDocument||d;let p="none",u=null,g=null,b=!1;const f="function"===typeof ResizeObserver?new ResizeObserver(()=>F()):null,m=t.map(t=>t.firstElementChild),v=t.map(t=>t.getAttribute(w)||"");const y=t=>{const e=[];for(let i=t.nextElementSibling;i&&i.hasAttribute(k);i=i.nextElementSibling)e.push(i);return e},L=t=>{let e=t.nextElementSibling;for(;e&&e.hasAttribute(k);)e=e.nextElementSibling;return e},_=t=>{y(t).forEach(t=>t.remove()),t.remove()};let T=[],M=!1,R=[];const z=h.defaultView||("undefined"!==typeof window?window:null),O=d===h&&z&&"function"===typeof z.scrollBy;function q(t,e){if(!O)return null;const i=function(t){for(let e=t.parentElement;e&&e!==h.body&&e!==h.documentElement;e=e.parentElement){const t=getComputedStyle(e).overflowY;if(("auto"===t||"scroll"===t)&&e.scrollHeight>e.clientHeight+1)return e}return null}(e);if(!((i?i.scrollTop:z.pageYOffset)>0))return null;const n=i?i.getBoundingClientRect().top:0,s=t.find(t=>t.getBoundingClientRect().top>=n);return s?{el:s,top:s.getBoundingClientRect().top,box:i}:null}function W(){const r="grid"!==i||M?null:P(d);if(!r)return R=[],void function(){if(!e)return t.forEach(_),void(p="none");t.forEach((t,i)=>{Object.assign(t.style,B),y(t).forEach(t=>t.remove()),t.parentElement===e&&e.children[i]===t||e.insertBefore(t,e.children[i]||null)}),p="anchor"}();const c=a&&l&&l()?$(r.items):null,g=c?t.filter((t,e)=>(a[e]||[]).filter(t=>c.has(t)).length>=S):t,b=q(r.items,r.grid);t.forEach(t=>{g.includes(t)||_(t)});const m=t.filter(t=>t.parentElement===r.grid);m.forEach(t=>{t.style.position="absolute"});const v=I(r.tiles),x=function(t){const e=I(t);return e.reduce((i,n,s)=>Math.max(i,(s+1<e.length?e[s+1]:t.length)-n),1)}(r.tiles);m.forEach(t=>{t.style.position=""});const w=v.length>1?r.tiles[v[1]]:null,E=function(t){const e=getComputedStyle(t),i=N(e.borderTopWidth)+N(e.borderBottomWidth)>0||!/^(|transparent|rgba\(0, 0, 0, 0\))$/.test(e.backgroundColor||"")||!/^(|none)$/.test(e.boxShadow||""),n=t=>Math.min(120,Math.max(0,Math.round(N(t))))+"px";return{marginTop:n(e.marginTop),marginBottom:n(e.marginBottom),padding:i?"0px":[e.paddingTop,e.paddingRight,e.paddingBottom,e.paddingLeft].map(n).join(" ")}}(w&&r.items.includes(w)?w:r.items[0]);let C=Math.min(n,v.length);for(;C<v.length&&v[C]<o;)C++;R=[],g.forEach((t,e)=>{Object.assign(t.style,E);const i=C+e*s,n=i<v.length?r.tiles[v[i]]:null,o=t.parentElement===r.grid;if(n)o&&L(t)===n||(y(t).forEach(t=>t.remove()),r.grid.insertBefore(t,n));else{if(0!==e)return void _(t);o&&!L(t)||(y(t).forEach(t=>t.remove()),r.grid.appendChild(t))}!function(t,e){const i=y(t);i.slice(e).forEach(t=>t.remove());for(let n=i.length;n<e;n++){const e=h.createElement(t.tagName.toLowerCase());e.setAttribute(k,""),e.setAttribute("aria-hidden","true"),e.hidden=!0,e.style.setProperty("display","none","important"),t.parentElement.insertBefore(e,t.nextSibling)}}(t,x-1),R.push(t)}),function(t){if(!t||!t.el.isConnected)return;const e=t.el.getBoundingClientRect().top-t.top;Math.abs(e)<=1||(t.box?t.box.scrollTop+=e:z.scrollBy(0,e))}(b),f&&u!==r.items[0]&&(f.disconnect(),f.observe(r.items[0]),u=r.items[0]),p="grid"}function D(){if(b)return;if(function(){let e=0;return t.forEach((i,n)=>{const s=m[n];if(!s||i.hasAttribute(w)&&s.parentElement===i)return;const o=j(h,i.tagName.toLowerCase(),v[n]);if(o.appendChild(s),i.hasAttribute(w)&&i.remove(),t[n]=o,e++,c)try{c(i,o)}catch(r){}}),e}()+R.filter(e=>t.includes(e)&&!e.isConnected).length){const t=Date.now();T=T.filter(e=>t-e<C),T.push(t),T.length>E&&(M=!0)}W(),U&&(U.takeRecords(),G&&!G.isConnected&&(U.disconnect(),G=V(),U.observe(G,{childList:!0,subtree:!0})))}let H=[];function F(){clearTimeout(g),H.forEach(clearTimeout),g=setTimeout(()=>{D(),H=A.map(t=>setTimeout(D,t))},120)}const V=()=>d.querySelector("main")||d.body||d;let G=null;const U="function"===typeof MutationObserver?new MutationObserver(()=>F()):null;return U&&(G=V(),U.observe(G,{childList:!0,subtree:!0})),z&&z.addEventListener("resize",F),h.addEventListener("shopify:section:load",F),h.addEventListener("shopify:section:unload",F),D(),H=A.map(t=>setTimeout(D,t)),{placedIn:()=>p,stop(){b=!0,clearTimeout(g),H.forEach(clearTimeout),t.forEach(t=>y(t).forEach(t=>t.remove())),U&&U.disconnect(),f&&f.disconnect(),z&&z.removeEventListener("resize",F),h.removeEventListener("shopify:section:load",F),h.removeEventListener("shopify:section:unload",F)}}}var q=i(1839),W=i(3959),D=i(651),H=i(6387),F=':host{--ink:var(--wht-neo-bg-ink,#1f2421);--ink-2:var(--wht-neo-bg-ink-2,#4a524c);--muted:var(--wht-neo-bg-muted,#7e867f);--accent:var(--wht-neo-bg-accent,#1f2421);--accent-ink:var(--wht-neo-bg-accent-ink,#5b645d);--line:var(--wht-neo-bg-line,#e4e6e3);--soft:var(--wht-neo-bg-soft,#f1f3f0);--card:var(--wht-neo-bg-card,#fff);--radius:var(--wht-neo-bg-radius,14px);--slide:var(--wht-neo-bg-slide,clamp(150px,15cqw,192px));--text-col:var(--wht-neo-bg-text-col,30%);--list-col:var(--wht-neo-bg-list-col,clamp(232px,23cqw,280px));color:var(--ink);display:block!important;font-size:var(--wht-neo-bg-font-size,15px);line-height:1.4;text-align:left}*{box-sizing:border-box}button{color:inherit;cursor:pointer;font:inherit}[hidden]{display:none!important}.wm-frame{container-type:inline-size;margin:var(--wht-neo-bg-margin,8px auto);max-width:var(--wht-neo-bg-maxw,none)}.bg-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow-anchor:none}.bg-head{padding:24px 28px 18px}.bg-eyebrow{color:var(--accent-ink);font-size:10.8px;font-weight:500;letter-spacing:1.94px;margin:0 0 8px;text-transform:uppercase}.bg-title{color:var(--ink);font-family:var(--wht-neo-bg-title-font,inherit);font-size:18px;font-weight:var(--wht-neo-bg-title-weight,500);letter-spacing:-.18px;line-height:1.35;margin:0}.bg-axis{align-items:center;color:var(--muted);display:flex;font-size:12px;gap:10px;margin-top:12px;max-width:420px}.bg-axis i{background:linear-gradient(90deg,var(--soft),var(--accent));border-radius:2px;flex:1;height:2px}.bg-a{align-items:start;display:grid;gap:24px;grid-template-columns:minmax(0,1fr) 220px 300px;padding:0 28px 26px}.bg-media{display:contents}.bg-text{align-self:stretch;display:flex;flex-direction:column;gap:12px;min-width:0}.bg-body{color:var(--ink-2);font-size:15px;letter-spacing:.2px;line-height:1.7;margin:-6px 0 0}.bg-plink{border-radius:3px;color:var(--ink);cursor:pointer;font-weight:500;text-decoration:underline;text-decoration-color:var(--line);text-decoration-thickness:1.5px;text-underline-offset:3px;transition:background .15s}.bg-plink.watching,.bg-plink:focus-visible,.bg-plink:hover{background:var(--soft);outline:none;text-decoration-color:var(--accent)}.bg-more{align-self:flex-start;background:none;border:0;color:var(--ink);display:none;font-size:13px;font-weight:600;padding:0}.bg-more:after{content:" \u25be"}.bg-text.open .bg-more:after{content:" \u25b4"}.bg-videos{align-self:start;min-width:0;position:relative}.bg-vtile{aspect-ratio:9/16;background:#111;border-radius:12px;cursor:pointer;display:none;overflow:hidden;position:relative}.bg-vtile.active{display:block}.bg-vtile>img{display:block;height:100%;object-fit:cover;width:100%}.bg-vtile.unavailable>img{opacity:.5}.bg-tile-play{background:hsla(0,0%,8%,.55);border-radius:50%;color:#fff;display:grid;height:40px;left:50%;place-items:center;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);width:40px}.bg-tile-play svg{height:16px;margin-left:2px;width:16px}.bg-stage{background:#111;cursor:default;inset:0;position:absolute}.bg-stage video{display:block;height:100%;object-fit:cover;width:100%}.bg-stage:before{background:linear-gradient(rgba(0,0,0,.5),transparent);content:"";height:84px;left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.bg-progress{display:flex;gap:4px;left:8px;position:absolute;right:8px;top:8px;z-index:2}.bg-progress i{background:hsla(0,0%,100%,.35);border-radius:2px;flex:1;height:3px;overflow:hidden}.bg-progress b{background:#fff;display:block;height:100%;width:0}.bg-proof{align-items:center;color:#fff;display:flex;gap:7px;left:10px;pointer-events:none;position:absolute;right:10px;text-shadow:0 1px 2px rgba(0,0,0,.5);top:20px;z-index:2}.bg-proof:empty{display:none}.pf-avatar{background:hsla(0,0%,100%,.92);border-radius:50%;color:#333;display:grid;flex:none;font-size:11px;font-weight:700;height:24px;place-items:center;text-shadow:none;width:24px}.pf-text{display:flex;flex-direction:column;line-height:1.2;min-width:0}.pf-text b{font-size:12px;font-weight:600}.pf-text b,.pf-text em{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pf-text em{font-size:11px;font-style:normal;opacity:.9}.bg-nav{align-items:center;background:transparent;border:0;bottom:60px;display:flex;padding:0 8px;position:absolute;top:28px;width:34%;z-index:2}.bg-nav.prev{justify-content:flex-start;left:0}.bg-nav.next{justify-content:flex-end;right:0}.bg-nav i{background:hsla(0,0%,8%,.45);border-radius:50%;color:#fff;display:grid;font-size:20px;font-style:normal;height:30px;line-height:1;opacity:0;place-items:center;transition:opacity .15s;width:30px}.bg-nav:focus-visible i,.bg-stage:hover .bg-nav i{opacity:1}@media (hover:none){.bg-nav i{opacity:.55}}.bg-spinner{animation:bg-spin .8s linear infinite;border:3px solid hsla(0,0%,100%,.3);border-radius:50%;border-top-color:#fff;height:34px;inset:0;margin:auto;opacity:0;pointer-events:none;position:absolute;transition:opacity .2s;width:34px;z-index:2}.bg-stage.loading .bg-spinner{opacity:1}.bg-note{background:rgba(0,0,0,.65);border-radius:8px;bottom:58px;color:#fff;font-size:12px;left:10px;padding:6px;text-align:center}.bg-ctl,.bg-note{position:absolute;right:10px;z-index:3}.bg-ctl{bottom:10px;display:flex;gap:8px}.bg-btn{background:hsla(0,0%,8%,.7);border:0;border-radius:50%;color:#fff;display:grid;height:34px;padding:0;place-items:center;width:34px}.bg-btn svg{height:14px;width:14px}.bg-rail{display:flex;flex-direction:column;max-height:391.11111px;overflow-y:auto;overscroll-behavior:contain;padding:2px;scroll-snap-type:y proximity;scrollbar-width:thin}.bg-rail,.bg-tile{gap:8px;position:relative}.bg-tile{align-items:center;background:var(--card);border:1px solid var(--line);border-radius:12px;display:grid;flex:none;grid-template-columns:minmax(0,1fr) auto;overflow:hidden;padding:8px 10px 10px 8px;scroll-snap-align:start;transition:border-color .15s,background .15s,box-shadow .15s,opacity .15s}.bg-tile:hover{border-color:var(--muted)}.bg-tile-main{align-items:center;background:none;border:0;display:grid;gap:10px;grid-template-columns:48px minmax(0,1fr);min-width:0;padding:0;text-align:left}.bg-tile-main:focus-visible{border-radius:8px;outline:2px solid var(--accent);outline-offset:3px}.bg-tile-img{background:var(--soft);border-radius:8px;height:62px;overflow:hidden;position:relative;width:48px}.bg-tile-img img{display:block;height:100%;object-fit:cover;width:100%}.bg-tile-img em{background:var(--accent);border-radius:50%;color:#fff;display:grid;font-size:10.5px;font-style:normal;font-weight:600;height:18px;left:4px;place-items:center;position:absolute;top:4px;width:18px}.bg-tile-info{display:flex;flex-direction:column;gap:1px;min-width:0}.bg-tile-state{align-items:center;color:var(--accent-ink);display:inline-flex;font-size:10px;font-weight:600;gap:5px;letter-spacing:.8px;text-transform:uppercase}.bg-tile-state:empty{display:none}.bg-tile-state svg{height:11px;width:11px}.bg-tile-name{-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--ink);display:-webkit-box;font-size:13.5px;font-weight:500;line-height:1.3;overflow:hidden}.bg-tile-print{color:var(--muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bg-tile-print:empty{display:none}.bg-tile-value{color:var(--ink-2);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bg-tile-buy{align-items:flex-end;display:flex;flex-direction:column;gap:6px}.bg-tile-price{color:var(--ink);font-size:13px}.bg-tile-price,.bg-tile-view{font-weight:500;white-space:nowrap}.bg-tile-view{background:var(--wht-neo-bg-cta,var(--accent));border-radius:999px;color:var(--wht-neo-bg-cta-ink,#fff);font-size:12px;padding:5px 12px;text-decoration:none}.bg-tile-view:hover{opacity:.85}.bg-tile-bar{bottom:0;height:3px;left:0;overflow:hidden;position:absolute;right:0}.bg-tile-bar b{background:var(--accent);display:block;height:100%;width:0}.bg-tile.active{border-color:var(--accent);box-shadow:inset 3px 0 0 var(--accent)}.bg-tile.active .bg-tile-bar,.bg-tile.hl,.bg-tile.looping{background:var(--soft)}.bg-tile.hl{border-color:var(--accent)}.bg-tile.loading .bg-tile-bar b{animation:bg-shimmer 1.1s linear infinite;width:30%!important}.bg-tile.unavailable{opacity:.5}.eq{align-items:flex-end;display:inline-flex;gap:1.5px;height:9px}.eq b{animation:bg-eq .9s ease-in-out infinite;background:currentColor;width:2px}.eq b:nth-child(2){animation-delay:.2s}.eq b:nth-child(3){animation-delay:.4s}.paused .eq b{animation:none;height:4px}.bg-slide-nav{display:none}@keyframes bg-spin{to{transform:rotate(1turn)}}@keyframes bg-shimmer{0%{transform:translateX(-100%)}to{transform:translateX(340%)}}@keyframes bg-eq{0%,to{height:3px}50%{height:9px}}@media (prefers-reduced-motion:reduce){.bg-tile.loading .bg-tile-bar b,.eq b{animation:none}}@container (min-width: 901px){.bg-a{grid-template-columns:minmax(var(--text-col),1fr) minmax(0,max-content) var(--list-col)}.bg-text{grid-column:1;grid-row:1}.bg-videos{display:flex;gap:12px;grid-column:2;grid-row:1;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;padding:2px;scroll-snap-type:x proximity;scrollbar-width:thin}.bg-vtile{display:block;flex:0 0 var(--slide);scroll-snap-align:start}.bg-vtile.active{outline:2px solid var(--accent);outline-offset:0}.bg-stage .bg-nav,.bg-stage .bg-progress{display:none}.bg-stage .bg-proof{top:10px}.bg-rail{grid-column:3;grid-row:1;max-height:calc(var(--slide)*16/9 + 4px)}.bg-slide-nav{align-self:start;background:var(--card);border:1px solid var(--line);border-radius:50%;color:var(--ink);display:grid;grid-column:2;grid-row:1;height:34px;margin-top:calc(var(--slide)*8/9 - 15px);padding:0;place-items:center;transition:border-color .15s;width:34px;z-index:3}.bg-slide-nav:focus-visible,.bg-slide-nav:hover{border-color:var(--ink);outline:none}.bg-slide-nav i{font-size:20px;font-style:normal;line-height:1;margin-top:-2px}.bg-slide-nav.prev{justify-self:start;margin-left:-14px}.bg-slide-nav.next{justify-self:end;margin-right:-14px}}@media (hover:none){.bg-slide-nav{display:none!important}}@supports (timeline-scope:--bg-clips-row){.bg-a{timeline-scope:--bg-clips-row}.bg-videos{scroll-timeline:--bg-clips-row inline}.bg-slide-nav{animation-timeline:--bg-clips-row;animation:bg-row-scrolls linear both;visibility:hidden}}@keyframes bg-row-scrolls{0%,to{visibility:visible}}@supports not (timeline-scope:--bg-clips-row){.bg-a:not(:has(.bg-vtile:nth-child(3))) .bg-slide-nav{display:none}}@container (max-width: 900px){.bg-a{grid-template-columns:220px minmax(0,1fr)}.bg-text{grid-column:1/-1}}@container (max-width: 640px){.bg-head{padding:18px 18px 14px}.bg-title{font-size:16px}.bg-a{gap:14px;grid-template-columns:minmax(0,1fr);padding:0 18px 20px}.bg-videos{justify-self:center;max-width:240px;width:100%}.bg-body-wrap{font-size:15px;-webkit-mask-image:linear-gradient(#000 calc(100% - 2.2em),transparent);mask-image:linear-gradient(#000 calc(100% - 2.2em),transparent);max-height:7.2em;overflow:hidden;position:relative;transition:max-height .35s ease}.bg-text.open .bg-body-wrap{-webkit-mask-image:none;mask-image:none;max-height:60em}.bg-more{display:inline-block}.bg-text{gap:8px}.bg-rail{flex-direction:row;margin:0 -18px;max-height:none;overflow-x:auto;overflow-y:hidden;padding:2px 18px;scroll-snap-type:x mandatory}.bg-tile{flex:0 0 82%;scroll-snap-align:center}}';const V="buyingGuide",G="/v1/brand/{store_id}/buying-guide",U=5,K=3,Y=["a","b","c","d","e"],X="[data-wht-bg-page]",J="whatmoreBuyingGuideDraft";function Q(){try{return JSON.parse(localStorage.getItem("whatmore_brand_customizations")).customizations}catch(t){return null}}const Z=(t,e,i)=>{const n=Number(t);return null!==t&&void 0!==t&&""!==t&&Number.isFinite(n)?Math.min(i,Math.max(e,Math.round(n))):null};let tt=null;function et(t,e){tt||(tt=Promise.all([i.e(1296,"high"),i.e(4071,"high")]).then(i.bind(i,725))),tt.then(i=>{t.getAttribute("data-src")===e&&i.attachSource(t,e,i.PRIORITY.ACTIVE,{bufferAhead:12})}).catch(()=>{t.src=e})}let it=null;function nt(t){tt&&tt.then(e=>{it||(it=document.createElement("video"),it.muted=!0,it.playsInline=!0),e.attachSource(it,t,e.PRIORITY.NEXT)}).catch(()=>{})}function st(t){if(tt)tt.then(e=>e.releaseSource(t)).catch(()=>{});else{t.removeAttribute("src");try{t.load()}catch(e){}}}async function ot(t){const{rootElement:e,widgetContainer:i,shopId:n,collectionId:r,neoJson:a,mode:l="embed",preview:c=!1,designMode:d=!1,onWidgetView:h,onClipStarted:u,onClipWatched:b,onProductView:f}=t;if(!n||!r||"0"===String(r))return!1;const v=i&&i.closest&&i.closest(X)||null,y=!v&&(void 0!==t.pinned?t.pinned:"block"===l),w=v||document,k=function(t){const e=/^\s*(\d)\s*,\s*(\d)\s*$/.exec(t&&t.getAttribute&&t.getAttribute("data-wht-bg-rows")||"");return e&&Number(e[2])>0?{first:Number(e[1]),every:Number(e[2])}:null}(v),S=window.__whtBuyingGuide;if("embed"===l&&S&&"block"===S.mode&&S.collectionId===String(r))return!0;if("embed"===l&&!c&&!function(t,e){const i=t&&t[V];return!(!i||!0!==i.enabled)&&(Array.isArray(i.collections)?i.collections.map(String):[]).includes(String(e))}(a,r))return!1;let E=function(t){const e=t&&t.querySelector("#"+J);if(!e)return null;try{const t=JSON.parse(e.textContent||"");return t&&Array.isArray(t.cards)?t:null}catch(i){return null}}(i);if(!E)try{E=await fetch(function(t,e){return(0,D.y0)(Q(),G,t)+"?client_collection_id="+encodeURIComponent(e)}(n,r)).then(t=>t.ok?t.json():null)}catch(mt){E=null}const C=(E&&E.cards||[]).slice(0,v?U+1:U);if(!C.length)return!1;let A=null;try{A=new URLSearchParams(window.location.search).get("neoskin")}catch(mt){}const{look:$,css:_}=await async function(t,e){const i=(0,q.RO)(t,V)||{},n=String(e||i.skin||"a").toLowerCase(),s=Y.includes(n)?n:"a",o=i.customCss,r="string"===typeof o?o:o&&"object"===typeof o&&"string"===typeof o[s]?o[s]:"",a="a"===s?"":await(0,H.P)(V,s);return{look:s,css:F+(a?"\n"+a:"")+("string"===typeof i.brandCss&&i.brandCss?"\n"+i.brandCss:"")+(r?"\n"+r:"")}}(a,A),T=(0,q.RO)(a,V)||{},M=function(t){const e=Z(t&&t.spaceAbove,0,200),i=Z(t&&t.spaceBelow,0,200),n=Z(t&&t.maxWidth,320,2e3),s={};return null===e&&null===i||(s["--wht-neo-bg-margin"]=(null===e?8:e)+"px auto "+(null===i?8:i)+"px"),null!==n&&(s["--wht-neo-bg-maxw"]=n+"px"),s}(T),R={hideEyebrow:!0===T.hideEyebrow,newTab:!!d||!!v};if("embed"===l&&window.__whtBuyingGuide&&"block"===window.__whtBuyingGuide.mode)return!0;!function(){const t=window.__whtBuyingGuide;if(t){try{t.placer&&t.placer.stop()}catch(mt){}try{t.io&&t.io.disconnect()}catch(mt){}(t.stages||[]).forEach(t=>{try{t.destroy()}catch(mt){}}),(t.slots||[]).forEach(t=>t.remove()),it&&(st(it),it=null),t.around&&t.around.remove(),window.__whtBuyingGuide=null}}();try{const t=window.Shopify&&window.Shopify.currency&&window.Shopify.currency.active;t&&Object.values(E.products||{}).forEach(e=>{e.currency=t})}catch(mt){}const z=function(){const t=Object.assign({},o),e=(t,e)=>(0,W.rB)("buying_guide_"+t,e);return["readMore","showLess","view","playing","paused","replaying","unavailable","prev","next","pause","play","mute","unmute","views","likes"].forEach(i=>{t[i]=e(i.replace(/[A-Z]/g,t=>"_"+t.toLowerCase()),o[i])}),t.formats=Object.fromEntries(Object.keys(s).map(t=>[t,e("format_"+t,s[t])])),t}(),I=Q(),N=E.store_name||(I&&"string"===typeof I.brand_name?I.brand_name:"")||"",B=C.map(t=>p(t).map(t=>L(((E.products||{})[t.product_id]||{}).link)).filter(Boolean)),tt=!(!window.matchMedia||!window.matchMedia("(prefers-reduced-motion: reduce)").matches),ot=t=>(E.products||{})[t.product_id]||null,rt={onClipStarted:u?t=>u(t,ot(t)):null,onClipWatched:b?(t,e)=>b(t,e,ot(t)):null,onProductView:f?t=>f(t,ot(t)):null},at=y?{mode:"pinned",firstRows:2}:function(t){const e=/^after_row_([1-9])$/.exec(String(t||""));return e?{mode:"grid",firstRows:Number(e[1])}:"above"===t||"below"===t?{mode:t,firstRows:2}:{mode:"grid",firstRows:2}}(E.placement),lt=P(w),ct="grid"===at.mode&<&&"LI"===lt.items[0].tagName?"li":"div",dt=[],ht=C.map(t=>{const e=j(document,ct,t.key),i=document.createElement("div");i.className="wht-neo-bg",i.setAttribute("data-wht-look",$),i.style.setProperty("display","block","important"),Object.keys(M).forEach(t=>i.style.setProperty(t,M[t])),e.appendChild(i);const n=i.attachShadow({mode:"open"}),s=p(t);n.innerHTML="<style>"+_+'</style><div class="wm-frame" data-wht-look="'+$+'">'+g(t,s,E,z,R)+"</div>";const o=n.querySelector(".bg-card");return o._stage=new m(o,s,{data:E,labels:z,storeName:N,setSource:et,releaseSource:st,warm:nt,track:rt,reducedMotion:tt}),dt.push(o._stage),function(t){const e=t=>{const e=t&&t.closest(".bg-card");return e?e._stage:null};t.addEventListener("click",t=>{const i=t.target,n=i.closest&&i.closest(".bg-plink");if(n){if(t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;const i=e(n),s=i?i.clips.findIndex(t=>t.product_id===n.getAttribute("data-pid")):-1;if(s<0)return;return t.preventDefault(),void i.watch(s)}const s=i.closest&&i.closest("[data-view]");if(s){const t=e(s),i=t&&t.clips.find(t=>t.product_id===s.getAttribute("data-view"));return void(i&&t.opts.track&&t.opts.track.onProductView&&t.opts.track.onProductView(i))}const o=i.closest&&i.closest("[data-tile],[data-act]"),r=e(o);if(!r)return;if(o.hasAttribute("data-tile")&&i.closest(".bg-stage"))return;const a=o.getAttribute("data-act");if(o.hasAttribute("data-tile"))r.replay(Number(o.getAttribute("data-tile")));else if("play"===a)r.toggle();else if("mute"===a)r.mute();else if("prev"===a)r.step(-1);else if("next"===a)r.step(1);else if("more"===a){const t=o.closest(".bg-text").classList.toggle("open");o.textContent=t?r.labels.showLess:r.labels.readMore,o.setAttribute("aria-expanded",String(t))}}),t.addEventListener("keydown",t=>{const e=t.target.closest&&t.target.closest(".bg-tile-main"),i={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1}[t.key];if(!e||!i)return;t.preventDefault();const n=Array.from(e.closest(".bg-rail").querySelectorAll(".bg-tile-main"));n[(n.indexOf(e)+i+n.length)%n.length].focus()}),[["mouseover",!0],["mouseout",!1],["focusin",!0],["focusout",!1]].forEach(([e,i])=>{t.addEventListener(e,t=>{const e=t.target.closest&&t.target.closest(".bg-plink");e&&e.closest(".bg-card").querySelectorAll(".bg-tile").forEach(t=>{t.getAttribute("data-pid")===e.getAttribute("data-pid")&&t.classList.toggle("hl",i)})})})}(n),e});let pt="block"===l?e:null,ut=null;"above"!==at.mode&&"below"!==at.mode||y||!lt||(ut=document.createElement("div"),ut.setAttribute("data-wht-bg-around",at.mode),lt.grid.parentElement.insertBefore(ut,"above"===at.mode?lt.grid:lt.grid.nextSibling),pt=ut);let gt=!1,bt=null;const ft=O({slots:ht,anchor:pt,mode:"grid"===at.mode?"grid":"anchor",firstRows:k?k.first:at.firstRows,everyRows:k?k.every:K,minBefore:k?0:x,doc:w,slotProducts:v?null:B,isFiltered:v?null:()=>function(t){try{return Array.from(new URLSearchParams(t||"").entries()).some(([t,e])=>0===t.indexOf("filter.")&&""!==e)}catch(mt){return!1}}(window.location.search),onSwap:(t,e)=>{bt&&(bt.unobserve(t),bt.observe(e))}});return"none"===ft.placedIn()?(ft.stop(),dt.forEach(t=>t.destroy()),!1):("function"===typeof IntersectionObserver?(bt=new IntersectionObserver(t=>t.forEach(t=>{const e=dt[ht.indexOf(t.target)];e&&(t.isIntersecting&&t.intersectionRatio>=.25&&!gt&&(gt=!0,h&&h()),t.isIntersecting&&t.intersectionRatio>=.5?e.play():e.leave())}),{threshold:[0,.25,.5]}),ht.forEach(t=>bt.observe(t))):(h&&h(),dt.forEach(t=>t.play())),window.__whtBuyingGuide={mode:l,look:$,collectionId:String(r),placer:ft,io:bt,stages:dt,slots:ht,around:ut,placedIn:()=>ft.placedIn()},"block"===l&&e&&(e.style.opacity="1",e.removeAttribute("data-shimmer-active")),!0)}}}]);
|