1import{aC as N,aO as T}from"./BjETs6eS.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="00f4c699-d707-4624-8b34-9e89e065d144",e._sentryDebugIdIdentifier="sentry-dbid-00f4c699-d707-4624-8b34-9e89e065d144")}catch{}const _={LOGIN_COMPLETE:"login-complete",AFTER_LOGIN:"after-login",OAUTH_PROVIDER_CONNECTED:"oauth-provider-connected"},k=(e=null)=>{const s=N(new Map),h=t=>`${t}-acknowledged`,p=(t,r={},c=null)=>{const l=c||e;if(!l){console.error("No message type provided to listen for");return}const{useMessageChannel:E=!0,acknowledge:g=!0}=r,f=h(l);let a;try{a=new BroadcastChannel(l)}catch(o){console.error("BroadcastChannel is not supported in this environment",o);return}const i=o=>{if(o&&o.data===l){if(g)try{const n=new BroadcastChannel(f);n.postMessage(f),setTimeout(()=>{try{n.close()}catch{}},50)}catch{}t(o)}};return a.onmessage=i,s.value.set(l,{channel:a,handler:i}),()=>y(l)},y=(t=null)=>{const r=t||e;if(!r){console.error("No message type provided to stop listening for");return}const c=s.value.get(r);if(c&&c.channel)try{c.channel.close()}catch{}s.value.delete(r)},C=(t,r={})=>{const{eventType:c=null,targetOrigin:l="*",useMessageChannel:E=!0,timeout:g=500,waitForAcknowledgment:f=!0}=r,a=c||e;if(!a)return console.error("No message type provided to send"),Promise.reject(new Error("No message type provided"));const i=h(a),o=()=>{let n;try{n=new BroadcastChannel(a)}catch(d){return console.error("BroadcastChannel is not supported in this environment",d),null}return n.postMessage(a),setTimeout(()=>{try{n.close()}catch{}},50),!0};return f?new Promise(n=>{let d,w=!1;try{d=new BroadcastChannel(i)}catch{o(),n(!1);return}const v=u=>{if(!w){w=!0;try{d.close()}catch{}n(u)}};d.onmessage=u=>{u&&u.data===i&&v(!0)},o(),setTimeout(()=>v(!1),g)}):(o(),Promise.resolve(!0))},m=()=>{s.value.forEach(t=>{try{t.channel.close()}catch{}}),s.value.clear()};return T(()=>{m()}),{listen:p,stopListening:y,send:C,cleanup:m,setupDefaultListener:(t,r={})=>{if(e&&t)return p(t,r)}}};export{_ as W,k as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.