1customElements.get("lite-gallery")||(function($){var $=jQuery=$;class LiteGallery extends HTMLElement{constructor(){super(),this.sectionId=this.dataset.section,this.dataset.block&&(this.sectionId=`${this.dataset.section}${this.dataset.block}`);let galleryOptions=JSON.parse(this.querySelector('[type="application/json"]').textContent);this.productGallery=this.querySelector(`.product-single__gallery-${this.sectionId}`);let selectedMediaId=this.dataset.selectedMediaId;galleryOptions||(galleryOptions={optionsGallery:{slidesToShow:1,slidesToScroll:1,arrows:!1,fade:!0},galleryNav:!1,optionsNav:{slidesToShow:3,slidesToScroll:1,centerMode:!0,centerPadding:"0px",focusOnSelect:!0,arrows:!1,draggable:!1,swipe:!1,vertical:!1}}),this.initBreakpoints(),this.productGallery&&(this.initGallerySlider(galleryOptions),this.setActiveMedia(selectedMediaId))}initBreakpoints(){enquire.register("screen and (min-width: 1280px)",{match:()=>{this.bpSmall=!1},unmatch:()=>{this.bpSmall=!0}}),enquire.register("screen and (min-width: 1001px)",{match:()=>{this.blockSlide3DModel=!0}})}camelize(str){return str.replace(/\W+(.)/g,function(match,chr){return chr.toUpperCase()})}setActiveMedia(mediaId,currentVariant){const $slickGallery=$(`.product-single__gallery-${this.sectionId}`);let slideIndex=0,colorValue;if(currentVariant&&this.productOptions.forEach((option,i)=>{const optionName=option.toLowerCase().trim();this.productSwatches.find(value=>value.trim()===optionName)&&(colorValue=currentVariant.options[i])}),mediaId){const activeMedia2=this.productGallery.querySelector(`[data-media-id="${mediaId}"]`);slideIndex=activeMedia2?parseInt(activeMedia2.dataset.slickIndex):0}$slickGallery.slick("slickGoTo",slideIndex,!0);const activeMedia=this.productGallery.querySelector(`[data-slick-index="${$slickGallery.slick("slickCurrentSlide")}"]`);this.playActiveMedia(activeMedia)}playActiveMedia(activeItem){if(window.pauseAllMedia(this),activeItem){const video=activeItem.querySelector("video");video&&video.play();const deferredMedia=activeItem.querySelector(".deferred-media:not(product-model)");if(deferredMedia&&deferredMedia.dataset.preventAutoplay)return;deferredMedia&&deferredMedia.loadContent&&deferredMedia.loadContent(!1)}}initGallerySlider(options){const self=this,$productGallery=$(`.product-single__gallery-${this.sectionId}`),optionsGallery=options.optionsGallery;let $galleryNav,optionsNav;if(options.galleryNav&&(optionsNav=options.optionsNav,$galleryNav=$(`.product-single__thumbnails-${this.sectionId}`),$galleryNav.length>0&&(optionsGallery.asNavFor=`.product-single__thumbnails-${this.sectionId}`,optionsNav.asNavFor=`.product-single__gallery-${this.sectionId}`)),$productGallery.on("init",function(event,slick){self.blockSlide3DModel===!0&&$productGallery.find(".slick-current .product-media-modal__model").length&&slick.slickSetOption("swipe",!1)}),$productGallery.slick(optionsGallery),$galleryNav.length>0){$galleryNav.slick(optionsNav);const $thumnailsItem=$galleryNav.find(".product-single__thumbnails-item");$thumnailsItem.length<4&&$galleryNav.addClass("nav-set-translation"),$thumnailsItem.each(function(index,elem){elem.classList.remove("product-single__thumbnails--hide")})}$productGallery.on("afterChange",function(event,slick,currentSlide){const activeMedia=$productGallery.find(".slick-current");activeMedia.length&&self.playActiveMedia(activeMedia[0]),self.blockSlide3DModel===!0&&($productGallery.find(".slick-current .product-media-modal__model").length?slick.slickSetOption("swipe",!1):slick.slickGetOption("swipe")===!1&&slick.slickSetOption("swipe",!0))}),window.addEventListener("keydown",event=>{event.code==="ArrowLeft"?$productGallery.slick("slickPrev"):event.code==="ArrowRight"&&$productGallery.slick("slickNext")}),new ResizeObserver(entries=>{$galleryNav.length>0&&$galleryNav.slick("setPosition")}).observe(this),$(`.product-single__wrapper-${this.sectionId}`).find(".slick-list").removeAttr("aria-live"),$(`.product-single__wrapper-${this.sectionId}`).find(".slick-disabled").removeAttr("aria-disabled")}get productOptions(){return this.dataset.productOptions.split(",")||[]}get productSwatches(){return this.dataset.productSwatches.split(",")||[]}}customElements.define("lite-gallery",LiteGallery)})(theme.jQuery); 2//# sourceMappingURL=/cdn/shop/t/17/assets/lite-gallery.js.map?v=38436180143233914371787745755
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.