1const o={SELECTORS:{NAV:"[data-sticky-nav]",BUTTONS:".sticky-nav__buttons",SCROLL_LEFT:".scroll-left",SCROLL_RIGHT:".scroll-right",NAV_BUTTON:".sticky-nav__button",SCROLL_CONTAINER:".sticky-nav__scroll-container"},CLASSES:{STICKY:"is-sticky",ACTIVE:"active"},SCROLL:{AMOUNT:300,BREAKPOINT:1280}},L=(t,e)=>{window.pageYOffset>e?t.classList.add(o.CLASSES.STICKY):t.classList.remove(o.CLASSES.STICKY)},T=(t,e)=>{const s=t.getAttribute("data-scroll-to");if(!s)return;const n=document.querySelector(`${s}`);if(!n)return;const r=e.offsetHeight,c=document.querySelector("header")?.offsetHeight||0,i=n.offsetTop-(r+c+50);window.scrollTo({top:i,behavior:"smooth"})},d=(t,e)=>{const s=e.offsetHeight,n=document.querySelector("header")?.offsetHeight||0,r=window.pageYOffset+s+n+150;t.forEach(c=>{const i=c.getAttribute("data-scroll-to");if(!i)return;const l=document.querySelector(`${i}`);if(!l)return;const S=l.offsetTop,a=S+l.offsetHeight;r>=S&&r<a&&(t.forEach(E=>E.classList.remove(o.CLASSES.ACTIVE)),c.classList.add(o.CLASSES.ACTIVE),e.querySelector(o.SELECTORS.SCROLL_CONTAINER)&&c.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"}))})},O=()=>{const t=document.querySelector(o.SELECTORS.NAV);if(t)try{const e=t.querySelector(o.SELECTORS.BUTTONS),s=t.querySelector(o.SELECTORS.SCROLL_LEFT),n=t.querySelector(o.SELECTORS.SCROLL_RIGHT),r=t.querySelectorAll(o.SELECTORS.NAV_BUTTON),c=t.querySelector(o.SELECTORS.SCROLL_CONTAINER),i=t.offsetTop,l=()=>{if(!e||!s||!n||!c)return;e.scrollWidth>e.clientWidth?(s.style.display="flex",n.style.display="flex",c.classList.remove("p-0")):(s.style.display="none",n.style.display="none",c.classList.add("p-0"))};window.addEventListener("scroll",()=>L(t,i)),s.addEventListener("click",()=>{e.scrollBy({left:-o.SCROLL.AMOUNT,behavior:"smooth"})}),n.addEventListener("click",()=>{e.scrollBy({left:o.SCROLL.AMOUNT,behavior:"smooth"})}),l(),window.addEventListener("resize",l),r.forEach(S=>{S.addEventListener("click",a=>{a.preventDefault(),T(S,t)})}),window.addEventListener("scroll",()=>d(r,t)),d(r,t)}catch{}};export{O as initializeStickyNav}; 2//# sourceMappingURL=sticky-nav.min.js.map
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.