1import{s as C}from"./D3NKxllR.js";import{d as x,g as c,c as I,h as w,i as L,w as A,a as f,e as n,F as $,D as B,t as _,o as m,n as O,u as k,a0 as z}from"./TvATKHO3.js";const N={class:"anchors","aria-hidden":"true"},S={class:"anchors__content"},T=["onClick"],W={class:"anchors__item-ghost"},D=["href"],j=x({__name:"AnchorNavigation",props:{anchors:{}},setup(p){const s=p;let u;const o=c(null),h=c(null),v=c(null),i=c(null);let r=null;const d=I(()=>s.anchors.map(C)),E=()=>{u=new IntersectionObserver(t=>{const e=t.find(l=>l.isIntersecting),a=e?d.value.indexOf(e.target.id):null;r===null?i.value=a:r===a&&(r=null)},{rootMargin:"-50% 0% -50% 0%",threshold:0})};w(()=>{E(),d.value.forEach(t=>{const e=document.getElementById(t);e&&u.observe(e)})}),L(()=>u?.disconnect()),A(i,t=>{if(!o.value)return;if(t===null){o.value.style.width="0px";return}const e=v.value?.children[t];e&&(h.value?.scrollTo({left:e.offsetLeft-h.value.clientWidth/2+e.clientWidth/2,behavior:"smooth"}),o.value.style.width=`${e.clientWidth}px`,o.value.style.transform=`translateX(${e.offsetLeft}px)`)});const b=t=>{r=t,i.value=t},g=t=>t.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),y=()=>window.scrollTo({top:0,behavior:"smooth"});return(t,e)=>(m(),f("div",N,[n("div",S,[n("div",{ref_key:"itemsEl",ref:h,class:"anchors__items"},[n("ul",{ref_key:"itemsListEl",ref:v},[(m(!0),f($,null,B(s.anchors,(a,l)=>(m(),f("li",{class:O(["anchors__item",{active:k(i)===l}]),onClick:F=>b(l)},[n("span",W,_(g(a)),1),n("a",{href:"#"+k(d)[l]},_(g(a)),9,D)],10,T))),256)),n("li",{ref_key:"underlineEl",ref:o,class:"anchors__underline"},null,512)],512)],512),n("button",{class:"anchors__top-btn",onClick:y},_(t.$t("navigation.to_top")),1)])]))}});function V(p){let s;return s=z().$nuxtSiteConfig,s||{}}export{j as _,V as u}; 2//# sourceMappingURL=DwDTMmnz.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.