react-semaphor 0.1.408 → 0.1.409

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 (47) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +22 -21
  3. package/dist/chunks/{calendar-preferences-dialog-BEJunQM-.js → calendar-preferences-dialog-B8FmFRHX.js} +1 -1
  4. package/dist/chunks/{calendar-preferences-dialog-BDovl96B.js → calendar-preferences-dialog-ck4AU-to.js} +1 -1
  5. package/dist/chunks/{dashboard-briefing-launcher-D-G1kXb8.js → dashboard-briefing-launcher-Br_1IK1z.js} +1 -1
  6. package/dist/chunks/{dashboard-briefing-launcher-DmybDHiR.js → dashboard-briefing-launcher-Tr2SqDMK.js} +2 -2
  7. package/dist/chunks/{dashboard-controls-DgjlAGWu.js → dashboard-controls-B2bEv8uG.js} +3 -3
  8. package/dist/chunks/{dashboard-controls-DIPQW6Vj.js → dashboard-controls-B7OObDNl.js} +1 -1
  9. package/dist/chunks/{dashboard-json-DUmEB8x3.js → dashboard-json-DAB8WVyb.js} +1 -1
  10. package/dist/chunks/{dashboard-json-DvW8_MWp.js → dashboard-json-DNixjalS.js} +1 -1
  11. package/dist/chunks/{edit-dashboard-visual-BZnVLA4S.js → edit-dashboard-visual-DWygSAp3.js} +1 -1
  12. package/dist/chunks/{edit-dashboard-visual-BuwFsoeW.js → edit-dashboard-visual-Dh8Ge3-B.js} +2 -2
  13. package/dist/chunks/{index-DhkNgPPm.js → index-BkTLAfKy.js} +4 -4
  14. package/dist/chunks/{index-D7JKnhyA.js → index-CQIMj-FF.js} +2 -2
  15. package/dist/chunks/source-identity-BM2FvJDP.js +1 -0
  16. package/dist/chunks/{source-identity-y0VSSreA.js → source-identity-Cv4Nm3TM.js} +23 -15
  17. package/dist/chunks/{update-policy-Bv3_5LFK.js → update-policy-BnEbPhHW.js} +305 -282
  18. package/dist/chunks/update-policy-CWg9c08k.js +3 -0
  19. package/dist/chunks/{use-create-flow-overlay-state-C9QPAd9_.js → use-create-flow-overlay-state-CZA-dSns.js} +1 -1
  20. package/dist/chunks/{use-create-flow-overlay-state-B8clS9IG.js → use-create-flow-overlay-state-uujasvbD.js} +1 -1
  21. package/dist/chunks/{validators-DaBsAUsR.js → validators-C-_9Ew5G.js} +1 -1
  22. package/dist/chunks/{validators-BCQB11_y.js → validators-CB9BFarT.js} +1 -1
  23. package/dist/dashboard/index.cjs +1 -1
  24. package/dist/dashboard/index.js +1 -1
  25. package/dist/dashboard-authoring/index.cjs +1 -1
  26. package/dist/dashboard-authoring/index.js +2 -2
  27. package/dist/data-app-builder/index.cjs +1 -1
  28. package/dist/data-app-builder/index.js +1 -1
  29. package/dist/data-app-codegen/index.cjs +1 -1
  30. package/dist/data-app-codegen/index.js +1 -1
  31. package/dist/data-app-codegen-node/index.cjs +304 -105
  32. package/dist/data-app-codegen-node/index.js +800 -503
  33. package/dist/data-app-sdk/index.cjs +2 -2
  34. package/dist/data-app-sdk/index.js +158 -155
  35. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  36. package/dist/data-app-sdk-adapters/index.js +1 -1
  37. package/dist/data-app-sdk-validation/index.cjs +1 -1
  38. package/dist/data-app-sdk-validation/index.js +2 -2
  39. package/dist/index.cjs +1 -1
  40. package/dist/index.js +4 -4
  41. package/dist/surfboard/index.cjs +1 -1
  42. package/dist/surfboard/index.js +2 -2
  43. package/dist/types/analytics-protocol.d.ts +2 -0
  44. package/dist/types/data-app-sdk.d.ts +3 -0
  45. package/package.json +1 -1
  46. package/dist/chunks/source-identity-uMaUe036.js +0 -1
  47. package/dist/chunks/update-policy-2M0canB_.js +0 -3
@@ -1,14 +1,14 @@
1
1
  import { S as W, a as Q, v as X } from "./analyze-result-contract-DPjm6btg.js";
2
2
  import { toSemaphorInputOptionsIntent as Z, toSemaphorAnalysisQueryOptions as ee, toSemaphorAnalysisIntent as te, toSemaphorMetricIntent as re, toSemaphorRecordsIntent as ne, toSemaphorMatrixIntent as ae, toSemaphorSqlIntent as se } from "../data-app-sdk-adapters/index.js";
3
- const Be = W, K = Q, M = "semaphor-generated-data-app-contract/v1", x = "semaphor-generated-data-app-contract-manifest/v1";
4
- function L(e) {
3
+ const Le = W, j = Q, x = "semaphor-generated-data-app-contract/v1", M = "semaphor-generated-data-app-contract-manifest/v1";
4
+ function P(e) {
5
5
  return _(e) ? [
6
6
  ...X(e).issues,
7
7
  ...ie(e)
8
8
  ] : ["Plan artifact must be a Semaphor codegenSummary object."];
9
9
  }
10
- function Le(e) {
11
- const t = L(e);
10
+ function ze(e) {
11
+ const t = P(e);
12
12
  if (t.length > 0)
13
13
  throw new Error(`Invalid Semaphor codegenSummary:
14
14
  - ${t.join(`
@@ -22,23 +22,36 @@ function ie(e) {
22
22
  const n = [];
23
23
  return ((r = _(t.validation)) == null ? void 0 : r.status) === "blocked" && n.push(
24
24
  "validation.status blocked cannot be generated. Resolve blocked semantic model gaps and replan before generating contract files."
25
- ), Array.isArray(t.unsupportedInsights) && t.unsupportedInsights.forEach((s, a) => {
26
- var i;
27
- ((i = _(s)) == null ? void 0 : i.reason) === "missing_relationship" && n.push(
28
- `unsupportedInsights.${a}.reason missing_relationship blocks contract generation. Call semaphor_propose_semantic_model_change, apply an approved semantic model patch, and replan before generating contract files.`
25
+ ), Array.isArray(t.unsupportedInsights) && t.unsupportedInsights.forEach((a, i) => {
26
+ var s;
27
+ ((s = _(a)) == null ? void 0 : s.reason) === "missing_relationship" && n.push(
28
+ `unsupportedInsights.${i}.reason missing_relationship blocks contract generation. Call semaphor_propose_semantic_model_change, apply an approved semantic model patch, and replan before generating contract files.`
29
29
  );
30
- }), Array.isArray(t.views) && t.views.forEach((s, a) => {
30
+ }), Array.isArray(t.views) && t.views.forEach((a, i) => {
31
31
  var o;
32
- const i = _((o = _(s)) == null ? void 0 : o.computation);
33
- (i == null ? void 0 : i.kind) === "unsupported" && i.reason === "missing_relationship" && n.push(
34
- `views.${a}.computation.reason missing_relationship blocks contract generation. Call semaphor_propose_semantic_model_change, apply an approved semantic model patch, and replan before generating contract files.`
32
+ const s = _((o = _(a)) == null ? void 0 : o.computation);
33
+ (s == null ? void 0 : s.kind) === "unsupported" && s.reason === "missing_relationship" && n.push(
34
+ `views.${i}.computation.reason missing_relationship blocks contract generation. Call semaphor_propose_semantic_model_change, apply an approved semantic model patch, and replan before generating contract files.`
35
35
  );
36
36
  }), n;
37
37
  }
38
38
  function _(e) {
39
39
  return e && typeof e == "object" && !Array.isArray(e) ? e : void 0;
40
40
  }
41
- async function Pe({
41
+ const oe = [
42
+ "sources.ts",
43
+ "fields.ts",
44
+ "inputs.ts",
45
+ "queries.ts",
46
+ "bindings.ts",
47
+ "accessors.ts",
48
+ "metadata.ts",
49
+ "index.ts"
50
+ ], ce = [
51
+ ...oe,
52
+ "contract.manifest.json"
53
+ ];
54
+ async function Je({
42
55
  manifest: e,
43
56
  generatedFiles: t
44
57
  }) {
@@ -52,34 +65,34 @@ async function Pe({
52
65
  }
53
66
  ]
54
67
  };
55
- r.schemaVersion !== x && n.push({
68
+ r.schemaVersion !== M && n.push({
56
69
  path: "schemaVersion",
57
- message: `schemaVersion must be ${x}. Regenerate the contract with semaphor_create_data_app_contract.`,
70
+ message: `schemaVersion must be ${M}. Regenerate the contract with semaphor_create_data_app_contract.`,
58
71
  repairHint: "Regenerate the contract with semaphor_create_data_app_contract."
59
- }), r.generatedContractSchemaVersion !== M && n.push({
72
+ }), r.generatedContractSchemaVersion !== x && n.push({
60
73
  path: "generatedContractSchemaVersion",
61
- message: `generatedContractSchemaVersion must be ${M}. Regenerate the contract with semaphor_generate_data_app_contract.`,
74
+ message: `generatedContractSchemaVersion must be ${x}. Regenerate the contract with semaphor_generate_data_app_contract.`,
62
75
  repairHint: "Regenerate the contract with semaphor_generate_data_app_contract."
63
76
  });
64
- const s = y(r.generator);
65
- S(s == null ? void 0 : s.name) || n.push({
77
+ const a = y(r.generator);
78
+ S(a == null ? void 0 : a.name) || n.push({
66
79
  path: "generator.name",
67
80
  message: "generator.name is required.",
68
81
  repairHint: "Regenerate the generated contract so manifest generator metadata is written deterministically."
69
- }), S(s == null ? void 0 : s.version) || n.push({
82
+ }), S(a == null ? void 0 : a.version) || n.push({
70
83
  path: "generator.version",
71
84
  message: "generator.version is required.",
72
85
  repairHint: "Regenerate the generated contract so manifest generator metadata is written deterministically."
73
86
  });
74
- for (const a of L(r.codegenSummary))
87
+ for (const s of P(r.codegenSummary))
75
88
  n.push({
76
- path: `codegenSummary.${a}`,
77
- message: `codegenSummary.${a}`,
89
+ path: `codegenSummary.${s}`,
90
+ message: `codegenSummary.${s}`,
78
91
  repairHint: "Regenerate the generated contract from a valid Data App codegenSummary."
79
92
  });
80
- if (r.codegenSummaryValidatorVersion !== K && n.push({
93
+ if (r.codegenSummaryValidatorVersion !== j && n.push({
81
94
  path: "codegenSummaryValidatorVersion",
82
- message: `codegenSummaryValidatorVersion must be ${K}. Regenerate the contract with semaphor_generate_data_app_contract.`,
95
+ message: `codegenSummaryValidatorVersion must be ${j}. Regenerate the contract with semaphor_generate_data_app_contract.`,
83
96
  repairHint: "Regenerate the contract with semaphor_generate_data_app_contract."
84
97
  }), typeof r.codegenSummaryHash != "string")
85
98
  n.push({
@@ -88,24 +101,26 @@ async function Pe({
88
101
  repairHint: "Regenerate the generated contract so manifest hashes are written deterministically."
89
102
  });
90
103
  else if (y(r.codegenSummary)) {
91
- const a = await de(
104
+ const s = await pe(
92
105
  r.codegenSummary
93
106
  );
94
- r.codegenSummaryHash !== a && n.push({
107
+ r.codegenSummaryHash !== s && n.push({
95
108
  path: "codegenSummaryHash",
96
109
  message: "codegenSummaryHash does not match codegenSummary. Regenerate the contract instead of editing the manifest.",
97
110
  repairHint: "Regenerate the generated contract instead of editing the manifest."
98
111
  });
99
112
  }
100
- if (n.push(...oe(r.codegenSummary)), typeof r.generatedContentHash != "string")
113
+ n.push(...ue(r.codegenSummary));
114
+ const i = t ? de(t) : [];
115
+ if (n.push(...i), typeof r.generatedContentHash != "string")
101
116
  n.push({
102
117
  path: "generatedContentHash",
103
118
  message: "generatedContentHash is required.",
104
119
  repairHint: "Regenerate the generated contract so manifest hashes are written deterministically."
105
120
  });
106
- else if (t) {
107
- const a = await ce(t);
108
- r.generatedContentHash !== a && n.push({
121
+ else if (t && i.length === 0) {
122
+ const s = await fe(t);
123
+ r.generatedContentHash !== s && n.push({
109
124
  path: "generatedContentHash",
110
125
  message: "generatedContentHash does not match generated TypeScript files. Regenerate the contract instead of hand-editing generated files.",
111
126
  repairHint: "Regenerate the contract instead of hand-editing generated files."
@@ -113,52 +128,73 @@ async function Pe({
113
128
  }
114
129
  return { issues: n };
115
130
  }
116
- function oe(e) {
131
+ function de(e) {
132
+ var r;
133
+ const t = [], n = new Set(ce);
134
+ for (const a of Object.keys(e)) {
135
+ if (a.includes("/") || a.includes("\\")) {
136
+ const i = ((r = a.split("/").pop()) == null ? void 0 : r.split("\\").pop()) || a;
137
+ t.push({
138
+ path: `generatedFiles.${a}`,
139
+ message: `generatedFiles keys must be generated filenames such as "${i}", not path-qualified keys such as "${a}".`,
140
+ repairHint: 'Pass generatedFiles keyed by filename, for example "queries.ts", not "src/semaphor/generated/queries.ts".'
141
+ });
142
+ continue;
143
+ }
144
+ n.has(a) || t.push({
145
+ path: `generatedFiles.${a}`,
146
+ message: `generatedFiles contains unknown generated contract file "${a}".`,
147
+ repairHint: "Pass only the generated files returned by semaphor_generate_data_app_contract, keyed by filename."
148
+ });
149
+ }
150
+ return t;
151
+ }
152
+ function ue(e) {
117
153
  const t = y(e);
118
154
  if (!t)
119
155
  return [];
120
156
  const n = [], r = new Set(
121
- E(t.inputs).map((a) => {
122
- var i;
123
- return (i = y(a)) == null ? void 0 : i.id;
157
+ V(t.inputs).map((i) => {
158
+ var s;
159
+ return (s = y(i)) == null ? void 0 : s.id;
124
160
  }).filter(S)
125
- ), s = new Set(
126
- E(t.views).map((a) => {
127
- var i;
128
- return (i = y(a)) == null ? void 0 : i.id;
161
+ ), a = new Set(
162
+ V(t.views).map((i) => {
163
+ var s;
164
+ return (s = y(i)) == null ? void 0 : s.id;
129
165
  }).filter(S)
130
166
  );
131
- return E(t.filterContracts).forEach((a, i) => {
132
- const o = y(a), c = o == null ? void 0 : o.inputId;
167
+ return V(t.filterContracts).forEach((i, s) => {
168
+ const o = y(i), c = o == null ? void 0 : o.inputId;
133
169
  (!S(c) || !r.has(c)) && n.push({
134
- path: `codegenSummary.filterContracts.${i}.inputId`,
135
- message: `codegenSummary.filterContracts.${i}.inputId must reference a generated input.`,
170
+ path: `codegenSummary.filterContracts.${s}.inputId`,
171
+ message: `codegenSummary.filterContracts.${s}.inputId must reference a generated input.`,
136
172
  repairHint: "Regenerate the generated contract from a valid planner output."
137
173
  }), Array.isArray(o == null ? void 0 : o.bindings) && o.bindings.forEach((u, f) => {
138
- const g = y(u), l = g == null ? void 0 : g.viewId;
139
- (!S(l) || !s.has(l)) && n.push({
140
- path: `codegenSummary.filterContracts.${i}.bindings.${f}.viewId`,
141
- message: `codegenSummary.filterContracts.${i}.bindings.${f}.viewId must reference a generated view.`,
174
+ const p = y(u), m = p == null ? void 0 : p.viewId;
175
+ (!S(m) || !a.has(m)) && n.push({
176
+ path: `codegenSummary.filterContracts.${s}.bindings.${f}.viewId`,
177
+ message: `codegenSummary.filterContracts.${s}.bindings.${f}.viewId must reference a generated view.`,
142
178
  repairHint: "Regenerate the generated contract from a valid planner output."
143
179
  });
144
- const h = y(g == null ? void 0 : g.fieldRef);
180
+ const h = y(p == null ? void 0 : p.fieldRef);
145
181
  S(h == null ? void 0 : h.name) || n.push({
146
- path: `codegenSummary.filterContracts.${i}.bindings.${f}.fieldRef`,
147
- message: `codegenSummary.filterContracts.${i}.bindings.${f}.fieldRef is required.`,
182
+ path: `codegenSummary.filterContracts.${s}.bindings.${f}.fieldRef`,
183
+ message: `codegenSummary.filterContracts.${s}.bindings.${f}.fieldRef is required.`,
148
184
  repairHint: "Regenerate the generated contract from a valid planner output."
149
185
  });
150
186
  });
151
187
  }), n;
152
188
  }
153
- async function ce(e) {
189
+ async function fe(e) {
154
190
  const t = Object.keys(e).filter((r) => r.endsWith(".ts")).sort();
155
191
  let n = "";
156
192
  for (const r of t)
157
193
  n += `${r}\0${e[r]}\0`;
158
- return `sha256:${await P(n)}`;
194
+ return `sha256:${await L(n)}`;
159
195
  }
160
- async function de(e) {
161
- return `sha256:${await P(N(e))}`;
196
+ async function pe(e) {
197
+ return `sha256:${await L(N(e))}`;
162
198
  }
163
199
  function N(e) {
164
200
  if (e === null || typeof e != "object")
@@ -168,75 +204,62 @@ function N(e) {
168
204
  const t = e;
169
205
  return `{${Object.keys(t).sort().filter((r) => t[r] !== void 0).map((r) => `${JSON.stringify(r)}:${N(t[r])}`).join(",")}}`;
170
206
  }
171
- async function P(e) {
207
+ async function L(e) {
172
208
  var r;
173
209
  if (!((r = globalThis.crypto) != null && r.subtle))
174
210
  throw new Error("SHA-256 digest support is required for generated contract validation.");
175
211
  const t = new TextEncoder().encode(e), n = await globalThis.crypto.subtle.digest("SHA-256", t);
176
- return Array.from(new Uint8Array(n)).map((s) => s.toString(16).padStart(2, "0")).join("");
212
+ return Array.from(new Uint8Array(n)).map((a) => a.toString(16).padStart(2, "0")).join("");
177
213
  }
178
214
  function y(e) {
179
215
  return e && typeof e == "object" && !Array.isArray(e) ? e : void 0;
180
216
  }
181
- function E(e) {
217
+ function V(e) {
182
218
  return Array.isArray(e) ? e : [];
183
219
  }
184
220
  function S(e) {
185
221
  return typeof e == "string" && e.length > 0;
186
222
  }
187
- const ue = [
188
- "sources.ts",
189
- "fields.ts",
190
- "inputs.ts",
191
- "queries.ts",
192
- "bindings.ts",
193
- "accessors.ts",
194
- "metadata.ts",
195
- "index.ts"
196
- ], ze = [
197
- ...ue,
198
- "contract.manifest.json"
199
- ];
200
- function Je(e) {
201
- const t = d(e), n = C(t), r = [], s = [];
202
- return R(t == null ? void 0 : t.views).filter((a) => {
223
+ function Ue(e) {
224
+ const t = d(e), n = b(t), r = [], a = [];
225
+ return R(t == null ? void 0 : t.views).filter((i) => {
203
226
  var o;
204
- const i = d((o = d(a)) == null ? void 0 : o.sdkSpec);
205
- return !!(i != null && i.builder && (i != null && i.spec));
206
- }).forEach((a, i) => {
227
+ const s = d((o = d(i)) == null ? void 0 : o.sdkSpec);
228
+ return !!(s != null && s.builder && (s != null && s.spec));
229
+ }).forEach((i, s) => {
207
230
  var u;
208
- const o = String(((u = d(a)) == null ? void 0 : u.id) || `view_${i}`), c = fe(
209
- a,
231
+ const o = String(((u = d(i)) == null ? void 0 : u.id) || `view_${s}`), c = ge(
232
+ i,
210
233
  n
211
234
  );
212
235
  if (c) {
213
236
  r.push({ viewId: o, ...c });
214
237
  return;
215
238
  }
216
- s.push({
239
+ a.push({
217
240
  viewId: o,
218
241
  path: `views.${o}.sdkSpec`,
219
242
  message: `Generated view execution validation could not build intent for "${o}".`
220
243
  });
221
- }), { requests: r, issues: s };
244
+ }), { requests: r, issues: a };
222
245
  }
223
- function fe(e, t) {
224
- const n = d(e), r = d(n == null ? void 0 : n.sdkSpec), s = d(r == null ? void 0 : r.spec);
225
- if (!n || !(r != null && r.builder) || !s)
246
+ function ge(e, t) {
247
+ const n = d(e), r = d(n == null ? void 0 : n.sdkSpec), a = d(r == null ? void 0 : r.spec);
248
+ if (!n || !(r != null && r.builder) || !a)
226
249
  return null;
227
- const a = ge(t) ? t : C(d(t)), i = Ee(r.builder), o = d(A(s, a)) || {}, c = me({
250
+ const i = le(t) ? t : b(d(t)), s = Oe(r.builder), o = d(A(a, i)) || {}, c = he({
228
251
  view: n,
229
- builder: i,
230
- rawSpec: s,
252
+ builder: s,
253
+ rawSpec: a,
231
254
  spec: {
232
255
  ...o,
233
256
  id: n.id,
234
- label: Ve(n, s)
257
+ label: Ee(n, a)
235
258
  },
236
- context: a
259
+ context: i
237
260
  });
238
261
  try {
239
- if (i === "analysis") {
262
+ if (s === "analysis") {
240
263
  const u = c;
241
264
  return {
242
265
  intent: te(u),
@@ -244,22 +267,22 @@ function fe(e, t) {
244
267
  analysisOptions: ee(u)
245
268
  };
246
269
  }
247
- if (i === "metric")
270
+ if (s === "metric")
248
271
  return {
249
272
  intent: re(c),
250
273
  resultShape: "metric"
251
274
  };
252
- if (i === "records")
275
+ if (s === "records")
253
276
  return {
254
277
  intent: ne(c),
255
278
  resultShape: "records"
256
279
  };
257
- if (i === "matrix")
280
+ if (s === "matrix")
258
281
  return {
259
282
  intent: ae(c),
260
283
  resultShape: "matrix"
261
284
  };
262
- if (i === "sql")
285
+ if (s === "sql")
263
286
  return {
264
287
  intent: se(c),
265
288
  resultShape: "sql"
@@ -269,73 +292,73 @@ function fe(e, t) {
269
292
  }
270
293
  return null;
271
294
  }
272
- function Ue({
295
+ function Ye({
273
296
  input: e,
274
297
  filterContract: t,
275
298
  codegenSummary: n
276
299
  }) {
277
- const r = d(e), s = d(t), a = d(r == null ? void 0 : r.optionQuery) || d(s == null ? void 0 : s.optionQuery);
278
- if (!r || !a)
300
+ const r = d(e), a = d(t), i = d(r == null ? void 0 : r.optionQuery) || d(a == null ? void 0 : a.optionQuery);
301
+ if (!r || !i)
279
302
  return null;
280
- const i = C(d(n)), o = d(a.spec), c = pe(a, o, i), u = a.valueFieldRef || a.valueField || (o == null ? void 0 : o.valueField), f = a.labelFieldRef || a.labelField || (o == null ? void 0 : o.labelField);
303
+ const s = b(d(n)), o = d(i.spec), c = me(i, o, s), u = i.valueFieldRef || i.valueField || (o == null ? void 0 : o.valueField), f = i.labelFieldRef || i.labelField || (o == null ? void 0 : o.labelField);
281
304
  if (!c || !u || !f)
282
305
  return null;
283
- const l = {
306
+ const m = {
284
307
  ...d(
285
- A(o || {}, i)
308
+ A(o || {}, s)
286
309
  ) || {},
287
- id: a.id || (o == null ? void 0 : o.id) || `${r.id}-options`,
310
+ id: i.id || (o == null ? void 0 : o.id) || `${r.id}-options`,
288
311
  inputId: r.id,
289
312
  source: c,
290
313
  valueField: u,
291
314
  labelField: f,
292
- population: a.population || (o == null ? void 0 : o.population),
293
- dependencies: a.dependencies || (o == null ? void 0 : o.dependencies),
294
- limit: a.limit || (o == null ? void 0 : o.limit) || 100
315
+ population: i.population || (o == null ? void 0 : o.population),
316
+ dependencies: i.dependencies || (o == null ? void 0 : o.dependencies),
317
+ limit: i.limit || (o == null ? void 0 : o.limit) || 100
295
318
  };
296
319
  try {
297
320
  return Z(
298
- A(l, i)
321
+ A(m, s)
299
322
  );
300
323
  } catch {
301
324
  return null;
302
325
  }
303
326
  }
304
- function Ye({
327
+ function We({
305
328
  input: e,
306
329
  filterContract: t,
307
330
  binding: n,
308
331
  option: r,
309
- codegenSummary: s
332
+ codegenSummary: a
310
333
  }) {
311
- const a = C(d(s)), i = d(e), o = d(t), c = d(n), u = A(
312
- (c == null ? void 0 : c.fieldRef) || (o == null ? void 0 : o.fieldRef) || (i == null ? void 0 : i.fieldRef),
313
- a
334
+ const i = b(d(a)), s = d(e), o = d(t), c = d(n), u = A(
335
+ (c == null ? void 0 : c.fieldRef) || (o == null ? void 0 : o.fieldRef) || (s == null ? void 0 : s.fieldRef),
336
+ i
314
337
  ), f = String(
315
- (o == null ? void 0 : o.operator) || (i == null ? void 0 : i.operator) || "in"
316
- ), g = Oe(c);
338
+ (o == null ? void 0 : o.operator) || (s == null ? void 0 : s.operator) || "in"
339
+ ), p = Ne(c);
317
340
  return {
318
- inputId: String((o == null ? void 0 : o.inputId) || (i == null ? void 0 : i.id) || ""),
341
+ inputId: String((o == null ? void 0 : o.inputId) || (s == null ? void 0 : s.id) || ""),
319
342
  kind: "filter",
320
343
  operator: f,
321
- value: be(f, r.value),
344
+ value: He(f, r.value),
322
345
  isActive: !0,
323
346
  ...u ? { field: u } : {},
324
- ...g ? { relationshipHint: g } : {}
347
+ ...p ? { relationshipHint: p } : {}
325
348
  };
326
349
  }
327
- function C(e) {
350
+ function b(e) {
328
351
  return {
329
352
  sourcesByKey: new Map(
330
- R(e == null ? void 0 : e.sources).map(d).filter(Fe).filter((t) => typeof t.sourceKey == "string").map((t) => [String(t.sourceKey), J(t)])
353
+ R(e == null ? void 0 : e.sources).map(d).filter(je).filter((t) => typeof t.sourceKey == "string").map((t) => [String(t.sourceKey), J(t)])
331
354
  )
332
355
  };
333
356
  }
334
- function ge(e) {
357
+ function le(e) {
335
358
  var t;
336
359
  return e instanceof Object && ((t = d(e)) == null ? void 0 : t.sourcesByKey) instanceof Map;
337
360
  }
338
- function pe(e, t, n) {
361
+ function me(e, t, n) {
339
362
  if (typeof e.sourceKey == "string")
340
363
  return n.sourcesByKey.get(e.sourceKey) || { sourceKey: e.sourceKey };
341
364
  if (e.source)
@@ -345,112 +368,112 @@ function pe(e, t, n) {
345
368
  if (typeof (t == null ? void 0 : t.sourceKey) == "string")
346
369
  return n.sourcesByKey.get(t.sourceKey) || { sourceKey: t.sourceKey };
347
370
  }
348
- function me({
371
+ function he({
349
372
  view: e,
350
373
  builder: t,
351
374
  rawSpec: n,
352
375
  spec: r,
353
- context: s
376
+ context: a
354
377
  }) {
355
378
  var o;
356
379
  if (t !== "records" && t !== "sql")
357
380
  return r;
358
- const a = d((o = d(e.visualSpec)) == null ? void 0 : o.tableBehavior);
359
- if (!a)
381
+ const i = d((o = d(e.visualSpec)) == null ? void 0 : o.tableBehavior);
382
+ if (!i)
360
383
  return r;
361
- const i = { ...r };
362
- if (ve(a) === "server" && (i.pagination = {
384
+ const s = { ...r };
385
+ if (Ce(i) === "server" && (s.pagination = {
363
386
  page: 1,
364
- pageSize: le({ tableBehavior: a, spec: r })
365
- }), t === "records" && Ce(a) === "server") {
366
- const c = he({
387
+ pageSize: ye({ tableBehavior: i, spec: r })
388
+ }), t === "records" && Ve(i) === "server") {
389
+ const c = Se({
367
390
  view: e,
368
391
  rawSpec: n,
369
- tableBehavior: a,
370
- context: s
392
+ tableBehavior: i,
393
+ context: a
371
394
  });
372
- c && (i.orderBy = c);
395
+ c && (s.orderBy = c);
373
396
  }
374
- return i;
397
+ return s;
375
398
  }
376
- function le({
399
+ function ye({
377
400
  tableBehavior: e,
378
401
  spec: t
379
402
  }) {
380
403
  const n = d(e.pagination), r = d(t.pagination);
381
- return O(n == null ? void 0 : n.pageSize) || O(r == null ? void 0 : r.pageSize) || O(t.limit) || 100;
404
+ return E(n == null ? void 0 : n.pageSize) || E(r == null ? void 0 : r.pageSize) || E(t.limit) || 100;
382
405
  }
383
- function he({
406
+ function Se({
384
407
  view: e,
385
408
  rawSpec: t,
386
409
  tableBehavior: n,
387
410
  context: r
388
411
  }) {
389
- const s = d(n.sorting), a = p(s == null ? void 0 : s.defaultField);
390
- if (!a)
412
+ const a = d(n.sorting), i = g(a == null ? void 0 : a.defaultField);
413
+ if (!i)
391
414
  return;
392
- const o = ye({
415
+ const o = we({
393
416
  view: e,
394
417
  rawSpec: t,
395
418
  context: r
396
419
  }).filter(
397
- (c) => Se(c.lookup).includes(a)
420
+ (c) => Ae(c.lookup).includes(i)
398
421
  );
399
422
  if (o.length === 1)
400
423
  return {
401
424
  field: o[0].field,
402
- direction: (s == null ? void 0 : s.defaultDirection) === "desc" ? "desc" : "asc"
425
+ direction: (a == null ? void 0 : a.defaultDirection) === "desc" ? "desc" : "asc"
403
426
  };
404
427
  }
405
- function ye({
428
+ function we({
406
429
  view: e,
407
430
  rawSpec: t,
408
431
  context: n
409
432
  }) {
410
- var s;
433
+ var a;
411
434
  const r = [];
412
- for (const a of R(t.fields)) I(r, a, n);
413
- I(r, t.dateField, n), I(r, (s = d(t.orderBy)) == null ? void 0 : s.field, n);
414
- for (const a of R(e.fields))
415
- I(r, a, n);
416
- return Ne(
435
+ for (const i of R(t.fields)) I(r, i, n);
436
+ I(r, t.dateField, n), I(r, (a = d(t.orderBy)) == null ? void 0 : a.field, n);
437
+ for (const i of R(e.fields))
438
+ I(r, i, n);
439
+ return ke(
417
440
  r,
418
- (a) => we(a.lookup)
441
+ (i) => _e(i.lookup)
419
442
  );
420
443
  }
421
444
  function I(e, t, n) {
422
445
  const r = d(t);
423
446
  if (typeof (r == null ? void 0 : r.name) != "string" || r.name.length === 0)
424
447
  return;
425
- const s = d(A(r, n)) || r;
448
+ const a = d(A(r, n)) || r;
426
449
  e.push({
427
450
  lookup: r,
428
- field: s
451
+ field: a
429
452
  });
430
453
  }
431
- function Se(e) {
432
- return He([
433
- p(e.name),
454
+ function Ae(e) {
455
+ return Fe([
456
+ g(e.name),
434
457
  z(e),
435
- _e(e)
458
+ Re(e)
436
459
  ]);
437
460
  }
438
- function we(e) {
461
+ function _e(e) {
439
462
  return [
440
463
  z(e),
441
- p(e.name),
442
- p(e.role),
443
- p(e.aggregate)
464
+ g(e.name),
465
+ g(e.role),
466
+ g(e.aggregate)
444
467
  ].join("|");
445
468
  }
446
469
  function z(e) {
447
470
  return [
448
- p(e.sourceKey) || Ae(e.source),
449
- p(e.name),
450
- p(e.aggregate)
471
+ g(e.sourceKey) || $e(e.source),
472
+ g(e.name),
473
+ g(e.aggregate)
451
474
  ].filter(Boolean).join(":");
452
475
  }
453
- function Ae(e) {
476
+ function $e(e) {
454
477
  const t = d(e);
455
478
  if (!t)
456
479
  return "";
@@ -462,46 +485,46 @@ function Ae(e) {
462
485
  }
463
486
  return JSON.stringify(t);
464
487
  }
465
- function _e(e) {
466
- return ke([
467
- $e(e),
468
- p(e.aggregate).toLowerCase(),
469
- p(e.label) || p(e.name)
488
+ function Re(e) {
489
+ return Ke([
490
+ Ie(e),
491
+ g(e.aggregate).toLowerCase(),
492
+ g(e.label) || g(e.name)
470
493
  ].filter(Boolean));
471
494
  }
472
- function $e(e) {
473
- return typeof e.sourceKey == "string" ? Ie(e.sourceKey) : Re(e.source);
495
+ function Ie(e) {
496
+ return typeof e.sourceKey == "string" ? be(e.sourceKey) : ve(e.source);
474
497
  }
475
- function Re(e) {
498
+ function ve(e) {
476
499
  const t = d(e);
477
- return t ? p(t.datasetName) || p(t.datasetId) || p(t.name) || p(t.kind) : "";
500
+ return t ? g(t.datasetName) || g(t.datasetId) || g(t.name) || g(t.kind) : "";
478
501
  }
479
- function Ie(e) {
502
+ function be(e) {
480
503
  const t = String(e).split(":");
481
504
  return t[t.length - 1] || String(e);
482
505
  }
483
- function ve(e) {
506
+ function Ce(e) {
484
507
  var t;
485
- return p((t = d(e.pagination)) == null ? void 0 : t.mode);
508
+ return g((t = d(e.pagination)) == null ? void 0 : t.mode);
486
509
  }
487
- function Ce(e) {
510
+ function Ve(e) {
488
511
  var t;
489
- return p((t = d(e.sorting)) == null ? void 0 : t.mode);
512
+ return g((t = d(e.sorting)) == null ? void 0 : t.mode);
490
513
  }
491
514
  function A(e, t) {
492
515
  if (!e || typeof e != "object")
493
516
  return e;
494
517
  if (Array.isArray(e))
495
- return e.map((s) => A(s, t));
518
+ return e.map((a) => A(a, t));
496
519
  const n = e;
497
520
  if (typeof n.sourceKey == "string" && typeof n.kind == "string" && (typeof n.datasetName == "string" || typeof n.datasetId == "string"))
498
521
  return J(n);
499
522
  const r = {};
500
- for (const [s, a] of Object.entries(n))
501
- s !== "sourceKey" && (r[s] = A(a, t));
523
+ for (const [a, i] of Object.entries(n))
524
+ a !== "sourceKey" && (r[a] = A(i, t));
502
525
  if (typeof n.sourceKey == "string") {
503
- const s = t.sourcesByKey.get(n.sourceKey);
504
- s && !r.source && (r.source = s);
526
+ const a = t.sourcesByKey.get(n.sourceKey);
527
+ a && !r.source && (r.source = a);
505
528
  }
506
529
  return r;
507
530
  }
@@ -509,15 +532,15 @@ function J(e) {
509
532
  const { sourceKey: t, ...n } = e;
510
533
  return n;
511
534
  }
512
- function Ve(e, t) {
535
+ function Ee(e, t) {
513
536
  const n = d(e.visualSpec);
514
537
  return (n == null ? void 0 : n.title) || e.title || t.label;
515
538
  }
516
- function Ee(e) {
539
+ function Oe(e) {
517
540
  const t = String(e || "").replace(/^semaphor\./, "");
518
541
  return ["metric", "records", "analysis", "matrix", "sql"].includes(t) ? t : "";
519
542
  }
520
- function Oe(e) {
543
+ function Ne(e) {
521
544
  if (e != null && e.relationshipHint)
522
545
  return e.relationshipHint;
523
546
  const t = R(e == null ? void 0 : e.relationshipsUsed).map((n) => {
@@ -526,30 +549,30 @@ function Oe(e) {
526
549
  }).filter((n) => typeof n == "string" && n.length > 0);
527
550
  return t.length > 0 ? { relationshipIds: t } : void 0;
528
551
  }
529
- function be(e, t) {
552
+ function He(e, t) {
530
553
  return e === "in" || e === "not_in" ? [t] : e === "between" ? Array.isArray(t) ? t : [t, t] : t;
531
554
  }
532
- function O(e) {
555
+ function E(e) {
533
556
  return typeof e == "number" && Number.isFinite(e) ? e : void 0;
534
557
  }
535
- function p(e) {
558
+ function g(e) {
536
559
  return typeof e == "string" ? e : "";
537
560
  }
538
- function Ne(e, t) {
561
+ function ke(e, t) {
539
562
  const n = /* @__PURE__ */ new Set(), r = [];
540
- for (const s of e) {
541
- const a = t(s);
542
- !a || n.has(a) || (n.add(a), r.push(s));
563
+ for (const a of e) {
564
+ const i = t(a);
565
+ !i || n.has(i) || (n.add(i), r.push(a));
543
566
  }
544
567
  return r;
545
568
  }
546
- function He(e) {
569
+ function Fe(e) {
547
570
  return Array.from(new Set(e.filter(Boolean)));
548
571
  }
549
- function ke(e) {
572
+ function Ke(e) {
550
573
  return (Array.isArray(e) ? e.join(" ") : e).replace(/[^a-zA-Z0-9]+/g, " ").trim().split(/\s+/).filter(Boolean).map((n, r) => {
551
- const s = n.toLowerCase();
552
- return r === 0 ? s : s.charAt(0).toUpperCase() + s.slice(1);
574
+ const a = n.toLowerCase();
575
+ return r === 0 ? a : a.charAt(0).toUpperCase() + a.slice(1);
553
576
  }).join("");
554
577
  }
555
578
  function d(e) {
@@ -558,10 +581,10 @@ function d(e) {
558
581
  function R(e) {
559
582
  return Array.isArray(e) ? e : [];
560
583
  }
561
- function Fe(e) {
584
+ function je(e) {
562
585
  return e !== void 0;
563
586
  }
564
- const je = /* @__PURE__ */ new Set([
587
+ const xe = /* @__PURE__ */ new Set([
565
588
  "diagnostic_fix",
566
589
  "fix_diagnostics",
567
590
  "fix_inspector_warnings",
@@ -571,18 +594,18 @@ const je = /* @__PURE__ */ new Set([
571
594
  "fields",
572
595
  "sdkSpec"
573
596
  ]);
574
- function We({
597
+ function Qe({
575
598
  beforeSummary: e,
576
599
  afterSummary: t,
577
600
  migrationReport: n,
578
601
  operationIntent: r,
579
- preferences: s
602
+ preferences: a
580
603
  }) {
581
- const a = m(r), i = typeof (a == null ? void 0 : a.kind) == "string" ? a.kind.trim() : "add";
582
- return Ke(s) ? {
604
+ const i = l(r), s = typeof (i == null ? void 0 : i.kind) == "string" ? i.kind.trim() : "add";
605
+ return Me(a) ? {
583
606
  ok: !1,
584
607
  policy: {
585
- kind: i,
608
+ kind: s,
586
609
  mode: "invalid_update_preferences",
587
610
  reason: "Metric aggregate override updates must use operationIntent.measureAggregateOverrides so deterministic update policy can guard the targeted edit."
588
611
  },
@@ -592,20 +615,20 @@ function We({
592
615
  reason: "Move measureAggregateOverrides to operationIntent.measureAggregateOverrides for update calls."
593
616
  }
594
617
  ]
595
- } : je.has(i) ? D({
618
+ } : xe.has(s) ? D({
596
619
  beforeSummary: e,
597
620
  afterSummary: t,
598
621
  migrationReport: n,
599
- operationIntent: a,
622
+ operationIntent: i,
600
623
  mode: "diagnostic_warning_fix",
601
624
  allowedViewChangeReasons: T,
602
625
  label: "Diagnostic warning fixes",
603
626
  reason: "Diagnostic warning fixes are preserve-by-default and may not add/remove views, inputs, or filter contracts."
604
- }) : i === "edit" && Array.isArray(a == null ? void 0 : a.measureAggregateOverrides) && a.measureAggregateOverrides.length > 0 ? D({
627
+ }) : s === "edit" && Array.isArray(i == null ? void 0 : i.measureAggregateOverrides) && i.measureAggregateOverrides.length > 0 ? D({
605
628
  beforeSummary: e,
606
629
  afterSummary: t,
607
630
  migrationReport: n,
608
- operationIntent: a,
631
+ operationIntent: i,
609
632
  mode: "metric_aggregate_override_edit",
610
633
  allowedViewChangeReasons: T,
611
634
  label: "Metric aggregate override edits",
@@ -613,118 +636,118 @@ function We({
613
636
  }) : {
614
637
  ok: !0,
615
638
  policy: {
616
- kind: i,
639
+ kind: s,
617
640
  mode: "general_iterative_update",
618
641
  reason: "General generated-contract edits are allowed to change the requested contract shape. Review the migration report for expected UI work."
619
642
  },
620
643
  violations: []
621
644
  };
622
645
  }
623
- function Ke(e) {
646
+ function Me(e) {
624
647
  var t;
625
- return Array.isArray((t = m(e)) == null ? void 0 : t.measureAggregateOverrides);
648
+ return Array.isArray((t = l(e)) == null ? void 0 : t.measureAggregateOverrides);
626
649
  }
627
650
  function D({
628
651
  beforeSummary: e,
629
652
  afterSummary: t,
630
653
  migrationReport: n,
631
654
  operationIntent: r,
632
- mode: s,
633
- allowedViewChangeReasons: a,
634
- label: i,
655
+ mode: a,
656
+ allowedViewChangeReasons: i,
657
+ label: s,
635
658
  reason: o
636
659
  }) {
637
- const c = [], u = xe(r == null ? void 0 : r.targetViewIds), f = m(n) || {};
660
+ const c = [], u = De(r == null ? void 0 : r.targetViewIds), f = l(n) || {};
638
661
  u.size === 0 && c.push({
639
662
  path: "operationIntent.targetViewIds",
640
- reason: `${i} must declare targetViewIds so the update cannot broaden to unrelated views.`
641
- }), b({
642
- bucket: m(f.views),
663
+ reason: `${s} must declare targetViewIds so the update cannot broaden to unrelated views.`
664
+ }), O({
665
+ bucket: l(f.views),
643
666
  label: "views",
644
- operationLabel: i,
667
+ operationLabel: s,
645
668
  violations: c
646
- }), b({
647
- bucket: m(f.inputs),
669
+ }), O({
670
+ bucket: l(f.inputs),
648
671
  label: "inputs",
649
- operationLabel: i,
672
+ operationLabel: s,
650
673
  violations: c
651
674
  }), q({
652
- bucket: m(f.inputs),
675
+ bucket: l(f.inputs),
653
676
  label: "inputs",
654
- operationLabel: i,
677
+ operationLabel: s,
655
678
  violations: c
656
- }), b({
657
- bucket: m(f.filterContracts),
679
+ }), O({
680
+ bucket: l(f.filterContracts),
658
681
  label: "filterContracts",
659
- operationLabel: i,
682
+ operationLabel: s,
660
683
  violations: c
661
684
  }), q({
662
- bucket: m(f.filterContracts),
685
+ bucket: l(f.filterContracts),
663
686
  label: "filterContracts",
664
- operationLabel: i,
687
+ operationLabel: s,
665
688
  violations: c
666
689
  });
667
- for (const l of U(m(f.views))) {
668
- u.size > 0 && !u.has(w(l.id)) && c.push({
669
- path: `views.${w(l.id) || "<unknown>"}`,
670
- reason: `${i} may only change explicitly targeted views.`
690
+ for (const m of U(l(f.views))) {
691
+ u.size > 0 && !u.has(w(m.id)) && c.push({
692
+ path: `views.${w(m.id) || "<unknown>"}`,
693
+ reason: `${s} may only change explicitly targeted views.`
671
694
  });
672
- const h = Array.isArray(l.reasons) ? l.reasons.filter(
673
- ($) => typeof $ != "string" || !a.has($)
695
+ const h = Array.isArray(m.reasons) ? m.reasons.filter(
696
+ ($) => typeof $ != "string" || !i.has($)
674
697
  ) : [];
675
698
  h.length > 0 && c.push({
676
- path: `views.${w(l.id) || "<unknown>"}`,
677
- reason: `${i} may only adjust fields/sdkSpec; changed ${h.join(", ")}.`
699
+ path: `views.${w(m.id) || "<unknown>"}`,
700
+ reason: `${s} may only adjust fields/sdkSpec; changed ${h.join(", ")}.`
678
701
  });
679
702
  }
680
- const g = Me({
703
+ const p = Te({
681
704
  beforeSummary: e,
682
705
  afterSummary: t,
683
706
  targetViewIds: u,
684
- label: i
707
+ label: s
685
708
  });
686
- return g && c.push(g), {
709
+ return p && c.push(p), {
687
710
  ok: c.length === 0,
688
711
  policy: {
689
712
  kind: w(r == null ? void 0 : r.kind) || "diagnostic_fix",
690
- mode: s,
691
- allowedViewChangeReasons: Array.from(a).sort(),
713
+ mode: a,
714
+ allowedViewChangeReasons: Array.from(i).sort(),
692
715
  targetViewIds: Array.from(u).sort(),
693
716
  reason: o
694
717
  },
695
718
  violations: c
696
719
  };
697
720
  }
698
- function Me({
721
+ function Te({
699
722
  beforeSummary: e,
700
723
  afterSummary: t,
701
724
  targetViewIds: n,
702
725
  label: r
703
726
  }) {
704
- const s = m(e), a = m(t);
705
- if (!s || !a)
727
+ const a = l(e), i = l(t);
728
+ if (!a || !i)
706
729
  return {
707
730
  path: "codegenSummary",
708
731
  reason: `${r} require before/after codegen summaries for full-scope verification.`
709
732
  };
710
- const i = G(s), o = G(a), c = B(s.views), u = B(a.views), f = Array.isArray(i.views) ? i.views : [];
711
- i.views = f;
712
- for (const g of n) {
713
- const l = c.get(g), h = u.get(g);
714
- if (!l || !h)
733
+ const s = G(a), o = G(i), c = B(a.views), u = B(i.views), f = Array.isArray(s.views) ? s.views : [];
734
+ s.views = f;
735
+ for (const p of n) {
736
+ const m = c.get(p), h = u.get(p);
737
+ if (!m || !h)
715
738
  continue;
716
739
  const $ = f.find(
717
740
  (Y) => {
718
- var j;
719
- return ((j = m(Y)) == null ? void 0 : j.id) === g;
741
+ var K;
742
+ return ((K = l(Y)) == null ? void 0 : K.id) === p;
720
743
  }
721
- ), V = m(h);
722
- if (!$ || !V)
744
+ ), C = l(h);
745
+ if (!$ || !C)
723
746
  continue;
724
747
  const F = $;
725
- F.fields = k(V.fields), F.sdkSpec = k(V.sdkSpec);
748
+ F.fields = k(C.fields), F.sdkSpec = k(C.sdkSpec);
726
749
  }
727
- return v(i) === v(o) ? null : {
750
+ return v(s) === v(o) ? null : {
728
751
  path: "codegenSummary",
729
752
  reason: `${r} may only change fields/sdkSpec on targetViewIds; another generated contract section changed.`
730
753
  };
@@ -739,22 +762,22 @@ function G(e) {
739
762
  "validation"
740
763
  ])
741
764
  delete t[n];
742
- return De(t.unsupportedInsights) && delete t.unsupportedInsights, t;
765
+ return qe(t.unsupportedInsights) && delete t.unsupportedInsights, t;
743
766
  }
744
- function b({
767
+ function O({
745
768
  bucket: e,
746
769
  label: t,
747
770
  operationLabel: n,
748
771
  violations: r
749
772
  }) {
750
- for (const s of H(e == null ? void 0 : e.added))
773
+ for (const a of H(e == null ? void 0 : e.added))
751
774
  r.push({
752
- path: `${t}.${w(s.id) || "<unknown>"}`,
775
+ path: `${t}.${w(a.id) || "<unknown>"}`,
753
776
  reason: `${n} may not add ${t}.`
754
777
  });
755
- for (const s of H(e == null ? void 0 : e.removed))
778
+ for (const a of H(e == null ? void 0 : e.removed))
756
779
  r.push({
757
- path: `${t}.${w(s.id) || "<unknown>"}`,
780
+ path: `${t}.${w(a.id) || "<unknown>"}`,
758
781
  reason: `${n} may not remove ${t}.`
759
782
  });
760
783
  }
@@ -764,9 +787,9 @@ function q({
764
787
  operationLabel: n,
765
788
  violations: r
766
789
  }) {
767
- for (const s of U(e))
790
+ for (const a of U(e))
768
791
  r.push({
769
- path: `${t}.${w(s.id) || "<unknown>"}`,
792
+ path: `${t}.${w(a.id) || "<unknown>"}`,
770
793
  reason: `${n} may not change ${t}.`
771
794
  });
772
795
  }
@@ -774,9 +797,9 @@ function U(e) {
774
797
  return H(e == null ? void 0 : e.changed);
775
798
  }
776
799
  function H(e) {
777
- return Array.isArray(e) ? e.map(m).filter(Te) : [];
800
+ return Array.isArray(e) ? e.map(l).filter(Ge) : [];
778
801
  }
779
- function xe(e) {
802
+ function De(e) {
780
803
  return Array.isArray(e) ? new Set(
781
804
  e.filter((t) => typeof t == "string" && t.trim().length > 0).map((t) => t.trim())
782
805
  ) : /* @__PURE__ */ new Set();
@@ -785,8 +808,8 @@ function B(e) {
785
808
  var n;
786
809
  const t = /* @__PURE__ */ new Map();
787
810
  for (const r of Array.isArray(e) ? e : []) {
788
- const s = (n = m(r)) == null ? void 0 : n.id;
789
- typeof s == "string" && s.trim() && t.set(s, r);
811
+ const a = (n = l(r)) == null ? void 0 : n.id;
812
+ typeof a == "string" && a.trim() && t.set(a, r);
790
813
  }
791
814
  return t;
792
815
  }
@@ -801,31 +824,31 @@ function v(e) {
801
824
  const t = e;
802
825
  return `{${Object.keys(t).sort().filter((n) => t[n] !== void 0).map((n) => `${JSON.stringify(n)}:${v(t[n])}`).join(",")}}`;
803
826
  }
804
- function m(e) {
827
+ function l(e) {
805
828
  return e && typeof e == "object" && !Array.isArray(e) ? e : void 0;
806
829
  }
807
- function Te(e) {
830
+ function Ge(e) {
808
831
  return e !== void 0;
809
832
  }
810
- function De(e) {
833
+ function qe(e) {
811
834
  return Array.isArray(e) && e.length === 0;
812
835
  }
813
836
  function w(e) {
814
837
  return typeof e == "string" ? e : "";
815
838
  }
816
839
  export {
817
- Be as C,
818
- M as G,
819
- ze as R,
820
- K as a,
821
- x as b,
822
- Le as c,
823
- Pe as d,
824
- ue as e,
825
- Ye as f,
826
- Ue as g,
827
- fe as h,
828
- Je as i,
829
- We as j,
830
- L as v
840
+ Le as C,
841
+ x as G,
842
+ ce as R,
843
+ j as a,
844
+ M as b,
845
+ ze as c,
846
+ Je as d,
847
+ oe as e,
848
+ We as f,
849
+ Ye as g,
850
+ ge as h,
851
+ Ue as i,
852
+ Qe as j,
853
+ P as v
831
854
  };