react-semaphor 0.1.416 → 0.1.417

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