1customElements.get("page-header-image-video")||customElements.define("page-header-image-video",class extends HTMLElement{constructor(){super(),this.section=this.closest("section"),this.showLogoClass="wt-header__logo--show"}connectedCallback(){this.init(),document.addEventListener("shopify:section:load",this.handleAdminEditing.bind(this)),document.addEventListener("shopify:section:unload",this.handleAdminEditing.bind(this)),document.addEventListener("shopify:section:reorder",this.handleAdminEditing.bind(this))}handleAdminEditing(){this.init()}init(){const logoWrapper=document.querySelector(".wt-header__logo");this.isTransparentHeaderEnabled()?(this.setTopMargin(),this.observeHeader(),logoWrapper?.classList.add(this.showLogoClass)):(this.resetTopMargin(),this.resetTopMargin())}resetTopMargin(){this.section.style.marginTop="0"}removeObserver(){this.observer&&(this.observer.disconnect(),this.observer=null)}resetTopMargin(){this.section.style.marginTop="0"}disconnectedCallback(){this.removeObserver(),document.removeEventListener("shopify:section:load",this.handleAdminEditing.bind(this)),document.removeEventListener("shopify:section:unload",this.handleAdminEditing.bind(this)),document.removeEventListener("shopify:section:reorder",this.handleAdminEditing.bind(this))}isValidSectionsOrder(){const pageHeader=document.body.querySelector("header.page-header"),currentSection=this.section;if(pageHeader&¤tSection){let sibling=pageHeader.nextElementSibling;for(;sibling&&sibling.tagName.toLowerCase()!=="section";)sibling=sibling.nextElementSibling;return sibling===currentSection}return!1}isTransparentHeaderEnabled(){const header=document.querySelector(".wt-header");return this.isValidSectionsOrder()&&!!header?.dataset.transparent}observeHeader(){const header=document.querySelector(".wt-header"),activeTransparentClass="wt-header--transparent";this.observer=new IntersectionObserver(entries=>{entries.forEach(entry=>
1{entry.isIntersecting?header.classList.add(activeTransparentClass):header.classList.remove(activeTransparentClass)})},{root:null,threshold:.05}),this.observer.observe(this)}getHeaderHeight(){return document.querySelector("header.page-header").offsetHeight}calculateOffset(){const headerHeight=this.getHeaderHeight();return this.isTransparentHeaderEnabled()?headerHeight:0}setTopMargin(){const offset=this.calculateOffset();this.section.style.marginTop=`-${offset}px`,this.section.style.setProperty("--top-header-space",`${this.getHeaderHeight()}px`)}}); 2//# sourceMappingURL=/cdn/shop/t/21/assets/page-header-image-video.js.map?v=38964043904736764351762308151
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.