let BaseNode=require("../Utils/BaseNode").BaseNode,GraphUtils=require("../Utils/GraphUtils").GraphUtils,APJS=require("../../../amazingpro");class CGDataConvert extends BaseNode{constructor(){super()}setNext(t,s){this.nexts[t]=s}setInput(t,s){this.inputs[t]=s}getOutput(t){var s,e=this.valueType;return null===e||null===(s=this.inputs[0]())?null:("Double"===e||"Int"===e?(this.outputs[0]=GraphUtils.getUpdatedValue("Vector2f",this.outputs[0],s,s),this.outputs[1]=GraphUtils.getUpdatedValue("Vector3f",this.outputs[1],s,s,s),this.outputs[2]=GraphUtils.getUpdatedValue("Vector4f",this.outputs[2],s,s,s,s),this.outputs[3]=GraphUtils.getUpdatedValue("Color",this.outputs[3],s,s,s,s),this.outputs[4]=""+(Number.isInteger(s)?s:s.toFixed(2))):"Vector2f"===e?(this.outputs[0]=GraphUtils.getUpdatedValue("Vector3f",this.outputs[0],s.x,s.y,0),this.outputs[1]=GraphUtils.getUpdatedValue("Vector4f",this.outputs[1],s.x,s.y,0,0),this.outputs[2]=`x:${s.x.toFixed(2)}, y:`+s.y.toFixed(2)):"Vector3f"===e?(this.outputs[0]=GraphUtils.getUpdatedValue("Vector2f",this.outputs[0],s.x,s.y),this.outputs[1]=GraphUtils.getUpdatedValue("Vector4f",this.outputs[1],s.x,s.y,s.z,0),this.outputs[2]=GraphUtils.getUpdatedValue("Color",this.outputs[2],s.x,s.y,s.z,0),this.outputs[3]=`x:${s.x.toFixed(2)}, y:${s.y.toFixed(2)}, z:`+s.z.toFixed(2)):"Vector4f"===e?(this.outputs[0]=GraphUtils.getUpdatedValue("Vector2f",this.outputs[0],s.x,s.y),this.outputs[1]=GraphUtils.getUpdatedValue("Vector3f",this.outputs[1],s.x,s.y,s.z),this.outputs[2]=GraphUtils.getUpdatedValue("Color",this.outputs[2],s.x,s.y,s.z,s.w),this.outputs[3]=`x:${s.x.toFixed(2)}, y:${s.y.toFixed(2)}, z:${s.z.toFixed(2)}, w:`+s.w.toFixed(2),this.outputs[4]=GraphUtils.getUpdatedValue("Rect",this.outputs[4],s.x,s.y,s.z,s.w)):"Color"===e?(this.outputs[0]=GraphUtils.getUpdatedValue("Vector3f",this.outputs[0],s.r,s.g,s.b),this.outputs[1]=GraphUtils.getUpdatedValue("Vector4f",this.outputs[1],s.r,s.g,s.b,s.a),this.outputs[2]=`r:${s.r.toFixed(2)}, g:${s.g.toFixed(2)}, b:${s.b.toFixed(2)}, a:`+s.a.toFixed(2)):"Bool"===e?this.outputs[0]=s.toString():"Rect"===e&&(this.outputs[0]=GraphUtils.getUpdatedValue("Vector4f",this.outputs[0],s.x,s.y,s.width,s.height),this.outputs[1]=`x:${s.x.toFixed(2)}, y:${s.y.toFixed(2)}, width:${s.width.toFixed(2)}, height:`+s.height.toFixed(2)),this.outputs[t])}}exports.CGDataConvert=CGDataConvert;