import{u as a,v as f,w as c,x as l,y as b,z as _,A as d,B as p}from"./BLXpcXkd.js";let u=!1,t=Symbol();function g(e,n,r){const s=r[n]??={store:null,source:f(void 0),unsubscribe:a};if(s.store!==e&&!(t in r))if(s.unsubscribe(),s.store=e??null,e==null)s.source.v=void 0,s.unsubscribe=a;else{var i=!0;s.unsubscribe=c(e,o=>{i?s.source.v=o:l(s.source,o)}),i=!1}return e&&t in r?b(e):_(s.source)}function m(){const e={};function n(){d(()=>{for(var r in e)e[r].unsubscribe();p(e,t,{enumerable:!1,value:!0})})}return[e,n]}function y(e,n,r){return e.set(r),n}function w(e){var n=u;try{return u=!1,[e(),u]}finally{u=n}}export{g as a,y as b,w as c,m as s};
