PageSourceSearch

https://conwayandbanks.com/cdn/shop/t/96/assets/product-media-sticky.js?v=55437203864291687441780428422

js conwayandbanks.com collected 2026-10-08 09:23:22 UTC 2,531 bytes, 2 lines download raw bytes

1class ProductMediaSticky extends HTMLElement{#ticking;#topGap;#maxDisplacement;#scrollPosition;#intersectionObserver;constructor(){super(),this.#topGap=12,this.#intersectionObserver=null}connectedCallback(){const scrollListener=()=>{this.#ticking||(window.requestAnimationFrame(()=>{this.#setStickyDisplacement(),this.#ticking=!1}),this.#ticking=!0)},handleIntersection=entries=>{entries.forEach(entry=>{entry.isIntersecting?window.addEventListener("scroll",scrollListener):window.removeEventListener("scroll",scrollListener)})},debounce=(f,delay)=>{let timer=0;return(...args)=>{clearTimeout(timer),timer=setTimeout(()=>f.apply(this,args),delay)}},updateMaxDisplacement=()=>{this.#maxDisplacement=window.innerHeight-this.offsetHeight},updateObserver=()=>{this.#setTopGap(),updateMaxDisplacement(),this.#scrollPosition=window.scrollY,this.#setStyles(),window.innerHeight<this.offsetHeight?(this.#intersectionObserver||(this.#intersectionObserver=new IntersectionObserver(handleIntersection.bind(this),{rootMargin:"0px"})),this.#intersectionObserver.observe(this)):window.innerHeight>this.offsetHeight&&this.#intersectionObserver&&(this.#intersectionObserver.disconnect(),window.removeEventListener("scroll",scrollListener))};updateObserver(),window.addEventListener("resize",debounce(updateObserver,100)),new ResizeObserver(debounce(updateObserver,100)).observe(this)}#setTopGap(){const header=document.querySelector("header");this.#topGap=header.getAttribute("data-sticky-header")==="true"?header.offsetHeight:12}#setStyles(){this.style.display="block",this.style.position="sticky",this.style.top=`${this.#topGap}px`}#setStickyDisplacement(){const stickyElementTop=Number(this.style.top.replace("px",""));if(window.scrollY<this.#scrollPosition)if(stickyElementTop<this.#topGap){const topMath=stickyElementTop+this.#scrollPosition-window.scrollY;this.style.top=`${topMath}px`,topMath>=this.#topGap&&(this.style.top=`${this.#topGap}px`)}else stickyElementTop>=this.#topGap&&(this.style.top=`${this.#topGap}px`);else if(stickyElementTop>this.#maxDisplacement){const topMath=stickyElementTop+this.#scrollPosition-window.scrollY;this.style.top=`${topMath}px`,topMath<=this.#maxDisplacement&&(this.style.top=`${this.#maxDisplacement}px`)}else stickyElementTop<=this.#maxDisplacement&&(this.style.top=`${this.#maxDisplacement}px`);this.#scrollPosition=window.scrollY}}customElements.define("product-media-sticky",ProductMediaSticky);
2//# sourceMappingURL=/cdn/shop/t/96/assets/product-media-sticky.js.map?v=55437203864291687441780428422

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.