mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:17:41 +08:00
2 lines
78 KiB
JavaScript
2 lines
78 KiB
JavaScript
class e{static deleteNodesKeyboardKey="Delete";static editTextEventName={begin:"ueb-edit-text-begin",end:"ueb-edit-text-end"};static enableZoomIn=["LeftControl","RightControl"];static expandGridSize=400;static focusEventName={begin:"blueprint-focus",end:"blueprint-unfocus"};static fontSize="12.5px";static gridAxisLineColor="black";static gridExpandThreshold=.25;static gridLineColor="#353535";static gridLineWidth=1;static gridSet=8;static gridSetLineColor="#161616";static gridShrinkThreshold=4;static gridSize=16;static keysSeparator="+";static linkCurveHeight=15;static linkCurveWidth=80;static linkMinWidth=100;static linkRightSVGPath=(e,t,n)=>{let i=100-e;return`M ${e} 0 C ${t} 0, ${n} 0, 50 50 S ${i-t+e} 100, ${i} 100`};static maxZoom=7;static minZoom=-12;static nodeDeleteEventName="ueb-node-delete";static nodeDragEventName="ueb-node-drag";static nodeDragLocalEventName="ueb-node-drag-local";static nodeName=(e,t)=>`${e}_${t}`;static nodeRadius=8;static selectAllKeyboardKey="(bCtrl=True,Key=A)";static trackingMouseEventName={begin:"ueb-tracking-mouse-begin",end:"ueb-tracking-mouse-end"};static ModifierKeys=["Ctrl","Shift","Alt","Meta"];static Keys={Backspace:"Backspace",Tab:"Tab",LeftControl:"ControlLeft",RightControl:"ControlRight",LeftShift:"ShiftLeft",RightShift:"ShiftRight",LeftAlt:"AltLeft",RightAlt:"AltRight",Enter:"Enter",Pause:"Pause",CapsLock:"CapsLock",Escape:"Escape",Space:"Space",PageUp:"PageUp",PageDown:"PageDown",End:"End",Home:"Home",ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",PrintScreen:"PrintScreen",Insert:"Insert",Delete:"Delete",Zero:"Digit0",One:"Digit1",Two:"Digit2",Three:"Digit3",Four:"Digit4",Five:"Digit5",Six:"Digit6",Seven:"Digit7",Eight:"Digit8",Nine:"Digit9",A:"KeyA",B:"KeyB",C:"KeyC",D:"KeyD",E:"KeyE",F:"KeyF",G:"KeyG",H:"KeyH",I:"KeyI",K:"KeyK",L:"KeyL",M:"KeyM",N:"KeyN",O:"KeyO",P:"KeyP",Q:"KeyQ",R:"KeyR",S:"KeyS",T:"KeyT",U:"KeyU",V:"KeyV",W:"KeyW",X:"KeyX",Y:"KeyY",Z:"KeyZ",NumPadZero:"Numpad0",NumPadOne:"Numpad1",NumPadTwo:"Numpad2",NumPadThree:"Numpad3",NumPadFour:"Numpad4",NumPadFive:"Numpad5",NumPadSix:"Numpad6",NumPadSeven:"Numpad7",NumPadEight:"Numpad8",NumPadNine:"Numpad9",Multiply:"NumpadMultiply",Add:"NumpadAdd",Subtract:"NumpadSubtract",Decimal:"NumpadDecimal",Divide:"NumpadDivide",F1:"F1",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",F10:"F10",F11:"F11",F12:"F12",NumLock:"NumLock",ScrollLock:"ScrollLock"}}class t{#e;get target(){return this.#e}#t;get blueprint(){return this.#t}options;constructor(t,n,i){this.#e=t,this.#t=n,i.consumeEvent??=!1,i.listenOnFocus??=!1,i.unlistenOnTextEdit??=!1,this.options=i;let r=this;this.listenHandler=e=>r.listenEvents(),this.unlistenHandler=e=>r.unlistenEvents(),this.options.listenOnFocus&&(this.blueprint.addEventListener(e.focusEventName.begin,this.listenHandler),this.blueprint.addEventListener(e.focusEventName.end,this.unlistenHandler)),this.options.unlistenOnTextEdit&&(this.blueprint.addEventListener(e.editTextEventName.begin,this.unlistenHandler),this.blueprint.addEventListener(e.editTextEventName.end,this.listenHandler))}unlistenDOMElement(){this.unlistenEvents(),this.blueprint.removeEventListener(e.focusEventName.begin,this.listenHandler),this.blueprint.removeEventListener(e.focusEventName.end,this.unlistenHandler),this.blueprint.removeEventListener(e.editTextEventName.begin,this.unlistenHandler),this.blueprint.removeEventListener(e.editTextEventName.end,this.listenHandler)}listenEvents(){}unlistenEvents(){}}class n{#n;get types(){return this.#n}set types(e){this.#n=e}constructor(...e){this.#n=e}}class i{#i;get type(){return this.#i}set type(e){this.#i=e}#r=!0;get showDefault(){return this.#r}set showDefault(e){this.#r=e}#s;get value(){return this.#s}set value(e){this.#s=e}static sanitize(e,t){return void 0===t&&(t=e?.constructor),t&&t!==n&&!(e?.constructor===t||e instanceof t)&&(e=new t(e)),(e instanceof Boolean||e instanceof Number||e instanceof String)&&(e=e.valueOf()),e}constructor(e,t=!0,r){void 0===r&&(r=e instanceof Array?[]:e instanceof n?"":i.sanitize(new e)),this.#r=t,this.#i=e}}class r{static sigmoid(e,t=1.7){return 1/(1+e/(1-e)**-t)}static clamp(e,t,n){return Math.min(Math.max(e,t),n)}static getScale(e){return Number(getComputedStyle(e).getPropertyValue("--ueb-scale"))}static minDecimals(e,t=1){const n=e*10**t;return Math.abs(n%1)>Number.EPSILON?e.toString():e.toFixed(t)}static convertLocation(e,t){const n=1/r.getScale(t),i=t.getBoundingClientRect();return[Math.round((e[0]-i.x)*n),Math.round((e[1]-i.y)*n)]}static objectGet(e,t,n){if(void 0!==e){if(!(t instanceof Array))throw new TypeError("Expected keys to be an array.");return 0!=t.length&&t[0]in e&&void 0!==e[t[0]]?1==t.length?e[t[0]]:r.objectGet(e[t[0]],t.slice(1),n):n}}static objectSet(e,t,n,i=!1,s=Object){if(!(t instanceof Array))throw new TypeError("Expected keys to be an array.");if(1==t.length){if(i||t[0]in e||void 0===e[t[0]])return e[t[0]]=n,!0}else if(t.length>0)return!i||e[t[0]]instanceof Object||(e[t[0]]=new s),r.objectSet(e[t[0]],t.slice(1),n,i,s);return!1}static equals(e,t){return(e=i.sanitize(e))===(t=i.sanitize(t))||(e instanceof Array&&t instanceof Array?e.length==t.length&&!e.find(((e,n)=>!r.equals(e,t[n]))):void 0)}static FirstCapital(e){return e.charAt(0).toUpperCase()+e.substring(1)}static getType(e){let t=e?.constructor;switch(t){case i:return r.getType(e.type);case Function:return e;default:return t}}static snapToGrid(e,t){return 1===t?e:[t*Math.round(e[0]/t),t*Math.round(e[1]/t)]}static mergeArrays(e=[],t=[]){let n=[];for(let i=0;i<t.length;++i)for(let r=0;r<e.length;++r)if(e[r]==t[i]){n.push(...e.splice(0,r),...t.splice(0,i),...e.splice(0,1)),i=0,r=0,t.shift();break}return[...new Set(n.concat(...e,...t))]}static encodeInputString(e){return e.replace(/\n$/,"").replaceAll(" "," ").replaceAll("\n",String.raw`\r\n`)}static decodeInputString(e){return e.replaceAll("\\r\n","\n")}static encodeString(e,t=!1){return e.replaceAll(" "," ").replaceAll("\n",String.raw`\n`)}static decodeString(e,t=!1){return e.replaceAll(" "," ").replaceAll(String.raw`\n`,"\n")}static formatStringName(e){return e.trim().replace(/^b/,"").replaceAll(/(?<=[a-z])(?=[A-Z])|_|\s+/g," ")}}class s extends class{#a=!1;isShownAsString(){return this.#a}setShowAsString(e){this.#a=e}}{static attributes={};constructor(e){super();const t=(e,n,s,a="")=>{for(let o of r.mergeArrays(Object.getOwnPropertyNames(n),Object.getOwnPropertyNames(s??{}))){let l=n[o];const u=r.getType(l);if(o in n?null==l||l instanceof i&&!l.showDefault||o in s||console.warn(`${this.constructor.name} adds property ${a}${o} not defined in the serialized data`):console.warn(`Property ${a}${o} is not defined in ${this.constructor.name}`),u===Object){e[o]={},t(e[o],n[o],s[o],o+".");continue}const c=r.objectGet(s,[o]);if(void 0===c){if(l instanceof i){if(!l.showDefault){e[o]=void 0;continue}l=l.value}l instanceof Array?e[o]=[]:(l instanceof Function&&(l=i.sanitize(new l,u)),e[o]=i.sanitize(l,u))}else e[o]=i.sanitize(c,u)}},n=this.constructor.attributes;e.constructor!==Object&&1==Object.getOwnPropertyNames(n).length&&(e={[Object.getOwnPropertyNames(n)[0]]:e}),t(this,n,e)}}class a extends s{static attributes={type:String,path:String};constructor(e={}){super(e),this.type,this.path}}class o extends s{static attributes={MemberParent:a,MemberName:""};constructor(e={}){super(e),this.MemberParent,this.MemberName}}class l extends s{static attributes={value:String};static generateGuid(e=!0){let t=new Uint32Array(4);!0===e&&crypto.getRandomValues(t);let n="";return t.forEach((e=>{n+=("0".repeat(8)+e.toString(16).toUpperCase()).slice(-8)})),new l({value:n})}constructor(e={}){super(e),this.value}valueOf(){return this.value}toString(){return this.value}}class u extends s{static attributes={value:String};constructor(e={}){super(e),this.value}valueOf(){return this.value}toString(){return this.value}}class c extends s{static attributes={value:Number};constructor(e=0){super(e),this.value=Math.round(this.value)}valueOf(){return this.value}toString(){return this.value.toString()}}class d extends s{static lookbehind="INVTEXT";static attributes={value:String};constructor(e={}){super(e),this.value}}class h extends s{static attributes={ActionName:"",bShift:!1,bCtrl:!1,bAlt:!1,bCmd:!1,Key:u};constructor(e={}){e.ActionName=e.ActionName??"",e.bShift=e.bShift??!1,e.bCtrl=e.bCtrl??!1,e.bAlt=e.bAlt??!1,e.bCmd=e.bCmd??!1,super(e),this.ActionName,this.bShift,this.bCtrl,this.bAlt,this.bCmd,this.Key}}class p extends s{static attributes={R:Number,G:Number,B:Number,A:Number};constructor(e={}){super(e),this.R,this.G,this.B,this.A}static numberToString(e){return Math.round(255*e).toString(16)}static fromString(e){return new p({R:parseInt(e.substr(0,2),16)/255,G:parseInt(e.substr(2,2),16)/255,B:parseInt(e.substr(4,2),16)/255,A:parseInt(e.substr(6,2),16)/255})}toString(){return"#"+p.numberToString(this.R)+p.numberToString(this.G)+p.numberToString(this.B)+p.numberToString(this.A)}}class m extends s{static lookbehind="NSLOCTEXT";static attributes={namespace:String,key:String,value:String};constructor(e={}){super(e),this.namespace,this.key,this.value}}class g extends s{static attributes={value:String};constructor(e={}){super(e),this.value}valueOf(){return this.value}toString(){return this.value}}class f extends s{static attributes={objectName:g,pinGuid:l};constructor(e={}){super(e),this.objectName,this.pinGuid}}class y extends s{static lookbehind="Pin";static attributes={PinId:l,PinName:"",PinFriendlyName:new i(m,!1,null),PinToolTip:"",Direction:new i(String,!1,""),PinType:{PinCategory:"",PinSubCategory:"",PinSubCategoryObject:a,PinSubCategoryMemberReference:null,PinValueType:null,ContainerType:a,bIsReference:!1,bIsConst:!1,bIsWeakPointer:!1,bIsUObjectWrapper:!1,bSerializeAsSinglePrecisionFloat:!1},LinkedTo:new i([f],!1),DefaultValue:new i(new n(p,String),!1),AutogeneratedDefaultValue:new i(String,!1),DefaultObject:new i(a,!1,null),PersistentGuid:l,bHidden:!1,bNotConnectable:!1,bDefaultValueIsReadOnly:!1,bDefaultValueIsIgnored:!1,bAdvancedView:!1,bOrphanedPin:!1};constructor(e={}){super(e),this.PinId,this.PinName,this.PinFriendlyName,this.PinToolTip,this.Direction,this.PinType,this.LinkedTo,this.DefaultValue,this.AutogeneratedDefaultValue,this.DefaultObject,this.PersistentGuid,this.bHidden,this.bNotConnectable,this.bDefaultValueIsReadOnly,this.bDefaultValueIsIgnored,this.bAdvancedView,this.bOrphanedPin}getDefaultValue(){return this.DefaultValue??""}isInput(){return!this.bHidden&&"EGPD_Output"!=this.Direction}isOutput(){return!this.bHidden&&"EGPD_Output"==this.Direction}isLinked(){return this.LinkedTo?.length>0??!1}linkTo(e,t){this.LinkedTo;const n=this.LinkedTo?.find((n=>n.objectName==e&&n.pinGuid.valueOf()==t.PinId.valueOf()));return!n&&((this.LinkedTo??(this.LinkedTo=[])).push(new f({objectName:e,pinGuid:t.PinId})),!0)}unlinkFrom(e,t){this.LinkedTo;const n=this.LinkedTo.findIndex((n=>n.objectName==e&&n.pinGuid==t.PinId));return n>=0&&(1==this.LinkedTo.length?this.LinkedTo=void 0:this.LinkedTo.splice(n,1),!0)}getType(){return this.PinType.PinCategory}getSubCategory(){return this.PinType.PinSubCategoryObject.path}getColorValue(){this.PinType.PinSubCategoryObject.path}}class b extends s{static attributes={MemberName:String,MemberGuid:l,bSelfContext:!1};constructor(e={}){super(e),this.MemberName,this.MemberGuid,this.bSelfContext}}class v extends s{static attributes={Class:a,Name:"",bIsPureFunc:new i(Boolean,!1,!1),VariableReference:new i(b,!1,null),FunctionReference:new i(o,!1,null),EventReference:new i(o,!1,null),TargetType:new i(a,!1,null),NodePosX:c,NodePosY:c,AdvancedPinDisplay:new i(u,!1,null),EnabledState:new i(u,!1,null),NodeGuid:l,ErrorType:new i(c,!1),ErrorMsg:new i(String,!1,""),CustomProperties:[y]};static nameRegex=/(\w+)_(\d+)/;constructor(e={}){super(e),this.Class,this.Name,this.bIsPureFunc,this.VariableReference,this.FunctionReference,this.EventReference,this.TargetType,this.NodePosX,this.NodePosY,this.AdvancedPinDisplay,this.EnabledState,this.NodeGuid,this.ErrorType,this.ErrorMsg,this.CustomProperties}getObjectName(e=!1){return e?this.getNameAndCounter()[0]:this.Name}getNameAndCounter(){const e=this.getObjectName(!1).match(v.nameRegex);if(e&&3==e.length)return[e[1],parseInt(e[2])]}getDisplayName(){let e=this.FunctionReference?.MemberName;return e?(e=r.formatStringName(e),e):(e=r.formatStringName(this.getNameAndCounter()[0]),e)}getCounter(){return this.getNameAndCounter()[1]}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function E(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var S={exports:{}};"undefined"!=typeof self&&self;var w=E(S.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){function i(e){if(!(this instanceof i))return new i(e);this._=e}var r=i.prototype;function s(e,t){for(var n=0;n<e;n++)t(n)}function a(e,t,n){return function(e,t){s(t.length,(function(n){e(t[n],n,t)}))}((function(n,i,r){t=e(t,n,i,r)}),n),t}function o(e,t){return a((function(t,n,i,r){return t.concat([e(n,i,r)])}),[],t)}function l(e,t){var n={v:0,buf:t};return s(e,(function(){var e;n={v:n.v<<1|(e=n.buf,e[0]>>7),buf:function(e){var t=a((function(e,t,n,i){return e.concat(n===i.length-1?Buffer.from([t,0]).readUInt16BE(0):i.readUInt16BE(n))}),[],e);return Buffer.from(o((function(e){return(e<<1&65535)>>8}),t))}(n.buf)}})),n}function u(){return"undefined"!=typeof Buffer}function c(){if(!u())throw new Error("Buffer global does not exist; please use webpack if you need to parse Buffers in the browser.")}function d(e){c();var t=a((function(e,t){return e+t}),0,e);if(t%8!=0)throw new Error("The bits ["+e.join(", ")+"] add up to "+t+" which is not an even number of bytes; the total should be divisible by 8");var n,r=t/8,s=(n=function(e){return e>48},a((function(e,t){return e||(n(t)?t:e)}),null,e));if(s)throw new Error(s+" bit range requested exceeds 48 bit (6 byte) Number max.");return new i((function(t,n){var i=r+n;return i>t.length?w(n,r.toString()+" bytes"):S(i,a((function(e,t){var n=l(t,e.buf);return{coll:e.coll.concat(n.v),buf:n.buf}}),{coll:[],buf:t.slice(n,i)},e).coll)}))}function h(e,t){return new i((function(n,i){return c(),i+t>n.length?w(i,t+" bytes for "+e):S(i+t,n.slice(i,i+t))}))}function p(e,t){if("number"!=typeof(n=t)||Math.floor(n)!==n||t<0||t>6)throw new Error(e+" requires integer length in range [0, 6].");var n}function m(e){return p("uintBE",e),h("uintBE("+e+")",e).map((function(t){return t.readUIntBE(0,e)}))}function g(e){return p("uintLE",e),h("uintLE("+e+")",e).map((function(t){return t.readUIntLE(0,e)}))}function f(e){return p("intBE",e),h("intBE("+e+")",e).map((function(t){return t.readIntBE(0,e)}))}function y(e){return p("intLE",e),h("intLE("+e+")",e).map((function(t){return t.readIntLE(0,e)}))}function b(e){return e instanceof i}function v(e){return"[object Array]"==={}.toString.call(e)}function E(e){return u()&&Buffer.isBuffer(e)}function S(e,t){return{status:!0,index:e,value:t,furthest:-1,expected:[]}}function w(e,t){return v(t)||(t=[t]),{status:!1,index:-1,value:null,furthest:e,expected:t}}function P(e,t){if(!t)return e;if(e.furthest>t.furthest)return e;var n=e.furthest===t.furthest?function(e,t){if(function(){if(void 0!==i._supportsSet)return i._supportsSet;var e="undefined"!=typeof Set;return i._supportsSet=e,e}()&&Array.from){for(var n=new Set(e),r=0;r<t.length;r++)n.add(t[r]);var s=Array.from(n);return s.sort(),s}for(var a={},o=0;o<e.length;o++)a[e[o]]=!0;for(var l=0;l<t.length;l++)a[t[l]]=!0;var u=[];for(var c in a)({}).hasOwnProperty.call(a,c)&&u.push(c);return u.sort(),u}(e.expected,t.expected):t.expected;return{status:e.status,index:e.index,value:e.value,furthest:t.furthest,expected:n}}var k={};function L(e,t){if(E(e))return{offset:t,line:-1,column:-1};e in k||(k[e]={});for(var n=k[e],i=0,r=0,s=0,a=t;a>=0;){if(a in n){i=n[a].line,0===s&&(s=n[a].lineStart);break}("\n"===e.charAt(a)||"\r"===e.charAt(a)&&"\n"!==e.charAt(a+1))&&(r++,0===s&&(s=a+1)),a--}var o=i+r,l=t-s;return n[t]={line:o,lineStart:s},{offset:t,line:o+1,column:l+1}}function x(e){if(!b(e))throw new Error("not a parser: "+e)}function N(e,t){return"string"==typeof e?e.charAt(t):e[t]}function D(e){if("number"!=typeof e)throw new Error("not a number: "+e)}function T(e){if("function"!=typeof e)throw new Error("not a function: "+e)}function O(e){if("string"!=typeof e)throw new Error("not a string: "+e)}var M=2,A=3,C=8,I=5*C,H=4*C,j=" ";function F(e,t){return new Array(t+1).join(e)}function z(e,t,n){var i=t-e.length;return i<=0?e:F(n,i)+e}function G(e,t,n,i){return{from:e-t>0?e-t:0,to:e+n>i?i:e+n}}function B(e,t){var n,i,r,s,l,u=t.index,c=u.offset,d=1;if(c===e.length)return"Got the end of the input";if(E(e)){var h=c-c%C,p=c-h,m=G(h,I,H+C,e.length),g=o((function(e){return o((function(e){return z(e.toString(16),2,"0")}),e)}),function(e,t){var n=e.length,i=[],r=0;if(n<=t)return[e.slice()];for(var s=0;s<n;s++)i[r]||i.push([]),i[r].push(e[s]),(s+1)%t==0&&r++;return i}(e.slice(m.from,m.to).toJSON().data,C));s=function(e){return 0===e.from&&1===e.to?{from:e.from,to:e.to}:{from:e.from/C,to:Math.floor(e.to/C)}}(m),i=h/C,n=3*p,p>=4&&(n+=1),d=2,r=o((function(e){return e.length<=4?e.join(" "):e.slice(0,4).join(" ")+" "+e.slice(4).join(" ")}),g),(l=(8*(s.to>0?s.to-1:s.to)).toString(16).length)<2&&(l=2)}else{var f=e.split(/\r\n|[\n\r\u2028\u2029]/);n=u.column-1,i=u.line-1,s=G(i,M,A,f.length),r=f.slice(s.from,s.to),l=s.to.toString().length}var y=i-s.from;return E(e)&&(l=(8*(s.to>0?s.to-1:s.to)).toString(16).length)<2&&(l=2),a((function(t,i,r){var a,o=r===y,u=o?"> ":j;return a=E(e)?z((8*(s.from+r)).toString(16),l,"0"):z((s.from+r+1).toString(),l," "),[].concat(t,[u+a+" | "+i],o?[j+F(" ",l)+" | "+z("",n," ")+F("^",d)]:[])}),[],r).join("\n")}function V(e,t){return["\n","-- PARSING FAILED "+F("-",50),"\n\n",B(e,t),"\n\n",(n=t.expected,1===n.length?"Expected:\n\n"+n[0]:"Expected one of the following: \n\n"+n.join(", ")),"\n"].join("");var n}function K(e){return void 0!==e.flags?e.flags:[e.global?"g":"",e.ignoreCase?"i":"",e.multiline?"m":"",e.unicode?"u":"",e.sticky?"y":""].join("")}function $(){for(var e=[].slice.call(arguments),t=e.length,n=0;n<t;n+=1)x(e[n]);return i((function(n,i){for(var r,s=new Array(t),a=0;a<t;a+=1){if(!(r=P(e[a]._(n,i),r)).status)return r;s[a]=r.value,i=r.index}return P(S(i,s),r)}))}function R(){var e=[].slice.call(arguments);if(0===e.length)throw new Error("seqMap needs at least one argument");var t=e.pop();return T(t),$.apply(null,e).map((function(e){return t.apply(null,e)}))}function W(){var e=[].slice.call(arguments),t=e.length;if(0===t)return Y("zero alternates");for(var n=0;n<t;n+=1)x(e[n]);return i((function(t,n){for(var i,r=0;r<e.length;r+=1)if((i=P(e[r]._(t,n),i)).status)return i;return i}))}function q(e,t){return _(e,t).or(X([]))}function _(e,t){return x(e),x(t),R(e,t.then(e).many(),(function(e,t){return[e].concat(t)}))}function U(e){O(e);var t="'"+e+"'";return i((function(n,i){var r=i+e.length,s=n.slice(i,r);return s===e?S(r,s):w(i,t)}))}function Z(e,t){!function(e){if(!(e instanceof RegExp))throw new Error("not a regexp: "+e);for(var t=K(e),n=0;n<t.length;n++){var i=t.charAt(n);if("i"!==i&&"m"!==i&&"u"!==i&&"s"!==i)throw new Error('unsupported regexp flag "'+i+'": '+e)}}(e),arguments.length>=2?D(t):t=0;var n=function(e){return RegExp("^(?:"+e.source+")",K(e))}(e),r=""+e;return i((function(e,i){var s=n.exec(e.slice(i));if(s){if(0<=t&&t<=s.length){var a=s[0],o=s[t];return S(i+a.length,o)}return w(i,"valid match group (0 to "+s.length+") in "+r)}return w(i,r)}))}function X(e){return i((function(t,n){return S(n,e)}))}function Y(e){return i((function(t,n){return w(n,e)}))}function Q(e){if(b(e))return i((function(t,n){var i=e._(t,n);return i.index=n,i.value="",i}));if("string"==typeof e)return Q(U(e));if(e instanceof RegExp)return Q(Z(e));throw new Error("not a string, regexp, or parser: "+e)}function J(e){return x(e),i((function(t,n){var i=e._(t,n),r=t.slice(n,i.index);return i.status?w(n,'not "'+r+'"'):S(n,null)}))}function ee(e){return T(e),i((function(t,n){var i=N(t,n);return n<t.length&&e(i)?S(n+1,i):w(n,"a character/byte matching "+e)}))}function te(e,t){arguments.length<2&&(t=e,e=void 0);var n=i((function(e,i){return n._=t()._,n._(e,i)}));return e?n.desc(e):n}function ne(){return Y("fantasy-land/empty")}r.parse=function(e){if("string"!=typeof e&&!E(e))throw new Error(".parse must be called with a string or Buffer as its argument");var t,n=this.skip(ae)._(e,0);return t=n.status?{status:!0,value:n.value}:{status:!1,index:L(e,n.furthest),expected:n.expected},delete k[e],t},r.tryParse=function(e){var t=this.parse(e);if(t.status)return t.value;var n=V(e,t),i=new Error(n);throw i.type="ParsimmonError",i.result=t,i},r.assert=function(e,t){return this.chain((function(n){return e(n)?X(n):Y(t)}))},r.or=function(e){return W(this,e)},r.trim=function(e){return this.wrap(e,e)},r.wrap=function(e,t){return R(e,this,t,(function(e,t){return t}))},r.thru=function(e){return e(this)},r.then=function(e){return x(e),$(this,e).map((function(e){return e[1]}))},r.many=function(){var e=this;return i((function(t,n){for(var i=[],r=void 0;;){if(!(r=P(e._(t,n),r)).status)return P(S(n,i),r);if(n===r.index)throw new Error("infinite loop detected in .many() parser --- calling .many() on a parser which can accept zero characters is usually the cause");n=r.index,i.push(r.value)}}))},r.tieWith=function(e){return O(e),this.map((function(t){if(function(e){if(!v(e))throw new Error("not an array: "+e)}(t),t.length){O(t[0]);for(var n=t[0],i=1;i<t.length;i++)O(t[i]),n+=e+t[i];return n}return""}))},r.tie=function(){return this.tieWith("")},r.times=function(e,t){var n=this;return arguments.length<2&&(t=e),D(e),D(t),i((function(i,r){for(var s=[],a=void 0,o=void 0,l=0;l<e;l+=1){if(o=P(a=n._(i,r),o),!a.status)return o;r=a.index,s.push(a.value)}for(;l<t&&(o=P(a=n._(i,r),o),a.status);l+=1)r=a.index,s.push(a.value);return P(S(r,s),o)}))},r.result=function(e){return this.map((function(){return e}))},r.atMost=function(e){return this.times(0,e)},r.atLeast=function(e){return R(this.times(e),this.many(),(function(e,t){return e.concat(t)}))},r.map=function(e){T(e);var t=this;return i((function(n,i){var r=t._(n,i);return r.status?P(S(r.index,e(r.value)),r):r}))},r.contramap=function(e){T(e);var t=this;return i((function(n,i){var r=t.parse(e(n.slice(i)));return r.status?S(i+n.length,r.value):r}))},r.promap=function(e,t){return T(e),T(t),this.contramap(e).map(t)},r.skip=function(e){return $(this,e).map((function(e){return e[0]}))},r.mark=function(){return R(ie,this,ie,(function(e,t,n){return{start:e,value:t,end:n}}))},r.node=function(e){return R(ie,this,ie,(function(t,n,i){return{name:e,value:n,start:t,end:i}}))},r.sepBy=function(e){return q(this,e)},r.sepBy1=function(e){return _(this,e)},r.lookahead=function(e){return this.skip(Q(e))},r.notFollowedBy=function(e){return this.skip(J(e))},r.desc=function(e){v(e)||(e=[e]);var t=this;return i((function(n,i){var r=t._(n,i);return r.status||(r.expected=e),r}))},r.fallback=function(e){return this.or(X(e))},r.ap=function(e){return R(e,this,(function(e,t){return e(t)}))},r.chain=function(e){var t=this;return i((function(n,i){var r=t._(n,i);return r.status?P(e(r.value)._(n,r.index),r):r}))},r.concat=r.or,r.empty=ne,r.of=X,r["fantasy-land/ap"]=r.ap,r["fantasy-land/chain"]=r.chain,r["fantasy-land/concat"]=r.concat,r["fantasy-land/empty"]=r.empty,r["fantasy-land/of"]=r.of,r["fantasy-land/map"]=r.map;var ie=i((function(e,t){return S(t,L(e,t))})),re=i((function(e,t){return t>=e.length?w(t,"any character/byte"):S(t+1,N(e,t))})),se=i((function(e,t){return S(e.length,e.slice(t))})),ae=i((function(e,t){return t<e.length?w(t,"EOF"):S(t,null)})),oe=Z(/[0-9]/).desc("a digit"),le=Z(/[0-9]*/).desc("optional digits"),ue=Z(/[a-z]/i).desc("a letter"),ce=Z(/[a-z]*/i).desc("optional letters"),de=Z(/\s*/).desc("optional whitespace"),he=Z(/\s+/).desc("whitespace"),pe=U("\r"),me=U("\n"),ge=U("\r\n"),fe=W(ge,me,pe).desc("newline"),ye=W(fe,ae);i.all=se,i.alt=W,i.any=re,i.cr=pe,i.createLanguage=function(e){var t={};for(var n in e)({}).hasOwnProperty.call(e,n)&&function(n){t[n]=te((function(){return e[n](t)}))}(n);return t},i.crlf=ge,i.custom=function(e){return i(e(S,w))},i.digit=oe,i.digits=le,i.empty=ne,i.end=ye,i.eof=ae,i.fail=Y,i.formatError=V,i.index=ie,i.isParser=b,i.lazy=te,i.letter=ue,i.letters=ce,i.lf=me,i.lookahead=Q,i.makeFailure=w,i.makeSuccess=S,i.newline=fe,i.noneOf=function(e){return ee((function(t){return e.indexOf(t)<0})).desc("none of '"+e+"'")},i.notFollowedBy=J,i.of=X,i.oneOf=function(e){for(var t=e.split(""),n=0;n<t.length;n++)t[n]="'"+t[n]+"'";return ee((function(t){return e.indexOf(t)>=0})).desc(t)},i.optWhitespace=de,i.Parser=i,i.range=function(e,t){return ee((function(n){return e<=n&&n<=t})).desc(e+"-"+t)},i.regex=Z,i.regexp=Z,i.sepBy=q,i.sepBy1=_,i.seq=$,i.seqMap=R,i.seqObj=function(){for(var e,t={},n=0,r=(e=arguments,Array.prototype.slice.call(e)),s=r.length,a=0;a<s;a+=1){var o=r[a];if(!b(o)){if(v(o)&&2===o.length&&"string"==typeof o[0]&&b(o[1])){var l=o[0];if(Object.prototype.hasOwnProperty.call(t,l))throw new Error("seqObj: duplicate key "+l);t[l]=!0,n++;continue}throw new Error("seqObj arguments must be parsers or [string, parser] array pairs.")}}if(0===n)throw new Error("seqObj expects at least one named parser, found zero");return i((function(e,t){for(var n,i={},a=0;a<s;a+=1){var o,l;if(v(r[a])?(o=r[a][0],l=r[a][1]):(o=null,l=r[a]),!(n=P(l._(e,t),n)).status)return n;o&&(i[o]=n.value),t=n.index}return P(S(t,i),n)}))},i.string=U,i.succeed=X,i.takeWhile=function(e){return T(e),i((function(t,n){for(var i=n;i<t.length&&e(N(t,i));)i++;return S(i,t.slice(n,i))}))},i.test=ee,i.whitespace=he,i["fantasy-land/empty"]=ne,i["fantasy-land/of"]=X,i.Binary={bitSeq:d,bitSeqObj:function(e){c();var t={},n=0,i=o((function(e){if(v(e)){var i=e;if(2!==i.length)throw new Error("["+i.join(", ")+"] should be length 2, got length "+i.length);if(O(i[0]),D(i[1]),Object.prototype.hasOwnProperty.call(t,i[0]))throw new Error("duplicate key in bitSeqObj: "+i[0]);return t[i[0]]=!0,n++,i}return D(e),[null,e]}),e);if(n<1)throw new Error("bitSeqObj expects at least one named pair, got ["+e.join(", ")+"]");var r=o((function(e){return e[0]}),i);return d(o((function(e){return e[1]}),i)).map((function(e){return a((function(e,t){return null!==t[0]&&(e[t[0]]=t[1]),e}),{},o((function(t,n){return[t,e[n]]}),r))}))},byte:function(e){if(c(),D(e),e>255)throw new Error("Value specified to byte constructor ("+e+"=0x"+e.toString(16)+") is larger in value than a single byte.");var t=(e>15?"0x":"0x0")+e.toString(16);return i((function(n,i){var r=N(n,i);return r===e?S(i+1,r):w(i,t)}))},buffer:function(e){return h("buffer",e).map((function(e){return Buffer.from(e)}))},encodedString:function(e,t){return h("string",t).map((function(t){return t.toString(e)}))},uintBE:m,uint8BE:m(1),uint16BE:m(2),uint32BE:m(4),uintLE:g,uint8LE:g(1),uint16LE:g(2),uint32LE:g(4),intBE:f,int8BE:f(1),int16BE:f(2),int32BE:f(4),intLE:y,int8LE:y(1),int16LE:y(2),int32LE:y(4),floatBE:h("floatBE",4).map((function(e){return e.readFloatBE(0)})),floatLE:h("floatLE",4).map((function(e){return e.readFloatLE(0)})),doubleBE:h("doubleBE",8).map((function(e){return e.readDoubleBE(0)})),doubleLE:h("doubleLE",8).map((function(e){return e.readDoubleLE(0)}))},e.exports=i}]));let P=w;class k{static getGrammarForType(e,t,s){if(t instanceof i)return t=t.type,k.getGrammarForType(e,t,s);if(t instanceof n){const n=t.types.filter((e=>e!==String));let i=P.alt(...n.map((t=>k.getGrammarForType(e,t).wrap(P.string('"'),P.string('"')).map((e=>(e.setShowAsString(!0),e))))));return n.length<t.types.length&&(i=i.or(e.String)),i}switch(r.getType(t)){case Boolean:return e.Boolean;case Number:return e.Number;case c:return e.Integer;case String:return e.String;case l:return e.Guid;case u:return e.Identifier;case a:return e.Reference;case m:return e.LocalizedText;case d:return e.InvariantText;case f:return e.PinReference;case p:return e.LinearColor;case o:return e.FunctionReference;case y:return e.Pin;case Array:return P.seqMap(P.string("("),t.map((t=>k.getGrammarForType(e,r.getType(t)))).reduce(((t,n)=>n&&t!==e.AttributeAnyValue?t.or(n):e.AttributeAnyValue)).trim(P.optWhitespace).sepBy(P.string(",")).skip(P.regex(/,?\s*/)),P.string(")"),((e,t,n)=>t));default:return s}}static createAttributeGrammar=(e,t,n=P.string("=").trim(P.optWhitespace))=>e.AttributeName.skip(n).chain((n=>{const i=n.split("."),s=r.objectGet(t.attributes,i);return k.getGrammarForType(e,s,e.AttributeAnyValue).map((e=>t=>r.objectSet(t,i,e,!0)))}));static createMultiAttributeGrammar=(e,t)=>P.seqMap(t.lookbehind?P.seq(P.string(t.lookbehind),P.optWhitespace,P.string("(")):P.string("("),k.createAttributeGrammar(e,t).trim(P.optWhitespace).sepBy(P.string(",")).skip(P.regex(/,?/).then(P.optWhitespace)),P.string(")"),((e,n,i)=>{let r={};return n.forEach((e=>e(r))),new t(r)}));InlineWhitespace=e=>P.regex(/[^\S\n]+/).desc("inline whitespace");InlineOptWhitespace=e=>P.regex(/[^\S\n]*/).desc("inline optional whitespace");MultilineWhitespace=e=>P.regex(/[^\S\n]*\n\s*/).desc("whitespace with at least a newline");Null=e=>P.seq(P.string("("),e.InlineOptWhitespace,P.string(")")).map((e=>null)).desc("null: ()");Boolean=e=>P.alt(P.string("True"),P.string("False")).map((e=>"True"===e)).desc("either True or False");Number=e=>P.regex(/[\-\+]?[0-9]+(?:\.[0-9]+)?/).map(Number).desc("a number");Word=e=>P.regex(/[a-zA-Z]+/).desc("a word");String=e=>P.regex(/(?:[^"\\]|\\.)*/).wrap(P.string('"'),P.string('"')).map(r.decodeString).desc('string (with possibility to escape the quote using ")');ReferencePath=e=>P.seq(P.string("/"),e.PathSymbol.map((e=>e.toString())).sepBy1(P.string(".")).tieWith(".")).tie().atLeast(2).tie().desc('a path (words with possibly underscore, separated by ".", separated by "/")');AttributeName=e=>e.Word.sepBy1(P.string(".")).tieWith(".").desc('words separated by ""');None=e=>P.string("None").map((e=>new a({type:"None",path:""}))).desc("none");Integer=e=>P.regex(/[\-\+]?[0-9]+/).map((e=>new c(e))).desc("an integer");Guid=e=>P.regex(/[0-9a-zA-Z]{32}/).map((e=>new l({value:e}))).desc("32 digit hexadecimal (accepts all the letters for safety) value");Identifier=e=>P.regex(/\w+/).map((e=>new u(e)));PathSymbol=e=>P.regex(/[0-9\w]+/).map((e=>new g({value:e})));Reference=e=>P.alt(e.None,...[e.ReferencePath.map((e=>new a({type:"",path:e})))].flatMap((e=>[e,e.trim(P.string('"'))])),P.seqMap(e.Word,P.optWhitespace,P.alt(...[e.ReferencePath].flatMap((e=>[e.wrap(P.string('"'),P.string('"')),e.wrap(P.string("'\""),P.string("\"'"))]))),((e,t,n)=>new a({type:e,path:n}))),e.Word.map((e=>new a({type:e,path:""}))));LocalizedText=e=>P.seqMap(P.string(m.lookbehind).skip(P.optWhitespace).skip(P.string("(")),e.String.trim(P.optWhitespace),P.string(","),e.String.trim(P.optWhitespace),P.string(","),e.String.trim(P.optWhitespace),P.string(")"),((e,t,n,i,r,s,a)=>new m({namespace:t,key:i,value:s})));InvariantText=e=>e.String.trim(P.optWhitespace).wrap(P.string(d.lookbehind).skip(P.optWhitespace).skip(P.string("(")),P.string(")")).map((e=>new d({value:e})));AttributeAnyValue=e=>P.alt(e.Null,e.None,e.Boolean,e.Number,e.Integer,e.String,e.Guid,e.LocalizedText,e.InvariantText,e.Reference);PinReference=e=>P.seqMap(e.PathSymbol,P.whitespace,e.Guid,((e,t,n)=>new f({objectName:e,pinGuid:n})));LinearColor=e=>k.createMultiAttributeGrammar(e,p);FunctionReference=e=>k.createMultiAttributeGrammar(e,o);KeyBinding=e=>P.alt(e.Identifier.map((e=>new h({Key:e}))),k.createMultiAttributeGrammar(e,h));Pin=e=>k.createMultiAttributeGrammar(e,y);CustomProperties=e=>P.string("CustomProperties").then(P.whitespace).then(e.Pin).map((e=>t=>{let n=r.objectGet(t,["CustomProperties"],[]);n.push(e),r.objectSet(t,["CustomProperties"],n,!0)}));Object=e=>P.seqMap(P.seq(P.string("Begin"),P.whitespace,P.string("Object"),P.whitespace),P.alt(e.CustomProperties,k.createAttributeGrammar(e,v)).sepBy1(P.whitespace),P.seq(e.MultilineWhitespace,P.string("End"),P.whitespace,P.string("Object")),((e,t,n)=>{let i={};return t.forEach((e=>e(i))),new v(i)}));MultipleObject=e=>e.Object.sepBy1(P.whitespace).trim(P.optWhitespace)}class L{static#o=new Map;static registerSerializer(e,t){L.#o.set(e,t)}static getSerializer(e){return L.#o.get(r.getType(e))}}class x{static grammar=w.createLanguage(new k);constructor(e,t,n,i,r,s){this.entityType=e,this.prefix=t??"",this.separator=n??",",this.trailingSeparator=i??!1,this.attributeValueConjunctionSign=r??"=",this.attributeKeyPrinter=s??(e=>e.join("."))}deserialize(e){return this.read(e)}serialize(e,t){t||=e.isShownAsString();let n=this.write(e,t);return e.isShownAsString()&&(n=`"${n}"`),n}read(e){throw new Error("Not implemented")}write(e,t){throw new Error("Not implemented")}writeValue(e,t,n){if(null===e)return"()";const i=e=>L.getSerializer(r.getType(e)).serialize(e);switch(e?.constructor){case Function:return this.writeValue(e(),t,n);case Boolean:return r.FirstCapital(e.toString());case Number:return e.toString();case String:return n?`\\"${r.encodeString(e)}\\"`:`"${r.encodeString(e)}"`}return e instanceof Array?`(${e.map((e=>i(e)+",")).join("")})`:e instanceof s?i(e):void 0}subWrite(e,t,n){let i="",r=e.concat("");const s=r.length-1;for(const e of Object.getOwnPropertyNames(t)){r[s]=e;const a=t[e];a?.constructor===Object?i+=(i.length?this.separator:"")+this.subWrite(r,a,n):void 0!==a&&this.showProperty(t,r,a)&&(i+=(i.length?this.separator:"")+this.prefix+this.attributeKeyPrinter(r)+this.attributeValueConjunctionSign+this.writeValue(a,r,n))}return this.trailingSeparator&&i.length&&1===r.length&&(i+=this.separator),i}showProperty(e,t,n){const s=this.entityType.attributes,a=r.objectGet(s,t);return!(a instanceof i)||(!r.equals(a.value,n)||a.showDefault)}}class N extends x{constructor(){super(v," ","\n",!1)}showProperty(e,t,n){switch(t.toString()){case"Class":case"Name":case"CustomProperties":return!1}return super.showProperty(e,t,n)}read(e){const t=x.grammar.Object.parse(e);if(!t.status)throw new Error("Error when trying to parse the object.");return t.value}readMultiple(e){const t=x.grammar.MultipleObject.parse(e);if(!t.status)throw new Error("Error when trying to parse the object.");return t.value}write(e,t){return`Begin Object Class=${e.Class.path} Name=${this.writeValue(e.Name,["Name"],t)}\n${this.subWrite([],e,t)+e.CustomProperties.map((e=>this.separator+this.prefix+"CustomProperties "+L.getSerializer(y).serialize(e))).join("")}\nEnd Object\n`}}class D extends t{#l;constructor(e,t,n={}){n.listenOnFocus=!0,n.unlistenOnTextEdit=!0,super(e,t,n),this.serializer=new N;let i=this;this.#l=e=>i.copied()}listenEvents(){document.body.addEventListener("copy",this.#l)}unlistenEvents(){document.body.removeEventListener("copy",this.#l)}copied(){const e=this.blueprint.getNodes(!0).map((e=>this.serializer.serialize(e.entity,!1))).join("\n");navigator.clipboard.writeText(e)}}const T=String.raw;class O{#u=[];get inputObjects(){return this.#u}render(e){return""}setup(e){e.innerHTML=this.render(e)}inputSetup(e){this.#u=this.createInputObjects(e)}cleanup(e){this.#u.forEach((e=>e.unlistenDOMElement()))}createInputObjects(e){return[]}}class M extends t{#c;constructor(t,n,i={}){i.activateAnyKey??=!1,i.activationKeys??=[],i.listenOnFocus??=!0,i.unlistenOnTextEdit??=!0,i.activationKeys instanceof Array||(i.activationKeys=[i.activationKeys]),i.activationKeys=i.activationKeys.map((e=>{if(e instanceof h)return e;if(e.constructor===String){const t=x.grammar.KeyBinding.parse(e);if(t.status)return t.value}throw new Error("Unexpected key value")})),super(t,n,i),this.#c=this.options.activationKeys??[];let r=this;this.keyDownHandler=t=>{(this.options.activateAnyKey||r.#c.some((n=>(e=>e.bShift||"LeftShift"==e.Key||"RightShift"==e.Key)(n)==t.shiftKey&&(e=>e.bCtrl||"LeftControl"==e.Key||"RightControl"==e.Key)(n)==t.ctrlKey&&(e=>e.bAlt||"LeftAlt"==e.Key||"RightAlt"==e.Key)(n)==t.altKey&&e.Keys[n.Key]==t.code)))&&(i.consumeEvent&&t.stopImmediatePropagation(),r.fire(),document.removeEventListener("keydown",r.keyDownHandler),document.addEventListener("keyup",r.keyUpHandler))},this.keyUpHandler=t=>{(this.options.activateAnyKey||r.#c.some((n=>n.bShift&&"Shift"==t.key||n.bCtrl&&"Control"==t.key||n.bAlt&&"Alt"==t.key||n.bCmd&&"Meta"==t.key||e.Keys[n.Key]==t.code)))&&(i.consumeEvent&&t.stopImmediatePropagation(),r.unfire(),document.removeEventListener("keyup",this.keyUpHandler),document.addEventListener("keydown",this.keyDownHandler))}}listenEvents(){document.addEventListener("keydown",this.keyDownHandler)}unlistenEvents(){document.removeEventListener("keydown",this.keyDownHandler)}fire(){}unfire(){}}class A extends M{constructor(t,n,i={}){i.activationKeys=e.deleteNodesKeyboardKey,super(t,n,i)}fire(){this.blueprint.removeGraphElement(...this.blueprint.getNodes(!0))}}class C extends t{constructor(e,t,n){super(e,t,n),this.movementSpace=this.blueprint?.getGridDOMElement()??document.documentElement}locationFromEvent(e){return this.blueprint.compensateTranslation(r.convertLocation([e.clientX,e.clientY],this.movementSpace))}}class I extends C{#d;#h;constructor(e,t,n){n.listenOnFocus=!0,super(e,t,n),this.looseTarget=n?.looseTarget??!0;let i=this;this.#d=e=>{e.preventDefault();const t=i.locationFromEvent(e);i.wheel(Math.sign(e.deltaY),t)},this.#h=e=>e.preventDefault(),this.blueprint.focused&&this.movementSpace.addEventListener("wheel",this.#d,!1)}listenEvents(){this.movementSpace.addEventListener("wheel",this.#d,!1),this.movementSpace.parentElement?.addEventListener("wheel",this.#h)}unlistenEvents(){this.movementSpace.removeEventListener("wheel",this.#d,!1),this.movementSpace.parentElement?.removeEventListener("wheel",this.#h)}wheel(e,t){}}class H extends I{#p=!1;get enableZoonIn(){return this.#p}set enableZoonIn(e){(e=Boolean(e))!=this.#p&&(this.#p=e)}wheel(e,t){let n=this.blueprint.getZoom();e=-e,!this.enableZoonIn&&0==n&&e>0||(n+=e,this.blueprint.setZoom(n,t))}}class j extends M{#m;constructor(t,n,i={}){i.activationKeys=e.enableZoomIn,super(t,n,i)}fire(){this.#m=this.blueprint.getInputObject(H),this.#m.enableZoonIn=!0}unfire(){this.#m.enableZoonIn=!1}}class F extends M{constructor(t,n,i={}){i.activationKeys=e.selectAllKeyboardKey,super(t,n,i)}fire(){this.blueprint.selectAll()}}class z extends C{#g;#f;#y;#b;#v=!1;started=!1;constructor(t,n,i={}){i.clickButton??=0,i.consumeEvent??=!0,i.exitAnyButton??=!0,i.looseTarget??=!1,i.moveEverywhere??=!1,super(t,n,i),this.clickedPosition=[0,0];const r=this.options.moveEverywhere?document.documentElement:this.movementSpace;let s=this;this.#g=e=>{if(this.blueprint.setFocused(!0),e.button===s.options.clickButton)(s.options.looseTarget||e.target==e.currentTarget)&&(this.options.consumeEvent&&e.stopImmediatePropagation(),r.addEventListener("mousemove",s.#f),document.addEventListener("mouseup",s.#b),s.clickedPosition=s.locationFromEvent(e),s.clicked(s.clickedPosition));else s.options.exitAnyButton||s.#b(e)},this.#f=t=>{this.options.consumeEvent&&t.stopImmediatePropagation(),r.removeEventListener("mousemove",s.#f),r.addEventListener("mousemove",s.#y);const n=s.getEvent(e.trackingMouseEventName.begin);s.#v=0==this.target.dispatchEvent(n),s.startDrag(),s.started=!0},this.#y=e=>{this.options.consumeEvent&&e.stopImmediatePropagation();const t=s.locationFromEvent(e),n=[e.movementX,e.movementY];s.dragTo(t,n),s.#v&&(s.blueprint.mousePosition=s.locationFromEvent(e))},this.#b=t=>{if(!s.options.exitAnyButton||t.button==s.options.clickButton){if(this.options.consumeEvent&&t.stopImmediatePropagation(),r.removeEventListener("mousemove",s.#f),r.removeEventListener("mousemove",s.#y),document.removeEventListener("mouseup",s.#b),s.started&&s.endDrag(),s.unclicked(),s.#v){const t=s.getEvent(e.trackingMouseEventName.end);this.target.dispatchEvent(t),s.#v=!1}s.started=!1}},this.listenEvents()}listenEvents(){this.target.addEventListener("mousedown",this.#g),2==this.options.clickButton&&this.target.addEventListener("contextmenu",(e=>e.preventDefault()))}unlistenEvents(){this.target.removeEventListener("mousedown",this.#g)}getEvent(e){return new CustomEvent(e,{detail:{tracker:this},bubbles:!0,cancelable:!0})}clicked(e){}startDrag(e){}dragTo(e,t){}endDrag(){}unclicked(e){}}class G extends z{startDrag(){this.blueprint.template.applyStartDragScrolling(this.blueprint)}dragTo(e,t){this.blueprint.scrollDelta([-t[0],-t[1]])}endDrag(){this.blueprint.template.applyEndDragScrolling(this.blueprint)}}class B extends C{#E=null;#S;#w;#P;constructor(e,t,n={}){n.listenOnFocus=!0,super(e,t,n);let i=this;this.#S=e=>{e.preventDefault(),i.blueprint.mousePosition=i.locationFromEvent(e)},this.#w=e=>{i.#E||(e.preventDefault(),this.#E=e.detail.tracker,i.unlistenMouseMove())},this.#P=e=>{i.#E==e.detail.tracker&&(e.preventDefault(),i.#E=null,i.listenMouseMove())}}listenMouseMove(){this.target.addEventListener("mousemove",this.#S)}unlistenMouseMove(){this.target.removeEventListener("mousemove",this.#S)}listenEvents(){this.listenMouseMove(),this.blueprint.addEventListener(e.trackingMouseEventName.begin,this.#w),this.blueprint.addEventListener(e.trackingMouseEventName.end,this.#P)}unlistenEvents(){this.unlistenMouseMove(),this.blueprint.removeEventListener(e.trackingMouseEventName.begin,this.#w),this.blueprint.removeEventListener(e.trackingMouseEventName.end,this.#P)}}class V extends HTMLElement{#t;get blueprint(){return this.#t}set blueprint(e){this.#t=e}#k;get entity(){return this.#k}set entity(e){this.#k=e}#L;get template(){return this.#L}set template(e){this.#L=e}inputObjects=[];constructor(e,t){super(),this.#k=e,this.#L=t,this.inputObjects=[]}getTemplate(){return this.template}connectedCallback(){this.#t=this.closest("ueb-blueprint"),this.template.setup(this),this.template.inputSetup(this)}disconnectedCallback(){this.template.cleanup(this)}isSameGraph(e){return this.#t&&this.#t==e?.blueprint}getInputObject(e){return this.template.inputObjects.find((t=>t.constructor==e))}createInputObjects(){return[]}}class K extends V{constructor(...e){super(...e),this.dragObject=null,this.location=[0,0],this.selected=!1;let t=this;this.dragHandler=e=>t.addLocation(e.detail.value)}#x(t=!0){this.selected=t,this.blueprint&&(this.selected?this.blueprint.addEventListener(e.nodeDragEventName,this.dragHandler):this.blueprint.removeEventListener(e.nodeDragEventName,this.dragHandler)),this.template.applySelected(this)}connectedCallback(){super.connectedCallback(),this.#x(this.selected)}setLocation(t=[0,0]){const n=[t[0]-this.location[0],t[1]-this.location[1]];if(this.location=t,this.template.applyLocation(this),this.blueprint){const t=new CustomEvent(e.nodeDragLocalEventName,{detail:{value:n},bubbles:!1,cancelable:!0});this.dispatchEvent(t)}}addLocation(e){this.setLocation([this.location[0]+e[0],this.location[1]+e[1]])}setSelected(e=!0){this.selected!=e&&this.#x(e)}dispatchDragEvent(t){const n=new CustomEvent(e.nodeDragEventName,{detail:{value:t},bubbles:!0,cancelable:!0});this.dispatchEvent(n)}snapToGrid(){let t=r.snapToGrid(this.location,e.gridSize);this.location[0]==t[0]&&this.location[1]==t[1]||this.setLocation(t)}}class $ extends z{constructor(e,t,n={}){n.consumeEvent=!0,super(e,t,n)}}document.createElement("div");const R={"&":"&","<":"<",">":">","'":"'",'"':"""};function W(e){return e.toString().replace(/[&<>'"]/g,(e=>R[e]))}class q extends O{static decreasingValue(e,t){const n=-e*t[0]**2,i=t[1]-n/t[0];return e=>n/e+i}static clampedLine(e,t){if(e[0]>t[0]){const n=e;e=t,t=n}const n=(t[1]-e[1])/(t[0]-e[0]),i=e[1]-n*e[0];return r=>r<e[0]?e[1]:r>t[0]?t[1]:n*r+i}static c1DecreasingValue=q.decreasingValue(-.1,[100,15]);static c2DecreasingValue=q.decreasingValue(-.06,[500,130]);static c2Clamped=q.clampedLine([0,100],[200,30]);render(e){const t=crypto.randomUUID();return T`<svg version="1.2" baseProfile="tiny" width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none"><g><path id="${t}" fill="none" vector-effect="non-scaling-stroke"/><use href="#${t}" pointer-events="stroke" stroke-width="10"/></g></svg>`}setup(e){super.setup(e),e.linkMessageElement&&e.appendChild(e.linkMessageElement),e.classList.add("ueb-positioned"),e.pathElement=e.querySelector("path");const t=e.sourcePin??e.destinationPin;t&&e.style.setProperty("--ueb-pin-color",t.getColor()),this.applyPins(e),e.sourcePin&&e.destinationPin&&this.applyFullLocation(e)}applyPins(e){e.sourcePin&&(e.dataset.source=e.sourcePin.GetPinId().toString()),e.destinationPin&&(e.dataset.destination=e.destinationPin.GetPinId().toString())}applyStartDragging(e){e.blueprint.dataset.creatingLink="true",e.classList.add("ueb-link-dragging")}applyFinishDragging(e){e.blueprint.dataset.creatingLink="false",e.classList.remove("ueb-link-dragging")}applySourceLocation(e){e.style.setProperty("--ueb-from-input",e.originatesFromInput?"1":"0"),e.style.setProperty("--ueb-from-x",W(e.sourceLocation[0])),e.style.setProperty("--ueb-from-y",W(e.sourceLocation[1]))}applyFullLocation(t){const n=Math.max(Math.abs(t.sourceLocation[0]-t.destinationLocation[0]),1),i=Math.max(n,e.linkMinWidth);Math.max(Math.abs(t.sourceLocation[1]-t.destinationLocation[1]),1);const r=n/i,s=t.originatesFromInput?t.sourceLocation[0]<t.destinationLocation[0]:t.destinationLocation[0]<t.sourceLocation[0];let a=n<i?(i-n)/2:0;t.style.setProperty("--ueb-from-x",W(t.sourceLocation[0])),t.style.setProperty("--ueb-from-y",W(t.sourceLocation[1])),t.style.setProperty("--ueb-to-x",W(t.destinationLocation[0])),t.style.setProperty("--ueb-to-y",W(t.destinationLocation[1])),t.style.setProperty("margin-left",`-${a}px`),s&&(a+=100*r),t.style.setProperty("--ueb-start-percentage",`${a}%`);const o=a+(s?q.c1DecreasingValue(i):10)*r;let l=q.c2Clamped(s?-n:n)+a;l=Math.min(l,q.c2DecreasingValue(i));const u=e.linkRightSVGPath(a,o,l);t.pathElement?.setAttribute("d",u)}applyLinkMessage(e,t){e.querySelectorAll("ueb-link-message").forEach((e=>e.remove())),e.appendChild(t),e.linkMessageElement=t}}class _ extends V{#N;get sourcePin(){return this.#N}set sourcePin(t){if(this.#N!=t){if(this.#N){const t=this.#N.getNodeElement();t.removeEventListener(e.nodeDeleteEventName,this.#D),t.removeEventListener(e.nodeDragLocalEventName,this.#T),this.#O&&this.#M()}if(this.#N=t,this.#N){const n=this.#N.getNodeElement();this.originatesFromInput=t.isInput(),n.addEventListener(e.nodeDeleteEventName,this.#D),n.addEventListener(e.nodeDragLocalEventName,this.#T),this.setSourceLocation(),this.#O&&this.#A()}this.template.applyPins(this)}}#O;get destinationPin(){return this.#O}set destinationPin(t){if(this.#O!=t){if(this.#O){const t=this.#O.getNodeElement();t.removeEventListener(e.nodeDeleteEventName,this.#D),t.removeEventListener(e.nodeDragLocalEventName,this.#C),this.#N&&this.#M()}if(this.#O=t,this.#O){const t=this.#O.getNodeElement();t.addEventListener(e.nodeDeleteEventName,this.#D),t.addEventListener(e.nodeDragLocalEventName,this.#C),this.setDestinationLocation(),this.#N&&this.#A()}this.template.applyPins(this)}}#D;#T;#C;sourceLocation=[0,0];pathElement;linkMessageElement;originatesFromInput=!1;destinationLocation=[0,0];constructor(e,t){super({},new q);const n=this;this.#D=e=>n.remove(),this.#T=e=>n.addSourceLocation(e.detail.value),this.#C=e=>n.addDestinationLocation(e.detail.value),e&&(this.sourcePin=e),t&&(this.destinationPin=t),e&&t&&this.#A()}#A(){this.#N.linkTo(this.#O),this.#O.linkTo(this.#N)}#M(){this.#N&&this.#O&&(this.#N.unlinkFrom(this.#O),this.#O.unlinkFrom(this.#N))}disconnectedCallback(){super.disconnectedCallback(),this.#M()}getSourceLocation(){return this.sourceLocation}addSourceLocation(e){const t=[this.sourceLocation[0]+e[0],this.sourceLocation[1]+e[1]];this.sourceLocation=t,this.template.applyFullLocation(this)}setSourceLocation(e=null){null==e&&(e=this.#N.template.getLinkLocation(this.#N)),this.sourceLocation=e,this.template.applySourceLocation(this)}getDestinationLocation(){return this.destinationLocation}addDestinationLocation(e){const t=[this.destinationLocation[0]+e[0],this.destinationLocation[1]+e[1]];this.setDestinationLocation(t)}setDestinationLocation(e=null){null==e&&(e=this.#O.template.getLinkLocation(this.#O)),this.destinationLocation=e,this.template.applyFullLocation(this)}setLinkMessage(e){e?this.template.applyLinkMessage(this,e):this.linkMessageElement&&(this.linkMessageElement.remove(),this.linkMessageElement=null)}startDragging(){this.template.applyStartDragging(this)}finishDragging(){this.template.applyFinishDragging(this)}}customElements.define("ueb-link",_);class U extends O{render(e){return T`<span class="${W(e.icon)}"></span> <span class="ueb-link-message"></span>`}setup(e){super.setup(e);const t=t=>e.querySelector(".ueb-link-message").innerText=e.message(e.linkElement.sourcePin,e.linkElement.destinationPin);e.linkElement=e.closest("ueb-link"),e.linkElement?t():window.customElements.whenDefined("ueb-link-message").then(t)}}class Z extends V{static convertType=e=>new Z("ueb-icon-conver-type",((e,t)=>`Convert ${e.getType()} to ${t.getType()}.`));static correct=e=>new Z("ueb-icon-correct",((e,t)=>""));static directionsIncompatible=e=>new Z("ueb-icon-directions-incompatible",((e,t)=>"Directions are not compatbile."));static placeNode=e=>new Z("ueb-icon-place-node",((e,t)=>"Place a new node."));static replaceLink=e=>new Z("ueb-icon-replace-link",((e,t)=>"Replace existing input connections."));static sameNode=e=>new Z("ueb-icon-same-node",((e,t)=>"Both are on the same node."));static typesIncompatible=e=>new Z("ueb-icon-types-incompatible",((e,t)=>`${e.getType()} is not compatible with ${t.getType()}.`));icon;message;linkElement;constructor(e,t){super({},new U),this.icon=e,this.message=t}}customElements.define("ueb-link-message",Z);class X extends z{#I;#H;#j;link;enteredPin;linkValid=!1;constructor(e,t,n){super(e,t,n);let i=this;this.#H=e=>{if(!i.enteredPin){i.linkValid=!1,i.enteredPin=e.target;const t=i.enteredPin,n=i.target;t.getNodeElement()==n.getNodeElement()?this.setLinkMessage(Z.sameNode()):t.isOutput()==n.isOutput()||t.isOutput()==n.isOutput()?this.setLinkMessage(Z.directionsIncompatible()):i.blueprint.getLinks([t,n]).length?(this.setLinkMessage(Z.replaceLink()),i.linkValid=!0):(this.setLinkMessage(Z.correct()),i.linkValid=!0)}},this.#j=e=>{i.enteredPin==e.target&&(i.enteredPin=null,i.linkValid=!1,this.setLinkMessage(Z.placeNode()))}}startDrag(){this.link=new _(this.target,null),this.blueprint.nodesContainerElement.prepend(this.link),this.setLinkMessage(Z.placeNode()),this.#I=this.blueprint.querySelectorAll("ueb-pin"),this.#I.forEach((e=>{e!=this.target&&(e.getClickableElement().addEventListener("mouseenter",this.#H),e.getClickableElement().addEventListener("mouseleave",this.#j))})),this.link.startDragging(),this.link.setDestinationLocation(this.clickedPosition)}dragTo(e,t){this.link.setDestinationLocation(e)}endDrag(){this.#I.forEach((e=>{e.removeEventListener("mouseenter",this.#H),e.removeEventListener("mouseleave",this.#j)})),this.enteredPin&&this.linkValid?(this.blueprint.addGraphElement(this.link),this.link.destinationPin=this.enteredPin,this.link.setLinkMessage(null),this.link.finishDragging()):(this.link.finishDragging(),this.link.remove()),this.enteredPin=null,this.link=null,this.#I=null}setLinkMessage(e){this.link.setLinkMessage(e)}}class Y extends O{createInputObjects(e){return[new X(e.clickableElement,e.blueprint,{moveEverywhere:!0,looseTarget:!0})]}render(e){const t=T`<div class="ueb-pin-icon">${this.renderIcon(e)}</div>`,n=T`<div class="ueb-pin-content"><span class="ueb-pin-name">${W(e.getPinDisplayName())}</span> ${this.renderInput(e)}</div>`;return T`<div class="ueb-pin-wrapper">${e.isInput()?t+n:n+t}</div>`}renderIcon(e){return'<span class="ueb-pin-icon-value"></span>'}renderInput(e){return""}setup(e){super.setup(e),e.classList.add("ueb-node-"+(e.isInput()?"input":e.isOutput()?"output":"hidden"),"ueb-pin-type-"+W(e.getType())),e.dataset.id=e.GetPinIdValue(),e.entity.bAdvancedView&&(e.dataset.advancedView="true"),e.clickableElement=e,e.nodeElement=e.closest("ueb-node")}applyConnected(e){e.isLinked()?e.classList.add("ueb-pin-fill"):e.classList.remove("ueb-pin-fill")}getLinkLocation(e){const t=e.querySelector(".ueb-pin-icon").getBoundingClientRect();return e.blueprint.compensateTranslation(r.convertLocation([(t.left+t.right)/2,(t.top+t.bottom)/2],e.blueprint.gridElement))}}class Q extends Y{#F;get inputContentElements(){return this.#F}setup(e){if(super.setup(e),this.#F=[...e.querySelectorAll(".ueb-pin-input-content")],this.#F.length){this.setInputs(e,[r.decodeInputString(e.entity.DefaultValue)]);let t=this;this.onFocusHandler=t=>e.blueprint.dispatchEditTextEvent(!0),this.onFocusOutHandler=n=>{n.preventDefault(),document.getSelection().removeAllRanges(),t.setInputs(e,this.getInputs(e)),e.blueprint.dispatchEditTextEvent(!1)},this.#F.forEach((e=>{e.addEventListener("focus",this.onFocusHandler),e.addEventListener("focusout",this.onFocusOutHandler)}))}}cleanup(e){super.cleanup(e),this.#F.forEach((e=>{e.removeEventListener("focus",this.onFocusHandler),e.removeEventListener("focusout",this.onFocusOutHandler)}))}createInputObjects(e){return[...super.createInputObjects(e),...this.#F.map((t=>new $(t,e.blueprint)))]}getInput(e){return this.getInputs(e).reduce(((e,t)=>e+t),"")}getInputs(e){return this.#F.map((e=>e.innerHTML.replaceAll("<br>","\n")))}setInputs(e,t=[],n=!0){this.#F.forEach(((e,n)=>e.innerText=t[n])),n&&(e.entity.DefaultValue=this.getInput(e))}renderInput(e){return e.isInput()?T`<div class="ueb-pin-input"><span class="ueb-pin-input-content" role="textbox" contenteditable="true"></span></div>`:""}}class J extends Q{#z;setup(e){super.setup(e),this.#z=e.querySelector(".ueb-pin-input");let t=this;this.onChangeHandler=n=>e.entity.DefaultValue=t.#z.checked?"true":"false",this.#z.addEventListener("change",this.onChangeHandler)}cleanup(e){super.cleanup(e),this.#z.removeEventListener("change",this.onChangeHandler)}getInputs(e){return[this.#z.checked?"true":"false"]}setInputs(e,t=[]){e.entity.DefaultValue=t.length?t[0]:this.getInput(e),this.#z.checked="true"==e.entity.DefaultValue}renderInput(e){return e.isInput()?T`<input type="checkbox" class="ueb-pin-input" ${"true"==e.entity.DefaultValue?"checked":""}>`:super.renderInput(e)}}class ee extends Y{renderIcon(e){return T`<svg class="ueb-pin-icon-exec" width="16" height="16" viewBox="-2 0 16 16" fill="none"><path class="ueb-pin-tofill" stroke-width="1.25" stroke="currentColor" d=" M 2 1 a 2 2 0 0 0 -2 2 v 10 a 2 2 0 0 0 2 2 h 4 a 2 2 0 0 0 1.519 -0.698 l 4.843 -5.651 a 1 1 0 0 0 0 -1.302 L 7.52 1.7 a 2 2 0 0 0 -1.519 -0.698 z "/></svg>`}}class te extends Q{#z;setup(e){super.setup(e),this.#z=e.querySelector(".ueb-pin-input"),this.#z.dataset.linearColor=e.entity.DefaultValue.toString()}getInputs(e){return[this.#z.dataset.linearColor]}setInputs(e,t=[]){}renderInput(e){return e.isInput()?T`<span class="ueb-pin-input"></span>`:super.renderInput(e)}}class ne extends Q{onInputHandler;setup(e){super.setup(e),this.onInputHandler=e=>{e.stopPropagation(),("insertParagraph"==e.inputType||"insertLineBreak"==e.inputType||"insertFromPaste"==e.inputType&&e.target.innerText.includes("\n"))&&(e.target.blur(),this.inputContentElements.forEach((e=>e.innerText=e.innerText.replaceAll("\n",""))))},this.inputContentElements.forEach((e=>{e.addEventListener("input",this.onInputHandler)}))}cleanup(e){super.cleanup(e),this.inputContentElements.forEach((e=>{e.removeEventListener("input",this.onInputHandler)}))}getInputs(e){return this.inputContentElements.map((e=>e.textContent))}setInputs(e,t=[],n=!0){t=t.map((e=>e.replaceAll("\n",""))),super.setInputs(e,t,n)}}class ie extends Q{setInputs(e,t=[]){let n=parseFloat(t.length?t[0]:this.getInput(e)),i=!0;isNaN(n)&&(n=parseFloat(""!=e.entity.DefaultValue?e.entity.DefaultValue:e.entity.AutogeneratedDefaultValue)),isNaN(n)&&(n=0,i=!1),t[0]=r.minDecimals(n),super.setInputs(e,t,i)}}class re extends Q{setup(e){super.setup(e)}}class se extends V{static#G={bool:J,exec:ee,name:ne,real:ie,string:re,struct:{"/Script/CoreUObject.LinearColor":te}};static getTypeTemplate(e){let t=se.#G[e.getType()];return t.constructor===Object&&(t=t[e.getSubCategory()]),t??Y}#B="";nodeElement;clickableElement;connections=0;constructor(e){super(e,new(se.getTypeTemplate(e)))}connectedCallback(){super.connectedCallback(),this.#B=window.getComputedStyle(this).getPropertyValue("--ueb-pin-color")}GetPinId(){return this.entity.PinId}GetPinIdValue(){return this.GetPinId().value}getPinName(){return this.entity.PinName}getPinDisplayName(){let e=null;return this.entity.PinToolTip&&(e=this.entity.PinToolTip.match(/\s*(.+?(?=\n)|.+\S)\s*/))?r.formatStringName(e[1]):r.formatStringName(this.entity.PinName)}isInput(){return this.entity.isInput()}isOutput(){return this.entity.isOutput()}isLinked(){return this.entity.isLinked()}getType(){return this.entity.getType()}getClickableElement(){return this.clickableElement}getColor(){return this.#B}getLinkLocation(){return this.template.getLinkLocation(this)}getNodeElement(){return this.closest("ueb-node")}getLinks(){return this.entity.LinkedTo??[]}sanitizeLinks(){this.entity.LinkedTo=this.getLinks().filter((e=>{let t=this.blueprint.getPin(e);if(t){this.blueprint.getLink(this,t,!0)||this.blueprint.addGraphElement(new _(this,t))}return t}))}linkTo(e){this.entity.linkTo(e.nodeElement.getNodeName(),e.entity),this.template.applyConnected(this)}unlinkFrom(e){this.entity.unlinkFrom(e.nodeElement.getNodeName(),e.entity),this.template.applyConnected(this)}redirectLink(e,t){const n=this.entity.LinkedTo.findIndex((t=>t.objectName.toString()==e.getPinName()&&t.pinGuid==e.entity.PinId));return n>=0&&(this.entity.LinkedTo[n]=t,!0)}}customElements.define("ueb-pin",se);class ae extends z{constructor(e,t,n){super(e,t,n),this.stepSize=parseInt(n?.stepSize??this.blueprint.gridSize),this.mouseLocation=[0,0]}startDrag(){this.mouseLocation=r.snapToGrid(this.clickedPosition,this.stepSize),this.target.selected||(this.blueprint.unselectAll(),this.target.setSelected(!0))}dragTo(e,t){const[n,i]=this.stepSize>1?[r.snapToGrid(e,this.stepSize),r.snapToGrid(this.target.location,this.stepSize)]:[e,this.target.location],s=[n[0]-this.mouseLocation[0],n[1]-this.mouseLocation[1]];0==s[0]&&0==s[1]||(s[0]+=i[0]-this.target.location[0],s[1]+=i[1]-this.target.location[1],this.target.dispatchDragEvent(s),this.mouseLocation=n)}unclicked(){this.started||(this.blueprint.unselectAll(),this.target.setSelected(!0))}}class oe extends O{createInputObjects(e){return[...super.createInputObjects(e),new ae(e,e.blueprint,{looseTarget:!0})]}applyLocation(e){e.style.setProperty("--ueb-position-x",W(e.location[0])),e.style.setProperty("--ueb-position-y",W(e.location[1]))}applySelected(e){e.selected?e.classList.add("ueb-selected"):e.classList.remove("ueb-selected")}}class le extends oe{toggleAdvancedDisplayHandler;render(e){return T`<div class="ueb-node-border"><div class="ueb-node-wrapper"><div class="ueb-node-top"><div class="ueb-node-name"><span class="ueb-node-name-symbol"></span> <span class="ueb-node-name-text">${W(e.getNodeDisplayName())}</span></div></div><div class="ueb-node-content"><div class="ueb-node-inputs"></div><div class="ueb-node-outputs"></div></div>${"DevelopmentOnly"==e.entity.EnabledState?.toString()?T`<div class="ueb-node-developmentonly">Development Only</div>`:""} ${e.entity.AdvancedPinDisplay?T`<div class="ueb-node-expansion"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="ueb-node-expansion-icon" viewBox="4 4 24 24"><path d=" M 16.003 18.626 l 7.081 -7.081 L 25 13.46 l -8.997 8.998 -9.003 -9 1.917 -1.916 z "/></svg></div>`:""}</div></div>`}setup(e){super.setup(e),e.dataset.name=W(e.entity.getObjectName()),e.entity.EnabledState&&(e.dataset.enabledState=e.entity.EnabledState.toString()),e.selected&&e.classList.add("ueb-selected"),this.applyAdvancedPinDisplay(e),e.style.setProperty("--ueb-position-x",W(e.location[0])),e.style.setProperty("--ueb-position-y",W(e.location[1]));let t=e.querySelector(".ueb-node-inputs"),n=e.querySelector(".ueb-node-outputs"),i=e.getPinEntities();i.filter((e=>e.isInput())).forEach((e=>t.appendChild(new se(e)))),i.filter((e=>e.isOutput())).forEach((e=>n.appendChild(new se(e)))),this.toggleAdvancedDisplayHandler=t=>{e.toggleShowAdvancedPinDisplay()},e.entity.AdvancedPinDisplay&&e.querySelector(".ueb-node-expansion").addEventListener("click",this.toggleAdvancedDisplayHandler)}applyAdvancedPinDisplay(e){e.entity.AdvancedPinDisplay&&(e.dataset.advancedDisplay=e.entity.AdvancedPinDisplay.toString())}applyRename(e){const t=e.entity.getObjectName();e.dataset.name=W(t),e.querySelector(".ueb-node-name-text").innerText=W(e.getNodeDisplayName())}getPinElements(e){return e.querySelectorAll("ueb-pin")}}class ue extends K{constructor(e){super(e,new le),this.dragLinkObjects=[],super.setLocation([this.entity.NodePosX.value,this.entity.NodePosY.value])}static fromSerializedObject(e){e=e.trim();let t=L.getSerializer(v).deserialize(e);return new ue(t)}connectedCallback(){this.getAttribute("type")?.trim(),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this.dispatchDeleteEvent()}getNodeName(){return this.entity.getObjectName()}getNodeDisplayName(){return this.entity.getDisplayName()}sanitizeLinks(){this.getPinElements().forEach((e=>e.sanitizeLinks()))}rename(e){if(this.entity.Name==e)return!1;for(let t of this.getPinElements())for(let n of t.getLinks())this.blueprint.getPin(n).redirectLink(t,new f({objectName:e,pinGuid:t.entity.PinId}));this.entity.Name=e,this.template.applyRename(this)}getPinElements(){return this.template.getPinElements(this)}getPinEntities(){return this.entity.CustomProperties.filter((e=>e instanceof y))}setLocation(e=[0,0]){let t=this.entity.NodePosX.constructor;this.entity.NodePosX=new t(e[0]),this.entity.NodePosY=new t(e[1]),super.setLocation(e)}dispatchDeleteEvent(t){let n=new CustomEvent(e.nodeDeleteEventName,{bubbles:!0,cancelable:!0});this.dispatchEvent(n)}setShowAdvancedPinDisplay(e){this.entity.AdvancedPinDisplay=new u(e?"Shown":"Hidden"),this.template.applyAdvancedPinDisplay(this)}toggleShowAdvancedPinDisplay(){this.setShowAdvancedPinDisplay("Shown"!=this.entity.AdvancedPinDisplay.value)}}customElements.define("ueb-node",ue);class ce extends t{#V;constructor(e,t,n={}){n.listenOnFocus=!0,n.unlistenOnTextEdit=!0,super(e,t,n),this.serializer=new N;let i=this;this.#V=e=>i.pasted(e.clipboardData.getData("Text"))}listenEvents(){document.body.addEventListener("paste",this.#V)}unlistenEvents(){document.body.removeEventListener("paste",this.#V)}pasted(e){let t=0,n=0,i=0,r=this.serializer.readMultiple(e).map((e=>{let r=new ue(e);return t+=r.location[1],n+=r.location[0],++i,r}));t/=i,n/=i,r.length>0&&this.blueprint.unselectAll();let s=this.blueprint.mousePosition;return r.forEach((e=>{const i=[s[0]-n,s[1]-t];e.addLocation(i),e.setSelected(!0),e.snapToGrid()})),this.blueprint.addGraphElement(...r),!0}}class de extends z{constructor(e,t,n){super(e,t,n),this.selectorElement=this.blueprint.selectorElement}startDrag(){this.selectorElement.startSelecting(this.clickedPosition)}dragTo(e,t){this.selectorElement.doSelecting(e)}endDrag(){this.started&&this.selectorElement.finishSelecting()}unclicked(){this.started||this.blueprint.unselectAll()}}class he{constructor(e=(e=>e),t=null){this.array=new Uint32Array(t),this.comparisonValueSupplier=e,this.length=0,this.currentPosition=0}get(e){return e>=0&&e<this.length?this.array[e]:null}getArray(){return this.array}getPosition(e){let t=0,n=this.length;for(;t<n;){let i=Math.floor((t+n)/2);this.comparisonValueSupplier(this.array[i])<e?t=i+1:n=i}return t}reserve(e){if(this.array.length<e){let t=new Uint32Array(e);t.set(this.array),this.array=t}}insert(e,t=null){let n=this.getPosition(this.comparisonValueSupplier(e));return(n<this.currentPosition||null!=t&&n==this.currentPosition&&this.comparisonValueSupplier(e)<t)&&++this.currentPosition,this.shiftRight(n),this.array[n]=e,++this.length,n}remove(e){let t=this.getPosition(this.comparisonValueSupplier(e));this.array[t]==e&&this.removeAt(t)}removeAt(e){return e<this.currentPosition&&--this.currentPosition,this.shiftLeft(e),--this.length,e}getNext(){return this.currentPosition>=0&&this.currentPosition<this.length?this.get(this.currentPosition):null}getNextValue(){return this.currentPosition>=0&&this.currentPosition<this.length?this.comparisonValueSupplier(this.get(this.currentPosition)):Number.MAX_SAFE_INTEGER}getPrev(){return this.currentPosition>0?this.get(this.currentPosition-1):null}getPrevValue(){return this.currentPosition>0?this.comparisonValueSupplier(this.get(this.currentPosition-1)):Number.MIN_SAFE_INTEGER}shiftLeft(e,t=1){this.array.set(this.array.subarray(e+t),e)}shiftRight(e,t=1){this.array.set(this.array.subarray(e,-t),e+t)}}class pe{constructor(e,t,n,i){this.initialPosition=e,this.finalPosition=e,this.metadata=new Array(t.length),this.primaryOrder=new he((e=>this.metadata[e].primaryBoundary)),this.secondaryOrder=new he((e=>this.metadata[e].secondaryBoundary)),this.selectFunc=i,this.rectangles=t,this.primaryOrder.reserve(this.rectangles.length),this.secondaryOrder.reserve(this.rectangles.length),t.forEach(((e,t)=>{let r={primaryBoundary:this.initialPosition[0],secondaryBoundary:this.initialPosition[1],rectangle:t,onSecondaryAxis:!1};this.metadata[t]=r,i(e,!1);const s=n(e);this.initialPosition[1]<s.secondaryInf?r.secondaryBoundary=s.secondaryInf:s.secondarySup<this.initialPosition[1]?r.secondaryBoundary=s.secondarySup:r.onSecondaryAxis=!0,this.initialPosition[0]<s.primaryInf?(r.primaryBoundary=s.primaryInf,this.primaryOrder.insert(t)):s.primarySup<this.initialPosition[0]?(r.primaryBoundary=s.primarySup,this.primaryOrder.insert(t)):s.secondarySup<this.initialPosition[1]||this.initialPosition[1]<s.secondaryInf?this.secondaryOrder.insert(t):i(e,!0)})),this.primaryOrder.currentPosition=this.primaryOrder.getPosition(this.initialPosition[0]),this.secondaryOrder.currentPosition=this.secondaryOrder.getPosition(this.initialPosition[1]),this.computeBoundaries()}computeBoundaries(){this.boundaries={primaryN:{v:this.primaryOrder.getPrevValue(),i:this.primaryOrder.getPrev()},primaryP:{v:this.primaryOrder.getNextValue(),i:this.primaryOrder.getNext()},secondaryN:{v:this.secondaryOrder.getPrevValue(),i:this.secondaryOrder.getPrev()},secondaryP:{v:this.secondaryOrder.getNextValue(),i:this.secondaryOrder.getNext()}}}selectTo(e){const t=[Math.sign(e[0]-this.initialPosition[0]),Math.sign(e[1]-this.initialPosition[1])],n=(n,i)=>{if(this.metadata[n].onSecondaryAxis)this.selectFunc(this.rectangles[n],i);else if(i){this.secondaryOrder.insert(n,e[1]);const i=this.metadata[n].secondaryBoundary;Math.sign(e[1]-i)==t[1]&&Math.sign(i-this.initialPosition[1])==t[1]&&this.selectFunc(this.rectangles[n],!0)}else this.selectFunc(this.rectangles[n],!1),this.secondaryOrder.remove(n);this.computeBoundaries(),this.selectTo(e)};e[0]<this.boundaries.primaryN.v?(--this.primaryOrder.currentPosition,n(this.boundaries.primaryN.i,this.initialPosition[0]>this.boundaries.primaryN.v&&e[0]<this.initialPosition[0])):e[0]>this.boundaries.primaryP.v&&(++this.primaryOrder.currentPosition,n(this.boundaries.primaryP.i,this.initialPosition[0]<this.boundaries.primaryP.v&&this.initialPosition[0]<e[0]));const i=(t,n)=>{this.selectFunc(this.rectangles[t],n),this.computeBoundaries(),this.selectTo(e)};e[1]<this.boundaries.secondaryN.v?(--this.secondaryOrder.currentPosition,i(this.boundaries.secondaryN.i,this.initialPosition[1]>this.boundaries.secondaryN.v&&e[1]<this.initialPosition[1])):e[1]>this.boundaries.secondaryP.v&&(++this.secondaryOrder.currentPosition,i(this.boundaries.secondaryP.i,this.initialPosition[1]<this.boundaries.secondaryP.v&&this.initialPosition[1]<e[1])),this.finalPosition=e}}class me extends O{setup(e){super.setup(e),this.applyFinishSelecting(e)}applyStartSelecting(e,t){e.style.setProperty("--ueb-from-x",W(t[0])),e.style.setProperty("--ueb-from-y",W(t[1])),e.style.setProperty("--ueb-to-x",W(t[0])),e.style.setProperty("--ueb-to-y",W(t[1])),e.blueprint.dataset.selecting="true"}applyDoSelecting(e,t){e.style.setProperty("--ueb-to-x",W(t[0])),e.style.setProperty("--ueb-to-y",W(t[1]))}applyFinishSelecting(e){e.blueprint.dataset.selecting="false"}}class ge extends V{constructor(){super({},new me),this.selectionModel=null}startSelecting(e){this.template.applyStartSelecting(this,e),this.selectionModel=new pe(e,this.blueprint.getNodes(),this.blueprint.nodeBoundariesSupplier,this.blueprint.nodeSelectToggleFunction)}doSelecting(e){this.template.applyDoSelecting(this,e),this.selectionModel.selectTo(e)}finishSelecting(){this.template.applyFinishSelecting(this),this.selectionModel=null}}customElements.define("ueb-selector",ge);class fe extends t{#K;constructor(e,t,n={}){n.listenOnFocus=!0,super(e,t,n);let i=this;this.#K=e=>i.clickedSomewhere(e.target),this.blueprint.focus&&document.addEventListener("click",this.#K)}clickedSomewhere(e){e.closest("ueb-blueprint")||this.blueprint.setFocused(!1)}listenEvents(){document.addEventListener("click",this.#K)}unlistenEvents(){document.removeEventListener("click",this.#K)}}class ye extends O{createInputObjects(e){return[new D(e.getGridDOMElement(),e),new ce(e.getGridDOMElement(),e),new A(e.getGridDOMElement(),e),new F(e.getGridDOMElement(),e),new H(e.getGridDOMElement(),e,{looseTarget:!0}),new de(e.getGridDOMElement(),e,{clickButton:0,exitAnyButton:!0,looseTarget:!0,moveEverywhere:!0}),new G(e.getGridDOMElement(),e,{clickButton:2,exitAnyButton:!1,looseTarget:!0,moveEverywhere:!0}),new fe(e.getGridDOMElement(),e),new B(e.getGridDOMElement(),e),new j(e.getGridDOMElement(),e)]}header(e){return T`<div class="ueb-viewport-header"><div class="ueb-viewport-zoom">1:1</div></div>`}overlay(e){return T`<div class="ueb-viewport-overlay"></div>`}viewport(e){return T`<div class="ueb-viewport-body"><div class="ueb-grid" style="--ueb-additional-x:${W(e.additional[0])}--ueb-additional-y:${W(e.additional[1])}--ueb-translate-x:${W(e.translateValue[0])}--ueb-translate-y:${W(e.translateValue[1])}"><div class="ueb-grid-content"><div data-links></div><div data-nodes></div></div></div></div>`}render(e){return T`${this.header(e)} ${this.overlay(e)} ${this.viewport(e)}`}setup(t){super.setup(t),t.classList.add("ueb",`ueb-zoom-${t.zoom}`),Object.entries({"--ueb-font-size":W(e.fontSize),"--ueb-grid-size":`${W(e.gridSize)}px`,"--ueb-grid-line-width":`${W(e.gridLineWidth)}px`,"--ueb-grid-line-color":W(e.gridLineColor),"--ueb-grid-set":W(e.gridSet),"--ueb-grid-set-line-color":W(e.gridSetLineColor),"--ueb-grid-axis-line-color":W(e.gridAxisLineColor),"--ueb-node-radius":`${W(e.nodeRadius)}px`,"--ueb-link-min-width":W(e.linkMinWidth)}).forEach((e=>t.style.setProperty(e[0],e[1]))),t.headerElement=t.querySelector(".ueb-viewport-header"),t.overlayElement=t.querySelector(".ueb-viewport-overlay"),t.viewportElement=t.querySelector(".ueb-viewport-body"),t.selectorElement=new ge,t.gridElement=t.viewportElement.querySelector(".ueb-grid"),t.querySelector(".ueb-grid-content").append(t.selectorElement),t.linksContainerElement=t.querySelector("[data-links]"),t.linksContainerElement.append(...t.getLinks()),t.nodesContainerElement=t.querySelector("[data-nodes]"),t.nodesContainerElement.append(...t.getNodes()),this.applyEndDragScrolling(t)}applyZoom(e,t){e.classList.remove("ueb-zoom-"+W(e.zoom)),e.classList.add("ueb-zoom-"+W(t))}applyExpand(e){e.gridElement.style.setProperty("--ueb-additional-x",W(e.additional[0])),e.gridElement.style.setProperty("--ueb-additional-y",W(e.additional[1]))}applyTranlate(e){e.gridElement.style.setProperty("--ueb-translate-x",W(e.translateValue[0])),e.gridElement.style.setProperty("--ueb-translate-y",W(e.translateValue[1]))}applyStartDragScrolling(e){e.dataset.dragScrolling="true"}applyEndDragScrolling(e){e.dataset.dragScrolling="false"}getPin(e,t){return e.querySelector(`ueb-node[data-name="${t.objectName}"] ueb-pin[data-id="${t.pinGuid}"]`)}}class be extends V{#$;get additional(){return this.#$}set additional(e){e[0]=Math.abs(e[0]),e[1]=Math.abs(e[1])}#R;get translateValue(){return this.#R}set translateValue(e){this.#R=e}#W=new Map;gridSize;nodes=[];links=[];mousePosition=[0,0];gridElement=null;viewportElement=null;overlayElement=null;selectorElement=null;linksContainerElement=null;nodesContainerElement=null;zoom=0;headerElement=null;focused=!1;nodeBoundariesSupplier=e=>{let t=e.getBoundingClientRect(),n=this.nodesContainerElement.getBoundingClientRect();const i=1/this.getScale();return{primaryInf:(t.left-n.left)*i,primarySup:(t.right-n.right)*i,secondaryInf:(t.top-n.top)*i,secondarySup:(t.bottom-n.bottom)*i}};nodeSelectToggleFunction=(e,t)=>{e.setSelected(t)};constructor(t=new e){super({},new ye),this.gridSize=e.gridSize,this.#$=[2*e.expandGridSize,2*e.expandGridSize],this.#R=[e.expandGridSize,e.expandGridSize]}#q(e,t){e=Math.round(e),t=Math.round(t),this.additional[0]+=e,this.additional[1]+=t,this.template.applyExpand(this)}#_(e,t){e=Math.round(e),t=Math.round(t),this.translateValue[0]+=e,this.translateValue[1]+=t,this.template.applyTranlate(this)}getGridDOMElement(){return this.gridElement}disconnectedCallback(){super.disconnectedCallback()}getScroll(){return[this.viewportElement.scrollLeft,this.viewportElement.scrollTop]}setScroll(e,t=!1){this.scroll=e,t?this.viewportElement.scroll({left:e[0],top:e[1],behavior:"smooth"}):this.viewportElement.scroll(e[0],e[1])}scrollDelta(t,n=!1){const i=this.getScrollMax();let r=this.getScroll(),s=[r[0]+t[0],r[1]+t[1]],a=[0,0],o=[0,0],l=[0,0];for(let n=0;n<2;++n)t[n]<0&&s[n]<e.gridExpandThreshold*e.expandGridSize?(a[n]=e.expandGridSize,l[n]=-1,i[n]-s[n]>e.gridShrinkThreshold*e.expandGridSize&&(o[n]=-e.expandGridSize)):t[n]>0&&s[n]>i[n]-e.gridExpandThreshold*e.expandGridSize&&(a[n]=e.expandGridSize,l[n]=1,s[n]>e.gridShrinkThreshold*e.expandGridSize&&(o[n]=-e.expandGridSize));0==a[0]&&0==a[1]||(this.seamlessExpand(a,l),l=[-l[0],-l[1]],this.seamlessExpand(o,l)),r=this.getScroll(),s=[r[0]+t[0],r[1]+t[1]],this.setScroll(s,n)}scrollCenter(){const e=this.getScroll(),t=[this.translateValue[0]-e[0],this.translateValue[1]-e[1]],n=this.getViewportSize().map((e=>e/2)),i=[t[0]-n[0],t[1]-n[1]];this.scrollDelta(i,!0)}getExpandGridSize(){return e.expandGridSize}getViewportSize(){return[this.viewportElement.clientWidth,this.viewportElement.clientHeight]}getScrollMax(){return[this.viewportElement.scrollWidth-this.viewportElement.clientWidth,this.viewportElement.scrollHeight-this.viewportElement.clientHeight]}snapToGrid(e){return r.snapToGrid(e,this.gridSize)}seamlessExpand([e,t],[n,i]=[1,1]){this.viewportElement.scrollLeft,this.viewportElement.scrollTop;let r=this.getScale(),s=e/r,a=t/r;this.#q(s,a);const o=[0,0];n<0&&(this.viewportElement.scrollLeft+=e,o[0]=s),i<0&&(this.viewportElement.scrollTop+=t,o[1]=a),this.#_(o[0],o[1])}progressiveSnapToGrid(t){return e.expandGridSize*Math.round(t/e.expandGridSize+.5*Math.sign(t))}getZoom(){return this.zoom}setZoom(t,n){if((t=r.clamp(t,e.minZoom,e.maxZoom))==this.zoom)return;let i=this.getScale();if(this.template.applyZoom(this,t),this.zoom=t,n){n[0]+=this.translateValue[0],n[1]+=this.translateValue[1];let e=this.getScale()/i,t=[e*n[0],e*n[1]];this.scrollDelta([(t[0]-n[0])*i,(t[1]-n[1])*i])}}getScale(){return parseFloat(getComputedStyle(this.gridElement).getPropertyValue("--ueb-scale"))}compensateTranslation(e){return e[0]-=this.translateValue[0],e[1]-=this.translateValue[1],e}getNodes(e=!1){return e?this.nodes.filter((e=>e.selected)):this.nodes}getPin(e){return this.template.getPin(this,e)}getLinks([e,t]=[]){if(null==e!=t==null){const n=e??t;return this.links.filter((e=>e.sourcePin==n||e.destinationPin==n))}return null!=e&&null!=t?this.links.filter((n=>n.sourcePin==e&&n.destinationPin==t||n.sourcePin==t&&n.destinationPin==e)):this.links}getLink(e,t,n=!1){return this.links.find((i=>i.sourcePin==e&&i.destinationPin==t||n&&i.sourcePin==t&&i.destinationPin==e))}selectAll(){this.getNodes().forEach((e=>this.nodeSelectToggleFunction(e,!0)))}unselectAll(){this.getNodes().forEach((e=>this.nodeSelectToggleFunction(e,!1)))}addGraphElement(...t){for(let n of t)if(n instanceof ue&&!this.nodes.includes(n)){const t=n.entity.getObjectName(),i=this.nodes.find((e=>e.entity.getObjectName()==t));if(i){let t=i.entity.getObjectName(!0);this.#W[t]=this.#W[t]??-1;do{++this.#W[t]}while(this.nodes.find((n=>n.entity.getObjectName()==e.nodeName(t,this.#W[t]))));i.rename(e.nodeName(t,this.#W[t]))}this.nodes.push(n),this.nodesContainerElement?.appendChild(n)}else n instanceof _&&!this.links.includes(n)&&(this.links.push(n),this.linksContainerElement?.appendChild(n));t.filter((e=>e instanceof ue)).forEach((e=>e.sanitizeLinks()))}removeGraphElement(...e){for(let t of e)if(t.closest("ueb-blueprint")==this){t.remove();let e=t instanceof ue?this.nodes:t instanceof _?this.links:null;e?.splice(e.findIndex((e=>e===t)),1)}}setFocused(e=!0){if(this.focused==e)return;let t=new CustomEvent(e?"blueprint-focus":"blueprint-unfocus");this.focused=e,this.dataset.focused=this.focused?"true":"false",this.focused||this.unselectAll(),this.dispatchEvent(t)}dispatchEditTextEvent(t){const n=new CustomEvent(t?e.editTextEventName.begin:e.editTextEventName.end);this.dispatchEvent(n)}}customElements.define("ueb-blueprint",be);class ve extends x{constructor(e,t,n,i,r,s,a){e=e??(e=>`(${e})`),super(t,n,i,r,s,a),this.wrap=e}read(e){const t=k.getGrammarForType(x.grammar,this.entityType).parse(e);if(!t.status)throw new Error(`Error when trying to parse the entity ${this.entityType.prototype.constructor.name}.`);return t.value}write(e,t=!1){return this.wrap(this.subWrite([],e,t))}}class Ee extends ve{constructor(e,t){super(void 0,t),this.objectWriter=e}write(e,t=!1){return this.objectWriter(e,t)}}class Se extends ve{constructor(){super((e=>`${y.lookbehind} (${e})`),y,"",",",!0)}writeValue(e,t,n){return e?.constructor===String&&1==t.length&&"DefaultValue"==t[0]?`"${r.encodeInputString(e)}"`:super.writeValue(e,t,n)}}class we extends ve{constructor(e){super(void 0,e)}write(e,t){return t||e.isShownAsString()?`"${e.toString().replaceAll('"','\\"')}"`:e.toString()}}!function(){const e=e=>`(${e})`;L.registerSerializer(p,new ve(e,p)),L.registerSerializer(v,new N),L.registerSerializer(y,new Se),L.registerSerializer(o,new ve(e,o)),L.registerSerializer(h,new ve(e,h)),L.registerSerializer(m,new ve((e=>`${m.lookbehind}(${e})`),m,"",", ",!1,"",(e=>""))),L.registerSerializer(d,new ve((e=>`${d.lookbehind}(${e})`),d,"",", ",!1,"",(e=>""))),L.registerSerializer(f,new ve((e=>e),f,""," ",!1,"",(e=>""))),L.registerSerializer(a,new Ee((e=>(e.type??"")+(e.path?e.type?`'"${e.path}"'`:`"${e.path}"`:"")),a)),L.registerSerializer(u,new we(u)),L.registerSerializer(g,new we(g)),L.registerSerializer(l,new we(l)),L.registerSerializer(c,new we(c))}();export{be as Blueprint,e as Configuration,_ as LinkElement,ue as NodeElement};
|