1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[49135],{49135:(t,e,i)=>{i.r(e),i.d(e,{FlowGraphMultiGateBlock:()=>l,RegisterFlowGraphMultiGateBlock:()=>r});var s=i(39251),n=i(12939),u=i(90079),a=i(88473);class l extends s.u{constructor(t){super(t),this.config=t,this.outputSignals=[],this.reset=this._registerSignalInput("reset"),this.lastIndex=this.registerDataOutput("lastIndex",n.x2,new u.P(-1)),this.setNumberOfOutputSignals(t?.outputSignalCount)}_getNextIndex(t){if(!t.includes(!1)&&this.config.isLoop&&t.fill(!1),!this.config.isRandom)return t.indexOf(!1);{let e=t.map((t,e)=>t?-1:e).filter(t=>-1!==t);return e.length?e[Math.floor(Math.random()*e.length)]:-1}}setNumberOfOutputSignals(t=1){for(;this.outputSignals.length>t;){let t=this.outputSignals.pop();t&&(t.disconnectFromAll(),this._unregisterSignalOutput(t.name))}for(;this.outputSignals.length<t;)this.outputSignals.push(this._registerSignalOutput(`out_${this.outputSignals.length}`))}_execute(t,e){if(t._hasExecutionVariable(this,"indexesUsed")||t._setExecutionVariable(this,"indexesUsed",this.outputSignals.map(()=>!1)),e===this.reset){t._deleteExecutionVariable(this,"indexesUsed"),this.lastIndex.setValue(new u.P(-1),t);return}let i=t._getExecutionVariable(this,"indexesUsed",[]),s=this._getNextIndex(i);s>-1&&(this.lastIndex.setValue(new u.P(s),t),i[s]=!0,t._setExecutionVariable(this,"indexesUsed",i),this.outputSignals[s]._activateSignal(t))}getClassName(){return"FlowGraphMultiGateBlock"}serialize(t){super.serialize(t),t.config.outputSignalCount=this.config.outputSignalCount,t.config.isRandom=this.config.isRandom,t.config.loop=this.config.isLoop,t.config.startIndex=this.config.startIndex}}let o=!1;function r(){o||(o=!0,(0,a.Y5)("FlowGraphMultiGateBlock",l))}r()}}]);
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.