1var f=Object.defineProperty;var b=(s,t,e)=>t in s?f(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var a=(s,t,e)=>b(s,typeof t!="symbol"?t+"":t,e);import{g as S}from"./getMobileOS-hu0yApd5.js";import{g as h}from"../main-BdIqZQL9.js";function g(s){try{return document.querySelector(s)}catch{return null}}const m={observerOptions:{root:null,rootMargin:"0px",threshold:.5}};class y{constructor(){a(this,"_sections",[]);a(this,"_observer",null);this.init()}init(){const t=this,e=window.document.querySelectorAll('a[href*="#"]');e.length!==0&&(e.forEach(o=>{var l;const r=o.getAttribute("href")||"";if(/^https?:\/\//.test(r))return;const n=(l=r.match(/#.+/))==null?void 0:l[0],i=n&&g(n);i&&(this._sections.push(i),o.addEventListener("click",c=>{c.preventDefault(),this.smoothScrollToSection(i)}))}),this._observer=new IntersectionObserver(t.observerCallback.bind(this),m.observerOptions),this._sections.forEach(o=>{var r;return(r=this._observer)==null?void 0:r.observe(o)}),this.handleScrollingOnLoad())}observerCallback(t){t.filter(e=>e.isIntersecting).reduce((e,o)=>{const r=o.boundingClientRect.width*o.boundingClientRect.height;return r>(e.visibleArea||0)?{targetId:o.target.id,visibleArea:r}:e},{targetId:"",visibleArea:0})}smoothScrollToSection(t){const e=S()?800:500;setTimeout(()=>{const o=h(),r=t.getBoundingClientRect().top+window.scrollY-o;window.scrollTo({top:r,behavior:"smooth"})},e)}handleScrollingOnLoad(){const t=window.location.hash;if(!t)return;const e=document.querySelector(t);if(!e)return;const o=window.location.href.replace(t,"");history.replaceState(null,"",o),this.waitForLayoutStability(()=>{this.smoothScrollToSection(e),history.replaceState(null,"",t)})}waitForLayoutStability(t,e=2e3){let n=0,i=h();const l=Date.now(),c=()=>{const u=h(),d=Math.abs(u-i)<2;i=u,n=d?n+1:0,n>=5||Date.now()-l>e?t():requestAnimationFrame(c)};c()}}export{y as default};
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.