1if(typeof ProductPage!="function"){class ProductPage2 extends HTMLElement{constructor(){if(super(),this.productGallery=this.querySelector("[data-js-product-gallery]"),this.productSlider=this.querySelector("css-slider"),this.productSlider){const productGaleryThumbnails=this.querySelector(".product-gallery__thumbnails-holder");this.querySelector(".product-gallery__thumbnails .thumbnail")&&(this.querySelectorAll(".product-gallery__thumbnails .thumbnail").forEach((elm,i)=>{i==0&&elm.classList.add("active"),elm.addEventListener("click",e=>{this.productSlider.sliderEnabled?this.productSlider.changeSlide(e.currentTarget.dataset.index):(window.scrollTo({top:this.productGallery.querySelector(`.product-gallery-item[data-index="${e.currentTarget.dataset.index}"]`).offsetTop+this.offsetTop,behavior:"smooth"}),this.thumbnailNavigationHelper(e.currentTarget.dataset.index)),productGaleryThumbnails.scrollTo({left:elm.offsetLeft-50,behaviour:"smooth"})})}),this.productSlider.addEventListener("change",e=>{this.thumbnailNavigationHelper(e.target.index)})),this.productSlider.addEventListener("change",e=>{this.productGallery.querySelector(`.product-gallery-item[data-index="${e.target.index}"]`).dataset.productMediaType=="model"&&(this.xrButton&&this.xrButton.setAttribute("data-shopify-model3d-id",this.productGallery.querySelector(`.product-gallery-item[data-index="${e.target.index}"]`).dataset.mediaId),setTimeout(()=>{this.productSlider.querySelector(".css-slider-holder").classList.add("css-slider--disable-dragging")},150))}),this.productGallery.dataset.jsDisableParallax=="false"&&this.productSlider.addEventListener("ready",e=>{this.firstProductGalleryIndex&&this.productSlider.changeSlide(this.firstProductGalleryIndex,"auto");const productSlides=this.productSlider.querySelectorAll(".product-gallery-item"),productFigures=this.querySelectorAll(".apply-gallery-animation");this.productSlider.addEventListener("scroll",()=>{const scrollX=-this.productSlider.element.scrollLeft;productSlides.forEach((slide,i)=>{const media=productFigures[i];media&&(media.style.transform=`translateX(${(slide.offsetLeft+scrollX)*-1/3}px)`)})})})}if(!document.body.classList.contains("template-cart")&&(KROWN.settings.cart_action=="overlay"||KROWN.settings.cart_action=="popup")){let addToCartEnter=!1;this.querySelector("[data-js-product-add-to-cart]")&&this.querySelector("[data-js-product-add-to-cart]").addEventListener("keyup",e=>{e.keyCode==window.KEYCODES.RETURN&&(addToCartEnter=!0,window.lastFocusedElm=this.querySelector("[data-js-product-add-to-cart]"))}),this.querySelector("[data-js-product-form]")&&this.querySelector("[data-js-product-form]").addEventListener("add-to-cart",()=>{document.getElementById("site-cart-sidebar").show(),document.getElementById("cart-recommendations")&&document.getElementById("cart-recommendations").generateRecommendations(),addToCartEnter&&setTimeout(()=>{document.querySelector("#site-cart-sidebar [data-js-close]").focus(),addToCartEnter=!1},200)})}this.querySelectorAll("product-model").length>0&&(window.ProductModel.loadShopifyXR(),this.xrButton=this.querySelector(".product-gallery__view-in-space"));const addToCartButton=this.querySelector("[data-js-product-add-to-cart]");addToCartButton&&(addToCartButton.classList.contains("disabled")?this.querySelector("product-form").classList.add("disable-buy-button"):this.querySelector("product-form").classList.remove("disable-buy-button"),new MutationObserver(()=>{addToCartButton.classList.contains("disabled")?this.querySelector("product-form").classList.add("disable-buy-button"):this.querySelector("product-form").classList.remove("disable-buy-button")}).observe(addToCartButton,{attributes:!0,childList:!1,subtree:!1})),this.productVariants=this.querySelector("product-variants[data-main-product-variants]"),this.productVariants&&(this.productVariants.addEventListener("VARIANT_CHANGE",this.onVariantChangeHandler.bind(this)),this.onVariantChangeHandler({target:this.productVariants}))}thumbnailNavigationHelper(index=0){this.querySelectorAll(".product-gallery__thumbnails .thumbnail").forEach((elm,i)=>{i==index?elm.classList.add("active"):elm.classList.remove("active")})}onVariantChangeHandler(e){let variant=e.target.currentVariant;if(variant&&variant.featured_media!=null){let variantImg=this.productGallery.querySelector('.product-gallery-item[data-media-id="'+variant.featured_media.id+'"]');variantImg&&(this.productGallery.classList.contains("product-gallery--slider")||this.productGallery.classList.contains("product-gallery--scroll")&&window.innerWidth<1024?this.productGallery.querySelector("css-slider")&&this.productGallery.querySelector("css-slider").sliderEnabled?this.productGallery.querySelector("css-slider").changeSlide(variantImg.dataset.index):this.firstProductGalleryIndex=variantImg.dataset.index:window.scrollTo({top:variantImg.offsetTop,behavior:"smooth"}))}}}typeof customElements.get("product-page")>"u"&&customElements.define("product-page",ProductPage2)} 2//# sourceMappingURL=/cdn/shop/t/6/assets/section-main-product.js.map?v=120293782998875346061761934871
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.