text: import{a as r,g as c}from"./app.e8329c2e.js";function m(n){return{all:n=n||new Map,on:function(i,e){var t=n.get(i);t?t.push(e):n.set(i,[e])},off:function(i,e){var t=n.get(i);t&&(e?t.splice(t.indexOf(e)>>>0,1):n.set(i,[]))},emit:function(i,e){var t=n.get(i);t&&t.slice().map(function(o){o(e)}),(t=n.get("*"))&&t.slice().map(function(o){o(i,e)})}}}const a=m();function p(){return{emit:a.emit,on:a.on,off:a.off}}function l(n){const{uid:i,emit:e}=c(),{on:t,emit:o,off:s}=p();let u=n||`__initd__${i}`;return t(u,f=>{e("initd",f)}),r(()=>{e("unload"),s(u)}),{ready:f=>{o(u,f)}}}export{p as a,l as u};
  