@elyx-code/project-logic-tree 0.0.6979 → 0.0.6980

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -84559,9 +84559,13 @@ const Bi = class Bi extends an {
84559
84559
  let e = r;
84560
84560
  if (i.parent) {
84561
84561
  const N = te(i.parent);
84562
- e = r.get(N);
84562
+ e = r.get(
84563
+ N
84564
+ );
84563
84565
  }
84564
- const f = te(i.declaration), h = r.get(
84566
+ const f = te(
84567
+ i.declaration
84568
+ ), h = r.get(
84565
84569
  f
84566
84570
  ), m = (i.calledByEntry || []).map((N) => {
84567
84571
  const V = te(N);
@@ -84618,7 +84622,10 @@ const Bi = class Bi extends an {
84618
84622
  {
84619
84623
  parent: {
84620
84624
  list: !1,
84621
- types: [...Vr, d.Project],
84625
+ types: [
84626
+ ...Vr,
84627
+ d.Project
84628
+ ],
84622
84629
  optional: !0
84623
84630
  }
84624
84631
  // calledByEntry: {
@@ -84644,7 +84651,10 @@ const Bi = class Bi extends an {
84644
84651
  const h = sn(
84645
84652
  a
84646
84653
  );
84647
- e.push(...f.errors, ...h.errors), c.push(...h.explanations);
84654
+ e.push(
84655
+ ...f.errors,
84656
+ ...h.errors
84657
+ ), c.push(...h.explanations);
84648
84658
  const m = te(
84649
84659
  a.declaration
84650
84660
  );
@@ -84657,7 +84667,9 @@ const Bi = class Bi extends an {
84657
84667
  } else {
84658
84668
  const b = r.functions.length ? `
84659
84669
  All global 'function-declaration' entity ids are:
84660
- - ${r.functions.map((E) => `${E.id} (${ue(E, r)})`).join(`
84670
+ - ${r.functions.map(
84671
+ (E) => `${E.id} (${ue(E, r)})`
84672
+ ).join(`
84661
84673
  - `)}.` : `
84662
84674
  The project currently has no global 'function-declaration' entities that can be called as 'function-call' entities.`;
84663
84675
  e.push(
@@ -84717,9 +84729,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
84717
84729
  const h = f.entity.afterAllChildrenInitialized(i);
84718
84730
  r.push(...h.updated), a.push(...h.added), c.push(...h.removed), e.push(...h.affected);
84719
84731
  }), i == null || i.attemptAutoclose("sync-dependents", this.id), {
84720
- updated: C(r),
84721
- added: C(a),
84722
- removed: C(c),
84732
+ updated: C(
84733
+ r
84734
+ ),
84735
+ added: C(
84736
+ a
84737
+ ),
84738
+ removed: C(
84739
+ c
84740
+ ),
84723
84741
  affected: C(
84724
84742
  e
84725
84743
  ),
@@ -84747,9 +84765,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
84747
84765
  c.push(...m), e.push(...b), f.push(...E);
84748
84766
  }
84749
84767
  return {
84750
- updated: C(c),
84751
- added: C(e),
84752
- removed: C(f),
84768
+ updated: C(
84769
+ c
84770
+ ),
84771
+ added: C(
84772
+ e
84773
+ ),
84774
+ removed: C(
84775
+ f
84776
+ ),
84753
84777
  affected: C(
84754
84778
  h
84755
84779
  ),
@@ -84777,9 +84801,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
84777
84801
  c.push(...m), e.push(...b), f.push(...E);
84778
84802
  }
84779
84803
  return {
84780
- updated: C(c),
84781
- added: C(e),
84782
- removed: C(f),
84804
+ updated: C(
84805
+ c
84806
+ ),
84807
+ added: C(
84808
+ e
84809
+ ),
84810
+ removed: C(
84811
+ f
84812
+ ),
84783
84813
  affected: C(
84784
84814
  h
84785
84815
  ),
@@ -84857,7 +84887,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
84857
84887
  return this.knownVersions = this.knownVersions ? this.knownVersions.set(this.version, i) : (/* @__PURE__ */ new Map()).set(this.version, i), this.apply(i), this;
84858
84888
  }
84859
84889
  snapshot() {
84860
- const i = new Bi(this, this.project);
84890
+ const i = new Bi(
84891
+ this,
84892
+ this.project
84893
+ );
84861
84894
  return this.apply(i);
84862
84895
  }
84863
84896
  /**
@@ -84880,9 +84913,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
84880
84913
  r.push(this.parent, ...f.updated), a.push(...f.added), c.push(...f.removed);
84881
84914
  }
84882
84915
  return {
84883
- updated: C(r),
84884
- added: C(a),
84885
- removed: C(c),
84916
+ updated: C(
84917
+ r
84918
+ ),
84919
+ added: C(
84920
+ a
84921
+ ),
84922
+ removed: C(
84923
+ c
84924
+ ),
84886
84925
  affected: C(
84887
84926
  e
84888
84927
  ),
@@ -84905,7 +84944,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
84905
84944
  updated: C(
84906
84945
  a
84907
84946
  ),
84908
- added: C(c),
84947
+ added: C(
84948
+ c
84949
+ ),
84909
84950
  removed: C(
84910
84951
  e
84911
84952
  ),
@@ -84941,9 +84982,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
84941
84982
  );
84942
84983
  }
84943
84984
  return this.metaSync(h.toShallowJSON(), null), this.previousVersion = h.previousVersion, this.version = h.version, this.createdAt = h.createdAt, this.author = h.author, this.deleted = h.deleted, this.inputs = [...h.inputs], this.outputs = [...h.outputs], this.error = h.error, this.successCalls = [...h.successCalls], this.errorCalls = [...h.errorCalls], this.declaration = h.declaration, this.calledBySuccess = [...h.calledBySuccess], this.calledByError = [...h.calledByError], this.calledByEntry = [...h.calledByEntry], this.writesValues = [...h.writesValues], this.parent = h.parent, {
84944
- updated: C(a),
84945
- added: C(c),
84946
- removed: C(e),
84985
+ updated: C(
84986
+ a
84987
+ ),
84988
+ added: C(
84989
+ c
84990
+ ),
84991
+ removed: C(
84992
+ e
84993
+ ),
84947
84994
  affected: C(
84948
84995
  f
84949
84996
  ),
@@ -84982,7 +85029,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
84982
85029
  throw r == null || r.attemptAutoclose(
84983
85030
  D.UpdateWithShallowTransfer,
84984
85031
  this.id
84985
- ), new Error(`${this.type} with id '${this.id}' must have a 'parent'`);
85032
+ ), new Error(
85033
+ `${this.type} with id '${this.id}' must have a 'parent'`
85034
+ );
84986
85035
  if (i.declaration) {
84987
85036
  const a = te(
84988
85037
  i.declaration
@@ -84992,7 +85041,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
84992
85041
  c && this.setDeclaration(c);
84993
85042
  }
84994
85043
  return i.calledByEntry.forEach((a) => {
84995
- const c = te(a), e = this.project.get(c);
85044
+ const c = te(a), e = this.project.get(
85045
+ c
85046
+ );
84996
85047
  e && (this.addEntryCaller(e, r), e.addCall(this, r));
84997
85048
  }), [...this.calledByEntry].forEach((a) => {
84998
85049
  i.calledByEntry.find(
@@ -85031,7 +85082,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85031
85082
  (e) => te(e) === a.id
85032
85083
  ) || (this.removeInput(a, r), a.removeFromParent(r));
85033
85084
  }), i.writesValues.forEach((a) => {
85034
- const c = te(a), e = this.project.get(c);
85085
+ const c = te(a), e = this.project.get(
85086
+ c
85087
+ );
85035
85088
  e && (this.addValueReader(e, r), e.setValueWriter(this, r));
85036
85089
  }), [...this.writesValues].forEach((a) => {
85037
85090
  i.writesValues.find(
@@ -85086,7 +85139,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85086
85139
  );
85087
85140
  }
85088
85141
  return (a = i.calledByEntry) == null || a.forEach((f) => {
85089
- const h = te(f), m = this.project.get(h);
85142
+ const h = te(f), m = this.project.get(
85143
+ h
85144
+ );
85090
85145
  if (m)
85091
85146
  this.addEntryCaller(m, r), m.addCall(this, r);
85092
85147
  else
@@ -85146,7 +85201,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85146
85201
  `${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`
85147
85202
  );
85148
85203
  } else
85149
- throw new Error(`${this.type} with id '${this.id}' must have a 'parent'`);
85204
+ throw new Error(
85205
+ `${this.type} with id '${this.id}' must have a 'parent'`
85206
+ );
85150
85207
  if (this.initialData.declaration) {
85151
85208
  const e = te(
85152
85209
  this.initialData.declaration
@@ -85156,7 +85213,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85156
85213
  f && (this.setDeclaration(f), i.push(f));
85157
85214
  }
85158
85215
  return this.initialData.calledByEntry.forEach((e) => {
85159
- const f = te(e), h = this.project.get(f);
85216
+ const f = te(e), h = this.project.get(
85217
+ f
85218
+ );
85160
85219
  h && this.addEntryCaller(h, null);
85161
85220
  }), this.initialData.calledBySuccess.forEach((e) => {
85162
85221
  const f = te(e), h = this.project.get(
@@ -85169,9 +85228,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85169
85228
  );
85170
85229
  h && this.addErrorCaller(h, null);
85171
85230
  }), {
85172
- updated: C(i),
85173
- added: C(r),
85174
- removed: C(a),
85231
+ updated: C(
85232
+ i
85233
+ ),
85234
+ added: C(
85235
+ r
85236
+ ),
85237
+ removed: C(
85238
+ a
85239
+ ),
85175
85240
  affected: C(
85176
85241
  c
85177
85242
  ),
@@ -85212,13 +85277,24 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85212
85277
  added: E,
85213
85278
  removed: A
85214
85279
  } = this.syncOutputs(i);
85215
- return r.push(...f, ...b), a.push(...h, ...E), c.push(...m, ...A), i == null || i.attemptAutoclose(
85280
+ return r.push(...f, ...b), a.push(...h, ...E), c.push(...m, ...A), this.errorCalls.length && !this.catchesError && this.metaSync(
85281
+ {
85282
+ catchesError: !1
85283
+ },
85284
+ i
85285
+ ), i == null || i.attemptAutoclose(
85216
85286
  D.AfterAllChildrenInitialized,
85217
85287
  this.id
85218
85288
  ), {
85219
- updated: C(r),
85220
- added: C(a),
85221
- removed: C(c),
85289
+ updated: C(
85290
+ r
85291
+ ),
85292
+ added: C(
85293
+ a
85294
+ ),
85295
+ removed: C(
85296
+ c
85297
+ ),
85222
85298
  affected: C(
85223
85299
  e
85224
85300
  ),
@@ -85248,9 +85324,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85248
85324
  }), this.calledByEntry.forEach((f) => {
85249
85325
  f.addCall(this, i), r.push(f);
85250
85326
  }), this.subscribe(), this.subscribeToDependencies(), i == null || i.attemptAutoclose("add-self-to-project", this.id), {
85251
- updated: C(r),
85252
- added: C(a),
85253
- removed: C(c),
85327
+ updated: C(
85328
+ r
85329
+ ),
85330
+ added: C(
85331
+ a
85332
+ ),
85333
+ removed: C(
85334
+ c
85335
+ ),
85254
85336
  affected: C(
85255
85337
  e
85256
85338
  ),
@@ -85278,7 +85360,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85278
85360
  if (!this.checkCanEdit(this, r))
85279
85361
  return ce.warn(
85280
85362
  `[removeInput] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
85281
- ), r == null || r.attemptAutoclose(D.RemoveInput, this.id), this;
85363
+ ), r == null || r.attemptAutoclose(
85364
+ D.RemoveInput,
85365
+ this.id
85366
+ ), this;
85282
85367
  const a = this.inputs.findIndex((c) => c.id === i.id);
85283
85368
  return a > -1 && (this.inputs.splice(a, 1), r && (r == null || r.add(this, W.Affected))), r == null || r.attemptAutoclose(D.RemoveInput, this.id), this;
85284
85369
  }
@@ -85324,7 +85409,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85324
85409
  return ce.warn(
85325
85410
  `[removeOutput] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
85326
85411
  ), r == null || r.attemptAutoclose("remove-output", this.id), this;
85327
- const a = this.outputs.findIndex((c) => c.id === i.id);
85412
+ const a = this.outputs.findIndex(
85413
+ (c) => c.id === i.id
85414
+ );
85328
85415
  return a > -1 && (this.outputs.splice(a, 1), r && (r == null || r.add(this, W.Affected))), r == null || r.attemptAutoclose("remove-output", this.id), this;
85329
85416
  }
85330
85417
  // Subscribes one given entity as one of entity's writesValues
@@ -85360,7 +85447,13 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85360
85447
  counterpart: this,
85361
85448
  errorReason: Be.ValueReadingOverridesConstantVariable,
85362
85449
  rootAction: !1
85363
- }), r == null || r.attemptAutoclose(D.AddValueReader, this.id), this) : this.writesValues.includes(i) ? (r == null || r.attemptAutoclose(D.AddValueReader, this.id), this) : (this.writesValues.push(i), r == null || r.add(this, W.Affected), this);
85450
+ }), r == null || r.attemptAutoclose(
85451
+ D.AddValueReader,
85452
+ this.id
85453
+ ), this) : this.writesValues.includes(i) ? (r == null || r.attemptAutoclose(
85454
+ D.AddValueReader,
85455
+ this.id
85456
+ ), this) : (this.writesValues.push(i), r == null || r.add(this, W.Affected), this);
85364
85457
  }
85365
85458
  removeValueReader(i, r = this.project.addChangeSet(
85366
85459
  new Z(
@@ -85406,7 +85499,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85406
85499
  owner: this,
85407
85500
  errorReason: Be.CannotSuccessCallItself,
85408
85501
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddSuccessCaller
85409
- })), this.calledBySuccess.find((e) => e.id === i.id) || (this.calledBySuccess.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddSuccessCaller, this.id), this) : this;
85502
+ })), this.calledBySuccess.find((e) => e.id === i.id) || (this.calledBySuccess.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
85503
+ D.AddSuccessCaller,
85504
+ this.id
85505
+ ), this) : this;
85410
85506
  }
85411
85507
  addErrorCaller(i, r = this.project.addChangeSet(
85412
85508
  new Z(
@@ -85430,7 +85526,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85430
85526
  owner: this,
85431
85527
  errorReason: Be.CannotErrorCallItself,
85432
85528
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddErrorCaller
85433
- })), this.calledByError.find((e) => e.id === i.id) || (this.calledByError.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddErrorCaller, this.id), this) : this;
85529
+ })), this.calledByError.find((e) => e.id === i.id) || (this.calledByError.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
85530
+ D.AddErrorCaller,
85531
+ this.id
85532
+ ), this) : this;
85434
85533
  }
85435
85534
  addEntryCaller(i, r = this.project.addChangeSet(
85436
85535
  new Z(
@@ -85454,7 +85553,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85454
85553
  owner: this,
85455
85554
  errorReason: Be.CannotEntryCallItself,
85456
85555
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddEntryCaller
85457
- })), this.calledByEntry.find((e) => e.id === i.id) || (this.calledByEntry.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddEntryCaller, this.id), this) : this;
85556
+ })), this.calledByEntry.find((e) => e.id === i.id) || (this.calledByEntry.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
85557
+ D.AddEntryCaller,
85558
+ this.id
85559
+ ), this) : this;
85458
85560
  }
85459
85561
  addErrorCall(i, r = this.project.addChangeSet(
85460
85562
  new Z(
@@ -85502,7 +85604,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85502
85604
  owner: this,
85503
85605
  errorReason: Be.CannotSuccessCallItself,
85504
85606
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddSuccessCaller
85505
- })), this.successCalls.find((e) => e.id === i.id) || (this.successCalls.push(i), a && Rt(this, r), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(D.AddSuccessCall, this.id), this) : this;
85607
+ })), this.successCalls.find((e) => e.id === i.id) || (this.successCalls.push(i), a && Rt(this, r), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(
85608
+ D.AddSuccessCall,
85609
+ this.id
85610
+ ), this) : this;
85506
85611
  }
85507
85612
  removeCall(i, r = this.project.addChangeSet(
85508
85613
  new Z(
@@ -85561,9 +85666,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85561
85666
  if (!this.checkCanEdit(this, r))
85562
85667
  return ce.warn(
85563
85668
  `[setError] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
85564
- ), r == null || r.attemptAutoclose(D.SetErrorEntity, this.id), this;
85669
+ ), r == null || r.attemptAutoclose(
85670
+ D.SetErrorEntity,
85671
+ this.id
85672
+ ), this;
85565
85673
  const a = this.error;
85566
- return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.error = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(D.SetErrorEntity, this.id), this;
85674
+ return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.error = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(
85675
+ D.SetErrorEntity,
85676
+ this.id
85677
+ ), this;
85567
85678
  }
85568
85679
  setParent(i, r = this.project.addChangeSet(
85569
85680
  new Z(
@@ -85617,9 +85728,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85617
85728
  r,
85618
85729
  this.project
85619
85730
  );
85620
- if (a.addSuccessCaller(this, null), [d.BreakStatement, d.ContinueStatement].includes(
85621
- a.type
85622
- ))
85731
+ if (a.addSuccessCaller(this, null), [
85732
+ d.BreakStatement,
85733
+ d.ContinueStatement
85734
+ ].includes(a.type))
85623
85735
  a.setParent(
85624
85736
  this.parent.parent,
85625
85737
  null
@@ -85638,9 +85750,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85638
85750
  r,
85639
85751
  this.project
85640
85752
  );
85641
- if (a.addErrorCaller(this, null), [d.BreakStatement, d.ContinueStatement].includes(
85642
- a.type
85643
- ))
85753
+ if (a.addErrorCaller(this, null), [
85754
+ d.BreakStatement,
85755
+ d.ContinueStatement
85756
+ ].includes(a.type))
85644
85757
  a.setParent(
85645
85758
  this.parent.parent,
85646
85759
  null
@@ -85754,10 +85867,19 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85754
85867
  self: this
85755
85868
  };
85756
85869
  const r = [], a = [], c = [], e = [];
85757
- return this.parent.type === d.Project ? (this.parent.removeFunctionCall(this), e.push(this.parent)) : this.parent.detachedChildren.includes(this) && this.parent.unsubscribeDetachedChild(this), i == null || i.attemptAutoclose(D.RemoveFromParent, this.id), {
85758
- added: C(c),
85759
- updated: C(r),
85760
- removed: C(a),
85870
+ return this.parent.type === d.Project ? (this.parent.removeFunctionCall(this), e.push(this.parent)) : this.parent.detachedChildren.includes(this) && this.parent.unsubscribeDetachedChild(this), i == null || i.attemptAutoclose(
85871
+ D.RemoveFromParent,
85872
+ this.id
85873
+ ), {
85874
+ added: C(
85875
+ c
85876
+ ),
85877
+ updated: C(
85878
+ r
85879
+ ),
85880
+ removed: C(
85881
+ a
85882
+ ),
85761
85883
  affected: C(
85762
85884
  e
85763
85885
  ),
@@ -85791,7 +85913,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85791
85913
  owner: this,
85792
85914
  errorReason: Be.ActionOwnerEntityNonDeletable,
85793
85915
  rootAction: ((h = r == null ? void 0 : r.self) == null ? void 0 : h.id) === this.id && (r == null ? void 0 : r.actionName) === D.RemoveEntity
85794
- }), r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
85916
+ }), r == null || r.attemptAutoclose(
85917
+ D.RemoveEntity,
85918
+ this.id
85919
+ ), {
85795
85920
  added: [],
85796
85921
  updated: [],
85797
85922
  removed: [],
@@ -85800,7 +85925,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85800
85925
  };
85801
85926
  const a = [], c = [], e = [], f = [];
85802
85927
  if (r != null && r.hasRemoved(this.id))
85803
- return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
85928
+ return r == null || r.attemptAutoclose(
85929
+ D.RemoveEntity,
85930
+ this.id
85931
+ ), {
85804
85932
  added: [],
85805
85933
  updated: [],
85806
85934
  removed: [],
@@ -85854,9 +85982,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85854
85982
  });
85855
85983
  }
85856
85984
  return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
85857
- added: C(e),
85858
- updated: C(a),
85859
- removed: C(c),
85985
+ added: C(
85986
+ e
85987
+ ),
85988
+ updated: C(
85989
+ a
85990
+ ),
85991
+ removed: C(
85992
+ c
85993
+ ),
85860
85994
  affected: C(
85861
85995
  f
85862
85996
  ),
@@ -85879,9 +86013,27 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85879
86013
  if (!this.checkCanEdit(this, i))
85880
86014
  return ce.warn(
85881
86015
  `[restore] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
85882
- ), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), { added: [], updated: [], removed: [], affected: [], self: this };
86016
+ ), i == null || i.attemptAutoclose(
86017
+ D.RestoreEntity,
86018
+ this.id
86019
+ ), {
86020
+ added: [],
86021
+ updated: [],
86022
+ removed: [],
86023
+ affected: [],
86024
+ self: this
86025
+ };
85883
86026
  const r = [], a = [], c = [], e = [];
85884
- return i != null && i.hasAdded(this.id) ? (i == null || i.attemptAutoclose(D.RestoreEntity, this.id), { added: [], updated: [], removed: [], affected: [], self: this }) : (this.subscribe(), this.project.unsubscribeDeletedInstance(this), this.metaSync({ deleted: !1 }, i), Object.values(this.detachedDependents).forEach((f) => {
86027
+ return i != null && i.hasAdded(this.id) ? (i == null || i.attemptAutoclose(
86028
+ D.RestoreEntity,
86029
+ this.id
86030
+ ), {
86031
+ added: [],
86032
+ updated: [],
86033
+ removed: [],
86034
+ affected: [],
86035
+ self: this
86036
+ }) : (this.subscribe(), this.project.unsubscribeDeletedInstance(this), this.metaSync({ deleted: !1 }, i), Object.values(this.detachedDependents).forEach((f) => {
85885
86037
  const {
85886
86038
  updated: h,
85887
86039
  removed: m,
@@ -85909,9 +86061,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85909
86061
  }), this.calledByEntry.forEach((f) => {
85910
86062
  a.push(f), f.addCall(this, i);
85911
86063
  }), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), {
85912
- added: C(r),
85913
- updated: C(a),
85914
- removed: C(c),
86064
+ added: C(
86065
+ r
86066
+ ),
86067
+ updated: C(
86068
+ a
86069
+ ),
86070
+ removed: C(
86071
+ c
86072
+ ),
85915
86073
  affected: C(
85916
86074
  e
85917
86075
  ),
@@ -85921,10 +86079,14 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85921
86079
  toFlat(i = /* @__PURE__ */ new Set()) {
85922
86080
  return i.has(this.id) ? [] : (i.add(this.id), [
85923
86081
  this,
85924
- ...this.successCalls.flatMap((a) => a.toFlat(i)),
86082
+ ...this.successCalls.flatMap(
86083
+ (a) => a.toFlat(i)
86084
+ ),
85925
86085
  ...this.errorCalls.flatMap((a) => a.toFlat(i)),
85926
86086
  ...this.inputs.flatMap((a) => a.toFlat(i)),
85927
- ...this.outputs.flatMap((a) => a.toFlat(i)),
86087
+ ...this.outputs.flatMap(
86088
+ (a) => a.toFlat(i)
86089
+ ),
85928
86090
  ...this.error ? this.error.toFlat(i) : [],
85929
86091
  ...this.calledBy.flatMap((a) => a.toFlat(i))
85930
86092
  ]);
@@ -85932,10 +86094,16 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85932
86094
  toFlatIds(i = /* @__PURE__ */ new Set()) {
85933
86095
  return i.has(this.id) ? [] : (i.add(this.id), [
85934
86096
  this.id,
85935
- ...this.successCalls.flatMap((a) => a.toFlatIds(i)),
85936
- ...this.errorCalls.flatMap((a) => a.toFlatIds(i)),
86097
+ ...this.successCalls.flatMap(
86098
+ (a) => a.toFlatIds(i)
86099
+ ),
86100
+ ...this.errorCalls.flatMap(
86101
+ (a) => a.toFlatIds(i)
86102
+ ),
85937
86103
  ...this.inputs.flatMap((a) => a.toFlatIds(i)),
85938
- ...this.outputs.flatMap((a) => a.toFlatIds(i)),
86104
+ ...this.outputs.flatMap(
86105
+ (a) => a.toFlatIds(i)
86106
+ ),
85939
86107
  ...this.error ? this.error.toFlatIds(i) : []
85940
86108
  ]);
85941
86109
  }
@@ -85979,8 +86147,12 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85979
86147
  calledBySuccess: this.calledBySuccess.map(
85980
86148
  (a) => a.toReference()
85981
86149
  ),
85982
- calledByError: this.calledByError.map((a) => a.toReference()),
85983
- calledByEntry: this.calledByEntry.map((a) => a.toReference()),
86150
+ calledByError: this.calledByError.map(
86151
+ (a) => a.toReference()
86152
+ ),
86153
+ calledByEntry: this.calledByEntry.map(
86154
+ (a) => a.toReference()
86155
+ ),
85984
86156
  writesValues: this.writesValues.map(
85985
86157
  (a) => a.toJSON(i)
85986
86158
  ),
@@ -85998,7 +86170,11 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85998
86170
  toJSONClone(i = lt) {
85999
86171
  var a, c, e, f, h, m;
86000
86172
  let r;
86001
- return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || fn(this, this.project, i.uuidStrategy), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
86173
+ return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || fn(
86174
+ this,
86175
+ this.project,
86176
+ i.uuidStrategy
86177
+ ), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
86002
86178
  id: r,
86003
86179
  version: x.UUID.uuid(),
86004
86180
  createdAt: i.timestamp || G().toISOString(),
@@ -86035,7 +86211,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86035
86211
  calledByEntry: this.calledByEntry.map(
86036
86212
  (b) => b.toReference({ seenEntityMaps: i.seenEntityMaps })
86037
86213
  ),
86038
- declaration: this.declaration.toJSONClone({ ...i, newId: null }),
86214
+ declaration: this.declaration.toJSONClone({
86215
+ ...i,
86216
+ newId: null
86217
+ }),
86039
86218
  inputs: this.inputs.map(
86040
86219
  (b) => b.toJSONClone({ ...i, newId: null })
86041
86220
  ),
@@ -86082,12 +86261,16 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86082
86261
  (c) => c.toReference(i)
86083
86262
  ),
86084
86263
  inputs: this.inputs.map((c) => c.toReference(i)),
86085
- outputs: this.outputs.map((c) => c.toReference(i)),
86264
+ outputs: this.outputs.map(
86265
+ (c) => c.toReference(i)
86266
+ ),
86086
86267
  declaration: this.declaration.toReference(i),
86087
86268
  successCalls: this.successCalls.map(
86088
86269
  (c) => c.toReference(i)
86089
86270
  ),
86090
- errorCalls: this.errorCalls.map((c) => c.toReference(i)),
86271
+ errorCalls: this.errorCalls.map(
86272
+ (c) => c.toReference(i)
86273
+ ),
86091
86274
  calledBySuccess: this.calledBySuccess.map(
86092
86275
  (c) => c.toReference(i)
86093
86276
  ),
@@ -86104,8 +86287,12 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86104
86287
  toFlatJSON(i = /* @__PURE__ */ new Set()) {
86105
86288
  return i.has(this.id) ? [] : (i.add(this.id), [
86106
86289
  this.toShallowJSON(),
86107
- ...this.successCalls.flatMap((a) => a.toFlatJSON(i)),
86108
- ...this.errorCalls.flatMap((a) => a.toFlatJSON(i)),
86290
+ ...this.successCalls.flatMap(
86291
+ (a) => a.toFlatJSON(i)
86292
+ ),
86293
+ ...this.errorCalls.flatMap(
86294
+ (a) => a.toFlatJSON(i)
86295
+ ),
86109
86296
  ...this.inputs.flatMap((a) => a.toFlatJSON(i)),
86110
86297
  ...this.outputs.flatMap(
86111
86298
  (a) => a.toFlatJSON(i)
@@ -86255,7 +86442,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86255
86442
  return b.id === ((E = h.declaration) == null ? void 0 : E.id);
86256
86443
  }
86257
86444
  )) {
86258
- const b = h.remove({ ignoreUpstream: !1 }, i);
86445
+ const b = h.remove(
86446
+ { ignoreUpstream: !1 },
86447
+ i
86448
+ );
86259
86449
  c.push(...b.removed), r.push(...b.updated);
86260
86450
  }
86261
86451
  }), this.inputs.filter((h, m) => {
@@ -86273,9 +86463,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86273
86463
  D.RemoveUnrecognizedInputs,
86274
86464
  this.id
86275
86465
  ), {
86276
- updated: C(r),
86277
- added: C(a),
86278
- removed: C(c),
86466
+ updated: C(
86467
+ r
86468
+ ),
86469
+ added: C(
86470
+ a
86471
+ ),
86472
+ removed: C(
86473
+ c
86474
+ ),
86279
86475
  affected: C(
86280
86476
  e
86281
86477
  ),
@@ -86315,7 +86511,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86315
86511
  return _.id === ((N = E.declaration) == null ? void 0 : N.id);
86316
86512
  }
86317
86513
  )) {
86318
- const _ = E.remove({ ignoreUpstream: !1 }, i);
86514
+ const _ = E.remove(
86515
+ { ignoreUpstream: !1 },
86516
+ i
86517
+ );
86319
86518
  c.push(..._.removed), r.push(..._.updated);
86320
86519
  }
86321
86520
  }), this.outputs.filter((E, A) => {
@@ -86333,9 +86532,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86333
86532
  D.RemoveUnrecognizedOutputs,
86334
86533
  this.id
86335
86534
  ), {
86336
- updated: C(r),
86337
- added: C(a),
86338
- removed: C(c),
86535
+ updated: C(
86536
+ r
86537
+ ),
86538
+ added: C(
86539
+ a
86540
+ ),
86541
+ removed: C(
86542
+ c
86543
+ ),
86339
86544
  affected: C(
86340
86545
  e
86341
86546
  ),
@@ -86357,7 +86562,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86357
86562
  if (!this.checkCanEdit(this, i))
86358
86563
  return ce.warn(
86359
86564
  `[syncInputs] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
86360
- ), i == null || i.attemptAutoclose(D.SyncInputs, this.id), {
86565
+ ), i == null || i.attemptAutoclose(
86566
+ D.SyncInputs,
86567
+ this.id
86568
+ ), {
86361
86569
  updated: [],
86362
86570
  added: [],
86363
86571
  removed: [],
@@ -86412,9 +86620,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86412
86620
  } = E.afterAllChildrenInitialized(i);
86413
86621
  r.push(...A), a.push(..._), c.push(...N);
86414
86622
  }), this.inputs.sort((E, A) => E.index - A.index), i == null || i.attemptAutoclose(D.SyncInputs, this.id), {
86415
- updated: C(r),
86416
- added: C(a),
86417
- removed: C(c),
86623
+ updated: C(
86624
+ r
86625
+ ),
86626
+ added: C(
86627
+ a
86628
+ ),
86629
+ removed: C(
86630
+ c
86631
+ ),
86418
86632
  affected: C(
86419
86633
  e
86420
86634
  ),
@@ -86439,7 +86653,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86439
86653
  if (!this.checkCanEdit(this, i))
86440
86654
  return ce.warn(
86441
86655
  `[syncOutputs] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
86442
- ), i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
86656
+ ), i == null || i.attemptAutoclose(
86657
+ D.SyncOutputs,
86658
+ this.id
86659
+ ), {
86443
86660
  updated: [],
86444
86661
  added: [],
86445
86662
  removed: [],
@@ -86489,7 +86706,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86489
86706
  });
86490
86707
  }
86491
86708
  } else
86492
- return i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
86709
+ return i == null || i.attemptAutoclose(
86710
+ D.SyncOutputs,
86711
+ this.id
86712
+ ), {
86493
86713
  added: [],
86494
86714
  updated: [],
86495
86715
  removed: [],
@@ -86497,7 +86717,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86497
86717
  self: this
86498
86718
  };
86499
86719
  else
86500
- return i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
86720
+ return i == null || i.attemptAutoclose(
86721
+ D.SyncOutputs,
86722
+ this.id
86723
+ ), {
86501
86724
  added: [],
86502
86725
  updated: [],
86503
86726
  removed: [],
@@ -86517,9 +86740,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86517
86740
  } = E.afterAllChildrenInitialized(i);
86518
86741
  r.push(...A), a.push(..._), c.push(...N);
86519
86742
  }), this.outputs.sort((E, A) => E.index - A.index), i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
86520
- updated: C(r),
86521
- added: C(a),
86522
- removed: C(c),
86743
+ updated: C(
86744
+ r
86745
+ ),
86746
+ added: C(
86747
+ a
86748
+ ),
86749
+ removed: C(
86750
+ c
86751
+ ),
86523
86752
  affected: C(
86524
86753
  e
86525
86754
  ),
@@ -89520,9 +89749,13 @@ const Ii = class Ii extends an {
89520
89749
  let e = r;
89521
89750
  if (i.parent) {
89522
89751
  const N = te(i.parent);
89523
- e = r.get(N);
89752
+ e = r.get(
89753
+ N
89754
+ );
89524
89755
  }
89525
- const f = te(i.declaration), h = r.get(
89756
+ const f = te(
89757
+ i.declaration
89758
+ ), h = r.get(
89526
89759
  f
89527
89760
  ), m = (i.calledByEntry || []).map((N) => {
89528
89761
  const V = te(N);
@@ -89579,7 +89812,10 @@ const Ii = class Ii extends an {
89579
89812
  {
89580
89813
  parent: {
89581
89814
  list: !1,
89582
- types: [...Vr, d.Project],
89815
+ types: [
89816
+ ...Vr,
89817
+ d.Project
89818
+ ],
89583
89819
  optional: !0
89584
89820
  }
89585
89821
  // calledByEntry: {
@@ -89605,7 +89841,10 @@ const Ii = class Ii extends an {
89605
89841
  const h = sn(
89606
89842
  a
89607
89843
  );
89608
- if (e.push(...f.errors, ...h.errors), c.push(...h.explanations), !i.declaration)
89844
+ if (e.push(
89845
+ ...f.errors,
89846
+ ...h.errors
89847
+ ), c.push(...h.explanations), !i.declaration)
89609
89848
  e.push(
89610
89849
  new De({
89611
89850
  id: `${i.id}--${Ce.InvalidObjectStructure}`,
@@ -89645,7 +89884,9 @@ References can either be an ID string or an object with exacly four properties:
89645
89884
  })
89646
89885
  ), c.push({
89647
89886
  id: er.AllOperationActionDescriptors,
89648
- message: VC(r)
89887
+ message: VC(
89888
+ r
89889
+ )
89649
89890
  });
89650
89891
  }
89651
89892
  }
@@ -89696,9 +89937,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
89696
89937
  const h = f.entity.afterAllChildrenInitialized(i);
89697
89938
  r.push(...h.updated), a.push(...h.added), c.push(...h.removed), e.push(...h.affected);
89698
89939
  }), i == null || i.attemptAutoclose("sync-dependents", this.id), {
89699
- updated: C(r),
89700
- added: C(a),
89701
- removed: C(c),
89940
+ updated: C(
89941
+ r
89942
+ ),
89943
+ added: C(
89944
+ a
89945
+ ),
89946
+ removed: C(
89947
+ c
89948
+ ),
89702
89949
  affected: C(
89703
89950
  e
89704
89951
  ),
@@ -89718,9 +89965,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
89718
89965
  c.push(...m), e.push(...b), f.push(...E);
89719
89966
  }
89720
89967
  return {
89721
- updated: C(c),
89722
- added: C(e),
89723
- removed: C(f),
89968
+ updated: C(
89969
+ c
89970
+ ),
89971
+ added: C(
89972
+ e
89973
+ ),
89974
+ removed: C(
89975
+ f
89976
+ ),
89724
89977
  affected: C(
89725
89978
  h
89726
89979
  ),
@@ -89740,9 +89993,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
89740
89993
  c.push(...m), e.push(...b), f.push(...E);
89741
89994
  }
89742
89995
  return {
89743
- updated: C(c),
89744
- added: C(e),
89745
- removed: C(f),
89996
+ updated: C(
89997
+ c
89998
+ ),
89999
+ added: C(
90000
+ e
90001
+ ),
90002
+ removed: C(
90003
+ f
90004
+ ),
89746
90005
  affected: C(
89747
90006
  h
89748
90007
  ),
@@ -89808,7 +90067,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
89808
90067
  return this.knownVersions = this.knownVersions ? this.knownVersions.set(this.version, i) : (/* @__PURE__ */ new Map()).set(this.version, i), this.apply(i), this;
89809
90068
  }
89810
90069
  snapshot() {
89811
- const i = new Ii(this, this.project);
90070
+ const i = new Ii(
90071
+ this,
90072
+ this.project
90073
+ );
89812
90074
  return this.apply(i);
89813
90075
  }
89814
90076
  /**
@@ -89831,9 +90093,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
89831
90093
  r.push(this.parent, ...f.updated), a.push(...f.added), c.push(...f.removed);
89832
90094
  }
89833
90095
  return {
89834
- updated: C(r),
89835
- added: C(a),
89836
- removed: C(c),
90096
+ updated: C(
90097
+ r
90098
+ ),
90099
+ added: C(
90100
+ a
90101
+ ),
90102
+ removed: C(
90103
+ c
90104
+ ),
89837
90105
  affected: C(
89838
90106
  e
89839
90107
  ),
@@ -89856,7 +90124,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
89856
90124
  updated: C(
89857
90125
  a
89858
90126
  ),
89859
- added: C(c),
90127
+ added: C(
90128
+ c
90129
+ ),
89860
90130
  removed: C(
89861
90131
  e
89862
90132
  ),
@@ -89892,9 +90162,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
89892
90162
  );
89893
90163
  }
89894
90164
  return this.metaSync(h.toShallowJSON(), null), this.previousVersion = h.previousVersion, this.version = h.version, this.createdAt = h.createdAt, this.author = h.author, this.deleted = h.deleted, this.inputs = [...h.inputs], this.outputs = [...h.outputs], this.error = h.error, this.successCalls = [...h.successCalls], this.errorCalls = [...h.errorCalls], this.calledBySuccess = [...h.calledBySuccess], this.calledByError = [...h.calledByError], this.calledByEntry = [...h.calledByEntry], this.writesValues = [...h.writesValues], this.declaration = h.declaration, this.parent = h.parent, {
89895
- updated: C(a),
89896
- added: C(c),
89897
- removed: C(e),
90165
+ updated: C(
90166
+ a
90167
+ ),
90168
+ added: C(
90169
+ c
90170
+ ),
90171
+ removed: C(
90172
+ e
90173
+ ),
89898
90174
  affected: C(
89899
90175
  f
89900
90176
  ),
@@ -89933,7 +90209,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
89933
90209
  throw r == null || r.attemptAutoclose(
89934
90210
  D.UpdateWithShallowTransfer,
89935
90211
  this.id
89936
- ), new Error(`${this.type} with id '${this.id}' must have a 'parent'`);
90212
+ ), new Error(
90213
+ `${this.type} with id '${this.id}' must have a 'parent'`
90214
+ );
89937
90215
  if (i.declaration) {
89938
90216
  const a = te(
89939
90217
  i.declaration
@@ -89943,7 +90221,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
89943
90221
  c && this.setDeclaration(c);
89944
90222
  }
89945
90223
  return i.calledByEntry.forEach((a) => {
89946
- const c = te(a), e = this.project.get(c);
90224
+ const c = te(a), e = this.project.get(
90225
+ c
90226
+ );
89947
90227
  e && (this.addEntryCaller(e, r), e.addCall(this, r));
89948
90228
  }), [...this.calledByEntry].forEach((a) => {
89949
90229
  i.calledByEntry.find(
@@ -89982,7 +90262,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
89982
90262
  (e) => te(e) === a.id
89983
90263
  ) || (this.removeInput(a, r), a.removeFromParent(r));
89984
90264
  }), i.writesValues.forEach((a) => {
89985
- const c = te(a), e = this.project.get(c);
90265
+ const c = te(a), e = this.project.get(
90266
+ c
90267
+ );
89986
90268
  e && (this.addValueReader(e, r), e.setValueWriter(this, r));
89987
90269
  }), [...this.writesValues].forEach((a) => {
89988
90270
  i.writesValues.find(
@@ -90037,7 +90319,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90037
90319
  );
90038
90320
  }
90039
90321
  return (a = i.calledByEntry) == null || a.forEach((f) => {
90040
- const h = te(f), m = this.project.get(h);
90322
+ const h = te(f), m = this.project.get(
90323
+ h
90324
+ );
90041
90325
  if (m)
90042
90326
  this.addEntryCaller(m, r), m.addCall(this, r);
90043
90327
  else
@@ -90097,7 +90381,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90097
90381
  `${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`
90098
90382
  );
90099
90383
  } else
90100
- throw new Error(`${this.type} with id '${this.id}' must have a 'parent'`);
90384
+ throw new Error(
90385
+ `${this.type} with id '${this.id}' must have a 'parent'`
90386
+ );
90101
90387
  if (this.initialData.declaration) {
90102
90388
  const e = te(
90103
90389
  this.initialData.declaration
@@ -90107,7 +90393,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90107
90393
  f && (this.setDeclaration(f), i.push(f));
90108
90394
  }
90109
90395
  return this.initialData.calledByEntry.forEach((e) => {
90110
- const f = te(e), h = this.project.get(f);
90396
+ const f = te(e), h = this.project.get(
90397
+ f
90398
+ );
90111
90399
  h && this.addEntryCaller(h, null);
90112
90400
  }), this.initialData.calledBySuccess.forEach((e) => {
90113
90401
  const f = te(e), h = this.project.get(
@@ -90120,9 +90408,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90120
90408
  );
90121
90409
  h && this.addErrorCaller(h, null);
90122
90410
  }), {
90123
- updated: C(i),
90124
- added: C(r),
90125
- removed: C(a),
90411
+ updated: C(
90412
+ i
90413
+ ),
90414
+ added: C(
90415
+ r
90416
+ ),
90417
+ removed: C(
90418
+ a
90419
+ ),
90126
90420
  affected: C(
90127
90421
  c
90128
90422
  ),
@@ -90189,13 +90483,24 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90189
90483
  var U, K;
90190
90484
  return (B.index ?? ((U = B.declaration) == null ? void 0 : U.index)) - (M.index ?? ((K = M.declaration) == null ? void 0 : K.index));
90191
90485
  }
90486
+ ), this.errorCalls.length && !this.catchesError && this.metaSync(
90487
+ {
90488
+ catchesError: !1
90489
+ },
90490
+ i
90192
90491
  ), i == null || i.attemptAutoclose(
90193
90492
  D.AfterAllChildrenInitialized,
90194
90493
  this.id
90195
90494
  ), {
90196
- updated: C(r),
90197
- added: C(a),
90198
- removed: C(c),
90495
+ updated: C(
90496
+ r
90497
+ ),
90498
+ added: C(
90499
+ a
90500
+ ),
90501
+ removed: C(
90502
+ c
90503
+ ),
90199
90504
  affected: C(
90200
90505
  e
90201
90506
  ),
@@ -90225,9 +90530,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90225
90530
  }), this.calledByEntry.forEach((f) => {
90226
90531
  f.addCall(this, i), r.push(f);
90227
90532
  }), this.subscribe(), this.subscribeToDependencies(), i == null || i.attemptAutoclose("add-self-to-project", this.id), {
90228
- updated: C(r),
90229
- added: C(a),
90230
- removed: C(c),
90533
+ updated: C(
90534
+ r
90535
+ ),
90536
+ added: C(
90537
+ a
90538
+ ),
90539
+ removed: C(
90540
+ c
90541
+ ),
90231
90542
  affected: C(
90232
90543
  e
90233
90544
  ),
@@ -90255,7 +90566,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90255
90566
  if (!this.checkCanEdit(this, r))
90256
90567
  return ce.warn(
90257
90568
  `[removeInput] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
90258
- ), r == null || r.attemptAutoclose(D.RemoveInput, this.id), this;
90569
+ ), r == null || r.attemptAutoclose(
90570
+ D.RemoveInput,
90571
+ this.id
90572
+ ), this;
90259
90573
  const a = this.inputs.findIndex((c) => c.id === i.id);
90260
90574
  return a > -1 && (this.inputs.splice(a, 1), r && (r == null || r.add(this, W.Affected))), r == null || r.attemptAutoclose(D.RemoveInput, this.id), this;
90261
90575
  }
@@ -90301,7 +90615,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90301
90615
  return ce.warn(
90302
90616
  `[removeOutput] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
90303
90617
  ), r == null || r.attemptAutoclose("remove-output", this.id), this;
90304
- const a = this.outputs.findIndex((c) => c.id === i.id);
90618
+ const a = this.outputs.findIndex(
90619
+ (c) => c.id === i.id
90620
+ );
90305
90621
  return a > -1 && (this.outputs.splice(a, 1), r && (r == null || r.add(this, W.Affected))), r == null || r.attemptAutoclose("remove-output", this.id), this;
90306
90622
  }
90307
90623
  // Subscribes one given entity as one of entity's writesValues
@@ -90337,7 +90653,13 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90337
90653
  counterpart: this,
90338
90654
  errorReason: Be.ValueReadingOverridesConstantVariable,
90339
90655
  rootAction: !1
90340
- }), r == null || r.attemptAutoclose(D.AddValueReader, this.id), this) : this.writesValues.includes(i) ? (r == null || r.attemptAutoclose(D.AddValueReader, this.id), this) : (this.writesValues.push(i), r == null || r.add(this, W.Affected), this);
90656
+ }), r == null || r.attemptAutoclose(
90657
+ D.AddValueReader,
90658
+ this.id
90659
+ ), this) : this.writesValues.includes(i) ? (r == null || r.attemptAutoclose(
90660
+ D.AddValueReader,
90661
+ this.id
90662
+ ), this) : (this.writesValues.push(i), r == null || r.add(this, W.Affected), this);
90341
90663
  }
90342
90664
  removeValueReader(i, r = this.project.addChangeSet(
90343
90665
  new Z(
@@ -90383,7 +90705,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90383
90705
  owner: this,
90384
90706
  errorReason: Be.CannotSuccessCallItself,
90385
90707
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddSuccessCaller
90386
- })), this.calledBySuccess.find((e) => e.id === i.id) || (this.calledBySuccess.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddSuccessCaller, this.id), this) : this;
90708
+ })), this.calledBySuccess.find((e) => e.id === i.id) || (this.calledBySuccess.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
90709
+ D.AddSuccessCaller,
90710
+ this.id
90711
+ ), this) : this;
90387
90712
  }
90388
90713
  addErrorCaller(i, r = this.project.addChangeSet(
90389
90714
  new Z(
@@ -90407,7 +90732,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90407
90732
  owner: this,
90408
90733
  errorReason: Be.CannotErrorCallItself,
90409
90734
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddErrorCaller
90410
- })), this.calledByError.find((e) => e.id === i.id) || (this.calledByError.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddErrorCaller, this.id), this) : this;
90735
+ })), this.calledByError.find((e) => e.id === i.id) || (this.calledByError.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
90736
+ D.AddErrorCaller,
90737
+ this.id
90738
+ ), this) : this;
90411
90739
  }
90412
90740
  addEntryCaller(i, r = this.project.addChangeSet(
90413
90741
  new Z(
@@ -90431,7 +90759,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90431
90759
  owner: this,
90432
90760
  errorReason: Be.CannotEntryCallItself,
90433
90761
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddEntryCaller
90434
- })), this.calledByEntry.find((e) => e.id === i.id) || (this.calledByEntry.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddEntryCaller, this.id), this) : this;
90762
+ })), this.calledByEntry.find((e) => e.id === i.id) || (this.calledByEntry.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
90763
+ D.AddEntryCaller,
90764
+ this.id
90765
+ ), this) : this;
90435
90766
  }
90436
90767
  addErrorCall(i, r = this.project.addChangeSet(
90437
90768
  new Z(
@@ -90479,7 +90810,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90479
90810
  owner: this,
90480
90811
  errorReason: Be.CannotSuccessCallItself,
90481
90812
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddSuccessCaller
90482
- })), this.successCalls.find((e) => e.id === i.id) || (this.successCalls.push(i), a && Rt(this, r), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(D.AddSuccessCall, this.id), this) : this;
90813
+ })), this.successCalls.find((e) => e.id === i.id) || (this.successCalls.push(i), a && Rt(this, r), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(
90814
+ D.AddSuccessCall,
90815
+ this.id
90816
+ ), this) : this;
90483
90817
  }
90484
90818
  removeCall(i, r = this.project.addChangeSet(
90485
90819
  new Z(
@@ -90537,9 +90871,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90537
90871
  if (!this.checkCanEdit(this, r))
90538
90872
  return ce.warn(
90539
90873
  `[setError] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
90540
- ), r == null || r.attemptAutoclose(D.SetErrorEntity, this.id), this;
90874
+ ), r == null || r.attemptAutoclose(
90875
+ D.SetErrorEntity,
90876
+ this.id
90877
+ ), this;
90541
90878
  const a = this.error;
90542
- return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.error = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(D.SetErrorEntity, this.id), this;
90879
+ return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.error = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(
90880
+ D.SetErrorEntity,
90881
+ this.id
90882
+ ), this;
90543
90883
  }
90544
90884
  setParent(i, r = this.project.addChangeSet(
90545
90885
  new Z(
@@ -90580,9 +90920,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90580
90920
  r,
90581
90921
  this.project
90582
90922
  );
90583
- if (a.addSuccessCaller(this, null), [d.BreakStatement, d.ContinueStatement].includes(
90584
- a.type
90585
- ))
90923
+ if (a.addSuccessCaller(this, null), [
90924
+ d.BreakStatement,
90925
+ d.ContinueStatement
90926
+ ].includes(a.type))
90586
90927
  a.setParent(
90587
90928
  this.parent.parent,
90588
90929
  null
@@ -90601,9 +90942,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90601
90942
  r,
90602
90943
  this.project
90603
90944
  );
90604
- if (a.addErrorCaller(this, null), [d.BreakStatement, d.ContinueStatement].includes(
90605
- a.type
90606
- ))
90945
+ if (a.addErrorCaller(this, null), [
90946
+ d.BreakStatement,
90947
+ d.ContinueStatement
90948
+ ].includes(a.type))
90607
90949
  a.setParent(
90608
90950
  this.parent.parent,
90609
90951
  null
@@ -90715,10 +91057,19 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90715
91057
  self: this
90716
91058
  };
90717
91059
  const r = [], a = [], c = [], e = [];
90718
- return this.parent.type === d.Project ? (this.parent.removeOperation(this), e.push(this.parent)) : this.parent.detachedChildren.includes(this) && this.parent.unsubscribeDetachedChild(this), i == null || i.attemptAutoclose(D.RemoveFromParent, this.id), {
90719
- added: C(c),
90720
- updated: C(r),
90721
- removed: C(a),
91060
+ return this.parent.type === d.Project ? (this.parent.removeOperation(this), e.push(this.parent)) : this.parent.detachedChildren.includes(this) && this.parent.unsubscribeDetachedChild(this), i == null || i.attemptAutoclose(
91061
+ D.RemoveFromParent,
91062
+ this.id
91063
+ ), {
91064
+ added: C(
91065
+ c
91066
+ ),
91067
+ updated: C(
91068
+ r
91069
+ ),
91070
+ removed: C(
91071
+ a
91072
+ ),
90722
91073
  affected: C(
90723
91074
  e
90724
91075
  ),
@@ -90752,7 +91103,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90752
91103
  owner: this,
90753
91104
  errorReason: Be.ActionOwnerEntityNonDeletable,
90754
91105
  rootAction: ((h = r == null ? void 0 : r.self) == null ? void 0 : h.id) === this.id && (r == null ? void 0 : r.actionName) === D.RemoveEntity
90755
- }), r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
91106
+ }), r == null || r.attemptAutoclose(
91107
+ D.RemoveEntity,
91108
+ this.id
91109
+ ), {
90756
91110
  added: [],
90757
91111
  updated: [],
90758
91112
  removed: [],
@@ -90761,7 +91115,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90761
91115
  };
90762
91116
  const a = [], c = [], e = [], f = [];
90763
91117
  if (r != null && r.hasRemoved(this.id))
90764
- return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
91118
+ return r == null || r.attemptAutoclose(
91119
+ D.RemoveEntity,
91120
+ this.id
91121
+ ), {
90765
91122
  added: [],
90766
91123
  updated: [],
90767
91124
  removed: [],
@@ -90815,9 +91172,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90815
91172
  });
90816
91173
  }
90817
91174
  return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
90818
- added: C(e),
90819
- updated: C(a),
90820
- removed: C(c),
91175
+ added: C(
91176
+ e
91177
+ ),
91178
+ updated: C(
91179
+ a
91180
+ ),
91181
+ removed: C(
91182
+ c
91183
+ ),
90821
91184
  affected: C(
90822
91185
  f
90823
91186
  ),
@@ -90840,9 +91203,27 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90840
91203
  if (!this.checkCanEdit(this, i))
90841
91204
  return ce.warn(
90842
91205
  `[restore] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
90843
- ), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), { added: [], updated: [], removed: [], affected: [], self: this };
91206
+ ), i == null || i.attemptAutoclose(
91207
+ D.RestoreEntity,
91208
+ this.id
91209
+ ), {
91210
+ added: [],
91211
+ updated: [],
91212
+ removed: [],
91213
+ affected: [],
91214
+ self: this
91215
+ };
90844
91216
  const r = [], a = [], c = [], e = [];
90845
- return i != null && i.hasAdded(this.id) ? (i == null || i.attemptAutoclose(D.RestoreEntity, this.id), { added: [], updated: [], removed: [], affected: [], self: this }) : (this.subscribe(), this.project.unsubscribeDeletedInstance(this), this.metaSync({ deleted: !1 }, i), Object.values(this.detachedDependents).forEach((f) => {
91217
+ return i != null && i.hasAdded(this.id) ? (i == null || i.attemptAutoclose(
91218
+ D.RestoreEntity,
91219
+ this.id
91220
+ ), {
91221
+ added: [],
91222
+ updated: [],
91223
+ removed: [],
91224
+ affected: [],
91225
+ self: this
91226
+ }) : (this.subscribe(), this.project.unsubscribeDeletedInstance(this), this.metaSync({ deleted: !1 }, i), Object.values(this.detachedDependents).forEach((f) => {
90846
91227
  const {
90847
91228
  updated: h,
90848
91229
  removed: m,
@@ -90870,9 +91251,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90870
91251
  }), this.calledByEntry.forEach((f) => {
90871
91252
  a.push(f), f.addCall(this, i);
90872
91253
  }), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), {
90873
- added: C(r),
90874
- updated: C(a),
90875
- removed: C(c),
91254
+ added: C(
91255
+ r
91256
+ ),
91257
+ updated: C(
91258
+ a
91259
+ ),
91260
+ removed: C(
91261
+ c
91262
+ ),
90876
91263
  affected: C(
90877
91264
  e
90878
91265
  ),
@@ -90882,10 +91269,14 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90882
91269
  toFlat(i = /* @__PURE__ */ new Set()) {
90883
91270
  return i.has(this.id) ? [] : (i.add(this.id), [
90884
91271
  this,
90885
- ...this.successCalls.flatMap((a) => a.toFlat(i)),
91272
+ ...this.successCalls.flatMap(
91273
+ (a) => a.toFlat(i)
91274
+ ),
90886
91275
  ...this.errorCalls.flatMap((a) => a.toFlat(i)),
90887
91276
  ...this.inputs.flatMap((a) => a.toFlat(i)),
90888
- ...this.outputs.flatMap((a) => a.toFlat(i)),
91277
+ ...this.outputs.flatMap(
91278
+ (a) => a.toFlat(i)
91279
+ ),
90889
91280
  ...this.calledBy.flatMap((a) => a.toFlat(i)),
90890
91281
  ...this.error ? this.error.toFlat(i) : []
90891
91282
  ]);
@@ -90893,10 +91284,16 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90893
91284
  toFlatIds(i = /* @__PURE__ */ new Set()) {
90894
91285
  return i.has(this.id) ? [] : (i.add(this.id), [
90895
91286
  this.id,
90896
- ...this.successCalls.flatMap((a) => a.toFlatIds(i)),
90897
- ...this.errorCalls.flatMap((a) => a.toFlatIds(i)),
91287
+ ...this.successCalls.flatMap(
91288
+ (a) => a.toFlatIds(i)
91289
+ ),
91290
+ ...this.errorCalls.flatMap(
91291
+ (a) => a.toFlatIds(i)
91292
+ ),
90898
91293
  ...this.inputs.flatMap((a) => a.toFlatIds(i)),
90899
- ...this.outputs.flatMap((a) => a.toFlatIds(i)),
91294
+ ...this.outputs.flatMap(
91295
+ (a) => a.toFlatIds(i)
91296
+ ),
90900
91297
  ...this.error ? this.error.toFlatIds(i) : []
90901
91298
  ]);
90902
91299
  }
@@ -90940,8 +91337,12 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90940
91337
  calledBySuccess: this.calledBySuccess.map(
90941
91338
  (a) => a.toReference()
90942
91339
  ),
90943
- calledByError: this.calledByError.map((a) => a.toReference()),
90944
- calledByEntry: this.calledByEntry.map((a) => a.toReference()),
91340
+ calledByError: this.calledByError.map(
91341
+ (a) => a.toReference()
91342
+ ),
91343
+ calledByEntry: this.calledByEntry.map(
91344
+ (a) => a.toReference()
91345
+ ),
90945
91346
  writesValues: this.writesValues.map(
90946
91347
  (a) => a.toJSON(i)
90947
91348
  ),
@@ -90961,7 +91362,11 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90961
91362
  toJSONClone(i = lt) {
90962
91363
  var a, c, e, f, h, m;
90963
91364
  let r;
90964
- return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || fn(this, this.project, i.uuidStrategy), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
91365
+ return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || fn(
91366
+ this,
91367
+ this.project,
91368
+ i.uuidStrategy
91369
+ ), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
90965
91370
  id: r,
90966
91371
  version: x.UUID.uuid(),
90967
91372
  createdAt: i.timestamp || G().toISOString(),
@@ -91042,7 +91447,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91042
91447
  x: this.x,
91043
91448
  y: this.y,
91044
91449
  inputs: this.inputs.map((c) => c.toReference(i)),
91045
- outputs: this.outputs.map((c) => c.toReference(i)),
91450
+ outputs: this.outputs.map(
91451
+ (c) => c.toReference(i)
91452
+ ),
91046
91453
  declaration: this.declaration.toReference(i),
91047
91454
  writesValues: this.writesValues.map(
91048
91455
  (c) => c.toReference(i)
@@ -91050,7 +91457,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91050
91457
  successCalls: this.successCalls.map(
91051
91458
  (c) => c.toReference(i)
91052
91459
  ),
91053
- errorCalls: this.errorCalls.map((c) => c.toReference(i)),
91460
+ errorCalls: this.errorCalls.map(
91461
+ (c) => c.toReference(i)
91462
+ ),
91054
91463
  calledBySuccess: this.calledBySuccess.map(
91055
91464
  (c) => c.toReference(i)
91056
91465
  ),
@@ -91067,13 +91476,19 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91067
91476
  toFlatJSON(i = /* @__PURE__ */ new Set()) {
91068
91477
  return i.has(this.id) ? [] : (i.add(this.id), [
91069
91478
  this.toShallowJSON(),
91070
- ...this.successCalls.flatMap((a) => a.toFlatJSON(i)),
91071
- ...this.errorCalls.flatMap((a) => a.toFlatJSON(i)),
91479
+ ...this.successCalls.flatMap(
91480
+ (a) => a.toFlatJSON(i)
91481
+ ),
91482
+ ...this.errorCalls.flatMap(
91483
+ (a) => a.toFlatJSON(i)
91484
+ ),
91072
91485
  ...this.inputs.flatMap((a) => a.toFlatJSON(i)),
91073
91486
  ...this.outputs.flatMap(
91074
91487
  (a) => a.toFlatJSON(i)
91075
91488
  ),
91076
- ...this.calledBy.flatMap((a) => a.toFlatJSON(i)),
91489
+ ...this.calledBy.flatMap(
91490
+ (a) => a.toFlatJSON(i)
91491
+ ),
91077
91492
  ...this.error ? this.error.toFlatJSON(i) : []
91078
91493
  ]);
91079
91494
  }
@@ -91219,7 +91634,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91219
91634
  return b.id === ((E = h.declaration) == null ? void 0 : E.id);
91220
91635
  }
91221
91636
  )) {
91222
- const b = h.remove({ ignoreUpstream: !1 }, i);
91637
+ const b = h.remove(
91638
+ { ignoreUpstream: !1 },
91639
+ i
91640
+ );
91223
91641
  c.push(...b.removed), r.push(...b.updated);
91224
91642
  }
91225
91643
  }), this.inputs.filter((h, m) => {
@@ -91237,9 +91655,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91237
91655
  D.RemoveUnrecognizedInputs,
91238
91656
  this.id
91239
91657
  ), {
91240
- updated: C(r),
91241
- added: C(a),
91242
- removed: C(c),
91658
+ updated: C(
91659
+ r
91660
+ ),
91661
+ added: C(
91662
+ a
91663
+ ),
91664
+ removed: C(
91665
+ c
91666
+ ),
91243
91667
  affected: C(
91244
91668
  e
91245
91669
  ),
@@ -91278,7 +91702,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91278
91702
  return E.id === ((A = m.declaration) == null ? void 0 : A.id);
91279
91703
  }
91280
91704
  )) {
91281
- const E = m.remove({ ignoreUpstream: !1 }, i);
91705
+ const E = m.remove(
91706
+ { ignoreUpstream: !1 },
91707
+ i
91708
+ );
91282
91709
  c.push(...E.removed), r.push(...E.updated);
91283
91710
  }
91284
91711
  }), this.outputs.filter((m, b) => {
@@ -91296,9 +91723,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91296
91723
  D.RemoveUnrecognizedOutputs,
91297
91724
  this.id
91298
91725
  ), {
91299
- updated: C(r),
91300
- added: C(a),
91301
- removed: C(c),
91726
+ updated: C(
91727
+ r
91728
+ ),
91729
+ added: C(
91730
+ a
91731
+ ),
91732
+ removed: C(
91733
+ c
91734
+ ),
91302
91735
  affected: C(
91303
91736
  e
91304
91737
  ),
@@ -91320,7 +91753,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91320
91753
  if (!this.checkCanEdit(this, i))
91321
91754
  return ce.warn(
91322
91755
  `[syncInputs] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
91323
- ), i == null || i.attemptAutoclose(D.SyncInputs, this.id), {
91756
+ ), i == null || i.attemptAutoclose(
91757
+ D.SyncInputs,
91758
+ this.id
91759
+ ), {
91324
91760
  updated: [],
91325
91761
  added: [],
91326
91762
  removed: [],
@@ -91351,9 +91787,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91351
91787
  } = E.afterAllChildrenInitialized(i);
91352
91788
  r.push(...A), a.push(..._), c.push(...N);
91353
91789
  }), this.inputs.sort((E, A) => E.index - A.index), i == null || i.attemptAutoclose(D.SyncInputs, this.id), {
91354
- updated: C(r),
91355
- added: C(a),
91356
- removed: C(c),
91790
+ updated: C(
91791
+ r
91792
+ ),
91793
+ added: C(
91794
+ a
91795
+ ),
91796
+ removed: C(
91797
+ c
91798
+ ),
91357
91799
  affected: C(
91358
91800
  e
91359
91801
  ),
@@ -91375,7 +91817,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91375
91817
  if (!this.checkCanEdit(this, i))
91376
91818
  return ce.warn(
91377
91819
  `[syncOutputs] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
91378
- ), i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
91820
+ ), i == null || i.attemptAutoclose(
91821
+ D.SyncOutputs,
91822
+ this.id
91823
+ ), {
91379
91824
  updated: [],
91380
91825
  added: [],
91381
91826
  removed: [],
@@ -91428,9 +91873,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91428
91873
  } = A.afterAllChildrenInitialized(i);
91429
91874
  r.push(..._), a.push(...N), c.push(...V);
91430
91875
  }), this.outputs.sort((A, _) => A.index - _.index), i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
91431
- updated: C(r),
91432
- added: C(a),
91433
- removed: C(c),
91876
+ updated: C(
91877
+ r
91878
+ ),
91879
+ added: C(
91880
+ a
91881
+ ),
91882
+ removed: C(
91883
+ c
91884
+ ),
91434
91885
  affected: C(
91435
91886
  e
91436
91887
  ),
@@ -97507,6 +97958,11 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
97507
97958
  var A, _;
97508
97959
  return (b.index ?? ((A = b.declaration) == null ? void 0 : A.index)) - (E.index ?? ((_ = E.declaration) == null ? void 0 : _.index));
97509
97960
  }
97961
+ ), this.errorCalls.length && !this.catchesError && this.metaSync(
97962
+ {
97963
+ catchesError: !1
97964
+ },
97965
+ i
97510
97966
  ), i == null || i.attemptAutoclose(
97511
97967
  D.AfterAllChildrenInitialized,
97512
97968
  this.id
@@ -130296,9 +130752,13 @@ const wi = class wi extends an {
130296
130752
  let e = r;
130297
130753
  if (i.parent) {
130298
130754
  const V = te(i.parent);
130299
- e = r.get(V);
130755
+ e = r.get(
130756
+ V
130757
+ );
130300
130758
  }
130301
- const f = te(i.declaration), h = r.get(
130759
+ const f = te(
130760
+ i.declaration
130761
+ ), h = r.get(
130302
130762
  f
130303
130763
  ), m = (i.calledByEntry || []).map((V) => {
130304
130764
  const B = te(V);
@@ -130312,7 +130772,9 @@ const wi = class wi extends an {
130312
130772
  });
130313
130773
  let A = null;
130314
130774
  if (i.readsValue) {
130315
- const V = te(i.readsValue);
130775
+ const V = te(
130776
+ i.readsValue
130777
+ );
130316
130778
  A = r.get(
130317
130779
  V
130318
130780
  );
@@ -130366,7 +130828,10 @@ const wi = class wi extends an {
130366
130828
  {
130367
130829
  parent: {
130368
130830
  list: !1,
130369
- types: [...Vr, d.Project],
130831
+ types: [
130832
+ ...Vr,
130833
+ d.Project
130834
+ ],
130370
130835
  optional: !0
130371
130836
  },
130372
130837
  // calledByEntry: {
@@ -130396,7 +130861,10 @@ const wi = class wi extends an {
130396
130861
  const h = sn(
130397
130862
  a
130398
130863
  );
130399
- return e.push(...f.errors, ...h.errors), c.push(...h.explanations), {
130864
+ return e.push(
130865
+ ...f.errors,
130866
+ ...h.errors
130867
+ ), c.push(...h.explanations), {
130400
130868
  errors: e,
130401
130869
  explanations: c,
130402
130870
  modifiedData: a
@@ -130459,9 +130927,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130459
130927
  const h = f.entity.afterAllChildrenInitialized(i);
130460
130928
  r.push(...h.updated), a.push(...h.added), c.push(...h.removed), e.push(...h.affected);
130461
130929
  }), i == null || i.attemptAutoclose("sync-dependents", this.id), {
130462
- updated: C(r),
130463
- added: C(a),
130464
- removed: C(c),
130930
+ updated: C(
130931
+ r
130932
+ ),
130933
+ added: C(
130934
+ a
130935
+ ),
130936
+ removed: C(
130937
+ c
130938
+ ),
130465
130939
  affected: C(
130466
130940
  e
130467
130941
  ),
@@ -130489,9 +130963,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130489
130963
  c.push(...m), e.push(...b), f.push(...E);
130490
130964
  }
130491
130965
  return {
130492
- updated: C(c),
130493
- added: C(e),
130494
- removed: C(f),
130966
+ updated: C(
130967
+ c
130968
+ ),
130969
+ added: C(
130970
+ e
130971
+ ),
130972
+ removed: C(
130973
+ f
130974
+ ),
130495
130975
  affected: C(
130496
130976
  h
130497
130977
  ),
@@ -130519,9 +130999,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130519
130999
  c.push(...m), e.push(...b), f.push(...E);
130520
131000
  }
130521
131001
  return {
130522
- updated: C(c),
130523
- added: C(e),
130524
- removed: C(f),
131002
+ updated: C(
131003
+ c
131004
+ ),
131005
+ added: C(
131006
+ e
131007
+ ),
131008
+ removed: C(
131009
+ f
131010
+ ),
130525
131011
  affected: C(
130526
131012
  h
130527
131013
  ),
@@ -130611,7 +131097,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130611
131097
  return this.knownVersions = this.knownVersions ? this.knownVersions.set(this.version, i) : (/* @__PURE__ */ new Map()).set(this.version, i), this.apply(i), this;
130612
131098
  }
130613
131099
  snapshot() {
130614
- const i = new wi(this, this.project);
131100
+ const i = new wi(
131101
+ this,
131102
+ this.project
131103
+ );
130615
131104
  return this.apply(i);
130616
131105
  }
130617
131106
  /**
@@ -130634,9 +131123,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130634
131123
  r.push(this.parent, ...f.updated), a.push(...f.added), c.push(...f.removed);
130635
131124
  }
130636
131125
  return {
130637
- updated: C(r),
130638
- added: C(a),
130639
- removed: C(c),
131126
+ updated: C(
131127
+ r
131128
+ ),
131129
+ added: C(
131130
+ a
131131
+ ),
131132
+ removed: C(
131133
+ c
131134
+ ),
130640
131135
  affected: C(
130641
131136
  e
130642
131137
  ),
@@ -130659,7 +131154,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130659
131154
  updated: C(
130660
131155
  a
130661
131156
  ),
130662
- added: C(c),
131157
+ added: C(
131158
+ c
131159
+ ),
130663
131160
  removed: C(
130664
131161
  e
130665
131162
  ),
@@ -130695,9 +131192,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130695
131192
  );
130696
131193
  }
130697
131194
  return this.metaSync(h.toShallowJSON(), null), this.previousVersion = h.previousVersion, this.version = h.version, this.createdAt = h.createdAt, this.author = h.author, this.deleted = h.deleted, this.inputs = [...h.inputs], this.outputs = [...h.outputs], this.internalCalls = [...h.internalCalls], this.successCalls = [...h.successCalls], this.errorCalls = [...h.errorCalls], this.writesValues = [...h.writesValues], this.readsValue = h.readsValue, this.defaultValue = h.defaultValue, this.declaration = h.declaration, this.calledBySuccess = [...h.calledBySuccess], this.calledByError = [...h.calledByError], this.calledByEntry = [...h.calledByEntry], this.error = h.error, this.parent = h.parent, {
130698
- updated: C(a),
130699
- added: C(c),
130700
- removed: C(e),
131195
+ updated: C(
131196
+ a
131197
+ ),
131198
+ added: C(
131199
+ c
131200
+ ),
131201
+ removed: C(
131202
+ e
131203
+ ),
130701
131204
  affected: C(
130702
131205
  f
130703
131206
  ),
@@ -130736,7 +131239,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130736
131239
  throw r == null || r.attemptAutoclose(
130737
131240
  D.UpdateWithShallowTransfer,
130738
131241
  this.id
130739
- ), new Error(`${this.type} with id '${this.id}' must have a 'parent'`);
131242
+ ), new Error(
131243
+ `${this.type} with id '${this.id}' must have a 'parent'`
131244
+ );
130740
131245
  if (i.readsValue) {
130741
131246
  const a = te(
130742
131247
  i.readsValue
@@ -130755,7 +131260,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130755
131260
  c && this.setDeclaration(c);
130756
131261
  }
130757
131262
  if (i.calledByEntry.forEach((a) => {
130758
- const c = te(a), e = this.project.get(c);
131263
+ const c = te(a), e = this.project.get(
131264
+ c
131265
+ );
130759
131266
  e && (this.addEntryCaller(e, r), e.addCall(this, r));
130760
131267
  }), [...this.calledByEntry].forEach((a) => {
130761
131268
  i.calledByEntry.find(
@@ -130803,7 +131310,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130803
131310
  } else
130804
131311
  this.setDefaultValue(null, r);
130805
131312
  return i.writesValues.forEach((a) => {
130806
- const c = te(a), e = this.project.get(c);
131313
+ const c = te(a), e = this.project.get(
131314
+ c
131315
+ );
130807
131316
  e && (this.addValueReader(e, r), e.setValueWriter(this, r));
130808
131317
  }), [...this.writesValues].forEach((a) => {
130809
131318
  i.writesValues.find(
@@ -130872,7 +131381,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130872
131381
  } else
130873
131382
  i.readsValue === null && this.removeValueWriter(r);
130874
131383
  return (a = i.calledByEntry) == null || a.forEach((f) => {
130875
- const h = te(f), m = this.project.get(h);
131384
+ const h = te(f), m = this.project.get(
131385
+ h
131386
+ );
130876
131387
  if (m)
130877
131388
  this.addEntryCaller(m, r), m.addCall(this, r);
130878
131389
  else
@@ -130932,7 +131443,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130932
131443
  `${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`
130933
131444
  );
130934
131445
  } else
130935
- throw new Error(`${this.type} with id '${this.id}' must have a 'parent'`);
131446
+ throw new Error(
131447
+ `${this.type} with id '${this.id}' must have a 'parent'`
131448
+ );
130936
131449
  if (this.initialData.readsValue) {
130937
131450
  const e = te(
130938
131451
  this.initialData.readsValue
@@ -130950,7 +131463,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130950
131463
  f && (this.setDeclaration(f), i.push(f));
130951
131464
  }
130952
131465
  return this.initialData.calledByEntry.forEach((e) => {
130953
- const f = te(e), h = this.project.get(f);
131466
+ const f = te(e), h = this.project.get(
131467
+ f
131468
+ );
130954
131469
  h && this.addEntryCaller(h, null);
130955
131470
  }), this.initialData.calledBySuccess.forEach((e) => {
130956
131471
  const f = te(e), h = this.project.get(
@@ -130963,9 +131478,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130963
131478
  );
130964
131479
  h && this.addErrorCaller(h, null);
130965
131480
  }), {
130966
- updated: C(i),
130967
- added: C(r),
130968
- removed: C(a),
131481
+ updated: C(
131482
+ i
131483
+ ),
131484
+ added: C(
131485
+ r
131486
+ ),
131487
+ removed: C(
131488
+ a
131489
+ ),
130969
131490
  affected: C(
130970
131491
  c
130971
131492
  ),
@@ -131008,7 +131529,11 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131008
131529
  );
131009
131530
  a.push(...Re), r.push(...Oe), c.push(...Ge), e.push(...Me);
131010
131531
  }
131011
- if (this.readsValue && this.defaultValue && (this.project.diggestedBuiltInBaseEntitiesIds.has(this.defaultValue.id) || this.defaultValue.remove({ ignoreUpstream: !1 }, i), this.setDefaultValue(null, i)), this.defaultValue && !this.readsValue && !this.project.diggestedBuiltInBaseEntitiesIds.has(this.id) && this.project.diggestedBuiltInBaseEntitiesIds.has(this.defaultValue.id)) {
131532
+ if (this.readsValue && this.defaultValue && (this.project.diggestedBuiltInBaseEntitiesIds.has(
131533
+ this.defaultValue.id
131534
+ ) || this.defaultValue.remove({ ignoreUpstream: !1 }, i), this.setDefaultValue(null, i)), this.defaultValue && !this.readsValue && !this.project.diggestedBuiltInBaseEntitiesIds.has(this.id) && this.project.diggestedBuiltInBaseEntitiesIds.has(
131535
+ this.defaultValue.id
131536
+ )) {
131012
131537
  const Re = this.defaultValue.clone(i, this);
131013
131538
  this.setDefaultValue(Re, i);
131014
131539
  }
@@ -131063,13 +131588,24 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131063
131588
  var Ge, Me;
131064
131589
  return (Re.index ?? ((Ge = Re.declaration) == null ? void 0 : Ge.index)) - (Oe.index ?? ((Me = Oe.declaration) == null ? void 0 : Me.index));
131065
131590
  }
131066
- ), this.declaration.constant && this.readsValue && (this.readsValue.removeValueReader(this, i), this.removeValueWriter(i)), this.declaration.constant && this.defaultValue && this.defaultValue.remove({ ignoreUpstream: !1 }, i), i == null || i.attemptAutoclose(
131591
+ ), this.declaration.constant && this.readsValue && (this.readsValue.removeValueReader(this, i), this.removeValueWriter(i)), this.declaration.constant && this.defaultValue && this.defaultValue.remove({ ignoreUpstream: !1 }, i), this.errorCalls.length && !this.catchesError && this.metaSync(
131592
+ {
131593
+ catchesError: !1
131594
+ },
131595
+ i
131596
+ ), i == null || i.attemptAutoclose(
131067
131597
  D.AfterAllChildrenInitialized,
131068
131598
  this.id
131069
131599
  ), {
131070
- updated: C(r),
131071
- added: C(a),
131072
- removed: C(c),
131600
+ updated: C(
131601
+ r
131602
+ ),
131603
+ added: C(
131604
+ a
131605
+ ),
131606
+ removed: C(
131607
+ c
131608
+ ),
131073
131609
  affected: C(
131074
131610
  e
131075
131611
  ),
@@ -131101,9 +131637,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131101
131637
  }), this.calledByEntry.forEach((f) => {
131102
131638
  f.addCall(this, i), r.push(f);
131103
131639
  }), this.subscribe(), this.subscribeToDependencies(), i == null || i.attemptAutoclose("add-self-to-project", this.id), {
131104
- updated: C(r),
131105
- added: C(a),
131106
- removed: C(c),
131640
+ updated: C(
131641
+ r
131642
+ ),
131643
+ added: C(
131644
+ a
131645
+ ),
131646
+ removed: C(
131647
+ c
131648
+ ),
131107
131649
  affected: C(
131108
131650
  e
131109
131651
  ),
@@ -131182,7 +131724,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131182
131724
  if (!this.checkCanEdit(this, r))
131183
131725
  return ce.warn(
131184
131726
  `[removeInput] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
131185
- ), r == null || r.attemptAutoclose(D.RemoveInput, this.id), this;
131727
+ ), r == null || r.attemptAutoclose(
131728
+ D.RemoveInput,
131729
+ this.id
131730
+ ), this;
131186
131731
  const a = this.inputs.findIndex((c) => c.id === i.id);
131187
131732
  return a > -1 && (this.inputs.splice(a, 1), r && (r == null || r.add(this, W.Affected))), r == null || r.attemptAutoclose(D.RemoveInput, this.id), this;
131188
131733
  }
@@ -131228,7 +131773,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131228
131773
  return ce.warn(
131229
131774
  `[removeOutput] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
131230
131775
  ), r == null || r.attemptAutoclose("remove-output", this.id), this;
131231
- const a = this.outputs.findIndex((c) => c.id === i.id);
131776
+ const a = this.outputs.findIndex(
131777
+ (c) => c.id === i.id
131778
+ );
131232
131779
  return a > -1 && (this.outputs.splice(a, 1), r && (r == null || r.add(this, W.Affected))), r == null || r.attemptAutoclose("remove-output", this.id), this;
131233
131780
  }
131234
131781
  // If it doesn't yet exist, add the caller to the list of entities that call this entity
@@ -131254,7 +131801,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131254
131801
  owner: this,
131255
131802
  errorReason: Be.CannotSuccessCallItself,
131256
131803
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddSuccessCaller
131257
- })), this.calledBySuccess.find((e) => e.id === i.id) || (this.calledBySuccess.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddSuccessCaller, this.id), this) : this;
131804
+ })), this.calledBySuccess.find((e) => e.id === i.id) || (this.calledBySuccess.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
131805
+ D.AddSuccessCaller,
131806
+ this.id
131807
+ ), this) : this;
131258
131808
  }
131259
131809
  addErrorCaller(i, r = this.project.addChangeSet(
131260
131810
  new Z(
@@ -131278,7 +131828,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131278
131828
  owner: this,
131279
131829
  errorReason: Be.CannotErrorCallItself,
131280
131830
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddErrorCaller
131281
- })), this.calledByError.find((e) => e.id === i.id) || (this.calledByError.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddErrorCaller, this.id), this) : this;
131831
+ })), this.calledByError.find((e) => e.id === i.id) || (this.calledByError.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
131832
+ D.AddErrorCaller,
131833
+ this.id
131834
+ ), this) : this;
131282
131835
  }
131283
131836
  addEntryCaller(i, r = this.project.addChangeSet(
131284
131837
  new Z(
@@ -131302,7 +131855,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131302
131855
  owner: this,
131303
131856
  errorReason: Be.CannotEntryCallItself,
131304
131857
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddEntryCaller
131305
- })), this.calledByEntry.find((e) => e.id === i.id) || (this.calledByEntry.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddEntryCaller, this.id), this) : this;
131858
+ })), this.calledByEntry.find((e) => e.id === i.id) || (this.calledByEntry.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
131859
+ D.AddEntryCaller,
131860
+ this.id
131861
+ ), this) : this;
131306
131862
  }
131307
131863
  addErrorCall(i, r = this.project.addChangeSet(
131308
131864
  new Z(
@@ -131390,7 +131946,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131390
131946
  (h) => h.id !== i.id
131391
131947
  )), r == null || r.add(this, W.Affected);
131392
131948
  }
131393
- return r == null || r.attemptAutoclose(D.AddSuccessCall, this.id), this;
131949
+ return r == null || r.attemptAutoclose(
131950
+ D.AddSuccessCall,
131951
+ this.id
131952
+ ), this;
131394
131953
  }
131395
131954
  removeCall(i, r = this.project.addChangeSet(
131396
131955
  new Z(
@@ -131468,7 +132027,13 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131468
132027
  counterpart: this,
131469
132028
  errorReason: Be.ValueReadingOverridesConstantVariable,
131470
132029
  rootAction: !1
131471
- }), r == null || r.attemptAutoclose(D.AddValueReader, this.id), this) : this.writesValues.includes(i) ? (r == null || r.attemptAutoclose(D.AddValueReader, this.id), this) : (this.writesValues.push(i), r == null || r.add(this, W.Affected), this);
132030
+ }), r == null || r.attemptAutoclose(
132031
+ D.AddValueReader,
132032
+ this.id
132033
+ ), this) : this.writesValues.includes(i) ? (r == null || r.attemptAutoclose(
132034
+ D.AddValueReader,
132035
+ this.id
132036
+ ), this) : (this.writesValues.push(i), r == null || r.add(this, W.Affected), this);
131472
132037
  }
131473
132038
  setError(i, r = this.project.addChangeSet(
131474
132039
  new Z(
@@ -131483,9 +132048,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131483
132048
  if (!this.checkCanEdit(this, r))
131484
132049
  return ce.warn(
131485
132050
  `[setError] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
131486
- ), r == null || r.attemptAutoclose(D.SetErrorEntity, this.id), this;
132051
+ ), r == null || r.attemptAutoclose(
132052
+ D.SetErrorEntity,
132053
+ this.id
132054
+ ), this;
131487
132055
  const a = this.error;
131488
- return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.error = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(D.SetErrorEntity, this.id), this;
132056
+ return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.error = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(
132057
+ D.SetErrorEntity,
132058
+ this.id
132059
+ ), this;
131489
132060
  }
131490
132061
  setParent(i, r = this.project.addChangeSet(
131491
132062
  new Z(
@@ -131549,9 +132120,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131549
132120
  r,
131550
132121
  this.project
131551
132122
  );
131552
- if (a.addSuccessCaller(this, null), [d.BreakStatement, d.ContinueStatement].includes(
131553
- a.type
131554
- ))
132123
+ if (a.addSuccessCaller(this, null), [
132124
+ d.BreakStatement,
132125
+ d.ContinueStatement
132126
+ ].includes(a.type))
131555
132127
  a.setParent(
131556
132128
  this.parent.parent,
131557
132129
  null
@@ -131570,9 +132142,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131570
132142
  r,
131571
132143
  this.project
131572
132144
  );
131573
- if (a.addErrorCaller(this, null), [d.BreakStatement, d.ContinueStatement].includes(
131574
- a.type
131575
- ))
132145
+ if (a.addErrorCaller(this, null), [
132146
+ d.BreakStatement,
132147
+ d.ContinueStatement
132148
+ ].includes(a.type))
131576
132149
  a.setParent(
131577
132150
  this.parent.parent,
131578
132151
  null
@@ -131589,7 +132162,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131589
132162
  }), this.internalCalls = this.initialData.internalCalls.reduce(
131590
132163
  (r, a) => {
131591
132164
  if (a.type === d.GenericReference) {
131592
- const c = this.project.findSubscribedInstanceFromReference(a);
132165
+ const c = this.project.findSubscribedInstanceFromReference(
132166
+ a
132167
+ );
131593
132168
  if (!c)
131594
132169
  return r;
131595
132170
  const e = c;
@@ -131636,7 +132211,13 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131636
132211
  counterpart: i,
131637
132212
  errorReason: Be.ValueReadingOverridesConstantVariable,
131638
132213
  rootAction: ((f = r == null ? void 0 : r.self) == null ? void 0 : f.id) === this.id && (r == null ? void 0 : r.actionName) === D.SetValueWriter
131639
- }), r == null || r.attemptAutoclose(D.SetValueWriter, this.id), this) : (((h = this.readsValue) == null ? void 0 : h.id) !== (i == null ? void 0 : i.id) && (this.readsValue = i, this.readsValue && ((m = this.defaultValue) == null || m.remove({ ignoreUpstream: !1 }, r)), r == null || r.add(this, W.Updated)), r == null || r.attemptAutoclose(D.SetValueWriter, this.id), this)) : this;
132214
+ }), r == null || r.attemptAutoclose(
132215
+ D.SetValueWriter,
132216
+ this.id
132217
+ ), this) : (((h = this.readsValue) == null ? void 0 : h.id) !== (i == null ? void 0 : i.id) && (this.readsValue = i, this.readsValue && ((m = this.defaultValue) == null || m.remove({ ignoreUpstream: !1 }, r)), r == null || r.add(this, W.Updated)), r == null || r.attemptAutoclose(
132218
+ D.SetValueWriter,
132219
+ this.id
132220
+ ), this)) : this;
131640
132221
  }
131641
132222
  removeValueWriter(i = this.project.addChangeSet(
131642
132223
  new Z(
@@ -131652,7 +132233,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131652
132233
  this,
131653
132234
  D.RemoveValueWriter,
131654
132235
  i
131655
- ) ? this : (this.readsValue && (this.readsValue = null, i == null || i.add(this, W.Updated)), i == null || i.attemptAutoclose(D.RemoveValueWriter, this.id), this);
132236
+ ) ? this : (this.readsValue && (this.readsValue = null, i == null || i.add(this, W.Updated)), i == null || i.attemptAutoclose(
132237
+ D.RemoveValueWriter,
132238
+ this.id
132239
+ ), this);
131656
132240
  }
131657
132241
  removeValueReader(i, r = this.project.addChangeSet(
131658
132242
  new Z(
@@ -131756,10 +132340,19 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131756
132340
  self: this
131757
132341
  };
131758
132342
  const r = [], a = [], c = [], e = [];
131759
- return this.parent.type === d.Project ? (this.parent.removeVariableInstance(this), e.push(this.parent)) : this.parent.detachedChildren.includes(this) && this.parent.unsubscribeDetachedChild(this), i == null || i.attemptAutoclose(D.RemoveFromParent, this.id), {
131760
- added: C(c),
131761
- updated: C(r),
131762
- removed: C(a),
132343
+ return this.parent.type === d.Project ? (this.parent.removeVariableInstance(this), e.push(this.parent)) : this.parent.detachedChildren.includes(this) && this.parent.unsubscribeDetachedChild(this), i == null || i.attemptAutoclose(
132344
+ D.RemoveFromParent,
132345
+ this.id
132346
+ ), {
132347
+ added: C(
132348
+ c
132349
+ ),
132350
+ updated: C(
132351
+ r
132352
+ ),
132353
+ removed: C(
132354
+ a
132355
+ ),
131763
132356
  affected: C(
131764
132357
  e
131765
132358
  ),
@@ -131793,7 +132386,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131793
132386
  owner: this,
131794
132387
  errorReason: Be.ActionOwnerEntityNonDeletable,
131795
132388
  rootAction: ((h = r == null ? void 0 : r.self) == null ? void 0 : h.id) === this.id && (r == null ? void 0 : r.actionName) === D.RemoveEntity
131796
- }), r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
132389
+ }), r == null || r.attemptAutoclose(
132390
+ D.RemoveEntity,
132391
+ this.id
132392
+ ), {
131797
132393
  added: [],
131798
132394
  updated: [],
131799
132395
  removed: [],
@@ -131802,7 +132398,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131802
132398
  };
131803
132399
  const a = [], c = [], e = [], f = [];
131804
132400
  if (r != null && r.hasRemoved(this.id))
131805
- return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
132401
+ return r == null || r.attemptAutoclose(
132402
+ D.RemoveEntity,
132403
+ this.id
132404
+ ), {
131806
132405
  added: [],
131807
132406
  updated: [],
131808
132407
  removed: [],
@@ -131866,9 +132465,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131866
132465
  });
131867
132466
  }
131868
132467
  return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
131869
- added: C(e),
131870
- updated: C(a),
131871
- removed: C(c),
132468
+ added: C(
132469
+ e
132470
+ ),
132471
+ updated: C(
132472
+ a
132473
+ ),
132474
+ removed: C(
132475
+ c
132476
+ ),
131872
132477
  affected: C(
131873
132478
  f
131874
132479
  ),
@@ -131891,10 +132496,28 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131891
132496
  if (!this.checkCanEdit(this, i))
131892
132497
  return ce.warn(
131893
132498
  `[restore] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
131894
- ), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), { added: [], updated: [], removed: [], affected: [], self: this };
132499
+ ), i == null || i.attemptAutoclose(
132500
+ D.RestoreEntity,
132501
+ this.id
132502
+ ), {
132503
+ added: [],
132504
+ updated: [],
132505
+ removed: [],
132506
+ affected: [],
132507
+ self: this
132508
+ };
131895
132509
  const r = [], a = [], c = [], e = [];
131896
132510
  if (i != null && i.hasAdded(this.id))
131897
- return i == null || i.attemptAutoclose(D.RestoreEntity, this.id), { added: [], updated: [], removed: [], affected: [], self: this };
132511
+ return i == null || i.attemptAutoclose(
132512
+ D.RestoreEntity,
132513
+ this.id
132514
+ ), {
132515
+ added: [],
132516
+ updated: [],
132517
+ removed: [],
132518
+ affected: [],
132519
+ self: this
132520
+ };
131898
132521
  if (this.subscribe(), this.project.unsubscribeDeletedInstance(this), this.metaSync({ deleted: !1 }, i), Object.values(this.detachedDependents).forEach((f) => {
131899
132522
  const {
131900
132523
  updated: h,
@@ -131935,9 +132558,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131935
132558
  }), this.calledByEntry.forEach((f) => {
131936
132559
  a.push(f), f.addCall(this, i);
131937
132560
  }), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), {
131938
- added: C(r),
131939
- updated: C(a),
131940
- removed: C(c),
132561
+ added: C(
132562
+ r
132563
+ ),
132564
+ updated: C(
132565
+ a
132566
+ ),
132567
+ removed: C(
132568
+ c
132569
+ ),
131941
132570
  affected: C(
131942
132571
  e
131943
132572
  ),
@@ -131949,13 +132578,21 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131949
132578
  return i.has(this.id) ? [] : (i.add(this.id), [
131950
132579
  this,
131951
132580
  ...((a = this.defaultValue) == null ? void 0 : a.toFlat(i)) || [],
131952
- ...this.writesValues.flatMap((e) => e.toFlat(i)),
132581
+ ...this.writesValues.flatMap(
132582
+ (e) => e.toFlat(i)
132583
+ ),
131953
132584
  ...((c = this.readsValue) == null ? void 0 : c.toFlat(i)) || [],
131954
- ...this.successCalls.flatMap((e) => e.toFlat(i)),
132585
+ ...this.successCalls.flatMap(
132586
+ (e) => e.toFlat(i)
132587
+ ),
131955
132588
  ...this.errorCalls.flatMap((e) => e.toFlat(i)),
131956
132589
  ...this.inputs.flatMap((e) => e.toFlat(i)),
131957
- ...this.outputs.flatMap((e) => e.toFlat(i)),
131958
- ...this.internalCalls.flatMap((e) => e.toFlat(i))
132590
+ ...this.outputs.flatMap(
132591
+ (e) => e.toFlat(i)
132592
+ ),
132593
+ ...this.internalCalls.flatMap(
132594
+ (e) => e.toFlat(i)
132595
+ )
131959
132596
  ]);
131960
132597
  }
131961
132598
  toFlatIds(i = /* @__PURE__ */ new Set()) {
@@ -131963,12 +132600,22 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131963
132600
  return i.has(this.id) ? [] : (i.add(this.id), [
131964
132601
  this.id,
131965
132602
  ...((a = this.defaultValue) == null ? void 0 : a.toFlatIds(i)) || [],
131966
- ...this.writesValues.flatMap((c) => c.toFlatIds(i)),
131967
- ...this.successCalls.flatMap((c) => c.toFlatIds(i)),
131968
- ...this.errorCalls.flatMap((c) => c.toFlatIds(i)),
132603
+ ...this.writesValues.flatMap(
132604
+ (c) => c.toFlatIds(i)
132605
+ ),
132606
+ ...this.successCalls.flatMap(
132607
+ (c) => c.toFlatIds(i)
132608
+ ),
132609
+ ...this.errorCalls.flatMap(
132610
+ (c) => c.toFlatIds(i)
132611
+ ),
131969
132612
  ...this.inputs.flatMap((c) => c.toFlatIds(i)),
131970
- ...this.outputs.flatMap((c) => c.toFlatIds(i)),
131971
- ...this.internalCalls.flatMap((c) => c.toFlatIds(i))
132613
+ ...this.outputs.flatMap(
132614
+ (c) => c.toFlatIds(i)
132615
+ ),
132616
+ ...this.internalCalls.flatMap(
132617
+ (c) => c.toFlatIds(i)
132618
+ )
131972
132619
  ]);
131973
132620
  }
131974
132621
  toMeta() {
@@ -132001,7 +132648,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132001
132648
  editable: this.editable,
132002
132649
  deletable: this.deletable,
132003
132650
  declaration: this.declaration.toJSON(i),
132004
- defaultValue: ((r = this.defaultValue) == null ? void 0 : r.toJSON(i)) || null,
132651
+ defaultValue: ((r = this.defaultValue) == null ? void 0 : r.toJSON(
132652
+ i
132653
+ )) || null,
132005
132654
  readsValue: ((a = this.readsValue) == null ? void 0 : a.toReference()) || null,
132006
132655
  writesValues: this.writesValues.map(
132007
132656
  (e) => e.toJSON(i)
@@ -132024,10 +132673,16 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132024
132673
  calledBySuccess: this.calledBySuccess.map(
132025
132674
  (e) => e.toReference()
132026
132675
  ),
132027
- calledByError: this.calledByError.map((e) => e.toReference()),
132028
- calledByEntry: this.calledByEntry.map((e) => e.toReference()),
132676
+ calledByError: this.calledByError.map(
132677
+ (e) => e.toReference()
132678
+ ),
132679
+ calledByEntry: this.calledByEntry.map(
132680
+ (e) => e.toReference()
132681
+ ),
132029
132682
  parent: this.parent.toReference(),
132030
- error: ((c = this.error) == null ? void 0 : c.toJSON(i)) || null,
132683
+ error: ((c = this.error) == null ? void 0 : c.toJSON(
132684
+ i
132685
+ )) || null,
132031
132686
  x: this.x,
132032
132687
  y: this.y
132033
132688
  });
@@ -132035,7 +132690,11 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132035
132690
  toJSONClone(i = lt) {
132036
132691
  var a, c, e, f, h, m, b, E;
132037
132692
  let r;
132038
- return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || fn(this, this.project, i.uuidStrategy), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
132693
+ return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || fn(
132694
+ this,
132695
+ this.project,
132696
+ i.uuidStrategy
132697
+ ), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
132039
132698
  id: r,
132040
132699
  version: x.UUID.uuid(),
132041
132700
  createdAt: i.timestamp || G().toISOString(),
@@ -132078,7 +132737,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132078
132737
  })
132079
132738
  ),
132080
132739
  internalCalls: this.internalCalls.map(
132081
- (A) => this.calledBy.length || this.readsValue ? A.toJSONClone({ ...i, newId: null }) : A.toReference({ seenEntityMaps: i.seenEntityMaps })
132740
+ (A) => this.calledBy.length || this.readsValue ? A.toJSONClone({ ...i, newId: null }) : A.toReference({
132741
+ seenEntityMaps: i.seenEntityMaps
132742
+ })
132082
132743
  ),
132083
132744
  calledBySuccess: this.calledBySuccess.map(
132084
132745
  (A) => A.toReference({ seenEntityMaps: i.seenEntityMaps })
@@ -132134,11 +132795,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132134
132795
  (m) => m.toReference(i)
132135
132796
  ),
132136
132797
  inputs: this.inputs.map((m) => m.toReference(i)),
132137
- outputs: this.outputs.map((m) => m.toReference(i)),
132798
+ outputs: this.outputs.map(
132799
+ (m) => m.toReference(i)
132800
+ ),
132138
132801
  successCalls: this.successCalls.map(
132139
132802
  (m) => m.toReference(i)
132140
132803
  ),
132141
- errorCalls: this.errorCalls.map((m) => m.toReference(i)),
132804
+ errorCalls: this.errorCalls.map(
132805
+ (m) => m.toReference(i)
132806
+ ),
132142
132807
  calledBySuccess: this.calledBySuccess.map(
132143
132808
  (m) => m.toReference(i)
132144
132809
  ),
@@ -132162,9 +132827,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132162
132827
  ...((a = this.defaultValue) == null ? void 0 : a.toFlatJSON(i)) || [],
132163
132828
  ...((c = this.declaration) == null ? void 0 : c.toFlatJSON(i)) || [],
132164
132829
  // ...(this.readsValue?.toFlatJSON(seenEntities) || []),
132165
- ...this.writesValues.flatMap((e) => e.toFlatJSON(i)),
132166
- ...this.successCalls.flatMap((e) => e.toFlatJSON(i)),
132167
- ...this.errorCalls.flatMap((e) => e.toFlatJSON(i)),
132830
+ ...this.writesValues.flatMap(
132831
+ (e) => e.toFlatJSON(i)
132832
+ ),
132833
+ ...this.successCalls.flatMap(
132834
+ (e) => e.toFlatJSON(i)
132835
+ ),
132836
+ ...this.errorCalls.flatMap(
132837
+ (e) => e.toFlatJSON(i)
132838
+ ),
132168
132839
  ...this.inputs.flatMap((e) => e.toFlatJSON(i)),
132169
132840
  ...this.outputs.flatMap(
132170
132841
  (e) => e.toFlatJSON(i)
@@ -132172,7 +132843,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132172
132843
  ...this.internalCalls.flatMap(
132173
132844
  (e) => e.toFlatJSON(i)
132174
132845
  ),
132175
- ...this.calledBy.flatMap((e) => e.toFlatJSON(i))
132846
+ ...this.calledBy.flatMap(
132847
+ (e) => e.toFlatJSON(i)
132848
+ )
132176
132849
  ]);
132177
132850
  }
132178
132851
  toGenerationTarget(i = lt) {
@@ -132286,7 +132959,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132286
132959
  ), r == null || r.attemptAutoclose("set-default-value", this.id), this;
132287
132960
  const a = this.defaultValue;
132288
132961
  if ((a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id)) {
132289
- if (a == null || a.remove({ ignoreUpstream: !0 }, r), this.defaultValue = i, this.defaultValue) {
132962
+ if (a == null || a.remove(
132963
+ { ignoreUpstream: !0 },
132964
+ r
132965
+ ), this.defaultValue = i, this.defaultValue) {
132290
132966
  const c = this.readsValue;
132291
132967
  this.removeValueWriter(r), c == null || c.removeValueReader(this, r);
132292
132968
  }
@@ -132381,19 +133057,28 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132381
133057
  };
132382
133058
  const r = [], a = [], c = [], e = [];
132383
133059
  return this.declaration.dataType && !this.declaration.dataType.isObject() ? [...this.inputs].forEach((h) => {
132384
- const m = h.remove({ ignoreUpstream: !1 }, i);
133060
+ const m = h.remove(
133061
+ { ignoreUpstream: !1 },
133062
+ i
133063
+ );
132385
133064
  c.push(...m.removed), r.push(...m.updated);
132386
133065
  }) : this.declaration.dataType && this.declaration.dataType.hasStrictObjectStructure() && [...this.inputs].forEach((h) => {
132387
133066
  var b;
132388
133067
  if (!h.declaration) {
132389
- const E = h.remove({ ignoreUpstream: !1 }, i);
133068
+ const E = h.remove(
133069
+ { ignoreUpstream: !1 },
133070
+ i
133071
+ );
132390
133072
  c.push(...E.removed), r.push(...E.updated);
132391
133073
  return;
132392
133074
  }
132393
133075
  if (![
132394
133076
  ...((b = this.declaration.dataType) == null ? void 0 : b.entity).allProperties
132395
133077
  ].find((E) => h.declaration === E)) {
132396
- const E = h.remove({ ignoreUpstream: !1 }, i);
133078
+ const E = h.remove(
133079
+ { ignoreUpstream: !1 },
133080
+ i
133081
+ );
132397
133082
  c.push(...E.removed), r.push(...E.updated);
132398
133083
  }
132399
133084
  }), this.inputs.filter((h, m) => {
@@ -132411,9 +133096,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132411
133096
  D.RemoveUnrecognizedInputs,
132412
133097
  this.id
132413
133098
  ), {
132414
- updated: C(r),
132415
- added: C(a),
132416
- removed: C(c),
133099
+ updated: C(
133100
+ r
133101
+ ),
133102
+ added: C(
133103
+ a
133104
+ ),
133105
+ removed: C(
133106
+ c
133107
+ ),
132417
133108
  affected: C(
132418
133109
  e
132419
133110
  ),
@@ -132446,28 +133137,43 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132446
133137
  };
132447
133138
  const r = [], a = [], c = [], e = [];
132448
133139
  return this.declaration.dataType && !this.declaration.dataType.isObject() ? [...this.outputs].forEach((f) => {
132449
- const h = f.remove({ ignoreUpstream: !1 }, i);
133140
+ const h = f.remove(
133141
+ { ignoreUpstream: !1 },
133142
+ i
133143
+ );
132450
133144
  c.push(...h.removed), r.push(...h.updated);
132451
133145
  }) : this.declaration.dataType && this.declaration.dataType.hasStrictObjectStructure() && [...this.outputs].forEach((f) => {
132452
133146
  var m;
132453
133147
  if (!f.declaration) {
132454
- const b = f.remove({ ignoreUpstream: !1 }, i);
133148
+ const b = f.remove(
133149
+ { ignoreUpstream: !1 },
133150
+ i
133151
+ );
132455
133152
  c.push(...b.removed), r.push(...b.updated);
132456
133153
  return;
132457
133154
  }
132458
133155
  if (![
132459
133156
  ...((m = this.declaration.dataType) == null ? void 0 : m.entity).allProperties
132460
133157
  ].find((b) => f.declaration === b)) {
132461
- const b = f.remove({ ignoreUpstream: !1 }, i);
133158
+ const b = f.remove(
133159
+ { ignoreUpstream: !1 },
133160
+ i
133161
+ );
132462
133162
  c.push(...b.removed), r.push(...b.updated);
132463
133163
  }
132464
133164
  }), i == null || i.attemptAutoclose(
132465
133165
  "remove-unrecognized-variable-instance-outputs",
132466
133166
  this.id
132467
133167
  ), {
132468
- updated: C(r),
132469
- added: C(a),
132470
- removed: C(c),
133168
+ updated: C(
133169
+ r
133170
+ ),
133171
+ added: C(
133172
+ a
133173
+ ),
133174
+ removed: C(
133175
+ c
133176
+ ),
132471
133177
  affected: C(
132472
133178
  e
132473
133179
  ),
@@ -132541,18 +133247,31 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132541
133247
  if (b === -1)
132542
133248
  return !1;
132543
133249
  const E = this.internalCalls[b];
132544
- return G(E == null ? void 0 : E.createdAt).isSame(G(h.createdAt)) ? m > b : !!G(E == null ? void 0 : E.createdAt).isAfter(h.createdAt);
133250
+ return G(E == null ? void 0 : E.createdAt).isSame(
133251
+ G(h.createdAt)
133252
+ ) ? m > b : !!G(E == null ? void 0 : E.createdAt).isAfter(
133253
+ h.createdAt
133254
+ );
132545
133255
  }
132546
133256
  ).forEach((h) => {
132547
- const m = h.remove({ ignoreUpstream: !1 }, i);
133257
+ const m = h.remove(
133258
+ { ignoreUpstream: !1 },
133259
+ i
133260
+ );
132548
133261
  c.push(...m.removed), r.push(...m.updated);
132549
133262
  }), i == null || i.attemptAutoclose(
132550
133263
  "remove-unrecognized-variable-declaration-internal-calls",
132551
133264
  this.id
132552
133265
  ), {
132553
- updated: C(r),
132554
- added: C(a),
132555
- removed: C(c),
133266
+ updated: C(
133267
+ r
133268
+ ),
133269
+ added: C(
133270
+ a
133271
+ ),
133272
+ removed: C(
133273
+ c
133274
+ ),
132556
133275
  affected: C(
132557
133276
  e
132558
133277
  ),
@@ -132642,7 +133361,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132642
133361
  });
132643
133362
  }
132644
133363
  } else
132645
- return i == null || i.attemptAutoclose("sync-variable-instance-inputs", this.id), {
133364
+ return i == null || i.attemptAutoclose(
133365
+ "sync-variable-instance-inputs",
133366
+ this.id
133367
+ ), {
132646
133368
  added: [],
132647
133369
  updated: [],
132648
133370
  removed: [],
@@ -132650,7 +133372,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132650
133372
  self: this
132651
133373
  };
132652
133374
  else
132653
- return i == null || i.attemptAutoclose("sync-variable-instance-inputs", this.id), {
133375
+ return i == null || i.attemptAutoclose(
133376
+ "sync-variable-instance-inputs",
133377
+ this.id
133378
+ ), {
132654
133379
  added: [],
132655
133380
  updated: [],
132656
133381
  removed: [],
@@ -132665,9 +133390,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132665
133390
  } = f.afterAllChildrenInitialized(i);
132666
133391
  a.push(...h), r.push(...m), c.push(...b);
132667
133392
  }), this.inputs.sort((f, h) => f.index - h.index), i == null || i.attemptAutoclose("sync-variable-instance-inputs", this.id), {
132668
- added: C(r),
132669
- updated: C(a),
132670
- removed: C(c),
133393
+ added: C(
133394
+ r
133395
+ ),
133396
+ updated: C(
133397
+ a
133398
+ ),
133399
+ removed: C(
133400
+ c
133401
+ ),
132671
133402
  affected: C(
132672
133403
  e
132673
133404
  ),
@@ -132687,7 +133418,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132687
133418
  if (!this.checkCanEdit(this, i))
132688
133419
  return ce.warn(
132689
133420
  `[syncOutputs] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
132690
- ), i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
133421
+ ), i == null || i.attemptAutoclose(
133422
+ D.SyncOutputs,
133423
+ this.id
133424
+ ), {
132691
133425
  updated: [],
132692
133426
  added: [],
132693
133427
  removed: [],
@@ -132703,7 +133437,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132703
133437
  d.BuiltInBaseEntity
132704
133438
  ].includes(this.declaration.dataType.entity.type) && !this.declaration.dataType.isList && [
132705
133439
  ...this.declaration.dataType.entity.properties
132706
- ].filter((m) => !this.outputs.find((b) => b.declaration === m)).map((m) => {
133440
+ ].filter((m) => !this.outputs.find(
133441
+ (b) => b.declaration === m
133442
+ )).map((m) => {
132707
133443
  const b = {
132708
133444
  dataType: null,
132709
133445
  id: x.UUID.uuid(),
@@ -132726,7 +133462,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132726
133462
  return E.setParent(this, i), E.initChildren(i), i == null || i.add(E, W.Added), i || E.captureVersion(), this.addOutput(E, i), E;
132727
133463
  });
132728
133464
  else
132729
- return i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
133465
+ return i == null || i.attemptAutoclose(
133466
+ D.SyncOutputs,
133467
+ this.id
133468
+ ), {
132730
133469
  added: [],
132731
133470
  updated: [],
132732
133471
  removed: [],
@@ -132734,7 +133473,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132734
133473
  self: this
132735
133474
  };
132736
133475
  else
132737
- return i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
133476
+ return i == null || i.attemptAutoclose(
133477
+ D.SyncOutputs,
133478
+ this.id
133479
+ ), {
132738
133480
  added: [],
132739
133481
  updated: [],
132740
133482
  removed: [],
@@ -132749,9 +133491,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132749
133491
  } = f.afterAllChildrenInitialized(i);
132750
133492
  a.push(...h), r.push(...m), c.push(...b);
132751
133493
  }), this.outputs.sort((f, h) => f.index - h.index), i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
132752
- added: C(r),
132753
- updated: C(a),
132754
- removed: C(c),
133494
+ added: C(
133495
+ r
133496
+ ),
133497
+ updated: C(
133498
+ a
133499
+ ),
133500
+ removed: C(
133501
+ c
133502
+ ),
132755
133503
  affected: C(
132756
133504
  e
132757
133505
  ),
@@ -132786,18 +133534,22 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132786
133534
  ].filter((b) => !f.some((E) => {
132787
133535
  var A, _;
132788
133536
  return E.id !== b.id && (((A = E.implements) == null ? void 0 : A.id) === b.id || ((_ = E.extends) == null ? void 0 : _.id) === b.id);
132789
- }) && !b.deleted).filter((b) => !this.internalCalls.find((A) => {
132790
- var N, V, B, M, U;
132791
- return (((N = A.declaration) == null ? void 0 : N.id) || ((B = (V = A.initialData) == null ? void 0 : V.declaration) == null ? void 0 : B.entityId) || ((U = (M = A.initialData) == null ? void 0 : M.declaration) == null ? void 0 : U.id)) === b.id;
132792
- })).forEach((b) => {
132793
- const E = this.internalCalls.find((A) => {
132794
- const _ = lh(
132795
- A.declaration
132796
- ), N = lh(
132797
- b
132798
- );
132799
- return _.id === N.id;
132800
- });
133537
+ }) && !b.deleted).filter((b) => !this.internalCalls.find(
133538
+ (A) => {
133539
+ var N, V, B, M, U;
133540
+ return (((N = A.declaration) == null ? void 0 : N.id) || ((B = (V = A.initialData) == null ? void 0 : V.declaration) == null ? void 0 : B.entityId) || ((U = (M = A.initialData) == null ? void 0 : M.declaration) == null ? void 0 : U.id)) === b.id;
133541
+ }
133542
+ )).forEach((b) => {
133543
+ const E = this.internalCalls.find(
133544
+ (A) => {
133545
+ const _ = lh(
133546
+ A.declaration
133547
+ ), N = lh(
133548
+ b
133549
+ );
133550
+ return _.id === N.id;
133551
+ }
133552
+ );
132801
133553
  if (E)
132802
133554
  E.setDeclaration(b), E.subscribeToDependencies();
132803
133555
  else {
@@ -132807,7 +133559,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132807
133559
  });
132808
133560
  }
132809
133561
  } else
132810
- return i == null || i.attemptAutoclose("generate-unused-internal-calls", this.id), {
133562
+ return i == null || i.attemptAutoclose(
133563
+ "generate-unused-internal-calls",
133564
+ this.id
133565
+ ), {
132811
133566
  added: [],
132812
133567
  updated: [],
132813
133568
  removed: [],
@@ -132815,7 +133570,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132815
133570
  self: this
132816
133571
  };
132817
133572
  else
132818
- return i == null || i.attemptAutoclose("generate-unused-internal-calls", this.id), {
133573
+ return i == null || i.attemptAutoclose(
133574
+ "generate-unused-internal-calls",
133575
+ this.id
133576
+ ), {
132819
133577
  added: [],
132820
133578
  updated: [],
132821
133579
  removed: [],
@@ -132823,9 +133581,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132823
133581
  self: this
132824
133582
  };
132825
133583
  return i == null || i.attemptAutoclose("generate-unused-internal-calls", this.id), {
132826
- added: C(r),
132827
- updated: C(a),
132828
- removed: C(c),
133584
+ added: C(
133585
+ r
133586
+ ),
133587
+ updated: C(
133588
+ a
133589
+ ),
133590
+ removed: C(
133591
+ c
133592
+ ),
132829
133593
  affected: C(
132830
133594
  e
132831
133595
  ),
@@ -133230,7 +133994,9 @@ const Di = class Di extends an {
133230
133994
  let e = r;
133231
133995
  if (i.parent) {
133232
133996
  const _ = te(i.parent);
133233
- e = r.get(_);
133997
+ e = r.get(
133998
+ _
133999
+ );
133234
134000
  }
133235
134001
  const f = (i.calledByEntry || []).map((_) => {
133236
134002
  const N = te(_);
@@ -133244,7 +134010,9 @@ const Di = class Di extends an {
133244
134010
  });
133245
134011
  let b = null;
133246
134012
  if (i.readsValue) {
133247
- const _ = te(i.readsValue);
134013
+ const _ = te(
134014
+ i.readsValue
134015
+ );
133248
134016
  b = r.get(
133249
134017
  _
133250
134018
  );
@@ -133303,7 +134071,10 @@ const Di = class Di extends an {
133303
134071
  {
133304
134072
  parent: {
133305
134073
  list: !1,
133306
- types: [...Vr, d.Project],
134074
+ types: [
134075
+ ...Vr,
134076
+ d.Project
134077
+ ],
133307
134078
  optional: !0
133308
134079
  }
133309
134080
  // calledByEntry: {
@@ -133326,7 +134097,10 @@ const Di = class Di extends an {
133326
134097
  r
133327
134098
  );
133328
134099
  c.push(...f.explanations), a = f.modifiedData;
133329
- const h = JF(a, r), m = sn(
134100
+ const h = JF(
134101
+ a,
134102
+ r
134103
+ ), m = sn(
133330
134104
  a
133331
134105
  );
133332
134106
  return e.push(
@@ -133342,7 +134116,9 @@ const Di = class Di extends an {
133342
134116
  get variableInstances() {
133343
134117
  const i = [];
133344
134118
  return Object.values(this.detachedDependents).forEach((r) => {
133345
- r.field === G3.VarDeclaration && !i.includes(r.entity) && i.push(r.entity);
134119
+ r.field === G3.VarDeclaration && !i.includes(
134120
+ r.entity
134121
+ ) && i.push(r.entity);
133346
134122
  }), i;
133347
134123
  }
133348
134124
  validateGeneratedUpdate(i) {
@@ -133394,9 +134170,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133394
134170
  const h = f.entity.afterAllChildrenInitialized(i);
133395
134171
  r.push(...h.updated), a.push(...h.added), c.push(...h.removed), e.push(...h.affected);
133396
134172
  }), i == null || i.attemptAutoclose("sync-dependents", this.id), {
133397
- updated: C(r),
133398
- added: C(a),
133399
- removed: C(c),
134173
+ updated: C(
134174
+ r
134175
+ ),
134176
+ added: C(
134177
+ a
134178
+ ),
134179
+ removed: C(
134180
+ c
134181
+ ),
133400
134182
  affected: C(
133401
134183
  e
133402
134184
  ),
@@ -133416,9 +134198,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133416
134198
  c.push(...m), e.push(...b), f.push(...E);
133417
134199
  }
133418
134200
  return {
133419
- updated: C(c),
133420
- added: C(e),
133421
- removed: C(f),
134201
+ updated: C(
134202
+ c
134203
+ ),
134204
+ added: C(
134205
+ e
134206
+ ),
134207
+ removed: C(
134208
+ f
134209
+ ),
133422
134210
  affected: C(
133423
134211
  h
133424
134212
  ),
@@ -133438,9 +134226,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133438
134226
  c.push(...m), e.push(...b), f.push(...E);
133439
134227
  }
133440
134228
  return {
133441
- updated: C(c),
133442
- added: C(e),
133443
- removed: C(f),
134229
+ updated: C(
134230
+ c
134231
+ ),
134232
+ added: C(
134233
+ e
134234
+ ),
134235
+ removed: C(
134236
+ f
134237
+ ),
133444
134238
  affected: C(
133445
134239
  h
133446
134240
  ),
@@ -133518,7 +134312,12 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133518
134312
  // And adds it to the 'knownVersions' map
133519
134313
  captureVersion() {
133520
134314
  var r;
133521
- const i = ((r = this.knownVersions) == null ? void 0 : r.get(this.version)) || new Di(this, this.project);
134315
+ const i = ((r = this.knownVersions) == null ? void 0 : r.get(
134316
+ this.version
134317
+ )) || new Di(
134318
+ this,
134319
+ this.project
134320
+ );
133522
134321
  if (!this.activeVersion)
133523
134322
  throw new Error(
133524
134323
  `Only active versions can be captured. Entity of type ${this.type} with id '${this.id}' and version '${this.version}' is not active.`
@@ -133530,7 +134329,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133530
134329
  return this.knownVersions = this.knownVersions ? this.knownVersions.set(this.version, i) : (/* @__PURE__ */ new Map()).set(this.version, i), this.apply(i), this;
133531
134330
  }
133532
134331
  snapshot() {
133533
- const i = new Di(this, this.project);
134332
+ const i = new Di(
134333
+ this,
134334
+ this.project
134335
+ );
133534
134336
  return this.apply(i);
133535
134337
  }
133536
134338
  /**
@@ -133553,9 +134355,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133553
134355
  r.push(this.parent, ...f.updated), a.push(...f.added), c.push(...f.removed);
133554
134356
  }
133555
134357
  return {
133556
- updated: C(r),
133557
- added: C(a),
133558
- removed: C(c),
134358
+ updated: C(
134359
+ r
134360
+ ),
134361
+ added: C(
134362
+ a
134363
+ ),
134364
+ removed: C(
134365
+ c
134366
+ ),
133559
134367
  affected: C(
133560
134368
  e
133561
134369
  ),
@@ -133578,7 +134386,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133578
134386
  updated: C(
133579
134387
  a
133580
134388
  ),
133581
- added: C(c),
134389
+ added: C(
134390
+ c
134391
+ ),
133582
134392
  removed: C(
133583
134393
  e
133584
134394
  ),
@@ -133614,9 +134424,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133614
134424
  );
133615
134425
  }
133616
134426
  return this.metaSync(h.toShallowJSON(), null), this.previousVersion = h.previousVersion, this.version = h.version, this.createdAt = h.createdAt, this.author = h.author, this.deleted = h.deleted, this.inputs = [...h.inputs], this.outputs = [...h.outputs], this.internalCalls = [...h.internalCalls], this.successCalls = [...h.successCalls], this.errorCalls = [...h.errorCalls], this.writesValues = [...h.writesValues], this.readsValue = h.readsValue, this.defaultValue = h.defaultValue, this.dataType = h.dataType, this.calledBySuccess = [...h.calledBySuccess], this.calledByError = [...h.calledByError], this.calledByEntry = [...h.calledByEntry], this.error = h.error, this.parent = h.parent, {
133617
- updated: C(a),
133618
- added: C(c),
133619
- removed: C(e),
134427
+ updated: C(
134428
+ a
134429
+ ),
134430
+ added: C(
134431
+ c
134432
+ ),
134433
+ removed: C(
134434
+ e
134435
+ ),
133620
134436
  affected: C(
133621
134437
  f
133622
134438
  ),
@@ -133655,7 +134471,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133655
134471
  throw r == null || r.attemptAutoclose(
133656
134472
  D.UpdateWithShallowTransfer,
133657
134473
  this.id
133658
- ), new Error(`${this.type} with id '${this.id}' must have a 'parent'`);
134474
+ ), new Error(
134475
+ `${this.type} with id '${this.id}' must have a 'parent'`
134476
+ );
133659
134477
  if (i.readsValue) {
133660
134478
  const a = te(
133661
134479
  i.readsValue
@@ -133666,7 +134484,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133666
134484
  } else
133667
134485
  this.removeValueWriter(r);
133668
134486
  if (i.calledByEntry.forEach((a) => {
133669
- const c = te(a), e = this.project.get(c);
134487
+ const c = te(a), e = this.project.get(
134488
+ c
134489
+ );
133670
134490
  e && (this.addEntryCaller(e, r), e.addCall(this, r));
133671
134491
  }), [...this.calledByEntry].forEach((a) => {
133672
134492
  i.calledByEntry.find(
@@ -133705,7 +134525,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133705
134525
  (e) => te(e) === a.id
133706
134526
  ) || (this.removeInput(a, r), a.removeFromParent(r));
133707
134527
  }), i.dataType) {
133708
- const a = te(i.dataType), c = this.project.get(a);
134528
+ const a = te(
134529
+ i.dataType
134530
+ ), c = this.project.get(a);
133709
134531
  c && this.setDataType(c, r);
133710
134532
  } else
133711
134533
  this.setDataType(null, r);
@@ -133719,7 +134541,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133719
134541
  } else
133720
134542
  this.setDefaultValue(null, r);
133721
134543
  return i.writesValues.forEach((a) => {
133722
- const c = te(a), e = this.project.get(c);
134544
+ const c = te(a), e = this.project.get(
134545
+ c
134546
+ );
133723
134547
  e && (this.addValueReader(e, r), e.setValueWriter(this, r));
133724
134548
  }), [...this.writesValues].forEach((a) => {
133725
134549
  i.writesValues.find(
@@ -133775,7 +134599,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133775
134599
  } else
133776
134600
  i.readsValue === null && this.removeValueWriter(r);
133777
134601
  return (a = i.calledByEntry) == null || a.forEach((f) => {
133778
- const h = te(f), m = this.project.get(h);
134602
+ const h = te(f), m = this.project.get(
134603
+ h
134604
+ );
133779
134605
  if (m)
133780
134606
  this.addEntryCaller(m, r), m.addCall(this, r);
133781
134607
  else
@@ -133835,7 +134661,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133835
134661
  `${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`
133836
134662
  );
133837
134663
  } else
133838
- throw new Error(`${this.type} with id '${this.id}' must have a 'parent'`);
134664
+ throw new Error(
134665
+ `${this.type} with id '${this.id}' must have a 'parent'`
134666
+ );
133839
134667
  if (this.initialData.readsValue) {
133840
134668
  const e = te(
133841
134669
  this.initialData.readsValue
@@ -133845,7 +134673,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133845
134673
  f && (this.setValueWriter(f, null), i.push(f));
133846
134674
  }
133847
134675
  return this.initialData.calledByEntry.forEach((e) => {
133848
- const f = te(e), h = this.project.get(f);
134676
+ const f = te(e), h = this.project.get(
134677
+ f
134678
+ );
133849
134679
  h && this.addEntryCaller(h, null);
133850
134680
  }), this.initialData.calledBySuccess.forEach((e) => {
133851
134681
  const f = te(e), h = this.project.get(
@@ -133858,9 +134688,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133858
134688
  );
133859
134689
  h && this.addErrorCaller(h, null);
133860
134690
  }), {
133861
- updated: C(i),
133862
- added: C(r),
133863
- removed: C(a),
134691
+ updated: C(
134692
+ i
134693
+ ),
134694
+ added: C(
134695
+ r
134696
+ ),
134697
+ removed: C(
134698
+ a
134699
+ ),
133864
134700
  affected: C(
133865
134701
  c
133866
134702
  ),
@@ -133900,7 +134736,11 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133900
134736
  } = this.inferDataTypeAndSyncInstancesInputsAndOutputs(i);
133901
134737
  a.push(...he), r.push(...Ee), c.push(...Re), e.push(...Oe);
133902
134738
  }
133903
- if (this.readsValue && this.defaultValue && (this.project.diggestedBuiltInBaseEntitiesIds.has(this.defaultValue.id) || this.defaultValue.remove({ ignoreUpstream: !1 }, i), this.setDefaultValue(null, i)), this.defaultValue && !this.readsValue && !this.project.diggestedBuiltInBaseEntitiesIds.has(this.id) && this.project.diggestedBuiltInBaseEntitiesIds.has(this.defaultValue.id)) {
134739
+ if (this.readsValue && this.defaultValue && (this.project.diggestedBuiltInBaseEntitiesIds.has(
134740
+ this.defaultValue.id
134741
+ ) || this.defaultValue.remove({ ignoreUpstream: !1 }, i), this.setDefaultValue(null, i)), this.defaultValue && !this.readsValue && !this.project.diggestedBuiltInBaseEntitiesIds.has(this.id) && this.project.diggestedBuiltInBaseEntitiesIds.has(
134742
+ this.defaultValue.id
134743
+ )) {
133904
134744
  const he = this.defaultValue.clone(i, this);
133905
134745
  this.setDefaultValue(he, i);
133906
134746
  }
@@ -133977,13 +134817,24 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133977
134817
  var Re, Oe;
133978
134818
  return (he.index ?? ((Re = he.declaration) == null ? void 0 : Re.index)) - (Ee.index ?? ((Oe = Ee.declaration) == null ? void 0 : Oe.index));
133979
134819
  }
134820
+ ), this.errorCalls.length && !this.catchesError && this.metaSync(
134821
+ {
134822
+ catchesError: !1
134823
+ },
134824
+ i
133980
134825
  ), i == null || i.attemptAutoclose(
133981
134826
  D.AfterAllChildrenInitialized,
133982
134827
  this.id
133983
134828
  ), {
133984
- updated: C(r),
133985
- added: C(a),
133986
- removed: C(c),
134829
+ updated: C(
134830
+ r
134831
+ ),
134832
+ added: C(
134833
+ a
134834
+ ),
134835
+ removed: C(
134836
+ c
134837
+ ),
133987
134838
  affected: C(
133988
134839
  e
133989
134840
  ),
@@ -134015,9 +134866,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134015
134866
  }), this.calledByEntry.forEach((f) => {
134016
134867
  f.addCall(this, i), r.push(f);
134017
134868
  }), this.subscribe(), this.subscribeToDependencies(), i == null || i.attemptAutoclose("add-self-to-project", this.id), {
134018
- updated: C(r),
134019
- added: C(a),
134020
- removed: C(c),
134869
+ updated: C(
134870
+ r
134871
+ ),
134872
+ added: C(
134873
+ a
134874
+ ),
134875
+ removed: C(
134876
+ c
134877
+ ),
134021
134878
  affected: C(
134022
134879
  e
134023
134880
  ),
@@ -134093,7 +134950,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134093
134950
  if (!this.checkCanEdit(this, r))
134094
134951
  return ce.warn(
134095
134952
  `[removeInput] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
134096
- ), r == null || r.attemptAutoclose(D.RemoveInput, this.id), this;
134953
+ ), r == null || r.attemptAutoclose(
134954
+ D.RemoveInput,
134955
+ this.id
134956
+ ), this;
134097
134957
  const a = this.inputs.findIndex((c) => c.id === i.id);
134098
134958
  return a > -1 && (this.inputs.splice(a, 1), r && (r == null || r.add(this, W.Affected))), r == null || r.attemptAutoclose(D.RemoveInput, this.id), this;
134099
134959
  }
@@ -134139,7 +134999,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134139
134999
  return ce.warn(
134140
135000
  `[removeOutput] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
134141
135001
  ), r == null || r.attemptAutoclose("remove-output", this.id), this;
134142
- const a = this.outputs.findIndex((c) => c.id === i.id);
135002
+ const a = this.outputs.findIndex(
135003
+ (c) => c.id === i.id
135004
+ );
134143
135005
  return a > -1 && (this.outputs.splice(a, 1), r && (r == null || r.add(this, W.Affected))), r == null || r.attemptAutoclose("remove-output", this.id), this;
134144
135006
  }
134145
135007
  // If it doesn't yet exist, add the caller to the list of entities that call this entity
@@ -134169,7 +135031,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134169
135031
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddSuccessCaller
134170
135032
  })), !this.calledBySuccess.find((e) => e.id === i.id)) {
134171
135033
  const e = [];
134172
- if (i.type === d.InternalCall ? e.push(...Qo(i)) : i.type === d.VariableInstance && e.push(...Yo(i)), this.calledBySuccess.push(i), a && Rt(this, r), i.type === d.InternalCall) {
135034
+ if (i.type === d.InternalCall ? e.push(...Qo(i)) : i.type === d.VariableInstance && e.push(
135035
+ ...Yo(i)
135036
+ ), this.calledBySuccess.push(i), a && Rt(this, r), i.type === d.InternalCall) {
134173
135037
  const f = Qo(i);
134174
135038
  e.length < f.length && (f.forEach((h) => {
134175
135039
  var m;
@@ -134200,7 +135064,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134200
135064
  }
134201
135065
  r == null || r.add(this, W.Updated);
134202
135066
  }
134203
- return r == null || r.attemptAutoclose(D.AddSuccessCaller, this.id), this;
135067
+ return r == null || r.attemptAutoclose(
135068
+ D.AddSuccessCaller,
135069
+ this.id
135070
+ ), this;
134204
135071
  }
134205
135072
  addErrorCaller(i, r = this.project.addChangeSet(
134206
135073
  new Z(
@@ -134228,7 +135095,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134228
135095
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddErrorCaller
134229
135096
  })), !this.calledByError.find((e) => e.id === i.id)) {
134230
135097
  const e = [];
134231
- if (i.type === d.InternalCall ? e.push(...Qo(i)) : i.type === d.VariableInstance && e.push(...Yo(i)), this.calledByError.push(i), a && Rt(this, r), i.type === d.InternalCall) {
135098
+ if (i.type === d.InternalCall ? e.push(...Qo(i)) : i.type === d.VariableInstance && e.push(
135099
+ ...Yo(i)
135100
+ ), this.calledByError.push(i), a && Rt(this, r), i.type === d.InternalCall) {
134232
135101
  const f = Qo(i);
134233
135102
  e.length < f.length && (f.forEach((h) => {
134234
135103
  var m;
@@ -134259,7 +135128,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134259
135128
  }
134260
135129
  r == null || r.add(this, W.Updated);
134261
135130
  }
134262
- return r == null || r.attemptAutoclose(D.AddErrorCaller, this.id), this;
135131
+ return r == null || r.attemptAutoclose(
135132
+ D.AddErrorCaller,
135133
+ this.id
135134
+ ), this;
134263
135135
  }
134264
135136
  addEntryCaller(i, r = this.project.addChangeSet(
134265
135137
  new Z(
@@ -134283,7 +135155,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134283
135155
  owner: this,
134284
135156
  errorReason: Be.CannotEntryCallItself,
134285
135157
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddEntryCaller
134286
- })), this.calledByEntry.find((e) => e.id === i.id) || (this.calledByEntry.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddEntryCaller, this.id), this) : this;
135158
+ })), this.calledByEntry.find((e) => e.id === i.id) || (this.calledByEntry.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
135159
+ D.AddEntryCaller,
135160
+ this.id
135161
+ ), this) : this;
134287
135162
  }
134288
135163
  addErrorCall(i, r = this.project.addChangeSet(
134289
135164
  new Z(
@@ -134331,7 +135206,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134331
135206
  owner: this,
134332
135207
  errorReason: Be.CannotSuccessCallItself,
134333
135208
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddSuccessCaller
134334
- })), this.successCalls.find((e) => e.id === i.id) || (this.successCalls.push(i), a && Rt(this, r), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(D.AddSuccessCall, this.id), this) : this;
135209
+ })), this.successCalls.find((e) => e.id === i.id) || (this.successCalls.push(i), a && Rt(this, r), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(
135210
+ D.AddSuccessCall,
135211
+ this.id
135212
+ ), this) : this;
134335
135213
  }
134336
135214
  removeCall(i, r = this.project.addChangeSet(
134337
135215
  new Z(
@@ -134409,7 +135287,13 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134409
135287
  counterpart: this,
134410
135288
  errorReason: Be.ValueReadingOverridesConstantVariable,
134411
135289
  rootAction: !1
134412
- }), r == null || r.attemptAutoclose(D.AddValueReader, this.id), this) : this.writesValues.includes(i) ? (r == null || r.attemptAutoclose(D.AddValueReader, this.id), this) : (this.writesValues.push(i), r == null || r.add(this, W.Affected), this);
135290
+ }), r == null || r.attemptAutoclose(
135291
+ D.AddValueReader,
135292
+ this.id
135293
+ ), this) : this.writesValues.includes(i) ? (r == null || r.attemptAutoclose(
135294
+ D.AddValueReader,
135295
+ this.id
135296
+ ), this) : (this.writesValues.push(i), r == null || r.add(this, W.Affected), this);
134413
135297
  }
134414
135298
  removeValueReader(i, r = this.project.addChangeSet(
134415
135299
  new Z(
@@ -134445,9 +135329,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134445
135329
  if (!this.checkCanEdit(this, r))
134446
135330
  return ce.warn(
134447
135331
  `[setError] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
134448
- ), r == null || r.attemptAutoclose(D.SetErrorEntity, this.id), this;
135332
+ ), r == null || r.attemptAutoclose(
135333
+ D.SetErrorEntity,
135334
+ this.id
135335
+ ), this;
134449
135336
  const a = this.error;
134450
- return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.error = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(D.SetErrorEntity, this.id), this;
135337
+ return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.error = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(
135338
+ D.SetErrorEntity,
135339
+ this.id
135340
+ ), this;
134451
135341
  }
134452
135342
  setParent(i, r = this.project.addChangeSet(
134453
135343
  new Z(
@@ -134494,9 +135384,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134494
135384
  r,
134495
135385
  this.project
134496
135386
  );
134497
- if (a.addSuccessCaller(this, null), [d.BreakStatement, d.ContinueStatement].includes(
134498
- a.type
134499
- ))
135387
+ if (a.addSuccessCaller(this, null), [
135388
+ d.BreakStatement,
135389
+ d.ContinueStatement
135390
+ ].includes(a.type))
134500
135391
  a.setParent(
134501
135392
  this.parent.parent,
134502
135393
  null
@@ -134515,9 +135406,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134515
135406
  r,
134516
135407
  this.project
134517
135408
  );
134518
- if (a.addErrorCaller(this, null), [d.BreakStatement, d.ContinueStatement].includes(
134519
- a.type
134520
- ))
135409
+ if (a.addErrorCaller(this, null), [
135410
+ d.BreakStatement,
135411
+ d.ContinueStatement
135412
+ ].includes(a.type))
134521
135413
  a.setParent(
134522
135414
  this.parent.parent,
134523
135415
  null
@@ -134584,7 +135476,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134584
135476
  owner: this,
134585
135477
  errorReason: Be.CannotValueWriteItself,
134586
135478
  rootAction: ((a = r == null ? void 0 : r.self) == null ? void 0 : a.id) === this.id && (r == null ? void 0 : r.actionName) === D.SetValueWriter
134587
- })), ((c = this.readsValue) == null ? void 0 : c.id) !== (i == null ? void 0 : i.id) && (this.readsValue = i, this.readsValue && ((e = this.defaultValue) == null || e.remove({ ignoreUpstream: !1 }, r)), r == null || r.add(this, W.Updated)), r == null || r.attemptAutoclose(D.SetValueWriter, this.id), this) : this;
135479
+ })), ((c = this.readsValue) == null ? void 0 : c.id) !== (i == null ? void 0 : i.id) && (this.readsValue = i, this.readsValue && ((e = this.defaultValue) == null || e.remove({ ignoreUpstream: !1 }, r)), r == null || r.add(this, W.Updated)), r == null || r.attemptAutoclose(
135480
+ D.SetValueWriter,
135481
+ this.id
135482
+ ), this) : this;
134588
135483
  }
134589
135484
  removeValueWriter(i = this.project.addChangeSet(
134590
135485
  new Z(
@@ -134600,7 +135495,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134600
135495
  this,
134601
135496
  D.RemoveValueWriter,
134602
135497
  i
134603
- ) ? this : (this.readsValue && (this.readsValue = null, i == null || i.add(this, W.Updated)), i == null || i.attemptAutoclose(D.RemoveValueWriter, this.id), this);
135498
+ ) ? this : (this.readsValue && (this.readsValue = null, i == null || i.add(this, W.Updated)), i == null || i.attemptAutoclose(
135499
+ D.RemoveValueWriter,
135500
+ this.id
135501
+ ), this);
134604
135502
  }
134605
135503
  subscribe() {
134606
135504
  var i;
@@ -134679,7 +135577,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134679
135577
  updated: C(
134680
135578
  a
134681
135579
  ),
134682
- added: C(r),
135580
+ added: C(
135581
+ r
135582
+ ),
134683
135583
  removed: C(
134684
135584
  c
134685
135585
  ),
@@ -134720,9 +135620,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134720
135620
  "infer-data-type-and-sync-instances-inputs-and-outputs",
134721
135621
  this.id
134722
135622
  ), {
134723
- updated: C(a),
134724
- added: C(r),
134725
- removed: C(c),
135623
+ updated: C(
135624
+ a
135625
+ ),
135626
+ added: C(
135627
+ r
135628
+ ),
135629
+ removed: C(
135630
+ c
135631
+ ),
134726
135632
  affected: C(
134727
135633
  e
134728
135634
  ),
@@ -134747,7 +135653,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134747
135653
  return this.name = a.name !== void 0 ? a.name : e.name, this.codeName = a.codeName !== void 0 ? a.codeName : e.codeName, this.description = a.description !== void 0 ? a.description : e.description, this.x = a.x || e.x, this.y = a.y || e.y, this.constant = a.constant !== void 0 ? a.constant : e.constant, this.required = a.required !== void 0 ? a.required : e.required, this.catchesError = a.catchesError !== void 0 ? a.catchesError : this.catchesError, super.baseMetaSync(a, this, r), a.deleted === !0 && !e.deleted ? r == null || r.add(this, W.Removed) : a.deleted === !1 && e.deleted ? r == null || r.add(this, W.Added) : c && (r == null || r.add(this, W.Updated)), r == null || r.attemptAutoclose("meta-sync", this.id), this;
134748
135654
  }
134749
135655
  async APILoad(i = We, ...r) {
134750
- return await Di.repository.APILoad(this.id, ...r), this;
135656
+ return await Di.repository.APILoad(
135657
+ this.id,
135658
+ ...r
135659
+ ), this;
134751
135660
  }
134752
135661
  async APICreate(i = We, ...r) {
134753
135662
  return await Di.repository.APICreate(
@@ -134768,7 +135677,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134768
135677
  ), this;
134769
135678
  }
134770
135679
  async APIClone(i = We, ...r) {
134771
- return await Di.repository.APIClone(this.id, ...r), this;
135680
+ return await Di.repository.APIClone(
135681
+ this.id,
135682
+ ...r
135683
+ ), this;
134772
135684
  }
134773
135685
  async APILoadVersion(i = We, r, ...a) {
134774
135686
  return await Di.repository.APILoadVersion(
@@ -134801,10 +135713,19 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134801
135713
  self: this
134802
135714
  };
134803
135715
  const r = [], a = [], c = [], e = [];
134804
- return this.parent.type === d.Project ? (this.parent.removeVariableDeclaration(this), e.push(this.parent)) : this.parent.detachedChildren.includes(this) && this.parent.unsubscribeDetachedChild(this), i == null || i.attemptAutoclose(D.RemoveFromParent, this.id), {
134805
- added: C(c),
134806
- updated: C(r),
134807
- removed: C(a),
135716
+ return this.parent.type === d.Project ? (this.parent.removeVariableDeclaration(this), e.push(this.parent)) : this.parent.detachedChildren.includes(this) && this.parent.unsubscribeDetachedChild(this), i == null || i.attemptAutoclose(
135717
+ D.RemoveFromParent,
135718
+ this.id
135719
+ ), {
135720
+ added: C(
135721
+ c
135722
+ ),
135723
+ updated: C(
135724
+ r
135725
+ ),
135726
+ removed: C(
135727
+ a
135728
+ ),
134808
135729
  affected: C(
134809
135730
  e
134810
135731
  ),
@@ -134838,7 +135759,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134838
135759
  owner: this,
134839
135760
  errorReason: Be.ActionOwnerEntityNonDeletable,
134840
135761
  rootAction: ((h = r == null ? void 0 : r.self) == null ? void 0 : h.id) === this.id && (r == null ? void 0 : r.actionName) === D.RemoveEntity
134841
- }), r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
135762
+ }), r == null || r.attemptAutoclose(
135763
+ D.RemoveEntity,
135764
+ this.id
135765
+ ), {
134842
135766
  added: [],
134843
135767
  updated: [],
134844
135768
  removed: [],
@@ -134847,7 +135771,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134847
135771
  };
134848
135772
  const a = [], c = [], e = [], f = [];
134849
135773
  if (r != null && r.hasRemoved(this.id))
134850
- return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
135774
+ return r == null || r.attemptAutoclose(
135775
+ D.RemoveEntity,
135776
+ this.id
135777
+ ), {
134851
135778
  added: [],
134852
135779
  updated: [],
134853
135780
  removed: [],
@@ -134920,9 +135847,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134920
135847
  });
134921
135848
  }
134922
135849
  return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
134923
- added: C(e),
134924
- updated: C(a),
134925
- removed: C(c),
135850
+ added: C(
135851
+ e
135852
+ ),
135853
+ updated: C(
135854
+ a
135855
+ ),
135856
+ removed: C(
135857
+ c
135858
+ ),
134926
135859
  affected: C(
134927
135860
  f
134928
135861
  ),
@@ -134945,10 +135878,28 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134945
135878
  if (!this.checkCanEdit(this, i))
134946
135879
  return ce.warn(
134947
135880
  `[restore] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
134948
- ), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), { added: [], updated: [], removed: [], affected: [], self: this };
135881
+ ), i == null || i.attemptAutoclose(
135882
+ D.RestoreEntity,
135883
+ this.id
135884
+ ), {
135885
+ added: [],
135886
+ updated: [],
135887
+ removed: [],
135888
+ affected: [],
135889
+ self: this
135890
+ };
134949
135891
  const r = [], a = [], c = [], e = [];
134950
135892
  if (i != null && i.hasAdded(this.id))
134951
- return i == null || i.attemptAutoclose(D.RestoreEntity, this.id), { added: [], updated: [], removed: [], affected: [], self: this };
135893
+ return i == null || i.attemptAutoclose(
135894
+ D.RestoreEntity,
135895
+ this.id
135896
+ ), {
135897
+ added: [],
135898
+ updated: [],
135899
+ removed: [],
135900
+ affected: [],
135901
+ self: this
135902
+ };
134952
135903
  if (this.subscribe(), this.project.unsubscribeDeletedInstance(this), this.metaSync({ deleted: !1 }, i), Object.values(this.detachedDependents).forEach((f) => {
134953
135904
  const {
134954
135905
  updated: h,
@@ -134993,9 +135944,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134993
135944
  }), this.calledByEntry.forEach((f) => {
134994
135945
  a.push(f), f.addCall(this, i);
134995
135946
  }), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), {
134996
- added: C(r),
134997
- updated: C(a),
134998
- removed: C(c),
135947
+ added: C(
135948
+ r
135949
+ ),
135950
+ updated: C(
135951
+ a
135952
+ ),
135953
+ removed: C(
135954
+ c
135955
+ ),
134999
135956
  affected: C(
135000
135957
  e
135001
135958
  ),
@@ -135009,12 +135966,20 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135009
135966
  ...((a = this.defaultValue) == null ? void 0 : a.toFlat(i)) || [],
135010
135967
  ...((c = this.dataType) == null ? void 0 : c.toFlat(i)) || [],
135011
135968
  ...((e = this.readsValue) == null ? void 0 : e.toFlat(i)) || [],
135012
- ...this.writesValues.flatMap((f) => f.toFlat(i)),
135013
- ...this.successCalls.flatMap((f) => f.toFlat(i)),
135969
+ ...this.writesValues.flatMap(
135970
+ (f) => f.toFlat(i)
135971
+ ),
135972
+ ...this.successCalls.flatMap(
135973
+ (f) => f.toFlat(i)
135974
+ ),
135014
135975
  ...this.errorCalls.flatMap((f) => f.toFlat(i)),
135015
135976
  ...this.inputs.flatMap((f) => f.toFlat(i)),
135016
- ...this.outputs.flatMap((f) => f.toFlat(i)),
135017
- ...this.internalCalls.flatMap((f) => f.toFlat(i)),
135977
+ ...this.outputs.flatMap(
135978
+ (f) => f.toFlat(i)
135979
+ ),
135980
+ ...this.internalCalls.flatMap(
135981
+ (f) => f.toFlat(i)
135982
+ ),
135018
135983
  ...this.calledBy.flatMap((f) => f.toFlat(i)),
135019
135984
  ...this.variableInstances.flatMap(
135020
135985
  (f) => f.toFlat(i)
@@ -135027,12 +135992,22 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135027
135992
  this.id,
135028
135993
  ...((a = this.defaultValue) == null ? void 0 : a.toFlatIds(i)) || [],
135029
135994
  ...((c = this.dataType) == null ? void 0 : c.toFlatIds(i)) || [],
135030
- ...this.writesValues.flatMap((e) => e.toFlatIds(i)),
135031
- ...this.successCalls.flatMap((e) => e.toFlatIds(i)),
135032
- ...this.errorCalls.flatMap((e) => e.toFlatIds(i)),
135995
+ ...this.writesValues.flatMap(
135996
+ (e) => e.toFlatIds(i)
135997
+ ),
135998
+ ...this.successCalls.flatMap(
135999
+ (e) => e.toFlatIds(i)
136000
+ ),
136001
+ ...this.errorCalls.flatMap(
136002
+ (e) => e.toFlatIds(i)
136003
+ ),
135033
136004
  ...this.inputs.flatMap((e) => e.toFlatIds(i)),
135034
- ...this.outputs.flatMap((e) => e.toFlatIds(i)),
135035
- ...this.internalCalls.flatMap((e) => e.toFlatIds(i)),
136005
+ ...this.outputs.flatMap(
136006
+ (e) => e.toFlatIds(i)
136007
+ ),
136008
+ ...this.internalCalls.flatMap(
136009
+ (e) => e.toFlatIds(i)
136010
+ ),
135036
136011
  ...this.variableInstances.flatMap(
135037
136012
  (e) => e.toFlatIds(i)
135038
136013
  )
@@ -135077,7 +136052,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135077
136052
  catchesError: this.catchesError,
135078
136053
  constant: this.constant,
135079
136054
  required: this.required,
135080
- defaultValue: ((r = this.defaultValue) == null ? void 0 : r.toJSON(i)) || null,
136055
+ defaultValue: ((r = this.defaultValue) == null ? void 0 : r.toJSON(
136056
+ i
136057
+ )) || null,
135081
136058
  dataType: ((a = this.dataType) == null ? void 0 : a.toJSON(i)) || null,
135082
136059
  readsValue: ((c = this.readsValue) == null ? void 0 : c.toReference()) || null,
135083
136060
  writesValues: this.writesValues.map(
@@ -135101,9 +136078,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135101
136078
  calledBySuccess: this.calledBySuccess.map(
135102
136079
  (f) => f.toReference()
135103
136080
  ),
135104
- calledByError: this.calledByError.map((f) => f.toReference()),
135105
- calledByEntry: this.calledByEntry.map((f) => f.toReference()),
135106
- error: ((e = this.error) == null ? void 0 : e.toJSON(i)) || null,
136081
+ calledByError: this.calledByError.map(
136082
+ (f) => f.toReference()
136083
+ ),
136084
+ calledByEntry: this.calledByEntry.map(
136085
+ (f) => f.toReference()
136086
+ ),
136087
+ error: ((e = this.error) == null ? void 0 : e.toJSON(
136088
+ i
136089
+ )) || null,
135107
136090
  parent: this.parent.toReference(),
135108
136091
  x: this.x,
135109
136092
  y: this.y
@@ -135112,7 +136095,11 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135112
136095
  toJSONClone(i = lt) {
135113
136096
  var a, c, e, f, h, m, b, E, A;
135114
136097
  let r;
135115
- return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || fn(this, this.project, i.uuidStrategy), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
136098
+ return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || fn(
136099
+ this,
136100
+ this.project,
136101
+ i.uuidStrategy
136102
+ ), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
135116
136103
  id: r,
135117
136104
  version: x.UUID.uuid(),
135118
136105
  createdAt: i.timestamp || G().toISOString(),
@@ -135164,7 +136151,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135164
136151
  })
135165
136152
  ),
135166
136153
  internalCalls: this.internalCalls.map(
135167
- (_) => this.calledBy.length || this.readsValue ? _.toJSONClone({ ...i, newId: null }) : _.toReference({ seenEntityMaps: i.seenEntityMaps })
136154
+ (_) => this.calledBy.length || this.readsValue ? _.toJSONClone({ ...i, newId: null }) : _.toReference({
136155
+ seenEntityMaps: i.seenEntityMaps
136156
+ })
135168
136157
  ),
135169
136158
  calledBySuccess: this.calledBySuccess.map(
135170
136159
  (_) => _.toReference({ seenEntityMaps: i.seenEntityMaps })
@@ -135225,11 +136214,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135225
136214
  (m) => m.toReference(i)
135226
136215
  ),
135227
136216
  inputs: this.inputs.map((m) => m.toReference(i)),
135228
- outputs: this.outputs.map((m) => m.toReference(i)),
136217
+ outputs: this.outputs.map(
136218
+ (m) => m.toReference(i)
136219
+ ),
135229
136220
  successCalls: this.successCalls.map(
135230
136221
  (m) => m.toReference(i)
135231
136222
  ),
135232
- errorCalls: this.errorCalls.map((m) => m.toReference(i)),
136223
+ errorCalls: this.errorCalls.map(
136224
+ (m) => m.toReference(i)
136225
+ ),
135233
136226
  calledBySuccess: this.calledBySuccess.map(
135234
136227
  (m) => m.toReference(i)
135235
136228
  ),
@@ -135252,9 +136245,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135252
136245
  this.toShallowJSON(),
135253
136246
  ...((a = this.defaultValue) == null ? void 0 : a.toFlatJSON(i)) || [],
135254
136247
  ...((c = this.dataType) == null ? void 0 : c.toFlatJSON(i)) || [],
135255
- ...this.writesValues.flatMap((e) => e.toFlatJSON(i)),
135256
- ...this.successCalls.flatMap((e) => e.toFlatJSON(i)),
135257
- ...this.errorCalls.flatMap((e) => e.toFlatJSON(i)),
136248
+ ...this.writesValues.flatMap(
136249
+ (e) => e.toFlatJSON(i)
136250
+ ),
136251
+ ...this.successCalls.flatMap(
136252
+ (e) => e.toFlatJSON(i)
136253
+ ),
136254
+ ...this.errorCalls.flatMap(
136255
+ (e) => e.toFlatJSON(i)
136256
+ ),
135258
136257
  ...this.inputs.flatMap((e) => e.toFlatJSON(i)),
135259
136258
  ...this.outputs.flatMap(
135260
136259
  (e) => e.toFlatJSON(i)
@@ -135340,7 +136339,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135340
136339
  a.push(...c);
135341
136340
  }
135342
136341
  if (this.dataType) {
135343
- const c = await this.dataType.getErrorsAsync({ tracker: r });
136342
+ const c = await this.dataType.getErrorsAsync({
136343
+ tracker: r
136344
+ });
135344
136345
  a.push(...c);
135345
136346
  }
135346
136347
  for (const c of this.inputs) {
@@ -135379,7 +136380,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135379
136380
  ), r == null || r.attemptAutoclose("set-default-value", this.id), this;
135380
136381
  const a = this.defaultValue;
135381
136382
  if ((a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id)) {
135382
- if (a == null || a.remove({ ignoreUpstream: !0 }, r), this.defaultValue = i, this.defaultValue) {
136383
+ if (a == null || a.remove(
136384
+ { ignoreUpstream: !0 },
136385
+ r
136386
+ ), this.defaultValue = i, this.defaultValue) {
135383
136387
  const c = this.readsValue;
135384
136388
  this.removeValueWriter(r), c == null || c.removeValueReader(this, r);
135385
136389
  }
@@ -135524,7 +136528,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135524
136528
  const r = [], a = [], c = [], e = [];
135525
136529
  if (this.dataType && !this.dataType.isObject())
135526
136530
  [...this.inputs].forEach((m) => {
135527
- const b = m.remove({ ignoreUpstream: !1 }, i);
136531
+ const b = m.remove(
136532
+ { ignoreUpstream: !1 },
136533
+ i
136534
+ );
135528
136535
  c.push(...b.removed), r.push(...b.updated);
135529
136536
  });
135530
136537
  else if (this.dataType && this.dataType.hasStrictObjectStructure()) {
@@ -135533,18 +136540,27 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135533
136540
  ];
135534
136541
  [...this.inputs].forEach((b) => {
135535
136542
  if (!b.declaration) {
135536
- const A = b.remove({ ignoreUpstream: !1 }, i);
136543
+ const A = b.remove(
136544
+ { ignoreUpstream: !1 },
136545
+ i
136546
+ );
135537
136547
  c.push(...A.removed), r.push(...A.updated);
135538
136548
  return;
135539
136549
  }
135540
136550
  if (!m.find(
135541
136551
  (A) => b.declaration === A
135542
136552
  )) {
135543
- const A = b.remove({ ignoreUpstream: !1 }, i);
136553
+ const A = b.remove(
136554
+ { ignoreUpstream: !1 },
136555
+ i
136556
+ );
135544
136557
  c.push(...A.removed), r.push(...A.updated);
135545
136558
  }
135546
136559
  if (!aC(b)) {
135547
- const A = b.remove({ ignoreUpstream: !1 }, i);
136560
+ const A = b.remove(
136561
+ { ignoreUpstream: !1 },
136562
+ i
136563
+ );
135548
136564
  c.push(...A.removed), r.push(...A.updated);
135549
136565
  }
135550
136566
  });
@@ -135564,9 +136580,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135564
136580
  D.RemoveUnrecognizedInputs,
135565
136581
  this.id
135566
136582
  ), {
135567
- updated: C(r),
135568
- added: C(a),
135569
- removed: C(c),
136583
+ updated: C(
136584
+ r
136585
+ ),
136586
+ added: C(
136587
+ a
136588
+ ),
136589
+ removed: C(
136590
+ c
136591
+ ),
135570
136592
  affected: C(
135571
136593
  e
135572
136594
  ),
@@ -135601,7 +136623,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135601
136623
  const r = [], a = [], c = [], e = [];
135602
136624
  if (this.dataType && !this.dataType.isObject())
135603
136625
  [...this.outputs].forEach((m) => {
135604
- const b = m.remove({ ignoreUpstream: !1 }, i);
136626
+ const b = m.remove(
136627
+ { ignoreUpstream: !1 },
136628
+ i
136629
+ );
135605
136630
  c.push(...b.removed), r.push(...b.updated);
135606
136631
  });
135607
136632
  else if (this.dataType && this.dataType.hasStrictObjectStructure()) {
@@ -135610,7 +136635,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135610
136635
  ];
135611
136636
  [...this.outputs].forEach((b) => {
135612
136637
  if (!b.declaration) {
135613
- const A = b.remove({ ignoreUpstream: !1 }, i);
136638
+ const A = b.remove(
136639
+ { ignoreUpstream: !1 },
136640
+ i
136641
+ );
135614
136642
  c.push(...A.removed), r.push(...A.updated);
135615
136643
  return;
135616
136644
  }
@@ -135620,12 +136648,18 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135620
136648
  return ((_ = b.declaration) == null ? void 0 : _.id) === (A == null ? void 0 : A.id);
135621
136649
  }
135622
136650
  )) {
135623
- const A = b.remove({ ignoreUpstream: !1 }, i);
136651
+ const A = b.remove(
136652
+ { ignoreUpstream: !1 },
136653
+ i
136654
+ );
135624
136655
  c.push(...A.removed), r.push(...A.updated);
135625
136656
  return;
135626
136657
  }
135627
136658
  if (!aC(b)) {
135628
- const A = b.remove({ ignoreUpstream: !1 }, i);
136659
+ const A = b.remove(
136660
+ { ignoreUpstream: !1 },
136661
+ i
136662
+ );
135629
136663
  c.push(...A.removed), r.push(...A.updated);
135630
136664
  }
135631
136665
  });
@@ -135645,9 +136679,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135645
136679
  "remove-unrecognized-variable-declaration-outputs",
135646
136680
  this.id
135647
136681
  ), {
135648
- updated: C(r),
135649
- added: C(a),
135650
- removed: C(c),
136682
+ updated: C(
136683
+ r
136684
+ ),
136685
+ added: C(
136686
+ a
136687
+ ),
136688
+ removed: C(
136689
+ c
136690
+ ),
135651
136691
  affected: C(
135652
136692
  e
135653
136693
  ),
@@ -135721,18 +136761,31 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135721
136761
  if (b === -1)
135722
136762
  return !1;
135723
136763
  const E = this.internalCalls[b];
135724
- return G(E == null ? void 0 : E.createdAt).isSame(G(h.createdAt)) ? m > b : !!G(E == null ? void 0 : E.createdAt).isAfter(h.createdAt);
136764
+ return G(E == null ? void 0 : E.createdAt).isSame(
136765
+ G(h.createdAt)
136766
+ ) ? m > b : !!G(E == null ? void 0 : E.createdAt).isAfter(
136767
+ h.createdAt
136768
+ );
135725
136769
  }
135726
136770
  ).forEach((h) => {
135727
- const m = h.remove({ ignoreUpstream: !1 }, i);
136771
+ const m = h.remove(
136772
+ { ignoreUpstream: !1 },
136773
+ i
136774
+ );
135728
136775
  c.push(...m.removed), r.push(...m.updated);
135729
136776
  }), i == null || i.attemptAutoclose(
135730
136777
  "remove-unrecognized-variable-declaration-internal-calls",
135731
136778
  this.id
135732
136779
  ), {
135733
- updated: C(r),
135734
- added: C(a),
135735
- removed: C(c),
136780
+ updated: C(
136781
+ r
136782
+ ),
136783
+ added: C(
136784
+ a
136785
+ ),
136786
+ removed: C(
136787
+ c
136788
+ ),
135736
136789
  affected: C(
135737
136790
  e
135738
136791
  ),
@@ -135801,7 +136854,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135801
136854
  });
135802
136855
  }
135803
136856
  } else
135804
- return i == null || i.attemptAutoclose("sync-variable-declaration-inputs", this.id), {
136857
+ return i == null || i.attemptAutoclose(
136858
+ "sync-variable-declaration-inputs",
136859
+ this.id
136860
+ ), {
135805
136861
  added: [],
135806
136862
  updated: [],
135807
136863
  removed: [],
@@ -135809,7 +136865,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135809
136865
  self: this
135810
136866
  };
135811
136867
  else
135812
- return i == null || i.attemptAutoclose("sync-variable-declaration-inputs", this.id), {
136868
+ return i == null || i.attemptAutoclose(
136869
+ "sync-variable-declaration-inputs",
136870
+ this.id
136871
+ ), {
135813
136872
  added: [],
135814
136873
  updated: [],
135815
136874
  removed: [],
@@ -135823,10 +136882,19 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135823
136882
  removed: b
135824
136883
  } = f.afterAllChildrenInitialized(i);
135825
136884
  a.push(...h), r.push(...m), c.push(...b);
135826
- }), this.inputs.sort((f, h) => f.index - h.index), i == null || i.attemptAutoclose("sync-variable-declaration-inputs", this.id), {
135827
- added: C(r),
135828
- updated: C(a),
135829
- removed: C(c),
136885
+ }), this.inputs.sort((f, h) => f.index - h.index), i == null || i.attemptAutoclose(
136886
+ "sync-variable-declaration-inputs",
136887
+ this.id
136888
+ ), {
136889
+ added: C(
136890
+ r
136891
+ ),
136892
+ updated: C(
136893
+ a
136894
+ ),
136895
+ removed: C(
136896
+ c
136897
+ ),
135830
136898
  affected: C(
135831
136899
  e
135832
136900
  ),
@@ -135846,7 +136914,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135846
136914
  if (!this.checkCanEdit(this, i))
135847
136915
  return ce.warn(
135848
136916
  `[syncOutputs] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
135849
- ), i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
136917
+ ), i == null || i.attemptAutoclose(
136918
+ D.SyncOutputs,
136919
+ this.id
136920
+ ), {
135850
136921
  updated: [],
135851
136922
  added: [],
135852
136923
  removed: [],
@@ -135896,7 +136967,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135896
136967
  });
135897
136968
  }
135898
136969
  } else
135899
- return i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
136970
+ return i == null || i.attemptAutoclose(
136971
+ D.SyncOutputs,
136972
+ this.id
136973
+ ), {
135900
136974
  added: [],
135901
136975
  updated: [],
135902
136976
  removed: [],
@@ -135904,7 +136978,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135904
136978
  self: this
135905
136979
  };
135906
136980
  else
135907
- return i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
136981
+ return i == null || i.attemptAutoclose(
136982
+ D.SyncOutputs,
136983
+ this.id
136984
+ ), {
135908
136985
  added: [],
135909
136986
  updated: [],
135910
136987
  removed: [],
@@ -135919,9 +136996,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135919
136996
  } = f.afterAllChildrenInitialized(i);
135920
136997
  a.push(...h), r.push(...m), c.push(...b);
135921
136998
  }), this.outputs.sort((f, h) => f.index - h.index), i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
135922
- added: C(r),
135923
- updated: C(a),
135924
- removed: C(c),
136999
+ added: C(
137000
+ r
137001
+ ),
137002
+ updated: C(
137003
+ a
137004
+ ),
137005
+ removed: C(
137006
+ c
137007
+ ),
135925
137008
  affected: C(
135926
137009
  e
135927
137010
  ),
@@ -135956,19 +137039,23 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135956
137039
  ].filter((b) => !f.some((E) => {
135957
137040
  var A, _;
135958
137041
  return E.id !== b.id && (((A = E.implements) == null ? void 0 : A.id) === b.id || ((_ = E.extends) == null ? void 0 : _.id) === b.id);
135959
- }) && !b.deleted).filter((b) => !this.internalCalls.find((A) => {
135960
- var N, V, B, M, U;
135961
- return (((N = A.declaration) == null ? void 0 : N.id) || ((B = (V = A.initialData) == null ? void 0 : V.declaration) == null ? void 0 : B.entityId) || ((U = (M = A.initialData) == null ? void 0 : M.declaration) == null ? void 0 : U.id)) === b.id;
135962
- })).forEach((b) => {
137042
+ }) && !b.deleted).filter((b) => !this.internalCalls.find(
137043
+ (A) => {
137044
+ var N, V, B, M, U;
137045
+ return (((N = A.declaration) == null ? void 0 : N.id) || ((B = (V = A.initialData) == null ? void 0 : V.declaration) == null ? void 0 : B.entityId) || ((U = (M = A.initialData) == null ? void 0 : M.declaration) == null ? void 0 : U.id)) === b.id;
137046
+ }
137047
+ )).forEach((b) => {
135963
137048
  var A;
135964
- const E = this.internalCalls.find((_) => {
135965
- const N = lh(
135966
- _.declaration
135967
- ), V = lh(
135968
- b
135969
- );
135970
- return N.id === V.id;
135971
- });
137049
+ const E = this.internalCalls.find(
137050
+ (_) => {
137051
+ const N = lh(
137052
+ _.declaration
137053
+ ), V = lh(
137054
+ b
137055
+ );
137056
+ return N.id === V.id;
137057
+ }
137058
+ );
135972
137059
  if (E && ((A = E.declaration) == null ? void 0 : A.id) !== b.id)
135973
137060
  E.setDeclaration(b);
135974
137061
  else {
@@ -135978,7 +137065,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135978
137065
  });
135979
137066
  }
135980
137067
  } else
135981
- return i == null || i.attemptAutoclose("generate-unused-internal-calls", this.id), {
137068
+ return i == null || i.attemptAutoclose(
137069
+ "generate-unused-internal-calls",
137070
+ this.id
137071
+ ), {
135982
137072
  added: [],
135983
137073
  updated: [],
135984
137074
  removed: [],
@@ -135986,7 +137076,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135986
137076
  self: this
135987
137077
  };
135988
137078
  else
135989
- return i == null || i.attemptAutoclose("generate-unused-internal-calls", this.id), {
137079
+ return i == null || i.attemptAutoclose(
137080
+ "generate-unused-internal-calls",
137081
+ this.id
137082
+ ), {
135990
137083
  added: [],
135991
137084
  updated: [],
135992
137085
  removed: [],
@@ -135994,9 +137087,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135994
137087
  self: this
135995
137088
  };
135996
137089
  return i == null || i.attemptAutoclose("generate-unused-internal-calls", this.id), {
135997
- added: C(r),
135998
- updated: C(a),
135999
- removed: C(c),
137090
+ added: C(
137091
+ r
137092
+ ),
137093
+ updated: C(
137094
+ a
137095
+ ),
137096
+ removed: C(
137097
+ c
137098
+ ),
136000
137099
  affected: C(
136001
137100
  e
136002
137101
  ),
@@ -136016,9 +137115,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
136016
137115
  if (!this.checkCanEdit(this, r))
136017
137116
  return ce.warn(
136018
137117
  `[setDataType] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
136019
- ), r == null || r.attemptAutoclose(D.SetDataType, this.id), this;
137118
+ ), r == null || r.attemptAutoclose(
137119
+ D.SetDataType,
137120
+ this.id
137121
+ ), this;
136020
137122
  const a = this.dataType;
136021
- return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.dataType = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(D.SetDataType, this.id), this;
137123
+ return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove(
137124
+ { ignoreUpstream: !0 },
137125
+ r
137126
+ ), this.dataType = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(D.SetDataType, this.id), this;
136022
137127
  }
136023
137128
  removeDataType(i = this.project.addChangeSet(
136024
137129
  new Z(
@@ -136030,9 +137135,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
136030
137135
  D.RemoveDataType
136031
137136
  )
136032
137137
  )) {
136033
- return this.checkCanEdit(this, i) ? (this.dataType && (this.dataType.remove({ ignoreUpstream: !0 }, i), i == null || i.add(this, W.Affected), this.dataType = null), i == null || i.attemptAutoclose(D.RemoveDataType, this.id), this) : (ce.warn(
137138
+ return this.checkCanEdit(this, i) ? (this.dataType && (this.dataType.remove({ ignoreUpstream: !0 }, i), i == null || i.add(this, W.Affected), this.dataType = null), i == null || i.attemptAutoclose(
137139
+ D.RemoveDataType,
137140
+ this.id
137141
+ ), this) : (ce.warn(
136034
137142
  `[removeDataType] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
136035
- ), i == null || i.attemptAutoclose(D.RemoveDataType, this.id), this);
137143
+ ), i == null || i.attemptAutoclose(
137144
+ D.RemoveDataType,
137145
+ this.id
137146
+ ), this);
136036
137147
  }
136037
137148
  getDataType(i = this.project.addChangeSet(
136038
137149
  new Z(
@@ -164751,6 +165862,11 @@ Search entities can interpolate values, but the values should come from the 'inp
164751
165862
  var A, _;
164752
165863
  return (b.index ?? ((A = b.declaration) == null ? void 0 : A.index)) - (E.index ?? ((_ = E.declaration) == null ? void 0 : _.index));
164753
165864
  }
165865
+ ), this.errorCalls.length && !this.catchesError && this.metaSync(
165866
+ {
165867
+ catchesError: !1
165868
+ },
165869
+ i
164754
165870
  ), i == null || i.attemptAutoclose(
164755
165871
  D.AfterAllChildrenInitialized,
164756
165872
  this.id
@@ -167691,7 +168807,9 @@ const _i = class _i extends an {
167691
168807
  !0,
167692
168808
  D.CreateFromGenerationTarget
167693
168809
  )
167694
- ) : a, e = te(i.parent), f = r.get(e), h = te(i.declaration), m = r.get(
168810
+ ) : a, e = te(i.parent), f = r.get(e), h = te(
168811
+ i.declaration
168812
+ ), m = r.get(
167695
168813
  h
167696
168814
  ), b = (i.calledByEntry || []).map((V) => {
167697
168815
  const B = te(V);
@@ -167819,9 +168937,10 @@ All 'function-declaration' entities attached as methods to the parent data-type
167819
168937
  )}
167820
168938
  You can reference any of them as the 'delcaration' property on a new 'internal-call' entity.` : _.type === d.DefinitionEntity ? V = `
167821
168939
  This variable's data-type 'entity' is a definition entity which doesn't have any methods attached to it yet.
167822
- You can attach methods to it by creating 'function-declaration' entities which have the entity as its 'parent' field. Then you can reference them as the 'declaration' property on a new 'internal-call' entity in a variable` : [d.BuiltInBaseEntity, d.PrimitiveEntity].includes(
167823
- _.type
167824
- ) && (V = `
168940
+ You can attach methods to it by creating 'function-declaration' entities which have the entity as its 'parent' field. Then you can reference them as the 'declaration' property on a new 'internal-call' entity in a variable` : [
168941
+ d.BuiltInBaseEntity,
168942
+ d.PrimitiveEntity
168943
+ ].includes(_.type) && (V = `
167825
168944
  This variable's data-type 'entity' is a ${_.type} which doesn't have any methods attached to it yet.
167826
168945
  Built-in entity types can't have methods attached to them by the user. They are predefined entities that can't be modified. You can reference them as the 'declaration' property on a new 'internal-call' entity in a variable`) : _.type === d.DefinitionEntity ? (V = `
167827
168946
  This variable's data-type 'entity' is a definition entity which extends or implements a non-interactive 'built-in-base-entity'.`, c.push({
@@ -167846,7 +168965,9 @@ This variable's data-type 'entity' is a non-interactive 'built-in-base-entity'.`
167846
168965
  );
167847
168966
  else {
167848
168967
  const U = [];
167849
- [d.DefinitionEntity].includes(_.type) && U.push(
168968
+ [d.DefinitionEntity].includes(
168969
+ _.type
168970
+ ) && U.push(
167850
168971
  ..._.getAllInteractiveMethods()
167851
168972
  );
167852
168973
  const K = U.find(
@@ -167883,7 +169004,10 @@ If you need a completly new internal-call created along side a new variable-inst
167883
169004
  const E = sn(
167884
169005
  a
167885
169006
  );
167886
- return e.push(...f.errors, ...E.errors), c.push(...E.explanations), {
169007
+ return e.push(
169008
+ ...f.errors,
169009
+ ...E.errors
169010
+ ), c.push(...E.explanations), {
167887
169011
  errors: e,
167888
169012
  explanations: c,
167889
169013
  modifiedData: a
@@ -167929,9 +169053,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
167929
169053
  const h = f.entity.afterAllChildrenInitialized(i);
167930
169054
  r.push(...h.updated), a.push(...h.added), c.push(...h.removed), e.push(...h.affected);
167931
169055
  }), i == null || i.attemptAutoclose("sync-dependents", this.id), {
167932
- updated: C(r),
167933
- added: C(a),
167934
- removed: C(c),
169056
+ updated: C(
169057
+ r
169058
+ ),
169059
+ added: C(
169060
+ a
169061
+ ),
169062
+ removed: C(
169063
+ c
169064
+ ),
167935
169065
  affected: C(
167936
169066
  e
167937
169067
  ),
@@ -167951,9 +169081,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
167951
169081
  c.push(...m), e.push(...b), f.push(...E);
167952
169082
  }
167953
169083
  return {
167954
- updated: C(c),
167955
- added: C(e),
167956
- removed: C(f),
169084
+ updated: C(
169085
+ c
169086
+ ),
169087
+ added: C(
169088
+ e
169089
+ ),
169090
+ removed: C(
169091
+ f
169092
+ ),
167957
169093
  affected: C(
167958
169094
  h
167959
169095
  ),
@@ -167973,9 +169109,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
167973
169109
  c.push(...m), e.push(...b), f.push(...E);
167974
169110
  }
167975
169111
  return {
167976
- updated: C(c),
167977
- added: C(e),
167978
- removed: C(f),
169112
+ updated: C(
169113
+ c
169114
+ ),
169115
+ added: C(
169116
+ e
169117
+ ),
169118
+ removed: C(
169119
+ f
169120
+ ),
167979
169121
  affected: C(
167980
169122
  h
167981
169123
  ),
@@ -168039,7 +169181,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168039
169181
  return this.knownVersions = this.knownVersions ? this.knownVersions.set(this.version, i) : (/* @__PURE__ */ new Map()).set(this.version, i), this.apply(i), this;
168040
169182
  }
168041
169183
  snapshot() {
168042
- const i = new _i(this, this.project);
169184
+ const i = new _i(
169185
+ this,
169186
+ this.project
169187
+ );
168043
169188
  return this.apply(i);
168044
169189
  }
168045
169190
  /**
@@ -168062,9 +169207,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168062
169207
  r.push(this.parent, ...f.updated), a.push(...f.added), c.push(...f.removed);
168063
169208
  }
168064
169209
  return {
168065
- updated: C(r),
168066
- added: C(a),
168067
- removed: C(c),
169210
+ updated: C(
169211
+ r
169212
+ ),
169213
+ added: C(
169214
+ a
169215
+ ),
169216
+ removed: C(
169217
+ c
169218
+ ),
168068
169219
  affected: C(
168069
169220
  e
168070
169221
  ),
@@ -168087,7 +169238,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168087
169238
  updated: C(
168088
169239
  a
168089
169240
  ),
168090
- added: C(c),
169241
+ added: C(
169242
+ c
169243
+ ),
168091
169244
  removed: C(
168092
169245
  e
168093
169246
  ),
@@ -168123,9 +169276,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168123
169276
  );
168124
169277
  }
168125
169278
  return this.metaSync(h.toShallowJSON(), null), this.previousVersion = h.previousVersion, this.version = h.version, this.createdAt = h.createdAt, this.author = h.author, this.deleted = h.deleted, this.inputs = [...h.inputs], this.outputs = [...h.outputs], this.error = h.error, this.successCalls = [...h.successCalls], this.errorCalls = [...h.errorCalls], this.calledBySuccess = [...h.calledBySuccess], this.calledByError = [...h.calledByError], this.calledByEntry = [...h.calledByEntry], this.writesValues = [...h.writesValues], this.declaration = h.declaration, this.parent = h.parent, {
168126
- updated: C(a),
168127
- added: C(c),
168128
- removed: C(e),
169279
+ updated: C(
169280
+ a
169281
+ ),
169282
+ added: C(
169283
+ c
169284
+ ),
169285
+ removed: C(
169286
+ e
169287
+ ),
168129
169288
  affected: C(
168130
169289
  f
168131
169290
  ),
@@ -168164,7 +169323,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168164
169323
  throw r == null || r.attemptAutoclose(
168165
169324
  D.UpdateWithShallowTransfer,
168166
169325
  this.id
168167
- ), new Error(`${this.type} with id '${this.id}' must have a 'parent'`);
169326
+ ), new Error(
169327
+ `${this.type} with id '${this.id}' must have a 'parent'`
169328
+ );
168168
169329
  if (i.declaration) {
168169
169330
  const a = te(
168170
169331
  i.declaration
@@ -168180,7 +169341,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168180
169341
  `${this.type} with id '${this.id}' must have a 'declaration'`
168181
169342
  );
168182
169343
  return i.calledByEntry.forEach((a) => {
168183
- const c = te(a), e = this.project.get(c);
169344
+ const c = te(a), e = this.project.get(
169345
+ c
169346
+ );
168184
169347
  e && (this.addEntryCaller(e, r), e.addCall(this, r));
168185
169348
  }), [...this.calledByEntry].forEach((a) => {
168186
169349
  i.calledByEntry.find(
@@ -168219,7 +169382,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168219
169382
  (e) => te(e) === a.id
168220
169383
  ) || (this.removeInput(a, r), a.removeFromParent(r));
168221
169384
  }), i.writesValues.forEach((a) => {
168222
- const c = te(a), e = this.project.get(c);
169385
+ const c = te(a), e = this.project.get(
169386
+ c
169387
+ );
168223
169388
  e && (this.addValueReader(e, r), e.setValueWriter(this, r));
168224
169389
  }), [...this.writesValues].forEach((a) => {
168225
169390
  i.writesValues.find(
@@ -168275,7 +169440,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168275
169440
  `${this.type} with id '${this.id}' must have a 'declaration'`
168276
169441
  );
168277
169442
  return (a = i.calledByEntry) == null || a.forEach((f) => {
168278
- const h = te(f), m = this.project.get(h);
169443
+ const h = te(f), m = this.project.get(
169444
+ h
169445
+ );
168279
169446
  if (m)
168280
169447
  this.addEntryCaller(m, r), m.addCall(this, r);
168281
169448
  else
@@ -168335,7 +169502,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168335
169502
  `${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`
168336
169503
  );
168337
169504
  } else
168338
- throw new Error(`${this.type} with id '${this.id}' must have a 'parent'`);
169505
+ throw new Error(
169506
+ `${this.type} with id '${this.id}' must have a 'parent'`
169507
+ );
168339
169508
  if (this.initialData.declaration) {
168340
169509
  const e = te(
168341
169510
  this.initialData.declaration
@@ -168353,7 +169522,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168353
169522
  `${this.type} with id '${this.id}' must have a 'declaration'`
168354
169523
  );
168355
169524
  return this.initialData.calledByEntry.forEach((e) => {
168356
- const f = te(e), h = this.project.get(f);
169525
+ const f = te(e), h = this.project.get(
169526
+ f
169527
+ );
168357
169528
  h && this.addEntryCaller(h, null);
168358
169529
  }), this.initialData.calledBySuccess.forEach((e) => {
168359
169530
  const f = te(e), h = this.project.get(
@@ -168366,9 +169537,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168366
169537
  );
168367
169538
  h && this.addErrorCaller(h, null);
168368
169539
  }), {
168369
- updated: C(i),
168370
- added: C(r),
168371
- removed: C(a),
169540
+ updated: C(
169541
+ i
169542
+ ),
169543
+ added: C(
169544
+ r
169545
+ ),
169546
+ removed: C(
169547
+ a
169548
+ ),
168372
169549
  affected: C(
168373
169550
  c
168374
169551
  ),
@@ -168433,13 +169610,24 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168433
169610
  var U, K;
168434
169611
  return (B.index ?? ((U = B.declaration) == null ? void 0 : U.index)) - (M.index ?? ((K = M.declaration) == null ? void 0 : K.index));
168435
169612
  }
169613
+ ), this.errorCalls.length && !this.catchesError && this.metaSync(
169614
+ {
169615
+ catchesError: !1
169616
+ },
169617
+ i
168436
169618
  ), i == null || i.attemptAutoclose(
168437
169619
  D.AfterAllChildrenInitialized,
168438
169620
  this.id
168439
169621
  ), {
168440
- updated: C(r),
168441
- added: C(a),
168442
- removed: C(c),
169622
+ updated: C(
169623
+ r
169624
+ ),
169625
+ added: C(
169626
+ a
169627
+ ),
169628
+ removed: C(
169629
+ c
169630
+ ),
168443
169631
  affected: C(
168444
169632
  e
168445
169633
  ),
@@ -168469,9 +169657,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168469
169657
  }), this.calledByEntry.forEach((f) => {
168470
169658
  f.addCall(this, i), r.push(f);
168471
169659
  }), this.subscribe(), this.subscribeToDependencies(), i == null || i.attemptAutoclose("add-self-to-project", this.id), {
168472
- updated: C(r),
168473
- added: C(a),
168474
- removed: C(c),
169660
+ updated: C(
169661
+ r
169662
+ ),
169663
+ added: C(
169664
+ a
169665
+ ),
169666
+ removed: C(
169667
+ c
169668
+ ),
168475
169669
  affected: C(
168476
169670
  e
168477
169671
  ),
@@ -168499,7 +169693,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168499
169693
  if (!this.checkCanEdit(this, r))
168500
169694
  return ce.warn(
168501
169695
  `[removeInput] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
168502
- ), r == null || r.attemptAutoclose(D.RemoveInput, this.id), this;
169696
+ ), r == null || r.attemptAutoclose(
169697
+ D.RemoveInput,
169698
+ this.id
169699
+ ), this;
168503
169700
  const a = this.inputs.findIndex((c) => c.id === i.id);
168504
169701
  return a > -1 && (this.inputs.splice(a, 1), r && (r == null || r.add(this, W.Affected))), r == null || r.attemptAutoclose(D.RemoveInput, this.id), this;
168505
169702
  }
@@ -168545,7 +169742,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168545
169742
  return ce.warn(
168546
169743
  `[removeOutput] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
168547
169744
  ), r == null || r.attemptAutoclose("remove-output", this.id), this;
168548
- const a = this.outputs.findIndex((c) => c.id === i.id);
169745
+ const a = this.outputs.findIndex(
169746
+ (c) => c.id === i.id
169747
+ );
168549
169748
  return a > -1 && (this.outputs.splice(a, 1), r && (r == null || r.add(this, W.Affected))), r == null || r.attemptAutoclose("remove-output", this.id), this;
168550
169749
  }
168551
169750
  // Subscribes one given entity as one of entity's writesValues
@@ -168581,7 +169780,13 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168581
169780
  counterpart: this,
168582
169781
  errorReason: Be.ValueReadingOverridesConstantVariable,
168583
169782
  rootAction: !1
168584
- }), r == null || r.attemptAutoclose(D.AddValueReader, this.id), this) : this.writesValues.includes(i) ? (r == null || r.attemptAutoclose(D.AddValueReader, this.id), this) : (this.writesValues.push(i), r == null || r.add(this, W.Affected), this);
169783
+ }), r == null || r.attemptAutoclose(
169784
+ D.AddValueReader,
169785
+ this.id
169786
+ ), this) : this.writesValues.includes(i) ? (r == null || r.attemptAutoclose(
169787
+ D.AddValueReader,
169788
+ this.id
169789
+ ), this) : (this.writesValues.push(i), r == null || r.add(this, W.Affected), this);
168585
169790
  }
168586
169791
  removeValueReader(i, r = this.project.addChangeSet(
168587
169792
  new Z(
@@ -168627,7 +169832,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168627
169832
  owner: this,
168628
169833
  errorReason: Be.CannotSuccessCallItself,
168629
169834
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddSuccessCaller
168630
- })), this.calledBySuccess.find((e) => e.id === i.id) || (this.calledBySuccess.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddSuccessCaller, this.id), this) : this;
169835
+ })), this.calledBySuccess.find((e) => e.id === i.id) || (this.calledBySuccess.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
169836
+ D.AddSuccessCaller,
169837
+ this.id
169838
+ ), this) : this;
168631
169839
  }
168632
169840
  addErrorCaller(i, r = this.project.addChangeSet(
168633
169841
  new Z(
@@ -168651,7 +169859,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168651
169859
  owner: this,
168652
169860
  errorReason: Be.CannotErrorCallItself,
168653
169861
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddErrorCaller
168654
- })), this.calledByError.find((e) => e.id === i.id) || (this.calledByError.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddErrorCaller, this.id), this) : this;
169862
+ })), this.calledByError.find((e) => e.id === i.id) || (this.calledByError.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
169863
+ D.AddErrorCaller,
169864
+ this.id
169865
+ ), this) : this;
168655
169866
  }
168656
169867
  addEntryCaller(i, r = this.project.addChangeSet(
168657
169868
  new Z(
@@ -168675,7 +169886,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168675
169886
  owner: this,
168676
169887
  errorReason: Be.CannotEntryCallItself,
168677
169888
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddEntryCaller
168678
- })), this.calledByEntry.find((e) => e.id === i.id) || (this.calledByEntry.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddEntryCaller, this.id), this) : this;
169889
+ })), this.calledByEntry.find((e) => e.id === i.id) || (this.calledByEntry.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
169890
+ D.AddEntryCaller,
169891
+ this.id
169892
+ ), this) : this;
168679
169893
  }
168680
169894
  addErrorCall(i, r = this.project.addChangeSet(
168681
169895
  new Z(
@@ -168763,7 +169977,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168763
169977
  (h) => h.id !== i.id
168764
169978
  )), r == null || r.add(this, W.Affected);
168765
169979
  }
168766
- return r == null || r.attemptAutoclose(D.AddSuccessCall, this.id), this;
169980
+ return r == null || r.attemptAutoclose(
169981
+ D.AddSuccessCall,
169982
+ this.id
169983
+ ), this;
168767
169984
  }
168768
169985
  removeCall(i, r = this.project.addChangeSet(
168769
169986
  new Z(
@@ -168821,9 +170038,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168821
170038
  if (!this.checkCanEdit(this, r))
168822
170039
  return ce.warn(
168823
170040
  `[setError] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
168824
- ), r == null || r.attemptAutoclose(D.SetErrorEntity, this.id), this;
170041
+ ), r == null || r.attemptAutoclose(
170042
+ D.SetErrorEntity,
170043
+ this.id
170044
+ ), this;
168825
170045
  const a = this.error;
168826
- return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.error = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(D.SetErrorEntity, this.id), this;
170046
+ return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.error = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(
170047
+ D.SetErrorEntity,
170048
+ this.id
170049
+ ), this;
168827
170050
  }
168828
170051
  setParent(i, r = this.project.addChangeSet(
168829
170052
  new Z(
@@ -168874,7 +170097,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168874
170097
  );
168875
170098
  this.parent.setParent(c, null);
168876
170099
  } else if (!a && !this.parent.calledBy.length)
168877
- throw new Error("Parent of internal call parent could not be resolved");
170100
+ throw new Error(
170101
+ "Parent of internal call parent could not be resolved"
170102
+ );
168878
170103
  }
168879
170104
  return this.declaration = ge(
168880
170105
  this.initialData.declaration,
@@ -168884,9 +170109,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168884
170109
  r,
168885
170110
  this.project
168886
170111
  );
168887
- if (a.addSuccessCaller(this, null), [d.BreakStatement, d.ContinueStatement].includes(
168888
- a.type
168889
- ))
170112
+ if (a.addSuccessCaller(this, null), [
170113
+ d.BreakStatement,
170114
+ d.ContinueStatement
170115
+ ].includes(a.type))
168890
170116
  a.setParent(
168891
170117
  this.parent.parent,
168892
170118
  null
@@ -168905,9 +170131,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168905
170131
  r,
168906
170132
  this.project
168907
170133
  );
168908
- if (a.addErrorCaller(this, null), [d.BreakStatement, d.ContinueStatement].includes(
168909
- a.type
168910
- ))
170134
+ if (a.addErrorCaller(this, null), [
170135
+ d.BreakStatement,
170136
+ d.ContinueStatement
170137
+ ].includes(a.type))
168911
170138
  a.setParent(
168912
170139
  this.parent.parent.parent,
168913
170140
  null
@@ -169021,10 +170248,19 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169021
170248
  self: this
169022
170249
  };
169023
170250
  const r = [], a = [], c = [], e = [];
169024
- return this.parent && (this.parent.removeInternalCall(this, i), e.push(this.parent)), i == null || i.attemptAutoclose(D.RemoveFromParent, this.id), {
169025
- added: C(c),
169026
- updated: C(r),
169027
- removed: C(a),
170251
+ return this.parent && (this.parent.removeInternalCall(this, i), e.push(this.parent)), i == null || i.attemptAutoclose(
170252
+ D.RemoveFromParent,
170253
+ this.id
170254
+ ), {
170255
+ added: C(
170256
+ c
170257
+ ),
170258
+ updated: C(
170259
+ r
170260
+ ),
170261
+ removed: C(
170262
+ a
170263
+ ),
169028
170264
  affected: C(
169029
170265
  e
169030
170266
  ),
@@ -169058,7 +170294,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169058
170294
  owner: this,
169059
170295
  errorReason: Be.ActionOwnerEntityNonDeletable,
169060
170296
  rootAction: ((h = r == null ? void 0 : r.self) == null ? void 0 : h.id) === this.id && (r == null ? void 0 : r.actionName) === D.RemoveEntity
169061
- }), r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
170297
+ }), r == null || r.attemptAutoclose(
170298
+ D.RemoveEntity,
170299
+ this.id
170300
+ ), {
169062
170301
  added: [],
169063
170302
  updated: [],
169064
170303
  removed: [],
@@ -169067,7 +170306,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169067
170306
  };
169068
170307
  const a = [], c = [], e = [], f = [];
169069
170308
  if (r != null && r.hasRemoved(this.id))
169070
- return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
170309
+ return r == null || r.attemptAutoclose(
170310
+ D.RemoveEntity,
170311
+ this.id
170312
+ ), {
169071
170313
  added: [],
169072
170314
  updated: [],
169073
170315
  removed: [],
@@ -169121,9 +170363,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169121
170363
  });
169122
170364
  }
169123
170365
  return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
169124
- added: C(e),
169125
- updated: C(a),
169126
- removed: C(c),
170366
+ added: C(
170367
+ e
170368
+ ),
170369
+ updated: C(
170370
+ a
170371
+ ),
170372
+ removed: C(
170373
+ c
170374
+ ),
169127
170375
  affected: C(
169128
170376
  f
169129
170377
  ),
@@ -169146,9 +170394,27 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169146
170394
  if (!this.checkCanEdit(this, i))
169147
170395
  return ce.warn(
169148
170396
  `[restore] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
169149
- ), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), { added: [], updated: [], removed: [], affected: [], self: this };
170397
+ ), i == null || i.attemptAutoclose(
170398
+ D.RestoreEntity,
170399
+ this.id
170400
+ ), {
170401
+ added: [],
170402
+ updated: [],
170403
+ removed: [],
170404
+ affected: [],
170405
+ self: this
170406
+ };
169150
170407
  const r = [], a = [], c = [], e = [];
169151
- return i != null && i.hasAdded(this.id) ? (i == null || i.attemptAutoclose(D.RestoreEntity, this.id), { added: [], updated: [], removed: [], affected: [], self: this }) : (this.subscribe(), this.project.unsubscribeDeletedInstance(this), this.metaSync({ deleted: !1 }, i), Object.values(this.detachedDependents).forEach((f) => {
170408
+ return i != null && i.hasAdded(this.id) ? (i == null || i.attemptAutoclose(
170409
+ D.RestoreEntity,
170410
+ this.id
170411
+ ), {
170412
+ added: [],
170413
+ updated: [],
170414
+ removed: [],
170415
+ affected: [],
170416
+ self: this
170417
+ }) : (this.subscribe(), this.project.unsubscribeDeletedInstance(this), this.metaSync({ deleted: !1 }, i), Object.values(this.detachedDependents).forEach((f) => {
169152
170418
  const {
169153
170419
  updated: h,
169154
170420
  removed: m,
@@ -169176,9 +170442,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169176
170442
  }), this.calledByEntry.forEach((f) => {
169177
170443
  a.push(f), f.addCall(this, i);
169178
170444
  }), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), {
169179
- added: C(r),
169180
- updated: C(a),
169181
- removed: C(c),
170445
+ added: C(
170446
+ r
170447
+ ),
170448
+ updated: C(
170449
+ a
170450
+ ),
170451
+ removed: C(
170452
+ c
170453
+ ),
169182
170454
  affected: C(
169183
170455
  e
169184
170456
  ),
@@ -169188,10 +170460,14 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169188
170460
  toFlat(i = /* @__PURE__ */ new Set()) {
169189
170461
  return i.has(this.id) ? [] : (i.add(this.id), [
169190
170462
  this,
169191
- ...this.successCalls.flatMap((a) => a.toFlat(i)),
170463
+ ...this.successCalls.flatMap(
170464
+ (a) => a.toFlat(i)
170465
+ ),
169192
170466
  ...this.errorCalls.flatMap((a) => a.toFlat(i)),
169193
170467
  ...this.inputs.flatMap((a) => a.toFlat(i)),
169194
- ...this.outputs.flatMap((a) => a.toFlat(i)),
170468
+ ...this.outputs.flatMap(
170469
+ (a) => a.toFlat(i)
170470
+ ),
169195
170471
  ...this.calledBy.flatMap((a) => a.toFlat(i)),
169196
170472
  ...this.error ? this.error.toFlat(i) : [],
169197
170473
  ...this.parent.toFlat(i)
@@ -169200,11 +170476,19 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169200
170476
  toFlatIds(i = /* @__PURE__ */ new Set()) {
169201
170477
  return i.has(this.id) ? [] : (i.add(this.id), [
169202
170478
  this.id,
169203
- ...this.successCalls.flatMap((a) => a.toFlatIds(i)),
169204
- ...this.errorCalls.flatMap((a) => a.toFlatIds(i)),
170479
+ ...this.successCalls.flatMap(
170480
+ (a) => a.toFlatIds(i)
170481
+ ),
170482
+ ...this.errorCalls.flatMap(
170483
+ (a) => a.toFlatIds(i)
170484
+ ),
169205
170485
  ...this.inputs.flatMap((a) => a.toFlatIds(i)),
169206
- ...this.outputs.flatMap((a) => a.toFlatIds(i)),
169207
- ...this.calledBy.flatMap((a) => a.toFlatIds(i)),
170486
+ ...this.outputs.flatMap(
170487
+ (a) => a.toFlatIds(i)
170488
+ ),
170489
+ ...this.calledBy.flatMap(
170490
+ (a) => a.toFlatIds(i)
170491
+ ),
169208
170492
  ...this.error ? this.error.toFlatIds(i) : [],
169209
170493
  ...this.parent.toFlatIds(i)
169210
170494
  ]);
@@ -169247,8 +170531,12 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169247
170531
  calledBySuccess: this.calledBySuccess.map(
169248
170532
  (a) => a.toReference()
169249
170533
  ),
169250
- calledByError: this.calledByError.map((a) => a.toReference()),
169251
- calledByEntry: this.calledByEntry.map((a) => a.toReference()),
170534
+ calledByError: this.calledByError.map(
170535
+ (a) => a.toReference()
170536
+ ),
170537
+ calledByEntry: this.calledByEntry.map(
170538
+ (a) => a.toReference()
170539
+ ),
169252
170540
  writesValues: this.writesValues.map(
169253
170541
  (a) => a.toJSON(i)
169254
170542
  ),
@@ -169270,7 +170558,11 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169270
170558
  toJSONClone(i = lt) {
169271
170559
  var a, c, e, f, h, m;
169272
170560
  let r;
169273
- return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || fn(this, this.project, i.uuidStrategy), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
170561
+ return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || fn(
170562
+ this,
170563
+ this.project,
170564
+ i.uuidStrategy
170565
+ ), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
169274
170566
  id: r,
169275
170567
  version: x.UUID.uuid(),
169276
170568
  createdAt: i.timestamp || G().toISOString(),
@@ -169326,7 +170618,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169326
170618
  ...i,
169327
170619
  newId: null
169328
170620
  }),
169329
- parent: this.parent.calledBy.length || this.parent.readsValue ? this.parent.toReference({ seenEntityMaps: i.seenEntityMaps }) : this.parent.toJSONClone({ ...i, newId: null })
170621
+ parent: this.parent.calledBy.length || this.parent.readsValue ? this.parent.toReference({
170622
+ seenEntityMaps: i.seenEntityMaps
170623
+ }) : this.parent.toJSONClone({ ...i, newId: null })
169330
170624
  });
169331
170625
  }
169332
170626
  toReference(i = lt) {
@@ -169359,12 +170653,16 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169359
170653
  (c) => c.toReference(i)
169360
170654
  ),
169361
170655
  inputs: this.inputs.map((c) => c.toReference(i)),
169362
- outputs: this.outputs.map((c) => c.toReference(i)),
170656
+ outputs: this.outputs.map(
170657
+ (c) => c.toReference(i)
170658
+ ),
169363
170659
  declaration: this.declaration.toReference(i),
169364
170660
  successCalls: this.successCalls.map(
169365
170661
  (c) => c.toReference(i)
169366
170662
  ),
169367
- errorCalls: this.errorCalls.map((c) => c.toReference(i)),
170663
+ errorCalls: this.errorCalls.map(
170664
+ (c) => c.toReference(i)
170665
+ ),
169368
170666
  calledBySuccess: this.calledBySuccess.map(
169369
170667
  (c) => c.toReference(i)
169370
170668
  ),
@@ -169381,13 +170679,19 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169381
170679
  toFlatJSON(i = /* @__PURE__ */ new Set()) {
169382
170680
  return i.has(this.id) ? [] : (i.add(this.id), [
169383
170681
  this.toShallowJSON(),
169384
- ...this.successCalls.flatMap((a) => a.toFlatJSON(i)),
169385
- ...this.errorCalls.flatMap((a) => a.toFlatJSON(i)),
170682
+ ...this.successCalls.flatMap(
170683
+ (a) => a.toFlatJSON(i)
170684
+ ),
170685
+ ...this.errorCalls.flatMap(
170686
+ (a) => a.toFlatJSON(i)
170687
+ ),
169386
170688
  ...this.inputs.flatMap((a) => a.toFlatJSON(i)),
169387
170689
  ...this.outputs.flatMap(
169388
170690
  (a) => a.toFlatJSON(i)
169389
170691
  ),
169390
- ...this.calledBy.flatMap((a) => a.toFlatJSON(i)),
170692
+ ...this.calledBy.flatMap(
170693
+ (a) => a.toFlatJSON(i)
170694
+ ),
169391
170695
  ...this.error ? this.error.toFlatJSON(i) : [],
169392
170696
  ...this.parent.toFlatJSON(i)
169393
170697
  ]);
@@ -169534,7 +170838,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169534
170838
  return b.id === ((E = h.declaration) == null ? void 0 : E.id);
169535
170839
  }
169536
170840
  )) {
169537
- const b = h.remove({ ignoreUpstream: !1 }, i);
170841
+ const b = h.remove(
170842
+ { ignoreUpstream: !1 },
170843
+ i
170844
+ );
169538
170845
  c.push(...b.removed), r.push(...b.updated);
169539
170846
  }
169540
170847
  }), this.inputs.filter((h, m) => {
@@ -169552,9 +170859,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169552
170859
  D.RemoveUnrecognizedInputs,
169553
170860
  this.id
169554
170861
  ), {
169555
- updated: C(r),
169556
- added: C(a),
169557
- removed: C(c),
170862
+ updated: C(
170863
+ r
170864
+ ),
170865
+ added: C(
170866
+ a
170867
+ ),
170868
+ removed: C(
170869
+ c
170870
+ ),
169558
170871
  affected: C(
169559
170872
  e
169560
170873
  ),
@@ -169593,7 +170906,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169593
170906
  return b.id === ((E = h.declaration) == null ? void 0 : E.id);
169594
170907
  }
169595
170908
  )) {
169596
- const b = h.remove({ ignoreUpstream: !1 }, i);
170909
+ const b = h.remove(
170910
+ { ignoreUpstream: !1 },
170911
+ i
170912
+ );
169597
170913
  c.push(...b.removed), r.push(...b.updated);
169598
170914
  }
169599
170915
  }), this.outputs.filter((h, m) => {
@@ -169611,9 +170927,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169611
170927
  D.RemoveUnrecognizedOutputs,
169612
170928
  this.id
169613
170929
  ), {
169614
- updated: C(r),
169615
- added: C(a),
169616
- removed: C(c),
170930
+ updated: C(
170931
+ r
170932
+ ),
170933
+ added: C(
170934
+ a
170935
+ ),
170936
+ removed: C(
170937
+ c
170938
+ ),
169617
170939
  affected: C(
169618
170940
  e
169619
170941
  ),
@@ -169635,7 +170957,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169635
170957
  if (!this.checkCanEdit(this, i))
169636
170958
  return ce.warn(
169637
170959
  `[syncInputs] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
169638
- ), i == null || i.attemptAutoclose(D.SyncInputs, this.id), {
170960
+ ), i == null || i.attemptAutoclose(
170961
+ D.SyncInputs,
170962
+ this.id
170963
+ ), {
169639
170964
  updated: [],
169640
170965
  added: [],
169641
170966
  removed: [],
@@ -169693,9 +171018,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169693
171018
  } = E.afterAllChildrenInitialized(i);
169694
171019
  r.push(...A), a.push(..._), c.push(...N);
169695
171020
  }), this.inputs.sort((E, A) => E.index - A.index), i == null || i.attemptAutoclose(D.SyncInputs, this.id), {
169696
- updated: C(r),
169697
- added: C(a),
169698
- removed: C(c),
171021
+ updated: C(
171022
+ r
171023
+ ),
171024
+ added: C(
171025
+ a
171026
+ ),
171027
+ removed: C(
171028
+ c
171029
+ ),
169699
171030
  affected: C(
169700
171031
  e
169701
171032
  ),
@@ -169720,7 +171051,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169720
171051
  if (!this.checkCanEdit(this, i))
169721
171052
  return ce.warn(
169722
171053
  `[syncOutputs] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
169723
- ), i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
171054
+ ), i == null || i.attemptAutoclose(
171055
+ D.SyncOutputs,
171056
+ this.id
171057
+ ), {
169724
171058
  updated: [],
169725
171059
  added: [],
169726
171060
  removed: [],
@@ -169770,7 +171104,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169770
171104
  });
169771
171105
  }
169772
171106
  } else
169773
- return i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
171107
+ return i == null || i.attemptAutoclose(
171108
+ D.SyncOutputs,
171109
+ this.id
171110
+ ), {
169774
171111
  added: [],
169775
171112
  updated: [],
169776
171113
  removed: [],
@@ -169778,7 +171115,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169778
171115
  self: this
169779
171116
  };
169780
171117
  else
169781
- return i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
171118
+ return i == null || i.attemptAutoclose(
171119
+ D.SyncOutputs,
171120
+ this.id
171121
+ ), {
169782
171122
  added: [],
169783
171123
  updated: [],
169784
171124
  removed: [],
@@ -169798,9 +171138,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169798
171138
  } = E.afterAllChildrenInitialized(i);
169799
171139
  r.push(...A), a.push(..._), c.push(...N);
169800
171140
  }), this.outputs.sort((E, A) => E.index - A.index), i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
169801
- updated: C(r),
169802
- added: C(a),
169803
- removed: C(c),
171141
+ updated: C(
171142
+ r
171143
+ ),
171144
+ added: C(
171145
+ a
171146
+ ),
171147
+ removed: C(
171148
+ c
171149
+ ),
169804
171150
  affected: C(
169805
171151
  e
169806
171152
  ),