const e=require(`./chunk-BcutgqC9.cjs`);let t=require(`react`);t=e.n(t,1);let n=require(`react/jsx-runtime`);function r(e,r){let i=t.createContext(r),a=e=>{let{children:r,...a}=e,o=t.useMemo(()=>a,Object.values(a));return(0,n.jsx)(i.Provider,{value:o,children:r})};a.displayName=e+`Provider`;function o(n){let a=t.useContext(i);if(a)return a;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${e}\``)}return[a,o]}function i(e,r=[]){let i=[];function o(r,a){let o=t.createContext(a),s=i.length;i=[...i,a];let c=r=>{let{scope:i,children:a,...c}=r,l=i?.[e]?.[s]||o,u=t.useMemo(()=>c,Object.values(c));return(0,n.jsx)(l.Provider,{value:u,children:a})};c.displayName=r+`Provider`;function l(n,i){let c=i?.[e]?.[s]||o,l=t.useContext(c);if(l)return l;if(a!==void 0)return a;throw Error(`\`${n}\` must be used within \`${r}\``)}return[c,l]}let s=()=>{let n=i.map(e=>t.createContext(e));return function(r){let i=r?.[e]||n;return t.useMemo(()=>({[`__scope${e}`]:{...r,[e]:i}}),[r,i])}};return s.scopeName=e,[o,a(s,...r)]}function a(...e){let n=e[0];if(e.length===1)return n;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=r.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return t.useMemo(()=>({[`__scope${n.scopeName}`]:i}),[i])}};return r.scopeName=n.scopeName,r}typeof window<`u`&&window.document&&window.document.createElement;function o(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var s=globalThis?.document?t.useLayoutEffect:()=>{},c=t.useInsertionEffect||s;function l({prop:e,defaultProp:n,onChange:r=()=>{},caller:i}){let[a,o,s]=u({defaultProp:n,onChange:r}),c=e!==void 0,l=c?e:a;{let n=t.useRef(e!==void 0);t.useEffect(()=>{let e=n.current;e!==c&&console.warn(`${i} is changing from ${e?`controlled`:`uncontrolled`} to ${c?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),n.current=c},[c,i])}return[l,t.useCallback(t=>{if(c){let n=d(t)?t(e):t;n!==e&&s.current?.(n)}else o(t)},[c,e,o,s])]}function u({defaultProp:e,onChange:n}){let[r,i]=t.useState(e),a=t.useRef(r),o=t.useRef(n);return c(()=>{o.current=n},[n]),t.useEffect(()=>{a.current!==r&&(o.current?.(r),a.current=r)},[r,a]),[r,i,o]}function d(e){return typeof e==`function`}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return l}});
//# sourceMappingURL=dist-B9QvvA-B.cjs.map