function getFocusableElements(container){return Array.from(container.querySelectorAll("summary, a[href], button:enabled, [tabindex]:not([tabindex^='-']), [draggable], area, input:not([type=hidden]):enabled, select:enabled, textarea:enabled, object, iframe"))}document.querySelectorAll('[id^="Details-"] summary').forEach(summary=>{summary.setAttribute("role","button"),summary.setAttribute("aria-expanded","false"),summary.nextElementSibling.getAttribute("id")&&summary.setAttribute("aria-controls",summary.nextElementSibling.id),summary.addEventListener("click",event=>{event.currentTarget.setAttribute("aria-expanded",!event.currentTarget.closest("details").hasAttribute("open"))}),!summary.closest("header-drawer")&&summary.parentElement.addEventListener("keyup",onKeyUpEscape)});const trapFocusHandlers={};function trapFocus(container,elementToFocus=container){var elements=getFocusableElements(container),first=elements[0],last=elements[elements.length-1];removeTrapFocus(),trapFocusHandlers.focusin=event=>{event.target!==container&&event.target!==last&&event.target!==first||document.addEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.focusout=function(){document.removeEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.keydown=function(event){event.code.toUpperCase()==="TAB"&&(event.target===last&&!event.shiftKey&&(event.preventDefault(),first.focus()),(event.target===container||event.target===first)&&event.shiftKey&&(event.preventDefault(),last.focus()))},document.addEventListener("focusout",trapFocusHandlers.focusout),document.addEventListener("focusin",trapFocusHandlers.focusin),elementToFocus.focus()}try{document.querySelector(":focus-visible")}catch{focusVisiblePolyfill()}function focusVisiblePolyfill(){const navKeys=["ARROWUP","ARROWDOWN","ARROWLEFT","ARROWRIGHT","TAB","ENTER","SPACE","ESCAPE","HOME","END","PAGEUP","PAGEDOWN"];let currentFocusedElement=null,mouseClick=null;window.addEventListener("keydown",event=>{navKeys.includes(event.code.toUpperCase())&&(mouseClick=!1)}),window.addEventListener("mousedown",event=>{mouseClick=!0}),window.addEventListener("focus",()=>{currentFocusedElement&¤tFocusedElement.classList.remove("focused"),!mouseClick&&(currentFocusedElement=document.activeElement,currentFocusedElement.classList.add("focused"))},!0)}function pauseAllMedia(){document.querySelectorAll(".js-youtube").forEach(video=>{video.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),document.querySelectorAll(".js-vimeo").forEach(video=>{video.contentWindow.postMessage('{"method":"pause"}',"*")}),document.querySelectorAll("video").forEach(video=>video.pause()),document.querySelectorAll("product-model").forEach(model=>{model.modelViewerUI&&model.modelViewerUI.pause()})}function removeTrapFocus(elementToFocus=null){document.removeEventListener("focusin",trapFocusHandlers.focusin),document.removeEventListener("focusout",trapFocusHandlers.focusout),document.removeEventListener("keydown",trapFocusHandlers.keydown),elementToFocus&&elementToFocus.focus()}function onKeyUpEscape(event){if(event.code.toUpperCase()!=="ESCAPE")return;const openDetailsElement=event.target.closest("details[open]");if(!openDetailsElement)return;const summaryElement=openDetailsElement.querySelector("summary");openDetailsElement.removeAttribute("open"),summaryElement.focus()}class QuantityInput extends HTMLElement{constructor(){super(),this.input=this.querySelector("input"),this.changeEvent=new Event("change",{bubbles:!0}),this.querySelectorAll("button").forEach(button=>button.addEventListener("click",this.onButtonClick.bind(this)))}onButtonClick(event){event.preventDefault();const previousValue=this.input.value;event.target.name==="plus"?this.input.stepUp():this.input.stepDown(),previousValue!==this.input.value&&this.input.dispatchEvent(this.changeEvent)}}customElements.define("quantity-input",QuantityInput);function debounce(fn,wait){let t;return(...args)=>{clearTimeout(t),t=setTimeout(()=>fn.apply(this,args),wait)}}const serializeForm=form=>{const obj={},formData=new FormData(form);for(const key of formData.keys()){const regex=/(?:^(properties\[))(.*?)(?:\]$)/;regex.test(key)?(obj.properties=obj.properties||{},obj.properties[regex.exec(key)[2]]=formData.get(key)):obj[key]=formData.get(key)}return JSON.stringify(obj)};function editorShopifyEvent(t,e,i){let n=!1;t.type.includes("shopify:section")?e.hasAttribute("data-section-id")&&e.getAttribute("data-section-id")===t.detail.sectionId&&(n=!0):t.type.includes("shopify:block")&&t.target===e&&(n=!0),n&&i(t)}const currencySymbol={AED:"\u062F.\u0625",AFN:"\u060B",ALL:"L",AMD:"\u058F",ANG:"\u0192",AOA:"Kz",ARS:"$",AUD:"$",AWG:"\u0192",AZN:"\u20BC",BAM:"KM",BBD:"$",BDT:"Tk",BGN:"\u043B\u0432",BHD:".\u062F.\u0628",BIF:"FBu",BMD:"$",BND:"$",BOB:"$b",BOV:"BOV",BRL:"R$",BSD:"$",BTC:"\u20BF",BTN:"Nu.",BWP:"P",BYN:"Br",BYR:"Br",BZD:"BZ$",CAD:"$",CDF:"FC",CHE:"CHE",CHF:"CHF",CHW:"CHW",CLF:"CLF",CLP:"$",CNY:"\xA5",COP:"$",COU:"COU",CRC:"\u20A1",CUC:"$",CUP:"\u20B1",CVE:"$",CZK:"K\u010D",DJF:"Fdj",DKK:"kr",DOP:"RD$",DZD:"\u062F\u062C",EEK:"kr",EGP:"\xA3",ERN:"Nfk",ETB:"Br",ETH:"\u039E",EUR:"\u20AC",FJD:"$",FKP:"\xA3",GBP:"\xA3",GEL:"\u20BE",GGP:"\xA3",GHC:"\u20B5",GHS:"GH\u20B5",GIP:"\xA3",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"\u20AA",IMP:"\xA3",INR:"\u20B9",IQD:"\u0639.\u062F",IRR:"\uFDFC",ISK:"kr",JEP:"\xA3",JMD:"J$",JOD:"JD",JPY:"\xA5",KES:"KSh",KGS:"\u043B\u0432",KHR:"\u17DB",KMF:"CF",KPW:"\u20A9",KRW:"\u20A9",KWD:"KD",KYD:"$",KZT:"\u20B8",LAK:"\u20AD",LBP:"\xA3",LKR:"\u20A8",LRD:"$",LSL:"M",LTC:"\u0141",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"lei",MGA:"Ar",MKD:"\u0434\u0435\u043D",MMK:"K",MNT:"\u20AE",MOP:"MOP$",MRO:"UM",MRU:"UM",MUR:"\u20A8",MVR:"Rf",MWK:"MK",MXN:"$",MXV:"MXV",MYR:"RM",MZN:"MT",NAD:"$",NGN:"\u20A6",NIO:"C$",NOK:"kr",NPR:"\u20A8",NZD:"$",OMR:"\uFDFC",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"\u20B1",PKR:"\u20A8",PLN:"z\u0142",PYG:"Gs",QAR:"\uFDFC",RMB:"\uFFE5",RON:"lei",RSD:"\u0414\u0438\u043D.",RUB:"\u20BD",RWF:"R\u20A3",SAR:"\uFDFC",SBD:"$",SCR:"\u20A8",SDG:"\u062C.\u0633.",SEK:"kr",SGD:"S$",SHP:"\xA3",SLL:"Le",SOS:"S",SRD:"$",SSP:"\xA3",STD:"Db",STN:"Db",SVC:"$",SYP:"\xA3",SZL:"E",THB:"\u0E3F",TJS:"SM",TMT:"T",TND:"\u062F.\u062A",TOP:"T$",TRL:"\u20A4",TRY:"\u20BA",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"\u20B4",UGX:"USh",USD:"$",UYI:"UYI",UYU:"$U",UYW:"UYW",UZS:"\u043B\u0432",VEF:"Bs",VES:"Bs.S",VND:"\u20AB",VUV:"VT",WST:"WS$",XAF:"FCFA",XBT:"\u0243",XCD:"$",XOF:"CFA",XPF:"\u20A3",XSU:"Sucre",XUA:"XUA",YER:"\uFDFC",ZAR:"R",ZMW:"ZK",ZWD:"Z$",ZWL:"$"},shopCurrencySymbol=currencySymbol[Shopify.currency.active],getSiblings=function(elem){const siblings=[];let sibling=elem.parentNode.firstChild;for(;sibling;)sibling.nodeType===1&&sibling!==elem&&siblings.push(sibling),sibling=sibling.nextSibling;return siblings},slideUp=(target,time)=>{const duration=time||500;target.style.transitionProperty="height, margin",target.style.transitionDuration=duration+"ms",target.style.boxSizing="border-box",target.style.height=target.offsetHeight+"px",target.offsetHeight,target.style.overflow="hidden",target.style.height=0,window.setTimeout(()=>{target.style.display="none",target.style.removeProperty("height"),target.style.removeProperty("overflow"),target.style.removeProperty("transition-duration"),target.style.removeProperty("transition-property")},duration)},slideDown=(target,time)=>{let duration=time||500;target.style.removeProperty("display");let display=window.getComputedStyle(target).display;display==="none"&&(display="block"),target.style.display=display;const height=target.offsetHeight;target.style.overflow="hidden",target.style.height=0,target.offsetHeight,target.style.boxSizing="border-box",target.style.transitionProperty="height, margin",target.style.transitionDuration=duration+"ms",target.style.height=height+"px",window.setTimeout(()=>{target.style.removeProperty("height"),target.style.removeProperty("overflow"),target.style.removeProperty("transition-duration"),target.style.removeProperty("transition-property")},duration)};function TopOffset(el){let rect=el.getBoundingClientRect(),scrollTop=window.pageYOffset||document.documentElement.scrollTop;return{top:rect.top+scrollTop}}function fetchConfig(type="json"){return{method:"POST",headers:{"Content-Type":"application/json",Accept:`application/${type}`}}}typeof window.Shopify>"u"&&(window.Shopify={}),Shopify.bind=function(fn,scope){return function(){return fn.apply(scope,arguments)}},Shopify.setSelectorByValue=function(selector,value){for(var i=0,count=selector.options.length;i0&&Shopify.setSelectorByValue(this.provinceEl,value)},countryHandler:function(e){var opt=this.countryEl.options[this.countryEl.selectedIndex],raw=opt.getAttribute("data-provinces"),provinces=JSON.parse(raw);if(this.clearOptions(this.provinceEl),provinces&&provinces.length==0)this.provinceContainer.style.display="none";else{for(var i=0;i{event.code.toUpperCase()==="ESCAPE"&&this.hide()}),this.classList.contains("media-modal")?this.addEventListener("pointerup",event=>{event.pointerType==="mouse"&&!event.target.closest("deferred-media, product-model")&&this.hide()}):this.addEventListener("click",event=>{event.target.nodeName==="MODAL-DIALOG"&&this.hide()})}connectedCallback(){this.moved||(this.moved=!0,document.body.appendChild(this))}show(opener){this.openedBy=opener;const popup=this.querySelector(".template-popup");document.body.classList.add("overflow-hidden"),this.setAttribute("open",""),popup&&popup.loadContent(),trapFocus(this,this.querySelector('[role="dialog"]')),window.pauseAllMedia()}hide(){document.body.classList.remove("overflow-hidden"),this.removeAttribute("open"),removeTrapFocus(this.openedBy),window.pauseAllMedia()}}customElements.define("modal-dialog",ModalDialog);class ModalOpener extends HTMLElement{constructor(){super();const button=this.querySelector("button");button&&button.addEventListener("click",()=>{const modal=document.querySelector(this.getAttribute("data-modal"));modal&&modal.show(button)})}}customElements.define("modal-opener",ModalOpener);class DeferredMedia extends HTMLElement{constructor(){super();const poster=this.querySelector('[id^="Deferred-Poster-"]');poster&&poster.addEventListener("click",this.loadContent.bind(this))}loadContent(){if(window.pauseAllMedia(),!this.getAttribute("loaded")){const content=document.createElement("div");content.appendChild(this.querySelector("template").content.firstElementChild.cloneNode(!0)),this.setAttribute("loaded",!0);const deferredElement=this.appendChild(content.querySelector("video, model-viewer, iframe"));focus&&deferredElement.focus(),deferredElement.nodeName=="VIDEO"&&deferredElement.getAttribute("autoplay")&&deferredElement.play()}}}customElements.define("deferred-media",DeferredMedia);class DataCountdown extends HTMLElement{constructor(){super(),this.onCountDown()}onCountDown(){const CountDownElement=this.querySelector("[data-countdown]");if(CountDownElement){const countDownItem=(value,label)=>`
${value} ${label}
`,date=new Date(CountDownElement.getAttribute("data-countdown")).getTime(),second=1e3,minute=second*60,hour=minute*60,day=hour*24,countDownInterval=setInterval(function(){let currentTime=new Date().getTime(),timeDistance=date-currentTime,daysValue=Math.floor(timeDistance/day),hoursValue=Math.floor(timeDistance%day/hour),minutesValue=Math.floor(timeDistance%hour/minute),secondsValue=Math.floor(timeDistance%minute/second);CountDownElement.innerHTML=countDownItem(daysValue,window.countdown.days)+countDownItem(hoursValue,window.countdown.Hours)+countDownItem(minutesValue,window.countdown.minutes)+countDownItem(secondsValue,window.countdown.second),timeDistance<0&&clearInterval(countDownInterval)},1e3)}}}customElements.define("countdown-timer",DataCountdown);class ProductRecommendations extends HTMLElement{constructor(){super()}connectedCallback(){const handleIntersection=(entries,observer)=>{entries[0].isIntersecting&&(observer.unobserve(this),fetch(this.dataset.url).then(response=>response.text()).then(text=>{const html=document.createElement("div");html.innerHTML=text;const recommendations=html.querySelector("[grid-recommendation]");if(recommendations&&recommendations.innerHTML.trim().length&&(this.querySelector("[grid-recommendation]").innerHTML=recommendations.innerHTML),recommendations&&(recommendations.innerHTML.trim().length===0?this.parentElement.classList.add("no-js-inline"):this.children[0].classList.remove("no-js-inline")),html.querySelector(".product-grid-item")&&this.classList.add("product-recommendations--loaded"),this.dataset.intent=="complementary"){let complementaryProducts=new Swiper(this.querySelector(".complementory--slider"),{loop:!0,slidesPerView:1,spaceBetween:15,autoHeight:!0,pagination:{el:this.querySelector(".swiper-pagination"),clickable:!0},navigation:{nextEl:this.querySelector(".swiper-button-next"),prevEl:this.querySelector(".swiper-button-prev")}});this.querySelector(".complementary-slideshow--slider").classList.remove("no-js-inline"),this.querySelector("details")&&(this.querySelector("details").open=!0)}if(this.dataset.intent=="related"){let autoplay=!1,sliderAutoplay=this.dataset.autoplay,autoPlayValue=!1,autoPlayTime=parseInt(this.dataset.autoplayTime),sliderContainer=!0;sliderAutoplay=="true"&&(autoPlayValue={delay:autoPlayTime}),this.dataset.sliderEnable!=="true"&&(sliderContainer=!1);let relatedProducts=new Swiper(this.querySelector(".productSlider"),{loop:!0,slidesPerView:parseInt(this.dataset.showMobile),spaceBetween:30,autoplay:autoPlayValue,pagination:{el:this.querySelector(".swiper-pagination"),clickable:!0,type:"fraction"},navigation:{nextEl:this.querySelector(".swiper-button-next"),prevEl:this.querySelector(".swiper-button-prev")},breakpoints:{640:{slidesPerView:parseInt(this.dataset.showMobile)},750:{slidesPerView:parseInt(this.dataset.showMobile)},992:{slidesPerView:parseInt(this.dataset.showExtraLarge)}}});sliderContainer&&sliderAutoplay=="true"&&(this.querySelector(".productSlider").addEventListener("mouseenter",e=>{relatedProducts.autoplay.stop()}),this.querySelector(".productSlider").addEventListener("mouseleave",e=>{relatedProducts.autoplay.start()}));const slideThumbHeight=()=>{const proudctThumbnails=this.querySelector(".productSlider").querySelectorAll(".card--client-height");if(proudctThumbnails.length>0){const productThumbnailHeight=proudctThumbnails[0];this.querySelector(".productSlider").parentElement.style.setProperty("--slider-navigation-top-offset",`${productThumbnailHeight.clientHeight/2}px`)}};slideThumbHeight(),window.addEventListener("resize",()=>{slideThumbHeight()})}}).catch(e=>{console.error(e)}))};new IntersectionObserver(handleIntersection.bind(this),{rootMargin:"0px 0px 400px 0px"}).observe(this)}}customElements.define("product-recommendations",ProductRecommendations); //# sourceMappingURL=/cdn/shop/t/2/assets/global.js.map?v=38734537295787107581712183447