react-semaphor 0.1.381 → 0.1.382

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 (74) hide show
  1. package/DATA_APP_SDK.md +238 -0
  2. package/README.md +7 -0
  3. package/dist/analytics-protocol/index.cjs +1 -1
  4. package/dist/analytics-protocol/index.js +45 -41
  5. package/dist/brand-studio/index.cjs +1 -1
  6. package/dist/brand-studio/index.js +6 -6
  7. package/dist/chunks/analyze-result-contract-CtXfp3nv.js +1 -0
  8. package/dist/chunks/analyze-result-contract-DuhlklhI.js +102 -0
  9. package/dist/chunks/{braces-BT-ZyB-g.js → braces-CGi-YFZp.js} +1 -1
  10. package/dist/chunks/{braces-DOxxfERN.js → braces-CP8BEzl3.js} +1 -1
  11. package/dist/chunks/{calendar-preferences-dialog-Dsgs8WDv.js → calendar-preferences-dialog-CV4xF2Tp.js} +3 -3
  12. package/dist/chunks/{calendar-preferences-dialog-iZs8XqyH.js → calendar-preferences-dialog-rDDobeLo.js} +1 -1
  13. package/dist/chunks/catalog-field-grounding-Bnx-3tE0.js +1 -0
  14. package/dist/chunks/catalog-field-grounding-CJKAqtiC.js +100 -0
  15. package/dist/chunks/{dashboard-briefing-launcher-Coks66cV.js → dashboard-briefing-launcher-BT00MvGB.js} +5 -5
  16. package/dist/chunks/{dashboard-briefing-launcher-B5vPTl8P.js → dashboard-briefing-launcher-Dcbh-mjY.js} +1 -1
  17. package/dist/chunks/{dashboard-controls-BfkcnIdy.js → dashboard-controls-B6y7jkKO.js} +8 -8
  18. package/dist/chunks/{dashboard-controls-Dyqye6fh.js → dashboard-controls-CRqnPibB.js} +1 -1
  19. package/dist/chunks/{dashboard-json-DjXi4cI6.js → dashboard-json-CfIUG8k1.js} +3 -3
  20. package/dist/chunks/{dashboard-json-CV_LnO9x.js → dashboard-json-DEQqRR1x.js} +1 -1
  21. package/dist/chunks/{edit-dashboard-visual-DOW1Ap1N.js → edit-dashboard-visual-DMbf89xa.js} +5 -5
  22. package/dist/chunks/{edit-dashboard-visual-yinO0yU-.js → edit-dashboard-visual-wDOcHak3.js} +1 -1
  23. package/dist/chunks/{index-DlprYjr6.js → index-BAsWLkZ8.js} +169 -168
  24. package/dist/chunks/{index-CkoRCh3g.js → index-CrKxP9uF.js} +5 -5
  25. package/dist/chunks/{layout-grid-DTbOIOsE.js → layout-grid-BsKH3TgY.js} +1 -1
  26. package/dist/chunks/{layout-grid-DccceHv4.js → layout-grid-jJQUqDN9.js} +1 -1
  27. package/dist/chunks/operators-C8TxpM4C.js +48 -0
  28. package/dist/chunks/operators-DrTQsJXv.js +1 -0
  29. package/dist/chunks/{palette-SimHJELn.js → palette-9zLPGlj2.js} +1 -1
  30. package/dist/chunks/{palette-DCzLwqIw.js → palette-xU9Qt6bE.js} +1 -1
  31. package/dist/chunks/{save-D2O96E5A.js → save-8A_q6K4E.js} +1 -1
  32. package/dist/chunks/{save-zNVYH02T.js → save-DzciESDh.js} +1 -1
  33. package/dist/chunks/{source-identity-Dj3dryN9.js → source-identity-CN4xiyKJ.js} +5 -5
  34. package/dist/chunks/{switch-DMPsMpHW.js → switch-DArtNJZh.js} +292 -291
  35. package/dist/chunks/{switch-Jhyl63RF.js → switch-k7kj6NRg.js} +1 -1
  36. package/dist/chunks/{use-create-flow-overlay-state-r5JKyXU8.js → use-create-flow-overlay-state-BdG1DiSx.js} +4 -4
  37. package/dist/chunks/{use-create-flow-overlay-state-NsqFPwdB.js → use-create-flow-overlay-state-ipeaE65_.js} +1 -1
  38. package/dist/chunks/{validators-CtNmgsvG.js → validators-CHPH6ORs.js} +641 -498
  39. package/dist/chunks/validators-lWo8m0Q7.js +1 -0
  40. package/dist/dashboard/index.cjs +1 -1
  41. package/dist/dashboard/index.js +1 -1
  42. package/dist/dashboard-authoring/index.cjs +3 -3
  43. package/dist/dashboard-authoring/index.js +105 -92
  44. package/dist/data-app-builder/index.cjs +1 -1
  45. package/dist/data-app-builder/index.js +3 -3
  46. package/dist/data-app-sdk/index.cjs +1 -1
  47. package/dist/data-app-sdk/index.js +444 -380
  48. package/dist/data-app-sdk-adapters/index.cjs +1 -0
  49. package/dist/data-app-sdk-adapters/index.js +383 -0
  50. package/dist/data-app-sdk-validation/index.cjs +1 -1
  51. package/dist/data-app-sdk-validation/index.js +1073 -6
  52. package/dist/index.cjs +1 -1
  53. package/dist/index.js +7 -7
  54. package/dist/surfboard/index.cjs +1 -1
  55. package/dist/surfboard/index.js +2 -2
  56. package/dist/types/analytics-protocol.d.ts +58 -31
  57. package/dist/types/dashboard-assistant.d.ts +40 -15
  58. package/dist/types/dashboard-authoring.d.ts +36 -16
  59. package/dist/types/dashboard.d.ts +8 -8
  60. package/dist/types/data-app-builder.d.ts +35 -11
  61. package/dist/types/data-app-sdk-adapters.d.ts +733 -0
  62. package/dist/types/data-app-sdk-validation.d.ts +85 -25
  63. package/dist/types/data-app-sdk.d.ts +99 -155
  64. package/dist/types/main.d.ts +35 -11
  65. package/dist/types/shared.d.ts +8 -8
  66. package/dist/types/surfboard.d.ts +8 -8
  67. package/dist/types/types.d.ts +8 -8
  68. package/package.json +9 -2
  69. package/src/data-app-sdk/README.md +240 -0
  70. package/dist/chunks/catalog-field-grounding-8L9I0zdg.js +0 -1
  71. package/dist/chunks/catalog-field-grounding-BK4BX8sZ.js +0 -200
  72. package/dist/chunks/validation-BM3-ShHV.js +0 -1003
  73. package/dist/chunks/validation-BVpqRFar.js +0 -1
  74. package/dist/chunks/validators-jpoYhpHh.js +0 -1
@@ -1,81 +1,30 @@
1
- import { b as Y } from "./source-identity-Dj3dryN9.js";
2
- function Be(e) {
3
- const i = K(e);
4
- return B(i) ? i : void 0;
5
- }
6
- function K(e) {
7
- if (typeof e != "string" || e.trim().length === 0)
8
- return;
9
- const i = e.trim().toLowerCase().replace(/_/g, " ");
10
- switch (i) {
11
- case "eq":
12
- case "equals":
13
- case "=":
14
- return "=";
15
- case "neq":
16
- case "not equals":
17
- case "not equal":
18
- case "!=":
19
- return "!=";
20
- case "in":
21
- return "in";
22
- case "not in":
23
- return "not_in";
24
- case "contains":
25
- case "like":
26
- return "contains";
27
- case "not contains":
28
- case "not like":
29
- return "not_contains";
30
- case "between":
31
- return "between";
32
- case "not between":
33
- return "not_between";
34
- case ">":
35
- case ">=":
36
- case "<":
37
- case "<=":
38
- return i;
39
- case "is null":
40
- return "is_null";
41
- case "is not null":
42
- return "is_not_null";
43
- default:
44
- return X(e) ? e : void 0;
45
- }
46
- }
47
- function B(e) {
48
- return e === "=" || e === "!=" || e === "in" || e === "not_in" || e === "contains" || e === "not_contains" || e === "between" || e === "not_between" || e === ">" || e === ">=" || e === "<" || e === "<=";
49
- }
50
- function X(e) {
51
- return B(e) || e === "not_contains" || e === "is_null" || e === "is_not_null";
52
- }
1
+ import { s as K } from "./source-identity-CN4xiyKJ.js";
53
2
  function a(e, i, t) {
54
3
  return t ? { code: e, message: i, path: t } : { code: e, message: i };
55
4
  }
56
- function Z(e) {
5
+ function X(e) {
57
6
  for (let i = 0; i < e.length; i += 1) {
58
7
  const t = e[i];
59
8
  if (e.some(
60
- (n, s) => s !== i && C(n, t)
9
+ (n, o) => o !== i && L(n, t)
61
10
  ))
62
11
  return !1;
63
12
  }
64
13
  return !0;
65
14
  }
66
- function j(e, i) {
67
- return Y(e, i);
68
- }
69
15
  function C(e, i) {
70
- return j(e, i) && v(e) === v(i);
16
+ return K(e, i);
71
17
  }
72
- function J(e) {
73
- return `Metric intent has duplicate metric "${e.name}" with the same aggregate (${v(e)}). Use different aggregates to request both, or remove one entry.`;
18
+ function L(e, i) {
19
+ return C(e, i) && g(e) === g(i);
74
20
  }
75
- function D(e) {
21
+ function Z(e) {
22
+ return `Metric intent has duplicate measure "${e.name}" with the same aggregate (${g(e)}). Use different aggregates to request both, or remove one entry.`;
23
+ }
24
+ function P(e) {
76
25
  return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null;
77
26
  }
78
- function W(e, i, t) {
27
+ function J(e, i, t) {
79
28
  if (e !== void 0) {
80
29
  if (!e || typeof e != "object" || Array.isArray(e)) {
81
30
  t.push(
@@ -87,7 +36,7 @@ function W(e, i, t) {
87
36
  );
88
37
  return;
89
38
  }
90
- Object.entries(e).forEach(([n, s]) => {
39
+ Object.entries(e).forEach(([n, o]) => {
91
40
  if (!n.trim()) {
92
41
  t.push(
93
42
  a(
@@ -98,7 +47,7 @@ function W(e, i, t) {
98
47
  );
99
48
  return;
100
49
  }
101
- (Array.isArray(s) ? s.every(D) : D(s)) || t.push(
50
+ (Array.isArray(o) ? o.every(P) : P(o)) || t.push(
102
51
  a(
103
52
  "invalid_sql_default_parameter_value",
104
53
  "SQL defaultParameters values must be strings, numbers, booleans, nulls, or arrays of those scalar values.",
@@ -108,55 +57,55 @@ function W(e, i, t) {
108
57
  });
109
58
  }
110
59
  }
111
- function ee(e, i) {
112
- return A(e, i).length === 1;
60
+ function W(e, i) {
61
+ return M(e, i).length === 1;
113
62
  }
114
- function ie(e, i) {
115
- return A(e, i).length === 1;
63
+ function ee(e, i) {
64
+ return M(e, i).length === 1;
116
65
  }
117
- function A(e, i) {
66
+ function M(e, i) {
118
67
  return i.filter(
119
- (n) => te(e, n)
68
+ (n) => ie(e, n)
120
69
  );
121
70
  }
71
+ function ie(e, i) {
72
+ return te(e, i) ? e.source ? C(i, e) : !0 : !1;
73
+ }
122
74
  function te(e, i) {
123
- return ae(e, i) ? e.source ? j(i, e) : !0 : !1;
75
+ return !(i.name !== e.name || e.role !== void 0 && i.role !== void 0 && i.role !== e.role || ae(e, i) && g(i) !== g(e));
124
76
  }
125
77
  function ae(e, i) {
126
- return !(i.name !== e.name || e.role !== void 0 && i.role !== void 0 && i.role !== e.role || ne(e, i) && v(i) !== v(e));
127
- }
128
- function ne(e, i) {
129
78
  return e.role === "measure" || i.role === "measure" || e.aggregate !== void 0 || i.aggregate !== void 0;
130
79
  }
131
- function v(e) {
80
+ function g(e) {
132
81
  return (e.aggregate || "SUM").toUpperCase();
133
82
  }
134
- const se = /^(\d{4})-(\d{2})-(\d{2})$/, re = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:\d{2})$/;
135
- function P(e) {
83
+ const ne = /^(\d{4})-(\d{2})-(\d{2})$/, se = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:\d{2})$/;
84
+ function T(e) {
136
85
  if (typeof e != "string")
137
86
  return null;
138
- const i = e.trim(), t = se.exec(i);
87
+ const i = e.trim(), t = ne.exec(i);
139
88
  if (t) {
140
- const [, y, I, R] = t;
141
- return T(y, I, R) ? new Date(Date.UTC(Number(y), Number(I) - 1, Number(R))) : null;
89
+ const [, y, D, F] = t;
90
+ return E(y, D, F) ? new Date(Date.UTC(Number(y), Number(D) - 1, Number(F))) : null;
142
91
  }
143
- const n = re.exec(i);
92
+ const n = se.exec(i);
144
93
  if (!n)
145
94
  return null;
146
- const [, s, r, o, u, d, m = "00", , p] = n;
147
- if (!T(s, r, o) || !g(u, 0, 23) || !g(d, 0, 59) || !g(m, 0, 59) || !oe(p))
95
+ const [, o, s, r, c, d, p = "00", , m] = n;
96
+ if (!E(o, s, r) || !v(c, 0, 23) || !v(d, 0, 59) || !v(p, 0, 59) || !oe(m))
148
97
  return null;
149
98
  const b = new Date(i);
150
99
  return Number.isFinite(b.getTime()) ? b : null;
151
100
  }
152
- function T(e, i, t) {
153
- const n = Number(e), s = Number(i), r = Number(t);
154
- if (!Number.isInteger(n) || !Number.isInteger(s) || !Number.isInteger(r) || s < 1 || s > 12)
101
+ function E(e, i, t) {
102
+ const n = Number(e), o = Number(i), s = Number(t);
103
+ if (!Number.isInteger(n) || !Number.isInteger(o) || !Number.isInteger(s) || o < 1 || o > 12)
155
104
  return !1;
156
- const o = new Date(Date.UTC(n, s - 1, r));
157
- return o.getUTCFullYear() === n && o.getUTCMonth() === s - 1 && o.getUTCDate() === r;
105
+ const r = new Date(Date.UTC(n, o - 1, s));
106
+ return r.getUTCFullYear() === n && r.getUTCMonth() === o - 1 && r.getUTCDate() === s;
158
107
  }
159
- function g(e, i, t) {
108
+ function v(e, i, t) {
160
109
  const n = Number(e);
161
110
  return Number.isInteger(n) && n >= i && n <= t;
162
111
  }
@@ -164,35 +113,35 @@ function oe(e) {
164
113
  if (e === "Z")
165
114
  return !0;
166
115
  const i = /^([+-])(\d{2}):(\d{2})$/.exec(e);
167
- return !!(i && g(i[2], 0, 23) && g(i[3], 0, 59));
116
+ return !!(i && v(i[2], 0, 23) && v(i[3], 0, 59));
168
117
  }
169
118
  function l(e) {
170
119
  return typeof e == "string" && e.trim().length > 0;
171
120
  }
172
- function de(e) {
121
+ function re(e) {
173
122
  const i = /* @__PURE__ */ new Set();
174
123
  let t = 0;
175
124
  for (; t < e.length; ) {
176
125
  const n = e[t];
177
126
  if (n === "'" || n === '"') {
178
- t = le(e, t);
127
+ t = de(e, t);
179
128
  continue;
180
129
  }
181
130
  if (n === "{") {
182
- const s = e.indexOf("}", t + 1);
183
- if (s === -1) {
131
+ const o = e.indexOf("}", t + 1);
132
+ if (o === -1) {
184
133
  t += 1;
185
134
  continue;
186
135
  }
187
- const r = e.slice(t + 1, s);
188
- /^[A-Za-z_][A-Za-z0-9_]*$/.test(r) && i.add(r), t = s + 1;
136
+ const s = e.slice(t + 1, o);
137
+ /^[A-Za-z_][A-Za-z0-9_]*$/.test(s) && i.add(s), t = o + 1;
189
138
  continue;
190
139
  }
191
140
  t += 1;
192
141
  }
193
142
  return Array.from(i);
194
143
  }
195
- function le(e, i) {
144
+ function de(e, i) {
196
145
  const t = e[i];
197
146
  let n = i + 1;
198
147
  for (; n < e.length; ) {
@@ -207,12 +156,12 @@ function le(e, i) {
207
156
  }
208
157
  return e.length;
209
158
  }
210
- function c(e) {
159
+ function u(e) {
211
160
  return !!(e && typeof e == "object" && !Array.isArray(e));
212
161
  }
213
- function E(e, i, t) {
162
+ function N(e, i, t) {
214
163
  if (e !== void 0) {
215
- if (!c(e)) {
164
+ if (!u(e)) {
216
165
  t.push(
217
166
  a(
218
167
  "invalid_pagination",
@@ -248,7 +197,7 @@ function $(e) {
248
197
  }
249
198
  function w(e, i, t, n) {
250
199
  $(
251
- e.filter((r) => l(r))
200
+ e.filter((s) => l(s))
252
201
  ) && n.push(
253
202
  a(
254
203
  "duplicate_matrix_public_id",
@@ -257,7 +206,7 @@ function w(e, i, t, n) {
257
206
  )
258
207
  );
259
208
  }
260
- const ue = /* @__PURE__ */ new Set([
209
+ const le = /* @__PURE__ */ new Set([
261
210
  "SUM",
262
211
  "COUNT",
263
212
  "AVG",
@@ -266,7 +215,7 @@ const ue = /* @__PURE__ */ new Set([
266
215
  "MEDIAN",
267
216
  "DISTINCT"
268
217
  ]);
269
- function L(e, i, t) {
218
+ function S(e, i, t) {
270
219
  if (!e || typeof e != "object") {
271
220
  t.push(
272
221
  a("missing_source", "Analytics intent needs a source.", i)
@@ -320,7 +269,7 @@ function L(e, i, t) {
320
269
  );
321
270
  }
322
271
  function f(e, i, t, n = {}) {
323
- if (!e || !c(e)) {
272
+ if (!e || !u(e)) {
324
273
  n.required && t.push(
325
274
  a("missing_field_ref", "Field reference needs a name.", i)
326
275
  );
@@ -332,10 +281,208 @@ function f(e, i, t, n = {}) {
332
281
  "Field reference needs a name.",
333
282
  `${i}.name`
334
283
  )
335
- ), e.source !== void 0 && L(e.source, `${i}.source`, t), _(e.aggregate, `${i}.aggregate`, t);
284
+ ), e.source !== void 0 && S(e.source, `${i}.source`, t), _(e.aggregate, `${i}.aggregate`, t);
285
+ }
286
+ function ue(e, i, t) {
287
+ if (!u(e)) {
288
+ t.push(
289
+ a(
290
+ "invalid_input_binding",
291
+ "Input bindings must be structured objects.",
292
+ i
293
+ )
294
+ );
295
+ return;
296
+ }
297
+ l(e.inputId) || t.push(
298
+ a(
299
+ "invalid_input_binding",
300
+ "Input bindings need a non-empty inputId.",
301
+ `${i}.inputId`
302
+ )
303
+ ), e.kind !== void 0 && e.kind !== "filter" && e.kind !== "control" && t.push(
304
+ a(
305
+ "invalid_input_binding",
306
+ "Input binding kind must be filter or control.",
307
+ `${i}.kind`
308
+ )
309
+ ), e.field !== void 0 && f(e.field, `${i}.field`, t), e.relationshipHint !== void 0 && k(
310
+ e.relationshipHint,
311
+ `${i}.relationshipHint`,
312
+ t
313
+ );
314
+ }
315
+ function k(e, i, t) {
316
+ if (!u(e)) {
317
+ t.push(
318
+ a(
319
+ "invalid_relationship_hint",
320
+ "Relationship hints must be structured objects.",
321
+ i
322
+ )
323
+ );
324
+ return;
325
+ }
326
+ e.relationshipIds !== void 0 && (!Array.isArray(e.relationshipIds) || e.relationshipIds.some((n) => !l(n))) && t.push(
327
+ a(
328
+ "invalid_relationship_hint",
329
+ "Relationship hint relationshipIds must be non-empty strings.",
330
+ `${i}.relationshipIds`
331
+ )
332
+ );
333
+ }
334
+ function ce(e, i) {
335
+ if (l(e.inputId) || i.push(
336
+ a(
337
+ "missing_input_options_input_id",
338
+ "Input options intent needs the inputId it populates.",
339
+ "inputId"
340
+ )
341
+ ), (!e.labelField || !l(e.labelField.name)) && i.push(
342
+ a(
343
+ "missing_input_options_label_field",
344
+ "Input options intent needs a labelField.",
345
+ "labelField"
346
+ )
347
+ ), f(e.labelField, "labelField", i, {
348
+ required: !0
349
+ }), (!e.valueField || !l(e.valueField.name)) && i.push(
350
+ a(
351
+ "missing_input_options_value_field",
352
+ "Input options intent needs a valueField.",
353
+ "valueField"
354
+ )
355
+ ), f(e.valueField, "valueField", i, {
356
+ required: !0
357
+ }), e.searchField !== void 0 && f(e.searchField, "searchField", i, {
358
+ required: !0
359
+ }), e.disambiguationFields !== void 0 && (Array.isArray(e.disambiguationFields) ? e.disambiguationFields.forEach((t, n) => {
360
+ f(t, `disambiguationFields.${n}`, i, {
361
+ required: !0
362
+ });
363
+ }) : i.push(
364
+ a(
365
+ "invalid_input_options_disambiguation_fields",
366
+ "Input options disambiguationFields must be an array of field refs.",
367
+ "disambiguationFields"
368
+ )
369
+ )), e.dependencies !== void 0) {
370
+ const t = e.dependencies;
371
+ if (!u(t))
372
+ i.push(
373
+ a(
374
+ "invalid_input_options_dependencies",
375
+ "Input options dependencies must be a structured object.",
376
+ "dependencies"
377
+ )
378
+ );
379
+ else {
380
+ const n = t.mode;
381
+ n !== void 0 && n !== "auto" && n !== "independent" && n !== "explicit" && i.push(
382
+ a(
383
+ "invalid_input_options_dependencies",
384
+ "Input options dependencies mode must be auto, independent, or explicit.",
385
+ "dependencies.mode"
386
+ )
387
+ ), O(
388
+ t.includeInputIds,
389
+ "dependencies.includeInputIds",
390
+ i,
391
+ "Input options includeInputIds must be non-empty strings."
392
+ ), O(
393
+ t.excludeInputIds,
394
+ "dependencies.excludeInputIds",
395
+ i,
396
+ "Input options excludeInputIds must be non-empty strings."
397
+ ), fe(e, i);
398
+ }
399
+ }
400
+ if (e.population !== void 0) {
401
+ const t = e.population;
402
+ if (!u(t))
403
+ i.push(
404
+ a(
405
+ "invalid_input_options_population",
406
+ "Input options population must be a structured object.",
407
+ "population"
408
+ )
409
+ );
410
+ else {
411
+ const n = t.kind;
412
+ n !== "option_source" && n !== "related_population" && i.push(
413
+ a(
414
+ "invalid_input_options_population",
415
+ "Input options population kind must be option_source or related_population.",
416
+ "population.kind"
417
+ )
418
+ ), n === "option_source" && t.baseSource !== void 0 && i.push(
419
+ a(
420
+ "invalid_input_options_population",
421
+ "Input options population baseSource is only valid for related_population.",
422
+ "population.baseSource"
423
+ )
424
+ ), n === "option_source" && t.relationshipHint !== void 0 && i.push(
425
+ a(
426
+ "invalid_input_options_population",
427
+ "Input options population relationshipHint is only valid for related_population.",
428
+ "population.relationshipHint"
429
+ )
430
+ ), n === "related_population" && (S(
431
+ t.baseSource,
432
+ "population.baseSource",
433
+ i
434
+ ), t.relationshipHint !== void 0 && k(
435
+ t.relationshipHint,
436
+ "population.relationshipHint",
437
+ i
438
+ ));
439
+ }
440
+ }
441
+ }
442
+ function pe(e, i) {
443
+ if (!(!("inputs" in e) || e.inputs === void 0)) {
444
+ if (!Array.isArray(e.inputs)) {
445
+ i.push(
446
+ a(
447
+ "invalid_input_binding",
448
+ "Analytics intent inputs must be an array of input bindings.",
449
+ "inputs"
450
+ )
451
+ );
452
+ return;
453
+ }
454
+ e.inputs.forEach(
455
+ (t, n) => ue(t, `inputs.${n}`, i)
456
+ );
457
+ }
458
+ }
459
+ function fe(e, i) {
460
+ var n, o;
461
+ const t = new Set(
462
+ Array.isArray(e.inputs) ? e.inputs.map((s) => u(s) ? s.inputId : void 0).filter((s) => typeof s == "string") : []
463
+ );
464
+ for (const s of ((n = e.dependencies) == null ? void 0 : n.includeInputIds) || [])
465
+ t.has(s) || i.push(
466
+ a(
467
+ "invalid_input_options_dependencies",
468
+ `Input options dependency "${s}" is not declared in inputs.`,
469
+ "dependencies.includeInputIds"
470
+ )
471
+ );
472
+ for (const s of ((o = e.dependencies) == null ? void 0 : o.excludeInputIds) || [])
473
+ s !== e.inputId && !t.has(s) && i.push(
474
+ a(
475
+ "invalid_input_options_dependencies",
476
+ `Input options dependency exclusion "${s}" is not the populated inputId and is not declared in inputs.`,
477
+ "dependencies.excludeInputIds"
478
+ )
479
+ );
480
+ }
481
+ function O(e, i, t, n) {
482
+ e !== void 0 && (!Array.isArray(e) || e.some((o) => !l(o))) && t.push(a("invalid_input_options_dependencies", n, i));
336
483
  }
337
484
  function _(e, i, t) {
338
- e !== void 0 && (typeof e != "string" || !ue.has(e)) && t.push(
485
+ e !== void 0 && (typeof e != "string" || !le.has(e)) && t.push(
339
486
  a(
340
487
  "invalid_aggregate",
341
488
  "Field aggregate must be SUM, COUNT, AVG, MIN, MAX, MEDIAN, or DISTINCT.",
@@ -343,20 +490,20 @@ function _(e, i, t) {
343
490
  )
344
491
  );
345
492
  }
346
- const ce = /* @__PURE__ */ new Set([
493
+ const me = /* @__PURE__ */ new Set([
347
494
  "measure",
348
- "group",
495
+ "dimension",
349
496
  "date",
350
497
  "id",
351
- "filter"
352
- ]), me = /* @__PURE__ */ new Set(["row", "aggregate"]), U = /* @__PURE__ */ new Set([
498
+ "unknown"
499
+ ]), _e = /* @__PURE__ */ new Set(["row", "aggregate"]), U = /* @__PURE__ */ new Set([
353
500
  "string",
354
501
  "number",
355
502
  "boolean",
356
503
  "date",
357
504
  "datetime",
358
505
  "unknown"
359
- ]), fe = /* @__PURE__ */ new Set([
506
+ ]), ve = /* @__PURE__ */ new Set([
360
507
  "number",
361
508
  "currency",
362
509
  "percent",
@@ -366,21 +513,21 @@ const ce = /* @__PURE__ */ new Set([
366
513
  "datetime",
367
514
  "duration",
368
515
  "string"
369
- ]), pe = /* @__PURE__ */ new Set([
516
+ ]), ge = /* @__PURE__ */ new Set([
370
517
  "millisecond",
371
518
  "second",
372
519
  "minute",
373
520
  "hour",
374
521
  "day"
375
- ]), _e = /* @__PURE__ */ new Set([
522
+ ]), be = /* @__PURE__ */ new Set([
376
523
  "compact",
377
524
  "digital",
378
525
  "long"
379
526
  ]);
380
- function k(e, i, t) {
527
+ function R(e, i, t) {
381
528
  if (e === void 0)
382
529
  return;
383
- if (!c(e)) {
530
+ if (!u(e)) {
384
531
  t.push(
385
532
  a(
386
533
  "invalid_value_format",
@@ -391,7 +538,7 @@ function k(e, i, t) {
391
538
  return;
392
539
  }
393
540
  const n = e;
394
- (typeof n.type != "string" || !fe.has(n.type)) && t.push(
541
+ (typeof n.type != "string" || !ve.has(n.type)) && t.push(
395
542
  a(
396
543
  "invalid_value_format_type",
397
544
  "Value format type must be number, currency, percent, scientific, date, datetime, duration, or string.",
@@ -424,17 +571,17 @@ function k(e, i, t) {
424
571
  `${i}.percentValueMode`
425
572
  )
426
573
  );
427
- for (const s of ["inputUnit", "largestUnit", "smallestUnit"]) {
428
- const r = e[s];
429
- r !== void 0 && (typeof r != "string" || !pe.has(r)) && t.push(
574
+ for (const o of ["inputUnit", "largestUnit", "smallestUnit"]) {
575
+ const s = e[o];
576
+ s !== void 0 && (typeof s != "string" || !ge.has(s)) && t.push(
430
577
  a(
431
578
  "invalid_value_format_duration_unit",
432
579
  "Duration format units must be millisecond, second, minute, hour, or day.",
433
- `${i}.${s}`
580
+ `${i}.${o}`
434
581
  )
435
582
  );
436
583
  }
437
- e.outputStyle !== void 0 && (typeof e.outputStyle != "string" || !_e.has(e.outputStyle)) && t.push(
584
+ e.outputStyle !== void 0 && (typeof e.outputStyle != "string" || !be.has(e.outputStyle)) && t.push(
438
585
  a(
439
586
  "invalid_value_format_duration_style",
440
587
  "Duration format outputStyle must be compact, digital, or long.",
@@ -451,21 +598,21 @@ function h(e, i, t) {
451
598
  )
452
599
  );
453
600
  }
454
- const ge = /* @__PURE__ */ new Set([
601
+ const ye = /* @__PURE__ */ new Set([
455
602
  "additive",
456
603
  "non_additive",
457
604
  "ratio_of_sums",
458
605
  "weighted",
459
606
  "pre_aggregated",
460
607
  "snapshot"
461
- ]), ve = /* @__PURE__ */ new Set([
608
+ ]), he = /* @__PURE__ */ new Set([
462
609
  "default",
463
610
  "symmetric_aggregate",
464
611
  "aggregate_then_join",
465
612
  "weighted"
466
613
  ]);
467
- function be(e, i, t) {
468
- if (!e || !c(e)) {
614
+ function xe(e, i, t) {
615
+ if (!e || !u(e)) {
469
616
  t.push(
470
617
  a(
471
618
  "invalid_derived_field_input",
@@ -479,28 +626,16 @@ function be(e, i, t) {
479
626
  f(e.field, `${i}.field`, t, { required: !0 }), _(e.aggregate, `${i}.aggregate`, t);
480
627
  return;
481
628
  }
482
- if (e.kind === "metric") {
483
- f(e.metric, `${i}.metric`, t, {
484
- required: !0
485
- });
486
- return;
487
- }
488
- if (e.kind === "dimension") {
489
- f(e.dimension, `${i}.dimension`, t, {
490
- required: !0
491
- });
492
- return;
493
- }
494
629
  t.push(
495
630
  a(
496
631
  "invalid_derived_field_input",
497
- "Derived field input kind must be field, metric, or dimension.",
632
+ "Derived field input kind must be field.",
498
633
  `${i}.kind`
499
634
  )
500
635
  );
501
636
  }
502
- function N(e, i, t) {
503
- if (!c(e)) {
637
+ function j(e, i, t) {
638
+ if (!u(e)) {
504
639
  t.push(
505
640
  a(
506
641
  "invalid_result_column_ref",
@@ -510,8 +645,8 @@ function N(e, i, t) {
510
645
  );
511
646
  return;
512
647
  }
513
- const n = l(e.columnKey), s = c(e.field);
514
- if (n === s) {
648
+ const n = l(e.columnKey), o = u(e.field);
649
+ if (n === o) {
515
650
  t.push(
516
651
  a(
517
652
  "invalid_result_column_ref",
@@ -521,12 +656,12 @@ function N(e, i, t) {
521
656
  );
522
657
  return;
523
658
  }
524
- s && f(e.field, `${i}.field`, t, {
659
+ o && f(e.field, `${i}.field`, t, {
525
660
  required: !0
526
661
  });
527
662
  }
528
- function ye(e, i, t) {
529
- if (!c(e)) {
663
+ function we(e, i, t) {
664
+ if (!u(e)) {
530
665
  t.push(
531
666
  a(
532
667
  "invalid_result_calculation_output",
@@ -548,9 +683,9 @@ function ye(e, i, t) {
548
683
  "Result calculation output dataType must be string, number, boolean, date, datetime, or unknown.",
549
684
  `${i}.dataType`
550
685
  )
551
- ), k(e.format, `${i}.format`, t);
686
+ ), R(e.format, `${i}.format`, t);
552
687
  }
553
- function he(e, i, t) {
688
+ function $e(e, i, t) {
554
689
  e !== void 0 && e !== "hour" && e !== "day" && e !== "week" && e !== "month" && e !== "quarter" && e !== "year" && t.push(
555
690
  a(
556
691
  "invalid_time_grain",
@@ -562,7 +697,7 @@ function he(e, i, t) {
562
697
  function V(e, i, t, n) {
563
698
  e !== "asc" && e !== "desc" && t.push(a(n, "Sort direction must be asc or desc.", i));
564
699
  }
565
- function H(e, i, t, n) {
700
+ function G(e, i, t, n) {
566
701
  e !== void 0 && e !== "warehouseDefault" && e !== "first" && e !== "last" && t.push(
567
702
  a(
568
703
  n,
@@ -571,12 +706,12 @@ function H(e, i, t, n) {
571
706
  )
572
707
  );
573
708
  }
574
- function G(e, i, t, n) {
709
+ function z(e, i, t, n) {
575
710
  e !== void 0 && e !== "global" && e !== "withinParent" && t.push(
576
711
  a(n, "Sort scope must be global or withinParent.", i)
577
712
  );
578
713
  }
579
- function xe(e, i, t) {
714
+ function Ie(e, i, t) {
580
715
  e.enabled !== void 0 && typeof e.enabled != "boolean" && t.push(
581
716
  a(
582
717
  "invalid_matrix_subtotal",
@@ -597,23 +732,23 @@ function xe(e, i, t) {
597
732
  )
598
733
  );
599
734
  }
600
- function we(e, i, t) {
735
+ function Ae(e, i, t) {
601
736
  if (V(
602
737
  e.direction,
603
738
  `${i}.direction`,
604
739
  t,
605
740
  "invalid_matrix_sort_direction"
606
- ), H(
741
+ ), G(
607
742
  e.nulls,
608
743
  `${i}.nulls`,
609
744
  t,
610
745
  "invalid_matrix_sort_nulls"
611
- ), G(
746
+ ), z(
612
747
  e.scope,
613
748
  `${i}.scope`,
614
749
  t,
615
750
  "invalid_matrix_sort_scope"
616
- ), !c(e.by)) {
751
+ ), !u(e.by)) {
617
752
  t.push(
618
753
  a(
619
754
  "invalid_matrix_sort_by",
@@ -639,7 +774,7 @@ function we(e, i, t) {
639
774
  );
640
775
  }
641
776
  }
642
- function O(e, i, t, n) {
777
+ function B(e, i, t, n) {
643
778
  if (!Array.isArray(e))
644
779
  return n.required ? t.push(
645
780
  a(
@@ -661,59 +796,59 @@ function O(e, i, t, n) {
661
796
  i
662
797
  )
663
798
  );
664
- const s = [];
665
- return e.forEach((r, o) => {
666
- const u = `${i}.${o}`;
667
- if (!c(r)) {
799
+ const o = [];
800
+ return e.forEach((s, r) => {
801
+ const c = `${i}.${r}`;
802
+ if (!u(s)) {
668
803
  t.push(
669
804
  a(
670
805
  "invalid_matrix_axis_level",
671
806
  "Matrix axis levels must be structured objects.",
672
- u
807
+ c
673
808
  )
674
809
  );
675
810
  return;
676
811
  }
677
- const d = r;
678
- s.push(d), d.id !== void 0 && !l(d.id) && t.push(
812
+ const d = s;
813
+ o.push(d), d.id !== void 0 && !l(d.id) && t.push(
679
814
  a(
680
815
  "invalid_matrix_axis_level_id",
681
816
  "Matrix axis level id must be a non-empty string.",
682
- `${u}.id`
817
+ `${c}.id`
683
818
  )
684
- ), f(d.field, `${u}.field`, t, {
819
+ ), f(d.field, `${c}.field`, t, {
685
820
  required: !0
686
- }), he(d.grain, `${u}.grain`, t), d.label !== void 0 && typeof d.label != "string" && t.push(
821
+ }), $e(d.grain, `${c}.grain`, t), d.label !== void 0 && typeof d.label != "string" && t.push(
687
822
  a(
688
823
  "invalid_matrix_axis_label",
689
824
  "Matrix axis level label must be a string.",
690
- `${u}.label`
825
+ `${c}.label`
691
826
  )
692
- ), d.subtotal !== void 0 && typeof d.subtotal != "boolean" && (c(d.subtotal) ? xe(
827
+ ), d.subtotal !== void 0 && typeof d.subtotal != "boolean" && (u(d.subtotal) ? Ie(
693
828
  d.subtotal,
694
- `${u}.subtotal`,
829
+ `${c}.subtotal`,
695
830
  t
696
831
  ) : t.push(
697
832
  a(
698
833
  "invalid_matrix_subtotal",
699
834
  "Matrix subtotal must be a boolean or structured options object.",
700
- `${u}.subtotal`
835
+ `${c}.subtotal`
701
836
  )
702
- )), d.sortBy !== void 0 && (c(d.sortBy) ? we(
837
+ )), d.sortBy !== void 0 && (u(d.sortBy) ? Ae(
703
838
  d.sortBy,
704
- `${u}.sortBy`,
839
+ `${c}.sortBy`,
705
840
  t
706
841
  ) : t.push(
707
842
  a(
708
843
  "invalid_matrix_sort_by",
709
844
  "Matrix axis sortBy must be a structured object.",
710
- `${u}.sortBy`
845
+ `${c}.sortBy`
711
846
  )
712
847
  ));
713
- }), s;
848
+ }), o;
714
849
  }
715
- function $e(e, i, t) {
716
- if (!c(e)) {
850
+ function Me(e, i, t) {
851
+ if (!u(e)) {
717
852
  t.push(
718
853
  a(
719
854
  "invalid_matrix_total_behavior",
@@ -753,7 +888,7 @@ function $e(e, i, t) {
753
888
  )
754
889
  );
755
890
  }
756
- function Me(e, i, t) {
891
+ function Se(e, i, t) {
757
892
  if (!Array.isArray(e) || e.length === 0)
758
893
  return t.push(
759
894
  a(
@@ -763,46 +898,46 @@ function Me(e, i, t) {
763
898
  )
764
899
  ), [];
765
900
  const n = [];
766
- return e.forEach((s, r) => {
767
- const o = `${i}.${r}`;
768
- if (!c(s)) {
901
+ return e.forEach((o, s) => {
902
+ const r = `${i}.${s}`;
903
+ if (!u(o)) {
769
904
  t.push(
770
905
  a(
771
906
  "invalid_matrix_value",
772
907
  "Matrix values must be structured objects.",
773
- o
908
+ r
774
909
  )
775
910
  );
776
911
  return;
777
912
  }
778
- const u = s;
779
- n.push(u), u.id !== void 0 && !l(u.id) && t.push(
913
+ const c = o;
914
+ n.push(c), c.id !== void 0 && !l(c.id) && t.push(
780
915
  a(
781
916
  "invalid_matrix_value_id",
782
917
  "Matrix value id must be a non-empty string.",
783
- `${o}.id`
918
+ `${r}.id`
784
919
  )
785
- ), f(u.field, `${o}.field`, t, {
920
+ ), f(c.field, `${r}.field`, t, {
786
921
  required: !0
787
922
  }), _(
788
- u.aggregate,
789
- `${o}.aggregate`,
923
+ c.aggregate,
924
+ `${r}.aggregate`,
790
925
  t
791
- ), k(u.format, `${o}.format`, t), u.label !== void 0 && typeof u.label != "string" && t.push(
926
+ ), R(c.format, `${r}.format`, t), c.label !== void 0 && typeof c.label != "string" && t.push(
792
927
  a(
793
928
  "invalid_matrix_value_label",
794
929
  "Matrix value label must be a string.",
795
- `${o}.label`
930
+ `${r}.label`
796
931
  )
797
- ), u.totalBehavior !== void 0 && $e(
798
- u.totalBehavior,
799
- `${o}.totalBehavior`,
932
+ ), c.totalBehavior !== void 0 && Me(
933
+ c.totalBehavior,
934
+ `${r}.totalBehavior`,
800
935
  t
801
936
  );
802
937
  }), n;
803
938
  }
804
- function Se(e, i, t) {
805
- if (!c(e)) {
939
+ function ke(e, i, t) {
940
+ if (!u(e)) {
806
941
  t.push(
807
942
  a(
808
943
  "invalid_matrix_totals",
@@ -813,8 +948,8 @@ function Se(e, i, t) {
813
948
  return;
814
949
  }
815
950
  for (const n of ["rows", "columns"]) {
816
- const s = e[n];
817
- s !== void 0 && s !== !0 && s !== !1 && s !== "perLevel" && t.push(
951
+ const o = e[n];
952
+ o !== void 0 && o !== !0 && o !== !1 && o !== "perLevel" && t.push(
818
953
  a(
819
954
  "invalid_matrix_totals",
820
955
  "Matrix total axis setting must be a boolean or perLevel.",
@@ -823,7 +958,7 @@ function Se(e, i, t) {
823
958
  );
824
959
  }
825
960
  if (e.grandTotal !== void 0 && typeof e.grandTotal != "boolean")
826
- if (!c(e.grandTotal))
961
+ if (!u(e.grandTotal))
827
962
  t.push(
828
963
  a(
829
964
  "invalid_matrix_totals",
@@ -833,8 +968,8 @@ function Se(e, i, t) {
833
968
  );
834
969
  else
835
970
  for (const n of ["rows", "columns"]) {
836
- const s = e.grandTotal[n];
837
- s !== void 0 && typeof s != "boolean" && t.push(
971
+ const o = e.grandTotal[n];
972
+ o !== void 0 && typeof o != "boolean" && t.push(
838
973
  a(
839
974
  "invalid_matrix_totals",
840
975
  "Matrix grandTotal rows/columns must be booleans.",
@@ -856,7 +991,7 @@ function Se(e, i, t) {
856
991
  )
857
992
  );
858
993
  }
859
- function M(e, i, t, n) {
994
+ function I(e, i, t, n) {
860
995
  if (!Array.isArray(e)) {
861
996
  n.push(
862
997
  a(
@@ -867,46 +1002,46 @@ function M(e, i, t, n) {
867
1002
  );
868
1003
  return;
869
1004
  }
870
- e.forEach((s, r) => {
871
- const o = `${i}.${r}`;
872
- if (!c(s)) {
1005
+ e.forEach((o, s) => {
1006
+ const r = `${i}.${s}`;
1007
+ if (!u(o)) {
873
1008
  n.push(
874
1009
  a(
875
1010
  "invalid_matrix_path",
876
1011
  "Matrix path segment must be a structured object.",
877
- o
1012
+ r
878
1013
  )
879
1014
  );
880
1015
  return;
881
1016
  }
882
- const u = s;
883
- if (!l(u.levelId)) {
1017
+ const c = o;
1018
+ if (!l(c.levelId)) {
884
1019
  n.push(
885
1020
  a(
886
1021
  "stable_id_required",
887
1022
  "Matrix path segments must reference an explicit public axis level id.",
888
- `${o}.levelId`
1023
+ `${r}.levelId`
889
1024
  )
890
1025
  );
891
1026
  return;
892
1027
  }
893
- Object.prototype.hasOwnProperty.call(s, "value") || n.push(
1028
+ Object.prototype.hasOwnProperty.call(o, "value") || n.push(
894
1029
  a(
895
1030
  "invalid_matrix_path",
896
1031
  "Matrix path segments must include a value property; use explicit null for null members.",
897
- `${o}.value`
1032
+ `${r}.value`
898
1033
  )
899
- ), t.has(u.levelId) || n.push(
1034
+ ), t.has(c.levelId) || n.push(
900
1035
  a(
901
1036
  "stable_id_required",
902
1037
  "Matrix path segment levelId must match an explicit public axis level id.",
903
- `${o}.levelId`
1038
+ `${r}.levelId`
904
1039
  )
905
1040
  );
906
1041
  });
907
1042
  }
908
- function F(e, i, t, n) {
909
- if (!c(e)) {
1043
+ function q(e, i, t, n) {
1044
+ if (!u(e)) {
910
1045
  n.push(
911
1046
  a(
912
1047
  "invalid_matrix_expansion",
@@ -928,10 +1063,10 @@ function F(e, i, t, n) {
928
1063
  "Matrix expansion lazy must be a boolean.",
929
1064
  `${i}.lazy`
930
1065
  )
931
- ), e.expandedPaths !== void 0 && (Array.isArray(e.expandedPaths) ? e.expandedPaths.forEach((s, r) => {
932
- M(
933
- s,
934
- `${i}.expandedPaths.${r}`,
1066
+ ), e.expandedPaths !== void 0 && (Array.isArray(e.expandedPaths) ? e.expandedPaths.forEach((o, s) => {
1067
+ I(
1068
+ o,
1069
+ `${i}.expandedPaths.${s}`,
935
1070
  t,
936
1071
  n
937
1072
  );
@@ -943,9 +1078,9 @@ function F(e, i, t, n) {
943
1078
  )
944
1079
  ));
945
1080
  }
946
- function Ae(e, i, t, n) {
1081
+ function Re(e, i, t, n) {
947
1082
  if (e !== void 0) {
948
- if (!c(e)) {
1083
+ if (!u(e)) {
949
1084
  n.push(
950
1085
  a(
951
1086
  "invalid_matrix_expansion",
@@ -955,12 +1090,12 @@ function Ae(e, i, t, n) {
955
1090
  );
956
1091
  return;
957
1092
  }
958
- e.rows !== void 0 && F(
1093
+ e.rows !== void 0 && q(
959
1094
  e.rows,
960
1095
  "expansion.rows",
961
1096
  i,
962
1097
  n
963
- ), e.columns !== void 0 && F(
1098
+ ), e.columns !== void 0 && q(
964
1099
  e.columns,
965
1100
  "expansion.columns",
966
1101
  t,
@@ -968,10 +1103,10 @@ function Ae(e, i, t, n) {
968
1103
  );
969
1104
  }
970
1105
  }
971
- function ke(e, i, t, n, s) {
1106
+ function De(e, i, t, n, o) {
972
1107
  if (e !== void 0) {
973
1108
  if (!Array.isArray(e)) {
974
- s.push(
1109
+ o.push(
975
1110
  a(
976
1111
  "invalid_matrix_sort",
977
1112
  "Matrix sort must be an array of sort rules.",
@@ -980,103 +1115,103 @@ function ke(e, i, t, n, s) {
980
1115
  );
981
1116
  return;
982
1117
  }
983
- e.forEach((r, o) => {
984
- const u = `sort.${o}`;
985
- if (!c(r)) {
986
- s.push(
1118
+ e.forEach((s, r) => {
1119
+ const c = `sort.${r}`;
1120
+ if (!u(s)) {
1121
+ o.push(
987
1122
  a(
988
1123
  "invalid_matrix_sort",
989
1124
  "Matrix sort rule must be a structured object.",
990
- u
1125
+ c
991
1126
  )
992
1127
  );
993
1128
  return;
994
1129
  }
995
- const d = r;
996
- d.axis !== "row" && d.axis !== "column" && s.push(
1130
+ const d = s;
1131
+ d.axis !== "row" && d.axis !== "column" && o.push(
997
1132
  a(
998
1133
  "invalid_matrix_sort",
999
1134
  "Matrix sort axis must be row or column.",
1000
- `${u}.axis`
1135
+ `${c}.axis`
1001
1136
  )
1002
1137
  );
1003
- const m = d.axis === "column" ? t : i;
1004
- if (d.targetId !== void 0 && !m.has(d.targetId) && s.push(
1138
+ const p = d.axis === "column" ? t : i;
1139
+ if (d.targetId !== void 0 && !p.has(d.targetId) && o.push(
1005
1140
  a(
1006
1141
  "stable_id_required",
1007
1142
  "Matrix sort targetId must reference an explicit public axis level id.",
1008
- `${u}.targetId`
1143
+ `${c}.targetId`
1009
1144
  )
1010
1145
  ), V(
1011
1146
  d.direction,
1012
- `${u}.direction`,
1013
- s,
1147
+ `${c}.direction`,
1148
+ o,
1014
1149
  "invalid_matrix_sort_direction"
1015
- ), H(
1150
+ ), G(
1016
1151
  d.nulls,
1017
- `${u}.nulls`,
1018
- s,
1152
+ `${c}.nulls`,
1153
+ o,
1019
1154
  "invalid_matrix_sort_nulls"
1020
- ), G(
1155
+ ), z(
1021
1156
  d.scope,
1022
- `${u}.scope`,
1023
- s,
1157
+ `${c}.scope`,
1158
+ o,
1024
1159
  "invalid_matrix_sort_scope"
1025
- ), !c(d.by)) {
1026
- s.push(
1160
+ ), !u(d.by)) {
1161
+ o.push(
1027
1162
  a(
1028
1163
  "invalid_matrix_sort_by",
1029
1164
  "Matrix sort by must be a structured object.",
1030
- `${u}.by`
1165
+ `${c}.by`
1031
1166
  )
1032
1167
  );
1033
1168
  return;
1034
1169
  }
1035
1170
  if (d.by.kind !== "label") {
1036
1171
  if (d.by.kind === "field") {
1037
- f(d.by.field, `${u}.by.field`, s, {
1172
+ f(d.by.field, `${c}.by.field`, o, {
1038
1173
  required: !0
1039
1174
  }), _(
1040
1175
  d.by.aggregate,
1041
- `${u}.by.aggregate`,
1042
- s
1176
+ `${c}.by.aggregate`,
1177
+ o
1043
1178
  );
1044
1179
  return;
1045
1180
  }
1046
1181
  if (d.by.kind === "value") {
1047
- (!l(d.by.valueId) || !n.has(d.by.valueId)) && s.push(
1182
+ (!l(d.by.valueId) || !n.has(d.by.valueId)) && o.push(
1048
1183
  a(
1049
1184
  "stable_id_required",
1050
1185
  "Matrix value sort must reference an explicit public value id.",
1051
- `${u}.by.valueId`
1186
+ `${c}.by.valueId`
1052
1187
  )
1053
- ), d.by.rowPath !== void 0 && M(
1188
+ ), d.by.rowPath !== void 0 && I(
1054
1189
  d.by.rowPath,
1055
- `${u}.by.rowPath`,
1190
+ `${c}.by.rowPath`,
1056
1191
  i,
1057
- s
1058
- ), d.by.columnPath !== void 0 && M(
1192
+ o
1193
+ ), d.by.columnPath !== void 0 && I(
1059
1194
  d.by.columnPath,
1060
- `${u}.by.columnPath`,
1195
+ `${c}.by.columnPath`,
1061
1196
  t,
1062
- s
1197
+ o
1063
1198
  );
1064
1199
  return;
1065
1200
  }
1066
- s.push(
1201
+ o.push(
1067
1202
  a(
1068
1203
  "invalid_matrix_sort_by",
1069
1204
  "Matrix sort by must be label, field, or value.",
1070
- `${u}.by.kind`
1205
+ `${c}.by.kind`
1071
1206
  )
1072
1207
  );
1073
1208
  }
1074
1209
  });
1075
1210
  }
1076
1211
  }
1077
- function Ie(e, i) {
1212
+ function Fe(e, i) {
1078
1213
  if (e !== void 0) {
1079
- if (!c(e)) {
1214
+ if (!u(e)) {
1080
1215
  i.push(
1081
1216
  a(
1082
1217
  "invalid_matrix_layout",
@@ -1113,8 +1248,8 @@ function Ie(e, i) {
1113
1248
  );
1114
1249
  }
1115
1250
  }
1116
- function q(e, i, t) {
1117
- if (!c(e)) {
1251
+ function H(e, i, t) {
1252
+ if (!u(e)) {
1118
1253
  t.push(
1119
1254
  a(
1120
1255
  "invalid_matrix_display_limits",
@@ -1142,7 +1277,7 @@ function q(e, i, t) {
1142
1277
  "Matrix display limit direction must be top or bottom.",
1143
1278
  `${i}.direction`
1144
1279
  )
1145
- ), e.others !== void 0 && typeof e.others != "boolean" && (c(e.others) ? e.others.label !== void 0 && typeof e.others.label != "string" && t.push(
1280
+ ), e.others !== void 0 && typeof e.others != "boolean" && (u(e.others) ? e.others.label !== void 0 && typeof e.others.label != "string" && t.push(
1146
1281
  a(
1147
1282
  "invalid_matrix_display_limits",
1148
1283
  "Matrix display limit others label must be a string.",
@@ -1156,9 +1291,9 @@ function q(e, i, t) {
1156
1291
  )
1157
1292
  ));
1158
1293
  }
1159
- function Re(e, i) {
1294
+ function Pe(e, i) {
1160
1295
  if (e !== void 0) {
1161
- if (!c(e)) {
1296
+ if (!u(e)) {
1162
1297
  i.push(
1163
1298
  a(
1164
1299
  "invalid_matrix_display_limits",
@@ -1168,18 +1303,18 @@ function Re(e, i) {
1168
1303
  );
1169
1304
  return;
1170
1305
  }
1171
- e.rows !== void 0 && q(
1306
+ e.rows !== void 0 && H(
1172
1307
  e.rows,
1173
1308
  "displayLimits.rows",
1174
1309
  i
1175
- ), e.columns !== void 0 && q(
1310
+ ), e.columns !== void 0 && H(
1176
1311
  e.columns,
1177
1312
  "displayLimits.columns",
1178
1313
  i
1179
1314
  );
1180
1315
  }
1181
1316
  }
1182
- function De(e, i) {
1317
+ function Te(e, i) {
1183
1318
  var d;
1184
1319
  ((d = e.source) == null ? void 0 : d.kind) === "sql" && i.push(
1185
1320
  a(
@@ -1188,54 +1323,54 @@ function De(e, i) {
1188
1323
  "source.kind"
1189
1324
  )
1190
1325
  );
1191
- const t = O(e.rows, "rows", i, {
1326
+ const t = B(e.rows, "rows", i, {
1192
1327
  required: !0
1193
- }), n = O(e.columns, "columns", i, {
1328
+ }), n = B(e.columns, "columns", i, {
1194
1329
  required: !1
1195
- }), s = Me(e.values, "values", i);
1196
- x(e.filters, "filters", i), e.totals !== void 0 && Se(e.totals, "totals", i), w(
1197
- t.map((m) => m.id),
1330
+ }), o = Se(e.values, "values", i);
1331
+ x(e.filters, "filters", i), e.totals !== void 0 && ke(e.totals, "totals", i), w(
1332
+ t.map((p) => p.id),
1198
1333
  "rows",
1199
1334
  "row axis level",
1200
1335
  i
1201
1336
  ), w(
1202
- n.map((m) => m.id),
1337
+ n.map((p) => p.id),
1203
1338
  "columns",
1204
1339
  "column axis level",
1205
1340
  i
1206
1341
  ), w(
1207
- s.map((m) => m.id),
1342
+ o.map((p) => p.id),
1208
1343
  "values",
1209
1344
  "value",
1210
1345
  i
1211
1346
  );
1212
- const r = new Set(
1213
- t.map((m) => m.id).filter((m) => l(m))
1214
- ), o = new Set(
1215
- n.map((m) => m.id).filter((m) => l(m))
1216
- ), u = new Set(
1217
- s.map((m) => m.id).filter((m) => l(m))
1347
+ const s = new Set(
1348
+ t.map((p) => p.id).filter((p) => l(p))
1349
+ ), r = new Set(
1350
+ n.map((p) => p.id).filter((p) => l(p))
1351
+ ), c = new Set(
1352
+ o.map((p) => p.id).filter((p) => l(p))
1218
1353
  );
1219
- ke(
1354
+ De(
1220
1355
  e.sort,
1356
+ s,
1221
1357
  r,
1222
- o,
1223
- u,
1358
+ c,
1224
1359
  i
1225
- ), Ae(
1360
+ ), Re(
1226
1361
  e.expansion,
1362
+ s,
1227
1363
  r,
1228
- o,
1229
1364
  i
1230
- ), Ie(e.layout, i), Re(e.displayLimits, i);
1365
+ ), Fe(e.layout, i), Pe(e.displayLimits, i);
1231
1366
  }
1232
- function Pe(e, i) {
1367
+ function Ee(e, i) {
1233
1368
  if (e.analysis === void 0)
1234
1369
  return;
1235
- if (!c(e.analysis)) {
1370
+ if (!u(e.analysis)) {
1236
1371
  i.push(
1237
1372
  a(
1238
- "invalid_metric_analysis",
1373
+ "invalid_measure_analysis",
1239
1374
  "Metric analysis must be a structured object.",
1240
1375
  "analysis"
1241
1376
  )
@@ -1245,7 +1380,7 @@ function Pe(e, i) {
1245
1380
  if (e.analysis.kind !== "period_change") {
1246
1381
  i.push(
1247
1382
  a(
1248
- "invalid_metric_analysis",
1383
+ "invalid_measure_analysis",
1249
1384
  "Metric analysis kind is not supported.",
1250
1385
  "analysis.kind"
1251
1386
  )
@@ -1266,16 +1401,16 @@ function Pe(e, i) {
1266
1401
  )
1267
1402
  ), e.analysis.orderBy !== void 0 && e.analysis.orderBy !== "absolute_change" && e.analysis.orderBy !== "positive_change" && e.analysis.orderBy !== "negative_change" && e.analysis.orderBy !== "period" && i.push(
1268
1403
  a(
1269
- "invalid_metric_analysis",
1404
+ "invalid_measure_analysis",
1270
1405
  "Period-change analysis orderBy must be absolute_change, positive_change, negative_change, or period.",
1271
1406
  "analysis.orderBy"
1272
1407
  )
1273
1408
  );
1274
1409
  const { timeWindow: t } = e.analysis;
1275
- t !== void 0 && S(t, "analysis.timeWindow", i);
1410
+ t !== void 0 && A(t, "analysis.timeWindow", i);
1276
1411
  }
1277
- function S(e, i, t) {
1278
- if (!c(e)) {
1412
+ function A(e, i, t) {
1413
+ if (!u(e)) {
1279
1414
  t.push(
1280
1415
  a(
1281
1416
  "invalid_time_window",
@@ -1305,20 +1440,20 @@ function S(e, i, t) {
1305
1440
  `${i}.end`
1306
1441
  )
1307
1442
  ), l(e.start) && l(e.end)) {
1308
- const n = P(e.start), s = P(e.end);
1443
+ const n = T(e.start), o = T(e.end);
1309
1444
  n || t.push(
1310
1445
  a(
1311
1446
  "invalid_time_window",
1312
1447
  "Absolute time window start must be a valid ISO date or timestamp.",
1313
1448
  `${i}.start`
1314
1449
  )
1315
- ), s || t.push(
1450
+ ), o || t.push(
1316
1451
  a(
1317
1452
  "invalid_time_window",
1318
1453
  "Absolute time window end must be a valid ISO date or timestamp.",
1319
1454
  `${i}.end`
1320
1455
  )
1321
- ), n && s && n.getTime() > s.getTime() && t.push(
1456
+ ), n && o && n.getTime() > o.getTime() && t.push(
1322
1457
  a(
1323
1458
  "invalid_time_window",
1324
1459
  "Absolute time window start must be before or equal to end.",
@@ -1366,94 +1501,94 @@ function x(e, i, t) {
1366
1501
  );
1367
1502
  return;
1368
1503
  }
1369
- e.forEach((n, s) => {
1504
+ e.forEach((n, o) => {
1370
1505
  var d;
1371
- const r = `${i}.${s}`;
1372
- if (!c(n)) {
1506
+ const s = `${i}.${o}`;
1507
+ if (!u(n)) {
1373
1508
  t.push(
1374
1509
  a(
1375
1510
  "invalid_analytics_filter",
1376
1511
  "Analytics filter must be a structured object.",
1377
- r
1512
+ s
1378
1513
  )
1379
1514
  );
1380
1515
  return;
1381
1516
  }
1382
- const o = n;
1383
- f(o.field, `${r}.field`, t, {
1517
+ const r = n;
1518
+ f(r.field, `${s}.field`, t, {
1384
1519
  required: !0
1385
- }), o.scope !== void 0 && o.scope !== "row" && o.scope !== "aggregate" && t.push(
1520
+ }), r.scope !== void 0 && r.scope !== "row" && r.scope !== "aggregate" && t.push(
1386
1521
  a(
1387
1522
  "invalid_analytics_filter_scope",
1388
1523
  "Analytics filter scope must be row or aggregate.",
1389
- `${r}.scope`
1524
+ `${s}.scope`
1390
1525
  )
1391
- ), o.scope === "aggregate" && ((d = o.field) == null ? void 0 : d.role) !== void 0 && o.field.role !== "measure" && t.push(
1526
+ ), r.scope === "aggregate" && ((d = r.field) == null ? void 0 : d.role) !== void 0 && r.field.role !== "measure" && t.push(
1392
1527
  a(
1393
1528
  "invalid_analytics_filter_scope",
1394
1529
  "Aggregate-scope analytics filters must target a measure field.",
1395
- `${r}.scope`
1530
+ `${s}.scope`
1396
1531
  )
1397
1532
  );
1398
- const u = o.operator === "is_null" || o.operator === "is_not_null";
1399
- if (o.operator !== void 0 && o.operator !== "=" && o.operator !== "!=" && o.operator !== "in" && o.operator !== "not_in" && o.operator !== "contains" && o.operator !== "not_contains" && o.operator !== "between" && o.operator !== "not_between" && o.operator !== ">" && o.operator !== ">=" && o.operator !== "<" && o.operator !== "<=" && o.operator !== "is_null" && o.operator !== "is_not_null" && t.push(
1533
+ const c = r.operator === "is_null" || r.operator === "is_not_null";
1534
+ if (r.operator !== void 0 && r.operator !== "=" && r.operator !== "!=" && r.operator !== "in" && r.operator !== "not_in" && r.operator !== "contains" && r.operator !== "not_contains" && r.operator !== "between" && r.operator !== "not_between" && r.operator !== ">" && r.operator !== ">=" && r.operator !== "<" && r.operator !== "<=" && r.operator !== "is_null" && r.operator !== "is_not_null" && t.push(
1400
1535
  a(
1401
1536
  "invalid_analytics_filter_operator",
1402
1537
  "Analytics filter operator is not supported.",
1403
- `${r}.operator`
1538
+ `${s}.operator`
1404
1539
  )
1405
- ), o.values === void 0 && !u && t.push(
1540
+ ), r.values === void 0 && !c && t.push(
1406
1541
  a(
1407
1542
  "missing_analytics_filter_value",
1408
1543
  "Analytics filter needs values unless it is a null check.",
1409
- r
1544
+ s
1410
1545
  )
1411
- ), u && o.values !== void 0) {
1546
+ ), c && r.values !== void 0) {
1412
1547
  t.push(
1413
1548
  a(
1414
1549
  "invalid_analytics_filter_values",
1415
1550
  "Null-check analytics filters must not include values.",
1416
- `${r}.values`
1551
+ `${s}.values`
1417
1552
  )
1418
1553
  );
1419
1554
  return;
1420
1555
  }
1421
- if (o.values !== void 0 && !Array.isArray(o.values)) {
1556
+ if (r.values !== void 0 && !Array.isArray(r.values)) {
1422
1557
  t.push(
1423
1558
  a(
1424
1559
  "invalid_analytics_filter_values",
1425
1560
  "Analytics filter values must be an array when provided.",
1426
- `${r}.values`
1561
+ `${s}.values`
1427
1562
  )
1428
1563
  );
1429
1564
  return;
1430
1565
  }
1431
- if (o.values !== void 0) {
1432
- const m = o.values.length;
1433
- if (o.operator === "between" || o.operator === "not_between") {
1434
- m !== 2 && t.push(
1566
+ if (r.values !== void 0) {
1567
+ const p = r.values.length;
1568
+ if (r.operator === "between" || r.operator === "not_between") {
1569
+ p !== 2 && t.push(
1435
1570
  a(
1436
1571
  "invalid_analytics_filter_values",
1437
1572
  "Between analytics filters must include exactly two values.",
1438
- `${r}.values`
1573
+ `${s}.values`
1439
1574
  )
1440
1575
  );
1441
1576
  return;
1442
1577
  }
1443
- (o.operator === "contains" || o.operator === "not_contains" || o.operator === "=" || o.operator === "!=" || o.operator === ">" || o.operator === ">=" || o.operator === "<" || o.operator === "<=" || o.operator === void 0) && m !== 1 && t.push(
1578
+ (r.operator === "contains" || r.operator === "not_contains" || r.operator === "=" || r.operator === "!=" || r.operator === ">" || r.operator === ">=" || r.operator === "<" || r.operator === "<=" || r.operator === void 0) && p !== 1 && t.push(
1444
1579
  a(
1445
1580
  "invalid_analytics_filter_values",
1446
1581
  "Scalar analytics filters must include exactly one value. Use in/not_in for multiple values.",
1447
- `${r}.values`
1582
+ `${s}.values`
1448
1583
  )
1449
1584
  );
1450
1585
  }
1451
1586
  });
1452
1587
  }
1453
1588
  }
1454
- function Te(e) {
1589
+ function Ne(e) {
1455
1590
  const i = [];
1456
- if (!c(e))
1591
+ if (!u(e))
1457
1592
  return i.push(
1458
1593
  a(
1459
1594
  "invalid_derived_field",
@@ -1474,10 +1609,10 @@ function Te(e) {
1474
1609
  "Derived field needs a label.",
1475
1610
  "label"
1476
1611
  )
1477
- ), ce.has(e.resultRole) || i.push(
1612
+ ), me.has(e.resultRole) || i.push(
1478
1613
  a(
1479
1614
  "invalid_derived_field_role",
1480
- "Derived field resultRole must be measure, group, date, id, or filter.",
1615
+ "Derived field resultRole must be measure, dimension, date, id, or unknown.",
1481
1616
  "resultRole"
1482
1617
  )
1483
1618
  ), U.has(e.dataType) || i.push(
@@ -1486,7 +1621,7 @@ function Te(e) {
1486
1621
  "Derived field dataType must be string, number, boolean, date, datetime, or unknown.",
1487
1622
  "dataType"
1488
1623
  )
1489
- ), me.has(e.computeStage) || i.push(
1624
+ ), _e.has(e.computeStage) || i.push(
1490
1625
  a(
1491
1626
  "invalid_derived_field_compute_stage",
1492
1627
  "Derived field computeStage must be row or aggregate.",
@@ -1514,7 +1649,7 @@ function Te(e) {
1514
1649
  e.defaultAggregate,
1515
1650
  "defaultAggregate",
1516
1651
  i
1517
- ), e.aggregationBehavior !== void 0 && !ge.has(
1652
+ ), e.aggregationBehavior !== void 0 && !ye.has(
1518
1653
  e.aggregationBehavior
1519
1654
  ) && i.push(
1520
1655
  a(
@@ -1522,7 +1657,7 @@ function Te(e) {
1522
1657
  "Derived field aggregationBehavior is not supported.",
1523
1658
  "aggregationBehavior"
1524
1659
  )
1525
- ), e.aggregationStrategy !== void 0 && !ve.has(
1660
+ ), e.aggregationStrategy !== void 0 && !he.has(
1526
1661
  e.aggregationStrategy
1527
1662
  ) && i.push(
1528
1663
  a(
@@ -1542,7 +1677,7 @@ function Te(e) {
1542
1677
  "Derived field expressionLanguage must be semaphor_sql_template.",
1543
1678
  "expressionLanguage"
1544
1679
  )
1545
- ), !c(e.inputs) || Object.keys(e.inputs).length === 0 ? i.push(
1680
+ ), !u(e.inputs) || Object.keys(e.inputs).length === 0 ? i.push(
1546
1681
  a(
1547
1682
  "invalid_derived_field_inputs",
1548
1683
  "Derived field needs at least one typed input.",
@@ -1559,34 +1694,34 @@ function Te(e) {
1559
1694
  );
1560
1695
  return;
1561
1696
  }
1562
- be(
1697
+ xe(
1563
1698
  n,
1564
1699
  `inputs.${t}`,
1565
1700
  i
1566
1701
  );
1567
- }), l(e.expression) && c(e.inputs)) {
1568
- const t = de(e.expression), n = new Set(t), s = Object.keys(e.inputs).filter(
1569
- (r) => l(r)
1702
+ }), l(e.expression) && u(e.inputs)) {
1703
+ const t = re(e.expression), n = new Set(t), o = Object.keys(e.inputs).filter(
1704
+ (s) => l(s)
1570
1705
  );
1571
- t.forEach((r) => {
1572
- Object.prototype.hasOwnProperty.call(e.inputs, r) || i.push(
1706
+ t.forEach((s) => {
1707
+ Object.prototype.hasOwnProperty.call(e.inputs, s) || i.push(
1573
1708
  a(
1574
1709
  "invalid_derived_field_expression_token",
1575
- `Derived field expression token "{${r}}" needs a matching inputs.${r} entry.`,
1710
+ `Derived field expression token "{${s}}" needs a matching inputs.${s} entry.`,
1576
1711
  "expression"
1577
1712
  )
1578
1713
  );
1579
- }), s.forEach((r) => {
1580
- n.has(r) || i.push(
1714
+ }), o.forEach((s) => {
1715
+ n.has(s) || i.push(
1581
1716
  a(
1582
1717
  "unused_derived_field_input",
1583
- `Derived field input "${r}" is not referenced by expression.`,
1584
- `inputs.${r}`
1718
+ `Derived field input "${s}" is not referenced by expression.`,
1719
+ `inputs.${s}`
1585
1720
  )
1586
1721
  );
1587
1722
  });
1588
1723
  }
1589
- return k(e.format, "format", i), e.tags !== void 0 && (!Array.isArray(e.tags) || e.tags.some((t) => !l(t))) && i.push(
1724
+ return R(e.format, "format", i), e.tags !== void 0 && (!Array.isArray(e.tags) || e.tags.some((t) => !l(t))) && i.push(
1590
1725
  a(
1591
1726
  "invalid_derived_field_tags",
1592
1727
  "Derived field tags must be non-empty strings.",
@@ -1594,9 +1729,9 @@ function Te(e) {
1594
1729
  )
1595
1730
  ), { ok: i.length === 0, errors: i, warnings: [] };
1596
1731
  }
1597
- function je(e) {
1732
+ function Ce(e) {
1598
1733
  const i = [];
1599
- if (!c(e))
1734
+ if (!u(e))
1600
1735
  return i.push(
1601
1736
  a(
1602
1737
  "invalid_result_calculation",
@@ -1617,9 +1752,9 @@ function je(e) {
1617
1752
  "Result calculation kind must be percent_of_total, rank, running_total, or previous_row_delta.",
1618
1753
  "kind"
1619
1754
  )
1620
- ), N(e.input, "input", i), ye(e.output, "output", i), e.kind === "percent_of_total") {
1755
+ ), j(e.input, "input", i), we(e.output, "output", i), e.kind === "percent_of_total") {
1621
1756
  const t = e.denominator;
1622
- t !== void 0 && (c(t) ? t.scope === "population" ? (f(t.metric, "denominator.metric", i, {
1757
+ t !== void 0 && (u(t) ? t.scope === "population" ? (f(t.metric, "denominator.metric", i, {
1623
1758
  required: !0
1624
1759
  }), x(
1625
1760
  t.filters,
@@ -1645,9 +1780,9 @@ function je(e) {
1645
1780
  "Rank result calculation order must be asc or desc.",
1646
1781
  "order"
1647
1782
  )
1648
- ), (e.kind === "running_total" || e.kind === "previous_row_delta") && e.orderBy !== void 0 && N(e.orderBy, "orderBy", i), { ok: i.length === 0, errors: i, warnings: [] };
1783
+ ), (e.kind === "running_total" || e.kind === "previous_row_delta") && e.orderBy !== void 0 && j(e.orderBy, "orderBy", i), { ok: i.length === 0, errors: i, warnings: [] };
1649
1784
  }
1650
- function z(e) {
1785
+ function Q(e) {
1651
1786
  var n;
1652
1787
  const i = [], t = [];
1653
1788
  if (!e || typeof e != "object")
@@ -1673,89 +1808,93 @@ function z(e) {
1673
1808
  "Analytics intent version must be 1.",
1674
1809
  "version"
1675
1810
  )
1676
- ), L(e.source, "source", i), Ee(e, i), e.kind === "metric") {
1677
- const s = Array.isArray(e.metrics) ? e.metrics.filter(
1678
- (r) => c(r) && l(r.name)
1811
+ ), S(e.source, "source", i), Oe(e, i), pe(e, i), "relationshipHint" in e && e.relationshipHint !== void 0 && k(
1812
+ e.relationshipHint,
1813
+ "relationshipHint",
1814
+ i
1815
+ ), e.kind === "metric") {
1816
+ const o = Array.isArray(e.measures) ? e.measures.filter(
1817
+ (s) => u(s) && l(s.name)
1679
1818
  ) : [];
1680
- if (!Array.isArray(e.metrics) || e.metrics.length === 0 ? i.push(
1819
+ if (!Array.isArray(e.measures) || e.measures.length === 0 ? i.push(
1681
1820
  a(
1682
- "missing_metric",
1683
- "Metric intent needs at least one metric.",
1684
- "metrics"
1821
+ "missing_measure",
1822
+ "Metric intent needs at least one measure.",
1823
+ "measures"
1685
1824
  )
1686
- ) : e.metrics.some(
1687
- (r) => !c(r) || !l(r.name)
1825
+ ) : e.measures.some(
1826
+ (s) => !u(s) || !l(s.name)
1688
1827
  ) && i.push(
1689
1828
  a(
1690
- "invalid_metric_list",
1691
- "Metric intent metrics must be an array of field references with names.",
1692
- "metrics"
1829
+ "invalid_measure_list",
1830
+ "Metric intent measures must be an array of field references with names.",
1831
+ "measures"
1693
1832
  )
1694
- ), s.forEach((r, o) => {
1695
- f(r, `metrics.${o}`, i, {
1833
+ ), o.forEach((s, r) => {
1834
+ f(s, `measures.${r}`, i, {
1696
1835
  required: !0
1697
1836
  });
1698
- }), s.length > 0 && !Z(s)) {
1699
- const r = s.find(
1700
- (o, u) => s.some(
1701
- (d, m) => m !== u && C(d, o)
1837
+ }), o.length > 0 && !X(o)) {
1838
+ const s = o.find(
1839
+ (r, c) => o.some(
1840
+ (d, p) => p !== c && L(d, r)
1702
1841
  )
1703
1842
  );
1704
- r && i.push(
1843
+ s && i.push(
1705
1844
  a(
1706
- "duplicate_metric",
1707
- J(r),
1708
- "metrics"
1845
+ "duplicate_measure",
1846
+ Z(s),
1847
+ "measures"
1709
1848
  )
1710
1849
  );
1711
1850
  }
1712
- if (c(e.primaryMetric) && l(e.primaryMetric.name) && A(
1713
- e.primaryMetric,
1714
- s
1851
+ if (u(e.primaryMeasure) && l(e.primaryMeasure.name) && M(
1852
+ e.primaryMeasure,
1853
+ o
1715
1854
  ).length > 1 && i.push(
1716
1855
  a(
1717
- "ambiguous_primary_metric",
1718
- "Metric intent primaryMetric must identify exactly one selected metric.",
1719
- "primaryMetric"
1856
+ "ambiguous_primary_measure",
1857
+ "Metric intent primaryMeasure must identify exactly one selected measure.",
1858
+ "primaryMeasure"
1720
1859
  )
1721
- ), e.primaryMetric !== void 0 && (f(e.primaryMetric, "primaryMetric", i, {
1860
+ ), e.primaryMeasure !== void 0 && (f(e.primaryMeasure, "primaryMeasure", i, {
1722
1861
  required: !0
1723
- }), c(e.primaryMetric) && l(e.primaryMetric.name) && s.length > 0 && !ee(
1724
- e.primaryMetric,
1725
- s
1862
+ }), u(e.primaryMeasure) && l(e.primaryMeasure.name) && o.length > 0 && !W(
1863
+ e.primaryMeasure,
1864
+ o
1726
1865
  ) && i.push(
1727
1866
  a(
1728
- "invalid_primary_metric",
1729
- "Metric intent primaryMetric must match one metric field reference.",
1730
- "primaryMetric"
1867
+ "invalid_primary_measure",
1868
+ "Metric intent primaryMeasure must match one measure field reference.",
1869
+ "primaryMeasure"
1731
1870
  )
1732
1871
  )), e.dimensions !== void 0 && !Array.isArray(e.dimensions) ? i.push(
1733
1872
  a(
1734
- "invalid_metric_dimensions",
1873
+ "invalid_measure_dimensions",
1735
1874
  "Metric intent dimensions must be an array of field references.",
1736
1875
  "dimensions"
1737
1876
  )
1738
1877
  ) : Array.isArray(e.dimensions) && e.dimensions.some(
1739
- (r) => !c(r) || !l(r.name)
1878
+ (s) => !u(s) || !l(s.name)
1740
1879
  ) && i.push(
1741
1880
  a(
1742
- "invalid_metric_dimensions",
1881
+ "invalid_measure_dimensions",
1743
1882
  "Metric intent dimensions must be an array of field references with names.",
1744
1883
  "dimensions"
1745
1884
  )
1746
- ), e.dateField !== void 0 && f(e.dateField, "dateField", i), e.timeWindow !== void 0 && (S(e.timeWindow, "timeWindow", i), e.dateField || i.push(
1885
+ ), e.dateField !== void 0 && f(e.dateField, "dateField", i), e.timeWindow !== void 0 && (A(e.timeWindow, "timeWindow", i), e.dateField || i.push(
1747
1886
  a(
1748
1887
  "missing_time_window_date_field",
1749
1888
  "Metric timeWindow needs a dateField.",
1750
1889
  "dateField"
1751
1890
  )
1752
- )), x(e.filters, "filters", i), Array.isArray(e.dimensions) && e.dimensions.forEach((r, o) => {
1753
- f(r, `dimensions.${o}`, i);
1891
+ )), x(e.filters, "filters", i), Array.isArray(e.dimensions) && e.dimensions.forEach((s, r) => {
1892
+ f(s, `dimensions.${r}`, i);
1754
1893
  }), e.orderBy !== void 0) {
1755
- if (!c(e.orderBy))
1894
+ if (!u(e.orderBy))
1756
1895
  i.push(
1757
1896
  a(
1758
- "invalid_metric_order_by",
1897
+ "invalid_measure_order_by",
1759
1898
  "Metric intent orderBy must be a structured object.",
1760
1899
  "orderBy"
1761
1900
  )
@@ -1764,31 +1903,31 @@ function z(e) {
1764
1903
  required: !0
1765
1904
  }), e.orderBy.direction !== "asc" && e.orderBy.direction !== "desc" && i.push(
1766
1905
  a(
1767
- "invalid_metric_order_direction",
1906
+ "invalid_measure_order_direction",
1768
1907
  "Metric intent orderBy direction must be asc or desc.",
1769
1908
  "orderBy.direction"
1770
1909
  )
1771
- ), c(e.orderBy.field) && l(e.orderBy.field.name)) {
1772
- const r = [
1773
- ...s,
1774
- ...e.timeGrain && e.dateField && c(e.dateField) ? [e.dateField] : [],
1910
+ ), u(e.orderBy.field) && l(e.orderBy.field.name)) {
1911
+ const s = [
1912
+ ...o,
1913
+ ...e.timeGrain && e.dateField && u(e.dateField) ? [e.dateField] : [],
1775
1914
  ...Array.isArray(e.dimensions) ? e.dimensions.filter(
1776
- (o) => c(o) && l(o.name)
1915
+ (r) => u(r) && l(r.name)
1777
1916
  ) : []
1778
1917
  ];
1779
- r.length > 0 && !ie(
1918
+ s.length > 0 && !ee(
1780
1919
  e.orderBy.field,
1781
- r
1920
+ s
1782
1921
  ) && i.push(
1783
1922
  a(
1784
- "invalid_metric_order_by",
1785
- "Metric intent orderBy.field must match one selected metric, grouped dateField, or dimension.",
1923
+ "invalid_measure_order_by",
1924
+ "Metric intent orderBy.field must match one selected measure, grouped dateField, or dimension.",
1786
1925
  "orderBy.field"
1787
1926
  )
1788
1927
  );
1789
1928
  }
1790
1929
  }
1791
- Pe(e, i);
1930
+ Ee(e, i);
1792
1931
  } else e.kind === "records" ? (!Array.isArray(e.fields) || e.fields.length === 0 ? i.push(
1793
1932
  a(
1794
1933
  "missing_record_fields",
@@ -1796,30 +1935,30 @@ function z(e) {
1796
1935
  "fields"
1797
1936
  )
1798
1937
  ) : e.fields.some(
1799
- (s) => !c(s) || !l(s.name)
1938
+ (o) => !u(o) || !l(o.name)
1800
1939
  ) && i.push(
1801
1940
  a(
1802
1941
  "invalid_record_fields",
1803
1942
  "Records intent fields must be field references with names.",
1804
1943
  "fields"
1805
1944
  )
1806
- ), Array.isArray(e.fields) && e.fields.forEach((s, r) => {
1807
- f(s, `fields.${r}`, i);
1808
- }), e.dateField !== void 0 && f(e.dateField, "dateField", i), E(e.pagination, "pagination", i), e.timeWindow !== void 0 && (S(e.timeWindow, "timeWindow", i), e.dateField || i.push(
1945
+ ), Array.isArray(e.fields) && e.fields.forEach((o, s) => {
1946
+ f(o, `fields.${s}`, i);
1947
+ }), e.dateField !== void 0 && f(e.dateField, "dateField", i), N(e.pagination, "pagination", i), e.timeWindow !== void 0 && (A(e.timeWindow, "timeWindow", i), e.dateField || i.push(
1809
1948
  a(
1810
1949
  "missing_time_window_date_field",
1811
1950
  "Records timeWindow needs a dateField.",
1812
1951
  "dateField"
1813
1952
  )
1814
- )), x(e.filters, "filters", i), Array.isArray(e.filters) && e.filters.forEach((s, r) => {
1815
- c(s) && s.scope === "aggregate" && i.push(
1953
+ )), x(e.filters, "filters", i), Array.isArray(e.filters) && e.filters.forEach((o, s) => {
1954
+ u(o) && o.scope === "aggregate" && i.push(
1816
1955
  a(
1817
1956
  "unsupported_record_filter_scope",
1818
1957
  "Records intents support row-scope filters only. Use a metric intent for aggregate-scope filters.",
1819
- `filters.${r}.scope`
1958
+ `filters.${s}.scope`
1820
1959
  )
1821
1960
  );
1822
- }), e.orderBy !== void 0 && (c(e.orderBy) ? (f(e.orderBy.field, "orderBy.field", i, {
1961
+ }), e.orderBy !== void 0 && (u(e.orderBy) ? (f(e.orderBy.field, "orderBy.field", i, {
1823
1962
  required: !0
1824
1963
  }), e.orderBy.direction !== "asc" && e.orderBy.direction !== "desc" && i.push(
1825
1964
  a(
@@ -1833,13 +1972,7 @@ function z(e) {
1833
1972
  "Records intent orderBy must be a structured object.",
1834
1973
  "orderBy"
1835
1974
  )
1836
- ))) : e.kind === "inputOptions" ? ((!e.field || !l(e.field.name)) && i.push(
1837
- a(
1838
- "missing_input_options_field",
1839
- "Input options intent needs a field.",
1840
- "field"
1841
- )
1842
- ), f(e.field, "field", i, { required: !0 })) : e.kind === "matrix" ? De(e, i) : e.kind === "sql" ? (((n = e.source) == null ? void 0 : n.kind) !== "sql" && i.push(
1975
+ ))) : e.kind === "inputOptions" ? ce(e, i) : e.kind === "matrix" ? Te(e, i) : e.kind === "sql" ? (((n = e.source) == null ? void 0 : n.kind) !== "sql" && i.push(
1843
1976
  a(
1844
1977
  "invalid_sql_source",
1845
1978
  "SQL analytics intent must use a SQL execution source.",
@@ -1847,13 +1980,13 @@ function z(e) {
1847
1980
  )
1848
1981
  ), l(e.sql) || i.push(
1849
1982
  a("missing_sql", "SQL analytics intent needs SQL text.", "sql")
1850
- ), W(
1983
+ ), J(
1851
1984
  e.defaultParameters,
1852
1985
  "defaultParameters",
1853
1986
  i
1854
- ), Array.isArray(e.fields) && e.fields.forEach((s, r) => {
1855
- f(s, `fields.${r}`, i);
1856
- }), E(e.pagination, "pagination", i)) : i.push(
1987
+ ), Array.isArray(e.fields) && e.fields.forEach((o, s) => {
1988
+ f(o, `fields.${s}`, i);
1989
+ }), N(e.pagination, "pagination", i)) : i.push(
1857
1990
  a(
1858
1991
  "invalid_analytics_kind",
1859
1992
  "Analytics kind is not supported.",
@@ -1864,10 +1997,10 @@ function z(e) {
1864
1997
  ok: i.length === 0,
1865
1998
  errors: i,
1866
1999
  warnings: t,
1867
- repairHints: Oe(i)
2000
+ repairHints: Be(i)
1868
2001
  };
1869
2002
  }
1870
- function Ee(e, i) {
2003
+ function Oe(e, i) {
1871
2004
  if (!(!("derivedFields" in e) || e.derivedFields === void 0)) {
1872
2005
  if (!Array.isArray(e.derivedFields)) {
1873
2006
  i.push(
@@ -1880,18 +2013,18 @@ function Ee(e, i) {
1880
2013
  return;
1881
2014
  }
1882
2015
  e.derivedFields.forEach((t, n) => {
1883
- Te(
2016
+ Ne(
1884
2017
  t
1885
- ).errors.forEach((r) => {
2018
+ ).errors.forEach((s) => {
1886
2019
  i.push({
1887
- ...r,
1888
- path: r.path ? `derivedFields.${n}.${r.path}` : `derivedFields.${n}`
2020
+ ...s,
2021
+ path: s.path ? `derivedFields.${n}.${s.path}` : `derivedFields.${n}`
1889
2022
  });
1890
2023
  });
1891
2024
  });
1892
2025
  }
1893
2026
  }
1894
- function Ne(e) {
2027
+ function je(e) {
1895
2028
  const i = [], t = [];
1896
2029
  if (!e || typeof e != "object")
1897
2030
  return {
@@ -1923,18 +2056,18 @@ function Ne(e) {
1923
2056
  "Answer-obligations operation intent needs at least one obligation.",
1924
2057
  "obligations"
1925
2058
  )
1926
- ) : e.obligations.forEach((n, s) => {
2059
+ ) : e.obligations.forEach((n, o) => {
1927
2060
  l(n.id) || i.push(
1928
2061
  a(
1929
2062
  "missing_obligation_id",
1930
2063
  "Each analytics obligation needs an id.",
1931
- `obligations.${s}.id`
2064
+ `obligations.${o}.id`
1932
2065
  )
1933
2066
  ), l(n.prompt) || i.push(
1934
2067
  a(
1935
2068
  "missing_obligation_prompt",
1936
2069
  "Each analytics obligation needs a prompt.",
1937
- `obligations.${s}.prompt`
2070
+ `obligations.${o}.prompt`
1938
2071
  )
1939
2072
  );
1940
2073
  });
@@ -1946,7 +2079,7 @@ function Ne(e) {
1946
2079
  "instruction"
1947
2080
  )
1948
2081
  ), e.analyticsIntent) {
1949
- const n = z(
2082
+ const n = Q(
1950
2083
  e.analyticsIntent
1951
2084
  );
1952
2085
  i.push(...n.errors), t.push(...n.warnings);
@@ -1963,10 +2096,10 @@ function Ne(e) {
1963
2096
  ok: i.length === 0,
1964
2097
  errors: i,
1965
2098
  warnings: t,
1966
- repairHints: Q(i)
2099
+ repairHints: Y(i)
1967
2100
  };
1968
2101
  }
1969
- function Ce(e) {
2102
+ function Le(e) {
1970
2103
  const i = [], t = [];
1971
2104
  if (!e || typeof e != "object")
1972
2105
  return {
@@ -1994,7 +2127,7 @@ function Ce(e) {
1994
2127
  "kind"
1995
2128
  )
1996
2129
  );
1997
- const n = Ne(
2130
+ const n = je(
1998
2131
  e.operationIntent
1999
2132
  );
2000
2133
  return i.push(...n.errors), t.push(...n.warnings), Array.isArray(e.plannedToolCalls) || i.push(
@@ -2007,16 +2140,16 @@ function Ce(e) {
2007
2140
  ok: i.length === 0,
2008
2141
  errors: i,
2009
2142
  warnings: t,
2010
- repairHints: Q(i)
2143
+ repairHints: Y(i)
2011
2144
  };
2012
2145
  }
2013
- function Q(e) {
2146
+ function Y(e) {
2014
2147
  return e.map((i) => ({
2015
2148
  code: i.code,
2016
2149
  recommendedNextStep: i.code === "missing_obligations" ? "Normalize the user request into one or more typed analytics obligations before recovery planning." : "Correct the operation/recovery contract shape before planning execution."
2017
2150
  }));
2018
2151
  }
2019
- function Oe(e) {
2152
+ function Be(e) {
2020
2153
  return e.map((i) => {
2021
2154
  switch (i.code) {
2022
2155
  case "missing_source":
@@ -2025,11 +2158,11 @@ function Oe(e) {
2025
2158
  fieldRole: "source",
2026
2159
  recommendedNextStep: "Provide a semantic, physical, or SQL source before executing analytics."
2027
2160
  };
2028
- case "missing_metric":
2161
+ case "missing_measure":
2029
2162
  return {
2030
2163
  code: i.code,
2031
- fieldRole: "metric",
2032
- recommendedNextStep: "Choose one exact metric from the grounded schema candidates."
2164
+ fieldRole: "measure",
2165
+ recommendedNextStep: "Choose one exact measure from the grounded schema candidates."
2033
2166
  };
2034
2167
  case "missing_record_fields":
2035
2168
  return {
@@ -2046,7 +2179,7 @@ function Oe(e) {
2046
2179
  case "missing_matrix_values":
2047
2180
  return {
2048
2181
  code: i.code,
2049
- fieldRole: "metric",
2182
+ fieldRole: "measure",
2050
2183
  recommendedNextStep: "Choose at least one value field for the matrix table."
2051
2184
  };
2052
2185
  case "unsupported_matrix_sql_source":
@@ -2055,11 +2188,23 @@ function Oe(e) {
2055
2188
  fieldRole: "source",
2056
2189
  recommendedNextStep: "Use a semantic or explorer-backed source for matrix tables; raw SQL matrix tables are not supported."
2057
2190
  };
2058
- case "missing_input_options_field":
2191
+ case "missing_input_options_input_id":
2059
2192
  return {
2060
2193
  code: i.code,
2061
2194
  fieldRole: "input",
2062
- recommendedNextStep: "Provide the exact field whose option values should be listed."
2195
+ recommendedNextStep: "Provide the inputId that these option values populate."
2196
+ };
2197
+ case "missing_input_options_label_field":
2198
+ return {
2199
+ code: i.code,
2200
+ fieldRole: "dimension",
2201
+ recommendedNextStep: "Provide the human-readable field used as option labels."
2202
+ };
2203
+ case "missing_input_options_value_field":
2204
+ return {
2205
+ code: i.code,
2206
+ fieldRole: "dimension",
2207
+ recommendedNextStep: "Provide the stable field used as option values."
2063
2208
  };
2064
2209
  case "missing_sql":
2065
2210
  return {
@@ -2087,7 +2232,7 @@ function Oe(e) {
2087
2232
  }
2088
2233
  }).filter((i) => !!i);
2089
2234
  }
2090
- function Fe(e, i, t, n) {
2235
+ function qe(e, i, t, n) {
2091
2236
  if (!e || typeof e != "object") {
2092
2237
  t.push(
2093
2238
  a("invalid_view", "Dashboard view must be an object.", i)
@@ -2133,25 +2278,25 @@ function Fe(e, i, t, n) {
2133
2278
  `${i}.analytics.kind`
2134
2279
  )
2135
2280
  );
2136
- const s = z(e.analytics);
2137
- for (const r of s.errors)
2281
+ const o = Q(e.analytics);
2282
+ for (const s of o.errors)
2138
2283
  t.push(
2139
2284
  a(
2140
- r.code,
2141
- r.message,
2142
- `${i}.analytics${r.path ? `.${r.path}` : ""}`
2285
+ s.code,
2286
+ s.message,
2287
+ `${i}.analytics${s.path ? `.${s.path}` : ""}`
2143
2288
  )
2144
2289
  );
2145
- for (const r of s.warnings)
2290
+ for (const s of o.warnings)
2146
2291
  n.push(
2147
2292
  a(
2148
- r.code,
2149
- r.message,
2150
- `${i}.analytics${r.path ? `.${r.path}` : ""}`
2293
+ s.code,
2294
+ s.message,
2295
+ `${i}.analytics${s.path ? `.${s.path}` : ""}`
2151
2296
  )
2152
2297
  );
2153
2298
  }
2154
- function Le(e) {
2299
+ function Ue(e) {
2155
2300
  const i = [], t = [];
2156
2301
  if (!e || typeof e != "object")
2157
2302
  return {
@@ -2171,82 +2316,82 @@ function Le(e) {
2171
2316
  ), l(e.title) || i.push(
2172
2317
  a("missing_title", "Dashboard intent needs a title.", "title")
2173
2318
  );
2174
- const n = Array.isArray(e.inputs) ? e.inputs : [], s = $(
2175
- n.filter(c).map((d) => d.id).filter((d) => typeof d == "string")
2319
+ const n = Array.isArray(e.inputs) ? e.inputs : [], o = $(
2320
+ n.filter(u).map((d) => d.id).filter((d) => typeof d == "string")
2176
2321
  );
2177
- s && i.push(
2322
+ o && i.push(
2178
2323
  a(
2179
2324
  "duplicate_input_id",
2180
- `Duplicate input id: ${s}.`,
2325
+ `Duplicate input id: ${o}.`,
2181
2326
  "inputs"
2182
2327
  )
2183
2328
  );
2184
- for (const [d, m] of n.entries()) {
2185
- const p = `inputs.${d}`;
2186
- if (!c(m)) {
2329
+ for (const [d, p] of n.entries()) {
2330
+ const m = `inputs.${d}`;
2331
+ if (!u(p)) {
2187
2332
  i.push(
2188
- a("invalid_input", "Dashboard input must be an object.", p)
2333
+ a("invalid_input", "Dashboard input must be an object.", m)
2189
2334
  );
2190
2335
  continue;
2191
2336
  }
2192
- l(m.id) || i.push(
2193
- a("missing_input_id", "Input needs an id.", `${p}.id`)
2194
- ), l(m.label) || i.push(
2195
- a("missing_input_label", "Input needs a label.", `${p}.label`)
2196
- ), !m.field || !l(m.field.name) ? i.push(
2197
- a("missing_input_field", "Input needs a field.", `${p}.field`)
2198
- ) : f(m.field, `${p}.field`, i);
2337
+ l(p.id) || i.push(
2338
+ a("missing_input_id", "Input needs an id.", `${m}.id`)
2339
+ ), l(p.label) || i.push(
2340
+ a("missing_input_label", "Input needs a label.", `${m}.label`)
2341
+ ), !p.field || !l(p.field.name) ? i.push(
2342
+ a("missing_input_field", "Input needs a field.", `${m}.field`)
2343
+ ) : f(p.field, `${m}.field`, i);
2199
2344
  }
2200
- const r = Array.isArray(e.sections) ? e.sections : [];
2201
- r.length === 0 && i.push(
2345
+ const s = Array.isArray(e.sections) ? e.sections : [];
2346
+ s.length === 0 && i.push(
2202
2347
  a(
2203
2348
  "missing_sections",
2204
2349
  "Dashboard intent needs at least one section.",
2205
2350
  "sections"
2206
2351
  )
2207
2352
  );
2208
- const o = r.flatMap(
2209
- (d) => d && typeof d == "object" && Array.isArray(d.views) ? d.views.filter(c).map((m) => m.id).filter((m) => !!m) : []
2210
- ), u = $(o);
2211
- u && i.push(
2353
+ const r = s.flatMap(
2354
+ (d) => d && typeof d == "object" && Array.isArray(d.views) ? d.views.filter(u).map((p) => p.id).filter((p) => !!p) : []
2355
+ ), c = $(r);
2356
+ c && i.push(
2212
2357
  a(
2213
2358
  "duplicate_view_id",
2214
- `Duplicate dashboard view id: ${u}.`,
2359
+ `Duplicate dashboard view id: ${c}.`,
2215
2360
  "sections"
2216
2361
  )
2217
2362
  );
2218
- for (const [d, m] of r.entries()) {
2219
- const p = `sections.${d}`;
2220
- if (!m || typeof m != "object") {
2363
+ for (const [d, p] of s.entries()) {
2364
+ const m = `sections.${d}`;
2365
+ if (!p || typeof p != "object") {
2221
2366
  i.push(
2222
2367
  a(
2223
2368
  "invalid_section",
2224
2369
  "Dashboard section must be an object.",
2225
- p
2370
+ m
2226
2371
  )
2227
2372
  );
2228
2373
  continue;
2229
2374
  }
2230
- if (l(m.title) || i.push(
2375
+ if (l(p.title) || i.push(
2231
2376
  a(
2232
2377
  "missing_section_title",
2233
2378
  "Dashboard section needs a title.",
2234
- p
2379
+ m
2235
2380
  )
2236
- ), !Array.isArray(m.views) || m.views.length === 0) {
2381
+ ), !Array.isArray(p.views) || p.views.length === 0) {
2237
2382
  i.push(
2238
2383
  a(
2239
2384
  "missing_section_views",
2240
2385
  "Dashboard section needs at least one view.",
2241
- `${p}.views`
2386
+ `${m}.views`
2242
2387
  )
2243
2388
  );
2244
2389
  continue;
2245
2390
  }
2246
- for (const [b, y] of m.views.entries())
2247
- Fe(
2391
+ for (const [b, y] of p.views.entries())
2392
+ qe(
2248
2393
  y,
2249
- `${p}.views.${b}`,
2394
+ `${m}.views.${b}`,
2250
2395
  i,
2251
2396
  t
2252
2397
  );
@@ -2254,13 +2399,11 @@ function Le(e) {
2254
2399
  return { ok: i.length === 0, errors: i, warnings: t };
2255
2400
  }
2256
2401
  export {
2257
- K as a,
2258
- je as b,
2259
- z as c,
2260
- Ne as d,
2261
- Ce as e,
2262
- Le as f,
2263
- Be as n,
2264
- P as p,
2265
- Te as v
2402
+ Ce as a,
2403
+ Q as b,
2404
+ je as c,
2405
+ Le as d,
2406
+ Ue as e,
2407
+ T as p,
2408
+ Ne as v
2266
2409
  };