@elyx-code/project-logic-tree 0.0.5991 → 0.0.5992

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -40271,8 +40271,8 @@ async function A3(n, e = {}) {
40271
40271
  return rr[n.id] = a, n.id && delete ta[n.id], a;
40272
40272
  }
40273
40273
  return null;
40274
- } catch {
40275
- return null;
40274
+ } catch (t) {
40275
+ return console.error("Error fetching project: ", t), null;
40276
40276
  }
40277
40277
  }
40278
40278
  function S3(n) {
@@ -372,4 +372,4 @@ If an entity is called by another, they must be in the same scope, which means t
372
372
  You shouldn't have to manually update a 'parent' property. The equivalent result is to change its callers, the value writters of its inputs, or the value readers of its outputs.`,issue:null})),{errors:t,modifiedData:e}}addSelfToProject(){var e;return this.parent===this.project&&this.project.addFunctionCall(this),(e=this.process)==null||e.writesValues.forEach(t=>{t.setValueWriter(this.process)}),this.successCalls.forEach(t=>{t.addSuccessCaller(this)}),this.errorCalls.forEach(t=>{t.addErrorCaller(this)}),this.calledBySuccess.forEach(t=>{t.addSuccessCall(this)}),this.calledByError.forEach(t=>{t.addErrorCall(this)}),this.calledByEntry.forEach(t=>{t.addCall(this)}),this}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}removeInput(e){const t=this.inputs.findIndex(i=>i.id===e.id);return t>-1&&this.inputs.splice(t,1),this}addInput(e){return this.inputs.includes(e)?this:(this.inputs.push(e),this)}addOutput(e){return this.outputs.includes(e)?this:(this.outputs.push(e),this)}removeOutput(e){const t=this.outputs.findIndex(i=>i.id===e.id);return t>-1&&this.outputs.splice(t,1),this}addValueReader(e){var t;return(t=this.process)==null||t.addValueReader(e),this}removeValueReader(e){var t;return(t=this.process)==null||t.removeValueReader(e),this}addSuccessCaller(e){return this.calledBySuccess.find(t=>t.id===e.id)||this.calledBySuccess.push(e),this}addErrorCaller(e){return this.calledByError.find(t=>t.id===e.id)||this.calledByError.push(e),this}addEntryCaller(e){return this.calledByEntry.find(t=>t.id===e.id)||this.calledByEntry.push(e),this}addErrorCall(e){return this.errorCalls.push(e),this}addSuccessCall(e){return this.successCalls.push(e),this}removeCall(e){const t=this.successCalls.findIndex(a=>a.id===e.id);t>-1&&this.successCalls.splice(t,1);const i=this.errorCalls.findIndex(a=>a.id===e.id);return i>-1&&this.errorCalls.splice(i,1),this}removeCaller(e){return this.calledBySuccess=this.calledBySuccess.filter(t=>t.id!==e.id),this.calledByError=this.calledByError.filter(t=>t.id!==e.id),this.calledByEntry=this.calledByEntry.filter(t=>t.id!==e.id),this}setParent(e){return this.parent=e,this}initChildren(){if(this.initialized)return this;if(this.initialized=!0,this.initialData.declaration.type===r.FunctionDeclaration){const e=R(this.initialData.declaration,this.project);this.declaration=e}else{const e=D(this.initialData.declaration),t=this.project.get(e);this.declaration=t}return this.successCalls=this.initialData.successCalls.map(e=>{const t=R(e,this.project);return t.addSuccessCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=R(e,this.project);return t.addErrorCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initOutputs(),this.initialData.process&&(this.process=R(this.initialData.process,this.project),this.process.setParent(this),this.process.initChildren()),this.initialData.error&&(this.error=R(this.initialData.error,this.project),this.error.setParent(this),this.error.initChildren()),this}initOutputs(){const e=[];this.outputs=this.initialData.outputs.map(s=>{const o=R(s,this.project);return e.push(o.index),o.setParent(this),o.initChildren(),o});const i=Pd(this).filter(s=>!this.outputs.find(o=>o.declaration.id===s.id));i.sort((s,o)=>s.index-o.index);const a=i.map((s,o)=>{const u=e.includes(s.index)?this.outputs.length-1+o:s.index,p={id:$.UUID.uuid(),type:r.OutputMap,version:1,declaration:s,index:u,parent:this,writesValues:[]},h=R(p,this.project);return h.setParent(this),h.initChildren(),h});return this.outputs.push(...a),this}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.x=e.x||this.x,this.y=e.y||this.y,this}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){var s;const i=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.process){const{affected:o,removed:u}=(s=this.process)==null?void 0:s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...u)}if(this.inputs.forEach(o=>{const{affected:u,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...u),a.push(...p)}),this.outputs.forEach(o=>{const{affected:u,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...u),a.push(...p)}),this.error){const{affected:o,removed:u}=this.error.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...u)}return this.successCalls.forEach(o=>{i.push(o),o.removeCaller(this)}),this.errorCalls.forEach(o=>{i.push(o),o.removeCaller(this)}),e||this.calledBy.forEach(o=>{i.push(o),o.removeCall(this)}),{affected:S(i),removed:S(a)}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];if(e.has(this.id))return{affected:[],self:this};if(e.add(this.id),this.subscribe(),this.process){const{affected:i}=this.process.restore({seenEntities:e});t.push(...i)}return this.inputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.outputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.successCalls.forEach(i=>{t.push(i),i.addSuccessCaller(this)}),this.errorCalls.forEach(i=>{t.push(i),i.addErrorCaller(this)}),this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:S(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.successCalls.flatMap(i=>i.toFlat(e)),...this.errorCalls.flatMap(i=>i.toFlat(e)),...this.inputs.flatMap(i=>i.toFlat(e)),...this.outputs.flatMap(i=>i.toFlat(e)),...this.process?this.process.toFlat(e):[],...this.error?this.error.toFlat(e):[]])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.successCalls.flatMap(i=>i.toFlatIds(e)),...this.errorCalls.flatMap(i=>i.toFlatIds(e)),...this.inputs.flatMap(i=>i.toFlatIds(e)),...this.outputs.flatMap(i=>i.toFlatIds(e))])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,successCalls:this.successCalls.map(i=>i.toJSON()),errorCalls:this.errorCalls.map(i=>i.toJSON()),calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),process:(e=this.process)==null?void 0:e.toJSON(),declaration:this.declaration.toJSON(),inputs:this.inputs.map(i=>i.toJSON()),outputs:this.outputs.map(i=>i.toJSON()),parent:this.parent.toReference(),error:(t=this.error)==null?void 0:t.toJSON()}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,process:this.process?this.process.toReference():null,inputs:this.inputs.map(e=>e.toReference()),outputs:this.outputs.map(e=>e.toReference()),declaration:this.declaration.toReference(),successCalls:this.successCalls.map(e=>e.toReference()),errorCalls:this.errorCalls.map(e=>e.toReference()),calledBySuccess:this.calledBySuccess.map(e=>e.toReference()),calledByError:this.calledByError.map(e=>e.toReference()),calledByEntry:this.calledByEntry.map(e=>e.toReference()),error:this.error?this.error.toReference():null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.successCalls.flatMap(i=>i.toFlatJSON(e)),...this.errorCalls.flatMap(i=>i.toFlatJSON(e)),...this.inputs.flatMap(i=>i.toFlatJSON(e)),...this.outputs.flatMap(i=>i.toFlatJSON(e)),...this.process?this.process.toFlatJSON(e):[],...this.error?this.error.toFlatJSON(e):[]])}toGenerationTarget(){const e=this.parent.type===r.Project?void 0:this.parent.id;return{id:this.id,version:this.version,type:this.type,calledByEntry:this.calledByEntry.map(t=>t.id),calledBySuccess:this.calledBySuccess.map(t=>t.id),calledByError:this.calledByError.map(t=>t.id),declaration:this.declaration.id,parent:e}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.successCalls.flatMap(i=>i.toFlatGenerationTarget(e)),...this.errorCalls.flatMap(i=>i.toFlatGenerationTarget(e)),...this.inputs.flatMap(i=>i.toFlatGenerationTarget(e)),...this.outputs.flatMap(i=>i.toFlatGenerationTarget(e)),...this.process?this.process.toFlatGenerationTarget(e):[],...this.error?this.error.toFlatGenerationTarget(e):[]])}clearErrors(){var e,t;return this.errors=[],this.inputs.forEach(i=>i.clearErrors()),this.outputs.forEach(i=>i.clearErrors()),this.successCalls.forEach(i=>i.clearErrors()),this.errorCalls.forEach(i=>i.clearErrors()),(e=this.process)==null||e.clearErrors(),(t=this.error)==null||t.clearErrors(),this}validate(){const e=G9(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.inputs.flatMap(t=>t.getErrors()),...this.outputs.flatMap(t=>t.getErrors()),...this.error?this.error.getErrors():[],...this.process?this.process.getErrors():[]]}getShallowErrors(){return this.errors}clone(e){return new ve(this.toJSON(),this.project)}};l(ve,"MUTABLE_BASE_PROPERTIES",[]),l(ve,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),l(ve,"BASE_PROPERTIES",[...ve.MUTABLE_BASE_PROPERTIES,...ve.INMUTABLE_BASE_PROPERTIES]),l(ve,"MUTABLE_META_PROPERTIES",["x","y"]),l(ve,"INMUTABLE_META_PROPERTIES",[...ve.INMUTABLE_BASE_PROPERTIES]),l(ve,"META_PROPERTIES",[...ve.MUTABLE_META_PROPERTIES,...ve.INMUTABLE_META_PROPERTIES]),l(ve,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),l(ve,"INMUTABLE_UPSTREAM_PROPERTIES",["declaration","parent"]),l(ve,"UPSTREAM_PROPERTIES",[...ve.MUTABLE_UPSTREAM_PROPERTIES,...ve.INMUTABLE_UPSTREAM_PROPERTIES]),l(ve,"MUTABLE_DOWNSTREAM_PROPERTIES",["successCalls","errorCalls","writesValues","inputs","outputs","error"]),l(ve,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(ve,"DOWNSTREAM_PROPERTIES",[...ve.MUTABLE_DOWNSTREAM_PROPERTIES,...ve.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(ve,"PROPERTIES",[...ve.META_PROPERTIES,...ve.UPSTREAM_PROPERTIES,...ve.DOWNSTREAM_PROPERTIES]);let br=ve;function hg(n){var e,t,i;switch(n.id){case Ve["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.id:{const a=n.project.entities.filter(m=>!!m.implements.find(T=>T.id===Ve["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id));if(a.find(m=>!!m.properties.find(T=>{var b;return T.implements&&T.implements.id===Ve["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default&&((b=T.getDefaultValue())==null?void 0:b.value)===!0}))){const T=a[0].properties.find(I=>I.implements&&I.implements.id===Ve["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default),b=(e=T==null?void 0:T.dataType)==null?void 0:e.defaultValue;if(b)b.value=!0;else if(T!=null&&T.dataType){const I=(t=T==null?void 0:T.dataType)==null?void 0:t.id.split("-id")[0],B=R({id:I+"-default-value-id",version:1,type:r.PrimitiveValue,name:g.EntityTemplate,autogeneration:null,value:!0,valueAsType:null,parent:T==null?void 0:T.dataType.toReference()},n.project);return B.setParent(T==null?void 0:T.dataType),B.initChildren(),B.addSelfToProject(),{newEntities:[B]}}return{newEntities:[]}}const o=n.project.get(Ve["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id),u=lo(o,"Main database");if(u.errors.length>0)return{newEntities:[]};const p=u.implemented.properties.find(m=>m.implements&&m.implements.id===Ve["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default),h=(i=p==null?void 0:p.dataType)==null?void 0:i.defaultValue;if(h)h.value=!0;else if(p!=null&&p.dataType){const m=p==null?void 0:p.dataType.id.split("-id")[0],T=R({id:m+"-default-value-id",version:1,type:r.PrimitiveValue,name:g.EntityTemplate,autogeneration:null,value:!0,valueAsType:null,parent:p==null?void 0:p.dataType.toReference()},n.project);T.setParent(p==null?void 0:p.dataType),T.initChildren(),T.addSelfToProject()}return{newEntities:[u.implemented]}}}return{newEntities:[]}}function fg(n){return n.implements.filter(t=>t.type===r.BuiltInBaseEntity).map(t=>{var i;switch(t.id){case Ve["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.id:{const s=n.project.entities.filter(p=>p.implements.find(h=>h.id===Ve["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id)).find(p=>!!p.properties.find(h=>{var m;return h.implements&&h.implements.id===Ve["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default&&((m=h.getDefaultValue())==null?void 0:m.value)===!0}));if(!s)return{newEntities:[]};const o=n.properties.find(p=>p.implements&&p.implements.id===Ve["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.properties.database),u=(i=o==null?void 0:o.dataType)==null?void 0:i.defaultValue;if(o&&(o!=null&&o.dataType)&&!u){const p=o==null?void 0:o.dataType.id.split("-id")[0],h=R({id:p+"-default-value-id",version:1,type:r.PrimitiveValue,name:g.EntityTemplate,autogeneration:null,value:null,valueAsType:s,parent:o==null?void 0:o.dataType.toReference()},n.project);return h.setParent(o==null?void 0:o.dataType),h.initChildren(),h.addSelfToProject(),{newEntities:[h]}}return{newEntities:[]}}}}),{newEntities:[]}}function lo(n,e,t){const i=t||Xt(e,r.CustomEntity,n.project),a=i.split("-id"),s=a[a.length-1||0]||i,o={id:i,version:1,name:e,type:r.CustomEntity,description:null,static:!1,abstract:!1,properties:[],methods:[],abstractMethods:[],extends:[],implements:[n],x:0,y:0,parent:n.project},u=Ks(o,n.project);if(u.length>0)return{errors:u,implemented:null,entitiesChanges:{new:[],updated:[],deleted:[]}};const p=hg(n),h=R(o,n.project);h.setParent(n.project),h.initChildren();const m=n.properties.map(I=>{const B=s+"-"+Xt(A(I,n.project),r.Property,n.project),G=I.clone(h,B);return G.abstract=!1,G.implements=I,G.setParent(h),h.addProperty(G),G}),T=n.abstractMethods.map(I=>{const B=s+Xt(I.name,r.FunctionDeclaration,n.project),G=I.implementAsFunctionDeclaration(B),W={id:B+"-parent-ref-id",type:r.GenericReference,entityId:i,entityType:r.CustomEntity},xt={...G,implements:I,parent:W},Le=R(xt,n.project);return h.addMethod(Le),Le.setParent(h),Le.initChildren(),Le.implements=I,Le});o.properties=m,o.methods=T;const b=fg(h);return{implemented:h,errors:[],entitiesChanges:{new:[h,...p.newEntities,...b.newEntities],updated:[h],deleted:[]}}}function co(n,e){const t=gr(n);if(t.length===0)return{list:[],last:null};let i=null;return{list:t.flatMap(s=>{if(s===e)return i=s,[s];const o=co(s,e);return o.last&&(i=o.last),[s,...o.list]}),last:i}}function mg(n,e,t=new Set){const i=Gn(n),a=Gn(e),s=i.filter(p=>!a.includes(p)),o=i.filter(p=>a.includes(p)),u=s.reduce((p,h)=>t.has(h.id)?p:(t.add(h.id),S([...p,...mg(h,e,t)])),[]);return S([...o,...u])}function pa(n,e){const t=co(n,e);return t.last===e&&t.list.length>0&&t.list[0]!==e}function F9(n,e){return!!co(n,e).last}function U9(n){if($e.includes(n.type))return n;if([...En,r.VariableDeclaration].includes(n.type)){const e=n.parent;return $e.includes(e.type)?e:null}return null}function bd(n,e){if(!n||!e)throw new Error("Both entities must be defined to find a common ancestor");if(n===e)return n;const t=n.parent;if(t){if(t===e)return e;if(t.type===r.Project)return null}else return null;const i=e.parent;if(i){if(i===n)return n;if(i.type===r.Project)return null}else return null;return bd(t,i)}function He(n){if(bo.includes(n.type)){if(n.type===r.FunctionDeclaration){const e=n.parent;if(e.type===r.CustomEntity)return e}return n}else{const e=n.parent;return e?He(e):null}}function x9(n){return n.type===r.VariableDeclaration?[n]:Ne.includes(n.type)?[...n.inputs,...n.outputs||[]]:n.type===r.ReturnStatement?n.outputs:Ar.includes(n.type)||n.type===r.FunctionDeclaration?n.inputs:[]}function j9(n){const e=Gn(n),t=[],i=[];$d.includes(n.type)&&t.push(...vd(n));const a=e.filter(s=>{const o=t.includes(s);return o?!1:En.includes(s.type)&&!o?(i.push(s),!1):!0});return t.sort((s,o)=>pa(o,s)?-1:0),i.sort((s,o)=>pa(o,s)?-1:0),[...t,...i,...a]}function Tg(n){return[...n].sort((e,t)=>pa(t,e)?-1:0)}function k9(n){const e=Tg(n),t=[];return e.forEach(i=>{const a=t[t.length-1];if(a){const s=a[a.length-1];pa(i,s)?t.push([i]):a.push(i)}else t.push([i])}),t}function _t(n){const e=n.map(t=>He(t));return S(e)}function vd(n){return Ne.includes(n.type)?[..._t(n.successCalls),..._t(n.errorCalls)]:$e.includes(n.type)?_t(n.calls):[]}function q9(n,e){return vd(n).includes(e)}function gd(n){return n.writesValues||[]}function J9(n,e){return gd(n).includes(e)}function Eg(n){var e;return Fe.includes((e=n==null?void 0:n.readsValue)==null?void 0:e.type)?n.readsValue:null}function W9(n){return n.writesValues}function Rg(n=[]){return n.map(Eg).filter(e=>!!e)}function uo(n=[]){return n.map(e=>e.writesValues).flat().filter(e=>Fe.includes(e.type))}function bg(n=[]){return n.map(e=>e.readsValue).filter(e=>!!e&&Fe.includes(e.type))}function vg(n){return Fe.includes(n.type)?n:null}function gg(n){return n.writesValues.map(vg).filter(e=>!!e)}function Ig(n=[]){return n.reduce((e,t)=>t.type===r.OutputMap?[...e,...gg(t)]:e,[])}function Me(n){return Ne.includes(n.type)?[...vr(_t(n.successCalls)),...vr(_t(n.errorCalls))]:$e.includes(n.type)?vr(_t(n.calls)):[]}function Pg(n,e=new Set){return n.writesValues.filter(i=>Fe.includes(i.type)&&!e.has(i.id)).reduce((i,a)=>e.has(a.id)?i:[...i,...Z(a,e)],[])}function Dg(n,e=new Set){var i;return(((i=n.readsValue)==null?void 0:i.writesValues)||[]).filter(a=>Fe.includes(a.type)&&!e.has(a.id)).reduce((a,s)=>e.has(s.id)?a:[...a,...Z(s,e)],[])}function Z(n,e=new Set){if(e.has(n.id))return[];if(n.type===r.ReturnStatement)return bg(n.outputs).reduce((i,a)=>[...i,...Z(a,e)],[]);if(n.type===r.FunctionCall||n.type===r.Operation||n.type===r.Condition)return[...Me(n).reduce((s,o)=>{const u=He(o);return[...s,...Z(u||o,e)]},[]),...Rg(n.inputs),...Ig(n.outputs)].reduce((s,o)=>[...s,...Z(o,e)],[]);if(Ar.includes(n.type)){const t=uo(n.inputs),a=Me(n).reduce((s,o)=>{const u=He(o);return[...s,...Z(u||o,e)]},[]);return t.push(...a),t.reduce((s,o)=>[...s,...Z(o,e)],[])}if(n.type===r.FunctionDeclaration){const t=[...uo(n.inputs)],a=Me(n).reduce((s,o)=>{const u=He(o);return[...s,...Z(u||o,e)]},[]);return t.push(...a),t.reduce((s,o)=>[...s,...Z(o)],[])}if(Fe.includes(n.type)){e.add(n.id);const i=Me(n).reduce((a,s)=>{const o=He(s);return[...a,...Z(o||s,e)]},[]);return[n,...i,...Dg(n,e),...Pg(n,e)]}return[]}function vt(n,e=new Set){return e.has(n.id)?[]:(e.add(n.id),[...Gn(n).reduce((a,s)=>[...a,s,...vt(s,e)],[])])}function vr(n){return n.reduce((e,t)=>t.type===r.ReturnStatement||t.type===r.ContinueStatement||t.type===r.BreakStatement?e:[...e,t,...Me(t)],[])}function Ag(n){const e=n.entities||[],t=[...e,...n.functions||[],...n.events||[],...n.projects||[]],i=e.reduce((p,h)=>[...p,...h.properties],[]),a=e.reduce((p,h)=>[...p,...h.methods],[]),s=a.reduce((p,h)=>[...p,...uo(h.inputs),...vr(_t(h.calls)),...h.returnStatements],[]),o=n.functions.reduce((p,h)=>[...p,...vr(_t(h.calls)),...h.returnStatements],[]),u=n.events.reduce((p,h)=>[...p,...vr(_t(h.calls)),...h.returnStatements],[]);return[...t,...i,...a,...s,...o,...u]}function Sg(n,e){return e.filter(i=>{if(!i)return!1;switch(i.type){case r.FunctionCall:return i.inputs.find(a=>a.id===n.id)!==void 0||i.outputs.find(a=>a.id===n.id)!==void 0;case r.Condition:return i.successCalls.find(a=>a.id===n.id)!==void 0||i.errorCalls.find(a=>a.id===n.id)!==void 0||i.inputs.find(a=>a.id===n.id)!==void 0;case r.Operation:return i.outputs.find(a=>a.id===n.id)!==void 0;case r.VariableDeclaration:return Ne.includes(n.type)?Og(n).find(s=>{var o;return((o=s.readsValue)==null?void 0:o.id)===i.id})!==void 0:!1;case r.CustomEntity:return i.properties.find(a=>a.id===n.id)!==void 0||i.methods.find(a=>a.id===n.id)!==void 0;case r.FunctionDeclaration:return i.inputs.find(a=>a.id===n.id)!==void 0||(i.returnStatements.map(a=>a.outputs).flat()||[]).find(a=>a.id===n.id)!==void 0;default:return!1}})}function H9(n){const e=Ag(n.project);return Sg(n,e)}function gr(n){const e=[];if(En.includes(n.type)){n.calledBy.forEach(a=>{const s=He(a);s&&e.push(s)});const i=[...n.inputs||[],...n.outputs||[]].map(a=>Dd(a)).filter(a=>a!==null);e.push(...S(i))}if(Fe.includes(n.type)){const t=Dd(n);t&&e.push(t)}return S(e)}function Id(n){return n.type===r.FunctionCall||n.type===r.InternalCall?n.declaration.inputs:[r.Operation,r.Condition,r.Loop].includes(n.type)?n.declaration.fixedArguments:n.type===r.FunctionDeclaration||Ar.includes(n.type)?n.inputs:n.type===r.Search?n.inputsDeclarations:[]}function Y9(n,e){return e.type===r.Condition?e.inputs.find(t=>t.declaration.id===n.id):e.type===r.FunctionCall||e.type===r.Operation?e.inputs.find(t=>t.declaration.id===n.id):null}function Og(n){return Ne.includes(n.type)?n.inputs:[]}function Pd(n){var e;return n.type===r.FunctionCall?((e=n.declaration.returnStatements[0])==null?void 0:e.outputs)||[]:[r.Operation,r.Condition,r.Loop].includes(n.type)?n.declaration.fixedReturns:n.type===r.Search?n.outputsDeclarations:Oe.includes(n.type)?n.outputs:[]}function z9(n,e){return e.type===r.Condition?null:e.type===r.FunctionCall||e.type===r.Operation?e.outputs.find(t=>t.declaration.id===n.id):null}function Z9(n){return n.type===r.Condition?[]:Ne.includes(n.type)?n.outputs:[]}function Dd(n){const e=n.readsValue;return e?He(e):null}function Cg(n){const e=n.internalCalls||[];return S(_t(S(e.flatMap(t=>[...t.successCalls,...t.errorCalls]))))}function ui(n){const e=gd(n),t=[];return e.forEach(i=>{if(Fe.includes(i.type))t.push(i);else if(i.type===r.InputMap){const a=i.parent;if(a.type===r.InputMap){const s=a.parent;t.push(s)}else t.push(a)}else[r.ActionDescriptor].includes(i.parent.type)||t.push(i.parent)}),t}function S(n){const e=new Set;return n.filter(t=>e.has(t.id)?!1:(e.add(t.id),!0))}function Gn(n,e=!1){const t=[];if(n.type===r.Project&&t.push(...(n==null?void 0:n.entities)||[],...(n==null?void 0:n.functions)||[],...(n==null?void 0:n.variableDeclarations)||[],...(n==null?void 0:n.variableInstances)||[],...(n==null?void 0:n.searches)||[],...(n==null?void 0:n.loops)||[],...(n==null?void 0:n.operations)||[],...(n==null?void 0:n.conditions)||[],...(n==null?void 0:n.functionCalls)||[],...(n==null?void 0:n.events)||[],...(n==null?void 0:n.projects)||[]),st.includes(n.type)&&t.push(...(n==null?void 0:n.detachedChildren)||[]),n.type===r.CustomEntity){const i=[...n.suggestedMethods,...n.methods].flatMap(a=>a.collapsed&&e?[]:Gn(a));t.push(...i)}if(n.type===r.Condition){const i=n.successCalls.map(s=>He(s)),a=n.errorCalls.map(s=>He(s));t.push(...i,...a)}if(Ar.includes(n.type)){if(n.collapsed&&e)return[];const i=n.inputs.map(s=>ui(s)).flat(),a=n.calls.map(s=>He(s));t.push(...S(i),...a)}if(Ne.includes(n.type)&&n.type!==r.Condition){const i=n==null?void 0:n.outputs.map(o=>ui(o)).flat(),a=n.successCalls.map(o=>He(o)),s=n.errorCalls.map(o=>He(o));t.push(...S(i),...a,...s)}if(Fe.includes(n.type)){const i=ui(n),a=Cg(n);t.push(...i,...a)}if(n.type===r.Loop){const i=n.outputs.map(o=>ui(o)).flat();if(n.body){const o=Gn(n.body,e);t.push(...o)}const a=n.errorCalls.map(o=>He(o)),s=n.successCalls.map(o=>He(o));t.push(...S(i),...s,...a)}if(n.type===r.FunctionDeclaration){if(n.collapsed&&e)return[];const i=n.inputs.map(s=>ui(s)).flat(),a=n.calls.map(s=>He(s));t.push(...S(i),...a)}return S(t)}function Bg(n,e=!1){const t=Gn(n,e),i=[...t,...t.reduce((a,s)=>[...a,...Bg(s,e)],[])];return S(i)}function wg(n){const e=gr(n),t=[...e,...e.reduce((i,a)=>[...i,...wg(a)],[])];return S(t)}function po(n){return n.implements.reduce((e,t)=>t.type===r.CustomEntity?[...e,r.CustomEntity,...po(t),...yo(t)]:[...e,t.name],[])}function yo(n){return n.extends.reduce((e,t)=>t.type===r.CustomEntity?[...e,r.CustomEntity,...yo(t),...po(t)]:[...e,t.name],[])}function Ad(n){return n.extends.reduce((e,t)=>t.type===r.CustomEntity?[...e,t,...Ad(t),...Sd(t)]:[...e,t],[])}function Sd(n){return n.implements.reduce((e,t)=>t.type===r.CustomEntity?[...e,t,...Sd(t),...Ad(t)]:[...e,t],[])}function _g(n){return[...yo(n),...po(n)].filter((t,i,a)=>a.indexOf(t)===i)}function Mg(n){return n.implements.length===0&&n.extends.length===0?null:n.implements.find(i=>i.type===r.BuiltInBaseEntity&&i.name===_.PERSISTED_ENTITY)?n:[...n.implements,...n.extends].reduce((i,a)=>{if(a.type===r.CustomEntity){const s=Mg(a);if(s)return s}return i},null)}function X9(n){const e=n.extends.find(t=>t.type===r.BuiltInBaseEntity);return e&&e.type===r.BuiltInBaseEntity?e:null}function Q9(n){const e=n.implements.find(t=>t.type===r.BuiltInBaseEntity);return e&&e.type===r.BuiltInBaseEntity?e:null}function Ng(n){const e=n.extends.find(t=>t.type===r.CustomEntity);return e&&e.type===r.CustomEntity?e:null}function Fn(n){const e=[...n.implements,...n.extends].reduce((t,i)=>i.type===r.BuiltInBaseEntity?[...t,i]:i.type===r.CustomEntity?[...t,...Fn(i)]:t,[]);return S(e)}function Od(n){return n.type===r.PrimitiveEntity?!0:n.type===r.BuiltInBaseEntity?n.interactive:!Fn(n).find(i=>!i.interactive)}function K9(n){return n.parent===n.project&&n.project.variableDeclarations.includes(n)}function Cd(n){return n.parent!==n.project?!1:r.VariableDeclaration===n.type?n.project.variableDeclarations.includes(n):r.VariableInstance===n.type?n.project.variableInstances.includes(n):r.FunctionCall===n.type?n.project.functionCalls.includes(n):r.Condition===n.type?n.project.conditions.includes(n):r.Operation===n.type?n.project.operations.includes(n):r.Loop===n.type?n.project.loops.includes(n):r.Search===n.type?n.project.searches.includes(n):!1}function $g(n){if([...$e,r.CustomEntity,r.InstalledProject,r.Project].includes(n.type)||Cd(n))return!1;const e=gr(n);return e.length===0?!0:e.some(t=>$g(t))}function Bd(n){return[...$e,r.CustomEntity,r.InstalledProject,r.Project].includes(n.type)||Cd(n)?!1:gr(n).length===0}function Vg(n,e=0){if(Bd(n)){const t=gr(n);return t.length===0?n:t.map(a=>Vg(a,e+1)).reduce((a,s)=>a?s&&s.x<a.x?s:a:s,null)}return null}function Lg(n){const e=[];if(Bd(n))e.push(n);else return[];return gr(n).forEach(i=>{e.push(...Lg(i))}),e}function Gg(n){return n.type===r.FunctionDeclaration&&n.parent!==n.project&&!![r.CustomEntity,r.Loop,r.InstalledProject].includes(n.parent.type)}function Fg(n,e){const t=new Map;return n.forEach(i=>{t.set(i.id,i)}),e.forEach(i=>{t.set(i.id,i)}),Array.from(t.values())}function ho(n){switch(n){case r.CustomEntity:return Pr;case r.FunctionDeclaration:return cr;case r.VariableDeclaration:return yr;case r.VariableInstance:return hr;case r.FunctionCall:return br;case r.Operation:return dr;case r.Condition:return pr;case r.ReturnStatement:return Er;case r.Loop:return ur;case r.Search:return fr;case r.InputMap:return hn;case r.OutputMap:return fn;case r.ArgumentDeclaration:return Tr;case r.ReturnDeclaration:return Ot;case r.Property:return lr;case r.InstalledProject:return mr;case r.Project:return $;case r.BuiltInBaseEntity:return Ut;default:return null}}function ht(n,e){if(st.includes(n.type))return n;if(Sr.includes(n.type))return null;const t=n.parent;if(!t)return null;if(t.type===r.GenericReference){const i=D(t);if(!i)return null;const a=e.get(i);return a?ht(a,e):null}else return t===e?e:ht(t,e)}function wd(n,e){if(Sr.includes(n.type)||e.getAllBuiltInIds().includes(n.id))return null;const i=Mt(n.parent,e);return i?i===e?st.includes(n.type)?n:null:i.type===r.CustomEntity?n:wd(i,e):null}function fo(n,e,t){if(n===e||e===t||n===t)return!1;const i=ht(e.parent,t);return i===n?!0:fo(i,e,t)}var mo=(n=>(n.SameBothLocal="same-both-local",n.AInB="a-in-b",n.BInA="b-in-a",n.ParallelInCommonParent="parallel-in-common-parent",n.ParallelInProject="parallel-in-project",n.AIsGlobalBIsNot="a-is-global-b-is-not",n.BIsGlobalAIsNot="b-is-global-a-is-not",n.SameBothGlobal="same-both-global",n))(mo||{});function ya(n,e,t){const i=ht(n,t),a=ht(e,t);if(!i)throw new Error("Could not find scope owner for the entity: "+n.id);if(!a)throw new Error("Could not find scope owner for the entity: "+e.id);if(i===a&&i.type!==r.Project)return{compatible:!0,type:"same-both-local",commonAncestorScope:i};if(i===a&&i.type===r.Project)return{compatible:!0,type:"same-both-global",commonAncestorScope:i};if(i.type===r.Project&&a.type!==r.Project)return{compatible:!1,type:"a-is-global-b-is-not",commonAncestorScope:i};if(i.type!==r.Project&&a.type===r.Project)return{compatible:!1,type:"b-is-global-a-is-not",commonAncestorScope:a};if(fo(i,a,t))return{compatible:!0,type:"b-in-a",commonAncestorScope:i};if(fo(a,i,t))return{compatible:!0,type:"a-in-b",commonAncestorScope:a};const u=bd(i,a);return u===t?{compatible:!1,type:"parallel-in-project",commonAncestorScope:u}:u?{compatible:!1,type:"parallel-in-common-parent",commonAncestorScope:ht(u,t)}:{compatible:!1,type:"parallel-in-project",commonAncestorScope:t}}function Ug(n,e,t){const i=ya(n,e,t);if(!i.compatible||i.type!=="same-both-local")return null;if(n===e)return n;let a=ht(n.parent,t);if(a){if(a===e)return e;if(a.type===r.Project)return n}else return n;for(;a;){if(a){if(a===e)return e;if(a.type===r.Project)return n}else return n;a=ht(a.parent,t)}let s=ht(e.parent,t);if(s){if(s===n)return n;if(s.type===r.Project)return e}else return e;for(;s;){if(s){if(s===n)return n;if(s.type===r.Project)return e}else return e;s=ht(s.parent,t)}return null}function xg(n){return n.length===0?null:n.length===1?n[0]:n.reduce((t,i)=>{const a=Ug(t,i,i.project);return!a||a===i?t:i},n[0])}function Mt(n,e){let t;return typeof n=="string"?t=n:n.type===r.GenericReference?t=D(n):t=n.id,t===e.id?e:e.get(t)}function Ir(n){if(Sr.includes(n.type))return n;if(n.type===r.Project)return null;if(n.project.getAllBuiltInIds().includes(n.id))return n;const t=n.parent;return!t||t.type===r.Project?null:Ir(t)}function ha(n,e){var t;if(n.readsValue){const i=Mt(n.readsValue,e.project);e.setValueWriter(i),i.addValueReader(e)}else n.readsValue===null&&((t=e.readsValue)==null||t.removeValueReader(e),e.readsValue=null);return e}function _d(n){const e=[];function t(o,u){return e.some(p=>p.blockedByCaller===o&&p.blockedByCalling===u)}function i(o,u){t(o,u)||e.push({blockedByCaller:o,blockedByCalling:u})}const a=wd(n,n.project);return n.calledBy.forEach(o=>{if([...o.calls||[],...o.successCalls||[],...o.errorCalls||[]].forEach(h=>{Oe.includes(h.type)&&i(o,h)}),o===a)return;let p;if(Ne.includes(o.type))p=o;else if(o.type===r.FunctionDeclaration){const h=He(o);if(h.type===r.CustomEntity)return;h.type===r.Loop&&(p=h)}if(p){const h=_d(p);h.reachable||(Oe.includes(n.type)?h.blocks.forEach(m=>{i(o,m.blockedByCalling)}):Me(n).find(b=>b===o)||h.blocks.forEach(b=>{i(o,b.blockedByCalling)}))}}),{reachable:e.length===0,entryPoint:a,blocks:e}}function e3(n){return bo.includes(n.type)?n.type===r.FunctionDeclaration?!Gg(n):!0:!1}function t3(n){if(r.ActionDescriptor===n.type){if(n.project.operationDeclarations.find(s=>s.id===n.id))return r.Operation;if(n.project.globalEventActionDescriptors.find(s=>s.id===n.id))return r.GlobalEvent;if(n.project.loopDeclarations.find(s=>s.id===n.id))return r.Loop;if(n.project.conditionDeclarations.find(s=>s.id===n.id))return r.Condition}return n.type}function n3(n,e){const t=[];if(n.parent)if(n.id===n.parent)t.push(new E({id:`${n.id}--${n.parent}--${y.SelfReference}`,code:y.SelfReference,severity:f.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a reference to itself at 'parent'. This is not allowed. Change the reference string or the 'entityId' property of the reference object.`,issue:null}));else{const i=e.get(n.parent);i?[r.Project,r.DataType].includes(i.type)||t.push(new E({id:`${n.id}--${n.parent}--${y.InvalidParentReference}`,code:y.InvalidParentReference,severity:f.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a parent reference that isn't pointing to an entity of type 'project' or 'data-type'.`,issue:null})):t.push(new E({id:`${n.id}--${n.parent}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:f.Error,message:`Entity of type "${n.type}" with id "${n.id}", is referencing an entity with id "${n.parent}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}))}return n.implements&&Array.isArray(n.implements)?n.implements.forEach(i=>{if(n.id===i){t.push(new E({id:`${n.id}--${i}--${y.SelfReference}`,code:y.SelfReference,severity:f.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a reference to itself at one of the 'implements' references. This is not allowed. Change the reference string or the 'entityId' property of the reference object.`,issue:null}));return}const a=e.get(i);a?[r.CustomEntity,r.BuiltInBaseEntity].includes(a.type)?a.abstract||t.push(new E({id:`${n.id}--${i}--${y.InvalidImplementsReference}`,code:y.InvalidImplementsReference,severity:f.Error,message:`Entity of type "${n.type}" with id "${n.id}", has an 'implements' reference that isn't pointing to an abstract entity.`,issue:null})):t.push(new E({id:`${n.id}--${i}--${y.InvalidImplementsReference}`,code:y.InvalidImplementsReference,severity:f.Error,message:`Entity of type "${n.type}" with id "${n.id}", has an 'implements' reference that isn't pointing to an entity of type 'custom-entity' or 'built-in-base-entity'.`,issue:null})):t.push(new E({id:`${n.id}--${i}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:f.Error,message:`Entity of type "${n.type}" with id "${n.id}", is referencing an entity with id "${i}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}))}):t.push(new E({id:`${n.id}--${v.InvalidObjectStructure}`,code:v.InvalidObjectStructure,severity:f.Error,message:`Entity of type "${n.type}" with id "${n.id}", has an 'implements' property that isn't an array.`,issue:null})),n.extends&&Array.isArray(n.extends)&&n.extends.forEach(i=>{const a=e.get(i);a?[r.CustomEntity,r.BuiltInBaseEntity].includes(a.type)?a.abstract&&t.push(new E({id:`${n.id}--${i}--${y.InvalidExtendsReference}`,code:y.InvalidExtendsReference,severity:f.Error,message:`Entity of type "${n.type}" with id "${n.id}", has an 'extends' reference that isn't pointing to a non-abstract entity. Did you want to use the property 'implements', which holds a list of references to absract entities, instead?`,issue:null})):t.push(new E({id:`${n.id}--${i}--${y.InvalidExtendsReference}`,code:y.InvalidExtendsReference,severity:f.Error,message:`Entity of type "${n.type}" with id "${n.id}", has an 'extends' reference that isn't pointing to an entity of type 'custom-entity' or 'built-in-base-entity'.`,issue:null})):t.push(new E({id:`${n.id}--${i}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:f.Error,message:`Entity of type "${n.type}" with id "${n.id}", is referencing an entity with id "${i}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}))}),t}const pe=class pe{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"x");l(this,"y");l(this,"static");l(this,"abstract");l(this,"type",r.CustomEntity);l(this,"properties",[]);l(this,"methods",[]);l(this,"abstractMethods",[]);l(this,"extends",[]);l(this,"implements",[]);l(this,"project");l(this,"errors",[]);l(this,"parent");l(this,"initialized",!1);l(this,"suggestedProperties",[]);l(this,"suggestedMethods",[]);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.name=e.name,this.x=e.x,this.y=e.y,this.static=e.static,this.abstract=e.abstract}static fromGenerationTarget(e,t){let i=t;if(e.parent){const p=D(e.parent);i=t.get(p)}const a=[];e.implements&&e.implements.forEach(p=>{a.push(t.get(p)||t.getBuiltIn(p))});const s=[];e.extends&&e.extends.forEach(p=>{s.push(t.get(p)||t.getBuiltIn(p))});const o={id:e.id,version:1,name:e.name,type:r.CustomEntity,description:e.description,static:e.static,abstract:e.abstract,properties:[],methods:[],abstractMethods:[],extends:s,implements:a,x:0,y:0,parent:i},u=R(o,t);return u.setParent(i),u.initChildren(),u}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=n3(i,t),o=Ks(i,t);a.push(...s,...o,...Pe(i));const u=i.parent?t.get(i.parent):null;if(u&&u.type===r.DataType){const p=u;p.entity&&a.push(new E({id:`${e.id}--${y.NewEntityWouldOverriteExisting}`,code:y.NewEntityWouldOverriteExisting,severity:f.Error,message:`The entity of type '${e.type}' with id '${e.id}' can't be added to the 'parent' entity with id '${p.id}' because it already has an 'entity' child. Data type entities can only have one 'entity' as children.
373
373
  You can inspect the existing 'entity' field with the 'describe_entity' action. Like so:
374
374
  ${Qt({describe_entity:p.entity.id})}
375
- Alternatively you can update the parent data-type entity with 'update' action to remove the existing value of the field.`,issue:null}))}return{errors:a,modifiedData:i}}get extendedProperties(){return S(this.extends.reduce((e,t)=>[...[...t.properties,...t.extendedProperties].filter(a=>!a.abstract),...e],[]))}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:f.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated. The 'parent' on an '${this.type}', must be the root project as it is a globally declared entity.`,issue:null})),{errors:t,modifiedData:e}}addSelfToProject(){if(this.parent.type===r.DataType){const e=this.parent;e.entity=this}else this.project.addCustomEntity(this);return this}setParent(e){return this.parent=e,this}removeProperty(e){return this.properties=this.properties.filter(t=>t.id!==e.id),this}addMethod(e){return this.methods.includes(e)||(this.methods.push(e),this.suggestedMethods=this.suggestedMethods.filter(t=>t.name!==e.name)),this}removeMethod(e){return this.methods=this.methods.filter(t=>t.id!==e.id),this}addProperty(e){return this.properties.includes(e)||(this.properties.push(e),this.suggestedProperties=this.suggestedProperties.filter(t=>t.name!==e.name)),this}addSuggestedProperty(e){return this.suggestedProperties.includes(e)||this.suggestedProperties.push(e),this}addSuggestedMethod(e){return this.suggestedMethods.includes(e)||this.suggestedMethods.push(e),this}removeSuggestedProperty(e){return this.suggestedProperties=this.suggestedProperties.filter(t=>t.id!==e.id),this}removeSuggestedMethod(e){return this.suggestedMethods=this.suggestedMethods.filter(t=>t.id!==e.id),this}addAbstractMethod(e){return this.abstractMethods.includes(e)||this.abstractMethods.push(e),this}removeAbstractMethod(e){return this.abstractMethods=this.abstractMethods.filter(t=>t.id!==e.id),this}initChildren(){return this.initialized?this:(this.initialized=!0,this.properties=this.initialData.properties.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.methods=this.initialData.methods.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.abstractMethods=this.initialData.abstractMethods.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.extends=this.initialData.extends.map(e=>R(e,this.project)),this.implements=this.initialData.implements.map(e=>R(e,this.project)),this.addSuggestions(),this)}addSuggestions(){return this.implements.forEach(e=>{Gx(this,e).forEach(a=>{const s=a.toJSON();s.id=`_suggestion--parent--${this.id}--${a.id}`;const o=R(s,this.project);o.suggestion=!0,o.setParent(this),o.initChildren(),this.addSuggestedProperty(o)}),Fx(this,e).forEach(a=>{const s=`_suggestion--parent--${this.id}--${a.id}`,o=a.implementAsFunctionDeclaration(s),u=R(o,this.project);if(u.suggestion=!0,u.setParent(this),u.initChildren(),u.inputs.forEach(p=>{p.suggestion=!0}),u.returnStatements.length){const p=u.returnStatements[0];p.suggestion=!0,p.outputs.forEach(h=>{h.suggestion=!0})}this.addSuggestedMethod(u)})}),this}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.name=e.name||this.name,this.x=e.x||this.x,this.y=e.y||this.y,this.static=e.static||this.static,this.abstract=e.abstract||this.abstract,this}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],a=[];return t.has(this.id)?{affected:[],removed:[]}:(t.add(this.id),a.push(this),this.unsubscribe(),this.properties.forEach(s=>{const{affected:o,removed:u}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...u)}),this.methods.forEach(s=>{const{affected:o,removed:u}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...u)}),this.abstractMethods.forEach(s=>{const{affected:o,removed:u}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...u)}),this.suggestedProperties.forEach(s=>{const{affected:o,removed:u}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...u)}),this.suggestedMethods.forEach(s=>{const{affected:o,removed:u}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...u)}),{affected:S(i),removed:S(a)})}restore({seenEntities:e}={seenEntities:new Set}){const t=[];return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),this.properties.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.methods.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.abstractMethods.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.suggestedProperties.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.suggestedMethods.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),{affected:S(t),self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.extends.flatMap(i=>i.toFlat(e)),...this.implements.flatMap(i=>i.toFlat(e)),...this.properties.flatMap(i=>i.toFlat(e)),...this.methods.flatMap(i=>i.toFlat(e)),...this.abstractMethods.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.extends.flatMap(i=>i.toFlatIds(e)),...this.implements.flatMap(i=>i.toFlatIds(e)),...this.properties.flatMap(i=>i.toFlatIds(e)),...this.methods.flatMap(i=>i.toFlatIds(e)),...this.abstractMethods.flatMap(i=>i.toFlatIds(e))])}toJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,x:this.x,y:this.y,static:this.static,abstract:this.abstract,properties:this.properties.map(e=>e.toJSON()),methods:this.methods.map(e=>e.toJSON()),abstractMethods:this.abstractMethods.map(e=>e.toJSON()),implements:this.implements.map(e=>e.toJSON()),extends:this.extends.map(e=>e.toJSON()),parent:this.parent.toReference()}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,name:this.name,description:this.description,type:this.type,x:this.x,y:this.y,static:this.static,abstract:this.abstract,properties:this.properties.map(e=>e.toReference()),methods:this.methods.map(e=>e.toReference()),abstractMethods:this.abstractMethods.map(e=>e.toReference()),implements:this.implements.map(e=>e.toReference()),extends:this.extends.map(e=>e.toReference()),parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(i=>i.toFlatJSON(e)),...this.methods.flatMap(i=>i.toFlatJSON(e)),...this.abstractMethods.flatMap(i=>i.toFlatJSON(e)),...this.implements.flatMap(i=>i.toFlatJSON(e)),...this.extends.flatMap(i=>i.toFlatJSON(e))])}toGenerationTarget(){const e=this.parent.type===r.Project?void 0:this.parent.id;return{id:this.id,name:this.name,description:this.description,type:this.type,static:this.static,abstract:this.abstract,extends:this.extends.map(t=>t.id),implements:this.implements.map(t=>t.id),parent:e}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(i=>i.toFlatGenerationTarget(e)),...this.methods.flatMap(i=>i.toFlatGenerationTarget(e)),...this.abstractMethods.flatMap(i=>i.toFlatGenerationTarget(e)),...this.implements.filter(i=>i.type===r.CustomEntity).flatMap(i=>i.toFlatGenerationTarget(e)),...this.implements.filter(i=>i.type===r.CustomEntity).flatMap(i=>i.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.properties.forEach(e=>e.clearErrors()),this.methods.forEach(e=>e.clearErrors()),this.abstractMethods.forEach(e=>e.clearErrors()),this}validate(){return this.errors=Lx(this),{success:!0,error:null,data:null}}getErrors(){return[...this.errors,...this.properties.flatMap(t=>t.getErrors()),...this.methods.flatMap(t=>t.getErrors()),...this.abstractMethods.flatMap(t=>t.getErrors())]}getShallowErrors(){return this.errors}clone(){return new pe(this.toJSON(),this.project)}getFunctionDeclaration(e){return this.methods.find(t=>t.id===e)}implement(e,t){return lo(this,e,t)}};l(pe,"MUTABLE_BASE_PROPERTIES",["name","description","static","abstract"]),l(pe,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),l(pe,"BASE_PROPERTIES",[...pe.MUTABLE_BASE_PROPERTIES,...pe.INMUTABLE_BASE_PROPERTIES]),l(pe,"MUTABLE_META_PROPERTIES",[...pe.MUTABLE_BASE_PROPERTIES,"x","y"]),l(pe,"INMUTABLE_META_PROPERTIES",[...pe.INMUTABLE_BASE_PROPERTIES]),l(pe,"META_PROPERTIES",[...pe.MUTABLE_META_PROPERTIES,...pe.INMUTABLE_META_PROPERTIES]),l(pe,"MUTABLE_UPSTREAM_PROPERTIES",["extends","implements"]),l(pe,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),l(pe,"UPSTREAM_PROPERTIES",[...pe.MUTABLE_UPSTREAM_PROPERTIES,...pe.INMUTABLE_UPSTREAM_PROPERTIES]),l(pe,"MUTABLE_DOWNSTREAM_PROPERTIES",["properties","methods","abstractMethods"]),l(pe,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(pe,"DOWNSTREAM_PROPERTIES",[...pe.MUTABLE_DOWNSTREAM_PROPERTIES,...pe.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(pe,"PROPERTIES",[...pe.META_PROPERTIES,...pe.UPSTREAM_PROPERTIES,...pe.DOWNSTREAM_PROPERTIES]);let Pr=pe;function r3(n){const e=a4(),t=n.toJSON();e.safeParse(t).success;const a=[];return X(n.errors,a)}class Nt{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"type",r.PrimitiveEntity);l(this,"static");l(this,"abstract");l(this,"properties",[]);l(this,"methods",[]);l(this,"abstractMethods",[]);l(this,"extends",[]);l(this,"errors",[]);l(this,"project");this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.name=e.name,this.static=e.static,this.abstract=e.abstract,this.properties=this.initialData.properties.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(i=>{const a=R(i,this.project);return a.parent=this,a}),this.abstractMethods=this.initialData.abstractMethods.map(i=>{const a=R(i,this.project);return a.parent=this,a})}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}async load(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){return{affected:[],removed:[]}}restore({seenEntities:e}={seenEntities:new Set}){return{affected:[],self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.properties.flatMap(i=>i.toFlat(e)),...this.methods.flatMap(i=>i.toFlat(e)),...this.abstractMethods.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.properties.flatMap(i=>i.toFlatIds(e)),...this.methods.flatMap(i=>i.toFlatIds(e)),...this.abstractMethods.flatMap(i=>i.toFlatIds(e))])}toJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,properties:this.properties.map(e=>e.toJSON()),methods:this.methods.map(e=>e.toJSON()),abstractMethods:this.abstractMethods.map(e=>e.toJSON()),extends:this.extends.map(e=>e.toJSON())}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,properties:this.properties.map(e=>e.toReference()),methods:this.methods.map(e=>e.toReference()),abstractMethods:this.abstractMethods.map(e=>e.toReference()),extends:this.extends.map(e=>e.toReference())}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(i=>i.toFlatJSON(e)),...this.methods.flatMap(i=>i.toFlatJSON(e)),...this.abstractMethods.flatMap(i=>i.toFlatJSON(e))])}toGenerationTarget(){return{id:this.id,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,extends:this.extends.map(e=>e.id)}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(i=>i.toFlatGenerationTarget(e)),...this.methods.flatMap(i=>i.toFlatGenerationTarget(e)),...this.abstractMethods.flatMap(i=>i.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.properties.forEach(e=>e.clearErrors()),this.methods.forEach(e=>e.clearErrors()),this.abstractMethods.forEach(e=>e.clearErrors()),this}validate(){const e=r3(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.properties.flatMap(t=>t.getErrors()),...this.methods.flatMap(t=>t.getErrors()),...this.abstractMethods.flatMap(t=>t.getErrors())]}getShallowErrors(){return this.errors}clone(){return new Nt(this.toJSON(),this.project)}}function i3(n){const e=h4(),t=n.toJSON();e.safeParse(t).success;const a=[];return X(n.errors,a)}class Ut{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"type",r.BuiltInBaseEntity);l(this,"abstract",!1);l(this,"static");l(this,"properties",[]);l(this,"methods",[]);l(this,"abstractMethods",[]);l(this,"extends",[]);l(this,"interactive",!1);l(this,"errors",[]);l(this,"project");this.initialData=this.initialData||e,this.project=this.project||t,this.id=this.id||e.id,this.version=this.version||e.version,this.name=this.name||e.name,this.static=this.static||e.static,this.interactive=this.interactive||e.interactive,this.abstract=e.abstract,this.properties=this.initialData.properties.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.abstractMethods=this.initialData.abstractMethods.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.extends=this.initialData.extends.map(i=>R(i,this.project))}get extendedProperties(){return S(this.extends.reduce((e,t)=>{if(t instanceof Ut){const i=[...t.properties,...t.extendedProperties].filter(a=>!a.abstract);e.push(...i)}return e},[]))}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}async load(){return this}remove(e={ignoreUpstream:!1,seenEntities:new Set}){return{affected:[],removed:[]}}restore({seenEntities:e}={seenEntities:new Set}){return{affected:[],self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.properties.flatMap(i=>i.toFlat(e)),...this.methods.flatMap(i=>i.toFlat(e)),...this.abstractMethods.flatMap(i=>i.toFlat(e)),...this.extends.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.properties.flatMap(i=>i.toFlatIds(e)),...this.methods.flatMap(i=>i.toFlatIds(e)),...this.abstractMethods.flatMap(i=>i.toFlatIds(e)),...this.extends.flatMap(i=>i.toFlatIds(e))])}toJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,interactive:this.interactive,properties:this.properties.map(e=>e.toJSON()),methods:this.methods.map(e=>e.toJSON()),abstractMethods:this.abstractMethods.map(e=>e.toJSON()),extends:this.extends.map(e=>e.toJSON())}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,interactive:this.interactive,properties:this.properties.map(e=>e.toReference()),methods:this.methods.map(e=>e.toReference()),abstractMethods:this.abstractMethods.map(e=>e.toReference()),extends:this.extends.map(e=>e.toReference())}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(i=>i.toFlatJSON(e)),...this.methods.flatMap(i=>i.toFlatJSON(e)),...this.abstractMethods.flatMap(i=>i.toFlatJSON(e))])}toGenerationTarget(){return{id:this.id,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,interactive:this.interactive,extends:this.extends.map(e=>e.id)}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(i=>i.toFlatGenerationTarget(e)),...this.methods.flatMap(i=>i.toFlatGenerationTarget(e)),...this.abstractMethods.flatMap(i=>i.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.properties.forEach(e=>e.clearErrors()),this.methods.forEach(e=>e.clearErrors()),this.abstractMethods.forEach(e=>e.clearErrors()),this}validate(){const e=i3(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.properties.flatMap(t=>t.getErrors()),...this.methods.flatMap(t=>t.getErrors()),...this.abstractMethods.flatMap(t=>t.getErrors())]}getShallowErrors(){return this.errors}clone(){return new Ut(this.toJSON(),this.project)}implement(e,t){return lo(this,e,t)}}function fa(n,e){if(!n)throw new Error("Entity is null");const t=e.findSubscribedInstance(n);switch(n.type){case r.PrimitiveValue:return t||new ci(n,e);case r.CustomEntity:return t||new Pr(n,e);case r.PrimitiveEntity:return t||new Nt(n,e);case r.FunctionDeclaration:return t||new cr(n,e);case r.GlobalEvent:return t||new oi(n,e);case r.DataType:return t||new si(n,e);case r.Property:return t||new lr(n,e);case r.FunctionCall:return t||new br(n,e);case r.Condition:return t||new pr(n,e);case r.Operation:return t||new dr(n,e);case r.VariableDeclaration:return t||new yr(n,e);case r.VariableInstance:return t||new hr(n,e);case r.OutputMap:return t||new fn(n,e);case r.ReturnDeclaration:return t||new Ot(n,e);case r.ArgumentDeclaration:return t||new Tr(n,e);case r.InputMap:return t||new hn(n,e);case r.Project:return t||new $(n);case r.InstalledProject:return t||new mr(n,e);case r.ActionDescriptor:return t||new _e(n,e);case r.ReturnStatement:return t||new Er(n,e);case r.Loop:return t||new ur(n,e);case r.Search:return t||new fr(n,e);case r.ValueDescriptor:return t||new Rr(n,e);case r.BuiltInBaseEntity:return t||new Ut(n,e);case r.InternalCall:return t||new li(n,e);case r.ContinueStatement:return t||new yt(n,e);case r.BreakStatement:return t||new di(n,e);default:throw new Error("Invalid entity type: "+n.type)}}function R(n,e){if(!n)throw new Error("Entity is null");const t=fa(n,e);return t.subscribe(),t}function a3(n,e){if(!n)throw new Error("Entity is null");switch(n.type){case r.PrimitiveValue:return ci.fromGenerationTarget(n,e);case r.CustomEntity:return Pr.fromGenerationTarget(n,e);case r.FunctionDeclaration:return cr.fromGenerationTarget(n,e);case r.GlobalEvent:return oi.fromGenerationTarget(n,e);case r.DataType:return si.fromGenerationTarget(n,e);case r.Property:return lr.fromGenerationTarget(n,e);case r.FunctionCall:return br.fromGenerationTarget(n,e);case r.Condition:return pr.fromGenerationTarget(n,e);case r.Operation:return dr.fromGenerationTarget(n,e);case r.VariableDeclaration:return yr.fromGenerationTarget(n,e);case r.VariableInstance:return hr.fromGenerationTarget(n,e);case r.OutputMap:return fn.fromGenerationTarget(n,e);case r.ReturnDeclaration:return Ot.fromGenerationTarget(n,e);case r.ArgumentDeclaration:return Tr.fromGenerationTarget(n,e);case r.InputMap:return hn.fromGenerationTarget(n,e);case r.InstalledProject:return mr.fromGenerationTarget(n,e);case r.ReturnStatement:return Er.fromGenerationTarget(n,e);case r.Loop:return ur.fromGenerationTarget(n,e);case r.Search:return fr.fromGenerationTarget(n,e);case r.ActionDescriptor:return _e.fromGenerationTarget(n,e);case r.ValueDescriptor:return Rr.fromGenerationTarget(n,e);case r.InternalCall:return li.fromGenerationTarget(n,e);case r.ContinueStatement:return yt.fromGenerationTarget(n,e);case r.BreakStatement:return di.fromGenerationTarget(n,e);default:throw new Error("Invalid entity type: "+n.type)}}const z=class z{constructor(e){l(this,"initialData");l(this,"id");l(this,"version");l(this,"type",r.Project);l(this,"name",null);l(this,"description",null);l(this,"x");l(this,"y");l(this,"entities",[]);l(this,"projects",[]);l(this,"functions",[]);l(this,"events",[]);l(this,"variableDeclarations",[]);l(this,"variableInstances",[]);l(this,"conditions",[]);l(this,"operations",[]);l(this,"functionCalls",[]);l(this,"loops",[]);l(this,"searches",[]);l(this,"primitives",[]);l(this,"builtInBaseEntities",[]);l(this,"operationDeclarations",[]);l(this,"globalEventActionDescriptors",[]);l(this,"loopDeclarations",[]);l(this,"conditionDeclarations",[]);l(this,"valueDescriptors",[]);l(this,"dataTypes",[]);l(this,"project");l(this,"instances",{});l(this,"builtInInstances",{});l(this,"errors",[]);l(this,"references",[]);this.initialData=e,this.id=e.id,this.version=e.version,this.name=e.name,this.description=e.description,this.x=0,this.y=0;try{z.UUID=Cn==null?void 0:Cn()}catch(t){console.error("Error initializing UUID module",t),z.UUID={uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:i=>i}}}static injectUUIDModule(e){z.UUID=e}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[];return a.push(...Pe(i)),{errors:a,modifiedData:i}}async inject(...e){return await Promise.all(e.map(t=>new Promise(async i=>{await t.init(this),i(null)}))),this}validateGeneratedUpdate(e){return{errors:[],modifiedData:e}}addSelfToProject(){return this}get instancesList(){return Object.values(this.instances)}isOperationDeclaration(e){return this.operationDeclarations.includes(e)}isGlobalEventActionDescriptor(e){return this.globalEventActionDescriptors.includes(e)}isLoopDeclaration(e){return this.loopDeclarations.includes(e)}isConditionDeclaration(e){return this.conditionDeclarations.includes(e)}initChildren(){return this.entities=this.initialData.entities.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.projects=this.initialData.projects.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.functions=this.initialData.functions.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.events=this.initialData.events.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.variableDeclarations=this.initialData.variableDeclarations.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.variableInstances=this.initialData.variableInstances.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.conditions=this.initialData.conditions.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.operations=this.initialData.operations.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.functionCalls=this.initialData.functionCalls.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.loops=this.initialData.loops.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.searches=this.initialData.searches.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.attachOrphanReferences(),this.validate(),this}subscribeInstance(e){return(!this.instances[e.id]||this.instances[e.id]!==e)&&(this.instances[e.id]=e),this}subscribeBuiltInInstance(e){return(!this.builtInInstances[e.id]||this.builtInInstances[e.id]!==e)&&(this.builtInInstances[e.id]=e),this}subscribe(){return this}unsubscribe(){return this}unsubscribeInstance(e){return delete this.instances[e.id],this}findSubscribedInstance(e){return this.instances[e.id]||null}findSubscribedBuiltInInstance(e){return this.builtInInstances[e.id]||null}get(e){return this.instances[e]||this.builtInInstances[e]||null}getManaged(e){return this.instances[e]||null}getBuiltIn(e){return this.builtInInstances[e]||null}findSubscribedInstanceFromReference(e){return this.instances[e.entityId]||null}findSubscribedBuiltInInstanceFromReference(e){return this.builtInInstances[e.entityId]||null}sync(e){return this.version=e.version||this.version,this.name=e.name||this.name,this.description=e.description||this.description,this.x=e.x||this.x,this.y=e.y||this.y,this}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e}={ignoreUpstream:!1}){return{affected:[],removed:[]}}restore({seenEntities:e}={seenEntities:new Set}){return{affected:[],self:this}}getAllBuiltInIds(){const e=new Set;return[...this.primitives.flatMap(t=>t.toFlatIds(e)),...this.builtInBaseEntities.flatMap(t=>t.toFlatIds(e)),...this.operationDeclarations.flatMap(t=>t.toFlatIds(e)),...this.globalEventActionDescriptors.flatMap(t=>t.toFlatIds(e)),...this.loopDeclarations.flatMap(t=>t.toFlatIds(e)),...this.conditionDeclarations.flatMap(t=>t.toFlatIds(e)),...this.valueDescriptors.flatMap(t=>t.toFlatIds(e)),...this.dataTypes.flatMap(t=>t.toFlatIds(e))]}getAllBuiltIn(){const e=new Set;return[...this.primitives.flatMap(t=>t.toFlat(e)),...this.builtInBaseEntities.flatMap(t=>t.toFlat(e)),...this.operationDeclarations.flatMap(t=>t.toFlat(e)),...this.globalEventActionDescriptors.flatMap(t=>t.toFlat(e)),...this.loopDeclarations.flatMap(t=>t.toFlat(e)),...this.conditionDeclarations.flatMap(t=>t.toFlat(e)),...this.valueDescriptors.flatMap(t=>t.toFlat(e)),...this.dataTypes.flatMap(t=>t.toFlat(e))]}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[...this.entities.flatMap(i=>i.toFlat(e)),...this.functions.flatMap(i=>i.toFlat(e)),...this.events.flatMap(i=>i.toFlat(e)),...this.projects.flatMap(i=>i.toFlat(e)),...this.variableDeclarations.flatMap(i=>i.toFlat(e)),...this.variableInstances.flatMap(i=>i.toFlat(e)),...this.conditions.flatMap(i=>i.toFlat(e)),...this.operations.flatMap(i=>i.toFlat(e)),...this.functionCalls.flatMap(i=>i.toFlat(e)),...this.loops.flatMap(i=>i.toFlat(e)),...this.searches.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),Array.from(e))}toJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,entities:this.entities.map(e=>e.toJSON()),functions:this.functions.map(e=>e.toJSON()),events:this.events.map(e=>e.toJSON()),projects:this.projects.map(e=>e.toJSON()),variableDeclarations:this.variableDeclarations.map(e=>e.toJSON()),variableInstances:this.variableInstances.map(e=>e.toJSON()),conditions:this.conditions.map(e=>e.toJSON()),operations:this.operations.map(e=>e.toJSON()),functionCalls:this.functionCalls.map(e=>e.toJSON()),loops:this.loops.map(e=>e.toJSON()),searches:this.searches.map(e=>e.toJSON())}}toReference(){return{id:this.id+"--"+z.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,entities:this.entities.map(e=>e.toReference()),functions:this.functions.map(e=>e.toReference()),events:this.events.map(e=>e.toReference()),projects:this.projects.map(e=>e.toReference()),variableDeclarations:this.variableDeclarations.map(e=>e.toReference()),variableInstances:this.variableInstances.map(e=>e.toReference()),conditions:this.conditions.map(e=>e.toReference()),operations:this.operations.map(e=>e.toReference()),functionCalls:this.functionCalls.map(e=>e.toReference()),loops:this.loops.map(e=>e.toReference()),searches:this.searches.map(e=>e.toReference())}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[...this.entities.flatMap(i=>i.toFlatJSON(e)),...this.functions.flatMap(i=>i.toFlatJSON(e)),...this.events.flatMap(i=>i.toFlatJSON(e)),...this.projects.flatMap(i=>i.toFlatJSON(e)),...this.variableDeclarations.flatMap(i=>i.toFlatJSON(e)),...this.variableInstances.flatMap(i=>i.toFlatJSON(e)),...this.conditions.flatMap(i=>i.toFlatJSON(e)),...this.operations.flatMap(i=>i.toFlatJSON(e)),...this.functionCalls.flatMap(i=>i.toFlatJSON(e)),...this.loops.flatMap(i=>i.toFlatJSON(e)),...this.searches.flatMap(i=>i.toFlatJSON(e))])}toGenerationTarget(){return{id:this.id,type:this.type,name:this.name,description:this.description}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[...this.entities.flatMap(i=>i.toFlatGenerationTarget(e)),...this.functions.flatMap(i=>i.toFlatGenerationTarget(e)),...this.events.flatMap(i=>i.toFlatGenerationTarget(e)),...this.projects.flatMap(i=>i.toFlatGenerationTarget(e)),...this.variableDeclarations.flatMap(i=>i.toFlatGenerationTarget(e)),...this.variableInstances.flatMap(i=>i.toFlatGenerationTarget(e)),...this.conditions.flatMap(i=>i.toFlatGenerationTarget(e)),...this.operations.flatMap(i=>i.toFlatGenerationTarget(e)),...this.functionCalls.flatMap(i=>i.toFlatGenerationTarget(e)),...this.loops.flatMap(i=>i.toFlatGenerationTarget(e)),...this.searches.flatMap(i=>i.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.entities.forEach(e=>e.clearErrors()),this.projects.forEach(e=>e.clearErrors()),this.functions.forEach(e=>e.clearErrors()),this.events.forEach(e=>e.clearErrors()),this.variableDeclarations.forEach(e=>e.clearErrors()),this.variableInstances.forEach(e=>e.clearErrors()),this.conditions.forEach(e=>e.clearErrors()),this.operations.forEach(e=>e.clearErrors()),this.functionCalls.forEach(e=>e.clearErrors()),this.loops.forEach(e=>e.clearErrors()),this.searches.forEach(e=>e.clearErrors()),this}validate(){const e=wx(),t=this.toJSON();return e.safeParse(t),this.validateChildren(),{success:!0,error:null,data:t}}validateChildren(){this.entities.forEach(e=>e.validate()),this.projects.forEach(e=>e.validate()),this.functions.forEach(e=>e.validate()),this.events.forEach(e=>e.validate()),this.variableDeclarations.forEach(e=>e.validate()),this.variableInstances.forEach(e=>e.validate()),this.conditions.forEach(e=>e.validate()),this.operations.forEach(e=>e.validate()),this.functionCalls.forEach(e=>e.validate()),this.loops.forEach(e=>e.validate()),this.searches.forEach(e=>e.validate())}getErrors(){return[...this.errors,...this.entities.flatMap(t=>t.getErrors()),...this.projects.flatMap(t=>t.getErrors()),...this.functions.flatMap(t=>t.getErrors()),...this.events.flatMap(t=>t.getErrors()),...this.variableDeclarations.flatMap(t=>t.getErrors()),...this.variableInstances.flatMap(t=>t.getErrors()),...this.conditions.flatMap(t=>t.getErrors()),...this.operations.flatMap(t=>t.getErrors()),...this.functionCalls.flatMap(t=>t.getErrors()),...this.loops.flatMap(t=>t.getErrors()),...this.searches.flatMap(t=>t.getErrors())]}getShallowErrors(){return this.errors}clone(){return new z(this.toJSON())}getCustomEntity(e){return this.entities.find(t=>t.id===e)||null}addCustomEntityFromTransfer(e){const t=R(e,this);return this.addCustomEntity(t),t}addCustomEntity(e){return this.entities.includes(e)||this.entities.push(e),e}addFunctionDeclarationFromTransfer(e){const t=R(e,this);return this.addFunctionDeclaration(t),t}addFunctionDeclaration(e){return this.functions.includes(e)||this.functions.push(e),e}addFunctionCallFromTransfer(e){const t=R(e,this);return this.addFunctionCall(t),t}addFunctionCall(e){return this.functionCalls.includes(e)||this.functionCalls.push(e),e}addVariableDeclarationFromTransfer(e){const t=R(e,this);return this.addVariableDeclaration(t),t}addVariableDeclaration(e){return this.variableDeclarations.includes(e)||this.variableDeclarations.push(e),e}addVariableInstanceFromTransfer(e){const t=R(e,this);return this.addVariableInstance(t),t}addVariableInstance(e){return this.variableInstances.includes(e)||this.variableInstances.push(e),e}addInstalledProjectFromTransfer(e){const t=R(e,this);return this.addInstalledProject(t),this}addInstalledProject(e){return this.projects.includes(e)||this.projects.push(e),this}addGlobalEventFromTransfer(e){const t=R(e,this);return this.addGlobalEvent(t),this}addGlobalEvent(e){return this.events.includes(e)||this.events.push(e),this}addConditionFromTransfer(e){const t=R(e,this);return this.addCondition(t),this}addCondition(e){return this.conditions.includes(e)||this.conditions.push(e),this}addOperationFromTransfer(e){const t=R(e,this);return this.addOperation(t),this}addOperation(e){return this.operations.includes(e)||this.operations.push(e),this}addLoopFromTransfer(e){const t=R(e,this);return this.addLoop(t),this}addLoop(e){return this.loops.includes(e)||this.loops.push(e),this}addSearchFromTransfer(e){const t=R(e,this);return this.addSearch(t),this}addSearch(e){return this.searches.includes(e)||this.searches.push(e),this}removeCustomEntity(e){const t=this.entities.findIndex(i=>i.id===e.id);if(t>-1){const i=this.entities[t];return this.entities.splice(t,1),i}return null}removeFunctionDeclaration(e){const t=this.functions.findIndex(i=>i.id===e.id);if(t>-1){const i=this.functions[t];return this.functions.splice(t,1),i}return null}removeExternalProject(e){const t=this.projects.findIndex(i=>i.id===e.id);if(t>-1){const i=this.projects[t];return this.projects.splice(t,1),i}return null}removeGlobalEvent(e){const t=this.events.findIndex(i=>i.id===e.id);if(t>-1){const i=this.events[t];return this.events.splice(t,1),i}return null}removeTopLevelVariableDeclaration(e){if(e.type!==r.VariableDeclaration)return null;const t=this.variableDeclarations.findIndex(i=>i.id===e.id);if(t>-1){const i=this.variableDeclarations[t];return this.variableDeclarations.splice(t,1),i}return null}getEntryPoints(){return[...this.functions,...this.events,...this.entities.flatMap(t=>t.methods)]}getFunctionDeclaration(e){return this.functions.find(t=>t.id===e)||null}getConditions(){return[...this.conditions,...this.getEntryPoints().reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.Condition)]},[]),...this.functionCalls.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.Condition)]},[]),...this.operations.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.Condition)]},[]),...this.loops.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.Condition)]},[]),...this.searches.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.Condition)]},[])]}getOperations(){return[...this.operations,...this.getEntryPoints().reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.Operation)]},[]),...this.functionCalls.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.Operation)]},[]),...this.conditions.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.Operation)]},[]),...this.loops.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.Operation)]},[]),...this.searches.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.Operation)]},[])]}getFunctionCalls(){return[...this.functionCalls,...this.getEntryPoints().reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.FunctionCall)]},[]),...this.conditions.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.FunctionCall)]},[]),...this.operations.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.FunctionCall)]},[]),...this.loops.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.FunctionCall)]},[]),...this.searches.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.FunctionCall)]},[])]}getVariables(){return[...this.variableDeclarations,...this.getEntryPoints().reduce((t,i)=>{const a=Z(i);return[...t,...a]},[]),...this.functionCalls.reduce((t,i)=>{const a=Z(i);return[...t,...a]},[]),...this.conditions.reduce((t,i)=>{const a=Z(i);return[...t,...a]},[]),...this.operations.reduce((t,i)=>{const a=Z(i);return[...t,...a]},[]),...this.loops.reduce((t,i)=>{const a=Z(i);return[...t,...a]},[]),...this.searches.reduce((t,i)=>{const a=Z(i);return[...t,...a]},[])]}getVariableInstances(){return[...this.variableInstances,...this.getEntryPoints().reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[]),...this.functionCalls.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[]),...this.conditions.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[]),...this.operations.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[]),...this.loops.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[]),...this.searches.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[])]}getVariableDeclarations(){return S([...this.variableDeclarations,...this.getEntryPoints().reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[]),...this.functionCalls.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[]),...this.conditions.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[]),...this.operations.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[]),...this.loops.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[]),...this.searches.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[])])}attachOrphanReferences(){const e=this.getVariableInstances(),t=this.getVariableDeclarations();return e.forEach(i=>{if(!i.declaration){const a=i.initialData,s=a.declaration.entityId||a.declaration.id,o=t.find(u=>u.id===s);o&&i.setDeclaration(o)}}),this}getBuiltInPersistedEntity(){return this.builtInBaseEntities.find(e=>e.name===_.PERSISTED_ENTITY)||null}};l(z,"UUID",Cn==null?void 0:Cn()),l(z,"MUTABLE_BASE_PROPERTIES",["name","description"]),l(z,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),l(z,"BASE_PROPERTIES",[...z.MUTABLE_BASE_PROPERTIES,...z.INMUTABLE_BASE_PROPERTIES]),l(z,"MUTABLE_META_PROPERTIES",[...z.MUTABLE_BASE_PROPERTIES,"x","y"]),l(z,"INMUTABLE_META_PROPERTIES",[...z.INMUTABLE_BASE_PROPERTIES]),l(z,"META_PROPERTIES",[...z.MUTABLE_META_PROPERTIES,...z.INMUTABLE_META_PROPERTIES]),l(z,"MUTABLE_UPSTREAM_PROPERTIES",[]),l(z,"INMUTABLE_UPSTREAM_PROPERTIES",["primitives","builtInBaseEntities","operationDeclarations","globalEventActionDescriptors","loopDeclarations","builtInInstances"]),l(z,"UPSTREAM_PROPERTIES",[...z.MUTABLE_UPSTREAM_PROPERTIES,...z.INMUTABLE_UPSTREAM_PROPERTIES]),l(z,"MUTABLE_DOWNSTREAM_PROPERTIES",["entities","projects","functions","events","variableDeclarations","variableInstances","conditions","operations","functionCalls","loops","searches"]),l(z,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(z,"DOWNSTREAM_PROPERTIES",[...z.MUTABLE_DOWNSTREAM_PROPERTIES,...z.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(z,"PROPERTIES",[...z.META_PROPERTIES,...z.UPSTREAM_PROPERTIES,...z.DOWNSTREAM_PROPERTIES]);let $=z;class jg extends _e{constructor(t){super($t,t);l(this,"id",Ie.Parallel);l(this,"name",Ie.Parallel);l(this,"description","Execute a list of actions one after the other");l(this,"version",1);l(this,"autoexecutable",!0);l(this,"initialData",$t);l(this,"type",r.ActionDescriptor);l(this,"fixedArguments",[]);l(this,"fixedReturns",[]);l(this,"error",null);l(this,"dynamicArgumentTypes",null);l(this,"dynamicReturnTypes",null);l(this,"project");this.project=t,this.fixedArguments=$t.fixedArguments.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.fixedReturns=$t.fixedReturns.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.error=$t.error?R($t.error,this.project):null}}class kg extends _e{constructor(t){super(ot,t);l(this,"id",ot.id);l(this,"name",ot.name);l(this,"description",ot.description);l(this,"version",ot.version);l(this,"autoexecutable",!1);l(this,"initialData",ot);l(this,"type",r.ActionDescriptor);l(this,"fixedArguments",[]);l(this,"fixedReturns",[]);l(this,"error",null);l(this,"dynamicArgumentTypes",null);l(this,"dynamicReturnTypes",null);l(this,"project");this.project=t,this.fixedArguments=ot.fixedArguments.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.fixedReturns=ot.fixedReturns.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.error=ot.error?R(ot.error,this.project):null}}class qg extends _e{constructor(t){super(tn,t);l(this,"id",Ie.Sequential);l(this,"name",Ie.Sequential);l(this,"description","Execute a list of actions one after the other");l(this,"version",1);l(this,"autoexecutable",!0);l(this,"initialData",tn);l(this,"type",r.ActionDescriptor);l(this,"fixedArguments",[]);l(this,"fixedReturns",[]);l(this,"error",null);l(this,"dynamicArgumentTypes",null);l(this,"dynamicReturnTypes",null);l(this,"project");this.project=t,this.fixedArguments=tn.fixedArguments.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.fixedReturns=tn.fixedReturns.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.error=tn.error?R(tn.error,this.project):null}}function s3(n){const e=[new qg(n),new jg(n),new kg(n),new _e(fi,n),new _e(Cr,n),new _e(jn,n),new _e(ba,n),new _e(Do,n),new _e(Oo,n),new _e(So,n),new _e(Ta,n),new _e(yi,n)];return e.forEach(t=>{t.initChildren(),n.subscribeBuiltInInstance(t)}),n.operationDeclarations=e,e}class Jg extends Ut{constructor(t){super(Be,t);l(this,"initialData");l(this,"id",_.PERSISTED_ENTITY);l(this,"version",1);l(this,"name",_.PERSISTED_ENTITY);l(this,"description",Be.description);l(this,"type",r.BuiltInBaseEntity);l(this,"abstract",Be.abstract);l(this,"static",Be.static);l(this,"properties",[]);l(this,"methods",[]);l(this,"abstractMethods",[]);l(this,"extends",[]);l(this,"errors",[]);l(this,"project");this.initialData=Be,this.project=t,this.id=Be.id,this.version=Be.version,this.name=Be.name,this.static=Be.static,this.abstract=Be.abstract,this.properties=this.initialData.properties.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(i=>{const a=R(i,this.project);return a.parent=this,a}),this.abstractMethods=this.initialData.abstractMethods.map(i=>{const a=R(i,this.project);return a.parent=this,a}),this.extends=this.initialData.extends.map(i=>R(i,this.project))}}function o3(n){const e=[new Jg(n),new Ut(Oa,n),new Ut(bn,n),new Ut(Jo,n),new Ut(Sa,n)];return e.forEach(t=>{n.subscribeBuiltInInstance(t)}),n.builtInBaseEntities=e,e}function l3(n){const e=[new Nt(F,n),new Nt(Un,n),new Nt(Ce,n),new Nt(Xe,n),new Nt(Rn,n),new Nt(Or,n),new Nt(ma,n),new Nt(vo,n)];return e.forEach(t=>{n.subscribeBuiltInInstance(t)}),n.primitives=e,e}function c3(n){const e=[new _e(Ma,n)];return e.forEach(t=>{t.initChildren(),n.subscribeBuiltInInstance(t)}),n.globalEventActionDescriptors=e,e}function d3(n){const e=[new _e(kn,n),new _e(Fo,n)];return e.forEach(t=>{t.initChildren(),n.subscribeBuiltInInstance(t)}),n.loopDeclarations=e,e}function u3(n){const e=[new Rr(zo,n)];return e.forEach(t=>{t.initChildren(),n.subscribeBuiltInInstance(t)}),n.valueDescriptors=e,e}function p3(n){const e=[new _e(qn,n),new _e(wr,n)];return e.forEach(t=>{t.initChildren()}),n.conditionDeclarations=e,e}const Dr={},To={};async function y3(n,e={}){const t={...eb};return t.id=n.id,e.empty?{data:{id:n.id,type:r.Project,version:1,name:null,description:null,projects:[],entities:[],operations:[],functions:[],variableDeclarations:[],variableInstances:[],functionCalls:[],conditions:[],loops:[],searches:[],events:[]}}:{data:t}}function Wg(n){const e=new $(n);return l3(e),o3(e),s3(e),c3(e),d3(e),u3(e),p3(e),e.initChildren(),e}async function h3(n,e={}){try{if(n.id&&Dr[n.id])return Dr[n.id];if(n.id&&To[n.id])return await To[n.id],Dr[n.id];const t=y3(n,e);n.id&&(To[n.id]=t);const i=await t;if(i.data){const a=Wg(i.data);return Dr[n.id]=a,n.id&&delete To[n.id],a}return null}catch{return null}}function f3(n){return Dr[n.id]&&delete Dr[n.id],null}const m3="test_primitive_entities_export";d.AI_VALUE_CONNECTION_GENERATION_ACTION_EXPLANATION=Td,d.ActionDescriptorState=_e,d.ActionDescriptorValuesType=L,d.ActionInputMapState=h9,d.ActionOutputMapState=T9,d.AppendToListOperationInputIds=lp,d.AppendToListOperationOutputIds=cp,d.ArgumentDeclarationState=Tr,d.BREAK_AND_CONTINUE_STATEMENTS_RETURN_DECLARATIONS_EXPLANATION=yd,d.BUILT_IN_BASE_ENTITY_IDS=Ve,d.BUILT_IN_ENTITY_TYPES=Sr,d.BaseCanvasDraggableState=Q6,d.BaseEntityNames=_,d.BaseState=X6,d.BaseValueDescriptorIds=$o,d.BreakStatementState=di,d.BuiltInBaseEntityState=Ut,d.CACHED_PROJECTS_BY_ID=Dr,d.CALLABLE_ENTITIES_EXPLANATION=C9,d.CALLABLE_TYPES=En,d.CALLER_ENTITIES_EXPLANATION=ig,d.CALLER_TYPES=en,d.CALLS_UPDATE_EXPLANATION=Vn,d.COMPARISON_CONDITIONS=am,d.CONDITIONS=gI,d.CUSTOM_ENTITY_OPERATIONS=Iy,d.CallableEntityClass=e9,d.CallerEntityClass=cd,d.ChildEntityState=K6,d.ComparisonOperatorTypes=Ae,d.ConditionState=pr,d.ContinueStatementState=yt,d.CreateNewInputIds=Kp,d.CreateNewOutputIds=ey,d.CustomEntityState=Pr,d.DRAGGABLE_CALLABLE_TYPES=Ro,d.DRAGGABLE_CALLER_TYPES=$d,d.DRAGGABLE_ELEMENT_TYPES=bo,d.DRAGGABLE_EXECUTABLE_TYPES=Xg,d.DRAGGABLE_PASS_THROUGH_CALLABLE_TYPES=Eo,d.DataTypeCompatibilityTypes=wt,d.DataTypeParentChildRelation=qe,d.DataTypeState=si,d.ENTITIES_WITH_VALLUES_EXPLANATION=ro,d.ENTITY_TYPES=Qg,d.ENTITY_WITH_LOGIC_SCOPE_TYPES=st,d.ENTITY_WITH_NAMES_TYPES=Vd,d.ENTITY_WITH_VALUE_TYPES=Nd,d.ENTRY_POINT_ENTITIES_EXPLANATION=da,d.ENTRY_POINT_TYPES=$e,d.EVENT_TYPES=Ar,d.EXECUTABLE_TYPES=Zg,d.EXECUTION_OPERATIONS=Qp,d.EntityError=Qn,d.EntityErrorSeverity=f,d.EntityGenerationError=E,d.EntityGenerationErrorCode=y,d.EntityInstanceErrorCode=O,d.EntityOperations=Ze,d.EntityType=r,d.EntityWithLogicScopeClass=i9,d.EntityWithValueClass=r9,d.EntryPointEntityClass=t9,d.ExecutionOperations=Ie,d.FunctionCallState=br,d.FunctionDeclarationState=cr,d.GLOBAL_EVENT_DECLARATIONS=II,d.GetLastInListOperationInputIds=Zu,d.GetLastInListOperationOutputIds=Xu,d.GlobalEventNames=Kt,d.GlobalEventState=oi,d.HTTPOperations=Ye,d.HTTP_OPERATIONS=rh,d.InputMapState=hn,d.InstalledProjectState=mr,d.InternalCallState=li,d.JoinListOperationInputIds=mu,d.JoinListOperationOutputIds=Tu,d.JoinStringOperationInputIds=nu,d.JoinStringOperationOutputIds=ru,d.LIST_OPERATIONS=gp,d.ListOperations=j,d.LoopState=ur,d.LoopTypes=je,d.NON_INTERACTIVE_BASE_ENTITIES_EXPLANATION=Ln,d.NUMBER_OPERATIONS=tu,d.NumberAdditionOperationInputIds=jd,d.NumberAdditionOperationOutputIds=kd,d.NumberOperations=at,d.OPERATION_DECLARATIONS=eI,d.OperationState=dr,d.OutputMapParentChildRelation=Md,d.OutputMapState=fn,d.PARENT_AUTO_CALCULATION_FROM_CALLER_EXPLANATION=io,d.PASS_THROUGH_CALLABLE_ENTITIES_EXPLANATION=$n,d.PASS_THROUGH_CALLABLE_TYPES=Ne,d.PROPERTY_NOT_VALUE_READER_WRITTER_EXPLANATION=md,d.ParallelExecutionOperation=jg,d.ParallelExecutionOperationInputIds=Ip,d.ParallelExecutionOperationOutputIds=Pp,d.PassThroughCallableEntityClass=n9,d.PersistedEntity=Jg,d.PersistedEntityMethods=gt,d.PrimitiveEntityState=Nt,d.PrimitiveTypes=g,d.PrimitiveValueState=ci,d.ProjectState=$,d.PropertyState=lr,d.RETURN_STATEMENT_RETURN_DECLARATIONS_EXPLANATION=B9,d.ReturnDeclarationState=Ot,d.ReturnStatementState=Er,d.STANDALONE_CONDITIONS=Kf,d.STRING_OPERATIONS=fu,d.ScopeCompatibilityType=mo,d.SearchState=fr,d.SequentialExecutionOperation=qg,d.SequentialExecutionOperationInputIds=xp,d.SequentialExecutionOperationOutputIds=jp,d.SharedEntityErrorCode=v,d.SharedStateFunctionality=tg,d.SplitListOperationInputIds=_u,d.SplitListOperationOutputIds=Mu,d.StandaloneOperatorTypes=Ct,d.StringOperations=ge,d.TERMINATION_TYPES=Oe,d.USER_MANAGED_ENTITY_TYPES=Kg,d.UserManagedEntityStateFunctionality=Z6,d.VALUE_READING_ENTITIES_EXPLANATION=fd,d.VALUE_READING_TYPES=Tn,d.VALUE_WRITING_ENTITIES_EXPLANATION=ag,d.VALUE_WRITING_TYPES=Se,d.VARIABLE_DATA_TYPE_INFERRANCE_EXPLANATION=hd,d.VARIABLE_TYPES=Fe,d.ValidationInputIds=cy,d.ValidationOutputIds=dy,d.ValueAutogenerationType=xe,d.ValueDescriptorParentChildRelation=C,d.ValueDescriptorState=Rr,d.ValueReadingEntityClass=la,d.ValueWritingEntityClass=ca,d.VariableDeclarationState=yr,d.VariableInputMapState=y9,d.VariableInstanceState=hr,d.VariableOutputMapState=m9,d.WaitOperation=kg,d.WaitOperationInputIds=Np,d.WaitOperationOutputIds=$p,d._VALUE_READING_TYPES=Yg,d._VALUE_WRITING_TYPES=zg,d.appendToListOperation=ba,d.appendToListOperationElementToAppendArgument=Bo,d.appendToListOperationElementToAppendArgumentParentRef=Tp,d.appendToListOperationElementToAppendArgumentRef=pp,d.appendToListOperationError=vp,d.appendToListOperationErrorParentRef=bp,d.appendToListOperationListArgument=Co,d.appendToListOperationListArgumentParentRef=mp,d.appendToListOperationListArgumentRef=dp,d.appendToListOperationListDataType=up,d.appendToListOperationResultListDataType=fp,d.appendToListOperationResultListReturn=Rp,d.appendToListOperationResultListReturnParentRef=Ep,d.appendToListOperationResultListReturnRef=hp,d.appendToListOperationSecondListDataType=yp,d.asGenerationActionExample=Qt,d.baseHttpRequestFunctionDeclaration=fi,d.baseHttpRequestFunctionDeclarationErrorValueDescriptor=Go,d.baseHttpRequestFunctionDeclarationErrorValueDescriptorDatatype=nh,d.baseHttpRequestFunctionDeclarationErrorValueDescriptorRef=th,d.baseHttpRequestFunctionDeclarationRef=Xy,d.baseHttpRequestFunctionDeclarationRefEight=Ky,d.baseHttpRequestFunctionDeclarationRefFive=zy,d.baseHttpRequestFunctionDeclarationRefFour=Yy,d.baseHttpRequestFunctionDeclarationRefNine=eh,d.baseHttpRequestFunctionDeclarationRefSeven=Qy,d.baseHttpRequestFunctionDeclarationRefSix=Zy,d.baseHttpRequestFunctionDeclarationRefThree=Hy,d.baseHttpRequestFunctionDeclarationRefTwo=Wy,d.booleanPrototype=Un,d.capitalizeFirstLetter=Hs,d.checkAreCustomEntitiesCompatibleAsDataType=Fv,d.checkAreDataTypesCompatible=Ys,d.checkArePropertiesCompatibleAsDataType=Gv,d.checkIsBranchDependentButNotDirectlyOnBranch=pa,d.checkIsBranchDependentOnBranch=F9,d.checkIsCallableEntityReachable=_d,d.checkIsCanvasEntity=e3,d.checkIsDetachedBranch=$g,d.checkIsDetachedBranchShallow=Bd,d.checkIsGlobalVariable=K9,d.checkIsGloballyDeclared=Cd,d.checkIsMethod=Gg,d.checkIsNestedScope=fo,d.checkScopeCompatibility=ya,d.createEntityError=k,d.createNewInstanceOperation=Cr,d.createNewInstanceOperationEntityToInstanciateArgument=iy,d.createNewInstanceOperationEntityToInstanciateArgumentRef=ty,d.createNewInstanceOperationEntityToInstanciateDataType=ny,d.createNewInstanceOperationError=ly,d.createNewInstanceOperationErrorParentRef=oy,d.createNewInstanceOperationOutputEntityDeclaration=sy,d.createNewInstanceOperationOutputEntityDeclarationParentRef=ay,d.createNewInstanceOperationRef=ry,d.createSemanticId=Xt,d.createStateFromGenerationTargetType=a3,d.createStateFromType=fa,d.createStateFromTypeAndSubscribe=R,d.cronJobBuiltInBaseEntity=Jo,d.cronJobBuiltInBaseEntityExpressionProperty=zf,d.cronJobBuiltInBaseEntityExpressionPropertyDataTypeRef=RI,d.cronJobBuiltInBaseEntityExpressionPropertyRef=Hf,d.cronJobBuiltInBaseEntityRef=Yf,d.cronJobTriggeredFunctionDeclarationBlueprint=qo,d.cronJobTriggeredFunctionDeclarationBlueprintParentRef=Jf,d.customEntityToZodSchema=Im,d.dataTypeCompatibilityToErrorExplanation=yg,d.datePrototype=Or,d.dateValueAutogenerationSchema=Zl,d.deletePersistedEntityMethod=ko,d.deletePersistedEntityMethodParentRef=If,d.deleteRootProject=f3,d.endpointBuiltInBaseEntity=Oa,d.endpointBuiltInBaseEntityRef=Ph,d.endpointBuiltInBaseEntityRefFour=yf,d.endpointBuiltInBaseEntityRefThree=Mh,d.endpointBuiltInBaseEntityRefTwo=Ch,d.endpointBuiltInCorsProperty=Dh,d.endpointBuiltInCorsPropertyDataType=Ih,d.endpointBuiltInCorsPropertyDataTypeRef=vh,d.endpointBuiltInCorsPropertyRef=gh,d.endpointBuiltInMethodProperty=xo,d.endpointBuiltInMethodPropertyDataType=_h,d.endpointBuiltInMethodPropertyDataTypeRef=Bh,d.endpointBuiltInMethodPropertyRef=wh,d.endpointBuiltInPathProperty=Uo,d.endpointBuiltInPathPropertyDataType=Oh,d.endpointBuiltInPathPropertyDataTypeRef=Ah,d.endpointBuiltInPathPropertyRef=Sh,d.endpointPathParamsArgumentDeclaration=Yh,d.endpointPathParamsArgumentDeclarationRef=kh,d.endpointPathParamsVariableDataType=qh,d.endpointPathParamsVariableDataTypeRef=jh,d.endpointReachedTriggerActionDescriptor=jo,d.endpointReachedTriggerActionDescriptorRef=Jh,d.endpointReachedTriggerActionDescriptorRefFour=Xh,d.endpointReachedTriggerActionDescriptorRefThree=zh,d.endpointReachedTriggerActionDescriptorRefTwo=Hh,d.endpointRequestBodyArgumentDeclaration=Qh,d.endpointRequestBodyArgumentDeclarationRef=Lh,d.endpointRequestBodyVariableDataType=Gh,d.endpointRequestHeadersArgumentDeclaration=Wh,d.endpointRequestHeadersArgumentDeclarationRef=$h,d.endpointRequestHeadersVariableDataType=Vh,d.endpointRequestHeadersVariableDataTypeRef=Nh,d.endpointRequestQueryParamsArgumentDeclaration=Zh,d.endpointRequestQueryParamsArgumentDeclarationRef=Uh,d.endpointRequestQueryParamsVariableDataType=xh,d.endpointRequestQueryParamsVariableDataTypeRef=Fh,d.endpointResponseBodyDataType=df,d.endpointResponseBodyReturnDeclaration=pf,d.endpointResponseBodyReturnDeclarationRef=cf,d.endpointResponseCodeDataType=ef,d.endpointResponseCodeReturnDeclaration=nf,d.endpointResponseCodeReturnDeclarationRef=Kh,d.endpointResponseHeadersDataType=sf,d.endpointResponseHeadersDataTypeRef=rf,d.endpointResponseHeadersReturnDeclaration=lf,d.endpointResponseHeadersReturnDeclarationRef=af,d.endpointReturnStatementRef=tf,d.endpointReturnStatementRefThree=uf,d.endpointReturnStatementRefTwo=of,d.enumOptionsProperty=xd,d.enumOptionsPropertyDataType=Fd,d.enumOptionsPropertyDataTypeRef=Ld,d.enumOptionsPropertyRef=Gd,d.enumPrototype=Rn,d.enumPrototypeRef=Ud,d.executionBuiltInEntity=Ho,d.executionBuiltInEntityAbortMethod=Wo,d.executionBuiltInEntityAbortMethodParentRef=Zf,d.filterOutDuplicateEntities=S,d.filterOutDuplicateErrors=ZF,d.findReferenceToSelfInList=Sg,d.findReferencesToSelfInProject=H9,d.flattenCalls=vr,d.flattenCanvasAncestorsUntil=co,d.flattenCustomEntityExtensionAndImplementationTypes=_g,d.flattenCustomEntityExtensionTypes=yo,d.flattenCustomEntityExtensions=Ad,d.flattenCustomEntityImplementations=Sd,d.flattenCustomEntityImplementionTypes=po,d.flattenDerivedCanvasEntities=vt,d.flattenDetachedBranch=Lg,d.flattenElementCalls=Me,d.flattenProjectElements=Ag,d.flattenRelatedCanvasElementsOnTheLeft=wg,d.flattenRelatedCanvasElementsOnTheRight=Bg,d.flattenVariableReads=Dg,d.flattenVariableWrites=Pg,d.flattenVariables=Z,d.fromZodParseToEntityGenerationErrors=dd,d.generate=RD,d.generateActionExample=w9,d.generateExecutionDataType=Uv,d.generateMutablePropertiesExplanation=eo,d.generateRandomBoolean=zm,d.generateRandomDate=Sm,d.generateRandomDateAfter=Pm,d.generateRandomDateBefore=Dm,d.generateRandomDateBetweenRange=Am,d.generateRandomNumber=qm,d.generateRandomNumberAfter=xm,d.generateRandomNumberBefore=jm,d.generateRandomNumberBetweenRange=km,d.generateRandomText=Ym,d.generateRandomTextAfter=Jm,d.generateRandomTextBefore=Wm,d.generateRandomTextBetweenRange=Hm,d.generateUniqueUUID=Um,d.getAllActionDescriptorsForConditions=oo,d.getAllActionDescriptorsForGlobalEvents=ao,d.getAllActionDescriptorsForLoops=so,d.getAllActionDescriptorsForOperations=$9,d.getAllGloballyDeclaredFunctionDeclarationsExplanation=dg,d.getBaseBuiltInEntities=Fn,d.getBaseSchemaBasedOnType=ng,d.getBuiltInEntityOwner=Ir,d.getCallableEntityReferenceSchema=ke,d.getCallableEntityTypeSchema=Db,d.getCallerEntityReferenceSchema=tx,d.getCallerEntityTypeSchema=ex,d.getCalls=vd,d.getCanvasEntitiesDerivedFromInternalCalls=Cg,d.getCanvasEntitiesDerivedFromWrites=ui,d.getCanvasEntityDerivedFromValueReadingEntity=Dd,d.getCanvasEntityReferenceSchema=Ex,d.getCanvasEntityTypeSchema=Tx,d.getChildrenEntityWithValues=x9,d.getCommonAncestor=bd,d.getCommonChildren=mg,d.getDeclaration=Kc,d.getDeepestScope=xg,d.getDraggableCallableEntityReferenceSchema=Sb,d.getDraggableCallableEntityTypeSchema=Ab,d.getDraggableCallerEntityReferenceSchema=rx,d.getDraggableCallerEntityTypeSchema=nx,d.getDraggableExecutableEntityReferenceSchema=ox,d.getDraggableExecutableEntityTypeSchema=sx,d.getDraggablePassThroughCallableEntityReferenceSchema=Fs,d.getDraggablePassThroughCallableEntityTypeSchema=Gs,d.getDraggablePlayableEntityReferenceSchema=px,d.getDraggablePlayableEntityTypeSchema=ux,d.getEntityArgumentDeclarations=Id,d.getEntityInputMaps=Og,d.getEntityOutputMaps=Z9,d.getEntityReferenceSchema=mx,d.getEntityReturnDeclarations=Pd,d.getEntityTypeSchema=fx,d.getEntityWithLogicScopeReferenceSchema=un,d.getEntityWithLogicScopeTypeSchema=lx,d.getEntityWithValueReferenceSchema=Pb,d.getEntityWithValueTypeSchema=KU,d.getEntryPointEntityReferenceSchema=Ue,d.getEntryPointEntityTypeSchema=_n,d.getEventEntityReferenceSchema=Vs,d.getEventEntityTypeSchema=$s,d.getExecutableEntityReferenceSchema=ax,d.getExecutableEntityTypeSchema=ix,d.getExtendedBuiltInEntity=X9,d.getExtendedCustomEntity=Ng,d.getGenerationTargetSchemaBasedOnType=rg,d.getHeadIfPartOfDetachedBranch=Vg,d.getHighestScope=Ug,d.getImplementedBuiltInEntity=Q9,d.getIsInteractive=Od,d.getLastInListOperation=Oo,d.getLastInListOperationError=op,d.getLastInListOperationErrorParentRef=sp,d.getLastInListOperationInputListArgument=rp,d.getLastInListOperationInputListArgumentParentRef=np,d.getLastInListOperationInputListArgumentRef=Qu,d.getLastInListOperationInputListDataType=Ku,d.getLastInListOperationOutputElementDataType=tp,d.getLastInListOperationOutputElementReturn=ap,d.getLastInListOperationOutputElementReturnParentRef=ip,d.getLastInListOperationOutputElementReturnRef=ep,d.getLinkedEntitiesFromArgumentDeclaration=W9,d.getLowestPersistedEntityImplementation=Mg,d.getParentCanvasEntities=_t,d.getParentCanvasEntity=He,d.getParentEntryPoint=U9,d.getPassThroughCallableEntityReferenceSchema=ye,d.getPassThroughCallableEntityTypeSchema=Ls,d.getPlayableEntityReferenceSchema=dx,d.getPlayableEntityTypeSchema=cx,d.getProject=h3,d.getPrototypeByType=ho,d.getReferenceEntityId=D,d.getReferencedEntitiesStateOrErrors=no,d.getReferencedEntityStateOrErrors=ud,d.getRelatedCanvasElementsOnTheLeft=gr,d.getRelatedCanvasElementsOnTheRight=Gn,d.getRootEntryPointScopeOwner=wd,d.getScopeOwner=ht,d.getTerminationReferenceSchema=hx,d.getTerminationTypeSchema=yx,d.getUsedArgFromDeclaration=Y9,d.getUsedReturnFromDeclaration=z9,d.getValueReadingEntityReferenceSchema=Ib,d.getValueReadingEntityTypeSchema=dn,d.getValueWritingEntityReferenceSchema=QU,d.getValueWritingEntityTypeSchema=Qi,d.getVariableFromInputMapping=Eg,d.getVariableFromReturnVariablePointer=vg,d.getVariableReferenceSchema=wn,d.getVariableTypeSchema=tr,d.getVariablesFromArgumentDeclarations=uo,d.getVariablesFromInputMaps=Rg,d.getVariablesFromOutputMapping=gg,d.getVariablesFromOutputMaps=Ig,d.getVariablesFromReturnDeclarations=bg,d.getVariablesInSameOrHigherScope=ed,d.getWrites=gd,d.groupCallsBasedOnParallelizableExecution=k9,d.handleAfterEntityImplementationSideEffects=fg,d.handleBeforeEntityImplementationSideEffects=hg,d.httpRequestBodyArgument=Pa,d.httpRequestBodyArgumentRef=Vy,d.httpRequestBodyDataType=Ly,d.httpRequestHeadersArgument=Ia,d.httpRequestHeadersArgumentRef=Ny,d.httpRequestHeadersDataType=$y,d.httpRequestMethodArgument=va,d.httpRequestMethodArgumentRef=_y,d.httpRequestMethodDataType=My,d.httpRequestMethodDataTypeRef=By,d.httpRequestQueryParamsArgument=Vo,d.httpRequestQueryParamsArgumentRef=Oy,d.httpRequestQueryParamsDataType=Cy,d.httpRequestVariableURLArgument=ga,d.httpRequestVariableURLArgumentRef=Ay,d.httpRequestVariableURLDataType=Sy,d.httpRequestVariableURLDataTypeRef=Py,d.httpResponseBodyReturnDataType=Jy,d.httpResponseBodyReturnDataTypeRef=ky,d.httpResponseBodyReturnReturn=hi,d.httpResponseBodyReturnReturnRef=qy,d.httpResponseCodeDataType=Fy,d.httpResponseCodeReturn=Lo,d.httpResponseCodeReturnRef=Gy,d.httpResponseHeadersDataType=jy,d.httpResponseHeadersDataTypeRef=Uy,d.httpResponseHeadersReturn=Da,d.httpResponseHeadersReturnRef=xy,d.implement=lo,d.inferArgumentDeclarationDataType=xv,d.inferDataType=zs,d.inferInputMapDataType=jv,d.inferOutputMapDataType=Jv,d.inferVariableDeclarationDataType=qv,d.inferVariableInstanceDataType=kv,d.initProject=Wg,d.iterateOverListActionDescriptor=kn,d.iterateOverListActionDescriptorListArgumentDeclaration=dh,d.iterateOverListActionDescriptorListArgumentDeclarationDataType=lh,d.iterateOverListActionDescriptorListArgumentDeclarationDataTypeParentRef=oh,d.iterateOverListActionDescriptorListArgumentDeclarationParentRef=ch,d.iterateOverListActionDescriptorReturnDeclaration=sh,d.iterateOverListActionDescriptorReturnDeclarationParentRef=ah,d.joinListOperation=Do,d.joinListOperationError=wu,d.joinListOperationErrorParentRef=Bu,d.joinListOperationFirstListArgument=Du,d.joinListOperationFirstListArgumentParentRef=Pu,d.joinListOperationFirstListArgumentRef=Eu,d.joinListOperationFirstListDataType=Ru,d.joinListOperationResultListDataType=Iu,d.joinListOperationResultListReturn=Cu,d.joinListOperationResultListReturnParentRef=Ou,d.joinListOperationResultListReturnRef=gu,d.joinListOperationSecondListArgument=Su,d.joinListOperationSecondListArgumentParentRef=Au,d.joinListOperationSecondListArgumentRef=bu,d.joinListOperationSecondListDataType=vu,d.joinListWithLastSeparator=N,d.joinStringOperation=yi,d.joinStringOperationError=hu,d.joinStringOperationErrorParentRef=yu,d.joinStringOperationFirstStringArgument=Ea,d.joinStringOperationFirstStringArgumentParentRef=du,d.joinStringOperationFirstStringArgumentRef=iu,d.joinStringOperationFirstStringDataType=au,d.joinStringOperationResultStringDataType=cu,d.joinStringOperationResultStringReturn=pi,d.joinStringOperationResultStringReturnParentRef=pu,d.joinStringOperationResultStringReturnRef=lu,d.joinStringOperationSecondStringArgument=Ra,d.joinStringOperationSecondStringArgumentParentRef=uu,d.joinStringOperationSecondStringArgumentRef=su,d.joinStringOperationSecondStringDataType=ou,d.jsonPrototype=vo,d.keyValueParamBuiltInBaseEntity=Sa,d.keyValueParamBuiltInBaseEntityNameProperty=Th,d.keyValueParamBuiltInBaseEntityNamePropertyDataTypeRef=nI,d.keyValueParamBuiltInBaseEntityNamePropertyParentRef=mh,d.keyValueParamBuiltInBaseEntityNamePropertyRef=fh,d.keyValueParamBuiltInBaseEntityValueProperty=bh,d.keyValueParamBuiltInBaseEntityValuePropertyDataTypeRef=iI,d.keyValueParamBuiltInBaseEntityValuePropertyParentRef=Rh,d.keyValueParamBuiltInBaseEntityValuePropertyRef=Eh,d.lowercaseFirstLetter=Lv,d.manualFlowActionDescriptor=Fo,d.manualFlowActionDescriptorDeclarationReturnDeclaration=hh,d.manualFlowActionDescriptorDeclarationReturnDeclarationDataType=ph,d.manualFlowActionDescriptorDeclarationReturnDeclarationDataTypeParentRef=uh,d.manualFlowActionDescriptorDeclarationReturnDeclarationParentRef=yh,d.mapActionDescriptorToTypeItRepresents=t3,d.mergeEntityErrorsList=XF,d.mergeListOfEntities=Fg,d.methodDefaultValue=wy,d.mockClientProject=eb,d.moreThanOrEqualCondition=wr,d.moreThanOrEqualConditionLeftHandArgument=nm,d.moreThanOrEqualConditionLeftHandArgumentParentRef=tm,d.moreThanOrEqualConditionRightHandArgument=im,d.moreThanOrEqualConditionRightHandArgumentParentRef=rm,d.notEmptyCondition=qn,d.notEmptyConditionArgument=Qf,d.notEmptyConditionRef=Xf,d.numberAdditionOperation=Ta,d.numberAdditionOperationError=eu,d.numberAdditionOperationErrorParentRef=Kd,d.numberAdditionOperationFirstNumberArgument=go,d.numberAdditionOperationFirstNumberArgumentRef=qd,d.numberAdditionOperationFirstNumberDataType=Jd,d.numberAdditionOperationRef=Zd,d.numberAdditionOperationRefThree=Qd,d.numberAdditionOperationRefTwo=Xd,d.numberAdditionOperationResultNumberDataType=zd,d.numberAdditionOperationResultNumberReturn=Po,d.numberAdditionOperationResultNumberReturnRef=Yd,d.numberAdditionOperationSecondNumberArgument=Io,d.numberAdditionOperationSecondNumberArgumentRef=Wd,d.numberAdditionOperationSecondNumberDataType=Hd,d.numberPrototype=Ce,d.numberValueAutogenerationSchema=zl,d.parallelExecutionOperation=$t,d.parallelExecutionOperationError=Mp,d.parallelExecutionOperationErrorParentRef=_p,d.parallelExecutionOperationListOfExecutionResultsDataType=Cp,d.parallelExecutionOperationListOfExecutionResultsReturn=_o,d.parallelExecutionOperationListOfExecutionResultsReturnRef=Op,d.parallelExecutionOperationListOfFunctionsArgument=wo,d.parallelExecutionOperationListOfFunctionsArgumentDatatype=Sp,d.parallelExecutionOperationListOfFunctionsArgumentRef=Ap,d.parallelExecutionOperationListOfFunctionsBlueprint=Dp,d.parallelExecutionOperationRef=Bp,d.parallelExecutionOperationRefThree=wp,d.persistedBuiltInBaseEntity=Be,d.persistedBuiltInBaseEntityCreatedAtProperty=Uf,d.persistedBuiltInBaseEntityCreatedAtPropertyDataType=Gf,d.persistedBuiltInBaseEntityCreatedAtPropertyDataTypeRef=TI,d.persistedBuiltInBaseEntityCreatedAtPropertyParentRef=Ff,d.persistedBuiltInBaseEntityCreatedAtPropertyRef=Lf,d.persistedBuiltInBaseEntityDatabaseProperty=Ti,d.persistedBuiltInBaseEntityDatabasePropertyDataTypeRef=yI,d.persistedBuiltInBaseEntityDatabasePropertyParentRef=Of,d.persistedBuiltInBaseEntityDatabasePropertyRef=Sf,d.persistedBuiltInBaseEntityDeletedAtProperty=Vf,d.persistedBuiltInBaseEntityDeletedAtPropertyDataType=Nf,d.persistedBuiltInBaseEntityDeletedAtPropertyDataTypeRef=mI,d.persistedBuiltInBaseEntityDeletedAtPropertyParentRef=$f,d.persistedBuiltInBaseEntityDeletedAtPropertyRef=Mf,d.persistedBuiltInBaseEntityIdentifierProperty=_f,d.persistedBuiltInBaseEntityIdentifierPropertyDataTypeRef=Cf,d.persistedBuiltInBaseEntityIdentifierPropertyParentRef=wf,d.persistedBuiltInBaseEntityIdentifierPropertyRef=Bf,d.persistedBuiltInBaseEntityUpdatedAtProperty=qf,d.persistedBuiltInBaseEntityUpdatedAtPropertyDataType=jf,d.persistedBuiltInBaseEntityUpdatedAtPropertyDataTypeRef=EI,d.persistedBuiltInBaseEntityUpdatedAtPropertyParentRef=kf,d.persistedBuiltInBaseEntityUpdatedAtPropertyRef=xf,d.processOutputGlobalValueDescriptorDataType=om,d.processOutputGlobalValueDescriptorReturn=zo,d.processOutputGlobalValueDescriptorReturnRef=sm,d.projectPublicationCompletedGlobalEvent=Ma,d.propertyToZodSchema=gm,d.relationalDatabaseBuiltInBaseEntity=bn,d.relationalDatabaseBuiltInBaseEntityDefaultProperty=gf,d.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataTypeRef=bf,d.relationalDatabaseBuiltInBaseEntityDefaultPropertyRef=vf,d.relationalDatabaseBuiltInBaseEntityIdentifierProperty=Ca,d.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataTypeRef=hf,d.relationalDatabaseBuiltInBaseEntityIdentifierPropertyRef=ff,d.relationalDatabaseBuiltInBaseEntityMinSizeProperty=_a,d.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataTypeRef=Ef,d.relationalDatabaseBuiltInBaseEntityMinSizePropertyRef=Rf,d.relationalDatabaseBuiltInBaseEntityPasswordProperty=wa,d.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataTypeRef=cI,d.relationalDatabaseBuiltInBaseEntityPasswordPropertyRef=Tf,d.relationalDatabaseBuiltInBaseEntityRef=Br,d.relationalDatabaseBuiltInBaseEntityUsernameProperty=Ba,d.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataTypeRef=oI,d.relationalDatabaseBuiltInBaseEntityUsernamePropertyRef=mf,d.resolveActionDescriptorName=eg,d.resolveBaseEntityName=Xv,d.resolveBuiltInBaseEntityDataTypeLabel=td,d.resolveConditionOperatorLabel=Qs,d.resolveCustomEntityDataTypeLabel=nd,d.resolveDataType=Zs,d.resolveDataTypeLabel=Yv,d.resolveEntityDataTypeLabel=Zv,d.resolveEntityName=A,d.resolveFirstCallsSecond=q9,d.resolveFirstWritesSecond=J9,d.resolvePrimitiveEntityName=Kv,d.resolvePropertyDataTypeLabel=zv,d.resolveSearchName=Qv,d.resolveVariableDataTypeLabel=$6,d.resolveVariableDeclarationDataTypeLabel=or,d.resolveVariableInstanceDataTypeLabel=Hv,d.resolveVariableScope=_6,d.sequentialExecutionOperation=tn,d.sequentialExecutionOperationError=Xp,d.sequentialExecutionOperationErrorParentRef=Zp,d.sequentialExecutionOperationListOfExecutionResultsDataType=Hp,d.sequentialExecutionOperationListOfExecutionResultsReturn=No,d.sequentialExecutionOperationListOfExecutionResultsReturnParentRef=zp,d.sequentialExecutionOperationListOfExecutionResultsReturnRef=Wp,d.sequentialExecutionOperationListOfFunctionsArgument=Mo,d.sequentialExecutionOperationListOfFunctionsArgumentDatatype=Jp,d.sequentialExecutionOperationListOfFunctionsArgumentParentRef=Yp,d.sequentialExecutionOperationListOfFunctionsArgumentRef=qp,d.sequentialExecutionOperationListOfFunctionsBlueprint=kp,d.softDeletePersistedEntityMethod=Df,d.softDeletePersistedEntityMethodParentRef=Pf,d.sortCallsBasedOnExecutionDependencies=Tg,d.sortChildrenEntitiesBasedOnExecutionDependencies=j9,d.splitListOperation=So,d.splitListOperationError=zu,d.splitListOperationErrorParentRef=Yu,d.splitListOperationFirstOutputListDataType=Gu,d.splitListOperationFirstOutputListReturn=qu,d.splitListOperationFirstOutputListReturnParentRef=ku,d.splitListOperationFirstOutputListReturnRef=Ao,d.splitListOperationInputListArgument=Uu,d.splitListOperationInputListArgumentParentRef=Fu,d.splitListOperationInputListArgumentRef=Nu,d.splitListOperationInputListDataType=$u,d.splitListOperationSecondOutputListDataType=Ju,d.splitListOperationSecondOutputListReturn=Hu,d.splitListOperationSecondOutputListReturnParentRef=Wu,d.splitListOperationSplitIndexArgument=ju,d.splitListOperationSplitIndexArgumentParentRef=xu,d.splitListOperationSplitIndexArgumentRef=Vu,d.splitListOperationSplitIndexDataType=Lu,d.stringPrototype=F,d.stringValueAutogenerationSchema=Yl,d.suggestNewIdForEntity=ld,d.test_primitive_entities_export=m3,d.toCamelCase=M6,d.toEntityState=Mt,d.toKebabCase=Wv,d.toLowerCaseKebabCase=Xs,d.toPascalCase=N6,d.untypedObjectPrototype=Xe,d.updateErrorsList=X,d.updateValueReader=ha,d.urlDefaultValue=Dy,d.uuidPrototype=ma,d.validateArgumentDeclarationName=sd,d.validateCalledByErrorIdInAction=M9,d.validateCalledByIdInAction=_9,d.validateCallers=cg,d.validateConditionEntityDeclaration=V9,d.validateCustomEntityName=Ks,d.validateDataOperation=jn,d.validateDataOperationDataToValidateArgument=hy,d.validateDataOperationDataToValidateArgumentParentRef=yy,d.validateDataOperationDataToValidateArgumentRef=uy,d.validateDataOperationDataToValidateDataType=py,d.validateDataOperationEntityToMatchTypeArgument=Ey,d.validateDataOperationEntityToMatchTypeArgumentParentRef=Ty,d.validateDataOperationEntityToMatchTypeArgumentRef=fy,d.validateDataOperationEntityToMatchTypeDataType=my,d.validateDataOperationError=gy,d.validateDataOperationErrorParentRef=vy,d.validateDataOperationOutputEntityDeclaration=by,d.validateDataOperationOutputEntityDeclarationParentRef=Ry,d.validateEntryCaller=lg,d.validateErrorCaller=og,d.validateFunctionCallDeclaration=ug,d.validateFunctionDeclarationName=rd,d.validateGeneratedEntityParentIsNotBuiltInEntity=O9,d.validateGeneration=A9,d.validateGenerationTarget=Pe,d.validateGenerationUpdate=S9,d.validateLoopEntityDeclaration=L9,d.validateName=V6,d.validateOperationEntityDeclaration=pg,d.validatePropertyName=ad,d.validateReachability=mn,d.validateReadsValueInActionPayload=N9,d.validateReferenceObject=to,d.validateReferenceToOne=pd,d.validateReferences=Ge,d.validateReturnDeclarationName=od,d.validateSuccessCaller=sg,d.validateValueReaderGenerationUpdate=ua,d.validateValueWritter=Ed,d.validateVariableDeclarationName=id,d.validateVariableInternalCallUse=Rd,d.valueAutogenerationCurrentDateAndTimeSchema=nb,d.valueAutogenerationGenericSchema=bs,d.valueAutogenerationOptions=Xl,d.valueAutogenerationOptionsSchema=tb,d.valueAutogenerationRandomBooleanSchema=Hl,d.valueAutogenerationRandomDateBetweenSchema=ub,d.valueAutogenerationRandomDateFromSchema=cb,d.valueAutogenerationRandomDateSchema=Is,d.valueAutogenerationRandomDateUntilSchema=db,d.valueAutogenerationRandomNumberBetweenSchema=ab,d.valueAutogenerationRandomNumberFromSchema=rb,d.valueAutogenerationRandomNumberSchema=vs,d.valueAutogenerationRandomNumberUntilSchema=ib,d.valueAutogenerationRandomSchema=Hi,d.valueAutogenerationRandomTextBetweenSchema=lb,d.valueAutogenerationRandomTextFromSchema=sb,d.valueAutogenerationRandomTextSchema=gs,d.valueAutogenerationRandomTextUntilSchema=ob,d.valueAutogenerationRangeValueTypesSchema=Wi,d.valueAutogenerationUniqueSchema=Wl,d.waitOperation=ot,d.waitOperationMillisecondsNumberArgument=xn,d.waitOperationMillisecondsNumberArgumentRef=Vp,d.waitOperationMillisecondsNumberDataType=Lp,d.waitOperationOperationError=Up,d.waitOperationOperationErrorParentRef=Fp,d.waitOperationRef=Gp,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
375
+ Alternatively you can update the parent data-type entity with 'update' action to remove the existing value of the field.`,issue:null}))}return{errors:a,modifiedData:i}}get extendedProperties(){return S(this.extends.reduce((e,t)=>[...[...t.properties,...t.extendedProperties].filter(a=>!a.abstract),...e],[]))}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:f.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated. The 'parent' on an '${this.type}', must be the root project as it is a globally declared entity.`,issue:null})),{errors:t,modifiedData:e}}addSelfToProject(){if(this.parent.type===r.DataType){const e=this.parent;e.entity=this}else this.project.addCustomEntity(this);return this}setParent(e){return this.parent=e,this}removeProperty(e){return this.properties=this.properties.filter(t=>t.id!==e.id),this}addMethod(e){return this.methods.includes(e)||(this.methods.push(e),this.suggestedMethods=this.suggestedMethods.filter(t=>t.name!==e.name)),this}removeMethod(e){return this.methods=this.methods.filter(t=>t.id!==e.id),this}addProperty(e){return this.properties.includes(e)||(this.properties.push(e),this.suggestedProperties=this.suggestedProperties.filter(t=>t.name!==e.name)),this}addSuggestedProperty(e){return this.suggestedProperties.includes(e)||this.suggestedProperties.push(e),this}addSuggestedMethod(e){return this.suggestedMethods.includes(e)||this.suggestedMethods.push(e),this}removeSuggestedProperty(e){return this.suggestedProperties=this.suggestedProperties.filter(t=>t.id!==e.id),this}removeSuggestedMethod(e){return this.suggestedMethods=this.suggestedMethods.filter(t=>t.id!==e.id),this}addAbstractMethod(e){return this.abstractMethods.includes(e)||this.abstractMethods.push(e),this}removeAbstractMethod(e){return this.abstractMethods=this.abstractMethods.filter(t=>t.id!==e.id),this}initChildren(){return this.initialized?this:(this.initialized=!0,this.properties=this.initialData.properties.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.methods=this.initialData.methods.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.abstractMethods=this.initialData.abstractMethods.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.extends=this.initialData.extends.map(e=>R(e,this.project)),this.implements=this.initialData.implements.map(e=>R(e,this.project)),this.addSuggestions(),this)}addSuggestions(){return this.implements.forEach(e=>{Gx(this,e).forEach(a=>{const s=a.toJSON();s.id=`_suggestion--parent--${this.id}--${a.id}`;const o=R(s,this.project);o.suggestion=!0,o.setParent(this),o.initChildren(),this.addSuggestedProperty(o)}),Fx(this,e).forEach(a=>{const s=`_suggestion--parent--${this.id}--${a.id}`,o=a.implementAsFunctionDeclaration(s),u=R(o,this.project);if(u.suggestion=!0,u.setParent(this),u.initChildren(),u.inputs.forEach(p=>{p.suggestion=!0}),u.returnStatements.length){const p=u.returnStatements[0];p.suggestion=!0,p.outputs.forEach(h=>{h.suggestion=!0})}this.addSuggestedMethod(u)})}),this}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.name=e.name||this.name,this.x=e.x||this.x,this.y=e.y||this.y,this.static=e.static||this.static,this.abstract=e.abstract||this.abstract,this}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],a=[];return t.has(this.id)?{affected:[],removed:[]}:(t.add(this.id),a.push(this),this.unsubscribe(),this.properties.forEach(s=>{const{affected:o,removed:u}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...u)}),this.methods.forEach(s=>{const{affected:o,removed:u}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...u)}),this.abstractMethods.forEach(s=>{const{affected:o,removed:u}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...u)}),this.suggestedProperties.forEach(s=>{const{affected:o,removed:u}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...u)}),this.suggestedMethods.forEach(s=>{const{affected:o,removed:u}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...u)}),{affected:S(i),removed:S(a)})}restore({seenEntities:e}={seenEntities:new Set}){const t=[];return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),this.properties.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.methods.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.abstractMethods.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.suggestedProperties.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.suggestedMethods.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),{affected:S(t),self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.extends.flatMap(i=>i.toFlat(e)),...this.implements.flatMap(i=>i.toFlat(e)),...this.properties.flatMap(i=>i.toFlat(e)),...this.methods.flatMap(i=>i.toFlat(e)),...this.abstractMethods.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.extends.flatMap(i=>i.toFlatIds(e)),...this.implements.flatMap(i=>i.toFlatIds(e)),...this.properties.flatMap(i=>i.toFlatIds(e)),...this.methods.flatMap(i=>i.toFlatIds(e)),...this.abstractMethods.flatMap(i=>i.toFlatIds(e))])}toJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,x:this.x,y:this.y,static:this.static,abstract:this.abstract,properties:this.properties.map(e=>e.toJSON()),methods:this.methods.map(e=>e.toJSON()),abstractMethods:this.abstractMethods.map(e=>e.toJSON()),implements:this.implements.map(e=>e.toJSON()),extends:this.extends.map(e=>e.toJSON()),parent:this.parent.toReference()}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,name:this.name,description:this.description,type:this.type,x:this.x,y:this.y,static:this.static,abstract:this.abstract,properties:this.properties.map(e=>e.toReference()),methods:this.methods.map(e=>e.toReference()),abstractMethods:this.abstractMethods.map(e=>e.toReference()),implements:this.implements.map(e=>e.toReference()),extends:this.extends.map(e=>e.toReference()),parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(i=>i.toFlatJSON(e)),...this.methods.flatMap(i=>i.toFlatJSON(e)),...this.abstractMethods.flatMap(i=>i.toFlatJSON(e)),...this.implements.flatMap(i=>i.toFlatJSON(e)),...this.extends.flatMap(i=>i.toFlatJSON(e))])}toGenerationTarget(){const e=this.parent.type===r.Project?void 0:this.parent.id;return{id:this.id,name:this.name,description:this.description,type:this.type,static:this.static,abstract:this.abstract,extends:this.extends.map(t=>t.id),implements:this.implements.map(t=>t.id),parent:e}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(i=>i.toFlatGenerationTarget(e)),...this.methods.flatMap(i=>i.toFlatGenerationTarget(e)),...this.abstractMethods.flatMap(i=>i.toFlatGenerationTarget(e)),...this.implements.filter(i=>i.type===r.CustomEntity).flatMap(i=>i.toFlatGenerationTarget(e)),...this.implements.filter(i=>i.type===r.CustomEntity).flatMap(i=>i.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.properties.forEach(e=>e.clearErrors()),this.methods.forEach(e=>e.clearErrors()),this.abstractMethods.forEach(e=>e.clearErrors()),this}validate(){return this.errors=Lx(this),{success:!0,error:null,data:null}}getErrors(){return[...this.errors,...this.properties.flatMap(t=>t.getErrors()),...this.methods.flatMap(t=>t.getErrors()),...this.abstractMethods.flatMap(t=>t.getErrors())]}getShallowErrors(){return this.errors}clone(){return new pe(this.toJSON(),this.project)}getFunctionDeclaration(e){return this.methods.find(t=>t.id===e)}implement(e,t){return lo(this,e,t)}};l(pe,"MUTABLE_BASE_PROPERTIES",["name","description","static","abstract"]),l(pe,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),l(pe,"BASE_PROPERTIES",[...pe.MUTABLE_BASE_PROPERTIES,...pe.INMUTABLE_BASE_PROPERTIES]),l(pe,"MUTABLE_META_PROPERTIES",[...pe.MUTABLE_BASE_PROPERTIES,"x","y"]),l(pe,"INMUTABLE_META_PROPERTIES",[...pe.INMUTABLE_BASE_PROPERTIES]),l(pe,"META_PROPERTIES",[...pe.MUTABLE_META_PROPERTIES,...pe.INMUTABLE_META_PROPERTIES]),l(pe,"MUTABLE_UPSTREAM_PROPERTIES",["extends","implements"]),l(pe,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),l(pe,"UPSTREAM_PROPERTIES",[...pe.MUTABLE_UPSTREAM_PROPERTIES,...pe.INMUTABLE_UPSTREAM_PROPERTIES]),l(pe,"MUTABLE_DOWNSTREAM_PROPERTIES",["properties","methods","abstractMethods"]),l(pe,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(pe,"DOWNSTREAM_PROPERTIES",[...pe.MUTABLE_DOWNSTREAM_PROPERTIES,...pe.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(pe,"PROPERTIES",[...pe.META_PROPERTIES,...pe.UPSTREAM_PROPERTIES,...pe.DOWNSTREAM_PROPERTIES]);let Pr=pe;function r3(n){const e=a4(),t=n.toJSON();e.safeParse(t).success;const a=[];return X(n.errors,a)}class Nt{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"type",r.PrimitiveEntity);l(this,"static");l(this,"abstract");l(this,"properties",[]);l(this,"methods",[]);l(this,"abstractMethods",[]);l(this,"extends",[]);l(this,"errors",[]);l(this,"project");this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.name=e.name,this.static=e.static,this.abstract=e.abstract,this.properties=this.initialData.properties.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(i=>{const a=R(i,this.project);return a.parent=this,a}),this.abstractMethods=this.initialData.abstractMethods.map(i=>{const a=R(i,this.project);return a.parent=this,a})}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}async load(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){return{affected:[],removed:[]}}restore({seenEntities:e}={seenEntities:new Set}){return{affected:[],self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.properties.flatMap(i=>i.toFlat(e)),...this.methods.flatMap(i=>i.toFlat(e)),...this.abstractMethods.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.properties.flatMap(i=>i.toFlatIds(e)),...this.methods.flatMap(i=>i.toFlatIds(e)),...this.abstractMethods.flatMap(i=>i.toFlatIds(e))])}toJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,properties:this.properties.map(e=>e.toJSON()),methods:this.methods.map(e=>e.toJSON()),abstractMethods:this.abstractMethods.map(e=>e.toJSON()),extends:this.extends.map(e=>e.toJSON())}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,properties:this.properties.map(e=>e.toReference()),methods:this.methods.map(e=>e.toReference()),abstractMethods:this.abstractMethods.map(e=>e.toReference()),extends:this.extends.map(e=>e.toReference())}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(i=>i.toFlatJSON(e)),...this.methods.flatMap(i=>i.toFlatJSON(e)),...this.abstractMethods.flatMap(i=>i.toFlatJSON(e))])}toGenerationTarget(){return{id:this.id,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,extends:this.extends.map(e=>e.id)}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(i=>i.toFlatGenerationTarget(e)),...this.methods.flatMap(i=>i.toFlatGenerationTarget(e)),...this.abstractMethods.flatMap(i=>i.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.properties.forEach(e=>e.clearErrors()),this.methods.forEach(e=>e.clearErrors()),this.abstractMethods.forEach(e=>e.clearErrors()),this}validate(){const e=r3(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.properties.flatMap(t=>t.getErrors()),...this.methods.flatMap(t=>t.getErrors()),...this.abstractMethods.flatMap(t=>t.getErrors())]}getShallowErrors(){return this.errors}clone(){return new Nt(this.toJSON(),this.project)}}function i3(n){const e=h4(),t=n.toJSON();e.safeParse(t).success;const a=[];return X(n.errors,a)}class Ut{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"type",r.BuiltInBaseEntity);l(this,"abstract",!1);l(this,"static");l(this,"properties",[]);l(this,"methods",[]);l(this,"abstractMethods",[]);l(this,"extends",[]);l(this,"interactive",!1);l(this,"errors",[]);l(this,"project");this.initialData=this.initialData||e,this.project=this.project||t,this.id=this.id||e.id,this.version=this.version||e.version,this.name=this.name||e.name,this.static=this.static||e.static,this.interactive=this.interactive||e.interactive,this.abstract=e.abstract,this.properties=this.initialData.properties.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.abstractMethods=this.initialData.abstractMethods.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.extends=this.initialData.extends.map(i=>R(i,this.project))}get extendedProperties(){return S(this.extends.reduce((e,t)=>{if(t instanceof Ut){const i=[...t.properties,...t.extendedProperties].filter(a=>!a.abstract);e.push(...i)}return e},[]))}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}async load(){return this}remove(e={ignoreUpstream:!1,seenEntities:new Set}){return{affected:[],removed:[]}}restore({seenEntities:e}={seenEntities:new Set}){return{affected:[],self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.properties.flatMap(i=>i.toFlat(e)),...this.methods.flatMap(i=>i.toFlat(e)),...this.abstractMethods.flatMap(i=>i.toFlat(e)),...this.extends.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.properties.flatMap(i=>i.toFlatIds(e)),...this.methods.flatMap(i=>i.toFlatIds(e)),...this.abstractMethods.flatMap(i=>i.toFlatIds(e)),...this.extends.flatMap(i=>i.toFlatIds(e))])}toJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,interactive:this.interactive,properties:this.properties.map(e=>e.toJSON()),methods:this.methods.map(e=>e.toJSON()),abstractMethods:this.abstractMethods.map(e=>e.toJSON()),extends:this.extends.map(e=>e.toJSON())}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,interactive:this.interactive,properties:this.properties.map(e=>e.toReference()),methods:this.methods.map(e=>e.toReference()),abstractMethods:this.abstractMethods.map(e=>e.toReference()),extends:this.extends.map(e=>e.toReference())}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(i=>i.toFlatJSON(e)),...this.methods.flatMap(i=>i.toFlatJSON(e)),...this.abstractMethods.flatMap(i=>i.toFlatJSON(e))])}toGenerationTarget(){return{id:this.id,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,interactive:this.interactive,extends:this.extends.map(e=>e.id)}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(i=>i.toFlatGenerationTarget(e)),...this.methods.flatMap(i=>i.toFlatGenerationTarget(e)),...this.abstractMethods.flatMap(i=>i.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.properties.forEach(e=>e.clearErrors()),this.methods.forEach(e=>e.clearErrors()),this.abstractMethods.forEach(e=>e.clearErrors()),this}validate(){const e=i3(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.properties.flatMap(t=>t.getErrors()),...this.methods.flatMap(t=>t.getErrors()),...this.abstractMethods.flatMap(t=>t.getErrors())]}getShallowErrors(){return this.errors}clone(){return new Ut(this.toJSON(),this.project)}implement(e,t){return lo(this,e,t)}}function fa(n,e){if(!n)throw new Error("Entity is null");const t=e.findSubscribedInstance(n);switch(n.type){case r.PrimitiveValue:return t||new ci(n,e);case r.CustomEntity:return t||new Pr(n,e);case r.PrimitiveEntity:return t||new Nt(n,e);case r.FunctionDeclaration:return t||new cr(n,e);case r.GlobalEvent:return t||new oi(n,e);case r.DataType:return t||new si(n,e);case r.Property:return t||new lr(n,e);case r.FunctionCall:return t||new br(n,e);case r.Condition:return t||new pr(n,e);case r.Operation:return t||new dr(n,e);case r.VariableDeclaration:return t||new yr(n,e);case r.VariableInstance:return t||new hr(n,e);case r.OutputMap:return t||new fn(n,e);case r.ReturnDeclaration:return t||new Ot(n,e);case r.ArgumentDeclaration:return t||new Tr(n,e);case r.InputMap:return t||new hn(n,e);case r.Project:return t||new $(n);case r.InstalledProject:return t||new mr(n,e);case r.ActionDescriptor:return t||new _e(n,e);case r.ReturnStatement:return t||new Er(n,e);case r.Loop:return t||new ur(n,e);case r.Search:return t||new fr(n,e);case r.ValueDescriptor:return t||new Rr(n,e);case r.BuiltInBaseEntity:return t||new Ut(n,e);case r.InternalCall:return t||new li(n,e);case r.ContinueStatement:return t||new yt(n,e);case r.BreakStatement:return t||new di(n,e);default:throw new Error("Invalid entity type: "+n.type)}}function R(n,e){if(!n)throw new Error("Entity is null");const t=fa(n,e);return t.subscribe(),t}function a3(n,e){if(!n)throw new Error("Entity is null");switch(n.type){case r.PrimitiveValue:return ci.fromGenerationTarget(n,e);case r.CustomEntity:return Pr.fromGenerationTarget(n,e);case r.FunctionDeclaration:return cr.fromGenerationTarget(n,e);case r.GlobalEvent:return oi.fromGenerationTarget(n,e);case r.DataType:return si.fromGenerationTarget(n,e);case r.Property:return lr.fromGenerationTarget(n,e);case r.FunctionCall:return br.fromGenerationTarget(n,e);case r.Condition:return pr.fromGenerationTarget(n,e);case r.Operation:return dr.fromGenerationTarget(n,e);case r.VariableDeclaration:return yr.fromGenerationTarget(n,e);case r.VariableInstance:return hr.fromGenerationTarget(n,e);case r.OutputMap:return fn.fromGenerationTarget(n,e);case r.ReturnDeclaration:return Ot.fromGenerationTarget(n,e);case r.ArgumentDeclaration:return Tr.fromGenerationTarget(n,e);case r.InputMap:return hn.fromGenerationTarget(n,e);case r.InstalledProject:return mr.fromGenerationTarget(n,e);case r.ReturnStatement:return Er.fromGenerationTarget(n,e);case r.Loop:return ur.fromGenerationTarget(n,e);case r.Search:return fr.fromGenerationTarget(n,e);case r.ActionDescriptor:return _e.fromGenerationTarget(n,e);case r.ValueDescriptor:return Rr.fromGenerationTarget(n,e);case r.InternalCall:return li.fromGenerationTarget(n,e);case r.ContinueStatement:return yt.fromGenerationTarget(n,e);case r.BreakStatement:return di.fromGenerationTarget(n,e);default:throw new Error("Invalid entity type: "+n.type)}}const z=class z{constructor(e){l(this,"initialData");l(this,"id");l(this,"version");l(this,"type",r.Project);l(this,"name",null);l(this,"description",null);l(this,"x");l(this,"y");l(this,"entities",[]);l(this,"projects",[]);l(this,"functions",[]);l(this,"events",[]);l(this,"variableDeclarations",[]);l(this,"variableInstances",[]);l(this,"conditions",[]);l(this,"operations",[]);l(this,"functionCalls",[]);l(this,"loops",[]);l(this,"searches",[]);l(this,"primitives",[]);l(this,"builtInBaseEntities",[]);l(this,"operationDeclarations",[]);l(this,"globalEventActionDescriptors",[]);l(this,"loopDeclarations",[]);l(this,"conditionDeclarations",[]);l(this,"valueDescriptors",[]);l(this,"dataTypes",[]);l(this,"project");l(this,"instances",{});l(this,"builtInInstances",{});l(this,"errors",[]);l(this,"references",[]);this.initialData=e,this.id=e.id,this.version=e.version,this.name=e.name,this.description=e.description,this.x=0,this.y=0;try{z.UUID=Cn==null?void 0:Cn()}catch(t){console.error("Error initializing UUID module",t),z.UUID={uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:i=>i}}}static injectUUIDModule(e){z.UUID=e}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[];return a.push(...Pe(i)),{errors:a,modifiedData:i}}async inject(...e){return await Promise.all(e.map(t=>new Promise(async i=>{await t.init(this),i(null)}))),this}validateGeneratedUpdate(e){return{errors:[],modifiedData:e}}addSelfToProject(){return this}get instancesList(){return Object.values(this.instances)}isOperationDeclaration(e){return this.operationDeclarations.includes(e)}isGlobalEventActionDescriptor(e){return this.globalEventActionDescriptors.includes(e)}isLoopDeclaration(e){return this.loopDeclarations.includes(e)}isConditionDeclaration(e){return this.conditionDeclarations.includes(e)}initChildren(){return this.entities=this.initialData.entities.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.projects=this.initialData.projects.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.functions=this.initialData.functions.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.events=this.initialData.events.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.variableDeclarations=this.initialData.variableDeclarations.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.variableInstances=this.initialData.variableInstances.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.conditions=this.initialData.conditions.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.operations=this.initialData.operations.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.functionCalls=this.initialData.functionCalls.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.loops=this.initialData.loops.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.searches=this.initialData.searches.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.attachOrphanReferences(),this.validate(),this}subscribeInstance(e){return(!this.instances[e.id]||this.instances[e.id]!==e)&&(this.instances[e.id]=e),this}subscribeBuiltInInstance(e){return(!this.builtInInstances[e.id]||this.builtInInstances[e.id]!==e)&&(this.builtInInstances[e.id]=e),this}subscribe(){return this}unsubscribe(){return this}unsubscribeInstance(e){return delete this.instances[e.id],this}findSubscribedInstance(e){return this.instances[e.id]||null}findSubscribedBuiltInInstance(e){return this.builtInInstances[e.id]||null}get(e){return this.instances[e]||this.builtInInstances[e]||null}getManaged(e){return this.instances[e]||null}getBuiltIn(e){return this.builtInInstances[e]||null}findSubscribedInstanceFromReference(e){return this.instances[e.entityId]||null}findSubscribedBuiltInInstanceFromReference(e){return this.builtInInstances[e.entityId]||null}sync(e){return this.version=e.version||this.version,this.name=e.name||this.name,this.description=e.description||this.description,this.x=e.x||this.x,this.y=e.y||this.y,this}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e}={ignoreUpstream:!1}){return{affected:[],removed:[]}}restore({seenEntities:e}={seenEntities:new Set}){return{affected:[],self:this}}getAllBuiltInIds(){const e=new Set;return[...this.primitives.flatMap(t=>t.toFlatIds(e)),...this.builtInBaseEntities.flatMap(t=>t.toFlatIds(e)),...this.operationDeclarations.flatMap(t=>t.toFlatIds(e)),...this.globalEventActionDescriptors.flatMap(t=>t.toFlatIds(e)),...this.loopDeclarations.flatMap(t=>t.toFlatIds(e)),...this.conditionDeclarations.flatMap(t=>t.toFlatIds(e)),...this.valueDescriptors.flatMap(t=>t.toFlatIds(e)),...this.dataTypes.flatMap(t=>t.toFlatIds(e))]}getAllBuiltIn(){const e=new Set;return[...this.primitives.flatMap(t=>t.toFlat(e)),...this.builtInBaseEntities.flatMap(t=>t.toFlat(e)),...this.operationDeclarations.flatMap(t=>t.toFlat(e)),...this.globalEventActionDescriptors.flatMap(t=>t.toFlat(e)),...this.loopDeclarations.flatMap(t=>t.toFlat(e)),...this.conditionDeclarations.flatMap(t=>t.toFlat(e)),...this.valueDescriptors.flatMap(t=>t.toFlat(e)),...this.dataTypes.flatMap(t=>t.toFlat(e))]}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[...this.entities.flatMap(i=>i.toFlat(e)),...this.functions.flatMap(i=>i.toFlat(e)),...this.events.flatMap(i=>i.toFlat(e)),...this.projects.flatMap(i=>i.toFlat(e)),...this.variableDeclarations.flatMap(i=>i.toFlat(e)),...this.variableInstances.flatMap(i=>i.toFlat(e)),...this.conditions.flatMap(i=>i.toFlat(e)),...this.operations.flatMap(i=>i.toFlat(e)),...this.functionCalls.flatMap(i=>i.toFlat(e)),...this.loops.flatMap(i=>i.toFlat(e)),...this.searches.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),Array.from(e))}toJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,entities:this.entities.map(e=>e.toJSON()),functions:this.functions.map(e=>e.toJSON()),events:this.events.map(e=>e.toJSON()),projects:this.projects.map(e=>e.toJSON()),variableDeclarations:this.variableDeclarations.map(e=>e.toJSON()),variableInstances:this.variableInstances.map(e=>e.toJSON()),conditions:this.conditions.map(e=>e.toJSON()),operations:this.operations.map(e=>e.toJSON()),functionCalls:this.functionCalls.map(e=>e.toJSON()),loops:this.loops.map(e=>e.toJSON()),searches:this.searches.map(e=>e.toJSON())}}toReference(){return{id:this.id+"--"+z.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,entities:this.entities.map(e=>e.toReference()),functions:this.functions.map(e=>e.toReference()),events:this.events.map(e=>e.toReference()),projects:this.projects.map(e=>e.toReference()),variableDeclarations:this.variableDeclarations.map(e=>e.toReference()),variableInstances:this.variableInstances.map(e=>e.toReference()),conditions:this.conditions.map(e=>e.toReference()),operations:this.operations.map(e=>e.toReference()),functionCalls:this.functionCalls.map(e=>e.toReference()),loops:this.loops.map(e=>e.toReference()),searches:this.searches.map(e=>e.toReference())}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[...this.entities.flatMap(i=>i.toFlatJSON(e)),...this.functions.flatMap(i=>i.toFlatJSON(e)),...this.events.flatMap(i=>i.toFlatJSON(e)),...this.projects.flatMap(i=>i.toFlatJSON(e)),...this.variableDeclarations.flatMap(i=>i.toFlatJSON(e)),...this.variableInstances.flatMap(i=>i.toFlatJSON(e)),...this.conditions.flatMap(i=>i.toFlatJSON(e)),...this.operations.flatMap(i=>i.toFlatJSON(e)),...this.functionCalls.flatMap(i=>i.toFlatJSON(e)),...this.loops.flatMap(i=>i.toFlatJSON(e)),...this.searches.flatMap(i=>i.toFlatJSON(e))])}toGenerationTarget(){return{id:this.id,type:this.type,name:this.name,description:this.description}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[...this.entities.flatMap(i=>i.toFlatGenerationTarget(e)),...this.functions.flatMap(i=>i.toFlatGenerationTarget(e)),...this.events.flatMap(i=>i.toFlatGenerationTarget(e)),...this.projects.flatMap(i=>i.toFlatGenerationTarget(e)),...this.variableDeclarations.flatMap(i=>i.toFlatGenerationTarget(e)),...this.variableInstances.flatMap(i=>i.toFlatGenerationTarget(e)),...this.conditions.flatMap(i=>i.toFlatGenerationTarget(e)),...this.operations.flatMap(i=>i.toFlatGenerationTarget(e)),...this.functionCalls.flatMap(i=>i.toFlatGenerationTarget(e)),...this.loops.flatMap(i=>i.toFlatGenerationTarget(e)),...this.searches.flatMap(i=>i.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.entities.forEach(e=>e.clearErrors()),this.projects.forEach(e=>e.clearErrors()),this.functions.forEach(e=>e.clearErrors()),this.events.forEach(e=>e.clearErrors()),this.variableDeclarations.forEach(e=>e.clearErrors()),this.variableInstances.forEach(e=>e.clearErrors()),this.conditions.forEach(e=>e.clearErrors()),this.operations.forEach(e=>e.clearErrors()),this.functionCalls.forEach(e=>e.clearErrors()),this.loops.forEach(e=>e.clearErrors()),this.searches.forEach(e=>e.clearErrors()),this}validate(){const e=wx(),t=this.toJSON();return e.safeParse(t),this.validateChildren(),{success:!0,error:null,data:t}}validateChildren(){this.entities.forEach(e=>e.validate()),this.projects.forEach(e=>e.validate()),this.functions.forEach(e=>e.validate()),this.events.forEach(e=>e.validate()),this.variableDeclarations.forEach(e=>e.validate()),this.variableInstances.forEach(e=>e.validate()),this.conditions.forEach(e=>e.validate()),this.operations.forEach(e=>e.validate()),this.functionCalls.forEach(e=>e.validate()),this.loops.forEach(e=>e.validate()),this.searches.forEach(e=>e.validate())}getErrors(){return[...this.errors,...this.entities.flatMap(t=>t.getErrors()),...this.projects.flatMap(t=>t.getErrors()),...this.functions.flatMap(t=>t.getErrors()),...this.events.flatMap(t=>t.getErrors()),...this.variableDeclarations.flatMap(t=>t.getErrors()),...this.variableInstances.flatMap(t=>t.getErrors()),...this.conditions.flatMap(t=>t.getErrors()),...this.operations.flatMap(t=>t.getErrors()),...this.functionCalls.flatMap(t=>t.getErrors()),...this.loops.flatMap(t=>t.getErrors()),...this.searches.flatMap(t=>t.getErrors())]}getShallowErrors(){return this.errors}clone(){return new z(this.toJSON())}getCustomEntity(e){return this.entities.find(t=>t.id===e)||null}addCustomEntityFromTransfer(e){const t=R(e,this);return this.addCustomEntity(t),t}addCustomEntity(e){return this.entities.includes(e)||this.entities.push(e),e}addFunctionDeclarationFromTransfer(e){const t=R(e,this);return this.addFunctionDeclaration(t),t}addFunctionDeclaration(e){return this.functions.includes(e)||this.functions.push(e),e}addFunctionCallFromTransfer(e){const t=R(e,this);return this.addFunctionCall(t),t}addFunctionCall(e){return this.functionCalls.includes(e)||this.functionCalls.push(e),e}addVariableDeclarationFromTransfer(e){const t=R(e,this);return this.addVariableDeclaration(t),t}addVariableDeclaration(e){return this.variableDeclarations.includes(e)||this.variableDeclarations.push(e),e}addVariableInstanceFromTransfer(e){const t=R(e,this);return this.addVariableInstance(t),t}addVariableInstance(e){return this.variableInstances.includes(e)||this.variableInstances.push(e),e}addInstalledProjectFromTransfer(e){const t=R(e,this);return this.addInstalledProject(t),this}addInstalledProject(e){return this.projects.includes(e)||this.projects.push(e),this}addGlobalEventFromTransfer(e){const t=R(e,this);return this.addGlobalEvent(t),this}addGlobalEvent(e){return this.events.includes(e)||this.events.push(e),this}addConditionFromTransfer(e){const t=R(e,this);return this.addCondition(t),this}addCondition(e){return this.conditions.includes(e)||this.conditions.push(e),this}addOperationFromTransfer(e){const t=R(e,this);return this.addOperation(t),this}addOperation(e){return this.operations.includes(e)||this.operations.push(e),this}addLoopFromTransfer(e){const t=R(e,this);return this.addLoop(t),this}addLoop(e){return this.loops.includes(e)||this.loops.push(e),this}addSearchFromTransfer(e){const t=R(e,this);return this.addSearch(t),this}addSearch(e){return this.searches.includes(e)||this.searches.push(e),this}removeCustomEntity(e){const t=this.entities.findIndex(i=>i.id===e.id);if(t>-1){const i=this.entities[t];return this.entities.splice(t,1),i}return null}removeFunctionDeclaration(e){const t=this.functions.findIndex(i=>i.id===e.id);if(t>-1){const i=this.functions[t];return this.functions.splice(t,1),i}return null}removeExternalProject(e){const t=this.projects.findIndex(i=>i.id===e.id);if(t>-1){const i=this.projects[t];return this.projects.splice(t,1),i}return null}removeGlobalEvent(e){const t=this.events.findIndex(i=>i.id===e.id);if(t>-1){const i=this.events[t];return this.events.splice(t,1),i}return null}removeTopLevelVariableDeclaration(e){if(e.type!==r.VariableDeclaration)return null;const t=this.variableDeclarations.findIndex(i=>i.id===e.id);if(t>-1){const i=this.variableDeclarations[t];return this.variableDeclarations.splice(t,1),i}return null}getEntryPoints(){return[...this.functions,...this.events,...this.entities.flatMap(t=>t.methods)]}getFunctionDeclaration(e){return this.functions.find(t=>t.id===e)||null}getConditions(){return[...this.conditions,...this.getEntryPoints().reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.Condition)]},[]),...this.functionCalls.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.Condition)]},[]),...this.operations.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.Condition)]},[]),...this.loops.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.Condition)]},[]),...this.searches.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.Condition)]},[])]}getOperations(){return[...this.operations,...this.getEntryPoints().reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.Operation)]},[]),...this.functionCalls.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.Operation)]},[]),...this.conditions.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.Operation)]},[]),...this.loops.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.Operation)]},[]),...this.searches.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.Operation)]},[])]}getFunctionCalls(){return[...this.functionCalls,...this.getEntryPoints().reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.FunctionCall)]},[]),...this.conditions.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.FunctionCall)]},[]),...this.operations.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.FunctionCall)]},[]),...this.loops.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.FunctionCall)]},[]),...this.searches.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===r.FunctionCall)]},[])]}getVariables(){return[...this.variableDeclarations,...this.getEntryPoints().reduce((t,i)=>{const a=Z(i);return[...t,...a]},[]),...this.functionCalls.reduce((t,i)=>{const a=Z(i);return[...t,...a]},[]),...this.conditions.reduce((t,i)=>{const a=Z(i);return[...t,...a]},[]),...this.operations.reduce((t,i)=>{const a=Z(i);return[...t,...a]},[]),...this.loops.reduce((t,i)=>{const a=Z(i);return[...t,...a]},[]),...this.searches.reduce((t,i)=>{const a=Z(i);return[...t,...a]},[])]}getVariableInstances(){return[...this.variableInstances,...this.getEntryPoints().reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[]),...this.functionCalls.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[]),...this.conditions.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[]),...this.operations.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[]),...this.loops.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[]),...this.searches.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[])]}getVariableDeclarations(){return S([...this.variableDeclarations,...this.getEntryPoints().reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[]),...this.functionCalls.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[]),...this.conditions.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[]),...this.operations.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[]),...this.loops.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[]),...this.searches.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[])])}attachOrphanReferences(){const e=this.getVariableInstances(),t=this.getVariableDeclarations();return e.forEach(i=>{if(!i.declaration){const a=i.initialData,s=a.declaration.entityId||a.declaration.id,o=t.find(u=>u.id===s);o&&i.setDeclaration(o)}}),this}getBuiltInPersistedEntity(){return this.builtInBaseEntities.find(e=>e.name===_.PERSISTED_ENTITY)||null}};l(z,"UUID",Cn==null?void 0:Cn()),l(z,"MUTABLE_BASE_PROPERTIES",["name","description"]),l(z,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),l(z,"BASE_PROPERTIES",[...z.MUTABLE_BASE_PROPERTIES,...z.INMUTABLE_BASE_PROPERTIES]),l(z,"MUTABLE_META_PROPERTIES",[...z.MUTABLE_BASE_PROPERTIES,"x","y"]),l(z,"INMUTABLE_META_PROPERTIES",[...z.INMUTABLE_BASE_PROPERTIES]),l(z,"META_PROPERTIES",[...z.MUTABLE_META_PROPERTIES,...z.INMUTABLE_META_PROPERTIES]),l(z,"MUTABLE_UPSTREAM_PROPERTIES",[]),l(z,"INMUTABLE_UPSTREAM_PROPERTIES",["primitives","builtInBaseEntities","operationDeclarations","globalEventActionDescriptors","loopDeclarations","builtInInstances"]),l(z,"UPSTREAM_PROPERTIES",[...z.MUTABLE_UPSTREAM_PROPERTIES,...z.INMUTABLE_UPSTREAM_PROPERTIES]),l(z,"MUTABLE_DOWNSTREAM_PROPERTIES",["entities","projects","functions","events","variableDeclarations","variableInstances","conditions","operations","functionCalls","loops","searches"]),l(z,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(z,"DOWNSTREAM_PROPERTIES",[...z.MUTABLE_DOWNSTREAM_PROPERTIES,...z.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(z,"PROPERTIES",[...z.META_PROPERTIES,...z.UPSTREAM_PROPERTIES,...z.DOWNSTREAM_PROPERTIES]);let $=z;class jg extends _e{constructor(t){super($t,t);l(this,"id",Ie.Parallel);l(this,"name",Ie.Parallel);l(this,"description","Execute a list of actions one after the other");l(this,"version",1);l(this,"autoexecutable",!0);l(this,"initialData",$t);l(this,"type",r.ActionDescriptor);l(this,"fixedArguments",[]);l(this,"fixedReturns",[]);l(this,"error",null);l(this,"dynamicArgumentTypes",null);l(this,"dynamicReturnTypes",null);l(this,"project");this.project=t,this.fixedArguments=$t.fixedArguments.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.fixedReturns=$t.fixedReturns.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.error=$t.error?R($t.error,this.project):null}}class kg extends _e{constructor(t){super(ot,t);l(this,"id",ot.id);l(this,"name",ot.name);l(this,"description",ot.description);l(this,"version",ot.version);l(this,"autoexecutable",!1);l(this,"initialData",ot);l(this,"type",r.ActionDescriptor);l(this,"fixedArguments",[]);l(this,"fixedReturns",[]);l(this,"error",null);l(this,"dynamicArgumentTypes",null);l(this,"dynamicReturnTypes",null);l(this,"project");this.project=t,this.fixedArguments=ot.fixedArguments.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.fixedReturns=ot.fixedReturns.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.error=ot.error?R(ot.error,this.project):null}}class qg extends _e{constructor(t){super(tn,t);l(this,"id",Ie.Sequential);l(this,"name",Ie.Sequential);l(this,"description","Execute a list of actions one after the other");l(this,"version",1);l(this,"autoexecutable",!0);l(this,"initialData",tn);l(this,"type",r.ActionDescriptor);l(this,"fixedArguments",[]);l(this,"fixedReturns",[]);l(this,"error",null);l(this,"dynamicArgumentTypes",null);l(this,"dynamicReturnTypes",null);l(this,"project");this.project=t,this.fixedArguments=tn.fixedArguments.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.fixedReturns=tn.fixedReturns.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.error=tn.error?R(tn.error,this.project):null}}function s3(n){const e=[new qg(n),new jg(n),new kg(n),new _e(fi,n),new _e(Cr,n),new _e(jn,n),new _e(ba,n),new _e(Do,n),new _e(Oo,n),new _e(So,n),new _e(Ta,n),new _e(yi,n)];return e.forEach(t=>{t.initChildren(),n.subscribeBuiltInInstance(t)}),n.operationDeclarations=e,e}class Jg extends Ut{constructor(t){super(Be,t);l(this,"initialData");l(this,"id",_.PERSISTED_ENTITY);l(this,"version",1);l(this,"name",_.PERSISTED_ENTITY);l(this,"description",Be.description);l(this,"type",r.BuiltInBaseEntity);l(this,"abstract",Be.abstract);l(this,"static",Be.static);l(this,"properties",[]);l(this,"methods",[]);l(this,"abstractMethods",[]);l(this,"extends",[]);l(this,"errors",[]);l(this,"project");this.initialData=Be,this.project=t,this.id=Be.id,this.version=Be.version,this.name=Be.name,this.static=Be.static,this.abstract=Be.abstract,this.properties=this.initialData.properties.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(i=>{const a=R(i,this.project);return a.parent=this,a}),this.abstractMethods=this.initialData.abstractMethods.map(i=>{const a=R(i,this.project);return a.parent=this,a}),this.extends=this.initialData.extends.map(i=>R(i,this.project))}}function o3(n){const e=[new Jg(n),new Ut(Oa,n),new Ut(bn,n),new Ut(Jo,n),new Ut(Sa,n)];return e.forEach(t=>{n.subscribeBuiltInInstance(t)}),n.builtInBaseEntities=e,e}function l3(n){const e=[new Nt(F,n),new Nt(Un,n),new Nt(Ce,n),new Nt(Xe,n),new Nt(Rn,n),new Nt(Or,n),new Nt(ma,n),new Nt(vo,n)];return e.forEach(t=>{n.subscribeBuiltInInstance(t)}),n.primitives=e,e}function c3(n){const e=[new _e(Ma,n)];return e.forEach(t=>{t.initChildren(),n.subscribeBuiltInInstance(t)}),n.globalEventActionDescriptors=e,e}function d3(n){const e=[new _e(kn,n),new _e(Fo,n)];return e.forEach(t=>{t.initChildren(),n.subscribeBuiltInInstance(t)}),n.loopDeclarations=e,e}function u3(n){const e=[new Rr(zo,n)];return e.forEach(t=>{t.initChildren(),n.subscribeBuiltInInstance(t)}),n.valueDescriptors=e,e}function p3(n){const e=[new _e(qn,n),new _e(wr,n)];return e.forEach(t=>{t.initChildren()}),n.conditionDeclarations=e,e}const Dr={},To={};async function y3(n,e={}){const t={...eb};return t.id=n.id,e.empty?{data:{id:n.id,type:r.Project,version:1,name:null,description:null,projects:[],entities:[],operations:[],functions:[],variableDeclarations:[],variableInstances:[],functionCalls:[],conditions:[],loops:[],searches:[],events:[]}}:{data:t}}function Wg(n){const e=new $(n);return l3(e),o3(e),s3(e),c3(e),d3(e),u3(e),p3(e),e.initChildren(),e}async function h3(n,e={}){try{if(n.id&&Dr[n.id])return Dr[n.id];if(n.id&&To[n.id])return await To[n.id],Dr[n.id];const t=y3(n,e);n.id&&(To[n.id]=t);const i=await t;if(i.data){const a=Wg(i.data);return Dr[n.id]=a,n.id&&delete To[n.id],a}return null}catch(t){return console.error("Error fetching project: ",t),null}}function f3(n){return Dr[n.id]&&delete Dr[n.id],null}const m3="test_primitive_entities_export";d.AI_VALUE_CONNECTION_GENERATION_ACTION_EXPLANATION=Td,d.ActionDescriptorState=_e,d.ActionDescriptorValuesType=L,d.ActionInputMapState=h9,d.ActionOutputMapState=T9,d.AppendToListOperationInputIds=lp,d.AppendToListOperationOutputIds=cp,d.ArgumentDeclarationState=Tr,d.BREAK_AND_CONTINUE_STATEMENTS_RETURN_DECLARATIONS_EXPLANATION=yd,d.BUILT_IN_BASE_ENTITY_IDS=Ve,d.BUILT_IN_ENTITY_TYPES=Sr,d.BaseCanvasDraggableState=Q6,d.BaseEntityNames=_,d.BaseState=X6,d.BaseValueDescriptorIds=$o,d.BreakStatementState=di,d.BuiltInBaseEntityState=Ut,d.CACHED_PROJECTS_BY_ID=Dr,d.CALLABLE_ENTITIES_EXPLANATION=C9,d.CALLABLE_TYPES=En,d.CALLER_ENTITIES_EXPLANATION=ig,d.CALLER_TYPES=en,d.CALLS_UPDATE_EXPLANATION=Vn,d.COMPARISON_CONDITIONS=am,d.CONDITIONS=gI,d.CUSTOM_ENTITY_OPERATIONS=Iy,d.CallableEntityClass=e9,d.CallerEntityClass=cd,d.ChildEntityState=K6,d.ComparisonOperatorTypes=Ae,d.ConditionState=pr,d.ContinueStatementState=yt,d.CreateNewInputIds=Kp,d.CreateNewOutputIds=ey,d.CustomEntityState=Pr,d.DRAGGABLE_CALLABLE_TYPES=Ro,d.DRAGGABLE_CALLER_TYPES=$d,d.DRAGGABLE_ELEMENT_TYPES=bo,d.DRAGGABLE_EXECUTABLE_TYPES=Xg,d.DRAGGABLE_PASS_THROUGH_CALLABLE_TYPES=Eo,d.DataTypeCompatibilityTypes=wt,d.DataTypeParentChildRelation=qe,d.DataTypeState=si,d.ENTITIES_WITH_VALLUES_EXPLANATION=ro,d.ENTITY_TYPES=Qg,d.ENTITY_WITH_LOGIC_SCOPE_TYPES=st,d.ENTITY_WITH_NAMES_TYPES=Vd,d.ENTITY_WITH_VALUE_TYPES=Nd,d.ENTRY_POINT_ENTITIES_EXPLANATION=da,d.ENTRY_POINT_TYPES=$e,d.EVENT_TYPES=Ar,d.EXECUTABLE_TYPES=Zg,d.EXECUTION_OPERATIONS=Qp,d.EntityError=Qn,d.EntityErrorSeverity=f,d.EntityGenerationError=E,d.EntityGenerationErrorCode=y,d.EntityInstanceErrorCode=O,d.EntityOperations=Ze,d.EntityType=r,d.EntityWithLogicScopeClass=i9,d.EntityWithValueClass=r9,d.EntryPointEntityClass=t9,d.ExecutionOperations=Ie,d.FunctionCallState=br,d.FunctionDeclarationState=cr,d.GLOBAL_EVENT_DECLARATIONS=II,d.GetLastInListOperationInputIds=Zu,d.GetLastInListOperationOutputIds=Xu,d.GlobalEventNames=Kt,d.GlobalEventState=oi,d.HTTPOperations=Ye,d.HTTP_OPERATIONS=rh,d.InputMapState=hn,d.InstalledProjectState=mr,d.InternalCallState=li,d.JoinListOperationInputIds=mu,d.JoinListOperationOutputIds=Tu,d.JoinStringOperationInputIds=nu,d.JoinStringOperationOutputIds=ru,d.LIST_OPERATIONS=gp,d.ListOperations=j,d.LoopState=ur,d.LoopTypes=je,d.NON_INTERACTIVE_BASE_ENTITIES_EXPLANATION=Ln,d.NUMBER_OPERATIONS=tu,d.NumberAdditionOperationInputIds=jd,d.NumberAdditionOperationOutputIds=kd,d.NumberOperations=at,d.OPERATION_DECLARATIONS=eI,d.OperationState=dr,d.OutputMapParentChildRelation=Md,d.OutputMapState=fn,d.PARENT_AUTO_CALCULATION_FROM_CALLER_EXPLANATION=io,d.PASS_THROUGH_CALLABLE_ENTITIES_EXPLANATION=$n,d.PASS_THROUGH_CALLABLE_TYPES=Ne,d.PROPERTY_NOT_VALUE_READER_WRITTER_EXPLANATION=md,d.ParallelExecutionOperation=jg,d.ParallelExecutionOperationInputIds=Ip,d.ParallelExecutionOperationOutputIds=Pp,d.PassThroughCallableEntityClass=n9,d.PersistedEntity=Jg,d.PersistedEntityMethods=gt,d.PrimitiveEntityState=Nt,d.PrimitiveTypes=g,d.PrimitiveValueState=ci,d.ProjectState=$,d.PropertyState=lr,d.RETURN_STATEMENT_RETURN_DECLARATIONS_EXPLANATION=B9,d.ReturnDeclarationState=Ot,d.ReturnStatementState=Er,d.STANDALONE_CONDITIONS=Kf,d.STRING_OPERATIONS=fu,d.ScopeCompatibilityType=mo,d.SearchState=fr,d.SequentialExecutionOperation=qg,d.SequentialExecutionOperationInputIds=xp,d.SequentialExecutionOperationOutputIds=jp,d.SharedEntityErrorCode=v,d.SharedStateFunctionality=tg,d.SplitListOperationInputIds=_u,d.SplitListOperationOutputIds=Mu,d.StandaloneOperatorTypes=Ct,d.StringOperations=ge,d.TERMINATION_TYPES=Oe,d.USER_MANAGED_ENTITY_TYPES=Kg,d.UserManagedEntityStateFunctionality=Z6,d.VALUE_READING_ENTITIES_EXPLANATION=fd,d.VALUE_READING_TYPES=Tn,d.VALUE_WRITING_ENTITIES_EXPLANATION=ag,d.VALUE_WRITING_TYPES=Se,d.VARIABLE_DATA_TYPE_INFERRANCE_EXPLANATION=hd,d.VARIABLE_TYPES=Fe,d.ValidationInputIds=cy,d.ValidationOutputIds=dy,d.ValueAutogenerationType=xe,d.ValueDescriptorParentChildRelation=C,d.ValueDescriptorState=Rr,d.ValueReadingEntityClass=la,d.ValueWritingEntityClass=ca,d.VariableDeclarationState=yr,d.VariableInputMapState=y9,d.VariableInstanceState=hr,d.VariableOutputMapState=m9,d.WaitOperation=kg,d.WaitOperationInputIds=Np,d.WaitOperationOutputIds=$p,d._VALUE_READING_TYPES=Yg,d._VALUE_WRITING_TYPES=zg,d.appendToListOperation=ba,d.appendToListOperationElementToAppendArgument=Bo,d.appendToListOperationElementToAppendArgumentParentRef=Tp,d.appendToListOperationElementToAppendArgumentRef=pp,d.appendToListOperationError=vp,d.appendToListOperationErrorParentRef=bp,d.appendToListOperationListArgument=Co,d.appendToListOperationListArgumentParentRef=mp,d.appendToListOperationListArgumentRef=dp,d.appendToListOperationListDataType=up,d.appendToListOperationResultListDataType=fp,d.appendToListOperationResultListReturn=Rp,d.appendToListOperationResultListReturnParentRef=Ep,d.appendToListOperationResultListReturnRef=hp,d.appendToListOperationSecondListDataType=yp,d.asGenerationActionExample=Qt,d.baseHttpRequestFunctionDeclaration=fi,d.baseHttpRequestFunctionDeclarationErrorValueDescriptor=Go,d.baseHttpRequestFunctionDeclarationErrorValueDescriptorDatatype=nh,d.baseHttpRequestFunctionDeclarationErrorValueDescriptorRef=th,d.baseHttpRequestFunctionDeclarationRef=Xy,d.baseHttpRequestFunctionDeclarationRefEight=Ky,d.baseHttpRequestFunctionDeclarationRefFive=zy,d.baseHttpRequestFunctionDeclarationRefFour=Yy,d.baseHttpRequestFunctionDeclarationRefNine=eh,d.baseHttpRequestFunctionDeclarationRefSeven=Qy,d.baseHttpRequestFunctionDeclarationRefSix=Zy,d.baseHttpRequestFunctionDeclarationRefThree=Hy,d.baseHttpRequestFunctionDeclarationRefTwo=Wy,d.booleanPrototype=Un,d.capitalizeFirstLetter=Hs,d.checkAreCustomEntitiesCompatibleAsDataType=Fv,d.checkAreDataTypesCompatible=Ys,d.checkArePropertiesCompatibleAsDataType=Gv,d.checkIsBranchDependentButNotDirectlyOnBranch=pa,d.checkIsBranchDependentOnBranch=F9,d.checkIsCallableEntityReachable=_d,d.checkIsCanvasEntity=e3,d.checkIsDetachedBranch=$g,d.checkIsDetachedBranchShallow=Bd,d.checkIsGlobalVariable=K9,d.checkIsGloballyDeclared=Cd,d.checkIsMethod=Gg,d.checkIsNestedScope=fo,d.checkScopeCompatibility=ya,d.createEntityError=k,d.createNewInstanceOperation=Cr,d.createNewInstanceOperationEntityToInstanciateArgument=iy,d.createNewInstanceOperationEntityToInstanciateArgumentRef=ty,d.createNewInstanceOperationEntityToInstanciateDataType=ny,d.createNewInstanceOperationError=ly,d.createNewInstanceOperationErrorParentRef=oy,d.createNewInstanceOperationOutputEntityDeclaration=sy,d.createNewInstanceOperationOutputEntityDeclarationParentRef=ay,d.createNewInstanceOperationRef=ry,d.createSemanticId=Xt,d.createStateFromGenerationTargetType=a3,d.createStateFromType=fa,d.createStateFromTypeAndSubscribe=R,d.cronJobBuiltInBaseEntity=Jo,d.cronJobBuiltInBaseEntityExpressionProperty=zf,d.cronJobBuiltInBaseEntityExpressionPropertyDataTypeRef=RI,d.cronJobBuiltInBaseEntityExpressionPropertyRef=Hf,d.cronJobBuiltInBaseEntityRef=Yf,d.cronJobTriggeredFunctionDeclarationBlueprint=qo,d.cronJobTriggeredFunctionDeclarationBlueprintParentRef=Jf,d.customEntityToZodSchema=Im,d.dataTypeCompatibilityToErrorExplanation=yg,d.datePrototype=Or,d.dateValueAutogenerationSchema=Zl,d.deletePersistedEntityMethod=ko,d.deletePersistedEntityMethodParentRef=If,d.deleteRootProject=f3,d.endpointBuiltInBaseEntity=Oa,d.endpointBuiltInBaseEntityRef=Ph,d.endpointBuiltInBaseEntityRefFour=yf,d.endpointBuiltInBaseEntityRefThree=Mh,d.endpointBuiltInBaseEntityRefTwo=Ch,d.endpointBuiltInCorsProperty=Dh,d.endpointBuiltInCorsPropertyDataType=Ih,d.endpointBuiltInCorsPropertyDataTypeRef=vh,d.endpointBuiltInCorsPropertyRef=gh,d.endpointBuiltInMethodProperty=xo,d.endpointBuiltInMethodPropertyDataType=_h,d.endpointBuiltInMethodPropertyDataTypeRef=Bh,d.endpointBuiltInMethodPropertyRef=wh,d.endpointBuiltInPathProperty=Uo,d.endpointBuiltInPathPropertyDataType=Oh,d.endpointBuiltInPathPropertyDataTypeRef=Ah,d.endpointBuiltInPathPropertyRef=Sh,d.endpointPathParamsArgumentDeclaration=Yh,d.endpointPathParamsArgumentDeclarationRef=kh,d.endpointPathParamsVariableDataType=qh,d.endpointPathParamsVariableDataTypeRef=jh,d.endpointReachedTriggerActionDescriptor=jo,d.endpointReachedTriggerActionDescriptorRef=Jh,d.endpointReachedTriggerActionDescriptorRefFour=Xh,d.endpointReachedTriggerActionDescriptorRefThree=zh,d.endpointReachedTriggerActionDescriptorRefTwo=Hh,d.endpointRequestBodyArgumentDeclaration=Qh,d.endpointRequestBodyArgumentDeclarationRef=Lh,d.endpointRequestBodyVariableDataType=Gh,d.endpointRequestHeadersArgumentDeclaration=Wh,d.endpointRequestHeadersArgumentDeclarationRef=$h,d.endpointRequestHeadersVariableDataType=Vh,d.endpointRequestHeadersVariableDataTypeRef=Nh,d.endpointRequestQueryParamsArgumentDeclaration=Zh,d.endpointRequestQueryParamsArgumentDeclarationRef=Uh,d.endpointRequestQueryParamsVariableDataType=xh,d.endpointRequestQueryParamsVariableDataTypeRef=Fh,d.endpointResponseBodyDataType=df,d.endpointResponseBodyReturnDeclaration=pf,d.endpointResponseBodyReturnDeclarationRef=cf,d.endpointResponseCodeDataType=ef,d.endpointResponseCodeReturnDeclaration=nf,d.endpointResponseCodeReturnDeclarationRef=Kh,d.endpointResponseHeadersDataType=sf,d.endpointResponseHeadersDataTypeRef=rf,d.endpointResponseHeadersReturnDeclaration=lf,d.endpointResponseHeadersReturnDeclarationRef=af,d.endpointReturnStatementRef=tf,d.endpointReturnStatementRefThree=uf,d.endpointReturnStatementRefTwo=of,d.enumOptionsProperty=xd,d.enumOptionsPropertyDataType=Fd,d.enumOptionsPropertyDataTypeRef=Ld,d.enumOptionsPropertyRef=Gd,d.enumPrototype=Rn,d.enumPrototypeRef=Ud,d.executionBuiltInEntity=Ho,d.executionBuiltInEntityAbortMethod=Wo,d.executionBuiltInEntityAbortMethodParentRef=Zf,d.filterOutDuplicateEntities=S,d.filterOutDuplicateErrors=ZF,d.findReferenceToSelfInList=Sg,d.findReferencesToSelfInProject=H9,d.flattenCalls=vr,d.flattenCanvasAncestorsUntil=co,d.flattenCustomEntityExtensionAndImplementationTypes=_g,d.flattenCustomEntityExtensionTypes=yo,d.flattenCustomEntityExtensions=Ad,d.flattenCustomEntityImplementations=Sd,d.flattenCustomEntityImplementionTypes=po,d.flattenDerivedCanvasEntities=vt,d.flattenDetachedBranch=Lg,d.flattenElementCalls=Me,d.flattenProjectElements=Ag,d.flattenRelatedCanvasElementsOnTheLeft=wg,d.flattenRelatedCanvasElementsOnTheRight=Bg,d.flattenVariableReads=Dg,d.flattenVariableWrites=Pg,d.flattenVariables=Z,d.fromZodParseToEntityGenerationErrors=dd,d.generate=RD,d.generateActionExample=w9,d.generateExecutionDataType=Uv,d.generateMutablePropertiesExplanation=eo,d.generateRandomBoolean=zm,d.generateRandomDate=Sm,d.generateRandomDateAfter=Pm,d.generateRandomDateBefore=Dm,d.generateRandomDateBetweenRange=Am,d.generateRandomNumber=qm,d.generateRandomNumberAfter=xm,d.generateRandomNumberBefore=jm,d.generateRandomNumberBetweenRange=km,d.generateRandomText=Ym,d.generateRandomTextAfter=Jm,d.generateRandomTextBefore=Wm,d.generateRandomTextBetweenRange=Hm,d.generateUniqueUUID=Um,d.getAllActionDescriptorsForConditions=oo,d.getAllActionDescriptorsForGlobalEvents=ao,d.getAllActionDescriptorsForLoops=so,d.getAllActionDescriptorsForOperations=$9,d.getAllGloballyDeclaredFunctionDeclarationsExplanation=dg,d.getBaseBuiltInEntities=Fn,d.getBaseSchemaBasedOnType=ng,d.getBuiltInEntityOwner=Ir,d.getCallableEntityReferenceSchema=ke,d.getCallableEntityTypeSchema=Db,d.getCallerEntityReferenceSchema=tx,d.getCallerEntityTypeSchema=ex,d.getCalls=vd,d.getCanvasEntitiesDerivedFromInternalCalls=Cg,d.getCanvasEntitiesDerivedFromWrites=ui,d.getCanvasEntityDerivedFromValueReadingEntity=Dd,d.getCanvasEntityReferenceSchema=Ex,d.getCanvasEntityTypeSchema=Tx,d.getChildrenEntityWithValues=x9,d.getCommonAncestor=bd,d.getCommonChildren=mg,d.getDeclaration=Kc,d.getDeepestScope=xg,d.getDraggableCallableEntityReferenceSchema=Sb,d.getDraggableCallableEntityTypeSchema=Ab,d.getDraggableCallerEntityReferenceSchema=rx,d.getDraggableCallerEntityTypeSchema=nx,d.getDraggableExecutableEntityReferenceSchema=ox,d.getDraggableExecutableEntityTypeSchema=sx,d.getDraggablePassThroughCallableEntityReferenceSchema=Fs,d.getDraggablePassThroughCallableEntityTypeSchema=Gs,d.getDraggablePlayableEntityReferenceSchema=px,d.getDraggablePlayableEntityTypeSchema=ux,d.getEntityArgumentDeclarations=Id,d.getEntityInputMaps=Og,d.getEntityOutputMaps=Z9,d.getEntityReferenceSchema=mx,d.getEntityReturnDeclarations=Pd,d.getEntityTypeSchema=fx,d.getEntityWithLogicScopeReferenceSchema=un,d.getEntityWithLogicScopeTypeSchema=lx,d.getEntityWithValueReferenceSchema=Pb,d.getEntityWithValueTypeSchema=KU,d.getEntryPointEntityReferenceSchema=Ue,d.getEntryPointEntityTypeSchema=_n,d.getEventEntityReferenceSchema=Vs,d.getEventEntityTypeSchema=$s,d.getExecutableEntityReferenceSchema=ax,d.getExecutableEntityTypeSchema=ix,d.getExtendedBuiltInEntity=X9,d.getExtendedCustomEntity=Ng,d.getGenerationTargetSchemaBasedOnType=rg,d.getHeadIfPartOfDetachedBranch=Vg,d.getHighestScope=Ug,d.getImplementedBuiltInEntity=Q9,d.getIsInteractive=Od,d.getLastInListOperation=Oo,d.getLastInListOperationError=op,d.getLastInListOperationErrorParentRef=sp,d.getLastInListOperationInputListArgument=rp,d.getLastInListOperationInputListArgumentParentRef=np,d.getLastInListOperationInputListArgumentRef=Qu,d.getLastInListOperationInputListDataType=Ku,d.getLastInListOperationOutputElementDataType=tp,d.getLastInListOperationOutputElementReturn=ap,d.getLastInListOperationOutputElementReturnParentRef=ip,d.getLastInListOperationOutputElementReturnRef=ep,d.getLinkedEntitiesFromArgumentDeclaration=W9,d.getLowestPersistedEntityImplementation=Mg,d.getParentCanvasEntities=_t,d.getParentCanvasEntity=He,d.getParentEntryPoint=U9,d.getPassThroughCallableEntityReferenceSchema=ye,d.getPassThroughCallableEntityTypeSchema=Ls,d.getPlayableEntityReferenceSchema=dx,d.getPlayableEntityTypeSchema=cx,d.getProject=h3,d.getPrototypeByType=ho,d.getReferenceEntityId=D,d.getReferencedEntitiesStateOrErrors=no,d.getReferencedEntityStateOrErrors=ud,d.getRelatedCanvasElementsOnTheLeft=gr,d.getRelatedCanvasElementsOnTheRight=Gn,d.getRootEntryPointScopeOwner=wd,d.getScopeOwner=ht,d.getTerminationReferenceSchema=hx,d.getTerminationTypeSchema=yx,d.getUsedArgFromDeclaration=Y9,d.getUsedReturnFromDeclaration=z9,d.getValueReadingEntityReferenceSchema=Ib,d.getValueReadingEntityTypeSchema=dn,d.getValueWritingEntityReferenceSchema=QU,d.getValueWritingEntityTypeSchema=Qi,d.getVariableFromInputMapping=Eg,d.getVariableFromReturnVariablePointer=vg,d.getVariableReferenceSchema=wn,d.getVariableTypeSchema=tr,d.getVariablesFromArgumentDeclarations=uo,d.getVariablesFromInputMaps=Rg,d.getVariablesFromOutputMapping=gg,d.getVariablesFromOutputMaps=Ig,d.getVariablesFromReturnDeclarations=bg,d.getVariablesInSameOrHigherScope=ed,d.getWrites=gd,d.groupCallsBasedOnParallelizableExecution=k9,d.handleAfterEntityImplementationSideEffects=fg,d.handleBeforeEntityImplementationSideEffects=hg,d.httpRequestBodyArgument=Pa,d.httpRequestBodyArgumentRef=Vy,d.httpRequestBodyDataType=Ly,d.httpRequestHeadersArgument=Ia,d.httpRequestHeadersArgumentRef=Ny,d.httpRequestHeadersDataType=$y,d.httpRequestMethodArgument=va,d.httpRequestMethodArgumentRef=_y,d.httpRequestMethodDataType=My,d.httpRequestMethodDataTypeRef=By,d.httpRequestQueryParamsArgument=Vo,d.httpRequestQueryParamsArgumentRef=Oy,d.httpRequestQueryParamsDataType=Cy,d.httpRequestVariableURLArgument=ga,d.httpRequestVariableURLArgumentRef=Ay,d.httpRequestVariableURLDataType=Sy,d.httpRequestVariableURLDataTypeRef=Py,d.httpResponseBodyReturnDataType=Jy,d.httpResponseBodyReturnDataTypeRef=ky,d.httpResponseBodyReturnReturn=hi,d.httpResponseBodyReturnReturnRef=qy,d.httpResponseCodeDataType=Fy,d.httpResponseCodeReturn=Lo,d.httpResponseCodeReturnRef=Gy,d.httpResponseHeadersDataType=jy,d.httpResponseHeadersDataTypeRef=Uy,d.httpResponseHeadersReturn=Da,d.httpResponseHeadersReturnRef=xy,d.implement=lo,d.inferArgumentDeclarationDataType=xv,d.inferDataType=zs,d.inferInputMapDataType=jv,d.inferOutputMapDataType=Jv,d.inferVariableDeclarationDataType=qv,d.inferVariableInstanceDataType=kv,d.initProject=Wg,d.iterateOverListActionDescriptor=kn,d.iterateOverListActionDescriptorListArgumentDeclaration=dh,d.iterateOverListActionDescriptorListArgumentDeclarationDataType=lh,d.iterateOverListActionDescriptorListArgumentDeclarationDataTypeParentRef=oh,d.iterateOverListActionDescriptorListArgumentDeclarationParentRef=ch,d.iterateOverListActionDescriptorReturnDeclaration=sh,d.iterateOverListActionDescriptorReturnDeclarationParentRef=ah,d.joinListOperation=Do,d.joinListOperationError=wu,d.joinListOperationErrorParentRef=Bu,d.joinListOperationFirstListArgument=Du,d.joinListOperationFirstListArgumentParentRef=Pu,d.joinListOperationFirstListArgumentRef=Eu,d.joinListOperationFirstListDataType=Ru,d.joinListOperationResultListDataType=Iu,d.joinListOperationResultListReturn=Cu,d.joinListOperationResultListReturnParentRef=Ou,d.joinListOperationResultListReturnRef=gu,d.joinListOperationSecondListArgument=Su,d.joinListOperationSecondListArgumentParentRef=Au,d.joinListOperationSecondListArgumentRef=bu,d.joinListOperationSecondListDataType=vu,d.joinListWithLastSeparator=N,d.joinStringOperation=yi,d.joinStringOperationError=hu,d.joinStringOperationErrorParentRef=yu,d.joinStringOperationFirstStringArgument=Ea,d.joinStringOperationFirstStringArgumentParentRef=du,d.joinStringOperationFirstStringArgumentRef=iu,d.joinStringOperationFirstStringDataType=au,d.joinStringOperationResultStringDataType=cu,d.joinStringOperationResultStringReturn=pi,d.joinStringOperationResultStringReturnParentRef=pu,d.joinStringOperationResultStringReturnRef=lu,d.joinStringOperationSecondStringArgument=Ra,d.joinStringOperationSecondStringArgumentParentRef=uu,d.joinStringOperationSecondStringArgumentRef=su,d.joinStringOperationSecondStringDataType=ou,d.jsonPrototype=vo,d.keyValueParamBuiltInBaseEntity=Sa,d.keyValueParamBuiltInBaseEntityNameProperty=Th,d.keyValueParamBuiltInBaseEntityNamePropertyDataTypeRef=nI,d.keyValueParamBuiltInBaseEntityNamePropertyParentRef=mh,d.keyValueParamBuiltInBaseEntityNamePropertyRef=fh,d.keyValueParamBuiltInBaseEntityValueProperty=bh,d.keyValueParamBuiltInBaseEntityValuePropertyDataTypeRef=iI,d.keyValueParamBuiltInBaseEntityValuePropertyParentRef=Rh,d.keyValueParamBuiltInBaseEntityValuePropertyRef=Eh,d.lowercaseFirstLetter=Lv,d.manualFlowActionDescriptor=Fo,d.manualFlowActionDescriptorDeclarationReturnDeclaration=hh,d.manualFlowActionDescriptorDeclarationReturnDeclarationDataType=ph,d.manualFlowActionDescriptorDeclarationReturnDeclarationDataTypeParentRef=uh,d.manualFlowActionDescriptorDeclarationReturnDeclarationParentRef=yh,d.mapActionDescriptorToTypeItRepresents=t3,d.mergeEntityErrorsList=XF,d.mergeListOfEntities=Fg,d.methodDefaultValue=wy,d.mockClientProject=eb,d.moreThanOrEqualCondition=wr,d.moreThanOrEqualConditionLeftHandArgument=nm,d.moreThanOrEqualConditionLeftHandArgumentParentRef=tm,d.moreThanOrEqualConditionRightHandArgument=im,d.moreThanOrEqualConditionRightHandArgumentParentRef=rm,d.notEmptyCondition=qn,d.notEmptyConditionArgument=Qf,d.notEmptyConditionRef=Xf,d.numberAdditionOperation=Ta,d.numberAdditionOperationError=eu,d.numberAdditionOperationErrorParentRef=Kd,d.numberAdditionOperationFirstNumberArgument=go,d.numberAdditionOperationFirstNumberArgumentRef=qd,d.numberAdditionOperationFirstNumberDataType=Jd,d.numberAdditionOperationRef=Zd,d.numberAdditionOperationRefThree=Qd,d.numberAdditionOperationRefTwo=Xd,d.numberAdditionOperationResultNumberDataType=zd,d.numberAdditionOperationResultNumberReturn=Po,d.numberAdditionOperationResultNumberReturnRef=Yd,d.numberAdditionOperationSecondNumberArgument=Io,d.numberAdditionOperationSecondNumberArgumentRef=Wd,d.numberAdditionOperationSecondNumberDataType=Hd,d.numberPrototype=Ce,d.numberValueAutogenerationSchema=zl,d.parallelExecutionOperation=$t,d.parallelExecutionOperationError=Mp,d.parallelExecutionOperationErrorParentRef=_p,d.parallelExecutionOperationListOfExecutionResultsDataType=Cp,d.parallelExecutionOperationListOfExecutionResultsReturn=_o,d.parallelExecutionOperationListOfExecutionResultsReturnRef=Op,d.parallelExecutionOperationListOfFunctionsArgument=wo,d.parallelExecutionOperationListOfFunctionsArgumentDatatype=Sp,d.parallelExecutionOperationListOfFunctionsArgumentRef=Ap,d.parallelExecutionOperationListOfFunctionsBlueprint=Dp,d.parallelExecutionOperationRef=Bp,d.parallelExecutionOperationRefThree=wp,d.persistedBuiltInBaseEntity=Be,d.persistedBuiltInBaseEntityCreatedAtProperty=Uf,d.persistedBuiltInBaseEntityCreatedAtPropertyDataType=Gf,d.persistedBuiltInBaseEntityCreatedAtPropertyDataTypeRef=TI,d.persistedBuiltInBaseEntityCreatedAtPropertyParentRef=Ff,d.persistedBuiltInBaseEntityCreatedAtPropertyRef=Lf,d.persistedBuiltInBaseEntityDatabaseProperty=Ti,d.persistedBuiltInBaseEntityDatabasePropertyDataTypeRef=yI,d.persistedBuiltInBaseEntityDatabasePropertyParentRef=Of,d.persistedBuiltInBaseEntityDatabasePropertyRef=Sf,d.persistedBuiltInBaseEntityDeletedAtProperty=Vf,d.persistedBuiltInBaseEntityDeletedAtPropertyDataType=Nf,d.persistedBuiltInBaseEntityDeletedAtPropertyDataTypeRef=mI,d.persistedBuiltInBaseEntityDeletedAtPropertyParentRef=$f,d.persistedBuiltInBaseEntityDeletedAtPropertyRef=Mf,d.persistedBuiltInBaseEntityIdentifierProperty=_f,d.persistedBuiltInBaseEntityIdentifierPropertyDataTypeRef=Cf,d.persistedBuiltInBaseEntityIdentifierPropertyParentRef=wf,d.persistedBuiltInBaseEntityIdentifierPropertyRef=Bf,d.persistedBuiltInBaseEntityUpdatedAtProperty=qf,d.persistedBuiltInBaseEntityUpdatedAtPropertyDataType=jf,d.persistedBuiltInBaseEntityUpdatedAtPropertyDataTypeRef=EI,d.persistedBuiltInBaseEntityUpdatedAtPropertyParentRef=kf,d.persistedBuiltInBaseEntityUpdatedAtPropertyRef=xf,d.processOutputGlobalValueDescriptorDataType=om,d.processOutputGlobalValueDescriptorReturn=zo,d.processOutputGlobalValueDescriptorReturnRef=sm,d.projectPublicationCompletedGlobalEvent=Ma,d.propertyToZodSchema=gm,d.relationalDatabaseBuiltInBaseEntity=bn,d.relationalDatabaseBuiltInBaseEntityDefaultProperty=gf,d.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataTypeRef=bf,d.relationalDatabaseBuiltInBaseEntityDefaultPropertyRef=vf,d.relationalDatabaseBuiltInBaseEntityIdentifierProperty=Ca,d.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataTypeRef=hf,d.relationalDatabaseBuiltInBaseEntityIdentifierPropertyRef=ff,d.relationalDatabaseBuiltInBaseEntityMinSizeProperty=_a,d.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataTypeRef=Ef,d.relationalDatabaseBuiltInBaseEntityMinSizePropertyRef=Rf,d.relationalDatabaseBuiltInBaseEntityPasswordProperty=wa,d.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataTypeRef=cI,d.relationalDatabaseBuiltInBaseEntityPasswordPropertyRef=Tf,d.relationalDatabaseBuiltInBaseEntityRef=Br,d.relationalDatabaseBuiltInBaseEntityUsernameProperty=Ba,d.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataTypeRef=oI,d.relationalDatabaseBuiltInBaseEntityUsernamePropertyRef=mf,d.resolveActionDescriptorName=eg,d.resolveBaseEntityName=Xv,d.resolveBuiltInBaseEntityDataTypeLabel=td,d.resolveConditionOperatorLabel=Qs,d.resolveCustomEntityDataTypeLabel=nd,d.resolveDataType=Zs,d.resolveDataTypeLabel=Yv,d.resolveEntityDataTypeLabel=Zv,d.resolveEntityName=A,d.resolveFirstCallsSecond=q9,d.resolveFirstWritesSecond=J9,d.resolvePrimitiveEntityName=Kv,d.resolvePropertyDataTypeLabel=zv,d.resolveSearchName=Qv,d.resolveVariableDataTypeLabel=$6,d.resolveVariableDeclarationDataTypeLabel=or,d.resolveVariableInstanceDataTypeLabel=Hv,d.resolveVariableScope=_6,d.sequentialExecutionOperation=tn,d.sequentialExecutionOperationError=Xp,d.sequentialExecutionOperationErrorParentRef=Zp,d.sequentialExecutionOperationListOfExecutionResultsDataType=Hp,d.sequentialExecutionOperationListOfExecutionResultsReturn=No,d.sequentialExecutionOperationListOfExecutionResultsReturnParentRef=zp,d.sequentialExecutionOperationListOfExecutionResultsReturnRef=Wp,d.sequentialExecutionOperationListOfFunctionsArgument=Mo,d.sequentialExecutionOperationListOfFunctionsArgumentDatatype=Jp,d.sequentialExecutionOperationListOfFunctionsArgumentParentRef=Yp,d.sequentialExecutionOperationListOfFunctionsArgumentRef=qp,d.sequentialExecutionOperationListOfFunctionsBlueprint=kp,d.softDeletePersistedEntityMethod=Df,d.softDeletePersistedEntityMethodParentRef=Pf,d.sortCallsBasedOnExecutionDependencies=Tg,d.sortChildrenEntitiesBasedOnExecutionDependencies=j9,d.splitListOperation=So,d.splitListOperationError=zu,d.splitListOperationErrorParentRef=Yu,d.splitListOperationFirstOutputListDataType=Gu,d.splitListOperationFirstOutputListReturn=qu,d.splitListOperationFirstOutputListReturnParentRef=ku,d.splitListOperationFirstOutputListReturnRef=Ao,d.splitListOperationInputListArgument=Uu,d.splitListOperationInputListArgumentParentRef=Fu,d.splitListOperationInputListArgumentRef=Nu,d.splitListOperationInputListDataType=$u,d.splitListOperationSecondOutputListDataType=Ju,d.splitListOperationSecondOutputListReturn=Hu,d.splitListOperationSecondOutputListReturnParentRef=Wu,d.splitListOperationSplitIndexArgument=ju,d.splitListOperationSplitIndexArgumentParentRef=xu,d.splitListOperationSplitIndexArgumentRef=Vu,d.splitListOperationSplitIndexDataType=Lu,d.stringPrototype=F,d.stringValueAutogenerationSchema=Yl,d.suggestNewIdForEntity=ld,d.test_primitive_entities_export=m3,d.toCamelCase=M6,d.toEntityState=Mt,d.toKebabCase=Wv,d.toLowerCaseKebabCase=Xs,d.toPascalCase=N6,d.untypedObjectPrototype=Xe,d.updateErrorsList=X,d.updateValueReader=ha,d.urlDefaultValue=Dy,d.uuidPrototype=ma,d.validateArgumentDeclarationName=sd,d.validateCalledByErrorIdInAction=M9,d.validateCalledByIdInAction=_9,d.validateCallers=cg,d.validateConditionEntityDeclaration=V9,d.validateCustomEntityName=Ks,d.validateDataOperation=jn,d.validateDataOperationDataToValidateArgument=hy,d.validateDataOperationDataToValidateArgumentParentRef=yy,d.validateDataOperationDataToValidateArgumentRef=uy,d.validateDataOperationDataToValidateDataType=py,d.validateDataOperationEntityToMatchTypeArgument=Ey,d.validateDataOperationEntityToMatchTypeArgumentParentRef=Ty,d.validateDataOperationEntityToMatchTypeArgumentRef=fy,d.validateDataOperationEntityToMatchTypeDataType=my,d.validateDataOperationError=gy,d.validateDataOperationErrorParentRef=vy,d.validateDataOperationOutputEntityDeclaration=by,d.validateDataOperationOutputEntityDeclarationParentRef=Ry,d.validateEntryCaller=lg,d.validateErrorCaller=og,d.validateFunctionCallDeclaration=ug,d.validateFunctionDeclarationName=rd,d.validateGeneratedEntityParentIsNotBuiltInEntity=O9,d.validateGeneration=A9,d.validateGenerationTarget=Pe,d.validateGenerationUpdate=S9,d.validateLoopEntityDeclaration=L9,d.validateName=V6,d.validateOperationEntityDeclaration=pg,d.validatePropertyName=ad,d.validateReachability=mn,d.validateReadsValueInActionPayload=N9,d.validateReferenceObject=to,d.validateReferenceToOne=pd,d.validateReferences=Ge,d.validateReturnDeclarationName=od,d.validateSuccessCaller=sg,d.validateValueReaderGenerationUpdate=ua,d.validateValueWritter=Ed,d.validateVariableDeclarationName=id,d.validateVariableInternalCallUse=Rd,d.valueAutogenerationCurrentDateAndTimeSchema=nb,d.valueAutogenerationGenericSchema=bs,d.valueAutogenerationOptions=Xl,d.valueAutogenerationOptionsSchema=tb,d.valueAutogenerationRandomBooleanSchema=Hl,d.valueAutogenerationRandomDateBetweenSchema=ub,d.valueAutogenerationRandomDateFromSchema=cb,d.valueAutogenerationRandomDateSchema=Is,d.valueAutogenerationRandomDateUntilSchema=db,d.valueAutogenerationRandomNumberBetweenSchema=ab,d.valueAutogenerationRandomNumberFromSchema=rb,d.valueAutogenerationRandomNumberSchema=vs,d.valueAutogenerationRandomNumberUntilSchema=ib,d.valueAutogenerationRandomSchema=Hi,d.valueAutogenerationRandomTextBetweenSchema=lb,d.valueAutogenerationRandomTextFromSchema=sb,d.valueAutogenerationRandomTextSchema=gs,d.valueAutogenerationRandomTextUntilSchema=ob,d.valueAutogenerationRangeValueTypesSchema=Wi,d.valueAutogenerationUniqueSchema=Wl,d.waitOperation=ot,d.waitOperationMillisecondsNumberArgument=xn,d.waitOperationMillisecondsNumberArgumentRef=Vp,d.waitOperationMillisecondsNumberDataType=Lp,d.waitOperationOperationError=Up,d.waitOperationOperationErrorParentRef=Fp,d.waitOperationRef=Gp,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elyx-code/project-logic-tree",
3
- "version": "0.0.5991",
3
+ "version": "0.0.5992",
4
4
  "author": "Sergio Herrero",
5
5
  "license": "UNLICENSED",
6
6
  "description": "An installable module which contains the type definitions and ephemeral state management for a projects' logic tree data structure",