@babylonjs/viewer
Version:
The Babylon Viewer aims to simplify a specific but common Babylon.js use case: loading, viewing, and interacting with a 3D model.
1 lines • 74.9 kB
JavaScript
import{y as e,M as t,b3 as o,V as n,bc as a,aD as s,i,b1 as r,l,v as c,O as h,q as p,s as u,cC as d,by as m,cd as w,aY as f,A as k,bo as g,bp as G}from"./index-BPURObVq.esm.min.js";import{o as B,m as y,F as _,g as v,r as b,s as F}from"./declarationMapper-D_filC93.esm.min.js";import{G as C,A as E}from"./objectModelMapping-ClgDmo5Q.esm.min.js";function x(e){return"Vector2"===e||"Vector3"===e||"Vector4"===e||"Quaternion"===e||"Color3"===e||"Color4"===e}function I(e,t){if(!e||!e.id&&!e.name)return;const o=t.getNodes().filter(t=>e.id?t.id===e.id:t.name===e.name);if(0===o.length)return;const n=e.type??e.className,a=n?o.filter(e=>e.getClassName()===n):[],s=a.length>0?a:o;return(e.uniqueId?s.find(t=>t.uniqueId===e.uniqueId):void 0)??s[0]}function O(t,o,n){const a=o?.getClassName?.()??"";if(x(a)||function(e){return"Matrix"===e||"Matrix2D"===e||"Matrix3D"===e}(a))n[t]={value:o.asArray(),className:a};else if("FlowGraphInteger"===a)n[t]={value:o.value,className:a};else if(a&&(o.id||o.name))n[t]={id:o.id,name:o.name,className:a,uniqueId:o.uniqueId};else if("object"!=typeof o||null===o)n[t]=o;else{if("pathConverter"===t)return;if(Object.values(o).some(e=>"function"==typeof e))return;try{n[t]=JSON.parse(JSON.stringify(o))}catch{e.Warn(`FlowGraph serialization: value for key "${t}" is not JSON-serializable and was skipped.`)}}}function T(e,l,c,h){const p=l[e];let u;const d=p?.type??p?.className,m=I(p,h);if(m)u=m;else if(x(d))u=function(e,t,l=!1){if("Vector2"===e)return o.FromArray(t);if("Vector3"===e)return l&&(t[2]*=-1),n.FromArray(t);if("Vector4"===e)return a.FromArray(t);if("Quaternion"===e)return l&&(t[2]*=-1,t[3]*=-1),s.FromArray(t);if("Color3"===e)return new i(t[0],t[1],t[2]);if("Color4"===e)return new r(t[0],t[1],t[2],t[3]);throw new Error(`Unknown vector class name ${e}`)}(d,p.value);else if(function(e){return"AnimationGroup"===e}(d)){const e=h.animationGroups.filter(e=>e.name===p.name);u=1===e.length?e[0]:e.find(e=>e.uniqueId===p.uniqueId)}else u="Matrix"===d?t.FromArray(p.value):"Matrix2D"===d?new B(p.value):"Matrix3D"===d?new y(p.value):"FlowGraphInteger"===d?_.FromValue(p.value):"number"===d||"string"===d||"boolean"===d?p.value[0]:p&&void 0!==p.value?p.value:Array.isArray(p)&&p.length>0&&"object"==typeof p[0]&&null!==p[0]&&"eventData"in p[0]?p.reduce((e,t)=>t.eventData?(e[t.id]={type:v(t.type)},void 0!==t.value&&(e[t.id].value=T("value",t,c,h)),e):e,{}):p;return u}var M,S;function P(e,t,o,n){switch(t){case"Animation":return n?e.animations.find(e=>e.uniqueId===o)??null:e.animations[o]??null;case"AnimationGroup":return n?e.animationGroups.find(e=>e.uniqueId===o)??null:e.animationGroups[o]??null;case"Mesh":return n?e.meshes.find(e=>e.uniqueId===o)??null:e.meshes[o]??null;case"Material":return n?e.materials.find(e=>e.uniqueId===o)??null:e.materials[o]??null;case"Camera":return n?e.cameras.find(e=>e.uniqueId===o)??null:e.cameras[o]??null;case"Light":return n?e.lights.find(e=>e.uniqueId===o)??null:e.lights[o]??null;default:return null}}!function(e){e.Animation="Animation",e.AnimationGroup="AnimationGroup",e.Mesh="Mesh",e.Material="Material",e.Camera="Camera",e.Light="Light"}(M||(M={})),function(e){e.ExecuteBlock="ExecuteBlock",e.ExecuteEvent="ExecuteEvent",e.TriggerConnection="TriggerConnection",e.ContextVariableSet="ContextVariableSet",e.GlobalVariableSet="GlobalVariableSet",e.GlobalVariableDelete="GlobalVariableDelete",e.GlobalVariableGet="GlobalVariableGet",e.AddConnection="AddConnection",e.GetConnectionValue="GetConnectionValue",e.SetConnectionValue="SetConnectionValue",e.ActivateSignal="ActivateSignal",e.ContextVariableGet="ContextVariableGet"}(S||(S={}));class V{constructor(){this.logToConsole=!1,this.log=[]}addLogItem(t){if(t.time||(t.time=Date.now()),this.log.push(t),this.logToConsole){const o=t.payload?.value;"object"==typeof o&&o.getClassName?e.Log(`[FGLog] ${t.className}:${t.uniqueId.split("-")[0]} ${t.action} - ${JSON.stringify(o.getClassName())}: ${o.toString()}`):e.Log(`[FGLog] ${t.className}:${t.uniqueId.split("-")[0]} ${t.action} - ${JSON.stringify(t.payload)}`)}}getItemsOfType(e){return this.log.filter(t=>t.action===e)}}let N=(()=>{var e;let t,o,n=[],a=[],s=[],i=[];return e=class{get enableLogging(){return this._enableLogging}set enableLogging(e){this._enableLogging!==e&&(this._enableLogging=e,this._enableLogging?(this.logger=new V,this.logger.logToConsole=!0):this.logger=null)}constructor(e){this.uniqueId=l(this,n,c()),this.name=(l(this,a),l(this,s,"")),this._userVariables=(l(this,i),{}),this._variableTypes={},this._executionVariables={},this._globalContextVariables={},this._connectionValues={},this._pendingBlocks=[],this._executionId=0,this.onNodeExecutedObservable=new h,this.onBreakpointHitObservable=new h,this.breakpointPredicate=null,this._pendingActivation=null,this._stepMode=!1,this._skipBreakpointForBlockId=null,this.treatDataAsRightHanded=!1,this._enableLogging=!1,this._configuration=e,this.assetsContext=e.assetsContext??e.scene}hasVariable(e){return e in this._userVariables}setVariable(e,t){this._userVariables[e]=t,this.logger?.addLogItem({time:Date.now(),className:this.getClassName(),uniqueId:this.uniqueId,action:"ContextVariableSet",payload:{name:e,value:t}})}getAsset(e,t){return P(this.assetsContext,e,t)}getVariable(e){return this.logger?.addLogItem({time:Date.now(),className:this.getClassName(),uniqueId:this.uniqueId,action:"ContextVariableGet",payload:{name:e,value:this._userVariables[e]}}),this._userVariables[e]}get userVariables(){return this._userVariables}setVariableType(e,t){this._variableTypes[e]=t}getVariableType(e){return this._variableTypes[e]}get variableTypes(){return this._variableTypes}getScene(){return this._configuration.scene}_getUniqueIdPrefixedName(e,t){return`${e.uniqueId}_${t}`}_getGlobalContextVariable(e,t){return this.logger?.addLogItem({time:Date.now(),className:this.getClassName(),uniqueId:this.uniqueId,action:"GlobalVariableGet",payload:{name:e,defaultValue:t,possibleValue:this._globalContextVariables[e]}}),this._hasGlobalContextVariable(e)?this._globalContextVariables[e]:t}_setGlobalContextVariable(e,t){this.logger?.addLogItem({time:Date.now(),className:this.getClassName(),uniqueId:this.uniqueId,action:"GlobalVariableSet",payload:{name:e,value:t}}),this._globalContextVariables[e]=t}_deleteGlobalContextVariable(e){this.logger?.addLogItem({time:Date.now(),className:this.getClassName(),uniqueId:this.uniqueId,action:"GlobalVariableDelete",payload:{name:e}}),delete this._globalContextVariables[e]}_hasGlobalContextVariable(e){return e in this._globalContextVariables}_setExecutionVariable(e,t,o){this._executionVariables[this._getUniqueIdPrefixedName(e,t)]=o}_getExecutionVariable(e,t,o){return this._hasExecutionVariable(e,t)?this._executionVariables[this._getUniqueIdPrefixedName(e,t)]:o}_deleteExecutionVariable(e,t){delete this._executionVariables[this._getUniqueIdPrefixedName(e,t)]}_hasExecutionVariable(e,t){return this._getUniqueIdPrefixedName(e,t)in this._executionVariables}_hasConnectionValue(e){return e.uniqueId in this._connectionValues}_setConnectionValue(e,t){this._connectionValues[e.uniqueId]=t,this.logger?.addLogItem({time:Date.now(),className:this.getClassName(),uniqueId:this.uniqueId,action:"SetConnectionValue",payload:{connectionPointId:e.uniqueId,value:t}})}_setConnectionValueByKey(e,t){this._connectionValues[e]=t}_getConnectionValue(e){return this.logger?.addLogItem({time:Date.now(),className:this.getClassName(),uniqueId:this.uniqueId,action:"GetConnectionValue",payload:{connectionPointId:e.uniqueId,value:this._connectionValues[e.uniqueId]}}),this._connectionValues[e.uniqueId]}get configuration(){return this._configuration}get hasPendingBlocks(){return this._pendingBlocks.length>0}_addPendingBlock(e){this._pendingBlocks.includes(e)||(this._pendingBlocks.push(e),this._pendingBlocks.sort((e,t)=>e.priority-t.priority))}_removePendingBlock(e){const t=this._pendingBlocks.indexOf(e);-1!==t&&this._pendingBlocks.splice(t,1)}_clearPendingBlocks(){for(const e of this._pendingBlocks)e._cancelPendingTasks(this);this._pendingBlocks.length=0}_notifyExecuteNode(e){this.onNodeExecutedObservable.notifyObservers(e),this.logger?.addLogItem({time:Date.now(),className:e.getClassName(),uniqueId:e.uniqueId,action:"ExecuteBlock"})}_notifyOnTick(e){this._setGlobalContextVariable("timeSinceStart",e.timeSinceStart),this._setGlobalContextVariable("deltaTime",e.deltaTime);for(const e of this._pendingBlocks)e._executeOnTick?.(this)}_increaseExecutionId(){this._executionId++}get executionId(){return this._executionId}_shouldBreak(e,t){return this._skipBreakpointForBlockId===e.uniqueId?(this._skipBreakpointForBlockId=null,!1):!!this._pendingActivation||(this._stepMode?(this._stepMode=!1,this._pendingActivation={block:e,context:this,signal:t},this.onBreakpointHitObservable.notifyObservers(this._pendingActivation),!0):!(!this.breakpointPredicate||!this.breakpointPredicate(e))&&(this._pendingActivation={block:e,context:this,signal:t},this.onBreakpointHitObservable.notifyObservers(this._pendingActivation),!0))}get pendingActivation(){return this._pendingActivation}continueExecution(){const e=this._pendingActivation;e&&(this._pendingActivation=null,this._skipBreakpointForBlockId=e.block.uniqueId,e.signal._activateSignal(this),this._skipBreakpointForBlockId=null)}stepExecution(){const e=this._pendingActivation;e&&(this._pendingActivation=null,this._stepMode=!0,this._skipBreakpointForBlockId=e.block.uniqueId,e.signal._activateSignal(this),this._stepMode=!1,this._skipBreakpointForBlockId=null)}_clearPendingActivation(){this._pendingActivation=null,this._stepMode=!1,this._skipBreakpointForBlockId=null}serialize(e={},t=O){e.uniqueId=this.uniqueId,e.name=this.name,e._userVariables={};for(const o in this._userVariables)t(o,this._userVariables[o],e._userVariables);Object.keys(this._variableTypes).length>0&&(e._variableTypes={...this._variableTypes}),e._connectionValues={};for(const o in this._connectionValues)t(o,this._connectionValues[o],e._connectionValues);this.assetsContext!==this.getScene()&&(e._assetsContext={meshes:this.assetsContext.meshes.map(e=>e.id),materials:this.assetsContext.materials.map(e=>e.id),textures:this.assetsContext.textures.map(e=>e.name),animations:this.assetsContext.animations.map(e=>e.name),lights:this.assetsContext.lights.map(e=>e.id),cameras:this.assetsContext.cameras.map(e=>e.id),sounds:this.assetsContext.sounds?.map(e=>e.name),skeletons:this.assetsContext.skeletons.map(e=>e.id),particleSystems:this.assetsContext.particleSystems.map(e=>e.name),geometries:this.assetsContext.geometries.map(e=>e.id),multiMaterials:this.assetsContext.multiMaterials.map(e=>e.id),transformNodes:this.assetsContext.transformNodes.map(e=>e.id)})}getClassName(){return"FlowGraphContext"}},(()=>{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t=[u()],o=[u()],p(null,null,t,{kind:"field",name:"uniqueId",static:!1,private:!1,access:{has:e=>"uniqueId"in e,get:e=>e.uniqueId,set:(e,t)=>{e.uniqueId=t}},metadata:r},n,a),p(null,null,o,{kind:"field",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:r},s,i),r&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r})})(),e})();var j;!function(e){e[e.Input=0]="Input",e[e.Output=1]="Output"}(j||(j={}));class A{constructor(e,t,o){this._ownerBlock=o,this._connectedPoint=[],this.uniqueId=c(),this.connectedPointIds=[],this.name=e,this._connectionType=t}get connectionType(){return this._connectionType}_isSingularConnection(){return!0}isConnected(){return this._connectedPoint.length>0}connectTo(e){if(this._connectionType===e._connectionType)throw new Error(`Cannot connect two points of type ${this.connectionType}`);if(this._isSingularConnection()&&this._connectedPoint.length>0||e._isSingularConnection()&&e._connectedPoint.length>0)throw new Error("Max number of connections for point reached");this._connectedPoint.push(e),e._connectedPoint.push(this)}disconnectFrom(e,t=!0){const o=this._connectedPoint.indexOf(e),n=e._connectedPoint.indexOf(this);-1!==o&&-1!==n&&(t&&this._connectedPoint.splice(o,1),e._connectedPoint.splice(n,1))}disconnectFromAll(){for(const e of this._connectedPoint)this.disconnectFrom(e,!1);this._connectedPoint.length=0}dispose(){for(const e of this._connectedPoint)this.disconnectFrom(e)}serialize(e={}){e.uniqueId=this.uniqueId,e.name=this.name,e._connectionType=this._connectionType,e.connectedPointIds=[],e.className=this.getClassName();for(const t of this._connectedPoint)e.connectedPointIds.push(t.uniqueId)}getClassName(){return"FGConnection"}deserialize(e){this.uniqueId=e.uniqueId,this.name=e.name,this._connectionType=e._connectionType,this.connectedPointIds=e.connectedPointIds}}class D extends A{constructor(e,t,o,n,a=n.defaultValue,s=!1){super(e,t,o),this.richType=n,this._defaultValue=a,this._optional=s,this._isDisabled=!1,this._lastValue=null,this.dataTransformer=null,this.onValueChangedObservable=new h}get optional(){return this._optional}get isDisabled(){return this._isDisabled}set isDisabled(e){this._isDisabled!==e&&(this._isDisabled=e,this._isDisabled&&this.disconnectFromAll())}_isSingularConnection(){return 0===this.connectionType}setValue(e,t){t._getConnectionValue(this)!==e&&(t._setConnectionValue(this,e),this.onValueChangedObservable.notifyObservers(e))}resetToDefaultValue(e){e._setConnectionValue(this,this._defaultValue)}_reresolveDefaultValueForScene(e){const t=this._defaultValue;if(!t||"object"!=typeof t)return;let o;if("function"==typeof t.getClassName&&"function"==typeof t.getScene){if(t.getScene()===e)return;o={id:t.id,name:t.name,className:t.getClassName(),uniqueId:t.uniqueId}}else{if("string"!=typeof t.className||!t.id&&!t.name||void 0!==t.value)return;o=t}const n=I(o,e);n&&(this._defaultValue=n)}connectTo(e){this._isDisabled||super.connectTo(e)}_getValueOrDefault(e){const t=e._getConnectionValue(this)??this._defaultValue;return this.dataTransformer?this.dataTransformer(t):t}getValue(e){if(1===this.connectionType){e._notifyExecuteNode(this._ownerBlock),this._ownerBlock._updateOutputs(e);const t=this._getValueOrDefault(e);return this._lastValue=t,this.richType.typeTransformer?this.richType.typeTransformer(t):t}const t=this.isConnected()?this._connectedPoint[0].getValue(e):this._getValueOrDefault(e);return this._lastValue=t,this.richType.typeTransformer?this.richType.typeTransformer(t):t}_getLastValue(){return this._lastValue}getClassName(){return"FlowGraphDataConnection"}serialize(e={}){super.serialize(e),e.richType={},this.richType.serialize(e.richType),e.optional=this._optional,O("defaultValue",this._defaultValue,e)}}class q{constructor(e){this.config=e,this.uniqueId=c(),this.name=this.config?.name??this.getClassName(),this.dataInputs=[],this.dataOutputs=[]}_updateOutputs(e){}registerDataInput(e,t,o){const n=new D(e,0,this,t,o);return this.dataInputs.push(n),n}registerDataOutput(e,t,o){const n=new D(e,1,this,t,o);return this.dataOutputs.push(n),n}getDataInput(e){return this.dataInputs.find(t=>t.name===e)}getDataOutput(e){return this.dataOutputs.find(t=>t.name===e)}serialize(e={},t=O){if(e.uniqueId=this.uniqueId,e.config={},this.config){const o=this.config,n=Object.keys(o);for(const a of n)t(a,o[a],e.config)}e.dataInputs=[],e.dataOutputs=[],e.className=this.getClassName();for(const t of this.dataInputs){const o={};t.serialize(o),e.dataInputs.push(o)}for(const t of this.dataOutputs){const o={};t.serialize(o),e.dataOutputs.push(o)}}deserialize(e){}_log(e,t,o){e.logger?.addLogItem({action:t,payload:o,className:this.getClassName(),uniqueId:this.uniqueId})}getClassName(){return"FlowGraphBlock"}}class R extends A{constructor(){super(...arguments),this.priority=0,this._lastActivationTime=-1}_isSingularConnection(){return!1}connectTo(e){super.connectTo(e),this._connectedPoint.sort((e,t)=>t.priority-e.priority)}_activateSignal(e){if(this._lastActivationTime=performance.now(),e.logger?.addLogItem({action:"ActivateSignal",className:this._ownerBlock.getClassName(),uniqueId:this._ownerBlock.uniqueId,payload:{connectionType:this.connectionType,name:this.name}}),0===this.connectionType){if(e._shouldBreak(this._ownerBlock,this))return;e._notifyExecuteNode(this._ownerBlock);const t=performance.now();this._ownerBlock._execute(e,this),this._ownerBlock._lastExecutionTime=performance.now()-t,e._increaseExecutionId()}else for(const t of this._connectedPoint)t._activateSignal(e)}}class L extends q{constructor(e){super(e),this.priority=0,this._lastExecutionTime=-1,this.signalInputs=[],this.signalOutputs=[],this.in=this._registerSignalInput("in"),this.error=this._registerSignalOutput("error")}_registerSignalInput(e){const t=new R(e,0,this);return this.signalInputs.push(t),t}_registerSignalOutput(e){const t=new R(e,1,this);return this.signalOutputs.push(t),t}_unregisterSignalInput(e){const t=this.signalInputs.findIndex(t=>t.name===e);-1!==t&&(this.signalInputs[t].dispose(),this.signalInputs.splice(t,1))}_unregisterSignalOutput(e){const t=this.signalOutputs.findIndex(t=>t.name===e);-1!==t&&(this.signalOutputs[t].dispose(),this.signalOutputs.splice(t,1))}_reportError(e,t){this.error.payload="string"==typeof t?new Error(t):t,this.error._activateSignal(e)}getSignalInput(e){return this.signalInputs.find(t=>t.name===e)}getSignalOutput(e){return this.signalOutputs.find(t=>t.name===e)}serialize(e={}){super.serialize(e),e.signalInputs=[],e.signalOutputs=[];for(const t of this.signalInputs){const o={};t.serialize(o),e.signalInputs.push(o)}for(const t of this.signalOutputs){const o={};t.serialize(o),e.signalOutputs.push(o)}}deserialize(e){for(let t=0;t<e.signalInputs.length;t++){const o=this.getSignalInput(e.signalInputs[t].name);if(!o)throw new Error("Could not find signal input with name "+e.signalInputs[t].name+" in block "+e.className);o.deserialize(e.signalInputs[t])}for(let t=0;t<e.signalOutputs.length;t++){const o=this.getSignalOutput(e.signalOutputs[t].name);if(!o)throw new Error("Could not find signal output with name "+e.signalOutputs[t].name+" in block "+e.className);o.deserialize(e.signalOutputs[t])}}getClassName(){return"FlowGraphExecutionBlock"}}class z extends L{constructor(e){super(e),this.out=this._registerSignalOutput("out")}}class U extends z{constructor(e,t){if(super(e),this._eventsSignalOutputs={},this.done=this._registerSignalOutput("done"),t)for(const e of t)this._eventsSignalOutputs[e]=this._registerSignalOutput(e+"Event")}_executeOnTick(e){}_startPendingTasks(e){e._getExecutionVariable(this,"_initialized",!1)&&(this._cancelPendingTasks(e),this._resetAfterCanceled(e)),this._preparePendingTasks(e),e._addPendingBlock(this),this.out._activateSignal(e),e._setExecutionVariable(this,"_initialized",!0)}_resetAfterCanceled(e){e._deleteExecutionVariable(this,"_initialized"),e._removePendingBlock(this)}}const K=d()&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);function H(e,t){return!(!e.parent||e.parent!==t&&!H(e.parent,t))}function W(e){if(e.getClassName)return e.getClassName()}function $(e,t){return e===t&&("Vector2"===e||"Vector3"===e||"Vector4"===e||"Quaternion"===e)}function J(e,t){return e===t&&("Matrix"===e||"Matrix2D"===e||"Matrix3D"===e)}function Q(e,t){return"FlowGraphInteger"===e&&"FlowGraphInteger"===t}function Y(e,t){const o="number"==typeof e||"number"==typeof e?.value;return o&&!t?!isNaN(Z(e)):o}function Z(e){return"number"==typeof e?e:e.value}class X{constructor(e){this.onEventTriggeredObservable=new h,this.sceneReadyTriggered=!1,this._pointerUnderMeshState={},this._onBlurHandler=null,this.pressedKeys=new Set,this._startingTime=0,this._scene=e,this._initialize()}_initialize(){this._sceneReadyObserver=this._scene.onReadyObservable.addOnce(()=>{this.sceneReadyTriggered||(this.onEventTriggeredObservable.notifyObservers({type:"SceneReady"}),this.sceneReadyTriggered=!0)}),this._sceneDisposeObserver=this._scene.onDisposeObservable.add(()=>{this.onEventTriggeredObservable.notifyObservers({type:"SceneDispose"})}),this._sceneOnBeforeRenderObserver=this._scene.onBeforeRenderObservable.add(()=>{const e=this._scene.getEngine().getDeltaTime()/1e3;this.onEventTriggeredObservable.notifyObservers({type:"SceneBeforeRender",payload:{timeSinceStart:this._startingTime,deltaTime:e}}),this._startingTime+=e}),this._meshPickedObserver=this._scene.onPointerObservable.add(e=>{this.onEventTriggeredObservable.notifyObservers({type:"MeshPick",payload:e})},m.POINTERPICK),this._pointerDownObserver=this._scene.onPointerObservable.add(e=>{this.onEventTriggeredObservable.notifyObservers({type:"PointerDown",payload:e})},m.POINTERDOWN),this._pointerUpObserver=this._scene.onPointerObservable.add(e=>{this.onEventTriggeredObservable.notifyObservers({type:"PointerUp",payload:e})},m.POINTERUP),this._pointerMoveObserver=this._scene.onPointerObservable.add(e=>{this.onEventTriggeredObservable.notifyObservers({type:"PointerMove",payload:e})},m.POINTERMOVE),this._meshUnderPointerObserver=this._scene.onMeshUnderPointerUpdatedObservable.add(e=>{const t=e.pointerId,o=e.mesh,n=this._pointerUnderMeshState[t];!n&&o?this.onEventTriggeredObservable.notifyObservers({type:"PointerOver",payload:{pointerId:t,mesh:o}}):n&&!o?this.onEventTriggeredObservable.notifyObservers({type:"PointerOut",payload:{pointerId:t,mesh:n}}):n&&o&&n!==o&&(this.onEventTriggeredObservable.notifyObservers({type:"PointerOut",payload:{pointerId:t,mesh:n,over:o}}),this.onEventTriggeredObservable.notifyObservers({type:"PointerOver",payload:{pointerId:t,mesh:o,out:n}})),this._pointerUnderMeshState[t]=o},m.POINTERMOVE),this._keyDownObserver=this._scene.onKeyboardObservable.add(e=>{const t=e.event.code;this.pressedKeys.add(t),X._COMMAND_OR_CTRL_CODES.has(t)&&this.pressedKeys.add("CommandOrControl"),this.onEventTriggeredObservable.notifyObservers({type:"KeyDown",payload:e})},w.KEYDOWN),this._keyUpObserver=this._scene.onKeyboardObservable.add(e=>{const t=e.event.code;if(this.pressedKeys.delete(t),X._COMMAND_OR_CTRL_CODES.has(t)){let e=!1;for(const o of Array.from(X._COMMAND_OR_CTRL_CODES))if(o!==t&&this.pressedKeys.has(o)){e=!0;break}e||this.pressedKeys.delete("CommandOrControl")}this.onEventTriggeredObservable.notifyObservers({type:"KeyUp",payload:e})},w.KEYUP);const e=this._scene.getEngine().getRenderingCanvas();e&&(this._onBlurHandler=()=>this.pressedKeys.clear(),e.addEventListener("blur",this._onBlurHandler))}dispose(){if(this._sceneDisposeObserver?.remove(),this._sceneReadyObserver?.remove(),this._sceneOnBeforeRenderObserver?.remove(),this._meshPickedObserver?.remove(),this._meshUnderPointerObserver?.remove(),this._pointerDownObserver?.remove(),this._pointerUpObserver?.remove(),this._pointerMoveObserver?.remove(),this._keyDownObserver?.remove(),this._keyUpObserver?.remove(),this._onBlurHandler){const e=this._scene.getEngine().getRenderingCanvas();e?.removeEventListener("blur",this._onBlurHandler),this._onBlurHandler=null}this.pressedKeys.clear(),this.onEventTriggeredObservable.clear()}}X._COMMAND_OR_CTRL_CODES=K?new Set(["MetaLeft","MetaRight"]):new Set(["ControlLeft","ControlRight"]);class ee extends U{constructor(e){super(e),this.initPriority=0,this.type="NoTrigger",this._unregisterSignalInput("in")}deserialize(e){const t={...e};t.signalInputs=(e.signalInputs??[]).filter(e=>"in"!==e.name),super.deserialize(t)}_execute(e){e._notifyExecuteNode(this),this.done._activateSignal(e),this.out._activateSignal(e)}_startPendingTasks(e){e._getExecutionVariable(this,"_initialized",!1)&&(this._cancelPendingTasks(e),this._resetAfterCanceled(e)),this._preparePendingTasks(e),e._addPendingBlock(this),e._setExecutionVariable(this,"_initialized",!0)}}var te;!function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning"}(te||(te={}));const oe=new Set(["number","FlowGraphInteger","boolean"]),ne=new Set(["Vector4","Quaternion"]),ae=new Set(["Color3","Color4"]);function se(e,t){return e===t||("any"===e||"any"===t||(!(!oe.has(e)||!oe.has(t))||(!(!ne.has(e)||!ne.has(t))||!(!ae.has(e)||!ae.has(t)))))}function ie(e){const t=[],o=new Map,n=e=>{if(t.push(e),e.block){let t=o.get(e.block.uniqueId);t||(t=[],o.set(e.block.uniqueId,t)),t.push(e)}},a=[];e.visitAllBlocks(e=>{a.push(e)});const s=function(e){const t=[];for(const o in e._eventBlocks)for(const n of e._eventBlocks[o])t.push(n);return t}(e);0===s.length&&n({severity:0,message:"Graph has no event blocks — nothing will trigger execution."});for(const e of a)for(const t of e.dataInputs)t.optional||t.isDisabled||t.isConnected()||n({severity:1,message:`"${t.name}" is not connected and will use its default value.`,block:e,connectionName:t.name});for(const e of a)if(e instanceof L){if(re(e))continue;const t=e.signalInputs.find(e=>"in"===e.name);t&&!t.isConnected()&&n({severity:0,message:"Execution block has no incoming signal — it will never execute.",block:e,connectionName:"in"})}for(const e of a)for(const t of e.dataInputs){if(!t.isConnected())continue;const o=t._connectedPoint[0],a=o.richType?.typeName,s=t.richType?.typeName;if(a&&s&&!se(a,s)){if(void 0!==o.richType.typeTransformer||void 0!==t.richType.typeTransformer)continue;n({severity:1,message:`Type mismatch: "${o._ownerBlock.name}.${o.name}" (${a}) → "${e.name}.${t.name}" (${s}).`,block:e,connectionName:t.name})}}const i=new Set;return e.visitAllBlocks(e=>{i.add(e.uniqueId)}),function(e,t){const o=0,n=1,a=2,s=new Map;for(const t of e)s.set(t.uniqueId,o);const i=new Map;for(const t of e)i.set(t.uniqueId,t);const r=new Set;function l(e){s.set(e.uniqueId,n);for(const a of e.dataInputs)if(a.isConnected())for(const i of a._connectedPoint){const a=i._ownerBlock;if(a instanceof L)continue;const c=s.get(a.uniqueId);if(c===n)return r.has(e.uniqueId)||(r.add(e.uniqueId),t({severity:0,message:"Data dependency cycle detected — getValue() will recurse infinitely.",block:e})),r.has(a.uniqueId)||(r.add(a.uniqueId),t({severity:0,message:"Data dependency cycle detected — getValue() will recurse infinitely.",block:a})),!0;c===o&&l(a)}return s.set(e.uniqueId,a),!1}for(const t of e)s.get(t.uniqueId)===o&&l(t)}(a,n),t.sort((e,t)=>e.severity-t.severity),{isValid:t.every(e=>0!==e.severity),issues:t,errorCount:t.filter(e=>0===e.severity).length,warningCount:t.filter(e=>1===e.severity).length,issuesByBlock:o}}function re(e){return e instanceof ee}var le;!function(e){e[e.Stopped=0]="Stopped",e[e.Started=1]="Started",e[e.Paused=2]="Paused"}(le||(le={}));class ce{_getGlobalFlowGraphEditor(){if("undefined"!=typeof FLOWGRAPHEDITOR){if(FLOWGRAPHEDITOR.FlowGraphEditor)return FLOWGRAPHEDITOR;if(FLOWGRAPHEDITOR.default?.FlowGraphEditor)return FLOWGRAPHEDITOR.default}if("undefined"!=typeof BABYLON&&void 0!==BABYLON.FlowGraphEditor)return BABYLON}get scene(){return this._scene}get coordinator(){return this._coordinator}get sceneEventCoordinator(){return this._sceneEventCoordinator}get state(){return this._state}set state(e){this._state=e,this.onStateChangedObservable.notifyObservers(e)}constructor(e){this._BJSFLOWGRAPHEDITOR=this._getGlobalFlowGraphEditor(),this.onStateChangedObservable=new h,this._eventBlocks={SceneReady:[],SceneDispose:[],SceneBeforeRender:[],MeshPick:[],PointerDown:[],PointerUp:[],PointerMove:[],PointerOver:[],PointerOut:[],KeyDown:[],KeyUp:[],SceneAfterRender:[],NoTrigger:[]},this._allBlocks=[],this._executionContexts=[],this._state=0,this._scene=e.scene,this._sceneEventCoordinator=new X(this._scene),this._coordinator=e.coordinator,this.name=e.name??"Graph",this.uniqueId=e.uniqueId??c()}_attachEventObserver(){this._eventObserver||(this._eventObserver=this._sceneEventCoordinator.onEventTriggeredObservable.add(e=>{if("SceneDispose"!==e.type){if(1===this.state){for(const t of this._executionContexts){const o=this._getContextualOrder(e.type,t);for(const n of o)if(!n._executeEvent(t,e.payload))break}switch(e.type){case"SceneReady":this._sceneEventCoordinator.sceneReadyTriggered=!0;break;case"SceneBeforeRender":for(const t of this._executionContexts)t._notifyOnTick(e.payload)}}}else this.dispose()}))}_detachEventObserver(){this._eventObserver?.remove(),this._eventObserver=null}setScene(e){if(e!==this._scene){1===this.state&&this.stop(),this._detachEventObserver(),this._sceneEventCoordinator.dispose(),this._executionContexts.length=0,this._scene=e,this._scene.constantlyUpdateMeshUnderPointer=!0;for(const t of this._allBlocks)for(const o of t.dataInputs)o._reresolveDefaultValueForScene(e);this._sceneEventCoordinator=new X(this._scene),this._attachEventObserver()}}createContext(){const e=new N({scene:this._scene,coordinator:this._coordinator,sceneEventCoordinator:this._sceneEventCoordinator});return this._executionContexts.push(e),e}getContext(e){return this._executionContexts[e]}get contextCount(){return this._executionContexts.length}removeContext(e){if(e<0||e>=this._executionContexts.length)return;const[t]=this._executionContexts.splice(e,1);return t._clearPendingBlocks(),t}getAllBlocks(){return this._allBlocks}addBlock(e){-1===this._allBlocks.indexOf(e)&&this._allBlocks.push(e)}removeBlock(e){const t=this._allBlocks.indexOf(e);if(-1!==t&&this._allBlocks.splice(t,1),e instanceof L&&"type"in e){const t=e,o=this._eventBlocks[t.type];if(o){const e=o.indexOf(t);-1!==e&&o.splice(e,1)}}if(e instanceof U)for(const t of this._executionContexts)e._cancelPendingTasks(t),e._resetAfterCanceled(t);for(const t of e.dataInputs)t.disconnectFromAll();for(const t of e.dataOutputs)t.disconnectFromAll();if(e instanceof L){for(const t of e.signalInputs)t.disconnectFromAll();for(const t of e.signalOutputs)t.disconnectFromAll()}}addEventBlock(e){if(this.addBlock(e),"PointerOver"!==e.type&&"PointerOut"!==e.type||(this._scene.constantlyUpdateMeshUnderPointer=!0),this._eventBlocks[e.type].push(e),1===this.state)for(const t of this._executionContexts)e._startPendingTasks(t);else this.onStateChangedObservable.addOnce(t=>{if(1===t)for(const t of this._executionContexts)e._startPendingTasks(t)})}stop(){if(0!==this.state){this._detachEventObserver(),this.state=0;for(const e of this._executionContexts)e._clearPendingBlocks(),e._clearPendingActivation();this._executionContexts.length=0}}pause(){if(1===this.state){this._detachEventObserver(),this.state=2;for(const e of this._executionContexts)e._clearPendingBlocks()}}start(){if(1===this.state)return;const e=2===this.state;0===this._executionContexts.length&&this.createContext(),this._attachEventObserver(),this.state=1,this._startPendingEvents(),e||(this._sceneEventCoordinator.sceneReadyTriggered=!1,this._scene.isReady(!0)?(this._sceneEventCoordinator.sceneReadyTriggered=!0,this._sceneEventCoordinator.onEventTriggeredObservable.notifyObservers({type:"SceneReady"})):this._scene.executeWhenReady(()=>{1!==this.state||this._sceneEventCoordinator.sceneReadyTriggered||(this._sceneEventCoordinator.sceneReadyTriggered=!0,this._sceneEventCoordinator.onEventTriggeredObservable.notifyObservers({type:"SceneReady"}))},!0))}_startPendingEvents(){for(const e of this._executionContexts)for(const t in this._eventBlocks){const o=this._getContextualOrder(t,e);for(const t of o)t._startPendingTasks(e)}}_getContextualOrder(e,t){const o=this._eventBlocks[e].sort((e,t)=>t.initPriority-e.initPriority);if("MeshPick"===e){const e=[];for(const n of o){const a=n.asset.getValue(t);let s=0;for(;s<o.length;s++){const e=o[s].asset.getValue(t);if(a&&e&&H(a,e))break}e.splice(s,0,n)}return e}return o}dispose(){if(this._detachEventObserver(),this._sceneEventCoordinator.dispose(),0!==this.state){this.state=0;for(const e of this._executionContexts)e._clearPendingBlocks(),e._clearPendingActivation();this._executionContexts.length=0;for(const e in this._eventBlocks)this._eventBlocks[e].length=0;this._allBlocks.length=0}}visitAllBlocks(e){const t=[],o=new Set;for(const e in this._eventBlocks)for(const n of this._eventBlocks[e])t.push(n),o.add(n.uniqueId);for(;t.length>0;){const n=t.pop();e(n);for(const e of n.dataInputs)for(const n of e._connectedPoint)o.has(n._ownerBlock.uniqueId)||(t.push(n._ownerBlock),o.add(n._ownerBlock.uniqueId));if(n instanceof L)for(const e of n.signalOutputs)for(const n of e._connectedPoint)o.has(n._ownerBlock.uniqueId)||(t.push(n._ownerBlock),o.add(n._ownerBlock.uniqueId))}}validate(){return function(e,t){const o=ie(e),n=new Set;e.visitAllBlocks(e=>{n.add(e.uniqueId)});for(const e of t)if(!n.has(e.uniqueId)){const t={severity:1,message:"Block is unreachable from any event block.",block:e};o.issues.push(t),o.warningCount++;let n=o.issuesByBlock.get(e.uniqueId);n||(n=[],o.issuesByBlock.set(e.uniqueId,n)),n.push(t);for(const t of e.dataInputs)if(!t.optional&&!t.isDisabled&&!t.isConnected()){const a={severity:1,message:`"${t.name}" is not connected and will use its default value.`,block:e,connectionName:t.name};o.issues.push(a),o.warningCount++,n.push(a)}if(e instanceof L&&!re(e)){const t=e.signalInputs.find(e=>"in"===e.name);if(t&&!t.isConnected()){const t={severity:0,message:"Execution block has no incoming signal — it will never execute.",block:e,connectionName:"in"};o.issues.push(t),o.errorCount++,n.push(t)}}}return o.isValid=o.issues.every(e=>0!==e.severity),o.issues.sort((e,t)=>e.severity-t.severity),o}(this,this._allBlocks)}serialize(e={},t){e.name=this.name,e.uniqueId=this.uniqueId,e.allBlocks=[];const o=new Set,n=t=>{if(o.has(t.uniqueId))return;o.add(t.uniqueId);const n={};t.serialize(n),e.allBlocks.push(n)};this.visitAllBlocks(n);for(const e of this._allBlocks)n(e);e.executionContexts=[];for(const o of this._executionContexts){const n={};o.serialize(n,t),e.executionContexts.push(n)}}async edit(e){return await new Promise(t=>{if(this._BJSFLOWGRAPHEDITOR=this._BJSFLOWGRAPHEDITOR||this._getGlobalFlowGraphEditor(),void 0===this._BJSFLOWGRAPHEDITOR){const o=e&&e.editorURL?e.editorURL:ce.EditorURL;f.LoadBabylonScript(o,()=>{this._BJSFLOWGRAPHEDITOR=this._BJSFLOWGRAPHEDITOR||this._getGlobalFlowGraphEditor(),this._createFlowGraphEditor(e?.flowGraphEditorConfig),t()})}else this._createFlowGraphEditor(e?.flowGraphEditorConfig),t()})}_createFlowGraphEditor(e){const t={flowGraph:this,hostScene:this._scene,attachToLiveScene:!0,...e};this._BJSFLOWGRAPHEDITOR.FlowGraphEditor.Show(t)}}ce.EditorURL=`${f._DefaultCdnUrl}/v${k.Version}/flowGraphEditor/babylon.flowGraphEditor.js`;class he{static get OnFlowGraphAddedObservable(){return this._OnFlowGraphAddedObservable}static get OnFlowGraphRemovedObservable(){return this._OnFlowGraphRemovedObservable}constructor(e){this.config=e,this.dispatchEventsSynchronously=!0,this._flowGraphs=[],this._customEventsMap=new Map,this._eventExecutionCounter=new Map,this._executeOnNextFrame=[],this._eventUniqueId=0,this._disposeObserver=this.config.scene.onDisposeObservable.add(()=>{this.dispose()}),this._onBeforeRenderObserver=this.config.scene.onBeforeRenderObservable.add(()=>{this._eventExecutionCounter.clear();const e=this._executeOnNextFrame.slice(0);if(e.length)for(const t of e){this.notifyCustomEvent(t.id,t.data,!1);const e=this._executeOnNextFrame.findIndex(e=>e.uniqueId===t.uniqueId);-1!==e&&this._executeOnNextFrame.splice(e,1)}});let t=he.SceneCoordinators.get(this.config.scene);t||(t=[],he.SceneCoordinators.set(this.config.scene,t)),t.push(this)}createGraph(e){const t=e??`Graph ${this._flowGraphs.length+1}`,o=new ce({scene:this.config.scene,coordinator:this,name:t});return this._flowGraphs.push(o),he._OnFlowGraphAddedObservable.notifyObservers(o),o}removeGraph(e){const t=this._flowGraphs.indexOf(e);-1!==t&&(e.dispose(),this._flowGraphs.splice(t,1),he._OnFlowGraphRemovedObservable.notifyObservers(e))}start(){for(const e of this._flowGraphs)e.start()}dispose(){for(const e of this._flowGraphs)e.dispose(),he._OnFlowGraphRemovedObservable.notifyObservers(e);this._flowGraphs.length=0,this._disposeObserver?.remove(),this._onBeforeRenderObserver?.remove();const e=he.SceneCoordinators.get(this.config.scene)??[],t=e.indexOf(this);-1!==t&&e.splice(t,1)}serialize(e,t){e._flowGraphs=[];for(const o of this._flowGraphs){const n={};o.serialize(n,t),e._flowGraphs.push(n)}e.dispatchEventsSynchronously=this.dispatchEventsSynchronously}get flowGraphs(){return this._flowGraphs}getCustomEventObservable(e){let t=this._customEventsMap.get(e);return t||(t=new h,this._customEventsMap.set(e,t)),t}notifyCustomEvent(t,o,n=!this.dispatchEventsSynchronously){if(n)return void this._executeOnNextFrame.push({id:t,data:o,uniqueId:this._eventUniqueId++});if(this._eventExecutionCounter.has(t)){const o=this._eventExecutionCounter.get(t);if(this._eventExecutionCounter.set(t,o+1),o>=he.MaxEventTypeExecutionPerFrame)return void(o===he.MaxEventTypeExecutionPerFrame&&e.Warn(`FlowGraphCoordinator: Too many executions of event "${t}".`))}else this._eventExecutionCounter.set(t,1);const a=this._customEventsMap.get(t);a&&a.notifyObservers(o)}}he.MaxEventsPerType=30,he.MaxEventTypeExecutionPerFrame=30,he.SceneCoordinators=new Map,he._OnFlowGraphAddedObservable=new h,he._OnFlowGraphRemovedObservable=new h;const pe={},ue={};async function de(e,t){const o=await Promise.all(e.allBlocks.map(async e=>{const t=function(e){switch(e){case"FlowGraphPlayAnimationBlock":return async()=>(await import("./flowGraphPlayAnimationBlock-Cn4f9maH.esm.min.js")).FlowGraphPlayAnimationBlock;case"FlowGraphStopAnimationBlock":return async()=>(await import("./flowGraphStopAnimationBlock-rdvA8srH.esm.min.js")).FlowGraphStopAnimationBlock;case"FlowGraphPauseAnimationBlock":return async()=>(await import("./flowGraphPauseAnimationBlock-vk4AEgdY.esm.min.js")).FlowGraphPauseAnimationBlock;case"FlowGraphInterpolationBlock":return async()=>(await import("./flowGraphInterpolationBlock-CKWIEoO7.esm.min.js")).FlowGraphInterpolationBlock;case"FlowGraphSceneReadyEventBlock":return async()=>(await import("./flowGraphSceneReadyEventBlock-vdEC4SlQ.esm.min.js")).FlowGraphSceneReadyEventBlock;case"FlowGraphSceneTickEventBlock":return async()=>(await import("./flowGraphSceneTickEventBlock-esPaLHpJ.esm.min.js")).FlowGraphSceneTickEventBlock;case"FlowGraphSendCustomEventBlock":return async()=>(await import("./flowGraphSendCustomEventBlock-BsXZ-mVb.esm.min.js")).FlowGraphSendCustomEventBlock;case"FlowGraphReceiveCustomEventBlock":return async()=>(await import("./flowGraphReceiveCustomEventBlock-DCjupSgn.esm.min.js")).FlowGraphReceiveCustomEventBlock;case"FlowGraphMeshPickEventBlock":return async()=>(await import("./flowGraphMeshPickEventBlock-BvcViR6H.esm.min.js")).FlowGraphMeshPickEventBlock;case"FlowGraphEBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphEBlock;case"FlowGraphPIBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphPiBlock;case"FlowGraphInfBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphInfBlock;case"FlowGraphNaNBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphNaNBlock;case"FlowGraphRandomBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphRandomBlock;case"FlowGraphAddBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphAddBlock;case"FlowGraphSubtractBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphSubtractBlock;case"FlowGraphMultiplyBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphMultiplyBlock;case"FlowGraphDivideBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphDivideBlock;case"FlowGraphAbsBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphAbsBlock;case"FlowGraphSignBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphSignBlock;case"FlowGraphTruncBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphTruncBlock;case"FlowGraphFloorBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphFloorBlock;case"FlowGraphCeilBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphCeilBlock;case"FlowGraphRoundBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphRoundBlock;case"FlowGraphFractBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphFractionBlock;case"FlowGraphNegationBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphNegationBlock;case"FlowGraphModuloBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphModuloBlock;case"FlowGraphMinBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphMinBlock;case"FlowGraphMaxBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphMaxBlock;case"FlowGraphClampBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphClampBlock;case"FlowGraphSaturateBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphSaturateBlock;case"FlowGraphMathInterpolationBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphMathInterpolationBlock;case"FlowGraphEqualityBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphEqualityBlock;case"FlowGraphLessThanBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphLessThanBlock;case"FlowGraphLessThanOrEqualBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphLessThanOrEqualBlock;case"FlowGraphGreaterThanBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphGreaterThanBlock;case"FlowGraphGreaterThanOrEqualBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphGreaterThanOrEqualBlock;case"FlowGraphIsNaNBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphIsNanBlock;case"FlowGraphIsInfBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphIsInfinityBlock;case"FlowGraphDegToRadBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphDegToRadBlock;case"FlowGraphRadToDegBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphRadToDegBlock;case"FlowGraphSinBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphSinBlock;case"FlowGraphCosBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphCosBlock;case"FlowGraphTanBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphTanBlock;case"FlowGraphASinBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphAsinBlock;case"FlowGraphACosBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphAcosBlock;case"FlowGraphATanBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphAtanBlock;case"FlowGraphATan2Block":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphAtan2Block;case"FlowGraphSinhBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphSinhBlock;case"FlowGraphCoshBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphCoshBlock;case"FlowGraphTanhBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphTanhBlock;case"FlowGraphASinhBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphAsinhBlock;case"FlowGraphACoshBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphAcoshBlock;case"FlowGraphATanhBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphAtanhBlock;case"FlowGraphExponentialBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphExpBlock;case"FlowGraphLogBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphLogBlock;case"FlowGraphLog2Block":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphLog2Block;case"FlowGraphLog10Block":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphLog10Block;case"FlowGraphSquareRootBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphSquareRootBlock;case"FlowGraphPowerBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphPowerBlock;case"FlowGraphCubeRootBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphCubeRootBlock;case"FlowGraphBitwiseAndBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphBitwiseAndBlock;case"FlowGraphBitwiseOrBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphBitwiseOrBlock;case"FlowGraphBitwiseNotBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphBitwiseNotBlock;case"FlowGraphBitwiseXorBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphBitwiseXorBlock;case"FlowGraphBitwiseLeftShiftBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphBitwiseLeftShiftBlock;case"FlowGraphBitwiseRightShiftBlock":return async()=>(await import("./flowGraphMathBlocks-BniJXMmz.esm.min.js")).FlowGraphBitwiseRightShiftBlock;case"FlowGraphLengthBlock":return async()=>(await import("./flowGraphVectorMathBlocks-B-dbQs3a.esm.min.js")).FlowGraphLengthBlock;case"FlowGraphNormalizeBlock":return async()=>(await import("./flowGraphVectorMathBlocks-B-dbQs3a.esm.min.js")).FlowGraphNormalizeBlock;case"FlowGraphDotBlock":return async()=>(await import("./flowGraphVectorMathBlocks-B-dbQs3a.esm.min.js")).FlowGraphDotBlock;case"FlowGraphCrossBlock":return async()=>(await import("./flowGraphVectorMathBlocks-B-dbQs3a.esm.min.js")).FlowGraphCrossBlock;case"FlowGraphRotate2DBlock":return async()=>(await import("./flowGraphVectorMathBlocks-B-dbQs3a.esm.min.js")).FlowGraphRotate2DBlock;case"FlowGraphRotate3DBlock":return async()=>(await import("./flowGraphVectorMathBlocks-B-dbQs3a.esm.min.js")).FlowGraphRotate3DBlock;case"FlowGraphTransposeBlock":return async()=>(await import("./flowGraphMatrixMathBlocks-o9-8Azdm.esm.min.js")).FlowGraphTransposeBlock;case"FlowGraphDeterminantBlock":return async()=>(await import("./flowGraphMatrixMathBlocks-o9-8Azdm.esm.min.js")).FlowGraphDeterminantBlock;case"FlowGraphInvertMatrixBlock":return async()=>(await import("./flowGraphMatrixMathBlocks-o9-8Azdm.esm.min.js")).FlowGraphInvertMatrixBlock;case"FlowGraphMatrixMultiplicationBlock":return async()=>(await import("./flowGraphMatrixMathBlocks-o9-8Azdm.esm.min.js")).FlowGraphMatrixMultiplicationBlock;case"FlowGraphBranchBlock":return async()=>(await import("./flowGraphBranchBlock-BBzHIKc_.esm.min.js")).FlowGraphBranchBlock;case"FlowGraphSetDelayBlock":return async()=>(await import("./flowGraphSetDelayBlock-2bs7Di5T.esm.min.js")).FlowGraphSetDelayBlock;case"FlowGraphCancelDelayBlock":return async()=>(await import("./flowGraphCancelDelayBlock-BAE0WbIb.esm.min.js")).FlowGraphCancelDelayBlock;case"FlowGraphCallCounterBlock":return async()=>(await import("./flowGraphCounterBlock-RGt_aZ0_.esm.min.js")).FlowGraphCallCounterBlock;case"FlowGraphDebounceBlock":return async()=>(await import("./flowGraphDebounceBlock-Beb5XjGZ.esm.min.js")).FlowGraphDebounceBlock;case"FlowGraphThrottleBlock":return async()=>(await import("./flowGraphThrottleBlock-BSQQBzLs.esm.min.js")).FlowGraphThrottleBlock;case"FlowGraphDoNBlock":return async()=>(await import("./flowGraphDoNBlock-D_wO25T9.esm.min.js")).FlowGraphDoNBlock;case"FlowGraphFlipFlopBlock":return async()=>(await import("./flowGraphFlipFlopBlock-Cy4RMyZG.esm.min.js")).FlowGraphFlipFlopBlock;case"FlowGraphForLoopBlock":return async()=>(await import("./flowGraphForLoopBlock-DRGQeMQ6.esm.min.js")).FlowGraphForLoopBlock;case"FlowGraphMultiGateBlock":return async()=>(await import("./flowGraphMultiGateBlock-D612jcgP.esm.min.js")).FlowGraphMultiGateBlock;case"FlowGraphSequenceBlock":return async()=>(await import("./flowGraphSequenceBlock-BkvApaH-.esm.min.js")).FlowGraphSequenceBlock;case"FlowGraphSwitchBlock":return async()=>(await import("./flowGraphSwitchBlock-Dm0mISGw.esm.min.js")).FlowGraphSwitchBlock;case"FlowGraphWaitAllBlock":return async()=>(await import("./flowGraphWaitAllBlock-DGGRSuHS.esm.min.js")).FlowGraphWaitAllBlock;case"FlowGraphWhileLoopBlock":return async()=>(await import("./flowGraphWhileLoopBlock-DcVfwwrr.esm.min.js")).FlowGraphWhileLoopBlock;case"FlowGraphConsoleLogBlock":return async()=>(await import("./flowGraphConsoleLogBlock-Bmf3TQr0.esm.min.js")).FlowGraphConsoleLogBlock;case"FlowGraphConditionalBlock":return async()=>(await import("./flowGraphConditionalDataBlock-BQ-r9Pj-.esm.min.js")).FlowGraphConditionalDataBlock;case"FlowGraphConstantBlock":return async()=>(await import("./flowGraphConstantBlock-BeRzTaef.esm.min.js")).FlowGraphConstantBlock;case"FlowGraphTransformCoordinatesSystemBlock":return async()=>(await import("./flowGraphTransformCoordinatesSystemBlock-gIgvvqBP.esm.min.js")).FlowGraphTransformCoordinatesSystemBlock;case"FlowGraphGetAssetBlock":return async()=>(await import("./flowGraphGetAssetBlock-DTUKpfxX.esm.min.js")).FlowGraphGetAssetBlock;case"FlowGraphGetPropertyBlock":return async()=>(await import("./flowGraphGetPropertyBlock-CC8r-9mu.esm.min.js")).FlowGraphGetPropertyBlock;case"FlowGraphSetPropertyBlock":return async()=>(await import("./flowGraphSetPropertyBlock-DUH0dKrs.esm.min.js")).FlowGraphSetPropertyBlock;case"FlowGraphGetVariableBlock":return async()=>(await import("./flowGraphGetVariableBlock-CmsEShv7.esm.min.js")).FlowGraphGetVariableBlock;case"FlowGraphSetVariableBlock":return async()=>(await import("./flowGraphSetVariableBlock-BNZET5h4.esm.min.js")).FlowGraphSetVariableBlock;case"FlowGraphJsonPointerParserBlock":return async()=>(await import("./flowGraphJsonPointerParserBlock-LYw7vRyo.esm.min.js")).FlowGraphJsonP