1function 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"))}function initEventSummary(wrapper){wrapper.querySelectorAll('[id^="Details-"] summary').forEach(summary=>{summary.setAttribute("role","button"),summary.setAttribute("aria-expanded",summary.parentNode.hasAttribute("open")),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)})}initEventSummary(document);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(wrapper=document,includeProductModel=!0){wrapper.querySelectorAll(".js-youtube").forEach(video=>{video.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),wrapper.querySelectorAll(".js-vimeo").forEach(video=>{video.contentWindow.postMessage('{"method":"pause"}',"*")}),wrapper.querySelectorAll("video:not(.video--background)").forEach(video=>video.pause()),includeProductModel&&wrapper.querySelectorAll("product-model").forEach(model=>{model.modelViewerUI&&model.modelViewerUI.pause()})}function updateProductMediaStatus(wrapper){wrapper.querySelectorAll(".product__media img").forEach(e=>{e.complete?addLoadedImageStatus(e):e.onload=()=>{addLoadedImageStatus(e)}})}function addLoadedImageStatus(image){const parentElement=image.parentElement;parentElement.classList.contains("loaded")||(parentElement.classList.add("loaded"),parentElement.nextElementSibling&&setTimeout(()=>parentElement.nextElementSibling.remove(),500))}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||event.code.toUpperCase()!=="ESCAPE")return;const openDetailsElement=event.target.closest("details[open]");if(!openDetailsElement)return;const summaryElement=openDetailsElement.querySelector("summary");openDetailsElement.removeAttribute("open"),summaryElement.setAttribute("aria-expanded",!1),summaryElement.focus()}
1function loadColorSwatches(){window.loadedBackgroundColorSwatches=!0,fetch(window.Shopify.routes.root+"?section_id=background-color-swatches").then(res=>res.text()).then(html=>{document.body.appendChild(getDomHtmlFromText(html,"style"))})}function debounce(fn,wait){let t;return(...args)=>{clearTimeout(t),t=setTimeout(()=>fn.apply(this,args),wait)}}function fetchConfig(type="json",method="POST"){return{method,headers:{"Content-Type":"application/json",Accept:`application/${type}`}}}function parseHtml(text){return new DOMParser().parseFromString(text,"text/html")}function getDomHtmlFromText(text,selector){return parseHtml(text).querySelector(selector)}function getInnerHtmlFromText(text,selector){return getDomHtmlFromText(text,selector).innerHTML}function closeDetailsInAnimation(detailsElement){let animationStart;const handleAnimation=time=>{animationStart===void 0&&(animationStart=time),time-animationStart<400?window.requestAnimationFrame(handleAnimation):(detailsElement.removeAttribute("open"),detailsElement.closest("details[open]")&&trapFocus(detail
1sElement.closest("details[open]"),detailsElement.querySelector("summary")))};window.requestAnimationFrame(handleAnimation)}function loadPhotoswipeLib(implementationCode){if(window.photoswipeUrls.loaded){const waitPhotoswipeLoaded=setInterval(()=>{typeof PhotoSwipeLightbox=="function"&&(clearInterval(waitPhotoswipeLoaded),implementationCode())},typeof PhotoSwipeLightbox=="function"?0:1e3);return}window.photoswipeUrls.loaded=!0;var scriptTag=document.createElement("script");scriptTag.src=window.photoswipeUrls.lib,scriptTag.onload=implementationCode,scriptTag.onreadystatechange=implementationCode,document.body.appendChild(scriptTag)}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;i<count;i++){var option=selector.options[i];if(value==option.value||value==option.innerHTML)return selector.selectedIndex=i,i}},Shopify.addListener=function(target,eventName,callback){target.addEventListener?target.addEventListener(eventName,callback,!1):target.attachEvent("on"+eventName,callback)},Shopify.postLink=function(path,options){options=options||{};var method=options.method||"post",params=options.parameters||{},form=document.createElement("form");form.setAttribute("method",method),form.setAttribute("action",path);for(var key in params){var hiddenField=document.createElement("input");hiddenField.setAttribute("type","hidden"),hiddenField.setAttribute("name",key),hiddenField.setAttribute("value",params[key]),form.appendChild(hiddenField)}document.body.appendChild(form),form.submit(),document.body.removeChild(form)},Shopify.CountryProvinceSelector=function(country_domid,province_domid,options){this.countryEl=document.getElementById(country_domid),this.provinceEl=document.getElementById(province_domid),this.provinceContainer=document.getElementById(options.hideElement||province_domid),Shopify.addListener(this.countryEl,"change",Shopify.bind(this.countryHandler,this)),this.initCountry(),this.initProvince()},Shopify.CountryProvinceSelector.prototype={initCountry:function(){var value=this.countryEl.getAttribute("data-default");Shopify.setSelectorByValue(this.countryEl,value),this.countryHandler()},initProvince:function(){var value=this.provinceEl.getAttribute("data-default");value&&this.provinceEl.options.length>0&&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<provinces.length;i++){var opt=document.createElement("option");opt.value=provinces[i][0],opt.innerHTML=provinces[i][1],this.provinceEl.appendChild(opt)}this.provinceContainer.style.display=""}},clearOptions:function(selector){for(;selector.firstChild;)selector.removeChild(selector.firstChild)},setOptions:function(selector,values){for(var i=0,count=values.length;i<values.length;i++){var opt=document.createElement("option");opt.value=values[i],opt.innerHTML=values[i],selector.appendChild(opt)}}},Shopify.formatMoney=function(t,e){function n(t2,e2){return t2===void 0?e2:t2}function o(t2,e2,o2,i2){if(e2=n(e2,2),o2=n(o2,","),i2=n(i2,"."),isNaN(t2)||t2==null)return 0;var r2=(t2=(t2/100).toFixed(e2)).split(".");return r2[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+o2)+(r2[1]?i2+r2[1]:"")}typeof t=="string"&&(t=t.replace(".",""));var i="",r=/\{\{\s*(\w+)\s*\}\}/,a=e||moneyFormat;switch(a.match(r)[1]){case"amount":i=o(t,2);break;case"amount_no_decimals":i=o(t,0);break;case"amount_with_comma_separator":i=o(t,2,".",",");break;case"amount_with_space_separator":i=o(t,2," ",",");break;case"amount_with_period_and_space_separator":i=o(t,2," ",".");break;case"amount_no_decimals_with_comma_separator":i=o(t,0,".",",");break;case"amount_no_decimals_with_space_separator":i=o(t,0," ");break;case"amount_with_apostrophe_separator":i=o(t,2,"'",".")}return a.replace(r,i)},Shopify.showPrice=function(price,noConvert=!1){return noConvert?Shopify.formatMoney(price):Shopify.formatMoney(price*Shopify.currency.rate)};class HTMLUpdateUtility{static viewTransition(oldNode,newContent,preProcessCallbacks=[],postProcessCallbacks=[],scrollY=null){preProcessCallbacks?.forEach(callback=>callback(newContent));const newNodeWrapper=document.createElement("div");HTMLUpdateUtility.setInnerHTML(newNodeWrapper,newContent.outerHTML);const newNode=newNodeWrapper.firstChild,uniqueKey=Date.now();oldNode.querySelectorAll("[id], [form]").forEach(element=>
1{element.id&&(element.id=`${element.id}-${uniqueKey}`),element.form&&element.setAttribute("form",`${element.form.getAttribute("id")}-${uniqueKey}`)}),oldNode.parentNode.insertBefore(newNode,oldNode),oldNode.style.display="none",postProcessCallbacks?.forEach(callback=>callback(newNode)),scrollY&&window.scrollTo(0,scrollY),setTimeout(()=>oldNode.remove(),500)}static setInnerHTML(element,html){element.innerHTML=html,HTMLUpdateUtility.reinjectsScripts(element)}static reinjectsScripts(element){element.querySelectorAll("script").forEach(oldScriptTag=>{const newScriptTag=document.createElement("script");Array.from(oldScriptTag.attributes).forEach(attribute=>{newScriptTag.setAttribute(attribute.name,attribute.value)}),newScriptTag.appendChild(document.createTextNode(oldScriptTag.innerHTML)),oldScriptTag.parentNode.replaceChild(newScriptTag,oldScriptTag)})}}class DrawerFixed extends HTMLElement{constructor(){super(),this.addEventListener("keyup",evt=>evt.code==="Escape"&&this.close(evt)),this.stickyHeader=document.querySelector("sticky-header")}open(triggeredBy){triggeredBy&&this.setActiveElement(triggeredBy),setTimeout(()=>{this.classList.add("animate","active")}),this.addEventListener("transitionend",()=>{const containerToTrapFocusOn=this.classList.contains("is-empty")?this.querySelector(".drawer__inner-empty"):this.classList.contains("drawer--cart")?document.getElementById("CartDrawer"):document.getElementById("QuickAddDrawer"),focusElement=this.querySelector(".drawer__inner")||this.querySelector(".drawer__close");trapFocus(containerToTrapFocusOn,focusElement)},{once:!0}),document.body.classList.add("open-drawer-fixed")}getSectionInnerHTML(html,selector=".shopify-section"){return getInnerHtmlFromText(html,selector)}getSectionDOM(html,selector=".shopify-section"){return getDomHtmlFromText(html,selector)}setActiveElement(element){this.activeElement=element}close(evt){this.classList.remove("active"),removeTrapFocus(this.activeElement),document.body.classList.remove("open-drawer-fixed"),setTimeout(()=>{document.body.dispatchEvent(new CustomEvent("drawerClosed"))},500)}}class ModalDialog extends HTMLElement{constructor(){super(),this.querySelector('[id^="ModalClose-"]').addEventListener("click",this.hide.bind(this,!1)),this.addEventListener("keyup",event=>{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===this&&this.hide()})}connectedCallback(){this.moved||(this.moved=!0,document.body.appendChild(this))}show(opener){this.removeAttribute("hidden"),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(){this.classList.add("closing"),setTimeout(()=>{document.body.classList.remove("overflow-hidden"),document.body.dispatchEvent(new CustomEvent("modalClosed")),this.removeAttribute("open"),removeTrapFocus(this.openedBy),window.pauseAllMedia(),this.classList.remove("closing")},600)}}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.dataset.modal);modal&&modal.show(button)})}}customElements.define("modal-opener",ModalOpener);class SliderComponent extends HTMLElement{constructor(){super()}connectedCallback(){this.init()}init(){this.slider=this.querySelector('[id^="Slider-"]'),this.sliderItems=this.querySelectorAll('[id^="Slide-"]'),this.enableSliderLooping=!1,this.currentPageElement=this.querySelector(".slider-counter--current"),this.pageTotalElement=this.querySelector(".slider-counter--total"),this.prevButton=this.dataset.outsidePrevButtonId!=null?this.closest('[id^="shopify-section"]').querySelector(`#${this.dataset.outsidePrevButtonId}`):this.querySelector('button[name="previous"]'),this.nextButton=this.dataset.outsideNextButtonId!=null?this.closest('[id^="shopify-section"]').querySelector(`#${this.dataset.outsideNextButtonId}`):this.querySelector('button[name="next"]'),this.isAutoplay=this.slider.dataset.autoplay==="true",this.autoplayButtonQuerySelector=".slider__autoplay",this.autoPlayPausedClass="slider__autoplay--paused",this.sliderControlButtons=this.querySelectorAll(".slider-counter__link"),this.slider&&(this.sliderFirstItemNode=this.slider.querySelector(".slider__slide"),this.initPages(),this.nextButton&&(this.onButtonClickHandler=this.onButtonClick.bind(this),this.prevButton.addEventListener("click",this.onButtonClickHandler),this.nextButton.addEventListener("click",this.onButtonClickHandler)),this.isAutoplay&&this.setAutoPlay(),this.sliderControlButtons&&(this.sliderControlLinksArray=Array.from(this.sliderControlButtons),this.sliderControlLinksArray.forEach(link=>link.addEventListener("click",this.linkToSlide.bind(this)))),window.addEventListener("resize",debounce(event=>{this.initPages()}),!0),this.slider.addEventListener("scroll",this.update.bind(this)))}disconnectedCallback(){this.nextButton&&(this.prevButton.removeEventListener("click",this.onButtonClickHandler),this.nextButton.removeEventListener("click",this.onButtonClickHandler))}initPages(){if(this.sliderItemsToShow=Array.from(this.sliderItems).filter(element=>element.clientWidth>0),this.sliderItemsToShow.length<2)return;this.sliderItemOffset=this.sliderItemsToShow[1].offsetLeft-this.sliderItemsToShow[0].offsetLeft;const slidersPerPageInFloat=(this.slider.clientWidth-this.sliderItemsToShow[0].offsetLeft)/this.sliderItemOffset;if(this.slidesPerPage=Math.ceil(slidersPerPageInFloat),this.totalPages=Math.ceil(this.sliderItemsToShow.length/this.slidesPerPage),this.sliderControlButtons.length){const limit=this.sliderItemsToShow.length-this.slidesPerPage;this.sliderControlButtons.forEach((link,indexLink)=>{link.classList.remove("hidden"),indexLink>=this.totalPages&&link.classList.add("hidden")})}this.update()}resetPages(){this.sliderItems=this.querySelectorAll('[id^="Slide-"]'),this.initPages()}update(){const previousPage=this.currentPage;this.currentPage=Math.round(this.slider.scrollLeft/this.sliderItemOffset)+1,this.currentPageElement&&this.pageTotalElement&&(this.currentPageElement.textContent=this.currentPage,this.pageTotalElement.textContent=this.totalPages),this.currentPage&&this.currentPage!=previousPage&&this.dispatchEvent(new CustomEvent("slideChanged",{detail:{currentPage:this.currentPage,currentElement:this.sliderItemsToShow[this.currentPage-1]}})),this.sliderControlButtons.length&&(this.sliderControlButtons.forEach(link=>{link.classList.remove("slider-counter__link--active"),link.removeAttribute("aria-current")}),this.sliderControlButtons[this.currentPage-1].classList.add("slider-counter__link--active"),this.sliderControlButtons[this.currentPage-1].setAttribute("aria-current",!0)),this.isAutoplay&&this.autoplayButtonIsSetToPlay&&this.play(),!(this.enableSliderLooping||!this.nextButton)&&(this.isSlideVisible(this.sliderItemsToShow[0])&&this.slider.scrollLeft===0?this.prevButton.setAttribute("disabled","disabled"):this.prevButton.removeAttribute("disabled"),this.isSlideVisible(this.sliderItemsToShow[this.sliderItemsToShow.length-1])?this.nextButton.setAttribute("disabled","disabled"):this.nextButton.removeAttribute("disabled"))}isSlideVisible(element,offset=0){const lastVisibleSlide=this.slider.clientWidth+this.slider.scrollLeft-offset;return element.offsetLeft+element.clientWidth-1<=lastVisibleSlide&&element.offsetLeft>=this.slider.scrollLeft}setAutoPlay(){this.sliderAutoplayButton=this.querySelector(this.autoplayButtonQuerySelector),this.autoplaySpeed=this.slider.dataset.speed*1e3,this.sliderAutoplayButton&&this.sliderAutoplayButton.addEventListener("click",this.autoPlayToggle.bind(this)),this.play(),this.autoplayButtonIsSetToPlay=!0}linkToSlide(event){event.preventDefault(),this.goToSlideByTarget(event.currentTarget)}goToSlideByTarget(target){const slideScrollPosition=this.slider.scrollLeft+this.sliderItemOffset*(this.sliderControlLinksArray.indexOf(target)+1-this.currentPage);this.slider.scrollTo({left:slideScrollPosition})}
1autoPlayToggle(){this.togglePlayButtonState(),this.autoplayButtonIsSetToPlay?this.pause():this.play(),this.autoplayButtonIsSetToPlay=!this.autoplayButtonIsSetToPlay}play(){this.slider.setAttribute("aria-live","off"),clearTimeout(this.autoplay),this.autoplay=setTimeout(this.autoRotateSlides.bind(this),this.autoplaySpeed)}pause(){this.slider.setAttribute("aria-live","polite"),clearTimeout(this.autoplay)}togglePlayButtonState(){this.sliderAutoplayButton&&(this.autoplayButtonIsSetToPlay?(this.sliderAutoplayButton.classList.remove(this.autoPlayPausedClass),this.sliderAutoplayButton.setAttribute("aria-label",window.accessibilityStrings.pauseSlideshow)):(this.sliderAutoplayButton.classList.add(this.autoPlayPausedClass),this.sliderAutoplayButton.setAttribute("aria-label",window.accessibilityStrings.playSlideshow)))}autoRotateSlides(){const slideScrollPosition=this.currentPage===this.sliderItems.length?0:this.slider.scrollLeft+this.sliderItemOffset;this.slider.scrollTo({left:slideScrollPosition})}onButtonClick(event){event.preventDefault();const step=event.currentTarget.dataset.step||1;if(this.slideScrollPosition=event.currentTarget.name==="next"?this.slider.scrollLeft+step*this.sliderItemOffset:this.slider.scrollLeft-step*this.sliderItemOffset,this.slider.scrollTo({left:this.slideScrollPosition}),this.enableSliderLooping){const isFirstSlide=this.currentPage===1,isLastSlide=this.currentPage===this.sliderItemsToShow.length;if(!isFirstSlide&&!isLastSlide)return;isFirstSlide&&event.currentTarget.name==="previous"?this.slideScrollPosition=this.slider.scrollLeft+this.sliderFirstItemNode.clientWidth*this.sliderItemsToShow.length:isLastSlide&&event.currentTarget.name==="next"&&(this.slideScrollPosition=0),this.slider.scrollTo({left:this.slideScrollPosition})}}}customElements.define("slider-component",SliderComponent);class VariantSelects extends HTMLElement{constructor(){super(),this.addEventListener("change",this.onVariantChange),this.sectionId=this.dataset.originalSection||this.dataset.section}onVariantChange(event){const target=this.getInputForEventTarget(event.target);this.publishChangeEvent(target)}getInputForEventTarget(target){return target.tagName==="SELECT"?target.selectedOptions[0]:target}get selectedOptionValues(){const valueIds=[];return this.querySelectorAll("select").forEach(select=>{valueIds.push(select.options[select.selectedIndex].dataset.optionValueId)}),valueIds}publishChangeEvent(target,recall=!1,customSelectedOptionValues=null){const params={sectionId:this.dataset.section,target,selectedOptionValues:customSelectedOptionValues||this.selectedOptionValues};recall&&(params.recallId=this.dataset.section),document.dispatchEvent(new CustomEvent("optionValueSelectionChange",{detail:params}))}autoCorrectAvailableVariant(newProductInfoNode){const newSelectedOptionValues=[];var findSelectedOptionValue,stopFinding=!1;newProductInfoNode.querySelectorAll(".product-form__input--variant-picker").forEach(fieldset=>{if(stopFinding==!1)if(fieldset.classList.contains("last"))findSelectedOptionValue=fieldset.querySelector('li:not(.hidden) input[type="radio"]:not(:checked), option:not(.hidden):not([selected])'),findSelectedOptionValue||(findSelectedOptionValue=fieldset.querySelector('li:not(.hidden) input[type="radio"]:checked, option:not(.hidden)[selected]')),newSelectedOptionValues.push(findSelectedOptionValue.dataset.optionValueId);else{const currentSelectedOptionValue=fieldset.querySelector('li:not(.hidden) input[type="radio"]:checked, option:not(.hidden)[selected]');if(currentSelectedOptionValue)newSelectedOptionValues.push(currentSelectedOptionValue.dataset.optionValueId);else{const altCurrentSelectedOptionValue=fieldset.querySelector('li:not(.hidden) input[type="radio"], option:not(.hidden)');newSelectedOptionValues.push(altCurrentSelectedOptionValue.dataset.optionValueId),stopFinding=!0}}else{const currentSelectedOptionValue=fieldset.querySelector('li input[type="radio"]:checked, option[selected]');newSelectedOptionValues.push(currentSelectedOptionValue.dataset.optionValueId),fieldset.classList.contains("last")&&(findSelectedOptionValue=currentSelectedOptionValue)}}),this.publishChangeEvent(document.getElementById(findSelectedOptionValue.id),!0,newSelectedOptionValues)}}customElements.define("variant-selects",VariantSelects);class VariantRadios extends VariantSelects{constructor(){super()}
1connectedCallback(){this.loadBackgroundColorSwatches()}get selectedOptionValues(){return Array.from(this.querySelectorAll('input[type="radio"]:checked')).map(({dataset})=>dataset.optionValueId)}loadBackgroundColorSwatches(){!window.loadedBackgroundColorSwatches&&this.querySelectorAll(".product-form__input__radio-label--color").length>0&&loadColorSwatches()}}customElements.define("variant-radios",VariantRadios);const deferredMediaObserver=new IntersectionObserver((entries,observer)=>{entries.forEach(entry=>{entry.isIntersecting?entry.target.loadContent(!1):entry.target.pause()})});class DeferredMedia extends HTMLElement{constructor(){if(super(),this.dataset.ignore)return;this.isPlaying=!1;const poster=this.querySelector('[id^="Deferred-Poster-"]');poster&&(poster.addEventListener("click",this.loadContent.bind(this)),this.dataset.autoplay&&deferredMediaObserver.observe(this))}loadContent(focus=!0,play=!1){if(!this.deferredElement)if(this.hasAttribute("loaded"))this.deferredElement=this.querySelector("video, model-viewer, iframe");else{const content=document.createElement("div");content.appendChild(this.querySelector("template").content.firstElementChild.cloneNode(!0)),this.setAttribute("loaded",!0),this.deferredElement=this.appendChild(content.querySelector("video, model-viewer, iframe"))}this.deferredElement&&(focus&&this.deferredElement.focus(),(this.deferredElement.getAttribute("autoplay")||this.dataset.autoplay||play)&&this.play())}play(){this.isPlaying||(this.deferredElement.nodeName=="VIDEO"?this.deferredElement.play():this.deferredElement.classList.contains("js-youtube")?this.deferredElement.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*"):this.deferredElement.classList.contains("js-vimeo")&&this.deferredElement.contentWindow.postMessage('{"method":"play"}',"*"),this.isPlaying=!0)}pause(){this.deferredElement&&this.isPlaying&&(window.pauseAllMedia(this),this.isPlaying=!1)}}customElements.define("deferred-media",DeferredMedia);class BtStorageUtil{static set(key,value,isSession){isSession?sessionStorage.setItem(`bt-${key}`,typeof value=="object"?JSON.stringify(value):value):localStorage.setItem(`bt-${key}`,typeof value=="object"?JSON.stringify(value):value)}static get(key,isJson,isSession){const value=isSession?sessionStorage.getItem(`bt-${key}`):localStorage.getItem(`bt-${key}`);return isJson?JSON.parse(value):value}static remove(key,isSession){isSession?sessionStorage.removeItem(`bt-${key}`):localStorage.removeItem(`bt-${key}`)}} 2//# sourceMappingURL=/cdn/shop/t/196/assets/critical-global.js.map?v=54862466309778827161741240024
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.