@prisma/orm-framework 8.0.0-rc.13 → 8.0.0-rc.13-dev.3

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.
Files changed (79) hide show
  1. package/dist/{authoring-BffMNBO5.d.mts → authoring-DhT5W5e0.d.mts} +3 -3
  2. package/dist/{authoring-BffMNBO5.d.mts.map → authoring-DhT5W5e0.d.mts.map} +1 -1
  3. package/dist/{authoring-DbG78eh2.mjs → authoring-DhgHAcho.mjs} +2 -2
  4. package/dist/{authoring-DbG78eh2.mjs.map → authoring-DhgHAcho.mjs.map} +1 -1
  5. package/dist/{components-CTkZKWVB.d.mts → components-WdVKzR2I.d.mts} +2 -2
  6. package/dist/{components-CTkZKWVB.d.mts.map → components-WdVKzR2I.d.mts.map} +1 -1
  7. package/dist/components.d.mts +10 -10
  8. package/dist/components.mjs +5 -5
  9. package/dist/components__authoring.d.mts +4 -4
  10. package/dist/components__authoring.mjs +2 -2
  11. package/dist/components__components.d.mts +2 -2
  12. package/dist/components__control.d.mts +3 -3
  13. package/dist/components__control.mjs +2 -2
  14. package/dist/components__execution.d.mts +1 -1
  15. package/dist/components__psl-ast.d.mts +4 -4
  16. package/dist/components__psl-ast.mjs +2 -2
  17. package/dist/{config-types-CWeyMWBV.d.mts → config-types-ChFDZpdy.d.mts} +4 -4
  18. package/dist/{config-types-CWeyMWBV.d.mts.map → config-types-ChFDZpdy.d.mts.map} +1 -1
  19. package/dist/config.d.mts +1 -1
  20. package/dist/config__config-types.d.mts +1 -1
  21. package/dist/contract-authoring.d.mts +2 -2
  22. package/dist/contract-authoring.mjs +1 -1
  23. package/dist/{control-BTo8rNKi.d.mts → control-BCjP3x_F.d.mts} +5 -5
  24. package/dist/{control-BTo8rNKi.d.mts.map → control-BCjP3x_F.d.mts.map} +1 -1
  25. package/dist/{control-CS45l6kB.mjs → control-CJHZj7vF.mjs} +2 -2
  26. package/dist/{control-CS45l6kB.mjs.map → control-CJHZj7vF.mjs.map} +1 -1
  27. package/dist/{declarations-43E1JFHg-DGBa0YH_.mjs → declarations-BrSntcPa-Bm0uutX8.mjs} +15 -3
  28. package/dist/declarations-BrSntcPa-Bm0uutX8.mjs.map +1 -0
  29. package/dist/errors.d.mts +1 -1
  30. package/dist/errors__execution.d.mts +1 -1
  31. package/dist/{execution-BsiK0DjS.d.mts → execution-BcrxxJSJ.d.mts} +2 -2
  32. package/dist/{execution-BsiK0DjS.d.mts.map → execution-BcrxxJSJ.d.mts.map} +1 -1
  33. package/dist/{execution-CmKm3jvH.d.mts → execution-DEsldtrH.d.mts} +2 -2
  34. package/dist/{execution-CmKm3jvH.d.mts.map → execution-DEsldtrH.d.mts.map} +1 -1
  35. package/dist/{framework-authoring-C9VTqnML-BXtBl2dJ.d.mts → framework-authoring-BEHHwGOv-mQMbHGI_.d.mts} +19 -173
  36. package/dist/framework-authoring-BEHHwGOv-mQMbHGI_.d.mts.map +1 -0
  37. package/dist/{framework-components-dUUePWt8-DpoUmGO3.d.mts → framework-components-PQoZtnmv-B_lFgPip.d.mts} +3 -3
  38. package/dist/{framework-components-dUUePWt8-DpoUmGO3.d.mts.map → framework-components-PQoZtnmv-B_lFgPip.d.mts.map} +1 -1
  39. package/dist/{parse-Km2Ne67K-CakfHP9f.mjs → parse-CfZKsx8i-D2Oz7q-X.mjs} +4 -4
  40. package/dist/{parse-Km2Ne67K-CakfHP9f.mjs.map → parse-CfZKsx8i-D2Oz7q-X.mjs.map} +1 -1
  41. package/dist/{parse-DZRO_CK2-D8YAg23m.d.mts → parse-DZRO_CK2-Dxl0WwMz.d.mts} +5 -5
  42. package/dist/{parse-DZRO_CK2-D8YAg23m.d.mts.map → parse-DZRO_CK2-Dxl0WwMz.d.mts.map} +1 -1
  43. package/dist/{psl-ast-BePuKena-AYNqFKCE.d.mts → psl-ast-CjO3JX8O-CyqkfgDM.d.mts} +4 -39
  44. package/dist/psl-ast-CjO3JX8O-CyqkfgDM.d.mts.map +1 -0
  45. package/dist/psl-ast-CyvE6CR-.mjs +116 -0
  46. package/dist/psl-ast-CyvE6CR-.mjs.map +1 -0
  47. package/dist/psl-ast-f9IZqFG7.d.mts +2 -0
  48. package/dist/psl-parser.d.mts +107 -25
  49. package/dist/psl-parser.d.mts.map +1 -1
  50. package/dist/psl-parser.mjs +532 -317
  51. package/dist/psl-parser.mjs.map +1 -1
  52. package/dist/psl-parser__format.mjs +2 -2
  53. package/dist/psl-parser__format.mjs.map +1 -1
  54. package/dist/psl-parser__interpret.d.mts +6 -6
  55. package/dist/psl-parser__interpret.mjs +2 -2
  56. package/dist/psl-parser__interpret.mjs.map +1 -1
  57. package/dist/psl-parser__syntax.d.mts +1 -1
  58. package/dist/psl-parser__syntax.mjs +2 -2
  59. package/dist/psl-parser__syntax.mjs.map +1 -1
  60. package/dist/psl-printer.d.mts +4 -19
  61. package/dist/psl-printer.d.mts.map +1 -1
  62. package/dist/psl-printer.mjs +8 -87
  63. package/dist/psl-printer.mjs.map +1 -1
  64. package/dist/{symbol-table-CRtoii4t-DubuO_5j.d.mts → symbol-table-EcNdXojD-B-bUCgem.d.mts} +5 -9
  65. package/dist/symbol-table-EcNdXojD-B-bUCgem.d.mts.map +1 -0
  66. package/dist/{temporal-presets-L05Tl534-jgcrZX_O.d.mts → temporal-presets-Cj9AecXJ-gUtNP82K.d.mts} +3 -3
  67. package/dist/{temporal-presets-L05Tl534-jgcrZX_O.d.mts.map → temporal-presets-Cj9AecXJ-gUtNP82K.d.mts.map} +1 -1
  68. package/dist/{temporal-presets-DABMpaxB-DDEaCwpa.mjs → temporal-presets-Cqi6Fnl--DNtY0oCw.mjs} +10 -32
  69. package/dist/temporal-presets-Cqi6Fnl--DNtY0oCw.mjs.map +1 -0
  70. package/package.json +15 -15
  71. package/dist/declarations-43E1JFHg-DGBa0YH_.mjs.map +0 -1
  72. package/dist/framework-authoring-C9VTqnML-BXtBl2dJ.d.mts.map +0 -1
  73. package/dist/psl-ast-BePuKena-AYNqFKCE.d.mts.map +0 -1
  74. package/dist/psl-ast-Cec7KbOn.d.mts +0 -37
  75. package/dist/psl-ast-Cec7KbOn.d.mts.map +0 -1
  76. package/dist/psl-ast-DYtFdynZ.mjs +0 -244
  77. package/dist/psl-ast-DYtFdynZ.mjs.map +0 -1
  78. package/dist/symbol-table-CRtoii4t-DubuO_5j.d.mts.map +0 -1
  79. package/dist/temporal-presets-DABMpaxB-DDEaCwpa.mjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"psl-ast-BePuKena-AYNqFKCE.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/psl-ast-BePuKena.d.mts"],"mappings":";;;;UAGU;;;;;;;;;;;WAWC,MAAM,oBAAoB;WAC1B;WACA;WACA,MAAM;;UAEP;WACC;WACA;;UAED;WACC;WACA;;KAEN,kBAAkB,0BAA0B;KAC5C;UACK;WACC;WACA;WACA,MAAM;;UAEP;WACC;WACA;WACA;WACA,MAAM;;KAEZ,uBAAuB,iCAAiC;UACnD;WACC;WACA;WACA,eAAe;WACf,MAAM;;UAEP;WACC;WACA,QAAQ;WACR;WACA,eAAe;WACf,MAAM;;KAEZ;KACA,oBAAoB;UACf;WACC;WACA;;WAEA;;WAEA;;;;;;;;;WASA;WACA,kBAAkB;WAClB;WACA;WACA;WACA,qBAAqB;WACrB,MAAM;;UAEP;WACC;WACA;WACA,MAAM;;UAEP;WACC;WACA;WACA,MAAM;;KAEZ,oBAAoB;UACf;WACC;WACA;WACA,iBAAiB;WACjB,qBAAqB;WACrB,MAAM;;;;;;;;WAQN;;;;;;;UAOD;WACC;WACA;WACA,iBAAiB;WACjB,qBAAqB;WACrB,MAAM;;UAEP;WACC;WACA;;;;;;WAMA;WACA,kBAAkB;WAClB,qBAAqB;WACrB,MAAM;;UAEP;WACC;WACA,uBAAuB;WACvB,MAAM;;;;;;;;;;;;;;cAcH;;;;;cAKA;;KAET,oBAAoB,WAAW,mBAAmB;;;;;;;;;;;;UAY7C;WACC;WACA;;WAEA,SAAS,SAAS,eAAe,SAAS,eAAe;;WAEzD,iBAAiB;;WAEjB,yBAAyB;WACzB,MAAM;;;iBAGA,iBAAiB;WACvB;WACA;WACA,SAAS,SAAS,eAAe,SAAS,eAAe;WACzD,MAAM;IACb;;;;;;iBAMa,wBAAwB,iBAAiB,YAAY,yBAAyB,oBAAoB,0BAA0B,sBAAsB,SAAS,eAAe,SAAS,eAAe;UACzM;WACC;WACA;WACA,qBAAqB;WACrB,QAAQ;WACR,MAAM;;;;;;iBAMA,cAAc,KAAK,0BAA0B;;;;iBAI7C,sBAAsB,KAAK,0BAA0B;;;;;;;;;;;cAWxD,uBAAuB;;;;;;;;;iBASpB,4BAA4B,IAAI,wBAAwB;UAC/D;WACC;WACA;;;;;;;;;;;;;;;;WAgBA,sBAAsB;;;;;;;;;WAStB,cAAc;;UAEf;WACC,KAAK;WACL,sBAAsB;WACtB"}
@@ -1,37 +0,0 @@
1
- import { f as CodecLookup } from "./codec-types-C4Bx6jXr-C2MBP0-0.mjs";
2
- import { C as AuthoringPslBlockDescriptor, Z as PslExtensionBlock } from "./framework-authoring-C9VTqnML-BXtBl2dJ.mjs";
3
- import { p as PslDiagnostic, x as PslNamespace } from "./psl-ast-BePuKena-AYNqFKCE.mjs";
4
- //#region ../../../1-framework/1-core/framework-components/dist/psl-ast.d.mts
5
- //#region src/control/psl-extension-block-validator.d.ts
6
- /**
7
- * Context for ref resolution during extension-block validation.
8
- *
9
- * - `ownerNamespace` is the `PslNamespace` that contains the block being
10
- * validated. Used for `same-namespace` scope checks.
11
- * - `allNamespaces` is every namespace in the document. Used for `same-space`
12
- * scope checks.
13
- */
14
- interface ExtensionBlockRefResolutionContext {
15
- readonly ownerNamespace: PslNamespace;
16
- readonly allNamespaces: readonly PslNamespace[];
17
- }
18
- /**
19
- * Validate a single parsed extension block against its descriptor.
20
- *
21
- * Returns an array of {@link PslDiagnostic} objects (possibly empty). The
22
- * caller is responsible for threading `sourceId` into each returned diagnostic
23
- * — the returned objects already have `sourceId` set from the `sourceId`
24
- * parameter.
25
- *
26
- * @param node - The parsed block node produced by the generic framework parser.
27
- * @param descriptor - The descriptor that claims this block's keyword.
28
- * @param sourceId - The PSL source file identifier (threaded into diagnostics).
29
- * @param codecLookup - Used to validate `value`-kind parameter literals via
30
- * `codecLookup.get(codecId)?.decodeJson(JSON.parse(raw))`.
31
- * @param refCtx - Namespace context for `ref`-kind scope resolution. Required
32
- * when any descriptor parameter is `kind: 'ref'`; may be omitted if none are.
33
- */
34
- declare function validateExtensionBlock(node: PslExtensionBlock, descriptor: AuthoringPslBlockDescriptor, sourceId: string, codecLookup: CodecLookup, refCtx?: ExtensionBlockRefResolutionContext): readonly PslDiagnostic[];
35
- //#endregion
36
- export { validateExtensionBlock as n, ExtensionBlockRefResolutionContext as t };
37
- //# sourceMappingURL=psl-ast-Cec7KbOn.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"psl-ast-Cec7KbOn.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/psl-ast.d.mts"],"mappings":";;;;;;;;;;;;;UAYU;WACC,gBAAgB;WAChB,wBAAwB;;;;;;;;;;;;;;;;;;iBAkBlB,uBAAuB,MAAM,mBAAmB,YAAY,6BAA6B,kBAAkB,aAAa,aAAa,SAAS,8CAA8C"}
@@ -1,244 +0,0 @@
1
- import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
2
- //#region ../../../1-framework/1-core/framework-components/dist/psl-ast.mjs
3
- /**
4
- * Name of the synthesised namespace bucket the framework parser uses for
5
- * top-level declarations that appear outside any `namespace { … }` block.
6
- * The double-underscore decoration signals that the identifier is parser-
7
- * synthesised and never appears in user-authored PSL source — writing
8
- * `namespace __unspecified__ { … }` is a parse error.
9
- *
10
- * Distinct from the IR sentinel `__unbound__`: the PSL bucket describes
11
- * syntactic absence at the parser layer; the IR sentinel describes a late-
12
- * bound storage slot at the IR layer. Per-target interpreters decide how
13
- * (or whether) to map the PSL bucket to the IR sentinel.
14
- */
15
- const UNSPECIFIED_PSL_NAMESPACE_ID = "__unspecified__";
16
- /**
17
- * The name the unbound namespace is written under in PSL: `namespace unbound { … }`. Readers map it
18
- * to the IR's `__unbound__` namespace id, and writers map that id back to it.
19
- */
20
- const UNBOUND_PSL_NAMESPACE_NAME = "unbound";
21
- /**
22
- * Stores `entries`; exposes `models`/`enums`/`compositeTypes` as getters over
23
- * it. The getters are prototype members (non-enumerable), so spreading or
24
- * `JSON.stringify`-ing a namespace copies only `entries`, never a duplicate view.
25
- */
26
- var PslNamespaceNode = class {
27
- kind = "namespace";
28
- name;
29
- entries;
30
- span;
31
- constructor(init) {
32
- this.name = init.name;
33
- this.entries = init.entries;
34
- this.span = init.span;
35
- Object.freeze(this);
36
- }
37
- get models() {
38
- return blindCast(Object.values(this.entries["model"] ?? {}));
39
- }
40
- get compositeTypes() {
41
- return blindCast(Object.values(this.entries["compositeType"] ?? {}));
42
- }
43
- };
44
- /** Constructs a {@link PslNamespace}. Use this, never a namespace literal — the accessors must derive from `entries`. */
45
- function makePslNamespace(init) {
46
- return new PslNamespaceNode(init);
47
- }
48
- /**
49
- * Builds the frozen `entries[kind][name]` container from per-kind arrays.
50
- * Built-ins key on their PSL keyword; extension blocks key on their `kind`
51
- * discriminator. Call this rather than hand-building the literal.
52
- */
53
- function makePslNamespaceEntries(models, compositeTypes, extensionBlocks) {
54
- const container = {};
55
- if (models.length > 0) {
56
- const map = {};
57
- for (const m of models) map[m.name] = m;
58
- container["model"] = Object.freeze(map);
59
- }
60
- if (compositeTypes.length > 0) {
61
- const map = {};
62
- for (const ct of compositeTypes) map[ct.name] = ct;
63
- container["compositeType"] = Object.freeze(map);
64
- }
65
- for (const block of extensionBlocks) {
66
- const existing = container[block.kind];
67
- const newMap = existing ? blindCast({ ...existing }) : {};
68
- newMap[block.name] = block;
69
- container[block.kind] = Object.freeze(newMap);
70
- }
71
- return Object.freeze(container);
72
- }
73
- /**
74
- * Returns all models from every namespace in document order. Convenience
75
- * for consumers that don't (yet) need namespace-awareness.
76
- */
77
- function flatPslModels(ast) {
78
- return ast.namespaces.flatMap((ns) => blindCast(Object.values(ns.entries["model"] ?? {})));
79
- }
80
- /**
81
- * Returns all composite types from every namespace in document order.
82
- */
83
- function flatPslCompositeTypes(ast) {
84
- return ast.namespaces.flatMap((ns) => blindCast(Object.values(ns.entries["compositeType"] ?? {})));
85
- }
86
- /**
87
- * The set of `entries` kind keys that the framework parser reserves for
88
- * built-in PSL entity kinds. Any own-enumerable key on `PslNamespace.entries`
89
- * that is **not** in this set was contributed by an extension-block descriptor.
90
- *
91
- * Built-in keys match the PSL keyword used on each block type:
92
- * `'model'`, `'compositeType'`. The `'enum'` keyword is claimed by the
93
- * extension-block grammar via a registered descriptor, so `entries['enum']`
94
- * holds `PslExtensionBlock` nodes and is returned by `namespacePslExtensionBlocks`.
95
- */
96
- const BUILTIN_PSL_KIND_KEYS = /* @__PURE__ */ new Set(["model", "compositeType"]);
97
- /**
98
- * Returns all extension-contributed blocks in the given namespace, in
99
- * insertion order (the order the parser encountered them in the source).
100
- *
101
- * Reads from `namespace.entries`, skipping the built-in kind keys
102
- * (`'model'`, `'compositeType'`). All remaining kind maps contain
103
- * only `PslExtensionBlock` nodes by construction (see `makePslNamespaceEntries`).
104
- */
105
- function namespacePslExtensionBlocks(ns) {
106
- const result = [];
107
- for (const [kindKey, kindMap] of Object.entries(ns.entries)) {
108
- if (BUILTIN_PSL_KIND_KEYS.has(kindKey)) continue;
109
- for (const entry of Object.values(kindMap)) result.push(blindCast(entry));
110
- }
111
- return result;
112
- }
113
- /**
114
- * Validate a single parsed extension block against its descriptor.
115
- *
116
- * Returns an array of {@link PslDiagnostic} objects (possibly empty). The
117
- * caller is responsible for threading `sourceId` into each returned diagnostic
118
- * — the returned objects already have `sourceId` set from the `sourceId`
119
- * parameter.
120
- *
121
- * @param node - The parsed block node produced by the generic framework parser.
122
- * @param descriptor - The descriptor that claims this block's keyword.
123
- * @param sourceId - The PSL source file identifier (threaded into diagnostics).
124
- * @param codecLookup - Used to validate `value`-kind parameter literals via
125
- * `codecLookup.get(codecId)?.decodeJson(JSON.parse(raw))`.
126
- * @param refCtx - Namespace context for `ref`-kind scope resolution. Required
127
- * when any descriptor parameter is `kind: 'ref'`; may be omitted if none are.
128
- */
129
- function validateExtensionBlock(node, descriptor, sourceId, codecLookup, refCtx) {
130
- const diagnostics = [];
131
- const descriptorKeys = new Set(Object.keys(descriptor.parameters));
132
- const nodeKeys = new Set(Object.keys(node.parameters));
133
- if (!descriptor.variadicParameters) {
134
- for (const key of nodeKeys) if (!descriptorKeys.has(key)) {
135
- const captured = node.parameters[key];
136
- diagnostics.push({
137
- code: "PSL_EXTENSION_UNKNOWN_PARAMETER",
138
- message: `Unknown parameter "${key}" in "${descriptor.keyword}" block "${node.name}". The descriptor does not declare this parameter.`,
139
- sourceId,
140
- span: captured?.span ?? node.span
141
- });
142
- }
143
- }
144
- for (const [key, param] of Object.entries(descriptor.parameters)) if (param.required === true && !nodeKeys.has(key)) diagnostics.push({
145
- code: "PSL_EXTENSION_MISSING_REQUIRED_PARAMETER",
146
- message: `Required parameter "${key}" is missing from "${descriptor.keyword}" block "${node.name}".`,
147
- sourceId,
148
- span: node.span
149
- });
150
- for (const [key, param] of Object.entries(descriptor.parameters)) {
151
- const captured = node.parameters[key];
152
- if (captured === void 0) continue;
153
- validateParam(node, descriptor, key, param, captured, sourceId, codecLookup, refCtx, diagnostics);
154
- }
155
- return diagnostics;
156
- }
157
- function validateParam(node, descriptor, key, param, captured, sourceId, codecLookup, refCtx, diagnostics) {
158
- switch (param.kind) {
159
- case "option":
160
- if (captured.kind !== "option") return;
161
- if (!param.values.includes(captured.token)) diagnostics.push({
162
- code: "PSL_EXTENSION_OPTION_OUT_OF_SET",
163
- message: `Parameter "${key}" in "${descriptor.keyword}" block "${node.name}" has value "${captured.token}" which is not one of the allowed values: ${param.values.map((v) => `"${v}"`).join(", ")}.`,
164
- sourceId,
165
- span: captured.span
166
- });
167
- return;
168
- case "value": {
169
- if (captured.kind !== "value") return;
170
- const codec = codecLookup.get(param.codecId);
171
- if (codec === void 0) {
172
- diagnostics.push({
173
- code: "PSL_EXTENSION_INVALID_VALUE",
174
- message: `Parameter "${key}" in "${descriptor.keyword}" block "${node.name}" references unknown codec "${param.codecId}".`,
175
- sourceId,
176
- span: captured.span
177
- });
178
- return;
179
- }
180
- let jsonValue;
181
- try {
182
- jsonValue = JSON.parse(captured.raw);
183
- } catch {
184
- diagnostics.push({
185
- code: "PSL_EXTENSION_INVALID_VALUE",
186
- message: `Parameter "${key}" in "${descriptor.keyword}" block "${node.name}" is not a valid JSON literal (expected a JSON string, number, boolean, or null): ${captured.raw}`,
187
- sourceId,
188
- span: captured.span
189
- });
190
- return;
191
- }
192
- try {
193
- codec.decodeJson(blindCast(jsonValue));
194
- } catch (err) {
195
- const reason = err instanceof Error ? err.message : String(err);
196
- diagnostics.push({
197
- code: "PSL_EXTENSION_INVALID_VALUE",
198
- message: `Parameter "${key}" in "${descriptor.keyword}" block "${node.name}" was rejected by codec "${param.codecId}": ${reason}`,
199
- sourceId,
200
- span: captured.span
201
- });
202
- }
203
- return;
204
- }
205
- case "ref":
206
- if (captured.kind !== "ref") return;
207
- validateRef(node, descriptor, key, param, captured.identifier, captured.span, sourceId, refCtx, diagnostics);
208
- return;
209
- case "list":
210
- if (captured.kind !== "list") return;
211
- for (const item of captured.items) validateParam(node, descriptor, key, param.of, item, sourceId, codecLookup, refCtx, diagnostics);
212
- return;
213
- }
214
- }
215
- function validateRef(node, descriptor, key, param, identifier, span, sourceId, refCtx, diagnostics) {
216
- if (param.scope === "cross-space") return;
217
- if (refCtx === void 0) return;
218
- const namespacesToSearch = param.scope === "same-namespace" ? [refCtx.ownerNamespace] : refCtx.allNamespaces;
219
- if (!resolveEntityInNamespaces(identifier, param.refKind, namespacesToSearch)) {
220
- const scopeLabel = param.scope === "same-namespace" ? "the same namespace" : "any namespace in the schema";
221
- diagnostics.push({
222
- code: "PSL_EXTENSION_UNRESOLVED_REF",
223
- message: `Parameter "${key}" in "${descriptor.keyword}" block "${node.name}" refers to "${identifier}" (expected ${param.refKind}), but no entity with that name and kind was found in ${scopeLabel}.`,
224
- sourceId,
225
- span
226
- });
227
- }
228
- }
229
- /**
230
- * True if an entity named `name` of kind `refKind` exists in any of the given
231
- * namespaces. Built-in and extension kinds resolve the same way, through
232
- * `entries[refKind]`.
233
- */
234
- function resolveEntityInNamespaces(name, refKind, namespaces) {
235
- for (const ns of namespaces) {
236
- const kindMap = ns.entries[refKind];
237
- if (kindMap !== void 0 && Object.hasOwn(kindMap, name)) return true;
238
- }
239
- return false;
240
- }
241
- //#endregion
242
- export { flatPslModels as a, namespacePslExtensionBlocks as c, flatPslCompositeTypes as i, validateExtensionBlock as l, UNBOUND_PSL_NAMESPACE_NAME as n, makePslNamespace as o, UNSPECIFIED_PSL_NAMESPACE_ID as r, makePslNamespaceEntries as s, BUILTIN_PSL_KIND_KEYS as t };
243
-
244
- //# sourceMappingURL=psl-ast-DYtFdynZ.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"psl-ast-DYtFdynZ.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/psl-ast.mjs"],"sourcesContent":["import { blindCast } from \"@internal/utils/casts\";\n//#region src/control/psl-ast.ts\n/**\n* Name of the synthesised namespace bucket the framework parser uses for\n* top-level declarations that appear outside any `namespace { … }` block.\n* The double-underscore decoration signals that the identifier is parser-\n* synthesised and never appears in user-authored PSL source — writing\n* `namespace __unspecified__ { … }` is a parse error.\n*\n* Distinct from the IR sentinel `__unbound__`: the PSL bucket describes\n* syntactic absence at the parser layer; the IR sentinel describes a late-\n* bound storage slot at the IR layer. Per-target interpreters decide how\n* (or whether) to map the PSL bucket to the IR sentinel.\n*/\nconst UNSPECIFIED_PSL_NAMESPACE_ID = \"__unspecified__\";\n/**\n* The name the unbound namespace is written under in PSL: `namespace unbound { … }`. Readers map it\n* to the IR's `__unbound__` namespace id, and writers map that id back to it.\n*/\nconst UNBOUND_PSL_NAMESPACE_NAME = \"unbound\";\n/**\n* Stores `entries`; exposes `models`/`enums`/`compositeTypes` as getters over\n* it. The getters are prototype members (non-enumerable), so spreading or\n* `JSON.stringify`-ing a namespace copies only `entries`, never a duplicate view.\n*/\nvar PslNamespaceNode = class {\n\tkind = \"namespace\";\n\tname;\n\tentries;\n\tspan;\n\tconstructor(init) {\n\t\tthis.name = init.name;\n\t\tthis.entries = init.entries;\n\t\tthis.span = init.span;\n\t\tObject.freeze(this);\n\t}\n\tget models() {\n\t\treturn blindCast(Object.values(this.entries[\"model\"] ?? {}));\n\t}\n\tget compositeTypes() {\n\t\treturn blindCast(Object.values(this.entries[\"compositeType\"] ?? {}));\n\t}\n};\n/** Constructs a {@link PslNamespace}. Use this, never a namespace literal — the accessors must derive from `entries`. */\nfunction makePslNamespace(init) {\n\treturn new PslNamespaceNode(init);\n}\n/**\n* Builds the frozen `entries[kind][name]` container from per-kind arrays.\n* Built-ins key on their PSL keyword; extension blocks key on their `kind`\n* discriminator. Call this rather than hand-building the literal.\n*/\nfunction makePslNamespaceEntries(models, compositeTypes, extensionBlocks) {\n\tconst container = {};\n\tif (models.length > 0) {\n\t\tconst map = {};\n\t\tfor (const m of models) map[m.name] = m;\n\t\tcontainer[\"model\"] = Object.freeze(map);\n\t}\n\tif (compositeTypes.length > 0) {\n\t\tconst map = {};\n\t\tfor (const ct of compositeTypes) map[ct.name] = ct;\n\t\tcontainer[\"compositeType\"] = Object.freeze(map);\n\t}\n\tfor (const block of extensionBlocks) {\n\t\tconst existing = container[block.kind];\n\t\tconst newMap = existing ? blindCast({ ...existing }) : {};\n\t\tnewMap[block.name] = block;\n\t\tcontainer[block.kind] = Object.freeze(newMap);\n\t}\n\treturn Object.freeze(container);\n}\n/**\n* Returns all models from every namespace in document order. Convenience\n* for consumers that don't (yet) need namespace-awareness.\n*/\nfunction flatPslModels(ast) {\n\treturn ast.namespaces.flatMap((ns) => blindCast(Object.values(ns.entries[\"model\"] ?? {})));\n}\n/**\n* Returns all composite types from every namespace in document order.\n*/\nfunction flatPslCompositeTypes(ast) {\n\treturn ast.namespaces.flatMap((ns) => blindCast(Object.values(ns.entries[\"compositeType\"] ?? {})));\n}\n/**\n* The set of `entries` kind keys that the framework parser reserves for\n* built-in PSL entity kinds. Any own-enumerable key on `PslNamespace.entries`\n* that is **not** in this set was contributed by an extension-block descriptor.\n*\n* Built-in keys match the PSL keyword used on each block type:\n* `'model'`, `'compositeType'`. The `'enum'` keyword is claimed by the\n* extension-block grammar via a registered descriptor, so `entries['enum']`\n* holds `PslExtensionBlock` nodes and is returned by `namespacePslExtensionBlocks`.\n*/\nconst BUILTIN_PSL_KIND_KEYS = /* @__PURE__ */ new Set([\"model\", \"compositeType\"]);\n/**\n* Returns all extension-contributed blocks in the given namespace, in\n* insertion order (the order the parser encountered them in the source).\n*\n* Reads from `namespace.entries`, skipping the built-in kind keys\n* (`'model'`, `'compositeType'`). All remaining kind maps contain\n* only `PslExtensionBlock` nodes by construction (see `makePslNamespaceEntries`).\n*/\nfunction namespacePslExtensionBlocks(ns) {\n\tconst result = [];\n\tfor (const [kindKey, kindMap] of Object.entries(ns.entries)) {\n\t\tif (BUILTIN_PSL_KIND_KEYS.has(kindKey)) continue;\n\t\tfor (const entry of Object.values(kindMap)) result.push(blindCast(entry));\n\t}\n\treturn result;\n}\n//#endregion\n//#region src/control/psl-extension-block-validator.ts\n/**\n* Validate a single parsed extension block against its descriptor.\n*\n* Returns an array of {@link PslDiagnostic} objects (possibly empty). The\n* caller is responsible for threading `sourceId` into each returned diagnostic\n* — the returned objects already have `sourceId` set from the `sourceId`\n* parameter.\n*\n* @param node - The parsed block node produced by the generic framework parser.\n* @param descriptor - The descriptor that claims this block's keyword.\n* @param sourceId - The PSL source file identifier (threaded into diagnostics).\n* @param codecLookup - Used to validate `value`-kind parameter literals via\n* `codecLookup.get(codecId)?.decodeJson(JSON.parse(raw))`.\n* @param refCtx - Namespace context for `ref`-kind scope resolution. Required\n* when any descriptor parameter is `kind: 'ref'`; may be omitted if none are.\n*/\nfunction validateExtensionBlock(node, descriptor, sourceId, codecLookup, refCtx) {\n\tconst diagnostics = [];\n\tconst descriptorKeys = new Set(Object.keys(descriptor.parameters));\n\tconst nodeKeys = new Set(Object.keys(node.parameters));\n\tif (!descriptor.variadicParameters) {\n\t\tfor (const key of nodeKeys) if (!descriptorKeys.has(key)) {\n\t\t\tconst captured = node.parameters[key];\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_EXTENSION_UNKNOWN_PARAMETER\",\n\t\t\t\tmessage: `Unknown parameter \"${key}\" in \"${descriptor.keyword}\" block \"${node.name}\". The descriptor does not declare this parameter.`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: captured?.span ?? node.span\n\t\t\t});\n\t\t}\n\t}\n\tfor (const [key, param] of Object.entries(descriptor.parameters)) if (param.required === true && !nodeKeys.has(key)) diagnostics.push({\n\t\tcode: \"PSL_EXTENSION_MISSING_REQUIRED_PARAMETER\",\n\t\tmessage: `Required parameter \"${key}\" is missing from \"${descriptor.keyword}\" block \"${node.name}\".`,\n\t\tsourceId,\n\t\tspan: node.span\n\t});\n\tfor (const [key, param] of Object.entries(descriptor.parameters)) {\n\t\tconst captured = node.parameters[key];\n\t\tif (captured === void 0) continue;\n\t\tvalidateParam(node, descriptor, key, param, captured, sourceId, codecLookup, refCtx, diagnostics);\n\t}\n\treturn diagnostics;\n}\nfunction validateParam(node, descriptor, key, param, captured, sourceId, codecLookup, refCtx, diagnostics) {\n\tswitch (param.kind) {\n\t\tcase \"option\":\n\t\t\tif (captured.kind !== \"option\") return;\n\t\t\tif (!param.values.includes(captured.token)) diagnostics.push({\n\t\t\t\tcode: \"PSL_EXTENSION_OPTION_OUT_OF_SET\",\n\t\t\t\tmessage: `Parameter \"${key}\" in \"${descriptor.keyword}\" block \"${node.name}\" has value \"${captured.token}\" which is not one of the allowed values: ${param.values.map((v) => `\"${v}\"`).join(\", \")}.`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: captured.span\n\t\t\t});\n\t\t\treturn;\n\t\tcase \"value\": {\n\t\t\tif (captured.kind !== \"value\") return;\n\t\t\tconst codec = codecLookup.get(param.codecId);\n\t\t\tif (codec === void 0) {\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\t\tmessage: `Parameter \"${key}\" in \"${descriptor.keyword}\" block \"${node.name}\" references unknown codec \"${param.codecId}\".`,\n\t\t\t\t\tsourceId,\n\t\t\t\t\tspan: captured.span\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet jsonValue;\n\t\t\ttry {\n\t\t\t\tjsonValue = JSON.parse(captured.raw);\n\t\t\t} catch {\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\t\tmessage: `Parameter \"${key}\" in \"${descriptor.keyword}\" block \"${node.name}\" is not a valid JSON literal (expected a JSON string, number, boolean, or null): ${captured.raw}`,\n\t\t\t\t\tsourceId,\n\t\t\t\t\tspan: captured.span\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tcodec.decodeJson(blindCast(jsonValue));\n\t\t\t} catch (err) {\n\t\t\t\tconst reason = err instanceof Error ? err.message : String(err);\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\t\tmessage: `Parameter \"${key}\" in \"${descriptor.keyword}\" block \"${node.name}\" was rejected by codec \"${param.codecId}\": ${reason}`,\n\t\t\t\t\tsourceId,\n\t\t\t\t\tspan: captured.span\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tcase \"ref\":\n\t\t\tif (captured.kind !== \"ref\") return;\n\t\t\tvalidateRef(node, descriptor, key, param, captured.identifier, captured.span, sourceId, refCtx, diagnostics);\n\t\t\treturn;\n\t\tcase \"list\":\n\t\t\tif (captured.kind !== \"list\") return;\n\t\t\tfor (const item of captured.items) validateParam(node, descriptor, key, param.of, item, sourceId, codecLookup, refCtx, diagnostics);\n\t\t\treturn;\n\t}\n}\nfunction validateRef(node, descriptor, key, param, identifier, span, sourceId, refCtx, diagnostics) {\n\tif (param.scope === \"cross-space\") return;\n\tif (refCtx === void 0) return;\n\tconst namespacesToSearch = param.scope === \"same-namespace\" ? [refCtx.ownerNamespace] : refCtx.allNamespaces;\n\tif (!resolveEntityInNamespaces(identifier, param.refKind, namespacesToSearch)) {\n\t\tconst scopeLabel = param.scope === \"same-namespace\" ? \"the same namespace\" : \"any namespace in the schema\";\n\t\tdiagnostics.push({\n\t\t\tcode: \"PSL_EXTENSION_UNRESOLVED_REF\",\n\t\t\tmessage: `Parameter \"${key}\" in \"${descriptor.keyword}\" block \"${node.name}\" refers to \"${identifier}\" (expected ${param.refKind}), but no entity with that name and kind was found in ${scopeLabel}.`,\n\t\t\tsourceId,\n\t\t\tspan\n\t\t});\n\t}\n}\n/**\n* True if an entity named `name` of kind `refKind` exists in any of the given\n* namespaces. Built-in and extension kinds resolve the same way, through\n* `entries[refKind]`.\n*/\nfunction resolveEntityInNamespaces(name, refKind, namespaces) {\n\tfor (const ns of namespaces) {\n\t\tconst kindMap = ns.entries[refKind];\n\t\tif (kindMap !== void 0 && Object.hasOwn(kindMap, name)) return true;\n\t}\n\treturn false;\n}\n//#endregion\nexport { BUILTIN_PSL_KIND_KEYS, UNBOUND_PSL_NAMESPACE_NAME, UNSPECIFIED_PSL_NAMESPACE_ID, flatPslCompositeTypes, flatPslModels, makePslNamespace, makePslNamespaceEntries, namespacePslExtensionBlocks, validateExtensionBlock };\n\n//# sourceMappingURL=psl-ast.mjs.map"],"mappings":";;;;;;;;;;;;;;AAcA,MAAM,+BAA+B;;;;;AAKrC,MAAM,6BAA6B;;;;;;AAMnC,IAAI,mBAAmB,MAAM;CAC5B,OAAO;CACP;CACA;CACA;CACA,YAAY,MAAM;EACjB,KAAK,OAAO,KAAK;EACjB,KAAK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;EACA,KAAK;GACJ,IAAI,SAAS,SAAS,OAAO;GAC7B,YAAY,MAAM,YAAY,KAAK,OAAO,SAAS,YAAY,SAAS,MAAM,UAAU,QAAQ,WAAW;GAC3G;EACD,KAAK;GACJ,IAAI,SAAS,SAAS,QAAQ;GAC9B,KAAK,MAAM,QAAQ,SAAS,OAAO,cAAc,MAAM,YAAY,KAAK,MAAM,IAAI,MAAM,UAAU,aAAa,QAAQ,WAAW;GAClI;CACF;AACD;AACA,SAAS,YAAY,MAAM,YAAY,KAAK,OAAO,YAAY,MAAM,UAAU,QAAQ,aAAa;CACnG,IAAI,MAAM,UAAU,eAAe;CACnC,IAAI,WAAW,KAAK,GAAG;CACvB,MAAM,qBAAqB,MAAM,UAAU,mBAAmB,CAAC,OAAO,cAAc,IAAI,OAAO;CAC/F,IAAI,CAAC,0BAA0B,YAAY,MAAM,SAAS,kBAAkB,GAAG;EAC9E,MAAM,aAAa,MAAM,UAAU,mBAAmB,uBAAuB;EAC7E,YAAY,KAAK;GAChB,MAAM;GACN,SAAS,cAAc,IAAI,QAAQ,WAAW,QAAQ,WAAW,KAAK,KAAK,eAAe,WAAW,cAAc,MAAM,QAAQ,wDAAwD,WAAW;GACpM;GACA;EACD,CAAC;CACF;AACD;;;;;;AAMA,SAAS,0BAA0B,MAAM,SAAS,YAAY;CAC7D,KAAK,MAAM,MAAM,YAAY;EAC5B,MAAM,UAAU,GAAG,QAAQ;EAC3B,IAAI,YAAY,KAAK,KAAK,OAAO,OAAO,SAAS,IAAI,GAAG,OAAO;CAChE;CACA,OAAO;AACR"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"symbol-table-CRtoii4t-DubuO_5j.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/symbol-table-CRtoii4t.d.mts"],"mappings":";;;;;;UAIU;WACC;WACA;WACA;WACA,aAAa;WACb,MAAM;;UAEP;WACC;WACA,eAAe;WACf,MAAM;;UAEP;WACC;WACA,eAAe;WACf,MAAM;;iBAEA,sBAAsB,WAAW,oBAAoB,mBAAmB,SAAS,aAAa;iBAC9F,uBAAuB,YAAY,SAAS,oBAAoB,oBAAoB,SAAS,sBAAsB;iBACnH,4BAA4B,YAAY,+BAA+B,SAAS,aAAa;iBAC7F,YAAY,MAAM,YAAY,SAAS,aAAa;;iBAEpD,eAAe,MAAM,YAAY,iBAAiB,SAAS,aAAa;;;UAG/E;WACC,UAAU;;UAEX;WACC,YAAY,eAAe;WAC3B,YAAY,eAAe;WAC3B,QAAQ,eAAe;WACvB,QAAQ,eAAe;WACvB,gBAAgB,eAAe;;UAEhC;WACC;WACA;WACA;aACE,MAAM;aACN,MAAM;;WAER,QAAQ,eAAe;WACvB,gBAAgB,eAAe;WAC/B,QAAQ,eAAe;;UAExB;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN,QAAQ,eAAe;WACvB,qBAAqB;;UAEtB;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN,QAAQ,eAAe;WACvB,qBAAqB;;UAEtB;WACC;WACA;WACA;WACA,MAAM;WACN,MAAM;;WAEN,OAAO;;UAER;WACC;WACA,kBAAkB;WAClB;WACA,qBAAqB;;;;;;;UAOtB,wBAAwB;WACvB;WACA;WACA,MAAM;WACN,MAAM;;UAEP;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN;WACA;WACA;WACA;WACA;WACA,kBAAkB;WAClB,qBAAqB;;WAErB;;UAED;WACC,oBAAoB;WACpB,SAAS;WACT,qBAAqB;;UAEtB;WACC,aAAa;WACb,sBAAsB;;;;;;iBAMhB,iBAAiB,SAAS,0BAA0B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"temporal-presets-DABMpaxB-DDEaCwpa.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/temporal-presets-DABMpaxB.mjs"],"sourcesContent":["import { n as runtimeError } from \"./runtime-error-BA9d7XjZ.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { isColumnDefaultLiteralInputValue, isExecutionMutationDefaultValue } from \"@internal/contract/types\";\nimport { invariant } from \"@internal/utils/assertions\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError } from \"@internal/utils/internal-error\";\n//#region src/shared/framework-authoring.ts\nconst AUTHORING_WARNING_BATCH_THRESHOLD = 5;\n/**\n* Emits collected authoring warnings once per build, grouped by `code`:\n* a group at or below the threshold itemizes every `message`; above it,\n* one summary — `\"<count> <summary>\"` followed by the `item` lines — so\n* a build with many hits of one kind does not wall-of-text, and warnings\n* of different codes never batch into each other's summary.\n*/\nfunction flushAuthoringWarnings(warnings) {\n\tconst groups = /* @__PURE__ */ new Map();\n\tfor (const warning of warnings) {\n\t\tconst key = JSON.stringify([warning.code, warning.summary]);\n\t\tconst group = groups.get(key) ?? [];\n\t\tgroup.push(warning);\n\t\tgroups.set(key, group);\n\t}\n\tfor (const group of groups.values()) {\n\t\tconst first = group[0];\n\t\tif (first === void 0) continue;\n\t\tif (group.length <= AUTHORING_WARNING_BATCH_THRESHOLD) {\n\t\t\tfor (const warning of group) process.emitWarning(warning.message, { code: warning.code });\n\t\t\tcontinue;\n\t\t}\n\t\tprocess.emitWarning(`${group.length} ${first.summary}\\n${group.map((w) => ` - ${w.item}`).join(\"\\n\")}`, { code: first.code });\n\t}\n}\n/**\n* Classifies an `enum` block's members (before codec decoding, which needs\n* the codec chosen first) into which default codec an omitted `@@type`\n* should resolve to:\n*\n* - every member is `bare`, or a `value` whose raw JSON is a string → `'text'`\n* - every member is a `value` whose raw JSON is an integer → `'int'`\n* - anything else (float, bigint, boolean, mixed, or a `ref`/`option`/`list`\n* parameter) → `null`, meaning the caller must require an explicit `@@type`.\n*/\nfunction classifyEnumMemberType(block) {\n\tlet sawText = false;\n\tlet sawInt = false;\n\tfor (const paramValue of Object.values(block.parameters)) {\n\t\tif (paramValue.kind === \"bare\") {\n\t\t\tsawText = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (paramValue.kind !== \"value\") return null;\n\t\tlet jsonValue;\n\t\ttry {\n\t\t\tjsonValue = JSON.parse(paramValue.raw);\n\t\t} catch {\n\t\t\treturn null;\n\t\t}\n\t\tif (typeof jsonValue === \"string\") sawText = true;\n\t\telse if (typeof jsonValue === \"number\" && Number.isInteger(jsonValue)) sawInt = true;\n\t\telse return null;\n\t}\n\tif (sawText && sawInt) return null;\n\tif (sawText) return \"text\";\n\tif (sawInt) return \"int\";\n\treturn null;\n}\n/**\n* Resolves the codec id for an `enum` block. When `@@type` is absent, the codec\n* is inferred from the members via {@link classifyEnumMemberType}; otherwise the\n* explicit `@@type(\"codec\")` argument is parsed. Pushes the appropriate\n* diagnostic and returns `undefined` when neither yields a codec. `codecSpan` is\n* the span downstream codec-validation diagnostics should anchor to. Shared by\n* every family's enum factory so inference and the explicit path stay identical.\n*/\nfunction resolveEnumCodecId(block, ctx) {\n\tconst sourceId = ctx.sourceId ?? \"unknown\";\n\tconst typeAttr = block.attributes[\"type\"];\n\tif (typeAttr === void 0) {\n\t\tconst inferredKind = classifyEnumMemberType(block);\n\t\tif (inferredKind === null || ctx.enumInferenceCodecs === void 0) {\n\t\t\tctx.diagnostics?.push({\n\t\t\t\tcode: \"PSL_ENUM_CANNOT_INFER_TYPE\",\n\t\t\t\tmessage: `cannot infer @@type for enum \"${block.name}\"; add an explicit @@type(...)`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: block.span\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\treturn {\n\t\t\tcodecId: ctx.enumInferenceCodecs[inferredKind],\n\t\t\tcodecSpan: block.span\n\t\t};\n\t}\n\tconst codecId = typeAttr.args[\"codecId\"];\n\tinvariant(typeof codecId === \"string\", \"@@type on an enum block parses one string argument\");\n\treturn {\n\t\tcodecId,\n\t\tcodecSpan: typeAttr.span\n\t};\n}\nconst LOWERING_ENTRY_PREFIX = \"lowering:\";\n/**\n* The key a lowering entry sits under. A data type id is `owner/name`, so a key carrying this\n* prefix can never collide with one.\n*/\nfunction loweringEntryKey(tag) {\n\treturn `${LOWERING_ENTRY_PREFIX}${tag}`;\n}\nfunction isLoweringEntryKey(key) {\n\treturn key.startsWith(LOWERING_ENTRY_PREFIX);\n}\n/** Which of the two kinds of entry this is; the only place the discriminating key is named. */\nfunction isDataTypeLoweringEntry(entry) {\n\treturn \"lower\" in entry && entry.lower !== void 0;\n}\nfunction isAuthoringArgRef(value) {\n\tif (typeof value !== \"object\" || value === null || value.kind !== \"arg\") return false;\n\tconst { index, path } = value;\n\tif (typeof index !== \"number\" || !Number.isInteger(index) || index < 0) return false;\n\tif (path !== void 0 && (!Array.isArray(path) || path.some((s) => typeof s !== \"string\"))) return false;\n\treturn true;\n}\nfunction isAuthoringSelectRef(value) {\n\tif (!isAuthoringTemplateRecord(value) || value[\"kind\"] !== \"select\") return false;\n\tconst index = value[\"index\"];\n\tconst path = value[\"path\"];\n\tconst cases = value[\"cases\"];\n\tif (typeof index !== \"number\" || !Number.isInteger(index) || index < 0) return false;\n\tif (path !== void 0 && (!Array.isArray(path) || path.some((s) => typeof s !== \"string\"))) return false;\n\treturn typeof cases === \"object\" && cases !== null && !Array.isArray(cases);\n}\nfunction isAuthoringTemplateRecord(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction readTemplateArgumentValue(args, index, path) {\n\tlet value = args[index];\n\tfor (const segment of path ?? []) {\n\t\tif (!isAuthoringTemplateRecord(value) || !Object.hasOwn(value, segment)) return;\n\t\tvalue = value[segment];\n\t}\n\treturn value;\n}\nfunction isAuthoringTypeConstructorDescriptor(value) {\n\treturn \"kind\" in value && value.kind === \"typeConstructor\";\n}\nfunction isAuthoringFieldPresetDescriptor(value) {\n\treturn \"kind\" in value && value.kind === \"fieldPreset\";\n}\nfunction isAuthoringEntityTypeDescriptor(value) {\n\treturn \"kind\" in value && value.kind === \"entity\";\n}\nfunction isAuthoringPslBlockDescriptor(value) {\n\treturn \"kind\" in value && value.kind === \"pslBlock\";\n}\nfunction isAuthoringModelAttributeDescriptor(value) {\n\treturn \"kind\" in value && value.kind === \"modelAttribute\";\n}\n/**\n* Returns true when `namespace` is a non-leaf key in `contributions.field`.\n*\n* `AuthoringFieldNamespace` permits a leaf descriptor at any depth — including\n* the root — so a top-level `field: { Foo: { kind: 'fieldPreset', ... } }`\n* registration must NOT be treated as a \"namespace\" with sub-paths. Callers\n* use this predicate to gate dot-namespaced lookups (e.g. PSL `@Foo.bar`).\n*/\nfunction hasRegisteredFieldNamespace(contributions, namespace) {\n\tif (contributions?.field === void 0 || !Object.hasOwn(contributions.field, namespace)) return false;\n\tconst value = contributions.field[namespace];\n\treturn value !== void 0 && !isAuthoringFieldPresetDescriptor(value);\n}\nfunction isCopyableNamespaceObject(value) {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) return false;\n\tconst proto = Object.getPrototypeOf(value);\n\treturn proto === Object.prototype || proto === null;\n}\n/**\n* Deep structural check run only at the composition boundary (the merge and\n* collect walkers) to classify a raw namespace-tree node as a leaf descriptor.\n* A node counts as a leaf iff its `kind` matches `descriptorKind` AND it\n* carries that kind's required fields.\n*\n* This is boundary validation over `unknown`, NOT a type-predicate: the four\n* exported `isAuthoring*Descriptor` predicates deliberately narrow on `kind`\n* alone and trust the static types. The walkers, by contrast, also receive\n* type-bypassing packs (`as unknown as never` in tests, untyped JS at runtime)\n* whose descriptor-shaped-but-incomplete nodes must be rejected rather than\n* silently treated as sub-namespaces — so the well-formedness check lives here.\n*/\nfunction isWellFormedDescriptor(value, descriptorKind) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tif (!(\"kind\" in value) || value.kind !== descriptorKind) return false;\n\tswitch (descriptorKind) {\n\t\tcase \"typeConstructor\":\n\t\tcase \"fieldPreset\": {\n\t\t\tif (!(\"output\" in value)) return false;\n\t\t\tconst output = value.output;\n\t\t\treturn typeof output === \"object\" && output !== null;\n\t\t}\n\t\tcase \"entity\": {\n\t\t\tif (!(\"discriminator\" in value) || typeof value.discriminator !== \"string\") return false;\n\t\t\tif (value.discriminator.length === 0) return false;\n\t\t\tif (!(\"output\" in value)) return false;\n\t\t\tconst output = value.output;\n\t\t\tif (typeof output !== \"object\" || output === null) return false;\n\t\t\tconst factory = \"factory\" in output ? output.factory : void 0;\n\t\t\tconst template = \"template\" in output ? output.template : void 0;\n\t\t\treturn typeof factory === \"function\" || template !== void 0;\n\t\t}\n\t\tcase \"pslBlock\": {\n\t\t\tif (!(\"keyword\" in value) || typeof value.keyword !== \"string\" || value.keyword.length === 0) return false;\n\t\t\tif (!(\"discriminator\" in value) || typeof value.discriminator !== \"string\" || value.discriminator.length === 0) return false;\n\t\t\tif (!(\"name\" in value)) return false;\n\t\t\tconst name = value.name;\n\t\t\tif (typeof name !== \"object\" || name === null) return false;\n\t\t\tif (!(\"required\" in name) || typeof name.required !== \"boolean\") return false;\n\t\t\tif (!(\"parameters\" in value)) return false;\n\t\t\tconst parameters = value.parameters;\n\t\t\tif (typeof parameters !== \"object\" || parameters === null || Array.isArray(parameters)) return false;\n\t\t\tif (!(\"attributes\" in value) || value.attributes === void 0) return true;\n\t\t\tconst attributes = value.attributes;\n\t\t\tif (typeof attributes !== \"object\" || attributes === null || Array.isArray(attributes)) return false;\n\t\t\treturn Object.values(attributes).every((factory) => typeof factory === \"function\");\n\t\t}\n\t\tcase \"modelAttribute\":\n\t\t\tif (!(\"attribute\" in value) || typeof value.attribute !== \"string\" || value.attribute.length === 0) return false;\n\t\t\tif (!(\"spec\" in value)) return false;\n\t\t\treturn \"lower\" in value && typeof value.lower === \"function\";\n\t\tdefault: return false;\n\t}\n}\nfunction deepCopyNamespace(source, descriptorKind) {\n\tconst copy = {};\n\tfor (const [key, value] of Object.entries(source)) copy[key] = isCopyableNamespaceObject(value) && !isWellFormedDescriptor(value, descriptorKind) ? deepCopyNamespace(value, descriptorKind) : value;\n\treturn copy;\n}\n/**\n* Merges `source` into `target` recursively at the descriptor-namespace\n* level. `descriptorKind` is the `kind` value ('typeConstructor',\n* 'fieldPreset', 'entity', or 'pslBlock') that identifies a descriptor\n* (terminal merge point; same-path registrations across components are\n* reported as duplicates) as opposed to a sub-namespace (recursion target).\n*\n* Path segments are validated against prototype-pollution names\n* (`__proto__`, `constructor`, `prototype`). A value that is neither a\n* recognized leaf nor a plain object — e.g. a malformed descriptor\n* where the canonical leaf guard rejected it for missing `output` —\n* is reported as an invalid contribution rather than recursed into,\n* which would either silently mangle state or infinite-loop on\n* primitive properties.\n*\n* Within-registry duplicate detection is this walker's job;\n* cross-registry detection runs separately via\n* `assertNoCrossRegistryCollisions` after merging completes.\n*/\nfunction mergeAuthoringNamespaces(target, source, path, descriptorKind, label) {\n\tconst assertSafePath = (currentPath) => {\n\t\tconst blockedSegment = currentPath.find((segment) => segment === \"__proto__\" || segment === \"constructor\" || segment === \"prototype\");\n\t\tif (blockedSegment) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Invalid authoring ${label} helper \"${currentPath.join(\".\")}\". Helper path segments must not use \"${blockedSegment}\".`);\n\t};\n\tfor (const [key, sourceValue] of Object.entries(source)) {\n\t\tconst currentPath = [...path, key];\n\t\tassertSafePath(currentPath);\n\t\tconst hasExistingValue = Object.hasOwn(target, key);\n\t\tconst existingValue = hasExistingValue ? target[key] : void 0;\n\t\tif (!hasExistingValue) {\n\t\t\ttarget[key] = isCopyableNamespaceObject(sourceValue) && !isWellFormedDescriptor(sourceValue, descriptorKind) ? deepCopyNamespace(sourceValue, descriptorKind) : sourceValue;\n\t\t\tcontinue;\n\t\t}\n\t\tconst existingIsLeaf = isWellFormedDescriptor(existingValue, descriptorKind);\n\t\tconst sourceIsLeaf = isWellFormedDescriptor(sourceValue, descriptorKind);\n\t\tif (existingIsLeaf || sourceIsLeaf) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Duplicate authoring ${label} helper \"${currentPath.join(\".\")}\". Helper names must be unique across composed packs.`);\n\t\tif (!isCopyableNamespaceObject(existingValue) || !isCopyableNamespaceObject(sourceValue)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Invalid authoring ${label} helper \"${currentPath.join(\".\")}\". Expected a sub-namespace object or a recognized descriptor; received a malformed value.`);\n\t\tmergeAuthoringNamespaces(existingValue, sourceValue, currentPath, descriptorKind, label);\n\t}\n}\nconst ATTRIBUTE_SPEC_LEVELS = [\"model\", \"field\"];\nfunction mergeAuthoringAttributeSpecs(target, source, contributedBy, owners) {\n\tconst invalidContribution = (detail) => runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Invalid authoring attributeSpecs contribution from descriptor \"${contributedBy}\". ${detail}`);\n\tif (!isCopyableNamespaceObject(source)) throw invalidContribution(\"Expected a record carrying a \\\"model\\\" and a \\\"field\\\" level.\");\n\tfor (const level of ATTRIBUTE_SPEC_LEVELS) {\n\t\tconst contributed = source[level];\n\t\tif (!isCopyableNamespaceObject(contributed)) throw invalidContribution(`The \"${level}\" level must be a record of spec factories keyed by attribute name.`);\n\t\tfor (const [attribute, factory] of Object.entries(contributed)) {\n\t\t\tconst entryPath = `${level}.${attribute}`;\n\t\t\tconst invalidEntry = (detail) => runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Invalid authoring attributeSpecs entry \"${entryPath}\" contributed by descriptor \"${contributedBy}\". ${detail}`);\n\t\t\tif (attribute === \"__proto__\" || attribute === \"constructor\" || attribute === \"prototype\") throw invalidEntry(`Attribute names must not use \"${attribute}\".`);\n\t\t\tif (typeof factory !== \"function\") throw invalidEntry(\"Each entry must be a spec factory function.\");\n\t\t\tconst existingOwner = owners.get(entryPath);\n\t\t\tif (existingOwner !== void 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Duplicate authoring attributeSpecs entry \"${entryPath}\". Descriptor \"${contributedBy}\" conflicts with \"${existingOwner}\". Each attribute name may be claimed once per level.`);\n\t\t\towners.set(entryPath, contributedBy);\n\t\t\ttarget[level][attribute] = factory;\n\t\t}\n\t}\n}\n/**\n* Collects the full dotted paths of every well-formed descriptor of\n* `descriptorKind` in a raw contribution tree, using the same boundary\n* classification as {@link mergeAuthoringNamespaces}. Lets assembly-level\n* callers attribute each contributed path to its contributing component\n* before merging, so a same-path collision can be reported naming both\n* contributors.\n*/\nfunction collectContributedDescriptorPaths(namespace, descriptorKind, path = []) {\n\tconst paths = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isWellFormedDescriptor(value, descriptorKind)) {\n\t\t\tpaths.push(currentPath.join(\".\"));\n\t\t\tcontinue;\n\t\t}\n\t\tif (isCopyableNamespaceObject(value)) paths.push(...collectContributedDescriptorPaths(value, descriptorKind, currentPath));\n\t}\n\treturn paths;\n}\n/**\n* Derives the scalar view of an assembled authoring type namespace: every\n* **top-level** type constructor that is instantiable with an empty argument\n* list — all declared args optional and no entity-ref argument. A bare type\n* name `T` in a schema is semantically the zero-arg instantiation `T()`, so\n* each entry is exactly what that call produces (defaulted template values\n* applied, absent optional-arg typeParams keys omitted). Constructors\n* registered under a namespace segment, constructors with required args, and\n* entity-ref constructors are not scalars and are excluded.\n*\n* Eligibility needs no template inspection: templates that cannot resolve\n* for their legal call shapes are rejected at the composition boundary by\n* {@link assertResolvableTypeConstructorTemplates}, so the zero-arg\n* instantiation below cannot fail for an eligible constructor.\n*/\nfunction collectScalarTypeConstructors(namespace) {\n\tconst result = /* @__PURE__ */ new Map();\n\tfor (const [name, value] of Object.entries(namespace)) {\n\t\tif (!isAuthoringTypeConstructorDescriptor(value)) continue;\n\t\tif (value.entityRefArg !== void 0) continue;\n\t\tif (value.args?.some((arg) => arg.optional !== true)) continue;\n\t\tresult.set(name, instantiateAuthoringTypeConstructor(value, []));\n\t}\n\treturn result;\n}\nfunction visitTemplateArgRefs(template, visit) {\n\tif (template === void 0) return;\n\tif (isAuthoringArgRef(template)) {\n\t\tvisit(template);\n\t\tvisitTemplateArgRefs(template.default, visit);\n\t\treturn;\n\t}\n\tif (Array.isArray(template)) {\n\t\tfor (const value of template) visitTemplateArgRefs(value, visit);\n\t\treturn;\n\t}\n\tif (typeof template === \"object\" && template !== null) for (const value of Object.values(template)) visitTemplateArgRefs(value, visit);\n}\n/**\n* Boundary validation for a contributed authoring type namespace, called\n* per contributing component at assembly (which supplies `contributedBy`\n* for attribution). Rejects what the types cannot express — entity-ref\n* constructors are skipped (their output derives from the referenced\n* entity): a plain constructor must declare its output storage type name,\n* and every `typeParams` arg-ref (including refs inside arg-ref defaults)\n* must point at a declared argument index.\n*/\nfunction assertResolvableTypeConstructorTemplates(namespace, contributedBy, path = []) {\n\tfor (const [name, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, name];\n\t\tif (!isAuthoringTypeConstructorDescriptor(value)) {\n\t\t\tassertResolvableTypeConstructorTemplates(value, contributedBy, currentPath);\n\t\t\tcontinue;\n\t\t}\n\t\tif (value.entityRefArg !== void 0) continue;\n\t\tconst args = value.args ?? [];\n\t\tconst invalid = (detail) => /* @__PURE__ */ new Error(`Invalid authoring type constructor \"${currentPath.join(\".\")}\" contributed by descriptor \"${contributedBy}\". ${detail}`);\n\t\tif (value.output.nativeType === void 0) throw invalid(\"The output declares no storage type template and no entityRefArg; a plain constructor must declare one.\");\n\t\tfor (const [key, template] of Object.entries(value.output.typeParams ?? {})) visitTemplateArgRefs(template, (ref) => {\n\t\t\tif (args[ref.index] === void 0) throw invalid(`output.typeParams.${key} references argument ${ref.index}, but the constructor declares ${args.length} argument(s). Declare the argument or correct the reference index.`);\n\t\t});\n\t}\n}\nfunction collectDescriptorPaths(namespace, isLeaf, path = []) {\n\tconst paths = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isLeaf(value)) {\n\t\t\tpaths.push(currentPath.join(\".\"));\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"object\" && value !== null && !Array.isArray(value)) paths.push(...collectDescriptorPaths(value, isLeaf, currentPath));\n\t}\n\treturn paths;\n}\nfunction collectDescriptorEntries(namespace, isLeaf, descriptorKind, label, path = []) {\n\tconst entries = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isLeaf(value)) {\n\t\t\tif (!isWellFormedDescriptor(value, descriptorKind)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring ${label} contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/keyword/discriminator) but does not satisfy the ${label} descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\tif (value.discriminator.length > 0) entries.push({\n\t\t\t\tpath: currentPath.join(\".\"),\n\t\t\t\tdiscriminator: value.discriminator\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"object\" && value !== null && !Array.isArray(value)) {\n\t\t\tconst record = blindCast(value);\n\t\t\tif ((record[\"kind\"] !== void 0 || record[\"keyword\"] !== void 0 || record[\"discriminator\"] !== void 0) && !isLeaf(value)) {\n\t\t\t\tconst hasKind = record[\"kind\"] === \"pslBlock\";\n\t\t\t\tconst hasKeyword = typeof record[\"keyword\"] === \"string\";\n\t\t\t\tconst hasDiscriminator = typeof record[\"discriminator\"] === \"string\";\n\t\t\t\tif (hasKind || hasKeyword && hasDiscriminator) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring ${label} contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/keyword/discriminator) but does not satisfy the ${label} descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\t}\n\t\t\tentries.push(...collectDescriptorEntries(value, isLeaf, descriptorKind, label, currentPath));\n\t\t}\n\t}\n\treturn entries;\n}\n/**\n* Throws when two or more entries in the same namespace share a key. A\n* duplicate key makes dispatch ambiguous — the caller's lookup dispatches by\n* this key, so one entry would silently shadow the other. Catch duplicates\n* before building any dispatch map.\n*\n* `label` (e.g. `'pslBlock'`, `'entityType'`) names which namespace the\n* duplicate was found in and is carried in the structured error metadata;\n* the key itself is always called `key` in both the message and the\n* metadata, since what it semantically represents (a discriminator for\n* `entityType`, the parser's dispatch keyword for `pslBlock`) is the\n* caller's concern, not this function's.\n*/\nfunction assertUniqueDiscriminators(entries, label) {\n\tconst seen = /* @__PURE__ */ new Map();\n\tfor (const { path, discriminator: key } of entries) {\n\t\tconst existing = seen.get(key);\n\t\tif (existing !== void 0) throw runtimeError(\"RUNTIME.DUPLICATE_AUTHORING_DISCRIMINATOR\", `Duplicate ${label} key \"${key}\" registered at both \"${existing}\" and \"${path}\". Each ${label} contribution must use a unique key.`, {\n\t\t\tlabel,\n\t\t\tkey,\n\t\t\texistingPath: existing,\n\t\t\tpath\n\t\t});\n\t\tseen.set(key, path);\n\t}\n}\nfunction collectPslBlockDescriptorEntries(namespace, path = []) {\n\tconst entries = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isAuthoringPslBlockDescriptor(value)) {\n\t\t\tif (!isWellFormedDescriptor(value, \"pslBlock\")) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring pslBlock contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/keyword/discriminator) but does not satisfy the pslBlock descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\tentries.push({\n\t\t\t\tpath: currentPath.join(\".\"),\n\t\t\t\tdiscriminator: value.discriminator,\n\t\t\t\tkeyword: value.keyword\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"object\" && value !== null && !Array.isArray(value)) {\n\t\t\tconst record = blindCast(value);\n\t\t\tconst hasKind = record[\"kind\"] === \"pslBlock\";\n\t\t\tconst hasKeyword = typeof record[\"keyword\"] === \"string\";\n\t\t\tconst hasDiscriminator = typeof record[\"discriminator\"] === \"string\";\n\t\t\tif (hasKind || hasKeyword && hasDiscriminator) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring pslBlock contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/keyword/discriminator) but does not satisfy the pslBlock descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\tentries.push(...collectPslBlockDescriptorEntries(value, currentPath));\n\t\t}\n\t}\n\treturn entries;\n}\n/**\n* Every `pslBlockDescriptors` entry requires a matching `entityTypes` factory\n* with the same discriminator. An `entityTypes` factory may stand alone (e.g.\n* `enum`, reachable from the TypeScript builder without any PSL block).\n*\n* Uniqueness for pslBlock entries is keyed on **keyword**, not discriminator:\n* several keywords (e.g. `policy_select`/`policy_insert`) may legitimately\n* share one discriminator, routing to the same `entityTypes` factory and the\n* same `entries[discriminator]` slot — that N:1 shape is exactly what lets\n* one entity kind be authored through several PSL keywords. What must stay\n* unique is the keyword itself, since that's what the parser dispatches on.\n*/\nfunction assertPslBlocksHaveFactories(entityTypeNamespace, pslBlockNamespace) {\n\tconst blockEntries = collectPslBlockDescriptorEntries(pslBlockNamespace);\n\tconst entityEntries = collectDescriptorEntries(entityTypeNamespace, isAuthoringEntityTypeDescriptor, \"entity\", \"entityType\");\n\tassertUniqueDiscriminators(blockEntries.map((entry) => ({\n\t\tpath: entry.path,\n\t\tdiscriminator: entry.keyword\n\t})), \"pslBlock\");\n\tassertUniqueDiscriminators(entityEntries, \"entityType\");\n\tconst entityDiscriminators = new Set(entityEntries.map((entry) => entry.discriminator));\n\tfor (const block of blockEntries) if (!entityDiscriminators.has(block.discriminator)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Incomplete extension contribution: pslBlock helper \"${block.path}\" registers discriminator \"${block.discriminator}\" but no entityType contribution shares that discriminator. An extension-contributed PSL block requires a matching entityType factory so the parsed AST node can lower to an IR class instance; add an entityType helper with discriminator \"${block.discriminator}\".`);\n}\nfunction collectModelAttributeEntries(namespace, path = []) {\n\tconst entries = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isAuthoringModelAttributeDescriptor(value)) {\n\t\t\tif (!isWellFormedDescriptor(value, \"modelAttribute\")) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring modelAttribute contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/attribute) but does not satisfy the modelAttribute descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\tentries.push({\n\t\t\t\tpath: currentPath.join(\".\"),\n\t\t\t\tdiscriminator: value.attribute\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"object\" && value !== null && !Array.isArray(value)) {\n\t\t\tconst record = blindCast(value);\n\t\t\tif (typeof record[\"attribute\"] === \"string\" && \"spec\" in record) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring modelAttribute contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/attribute) but does not satisfy the modelAttribute descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\tentries.push(...collectModelAttributeEntries(value, currentPath));\n\t\t}\n\t}\n\treturn entries;\n}\n/**\n* Throws when two modelAttribute contributions — at any paths, even\n* different ones — claim the same bare `@@` attribute name. The family\n* interpreter dispatches by attribute name, not by registration path, so\n* two descriptors claiming the same name would have one silently shadow\n* the other.\n*/\nfunction assertUniqueModelAttributeNames(entries) {\n\tconst seen = /* @__PURE__ */ new Map();\n\tfor (const { path, discriminator: attribute } of entries) {\n\t\tconst existing = seen.get(attribute);\n\t\tif (existing !== void 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Duplicate modelAttribute \"${attribute}\" registered at both \"${existing}\" and \"${path}\". Each modelAttribute contribution must claim a unique attribute name.`);\n\t\tseen.set(attribute, path);\n\t}\n}\nfunction assertNoCrossRegistryCollisions(typeNamespace, fieldNamespace, entityTypeNamespace = {}, pslBlockNamespace = {}, modelAttributeNamespace = {}) {\n\tconst typePaths = new Set(collectDescriptorPaths(typeNamespace, isAuthoringTypeConstructorDescriptor));\n\tconst fieldPaths = new Set(collectDescriptorPaths(fieldNamespace, isAuthoringFieldPresetDescriptor));\n\tconst entityPaths = new Set(collectDescriptorPaths(entityTypeNamespace, isAuthoringEntityTypeDescriptor));\n\tconst ambiguityHint = \"Register each path in only one of authoringContributions.field / authoringContributions.type / authoringContributions.entityTypes.\";\n\tfor (const fieldPath of fieldPaths) if (typePaths.has(fieldPath)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Ambiguous authoring registry path \"${fieldPath}\". The same path is registered as both a type constructor and a field preset; PSL resolution would be ambiguous. ${ambiguityHint}`);\n\tfor (const entityPath of entityPaths) if (typePaths.has(entityPath) || fieldPaths.has(entityPath)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Ambiguous authoring registry path \"${entityPath}\". The same path is registered as an entity contribution AND as a type constructor or field preset; PSL resolution would be ambiguous. ${ambiguityHint}`);\n\tassertPslBlocksHaveFactories(entityTypeNamespace, pslBlockNamespace);\n\tassertUniqueModelAttributeNames(collectModelAttributeEntries(modelAttributeNamespace));\n\tassertSelectTemplatesMatchOptionArgs(typeNamespace, fieldNamespace, entityTypeNamespace);\n}\nfunction collectDescriptorNodes(namespace, isLeaf, path = []) {\n\tconst nodes = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isLeaf(value)) {\n\t\t\tnodes.push([currentPath.join(\".\"), value]);\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"object\" && value !== null && !Array.isArray(value)) nodes.push(...collectDescriptorNodes(value, isLeaf, currentPath));\n\t}\n\treturn nodes;\n}\nfunction collectSelectRefs(value, found) {\n\tif (typeof value !== \"object\" || value === null) return;\n\tif (isAuthoringSelectRef(value)) {\n\t\tfound.push(value);\n\t\tfor (const caseTemplate of Object.values(value.cases)) collectSelectRefs(caseTemplate, found);\n\t\treturn;\n\t}\n\tif (isAuthoringArgRef(value)) {\n\t\tcollectSelectRefs(value.default, found);\n\t\treturn;\n\t}\n\tif (Array.isArray(value)) {\n\t\tfor (const entry of value) collectSelectRefs(entry, found);\n\t\treturn;\n\t}\n\tfor (const entry of Object.values(value)) collectSelectRefs(entry, found);\n}\nfunction validateSelectRefsAgainstArgs(label, helperPath, args, templateRoot) {\n\tconst selects = [];\n\tcollectSelectRefs(templateRoot, selects);\n\tfor (const select of selects) {\n\t\tconst position = `#${select.index + 1}`;\n\t\tlet descriptor = args?.[select.index];\n\t\tif (descriptor === void 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring ${label} helper \"${helperPath}\" select template references argument ${position}, but the helper declares no argument at that position.`);\n\t\tfor (const segment of select.path ?? []) {\n\t\t\tdescriptor = descriptor.kind === \"object\" ? descriptor.properties[segment] : void 0;\n\t\t\tif (descriptor === void 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring ${label} helper \"${helperPath}\" select template references argument ${position} at path \"${(select.path ?? []).join(\".\")}\", which does not resolve to a declared argument property.`);\n\t\t}\n\t\tif (descriptor.kind !== \"option\") throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring ${label} helper \"${helperPath}\" select template references argument ${position}, which is kind \"${descriptor.kind}\"; select requires an option argument.`);\n\t\tconst argumentLabel = descriptor.name !== void 0 ? `\"${descriptor.name}\"` : position;\n\t\tconst missing = descriptor.values.filter((value) => !Object.hasOwn(select.cases, value));\n\t\tif (missing.length > 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring ${label} helper \"${helperPath}\" option argument ${argumentLabel} allows [${descriptor.values.join(\", \")}] but the select template has no case for: ${missing.join(\", \")}.`);\n\t\tconst values = descriptor.values;\n\t\tconst unreachable = Object.keys(select.cases).filter((key) => !values.includes(key));\n\t\tif (unreachable.length > 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring ${label} helper \"${helperPath}\" select template has case(s) not allowed by option argument ${argumentLabel}: ${unreachable.join(\", \")}. Allowed values: [${values.join(\", \")}].`);\n\t}\n}\n/**\n* Every `select` template node must target an option argument whose `values`\n* exactly cover the node's `cases` — a legal token with no case and a case no\n* token can reach are both declaration bugs, caught here at pack-registration\n* time rather than at first resolution.\n*/\nfunction assertSelectTemplatesMatchOptionArgs(typeNamespace, fieldNamespace, entityTypeNamespace) {\n\tfor (const [helperPath, descriptor] of collectDescriptorNodes(fieldNamespace, isAuthoringFieldPresetDescriptor)) validateSelectRefsAgainstArgs(\"field\", helperPath, descriptor.args, descriptor.output);\n\tfor (const [helperPath, descriptor] of collectDescriptorNodes(typeNamespace, isAuthoringTypeConstructorDescriptor)) validateSelectRefsAgainstArgs(\"type\", helperPath, descriptor.args, descriptor.output);\n\tfor (const [helperPath, descriptor] of collectDescriptorNodes(entityTypeNamespace, isAuthoringEntityTypeDescriptor)) if (\"template\" in descriptor.output) validateSelectRefsAgainstArgs(\"entityType\", helperPath, descriptor.args, descriptor.output.template);\n}\nfunction resolveAuthoringTemplateValue(template, args) {\n\tif (template === void 0) return;\n\tif (isAuthoringArgRef(template)) {\n\t\tconst value = readTemplateArgumentValue(args, template.index, template.path);\n\t\tif (value === void 0 && template.default !== void 0) return resolveAuthoringTemplateValue(template.default, args);\n\t\treturn value;\n\t}\n\tif (isAuthoringSelectRef(template)) {\n\t\tconst value = readTemplateArgumentValue(args, template.index, template.path);\n\t\tif (value === void 0) return;\n\t\tif (typeof value !== \"string\" || !Object.hasOwn(template.cases, value)) throw new InternalError(`Authoring template select has no case for value \"${String(value)}\"`);\n\t\treturn resolveAuthoringTemplateValue(template.cases[value], args);\n\t}\n\tif (Array.isArray(template)) return template.map((value) => resolveAuthoringTemplateValue(value, args));\n\tif (typeof template === \"object\" && template !== null) {\n\t\tconst resolved = {};\n\t\tfor (const [key, value] of Object.entries(template)) {\n\t\t\tconst resolvedValue = resolveAuthoringTemplateValue(value, args);\n\t\t\tif (resolvedValue !== void 0) resolved[key] = resolvedValue;\n\t\t}\n\t\treturn resolved;\n\t}\n\treturn template;\n}\nfunction validateAuthoringArgument(descriptor, value, path) {\n\tif (value === void 0) {\n\t\tif (descriptor.optional) return;\n\t\tthrow runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Missing required authoring helper argument at ${path}`);\n\t}\n\tif (descriptor.kind === \"string\") {\n\t\tif (typeof value !== \"string\") throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be a string`);\n\t\treturn;\n\t}\n\tif (descriptor.kind === \"boolean\") {\n\t\tif (typeof value !== \"boolean\") throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be a boolean`);\n\t\treturn;\n\t}\n\tif (descriptor.kind === \"stringArray\") {\n\t\tif (!Array.isArray(value)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be an array of strings`);\n\t\tfor (const entry of value) if (typeof entry !== \"string\") throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be an array of strings`);\n\t\treturn;\n\t}\n\tif (descriptor.kind === \"object\") {\n\t\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be an object`);\n\t\tconst input = value;\n\t\tconst expectedKeys = new Set(Object.keys(descriptor.properties));\n\t\tfor (const key of Object.keys(input)) if (!expectedKeys.has(key)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} contains unknown property \"${key}\"`);\n\t\tfor (const [key, propertyDescriptor] of Object.entries(descriptor.properties)) validateAuthoringArgument(propertyDescriptor, input[key], `${path}.${key}`);\n\t\treturn;\n\t}\n\tif (descriptor.kind === \"option\") {\n\t\tif (typeof value !== \"string\" || !descriptor.values.includes(value)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be one of: ${descriptor.values.join(\", \")}`);\n\t\treturn;\n\t}\n\tif (typeof value !== \"number\" || Number.isNaN(value)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be a number`);\n\tif (descriptor.integer && !Number.isInteger(value)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be an integer`);\n\tif (descriptor.minimum !== void 0 && value < descriptor.minimum) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be >= ${descriptor.minimum}, received ${value}`);\n\tif (descriptor.maximum !== void 0 && value > descriptor.maximum) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be <= ${descriptor.maximum}, received ${value}`);\n}\nfunction validateAuthoringHelperArguments(helperPath, descriptors, args) {\n\tconst expected = descriptors ?? [];\n\tconst minimumArgs = expected.reduce((count, descriptor, index) => descriptor.optional ? count : index + 1, 0);\n\tif (args.length < minimumArgs || args.length > expected.length) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `${helperPath} expects ${minimumArgs === expected.length ? expected.length : `${minimumArgs}-${expected.length}`} argument(s), received ${args.length}`);\n\texpected.forEach((descriptor, index) => {\n\t\tvalidateAuthoringArgument(descriptor, args[index], `${helperPath}[${index}]`);\n\t});\n}\nfunction resolveAuthoringStorageTypeTemplate(template, args) {\n\tconst nativeType = template.nativeType;\n\tif (nativeType === void 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring output template for codec \"${template.codecId}\" declares no nativeType; only entity-ref constructors may omit it`);\n\tconst typeParams = template.typeParams === void 0 ? void 0 : resolveAuthoringTemplateValue(template.typeParams, args);\n\tif (typeParams !== void 0 && !isAuthoringTemplateRecord(typeParams)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Resolved authoring typeParams must be an object for codec \"${template.codecId}\", received ${String(typeParams)}`);\n\tconst normalizedTypeParams = typeParams !== void 0 && Object.keys(typeParams).length === 0 ? void 0 : typeParams;\n\treturn {\n\t\tcodecId: template.codecId,\n\t\tnativeType,\n\t\t...ifDefined(\"typeParams\", normalizedTypeParams)\n\t};\n}\nfunction resolveAuthoringColumnDefaultTemplate(template, args) {\n\tif (template.kind === \"literal\") {\n\t\tconst value = resolveAuthoringTemplateValue(template.value, args);\n\t\tif (value === void 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", \"Resolved authoring literal default must not be undefined\");\n\t\tif (!isColumnDefaultLiteralInputValue(value)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Resolved authoring literal default must be a JSON-serializable value or Date, received ${String(value)}`);\n\t\treturn {\n\t\t\tkind: \"literal\",\n\t\t\tvalue\n\t\t};\n\t}\n\tconst expression = resolveAuthoringTemplateValue(template.expression, args);\n\tif (expression === void 0 || typeof expression === \"object\" && expression !== null) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Resolved authoring function default expression must resolve to a primitive, received ${String(expression)}`);\n\treturn {\n\t\tkind: \"function\",\n\t\texpression: String(expression)\n\t};\n}\nfunction resolveExecutionMutationDefaultPhase(phase, template, args) {\n\tconst value = resolveAuthoringTemplateValue(template, args);\n\tif (value === void 0) return;\n\tif (!isExecutionMutationDefaultValue(value)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring preset executionDefaults.${phase} did not resolve to a valid generator descriptor (kind: 'generator', id: string).`);\n\treturn value;\n}\nfunction resolveAuthoringExecutionDefaultsTemplate(template, args) {\n\tconst phases = {\n\t\t...ifDefined(\"onCreate\", template.onCreate !== void 0 ? resolveExecutionMutationDefaultPhase(\"onCreate\", template.onCreate, args) : void 0),\n\t\t...ifDefined(\"onUpdate\", template.onUpdate !== void 0 ? resolveExecutionMutationDefaultPhase(\"onUpdate\", template.onUpdate, args) : void 0)\n\t};\n\treturn Object.keys(phases).length === 0 ? void 0 : phases;\n}\nfunction instantiateAuthoringTypeConstructor(descriptor, args) {\n\treturn resolveAuthoringStorageTypeTemplate(descriptor.output, args);\n}\nfunction instantiateAuthoringEntityType(helperPath, descriptor, args, ctx) {\n\tif (\"factory\" in descriptor.output) {\n\t\tconst input = args[0];\n\t\treturn blindCast(descriptor.output.factory)(input, ctx);\n\t}\n\tvalidateAuthoringHelperArguments(helperPath, descriptor.args, args);\n\treturn blindCast(resolveAuthoringTemplateValue(descriptor.output.template, args));\n}\nfunction instantiateAuthoringFieldPreset(descriptor, args) {\n\treturn {\n\t\tdescriptor: resolveAuthoringStorageTypeTemplate(descriptor.output, args),\n\t\tnullable: descriptor.output.nullable ?? false,\n\t\t...ifDefined(\"default\", descriptor.output.default !== void 0 ? resolveAuthoringColumnDefaultTemplate(descriptor.output.default, args) : void 0),\n\t\t...ifDefined(\"executionDefaults\", descriptor.output.executionDefaults !== void 0 ? resolveAuthoringExecutionDefaultsTemplate(descriptor.output.executionDefaults, args) : void 0),\n\t\tid: descriptor.output.id ?? false,\n\t\tunique: descriptor.output.unique ?? false\n\t};\n}\n//#endregion\n//#region src/shared/temporal-presets.ts\n/**\n* Canonical id for the wall-clock-now mutation default generator. It flows to the control-plane descriptor and the temporal field presets below, to each family's runtime generator, and to the authoring surfaces (PSL `temporal.updatedAt()`, TS `field.temporal.updatedAt()`) through the descriptor.\n*/\nconst TIMESTAMP_NOW_GENERATOR_ID = \"timestampNow\";\n/**\n* Builds the control-plane descriptor for the wall-clock-now mutation default generator. Its `id` and `buildPhases` are target-agnostic, so PSL `temporal.updatedAt()` and TS `field.temporal.updatedAt()` lower to byte-identical contracts.\n*\n* `applicableCodecIds` is omitted: `timestampNow` is reachable only through a preset, which co-registers the codec itself, so a compatibility list would be tautological.\n*/\nfunction timestampNowControlDescriptor() {\n\treturn {\n\t\tid: TIMESTAMP_NOW_GENERATOR_ID,\n\t\tbuildPhases: () => ({\n\t\t\tonCreate: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid: TIMESTAMP_NOW_GENERATOR_ID\n\t\t\t},\n\t\t\tonUpdate: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid: TIMESTAMP_NOW_GENERATOR_ID\n\t\t\t}\n\t\t})\n\t};\n}\n/**\n* Builds the `temporal.{createdAt,updatedAt}` field-preset pair. `createdAt` lowers to an execution generator on `onCreate`; `updatedAt` lowers to the same generator on both `onCreate` and `onUpdate`. The target supplies the storage template of its timestamp codec, which the presets carry through unchanged; everything else is shared, so PSL and TS authoring lower to byte-identical contracts across targets.\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction temporalAuthoringPresets(input) {\n\tconst { generatorId: requestedGeneratorId, ...storage } = input;\n\tconst generatorId = requestedGeneratorId ?? \"timestampNow\";\n\treturn {\n\t\tcreatedAt: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\t...storage,\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: generatorId\n\t\t\t\t} }\n\t\t\t}\n\t\t},\n\t\tupdatedAt: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\t...storage,\n\t\t\t\texecutionDefaults: {\n\t\t\t\t\tonCreate: {\n\t\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\t\tid: generatorId\n\t\t\t\t\t},\n\t\t\t\t\tonUpdate: {\n\t\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\t\tid: generatorId\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\nconst TEMPORAL_ON_CREATE_ARG = {\n\tname: \"onCreate\",\n\tkind: \"option\",\n\tvalues: [\"now\"],\n\toptional: true\n};\nconst TEMPORAL_ON_UPDATE_ARG = {\n\tname: \"onUpdate\",\n\tkind: \"option\",\n\tvalues: [\"now\"],\n\toptional: true\n};\n/**\n* Selects a generator descriptor for the preset's `now` token. The token is preset vocabulary; the generator id never appears in a user's spelling (ADR 169 — these generators are preset-only).\n*/\nfunction temporalPhaseTemplate(index, generatorId) {\n\treturn {\n\t\tkind: \"select\",\n\t\tindex,\n\t\tcases: { now: {\n\t\t\tkind: \"generator\",\n\t\t\tid: generatorId\n\t\t} }\n\t};\n}\n/**\n* Builds a `temporal.<codec>` field preset for a codec with no type parameters, carrying the codec's storage template through unchanged. Both phase arguments are optional, and omitting one omits that phase.\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction temporalCodecPreset(storage) {\n\treturn {\n\t\tkind: \"fieldPreset\",\n\t\targs: [TEMPORAL_ON_CREATE_ARG, TEMPORAL_ON_UPDATE_ARG],\n\t\toutput: {\n\t\t\t...storage,\n\t\t\texecutionDefaults: {\n\t\t\t\tonCreate: temporalPhaseTemplate(0, TIMESTAMP_NOW_GENERATOR_ID),\n\t\t\t\tonUpdate: temporalPhaseTemplate(1, TIMESTAMP_NOW_GENERATOR_ID)\n\t\t\t}\n\t\t}\n\t};\n}\n//#endregion\nexport { resolveEnumCodecId as A, isAuthoringTypeConstructorDescriptor as C, mergeAuthoringAttributeSpecs as D, loweringEntryKey as E, mergeAuthoringNamespaces as O, isAuthoringPslBlockDescriptor as S, isLoweringEntryKey as T, instantiateAuthoringTypeConstructor as _, temporalCodecPreset as a, isAuthoringFieldPresetDescriptor as b, assertNoCrossRegistryCollisions as c, collectContributedDescriptorPaths as d, collectScalarTypeConstructors as f, instantiateAuthoringFieldPreset as g, instantiateAuthoringEntityType as h, temporalAuthoringPresets as i, validateAuthoringHelperArguments as j, resolveAuthoringTemplateValue as k, assertResolvableTypeConstructorTemplates as l, hasRegisteredFieldNamespace as m, TEMPORAL_ON_UPDATE_ARG as n, temporalPhaseTemplate as o, flushAuthoringWarnings as p, TIMESTAMP_NOW_GENERATOR_ID as r, timestampNowControlDescriptor as s, TEMPORAL_ON_CREATE_ARG as t, classifyEnumMemberType as u, isAuthoringArgRef as v, isDataTypeLoweringEntry as w, isAuthoringModelAttributeDescriptor as x, isAuthoringEntityTyp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