@neocompose/cli 0.57.0 → 0.57.2

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/neo.mjs CHANGED
@@ -46299,7 +46299,8 @@ function isValidProjectBindingIdentifier(value) {
46299
46299
  var init_project_source_identifiers2 = __esm({
46300
46300
  "../src/models/project-source-identifiers.ts"() {
46301
46301
  "use strict";
46302
- init_src();
46302
+ init_generated_csharp_identifiers();
46303
+ init_project_source_identifiers();
46303
46304
  }
46304
46305
  });
46305
46306
 
@@ -46323,46 +46324,6 @@ var init_schema_identifiers = __esm({
46323
46324
  }
46324
46325
  });
46325
46326
 
46326
- // ../src/models/neoscript/neoscript-types.ts
46327
- var NS_TYPE_UNKNOWN, NS_TYPE_VOID, NSAssignmentOperator, NSWritability, NSCollectionMutation;
46328
- var init_neoscript_types = __esm({
46329
- "../src/models/neoscript/neoscript-types.ts"() {
46330
- "use strict";
46331
- NS_TYPE_UNKNOWN = "Unknown";
46332
- NS_TYPE_VOID = "Void";
46333
- NSAssignmentOperator = /* @__PURE__ */ ((NSAssignmentOperator2) => {
46334
- NSAssignmentOperator2["Assign"] = "=";
46335
- NSAssignmentOperator2["AddAssign"] = "+=";
46336
- NSAssignmentOperator2["SubtractAssign"] = "-=";
46337
- NSAssignmentOperator2["MultiplyAssign"] = "*=";
46338
- NSAssignmentOperator2["DivideAssign"] = "/=";
46339
- NSAssignmentOperator2["ModuloAssign"] = "%=";
46340
- NSAssignmentOperator2["Increment"] = "++";
46341
- NSAssignmentOperator2["Decrement"] = "--";
46342
- return NSAssignmentOperator2;
46343
- })(NSAssignmentOperator || {});
46344
- NSWritability = /* @__PURE__ */ ((NSWritability2) => {
46345
- NSWritability2["Local"] = "local";
46346
- NSWritability2["Save"] = "save";
46347
- NSWritability2["Session"] = "session";
46348
- NSWritability2["Immutable"] = "immutable";
46349
- NSWritability2["ImmutableToSaveLookup"] = "immutableToSaveLookup";
46350
- NSWritability2["ImmutableToSessionLookup"] = "immutableToSessionLookup";
46351
- NSWritability2["Runtime"] = "runtime";
46352
- NSWritability2["ReadOnly"] = "readOnly";
46353
- NSWritability2["Setter"] = "setter";
46354
- return NSWritability2;
46355
- })(NSWritability || {});
46356
- NSCollectionMutation = /* @__PURE__ */ ((NSCollectionMutation2) => {
46357
- NSCollectionMutation2["Add"] = "Add";
46358
- NSCollectionMutation2["Remove"] = "Remove";
46359
- NSCollectionMutation2["RemoveAt"] = "RemoveAt";
46360
- NSCollectionMutation2["Clear"] = "Clear";
46361
- return NSCollectionMutation2;
46362
- })(NSCollectionMutation || {});
46363
- }
46364
- });
46365
-
46366
46327
  // ../src/models/neoscript/neoscript-compiler-revision.ts
46367
46328
  function isAcceptedNeoScriptCompilerRevision(stamp, rollout = ACTIVE_NEOSCRIPT_COMPILER_REVISION_ROLLOUT) {
46368
46329
  if (stamp === NEOSCRIPT_COMPILER_REVISION) return true;
@@ -46407,12 +46368,52 @@ var ACTIVE_NEOSCRIPT_COMPILER_REVISION_ROLLOUT;
46407
46368
  var init_neoscript_compiler_revision = __esm({
46408
46369
  "../src/models/neoscript/neoscript-compiler-revision.ts"() {
46409
46370
  "use strict";
46410
- init_src();
46371
+ init_strict_ir();
46411
46372
  ACTIVE_NEOSCRIPT_COMPILER_REVISION_ROLLOUT = // <neoscript-compiler-revision-rollout>
46412
46373
  null;
46413
46374
  }
46414
46375
  });
46415
46376
 
46377
+ // ../src/models/neoscript/neoscript-types.ts
46378
+ var NS_TYPE_UNKNOWN, NS_TYPE_VOID, NSAssignmentOperator, NSWritability, NSCollectionMutation;
46379
+ var init_neoscript_types = __esm({
46380
+ "../src/models/neoscript/neoscript-types.ts"() {
46381
+ "use strict";
46382
+ NS_TYPE_UNKNOWN = "Unknown";
46383
+ NS_TYPE_VOID = "Void";
46384
+ NSAssignmentOperator = /* @__PURE__ */ ((NSAssignmentOperator2) => {
46385
+ NSAssignmentOperator2["Assign"] = "=";
46386
+ NSAssignmentOperator2["AddAssign"] = "+=";
46387
+ NSAssignmentOperator2["SubtractAssign"] = "-=";
46388
+ NSAssignmentOperator2["MultiplyAssign"] = "*=";
46389
+ NSAssignmentOperator2["DivideAssign"] = "/=";
46390
+ NSAssignmentOperator2["ModuloAssign"] = "%=";
46391
+ NSAssignmentOperator2["Increment"] = "++";
46392
+ NSAssignmentOperator2["Decrement"] = "--";
46393
+ return NSAssignmentOperator2;
46394
+ })(NSAssignmentOperator || {});
46395
+ NSWritability = /* @__PURE__ */ ((NSWritability2) => {
46396
+ NSWritability2["Local"] = "local";
46397
+ NSWritability2["Save"] = "save";
46398
+ NSWritability2["Session"] = "session";
46399
+ NSWritability2["Immutable"] = "immutable";
46400
+ NSWritability2["ImmutableToSaveLookup"] = "immutableToSaveLookup";
46401
+ NSWritability2["ImmutableToSessionLookup"] = "immutableToSessionLookup";
46402
+ NSWritability2["Runtime"] = "runtime";
46403
+ NSWritability2["ReadOnly"] = "readOnly";
46404
+ NSWritability2["Setter"] = "setter";
46405
+ return NSWritability2;
46406
+ })(NSWritability || {});
46407
+ NSCollectionMutation = /* @__PURE__ */ ((NSCollectionMutation2) => {
46408
+ NSCollectionMutation2["Add"] = "Add";
46409
+ NSCollectionMutation2["Remove"] = "Remove";
46410
+ NSCollectionMutation2["RemoveAt"] = "RemoveAt";
46411
+ NSCollectionMutation2["Clear"] = "Clear";
46412
+ return NSCollectionMutation2;
46413
+ })(NSCollectionMutation || {});
46414
+ }
46415
+ });
46416
+
46416
46417
  // ../src/models/neoscript/neoscript-guards.ts
46417
46418
  function isNSTypeInfoBase(value) {
46418
46419
  const v = value;
@@ -47460,7 +47461,7 @@ var init_neoscript_guards = __esm({
47460
47461
  "../src/models/neoscript/neoscript-guards.ts"() {
47461
47462
  "use strict";
47462
47463
  init_neoscript_compiler_revision();
47463
- init_member_kinds();
47464
+ init_member_kind_enum();
47464
47465
  init_core();
47465
47466
  init_neoscript_types();
47466
47467
  NS_STRING_OPS = [
@@ -47536,78 +47537,7 @@ var init_parameter_defaults = __esm({
47536
47537
  }
47537
47538
  });
47538
47539
 
47539
- // ../src/models/interfaces/interface-graph.ts
47540
- function resolveInterfaceClosure(interfaceId, interfaces) {
47541
- const byId = new Map(
47542
- interfaces.map((neoInterface) => [neoInterface.id, neoInterface])
47543
- );
47544
- const result = [];
47545
- const emitted = /* @__PURE__ */ new Set();
47546
- const visiting = [];
47547
- const visitingSet = /* @__PURE__ */ new Set();
47548
- const visit = (id2) => {
47549
- if (visitingSet.has(id2)) {
47550
- throw new CircularInterfaceExtensionError(id2, [...visiting, id2]);
47551
- }
47552
- if (emitted.has(id2)) return;
47553
- const neoInterface = byId.get(id2);
47554
- if (!neoInterface) return;
47555
- visiting.push(id2);
47556
- visitingSet.add(id2);
47557
- result.push(neoInterface);
47558
- emitted.add(id2);
47559
- for (const parentId of neoInterface.extendsInterfaceIds ?? []) {
47560
- visit(parentId);
47561
- }
47562
- visiting.pop();
47563
- visitingSet.delete(id2);
47564
- };
47565
- visit(interfaceId);
47566
- return result;
47567
- }
47568
- function resolveImplementedInterfaces(classId, classes, interfaces) {
47569
- const result = [];
47570
- const seen = /* @__PURE__ */ new Set();
47571
- for (const schemaClass2 of resolveInheritanceChain(classId, classes)) {
47572
- for (const interfaceId of schemaClass2.implementsInterfaceIds ?? []) {
47573
- for (const neoInterface of resolveInterfaceClosure(
47574
- interfaceId,
47575
- interfaces
47576
- )) {
47577
- if (seen.has(neoInterface.id)) continue;
47578
- seen.add(neoInterface.id);
47579
- result.push(neoInterface);
47580
- }
47581
- }
47582
- }
47583
- return result;
47584
- }
47585
- function classImplementsInterface(classId, interfaceId, classes, interfaces) {
47586
- return resolveImplementedInterfaces(classId, classes, interfaces).some(
47587
- (neoInterface) => neoInterface.id === interfaceId
47588
- );
47589
- }
47590
- var CircularInterfaceExtensionError;
47591
- var init_interface_graph = __esm({
47592
- "../src/models/interfaces/interface-graph.ts"() {
47593
- "use strict";
47594
- init_inheritance();
47595
- CircularInterfaceExtensionError = class extends Error {
47596
- constructor(interfaceId, chain) {
47597
- super(
47598
- `Circular interface extension detected at "${interfaceId}"; chain: ${chain.join(" -> ")}`
47599
- );
47600
- this.interfaceId = interfaceId;
47601
- this.chain = chain;
47602
- this.name = "CircularInterfaceExtensionError";
47603
- }
47604
- interfaceId;
47605
- chain;
47606
- };
47607
- }
47608
- });
47609
-
47610
- // ../src/models/neoscript/type-info-compatibility.ts
47540
+ // ../src/models/neoscript/type-info-equality.ts
47611
47541
  function typeInfosInvariantlyEqual(left, right) {
47612
47542
  if (left.type !== right.type) return false;
47613
47543
  if (left.required !== right.required) return false;
@@ -47657,28 +47587,14 @@ function typeInfosInvariantlyEqual(left, right) {
47657
47587
  }
47658
47588
  return true;
47659
47589
  }
47660
- var init_type_info_compatibility = __esm({
47661
- "../src/models/neoscript/type-info-compatibility.ts"() {
47590
+ var init_type_info_equality = __esm({
47591
+ "../src/models/neoscript/type-info-equality.ts"() {
47662
47592
  "use strict";
47663
- init_member_kinds();
47664
- init_inheritance();
47665
- init_interface_graph();
47593
+ init_member_kind_enum();
47666
47594
  init_neoscript_types();
47667
47595
  }
47668
47596
  });
47669
47597
 
47670
- // ../src/models/neoscript/index.ts
47671
- var init_neoscript = __esm({
47672
- "../src/models/neoscript/index.ts"() {
47673
- "use strict";
47674
- init_neoscript_types();
47675
- init_neoscript_guards();
47676
- init_parameter_defaults();
47677
- init_type_info_compatibility();
47678
- init_neoscript_compiler_revision();
47679
- }
47680
- });
47681
-
47682
47598
  // ../src/common/collections.ts
47683
47599
  function indexById2(records2) {
47684
47600
  const indexed = /* @__PURE__ */ new Map();
@@ -49116,7 +49032,10 @@ var init_member_kinds = __esm({
49116
49032
  init_core();
49117
49033
  init_docs_text2();
49118
49034
  init_schema_identifiers();
49119
- init_neoscript();
49035
+ init_neoscript_guards();
49036
+ init_neoscript_types();
49037
+ init_parameter_defaults();
49038
+ init_type_info_equality();
49120
49039
  init_classes();
49121
49040
  init_member_kind_enum();
49122
49041
  init_member_kind_taxonomy();
@@ -49700,6 +49619,102 @@ var init_inheritance = __esm({
49700
49619
  }
49701
49620
  });
49702
49621
 
49622
+ // ../src/models/interfaces/interface-graph.ts
49623
+ function resolveInterfaceClosure(interfaceId, interfaces) {
49624
+ const byId = new Map(
49625
+ interfaces.map((neoInterface) => [neoInterface.id, neoInterface])
49626
+ );
49627
+ const result = [];
49628
+ const emitted = /* @__PURE__ */ new Set();
49629
+ const visiting = [];
49630
+ const visitingSet = /* @__PURE__ */ new Set();
49631
+ const visit = (id2) => {
49632
+ if (visitingSet.has(id2)) {
49633
+ throw new CircularInterfaceExtensionError(id2, [...visiting, id2]);
49634
+ }
49635
+ if (emitted.has(id2)) return;
49636
+ const neoInterface = byId.get(id2);
49637
+ if (!neoInterface) return;
49638
+ visiting.push(id2);
49639
+ visitingSet.add(id2);
49640
+ result.push(neoInterface);
49641
+ emitted.add(id2);
49642
+ for (const parentId of neoInterface.extendsInterfaceIds ?? []) {
49643
+ visit(parentId);
49644
+ }
49645
+ visiting.pop();
49646
+ visitingSet.delete(id2);
49647
+ };
49648
+ visit(interfaceId);
49649
+ return result;
49650
+ }
49651
+ function resolveImplementedInterfaces(classId, classes, interfaces) {
49652
+ const result = [];
49653
+ const seen = /* @__PURE__ */ new Set();
49654
+ for (const schemaClass2 of resolveInheritanceChain(classId, classes)) {
49655
+ for (const interfaceId of schemaClass2.implementsInterfaceIds ?? []) {
49656
+ for (const neoInterface of resolveInterfaceClosure(
49657
+ interfaceId,
49658
+ interfaces
49659
+ )) {
49660
+ if (seen.has(neoInterface.id)) continue;
49661
+ seen.add(neoInterface.id);
49662
+ result.push(neoInterface);
49663
+ }
49664
+ }
49665
+ }
49666
+ return result;
49667
+ }
49668
+ function classImplementsInterface(classId, interfaceId, classes, interfaces) {
49669
+ return resolveImplementedInterfaces(classId, classes, interfaces).some(
49670
+ (neoInterface) => neoInterface.id === interfaceId
49671
+ );
49672
+ }
49673
+ var CircularInterfaceExtensionError;
49674
+ var init_interface_graph = __esm({
49675
+ "../src/models/interfaces/interface-graph.ts"() {
49676
+ "use strict";
49677
+ init_inheritance();
49678
+ CircularInterfaceExtensionError = class extends Error {
49679
+ constructor(interfaceId, chain) {
49680
+ super(
49681
+ `Circular interface extension detected at "${interfaceId}"; chain: ${chain.join(" -> ")}`
49682
+ );
49683
+ this.interfaceId = interfaceId;
49684
+ this.chain = chain;
49685
+ this.name = "CircularInterfaceExtensionError";
49686
+ }
49687
+ interfaceId;
49688
+ chain;
49689
+ };
49690
+ }
49691
+ });
49692
+
49693
+ // ../src/models/neoscript/type-info-compatibility.ts
49694
+ var init_type_info_compatibility = __esm({
49695
+ "../src/models/neoscript/type-info-compatibility.ts"() {
49696
+ "use strict";
49697
+ init_member_kind_enum();
49698
+ init_type_info_equality();
49699
+ init_inheritance();
49700
+ init_interface_graph();
49701
+ init_neoscript_types();
49702
+ }
49703
+ });
49704
+
49705
+ // ../src/models/neoscript/index.ts
49706
+ var init_neoscript = __esm({
49707
+ "../src/models/neoscript/index.ts"() {
49708
+ "use strict";
49709
+ init_neoscript_types();
49710
+ init_neoscript_guards();
49711
+ init_parameter_defaults();
49712
+ init_type_info_compatibility();
49713
+ init_type_info_equality();
49714
+ init_neoscript_compiler_revision();
49715
+ }
49716
+ });
49717
+
49703
49718
  // node_modules/uuid/dist-node/regex.js
49704
49719
  var regex_default;
49705
49720
  var init_regex = __esm({
@@ -52713,7 +52728,6 @@ var init_generics = __esm({
52713
52728
  init_structural_narrow();
52714
52729
  init_classes();
52715
52730
  init_inheritance();
52716
- init_members();
52717
52731
  }
52718
52732
  });
52719
52733
 
@@ -53458,7 +53472,6 @@ var init_read_only_members = __esm({
53458
53472
  init_member_storage();
53459
53473
  init_unordered_list_membership();
53460
53474
  init_dist_node();
53461
- init_members();
53462
53475
  init_classes();
53463
53476
  READ_ONLY_SYNTHETIC_VALUE_ID_PREFIX = "__neo_readonly_default:";
53464
53477
  }
@@ -54557,13 +54570,13 @@ function resolveConstructionTypeArguments(typeArguments, document) {
54557
54570
  var init_construction_requirements = __esm({
54558
54571
  "../src/models/classes/construction-requirements.ts"() {
54559
54572
  "use strict";
54560
- init_type_info_compatibility();
54573
+ init_type_info_equality();
54561
54574
  init_classes();
54562
54575
  init_inheritance();
54563
54576
  init_generics();
54564
54577
  init_constructors2();
54565
54578
  init_parameter_defaults();
54566
- init_members();
54579
+ init_member_kinds();
54567
54580
  }
54568
54581
  });
54569
54582
 
@@ -55538,7 +55551,7 @@ var OPTION_ID_REGEX;
55538
55551
  var init_enum_types = __esm({
55539
55552
  "../src/models/enum/enum-types.ts"() {
55540
55553
  "use strict";
55541
- init_src();
55554
+ init_pending_id();
55542
55555
  init_core();
55543
55556
  init_schema_identifiers();
55544
55557
  init_system_record_id();
@@ -56893,7 +56906,6 @@ var init_build_default_member_value = __esm({
56893
56906
  init_member_storage_key();
56894
56907
  init_structured_leaf_fields();
56895
56908
  init_stored_value_shape();
56896
- init_members();
56897
56909
  init_classes();
56898
56910
  init_unordered_list_membership();
56899
56911
  init_stored_value_shape();
@@ -57241,7 +57253,6 @@ var init_list_indexes = __esm({
57241
57253
  init_core();
57242
57254
  init_generics();
57243
57255
  init_inheritance();
57244
- init_members();
57245
57256
  init_classes();
57246
57257
  }
57247
57258
  });
@@ -59822,6 +59833,263 @@ var init_emitter = __esm({
59822
59833
  }
59823
59834
  });
59824
59835
 
59836
+ // ../src/models/dialogue/dialogue-source-identifiers.ts
59837
+ function isDialogueSourceIdentifier(value) {
59838
+ return isValidProjectSourceIdentifier(value);
59839
+ }
59840
+ var init_dialogue_source_identifiers = __esm({
59841
+ "../src/models/dialogue/dialogue-source-identifiers.ts"() {
59842
+ "use strict";
59843
+ init_project_source_identifiers2();
59844
+ }
59845
+ });
59846
+
59847
+ // ../src/models/dialogue/logic-types.ts
59848
+ function isNSBoolGetter2(value) {
59849
+ if (!isNSGetter(value)) return false;
59850
+ if (value.typeInfo.type !== 1 /* Bool */) return false;
59851
+ return value.typeInfo.required === true;
59852
+ }
59853
+ function isNSVoidBody2(value) {
59854
+ if (!isNSGetter(value)) return false;
59855
+ if (value.typeInfo.type !== 0 /* Null */) return false;
59856
+ return value.typeInfo.required === true;
59857
+ }
59858
+ function isUILogicCondition(value) {
59859
+ const v = value;
59860
+ if (typeof v !== "object") return false;
59861
+ if (v === null) return false;
59862
+ if (!isNonEmptyString(v.id)) return false;
59863
+ if (v.type !== 0 /* UI */) return false;
59864
+ if (!isNSBoolGetter2(v.getter)) return false;
59865
+ return isUIRenderableCondition(v.getter);
59866
+ }
59867
+ function isCodeLogicCondition(value) {
59868
+ const v = value;
59869
+ if (typeof v !== "object") return false;
59870
+ if (v === null) return false;
59871
+ if (!isNonEmptyString(v.id)) return false;
59872
+ if (v.type !== 1 /* Code */) return false;
59873
+ if (!isNonEmptyString(v.sourceFunctionId)) return false;
59874
+ if (!isDialogueSourceIdentifier(v.sourceFunctionName)) return false;
59875
+ if (typeof v.code !== "string") return false;
59876
+ return isNSBoolGetter2(v.getter);
59877
+ }
59878
+ function isLogicCondition(value) {
59879
+ return isUILogicCondition(value) || isCodeLogicCondition(value);
59880
+ }
59881
+ function isUILogicAction(value) {
59882
+ const v = value;
59883
+ if (typeof v !== "object") return false;
59884
+ if (v === null) return false;
59885
+ if (v.type !== 0 /* UI */) return false;
59886
+ if (!isNSVoidBody2(v.action)) return false;
59887
+ return isUIRenderableAction(v.action);
59888
+ }
59889
+ function isCodeLogicAction(value) {
59890
+ const v = value;
59891
+ if (typeof v !== "object") return false;
59892
+ if (v === null) return false;
59893
+ if (v.type !== 1 /* Code */) return false;
59894
+ if (!isNonEmptyString(v.sourceFunctionId)) return false;
59895
+ if (!isDialogueSourceIdentifier(v.sourceFunctionName)) return false;
59896
+ if (typeof v.code !== "string") return false;
59897
+ return isNSVoidBody2(v.action);
59898
+ }
59899
+ function isNonEmptyString(value) {
59900
+ return typeof value === "string" && value.length > 0;
59901
+ }
59902
+ function isLogicAction(value) {
59903
+ return isUILogicAction(value) || isCodeLogicAction(value);
59904
+ }
59905
+ function isUIRenderableCondition(getter) {
59906
+ if (getter.instructions.length !== 1) return false;
59907
+ return getter.instructions[0]?.type === "return" /* return */;
59908
+ }
59909
+ function isUIRenderableAction(action) {
59910
+ if (action.instructions.length === 0) return true;
59911
+ if (action.instructions.length !== 1) return false;
59912
+ const instruction = action.instructions[0];
59913
+ if (!instruction) return false;
59914
+ return instruction.type === "return" /* return */ || instruction.type === "assign" /* assign */ || instruction.type === "collectionCall" /* collectionCall */ || instruction.type === "functionCall" /* functionCall */;
59915
+ }
59916
+ function isDialogueLogicCompileTarget(value) {
59917
+ return value === 0 /* Condition */ || value === 1 /* Action */ || value === 2 /* TextVariable */;
59918
+ }
59919
+ function isDialogueLogicCompileDialogueContext(value) {
59920
+ const v = value;
59921
+ if (typeof v !== "object") return false;
59922
+ if (v === null) return false;
59923
+ if (!isOptionalCompileLinkedValues(v.linkedValues)) return false;
59924
+ if (!isOptionalNullableString2(v.primaryLinkedValueId)) return false;
59925
+ if (v.triggerNode === void 0) return true;
59926
+ if (v.triggerNode === null) return true;
59927
+ return isDialogueLogicCompileTriggerContext(v.triggerNode);
59928
+ }
59929
+ function isDialogueLogicCompileNodeContext(value) {
59930
+ const v = value;
59931
+ if (typeof v !== "object") return false;
59932
+ if (v === null) return false;
59933
+ if (!isOptionalCompileLinkedValues(v.linkedValues)) return false;
59934
+ return isOptionalNullableString2(v.primaryLinkedValueId);
59935
+ }
59936
+ function isDialogueLogicCompileDialogueGroupContext(value) {
59937
+ const v = value;
59938
+ if (typeof v !== "object") return false;
59939
+ if (v === null) return false;
59940
+ if (!isOptionalNullableString2(v.name)) return false;
59941
+ if (typeof v.name === "string" && v.name.length > 0 && !isDialogueSourceIdentifier(v.name)) {
59942
+ return false;
59943
+ }
59944
+ if (!isDialogueGroupType(v.type)) return false;
59945
+ if (!isOptionalNullableString2(v.collectionMemberId)) return false;
59946
+ return isOptionalNullableString2(v.collectionValueId);
59947
+ }
59948
+ function isDialogueLogicCompileTextOptionConditionContext(value) {
59949
+ const v = value;
59950
+ if (typeof v !== "object") return false;
59951
+ if (v === null) return false;
59952
+ if (typeof v.nodeId !== "string") return false;
59953
+ if (typeof v.optionId !== "string") return false;
59954
+ return isDialogueTextOptionConditionBucket(v.bucket);
59955
+ }
59956
+ function isDialogueLogicCompileTextVariableContext(value) {
59957
+ const v = value;
59958
+ if (typeof v !== "object") return false;
59959
+ if (v === null) return false;
59960
+ if (typeof v.nodeId !== "string") return false;
59961
+ if (!isNSPointer(v.pointer)) return false;
59962
+ if (typeof v.sourcePath !== "string") return false;
59963
+ if (!isNSTypeInfo(v.typeInfo)) return false;
59964
+ if (typeof v.variableId !== "string") return false;
59965
+ return isOptionalNullableString2(v.optionId);
59966
+ }
59967
+ function isCompileDialogueLogicRequest(value) {
59968
+ const v = value;
59969
+ if (typeof v !== "object") return false;
59970
+ if (v === null) return false;
59971
+ if (typeof v.code !== "string") return false;
59972
+ if (!isDialogueLogicCompileTarget(v.target)) return false;
59973
+ if (v.dialogue === void 0) {
59974
+ if (!isDialogueLogicCompileDialogueGroupContext(v.dialogueGroup)) {
59975
+ return false;
59976
+ }
59977
+ } else if (!isDialogueLogicCompileDialogueContext(v.dialogue)) return false;
59978
+ if (v.dialogueGroup !== void 0) {
59979
+ if (!isDialogueLogicCompileDialogueGroupContext(v.dialogueGroup)) {
59980
+ return false;
59981
+ }
59982
+ }
59983
+ if (v.node !== void 0 && v.node !== null && !isDialogueLogicCompileNodeContext(v.node)) {
59984
+ return false;
59985
+ }
59986
+ if (v.textOptionCondition !== void 0 && v.textOptionCondition !== null && !isDialogueLogicCompileTextOptionConditionContext(v.textOptionCondition)) {
59987
+ return false;
59988
+ }
59989
+ if (v.textVariable === void 0) return true;
59990
+ if (v.textVariable === null) return true;
59991
+ return isDialogueLogicCompileTextVariableContext(v.textVariable);
59992
+ }
59993
+ function isDialogueLogicCompileTriggerContext(value) {
59994
+ const v = value;
59995
+ if (typeof v !== "object") return false;
59996
+ if (v === null) return false;
59997
+ if (!isOptionalCompileLinkedValues(v.linkedValues)) return false;
59998
+ if (!isOptionalNullableString2(v.primaryLinkedValueId)) return false;
59999
+ if (v.dialogueGroupSettings === void 0) return true;
60000
+ if (v.dialogueGroupSettings === null) return true;
60001
+ return isDialogueLogicCompileGroupSettingsContext(v.dialogueGroupSettings);
60002
+ }
60003
+ function isOptionalCompileLinkedValues(value) {
60004
+ if (value === void 0) return true;
60005
+ if (!Array.isArray(value)) return false;
60006
+ return value.every((candidate) => {
60007
+ const linked = candidate;
60008
+ return typeof linked === "object" && linked !== null && typeof linked.valueId === "string" && (linked.sourceName === void 0 || isDialogueSourceIdentifier(linked.sourceName)) && (linked.declaredTypeName === void 0 || linked.declaredTypeName === null || isDialogueSourceIdentifier(linked.declaredTypeName));
60009
+ });
60010
+ }
60011
+ function isDialogueLogicCompileGroupSettingsContext(value) {
60012
+ const v = value;
60013
+ if (typeof v !== "object") return false;
60014
+ if (v === null) return false;
60015
+ return isOptionalNullableString2(v.lookupValueId);
60016
+ }
60017
+ function isOptionalNullableString2(value) {
60018
+ if (value === void 0) return true;
60019
+ if (value === null) return true;
60020
+ return typeof value === "string";
60021
+ }
60022
+ function isDialogueTextOptionConditionBucket(value) {
60023
+ return value === "conditions" || value === "selectableConditions";
60024
+ }
60025
+ function isDialogueGroupType(value) {
60026
+ return value === 0 /* Standard */ || value === 1 /* Lookup */ || value === 2 /* Folder */;
60027
+ }
60028
+ var init_logic_types = __esm({
60029
+ "../src/models/dialogue/logic-types.ts"() {
60030
+ "use strict";
60031
+ init_members();
60032
+ init_neoscript();
60033
+ init_dialogue_group_types();
60034
+ init_dialogue_source_identifiers();
60035
+ }
60036
+ });
60037
+
60038
+ // ../src/models/dialogue/dialogue-group-types.ts
60039
+ function isOptionalNullableString3(value) {
60040
+ if (value === void 0) return true;
60041
+ if (value === null) return true;
60042
+ return typeof value === "string";
60043
+ }
60044
+ function isDialogueGroupType2(value) {
60045
+ return value === 0 /* Standard */ || value === 1 /* Lookup */ || value === 2 /* Folder */;
60046
+ }
60047
+ function isDialogueGroupBase(value, expectedType) {
60048
+ const v = value;
60049
+ if (typeof v !== "object") return false;
60050
+ if (v === null) return false;
60051
+ if (typeof v.name !== "string") return false;
60052
+ if (!isDialogueGroupType2(v.type)) return false;
60053
+ if (expectedType !== void 0 && v.type !== expectedType) return false;
60054
+ if (!isOptionalNullableString3(v.parentDialogueGroupId)) return false;
60055
+ if (!Array.isArray(v.conditions)) return false;
60056
+ if (!v.conditions.every(isLogicCondition)) return false;
60057
+ return isOptionalNullableString3(v.priorityGroupIdOverride);
60058
+ }
60059
+ function isStandardDialogueGroupBase(value) {
60060
+ return isDialogueGroupBase(value, 0 /* Standard */);
60061
+ }
60062
+ function isLookupDialogueGroupBase(value) {
60063
+ const v = value;
60064
+ if (!isDialogueGroupBase(value, 1 /* Lookup */)) return false;
60065
+ if (typeof v?.collectionMemberId !== "string") return false;
60066
+ return isOptionalNullableString3(v.collectionValueId);
60067
+ }
60068
+ function isFolderDialogueGroupBase(value) {
60069
+ return isDialogueGroupBase(value, 2 /* Folder */);
60070
+ }
60071
+ function isDialogueGroupProps(value, expectedType) {
60072
+ const v = value;
60073
+ if (!isDialogueGroupBase(value, expectedType)) return false;
60074
+ if (!isWithId(value)) return false;
60075
+ if (!isIWithTimestamps(value)) return false;
60076
+ return typeof v?.projectId === "string";
60077
+ }
60078
+ function isDialogueGroup(value, expectedType) {
60079
+ return isDialogueGroupProps(value, expectedType);
60080
+ }
60081
+ function isAnyDialogueGroup(value) {
60082
+ if (!isDialogueGroup(value)) return false;
60083
+ return isStandardDialogueGroupBase(value) || isLookupDialogueGroupBase(value) || isFolderDialogueGroupBase(value);
60084
+ }
60085
+ var init_dialogue_group_types = __esm({
60086
+ "../src/models/dialogue/dialogue-group-types.ts"() {
60087
+ "use strict";
60088
+ init_core();
60089
+ init_logic_types();
60090
+ }
60091
+ });
60092
+
59825
60093
  // ../src/database/neoscript/project-file-registry.ts
59826
60094
  function projectFileRegistryProjection(files) {
59827
60095
  const symbols = assignDeterministicProjectFileSymbols(
@@ -60784,22 +61052,33 @@ function lowerPriorityGroup(baseValue, global) {
60784
61052
  }
60785
61053
  return result;
60786
61054
  }
60787
- function lowerDialogueGroup(baseValue, global, priorityIds, dialogueIds, uiLogicResolver) {
60788
- const base = optionalBase(baseValue);
60789
- const baseWithoutLookup = { ...base };
60790
- Reflect.deleteProperty(baseWithoutLookup, "collectionMemberId");
60791
- Reflect.deleteProperty(baseWithoutLookup, "collectionValueId");
61055
+ function sourceDialogueGroupType(global) {
60792
61056
  const authored = parseDialogueGroupInitializer(global.initializer);
60793
- const args = constructorArguments(authored.constructor, "DialogueGroup");
61057
+ return dialogueGroupType(
61058
+ global.name,
61059
+ constructorArguments(authored.constructor, "DialogueGroup")
61060
+ );
61061
+ }
61062
+ function dialogueGroupType(name, args) {
60794
61063
  const kind = args.get("kind");
60795
61064
  if (kind?.kind !== "contextualEnum") {
60796
61065
  throw new Error(
60797
- `DialogueGroup ${global.name} requires kind: .Standard, .Lookup, or .Folder.`
61066
+ `DialogueGroup ${name} requires kind: .Standard, .Lookup, or .Folder.`
60798
61067
  );
60799
61068
  }
60800
- const type = kind.name === "Lookup" ? 1 : kind.name === "Folder" ? 2 : kind.name === "Standard" ? 0 : null;
61069
+ const type = kind.name === "Lookup" ? 1 /* Lookup */ : kind.name === "Folder" ? 2 /* Folder */ : kind.name === "Standard" ? 0 /* Standard */ : null;
60801
61070
  if (type === null)
60802
61071
  throw new Error(`Unknown dialogue group kind .${kind.name}.`);
61072
+ return type;
61073
+ }
61074
+ function lowerDialogueGroup(baseValue, global, priorityIds, dialogueIds, uiLogicResolver) {
61075
+ const base = optionalBase(baseValue);
61076
+ const baseWithoutLookup = { ...base };
61077
+ Reflect.deleteProperty(baseWithoutLookup, "collectionMemberId");
61078
+ Reflect.deleteProperty(baseWithoutLookup, "collectionValueId");
61079
+ const authored = parseDialogueGroupInitializer(global.initializer);
61080
+ const args = constructorArguments(authored.constructor, "DialogueGroup");
61081
+ const type = dialogueGroupType(global.name, args);
60803
61082
  const collectionMemberId = resolveOptionalReference(
60804
61083
  args.get("collection"),
60805
61084
  /* @__PURE__ */ new Map()
@@ -61387,6 +61666,7 @@ var init_supplemental_records = __esm({
61387
61666
  "use strict";
61388
61667
  init_src();
61389
61668
  init_declaration_path();
61669
+ init_dialogue_group_types();
61390
61670
  init_projection();
61391
61671
  init_project_file_source();
61392
61672
  init_source_format();
@@ -61395,263 +61675,6 @@ var init_supplemental_records = __esm({
61395
61675
  }
61396
61676
  });
61397
61677
 
61398
- // ../src/models/dialogue/dialogue-group-types.ts
61399
- function isOptionalNullableString2(value) {
61400
- if (value === void 0) return true;
61401
- if (value === null) return true;
61402
- return typeof value === "string";
61403
- }
61404
- function isDialogueGroupType(value) {
61405
- return value === 0 /* Standard */ || value === 1 /* Lookup */ || value === 2 /* Folder */;
61406
- }
61407
- function isDialogueGroupBase(value, expectedType) {
61408
- const v = value;
61409
- if (typeof v !== "object") return false;
61410
- if (v === null) return false;
61411
- if (typeof v.name !== "string") return false;
61412
- if (!isDialogueGroupType(v.type)) return false;
61413
- if (expectedType !== void 0 && v.type !== expectedType) return false;
61414
- if (!isOptionalNullableString2(v.parentDialogueGroupId)) return false;
61415
- if (!Array.isArray(v.conditions)) return false;
61416
- if (!v.conditions.every(isLogicCondition)) return false;
61417
- return isOptionalNullableString2(v.priorityGroupIdOverride);
61418
- }
61419
- function isStandardDialogueGroupBase(value) {
61420
- return isDialogueGroupBase(value, 0 /* Standard */);
61421
- }
61422
- function isLookupDialogueGroupBase(value) {
61423
- const v = value;
61424
- if (!isDialogueGroupBase(value, 1 /* Lookup */)) return false;
61425
- if (typeof v?.collectionMemberId !== "string") return false;
61426
- return isOptionalNullableString2(v.collectionValueId);
61427
- }
61428
- function isFolderDialogueGroupBase(value) {
61429
- return isDialogueGroupBase(value, 2 /* Folder */);
61430
- }
61431
- function isDialogueGroupProps(value, expectedType) {
61432
- const v = value;
61433
- if (!isDialogueGroupBase(value, expectedType)) return false;
61434
- if (!isWithId(value)) return false;
61435
- if (!isIWithTimestamps(value)) return false;
61436
- return typeof v?.projectId === "string";
61437
- }
61438
- function isDialogueGroup(value, expectedType) {
61439
- return isDialogueGroupProps(value, expectedType);
61440
- }
61441
- function isAnyDialogueGroup(value) {
61442
- if (!isDialogueGroup(value)) return false;
61443
- return isStandardDialogueGroupBase(value) || isLookupDialogueGroupBase(value) || isFolderDialogueGroupBase(value);
61444
- }
61445
- var init_dialogue_group_types = __esm({
61446
- "../src/models/dialogue/dialogue-group-types.ts"() {
61447
- "use strict";
61448
- init_core();
61449
- init_logic_types();
61450
- }
61451
- });
61452
-
61453
- // ../src/models/dialogue/dialogue-source-identifiers.ts
61454
- function isDialogueSourceIdentifier(value) {
61455
- return isValidProjectSourceIdentifier(value);
61456
- }
61457
- var init_dialogue_source_identifiers = __esm({
61458
- "../src/models/dialogue/dialogue-source-identifiers.ts"() {
61459
- "use strict";
61460
- init_project_source_identifiers2();
61461
- }
61462
- });
61463
-
61464
- // ../src/models/dialogue/logic-types.ts
61465
- function isNSBoolGetter2(value) {
61466
- if (!isNSGetter(value)) return false;
61467
- if (value.typeInfo.type !== 1 /* Bool */) return false;
61468
- return value.typeInfo.required === true;
61469
- }
61470
- function isNSVoidBody2(value) {
61471
- if (!isNSGetter(value)) return false;
61472
- if (value.typeInfo.type !== 0 /* Null */) return false;
61473
- return value.typeInfo.required === true;
61474
- }
61475
- function isUILogicCondition(value) {
61476
- const v = value;
61477
- if (typeof v !== "object") return false;
61478
- if (v === null) return false;
61479
- if (!isNonEmptyString(v.id)) return false;
61480
- if (v.type !== 0 /* UI */) return false;
61481
- if (!isNSBoolGetter2(v.getter)) return false;
61482
- return isUIRenderableCondition(v.getter);
61483
- }
61484
- function isCodeLogicCondition(value) {
61485
- const v = value;
61486
- if (typeof v !== "object") return false;
61487
- if (v === null) return false;
61488
- if (!isNonEmptyString(v.id)) return false;
61489
- if (v.type !== 1 /* Code */) return false;
61490
- if (!isNonEmptyString(v.sourceFunctionId)) return false;
61491
- if (!isDialogueSourceIdentifier(v.sourceFunctionName)) return false;
61492
- if (typeof v.code !== "string") return false;
61493
- return isNSBoolGetter2(v.getter);
61494
- }
61495
- function isLogicCondition(value) {
61496
- return isUILogicCondition(value) || isCodeLogicCondition(value);
61497
- }
61498
- function isUILogicAction(value) {
61499
- const v = value;
61500
- if (typeof v !== "object") return false;
61501
- if (v === null) return false;
61502
- if (v.type !== 0 /* UI */) return false;
61503
- if (!isNSVoidBody2(v.action)) return false;
61504
- return isUIRenderableAction(v.action);
61505
- }
61506
- function isCodeLogicAction(value) {
61507
- const v = value;
61508
- if (typeof v !== "object") return false;
61509
- if (v === null) return false;
61510
- if (v.type !== 1 /* Code */) return false;
61511
- if (!isNonEmptyString(v.sourceFunctionId)) return false;
61512
- if (!isDialogueSourceIdentifier(v.sourceFunctionName)) return false;
61513
- if (typeof v.code !== "string") return false;
61514
- return isNSVoidBody2(v.action);
61515
- }
61516
- function isNonEmptyString(value) {
61517
- return typeof value === "string" && value.length > 0;
61518
- }
61519
- function isLogicAction(value) {
61520
- return isUILogicAction(value) || isCodeLogicAction(value);
61521
- }
61522
- function isUIRenderableCondition(getter) {
61523
- if (getter.instructions.length !== 1) return false;
61524
- return getter.instructions[0]?.type === "return" /* return */;
61525
- }
61526
- function isUIRenderableAction(action) {
61527
- if (action.instructions.length === 0) return true;
61528
- if (action.instructions.length !== 1) return false;
61529
- const instruction = action.instructions[0];
61530
- if (!instruction) return false;
61531
- return instruction.type === "return" /* return */ || instruction.type === "assign" /* assign */ || instruction.type === "collectionCall" /* collectionCall */ || instruction.type === "functionCall" /* functionCall */;
61532
- }
61533
- function isDialogueLogicCompileTarget(value) {
61534
- return value === 0 /* Condition */ || value === 1 /* Action */ || value === 2 /* TextVariable */;
61535
- }
61536
- function isDialogueLogicCompileDialogueContext(value) {
61537
- const v = value;
61538
- if (typeof v !== "object") return false;
61539
- if (v === null) return false;
61540
- if (!isOptionalCompileLinkedValues(v.linkedValues)) return false;
61541
- if (!isOptionalNullableString3(v.primaryLinkedValueId)) return false;
61542
- if (v.triggerNode === void 0) return true;
61543
- if (v.triggerNode === null) return true;
61544
- return isDialogueLogicCompileTriggerContext(v.triggerNode);
61545
- }
61546
- function isDialogueLogicCompileNodeContext(value) {
61547
- const v = value;
61548
- if (typeof v !== "object") return false;
61549
- if (v === null) return false;
61550
- if (!isOptionalCompileLinkedValues(v.linkedValues)) return false;
61551
- return isOptionalNullableString3(v.primaryLinkedValueId);
61552
- }
61553
- function isDialogueLogicCompileDialogueGroupContext(value) {
61554
- const v = value;
61555
- if (typeof v !== "object") return false;
61556
- if (v === null) return false;
61557
- if (!isOptionalNullableString3(v.name)) return false;
61558
- if (typeof v.name === "string" && v.name.length > 0 && !isDialogueSourceIdentifier(v.name)) {
61559
- return false;
61560
- }
61561
- if (!isDialogueGroupType2(v.type)) return false;
61562
- if (!isOptionalNullableString3(v.collectionMemberId)) return false;
61563
- return isOptionalNullableString3(v.collectionValueId);
61564
- }
61565
- function isDialogueLogicCompileTextOptionConditionContext(value) {
61566
- const v = value;
61567
- if (typeof v !== "object") return false;
61568
- if (v === null) return false;
61569
- if (typeof v.nodeId !== "string") return false;
61570
- if (typeof v.optionId !== "string") return false;
61571
- return isDialogueTextOptionConditionBucket(v.bucket);
61572
- }
61573
- function isDialogueLogicCompileTextVariableContext(value) {
61574
- const v = value;
61575
- if (typeof v !== "object") return false;
61576
- if (v === null) return false;
61577
- if (typeof v.nodeId !== "string") return false;
61578
- if (!isNSPointer(v.pointer)) return false;
61579
- if (typeof v.sourcePath !== "string") return false;
61580
- if (!isNSTypeInfo(v.typeInfo)) return false;
61581
- if (typeof v.variableId !== "string") return false;
61582
- return isOptionalNullableString3(v.optionId);
61583
- }
61584
- function isCompileDialogueLogicRequest(value) {
61585
- const v = value;
61586
- if (typeof v !== "object") return false;
61587
- if (v === null) return false;
61588
- if (typeof v.code !== "string") return false;
61589
- if (!isDialogueLogicCompileTarget(v.target)) return false;
61590
- if (v.dialogue === void 0) {
61591
- if (!isDialogueLogicCompileDialogueGroupContext(v.dialogueGroup)) {
61592
- return false;
61593
- }
61594
- } else if (!isDialogueLogicCompileDialogueContext(v.dialogue)) return false;
61595
- if (v.dialogueGroup !== void 0) {
61596
- if (!isDialogueLogicCompileDialogueGroupContext(v.dialogueGroup)) {
61597
- return false;
61598
- }
61599
- }
61600
- if (v.node !== void 0 && v.node !== null && !isDialogueLogicCompileNodeContext(v.node)) {
61601
- return false;
61602
- }
61603
- if (v.textOptionCondition !== void 0 && v.textOptionCondition !== null && !isDialogueLogicCompileTextOptionConditionContext(v.textOptionCondition)) {
61604
- return false;
61605
- }
61606
- if (v.textVariable === void 0) return true;
61607
- if (v.textVariable === null) return true;
61608
- return isDialogueLogicCompileTextVariableContext(v.textVariable);
61609
- }
61610
- function isDialogueLogicCompileTriggerContext(value) {
61611
- const v = value;
61612
- if (typeof v !== "object") return false;
61613
- if (v === null) return false;
61614
- if (!isOptionalCompileLinkedValues(v.linkedValues)) return false;
61615
- if (!isOptionalNullableString3(v.primaryLinkedValueId)) return false;
61616
- if (v.dialogueGroupSettings === void 0) return true;
61617
- if (v.dialogueGroupSettings === null) return true;
61618
- return isDialogueLogicCompileGroupSettingsContext(v.dialogueGroupSettings);
61619
- }
61620
- function isOptionalCompileLinkedValues(value) {
61621
- if (value === void 0) return true;
61622
- if (!Array.isArray(value)) return false;
61623
- return value.every((candidate) => {
61624
- const linked = candidate;
61625
- return typeof linked === "object" && linked !== null && typeof linked.valueId === "string" && (linked.sourceName === void 0 || isDialogueSourceIdentifier(linked.sourceName)) && (linked.declaredTypeName === void 0 || linked.declaredTypeName === null || isDialogueSourceIdentifier(linked.declaredTypeName));
61626
- });
61627
- }
61628
- function isDialogueLogicCompileGroupSettingsContext(value) {
61629
- const v = value;
61630
- if (typeof v !== "object") return false;
61631
- if (v === null) return false;
61632
- return isOptionalNullableString3(v.lookupValueId);
61633
- }
61634
- function isOptionalNullableString3(value) {
61635
- if (value === void 0) return true;
61636
- if (value === null) return true;
61637
- return typeof value === "string";
61638
- }
61639
- function isDialogueTextOptionConditionBucket(value) {
61640
- return value === "conditions" || value === "selectableConditions";
61641
- }
61642
- function isDialogueGroupType2(value) {
61643
- return value === 0 /* Standard */ || value === 1 /* Lookup */ || value === 2 /* Folder */;
61644
- }
61645
- var init_logic_types = __esm({
61646
- "../src/models/dialogue/logic-types.ts"() {
61647
- "use strict";
61648
- init_members();
61649
- init_neoscript();
61650
- init_dialogue_group_types();
61651
- init_dialogue_source_identifiers();
61652
- }
61653
- });
61654
-
61655
61678
  // ../src/models/dialogue/dialogue-types.ts
61656
61679
  function isNonArrayObject(value) {
61657
61680
  if (!isRequiredType(value, isObject)) return false;
@@ -62175,7 +62198,7 @@ var init_lookup_declared_type = __esm({
62175
62198
  "../src/models/members/lookup-declared-type.ts"() {
62176
62199
  "use strict";
62177
62200
  init_member_kind_enum();
62178
- init_members();
62201
+ init_member_kinds();
62179
62202
  }
62180
62203
  });
62181
62204
 
@@ -62191,9 +62214,9 @@ var init_interface_conformance = __esm({
62191
62214
  init_neoscript_guards();
62192
62215
  init_core();
62193
62216
  init_type_info_compatibility();
62217
+ init_type_info_equality();
62194
62218
  init_interface_types();
62195
62219
  init_lookup_declared_type();
62196
- init_members();
62197
62220
  }
62198
62221
  });
62199
62222
 
@@ -69219,7 +69242,7 @@ function evaluateCellPatternNative(memberId, receiver, args, ctx) {
69219
69242
  var init_cell_pattern2 = __esm({
69220
69243
  "../src/runtime/neoscript/cell-pattern.ts"() {
69221
69244
  "use strict";
69222
- init_src();
69245
+ init_cell_pattern();
69223
69246
  init_member_kinds();
69224
69247
  }
69225
69248
  });
@@ -70854,7 +70877,7 @@ var DecimalOverflowError, DecimalDivisionByZeroError, DecimalDigitsRangeError, D
70854
70877
  var init_decimal_math = __esm({
70855
70878
  "../src/models/decimal/decimal-math.ts"() {
70856
70879
  "use strict";
70857
- init_members();
70880
+ init_member_kinds();
70858
70881
  DecimalOverflowError = class extends Error {
70859
70882
  };
70860
70883
  DecimalDivisionByZeroError = class extends Error {
@@ -81193,7 +81216,7 @@ var init_evaluateNSGetter = __esm({
81193
81216
  init_initializer_dependencies();
81194
81217
  init_unattributable_reads();
81195
81218
  init_value_row_owner_members();
81196
- init_src();
81219
+ init_cell_pattern();
81197
81220
  init_cell_pattern2();
81198
81221
  init_world_grid_query();
81199
81222
  init_classes();
@@ -81976,7 +81999,6 @@ var init_stored_value_placement_index = __esm({
81976
81999
  init_constructors2();
81977
82000
  init_project2();
81978
82001
  init_member_kinds();
81979
- init_members();
81980
82002
  }
81981
82003
  });
81982
82004
 
@@ -84646,7 +84668,7 @@ var init_virtual_instance_graph = __esm({
84646
84668
  init_neoscript();
84647
84669
  init_project_schema_index();
84648
84670
  init_initializer_context();
84649
- init_src();
84671
+ init_strict_ir();
84650
84672
  init_initializer_materialization();
84651
84673
  init_unattributable_reads();
84652
84674
  KEPT_ROW_SAMPLE_LIMIT = 12;
@@ -90053,7 +90075,7 @@ var init_neo_script_derived_bodies = __esm({
90053
90075
  "use strict";
90054
90076
  init_members();
90055
90077
  init_dialogue();
90056
- init_src();
90078
+ init_strict_ir();
90057
90079
  init_packed_value_encoding();
90058
90080
  }
90059
90081
  });
@@ -94963,7 +94985,7 @@ var init_general_function_call_ir_source_recompile = __esm({
94963
94985
  init_compiler_adapter();
94964
94986
  init_neoscript();
94965
94987
  init_dialogue_node_index();
94966
- init_src();
94988
+ init_strict_ir();
94967
94989
  init_neo_script_derived_bodies();
94968
94990
  VOID_ACTION_TYPE_INFO = {
94969
94991
  type: 0 /* Null */,
@@ -95945,7 +95967,7 @@ function neoScriptCompilationProjectContract(document) {
95945
95967
  var init_project_fingerprint = __esm({
95946
95968
  "../src/database/neoscript/project-fingerprint.ts"() {
95947
95969
  "use strict";
95948
- init_src();
95970
+ init_strict_ir();
95949
95971
  init_neo_script_recompile_scope();
95950
95972
  init_compiler_adapter();
95951
95973
  }
@@ -97660,8 +97682,62 @@ function appendAuthoredOwnedValueCascadeDeletes(args) {
97660
97682
  thisClass: replayMembers.ownerClassesByMemberId.get(member.id) ?? null
97661
97683
  });
97662
97684
  }
97685
+ const replayCandidates = /* @__PURE__ */ new Map();
97686
+ const authoredCandidateIds = /* @__PURE__ */ new Set();
97687
+ for (const change of args.authoredChanges) {
97688
+ if (change.recordKind !== "value" || change.operation === "delete") {
97689
+ continue;
97690
+ }
97691
+ const row = postValuesById.get(change.recordId);
97692
+ if (row === void 0) continue;
97693
+ if (inlineDelegateArgumentRow(row) === null && delegateValueRow(row) === null) {
97694
+ continue;
97695
+ }
97696
+ replayCandidates.set(change.recordId, row);
97697
+ authoredCandidateIds.add(change.recordId);
97698
+ }
97699
+ for (const rootId of survivingConstructionIds) {
97700
+ const root = postValuesById.get(rootId);
97701
+ const inline = inlineDelegateArgumentRow(root);
97702
+ if (inline !== null) replayCandidates.set(rootId, inline);
97703
+ }
97704
+ const compiledReplayRows = /* @__PURE__ */ new Map();
97705
+ if (replayCandidates.size > 0) {
97706
+ const compiler = createDelegateValueBodyCompiler(
97707
+ authoredPost,
97708
+ new Set(replayCandidates.keys())
97709
+ );
97710
+ if (authoredCandidateIds.size > 0) {
97711
+ args.earlyDelegateCompilation.contractHash = hashCanonicalJson(
97712
+ neoScriptCompilationProjectContract(authoredPost)
97713
+ );
97714
+ }
97715
+ for (const [id2, row] of replayCandidates) {
97716
+ let compiled = row;
97717
+ const closure = delegateValueRow(compiled);
97718
+ if (closure !== null) compiled = compiler.compileClosure(closure);
97719
+ const inline = inlineDelegateArgumentRow(compiled);
97720
+ if (inline !== null) {
97721
+ compiled = {
97722
+ ...inline,
97723
+ constructorArgs: compiler.compileInline(inline)
97724
+ };
97725
+ }
97726
+ compiledReplayRows.set(id2, compiled);
97727
+ if (authoredCandidateIds.has(id2)) {
97728
+ args.earlyDelegateCompilation.rows.set(id2, {
97729
+ source: row,
97730
+ compiled,
97731
+ ...compiler.ownershipIds(id2)
97732
+ });
97733
+ }
97734
+ }
97735
+ }
97663
97736
  const replayDocument = {
97664
97737
  ...postScope.document,
97738
+ values: postScope.document.values.map(
97739
+ (value) => compiledReplayRows.get(value.id) ?? value
97740
+ ),
97665
97741
  initializerCompiler: documentInitializerCompiler(
97666
97742
  postScope.document,
97667
97743
  compilationProject
@@ -97675,7 +97751,7 @@ function appendAuthoredOwnedValueCascadeDeletes(args) {
97675
97751
  document: resolverDocument
97676
97752
  });
97677
97753
  for (const rootId of survivingConstructionIds) {
97678
- const instanceRoot = postValuesById.get(rootId);
97754
+ const instanceRoot = compiledReplayRows.get(rootId) ?? postValuesById.get(rootId);
97679
97755
  const rootMember = postPlacements.get(rootId).member;
97680
97756
  const expanded = expandStoredInstance({
97681
97757
  document: resolverDocument,
@@ -97855,11 +97931,16 @@ function* prepareServerOwnedSchemaCommitPasses(args) {
97855
97931
  authoredChanges
97856
97932
  );
97857
97933
  }
97934
+ const earlyDelegateCompilation = {
97935
+ contractHash: null,
97936
+ rows: /* @__PURE__ */ new Map()
97937
+ };
97858
97938
  let authoredPost = appendAuthoredOwnedValueCascadeDeletes({
97859
97939
  document: args.document,
97860
97940
  authoredChanges,
97861
97941
  contentHashHeads: args.contentHashHeads,
97862
- expandReadOnlySourceConversions: args.expandReadOnlySourceConversions === true
97942
+ expandReadOnlySourceConversions: args.expandReadOnlySourceConversions === true,
97943
+ earlyDelegateCompilation
97863
97944
  }) ?? applyProjectVersionWriteChanges(args.document, authoredChanges);
97864
97945
  if (authoredPost.localizationConfig?.mainLocale !== args.document.localizationConfig?.mainLocale) {
97865
97946
  const normalized = planMemberLocalizationNormalization(
@@ -98259,7 +98340,8 @@ function* prepareServerOwnedSchemaCommitPasses(args) {
98259
98340
  prepared,
98260
98341
  targetIds: recompileTargets.valueIds,
98261
98342
  contentHashHeads: args.contentHashHeads,
98262
- physicalValues: args.document.physicalValues
98343
+ physicalValues: args.document.physicalValues,
98344
+ earlyDelegateCompilation
98263
98345
  });
98264
98346
  args.passLifecycle?.("complete", "delegate-value-bodies");
98265
98347
  yield { pass: "delegate-value-bodies", preparedChanges: prepared };
@@ -101275,43 +101357,19 @@ function compileInlineDelegateConstructorArguments(args) {
101275
101357
  }
101276
101358
  return compiled;
101277
101359
  }
101278
- function prepareServerOwnedDelegateValueBodies(args) {
101279
- const explicitRows = /* @__PURE__ */ new Map();
101280
- const inlineArgumentRows = /* @__PURE__ */ new Map();
101281
- for (let index = 0; index < args.prepared.length; index += 1) {
101282
- const change = args.prepared[index];
101283
- if (change?.recordKind !== "value" || change.operation === "delete") {
101284
- continue;
101285
- }
101286
- const row = delegateValueRow(change.nextData);
101287
- if (row !== null) explicitRows.set(index, row);
101288
- const withInlineArgs = inlineDelegateArgumentRow(change.nextData);
101289
- if (withInlineArgs !== null) inlineArgumentRows.set(index, withInlineArgs);
101290
- }
101291
- const { closureRows: sweepRows, inlineRows: inlineSweepRows } = collectDelegateSweepRows(args);
101292
- if (explicitRows.size === 0 && sweepRows.length === 0 && inlineArgumentRows.size === 0 && inlineSweepRows.length === 0) {
101293
- return;
101294
- }
101295
- const committedDocument = applyProjectVersionWriteChanges(
101296
- args.postDocument,
101297
- args.prepared
101298
- );
101299
- const targetIds = valueIdsFromRows(
101300
- [...explicitRows.values(), ...inlineArgumentRows.values()],
101301
- [...sweepRows, ...inlineSweepRows]
101360
+ function createDelegateValueBodyCompiler(postDocument, targetIds) {
101361
+ const scope = withVariantOwnershipRoots(
101362
+ postDocument,
101363
+ postDocument.variants ?? []
101302
101364
  );
101303
101365
  const rootOwnerByValueId = /* @__PURE__ */ new Map();
101304
- const delegateScope = withVariantOwnershipRoots(
101305
- committedDocument,
101306
- committedDocument.variants ?? []
101307
- );
101308
101366
  const ownerByValueId = resolveSemanticOwnerMembersForValues(
101309
- delegateScope.document,
101367
+ scope.document,
101310
101368
  targetIds,
101311
- delegateScope.roots,
101369
+ scope.roots,
101312
101370
  rootOwnerByValueId
101313
101371
  );
101314
- const compileOne = (document, row) => {
101372
+ const compileClosure = (row, document = scope.document) => {
101315
101373
  const member = ownerByValueId.get(row.id);
101316
101374
  if (!isMemberDelegateBase(member)) {
101317
101375
  const placement = typeof row.containerId === "string" ? `container "${row.containerId}"` : `map key "${row.mapKey ?? "none"}"`;
@@ -101321,8 +101379,9 @@ function prepareServerOwnedDelegateValueBodies(args) {
101321
101379
  }
101322
101380
  const rootOwner = rootOwnerByValueId.get(row.id);
101323
101381
  const thisClass = findSchemaPlacement(rootOwner?.id ?? "", document.classes)?.ownerClass ?? null;
101382
+ const compiled = { ...row, value: { ...row.value } };
101324
101383
  try {
101325
- row.value = compileDelegateClosureValue(row.value.code, {
101384
+ compiled.value = compileDelegateClosureValue(row.value.code, {
101326
101385
  project: document.project,
101327
101386
  projectFiles: document.projectFiles,
101328
101387
  members: document.members,
@@ -101330,9 +101389,8 @@ function prepareServerOwnedDelegateValueBodies(args) {
101330
101389
  enums: document.enums,
101331
101390
  interfaces: document.interfaces,
101332
101391
  constructors: document.constructors ?? [],
101333
- // P67 §3.5 — a variant's `initialize` may delegate to another
101334
- // variant's, so the closure being compiled has to see the variant
101335
- // records committed alongside it.
101392
+ // P67 §3.5: one variant's initialize may call another variant's, so
101393
+ // compilation must see variants committed alongside this closure.
101336
101394
  variants: document.variants ?? [],
101337
101395
  variantFolders: document.variantFolders ?? [],
101338
101396
  thisClass,
@@ -101347,24 +101405,71 @@ function prepareServerOwnedDelegateValueBodies(args) {
101347
101405
  { cause: error }
101348
101406
  );
101349
101407
  }
101408
+ return compiled;
101409
+ };
101410
+ const compileInline = (row, document = scope.document) => compileInlineDelegateConstructorArguments({
101411
+ document,
101412
+ row,
101413
+ ownerMember: ownerByValueId.get(row.id),
101414
+ rootOwner: rootOwnerByValueId.get(row.id) ?? null
101415
+ });
101416
+ const ownershipIds = (valueId) => ({
101417
+ ownerMemberId: getOptionalString(ownerByValueId.get(valueId), "id") ?? null,
101418
+ rootOwnerId: rootOwnerByValueId.get(valueId)?.id ?? null
101419
+ });
101420
+ return { compileClosure, compileInline, ownershipIds };
101421
+ }
101422
+ function prepareServerOwnedDelegateValueBodies(args) {
101423
+ const explicitRows = /* @__PURE__ */ new Map();
101424
+ const inlineArgumentRows = /* @__PURE__ */ new Map();
101425
+ for (let index = 0; index < args.prepared.length; index += 1) {
101426
+ const change = args.prepared[index];
101427
+ if (change?.recordKind !== "value" || change.operation === "delete") {
101428
+ continue;
101429
+ }
101430
+ const row = delegateValueRow(change.nextData);
101431
+ if (row !== null) explicitRows.set(index, row);
101432
+ const withInlineArgs = inlineDelegateArgumentRow(change.nextData);
101433
+ if (withInlineArgs !== null) inlineArgumentRows.set(index, withInlineArgs);
101434
+ }
101435
+ const { closureRows: sweepRows, inlineRows: inlineSweepRows } = collectDelegateSweepRows(args);
101436
+ if (explicitRows.size === 0 && sweepRows.length === 0 && inlineArgumentRows.size === 0 && inlineSweepRows.length === 0) {
101437
+ return;
101438
+ }
101439
+ const committedDocument = applyProjectVersionWriteChanges(
101440
+ args.postDocument,
101441
+ args.prepared
101442
+ );
101443
+ const targetIds = valueIdsFromRows(
101444
+ [...explicitRows.values(), ...inlineArgumentRows.values()],
101445
+ [...sweepRows, ...inlineSweepRows]
101446
+ );
101447
+ const compiler = createDelegateValueBodyCompiler(
101448
+ committedDocument,
101449
+ targetIds
101450
+ );
101451
+ const early = args.earlyDelegateCompilation;
101452
+ const sameCompilerContract = early.rows.size > 0 && early.contractHash === hashCanonicalJson(neoScriptCompilationProjectContract(committedDocument));
101453
+ const reusableEarlyRow = (row) => {
101454
+ if (!sameCompilerContract) return null;
101455
+ const candidate = early.rows.get(row.id);
101456
+ if (candidate?.source !== row) return null;
101457
+ const ownership = compiler.ownershipIds(row.id);
101458
+ return ownership.ownerMemberId === candidate.ownerMemberId && ownership.rootOwnerId === candidate.rootOwnerId ? candidate.compiled : null;
101350
101459
  };
101351
101460
  for (const [index, row] of explicitRows) {
101352
- const compiled = { ...row, value: { ...row.value } };
101353
- compileOne(delegateScope.document, compiled);
101461
+ const reused = reusableEarlyRow(row);
101462
+ const compiled = (reused === null ? null : delegateValueRow(reused)) ?? compiler.compileClosure(row);
101354
101463
  const change = args.prepared[index];
101355
101464
  if (change !== void 0) {
101356
101465
  args.prepared[index] = { ...change, nextData: compiled };
101357
101466
  }
101358
101467
  }
101359
101468
  for (const [index, row] of inlineArgumentRows) {
101360
- const ownerMember = ownerByValueId.get(row.id);
101361
- const rootOwner = rootOwnerByValueId.get(row.id);
101362
- const compiledArgs = compileInlineDelegateConstructorArguments({
101363
- document: delegateScope.document,
101364
- row,
101365
- ownerMember,
101366
- rootOwner: rootOwner ?? null
101367
- });
101469
+ const reused = reusableEarlyRow(row);
101470
+ const compiledArgs = asRecord4(
101471
+ reused?.constructorArgs
101472
+ ) ?? compiler.compileInline(row);
101368
101473
  const change = args.prepared[index];
101369
101474
  if (change !== void 0) {
101370
101475
  args.prepared[index] = {
@@ -101404,16 +101509,16 @@ function prepareServerOwnedDelegateValueBodies(args) {
101404
101509
  });
101405
101510
  };
101406
101511
  for (const row of sweepRows) {
101407
- const compiled = { ...row, value: { ...row.value } };
101512
+ let compiled;
101408
101513
  try {
101409
- compileOne(delegateScope.document, compiled);
101514
+ compiled = compiler.compileClosure(row);
101410
101515
  } catch (postWriteError) {
101411
101516
  const current = delegateValueRow(
101412
101517
  structuredClone(currentById.get(row.id))
101413
101518
  );
101414
101519
  if (current === null) throw postWriteError;
101415
101520
  try {
101416
- compileOne(args.document, current);
101521
+ compiler.compileClosure(current, args.document);
101417
101522
  } catch (preWriteError) {
101418
101523
  if (sameCompileFailure(preWriteError, postWriteError)) continue;
101419
101524
  }
@@ -101421,21 +101526,15 @@ function prepareServerOwnedDelegateValueBodies(args) {
101421
101526
  }
101422
101527
  refresh(row.id, compiled);
101423
101528
  }
101424
- const compileInlineOne = (document, row) => compileInlineDelegateConstructorArguments({
101425
- document,
101426
- row,
101427
- ownerMember: ownerByValueId.get(row.id),
101428
- rootOwner: rootOwnerByValueId.get(row.id) ?? null
101429
- });
101430
101529
  for (const row of inlineSweepRows) {
101431
101530
  let compiledArgs;
101432
101531
  try {
101433
- compiledArgs = compileInlineOne(delegateScope.document, row);
101532
+ compiledArgs = compiler.compileInline(row);
101434
101533
  } catch (postWriteError) {
101435
101534
  const current = inlineDelegateSweepRow(currentById.get(row.id));
101436
101535
  if (current === null) throw postWriteError;
101437
101536
  try {
101438
- compileInlineOne(args.document, current);
101537
+ compiler.compileInline(current, args.document);
101439
101538
  } catch (preWriteError) {
101440
101539
  if (sameCompileFailure(preWriteError, postWriteError)) continue;
101441
101540
  }
@@ -101956,7 +102055,7 @@ var nativePatternMembers;
101956
102055
  var init_unity_static_members = __esm({
101957
102056
  "../src/models/exports/unity-static-members.ts"() {
101958
102057
  "use strict";
101959
- init_src();
102058
+ init_cell_pattern();
101960
102059
  init_members();
101961
102060
  nativePatternMembers = new Set(
101962
102061
  Object.values(NEO_CELL_PATTERN_MEMBER_IDS)
@@ -113712,11 +113811,14 @@ function builtinTextVariableMember(receiver, name) {
113712
113811
  function lowerDialogueProjectSourcesV4(state, analysis) {
113713
113812
  const result = [];
113714
113813
  const mainLocale = readMainLocale(state);
113715
- const dialogueGroupIds = globalIds2(
113716
- analysis.dialogueGroups.globals.filter(
113717
- (global) => global.type.name === "DialogueGroup"
113718
- ),
113719
- "dialogue-group"
113814
+ const dialogueGroups = analysis.dialogueGroups.globals.filter(
113815
+ (global) => global.type.name === "DialogueGroup"
113816
+ );
113817
+ const dialogueGroupIds = globalIds2(dialogueGroups, "dialogue-group");
113818
+ const lookupDialogueGroupIds = new Set(
113819
+ dialogueGroups.filter(
113820
+ (global) => sourceDialogueGroupType(global) === 1 /* Lookup */
113821
+ ).map((global) => dialogueGroupIds.get(global.name))
113720
113822
  );
113721
113823
  const priorityGroupsById = recordsById(state, "priority-group");
113722
113824
  const sourceSchema = new SourceSchemaIndex(analysis);
@@ -113746,6 +113848,7 @@ function lowerDialogueProjectSourcesV4(state, analysis) {
113746
113848
  existingLogic: indexExistingLogic(nodesById.values()),
113747
113849
  mainLocale,
113748
113850
  dialogueGroupIds,
113851
+ lookupDialogueGroupIds,
113749
113852
  priorityGroupsById,
113750
113853
  valueSymbols,
113751
113854
  sourceSchema,
@@ -114936,6 +115039,7 @@ function lowerDialogueGroupSettings(context, member, base) {
114936
115039
  }
114937
115040
  return {
114938
115041
  ...old,
115042
+ ...lookupValueSettings(context, referencedGroupId, old),
114939
115043
  dialogueGroupId: referencedGroupId,
114940
115044
  priority: {
114941
115045
  ...isObjectRecord2(old.priority) ? old.priority : {},
@@ -114964,6 +115068,7 @@ function lowerDialogueGroupSettings(context, member, base) {
114964
115068
  }
114965
115069
  return {
114966
115070
  ...old,
115071
+ ...lookupValueSettings(context, groupId, old),
114967
115072
  dialogueGroupId: groupId,
114968
115073
  priority: {
114969
115074
  ...isObjectRecord2(old.priority) ? old.priority : {},
@@ -114972,6 +115077,11 @@ function lowerDialogueGroupSettings(context, member, base) {
114972
115077
  }
114973
115078
  };
114974
115079
  }
115080
+ function lookupValueSettings(context, groupId, old) {
115081
+ if (context.lookupDialogueGroupIds.has(groupId))
115082
+ return { lookupValueId: context.dialoguePrimaryValueId };
115083
+ return old.lookupValueId == null ? {} : { lookupValueId: null };
115084
+ }
114975
115085
  function referenceId2(expression, typeName) {
114976
115086
  const pattern = new RegExp(
114977
115087
  `^Reference<${typeName}>\\(id:\\s*("(?:[^"\\\\]|\\\\.)*")\\)$`,
@@ -115482,6 +115592,8 @@ var init_dialogue_lower = __esm({
115482
115592
  init_neoscript_source_rewrite();
115483
115593
  init_ui_action_source();
115484
115594
  init_source_format();
115595
+ init_supplemental_records();
115596
+ init_dialogue_group_types();
115485
115597
  SourceSchemaIndex = class {
115486
115598
  classesByName;
115487
115599
  classesById;
@@ -121137,6 +121249,7 @@ function buildValueEmitContext(records2, manifest, options = {}) {
121137
121249
  localizedTextIds: /* @__PURE__ */ new Set(),
121138
121250
  constructionReplays: /* @__PURE__ */ new Map(),
121139
121251
  constructorBodySchemaKeys: /* @__PURE__ */ new WeakMap(),
121252
+ activeStoredConstructorArguments: /* @__PURE__ */ new Set(),
121140
121253
  materializedConstructors: /* @__PURE__ */ new Map(),
121141
121254
  materializedConstructorOverrideKeys: /* @__PURE__ */ new Map()
121142
121255
  };
@@ -126767,6 +126880,9 @@ function classValueBody(context, member, value, visited, targetTyped, outerEnvir
126767
126880
  storedEnvironment
126768
126881
  );
126769
126882
  const name = targetTyped ? stringField3(schemaClass2, "name") : classValueTypeName(context, classId, member, environment);
126883
+ const storedArgumentEntries = isObjectRecord2(value.constructorArgs) ? Object.entries(value.constructorArgs).filter(
126884
+ (entry) => typeof entry[1] === "string"
126885
+ ) : [];
126770
126886
  let storedConstruction;
126771
126887
  try {
126772
126888
  storedConstruction = partial ? null : storedConstructorCallSource(
@@ -126784,6 +126900,12 @@ function classValueBody(context, member, value, visited, targetTyped, outerEnvir
126784
126900
  { cause: error }
126785
126901
  );
126786
126902
  }
126903
+ const constructorArgumentValueIds = /* @__PURE__ */ new Set();
126904
+ for (const [, id2] of storedArgumentEntries) {
126905
+ if (context.values.has(id2) && visited.has(id2)) {
126906
+ constructorArgumentValueIds.add(id2);
126907
+ }
126908
+ }
126787
126909
  const replayConstruction = storedConstruction === null ? null : storedConstructorCallSource(
126788
126910
  context,
126789
126911
  schemaClass2,
@@ -126808,6 +126930,15 @@ function classValueBody(context, member, value, visited, targetTyped, outerEnvir
126808
126930
  )
126809
126931
  );
126810
126932
  const replayBody = isObjectRecord2(replayRoot?.value) ? replayRoot.value : {};
126933
+ const replayArgs = isObjectRecord2(replayRoot?.constructorArgs) ? replayRoot.constructorArgs : {};
126934
+ const replayArgumentIdsByStoredId = /* @__PURE__ */ new Map();
126935
+ for (const [slot, storedId] of storedArgumentEntries) {
126936
+ const replayId = replayArgs[slot];
126937
+ if (typeof replayId !== "string") continue;
126938
+ const ids = replayArgumentIdsByStoredId.get(storedId) ?? /* @__PURE__ */ new Set();
126939
+ ids.add(replayId);
126940
+ replayArgumentIdsByStoredId.set(storedId, ids);
126941
+ }
126811
126942
  const order = Array.isArray(schemaClass2.schemaKeyOrder) ? schemaClass2.schemaKeyOrder.filter(
126812
126943
  (entry) => typeof entry === "string" && typeof schema[entry] === "string"
126813
126944
  ) : Object.keys(schema);
@@ -126831,6 +126962,30 @@ function classValueBody(context, member, value, visited, targetTyped, outerEnvir
126831
126962
  const childMember = context.members.get(childMemberId);
126832
126963
  if (childMember === void 0)
126833
126964
  throw new Error(`Class ${name}.${key} has no member record.`);
126965
+ if (constructorArgumentValueIds.has(childId)) {
126966
+ const replayChildId2 = replayBody[key];
126967
+ const replaysBodyKey = replayGraph !== null && typeof replayChildId2 === "string" && replayArgumentIdsByStoredId.get(childId)?.has(replayChildId2) === true && materializedValueSubgraphsEqual(
126968
+ context,
126969
+ context.readEffectiveValues(),
126970
+ replayGraph,
126971
+ childId,
126972
+ replayChildId2,
126973
+ childMember,
126974
+ environment
126975
+ );
126976
+ if (!replaysBodyKey) {
126977
+ const type = schemaTypeForBindingMember(
126978
+ context,
126979
+ childMemberId,
126980
+ environment
126981
+ );
126982
+ fields.push(
126983
+ `${key} = Reference<${storedSchemaTypeName(context, type, environment, childId)}>(id: ${quote5(childId)})`
126984
+ );
126985
+ overrideKeys.add(key);
126986
+ }
126987
+ continue;
126988
+ }
126834
126989
  const preservesExternalBinding = context.collectionBindingValueIds.has(childId);
126835
126990
  const baseChildBody = context.storedValueBase?.get(childId)?.value;
126836
126991
  const clearedStoredClassOverrides = isObjectRecord2(baseChildBody) && Object.keys(baseChildBody).length > 0;
@@ -127606,11 +127761,12 @@ function storedTypedRowSource(context, type, valueId, environment, visited, writ
127606
127761
  if (!constructorOwnsGraph && context.readMaterializedGraph().independentlyOwnedValueIds.has(valueId)) {
127607
127762
  return `Reference<${storedSchemaTypeName(context, type, environment, valueId)}>(id: ${quote5(valueId)})`;
127608
127763
  }
127609
- if (visited.has(valueId)) {
127764
+ if (context.activeStoredConstructorArguments.has(valueId)) {
127610
127765
  throw new Error(
127611
127766
  `Stored constructor argument containment cycle reaches ${valueId}.`
127612
127767
  );
127613
127768
  }
127769
+ context.activeStoredConstructorArguments.add(valueId);
127614
127770
  visited.add(valueId);
127615
127771
  try {
127616
127772
  if (type.kind === "class" || type.kind === "interface" || type.kind === "generic") {
@@ -127742,7 +127898,7 @@ ${entries.flatMap(
127742
127898
  )
127743
127899
  );
127744
127900
  } finally {
127745
- visited.delete(valueId);
127901
+ context.activeStoredConstructorArguments.delete(valueId);
127746
127902
  }
127747
127903
  }
127748
127904
  function storedRowIdentitySource(valueId, writeIdentity, expression) {
@@ -140265,7 +140421,7 @@ var init_registry2 = __esm({
140265
140421
  "schema-contract/registry.mjs"() {
140266
140422
  "use strict";
140267
140423
  PROJECT_SCHEMA_CONTRACT = Object.freeze({
140268
- cliVersion: "0.57.0",
140424
+ cliVersion: "0.57.2",
140269
140425
  projectFileUploadBatchSize: 32,
140270
140426
  documentRecords: {
140271
140427
  member: {
@@ -148086,7 +148242,7 @@ There is no --keep-current: preserving current semantic state defines flatten.
148086
148242
  async function main() {
148087
148243
  const args = parseArgs(process.argv.slice(2));
148088
148244
  if (args.command === "--version") {
148089
- console.log("0.57.0");
148245
+ console.log("0.57.2");
148090
148246
  return;
148091
148247
  }
148092
148248
  if (args.command === null || args.command === "help" || args.command === "--help" || args.command === "-h") {