1typeof window.initProductMediaGallery!="function"&&(window.initProductMediaGallery=function(section){const allowedSections=["product-section","featured-product-section"];if(!section||!allowedSections.some(cls=>section.classList.contains(cls)))return;const initMainSlider=section2=>{if(!section2||!allowedSections.some(cls=>section2.classList.contains(cls)))return;const sliderEl=section2.querySelector(".js-media-list");if(!sliderEl)return;const desktopType=sliderEl.dataset?.desktopType||"slider_previews",mobileType=sliderEl.dataset?.mobileType||"slider_previews",hasDesktopZoom=sliderEl.dataset?.hasDesktopZoom==="true",buttonPrev=sliderEl.querySelector(".slider-nav-button--prev"),buttonNext=sliderEl.querySelector(".slider-nav-button--next"),paginationEl=sliderEl.querySelector(".slider-pagination"),thumbsSlider=sliderEl.closest(".product__media")?.querySelector(".js-media-sublist"),isLoop=sliderEl.querySelectorAll(".swiper-slide").length>1,initSwiper=()=>{new Swiper(sliderEl,{slidesPerView:1,spaceBetween:16,autoHeight:!1,loop:isLoop,direction:"horizontal",speed:800,allowTouchMove:!0,watchSlidesProgress:!0,mousewheel:{forceToAxis:!0},navigation:{nextEl:buttonNext,prevEl:buttonPrev},pagination:{el:paginationEl,clickable:!0},breakpoints:{990:{allowTouchMove:!hasDesktopZoom}},thumbs:{swiper:thumbsSlider?.swiper?thumbsSlider.swiper:"",multipleActiveThumbs:!1,slideThumbActiveClass:"swiper-slide-thumb-active"},on:{slideChange:function(){window.pauseAllMedia(sliderEl),this.params.noSwiping=!1},slideChangeTransitionEnd:function(){const activeIndex=isLoop?this.realIndex:this.activeIndex,model3D=this.slides[activeIndex]?.querySelector("model-viewer"),posterBtn3D=this.slides[activeIndex]?.querySelector(".shopify-model-viewer-ui__button--poster");model3D&&posterBtn3D&&posterBtn3D.removeAttribute("hidden")},touchStart:function(){const activeIndex=isLoop?this.realIndex:this.activeIndex,model3D=this.slides[activeIndex]?.querySelector("model-viewer");model3D&&(model3D.classList.contains("shopify-model-viewer-ui__disabled")?this.params.noSwiping=!1:(this.params.noSwiping=!0,this.params.noSwipingClass="swiper-slide"))}}})},destroySwiper=()=>{sliderEl.swiper&&sliderEl.swiper.destroy(),sliderEl.querySelectorAll(".swiper-wrapper").forEach(wrapper=>{wrapper.removeAttribute("style")}
1),sliderEl.querySelectorAll(".swiper-slide").forEach(slide=>{slide.removeAttribute("style")})},hasDesktopSwiper=desktopType==="slider"||desktopType=="slider_previews",hasMobileSwiper=mobileType==="slider"||mobileType=="slider_previews";hasDesktopSwiper&&hasMobileSwiper?initSwiper():new ResizeObserver(entries=>{entries.forEach(entry=>{if(window.innerWidth>=990&&hasDesktopSwiper){initSwiper();return}if(window.innerWidth<990&&hasMobileSwiper){initSwiper();return}destroySwiper()})}).observe(section2)},initSubSlider=section2=>{if(!section2||!allowedSections.some(cls=>section2.classList.contains(cls)))return;const sliderEl=section2.querySelector(".js-media-sublist");if(!sliderEl)return;const desktopType=sliderEl.dataset?.desktopType||"slider_previews",mobileType=sliderEl.dataset?.mobileType||"slider_previews",hasDesktopSwiper=desktopType==="slider_previews",hasMobileSwiper=mobileType==="slider_previews";(hasDesktopSwiper||hasMobileSwiper)&&(new Swiper(sliderEl,{spaceBetween:16,slidesPerView:3,loop:!1,direction:"horizontal",allowTouchMove:!0,watchSlidesProgress:!0,watchOverflow:!0,observer:!0,observeParents:!0,autoHeight:!1,slideToClickedSlide:!0,on:{touchEnd:function(swiper){let range=5,diff=swiper.touches.diff=swiper.isHorizontal()?swiper.touches.currentX-swiper.touches.startX:swiper.touches.currentY-swiper.touches.startY;(diff<range||diff>-range)&&(swiper.allowClick=!0)}},breakpoints:{576:{slidesPerView:3},990:{slidesPerView:3,direction:"vertical"}}}),new ResizeObserver(entries=>{entries.forEach(entry=>{sliderEl.swiper&&(window.innerWidth>=990&&hasDesktopSwiper&&(sliderEl.swiper.enable(),sliderEl.swiper.changeDirection("vertical",!0)),window.innerWidth<990&&hasMobileSwiper&&(sliderEl.swiper.enable(),sliderEl.swiper.changeDirection("horizontal",!0)))})}).observe(section2))},initZoomSlider=section2=>{if(!section2||!allowedSections.some(cls=>section2.classList.contains(cls)))return;const sectionId=(section2.querySelector('[id^="MainProduct-"]')||section2.querySelector('[id^="FeaturedProduct-"]'))?.dataset?.section,sliderEl=document.querySelector(`[data-section-id='${sectionId}'].js-popup-slider`);if(!sliderEl)return;const buttonPrev=sliderEl.querySelector(".slider-nav-button--prev"),buttonNext=sliderEl.querySelector(".slider-nav-button--next"),paginationEl=sliderEl.querySelector(".slider-pagination"),isLoop=sliderEl.querySelectorAll(".swiper-slide").length>1,onMainSliderToggleClick=event=>{if(!sliderEl.swiper)return;const zoomToggle=event.target.closest(".product__media-toggle");if(!zoomToggle)return;const mediaId=zoomToggle.dataset?.mediaId;mediaId&&sliderEl.querySelectorAll(".product-media-modal__item.swiper-slide").forEach((slide,index)=>{if(slide.querySelector(`[data-media-id="${mediaId}"]`)){const findIndex=sliderEl.swiper.slides.findIndex(slideEl=>slideEl.dataset?.mediaId===mediaId),fallbackIndex=Number(slide.dataset?.swiperSlideIndex||index),slideIndex=findIndex!==-1?findIndex:fallbackIndex;sliderEl.swiper.slideTo(slideIndex,0),sliderEl.swiper.update()}})};new Swiper(sliderEl,{slidesPerView:1,speed:800,loop:isLoop,zoom:{maxRatio:2},mousewheel:{forceToAxis:!0},navigation:{nextEl:buttonNext,prevEl:buttonPrev},pagination:{el:paginationEl,clickable:!0},on:{afterInit:function(){section2.querySelectorAll(".product__media-list .product__media-toggle").forEach(elem=>{elem.addEventListener("click",onMainSliderToggleClick)})},slideChange:function(){window.pauseAllMedia(sliderEl),this.params.noSwiping=!1,sliderEl.classList.remove("zoom")},touchMove:function(){sliderEl.classList.remove("zoom")},slideChangeTransitionEnd:function(){const activeIndex=isLoop?this.realIndex:this.activeIndex,model3D=this.slides[activeIndex]?.querySelector("model-viewer"),posterBtn3D=this.slides[activeIndex]?.querySelector(".shopify-model-viewer-ui__button--poster");model3D&&posterBtn3D&&posterBtn3D.removeAttribute("hidden")},touchStart:function(){const activeIndex=isLoop?this.realIndex:this.activeIndex,model3D=this.slides[activeIndex]?.querySelector("model-viewer");model3D&&(model3D.classList.contains("shopify-model-viewer-ui__disabled")?this.params.noSwiping=!1:(this.params.noSwiping=!0,this.params.noSwipingClass="swiper-slide"))}}})};initSubSlider(section),initMainSlider(section),initZoomSlider(section),document.addEventListener("shopify:section:load",event=>{initSubSlider(event.target),initMainSlider(event.target),initZoomSlider(event.target)})}),typeof window.initProductPageElements!="function"&&(window.initProductPageElements=function(section){const allowedSections=["product-section","featured-product-section"];if(!section||!allowedSections.some(cls=>section.classList.contains(cls)))return;const initProductAccordion=section2=>{!section2||!allowedSections.some(cls=>section2.classList.contains(cls))||section2.querySelectorAll(".product-accordion").forEach(detail
1s=>{const summary=details.querySelector(".product-accordion__toggle"),content=details.querySelector(".product-accordion__content");let isAnimating=!1;!summary||!content||summary.addEventListener("click",event=>{if(!isAnimating)if(event.preventDefault(),isAnimating=!0,details.getAttribute("open"))details.removeAttribute("open"),content.addEventListener("transitionend",()=>{isAnimating=!1},{once:!0});else{const contentHeight=content.scrollHeight;content.style.setProperty("--product-accordion-max-height",`${contentHeight}px`),details.setAttribute("open",!0),content.addEventListener("transitionend",()=>{isAnimating=!1},{once:!0})}})})},initStickyAddBar=section2=>{if(!section2||!section2.classList.contains("product-section"))return;const buyButtons=section2.querySelector(".product__buy-buttons > product-form"),stickyBar=section2.querySelector(".product-sticky-add-bar"),footerEl=document.querySelector(".shopify-section-group-footer-group .footer__bottom")||document.querySelector(".shopify-section-group-footer-group .footer__top");if(!stickyBar)return;const observerOptions={root:null,rootMargin:"0px",threshold:.01},isElementBelowScroll=element=>element?element.getBoundingClientRect().top>0:!1,toggleStickyBar=isVisible=>{isVisible||isElementBelowScroll(buyButtons)?stickyBar.classList.remove("active"):stickyBar.classList.add("active")},handleIntersect=entries=>{const isVisible=entries.some(entry=>entry.isIntersecting);toggleStickyBar(isVisible)},observer=new IntersectionObserver(handleIntersect,observerOptions);buyButtons&&observer.observe(buyButtons),footerEl&&observer.observe(footerEl)};initStickyAddBar(section),initProductAccordion(section),document.addEventListener("shopify:section:load",event=>{initStickyAddBar(event.target),window.Shopify.designMode||initProductAccordion(event.target)})}),window.initProductMediaGallery(document.currentScript.parentElement),window.initProductPageElements(document.currentScript.parentElement); 2//# sourceMappingURL=/cdn/shop/t/94/assets/main-product.js.map?v=65036002838707602071773681028
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.