import{j as C,B as V,r as f,f4 as B,e as S}from"./index-dP1W1_bd.js";const W=({children:e})=>C.jsx(V,{flexDirection:"column",sx:{gap:20},pb:"60vh",children:e});var p=new Map,l=new WeakMap,w=0,j=void 0;function M(e){return e?(l.has(e)||(w+=1,l.set(e,w.toString())),l.get(e)):"0"}function T(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?M(e.root):e[t]}`).toString()}function _(e){const t=T(e);let n=p.get(t);if(!n){const i=new Map;let u;const o=new IntersectionObserver(s=>{s.forEach(r=>{var c;const g=r.isIntersecting&&u.some(d=>r.intersectionRatio>=d);e.trackVisibility&&typeof r.isVisible>"u"&&(r.isVisible=g),(c=i.get(r.target))==null||c.forEach(d=>{d(g,r)})})},e);u=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:i},p.set(t,n)}return n}function O(e,t,n={},i=j){if(typeof window.IntersectionObserver>"u"&&i!==void 0){const c=e.getBoundingClientRect();return t(i,{isIntersecting:i,target:e,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:c,intersectionRect:c,rootBounds:c}),()=>{}}const{id:u,observer:o,elements:s}=_(n),r=s.get(e)||[];return s.has(e)||s.set(e,r),r.push(t),o.observe(e),function(){r.splice(r.indexOf(t),1),r.length===0&&(s.delete(e),o.unobserve(e)),s.size===0&&(o.disconnect(),p.delete(u))}}function D({threshold:e,delay:t,trackVisibility:n,rootMargin:i,root:u,triggerOnce:o,skip:s,initialInView:r,fallbackInView:c,onChange:g}={}){var d;const[h,I]=f.useState(null),b=f.useRef(),[x,A]=f.useState({inView:!!r,entry:void 0});b.current=g,f.useEffect(()=>{if(s||!h)return;let v;return v=O(h,(m,y)=>{A({inView:m,entry:y}),b.current&&b.current(m,y),y.isIntersecting&&o&&v&&(v(),v=void 0)},{root:u,rootMargin:i,threshold:e,trackVisibility:n,delay:t},c),()=>{v&&v()}},[Array.isArray(e)?e.toString():e,h,u,i,o,s,n,c,t]);const R=(d=x.entry)==null?void 0:d.target,E=f.useRef();!h&&R&&!o&&!s&&E.current!==R&&(E.current=R,A({inView:!!r,entry:void 0}));const a=[I,x.inView,x.entry];return a.ref=a[0],a.inView=a[1],a.entry=a[2],a}const $={textDecoration:"none",scrollMarginTop:"5vh"},q=({name:e,children:t})=>{const{setVisibility:n,clear:i}=f.useContext(B),{ref:u}=D({threshold:[0,1],rootMargin:"0% 0% 0% 0%",root:document.getElementById("content"),onChange:(o,s)=>{n({anchor:e,visibility:s.intersectionRatio})}});return f.useEffect(()=>i,[i]),C.jsx(S,{sx:$,ref:u,id:e,children:t})};export{W as A,q as a};
