1import{r as e,j as t}from"./index-B4Q7pubO.js";import{M as n,c as o,u as r,P as s,d as i,b as c,L as u}from"./proxy-Dc0qMo3M.js";function f(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function l(...t){return e.useCallback(function(...e){return t=>{let n=!1;const o=e.map(e=>{const o=f(e,t);return n||"function"!=typeof o||(n=!0),o});if(n)return()=>{for(let t=0;t<o.length;t++){const n=o[t];"function"==typeof n?n():f(e[t],null)}}}}(...t),t)}class a extends e.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=t.offsetParent,n=o(e)&&e.offsetWidth||0,r=this.props.sizeRef.current;r.height=t.offsetHeight||0,r.width=t.offsetWidth||0,r.top=t.offsetTop,r.left=t.offsetLeft,r.right=n-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}}function p({children:o,isPresent:r,anchorX:s,root:i}){const c=e.useId(),u=e.useRef(null),f=e.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:p}=e.useContext(n),h=l(u,o?.ref);return e.useInsertionEffect(()=>{const{width:e,height:t,top:n,left:o,right:l}=f.current;if(r||!u.current||!e||!t)return;const a="left"===s?`left: ${o}`:`right: ${l}`;u.current.dataset.motionPopId=c;const h=document.createElement("style");p&&(h.nonce=p);const d=i??document.head;return d.appendChild(h),h.sheet&&h.sheet.insertRule(`\n [data-motion-pop-id="${c}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${t}px !important;\n ${a}px !important;\n top: ${n}px !important;\n }\n `),()=>{d.contains(h)&&d.removeChild(h)}},[r]),t.jsx(a,{isPresent:r,childRef:u,sizeRef:f,children:e.cloneElement(o,{ref:h})})}const h=({children:n,initial:o,isPresent:i,onExitComplete:c,custom:u,presenceAffectsLayout:f,mode:l,anchorX:a,root:h})=>{const m=r(d),g=e.useId();let x=!0,E=e.useMemo(()=>(x=!1,{id:g,initial:o,isPresent:i,custom:u,onExitComplete:e=>{m.set(e,!0);for(const t of m.values())if(!t)return;c&&c()},register:e=>(m.set(e,!1),()=>m.delete(e))}),[i,m,c]);return f&&x&&(E={...E}),e.useMemo(()=>{m.forEach((e,t)=>m.set(t,!1))},[i]),e.useEffect(()=>{!i&&!m.size&&c&&c()},[i]),"popLayout"===l&&(n=t.jsx(p,{isPresent:i,anchorX:a,root:h,children:n})),t.jsx(s.Provider,{value:E,children:n})};function d(){return new Map}const m=e=>e.key||"";function g(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}const x=({children:n,custom:o,initial:s=!0,onExitComplete:f,presenceAffectsLayout:l=!0,mode:a="sync",propagate:p=!1,anchorX:d="left",root:x})=>{const[E,P]=i(p),y=e.useMemo(()=>g(n),[n]),C=p&&!E?[]:y.map(m),R=e.useRef(!0),j=e.useRef(y),w=r(()=>new Map),[$,v]=e.useState(y),[L,M]=e.useState(y);c(()=>{R.current=!1,j.current=y;for(let e=0;e<L.length;e++){const t=m(L[e]);C.includes(t)?w.delete(t):!0!==w.get(t)&&w.set(t,!1)}},[L,C.length,C.join("-")]);const X=[];if(y!==$){let e=[...y];for(let t=0;t<L.length;t++){const n=L[t],o=m(n);C.includes(o)||(e.splice(t,0,n),X.push(n))}return"wait"===a&&X.length&&(e=X),M(g(e)),v(y),null}const{forceRender:A}=e.useContext(u);return t.jsx(t.Fragment,{children:L.map(e=>{const n=m(e),r=!(p&&!E)&&(y===L||C.includes(n));return t.jsx(h,{isPresent:r,initial:!(R.current&&!s)&&void 0,custom:o,presenceAffectsLayout:l,mode:a,root:x,onExitComplete:r?void 0:()=>{if(!w.has(n))return;w.set(n,!0);let e=!0;w.forEach(t=>{t||(e=!1)}
1),e&&(A?.(),M(j.current),p&&P?.(),f&&f())},anchorX:d,children:e},n)})})};export{x as A};
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.