import{c as a,d as i}from"./KHR_interactivity-DRPs30Rf.js";import{e as p,R as v}from"./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";import"./declarationMapper-CGPHX8aB.js";import"./objectModelMapping-DT0r674A.js";class c extends a{constructor(e){super(e),this.config=e,this.initPriority=1;for(const t in this.config.eventData)this.registerDataOutput(t,this.config.eventData[t].type)}_preparePendingTasks(e){const t=e.configuration.coordinator.getCustomEventObservable(this.config.eventId);if(t&&t.hasObservers()&&t.observers.length>i.MaxEventsPerType){this._reportError(e,`FlowGraphReceiveCustomEventBlock: Too many observers for event ${this.config.eventId}. Max is ${i.MaxEventsPerType}.`);return}const r=t.add(o=>{const n=Object.keys(o);for(const s of n)this.getDataOutput(s)?.setValue(o[s],e);this._execute(e)});e._setExecutionVariable(this,"_eventObserver",r)}_cancelPendingTasks(e){const t=e.configuration.coordinator.getCustomEventObservable(this.config.eventId);if(t){const r=e._getExecutionVariable(this,"_eventObserver",null);t.remove(r)}else p.Warn(`FlowGraphReceiveCustomEventBlock: Missing observable for event ${this.config.eventId}`)}_executeEvent(e,t){return!0}getClassName(){return"FlowGraphReceiveCustomEventBlock"}}v("FlowGraphReceiveCustomEventBlock",c);export{c as FlowGraphReceiveCustomEventBlock};
