react-semaphor 0.1.348 → 0.1.350

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 (60) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +46 -45
  3. package/dist/brand-studio/index.cjs +1 -1
  4. package/dist/brand-studio/index.js +3 -3
  5. package/dist/chunks/{braces-Ccvdip75.js → braces-CBMh5wmd.js} +1 -1
  6. package/dist/chunks/{braces-DDHkbW1c.js → braces-Cc86y9Ov.js} +1 -1
  7. package/dist/chunks/{calendar-preferences-dialog-AVORk8vl.js → calendar-preferences-dialog-BAEeX-ug.js} +3 -3
  8. package/dist/chunks/{calendar-preferences-dialog-CaeYg4gz.js → calendar-preferences-dialog-C8flqOjZ.js} +1 -1
  9. package/dist/chunks/{chevrons-up-down-B9fTSds9.js → chevrons-up-down-CUZL1zaU.js} +1 -1
  10. package/dist/chunks/{chevrons-up-down-pV0i9ptS.js → chevrons-up-down-fg3WME_w.js} +1 -1
  11. package/dist/chunks/{dashboard-briefing-launcher-GmwoVZDA.js → dashboard-briefing-launcher--zBBsBWm.js} +1 -1
  12. package/dist/chunks/{dashboard-briefing-launcher-B7hc62UJ.js → dashboard-briefing-launcher-DU9x-97H.js} +4 -4
  13. package/dist/chunks/{dashboard-controls-DOwo-4PX.js → dashboard-controls-BwMjIqjP.js} +129 -119
  14. package/dist/chunks/dashboard-controls-CMShL7m9.js +57 -0
  15. package/dist/chunks/{dashboard-json-Bjge3tEx.js → dashboard-json-CHKC0bf-.js} +1 -1
  16. package/dist/chunks/{dashboard-json-CqWAmaOX.js → dashboard-json-kD_jszqF.js} +2 -2
  17. package/dist/chunks/{edit-dashboard-visual-NXdSdqQS.js → edit-dashboard-visual-C1RUXsWi.js} +6 -6
  18. package/dist/chunks/{edit-dashboard-visual-biDU5oky.js → edit-dashboard-visual-C1vIFm6H.js} +1 -1
  19. package/dist/chunks/{index-DhuiooCy.js → index-BJLPtQeK.js} +36385 -36071
  20. package/dist/chunks/index-D2ai-cZQ.js +1410 -0
  21. package/dist/chunks/{palette-BMXS-AcI.js → palette-C1k347Tb.js} +1 -1
  22. package/dist/chunks/{palette-DKecBucs.js → palette-DP6TXUD8.js} +1 -1
  23. package/dist/chunks/{resource-management-panel-DIt7NxsX.js → resource-management-panel-UkMvz7Cp.js} +3 -3
  24. package/dist/chunks/{resource-management-panel-MHam0keE.js → resource-management-panel-f4Od7wCB.js} +1 -1
  25. package/dist/chunks/source-identity-C-xaeE_I.js +1 -0
  26. package/dist/chunks/source-identity-qAmkNtEK.js +49 -0
  27. package/dist/chunks/{switch-CP7SmEIZ.js → switch-21kU-tcj.js} +2 -2
  28. package/dist/chunks/{switch-DYRgERrC.js → switch-C0S63HAv.js} +1 -1
  29. package/dist/chunks/{use-create-flow-overlay-state-DS5aPcKd.js → use-create-flow-overlay-state-C49F2KdU.js} +1 -1
  30. package/dist/chunks/{use-create-flow-overlay-state-p_i0aUhH.js → use-create-flow-overlay-state-jpQ2BxKF.js} +3 -3
  31. package/dist/chunks/{use-visual-utils-EazVs86Z.js → use-visual-utils-CiN4zNkZ.js} +1 -1
  32. package/dist/chunks/{use-visual-utils-PfpWtYcR.js → use-visual-utils-D8Pe1PSH.js} +2 -2
  33. package/dist/chunks/{validators-C2eI8fHy.js → validators-B-NiYgGc.js} +178 -224
  34. package/dist/chunks/validators-DlEfynH8.js +1 -0
  35. package/dist/dashboard/index.cjs +1 -1
  36. package/dist/dashboard/index.js +1 -1
  37. package/dist/dashboard-assistant/index.cjs +1 -0
  38. package/dist/dashboard-assistant/index.js +12 -0
  39. package/dist/dashboard-authoring/index.cjs +3 -3
  40. package/dist/dashboard-authoring/index.js +16 -15
  41. package/dist/data-app-builder/index.cjs +1 -1
  42. package/dist/data-app-builder/index.js +1 -1
  43. package/dist/data-app-sdk/index.cjs +1 -1
  44. package/dist/data-app-sdk/index.js +32 -31
  45. package/dist/index.cjs +1 -1
  46. package/dist/index.js +7 -7
  47. package/dist/style.css +1 -1
  48. package/dist/surfboard/index.cjs +1 -1
  49. package/dist/surfboard/index.js +2 -2
  50. package/dist/types/dashboard-assistant.d.ts +1030 -0
  51. package/dist/types/dashboard-authoring.d.ts +1 -1
  52. package/dist/types/dashboard.d.ts +1 -1
  53. package/dist/types/main.d.ts +1 -1
  54. package/dist/types/shared.d.ts +1 -1
  55. package/dist/types/surfboard.d.ts +1 -1
  56. package/dist/types/types.d.ts +1 -1
  57. package/package.json +6 -1
  58. package/dist/chunks/dashboard-controls-Bthl3kl3.js +0 -52
  59. package/dist/chunks/index-D7U5s9Uk.js +0 -1425
  60. package/dist/chunks/validators-BNvNf_tO.js +0 -1
@@ -1,122 +1,81 @@
1
- function A(e) {
2
- return e ? e.kind === "semantic" ? [
3
- e.kind,
4
- e.domainId,
5
- e.datasetId || "",
6
- e.datasetName
7
- ].join(":") : e.kind === "physical" ? [
8
- e.kind,
9
- e.connectionId,
10
- e.databaseName || "",
11
- e.schemaName || "",
12
- e.tableName
13
- ].join(":") : [
14
- e.kind,
15
- e.connectionId,
16
- e.dialect || "",
17
- e.label || ""
18
- ].join(":") : "";
19
- }
20
- function F(e, i) {
21
- return !e || !i ? e === i : e.kind !== i.kind ? !1 : e.kind === "semantic" && i.kind === "semantic" ? e.domainId !== i.domainId ? !1 : e.datasetId && i.datasetId ? e.datasetId === i.datasetId : e.datasetName === i.datasetName : A(e) === A(i);
22
- }
23
- function D(e, i) {
24
- return e.kind !== "semantic" || i.kind !== "semantic" ? e : {
25
- ...e,
26
- datasetId: e.datasetId || i.datasetId,
27
- label: e.label || i.label,
28
- connectionId: e.connectionId || i.connectionId
29
- };
30
- }
31
- function x(e, i) {
32
- return e.name === i.name && F(e.source, i.source);
1
+ import { s as R } from "./source-identity-qAmkNtEK.js";
2
+ function n(e, i, t) {
3
+ return t ? { code: e, message: i, path: t } : { code: e, message: i };
33
4
  }
34
- function J(e, i) {
35
- return {
36
- ...e,
37
- label: e.label || i.label,
38
- role: e.role || i.role,
39
- dataType: e.dataType || i.dataType,
40
- source: e.source && i.source ? D(e.source, i.source) : e.source || i.source
41
- };
42
- }
43
- function n(e, i, a) {
44
- return a ? { code: e, message: i, path: a } : { code: e, message: i };
45
- }
46
- function j(e) {
5
+ function T(e) {
47
6
  for (let i = 0; i < e.length; i += 1) {
48
- const a = e[i];
7
+ const t = e[i];
49
8
  if (e.some(
50
- (r, o) => o !== i && $(r, a)
9
+ (r, o) => o !== i && S(r, t)
51
10
  ))
52
11
  return !1;
53
12
  }
54
13
  return !0;
55
14
  }
56
- function S(e, i) {
57
- return x(e, i);
15
+ function I(e, i) {
16
+ return R(e, i);
58
17
  }
59
- function $(e, i) {
60
- return S(e, i) && y(e) === y(i);
18
+ function S(e, i) {
19
+ return I(e, i) && y(e) === y(i);
61
20
  }
62
- function O(e) {
21
+ function F(e) {
63
22
  return `Metric intent has duplicate metric "${e.name}" with the same aggregate (${y(e)}). Use different aggregates to request both, or remove one entry.`;
64
23
  }
65
- function C(e, i) {
66
- return b(e, i).length === 1;
24
+ function D(e, i) {
25
+ return g(e, i).length === 1;
67
26
  }
68
- function E(e, i) {
69
- return b(e, i).length === 1;
27
+ function j(e, i) {
28
+ return g(e, i).length === 1;
70
29
  }
71
- function b(e, i) {
30
+ function g(e, i) {
72
31
  return i.filter(
73
- (r) => q(e, r)
32
+ (r) => O(e, r)
74
33
  );
75
34
  }
76
- function q(e, i) {
77
- return U(e, i) ? e.source ? S(i, e) : !0 : !1;
35
+ function O(e, i) {
36
+ return C(e, i) ? e.source ? I(i, e) : !0 : !1;
78
37
  }
79
- function U(e, i) {
80
- return !(i.name !== e.name || e.role !== void 0 && i.role !== void 0 && i.role !== e.role || P(e, i) && y(i) !== y(e));
38
+ function C(e, i) {
39
+ return !(i.name !== e.name || e.role !== void 0 && i.role !== void 0 && i.role !== e.role || E(e, i) && y(i) !== y(e));
81
40
  }
82
- function P(e, i) {
41
+ function E(e, i) {
83
42
  return e.role === "measure" || i.role === "measure" || e.aggregate !== void 0 || i.aggregate !== void 0;
84
43
  }
85
44
  function y(e) {
86
45
  return (e.aggregate || "SUM").toUpperCase();
87
46
  }
88
- const G = /^(\d{4})-(\d{2})-(\d{2})$/, H = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:\d{2})$/;
89
- function I(e) {
47
+ const q = /^(\d{4})-(\d{2})-(\d{2})$/, U = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:\d{2})$/;
48
+ function A(e) {
90
49
  if (typeof e != "string")
91
50
  return null;
92
- const i = e.trim(), a = G.exec(i);
93
- if (a) {
94
- const [, v, g, w] = a;
95
- return k(v, g, w) ? new Date(
96
- Date.UTC(Number(v), Number(g) - 1, Number(w))
51
+ const i = e.trim(), t = q.exec(i);
52
+ if (t) {
53
+ const [, v, b, w] = t;
54
+ return M(v, b, w) ? new Date(
55
+ Date.UTC(Number(v), Number(b) - 1, Number(w))
97
56
  ) : null;
98
57
  }
99
- const r = H.exec(i);
58
+ const r = U.exec(i);
100
59
  if (!r)
101
60
  return null;
102
- const [, o, s, t, p, c, l = "00", , f] = r;
103
- if (!k(o, s, t) || !_(p, 0, 23) || !_(c, 0, 59) || !_(l, 0, 59) || !L(f))
61
+ const [, o, a, s, p, c, l = "00", , f] = r;
62
+ if (!M(o, a, s) || !_(p, 0, 23) || !_(c, 0, 59) || !_(l, 0, 59) || !P(f))
104
63
  return null;
105
64
  const h = new Date(i);
106
65
  return Number.isFinite(h.getTime()) ? h : null;
107
66
  }
108
- function k(e, i, a) {
109
- const r = Number(e), o = Number(i), s = Number(a);
110
- if (!Number.isInteger(r) || !Number.isInteger(o) || !Number.isInteger(s) || o < 1 || o > 12)
67
+ function M(e, i, t) {
68
+ const r = Number(e), o = Number(i), a = Number(t);
69
+ if (!Number.isInteger(r) || !Number.isInteger(o) || !Number.isInteger(a) || o < 1 || o > 12)
111
70
  return !1;
112
- const t = new Date(Date.UTC(r, o - 1, s));
113
- return t.getUTCFullYear() === r && t.getUTCMonth() === o - 1 && t.getUTCDate() === s;
71
+ const s = new Date(Date.UTC(r, o - 1, a));
72
+ return s.getUTCFullYear() === r && s.getUTCMonth() === o - 1 && s.getUTCDate() === a;
114
73
  }
115
- function _(e, i, a) {
74
+ function _(e, i, t) {
116
75
  const r = Number(e);
117
- return Number.isInteger(r) && r >= i && r <= a;
76
+ return Number.isInteger(r) && r >= i && r <= t;
118
77
  }
119
- function L(e) {
78
+ function P(e) {
120
79
  if (e === "Z")
121
80
  return !0;
122
81
  const i = /^([+-])(\d{2}):(\d{2})$/.exec(e);
@@ -128,16 +87,16 @@ function d(e) {
128
87
  function u(e) {
129
88
  return !!(e && typeof e == "object" && !Array.isArray(e));
130
89
  }
131
- function M(e) {
90
+ function $(e) {
132
91
  const i = /* @__PURE__ */ new Set();
133
- for (const a of e) {
134
- if (i.has(a))
135
- return a;
136
- i.add(a);
92
+ for (const t of e) {
93
+ if (i.has(t))
94
+ return t;
95
+ i.add(t);
137
96
  }
138
97
  return null;
139
98
  }
140
- const V = /* @__PURE__ */ new Set([
99
+ const G = /* @__PURE__ */ new Set([
141
100
  "SUM",
142
101
  "COUNT",
143
102
  "AVG",
@@ -146,19 +105,19 @@ const V = /* @__PURE__ */ new Set([
146
105
  "MEDIAN",
147
106
  "DISTINCT"
148
107
  ]);
149
- function N(e, i, a) {
108
+ function k(e, i, t) {
150
109
  if (!e || typeof e != "object") {
151
- a.push(n("missing_source", "Analytics intent needs a source.", i));
110
+ t.push(n("missing_source", "Analytics intent needs a source.", i));
152
111
  return;
153
112
  }
154
113
  if (e.kind === "semantic") {
155
- d(e.domainId) || a.push(
114
+ d(e.domainId) || t.push(
156
115
  n(
157
116
  "missing_semantic_domain",
158
117
  "Semantic source needs a domainId.",
159
118
  `${i}.domainId`
160
119
  )
161
- ), d(e.datasetName) || a.push(
120
+ ), d(e.datasetName) || t.push(
162
121
  n(
163
122
  "missing_dataset_name",
164
123
  "Semantic source needs a datasetName.",
@@ -168,13 +127,13 @@ function N(e, i, a) {
168
127
  return;
169
128
  }
170
129
  if (e.kind === "physical") {
171
- d(e.connectionId) || a.push(
130
+ d(e.connectionId) || t.push(
172
131
  n(
173
132
  "missing_connection_id",
174
133
  "Physical source needs a connectionId.",
175
134
  `${i}.connectionId`
176
135
  )
177
- ), d(e.tableName) || a.push(
136
+ ), d(e.tableName) || t.push(
178
137
  n(
179
138
  "missing_table_name",
180
139
  "Physical source needs a tableName.",
@@ -184,7 +143,7 @@ function N(e, i, a) {
184
143
  return;
185
144
  }
186
145
  if (e.kind === "sql") {
187
- d(e.connectionId) || a.push(
146
+ d(e.connectionId) || t.push(
188
147
  n(
189
148
  "missing_connection_id",
190
149
  "SQL source needs a connectionId.",
@@ -193,21 +152,21 @@ function N(e, i, a) {
193
152
  );
194
153
  return;
195
154
  }
196
- a.push(n("invalid_source_kind", "Source kind is not supported.", i));
155
+ t.push(n("invalid_source_kind", "Source kind is not supported.", i));
197
156
  }
198
- function m(e, i, a, r = {}) {
157
+ function m(e, i, t, r = {}) {
199
158
  if (!e || !u(e)) {
200
- r.required && a.push(
159
+ r.required && t.push(
201
160
  n("missing_field_ref", "Field reference needs a name.", i)
202
161
  );
203
162
  return;
204
163
  }
205
- d(e.name) || a.push(
164
+ d(e.name) || t.push(
206
165
  n("missing_field_ref", "Field reference needs a name.", `${i}.name`)
207
- ), e.source !== void 0 && N(e.source, `${i}.source`, a), Q(e.aggregate, `${i}.aggregate`, a);
166
+ ), e.source !== void 0 && k(e.source, `${i}.source`, t), H(e.aggregate, `${i}.aggregate`, t);
208
167
  }
209
- function Q(e, i, a) {
210
- e !== void 0 && (typeof e != "string" || !V.has(e)) && a.push(
168
+ function H(e, i, t) {
169
+ e !== void 0 && (typeof e != "string" || !G.has(e)) && t.push(
211
170
  n(
212
171
  "invalid_aggregate",
213
172
  "Field aggregate must be SUM, COUNT, AVG, MIN, MAX, MEDIAN, or DISTINCT.",
@@ -215,7 +174,7 @@ function Q(e, i, a) {
215
174
  )
216
175
  );
217
176
  }
218
- function X(e, i) {
177
+ function L(e, i) {
219
178
  if (e.analysis === void 0)
220
179
  return;
221
180
  if (!u(e.analysis)) {
@@ -257,12 +216,12 @@ function X(e, i) {
257
216
  "analysis.orderBy"
258
217
  )
259
218
  );
260
- const { timeWindow: a } = e.analysis;
261
- a !== void 0 && B(a, "analysis.timeWindow", i);
219
+ const { timeWindow: t } = e.analysis;
220
+ t !== void 0 && N(t, "analysis.timeWindow", i);
262
221
  }
263
- function B(e, i, a) {
222
+ function N(e, i, t) {
264
223
  if (!u(e)) {
265
- a.push(
224
+ t.push(
266
225
  n(
267
226
  "invalid_time_window",
268
227
  "Time window must be a structured object.",
@@ -271,40 +230,40 @@ function B(e, i, a) {
271
230
  );
272
231
  return;
273
232
  }
274
- if (e.kind !== void 0 && e.kind !== "relative" && e.kind !== "absolute" && a.push(
233
+ if (e.kind !== void 0 && e.kind !== "relative" && e.kind !== "absolute" && t.push(
275
234
  n(
276
235
  "invalid_time_window",
277
236
  "Time window kind must be relative or absolute.",
278
237
  `${i}.kind`
279
238
  )
280
239
  ), e.kind === "absolute") {
281
- if (d(e.start) || a.push(
240
+ if (d(e.start) || t.push(
282
241
  n(
283
242
  "invalid_time_window",
284
243
  "Absolute time window start must be a non-empty ISO date or timestamp string.",
285
244
  `${i}.start`
286
245
  )
287
- ), d(e.end) || a.push(
246
+ ), d(e.end) || t.push(
288
247
  n(
289
248
  "invalid_time_window",
290
249
  "Absolute time window end must be a non-empty ISO date or timestamp string.",
291
250
  `${i}.end`
292
251
  )
293
252
  ), d(e.start) && d(e.end)) {
294
- const r = I(e.start), o = I(e.end);
295
- r || a.push(
253
+ const r = A(e.start), o = A(e.end);
254
+ r || t.push(
296
255
  n(
297
256
  "invalid_time_window",
298
257
  "Absolute time window start must be a valid ISO date or timestamp.",
299
258
  `${i}.start`
300
259
  )
301
- ), o || a.push(
260
+ ), o || t.push(
302
261
  n(
303
262
  "invalid_time_window",
304
263
  "Absolute time window end must be a valid ISO date or timestamp.",
305
264
  `${i}.end`
306
265
  )
307
- ), r && o && r.getTime() > o.getTime() && a.push(
266
+ ), r && o && r.getTime() > o.getTime() && t.push(
308
267
  n(
309
268
  "invalid_time_window",
310
269
  "Absolute time window start must be before or equal to end.",
@@ -314,25 +273,25 @@ function B(e, i, a) {
314
273
  }
315
274
  return;
316
275
  }
317
- e.unit !== "second" && e.unit !== "minute" && e.unit !== "hour" && e.unit !== "day" && e.unit !== "week" && e.unit !== "month" && e.unit !== "quarter" && e.unit !== "year" && a.push(
276
+ e.unit !== "second" && e.unit !== "minute" && e.unit !== "hour" && e.unit !== "day" && e.unit !== "week" && e.unit !== "month" && e.unit !== "quarter" && e.unit !== "year" && t.push(
318
277
  n(
319
278
  "invalid_time_window",
320
279
  "Time window unit must be second, minute, hour, day, week, month, quarter, or year.",
321
280
  `${i}.unit`
322
281
  )
323
- ), (typeof e.value != "number" || !Number.isFinite(e.value) || e.value <= 0) && a.push(
282
+ ), (typeof e.value != "number" || !Number.isFinite(e.value) || e.value <= 0) && t.push(
324
283
  n(
325
284
  "invalid_time_window",
326
285
  "Time window value must be a positive number.",
327
286
  `${i}.value`
328
287
  )
329
- ), e.anchor !== void 0 && e.anchor !== "now" && e.anchor !== "latest_available" && a.push(
288
+ ), e.anchor !== void 0 && e.anchor !== "now" && e.anchor !== "latest_available" && t.push(
330
289
  n(
331
290
  "invalid_time_window",
332
291
  "Time window anchor must be now or latest_available.",
333
292
  `${i}.anchor`
334
293
  )
335
- ), e.completeness !== void 0 && e.completeness !== "include_partial" && e.completeness !== "complete_periods" && a.push(
294
+ ), e.completeness !== void 0 && e.completeness !== "include_partial" && e.completeness !== "complete_periods" && t.push(
336
295
  n(
337
296
  "invalid_time_window",
338
297
  "Time window completeness must be include_partial or complete_periods.",
@@ -340,10 +299,10 @@ function B(e, i, a) {
340
299
  )
341
300
  );
342
301
  }
343
- function Y(e, i, a) {
302
+ function V(e, i, t) {
344
303
  if (e !== void 0) {
345
304
  if (!Array.isArray(e)) {
346
- a.push(
305
+ t.push(
347
306
  n(
348
307
  "invalid_analytics_filters",
349
308
  "Analytics filters must be an array.",
@@ -353,80 +312,80 @@ function Y(e, i, a) {
353
312
  return;
354
313
  }
355
314
  e.forEach((r, o) => {
356
- const s = `${i}.${o}`;
315
+ const a = `${i}.${o}`;
357
316
  if (!u(r)) {
358
- a.push(
317
+ t.push(
359
318
  n(
360
319
  "invalid_analytics_filter",
361
320
  "Analytics filter must be a structured object.",
362
- s
321
+ a
363
322
  )
364
323
  );
365
324
  return;
366
325
  }
367
- const t = r;
368
- m(t.field, `${s}.field`, a, {
326
+ const s = r;
327
+ m(s.field, `${a}.field`, t, {
369
328
  required: !0
370
329
  });
371
- const p = t.operator === "is_null" || t.operator === "is_not_null";
372
- if (t.operator !== void 0 && t.operator !== "=" && t.operator !== "!=" && t.operator !== "in" && t.operator !== "not_in" && t.operator !== "contains" && t.operator !== "not_contains" && t.operator !== "between" && t.operator !== "not_between" && t.operator !== ">" && t.operator !== ">=" && t.operator !== "<" && t.operator !== "<=" && t.operator !== "is_null" && t.operator !== "is_not_null" && a.push(
330
+ const p = s.operator === "is_null" || s.operator === "is_not_null";
331
+ if (s.operator !== void 0 && s.operator !== "=" && s.operator !== "!=" && s.operator !== "in" && s.operator !== "not_in" && s.operator !== "contains" && s.operator !== "not_contains" && s.operator !== "between" && s.operator !== "not_between" && s.operator !== ">" && s.operator !== ">=" && s.operator !== "<" && s.operator !== "<=" && s.operator !== "is_null" && s.operator !== "is_not_null" && t.push(
373
332
  n(
374
333
  "invalid_analytics_filter_operator",
375
334
  "Analytics filter operator is not supported.",
376
- `${s}.operator`
335
+ `${a}.operator`
377
336
  )
378
- ), t.values === void 0 && !p && a.push(
337
+ ), s.values === void 0 && !p && t.push(
379
338
  n(
380
339
  "missing_analytics_filter_value",
381
340
  "Analytics filter needs values unless it is a null check.",
382
- s
341
+ a
383
342
  )
384
- ), p && t.values !== void 0) {
385
- a.push(
343
+ ), p && s.values !== void 0) {
344
+ t.push(
386
345
  n(
387
346
  "invalid_analytics_filter_values",
388
347
  "Null-check analytics filters must not include values.",
389
- `${s}.values`
348
+ `${a}.values`
390
349
  )
391
350
  );
392
351
  return;
393
352
  }
394
- if (t.values !== void 0 && !Array.isArray(t.values)) {
395
- a.push(
353
+ if (s.values !== void 0 && !Array.isArray(s.values)) {
354
+ t.push(
396
355
  n(
397
356
  "invalid_analytics_filter_values",
398
357
  "Analytics filter values must be an array when provided.",
399
- `${s}.values`
358
+ `${a}.values`
400
359
  )
401
360
  );
402
361
  return;
403
362
  }
404
- if (t.values !== void 0) {
405
- const c = t.values.length;
406
- if (t.operator === "between" || t.operator === "not_between") {
407
- c !== 2 && a.push(
363
+ if (s.values !== void 0) {
364
+ const c = s.values.length;
365
+ if (s.operator === "between" || s.operator === "not_between") {
366
+ c !== 2 && t.push(
408
367
  n(
409
368
  "invalid_analytics_filter_values",
410
369
  "Between analytics filters must include exactly two values.",
411
- `${s}.values`
370
+ `${a}.values`
412
371
  )
413
372
  );
414
373
  return;
415
374
  }
416
- (t.operator === "contains" || t.operator === "not_contains" || t.operator === "=" || t.operator === "!=" || t.operator === ">" || t.operator === ">=" || t.operator === "<" || t.operator === "<=" || t.operator === void 0) && c !== 1 && a.push(
375
+ (s.operator === "contains" || s.operator === "not_contains" || s.operator === "=" || s.operator === "!=" || s.operator === ">" || s.operator === ">=" || s.operator === "<" || s.operator === "<=" || s.operator === void 0) && c !== 1 && t.push(
417
376
  n(
418
377
  "invalid_analytics_filter_values",
419
378
  "Scalar analytics filters must include exactly one value. Use in/not_in for multiple values.",
420
- `${s}.values`
379
+ `${a}.values`
421
380
  )
422
381
  );
423
382
  }
424
383
  });
425
384
  }
426
385
  }
427
- function T(e) {
386
+ function B(e) {
428
387
  var r;
429
- const i = [], a = [];
388
+ const i = [], t = [];
430
389
  if (!e || typeof e != "object")
431
390
  return {
432
391
  ok: !1,
@@ -436,7 +395,7 @@ function T(e) {
436
395
  "Analytics intent must be a structured object."
437
396
  )
438
397
  ],
439
- warnings: a,
398
+ warnings: t,
440
399
  repairHints: [
441
400
  {
442
401
  code: "invalid_analytics_intent",
@@ -446,39 +405,39 @@ function T(e) {
446
405
  };
447
406
  if (e.version !== void 0 && e.version !== 1 && i.push(
448
407
  n("invalid_version", "Analytics intent version must be 1.", "version")
449
- ), N(e.source, "source", i), e.kind === "metric") {
408
+ ), k(e.source, "source", i), e.kind === "metric") {
450
409
  const o = Array.isArray(e.metrics) ? e.metrics.filter(
451
- (s) => u(s) && d(s.name)
410
+ (a) => u(a) && d(a.name)
452
411
  ) : [];
453
412
  if (!Array.isArray(e.metrics) || e.metrics.length === 0 ? i.push(
454
413
  n("missing_metric", "Metric intent needs at least one metric.", "metrics")
455
414
  ) : e.metrics.some(
456
- (s) => !u(s) || !d(s.name)
415
+ (a) => !u(a) || !d(a.name)
457
416
  ) && i.push(
458
417
  n(
459
418
  "invalid_metric_list",
460
419
  "Metric intent metrics must be an array of field references with names.",
461
420
  "metrics"
462
421
  )
463
- ), o.forEach((s, t) => {
464
- m(s, `metrics.${t}`, i, {
422
+ ), o.forEach((a, s) => {
423
+ m(a, `metrics.${s}`, i, {
465
424
  required: !0
466
425
  });
467
- }), o.length > 0 && !j(o)) {
468
- const s = o.find(
469
- (t, p) => o.some(
470
- (c, l) => l !== p && $(c, t)
426
+ }), o.length > 0 && !T(o)) {
427
+ const a = o.find(
428
+ (s, p) => o.some(
429
+ (c, l) => l !== p && S(c, s)
471
430
  )
472
431
  );
473
- s && i.push(
432
+ a && i.push(
474
433
  n(
475
434
  "duplicate_metric",
476
- O(s),
435
+ F(a),
477
436
  "metrics"
478
437
  )
479
438
  );
480
439
  }
481
- if (u(e.primaryMetric) && d(e.primaryMetric.name) && b(
440
+ if (u(e.primaryMetric) && d(e.primaryMetric.name) && g(
482
441
  e.primaryMetric,
483
442
  o
484
443
  ).length > 1 && i.push(
@@ -489,7 +448,7 @@ function T(e) {
489
448
  )
490
449
  ), e.primaryMetric !== void 0 && (m(e.primaryMetric, "primaryMetric", i, {
491
450
  required: !0
492
- }), u(e.primaryMetric) && d(e.primaryMetric.name) && o.length > 0 && !C(
451
+ }), u(e.primaryMetric) && d(e.primaryMetric.name) && o.length > 0 && !D(
493
452
  e.primaryMetric,
494
453
  o
495
454
  ) && i.push(
@@ -505,21 +464,21 @@ function T(e) {
505
464
  "dimensions"
506
465
  )
507
466
  ) : Array.isArray(e.dimensions) && e.dimensions.some(
508
- (s) => !u(s) || !d(s.name)
467
+ (a) => !u(a) || !d(a.name)
509
468
  ) && i.push(
510
469
  n(
511
470
  "invalid_metric_dimensions",
512
471
  "Metric intent dimensions must be an array of field references with names.",
513
472
  "dimensions"
514
473
  )
515
- ), e.dateField !== void 0 && m(e.dateField, "dateField", i), e.timeWindow !== void 0 && (B(e.timeWindow, "timeWindow", i), e.dateField || i.push(
474
+ ), e.dateField !== void 0 && m(e.dateField, "dateField", i), e.timeWindow !== void 0 && (N(e.timeWindow, "timeWindow", i), e.dateField || i.push(
516
475
  n(
517
476
  "missing_time_window_date_field",
518
477
  "Metric timeWindow needs a dateField.",
519
478
  "dateField"
520
479
  )
521
- )), Y(e.filters, "filters", i), Array.isArray(e.dimensions) && e.dimensions.forEach((s, t) => {
522
- m(s, `dimensions.${t}`, i);
480
+ )), V(e.filters, "filters", i), Array.isArray(e.dimensions) && e.dimensions.forEach((a, s) => {
481
+ m(a, `dimensions.${s}`, i);
523
482
  }), e.orderBy !== void 0) {
524
483
  if (!u(e.orderBy))
525
484
  i.push(
@@ -538,16 +497,16 @@ function T(e) {
538
497
  "orderBy.direction"
539
498
  )
540
499
  ), u(e.orderBy.field) && d(e.orderBy.field.name)) {
541
- const s = [
500
+ const a = [
542
501
  ...o,
543
502
  ...e.timeGrain && e.dateField && u(e.dateField) ? [e.dateField] : [],
544
503
  ...Array.isArray(e.dimensions) ? e.dimensions.filter(
545
- (t) => u(t) && d(t.name)
504
+ (s) => u(s) && d(s.name)
546
505
  ) : []
547
506
  ];
548
- s.length > 0 && !E(
507
+ a.length > 0 && !j(
549
508
  e.orderBy.field,
550
- s
509
+ a
551
510
  ) && i.push(
552
511
  n(
553
512
  "invalid_metric_order_by",
@@ -557,7 +516,7 @@ function T(e) {
557
516
  );
558
517
  }
559
518
  }
560
- X(e, i);
519
+ L(e, i);
561
520
  } else e.kind === "records" ? (!Array.isArray(e.fields) || e.fields.length === 0 ? i.push(
562
521
  n(
563
522
  "missing_record_fields",
@@ -572,8 +531,8 @@ function T(e) {
572
531
  "Records intent fields must be field references with names.",
573
532
  "fields"
574
533
  )
575
- ), Array.isArray(e.fields) && e.fields.forEach((o, s) => {
576
- m(o, `fields.${s}`, i);
534
+ ), Array.isArray(e.fields) && e.fields.forEach((o, a) => {
535
+ m(o, `fields.${a}`, i);
577
536
  }), e.dateField !== void 0 && m(e.dateField, "dateField", i), e.orderBy !== void 0 && (u(e.orderBy) ? (m(e.orderBy.field, "orderBy.field", i, {
578
537
  required: !0
579
538
  }), e.orderBy.direction !== "asc" && e.orderBy.direction !== "desc" && i.push(
@@ -600,20 +559,20 @@ function T(e) {
600
559
  "SQL analytics intent must use a SQL execution source.",
601
560
  "source"
602
561
  )
603
- ), d(e.sql) || i.push(n("missing_sql", "SQL analytics intent needs SQL text.", "sql")), Array.isArray(e.fields) && e.fields.forEach((o, s) => {
604
- m(o, `fields.${s}`, i);
562
+ ), d(e.sql) || i.push(n("missing_sql", "SQL analytics intent needs SQL text.", "sql")), Array.isArray(e.fields) && e.fields.forEach((o, a) => {
563
+ m(o, `fields.${a}`, i);
605
564
  })) : i.push(
606
565
  n("invalid_analytics_kind", "Analytics kind is not supported.", "kind")
607
566
  );
608
567
  return {
609
568
  ok: i.length === 0,
610
569
  errors: i,
611
- warnings: a,
612
- repairHints: z(i)
570
+ warnings: t,
571
+ repairHints: X(i)
613
572
  };
614
573
  }
615
- function Z(e) {
616
- const i = [], a = [];
574
+ function Q(e) {
575
+ const i = [], t = [];
617
576
  if (!e || typeof e != "object")
618
577
  return {
619
578
  ok: !1,
@@ -623,7 +582,7 @@ function Z(e) {
623
582
  "Operation intent must be a structured object."
624
583
  )
625
584
  ],
626
- warnings: a,
585
+ warnings: t,
627
586
  repairHints: [
628
587
  {
629
588
  code: "invalid_operation_intent",
@@ -663,10 +622,10 @@ function Z(e) {
663
622
  "instruction"
664
623
  )
665
624
  ), e.analyticsIntent) {
666
- const r = T(
625
+ const r = B(
667
626
  e.analyticsIntent
668
627
  );
669
- i.push(...r.errors), a.push(...r.warnings);
628
+ i.push(...r.errors), t.push(...r.warnings);
670
629
  }
671
630
  } else
672
631
  i.push(
@@ -679,12 +638,12 @@ function Z(e) {
679
638
  return {
680
639
  ok: i.length === 0,
681
640
  errors: i,
682
- warnings: a,
683
- repairHints: R(i)
641
+ warnings: t,
642
+ repairHints: x(i)
684
643
  };
685
644
  }
686
- function W(e) {
687
- const i = [], a = [];
645
+ function z(e) {
646
+ const i = [], t = [];
688
647
  if (!e || typeof e != "object")
689
648
  return {
690
649
  ok: !1,
@@ -694,7 +653,7 @@ function W(e) {
694
653
  "Analytics recovery plan must be a structured object."
695
654
  )
696
655
  ],
697
- warnings: a,
656
+ warnings: t,
698
657
  repairHints: [
699
658
  {
700
659
  code: "invalid_recovery_plan",
@@ -711,8 +670,8 @@ function W(e) {
711
670
  "kind"
712
671
  )
713
672
  );
714
- const r = Z(e.operationIntent);
715
- return i.push(...r.errors), a.push(...r.warnings), Array.isArray(e.plannedToolCalls) || i.push(
673
+ const r = Q(e.operationIntent);
674
+ return i.push(...r.errors), t.push(...r.warnings), Array.isArray(e.plannedToolCalls) || i.push(
716
675
  n(
717
676
  "invalid_planned_tool_calls",
718
677
  "Recovery plan plannedToolCalls must be an array.",
@@ -721,17 +680,17 @@ function W(e) {
721
680
  ), {
722
681
  ok: i.length === 0,
723
682
  errors: i,
724
- warnings: a,
725
- repairHints: R(i)
683
+ warnings: t,
684
+ repairHints: x(i)
726
685
  };
727
686
  }
728
- function R(e) {
687
+ function x(e) {
729
688
  return e.map((i) => ({
730
689
  code: i.code,
731
690
  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."
732
691
  }));
733
692
  }
734
- function z(e) {
693
+ function X(e) {
735
694
  return e.map((i) => {
736
695
  switch (i.code) {
737
696
  case "missing_source":
@@ -784,13 +743,13 @@ function z(e) {
784
743
  }
785
744
  }).filter((i) => !!i);
786
745
  }
787
- function K(e, i, a, r) {
746
+ function Y(e, i, t, r) {
788
747
  if (!e || typeof e != "object") {
789
- a.push(n("invalid_view", "Dashboard view must be an object.", i));
748
+ t.push(n("invalid_view", "Dashboard view must be an object.", i));
790
749
  return;
791
750
  }
792
- if (d(e.title) || a.push(n("missing_view_title", "Dashboard view needs a title.", i)), !e.presentation || typeof e.presentation != "object") {
793
- a.push(
751
+ if (d(e.title) || t.push(n("missing_view_title", "Dashboard view needs a title.", i)), !e.presentation || typeof e.presentation != "object") {
752
+ t.push(
794
753
  n(
795
754
  "missing_presentation",
796
755
  "Dashboard view needs a presentation.",
@@ -810,7 +769,7 @@ function K(e, i, a, r) {
810
769
  return;
811
770
  }
812
771
  if (!e.analytics) {
813
- a.push(
772
+ t.push(
814
773
  n(
815
774
  "missing_view_analytics",
816
775
  "Non-text dashboard views need analytics intent.",
@@ -819,22 +778,22 @@ function K(e, i, a, r) {
819
778
  );
820
779
  return;
821
780
  }
822
- const o = T(e.analytics);
823
- for (const s of o.errors)
824
- a.push(
825
- n(s.code, s.message, `${i}.analytics${s.path ? `.${s.path}` : ""}`)
781
+ const o = B(e.analytics);
782
+ for (const a of o.errors)
783
+ t.push(
784
+ n(a.code, a.message, `${i}.analytics${a.path ? `.${a.path}` : ""}`)
826
785
  );
827
- for (const s of o.warnings)
786
+ for (const a of o.warnings)
828
787
  r.push(
829
788
  n(
830
- s.code,
831
- s.message,
832
- `${i}.analytics${s.path ? `.${s.path}` : ""}`
789
+ a.code,
790
+ a.message,
791
+ `${i}.analytics${a.path ? `.${a.path}` : ""}`
833
792
  )
834
793
  );
835
794
  }
836
- function ee(e) {
837
- const i = [], a = [];
795
+ function J(e) {
796
+ const i = [], t = [];
838
797
  if (!e || typeof e != "object")
839
798
  return {
840
799
  ok: !1,
@@ -844,10 +803,10 @@ function ee(e) {
844
803
  "Dashboard intent must be a structured object."
845
804
  )
846
805
  ],
847
- warnings: a
806
+ warnings: t
848
807
  };
849
808
  e.version !== 1 && i.push(n("invalid_version", "Dashboard intent version must be 1.")), e.kind !== "dashboard" && i.push(n("invalid_kind", "Experience intent kind must be dashboard.")), d(e.title) || i.push(n("missing_title", "Dashboard intent needs a title.", "title"));
850
- const r = Array.isArray(e.inputs) ? e.inputs : [], o = M(
809
+ const r = Array.isArray(e.inputs) ? e.inputs : [], o = $(
851
810
  r.filter(u).map((c) => c.id).filter((c) => typeof c == "string")
852
811
  );
853
812
  o && i.push(
@@ -869,17 +828,17 @@ function ee(e) {
869
828
  n("missing_input_field", "Input needs a field.", `${f}.field`)
870
829
  ) : m(l.field, `${f}.field`, i);
871
830
  }
872
- const s = Array.isArray(e.sections) ? e.sections : [];
873
- s.length === 0 && i.push(
831
+ const a = Array.isArray(e.sections) ? e.sections : [];
832
+ a.length === 0 && i.push(
874
833
  n(
875
834
  "missing_sections",
876
835
  "Dashboard intent needs at least one section.",
877
836
  "sections"
878
837
  )
879
838
  );
880
- const t = s.flatMap(
839
+ const s = a.flatMap(
881
840
  (c) => c && typeof c == "object" && Array.isArray(c.views) ? c.views.filter(u).map((l) => l.id).filter((l) => !!l) : []
882
- ), p = M(t);
841
+ ), p = $(s);
883
842
  p && i.push(
884
843
  n(
885
844
  "duplicate_view_id",
@@ -887,7 +846,7 @@ function ee(e) {
887
846
  "sections"
888
847
  )
889
848
  );
890
- for (const [c, l] of s.entries()) {
849
+ for (const [c, l] of a.entries()) {
891
850
  const f = `sections.${c}`;
892
851
  if (!l || typeof l != "object") {
893
852
  i.push(
@@ -908,24 +867,19 @@ function ee(e) {
908
867
  continue;
909
868
  }
910
869
  for (const [h, v] of l.views.entries())
911
- K(
870
+ Y(
912
871
  v,
913
872
  `${f}.views.${h}`,
914
873
  i,
915
- a
874
+ t
916
875
  );
917
876
  }
918
- return { ok: i.length === 0, errors: i, warnings: a };
877
+ return { ok: i.length === 0, errors: i, warnings: t };
919
878
  }
920
879
  export {
921
- Z as a,
922
- W as b,
923
- ee as c,
924
- F as d,
925
- D as e,
926
- x as f,
927
- J as g,
928
- I as p,
929
- A as s,
930
- T as v
880
+ Q as a,
881
+ z as b,
882
+ J as c,
883
+ A as p,
884
+ B as v
931
885
  };