import{A as r}from"./abstractAudioBus--TUgnn12.js";import{_ as o}from"./webAudioBaseSubGraph-ymNBfs1g.js";import"./audioEngine-CbOwYhF1.js";import"./index-6jOCfdig.js";import"./index-Ds2meNS5.js";import"./svelte/svelte_svelte.js";import"./svelte/svelte_animate.js";import"./svelte/svelte_attachments.js";import"./svelte/svelte_easing.js";import"./svelte/svelte_internal_client.js";import"./svelte/svelte_internal_flags_async.js";import"./svelte/svelte_internal_flags_legacy.js";import"./svelte/svelte_internal_flags_tracing.js";import"./svelte/svelte_internal_server.js";import"./svelte/svelte_legacy.js";import"./svelte/svelte_motion.js";import"./svelte/svelte_reactivity.js";import"./svelte/svelte_reactivity_window.js";import"./svelte/svelte_server.js";import"./svelte/svelte_store.js";import"./svelte/svelte_transition.js";import"./svelte/svelte_events.js";class n extends r{constructor(t,i){super(t,i)}}class e extends n{constructor(t,i){super(t,i),this._subGraph=new e._SubGraph(this)}async _initAsync(t){if(await this._subGraph.initAsync(t),this.engine.mainOut&&!this._connect(this.engine.mainOut))throw new Error("Connect failed");this.engine._addMainBus(this)}dispose(){super.dispose(),this.engine._removeMainBus(this)}get _inNode(){return this._subGraph._inNode}get _outNode(){return this._subGraph._outNode}_connect(t){return super._connect(t)?(t._inNode&&this._outNode?.connect(t._inNode),!0):!1}_disconnect(t){return super._disconnect(t)?(t._inNode&&this._outNode?.disconnect(t._inNode),!0):!1}getClassName(){return"_WebAudioMainBus"}}e._SubGraph=class extends o{get _downstreamNodes(){return this._owner._downstreamNodes??null}};export{e as _WebAudioMainBus};
