System.register(["proxy-compare"],function(K){"use strict";var W,T;return{setters:[function(O){W=O.markToTrack,T=O.getUntracked}],execute:function(){K({getVersion:U,proxy:L,ref:B,snapshot:q,subscribe:_});const O=s=>typeof s=="object"&&s!==null,f=new WeakMap,v=new WeakSet,V=(s=Object.is,l=(e,w)=>new Proxy(e,w),P=e=>O(e)&&!v.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer),k=e=>{switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e}},u=new WeakMap,g=(e,w,d=k)=>{const a=u.get(e);if((a==null?void 0:a[0])===w)return a[1];const i=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return W(i,!0),u.set(e,[w,i]),Reflect.ownKeys(e).forEach(j=>{if(Object.getOwnPropertyDescriptor(i,j))return;const y=Reflect.get(e,j),{enumerable:E}=Reflect.getOwnPropertyDescriptor(e,j),c={value:y,enumerable:E,configurable:!0};if(v.has(y))W(y,!1);else if(y instanceof Promise)delete c.value,c.get=()=>d(y);else if(f.has(y)){const[M,x]=f.get(y);c.value=g(M,x(),d)}Object.defineProperty(i,j,c)}),Object.preventExtensions(i)},h=new WeakMap,b=[1,1],R=e=>{if(!O(e))throw new Error("object required");const w=h.get(e);if(w)return w;let d=b[0];const a=new Set,i=(n,t=++b[0])=>{d!==t&&(d=t,a.forEach(r=>r(n,t)))};let j=b[1];const y=(n=++b[1])=>(j!==n&&!a.size&&(j=n,c.forEach(([t])=>{const r=t[1](n);r>d&&(d=r)})),d),E=n=>(t,r)=>{const o=[...t];o[1]=[n,...o[1]],i(o,r)},c=new Map,M=(n,t)=>{if(a.size){const r=t[3](E(n));c.set(n,[t,r])}else c.set(n,[t])},x=n=>{var t;const r=c.get(n);r&&(c.delete(n),(t=r[1])==null||t.call(r))},N=n=>(a.add(n),a.size===1&&c.forEach(([t,r],o)=>{const z=t[3](E(o));c.set(o,[t,z])}),()=>{a.delete(n),a.size===0&&c.forEach(([t,r],o)=>{r&&(r(),c.set(o,[t]))})}),S=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e)),A=l(S,{deleteProperty(n,t){const r=Reflect.get(n,t);x(t);const o=Reflect.deleteProperty(n,t);return o&&i(["delete",[t],r]),o},set(n,t,r,o){const z=Reflect.has(n,t),D=Reflect.get(n,t,o);if(z&&(s(D,r)||h.has(r)&&s(D,h.get(r))))return!0;x(t),O(r)&&(r=T(r)||r);let m=r;if(r instanceof Promise)r.then(p=>{r.status="fulfilled",r.value=p,i(["resolve",[t],p])}).catch(p=>{r.status="rejected",r.reason=p,i(["reject",[t],p])});else{!f.has(r)&&P(r)&&(m=R(r));const p=!v.has(m)&&f.get(m);p&&M(t,p)}return Reflect.set(n,t,m,o),i(["set",[t],r,D]),!0}});h.set(e,A);const C=[S,y,g,N];return f.set(A,C),Reflect.ownKeys(e).forEach(n=>{const t=Object.getOwnPropertyDescriptor(e,n);"value"in t&&(A[n]=e[n],delete t.value,delete t.writable),Object.defineProperty(S,n,t)}),A})=>[R,f,v,s,l,P,k,u,g,h,b],[F]=V();function L(s={}){return F(s)}function U(s){const l=f.get(s);return l==null?void 0:l[1]()}function _(s,l,P){const k=f.get(s);let u;const g=[],h=k[3];let b=!1;const R=h(e=>{if(g.push(e),P){l(g.splice(0));return}u||(u=Promise.resolve().then(()=>{u=void 0,b&&l(g.splice(0))}))});return b=!0,()=>{b=!1,R()}}function q(s,l){const P=f.get(s),[k,u,g]=P;return g(k,u(),l)}function B(s){return v.add(s),s}const G=K("unstable_buildProxyFunction",V)}}});
