(function(){var __sections__={};(function(){for(var i=0,s=document.getElementById("sections-script").getAttribute("data-sections").split(",");ithis.preventReveal=!0,this.addEventListener("preventHeaderReveal",this.hideHeaderOnScrollUp),window.addEventListener("scroll",this.onScrollHandler,!1),this.createObserver()}setHeaderHeight(){document.documentElement.style.setProperty("--header-height",`${this.header.offsetHeight}px`)}disconnectedCallback(){this.removeEventListener("preventHeaderReveal",this.hideHeaderOnScrollUp),window.removeEventListener("scroll",this.onScrollHandler)}createObserver(){new IntersectionObserver((entries,observer2)=>{this.headerBounds=entries[0].intersectionRect,observer2.disconnect()}).observe(this.header)}onScroll(){const scrollTop=window.pageYOffset||document.documentElement.scrollTop;if(!(this.predictiveSearch&&this.predictiveSearch.isOpen)){if(this.isTransparent){scrollTop>this.headerBounds.bottom?(this.header.classList.add("scrolled-past-header"),this.header.classList.remove("transparent-header"),scrollTop>this.currentScrollTop?this.header.classList.add("shopify-section-header-hidden"):this.header.classList.remove("shopify-section-header-hidden")):(this.header.classList.remove("scrolled-past-header","shopify-section-header-hidden"),this.header.classList.add("transparent-header")),this.currentScrollTop=scrollTop;return}if(scrollTop>this.currentScrollTop&&scrollTop>this.headerBounds.bottom){if(this.header.classList.add("scrolled-past-header"),this.preventHide)return;requestAnimationFrame(this.hide.bind(this))}else scrollTopthis.headerBounds.bottom?(this.header.classList.add("scrolled-past-header"),this.preventReveal?(window.clearTimeout(this.isScrolling),this.isScrolling=setTimeout(()=>{this.preventReveal=!1},66),requestAnimationFrame(this.hide.bind(this))):requestAnimationFrame(this.reveal.bind(this))):scrollTop<=this.headerBounds.top&&(this.header.classList.remove("scrolled-past-header"),requestAnimationFrame(this.reset.bind(this)));this.currentScrollTop=scrollTop}}hide(){this.headerIsAlwaysSticky||(this.header.classList.add("shopify-section-header-hidden","shopify-section-header-sticky"),this.closeMenuDisclosure(),this.closeSearchModal())}reveal(){this.headerIsAlwaysSticky||(this.header.classList.add("shopify-section-header-sticky","animate"),this.header.classList.remove("shopify-section-header-hidden"))}reset(){this.headerIsAlwaysSticky||this.header.classList.remove("shopify-section-header-hidden","shopify-section-header-sticky","animate")}closeMenuDisclosure(){this.disclosures=this.disclosures||this.header.querySelectorAll("header-menu"),this.disclosures.forEach(disclosure=>disclosure.close())}closeSearchModal(){this.searchModal=this.searchModal||this.header.querySelector("details-modal"),this.searchModal.close(!1)}}customElements.define("sticky-header",StickyHeader)}catch(e){console.error(e)}}(),function(){if(!(!__sections__.lookbook&&!window.DesignMode))try{class luminLookBook extends HTMLElement{constructor(){super(),this.injectVendorScripts(),this.querySelectorAll(".lumin-lookbook-point-list-item").forEach(elem=>{this.handleTooltip(elem)})}async injectVendorScripts(){if(!window.FloatingUICore){const script=document.createElement("script");script.setAttribute("src","https://cdn.jsdelivr.net/npm/@floating-ui/core@1.6.0"),document.head.appendChild(script)}if(!window.FloatingUIDOM){await new Promise(r=>setTimeout(r,500));const script=document.createElement("script");script.setAttribute("src","https://cdn.jsdelivr.net/npm/@floating-ui/dom@1.6.1"),document.head.appendChild(script)}}handleTooltip(elem){const btn=elem.querySelector("button"),tooltip=elem.querySelector(".lumin-tooltip");function update(){window.FloatingUIDOM.computePosition(btn,tooltip,{middleware:[window.FloatingUIDOM.offset(0),window.FloatingUIDOM.autoPlacement()]}).then(({x,y})=>{Object.assign(tooltip.style,{left:`${x}px`,top:`${y}px`})})}function showTooltip(){tooltip.classList.add("show"),update()}function hideTooltip(){setTimeout(()=>{tooltip.classList.remove("show"),tooltip.classList.add("hiding"),setTimeout(()=>{tooltip.classList.remove("hiding")},200)},100)}window.matchMedia("(pointer: coarse)").matches?[["mouseenter",showTooltip],["mouseleave",hideTooltip],["focus",showTooltip],["blur",hideTooltip]].forEach(([event2,listener])=>{btn.addEventListener(event2,listener)}):[["focus",showTooltip],["blur",hideTooltip]].forEach(([event2,listener])=>{btn.addEventListener(event2,listener)})}}customElements.define("lumin-lookbook",luminLookBook)}catch(e){console.error(e)}}(),function(){if(!(!__sections__["video-gallery"]&&!window.DesignMode))try{class VideoGallery extends HTMLElement{constructor(){super(),this.deferredMedia=this.querySelector(".video-gallery__media"),this.videoPlaylist=this.querySelector(".video-gallery__thumbnails"),this.activeVideoTitle=this.querySelector(".video-gallery__active-video-title"),this.videoPlayer=null,this.handleVideoClick=this.handleVideoClick.bind(this)}connectedCallback(){this.videoPlaylist.addEventListener("click",this.handleVideoClick)}disconnectedCallback(){this.videoPlaylist.removeEventListener("click",this.handleVideoClick)}getVideoEmbedRef=()=>document.querySelector(".video-gallery__embed");getVideoPlayerRef=()=>document.querySelector(".video-gallery__player");clearExistingMedia=type=>{const existingEmbed=this.getVideoEmbedRef(),existingPlayer=this.getVideoPlayerRef();type==="video"&&existingEmbed&&existingEmbed.remove(),type==="embed"&&existingPlayer&&existingPlayer.remove()};handleVideoClick=e=>{const thumbnailElement=event.target.closest(".video-gallery__thumbnail");if(!thumbnailElement){console.error("Thumbnail element not found");return}this.deferredMedia&&this.deferredMedia.loadContent(!1);const videoURL=thumbnailElement.dataset.videoUrl,embedType=thumbnailElement.dataset.embedUrlType,embedID=thumbnailElement.dataset.embedUrlId,videoTitle=thumbnailElement.dataset.videoTitle;videoURL?this.loadVideo(videoURL,videoTitle):embedType&&embedID?this.loadEmbed(embedType,embedID,videoTitle):console.error("Video URL or embed URL not found"),this.scrollToVideoPlayer()};scrollToVideoPlayer=()=>{if(!this.videoPlayer){console.error("Video player element not found");return}const videoPlayerPosition=this.videoPlayer.getBoundingClientRect().top+window.scrollY-150;window.scrollTo({top:videoPlayerPosition,behavior:"smooth"})};loadVideo=(videoURL,videoTitle)=>{this.clearExistingMedia("video"),this.videoPlayer=this.getVideoPlayerRef(),this.videoPlayer||(console.log("Video player element not found, creating it"),this.videoPlayer=document.createElement("video"),this.videoPlayer.classList.add("video-gallery__player"),this.videoPlayer.setAttribute("playsinline",""),this.videoPlayer.setAttribute("autoplay",""),this.videoPlayer.setAttribute("controls",""),this.deferredMedia.appendChild(this.videoPlayer)),this.videoPlayer.src=videoURL,this.videoPlayer.load(),this.videoPlayer.addEventListener("loadedmetadata",function loadedMetadataHandler(){this.videoPlayer.play().then(()=>{console.log("Video started playing"),this.videoPlayer.removeEventListener("loadedmetadata",loadedMetadataHandler)}).catch(error=>{console.error("Error playing video:",error)})}.bind(this)),this.activeVideoTitle.innerText=videoTitle};loadEmbed=(embedType,embedID,videoTitle)=>{if(embedType!=="youtube"&&embedType!=="vimeo"){console.error("Invalid embed type");return}this.clearExistingMedia("embed");const embedURL=embedType=="youtube"?`https://www.youtube.com/embed/${embedID}?autoplay=1`:`https://player.vimeo.com/video/${videoId}?autoplay=1`;let embedElement=this.getVideoEmbedRef();embedElement||(embedElement=document.createElement("iframe"),embedElement.classList.add("video-gallery__embed"),embedElement.setAttribute("allow","autoplay; encrypted-media"),embedElement.setAttribute("allowfullscreen",""),this.deferredMedia.appendChild(embedElement)),embedElement.src=embedURL,embedElement.setAttribute("title",videoTitle),this.videoPlayer=embedElement,this.activeVideoTitle.innerText=videoTitle}}customElements.define("video-gallery",VideoGallery)}catch(e){console.error(e)}}()})(); //# sourceMappingURL=/cdn/shop/t/2/compiled_assets/scripts.js.map?86=