1import{asyncRequest,registerComponent}from"helpers";registerComponent("quick-view",class extends HTMLElement{constructor(){super(),this.modal=this.closest("dialog"),this.url=this.dataset.url,this.placeholder=this.querySelector("[data-quick-view-placeholder]"),this.modal.addEventListener("modalOpen",this.handleModalOpen.bind(this))}async handleModalOpen(event){const response=await asyncRequest(this.url);response?this.inject(response):window.location.href=this.url}inject(html){this.stopAllVideos();const newDOM=new DOMParser().parseFromString(html,"text/html").querySelector(".product-details");this.innerHTML=newDOM.outerHTML,setTimeout(()=>{this.addThumbnailClickListeners()},100)}addThumbnailClickListeners(){this.querySelectorAll(".product-media__secondary-item").forEach((thumbnail,index)=>{thumbnail.addEventListener("click",event=>{event.stopPropagation(),document.querySelectorAll("video-player").forEach((player,i)=>{player.iframe&&player.stopVideo()}),typeof window.stopAllVideos=="function"&&window.stopAllVideos(),document.querySelectorAll("video-player iframe").forEach((iframe,i)=>{iframe.remove()}),document.querySelectorAll("video-player.video-player--playing").forEach(video=>{video.classList.remove("video-player--playing")})})})}stopAllVideos(){typeof window.stopAllVideos=="function"?window.stopAllVideos():(document.querySelectorAll("video-player").forEach(player=>{player.iframe&&player.stopVideo()}),document.querySelectorAll("video-player iframe").forEach(iframe=>{iframe.remove()}),document.querySelectorAll("video-player.video-player--playing").forEach(video=>{video.classList.remove("video-player--playing")}))}}); 2//# sourceMappingURL=/cdn/shop/t/600/assets/quick-view.js.map?v=35597252456151564621788243522
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.