@elyx-code/project-logic-tree 0.0.6321 → 0.0.6323

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.d.ts CHANGED
@@ -8903,8 +8903,9 @@ export declare function initProject(data: IProjectTransfer, { enrich, }?: {
8903
8903
  enrich: boolean;
8904
8904
  }): ProjectState;
8905
8905
 
8906
- export declare function initProjectFromFetchResult(result: IProjectFetchResult, { enrich }?: {
8907
- enrich: boolean;
8906
+ export declare function initProjectFromFetchResult(result: IProjectFetchResult, options?: {
8907
+ enrich?: boolean;
8908
+ shallowErrors?: boolean;
8908
8909
  }): ProjectState;
8909
8910
 
8910
8911
  export declare enum InputMapDependencyField {
package/dist/index.js CHANGED
@@ -34797,7 +34797,7 @@ Please consider than any updates might affect the overlap with the signature of
34797
34797
  ...this.parent.continueStatements
34798
34798
  );
34799
34799
  const l = a.flatMap((c) => c.outputs);
34800
- if (this.implements) {
34800
+ if (this.implements && this.parent.type !== f.Loop) {
34801
34801
  const c = this.implements.outputs;
34802
34802
  return l.forEach((t) => {
34803
34803
  const m = c.find(
@@ -97784,53 +97784,67 @@ const Sl = {}, wh = {}, Hh = {
97784
97784
  onFetch: async () => null,
97785
97785
  manuallyInit: !1
97786
97786
  };
97787
- function gTt(u, { enrich: d } = { enrich: !0 }) {
97788
- const s = u.project, a = u.record, l = new Vo(s), c = /* @__PURE__ */ new Set();
97789
- a[s.id] = s, c.add(s.id);
97790
- const t = V().toISOString();
97791
- Object.values(a).forEach((b) => {
97792
- !b || l.allBuiltInEntityIds.includes(b.id) || c.add(b.id);
97793
- }), l.order = Array.from(c), l.flatRecord = a, l.orderEntities();
97794
- const m = tI(
97787
+ function gTt(u, d = {
97788
+ enrich: !0,
97789
+ shallowErrors: !1
97790
+ }) {
97791
+ const s = {
97792
+ enrich: !0,
97793
+ shallowErrors: !1,
97794
+ ...d
97795
+ }, { enrich: a, shallowErrors: l } = s, c = u.project, t = u.record, m = new Vo(c), v = /* @__PURE__ */ new Set();
97796
+ t[c.id] = c, v.add(c.id);
97797
+ const b = V().toISOString();
97798
+ Object.values(t).forEach((P) => {
97799
+ !P || m.allBuiltInEntityIds.includes(P.id) || v.add(P.id);
97800
+ }), m.order = Array.from(v), m.flatRecord = t, m.orderEntities();
97801
+ const R = tI(
97795
97802
  u.project
97796
97803
  );
97797
- m.instances[s.id] = m;
97798
- const v = d ? m.addChangeSet(
97804
+ R.instances[c.id] = R;
97805
+ const I = a ? R.addChangeSet(
97799
97806
  new j(
97800
- m,
97807
+ R,
97801
97808
  O.sessionAuthor,
97802
- t,
97803
- m,
97809
+ b,
97810
+ R,
97804
97811
  !0,
97805
97812
  "project-init-from-fetch-result"
97806
97813
  )
97807
97814
  ) : null;
97808
- return l.visit((b) => {
97809
- if (b.id === m.id)
97815
+ return m.visit((P) => {
97816
+ if (P.id === R.id)
97810
97817
  return;
97811
- const R = z(
97812
- b,
97813
- m
97818
+ const B = z(
97819
+ P,
97820
+ R
97814
97821
  );
97815
- R.hydrateAncestors(), R.addSelfToProject(null);
97816
- }), d ? (l.visit((b) => {
97817
- if (b.id === m.id)
97822
+ try {
97823
+ B.hydrateAncestors(), B.addSelfToProject(null);
97824
+ } catch (F) {
97825
+ if (l)
97826
+ console.error("Error hydrating ancestors: ", F);
97827
+ else
97828
+ throw F;
97829
+ }
97830
+ }), a ? (m.visit((P) => {
97831
+ if (P.id === R.id)
97818
97832
  return;
97819
- const R = m.get(
97820
- b.id
97833
+ const B = R.get(
97834
+ P.id
97821
97835
  );
97822
- R && R.afterAllChildrenInitialized(v);
97823
- }), m.afterAllChildrenInitialized(v)) : rI(
97824
- m,
97825
- t
97826
- ).forEach((R) => {
97827
- R.remove({ ignoreUpstream: !0 }, null);
97828
- }), m.instancesList.forEach((b) => {
97829
- b.previousVersion = null;
97830
- }), v == null || v.attemptAutoclose(
97836
+ B && B.afterAllChildrenInitialized(I);
97837
+ }), R.afterAllChildrenInitialized(I)) : rI(
97838
+ R,
97839
+ b
97840
+ ).forEach((B) => {
97841
+ B.remove({ ignoreUpstream: !0 }, null);
97842
+ }), R.instancesList.forEach((P) => {
97843
+ P.previousVersion = null;
97844
+ }), I == null || I.attemptAutoclose(
97831
97845
  "project-init-from-fetch-result",
97832
- m.id
97833
- ), m;
97846
+ R.id
97847
+ ), R;
97834
97848
  }
97835
97849
  async function CTt(u, d = Hh) {
97836
97850
  const s = {
@@ -55,7 +55,7 @@ If you want to implement a new method, you can create a new 'function-declaratio
55
55
  If you want to modify the existing implementation, you can update the existing method instead, but it will have to match the same base ${f.ActionDescriptor} signature, otherwise the implementation will have a validation error.`,issue:null}))}}else if(v&&v.type===f.Loop){const V=v.body;V&&((I=V.implements)==null?void 0:I.id)===l.implements&&p.push(new Y({id:`${l.id}--${le.LoopBodyFunctionOverwrite}`,code:le.LoopBodyFunctionOverwrite,severity:S.Error,message:`The '${f.FunctionDeclaration}' with id "${l.id}" is being added as the 'body' of the ${f.Loop} with id "${v.id}", but the loop already has a function-declaration body. A loop can only have one function-declaration body at a time. You can edit the existing body instead, but it will have to match the same base signature, otherwise the implementation will have a validation error.`,issue:null}))}const b=l.parent&&a.get(l.parent)||a.getBuiltIn(l.parent),_=b?ka(b):null;return _&&p.push(new Y({id:`${s.id}--${k.BuiltInEntityParent}`,code:k.BuiltInEntityParent,severity:S.Error,message:`The entity with id '${s.id}' and type '${s.type}', belongs to a built-in system entity "${fe(_,a)}" with id '${_.id}', and therefore it cannot be created as it would affect a built in entity, which are inmutable.`,issue:null})),p.push(...t.errors,...m,...ur(l)),{errors:p,modifiedData:l}}get isExtendedMethod(){if(this.parent.type!==f.DefinitionEntity)return!1;const s=this.parent.allBaseMethodsFromExtendedAndImplementedEntities.find(a=>{var l;return a.id===((l=this.extends)==null?void 0:l.id)});return!!s&&s.id!==this.id&&s.type!==f.ActionDescriptor}get returnStatements(){return at(this).filter(l=>l.type===f.ReturnStatement&&l.parent.id===this.id)}validateGeneratedUpdate(s){const a=[];return s.parent&&(this.parent.type===f.Project?a.push(new Y({id:`${this.id}--${k.InvalidParentUpdate}`,code:k.InvalidParentUpdate,severity:S.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated, as it would mean moving the '${this.type}' entity to another parent entity.
56
56
  This is likely an incorrect strategy because this is a globally declared '${this.type}' entity which can only have the root project as its parent.`,issue:null})):a.push(new Y({id:`${this.id}--${k.InvalidParentUpdate}`,code:k.InvalidParentUpdate,severity:S.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated, as it would mean moving the '${this.type}' entity to another parent entity.
57
57
  This is likely an incorrect strategy because this function declaration is a method, since it belongs to a '${this.parent.type}' entity, either the '${this.type}' entity doesn't need to be updated or it should be deleted and a new one created in the desired parent.
58
- Please consider than any updates might affect the overlap with the signature of the parent entity's action descriptors.`,issue:null}))),{errors:a,modifiedData:s}}subscribeDependents(s){return s.forEach(a=>{this.detachedDependents[a.entity.id]||(this.detachedDependents[a.entity.id]=a)}),this}unsubscribeDependents(s){return s.forEach(a=>{this.detachedDependents[a.entity.id]&&delete this.detachedDependents[a.entity.id]}),this}syncDependents(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-dependents"))){const a=[],l=[],p=[],t=[];return Object.values(this.detachedDependents).forEach(m=>{const v=m.entity.afterAllChildrenInitialized(s);a.push(...v.updated),l.push(...v.added),p.push(...v.removed),t.push(...v.affected)}),s==null||s.attemptAutoclose("sync-dependents",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}onDetachedDependencyRemoved(s,a,l){const p=[],t=[],m=[],v=[];if(a==="function-declaration-implements"&&this.setImplements(null,l),a==="function-declaration-extends"){const{updated:b,added:_,removed:I,affected:V}=this.remove({ignoreUpstream:!1},l);p.push(...b),t.push(..._),m.push(...I),v.push(...V)}return{updated:w(p),added:w(t),removed:w(m),affected:w(v),self:this}}onDetachedDependencyRestored(s,a,l){const p=[],t=[],m=[],v=[];if(a==="function-declaration-implements"&&(this.setImplements(s,l),p.push(s)),a==="function-declaration-extends"){const{updated:b,added:_,removed:I,affected:V}=this.restore({},l);p.push(...b),t.push(..._),m.push(...I),v.push(...V)}return{updated:w(p),added:w(t),removed:w(m),affected:w(v),self:this}}unsubscribeFromDependencies(){var s,a;return(s=this.implements)==null||s.unsubscribeDependents([{entity:this,field:"function-declaration-implements"}]),(a=this.extends)==null||a.unsubscribeDependents([{entity:this,field:"function-declaration-extends"}]),this}subscribeToDependencies(){var s,a;return(s=this.implements)==null||s.subscribeDependents([{entity:this,field:"function-declaration-implements"}]),(a=this.extends)==null||a.subscribeDependents([{entity:this,field:"function-declaration-extends"}]),this}increaseVersion(s){if(s&&!N(s).isValid())throw new Error(`The shared timestamp '${s}' is not a valid ISO 8601 date string.`);return s&&N(s).isSame(N(this.createdAt))?this:(this.previousVersion=this.version,this.version=P.UUID.uuid(),this.createdAt=N(s).toISOString()||N().toISOString(),this)}captureVersion(){var a;const s=((a=this.knownVersions)==null?void 0:a.get(this.version))||new pt(this,this.project);return s.metaSync(this.toMeta(),null),this.knownVersions=this.knownVersions?this.knownVersions.set(this.version,s):new Map([[this.version,s]]),s.inputs=[...this.inputs],s.calls=[...this.calls],s.implements=this.implements,s.extends=this.extends,s.detachedChildren=[...this.detachedChildren],s.parent=this.parent,this}recursiveCaptureUpstreamVersions(s){const a=[],l=[],p=[],t=[];if(this.parent&&this.parent.type!==f.PrimitiveEntity&&this.parent.type!==f.BuiltInBaseEntity){this.parent.increaseVersion(s);const m=this.parent.recursiveCaptureUpstreamVersions(s);a.push(this.parent,...m.updated),l.push(...m.added),p.push(...m.removed)}return{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}async restoreVersion(s){var v;const a=[],l=[],p=[],t=[];if(this.version===s)return{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this};if(!this.knownVersions){const b=new Map;for(const[_,I]of this.knownVersions||new Map){if(b.set(_,I),I.activeVersion=!1,I.knownVersions)for(const[V,B]of I.knownVersions)b.set(V,B);I.knownVersions=null}}let m=(v=this.knownVersions)==null?void 0:v.get(s);if(!m){const b=await this.APILoadVersion({},s);if(!b)throw new Error(`Version with id '${s}' for entity with id '${this.id}' not found.`);m=new pt(b,this.project)}return this.metaSync(m.toShallowJSON(),null),this.previousVersion=m.previousVersion,this.version=m.version,this.createdAt=m.createdAt,this.author=m.author,this.deleted=m.deleted,this.inputs=m.inputs,this.calls=m.calls,this.implements=m.implements,this.detachedChildren=m.detachedChildren,this.parent=m.parent,{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}updateWithShallowTransfer(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"update-with-shallow-transfer"))){if(this.metaSync(s,a),this.version=s.version,this.createdAt=s.createdAt,this.author=s.author,this.deleted=s.deleted,this.previousVersion=s.previousVersion,this.unsubscribeFromDependencies(),s.parent){const l=W(s.parent),p=this.project.get(l),t=this.parent;if(t&&t.id!==(p==null?void 0:p.id)&&this.removeFromParent(a),p)this.setParent(p,null);else throw a==null||a.attemptAutoclose("update-with-shallow-transfer",this.id),new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${l}' that isn't found in the project`)}else throw a==null||a.attemptAutoclose("update-with-shallow-transfer",this.id),new Error(`${this.type} with id '${this.id}' must have a 'parent'`);if(s.implements){const l=W(s.implements),p=this.project.get(l);if(p)this.setImplements(p,a);else if(l)throw a==null||a.attemptAutoclose("update-with-shallow-transfer",this.id),new Error(`${kr(this.type)} with id '${this.id}' has a 'implements' reference "${l}" which is missing in the project`)}if(s.extends){const l=W(s.extends),p=this.project.get(l);if(p)this.setExtends(p,a);else if(l)throw new Error(`${kr(this.type)} with id '${this.id}' has a 'extends' reference "${l}" which is missing in the project`)}return this.captureVersion(),this.subscribeToDependencies(),a==null||a.attemptAutoclose("update-with-shallow-transfer",this.id),this}hydrateAncestors(){const s=[],a=[],l=[],p=[];if(this.initialData.parent){const t=W(this.initialData.parent),m=this.project.get(t);if(m)this.setParent(m,null),s.push(m);else throw new Error(`${kr(this.type)} with id '${this.id}' has a 'parent' reference "${t}" which is missing in the project`)}else throw new Error(`${kr(this.type)} with id '${this.id}' is missing a 'parent' reference`);if(this.initialData.implements){const t=W(this.initialData.implements),m=this.project.get(t);if(m)this.setImplements(m,null),s.push(m);else if(t)throw new Error(`${kr(this.type)} with id '${this.id}' has a 'implements' reference "${t}" which is missing in the project`)}if(this.initialData.extends){const t=W(this.initialData.extends),m=this.project.get(t);if(m)this.setExtends(m,null),s.push(m);else if(t)throw new Error(`${kr(this.type)} with id '${this.id}' has a 'extends' reference "${t}" which is missing in the project`)}return{updated:w(s),added:w(a),removed:w(l),affected:w(p),self:this}}afterAllChildrenInitialized(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"after-all-children-initialized"))){const a=[],l=[],p=[],t=[];return this.initialized=!0,this.captureVersion(),s==null||s.attemptAutoclose("after-all-children-initialized",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}addSelfToProject(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"add-self-to-project"))){const a=[this],l=[],p=[],t=[];return this.parent===this.project?this.project.addFunctionDeclaration(this):this.parent.type===f.DefinitionEntity?(this.parent.addMethod(this),t.push(this.parent)):this.parent.type===f.Loop&&(this.parent.setBody(this),t.push(this.parent)),this.subscribe(),this.subscribeToDependencies(),s==null||s.attemptAutoclose("add-self-to-project",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}replaceDetachedChild(s,a){const l=this.detachedChildren.indexOf(s);return l!==-1&&(this.detachedChildren[l]=a),this}subscribeDetachedChild(s){return this.detachedChildren.includes(s)||this.detachedChildren.push(s),this}unsubscribeDetachedChild(s){const a=this.detachedChildren.indexOf(s);return a!==-1&&this.detachedChildren.splice(a,1),this}addInputDeclaration(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"add-input-declaration"))){return this.inputs.includes(s)?(a==null||a.attemptAutoclose("add-input-declaration",this.id),this):(this.inputs.push(s),a==null||a.attemptAutoclose("add-input-declaration",this.id),this)}removeInputDeclaration(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"remove-input-declaration"))){const l=this.inputs.findIndex(p=>p.id===s.id);return l>-1&&(this.inputs.splice(l,1),a&&(a==null||a.add(this,G.Affected))),a==null||a.attemptAutoclose("remove-input-declaration",this.id),this}setParent(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"set-parent"))){var l;return((l=this.parent)==null?void 0:l.id)!==(s==null?void 0:s.id)&&(this.parent=s,a&&(a==null||a.add(this,G.Updated))),a==null||a.attemptAutoclose("set-parent",this.id),this}setImplements(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"set-implements"))){var l;return((l=this.implements)==null?void 0:l.id)!==(s==null?void 0:s.id)&&(this.implements=s,a&&(a==null||a.add(this,G.Updated))),a==null||a.attemptAutoclose("set-implements",this.id),this}setExtends(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"set-extends"))){var l;return((l=this.extends)==null?void 0:l.id)!==(s==null?void 0:s.id)&&(this.extends=s,a&&(a==null||a.add(this,G.Updated))),a==null||a.attemptAutoclose("set-extends",this.id),this}addCall(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"add-call"))){return this.calls.includes(s)||(this.calls.push(s),a==null||a.add(s,G.Affected)),a==null||a.attemptAutoclose("add-call",this.id),this}removeCall(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"remove-call"))){const l=this.calls.indexOf(s);return l!==-1&&(this.calls.splice(l,1),a==null||a.add(s,G.Affected)),a==null||a.attemptAutoclose("remove-call",this.id),this}initChildren(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"init-children"))){return this.initialized||this.startedInitialization?this:(this.startedInitialization=!0,this.inputs=this.initialData.inputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(s),l}),this.calls=this.initialData.calls.map(a=>{const l=z(a,this.project);return l.addEntryCaller(this,null),[f.BreakStatement,f.ContinueStatement].includes(l.type)?(l.setParent(this.parent,null),l.initChildren(s)):l.type!==f.InternalCall&&(l.setParent(this,null),l.initChildren(s)),l}),this.initialData.implements&&(this.implements=z(this.initialData.implements,this.project)),this.initialData.extends&&(this.extends=z(this.initialData.extends,this.project)),this.subscribeToDependencies(),this.afterAllChildrenInitialized(s),s==null||s.attemptAutoclose("init-children",this.id),this)}subscribe(){return this.activeVersion=!0,this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}metaSync(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"meta-sync"))){const l=cr(this,s),p=this.toMeta();return this.name=s.name!==void 0?s.name:p.name,this.description=s.description!==void 0?s.description:p.description,this.private=s.private!==void 0?s.private:this.private,this.index=s.index||(s.index!==0?p.index:0),this.collapsed=s.collapsed!==void 0?s.collapsed:p.collapsed,this.x=s.x||p.x,this.y=s.y||p.y,super.metaSync(s),s.deleted===!0&&!p.deleted?a==null||a.add(this,G.Removed):s.deleted===!1&&p.deleted?a==null||a.add(this,G.Added):l&&(a==null||a.add(this,G.Updated)),a==null||a.attemptAutoclose("meta-sync",this.id),this}async APILoad(s=oe,...a){return await pt.repository.APILoad(this.id,...a),this}async APICreate(s=oe,...a){return await pt.repository.APICreate(this.toShallowJSON(),...a),this}async APIUpdate(s=oe,...a){return await pt.repository.APIUpdate(this.toShallowJSON(),...a),this}async APIDelete(s=oe,...a){return await pt.repository.APIDelete(this.toShallowJSON(),...a),this}async APIClone(s=oe,...a){return await pt.repository.APIClone(this.id,...a),this}async APILoadVersion(s=oe,a,...l){return await pt.repository.APILoadVersion(this.id,a,...l)}removeFromParent(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"remove-from-parent"))){const a=[],l=[],p=[],t=[];return this.parent.type===f.DefinitionEntity?(this.parent.removeMethod(this),s==null||s.add(this.parent,G.Affected),t.push(this.parent)):this.parent.type===f.Loop?(this.parent.detachBody(),s==null||s.add(this.parent,G.Affected),t.push(this.parent)):this.parent.type===f.Project&&(this.project.removeFunctionDeclaration(this),s==null||s.add(this.parent,G.Affected),t.push(this.parent)),s==null||s.attemptAutoclose("remove-from-parent",this.id),{added:w(p),updated:w(a),removed:w(l),affected:w(t),self:this}}remove({ignoreUpstream:s}={ignoreUpstream:!1},a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"remove-entity"))){const l=[],p=[],t=[],m=[];if(a!=null&&a.hasRemoved(this.id))return a==null||a.attemptAutoclose("remove-entity",this.id),{added:[],updated:[],removed:[],affected:[],self:this};if(p.push(this),this.unsubscribe(),this.unsubscribeFromDependencies(),this.project.subscribeDeletedInstance(this),this.metaSync({deleted:!0},a),Object.values(this.detachedDependents).forEach(b=>{const{updated:_,removed:I,added:V}=b.entity.onDetachedDependencyRemoved(this,b.field,a);l.push(..._),p.push(...I),t.push(...V)}),this.inputs.forEach(b=>{const{updated:_,removed:I}=b.remove({ignoreUpstream:!0},a);l.push(..._),p.push(...I)}),xi(this).forEach(b=>{const{updated:_,removed:I}=b.remove({ignoreUpstream:!0},a);l.push(..._),p.push(...I)}),!s){const b=this.removeFromParent(a);t.push(...b.added),l.push(...b.updated),p.push(...b.removed),m.push(...b.affected)}return a==null||a.attemptAutoclose("remove-entity",this.id),{added:w(t),updated:w(l),removed:w(p),affected:w(m),self:this}}restore({}={},s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"restore-entity"))){const a=[],l=[],p=[],t=[];return s!=null&&s.hasAdded(this.id)?(s==null||s.attemptAutoclose("restore-entity",this.id),{added:[],updated:[],removed:[],affected:[],self:this}):(this.subscribe(),this.project.unsubscribeDeletedInstance(this),this.metaSync({deleted:!1},s),Object.values(this.detachedDependents).forEach(v=>{const{updated:b,removed:_,added:I}=v.entity.onDetachedDependencyRestored(this,v.field,s);l.push(...b),p.push(..._),a.push(...I)}),this.inputs.forEach(v=>{const{updated:b}=v.restore({},s);l.push(...b)}),xi(this).forEach(v=>{const{updated:b}=v.restore({},s);l.push(...b)}),this.parent.type===f.DefinitionEntity&&(this.parent.addMethod(this),s==null||s.add(this.parent,G.Affected),t.push(this.parent)),s==null||s.attemptAutoclose("restore-entity",this.id),{added:w(a),updated:w(l),removed:w(p),affected:w(t),self:this})}toFlat(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[this,...this.inputs.flatMap(l=>l.toFlat(s)),...this.calls.flatMap(l=>l.toFlat(s)),...this.returnStatements.flatMap(l=>l.toFlat(s)),...this.implements?this.implements.toFlat(s):[]])}toFlatIds(s=new Set){if(s.has(this.id))return[];s.add(this.id);const a=xi(this);return[this.id,...this.inputs.flatMap(p=>p.toFlatIds(s)),...this.calls.flatMap(p=>p.toFlatIds(s)),...this.returnStatements.flatMap(p=>p.toFlatIds(s)),...this.implements?this.implements.toFlatIds(s):[],...a.flatMap(p=>p.toFlatIds(s))]}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,description:this.description,collapsed:this.collapsed,private:this.private,index:this.index,x:this.x,y:this.y,type:this.type,name:this.name}}toJSON(s=new Set){var a,l;return s.has(this.id)?this.toReference():(s.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,index:this.index,x:this.x,y:this.y,collapsed:this.collapsed,private:this.private,calls:this.calls.map(p=>p.toJSON(s)),inputs:this.inputs.map(p=>p.toJSON(s)),implements:((a=this.implements)==null?void 0:a.toJSON(s))||null,extends:((l=this.extends)==null?void 0:l.toJSON(s))||null,parent:this.parent.toReference()})}toJSONClone(s=Ce){var l,p,t,m,v;let a;return(l=s.seenEntityMaps)!=null&&l.has(this.id)?a=s.seenEntityMaps.get(this.id):(a=s.newId||hr(this,this.project,s.uuidStrategy),s.seenEntityMaps&&s.seenEntityMaps.set(this.id,a)),(p=s.seenEntities)!=null&&p.has(a)||(t=s.seenEntities)!=null&&t.has(this.id)?this.toReference({seenEntityMaps:s.seenEntityMaps}):((m=s.seenEntities)==null||m.add(a),(v=s.seenEntities)==null||v.add(this.id),{id:a,version:P.UUID.uuid(),createdAt:s.timestamp||N().toISOString(),previousVersion:null,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,index:this.index,x:this.x,y:this.y,collapsed:this.collapsed,private:this.private,calls:this.calls.map(b=>b.toJSONClone({...s,newId:null})),inputs:this.inputs.map(b=>b.toJSONClone({...s,newId:null})),implements:(()=>{var b;return this.implements&&this.project.getBuiltIn(this.implements.id)?this.implements.toJSON():(b=this.implements)==null?void 0:b.toJSONClone({...s,newId:null})})(),extends:(()=>{var b;return this.extends&&this.project.getBuiltIn(this.extends.id)?this.extends.toJSON():(b=this.extends)==null?void 0:b.toJSONClone({...s,newId:null})})(),parent:this.parent.toReference({seenEntityMaps:s.seenEntityMaps})})}toReference(s=Ce){var l;let a=this.id;return(l=s.seenEntityMaps)!=null&&l.has(this.id)&&(a=s.seenEntityMaps.get(this.id)),{id:a+"--"+P.UUID.uuid()+"--ref",type:f.GenericReference,entityId:a,version:this.version,entityType:this.type}}toShallowJSON(s=Ce){var l,p,t;let a=this.id;return(l=s.seenEntityMaps)!=null&&l.has(this.id)&&(a=s.seenEntityMaps.get(this.id)),{id:a,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,index:this.index,collapsed:this.collapsed,private:this.private,x:this.x,y:this.y,inputs:this.inputs.map(m=>m.toReference(s)),calls:this.calls.map(m=>m.toReference(s)),implements:((p=this.implements)==null?void 0:p.toReference(s))||null,extends:((t=this.extends)==null?void 0:t.toReference(s))||null,parent:this.parent.toReference(s)}}toFlatJSON(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[this.toShallowJSON(),...this.inputs.flatMap(l=>l.toFlatJSON(s)),...this.calls.flatMap(l=>l.toFlatJSON(s)),...this.returnStatements.flatMap(l=>l.toFlatJSON(s)),...this.implements?this.implements.toFlatJSON(s):[]])}toGenerationTarget(){var a,l;const s=this.parent.type===f.Project?void 0:this.parent.id;return{id:this.id,name:this.name,description:this.description||void 0,type:this.type,private:this.private,implements:((a=this.implements)==null?void 0:a.id)||void 0,extends:((l=this.extends)==null?void 0:l.id)||void 0,parent:s}}toFlatGenerationTarget(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[this.toGenerationTarget(),...this.inputs.flatMap(l=>l.toFlatGenerationTarget(s)),...this.calls.flatMap(l=>l.toFlatGenerationTarget(s)),...this.returnStatements.flatMap(l=>l.toFlatGenerationTarget(s))])}clearErrors(){return this.errors=[],this.inputs.forEach(s=>s.clearErrors()),this.calls.forEach(s=>s.clearErrors()),this.returnStatements.forEach(s=>s.clearErrors()),this}validate(){const s=iM(this);return this.errors=[...s],{success:!0,error:null,data:this.toJSON()}}getErrors(){const s=xi(this);return[...this.errors,...this.inputs.flatMap(l=>l.getErrors()),...s.flatMap(l=>l.getErrors())]}getShallowErrors(){return this.errors}clone(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"clone-entity")),a=null,l=null,p=!0,t=!1){var B;let m=yr(a,this);const v=this.toJSON(),b=l||P.UUID.uuid();v.inputs=[],v.calls=[],v.id=b,v.version=P.UUID.uuid(),v.createdAt=(s==null?void 0:s.timestamp)||N().toISOString(),v.author=(s==null?void 0:s.author)||"1",v.previousVersion=null,v.deleted=!1;const _=er(v,m);a?_.setParent(a,null):_.setParent(this.parent,null),p&&_.subscribe(),_.initChildren(s),s==null||s.add(_,G.Added);const I=(B=this.inputs)==null?void 0:B.map(K=>K.clone(s,_,P.UUID.uuid(),p));return _.inputs=I,t?(xi(this).map(K=>K.clone(s,_,P.UUID.uuid(),p)),s==null||s.attemptAutoclose("clone-entity",this.id),_):(s==null||s.attemptAutoclose("clone-entity",this.id),_)}getVariableInstances(){return kt(this).filter(l=>l.type===f.VariableInstance)}getArgument(s){return this.inputs.find(a=>a.id===s)||null}createCall(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"create-call")),a=this.project,l={}){const p={id:l.id||P.UUID.uuid(),version:l.version||P.UUID.uuid(),createdAt:l.createdAt||(s==null?void 0:s.timestamp)||N().toISOString(),author:l.author||P.sessionAuthor||"1",previousVersion:l.previousVersion||null,deleted:l.deleted||!1,type:f.FunctionCall,parent:a.toReference(),successCalls:l.successCalls||[],errorCalls:l.errorCalls||[],inputs:l.inputs||[],outputs:l.outputs||[],error:l.error||null,process:l.process||null,calledBySuccess:l.calledBySuccess||[],calledByError:l.calledByError||[],calledByEntry:l.calledByEntry||[],declaration:this.toJSON(),x:0,y:0},t=z(p,this.project);return t.hydrateAncestors(),s==null||s.add(t,G.Added),t.addSelfToProject(s),t.setParent(a,s),t.initChildren(s),t.afterAllChildrenInitialized(s),s==null||s.add(t,G.Added),s==null||s.attemptAutoclose("create-call",this.id),t}createInternalCall(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"create-internal")),a,l={}){const p={id:l.id||P.UUID.uuid(),version:l.version||P.UUID.uuid(),createdAt:l.createdAt||(s==null?void 0:s.timestamp)||N().toISOString(),author:l.author||P.sessionAuthor||"1",previousVersion:l.previousVersion||null,deleted:l.deleted||!1,type:f.InternalCall,parent:a.toReference(),successCalls:l.successCalls||[],errorCalls:l.errorCalls||[],inputs:l.inputs||[],outputs:l.outputs||[],error:l.error||null,process:l.process||null,calledBySuccess:l.calledBySuccess||[],calledByError:l.calledByError||[],calledByEntry:l.calledByEntry||[],declaration:this.toShallowJSON(),index:a.internalCalls.length},t=z(p,this.project);return t.hydrateAncestors(),s==null||s.add(t,G.Added),t.addSelfToProject(s),t.setParent(a,s),t.initChildren(s),t.afterAllChildrenInitialized(s),s==null||s.attemptAutoclose("create-internal",this.id),t}addReturnStatement(s){return this.returnStatements.includes(s)||this.returnStatements.push(s),this}removeReturnStatement(s){const a=this.returnStatements.indexOf(s);return a!==-1&&this.returnStatements.splice(a,1),this}getUniqueReturnDeclarations(){const s=[],a=[...this.returnStatements];this.parent.type===f.Loop&&a.push(...this.parent.breakStatements,...this.parent.continueStatements);const l=a.flatMap(p=>p.outputs);if(this.implements){const p=this.implements.outputs;return l.forEach(t=>{const m=p.find(b=>b===t.implements),v=s.find(b=>b.implements===t.implements);m&&!v&&s.push(t)}),w(s)}else return l.forEach(p=>{s.find(m=>m===p||fe(m,this.project)===fe(p,this.project)&&vs(m.dataType,p.dataType))||s.push(p)}),w(s)}};g(pt,"repository",{APICreate:async(s,...a)=>s,APIUpdate:async(s,...a)=>s,APIDelete:async(s,...a)=>s,APIClone:async(s,...a)=>{},APILoad:async(s,...a)=>null,APILoadVersion:async(s,a,...l)=>null}),g(pt,"type",f.FunctionDeclaration),g(pt,"USER_MANAGED_PARENT_TYPES",[f.Project,f.InstalledProject,f.DefinitionEntity,f.Loop]),g(pt,"PARENT_TYPES",[...pt.USER_MANAGED_PARENT_TYPES,f.BuiltInBaseEntity,f.PrimitiveEntity]),g(pt,"MUTABLE_BASE_PROPERTIES",["name","description","private"]),g(pt,"INMUTABLE_BASE_PROPERTIES",["id","type","version","createdAt","author","previousVersion"]),g(pt,"BASE_PROPERTIES",[...pt.MUTABLE_BASE_PROPERTIES,...pt.INMUTABLE_BASE_PROPERTIES]),g(pt,"MUTABLE_META_PROPERTIES",[...pt.MUTABLE_BASE_PROPERTIES,"x","y","index","collapsed"]),g(pt,"INMUTABLE_META_PROPERTIES",[...pt.INMUTABLE_BASE_PROPERTIES]),g(pt,"META_PROPERTIES",[...pt.MUTABLE_META_PROPERTIES,...pt.INMUTABLE_META_PROPERTIES]),g(pt,"MUTABLE_UPSTREAM_PROPERTIES",[]),g(pt,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","implements","extends"]),g(pt,"UPSTREAM_PROPERTIES",[...pt.MUTABLE_UPSTREAM_PROPERTIES,...pt.INMUTABLE_UPSTREAM_PROPERTIES]),g(pt,"MUTABLE_DOWNSTREAM_PROPERTIES",["inputs","calls"]),g(pt,"INMUATABLE_DOWNSTREAM_PROPERTIES",[]),g(pt,"DOWNSTREAM_PROPERTIES",[...pt.MUTABLE_DOWNSTREAM_PROPERTIES,...pt.INMUATABLE_DOWNSTREAM_PROPERTIES]),g(pt,"PROPERTIES",[...pt.META_PROPERTIES,...pt.UPSTREAM_PROPERTIES,...pt.DOWNSTREAM_PROPERTIES]);let _a=pt;function nM(u){const d=Yle(),s=u.toJSON();d.safeParse(s).success;const l=[];if(u.entity&&u.andChildrenGroup||u.entity&&u.orChildrenGroup||u.andChildrenGroup&&u.orChildrenGroup){const p=tt({id:u.id+"--"+me.InvalidPropertiesCombination,message:`Data type with id "${u.id}" has invalid properties combination. Only one of the following properties can be present at the time: 'entity', 'andChildrenGroup' or 'orChildrenGroup'`,issue:null,severity:S.Error,code:me.InvalidPropertiesCombination,entity:u});l.push(p.error)}return qt(u.errors,l)}const ape=Object.freeze(Object.defineProperty({__proto__:null,validate:nM},Symbol.toStringTag,{value:"Module"}));function ope(u,d){const s=[],a=[f.DefinitionEntity,f.ActionDescriptor,f.Property,f.ArgumentDeclaration,f.ReturnDeclaration,f.VariableDeclaration,f.ValueDescriptor,f.DataType],l=`'${Ke(a,"', '","' or '")}'`;if(u.parent)if(u.id===u.parent)s.push(new Y({id:`${u.id}--${u.parent}--${k.SelfReference}`,code:k.SelfReference,severity:S.Error,message:`Entity of type "${u.type}" with id "${u.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 p=d.get(u.parent);p?a.includes(p.type)||s.push(new Y({id:`${u.id}--${u.parent}--${k.InvalidParentReference}`,code:k.InvalidParentReference,severity:S.Error,message:`Entity of type "${u.type}" with id "${u.id}", has a parent reference that isn't pointing to an entity of type ${l}.`,issue:null})):s.push(new Y({id:`${u.id}--${u.parent}--${k.ReferencedEntityNotFound}`,code:k.ReferencedEntityNotFound,severity:S.Error,message:`Entity of type "${u.type}" with id "${u.id}", is referencing an entity with id "${u.parent}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}))}else s.push(new Y({id:`${u.id}--${le.InvalidObjectStructure}`,code:le.InvalidObjectStructure,severity:S.Error,message:`Entity of type "${u.type}" with id "${u.id}" is missing a 'parent' reference. The 'parent' of a 'data-type' entity must be a reference to an entity of type ${l}.`,issue:null}));if(u.entity){if(u.id===u.entity)return s.push(new Y({id:`${u.id}--${u.entity}--${k.SelfReference}`,code:k.SelfReference,severity:S.Error,message:`Entity of type "${u.type}" with id "${u.id}", has a reference to itself at 'entity'. This is not allowed. Change the reference string or the 'entityId' property of the reference object.`,issue:null})),s;const p=d.get(u.entity);p?[f.DefinitionEntity,f.PrimitiveEntity,f.ActionDescriptor,f.BuiltInBaseEntity].includes(p.type)||s.push(new Y({id:`${u.id}--${u.entity}--${k.InvalidImplementsReference}`,code:k.InvalidImplementsReference,severity:S.Error,message:`Entity of type "${u.type}" with id "${u.id}", has an 'entity' reference that isn't pointing to an entity of type 'definition-entity', 'primitive-entity', 'action-descriptor' or 'built-in-base-entity'.`,issue:null})):s.push(new Y({id:`${u.id}--${u.entity}--${k.ReferencedEntityNotFound}`,code:k.ReferencedEntityNotFound,severity:S.Error,message:`Entity of type "${u.type}" with id "${u.id}", is referencing an entity with id "${u.entity}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}))}return s}var xT=(u=>(u.Entity="entity",u))(xT||{});const ft=class ft extends nr{constructor(s,a){super(s);g(this,"initialData");g(this,"id");g(this,"isList",null);g(this,"asType",null);g(this,"type",f.DataType);g(this,"options",null);g(this,"parentRelationType",null);g(this,"like");g(this,"implementationChooseOne",!1);g(this,"inferred",!1);g(this,"staticEntities",null);g(this,"interactiveEntities",null);g(this,"actionEntities",null);g(this,"entity",null);g(this,"andChildrenGroup",null);g(this,"orChildrenGroup",null);g(this,"project");g(this,"errors",[]);g(this,"parent");g(this,"detachedDependents",{});g(this,"knownVersions",null);g(this,"activeVersion",!1);g(this,"initialized",!1);g(this,"startedInitialization",!1);this.initialData=s,this.project=a,this.id=s.id,this.isList=s.isList,this.asType=s.asType,this.options=s.options,this.parentRelationType=s.parentRelationType,this.inferred=s.inferred||!1,this.like=s.like||!1,this.implementationChooseOne=s.implementationChooseOne||!1,this.staticEntities=s.staticEntities,this.interactiveEntities=s.interactiveEntities,this.actionEntities=s.actionEntities}static new(s=null){return{id:P.UUID.uuid(),version:P.UUID.uuid(),createdAt:(s==null?void 0:s.timestamp)||N().toISOString(),author:(s==null?void 0:s.author)||P.sessionAuthor,previousVersion:null,deleted:!1,type:f.DataType,entity:null,isList:!1,like:!1,inferred:!1,implementationChooseOne:!1,parentRelationType:null,options:null,asType:null,staticEntities:null,interactiveEntities:null,actionEntities:null,andChildrenGroup:null,orChildrenGroup:null,parent:null}}static fromGenerationTarget(s,a){const l=W(s.parent),p=a.get(l);let t=null;s.entity&&(t=a.get(s.entity));const m={id:s.id,version:P.UUID.uuid(),createdAt:N().toISOString(),author:P.sessionAuthor,previousVersion:null,deleted:!1,type:f.DataType,andChildrenGroup:null,orChildrenGroup:null,parentRelationType:s.parentRelationType||null,options:s.options||null,isList:s.isList,like:s.like||!1,inferred:!1,implementationChooseOne:s.implementationChooseOne||!1,staticEntities:s.staticEntities??null,interactiveEntities:s.interactiveEntities??null,actionEntities:s.actionEntities??null,entity:t,asType:s.asType,parent:p},v=z(m,a);return v.setParent(p,null),v.initChildren(null),v}static validateGenerationTarget(s,a){var b;let l=JSON.parse(JSON.stringify(s));const p=[],t=ope(l,a);if(p.push(...t,...ur(l)),l.entity){const _=a.get(l.entity);if(_.type===f.DefinitionEntity){const V=hi(_).filter(B=>!B.interactive);if(V.length){const B=V.length>1?`entities with ids '${Ke(V.map(K=>K.id),"', '","' and '")}'`:`entity with id '${V[0].id}'`;p.push(new Y({id:`${s.id}--${k.NonInteractiveEntityReferenced}`,code:k.NonInteractiveEntityReferenced,severity:S.Error,message:`The entity with id '${s.id}' and type '${s.type}', cannot reference 'definition-entity' with id '${l.entity}' at 'entity'. The entity extends or implements non-interactive built-in-base-entity ${B}.
58
+ Please consider than any updates might affect the overlap with the signature of the parent entity's action descriptors.`,issue:null}))),{errors:a,modifiedData:s}}subscribeDependents(s){return s.forEach(a=>{this.detachedDependents[a.entity.id]||(this.detachedDependents[a.entity.id]=a)}),this}unsubscribeDependents(s){return s.forEach(a=>{this.detachedDependents[a.entity.id]&&delete this.detachedDependents[a.entity.id]}),this}syncDependents(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-dependents"))){const a=[],l=[],p=[],t=[];return Object.values(this.detachedDependents).forEach(m=>{const v=m.entity.afterAllChildrenInitialized(s);a.push(...v.updated),l.push(...v.added),p.push(...v.removed),t.push(...v.affected)}),s==null||s.attemptAutoclose("sync-dependents",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}onDetachedDependencyRemoved(s,a,l){const p=[],t=[],m=[],v=[];if(a==="function-declaration-implements"&&this.setImplements(null,l),a==="function-declaration-extends"){const{updated:b,added:_,removed:I,affected:V}=this.remove({ignoreUpstream:!1},l);p.push(...b),t.push(..._),m.push(...I),v.push(...V)}return{updated:w(p),added:w(t),removed:w(m),affected:w(v),self:this}}onDetachedDependencyRestored(s,a,l){const p=[],t=[],m=[],v=[];if(a==="function-declaration-implements"&&(this.setImplements(s,l),p.push(s)),a==="function-declaration-extends"){const{updated:b,added:_,removed:I,affected:V}=this.restore({},l);p.push(...b),t.push(..._),m.push(...I),v.push(...V)}return{updated:w(p),added:w(t),removed:w(m),affected:w(v),self:this}}unsubscribeFromDependencies(){var s,a;return(s=this.implements)==null||s.unsubscribeDependents([{entity:this,field:"function-declaration-implements"}]),(a=this.extends)==null||a.unsubscribeDependents([{entity:this,field:"function-declaration-extends"}]),this}subscribeToDependencies(){var s,a;return(s=this.implements)==null||s.subscribeDependents([{entity:this,field:"function-declaration-implements"}]),(a=this.extends)==null||a.subscribeDependents([{entity:this,field:"function-declaration-extends"}]),this}increaseVersion(s){if(s&&!N(s).isValid())throw new Error(`The shared timestamp '${s}' is not a valid ISO 8601 date string.`);return s&&N(s).isSame(N(this.createdAt))?this:(this.previousVersion=this.version,this.version=P.UUID.uuid(),this.createdAt=N(s).toISOString()||N().toISOString(),this)}captureVersion(){var a;const s=((a=this.knownVersions)==null?void 0:a.get(this.version))||new pt(this,this.project);return s.metaSync(this.toMeta(),null),this.knownVersions=this.knownVersions?this.knownVersions.set(this.version,s):new Map([[this.version,s]]),s.inputs=[...this.inputs],s.calls=[...this.calls],s.implements=this.implements,s.extends=this.extends,s.detachedChildren=[...this.detachedChildren],s.parent=this.parent,this}recursiveCaptureUpstreamVersions(s){const a=[],l=[],p=[],t=[];if(this.parent&&this.parent.type!==f.PrimitiveEntity&&this.parent.type!==f.BuiltInBaseEntity){this.parent.increaseVersion(s);const m=this.parent.recursiveCaptureUpstreamVersions(s);a.push(this.parent,...m.updated),l.push(...m.added),p.push(...m.removed)}return{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}async restoreVersion(s){var v;const a=[],l=[],p=[],t=[];if(this.version===s)return{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this};if(!this.knownVersions){const b=new Map;for(const[_,I]of this.knownVersions||new Map){if(b.set(_,I),I.activeVersion=!1,I.knownVersions)for(const[V,B]of I.knownVersions)b.set(V,B);I.knownVersions=null}}let m=(v=this.knownVersions)==null?void 0:v.get(s);if(!m){const b=await this.APILoadVersion({},s);if(!b)throw new Error(`Version with id '${s}' for entity with id '${this.id}' not found.`);m=new pt(b,this.project)}return this.metaSync(m.toShallowJSON(),null),this.previousVersion=m.previousVersion,this.version=m.version,this.createdAt=m.createdAt,this.author=m.author,this.deleted=m.deleted,this.inputs=m.inputs,this.calls=m.calls,this.implements=m.implements,this.detachedChildren=m.detachedChildren,this.parent=m.parent,{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}updateWithShallowTransfer(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"update-with-shallow-transfer"))){if(this.metaSync(s,a),this.version=s.version,this.createdAt=s.createdAt,this.author=s.author,this.deleted=s.deleted,this.previousVersion=s.previousVersion,this.unsubscribeFromDependencies(),s.parent){const l=W(s.parent),p=this.project.get(l),t=this.parent;if(t&&t.id!==(p==null?void 0:p.id)&&this.removeFromParent(a),p)this.setParent(p,null);else throw a==null||a.attemptAutoclose("update-with-shallow-transfer",this.id),new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${l}' that isn't found in the project`)}else throw a==null||a.attemptAutoclose("update-with-shallow-transfer",this.id),new Error(`${this.type} with id '${this.id}' must have a 'parent'`);if(s.implements){const l=W(s.implements),p=this.project.get(l);if(p)this.setImplements(p,a);else if(l)throw a==null||a.attemptAutoclose("update-with-shallow-transfer",this.id),new Error(`${kr(this.type)} with id '${this.id}' has a 'implements' reference "${l}" which is missing in the project`)}if(s.extends){const l=W(s.extends),p=this.project.get(l);if(p)this.setExtends(p,a);else if(l)throw new Error(`${kr(this.type)} with id '${this.id}' has a 'extends' reference "${l}" which is missing in the project`)}return this.captureVersion(),this.subscribeToDependencies(),a==null||a.attemptAutoclose("update-with-shallow-transfer",this.id),this}hydrateAncestors(){const s=[],a=[],l=[],p=[];if(this.initialData.parent){const t=W(this.initialData.parent),m=this.project.get(t);if(m)this.setParent(m,null),s.push(m);else throw new Error(`${kr(this.type)} with id '${this.id}' has a 'parent' reference "${t}" which is missing in the project`)}else throw new Error(`${kr(this.type)} with id '${this.id}' is missing a 'parent' reference`);if(this.initialData.implements){const t=W(this.initialData.implements),m=this.project.get(t);if(m)this.setImplements(m,null),s.push(m);else if(t)throw new Error(`${kr(this.type)} with id '${this.id}' has a 'implements' reference "${t}" which is missing in the project`)}if(this.initialData.extends){const t=W(this.initialData.extends),m=this.project.get(t);if(m)this.setExtends(m,null),s.push(m);else if(t)throw new Error(`${kr(this.type)} with id '${this.id}' has a 'extends' reference "${t}" which is missing in the project`)}return{updated:w(s),added:w(a),removed:w(l),affected:w(p),self:this}}afterAllChildrenInitialized(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"after-all-children-initialized"))){const a=[],l=[],p=[],t=[];return this.initialized=!0,this.captureVersion(),s==null||s.attemptAutoclose("after-all-children-initialized",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}addSelfToProject(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"add-self-to-project"))){const a=[this],l=[],p=[],t=[];return this.parent===this.project?this.project.addFunctionDeclaration(this):this.parent.type===f.DefinitionEntity?(this.parent.addMethod(this),t.push(this.parent)):this.parent.type===f.Loop&&(this.parent.setBody(this),t.push(this.parent)),this.subscribe(),this.subscribeToDependencies(),s==null||s.attemptAutoclose("add-self-to-project",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}replaceDetachedChild(s,a){const l=this.detachedChildren.indexOf(s);return l!==-1&&(this.detachedChildren[l]=a),this}subscribeDetachedChild(s){return this.detachedChildren.includes(s)||this.detachedChildren.push(s),this}unsubscribeDetachedChild(s){const a=this.detachedChildren.indexOf(s);return a!==-1&&this.detachedChildren.splice(a,1),this}addInputDeclaration(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"add-input-declaration"))){return this.inputs.includes(s)?(a==null||a.attemptAutoclose("add-input-declaration",this.id),this):(this.inputs.push(s),a==null||a.attemptAutoclose("add-input-declaration",this.id),this)}removeInputDeclaration(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"remove-input-declaration"))){const l=this.inputs.findIndex(p=>p.id===s.id);return l>-1&&(this.inputs.splice(l,1),a&&(a==null||a.add(this,G.Affected))),a==null||a.attemptAutoclose("remove-input-declaration",this.id),this}setParent(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"set-parent"))){var l;return((l=this.parent)==null?void 0:l.id)!==(s==null?void 0:s.id)&&(this.parent=s,a&&(a==null||a.add(this,G.Updated))),a==null||a.attemptAutoclose("set-parent",this.id),this}setImplements(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"set-implements"))){var l;return((l=this.implements)==null?void 0:l.id)!==(s==null?void 0:s.id)&&(this.implements=s,a&&(a==null||a.add(this,G.Updated))),a==null||a.attemptAutoclose("set-implements",this.id),this}setExtends(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"set-extends"))){var l;return((l=this.extends)==null?void 0:l.id)!==(s==null?void 0:s.id)&&(this.extends=s,a&&(a==null||a.add(this,G.Updated))),a==null||a.attemptAutoclose("set-extends",this.id),this}addCall(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"add-call"))){return this.calls.includes(s)||(this.calls.push(s),a==null||a.add(s,G.Affected)),a==null||a.attemptAutoclose("add-call",this.id),this}removeCall(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"remove-call"))){const l=this.calls.indexOf(s);return l!==-1&&(this.calls.splice(l,1),a==null||a.add(s,G.Affected)),a==null||a.attemptAutoclose("remove-call",this.id),this}initChildren(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"init-children"))){return this.initialized||this.startedInitialization?this:(this.startedInitialization=!0,this.inputs=this.initialData.inputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(s),l}),this.calls=this.initialData.calls.map(a=>{const l=z(a,this.project);return l.addEntryCaller(this,null),[f.BreakStatement,f.ContinueStatement].includes(l.type)?(l.setParent(this.parent,null),l.initChildren(s)):l.type!==f.InternalCall&&(l.setParent(this,null),l.initChildren(s)),l}),this.initialData.implements&&(this.implements=z(this.initialData.implements,this.project)),this.initialData.extends&&(this.extends=z(this.initialData.extends,this.project)),this.subscribeToDependencies(),this.afterAllChildrenInitialized(s),s==null||s.attemptAutoclose("init-children",this.id),this)}subscribe(){return this.activeVersion=!0,this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}metaSync(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"meta-sync"))){const l=cr(this,s),p=this.toMeta();return this.name=s.name!==void 0?s.name:p.name,this.description=s.description!==void 0?s.description:p.description,this.private=s.private!==void 0?s.private:this.private,this.index=s.index||(s.index!==0?p.index:0),this.collapsed=s.collapsed!==void 0?s.collapsed:p.collapsed,this.x=s.x||p.x,this.y=s.y||p.y,super.metaSync(s),s.deleted===!0&&!p.deleted?a==null||a.add(this,G.Removed):s.deleted===!1&&p.deleted?a==null||a.add(this,G.Added):l&&(a==null||a.add(this,G.Updated)),a==null||a.attemptAutoclose("meta-sync",this.id),this}async APILoad(s=oe,...a){return await pt.repository.APILoad(this.id,...a),this}async APICreate(s=oe,...a){return await pt.repository.APICreate(this.toShallowJSON(),...a),this}async APIUpdate(s=oe,...a){return await pt.repository.APIUpdate(this.toShallowJSON(),...a),this}async APIDelete(s=oe,...a){return await pt.repository.APIDelete(this.toShallowJSON(),...a),this}async APIClone(s=oe,...a){return await pt.repository.APIClone(this.id,...a),this}async APILoadVersion(s=oe,a,...l){return await pt.repository.APILoadVersion(this.id,a,...l)}removeFromParent(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"remove-from-parent"))){const a=[],l=[],p=[],t=[];return this.parent.type===f.DefinitionEntity?(this.parent.removeMethod(this),s==null||s.add(this.parent,G.Affected),t.push(this.parent)):this.parent.type===f.Loop?(this.parent.detachBody(),s==null||s.add(this.parent,G.Affected),t.push(this.parent)):this.parent.type===f.Project&&(this.project.removeFunctionDeclaration(this),s==null||s.add(this.parent,G.Affected),t.push(this.parent)),s==null||s.attemptAutoclose("remove-from-parent",this.id),{added:w(p),updated:w(a),removed:w(l),affected:w(t),self:this}}remove({ignoreUpstream:s}={ignoreUpstream:!1},a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"remove-entity"))){const l=[],p=[],t=[],m=[];if(a!=null&&a.hasRemoved(this.id))return a==null||a.attemptAutoclose("remove-entity",this.id),{added:[],updated:[],removed:[],affected:[],self:this};if(p.push(this),this.unsubscribe(),this.unsubscribeFromDependencies(),this.project.subscribeDeletedInstance(this),this.metaSync({deleted:!0},a),Object.values(this.detachedDependents).forEach(b=>{const{updated:_,removed:I,added:V}=b.entity.onDetachedDependencyRemoved(this,b.field,a);l.push(..._),p.push(...I),t.push(...V)}),this.inputs.forEach(b=>{const{updated:_,removed:I}=b.remove({ignoreUpstream:!0},a);l.push(..._),p.push(...I)}),xi(this).forEach(b=>{const{updated:_,removed:I}=b.remove({ignoreUpstream:!0},a);l.push(..._),p.push(...I)}),!s){const b=this.removeFromParent(a);t.push(...b.added),l.push(...b.updated),p.push(...b.removed),m.push(...b.affected)}return a==null||a.attemptAutoclose("remove-entity",this.id),{added:w(t),updated:w(l),removed:w(p),affected:w(m),self:this}}restore({}={},s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"restore-entity"))){const a=[],l=[],p=[],t=[];return s!=null&&s.hasAdded(this.id)?(s==null||s.attemptAutoclose("restore-entity",this.id),{added:[],updated:[],removed:[],affected:[],self:this}):(this.subscribe(),this.project.unsubscribeDeletedInstance(this),this.metaSync({deleted:!1},s),Object.values(this.detachedDependents).forEach(v=>{const{updated:b,removed:_,added:I}=v.entity.onDetachedDependencyRestored(this,v.field,s);l.push(...b),p.push(..._),a.push(...I)}),this.inputs.forEach(v=>{const{updated:b}=v.restore({},s);l.push(...b)}),xi(this).forEach(v=>{const{updated:b}=v.restore({},s);l.push(...b)}),this.parent.type===f.DefinitionEntity&&(this.parent.addMethod(this),s==null||s.add(this.parent,G.Affected),t.push(this.parent)),s==null||s.attemptAutoclose("restore-entity",this.id),{added:w(a),updated:w(l),removed:w(p),affected:w(t),self:this})}toFlat(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[this,...this.inputs.flatMap(l=>l.toFlat(s)),...this.calls.flatMap(l=>l.toFlat(s)),...this.returnStatements.flatMap(l=>l.toFlat(s)),...this.implements?this.implements.toFlat(s):[]])}toFlatIds(s=new Set){if(s.has(this.id))return[];s.add(this.id);const a=xi(this);return[this.id,...this.inputs.flatMap(p=>p.toFlatIds(s)),...this.calls.flatMap(p=>p.toFlatIds(s)),...this.returnStatements.flatMap(p=>p.toFlatIds(s)),...this.implements?this.implements.toFlatIds(s):[],...a.flatMap(p=>p.toFlatIds(s))]}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,description:this.description,collapsed:this.collapsed,private:this.private,index:this.index,x:this.x,y:this.y,type:this.type,name:this.name}}toJSON(s=new Set){var a,l;return s.has(this.id)?this.toReference():(s.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,index:this.index,x:this.x,y:this.y,collapsed:this.collapsed,private:this.private,calls:this.calls.map(p=>p.toJSON(s)),inputs:this.inputs.map(p=>p.toJSON(s)),implements:((a=this.implements)==null?void 0:a.toJSON(s))||null,extends:((l=this.extends)==null?void 0:l.toJSON(s))||null,parent:this.parent.toReference()})}toJSONClone(s=Ce){var l,p,t,m,v;let a;return(l=s.seenEntityMaps)!=null&&l.has(this.id)?a=s.seenEntityMaps.get(this.id):(a=s.newId||hr(this,this.project,s.uuidStrategy),s.seenEntityMaps&&s.seenEntityMaps.set(this.id,a)),(p=s.seenEntities)!=null&&p.has(a)||(t=s.seenEntities)!=null&&t.has(this.id)?this.toReference({seenEntityMaps:s.seenEntityMaps}):((m=s.seenEntities)==null||m.add(a),(v=s.seenEntities)==null||v.add(this.id),{id:a,version:P.UUID.uuid(),createdAt:s.timestamp||N().toISOString(),previousVersion:null,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,index:this.index,x:this.x,y:this.y,collapsed:this.collapsed,private:this.private,calls:this.calls.map(b=>b.toJSONClone({...s,newId:null})),inputs:this.inputs.map(b=>b.toJSONClone({...s,newId:null})),implements:(()=>{var b;return this.implements&&this.project.getBuiltIn(this.implements.id)?this.implements.toJSON():(b=this.implements)==null?void 0:b.toJSONClone({...s,newId:null})})(),extends:(()=>{var b;return this.extends&&this.project.getBuiltIn(this.extends.id)?this.extends.toJSON():(b=this.extends)==null?void 0:b.toJSONClone({...s,newId:null})})(),parent:this.parent.toReference({seenEntityMaps:s.seenEntityMaps})})}toReference(s=Ce){var l;let a=this.id;return(l=s.seenEntityMaps)!=null&&l.has(this.id)&&(a=s.seenEntityMaps.get(this.id)),{id:a+"--"+P.UUID.uuid()+"--ref",type:f.GenericReference,entityId:a,version:this.version,entityType:this.type}}toShallowJSON(s=Ce){var l,p,t;let a=this.id;return(l=s.seenEntityMaps)!=null&&l.has(this.id)&&(a=s.seenEntityMaps.get(this.id)),{id:a,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,index:this.index,collapsed:this.collapsed,private:this.private,x:this.x,y:this.y,inputs:this.inputs.map(m=>m.toReference(s)),calls:this.calls.map(m=>m.toReference(s)),implements:((p=this.implements)==null?void 0:p.toReference(s))||null,extends:((t=this.extends)==null?void 0:t.toReference(s))||null,parent:this.parent.toReference(s)}}toFlatJSON(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[this.toShallowJSON(),...this.inputs.flatMap(l=>l.toFlatJSON(s)),...this.calls.flatMap(l=>l.toFlatJSON(s)),...this.returnStatements.flatMap(l=>l.toFlatJSON(s)),...this.implements?this.implements.toFlatJSON(s):[]])}toGenerationTarget(){var a,l;const s=this.parent.type===f.Project?void 0:this.parent.id;return{id:this.id,name:this.name,description:this.description||void 0,type:this.type,private:this.private,implements:((a=this.implements)==null?void 0:a.id)||void 0,extends:((l=this.extends)==null?void 0:l.id)||void 0,parent:s}}toFlatGenerationTarget(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[this.toGenerationTarget(),...this.inputs.flatMap(l=>l.toFlatGenerationTarget(s)),...this.calls.flatMap(l=>l.toFlatGenerationTarget(s)),...this.returnStatements.flatMap(l=>l.toFlatGenerationTarget(s))])}clearErrors(){return this.errors=[],this.inputs.forEach(s=>s.clearErrors()),this.calls.forEach(s=>s.clearErrors()),this.returnStatements.forEach(s=>s.clearErrors()),this}validate(){const s=iM(this);return this.errors=[...s],{success:!0,error:null,data:this.toJSON()}}getErrors(){const s=xi(this);return[...this.errors,...this.inputs.flatMap(l=>l.getErrors()),...s.flatMap(l=>l.getErrors())]}getShallowErrors(){return this.errors}clone(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"clone-entity")),a=null,l=null,p=!0,t=!1){var B;let m=yr(a,this);const v=this.toJSON(),b=l||P.UUID.uuid();v.inputs=[],v.calls=[],v.id=b,v.version=P.UUID.uuid(),v.createdAt=(s==null?void 0:s.timestamp)||N().toISOString(),v.author=(s==null?void 0:s.author)||"1",v.previousVersion=null,v.deleted=!1;const _=er(v,m);a?_.setParent(a,null):_.setParent(this.parent,null),p&&_.subscribe(),_.initChildren(s),s==null||s.add(_,G.Added);const I=(B=this.inputs)==null?void 0:B.map(K=>K.clone(s,_,P.UUID.uuid(),p));return _.inputs=I,t?(xi(this).map(K=>K.clone(s,_,P.UUID.uuid(),p)),s==null||s.attemptAutoclose("clone-entity",this.id),_):(s==null||s.attemptAutoclose("clone-entity",this.id),_)}getVariableInstances(){return kt(this).filter(l=>l.type===f.VariableInstance)}getArgument(s){return this.inputs.find(a=>a.id===s)||null}createCall(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"create-call")),a=this.project,l={}){const p={id:l.id||P.UUID.uuid(),version:l.version||P.UUID.uuid(),createdAt:l.createdAt||(s==null?void 0:s.timestamp)||N().toISOString(),author:l.author||P.sessionAuthor||"1",previousVersion:l.previousVersion||null,deleted:l.deleted||!1,type:f.FunctionCall,parent:a.toReference(),successCalls:l.successCalls||[],errorCalls:l.errorCalls||[],inputs:l.inputs||[],outputs:l.outputs||[],error:l.error||null,process:l.process||null,calledBySuccess:l.calledBySuccess||[],calledByError:l.calledByError||[],calledByEntry:l.calledByEntry||[],declaration:this.toJSON(),x:0,y:0},t=z(p,this.project);return t.hydrateAncestors(),s==null||s.add(t,G.Added),t.addSelfToProject(s),t.setParent(a,s),t.initChildren(s),t.afterAllChildrenInitialized(s),s==null||s.add(t,G.Added),s==null||s.attemptAutoclose("create-call",this.id),t}createInternalCall(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"create-internal")),a,l={}){const p={id:l.id||P.UUID.uuid(),version:l.version||P.UUID.uuid(),createdAt:l.createdAt||(s==null?void 0:s.timestamp)||N().toISOString(),author:l.author||P.sessionAuthor||"1",previousVersion:l.previousVersion||null,deleted:l.deleted||!1,type:f.InternalCall,parent:a.toReference(),successCalls:l.successCalls||[],errorCalls:l.errorCalls||[],inputs:l.inputs||[],outputs:l.outputs||[],error:l.error||null,process:l.process||null,calledBySuccess:l.calledBySuccess||[],calledByError:l.calledByError||[],calledByEntry:l.calledByEntry||[],declaration:this.toShallowJSON(),index:a.internalCalls.length},t=z(p,this.project);return t.hydrateAncestors(),s==null||s.add(t,G.Added),t.addSelfToProject(s),t.setParent(a,s),t.initChildren(s),t.afterAllChildrenInitialized(s),s==null||s.attemptAutoclose("create-internal",this.id),t}addReturnStatement(s){return this.returnStatements.includes(s)||this.returnStatements.push(s),this}removeReturnStatement(s){const a=this.returnStatements.indexOf(s);return a!==-1&&this.returnStatements.splice(a,1),this}getUniqueReturnDeclarations(){const s=[],a=[...this.returnStatements];this.parent.type===f.Loop&&a.push(...this.parent.breakStatements,...this.parent.continueStatements);const l=a.flatMap(p=>p.outputs);if(this.implements&&this.parent.type!==f.Loop){const p=this.implements.outputs;return l.forEach(t=>{const m=p.find(b=>b===t.implements),v=s.find(b=>b.implements===t.implements);m&&!v&&s.push(t)}),w(s)}else return l.forEach(p=>{s.find(m=>m===p||fe(m,this.project)===fe(p,this.project)&&vs(m.dataType,p.dataType))||s.push(p)}),w(s)}};g(pt,"repository",{APICreate:async(s,...a)=>s,APIUpdate:async(s,...a)=>s,APIDelete:async(s,...a)=>s,APIClone:async(s,...a)=>{},APILoad:async(s,...a)=>null,APILoadVersion:async(s,a,...l)=>null}),g(pt,"type",f.FunctionDeclaration),g(pt,"USER_MANAGED_PARENT_TYPES",[f.Project,f.InstalledProject,f.DefinitionEntity,f.Loop]),g(pt,"PARENT_TYPES",[...pt.USER_MANAGED_PARENT_TYPES,f.BuiltInBaseEntity,f.PrimitiveEntity]),g(pt,"MUTABLE_BASE_PROPERTIES",["name","description","private"]),g(pt,"INMUTABLE_BASE_PROPERTIES",["id","type","version","createdAt","author","previousVersion"]),g(pt,"BASE_PROPERTIES",[...pt.MUTABLE_BASE_PROPERTIES,...pt.INMUTABLE_BASE_PROPERTIES]),g(pt,"MUTABLE_META_PROPERTIES",[...pt.MUTABLE_BASE_PROPERTIES,"x","y","index","collapsed"]),g(pt,"INMUTABLE_META_PROPERTIES",[...pt.INMUTABLE_BASE_PROPERTIES]),g(pt,"META_PROPERTIES",[...pt.MUTABLE_META_PROPERTIES,...pt.INMUTABLE_META_PROPERTIES]),g(pt,"MUTABLE_UPSTREAM_PROPERTIES",[]),g(pt,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","implements","extends"]),g(pt,"UPSTREAM_PROPERTIES",[...pt.MUTABLE_UPSTREAM_PROPERTIES,...pt.INMUTABLE_UPSTREAM_PROPERTIES]),g(pt,"MUTABLE_DOWNSTREAM_PROPERTIES",["inputs","calls"]),g(pt,"INMUATABLE_DOWNSTREAM_PROPERTIES",[]),g(pt,"DOWNSTREAM_PROPERTIES",[...pt.MUTABLE_DOWNSTREAM_PROPERTIES,...pt.INMUATABLE_DOWNSTREAM_PROPERTIES]),g(pt,"PROPERTIES",[...pt.META_PROPERTIES,...pt.UPSTREAM_PROPERTIES,...pt.DOWNSTREAM_PROPERTIES]);let _a=pt;function nM(u){const d=Yle(),s=u.toJSON();d.safeParse(s).success;const l=[];if(u.entity&&u.andChildrenGroup||u.entity&&u.orChildrenGroup||u.andChildrenGroup&&u.orChildrenGroup){const p=tt({id:u.id+"--"+me.InvalidPropertiesCombination,message:`Data type with id "${u.id}" has invalid properties combination. Only one of the following properties can be present at the time: 'entity', 'andChildrenGroup' or 'orChildrenGroup'`,issue:null,severity:S.Error,code:me.InvalidPropertiesCombination,entity:u});l.push(p.error)}return qt(u.errors,l)}const ape=Object.freeze(Object.defineProperty({__proto__:null,validate:nM},Symbol.toStringTag,{value:"Module"}));function ope(u,d){const s=[],a=[f.DefinitionEntity,f.ActionDescriptor,f.Property,f.ArgumentDeclaration,f.ReturnDeclaration,f.VariableDeclaration,f.ValueDescriptor,f.DataType],l=`'${Ke(a,"', '","' or '")}'`;if(u.parent)if(u.id===u.parent)s.push(new Y({id:`${u.id}--${u.parent}--${k.SelfReference}`,code:k.SelfReference,severity:S.Error,message:`Entity of type "${u.type}" with id "${u.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 p=d.get(u.parent);p?a.includes(p.type)||s.push(new Y({id:`${u.id}--${u.parent}--${k.InvalidParentReference}`,code:k.InvalidParentReference,severity:S.Error,message:`Entity of type "${u.type}" with id "${u.id}", has a parent reference that isn't pointing to an entity of type ${l}.`,issue:null})):s.push(new Y({id:`${u.id}--${u.parent}--${k.ReferencedEntityNotFound}`,code:k.ReferencedEntityNotFound,severity:S.Error,message:`Entity of type "${u.type}" with id "${u.id}", is referencing an entity with id "${u.parent}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}))}else s.push(new Y({id:`${u.id}--${le.InvalidObjectStructure}`,code:le.InvalidObjectStructure,severity:S.Error,message:`Entity of type "${u.type}" with id "${u.id}" is missing a 'parent' reference. The 'parent' of a 'data-type' entity must be a reference to an entity of type ${l}.`,issue:null}));if(u.entity){if(u.id===u.entity)return s.push(new Y({id:`${u.id}--${u.entity}--${k.SelfReference}`,code:k.SelfReference,severity:S.Error,message:`Entity of type "${u.type}" with id "${u.id}", has a reference to itself at 'entity'. This is not allowed. Change the reference string or the 'entityId' property of the reference object.`,issue:null})),s;const p=d.get(u.entity);p?[f.DefinitionEntity,f.PrimitiveEntity,f.ActionDescriptor,f.BuiltInBaseEntity].includes(p.type)||s.push(new Y({id:`${u.id}--${u.entity}--${k.InvalidImplementsReference}`,code:k.InvalidImplementsReference,severity:S.Error,message:`Entity of type "${u.type}" with id "${u.id}", has an 'entity' reference that isn't pointing to an entity of type 'definition-entity', 'primitive-entity', 'action-descriptor' or 'built-in-base-entity'.`,issue:null})):s.push(new Y({id:`${u.id}--${u.entity}--${k.ReferencedEntityNotFound}`,code:k.ReferencedEntityNotFound,severity:S.Error,message:`Entity of type "${u.type}" with id "${u.id}", is referencing an entity with id "${u.entity}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}))}return s}var xT=(u=>(u.Entity="entity",u))(xT||{});const ft=class ft extends nr{constructor(s,a){super(s);g(this,"initialData");g(this,"id");g(this,"isList",null);g(this,"asType",null);g(this,"type",f.DataType);g(this,"options",null);g(this,"parentRelationType",null);g(this,"like");g(this,"implementationChooseOne",!1);g(this,"inferred",!1);g(this,"staticEntities",null);g(this,"interactiveEntities",null);g(this,"actionEntities",null);g(this,"entity",null);g(this,"andChildrenGroup",null);g(this,"orChildrenGroup",null);g(this,"project");g(this,"errors",[]);g(this,"parent");g(this,"detachedDependents",{});g(this,"knownVersions",null);g(this,"activeVersion",!1);g(this,"initialized",!1);g(this,"startedInitialization",!1);this.initialData=s,this.project=a,this.id=s.id,this.isList=s.isList,this.asType=s.asType,this.options=s.options,this.parentRelationType=s.parentRelationType,this.inferred=s.inferred||!1,this.like=s.like||!1,this.implementationChooseOne=s.implementationChooseOne||!1,this.staticEntities=s.staticEntities,this.interactiveEntities=s.interactiveEntities,this.actionEntities=s.actionEntities}static new(s=null){return{id:P.UUID.uuid(),version:P.UUID.uuid(),createdAt:(s==null?void 0:s.timestamp)||N().toISOString(),author:(s==null?void 0:s.author)||P.sessionAuthor,previousVersion:null,deleted:!1,type:f.DataType,entity:null,isList:!1,like:!1,inferred:!1,implementationChooseOne:!1,parentRelationType:null,options:null,asType:null,staticEntities:null,interactiveEntities:null,actionEntities:null,andChildrenGroup:null,orChildrenGroup:null,parent:null}}static fromGenerationTarget(s,a){const l=W(s.parent),p=a.get(l);let t=null;s.entity&&(t=a.get(s.entity));const m={id:s.id,version:P.UUID.uuid(),createdAt:N().toISOString(),author:P.sessionAuthor,previousVersion:null,deleted:!1,type:f.DataType,andChildrenGroup:null,orChildrenGroup:null,parentRelationType:s.parentRelationType||null,options:s.options||null,isList:s.isList,like:s.like||!1,inferred:!1,implementationChooseOne:s.implementationChooseOne||!1,staticEntities:s.staticEntities??null,interactiveEntities:s.interactiveEntities??null,actionEntities:s.actionEntities??null,entity:t,asType:s.asType,parent:p},v=z(m,a);return v.setParent(p,null),v.initChildren(null),v}static validateGenerationTarget(s,a){var b;let l=JSON.parse(JSON.stringify(s));const p=[],t=ope(l,a);if(p.push(...t,...ur(l)),l.entity){const _=a.get(l.entity);if(_.type===f.DefinitionEntity){const V=hi(_).filter(B=>!B.interactive);if(V.length){const B=V.length>1?`entities with ids '${Ke(V.map(K=>K.id),"', '","' and '")}'`:`entity with id '${V[0].id}'`;p.push(new Y({id:`${s.id}--${k.NonInteractiveEntityReferenced}`,code:k.NonInteractiveEntityReferenced,severity:S.Error,message:`The entity with id '${s.id}' and type '${s.type}', cannot reference 'definition-entity' with id '${l.entity}' at 'entity'. The entity extends or implements non-interactive built-in-base-entity ${B}.
59
59
  ${xa}`,issue:null}))}}}const m=l.parent&&a.get(l.parent)||a.getBuiltIn(l.parent),v=m?ka(m):null;if(v)p.push(new Y({id:`${s.id}--${k.BuiltInEntityParent}`,code:k.BuiltInEntityParent,severity:S.Error,message:`The entity with id '${s.id}' and type '${s.type}', belongs to a built-in system entity "${fe(v,a)}" with id '${v.id}', and therefore it cannot be created as it would affect a built in entity, which are inmutable.`,issue:null}));else if(m){const _=m.type,I=[f.Property,f.VariableDeclaration,f.ArgumentDeclaration,f.ReturnDeclaration,f.ValueDescriptor];if(I.includes(_)&&(l.parentRelationType&&p.push(new Y({id:`${s.id}--${k.InvalidParentRelationType}`,code:k.InvalidParentRelationType,severity:S.Error,message:`The entity with id '${s.id}' and type '${s.type}', cannot have a 'parentRelationType' property set of type '${_}'.
60
60
  The entitities of type '${Ke(I,"', '","' and '")}' can only have one 'data-type' child under the 'dataType' property so no 'parentRelationType' is needed.`,issue:null})),m.dataType)){const V=(b=m.dataType)==null?void 0:b.id;p.push(new Y({id:`${s.id}--${k.NewEntityWouldOverriteExisting}`,code:k.NewEntityWouldOverriteExisting,severity:S.Error,message:`The entity with id '${s.id}' and type '${s.type}', cannot be added as a child to the entity with id '${l.parent}' and type '${_}', because it already has a 'data-type' child with id '${V}'.
61
61
  The entitities of type '${Ke(I,"', '","' and '")}' can only have one 'data-type' child under the 'dataType' property. You can inspect the existing data-type entity with the 'describe_entity' action. Like so:
@@ -398,4 +398,4 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
398
398
  You can inspect the existing 'entity' field with the 'describe_entity' action. Like so:
399
399
  ${En({describe_entity:b.entity.id})}
400
400
  Alternatively you can update the parent data-type entity with 'update' action to remove the existing value of the field.`,issue:null}))}return{errors:p,modifiedData:l}}get interactive(){return this.implements.length?this.implements.every(s=>s.interactive):!0}get allMethods(){return w([...this.ownDeclaredMethods,...this.allBaseMethodsFromOriginalParents])}get allProperties(){return w([...this.ownDeclaredProperties,...this.allBasePropertiesFromOriginalParents])}get allBaseMethodsFromOriginalParents(){return w([...this.extends.flatMap(s=>s.allMethods,[]),...this.implements.flatMap(s=>s.allMethods,[])])}get allBasePropertiesFromOriginalParents(){return w([...this.extends.flatMap(s=>s.allProperties,[]),...this.implements.flatMap(s=>s.allProperties,[])])}get allBasePropertiesFromExtendedAndImplementedEntities(){return w([...this.extends.reduce((s,a)=>[...[...a.ownDeclaredProperties,...a.allBasePropertiesFromExtendedAndImplementedEntities].filter(p=>!p.abstract),...s],[]),...this.implements.reduce((s,a)=>[...[...a.ownDeclaredProperties,...a.allBasePropertiesFromExtendedAndImplementedEntities].filter(p=>!p.abstract),...s],[])])}get allBaseMethodsFromExtendedAndImplementedEntities(){return w([...this.extends.reduce((s,a)=>a.type!==f.DefinitionEntity?[]:[...[...a.ownDeclaredMethods,...a.allBaseMethodsFromExtendedAndImplementedEntities].filter(p=>p.type!==f.ActionDescriptor),...s],[]),...this.implements.reduce((s,a)=>a.type!==f.DefinitionEntity?a.abstractMethods:[...[...a.ownDeclaredMethods,...a.allBaseMethodsFromExtendedAndImplementedEntities].filter(p=>p.type!==f.ActionDescriptor),...s],[])])}get extendedPropertiesFromOriginalParents(){return w(this.extends.reduce((s,a)=>{const l=[...a.ownDeclaredProperties,...a.extendedPropertiesFromOriginalParents].filter(p=>!p.abstract);return[...s,...l]},[]))}get implementedPropertiesFromOriginalParents(){return w([...this.extends.reduce((s,a)=>{const l=a.implementedPropertiesFromOriginalParents,p=[...a.ownDeclaredProperties].filter(t=>!!t.abstract&&!l.find(m=>m.name===t.name));return[...l,...p,...s]},[]),...this.implements.reduce((s,a)=>{const l=a.implementedPropertiesFromOriginalParents,p=[...a.ownDeclaredProperties].filter(t=>!!t.abstract&&!l.find(m=>m.name===t.name));return[...l,...p,...s]},[])].filter(s=>!!s.abstract))}get extendedMethodsFromOriginalParents(){return w(this.extends.reduce((s,a)=>{if(a.type!==f.DefinitionEntity)return[];const l=[...a.ownDeclaredMethods,...a.extendedMethodsFromOriginalParents].filter(p=>p.type!==f.ActionDescriptor);return[...s,...l]},[]))}get implementedMethodsFromOriginalParents(){return w([...this.extends.reduce((s,a)=>{const l=a.type===f.DefinitionEntity?a.methods:[],p=[...a.abstractMethods].filter(t=>!l.find(m=>m.name===t.name));return[...l,...p,...s]},[]),...this.implements.reduce((s,a)=>[...a.abstractMethods,...s],[])].filter(s=>s.type===f.ActionDescriptor))}get extendedProperties(){return this.properties.filter(s=>s.isExtendedProperty)}get ownDeclaredProperties(){return this.properties.filter(s=>!s.isExtendedProperty)}get extendedMethods(){return this.methods.filter(s=>s.isExtendedMethod)}get ownDeclaredMethods(){return this.methods.filter(s=>!s.isExtendedMethod)}validateGeneratedUpdate(s){const a=[];return s.parent&&a.push(new Y({id:`${this.id}--${k.InvalidParentUpdate}`,code:k.InvalidParentUpdate,severity:S.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:a,modifiedData:s}}subscribeDependents(s){return s.forEach(a=>{this.detachedDependents[a.entity.id]||(this.detachedDependents[a.entity.id]=a)}),this}unsubscribeDependents(s){return s.forEach(a=>{this.detachedDependents[a.entity.id]&&delete this.detachedDependents[a.entity.id]}),this}syncDependents(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-dependents"))){const a=[],l=[],p=[],t=[];return Object.values(this.detachedDependents).forEach(m=>{const v=m.entity.afterAllChildrenInitialized(s);a.push(...v.updated),l.push(...v.added),p.push(...v.removed),t.push(...v.affected)}),s==null||s.attemptAutoclose("sync-dependents",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}onDetachedDependencyRemoved(s,a,l){const p=[],t=[],m=[],v=[];return a==="implements"&&this.removeImplementation(s),a==="extends"&&this.removeExtension(s),{updated:w(p),added:w(t),removed:w(m),affected:w(v),self:this}}onDetachedDependencyRestored(s,a,l){const p=[],t=[],m=[],v=[];return a==="implements"&&this.addImplementation(s),a==="extends"&&this.addExtension(s),{updated:w(p),added:w(t),removed:w(m),affected:w(v),self:this}}unsubscribeFromDependencies(){return this.implements.forEach(s=>{Pi.includes(s.type)||s.unsubscribeDependents([{entity:this,field:"implements"}])}),this}subscribeToDependencies(){return this.implements.forEach(s=>{Pi.includes(s.type)||s.subscribeDependents([{entity:this,field:"implements"}])}),this.extends.forEach(s=>{Pi.includes(s.type)||s.subscribeDependents([{entity:this,field:"extends"}])}),this}increaseVersion(s){if(s&&!N(s).isValid())throw new Error(`The shared timestamp '${s}' is not a valid ISO 8601 date string.`);return s&&N(s).isSame(N(this.createdAt))?this:(this.previousVersion=this.version,this.version=P.UUID.uuid(),this.createdAt=N(s).toISOString()||N().toISOString(),this)}captureVersion(){var a;const s=((a=this.knownVersions)==null?void 0:a.get(this.version))||new _t(this,this.project);return s.metaSync(this.toMeta(),null),this.knownVersions=this.knownVersions?this.knownVersions.set(this.version,s):new Map([[this.version,s]]),s.properties=[...this.properties],s.methods=[...this.methods],s.abstractMethods=[...this.abstractMethods],s.extends=[...this.extends],s.implements=[...this.implements],s.parent=this.parent,this}recursiveCaptureUpstreamVersions(s){const a=[],l=[],p=[],t=[];if(this.parent){this.parent.increaseVersion(s);const m=this.parent.recursiveCaptureUpstreamVersions(s);a.push(this.parent,...m.updated),l.push(...m.added),p.push(...m.removed)}return{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}async restoreVersion(s){var v;const a=[],l=[],p=[],t=[];if(this.version===s)return{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this};if(!this.knownVersions){const b=new Map;for(const[_,I]of this.knownVersions||new Map){if(b.set(_,I),I.activeVersion=!1,I.knownVersions)for(const[V,B]of I.knownVersions)b.set(V,B);I.knownVersions=null}}let m=(v=this.knownVersions)==null?void 0:v.get(s);if(!m){const b=await this.APILoadVersion({},s);if(!b)throw new Error(`Version with id '${s}' for entity with id '${this.id}' not found.`);m=new _t(b,this.project)}return this.metaSync(m.toShallowJSON(),null),this.previousVersion=m.previousVersion,this.version=m.version,this.createdAt=m.createdAt,this.author=m.author,this.deleted=m.deleted,this.properties=m.properties,this.methods=m.methods,this.abstractMethods=m.abstractMethods,this.extends=m.extends,this.implements=m.implements,this.parent=m.parent,{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}updateWithShallowTransfer(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"update-with-shallow-transfer"))){if(this.metaSync(s,a),this.version=s.version,this.createdAt=s.createdAt,this.author=s.author,this.deleted=s.deleted,this.previousVersion=s.previousVersion,this.unsubscribeFromDependencies(),s.parent){const l=W(s.parent),p=this.project.get(l),t=this.parent;if(t&&t.id!==(p==null?void 0:p.id)&&this.removeFromParent(a),p)this.setParent(p,a);else throw a==null||a.attemptAutoclose("update-with-shallow-transfer",this.id),new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${l}' that isn't found in the project`)}else throw a==null||a.attemptAutoclose("update-with-shallow-transfer",this.id),new Error(`${this.type} with id '${this.id}' must have a 'parent'`);return s.extends.forEach(l=>{const p=W(l),t=this.project.get(p);t&&this.addExtension(t)}),s.implements.forEach(l=>{const p=W(l),t=this.project.get(p);t&&this.addImplementation(t)}),this.captureVersion(),this.subscribeToDependencies(),a==null||a.attemptAutoclose("update-with-shallow-transfer",this.id),this}hydrateAncestors(){const s=[],a=[],l=[],p=[];if(this.initialData.parent){const t=W(this.initialData.parent),m=this.project.get(t);if(m)this.setParent(m,null),s.push(m);else throw new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${t}' that isn't found in the project`)}else throw new Error(`${this.type} with id '${this.id}' must have a 'parent'`);return this.initialData.extends.forEach(t=>{const m=W(t),v=this.project.get(m);v&&(this.addExtension(v),v.type!==f.BuiltInBaseEntity&&s.push(v))}),this.initialData.implements.forEach(t=>{const m=W(t),v=this.project.get(m);v&&(this.addImplementation(v),v.type!==f.BuiltInBaseEntity&&s.push(v))}),{updated:w(s),added:w(a),removed:w(l),affected:w(p),self:this}}afterAllChildrenInitialized(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"after-all-children-initialized"))){const a=[],l=[],p=[],t=[];this.initialized=!0;const{updated:m,added:v,removed:b,affected:_}=this.syncImplementationProperties(s);a.push(...m),l.push(...v),p.push(...b),t.push(..._);const{updated:I,added:V,removed:B,affected:K}=this.addExtendedProperties(s);a.push(...I),l.push(...V),p.push(...B),t.push(...K);const{updated:q,added:Z,removed:re}=this.removeUnrecognizedProperties(s);a.push(...q),l.push(...Z),p.push(...re);const{updated:ue,added:Q,removed:_e,affected:X}=this.syncImplementationMethods(s);a.push(...ue),l.push(...Q),p.push(..._e),t.push(...X);const{updated:Ee,added:se,removed:de,affected:ye}=this.addExtendedMethods(s);a.push(...Ee),l.push(...se),p.push(...de),t.push(...ye);const{updated:H,added:ce,removed:De}=this.removeUnrecognizedMethods(s);return a.push(...H),l.push(...ce),p.push(...De),this.addSuggestions(),this.captureVersion(),s==null||s.attemptAutoclose("after-all-children-initialized",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}addSelfToProject(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"add-self-to-project"))){const a=[this],l=[],p=[],t=[];if(this.parent.type===f.DataType){const m=this.parent;m.entity=this,a.push(m)}else this.project.addDefinitionEntity(this);return this.subscribe(),this.subscribeToDependencies(),s==null||s.attemptAutoclose("add-self-to-project",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}setParent(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"set-parent"))){var l;return((l=this.parent)==null?void 0:l.id)!==(s==null?void 0:s.id)&&(this.parent=s,a&&(a==null||a.add(this,G.Updated))),a==null||a.attemptAutoclose("set-parent",this.id),this}addExtension(s){return this.extends.includes(s)||this.extends.push(s),this}removeExtension(s){return this.extends=this.extends.filter(a=>a.id!==s.id),this}addImplementation(s){return this.implements.includes(s)||this.implements.push(s),this}removeImplementation(s){return this.implements=this.implements.filter(a=>a.id!==s.id),this}removeProperty(s){return this.properties=this.properties.filter(a=>a.id!==s.id),this}addMethod(s){return this.methods.includes(s)||(this.methods.push(s),this.suggestedMethods=this.suggestedMethods.filter(a=>a.name!==s.name)),this}removeMethod(s){return this.methods=this.methods.filter(a=>a.id!==s.id),this}addProperty(s){return this.properties.includes(s)||(this.properties.push(s),this.suggestedProperties=this.suggestedProperties.filter(a=>a.name!==s.name)),this}addSuggestedProperty(s){return this.suggestedProperties.includes(s)||this.suggestedProperties.push(s),this}addSuggestedMethod(s){return this.suggestedMethods.includes(s)||this.suggestedMethods.push(s),this}removeSuggestedProperty(s){return this.suggestedProperties=this.suggestedProperties.filter(a=>a.id!==s.id),this}removeSuggestedMethod(s){return this.suggestedMethods=this.suggestedMethods.filter(a=>a.id!==s.id),this}addAbstractMethod(s){return this.abstractMethods.includes(s)||this.abstractMethods.push(s),this}removeAbstractMethod(s){return this.abstractMethods=this.abstractMethods.filter(a=>a.id!==s.id),this}initChildren(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"init-children"))){return this.initialized||this.startedInitialization?this:(this.startedInitialization=!0,this.properties=this.initialData.properties.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(s),l}),this.methods=this.initialData.methods.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(s),l}),this.abstractMethods=this.initialData.abstractMethods.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(s),l}),this.extends=this.initialData.extends.map(a=>z(a,this.project)),this.implements=this.initialData.implements.map(a=>z(a,this.project)),this.subscribeToDependencies(),this.afterAllChildrenInitialized(s),s==null||s.attemptAutoclose("init-children",this.id),this)}removeUnrecognizedProperties(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"remove-unrecognized-properties"))){const a=[],l=[],p=[],t=[];let m=[...this.properties];m=m.filter(b=>b.parent.id===this.id),m=m.filter(b=>!b.isExtendedProperty);const v=this.implementedPropertiesFromOriginalParents;return m=m.filter(b=>this.interactive&&!b.implements?!1:!v.find(_=>{var I;return _.id===((I=b.implements)==null?void 0:I.id)})),m.forEach(b=>{const _=b.remove({ignoreUpstream:!1},s);p.push(..._.removed),a.push(..._.updated)}),s==null||s.attemptAutoclose("remove-unrecognized-properties",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}removeUnrecognizedMethods(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"remove-unrecognized-methods"))){const a=[],l=[],p=[],t=[];let m=[...this.methods];m=m.filter(b=>b.parent.id===this.id),m=m.filter(b=>!b.isExtendedMethod);const v=this.implementedMethodsFromOriginalParents;return m=m.filter(b=>this.interactive&&!b.implements?!1:!v.find(_=>{var I;return _.id===((I=b.implements)==null?void 0:I.id)})),m.forEach(b=>{const _=b.remove({ignoreUpstream:!1},s);p.push(..._.removed),a.push(..._.updated)}),s==null||s.attemptAutoclose("remove-unrecognized-methods",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}syncImplementationMethods(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-implementation-methods"))){const a=[],l=[],p=[],t=[],m=this.methods,v=this.implementedMethodsFromOriginalParents,b=[...this.allBaseMethodsFromExtendedAndImplementedEntities,...m];return v.filter(I=>!b.find(B=>{var K;return((K=B.implements)==null?void 0:K.id)===I.id})).forEach(I=>{if(this.methods.find(q=>{var Z;return((Z=q.implements)==null?void 0:Z.id)===I.id}))return;const B=this.methods.find(q=>{var _e,X;if(q.name===I.name&&!q.implements)return!0;const Z=As(this,Oe.CRON_JOB),re=As(this,Oe.HTTP_ENDPOINT),ue=((_e=q.implements)==null?void 0:_e.id)===pe["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.methods.handler.id,Q=((X=q.implements)==null?void 0:X.id)===pe["built-in-base-entity"].BUILT_IN_CRON_JOB_ENTITY.methods.handler.id;return!!(Z&&!Q&&!re&&ue||re&&!ue&&!Z&&Q)});if(B&&B.type===f.FunctionDeclaration){B.setImplements(I),B.metaSync({name:I.name},s),s==null||s.add(B,G.Updated),s==null||s.add(this,G.Updated);return}const K=I.implementAsFunctionDeclaration(s,this);l.push(K),s==null||s.add(K,G.Added),this.addMethod(K)}),s==null||s.attemptAutoclose("sync-implementation-methods",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}syncImplementationProperties(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-implementation-properties"))){const a=[],l=[],p=[],t=[],m=this.properties,v=this.implementedPropertiesFromOriginalParents,b=[...this.allBasePropertiesFromExtendedAndImplementedEntities,...m];return v.filter(I=>!b.find(B=>{var K;return((K=B.implements)==null?void 0:K.id)===I.id})).forEach(I=>{if(this.properties.find(q=>{var Z;return((Z=q.implements)==null?void 0:Z.id)===I.id}))return;const B=this.properties.find(q=>q.name===I.name&&!!q.abstract&&!q.implements);if(B){B.setImplements(I,s),B.metaSync({abstract:!1},s),B.afterAllChildrenInitialized(s);return}const K=I.implement(this,s,P.UUID.uuid());l.push(K),s==null||s.add(K,G.Added)}),s==null||s.attemptAutoclose("sync-implementation-properties",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}addExtendedMethods(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"add-extended-methods"))){const a=[],l=[],p=[],t=[],m=this.methods,b=this.extendedMethodsFromOriginalParents.filter(I=>I.type===f.FunctionDeclaration),_=new Set(m.filter(I=>{var V;return!!((V=I.extends)!=null&&V.id)}).map(I=>I.extends.id));return b.forEach(I=>{if(_.has(I.id))return;_.add(I.id);const V=I.clone(s,this,P.UUID.uuid());V.setExtends(I,s),V.initChildren(s),l.push(V),s==null||s.add(V,G.Added),this.addMethod(V)}),s==null||s.attemptAutoclose("add-extended-methods",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}addExtendedProperties(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"add-extended-properties"))){const a=[],l=[],p=[],t=[],m=this.properties,v=this.extendedPropertiesFromOriginalParents,b=v.filter(I=>v.find(B=>{var K;return((K=B.implements)==null?void 0:K.id)===I.id})?!1:!I.abstract),_=new Set(m.filter(I=>{var V;return!!((V=I.extends)!=null&&V.id)}).map(I=>I.extends.id));return b.forEach(I=>{if(_.has(I.id))return;_.add(I.id);const V=I.clone(s,this,P.UUID.uuid());V.setExtends(I,s),V.initChildren(s),l.push(V),s==null||s.add(V,G.Added),this.addProperty(V)}),s==null||s.attemptAutoclose("add-extended-properties",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}addSuggestions(){return this.implements.forEach(s=>{Ej(this,s).forEach(p=>{const t=p.toJSON();t.id=`_suggestion--parent--${this.id}--${p.id}`;const m=z(t,this.project);m.suggestion=!0,m.setParent(this,null),m.initChildren(null),this.addSuggestedProperty(m)}),Tj(this,s).forEach(p=>{const t=`_suggestion--parent--${this.id}--${p.id}`,m=p.implementAsFunctionDeclaration(null,this,t),v=z(m,this.project);if(v.suggestion=!0,v.setParent(this,null),v.initChildren(null),this.methods=this.methods.filter(b=>b.id!==t),v.inputs.forEach(b=>{b.suggestion=!0}),v.returnStatements.length){const b=v.returnStatements[0];b.suggestion=!0,b.outputs.forEach(_=>{_.suggestion=!0})}this.addSuggestedMethod(v)})}),this}subscribe(){return this.activeVersion=!0,this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}metaSync(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"meta-sync"))){const l=cr(this,s),p=this.toMeta();return this.name=s.name!==void 0?s.name:p.name,this.description=s.description!==void 0?s.description:p.description,this.x=s.x||p.x,this.y=s.y||p.y,this.static=s.static!==void 0?s.static:this.static,this.abstract=s.abstract!==void 0?s.abstract:this.abstract,super.metaSync(s),s.deleted===!0&&!p.deleted?a==null||a.add(this,G.Removed):s.deleted===!1&&p.deleted?a==null||a.add(this,G.Added):l&&(a==null||a.add(this,G.Updated)),a==null||a.attemptAutoclose("meta-sync",this.id),this}async APILoad(s=oe,...a){return await _t.repository.APILoad(this.id,...a),this}async APICreate(s=oe,...a){return await _t.repository.APICreate(this.toShallowJSON(),...a),this}async APIUpdate(s=oe,...a){return await _t.repository.APIUpdate(this.toShallowJSON(),...a),this}async APIDelete(s=oe,...a){return await _t.repository.APIDelete(this.toShallowJSON(),...a),this}async APIClone(s=oe,...a){return await _t.repository.APIClone(this.id,...a),this}async APILoadVersion(s=oe,a,...l){return await _t.repository.APILoadVersion(this.id,a,...l)}removeFromParent(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"remove-from-parent"))){const a=[],l=[],p=[],t=[];if(this.parent.type===f.Project)this.parent.removeDefinitionEntity(this);else if(this.parent.type===f.DataType&&this.parent.entity&&this.parent.entity.id===this.id){const m=this.parent.setEntity(null,s);a.push(m)}return s==null||s.attemptAutoclose("remove-from-parent",this.id),{added:w(p),updated:w(a),removed:w(l),affected:w(t),self:this}}remove({ignoreUpstream:s}={ignoreUpstream:!1},a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"remove-entity"))){const l=[],p=[],t=[],m=[];if(a!=null&&a.hasRemoved(this.id))return a==null||a.attemptAutoclose("remove-entity",this.id),{added:[],updated:[],removed:[],affected:[],self:this};if(p.push(this),this.unsubscribe(),this.unsubscribeFromDependencies(),this.project.subscribeDeletedInstance(this),this.metaSync({deleted:!0},a),Object.values(this.detachedDependents).forEach(v=>{const{updated:b,removed:_,added:I}=v.entity.onDetachedDependencyRemoved(this,v.field,a);l.push(...b),p.push(..._),t.push(...I)}),this.properties.forEach(v=>{const{updated:b,removed:_}=v.remove({ignoreUpstream:!0},a);l.push(...b),p.push(..._)}),this.methods.forEach(v=>{const{updated:b,removed:_}=v.remove({ignoreUpstream:!0},a);l.push(...b),p.push(..._)}),this.abstractMethods.forEach(v=>{const{updated:b,removed:_}=v.remove({ignoreUpstream:!0},a);l.push(...b),p.push(..._)}),this.suggestedProperties.forEach(v=>{const{updated:b,removed:_}=v.remove({ignoreUpstream:!0},a);l.push(...b),p.push(..._)}),this.suggestedMethods.forEach(v=>{const{updated:b,removed:_}=v.remove({ignoreUpstream:!0},a);l.push(...b),p.push(..._)}),!s){const v=this.removeFromParent(a);t.push(...v.added),l.push(...v.updated),p.push(...v.removed),m.push(...v.affected)}return a==null||a.attemptAutoclose("remove-entity",this.id),{added:w(t),updated:w(l),removed:w(p),affected:w(m),self:this}}restore({}={},s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"restore-entity"))){const a=[],l=[],p=[],t=[];return s!=null&&s.hasAdded(this.id)?(s==null||s.attemptAutoclose("restore-entity",this.id),{added:[],updated:[],removed:[],affected:[],self:this}):(this.subscribe(),this.project.unsubscribeDeletedInstance(this),this.metaSync({deleted:!1},s),Object.values(this.detachedDependents).forEach(m=>{const{updated:v,removed:b,added:_}=m.entity.onDetachedDependencyRestored(this,m.field,s);l.push(...v),p.push(...b),a.push(..._)}),this.properties.forEach(m=>{const{updated:v}=m.restore({},s);l.push(...v)}),this.methods.forEach(m=>{const{updated:v}=m.restore({},s);l.push(...v)}),this.abstractMethods.forEach(m=>{const{updated:v}=m.restore({},s);l.push(...v)}),this.suggestedProperties.forEach(m=>{const{updated:v}=m.restore({},s);l.push(...v)}),this.suggestedMethods.forEach(m=>{const{updated:v}=m.restore({},s);l.push(...v)}),s==null||s.attemptAutoclose("restore-entity",this.id),{added:w(a),updated:w(l),removed:w(p),affected:w(t),self:this})}toFlat(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[this,...this.extends.flatMap(l=>l.toFlat(s)),...this.implements.flatMap(l=>l.toFlat(s)),...this.properties.flatMap(l=>l.toFlat(s)),...this.methods.flatMap(l=>l.toFlat(s)),...this.abstractMethods.flatMap(l=>l.toFlat(s)),...this.parent.toFlat(s)])}toFlatIds(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[this.id,...this.extends.flatMap(l=>l.toFlatIds(s)),...this.implements.flatMap(l=>l.toFlatIds(s)),...this.properties.flatMap(l=>l.toFlatIds(s)),...this.methods.flatMap(l=>l.toFlatIds(s)),...this.abstractMethods.flatMap(l=>l.toFlatIds(s)),...this.parent.toFlatIds(s)])}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,description:this.description,static:this.static,abstract:this.abstract,x:this.x,y:this.y,type:this.type,name:this.name}}toJSON(s=new Set){return s.has(this.id)?this.toReference():(s.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,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(a=>a.toJSON(s)),methods:this.methods.map(a=>a.toJSON(s)),abstractMethods:this.abstractMethods.map(a=>a.toJSON(s)),implements:this.implements.map(a=>a.toJSON(s)),extends:this.extends.map(a=>a.toJSON(s)),parent:this.parent.toReference()})}toJSONClone(s=Ce){var l,p,t,m,v;let a;return(l=s.seenEntityMaps)!=null&&l.has(this.id)?a=s.seenEntityMaps.get(this.id):(a=s.newId||hr(this,this.project,s.uuidStrategy),s.seenEntityMaps&&s.seenEntityMaps.set(this.id,a)),(p=s.seenEntities)!=null&&p.has(a)||(t=s.seenEntities)!=null&&t.has(this.id)?this.toReference({seenEntityMaps:s.seenEntityMaps}):((m=s.seenEntities)==null||m.add(a),(v=s.seenEntities)==null||v.add(this.id),{id:a,version:P.UUID.uuid(),createdAt:s.timestamp||N().toISOString(),author:P.sessionAuthor,previousVersion:null,deleted:!1,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(b=>b.toJSONClone({...s,newId:null})),methods:this.methods.map(b=>b.toJSONClone({...s,newId:null})),abstractMethods:this.abstractMethods.map(b=>b.toJSONClone({...s,newId:null})),implements:this.implements.map(b=>b.type===f.BuiltInBaseEntity?b.toJSON():b.toJSONClone({...s,newId:null})),extends:this.extends.map(b=>b.type===f.BuiltInBaseEntity?b.toJSON():b.toJSONClone({...s,newId:null})),parent:this.parent.toReference({seenEntityMaps:s.seenEntityMaps})})}toReference(s=Ce){var l;let a=this.id;return(l=s.seenEntityMaps)!=null&&l.has(this.id)&&(a=s.seenEntityMaps.get(this.id)),{id:a+"--"+P.UUID.uuid()+"--ref",type:f.GenericReference,entityId:a,version:this.version,entityType:this.type}}toShallowJSON(s=Ce){var l;let a=this.id;return(l=s.seenEntityMaps)!=null&&l.has(this.id)&&(a=s.seenEntityMaps.get(this.id)),{id:a,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,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(p=>p.toReference(s)),methods:this.methods.map(p=>p.toReference(s)),abstractMethods:this.abstractMethods.map(p=>p.toReference(s)),implements:this.implements.map(p=>p.toReference(s)),extends:this.extends.map(p=>p.toReference(s)),parent:this.parent.toReference(s)}}toFlatJSON(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(l=>l.toFlatJSON(s)),...this.methods.flatMap(l=>l.toFlatJSON(s)),...this.abstractMethods.flatMap(l=>l.toFlatJSON(s)),...this.implements.flatMap(l=>l.toFlatJSON(s)),...this.extends.flatMap(l=>l.toFlatJSON(s)),...this.parent.toFlatJSON(s)])}toGenerationTarget(){const s=this.parent.type===f.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(a=>a.id),implements:this.implements.map(a=>a.id),parent:s}}toFlatGenerationTarget(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(l=>l.toFlatGenerationTarget(s)),...this.methods.flatMap(l=>l.toFlatGenerationTarget(s)),...this.abstractMethods.flatMap(l=>l.toFlatGenerationTarget(s)),...this.implements.filter(l=>l.type===f.DefinitionEntity).flatMap(l=>l.toFlatGenerationTarget(s)),...this.implements.filter(l=>l.type===f.DefinitionEntity).flatMap(l=>l.toFlatGenerationTarget(s)),...this.parent.toFlatGenerationTarget(s)])}clearErrors(){return this.errors=[],this.properties.forEach(s=>s.clearErrors()),this.methods.forEach(s=>s.clearErrors()),this.abstractMethods.forEach(s=>s.clearErrors()),this}validate(){return this.errors=vj(this),{success:!0,error:null,data:null}}getErrors(){return[...this.errors,...this.properties.flatMap(a=>a.getErrors()),...this.methods.flatMap(a=>a.getErrors()),...this.abstractMethods.flatMap(a=>a.getErrors())]}getShallowErrors(){return this.errors}clone(s=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"clone-entity")),a=null,l=null,p=!0){var q,Z,re;let t=yr(a,this);const m=this.toJSON(),v=l||P.UUID.uuid();m.properties=[],m.methods=[],m.abstractMethods=[];const b=v.split("-id"),_=b[b.length-1||0]||v;m.id=v,m.version=P.UUID.uuid(),m.createdAt=(s==null?void 0:s.timestamp)||N().toISOString(),m.author=(s==null?void 0:s.author)||"1",m.previousVersion=null,m.deleted=!1;const I=er(m,t);a&&I.setParent(a,null),p&&I.subscribe(),I.initChildren(s),s==null||s.add(I,G.Added);const V=(q=this.properties)==null?void 0:q.map(ue=>ue.clone(s,I,P.UUID.uuid(),p));I.properties=V;const B=(Z=this.methods)==null?void 0:Z.map((ue,Q)=>ue.clone(s,I,_+"-method-"+Q+"-id",p));I.methods=B;const K=(re=this.abstractMethods)==null?void 0:re.map((ue,Q)=>ue.clone(s,I,_+"-abstract-method-"+Q+"-id",p));return I.abstractMethods=K,s==null||s.attemptAutoclose("clone-entity",this.id),I}getFunctionDeclaration(s){return this.methods.find(a=>a.id===s)}implement(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"implement-definition-entity")),l){const p=hy(this,s,a,l);return a==null||a.attemptAutoclose("implement-definition-entity",this.id),p}getAllInteractiveMethods(){const s=this.implements.filter(l=>l.type===f.DefinitionEntity||l.type===f.BuiltInBaseEntity&&l.interactive);return w([...this.methods,...this.extends.flatMap(l=>l.getAllInteractiveMethods()),...s.flatMap(l=>l.getAllInteractiveMethods())])}inferFromInputs(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"infer-definition-entity-from-inputs"))){const l=[],p=[],t=[],m=[];if(this.parent.type!==f.DataType||!this.parent.inferred)return a==null||a.attemptAutoclose("infer-definition-entity-from-inputs",this.id),{added:[],updated:[],removed:[],affected:[],self:this};const v=[];s.forEach(I=>{v.find(B=>fe(B,this.project)===fe(I,this.project))||v.push(I)});const b=this.properties.filter(I=>!I.dataType);v.forEach(I=>{var re,ue;const V=b.find(Q=>fe(Q,this.project)===fe(I,this.project));if(!V)return;const K=Mo(I.parent).getMasterInputWithValueWritterFromAllInstances(I),q=xs(K,a),Z=q==null?void 0:q.clone(a,V,P.UUID.uuid(),!0);Z&&((re=V.dataType)==null||re.merge(Z,a),Z.id!==((ue=V.dataType)==null?void 0:ue.id)&&Z.remove({ignoreUpstream:!1},a),V.dataType&&(V.dataType.metaSync({inferred:!0,like:!0},a),V.setDataType(V.dataType,a),a==null||a.add(V,G.Affected))),I.setDeclaration(V),a==null||a.add(I,G.Updated)});const _=[];return v.forEach(I=>{if(!I.declaration){_.push(I);return}}),_.length===0?(a==null||a.attemptAutoclose("infer-definition-entity-from-inputs",this.id),{added:[],updated:[],removed:[],affected:[],self:this}):(_.forEach(I=>{var Q,_e,X,Ee;const V=this.properties.find(se=>fe(se,this.project)===fe(I,this.project));if(V){if(I.setDeclaration(V),!V.getDataType(a)){const de=Mo(I.parent).getMasterInputWithValueWritterFromAllInstances(I),ye=xs(de),H=ye==null?void 0:ye.clone(a,V,P.UUID.uuid(),!0);H&&((Q=V.dataType)==null||Q.merge(H,a),H.id!==((_e=V.dataType)==null?void 0:_e.id)&&H.remove({ignoreUpstream:!1},a),V.dataType&&(V.dataType.metaSync({inferred:!0,like:!0},a),V.setDataType(V.dataType,a),a==null||a.add(V,G.Affected)))}return}const B={id:P.UUID.uuid(),type:f.Property,version:P.UUID.uuid(),createdAt:(a==null?void 0:a.timestamp)||N().toISOString(),author:P.sessionAuthor,previousVersion:null,deleted:!1,name:fe(I,this.project),description:I.description,defaultValue:null,static:!0,abstract:!1,private:!1,hidden:!1,required:!1,constant:!0,index:I.index,implements:null,extends:null,dataType:null,parent:this.toReference()},K=z(B,this.project);K.setParent(this,a),K.initChildren(a),a==null||a.add(K,G.Added);const Z=Mo(I.parent).getMasterInputWithValueWritterFromAllInstances(I),re=xs(Z),ue=re==null?void 0:re.clone(a,K,P.UUID.uuid(),!0);return ue&&((X=K.dataType)==null||X.merge(ue,a),ue.id!==((Ee=K.dataType)==null?void 0:Ee.id)&&ue.remove({ignoreUpstream:!1},a),K.dataType&&(K.dataType.metaSync({inferred:!0,like:!0},a),K.setDataType(K.dataType,a),a==null||a.add(K,G.Affected))),this.addProperty(K),I.setDeclaration(K),a==null||a.add(I,G.Updated),K}),a==null||a.attemptAutoclose("infer-definition-entity-from-inputs",this.id),{added:w(l),updated:w(p),removed:w(t),affected:w(m),self:this})}getRawDefaultValue(){const s={};return this.properties.forEach(a=>{var p;const l=Ra(a.name);s[l]=((p=a.getDefaultValue())==null?void 0:p.value)||null}),s}getActiveRawDefaultValue(){const s={};return this.properties.forEach(a=>{const l=Ra(a.name),p=this.project.requestActiveValue(a);s[l]=(p==null?void 0:p.value)||null}),s}};g(_t,"repository",{APICreate:async(s,...a)=>s,APIUpdate:async(s,...a)=>s,APIDelete:async(s,...a)=>s,APIClone:async(s,...a)=>{},APILoad:async(s,...a)=>null,APILoadVersion:async(s,a,...l)=>null}),g(_t,"type",f.DefinitionEntity),g(_t,"USER_MANAGED_PARENT_TYPES",[f.Project,f.DataType]),g(_t,"PARENT_TYPES",[..._t.USER_MANAGED_PARENT_TYPES]),g(_t,"MUTABLE_BASE_PROPERTIES",["name","description","static","abstract"]),g(_t,"INMUTABLE_BASE_PROPERTIES",["id","type","version","createdAt","author","previousVersion"]),g(_t,"BASE_PROPERTIES",[..._t.MUTABLE_BASE_PROPERTIES,..._t.INMUTABLE_BASE_PROPERTIES]),g(_t,"MUTABLE_META_PROPERTIES",[..._t.MUTABLE_BASE_PROPERTIES,"x","y"]),g(_t,"INMUTABLE_META_PROPERTIES",[..._t.INMUTABLE_BASE_PROPERTIES]),g(_t,"META_PROPERTIES",[..._t.MUTABLE_META_PROPERTIES,..._t.INMUTABLE_META_PROPERTIES]),g(_t,"MUTABLE_UPSTREAM_PROPERTIES",["extends","implements"]),g(_t,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),g(_t,"UPSTREAM_PROPERTIES",[..._t.MUTABLE_UPSTREAM_PROPERTIES,..._t.INMUTABLE_UPSTREAM_PROPERTIES]),g(_t,"MUTABLE_DOWNSTREAM_PROPERTIES",["properties","methods","abstractMethods"]),g(_t,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),g(_t,"DOWNSTREAM_PROPERTIES",[..._t.MUTABLE_DOWNSTREAM_PROPERTIES,..._t.INMUTABLE_DOWNSTREAM_PROPERTIES]),g(_t,"PROPERTIES",[..._t.META_PROPERTIES,..._t.UPSTREAM_PROPERTIES,..._t.DOWNSTREAM_PROPERTIES]);let ia=_t;function Dye(u){const d=Noe(),s=u.toJSON();d.safeParse(s).success;const l=[];return qt(u.errors,l)}const pp=class pp extends nr{constructor(s,a){super(s);g(this,"initialData");g(this,"id");g(this,"version");g(this,"name");g(this,"description",null);g(this,"type",f.BuiltInBaseEntity);g(this,"abstract",!1);g(this,"static");g(this,"properties",[]);g(this,"methods",[]);g(this,"abstractMethods",[]);g(this,"extends",[]);g(this,"interactive",!1);g(this,"errors",[]);g(this,"project");this.initialData=this.initialData||s,this.project=this.project||a,this.id=this.id||s.id,this.version=this.version||s.version,this.name=this.name||s.name,this.static=this.static||s.static,this.interactive=this.interactive||s.interactive,this.abstract=s.abstract,this.properties=this.initialData.properties.map(l=>{const p=z(l,this.project);return p.setParent(this,null),p.initChildren(null),p}),this.methods=this.initialData.methods.map(l=>{const p=z(l,this.project);return p.setParent(this,null),p.initChildren(null),p}),this.abstractMethods=this.initialData.abstractMethods.map(l=>{const p=z(l,this.project);return p.setParent(this,null),p.initChildren(null),p}),this.extends=this.initialData.extends.map(l=>z(l,this.project))}get allMethods(){return w([...this.ownDeclaredMethods,...this.allBaseMethodsFromOriginalParents])}get allProperties(){return w([...this.ownDeclaredProperties,...this.allBasePropertiesFromOriginalParents])}get allBaseMethodsFromOriginalParents(){return w([...this.extends.flatMap(s=>s.allMethods,[])])}get allBasePropertiesFromOriginalParents(){return w([...this.extends.flatMap(s=>s.allProperties,[])])}get allBasePropertiesFromExtendedAndImplementedEntities(){return w(this.extends.reduce((s,a)=>{const l=[...a.ownDeclaredProperties,...a.allBasePropertiesFromExtendedAndImplementedEntities].filter(p=>!p.abstract);return[...s,...l]},[]))}get extendedPropertiesFromOriginalParents(){return w(this.extends.reduce((s,a)=>{const l=[...a.ownDeclaredProperties,...a.extendedPropertiesFromOriginalParents].filter(p=>!p.abstract);return[...s,...l]},[]))}get implementedPropertiesFromOriginalParents(){return w([...this.extends.reduce((s,a)=>{const l=a.implementedPropertiesFromOriginalParents,p=[...a.ownDeclaredProperties].filter(t=>!!t.abstract&&!l.find(m=>m.name===t.name));return[...l,...p,...s]},[])])}get extendedProperties(){return this.properties.filter(s=>s.isExtendedProperty)}get ownDeclaredMethods(){return this.methods.filter(s=>!s.isExtendedMethod)}get ownDeclaredProperties(){return this.properties.filter(s=>!s.isExtendedProperty)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}async APILoad(s=oe,...a){return await pp.repository.APILoad(this.id,...a),this}toFlat(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[this,...this.properties.flatMap(l=>l.toFlat(s)),...this.methods.flatMap(l=>l.toFlat(s)),...this.abstractMethods.flatMap(l=>l.toFlat(s)),...this.extends.flatMap(l=>l.toFlat(s))])}toFlatIds(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[this.id,...this.properties.flatMap(l=>l.toFlatIds(s)),...this.methods.flatMap(l=>l.toFlatIds(s)),...this.abstractMethods.flatMap(l=>l.toFlatIds(s)),...this.extends.flatMap(l=>l.toFlatIds(s))])}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,description:this.description,interactive:this.interactive,abstract:this.abstract,static:this.static,type:this.type,name:this.name}}toJSON(s=new Set){return s.has(this.id)?this.toReference():(s.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,interactive:this.interactive,properties:this.properties.map(a=>a.toJSON(s)),methods:this.methods.map(a=>a.toJSON(s)),abstractMethods:this.abstractMethods.map(a=>a.toJSON(s)),extends:this.extends.map(a=>a.toJSON(s))})}toReference(s=Ce){return{id:this.id+"--"+P.UUID.uuid()+"--ref",type:f.GenericReference,entityId:this.id,version:this.version,entityType:this.type}}toShallowJSON(s=Ce){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,interactive:this.interactive,properties:this.properties.map(a=>a.toReference()),methods:this.methods.map(a=>a.toReference()),abstractMethods:this.abstractMethods.map(a=>a.toReference()),extends:this.extends.map(a=>a.toReference())}}toFlatJSON(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(l=>l.toFlatJSON(s)),...this.methods.flatMap(l=>l.toFlatJSON(s)),...this.abstractMethods.flatMap(l=>l.toFlatJSON(s))])}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(s=>s.id)}}toFlatGenerationTarget(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(l=>l.toFlatGenerationTarget(s)),...this.methods.flatMap(l=>l.toFlatGenerationTarget(s)),...this.abstractMethods.flatMap(l=>l.toFlatGenerationTarget(s))])}clearErrors(){return this.errors=[],this.properties.forEach(s=>s.clearErrors()),this.methods.forEach(s=>s.clearErrors()),this.abstractMethods.forEach(s=>s.clearErrors()),this}validate(){const s=Dye(this);return this.errors=s,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.properties.flatMap(a=>a.getErrors()),...this.methods.flatMap(a=>a.getErrors()),...this.abstractMethods.flatMap(a=>a.getErrors())]}getShallowErrors(){return this.errors}implement(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),null,!0,"implement-built-in-base-entity")),l){const p=hy(this,s,a,l);return a==null||a.attemptAutoclose("implement-built-in-base-entity",this.id),p}getAllInteractiveMethods(){const s=[];return this.interactive&&(s.push(...this.methods),this.extends.filter(l=>l.type===f.BuiltInBaseEntity&&l.interactive||l.type===f.PrimitiveEntity).forEach(l=>{l instanceof pp&&s.push(...l.getAllInteractiveMethods())})),w(s)}};g(pp,"repository",{APILoad:async(s,...a)=>null});let qs=pp;function gye(u){const d=Roe(),s=u.toJSON();d.safeParse(s).success;const l=[];return qt(u.errors,l)}const $y=class $y extends nr{constructor(s,a){super(s);g(this,"initialData");g(this,"id");g(this,"name");g(this,"description",null);g(this,"type",f.PrimitiveEntity);g(this,"static");g(this,"abstract");g(this,"properties",[]);g(this,"methods",[]);g(this,"abstractMethods",[]);g(this,"extends",[]);g(this,"errors",[]);g(this,"project");this.initialData=s,this.project=a,this.id=s.id,this.name=s.name,this.static=s.static,this.abstract=s.abstract,this.properties=this.initialData.properties.map(l=>{const p=z(l,this.project);return p.setParent(this,null),p.initChildren(null),p}),this.methods=this.initialData.methods.map(l=>{const p=z(l,this.project);return p.parent=this,p}),this.abstractMethods=this.initialData.abstractMethods.map(l=>{const p=z(l,this.project);return p.parent=this,p})}get allMethods(){return w([...this.ownDeclaredMethods,...this.allBaseMethodsFromOriginalParents])}get allProperties(){return w([...this.ownDeclaredProperties,...this.allBasePropertiesFromOriginalParents])}get allBaseMethodsFromOriginalParents(){return w([...this.extends.flatMap(s=>s.allMethods,[])])}get allBasePropertiesFromOriginalParents(){return w([...this.extends.flatMap(s=>s.allProperties,[])])}get allBasePropertiesFromExtendedAndImplementedEntities(){return w(this.extends.reduce((s,a)=>{const l=[...a.ownDeclaredProperties,...a.allBasePropertiesFromExtendedAndImplementedEntities].filter(p=>!p.abstract);return[...s,...l]},[]))}get extendedPropertiesFromOriginalParents(){return w(this.extends.reduce((s,a)=>{const l=[...a.ownDeclaredProperties,...a.extendedPropertiesFromOriginalParents].filter(p=>!p.abstract);return[...s,...l]},[]))}get implementedPropertiesFromOriginalParents(){return w([...this.extends.reduce((s,a)=>{const l=a.implementedPropertiesFromOriginalParents,p=[...a.ownDeclaredProperties].filter(t=>!!t.abstract&&!l.find(m=>m.name===t.name));return[...l,...p,...s]},[])])}get extendedProperties(){return this.properties.filter(s=>s.isExtendedProperty)}get ownDeclaredMethods(){return this.methods.filter(s=>!s.isExtendedMethod)}get ownDeclaredProperties(){return this.properties.filter(s=>!s.isExtendedProperty)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}async APILoad(s=oe,...a){return await $y.repository.APILoad(this.id,...a),this}toFlat(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[this,...this.properties.flatMap(l=>l.toFlat(s)),...this.methods.flatMap(l=>l.toFlat(s)),...this.abstractMethods.flatMap(l=>l.toFlat(s))])}toFlatIds(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[this.id,...this.properties.flatMap(l=>l.toFlatIds(s)),...this.methods.flatMap(l=>l.toFlatIds(s)),...this.abstractMethods.flatMap(l=>l.toFlatIds(s))])}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,description:this.description,static:this.static,abstract:this.abstract,type:this.type,name:this.name}}toJSON(s=new Set){return s.has(this.id)?this.toReference():(s.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,properties:this.properties.map(a=>a.toJSON(s)),methods:this.methods.map(a=>a.toJSON(s)),abstractMethods:this.abstractMethods.map(a=>a.toJSON(s)),extends:this.extends.map(a=>a.toJSON(s))})}toReference(s=Ce){return{id:this.id+"--"+P.UUID.uuid()+"--ref",type:f.GenericReference,entityId:this.id,version:this.version,entityType:this.type}}toShallowJSON(s=Ce){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,properties:this.properties.map(a=>a.toReference()),methods:this.methods.map(a=>a.toReference()),abstractMethods:this.abstractMethods.map(a=>a.toReference()),extends:this.extends.map(a=>a.toReference())}}toFlatJSON(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(l=>l.toFlatJSON(s)),...this.methods.flatMap(l=>l.toFlatJSON(s)),...this.abstractMethods.flatMap(l=>l.toFlatJSON(s))])}toGenerationTarget(){return{id:this.id,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,extends:this.extends.map(s=>s.id)}}toFlatGenerationTarget(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(l=>l.toFlatGenerationTarget(s)),...this.methods.flatMap(l=>l.toFlatGenerationTarget(s)),...this.abstractMethods.flatMap(l=>l.toFlatGenerationTarget(s))])}clearErrors(){return this.errors=[],this.properties.forEach(s=>s.clearErrors()),this.methods.forEach(s=>s.clearErrors()),this.abstractMethods.forEach(s=>s.clearErrors()),this}validate(){const s=gye(this);return this.errors=s,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.properties.flatMap(a=>a.getErrors()),...this.methods.flatMap(a=>a.getErrors()),...this.abstractMethods.flatMap(a=>a.getErrors())]}getShallowErrors(){return this.errors}getAllInteractiveMethods(){const s=[];return s.push(...this.methods),this.extends.filter(l=>l.type===f.BuiltInBaseEntity&&l.interactive||l.type===f.PrimitiveEntity).forEach(l=>{l instanceof qs&&s.push(...l.getAllInteractiveMethods())}),w(s)}};g($y,"repository",{APILoad:async(s,...a)=>null});let Ri=$y;function er(u,d){if(!u)throw new Error("Entity is null");const s=d.get(u.id);switch(u.type){case f.LiteralValue:return s||new Fs(u,d);case f.DefinitionEntity:return s||new ia(u,d);case f.PrimitiveEntity:return s||new Ri(u,d);case f.FunctionDeclaration:return s||new _a(u,d);case f.GlobalEvent:return s||new $a(u,d);case f.DataType:return s||new ts(u,d);case f.Property:return s||new Xn(u,d);case f.FunctionCall:return s||new Fa(u,d);case f.Condition:return s||new Ca(u,d);case f.Operation:return s||new Da(u,d);case f.VariableDeclaration:return s||new Va(u,d);case f.VariableInstance:return s||new Pa(u,d);case f.OutputMap:return s||new Ks(u,d);case f.ReturnDeclaration:return s||new wi(u,d);case f.ArgumentDeclaration:return s||new ea(u,d);case f.InputMap:return s||new Es(u,d);case f.Project:return s||new P(u);case f.InstalledProject:return s||new La(u,d);case f.ActionDescriptor:return s||new Lt(u,d);case f.ReturnStatement:return s||new ga(u,d);case f.Loop:return s||new Oa(u,d);case f.Search:return s||new Na(u,d);case f.ValueDescriptor:return s||new ks(u,d);case f.BuiltInBaseEntity:return s||new qs(u,d);case f.InternalCall:return s||new Ma(u,d);case f.ContinueStatement:return s||new Qr(u,d);case f.BreakStatement:return s||new Ba(u,d);case f.GenericReference:return d.get(u.entityId);default:throw new Error("Invalid entity type: "+u.type)}}function z(u,d){if(!u)throw new Error("Entity is null");const s=er(u,d);return s.subscribe(),s}function $ye(u,d){if(!u)throw new Error("Entity is null");switch(u.type){case f.LiteralValue:return Fs.fromGenerationTarget(u,d);case f.DefinitionEntity:return ia.fromGenerationTarget(u,d);case f.FunctionDeclaration:return _a.fromGenerationTarget(u,d);case f.GlobalEvent:return $a.fromGenerationTarget(u,d);case f.DataType:return ts.fromGenerationTarget(u,d);case f.Property:return Xn.fromGenerationTarget(u,d);case f.FunctionCall:return Fa.fromGenerationTarget(u,d);case f.Condition:return Ca.fromGenerationTarget(u,d);case f.Operation:return Da.fromGenerationTarget(u,d);case f.VariableDeclaration:return Va.fromGenerationTarget(u,d);case f.VariableInstance:return Pa.fromGenerationTarget(u,d);case f.OutputMap:return Ks.fromGenerationTarget(u,d);case f.ReturnDeclaration:return wi.fromGenerationTarget(u,d);case f.ArgumentDeclaration:return ea.fromGenerationTarget(u,d);case f.InputMap:return Es.fromGenerationTarget(u,d);case f.InstalledProject:return La.fromGenerationTarget(u,d);case f.ReturnStatement:return ga.fromGenerationTarget(u,d);case f.Loop:return Oa.fromGenerationTarget(u,d);case f.Search:return Na.fromGenerationTarget(u,d);case f.ActionDescriptor:return Lt.fromGenerationTarget(u,d);case f.ValueDescriptor:return ks.fromGenerationTarget(u,d);case f.InternalCall:return Ma.fromGenerationTarget(u,d);case f.ContinueStatement:return Qr.fromGenerationTarget(u,d);case f.BreakStatement:return Ba.fromGenerationTarget(u,d);default:throw new Error("Invalid entity type: "+u.type)}}const Ce={seenEntityMaps:new Map,seenEntities:new Set,timestamp:N().toISOString()};class bj{constructor(){g(this,"initialData")}}const oe={cascade:!1},Aj={APILoad:async(u,...d)=>null},Oye={APICreate:async(u,...d)=>u,APIUpdate:async(u,...d)=>u,APIDelete:async(u,...d)=>u,APIClone:async(u,...d)=>{},APILoadVersion:async(u,d,...s)=>null,...Aj};class Cye{}class Pye extends bj{}class Vye{}class Nye{}class Lye{}class Nb{}class Mye extends Nb{}class Bye extends Nb{}class Uye{}class dp{static initReadsValue(d){if(d.initialData.readsValue&&d.initialData.readsValue.type!==f.GenericReference)d.readsValue=z(d.initialData.readsValue,d.project);else if(d.initialData.readsValue&&d.initialData.readsValue.type===f.GenericReference){const s=ss(d.initialData.readsValue,d.project);s&&(d.readsValue=s)}if(d.readsValue){if(lr.includes(d.readsValue.type)){let s=d.parent;br.includes(s.type)||(s=s.parent);const a=d.type===f.InputMap&&d.parent.type===f.Loop;a&&(s=d.parent.parent),d.readsValue.setParent(s,null),d.readsValue.initChildren(null),s&&s.type!==f.Project&&!a&&s.detachedChildren.includes(d)?s.replaceDetachedChild(d,d.readsValue):s&&s.type!==f.Project&&!a&&s.subscribeDetachedChild(d.readsValue)}d.readsValue.addValueReader(d,null)}return d.readsValue}}class up{static initWritesValues(d,s){const a=d.initialData.writesValues.reduce((p,t)=>{if(t.type===f.GenericReference||d.writesValues.some(v=>v.id===t.id))return p;const m=z(t,d.project);return m.setValueWriter(d,null),lr.includes(m.type)&&(m.setParent(s,null),m.initChildren(null)),[...p,m]},[]),l=[...d.writesValues];return d.writesValues=w([...l,...a]),d.writesValues}}class jye{}class xye{constructor(d){g(this,"eventName");g(this,"callbacks",[]);this.eventName=d}on(d){if(typeof d!="function")throw new Error("Event callback must be a function");this.callbacks.includes(d)||this.callbacks.push(d)}off(d){if(typeof d!="function")throw new Error("Event callback must be a function");this.callbacks=this.callbacks.filter(s=>s!==d)}destroy(){this.callbacks=[]}}class Lb{constructor(){g(this,"subscribedEvents",{});g(this,"on",this._on);g(this,"emit",this._emit);g(this,"off",this._off);g(this,"destroy",this._destroy)}getEvent(d){return this.subscribedEvents[d]||(this.subscribedEvents[d]=new xye(d)),this.subscribedEvents[d]}_on(d,s){this.getEvent(d).on(s)}_emit(d,...s){const a=this.getEvent(d);a&&a.callbacks.forEach(l=>{l.apply(null,s)})}_off(d,s){const a=this.getEvent(d);a&&(s?a.off(s):(a.destroy(),delete this.subscribedEvents[d]))}_destroy(){Object.keys(this.subscribedEvents).forEach(d=>{this._off(d)}),this.subscribedEvents={}}}var ar=(u=>(u.PROJECT_INITIALIZED="project-initialized",u.CHANGE_SET_CLOSED="change-set-closed",u.EXPLICIT_DEFINITION_ENTITY_ADDED="explicit-definition-entity-added",u.EXPLICIT_DEFINITION_ENTITY_REMOVED="explicit-definition-entity-removed",u.EXPLICIT_DEFINITION_ENTITY_UPDATED="explicit-definition-entity-updated",u.PERSISTED_DEFINITION_ENTITY_ADDED="persisted-definition-entity-added",u.PERSISTED_DEFINITION_ENTITY_REMOVED="persisted-definition-entity-removed",u.PERSISTED_DEFINITION_ENTITY_UPDATED="persisted-definition-entity-updated",u.RELATIONAL_DATABASE_DEFINITION_ENTITY_ADDED="relational-database-definition-entity-added",u.RELATIONAL_DATABASE_DEFINITION_ENTITY_REMOVED="relational-database-definition-entity-removed",u.RELATIONAL_DATABASE_DEFINITION_ENTITY_UPDATED="relational-database-definition-entity-updated",u))(ar||{});function Fye(u,d){d.forEach(s=>{Object.getOwnPropertyNames(s.prototype).forEach(a=>{a!=="constructor"&&Object.defineProperty(u.prototype,a,Object.getOwnPropertyDescriptor(s.prototype,a))})})}class Ij extends nr{constructor(...d){super(...d),Object.assign(this,new Lb)}}Fye(Ij,[Lb]);const Fe=class Fe extends Ij{constructor(s){super(s);g(this,"initialData");g(this,"id");g(this,"type",f.Project);g(this,"name",null);g(this,"description",null);g(this,"x");g(this,"y");g(this,"entities",[]);g(this,"projects",[]);g(this,"functions",[]);g(this,"events",[]);g(this,"variableDeclarations",[]);g(this,"variableInstances",[]);g(this,"conditions",[]);g(this,"operations",[]);g(this,"functionCalls",[]);g(this,"loops",[]);g(this,"searches",[]);g(this,"primitives",[]);g(this,"builtInBaseEntities",[]);g(this,"operationDeclarations",[]);g(this,"globalEventActionDescriptors",[]);g(this,"loopDeclarations",[]);g(this,"loopDeclarationsBodies",[]);g(this,"conditionDeclarations",[]);g(this,"valueDescriptors",[]);g(this,"dataTypes",[]);g(this,"project");g(this,"instances",{});g(this,"builtInInstances",{});g(this,"deletedInstances",{});g(this,"errors",[]);g(this,"references",[]);g(this,"history",[]);g(this,"undoableStackValueIndex",-1);g(this,"detachedDependents",{});g(this,"knownVersions",null);g(this,"activeVersion",!1);g(this,"initialized",!1);g(this,"startedInitialization",!1);g(this,"onCloseChangeSetCallback",null);g(this,"onAddChangeSetCallback",null);g(this,"onDiscardChangeSetCallback",null);g(this,"onRequestActiveValueCallback",null);this.initialData=s,this.id=s.id,this.name=s.name,this.description=s.description,this.x=0,this.y=0,this.instances[this.id]=this;try{(!Fe.UUID||Fe.UUID.isBackup)&&(Fe.UUID=Qf==null?void 0:Qf()),Fe.UUID||(Fe.UUID={isBackup:!0,uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:a=>a})}catch(a){console.error("Error initializing UUID module",a),Fe.UUID={isBackup:!0,uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:l=>l}}}static injectUUIDModule(s){Fe.UUID=s}static new(s=null){return{id:Fe.UUID.uuid(),version:Fe.UUID.uuid(),createdAt:(s==null?void 0:s.timestamp)||N().toISOString(),author:(s==null?void 0:s.author)||Fe.sessionAuthor,previousVersion:null,deleted:!1,type:f.Project,name:"",description:"",entities:[],functions:[],events:[],projects:[],variableDeclarations:[],variableInstances:[],conditions:[],operations:[],functionCalls:[],loops:[],searches:[]}}static validateGenerationTarget(s,a){let l=JSON.parse(JSON.stringify(s));const p=[];return p.push(...ur(l)),{errors:p,modifiedData:l}}async closePendingChangeSets(){const s=this.history.find(a=>a.dirty&&!a.open);s&&await this.closeChangeSet(s)}onRequestActiveValue(s){this.onRequestActiveValueCallback=s}async onCloseChangeSet(s){this.onCloseChangeSetCallback=s,await this.closePendingChangeSets()}onAddChangeSet(s){this.onAddChangeSetCallback=s}onDiscardChangeSet(s){this.onDiscardChangeSetCallback=s}async closeChangeSet(s){const a=this.history.findIndex(t=>t.id===s.id),l=this.history.slice(0,a),p=l[l.length-1];if(!(p!=null&&p.dirty)&&this.onCloseChangeSetCallback){(await this.onCloseChangeSetCallback(s)).success&&(s.dirty=!1,this.emit("change-set-closed",s),this.closePendingChangeSets());return}}toLatestChangeSet(s,a,l,p=!1,t="here-this"){if(!this.history.length)return new F(this,s,a,l,p,t);const m=this.history[this.history.length-1];return m.open?m:this.addChangeSet(new F(this,s,a,l,p,t))}addChangeSet(s){var p,t;if(!this.history.length)return this.undoableStackValueIndex=XL(this.undoableStackValueIndex,this.history,s),(p=this.onAddChangeSetCallback)==null||p.call(this,s,this.undoableStackValueIndex),s;const a=this.history.find(m=>m.id===(s==null?void 0:s.id));if(a)return a;const l=this.history.find(m=>m.open);if(l)throw console.warn("Previous still open: ",l),console.warn("New change set: ",s),new Error(`There is already an open change-set with id '${l.id}'.`);return this.undoableStackValueIndex=XL(this.undoableStackValueIndex,this.history,s),(t=this.onAddChangeSetCallback)==null||t.call(this,s,this.undoableStackValueIndex),s}discardChangeSet(s){var l;const a=this.history.findIndex(p=>p.id===(s==null?void 0:s.id));return a!==-1&&(this.history.splice(a,1),this.undoableStackValueIndex=this.undoableStackValueIndex-1,(l=this.onDiscardChangeSetCallback)==null||l.call(this,s)),this}async inject(...s){return await Promise.all(s.map(a=>new Promise(async l=>{await a.init(this),l(null)}))),this}validateGeneratedUpdate(s){return{errors:[],modifiedData:s}}subscribeDependents(s){return s.forEach(a=>{this.detachedDependents[a.entity.id]||(this.detachedDependents[a.entity.id]=a)}),this}unsubscribeDependents(s){return s.forEach(a=>{this.detachedDependents[a.entity.id]&&delete this.detachedDependents[a.entity.id]}),this}syncDependents(s=this.project.addChangeSet(new F(this.project,Fe.sessionAuthor,N().toISOString(),this,!0,"sync-dependents"))){const a=[],l=[],p=[],t=[];return Object.values(this.detachedDependents).forEach(m=>{const v=m.entity.afterAllChildrenInitialized(s);a.push(...v.updated),l.push(...v.added),p.push(...v.removed),t.push(...v.affected)}),s==null||s.attemptAutoclose("sync-dependents",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}onDetachedDependencyRemoved(s,a,l){const p=[],t=[],m=[],v=[];return{updated:w(p),added:w(t),removed:w(m),affected:w(v),self:this}}onDetachedDependencyRestored(s,a,l){const p=[],t=[],m=[],v=[];return{updated:w(p),added:w(t),removed:w(m),affected:w(v),self:this}}unsubscribeFromDependencies(){return this}subscribeToDependencies(){return this}increaseVersion(s){if(s&&!N(s).isValid())throw new Error(`The shared timestamp '${s}' is not a valid ISO 8601 date string.`);return s&&N(s).isSame(N(this.createdAt))?this:(this.previousVersion=this.version,this.version=Fe.UUID.uuid(),this.createdAt=N(s).toISOString()||N().toISOString(),this)}captureVersion(){var a;const s=((a=this.knownVersions)==null?void 0:a.get(this.version))||new Fe(this);return s.metaSync(this.toMeta(),null),this.knownVersions=this.knownVersions?this.knownVersions.set(this.version,s):new Map([[this.version,s]]),s.entities=[...this.entities],s.projects=[...this.projects],s.functions=[...this.functions],s.events=[...this.events],s.variableDeclarations=[...this.variableDeclarations],s.variableInstances=[...this.variableInstances],s.conditions=[...this.conditions],s.operations=[...this.operations],s.functionCalls=[...this.functionCalls],s.loops=[...this.loops],s.searches=[...this.searches],this}recursiveCaptureUpstreamVersions(s){const a=[],l=[],p=[],t=[];return{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}async restoreVersion(s){var v;const a=[],l=[],p=[],t=[];if(this.version===s)return{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this};if(!this.knownVersions){const b=new Map;for(const[_,I]of this.knownVersions||new Map){if(b.set(_,I),I.activeVersion=!1,I.knownVersions)for(const[V,B]of I.knownVersions)b.set(V,B);I.knownVersions=null}}let m=(v=this.knownVersions)==null?void 0:v.get(s);if(!m){const b=await this.APILoadVersion({},s);if(!b)throw new Error(`Version with id '${s}' for entity with id '${this.id}' not found.`);m=new Fe(b)}return this.metaSync(m.toShallowJSON(),null),this.previousVersion=m.previousVersion,this.version=m.version,this.createdAt=m.createdAt,this.author=m.author,this.deleted=m.deleted,this.entities=m.entities,this.projects=m.projects,this.functions=m.functions,this.events=m.events,this.variableDeclarations=m.variableDeclarations,this.variableInstances=m.variableInstances,this.conditions=m.conditions,this.operations=m.operations,this.functionCalls=m.functionCalls,this.loops=m.loops,this.searches=m.searches,{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}updateWithShallowTransfer(s,a=this.project.addChangeSet(new F(this.project,Fe.sessionAuthor,N().toISOString(),this,!0,"update-with-shallow-transfer"))){return this.metaSync(s,a),this.version=s.version,this.createdAt=s.createdAt,this.author=s.author,this.deleted=s.deleted,this.previousVersion=s.previousVersion,this.captureVersion(),this.subscribeToDependencies(),a==null||a.attemptAutoclose("update-with-shallow-transfer",this.id),this}hydrateAncestors(){const s=[],a=[],l=[],p=[];return{updated:w(s),added:w(a),removed:w(l),affected:w(p),self:this}}afterAllChildrenInitialized(s=null){const a=[],l=[],p=[],t=[];return this.initialized||(this.initialized=!0,this.emit("project-initialized",this,s)),this.validate(),this.captureVersion(),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}addSelfToProject(s){const a=[],l=[],p=[],t=[];return this.subscribe(),this.subscribeToDependencies(),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}get instancesList(){return Object.values(this.instances)}isOperationDeclaration(s){return this.operationDeclarations.includes(s)}isGlobalEventActionDescriptor(s){return this.globalEventActionDescriptors.includes(s)}isLoopDeclaration(s){return this.loopDeclarations.includes(s)}isConditionDeclaration(s){return this.conditionDeclarations.includes(s)}initChildren(s=this.project.addChangeSet(new F(this.project,Fe.sessionAuthor,N().toISOString(),this,!0,"init-children"))){return this.initialized||this.startedInitialization?this:(this.startedInitialization=!0,this.entities=this.initialData.entities.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(s),l}),this.projects=this.initialData.projects.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(s),l}),this.variableDeclarations=this.initialData.variableDeclarations.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(s),l}),this.variableInstances=this.initialData.variableInstances.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(s),l}),this.conditions=this.initialData.conditions.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(s),l}),this.operations=this.initialData.operations.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(s),l}),this.functions=this.initialData.functions.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(s),l}),this.events=this.initialData.events.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(s),l}),this.functionCalls=this.initialData.functionCalls.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(s),l}),this.loops=this.initialData.loops.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(s),l}),this.searches=this.initialData.searches.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(s),l}),this.attachOrphanReferences(),this.subscribeToDependencies(),this.afterAllChildrenInitialized(s),s==null||s.attemptAutoclose("init-children",this.id),this)}subscribeInstance(s){return(!this.instances[s.id]||this.instances[s.id]!==s)&&(this.instances[s.id]=s),this}subscribeDeletedInstance(s){return(!this.deletedInstances[s.id]||this.deletedInstances[s.id]!==s)&&(this.deletedInstances[s.id]=s),this}subscribeBuiltInInstance(s){return(!this.builtInInstances[s.id]||this.builtInInstances[s.id]!==s)&&(this.builtInInstances[s.id]=s),this}subscribe(){return this}unsubscribe(){return this}unsubscribeInstance(s){return delete this.instances[s.id],this}unsubscribeDeletedInstance(s){return delete this.deletedInstances[s.id],this}findSubscribedBuiltInInstance(s){return this.builtInInstances[s.id]||null}get(s){return this.instances[s]||this.builtInInstances[s]||null}getDeleted(s){return this.deletedInstances[s]||null}getManaged(s){return this.getBuiltIn(s)?null:this.instances[s]||null}getBuiltIn(s){return this.builtInInstances[s]||null}findSubscribedInstanceFromReference(s){return this.instances[s.entityId]||null}findSubscribedBuiltInInstanceFromReference(s){return this.builtInInstances[s.entityId]||null}metaSync(s,a=this.project.addChangeSet(new F(this.project,Fe.sessionAuthor,N().toISOString(),this,!0,"meta-sync"))){const l=cr(this,s),p=this.toMeta();return this.name=s.name!==void 0?s.name:p.name,this.description=s.description!==void 0?s.description:p.description,this.x=s.x||p.x,this.y=s.y||p.y,super.metaSync(s),s.deleted===!0&&!p.deleted?a==null||a.add(this,G.Removed):s.deleted===!1&&p.deleted?a==null||a.add(this,G.Added):l&&(a==null||a.add(this,G.Updated)),a==null||a.attemptAutoclose("meta-sync",this.id),this}async APILoad(s=oe,...a){return await Fe.repository.APILoad(this.id,...a),this}async APICreate(s=oe,...a){return await Fe.repository.APICreate(this.toShallowJSON(),...a),this}async APIUpdate(s=oe,...a){return await Fe.repository.APIUpdate(this.toShallowJSON(),...a),this}async APIDelete(s=oe,...a){return await Fe.repository.APIDelete(this.toShallowJSON(),...a),this}async APIClone(s=oe,...a){return await Fe.repository.APIClone(this.id,...a),this}async APILoadVersion(s=oe,a,...l){return await Fe.repository.APILoadVersion(this.id,a,...l)}remove({ignoreUpstream:s}={ignoreUpstream:!1},a=this.project.addChangeSet(new F(this.project,Fe.sessionAuthor,N().toISOString(),this,!0,"remove-entity"))){return{added:[],updated:[],removed:[],affected:[],self:this}}restore({}={},s=this.project.addChangeSet(new F(this.project,Fe.sessionAuthor,N().toISOString(),this,!0,"restore-entity"))){return{added:[],updated:[],removed:[],affected:[],self:this}}getAllBuiltInIds(){const s=new Set;return[...this.primitives.flatMap(a=>a.toFlatIds(s)),...this.builtInBaseEntities.flatMap(a=>a.toFlatIds(s)),...this.operationDeclarations.flatMap(a=>a.toFlatIds(s)),...this.globalEventActionDescriptors.flatMap(a=>a.toFlatIds(s)),...this.loopDeclarations.flatMap(a=>a.toFlatIds(s)),...this.conditionDeclarations.flatMap(a=>a.toFlatIds(s)),...this.valueDescriptors.flatMap(a=>a.toFlatIds(s)),...this.dataTypes.flatMap(a=>a.toFlatIds(s))]}getAllBuiltIn(){const s=new Set;return[...this.primitives.flatMap(a=>a.toFlat(s)),...this.builtInBaseEntities.flatMap(a=>a.toFlat(s)),...this.operationDeclarations.flatMap(a=>a.toFlat(s)),...this.globalEventActionDescriptors.flatMap(a=>a.toFlat(s)),...this.loopDeclarations.flatMap(a=>a.toFlat(s)),...this.conditionDeclarations.flatMap(a=>a.toFlat(s)),...this.valueDescriptors.flatMap(a=>a.toFlat(s)),...this.dataTypes.flatMap(a=>a.toFlat(s))]}toFlat(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[this,...this.entities.flatMap(l=>l.toFlat(s)),...this.functions.flatMap(l=>l.toFlat(s)),...this.events.flatMap(l=>l.toFlat(s)),...this.projects.flatMap(l=>l.toFlat(s)),...this.variableDeclarations.flatMap(l=>l.toFlat(s)),...this.variableInstances.flatMap(l=>l.toFlat(s)),...this.conditions.flatMap(l=>l.toFlat(s)),...this.operations.flatMap(l=>l.toFlat(s)),...this.functionCalls.flatMap(l=>l.toFlat(s)),...this.loops.flatMap(l=>l.toFlat(s)),...this.searches.flatMap(l=>l.toFlat(s))])}toFlatIds(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[this.id,...this.entities.flatMap(l=>l.toFlatIds(s)),...this.functions.flatMap(l=>l.toFlatIds(s)),...this.events.flatMap(l=>l.toFlatIds(s)),...this.projects.flatMap(l=>l.toFlatIds(s)),...this.variableDeclarations.flatMap(l=>l.toFlatIds(s)),...this.variableInstances.flatMap(l=>l.toFlatIds(s)),...this.conditions.flatMap(l=>l.toFlatIds(s)),...this.operations.flatMap(l=>l.toFlatIds(s)),...this.functionCalls.flatMap(l=>l.toFlatIds(s)),...this.loops.flatMap(l=>l.toFlatIds(s)),...this.searches.flatMap(l=>l.toFlatIds(s))])}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,description:this.description,type:this.type,name:this.name}}toJSON(s=new Set){return s.has(this.id)?this.toReference():(s.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,entities:this.entities.map(a=>a.toJSON(s)),variableDeclarations:this.variableDeclarations.map(a=>a.toJSON(s)),variableInstances:this.variableInstances.map(a=>a.toJSON(s)),conditions:this.conditions.map(a=>a.toJSON(s)),operations:this.operations.map(a=>a.toJSON(s)),loops:this.loops.map(a=>a.toJSON(s)),searches:this.searches.map(a=>a.toJSON(s)),functions:this.functions.map(a=>a.toJSON(s)),events:this.events.map(a=>a.toJSON(s)),projects:this.projects.map(a=>a.toJSON(s)),functionCalls:this.functionCalls.map(a=>a.toJSON(s))})}toJSONClone(s={uuidStrategy:"uuid"}){const a=new Map,l=new Set,p=this.getAllBuiltInIds();return Object.keys(this.instances).forEach(t=>{if(p.includes(t)){a.set(t,t);return}a.set(t,Fe.UUID.uuid())}),l.add(this.id),{id:a.get(this.id),version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,entities:this.entities.map(t=>t.toJSONClone({...s,seenEntityMaps:a,seenEntities:l,newId:null})),projects:this.projects.map(t=>t.toJSONClone({...s,seenEntityMaps:a,seenEntities:l,newId:null})),variableDeclarations:this.variableDeclarations.map(t=>t.toJSONClone({...s,seenEntityMaps:a,seenEntities:l,newId:null})),variableInstances:this.variableInstances.map(t=>t.toJSONClone({...s,seenEntityMaps:a,seenEntities:l,newId:null})),conditions:this.conditions.map(t=>t.toJSONClone({...s,seenEntityMaps:a,seenEntities:l,newId:null})),operations:this.operations.map(t=>t.toJSONClone({...s,seenEntityMaps:a,seenEntities:l,newId:null})),functions:this.functions.map(t=>t.toJSONClone({...s,seenEntityMaps:a,seenEntities:l,newId:null})),events:this.events.map(t=>t.toJSONClone({...s,seenEntityMaps:a,seenEntities:l,newId:null})),functionCalls:this.functionCalls.map(t=>t.toJSONClone({...s,seenEntityMaps:a,seenEntities:l,newId:null})),loops:this.loops.map(t=>t.toJSONClone({...s,seenEntityMaps:a,seenEntities:l,newId:null})),searches:this.searches.map(t=>t.toJSONClone({...s,seenEntityMaps:a,seenEntities:l,newId:null}))}}toReference(s=Ce){var l;let a=this.id;return(l=s.seenEntityMaps)!=null&&l.has(this.id)&&(a=s.seenEntityMaps.get(this.id)),{id:a+"--"+Fe.UUID.uuid()+"--ref",type:f.GenericReference,entityId:a,version:this.version,entityType:this.type}}toShallowJSON(s=Ce){var l;let a=this.id;return(l=s.seenEntityMaps)!=null&&l.has(this.id)&&(a=s.seenEntityMaps.get(this.id)),{id:a,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,entities:this.entities.map(p=>p.toReference(s)),functions:this.functions.map(p=>p.toReference(s)),events:this.events.map(p=>p.toReference(s)),projects:this.projects.map(p=>p.toReference(s)),variableDeclarations:this.variableDeclarations.map(p=>p.toReference(s)),variableInstances:this.variableInstances.map(p=>p.toReference(s)),conditions:this.conditions.map(p=>p.toReference(s)),operations:this.operations.map(p=>p.toReference(s)),functionCalls:this.functionCalls.map(p=>p.toReference(s)),loops:this.loops.map(p=>p.toReference(s)),searches:this.searches.map(p=>p.toReference(s))}}toFlatJSON(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[this.toShallowJSON(),...this.entities.flatMap(l=>l.toFlatJSON(s)),...this.functions.flatMap(l=>l.toFlatJSON(s)),...this.events.flatMap(l=>l.toFlatJSON(s)),...this.projects.flatMap(l=>l.toFlatJSON(s)),...this.variableDeclarations.flatMap(l=>l.toFlatJSON(s)),...this.variableInstances.flatMap(l=>l.toFlatJSON(s)),...this.conditions.flatMap(l=>l.toFlatJSON(s)),...this.operations.flatMap(l=>l.toFlatJSON(s)),...this.functionCalls.flatMap(l=>l.toFlatJSON(s)),...this.loops.flatMap(l=>l.toFlatJSON(s)),...this.searches.flatMap(l=>l.toFlatJSON(s))])}toGenerationTarget(){return{id:this.id,type:this.type,name:this.name,description:this.description}}toFlatGenerationTarget(s=new Set){return s.has(this.id)?[]:(s.add(this.id),[...this.entities.flatMap(l=>l.toFlatGenerationTarget(s)),...this.functions.flatMap(l=>l.toFlatGenerationTarget(s)),...this.events.flatMap(l=>l.toFlatGenerationTarget(s)),...this.projects.flatMap(l=>l.toFlatGenerationTarget(s)),...this.variableDeclarations.flatMap(l=>l.toFlatGenerationTarget(s)),...this.variableInstances.flatMap(l=>l.toFlatGenerationTarget(s)),...this.conditions.flatMap(l=>l.toFlatGenerationTarget(s)),...this.operations.flatMap(l=>l.toFlatGenerationTarget(s)),...this.functionCalls.flatMap(l=>l.toFlatGenerationTarget(s)),...this.loops.flatMap(l=>l.toFlatGenerationTarget(s)),...this.searches.flatMap(l=>l.toFlatGenerationTarget(s))])}clearErrors(){return this.errors=[],this.entities.forEach(s=>s.clearErrors()),this.projects.forEach(s=>s.clearErrors()),this.functions.forEach(s=>s.clearErrors()),this.events.forEach(s=>s.clearErrors()),this.variableDeclarations.forEach(s=>s.clearErrors()),this.variableInstances.forEach(s=>s.clearErrors()),this.conditions.forEach(s=>s.clearErrors()),this.operations.forEach(s=>s.clearErrors()),this.functionCalls.forEach(s=>s.clearErrors()),this.loops.forEach(s=>s.clearErrors()),this.searches.forEach(s=>s.clearErrors()),this}validate(){const s=Yde(),a=this.toJSON();return s.safeParse(a),this.validateChildren(),{success:!0,error:null,data:a}}validateChildren(){this.entities.forEach(s=>s.validate()),this.projects.forEach(s=>s.validate()),this.functions.forEach(s=>s.validate()),this.events.forEach(s=>s.validate()),this.variableDeclarations.forEach(s=>s.validate()),this.variableInstances.forEach(s=>s.validate()),this.conditions.forEach(s=>s.validate()),this.operations.forEach(s=>s.validate()),this.functionCalls.forEach(s=>s.validate()),this.loops.forEach(s=>s.validate()),this.searches.forEach(s=>s.validate())}getErrors(){return[...this.errors,...this.entities.flatMap(a=>a.getErrors()),...this.projects.flatMap(a=>a.getErrors()),...this.functions.flatMap(a=>a.getErrors()),...this.events.flatMap(a=>a.getErrors()),...this.variableDeclarations.flatMap(a=>a.getErrors()),...this.variableInstances.flatMap(a=>a.getErrors()),...this.conditions.flatMap(a=>a.getErrors()),...this.operations.flatMap(a=>a.getErrors()),...this.functionCalls.flatMap(a=>a.getErrors()),...this.loops.flatMap(a=>a.getErrors()),...this.searches.flatMap(a=>a.getErrors())]}getShallowErrors(){return this.errors}clone(){return this}getDefinitionEntity(s){return this.entities.find(a=>a.id===s)||null}addDefinitionEntity(s){return this.entities.includes(s)||this.entities.push(s),s}addFunctionDeclaration(s){return this.functions.includes(s)||this.functions.push(s),s}addFunctionCall(s){return this.functionCalls.includes(s)||this.functionCalls.push(s),s}addVariableDeclaration(s){return this.variableDeclarations.includes(s)||this.variableDeclarations.push(s),s}addVariableInstance(s){return this.variableInstances.includes(s)||this.variableInstances.push(s),s}addInstalledProject(s){return this.projects.includes(s)||this.projects.push(s),this}addGlobalEvent(s){return this.events.includes(s)||this.events.push(s),this}addCondition(s){return this.conditions.includes(s)||this.conditions.push(s),this}addOperation(s){return this.operations.includes(s)||this.operations.push(s),this}addLoop(s){return this.loops.includes(s)||this.loops.push(s),this}addSearch(s){return this.searches.includes(s)||this.searches.push(s),this}removeDefinitionEntity(s){const a=this.entities.findIndex(l=>l.id===s.id);if(a>-1){const l=this.entities[a];return this.entities.splice(a,1),l}return null}removeCondition(s){const a=this.conditions.findIndex(l=>l.id===s.id);if(a>-1){const l=this.conditions[a];return this.conditions.splice(a,1),l}return null}removeOperation(s){const a=this.operations.findIndex(l=>l.id===s.id);if(a>-1){const l=this.operations[a];return this.operations.splice(a,1),l}return null}removeLoop(s){const a=this.loops.findIndex(l=>l.id===s.id);if(a>-1){const l=this.loops[a];return this.loops.splice(a,1),l}return null}removeSearch(s){const a=this.searches.findIndex(l=>l.id===s.id);if(a>-1){const l=this.searches[a];return this.searches.splice(a,1),l}return null}removeFunctionCall(s){const a=this.functionCalls.findIndex(l=>l.id===s.id);if(a>-1){const l=this.functionCalls[a];return this.functionCalls.splice(a,1),l}return null}removeVariableInstance(s){const a=this.variableInstances.findIndex(l=>l.id===s.id);if(a>-1){const l=this.variableInstances[a];return this.variableInstances.splice(a,1),l}return null}removeVariableDeclaration(s){const a=this.variableDeclarations.findIndex(l=>l.id===s.id);if(a>-1){const l=this.variableDeclarations[a];return this.variableDeclarations.splice(a,1),l}return null}removeFunctionDeclaration(s){const a=this.functions.findIndex(l=>l.id===s.id);if(a>-1){const l=this.functions[a];return this.functions.splice(a,1),l}return null}removeInstalledProject(s){const a=this.projects.findIndex(l=>l.id===s.id);if(a>-1){const l=this.projects[a];return this.projects.splice(a,1),l}return null}removeGlobalEvent(s){const a=this.events.findIndex(l=>l.id===s.id);if(a>-1){const l=this.events[a];return this.events.splice(a,1),l}return null}removeTopLevelVariableDeclaration(s){if(s.type!==f.VariableDeclaration)return null;const a=this.variableDeclarations.findIndex(l=>l.id===s.id);if(a>-1){const l=this.variableDeclarations[a];return this.variableDeclarations.splice(a,1),l}return null}getEntryPoints(){return[...this.functions,...this.events,...this.entities.flatMap(a=>a.methods)]}getTerminationStatements(){return[...this.getEntryPoints().reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.ReturnStatement||t.type===f.ContinueStatement||t.type===f.BreakStatement)]},[])]}getFunctionDeclaration(s){return this.functions.find(a=>a.id===s)||null}getConditions(){return[...this.conditions,...this.getEntryPoints().reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Condition)]},[]),...this.functionCalls.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Condition)]},[]),...this.operations.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Condition)]},[]),...this.loops.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Condition)]},[]),...this.searches.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Condition)]},[])]}getOperations(){return[...this.operations,...this.getEntryPoints().reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Operation)]},[]),...this.functionCalls.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Operation)]},[]),...this.conditions.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Operation)]},[]),...this.loops.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Operation)]},[]),...this.searches.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Operation)]},[])]}getFunctionCalls(){return[...this.functionCalls,...this.getEntryPoints().reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.FunctionCall)]},[]),...this.conditions.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.FunctionCall)]},[]),...this.operations.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.FunctionCall)]},[]),...this.loops.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.FunctionCall)]},[]),...this.searches.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.FunctionCall)]},[])]}getVariables(){return[...this.variableDeclarations,...this.getEntryPoints().reduce((a,l)=>{const p=kt(l);return[...a,...p]},[]),...this.functionCalls.reduce((a,l)=>{const p=kt(l);return[...a,...p]},[]),...this.conditions.reduce((a,l)=>{const p=kt(l);return[...a,...p]},[]),...this.operations.reduce((a,l)=>{const p=kt(l);return[...a,...p]},[]),...this.loops.reduce((a,l)=>{const p=kt(l);return[...a,...p]},[]),...this.searches.reduce((a,l)=>{const p=kt(l);return[...a,...p]},[])]}getVariableInstances(){return[...this.variableInstances,...this.getEntryPoints().reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableInstance);return[...a,...t]},[]),...this.functionCalls.reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableInstance);return[...a,...t]},[]),...this.conditions.reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableInstance);return[...a,...t]},[]),...this.operations.reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableInstance);return[...a,...t]},[]),...this.loops.reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableInstance);return[...a,...t]},[]),...this.searches.reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableInstance);return[...a,...t]},[])]}getVariableDeclarations(){return w([...this.variableDeclarations,...this.getEntryPoints().reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableDeclaration);return[...a,...t]},[]),...this.functionCalls.reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableDeclaration);return[...a,...t]},[]),...this.conditions.reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableDeclaration);return[...a,...t]},[]),...this.operations.reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableDeclaration);return[...a,...t]},[]),...this.loops.reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableDeclaration);return[...a,...t]},[]),...this.searches.reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableDeclaration);return[...a,...t]},[])])}getLoops(){return[...this.loops,...this.getEntryPoints().reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Loop)]},[]),...this.functionCalls.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Loop)]},[]),...this.conditions.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Loop)]},[]),...this.operations.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Loop)]},[]),...this.searches.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Loop)]},[])]}getSearches(){return[...this.searches,...this.getEntryPoints().reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Search)]},[]),...this.functionCalls.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Search)]},[]),...this.conditions.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Search)]},[]),...this.operations.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Search)]},[]),...this.loops.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Search)]},[])]}attachOrphanReferences(){const s=this.getVariableInstances(),a=this.getVariableDeclarations();return s.forEach(l=>{if(!l.declaration){const p=l.initialData,t=p.declaration.entityId||p.declaration.id,m=a.find(v=>v.id===t);m&&l.setDeclaration(m)}}),this}getBuiltInPersistedEntity(){return this.builtInBaseEntities.find(s=>s.name===Oe.PERSISTED_ENTITY)||null}requestActiveValue(s){var l;const a=(l=this.onRequestActiveValueCallback)==null?void 0:l.call(this,s);return a?a||null:s.getDefaultValue()}undo(){console.log("Undoing, from: ",this.undoableStackValueIndex),this.undoableStackValueIndex=this.undoableStackValueIndex-1,console.log("To: ",this.undoableStackValueIndex);const s=this.history[this.undoableStackValueIndex+1],a=this.history[this.undoableStackValueIndex];return console.log("Current change set: ",s),console.log("Change set to restore: ",a),zL(s||"initial",a||"initial",this)}redo(){console.log("Undoing, from: ",this.undoableStackValueIndex),this.undoableStackValueIndex=this.undoableStackValueIndex+1,console.log("To: ",this.undoableStackValueIndex);const s=this.history[this.undoableStackValueIndex-1],a=this.history[this.undoableStackValueIndex];return console.log("Current change set: ",s),console.log("Change set to restore: ",a),zL(s||"initial",a||"initial",this)}applyExternalChangeSet(s){const a=s.payload,l=this.addChangeSet(new F(this,s.author,s.timestamp,this)),p=a.updated[this.id];if(!p)throw new Error("Project root not found in change set transfer. Cannot apply changes.");const t={...a.added,...a.updated,...a.removed},m=a.seenEntities.filter(b=>!a.affected.includes(b));m.forEach(b=>{var _;if(!t[b]){console.warn(`Entity '${b}' not found in change set transfer. Cannot apply changes.`);const I=(_=this.get(b))==null?void 0:_.toShallowJSON();throw I?console.warn("Entity in project: ",I):console.warn("Entity not in project"),new Error(`Entity '${b}' not found in change set transfer. Cannot apply changes.`)}});const v=new Ga(p);return v.flatRecord=t,v.order=m,v.orderEntities(),console.log("All entities: ",v.order.map((b,_)=>`${_+1}: ${t[b].type} - ${b}`).join(`,
401
- `)),console.log("Persisting new additions"),v.visit(async(b,_)=>{if(a.added[b.id]){console.log("Adding: ",b.id);try{const I=z(b,this);if(I.hydrateAncestors(),I.addSelfToProject(l),!this.get(b.id))throw new Error(`Entity ${b.id} was not added to the project`)}catch(I){console.error("Error: ",I),console.error("Errored entity: ",b)}}}),console.log("Persisting updates"),v.visit(async(b,_)=>{if(a.updated[b.id]){console.log("Updating: ",b.id);try{const I=this.get(b.id);I&&I.updateWithShallowTransfer(b,l)}catch(I){console.error("Error: ",I),console.error("Errored entity: ",b)}}}),console.log("Persisting removals"),v.visit(async(b,_)=>{if(a.removed[b.id]){console.log("Removing: ",b.id);try{const I=this.get(b.id);I&&I.remove({ignoreUpstream:!1},l)}catch(I){console.error("Error: ",I),console.error("Errored entity: ",b)}}}),this}toFullProjectTransfer(){const s=new Ga(this),a={};return s.visit(l=>{const p=l.toShallowJSON();a[l.id]=p}),{order:s.order,size:s.order.length,record:a}}};g(Fe,"sessionAuthor","1"),g(Fe,"UUID",{isBackup:!0,uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:s=>s}),g(Fe,"repository",{APICreate:async(s,...a)=>s,APIUpdate:async(s,...a)=>s,APIDelete:async(s,...a)=>s,APIClone:async(s,...a)=>{},APILoad:async(s,...a)=>null,APILoadVersion:async(s,a,...l)=>null}),g(Fe,"type",f.Project),g(Fe,"USER_MANAGED_PARENT_TYPES",[]),g(Fe,"PARENT_TYPES",[...Fe.USER_MANAGED_PARENT_TYPES]),g(Fe,"MUTABLE_BASE_PROPERTIES",["name","description"]),g(Fe,"INMUTABLE_BASE_PROPERTIES",["id","type","version","createdAt","author","previousVersion"]),g(Fe,"BASE_PROPERTIES",[...Fe.MUTABLE_BASE_PROPERTIES,...Fe.INMUTABLE_BASE_PROPERTIES]),g(Fe,"MUTABLE_META_PROPERTIES",[...Fe.MUTABLE_BASE_PROPERTIES,"x","y"]),g(Fe,"INMUTABLE_META_PROPERTIES",[...Fe.INMUTABLE_BASE_PROPERTIES]),g(Fe,"META_PROPERTIES",[...Fe.MUTABLE_META_PROPERTIES,...Fe.INMUTABLE_META_PROPERTIES]),g(Fe,"MUTABLE_UPSTREAM_PROPERTIES",[]),g(Fe,"INMUTABLE_UPSTREAM_PROPERTIES",["primitives","builtInBaseEntities","operationDeclarations","globalEventActionDescriptors","loopDeclarations","builtInInstances"]),g(Fe,"UPSTREAM_PROPERTIES",[...Fe.MUTABLE_UPSTREAM_PROPERTIES,...Fe.INMUTABLE_UPSTREAM_PROPERTIES]),g(Fe,"MUTABLE_DOWNSTREAM_PROPERTIES",["entities","projects","functions","events","variableDeclarations","variableInstances","conditions","operations","functionCalls","loops","searches"]),g(Fe,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),g(Fe,"DOWNSTREAM_PROPERTIES",[...Fe.MUTABLE_DOWNSTREAM_PROPERTIES,...Fe.INMUTABLE_DOWNSTREAM_PROPERTIES]),g(Fe,"PROPERTIES",[...Fe.META_PROPERTIES,...Fe.UPSTREAM_PROPERTIES,...Fe.DOWNSTREAM_PROPERTIES]);let P=Fe;var wj=(u=>(u.PersistChangeSet="persist-change-set",u.CreateSingle="create-single",u.CreateBulk="create-bulk",u.CreateSingleNested="create-single-nested",u.CreateBulkNested="create-bulk-nested",u.Update="update",u.Clone="clone",u.Delete="delete",u.Load="load",u.LoadNested="load-nested",u.LoadVersion="load-version",u))(wj||{});class Rj extends Lt{constructor(s){super(Vs,s);g(this,"id",Jt.Parallel);g(this,"name",Jt.Parallel);g(this,"description","Execute a list of actions one after the other");g(this,"version","1");g(this,"autoexecutable",!0);g(this,"initialData",Vs);g(this,"type",f.ActionDescriptor);g(this,"inputs",[]);g(this,"outputs",[]);g(this,"error",null);g(this,"project");this.project=s,this.inputs=Vs.inputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.outputs=Vs.outputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.error=Vs.error?z(Vs.error,this.project):null}}class _j extends Lt{constructor(s){super(mi,s);g(this,"id",mi.id);g(this,"name",mi.name);g(this,"description",mi.description);g(this,"version",mi.version);g(this,"autoexecutable",!1);g(this,"initialData",mi);g(this,"type",f.ActionDescriptor);g(this,"inputs",[]);g(this,"outputs",[]);g(this,"error",null);g(this,"project");this.project=s,this.inputs=mi.inputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.outputs=mi.outputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.error=mi.error?z(mi.error,this.project):null}}class Dj extends Lt{constructor(s){super(Fn,s);g(this,"id",Jt.Sequential);g(this,"name",Jt.Sequential);g(this,"description","Execute a list of actions one after the other");g(this,"version","1");g(this,"autoexecutable",!0);g(this,"initialData",Fn);g(this,"type",f.ActionDescriptor);g(this,"inputs",[]);g(this,"outputs",[]);g(this,"error",null);g(this,"project");this.project=s,this.inputs=Fn.inputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.outputs=Fn.outputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.error=Fn.error?z(Fn.error,this.project):null}}class Gye extends Lt{constructor(d){super(eu,d)}}class Kye extends Lt{constructor(d){super(lo,d)}}class kye extends Lt{constructor(s){super(uo,s);g(this,"autoexecutable",!0)}getEntityToMatchInputMap(s){return s.inputs.find(a=>{var l;return((l=a.declaration)==null?void 0:l.id)===pe.operation[Wt.Validate].inputs.entityToMatch.id})||null}getDataToValidateInputMap(s){return s.inputs.find(a=>{var l;return((l=a.declaration)==null?void 0:l.id)===pe.operation[Wt.Validate].inputs.dataToValidate.id})||null}getOutputDataOutputMap(s){return s.outputs.find(a=>{var l;return((l=a.declaration)==null?void 0:l.id)===pe.operation[Wt.Validate].outputs.outputEntity.id})||null}getEntityToMatch(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"get-entity-to-match-validate-data"))){const l=this.project.requestActiveValue(s),p=l==null?void 0:l.valueAsTypeSingle;return a==null||a.attemptAutoclose("get-entity-to-match-validate-data",this.id),p}syncOperationInstance(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-operation-instance-validate-data"))){const l=[],p=[],t=[],m=[],v=this.getEntityToMatchInputMap(s);if(v){const{added:I,updated:V,removed:B,affected:K}=this.syncEntityToMatchInputMapDataType(v,a);l.push(...V),p.push(...I),t.push(...B),m.push(...K)}const b=this.getDataToValidateInputMap(s);if(b){const{added:I,updated:V,removed:B,affected:K}=this.syncDataToValidateInputMapDataType(b,a);l.push(...V),p.push(...I),t.push(...B),m.push(...K)}const _=this.getOutputDataOutputMap(s);if(_){const{added:I,updated:V,removed:B,affected:K}=this.syncOutputDataOutputMapDataType(_,a);l.push(...V),p.push(...I),t.push(...B),m.push(...K)}return a==null||a.attemptAutoclose("sync-operation-instance-validate-data",this.id),{updated:w(l),added:w(p),removed:w(t),affected:w(m),self:s}}syncEntityToMatchInputMapDataType(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-entity-to-match-input-map-data-type"))){var _,I,V,B,K,q,Z,re,ue,Q,_e,X,Ee,se,de;const l=[],p=[],t=[],m=[];if(((_=s.declaration)==null?void 0:_.id)!==pe.operation[Wt.Validate].inputs.entityToMatch.id)return a==null||a.attemptAutoclose("sync-entity-to-match-input-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};const v=this.project.requestActiveValue(s),b=v==null?void 0:v.valueAsTypeSingle;if(!s.dataType){const ye={id:P.UUID.uuid(),version:P.UUID.uuid(),createdAt:(a==null?void 0:a.timestamp)||new Date().toISOString(),author:(a==null?void 0:a.author)||P.sessionAuthor,previousVersion:null,deleted:!1,type:f.DataType,parentRelationType:null,options:((I=s.declaration.dataType)==null?void 0:I.options)||null,implementationChooseOne:((V=s.declaration.dataType)==null?void 0:V.implementationChooseOne)||!1,staticEntities:((B=s.declaration.dataType)==null?void 0:B.staticEntities)??null,interactiveEntities:((K=s.declaration.dataType)==null?void 0:K.interactiveEntities)??null,actionEntities:((q=s.declaration.dataType)==null?void 0:q.actionEntities)??null,isList:((Z=s.declaration.dataType)==null?void 0:Z.isList)||!1,andChildrenGroup:null,orChildrenGroup:null,asType:!0,entity:(b==null?void 0:b.toJSON())||null,like:!0,inferred:!0,parent:s.toReference()},H=z(ye,s.project);H.hydrateAncestors(),H.setParent(s,a),H.initChildren(a),H.setEntity(b,a),a==null||a.add(H,G.Added),l.push(H),s.setDataType(H,a)}return(se=s.dataType)==null||se.metaSync({inferred:!0,like:!1,asType:!0,options:((re=s.declaration.dataType)==null?void 0:re.options)||null,implementationChooseOne:((ue=s.declaration.dataType)==null?void 0:ue.implementationChooseOne)||!1,staticEntities:((Q=s.declaration.dataType)==null?void 0:Q.staticEntities)??null,interactiveEntities:((_e=s.declaration.dataType)==null?void 0:_e.interactiveEntities)??null,actionEntities:((X=s.declaration.dataType)==null?void 0:X.actionEntities)??null,isList:((Ee=s.declaration.dataType)==null?void 0:Ee.isList)||!1},a),(de=s.dataType)==null||de.setEntity(b,a),s.dataType&&p.push(s.dataType),a==null||a.attemptAutoclose("sync-entity-to-match-input-map-data-type",this.id),{updated:w(p),added:w(l),removed:w(t),affected:w(m),self:s.dataType}}syncDataToValidateInputMapDataType(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-data-to-validate-input-map-data-type"))){var I,V,B;const l=[],p=[],t=[],m=[];if(((I=s.declaration)==null?void 0:I.id)!==pe.operation[Wt.Validate].inputs.dataToValidate.id)return a==null||a.attemptAutoclose("sync-data-to-validate-input-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};const v=this.getEntityToMatchInputMap(s.parent);if(!v)return a==null||a.attemptAutoclose("sync-data-to-validate-input-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};if(!this.getEntityToMatch(v,a))return a==null||a.attemptAutoclose("sync-data-to-validate-input-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};if(!s.dataType){const K={id:P.UUID.uuid(),version:P.UUID.uuid(),createdAt:(a==null?void 0:a.timestamp)||new Date().toISOString(),author:(a==null?void 0:a.author)||P.sessionAuthor,previousVersion:null,deleted:!1,type:f.DataType,parentRelationType:null,options:null,implementationChooseOne:!1,isList:!1,andChildrenGroup:null,orChildrenGroup:null,staticEntities:null,interactiveEntities:null,actionEntities:null,asType:!1,entity:null,like:!0,inferred:!0,parent:s.toReference()},q=z(K,s.project);q.setParent(s,a),q.initChildren(a),a==null||a.add(q,G.Added),l.push(q),s.setDataType(q,a)}(V=s.dataType)==null||V.metaSync({inferred:!0,like:!0,asType:!1},a);const _=this.getEntityToMatch(v,a);return(B=s.dataType)==null||B.setEntity(_,a),s.dataType&&p.push(s.dataType),a==null||a.attemptAutoclose("sync-data-to-validate-input-map-data-type",this.id),{updated:w(p),added:w(l),removed:w(t),affected:w(m),self:s.dataType}}syncOutputDataOutputMapDataType(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-output-data-output-map-data-type"))){var V,B,K;const l=[],p=[],t=[],m=[];if(((V=s.declaration)==null?void 0:V.id)!==pe.operation[Wt.Validate].outputs.outputEntity.id)return a==null||a.attemptAutoclose("sync-output-data-output-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};const v=this.getEntityToMatchInputMap(s.parent);if(!v)return a==null||a.attemptAutoclose("sync-output-data-output-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};if(!this.getEntityToMatch(v,a))return a==null||a.attemptAutoclose("sync-output-data-output-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};const _=this.project.requestActiveValue(v),I=(_==null?void 0:_.valueAsTypeSingle)||null;if(!s.dataType){const q={id:P.UUID.uuid(),version:P.UUID.uuid(),createdAt:(a==null?void 0:a.timestamp)||new Date().toISOString(),author:(a==null?void 0:a.author)||P.sessionAuthor,previousVersion:null,deleted:!1,type:f.DataType,parentRelationType:null,options:null,implementationChooseOne:!1,staticEntities:null,interactiveEntities:null,actionEntities:null,isList:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:(I==null?void 0:I.toJSON())||null,like:!0,inferred:!0,parent:s.toReference()},Z=z(q,s.project);Z.hydrateAncestors(),Z.setParent(s,a),Z.initChildren(a),Z.setEntity(I,a),a==null||a.add(Z,G.Added),l.push(Z),s.setDataType(Z,a)}return(B=s.dataType)==null||B.metaSync({inferred:!0,like:!0,asType:!1},a),(K=s.dataType)==null||K.setEntity(I,a),s.dataType&&p.push(s.dataType),a==null||a.attemptAutoclose("sync-output-data-output-map-data-type",this.id),{updated:w(p),added:w(l),removed:w(t),affected:w(m),self:s.dataType}}inferInputMapDataType(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"infer-input-map-data-type-validate-data"))){var p,t,m;if(((p=s.declaration)==null?void 0:p.id)===pe.operation[Wt.Validate].inputs.entityToMatch.id){const{added:v,updated:b,removed:_,affected:I}=this.syncEntityToMatchInputMapDataType(s,a);return a==null||a.attemptAutoclose("infer-input-map-data-type",this.id),{updated:w(b),added:w(v),removed:w(_),affected:w(I),self:s.dataType}}if(((t=s.declaration)==null?void 0:t.id)===pe.operation[Wt.Validate].inputs.dataToValidate.id){const{added:v,updated:b,removed:_,affected:I}=this.syncDataToValidateInputMapDataType(s,a);return a==null||a.attemptAutoclose("infer-input-map-data-type",this.id),{updated:w(b),added:w(v),removed:w(_),affected:w(I),self:s.dataType}}const l=(m=s.declaration)==null?void 0:m.getDataType(a);if(l&&l.isResolved)return a==null||a.attemptAutoclose("infer-input-map-data-type-validate-data",this.id),{updated:[],added:[],removed:[],affected:[],self:l};if(s.readsValue){const v=xs(s.readsValue,a);return a==null||a.attemptAutoclose("infer-input-map-data-type-validate-data",this.id),{updated:[],added:[],removed:[],affected:[],self:v}}return a==null||a.attemptAutoclose("infer-input-map-data-type-validate-data",this.id),{updated:[],added:[],removed:[],affected:[],self:null}}inferOutputMapDataType(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"infer-output-map-data-type-validate-data"))){var l;if(((l=s.declaration)==null?void 0:l.id)===pe.operation[Wt.Validate].outputs.outputEntity.id){const{added:p,updated:t,removed:m,affected:v}=this.syncOutputDataOutputMapDataType(s,a);return a==null||a.attemptAutoclose("infer-output-map-data-type-validate-data",this.id),{updated:w(t),added:w(p),removed:w(m),affected:w(v),self:s.dataType}}return{updated:[],added:[],removed:[],affected:[],self:null}}}class qye extends Lt{constructor(d){super($m,d)}}class Sye extends Lt{constructor(d){super(Cm,d)}}class Zye extends Lt{constructor(d){super(Pm,d)}}class Jye extends Lt{constructor(d){super(lf,d)}}class Wye extends Lt{constructor(d){super(nf,d)}}class Yye extends Lt{constructor(d){super(Qd,d)}}function zye(u){const d=[new Dj(u),new Rj(u),new _j(u),new Gye(u),new Kye(u),new kye(u),new Jye(u),new qye(u),new Zye(u),new Sye(u),new Wye(u),new Yye(u),new Lt(gm,u),new Lt(Dm,u)];return d.forEach(s=>{s.initChildren(null),u.subscribeBuiltInInstance(s)}),u.operationDeclarations=d,d}class gj extends qs{constructor(s){super(Jr,s);g(this,"initialData");g(this,"id",Oe.PERSISTED_ENTITY);g(this,"version","1");g(this,"name",Oe.PERSISTED_ENTITY);g(this,"description",Jr.description);g(this,"type",f.BuiltInBaseEntity);g(this,"abstract",Jr.abstract);g(this,"static",Jr.static);g(this,"properties",[]);g(this,"methods",[]);g(this,"abstractMethods",[]);g(this,"extends",[]);g(this,"errors",[]);g(this,"project");this.initialData=Jr,this.project=s,this.id=Jr.id,this.version=Jr.version,this.name=Jr.name,this.static=Jr.static,this.abstract=Jr.abstract,this.properties=this.initialData.properties.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.methods=this.initialData.methods.map(a=>{const l=z(a,this.project);return l.parent=this,l}),this.abstractMethods=this.initialData.abstractMethods.map(a=>{const l=z(a,this.project);return l.parent=this,l}),this.extends=this.initialData.extends.map(a=>z(a,this.project))}}var $j=(u=>(u.StatusCodeMustBeNumber="status-code-must-be-number",u.StatusCodeMustBeBetween100And599="status-code-must-be-between-100-and-599",u))($j||{});function Oj(u,d){const s=[];if(typeof d!="number"){const a=new xt({id:u.id+"--status-code-must-be-number",message:`Entity of type ${u.type} with id "${u.id}" has an invalid value "${d}". The value must be a number.`,issue:null,severity:S.Error,code:"status-code-must-be-number",entity:u});return s.push(a),{errors:s,override:d}}if(d<100){const a=new xt({id:u.id+"--status-code-must-be-between-100-and-599",message:`Entity of type ${u.type} with id "${u.id}" has an invalid value "${d}". The value must be a number between 100 and 599.`,issue:null,severity:S.Error,code:"status-code-must-be-between-100-and-599",entity:u});s.push(a)}if(d>599){const a=new xt({id:u.id+"--status-code-must-be-between-100-and-599",message:`Entity of type ${u.type} with id "${u.id}" has an invalid value "${d}". The value must be a number between 100 and 599.`,issue:null,severity:S.Error,code:"status-code-must-be-between-100-and-599",entity:u});s.push(a)}return{errors:s,override:d}}class Cj extends qs{constructor(s){super(Vi,s);g(this,"initialData");g(this,"id",Oe.PERSISTED_ENTITY);g(this,"version","1");g(this,"name",Oe.PERSISTED_ENTITY);g(this,"description",Vi.description);g(this,"type",f.BuiltInBaseEntity);g(this,"abstract",Vi.abstract);g(this,"static",Vi.static);g(this,"properties",[]);g(this,"methods",[]);g(this,"abstractMethods",[]);g(this,"extends",[]);g(this,"errors",[]);g(this,"project");this.initialData=Vi,this.project=s,this.id=Vi.id,this.version=Vi.version,this.name=Vi.name,this.static=Vi.static,this.abstract=Vi.abstract,this.properties=this.initialData.properties.map(t=>{const m=z(t,this.project);return m.setParent(this,null),m.initChildren(null),m}),this.methods=this.initialData.methods.map(t=>{const m=z(t,this.project);return m.parent=this,m}),this.abstractMethods=this.initialData.abstractMethods.map(t=>{const m=z(t,this.project);return m.parent=this,m}),this.extends=this.initialData.extends.map(t=>z(t,this.project));const a=this.properties.find(t=>t.id===pe["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.properties.path.id);if(!a)throw new Error("Path property not found in endpoint entity");a._codeNativeValueValidation=(t,m)=>pU(t,m);const l=this.abstractMethods.find(t=>t.id===pe["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.methods.handler.id);if(!l)throw new Error("Handler method not found in endpoint entity");const p=l.outputs.find(t=>t.id===pe["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.methods.handler.outputs.statusCode.id);if(!p)throw new Error("Status code output not found in handler method");p.codeNativeValueValidation=(t,m)=>Oj(t,m)}}const Hye="test_primitive_entities_export";class Xye extends qs{constructor(s){super(Br,s);g(this,"initialData");g(this,"id",Oe.PERSISTED_ENTITY);g(this,"version","1");g(this,"name",Oe.PERSISTED_ENTITY);g(this,"description",Br.description);g(this,"type",f.BuiltInBaseEntity);g(this,"abstract",Br.abstract);g(this,"static",Br.static);g(this,"properties",[]);g(this,"methods",[]);g(this,"abstractMethods",[]);g(this,"extends",[]);g(this,"errors",[]);g(this,"project");this.initialData=Br,this.project=s,this.id=Br.id,this.version=Br.version,this.name=Br.name,this.static=Br.static,this.abstract=Br.abstract,this.properties=this.initialData.properties.map(l=>{const p=z(l,this.project);return p.setParent(this,null),p.initChildren(null),p}),this.methods=this.initialData.methods.map(l=>{const p=z(l,this.project);return p.parent=this,p}),this.abstractMethods=this.initialData.abstractMethods.map(l=>{const p=z(l,this.project);return p.parent=this,p}),this.extends=this.initialData.extends.map(l=>z(l,this.project));const a=this.properties.find(l=>l.id===pe["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.identifier.id);if(!a)throw new Error("Path property not found in endpoint entity");a._codeNativeValueValidation=(l,p)=>fU(l,p)}}function Qye(u){const d=[new gj(u),new Cj(u),new Xye(u),new qs(Br,u),new qs(_f,u)];return d.forEach(s=>{u.subscribeBuiltInInstance(s)}),u.builtInBaseEntities=d,d}function e0e(u){const d=[new Ri(ke,u),new Ri(Bn,u),new Ri(nt,u),new Ri(bm,u),new Ri(Gr,u),new Ri(Un,u),new Ri(nn,u),new Ri(jn,u),new Ri(fl,u)];return d.forEach(s=>{u.subscribeBuiltInInstance(s)}),u.primitives=d,d}function t0e(u){const d=[new Lt(gf,u)];return d.forEach(s=>{s.initChildren(null),u.subscribeBuiltInInstance(s)}),u.globalEventActionDescriptors=d,d}function r0e(u){const d=[new Lt(su,u),new Lt(ca,u),new Lt(ru,u),new Lt(ml,u),new Lt(vl,u),new Lt(mf,u)];d.forEach(a=>{a.initChildren(null),u.subscribeBuiltInInstance(a)}),u.loopDeclarations=d;const s=[new Lt(bf,u),new Lt(iu,u),new Lt(Ef,u),new Lt(qm,u),new Lt(Zm,u),new Lt(vf,u)];return s.forEach(a=>{a.initChildren(null),u.subscribeBuiltInInstance(a)}),u.loopDeclarationsBodies=s,d}function i0e(u){const d=[new ks($f,u),new ks(pv,u)];return d.forEach(s=>{s.initChildren(null),u.subscribeBuiltInInstance(s)}),u.valueDescriptors=d,d}function s0e(u){const d=[new Lt(yo,u),new Lt(Il,u)];return d.forEach(s=>{s.initChildren(null),u.subscribeBuiltInInstance(s)}),u.conditionDeclarations=d,d}const jo={},_y={},cp={empty:!1,enrich:!0,mock:!1,ignoreCache:!1,onFetch:async()=>null,manuallyInit:!1};function Pj(u,{enrich:d}={enrich:!0}){const s=u.project,a=u.record,l=new Ga(s),p=new Set;a[s.id]=s,p.add(s.id);const t=N().toISOString();Object.values(a).forEach(b=>{!b||l.allBuiltInEntityIds.includes(b.id)||p.add(b.id)}),l.order=Array.from(p),l.flatRecord=a,l.orderEntities();const m=Dy(u.project);m.instances[s.id]=m;const v=d?m.addChangeSet(new F(m,P.sessionAuthor,t,m,!0,"project-init-from-fetch-result")):null;return l.visit(b=>{if(b.id===m.id)return;const _=z(b,m);_.hydrateAncestors(),_.addSelfToProject(null)}),d?(l.visit(b=>{if(b.id===m.id)return;const _=m.get(b.id);_&&_.afterAllChildrenInitialized(v)}),m.afterAllChildrenInitialized(v)):gy(m,t).forEach(_=>{_.remove({ignoreUpstream:!0},null)}),m.instancesList.forEach(b=>{b.previousVersion=null}),v==null||v.attemptAutoclose("project-init-from-fetch-result",m.id),m}async function n0e(u,d=cp){const s={...cp,...d};if(s.empty)return{data:{project:{id:u.id,type:f.Project,version:P.UUID.uuid(),createdAt:N().toISOString(),author:P.sessionAuthor,previousVersion:null,deleted:!1,name:null,description:null,projects:[],entities:[],operations:[],functions:[],variableDeclarations:[],variableInstances:[],functionCalls:[],conditions:[],loops:[],searches:[],events:[]},record:{}}};if(s.mock){const l={...bE};return l.id=u.id,{data:{project:l,record:{}}}}return console.log("Fetching project from external API"),new Promise(async l=>{try{if(s.onFetch){const p=await s.onFetch(u.id);if(p){l({data:p});return}}else l({data:null})}catch(p){console.error("Error fetching project: ",p),l({data:null})}})}function Dy(u){const d=new P(u);return e0e(d),Qye(d),zye(d),t0e(d),r0e(d),i0e(d),s0e(d),Array.from(new Set([...d.getAllBuiltInIds(),...bs()])).forEach(a=>{if(!d.builtInInstances[a]&&d.instances[a])d.builtInInstances[a]=d.instances[a],delete d.instances[a];else if(!d.builtInInstances[a])throw new Error(`Built in entity was not properly initialized: ${a}`)}),d.instances[d.id]=d,d}function gy(u,d){return u.instancesList.filter(a=>N(a.createdAt).isAfter(N(d)||!!a.previousVersion))}function a0e(u,{enrich:d}={enrich:!0}){const s=new Map,a=new Map,l=Array.from(new Set([...u.getAllBuiltInIds(),...bs()]));Object.keys(u.instances).forEach(_=>{if(l.includes(_)){s.set(_,_),a.set(_,_);return}const I=u.get(_);if(!wy(I,{...u.instances,...u.builtInInstances}).every(q=>!l.includes(q))){s.set(_,_),a.set(_,_);return}const K=P.UUID.uuid();s.set(_,K),a.set(K,_)});const p=N().toISOString(),t=u.toShallowJSON({seenEntityMaps:s});t.previousVersion=null,t.createdAt=p,t.version=P.UUID.uuid();const m=Dy(t);m.instances[m.id]=m;const v=d?m.addChangeSet(new F(m,P.sessionAuthor,p,m,!0,"project-clone")):null,b=new Ga(u);return b.visit(_=>{const I=_.toShallowJSON({seenEntityMaps:s});I.previousVersion=null,I.createdAt=p,I.version=P.UUID.uuid();const V=rp(I,OU(b.flatRecord,s));if(Object.keys(V.upstream).length){let K=!1;if(Object.keys(V.upstream).forEach(q=>{if(!K&&(!m.get(q)||m.getDeleted(q))){K=!0;return}}),K)return}const B=z(I,m);B.hydrateAncestors(),B.addSelfToProject(v),v==null||v.add(B,G.Added)}),d?(b.visit(_=>{if(_.id===m.id)return;const I=m.get(s.get(_.id));I&&I.afterAllChildrenInitialized(v)}),m.afterAllChildrenInitialized(v)):gy(m,p).forEach(I=>{I.remove({ignoreUpstream:!0},null)}),m.instancesList.forEach(_=>{_.previousVersion=null}),v==null||v.attemptAutoclose("project-clone",m.id),m}function Vj(u,{enrich:d}={enrich:!0}){const s=Dy(u),a=N().toISOString(),l=d?s.addChangeSet(new F(s,P.sessionAuthor,a,s,!0,"project-init")):null;l&&(l.type=jT.Automatic);const p=new Ga(u);return p.visit(t=>{const m=z(t,s);m.hydrateAncestors(),m.addSelfToProject(l)}),d?(p.visit(t=>{if(t.id===s.id)return;const m=s.get(t.id);m&&m.afterAllChildrenInitialized(l)}),s.afterAllChildrenInitialized(l)):(gy(s,a).forEach(v=>{v.remove({ignoreUpstream:!0},null)}),new Ga(s).visit(v=>{v.initialized=!0,v.captureVersion()})),s.initialized=!0,l==null||l.attemptAutoclose("project-init",s.id),s}async function o0e(u,d=cp){const s={...cp,...d};if(u.id&&jo[u.id]&&!s.ignoreCache)return jo[u.id];if(u.id&&_y[u.id]&&!s.ignoreCache)return await _y[u.id],jo[u.id];const a=n0e(u,s);u.id&&(_y[u.id]=a);const l=await a;if(l.data){let p;return s.mock?p=Vj(bE,{enrich:!!s.enrich}):l.data instanceof P?p=l.data:p=Pj(l.data,{enrich:!!s.enrich}),jo[u.id]=p,u.id&&delete _y[u.id],p}return null}function l0e(u){return jo[u.id]&&delete jo[u.id],null}C.AI_VALUE_CONNECTION_GENERATION_ACTION_EXPLANATION=hb,C.ALL_BUILT_IN_BASE_ENTITIES=MC,C.ALL_BUILT_IN_CONDITION_ENTITIES=YC,C.ALL_BUILT_IN_GLOBAL_EVENT_ENTITIES=HC,C.ALL_BUILT_IN_LOOP_BODY_ENTITIES=dO,C.ALL_BUILT_IN_LOOP_ENTITIES=lO,C.ALL_BUILT_IN_OPERATION_ENTITIES=bg,C.ALL_BUILT_IN_PRIMITIVE_ENTITIES=l1,C.ALL_BUILT_IN_TOP_LEVEL_ENTITIES=iP,C.ALL_BUILT_IN_VALUE_DESCRIPTORS=rP,C.ActionDescriptorState=Lt,C.ActionInputMapState=yhe,C.ActionOutputMapState=Ehe,C.AppendToListOperationInputIds=m_,C.AppendToListOperationOutputIds=v_,C.ArgumentDeclarationDependencyField=k3,C.ArgumentDeclarationState=ea,C.BREAK_AND_CONTINUE_STATEMENTS_RETURN_DECLARATIONS_EXPLANATION=ub,C.BUILT_IN_BASE_ENTITY_IDS=pe,C.BUILT_IN_ENTITY_TYPES=Pi,C.BaseCanvasDraggableState=Vye,C.BaseEntityNames=Oe,C.BaseState=Pye,C.BaseValueDescriptorIds=pl,C.BreakStatementDependencyField=S3,C.BreakStatementState=Ba,C.BuiltInBaseEntityState=qs,C.CACHED_PROJECTS_BY_ID=jo,C.CALLABLE_ENTITIES_EXPLANATION=_he,C.CALLABLE_TYPES=rn,C.CALLER_ENTITIES_EXPLANATION=z3,C.CALLER_TYPES=sn,C.CALLS_UPDATE_EXPLANATION=ja,C.CHILDREN_TYPES=s7,C.COMPARISON_CONDITIONS=JC,C.CONDITIONS=WC,C.CUSTOM_ENTITY_OPERATIONS=jD,C.CallableEntityClass=Lye,C.CallerEntityClass=Nb,C.ChangeSet=F,C.ChangeSetChangeCaptureType=jT,C.ChangeSetEntityChangeType=G,C.ChildEntityBaseClass=Nye,C.CommonStringValidationErrorCodes=cU,C.ComparisonOperatorTypes=fr,C.ConditionDependencyField=EM,C.ConditionState=Ca,C.ContinueStatementDependencyField=pM,C.ContinueStatementState=Qr,C.CreateNewInputIds=pD,C.CreateNewOutputIds=fD,C.DRAGGABLE_CALLABLE_TYPES=Tm,C.DRAGGABLE_CALLER_TYPES=e1,C.DRAGGABLE_ELEMENT_TYPES=sf,C.DRAGGABLE_EXECUTABLE_TYPES=r7,C.DRAGGABLE_PASS_THROUGH_CALLABLE_TYPES=rf,C.DRAGGABLE_PASS_THROUGH_CALLABLE_TYPES_WITH_OUTPUTS=Em,C.DataTypeCompatibilityTypes=ms,C.DataTypeDependencyField=xT,C.DataTypeParentChildRelation=Fr,C.DataTypeState=ts,C.DefinitionEntityDependencyField=Ry,C.DefinitionEntityState=ia,C.EDITABLE_PERSISTANCE_REPOSITORY_DEFAULTS=Oye,C.ENTITIES_WITH_VALLUES_EXPLANATION=dy,C.ENTITY_PERSISTANCE_OPTIONS_DEFAULTS=oe,C.ENTITY_RECUSION_OPTIONS_DEFAULTS=Ce,C.ENTITY_TYPES=i7,C.ENTITY_WITH_DECLARATION_TYPES=e7,C.ENTITY_WITH_LOGIC_SCOPE_TYPES=br,C.ENTITY_WITH_NAMES_TYPES=t1,C.ENTITY_WITH_PARENT_TYPES=XK,C.ENTITY_WITH_USER_MANAGED_DECLARATION_TYPES=Xw,C.ENTITY_WITH_USER_MANAGED_SINGLE_IMPLEMENTS_TYPES=QK,C.ENTITY_WITH_VALUE_TYPES=vm,C.ENTRY_POINT_ENTITIES_EXPLANATION=Xc,C.ENTRY_POINT_TYPES=Xt,C.EVENT_TYPES=cl,C.EXECUTABLE_TYPES=t7,C.EXECUTION_OPERATIONS=cD,C.EndpointEntity=Cj,C.EntityAction=wj,C.EntityError=xt,C.EntityErrorSeverity=S,C.EntityGenerationError=Y,C.EntityGenerationErrorCode=k,C.EntityInstanceErrorCode=me,C.EntityOperations=Wt,C.EntityType=f,C.EntityWithLogicScopeClass=jye,C.EntityWithValueClass=Uye,C.EntryPointEntityClass=Mye,C.Events=Lb,C.ExecutionOperations=Jt,C.ExecutionTerminationType=yM,C.FunctionCallDependencyField=oU,C.FunctionCallState=Fa,C.FunctionDeclarationDependencyField=sM,C.FunctionDeclarationState=_a,C.GET_PROJECT_OPTIONS_DEFAULTS=cp,C.GLOBAL_EVENT_DECLARATIONS=zC,C.GetLastInListOperationInputIds=s_,C.GetLastInListOperationOutputIds=n_,C.GlobalEventNames=Mn,C.GlobalEventState=$a,C.HTTPOperations=Hr,C.HTTPStatucCodeValidationErrorCodes=$j,C.HTTP_OPERATIONS=Eg,C.InputMapDependencyField=x3,C.InputMapState=Es,C.InstalledProjectState=La,C.InternalCallDependencyField=U3,C.InternalCallState=Ma,C.JoinListOperationInputIds=RR,C.JoinListOperationOutputIds=_R,C.LIST_OPERATIONS=C_,C.ListOperations=it,C.LiteralValueDependencyField=eM,C.LiteralValueState=Fs,C.LoopDependencyField=mM,C.LoopState=Oa,C.LoopTypes=Be,C.NON_INTERACTIVE_BASE_ENTITIES_EXPLANATION=xa,C.NUMBER_OPERATIONS=j1,C.NumberOperations=Ht,C.OPERATION_DECLARATIONS=Tg,C.OperationDependencyField=oM,C.OperationState=Da,C.OutputMapDependencyField=G3,C.OutputMapParentChildRelation=ul,C.OutputMapState=Ks,C.PARENT_AUTO_CALCULATION_FROM_CALLER_EXPLANATION=uy,C.PASS_THROUGH_CALLABLE_ENTITIES_EXPLANATION=Ua,C.PASS_THROUGH_CALLABLE_TYPES=dr,C.PASS_THROUGH_CALLABLE_TYPES_WITH_OUTPUTS=Qw,C.PROPERTY_NOT_VALUE_READER_WRITTER_EXPLANATION=fb,C.ParallelExecutionOperation=Rj,C.PassThroughCallableEntityClass=Bye,C.PersistedEntity=gj,C.PersistedEntityMethods=Ji,C.PrimitiveEntityState=Ri,C.PrimitiveTypes=te,C.ProjectState=P,C.ProjectStateEvents=ar,C.PropertyDependencyField=rM,C.PropertyState=Xn,C.READ_ONLY_ENTITY_PERSISTANCE_REPOSITORY=Aj,C.RETURN_STATEMENT_RETURN_DECLARATIONS_EXPLANATION=Dhe,C.ReturnDeclarationDependencyField=dM,C.ReturnDeclarationState=wi,C.ReturnStatementDependencyField=FT,C.ReturnStatementState=ga,C.SQLAST=ohe,C.STANDALONE_CONDITIONS=jC,C.STRING_OPERATIONS=wR,C.ScopeCompatibilityType=Ay,C.SearchDependencyField=N3,C.SearchState=Na,C.SequentialExecutionOperation=Dj,C.SequentialExecutionOperationInputIds=X_,C.SequentialExecutionOperationOutputIds=Q_,C.SharedEntityErrorCode=le,C.SharedStateFunctionality=bj,C.SplitListOperationInputIds=FR,C.SplitListOperationOutputIds=GR,C.StandaloneOperatorTypes=ps,C.StringOperations=ut,C.TERMINATION_TYPES=sr,C.Traverser=Ga,C.USER_MANAGED_ENTITY_TYPES=r1,C.UserManagedEntityStateTemplate=Cye,C.VALUE_READING_ENTITIES_EXPLANATION=pb,C.VALUE_READING_TYPES=ua,C.VALUE_WRITING_ENTITIES_EXPLANATION=H3,C.VALUE_WRITING_TYPES=Tr,C.VARIABLE_DATA_TYPE_INFERRANCE_EXPLANATION=cb,C.VARIABLE_TYPES=lr,C.ValueAutogenerationType=Er,C.ValueDescriptorDependencyField=J3,C.ValueDescriptorParentChildRelation=ie,C.ValueDescriptorState=ks,C.ValueReadingEntityClass=dp,C.ValueWritingEntityClass=up,C.VariableDeclarationDependencyField=AM,C.VariableDeclarationState=Va,C.VariableInputMapState=hhe,C.VariableInstanceDependencyField=KT,C.VariableInstanceState=Pa,C.VariableOutputMapState=vhe,C.WaitOperation=_j,C.WaitOperationInputIds=S_,C.WaitOperationOutputIds=Z_,C.actionDescriptorValidation=mpe,C.appendToListOperation=lf,C.appendToListOperationElementToAppendArgument=Nm,C.appendToListOperationElementToAppendArgumentParentRef=__,C.appendToListOperationElementToAppendArgumentRef=b_,C.appendToListOperationError=O_,C.appendToListOperationErrorParentRef=$_,C.appendToListOperationListArgument=Vm,C.appendToListOperationListArgumentParentRef=R_,C.appendToListOperationListArgumentRef=E_,C.appendToListOperationListDataType=T_,C.appendToListOperationResultListDataType=w_,C.appendToListOperationResultListReturn=g_,C.appendToListOperationResultListReturnParentRef=D_,C.appendToListOperationResultListReturnRef=I_,C.appendToListOperationSecondListDataType=A_,C.applyNewScope=Me,C.argumentDeclarationValidation=The,C.asGenerationActionExample=En,C.booleanPrototype=Bn,C.breakStatementValidation=bhe,C.calculateNewParentBasedOnCallers=bb,C.capitalizeFirstLetter=kr,C.changeSetJSONRecordToUniqueIds=epe,C.checkAreDataTypesCompatible=vs,C.checkAreDefinitionEntitiesCompatibleAsDataType=ML,C.checkArePropertiesCompatibleAsDataType=LL,C.checkExtendsBaseEntity=Iy,C.checkHasBaseEntity=As,C.checkHasMetadataChanged=cr,C.checkImplementationsOverlap=ra,C.checkImplementsBaseEntity=nye,C.checkIsBranchDependentButNotDirectlyOnBranch=ep,C.checkIsBranchDependentOnBranch=xhe,C.checkIsBuiltIn=Vb,C.checkIsCallableEntityReachable=lp,C.checkIsCanvasEntity=iye,C.checkIsDefEntityInlineDeclaredForSearchOutputType=nb,C.checkIsDetachedBranch=dj,C.checkIsDetachedBranchShallow=Cb,C.checkIsGlobalVariable=tye,C.checkIsGloballyDeclared=Ob,C.checkIsMethod=pj,C.checkIsNestedScope=by,C.checkScopeCompatibility=op,C.cloneProject=a0e,C.conditionValidation=vpe,C.continueStatementValidation=ppe,C.convertToAbstract=Mhe,C.convertToNonAbstract=Bhe,C.convertToNonStatic=jhe,C.convertToStatic=Uhe,C.countedLoopActionDescriptor=su,C.countedLoopActionDescriptorDynamicReturnDeclaration=eO,C.countedLoopActionDescriptorDynamicReturnDeclarationParentRef=Q$,C.countedLoopActionDescriptorStringArgumentDeclaration=X$,C.countedLoopActionDescriptorStringArgumentDeclarationDataType=z$,C.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValue=W$,C.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValueParentRef=J$,C.countedLoopActionDescriptorStringArgumentDeclarationDataTypeParentRef=Y$,C.countedLoopActionDescriptorStringArgumentDeclarationParentRef=H$,C.countedLoopBodyActionDescriptor=bf,C.countedLoopBodyActionDescriptorAnyDynamicArgument=nO,C.countedLoopBodyActionDescriptorAnyDynamicArgumentParentRef=sO,C.countedLoopBodyActionDescriptorAnyDynamicReturn=oO,C.countedLoopBodyActionDescriptorAnyDynamicReturnParentRef=aO,C.countedLoopBodyActionDescriptorIterationNumberArgumentDeclaration=Wm,C.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=rO,C.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=tO,C.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=iO,C.createDefinitionEntityFromJSONObject=yy,C.createEntityError=tt,C.createNestedDataTypeForEntity=uU,C.createNewInstanceOperation=lo,C.createNewInstanceOperationEntityToInstanciateArgument=AD,C.createNewInstanceOperationEntityToInstanciateArgumentRef=ED,C.createNewInstanceOperationEntityToInstanciateDataType=TD,C.createNewInstanceOperationError=_D,C.createNewInstanceOperationErrorParentRef=RD,C.createNewInstanceOperationNewEntityDataArgument=vD,C.createNewInstanceOperationNewEntityDataArgumentDataType=mD,C.createNewInstanceOperationNewEntityDataArgumentDataTypeParentRef=yD,C.createNewInstanceOperationNewEntityDataArgumentParentRef=hD,C.createNewInstanceOperationOutputEntityDeclaration=wD,C.createNewInstanceOperationOutputEntityDeclarationParentRef=ID,C.createNewInstanceOperationRef=bD,C.createSemanticId=JL,C.createStateFromGenerationTargetType=$ye,C.createStateFromType=er,C.createStateFromTypeAndSubscribe=z,C.cronJobBuiltInBaseEntity=_f,C.cronJobBuiltInBaseEntityExpressionProperty=NC,C.cronJobBuiltInBaseEntityExpressionPropertyDataTypeRef=p7,C.cronJobBuiltInBaseEntityExpressionPropertyRef=PC,C.cronJobBuiltInBaseEntityRef=VC,C.cronJobTriggeredFunctionDeclarationBlueprint=lv,C.cronJobTriggeredFunctionDeclarationBlueprintParentRef=OC,C.dataTypeCompatibilityToErrorExplanation=nU,C.dataTypeValidation=ape,C.datePrototype=nn,C.dateValueAutogenerationSchema=_E,C.definitionEntityToZodSchema=TP,C.definitionEntityValidation=Rye,C.deletePersistedEntityMethod=ov,C.deletePersistedEntityMethodParentRef=hC,C.deleteRootProject=l0e,C.endpointBuiltInBaseEntity=Vi,C.endpointBuiltInBaseEntityRef=fO,C.endpointBuiltInBaseEntityRefFour=YO,C.endpointBuiltInBaseEntityRefThree=IO,C.endpointBuiltInBaseEntityRefTwo=EO,C.endpointBuiltInCorsProperty=hO,C.endpointBuiltInCorsPropertyDataType=pO,C.endpointBuiltInCorsPropertyDataTypeRef=uO,C.endpointBuiltInCorsPropertyRef=cO,C.endpointBuiltInMethodProperty=zm,C.endpointBuiltInMethodPropertyDataType=AO,C.endpointBuiltInMethodPropertyDataTypeRef=TO,C.endpointBuiltInMethodPropertyRef=bO,C.endpointBuiltInPathProperty=Ym,C.endpointBuiltInPathPropertyDataType=vO,C.endpointBuiltInPathPropertyDataTypeRef=yO,C.endpointBuiltInPathPropertyRef=mO,C.endpointPathParamsArgumentDeclaration=Xm,C.endpointPathParamsArgumentDeclarationRef=VO,C.endpointPathParamsVariableDataType=NO,C.endpointPathParamsVariableDataTypeRef=PO,C.endpointReachedTriggerActionDescriptor=sv,C.endpointReachedTriggerActionDescriptorRef=LO,C.endpointReachedTriggerActionDescriptorRefFour=UO,C.endpointReachedTriggerActionDescriptorRefThree=BO,C.endpointReachedTriggerActionDescriptorRefTwo=MO,C.endpointRequestBodyArgumentDeclaration=ev,C.endpointRequestBodyArgumentDeclarationRef=DO,C.endpointRequestBodyVariableDataType=gO,C.endpointRequestHeadersArgumentDeclaration=Hm,C.endpointRequestHeadersArgumentDeclarationRef=RO,C.endpointRequestHeadersVariableDataType=_O,C.endpointRequestHeadersVariableDataTypeRef=wO,C.endpointRequestQueryParamsArgumentDeclaration=Qm,C.endpointRequestQueryParamsArgumentDeclarationRef=OO,C.endpointRequestQueryParamsVariableDataType=CO,C.endpointRequestQueryParamsVariableDataTypeRef=$O,C.endpointResponseBodyDataType=JO,C.endpointResponseBodyReturnDeclaration=iv,C.endpointResponseBodyReturnDeclarationRef=ZO,C.endpointResponseCodeDataType=xO,C.endpointResponseCodeReturnDeclaration=tv,C.endpointResponseCodeReturnDeclarationDefaultValueParentRef=GO,C.endpointResponseCodeReturnDeclarationRef=jO,C.endpointResponseHeadersDataType=qO,C.endpointResponseHeadersDataTypeRef=KO,C.endpointResponseHeadersReturnDeclaration=rv,C.endpointResponseHeadersReturnDeclarationRef=kO,C.endpointReturnStatementRef=FO,C.endpointReturnStatementRefThree=WO,C.endpointReturnStatementRefTwo=SO,C.enrichFromKnownEntities=tp,C.enumOptionsProperty=o1,C.enumOptionsPropertyDataType=n1,C.enumOptionsPropertyDataTypeRef=i1,C.enumOptionsPropertyRef=s1,C.enumPrototype=Un,C.enumPrototypeRef=a1,C.executionBuiltInBaseEntity=Df,C.executionBuiltInEntityAbortMethod=dv,C.executionBuiltInEntityAbortMethodParentRef=LC,C.filterOutDuplicateEntities=w,C.filterOutDuplicateErrors=yoe,C.findEntityFromKeys=Eb,C.findReferenceToSelfInList=$U,C.findReferencesToSelfInProject=Whe,C.flattenActionDescriptor=CU,C.flattenArgumentDeclaration=PU,C.flattenBreakStatement=VU,C.flattenBuiltInBaseEntity=NU,C.flattenCalls=Ts,C.flattenCanvasAncestorsUntil=nd,C.flattenCondition=LU,C.flattenContinueStatement=MU,C.flattenDataType=UU,C.flattenDefinitionEntity=BU,C.flattenDefinitionEntityExtensionAndImplementationTypes=Ty,C.flattenDefinitionEntityExtensionTypes=sp,C.flattenDefinitionEntityExtensions=_b,C.flattenDefinitionEntityImplementations=Db,C.flattenDefinitionEntityImplementionTypes=ip,C.flattenDerivedCanvasEntities=xi,C.flattenDetachedBranch=cj,C.flattenElementCalls=at,C.flattenElementCallsOnTheSameScope=Jhe,C.flattenEntity=ae,C.flattenFunctionCall=jU,C.flattenFunctionDeclaration=xU,C.flattenGlobalEvent=FU,C.flattenInputMap=GU,C.flattenInstalledProject=KU,C.flattenInternalCall=kU,C.flattenLiteralValue=qU,C.flattenLoop=SU,C.flattenOperation=ZU,C.flattenOutputMap=JU,C.flattenPrimitiveEntity=WU,C.flattenProject=YU,C.flattenProjectElements=gU,C.flattenProperty=zU,C.flattenRelatedCanvasElementsOnTheLeft=lj,C.flattenRelatedCanvasElementsOnTheRight=oj,C.flattenReturnDeclaration=HU,C.flattenReturnStatement=XU,C.flattenSearch=QU,C.flattenValueDescriptor=ej,C.flattenVariableDeclaration=tj,C.flattenVariableInstance=rj,C.flattenVariableReads=DU,C.flattenVariableWrites=_U,C.flattenVariables=kt,C.fromChangeSetToRecordChangeSet=cye,C.fromLiteralValueTypeToPrimitiveType=ib,C.fromZodParseToEntityGenerationErrors=ob,C.functionCallValidation=Lhe,C.functionDeclarationValidation=npe,C.generate=y9,C.generateActionExample=ghe,C.generateExecutionDataType=Zce,C.generateIdFromStrategy=hr,C.generateMutablePropertiesExplanation=ay,C.generateRandomBoolean=SP,C.generateRandomDate=wP,C.generateRandomDateAfter=bP,C.generateRandomDateBefore=AP,C.generateRandomDateBetweenRange=IP,C.generateRandomNumber=FP,C.generateRandomNumberAfter=UP,C.generateRandomNumberBefore=jP,C.generateRandomNumberBetweenRange=xP,C.generateRandomText=qP,C.generateRandomTextAfter=GP,C.generateRandomTextBefore=KP,C.generateRandomTextBetweenRange=kP,C.generateUniqueUUID=BP,C.getAllActionDescriptorsForConditions=fy,C.getAllActionDescriptorsForGlobalEvents=cy,C.getAllActionDescriptorsForLoops=py,C.getAllActionDescriptorsForOperations=Phe,C.getAllBuiltInEntityIds=bs,C.getAllGloballyDeclaredFunctionDeclarationsExplanation=rU,C.getBaseBuiltInEntities=hi,C.getBaseSchemaBasedOnType=W3,C.getBuiltInEntityOwner=ka,C.getCallableEntityReferenceSchema=Kr,C.getCallableEntityTypeSchema=IN,C.getCalledBy=is,C.getCallerEntityReferenceSchema=Tde,C.getCallerEntityTypeSchema=Ede,C.getCalls=Ib,C.getCanvasEntitiesDerivedFromInternalCalls=aj,C.getCanvasEntitiesDerivedFromWrites=ad,C.getCanvasEntityDerivedFromValueReadingEntity=Ey,C.getCanvasEntityDerivedFromValueReadingEntityFromTransfer=nj,C.getCanvasEntityReferenceSchema=Bde,C.getCanvasEntityTypeSchema=Mde,C.getChildrenEntityWithValues=Ghe,C.getColumnProperties=od,C.getCommonAncestor=Ab,C.getCommonChildren=hU,C.getDatabaseEntities=oye,C.getDatabaseEntity=dye,C.getDeclaration=Mo,C.getDeclarationOutputedError=fye,C.getDeepestScope=hj,C.getDefaultRelationalDatabaseEntityOrFirst=mj,C.getDraggableCallableEntityReferenceSchema=RN,C.getDraggableCallableEntityTypeSchema=wN,C.getDraggableCallerEntityReferenceSchema=Ade,C.getDraggableCallerEntityTypeSchema=bde,C.getDraggableExecutableEntityReferenceSchema=_de,C.getDraggableExecutableEntityTypeSchema=Rde,C.getDraggablePassThroughCallableEntityReferenceSchema=Mh,C.getDraggablePassThroughCallableEntityTypeSchema=Lh,C.getDraggablePlayableEntityReferenceSchema=Cde,C.getDraggablePlayableEntityTypeSchema=Ode,C.getEntitiesCreatedSinceInitialization=gy,C.getEntityArgumentDeclarations=Rb,C.getEntityInputMaps=ij,C.getEntityOutputMaps=Xhe,C.getEntityReferenceSchema=Lde,C.getEntityReturnDeclarations=sj,C.getEntityTypeSchema=Nde,C.getEntityWithLogicScopeReferenceSchema=Yn,C.getEntityWithLogicScopeTypeSchema=Dde,C.getEntityWithValueReferenceSchema=AN,C.getEntityWithValueTypeSchema=vde,C.getEntryPointEntityReferenceSchema=Ur,C.getEntryPointEntityTypeSchema=Ia,C.getEventEntityReferenceSchema=Vh,C.getEventEntityTypeSchema=Ph,C.getExecutableEntityReferenceSchema=wde,C.getExecutableEntityTypeSchema=Ide,C.getExtendedBuiltInEntity=Qhe,C.getExtendedDefinitionEntity=$b,C.getFirstNonLoopScopeOwner=Rr,C.getGenerationTargetSchemaBasedOnType=Y3,C.getHeadIfPartOfDetachedBranch=uj,C.getHighestScope=fj,C.getImplementedBuiltInEntity=eye,C.getIsInteractive=np,C.getLastInListOperation=Pm,C.getLastInListOperationError=y_,C.getLastInListOperationErrorParentRef=h_,C.getLastInListOperationInputListArgument=c_,C.getLastInListOperationInputListArgumentParentRef=u_,C.getLastInListOperationInputListArgumentRef=a_,C.getLastInListOperationInputListDataType=o_,C.getLastInListOperationOutputElementDataType=d_,C.getLastInListOperationOutputElementReturn=f_,C.getLastInListOperationOutputElementReturnParentRef=p_,C.getLastInListOperationOutputElementReturnRef=l_,C.getLinkedEntitiesFromArgumentDeclaration=Zhe,C.getLowestPersistedEntityImplementation=gb,C.getParentCallableEntity=yU,C.getParentCallerEntity=vU,C.getParentCanvasEntities=ei,C.getParentCanvasEntity=Pr,C.getParentCanvasEntityFromTransfer=my,C.getParentEntryPoint=Fhe,C.getParentPassthroughCallableEntity=mU,C.getPassThroughCallableEntityReferenceSchema=Qt,C.getPassThroughCallableEntityTypeSchema=Nh,C.getPeristedEntities=aye,C.getPlayableEntityReferenceSchema=$de,C.getPlayableEntityTypeSchema=gde,C.getProject=o0e,C.getPrototypeByType=ap,C.getRecusriveParentsIds=wy,C.getReferenceEntityId=W,C.getReferencedEntitiesStateOrErrors=ly,C.getReferencedEntityStateOrErrors=lb,C.getReferencedIds=rp,C.getRelatedCanvasElementsOnTheLeft=Uo,C.getRelatedCanvasElementsOnTheLeftFromTransfer=Yhe,C.getRelatedCanvasElementsOnTheRight=Ka,C.getRootEntryPointScopeOwner=Pb,C.getScopeOwner=yi,C.getStateClassFromType=uye,C.getTerminationReferenceSchema=Vde,C.getTerminationTypeSchema=Pde,C.getTouchedCanvasEntitiesFromChangeSet=pye,C.getUsedArgFromDeclaration=zhe,C.getUsedReturnFromDeclaration=Hhe,C.getValueReadingEntityReferenceSchema=bN,C.getValueReadingEntityTypeSchema=Wn,C.getValueWritingEntityReferenceSchema=mde,C.getValueWritingEntityTypeSchema=Ku,C.getVariableFromInputMapping=TU,C.getVariableFromReturnVariablePointer=IU,C.getVariableReferenceSchema=Aa,C.getVariableTypeSchema=Oo,C.getVariablesFromArgumentDeclarations=vy,C.getVariablesFromInputMaps=bU,C.getVariablesFromOutputMapping=wU,C.getVariablesFromOutputMaps=RU,C.getVariablesFromReturnDeclarations=AU,C.getVariablesInSameOrHigherScope=CT,C.getWrites=wb,C.globalEventValidation=fpe,C.groupCallsBasedOnParallelizableExecution=khe,C.handleAfterEntityImplementationSideEffects=dU,C.handleBeforeEntityImplementationSideEffects=lU,C.httpRequestBodyArgument=pf,C.httpRequestBodyArgumentRef=HD,C.httpRequestBodyDataType=XD,C.httpRequestHeadersArgument=cf,C.httpRequestHeadersArgumentRef=YD,C.httpRequestHeadersDataType=zD,C.httpRequestMethodArgument=df,C.httpRequestMethodArgumentRef=JD,C.httpRequestMethodDataType=WD,C.httpRequestMethodDataTypeRef=SD,C.httpRequestOperation=eu,C.httpRequestOperationErrorValueDescriptor=xm,C.httpRequestOperationErrorValueDescriptorDatatype=vg,C.httpRequestOperationErrorValueDescriptorRef=mg,C.httpRequestOperationRef=pg,C.httpRequestOperationRefEight=hg,C.httpRequestOperationRefFive=ug,C.httpRequestOperationRefFour=dg,C.httpRequestOperationRefNine=yg,C.httpRequestOperationRefSeven=fg,C.httpRequestOperationRefSix=cg,C.httpRequestOperationRefThree=lg,C.httpRequestOperationRefTwo=og,C.httpRequestQueryParamsArgument=jm,C.httpRequestQueryParamsArgumentRef=kD,C.httpRequestQueryParamsDataType=qD,C.httpRequestVariableURLArgument=uf,C.httpRequestVariableURLArgumentRef=GD,C.httpRequestVariableURLDataType=KD,C.httpRequestVariableURLDataTypeRef=xD,C.httpResponseBodyReturnDataType=ag,C.httpResponseBodyReturnDataTypeRef=sg,C.httpResponseBodyReturnReturn=yf,C.httpResponseBodyReturnReturnRef=ng,C.httpResponseCodeDataType=eg,C.httpResponseCodeReturn=ff,C.httpResponseCodeReturnRef=QD,C.httpResponseHeadersDataType=ig,C.httpResponseHeadersDataTypeRef=tg,C.httpResponseHeadersReturn=hf,C.httpResponseHeadersReturnRef=rg,C.httpStatusCodeValueValidation=Oj,C.implement=hy,C.inferArgumentDeclarationDataType=BL,C.inferDataType=xs,C.inferInputMapDataType=gT,C.inferOutputMapDataType=OT,C.inferPropertyDataType=xL,C.inferReturnDeclarationDataType=$T,C.inferValueDescriptorDataType=FL,C.inferVariableDeclarationDataType=jL,C.inferVariableInstanceDataType=UL,C.initBaseProjectEntity=Dy,C.initProject=Vj,C.initProjectFromFetchResult=Pj,C.inputMapValidation=fhe,C.installedProjectValidation=che,C.internalCallValidation=phe,C.isPromise=vb,C.iterateOverListActionDescriptorListArgumentDeclaration=Hg,C.iterateOverListActionDescriptorListArgumentDeclarationDataType=Yg,C.iterateOverListActionDescriptorListArgumentDeclarationDataTypeParentRef=Wg,C.iterateOverListActionDescriptorListArgumentDeclarationParentRef=zg,C.iterateOverListLoopActionDescriptor=ca,C.iterateOverListLoopActionDescriptorDynamicReturnDeclaration=Qg,C.iterateOverListLoopActionDescriptorDynamicReturnDeclarationParentRef=Xg,C.iterateOverListLoopBodyActionDescriptor=iu,C.iterateOverListLoopBodyActionDescriptorAnyDynamicArgument=l$,C.iterateOverListLoopBodyActionDescriptorAnyDynamicArgumentParentRef=o$,C.iterateOverListLoopBodyActionDescriptorAnyDynamicReturn=u$,C.iterateOverListLoopBodyActionDescriptorAnyDynamicReturnParentRef=d$,C.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Tf,C.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=t$,C.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=e$,C.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=r$,C.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclaration=a$,C.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=s$,C.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=i$,C.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=n$,C.iterateOverObjectKeysActionDescriptorObjectArgumentDeclaration=y$,C.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationDataType=f$,C.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationDataTypeParentRef=p$,C.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationParentRef=h$,C.iterateOverObjectKeysLoopActionDescriptor=ml,C.iterateOverObjectKeysLoopActionDescriptorDynamicReturnDeclaration=v$,C.iterateOverObjectKeysLoopActionDescriptorDynamicReturnDeclarationParentRef=m$,C.iterateOverObjectKeysLoopBodyActionDescriptor=qm,C.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicArgument=D$,C.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicArgumentParentRef=_$,C.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicReturn=$$,C.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicReturnParentRef=g$,C.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclaration=km,C.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=T$,C.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=E$,C.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=b$,C.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclaration=R$,C.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=I$,C.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=A$,C.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=w$,C.iterateOverObjectValuesActionDescriptorObjectArgumentDeclaration=N$,C.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationDataType=P$,C.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationDataTypeParentRef=C$,C.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationParentRef=V$,C.iterateOverObjectValuesLoopActionDescriptor=vl,C.iterateOverObjectValuesLoopActionDescriptorDynamicReturnDeclaration=M$,C.iterateOverObjectValuesLoopActionDescriptorDynamicReturnDeclarationParentRef=L$,C.iterateOverObjectValuesLoopBodyActionDescriptor=Zm,C.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgument=q$,C.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgumentParentRef=k$,C.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicReturn=Z$,C.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicReturnParentRef=S$,C.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Sm,C.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=U$,C.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=B$,C.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=j$,C.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclaration=K$,C.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=F$,C.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=x$,C.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=G$,C.iterateOverStringActionDescriptorDynamicReturnDeclaration=Bg,C.iterateOverStringActionDescriptorDynamicReturnDeclarationParentRef=Mg,C.iterateOverStringActionDescriptorStringArgumentDeclaration=Lg,C.iterateOverStringActionDescriptorStringArgumentDeclarationDataType=Vg,C.iterateOverStringActionDescriptorStringArgumentDeclarationDataTypeParentRef=Pg,C.iterateOverStringActionDescriptorStringArgumentDeclarationParentRef=Ng,C.iterateOverStringLoopActionDescriptor=ru,C.iterateOverStringLoopBodyActionDescriptor=Ef,C.iterateOverStringLoopBodyActionDescriptorAnyDynamicArgument=qg,C.iterateOverStringLoopBodyActionDescriptorAnyDynamicArgumentParentRef=kg,C.iterateOverStringLoopBodyActionDescriptorAnyDynamicReturn=Zg,C.iterateOverStringLoopBodyActionDescriptorAnyDynamicReturnParentRef=Sg,C.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Gm,C.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=jg,C.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=Ug,C.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=xg,C.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclaration=Km,C.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=Gg,C.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=Fg,C.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=Kg,C.joinListOperation=$m,C.joinListOperationError=xR,C.joinListOperationErrorParentRef=jR,C.joinListOperationFirstListArgument=NR,C.joinListOperationFirstListArgumentParentRef=VR,C.joinListOperationFirstListArgumentRef=DR,C.joinListOperationFirstListDataType=gR,C.joinListOperationResultListDataType=PR,C.joinListOperationResultListReturn=UR,C.joinListOperationResultListReturnParentRef=BR,C.joinListOperationResultListReturnRef=CR,C.joinListOperationSecondListArgument=MR,C.joinListOperationSecondListArgumentParentRef=LR,C.joinListOperationSecondListArgumentRef=$R,C.joinListOperationSecondListDataType=OR,C.joinListWithLastSeparator=Ke,C.joinStringsOperation=Qd,C.joinStringsOperationDynamicStringArgument=nR,C.joinStringsOperationDynamicStringArgumentParentRef=sR,C.joinStringsOperationDynamicStringArgumentRef=rR,C.joinStringsOperationDynamicStringDataType=iR,C.joinStringsOperationError=tR,C.joinStringsOperationErrorParentRef=eR,C.joinStringsOperationFirstStringArgument=af,C.joinStringsOperationFirstStringArgumentParentRef=S1,C.joinStringsOperationFirstStringArgumentRef=x1,C.joinStringsOperationFirstStringDataType=F1,C.joinStringsOperationResultStringDataType=q1,C.joinStringsOperationResultStringReturn=Xd,C.joinStringsOperationResultStringReturnParentRef=Q1,C.joinStringsOperationResultStringReturnRef=k1,C.joinStringsOperationSecondStringArgument=of,C.joinStringsOperationSecondStringArgumentParentRef=X1,C.joinStringsOperationSecondStringArgumentRef=G1,C.joinStringsOperationSecondStringDataType=K1,C.joinStringsOperationSeparatorStringArgument=H1,C.joinStringsOperationSeparatorStringArgumentParentRef=z1,C.joinStringsOperationSeparatorStringArgumentRef=Z1,C.joinStringsOperationSeparatorStringDataType=Y1,C.joinStringsOperationSeparatorStringDataTypeDefaultValue=W1,C.joinStringsOperationSeparatorStringDataTypeDefaultValueParentRef=J1,C.keyValuePrototype=fl,C.literalValudValidation=tpe,C.loopValidation=ype,C.lowercaseFirstLetter=Xu,C.manualFlowActionDescriptorDeclarationArgumentDeclaration=Fm,C.manualFlowActionDescriptorDeclarationArgumentDeclarationDataType=Rg,C.manualFlowActionDescriptorDeclarationArgumentDeclarationDataTypeParentRef=wg,C.manualFlowActionDescriptorDeclarationArgumentDeclarationParentRef=_g,C.manualFlowLoopActionDescriptor=mf,C.manualFlowLoopActionDescriptorDynamicReturnDeclaration=Ig,C.manualFlowLoopActionDescriptorDynamicReturnDeclarationParentRef=Ag,C.manualFlowLoopBodyActionDescriptor=vf,C.manualFlowLoopBodyActionDescriptorAnyDynamicArgument=gg,C.manualFlowLoopBodyActionDescriptorAnyDynamicArgumentParentRef=Dg,C.manualFlowLoopBodyActionDescriptorAnyDynamicReturn=Og,C.manualFlowLoopBodyActionDescriptorAnyDynamicReturnParentRef=$g,C.mapActionDescriptorToTypeItRepresents=sye,C.mapRecord=OU,C.mergeEntityErrorsList=moe,C.mergeListOfEntities=rye,C.methodDefaultValue=ZD,C.mockClientProject=bE,C.moreThanOrEqualCondition=Il,C.moreThanOrEqualConditionLeftHandArgument=KC,C.moreThanOrEqualConditionLeftHandArgumentDataType=FC,C.moreThanOrEqualConditionLeftHandArgumentDataTypeParentRef=xC,C.moreThanOrEqualConditionLeftHandArgumentParentRef=GC,C.moreThanOrEqualConditionRightHandArgument=ZC,C.moreThanOrEqualConditionRightHandArgumentDataType=qC,C.moreThanOrEqualConditionRightHandArgumentDataTypeParentRef=kC,C.moreThanOrEqualConditionRightHandArgumentParentRef=SC,C.noSpacesOrDashesValueValidation=fU,C.noSpacesValueValidation=pU,C.notEmptyCondition=yo,C.notEmptyConditionArgument=UC,C.notEmptyConditionRef=BC,C.nullPrototype=bm,C.numberAdditionOperation=nf,C.numberAdditionOperationDynamicSummandArgument=A1,C.numberAdditionOperationDynamicSummandArgumentType=b1,C.numberAdditionOperationDynamicSummandArgumentTypeParentRef=T1,C.numberAdditionOperationError=E1,C.numberAdditionOperationErrorParentRef=v1,C.numberAdditionOperationFirstNumberArgument=Am,C.numberAdditionOperationFirstNumberArgumentRef=d1,C.numberAdditionOperationFirstNumberDataType=u1,C.numberAdditionOperationRef=y1,C.numberAdditionOperationRefThree=wm,C.numberAdditionOperationRefTwo=m1,C.numberAdditionOperationResultNumberDataType=h1,C.numberAdditionOperationResultNumberReturn=Rm,C.numberAdditionOperationResultNumberReturnRef=f1,C.numberAdditionOperationSecondNumberArgument=Im,C.numberAdditionOperationSecondNumberArgumentRef=c1,C.numberAdditionOperationSecondNumberDataType=p1,C.numberPrototype=nt,C.numberSubtractionOperation=Dm,C.numberSubtractionOperationDynamicSubtrahendArgument=U1,C.numberSubtractionOperationDynamicSubtrahendArgumentType=B1,C.numberSubtractionOperationDynamicSubtrahendArgumentTypeParentRef=M1,C.numberSubtractionOperationError=L1,C.numberSubtractionOperationErrorParentRef=N1,C.numberSubtractionOperationFirstNumberArgument=$1,C.numberSubtractionOperationFirstNumberArgumentRef=I1,C.numberSubtractionOperationFirstNumberDataType=w1,C.numberSubtractionOperationRef=_m,C.numberSubtractionOperationRefThree=P1,C.numberSubtractionOperationRefTwo=O1,C.numberSubtractionOperationResultNumberDataType=g1,C.numberSubtractionOperationResultNumberReturn=V1,C.numberSubtractionOperationResultNumberReturnRef=D1,C.numberSubtractionOperationSecondNumberArgument=C1,C.numberSubtractionOperationSecondNumberArgumentRef=R1,C.numberSubtractionOperationSecondNumberDataType=_1,C.numberValueAutogenerationSchema=RE,C.operationValidation=dpe,C.outputMapValidation=mhe,C.parallelExecutionOperation=Vs,C.parallelExecutionOperationError=q_,C.parallelExecutionOperationErrorParentRef=k_,C.parallelExecutionOperationListOfExecutionResultsDataType=F_,C.parallelExecutionOperationListOfExecutionResultsReturn=Mm,C.parallelExecutionOperationListOfExecutionResultsReturnRef=x_,C.parallelExecutionOperationListOfFunctionsArgument=Lm,C.parallelExecutionOperationListOfFunctionsArgumentDatatype=j_,C.parallelExecutionOperationListOfFunctionsArgumentRef=U_,C.parallelExecutionOperationListOfFunctionsBlueprint=B_,C.parallelExecutionOperationListOfFunctionsBlueprintDynamicInput=L_,C.parallelExecutionOperationListOfFunctionsBlueprintDynamicInputParentRef=N_,C.parallelExecutionOperationListOfFunctionsBlueprintDynamicOutput=V_,C.parallelExecutionOperationListOfFunctionsBlueprintDynamicOutputParentRef=P_,C.parallelExecutionOperationListOfFunctionsBlueprintParentRef=M_,C.parallelExecutionOperationRef=G_,C.parallelExecutionOperationRefThree=K_,C.persistedBuiltInBaseEntity=Jr,C.persistedBuiltInBaseEntityDatabaseProperty=Tl,C.persistedBuiltInBaseEntityDatabasePropertyDataType=vC,C.persistedBuiltInBaseEntityDatabasePropertyDataTypeRef=d7,C.persistedBuiltInBaseEntityDatabasePropertyParentRef=EC,C.persistedBuiltInBaseEntityDatabasePropertyRef=mC,C.persistedBuiltInBaseEntityPrimaryKeyProperty=bl,C.persistedBuiltInBaseEntityPrimaryKeyPropertyDataType=DC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyNumberDataTypeOption=bC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyNumberDataTypeOptionParentRef=TC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyParentRef=gC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyRef=_C,C.persistedBuiltInBaseEntityPrimaryKeyPropertyStringDataTypeOption=IC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyStringDataTypeOptionParentRef=AC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyUUIDDataTypeOption=RC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyUUIDDataTypeOptionParentRef=wC,C.processOutputGlobalValueDescriptorDataType=QC,C.processOutputGlobalValueDescriptorReturn=$f,C.processOutputGlobalValueDescriptorReturnRef=XC,C.projectPublicationCompletedGlobalEvent=gf,C.propertyToZodSchema=EP,C.propertyValidation=Hce,C.relationalDatabaseBuiltInBaseEntity=Br,C.relationalDatabaseBuiltInBaseEntityAutoscalingProperty=av,C.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyDataType=pC,C.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyDataTypeRef=cC,C.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyParentRef=fC,C.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyRef=uC,C.relationalDatabaseBuiltInBaseEntityDefaultProperty=nv,C.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataType=dC,C.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataTypeRef=oC,C.relationalDatabaseBuiltInBaseEntityDefaultPropertyRef=lC,C.relationalDatabaseBuiltInBaseEntityIdentifierProperty=Af,C.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataType=XO,C.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataTypeRef=zO,C.relationalDatabaseBuiltInBaseEntityIdentifierPropertyRef=HO,C.relationalDatabaseBuiltInBaseEntityMinSizeProperty=Rf,C.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataType=aC,C.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataTypeRef=sC,C.relationalDatabaseBuiltInBaseEntityMinSizePropertyRef=nC,C.relationalDatabaseBuiltInBaseEntityPasswordProperty=wf,C.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataType=rC,C.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataTypeRef=l7,C.relationalDatabaseBuiltInBaseEntityPasswordPropertyDefaultValueParentRef=iC,C.relationalDatabaseBuiltInBaseEntityPasswordPropertyRef=tC,C.relationalDatabaseBuiltInBaseEntityRef=El,C.relationalDatabaseBuiltInBaseEntityUsernameProperty=If,C.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataType=eC,C.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataTypeRef=o7,C.relationalDatabaseBuiltInBaseEntityUsernamePropertyRef=QO,C.resolveActionDescriptorName=ZL,C.resolveBaseEntityName=KL,C.resolveBuiltInBaseEntityDataTypeLabel=kL,C.resolveClonedEntityProject=yr,C.resolveConditionOperatorLabel=Zh,C.resolveDataType=kh,C.resolveDataTypeEntityOrNestedChildrenFromLiteralValue=Tb,C.resolveDataTypeLabel=Sh,C.resolveDefinitionEntityDataTypeLabel=Yce,C.resolveEntityDataTypeLabel=Wce,C.resolveEntityName=fe,C.resolveFirstCallsSecond=qhe,C.resolveFirstWritesSecond=She,C.resolvePersistedDefinitionEntityDatabaseEntity=yj,C.resolvePrimaryKeyProperty=lye,C.resolvePrimitiveEntityForSearchLiteralValueType=sb,C.resolvePrimitiveEntityName=SL,C.resolveSearchName=qL,C.resolveVariableScope=Jce,C.returnDeclarationValidation=upe,C.returnStatementValidation=cpe,C.searchStatementErrorGlobalValueDescriptor=pv,C.searchStatementErrorGlobalValueDescriptorDataType=tP,C.searchStatementErrorGlobalValueDescriptorRef=eP,C.searchStatementState=lhe,C.searchStatementUtils=uhe,C.searchValidation=bpe,C.sequentialExecutionOperation=Fn,C.sequentialExecutionOperationError=uD,C.sequentialExecutionOperationErrorParentRef=dD,C.sequentialExecutionOperationListOfExecutionResultsDataType=aD,C.sequentialExecutionOperationListOfExecutionResultsReturn=Um,C.sequentialExecutionOperationListOfExecutionResultsReturnParentRef=lD,C.sequentialExecutionOperationListOfExecutionResultsReturnRef=nD,C.sequentialExecutionOperationListOfFunctionsArgument=Bm,C.sequentialExecutionOperationListOfFunctionsArgumentDatatype=sD,C.sequentialExecutionOperationListOfFunctionsArgumentParentRef=oD,C.sequentialExecutionOperationListOfFunctionsArgumentRef=iD,C.sequentialExecutionOperationListOfFunctionsBlueprint=rD,C.sequentialExecutionOperationListOfFunctionsBlueprintDynamicInput=tD,C.sequentialExecutionOperationListOfFunctionsBlueprintDynamicOutput=eD,C.softDeletePersistedEntityMethod=u7,C.softDeletePersistedEntityMethodParentRef=$C,C.sortCallsBasedOnExecutionDependencies=EU,C.sortChildrenEntitiesBasedOnExecutionDependencies=Khe,C.splitListOperation=Cm,C.splitListOperationError=i_,C.splitListOperationErrorParentRef=r_,C.splitListOperationFirstOutputListDataType=ZR,C.splitListOperationFirstOutputListReturn=XR,C.splitListOperationFirstOutputListReturnParentRef=HR,C.splitListOperationFirstOutputListReturnRef=Om,C.splitListOperationInputListArgument=WR,C.splitListOperationInputListArgumentParentRef=JR,C.splitListOperationInputListArgumentRef=KR,C.splitListOperationInputListDataType=kR,C.splitListOperationSecondOutputListDataType=QR,C.splitListOperationSecondOutputListReturn=t_,C.splitListOperationSecondOutputListReturnParentRef=e_,C.splitListOperationSplitIndexArgument=zR,C.splitListOperationSplitIndexArgumentParentRef=YR,C.splitListOperationSplitIndexArgumentRef=qR,C.splitListOperationSplitIndexDataType=SR,C.splitStringOperation=gm,C.splitStringOperationError=IR,C.splitStringOperationErrorParentRef=AR,C.splitStringOperationFirstPartResultStringDataType=cR,C.splitStringOperationFirstPartResultStringReturn=bR,C.splitStringOperationFirstPartResultStringReturnParentRef=TR,C.splitStringOperationFirstPartResultStringReturnRef=uR,C.splitStringOperationIndexArgument=vR,C.splitStringOperationIndexArgumentParentRef=mR,C.splitStringOperationIndexArgumentRef=lR,C.splitStringOperationIndexDataType=dR,C.splitStringOperationSecondPartResultStringDataType=fR,C.splitStringOperationSecondPartResultStringReturn=n7,C.splitStringOperationSecondPartResultStringReturnParentRef=ER,C.splitStringOperationSecondPartResultStringReturnRef=pR,C.splitStringOperationStringArgument=yR,C.splitStringOperationStringArgumentParentRef=hR,C.splitStringOperationStringArgumentRef=aR,C.splitStringOperationStringDataType=oR,C.stringPrototype=ke,C.stringValueAutogenerationSchema=wE,C.suggestNewIdForEntity=UT,C.syncSearchEntityOutput=ab,C.test_primitive_entities_export=Hye,C.toCamelCase=Ra,C.toEntityState=ss,C.toKebabCase=GL,C.toLowerCaseKebabCase=qh,C.toPascalCase=Hl,C.untypedDataPrototype=Gr,C.updateErrorsList=qt,C.urlDefaultValue=FD,C.uuidPrototype=jn,C.validateArgumentDeclarationName=MT,C.validateCalledByErrorIdInAction=Ohe,C.validateCalledByIdInAction=$he,C.validateCallers=tU,C.validateConditionEntityDeclaration=Vhe,C.validateDataOperation=uo,C.validateDataOperationDataToValidateArgument=OD,C.validateDataOperationDataToValidateArgumentParentRef=$D,C.validateDataOperationDataToValidateArgumentRef=DD,C.validateDataOperationDataToValidateDataType=gD,C.validateDataOperationEntityToMatchTypeArgument=ND,C.validateDataOperationEntityToMatchTypeArgumentParentRef=VD,C.validateDataOperationEntityToMatchTypeArgumentRef=CD,C.validateDataOperationEntityToMatchTypeDataType=PD,C.validateDataOperationError=UD,C.validateDataOperationErrorParentRef=BD,C.validateDataOperationOutputEntityDeclaration=MD,C.validateDataOperationOutputEntityDeclarationParentRef=LD,C.validateDefinitionEntityName=PT,C.validateEntryCaller=eU,C.validateErrorCaller=Q3,C.validateFunctionCallDeclaration=iU,C.validateFunctionDeclarationName=VT,C.validateGeneratedEntityParentIsNotBuiltInEntity=Rhe,C.validateGeneration=Ihe,C.validateGenerationTarget=ur,C.validateGenerationUpdate=whe,C.validateLoopEntityDeclaration=Nhe,C.validateName=zce,C.validateOperationEntityDeclaration=sU,C.validatePropertyName=LT,C.validateReachability=ta,C.validateReadsValueInActionPayload=Che,C.validateReferenceObject=oy,C.validateReferenceToOne=db,C.validateReferences=Cr,C.validateReturnDeclarationName=BT,C.validateSuccessCaller=X3,C.validateValueReaderGenerationUpdate=Qc,C.validateValueWritter=yb,C.validateVariableDeclarationName=NT,C.validateVariableInternalCallUse=mb,C.valueAutogenerationCurrentDateAndTimeSchema=Q4,C.valueAutogenerationGenericSchema=mh,C.valueAutogenerationOptions=DE,C.valueAutogenerationOptionsSchema=X4,C.valueAutogenerationRandomBooleanSchema=IE,C.valueAutogenerationRandomDateBetweenSchema=lN,C.valueAutogenerationRandomDateFromSchema=aN,C.valueAutogenerationRandomDateSchema=Th,C.valueAutogenerationRandomDateUntilSchema=oN,C.valueAutogenerationRandomNumberBetweenSchema=rN,C.valueAutogenerationRandomNumberFromSchema=eN,C.valueAutogenerationRandomNumberSchema=vh,C.valueAutogenerationRandomNumberUntilSchema=tN,C.valueAutogenerationRandomSchema=Mu,C.valueAutogenerationRandomTextBetweenSchema=nN,C.valueAutogenerationRandomTextFromSchema=iN,C.valueAutogenerationRandomTextSchema=Eh,C.valueAutogenerationRandomTextUntilSchema=sN,C.valueAutogenerationRangeValueTypesSchema=Lu,C.valueAutogenerationUniqueSchema=AE,C.valueDescriptorValidation=Ahe,C.variableDeclarationValidation=Epe,C.variableInstanceValidation=Tpe,C.waitOperation=mi,C.waitOperationMillisecondsNumberArgument=oo,C.waitOperationMillisecondsNumberArgumentRef=J_,C.waitOperationMillisecondsNumberDataType=W_,C.waitOperationOperationError=H_,C.waitOperationOperationErrorParentRef=z_,C.waitOperationRef=Y_,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
401
+ `)),console.log("Persisting new additions"),v.visit(async(b,_)=>{if(a.added[b.id]){console.log("Adding: ",b.id);try{const I=z(b,this);if(I.hydrateAncestors(),I.addSelfToProject(l),!this.get(b.id))throw new Error(`Entity ${b.id} was not added to the project`)}catch(I){console.error("Error: ",I),console.error("Errored entity: ",b)}}}),console.log("Persisting updates"),v.visit(async(b,_)=>{if(a.updated[b.id]){console.log("Updating: ",b.id);try{const I=this.get(b.id);I&&I.updateWithShallowTransfer(b,l)}catch(I){console.error("Error: ",I),console.error("Errored entity: ",b)}}}),console.log("Persisting removals"),v.visit(async(b,_)=>{if(a.removed[b.id]){console.log("Removing: ",b.id);try{const I=this.get(b.id);I&&I.remove({ignoreUpstream:!1},l)}catch(I){console.error("Error: ",I),console.error("Errored entity: ",b)}}}),this}toFullProjectTransfer(){const s=new Ga(this),a={};return s.visit(l=>{const p=l.toShallowJSON();a[l.id]=p}),{order:s.order,size:s.order.length,record:a}}};g(Fe,"sessionAuthor","1"),g(Fe,"UUID",{isBackup:!0,uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:s=>s}),g(Fe,"repository",{APICreate:async(s,...a)=>s,APIUpdate:async(s,...a)=>s,APIDelete:async(s,...a)=>s,APIClone:async(s,...a)=>{},APILoad:async(s,...a)=>null,APILoadVersion:async(s,a,...l)=>null}),g(Fe,"type",f.Project),g(Fe,"USER_MANAGED_PARENT_TYPES",[]),g(Fe,"PARENT_TYPES",[...Fe.USER_MANAGED_PARENT_TYPES]),g(Fe,"MUTABLE_BASE_PROPERTIES",["name","description"]),g(Fe,"INMUTABLE_BASE_PROPERTIES",["id","type","version","createdAt","author","previousVersion"]),g(Fe,"BASE_PROPERTIES",[...Fe.MUTABLE_BASE_PROPERTIES,...Fe.INMUTABLE_BASE_PROPERTIES]),g(Fe,"MUTABLE_META_PROPERTIES",[...Fe.MUTABLE_BASE_PROPERTIES,"x","y"]),g(Fe,"INMUTABLE_META_PROPERTIES",[...Fe.INMUTABLE_BASE_PROPERTIES]),g(Fe,"META_PROPERTIES",[...Fe.MUTABLE_META_PROPERTIES,...Fe.INMUTABLE_META_PROPERTIES]),g(Fe,"MUTABLE_UPSTREAM_PROPERTIES",[]),g(Fe,"INMUTABLE_UPSTREAM_PROPERTIES",["primitives","builtInBaseEntities","operationDeclarations","globalEventActionDescriptors","loopDeclarations","builtInInstances"]),g(Fe,"UPSTREAM_PROPERTIES",[...Fe.MUTABLE_UPSTREAM_PROPERTIES,...Fe.INMUTABLE_UPSTREAM_PROPERTIES]),g(Fe,"MUTABLE_DOWNSTREAM_PROPERTIES",["entities","projects","functions","events","variableDeclarations","variableInstances","conditions","operations","functionCalls","loops","searches"]),g(Fe,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),g(Fe,"DOWNSTREAM_PROPERTIES",[...Fe.MUTABLE_DOWNSTREAM_PROPERTIES,...Fe.INMUTABLE_DOWNSTREAM_PROPERTIES]),g(Fe,"PROPERTIES",[...Fe.META_PROPERTIES,...Fe.UPSTREAM_PROPERTIES,...Fe.DOWNSTREAM_PROPERTIES]);let P=Fe;var wj=(u=>(u.PersistChangeSet="persist-change-set",u.CreateSingle="create-single",u.CreateBulk="create-bulk",u.CreateSingleNested="create-single-nested",u.CreateBulkNested="create-bulk-nested",u.Update="update",u.Clone="clone",u.Delete="delete",u.Load="load",u.LoadNested="load-nested",u.LoadVersion="load-version",u))(wj||{});class Rj extends Lt{constructor(s){super(Vs,s);g(this,"id",Jt.Parallel);g(this,"name",Jt.Parallel);g(this,"description","Execute a list of actions one after the other");g(this,"version","1");g(this,"autoexecutable",!0);g(this,"initialData",Vs);g(this,"type",f.ActionDescriptor);g(this,"inputs",[]);g(this,"outputs",[]);g(this,"error",null);g(this,"project");this.project=s,this.inputs=Vs.inputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.outputs=Vs.outputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.error=Vs.error?z(Vs.error,this.project):null}}class _j extends Lt{constructor(s){super(mi,s);g(this,"id",mi.id);g(this,"name",mi.name);g(this,"description",mi.description);g(this,"version",mi.version);g(this,"autoexecutable",!1);g(this,"initialData",mi);g(this,"type",f.ActionDescriptor);g(this,"inputs",[]);g(this,"outputs",[]);g(this,"error",null);g(this,"project");this.project=s,this.inputs=mi.inputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.outputs=mi.outputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.error=mi.error?z(mi.error,this.project):null}}class Dj extends Lt{constructor(s){super(Fn,s);g(this,"id",Jt.Sequential);g(this,"name",Jt.Sequential);g(this,"description","Execute a list of actions one after the other");g(this,"version","1");g(this,"autoexecutable",!0);g(this,"initialData",Fn);g(this,"type",f.ActionDescriptor);g(this,"inputs",[]);g(this,"outputs",[]);g(this,"error",null);g(this,"project");this.project=s,this.inputs=Fn.inputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.outputs=Fn.outputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.error=Fn.error?z(Fn.error,this.project):null}}class Gye extends Lt{constructor(d){super(eu,d)}}class Kye extends Lt{constructor(d){super(lo,d)}}class kye extends Lt{constructor(s){super(uo,s);g(this,"autoexecutable",!0)}getEntityToMatchInputMap(s){return s.inputs.find(a=>{var l;return((l=a.declaration)==null?void 0:l.id)===pe.operation[Wt.Validate].inputs.entityToMatch.id})||null}getDataToValidateInputMap(s){return s.inputs.find(a=>{var l;return((l=a.declaration)==null?void 0:l.id)===pe.operation[Wt.Validate].inputs.dataToValidate.id})||null}getOutputDataOutputMap(s){return s.outputs.find(a=>{var l;return((l=a.declaration)==null?void 0:l.id)===pe.operation[Wt.Validate].outputs.outputEntity.id})||null}getEntityToMatch(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"get-entity-to-match-validate-data"))){const l=this.project.requestActiveValue(s),p=l==null?void 0:l.valueAsTypeSingle;return a==null||a.attemptAutoclose("get-entity-to-match-validate-data",this.id),p}syncOperationInstance(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-operation-instance-validate-data"))){const l=[],p=[],t=[],m=[],v=this.getEntityToMatchInputMap(s);if(v){const{added:I,updated:V,removed:B,affected:K}=this.syncEntityToMatchInputMapDataType(v,a);l.push(...V),p.push(...I),t.push(...B),m.push(...K)}const b=this.getDataToValidateInputMap(s);if(b){const{added:I,updated:V,removed:B,affected:K}=this.syncDataToValidateInputMapDataType(b,a);l.push(...V),p.push(...I),t.push(...B),m.push(...K)}const _=this.getOutputDataOutputMap(s);if(_){const{added:I,updated:V,removed:B,affected:K}=this.syncOutputDataOutputMapDataType(_,a);l.push(...V),p.push(...I),t.push(...B),m.push(...K)}return a==null||a.attemptAutoclose("sync-operation-instance-validate-data",this.id),{updated:w(l),added:w(p),removed:w(t),affected:w(m),self:s}}syncEntityToMatchInputMapDataType(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-entity-to-match-input-map-data-type"))){var _,I,V,B,K,q,Z,re,ue,Q,_e,X,Ee,se,de;const l=[],p=[],t=[],m=[];if(((_=s.declaration)==null?void 0:_.id)!==pe.operation[Wt.Validate].inputs.entityToMatch.id)return a==null||a.attemptAutoclose("sync-entity-to-match-input-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};const v=this.project.requestActiveValue(s),b=v==null?void 0:v.valueAsTypeSingle;if(!s.dataType){const ye={id:P.UUID.uuid(),version:P.UUID.uuid(),createdAt:(a==null?void 0:a.timestamp)||new Date().toISOString(),author:(a==null?void 0:a.author)||P.sessionAuthor,previousVersion:null,deleted:!1,type:f.DataType,parentRelationType:null,options:((I=s.declaration.dataType)==null?void 0:I.options)||null,implementationChooseOne:((V=s.declaration.dataType)==null?void 0:V.implementationChooseOne)||!1,staticEntities:((B=s.declaration.dataType)==null?void 0:B.staticEntities)??null,interactiveEntities:((K=s.declaration.dataType)==null?void 0:K.interactiveEntities)??null,actionEntities:((q=s.declaration.dataType)==null?void 0:q.actionEntities)??null,isList:((Z=s.declaration.dataType)==null?void 0:Z.isList)||!1,andChildrenGroup:null,orChildrenGroup:null,asType:!0,entity:(b==null?void 0:b.toJSON())||null,like:!0,inferred:!0,parent:s.toReference()},H=z(ye,s.project);H.hydrateAncestors(),H.setParent(s,a),H.initChildren(a),H.setEntity(b,a),a==null||a.add(H,G.Added),l.push(H),s.setDataType(H,a)}return(se=s.dataType)==null||se.metaSync({inferred:!0,like:!1,asType:!0,options:((re=s.declaration.dataType)==null?void 0:re.options)||null,implementationChooseOne:((ue=s.declaration.dataType)==null?void 0:ue.implementationChooseOne)||!1,staticEntities:((Q=s.declaration.dataType)==null?void 0:Q.staticEntities)??null,interactiveEntities:((_e=s.declaration.dataType)==null?void 0:_e.interactiveEntities)??null,actionEntities:((X=s.declaration.dataType)==null?void 0:X.actionEntities)??null,isList:((Ee=s.declaration.dataType)==null?void 0:Ee.isList)||!1},a),(de=s.dataType)==null||de.setEntity(b,a),s.dataType&&p.push(s.dataType),a==null||a.attemptAutoclose("sync-entity-to-match-input-map-data-type",this.id),{updated:w(p),added:w(l),removed:w(t),affected:w(m),self:s.dataType}}syncDataToValidateInputMapDataType(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-data-to-validate-input-map-data-type"))){var I,V,B;const l=[],p=[],t=[],m=[];if(((I=s.declaration)==null?void 0:I.id)!==pe.operation[Wt.Validate].inputs.dataToValidate.id)return a==null||a.attemptAutoclose("sync-data-to-validate-input-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};const v=this.getEntityToMatchInputMap(s.parent);if(!v)return a==null||a.attemptAutoclose("sync-data-to-validate-input-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};if(!this.getEntityToMatch(v,a))return a==null||a.attemptAutoclose("sync-data-to-validate-input-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};if(!s.dataType){const K={id:P.UUID.uuid(),version:P.UUID.uuid(),createdAt:(a==null?void 0:a.timestamp)||new Date().toISOString(),author:(a==null?void 0:a.author)||P.sessionAuthor,previousVersion:null,deleted:!1,type:f.DataType,parentRelationType:null,options:null,implementationChooseOne:!1,isList:!1,andChildrenGroup:null,orChildrenGroup:null,staticEntities:null,interactiveEntities:null,actionEntities:null,asType:!1,entity:null,like:!0,inferred:!0,parent:s.toReference()},q=z(K,s.project);q.setParent(s,a),q.initChildren(a),a==null||a.add(q,G.Added),l.push(q),s.setDataType(q,a)}(V=s.dataType)==null||V.metaSync({inferred:!0,like:!0,asType:!1},a);const _=this.getEntityToMatch(v,a);return(B=s.dataType)==null||B.setEntity(_,a),s.dataType&&p.push(s.dataType),a==null||a.attemptAutoclose("sync-data-to-validate-input-map-data-type",this.id),{updated:w(p),added:w(l),removed:w(t),affected:w(m),self:s.dataType}}syncOutputDataOutputMapDataType(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-output-data-output-map-data-type"))){var V,B,K;const l=[],p=[],t=[],m=[];if(((V=s.declaration)==null?void 0:V.id)!==pe.operation[Wt.Validate].outputs.outputEntity.id)return a==null||a.attemptAutoclose("sync-output-data-output-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};const v=this.getEntityToMatchInputMap(s.parent);if(!v)return a==null||a.attemptAutoclose("sync-output-data-output-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};if(!this.getEntityToMatch(v,a))return a==null||a.attemptAutoclose("sync-output-data-output-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};const _=this.project.requestActiveValue(v),I=(_==null?void 0:_.valueAsTypeSingle)||null;if(!s.dataType){const q={id:P.UUID.uuid(),version:P.UUID.uuid(),createdAt:(a==null?void 0:a.timestamp)||new Date().toISOString(),author:(a==null?void 0:a.author)||P.sessionAuthor,previousVersion:null,deleted:!1,type:f.DataType,parentRelationType:null,options:null,implementationChooseOne:!1,staticEntities:null,interactiveEntities:null,actionEntities:null,isList:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:(I==null?void 0:I.toJSON())||null,like:!0,inferred:!0,parent:s.toReference()},Z=z(q,s.project);Z.hydrateAncestors(),Z.setParent(s,a),Z.initChildren(a),Z.setEntity(I,a),a==null||a.add(Z,G.Added),l.push(Z),s.setDataType(Z,a)}return(B=s.dataType)==null||B.metaSync({inferred:!0,like:!0,asType:!1},a),(K=s.dataType)==null||K.setEntity(I,a),s.dataType&&p.push(s.dataType),a==null||a.attemptAutoclose("sync-output-data-output-map-data-type",this.id),{updated:w(p),added:w(l),removed:w(t),affected:w(m),self:s.dataType}}inferInputMapDataType(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"infer-input-map-data-type-validate-data"))){var p,t,m;if(((p=s.declaration)==null?void 0:p.id)===pe.operation[Wt.Validate].inputs.entityToMatch.id){const{added:v,updated:b,removed:_,affected:I}=this.syncEntityToMatchInputMapDataType(s,a);return a==null||a.attemptAutoclose("infer-input-map-data-type",this.id),{updated:w(b),added:w(v),removed:w(_),affected:w(I),self:s.dataType}}if(((t=s.declaration)==null?void 0:t.id)===pe.operation[Wt.Validate].inputs.dataToValidate.id){const{added:v,updated:b,removed:_,affected:I}=this.syncDataToValidateInputMapDataType(s,a);return a==null||a.attemptAutoclose("infer-input-map-data-type",this.id),{updated:w(b),added:w(v),removed:w(_),affected:w(I),self:s.dataType}}const l=(m=s.declaration)==null?void 0:m.getDataType(a);if(l&&l.isResolved)return a==null||a.attemptAutoclose("infer-input-map-data-type-validate-data",this.id),{updated:[],added:[],removed:[],affected:[],self:l};if(s.readsValue){const v=xs(s.readsValue,a);return a==null||a.attemptAutoclose("infer-input-map-data-type-validate-data",this.id),{updated:[],added:[],removed:[],affected:[],self:v}}return a==null||a.attemptAutoclose("infer-input-map-data-type-validate-data",this.id),{updated:[],added:[],removed:[],affected:[],self:null}}inferOutputMapDataType(s,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"infer-output-map-data-type-validate-data"))){var l;if(((l=s.declaration)==null?void 0:l.id)===pe.operation[Wt.Validate].outputs.outputEntity.id){const{added:p,updated:t,removed:m,affected:v}=this.syncOutputDataOutputMapDataType(s,a);return a==null||a.attemptAutoclose("infer-output-map-data-type-validate-data",this.id),{updated:w(t),added:w(p),removed:w(m),affected:w(v),self:s.dataType}}return{updated:[],added:[],removed:[],affected:[],self:null}}}class qye extends Lt{constructor(d){super($m,d)}}class Sye extends Lt{constructor(d){super(Cm,d)}}class Zye extends Lt{constructor(d){super(Pm,d)}}class Jye extends Lt{constructor(d){super(lf,d)}}class Wye extends Lt{constructor(d){super(nf,d)}}class Yye extends Lt{constructor(d){super(Qd,d)}}function zye(u){const d=[new Dj(u),new Rj(u),new _j(u),new Gye(u),new Kye(u),new kye(u),new Jye(u),new qye(u),new Zye(u),new Sye(u),new Wye(u),new Yye(u),new Lt(gm,u),new Lt(Dm,u)];return d.forEach(s=>{s.initChildren(null),u.subscribeBuiltInInstance(s)}),u.operationDeclarations=d,d}class gj extends qs{constructor(s){super(Jr,s);g(this,"initialData");g(this,"id",Oe.PERSISTED_ENTITY);g(this,"version","1");g(this,"name",Oe.PERSISTED_ENTITY);g(this,"description",Jr.description);g(this,"type",f.BuiltInBaseEntity);g(this,"abstract",Jr.abstract);g(this,"static",Jr.static);g(this,"properties",[]);g(this,"methods",[]);g(this,"abstractMethods",[]);g(this,"extends",[]);g(this,"errors",[]);g(this,"project");this.initialData=Jr,this.project=s,this.id=Jr.id,this.version=Jr.version,this.name=Jr.name,this.static=Jr.static,this.abstract=Jr.abstract,this.properties=this.initialData.properties.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.methods=this.initialData.methods.map(a=>{const l=z(a,this.project);return l.parent=this,l}),this.abstractMethods=this.initialData.abstractMethods.map(a=>{const l=z(a,this.project);return l.parent=this,l}),this.extends=this.initialData.extends.map(a=>z(a,this.project))}}var $j=(u=>(u.StatusCodeMustBeNumber="status-code-must-be-number",u.StatusCodeMustBeBetween100And599="status-code-must-be-between-100-and-599",u))($j||{});function Oj(u,d){const s=[];if(typeof d!="number"){const a=new xt({id:u.id+"--status-code-must-be-number",message:`Entity of type ${u.type} with id "${u.id}" has an invalid value "${d}". The value must be a number.`,issue:null,severity:S.Error,code:"status-code-must-be-number",entity:u});return s.push(a),{errors:s,override:d}}if(d<100){const a=new xt({id:u.id+"--status-code-must-be-between-100-and-599",message:`Entity of type ${u.type} with id "${u.id}" has an invalid value "${d}". The value must be a number between 100 and 599.`,issue:null,severity:S.Error,code:"status-code-must-be-between-100-and-599",entity:u});s.push(a)}if(d>599){const a=new xt({id:u.id+"--status-code-must-be-between-100-and-599",message:`Entity of type ${u.type} with id "${u.id}" has an invalid value "${d}". The value must be a number between 100 and 599.`,issue:null,severity:S.Error,code:"status-code-must-be-between-100-and-599",entity:u});s.push(a)}return{errors:s,override:d}}class Cj extends qs{constructor(s){super(Vi,s);g(this,"initialData");g(this,"id",Oe.PERSISTED_ENTITY);g(this,"version","1");g(this,"name",Oe.PERSISTED_ENTITY);g(this,"description",Vi.description);g(this,"type",f.BuiltInBaseEntity);g(this,"abstract",Vi.abstract);g(this,"static",Vi.static);g(this,"properties",[]);g(this,"methods",[]);g(this,"abstractMethods",[]);g(this,"extends",[]);g(this,"errors",[]);g(this,"project");this.initialData=Vi,this.project=s,this.id=Vi.id,this.version=Vi.version,this.name=Vi.name,this.static=Vi.static,this.abstract=Vi.abstract,this.properties=this.initialData.properties.map(t=>{const m=z(t,this.project);return m.setParent(this,null),m.initChildren(null),m}),this.methods=this.initialData.methods.map(t=>{const m=z(t,this.project);return m.parent=this,m}),this.abstractMethods=this.initialData.abstractMethods.map(t=>{const m=z(t,this.project);return m.parent=this,m}),this.extends=this.initialData.extends.map(t=>z(t,this.project));const a=this.properties.find(t=>t.id===pe["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.properties.path.id);if(!a)throw new Error("Path property not found in endpoint entity");a._codeNativeValueValidation=(t,m)=>pU(t,m);const l=this.abstractMethods.find(t=>t.id===pe["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.methods.handler.id);if(!l)throw new Error("Handler method not found in endpoint entity");const p=l.outputs.find(t=>t.id===pe["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.methods.handler.outputs.statusCode.id);if(!p)throw new Error("Status code output not found in handler method");p.codeNativeValueValidation=(t,m)=>Oj(t,m)}}const Hye="test_primitive_entities_export";class Xye extends qs{constructor(s){super(Br,s);g(this,"initialData");g(this,"id",Oe.PERSISTED_ENTITY);g(this,"version","1");g(this,"name",Oe.PERSISTED_ENTITY);g(this,"description",Br.description);g(this,"type",f.BuiltInBaseEntity);g(this,"abstract",Br.abstract);g(this,"static",Br.static);g(this,"properties",[]);g(this,"methods",[]);g(this,"abstractMethods",[]);g(this,"extends",[]);g(this,"errors",[]);g(this,"project");this.initialData=Br,this.project=s,this.id=Br.id,this.version=Br.version,this.name=Br.name,this.static=Br.static,this.abstract=Br.abstract,this.properties=this.initialData.properties.map(l=>{const p=z(l,this.project);return p.setParent(this,null),p.initChildren(null),p}),this.methods=this.initialData.methods.map(l=>{const p=z(l,this.project);return p.parent=this,p}),this.abstractMethods=this.initialData.abstractMethods.map(l=>{const p=z(l,this.project);return p.parent=this,p}),this.extends=this.initialData.extends.map(l=>z(l,this.project));const a=this.properties.find(l=>l.id===pe["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.identifier.id);if(!a)throw new Error("Path property not found in endpoint entity");a._codeNativeValueValidation=(l,p)=>fU(l,p)}}function Qye(u){const d=[new gj(u),new Cj(u),new Xye(u),new qs(Br,u),new qs(_f,u)];return d.forEach(s=>{u.subscribeBuiltInInstance(s)}),u.builtInBaseEntities=d,d}function e0e(u){const d=[new Ri(ke,u),new Ri(Bn,u),new Ri(nt,u),new Ri(bm,u),new Ri(Gr,u),new Ri(Un,u),new Ri(nn,u),new Ri(jn,u),new Ri(fl,u)];return d.forEach(s=>{u.subscribeBuiltInInstance(s)}),u.primitives=d,d}function t0e(u){const d=[new Lt(gf,u)];return d.forEach(s=>{s.initChildren(null),u.subscribeBuiltInInstance(s)}),u.globalEventActionDescriptors=d,d}function r0e(u){const d=[new Lt(su,u),new Lt(ca,u),new Lt(ru,u),new Lt(ml,u),new Lt(vl,u),new Lt(mf,u)];d.forEach(a=>{a.initChildren(null),u.subscribeBuiltInInstance(a)}),u.loopDeclarations=d;const s=[new Lt(bf,u),new Lt(iu,u),new Lt(Ef,u),new Lt(qm,u),new Lt(Zm,u),new Lt(vf,u)];return s.forEach(a=>{a.initChildren(null),u.subscribeBuiltInInstance(a)}),u.loopDeclarationsBodies=s,d}function i0e(u){const d=[new ks($f,u),new ks(pv,u)];return d.forEach(s=>{s.initChildren(null),u.subscribeBuiltInInstance(s)}),u.valueDescriptors=d,d}function s0e(u){const d=[new Lt(yo,u),new Lt(Il,u)];return d.forEach(s=>{s.initChildren(null),u.subscribeBuiltInInstance(s)}),u.conditionDeclarations=d,d}const jo={},_y={},cp={empty:!1,enrich:!0,mock:!1,ignoreCache:!1,onFetch:async()=>null,manuallyInit:!1};function Pj(u,d={enrich:!0,shallowErrors:!1}){const s={enrich:!0,shallowErrors:!1,...d},{enrich:a,shallowErrors:l}=s,p=u.project,t=u.record,m=new Ga(p),v=new Set;t[p.id]=p,v.add(p.id);const b=N().toISOString();Object.values(t).forEach(V=>{!V||m.allBuiltInEntityIds.includes(V.id)||v.add(V.id)}),m.order=Array.from(v),m.flatRecord=t,m.orderEntities();const _=Dy(u.project);_.instances[p.id]=_;const I=a?_.addChangeSet(new F(_,P.sessionAuthor,b,_,!0,"project-init-from-fetch-result")):null;return m.visit(V=>{if(V.id===_.id)return;const B=z(V,_);try{B.hydrateAncestors(),B.addSelfToProject(null)}catch(K){if(l)console.error("Error hydrating ancestors: ",K);else throw K}}),a?(m.visit(V=>{if(V.id===_.id)return;const B=_.get(V.id);B&&B.afterAllChildrenInitialized(I)}),_.afterAllChildrenInitialized(I)):gy(_,b).forEach(B=>{B.remove({ignoreUpstream:!0},null)}),_.instancesList.forEach(V=>{V.previousVersion=null}),I==null||I.attemptAutoclose("project-init-from-fetch-result",_.id),_}async function n0e(u,d=cp){const s={...cp,...d};if(s.empty)return{data:{project:{id:u.id,type:f.Project,version:P.UUID.uuid(),createdAt:N().toISOString(),author:P.sessionAuthor,previousVersion:null,deleted:!1,name:null,description:null,projects:[],entities:[],operations:[],functions:[],variableDeclarations:[],variableInstances:[],functionCalls:[],conditions:[],loops:[],searches:[],events:[]},record:{}}};if(s.mock){const l={...bE};return l.id=u.id,{data:{project:l,record:{}}}}return console.log("Fetching project from external API"),new Promise(async l=>{try{if(s.onFetch){const p=await s.onFetch(u.id);if(p){l({data:p});return}}else l({data:null})}catch(p){console.error("Error fetching project: ",p),l({data:null})}})}function Dy(u){const d=new P(u);return e0e(d),Qye(d),zye(d),t0e(d),r0e(d),i0e(d),s0e(d),Array.from(new Set([...d.getAllBuiltInIds(),...bs()])).forEach(a=>{if(!d.builtInInstances[a]&&d.instances[a])d.builtInInstances[a]=d.instances[a],delete d.instances[a];else if(!d.builtInInstances[a])throw new Error(`Built in entity was not properly initialized: ${a}`)}),d.instances[d.id]=d,d}function gy(u,d){return u.instancesList.filter(a=>N(a.createdAt).isAfter(N(d)||!!a.previousVersion))}function a0e(u,{enrich:d}={enrich:!0}){const s=new Map,a=new Map,l=Array.from(new Set([...u.getAllBuiltInIds(),...bs()]));Object.keys(u.instances).forEach(_=>{if(l.includes(_)){s.set(_,_),a.set(_,_);return}const I=u.get(_);if(!wy(I,{...u.instances,...u.builtInInstances}).every(q=>!l.includes(q))){s.set(_,_),a.set(_,_);return}const K=P.UUID.uuid();s.set(_,K),a.set(K,_)});const p=N().toISOString(),t=u.toShallowJSON({seenEntityMaps:s});t.previousVersion=null,t.createdAt=p,t.version=P.UUID.uuid();const m=Dy(t);m.instances[m.id]=m;const v=d?m.addChangeSet(new F(m,P.sessionAuthor,p,m,!0,"project-clone")):null,b=new Ga(u);return b.visit(_=>{const I=_.toShallowJSON({seenEntityMaps:s});I.previousVersion=null,I.createdAt=p,I.version=P.UUID.uuid();const V=rp(I,OU(b.flatRecord,s));if(Object.keys(V.upstream).length){let K=!1;if(Object.keys(V.upstream).forEach(q=>{if(!K&&(!m.get(q)||m.getDeleted(q))){K=!0;return}}),K)return}const B=z(I,m);B.hydrateAncestors(),B.addSelfToProject(v),v==null||v.add(B,G.Added)}),d?(b.visit(_=>{if(_.id===m.id)return;const I=m.get(s.get(_.id));I&&I.afterAllChildrenInitialized(v)}),m.afterAllChildrenInitialized(v)):gy(m,p).forEach(I=>{I.remove({ignoreUpstream:!0},null)}),m.instancesList.forEach(_=>{_.previousVersion=null}),v==null||v.attemptAutoclose("project-clone",m.id),m}function Vj(u,{enrich:d}={enrich:!0}){const s=Dy(u),a=N().toISOString(),l=d?s.addChangeSet(new F(s,P.sessionAuthor,a,s,!0,"project-init")):null;l&&(l.type=jT.Automatic);const p=new Ga(u);return p.visit(t=>{const m=z(t,s);m.hydrateAncestors(),m.addSelfToProject(l)}),d?(p.visit(t=>{if(t.id===s.id)return;const m=s.get(t.id);m&&m.afterAllChildrenInitialized(l)}),s.afterAllChildrenInitialized(l)):(gy(s,a).forEach(v=>{v.remove({ignoreUpstream:!0},null)}),new Ga(s).visit(v=>{v.initialized=!0,v.captureVersion()})),s.initialized=!0,l==null||l.attemptAutoclose("project-init",s.id),s}async function o0e(u,d=cp){const s={...cp,...d};if(u.id&&jo[u.id]&&!s.ignoreCache)return jo[u.id];if(u.id&&_y[u.id]&&!s.ignoreCache)return await _y[u.id],jo[u.id];const a=n0e(u,s);u.id&&(_y[u.id]=a);const l=await a;if(l.data){let p;return s.mock?p=Vj(bE,{enrich:!!s.enrich}):l.data instanceof P?p=l.data:p=Pj(l.data,{enrich:!!s.enrich}),jo[u.id]=p,u.id&&delete _y[u.id],p}return null}function l0e(u){return jo[u.id]&&delete jo[u.id],null}C.AI_VALUE_CONNECTION_GENERATION_ACTION_EXPLANATION=hb,C.ALL_BUILT_IN_BASE_ENTITIES=MC,C.ALL_BUILT_IN_CONDITION_ENTITIES=YC,C.ALL_BUILT_IN_GLOBAL_EVENT_ENTITIES=HC,C.ALL_BUILT_IN_LOOP_BODY_ENTITIES=dO,C.ALL_BUILT_IN_LOOP_ENTITIES=lO,C.ALL_BUILT_IN_OPERATION_ENTITIES=bg,C.ALL_BUILT_IN_PRIMITIVE_ENTITIES=l1,C.ALL_BUILT_IN_TOP_LEVEL_ENTITIES=iP,C.ALL_BUILT_IN_VALUE_DESCRIPTORS=rP,C.ActionDescriptorState=Lt,C.ActionInputMapState=yhe,C.ActionOutputMapState=Ehe,C.AppendToListOperationInputIds=m_,C.AppendToListOperationOutputIds=v_,C.ArgumentDeclarationDependencyField=k3,C.ArgumentDeclarationState=ea,C.BREAK_AND_CONTINUE_STATEMENTS_RETURN_DECLARATIONS_EXPLANATION=ub,C.BUILT_IN_BASE_ENTITY_IDS=pe,C.BUILT_IN_ENTITY_TYPES=Pi,C.BaseCanvasDraggableState=Vye,C.BaseEntityNames=Oe,C.BaseState=Pye,C.BaseValueDescriptorIds=pl,C.BreakStatementDependencyField=S3,C.BreakStatementState=Ba,C.BuiltInBaseEntityState=qs,C.CACHED_PROJECTS_BY_ID=jo,C.CALLABLE_ENTITIES_EXPLANATION=_he,C.CALLABLE_TYPES=rn,C.CALLER_ENTITIES_EXPLANATION=z3,C.CALLER_TYPES=sn,C.CALLS_UPDATE_EXPLANATION=ja,C.CHILDREN_TYPES=s7,C.COMPARISON_CONDITIONS=JC,C.CONDITIONS=WC,C.CUSTOM_ENTITY_OPERATIONS=jD,C.CallableEntityClass=Lye,C.CallerEntityClass=Nb,C.ChangeSet=F,C.ChangeSetChangeCaptureType=jT,C.ChangeSetEntityChangeType=G,C.ChildEntityBaseClass=Nye,C.CommonStringValidationErrorCodes=cU,C.ComparisonOperatorTypes=fr,C.ConditionDependencyField=EM,C.ConditionState=Ca,C.ContinueStatementDependencyField=pM,C.ContinueStatementState=Qr,C.CreateNewInputIds=pD,C.CreateNewOutputIds=fD,C.DRAGGABLE_CALLABLE_TYPES=Tm,C.DRAGGABLE_CALLER_TYPES=e1,C.DRAGGABLE_ELEMENT_TYPES=sf,C.DRAGGABLE_EXECUTABLE_TYPES=r7,C.DRAGGABLE_PASS_THROUGH_CALLABLE_TYPES=rf,C.DRAGGABLE_PASS_THROUGH_CALLABLE_TYPES_WITH_OUTPUTS=Em,C.DataTypeCompatibilityTypes=ms,C.DataTypeDependencyField=xT,C.DataTypeParentChildRelation=Fr,C.DataTypeState=ts,C.DefinitionEntityDependencyField=Ry,C.DefinitionEntityState=ia,C.EDITABLE_PERSISTANCE_REPOSITORY_DEFAULTS=Oye,C.ENTITIES_WITH_VALLUES_EXPLANATION=dy,C.ENTITY_PERSISTANCE_OPTIONS_DEFAULTS=oe,C.ENTITY_RECUSION_OPTIONS_DEFAULTS=Ce,C.ENTITY_TYPES=i7,C.ENTITY_WITH_DECLARATION_TYPES=e7,C.ENTITY_WITH_LOGIC_SCOPE_TYPES=br,C.ENTITY_WITH_NAMES_TYPES=t1,C.ENTITY_WITH_PARENT_TYPES=XK,C.ENTITY_WITH_USER_MANAGED_DECLARATION_TYPES=Xw,C.ENTITY_WITH_USER_MANAGED_SINGLE_IMPLEMENTS_TYPES=QK,C.ENTITY_WITH_VALUE_TYPES=vm,C.ENTRY_POINT_ENTITIES_EXPLANATION=Xc,C.ENTRY_POINT_TYPES=Xt,C.EVENT_TYPES=cl,C.EXECUTABLE_TYPES=t7,C.EXECUTION_OPERATIONS=cD,C.EndpointEntity=Cj,C.EntityAction=wj,C.EntityError=xt,C.EntityErrorSeverity=S,C.EntityGenerationError=Y,C.EntityGenerationErrorCode=k,C.EntityInstanceErrorCode=me,C.EntityOperations=Wt,C.EntityType=f,C.EntityWithLogicScopeClass=jye,C.EntityWithValueClass=Uye,C.EntryPointEntityClass=Mye,C.Events=Lb,C.ExecutionOperations=Jt,C.ExecutionTerminationType=yM,C.FunctionCallDependencyField=oU,C.FunctionCallState=Fa,C.FunctionDeclarationDependencyField=sM,C.FunctionDeclarationState=_a,C.GET_PROJECT_OPTIONS_DEFAULTS=cp,C.GLOBAL_EVENT_DECLARATIONS=zC,C.GetLastInListOperationInputIds=s_,C.GetLastInListOperationOutputIds=n_,C.GlobalEventNames=Mn,C.GlobalEventState=$a,C.HTTPOperations=Hr,C.HTTPStatucCodeValidationErrorCodes=$j,C.HTTP_OPERATIONS=Eg,C.InputMapDependencyField=x3,C.InputMapState=Es,C.InstalledProjectState=La,C.InternalCallDependencyField=U3,C.InternalCallState=Ma,C.JoinListOperationInputIds=RR,C.JoinListOperationOutputIds=_R,C.LIST_OPERATIONS=C_,C.ListOperations=it,C.LiteralValueDependencyField=eM,C.LiteralValueState=Fs,C.LoopDependencyField=mM,C.LoopState=Oa,C.LoopTypes=Be,C.NON_INTERACTIVE_BASE_ENTITIES_EXPLANATION=xa,C.NUMBER_OPERATIONS=j1,C.NumberOperations=Ht,C.OPERATION_DECLARATIONS=Tg,C.OperationDependencyField=oM,C.OperationState=Da,C.OutputMapDependencyField=G3,C.OutputMapParentChildRelation=ul,C.OutputMapState=Ks,C.PARENT_AUTO_CALCULATION_FROM_CALLER_EXPLANATION=uy,C.PASS_THROUGH_CALLABLE_ENTITIES_EXPLANATION=Ua,C.PASS_THROUGH_CALLABLE_TYPES=dr,C.PASS_THROUGH_CALLABLE_TYPES_WITH_OUTPUTS=Qw,C.PROPERTY_NOT_VALUE_READER_WRITTER_EXPLANATION=fb,C.ParallelExecutionOperation=Rj,C.PassThroughCallableEntityClass=Bye,C.PersistedEntity=gj,C.PersistedEntityMethods=Ji,C.PrimitiveEntityState=Ri,C.PrimitiveTypes=te,C.ProjectState=P,C.ProjectStateEvents=ar,C.PropertyDependencyField=rM,C.PropertyState=Xn,C.READ_ONLY_ENTITY_PERSISTANCE_REPOSITORY=Aj,C.RETURN_STATEMENT_RETURN_DECLARATIONS_EXPLANATION=Dhe,C.ReturnDeclarationDependencyField=dM,C.ReturnDeclarationState=wi,C.ReturnStatementDependencyField=FT,C.ReturnStatementState=ga,C.SQLAST=ohe,C.STANDALONE_CONDITIONS=jC,C.STRING_OPERATIONS=wR,C.ScopeCompatibilityType=Ay,C.SearchDependencyField=N3,C.SearchState=Na,C.SequentialExecutionOperation=Dj,C.SequentialExecutionOperationInputIds=X_,C.SequentialExecutionOperationOutputIds=Q_,C.SharedEntityErrorCode=le,C.SharedStateFunctionality=bj,C.SplitListOperationInputIds=FR,C.SplitListOperationOutputIds=GR,C.StandaloneOperatorTypes=ps,C.StringOperations=ut,C.TERMINATION_TYPES=sr,C.Traverser=Ga,C.USER_MANAGED_ENTITY_TYPES=r1,C.UserManagedEntityStateTemplate=Cye,C.VALUE_READING_ENTITIES_EXPLANATION=pb,C.VALUE_READING_TYPES=ua,C.VALUE_WRITING_ENTITIES_EXPLANATION=H3,C.VALUE_WRITING_TYPES=Tr,C.VARIABLE_DATA_TYPE_INFERRANCE_EXPLANATION=cb,C.VARIABLE_TYPES=lr,C.ValueAutogenerationType=Er,C.ValueDescriptorDependencyField=J3,C.ValueDescriptorParentChildRelation=ie,C.ValueDescriptorState=ks,C.ValueReadingEntityClass=dp,C.ValueWritingEntityClass=up,C.VariableDeclarationDependencyField=AM,C.VariableDeclarationState=Va,C.VariableInputMapState=hhe,C.VariableInstanceDependencyField=KT,C.VariableInstanceState=Pa,C.VariableOutputMapState=vhe,C.WaitOperation=_j,C.WaitOperationInputIds=S_,C.WaitOperationOutputIds=Z_,C.actionDescriptorValidation=mpe,C.appendToListOperation=lf,C.appendToListOperationElementToAppendArgument=Nm,C.appendToListOperationElementToAppendArgumentParentRef=__,C.appendToListOperationElementToAppendArgumentRef=b_,C.appendToListOperationError=O_,C.appendToListOperationErrorParentRef=$_,C.appendToListOperationListArgument=Vm,C.appendToListOperationListArgumentParentRef=R_,C.appendToListOperationListArgumentRef=E_,C.appendToListOperationListDataType=T_,C.appendToListOperationResultListDataType=w_,C.appendToListOperationResultListReturn=g_,C.appendToListOperationResultListReturnParentRef=D_,C.appendToListOperationResultListReturnRef=I_,C.appendToListOperationSecondListDataType=A_,C.applyNewScope=Me,C.argumentDeclarationValidation=The,C.asGenerationActionExample=En,C.booleanPrototype=Bn,C.breakStatementValidation=bhe,C.calculateNewParentBasedOnCallers=bb,C.capitalizeFirstLetter=kr,C.changeSetJSONRecordToUniqueIds=epe,C.checkAreDataTypesCompatible=vs,C.checkAreDefinitionEntitiesCompatibleAsDataType=ML,C.checkArePropertiesCompatibleAsDataType=LL,C.checkExtendsBaseEntity=Iy,C.checkHasBaseEntity=As,C.checkHasMetadataChanged=cr,C.checkImplementationsOverlap=ra,C.checkImplementsBaseEntity=nye,C.checkIsBranchDependentButNotDirectlyOnBranch=ep,C.checkIsBranchDependentOnBranch=xhe,C.checkIsBuiltIn=Vb,C.checkIsCallableEntityReachable=lp,C.checkIsCanvasEntity=iye,C.checkIsDefEntityInlineDeclaredForSearchOutputType=nb,C.checkIsDetachedBranch=dj,C.checkIsDetachedBranchShallow=Cb,C.checkIsGlobalVariable=tye,C.checkIsGloballyDeclared=Ob,C.checkIsMethod=pj,C.checkIsNestedScope=by,C.checkScopeCompatibility=op,C.cloneProject=a0e,C.conditionValidation=vpe,C.continueStatementValidation=ppe,C.convertToAbstract=Mhe,C.convertToNonAbstract=Bhe,C.convertToNonStatic=jhe,C.convertToStatic=Uhe,C.countedLoopActionDescriptor=su,C.countedLoopActionDescriptorDynamicReturnDeclaration=eO,C.countedLoopActionDescriptorDynamicReturnDeclarationParentRef=Q$,C.countedLoopActionDescriptorStringArgumentDeclaration=X$,C.countedLoopActionDescriptorStringArgumentDeclarationDataType=z$,C.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValue=W$,C.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValueParentRef=J$,C.countedLoopActionDescriptorStringArgumentDeclarationDataTypeParentRef=Y$,C.countedLoopActionDescriptorStringArgumentDeclarationParentRef=H$,C.countedLoopBodyActionDescriptor=bf,C.countedLoopBodyActionDescriptorAnyDynamicArgument=nO,C.countedLoopBodyActionDescriptorAnyDynamicArgumentParentRef=sO,C.countedLoopBodyActionDescriptorAnyDynamicReturn=oO,C.countedLoopBodyActionDescriptorAnyDynamicReturnParentRef=aO,C.countedLoopBodyActionDescriptorIterationNumberArgumentDeclaration=Wm,C.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=rO,C.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=tO,C.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=iO,C.createDefinitionEntityFromJSONObject=yy,C.createEntityError=tt,C.createNestedDataTypeForEntity=uU,C.createNewInstanceOperation=lo,C.createNewInstanceOperationEntityToInstanciateArgument=AD,C.createNewInstanceOperationEntityToInstanciateArgumentRef=ED,C.createNewInstanceOperationEntityToInstanciateDataType=TD,C.createNewInstanceOperationError=_D,C.createNewInstanceOperationErrorParentRef=RD,C.createNewInstanceOperationNewEntityDataArgument=vD,C.createNewInstanceOperationNewEntityDataArgumentDataType=mD,C.createNewInstanceOperationNewEntityDataArgumentDataTypeParentRef=yD,C.createNewInstanceOperationNewEntityDataArgumentParentRef=hD,C.createNewInstanceOperationOutputEntityDeclaration=wD,C.createNewInstanceOperationOutputEntityDeclarationParentRef=ID,C.createNewInstanceOperationRef=bD,C.createSemanticId=JL,C.createStateFromGenerationTargetType=$ye,C.createStateFromType=er,C.createStateFromTypeAndSubscribe=z,C.cronJobBuiltInBaseEntity=_f,C.cronJobBuiltInBaseEntityExpressionProperty=NC,C.cronJobBuiltInBaseEntityExpressionPropertyDataTypeRef=p7,C.cronJobBuiltInBaseEntityExpressionPropertyRef=PC,C.cronJobBuiltInBaseEntityRef=VC,C.cronJobTriggeredFunctionDeclarationBlueprint=lv,C.cronJobTriggeredFunctionDeclarationBlueprintParentRef=OC,C.dataTypeCompatibilityToErrorExplanation=nU,C.dataTypeValidation=ape,C.datePrototype=nn,C.dateValueAutogenerationSchema=_E,C.definitionEntityToZodSchema=TP,C.definitionEntityValidation=Rye,C.deletePersistedEntityMethod=ov,C.deletePersistedEntityMethodParentRef=hC,C.deleteRootProject=l0e,C.endpointBuiltInBaseEntity=Vi,C.endpointBuiltInBaseEntityRef=fO,C.endpointBuiltInBaseEntityRefFour=YO,C.endpointBuiltInBaseEntityRefThree=IO,C.endpointBuiltInBaseEntityRefTwo=EO,C.endpointBuiltInCorsProperty=hO,C.endpointBuiltInCorsPropertyDataType=pO,C.endpointBuiltInCorsPropertyDataTypeRef=uO,C.endpointBuiltInCorsPropertyRef=cO,C.endpointBuiltInMethodProperty=zm,C.endpointBuiltInMethodPropertyDataType=AO,C.endpointBuiltInMethodPropertyDataTypeRef=TO,C.endpointBuiltInMethodPropertyRef=bO,C.endpointBuiltInPathProperty=Ym,C.endpointBuiltInPathPropertyDataType=vO,C.endpointBuiltInPathPropertyDataTypeRef=yO,C.endpointBuiltInPathPropertyRef=mO,C.endpointPathParamsArgumentDeclaration=Xm,C.endpointPathParamsArgumentDeclarationRef=VO,C.endpointPathParamsVariableDataType=NO,C.endpointPathParamsVariableDataTypeRef=PO,C.endpointReachedTriggerActionDescriptor=sv,C.endpointReachedTriggerActionDescriptorRef=LO,C.endpointReachedTriggerActionDescriptorRefFour=UO,C.endpointReachedTriggerActionDescriptorRefThree=BO,C.endpointReachedTriggerActionDescriptorRefTwo=MO,C.endpointRequestBodyArgumentDeclaration=ev,C.endpointRequestBodyArgumentDeclarationRef=DO,C.endpointRequestBodyVariableDataType=gO,C.endpointRequestHeadersArgumentDeclaration=Hm,C.endpointRequestHeadersArgumentDeclarationRef=RO,C.endpointRequestHeadersVariableDataType=_O,C.endpointRequestHeadersVariableDataTypeRef=wO,C.endpointRequestQueryParamsArgumentDeclaration=Qm,C.endpointRequestQueryParamsArgumentDeclarationRef=OO,C.endpointRequestQueryParamsVariableDataType=CO,C.endpointRequestQueryParamsVariableDataTypeRef=$O,C.endpointResponseBodyDataType=JO,C.endpointResponseBodyReturnDeclaration=iv,C.endpointResponseBodyReturnDeclarationRef=ZO,C.endpointResponseCodeDataType=xO,C.endpointResponseCodeReturnDeclaration=tv,C.endpointResponseCodeReturnDeclarationDefaultValueParentRef=GO,C.endpointResponseCodeReturnDeclarationRef=jO,C.endpointResponseHeadersDataType=qO,C.endpointResponseHeadersDataTypeRef=KO,C.endpointResponseHeadersReturnDeclaration=rv,C.endpointResponseHeadersReturnDeclarationRef=kO,C.endpointReturnStatementRef=FO,C.endpointReturnStatementRefThree=WO,C.endpointReturnStatementRefTwo=SO,C.enrichFromKnownEntities=tp,C.enumOptionsProperty=o1,C.enumOptionsPropertyDataType=n1,C.enumOptionsPropertyDataTypeRef=i1,C.enumOptionsPropertyRef=s1,C.enumPrototype=Un,C.enumPrototypeRef=a1,C.executionBuiltInBaseEntity=Df,C.executionBuiltInEntityAbortMethod=dv,C.executionBuiltInEntityAbortMethodParentRef=LC,C.filterOutDuplicateEntities=w,C.filterOutDuplicateErrors=yoe,C.findEntityFromKeys=Eb,C.findReferenceToSelfInList=$U,C.findReferencesToSelfInProject=Whe,C.flattenActionDescriptor=CU,C.flattenArgumentDeclaration=PU,C.flattenBreakStatement=VU,C.flattenBuiltInBaseEntity=NU,C.flattenCalls=Ts,C.flattenCanvasAncestorsUntil=nd,C.flattenCondition=LU,C.flattenContinueStatement=MU,C.flattenDataType=UU,C.flattenDefinitionEntity=BU,C.flattenDefinitionEntityExtensionAndImplementationTypes=Ty,C.flattenDefinitionEntityExtensionTypes=sp,C.flattenDefinitionEntityExtensions=_b,C.flattenDefinitionEntityImplementations=Db,C.flattenDefinitionEntityImplementionTypes=ip,C.flattenDerivedCanvasEntities=xi,C.flattenDetachedBranch=cj,C.flattenElementCalls=at,C.flattenElementCallsOnTheSameScope=Jhe,C.flattenEntity=ae,C.flattenFunctionCall=jU,C.flattenFunctionDeclaration=xU,C.flattenGlobalEvent=FU,C.flattenInputMap=GU,C.flattenInstalledProject=KU,C.flattenInternalCall=kU,C.flattenLiteralValue=qU,C.flattenLoop=SU,C.flattenOperation=ZU,C.flattenOutputMap=JU,C.flattenPrimitiveEntity=WU,C.flattenProject=YU,C.flattenProjectElements=gU,C.flattenProperty=zU,C.flattenRelatedCanvasElementsOnTheLeft=lj,C.flattenRelatedCanvasElementsOnTheRight=oj,C.flattenReturnDeclaration=HU,C.flattenReturnStatement=XU,C.flattenSearch=QU,C.flattenValueDescriptor=ej,C.flattenVariableDeclaration=tj,C.flattenVariableInstance=rj,C.flattenVariableReads=DU,C.flattenVariableWrites=_U,C.flattenVariables=kt,C.fromChangeSetToRecordChangeSet=cye,C.fromLiteralValueTypeToPrimitiveType=ib,C.fromZodParseToEntityGenerationErrors=ob,C.functionCallValidation=Lhe,C.functionDeclarationValidation=npe,C.generate=y9,C.generateActionExample=ghe,C.generateExecutionDataType=Zce,C.generateIdFromStrategy=hr,C.generateMutablePropertiesExplanation=ay,C.generateRandomBoolean=SP,C.generateRandomDate=wP,C.generateRandomDateAfter=bP,C.generateRandomDateBefore=AP,C.generateRandomDateBetweenRange=IP,C.generateRandomNumber=FP,C.generateRandomNumberAfter=UP,C.generateRandomNumberBefore=jP,C.generateRandomNumberBetweenRange=xP,C.generateRandomText=qP,C.generateRandomTextAfter=GP,C.generateRandomTextBefore=KP,C.generateRandomTextBetweenRange=kP,C.generateUniqueUUID=BP,C.getAllActionDescriptorsForConditions=fy,C.getAllActionDescriptorsForGlobalEvents=cy,C.getAllActionDescriptorsForLoops=py,C.getAllActionDescriptorsForOperations=Phe,C.getAllBuiltInEntityIds=bs,C.getAllGloballyDeclaredFunctionDeclarationsExplanation=rU,C.getBaseBuiltInEntities=hi,C.getBaseSchemaBasedOnType=W3,C.getBuiltInEntityOwner=ka,C.getCallableEntityReferenceSchema=Kr,C.getCallableEntityTypeSchema=IN,C.getCalledBy=is,C.getCallerEntityReferenceSchema=Tde,C.getCallerEntityTypeSchema=Ede,C.getCalls=Ib,C.getCanvasEntitiesDerivedFromInternalCalls=aj,C.getCanvasEntitiesDerivedFromWrites=ad,C.getCanvasEntityDerivedFromValueReadingEntity=Ey,C.getCanvasEntityDerivedFromValueReadingEntityFromTransfer=nj,C.getCanvasEntityReferenceSchema=Bde,C.getCanvasEntityTypeSchema=Mde,C.getChildrenEntityWithValues=Ghe,C.getColumnProperties=od,C.getCommonAncestor=Ab,C.getCommonChildren=hU,C.getDatabaseEntities=oye,C.getDatabaseEntity=dye,C.getDeclaration=Mo,C.getDeclarationOutputedError=fye,C.getDeepestScope=hj,C.getDefaultRelationalDatabaseEntityOrFirst=mj,C.getDraggableCallableEntityReferenceSchema=RN,C.getDraggableCallableEntityTypeSchema=wN,C.getDraggableCallerEntityReferenceSchema=Ade,C.getDraggableCallerEntityTypeSchema=bde,C.getDraggableExecutableEntityReferenceSchema=_de,C.getDraggableExecutableEntityTypeSchema=Rde,C.getDraggablePassThroughCallableEntityReferenceSchema=Mh,C.getDraggablePassThroughCallableEntityTypeSchema=Lh,C.getDraggablePlayableEntityReferenceSchema=Cde,C.getDraggablePlayableEntityTypeSchema=Ode,C.getEntitiesCreatedSinceInitialization=gy,C.getEntityArgumentDeclarations=Rb,C.getEntityInputMaps=ij,C.getEntityOutputMaps=Xhe,C.getEntityReferenceSchema=Lde,C.getEntityReturnDeclarations=sj,C.getEntityTypeSchema=Nde,C.getEntityWithLogicScopeReferenceSchema=Yn,C.getEntityWithLogicScopeTypeSchema=Dde,C.getEntityWithValueReferenceSchema=AN,C.getEntityWithValueTypeSchema=vde,C.getEntryPointEntityReferenceSchema=Ur,C.getEntryPointEntityTypeSchema=Ia,C.getEventEntityReferenceSchema=Vh,C.getEventEntityTypeSchema=Ph,C.getExecutableEntityReferenceSchema=wde,C.getExecutableEntityTypeSchema=Ide,C.getExtendedBuiltInEntity=Qhe,C.getExtendedDefinitionEntity=$b,C.getFirstNonLoopScopeOwner=Rr,C.getGenerationTargetSchemaBasedOnType=Y3,C.getHeadIfPartOfDetachedBranch=uj,C.getHighestScope=fj,C.getImplementedBuiltInEntity=eye,C.getIsInteractive=np,C.getLastInListOperation=Pm,C.getLastInListOperationError=y_,C.getLastInListOperationErrorParentRef=h_,C.getLastInListOperationInputListArgument=c_,C.getLastInListOperationInputListArgumentParentRef=u_,C.getLastInListOperationInputListArgumentRef=a_,C.getLastInListOperationInputListDataType=o_,C.getLastInListOperationOutputElementDataType=d_,C.getLastInListOperationOutputElementReturn=f_,C.getLastInListOperationOutputElementReturnParentRef=p_,C.getLastInListOperationOutputElementReturnRef=l_,C.getLinkedEntitiesFromArgumentDeclaration=Zhe,C.getLowestPersistedEntityImplementation=gb,C.getParentCallableEntity=yU,C.getParentCallerEntity=vU,C.getParentCanvasEntities=ei,C.getParentCanvasEntity=Pr,C.getParentCanvasEntityFromTransfer=my,C.getParentEntryPoint=Fhe,C.getParentPassthroughCallableEntity=mU,C.getPassThroughCallableEntityReferenceSchema=Qt,C.getPassThroughCallableEntityTypeSchema=Nh,C.getPeristedEntities=aye,C.getPlayableEntityReferenceSchema=$de,C.getPlayableEntityTypeSchema=gde,C.getProject=o0e,C.getPrototypeByType=ap,C.getRecusriveParentsIds=wy,C.getReferenceEntityId=W,C.getReferencedEntitiesStateOrErrors=ly,C.getReferencedEntityStateOrErrors=lb,C.getReferencedIds=rp,C.getRelatedCanvasElementsOnTheLeft=Uo,C.getRelatedCanvasElementsOnTheLeftFromTransfer=Yhe,C.getRelatedCanvasElementsOnTheRight=Ka,C.getRootEntryPointScopeOwner=Pb,C.getScopeOwner=yi,C.getStateClassFromType=uye,C.getTerminationReferenceSchema=Vde,C.getTerminationTypeSchema=Pde,C.getTouchedCanvasEntitiesFromChangeSet=pye,C.getUsedArgFromDeclaration=zhe,C.getUsedReturnFromDeclaration=Hhe,C.getValueReadingEntityReferenceSchema=bN,C.getValueReadingEntityTypeSchema=Wn,C.getValueWritingEntityReferenceSchema=mde,C.getValueWritingEntityTypeSchema=Ku,C.getVariableFromInputMapping=TU,C.getVariableFromReturnVariablePointer=IU,C.getVariableReferenceSchema=Aa,C.getVariableTypeSchema=Oo,C.getVariablesFromArgumentDeclarations=vy,C.getVariablesFromInputMaps=bU,C.getVariablesFromOutputMapping=wU,C.getVariablesFromOutputMaps=RU,C.getVariablesFromReturnDeclarations=AU,C.getVariablesInSameOrHigherScope=CT,C.getWrites=wb,C.globalEventValidation=fpe,C.groupCallsBasedOnParallelizableExecution=khe,C.handleAfterEntityImplementationSideEffects=dU,C.handleBeforeEntityImplementationSideEffects=lU,C.httpRequestBodyArgument=pf,C.httpRequestBodyArgumentRef=HD,C.httpRequestBodyDataType=XD,C.httpRequestHeadersArgument=cf,C.httpRequestHeadersArgumentRef=YD,C.httpRequestHeadersDataType=zD,C.httpRequestMethodArgument=df,C.httpRequestMethodArgumentRef=JD,C.httpRequestMethodDataType=WD,C.httpRequestMethodDataTypeRef=SD,C.httpRequestOperation=eu,C.httpRequestOperationErrorValueDescriptor=xm,C.httpRequestOperationErrorValueDescriptorDatatype=vg,C.httpRequestOperationErrorValueDescriptorRef=mg,C.httpRequestOperationRef=pg,C.httpRequestOperationRefEight=hg,C.httpRequestOperationRefFive=ug,C.httpRequestOperationRefFour=dg,C.httpRequestOperationRefNine=yg,C.httpRequestOperationRefSeven=fg,C.httpRequestOperationRefSix=cg,C.httpRequestOperationRefThree=lg,C.httpRequestOperationRefTwo=og,C.httpRequestQueryParamsArgument=jm,C.httpRequestQueryParamsArgumentRef=kD,C.httpRequestQueryParamsDataType=qD,C.httpRequestVariableURLArgument=uf,C.httpRequestVariableURLArgumentRef=GD,C.httpRequestVariableURLDataType=KD,C.httpRequestVariableURLDataTypeRef=xD,C.httpResponseBodyReturnDataType=ag,C.httpResponseBodyReturnDataTypeRef=sg,C.httpResponseBodyReturnReturn=yf,C.httpResponseBodyReturnReturnRef=ng,C.httpResponseCodeDataType=eg,C.httpResponseCodeReturn=ff,C.httpResponseCodeReturnRef=QD,C.httpResponseHeadersDataType=ig,C.httpResponseHeadersDataTypeRef=tg,C.httpResponseHeadersReturn=hf,C.httpResponseHeadersReturnRef=rg,C.httpStatusCodeValueValidation=Oj,C.implement=hy,C.inferArgumentDeclarationDataType=BL,C.inferDataType=xs,C.inferInputMapDataType=gT,C.inferOutputMapDataType=OT,C.inferPropertyDataType=xL,C.inferReturnDeclarationDataType=$T,C.inferValueDescriptorDataType=FL,C.inferVariableDeclarationDataType=jL,C.inferVariableInstanceDataType=UL,C.initBaseProjectEntity=Dy,C.initProject=Vj,C.initProjectFromFetchResult=Pj,C.inputMapValidation=fhe,C.installedProjectValidation=che,C.internalCallValidation=phe,C.isPromise=vb,C.iterateOverListActionDescriptorListArgumentDeclaration=Hg,C.iterateOverListActionDescriptorListArgumentDeclarationDataType=Yg,C.iterateOverListActionDescriptorListArgumentDeclarationDataTypeParentRef=Wg,C.iterateOverListActionDescriptorListArgumentDeclarationParentRef=zg,C.iterateOverListLoopActionDescriptor=ca,C.iterateOverListLoopActionDescriptorDynamicReturnDeclaration=Qg,C.iterateOverListLoopActionDescriptorDynamicReturnDeclarationParentRef=Xg,C.iterateOverListLoopBodyActionDescriptor=iu,C.iterateOverListLoopBodyActionDescriptorAnyDynamicArgument=l$,C.iterateOverListLoopBodyActionDescriptorAnyDynamicArgumentParentRef=o$,C.iterateOverListLoopBodyActionDescriptorAnyDynamicReturn=u$,C.iterateOverListLoopBodyActionDescriptorAnyDynamicReturnParentRef=d$,C.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Tf,C.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=t$,C.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=e$,C.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=r$,C.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclaration=a$,C.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=s$,C.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=i$,C.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=n$,C.iterateOverObjectKeysActionDescriptorObjectArgumentDeclaration=y$,C.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationDataType=f$,C.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationDataTypeParentRef=p$,C.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationParentRef=h$,C.iterateOverObjectKeysLoopActionDescriptor=ml,C.iterateOverObjectKeysLoopActionDescriptorDynamicReturnDeclaration=v$,C.iterateOverObjectKeysLoopActionDescriptorDynamicReturnDeclarationParentRef=m$,C.iterateOverObjectKeysLoopBodyActionDescriptor=qm,C.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicArgument=D$,C.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicArgumentParentRef=_$,C.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicReturn=$$,C.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicReturnParentRef=g$,C.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclaration=km,C.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=T$,C.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=E$,C.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=b$,C.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclaration=R$,C.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=I$,C.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=A$,C.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=w$,C.iterateOverObjectValuesActionDescriptorObjectArgumentDeclaration=N$,C.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationDataType=P$,C.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationDataTypeParentRef=C$,C.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationParentRef=V$,C.iterateOverObjectValuesLoopActionDescriptor=vl,C.iterateOverObjectValuesLoopActionDescriptorDynamicReturnDeclaration=M$,C.iterateOverObjectValuesLoopActionDescriptorDynamicReturnDeclarationParentRef=L$,C.iterateOverObjectValuesLoopBodyActionDescriptor=Zm,C.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgument=q$,C.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgumentParentRef=k$,C.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicReturn=Z$,C.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicReturnParentRef=S$,C.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Sm,C.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=U$,C.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=B$,C.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=j$,C.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclaration=K$,C.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=F$,C.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=x$,C.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=G$,C.iterateOverStringActionDescriptorDynamicReturnDeclaration=Bg,C.iterateOverStringActionDescriptorDynamicReturnDeclarationParentRef=Mg,C.iterateOverStringActionDescriptorStringArgumentDeclaration=Lg,C.iterateOverStringActionDescriptorStringArgumentDeclarationDataType=Vg,C.iterateOverStringActionDescriptorStringArgumentDeclarationDataTypeParentRef=Pg,C.iterateOverStringActionDescriptorStringArgumentDeclarationParentRef=Ng,C.iterateOverStringLoopActionDescriptor=ru,C.iterateOverStringLoopBodyActionDescriptor=Ef,C.iterateOverStringLoopBodyActionDescriptorAnyDynamicArgument=qg,C.iterateOverStringLoopBodyActionDescriptorAnyDynamicArgumentParentRef=kg,C.iterateOverStringLoopBodyActionDescriptorAnyDynamicReturn=Zg,C.iterateOverStringLoopBodyActionDescriptorAnyDynamicReturnParentRef=Sg,C.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Gm,C.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=jg,C.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=Ug,C.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=xg,C.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclaration=Km,C.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=Gg,C.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=Fg,C.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=Kg,C.joinListOperation=$m,C.joinListOperationError=xR,C.joinListOperationErrorParentRef=jR,C.joinListOperationFirstListArgument=NR,C.joinListOperationFirstListArgumentParentRef=VR,C.joinListOperationFirstListArgumentRef=DR,C.joinListOperationFirstListDataType=gR,C.joinListOperationResultListDataType=PR,C.joinListOperationResultListReturn=UR,C.joinListOperationResultListReturnParentRef=BR,C.joinListOperationResultListReturnRef=CR,C.joinListOperationSecondListArgument=MR,C.joinListOperationSecondListArgumentParentRef=LR,C.joinListOperationSecondListArgumentRef=$R,C.joinListOperationSecondListDataType=OR,C.joinListWithLastSeparator=Ke,C.joinStringsOperation=Qd,C.joinStringsOperationDynamicStringArgument=nR,C.joinStringsOperationDynamicStringArgumentParentRef=sR,C.joinStringsOperationDynamicStringArgumentRef=rR,C.joinStringsOperationDynamicStringDataType=iR,C.joinStringsOperationError=tR,C.joinStringsOperationErrorParentRef=eR,C.joinStringsOperationFirstStringArgument=af,C.joinStringsOperationFirstStringArgumentParentRef=S1,C.joinStringsOperationFirstStringArgumentRef=x1,C.joinStringsOperationFirstStringDataType=F1,C.joinStringsOperationResultStringDataType=q1,C.joinStringsOperationResultStringReturn=Xd,C.joinStringsOperationResultStringReturnParentRef=Q1,C.joinStringsOperationResultStringReturnRef=k1,C.joinStringsOperationSecondStringArgument=of,C.joinStringsOperationSecondStringArgumentParentRef=X1,C.joinStringsOperationSecondStringArgumentRef=G1,C.joinStringsOperationSecondStringDataType=K1,C.joinStringsOperationSeparatorStringArgument=H1,C.joinStringsOperationSeparatorStringArgumentParentRef=z1,C.joinStringsOperationSeparatorStringArgumentRef=Z1,C.joinStringsOperationSeparatorStringDataType=Y1,C.joinStringsOperationSeparatorStringDataTypeDefaultValue=W1,C.joinStringsOperationSeparatorStringDataTypeDefaultValueParentRef=J1,C.keyValuePrototype=fl,C.literalValudValidation=tpe,C.loopValidation=ype,C.lowercaseFirstLetter=Xu,C.manualFlowActionDescriptorDeclarationArgumentDeclaration=Fm,C.manualFlowActionDescriptorDeclarationArgumentDeclarationDataType=Rg,C.manualFlowActionDescriptorDeclarationArgumentDeclarationDataTypeParentRef=wg,C.manualFlowActionDescriptorDeclarationArgumentDeclarationParentRef=_g,C.manualFlowLoopActionDescriptor=mf,C.manualFlowLoopActionDescriptorDynamicReturnDeclaration=Ig,C.manualFlowLoopActionDescriptorDynamicReturnDeclarationParentRef=Ag,C.manualFlowLoopBodyActionDescriptor=vf,C.manualFlowLoopBodyActionDescriptorAnyDynamicArgument=gg,C.manualFlowLoopBodyActionDescriptorAnyDynamicArgumentParentRef=Dg,C.manualFlowLoopBodyActionDescriptorAnyDynamicReturn=Og,C.manualFlowLoopBodyActionDescriptorAnyDynamicReturnParentRef=$g,C.mapActionDescriptorToTypeItRepresents=sye,C.mapRecord=OU,C.mergeEntityErrorsList=moe,C.mergeListOfEntities=rye,C.methodDefaultValue=ZD,C.mockClientProject=bE,C.moreThanOrEqualCondition=Il,C.moreThanOrEqualConditionLeftHandArgument=KC,C.moreThanOrEqualConditionLeftHandArgumentDataType=FC,C.moreThanOrEqualConditionLeftHandArgumentDataTypeParentRef=xC,C.moreThanOrEqualConditionLeftHandArgumentParentRef=GC,C.moreThanOrEqualConditionRightHandArgument=ZC,C.moreThanOrEqualConditionRightHandArgumentDataType=qC,C.moreThanOrEqualConditionRightHandArgumentDataTypeParentRef=kC,C.moreThanOrEqualConditionRightHandArgumentParentRef=SC,C.noSpacesOrDashesValueValidation=fU,C.noSpacesValueValidation=pU,C.notEmptyCondition=yo,C.notEmptyConditionArgument=UC,C.notEmptyConditionRef=BC,C.nullPrototype=bm,C.numberAdditionOperation=nf,C.numberAdditionOperationDynamicSummandArgument=A1,C.numberAdditionOperationDynamicSummandArgumentType=b1,C.numberAdditionOperationDynamicSummandArgumentTypeParentRef=T1,C.numberAdditionOperationError=E1,C.numberAdditionOperationErrorParentRef=v1,C.numberAdditionOperationFirstNumberArgument=Am,C.numberAdditionOperationFirstNumberArgumentRef=d1,C.numberAdditionOperationFirstNumberDataType=u1,C.numberAdditionOperationRef=y1,C.numberAdditionOperationRefThree=wm,C.numberAdditionOperationRefTwo=m1,C.numberAdditionOperationResultNumberDataType=h1,C.numberAdditionOperationResultNumberReturn=Rm,C.numberAdditionOperationResultNumberReturnRef=f1,C.numberAdditionOperationSecondNumberArgument=Im,C.numberAdditionOperationSecondNumberArgumentRef=c1,C.numberAdditionOperationSecondNumberDataType=p1,C.numberPrototype=nt,C.numberSubtractionOperation=Dm,C.numberSubtractionOperationDynamicSubtrahendArgument=U1,C.numberSubtractionOperationDynamicSubtrahendArgumentType=B1,C.numberSubtractionOperationDynamicSubtrahendArgumentTypeParentRef=M1,C.numberSubtractionOperationError=L1,C.numberSubtractionOperationErrorParentRef=N1,C.numberSubtractionOperationFirstNumberArgument=$1,C.numberSubtractionOperationFirstNumberArgumentRef=I1,C.numberSubtractionOperationFirstNumberDataType=w1,C.numberSubtractionOperationRef=_m,C.numberSubtractionOperationRefThree=P1,C.numberSubtractionOperationRefTwo=O1,C.numberSubtractionOperationResultNumberDataType=g1,C.numberSubtractionOperationResultNumberReturn=V1,C.numberSubtractionOperationResultNumberReturnRef=D1,C.numberSubtractionOperationSecondNumberArgument=C1,C.numberSubtractionOperationSecondNumberArgumentRef=R1,C.numberSubtractionOperationSecondNumberDataType=_1,C.numberValueAutogenerationSchema=RE,C.operationValidation=dpe,C.outputMapValidation=mhe,C.parallelExecutionOperation=Vs,C.parallelExecutionOperationError=q_,C.parallelExecutionOperationErrorParentRef=k_,C.parallelExecutionOperationListOfExecutionResultsDataType=F_,C.parallelExecutionOperationListOfExecutionResultsReturn=Mm,C.parallelExecutionOperationListOfExecutionResultsReturnRef=x_,C.parallelExecutionOperationListOfFunctionsArgument=Lm,C.parallelExecutionOperationListOfFunctionsArgumentDatatype=j_,C.parallelExecutionOperationListOfFunctionsArgumentRef=U_,C.parallelExecutionOperationListOfFunctionsBlueprint=B_,C.parallelExecutionOperationListOfFunctionsBlueprintDynamicInput=L_,C.parallelExecutionOperationListOfFunctionsBlueprintDynamicInputParentRef=N_,C.parallelExecutionOperationListOfFunctionsBlueprintDynamicOutput=V_,C.parallelExecutionOperationListOfFunctionsBlueprintDynamicOutputParentRef=P_,C.parallelExecutionOperationListOfFunctionsBlueprintParentRef=M_,C.parallelExecutionOperationRef=G_,C.parallelExecutionOperationRefThree=K_,C.persistedBuiltInBaseEntity=Jr,C.persistedBuiltInBaseEntityDatabaseProperty=Tl,C.persistedBuiltInBaseEntityDatabasePropertyDataType=vC,C.persistedBuiltInBaseEntityDatabasePropertyDataTypeRef=d7,C.persistedBuiltInBaseEntityDatabasePropertyParentRef=EC,C.persistedBuiltInBaseEntityDatabasePropertyRef=mC,C.persistedBuiltInBaseEntityPrimaryKeyProperty=bl,C.persistedBuiltInBaseEntityPrimaryKeyPropertyDataType=DC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyNumberDataTypeOption=bC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyNumberDataTypeOptionParentRef=TC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyParentRef=gC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyRef=_C,C.persistedBuiltInBaseEntityPrimaryKeyPropertyStringDataTypeOption=IC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyStringDataTypeOptionParentRef=AC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyUUIDDataTypeOption=RC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyUUIDDataTypeOptionParentRef=wC,C.processOutputGlobalValueDescriptorDataType=QC,C.processOutputGlobalValueDescriptorReturn=$f,C.processOutputGlobalValueDescriptorReturnRef=XC,C.projectPublicationCompletedGlobalEvent=gf,C.propertyToZodSchema=EP,C.propertyValidation=Hce,C.relationalDatabaseBuiltInBaseEntity=Br,C.relationalDatabaseBuiltInBaseEntityAutoscalingProperty=av,C.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyDataType=pC,C.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyDataTypeRef=cC,C.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyParentRef=fC,C.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyRef=uC,C.relationalDatabaseBuiltInBaseEntityDefaultProperty=nv,C.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataType=dC,C.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataTypeRef=oC,C.relationalDatabaseBuiltInBaseEntityDefaultPropertyRef=lC,C.relationalDatabaseBuiltInBaseEntityIdentifierProperty=Af,C.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataType=XO,C.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataTypeRef=zO,C.relationalDatabaseBuiltInBaseEntityIdentifierPropertyRef=HO,C.relationalDatabaseBuiltInBaseEntityMinSizeProperty=Rf,C.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataType=aC,C.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataTypeRef=sC,C.relationalDatabaseBuiltInBaseEntityMinSizePropertyRef=nC,C.relationalDatabaseBuiltInBaseEntityPasswordProperty=wf,C.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataType=rC,C.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataTypeRef=l7,C.relationalDatabaseBuiltInBaseEntityPasswordPropertyDefaultValueParentRef=iC,C.relationalDatabaseBuiltInBaseEntityPasswordPropertyRef=tC,C.relationalDatabaseBuiltInBaseEntityRef=El,C.relationalDatabaseBuiltInBaseEntityUsernameProperty=If,C.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataType=eC,C.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataTypeRef=o7,C.relationalDatabaseBuiltInBaseEntityUsernamePropertyRef=QO,C.resolveActionDescriptorName=ZL,C.resolveBaseEntityName=KL,C.resolveBuiltInBaseEntityDataTypeLabel=kL,C.resolveClonedEntityProject=yr,C.resolveConditionOperatorLabel=Zh,C.resolveDataType=kh,C.resolveDataTypeEntityOrNestedChildrenFromLiteralValue=Tb,C.resolveDataTypeLabel=Sh,C.resolveDefinitionEntityDataTypeLabel=Yce,C.resolveEntityDataTypeLabel=Wce,C.resolveEntityName=fe,C.resolveFirstCallsSecond=qhe,C.resolveFirstWritesSecond=She,C.resolvePersistedDefinitionEntityDatabaseEntity=yj,C.resolvePrimaryKeyProperty=lye,C.resolvePrimitiveEntityForSearchLiteralValueType=sb,C.resolvePrimitiveEntityName=SL,C.resolveSearchName=qL,C.resolveVariableScope=Jce,C.returnDeclarationValidation=upe,C.returnStatementValidation=cpe,C.searchStatementErrorGlobalValueDescriptor=pv,C.searchStatementErrorGlobalValueDescriptorDataType=tP,C.searchStatementErrorGlobalValueDescriptorRef=eP,C.searchStatementState=lhe,C.searchStatementUtils=uhe,C.searchValidation=bpe,C.sequentialExecutionOperation=Fn,C.sequentialExecutionOperationError=uD,C.sequentialExecutionOperationErrorParentRef=dD,C.sequentialExecutionOperationListOfExecutionResultsDataType=aD,C.sequentialExecutionOperationListOfExecutionResultsReturn=Um,C.sequentialExecutionOperationListOfExecutionResultsReturnParentRef=lD,C.sequentialExecutionOperationListOfExecutionResultsReturnRef=nD,C.sequentialExecutionOperationListOfFunctionsArgument=Bm,C.sequentialExecutionOperationListOfFunctionsArgumentDatatype=sD,C.sequentialExecutionOperationListOfFunctionsArgumentParentRef=oD,C.sequentialExecutionOperationListOfFunctionsArgumentRef=iD,C.sequentialExecutionOperationListOfFunctionsBlueprint=rD,C.sequentialExecutionOperationListOfFunctionsBlueprintDynamicInput=tD,C.sequentialExecutionOperationListOfFunctionsBlueprintDynamicOutput=eD,C.softDeletePersistedEntityMethod=u7,C.softDeletePersistedEntityMethodParentRef=$C,C.sortCallsBasedOnExecutionDependencies=EU,C.sortChildrenEntitiesBasedOnExecutionDependencies=Khe,C.splitListOperation=Cm,C.splitListOperationError=i_,C.splitListOperationErrorParentRef=r_,C.splitListOperationFirstOutputListDataType=ZR,C.splitListOperationFirstOutputListReturn=XR,C.splitListOperationFirstOutputListReturnParentRef=HR,C.splitListOperationFirstOutputListReturnRef=Om,C.splitListOperationInputListArgument=WR,C.splitListOperationInputListArgumentParentRef=JR,C.splitListOperationInputListArgumentRef=KR,C.splitListOperationInputListDataType=kR,C.splitListOperationSecondOutputListDataType=QR,C.splitListOperationSecondOutputListReturn=t_,C.splitListOperationSecondOutputListReturnParentRef=e_,C.splitListOperationSplitIndexArgument=zR,C.splitListOperationSplitIndexArgumentParentRef=YR,C.splitListOperationSplitIndexArgumentRef=qR,C.splitListOperationSplitIndexDataType=SR,C.splitStringOperation=gm,C.splitStringOperationError=IR,C.splitStringOperationErrorParentRef=AR,C.splitStringOperationFirstPartResultStringDataType=cR,C.splitStringOperationFirstPartResultStringReturn=bR,C.splitStringOperationFirstPartResultStringReturnParentRef=TR,C.splitStringOperationFirstPartResultStringReturnRef=uR,C.splitStringOperationIndexArgument=vR,C.splitStringOperationIndexArgumentParentRef=mR,C.splitStringOperationIndexArgumentRef=lR,C.splitStringOperationIndexDataType=dR,C.splitStringOperationSecondPartResultStringDataType=fR,C.splitStringOperationSecondPartResultStringReturn=n7,C.splitStringOperationSecondPartResultStringReturnParentRef=ER,C.splitStringOperationSecondPartResultStringReturnRef=pR,C.splitStringOperationStringArgument=yR,C.splitStringOperationStringArgumentParentRef=hR,C.splitStringOperationStringArgumentRef=aR,C.splitStringOperationStringDataType=oR,C.stringPrototype=ke,C.stringValueAutogenerationSchema=wE,C.suggestNewIdForEntity=UT,C.syncSearchEntityOutput=ab,C.test_primitive_entities_export=Hye,C.toCamelCase=Ra,C.toEntityState=ss,C.toKebabCase=GL,C.toLowerCaseKebabCase=qh,C.toPascalCase=Hl,C.untypedDataPrototype=Gr,C.updateErrorsList=qt,C.urlDefaultValue=FD,C.uuidPrototype=jn,C.validateArgumentDeclarationName=MT,C.validateCalledByErrorIdInAction=Ohe,C.validateCalledByIdInAction=$he,C.validateCallers=tU,C.validateConditionEntityDeclaration=Vhe,C.validateDataOperation=uo,C.validateDataOperationDataToValidateArgument=OD,C.validateDataOperationDataToValidateArgumentParentRef=$D,C.validateDataOperationDataToValidateArgumentRef=DD,C.validateDataOperationDataToValidateDataType=gD,C.validateDataOperationEntityToMatchTypeArgument=ND,C.validateDataOperationEntityToMatchTypeArgumentParentRef=VD,C.validateDataOperationEntityToMatchTypeArgumentRef=CD,C.validateDataOperationEntityToMatchTypeDataType=PD,C.validateDataOperationError=UD,C.validateDataOperationErrorParentRef=BD,C.validateDataOperationOutputEntityDeclaration=MD,C.validateDataOperationOutputEntityDeclarationParentRef=LD,C.validateDefinitionEntityName=PT,C.validateEntryCaller=eU,C.validateErrorCaller=Q3,C.validateFunctionCallDeclaration=iU,C.validateFunctionDeclarationName=VT,C.validateGeneratedEntityParentIsNotBuiltInEntity=Rhe,C.validateGeneration=Ihe,C.validateGenerationTarget=ur,C.validateGenerationUpdate=whe,C.validateLoopEntityDeclaration=Nhe,C.validateName=zce,C.validateOperationEntityDeclaration=sU,C.validatePropertyName=LT,C.validateReachability=ta,C.validateReadsValueInActionPayload=Che,C.validateReferenceObject=oy,C.validateReferenceToOne=db,C.validateReferences=Cr,C.validateReturnDeclarationName=BT,C.validateSuccessCaller=X3,C.validateValueReaderGenerationUpdate=Qc,C.validateValueWritter=yb,C.validateVariableDeclarationName=NT,C.validateVariableInternalCallUse=mb,C.valueAutogenerationCurrentDateAndTimeSchema=Q4,C.valueAutogenerationGenericSchema=mh,C.valueAutogenerationOptions=DE,C.valueAutogenerationOptionsSchema=X4,C.valueAutogenerationRandomBooleanSchema=IE,C.valueAutogenerationRandomDateBetweenSchema=lN,C.valueAutogenerationRandomDateFromSchema=aN,C.valueAutogenerationRandomDateSchema=Th,C.valueAutogenerationRandomDateUntilSchema=oN,C.valueAutogenerationRandomNumberBetweenSchema=rN,C.valueAutogenerationRandomNumberFromSchema=eN,C.valueAutogenerationRandomNumberSchema=vh,C.valueAutogenerationRandomNumberUntilSchema=tN,C.valueAutogenerationRandomSchema=Mu,C.valueAutogenerationRandomTextBetweenSchema=nN,C.valueAutogenerationRandomTextFromSchema=iN,C.valueAutogenerationRandomTextSchema=Eh,C.valueAutogenerationRandomTextUntilSchema=sN,C.valueAutogenerationRangeValueTypesSchema=Lu,C.valueAutogenerationUniqueSchema=AE,C.valueDescriptorValidation=Ahe,C.variableDeclarationValidation=Epe,C.variableInstanceValidation=Tpe,C.waitOperation=mi,C.waitOperationMillisecondsNumberArgument=oo,C.waitOperationMillisecondsNumberArgumentRef=J_,C.waitOperationMillisecondsNumberDataType=W_,C.waitOperationOperationError=H_,C.waitOperationOperationErrorParentRef=z_,C.waitOperationRef=Y_,Object.defineProperty(C,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.6321",
3
+ "version": "0.0.6323",
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",