1customElements.get("product-modal")||customElements.define("product-modal",class extends ModalDialog{constructor(){super(),this.initSlider(),this.activeSliderIdx=0}hide(){super.hide()}show(opener){super.show(opener),this.showActiveMedia()}initSlider(){const outsideEl=this.querySelector(".product-media-modal__content");outsideEl&&outsideEl.addEventListener("click",function(){const closeBtn=outsideEl.previousElementSibling;closeBtn&&closeBtn.click()});const swiper=new Swiper(".product-media-modal__content",{navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},slidesPerView:1,spaceBetween:30,effect:"fade",draggable:!1,allowTouchMove:!1});document.querySelectorAll(".slider-mobile-gutter ul li .product__modal-opener--image").forEach((item,index)=>{item.addEventListener("click",e=>{document.querySelectorAll(".product-media-modal__content .swiper-slide").forEach(modal=>{const id=modal.getAttribute("data-media-id");item.querySelector("button.product__media-toggle").getAttribute("data-media-id")==id&&swiper.slideTo(index)})})})}showActiveMedia(){this.querySelectorAll(`[data-media-id]:not([data-media-id="${this.openedBy.getAttribute("data-media-id")}"])`).forEach(element=>{element.classList.remove("active")});const activeMedia=this.querySelector(`[data-media-id="${this.openedBy.getAttribute("data-media-id")}"]`),activeMediaTemplate=activeMedia.querySelector("template"),activeMediaContent=activeMediaTemplate?activeMediaTemplate.content:null;activeMedia.classList.add("active"),activeMedia.scrollIntoView();const container=this.querySelector('[role="document"]');container.scrollLeft=(activeMedia.width-container.clientWidth)/2,activeMedia.nodeName=="DEFERRED-MEDIA"&&activeMediaContent&&activeMediaContent.querySelector(".js-youtube")&&activeMedia.loadContent()}}); 2//# sourceMappingURL=/cdn/shop/t/308/assets/product-modal.js.map?v=59536541682437460851783429071
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.