1class ShopableVideo extends PopupBase{constructor(){super(),this.popupDiv=this.querySelector(".video-item__popup"),this.init()}init(){(this.popupDiv||!this.classList.contains("instagram-item"))&&(window.addEventListener("resize",this.responsive.bind(this)),window.addEventListener("load",this.responsive.bind(this)),this.addEventListener("click",this.onClick.bind(this)),this.connectedCallback())}onClick(){const template=this.closest(".shopable-video-section").querySelector("template");if(template){const content=template.content.firstElementChild.cloneNode(!0).outerHTML;this.initPopup(content,`<div class="swiper-arrow swiper-prev-modal transition swiper-button-prev bg-white btn-hover inline-flex content-center border rounded-50 overflow-hidden"> 2 <svg width="6" height="11" fill="none"> 3 <use href="#icon-back"></use> 4 </svg> 5 </div> 6 <div class="swiper-arrow swiper-next-modal transition swiper-button-next bg-white btn-hover inline-flex content-center border rounded-50 overflow-hidden"> 7 <svg width="6" height="11" fill="none"> 8 <use href="#icon-next"></use> 9 </svg> 10 </div>`),this.findActiveSlideModal();const modal=this.modal;if(!modal)return;const productPopupDiv=modal.modalBoxContent.querySelectorAll(".video-item__product-mobile");productPopupDiv.length>0&&productPopupDiv.forEach(div=>{div.addEventListener("click",this.onClickMobile.bind(this))})}}findActiveSlideModal(){const modal=this.modal;if(!modal)return;const swiperContainer=modal.modalBoxContent.querySelector("slide-section-popup");if(!swiperContainer)return;const position=this.dataset.position;if(position)if(position!==null&&!isNaN(parseInt(position))){const slideIndex=parseInt(position);swiperContainer.swiper.slideTo(slideIndex,0,!1)}else swiperContainer.swiper.slideTo(0,0,!1)}onCloseEvent(){const popup=document.querySelector(".tingle-modal.shopable-video");if(!popup)return;const productInformation=popup.querySelector(".shopable-video__product-information");productInformation&&productInformation.classList.add("hidden")}connectedCallback(){const handleIntersection=(entries,observer)=>{if(!entries[0].isIntersecting)return;observer.unobserve(this),this.querySelectorAll("video").forEach(video=>{const dataSrc=video.dataset.src;dataSrc&&(video.src=dataSrc,video.removeAttribute("data-src"))})};new IntersectionObserver(handleIntersection.bind(this),{rootMargin:"0px 0px 200px 0px"}).observe(this)}responsive(){const productDivs=document.querySelectorAll(".shopable-video__product-information");if(productDivs.length!=0)if(window.innerWidth>=768){if(!this.popupDiv?.querySelector(".video-item__popup--flex"))return;productDivs.forEach(div=>{div.classList.remove("hidden")})}else{if(!this.popupDiv?.querySelector(".video-item__popup--flex"))return;productDivs.forEach(div=>{div.classList.add("hidden")})}}onClickMobile(event){const _this=this,popup=event.currentTarget.closest(".video-item__popup");if(!popup)return;const productInformation=popup.querySelector(".shopable-video__product-information");if(!productInformation)return;const slidePopup=document.querySelector("slide-section-popup");slidePopup.swiper.allowTouchMove=!1,slidePopup.swiper.unsetGrabCursor(),productInformation.classList.remove("hidden"),popup.classList.add("open"),_this.modal.modalCloseBtn.style.display="none"}}customElements.define("shopable-video",ShopableVideo);class SlideSectionPopup extends SlideSection{constructor(){super()}}customElements.define("slide-section-popup",SlideSectionPopup);class ShopableOverlay extends ShopableVideo{constructor(){super(),this.addEventListener("click",this.onClick.bind(this))}onClick(event){const currentTarget=event.currentTarget,modal=currentTarget.closest(".shopable-video"),popup=currentTarget?.closest(".video-item__popup");if(!popup)return;const productInformation=popup.querySelector(".shopable-video__product-information"),modalCloseBtn=modal?.querySelector(".tingle-modal__close");if(!productInformation)return;const slidePopup=document.querySelector("slide-section-popup");slidePopup.swiper.allowTouchMove=!0,slidePopup.swiper.setGrabCursor(
10),productInformation.classList.add("hidden"),popup.classList.remove("open"),modalCloseBtn.removeAttribute("style")}}customElements.define("shopable-overlay",ShopableOverlay);class ButtonCloseShopable extends ShopableOverlay{constructor(){super(),this.addEventListener("click",this.onClick.bind(this))}}customElements.define("button-close-shopable",ButtonCloseShopable); 11//# sourceMappingURL=/cdn/shop/t/17/assets/shopable-video.js.map?v=165226886142193276161773164159
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.