import{t as w}from"./chunk-DZLz74EQ.js";import{t as I}from"./react-BcIddLXZ.js";import{t as M}from"./shim-Bk8nzKPV.js";var D=a=>{let t,i=new Set,v=(u,h)=>{let o=typeof u=="function"?u(t):u;if(!Object.is(o,t)){let e=t;t=h??(typeof o!="object"||!o)?o:Object.assign({},t,o),i.forEach(r=>r(t,e))}},d=()=>t,p={setState:v,getState:d,getInitialState:()=>y,subscribe:u=>(i.add(u),()=>i.delete(u)),destroy:()=>{i.clear()}},y=t=a(v,d,p);return p},R=a=>a?D(a):D,W=w((a=>{var t=I(),i=M();function v(e,r){return e===r&&(e!==0||1/e==1/r)||e!==e&&r!==r}var d=typeof Object.is=="function"?Object.is:v,p=i.useSyncExternalStore,y=t.useRef,u=t.useEffect,h=t.useMemo,o=t.useDebugValue;a.useSyncExternalStoreWithSelector=function(e,r,j,g,f){var l=y(null);if(l.current===null){var c={hasValue:!1,value:null};l.current=c}else c=l.current;l=h(function(){function x(n){if(!E){if(E=!0,b=n,n=g(n),f!==void 0&&c.hasValue){var s=c.value;if(f(s,n))return m=s}return m=n}if(s=m,d(b,n))return s;var V=g(n);return f!==void 0&&f(s,V)?(b=n,s):(b=n,m=V)}var E=!1,b,m,O=j===void 0?null:j;return[function(){return x(r())},O===null?void 0:function(){return x(O())}]},[r,j,g,f]);var S=p(e,l[0],l[1]);return u(function(){c.hasValue=!0,c.value=S},[S]),o(S),S}})),k=w(((a,t)=>{t.exports=W()}));export{R as n,k as t};
