1class StickyHeader extends window.BAO.CustomElement(){connectedCallback(){super.connectedCallback(),this.isTicking=!1,this.lastKnownY=window.scrollY,this.offsetTrackedY=0,this.scrollOffset=50,this.safeZone=100,this.scrollDirection=""}setupListeners(){super.setupListeners(),this.requestTick=this.requestTick.bind(this),this.updateEl=this.updateEl.bind(this),this.onScroll=this.onScroll.bind(this),window.addEventListener("scroll",this.onScroll,{passive:!0})}onScroll(){const previouslyKnown=this.lastKnownY,previousDirection=this.scrollDirection;this.lastKnownY=window.scrollY,this.scrollDirection=previouslyKnown<this.lastKnownY?"down":"up",previousDirection!==this.scrollDirection&&(this.offsetTrackedY=this.lastKnownY),this.requestTick()}requestTick(){this.isTicking||requestAnimationFrame(this.updateEl),this.isTicking=!0}updateEl(){this.isTicking=!1,this.setScrolled(),this.setScrolledUp()}setScrolled(){this.classList.toggle(this.dataset.classScrolled,this.hasScrolled)}setScrolledUp(){this.classList.toggle(this.dataset.classScrolledUp,this.hasScrolledUp)}get bodyElement(){return document.body}get hasScrolled(){return this.lastKnownY>=this.safeZone}get hasScrolledUp(){return this.scrollDirection==="up"&&this.lastKnownY>=this.safeZone&&this.lastKnownY<=this.offsetTrackedY-this.scrollOffset}}customElements.get("sticky-header")||customElements.define("sticky-header",StickyHeader); 2//# sourceMappingURL=/cdn/shop/t/1735/assets/sticky-header.js.map?v=27344372356717940091782836743
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.