function e(e,...t){if(typeof window>`u`)return;let n=t[0];window.dispatchEvent(n===void 0?new Event(e):new CustomEvent(e,{detail:n}))}function t(e,t){if(typeof window>`u`)return()=>{};let n=e=>{let n=e.detail;t(n)};return window.addEventListener(e,n),()=>window.removeEventListener(e,n)}export{t as n,e as t};