1!function(){"use strict";customElements.get("sticky-image-cards")||customElements.define("sticky-image-cards",class extends HTMLElement{constructor(){super(),this.isDesktop=Boolean(window.theme.getWindowWidth()>=window.theme.sizes.large),this.isMobile=window.theme.isMobile(),this.orientation=window.theme.getScreenOrientation(),this.onScrollCallback=()=>this.onScroll(),this.onResizeCallback=()=>this.onResize()}connectedCallback(){this.container=this.closest('[data-section-type="sticky-image-cards"]'),this.body=this.querySelector("[data-sticky-card-body]"),this.wrapper=this.querySelectorAll("[data-sticky-card-wrapper]"),this.content=this.querySelector("[data-sticky-card-content]"),this.aside=this.querySelector("[data-sticky-card-aside]"),this.media=this.querySelectorAll("[data-sticky-card-media]"),this.textInContent=this.content?.querySelectorAll("[data-sticky-card-text]"),this.vh=this.querySelector("[data-sticky-vh]"),this.layoutMobile=this.getAttribute("data-sticky-card-layout-mobile"),0!==this.media.length&&(requestAnimationFrame((()=>{this.calculateHeights(),this.onScroll()})),document.addEventListener("theme:scroll",this.onScrollCallback),document.addEventListener("theme:resize",this.onResizeCallback))}onScroll(){this.isEligible()&&this.detectStickyPositions()}isEligible(){const t=Math.round(this.container.getBoundingClientRect().top+window.scrollY),e=t+this.container.offsetHeight<Math.round(window.scrollY);return t<Math.round(window.scrollY+window.innerHeight)&&!e}detectStickyPositions(){const t=Math.round(this.body.getBoundingClientRect().top-this.headerHeight-this.wrapperTop);[...this.wrapper].forEach(((e,i)=>{const s=Math.floor(e.getBoundingClientRect().top-this.headerHeight);if(this.isMobile){if(i!==this.lastIndex){const t=Math.floor(this.wrapper[i+1].getBoundingClientRect().top-this.headerHeight);e.classList.toggle("has-passed-sticky",t<=this.stickyTop)}this.container.classList.toggle(`checkpoint-${i+1}`,t<=-1*this.cumulativeHeights[i])}e.classList.toggle("is-stuck-up",s<=this.stickyTop)}))}calculateHeights(){let{stickyHeaderHeight:t}=window.theme.readHeights();this.headerHeight=t||0,this.spacingTop=parseInt(window.getComputedStyle(this.container).getPropertyValue("--padding"))||20,this.wrapperTop=parseInt(window.getComputedStyle(this.wrapper[0]).getPropertyValue("top"))||0,this.stickyTop=Math.floor(this.wrapperTop-this.headerHeight),this.gap=parseInt(window.getComputedStyle(this.aside).getPropertyValue("gap"))||0,this.viewportHeight=this.vh.offsetHeight,this.lastIndex=[...this.wrapper].length-1,this.cumulativeHeights=[],this.isMobile&&(this.wrapperTop=this.spacingTop,this.stickyTop=this.spacingTop),this.textInContent&&(this.isDesktop&&this.textInContent.length>0&&this.textInContent.forEach(((t,e)=>{t.style.setProperty("--row-height","auto"),this.wrapper[e].style.setProperty("--row-height","auto");const i=t.offsetHeight,s=this.media[e].offsetHeight,o=Math.max(i,s);t.style.setProperty("--row-height",`${o}px`),this.wrapper[e].style.setProperty("--row-height",`${o}px`)})),[...this.wrapper].forEach(((t,e)=>{t.style.setProperty("--item-height","auto"),t.style.setProperty("--item-double-height","auto"),requestAnimationFrame((()=>{const i=t.offsetHeight,s=i+this.wrapperTop+this.headerHeight>this.viewportHeight,o=[...this.wrapper].map((t=>Number(t.dataset.index)>=e?0:t.offsetHeight));this.cumulativeHeights.push(o.reduce(((t,e)=>t+e),0)),t.classList.toggle("spillover",s),s&&this.isMobile&&(t.style.setProperty("--item-height",`${i}px`),t.style.setProperty("--item-double-height",2*i+"px"))}))})))}onResize(){requestAnimationFrame((()=>{this.isDesktop=Boolean(window.theme.getWindowWidth()>=window.theme.sizes.large),this.isMobile=window.theme.isMobile();const t=/iPhone|iPad|iPod/i.test(navigator.userAgent);let e=this.isDesktop||!t&&this.isMobile;this.orientation!==window.theme.getScreenOrientation()&&t&&(e=!0,this.orientation=window.theme.getScreenOrientation()),e&&this.calculateHeights()}))}disconnectedCallback(){document.removeEventListener("theme:scroll",this.onScrollCallback),document.removeEventListener("theme:resize",this.onResizeCallback)}})}();
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.