PageSourceSearch

https://www.beeswrap.com/cdn/shop/t/91/assets/global.js?v=137427769635658576271783976501

js beeswrap.com collected 2026-09-24 17:18:00 UTC 63,722 bytes, 9 lines download raw bytes

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"))}document.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)});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(),elementToFocus.tagName==="INPUT"&&["search","text","email","url"].includes(elementToFocus.type)&&elementToFocus.value&&elementToFocus.setSelectionRange(0,elementToFocus.value.length)}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&&currentFocusedElement.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.setAttribute("aria-expanded",!1),summaryElement.focus()}class QuantityInput extends HTMLElement{constructor(){super(),this.input=this.querySelector("input"),this.changeEvent=ne
1w Event("change",{bubbles:!0}),this.input.addEventListener("change",this.onInputChange.bind(this)),this.querySelectorAll("button").forEach(button=>button.addEventListener("click",this.onButtonClick.bind(this)))}quantityUpdateUnsubscriber=void 0;connectedCallback(){this.validateQtyRules(),this.quantityUpdateUnsubscriber=subscribe(PUB_SUB_EVENTS.quantityUpdate,this.validateQtyRules.bind(this))}disconnectedCallback(){this.quantityUpdateUnsubscriber&&this.quantityUpdateUnsubscriber()}onInputChange(event){this.validateQtyRules()}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)}validateQtyRules(){const value=parseInt(this.input.value);if(this.input.min){const min=parseInt(this.input.min);this.querySelector(".quantity-button[name='minus']").classList.toggle("disabled",value<=min)}if(this.input.max){const max=parseInt(this.input.max);this.querySelector(".quantity-button[name='plus']").classList.toggle("disabled",value>=max)}}}customElements.define("quantity-input",QuantityInput);function debounce(fn,wait){let t;return(...args)=>{clearTimeout(t),t=setTimeout(()=>fn.apply(this,args),wait)}}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;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)}}};class MenuDrawer extends HTMLElement{constructor(){super(),this.mainDetailsToggle=this.querySelector("details"),this.addEventListener("keyup",this.onKeyUp.bind(this)),this.addEventListener("focusout",this.onFocusOut.bind(this)),this.bindEvents()}bindEvents(){this.querySelectorAll("summary").forEach(summary=>summary.addEventListener("click",this.onSummaryClick.bind(this))),this.querySelectorAll(".menu-drawer-close-button").forEach(button=>button.addEventListener("click",this.onCloseButtonClick.bind(this)))}onKeyUp(event){if(event.code.toUpperCase()!=="ESCAPE")return;const openDetailsElement=event.target.closest("details[open]");openDetailsElement&&(openDetailsElement===this.mainDetailsToggle?this.closeMenuDrawer(event,this.mainDetailsToggle.querySelector("summary")):this.closeSubmenu(openDetailsElement))}onSummaryClick(event){const summaryElement=event.currentTarget,detailsElement=summaryElement.parentNode,parentMenuElement=detailsElement.closest(".has-submenu"),isOpen=detailsElement.hasAttribute("open"),reducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)");function addTrapFocus(){trapFocus(summaryElement.nextElementSibling,detailsElement.querySelector("button")),summaryElement.nextElementSibling.removeEventListener("transitionend",addTrapFocus)}detailsElement===this.mainDetailsToggle?(isOpen&&event.preventDefault(),isOpen?this.closeMenuDrawer(event,summaryElement):this.openMenuDrawer(summaryElement),window.matchMedia("(max-width: 990px)")&&document.documentElement.style.setProperty("--viewport-height",`${window.innerHeight}px`)):setTimeout(()=>{detailsElement.classList.add("menu-opening"),summaryElement.setAttribute("aria-expanded",!0),parentMenuElement&&parentMenuElement.classList.add("submenu-open"),!reducedMotion||reducedMotion.matches?addTrapFocus():summaryElement.nextElementSibling.addEventListener("transitionend",addTrapFocus)},100)}openMenuDrawer(summaryElement){setTimeout(()=>{this.mainDetailsToggle.classList.add("menu-opening")}),summaryElement.setAttribute("aria-expanded",!0),trapFocus(this.mainDetailsToggle,summaryElement),document.body.classList.add(`overflow-hidden-${this.dataset.breakpoint}`),window.matchMedia("(min-width: 768px)").matches&&(document.body.style.overflow="hidden",document.body.style.padding="0 4px 0 0"),this.querySelectorAll("[data-aos]").forEach(element=>{element.classList.add("aos-animate")})}closeMenuDrawer(event,elementToFocus=!1){if(event===void 0)return;this.mainDetailsToggle.classList.remove("menu-opening"),this.mainDetailsToggle.querySelectorAll("details").forEach(detail
1s=>{details.removeAttribute("open"),details.classList.remove("menu-opening")}),this.mainDetailsToggle.querySelectorAll(".submenu-open").forEach(submenu=>{submenu.classList.remove("submenu-open")}),document.body.classList.remove(`overflow-hidden-${this.dataset.breakpoint}`),removeTrapFocus(elementToFocus),this.closeAnimation(this.mainDetailsToggle),window.matchMedia("(min-width: 768px)").matches&&setTimeout(()=>{document.body.style.overflow="scroll",document.body.style.padding="0",document.body.style.overflowX="hidden"},100),this.querySelectorAll(".aos-animate").forEach(element=>{element.classList.remove("aos-animate")})}onFocusOut(event){setTimeout(()=>{this.mainDetailsToggle.hasAttribute("open")&&!this.mainDetailsToggle.contains(document.activeElement)&&this.closeMenuDrawer()})}onCloseButtonClick(event){const detailsElement=event.currentTarget.closest("details");this.closeSubmenu(detailsElement)}closeSubmenu(detailsElement){const parentMenuElement=detailsElement.closest(".submenu-open");parentMenuElement&&parentMenuElement.classList.remove("submenu-open"),detailsElement.classList.remove("menu-opening"),detailsElement.querySelector("summary").setAttribute("aria-expanded",!1),removeTrapFocus(detail
1sElement.querySelector("summary")),this.closeAnimation(detailsElement)}closeAnimation(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(detailsElement.closest("details[open]"),detailsElement.querySelector("summary")))};window.requestAnimationFrame(handleAnimation)}}customElements.define("menu-drawer",MenuDrawer);class HeaderDrawer extends MenuDrawer{constructor(){super()}openMenuDrawer(summaryElement){this.header=this.header||document.querySelector(".section-header"),this.borderOffset=this.borderOffset||this.closest(".header-wrapper").classList.contains("header-wrapper--border-bottom")?1:0,document.documentElement.style.setProperty("--header-bottom-position",`${parseInt(this.header.getBoundingClientRect().bottom-this.borderOffset)}px`),this.header.classList.add("menu-open"),setTimeout(()=>{this.mainDetailsToggle.classList.add("menu-opening")}),summaryElement.setAttribute("aria-expanded",!0),trapFocus(this.mainDetailsToggle,summaryElement),document.body.classList.add(`overflow-hidden-${this.dataset.breakpoint}`)}closeMenuDrawer(event,elementToFocus){super.closeMenuDrawer(event,elementToFocus),this.header.classList.remove("menu-open")}}customElements.define("header-drawer",HeaderDrawer);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.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"),document.body.dispatchEvent(new CustomEvent("modalClosed")),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))}connectedCallback(){const slide=this.closest("li");if(!slide)return;const shouldAutoplay=this.dataset.autoplay==="true";shouldAutoplay&&slide.classList.contains("is-active")&&(this.loadContent(!1),this.autoplayVideo()),this.slideObserver=new MutationObserver(()=>{shouldAutoplay&&(slide.classList.contains("is-active")?(this.hasAttribute("loaded")||this.loadContent(!1),this.autoplayVideo()):this.pauseMedia())}),this.slideObserver.observe(slide,{attributes:!0,attributeFilter:["class"]})}disconnectedCallback(){this.slideObserver&&this.slideObserver.disconnect()}loadContent(focus=!0){if(window.pauseAllMedia(),!this.hasAttribute("loaded")){const content=document.createElement("div");content.appendChild(this.querySelector("template").content.firstElementChild.cloneNode(!0)),this.setAttribute("loaded",!0),this.media=this.appendChild(content.querySelector("video, model-viewer, iframe")),focus&&this.media.focus()}}autoplayVideo(){if(this.media&&this.media.tagName==="VIDEO"){this.media.muted=!0,this.media.playsInline=!0;const playPromise=this.media.play();playPromise!==void 0&&playPromise.catch(()=>{})}}pauseMedia(){this.media&&(this.media.tagName==="VIDEO"&&(this.media.pause(),this.media.currentTime=0),this.media.tagName==="IFRAME"&&window.pauseAllMedia?.())}}customElements.define("deferred-media",DeferredMedia);class SliderComponent extends HTMLElement{constructor(){if(super(),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.querySelector('button[name="previous"]'),this.nextButton=this.querySelector('button[name="next"]'),!this.slider||!this.nextButton)return;this.initPages(),new ResizeObserver(entries=>this.initPages()).observe(this.slider),this.slider.addEventListener("scroll",this.update.bind(this)),this.prevButton.addEventListener("click",this.onButtonClick.bind(this)),this.nextButton.addEventListener("click",this.onButtonClick.bind(this))}initPages(){this.sliderItemsToShow=Array.from(this.sliderItems).filter(element=>element.clientWidth>0),!(this.sliderItemsToShow.length<2)&&(this.sliderItemOffset=this.sliderItemsToShow[1].offsetLeft-this.sliderItemsToShow[0].offsetLeft,this.slidesPerPage=Math.floor((this.slider.clientWidth-this.sliderItemsToShow[0].offsetLeft)/this.sliderItemOffset),this.totalPages=this.sliderItemsToShow.length-this.slidesPerPage+1,this.update())}resetPages(){this.sliderItems=this.querySelectorAll('[id^="Slide-"]'),this.initPages()}update(){if(!this.slider||!this.nextButton)return;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!=previousPage&&this.dispatchEvent(new CustomEvent("slideChanged",{detail:{currentPage:this.currentPage,currentElement:this.sliderItemsToShow[this.currentPage-1]}})),!this.enableSliderLooping&&(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<=lastVisibleSlide&&element.offsetLeft>=this.slider.scrollLeft}onButtonClick(event){event.preventDefault();const step=event.currentTarget.dataset.step||1;this.slideScrollPosition=event.currentTarget.name==="next"?this.slider.scrollLeft+step*this.sliderItemOffset:this.slider.scrollLeft-step*this.sliderItemOffset,this.slider.scrollTo({left:this.slideScrollPosition})}}customElements.define("slider-component",SliderComponent);class SlideshowComponent extends SliderComponent{constructor(){super(),this.sliderControlWrapper=this.querySelector(".slider-buttons"),this.enableSliderLooping=!0,this.sliderControlWrapper&&(this.sliderFirstItemNode=this.slider.querySelector(".slideshow-slide"),this.sliderItemsToShow.length>0&&(this.currentPage=1),this.sliderControlLinksArray=Array.from(this.sliderControlWrapper.querySelectorAll(".slider-counter-link")),this.sliderControlLinksArray.forEach(link=>link.addEventListener("click",this.linkToSlide.bind(this))),this.slider.addEventListener("scroll",this.setSlideVisibility.bind(this)),this.setSlideVisibility(),this.slider.getAttribute("data-autoplay")==="true"&&this.setAutoPlay())}setAutoPlay(){this.sliderAutoplayButton=this.querySelector(".slideshow-autoplay"),this.autoplaySpeed=this.slider.dataset.speed*1e3,this.sliderAutoplayButton.addEventListener("click",this.autoPlayToggle.bind(this)),this.addEventListener("mouseover",this.focusInHandling.bind(this)),this.addEventListener("mouseleave",this.focusOutHandling.bind(this)),this.addEventListener("focusin",this.focusInHandling.bind(this)),this.addEventListener("focusout",this.focusOutHandling.bind(this)),this.play(),this.autoplayButtonIsSetToPlay=!0}onButtonClick(event){super.onButtonClick(event);const isFirstSlide=this.currentPage===1,isLastSlide=this.currentPage===this.sliderItemsToShow.length;!isFirstSlide&&!isLastSlide||(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}))}
1update(){super.update(),this.sliderControlButtons=this.querySelectorAll(".slider-counter-link"),this.prevButton.removeAttribute("disabled"),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))}autoPlayToggle(){this.togglePlayButtonState(this.autoplayButtonIsSetToPlay),this.autoplayButtonIsSetToPlay?this.pause():this.play(),this.autoplayButtonIsSetToPlay=!this.autoplayButtonIsSetToPlay}focusOutHandling(event){const focusedOnAutoplayButton=event.target===this.sliderAutoplayButton||this.sliderAutoplayButton.contains(event.target);!this.autoplayButtonIsSetToPlay||focusedOnAutoplayButton||this.play()}focusInHandling(event){(event.target===this.sliderAutoplayButton||this.sliderAutoplayButton.contains(event.target))&&this.autoplayButtonIsSetToPlay?this.play():this.autoplayButtonIsSetToPlay&&this.pause()}play(){this.slider.setAttribute("aria-live","off"),clearInterval(this.autoplay),this.autoplay=setInterval(this.autoRotateSlides.bind(this),this.autoplaySpeed)}pause(){this.slider.setAttribute("aria-live","polite"),clearInterval(this.autoplay)}togglePlayButtonState(pauseAutoplay){pauseAutoplay?(this.sliderAutoplayButton.classList.add("slideshow-autoplay--paused"),this.sliderAutoplayButton.setAttribute("aria-label",window.accessibilityStrings.playSlideshow)):(this.sliderAutoplayButton.classList.remove("slideshow-autoplay--paused"),this.sliderAutoplayButton.setAttribute("aria-label",window.accessibilityStrings.pauseSlideshow))}autoRotateSlides(){const slideScrollPosition=this.currentPage===this.sliderItems.length?0:this.slider.scrollLeft+this.slider.querySelector(".slideshow-slide").clientWidth;this.slider.scrollTo({left:slideScrollPosition,behavior:"smooth"})}setSlideVisibility(){this.sliderItemsToShow.forEach((item,index)=>{const linkElements=item.querySelectorAll("a");index===this.currentPage-1?(linkElements.length&&linkElements.forEach(button=>{button.removeAttribute("tabindex")}),item.setAttribute("aria-hidden","false"),item.removeAttribute("tabindex"),item.classList.add("active")):(linkElements.length&&linkElements.forEach(button=>{button.setAttribute("tabindex","-1")}),item.setAttribute("aria-hidden","true"),item.setAttribute("tabindex","-1"),item.classList.remove("active"))})}linkToSlide(event){event.preventDefault();const slideScrollPosition=this.slider.scrollLeft+this.sliderFirstItemNode.clientWidth*(this.sliderControlLinksArray.indexOf(event.currentTarget)+1-this.currentPage);this.slider.scrollTo({left:slideScrollPosition,behavior:"smooth"})}}customElements.define("slideshow-component",SlideshowComponent);class VariantSelects extends HTMLElement{constructor(){super(),this.onVariantChange=this.onVariantChange.bind(this),this._debouncedChange=debounce(this.onVariantChange,50),this.addEventListener("change",this._debouncedChange),this._aborter=null}get sectionId(){return this.dataset.originalSection||this.dataset.section||this.dataset.sectionId}getSelectedOptionValueIds(){const selects=this.querySelectorAll('select[name^="options["]'),ids=[];return selects.forEach(sel=>{const opt=sel.selectedOptions&&sel.selectedOptions[0],id=opt&&opt.dataset.optionValueId;id&&ids.push(id)}),this.querySelectorAll('input[type="radio"][name^="options["]:checked').forEach(r=>{const id=r.dataset.optionValueId;id&&!ids.includes(id)&&ids.push(id)}),Array.from(new Set(ids.filter(Boolean)))}buildSectionUrl(optionValueIds){const url=new URL(this.dataset.url,window.location.origin);return url.searchParams.set("section_id",this.sectionId),optionValueIds.length?url.searchParams.set("option_values",optionValueIds.join(",")):url.searchParams.delete("option_values"),url.toString()}async fetchSectionHTML(url){this._aborter&&this._aborter.abort(),this._aborter=new AbortController;const res=await fetch(url,{headers:{"X-Requested-With":"XMLHttpRequest"},signal:this._aborter.signal});if(!res.ok)throw new Error(`Section fetch failed: ${res.status}`);return await res.text()}parseHTML(html){return new DOMParser().parseFromString(html,"text/html")}replacePickerFrom(doc){const currentId=this.getAttribute("id")||"",sourceId=currentId.replace("quickadd-",""),source=doc.getElementById(sourceId);if(!source)return;if(!!(this.closest("quick-add-modal")||this.dataset.originalSection||currentId.startsWith("quickadd-"))){const baseSectionId=this.dataset.originalSection||this.dataset.section||this.dataset.sectionId,fixedHTML=source.innerHTML.split(baseSectionId).join(`quickadd-${baseSectionId}`);this.innerHTML=fixedHTML}else this.innerHTML=source.innerHTML}replaceInnerById(doc,id){if(!id)return;const inQuick=!!(this.closest("quick-add-modal")||this.dataset.originalSection),baseSectionId=this.dataset.originalSection||this.dataset.section||this.dataset.sectionId,scope=this.closest("quick-add-modal")||document,src=doc.getElementById(id);if(!src)return;let dest=null;if(scope!==document){const quickId=id.replace(this.sectionId,`quickadd-${this.sectionId}`);dest=scope.querySelector(`#${CSS.escape(quickId)}`)||scope.querySelector(`#${CSS.escape(id)}`)}else dest=document.getElementById(id);if(dest){if(inQuick&&baseSectionId){const fixedHTML=src.innerHTML.split(baseSectionId).join(`quickadd-${baseSectionId}`);dest.innerHTML=fixedHTML}else dest.innerHTML=src.innerHTML;id.startsWith("price-")&&dest.setAttribute("aria-live","polite")}}replaceElementById(doc,id){if(!id)return;const inQuick=!!(this.closest("quick-add-modal")||this.dataset.originalSection),baseSectionId=this.dataset.originalSection||this.dataset.section||this.dataset.sectionId,scope=this.closest("quick-add-modal")||document,src=doc.getElementById(id);if(!src)return;let dest=null;if(scope!==document){const quickId=id.replace(this.sectionId,`quickadd-${this.sectionId}`);dest=scope.querySelector(`#${CSS.escape(quickId)}`)||scope.querySelector(`#${CSS.escape(id)}`)}else dest=document.getElementById(id);if(!dest)return;let clone=src.cloneNode(!0);if(inQuick&&baseSectionId){const tmp=document.createElement("div");tmp.innerHTML=clone.outerHTML.split(baseSectionId).join(`quickadd-${baseSectionId}`),clone=tmp.firstElementChild}dest.replaceWith(clone)}updateHiddenVariantIdFrom(doc){const scope=this.closest("quick-add-modal")||document;let form=scope.getElementById?scope.getElementById(`product-form-${this.sectionId}`):scope.querySelector(`#product-form-${this.sectionId}, #product-form-quickadd-${this.sectionId}`);if(form||(form=scope.querySelector(`#product-form-quickadd-${this.sectionId}`)),!form)return null;const srcForm=doc.getElementById(`product-form-${this.sectionId}`);if(!srcForm)return null;const destInput=form.querySelector('input[name="id"]'),srcInput=srcForm.querySelector('input[name="id"]');return destInput&&srcInput?(destInput.value=srcInput.value||"",destInput.dispatchEvent(new Event("change",{bubbles:!0})),destInput.value||null):null}updateURL(optionValueIds){if(this.dataset.updateUrl==="false")return;const url=new URL(window.location.href);optionValueIds.length?url.searchParams.set("option_values",optionValueIds.join(",")):url.searchParams.delete("option_values"),window.history.replaceState({},"",url.toString())}toggleAddButton(disable=!0,text){const scope=this.closest("quick-add-modal")||document,form=scope.getElementById&&(scope.getElementById(`product-form-${this.sectionId}`)||scope.getElementById(`product-form-quickadd-${this.sectionId}`))||scope.querySelector?.(`#product-form-${this.sectionId}, #product-form-quickadd-${this.sectionId}`);if(!form)return;const addButton=form.querySelector('[name="add"], [type="submit"]');if(!addButton)return;const addButtonText=addButton.querySelector("span");disable?(addButton.setAttribute("disabled","disabled"),addButton.setAttribute("aria-disabled","true"),addButtonText&&text&&(addButtonText.textContent=text)):(addButton.removeAttribute("disabled"),addButton.removeAttribute("aria-disabled"),addButtonText&&(addButtonText.textContent=window.variantStrings.addToCart))}setUnavailable(){const scope=this.closest("quick-add-modal")||document,form=scope.getElementById&&(scope.getElementById(`product-form-${this.sectionId}`)||scope.getElementById(`product-form-quickadd-${this.sectionId}`))||scope.querySelector?.(`#product-form-${this.sectionId}, #product-form-quickadd-${this.sectionId}`);if(!form)return;const addButton=form.querySelector('[name="add"], [type="submit"]'),addButtonText=addButton&&addButton.querySelector("span"),price=scope.getElementById?scope.getElementById(`price-${this.sectionId}`)||scope.getElementById(`price-quickadd-${this.sectionId}`):scope.querySelector?.(`#price-${this.sectionId}, #price-quickadd-${this.sectionId}`),inventory=scope.getElementById?scope.getElementById(`Inventory-${this.sectionId}`)||scope.getElementById(`Inventory-quickadd-${this.sectionId}`):scope.querySelector?.(`#Inventory-${this.sectionId}, #Inventory-quickadd-${this.sectionId}`),sku=scope.getElementById?scope.getElementById(`Sku-${this.sectionId}`)||scope.getElementById(`Sku-quickadd-${this.sectionId}`):scope.querySelector?.(`#Sku-${this.sectionId}, #Sku-quickadd-${this.sectionId}`);addButtonText&&(addButtonText.textContent=window.variantStrings.unavailable),addButton&&(addButton.setAttribute("disabled","disabled"),addButton.setAttribute("aria-disabled","true")),price&&price.classList.add("visibility-hidden"),inventory&&inventory.classList.add("visibility-hidden"),sku&&sku.classList.add("visibility-hidden")}updatePickupAvailability(variantId){const pickUpAvailability=(this.closest("quick-add-modal")||document).querySelector("pickup-availability");pickUpAvailability&&(variantId?pickUpAvailability.fetchAvailability(variantId):(pickUpAvailability.removeAttribute("available"),pickUpAvailability.innerHTML=""))}updateSelectedSwatchValue({target}){const{name,value,tagName}=target;if(tagName==="SELECT"&&target.selectedOptions.length){const swatchValue=target.selectedOptions[0].dataset.optionSwatchValue,selectedDropdownSwatchValue=this.querySelector(`[data-selected-dropdown-swatch="${name}"] > .swatch`);if(!selectedDropdownSwatchValue)return;swatchValue?(selectedDropdownSwatchValue.style.setProperty("--swatch--background",swatchValue),selectedDropdownSwatchValue.classList.remove("swatch--unavailable")):(selectedDropdownSwatchValue.style.setProperty("--swatch--background","unset"),selectedDropdownSwatchValue.classList.add("swatch--unavailable"))}else if(tagName==="INPUT"&&target.type==="radio"){const selectedSwatchValue=this.querySelector(`[data-selected-swatch-value="${name}"]`);selectedSwatchValue&&(selectedSwatchValue.innerHTML=value)}}async onVariantChange(event){const form=(this.closest("quick-add-modal")||document).querySelector(`#product-form-${this.sectionId}, #product-form-quickadd-${this.sectionId}`);form?.setAttribute("aria-busy","true"),form?.classList.add("is-loading");try{this.toggleAddButton(!0,""),this.updateSelectedSwatchValue(event);const optionValueIds=this.getSelectedOptionValueIds(),url=this.buildSectionUrl(optionValueIds),html=await this.fetchSectionHTML(url),doc=this.parseHTML(html);this.replacePickerFrom(doc),this.replaceInnerById(doc,`price-${this.sectionId}`),this.replaceInnerById(doc,`Sku-${this.sectionId}`),this.replaceInnerById(doc,`Inventory-${this.sectionId}`),this.replaceInnerById(doc,`DiscountBadge-${this.sectionId}`),window.pauseAllMedia&&window.pauseAllMedia(),this.replaceElementById(doc,`MediaGallery-${this.sectionId}`);const currentVariantId=this.updateHiddenVariantIdFrom(doc);currentVariantId&&(this.closest("quick-add-modal")||document).querySelectorAll(`#price-${this.sectionId}, #price-quickadd-${this.sectionId},
2            #Inventory-${this.sectionId}, #Inventory-quickadd-${this.sectionId},
3            #Sku-${this.sectionId}, #Sku-quickadd-${this.sectionId}`).forEach(el=>el?.classList?.remove("visibility-hidden"));const addButtonUpdated=doc.getElementById(`ProductSubmitButton-${this.sectionId}`);this.toggleAddButton(addButtonUpdated?addButtonUpdated.hasAttribute("disabled"):!0,window.variantStrings.soldOut),this.updateURL(optionValueIds),this.updatePickupAvailability(currentVariantId),this.updateShareUrl(
3optionValueIds,currentVariantId),window.publish&&window.PUB_SUB_EVENTS?.variantChange&&window.publish(window.PUB_SUB_EVENTS.variantChange,{data:{sectionId:this.sectionId,optionValueIds,variantId:currentVariantId}}),currentVariantId||this.setUnavailable()}catch(e){console.error(e),this.setUnavailable()}finally{form?.removeAttribute("aria-busy"),form?.classList.remove("is-loading")}}updateShareUrl(optionValueIds,variantId){const scope=this.closest("quick-add-modal")||document,shareButton=scope.getElementById?scope.getElementById(`Share-${this.sectionId}`)||scope.getElementById(`Share-quickadd-${this.sectionId}`):scope.querySelector?.(`#Share-${this.sectionId}, #Share-quickadd-${this.sectionId}`);if(!shareButton||!shareButton.updateUrl)return;const url=new URL(this.dataset.url,window.location.origin);optionValueIds?.length?url.searchParams.set("option_values",optionValueIds.join(",")):variantId&&url.searchParams.set("variant",variantId),shareButton.updateUrl(url.toString())}}customElements.define("variant-selects",VariantSelects);class VariantRadios extends VariantSelects{constructor(){super()}setInputAvailability(listOfOptions,listOfAvailableOptions){listOfOptions.forEach(input=>{listOfAvailableOptions.includes(input.getAttribute("value"))?input.classList.remove("disabled"):input.classList.add("disabled")})}updateOptions(){const fieldsets=Array.from(this.querySelectorAll("fieldset"));this.options=fieldsets.map(fieldset=>Array.from(fieldset.querySelectorAll("input")).find(radio=>radio.checked).value)}}customElements.define("variant-radios",VariantRadios);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("product-recommendations");recommendations&&recommendations.innerHTML.trim().length&&(this.innerHTML=recommendations.innerHTML),!this.querySelector("slideshow-component")&&this.classList.contains("complementary-products")&&this.remove(),html.querySelector(".grid-item")&&this.classList.add("product-recommendations--loaded")}).catch(e=>{console.error(e)}))};new IntersectionObserver(handleIntersection.bind(this),{rootMargin:"0px 0px 400px 0px"}).observe(this)}}customElements.define("product-recommendations",ProductRecommendations);class ComparisonSlider extends HTMLElement{constructor(){super(),this.active=!1,this.button=this.querySelector("button"),this.horizontal=this.dataset.layout==="horizontal",this.bodyStyleOverflowY=document.body.style.overflowY,this.init(),this.observer=new IntersectionObserver(entries=>{entries.forEach(entry=>{entry.isIntersecting&&(this.animateOnLoad(),this.observer.disconnect())})}),this.observer.observe(this)}init(){this.button.addEventListener("touchstart",this.startHandler.bind(this)),document.body.addEventListener("touchend",this.endHandler.bind(this)),document.body.addEventListener("touchmove",this.onHandler.bind(this)),this.button.addEventListener("mousedown",this.startHandler.bind(this)),document.body.addEventListener("mouseup",this.endHandler.bind(this)),document.body.addEventListener("mousemove",this.onHandler.bind(this))}animateOnLoad(){let percent=0;const targetPercent=50,speed=1,animate=()=>{percent+=speed,this.style.setProperty("--percent",percent+"%"),percent<targetPercent?requestAnimationFrame(animate):this.style.setProperty("--percent",targetPercent+"%")};requestAnimationFrame(animate)}startHandler(){window.innerWidth<=750&&(document.body.style.overflowY="hidden"),this.active=!0,this.classList.add("scrolling")}endHandler(){this.active=!1,this.classList.remove("scrolling"),document.body.style.overflowY=this.bodyStyleOverflowY}onHandler(e){if(!this.active)return;const event=e.touches&&e.touches[0]||e,x=this.horizontal?event.pageX-this.offsetLeft:event.pageY-this.offsetTop;this.scrollIt(x)}scrollIt(x){const distance=this.horizontal?this.clientWidth:this.clientHeight,max=distance-20,mousePercent=Math.max(20,Math.min(x,max))*100/distance;this.style.setProperty("--percent",mousePercent+"%")}}customElements.define("comparison-slider",ComparisonSlider);class CollapsibleRow extends HTMLElement{constructor(){super(),this.details=this.querySelector("details"),this.summary=this.querySelector("summary"),this.content=this.querySelector(".collapsible__content"),this.animation=null,this.isClosing=!1,this.isExpanding=!1}connectedCallback(){this.setListeners()}setListeners(){this.listenerAdded||(this.querySelector("summary").addEventListener("click",e=>this.onClick(e)),this.listenerAdded=!0)}onClick(e){e.preventDefault(),e.stopPropagation(),this.details.style.overflow="hidden",!(this.isClosing||this.isExpanding)&&(this.details.open?this.shrink():this.open())}shrink(){this.isClosing=!0;const startHeight=`${this.details.offsetHeight}px`,endHeight=`${this.summary.offsetHeight}px`;this.animation&&this.animation.cancel(),this.animation=this.details.animate({height:[startHeight,endHeight]},{duration:300,easing:"ease"}),this.animation.onfinish=()=>{this.onAnimationFinish(!1)},this.animation.oncancel=()=>{this.isClosing=!1}}open(){this.details.style.height=`${this.details.offsetHeight}px`,this.details.open=!0,window.requestAnimationFrame(()=>this.expand())}expand(){this.isExpanding=!0;const startHeight=`${this.details.offsetHeight}px`,endHeight=`${this.details.offsetHeight+this.content.offsetHeight}px`;this.animation&&this.animation.cancel(),this.animation=this.details.animate({height:[startHeight,endHeight]},{duration:400,easing:"ease-out"}),this.animation.onfinish=()=>this.onAnimationFinish(!0),this.animation.oncancel=()=>{this.isExpanding=!1}}onAnimationFinish(open){this.details.open=open,this.animation=null,this.isClosing=!1,this.isExpanding=!1,this.details.style.height=this.details.style.overflow=""}}customElements.define("collapsible-row",CollapsibleRow);class CountdownTimer extends HTMLElement{connectedCallback(){const endDateString=this.getAttribute("end-date"),endDate=new Date(endDateString+" UTC"),utcEndDate=new Date(Date.UTC(endDate.getUTCFullYear(),endDate.getUTCMonth(),endDate.getUTCDate(),0,0,0)),endTime=this.getAttribute("end-time"),countdownFinishedMessage=this.getAttribute("countdown_finished_message"),second=1e3,minute=second*60,hour=minute*60,day=hour*24,countDownDateTimeUTC=new Date(Date.UTC(endDate.getUTCFullYear(),endDate.getUTCMonth(),endDate.getUTCDate(),parseInt(endTime.split(":")[0]),parseInt(endTime.split(":")[1]),0)).getTime(),interval=setInterval(()=>{const now=new Date().getTime(),distance=countDownDateTimeUTC-now;if(distance<=0){clearInterval(interval),countdownFinishedMessage?this.innerHTML=countdownFinishedMessage:this.closest(".timer").style.display="none";return}const days=Math.floor(distance/day),hours=Math.floor(distance%day/hour),minutes=Math.floor(distance%hour/minute),seconds=Math.floor(distance%minute/second),show_days=window.translations.count_days,show_hours=window.translations.count_hours,show_minutes=window.translations.count_minutes,show_seconds=window.translations.count_seconds;this.innerHTML=`
4          <div class="js-timer-days"><span class="timer-number">${days}</span> <span class="timer-text">${show_days}</span></div>
5          <div class="js-timer-hours"><span class="timer-number">${hours}</span> <span class="timer-text">${show_hours}</span></div>
6          <div class="js-timer-minutes"><span class="timer-number">${minutes}</span> <span class="timer-text">${show_minutes}</span></div>
7          <div class="js-timer-seconds"><span class="timer-number">${seconds}</span>  <span class="timer-text">${show_seconds}</span></div>
8        `},second)}}customElements.define("countdown-timer",CountdownTimer);class LocationMap extends HTMLElement{constructor(){super(),this.apiKey=this.getAttribute("api-key"),this.address=this.getAttribute("address"),this.zoomLevel=parseInt(this.getAttribute("zoom-level")),this.markerContent=this.getAttribute("marker-content"),this.marker=null,this.map=null,this.mapCreated=!1}connectedCallback(){this.apiKey&&this.loadGoogleMaps()}loadGoogleMaps(){window.googleMapsLoaded||(window.googleMapsLoaded=new Promise(resolve=>{const script=document.createElement("script");
8script.src=`https://maps.googleapis.com/maps/api/js?key=${this.apiKey}`,script.onload=resolve,document.head.appendChild(script)})),window.googleMapsLoaded.then(()=>this.initMap())}initMap(){this.mapCreated||new google.maps.Geocoder().geocode({address:this.address},(results,status)=>{if(status===google.maps.GeocoderStatus.OK){const latitude=results[0].geometry.location.lat(),longitude=results[0].geometry.location.lng(),mapOptions={center:{lat:latitude,lng:longitude},zoom:this.zoomLevel},mapElement=document.createElement("div");mapElement.style.height="400px",this.appendChild(mapElement),this.map=new google.maps.Map(mapElement,mapOptions),this.marker=new google.maps.Marker({position:{lat:latitude,lng:longitude},map:this.map,title:this.address});const infowindow=new google.maps.InfoWindow({content:this.markerContent});this.marker.addListener("click",()=>{this.fadeInInfoWindow(infowindow)}),google.maps.event.addListener(this.map,"click",()=>{infowindow.close()}),this.mapCreated=!0}else console.error("Geocode was not successful for the following reason: "+status)})}fadeInInfoWindow(infowindow){infowindow.setOptions({opacity:0}),infowindow.open(this.map,this.marker),setTimeout(()=>{infowindow.setOptions({opacity:1})},50)}}customElements.define("location-map",LocationMap);class CustomTabs extends HTMLElement{connectedCallback(){const tabItems=this.querySelectorAll(".tab-item a"),tabContents=this.querySelectorAll(".tab-content");tabContents[0].style.display="block",tabItems[0].classList.add("active"),tabItems.forEach((item,index)=>{item.addEventListener("click",e=>{e.preventDefault(),tabContents.forEach(content=>{content.style.display="none"});const target=item.getAttribute("href");this.querySelector(target).style.display="block",tabItems.forEach(tabItem=>{tabItem.classList.remove("active")}),item.classList.add("active")})})}}customElements.define("custom-tabs",CustomTabs);class CustomTabsBlock extends HTMLElement{connectedCallback(){const tabItems=this.querySelectorAll(".tab-item a"),tabContents=this.querySelectorAll(".tab-content");tabItems.length===0||tabContents.length===0||(tabContents.forEach((content,index)=>{content.style.display=index===0?"block":"none"}),tabItems[0].classList.add("active"),tabItems.forEach(item=>{item.addEventListener("click",e=>{e.preventDefault();const target=item.getAttribute("href");tabContents.forEach(content=>{content.style.display="none"});const activeTab=this.querySelector(target);activeTab&&(activeTab.style.display="block"),tabItems.forEach(tabItem=>{tabItem.classList.remove("active")}),item.classList.add("active")})}))}}customElements.define("custom-tabs-block",CustomTabsBlock);class TextScroll extends HTMLElement{constructor(){super(),this.inner_element=null,this.position=0,this.speed=0,this.box_width=0,this.inner_element_width=0,this.box=null,this._running=!1;const getWidth=element=>{if(!element)return 0;const rect=element.getBoundingClientRect();return rect.right-rect.left},hasVisibleSpans=()=>this.querySelectorAll(".scroll-text-block > span").length>0,setUpChildrens=()=>{if(!this.inner_element||!this.box)return;const qty=Math.ceil(this.box_width/this.inner_element_width)+1;for(;this.box.children.length<qty;)this.box.appendChild(this.inner_element.cloneNode(!0));for(;this.box.children.length>qty;)this.box.removeChild(this.box.lastChild)},refreshWidths=()=>{!this.box||!this.inner_element||(this.box_width=getWidth(this.box),this.inner_element_width=getWidth(this.inner_element))},nextFrame=(delta,direction2)=>{!this.inner_element||!this.box||!hasVisibleSpans()||(refreshWidths(),setUpChildrens(),Array.from(this.box.children).forEach(el=>{const translateX=direction2==="rtl"?this.position:-this.position;el.style.transform=`translateX(${translateX}px)`}),this.position+=this.speed*delta/1e3,this.position>=this.inner_element_width&&(this.position%=this.inner_element_width))};this.start=direction2=>{if(!this.inner_element||!this.box||!hasVisibleSpans())return;this._running=!0;let last_time=null;const loop_func=()=>{if(!this._running||!hasVisibleSpans())return;const now=Date.now(),delta=last_time===null?0:now-last_time;nextFrame(delta,direction2),last_time=now,window.requestAnimationFrame(loop_func)};window.requestAnimationFrame(loop_func)},this.stop=()=>{this._running=!1},this.observeIntersection=entries=>{entries[0].isIntersecting&&hasVisibleSpans()?this.start(this.dataset.scrollDirection):this.stop()},this.init=direction2=>{if(this.inner_element=this.children[0],this.box=this,!this.inner_element||!this.box||!hasVisibleSpans())return;this.box_width=getWidth(this.box),this.inner_element_width=getWidth(this.inner_element),setUpChildrens(),new IntersectionObserver(this.observeIntersection).observe(this),this.dataset.stopOnHover==="true"&&(this.addEventListener("mouseenter",()=>this.stop()),this.addEventListener("mouseleave",()=>this.start(direction2)))};const speed=window.innerWidth>751?parseInt(this.dataset.scrollSpeed):parseInt(this.dataset.scrollSpeed)/1.5,direction=this.dataset.scrollDirection;this.speed=speed,this.init(direction)}}customElements.get("text-scroll")||customElements.define("text-scroll",TextScroll);class ImageHotspots extends HTMLElement{constructor(){super(),this.sectionId=this.getAttribute("data-tooltips"),this.attachEventListeners=this.attachEventListeners.bind(this),this.updateContent=this.updateContent.bind(this),this.loadFirstTooltip=this.loadFirstTooltip.bind(this)}connectedCallback(){this.initializeSection(),this.reinitializeOnShopifyEvents()}updateContent(blockId,content){const gridItemRight=this.querySelector(".grid-item.right .dynamic-content-placeholder");gridItemRight&&(gridItemRight.style.transition="opacity 0.4s ease-out, transform 0.4s ease-out",gridItemRight.style.opacity="0",gridItemRight.style.transform="translateY(10px)",setTimeout(()=>{gridItemRight.innerHTML=content,gridItemRight.style.opacity="1",gridItemRight.style.transform="translateY(0)"},400))}loadFirstTooltip(){const firstTooltipButton=this.querySelector(".tooltip-item:first-child .tooltip-button");if(firstTooltipButton){const blockId=firstTooltipButton.value,tooltipContent=this.querySelector(`#tooltip-overlay-${blockId}`).innerHTML;this.updateContent(blockId,tooltipContent)}}attachEventListeners(){this.querySelectorAll("[data-tooltip-trigger]").forEach(button=>{button.addEventListener("click",()=>{const blockId=button.value,tooltipContent=this.querySelector(`#tooltip-overlay-${blockId}`).innerHTML;this.updateContent(blockId,tooltipContent)})})}initializeSection(){this.attachEventListeners(),this.loadFirstTooltip()}reinitializeOnShopifyEvents(){window.Shopify&&Shopify.designMode&&(document.addEventListener("shopify:section:load",event=>{event.detail.sectionId===this.sectionId&&this.initializeSection()}),document.addEventListener("shopify:section:select",event=>{event.detail.sectionId===this.sectionId&&this.initializeSection()}),document.addEventListener("shopify:section:reorder",event=>{event.detail.sectionId===this.sectionId&&this.initializeSection()}))}}customElements.define("image-hotspots",ImageHotspots),document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll("image-hotspots").forEach(section=>{section.initializeSection()})});class TabSwitcher extends HTMLElement{constructor(){super()}connectedCallback(){this.querySelectorAll('input[type="radio"]').forEach(radio=>{radio.addEventListener("change",()=>this.handleTabChange(radio))}),document.addEventListener("shopify:section:select",()=>{const radio=this.querySelector('input[type="radio"]:checked');this.handleTabChange(radio)});const checkedRadio=this.querySelector('input[type="radio"]:checked');if(checkedRadio)this.handleTabChange(checkedRadio);else{const firstRadio=this.querySelector('input[type="radio"]');firstRadio&&(firstRadio.checked=!0,this.handleTabChange(firstRadio))}window.addEventListener("resize",()=>{const radio=this.querySelector('input[type="radio"]:checked');radio&&this.updateGliderPosition(radio)})}handleTabChange(radio){const parts=radio.id.split("-"),sectionId=parts[
81];if(parts.length<3)return;const collectionNumber=parseInt(parts[parts.length-1],10)-1;this.querySelectorAll(".tab-content > div").forEach((content,index)=>{index===collectionNumber?(content.style.display="block",content.setAttribute("data-aos","fade-up")):(content.style.display="none",content.removeAttribute("data-aos"),content.classList.remove("aos-animate"))}),this.updateGliderPosition(radio),typeof AOS<"u"&&AOS.init()}updateGliderPosition(radio){const glider=this.querySelector(".glider"),selectedLabel=radio.nextElementSibling,tabWidth=selectedLabel.offsetWidth,tabLeft=selectedLabel.offsetLeft;glider.style.width=`${tabWidth}px`,glider.style.transform=`translateX(${tabLeft}px)`}}customElements.define("tab-switcher",TabSwitcher);function handleButtonClick(event){var clickedElement=event.target,sliderComponent=clickedElement.closest("slider-component, slideshow-component");if(sliderComponent&&clickedElement.matches(".button")){var href=clickedElement.getAttribute("href");if(href&&href.startsWith("#")){event.preventDefault();var targetId=href.substring(1),targetElement=document.getElementById(targetId);if(targetElement&&targetElement.classList.contains("anchor")){var slider=sliderComponent.querySelector(".slider.slider--mobile, .slider--desktop, .slider--everywhere");if(slider){var scrollSnapType=slider.style.scrollSnapType;slider.style.scrollSnapType="none",targetElement.scrollIntoView({behavior:"smooth"}),setTimeout(function(){slider.style.scrollSnapType=scrollSnapType},500)}else window.location.href=href}else window.location.href=href}}}document.addEventListener("click",handleButtonClick);function initializeLayoutSwitcher(){var productGrid=document.getElementById("product-grid"),desktopLayoutOptionsContainer=document.querySelector(".layout-options"),mobileLayoutOptionsContainer=document.querySelector(".mobile-layout-options");if(!desktopLayoutOptionsContainer&&!mobileLayoutOptionsContainer)return;var desktopLayoutOptions=document.querySelectorAll(".layout-options li"),mobileLayoutOptions=document.querySelectorAll(".mobile-layout-options li"),lastDesktopLayout,lastMobileLayout;typeof Shopify>"u"||!Shopify.designMode?(lastDesktopLayout=localStorage.getItem("lastDesktopLayout")||productGrid?.getAttribute("data-columns-desktop"),lastMobileLayout=localStorage.getItem("lastMobileLayout")||productGrid?.getAttribute("data-columns-mobile")):(lastDesktopLayout=productGrid?.getAttribute("data-columns-desktop"),lastMobileLayout=productGrid?.getAttribute("data-columns-mobile"));function updateLayout(selectedLayout,layoutType){layoutType==="desktop"?(productGrid.className=productGrid.className.replace(/grid--\d-col-desktop/g,""),productGrid.classList.add("grid--"+selectedLayout+"-col-desktop"),localStorage.setItem("lastDesktopLayout",selectedLayout)):layoutType==="mobile"&&(productGrid.className=productGrid.className.replace(/grid--\d-col-tablet-down/g,""),productGrid.classList.add("grid--"+selectedLayout+"-col-tablet-down"),localStorage.setItem("lastMobileLayout",selectedLayout))}function updateActiveClass(option,layoutType){var options=layoutType==="desktop"?desktopLayoutOptions:mobileLayoutOptions;options.forEach(function(opt){opt.classList.remove("active")}),option.classList.add("active")}function handleLayoutChange(event,layoutType){var target=event.target.closest("li");if(target){var selectedLayout=target.getAttribute("data-columns");updateLayout(selectedLayout,layoutType),updateActiveClass(target,layoutType)}}desktopLayoutOptionsContainer&&desktopLayoutOptionsContainer.addEventListener("click",function(event){handleLayoutChange(event,"desktop")}),mobileLayoutOptionsContainer&&mobileLayoutOptionsContainer.addEventListener("click",function(event){handleLayoutChange(event,"mobile")}),updateLayout(lastDesktopLayout,"desktop"),updateLayout(lastMobileLayout,"mobile");var defaultDesktopOption=document.querySelector(".layout-options li[data-columns='"+lastDesktopLayout+"']");defaultDesktopOption&&defaultDesktopOption.classList.add("active");var defaultMobileOption=document.querySelector(".mobile-layout-options li[data-columns='"+lastMobileLayout+"']");defaultMobileOption&&defaultMobileOption.classList.add("active")}window.addEventListener("load",function(){initializeLayoutSwitcher();var activeFacetsElements=document.querySelectorAll(".active-facets");
8activeFacetsElements.forEach(function(element){var observer=new MutationObserver(function(mutations){mutations.forEach(function(mutation){initializeLayoutSwitcher()})});observer.observe(element,{childList:!0,attributes:!0,subtree:!0})}),document.addEventListener("shopify:section:load",initializeLayoutSwitcher)});class TwoColumnLayout extends HTMLElement{constructor(){super(),this.arrangeBlocks=this.arrangeBlocks.bind(this),this.reorderBlocksForMobile=this.reorderBlocksForMobile.bind(this)}connectedCallback(){requestAnimationFrame(()=>{this.arrangeBlocks(),this.reorderBlocksForMobile(),this.classList.remove("hidden-two-column")}),window.addEventListener("resize",this.reorderBlocksForMobile)}disconnectedCallback(){window.removeEventListener("resize",this.reorderBlocksForMobile)}arrangeBlocks(){const blocks=this.querySelectorAll(".block"),leftColumn=document.createElement("div"),rightColumn=document.createElement("div"),underGalleryContainer=document.getElementById("under-gallery");leftColumn.className="column-left",rightColumn.className="column-right";let leftCount=0,rightCount=0;underGalleryContainer.innerHTML="";let lastColumn="left";blocks.forEach(block=>{block.dataset.column==="left"?(leftColumn.appendChild(block),leftCount++,lastColumn="left"):block.dataset.column==="right"?(rightColumn.appendChild(block),rightCount++,lastColumn="right"):block.dataset.column==="under-gallery"?(underGalleryContainer.appendChild(block),lastColumn="under-gallery"):lastColumn==="right"?(rightColumn.appendChild(block),rightCount++):(leftColumn.appendChild(block),leftCount++,lastColumn="left")}),this.querySelectorAll(".column-left, .column-right").forEach(col=>col.remove()),this.appendChild(leftColumn),this.appendChild(rightColumn),leftCount===0||rightCount===0?(leftColumn.style.width="100%",rightColumn.style.width="100%"):(leftColumn.style.width="48%",rightColumn.style.width="48%"),underGalleryContainer.style.display=underGalleryContainer.children.length>0?"block":"none"}reorderBlocksForMobile(){const underGallery=document.getElementById("under-gallery"),productGallery=document.getElementById("product-gallery"),position=this.getAttribute("data-position");window.innerWidth<=990?position==="first"&&productGallery?productGallery.appendChild(underGallery):this.appendChild(underGallery):productGallery&&productGallery.appendChild(underGallery)}}customElements.define("two-column-layout",TwoColumnLayout);class TextSlider extends HTMLElement{constructor(){super(),this.currentIndex=0,this.textElements=Array.from(this.querySelectorAll("a.announcement-slide")),this.changeText=this.changeText.bind(this),this.textElements.length>0&&this.textElements[this.currentIndex].classList.add("active")}connectedCallback(){this.textElements.length>0&&(this.interval=setInterval(this.changeText,6e3))}disconnectedCallback(){clearInterval(this.interval)}changeText(){this.textElements.length>0&&(this.textElements[this.currentIndex].classList.remove("active"),this.currentIndex=(this.currentIndex+1)%this.textElements.length,this.textElements[this.currentIndex].classList.add("active"))}}customElements.define("text-slider",TextSlider);class InfocardElement extends HTMLElement{constructor(){super(),this.expandedinfocard=null,this.initialProperties=[],this.finalProperties=[],this.infocardClip=null,this.expand=this.expand.bind(this),this.collapse=this.collapse.bind(this),this.onExpandTransitionEnd=this.onExpandTransitionEnd.bind(this),this.onCollapseTransitionEnd=this.onCollapseTransitionEnd.bind(this)}connectedCallback(){this.addEventListener("click",e=>{if(this.expandedinfocard)return;this.expandedinfocard=this;const closeButton=this.querySelector(".js-close-button");closeButton&&(closeButton.removeEventListener("click",this.collapse),closeButton.addEventListener("click",this.collapse)),this.expand()}),this.addEventListener("keydown",e=>{if(!this.expandedinfocard&&(e.key==="Enter"||e.key===" ")){e.preventDefault(),this.expandedinfocard=this;const closeButton=this.querySelector(".js-close-button");closeButton&&(closeButton.removeEventListener("click",this.collapse),closeButton.addEventListener("click",this.collapse)),this.expand()}}),this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-expanded","fal
8se")}disconnectedCallback(){const closeButton=this.querySelector(".js-close-button");closeButton&&closeButton.removeEventListener("click",this.collapse)}expand(){this.setAttribute("aria-expanded","true"),this.removeAttribute("data-aos");const infocardContent=this.getInfocardContent();infocardContent.removeEventListener("transitionend",this.onCollapseTransitionEnd),infocardContent.addEventListener("transitionend",this.onExpandTransitionEnd),this.disablePageScroll(),this.collectInitialProperties(),this.classList.add("infocard--expanded"),this.collectFinalProperties(),this.setInvertedTransformAndOpacity(),this.clipInfocardContent(),requestAnimationFrame(()=>{this.classList.add("infocard--animatable"),this.startExpanding()})}collapse(event){event&&event.stopPropagation(),this.setAttribute("aria-expanded","false");const infocardContent=this.getInfocardContent();infocardContent.removeEventListener("transitionend",this.onExpandTransitionEnd),infocardContent.addEventListener("transitionend",this.onCollapseTransitionEnd),this.setCollapsingInitialStyles(),requestAnimationFrame(()=>{this.classList.add("infocard--animatable"),this.startCollapsing()})}onExpandTransitionEnd(e){if(e.target!==this.getInfocardContent())return;this.classList.remove("infocard--animatable"),this.getInfocardContent().removeEventListener("transitionend",this.onExpandTransitionEnd),this.removeStyles();const closeButton=this.querySelector(".js-close-button");closeButton&&closeButton.focus()}onCollapseTransitionEnd(e){e.target===this.getInfocardContent()&&(this.classList.remove("infocard--animatable"),this.classList.remove("infocard--expanded"),this.getInfocardContent().removeEventListener("transitionend",this.onCollapseTransitionEnd),this.removeStyles(),this.enablePageScroll(),this.cleanup())}getAnimatableElements(){return this.querySelectorAll(".js-animatable")}getInfocardContent(){return this.querySelector(".infocard__content")}disablePageScroll(){document.body.style.overflow="hidden",document.body.style.padding="0 4px 0 0"}enablePageScroll(){document.body.style.overflow="",document.body.style.padding="0"}removeStyles(){for(const element of this.getAnimatableElements())element.style=null;this.getInfocardContent().style=null}collectInitialProperties(){this.initialProperties=[];for(const element of this.getAnimatableElements())this.initialProperties.push({rect:element.getBoundingClientRect(),opacity:parseFloat(window.getComputedStyle(element).opacity)});const infocardRect=this.getBoundingClientRect();this.infocardClip={top:infocardRect.top,right:window.innerWidth-infocardRect.right,bottom:window.innerHeight-infocardRect.bottom,left:infocardRect.left}}collectFinalProperties(){this.finalProperties=[];for(const element of this.getAnimatableElements())this.finalProperties.push({rect:element.getBoundingClientRect(),opacity:parseFloat(window.getComputedStyle(element).opacity)})}setInvertedTransformAndOpacity(){this.getAnimatableElements().forEach((element,i)=>{element.style.transform=`translate(${this.initialProperties[i].rect.left-this.finalProperties[i].rect.left}px, ${this.initialProperties[i].rect.top-this.finalProperties[i].rect.top}px) scale(${this.initialProperties[i].rect.width/this.finalProperties[i].rect.width})`,element.style.opacity=`${this.initialProperties[i].opacity}`})}clipInfocardContent(){this.getInfocardContent().style.clipPath=`inset(${this.infocardClip.top}px ${this.infocardClip.right}px ${this.infocardClip.bottom}px ${this.infocardClip.left}px round 5px)`}startExpanding(){this.getAnimatableElements().forEach((element,i)=>{element.style.transform="translate(0, 0) scale(1)",element.style.opacity=`${this.finalProperties[i].opacity}`}),this.getInfocardContent().style.clipPath="inset(0)"}setCollapsingInitialStyles(){for(const element of this.getAnimatableElements())element.style.transform="translate(0, 0) scale(1)";this.getInfocardContent().style.clipPath="inset(0)"}startCollapsing(){this.setInvertedTransformAndOpacity(),this.clipInfocardContent()}cleanup(){this.expandedinfocard=null,this.infocardClip=null,this.initialProperties=[],this.finalProperties=[]}}customElements.define("infocard-element",InfocardElement),document.addEventListener("DOMContentLoaded",function(){updateCartLayout()});function updateCartLayout(){const cartItems=document.querySelector(".cart__items-wrapper"),cartFooter=document.querySelector(".cart__footer-wrapper");if(cartItems&&cartFooter){document.querySelector(".cart__items-wrapper .is-empty")&&cartItems.classList.add("empty-cart");let wrapper=cartItems.closest(".page-width");wrapper||(wrapper=document.createElement("div"),wrapper.classList.add("page-width"),cartItems.parentNode.insertBefore(wrapper,cartItems),wrapper.appendChild(cartItems),wrapper.appendChild(cartFooter))}}document.addEventListener("DOMContentLoaded",function(){const initializeAOS=()=>
8{if(typeof AOS<"u"&&typeof AOS.init=="function"){const isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),options={offset:isSafari?-200:100,debounceDelay:isSafari?0:50,duration:700,once:!0};AOS.init(options)}};initializeAOS(),window.addEventListener("load",function(){typeof AOS<"u"&&typeof AOS.refresh=="function"&&setTimeout(()=>{AOS.refresh()},500)}),document.addEventListener("shopify:section:load",initializeAOS),document.addEventListener("shopify:section:deselect",function(){typeof AOS<"u"&&AOS.init({offset:-700})});const removeAOSClass=selector=>{const drawer=document.getElementById(selector);drawer&&drawer.querySelectorAll(".aos-animate").forEach(element=>{element.classList.remove("aos-animate")})};removeAOSClass("CartDrawer"),removeAOSClass("FilterDrawer")}),document.addEventListener("DOMContentLoaded",function(){const animatedTextElements=document.querySelectorAll(".animated-highlight em"),observer=new IntersectionObserver(entries=>{entries.forEach(entry=>{entry.isIntersecting?entry.target.classList.add("in-view"):entry.target.classList.remove("in-view")})},{threshold:.5});animatedTextElements.forEach(element=>observer.observe(element))}),console.log("Flux Theme by ManaThemes | Learn more at https://manathemes.com");
9//# sourceMappingURL=/cdn/shop/t/91/assets/global.js.map?v=137427769635658576271783976501

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.