1import{_ as V}from"./C06AtsN8.js";import{aO as $,aS as u,aM as w,bL as H,aH as R,aN as T,aK as N,aL as z,bg as q,b5 as p,b2 as b,b8 as L,bd as U,bi as F,bh as K,b1 as o,b7 as d,b6 as P,c$ as W,b9 as j,bn as G,bb as J}from"./usJkKO7w.js";import{d as Q}from"./DwG9rr4v.js";import{a as X,u as I}from"./Cx6Rj2Bu.js";import"./B3I0mlxT.js";try{let a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},c=new a.Error().stack;c&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[c]="2d06e8f9-73fa-4026-be64-2d37d0e309e2",a._sentryDebugIdIdentifier="sentry-dbid-2d06e8f9-73fa-4026-be64-2d37d0e309e2")}catch{}const Y=["aria-label"],Z=["href","aria-current"],ee=$({__name:"VAnchors",props:{anchors:{}},setup(a){const{width:c}=Q(),f=a,{topBarHeight:_}=X(),{isHidden:B}=I(),E=u(()=>f.anchors.map(e=>({...e,href:`#${e.id}`}))),x=u(()=>f.anchors.map(e=>document.getElementById(e.id))),h=[],i=w(Array(f.anchors.length).fill(null)),m=w([]);function S(e,s){e.intersectionRatio>0?i.value[s]=e:i.value[s]&&(i.value[s]=null)}function g(){x.value.forEach((e,s)=>{var r;if(!e){const n=m.value[s];(r=n==null?void 0:n.setAttribute)==null||r.call(n,"inert","true");return}const t=new IntersectionObserver(n=>S(n[0],s),{rootMargin:"0px 0px 0px 0px",threshold:[0,.5,1]});t.observe(e),h[s]=t})}function v(){h.forEach(e=>{e==null||e.disconnect(),e=null}),h.length=0}function C(){v(),g()}H(g),R(v),T(c,C);const M=u(()=>{const e=i.value.filter(t=>!!t);if(e.length){if(e.length===1)return i.value.findIndex(t=>!!t)}else return-1;const s=i.value.reduce((t,r)=>r&&t&&r.intersectionRatio>t.intersectionRatio?r:t||r);return i.value.findIndex(t=>(s==null?void 0:s.target)&&(t==null?void 0:t.target.isEqualNode(s.target)))}),k=N(),y=z();function A(e){var r;const s=((r=e.currentTarget)==null?void 0:r.getAttribute("href"))||"",t=document.querySelector(s);k.push({path:y.path,hash:y.hash,replace:!0}),t&&t.scrollIntoView({behavior:"smooth"})}const{isHidden:D}=I(),l=q(),O=u(()=>[l.root,D.value&&l["root--top-bar-hidden"]]);return(e,s)=>{const t=V;return b(),p("nav",{class:d([o(O),o(B)&&o(l)["button--top-bar-hidden"]]),"aria-label":e.$t("anchor_list.aria"),style:G(o(_)?{"--v-top-bar-height":`${o(_)-1}px`}:void 0)},[L(t,{class:d(o(l).list),tag:"ol"},{default:U(()=>[(b(!0),p(F,null,K(o(E),(r,n)=>(b(),p("li",{key:r.id,class:d(o(l).item)},[P("a",{ref_for:!0,ref_key:"linkElement",ref:m,class:d(o(l).anchor),href:r.href,"aria-current":n===o(M),onClick:W(A,["prevent"])},j(r.label),11,Z)],2))),128))]),_:1},8,["class"])],14,Y)}}}),te="_root_1bsas_5",se="_list_1bsas_30",re="_item_1bsas_47",oe="_anchor_1bsas_51",ne={root:te,"root--top-bar-hidden":"_root--top-bar-hidden_1bsas_26",list:se,item:re,anchor:oe},ae={$style:ne},fe=J(ee,[["__cssModules",ae]]);export{fe 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.