window.addEventListener("load",function(){const e=document.querySelectorAll(".wp-block-seo44-jump-links");e.forEach(t=>{const s=window.getComputedStyle(t).borderTopWidth||"0px";t.style.setProperty("--seo44-block-border-thickness",s),t.addEventListener("click",function(e){const s=e.target.closest('a[href^="#"]');if(s){e.preventDefault();const o=s.getAttribute("href"),i=document.querySelector(o);if(i)if(t.classList.contains("is-sticky")){let e=30;const s=t.getAttribute("data-seo44-jump-offset");s&&(e=parseInt(s,10));const o=i.getBoundingClientRect().top+window.scrollY-e;window.scrollTo({top:o,behavior:"smooth"})}else i.scrollIntoView({behavior:"smooth"})}});const o=Array.from(e).filter(e=>e.classList.contains("is-smart-sticky"));if(o.length>0){let e=window.pageYOffset||document.documentElement.scrollTop,t=!1;const s=10;window.addEventListener("scroll",function(){t||(window.requestAnimationFrame(function(){const i=window.pageYOffset||document.documentElement.scrollTop;o.forEach(t=>{t.classList.contains("is-stuck")?t.classList.contains("is-expanded")?t.classList.remove("is-scroll-hidden"):Math.abs(e-i)<=s||(i>e?t.classList.add("is-scroll-hidden"):t.classList.remove("is-scroll-hidden")):t.classList.remove("is-scroll-hidden")}),e=i<=0?0:i,t=!1}),t=!0)})}if(t.classList.contains("is-collapsible")){const e=t.querySelector(".seo-44-show-more");if(e){e.style.display="inline-block";const s=window.seo44JumpLinksL10n||{},o=s.showMore||"Show More",i=s.showLess||"Show Less";e.setAttribute("aria-label",o),e.addEventListener("click",function(){t.classList.toggle("is-expanded");const s=t.classList.contains("is-expanded");e.setAttribute("aria-expanded",s),s?e.setAttribute("aria-label",i):e.setAttribute("aria-label",o)})}}if(t.classList.contains("is-sticky")&&"IntersectionObserver"in window){const e=new IntersectionObserver(e=>{e.forEach(e=>{!e.isIntersecting&&e.boundingClientRect.top<0?t.classList.add("is-stuck"):t.classList.remove("is-stuck")})},{threshold:0,rootMargin:"0px"});t.querySelectorAll(".seo44-sticky-sentinel").forEach(t=>{e.observe(t)})}if("IntersectionObserver"in window){const e=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const s=e.target.getAttribute("id"),o=t.querySelector(`a[href="#${s}"]`);o&&(t.querySelectorAll("a").forEach(e=>e.classList.remove("is-active")),o.classList.add("is-active"))}})},{root:null,rootMargin:"-100px 0px -60% 0px",threshold:0});t.querySelectorAll('a[href^="#"]').forEach(t=>{const s=t.getAttribute("href").substring(1),o=document.getElementById(s);o&&e.observe(o)})}})});