import{c as p,_ as a}from"./KHR_interactivity-DRPs30Rf.js";import{aX as o,R as h}from"./index-6jOCfdig.js";import{R as s,e as r,b as n}from"./declarationMapper-CGPHX8aB.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"./objectModelMapping-DT0r674A.js";class u extends p{constructor(e){super(e),this.config=e,this.type="MeshPick",this.asset=this.registerDataInput("asset",s,e?.targetMesh),this.pickedPoint=this.registerDataOutput("pickedPoint",r),this.pickOrigin=this.registerDataOutput("pickOrigin",r),this.pointerId=this.registerDataOutput("pointerId",n),this.pickedMesh=this.registerDataOutput("pickedMesh",s),this.pointerType=this.registerDataInput("pointerType",s,o.POINTERPICK)}_getReferencedMesh(e){return this.asset.getValue(e)}_executeEvent(e,t){if(this.pointerType.getValue(e)!==t.type)return!0;const i=this._getReferencedMesh(e);return i&&t.pickInfo?.pickedMesh&&(t.pickInfo?.pickedMesh===i||a(t.pickInfo?.pickedMesh,i))?(this.pointerId.setValue(t.event.pointerId,e),this.pickOrigin.setValue(t.pickInfo.ray?.origin,e),this.pickedPoint.setValue(t.pickInfo.pickedPoint,e),this.pickedMesh.setValue(t.pickInfo.pickedMesh,e),this._execute(e),!this.config?.stopPropagation):(this.pointerId.resetToDefaultValue(e),this.pickOrigin.resetToDefaultValue(e),this.pickedPoint.resetToDefaultValue(e),this.pickedMesh.resetToDefaultValue(e),!0)}_preparePendingTasks(e){}_cancelPendingTasks(e){}getClassName(){return"FlowGraphMeshPickEventBlock"}}h("FlowGraphMeshPickEventBlock",u);export{u as FlowGraphMeshPickEventBlock};
