'use strict';!function(){for(var d={},f=0,g=document.getElementById("sections-script").getAttribute("data-sections").split(",");f<g.length;f++)d[g[f]]=!0;if(d["featured-product"]||window.DesignMode)try{customElements.get("product-modal")||customElements.define("product-modal",class extends ModalDialog{constructor(){super()}hide(){super.hide()}show(a){super.show(a);this.showActiveMedia()}showActiveMedia(){this.querySelectorAll(`[data-media-id]:not([data-media-id="${this.openedBy.getAttribute("data-media-id")}"])`).forEach(c=>
{c.classList.remove("active")});const a=this.querySelector(`[data-media-id="${this.openedBy.getAttribute("data-media-id")}"]`);var b=a.querySelector("template");b=b?b.content:null;a.classList.add("active");a.scrollIntoView();const e=this.querySelector('[role\x3d"document"]');e.scrollLeft=(a.width-e.clientWidth)/2;"DEFERRED-MEDIA"==a.nodeName&&b&&b.querySelector(".js-youtube")&&a.loadContent()}})}catch(a){console.error(a)}if(d["main-cart-footer"]||window.DesignMode)try{class a extends HTMLElement{constructor(){super();
this.addEventListener("change",debounce(b=>{b=JSON.stringify({note:b.target.value});fetch(`${routes.cart_update_url}`,{...fetchConfig(),body:b})},300))}}customElements.define("cart-note",a)}catch(a){console.error(a)}if(d["product-recommendations"]||window.DesignMode)try{class a extends HTMLElement{constructor(){super();(new IntersectionObserver(((b,e)=>{b[0].isIntersecting&&(e.unobserve(this),fetch(this.dataset.url).then(c=>c.text()).then(c=>{const h=document.createElement("div");h.innerHTML=c;(c=
h.querySelector("product-recommendations"))&&c.innerHTML.trim().length&&(this.innerHTML=c.innerHTML)}).catch(c=>{console.error(c)}))}).bind(this),{rootMargin:"0px 0px 200px 0px"})).observe(this)}}customElements.define("product-recommendations",a)}catch(a){console.error(a)}}();