1if(!customElements.get("pin-scrub")){class PinScrub extends HTMLElement{constructor(){super(),this.onScroll=this.onScroll.bind(this),this.onResize=this.onResize.bind(this)}connectedCallback(){this.imageWraps=this.querySelectorAll(".pin-scrub__image"),this.contentBlocks=this.querySelectorAll(".pin-scrub__text"),window.addEventListener("scroll",this.onScroll),window.addEventListener("resize",this.onResize),document.addEventListener("DOMContentLoaded",this.onScroll),this.onScroll()}disconnectedCallback(){window.removeEventListener("scroll",this.onScroll),window.removeEventListener("resize",this.onResize),document.removeEventListener("DOMContentLoaded",this.onScroll)}onResize(){this.onScroll()}onScroll(){let activeIndex=0;for(let i=0;i<this.contentBlocks.length;i++){const rect=this.contentBlocks[i].getBoundingClientRect();rect.top<window.innerHeight*.5&&rect.bottom>window.innerHeight*.2&&(activeIndex=i)}this.imageWraps.forEach((img,idx)=>{idx===activeIndex?img.classList.add("active"):img.classList.remove("active")})}}customElements.define("pin-scrub",PinScrub)} 2//# sourceMappingURL=/cdn/shop/t/184/assets/pin-scrub.js.map?v=148250777807365091561788834509
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.