1import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{n as t,t as n}from"./jsx-runtime-RAvxtttA.js";import{t as r}from"./react-dom-TxzLKX4z.js";import{s as i}from"./button-D7HbPctT.js";var a=e(t(),1),o=n();function s(e,t){let n=a.createContext(t),r=e=>{let{children:t,...r}=e,i=a.useMemo(()=>r,Object.values(r));return(0,o.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=a.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function c(e,t=[]){let n=[];function r(t,r){let i=a.createContext(r),s=n.length;n=[...n,r];let c=t=>{let{scope:n,children:r,...c}=t,l=n?.[e]?.[s]||i,u=a.useMemo(()=>c,Object.values(c));return(0,o.jsx)(l.Provider,{value:u,children:r})};c.displayName=t+`Provider`;function l(n,o){let c=o?.[e]?.[s]||i,l=a.useContext(c);if(l)return l;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[c,l]}let i=()=>{let t=n.map(e=>a.createContext(e));return function(n){let r=n?.[e]||t;return a.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,l(i,...t)]}function l(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var u=globalThis?.document?a.useLayoutEffect:()=>{},d=e(r(),1);function f(e){let t=p(e),n=a.forwardRef((e,n)=>{let{children:r,...i}=e,s=a.Children.toArray(r),c=s.find(h);if(c){let e=c.props.children,r=s.map(t=>t===c?a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null:t);return(0,o.jsx)(t,{...i,ref:n,children:a.isValidElement(e)?a.cloneElement(e,void 0,r):null})}return(0,o.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function p(e){let t=a.forwardRef((e,t)=>{let{children:n,...r}=e;if(a.isValidElement(n)){let e=_(n),o=g(r,n.props);return n.type!==a.Fragment&&(o.ref=t?i(t,e):e),a.cloneElement(n,o)}return a.Children.count(n)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var m=Symbol(`radix.slottable`);function h(e){return a.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===m}function g(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function _(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var v=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=f(`Primitive.${t}`),r=a.forwardRef((e,r)=>{let{asChild:i,...a}=e,s=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,o.jsx)(s,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function y(e,t){e&&d.flushSync(()=>e.dispatchEvent(t))}function b(e){let t=a.useRef({value:e,previous:e});return a.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}export{s as a,u as i,v as n,c as o,y as r,b as t};
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.